@burdenoff/microfe-subscriberbot 2026.1103.2 → 2026.1105.1
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/index.js +3 -3
- package/dist/stories/Accessibility.stories.d.ts +13 -0
- package/dist/stories/Accessibility.stories.d.ts.map +1 -0
- package/dist/stories/pages/AgentNewPage.stories.d.ts.map +1 -1
- package/dist/stories/pages/BankConnectionsPage.stories.d.ts +1 -0
- package/dist/stories/pages/BankConnectionsPage.stories.d.ts.map +1 -1
- package/dist/stories/pages/EnterpriseSpendPage.stories.d.ts.map +1 -1
- package/dist/stories/pages/InboxPage.stories.d.ts.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.js +168 -168
- package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
- package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts.map +1 -1
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js +116 -116
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
- package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts.map +1 -1
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js +211 -211
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
- package/dist/subscriberbot/components/Modal.d.ts.map +1 -1
- package/dist/subscriberbot/components/Modal.js +43 -33
- package/dist/subscriberbot/components/Modal.js.map +1 -1
- package/dist/subscriberbot/components/PostureOptions.d.ts.map +1 -1
- package/dist/subscriberbot/components/PostureOptions.js +10 -10
- package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
- package/dist/subscriberbot/components/StateViews.d.ts.map +1 -1
- package/dist/subscriberbot/components/StateViews.js +45 -37
- package/dist/subscriberbot/components/StateViews.js.map +1 -1
- package/dist/subscriberbot/components/StatusBadge.d.ts.map +1 -1
- package/dist/subscriberbot/components/StatusBadge.js +6 -6
- package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
- package/dist/subscriberbot/components/decisions/DecisionBanners.js +6 -6
- package/dist/subscriberbot/components/decisions/DecisionCard.d.ts.map +1 -1
- package/dist/subscriberbot/components/decisions/DecisionCard.js +149 -147
- package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileDashboard.js +127 -127
- package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +114 -114
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileScreen.js +1 -1
- package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +4 -4
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts.map +1 -1
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +11 -11
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
- package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts.map +1 -1
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js +29 -29
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +43 -43
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +4 -4
- package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementThread.js +14 -14
- package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
- package/dist/subscriberbot/components/savings/SavingsCards.d.ts.map +1 -1
- package/dist/subscriberbot/components/savings/SavingsCards.js +242 -237
- package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
- package/dist/subscriberbot/components/viz.d.ts +1 -0
- package/dist/subscriberbot/components/viz.d.ts.map +1 -1
- package/dist/subscriberbot/components/viz.js +100 -101
- package/dist/subscriberbot/components/viz.js.map +1 -1
- package/dist/subscriberbot/hooks/index.js +1 -1
- package/dist/subscriberbot/hooks/useFormError.d.ts +7 -0
- package/dist/subscriberbot/hooks/useFormError.d.ts.map +1 -0
- package/dist/subscriberbot/hooks/useFormError.js +28 -0
- package/dist/subscriberbot/hooks/useFormError.js.map +1 -0
- package/dist/subscriberbot/hooks/useFormatters.d.ts +11 -0
- package/dist/subscriberbot/hooks/useFormatters.d.ts.map +1 -0
- package/dist/subscriberbot/hooks/useFormatters.js +13 -0
- package/dist/subscriberbot/hooks/useFormatters.js.map +1 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +371 -370
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/hooks/useTr.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useTr.js +1 -1
- package/dist/subscriberbot/hooks/useTr.js.map +1 -1
- package/dist/subscriberbot/index.js +1 -1
- package/dist/subscriberbot/pages/AssetVaultPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/AssetVaultPage.js +124 -124
- package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
- package/dist/subscriberbot/pages/DashboardPage.d.ts +0 -10
- package/dist/subscriberbot/pages/DashboardPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/DashboardPage.js +107 -98
- package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.d.ts +0 -10
- package/dist/subscriberbot/pages/InboxPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.js +421 -402
- package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.js +130 -121
- package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
- package/dist/subscriberbot/pages/InvoicesPage.d.ts +0 -12
- package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InvoicesPage.js +237 -215
- package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
- package/dist/subscriberbot/pages/RenewalsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/RenewalsPage.js +303 -295
- package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
- package/dist/subscriberbot/pages/SavingsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/SavingsPage.js +57 -57
- package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/WorkflowsPage.d.ts +0 -13
- package/dist/subscriberbot/pages/WorkflowsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/WorkflowsPage.js +202 -196
- package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts +0 -18
- package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js +283 -275
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts +0 -6
- package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentNewPage.js +85 -77
- package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts +0 -9
- package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.js +136 -136
- package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts +0 -9
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +267 -260
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts +0 -10
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +96 -96
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts +0 -11
- package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionsPage.js +46 -46
- package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts +0 -11
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +181 -171
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts +0 -9
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +164 -164
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts +0 -9
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +197 -181
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts +0 -8
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +79 -79
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts +0 -9
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +147 -147
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts +0 -10
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +204 -188
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts +0 -9
- package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js +80 -80
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts +0 -10
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +484 -458
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts +0 -8
- package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js +146 -136
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts +0 -10
- package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js +88 -87
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts +0 -11
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +520 -490
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts +0 -8
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +104 -90
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts +0 -8
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +97 -96
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +76 -74
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts +5 -3
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts.map +1 -1
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +26 -25
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
- package/dist/subscriberbot/utils/formatters.d.ts +16 -5
- package/dist/subscriberbot/utils/formatters.d.ts.map +1 -1
- package/dist/subscriberbot/utils/formatters.js +57 -25
- package/dist/subscriberbot/utils/formatters.js.map +1 -1
- package/dist/subscriberbot/utils/plaidLink.d.ts +2 -1
- package/dist/subscriberbot/utils/plaidLink.d.ts.map +1 -1
- package/dist/subscriberbot/utils/plaidLink.js +21 -21
- package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { useTr as t } from "../../hooks/useTr.js";
|
|
3
|
+
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
|
+
import { StatusBadge as r } from "../../components/StatusBadge.js";
|
|
5
|
+
import { EmptyState as i } from "../../components/EmptyState.js";
|
|
6
6
|
import { ErrorView as a, LoadingView as o } from "../../components/StateViews.js";
|
|
7
7
|
import "../../components/index.js";
|
|
8
8
|
import { useActivateWorkflow as s, usePauseWorkflow as c, useSaveWorkflowGraph as l, useWorkflow as u } from "../../hooks/useSubscriberBotApi.js";
|
|
@@ -64,11 +64,11 @@ var V = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
|
|
|
64
64
|
width: 10,
|
|
65
65
|
height: 10
|
|
66
66
|
};
|
|
67
|
-
function J({ data: e, selected:
|
|
68
|
-
let
|
|
67
|
+
function J({ data: e, selected: n }) {
|
|
68
|
+
let r = t(), i = G[e.kind], a = i.icon;
|
|
69
69
|
return /* @__PURE__ */ P("div", {
|
|
70
70
|
"data-testid": `workflow-node-${e.kind.toLowerCase()}`,
|
|
71
|
-
className: `w-52 overflow-hidden rounded-xl border bg-bg-surface shadow-sm ${
|
|
71
|
+
className: `w-52 overflow-hidden rounded-xl border bg-bg-surface shadow-sm ${n ? "border-[var(--color-focus-ring)] ring-2 ring-[var(--color-focus-ring)]" : e.hasIssue ? "border-status-warning-text" : "border-border-subtle"}`,
|
|
72
72
|
children: [
|
|
73
73
|
e.kind !== "TRIGGER" && /* @__PURE__ */ N(R, {
|
|
74
74
|
type: "target",
|
|
@@ -76,7 +76,7 @@ function J({ data: e, selected: t }) {
|
|
|
76
76
|
style: q
|
|
77
77
|
}),
|
|
78
78
|
/* @__PURE__ */ N("div", {
|
|
79
|
-
className: `h-1 w-full ${
|
|
79
|
+
className: `h-1 w-full ${i.bar}`,
|
|
80
80
|
"aria-hidden": !0
|
|
81
81
|
}),
|
|
82
82
|
/* @__PURE__ */ P("div", {
|
|
@@ -91,11 +91,11 @@ function J({ data: e, selected: t }) {
|
|
|
91
91
|
}),
|
|
92
92
|
/* @__PURE__ */ N("p", {
|
|
93
93
|
className: "text-[10px] font-medium uppercase tracking-wide text-text-secondary",
|
|
94
|
-
children:
|
|
94
|
+
children: r(i.labelKey, i.fallback)
|
|
95
95
|
}),
|
|
96
96
|
e.hasIssue && /* @__PURE__ */ N(x, {
|
|
97
|
-
className: "
|
|
98
|
-
"aria-label":
|
|
97
|
+
className: "ms-auto h-3.5 w-3.5 text-status-warning-text",
|
|
98
|
+
"aria-label": r("workflows.builder.nodeHasIssue", "Needs attention")
|
|
99
99
|
})
|
|
100
100
|
]
|
|
101
101
|
}),
|
|
@@ -138,8 +138,8 @@ function J({ data: e, selected: t }) {
|
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
var ce = { workflow: J };
|
|
141
|
-
function le({ node: e, readOnly:
|
|
142
|
-
let a =
|
|
141
|
+
function le({ node: e, readOnly: n, onChange: r, onDelete: i }) {
|
|
142
|
+
let a = t(), o = G[e.kind], s = (t) => r({ config: {
|
|
143
143
|
...e.config,
|
|
144
144
|
...t
|
|
145
145
|
} });
|
|
@@ -160,8 +160,8 @@ function le({ node: e, readOnly: t, onChange: n, onDelete: r }) {
|
|
|
160
160
|
className: V,
|
|
161
161
|
value: e.label,
|
|
162
162
|
maxLength: 120,
|
|
163
|
-
disabled:
|
|
164
|
-
onChange: (e) =>
|
|
163
|
+
disabled: n,
|
|
164
|
+
onChange: (e) => r({ label: e.target.value })
|
|
165
165
|
})] }),
|
|
166
166
|
e.kind === "TRIGGER" && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
167
167
|
htmlFor: "wfb-event",
|
|
@@ -173,7 +173,7 @@ function le({ node: e, readOnly: t, onChange: n, onDelete: r }) {
|
|
|
173
173
|
value: typeof e.config.event == "string" ? e.config.event : "",
|
|
174
174
|
maxLength: 120,
|
|
175
175
|
placeholder: a("workflows.form.triggerPlaceholder", "e.g. InvoiceReceived, RenewalDetected"),
|
|
176
|
-
disabled:
|
|
176
|
+
disabled: n,
|
|
177
177
|
onChange: (e) => s({ event: e.target.value })
|
|
178
178
|
})] }),
|
|
179
179
|
e.kind === "ACTION" && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
@@ -184,7 +184,7 @@ function le({ node: e, readOnly: t, onChange: n, onDelete: r }) {
|
|
|
184
184
|
id: "wfb-action",
|
|
185
185
|
className: V,
|
|
186
186
|
value: typeof e.config.action == "string" ? e.config.action : "",
|
|
187
|
-
disabled:
|
|
187
|
+
disabled: n,
|
|
188
188
|
onChange: (e) => s({ action: e.target.value || void 0 }),
|
|
189
189
|
children: [/* @__PURE__ */ N("option", {
|
|
190
190
|
value: "",
|
|
@@ -203,7 +203,7 @@ function le({ node: e, readOnly: t, onChange: n, onDelete: r }) {
|
|
|
203
203
|
className: V,
|
|
204
204
|
maxLength: 1e3,
|
|
205
205
|
value: typeof e.config.message == "string" ? e.config.message : "",
|
|
206
|
-
disabled:
|
|
206
|
+
disabled: n,
|
|
207
207
|
onChange: (e) => s({ message: e.target.value })
|
|
208
208
|
})] })] }),
|
|
209
209
|
e.kind === "CONDITION" && /* @__PURE__ */ P("div", { children: [
|
|
@@ -218,7 +218,7 @@ function le({ node: e, readOnly: t, onChange: n, onDelete: r }) {
|
|
|
218
218
|
maxLength: 500,
|
|
219
219
|
placeholder: a("workflows.builder.inspector.expressionPlaceholder", "e.g. monthlySpend > 100"),
|
|
220
220
|
value: typeof e.config.expression == "string" ? e.config.expression : "",
|
|
221
|
-
disabled:
|
|
221
|
+
disabled: n,
|
|
222
222
|
onChange: (e) => s({ expression: e.target.value })
|
|
223
223
|
}),
|
|
224
224
|
/* @__PURE__ */ N("p", {
|
|
@@ -238,7 +238,7 @@ function le({ node: e, readOnly: t, onChange: n, onDelete: r }) {
|
|
|
238
238
|
step: 1,
|
|
239
239
|
className: V,
|
|
240
240
|
value: typeof e.config.durationMinutes == "number" ? e.config.durationMinutes : "",
|
|
241
|
-
disabled:
|
|
241
|
+
disabled: n,
|
|
242
242
|
onChange: (e) => {
|
|
243
243
|
let t = Number.parseInt(e.target.value, 10);
|
|
244
244
|
s({ durationMinutes: Number.isFinite(t) ? t : void 0 });
|
|
@@ -248,9 +248,9 @@ function le({ node: e, readOnly: t, onChange: n, onDelete: r }) {
|
|
|
248
248
|
className: "text-xs text-text-secondary",
|
|
249
249
|
children: a("workflows.builder.inspector.branchHint", "Connect two or more steps; they run in parallel.")
|
|
250
250
|
}),
|
|
251
|
-
!
|
|
251
|
+
!n && /* @__PURE__ */ P("button", {
|
|
252
252
|
type: "button",
|
|
253
|
-
onClick:
|
|
253
|
+
onClick: i,
|
|
254
254
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-status-error-text/40 px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle",
|
|
255
255
|
children: [
|
|
256
256
|
/* @__PURE__ */ N(k, { className: "h-3.5 w-3.5" }),
|
|
@@ -262,7 +262,7 @@ function le({ node: e, readOnly: t, onChange: n, onDelete: r }) {
|
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
264
|
function Y({ workflow: e }) {
|
|
265
|
-
let
|
|
265
|
+
let n = t(), a = l(), o = s(), u = c(), [d, S] = b(() => h(e.graph)), [w, T] = b(e.graph.issues), [E, O] = b(!1), [j, R] = b(null), [z, V] = b(null), [H, K] = b(null), [q, J] = b(1), Y = e.status === "ACTIVE", X = Y || a.isPending, [ue, de] = b(e.graph);
|
|
266
266
|
ue !== e.graph && (de(e.graph), E || (S(h(e.graph)), T(e.graph.issues)));
|
|
267
267
|
let Z = y(() => new Set(w.map((e) => e.nodeId).filter((e) => !!e)), [w]), fe = y(() => d.nodes.map((e) => ({
|
|
268
268
|
id: e.id,
|
|
@@ -274,22 +274,23 @@ function Y({ workflow: e }) {
|
|
|
274
274
|
selected: e.id === j,
|
|
275
275
|
data: {
|
|
276
276
|
kind: e.kind,
|
|
277
|
-
label: e.label || m(e.kind),
|
|
278
|
-
summary: ee(e),
|
|
277
|
+
label: e.label || n(`workflowBuilder.nodeLabel.${e.kind.toLowerCase()}`, m(e.kind)),
|
|
278
|
+
summary: ee(e, n),
|
|
279
279
|
hasIssue: !E && Z.has(e.id)
|
|
280
280
|
}
|
|
281
281
|
})), [
|
|
282
282
|
d.nodes,
|
|
283
283
|
j,
|
|
284
284
|
E,
|
|
285
|
-
Z
|
|
285
|
+
Z,
|
|
286
|
+
n
|
|
286
287
|
]), pe = y(() => d.edges.map((e) => ({
|
|
287
288
|
id: e.id,
|
|
288
289
|
source: e.source,
|
|
289
290
|
target: e.target,
|
|
290
291
|
sourceHandle: e.handle,
|
|
291
292
|
selected: e.id === z,
|
|
292
|
-
label: e.handle === "true" ?
|
|
293
|
+
label: e.handle === "true" ? n("workflows.builder.yes", "Yes") : e.handle === "false" ? n("workflows.builder.no", "No") : void 0,
|
|
293
294
|
markerEnd: {
|
|
294
295
|
type: oe.ArrowClosed,
|
|
295
296
|
color: "var(--color-text-secondary)"
|
|
@@ -301,7 +302,7 @@ function Y({ workflow: e }) {
|
|
|
301
302
|
})), [
|
|
302
303
|
d.edges,
|
|
303
304
|
z,
|
|
304
|
-
|
|
305
|
+
n
|
|
305
306
|
]), Q = v((e) => {
|
|
306
307
|
S((t) => e(t)), O(!0), K(null);
|
|
307
308
|
}, []), me = v((e) => {
|
|
@@ -336,11 +337,11 @@ function Y({ workflow: e }) {
|
|
|
336
337
|
}));
|
|
337
338
|
}, [Q, X]), ge = v((e) => {
|
|
338
339
|
if (X) return;
|
|
339
|
-
let t = e.sourceHandle ?? null,
|
|
340
|
-
if (
|
|
340
|
+
let t = e.sourceHandle ?? null, r = te(d, e.source, e.target, t, n);
|
|
341
|
+
if (r) {
|
|
341
342
|
K({
|
|
342
343
|
tone: "error",
|
|
343
|
-
text:
|
|
344
|
+
text: r
|
|
344
345
|
});
|
|
345
346
|
return;
|
|
346
347
|
}
|
|
@@ -357,21 +358,22 @@ function Y({ workflow: e }) {
|
|
|
357
358
|
}, [
|
|
358
359
|
Q,
|
|
359
360
|
d,
|
|
360
|
-
X
|
|
361
|
+
X,
|
|
362
|
+
n
|
|
361
363
|
]), _e = (e) => {
|
|
362
364
|
let t = `new-${q}`;
|
|
363
365
|
J((e) => e + 1);
|
|
364
|
-
let
|
|
365
|
-
Q((
|
|
366
|
-
nodes: [...
|
|
366
|
+
let r = ne(d.nodes);
|
|
367
|
+
Q((i) => ({
|
|
368
|
+
nodes: [...i.nodes, {
|
|
367
369
|
id: t,
|
|
368
370
|
kind: e,
|
|
369
|
-
label: m(e),
|
|
371
|
+
label: n(`workflowBuilder.nodeLabel.${e.toLowerCase()}`, m(e)),
|
|
370
372
|
config: g(e),
|
|
371
|
-
x:
|
|
372
|
-
y:
|
|
373
|
+
x: r.x,
|
|
374
|
+
y: r.y
|
|
373
375
|
}],
|
|
374
|
-
edges:
|
|
376
|
+
edges: i.edges
|
|
375
377
|
})), R(t), V(null);
|
|
376
378
|
}, $ = d.nodes.find((e) => e.id === j) ?? null, ve = () => {
|
|
377
379
|
a.mutate({
|
|
@@ -381,31 +383,31 @@ function Y({ workflow: e }) {
|
|
|
381
383
|
onSuccess: (e) => {
|
|
382
384
|
S(h(e)), T(e.issues), O(!1), R(null), V(null), K({
|
|
383
385
|
tone: "success",
|
|
384
|
-
text: e.valid ?
|
|
386
|
+
text: e.valid ? n("workflows.builder.savedValid", "Saved. This workflow is ready to activate.") : n("workflows.builder.savedWithIssues", "Saved as a draft. Fix the issues below before activating.")
|
|
385
387
|
});
|
|
386
388
|
},
|
|
387
389
|
onError: (e) => K({
|
|
388
390
|
tone: "error",
|
|
389
|
-
text: e instanceof Error ? e.message :
|
|
391
|
+
text: e instanceof Error ? e.message : n("common.error", "An error occurred")
|
|
390
392
|
})
|
|
391
393
|
});
|
|
392
394
|
}, ye = () => o.mutate(e.id, {
|
|
393
395
|
onSuccess: () => K({
|
|
394
396
|
tone: "success",
|
|
395
|
-
text:
|
|
397
|
+
text: n("workflows.builder.activated", "Workflow activated.")
|
|
396
398
|
}),
|
|
397
399
|
onError: (e) => K({
|
|
398
400
|
tone: "error",
|
|
399
|
-
text: e instanceof Error ? e.message :
|
|
401
|
+
text: e instanceof Error ? e.message : n("common.error", "An error occurred")
|
|
400
402
|
})
|
|
401
403
|
}), be = () => u.mutate(e.id, {
|
|
402
404
|
onSuccess: () => K({
|
|
403
405
|
tone: "success",
|
|
404
|
-
text:
|
|
406
|
+
text: n("workflows.builder.paused", "Workflow paused. You can edit it now.")
|
|
405
407
|
}),
|
|
406
408
|
onError: (e) => K({
|
|
407
409
|
tone: "error",
|
|
408
|
-
text: e instanceof Error ? e.message :
|
|
410
|
+
text: e instanceof Error ? e.message : n("common.error", "An error occurred")
|
|
409
411
|
})
|
|
410
412
|
}), xe = !Y && !E && w.length === 0 && d.nodes.length > 0;
|
|
411
413
|
return /* @__PURE__ */ P(M, { children: [
|
|
@@ -414,17 +416,17 @@ function Y({ workflow: e }) {
|
|
|
414
416
|
children: [/* @__PURE__ */ P("div", {
|
|
415
417
|
className: "flex flex-wrap items-center gap-2",
|
|
416
418
|
children: [
|
|
417
|
-
/* @__PURE__ */ N(
|
|
419
|
+
/* @__PURE__ */ N(r, { status: e.status }),
|
|
418
420
|
E && /* @__PURE__ */ N("span", {
|
|
419
421
|
className: "rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-xs font-medium text-status-warning-text",
|
|
420
|
-
children:
|
|
422
|
+
children: n("workflows.builder.unsaved", "Unsaved changes")
|
|
421
423
|
}),
|
|
422
424
|
!E && w.length === 0 && d.nodes.length > 0 && /* @__PURE__ */ P("span", {
|
|
423
425
|
className: "inline-flex items-center gap-1 text-xs text-status-success-text",
|
|
424
426
|
children: [
|
|
425
427
|
/* @__PURE__ */ N(C, { className: "h-3.5 w-3.5" }),
|
|
426
428
|
" ",
|
|
427
|
-
|
|
429
|
+
n("workflows.builder.valid", "Ready to run")
|
|
428
430
|
]
|
|
429
431
|
})
|
|
430
432
|
]
|
|
@@ -438,7 +440,7 @@ function Y({ workflow: e }) {
|
|
|
438
440
|
children: [
|
|
439
441
|
/* @__PURE__ */ N(D, { className: "h-4 w-4" }),
|
|
440
442
|
" ",
|
|
441
|
-
|
|
443
|
+
n("workflows.builder.pauseToEdit", "Pause to edit")
|
|
442
444
|
]
|
|
443
445
|
}) : /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("button", {
|
|
444
446
|
type: "button",
|
|
@@ -448,18 +450,18 @@ function Y({ workflow: e }) {
|
|
|
448
450
|
children: [
|
|
449
451
|
/* @__PURE__ */ N(ae, { className: "h-4 w-4" }),
|
|
450
452
|
" ",
|
|
451
|
-
a.isPending ?
|
|
453
|
+
a.isPending ? n("workflows.builder.saving", "Saving…") : n("workflows.builder.save", "Save")
|
|
452
454
|
]
|
|
453
455
|
}), /* @__PURE__ */ P("button", {
|
|
454
456
|
type: "button",
|
|
455
457
|
className: W,
|
|
456
458
|
onClick: ye,
|
|
457
459
|
disabled: !xe || o.isPending,
|
|
458
|
-
title: E ?
|
|
460
|
+
title: E ? n("workflows.builder.saveFirst", "Save your changes first") : w.length > 0 ? n("workflows.builder.fixIssuesFirst", "Fix the issues first") : void 0,
|
|
459
461
|
children: [
|
|
460
462
|
/* @__PURE__ */ N(ie, { className: "h-4 w-4" }),
|
|
461
463
|
" ",
|
|
462
|
-
o.isPending ?
|
|
464
|
+
o.isPending ? n("common.activating", "Activating…") : n("workflows.flow.activate", "Activate workflow")
|
|
463
465
|
]
|
|
464
466
|
})] })
|
|
465
467
|
})]
|
|
@@ -471,7 +473,7 @@ function Y({ workflow: e }) {
|
|
|
471
473
|
}),
|
|
472
474
|
Y && /* @__PURE__ */ N("p", {
|
|
473
475
|
className: "mt-3 text-sm text-text-secondary",
|
|
474
|
-
children:
|
|
476
|
+
children: n("workflows.builder.readOnlyActive", "This workflow is active, so it is shown read-only. Pause it to change its steps.")
|
|
475
477
|
}),
|
|
476
478
|
/* @__PURE__ */ P("div", {
|
|
477
479
|
className: "mt-4 grid grid-cols-1 gap-4 lg:grid-cols-[13rem_minmax(0,1fr)_18rem]",
|
|
@@ -481,22 +483,22 @@ function Y({ workflow: e }) {
|
|
|
481
483
|
className: "p-3",
|
|
482
484
|
children: [/* @__PURE__ */ N("p", {
|
|
483
485
|
className: "mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
484
|
-
children:
|
|
486
|
+
children: n("workflows.builder.palette", "Add a step")
|
|
485
487
|
}), /* @__PURE__ */ N("div", {
|
|
486
488
|
className: "grid grid-cols-2 gap-2 lg:grid-cols-1",
|
|
487
489
|
role: "group",
|
|
488
|
-
"aria-label":
|
|
490
|
+
"aria-label": n("workflows.builder.palette", "Add a step"),
|
|
489
491
|
children: f.map((e) => {
|
|
490
|
-
let
|
|
492
|
+
let t = G[e], r = t.icon;
|
|
491
493
|
return /* @__PURE__ */ P("button", {
|
|
492
494
|
type: "button",
|
|
493
495
|
disabled: X || !p(e, d.nodes),
|
|
494
496
|
onClick: () => _e(e),
|
|
495
|
-
title:
|
|
496
|
-
className: "flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-surface px-2.5 py-2 text-
|
|
497
|
+
title: n(`${t.labelKey}Hint`, t.hint),
|
|
498
|
+
className: "flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-surface px-2.5 py-2 text-start text-sm text-text-primary hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-50",
|
|
497
499
|
children: [/* @__PURE__ */ N(r, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ N("span", {
|
|
498
500
|
className: "truncate",
|
|
499
|
-
children: t
|
|
501
|
+
children: n(t.labelKey, t.fallback)
|
|
500
502
|
})]
|
|
501
503
|
}, e);
|
|
502
504
|
})
|
|
@@ -507,10 +509,10 @@ function Y({ workflow: e }) {
|
|
|
507
509
|
"data-testid": "workflow-canvas",
|
|
508
510
|
children: d.nodes.length === 0 ? /* @__PURE__ */ N("div", {
|
|
509
511
|
className: "flex h-full items-center justify-center p-6",
|
|
510
|
-
children: /* @__PURE__ */ N(
|
|
512
|
+
children: /* @__PURE__ */ N(i, {
|
|
511
513
|
icon: /* @__PURE__ */ N(A, { className: "h-10 w-10" }),
|
|
512
|
-
title:
|
|
513
|
-
description:
|
|
514
|
+
title: n("workflows.builder.emptyTitle", "Start with a trigger"),
|
|
515
|
+
description: n("workflows.builder.emptyDescription", "Add a trigger from the palette, then connect the steps that should follow it.")
|
|
514
516
|
})
|
|
515
517
|
}) : /* @__PURE__ */ P(se, {
|
|
516
518
|
nodes: fe,
|
|
@@ -565,7 +567,7 @@ function Y({ workflow: e }) {
|
|
|
565
567
|
className: "space-y-3",
|
|
566
568
|
children: [/* @__PURE__ */ N("p", {
|
|
567
569
|
className: "text-sm text-text-primary",
|
|
568
|
-
children:
|
|
570
|
+
children: n("workflows.builder.edgeSelected", "Connection selected")
|
|
569
571
|
}), /* @__PURE__ */ P("button", {
|
|
570
572
|
type: "button",
|
|
571
573
|
onClick: () => {
|
|
@@ -578,12 +580,12 @@ function Y({ workflow: e }) {
|
|
|
578
580
|
children: [
|
|
579
581
|
/* @__PURE__ */ N(k, { className: "h-3.5 w-3.5" }),
|
|
580
582
|
" ",
|
|
581
|
-
|
|
583
|
+
n("workflows.builder.deleteEdge", "Delete connection")
|
|
582
584
|
]
|
|
583
585
|
})]
|
|
584
586
|
}) : /* @__PURE__ */ N("p", {
|
|
585
587
|
className: "text-sm text-text-secondary",
|
|
586
|
-
children:
|
|
588
|
+
children: n("workflows.builder.inspectorEmpty", "Select a node to edit it. Drag from a node’s right edge to another node to connect them.")
|
|
587
589
|
})
|
|
588
590
|
}), /* @__PURE__ */ P(F, {
|
|
589
591
|
treatment: "metric",
|
|
@@ -591,22 +593,22 @@ function Y({ workflow: e }) {
|
|
|
591
593
|
"data-testid": "workflow-issues",
|
|
592
594
|
children: [/* @__PURE__ */ N("p", {
|
|
593
595
|
className: "mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
594
|
-
children:
|
|
596
|
+
children: n("workflows.builder.issues", "Validation")
|
|
595
597
|
}), E ? /* @__PURE__ */ N("p", {
|
|
596
598
|
className: "text-sm text-text-secondary",
|
|
597
|
-
children:
|
|
599
|
+
children: n("workflows.builder.issuesAfterSave", "Save to check the workflow.")
|
|
598
600
|
}) : w.length === 0 ? /* @__PURE__ */ P("p", {
|
|
599
601
|
className: "inline-flex items-center gap-1.5 text-sm text-status-success-text",
|
|
600
602
|
children: [
|
|
601
603
|
/* @__PURE__ */ N(C, { className: "h-4 w-4" }),
|
|
602
604
|
" ",
|
|
603
|
-
|
|
605
|
+
n("workflows.builder.noIssues", "No issues found")
|
|
604
606
|
]
|
|
605
607
|
}) : /* @__PURE__ */ N("ul", {
|
|
606
608
|
className: "space-y-2",
|
|
607
609
|
children: w.map((e, t) => /* @__PURE__ */ N("li", { children: /* @__PURE__ */ P("button", {
|
|
608
610
|
type: "button",
|
|
609
|
-
className: "flex w-full items-start gap-2 text-
|
|
611
|
+
className: "flex w-full items-start gap-2 text-start text-sm text-text-primary hover:underline disabled:no-underline",
|
|
610
612
|
disabled: !e.nodeId,
|
|
611
613
|
onClick: () => e.nodeId && R(e.nodeId),
|
|
612
614
|
children: [/* @__PURE__ */ N(x, { className: "mt-0.5 h-4 w-4 shrink-0 text-status-warning-text" }), /* @__PURE__ */ N("span", { children: e.message })]
|
|
@@ -619,16 +621,16 @@ function Y({ workflow: e }) {
|
|
|
619
621
|
] });
|
|
620
622
|
}
|
|
621
623
|
function X() {
|
|
622
|
-
let { id:
|
|
623
|
-
return /* @__PURE__ */ N(
|
|
624
|
+
let { id: r } = j(), s = t(), { navigateTo: c } = e(), { data: l, isLoading: d, isError: f, refetch: p } = u(r);
|
|
625
|
+
return /* @__PURE__ */ N(n, {
|
|
624
626
|
title: l?.name ?? s("workflows.builder.title", "Workflow builder"),
|
|
625
627
|
description: l ? s("workflows.builder.subtitle", "Visual builder · starts on {{trigger}}", { trigger: l.triggerEvent || "—" }) : void 0,
|
|
626
628
|
actions: /* @__PURE__ */ P("button", {
|
|
627
629
|
type: "button",
|
|
628
630
|
className: U,
|
|
629
|
-
onClick: () => c(
|
|
631
|
+
onClick: () => c(r ? `/workflows/${r}` : "/workflows"),
|
|
630
632
|
children: [
|
|
631
|
-
/* @__PURE__ */ N(S, { className: "h-4 w-4" }),
|
|
633
|
+
/* @__PURE__ */ N(S, { className: "rtl:rotate-180 h-4 w-4" }),
|
|
632
634
|
" ",
|
|
633
635
|
s("workflows.builder.back", "Workflows")
|
|
634
636
|
]
|
|
@@ -636,7 +638,7 @@ function X() {
|
|
|
636
638
|
children: d ? /* @__PURE__ */ N(o, { label: s("workflows.builder.loading", "Loading workflow…") }) : f ? /* @__PURE__ */ N(a, {
|
|
637
639
|
message: s("workflows.builder.error", "Could not load this workflow."),
|
|
638
640
|
onRetry: () => void p()
|
|
639
|
-
}) : l ? /* @__PURE__ */ N(Y, { workflow: l }, l.id) : /* @__PURE__ */ N(
|
|
641
|
+
}) : l ? /* @__PURE__ */ N(Y, { workflow: l }, l.id) : /* @__PURE__ */ N(i, {
|
|
640
642
|
title: s("workflows.builder.notFound", "Workflow not found"),
|
|
641
643
|
description: s("workflows.builder.notFoundDescription", "It may have been deleted, or it belongs to another workspace.")
|
|
642
644
|
})
|