@burdenoff/fluidgrids-fe-sdk 2026.1110.2 → 2026.1110.4
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/{ExecutionDetailPage-UXQFBLF3.js → ExecutionDetailPage-2OY2NC3Z.js} +12 -13
- package/dist/{ExecutionsListPage-A4GCUNFR.js → ExecutionsListPage-GTR4XPQN.js} +8 -9
- package/dist/{WorkflowBuilder-ZLVMV2UA.js → WorkflowBuilder-7LPCDDJJ.js} +15 -16
- package/dist/{WorkflowsList-XPNGNR4A.js → WorkflowsList-JJ7UOHTC.js} +6 -6
- package/dist/{agentTools-V26FOMTS.js → agentTools-WHQ7UDDS.js} +3 -3
- package/dist/{chunk-OJHBCOBA.js → chunk-5NZANNKX.js} +40 -1
- package/dist/{chunk-5ZAOXCIQ.js → chunk-5WM655EY.js} +151 -7
- package/dist/{chunk-K22NDWSD.js → chunk-6HXJEIDT.js} +2 -2
- package/dist/{chunk-DIIGFBYT.js → chunk-6NSPCR5C.js} +1 -1
- package/dist/{chunk-ZQTANHKA.js → chunk-7MHCCYDJ.js} +2 -2
- package/dist/{chunk-DDINUPO3.js → chunk-CXBF63PL.js} +1 -1
- package/dist/{chunk-3F4DIVKT.js → chunk-DCMHDOZO.js} +1 -1
- package/dist/chunk-DELQGUVF.js +172 -0
- package/dist/{chunk-XLU63IUB.js → chunk-F7C57RJE.js} +6 -6
- package/dist/{chunk-L5MZ74DA.js → chunk-GA3DS2ZJ.js} +1 -1
- package/dist/{chunk-G7BT24PD.js → chunk-KLR4BZ75.js} +2 -2
- package/dist/{chunk-QGRVYPQC.js → chunk-KQMZ226I.js} +2 -2
- package/dist/{chunk-2DBAQR6F.js → chunk-LOU6RJIB.js} +2 -2
- package/dist/{chunk-Z6D6YL7C.js → chunk-MQ24K2L4.js} +1 -1
- package/dist/{chunk-OVZA4IM7.js → chunk-OIMQHAGU.js} +3 -3
- package/dist/{chunk-2H4XAES7.js → chunk-POCNK7FY.js} +2 -2
- package/dist/{chunk-OZNFRJKC.js → chunk-PXN3S2YU.js} +5 -5
- package/dist/{chunk-WGUHISC2.js → chunk-QOFEQEQL.js} +174 -23
- package/dist/chunk-QUYK5PAZ.js +338 -0
- package/dist/{chunk-5V7PMLQN.js → chunk-QYHRRSEC.js} +1118 -24
- package/dist/{chunk-ZZBZPBO5.js → chunk-S36ZLWDC.js} +2 -2
- package/dist/{chunk-7UFE2CHD.js → chunk-SKMWUKT5.js} +29 -103
- package/dist/{chunk-CBX2CXGH.js → chunk-U5P7E3PA.js} +6 -6
- package/dist/{chunk-A6Q4FWB6.js → chunk-UDS2FA24.js} +1 -1
- package/dist/{chunk-PICOXEUO.js → chunk-UDTAUZ7B.js} +4 -4
- package/dist/{chunk-PI4AW4T2.js → chunk-V6KLU67V.js} +20 -19
- package/dist/{chunk-5TGPH3CX.js → chunk-VRPNGY6W.js} +4 -4
- package/dist/{chunk-D4L5BN64.js → chunk-VXVLQ3LX.js} +94 -2
- package/dist/{chunk-X7XVRJK2.js → chunk-XSTTM74F.js} +1 -1
- package/dist/{chunk-I3DBTNWQ.js → chunk-XYLWH24V.js} +5 -5
- package/dist/executions.js +13 -14
- package/dist/history.js +5 -5
- package/dist/index.d.ts +35 -2
- package/dist/index.js +45 -46
- package/dist/{node-detail-view-2AFXRNX6.js → node-detail-view-JJ2JRFID.js} +8 -9
- package/dist/nodes.js +2 -2
- package/dist/observability.js +5 -5
- package/dist/quick-config-panel-BT2RHMXF.js +411 -0
- package/dist/settings.js +7 -8
- package/dist/templates.js +15 -16
- package/dist/{workflow-builder-DQ2VFyg8.d.ts → workflow-builder-DgZQtyWL.d.ts} +12 -0
- package/dist/workflow-builder.d.ts +1 -1
- package/dist/workflow-builder.js +16 -17
- package/dist/workflows-list.js +6 -6
- package/package.json +1 -1
- package/dist/chunk-3JGAI5YC.js +0 -1437
- package/dist/chunk-HORSE7WX.js +0 -54
- package/dist/chunk-WZ3EJVS6.js +0 -93
- package/dist/quick-config-panel-U4AELSCT.js +0 -363
package/dist/chunk-HORSE7WX.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { nodeTitle, FieldTree } from './chunk-PI4AW4T2.js';
|
|
2
|
-
import { useTr } from './chunk-UULVIT25.js';
|
|
3
|
-
import { Icon } from '@iconify/react';
|
|
4
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
function NodeInputFields({
|
|
7
|
-
config,
|
|
8
|
-
testIdPrefix
|
|
9
|
-
}) {
|
|
10
|
-
const tr = useTr();
|
|
11
|
-
const { nodes, sourceIds, selectedSource, setSelectedSource, inputFields } = config;
|
|
12
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13
|
-
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-3 py-2", children: [
|
|
14
|
-
/* @__PURE__ */ jsx(
|
|
15
|
-
Icon,
|
|
16
|
-
{
|
|
17
|
-
icon: "mdi:tray-arrow-down",
|
|
18
|
-
className: "size-3.5 text-muted-foreground"
|
|
19
|
-
}
|
|
20
|
-
),
|
|
21
|
-
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground", children: tr("fluidgrids.builder.quickConfigPanel.inputHeading", "Input") }),
|
|
22
|
-
sourceIds.length > 0 && /* @__PURE__ */ jsx(
|
|
23
|
-
"select",
|
|
24
|
-
{
|
|
25
|
-
className: "ml-auto max-w-[55%] truncate rounded-md border border-border-default bg-bg-surface px-1.5 py-0.5 text-[11px] text-text-primary scheme-normal dark:scheme-dark outline-none focus:border-action-primary-border [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
26
|
-
value: selectedSource ?? "",
|
|
27
|
-
onChange: (e) => setSelectedSource(e.target.value),
|
|
28
|
-
"aria-label": tr(
|
|
29
|
-
"fluidgrids.builder.quickConfigPanel.inputHeading",
|
|
30
|
-
"Input"
|
|
31
|
-
),
|
|
32
|
-
"data-testid": `${testIdPrefix}-source-selector`,
|
|
33
|
-
children: sourceIds.map((sid) => {
|
|
34
|
-
const sn = nodes.find((n) => n.id === sid);
|
|
35
|
-
return /* @__PURE__ */ jsx("option", { value: sid, children: nodeTitle(sn) }, sid);
|
|
36
|
-
})
|
|
37
|
-
}
|
|
38
|
-
)
|
|
39
|
-
] }),
|
|
40
|
-
/* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-auto px-2 py-2", children: inputFields.length > 0 ? /* @__PURE__ */ jsx(FieldTree, { fields: inputFields, draggable: true }) : /* @__PURE__ */ jsx("p", { className: "px-2 py-4 text-center text-xs text-muted-foreground", children: sourceIds.length === 0 ? tr(
|
|
41
|
-
"fluidgrids.builder.quickConfigPanel.noUpstreamNode",
|
|
42
|
-
"Connect an upstream node to map its fields."
|
|
43
|
-
) : tr(
|
|
44
|
-
"fluidgrids.builder.quickConfigPanel.noOutputFields",
|
|
45
|
-
"The selected source has no declared output fields."
|
|
46
|
-
) }) }),
|
|
47
|
-
/* @__PURE__ */ jsx("p", { className: "shrink-0 border-t border-border px-3 py-1.5 text-[10px] leading-snug text-muted-foreground", children: tr(
|
|
48
|
-
"fluidgrids.builder.quickConfigPanel.dragFieldHint",
|
|
49
|
-
"Drag a field onto a parameter to map it."
|
|
50
|
-
) })
|
|
51
|
-
] });
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { NodeInputFields };
|
package/dist/chunk-WZ3EJVS6.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
// src/modules/agent-definitions/utils/agent-form.ts
|
|
2
|
-
var DEFAULT_GRANT_DAYS = 30;
|
|
3
|
-
var MAX_GRANT_DAYS = 365;
|
|
4
|
-
var MAX_TOOL_RULES = 100;
|
|
5
|
-
var MAX_CONNECTIONS = 100;
|
|
6
|
-
var AgentFormError = class extends Error {
|
|
7
|
-
constructor(message) {
|
|
8
|
-
super(message);
|
|
9
|
-
this.name = "AgentFormError";
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
function emptyAgentForm() {
|
|
13
|
-
return {
|
|
14
|
-
name: "",
|
|
15
|
-
description: "",
|
|
16
|
-
tools: [{ nodeType: "", operations: "" }],
|
|
17
|
-
connectionScope: [],
|
|
18
|
-
requireToolApproval: false,
|
|
19
|
-
status: "ACTIVE"
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
function agentToForm(agent) {
|
|
23
|
-
return {
|
|
24
|
-
name: agent.name,
|
|
25
|
-
description: agent.description ?? "",
|
|
26
|
-
tools: agent.toolAllowlist.length > 0 ? agent.toolAllowlist.map((rule) => ({
|
|
27
|
-
nodeType: rule.nodeType,
|
|
28
|
-
operations: rule.operations.join(", ")
|
|
29
|
-
})) : [{ nodeType: "", operations: "" }],
|
|
30
|
-
connectionScope: [...agent.connectionScope],
|
|
31
|
-
requireToolApproval: agent.requireToolApproval,
|
|
32
|
-
status: agent.status
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function splitOperations(value) {
|
|
36
|
-
return [
|
|
37
|
-
...new Set(
|
|
38
|
-
value.split(",").map((operation) => operation.trim()).filter(Boolean)
|
|
39
|
-
)
|
|
40
|
-
];
|
|
41
|
-
}
|
|
42
|
-
function formToInput(form) {
|
|
43
|
-
const name = form.name.trim();
|
|
44
|
-
if (name.length === 0 || name.length > 200) {
|
|
45
|
-
throw new AgentFormError("Give the agent a name of 1 to 200 characters.");
|
|
46
|
-
}
|
|
47
|
-
const description = form.description.trim();
|
|
48
|
-
if (description.length > 2e3) {
|
|
49
|
-
throw new AgentFormError(
|
|
50
|
-
"The description must be at most 2000 characters."
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
const rules = form.tools.map((row) => ({
|
|
54
|
-
nodeType: row.nodeType.trim(),
|
|
55
|
-
operations: splitOperations(row.operations)
|
|
56
|
-
})).filter((rule) => rule.nodeType.length > 0 || rule.operations.length > 0);
|
|
57
|
-
if (rules.some((rule) => rule.nodeType.length === 0)) {
|
|
58
|
-
throw new AgentFormError("Every tool rule needs a node type.");
|
|
59
|
-
}
|
|
60
|
-
if (rules.length > MAX_TOOL_RULES) {
|
|
61
|
-
throw new AgentFormError(`At most ${MAX_TOOL_RULES} tool rules.`);
|
|
62
|
-
}
|
|
63
|
-
const connectionScope = [...new Set(form.connectionScope.filter(Boolean))];
|
|
64
|
-
if (connectionScope.length > MAX_CONNECTIONS) {
|
|
65
|
-
throw new AgentFormError(`At most ${MAX_CONNECTIONS} connections.`);
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
name,
|
|
69
|
-
description: description || null,
|
|
70
|
-
toolAllowlist: rules,
|
|
71
|
-
connectionScope,
|
|
72
|
-
requireToolApproval: form.requireToolApproval,
|
|
73
|
-
status: form.status
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function grantDays(value) {
|
|
77
|
-
const days = Number(value);
|
|
78
|
-
if (!Number.isInteger(days) || days < 1 || days > MAX_GRANT_DAYS) {
|
|
79
|
-
throw new AgentFormError(
|
|
80
|
-
`A grant lasts between 1 and ${MAX_GRANT_DAYS} days.`
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
return days;
|
|
84
|
-
}
|
|
85
|
-
function describeRule(rule) {
|
|
86
|
-
return rule.operations.length > 0 ? `${rule.nodeType}: ${rule.operations.join(", ")}` : `${rule.nodeType}: any operation`;
|
|
87
|
-
}
|
|
88
|
-
function isAgentNodeType(nodeType) {
|
|
89
|
-
if (!nodeType) return false;
|
|
90
|
-
return nodeType === "store/ai-agent" || nodeType.includes("store/ai-agent");
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export { AgentFormError, DEFAULT_GRANT_DAYS, MAX_GRANT_DAYS, agentToForm, describeRule, emptyAgentForm, formToInput, grantDays, isAgentNodeType };
|
|
@@ -1,363 +0,0 @@
|
|
|
1
|
-
import { NodeInputFields } from './chunk-HORSE7WX.js';
|
|
2
|
-
import { ReadOnlyFieldset, NodeParamsForm, NodeExecutionActions } from './chunk-5V7PMLQN.js';
|
|
3
|
-
import { useNodeConfig, nodeSubtitle, nodeTitle } from './chunk-PI4AW4T2.js';
|
|
4
|
-
import './chunk-KZCNJAMK.js';
|
|
5
|
-
import './chunk-JDLQ6QIB.js';
|
|
6
|
-
import './chunk-ZZBZPBO5.js';
|
|
7
|
-
import './chunk-WZ3EJVS6.js';
|
|
8
|
-
import './chunk-6CPQVLHT.js';
|
|
9
|
-
import './chunk-ERT444RG.js';
|
|
10
|
-
import { useNodeExecution, getNodeDetail } from './chunk-DDINUPO3.js';
|
|
11
|
-
import './chunk-SDZEAIIE.js';
|
|
12
|
-
import { useFlowStore, nodeAccent, NodeTypeIcon } from './chunk-K2X63CR2.js';
|
|
13
|
-
import './chunk-Y7FKJJMF.js';
|
|
14
|
-
import './chunk-TYI2XOSI.js';
|
|
15
|
-
import './chunk-G77IGC3Y.js';
|
|
16
|
-
import './chunk-JL7CASN5.js';
|
|
17
|
-
import './chunk-A6Q4FWB6.js';
|
|
18
|
-
import { useTr } from './chunk-UULVIT25.js';
|
|
19
|
-
import './chunk-PDODDDHY.js';
|
|
20
|
-
import './chunk-JKLZ6YZ3.js';
|
|
21
|
-
import './chunk-UEG2WC3G.js';
|
|
22
|
-
import { useState, useRef, useLayoutEffect, useMemo, useEffect } from 'react';
|
|
23
|
-
import { Icon } from '@iconify/react';
|
|
24
|
-
import { useReactFlow, useStore } from '@xyflow/react';
|
|
25
|
-
import { shallow } from 'zustand/shallow';
|
|
26
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
27
|
-
|
|
28
|
-
var PANEL_WIDTH = 380;
|
|
29
|
-
var PANEL_EST_HEIGHT = 480;
|
|
30
|
-
var MAPPER_WIDTH = 260;
|
|
31
|
-
var VIEWPORT_MARGIN = 12;
|
|
32
|
-
var NODE_GAP = 14;
|
|
33
|
-
var MAPPER_GAP = 10;
|
|
34
|
-
function useNodeScreenRect(nodeId) {
|
|
35
|
-
const { flowToScreenPosition } = useReactFlow();
|
|
36
|
-
const raw = useStore((s) => {
|
|
37
|
-
const n = s.nodeLookup.get(nodeId);
|
|
38
|
-
if (!n) return null;
|
|
39
|
-
const p = n.internals?.positionAbsolute ?? n.position;
|
|
40
|
-
return {
|
|
41
|
-
x: p.x,
|
|
42
|
-
y: p.y,
|
|
43
|
-
w: n.measured?.width ?? n.width ?? 288,
|
|
44
|
-
h: n.measured?.height ?? n.height ?? 120,
|
|
45
|
-
// Selecting the transform forces a re-render on pan/zoom.
|
|
46
|
-
tx: s.transform[0],
|
|
47
|
-
ty: s.transform[1],
|
|
48
|
-
z: s.transform[2]
|
|
49
|
-
};
|
|
50
|
-
}, shallow);
|
|
51
|
-
if (!raw) return null;
|
|
52
|
-
const tl = flowToScreenPosition({ x: raw.x, y: raw.y });
|
|
53
|
-
const br = flowToScreenPosition({ x: raw.x + raw.w, y: raw.y + raw.h });
|
|
54
|
-
return {
|
|
55
|
-
left: tl.x,
|
|
56
|
-
top: tl.y,
|
|
57
|
-
right: br.x,
|
|
58
|
-
bottom: br.y,
|
|
59
|
-
cy: (tl.y + br.y) / 2
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
var clamp = (v, lo, hi) => Math.min(Math.max(v, lo), Math.max(lo, hi));
|
|
63
|
-
function QuickConfigPanel() {
|
|
64
|
-
const quickConfig = useFlowStore((s) => s.workflow.quickConfig);
|
|
65
|
-
if (!quickConfig) return null;
|
|
66
|
-
return (
|
|
67
|
-
// Remount per node so panel-local state (mapper open) resets naturally.
|
|
68
|
-
/* @__PURE__ */ jsx(
|
|
69
|
-
QuickConfigPanelInner,
|
|
70
|
-
{
|
|
71
|
-
nodeId: quickConfig.nodeId,
|
|
72
|
-
type: quickConfig.type
|
|
73
|
-
},
|
|
74
|
-
quickConfig.nodeId
|
|
75
|
-
)
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
function QuickConfigPanelInner({
|
|
79
|
-
nodeId,
|
|
80
|
-
type
|
|
81
|
-
}) {
|
|
82
|
-
const close = useFlowStore((s) => s.actions.quickConfig.close);
|
|
83
|
-
const openNdv = useFlowStore((s) => s.actions.ndv.open);
|
|
84
|
-
const tr = useTr();
|
|
85
|
-
const { executeStep, executeFromNode } = useNodeExecution();
|
|
86
|
-
const workflow = useFlowStore((s) => s.workflow);
|
|
87
|
-
const execution = useFlowStore((s) => s.execution);
|
|
88
|
-
const config = useNodeConfig({ nodeId, type });
|
|
89
|
-
const { node, nodes, sourceIds } = config;
|
|
90
|
-
const [showMapper, setShowMapper] = useState(false);
|
|
91
|
-
const nodeRect = useNodeScreenRect(nodeId);
|
|
92
|
-
const cardRef = useRef(null);
|
|
93
|
-
const [panelH, setPanelH] = useState(PANEL_EST_HEIGHT);
|
|
94
|
-
useLayoutEffect(() => {
|
|
95
|
-
const el = cardRef.current;
|
|
96
|
-
if (!el) return;
|
|
97
|
-
const measure = () => setPanelH(el.offsetHeight);
|
|
98
|
-
measure();
|
|
99
|
-
const ro = new ResizeObserver(measure);
|
|
100
|
-
ro.observe(el);
|
|
101
|
-
return () => ro.disconnect();
|
|
102
|
-
}, []);
|
|
103
|
-
const placement = useMemo(() => {
|
|
104
|
-
const mapperCoords = (panelLeft, panelTop) => {
|
|
105
|
-
const leftPlacement = panelLeft - MAPPER_GAP - MAPPER_WIDTH;
|
|
106
|
-
const rightPlacement = panelLeft + PANEL_WIDTH + MAPPER_GAP;
|
|
107
|
-
const rawLeft2 = leftPlacement >= VIEWPORT_MARGIN ? leftPlacement : rightPlacement;
|
|
108
|
-
return {
|
|
109
|
-
mapperLeft: clamp(
|
|
110
|
-
rawLeft2,
|
|
111
|
-
VIEWPORT_MARGIN,
|
|
112
|
-
window.innerWidth - MAPPER_WIDTH - VIEWPORT_MARGIN
|
|
113
|
-
),
|
|
114
|
-
mapperTop: panelTop
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
if (!nodeRect) {
|
|
118
|
-
const left2 = window.innerWidth / 2 - PANEL_WIDTH / 2;
|
|
119
|
-
const top2 = window.innerHeight / 4;
|
|
120
|
-
return {
|
|
121
|
-
side: "right",
|
|
122
|
-
left: left2,
|
|
123
|
-
top: top2,
|
|
124
|
-
connectorLeft: 0,
|
|
125
|
-
connectorWidth: 0,
|
|
126
|
-
connectorTop: 0,
|
|
127
|
-
hasConnector: false,
|
|
128
|
-
...mapperCoords(left2, top2)
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
const need = PANEL_WIDTH + NODE_GAP + VIEWPORT_MARGIN;
|
|
132
|
-
const spaceRight = window.innerWidth - nodeRect.right;
|
|
133
|
-
const spaceLeft = nodeRect.left;
|
|
134
|
-
const side = spaceRight >= need ? "right" : spaceLeft >= need ? "left" : spaceRight >= spaceLeft ? "right" : "left";
|
|
135
|
-
const rawLeft = side === "right" ? nodeRect.right + NODE_GAP : nodeRect.left - NODE_GAP - PANEL_WIDTH;
|
|
136
|
-
const left = clamp(
|
|
137
|
-
rawLeft,
|
|
138
|
-
VIEWPORT_MARGIN,
|
|
139
|
-
window.innerWidth - PANEL_WIDTH - VIEWPORT_MARGIN
|
|
140
|
-
);
|
|
141
|
-
const top = clamp(
|
|
142
|
-
nodeRect.cy - panelH / 2,
|
|
143
|
-
VIEWPORT_MARGIN,
|
|
144
|
-
window.innerHeight - panelH - VIEWPORT_MARGIN
|
|
145
|
-
);
|
|
146
|
-
const connectorTop = clamp(nodeRect.cy, top + 6, top + panelH - 6);
|
|
147
|
-
const connectorLeft = side === "right" ? nodeRect.right : left + PANEL_WIDTH;
|
|
148
|
-
const connectorWidth = Math.max(
|
|
149
|
-
0,
|
|
150
|
-
side === "right" ? left - nodeRect.right : nodeRect.left - (left + PANEL_WIDTH)
|
|
151
|
-
);
|
|
152
|
-
return {
|
|
153
|
-
side,
|
|
154
|
-
left,
|
|
155
|
-
top,
|
|
156
|
-
connectorLeft,
|
|
157
|
-
connectorWidth,
|
|
158
|
-
connectorTop,
|
|
159
|
-
hasConnector: connectorWidth > 1,
|
|
160
|
-
...mapperCoords(left, top)
|
|
161
|
-
};
|
|
162
|
-
}, [nodeRect, panelH]);
|
|
163
|
-
useEffect(() => {
|
|
164
|
-
const onKey = (e) => {
|
|
165
|
-
if (e.key === "Escape") close();
|
|
166
|
-
};
|
|
167
|
-
window.addEventListener("keydown", onKey);
|
|
168
|
-
return () => window.removeEventListener("keydown", onKey);
|
|
169
|
-
}, [close]);
|
|
170
|
-
useEffect(() => {
|
|
171
|
-
if (!nodes.some((n) => n.id === nodeId)) close();
|
|
172
|
-
}, [nodes, nodeId, close]);
|
|
173
|
-
if (!node) return null;
|
|
174
|
-
const meta = getNodeDetail(node.type);
|
|
175
|
-
const accent = nodeAccent(node.type || meta.title);
|
|
176
|
-
const subtitle = nodeSubtitle(node);
|
|
177
|
-
const expandToNdv = () => {
|
|
178
|
-
openNdv({ nodeId, type });
|
|
179
|
-
};
|
|
180
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
181
|
-
placement.hasConnector && /* @__PURE__ */ jsx(
|
|
182
|
-
"div",
|
|
183
|
-
{
|
|
184
|
-
"aria-hidden": true,
|
|
185
|
-
className: "pointer-events-none fixed",
|
|
186
|
-
style: {
|
|
187
|
-
left: placement.connectorLeft,
|
|
188
|
-
top: placement.connectorTop - 1,
|
|
189
|
-
width: placement.connectorWidth,
|
|
190
|
-
height: 2,
|
|
191
|
-
background: accent,
|
|
192
|
-
opacity: 0.55,
|
|
193
|
-
zIndex: 299
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
),
|
|
197
|
-
showMapper && /* @__PURE__ */ jsx(
|
|
198
|
-
"div",
|
|
199
|
-
{
|
|
200
|
-
className: "fixed overflow-hidden rounded-xl border border-border bg-card shadow-xl",
|
|
201
|
-
style: {
|
|
202
|
-
left: placement.mapperLeft,
|
|
203
|
-
top: placement.mapperTop,
|
|
204
|
-
width: MAPPER_WIDTH,
|
|
205
|
-
maxHeight: "min(60vh, 480px)",
|
|
206
|
-
zIndex: 301,
|
|
207
|
-
display: "flex",
|
|
208
|
-
flexDirection: "column"
|
|
209
|
-
},
|
|
210
|
-
"data-testid": "quick-config-mapper",
|
|
211
|
-
children: /* @__PURE__ */ jsx(NodeInputFields, { config, testIdPrefix: "qc" })
|
|
212
|
-
}
|
|
213
|
-
),
|
|
214
|
-
/* @__PURE__ */ jsx(
|
|
215
|
-
"div",
|
|
216
|
-
{
|
|
217
|
-
className: "fixed",
|
|
218
|
-
style: {
|
|
219
|
-
left: placement.left,
|
|
220
|
-
top: placement.top,
|
|
221
|
-
zIndex: 300,
|
|
222
|
-
width: PANEL_WIDTH
|
|
223
|
-
},
|
|
224
|
-
"data-testid": "quick-config-panel",
|
|
225
|
-
children: /* @__PURE__ */ jsxs(
|
|
226
|
-
"div",
|
|
227
|
-
{
|
|
228
|
-
ref: cardRef,
|
|
229
|
-
className: "flex flex-col overflow-hidden rounded-xl border border-border bg-card shadow-2xl animate-in fade-in zoom-in-95 duration-150",
|
|
230
|
-
style: {
|
|
231
|
-
maxHeight: "min(70vh, 560px)",
|
|
232
|
-
borderTop: `3px solid ${accent}`
|
|
233
|
-
},
|
|
234
|
-
children: [
|
|
235
|
-
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2.5 border-b border-border px-3 py-2.5 select-none", children: [
|
|
236
|
-
/* @__PURE__ */ jsx(
|
|
237
|
-
"div",
|
|
238
|
-
{
|
|
239
|
-
className: "flex size-7 shrink-0 items-center justify-center rounded-lg",
|
|
240
|
-
style: {
|
|
241
|
-
backgroundColor: `color-mix(in srgb, ${accent} 13%, transparent)`,
|
|
242
|
-
color: accent,
|
|
243
|
-
border: `1px solid color-mix(in srgb, ${accent} 26%, transparent)`
|
|
244
|
-
},
|
|
245
|
-
children: /* @__PURE__ */ jsx(NodeTypeIcon, { icon: meta.icon, className: "size-4" })
|
|
246
|
-
}
|
|
247
|
-
),
|
|
248
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
249
|
-
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-semibold leading-tight text-foreground", children: nodeTitle(node) }),
|
|
250
|
-
subtitle && /* @__PURE__ */ jsx("p", { className: "truncate font-mono text-[11px] leading-tight text-muted-foreground", children: subtitle })
|
|
251
|
-
] }),
|
|
252
|
-
/* @__PURE__ */ jsx(
|
|
253
|
-
"button",
|
|
254
|
-
{
|
|
255
|
-
type: "button",
|
|
256
|
-
title: showMapper ? tr(
|
|
257
|
-
"fluidgrids.builder.quickConfigPanel.hideInputDataTooltip",
|
|
258
|
-
"Hide input data"
|
|
259
|
-
) : tr(
|
|
260
|
-
"fluidgrids.builder.quickConfigPanel.mapInputDataTooltip",
|
|
261
|
-
"Map data from input"
|
|
262
|
-
),
|
|
263
|
-
"aria-label": tr(
|
|
264
|
-
"fluidgrids.builder.quickConfigPanel.toggleMapperAriaLabel",
|
|
265
|
-
"Toggle input mapper"
|
|
266
|
-
),
|
|
267
|
-
onClick: () => setShowMapper((v) => !v),
|
|
268
|
-
className: `rounded-md p-1.5 transition-colors hover:bg-muted ${showMapper ? "text-primary" : "text-muted-foreground"} hover:text-foreground`,
|
|
269
|
-
"data-testid": "qc-toggle-mapper",
|
|
270
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: "mdi:tray-arrow-down", className: "size-4" })
|
|
271
|
-
}
|
|
272
|
-
),
|
|
273
|
-
/* @__PURE__ */ jsx(
|
|
274
|
-
"button",
|
|
275
|
-
{
|
|
276
|
-
type: "button",
|
|
277
|
-
title: tr(
|
|
278
|
-
"fluidgrids.builder.quickConfigPanel.openFullEditorTooltip",
|
|
279
|
-
"Open full editor"
|
|
280
|
-
),
|
|
281
|
-
"aria-label": tr(
|
|
282
|
-
"fluidgrids.builder.quickConfigPanel.openFullEditorAriaLabel",
|
|
283
|
-
"Open full editor"
|
|
284
|
-
),
|
|
285
|
-
onClick: expandToNdv,
|
|
286
|
-
className: "rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
|
|
287
|
-
"data-testid": "qc-expand",
|
|
288
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: "mdi:arrow-expand", className: "size-4" })
|
|
289
|
-
}
|
|
290
|
-
),
|
|
291
|
-
/* @__PURE__ */ jsx(
|
|
292
|
-
"button",
|
|
293
|
-
{
|
|
294
|
-
type: "button",
|
|
295
|
-
title: tr(
|
|
296
|
-
"fluidgrids.builder.quickConfigPanel.closeTooltip",
|
|
297
|
-
"Close"
|
|
298
|
-
),
|
|
299
|
-
"aria-label": tr(
|
|
300
|
-
"fluidgrids.builder.quickConfigPanel.closeAriaLabel",
|
|
301
|
-
"Close"
|
|
302
|
-
),
|
|
303
|
-
onClick: close,
|
|
304
|
-
className: "rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
|
|
305
|
-
"data-testid": "qc-close",
|
|
306
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: "mdi:close", className: "size-4" })
|
|
307
|
-
}
|
|
308
|
-
)
|
|
309
|
-
] }),
|
|
310
|
-
/* @__PURE__ */ jsx(
|
|
311
|
-
"div",
|
|
312
|
-
{
|
|
313
|
-
className: "min-h-0 flex-1 space-y-4 overflow-auto p-3",
|
|
314
|
-
"data-testid": "qc-params",
|
|
315
|
-
onFocusCapture: (e) => {
|
|
316
|
-
const tag = e.target.tagName;
|
|
317
|
-
if (sourceIds.length > 0 && (tag === "INPUT" || tag === "SELECT" || tag === "TEXTAREA")) {
|
|
318
|
-
setShowMapper(true);
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
children: /* @__PURE__ */ jsx(ReadOnlyFieldset, { className: "space-y-4", children: /* @__PURE__ */ jsx(
|
|
322
|
-
NodeParamsForm,
|
|
323
|
-
{
|
|
324
|
-
config,
|
|
325
|
-
nodeType: node.type,
|
|
326
|
-
testIdPrefix: "qc"
|
|
327
|
-
}
|
|
328
|
-
) })
|
|
329
|
-
}
|
|
330
|
-
),
|
|
331
|
-
/* @__PURE__ */ jsx(
|
|
332
|
-
NodeExecutionActions,
|
|
333
|
-
{
|
|
334
|
-
targetNodeId: nodeId,
|
|
335
|
-
nodes: workflow.nodes,
|
|
336
|
-
edges: workflow.edges,
|
|
337
|
-
logs: execution.logs,
|
|
338
|
-
workflowKey: workflow.workflowKey || workflow.id,
|
|
339
|
-
workflowVersion: workflow.version || "1.0.0",
|
|
340
|
-
sourceRun: execution.sourceRun,
|
|
341
|
-
isExecuting: execution.isExecuting,
|
|
342
|
-
onExecuteStep: async (targetId) => {
|
|
343
|
-
await executeStep(targetId);
|
|
344
|
-
},
|
|
345
|
-
onContinueFromNode: async (sourceRunId, targetId) => {
|
|
346
|
-
await executeFromNode(sourceRunId, targetId);
|
|
347
|
-
},
|
|
348
|
-
testIdPrefix: "qc"
|
|
349
|
-
}
|
|
350
|
-
),
|
|
351
|
-
/* @__PURE__ */ jsx("p", { className: "shrink-0 border-t border-border px-3 py-1.5 text-[10px] leading-snug text-muted-foreground", children: tr(
|
|
352
|
-
"fluidgrids.builder.quickConfigPanel.footerHint",
|
|
353
|
-
"Changes apply instantly \xB7 double-click the node for the full editor"
|
|
354
|
-
) })
|
|
355
|
-
]
|
|
356
|
-
}
|
|
357
|
-
)
|
|
358
|
-
}
|
|
359
|
-
)
|
|
360
|
-
] });
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
export { QuickConfigPanel };
|