@datatechsolutions/ui 2.11.14 → 2.11.16

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
  import 'react/jsx-runtime';
2
2
  import 'react';
3
- export { j as Workspace, h as WorkspaceProps } from '../workflow-canvas-CooSZh-g.mjs';
3
+ export { j as Workspace, h as WorkspaceProps } from '../workflow-canvas-Dfj5MOAY.mjs';
4
4
  import '@xyflow/react';
5
5
  import './contracts.mjs';
@@ -1,5 +1,5 @@
1
1
  import 'react/jsx-runtime';
2
2
  import 'react';
3
- export { j as Workspace, h as WorkspaceProps } from '../workflow-canvas-BUpiBzxZ.js';
3
+ export { j as Workspace, h as WorkspaceProps } from '../workflow-canvas-CEfOHTzN.js';
4
4
  import '@xyflow/react';
5
5
  import './contracts.js';
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkJT2JCLN5_js = require('../chunk-JT2JCLN5.js');
4
+ var chunk2JK7GQYA_js = require('../chunk-2JK7GQYA.js');
5
5
  require('../chunk-4XID6LOC.js');
6
6
  require('../chunk-S7KHTUHA.js');
7
7
  require('../chunk-UZ3CMNUJ.js');
@@ -13,7 +13,7 @@ require('../chunk-YXN2K77G.js');
13
13
 
14
14
  Object.defineProperty(exports, "Workspace", {
15
15
  enumerable: true,
16
- get: function () { return chunkJT2JCLN5_js.Workspace; }
16
+ get: function () { return chunk2JK7GQYA_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-OL7PEDJG.mjs';
2
+ export { Workspace } from '../chunk-4B47R7VI.mjs';
3
3
  import '../chunk-46ZM5VJJ.mjs';
4
4
  import '../chunk-QWG2FMUN.mjs';
5
5
  import '../chunk-D2JF6C3E.mjs';
@@ -340,6 +340,7 @@ var LOGIC_NODE_GRADIENTS = {
340
340
  note: "from-yellow-400 to-amber-500",
341
341
  entity: "from-blue-400 to-cyan-500",
342
342
  datasource: "from-cyan-500 to-blue-600",
343
+ model_provider: "from-rose-500 to-pink-600",
343
344
  group: "from-slate-400 to-gray-500"
344
345
  };
345
346
  var LOGIC_NODE_BADGE_COLORS = {
@@ -362,6 +363,7 @@ var LOGIC_NODE_BADGE_COLORS = {
362
363
  note: "bg-yellow-100 text-yellow-700 dark:bg-yellow-500/20 dark:text-yellow-300",
363
364
  entity: "bg-blue-100 text-blue-700 dark:bg-blue-500/20 dark:text-blue-300",
364
365
  datasource: "bg-cyan-100 text-cyan-700 dark:bg-cyan-500/20 dark:text-cyan-300",
366
+ model_provider: "bg-rose-100 text-rose-700 dark:bg-rose-500/20 dark:text-rose-300",
365
367
  group: "bg-slate-100 text-slate-700 dark:bg-slate-500/20 dark:text-slate-300"
366
368
  };
367
369
  var LOGIC_NODE_BADGE_SOFT_COLORS = {
@@ -384,6 +386,7 @@ var LOGIC_NODE_BADGE_SOFT_COLORS = {
384
386
  note: "bg-yellow-50 text-yellow-600 dark:bg-yellow-500/20 dark:text-yellow-400",
385
387
  entity: "bg-blue-50 text-blue-600 dark:bg-blue-500/20 dark:text-blue-400",
386
388
  datasource: "bg-cyan-50 text-cyan-600 dark:bg-cyan-500/20 dark:text-cyan-400",
389
+ model_provider: "bg-rose-50 text-rose-600 dark:bg-rose-500/20 dark:text-rose-400",
387
390
  group: "bg-slate-50 text-slate-600 dark:bg-slate-500/20 dark:text-slate-400"
388
391
  };
389
392
  var LOGIC_ICON_MAP = {
@@ -406,6 +409,7 @@ var LOGIC_ICON_MAP = {
406
409
  note: outline.PencilSquareIcon,
407
410
  entity: outline.CircleStackIcon,
408
411
  datasource: outline.ServerStackIcon,
412
+ model_provider: outline.KeyIcon,
409
413
  group: outline.RectangleGroupIcon
410
414
  };
411
415
  var NODE_SELECTED_CLASS = "node-card-selected";
@@ -433,7 +437,8 @@ var NODE_BORDER_COLORS = {
433
437
  document_extractor: "border-rose-300/50 dark:border-rose-600/50",
434
438
  list_operator: "border-lime-300/50 dark:border-lime-600/50",
435
439
  note: "border-gray-200/50 dark:border-gray-700/50",
436
- datasource: "border-cyan-300/50 dark:border-cyan-600/50"
440
+ datasource: "border-cyan-300/50 dark:border-cyan-600/50",
441
+ model_provider: "border-rose-300/50 dark:border-rose-600/50"
437
442
  };
438
443
  function getNodeStateClass(selected, nodeType, customBorder) {
439
444
  if (selected) return NODE_SELECTED_CLASS;
@@ -464,6 +469,7 @@ var MINIMAP_NODE_COLORS = {
464
469
  note: "#eab308",
465
470
  entity: "#3b82f6",
466
471
  datasource: "#06b6d4",
472
+ model_provider: "#f43f5e",
467
473
  group: "#64748b"
468
474
  };
469
475
  var LOGIC_NODE_HANDLE_COLORS = {
@@ -486,6 +492,7 @@ var LOGIC_NODE_HANDLE_COLORS = {
486
492
  note: "!bg-yellow-500",
487
493
  entity: "!bg-blue-500",
488
494
  datasource: "!bg-cyan-500",
495
+ model_provider: "!bg-rose-500",
489
496
  group: "!bg-slate-500"
490
497
  };
491
498
  var INSERTABLE_NODES = [
@@ -2760,6 +2767,84 @@ var DatasourceFlowNode = react.memo(function DatasourceFlowNode2({ id, data, sel
2760
2767
  /* @__PURE__ */ jsxRuntime.jsx(WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-cyan-400" })
2761
2768
  ] });
2762
2769
  });
2770
+ var SI = (slug, color) => `https://cdn.simpleicons.org/${slug}/${color}`;
2771
+ var PROVIDER_LOGOS = {
2772
+ aws_bedrock: "https://www.svgrepo.com/show/448266/aws.svg",
2773
+ openai_api: "https://www.svgrepo.com/show/306500/openai.svg",
2774
+ google_vertex: SI("googlegemini", "8E75B2"),
2775
+ azure_openai: SI("microsoftazure", "0078D4"),
2776
+ anthropic_api: SI("anthropic", "D4A27F")
2777
+ };
2778
+ var PROVIDER_TYPE_LABELS = {
2779
+ aws_bedrock: "AWS Bedrock",
2780
+ openai_api: "OpenAI API",
2781
+ google_vertex: "Google Vertex AI",
2782
+ azure_openai: "Azure OpenAI",
2783
+ anthropic_api: "Anthropic API",
2784
+ custom: "Custom"
2785
+ };
2786
+ var ModelProviderFlowNode = react.memo(function ModelProviderFlowNode2({ id, data, selected }) {
2787
+ const config = data.config;
2788
+ const isCompact = data.displayMode === "compact";
2789
+ if (!config) {
2790
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2791
+ /* @__PURE__ */ jsxRuntime.jsx(NodeRunningIndicator, { nodeId: id }),
2792
+ /* @__PURE__ */ jsxRuntime.jsx(WorkflowHandle, { type: "target", position: react$1.Position.Left, id: "left-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
2793
+ /* @__PURE__ */ jsxRuntime.jsx(WorkflowHandle, { type: "target", position: react$1.Position.Top, id: "top-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
2794
+ /* @__PURE__ */ jsxRuntime.jsx(NodeCard, { variant: "error", nodeType: "model_provider", width: "w-[280px]", children: /* @__PURE__ */ jsxRuntime.jsx(
2795
+ NodeCardHeader,
2796
+ {
2797
+ icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ExclamationTriangleIcon, { className: "h-6 w-6 text-white" }),
2798
+ title: data.label || "Model Provider",
2799
+ description: "Not configured",
2800
+ iconClassName: "flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-amber-400 to-orange-500 shadow-lg"
2801
+ }
2802
+ ) }),
2803
+ /* @__PURE__ */ jsxRuntime.jsx(WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-rose-500" }),
2804
+ /* @__PURE__ */ jsxRuntime.jsx(WorkflowHandle, { type: "source", position: react$1.Position.Bottom, id: "bottom-out", colorClass: "!bg-rose-500" })
2805
+ ] });
2806
+ }
2807
+ const providerLabel = PROVIDER_TYPE_LABELS[config.providerType] ?? config.providerType;
2808
+ const displayName = config.name || providerLabel;
2809
+ const regionLabel = config.region ? config.region : void 0;
2810
+ const isConfigured = !!(config.credentialRef || config.apiKeyRef);
2811
+ const logo = PROVIDER_LOGOS[config.providerType];
2812
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2813
+ /* @__PURE__ */ jsxRuntime.jsx(NodeRunningIndicator, { nodeId: id }),
2814
+ /* @__PURE__ */ jsxRuntime.jsx(WorkflowHandle, { type: "target", position: react$1.Position.Left, id: "left-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
2815
+ /* @__PURE__ */ jsxRuntime.jsx(WorkflowHandle, { type: "target", position: react$1.Position.Top, id: "top-in", colorClass: "!bg-gray-400 dark:!bg-gray-500" }),
2816
+ /* @__PURE__ */ jsxRuntime.jsx(
2817
+ "button",
2818
+ {
2819
+ type: "button",
2820
+ onClick: () => data.onEdit?.(id),
2821
+ className: "w-full text-left",
2822
+ children: /* @__PURE__ */ jsxRuntime.jsxs(NodeCard, { compact: isCompact, selected, nodeType: "model_provider", width: "w-[280px]", children: [
2823
+ /* @__PURE__ */ jsxRuntime.jsx(
2824
+ NodeCardHeader,
2825
+ {
2826
+ icon: logo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: providerLabel, className: "h-6 w-6 object-contain", loading: "lazy" }) : /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-6 w-6 text-white" }),
2827
+ title: displayName,
2828
+ description: providerLabel,
2829
+ iconClassName: "flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-rose-500 to-pink-600 shadow-lg p-1.5"
2830
+ }
2831
+ ),
2832
+ /* @__PURE__ */ jsxRuntime.jsx(NodeCardMeta, { compact: isCompact, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
2833
+ /* @__PURE__ */ jsxRuntime.jsx(NodeCardBadge, { className: "rounded-full bg-rose-100 px-2 py-0.5 text-[10px] font-semibold text-rose-700 dark:bg-rose-500/20 dark:text-rose-300", children: providerLabel }),
2834
+ regionLabel && /* @__PURE__ */ jsxRuntime.jsx(NodeCardBadge, { className: "rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-medium text-gray-600 dark:bg-white/10 dark:text-gray-300", children: regionLabel }),
2835
+ /* @__PURE__ */ jsxRuntime.jsx(NodeCardBadge, { className: `rounded-full px-2 py-0.5 text-[10px] font-medium ${isConfigured ? "bg-green-100 text-green-700 dark:bg-green-500/20 dark:text-green-300" : "bg-amber-100 text-amber-700 dark:bg-amber-500/20 dark:text-amber-300"}`, children: isConfigured ? "Configured" : "Setup needed" }),
2836
+ config.modelFilter && config.modelFilter.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(NodeCardBadge, { className: "rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-medium text-gray-600 dark:bg-white/10 dark:text-gray-300", children: [
2837
+ config.modelFilter.length,
2838
+ " models"
2839
+ ] })
2840
+ ] }) })
2841
+ ] })
2842
+ }
2843
+ ),
2844
+ /* @__PURE__ */ jsxRuntime.jsx(WorkflowHandle, { type: "source", position: react$1.Position.Right, id: "right-out", colorClass: "!bg-rose-500" }),
2845
+ /* @__PURE__ */ jsxRuntime.jsx(WorkflowHandle, { type: "source", position: react$1.Position.Bottom, id: "bottom-out", colorClass: "!bg-rose-500" })
2846
+ ] });
2847
+ });
2763
2848
  var GROUP_COLORS = {
2764
2849
  indigo: {
2765
2850
  border: "border-indigo-300/50 dark:border-indigo-600/50",
@@ -4953,6 +5038,135 @@ function GroupNodeConfigForm({ config, onSave, onCancel }) {
4953
5038
  )
4954
5039
  ] });
4955
5040
  }
5041
+ var PROVIDER_TYPES = [
5042
+ { value: "aws_bedrock", label: "AWS Bedrock" },
5043
+ { value: "openai_api", label: "OpenAI API" },
5044
+ { value: "google_vertex", label: "Google Vertex AI" },
5045
+ { value: "azure_openai", label: "Azure OpenAI" },
5046
+ { value: "anthropic_api", label: "Anthropic API" },
5047
+ { value: "custom", label: "Custom" }
5048
+ ];
5049
+ var REGION_OPTIONS = {
5050
+ aws_bedrock: [
5051
+ { value: "us-east-1", label: "US East (N. Virginia)" },
5052
+ { value: "us-west-2", label: "US West (Oregon)" },
5053
+ { value: "eu-west-1", label: "Europe (Ireland)" },
5054
+ { value: "eu-central-1", label: "Europe (Frankfurt)" },
5055
+ { value: "ap-northeast-1", label: "Asia Pacific (Tokyo)" },
5056
+ { value: "ap-southeast-1", label: "Asia Pacific (Singapore)" },
5057
+ { value: "sa-east-1", label: "South America (S\xE3o Paulo)" }
5058
+ ],
5059
+ google_vertex: [
5060
+ { value: "us-central1", label: "US Central (Iowa)" },
5061
+ { value: "us-east4", label: "US East (Virginia)" },
5062
+ { value: "europe-west4", label: "Europe West (Netherlands)" },
5063
+ { value: "asia-northeast1", label: "Asia NE (Tokyo)" }
5064
+ ],
5065
+ azure_openai: [
5066
+ { value: "eastus", label: "East US" },
5067
+ { value: "westeurope", label: "West Europe" },
5068
+ { value: "swedencentral", label: "Sweden Central" },
5069
+ { value: "japaneast", label: "Japan East" }
5070
+ ]
5071
+ };
5072
+ function ModelProviderNodeConfigForm({ config, onSave, onCancel }) {
5073
+ const t = chunkYXN2K77G_js.useTranslations("agents.workflow.modelProviderNodeConfig");
5074
+ const [providerType, setProviderType] = react.useState(config.providerType);
5075
+ const [name, setName] = react.useState(config.name ?? "");
5076
+ const [region, setRegion] = react.useState(config.region ?? "");
5077
+ const [endpoint, setEndpoint] = react.useState(config.endpoint ?? "");
5078
+ const [credentialRef, setCredentialRef] = react.useState(config.credentialRef ?? "");
5079
+ const [apiKeyRef, setApiKeyRef] = react.useState(config.apiKeyRef ?? "");
5080
+ const regions = REGION_OPTIONS[providerType] ?? [];
5081
+ const showRegion = regions.length > 0;
5082
+ const showEndpoint = providerType === "custom" || providerType === "azure_openai";
5083
+ const showApiKey = providerType === "openai_api" || providerType === "anthropic_api" || providerType === "custom";
5084
+ const showCredentialRef = providerType === "aws_bedrock" || providerType === "google_vertex";
5085
+ const handleSave = () => {
5086
+ onSave({
5087
+ ...config,
5088
+ providerType,
5089
+ name: name.trim() || void 0,
5090
+ region: region || void 0,
5091
+ endpoint: endpoint.trim() || void 0,
5092
+ credentialRef: credentialRef.trim() || void 0,
5093
+ apiKeyRef: apiKeyRef.trim() || void 0
5094
+ });
5095
+ };
5096
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
5097
+ /* @__PURE__ */ jsxRuntime.jsx(
5098
+ chunk4XID6LOC_js.FormInput,
5099
+ {
5100
+ type: "text",
5101
+ label: t("nameLabel"),
5102
+ value: name,
5103
+ onValueChange: setName,
5104
+ placeholder: t("namePlaceholder")
5105
+ }
5106
+ ),
5107
+ /* @__PURE__ */ jsxRuntime.jsx(
5108
+ chunk4XID6LOC_js.FormSelect,
5109
+ {
5110
+ label: t("providerTypeLabel"),
5111
+ value: providerType,
5112
+ onValueChange: (value) => {
5113
+ setProviderType(value);
5114
+ setRegion("");
5115
+ },
5116
+ options: PROVIDER_TYPES.map((pt) => ({ value: pt.value, label: pt.label }))
5117
+ }
5118
+ ),
5119
+ showRegion && /* @__PURE__ */ jsxRuntime.jsx(
5120
+ chunk4XID6LOC_js.FormSelect,
5121
+ {
5122
+ label: t("regionLabel"),
5123
+ value: region,
5124
+ onValueChange: setRegion,
5125
+ options: [{ value: "", label: t("selectRegion") }, ...regions]
5126
+ }
5127
+ ),
5128
+ showEndpoint && /* @__PURE__ */ jsxRuntime.jsx(
5129
+ chunk4XID6LOC_js.FormInput,
5130
+ {
5131
+ type: "text",
5132
+ label: t("endpointLabel"),
5133
+ value: endpoint,
5134
+ onValueChange: setEndpoint,
5135
+ placeholder: t("endpointPlaceholder")
5136
+ }
5137
+ ),
5138
+ showApiKey && /* @__PURE__ */ jsxRuntime.jsx(
5139
+ chunk4XID6LOC_js.FormInput,
5140
+ {
5141
+ type: "password",
5142
+ label: t("apiKeyLabel"),
5143
+ value: apiKeyRef,
5144
+ onValueChange: setApiKeyRef,
5145
+ placeholder: t("apiKeyPlaceholder")
5146
+ }
5147
+ ),
5148
+ showCredentialRef && /* @__PURE__ */ jsxRuntime.jsx(
5149
+ chunk4XID6LOC_js.FormInput,
5150
+ {
5151
+ type: "text",
5152
+ label: t("credentialRefLabel"),
5153
+ value: credentialRef,
5154
+ onValueChange: setCredentialRef,
5155
+ placeholder: t("credentialRefPlaceholder")
5156
+ }
5157
+ ),
5158
+ /* @__PURE__ */ jsxRuntime.jsx(
5159
+ ConfigFormActions,
5160
+ {
5161
+ cancelLabel: t("cancel"),
5162
+ saveLabel: t("save"),
5163
+ onCancel,
5164
+ onSave: handleSave,
5165
+ saveDisabled: !providerType
5166
+ }
5167
+ )
5168
+ ] });
5169
+ }
4956
5170
  var NODE_TITLE_KEYS = {
4957
5171
  start: "startNodeConfig",
4958
5172
  end: "endNodeConfig",
@@ -4972,7 +5186,8 @@ var NODE_TITLE_KEYS = {
4972
5186
  iteration_start: "iterationStartNodeConfig",
4973
5187
  entity: "entityNodeConfig",
4974
5188
  datasource: "datasourceNodeConfig",
4975
- group: "groupNodeConfig"
5189
+ group: "groupNodeConfig",
5190
+ model_provider: "modelProviderNodeConfig"
4976
5191
  };
4977
5192
  function LogicNodeModal({ onSave, entities = [], datasources = [], onLoadTables, onLoadSchema }) {
4978
5193
  const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
@@ -5043,6 +5258,8 @@ function LogicNodeModal({ onSave, entities = [], datasources = [], onLoadTables,
5043
5258
  return /* @__PURE__ */ jsxRuntime.jsx(EntityNodeConfigForm, { config, entities, onSave: handleSave, onCancel: closeModal });
5044
5259
  case "group":
5045
5260
  return /* @__PURE__ */ jsxRuntime.jsx(GroupNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
5261
+ case "model_provider":
5262
+ return /* @__PURE__ */ jsxRuntime.jsx(ModelProviderNodeConfigForm, { config, onSave: handleSave, onCancel: closeModal });
5046
5263
  default:
5047
5264
  return null;
5048
5265
  }
@@ -5413,6 +5630,7 @@ var BUILT_IN_NODE_TYPES = {
5413
5630
  iteration_start: IterationStartFlowNode,
5414
5631
  note: NoteFlowNode,
5415
5632
  datasource: DatasourceFlowNode,
5633
+ model_provider: ModelProviderFlowNode,
5416
5634
  group: GroupFlowNode
5417
5635
  };
5418
5636
  var ALL_LOGIC_NODE_TYPES = [
@@ -5438,6 +5656,7 @@ var ALL_LOGIC_NODE_TYPES = [
5438
5656
  "rule",
5439
5657
  "entity",
5440
5658
  "datasource",
5659
+ "model_provider",
5441
5660
  "group"
5442
5661
  ];
5443
5662
  function isLogicNodeType(nodeType) {
@@ -7125,6 +7344,7 @@ exports.LangChainIcon = LangChainIcon;
7125
7344
  exports.ListOperatorFlowNode = ListOperatorFlowNode;
7126
7345
  exports.LogicNodeModal = LogicNodeModal;
7127
7346
  exports.MINIMAP_NODE_COLORS = MINIMAP_NODE_COLORS;
7347
+ exports.ModelProviderFlowNode = ModelProviderFlowNode;
7128
7348
  exports.NodeCard = NodeCard;
7129
7349
  exports.NodeContextMenu = NodeContextMenu;
7130
7350
  exports.NoteFlowNode = NoteFlowNode;
@@ -7156,5 +7376,5 @@ exports.useModalStore = useModalStore;
7156
7376
  exports.useWorkflowBuilderClient = useWorkflowBuilderClient;
7157
7377
  exports.useWorkflowBuilderClientOptional = useWorkflowBuilderClientOptional;
7158
7378
  exports.useWorkflowStore = useWorkflowStore;
7159
- //# sourceMappingURL=chunk-JT2JCLN5.js.map
7160
- //# sourceMappingURL=chunk-JT2JCLN5.js.map
7379
+ //# sourceMappingURL=chunk-2JK7GQYA.js.map
7380
+ //# sourceMappingURL=chunk-2JK7GQYA.js.map