@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.
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkPIFVDMDN_js = require('../chunk-PIFVDMDN.js');
4
+ var chunkM7P2TQ6X_js = require('../chunk-M7P2TQ6X.js');
5
5
  require('../chunk-TUEYBNWL.js');
6
6
  require('../chunk-YXN2K77G.js');
7
7
  require('../chunk-S7KHTUHA.js');
@@ -13,7 +13,7 @@ require('../chunk-C7BI5LQ6.js');
13
13
 
14
14
  Object.defineProperty(exports, "Workspace", {
15
15
  enumerable: true,
16
- get: function () { return chunkPIFVDMDN_js.Workspace; }
16
+ get: function () { return chunkM7P2TQ6X_js.Workspace; }
17
17
  });
18
18
  //# sourceMappingURL=workflow-canvas.js.map
19
19
  //# sourceMappingURL=workflow-canvas.js.map
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- export { Workspace } from '../chunk-3TOG7EQN.mjs';
2
+ export { Workspace } from '../chunk-J3OYJ44D.mjs';
3
3
  import '../chunk-LLFU42KC.mjs';
4
4
  import '../chunk-7VJ7CMMT.mjs';
5
5
  import '../chunk-QWG2FMUN.mjs';
@@ -274,7 +274,7 @@ var useModalStore = create((set, get) => ({
274
274
  stack: newStack
275
275
  });
276
276
  },
277
- openPipelineSettingsModal: (name, description) => {
277
+ openPipelineSettingsModal: (name, description, lifecycle) => {
278
278
  const current = get();
279
279
  const entry = {
280
280
  type: current.activeModal,
@@ -285,7 +285,13 @@ var useModalStore = create((set, get) => ({
285
285
  const newStack = current.activeModal ? [...current.stack, entry] : current.stack;
286
286
  set({
287
287
  activeModal: "pipeline-settings",
288
- pipelineSettingsData: { name, description },
288
+ pipelineSettingsData: {
289
+ name,
290
+ description,
291
+ slug: lifecycle?.slug,
292
+ isDraft: lifecycle?.isDraft,
293
+ isActive: lifecycle?.isActive
294
+ },
289
295
  agentData: null,
290
296
  logicNodeData: null,
291
297
  stack: newStack
@@ -7020,15 +7026,25 @@ function WorkflowCanvasInner({
7020
7026
  );
7021
7027
  const buildInitialEdges = useCallback(() => {
7022
7028
  if (initialGraph && initialGraph.edges.length > 0) {
7029
+ const aggregatorIds = new Set(
7030
+ initialGraph.nodes.filter((node) => node.type === "variable_aggregator").map((node) => node.id)
7031
+ );
7032
+ const aggregatorPortCursor = /* @__PURE__ */ new Map();
7023
7033
  return initialGraph.edges.map((savedEdge) => {
7024
7034
  const handle = savedEdge.sourceHandle;
7025
7035
  const edgeColor = handle === "true-out" ? GRAPH_TRUE_EDGE_COLOR : handle === "false-out" ? GRAPH_FALSE_EDGE_COLOR : GRAPH_ACTIVE_EDGE_COLOR;
7036
+ let targetHandle = savedEdge.targetHandle;
7037
+ if (!targetHandle && aggregatorIds.has(savedEdge.target)) {
7038
+ const nextIndex = aggregatorPortCursor.get(savedEdge.target) ?? 0;
7039
+ targetHandle = `input-${nextIndex}`;
7040
+ aggregatorPortCursor.set(savedEdge.target, nextIndex + 1);
7041
+ }
7026
7042
  return {
7027
7043
  id: savedEdge.id,
7028
7044
  source: savedEdge.source,
7029
7045
  target: savedEdge.target,
7030
7046
  sourceHandle: savedEdge.sourceHandle,
7031
- targetHandle: savedEdge.targetHandle,
7047
+ targetHandle,
7032
7048
  type: "default",
7033
7049
  animated: true,
7034
7050
  data: {
@@ -7841,10 +7857,31 @@ function WorkflowCanvasInner({
7841
7857
  (connection) => {
7842
7858
  storeTakeSnapshot();
7843
7859
  const edgeLabel = resolveEdgeLabel(connection.sourceHandle, connection.source);
7860
+ const targetNode = connection.target ? getNode(connection.target) : void 0;
7861
+ let resolvedConnection = connection;
7862
+ if (targetNode?.type === "variable_aggregator") {
7863
+ const aggConfig = targetNode.data.config;
7864
+ const existingInputs = aggConfig?.inputVariables ?? [];
7865
+ const nextIndex = existingInputs.length;
7866
+ const nextHandle = `input-${nextIndex}`;
7867
+ resolvedConnection = { ...connection, targetHandle: nextHandle };
7868
+ const nextVarName = connection.source ?? `input-${nextIndex + 1}`;
7869
+ setNodes(
7870
+ (currentNodes) => currentNodes.map((node) => {
7871
+ if (node.id !== connection.target) return node;
7872
+ const data = node.data;
7873
+ const nextConfig = {
7874
+ ...data.config ?? { type: "variable_aggregator", inputVariables: [], outputVariable: "context" },
7875
+ inputVariables: [...existingInputs, nextVarName]
7876
+ };
7877
+ return { ...node, data: { ...data, config: nextConfig } };
7878
+ })
7879
+ );
7880
+ }
7844
7881
  setEdges(
7845
7882
  (currentEdges) => addEdge(
7846
7883
  {
7847
- ...connection,
7884
+ ...resolvedConnection,
7848
7885
  type: "default",
7849
7886
  animated: true,
7850
7887
  data: { label: edgeLabel, onInsertNode: insertNodeOnEdge },
@@ -7855,7 +7892,7 @@ function WorkflowCanvasInner({
7855
7892
  )
7856
7893
  );
7857
7894
  },
7858
- [setEdges, storeTakeSnapshot, resolveEdgeLabel, insertNodeOnEdge]
7895
+ [setEdges, setNodes, getNode, storeTakeSnapshot, resolveEdgeLabel, insertNodeOnEdge]
7859
7896
  );
7860
7897
  const isValidConnection = useCallback(
7861
7898
  (connection) => {
@@ -8328,5 +8365,5 @@ function Workspace({
8328
8365
  }
8329
8366
 
8330
8367
  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 };
8331
- //# sourceMappingURL=chunk-3TOG7EQN.mjs.map
8332
- //# sourceMappingURL=chunk-3TOG7EQN.mjs.map
8368
+ //# sourceMappingURL=chunk-J3OYJ44D.mjs.map
8369
+ //# sourceMappingURL=chunk-J3OYJ44D.mjs.map