@nivaro/react 0.3.65 → 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 +21 -5
- package/dist/shared/components/ActivityEntry.js +28 -28
- package/dist/shared/components/CollectionBrowserView.js +2432 -2592
- package/dist/shared/components/ItemEditForm.js +3912 -3773
- package/dist/shared/components/MyWorkView.js +124 -113
- package/dist/shared/components/ProfileView.js +483 -472
- package/dist/shared/components/RecordCompare.js +149 -129
- package/dist/shared/components/ReportView.js +1100 -1094
- package/dist/shared/components/bulk/BulkCompareButton.js +62 -0
- package/dist/shared/components/bulk/MessageStakeholders.js +235 -0
- 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/CatalogPickerField.js +240 -238
- package/dist/shared/components/item-edit/FieldRow.js +193 -193
- package/dist/shared/components/item-edit/GroupSection.js +559 -542
- package/dist/shared/components/item-edit/M2MCombobox.js +414 -349
- package/dist/shared/components/item-edit/MidairCollisionDialog.js +211 -187
- package/dist/shared/components/item-edit/RecordInsights.js +46 -45
- package/dist/shared/components/item-edit/RelationCombobox.js +327 -311
- package/dist/shared/components/item-edit/SummaryPanel.js +146 -144
- package/dist/shared/components/item-edit/UserChip.js +264 -229
- package/dist/shared/components/item-edit/cascade-clear-notice.js +23 -19
- package/dist/shared/components/item-edit/header-path-preview.js +52 -0
- package/dist/shared/components/item-edit/line-merge.js +73 -47
- package/dist/shared/components/item-edit/picker-search.js +25 -21
- 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 +1007 -979
- package/dist/shared/lib/compare-value.js +73 -0
- package/dist/shared/lib/format-value.js +19 -18
- package/dist/shared/lib/obligation-reason-text.js +1 -1
- package/dist/shared/lib/quick-filter-cascade.js +29 -19
- 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
|
@@ -121,6 +121,9 @@ declare interface ActiveLayoutData {
|
|
|
121
121
|
groups: FieldGroup[];
|
|
122
122
|
assignments: SlotAssignment[];
|
|
123
123
|
ungrouped_sort?: number | null;
|
|
124
|
+
/** The `?layout=` this page was opened with names no form the person may
|
|
125
|
+
* open: the answer is the usual form, and the page says so (army11 f3). */
|
|
126
|
+
requested_form_unavailable?: boolean;
|
|
124
127
|
}
|
|
125
128
|
|
|
126
129
|
/** Who really did it (nivaro_activity.actor, migration 516; derived for older rows). */
|
|
@@ -3799,7 +3802,14 @@ export declare function forgetSettledReads(): void;
|
|
|
3799
3802
|
|
|
3800
3803
|
export declare function formatDate(date: string | Date, opts?: Intl.DateTimeFormatOptions): string;
|
|
3801
3804
|
|
|
3802
|
-
|
|
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;
|
|
3803
3813
|
|
|
3804
3814
|
export declare function formatFileSize(bytes: number | null | undefined): string;
|
|
3805
3815
|
|
|
@@ -9923,6 +9933,12 @@ export declare interface RoomInfo {
|
|
|
9923
9933
|
*/
|
|
9924
9934
|
declare type RoomOpener = (room: string, label?: string) => void;
|
|
9925
9935
|
|
|
9936
|
+
/** Stacked avatar cluster (+N) with a hover/pinnable portal roster whose rows
|
|
9937
|
+
* are UserChips — the single user-display primitive for owners/user lists.
|
|
9938
|
+
* Reused by the item-header Owners chip and the collection browser. */
|
|
9939
|
+
/** A person who can no longer act, as the header says it. */
|
|
9940
|
+
declare type RosterInactive = 'suspended' | 'former';
|
|
9941
|
+
|
|
9926
9942
|
declare interface Row {
|
|
9927
9943
|
id: number;
|
|
9928
9944
|
api: string;
|
|
@@ -12298,15 +12314,15 @@ export declare function userOptionFilter(isAdmin: boolean): {
|
|
|
12298
12314
|
*/
|
|
12299
12315
|
export declare function useRowPresence(rows: RowRef[], opts?: RowPresenceOptions): Record<string, RowViewers>;
|
|
12300
12316
|
|
|
12301
|
-
|
|
12302
|
-
* are UserChips — the single user-display primitive for owners/user lists.
|
|
12303
|
-
* Reused by the item-header Owners chip and the collection browser. */
|
|
12304
|
-
export declare function UserRosterCluster({ users, showSingleName }: {
|
|
12317
|
+
export declare function UserRosterCluster({ users, showSingleName, nameLabel }: {
|
|
12305
12318
|
users: Array<{
|
|
12306
12319
|
id: string;
|
|
12307
12320
|
name: string;
|
|
12321
|
+
inactive?: RosterInactive;
|
|
12308
12322
|
}>;
|
|
12309
12323
|
showSingleName?: boolean;
|
|
12324
|
+
/** Always name the first owner who can act (+N), not just a single one. */
|
|
12325
|
+
nameLabel?: boolean;
|
|
12310
12326
|
}): React_2.JSX.Element;
|
|
12311
12327
|
|
|
12312
12328
|
declare interface UserSyncOptions {
|
|
@@ -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
|
};
|