@nivaro/react 0.3.66 → 0.3.68
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 +15 -1
- package/dist/index.js +836 -835
- package/dist/shared/components/ActivityEntry.js +28 -28
- package/dist/shared/components/CollectionBrowserView.js +584 -585
- package/dist/shared/components/ConformanceView.js +34 -34
- package/dist/shared/components/ItemEditForm.js +1758 -1758
- package/dist/shared/components/RecordCompare.js +149 -129
- package/dist/shared/components/ReportView.js +196 -196
- package/dist/shared/components/SlaRulesView.js +36 -36
- package/dist/shared/components/bulk/BulkCompareButton.js +16 -16
- package/dist/shared/components/chat/ChatPanel.js +484 -487
- package/dist/shared/components/chat/ChatViews.js +66 -66
- package/dist/shared/components/chat/RoomParts.js +159 -157
- package/dist/shared/components/help-videos/editor/StatsTab.js +48 -47
- package/dist/shared/components/help-videos/editor/VersionsTab.js +17 -16
- package/dist/shared/components/imports/CollectionImportPanel.js +72 -72
- 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 +188 -188
- package/dist/shared/components/item-edit/FilePickerField.js +281 -297
- package/dist/shared/components/item-edit/GroupSection.js +209 -209
- package/dist/shared/components/item-edit/RecordInsights.js +101 -101
- package/dist/shared/components/item-edit/SummaryPanel.js +31 -31
- package/dist/shared/components/layout-editor/assist/ExplainDiff.js +12 -12
- package/dist/shared/components/panels/AddendumPanel.js +409 -411
- package/dist/shared/components/panels/BranchLanes.js +7 -7
- package/dist/shared/components/panels/CommentPanel.js +204 -197
- package/dist/shared/components/panels/PipelinePanel.js +264 -264
- package/dist/shared/components/panels/RecordIntegrityBanner.js +78 -78
- package/dist/shared/components/panels/RevisionsPanel.js +229 -229
- package/dist/shared/components/panels/TaskPanel.js +75 -75
- package/dist/shared/components/queue/QueueWorklist.js +591 -589
- package/dist/shared/lib/compare-value.js +73 -0
- package/dist/shared/lib/format-value.js +18 -17
- package/dist/shared/lib/utils.js +87 -80
- package/package.json +1 -1
|
@@ -5,11 +5,11 @@ import { useNivaroClient as B, useItemNavigation as H, useNavigation as O } from
|
|
|
5
5
|
import { get as M, post as A, put as J } from "../lib/commands.js";
|
|
6
6
|
import { useLiveWatchRoom as X, useLiveEvent as Z } from "../lib/live.js";
|
|
7
7
|
import { userErrorMessage as P } from "../lib/safe-error.js";
|
|
8
|
-
import { cn as N,
|
|
8
|
+
import { cn as N, toLocalDateString as ee, titleCase as te } from "../lib/utils.js";
|
|
9
9
|
import { PickList as U } from "./imports/ServiceConfigBuilder.js";
|
|
10
|
-
import { useOverviewFields as
|
|
11
|
-
import { TipLayer as
|
|
12
|
-
function
|
|
10
|
+
import { useOverviewFields as re } from "./layout-editor/overview/overview-api.js";
|
|
11
|
+
import { TipLayer as ae } from "./TipLayer.js";
|
|
12
|
+
function ne({ p: r }) {
|
|
13
13
|
const a = r.total ? Math.min(100, Math.round(r.checked / r.total * 100)) : null;
|
|
14
14
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-3 text-[11.5px]", "data-conformance-sweep": r.run, children: [
|
|
15
15
|
/* @__PURE__ */ e("span", { className: "w-[180px] shrink-0 truncate font-medium text-slate-700 dark:text-foreground", children: r.collection }),
|
|
@@ -46,15 +46,15 @@ function ae({ p: r }) {
|
|
|
46
46
|
] })
|
|
47
47
|
] });
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function le(r) {
|
|
50
50
|
if (!r) return "";
|
|
51
51
|
const a = Date.now() - new Date(r).getTime(), s = Math.round(a / 6e4);
|
|
52
52
|
if (s < 1) return "just now";
|
|
53
53
|
if (s < 60) return `${s}m ago`;
|
|
54
54
|
const p = Math.round(s / 60);
|
|
55
|
-
return p < 24 ? `${p}h ago` :
|
|
55
|
+
return p < 24 ? `${p}h ago` : ee(r);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function oe(r) {
|
|
58
58
|
if (!r.started_at || !r.finished_at) return "";
|
|
59
59
|
const a = Math.round(
|
|
60
60
|
(new Date(r.finished_at).getTime() - new Date(r.started_at).getTime()) / 1e3
|
|
@@ -102,11 +102,11 @@ const F = {
|
|
|
102
102
|
function z(r) {
|
|
103
103
|
return String(r ?? "").trim() || "Record with no number";
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
return r[a] ||
|
|
105
|
+
function D(r, a) {
|
|
106
|
+
return r[a] || te(a);
|
|
107
107
|
}
|
|
108
108
|
const E = (r) => r.replace(/[-_]+/g, " ").replace(/^\w/, (a) => a.toUpperCase());
|
|
109
|
-
function
|
|
109
|
+
function se({ findingId: r }) {
|
|
110
110
|
const a = B(), [s, p] = f(!1), [x, d] = f(""), [o, i] = f(!1), [g, v] = f(null), w = T({
|
|
111
111
|
queryKey: ["conformance-assign-users", x],
|
|
112
112
|
queryFn: () => a.request(M(`/users?search=${encodeURIComponent(x)}&limit=8`)).then((u) => u.data),
|
|
@@ -174,7 +174,7 @@ function oe({ findingId: r }) {
|
|
|
174
174
|
)
|
|
175
175
|
] });
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function $e({ className: r }) {
|
|
178
178
|
const a = B(), s = I(), p = H(), x = O(), [d, o] = f(""), [i, g] = f(null), [v, w] = f(!1), [y, u] = f(null), [C, q] = f("5000"), c = X("conformance"), [$, R] = f({}), t = V(null);
|
|
179
179
|
G(
|
|
180
180
|
() => () => {
|
|
@@ -185,8 +185,8 @@ function we({ className: r }) {
|
|
|
185
185
|
"conformance:progress",
|
|
186
186
|
(l) => {
|
|
187
187
|
R((L) => {
|
|
188
|
-
const
|
|
189
|
-
return l.status === "running" ?
|
|
188
|
+
const K = { ...L };
|
|
189
|
+
return l.status === "running" ? K[l.run] = l : delete K[l.run], K;
|
|
190
190
|
});
|
|
191
191
|
const _ = () => {
|
|
192
192
|
s.invalidateQueries({ queryKey: ["conformance-runs"] }), s.invalidateQueries({ queryKey: ["conformance-run", l.run] }), l.status !== "running" && s.invalidateQueries({ queryKey: ["conformance-collections"] });
|
|
@@ -233,7 +233,7 @@ function we({ className: r }) {
|
|
|
233
233
|
}
|
|
234
234
|
};
|
|
235
235
|
return /* @__PURE__ */ n("div", { className: N("flex min-h-0 flex-1 flex-col gap-4 p-6", r), "data-conformance": !0, children: [
|
|
236
|
-
/* @__PURE__ */ e(
|
|
236
|
+
/* @__PURE__ */ e(ae, {}),
|
|
237
237
|
/* @__PURE__ */ n("div", { className: "flex flex-wrap items-end gap-3", children: [
|
|
238
238
|
/* @__PURE__ */ n("div", { className: "w-[300px]", children: [
|
|
239
239
|
/* @__PURE__ */ e("p", { className: "mb-1 text-[11.5px] font-medium text-slate-700 dark:text-foreground", children: "Collection" }),
|
|
@@ -296,8 +296,8 @@ function we({ className: r }) {
|
|
|
296
296
|
children: v ? "Starting…" : "Run checks"
|
|
297
297
|
}
|
|
298
298
|
),
|
|
299
|
-
d && /* @__PURE__ */ e(
|
|
300
|
-
b.filter((l) => l.status === "completed").length >= 2 && /* @__PURE__ */ e(
|
|
299
|
+
d && /* @__PURE__ */ e(de, { collection: d }),
|
|
300
|
+
b.filter((l) => l.status === "completed").length >= 2 && /* @__PURE__ */ e(ie, { runs: b }),
|
|
301
301
|
y && /* @__PURE__ */ e("p", { className: "pb-1.5 text-[12px] text-red-600 dark:text-red-400", children: y })
|
|
302
302
|
] }),
|
|
303
303
|
Q.length > 0 && /* @__PURE__ */ n(
|
|
@@ -307,13 +307,13 @@ function we({ className: r }) {
|
|
|
307
307
|
"data-conformance-sweeps": !0,
|
|
308
308
|
children: [
|
|
309
309
|
/* @__PURE__ */ e("p", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "Sweeps in progress" }),
|
|
310
|
-
Q.map((l) => /* @__PURE__ */ e(
|
|
310
|
+
Q.map((l) => /* @__PURE__ */ e(ne, { p: l }, l.run))
|
|
311
311
|
]
|
|
312
312
|
}
|
|
313
313
|
),
|
|
314
|
-
b.length > 0 && /* @__PURE__ */ e(
|
|
314
|
+
b.length > 0 && /* @__PURE__ */ e(ce, { runs: b, activeId: (S == null ? void 0 : S.id) ?? null, onSelect: g }),
|
|
315
315
|
S && /* @__PURE__ */ e(
|
|
316
|
-
|
|
316
|
+
ue,
|
|
317
317
|
{
|
|
318
318
|
run: S,
|
|
319
319
|
liveProgress: $[S.id] ?? null,
|
|
@@ -335,7 +335,7 @@ function we({ className: r }) {
|
|
|
335
335
|
] })
|
|
336
336
|
] });
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function de({ collection: r }) {
|
|
339
339
|
const a = B(), s = I(), { data: p, isError: x } = T({
|
|
340
340
|
queryKey: ["conformance-schedules"],
|
|
341
341
|
queryFn: () => a.request(
|
|
@@ -372,7 +372,7 @@ function se({ collection: r }) {
|
|
|
372
372
|
"Nightly sweep"
|
|
373
373
|
] });
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function ie({ runs: r }) {
|
|
376
376
|
const a = r.filter((i) => i.status === "completed").slice(0, 12).reverse();
|
|
377
377
|
if (a.length < 2) return null;
|
|
378
378
|
const s = Math.max(...a.map((i) => i.violation_count), 1), p = 90, x = 22, d = a.map(
|
|
@@ -395,7 +395,7 @@ function de({ runs: r }) {
|
|
|
395
395
|
}
|
|
396
396
|
);
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function ce({
|
|
399
399
|
runs: r,
|
|
400
400
|
activeId: a,
|
|
401
401
|
onSelect: s
|
|
@@ -435,13 +435,13 @@ function ie({
|
|
|
435
435
|
o.violation_count === 1 ? "" : "s"
|
|
436
436
|
] }) }),
|
|
437
437
|
/* @__PURE__ */ e("td", { className: "px-2 py-1.5 text-right text-slate-500 dark:text-muted-foreground", children: o.checked_records.toLocaleString() }),
|
|
438
|
-
/* @__PURE__ */ e("td", { className: "px-2 py-1.5 text-right text-slate-500 dark:text-muted-foreground", children:
|
|
438
|
+
/* @__PURE__ */ e("td", { className: "px-2 py-1.5 text-right text-slate-500 dark:text-muted-foreground", children: oe(o) }),
|
|
439
439
|
/* @__PURE__ */ e(
|
|
440
440
|
"td",
|
|
441
441
|
{
|
|
442
442
|
className: "px-2 py-1.5 text-slate-500 dark:text-muted-foreground",
|
|
443
443
|
"data-tip": o.started_at ? new Date(o.started_at).toLocaleString() : void 0,
|
|
444
|
-
children:
|
|
444
|
+
children: le(o.started_at)
|
|
445
445
|
}
|
|
446
446
|
),
|
|
447
447
|
/* @__PURE__ */ e("td", { className: "px-3 py-1.5 text-slate-500 dark:text-muted-foreground", children: o.triggered_by_name ?? "Scheduled" })
|
|
@@ -461,13 +461,13 @@ function ie({
|
|
|
461
461
|
)
|
|
462
462
|
] });
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function ue({
|
|
465
465
|
run: r,
|
|
466
466
|
onOpenItem: a,
|
|
467
467
|
liveProgress: s,
|
|
468
468
|
live: p
|
|
469
469
|
}) {
|
|
470
|
-
const x = B(), [d, o] = f(1), [i, g] = f(""), [v, w] = f(""), [y, u] = f(!1), { data: C } =
|
|
470
|
+
const x = B(), [d, o] = f(1), [i, g] = f(""), [v, w] = f(""), [y, u] = f(!1), { data: C } = re(r.collection), q = j(() => {
|
|
471
471
|
const t = {};
|
|
472
472
|
for (const m of C ?? []) m.label && (t[m.field] = m.label);
|
|
473
473
|
return t;
|
|
@@ -566,7 +566,7 @@ function ce({
|
|
|
566
566
|
v === t.field ? "border-nvr-cyan/50 bg-nvr-cyan/10 text-slate-800 dark:text-foreground" : "border-slate-200 text-slate-500 dark:border-border dark:text-muted-foreground"
|
|
567
567
|
),
|
|
568
568
|
children: [
|
|
569
|
-
|
|
569
|
+
D(q, t.field),
|
|
570
570
|
" · ",
|
|
571
571
|
Number(t.c).toLocaleString()
|
|
572
572
|
]
|
|
@@ -581,7 +581,7 @@ function ce({
|
|
|
581
581
|
"row-rule",
|
|
582
582
|
"required",
|
|
583
583
|
"row-input"
|
|
584
|
-
].includes(i) && /* @__PURE__ */ e(
|
|
584
|
+
].includes(i) && /* @__PURE__ */ e(me, { run: r, rule: i, field: v, total: (c == null ? void 0 : c.total) ?? 0 }),
|
|
585
585
|
/* @__PURE__ */ n("div", { className: "min-h-0 flex-1 overflow-y-auto", children: [
|
|
586
586
|
c !== void 0 && ((c == null ? void 0 : c.findings) ?? []).length === 0 && r.status === "completed" && /* @__PURE__ */ e("p", { className: "px-4 py-6 text-[12.5px] text-emerald-600 dark:text-emerald-400", children: i || v ? "No findings match the filters." : "Every checked record satisfies its field configuration." }),
|
|
587
587
|
y ? /* @__PURE__ */ e("div", { children: ((c == null ? void 0 : c.findings) ?? []).map((t) => /* @__PURE__ */ n(
|
|
@@ -615,7 +615,7 @@ function ce({
|
|
|
615
615
|
onClick: () => a(t.item_id, m.field),
|
|
616
616
|
"data-tip": "Open the record at this field",
|
|
617
617
|
className: "w-[150px] shrink-0 text-left text-[11.5px] text-slate-500 underline decoration-dotted underline-offset-2 hover:text-nvr-cyan dark:text-muted-foreground",
|
|
618
|
-
children:
|
|
618
|
+
children: D(q, m.field)
|
|
619
619
|
}
|
|
620
620
|
),
|
|
621
621
|
/* @__PURE__ */ e(
|
|
@@ -657,7 +657,7 @@ function ce({
|
|
|
657
657
|
onClick: () => a(t.item_id, t.field),
|
|
658
658
|
"data-tip": "Open the record at this field",
|
|
659
659
|
className: "text-[11.5px] text-slate-500 underline decoration-dotted underline-offset-2 hover:text-nvr-cyan dark:text-muted-foreground",
|
|
660
|
-
children:
|
|
660
|
+
children: D(q, t.field)
|
|
661
661
|
}
|
|
662
662
|
) }),
|
|
663
663
|
/* @__PURE__ */ e("td", { className: "w-[150px] px-2 py-1.5", children: /* @__PURE__ */ e(
|
|
@@ -671,7 +671,7 @@ function ce({
|
|
|
671
671
|
}
|
|
672
672
|
) }),
|
|
673
673
|
/* @__PURE__ */ e("td", { className: "px-2 py-1.5 text-slate-600 dark:text-muted-foreground", children: t.message }),
|
|
674
|
-
/* @__PURE__ */ e("td", { className: "w-[120px] px-2 py-1.5 text-right", children: /* @__PURE__ */ e(
|
|
674
|
+
/* @__PURE__ */ e("td", { className: "w-[120px] px-2 py-1.5 text-right", children: /* @__PURE__ */ e(se, { findingId: t.id }) })
|
|
675
675
|
]
|
|
676
676
|
},
|
|
677
677
|
t.id
|
|
@@ -708,7 +708,7 @@ function ce({
|
|
|
708
708
|
] })
|
|
709
709
|
] });
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function me({
|
|
712
712
|
run: r,
|
|
713
713
|
rule: a,
|
|
714
714
|
field: s,
|
|
@@ -797,7 +797,7 @@ function ue({
|
|
|
797
797
|
] });
|
|
798
798
|
}
|
|
799
799
|
export {
|
|
800
|
-
|
|
801
|
-
|
|
800
|
+
$e as ConformanceView,
|
|
801
|
+
D as findingFieldLabel,
|
|
802
802
|
z as findingRecordName
|
|
803
803
|
};
|