@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.
- package/dist/components/InlineGridField.js +95 -92
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +36 -2
- package/dist/shared/components/AudienceConfirmPanel.js +19 -19
- package/dist/shared/components/BroadcastView.js +213 -211
- package/dist/shared/components/CollectionBrowserView.js +2677 -2658
- package/dist/shared/components/ConfigHistory.js +45 -45
- package/dist/shared/components/ConformanceView.js +110 -110
- package/dist/shared/components/DataTable.js +51 -51
- package/dist/shared/components/FilePreviewLightbox.js +26 -25
- package/dist/shared/components/ItemEditForm.js +3038 -3027
- package/dist/shared/components/LiveCount.js +27 -23
- package/dist/shared/components/LiveTraceView.js +62 -61
- package/dist/shared/components/PageRenderer.js +422 -410
- package/dist/shared/components/ProfileView.js +199 -199
- package/dist/shared/components/QualityRulesView.js +70 -70
- package/dist/shared/components/QueryTable.js +131 -130
- package/dist/shared/components/RecordGraph.js +98 -98
- package/dist/shared/components/RecordReadView.js +287 -288
- package/dist/shared/components/ReportView.js +1279 -1259
- package/dist/shared/components/SlaRulesView.js +73 -74
- package/dist/shared/components/WidgetSlot.js +73 -73
- package/dist/shared/components/ai/AiChart.js +36 -32
- package/dist/shared/components/ai/AiMarkdown.js +136 -129
- package/dist/shared/components/ai/TaskDo.js +87 -87
- package/dist/shared/components/ai/answer-formats.js +37 -30
- package/dist/shared/components/ai/call-log/format.js +17 -16
- package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
- package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
- package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
- package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
- package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
- package/dist/shared/components/bulk/bulk-field-options.js +10 -10
- package/dist/shared/components/cbv/column-totals.js +53 -51
- package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
- package/dist/shared/components/command-center/announce.js +7 -6
- package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
- package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
- package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
- package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
- package/dist/shared/components/imports/RunDetailSheet.js +1 -1
- package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
- package/dist/shared/components/integrations/console/EventsView.js +35 -35
- package/dist/shared/components/integrations/console/FirefightView.js +15 -14
- package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
- package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
- package/dist/shared/components/integrations/console/SignalCard.js +67 -67
- package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
- package/dist/shared/components/item-edit/ChangesTray.js +88 -74
- package/dist/shared/components/item-edit/FilePickerField.js +123 -123
- package/dist/shared/components/item-edit/GroupSection.js +301 -292
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
- package/dist/shared/components/item-edit/InlineGridField.js +45 -36
- package/dist/shared/components/item-edit/InlineTableField.js +1167 -1153
- package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
- package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
- package/dist/shared/components/ops-report/format.js +37 -36
- package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
- package/dist/shared/components/panels/RevisionsPanel.js +306 -305
- package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
- package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
- package/dist/shared/components/pipeline/TeamsView.js +189 -130
- package/dist/shared/components/profile/AgentsPanel.js +6 -6
- package/dist/shared/components/profile/DelegationCard.js +13 -12
- package/dist/shared/components/profile/PersonActivity.js +48 -48
- package/dist/shared/components/profile/PersonExtras.js +107 -107
- package/dist/shared/components/profile/PersonWeek.js +9 -9
- package/dist/shared/components/queue/QueueBulkBar.js +19 -18
- package/dist/shared/components/queue/QueueBulkMove.js +21 -20
- package/dist/shared/components/queue/QueueItemSheet.js +136 -131
- package/dist/shared/components/queue/QueueWorklist.js +671 -670
- package/dist/shared/components/queue/worklist-helpers.js +36 -21
- package/dist/shared/components/support/RequestList.js +121 -121
- package/dist/shared/components/support/SupportAnalytics.js +29 -29
- package/dist/shared/lib/activity-sentence.js +251 -229
- package/dist/shared/lib/format-value.js +5 -4
- package/dist/shared/lib/number-format.js +87 -0
- package/dist/shared/lib/number-kind.js +133 -0
- package/dist/shared/lib/utils.js +24 -20
- package/dist/shared/lib/watch-list.js +1 -1
- package/dist/shared/lib/widget-value-format.js +26 -12
- package/package.json +1 -1
|
@@ -6,11 +6,11 @@ import { useState as _ } from "react";
|
|
|
6
6
|
import { useNivaroClient as D, useItemEditAuth as Q, useNavigation as U } from "../../context.js";
|
|
7
7
|
import { get as S, post as z } from "../../lib/commands.js";
|
|
8
8
|
import { useLiveOps as F } from "../../lib/live-ops.js";
|
|
9
|
-
import { cn as m } from "../../lib/utils.js";
|
|
10
|
-
import { RelationCombobox as
|
|
9
|
+
import { cn as m, formatNumber as R } from "../../lib/utils.js";
|
|
10
|
+
import { RelationCombobox as W } from "../item-edit/RelationCombobox.js";
|
|
11
11
|
import { UserChip as y } from "../item-edit/UserChip.js";
|
|
12
|
-
import { DelegationCard as
|
|
13
|
-
const N = (n) => n ? new Date(n).toLocaleDateString(void 0, { month: "short", day: "numeric" }) : "—",
|
|
12
|
+
import { DelegationCard as M } from "../profile/DelegationCard.js";
|
|
13
|
+
const N = (n) => n ? new Date(n).toLocaleDateString(void 0, { month: "short", day: "numeric" }) : "—", B = {
|
|
14
14
|
none: "no delegate",
|
|
15
15
|
expired: "delegation expired",
|
|
16
16
|
suspended: "delegate is suspended",
|
|
@@ -60,7 +60,7 @@ function f({
|
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function G({ e: n }) {
|
|
64
64
|
return n.delegate ? /* @__PURE__ */ a("span", { className: "inline-flex flex-wrap items-center gap-1.5", children: [
|
|
65
65
|
/* @__PURE__ */ e(y, { userId: n.delegate.id, size: "compact" }),
|
|
66
66
|
n.delegate_ok ? /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-0.5 text-[10.5px] text-emerald-700 dark:text-emerald-400", children: [
|
|
@@ -70,16 +70,16 @@ function B({ e: n }) {
|
|
|
70
70
|
] }) : /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-0.5 rounded-full bg-amber-500/10 px-1.5 py-px text-[10.5px] font-semibold text-amber-700 dark:text-amber-400", children: [
|
|
71
71
|
/* @__PURE__ */ e(O, { className: "h-3 w-3" }),
|
|
72
72
|
" ",
|
|
73
|
-
|
|
73
|
+
B[n.delegate_problem ?? "none"]
|
|
74
74
|
] })
|
|
75
75
|
] }) : /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1 rounded-full bg-red-500/10 px-2 py-0.5 text-[10.5px] font-semibold text-red-600 dark:text-red-400", children: [
|
|
76
76
|
/* @__PURE__ */ e(O, { className: "h-3 w-3" }),
|
|
77
77
|
" No delegate"
|
|
78
78
|
] });
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function V({ entry: n, onDone: s }) {
|
|
81
81
|
var l, k, w, i;
|
|
82
|
-
const d = D(), [o, r] = _(!1), [g, b] = _(((l = n.delegate) == null ? void 0 : l.id) ?? null), [c, p] = _(((k = n.delegate_expires_at) == null ? void 0 : k.slice(0, 10)) ?? ""),
|
|
82
|
+
const d = D(), [o, r] = _(!1), [g, b] = _(((l = n.delegate) == null ? void 0 : l.id) ?? null), [c, p] = _(((k = n.delegate_expires_at) == null ? void 0 : k.slice(0, 10)) ?? ""), u = K({
|
|
83
83
|
mutationFn: () => d.request(
|
|
84
84
|
z(`/delegation/${n.user.id}/delegate`, {
|
|
85
85
|
delegate_id: g,
|
|
@@ -92,7 +92,7 @@ function G({ entry: n, onDone: s }) {
|
|
|
92
92
|
});
|
|
93
93
|
return o ? /* @__PURE__ */ a("div", { className: "flex flex-wrap items-end gap-2", "data-nvr-assign-delegate": !0, children: [
|
|
94
94
|
/* @__PURE__ */ e("div", { className: "w-[220px]", children: /* @__PURE__ */ e(
|
|
95
|
-
|
|
95
|
+
W,
|
|
96
96
|
{
|
|
97
97
|
collection: "nivaro_users",
|
|
98
98
|
value: g,
|
|
@@ -114,10 +114,10 @@ function G({ entry: n, onDone: s }) {
|
|
|
114
114
|
"button",
|
|
115
115
|
{
|
|
116
116
|
type: "button",
|
|
117
|
-
disabled:
|
|
118
|
-
onClick: () =>
|
|
117
|
+
disabled: u.isPending,
|
|
118
|
+
onClick: () => u.mutate(),
|
|
119
119
|
className: "h-9 rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white disabled:opacity-50",
|
|
120
|
-
children:
|
|
120
|
+
children: u.isPending ? "Saving…" : "Save"
|
|
121
121
|
}
|
|
122
122
|
),
|
|
123
123
|
/* @__PURE__ */ e(
|
|
@@ -129,7 +129,7 @@ function G({ entry: n, onDone: s }) {
|
|
|
129
129
|
children: "Cancel"
|
|
130
130
|
}
|
|
131
131
|
),
|
|
132
|
-
|
|
132
|
+
u.isError && /* @__PURE__ */ e("span", { className: "text-[11.5px] text-red-600", children: ((i = (w = u.error) == null ? void 0 : w.response) == null ? void 0 : i.error) ?? "Save failed" })
|
|
133
133
|
] }) : /* @__PURE__ */ e(
|
|
134
134
|
"button",
|
|
135
135
|
{
|
|
@@ -158,7 +158,7 @@ function q({
|
|
|
158
158
|
/* @__PURE__ */ e("tbody", { children: n.map((r) => /* @__PURE__ */ a("tr", { className: "border-t border-slate-100 align-top dark:border-border", children: [
|
|
159
159
|
/* @__PURE__ */ e("td", { className: "px-4 py-2", children: /* @__PURE__ */ e(y, { userId: r.user.id, size: "compact" }) }),
|
|
160
160
|
o && /* @__PURE__ */ e("td", { className: "px-2 py-2 whitespace-nowrap text-slate-600 dark:text-muted-foreground", children: r.ooo_start || r.ooo_end ? `${N(r.ooo_start)} → ${r.ooo_end ? N(r.ooo_end) : "open"}` : r.currently_out ? "until switched off" : "—" }),
|
|
161
|
-
/* @__PURE__ */ e("td", { className: "px-2 py-2", children: /* @__PURE__ */ e(
|
|
161
|
+
/* @__PURE__ */ e("td", { className: "px-2 py-2", children: /* @__PURE__ */ e(G, { e: r }) }),
|
|
162
162
|
/* @__PURE__ */ e("td", { className: "px-2 py-2 text-slate-500", children: r.group_seats > 0 ? /* @__PURE__ */ a("span", { title: r.states.join(", "), "data-tip": r.states.join(", "), children: [
|
|
163
163
|
r.group_seats,
|
|
164
164
|
" seat",
|
|
@@ -176,19 +176,19 @@ function q({
|
|
|
176
176
|
"px-2 py-2 text-right tabular-nums",
|
|
177
177
|
r.pending_estimate > 0 && !r.delegate_ok ? "font-semibold text-red-600 dark:text-red-400" : "text-slate-600 dark:text-muted-foreground"
|
|
178
178
|
),
|
|
179
|
-
children: r.pending_estimate
|
|
179
|
+
children: R(r.pending_estimate)
|
|
180
180
|
}
|
|
181
181
|
),
|
|
182
|
-
s && /* @__PURE__ */ e("td", { className: "px-2 py-2", children: /* @__PURE__ */ e(
|
|
182
|
+
s && /* @__PURE__ */ e("td", { className: "px-2 py-2", children: /* @__PURE__ */ e(V, { entry: r, onDone: d }) })
|
|
183
183
|
] }, r.user.id)) })
|
|
184
184
|
] });
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function de({
|
|
187
187
|
className: n,
|
|
188
188
|
onNotice: s,
|
|
189
189
|
compactHeader: d = !1
|
|
190
190
|
}) {
|
|
191
|
-
const o = D(), r = I(), g = Q(), b = U(), c = !!(g != null && g.isAdmin), [p,
|
|
191
|
+
const o = D(), r = I(), g = Q(), b = U(), c = !!(g != null && g.isAdmin), [p, u] = _(14), { data: l, isLoading: k } = $({
|
|
192
192
|
queryKey: ["delegation-overview", p],
|
|
193
193
|
queryFn: () => o.request(S("/delegation/overview", { days: p })).then((t) => t.data)
|
|
194
194
|
}), { data: w } = $({
|
|
@@ -236,7 +236,7 @@ function se({
|
|
|
236
236
|
"button",
|
|
237
237
|
{
|
|
238
238
|
type: "button",
|
|
239
|
-
onClick: () =>
|
|
239
|
+
onClick: () => u(t),
|
|
240
240
|
className: m(
|
|
241
241
|
"rounded px-2.5 py-1 text-[12px] font-medium",
|
|
242
242
|
p === t ? "bg-slate-900 text-white dark:bg-nvr-cyan dark:text-[#172940]" : "text-slate-600 hover:bg-slate-100 dark:text-muted-foreground dark:hover:bg-muted"
|
|
@@ -331,7 +331,7 @@ function se({
|
|
|
331
331
|
)
|
|
332
332
|
] }),
|
|
333
333
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
334
|
-
w && /* @__PURE__ */ e(
|
|
334
|
+
w && /* @__PURE__ */ e(M, { user: w, onSaved: x }),
|
|
335
335
|
/* @__PURE__ */ e(
|
|
336
336
|
f,
|
|
337
337
|
{
|
|
@@ -344,13 +344,13 @@ function se({
|
|
|
344
344
|
children: [
|
|
345
345
|
/* @__PURE__ */ e(y, { userId: t.delegate.id, size: "compact" }),
|
|
346
346
|
/* @__PURE__ */ e("span", { className: "mt-1 text-slate-400", children: "covers" }),
|
|
347
|
-
/* @__PURE__ */ e("span", { className: "flex flex-wrap gap-1", children: t.covers.map((
|
|
348
|
-
/* @__PURE__ */ e(y, { userId:
|
|
349
|
-
|
|
347
|
+
/* @__PURE__ */ e("span", { className: "flex flex-wrap gap-1", children: t.covers.map((h) => /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1", children: [
|
|
348
|
+
/* @__PURE__ */ e(y, { userId: h.id, size: "compact" }),
|
|
349
|
+
h.expires_at && /* @__PURE__ */ a("span", { className: "text-[10.5px] text-slate-400", children: [
|
|
350
350
|
"until ",
|
|
351
|
-
N(
|
|
351
|
+
N(h.expires_at)
|
|
352
352
|
] })
|
|
353
|
-
] },
|
|
353
|
+
] }, h.id)) })
|
|
354
354
|
]
|
|
355
355
|
},
|
|
356
356
|
t.delegate.id
|
|
@@ -430,7 +430,7 @@ function se({
|
|
|
430
430
|
/* @__PURE__ */ e("span", { className: "ml-1 text-[10.5px] text-slate-400", children: t.collection.replace(/_/g, " ") })
|
|
431
431
|
] }),
|
|
432
432
|
/* @__PURE__ */ e("td", { className: "px-2 py-1.5 text-slate-600 dark:text-muted-foreground", children: t.state ?? "—" }),
|
|
433
|
-
/* @__PURE__ */ e("td", { className: "px-2 py-1.5 text-slate-600 dark:text-muted-foreground", children: t.owners.map((
|
|
433
|
+
/* @__PURE__ */ e("td", { className: "px-2 py-1.5 text-slate-600 dark:text-muted-foreground", children: t.owners.map((h) => `${h.name} (${h.reason.replace(/_/g, " ")})`).join(", ") })
|
|
434
434
|
]
|
|
435
435
|
},
|
|
436
436
|
`${t.collection}:${t.item}`
|
|
@@ -462,5 +462,5 @@ function se({
|
|
|
462
462
|
] });
|
|
463
463
|
}
|
|
464
464
|
export {
|
|
465
|
-
|
|
465
|
+
de as DelegationConsoleView
|
|
466
466
|
};
|