@nivaro/react 0.3.147 → 0.3.148
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 +28 -0
- package/dist/index.js +767 -764
- package/dist/shared/components/AnnouncementBanner.js +91 -42
- package/dist/shared/components/hub-switcher/HubSwitcher.js +101 -0
- package/dist/shared/components/ops-report/DigestSections.js +119 -112
- package/dist/shared/components/panels/PipelinePanel.js +71 -71
- package/dist/shared/lib/error-hints.js +8 -1
- package/dist/shared/lib/error-message.js +73 -66
- package/package.json +1 -1
|
@@ -637,7 +637,7 @@ function Oa({
|
|
|
637
637
|
] })
|
|
638
638
|
] }),
|
|
639
639
|
/* @__PURE__ */ n("div", { className: "flex h-4 w-full overflow-hidden rounded", children: b.map((h) => {
|
|
640
|
-
const R = h.ms / w * 100, _ = h.timing, k = _ ? _.waiting_ms + _.working_ms : 0, N = _ && k > 0 ? _.waiting_ms / k * 100 : 0,
|
|
640
|
+
const R = h.ms / w * 100, _ = h.timing, k = _ ? _.waiting_ms + _.working_ms : 0, N = _ && k > 0 ? _.waiting_ms / k * 100 : 0, P = [
|
|
641
641
|
`${h.label} — ${Ot(h.ms)}${h.current ? " (current)" : ""}`,
|
|
642
642
|
_ ? In(_) : null,
|
|
643
643
|
_ ? jn(_) : null
|
|
@@ -645,7 +645,7 @@ function Oa({
|
|
|
645
645
|
return /* @__PURE__ */ s(
|
|
646
646
|
"div",
|
|
647
647
|
{
|
|
648
|
-
"data-tip":
|
|
648
|
+
"data-tip": P,
|
|
649
649
|
"data-step-visit": h.key,
|
|
650
650
|
className: "relative flex min-w-[8px] items-center overflow-hidden border-r border-white/60 last:border-r-0 dark:border-black/30",
|
|
651
651
|
style: {
|
|
@@ -737,7 +737,7 @@ function Aa({
|
|
|
737
737
|
k && k.id !== a && _.add(k.id);
|
|
738
738
|
const N = (Y = i[0]) == null ? void 0 : Y.from_state;
|
|
739
739
|
N && N !== a && _.add(N);
|
|
740
|
-
const
|
|
740
|
+
const P = (() => {
|
|
741
741
|
if (u)
|
|
742
742
|
return e.filter((o) => u.has(o.id) || _.has(o.id) || o.id === a).filter((o) => {
|
|
743
743
|
const O = o.stage_visibility ?? "always";
|
|
@@ -776,11 +776,11 @@ function Aa({
|
|
|
776
776
|
return O === "hide" ? !1 : O === "hide_unless_active" ? _.has(o.id) || o.id === a : !0;
|
|
777
777
|
}).sort((o, O) => o.sort - O.sort);
|
|
778
778
|
})();
|
|
779
|
-
if (
|
|
780
|
-
const V =
|
|
781
|
-
|
|
779
|
+
if (P.length < 2) return null;
|
|
780
|
+
const V = P.findIndex((p) => p.id === a), L = Dr(
|
|
781
|
+
P.map((p) => p.id),
|
|
782
782
|
b ?? null
|
|
783
|
-
), ae = new Map(
|
|
783
|
+
), ae = new Map(P.map((p, $) => [p.id, $])), oe = new Map(e.map((p) => [p.id, p.label]));
|
|
784
784
|
function pe(p, $) {
|
|
785
785
|
const v = ae.get(p);
|
|
786
786
|
return v == null ? [] : [...i].filter((g) => {
|
|
@@ -804,7 +804,7 @@ function Aa({
|
|
|
804
804
|
const $ = ae.get(p.from_state), v = ae.get(p.to_state);
|
|
805
805
|
if (!($ == null || v == null || v <= $ + 1))
|
|
806
806
|
for (let g = $ + 1; g < v; g++) {
|
|
807
|
-
const C =
|
|
807
|
+
const C = P[g].id;
|
|
808
808
|
!_.has(C) && !ye.has(C) && ye.set(C, p);
|
|
809
809
|
}
|
|
810
810
|
}
|
|
@@ -828,9 +828,9 @@ function Aa({
|
|
|
828
828
|
"div",
|
|
829
829
|
{
|
|
830
830
|
className: "flex w-full items-start px-2",
|
|
831
|
-
style: { minWidth: `${
|
|
832
|
-
children:
|
|
833
|
-
const v = p.id === a, g = _.has(p.id), C = g && !v && (V < 0 || $ < V), Q = g && !v && !C, ke = !g && !v ? ye.get(p.id) : void 0, o = !g && !v ? x == null ? void 0 : x.get(p.id) : void 0, O = ke || o ? [...ke ? [Se(ke)] : [], ...o ?? []] : void 0, U = O !== void 0, Re = p.color ?? "#94a3b8", ne = $ ===
|
|
831
|
+
style: { minWidth: `${P.length * 116 - 40 + 16}px` },
|
|
832
|
+
children: P.map((p, $) => {
|
|
833
|
+
const v = p.id === a, g = _.has(p.id), C = g && !v && (V < 0 || $ < V), Q = g && !v && !C, ke = !g && !v ? ye.get(p.id) : void 0, o = !g && !v ? x == null ? void 0 : x.get(p.id) : void 0, O = ke || o ? [...ke ? [Se(ke)] : [], ...o ?? []] : void 0, U = O !== void 0, Re = p.color ?? "#94a3b8", ne = $ === P.length - 1, Te = ne ? null : P[$ + 1], fe = Te ? pe(p.id, Te.id) : [];
|
|
834
834
|
return /* @__PURE__ */ s("div", { className: "flex flex-1 items-start", "data-track-step": !0, children: [
|
|
835
835
|
/* @__PURE__ */ s("div", { className: "flex min-w-[76px] flex-1 flex-col items-center gap-1.5 px-1", children: [
|
|
836
836
|
/* @__PURE__ */ n(
|
|
@@ -1135,7 +1135,7 @@ function Da({
|
|
|
1135
1135
|
standInReason: u = null
|
|
1136
1136
|
}) {
|
|
1137
1137
|
var l, Qe, Ce, Ne, Oe;
|
|
1138
|
-
const x = Ke(), b = et(), { isAdmin: w, userId: M } = bn(), [h, R] = X(!1), [_, k] = X(""), [N,
|
|
1138
|
+
const x = Ke(), b = et(), { isAdmin: w, userId: M } = bn(), [h, R] = X(!1), [_, k] = X(""), [N, P] = X(""), [V, L] = X(!1), ae = ["pipeline-instance-owners", e, t], oe = ["pipeline-owners-can-add", e, t], pe = () => x.request(
|
|
1139
1139
|
De(`/pipelines/instance/${e}/${t}/owners`)
|
|
1140
1140
|
).then((m) => {
|
|
1141
1141
|
var W;
|
|
@@ -1185,7 +1185,7 @@ function Da({
|
|
|
1185
1185
|
})
|
|
1186
1186
|
),
|
|
1187
1187
|
onSuccess: () => {
|
|
1188
|
-
le(), k(""),
|
|
1188
|
+
le(), k(""), P(""), R(!1), ee.success("Owner added");
|
|
1189
1189
|
},
|
|
1190
1190
|
// The server's reason (a 403 says why), not a bare status phrase.
|
|
1191
1191
|
onError: (m) => ee.error(We(m, "Failed to add owner"))
|
|
@@ -1417,7 +1417,7 @@ function Da({
|
|
|
1417
1417
|
N === m && "font-medium text-slate-800 dark:text-slate-200"
|
|
1418
1418
|
),
|
|
1419
1419
|
onClick: () => {
|
|
1420
|
-
|
|
1420
|
+
P(m), L(!1);
|
|
1421
1421
|
},
|
|
1422
1422
|
children: W
|
|
1423
1423
|
},
|
|
@@ -1434,7 +1434,7 @@ function Da({
|
|
|
1434
1434
|
variant: "ghost",
|
|
1435
1435
|
className: "h-7 text-[12px]",
|
|
1436
1436
|
onClick: () => {
|
|
1437
|
-
R(!1), k(""),
|
|
1437
|
+
R(!1), k(""), P("");
|
|
1438
1438
|
},
|
|
1439
1439
|
children: "Cancel"
|
|
1440
1440
|
}
|
|
@@ -1525,13 +1525,13 @@ function Ba({
|
|
|
1525
1525
|
queryKey: ["pipeline-all-owners", e, t],
|
|
1526
1526
|
queryFn: () => u.request(
|
|
1527
1527
|
De(`/pipelines/instance/${e}/${t}/owners/all`)
|
|
1528
|
-
).then((
|
|
1528
|
+
).then((P) => P.data ?? null),
|
|
1529
1529
|
enabled: b,
|
|
1530
1530
|
staleTime: 3e4
|
|
1531
|
-
}), k = [...r].filter((
|
|
1531
|
+
}), k = [...r].filter((P) => {
|
|
1532
1532
|
var V;
|
|
1533
|
-
return !h || ((V = h[
|
|
1534
|
-
}).sort((
|
|
1533
|
+
return !h || ((V = h[P.id]) == null ? void 0 : V.on_path) !== !1;
|
|
1534
|
+
}).sort((P, V) => P.sort - V.sort), N = Pr(`${a ?? ""}:${(i == null ? void 0 : i.length) ?? 0}:${_}`);
|
|
1535
1535
|
return /* @__PURE__ */ s(Nn, { open: b, onOpenChange: w, children: [
|
|
1536
1536
|
/* @__PURE__ */ n(Sn, { asChild: !0, children: /* @__PURE__ */ n(
|
|
1537
1537
|
"button",
|
|
@@ -1539,7 +1539,7 @@ function Ba({
|
|
|
1539
1539
|
type: "button",
|
|
1540
1540
|
title: "View approval chain",
|
|
1541
1541
|
className: "flex h-6 w-6 items-center justify-center rounded text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600 dark:hover:bg-muted dark:hover:text-slate-300",
|
|
1542
|
-
onClick: (
|
|
1542
|
+
onClick: (P) => P.stopPropagation(),
|
|
1543
1543
|
children: /* @__PURE__ */ n(pn, { className: "h-3.5 w-3.5" })
|
|
1544
1544
|
}
|
|
1545
1545
|
) }),
|
|
@@ -1555,18 +1555,18 @@ function Ba({
|
|
|
1555
1555
|
/* @__PURE__ */ n("p", { className: "text-[12px] font-semibold text-slate-700 dark:text-slate-100", children: "Approval Chain" }),
|
|
1556
1556
|
/* @__PURE__ */ n("p", { className: "text-[11px] text-slate-500 mt-0.5 dark:text-slate-400", children: "Owners per pipeline state" })
|
|
1557
1557
|
] }),
|
|
1558
|
-
/* @__PURE__ */ n("div", { className: "max-h-[min(504px,calc(var(--radix-popover-content-available-height,504px)-64px))] overflow-y-auto overscroll-contain", children: R ? /* @__PURE__ */ n("div", { className: "space-y-px p-3", children: [1, 2, 3].map((
|
|
1558
|
+
/* @__PURE__ */ n("div", { className: "max-h-[min(504px,calc(var(--radix-popover-content-available-height,504px)-64px))] overflow-y-auto overscroll-contain", children: R ? /* @__PURE__ */ n("div", { className: "space-y-px p-3", children: [1, 2, 3].map((P) => /* @__PURE__ */ n(Ue, { className: "h-10 w-full" }, P)) }) : h ? /* @__PURE__ */ n("div", { ref: N, className: "divide-y divide-slate-100 dark:divide-border/60", children: k.map((P) => {
|
|
1559
1559
|
var ye, Se, Y, p, $, v;
|
|
1560
|
-
const V = (((ye = h[
|
|
1560
|
+
const V = (((ye = h[P.id]) == null ? void 0 : ye.owners) ?? []).map((g) => ({
|
|
1561
1561
|
id: g.id,
|
|
1562
1562
|
name: [g.first_name, g.last_name].filter(Boolean).join(" ") || g.email
|
|
1563
1563
|
})), L = Cr({
|
|
1564
|
-
stateId:
|
|
1564
|
+
stateId: P.id,
|
|
1565
1565
|
currentStateId: a,
|
|
1566
1566
|
history: i ?? [],
|
|
1567
1567
|
// Only people who can act on the step (a queue-only name cannot approve).
|
|
1568
|
-
owners: (((Se = h[
|
|
1569
|
-
}), ae =
|
|
1568
|
+
owners: (((Se = h[P.id]) == null ? void 0 : Se.owners) ?? []).filter((g) => !g.queue_only).map((g) => [g.first_name, g.last_name].filter(Boolean).join(" ") || g.email)
|
|
1569
|
+
}), ae = P.id === a, oe = ((Y = h[P.id]) == null ? void 0 : Y.skipped) === !0 && !ae, pe = (((p = h[P.id]) == null ? void 0 : p.skip_reasons) ?? []).filter(Boolean), J = (($ = h[P.id]) == null ? void 0 : $.unavailable) ?? [], j = ((v = h[P.id]) == null ? void 0 : v.blocked) === !0 && !oe;
|
|
1570
1570
|
return /* @__PURE__ */ s(
|
|
1571
1571
|
"div",
|
|
1572
1572
|
{
|
|
@@ -1592,7 +1592,7 @@ function Ba({
|
|
|
1592
1592
|
}
|
|
1593
1593
|
) }),
|
|
1594
1594
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 shrink-0 flex-col items-start gap-0.5", children: [
|
|
1595
|
-
/* @__PURE__ */ n(Ie, { label:
|
|
1595
|
+
/* @__PURE__ */ n(Ie, { label: P.label, color: P.color, small: !0 }),
|
|
1596
1596
|
L && !oe && /* @__PURE__ */ n(
|
|
1597
1597
|
"span",
|
|
1598
1598
|
{
|
|
@@ -1668,7 +1668,7 @@ function Ba({
|
|
|
1668
1668
|
] }) })
|
|
1669
1669
|
]
|
|
1670
1670
|
},
|
|
1671
|
-
|
|
1671
|
+
P.id
|
|
1672
1672
|
);
|
|
1673
1673
|
}) }) : /* @__PURE__ */ n("p", { className: "px-4 py-3 text-[12px] text-slate-400", children: "No pipeline configured." }) })
|
|
1674
1674
|
]
|
|
@@ -1722,8 +1722,8 @@ function pr({
|
|
|
1722
1722
|
});
|
|
1723
1723
|
if (!i) return /* @__PURE__ */ n(an, { collection: e, item: t });
|
|
1724
1724
|
const u = i.field_changes.map((k) => {
|
|
1725
|
-
const N = (V) => V == null || V === "" ? V : ba(String(V), k),
|
|
1726
|
-
return { f: k, pair:
|
|
1725
|
+
const N = (V) => V == null || V === "" ? V : ba(String(V), k), P = Ca(k.old === void 0 ? void 0 : N(k.old), N(k.new));
|
|
1726
|
+
return { f: k, pair: P, noop: P.old !== null && P.old === P.new };
|
|
1727
1727
|
}), x = u.filter((k) => !k.noop), b = u.filter((k) => k.noop && !k.f.auto).length, w = u.length - x.length, M = Math.max(0, i.changed_total - w), h = Math.max(0, (i.changed_by_people ?? i.changed_total) - b), R = new Set((r ?? []).map(on)), _ = (i.lines ?? []).filter((k) => !R.has(on(k)));
|
|
1728
1728
|
return /* @__PURE__ */ s(qe, { children: [
|
|
1729
1729
|
/* @__PURE__ */ n(an, { collection: e, item: t }),
|
|
@@ -1826,9 +1826,9 @@ function Ea({
|
|
|
1826
1826
|
asUser: R
|
|
1827
1827
|
}) {
|
|
1828
1828
|
var Yt, Xt, Jt, Zt;
|
|
1829
|
-
const _ = !!h || !!R, k = Ke(), N = et(), { isAdmin:
|
|
1829
|
+
const _ = !!h || !!R, k = Ke(), N = et(), { isAdmin: P } = bn(), [V, L] = X(0), ae = we(null);
|
|
1830
1830
|
Ee(() => {
|
|
1831
|
-
if (!
|
|
1831
|
+
if (!P) return;
|
|
1832
1832
|
const c = (y) => {
|
|
1833
1833
|
const A = y.detail;
|
|
1834
1834
|
!A || A.claimed || A.collection !== e || String(A.item) !== String(t) || (A.claimed = !0, $(!0), L((F) => F + 1), setTimeout(
|
|
@@ -1840,7 +1840,7 @@ function Ea({
|
|
|
1840
1840
|
));
|
|
1841
1841
|
};
|
|
1842
1842
|
return window.addEventListener(tn, c), () => window.removeEventListener(tn, c);
|
|
1843
|
-
}, [
|
|
1843
|
+
}, [P, e, t]);
|
|
1844
1844
|
const [oe, pe] = X(""), [J, j] = X(null), [ye, Se] = X(!1), Y = we(null), [p, $] = Br(r, !1), [v, g] = X(null), [C, Q] = X(null), [ke, o] = X(null), [O, U] = X([]), Re = er(e, String(t)), [ne, Te] = X([]), fe = Wn(e, String(t));
|
|
1845
1845
|
kn(e, t, "transition", !!J || !!v), vn(e, t, { hold: !!J || !!v });
|
|
1846
1846
|
const D = Rr(e, t, "transition"), z = we(!1), le = (c) => {
|
|
@@ -2095,7 +2095,7 @@ function Ea({
|
|
|
2095
2095
|
};
|
|
2096
2096
|
return window.addEventListener(vt, c), () => window.removeEventListener(vt, c);
|
|
2097
2097
|
}, [e, t, _]);
|
|
2098
|
-
const
|
|
2098
|
+
const q = Fr(e, t, ((Yt = l == null ? void 0 : l.instance) == null ? void 0 : Yt.current_state) ?? null), { data: I } = Wr(e, l != null && l.instance ? String(t) : ""), E = ta(e, t);
|
|
2099
2099
|
if (Qe)
|
|
2100
2100
|
return /* @__PURE__ */ n("div", { className: "overflow-hidden rounded-xl border border-slate-200 bg-white dark:border-border dark:bg-card", children: /* @__PURE__ */ s("div", { className: "flex w-full items-center gap-2.5 px-5 py-3.5", children: [
|
|
2101
2101
|
/* @__PURE__ */ n(Ue, { className: "h-3.5 w-3.5 shrink-0 rounded" }),
|
|
@@ -2519,7 +2519,7 @@ function Ea({
|
|
|
2519
2519
|
history: K ?? [],
|
|
2520
2520
|
onPathIds: m,
|
|
2521
2521
|
skippedStates: W,
|
|
2522
|
-
travel:
|
|
2522
|
+
travel: q,
|
|
2523
2523
|
onShowHistory: () => {
|
|
2524
2524
|
Se(!0), requestAnimationFrame(
|
|
2525
2525
|
() => {
|
|
@@ -2607,7 +2607,7 @@ function Ea({
|
|
|
2607
2607
|
}
|
|
2608
2608
|
) })
|
|
2609
2609
|
] }),
|
|
2610
|
-
|
|
2610
|
+
P && (he ?? []).length > 1 && /* @__PURE__ */ n("div", { className: "px-5 py-3", ref: ae, children: /* @__PURE__ */ n(
|
|
2611
2611
|
oa,
|
|
2612
2612
|
{
|
|
2613
2613
|
collection: e,
|
|
@@ -2694,12 +2694,12 @@ function La({
|
|
|
2694
2694
|
asRole: i,
|
|
2695
2695
|
asUser: u
|
|
2696
2696
|
}) {
|
|
2697
|
-
const x = !!i || !!u, b = Ke(), w = et(), [M, h] = X(""), [R, _] = X(null), [k, N] = X(null), [
|
|
2697
|
+
const x = !!i || !!u, b = Ke(), w = et(), [M, h] = X(""), [R, _] = X(null), [k, N] = X(null), [P, V] = X(null), [L, ae] = X(null), [oe, pe] = X([]), J = er(e, String(t)), [j, ye] = X([]), Se = Wn(e, String(t));
|
|
2698
2698
|
kn(e, t, "transition", !!R || !!k), vn(e, t, { hold: !!R || !!k });
|
|
2699
2699
|
const Y = we(null), p = Qr(Y, !a), $ = we(!1), v = (d) => {
|
|
2700
2700
|
$.current || x || ($.current = !0, V(null), ne.mutate(d, {
|
|
2701
|
-
onSettled: (f,
|
|
2702
|
-
if (
|
|
2701
|
+
onSettled: (f, q) => {
|
|
2702
|
+
if (q) {
|
|
2703
2703
|
$.current = !1;
|
|
2704
2704
|
return;
|
|
2705
2705
|
}
|
|
@@ -2749,9 +2749,9 @@ function La({
|
|
|
2749
2749
|
return;
|
|
2750
2750
|
}
|
|
2751
2751
|
}
|
|
2752
|
-
const
|
|
2752
|
+
const q = (D ?? []).find((K) => K.id === d), I = String((q == null ? void 0 : q.comment_mode) ?? "none"), E = Wt(q, (o == null ? void 0 : o.states) ?? [], (T = o == null ? void 0 : o.instance) == null ? void 0 : T.current_state);
|
|
2753
2753
|
if (I !== "optional" && I !== "required") {
|
|
2754
|
-
if (
|
|
2754
|
+
if (q && !ot(q, (o == null ? void 0 : o.states) ?? [], (ie = o == null ? void 0 : o.instance) == null ? void 0 : ie.current_state)) {
|
|
2755
2755
|
$.current = !0;
|
|
2756
2756
|
let K = [];
|
|
2757
2757
|
try {
|
|
@@ -2808,20 +2808,20 @@ function La({
|
|
|
2808
2808
|
}), Re = xt(() => {
|
|
2809
2809
|
if (!U) return null;
|
|
2810
2810
|
const d = /* @__PURE__ */ new Map();
|
|
2811
|
-
for (const [f,
|
|
2812
|
-
|
|
2811
|
+
for (const [f, q] of Object.entries(U))
|
|
2812
|
+
q.skipped && d.set(f, q.skip_reasons ?? []);
|
|
2813
2813
|
return d;
|
|
2814
2814
|
}, [U]), ne = Ze({
|
|
2815
2815
|
mutationFn: ({
|
|
2816
2816
|
transition_id: d,
|
|
2817
2817
|
comment: f,
|
|
2818
|
-
reviewed:
|
|
2818
|
+
reviewed: q,
|
|
2819
2819
|
lock_ack: I
|
|
2820
2820
|
}) => x ? Promise.reject(new Error("Moves are not made from a preview")) : b.request(
|
|
2821
2821
|
it(`/pipelines/instance/${e}/${t}/transition`, {
|
|
2822
2822
|
transition_id: d,
|
|
2823
2823
|
comment: f,
|
|
2824
|
-
...
|
|
2824
|
+
...q ? { reviewed: !0 } : {},
|
|
2825
2825
|
...I ? { lock_ack: !0 } : {},
|
|
2826
2826
|
...On(o == null ? void 0 : o.available_transitions, d)
|
|
2827
2827
|
})
|
|
@@ -2831,22 +2831,22 @@ function La({
|
|
|
2831
2831
|
return {
|
|
2832
2832
|
slow: ir(
|
|
2833
2833
|
(f = [...(o == null ? void 0 : o.available_transitions) ?? [], ...(o == null ? void 0 : o.all_transitions) ?? []].find(
|
|
2834
|
-
(
|
|
2834
|
+
(q) => q.id === d.transition_id
|
|
2835
2835
|
)) == null ? void 0 : f.label
|
|
2836
2836
|
)
|
|
2837
2837
|
};
|
|
2838
2838
|
},
|
|
2839
|
-
onSuccess: (d, f,
|
|
2839
|
+
onSuccess: (d, f, q) => {
|
|
2840
2840
|
w.invalidateQueries({ queryKey: C }), e === "nivaro_addendums" && w.invalidateQueries({ queryKey: ["addendums"] }), Xe(w, e, String(t)), Je(w, e, String(t)), wt(w, e, String(t)), V(null), h(""), _(null), N(null);
|
|
2841
2841
|
const I = Rn(d);
|
|
2842
2842
|
I ? ee.info(
|
|
2843
2843
|
`${I.transition_label ?? "The move"} started. You will be told if it does not go through.`,
|
|
2844
|
-
|
|
2845
|
-
) : ee.success(sr(o, f.transition_id, d),
|
|
2844
|
+
q == null ? void 0 : q.slow.done()
|
|
2845
|
+
) : ee.success(sr(o, f.transition_id, d), q == null ? void 0 : q.slow.done());
|
|
2846
2846
|
},
|
|
2847
|
-
onError: (d, f,
|
|
2847
|
+
onError: (d, f, q) => {
|
|
2848
2848
|
var K, he;
|
|
2849
|
-
if (
|
|
2849
|
+
if (q == null || q.slow.fail(), zn(d)) {
|
|
2850
2850
|
w.invalidateQueries({ queryKey: C });
|
|
2851
2851
|
return;
|
|
2852
2852
|
}
|
|
@@ -2916,10 +2916,10 @@ function La({
|
|
|
2916
2916
|
const fe = we((o == null ? void 0 : o.available_transitions) ?? []);
|
|
2917
2917
|
if (fe.current = (o == null ? void 0 : o.available_transitions) ?? [], Ee(() => {
|
|
2918
2918
|
const d = (f) => {
|
|
2919
|
-
const
|
|
2920
|
-
if (!
|
|
2921
|
-
|
|
2922
|
-
const I = String(
|
|
2919
|
+
const q = f.detail;
|
|
2920
|
+
if (!q || q.claimed || x || q.collection !== e || String(q.item) !== String(t)) return;
|
|
2921
|
+
q.claimed = !0;
|
|
2922
|
+
const I = String(q.transition_id).toUpperCase(), E = fe.current.find((T) => String(T.id).toUpperCase() === I);
|
|
2923
2923
|
if (!E) {
|
|
2924
2924
|
ee.error("That step is not available from where the record is now");
|
|
2925
2925
|
return;
|
|
@@ -2943,23 +2943,23 @@ function La({
|
|
|
2943
2943
|
f.push(d), Oe.set(d.label, f);
|
|
2944
2944
|
}
|
|
2945
2945
|
const m = (d) => [...d].sort(
|
|
2946
|
-
(f,
|
|
2946
|
+
(f, q) => {
|
|
2947
2947
|
var I, E;
|
|
2948
|
-
return (((I = le.get(f.to_state)) == null ? void 0 : I.sort) ?? 999) - (((E = le.get(
|
|
2948
|
+
return (((I = le.get(f.to_state)) == null ? void 0 : I.sort) ?? 999) - (((E = le.get(q.to_state)) == null ? void 0 : E.sort) ?? 999);
|
|
2949
2949
|
}
|
|
2950
2950
|
), W = (d) => {
|
|
2951
2951
|
var f;
|
|
2952
2952
|
return ((f = le.get(d.to_state)) == null ? void 0 : f.label) ?? d.to_state;
|
|
2953
2953
|
}, de = (() => {
|
|
2954
|
-
var
|
|
2955
|
-
const d = (
|
|
2954
|
+
var q, I, E;
|
|
2955
|
+
const d = (q = Y.current) == null ? void 0 : q.getBoundingClientRect();
|
|
2956
2956
|
if (!d) return 600;
|
|
2957
2957
|
const f = (E = (I = Y.current) == null ? void 0 : I.closest('[role="dialog"]')) == null ? void 0 : E.getBoundingClientRect();
|
|
2958
2958
|
return Math.max(260, Math.min(600, d.right - ((f == null ? void 0 : f.left) ?? 0) - 12));
|
|
2959
2959
|
})(), G = (() => {
|
|
2960
2960
|
var I, E;
|
|
2961
|
-
const d = typeof window < "u" ? window.innerWidth : 1024, f = (I = Y.current) == null ? void 0 : I.getBoundingClientRect(),
|
|
2962
|
-
return !f || d >= 480 ||
|
|
2961
|
+
const d = typeof window < "u" ? window.innerWidth : 1024, f = (I = Y.current) == null ? void 0 : I.getBoundingClientRect(), q = !!((E = Y.current) != null && E.closest('[role="dialog"]'));
|
|
2962
|
+
return !f || d >= 480 || q ? { width: de } : { width: d - 32, right: f.right - (d - 16) };
|
|
2963
2963
|
})();
|
|
2964
2964
|
return /* @__PURE__ */ s("div", { ref: Y, className: "relative", "data-tip": l, children: [
|
|
2965
2965
|
p ? /* @__PURE__ */ s(At, { children: [
|
|
@@ -2980,8 +2980,8 @@ function La({
|
|
|
2980
2980
|
) }),
|
|
2981
2981
|
/* @__PURE__ */ s(Dt, { align: "end", className: "min-w-[200px]", children: [
|
|
2982
2982
|
Array.from(Oe.entries()).map(
|
|
2983
|
-
([d, f],
|
|
2984
|
-
|
|
2983
|
+
([d, f], q, I) => f.length === 1 ? /* @__PURE__ */ s(nn, { children: [
|
|
2984
|
+
q > 0 && I[q - 1][1].length > 1 && /* @__PURE__ */ n(Bt, {}),
|
|
2985
2985
|
/* @__PURE__ */ s(
|
|
2986
2986
|
ct,
|
|
2987
2987
|
{
|
|
@@ -3006,7 +3006,7 @@ function La({
|
|
|
3006
3006
|
}
|
|
3007
3007
|
)
|
|
3008
3008
|
] }, d) : /* @__PURE__ */ s(nn, { children: [
|
|
3009
|
-
|
|
3009
|
+
q > 0 && /* @__PURE__ */ n(Bt, {}),
|
|
3010
3010
|
/* @__PURE__ */ n(Vr, { className: "text-[11px] text-muted-foreground", children: d }),
|
|
3011
3011
|
m(f).map((E) => /* @__PURE__ */ s(
|
|
3012
3012
|
ct,
|
|
@@ -3039,8 +3039,8 @@ function La({
|
|
|
3039
3039
|
{
|
|
3040
3040
|
moves: D,
|
|
3041
3041
|
nameOf: (d) => {
|
|
3042
|
-
var f,
|
|
3043
|
-
return (((f = Oe.get(d.label)) == null ? void 0 : f.length) ?? 0) > 1 ? ((
|
|
3042
|
+
var f, q;
|
|
3043
|
+
return (((f = Oe.get(d.label)) == null ? void 0 : f.length) ?? 0) > 1 ? ((q = le.get(d.to_state)) == null ? void 0 : q.label) ?? d.to_state : d.label;
|
|
3044
3044
|
}
|
|
3045
3045
|
}
|
|
3046
3046
|
)
|
|
@@ -3051,10 +3051,10 @@ function La({
|
|
|
3051
3051
|
className: a ? "flex flex-wrap justify-end gap-2" : "flex shrink-0 items-center justify-end gap-2",
|
|
3052
3052
|
children: Array.from(Oe.entries()).map(([d, f]) => {
|
|
3053
3053
|
var ie, K, he;
|
|
3054
|
-
const
|
|
3054
|
+
const q = f.some((S) => {
|
|
3055
3055
|
var se;
|
|
3056
3056
|
return (((se = S.order_partners) == null ? void 0 : se.length) ?? 0) > 0;
|
|
3057
|
-
}), I =
|
|
3057
|
+
}), I = ((ie = f[0]) == null ? void 0 : ie.color) ?? null, E = f.some((S) => S.id === R), T = (S) => I ? S ? { backgroundColor: I, borderColor: I } : { borderColor: I, color: I } : void 0;
|
|
3058
3058
|
if (f.every(gt)) {
|
|
3059
3059
|
const S = m(f);
|
|
3060
3060
|
return /* @__PURE__ */ n(
|
|
@@ -3088,7 +3088,7 @@ function La({
|
|
|
3088
3088
|
O.press(S.id) && g(S.id);
|
|
3089
3089
|
},
|
|
3090
3090
|
children: [
|
|
3091
|
-
_t ? /* @__PURE__ */ n(Fe, { className: "h-3 w-3 animate-spin" }) : S.advisory ? /* @__PURE__ */ n(Ae, {}) :
|
|
3091
|
+
_t ? /* @__PURE__ */ n(Fe, { className: "h-3 w-3 animate-spin" }) : S.advisory ? /* @__PURE__ */ n(Ae, {}) : q && /* @__PURE__ */ n(un, { className: "h-3 w-3", "aria-hidden": !0 }),
|
|
3092
3092
|
d
|
|
3093
3093
|
]
|
|
3094
3094
|
},
|
|
@@ -3249,16 +3249,16 @@ function La({
|
|
|
3249
3249
|
}
|
|
3250
3250
|
}
|
|
3251
3251
|
),
|
|
3252
|
-
|
|
3252
|
+
P && !R && /* @__PURE__ */ n(
|
|
3253
3253
|
dr,
|
|
3254
3254
|
{
|
|
3255
3255
|
collection: e,
|
|
3256
3256
|
item: String(t),
|
|
3257
|
-
offer:
|
|
3257
|
+
offer: P,
|
|
3258
3258
|
className: "absolute right-0 top-full z-50 mt-1 shadow-lg",
|
|
3259
3259
|
style: G,
|
|
3260
3260
|
onDismiss: () => V(null),
|
|
3261
|
-
onFixed: () => v({ transition_id:
|
|
3261
|
+
onFixed: () => v({ transition_id: P.transitionId, comment: P.comment })
|
|
3262
3262
|
}
|
|
3263
3263
|
),
|
|
3264
3264
|
k && /* @__PURE__ */ n(hn, { fallback: null, children: /* @__PURE__ */ n(
|
|
@@ -118,7 +118,14 @@ const h = {
|
|
|
118
118
|
RENDER_BUSY: "Rendering is busy. Try again in a minute.",
|
|
119
119
|
HELP_VIDEO_PROCESSING: "The video is still being prepared. Try again in a few minutes.",
|
|
120
120
|
HELP_VIDEO_AUTHOR_ONLY: "Only video authors can do this. Ask an administrator to add you.",
|
|
121
|
-
CHAOS_GATE: "Fault drills are turned off on this instance."
|
|
121
|
+
CHAOS_GATE: "Fault drills are turned off on this instance.",
|
|
122
|
+
IMPORTS_NOT_ON_SHARED: "Ask whoever runs the shared deployment when staged imports will be available here.",
|
|
123
|
+
SCHEDULE_IS_DEPLOYMENT_WIDE: "This job is set for every app on the shared deployment. Ask whoever runs the deployment to change or run it.",
|
|
124
|
+
// A Nivaro Hub app that moved, is being updated or is not ready yet (never "the server is busy").
|
|
125
|
+
APP_MOVED: "Reload the page to reach the app at its new home.",
|
|
126
|
+
APP_STATE_UNKNOWN: "The app cannot confirm where it runs right now. Try again in a minute.",
|
|
127
|
+
APP_MAINTENANCE: "The app is being updated. Try again in a few minutes.",
|
|
128
|
+
APP_NOT_READY: "The app is still getting ready. Try again in a few minutes."
|
|
122
129
|
}, i = {
|
|
123
130
|
400: "Check what was entered, then try again.",
|
|
124
131
|
401: "Sign in again, then try once more.",
|