@burdenoff/fluidgrids-fe-sdk 2026.1111.15 → 2026.1111.17
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/README.md +41 -0
- package/dist/AiStudioPage-kJHSsIcj.js +774 -0
- package/dist/ApprovalInboxPage-dbBDSJ-f.js +558 -0
- package/dist/DataSinkDashboardPage-1h2QsMzH.js +270 -0
- package/dist/DataTablesPage-BZy2z0LB.js +1690 -0
- package/dist/EntityTagPicker-BqRNsLCQ.js +135 -0
- package/dist/{ExecutionDetailPage-DO38vZ_F.js → ExecutionDetailPage-BdcZmLT4.js} +799 -4420
- package/dist/ExecutionDetailPage-DvQ667OE.d.ts +10 -0
- package/dist/ExecutionsListPage-BCUJoAIE.js +2742 -0
- package/dist/{FailureTriagePanel-BHiduL7A.js → FailureTriagePanel-B9hDQymi.js} +4 -97
- package/dist/{FluidGridsProvider-B9RR_CI_.js → FluidGridsProvider-dvZSNtSW.js} +28 -350
- package/dist/HistoryPage-BLoRpJ1R.d.ts +6 -0
- package/dist/{HistoryPage-CA42pU85.js → HistoryPage-U0tqupBN.js} +6 -4
- package/dist/HumanRequestCard-D-ooVPDn.js +439 -0
- package/dist/{InsightsPage-CBoN_Mj9.js → InsightsPage-CALo16eB.js} +17 -328
- package/dist/ManagedAiPolicyAuthority-BxwJ3ptd.js +40 -0
- package/dist/{ManagedAiPolicyAuthority-CGux_DaV.d.ts → ManagedAiPolicyAuthority-DM3t3wNr.d.ts} +1 -5
- package/dist/ManagedAiPolicyAuthorityContext-CNkxIOZ1.js +10 -0
- package/dist/{MissingNodesInstallModal-Dm0nMBXM.js → MissingNodesInstallModal-CMybsI8h.js} +3 -2
- package/dist/{NodesPage-ClvhUfbh.js → NodesPage-Bf5PhfBK.js} +7 -3
- package/dist/NodesPage-DEbnz9iU.d.ts +6 -0
- package/dist/{PublishCustomNodeAction-D2F7oN0S.js → PublishCustomNodeAction-5XXnSA3H.js} +3 -45
- package/dist/QuotaExhaustedDialog-7IFSaLyi.js +54 -0
- package/dist/RunnerStatusPill-Ctg4TJcP.js +187 -0
- package/dist/RunnersPage-CLCOCclc.js +467 -0
- package/dist/{ManagedAiPolicyAuthority-CKihmbJE.js → SettingsPage-CgkRlCM5.js} +19 -50
- package/dist/SettingsPage-DMHQFj5-.d.ts +9 -0
- package/dist/TagFilterSelect-DCBOH6Ou.js +41 -0
- package/dist/TaskQueuesPage-9VgSnLdL.js +951 -0
- package/dist/TemplateCard-DsC0KNH1.js +1416 -0
- package/dist/{TemplateConfigurationModal-Bs_V-E4u.js → TemplateConfigurationModal-BhGWIzpm.js} +3 -2
- package/dist/{TemplateDetailPanel-MlT39VLG.js → TemplateDetailPanel-D4cUVr-m.js} +3 -3
- package/dist/TemplatePreview-GthzCOSo.js +231 -0
- package/dist/TemplatesPage-BG3H-6v6.d.ts +10 -0
- package/dist/{TemplatesPage-CHVpWBuw.js → TemplatesPage-CsDNT54N.js} +11 -228
- package/dist/VariablesPage-67WR_lVE.js +949 -0
- package/dist/{VersionDiffDialog-Dq2xlPFI.js → VersionDiffDialog-DSN0mU0f.js} +2 -1
- package/dist/WorkflowBuilder-DEi_9YOb.js +555 -0
- package/dist/{WorkflowSearchRedirect-3gyHcYY2.js → WorkflowBuilder-iPqXgbYr.js} +19 -585
- package/dist/{WorkflowProposalCard-8Vr56kQa.js → WorkflowProposalCard-qrEeNyYG.js} +4 -405
- package/dist/WorkflowSearchRedirect-DwDNZ_q5.js +36 -0
- package/dist/{WorkflowShareDialog-0Ai1HED-.js → WorkflowShareDialog-B_gn968c.js} +6 -52
- package/dist/{WorkflowsList-CJ3KmMHX.js → WorkflowsList-CA20dVIl.js} +11 -6
- package/dist/WorkflowsList-CcNDQge5.d.ts +6 -0
- package/dist/agent-form-Bfvm32j1.js +83 -0
- package/dist/{agentTools-B1IK1JEO.js → agentTools-CkRJB7r5.js} +3 -2
- package/dist/{ai-usage-D5p7ZeRR.js → ai-usage-glCwHyQz.js} +1 -1
- package/dist/api-BrCHB5oA.js +224 -0
- package/dist/api-C8e0iV-Q.js +55 -0
- package/dist/button-DG7y_FVJ.js +48 -0
- package/dist/{canvasNoteTools-eewVHVuy.js → canvasNoteTools-CQIc7Oxg.js} +2 -2
- package/dist/client-C9XSzSXr.js +1147 -0
- package/dist/{codec-client-DstqyzTN.js → codec-client-CJ95Rmqo.js} +1 -1
- package/dist/constants-B2lhWNoN.js +202 -0
- package/dist/constants-XdvUxeWK.d.ts +162 -0
- package/dist/dialog-Cjb4lB4D.js +105 -0
- package/dist/executions.d.ts +1 -1
- package/dist/executions.js +2 -1
- package/dist/feature-flags-DM5myWaD.js +296 -0
- package/dist/flags.d.ts +3 -0
- package/dist/flags.js +4 -0
- package/dist/{flow-builder-C_3sY3pZ.js → flow-builder-y2Y1iG4Y.js} +182 -1821
- package/dist/{node-endpoint-configs-DHFGA5MQ.js → graphql-operation-types-kX-MMjgW.js} +1 -1194
- package/dist/{graphql-types-XcDLtFwU.js → graphql-types-CDKVWH2R.js} +2 -202
- package/dist/history.d.ts +1 -1
- package/dist/history.js +1 -1
- package/dist/index-72XFgvbn.d.ts +132 -0
- package/dist/index-BcdtKBM-.d.ts +56 -0
- package/dist/{index-B3BWqafN.d.ts → index-DjiFgEQl.d.ts} +5 -131
- package/dist/{index-DRf25-D3.d.ts → index-W2o__Nm6.d.ts} +32 -214
- package/dist/index.d.ts +13 -9
- package/dist/index.js +50 -5300
- package/dist/{node-detail-view-CAws5qjg.js → node-detail-view-B91kXzIy.js} +11 -8
- package/dist/node-endpoint-configs-B5bjNMDW.js +37 -0
- package/dist/node-registry-refresh-Dy0uRg9f.js +84 -0
- package/dist/nodes.d.ts +1 -1
- package/dist/nodes.js +1 -1
- package/dist/observability.d.ts +1 -1
- package/dist/observability.js +2 -1
- package/dist/{quick-config-panel-DOzNkSVV.js → quick-config-panel-DggPl1vY.js} +2 -2
- package/dist/rolldown-runtime-hDbaFkMy.js +18 -0
- package/dist/run-display-BycKYSU0.js +46 -0
- package/dist/run-list-links-ByYC0OlV.js +98 -0
- package/dist/settings.d.ts +2 -1
- package/dist/settings.js +2 -1
- package/dist/shared-CMfn30xT.js +196 -0
- package/dist/templates.d.ts +1 -1
- package/dist/templates.js +2 -1
- package/dist/theme-provider-B3mIuz2d.js +11 -0
- package/dist/{useAgentDefinitions-NFtLytDR.js → useAgentDefinitions-Dpz0HDTq.js} +2 -1
- package/dist/useDurableParity-CzUQMFJ3.js +415 -0
- package/dist/useEntityTags-DhnsZcTl.js +236 -0
- package/dist/{useExecutions-DkS0FTfw.js → useExecutions-9aLuOt1c.js} +4 -3
- package/dist/{useObservability-BkxhHZsX.js → useObservability-CfEw3ZFD.js} +2 -2
- package/dist/{useRunHistory-DHehG09Z.js → useRunHistory-B1xJDwl1.js} +4 -3
- package/dist/{useWorkflows-DyhtoVwp.js → useWorkflows-BlVVu8NM.js} +3 -2
- package/dist/utils-uaL5UVxb.js +65 -0
- package/dist/workflow-builder.d.ts +1 -1
- package/dist/workflow-builder.js +4 -2
- package/dist/workflow-host.d.ts +6 -0
- package/dist/workflow-host.js +9 -0
- package/dist/workflow-pages.d.ts +55 -0
- package/dist/workflow-pages.js +113 -0
- package/dist/workflows-list.d.ts +1 -1
- package/dist/workflows-list.js +1 -1
- package/package.json +13 -1
- package/dist/ExecutionDetailPage-MvsnOnE1.d.ts +0 -4
- package/dist/HistoryPage-BqUizaFv.d.ts +0 -3
- package/dist/NodesPage-C97-9K2Y.d.ts +0 -3
- package/dist/TemplatesPage-D0qnXzHh.d.ts +0 -4
- package/dist/WorkflowsList-0d5GSKdh.d.ts +0 -3
- package/dist/agent-form-BvMWhQ42.js +0 -496
|
@@ -1,341 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { jn as useContinuousOptimisationEnabled } from "./FluidGridsProvider-B9RR_CI_.js";
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
|
|
4
3
|
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
5
|
-
import {
|
|
4
|
+
import { o as useRunReplayActions, r as useInsightsData } from "./useObservability-CfEw3ZFD.js";
|
|
5
|
+
import { a as getTopFailingWorkflows, i as getTopFailingNodes, n as formatDuration, o as percentage, r as getFailureBreakdown } from "./utils-uaL5UVxb.js";
|
|
6
|
+
import { n as FailureTriagePanel } from "./FailureTriagePanel-B9hDQymi.js";
|
|
7
|
+
import { o as useContinuousOptimisationEnabled } from "./feature-flags-DM5myWaD.js";
|
|
8
|
+
import { i as SdkPermissionButton, s as useFluidGridsPermission, t as FLUIDGRIDS_PERMISSIONS } from "./constants-B2lhWNoN.js";
|
|
9
|
+
import { HC as OptimisationDismissReason, UC as OptimisationKind, WC as OptimisationSuggestionStatus } from "./graphql-types-CDKVWH2R.js";
|
|
10
|
+
import { _ as throwIfResultError, n as getFluidGridsClient } from "./client-C9XSzSXr.js";
|
|
11
|
+
import { Dn as SetContinuousOptimisationEnabledDocument, Ft as OptimisationSuggestionsDocument, Ht as ProposeOptimisationDocument, Pn as SnoozeOptimisationSuggestionDocument, Wr as WorkflowProposalDocument, Z as DismissOptimisationSuggestionDocument, pt as FgRunOptimisationScanDocument, rt as ErrorAnalyticsDocument, w as ContinuousOptimisationSettingsDocument, wi as WorkspaceAiUsageDocument } from "./graphql-operation-types-kX-MMjgW.js";
|
|
12
|
+
import { a as formatTokens, c as DISMISS_REASONS, f as monthlySavingLabel, i as aiSpendPeriod, l as evidenceFacts, p as shortRunId, r as aiCost, s as runsOfWorkflowPath, t as AI_SPEND_RANGE_DAYS, u as evidenceWindowDays } from "./ai-usage-glCwHyQz.js";
|
|
13
|
+
import { i as utcDay, r as runListPath } from "./run-list-links-ByYC0OlV.js";
|
|
6
14
|
import { t as proposalCanvasPath } from "./useRequestedProposal-B7uPXfZB.js";
|
|
7
|
-
import { c as runListPath, l as utcDay, n as FailureTriagePanel } from "./FailureTriagePanel-BHiduL7A.js";
|
|
8
|
-
import { a as formatTokens, c as DISMISS_REASONS, f as monthlySavingLabel, i as aiSpendPeriod, l as evidenceFacts, p as shortRunId, r as aiCost, s as runsOfWorkflowPath, t as AI_SPEND_RANGE_DAYS, u as evidenceWindowDays } from "./ai-usage-D5p7ZeRR.js";
|
|
9
|
-
import { n as useDataSinks, o as useRunReplayActions, r as useInsightsData, t as useDataSinkData } from "./useObservability-BkxhHZsX.js";
|
|
10
15
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
11
16
|
import { Link, useNavigate } from "react-router";
|
|
12
17
|
import { Icon } from "@iconify/react";
|
|
13
18
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
19
|
import { toast } from "sonner";
|
|
15
|
-
import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle,
|
|
20
|
+
import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Label, Textarea } from "@burdenoff/fe-libs/ui";
|
|
16
21
|
import { Button as Button$1 } from "@burdenoff/fe-libs/button";
|
|
17
22
|
import { BadgeDollarSign, DatabaseZap, Lightbulb, RotateCcw, Scissors, ShieldCheck, Timer } from "lucide-react";
|
|
18
23
|
|
|
19
|
-
// src/modules/observability/utils.ts
|
|
20
|
-
function percentage(value, total) {
|
|
21
|
-
if (total <= 0) return 0;
|
|
22
|
-
return Math.round(value / total * 1e3) / 10;
|
|
23
|
-
}
|
|
24
|
-
function getFailureBreakdown(runs) {
|
|
25
|
-
const counts = /* @__PURE__ */ new Map();
|
|
26
|
-
for (const run of runs) {
|
|
27
|
-
const key = run.errorType || "UNKNOWN";
|
|
28
|
-
counts.set(key, (counts.get(key) ?? 0) + 1);
|
|
29
|
-
}
|
|
30
|
-
return [...counts.entries()].map(([key, count]) => ({
|
|
31
|
-
key,
|
|
32
|
-
count
|
|
33
|
-
})).sort((a, b) => b.count - a.count || a.key.localeCompare(b.key));
|
|
34
|
-
}
|
|
35
|
-
function getTopFailingWorkflows(runs) {
|
|
36
|
-
const counts = /* @__PURE__ */ new Map();
|
|
37
|
-
for (const run of runs) {
|
|
38
|
-
const current = counts.get(run.workflowKey);
|
|
39
|
-
if (current) current.count += 1;
|
|
40
|
-
else counts.set(run.workflowKey, {
|
|
41
|
-
workflowKey: run.workflowKey,
|
|
42
|
-
label: run.workflow?.name || run.workflowKey,
|
|
43
|
-
count: 1
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
return [...counts.values()].sort((a, b) => b.count - a.count || a.label.localeCompare(b.label));
|
|
47
|
-
}
|
|
48
|
-
function getTopFailingNodes(nodeUsageStats) {
|
|
49
|
-
return [...nodeUsageStats].filter((stat) => stat.failureCount > 0).sort((a, b) => b.failureCount - a.failureCount || a.nodeType.localeCompare(b.nodeType));
|
|
50
|
-
}
|
|
51
|
-
function formatDuration(seconds) {
|
|
52
|
-
if (seconds === null || seconds === void 0 || !Number.isFinite(seconds)) return "—";
|
|
53
|
-
if (seconds < 1) return `${Math.round(seconds * 1e3)}ms`;
|
|
54
|
-
if (seconds < 60) return `${seconds.toFixed(1)}s`;
|
|
55
|
-
return `${Math.floor(seconds / 60)}m ${Math.round(seconds % 60)}s`;
|
|
56
|
-
}
|
|
57
|
-
function formatBytes(bytes) {
|
|
58
|
-
if (!Number.isFinite(bytes) || bytes < 0) return "—";
|
|
59
|
-
if (bytes < 1024) return `${bytes} B`;
|
|
60
|
-
const units = [
|
|
61
|
-
"KB",
|
|
62
|
-
"MB",
|
|
63
|
-
"GB",
|
|
64
|
-
"TB"
|
|
65
|
-
];
|
|
66
|
-
let value = bytes / 1024;
|
|
67
|
-
let unit = units[0];
|
|
68
|
-
for (let i = 1; i < units.length && value >= 1024; i += 1) {
|
|
69
|
-
value /= 1024;
|
|
70
|
-
unit = units[i];
|
|
71
|
-
}
|
|
72
|
-
return `${value.toFixed(value >= 10 ? 0 : 1)} ${unit}`;
|
|
73
|
-
}
|
|
74
|
-
function prettyJson(value) {
|
|
75
|
-
try {
|
|
76
|
-
return JSON.stringify(value, null, 2) ?? "null";
|
|
77
|
-
} catch {
|
|
78
|
-
return String(value);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// src/modules/observability/pages/DataSinkDashboardPage.tsx
|
|
83
|
-
function valueLabel(value) {
|
|
84
|
-
if (value === null || value === void 0) return "—";
|
|
85
|
-
if (typeof value === "object") return JSON.stringify(value);
|
|
86
|
-
return String(value);
|
|
87
|
-
}
|
|
88
|
-
function DataPreview({ value }) {
|
|
89
|
-
const tr = useTr();
|
|
90
|
-
if (Array.isArray(value)) {
|
|
91
|
-
const rows = value.filter((item) => Boolean(item) && typeof item === "object" && !Array.isArray(item));
|
|
92
|
-
if (rows.length > 0) {
|
|
93
|
-
const keys = [...new Set(rows.flatMap((row) => Object.keys(row)))].slice(0, 12);
|
|
94
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
95
|
-
className: "overflow-x-auto rounded-lg border border-border-secondary",
|
|
96
|
-
children: [/* @__PURE__ */ jsxs("table", {
|
|
97
|
-
className: "min-w-full text-left text-sm",
|
|
98
|
-
children: [/* @__PURE__ */ jsx("thead", {
|
|
99
|
-
className: "bg-background-tertiary text-xs uppercase text-text-secondary",
|
|
100
|
-
children: /* @__PURE__ */ jsx("tr", { children: keys.map((key) => /* @__PURE__ */ jsx("th", {
|
|
101
|
-
className: "whitespace-nowrap px-3 py-2 font-medium",
|
|
102
|
-
children: key
|
|
103
|
-
}, key)) })
|
|
104
|
-
}), /* @__PURE__ */ jsx("tbody", {
|
|
105
|
-
className: "divide-y divide-border-secondary",
|
|
106
|
-
children: rows.slice(0, 50).map((row, index) => /* @__PURE__ */ jsx("tr", {
|
|
107
|
-
className: "text-text-primary",
|
|
108
|
-
children: keys.map((key) => /* @__PURE__ */ jsx("td", {
|
|
109
|
-
className: "max-w-xs truncate px-3 py-2",
|
|
110
|
-
children: valueLabel(row[key])
|
|
111
|
-
}, key))
|
|
112
|
-
}, index))
|
|
113
|
-
})]
|
|
114
|
-
}), rows.length > 50 && /* @__PURE__ */ jsx("p", {
|
|
115
|
-
className: "border-t border-border-secondary px-3 py-2 text-xs text-text-secondary",
|
|
116
|
-
children: tr("fluidgrids.dataSinks.previewLimit", "Showing the first 50 rows")
|
|
117
|
-
})]
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return /* @__PURE__ */ jsx("pre", {
|
|
122
|
-
className: "max-h-[28rem] overflow-auto rounded-lg border border-border-secondary bg-background-primary p-4 text-xs text-text-primary",
|
|
123
|
-
children: prettyJson(value)
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
function SinkCard({ sink, selected, onSelect }) {
|
|
127
|
-
const tr = useTr();
|
|
128
|
-
return /* @__PURE__ */ jsxs("button", {
|
|
129
|
-
type: "button",
|
|
130
|
-
onClick: onSelect,
|
|
131
|
-
className: `w-full rounded-lg border p-4 text-left transition-colors ${selected ? "border-action-primary-bg bg-action-primary-bg/10" : "border-border-secondary bg-background-secondary hover:border-action-primary-bg/60"}`,
|
|
132
|
-
"aria-pressed": selected,
|
|
133
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
134
|
-
className: "flex items-start justify-between gap-3",
|
|
135
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
136
|
-
className: "min-w-0",
|
|
137
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
138
|
-
className: "truncate font-medium text-text-primary",
|
|
139
|
-
children: sink.name || sink.key
|
|
140
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
141
|
-
className: "mt-1 truncate font-mono text-xs text-text-secondary",
|
|
142
|
-
children: sink.key
|
|
143
|
-
})]
|
|
144
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
145
|
-
className: "shrink-0 rounded-full bg-background-tertiary px-2 py-0.5 text-xs text-text-secondary",
|
|
146
|
-
children: sink.status
|
|
147
|
-
})]
|
|
148
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
149
|
-
className: "mt-3 flex items-center justify-between text-xs text-text-secondary",
|
|
150
|
-
children: [/* @__PURE__ */ jsx("span", { children: formatBytes(sink.sizeBytes) }), /* @__PURE__ */ jsxs("span", { children: [
|
|
151
|
-
sink.linkedWorkflowCount,
|
|
152
|
-
" ",
|
|
153
|
-
tr("fluidgrids.dataSinks.workflows", "workflows")
|
|
154
|
-
] })]
|
|
155
|
-
})]
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
function DataSinkDashboardPage() {
|
|
159
|
-
const tr = useTr();
|
|
160
|
-
const [search, setSearch] = useState("");
|
|
161
|
-
const [selectedId, setSelectedId] = useState(null);
|
|
162
|
-
const { sinks, totalCount, loading, error, refetch } = useDataSinks(search);
|
|
163
|
-
const selectedSink = useMemo(() => sinks.find((sink) => sink.id === selectedId) ?? sinks[0] ?? null, [selectedId, sinks]);
|
|
164
|
-
const { sinkData, loading: dataLoading, error: dataError, refetch: refetchData } = useDataSinkData(selectedSink);
|
|
165
|
-
useEffect(() => {
|
|
166
|
-
if (selectedSink && selectedSink.id !== selectedId) setSelectedId(selectedSink.id);
|
|
167
|
-
}, [selectedId, selectedSink]);
|
|
168
|
-
const payload = sinkData?.extracted ?? sinkData?.raw;
|
|
169
|
-
const totalBytes = sinks.reduce((total, sink) => total + sink.sizeBytes, 0);
|
|
170
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
171
|
-
className: "min-h-screen bg-background-primary p-4 sm:p-6",
|
|
172
|
-
children: [
|
|
173
|
-
/* @__PURE__ */ jsxs("header", {
|
|
174
|
-
className: "mb-6 flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
175
|
-
"data-tour": "fluidgrids-data-sinks-header",
|
|
176
|
-
children: [/* @__PURE__ */ jsxs("div", { children: [
|
|
177
|
-
/* @__PURE__ */ jsx("p", {
|
|
178
|
-
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
179
|
-
children: tr("fluidgrids.dataSinks.kicker", "BigConsole data")
|
|
180
|
-
}),
|
|
181
|
-
/* @__PURE__ */ jsx("h1", {
|
|
182
|
-
className: "mt-1 text-2xl font-semibold text-text-primary sm:text-3xl",
|
|
183
|
-
children: tr("fluidgrids.dataSinks.title", "DataSink dashboard")
|
|
184
|
-
}),
|
|
185
|
-
/* @__PURE__ */ jsx("p", {
|
|
186
|
-
className: "mt-1 text-sm text-text-secondary",
|
|
187
|
-
children: tr("fluidgrids.dataSinks.subtitle", "Inspect workflow-produced data and its freshness without leaving FluidGrids.")
|
|
188
|
-
})
|
|
189
|
-
] }), /* @__PURE__ */ jsxs(Button$1, {
|
|
190
|
-
variant: "outline",
|
|
191
|
-
onClick: () => void refetch(),
|
|
192
|
-
disabled: loading,
|
|
193
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
194
|
-
icon: "mdi:refresh",
|
|
195
|
-
className: "mr-1",
|
|
196
|
-
width: 16
|
|
197
|
-
}), tr("fluidgrids.dataSinks.refresh", "Refresh")]
|
|
198
|
-
})]
|
|
199
|
-
}),
|
|
200
|
-
/* @__PURE__ */ jsxs("section", {
|
|
201
|
-
className: "mb-6 grid gap-4 sm:grid-cols-3",
|
|
202
|
-
"data-tour": "fluidgrids-data-sinks-stats",
|
|
203
|
-
children: [
|
|
204
|
-
/* @__PURE__ */ jsxs("div", {
|
|
205
|
-
className: "rounded-xl border border-border-secondary bg-background-secondary p-4",
|
|
206
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
207
|
-
className: "text-sm text-text-secondary",
|
|
208
|
-
children: tr("fluidgrids.dataSinks.totalSinks", "DataSinks")
|
|
209
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
210
|
-
className: "mt-2 text-2xl font-semibold text-text-primary",
|
|
211
|
-
children: totalCount
|
|
212
|
-
})]
|
|
213
|
-
}),
|
|
214
|
-
/* @__PURE__ */ jsxs("div", {
|
|
215
|
-
className: "rounded-xl border border-border-secondary bg-background-secondary p-4",
|
|
216
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
217
|
-
className: "text-sm text-text-secondary",
|
|
218
|
-
children: tr("fluidgrids.dataSinks.activeSinks", "Active sinks")
|
|
219
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
220
|
-
className: "mt-2 text-2xl font-semibold text-status-success-text",
|
|
221
|
-
children: sinks.filter((sink) => sink.isActive).length
|
|
222
|
-
})]
|
|
223
|
-
}),
|
|
224
|
-
/* @__PURE__ */ jsxs("div", {
|
|
225
|
-
className: "rounded-xl border border-border-secondary bg-background-secondary p-4",
|
|
226
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
227
|
-
className: "text-sm text-text-secondary",
|
|
228
|
-
children: tr("fluidgrids.dataSinks.totalStorage", "Visible storage")
|
|
229
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
230
|
-
className: "mt-2 text-2xl font-semibold text-text-primary",
|
|
231
|
-
children: formatBytes(totalBytes)
|
|
232
|
-
})]
|
|
233
|
-
})
|
|
234
|
-
]
|
|
235
|
-
}),
|
|
236
|
-
error && /* @__PURE__ */ jsx("div", {
|
|
237
|
-
role: "alert",
|
|
238
|
-
className: "mb-6 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-4 text-sm text-status-error-text",
|
|
239
|
-
children: error.message
|
|
240
|
-
}),
|
|
241
|
-
/* @__PURE__ */ jsxs("div", {
|
|
242
|
-
className: "grid gap-6 xl:grid-cols-[22rem_minmax(0,1fr)]",
|
|
243
|
-
children: [/* @__PURE__ */ jsxs("aside", {
|
|
244
|
-
className: "space-y-3",
|
|
245
|
-
"data-tour": "fluidgrids-data-sinks-list",
|
|
246
|
-
children: [
|
|
247
|
-
/* @__PURE__ */ jsx(Input, {
|
|
248
|
-
value: search,
|
|
249
|
-
onChange: (event) => setSearch(event.target.value),
|
|
250
|
-
placeholder: tr("fluidgrids.dataSinks.search", "Search by name or key"),
|
|
251
|
-
"aria-label": tr("fluidgrids.dataSinks.search", "Search by name or key")
|
|
252
|
-
}),
|
|
253
|
-
loading && sinks.length === 0 && /* @__PURE__ */ jsx("p", {
|
|
254
|
-
className: "p-4 text-sm text-text-secondary",
|
|
255
|
-
children: tr("fluidgrids.dataSinks.loading", "Loading DataSinks…")
|
|
256
|
-
}),
|
|
257
|
-
!loading && sinks.length === 0 && /* @__PURE__ */ jsx("div", {
|
|
258
|
-
className: "rounded-lg border border-dashed border-border-secondary p-6 text-center text-sm text-text-secondary",
|
|
259
|
-
children: tr("fluidgrids.dataSinks.empty", "No active DataSinks found.")
|
|
260
|
-
}),
|
|
261
|
-
sinks.map((sink) => /* @__PURE__ */ jsx(SinkCard, {
|
|
262
|
-
sink,
|
|
263
|
-
selected: sink.id === selectedSink?.id,
|
|
264
|
-
onSelect: () => setSelectedId(sink.id)
|
|
265
|
-
}, sink.id))
|
|
266
|
-
]
|
|
267
|
-
}), /* @__PURE__ */ jsxs("main", {
|
|
268
|
-
className: "min-w-0 rounded-xl border border-border-secondary bg-background-secondary p-5",
|
|
269
|
-
"data-tour": "fluidgrids-data-sinks-preview",
|
|
270
|
-
children: [!selectedSink && /* @__PURE__ */ jsxs("div", {
|
|
271
|
-
className: "flex min-h-64 flex-col items-center justify-center text-center",
|
|
272
|
-
children: [
|
|
273
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
274
|
-
icon: "mdi:database-outline",
|
|
275
|
-
className: "mb-3 text-text-secondary",
|
|
276
|
-
width: 40
|
|
277
|
-
}),
|
|
278
|
-
/* @__PURE__ */ jsx("p", {
|
|
279
|
-
className: "font-medium text-text-primary",
|
|
280
|
-
children: tr("fluidgrids.dataSinks.selectTitle", "Select a DataSink")
|
|
281
|
-
}),
|
|
282
|
-
/* @__PURE__ */ jsx("p", {
|
|
283
|
-
className: "mt-1 text-sm text-text-secondary",
|
|
284
|
-
children: tr("fluidgrids.dataSinks.selectDescription", "Choose a sink to inspect its latest payload.")
|
|
285
|
-
})
|
|
286
|
-
]
|
|
287
|
-
}), selectedSink && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
288
|
-
/* @__PURE__ */ jsxs("div", {
|
|
289
|
-
className: "mb-5 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",
|
|
290
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
291
|
-
className: "min-w-0",
|
|
292
|
-
children: [/* @__PURE__ */ jsx("h2", {
|
|
293
|
-
className: "truncate text-lg font-semibold text-text-primary",
|
|
294
|
-
children: selectedSink.name || selectedSink.key
|
|
295
|
-
}), /* @__PURE__ */ jsxs("p", {
|
|
296
|
-
className: "mt-1 font-mono text-xs text-text-secondary",
|
|
297
|
-
children: [
|
|
298
|
-
selectedSink.key,
|
|
299
|
-
" ·",
|
|
300
|
-
" ",
|
|
301
|
-
tr("fluidgrids.dataSinks.updated", "Updated"),
|
|
302
|
-
" ",
|
|
303
|
-
new Date(selectedSink.lastRefreshedAt).toLocaleString()
|
|
304
|
-
]
|
|
305
|
-
})]
|
|
306
|
-
}), /* @__PURE__ */ jsxs(Button$1, {
|
|
307
|
-
variant: "outline",
|
|
308
|
-
size: "sm",
|
|
309
|
-
onClick: () => void refetchData(),
|
|
310
|
-
disabled: dataLoading,
|
|
311
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
312
|
-
icon: "mdi:database-refresh-outline",
|
|
313
|
-
className: "mr-1",
|
|
314
|
-
width: 16
|
|
315
|
-
}), tr("fluidgrids.dataSinks.refreshPayload", "Refresh payload")]
|
|
316
|
-
})]
|
|
317
|
-
}),
|
|
318
|
-
dataError && /* @__PURE__ */ jsx("div", {
|
|
319
|
-
role: "alert",
|
|
320
|
-
className: "mb-4 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
|
|
321
|
-
children: dataError.message
|
|
322
|
-
}),
|
|
323
|
-
dataLoading && !sinkData && /* @__PURE__ */ jsx("div", { className: "h-64 animate-pulse rounded-lg bg-background-primary" }),
|
|
324
|
-
!dataLoading && sinkData && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
325
|
-
className: "mb-4 flex flex-wrap gap-3 text-xs text-text-secondary",
|
|
326
|
-
children: [
|
|
327
|
-
/* @__PURE__ */ jsx("span", { children: sinkData.cached ? tr("fluidgrids.dataSinks.cached", "Cached") : tr("fluidgrids.dataSinks.fresh", "Fresh") }),
|
|
328
|
-
/* @__PURE__ */ jsxs("span", { children: ["v", sinkData.version] }),
|
|
329
|
-
sinkData.totalCount !== null && sinkData.totalCount !== void 0 && /* @__PURE__ */ jsxs("span", { children: [sinkData.totalCount, " rows"] })
|
|
330
|
-
]
|
|
331
|
-
}), /* @__PURE__ */ jsx(DataPreview, { value: payload })] })
|
|
332
|
-
] })]
|
|
333
|
-
})]
|
|
334
|
-
})
|
|
335
|
-
]
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
|
|
339
24
|
// src/modules/observability/hooks/useContinuousOptimisation.ts
|
|
340
25
|
/**
|
|
341
26
|
* Continuous optimisation (BOFF-9969): the workspace opt-in, its open
|
|
@@ -1586,6 +1271,10 @@ function useErrorAnalytics(enabled) {
|
|
|
1586
1271
|
}
|
|
1587
1272
|
|
|
1588
1273
|
// src/modules/observability/pages/InsightsPage.tsx
|
|
1274
|
+
var InsightsPage_exports = /* @__PURE__ */ __exportAll({
|
|
1275
|
+
ErrorAnalyticsPage: () => ErrorAnalyticsPage,
|
|
1276
|
+
InsightsPage: () => InsightsPage
|
|
1277
|
+
});
|
|
1589
1278
|
function normalizedRate(summary) {
|
|
1590
1279
|
const supplied = summary.workflowSuccessRate;
|
|
1591
1280
|
if (supplied !== null && supplied !== void 0) return supplied <= 1 ? supplied * 100 : supplied;
|
|
@@ -1980,4 +1669,4 @@ function ErrorAnalyticsPage() {
|
|
|
1980
1669
|
return /* @__PURE__ */ jsx(InsightsPage, { showErrors: true });
|
|
1981
1670
|
}
|
|
1982
1671
|
|
|
1983
|
-
export { InsightsPage as n,
|
|
1672
|
+
export { InsightsPage as n, InsightsPage_exports as r, ErrorAnalyticsPage as t };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as ManagedAiAuthorityContext } from "./ManagedAiPolicyAuthorityContext-CNkxIOZ1.js";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
// src/modules/settings/api/ManagedAiPolicyAuthority.tsx
|
|
7
|
+
/** Hosts explicitly bridge their authority; a missing profile never becomes an embed fallback. */
|
|
8
|
+
function ManagedAiPolicyAuthorityProvider({ scope, children }) {
|
|
9
|
+
const { authority, url, actorId, workspaceId, organizationId, tenantId, projectId, authToken, workspaceToken } = scope ?? {};
|
|
10
|
+
const value = useMemo(() => {
|
|
11
|
+
if (!authority || !url || !actorId || !workspaceId || !organizationId || !tenantId || !authToken) return null;
|
|
12
|
+
return Object.freeze({
|
|
13
|
+
authority,
|
|
14
|
+
url,
|
|
15
|
+
actorId,
|
|
16
|
+
workspaceId,
|
|
17
|
+
organizationId,
|
|
18
|
+
tenantId,
|
|
19
|
+
projectId,
|
|
20
|
+
authToken,
|
|
21
|
+
workspaceToken
|
|
22
|
+
});
|
|
23
|
+
}, [
|
|
24
|
+
authority,
|
|
25
|
+
url,
|
|
26
|
+
actorId,
|
|
27
|
+
workspaceId,
|
|
28
|
+
organizationId,
|
|
29
|
+
tenantId,
|
|
30
|
+
projectId,
|
|
31
|
+
authToken,
|
|
32
|
+
workspaceToken
|
|
33
|
+
]);
|
|
34
|
+
return /* @__PURE__ */ jsx(ManagedAiAuthorityContext.Provider, {
|
|
35
|
+
value,
|
|
36
|
+
children
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { ManagedAiPolicyAuthorityProvider as t };
|
package/dist/{ManagedAiPolicyAuthority-CGux_DaV.d.ts → ManagedAiPolicyAuthority-DM3t3wNr.d.ts}
RENAMED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
|
-
interface SettingsPageProps {
|
|
4
|
-
workflowKey?: string;
|
|
5
|
-
}
|
|
6
|
-
declare function SettingsPage({ workflowKey: workflowKeyProp }?: SettingsPageProps): import("react").JSX.Element;
|
|
7
3
|
interface ManagedAiRequestScope {
|
|
8
4
|
authority: "profile" | "provided";
|
|
9
5
|
url: string;
|
|
@@ -19,4 +15,4 @@ declare function ManagedAiPolicyAuthorityProvider({ scope, children }: {
|
|
|
19
15
|
scope: ManagedAiRequestScope | null;
|
|
20
16
|
children: ReactNode;
|
|
21
17
|
}): import("react").JSX.Element;
|
|
22
|
-
export { ManagedAiRequestScope as n,
|
|
18
|
+
export { ManagedAiRequestScope as n, ManagedAiPolicyAuthorityProvider as t };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
|
|
4
|
+
// src/modules/settings/api/ManagedAiPolicyAuthorityContext.ts
|
|
5
|
+
const ManagedAiAuthorityContext = createContext(null);
|
|
6
|
+
function useManagedAiPolicyAuthority() {
|
|
7
|
+
return useContext(ManagedAiAuthorityContext);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { useManagedAiPolicyAuthority as n, ManagedAiAuthorityContext as t };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { a as DialogFooter, i as DialogDescription, l as DialogTitle, o as DialogHeader, r as DialogContent, t as Dialog } from "./dialog-Cjb4lB4D.js";
|
|
3
|
+
import { t as Button } from "./button-DG7y_FVJ.js";
|
|
4
|
+
import { r as Badge } from "./TemplateCard-DsC0KNH1.js";
|
|
4
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { AlertTriangle, CheckCircle2, Download, ExternalLink, Loader2, Puzzle, ShoppingCart } from "lucide-react";
|
|
6
7
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
|
|
3
|
+
import { n as getFluidGridsClient } from "./client-C9XSzSXr.js";
|
|
4
|
+
import { t as fetchAllNodeEndpointConfigs } from "./node-endpoint-configs-B5bjNMDW.js";
|
|
5
|
+
import { Dt as NodeEndpointConfigsDocument, Et as NodeEndpointConfigDocument, Ot as NodeManifestDocument } from "./graphql-operation-types-kX-MMjgW.js";
|
|
3
6
|
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
4
|
-
import { t as PublishCustomNodeAction } from "./PublishCustomNodeAction-
|
|
7
|
+
import { t as PublishCustomNodeAction } from "./PublishCustomNodeAction-5XXnSA3H.js";
|
|
5
8
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
6
9
|
import { useNavigate } from "react-router";
|
|
7
10
|
import { Icon } from "@iconify/react";
|
|
@@ -224,6 +227,7 @@ async function fetchAllNodesWithManifests() {
|
|
|
224
227
|
}
|
|
225
228
|
|
|
226
229
|
// src/modules/nodes/pages/NodesPage.tsx
|
|
230
|
+
var NodesPage_exports = /* @__PURE__ */ __exportAll({ NodesPage: () => NodesPage });
|
|
227
231
|
const NODE_CATEGORIES = [
|
|
228
232
|
{
|
|
229
233
|
value: "all",
|
|
@@ -626,4 +630,4 @@ function NodesPage() {
|
|
|
626
630
|
});
|
|
627
631
|
}
|
|
628
632
|
|
|
629
|
-
export {
|
|
633
|
+
export { useNodeEndpoint as a, useLazyNodeManifest as i, NodesPage_exports as n, useNodeEndpoints as o, fetchAllNodesWithManifests as r, useNodeManifest as s, NodesPage as t };
|
|
@@ -1,53 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { x as getFluidGridsConfig } from "./client-C9XSzSXr.js";
|
|
3
3
|
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
4
|
+
import { n as buttonVariants } from "./button-DG7y_FVJ.js";
|
|
4
5
|
import { t as cn } from "./cn-QqidFIgr.js";
|
|
5
|
-
import "react";
|
|
6
6
|
import { useInRouterContext, useNavigate } from "react-router";
|
|
7
7
|
import { Icon } from "@iconify/react";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
10
|
-
import { cva } from "class-variance-authority";
|
|
11
|
-
|
|
12
|
-
// src/ui/button.tsx
|
|
13
|
-
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=\"size-\"])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", {
|
|
14
|
-
variants: {
|
|
15
|
-
variant: {
|
|
16
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
17
|
-
destructive: "bg-action-danger-bg text-action-danger-text hover:bg-action-danger-bgHover",
|
|
18
|
-
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
|
|
19
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
20
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
21
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
22
|
-
},
|
|
23
|
-
size: {
|
|
24
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
25
|
-
xs: "h-7 rounded-md gap-1 px-2 text-xs has-[>svg]:px-1.5",
|
|
26
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
27
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
28
|
-
icon: "size-9",
|
|
29
|
-
"icon-sm": "size-8",
|
|
30
|
-
"icon-lg": "size-10"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
defaultVariants: {
|
|
34
|
-
variant: "default",
|
|
35
|
-
size: "default"
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
|
|
39
|
-
return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
|
|
40
|
-
"data-slot": "button",
|
|
41
|
-
"data-variant": variant,
|
|
42
|
-
"data-size": size,
|
|
43
|
-
className: cn(buttonVariants({
|
|
44
|
-
variant,
|
|
45
|
-
size,
|
|
46
|
-
className
|
|
47
|
-
})),
|
|
48
|
-
...props
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
9
|
|
|
52
10
|
// src/utils/devportal-link.ts
|
|
53
11
|
/**
|
|
@@ -173,4 +131,4 @@ function PublishCustomNodeAction({ appearance = "button", className, devportalBa
|
|
|
173
131
|
});
|
|
174
132
|
}
|
|
175
133
|
|
|
176
|
-
export {
|
|
134
|
+
export { DEVPORTAL_NODE_APPS_PATH as n, resolveDevportalLink as r, PublishCustomNodeAction as t };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
3
|
+
import { pn as useFluidGridsAnalytics } from "./FluidGridsProvider-dvZSNtSW.js";
|
|
4
|
+
import { c as emitWorkflowLimitHit, h as WORKFLOWS_QUOTA_NAME, o as emitUpgradeClicked } from "./fluidgridsEvents-CNdcrUNN.js";
|
|
5
|
+
import { useEffect, useRef } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
|
|
9
|
+
// src/components/shared/QuotaExhaustedDialog.tsx
|
|
10
|
+
/**
|
|
11
|
+
* Alert shown when a workflow-creating action (save/duplicate/import) is
|
|
12
|
+
* rejected with `QUOTA_EXHAUSTED` for `fluidgrids.workflows.count`. Mirrors
|
|
13
|
+
* the "Folder Limit Reached" dialog in microfe-files' BrowserPage.tsx, built
|
|
14
|
+
* on the same `AlertDialog` primitives already used elsewhere in this SDK
|
|
15
|
+
* (see card-workflow.tsx's delete-confirmation dialog).
|
|
16
|
+
*/
|
|
17
|
+
function QuotaExhaustedDialog({ open, onOpenChange, onUpgrade, title, description, surface, limitHit = true }) {
|
|
18
|
+
const tr = useTr();
|
|
19
|
+
const { bus, workspaceId } = useFluidGridsAnalytics();
|
|
20
|
+
const wasOpen = useRef(false);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (open && !wasOpen.current && limitHit) emitWorkflowLimitHit(bus, {
|
|
23
|
+
workspaceId,
|
|
24
|
+
surface
|
|
25
|
+
});
|
|
26
|
+
wasOpen.current = open;
|
|
27
|
+
}, [
|
|
28
|
+
open,
|
|
29
|
+
bus,
|
|
30
|
+
workspaceId,
|
|
31
|
+
surface,
|
|
32
|
+
limitHit
|
|
33
|
+
]);
|
|
34
|
+
const handleUpgrade = () => {
|
|
35
|
+
emitUpgradeClicked(bus, {
|
|
36
|
+
workspaceId,
|
|
37
|
+
surface: "quota-dialog",
|
|
38
|
+
quotaKey: WORKFLOWS_QUOTA_NAME
|
|
39
|
+
});
|
|
40
|
+
onUpgrade();
|
|
41
|
+
};
|
|
42
|
+
const resolvedTitle = title ?? tr("fluidgrids.components.quotaExhaustedDialog.title", "Workflow Limit Reached");
|
|
43
|
+
const resolvedDescription = description ?? tr("fluidgrids.components.quotaExhaustedDialog.description", "You've reached the workflow limit for your plan. Upgrade your plan to create more workflows.");
|
|
44
|
+
return /* @__PURE__ */ jsx(AlertDialog, {
|
|
45
|
+
open,
|
|
46
|
+
onOpenChange,
|
|
47
|
+
children: /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: resolvedTitle }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: resolvedDescription })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, { children: tr("fluidgrids.components.quotaExhaustedDialog.dismiss", "Dismiss") }), /* @__PURE__ */ jsx(AlertDialogAction, {
|
|
48
|
+
onClick: handleUpgrade,
|
|
49
|
+
children: tr("fluidgrids.components.quotaExhaustedDialog.viewPlans", "View plans")
|
|
50
|
+
})] })] })
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { QuotaExhaustedDialog as t };
|