@nivaro/react 0.3.111 → 0.3.112
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 +170 -2
- package/dist/index.js +745 -728
- package/dist/shared/components/CollectionBrowserView.js +3097 -2972
- package/dist/shared/components/CollectionImportBanner.js +135 -0
- package/dist/shared/components/ItemEditForm.js +2235 -2218
- package/dist/shared/components/JobsTray.js +54 -47
- package/dist/shared/components/ViewAsPersonButton.js +109 -0
- package/dist/shared/components/bulk/BulkFieldUpdate.js +228 -150
- package/dist/shared/components/bulk/BulkFieldUpdateButton.js +35 -41
- package/dist/shared/components/bulk/BulkLinksValue.js +91 -0
- package/dist/shared/components/bulk/bulk-field-options.js +20 -19
- package/dist/shared/components/bulk/bulk-update-preview.js +39 -0
- package/dist/shared/components/cbv/ColumnHeaderMenu.js +113 -0
- package/dist/shared/components/cbv/column-totals.js +66 -0
- package/dist/shared/components/collections-directory/CollectionHoverCard.js +108 -81
- package/dist/shared/components/collections-directory/CollectionRow.js +164 -148
- package/dist/shared/components/collections-directory/CollectionsDirectory.js +167 -166
- package/dist/shared/components/collections-directory/directory-data.js +70 -58
- package/dist/shared/components/imports/CollectionImportPanel.js +120 -118
- package/dist/shared/components/imports/DefinitionsPanel.js +24 -24
- package/dist/shared/components/imports/ImportDuplicatesNotice.js +65 -0
- package/dist/shared/components/item-edit/CatalogPickerField.js +631 -639
- package/dist/shared/components/item-edit/DuplicateNotice.js +168 -0
- package/dist/shared/components/item-edit/FieldRow.js +248 -246
- package/dist/shared/components/item-edit/InlineGridField.js +34 -33
- package/dist/shared/components/item-edit/InlineTableField.js +3064 -2882
- package/dist/shared/components/item-edit/MembershipSetField.js +165 -169
- package/dist/shared/components/item-edit/NestedRelationEditor.js +184 -189
- package/dist/shared/components/item-edit/PlanGrid.js +2 -1
- package/dist/shared/components/item-edit/QuickPickerDialog.js +35 -34
- package/dist/shared/components/item-edit/RecordLiveSync.js +32 -30
- package/dist/shared/components/item-edit/RelationCombobox.js +101 -100
- package/dist/shared/components/item-edit/RowHistorySheet.js +28 -27
- package/dist/shared/components/item-edit/SummaryPanel.js +133 -135
- package/dist/shared/components/item-edit/ViewAsRole.js +129 -52
- package/dist/shared/components/item-edit/grid-search.js +345 -0
- package/dist/shared/components/item-edit/render-stability.js +61 -54
- package/dist/shared/components/notifications/NotificationRulesEditor.js +25 -20
- package/dist/shared/components/ops-report/DigestSections.js +163 -144
- package/dist/shared/components/ops-report/drill.js +97 -97
- package/dist/shared/components/panels/AddendumLinesDiff.js +52 -51
- package/dist/shared/components/panels/AddendumPanel.js +92 -91
- package/dist/shared/components/panels/AsyncUserPicker.js +108 -0
- package/dist/shared/components/panels/CommentPanel.js +265 -252
- package/dist/shared/components/panels/OwnersSlot.js +47 -35
- package/dist/shared/components/panels/PipelineInsight.js +186 -0
- package/dist/shared/components/panels/PipelinePanel.js +1529 -1492
- package/dist/shared/components/panels/RecordIntegrityBanner.js +39 -38
- package/dist/shared/components/panels/RevisionsPanel.js +261 -260
- package/dist/shared/components/pipeline/FieldPicker.js +41 -40
- package/dist/shared/components/pipeline/OwnerMatrix.js +829 -700
- package/dist/shared/components/pipeline/OwnerRecordTrial.js +362 -0
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -467
- package/dist/shared/components/pipeline/PipelineStateOwners.js +65 -64
- package/dist/shared/components/pipeline/owner-matrix-draft.js +178 -0
- package/dist/shared/components/profile/MyDefaultsCard.js +36 -35
- package/dist/shared/components/profile/PersonHeader.js +29 -29
- package/dist/shared/components/profile/PersonProfile.js +30 -28
- package/dist/shared/components/profile/SlowScreensCard.js +286 -0
- package/dist/shared/components/queue/QueueWorklist.js +1090 -1071
- package/dist/shared/components/quick-filters/useQuickFilterEditing.js +45 -44
- package/dist/shared/components/support/TicketDetailSheet.js +25 -16
- package/dist/shared/components/support/TicketSlowScreens.js +32 -0
- package/dist/shared/lib/activity-sentence.js +224 -178
- package/dist/shared/lib/collection-import-banner.js +27 -0
- package/dist/shared/lib/crash-report.js +112 -0
- package/dist/shared/lib/export-runs.js +99 -0
- package/dist/shared/lib/jobs-tray.js +89 -67
- package/dist/shared/lib/list-link.js +76 -69
- package/dist/shared/lib/nav-trail.js +180 -76
- package/dist/shared/lib/query-keys.js +26 -0
- package/dist/shared/lib/view-as.js +16 -11
- package/package.json +1 -1
|
@@ -4,11 +4,12 @@ import { RotateCcw as we, ChevronDown as ee } from "lucide-react";
|
|
|
4
4
|
import { useMemo as _, useState as te, useEffect as Re, Fragment as be } from "react";
|
|
5
5
|
import { get as L } from "../../lib/commands.js";
|
|
6
6
|
import { numericIntlOptions as Ne } from "../../lib/format-value.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
7
|
+
import { queryKeys as Je } from "../../lib/query-keys.js";
|
|
8
|
+
import { htmlToText as Pe } from "../../lib/sanitize-html.js";
|
|
9
|
+
import { formatDateTime as ke, formatRelative as ve, cn as j, titleCase as Ve, formatDate as He } from "../../lib/utils.js";
|
|
10
|
+
import { Sheet as Qe, SheetContent as We, SheetHeader as Ue, SheetTitle as Ye } from "../ui/sheet.js";
|
|
11
|
+
import { applyDisplayTemplate as Se, SYSTEM_FIELDS as Ze } from "./helpers.js";
|
|
12
|
+
function Ge(f) {
|
|
12
13
|
const { data: x } = ne({
|
|
13
14
|
queryKey: ["nvr-machine-markers"],
|
|
14
15
|
queryFn: () => f.request(L("/comments/machine-markers")).then((b) => b.data ?? []),
|
|
@@ -17,17 +18,17 @@ function Ze(f) {
|
|
|
17
18
|
});
|
|
18
19
|
return x ?? [];
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
+
function Xe(f) {
|
|
21
22
|
const x = String(f ?? "").trim();
|
|
22
23
|
if (!/^import:/i.test(x)) return null;
|
|
23
24
|
const b = x.slice(7), k = b.lastIndexOf(":"), v = (k >= 0 ? b.slice(0, k) : b).trim() || "a file", N = k >= 0 ? b.slice(k + 1).trim() : "", S = /^run-(\d+)$/i.exec(N);
|
|
24
25
|
return { template: v, fileId: S || !N ? null : N, runId: S ? Number(S[1]) : null };
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
+
function et(f, x = []) {
|
|
27
28
|
var N, S;
|
|
28
29
|
const b = String(f ?? "").trim();
|
|
29
30
|
if (!b) return { kind: "none", text: "" };
|
|
30
|
-
const k =
|
|
31
|
+
const k = Xe(b);
|
|
31
32
|
if (k) return { kind: "machine", text: `Imported via ${k.template}`, fileId: k.fileId };
|
|
32
33
|
const v = b.toLowerCase();
|
|
33
34
|
for (const O of x) {
|
|
@@ -38,8 +39,8 @@ function Xe(f, x = []) {
|
|
|
38
39
|
}
|
|
39
40
|
return { kind: "reason", text: b };
|
|
40
41
|
}
|
|
41
|
-
const
|
|
42
|
-
function
|
|
42
|
+
const tt = /* @__PURE__ */ new Set(["sort", "created", "updated", "created_at", "updated_at"]), I = (f) => f == null || f === "", nt = (f, x) => I(f) && I(x) ? !0 : typeof f == "object" || typeof x == "object" ? JSON.stringify(f) === JSON.stringify(x) : String(f) === String(x);
|
|
43
|
+
function rt(f) {
|
|
43
44
|
const x = f == null ? void 0 : f.options;
|
|
44
45
|
if (!x) return {};
|
|
45
46
|
if (typeof x == "string")
|
|
@@ -50,7 +51,7 @@ function nt(f) {
|
|
|
50
51
|
}
|
|
51
52
|
return x;
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function pt({
|
|
54
55
|
open: f,
|
|
55
56
|
onOpenChange: x,
|
|
56
57
|
rowTitle: b,
|
|
@@ -74,7 +75,7 @@ function ft({
|
|
|
74
75
|
onRestoreAllTo: se,
|
|
75
76
|
restoringAll: oe = !1
|
|
76
77
|
}) {
|
|
77
|
-
const ie = Ke(), ae =
|
|
78
|
+
const ie = Ke(), ae = Ge(M), y = _e === "timeline", le = _(() => new Map(S.map((e) => [e.field, e])), [S]), V = _(() => {
|
|
78
79
|
const e = new Map(D);
|
|
79
80
|
for (const t of E) {
|
|
80
81
|
const n = t.many_field;
|
|
@@ -86,7 +87,7 @@ function ft({
|
|
|
86
87
|
return O.forEach((t, n) => e.set(t.field, n)), S.forEach((t, n) => {
|
|
87
88
|
e.has(t.field) || e.set(t.field, O.length + n);
|
|
88
89
|
}), e;
|
|
89
|
-
}, [O, S]), Q = (e) => !
|
|
90
|
+
}, [O, S]), Q = (e) => !Ze.has(e) && !tt.has(e) && e !== F && !e.startsWith("__"), de = (e, t) => {
|
|
90
91
|
const n = [...e].sort((o, l) => o.id - l.id), r = [];
|
|
91
92
|
let s = null;
|
|
92
93
|
for (const o of n) {
|
|
@@ -103,7 +104,7 @@ function ft({
|
|
|
103
104
|
for (const p of g) {
|
|
104
105
|
if (!Q(p)) continue;
|
|
105
106
|
const C = o.delta ? o.delta[p] : i[p], ye = s[p];
|
|
106
|
-
|
|
107
|
+
nt(ye, C) || h.push({ field: p, before: ye, after: C });
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
110
|
const w = (g, p) => (H.get(g) ?? 9999) - (H.get(p) ?? 9999);
|
|
@@ -113,7 +114,7 @@ function ft({
|
|
|
113
114
|
who: l,
|
|
114
115
|
changes: h,
|
|
115
116
|
snapshot: m,
|
|
116
|
-
provenance:
|
|
117
|
+
provenance: et(o.comment, ae),
|
|
117
118
|
row: t,
|
|
118
119
|
before: s
|
|
119
120
|
}), d !== "delete" && Object.keys(i).length > 0 && (s = i);
|
|
@@ -195,7 +196,7 @@ function ft({
|
|
|
195
196
|
queryKey: ["row-history-alias-labels", q, Oe],
|
|
196
197
|
queryFn: async () => {
|
|
197
198
|
const e = {}, t = (n) => ie.fetchQuery({
|
|
198
|
-
queryKey:
|
|
199
|
+
queryKey: Je.collectionMeta(n),
|
|
199
200
|
queryFn: () => M.request(L(`/collections/${n}`)).then((r) => r.data),
|
|
200
201
|
staleTime: 6e5
|
|
201
202
|
});
|
|
@@ -275,11 +276,11 @@ function ft({
|
|
|
275
276
|
staleTime: 5 * 6e4
|
|
276
277
|
}), T = (e) => {
|
|
277
278
|
const t = le.get(e);
|
|
278
|
-
return (t == null ? void 0 : t.label) ||
|
|
279
|
+
return (t == null ? void 0 : t.label) || Ve(e);
|
|
279
280
|
}, W = (e, t) => {
|
|
280
281
|
var u, d;
|
|
281
282
|
if (I(t)) return { text: "—" };
|
|
282
|
-
const n = le.get(e), r =
|
|
283
|
+
const n = le.get(e), r = rt(n), s = V.get(e);
|
|
283
284
|
if (s != null && s.one_collection) {
|
|
284
285
|
const i = ((u = P[s.one_collection]) == null ? void 0 : u[String(t)]) ?? ((d = Fe[s.one_collection]) == null ? void 0 : d[String(t)]);
|
|
285
286
|
return i ? { text: i } : { text: `#${String(t)}`, mono: !0 };
|
|
@@ -313,12 +314,12 @@ function ft({
|
|
|
313
314
|
};
|
|
314
315
|
if (/^(date|dateTime|datetime|timestamp)$/i.test(o)) {
|
|
315
316
|
const i = String(t);
|
|
316
|
-
return { text: /^date$/i.test(o) || /^\d{4}-\d{2}-\d{2}(?:T00:00:00(?:\.0+)?Z)?$/.test(i) ?
|
|
317
|
+
return { text: /^date$/i.test(o) || /^\d{4}-\d{2}-\d{2}(?:T00:00:00(?:\.0+)?Z)?$/.test(i) ? He(i) : ke(i), mono: !0 };
|
|
317
318
|
}
|
|
318
319
|
if (typeof t == "number" || /^(integer|decimal|float|bigInteger|money)$/i.test(o) && Number.isFinite(Number(t)))
|
|
319
320
|
return { text: Number(t).toLocaleString("en-US", Ne(r)), mono: !0 };
|
|
320
321
|
const l = String(t);
|
|
321
|
-
return /<[a-z][\s\S]*>/i.test(l) ? { text:
|
|
322
|
+
return /<[a-z][\s\S]*>/i.test(l) ? { text: Pe(l).trim() || "—" } : { text: l };
|
|
322
323
|
}, [qe, Me] = te(/* @__PURE__ */ new Set()), Ae = (e) => Me((t) => {
|
|
323
324
|
const n = new Set(t);
|
|
324
325
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
@@ -505,9 +506,9 @@ function ft({
|
|
|
505
506
|
),
|
|
506
507
|
!n && /* @__PURE__ */ a("span", { className: "absolute bottom-[-24px] top-[11px] w-px bg-border" })
|
|
507
508
|
] }), G = $.length, Be = y ? `${G} ${G === 1 ? "version" : "versions"} across ${Z.size} ${Z.size === 1 ? "line" : "lines"}` : `${v.length} ${v.length === 1 ? "version" : "versions"}`;
|
|
508
|
-
return /* @__PURE__ */ a(
|
|
509
|
-
/* @__PURE__ */ c(
|
|
510
|
-
/* @__PURE__ */ a(
|
|
509
|
+
return /* @__PURE__ */ a(Qe, { open: f, onOpenChange: x, children: /* @__PURE__ */ c(We, { className: "flex w-[560px] flex-col gap-0 p-0 sm:max-w-[560px]", children: [
|
|
510
|
+
/* @__PURE__ */ c(Ue, { className: "shrink-0 border-b border-border px-6 pb-4 pt-5 text-left", children: [
|
|
511
|
+
/* @__PURE__ */ a(Ye, { className: "text-[14px] font-semibold", children: y ? "Lines timeline" : "Row history" }),
|
|
511
512
|
/* @__PURE__ */ c("p", { className: "mt-0.5 flex min-w-0 items-baseline gap-2 text-[12px] text-muted-foreground", children: [
|
|
512
513
|
/* @__PURE__ */ a("span", { className: "shrink-0 font-medium text-foreground", children: b }),
|
|
513
514
|
k && /* @__PURE__ */ a("span", { className: "truncate", children: k }),
|
|
@@ -667,8 +668,8 @@ function ft({
|
|
|
667
668
|
] }) });
|
|
668
669
|
}
|
|
669
670
|
export {
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
671
|
+
pt as RowHistorySheet,
|
|
672
|
+
Xe as parseImportStamp,
|
|
673
|
+
et as provenanceOf,
|
|
674
|
+
Ge as useMachineMarkers
|
|
674
675
|
};
|