@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.
- package/dist/components/InlineGridField.js +95 -92
- package/dist/full.css +1 -1
- 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 +316 -278
- 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
|
@@ -3,14 +3,14 @@ import { useQuery as k } from "@tanstack/react-query";
|
|
|
3
3
|
import { useState as N } from "react";
|
|
4
4
|
import { useNivaroClient as y } from "../../context.js";
|
|
5
5
|
import { get as w } from "../../lib/commands.js";
|
|
6
|
-
import { cn as p, formatNumber as
|
|
6
|
+
import { cn as p, formatNumber as i } from "../../lib/utils.js";
|
|
7
7
|
import { Skeleton as x } from "../ui/skeleton.js";
|
|
8
8
|
const v = [7, 30, 90];
|
|
9
|
-
function
|
|
9
|
+
function m(t) {
|
|
10
10
|
return t == null ? "—" : t < 1 ? `${Math.max(1, Math.round(t * 60))} min` : t < 48 ? `${Number.isInteger(t) ? t : t.toFixed(1)} h` : `${(t / 24).toFixed(1)} d`;
|
|
11
11
|
}
|
|
12
|
-
const
|
|
13
|
-
function
|
|
12
|
+
const u = (t) => t == null ? "—" : `${Math.round(t * 100)}%`;
|
|
13
|
+
function c({ rows: t, empty: l }) {
|
|
14
14
|
if (!t.length) return /* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: l });
|
|
15
15
|
const n = Math.max(...t.map((d) => d.n), 1);
|
|
16
16
|
return /* @__PURE__ */ e("ul", { className: "space-y-1.5", children: t.map((d) => /* @__PURE__ */ s("li", { className: "flex items-center gap-2 text-[12px]", children: [
|
|
@@ -29,10 +29,10 @@ function o({ rows: t, empty: l }) {
|
|
|
29
29
|
style: { width: `${Math.max(3, d.n / n * 100)}%` }
|
|
30
30
|
}
|
|
31
31
|
) }),
|
|
32
|
-
/* @__PURE__ */ e("span", { className: "w-10 shrink-0 text-right tabular-nums text-slate-500 dark:text-muted-foreground", children:
|
|
32
|
+
/* @__PURE__ */ e("span", { className: "w-10 shrink-0 text-right tabular-nums text-slate-500 dark:text-muted-foreground", children: i(d.n) })
|
|
33
33
|
] }, d.label)) });
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function o({ title: t, children: l }) {
|
|
36
36
|
return /* @__PURE__ */ s("section", { className: "rounded-lg border border-slate-200 bg-white p-4 dark:border-border dark:bg-card", children: [
|
|
37
37
|
/* @__PURE__ */ e("h3", { className: "mb-3 text-[13px] font-semibold text-slate-800 dark:text-foreground", children: t }),
|
|
38
38
|
l
|
|
@@ -42,19 +42,19 @@ function h({ label: t, p: l, hint: n }) {
|
|
|
42
42
|
return /* @__PURE__ */ s("div", { className: "bg-white px-4 py-3 dark:bg-card", children: [
|
|
43
43
|
/* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: t }),
|
|
44
44
|
/* @__PURE__ */ s("p", { className: "mt-1 text-[18px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children: [
|
|
45
|
-
|
|
45
|
+
m(l.p50_hours),
|
|
46
46
|
l.samples > 0 && /* @__PURE__ */ e("span", { className: "ml-1.5 text-[11.5px] font-normal text-slate-500 dark:text-muted-foreground", children: "median" })
|
|
47
47
|
] }),
|
|
48
48
|
l.samples > 0 && /* @__PURE__ */ s("p", { className: "mt-0.5 text-[12px] tabular-nums text-slate-600 dark:text-slate-300", children: [
|
|
49
49
|
"p75 ",
|
|
50
|
-
|
|
50
|
+
m(l.p75_hours),
|
|
51
51
|
" · ",
|
|
52
|
-
|
|
52
|
+
u(l.within_target),
|
|
53
53
|
" within",
|
|
54
54
|
" ",
|
|
55
|
-
|
|
55
|
+
m(l.target_hours)
|
|
56
56
|
] }),
|
|
57
|
-
/* @__PURE__ */ e("p", { className: "mt-0.5 text-[11px] text-slate-500 dark:text-muted-foreground", children: l.samples === 0 ? `No ${n} yet` : `${
|
|
57
|
+
/* @__PURE__ */ e("p", { className: "mt-0.5 text-[11px] text-slate-500 dark:text-muted-foreground", children: l.samples === 0 ? `No ${n} yet` : `${i(l.samples)} ticket${l.samples === 1 ? "" : "s"}` })
|
|
58
58
|
] });
|
|
59
59
|
}
|
|
60
60
|
function C({ className: t }) {
|
|
@@ -95,22 +95,22 @@ function C({ className: t }) {
|
|
|
95
95
|
/* @__PURE__ */ s("div", { className: "grid gap-px overflow-hidden rounded-lg border border-slate-200 bg-slate-200 sm:grid-cols-2 lg:grid-cols-4 dark:border-border dark:bg-border", children: [
|
|
96
96
|
/* @__PURE__ */ s("div", { className: "bg-white px-4 py-3 dark:bg-card", children: [
|
|
97
97
|
/* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "Tickets" }),
|
|
98
|
-
/* @__PURE__ */ e("p", { className: "mt-1 text-[18px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children:
|
|
98
|
+
/* @__PURE__ */ e("p", { className: "mt-1 text-[18px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children: i(a.totals.tickets) }),
|
|
99
99
|
/* @__PURE__ */ s("p", { className: "mt-0.5 text-[12px] tabular-nums text-slate-600 dark:text-slate-300", children: [
|
|
100
|
-
a.totals.open,
|
|
100
|
+
i(a.totals.open),
|
|
101
101
|
" open · ",
|
|
102
|
-
a.totals.done,
|
|
103
|
-
" done ·
|
|
104
|
-
a.totals.cancelled,
|
|
102
|
+
i(a.totals.done),
|
|
103
|
+
" done ·",
|
|
105
104
|
" ",
|
|
106
|
-
|
|
105
|
+
i(a.totals.cancelled),
|
|
106
|
+
" cancelled"
|
|
107
107
|
] })
|
|
108
108
|
] }),
|
|
109
109
|
/* @__PURE__ */ e(h, { label: "First response", p: a.first_response, hint: "replies" }),
|
|
110
110
|
/* @__PURE__ */ e(h, { label: "Resolution", p: a.resolution, hint: "resolved tickets" }),
|
|
111
111
|
/* @__PURE__ */ s("div", { className: "bg-white px-4 py-3 dark:bg-card", children: [
|
|
112
112
|
/* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "Reopened" }),
|
|
113
|
-
/* @__PURE__ */ e("p", { className: "mt-1 text-[18px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children:
|
|
113
|
+
/* @__PURE__ */ e("p", { className: "mt-1 text-[18px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children: u(a.reopen.rate) }),
|
|
114
114
|
/* @__PURE__ */ s("p", { className: "mt-0.5 text-[12px] tabular-nums text-slate-600 dark:text-slate-300", children: [
|
|
115
115
|
a.reopen.reopened,
|
|
116
116
|
" of ",
|
|
@@ -120,29 +120,29 @@ function C({ className: t }) {
|
|
|
120
120
|
] })
|
|
121
121
|
] }),
|
|
122
122
|
/* @__PURE__ */ s("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
123
|
-
/* @__PURE__ */ e(
|
|
124
|
-
|
|
123
|
+
/* @__PURE__ */ e(o, { title: "By request type", children: /* @__PURE__ */ e(
|
|
124
|
+
c,
|
|
125
125
|
{
|
|
126
126
|
rows: a.by_type.map((r) => ({ label: r.name, n: r.tickets })),
|
|
127
127
|
empty: "No tickets."
|
|
128
128
|
}
|
|
129
129
|
) }),
|
|
130
|
-
/* @__PURE__ */ e(
|
|
131
|
-
|
|
130
|
+
/* @__PURE__ */ e(o, { title: "By team", children: /* @__PURE__ */ e(
|
|
131
|
+
c,
|
|
132
132
|
{
|
|
133
133
|
rows: a.by_team.map((r) => ({ label: r.name, n: r.tickets })),
|
|
134
134
|
empty: "No tickets."
|
|
135
135
|
}
|
|
136
136
|
) }),
|
|
137
|
-
/* @__PURE__ */ e(
|
|
138
|
-
|
|
137
|
+
/* @__PURE__ */ e(o, { title: "Tickets per kind of record", children: /* @__PURE__ */ e(
|
|
138
|
+
c,
|
|
139
139
|
{
|
|
140
140
|
rows: a.by_collection.map((r) => ({ label: r.collection, n: r.tickets })),
|
|
141
141
|
empty: "No tickets."
|
|
142
142
|
}
|
|
143
143
|
) }),
|
|
144
|
-
/* @__PURE__ */ e(
|
|
145
|
-
|
|
144
|
+
/* @__PURE__ */ e(o, { title: "Busiest requesters", children: /* @__PURE__ */ e(
|
|
145
|
+
c,
|
|
146
146
|
{
|
|
147
147
|
rows: a.busiest_requesters.map((r) => ({
|
|
148
148
|
label: r.name ?? r.id.slice(0, 8),
|
|
@@ -152,8 +152,8 @@ function C({ className: t }) {
|
|
|
152
152
|
}
|
|
153
153
|
) })
|
|
154
154
|
] }),
|
|
155
|
-
/* @__PURE__ */ e(
|
|
156
|
-
/* @__PURE__ */ e("span", { className: "font-semibold tabular-nums", children:
|
|
155
|
+
/* @__PURE__ */ e(o, { title: "Tickets with a clip or screenshot", children: /* @__PURE__ */ s("p", { className: "text-[12.5px] text-slate-700 dark:text-slate-200", children: [
|
|
156
|
+
/* @__PURE__ */ e("span", { className: "font-semibold tabular-nums", children: u(a.evidence.share) }),
|
|
157
157
|
" of tickets carried one (",
|
|
158
158
|
a.evidence.with_clip,
|
|
159
159
|
" with a replay clip,",
|
|
@@ -167,5 +167,5 @@ function C({ className: t }) {
|
|
|
167
167
|
}
|
|
168
168
|
export {
|
|
169
169
|
C as SupportAnalytics,
|
|
170
|
-
|
|
170
|
+
m as formatHours
|
|
171
171
|
};
|