@nivaro/react 0.3.116 → 0.3.118
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 +140 -14
- package/dist/index.js +488 -485
- package/dist/shared/components/ActivityEntry.js +130 -125
- package/dist/shared/components/AgentPresenceChip.js +36 -26
- package/dist/shared/components/CellCopyLayer.js +50 -45
- package/dist/shared/components/CollectionBrowserView.js +3855 -3785
- package/dist/shared/components/FilePreviewLightbox.js +96 -58
- package/dist/shared/components/InStep.js +18 -17
- package/dist/shared/components/ItemEditForm.js +4220 -4175
- package/dist/shared/components/JobsTray.js +8 -8
- package/dist/shared/components/LiveNewMatchesPill.js +21 -14
- package/dist/shared/components/LiveOffNote.js +3 -2
- package/dist/shared/components/LiveRowMark.js +53 -23
- package/dist/shared/components/LiveTraceView.js +162 -123
- package/dist/shared/components/MyWorkView.js +320 -299
- package/dist/shared/components/NotificationBell.js +14 -14
- package/dist/shared/components/OverflowRail.js +1 -1
- package/dist/shared/components/PageRenderer.js +120 -116
- package/dist/shared/components/ProfileView.js +203 -202
- package/dist/shared/components/RealtimeStatusBanner.js +31 -29
- package/dist/shared/components/RecordDrilldownSheet.js +7 -7
- package/dist/shared/components/RecordHoverCard.js +102 -84
- package/dist/shared/components/RecordReadView.js +146 -146
- package/dist/shared/components/ReportView.js +1086 -1091
- package/dist/shared/components/ScreenRefreshButton.js +34 -32
- package/dist/shared/components/TipLayer.js +65 -58
- package/dist/shared/components/WidgetImageMenu.js +83 -43
- package/dist/shared/components/activity/RecordActivityStream.js +175 -173
- package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
- package/dist/shared/components/cbv/column-totals.js +62 -57
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
- package/dist/shared/components/charts/category-axis.js +93 -0
- package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
- package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
- package/dist/shared/components/collections-directory/page-model.js +72 -67
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
- package/dist/shared/components/integrations/SendStatus.js +65 -59
- package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
- package/dist/shared/components/integrations/console/SignalCard.js +237 -230
- package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +131 -92
- package/dist/shared/components/item-edit/CloneDialog.js +191 -161
- package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
- package/dist/shared/components/item-edit/FieldComments.js +54 -53
- package/dist/shared/components/item-edit/FieldPointer.js +82 -67
- package/dist/shared/components/item-edit/FieldRow.js +106 -100
- package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
- package/dist/shared/components/item-edit/FilePickerField.js +452 -387
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
- package/dist/shared/components/item-edit/HeaderTools.js +94 -85
- package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
- package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
- package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
- package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
- package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
- package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
- package/dist/shared/components/item-edit/RecalcValue.js +57 -32
- package/dist/shared/components/item-edit/RecordHelpChip.js +21 -22
- package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
- package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
- package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
- package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
- package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
- package/dist/shared/components/item-edit/SectionPresence.js +18 -10
- package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
- package/dist/shared/components/item-edit/UserChip.js +1 -1
- package/dist/shared/components/item-edit/file-live.js +69 -54
- package/dist/shared/components/item-edit/layout-switch.js +98 -89
- package/dist/shared/components/item-edit/partner-needs.js +12 -12
- package/dist/shared/components/item-edit/removed-line.js +31 -25
- package/dist/shared/components/layout-editor/pickers/field-picker.js +112 -104
- package/dist/shared/components/list/ListViewers.js +46 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
- package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
- package/dist/shared/components/panels/AlertBanners.js +82 -72
- package/dist/shared/components/panels/BranchLanes.js +22 -22
- package/dist/shared/components/panels/CommentImages.js +123 -102
- package/dist/shared/components/panels/CommentPanel.js +186 -185
- package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
- package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
- package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
- package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
- package/dist/shared/components/pipeline/BindingStartStateSettings.js +163 -0
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
- package/dist/shared/components/pipeline/PipelineEditorView.js +320 -299
- package/dist/shared/components/profile/AgentNameField.js +107 -81
- package/dist/shared/components/profile/AgentsPanel.js +184 -184
- package/dist/shared/components/profile/PersonAccess.js +599 -495
- package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
- package/dist/shared/components/profile/SignedInDevices.js +17 -17
- package/dist/shared/components/profile/primitives.js +1 -1
- package/dist/shared/components/queue/OwnerAvatars.js +91 -54
- package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
- package/dist/shared/components/queue/QueueWorklist.js +1002 -983
- package/dist/shared/components/support/AssignRules.js +1733 -0
- package/dist/shared/components/support/PersonPick.js +88 -0
- package/dist/shared/components/support/RequestList.js +790 -0
- package/dist/shared/components/support/ScreenShare.js +158 -152
- package/dist/shared/components/support/SupportRequestDialog.js +50 -48
- package/dist/shared/components/support/SupportView.js +140 -246
- package/dist/shared/components/support/TicketDetailSheet.js +82 -75
- package/dist/shared/components/support/TicketSlowScreens.js +9 -9
- package/dist/shared/components/support/assign-rules-text.js +171 -0
- package/dist/shared/components/support/support-list.js +125 -0
- package/dist/shared/components/ui/SimpleSelect.js +28 -20
- package/dist/shared/components/ui/checkbox.js +6 -6
- package/dist/shared/components/ui/select.js +43 -39
- package/dist/shared/components/ui/sheet.js +9 -9
- package/dist/shared/components/ui/switch.js +12 -11
- package/dist/shared/components/watch-list/WatchDock.js +532 -459
- package/dist/shared/components/watch-list/WatchExtras.js +332 -286
- package/dist/shared/components/watch-list/WatchRows.js +164 -140
- package/dist/shared/lib/activity-sentence.js +103 -91
- package/dist/shared/lib/agent-presence.js +27 -21
- package/dist/shared/lib/approval-progress.js +2 -2
- package/dist/shared/lib/copy-rules.js +31 -24
- package/dist/shared/lib/derived-causes.js +113 -78
- package/dist/shared/lib/grid-cursors.js +26 -26
- package/dist/shared/lib/label-flash.js +27 -0
- package/dist/shared/lib/list-return.js +137 -125
- package/dist/shared/lib/live-deltas.js +40 -34
- package/dist/shared/lib/live-groups.js +56 -52
- package/dist/shared/lib/live-preference.js +64 -59
- package/dist/shared/lib/live-screen.js +223 -192
- package/dist/shared/lib/partner-failure.js +11 -11
- package/dist/shared/lib/rollup-recalc.js +68 -64
- package/dist/shared/lib/screen-refresh.js +74 -68
- package/dist/shared/lib/screen-share.js +108 -104
- package/dist/shared/lib/send-status.js +77 -61
- package/dist/shared/lib/text-diff-window.js +29 -0
- package/dist/shared/lib/use-query-entry.js +17 -0
- package/dist/shared/lib/watch-list.js +210 -209
- package/dist/shared/lib/widget-image-render.js +72 -49
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
-
import { useSensors as Jt, useSensor as
|
|
3
|
-
import { sortableKeyboardCoordinates as ea, SortableContext as
|
|
2
|
+
import { useSensors as Jt, useSensor as tt, PointerSensor as Xt, KeyboardSensor as Zt, DndContext as Ie, closestCenter as Je } from "@dnd-kit/core";
|
|
3
|
+
import { sortableKeyboardCoordinates as ea, SortableContext as Xe, verticalListSortingStrategy as Ze, arrayMove as et, useSortable as ft } from "@dnd-kit/sortable";
|
|
4
4
|
import { CSS as gt } from "@dnd-kit/utilities";
|
|
5
5
|
import { useMutation as M, useQueryClient as _e, useQuery as V } from "@tanstack/react-query";
|
|
6
6
|
import { X as Ne, ArrowLeft as Ra, Check as we, Pencil as Le, Download as Ta, Plus as ve, Trash2 as Se, ArrowRight as ta, Zap as Pa, PlugZap as Aa, Filter as bt, Link2 as Kt, LayoutGrid as La, Link2Off as Da, ListChecks as aa, Loader2 as ke, GripVertical as yt, Settings as ja, GitFork as Ma, ChevronDown as Oe, Search as vt, History as Ka, ChevronRight as Nt, ExternalLink as za } from "lucide-react";
|
|
@@ -15,7 +15,7 @@ import { toastError as zt } from "../../lib/error-toast.js";
|
|
|
15
15
|
import { useLiveFade as Ga } from "../../lib/live-screen.js";
|
|
16
16
|
import { queryKeys as ze } from "../../lib/query-keys.js";
|
|
17
17
|
import { useStateCensus as ra, censusByState as Ya, oldestHint as Ia, stateListPath as Ja } from "../../lib/state-census.js";
|
|
18
|
-
import { cn as J, formatRelative as Xa, titleCase as
|
|
18
|
+
import { cn as J, formatRelative as Xa, titleCase as nt } from "../../lib/utils.js";
|
|
19
19
|
import { ExplainCard as Za } from "../ai/ExplainButton.js";
|
|
20
20
|
import { ConfigChangeStrip as es } from "../ConfigChangeStrip.js";
|
|
21
21
|
import { ConfigHistoryButton as ts } from "../ConfigHistory.js";
|
|
@@ -35,16 +35,17 @@ import { Select as ls, SelectTrigger as is, SelectValue as os, SelectContent as
|
|
|
35
35
|
import { Skeleton as je } from "../ui/skeleton.js";
|
|
36
36
|
import { Switch as Ee } from "../ui/switch.js";
|
|
37
37
|
import { Textarea as ia } from "../ui/textarea.js";
|
|
38
|
+
import { BindingStartStateSettings as ms } from "./BindingStartStateSettings.js";
|
|
38
39
|
import { FieldPicker as xt } from "./FieldPicker.js";
|
|
39
|
-
import { OwnerMatrix as
|
|
40
|
-
import { OwnerMatrixSheetActions as
|
|
41
|
-
import { OwnerMatrixVersionsCard as
|
|
42
|
-
import { TemplateLintCard as
|
|
43
|
-
import { PipelineSkipCriteria as
|
|
44
|
-
import { PipelineStateOwners as
|
|
45
|
-
import { findM2ORelation as
|
|
46
|
-
import { TeamsView as
|
|
47
|
-
import { useScopeDimensions as
|
|
40
|
+
import { OwnerMatrix as ps } from "./OwnerMatrix.js";
|
|
41
|
+
import { OwnerMatrixSheetActions as us } from "./OwnerMatrixSheet.js";
|
|
42
|
+
import { OwnerMatrixVersionsCard as hs } from "./OwnerMatrixVersionsCard.js";
|
|
43
|
+
import { TemplateLintCard as xs, SkipReportCard as fs } from "./PipelineHealthCards.js";
|
|
44
|
+
import { PipelineSkipCriteria as gs } from "./PipelineSkipCriteria.js";
|
|
45
|
+
import { PipelineStateOwners as bs } from "./PipelineStateOwners.js";
|
|
46
|
+
import { findM2ORelation as ys, extractTemplateFields as vs, renderDisplayTemplate as mt } from "./relations.js";
|
|
47
|
+
import { TeamsView as Ns } from "./TeamsView.js";
|
|
48
|
+
import { useScopeDimensions as ws, rankTeamForFilters as ks, tierOrder as Ut } from "./teamScopes.js";
|
|
48
49
|
const oa = "rgb(var(--nvr-cyan-rgb, 0 206 255))", Me = "rounded bg-red-50 px-1.5 text-[11px] font-semibold text-red-700 hover:text-red-700 dark:bg-red-500/10 dark:text-red-400";
|
|
49
50
|
function he({
|
|
50
51
|
value: a,
|
|
@@ -142,7 +143,7 @@ function he({
|
|
|
142
143
|
] })
|
|
143
144
|
] });
|
|
144
145
|
}
|
|
145
|
-
function
|
|
146
|
+
function _s({
|
|
146
147
|
values: a,
|
|
147
148
|
onChange: n,
|
|
148
149
|
options: o,
|
|
@@ -227,7 +228,7 @@ function ks({
|
|
|
227
228
|
] })
|
|
228
229
|
] });
|
|
229
230
|
}
|
|
230
|
-
const
|
|
231
|
+
const Cs = [
|
|
231
232
|
"#6b7280",
|
|
232
233
|
"#ef4444",
|
|
233
234
|
"#f97316",
|
|
@@ -238,7 +239,7 @@ const _s = [
|
|
|
238
239
|
"#8b5cf6",
|
|
239
240
|
"#ec4899"
|
|
240
241
|
];
|
|
241
|
-
function
|
|
242
|
+
function at({
|
|
242
243
|
value: a,
|
|
243
244
|
onChange: n
|
|
244
245
|
}) {
|
|
@@ -255,7 +256,7 @@ function tt({
|
|
|
255
256
|
title: "No color"
|
|
256
257
|
}
|
|
257
258
|
),
|
|
258
|
-
|
|
259
|
+
Cs.map((o) => /* @__PURE__ */ e(
|
|
259
260
|
"button",
|
|
260
261
|
{
|
|
261
262
|
type: "button",
|
|
@@ -358,7 +359,7 @@ function Wt({
|
|
|
358
359
|
] }),
|
|
359
360
|
/* @__PURE__ */ t("div", { className: "space-y-1.5", children: [
|
|
360
361
|
/* @__PURE__ */ e(H, { className: "text-[12px]", children: "Color" }),
|
|
361
|
-
/* @__PURE__ */ e(
|
|
362
|
+
/* @__PURE__ */ e(at, { value: m.color, onChange: (l) => p("color", l) })
|
|
362
363
|
] }),
|
|
363
364
|
/* @__PURE__ */ t("div", { className: "space-y-1.5", children: [
|
|
364
365
|
/* @__PURE__ */ e(H, { className: "text-[12px]", children: "Help text" }),
|
|
@@ -548,10 +549,10 @@ function Yt() {
|
|
|
548
549
|
}
|
|
549
550
|
);
|
|
550
551
|
}
|
|
551
|
-
function
|
|
552
|
+
function Ss(a) {
|
|
552
553
|
return a ? Array.isArray(a) ? a.map(String).filter(Boolean) : typeof a == "string" && a.trim() ? [a] : [] : [];
|
|
553
554
|
}
|
|
554
|
-
function
|
|
555
|
+
function qs({
|
|
555
556
|
relatedCollection: a,
|
|
556
557
|
value: n,
|
|
557
558
|
onChange: o
|
|
@@ -559,22 +560,22 @@ function Ss({
|
|
|
559
560
|
const f = Z(), [i, m] = $(!1), [d, p] = $(""), l = Ke(null);
|
|
560
561
|
ue(() => {
|
|
561
562
|
i ? setTimeout(() => {
|
|
562
|
-
var
|
|
563
|
-
return (
|
|
563
|
+
var R;
|
|
564
|
+
return (R = l.current) == null ? void 0 : R.focus();
|
|
564
565
|
}, 50) : p("");
|
|
565
566
|
}, [i]);
|
|
566
567
|
const { data: v } = V({
|
|
567
568
|
queryKey: ze.collectionMeta(a),
|
|
568
|
-
queryFn: () => f.request(G(`/collections/${a}`)).then((
|
|
569
|
+
queryFn: () => f.request(G(`/collections/${a}`)).then((R) => R.data),
|
|
569
570
|
staleTime: 6e4,
|
|
570
571
|
enabled: !!a
|
|
571
|
-
}), h = ((v == null ? void 0 : v.fields) ?? []).map((
|
|
572
|
-
.../* @__PURE__ */ new Set(["id", ...
|
|
573
|
-
], g = h.length ? x.filter((
|
|
572
|
+
}), h = ((v == null ? void 0 : v.fields) ?? []).map((R) => R.field), u = (v == null ? void 0 : v.display_template) ?? null, y = ["name", "title", "label", "display_name", "subject", "email", "slug"], x = [
|
|
573
|
+
.../* @__PURE__ */ new Set(["id", ...vs(u), ...y])
|
|
574
|
+
], g = h.length ? x.filter((R) => R === "id" || h.includes(R)).join(",") : "id", { data: C, isLoading: r, isError: w } = V({
|
|
574
575
|
queryKey: ["relation-picker-items", a, g],
|
|
575
576
|
queryFn: () => f.request(
|
|
576
577
|
G(`/items/${a}`, { limit: 200, fields: g })
|
|
577
|
-
).then((
|
|
578
|
+
).then((R) => R.data),
|
|
578
579
|
staleTime: 3e4,
|
|
579
580
|
// Fetch when dropdown opens OR when there are existing values to resolve labels
|
|
580
581
|
enabled: (i || n.length > 0) && !!h.length,
|
|
@@ -587,23 +588,23 @@ function Ss({
|
|
|
587
588
|
{
|
|
588
589
|
type: "text",
|
|
589
590
|
value: n.join(", "),
|
|
590
|
-
onChange: (
|
|
591
|
-
|
|
591
|
+
onChange: (R) => o(
|
|
592
|
+
R.target.value.split(",").map((b) => b.trim()).filter(Boolean)
|
|
592
593
|
),
|
|
593
594
|
placeholder: "Value (comma-separated)",
|
|
594
595
|
className: "h-8 text-[12px]"
|
|
595
596
|
}
|
|
596
597
|
);
|
|
597
598
|
const N = C ?? [];
|
|
598
|
-
function S(
|
|
599
|
-
const b = N.find((c) => String(c.id) ===
|
|
600
|
-
return b ? mt(u, b) :
|
|
599
|
+
function S(R) {
|
|
600
|
+
const b = N.find((c) => String(c.id) === R);
|
|
601
|
+
return b ? mt(u, b) : R;
|
|
601
602
|
}
|
|
602
|
-
function
|
|
603
|
-
o(n.includes(
|
|
603
|
+
function L(R) {
|
|
604
|
+
o(n.includes(R) ? n.filter((b) => b !== R) : [...n, R]);
|
|
604
605
|
}
|
|
605
606
|
const D = d ? N.filter(
|
|
606
|
-
(
|
|
607
|
+
(R) => mt(u, R).toLowerCase().includes(d.toLowerCase())
|
|
607
608
|
) : N;
|
|
608
609
|
return /* @__PURE__ */ t(Be, { open: i, onOpenChange: m, children: [
|
|
609
610
|
/* @__PURE__ */ e("div", { className: "relative w-full", children: /* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ t(
|
|
@@ -615,22 +616,22 @@ function Ss({
|
|
|
615
616
|
n.length === 0 ? /* @__PURE__ */ e("span", { className: "text-[12px] text-slate-400 px-0.5", children: "Select…" }) : r ? /* @__PURE__ */ t("span", { className: "flex items-center gap-1 text-[12px] text-slate-400", children: [
|
|
616
617
|
/* @__PURE__ */ e(ke, { className: "h-3 w-3 animate-spin" }),
|
|
617
618
|
"Loading…"
|
|
618
|
-
] }) : n.map((
|
|
619
|
+
] }) : n.map((R) => /* @__PURE__ */ t(
|
|
619
620
|
"span",
|
|
620
621
|
{
|
|
621
622
|
className: "inline-flex items-center gap-1 rounded-full bg-nvr-cyan/10 px-2 py-0.5 text-[11px] font-medium text-nvr-navy dark:bg-nvr-cyan/15 dark:text-nvr-cyan",
|
|
622
623
|
children: [
|
|
623
|
-
S(
|
|
624
|
+
S(R),
|
|
624
625
|
/* @__PURE__ */ e(
|
|
625
626
|
"span",
|
|
626
627
|
{
|
|
627
628
|
role: "button",
|
|
628
629
|
tabIndex: 0,
|
|
629
630
|
onClick: (b) => {
|
|
630
|
-
b.stopPropagation(),
|
|
631
|
+
b.stopPropagation(), L(R);
|
|
631
632
|
},
|
|
632
633
|
onKeyDown: (b) => {
|
|
633
|
-
(b.key === "Enter" || b.key === " ") && (b.stopPropagation(),
|
|
634
|
+
(b.key === "Enter" || b.key === " ") && (b.stopPropagation(), L(R));
|
|
634
635
|
},
|
|
635
636
|
className: "cursor-pointer text-nvr-navy/50 hover:text-red-500 dark:text-nvr-cyan/60",
|
|
636
637
|
children: "×"
|
|
@@ -638,7 +639,7 @@ function Ss({
|
|
|
638
639
|
)
|
|
639
640
|
]
|
|
640
641
|
},
|
|
641
|
-
|
|
642
|
+
R
|
|
642
643
|
)),
|
|
643
644
|
/* @__PURE__ */ e(Oe, { className: "ml-auto h-3.5 w-3.5 shrink-0 text-slate-400" })
|
|
644
645
|
]
|
|
@@ -652,7 +653,7 @@ function Ss({
|
|
|
652
653
|
{
|
|
653
654
|
ref: l,
|
|
654
655
|
value: d,
|
|
655
|
-
onChange: (
|
|
656
|
+
onChange: (R) => p(R.target.value),
|
|
656
657
|
placeholder: "Search…",
|
|
657
658
|
className: "h-7 w-full rounded-md bg-slate-50 pl-7 pr-2 text-[12px] placeholder-slate-400 focus:outline-none focus:ring-1 focus:ring-nvr-cyan/40"
|
|
658
659
|
}
|
|
@@ -661,13 +662,13 @@ function Ss({
|
|
|
661
662
|
/* @__PURE__ */ e("div", { className: "max-h-56 overflow-y-auto py-1", children: r ? /* @__PURE__ */ t("div", { className: "flex items-center gap-2 px-3 py-2 text-[12px] text-slate-400", children: [
|
|
662
663
|
/* @__PURE__ */ e(ke, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
663
664
|
"Loading…"
|
|
664
|
-
] }) : D.length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-2 text-[12px] text-slate-400", children: "No results" }) : D.map((
|
|
665
|
-
const b = mt(u,
|
|
665
|
+
] }) : D.length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-2 text-[12px] text-slate-400", children: "No results" }) : D.map((R) => {
|
|
666
|
+
const b = mt(u, R), c = String(R.id), k = n.includes(c);
|
|
666
667
|
return /* @__PURE__ */ t(
|
|
667
668
|
"button",
|
|
668
669
|
{
|
|
669
670
|
type: "button",
|
|
670
|
-
onClick: () =>
|
|
671
|
+
onClick: () => L(c),
|
|
671
672
|
className: `flex w-full items-center gap-2 px-3 py-1.5 text-[12px] hover:bg-slate-50 ${k ? "font-medium text-slate-800" : "text-slate-600"}`,
|
|
672
673
|
children: [
|
|
673
674
|
/* @__PURE__ */ e(
|
|
@@ -685,7 +686,7 @@ function Ss({
|
|
|
685
686
|
] })
|
|
686
687
|
] });
|
|
687
688
|
}
|
|
688
|
-
const
|
|
689
|
+
const $s = [
|
|
689
690
|
{ value: "eq", label: "equals" },
|
|
690
691
|
{ value: "neq", label: "not equals" },
|
|
691
692
|
{ value: "gt", label: "greater than" },
|
|
@@ -695,8 +696,8 @@ const qs = [
|
|
|
695
696
|
{ value: "contains", label: "contains" },
|
|
696
697
|
{ value: "null", label: "is empty" },
|
|
697
698
|
{ value: "nnull", label: "is not empty" }
|
|
698
|
-
],
|
|
699
|
-
function
|
|
699
|
+
], Fs = /* @__PURE__ */ new Set(["integer", "bigInteger", "float", "decimal", "number"]), Es = /* @__PURE__ */ new Set(["date", "dateTime", "datetime", "timestamp"]), Os = /* @__PURE__ */ new Set(["boolean"]);
|
|
700
|
+
function Rs({
|
|
700
701
|
rules: a,
|
|
701
702
|
onChange: n,
|
|
702
703
|
collection: o
|
|
@@ -714,7 +715,7 @@ function Os({
|
|
|
714
715
|
if (!r.includes(".")) {
|
|
715
716
|
const w = v.find((N) => N.field === r);
|
|
716
717
|
if (w) {
|
|
717
|
-
const N =
|
|
718
|
+
const N = ys(h, o ?? "", r);
|
|
718
719
|
return { type: w.type, relatedCollection: (N == null ? void 0 : N.one_collection) ?? void 0 };
|
|
719
720
|
}
|
|
720
721
|
}
|
|
@@ -722,7 +723,7 @@ function Os({
|
|
|
722
723
|
}
|
|
723
724
|
const y = (r, w) => n(a.map((N, S) => S === r ? { ...N, ...w } : N)), x = (r) => n(a.filter((w, N) => N !== r));
|
|
724
725
|
function g(r) {
|
|
725
|
-
return r ? r.split(".").map(
|
|
726
|
+
return r ? r.split(".").map(nt).join(" → ") : "";
|
|
726
727
|
}
|
|
727
728
|
return /* @__PURE__ */ t("div", { className: "space-y-2 border-t border-slate-200 pt-3", children: [
|
|
728
729
|
/* @__PURE__ */ t(
|
|
@@ -743,7 +744,7 @@ function Os({
|
|
|
743
744
|
i && /* @__PURE__ */ t("div", { className: "space-y-2", children: [
|
|
744
745
|
/* @__PURE__ */ e("p", { className: "text-[11px] text-slate-400 leading-snug", children: "Transition is only offered when all conditions match the record — use two transitions with opposite conditions to branch." }),
|
|
745
746
|
a.map((r, w) => {
|
|
746
|
-
const N = r.op === "null" || r.op === "nnull", S = u(r.field),
|
|
747
|
+
const N = r.op === "null" || r.op === "nnull", S = u(r.field), L = Fs.has(S.type), D = Es.has(S.type), R = Os.has(S.type), b = !!S.relatedCollection;
|
|
747
748
|
return /* @__PURE__ */ t(
|
|
748
749
|
"div",
|
|
749
750
|
{
|
|
@@ -776,18 +777,18 @@ function Os({
|
|
|
776
777
|
{
|
|
777
778
|
value: r.op,
|
|
778
779
|
onChange: (c) => y(w, { op: c || "eq" }),
|
|
779
|
-
options:
|
|
780
|
+
options: $s.map((c) => ({ value: c.value, label: c.label })),
|
|
780
781
|
placeholder: "Operator…"
|
|
781
782
|
}
|
|
782
783
|
) }),
|
|
783
784
|
!N && /* @__PURE__ */ e("div", { className: "flex-1 min-w-[120px]", children: b ? /* @__PURE__ */ e(
|
|
784
|
-
|
|
785
|
+
qs,
|
|
785
786
|
{
|
|
786
787
|
relatedCollection: S.relatedCollection,
|
|
787
|
-
value:
|
|
788
|
+
value: Ss(r.value),
|
|
788
789
|
onChange: (c) => y(w, { value: c.length === 1 ? c[0] : c })
|
|
789
790
|
}
|
|
790
|
-
) :
|
|
791
|
+
) : R ? /* @__PURE__ */ e(
|
|
791
792
|
he,
|
|
792
793
|
{
|
|
793
794
|
value: String(r.value ?? ""),
|
|
@@ -809,7 +810,7 @@ function Os({
|
|
|
809
810
|
) : /* @__PURE__ */ e(
|
|
810
811
|
W,
|
|
811
812
|
{
|
|
812
|
-
type:
|
|
813
|
+
type: L ? "number" : "text",
|
|
813
814
|
value: String(r.value ?? ""),
|
|
814
815
|
onChange: (c) => y(w, { value: c.target.value }),
|
|
815
816
|
placeholder: "Value",
|
|
@@ -847,7 +848,7 @@ function Os({
|
|
|
847
848
|
] })
|
|
848
849
|
] });
|
|
849
850
|
}
|
|
850
|
-
function
|
|
851
|
+
function Ts({
|
|
851
852
|
requirement: a,
|
|
852
853
|
childRelations: n,
|
|
853
854
|
onChange: o,
|
|
@@ -970,7 +971,7 @@ function Rs({
|
|
|
970
971
|
] })
|
|
971
972
|
] });
|
|
972
973
|
}
|
|
973
|
-
function
|
|
974
|
+
function Ps({
|
|
974
975
|
requirements: a,
|
|
975
976
|
onChange: n,
|
|
976
977
|
collection: o
|
|
@@ -1001,7 +1002,7 @@ function Ts({
|
|
|
1001
1002
|
i && /* @__PURE__ */ t("div", { className: "space-y-2", children: [
|
|
1002
1003
|
/* @__PURE__ */ e("p", { className: "text-[11px] text-slate-400 leading-snug", children: "Block this transition until every row of a child relation has the listed fields filled in. Prompts the user with a fill-in dialog when rows are incomplete." }),
|
|
1003
1004
|
a.map((u, y) => /* @__PURE__ */ e(
|
|
1004
|
-
|
|
1005
|
+
Ts,
|
|
1005
1006
|
{
|
|
1006
1007
|
requirement: u,
|
|
1007
1008
|
childRelations: l,
|
|
@@ -1071,10 +1072,10 @@ function Fe({
|
|
|
1071
1072
|
] });
|
|
1072
1073
|
}
|
|
1073
1074
|
const pt = "__custom__";
|
|
1074
|
-
function
|
|
1075
|
+
function As(a) {
|
|
1075
1076
|
return a.status === "live" ? `Live v${a.published_version ?? "?"}` : a.status === "draft" ? "Draft changes" : "Not published";
|
|
1076
1077
|
}
|
|
1077
|
-
function
|
|
1078
|
+
function Ls({
|
|
1078
1079
|
externalApi: a,
|
|
1079
1080
|
value: n,
|
|
1080
1081
|
onChange: o
|
|
@@ -1093,7 +1094,7 @@ function As({
|
|
|
1093
1094
|
{ value: pt, label: "Custom (inline Liquid)" },
|
|
1094
1095
|
...(d ?? []).map((x) => ({
|
|
1095
1096
|
value: x.key,
|
|
1096
|
-
label: `${x.label} · ${
|
|
1097
|
+
label: `${x.label} · ${As(x)}`
|
|
1097
1098
|
}))
|
|
1098
1099
|
], v = (p ?? []).find((x) => x.name === m || String(x.id) === m), h = v ? String(v.id) : m, u = n ? `/external-apis/${encodeURIComponent(h)}/payloads/${encodeURIComponent(n)}` : null, y = u ? i.consoleUrl ? i.consoleUrl(u) : u : null;
|
|
1099
1100
|
return /* @__PURE__ */ t("div", { className: "space-y-1", children: [
|
|
@@ -1123,7 +1124,7 @@ function As({
|
|
|
1123
1124
|
] })
|
|
1124
1125
|
] });
|
|
1125
1126
|
}
|
|
1126
|
-
function
|
|
1127
|
+
function Ds({
|
|
1127
1128
|
actions: a,
|
|
1128
1129
|
onChange: n
|
|
1129
1130
|
}) {
|
|
@@ -1261,7 +1262,7 @@ function Ls({
|
|
|
1261
1262
|
] })
|
|
1262
1263
|
] }),
|
|
1263
1264
|
d.type === "erp_submit" && /* @__PURE__ */ e(
|
|
1264
|
-
|
|
1265
|
+
Ls,
|
|
1265
1266
|
{
|
|
1266
1267
|
externalApi: String(d.external_api ?? ""),
|
|
1267
1268
|
value: d.payload_template_key,
|
|
@@ -1433,7 +1434,7 @@ function ut({
|
|
|
1433
1434
|
/* @__PURE__ */ e(H, { className: "text-[12px]", children: l.to_previous ? "Fallback state" : `To State${l.to_states.length !== 1 ? "s" : ""}` }),
|
|
1434
1435
|
l.to_previous && /* @__PURE__ */ e("p", { className: "text-[11px] text-slate-400", children: "The real target is the record's previous state — this only applies when history can't answer (the record started in this state, or the prior state was removed)." }),
|
|
1435
1436
|
/* @__PURE__ */ e(
|
|
1436
|
-
|
|
1437
|
+
_s,
|
|
1437
1438
|
{
|
|
1438
1439
|
values: l.to_states,
|
|
1439
1440
|
onChange: (r) => h("to_states", r),
|
|
@@ -1471,10 +1472,10 @@ function ut({
|
|
|
1471
1472
|
] }),
|
|
1472
1473
|
!f && /* @__PURE__ */ t("div", { className: "space-y-1.5", children: [
|
|
1473
1474
|
/* @__PURE__ */ e(H, { className: "text-[12px]", children: "Color" }),
|
|
1474
|
-
/* @__PURE__ */ e(
|
|
1475
|
+
/* @__PURE__ */ e(at, { value: l.color, onChange: (r) => h("color", r) })
|
|
1475
1476
|
] }),
|
|
1476
1477
|
/* @__PURE__ */ e(
|
|
1477
|
-
|
|
1478
|
+
Rs,
|
|
1478
1479
|
{
|
|
1479
1480
|
rules: l.condition_rules ?? [],
|
|
1480
1481
|
onChange: (r) => h("condition_rules", r),
|
|
@@ -1482,7 +1483,7 @@ function ut({
|
|
|
1482
1483
|
}
|
|
1483
1484
|
),
|
|
1484
1485
|
/* @__PURE__ */ e(
|
|
1485
|
-
|
|
1486
|
+
Ps,
|
|
1486
1487
|
{
|
|
1487
1488
|
requirements: l.requirements ?? [],
|
|
1488
1489
|
onChange: (r) => h("requirements", r.length > 0 ? r : null),
|
|
@@ -1490,7 +1491,7 @@ function ut({
|
|
|
1490
1491
|
}
|
|
1491
1492
|
),
|
|
1492
1493
|
/* @__PURE__ */ e(
|
|
1493
|
-
|
|
1494
|
+
Ds,
|
|
1494
1495
|
{
|
|
1495
1496
|
actions: l.actions ?? [],
|
|
1496
1497
|
onChange: (r) => h("actions", r.length > 0 ? r : null)
|
|
@@ -1621,31 +1622,31 @@ function ut({
|
|
|
1621
1622
|
] })
|
|
1622
1623
|
] });
|
|
1623
1624
|
}
|
|
1624
|
-
function
|
|
1625
|
+
function js(a) {
|
|
1625
1626
|
var f, i;
|
|
1626
1627
|
const n = ((f = a.first_name) == null ? void 0 : f[0]) ?? "", o = ((i = a.last_name) == null ? void 0 : i[0]) ?? "";
|
|
1627
1628
|
return (n + o).toUpperCase() || a.email[0].toUpperCase();
|
|
1628
1629
|
}
|
|
1629
|
-
function
|
|
1630
|
+
function Ms(a) {
|
|
1630
1631
|
const n = a.filter((i) => !i.filters || i.filters.length === 0), o = /* @__PURE__ */ new Set(), f = [];
|
|
1631
1632
|
for (const i of n)
|
|
1632
1633
|
for (const m of i.users)
|
|
1633
1634
|
o.has(m.user) || (o.add(m.user), f.push(m));
|
|
1634
1635
|
return f;
|
|
1635
1636
|
}
|
|
1636
|
-
function
|
|
1637
|
+
function Ks(a) {
|
|
1637
1638
|
var i, m, d;
|
|
1638
1639
|
const n = (a.filters ?? []).map((p) => {
|
|
1639
|
-
const l =
|
|
1640
|
+
const l = nt(p.field.split(".").pop() ?? p.field), v = Array.isArray(p.value) ? p.value.join(", ") : String(p.value ?? ""), h = p.op === "_eq" || p.op === "eq" ? "=" : p.op === "_in" || p.op === "in" ? "is" : p.op;
|
|
1640
1641
|
return `${l} ${h} ${v}`.trim();
|
|
1641
1642
|
}).join(" and "), o = a.users.length + (((i = a.teams) == null ? void 0 : i.length) ?? 0), f = o === 0 ? "nobody yet" : `${o} ${o === 1 ? "owner" : "owners"}`;
|
|
1642
1643
|
return `${((m = a.name) == null ? void 0 : m.trim()) || n || "Owner group"}${(d = a.name) != null && d.trim() && n ? ` (${n})` : ""} · ${f}`;
|
|
1643
1644
|
}
|
|
1644
|
-
function
|
|
1645
|
+
function zs(a, n, o) {
|
|
1645
1646
|
const f = a.toLocaleString("en-US"), i = a === 1 ? "group" : "groups";
|
|
1646
1647
|
return o ? n ? `+${f} by ${n}` : `+${f} more ${i}` : n ? `${f} owner ${i} by ${n}` : `${f} owner ${i}`;
|
|
1647
1648
|
}
|
|
1648
|
-
function
|
|
1649
|
+
function Bs({
|
|
1649
1650
|
users: a,
|
|
1650
1651
|
valueGroups: n
|
|
1651
1652
|
}) {
|
|
@@ -1653,9 +1654,9 @@ function zs({
|
|
|
1653
1654
|
if (!a.length && !o) return null;
|
|
1654
1655
|
const f = new Set(
|
|
1655
1656
|
n.flatMap((p) => (p.filters ?? []).map((l) => l.field.split(".").pop() ?? l.field))
|
|
1656
|
-
), i =
|
|
1657
|
+
), i = zs(
|
|
1657
1658
|
o,
|
|
1658
|
-
f.size === 1 ?
|
|
1659
|
+
f.size === 1 ? nt([...f][0]) : null,
|
|
1659
1660
|
a.length > 0
|
|
1660
1661
|
), m = a.slice(0, 4), d = a.length - m.length;
|
|
1661
1662
|
return /* @__PURE__ */ t("div", { className: "flex items-center gap-1.5", children: [
|
|
@@ -1665,7 +1666,7 @@ function zs({
|
|
|
1665
1666
|
{
|
|
1666
1667
|
title: `${p.first_name ?? ""} ${p.last_name ?? ""}`.trim() || p.email,
|
|
1667
1668
|
className: "flex h-5 w-5 items-center justify-center rounded-full border border-white bg-nvr-cyan/20 text-[9px] font-semibold text-[#007a99] dark:border-card dark:bg-nvr-cyan/25 dark:text-nvr-cyan",
|
|
1668
|
-
children:
|
|
1669
|
+
children: js(p)
|
|
1669
1670
|
},
|
|
1670
1671
|
p.user
|
|
1671
1672
|
)),
|
|
@@ -1679,7 +1680,7 @@ function zs({
|
|
|
1679
1680
|
{
|
|
1680
1681
|
"data-owner-value-groups": o,
|
|
1681
1682
|
"data-tip": `Owners for particular records:
|
|
1682
|
-
${n.map(
|
|
1683
|
+
${n.map(Ks).join(`
|
|
1683
1684
|
`)}`,
|
|
1684
1685
|
className: "relative whitespace-nowrap rounded-full bg-slate-100 px-1.5 py-0.5 text-[10.5px] font-medium text-slate-600 dark:bg-muted dark:text-slate-300",
|
|
1685
1686
|
children: [
|
|
@@ -1690,16 +1691,21 @@ ${n.map(Ms).join(`
|
|
|
1690
1691
|
)
|
|
1691
1692
|
] });
|
|
1692
1693
|
}
|
|
1693
|
-
function
|
|
1694
|
+
function Us({
|
|
1694
1695
|
s: a,
|
|
1695
1696
|
census: n,
|
|
1696
1697
|
onOpen: o
|
|
1697
1698
|
}) {
|
|
1698
1699
|
if (n.count === 0)
|
|
1699
1700
|
return /* @__PURE__ */ e("span", { "data-state-census": "0", className: "text-[11.5px] tabular-nums text-slate-400", children: "none now" });
|
|
1700
|
-
const f = n.byCollection.filter((m) => m.count > 0), i =
|
|
1701
|
+
const f = n.byCollection.filter((m) => m.count > 0), i = (
|
|
1702
|
+
// Admin's dark theme repaints bg-white / border-slate-200 / text-slate-600 with !important: the
|
|
1703
|
+
// noun uses the literal slate-600 so its dark step (slate-300) applies, and the dark hover
|
|
1704
|
+
// below carries ! (a hover selector then outranks the repaint).
|
|
1705
|
+
"rounded-md border border-slate-200 bg-white px-2 py-0.5 text-[11.5px] tabular-nums text-[#475569] dark:text-slate-300"
|
|
1706
|
+
);
|
|
1701
1707
|
return /* @__PURE__ */ e("div", { "data-state-census": n.count, className: "flex flex-wrap items-center gap-1", children: f.map((m) => {
|
|
1702
|
-
const d = Ia(m.oldestAt), p = /^nivaro_/.test(m.collection), l = m.collection === "nivaro_addendums" ? "Addendums" :
|
|
1708
|
+
const d = Ia(m.oldestAt), p = /^nivaro_/.test(m.collection), l = m.collection === "nivaro_addendums" ? "Addendums" : nt(m.collection), v = /* @__PURE__ */ t(ye, { children: [
|
|
1703
1709
|
/* @__PURE__ */ e("b", { className: "font-semibold text-slate-800 dark:text-slate-100", children: m.count.toLocaleString("en-US") }),
|
|
1704
1710
|
` ${l}`,
|
|
1705
1711
|
d ? /* @__PURE__ */ t("span", { className: "text-slate-400 dark:text-slate-500", children: [
|
|
@@ -1714,14 +1720,14 @@ function Bs({
|
|
|
1714
1720
|
onClick: () => o(Ja(m.collection, a.key)),
|
|
1715
1721
|
"data-tip": `Open the ${l} sitting in ${a.label}`,
|
|
1716
1722
|
"data-tip-side": "right",
|
|
1717
|
-
className: `${i} transition-colors hover:border-nvr-cyan/50 hover:bg-nvr-cyan/5 hover:text-slate-900 focus-visible:outline focus-visible:outline-2 focus-visible:outline-nvr-cyan dark:hover
|
|
1723
|
+
className: `${i} transition-colors hover:border-nvr-cyan/50 hover:bg-nvr-cyan/5 hover:text-slate-900 focus-visible:outline focus-visible:outline-2 focus-visible:outline-nvr-cyan dark:hover:!border-nvr-cyan/50 dark:hover:!bg-nvr-cyan/10 dark:hover:!text-slate-100`,
|
|
1718
1724
|
children: v
|
|
1719
1725
|
},
|
|
1720
1726
|
m.collection
|
|
1721
1727
|
);
|
|
1722
1728
|
}) });
|
|
1723
1729
|
}
|
|
1724
|
-
function
|
|
1730
|
+
function Qs({
|
|
1725
1731
|
s: a,
|
|
1726
1732
|
groups: n,
|
|
1727
1733
|
expandedStateId: o,
|
|
@@ -1770,11 +1776,11 @@ function Us({
|
|
|
1770
1776
|
a.lock_record && /* @__PURE__ */ e(Ce, { variant: "outline", className: "text-[10px] h-4 px-1", children: "locked" })
|
|
1771
1777
|
] }),
|
|
1772
1778
|
(d || n.length > 0) && /* @__PURE__ */ t("div", { className: "mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1.5 empty:hidden", children: [
|
|
1773
|
-
d && /* @__PURE__ */ e(
|
|
1779
|
+
d && /* @__PURE__ */ e(Us, { s: a, census: d, onOpen: (g) => x.navigate(g) }),
|
|
1774
1780
|
/* @__PURE__ */ e(
|
|
1775
|
-
|
|
1781
|
+
Bs,
|
|
1776
1782
|
{
|
|
1777
|
-
users:
|
|
1783
|
+
users: Ms(n),
|
|
1778
1784
|
valueGroups: n.filter((g) => g.filters && g.filters.length > 0)
|
|
1779
1785
|
}
|
|
1780
1786
|
)
|
|
@@ -1817,7 +1823,7 @@ function Us({
|
|
|
1817
1823
|
}
|
|
1818
1824
|
);
|
|
1819
1825
|
}
|
|
1820
|
-
function
|
|
1826
|
+
function Ws({
|
|
1821
1827
|
d: a,
|
|
1822
1828
|
siblings: n,
|
|
1823
1829
|
onSave: o,
|
|
@@ -1946,7 +1952,7 @@ function Qs({
|
|
|
1946
1952
|
] })
|
|
1947
1953
|
] });
|
|
1948
1954
|
}
|
|
1949
|
-
function
|
|
1955
|
+
function Hs({
|
|
1950
1956
|
d: a,
|
|
1951
1957
|
siblings: n,
|
|
1952
1958
|
onEdit: o,
|
|
@@ -1999,7 +2005,7 @@ function Ws({
|
|
|
1999
2005
|
] }),
|
|
2000
2006
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
2001
2007
|
/* @__PURE__ */ e(
|
|
2002
|
-
|
|
2008
|
+
Ws,
|
|
2003
2009
|
{
|
|
2004
2010
|
d: a,
|
|
2005
2011
|
siblings: n,
|
|
@@ -2033,7 +2039,7 @@ function Ws({
|
|
|
2033
2039
|
}
|
|
2034
2040
|
);
|
|
2035
2041
|
}
|
|
2036
|
-
function
|
|
2042
|
+
function Vs({
|
|
2037
2043
|
binding: a,
|
|
2038
2044
|
templateId: n
|
|
2039
2045
|
}) {
|
|
@@ -2043,8 +2049,8 @@ function Hs({
|
|
|
2043
2049
|
d(i.map((c) => c.id));
|
|
2044
2050
|
}, [i]);
|
|
2045
2051
|
const p = m.map((c) => i.find((k) => k.id === c)).filter(Boolean), l = Jt(
|
|
2046
|
-
|
|
2047
|
-
|
|
2052
|
+
tt(Xt),
|
|
2053
|
+
tt(Zt, { coordinateGetter: ea })
|
|
2048
2054
|
), [v, h] = $(null), [u, y] = $({
|
|
2049
2055
|
field: "",
|
|
2050
2056
|
label: "",
|
|
@@ -2073,7 +2079,7 @@ function Hs({
|
|
|
2073
2079
|
w(), h(null), P.success("Dimension updated");
|
|
2074
2080
|
},
|
|
2075
2081
|
onError: () => P.error("Failed to update dimension")
|
|
2076
|
-
}),
|
|
2082
|
+
}), L = M({
|
|
2077
2083
|
mutationFn: (c) => o.request($e(`/pipelines/dimensions/${c}`)),
|
|
2078
2084
|
onSuccess: () => {
|
|
2079
2085
|
w(), P.success("Dimension deleted");
|
|
@@ -2087,10 +2093,10 @@ function Hs({
|
|
|
2087
2093
|
is_row_axis: c.is_row_axis,
|
|
2088
2094
|
required: c.required
|
|
2089
2095
|
});
|
|
2090
|
-
},
|
|
2096
|
+
}, R = (c) => {
|
|
2091
2097
|
const { active: k, over: E } = c;
|
|
2092
2098
|
if (!E || k.id === E.id) return;
|
|
2093
|
-
const F = m.indexOf(k.id), B = m.indexOf(E.id), j =
|
|
2099
|
+
const F = m.indexOf(k.id), B = m.indexOf(E.id), j = et(m, F, B);
|
|
2094
2100
|
d(j), j.forEach((K, Q) => {
|
|
2095
2101
|
var te;
|
|
2096
2102
|
((te = i.find((ae) => ae.id === K)) == null ? void 0 : te.sort) !== Q && S.mutate({ dimId: K, body: { sort: Q } });
|
|
@@ -2098,7 +2104,7 @@ function Hs({
|
|
|
2098
2104
|
};
|
|
2099
2105
|
return /* @__PURE__ */ t("div", { className: "border-t border-slate-100 bg-slate-50/50 px-4 pt-3 pb-4 space-y-3 rounded-b-lg", children: [
|
|
2100
2106
|
i.length === 0 && /* @__PURE__ */ e("p", { className: "text-[12px] text-slate-400 py-0.5", children: "No dimensions — add one below." }),
|
|
2101
|
-
i.length > 0 && /* @__PURE__ */ e(
|
|
2107
|
+
i.length > 0 && /* @__PURE__ */ e(Ie, { sensors: l, collisionDetection: Je, onDragEnd: R, children: /* @__PURE__ */ e(Xe, { items: m, strategy: Ze, children: /* @__PURE__ */ e("div", { className: "space-y-1.5", children: p.map(
|
|
2102
2108
|
(c) => v === c.id ? /* @__PURE__ */ t(
|
|
2103
2109
|
"div",
|
|
2104
2110
|
{
|
|
@@ -2191,12 +2197,12 @@ function Hs({
|
|
|
2191
2197
|
},
|
|
2192
2198
|
c.id
|
|
2193
2199
|
) : /* @__PURE__ */ e(
|
|
2194
|
-
|
|
2200
|
+
Hs,
|
|
2195
2201
|
{
|
|
2196
2202
|
d: c,
|
|
2197
2203
|
siblings: p,
|
|
2198
2204
|
onEdit: () => D(c),
|
|
2199
|
-
onDelete: () =>
|
|
2205
|
+
onDelete: () => L.mutate(c.id),
|
|
2200
2206
|
onSaveCascade: (k) => S.mutate({
|
|
2201
2207
|
dimId: c.id,
|
|
2202
2208
|
body: { cascade: k }
|
|
@@ -2282,27 +2288,27 @@ function Hs({
|
|
|
2282
2288
|
] })
|
|
2283
2289
|
] });
|
|
2284
2290
|
}
|
|
2285
|
-
function
|
|
2291
|
+
function ir({
|
|
2286
2292
|
templateId: a,
|
|
2287
2293
|
onBack: n,
|
|
2288
2294
|
onExport: o,
|
|
2289
2295
|
hidden: f
|
|
2290
2296
|
}) {
|
|
2291
2297
|
var jt;
|
|
2292
|
-
const i = Z(), m = _e(), d = new Set(f ?? []), [p, l] = $(!1), [v, h] = $(""), [u, y] = $(!1), [x, g] = $(null), [C, r] = $(!1), [w, N] = $(null), [S,
|
|
2298
|
+
const i = Z(), m = _e(), d = new Set(f ?? []), [p, l] = $(!1), [v, h] = $(""), [u, y] = $(!1), [x, g] = $(null), [C, r] = $(!1), [w, N] = $(null), [S, L] = $(null), [D, R] = $(
|
|
2293
2299
|
null
|
|
2294
2300
|
), [b, c] = $(""), [k, E] = $(""), [F, B] = $(null), [j, K] = $(!1), [Q, te] = $([]), ae = Jt(
|
|
2295
|
-
|
|
2296
|
-
|
|
2301
|
+
tt(Xt),
|
|
2302
|
+
tt(Zt, { coordinateGetter: ea })
|
|
2297
2303
|
), { data: ce } = V({
|
|
2298
2304
|
queryKey: ["collection-fields", b],
|
|
2299
2305
|
queryFn: () => i.request(G(`/collections/${b}`)).then((s) => {
|
|
2300
2306
|
var _;
|
|
2301
|
-
return (((_ = s.data) == null ? void 0 : _.fields) ?? []).filter((
|
|
2307
|
+
return (((_ = s.data) == null ? void 0 : _.fields) ?? []).filter((O) => !O.hidden);
|
|
2302
2308
|
}),
|
|
2303
2309
|
enabled: !!b
|
|
2304
|
-
}), [de,
|
|
2305
|
-
data:
|
|
2310
|
+
}), [de, rt] = $(null), {
|
|
2311
|
+
data: A,
|
|
2306
2312
|
isLoading: We,
|
|
2307
2313
|
isError: U,
|
|
2308
2314
|
error: X,
|
|
@@ -2313,38 +2319,38 @@ function rr({
|
|
|
2313
2319
|
enabled: !!a
|
|
2314
2320
|
}), [pe, wt] = $([]), [He, kt] = $({});
|
|
2315
2321
|
ue(() => {
|
|
2316
|
-
const s = (
|
|
2322
|
+
const s = (A == null ? void 0 : A.states) ?? [];
|
|
2317
2323
|
te(s.map((_) => _.id));
|
|
2318
|
-
}, [
|
|
2319
|
-
const s = Vt((
|
|
2324
|
+
}, [A == null ? void 0 : A.states]), ue(() => {
|
|
2325
|
+
const s = Vt((A == null ? void 0 : A.transitions) ?? []);
|
|
2320
2326
|
wt(s.map((_) => _.label)), kt(
|
|
2321
|
-
Object.fromEntries(s.map((_) => [_.label, _.routes.map((
|
|
2327
|
+
Object.fromEntries(s.map((_) => [_.label, _.routes.map((O) => O.ids[0])]))
|
|
2322
2328
|
);
|
|
2323
|
-
}, [
|
|
2329
|
+
}, [A == null ? void 0 : A.transitions]);
|
|
2324
2330
|
const { data: ha } = V({
|
|
2325
2331
|
queryKey: ["collections", "tables_only"],
|
|
2326
2332
|
queryFn: () => i.request(G("/collections?tables_only=true")).then((s) => s.data)
|
|
2327
|
-
}), { data:
|
|
2333
|
+
}), { data: lt } = V({
|
|
2328
2334
|
queryKey: ["pipeline-all-owner-groups", a],
|
|
2329
2335
|
queryFn: () => i.request(G(`/pipelines/${a}/owner-groups`)).then((s) => s.data),
|
|
2330
2336
|
enabled: !!a
|
|
2331
2337
|
}), xa = ht(
|
|
2332
|
-
() => ((
|
|
2333
|
-
[
|
|
2338
|
+
() => ((A == null ? void 0 : A.bindings) ?? []).map((s) => s.collection),
|
|
2339
|
+
[A == null ? void 0 : A.bindings]
|
|
2334
2340
|
), { data: Re, dataUpdatedAt: fa } = ra(
|
|
2335
2341
|
a,
|
|
2336
2342
|
xa
|
|
2337
2343
|
), ga = ht(
|
|
2338
2344
|
() => Ya(
|
|
2339
2345
|
(Re == null ? void 0 : Re.data) ?? [],
|
|
2340
|
-
((
|
|
2346
|
+
((A == null ? void 0 : A.states) ?? []).map((s) => s.id)
|
|
2341
2347
|
),
|
|
2342
|
-
[Re,
|
|
2348
|
+
[Re, A == null ? void 0 : A.states]
|
|
2343
2349
|
), ba = Ga(fa), se = () => {
|
|
2344
2350
|
m.invalidateQueries({ queryKey: ["pipeline-template", a] }), m.invalidateQueries({ queryKey: ["pipeline-templates"] }), m.invalidateQueries({ queryKey: ["pipeline-all-owner-groups", a] });
|
|
2345
2351
|
}, ya = sa(Qa), { change: _t, clear: Ct } = Va("pipeline", a, {
|
|
2346
2352
|
meId: ya.userId || null
|
|
2347
|
-
}), va = p || u || !!x || C || !!w || !!D,
|
|
2353
|
+
}), va = p || u || !!x || C || !!w || !!D, it = M({
|
|
2348
2354
|
mutationFn: (s) => i.request(be(`/pipelines/${a}`, s)),
|
|
2349
2355
|
onSuccess: () => {
|
|
2350
2356
|
se(), l(!1);
|
|
@@ -2356,7 +2362,7 @@ function rr({
|
|
|
2356
2362
|
se(), y(!1);
|
|
2357
2363
|
},
|
|
2358
2364
|
onError: () => P.error("Failed to add state")
|
|
2359
|
-
}),
|
|
2365
|
+
}), ot = M({
|
|
2360
2366
|
mutationFn: ({ stateId: s, body: _ }) => i.request(be(`/pipelines/states/${s}`, _)),
|
|
2361
2367
|
onSuccess: () => {
|
|
2362
2368
|
se(), g(null);
|
|
@@ -2368,8 +2374,8 @@ function rr({
|
|
|
2368
2374
|
se(), P.success("State deleted");
|
|
2369
2375
|
},
|
|
2370
2376
|
onError: (s) => {
|
|
2371
|
-
var
|
|
2372
|
-
const _ = ((
|
|
2377
|
+
var O;
|
|
2378
|
+
const _ = ((O = s == null ? void 0 : s.response) == null ? void 0 : O.error) ?? (s == null ? void 0 : s.message);
|
|
2373
2379
|
P.error(_ || "Failed to delete state", { duration: 9e3 });
|
|
2374
2380
|
}
|
|
2375
2381
|
}), qt = M({
|
|
@@ -2392,8 +2398,8 @@ function rr({
|
|
|
2392
2398
|
actions: s.actions,
|
|
2393
2399
|
sort: 0
|
|
2394
2400
|
};
|
|
2395
|
-
for (const
|
|
2396
|
-
await i.request(I(`/pipelines/${a}/transitions`, { ..._, to_state:
|
|
2401
|
+
for (const O of s.to_states)
|
|
2402
|
+
await i.request(I(`/pipelines/${a}/transitions`, { ..._, to_state: O }));
|
|
2397
2403
|
},
|
|
2398
2404
|
onSuccess: () => {
|
|
2399
2405
|
se(), r(!1);
|
|
@@ -2404,7 +2410,7 @@ function rr({
|
|
|
2404
2410
|
labelGroup: s,
|
|
2405
2411
|
data: _
|
|
2406
2412
|
}) => {
|
|
2407
|
-
for (const
|
|
2413
|
+
for (const O of _.to_states)
|
|
2408
2414
|
await i.request(
|
|
2409
2415
|
I(`/pipelines/${a}/transitions`, {
|
|
2410
2416
|
from_state: _.from_state,
|
|
@@ -2422,7 +2428,7 @@ function rr({
|
|
|
2422
2428
|
group_label: null,
|
|
2423
2429
|
actions: _.actions,
|
|
2424
2430
|
sort: Math.max(s.minSort, ...s.routes.map((Y) => Y.minSort)),
|
|
2425
|
-
to_state:
|
|
2431
|
+
to_state: O
|
|
2426
2432
|
})
|
|
2427
2433
|
);
|
|
2428
2434
|
},
|
|
@@ -2432,9 +2438,9 @@ function rr({
|
|
|
2432
2438
|
onError: () => P.error("Failed to add route")
|
|
2433
2439
|
}), Ft = M({
|
|
2434
2440
|
mutationFn: async ({ route: s, data: _ }) => {
|
|
2435
|
-
const
|
|
2441
|
+
const O = /* @__PURE__ */ new Map();
|
|
2436
2442
|
s.to_states.forEach((q, z) => {
|
|
2437
|
-
|
|
2443
|
+
O.set(q, s.ids[z]);
|
|
2438
2444
|
});
|
|
2439
2445
|
const Y = new Set(_.to_states), ee = {
|
|
2440
2446
|
from_state: _.from_state,
|
|
@@ -2453,7 +2459,7 @@ function rr({
|
|
|
2453
2459
|
actions: _.actions
|
|
2454
2460
|
};
|
|
2455
2461
|
for (const q of _.to_states) {
|
|
2456
|
-
const z =
|
|
2462
|
+
const z = O.get(q);
|
|
2457
2463
|
z ? await i.request(be(`/pipelines/transitions/${z}`, { ...ee, to_state: q })) : await i.request(
|
|
2458
2464
|
I(`/pipelines/${a}/transitions`, {
|
|
2459
2465
|
...ee,
|
|
@@ -2463,11 +2469,11 @@ function rr({
|
|
|
2463
2469
|
})
|
|
2464
2470
|
);
|
|
2465
2471
|
}
|
|
2466
|
-
for (const [q, z] of
|
|
2472
|
+
for (const [q, z] of O)
|
|
2467
2473
|
Y.has(q) || await i.request($e(`/pipelines/transitions/${z}`));
|
|
2468
2474
|
},
|
|
2469
2475
|
onSuccess: () => {
|
|
2470
|
-
se(),
|
|
2476
|
+
se(), R(null);
|
|
2471
2477
|
},
|
|
2472
2478
|
onError: (s) => {
|
|
2473
2479
|
zt(s, "Failed to update route");
|
|
@@ -2482,15 +2488,15 @@ function rr({
|
|
|
2482
2488
|
onError: () => P.error("Failed to delete")
|
|
2483
2489
|
}), wa = M({
|
|
2484
2490
|
mutationFn: async (s) => {
|
|
2485
|
-
for (const { id: _, sort:
|
|
2486
|
-
await i.request(be(`/pipelines/transitions/${_}`, { sort:
|
|
2491
|
+
for (const { id: _, sort: O } of s)
|
|
2492
|
+
await i.request(be(`/pipelines/transitions/${_}`, { sort: O }));
|
|
2487
2493
|
},
|
|
2488
2494
|
onSuccess: () => se(),
|
|
2489
2495
|
onError: () => P.error("Failed to reorder")
|
|
2490
2496
|
}), ka = M({
|
|
2491
2497
|
mutationFn: async ({ ids: s, color: _ }) => {
|
|
2492
|
-
for (const
|
|
2493
|
-
await i.request(be(`/pipelines/transitions/${
|
|
2498
|
+
for (const O of s)
|
|
2499
|
+
await i.request(be(`/pipelines/transitions/${O}`, { color: _ }));
|
|
2494
2500
|
},
|
|
2495
2501
|
onSuccess: () => se(),
|
|
2496
2502
|
onError: () => P.error("Failed to update color")
|
|
@@ -2498,10 +2504,10 @@ function rr({
|
|
|
2498
2504
|
mutationFn: async ({
|
|
2499
2505
|
from: s,
|
|
2500
2506
|
label: _,
|
|
2501
|
-
confirmed:
|
|
2507
|
+
confirmed: O
|
|
2502
2508
|
}) => {
|
|
2503
2509
|
var ee, q;
|
|
2504
|
-
if (!
|
|
2510
|
+
if (!O) {
|
|
2505
2511
|
const ne = ((ee = (await i.request(I(`/pipelines/${a}/transitions/rename`, { from: s, to: _, dry_run: !0 }))).data) == null ? void 0 : ee.references) ?? [];
|
|
2506
2512
|
if (ne.length > 0) return { pending: { from: s, to: _, references: ne } };
|
|
2507
2513
|
}
|
|
@@ -2514,9 +2520,9 @@ function rr({
|
|
|
2514
2520
|
Ve(s.pending);
|
|
2515
2521
|
return;
|
|
2516
2522
|
}
|
|
2517
|
-
const
|
|
2518
|
-
se(),
|
|
2519
|
-
|
|
2523
|
+
const O = "done" in s ? s.done.filter((Y) => Y.rewritten).length : 0;
|
|
2524
|
+
se(), L(null), Ve(null), P.success(
|
|
2525
|
+
O ? `Renamed to "${_}" · ${O} reference${O === 1 ? "" : "s"} updated` : `Renamed to "${_}"`
|
|
2520
2526
|
);
|
|
2521
2527
|
},
|
|
2522
2528
|
onError: (s) => {
|
|
@@ -2534,14 +2540,14 @@ function rr({
|
|
|
2534
2540
|
se(), P.success("Collection unbound");
|
|
2535
2541
|
},
|
|
2536
2542
|
onError: () => P.error("Failed to unbind")
|
|
2537
|
-
}),
|
|
2543
|
+
}), Ge = M({
|
|
2538
2544
|
mutationFn: ({
|
|
2539
2545
|
bindingId: s,
|
|
2540
2546
|
body: _
|
|
2541
2547
|
}) => i.request(be(`/pipelines/bindings/${s}`, _)),
|
|
2542
2548
|
onSuccess: () => se(),
|
|
2543
2549
|
onError: () => P.error("Failed to update binding")
|
|
2544
|
-
}), Rt = Ke(!1), Tt = !!
|
|
2550
|
+
}), Rt = Ke(!1), Tt = !!A;
|
|
2545
2551
|
if (ue(() => {
|
|
2546
2552
|
if (!Tt || Rt.current || typeof window > "u" || window.location.hash !== "#owner-matrix") return;
|
|
2547
2553
|
Rt.current = !0;
|
|
@@ -2550,7 +2556,7 @@ function rr({
|
|
|
2550
2556
|
(_ = document.getElementById("owner-matrix")) == null || _.scrollIntoView({ block: "start" });
|
|
2551
2557
|
}, 50);
|
|
2552
2558
|
return () => window.clearTimeout(s);
|
|
2553
|
-
}, [Tt]), U && !
|
|
2559
|
+
}, [Tt]), U && !A)
|
|
2554
2560
|
return /* @__PURE__ */ e(
|
|
2555
2561
|
rs,
|
|
2556
2562
|
{
|
|
@@ -2559,18 +2565,18 @@ function rr({
|
|
|
2559
2565
|
onRetry: () => void me()
|
|
2560
2566
|
}
|
|
2561
2567
|
);
|
|
2562
|
-
if (We || !
|
|
2568
|
+
if (We || !A)
|
|
2563
2569
|
return /* @__PURE__ */ t("div", { className: "p-8 space-y-4", children: [
|
|
2564
2570
|
/* @__PURE__ */ e(je, { className: "h-8 w-64" }),
|
|
2565
2571
|
/* @__PURE__ */ e(je, { className: "h-48 rounded-xl" }),
|
|
2566
2572
|
/* @__PURE__ */ e(je, { className: "h-48 rounded-xl" })
|
|
2567
2573
|
] });
|
|
2568
|
-
const le =
|
|
2569
|
-
function Dt(s, _,
|
|
2574
|
+
const le = A.states ?? [], Pt = A.transitions ?? [], ie = A.bindings ?? [], Pe = [...new Set(ie.map((s) => s.collection))], Ca = ha ?? [], ct = Q.length > 0 ? Q.map((s) => le.find((_) => _.id === s)).filter(Boolean) : le, At = new Map(le.map((s) => [s.id, s])), dt = new Map(Vt(Pt).map((s) => [s.label, s])), Lt = pe.map((s) => dt.get(s)).filter((s) => !!s);
|
|
2575
|
+
function Dt(s, _, O) {
|
|
2570
2576
|
const Y = [];
|
|
2571
2577
|
let ee = 0;
|
|
2572
2578
|
for (const q of s) {
|
|
2573
|
-
const z =
|
|
2579
|
+
const z = O.get(q);
|
|
2574
2580
|
if (z)
|
|
2575
2581
|
for (const ne of _[q] ?? []) {
|
|
2576
2582
|
const fe = z.routes.find((xe) => xe.ids[0] === ne);
|
|
@@ -2583,28 +2589,28 @@ function rr({
|
|
|
2583
2589
|
wa.mutate(Y);
|
|
2584
2590
|
}
|
|
2585
2591
|
function Sa(s) {
|
|
2586
|
-
const { active: _, over:
|
|
2587
|
-
if (!
|
|
2588
|
-
const Y =
|
|
2592
|
+
const { active: _, over: O } = s;
|
|
2593
|
+
if (!O || _.id === O.id) return;
|
|
2594
|
+
const Y = et(
|
|
2589
2595
|
pe,
|
|
2590
2596
|
pe.indexOf(_.id),
|
|
2591
|
-
pe.indexOf(
|
|
2597
|
+
pe.indexOf(O.id)
|
|
2592
2598
|
);
|
|
2593
2599
|
wt(Y), Dt(Y, He, dt);
|
|
2594
2600
|
}
|
|
2595
2601
|
function qa(s, _) {
|
|
2596
|
-
const { active:
|
|
2597
|
-
if (!Y ||
|
|
2598
|
-
const ee = He[s] ?? [], q =
|
|
2602
|
+
const { active: O, over: Y } = _;
|
|
2603
|
+
if (!Y || O.id === Y.id) return;
|
|
2604
|
+
const ee = He[s] ?? [], q = et(ee, ee.indexOf(O.id), ee.indexOf(Y.id)), z = { ...He, [s]: q };
|
|
2599
2605
|
kt(z), Dt(pe, z, dt);
|
|
2600
2606
|
}
|
|
2601
2607
|
const $a = ie.some((s) => (s.dimensions ?? []).length > 0), Fa = new Set(ie.map((s) => s.collection)), Ea = Ca.filter((s) => !Fa.has(s.collection)), Oa = (s) => {
|
|
2602
|
-
const { active: _, over:
|
|
2603
|
-
if (!
|
|
2604
|
-
const Y = Q.indexOf(_.id), ee = Q.indexOf(
|
|
2608
|
+
const { active: _, over: O } = s;
|
|
2609
|
+
if (!O || _.id === O.id) return;
|
|
2610
|
+
const Y = Q.indexOf(_.id), ee = Q.indexOf(O.id), q = et(Q, Y, ee);
|
|
2605
2611
|
te(q), q.forEach((z, ne) => {
|
|
2606
2612
|
var fe;
|
|
2607
|
-
((fe = le.find((xe) => xe.id === z)) == null ? void 0 : fe.sort) !== ne &&
|
|
2613
|
+
((fe = le.find((xe) => xe.id === z)) == null ? void 0 : fe.sort) !== ne && ot.mutate({ stateId: z, body: { sort: ne } });
|
|
2608
2614
|
});
|
|
2609
2615
|
};
|
|
2610
2616
|
return /* @__PURE__ */ t(ye, { children: [
|
|
@@ -2631,7 +2637,7 @@ function rr({
|
|
|
2631
2637
|
{
|
|
2632
2638
|
className: "flex items-center gap-1.5",
|
|
2633
2639
|
onSubmit: (s) => {
|
|
2634
|
-
s.preventDefault(), v.trim() &&
|
|
2640
|
+
s.preventDefault(), v.trim() && it.mutate({ name: v.trim() });
|
|
2635
2641
|
},
|
|
2636
2642
|
children: [
|
|
2637
2643
|
/* @__PURE__ */ e(
|
|
@@ -2663,10 +2669,10 @@ function rr({
|
|
|
2663
2669
|
type: "button",
|
|
2664
2670
|
className: "flex items-center gap-1.5 font-medium text-slate-800 hover:text-slate-600",
|
|
2665
2671
|
onClick: () => {
|
|
2666
|
-
h(
|
|
2672
|
+
h(A.name), l(!0);
|
|
2667
2673
|
},
|
|
2668
2674
|
children: [
|
|
2669
|
-
|
|
2675
|
+
A.name,
|
|
2670
2676
|
/* @__PURE__ */ e(Le, { className: "h-3 w-3 text-slate-400" })
|
|
2671
2677
|
]
|
|
2672
2678
|
}
|
|
@@ -2678,7 +2684,7 @@ function rr({
|
|
|
2678
2684
|
{
|
|
2679
2685
|
collection: "nivaro_workflow_templates",
|
|
2680
2686
|
item: a,
|
|
2681
|
-
title: `History · ${
|
|
2687
|
+
title: `History · ${A.name}`
|
|
2682
2688
|
}
|
|
2683
2689
|
),
|
|
2684
2690
|
o && /* @__PURE__ */ t(
|
|
@@ -2721,12 +2727,12 @@ function rr({
|
|
|
2721
2727
|
/* @__PURE__ */ e(
|
|
2722
2728
|
W,
|
|
2723
2729
|
{
|
|
2724
|
-
defaultValue:
|
|
2730
|
+
defaultValue: A.description ?? "",
|
|
2725
2731
|
placeholder: "What does this pipeline govern?",
|
|
2726
2732
|
className: "text-[13px]",
|
|
2727
2733
|
onBlur: (s) => {
|
|
2728
2734
|
const _ = s.target.value.trim() || null;
|
|
2729
|
-
_ !==
|
|
2735
|
+
_ !== A.description && it.mutate({ description: _ });
|
|
2730
2736
|
}
|
|
2731
2737
|
}
|
|
2732
2738
|
)
|
|
@@ -2734,10 +2740,10 @@ function rr({
|
|
|
2734
2740
|
/* @__PURE__ */ t("div", { className: "shrink-0 space-y-1.5", children: [
|
|
2735
2741
|
/* @__PURE__ */ e(H, { className: "text-[12px]", children: "Accent color" }),
|
|
2736
2742
|
/* @__PURE__ */ e(
|
|
2737
|
-
|
|
2743
|
+
at,
|
|
2738
2744
|
{
|
|
2739
|
-
value:
|
|
2740
|
-
onChange: (s) =>
|
|
2745
|
+
value: A.color,
|
|
2746
|
+
onChange: (s) => it.mutate({ color: s })
|
|
2741
2747
|
}
|
|
2742
2748
|
)
|
|
2743
2749
|
] })
|
|
@@ -2774,29 +2780,29 @@ function rr({
|
|
|
2774
2780
|
] }),
|
|
2775
2781
|
le.length === 0 && !u && /* @__PURE__ */ e("p", { className: "text-[13px] text-slate-400", children: "No states yet. States define the stages a record can be in." }),
|
|
2776
2782
|
/* @__PURE__ */ e(
|
|
2777
|
-
|
|
2783
|
+
Ie,
|
|
2778
2784
|
{
|
|
2779
2785
|
sensors: ae,
|
|
2780
|
-
collisionDetection:
|
|
2786
|
+
collisionDetection: Je,
|
|
2781
2787
|
onDragEnd: Oa,
|
|
2782
|
-
children: /* @__PURE__ */ e(
|
|
2788
|
+
children: /* @__PURE__ */ e(Xe, { items: Q, strategy: Ze, children: /* @__PURE__ */ t("div", { className: "space-y-2", ref: ba, children: [
|
|
2783
2789
|
ct.map((s) => {
|
|
2784
|
-
var _,
|
|
2790
|
+
var _, O;
|
|
2785
2791
|
return /* @__PURE__ */ t("div", { children: [
|
|
2786
2792
|
(x == null ? void 0 : x.id) === s.id ? /* @__PURE__ */ e(
|
|
2787
2793
|
Wt,
|
|
2788
2794
|
{
|
|
2789
2795
|
reach: Pe,
|
|
2790
2796
|
initial: s,
|
|
2791
|
-
saving:
|
|
2792
|
-
onSave: (Y) =>
|
|
2797
|
+
saving: ot.isPending,
|
|
2798
|
+
onSave: (Y) => ot.mutate({ stateId: s.id, body: Y }),
|
|
2793
2799
|
onCancel: () => g(null)
|
|
2794
2800
|
}
|
|
2795
2801
|
) : /* @__PURE__ */ e(
|
|
2796
|
-
|
|
2802
|
+
Qs,
|
|
2797
2803
|
{
|
|
2798
2804
|
s,
|
|
2799
|
-
groups: (
|
|
2805
|
+
groups: (lt == null ? void 0 : lt[s.id]) ?? [],
|
|
2800
2806
|
expandedStateId: F,
|
|
2801
2807
|
onToggleExpand: () => B(F === s.id ? null : s.id),
|
|
2802
2808
|
onEdit: () => g(s),
|
|
@@ -2806,7 +2812,7 @@ function rr({
|
|
|
2806
2812
|
),
|
|
2807
2813
|
F === s.id && (x == null ? void 0 : x.id) !== s.id && /* @__PURE__ */ t("div", { className: "ml-4 mb-2 mt-2 rounded-xl border border-slate-200 bg-slate-50 p-4 space-y-4", children: [
|
|
2808
2814
|
/* @__PURE__ */ e(
|
|
2809
|
-
|
|
2815
|
+
bs,
|
|
2810
2816
|
{
|
|
2811
2817
|
stateId: s.id,
|
|
2812
2818
|
stateName: s.label,
|
|
@@ -2815,13 +2821,13 @@ function rr({
|
|
|
2815
2821
|
}
|
|
2816
2822
|
),
|
|
2817
2823
|
/* @__PURE__ */ e("div", { className: "border-t border-slate-200 pt-4", children: /* @__PURE__ */ e(
|
|
2818
|
-
|
|
2824
|
+
gs,
|
|
2819
2825
|
{
|
|
2820
2826
|
stateId: s.id,
|
|
2821
2827
|
stateName: s.label,
|
|
2822
2828
|
templateId: a,
|
|
2823
2829
|
initialCriteria: s.skip_criteria ?? null,
|
|
2824
|
-
collection: (
|
|
2830
|
+
collection: (O = ie[0]) == null ? void 0 : O.collection
|
|
2825
2831
|
}
|
|
2826
2832
|
) })
|
|
2827
2833
|
] })
|
|
@@ -2866,14 +2872,14 @@ function rr({
|
|
|
2866
2872
|
le.length < 2 && /* @__PURE__ */ e("p", { className: "text-[12px] text-slate-400", children: "Add at least 2 states before defining transitions." }),
|
|
2867
2873
|
/* @__PURE__ */ t("div", { className: "space-y-3", children: [
|
|
2868
2874
|
/* @__PURE__ */ e(
|
|
2869
|
-
|
|
2875
|
+
Ie,
|
|
2870
2876
|
{
|
|
2871
2877
|
sensors: ae,
|
|
2872
|
-
collisionDetection:
|
|
2878
|
+
collisionDetection: Je,
|
|
2873
2879
|
onDragEnd: Sa,
|
|
2874
|
-
children: /* @__PURE__ */ e(
|
|
2880
|
+
children: /* @__PURE__ */ e(Xe, { items: pe, strategy: Ze, children: Lt.map((s) => {
|
|
2875
2881
|
var ee;
|
|
2876
|
-
const _ = new Map(s.routes.map((q) => [q.ids[0], q])),
|
|
2882
|
+
const _ = new Map(s.routes.map((q) => [q.ids[0], q])), O = He[s.label] ?? s.routes.map((q) => q.ids[0]), Y = O.map((q) => _.get(q)).filter((q) => !!q);
|
|
2877
2883
|
return /* @__PURE__ */ e(Gt, { id: s.label, children: /* @__PURE__ */ t("div", { className: "overflow-hidden rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: [
|
|
2878
2884
|
/* @__PURE__ */ t("div", { className: "group/hdr flex items-center gap-2.5 border-b border-slate-100 bg-slate-50/60 px-3 py-2 dark:border-border dark:bg-muted/50", children: [
|
|
2879
2885
|
/* @__PURE__ */ e(Yt, {}),
|
|
@@ -2896,7 +2902,7 @@ function rr({
|
|
|
2896
2902
|
children: [
|
|
2897
2903
|
/* @__PURE__ */ e("p", { className: "mb-2 text-[11px] font-medium text-slate-500", children: "Group color" }),
|
|
2898
2904
|
/* @__PURE__ */ e(
|
|
2899
|
-
|
|
2905
|
+
at,
|
|
2900
2906
|
{
|
|
2901
2907
|
value: s.color,
|
|
2902
2908
|
onChange: (q) => {
|
|
@@ -2924,12 +2930,12 @@ function rr({
|
|
|
2924
2930
|
{
|
|
2925
2931
|
autoFocus: !0,
|
|
2926
2932
|
value: q,
|
|
2927
|
-
onChange: (oe) =>
|
|
2933
|
+
onChange: (oe) => L({
|
|
2928
2934
|
from: s.label,
|
|
2929
2935
|
value: oe.target.value
|
|
2930
2936
|
}),
|
|
2931
2937
|
onKeyDown: (oe) => {
|
|
2932
|
-
oe.key === "Enter" && (oe.preventDefault(), xe()), oe.key === "Escape" &&
|
|
2938
|
+
oe.key === "Enter" && (oe.preventDefault(), xe()), oe.key === "Escape" && L(null);
|
|
2933
2939
|
},
|
|
2934
2940
|
"aria-label": "Button label",
|
|
2935
2941
|
className: "h-7 max-w-[260px] text-[13px] font-semibold"
|
|
@@ -2952,7 +2958,7 @@ function rr({
|
|
|
2952
2958
|
{
|
|
2953
2959
|
type: "button",
|
|
2954
2960
|
onClick: () => {
|
|
2955
|
-
|
|
2961
|
+
L(null), Ve(null);
|
|
2956
2962
|
},
|
|
2957
2963
|
title: "Cancel (Esc)",
|
|
2958
2964
|
className: "rounded p-1 text-slate-400 hover:bg-slate-100",
|
|
@@ -3008,7 +3014,7 @@ function rr({
|
|
|
3008
3014
|
"button",
|
|
3009
3015
|
{
|
|
3010
3016
|
type: "button",
|
|
3011
|
-
onClick: () =>
|
|
3017
|
+
onClick: () => L({ from: s.label, value: s.label }),
|
|
3012
3018
|
title: "Rename this button",
|
|
3013
3019
|
"aria-label": `Rename ${s.label}`,
|
|
3014
3020
|
className: "rounded p-1 text-slate-300 opacity-0 hover:text-slate-600 group-hover/hdr:opacity-100 transition-opacity",
|
|
@@ -3048,16 +3054,16 @@ function rr({
|
|
|
3048
3054
|
)
|
|
3049
3055
|
] }),
|
|
3050
3056
|
/* @__PURE__ */ e(
|
|
3051
|
-
|
|
3057
|
+
Ie,
|
|
3052
3058
|
{
|
|
3053
3059
|
sensors: ae,
|
|
3054
|
-
collisionDetection:
|
|
3060
|
+
collisionDetection: Je,
|
|
3055
3061
|
onDragEnd: (q) => qa(s.label, q),
|
|
3056
3062
|
children: /* @__PURE__ */ e(
|
|
3057
|
-
|
|
3063
|
+
Xe,
|
|
3058
3064
|
{
|
|
3059
|
-
items:
|
|
3060
|
-
strategy:
|
|
3065
|
+
items: O,
|
|
3066
|
+
strategy: Ze,
|
|
3061
3067
|
children: Y.map((q) => {
|
|
3062
3068
|
var xe;
|
|
3063
3069
|
const z = `${s.label}|${q.from_state ?? "_any_"}|${q.ids[0]}`, ne = q.from_state ? At.get(q.from_state) : null;
|
|
@@ -3094,7 +3100,7 @@ function rr({
|
|
|
3094
3100
|
collection: (xe = ie[0]) == null ? void 0 : xe.collection,
|
|
3095
3101
|
saving: Ft.isPending,
|
|
3096
3102
|
onSave: (re) => Ft.mutate({ route: q, data: re }),
|
|
3097
|
-
onCancel: () =>
|
|
3103
|
+
onCancel: () => R(null)
|
|
3098
3104
|
}
|
|
3099
3105
|
)
|
|
3100
3106
|
},
|
|
@@ -3178,7 +3184,7 @@ function rr({
|
|
|
3178
3184
|
"button",
|
|
3179
3185
|
{
|
|
3180
3186
|
type: "button",
|
|
3181
|
-
onClick: () =>
|
|
3187
|
+
onClick: () => R({ label: s.label, route: q }),
|
|
3182
3188
|
className: "rounded p-1 text-slate-400 hover:text-slate-700",
|
|
3183
3189
|
children: /* @__PURE__ */ e(Le, { className: "h-3.5 w-3.5" })
|
|
3184
3190
|
}
|
|
@@ -3234,7 +3240,7 @@ function rr({
|
|
|
3234
3240
|
] })
|
|
3235
3241
|
] })
|
|
3236
3242
|
] }),
|
|
3237
|
-
!d.has("branches") && /* @__PURE__ */ e(
|
|
3243
|
+
!d.has("branches") && /* @__PURE__ */ e(tn, { templateId: a, states: ct }),
|
|
3238
3244
|
!d.has("bindings") && /* @__PURE__ */ t("div", { className: "rounded-xl border border-slate-200 bg-white p-6 space-y-4", children: [
|
|
3239
3245
|
/* @__PURE__ */ t("h2", { className: "text-[13px] font-semibold text-slate-800", children: [
|
|
3240
3246
|
"Applied to Collections",
|
|
@@ -3259,10 +3265,10 @@ function rr({
|
|
|
3259
3265
|
{
|
|
3260
3266
|
type: "checkbox",
|
|
3261
3267
|
checked: !!s.auto_start,
|
|
3262
|
-
onChange: (
|
|
3268
|
+
onChange: (O) => Ge.mutate({
|
|
3263
3269
|
bindingId: s.id,
|
|
3264
3270
|
body: {
|
|
3265
|
-
auto_start:
|
|
3271
|
+
auto_start: O.target.checked,
|
|
3266
3272
|
auto_start_state: s.auto_start_state
|
|
3267
3273
|
}
|
|
3268
3274
|
}),
|
|
@@ -3274,12 +3280,12 @@ function rr({
|
|
|
3274
3280
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-1.5", children: [
|
|
3275
3281
|
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "Owner fallback:" }),
|
|
3276
3282
|
/* @__PURE__ */ e(
|
|
3277
|
-
|
|
3283
|
+
Xs,
|
|
3278
3284
|
{
|
|
3279
3285
|
value: s.owner_fallback_field ?? "",
|
|
3280
|
-
onCommit: (
|
|
3286
|
+
onCommit: (O) => Ge.mutate({
|
|
3281
3287
|
bindingId: s.id,
|
|
3282
|
-
body: { owner_fallback_field:
|
|
3288
|
+
body: { owner_fallback_field: O || null }
|
|
3283
3289
|
})
|
|
3284
3290
|
}
|
|
3285
3291
|
)
|
|
@@ -3290,13 +3296,13 @@ function rr({
|
|
|
3290
3296
|
he,
|
|
3291
3297
|
{
|
|
3292
3298
|
value: s.auto_start_state ?? "",
|
|
3293
|
-
onChange: (
|
|
3299
|
+
onChange: (O) => Ge.mutate({
|
|
3294
3300
|
bindingId: s.id,
|
|
3295
|
-
body: { auto_start: !0, auto_start_state:
|
|
3301
|
+
body: { auto_start: !0, auto_start_state: O || null }
|
|
3296
3302
|
}),
|
|
3297
|
-
options: ((
|
|
3298
|
-
value:
|
|
3299
|
-
label:
|
|
3303
|
+
options: ((A == null ? void 0 : A.states) ?? []).map((O) => ({
|
|
3304
|
+
value: O.id,
|
|
3305
|
+
label: O.label
|
|
3300
3306
|
})),
|
|
3301
3307
|
noneLabel: "First initial state",
|
|
3302
3308
|
placeholder: "First initial state",
|
|
@@ -3304,14 +3310,29 @@ function rr({
|
|
|
3304
3310
|
}
|
|
3305
3311
|
)
|
|
3306
3312
|
] })
|
|
3307
|
-
] })
|
|
3313
|
+
] }),
|
|
3314
|
+
/* @__PURE__ */ e(
|
|
3315
|
+
ms,
|
|
3316
|
+
{
|
|
3317
|
+
collection: s.collection,
|
|
3318
|
+
roles: s.start_state_roles,
|
|
3319
|
+
allowed: s.start_state_allowed,
|
|
3320
|
+
states: ((A == null ? void 0 : A.states) ?? []).map((O) => ({
|
|
3321
|
+
id: String(O.id),
|
|
3322
|
+
key: O.key,
|
|
3323
|
+
label: O.label,
|
|
3324
|
+
is_initial: !!O.is_initial
|
|
3325
|
+
})),
|
|
3326
|
+
onSave: (O) => Ge.mutate({ bindingId: s.id, body: O })
|
|
3327
|
+
}
|
|
3328
|
+
)
|
|
3308
3329
|
] }),
|
|
3309
3330
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
3310
3331
|
/* @__PURE__ */ t(
|
|
3311
3332
|
"button",
|
|
3312
3333
|
{
|
|
3313
3334
|
type: "button",
|
|
3314
|
-
onClick: () =>
|
|
3335
|
+
onClick: () => rt(de === s.id ? null : s.id),
|
|
3315
3336
|
className: J(
|
|
3316
3337
|
"flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-[12px] font-medium transition-colors",
|
|
3317
3338
|
de === s.id ? "bg-nvr-cyan/10 text-nvr-cyan" : "text-slate-500 hover:bg-slate-100 hover:text-slate-700"
|
|
@@ -3342,7 +3363,7 @@ function rr({
|
|
|
3342
3363
|
)
|
|
3343
3364
|
] })
|
|
3344
3365
|
] }),
|
|
3345
|
-
de === s.id && /* @__PURE__ */ e(
|
|
3366
|
+
de === s.id && /* @__PURE__ */ e(Vs, { binding: s, templateId: a })
|
|
3346
3367
|
] }, s.id);
|
|
3347
3368
|
}) }),
|
|
3348
3369
|
/* @__PURE__ */ t("div", { className: "space-y-2 pt-2", children: [
|
|
@@ -3412,7 +3433,7 @@ function rr({
|
|
|
3412
3433
|
] }),
|
|
3413
3434
|
/* @__PURE__ */ t("div", { className: "flex min-w-0 flex-wrap gap-1.5 sm:justify-end", children: [
|
|
3414
3435
|
/* @__PURE__ */ e(
|
|
3415
|
-
|
|
3436
|
+
us,
|
|
3416
3437
|
{
|
|
3417
3438
|
templateId: a,
|
|
3418
3439
|
collections: ie.map((s) => s.collection)
|
|
@@ -3433,27 +3454,27 @@ function rr({
|
|
|
3433
3454
|
)
|
|
3434
3455
|
] })
|
|
3435
3456
|
] }),
|
|
3436
|
-
/* @__PURE__ */ e(
|
|
3457
|
+
/* @__PURE__ */ e(ps, { templateId: a, states: ct, bindings: ie })
|
|
3437
3458
|
]
|
|
3438
3459
|
}
|
|
3439
3460
|
),
|
|
3440
|
-
j && /* @__PURE__ */ e(
|
|
3441
|
-
!d.has("simulator") && /* @__PURE__ */ e(
|
|
3442
|
-
!d.has("canvas") && /* @__PURE__ */ e(
|
|
3443
|
-
!d.has("flow-map") && /* @__PURE__ */ e(
|
|
3461
|
+
j && /* @__PURE__ */ e(pn, { onClose: () => K(!1) }),
|
|
3462
|
+
!d.has("simulator") && /* @__PURE__ */ e(an, { bindings: ie }),
|
|
3463
|
+
!d.has("canvas") && /* @__PURE__ */ e(cn, { templateId: a }),
|
|
3464
|
+
!d.has("flow-map") && /* @__PURE__ */ e(dn, { templateId: a }),
|
|
3444
3465
|
!d.has("cumulative-flow") && /* @__PURE__ */ e(ss, { templateId: a }),
|
|
3445
|
-
!d.has("replay") && /* @__PURE__ */ e(
|
|
3446
|
-
!d.has("migration") && /* @__PURE__ */ e(
|
|
3447
|
-
!d.has("lint") && /* @__PURE__ */ e(
|
|
3448
|
-
!d.has("coverage") && /* @__PURE__ */ e(
|
|
3449
|
-
!d.has("skip-report") && /* @__PURE__ */ e(
|
|
3450
|
-
!d.has("ai-review") && /* @__PURE__ */ e(
|
|
3451
|
-
!d.has("versions") && /* @__PURE__ */ e(
|
|
3452
|
-
!d.has("matrix-versions") && /* @__PURE__ */ e(
|
|
3466
|
+
!d.has("replay") && /* @__PURE__ */ e(mn, { templateId: a }),
|
|
3467
|
+
!d.has("migration") && /* @__PURE__ */ e(on, { templateId: a }),
|
|
3468
|
+
!d.has("lint") && /* @__PURE__ */ e(xs, { templateId: a }),
|
|
3469
|
+
!d.has("coverage") && /* @__PURE__ */ e(rn, { templateId: a, states: le }),
|
|
3470
|
+
!d.has("skip-report") && /* @__PURE__ */ e(fs, { templateId: a }),
|
|
3471
|
+
!d.has("ai-review") && /* @__PURE__ */ e(Gs, { templateId: a }),
|
|
3472
|
+
!d.has("versions") && /* @__PURE__ */ e(Ys, { templateId: a }),
|
|
3473
|
+
!d.has("matrix-versions") && /* @__PURE__ */ e(hs, { templateId: a })
|
|
3453
3474
|
] })
|
|
3454
3475
|
] });
|
|
3455
3476
|
}
|
|
3456
|
-
function
|
|
3477
|
+
function Gs({ templateId: a }) {
|
|
3457
3478
|
const n = Z(), [o, f] = $(
|
|
3458
3479
|
null
|
|
3459
3480
|
), i = M({
|
|
@@ -3496,7 +3517,7 @@ function Vs({ templateId: a }) {
|
|
|
3496
3517
|
] })
|
|
3497
3518
|
] });
|
|
3498
3519
|
}
|
|
3499
|
-
function
|
|
3520
|
+
function Ys({ templateId: a }) {
|
|
3500
3521
|
const n = Z(), o = _e(), [f, i] = $(null), [m, d] = $(null), { data: p, isFetching: l } = V({
|
|
3501
3522
|
queryKey: ["pipeline-version-diff", a, m],
|
|
3502
3523
|
queryFn: () => n.request(G(`/pipelines/${a}/versions/${m}/diff`)).then((y) => y.data),
|
|
@@ -3581,16 +3602,16 @@ function Gs({ templateId: a }) {
|
|
|
3581
3602
|
] })
|
|
3582
3603
|
] }, y.id);
|
|
3583
3604
|
}) }),
|
|
3584
|
-
m != null && /* @__PURE__ */ e("div", { className: "rounded-lg border border-slate-200 bg-slate-50 p-3 dark:border-border dark:bg-muted/30", children: l ? /* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-400", children: "Comparing…" }) : p ? /* @__PURE__ */ e(
|
|
3605
|
+
m != null && /* @__PURE__ */ e("div", { className: "rounded-lg border border-slate-200 bg-slate-50 p-3 dark:border-border dark:bg-muted/30", children: l ? /* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-400", children: "Comparing…" }) : p ? /* @__PURE__ */ e(Is, { fromVersion: p.from_version, to: p.to, diff: p.diff }) : /* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-400", children: "Could not load the diff." }) }),
|
|
3585
3606
|
/* @__PURE__ */ e("p", { className: "text-[10.5px] text-slate-400", children: "Restore snapshots the current config first, then upserts states/transitions/bindings by id — states are never deleted, and transitions with execution history are kept." })
|
|
3586
3607
|
] });
|
|
3587
3608
|
}
|
|
3588
|
-
function
|
|
3609
|
+
function Ye(a) {
|
|
3589
3610
|
if (a == null || a === "") return "(empty)";
|
|
3590
3611
|
const n = typeof a == "string" ? a : JSON.stringify(a);
|
|
3591
3612
|
return n.length > 80 ? `${n.slice(0, 80)}…` : n;
|
|
3592
3613
|
}
|
|
3593
|
-
function
|
|
3614
|
+
function Is({
|
|
3594
3615
|
fromVersion: a,
|
|
3595
3616
|
to: n,
|
|
3596
3617
|
diff: o
|
|
@@ -3618,10 +3639,10 @@ function Ys({
|
|
|
3618
3639
|
/* @__PURE__ */ e("span", { className: "font-mono", children: m.field }),
|
|
3619
3640
|
":",
|
|
3620
3641
|
" ",
|
|
3621
|
-
/* @__PURE__ */ e("span", { className: "text-red-600 line-through dark:text-red-400", children:
|
|
3642
|
+
/* @__PURE__ */ e("span", { className: "text-red-600 line-through dark:text-red-400", children: Ye(m.from) }),
|
|
3622
3643
|
" ",
|
|
3623
3644
|
"→ ",
|
|
3624
|
-
/* @__PURE__ */ e("span", { className: "text-emerald-700 dark:text-emerald-400", children:
|
|
3645
|
+
/* @__PURE__ */ e("span", { className: "text-emerald-700 dark:text-emerald-400", children: Ye(m.to) })
|
|
3625
3646
|
]
|
|
3626
3647
|
},
|
|
3627
3648
|
m.field
|
|
@@ -3661,11 +3682,11 @@ function Ys({
|
|
|
3661
3682
|
/* @__PURE__ */ e("span", { className: "font-mono", children: l.field }),
|
|
3662
3683
|
":",
|
|
3663
3684
|
" ",
|
|
3664
|
-
/* @__PURE__ */ e("span", { className: "text-red-600 line-through dark:text-red-400", children:
|
|
3685
|
+
/* @__PURE__ */ e("span", { className: "text-red-600 line-through dark:text-red-400", children: Ye(l.from) }),
|
|
3665
3686
|
" ",
|
|
3666
3687
|
"→",
|
|
3667
3688
|
" ",
|
|
3668
|
-
/* @__PURE__ */ e("span", { className: "text-emerald-700 dark:text-emerald-400", children:
|
|
3689
|
+
/* @__PURE__ */ e("span", { className: "text-emerald-700 dark:text-emerald-400", children: Ye(l.to) })
|
|
3669
3690
|
]
|
|
3670
3691
|
},
|
|
3671
3692
|
l.field
|
|
@@ -3678,10 +3699,10 @@ function Ys({
|
|
|
3678
3699
|
function da(a, n) {
|
|
3679
3700
|
return a.filter((o) => !o.is_terminal && !n.includes(o.key)).map((o) => ({ value: o.key, label: o.label }));
|
|
3680
3701
|
}
|
|
3681
|
-
function
|
|
3702
|
+
function Js(a) {
|
|
3682
3703
|
return a ? `Runs only while the record is in ${a}, by that step's owners or an administrator.` : "No starting step: only an administrator can run this split.";
|
|
3683
3704
|
}
|
|
3684
|
-
function
|
|
3705
|
+
function st({
|
|
3685
3706
|
state: a,
|
|
3686
3707
|
selected: n,
|
|
3687
3708
|
onClick: o
|
|
@@ -3697,7 +3718,7 @@ function at({
|
|
|
3697
3718
|
a.label
|
|
3698
3719
|
] }) : /* @__PURE__ */ e("span", { className: f, style: i, children: a.label });
|
|
3699
3720
|
}
|
|
3700
|
-
function
|
|
3721
|
+
function Xs({ value: a, onCommit: n }) {
|
|
3701
3722
|
const [o, f] = $(a);
|
|
3702
3723
|
return ue(() => f(a), [a]), /* @__PURE__ */ e(
|
|
3703
3724
|
"input",
|
|
@@ -3716,7 +3737,7 @@ function Js({ value: a, onCommit: n }) {
|
|
|
3716
3737
|
}
|
|
3717
3738
|
);
|
|
3718
3739
|
}
|
|
3719
|
-
function
|
|
3740
|
+
function Zs({
|
|
3720
3741
|
states: a,
|
|
3721
3742
|
saving: n,
|
|
3722
3743
|
onSave: o,
|
|
@@ -3762,7 +3783,7 @@ function Xs({
|
|
|
3762
3783
|
"text-[11px]",
|
|
3763
3784
|
h ? "text-slate-500" : "text-amber-700 dark:text-amber-400"
|
|
3764
3785
|
),
|
|
3765
|
-
children:
|
|
3786
|
+
children: Js(x)
|
|
3766
3787
|
}
|
|
3767
3788
|
)
|
|
3768
3789
|
] }),
|
|
@@ -3772,7 +3793,7 @@ function Xs({
|
|
|
3772
3793
|
/* @__PURE__ */ e("span", { className: "ml-1.5 font-normal text-slate-400", children: "(pick 2 or more — the record enters ALL of them at once)" })
|
|
3773
3794
|
] }),
|
|
3774
3795
|
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1.5", children: a.map((r) => /* @__PURE__ */ e(
|
|
3775
|
-
|
|
3796
|
+
st,
|
|
3776
3797
|
{
|
|
3777
3798
|
state: r,
|
|
3778
3799
|
selected: d.includes(r.key),
|
|
@@ -3787,7 +3808,7 @@ function Xs({
|
|
|
3787
3808
|
/* @__PURE__ */ e("span", { className: "ml-1.5 font-normal text-slate-400", children: "(auto-entered when every branch reaches a terminal state)" })
|
|
3788
3809
|
] }),
|
|
3789
3810
|
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1.5", children: a.filter((r) => !d.includes(r.key)).map((r) => /* @__PURE__ */ e(
|
|
3790
|
-
|
|
3811
|
+
st,
|
|
3791
3812
|
{
|
|
3792
3813
|
state: r,
|
|
3793
3814
|
selected: l === r.key,
|
|
@@ -3817,7 +3838,7 @@ function Xs({
|
|
|
3817
3838
|
] })
|
|
3818
3839
|
] });
|
|
3819
3840
|
}
|
|
3820
|
-
function
|
|
3841
|
+
function en({
|
|
3821
3842
|
split: a,
|
|
3822
3843
|
states: n,
|
|
3823
3844
|
saving: o,
|
|
@@ -3856,7 +3877,7 @@ function Zs({
|
|
|
3856
3877
|
)
|
|
3857
3878
|
] });
|
|
3858
3879
|
}
|
|
3859
|
-
function
|
|
3880
|
+
function tn({
|
|
3860
3881
|
templateId: a,
|
|
3861
3882
|
states: n
|
|
3862
3883
|
}) {
|
|
@@ -3929,7 +3950,7 @@ function en({
|
|
|
3929
3950
|
/* @__PURE__ */ t("div", { className: "min-w-0 flex-1 space-y-1.5", children: [
|
|
3930
3951
|
/* @__PURE__ */ e("p", { className: "text-[12px] font-medium text-slate-700", children: g.label }),
|
|
3931
3952
|
/* @__PURE__ */ e(
|
|
3932
|
-
|
|
3953
|
+
en,
|
|
3933
3954
|
{
|
|
3934
3955
|
split: g,
|
|
3935
3956
|
states: n,
|
|
@@ -3938,9 +3959,9 @@ function en({
|
|
|
3938
3959
|
}
|
|
3939
3960
|
),
|
|
3940
3961
|
/* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
3941
|
-
g.branch_state_objs.map((r) => /* @__PURE__ */ e(
|
|
3962
|
+
g.branch_state_objs.map((r) => /* @__PURE__ */ e(st, { state: r }, r.id)),
|
|
3942
3963
|
/* @__PURE__ */ e(ta, { className: "h-3 w-3 shrink-0 text-slate-300" }),
|
|
3943
|
-
g.join_state_obj ? /* @__PURE__ */ e(
|
|
3964
|
+
g.join_state_obj ? /* @__PURE__ */ e(st, { state: g.join_state_obj }) : /* @__PURE__ */ e("span", { className: "text-[12px] italic text-slate-400", children: "missing join state" })
|
|
3944
3965
|
] })
|
|
3945
3966
|
] }),
|
|
3946
3967
|
d === g.id ? /* @__PURE__ */ t("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
@@ -3981,7 +4002,7 @@ function en({
|
|
|
3981
4002
|
);
|
|
3982
4003
|
}),
|
|
3983
4004
|
i && /* @__PURE__ */ e(
|
|
3984
|
-
|
|
4005
|
+
Zs,
|
|
3985
4006
|
{
|
|
3986
4007
|
states: n,
|
|
3987
4008
|
saving: u.isPending,
|
|
@@ -3991,7 +4012,7 @@ function en({
|
|
|
3991
4012
|
)
|
|
3992
4013
|
] });
|
|
3993
4014
|
}
|
|
3994
|
-
function
|
|
4015
|
+
function an({ bindings: a }) {
|
|
3995
4016
|
var v;
|
|
3996
4017
|
const n = Z(), [o, f] = $(""), [i, m] = $(""), d = i || ((v = a[0]) == null ? void 0 : v.collection) || "", p = M({
|
|
3997
4018
|
mutationFn: () => n.request(I("/pipelines/simulate", { collection: d, item_id: o.trim() })).then((h) => h.data),
|
|
@@ -4186,25 +4207,25 @@ function ma({
|
|
|
4186
4207
|
] })
|
|
4187
4208
|
] });
|
|
4188
4209
|
}
|
|
4189
|
-
function
|
|
4210
|
+
function sn({
|
|
4190
4211
|
templateId: a,
|
|
4191
4212
|
cluster: n,
|
|
4192
4213
|
onDone: o
|
|
4193
4214
|
}) {
|
|
4194
4215
|
var w, N;
|
|
4195
|
-
const f = Z(), i = _e(), m = !!((w = n.suggestion) != null && w.group_id) && n.suggestion.mismatched_filters.length === 0, d = Object.values(n.dims).filter(Boolean).join(" · ") || "New group", [p, l] = $(d), [v, h] = $([]), [u, y] = $([]), x =
|
|
4216
|
+
const f = Z(), i = _e(), m = !!((w = n.suggestion) != null && w.group_id) && n.suggestion.mismatched_filters.length === 0, d = Object.values(n.dims).filter(Boolean).join(" · ") || "New group", [p, l] = $(d), [v, h] = $([]), [u, y] = $([]), x = ws(), { data: g } = V({
|
|
4196
4217
|
queryKey: ["user-groups-teams"],
|
|
4197
4218
|
queryFn: () => f.request(G("/user-groups")).then((S) => S.data),
|
|
4198
4219
|
staleTime: 6e4
|
|
4199
4220
|
}), C = (g ?? []).map((S) => ({
|
|
4200
4221
|
...S,
|
|
4201
|
-
rank:
|
|
4222
|
+
rank: ks(S.scopes, n.filters, x, n.collection)
|
|
4202
4223
|
})).sort(
|
|
4203
|
-
(S,
|
|
4224
|
+
(S, L) => Ut(S.rank.tier) - Ut(L.rank.tier) || S.name.localeCompare(L.name, void 0, { sensitivity: "base" })
|
|
4204
4225
|
), r = M({
|
|
4205
4226
|
mutationFn: async () => {
|
|
4206
|
-
var
|
|
4207
|
-
let S = m ? String((
|
|
4227
|
+
var L;
|
|
4228
|
+
let S = m ? String((L = n.suggestion) == null ? void 0 : L.group_id) : null;
|
|
4208
4229
|
if (!S) {
|
|
4209
4230
|
const D = await f.request(
|
|
4210
4231
|
I(`/pipelines/states/${n.state_id}/owner-groups`, {
|
|
@@ -4224,15 +4245,15 @@ function an({
|
|
|
4224
4245
|
return v.length + u.length;
|
|
4225
4246
|
},
|
|
4226
4247
|
onSuccess: (S) => {
|
|
4227
|
-
var
|
|
4248
|
+
var L;
|
|
4228
4249
|
P.success(
|
|
4229
|
-
m ? `Added ${S} owner${S === 1 ? "" : "s"} to ${(
|
|
4250
|
+
m ? `Added ${S} owner${S === 1 ? "" : "s"} to ${(L = n.suggestion) == null ? void 0 : L.group_label}` : `Created "${p.trim() || d}" with ${S} owner${S === 1 ? "" : "s"}`
|
|
4230
4251
|
), i.invalidateQueries({ queryKey: ["owner-gaps", a] }), i.invalidateQueries({ queryKey: ["owner-lint", a] }), i.invalidateQueries({ queryKey: ["pipeline-all-owner-groups", a] }), o();
|
|
4231
4252
|
},
|
|
4232
4253
|
onError: (S) => {
|
|
4233
|
-
var
|
|
4254
|
+
var L;
|
|
4234
4255
|
return P.error(
|
|
4235
|
-
((
|
|
4256
|
+
((L = S == null ? void 0 : S.response) == null ? void 0 : L.error) ?? "Assignment failed",
|
|
4236
4257
|
{ duration: 9e3 }
|
|
4237
4258
|
);
|
|
4238
4259
|
}
|
|
@@ -4257,16 +4278,16 @@ function an({
|
|
|
4257
4278
|
C.length > 0 && /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
4258
4279
|
/* @__PURE__ */ e("span", { className: "mr-0.5 text-[10.5px] font-medium uppercase tracking-wide text-slate-400", children: "Teams" }),
|
|
4259
4280
|
C.map((S) => {
|
|
4260
|
-
const
|
|
4281
|
+
const L = u.includes(S.id);
|
|
4261
4282
|
return /* @__PURE__ */ t(
|
|
4262
4283
|
"button",
|
|
4263
4284
|
{
|
|
4264
4285
|
type: "button",
|
|
4265
4286
|
"data-tip": S.rank.tier === "out" ? `Outside this combination — ${S.rank.mismatches.join("; ")}. Picking it is an override.` : S.rank.tier === "suggested" ? "Scoped to this combination" : void 0,
|
|
4266
|
-
onClick: () => y(
|
|
4287
|
+
onClick: () => y(L ? u.filter((D) => D !== S.id) : [...u, S.id]),
|
|
4267
4288
|
className: J(
|
|
4268
4289
|
"inline-flex items-center gap-1 rounded-full border px-2 py-px text-[11px] transition-colors",
|
|
4269
|
-
|
|
4290
|
+
L ? "border-violet-300 bg-violet-100 font-medium text-violet-700 dark:border-violet-500/40 dark:bg-violet-500/15 dark:text-violet-300" : S.rank.tier === "out" ? "border-amber-200 text-amber-700 hover:bg-amber-50 dark:border-amber-500/30 dark:text-amber-400 dark:hover:bg-amber-500/10" : "border-slate-200 text-slate-600 hover:bg-muted dark:border-border dark:text-slate-300"
|
|
4270
4291
|
),
|
|
4271
4292
|
children: [
|
|
4272
4293
|
S.rank.tier === "suggested" && /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 rounded-full bg-emerald-500" }),
|
|
@@ -4294,7 +4315,7 @@ function an({
|
|
|
4294
4315
|
] })
|
|
4295
4316
|
] });
|
|
4296
4317
|
}
|
|
4297
|
-
function
|
|
4318
|
+
function nn({ templateId: a, finding: n }) {
|
|
4298
4319
|
const o = Z(), f = _e(), [i, m] = $(
|
|
4299
4320
|
"idle"
|
|
4300
4321
|
), [d, p] = $([]), l = (r) => {
|
|
@@ -4490,7 +4511,7 @@ function sn({ templateId: a, finding: n }) {
|
|
|
4490
4511
|
] })
|
|
4491
4512
|
] });
|
|
4492
4513
|
}
|
|
4493
|
-
function
|
|
4514
|
+
function rn({
|
|
4494
4515
|
templateId: a,
|
|
4495
4516
|
states: n
|
|
4496
4517
|
}) {
|
|
@@ -4517,14 +4538,14 @@ function nn({
|
|
|
4517
4538
|
onError: () => P.error("Cleanup failed")
|
|
4518
4539
|
}), C = (h == null ? void 0 : h.clusters) ?? [], r = h == null ? void 0 : h.dead_seats, w = ((x == null ? void 0 : x.findings) ?? []).filter((b) => b.type !== "inactive_member"), N = C.reduce((b, c) => b + c.count, 0), S = new Map(
|
|
4519
4540
|
n.map((b) => [b.key, { label: b.label, color: b.color ?? null }])
|
|
4520
|
-
),
|
|
4541
|
+
), L = /* @__PURE__ */ new Map();
|
|
4521
4542
|
for (const b of C) {
|
|
4522
4543
|
const c = b.state_key ?? "(unknown state)";
|
|
4523
|
-
|
|
4544
|
+
L.set(c, [...L.get(c) ?? [], b]);
|
|
4524
4545
|
}
|
|
4525
|
-
const D = [...
|
|
4546
|
+
const D = [...L.entries()].sort(
|
|
4526
4547
|
(b, c) => c[1].reduce((k, E) => k + E.count, 0) - b[1].reduce((k, E) => k + E.count, 0)
|
|
4527
|
-
),
|
|
4548
|
+
), R = (b, c) => /* @__PURE__ */ t(
|
|
4528
4549
|
"span",
|
|
4529
4550
|
{
|
|
4530
4551
|
className: "inline-flex items-baseline gap-1 rounded border border-slate-200 bg-slate-50 px-1.5 py-px text-[10.5px] dark:border-border dark:bg-muted/40",
|
|
@@ -4711,7 +4732,7 @@ function nn({
|
|
|
4711
4732
|
/* @__PURE__ */ t("div", { className: "px-3 py-2", children: [
|
|
4712
4733
|
/* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
4713
4734
|
/* @__PURE__ */ e("span", { className: "w-8 shrink-0 text-[13px] font-semibold tabular-nums text-slate-800 dark:text-foreground", children: F.count }),
|
|
4714
|
-
Object.entries(F.dims).filter(([, K]) => K).length > 0 ? Object.entries(F.dims).filter(([, K]) => K).map(([K, Q]) =>
|
|
4735
|
+
Object.entries(F.dims).filter(([, K]) => K).length > 0 ? Object.entries(F.dims).filter(([, K]) => K).map(([K, Q]) => R(K, Q)) : /* @__PURE__ */ e("span", { className: "text-[11px] italic text-slate-400", children: "no dimension values resolved" }),
|
|
4715
4736
|
/* @__PURE__ */ t(
|
|
4716
4737
|
"span",
|
|
4717
4738
|
{
|
|
@@ -4767,7 +4788,7 @@ function nn({
|
|
|
4767
4788
|
"No group comes close — assigning creates one for this combination."
|
|
4768
4789
|
] }) }),
|
|
4769
4790
|
l === j && /* @__PURE__ */ e(
|
|
4770
|
-
|
|
4791
|
+
sn,
|
|
4771
4792
|
{
|
|
4772
4793
|
templateId: a,
|
|
4773
4794
|
cluster: F,
|
|
@@ -4797,7 +4818,7 @@ function nn({
|
|
|
4797
4818
|
] }),
|
|
4798
4819
|
/* @__PURE__ */ e("div", { className: "max-h-96 divide-y divide-slate-100 overflow-y-auto px-3 dark:divide-border/60", children: w.map((b, c) => (
|
|
4799
4820
|
// biome-ignore lint/suspicious/noArrayIndexKey: findings are positional
|
|
4800
|
-
/* @__PURE__ */ e(
|
|
4821
|
+
/* @__PURE__ */ e(nn, { templateId: a, finding: b }, c)
|
|
4801
4822
|
)) })
|
|
4802
4823
|
] })
|
|
4803
4824
|
] })
|
|
@@ -4813,13 +4834,13 @@ function ua(a) {
|
|
|
4813
4834
|
const o = n[n.length - 1].replace(/s$/i, "");
|
|
4814
4835
|
return pa(o);
|
|
4815
4836
|
}
|
|
4816
|
-
function
|
|
4837
|
+
function ln(a) {
|
|
4817
4838
|
return a.replace(/[a-z_]+(?:\.[a-z_]+)+/g, (n) => ua(n));
|
|
4818
4839
|
}
|
|
4819
4840
|
function It(a, n) {
|
|
4820
|
-
return Array.isArray(a) && a.length > 0 ? a.join(", ") :
|
|
4841
|
+
return Array.isArray(a) && a.length > 0 ? a.join(", ") : ln(n.map((o) => o.replace(/ \(wants \d+\)$/, "")).join(", "));
|
|
4821
4842
|
}
|
|
4822
|
-
function
|
|
4843
|
+
function on({ templateId: a }) {
|
|
4823
4844
|
const n = Z(), o = _e(), [f, i] = $(""), [m, d] = $(""), [p, l] = $(!1), { data: v } = V({
|
|
4824
4845
|
queryKey: ["pipeline-bindings-start", a],
|
|
4825
4846
|
queryFn: () => n.request(
|
|
@@ -4932,7 +4953,7 @@ function ln({ templateId: a }) {
|
|
|
4932
4953
|
] })
|
|
4933
4954
|
] });
|
|
4934
4955
|
}
|
|
4935
|
-
function
|
|
4956
|
+
function cn({ templateId: a }) {
|
|
4936
4957
|
const n = Z(), [o, f] = $(
|
|
4937
4958
|
null
|
|
4938
4959
|
), [i, m] = $(() => {
|
|
@@ -4979,8 +5000,8 @@ function on({ templateId: a }) {
|
|
|
4979
5000
|
de = Math.max(de, X.length), X.forEach((me, pe) => {
|
|
4980
5001
|
ce.set(me, { x: 20 + U * (K + te), y: 20 + pe * (Q + ae) });
|
|
4981
5002
|
});
|
|
4982
|
-
const
|
|
4983
|
-
return { pos: ce, width:
|
|
5003
|
+
const rt = 60 + (Math.max(0, ...j.keys()) + 1) * (K + te), A = 60 + de * (Q + ae);
|
|
5004
|
+
return { pos: ce, width: rt, height: A, NODE_W: K, NODE_H: Q };
|
|
4984
5005
|
}, [l, v]), u = (c) => i[c] ?? h.pos.get(c) ?? { x: 20, y: 20 }, [y, x] = $(null), [g, C] = $(null), r = _e(), w = M({
|
|
4985
5006
|
mutationFn: (c) => n.request(
|
|
4986
5007
|
I(`/pipelines/${a}/transitions`, {
|
|
@@ -5017,7 +5038,7 @@ function on({ templateId: a }) {
|
|
|
5017
5038
|
y: Math.max(0, k.origY + c.clientY - k.startY)
|
|
5018
5039
|
}
|
|
5019
5040
|
}));
|
|
5020
|
-
},
|
|
5041
|
+
}, L = () => {
|
|
5021
5042
|
if (y) {
|
|
5022
5043
|
if (g) {
|
|
5023
5044
|
const c = l.find((k) => {
|
|
@@ -5030,7 +5051,7 @@ function on({ templateId: a }) {
|
|
|
5030
5051
|
return;
|
|
5031
5052
|
}
|
|
5032
5053
|
d.current && (d.current = null, m((c) => (localStorage.setItem(`nvr_canvas_${a}`, JSON.stringify(c)), c)));
|
|
5033
|
-
}, D = (o == null ? void 0 : o.kind) === "state" ? l.find((c) => String(c.id) === o.id) : null,
|
|
5054
|
+
}, D = (o == null ? void 0 : o.kind) === "state" ? l.find((c) => String(c.id) === o.id) : null, R = (o == null ? void 0 : o.kind) === "transition" ? v.find((c) => String(c.id) === o.id) : null, b = (c) => {
|
|
5034
5055
|
const E = Array.from(document.querySelectorAll("h3, p, span, button")).find((F) => {
|
|
5035
5056
|
var B;
|
|
5036
5057
|
return ((B = F.textContent) == null ? void 0 : B.trim()) === c;
|
|
@@ -5046,7 +5067,7 @@ function on({ templateId: a }) {
|
|
|
5046
5067
|
width: Math.max(h.width, 600),
|
|
5047
5068
|
height: Math.max(h.height, 200),
|
|
5048
5069
|
onPointerMove: S,
|
|
5049
|
-
onPointerUp:
|
|
5070
|
+
onPointerUp: L,
|
|
5050
5071
|
role: "img",
|
|
5051
5072
|
"aria-label": "Workflow state machine",
|
|
5052
5073
|
children: [
|
|
@@ -5177,7 +5198,7 @@ function on({ templateId: a }) {
|
|
|
5177
5198
|
]
|
|
5178
5199
|
}
|
|
5179
5200
|
) }),
|
|
5180
|
-
(D ||
|
|
5201
|
+
(D || R) && /* @__PURE__ */ t("div", { className: "mt-2 flex flex-wrap items-center gap-3 rounded-md border border-slate-100 px-3 py-2 text-[12.5px] dark:border-border", children: [
|
|
5181
5202
|
D && /* @__PURE__ */ t(ye, { children: [
|
|
5182
5203
|
/* @__PURE__ */ e("span", { className: "font-medium text-slate-800 dark:text-foreground", children: D.label }),
|
|
5183
5204
|
/* @__PURE__ */ t("span", { className: "text-slate-400", children: [
|
|
@@ -5200,18 +5221,18 @@ function on({ templateId: a }) {
|
|
|
5200
5221
|
}
|
|
5201
5222
|
)
|
|
5202
5223
|
] }),
|
|
5203
|
-
|
|
5204
|
-
/* @__PURE__ */ e("span", { className: "font-medium text-slate-800 dark:text-foreground", children:
|
|
5205
|
-
|
|
5206
|
-
|
|
5224
|
+
R && /* @__PURE__ */ t(ye, { children: [
|
|
5225
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-slate-800 dark:text-foreground", children: R.label }),
|
|
5226
|
+
R.auto_trigger && /* @__PURE__ */ e("span", { className: "text-amber-600", children: "⚡ automatic" }),
|
|
5227
|
+
R.group_label && /* @__PURE__ */ t("span", { className: "text-slate-400", children: [
|
|
5207
5228
|
"group: ",
|
|
5208
|
-
|
|
5229
|
+
R.group_label
|
|
5209
5230
|
] }),
|
|
5210
5231
|
/* @__PURE__ */ e(
|
|
5211
5232
|
"button",
|
|
5212
5233
|
{
|
|
5213
5234
|
type: "button",
|
|
5214
|
-
onClick: () => b(
|
|
5235
|
+
onClick: () => b(R.label),
|
|
5215
5236
|
className: "text-nvr-cyan underline decoration-dotted underline-offset-2",
|
|
5216
5237
|
children: "Edit in the Transitions list ↑"
|
|
5217
5238
|
}
|
|
@@ -5229,8 +5250,8 @@ function on({ templateId: a }) {
|
|
|
5229
5250
|
] })
|
|
5230
5251
|
] });
|
|
5231
5252
|
}
|
|
5232
|
-
function
|
|
5233
|
-
var D,
|
|
5253
|
+
function dn({ templateId: a }) {
|
|
5254
|
+
var D, R;
|
|
5234
5255
|
const n = Z(), [o, f] = $(90), [i, m] = $(null), { data: d } = V({
|
|
5235
5256
|
queryKey: ["flow-map", a, o],
|
|
5236
5257
|
queryFn: () => n.request(
|
|
@@ -5256,7 +5277,7 @@ function cn({ templateId: a }) {
|
|
|
5256
5277
|
w.set(b.from, (w.get(b.from) ?? 0) + B), N.set(b.to, (N.get(b.to) ?? 0) + j);
|
|
5257
5278
|
const te = ge + 8, ae = Ae - ge - 8, ce = (te + ae) / 2, de = `M ${te} ${K} C ${ce} ${K}, ${ce} ${Q}, ${ae} ${Q} L ${ae} ${Q + j} C ${ce} ${Q + j}, ${ce} ${K + B}, ${te} ${K + B} Z`;
|
|
5258
5279
|
return { f: b, path: de };
|
|
5259
|
-
}),
|
|
5280
|
+
}), L = new Map(p.map((b) => [b.id, b]));
|
|
5260
5281
|
return p.length === 0 ? null : /* @__PURE__ */ t("div", { className: "rounded-xl border border-slate-200 bg-white p-6 space-y-4 dark:border-border dark:bg-card", children: [
|
|
5261
5282
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
|
|
5262
5283
|
/* @__PURE__ */ t("div", { children: [
|
|
@@ -5311,7 +5332,7 @@ function cn({ templateId: a }) {
|
|
|
5311
5332
|
width: ge,
|
|
5312
5333
|
height: c.h,
|
|
5313
5334
|
rx: 4,
|
|
5314
|
-
fill: ((k =
|
|
5335
|
+
fill: ((k = L.get(b)) == null ? void 0 : k.color) ?? "#94a3b8",
|
|
5315
5336
|
opacity: 0.15
|
|
5316
5337
|
}
|
|
5317
5338
|
),
|
|
@@ -5323,7 +5344,7 @@ function cn({ templateId: a }) {
|
|
|
5323
5344
|
width: 6,
|
|
5324
5345
|
height: c.h,
|
|
5325
5346
|
rx: 2,
|
|
5326
|
-
fill: ((E =
|
|
5347
|
+
fill: ((E = L.get(b)) == null ? void 0 : E.color) ?? "#94a3b8"
|
|
5327
5348
|
}
|
|
5328
5349
|
),
|
|
5329
5350
|
/* @__PURE__ */ e(
|
|
@@ -5333,7 +5354,7 @@ function cn({ templateId: a }) {
|
|
|
5333
5354
|
y: c.y + c.h / 2 + 3,
|
|
5334
5355
|
textAnchor: "end",
|
|
5335
5356
|
className: "fill-slate-700 text-[10.5px] font-medium dark:fill-slate-200",
|
|
5336
|
-
children: (((F =
|
|
5357
|
+
children: (((F = L.get(b)) == null ? void 0 : F.label) ?? "").slice(0, 32)
|
|
5337
5358
|
}
|
|
5338
5359
|
)
|
|
5339
5360
|
] }, `L-${b}`);
|
|
@@ -5349,7 +5370,7 @@ function cn({ templateId: a }) {
|
|
|
5349
5370
|
width: ge,
|
|
5350
5371
|
height: c.h,
|
|
5351
5372
|
rx: 4,
|
|
5352
|
-
fill: ((k =
|
|
5373
|
+
fill: ((k = L.get(b)) == null ? void 0 : k.color) ?? "#94a3b8",
|
|
5353
5374
|
opacity: 0.15
|
|
5354
5375
|
}
|
|
5355
5376
|
),
|
|
@@ -5361,7 +5382,7 @@ function cn({ templateId: a }) {
|
|
|
5361
5382
|
width: 6,
|
|
5362
5383
|
height: c.h,
|
|
5363
5384
|
rx: 2,
|
|
5364
|
-
fill: ((E =
|
|
5385
|
+
fill: ((E = L.get(b)) == null ? void 0 : E.color) ?? "#94a3b8"
|
|
5365
5386
|
}
|
|
5366
5387
|
),
|
|
5367
5388
|
/* @__PURE__ */ e(
|
|
@@ -5370,17 +5391,17 @@ function cn({ templateId: a }) {
|
|
|
5370
5391
|
x: Ae - ge + 8,
|
|
5371
5392
|
y: c.y + c.h / 2 + 3,
|
|
5372
5393
|
className: "fill-slate-700 text-[10.5px] font-medium dark:fill-slate-200",
|
|
5373
|
-
children: (((F =
|
|
5394
|
+
children: (((F = L.get(b)) == null ? void 0 : F.label) ?? "").slice(0, 32)
|
|
5374
5395
|
}
|
|
5375
5396
|
)
|
|
5376
5397
|
] }, `R-${b}`);
|
|
5377
5398
|
})
|
|
5378
5399
|
] }),
|
|
5379
5400
|
i && /* @__PURE__ */ t("p", { className: "text-[12px] text-slate-600", children: [
|
|
5380
|
-
/* @__PURE__ */ e("strong", { children: (D =
|
|
5401
|
+
/* @__PURE__ */ e("strong", { children: (D = L.get(i.from)) == null ? void 0 : D.label }),
|
|
5381
5402
|
" →",
|
|
5382
5403
|
" ",
|
|
5383
|
-
/* @__PURE__ */ e("strong", { children: (
|
|
5404
|
+
/* @__PURE__ */ e("strong", { children: (R = L.get(i.to)) == null ? void 0 : R.label }),
|
|
5384
5405
|
": ",
|
|
5385
5406
|
i.count.toLocaleString(),
|
|
5386
5407
|
" ",
|
|
@@ -5390,7 +5411,7 @@ function cn({ templateId: a }) {
|
|
|
5390
5411
|
] })
|
|
5391
5412
|
] });
|
|
5392
5413
|
}
|
|
5393
|
-
function
|
|
5414
|
+
function mn({ templateId: a }) {
|
|
5394
5415
|
const n = Z(), [o, f] = $(90), [i, m] = $(0), [d, p] = $(!1), [l, v] = $(!0), { data: h } = V({
|
|
5395
5416
|
queryKey: ["pipeline-replay", a, o],
|
|
5396
5417
|
queryFn: () => n.request(G(`/pipelines/${a}/replay`, { days: o })).then((w) => w.data),
|
|
@@ -5520,7 +5541,7 @@ function dn({ templateId: a }) {
|
|
|
5520
5541
|
] })
|
|
5521
5542
|
] });
|
|
5522
5543
|
}
|
|
5523
|
-
function
|
|
5544
|
+
function pn({ onClose: a }) {
|
|
5524
5545
|
return ue(() => {
|
|
5525
5546
|
const n = (o) => {
|
|
5526
5547
|
o.key === "Escape" && a();
|
|
@@ -5552,19 +5573,19 @@ function mn({ onClose: a }) {
|
|
|
5552
5573
|
}
|
|
5553
5574
|
)
|
|
5554
5575
|
] }),
|
|
5555
|
-
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ e(
|
|
5576
|
+
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ e(Ns, { compact: !0 }) })
|
|
5556
5577
|
] })
|
|
5557
5578
|
] }),
|
|
5558
5579
|
document.body
|
|
5559
5580
|
);
|
|
5560
5581
|
}
|
|
5561
5582
|
export {
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5583
|
+
Gs as AiReviewCard,
|
|
5584
|
+
rn as OwnerGapsCard,
|
|
5585
|
+
ir as PipelineEditorView,
|
|
5586
|
+
an as PipelineSimulatorCard,
|
|
5587
|
+
zs as ownerGroupsLabel,
|
|
5588
|
+
Js as splitStartNote,
|
|
5568
5589
|
da as splitStartOptions,
|
|
5569
5590
|
It as suggestionList
|
|
5570
5591
|
};
|