@datatechsolutions/ui 2.11.4 → 2.11.6

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,5 +1,5 @@
1
1
  "use client";
2
- import { GlassModalShell, ContextMenu, FormInput, FormTextarea, FormSelect, Button, Card, CardContent, IconButton, Input } from './chunk-F6EBSQF6.mjs';
2
+ import { GlassModalShell, ContextMenu, FormInput, FormTextarea, FormSelect, Button, Card, CardContent, IconButton, Input } from './chunk-46ZM5VJJ.mjs';
3
3
  import { GraphNodeHeader, GraphNodeMeta, GraphNodeBadge, GraphNodeIconBubble } from './chunk-OZNTQROP.mjs';
4
4
  import { getAgentTier, createDefaultLogicNodeConfig, applyDagreLayout } from './chunk-TLPPVL3W.mjs';
5
5
  import { useTranslations, I18nProvider, createI18nFromMessages } from './chunk-7VJ7CMMT.mjs';
@@ -214,14 +214,14 @@ var useModalStore = create((set) => ({
214
214
  subworkflowData: null,
215
215
  logicNodeData: null,
216
216
  pipelineSettingsData: null,
217
- openAgentDrawer: (agent, models, isCreateMode = false) => set({
217
+ openAgentModal: (agent, models, isCreateMode = false) => set({
218
218
  activeModal: "agent",
219
219
  agentData: { agent, models, isCreateMode },
220
220
  subworkflowData: null,
221
221
  logicNodeData: null,
222
222
  pipelineSettingsData: null
223
223
  }),
224
- openSubworkflowDrawer: (tool) => set({
224
+ openSubworkflowModal: (tool) => set({
225
225
  activeModal: "subworkflow",
226
226
  subworkflowData: { tool },
227
227
  agentData: null,
@@ -2888,42 +2888,6 @@ var GroupFlowNode = memo(function GroupFlowNode2({ id, data, selected }) {
2888
2888
  /* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-slate-500" })
2889
2889
  ] });
2890
2890
  });
2891
- var LEGACY_WIDTH_MAP = {
2892
- "max-w-xl": "xl",
2893
- "max-w-2xl": "2xl",
2894
- "max-w-4xl": "4xl",
2895
- "max-w-6xl": "6xl",
2896
- "max-w-full": "full"
2897
- };
2898
- function WorkspaceModal({
2899
- open,
2900
- onClose,
2901
- title,
2902
- subtitle,
2903
- icon,
2904
- gradient = "from-gray-400 to-gray-500",
2905
- maxWidth = "2xl",
2906
- tabs,
2907
- children
2908
- }) {
2909
- const resolvedSize = LEGACY_WIDTH_MAP[maxWidth] ?? maxWidth;
2910
- return /* @__PURE__ */ jsxs(
2911
- GlassModalShell,
2912
- {
2913
- open,
2914
- onClose,
2915
- title,
2916
- subtitle,
2917
- icon,
2918
- gradient,
2919
- maxWidth: resolvedSize,
2920
- children: [
2921
- tabs,
2922
- children
2923
- ]
2924
- }
2925
- );
2926
- }
2927
2891
  function StartNodeConfigForm({ config, onSave, onCancel }) {
2928
2892
  const t = useTranslations("agents.workflow.startNodeConfig");
2929
2893
  const [inputVariables, setInputVariables] = useState([...config.inputVariables]);
@@ -5127,14 +5091,16 @@ function LogicNodeModal({ onSave, entities = [], datasources = [], onLoadTables,
5127
5091
  }
5128
5092
  };
5129
5093
  return /* @__PURE__ */ jsx(
5130
- WorkspaceModal,
5094
+ GlassModalShell,
5131
5095
  {
5132
5096
  open,
5133
5097
  onClose: closeModal,
5134
5098
  title,
5135
5099
  subtitle: nodeLabel,
5100
+ label: t("nodeConfig"),
5136
5101
  icon: IconComponent ? /* @__PURE__ */ jsx(IconComponent, { className: "h-5 w-5 text-white" }) : void 0,
5137
5102
  gradient,
5103
+ maxWidth: "2xl",
5138
5104
  children: renderForm()
5139
5105
  }
5140
5106
  );
@@ -5553,21 +5519,21 @@ function WorkflowCanvasInner({
5553
5519
  onAgentSaved,
5554
5520
  isCreatingAgent = false,
5555
5521
  nodeTypes: externalNodeTypes,
5556
- renderAgentDrawer,
5522
+ renderAgentModal,
5557
5523
  renderLogicNodeModal: _renderLogicNodeModal
5558
5524
  }) {
5559
5525
  const { screenToFlowPosition, getNode, toObject, fitView, zoomIn, zoomOut, zoomTo } = useReactFlow();
5560
5526
  const tWorkflow = useTranslations("agents.workflow");
5561
5527
  const sortedAgents = useMemo(() => [...agents].sort((agentA, agentB) => (agentA.order ?? 0) - (agentB.order ?? 0)), [agents]);
5562
5528
  const [selectedAgentId, setSelectedAgentId] = useState(null);
5563
- const openAgentDrawerAction = useModalStore((s) => s.openAgentDrawer);
5529
+ const openAgentModalAction = useModalStore((s) => s.openAgentModal);
5564
5530
  const openLogicNodeModalAction = useModalStore((s) => s.openLogicNodeModal);
5565
5531
  const closeModalAction = useModalStore((s) => s.closeModal);
5566
5532
  const activeModal = useModalStore((s) => s.activeModal);
5567
5533
  const modalOpen = activeModal === "agent";
5568
5534
  useEffect(() => {
5569
5535
  if (isCreatingAgent) {
5570
- openAgentDrawerAction(
5536
+ openAgentModalAction(
5571
5537
  { agentId: "", name: "", order: 0, enabled: true, temperature: 0.7, maxTokens: 4096 },
5572
5538
  models,
5573
5539
  true
@@ -5710,7 +5676,7 @@ function WorkflowCanvasInner({
5710
5676
  selected: selectedAgentId === savedNode.id,
5711
5677
  onSelect: () => {
5712
5678
  setSelectedAgentId(agent.agentId);
5713
- openAgentDrawerAction(agent, models);
5679
+ openAgentModalAction(agent, models);
5714
5680
  },
5715
5681
  onRemoveFromCanvas: handleRemoveNodeFromCanvas
5716
5682
  }
@@ -6061,7 +6027,7 @@ function WorkflowCanvasInner({
6061
6027
  const agent = targetNode.data?.agent;
6062
6028
  if (agent) {
6063
6029
  setSelectedAgentId(agent.agentId ?? agent.id ?? null);
6064
- openAgentDrawerAction(agent, models);
6030
+ openAgentModalAction(agent, models);
6065
6031
  }
6066
6032
  } else if (targetNode.type === "tool") {
6067
6033
  const tool = targetNode.data?.tool;
@@ -6071,7 +6037,7 @@ function WorkflowCanvasInner({
6071
6037
  } else {
6072
6038
  handleEditLogicNode(nodeId);
6073
6039
  }
6074
- }, [nodes, setSelectedAgentId, openAgentDrawerAction, models, onEditTool, onEditRule, handleEditLogicNode]);
6040
+ }, [nodes, setSelectedAgentId, openAgentModalAction, models, onEditTool, onEditRule, handleEditLogicNode]);
6075
6041
  const DUPLICATE_OFFSET = 40;
6076
6042
  const contextMenuDuplicateNode = useCallback((nodeId) => {
6077
6043
  storeTakeSnapshot();
@@ -6552,7 +6518,7 @@ function WorkflowCanvasInner({
6552
6518
  selected: false,
6553
6519
  onSelect: () => {
6554
6520
  setSelectedAgentId(agent.agentId);
6555
- openAgentDrawerAction(agent, models);
6521
+ openAgentModalAction(agent, models);
6556
6522
  },
6557
6523
  onRemoveFromCanvas: handleRemoveNodeFromCanvas
6558
6524
  }
@@ -7008,7 +6974,7 @@ function WorkflowCanvasInner({
7008
6974
  }
7009
6975
  )
7010
6976
  ] }),
7011
- renderAgentDrawer?.({
6977
+ renderAgentModal?.({
7012
6978
  agent: selectedAgent,
7013
6979
  models,
7014
6980
  open: modalOpen || isCreatingAgent,
@@ -7172,6 +7138,6 @@ function Workspace({
7172
7138
  ) }) });
7173
7139
  }
7174
7140
 
7175
- 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, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, WorkflowCanvas, Workspace, WorkspaceModal, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
7176
- //# sourceMappingURL=chunk-BHKBEP2Y.mjs.map
7177
- //# sourceMappingURL=chunk-BHKBEP2Y.mjs.map
7141
+ 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, 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, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
7142
+ //# sourceMappingURL=chunk-TM2UUOQO.mjs.map
7143
+ //# sourceMappingURL=chunk-TM2UUOQO.mjs.map