@datatechsolutions/ui 2.11.20 → 2.11.21
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/astrlabe/contracts.d.mts +2 -2
- package/dist/astrlabe/contracts.d.ts +2 -2
- package/dist/astrlabe/index.d.mts +16 -13
- package/dist/astrlabe/index.d.ts +16 -13
- package/dist/astrlabe/index.js +139 -127
- package/dist/astrlabe/index.js.map +1 -1
- package/dist/astrlabe/index.mjs +5 -5
- package/dist/astrlabe/index.mjs.map +1 -1
- package/dist/astrlabe/workflow-canvas.d.mts +1 -1
- package/dist/astrlabe/workflow-canvas.d.ts +1 -1
- package/dist/astrlabe/workflow-canvas.js +5 -5
- package/dist/astrlabe/workflow-canvas.mjs +4 -4
- package/dist/{chunk-BSPRG6ZF.js → chunk-6N5UGKD7.js} +20 -13
- package/dist/chunk-6N5UGKD7.js.map +1 -0
- package/dist/{chunk-GMGTX3TB.js → chunk-E6ALKSGA.js} +208 -97
- package/dist/chunk-E6ALKSGA.js.map +1 -0
- package/dist/{chunk-N5VHGPE7.mjs → chunk-XKLU32S3.mjs} +20 -13
- package/dist/chunk-XKLU32S3.mjs.map +1 -0
- package/dist/{chunk-TZD35VFY.mjs → chunk-Z3U6JAA7.mjs} +164 -56
- package/dist/chunk-Z3U6JAA7.mjs.map +1 -0
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +730 -730
- package/dist/index.mjs +2 -2
- package/dist/{workflow-canvas-CEfOHTzN.d.ts → workflow-canvas-Dn7U7P92.d.ts} +9 -9
- package/dist/{workflow-canvas-Dfj5MOAY.d.mts → workflow-canvas-Mlbo6q5K.d.mts} +9 -9
- package/package.json +1 -1
- package/dist/chunk-BSPRG6ZF.js.map +0 -1
- package/dist/chunk-GMGTX3TB.js.map +0 -1
- package/dist/chunk-N5VHGPE7.mjs.map +0 -1
- package/dist/chunk-TZD35VFY.mjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { GlassModalShell, ContextMenu, FormInput, FormSelect, FormTextarea, Button, IconButton } from './chunk-
|
|
2
|
+
import { GlassModalShell, ContextMenu, FormInput, FormSelect, FormTextarea, Button, IconButton } from './chunk-XKLU32S3.mjs';
|
|
3
|
+
import { useTranslations, I18nProvider, createI18nFromMessages } from './chunk-7VJ7CMMT.mjs';
|
|
3
4
|
import { GraphNodeHeader, GraphNodeMeta, GraphNodeBadge, GraphNodeIconBubble } from './chunk-OZNTQROP.mjs';
|
|
4
5
|
import { getAgentTier, createDefaultLogicNodeConfig, applyDagreLayout } from './chunk-TLPPVL3W.mjs';
|
|
5
|
-
import { useTranslations, I18nProvider, createI18nFromMessages } from './chunk-7VJ7CMMT.mjs';
|
|
6
6
|
import { memo, useState, useRef, useCallback, useEffect, lazy, createContext, useMemo, useContext } from 'react';
|
|
7
7
|
import { Position, NodeResizer, MarkerType, useReactFlow, getBezierPath, BaseEdge, EdgeLabelRenderer, Handle, ReactFlowProvider, useNodesState, useEdgesState, addEdge, BackgroundVariant } from '@xyflow/react';
|
|
8
8
|
import '@xyflow/react/dist/style.css';
|
|
@@ -470,6 +470,24 @@ var MINIMAP_NODE_COLORS = {
|
|
|
470
470
|
model_provider: "#64748b",
|
|
471
471
|
group: "#64748b"
|
|
472
472
|
};
|
|
473
|
+
var NODE_EXECUTION_ACCENT_COLORS = {
|
|
474
|
+
...MINIMAP_NODE_COLORS
|
|
475
|
+
};
|
|
476
|
+
function hexToRgb(hexColor) {
|
|
477
|
+
const normalizedHex = hexColor.replace("#", "");
|
|
478
|
+
const parsed = Number.parseInt(normalizedHex, 16);
|
|
479
|
+
if (Number.isNaN(parsed) || normalizedHex.length !== 6) {
|
|
480
|
+
return [99, 102, 241];
|
|
481
|
+
}
|
|
482
|
+
return [parsed >> 16 & 255, parsed >> 8 & 255, parsed & 255];
|
|
483
|
+
}
|
|
484
|
+
function getNodeExecutionAccent(nodeType) {
|
|
485
|
+
return NODE_EXECUTION_ACCENT_COLORS[nodeType ?? ""] ?? NODE_EXECUTION_ACCENT_COLORS.agent;
|
|
486
|
+
}
|
|
487
|
+
function getNodeExecutionAccentRgb(nodeType) {
|
|
488
|
+
const [red, green, blue] = hexToRgb(getNodeExecutionAccent(nodeType));
|
|
489
|
+
return `${red}, ${green}, ${blue}`;
|
|
490
|
+
}
|
|
473
491
|
var LOGIC_NODE_HANDLE_COLORS = {
|
|
474
492
|
start: "!bg-green-500",
|
|
475
493
|
end: "!bg-red-500",
|
|
@@ -1244,6 +1262,7 @@ function NodeCard({
|
|
|
1244
1262
|
return /* @__PURE__ */ jsx(
|
|
1245
1263
|
"div",
|
|
1246
1264
|
{
|
|
1265
|
+
"data-workflow-node-type": nodeType,
|
|
1247
1266
|
className: `group relative ${width} rounded-xl border liquid-surface ${compact ? "min-h-[84px] p-3" : "p-4"} transition-all ${getNodeStateClass(selected, nodeType, customBorder)}${className ? ` ${className}` : ""}`,
|
|
1248
1267
|
style,
|
|
1249
1268
|
role,
|
|
@@ -1384,17 +1403,48 @@ function WorkflowDynamicHandles({
|
|
|
1384
1403
|
}
|
|
1385
1404
|
function NodeRunningIndicatorComponent({ nodeId }) {
|
|
1386
1405
|
const nodeResult = useWorkflowStore((state) => state.nodeResults[nodeId]);
|
|
1406
|
+
const containerRef = useRef(null);
|
|
1407
|
+
const [nodeType, setNodeType] = useState("agent");
|
|
1408
|
+
const accentColor = useMemo(() => getNodeExecutionAccent(nodeType), [nodeType]);
|
|
1409
|
+
const accentRgb = useMemo(() => getNodeExecutionAccentRgb(nodeType), [nodeType]);
|
|
1410
|
+
useEffect(() => {
|
|
1411
|
+
const indicatorElement = containerRef.current;
|
|
1412
|
+
if (!indicatorElement) return;
|
|
1413
|
+
const nodeWrapper = indicatorElement.closest(".react-flow__node");
|
|
1414
|
+
if (!nodeWrapper) return;
|
|
1415
|
+
const wrapperClass = Array.from(nodeWrapper.classList).find(
|
|
1416
|
+
(className) => className.startsWith("react-flow__node-") && className !== "react-flow__node"
|
|
1417
|
+
);
|
|
1418
|
+
if (!wrapperClass) return;
|
|
1419
|
+
setNodeType(wrapperClass.replace("react-flow__node-", ""));
|
|
1420
|
+
}, []);
|
|
1387
1421
|
if (!nodeResult) return null;
|
|
1388
1422
|
const { status, durationMs } = nodeResult;
|
|
1389
|
-
return /* @__PURE__ */ jsxs("div", { className: "absolute -right-1 -top-1 z-10 flex items-center gap-1", children: [
|
|
1423
|
+
return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: "absolute -right-1 -top-1 z-10 flex items-center gap-1", children: [
|
|
1390
1424
|
status === "pending" && /* @__PURE__ */ jsx("span", { className: "flex h-5 w-5 items-center justify-center rounded-full border border-gray-300 bg-white shadow-sm dark:border-gray-600 dark:bg-gray-800", children: /* @__PURE__ */ jsx("span", { className: "h-2 w-2 rounded-full bg-gray-400 dark:bg-gray-500" }) }),
|
|
1391
|
-
status === "running" && /* @__PURE__ */ jsx(
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1425
|
+
status === "running" && /* @__PURE__ */ jsx(
|
|
1426
|
+
"span",
|
|
1427
|
+
{
|
|
1428
|
+
className: "flex h-5 w-5 items-center justify-center rounded-full border bg-white shadow-sm dark:bg-gray-800",
|
|
1429
|
+
style: {
|
|
1430
|
+
borderColor: `rgba(${accentRgb}, 0.55)`,
|
|
1431
|
+
boxShadow: `0 0 0 1px rgba(${accentRgb}, 0.16), 0 6px 16px rgba(${accentRgb}, 0.18)`
|
|
1432
|
+
},
|
|
1433
|
+
children: /* @__PURE__ */ jsxs("svg", { className: "h-3 w-3 animate-spin", style: { color: accentColor }, viewBox: "0 0 24 24", fill: "none", children: [
|
|
1434
|
+
/* @__PURE__ */ jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
1435
|
+
/* @__PURE__ */ jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
1436
|
+
] })
|
|
1437
|
+
}
|
|
1438
|
+
),
|
|
1439
|
+
status === "success" && /* @__PURE__ */ jsx("span", { className: "flex h-5 w-5 items-center justify-center rounded-full border border-emerald-300 bg-emerald-50 shadow-sm dark:border-emerald-600 dark:bg-emerald-900/30", children: /* @__PURE__ */ jsx("svg", { className: "h-3 w-3 text-emerald-600 dark:text-emerald-400", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) }) }),
|
|
1396
1440
|
status === "error" && /* @__PURE__ */ jsx("span", { className: "flex h-5 w-5 items-center justify-center rounded-full border border-red-300 bg-red-50 shadow-sm dark:border-red-600 dark:bg-red-900/30", children: /* @__PURE__ */ jsx("svg", { className: "h-3 w-3 text-red-600 dark:text-red-400", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z", clipRule: "evenodd" }) }) }),
|
|
1397
|
-
(status === "success" || status === "error") && durationMs !== void 0 && /* @__PURE__ */ jsx(
|
|
1441
|
+
(status === "success" || status === "error") && durationMs !== void 0 && /* @__PURE__ */ jsx(
|
|
1442
|
+
"span",
|
|
1443
|
+
{
|
|
1444
|
+
className: `rounded-full px-1.5 py-0.5 text-[9px] font-medium shadow-sm ${status === "success" ? "bg-emerald-50 text-emerald-700 dark:bg-emerald-900/20 dark:text-emerald-300" : "bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400"}`,
|
|
1445
|
+
children: durationMs < 1e3 ? `${durationMs}ms` : `${(durationMs / 1e3).toFixed(1)}s`
|
|
1446
|
+
}
|
|
1447
|
+
)
|
|
1398
1448
|
] });
|
|
1399
1449
|
}
|
|
1400
1450
|
var NodeRunningIndicator = memo(NodeRunningIndicatorComponent);
|
|
@@ -2719,7 +2769,7 @@ var NoteFlowNode = memo(function NoteFlowNode2({ data, selected }) {
|
|
|
2719
2769
|
});
|
|
2720
2770
|
var DatasourceFlowNode = memo(function DatasourceFlowNode2({ id, data, selected }) {
|
|
2721
2771
|
const t = useTranslations("agents.workflow");
|
|
2722
|
-
const { config, label, onEdit, onRemoveFromCanvas } = data;
|
|
2772
|
+
const { config, label, datasource, readOnly = false, onEdit, onRemoveFromCanvas } = data;
|
|
2723
2773
|
const isCompact = data.displayMode === "compact";
|
|
2724
2774
|
if (!config || config.type !== "datasource") {
|
|
2725
2775
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -2739,56 +2789,92 @@ var DatasourceFlowNode = memo(function DatasourceFlowNode2({ id, data, selected
|
|
|
2739
2789
|
}
|
|
2740
2790
|
const columnCount = config.selectedColumns?.length ?? 0;
|
|
2741
2791
|
const filterCount = config.filterVariables ? Object.keys(config.filterVariables).length : 0;
|
|
2792
|
+
const visibleColumns = config.selectedColumns.slice(0, 3);
|
|
2793
|
+
const filterEntries = Object.entries(config.filterVariables ?? {});
|
|
2794
|
+
const content = /* @__PURE__ */ jsxs(NodeCard, { compact: isCompact, selected, nodeType: "datasource", children: [
|
|
2795
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
2796
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-xl bg-gradient-to-br from-cyan-500 to-blue-600 shadow-lg", children: /* @__PURE__ */ jsx(ServerStackIcon, { className: "h-5 w-5 text-white" }) }),
|
|
2797
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2798
|
+
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: label }),
|
|
2799
|
+
!isCompact && /* @__PURE__ */ jsxs("p", { className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400", children: [
|
|
2800
|
+
datasource?.name ?? config.datasourceId,
|
|
2801
|
+
" \xB7 ",
|
|
2802
|
+
config.table
|
|
2803
|
+
] })
|
|
2804
|
+
] })
|
|
2805
|
+
] }),
|
|
2806
|
+
/* @__PURE__ */ jsxs(NodeCardMeta, { compact: isCompact, children: [
|
|
2807
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
2808
|
+
config.dialect && /* @__PURE__ */ jsx(NodeCardBadge, { className: "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-semibold bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-300", children: config.dialect }),
|
|
2809
|
+
readOnly && /* @__PURE__ */ jsx(NodeCardBadge, { className: "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium bg-slate-100 text-slate-700 dark:bg-slate-500/20 dark:text-slate-300", children: "Sample Data" }),
|
|
2810
|
+
/* @__PURE__ */ jsx(NodeCardBadge, { className: "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-300", children: config.table }),
|
|
2811
|
+
/* @__PURE__ */ jsx(NodeCardBadge, { className: "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium bg-blue-50 text-blue-700 dark:bg-blue-900/25 dark:text-blue-300", children: config.outputVariable }),
|
|
2812
|
+
columnCount > 0 && /* @__PURE__ */ jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
2813
|
+
columnCount,
|
|
2814
|
+
" ",
|
|
2815
|
+
t("datasourceColumns")
|
|
2816
|
+
] }),
|
|
2817
|
+
config.limit > 0 && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: t("datasourceLimit", { count: config.limit }) }),
|
|
2818
|
+
filterCount > 0 && /* @__PURE__ */ jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
2819
|
+
filterCount,
|
|
2820
|
+
" ",
|
|
2821
|
+
t("datasourceFilters")
|
|
2822
|
+
] })
|
|
2823
|
+
] }),
|
|
2824
|
+
!isCompact && /* @__PURE__ */ jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-1.5", children: [
|
|
2825
|
+
visibleColumns.map((column) => /* @__PURE__ */ jsx(
|
|
2826
|
+
NodeCardBadge,
|
|
2827
|
+
{
|
|
2828
|
+
className: "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium bg-white/70 text-slate-600 dark:bg-white/5 dark:text-slate-300",
|
|
2829
|
+
children: column
|
|
2830
|
+
},
|
|
2831
|
+
column
|
|
2832
|
+
)),
|
|
2833
|
+
columnCount > visibleColumns.length && /* @__PURE__ */ jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
2834
|
+
"+",
|
|
2835
|
+
columnCount - visibleColumns.length,
|
|
2836
|
+
" more"
|
|
2837
|
+
] })
|
|
2838
|
+
] }),
|
|
2839
|
+
!isCompact && filterEntries.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-2 flex flex-wrap items-center gap-1.5", children: filterEntries.map(([field, variableName]) => /* @__PURE__ */ jsxs(
|
|
2840
|
+
NodeCardBadge,
|
|
2841
|
+
{
|
|
2842
|
+
className: "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium bg-cyan-50 text-cyan-700 dark:bg-cyan-900/20 dark:text-cyan-300",
|
|
2843
|
+
children: [
|
|
2844
|
+
field,
|
|
2845
|
+
" \u2192 ",
|
|
2846
|
+
variableName
|
|
2847
|
+
]
|
|
2848
|
+
},
|
|
2849
|
+
`${field}:${variableName}`
|
|
2850
|
+
)) }),
|
|
2851
|
+
onRemoveFromCanvas && /* @__PURE__ */ jsx(
|
|
2852
|
+
"span",
|
|
2853
|
+
{
|
|
2854
|
+
role: "button",
|
|
2855
|
+
tabIndex: 0,
|
|
2856
|
+
onClick: (event) => {
|
|
2857
|
+
event.stopPropagation();
|
|
2858
|
+
event.preventDefault();
|
|
2859
|
+
onRemoveFromCanvas(id);
|
|
2860
|
+
},
|
|
2861
|
+
className: "nodrag nopan cursor-pointer rounded-lg p-1 opacity-0 transition hover:bg-red-50 group-hover:opacity-100 dark:hover:bg-red-900/20",
|
|
2862
|
+
"aria-label": t("removeFromCanvas"),
|
|
2863
|
+
children: /* @__PURE__ */ jsx(TrashIcon, { className: "h-3.5 w-3.5 text-red-600 dark:text-red-400" })
|
|
2864
|
+
}
|
|
2865
|
+
)
|
|
2866
|
+
] })
|
|
2867
|
+
] });
|
|
2742
2868
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2743
2869
|
/* @__PURE__ */ jsx(NodeRunningIndicator, { nodeId: id }),
|
|
2744
2870
|
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Left, id: "left-in", colorClass: "!bg-cyan-400" }),
|
|
2745
|
-
/* @__PURE__ */ jsx(
|
|
2871
|
+
readOnly || !onEdit ? /* @__PURE__ */ jsx("div", { className: "w-full", children: content }) : /* @__PURE__ */ jsx(
|
|
2746
2872
|
"button",
|
|
2747
2873
|
{
|
|
2748
2874
|
type: "button",
|
|
2749
|
-
onClick: () => onEdit
|
|
2875
|
+
onClick: () => onEdit(id),
|
|
2750
2876
|
className: "w-full text-left",
|
|
2751
|
-
children:
|
|
2752
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
2753
|
-
/* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-xl bg-gradient-to-br from-cyan-500 to-blue-600 shadow-lg", children: /* @__PURE__ */ jsx(ServerStackIcon, { className: "h-5 w-5 text-white" }) }),
|
|
2754
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2755
|
-
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: label }),
|
|
2756
|
-
!isCompact && /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400", children: config.table ?? config.datasourceId })
|
|
2757
|
-
] })
|
|
2758
|
-
] }),
|
|
2759
|
-
/* @__PURE__ */ jsxs(NodeCardMeta, { compact: isCompact, children: [
|
|
2760
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2761
|
-
config.dialect && /* @__PURE__ */ jsx(NodeCardBadge, { className: "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-semibold bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-300", children: config.dialect }),
|
|
2762
|
-
config.table && /* @__PURE__ */ jsx(NodeCardBadge, { className: "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-300", children: config.table }),
|
|
2763
|
-
columnCount > 0 && /* @__PURE__ */ jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
2764
|
-
columnCount,
|
|
2765
|
-
" ",
|
|
2766
|
-
t("datasourceColumns")
|
|
2767
|
-
] }),
|
|
2768
|
-
config.limit > 0 && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: t("datasourceLimit", { count: config.limit }) }),
|
|
2769
|
-
filterCount > 0 && /* @__PURE__ */ jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
2770
|
-
filterCount,
|
|
2771
|
-
" ",
|
|
2772
|
-
t("datasourceFilters")
|
|
2773
|
-
] })
|
|
2774
|
-
] }),
|
|
2775
|
-
onRemoveFromCanvas && /* @__PURE__ */ jsx(
|
|
2776
|
-
"span",
|
|
2777
|
-
{
|
|
2778
|
-
role: "button",
|
|
2779
|
-
tabIndex: 0,
|
|
2780
|
-
onClick: (event) => {
|
|
2781
|
-
event.stopPropagation();
|
|
2782
|
-
event.preventDefault();
|
|
2783
|
-
onRemoveFromCanvas(id);
|
|
2784
|
-
},
|
|
2785
|
-
className: "nodrag nopan cursor-pointer rounded-lg p-1 opacity-0 transition hover:bg-red-50 group-hover:opacity-100 dark:hover:bg-red-900/20",
|
|
2786
|
-
"aria-label": t("removeFromCanvas"),
|
|
2787
|
-
children: /* @__PURE__ */ jsx(TrashIcon, { className: "h-3.5 w-3.5 text-red-600 dark:text-red-400" })
|
|
2788
|
-
}
|
|
2789
|
-
)
|
|
2790
|
-
] })
|
|
2791
|
-
] })
|
|
2877
|
+
children: content
|
|
2792
2878
|
}
|
|
2793
2879
|
),
|
|
2794
2880
|
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-cyan-400" })
|
|
@@ -6061,6 +6147,28 @@ function WorkflowCanvasInner({
|
|
|
6061
6147
|
}
|
|
6062
6148
|
};
|
|
6063
6149
|
}
|
|
6150
|
+
if (savedNode.type === "datasource") {
|
|
6151
|
+
const datasourceConfig = savedNode.data.config;
|
|
6152
|
+
const datasourceEntity = datasourceConfig ? entityMap.get(datasourceConfig.datasourceId) : void 0;
|
|
6153
|
+
const extendedNodeData = savedNode.data;
|
|
6154
|
+
return {
|
|
6155
|
+
id: savedNode.id,
|
|
6156
|
+
type: "datasource",
|
|
6157
|
+
position: savedNode.position,
|
|
6158
|
+
data: {
|
|
6159
|
+
config: datasourceConfig,
|
|
6160
|
+
datasource: datasourceEntity ? {
|
|
6161
|
+
id: datasourceEntity.id,
|
|
6162
|
+
name: datasourceEntity.label,
|
|
6163
|
+
dialect: datasourceConfig?.dialect ?? "unknown"
|
|
6164
|
+
} : void 0,
|
|
6165
|
+
label: savedNode.data.label,
|
|
6166
|
+
readOnly: extendedNodeData.readOnly === true,
|
|
6167
|
+
onEdit: extendedNodeData.readOnly === true ? void 0 : handleEditLogicNode,
|
|
6168
|
+
onRemoveFromCanvas: handleRemoveNodeFromCanvas
|
|
6169
|
+
}
|
|
6170
|
+
};
|
|
6171
|
+
}
|
|
6064
6172
|
if (savedNode.type === "group") {
|
|
6065
6173
|
const groupConfig = savedNode.data.config;
|
|
6066
6174
|
const defaultGroupConfig = {
|
|
@@ -7440,6 +7548,6 @@ function Workspace({
|
|
|
7440
7548
|
) }) });
|
|
7441
7549
|
}
|
|
7442
7550
|
|
|
7443
|
-
export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CATEGORY_COLORS, CATEGORY_PILL_COLORS, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, ICON_MAP, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeModal, MINIMAP_NODE_COLORS, ModelProviderFlowNode, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, WorkflowCanvas, Workspace, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, isFrameworkCompatibleWithProviders, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
|
7444
|
-
//# sourceMappingURL=chunk-
|
|
7445
|
-
//# sourceMappingURL=chunk-
|
|
7551
|
+
export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CATEGORY_COLORS, CATEGORY_PILL_COLORS, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, ICON_MAP, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeModal, MINIMAP_NODE_COLORS, ModelProviderFlowNode, NODE_EXECUTION_ACCENT_COLORS, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, WorkflowCanvas, Workspace, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getNodeExecutionAccent, getNodeExecutionAccentRgb, isFrameworkCompatibleWithProviders, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
|
7552
|
+
//# sourceMappingURL=chunk-Z3U6JAA7.mjs.map
|
|
7553
|
+
//# sourceMappingURL=chunk-Z3U6JAA7.mjs.map
|