@burdenoff/fluidgrids-fe-sdk 2026.1113.1 → 2026.1113.2
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/{AiStudioPage-D3MAk-bs.js → AiStudioPage-5KYZ8r8-.js} +464 -7
- package/dist/{ApprovalInboxPage-Bb8H9ruw.js → ApprovalInboxPage-BsJX4osU.js} +4 -3
- package/dist/{ConnectionFormDialog-Bg9_OdHX.js → ConnectionFormDialog-Dr1-CTan.js} +2 -1
- package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
- package/dist/{DataSinkDashboardPage-Dc2QuJbL.js → DataSinkDashboardPage-8ZDn85e2.js} +1 -1
- package/dist/{DataTablesPage-Cv4veaKK.js → DataTablesPage-BBvABuxE.js} +5 -4
- package/dist/{EntityTagPicker-D8ws706D.js → EntityTagPicker-BppBSEJk.js} +2 -2
- package/dist/{ExecutionDetailPage-CTVGE-d-.js → ExecutionDetailPage-BXDF2eoT.js} +1444 -18
- package/dist/ExecutionsListDocument-CzdLPpj5.js +1259 -0
- package/dist/{ExecutionsListPage-J0sJPuoM.js → ExecutionsListPage--4BthM8L.js} +285 -11
- package/dist/FailureTriagePanel-B5WCSRFo.js +1252 -0
- package/dist/{FluidGridsProvider-C4FVNz0n.js → FluidGridsProvider-Dc_Jhtch.js} +8666 -8734
- package/dist/{HistoryPage-B9XcTPrO.js → HistoryPage-BvFk2m1m.js} +4 -3
- package/dist/{InsightsPage-DFOltjyj.js → InsightsPage-Dwmb02F6.js} +2682 -5
- package/dist/{MissingNodesInstallModal-D8H-YNCJ.js → MissingNodesInstallModal-Cze674hp.js} +2 -2
- package/dist/{NodesPage-YQ-hP60x.js → NodesPage-C5Dq-ru-.js} +3 -2
- package/dist/{OpenTemplateAsCodeButton-hH26HQCk.js → OpenTemplateAsCodeButton-8MZHih6I.js} +2 -2
- package/dist/{PaidTemplateConfirm-DoKWMBtR.js → PaidTemplateConfirm-0G-gv29n.js} +1 -1
- package/dist/{PublishCustomNodeAction-5XXnSA3H.js → PublishCustomNodeAction-OOY35dUv.js} +1 -1
- package/dist/QuotaExhaustedDialog-wvu_-WJ-.js +55 -0
- package/dist/{RunnerStatusPill-Ctg4TJcP.js → RunnerStatusPill-Bh7mEsPh.js} +2 -1
- package/dist/{RunnersPage-CAt4YDhB.js → RunnersPage-DHeuUDil.js} +2 -2
- package/dist/{SettingsPage-DEKPCVVP.js → SettingsPage-CfjXiGpb.js} +694 -14
- package/dist/{TagFilterSelect-CwM2-DU6.js → TagFilterSelect-CAShgvbS.js} +1 -1
- package/dist/{TaskQueuesPage-Dhi6SIT4.js → TaskQueuesPage--Mmn36b-.js} +3 -3
- package/dist/{TemplateCard-DVSd_4zJ.js → TemplateCard-BA_9em22.js} +644 -352
- package/dist/{TemplateConfigurationModal-BKi1z7z7.js → TemplateConfigurationModal-BT3PaR0O.js} +4 -3
- package/dist/{TemplateDetailPanel-DK1gF7P5.js → TemplateDetailPanel-BxFNnlXm.js} +2 -1
- package/dist/{TemplatePreview-DuSX2Q7H.js → TemplatePreview-Bagja6WN.js} +7 -7
- package/dist/{TemplatesPage-CAWHh61l.js → TemplatesPage-CAajpJ5w.js} +711 -6
- package/dist/{VariablesPage-D7CoatWf.js → VariablesPage-CgUBKhAe.js} +3 -3
- package/dist/{VersionDiffDialog-DGwysiyE.js → VersionDiffDialog-D9W5Fm56.js} +233 -129
- package/dist/VersionLifecycleBar-DuphLOT0.js +131 -0
- package/dist/{WorkflowBuilder-DAeoQi5E.js → WorkflowBuilder-DMpSPElu.js} +16 -13
- package/dist/{WorkflowBuilder-BJgqDboZ.js → WorkflowBuilder-v8h8skwG.js} +5 -5
- package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
- package/dist/WorkflowEditLeaseStatusDocument-Dp62med3.js +627 -0
- package/dist/WorkflowProposalCard-zCdUpCk8.js +249 -0
- package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
- package/dist/{WorkflowSearchRedirect-CMEvd_AR.js → WorkflowSearchRedirect-G78lINAE.js} +1 -1
- package/dist/{WorkflowShareDialog-BgHRsDP0.js → WorkflowShareDialog-B7VOgr4-.js} +304 -3
- package/dist/WorkflowVersionsDocument-CfPMloRW.js +3195 -0
- package/dist/{WorkflowsList-CcQPxWKL.js → WorkflowsList-CPYzfE4K.js} +11 -9
- package/dist/agent-form-D0uLvzx4.js +718 -0
- package/dist/{agentTools-DKpNKztf.js → agentTools-DTXUqtfu.js} +4 -4
- package/dist/api-BZVyX5d2.js +2286 -0
- package/dist/api-BqA-f-AD.js +8064 -0
- package/dist/app-BJUvugPM.js +3813 -0
- package/dist/assert-rules-CPNrO44K.js +318 -0
- package/dist/attach-node-helpers-CNsYtLOR.js +32 -0
- package/dist/badge-CXfPhoMH.js +26 -0
- package/dist/{canvasNoteTools-C_AN79m0.js → canvasNoteTools-DmfZwtnL.js} +3 -3
- package/dist/{channel-CZ70oI81.js → channel-DtF1n_ab.js} +1 -1
- package/dist/client-Ctl4jmY3.js +127 -0
- package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
- package/dist/{code-editor-field-Dt6KNWwN.js → code-editor-field-Cv907s3W.js} +2 -2
- package/dist/{codec-client-CJ95Rmqo.js → codec-client-CAYl6j46.js} +2 -1
- package/dist/conditionBuilder-D8aLGL1w.js +1134 -0
- package/dist/config-X97zrIvn.js +600 -0
- package/dist/{definition-canvas-Bshn_dSP.js → definition-canvas-DL25_6NH.js} +1 -1
- package/dist/{dialog-Cjb4lB4D.js → dialog-BVd152GS.js} +3 -14
- package/dist/durable-nodes-DXCCQYWD.js +81 -0
- package/dist/errors-xPZ-IbQd.js +142 -0
- package/dist/executions.js +2 -2
- package/dist/{flow-builder-D3Hl2AFk.js → flow-builder-Dv5fWJ6F.js} +9301 -8189
- package/dist/{node-registry-refresh-Dy0uRg9f.js → global-client-DP_Wxe5t.js} +2 -27
- package/dist/global-operations-7pvXw_j9.js +145 -0
- package/dist/history.js +1 -1
- package/dist/{index-CWcP-tG1.d.ts → index-DtMUtXNq.d.ts} +247 -247
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4403 -46
- package/dist/input-ChT6Q-Pr.js +17 -0
- package/dist/logs-panel-DtG93ocy.js +342 -0
- package/dist/mapping-colors-BIX_YeCQ.js +48 -0
- package/dist/{node-detail-view-bVLeYarT.js → node-detail-view-BKI_2kM6.js} +12 -11
- package/dist/{node-editor-tab-body-JHHVtQgR.js → node-editor-tab-body-Cc1MWEFR.js} +3 -3
- package/dist/{node-operation-selection-DAbS6jSY.js → node-operation-selection-Czeeb2D4.js} +2 -139
- package/dist/node-registry-refresh-s3okf83X.js +27 -0
- package/dist/nodes.js +1 -1
- package/dist/notesKey-5EaREBGA.js +12 -0
- package/dist/observability.d.ts +1 -1
- package/dist/observability.js +2 -2
- package/dist/{popover-Xx3gN7vg.js → popover-DDv7J1Kl.js} +717 -6
- package/dist/{quick-config-panel-BvVQXuIL.js → quick-config-panel-BPCRfqWI.js} +4 -4
- package/dist/read-only-context-Dt9N9SIG.js +18 -0
- package/dist/{schedule-panel-DCb40TPN.js → schedule-panel-C1KwfLCE.js} +14 -12
- package/dist/settings.js +1 -1
- package/dist/{shared-CMfn30xT.js → shared-Ctl9ZHo1.js} +2 -1
- package/dist/{sidebar-node-editor-DxCWFZG2.js → sidebar-node-editor-d9Rlq5pU.js} +4 -4
- package/dist/sticky-notes-23j-wL6Q.js +96 -0
- package/dist/template-code-dqRunGOv.js +184 -0
- package/dist/template-preview-C01KV277.js +29 -0
- package/dist/templates.js +2 -2
- package/dist/token-refresh-link-BjN7H4qA.js +291 -0
- package/dist/useAgentDefinitions-ZKX2N9aP.js +3101 -0
- package/dist/useConnections-BlB0gbOB.js +931 -0
- package/dist/useDurableParity-BgLH_SCF.js +2088 -0
- package/dist/{useEntityTags-Db4Pc8_M.js → useEntityTags-4iW6UTly.js} +227 -3
- package/dist/{useExecutions-DOpG1pUQ.js → useExecutions-Bm7q_UwN.js} +6 -3
- package/dist/useGlobalStoreClient-DMTrywdX.js +24 -0
- package/dist/{useHumanRequests-ZiR0sSzS.js → useHumanRequests-DwG2tQ3f.js} +2 -1
- package/dist/{useObservability-rQmwhoZZ.js → useObservability-DPATdbw7.js} +4 -2
- package/dist/{useRunHistory-COn6dl7l.js → useRunHistory-CGfjCsJ3.js} +1122 -4
- package/dist/{useVariables-2ddyJX4a.js → useVariables-DFdZofLQ.js} +2 -1
- package/dist/{useWorkflowCodeExport-ZoUJKRSK.js → useWorkflowCodeExport-D_mCuhKP.js} +289 -4
- package/dist/useWorkflowOrganization-r5FWNBs6.js +1690 -0
- package/dist/useWorkflowProposal-Bh2_qjmM.js +7478 -0
- package/dist/{useWorkflows-jOW60YmD.js → useWorkflows-aqVD7kGa.js} +694 -4
- package/dist/workflow-builder.js +5 -5
- package/dist/{workflow-code-transfer-l9wO34S0.js → workflow-code-transfer-5C0HUzae.js} +1 -53
- package/dist/workflow-host.js +4 -2
- package/dist/workflow-pages.d.ts +1 -1
- package/dist/workflow-pages.js +19 -19
- package/dist/workflow-preview.js +3 -2
- package/dist/workflows-list.js +1 -1
- package/package.json +1 -1
- package/dist/FailureTriagePanel-BbYFYeV_.js +0 -311
- package/dist/WorkflowProposalCard-DGMdZC4R.js +0 -1432
- package/dist/agent-form-Bfvm32j1.js +0 -83
- package/dist/api-DQtHXbIg.js +0 -224
- package/dist/api-MeAm6g7E.js +0 -55
- package/dist/client-C9XSzSXr.js +0 -1147
- package/dist/graphql-operation-types-C9qbvRa8.js +0 -53122
- package/dist/useAgentDefinitions-_hgNCK1A.js +0 -550
- package/dist/useConnections-Cs7LCWEM.js +0 -401
- package/dist/useDurableParity-CcLeCDfv.js +0 -504
- package/dist/useWorkflowOrganization-QxVePSkk.js +0 -282
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
|
|
3
|
+
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
4
|
+
import { Icon } from "@iconify/react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Badge, Button } from "@burdenoff/fe-libs/ui";
|
|
7
|
+
|
|
8
|
+
// src/components/shared/WorkflowProposalCard.tsx
|
|
9
|
+
/**
|
|
10
|
+
* WorkflowProposalCard — review an AI workflow proposal before it changes
|
|
11
|
+
* anything (BOFF-3662).
|
|
12
|
+
*
|
|
13
|
+
* Shows what the model proposes (explanation, a node and connection diff
|
|
14
|
+
* against the version it was made from, validation errors and the settings the
|
|
15
|
+
* user still has to fill in) with Apply / Reject while it is PROPOSED, a
|
|
16
|
+
* Cancel while it is still running, and once applied a link to the new draft
|
|
17
|
+
* plus a one-click revert to the version it was made from (a restore, which
|
|
18
|
+
* creates another version and never deletes one).
|
|
19
|
+
*/
|
|
20
|
+
var WorkflowProposalCard_exports = /* @__PURE__ */ __exportAll({ WorkflowProposalCard: () => WorkflowProposalCard });
|
|
21
|
+
const STATUS_TONE = {
|
|
22
|
+
PROCESSING: "secondary",
|
|
23
|
+
PROPOSED: "default",
|
|
24
|
+
APPLIED: "default",
|
|
25
|
+
REJECTED: "outline",
|
|
26
|
+
STALE: "outline",
|
|
27
|
+
CANCELLED: "outline",
|
|
28
|
+
FAILED: "destructive"
|
|
29
|
+
};
|
|
30
|
+
function edgeLabel(edge) {
|
|
31
|
+
return `${edge.sourceHandle ? `${edge.source} (${edge.sourceHandle})` : edge.source} → ${edge.target}`;
|
|
32
|
+
}
|
|
33
|
+
function ChangeList({ title, icon, items, testId }) {
|
|
34
|
+
if (items.length === 0) return null;
|
|
35
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
36
|
+
"data-testid": testId,
|
|
37
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
38
|
+
className: "flex items-center gap-1.5 text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
41
|
+
icon,
|
|
42
|
+
width: 14
|
|
43
|
+
}),
|
|
44
|
+
title,
|
|
45
|
+
" (",
|
|
46
|
+
items.length,
|
|
47
|
+
")"
|
|
48
|
+
]
|
|
49
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
50
|
+
className: "mt-1 space-y-0.5 text-sm text-text-primary",
|
|
51
|
+
children: items.map((item) => /* @__PURE__ */ jsx("li", {
|
|
52
|
+
className: "truncate",
|
|
53
|
+
children: item
|
|
54
|
+
}, item))
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function nodeLine(node, withFields) {
|
|
59
|
+
const base = `${node.label} · ${node.type}`;
|
|
60
|
+
return withFields && node.fields.length > 0 ? `${base} — ${node.fields.join(", ")}` : base;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Validation errors that are not already part of the message shown above
|
|
64
|
+
* them. Comparison ignores case and surrounding whitespace and punctuation.
|
|
65
|
+
*/
|
|
66
|
+
function visibleErrors(errors, shownMessage) {
|
|
67
|
+
const shown = normalise(shownMessage ?? "");
|
|
68
|
+
const seen = /* @__PURE__ */ new Set();
|
|
69
|
+
const result = [];
|
|
70
|
+
for (const error of errors) {
|
|
71
|
+
const key = normalise(error);
|
|
72
|
+
if (!key || seen.has(key)) continue;
|
|
73
|
+
seen.add(key);
|
|
74
|
+
if (shown && shown.includes(key)) continue;
|
|
75
|
+
result.push(error);
|
|
76
|
+
}
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
function normalise(text) {
|
|
80
|
+
return text.trim().toLowerCase().replace(/^[\s.:;,]+|[\s.:;,]+$/g, "");
|
|
81
|
+
}
|
|
82
|
+
function WorkflowProposalCard({ proposal, isDeciding = false, onOpenWorkflow, onApply, onReject, onCancel, onRevert }) {
|
|
83
|
+
const tr = useTr();
|
|
84
|
+
const status = String(proposal.status);
|
|
85
|
+
const diff = proposal.diff;
|
|
86
|
+
const warnings = proposal.validation?.warnings ?? [];
|
|
87
|
+
const showMessage = Boolean(proposal.message && status !== "PROPOSED" && status !== "PROCESSING" && status !== "APPLIED");
|
|
88
|
+
const errors = visibleErrors(proposal.validation?.valid === false ? proposal.validation.errors : [], showMessage ? proposal.message : null);
|
|
89
|
+
const revertTarget = proposal.baseVersion && proposal.workflowKey && proposal.appliedWorkflowKey === proposal.workflowKey ? {
|
|
90
|
+
workflowKey: proposal.workflowKey,
|
|
91
|
+
version: proposal.baseVersion
|
|
92
|
+
} : null;
|
|
93
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
94
|
+
className: "rounded-lg border border-border-secondary bg-background-secondary p-4",
|
|
95
|
+
"data-testid": "workflow-proposal-card",
|
|
96
|
+
"data-status": status,
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ jsxs("header", {
|
|
99
|
+
className: "flex flex-wrap items-center gap-2",
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
102
|
+
icon: "mdi:creation-outline",
|
|
103
|
+
width: 18,
|
|
104
|
+
className: "text-text-secondary"
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsx("span", {
|
|
107
|
+
className: "text-sm font-medium text-text-primary",
|
|
108
|
+
children: proposal.name ?? tr("fluidgrids.ai.proposal.title", "AI proposal")
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
111
|
+
variant: STATUS_TONE[status] ?? "outline",
|
|
112
|
+
"data-testid": "workflow-proposal-status",
|
|
113
|
+
children: status
|
|
114
|
+
}),
|
|
115
|
+
proposal.baseVersion && /* @__PURE__ */ jsx("span", {
|
|
116
|
+
className: "text-xs text-text-secondary",
|
|
117
|
+
children: tr("fluidgrids.ai.proposal.against", "against version {{version}}", { version: proposal.baseVersion })
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
}),
|
|
121
|
+
status === "PROCESSING" && /* @__PURE__ */ jsxs("div", {
|
|
122
|
+
className: "mt-3 flex items-center gap-2 text-sm text-text-secondary",
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
125
|
+
icon: "mdi:loading",
|
|
126
|
+
width: 16,
|
|
127
|
+
className: "animate-spin"
|
|
128
|
+
}),
|
|
129
|
+
tr("fluidgrids.ai.proposal.working", "Working ({{stage}})…", { stage: proposal.progress?.stage ?? "prompting" }),
|
|
130
|
+
onCancel && /* @__PURE__ */ jsx(Button, {
|
|
131
|
+
size: "sm",
|
|
132
|
+
variant: "ghost",
|
|
133
|
+
onClick: onCancel,
|
|
134
|
+
disabled: isDeciding,
|
|
135
|
+
children: tr("fluidgrids.ai.proposal.cancel", "Cancel")
|
|
136
|
+
})
|
|
137
|
+
]
|
|
138
|
+
}),
|
|
139
|
+
proposal.explanation && /* @__PURE__ */ jsx("p", {
|
|
140
|
+
className: "mt-3 text-sm text-text-primary",
|
|
141
|
+
"data-testid": "workflow-proposal-explanation",
|
|
142
|
+
children: proposal.explanation
|
|
143
|
+
}),
|
|
144
|
+
showMessage && /* @__PURE__ */ jsx("p", {
|
|
145
|
+
className: "mt-2 text-sm text-text-secondary",
|
|
146
|
+
"data-testid": "workflow-proposal-message",
|
|
147
|
+
children: proposal.message
|
|
148
|
+
}),
|
|
149
|
+
diff && /* @__PURE__ */ jsxs("div", {
|
|
150
|
+
className: "mt-3 space-y-2",
|
|
151
|
+
"data-testid": "workflow-proposal-diff",
|
|
152
|
+
children: [
|
|
153
|
+
/* @__PURE__ */ jsx("p", {
|
|
154
|
+
className: "text-sm font-medium text-text-primary",
|
|
155
|
+
children: diff.summary
|
|
156
|
+
}),
|
|
157
|
+
/* @__PURE__ */ jsx(ChangeList, {
|
|
158
|
+
testId: "workflow-proposal-added",
|
|
159
|
+
icon: "mdi:plus-circle-outline",
|
|
160
|
+
title: tr("fluidgrids.ai.proposal.added", "Added nodes"),
|
|
161
|
+
items: diff.addedNodes.map((node) => nodeLine(node, false))
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ jsx(ChangeList, {
|
|
164
|
+
testId: "workflow-proposal-changed",
|
|
165
|
+
icon: "mdi:pencil-circle-outline",
|
|
166
|
+
title: tr("fluidgrids.ai.proposal.changed", "Changed nodes"),
|
|
167
|
+
items: diff.changedNodes.map((node) => nodeLine(node, true))
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ jsx(ChangeList, {
|
|
170
|
+
testId: "workflow-proposal-removed",
|
|
171
|
+
icon: "mdi:minus-circle-outline",
|
|
172
|
+
title: tr("fluidgrids.ai.proposal.removed", "Removed nodes"),
|
|
173
|
+
items: diff.removedNodes.map((node) => nodeLine(node, false))
|
|
174
|
+
}),
|
|
175
|
+
/* @__PURE__ */ jsx(ChangeList, {
|
|
176
|
+
testId: "workflow-proposal-edges",
|
|
177
|
+
icon: "mdi:vector-line",
|
|
178
|
+
title: tr("fluidgrids.ai.proposal.connections", "Connection changes"),
|
|
179
|
+
items: [...diff.addedEdges.map((edge) => `+ ${edgeLabel(edge)}`), ...diff.removedEdges.map((edge) => `− ${edgeLabel(edge)}`)]
|
|
180
|
+
})
|
|
181
|
+
]
|
|
182
|
+
}),
|
|
183
|
+
errors.length > 0 && /* @__PURE__ */ jsx("ul", {
|
|
184
|
+
className: "mt-3 space-y-1 text-sm text-[var(--color-status-error-text)]",
|
|
185
|
+
"data-testid": "workflow-proposal-errors",
|
|
186
|
+
children: errors.map((message) => /* @__PURE__ */ jsx("li", { children: message }, message))
|
|
187
|
+
}),
|
|
188
|
+
warnings.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
189
|
+
className: "mt-3",
|
|
190
|
+
"data-testid": "workflow-proposal-warnings",
|
|
191
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
192
|
+
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
193
|
+
children: tr("fluidgrids.ai.proposal.todo", "Still to set up")
|
|
194
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
195
|
+
className: "mt-1 space-y-0.5 text-sm text-text-secondary",
|
|
196
|
+
children: warnings.map((warning) => /* @__PURE__ */ jsx("li", { children: warning }, warning))
|
|
197
|
+
})]
|
|
198
|
+
}),
|
|
199
|
+
status === "PROPOSED" && (onApply || onReject) && /* @__PURE__ */ jsxs("div", {
|
|
200
|
+
className: "mt-4 flex flex-wrap items-center gap-2",
|
|
201
|
+
children: [
|
|
202
|
+
onApply && /* @__PURE__ */ jsx(Button, {
|
|
203
|
+
size: "sm",
|
|
204
|
+
onClick: onApply,
|
|
205
|
+
disabled: isDeciding,
|
|
206
|
+
"data-testid": "workflow-proposal-apply",
|
|
207
|
+
children: proposal.baseVersion ? tr("fluidgrids.ai.proposal.applyVersion", "Apply as a new draft version") : tr("fluidgrids.ai.proposal.applyNew", "Create as a draft workflow")
|
|
208
|
+
}),
|
|
209
|
+
onReject && /* @__PURE__ */ jsx(Button, {
|
|
210
|
+
size: "sm",
|
|
211
|
+
variant: "outline",
|
|
212
|
+
onClick: onReject,
|
|
213
|
+
disabled: isDeciding,
|
|
214
|
+
children: tr("fluidgrids.ai.proposal.reject", "Reject")
|
|
215
|
+
}),
|
|
216
|
+
/* @__PURE__ */ jsx("span", {
|
|
217
|
+
className: "text-xs text-text-secondary",
|
|
218
|
+
children: tr("fluidgrids.ai.proposal.neverActivates", "Nothing goes live: the result is a draft you can review, run as a test and activate yourself.")
|
|
219
|
+
})
|
|
220
|
+
]
|
|
221
|
+
}),
|
|
222
|
+
status === "APPLIED" && proposal.appliedWorkflowKey && proposal.appliedVersion && /* @__PURE__ */ jsxs("div", {
|
|
223
|
+
className: "mt-4 space-y-2",
|
|
224
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
225
|
+
className: "flex flex-wrap items-center gap-2",
|
|
226
|
+
children: [onOpenWorkflow && /* @__PURE__ */ jsx(Button, {
|
|
227
|
+
size: "sm",
|
|
228
|
+
variant: "outline",
|
|
229
|
+
"data-testid": "workflow-proposal-open",
|
|
230
|
+
onClick: () => onOpenWorkflow(proposal.appliedWorkflowKey ?? "", proposal.appliedVersion ?? ""),
|
|
231
|
+
children: tr("fluidgrids.ai.proposal.open", "Open draft {{version}}", { version: proposal.appliedVersion })
|
|
232
|
+
}), onRevert && revertTarget && /* @__PURE__ */ jsx(Button, {
|
|
233
|
+
size: "sm",
|
|
234
|
+
variant: "ghost",
|
|
235
|
+
"data-testid": "workflow-proposal-revert",
|
|
236
|
+
disabled: isDeciding,
|
|
237
|
+
onClick: () => onRevert(revertTarget.workflowKey, revertTarget.version),
|
|
238
|
+
children: tr("fluidgrids.ai.proposal.revert", "Revert to {{version}}", { version: revertTarget.version })
|
|
239
|
+
})]
|
|
240
|
+
}), !onRevert && proposal.restoreHint && /* @__PURE__ */ jsx("p", {
|
|
241
|
+
className: "text-xs text-text-secondary",
|
|
242
|
+
children: proposal.restoreHint
|
|
243
|
+
})]
|
|
244
|
+
})
|
|
245
|
+
]
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export { WorkflowProposalCard_exports as n, WorkflowProposalCard as t };
|