@datatechsolutions/ui 2.11.36 → 2.11.37

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 { ToggleSwitch, GlassModal, ContextMenu, FormInput, FormSelect, FormTextarea, Button, IconButton } from './chunk-DNGI4ASL.mjs';
2
+ import { ToggleSwitch, GlassModal, ContextMenu, FormInput, FormSelect, FormTextarea, Button, IconButton } from './chunk-MDD6H63O.mjs';
3
3
  import { useTranslations, I18nProvider, createI18nFromMessages } from './chunk-7VJ7CMMT.mjs';
4
4
  import { GraphNodeHeader, GraphNodeMeta, GraphNodeBadge, GraphNodeIconBubble } from './chunk-OZNTQROP.mjs';
5
5
  import { getAgentTier, createDefaultLogicNodeConfig, applyDagreLayout } from './chunk-TLPPVL3W.mjs';
@@ -2860,48 +2860,59 @@ var DatasourceFlowNode = memo(function DatasourceFlowNode2({ id, data, selected
2860
2860
  }
2861
2861
  const columnCount = config.selectedColumns?.length ?? 0;
2862
2862
  const filterCount = config.filterVariables ? Object.keys(config.filterVariables).length : 0;
2863
- const visibleColumns = config.selectedColumns.slice(0, 3);
2864
- const filterEntries = Object.entries(config.filterVariables ?? {});
2865
2863
  const content = /* @__PURE__ */ jsxs(NodeCard, { compact: isCompact, selected, nodeType: "datasource", children: [
2866
- /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
2867
- /* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-xl bg-gradient-to-br from-cyan-500 to-blue-600 shadow-lg", children: /* @__PURE__ */ jsx(ServerStackIcon, { className: "h-5 w-5 text-white" }) }),
2868
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
2869
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: label }),
2870
- !isCompact && /* @__PURE__ */ jsxs("p", { className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400", children: [
2871
- datasource?.name ?? config.datasourceId,
2872
- " \xB7 ",
2873
- config.table
2864
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
2865
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
2866
+ /* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-xl bg-gradient-to-br from-cyan-500 to-blue-600 shadow-lg", children: /* @__PURE__ */ jsx(ServerStackIcon, { className: "h-5 w-5 text-white" }) }),
2867
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
2868
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: label }),
2869
+ !isCompact && /* @__PURE__ */ jsxs("p", { className: "mt-0.5 line-clamp-1 text-xs text-gray-500 dark:text-gray-400", children: [
2870
+ datasource?.name ?? config.datasourceId,
2871
+ " \xB7 ",
2872
+ config.table
2873
+ ] })
2874
2874
  ] })
2875
- ] })
2875
+ ] }),
2876
+ !readOnly && /* @__PURE__ */ jsx(
2877
+ "span",
2878
+ {
2879
+ className: "nodrag nopan",
2880
+ onClick: (event) => {
2881
+ event.stopPropagation();
2882
+ event.preventDefault();
2883
+ },
2884
+ children: /* @__PURE__ */ jsx(
2885
+ ToggleSwitch,
2886
+ {
2887
+ checked: true,
2888
+ onChange: () => {
2889
+ },
2890
+ disabled: true,
2891
+ size: "sm",
2892
+ color: "teal",
2893
+ label: `${label} connected`
2894
+ }
2895
+ )
2896
+ }
2897
+ )
2876
2898
  ] }),
2877
2899
  /* @__PURE__ */ jsxs(NodeCardMeta, { compact: isCompact, children: [
2878
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
2879
- config.dialect && /* @__PURE__ */ jsx(NodeCardBadge, { className: "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-semibold bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-300", children: config.dialect }),
2880
- readOnly && /* @__PURE__ */ jsx(NodeCardBadge, { className: "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium bg-slate-100 text-slate-700 dark:bg-slate-500/20 dark:text-slate-300", children: "Sample Data" }),
2900
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2901
+ config.dialect && /* @__PURE__ */ jsx(NodeCardBadge, { className: "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-semibold bg-cyan-100 text-cyan-700 dark:bg-cyan-400/15 dark:text-cyan-400", children: config.dialect }),
2902
+ readOnly && /* @__PURE__ */ jsx(NodeCardBadge, { className: "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium bg-slate-100 text-slate-600 dark:bg-slate-500/20 dark:text-slate-400", children: "Sample" }),
2881
2903
  columnCount > 0 && /* @__PURE__ */ jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
2882
2904
  columnCount,
2883
- " ",
2884
- t("datasourceColumns")
2905
+ " cols"
2885
2906
  ] }),
2886
- config.limit > 0 && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: t("datasourceLimit", { count: config.limit }) }),
2887
2907
  filterCount > 0 && /* @__PURE__ */ jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
2888
2908
  filterCount,
2889
- " ",
2890
- t("datasourceFilters")
2891
- ] })
2892
- ] }),
2893
- !isCompact && /* @__PURE__ */ jsxs("div", { className: "mt-2 space-y-1", children: [
2894
- /* @__PURE__ */ jsxs("p", { className: "truncate text-[10px] text-gray-500 dark:text-gray-400", children: [
2895
- config.table,
2896
- " \u2192 ",
2897
- config.outputVariable
2909
+ " filters"
2898
2910
  ] }),
2899
- /* @__PURE__ */ jsxs("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: [
2900
- visibleColumns.join(", "),
2901
- columnCount > visibleColumns.length ? ` +${columnCount - visibleColumns.length} more` : ""
2911
+ config.limit > 0 && /* @__PURE__ */ jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
2912
+ "\u2264",
2913
+ config.limit
2902
2914
  ] })
2903
2915
  ] }),
2904
- !isCompact && filterEntries.length > 0 && /* @__PURE__ */ jsx("p", { className: "mt-2 truncate text-[10px] text-cyan-700 dark:text-cyan-300", children: filterEntries.map(([field, variableName]) => `${field} \u2192 ${variableName}`).join(" \xB7 ") }),
2905
2916
  onRemoveFromCanvas && /* @__PURE__ */ jsx(
2906
2917
  "span",
2907
2918
  {
@@ -7619,5 +7630,5 @@ function Workspace({
7619
7630
  }
7620
7631
 
7621
7632
  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 };
7622
- //# sourceMappingURL=chunk-OCGSU63W.mjs.map
7623
- //# sourceMappingURL=chunk-OCGSU63W.mjs.map
7633
+ //# sourceMappingURL=chunk-CQQKF7VT.mjs.map
7634
+ //# sourceMappingURL=chunk-CQQKF7VT.mjs.map