@datatechsolutions/ui 2.11.77 → 2.11.79
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/index.d.mts +23 -3
- package/dist/astrlabe/index.d.ts +23 -3
- package/dist/astrlabe/index.js +185 -111
- package/dist/astrlabe/index.js.map +1 -1
- package/dist/astrlabe/index.mjs +79 -5
- package/dist/astrlabe/index.mjs.map +1 -1
- package/dist/astrlabe/workflow-canvas.js +2 -2
- package/dist/astrlabe/workflow-canvas.mjs +1 -1
- package/dist/{chunk-3TOG7EQN.mjs → chunk-J3OYJ44D.mjs} +44 -7
- package/dist/chunk-J3OYJ44D.mjs.map +1 -0
- package/dist/{chunk-PIFVDMDN.js → chunk-M7P2TQ6X.js} +44 -7
- package/dist/chunk-M7P2TQ6X.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-3TOG7EQN.mjs.map +0 -1
- package/dist/chunk-PIFVDMDN.js.map +0 -1
|
@@ -276,7 +276,7 @@ var useModalStore = zustand.create((set, get) => ({
|
|
|
276
276
|
stack: newStack
|
|
277
277
|
});
|
|
278
278
|
},
|
|
279
|
-
openPipelineSettingsModal: (name, description) => {
|
|
279
|
+
openPipelineSettingsModal: (name, description, lifecycle) => {
|
|
280
280
|
const current = get();
|
|
281
281
|
const entry = {
|
|
282
282
|
type: current.activeModal,
|
|
@@ -287,7 +287,13 @@ var useModalStore = zustand.create((set, get) => ({
|
|
|
287
287
|
const newStack = current.activeModal ? [...current.stack, entry] : current.stack;
|
|
288
288
|
set({
|
|
289
289
|
activeModal: "pipeline-settings",
|
|
290
|
-
pipelineSettingsData: {
|
|
290
|
+
pipelineSettingsData: {
|
|
291
|
+
name,
|
|
292
|
+
description,
|
|
293
|
+
slug: lifecycle?.slug,
|
|
294
|
+
isDraft: lifecycle?.isDraft,
|
|
295
|
+
isActive: lifecycle?.isActive
|
|
296
|
+
},
|
|
291
297
|
agentData: null,
|
|
292
298
|
logicNodeData: null,
|
|
293
299
|
stack: newStack
|
|
@@ -7022,15 +7028,25 @@ function WorkflowCanvasInner({
|
|
|
7022
7028
|
);
|
|
7023
7029
|
const buildInitialEdges = react.useCallback(() => {
|
|
7024
7030
|
if (initialGraph && initialGraph.edges.length > 0) {
|
|
7031
|
+
const aggregatorIds = new Set(
|
|
7032
|
+
initialGraph.nodes.filter((node) => node.type === "variable_aggregator").map((node) => node.id)
|
|
7033
|
+
);
|
|
7034
|
+
const aggregatorPortCursor = /* @__PURE__ */ new Map();
|
|
7025
7035
|
return initialGraph.edges.map((savedEdge) => {
|
|
7026
7036
|
const handle = savedEdge.sourceHandle;
|
|
7027
7037
|
const edgeColor = handle === "true-out" ? GRAPH_TRUE_EDGE_COLOR : handle === "false-out" ? GRAPH_FALSE_EDGE_COLOR : GRAPH_ACTIVE_EDGE_COLOR;
|
|
7038
|
+
let targetHandle = savedEdge.targetHandle;
|
|
7039
|
+
if (!targetHandle && aggregatorIds.has(savedEdge.target)) {
|
|
7040
|
+
const nextIndex = aggregatorPortCursor.get(savedEdge.target) ?? 0;
|
|
7041
|
+
targetHandle = `input-${nextIndex}`;
|
|
7042
|
+
aggregatorPortCursor.set(savedEdge.target, nextIndex + 1);
|
|
7043
|
+
}
|
|
7028
7044
|
return {
|
|
7029
7045
|
id: savedEdge.id,
|
|
7030
7046
|
source: savedEdge.source,
|
|
7031
7047
|
target: savedEdge.target,
|
|
7032
7048
|
sourceHandle: savedEdge.sourceHandle,
|
|
7033
|
-
targetHandle
|
|
7049
|
+
targetHandle,
|
|
7034
7050
|
type: "default",
|
|
7035
7051
|
animated: true,
|
|
7036
7052
|
data: {
|
|
@@ -7843,10 +7859,31 @@ function WorkflowCanvasInner({
|
|
|
7843
7859
|
(connection) => {
|
|
7844
7860
|
storeTakeSnapshot();
|
|
7845
7861
|
const edgeLabel = resolveEdgeLabel(connection.sourceHandle, connection.source);
|
|
7862
|
+
const targetNode = connection.target ? getNode(connection.target) : void 0;
|
|
7863
|
+
let resolvedConnection = connection;
|
|
7864
|
+
if (targetNode?.type === "variable_aggregator") {
|
|
7865
|
+
const aggConfig = targetNode.data.config;
|
|
7866
|
+
const existingInputs = aggConfig?.inputVariables ?? [];
|
|
7867
|
+
const nextIndex = existingInputs.length;
|
|
7868
|
+
const nextHandle = `input-${nextIndex}`;
|
|
7869
|
+
resolvedConnection = { ...connection, targetHandle: nextHandle };
|
|
7870
|
+
const nextVarName = connection.source ?? `input-${nextIndex + 1}`;
|
|
7871
|
+
setNodes(
|
|
7872
|
+
(currentNodes) => currentNodes.map((node) => {
|
|
7873
|
+
if (node.id !== connection.target) return node;
|
|
7874
|
+
const data = node.data;
|
|
7875
|
+
const nextConfig = {
|
|
7876
|
+
...data.config ?? { type: "variable_aggregator", inputVariables: [], outputVariable: "context" },
|
|
7877
|
+
inputVariables: [...existingInputs, nextVarName]
|
|
7878
|
+
};
|
|
7879
|
+
return { ...node, data: { ...data, config: nextConfig } };
|
|
7880
|
+
})
|
|
7881
|
+
);
|
|
7882
|
+
}
|
|
7846
7883
|
setEdges(
|
|
7847
7884
|
(currentEdges) => react$1.addEdge(
|
|
7848
7885
|
{
|
|
7849
|
-
...
|
|
7886
|
+
...resolvedConnection,
|
|
7850
7887
|
type: "default",
|
|
7851
7888
|
animated: true,
|
|
7852
7889
|
data: { label: edgeLabel, onInsertNode: insertNodeOnEdge },
|
|
@@ -7857,7 +7894,7 @@ function WorkflowCanvasInner({
|
|
|
7857
7894
|
)
|
|
7858
7895
|
);
|
|
7859
7896
|
},
|
|
7860
|
-
[setEdges, storeTakeSnapshot, resolveEdgeLabel, insertNodeOnEdge]
|
|
7897
|
+
[setEdges, setNodes, getNode, storeTakeSnapshot, resolveEdgeLabel, insertNodeOnEdge]
|
|
7861
7898
|
);
|
|
7862
7899
|
const isValidConnection = react.useCallback(
|
|
7863
7900
|
(connection) => {
|
|
@@ -8393,5 +8430,5 @@ exports.useModalStore = useModalStore;
|
|
|
8393
8430
|
exports.useWorkflowBuilderClient = useWorkflowBuilderClient;
|
|
8394
8431
|
exports.useWorkflowBuilderClientOptional = useWorkflowBuilderClientOptional;
|
|
8395
8432
|
exports.useWorkflowStore = useWorkflowStore;
|
|
8396
|
-
//# sourceMappingURL=chunk-
|
|
8397
|
-
//# sourceMappingURL=chunk-
|
|
8433
|
+
//# sourceMappingURL=chunk-M7P2TQ6X.js.map
|
|
8434
|
+
//# sourceMappingURL=chunk-M7P2TQ6X.js.map
|