@nivaro/react 0.3.66 → 0.3.67
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/shared/components/ActivityEntry.js +28 -28
- package/dist/shared/components/CollectionBrowserView.js +584 -585
- package/dist/shared/components/ItemEditForm.js +1758 -1758
- package/dist/shared/components/RecordCompare.js +149 -129
- package/dist/shared/components/bulk/BulkCompareButton.js +16 -16
- package/dist/shared/components/integrations/IntegrationObligationsView.js +199 -187
- package/dist/shared/components/integrations/console/EventsView.js +22 -24
- package/dist/shared/components/integrations/console/SubmissionRow.js +6 -13
- package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +29 -28
- package/dist/shared/components/integrations/console/tone.js +22 -21
- package/dist/shared/components/item-edit/FieldRow.js +193 -193
- package/dist/shared/components/item-edit/GroupSection.js +209 -209
- package/dist/shared/components/item-edit/RecordInsights.js +46 -45
- package/dist/shared/components/panels/BranchLanes.js +7 -7
- package/dist/shared/components/panels/CommentPanel.js +72 -72
- package/dist/shared/components/panels/PipelinePanel.js +261 -261
- package/dist/shared/components/panels/RecordIntegrityBanner.js +78 -78
- package/dist/shared/components/panels/RevisionsPanel.js +220 -220
- package/dist/shared/components/panels/TaskPanel.js +75 -75
- package/dist/shared/components/queue/QueueWorklist.js +499 -498
- package/dist/shared/lib/compare-value.js +73 -0
- package/dist/shared/lib/format-value.js +19 -18
- package/dist/shared/lib/utils.js +59 -57
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import { noteReplayEvent as _e, createReplayCheckoutState as De } from "../share
|
|
|
9
9
|
import { emitReplayTap as Te, setReplayRecorderMode as N, registerReplayCapture as qe, clipEndOffset as Le, withClipKind as Pe } from "../shared/lib/replay-capture.js";
|
|
10
10
|
import { instrumentConsole as Ne, instrumentRequests as Fe, redactSecrets as Me } from "../shared/lib/replay-context.js";
|
|
11
11
|
import { instrumentSocket as Oe } from "../shared/lib/replay-socket.js";
|
|
12
|
-
const Ue = "nivaro-react@0.3.
|
|
12
|
+
const Ue = "nivaro-react@0.3.67", j = 1e4, We = 150, He = 3e3, Ke = 600, $e = (n) => `nvr_replay_resume${n ? `:${n}` : ""}`, G = () => typeof navigator > "u" || navigator.onLine !== !1;
|
|
13
13
|
function Be(n) {
|
|
14
14
|
return typeof n.url != "string" || typeof fetch != "function" ? null : (f, a) => {
|
|
15
15
|
const u = typeof n.getToken == "function" ? n.getToken() : void 0, d = { "Content-Type": "application/json" };
|
package/dist/index.d.ts
CHANGED
|
@@ -3802,7 +3802,14 @@ export declare function forgetSettledReads(): void;
|
|
|
3802
3802
|
|
|
3803
3803
|
export declare function formatDate(date: string | Date, opts?: Intl.DateTimeFormatOptions): string;
|
|
3804
3804
|
|
|
3805
|
-
|
|
3805
|
+
/**
|
|
3806
|
+
* THE date-time format ("Nov 8, 2026, 3:14 PM", the viewer's local time or
|
|
3807
|
+
* their chosen zone). Every date-time a person reads — worklists, record
|
|
3808
|
+
* history, activity, comments, invoice tables — goes through this, never an
|
|
3809
|
+
* ad hoc toLocaleString (army 11: the worklist and the history disagreed).
|
|
3810
|
+
* Empty → ''; a value that is not a date comes back as written.
|
|
3811
|
+
*/
|
|
3812
|
+
export declare function formatDateTime(date: string | Date | number | null | undefined): string;
|
|
3806
3813
|
|
|
3807
3814
|
export declare function formatFileSize(bytes: number | null | undefined): string;
|
|
3808
3815
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as m, jsx as e, Fragment as
|
|
2
|
-
import { useQuery as
|
|
3
|
-
import { ChevronDown as
|
|
4
|
-
import { useState as
|
|
1
|
+
import { jsxs as m, jsx as e, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { useQuery as g } from "@tanstack/react-query";
|
|
3
|
+
import { ChevronDown as A, ChevronRight as S, Eye as C, KeyRound as D, Bot as L, Upload as j, Workflow as T, Clock as _, Cog as I } from "lucide-react";
|
|
4
|
+
import { useState as R, useMemo as u } from "react";
|
|
5
5
|
import { useOptionalNivaroClient as q } from "../context.js";
|
|
6
6
|
import { renderActivityGroupSentence as B, renderActivitySentence as U, actorName as W, groupActivity as E, activityLabelRefs as K, actorOf as Z, activityWhy as G } from "../lib/activity-sentence.js";
|
|
7
7
|
import { post as J } from "../lib/commands.js";
|
|
8
|
-
import { cn as f } from "../lib/utils.js";
|
|
9
|
-
import { AgentBadge as
|
|
10
|
-
import { UserAvatar as
|
|
11
|
-
function
|
|
8
|
+
import { cn as f, formatDateTime as M } from "../lib/utils.js";
|
|
9
|
+
import { AgentBadge as Q } from "./AgentBadge.js";
|
|
10
|
+
import { UserAvatar as z } from "./UserAvatar.js";
|
|
11
|
+
function F(a) {
|
|
12
12
|
if (!a) return null;
|
|
13
13
|
const t = new Date(a);
|
|
14
14
|
return Number.isNaN(t.getTime()) ? null : {
|
|
@@ -18,17 +18,17 @@ function z(a) {
|
|
|
18
18
|
hour: "numeric",
|
|
19
19
|
minute: "2-digit"
|
|
20
20
|
}),
|
|
21
|
-
full: t
|
|
21
|
+
full: M(t)
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
function
|
|
26
|
-
const i = Z(a).kind, n = i === "view_as" ? /* @__PURE__ */ e(C, { className: "h-3.5 w-3.5" }) : i === "api_key" ? /* @__PURE__ */ e(D, { className: "h-3.5 w-3.5" }) : i === "mcp" ? /* @__PURE__ */ e(L, { className: "h-3.5 w-3.5" }) : i === "import" ? /* @__PURE__ */ e(j, { className: "h-3.5 w-3.5" }) : i === "flow" ? /* @__PURE__ */ e(
|
|
24
|
+
const H = "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-slate-100 text-slate-500 dark:bg-muted dark:text-slate-300";
|
|
25
|
+
function O({ entry: a, name: t }) {
|
|
26
|
+
const i = Z(a).kind, n = i === "view_as" ? /* @__PURE__ */ e(C, { className: "h-3.5 w-3.5" }) : i === "api_key" ? /* @__PURE__ */ e(D, { className: "h-3.5 w-3.5" }) : i === "mcp" ? /* @__PURE__ */ e(L, { className: "h-3.5 w-3.5" }) : i === "import" ? /* @__PURE__ */ e(j, { className: "h-3.5 w-3.5" }) : i === "flow" ? /* @__PURE__ */ e(T, { className: "h-3.5 w-3.5" }) : i === "cron" ? /* @__PURE__ */ e(_, { className: "h-3.5 w-3.5" }) : i === "system" ? /* @__PURE__ */ e(I, { className: "h-3.5 w-3.5" }) : null;
|
|
27
27
|
if (n)
|
|
28
|
-
return /* @__PURE__ */ e("span", { className:
|
|
28
|
+
return /* @__PURE__ */ e("span", { className: H, "data-activity-actor": i, "aria-hidden": !0, children: n });
|
|
29
29
|
const l = t.split(" ").map((c) => c[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
|
|
30
30
|
return /* @__PURE__ */ e(
|
|
31
|
-
|
|
31
|
+
z,
|
|
32
32
|
{
|
|
33
33
|
userId: a.user ?? a.user_id ?? null,
|
|
34
34
|
className: "h-6 w-6",
|
|
@@ -36,7 +36,7 @@ function H({ entry: a, name: t }) {
|
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function P({ entry: a }) {
|
|
40
40
|
const t = G(a);
|
|
41
41
|
return !t.reason && !t.note && !t.approval ? null : /* @__PURE__ */ m("span", { className: "mt-0.5 block space-y-0.5 text-[11.5px] text-slate-500 dark:text-slate-400", children: [
|
|
42
42
|
t.note && /* @__PURE__ */ m("span", { className: "block truncate italic", "data-activity-why": "note", "data-tip": t.note, children: [
|
|
@@ -63,12 +63,12 @@ function y({
|
|
|
63
63
|
showTime: c = !0,
|
|
64
64
|
className: o
|
|
65
65
|
}) {
|
|
66
|
-
const [r, v] =
|
|
66
|
+
const [r, v] = R(!1), s = i && i.length > 1 ? i : null, h = s ? B(s, t) : U(a, t), x = W(a, t), p = F(a.timestamp), N = !!n || !!s, k = () => {
|
|
67
67
|
s ? v((d) => !d) : n == null || n(a);
|
|
68
68
|
};
|
|
69
69
|
return /* @__PURE__ */ m("div", { className: f("min-w-0", o), "data-activity-entry": a.id ?? "", children: [
|
|
70
70
|
/* @__PURE__ */ m("div", { className: "flex w-full items-start gap-2.5 rounded-md px-2 py-2", children: [
|
|
71
|
-
/* @__PURE__ */ e(
|
|
71
|
+
/* @__PURE__ */ e(O, { entry: a, name: x }),
|
|
72
72
|
/* @__PURE__ */ m("span", { className: "min-w-0 flex-1 text-[12.5px] leading-5 text-slate-700 dark:text-slate-200", children: [
|
|
73
73
|
N ? /* @__PURE__ */ m(
|
|
74
74
|
"button",
|
|
@@ -78,14 +78,14 @@ function y({
|
|
|
78
78
|
"aria-expanded": s ? r : void 0,
|
|
79
79
|
className: "inline-flex max-w-full items-start gap-1 text-left hover:underline",
|
|
80
80
|
children: [
|
|
81
|
-
s && (r ? /* @__PURE__ */ e(
|
|
81
|
+
s && (r ? /* @__PURE__ */ e(A, { className: "mt-[3px] h-3.5 w-3.5 shrink-0 text-slate-400" }) : /* @__PURE__ */ e(S, { className: "mt-[3px] h-3.5 w-3.5 shrink-0 text-slate-400" })),
|
|
82
82
|
/* @__PURE__ */ e("span", { "data-activity-sentence": !0, children: h })
|
|
83
83
|
]
|
|
84
84
|
}
|
|
85
85
|
) : /* @__PURE__ */ e("span", { "data-activity-sentence": !0, children: h }),
|
|
86
|
-
!s && /* @__PURE__ */ e(
|
|
86
|
+
!s && /* @__PURE__ */ e(P, { entry: a })
|
|
87
87
|
] }),
|
|
88
|
-
/* @__PURE__ */ e(
|
|
88
|
+
/* @__PURE__ */ e(Q, { label: a.via_agent }),
|
|
89
89
|
c && p && /* @__PURE__ */ e(
|
|
90
90
|
"span",
|
|
91
91
|
{
|
|
@@ -96,7 +96,7 @@ function y({
|
|
|
96
96
|
),
|
|
97
97
|
l && /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center gap-1", children: l })
|
|
98
98
|
] }),
|
|
99
|
-
s && r && /* @__PURE__ */ e("div", { className: "ml-[18px] border-l border-slate-200 pl-3 dark:border-border", children: s.map((d,
|
|
99
|
+
s && r && /* @__PURE__ */ e("div", { className: "ml-[18px] border-l border-slate-200 pl-3 dark:border-border", children: s.map((d, w) => /* @__PURE__ */ e(
|
|
100
100
|
y,
|
|
101
101
|
{
|
|
102
102
|
entry: d,
|
|
@@ -104,11 +104,11 @@ function y({
|
|
|
104
104
|
onOpen: n,
|
|
105
105
|
showTime: c
|
|
106
106
|
},
|
|
107
|
-
String(d.id ??
|
|
107
|
+
String(d.id ?? w)
|
|
108
108
|
)) })
|
|
109
109
|
] });
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function st({
|
|
112
112
|
entries: a,
|
|
113
113
|
labels: t,
|
|
114
114
|
onOpen: i,
|
|
@@ -117,7 +117,7 @@ function rt({
|
|
|
117
117
|
className: c
|
|
118
118
|
}) {
|
|
119
119
|
const o = u(() => E(a), [a]);
|
|
120
|
-
return o.length === 0 ? /* @__PURE__ */ e(
|
|
120
|
+
return o.length === 0 ? /* @__PURE__ */ e(b, { children: l ?? null }) : /* @__PURE__ */ e("div", { className: f("divide-y divide-slate-100 dark:divide-border", c), children: o.map((r) => /* @__PURE__ */ e(
|
|
121
121
|
y,
|
|
122
122
|
{
|
|
123
123
|
entry: r.entries[0],
|
|
@@ -129,8 +129,8 @@ function rt({
|
|
|
129
129
|
r.key
|
|
130
130
|
)) });
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
const i = q(), n = u(() => K(a), [a]), l = u(() => JSON.stringify(n), [n]), c = n.refs.length === 0 && n.users.length === 0 && n.collections.length === 0, { data: o } =
|
|
132
|
+
function lt(a, t = {}) {
|
|
133
|
+
const i = q(), n = u(() => K(a), [a]), l = u(() => JSON.stringify(n), [n]), c = n.refs.length === 0 && n.users.length === 0 && n.collections.length === 0, { data: o } = g({
|
|
134
134
|
queryKey: ["activity-labels", l],
|
|
135
135
|
queryFn: async () => (await i.request(J("/activity/labels", n))).data,
|
|
136
136
|
enabled: !!i && !c && t.enabled !== !1,
|
|
@@ -149,6 +149,6 @@ function st(a, t = {}) {
|
|
|
149
149
|
}
|
|
150
150
|
export {
|
|
151
151
|
y as ActivityEntry,
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
st as ActivityFeed,
|
|
153
|
+
lt as useActivityLabels
|
|
154
154
|
};
|