@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
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { jsxs as i, Fragment as
|
|
2
|
-
import { useInfiniteQuery as
|
|
3
|
-
import { History as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useNivaroClient as
|
|
6
|
-
import { get as
|
|
7
|
-
import { cn as m, formatRelative as
|
|
8
|
-
import { AgentBadge as
|
|
9
|
-
import { Button as
|
|
10
|
-
import { Sheet as
|
|
11
|
-
const
|
|
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
|
|
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
|
|
21
|
+
function I(a) {
|
|
22
22
|
var l;
|
|
23
|
-
const n =
|
|
24
|
-
return { who:
|
|
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
|
|
27
|
-
function
|
|
26
|
+
const K = 20;
|
|
27
|
+
function M({
|
|
28
28
|
collection: a,
|
|
29
29
|
item: n,
|
|
30
30
|
className: s,
|
|
31
|
-
pageSize: l =
|
|
31
|
+
pageSize: l = K
|
|
32
32
|
}) {
|
|
33
33
|
var p, x, g;
|
|
34
|
-
const h =
|
|
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
|
-
|
|
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((
|
|
43
|
+
const c = r.reduce((P, H) => {
|
|
44
44
|
var v;
|
|
45
|
-
return
|
|
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 ?? [])) ?? [],
|
|
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 =
|
|
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(
|
|
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":
|
|
71
|
-
children:
|
|
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
|
-
|
|
93
|
+
N(k)
|
|
94
94
|
] }),
|
|
95
95
|
o.hasNextPage && /* @__PURE__ */ t(
|
|
96
|
-
|
|
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
|
|
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] =
|
|
116
|
-
return n == null || n === "" || n === "new" ? null : /* @__PURE__ */ i(
|
|
115
|
+
const [h, d] = T(!1);
|
|
116
|
+
return n == null || n === "" || n === "new" ? null : /* @__PURE__ */ i(S, { children: [
|
|
117
117
|
/* @__PURE__ */ i(
|
|
118
|
-
|
|
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(
|
|
127
|
+
/* @__PURE__ */ t(B, { className: "h-3.5 w-3.5" }),
|
|
128
128
|
"History"
|
|
129
129
|
]
|
|
130
130
|
}
|
|
131
131
|
),
|
|
132
|
-
/* @__PURE__ */ t(
|
|
133
|
-
|
|
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(
|
|
139
|
-
/* @__PURE__ */ t(
|
|
140
|
-
/* @__PURE__ */ t(
|
|
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(
|
|
142
|
+
h && /* @__PURE__ */ t(M, { collection: a, item: n })
|
|
143
143
|
]
|
|
144
144
|
}
|
|
145
145
|
) })
|
|
146
146
|
] });
|
|
147
147
|
}
|
|
148
148
|
export {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
M as ConfigHistory,
|
|
150
|
+
ae as ConfigHistoryButton,
|
|
151
|
+
I as configHistoryLine,
|
|
152
|
+
G as entryPerson
|
|
153
153
|
};
|