@datatechsolutions/ui 2.11.42 → 2.11.43
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.js +108 -108
- package/dist/astrlabe/index.mjs +2 -2
- package/dist/astrlabe/workflow-canvas.js +2 -2
- package/dist/astrlabe/workflow-canvas.mjs +1 -1
- package/dist/{chunk-YI6QMBKC.js → chunk-7XITJWOE.js} +227 -156
- package/dist/chunk-7XITJWOE.js.map +1 -0
- package/dist/{chunk-HRQPV3H3.mjs → chunk-RCOGWCF2.mjs} +228 -157
- package/dist/chunk-RCOGWCF2.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-HRQPV3H3.mjs.map +0 -1
- package/dist/chunk-YI6QMBKC.js.map +0 -1
|
@@ -8,7 +8,7 @@ import { Position, NodeResizer, MarkerType, useReactFlow, getBezierPath, BaseEdg
|
|
|
8
8
|
import '@xyflow/react/dist/style.css';
|
|
9
9
|
import { create } from 'zustand';
|
|
10
10
|
import { PlusIcon, XMarkIcon } from '@heroicons/react/24/solid';
|
|
11
|
-
import { Bars2Icon, CursorArrowRaysIcon, HandRaisedIcon, MagnifyingGlassPlusIcon, MagnifyingGlassMinusIcon, ArrowsPointingInIcon, ArrowUturnLeftIcon, ArrowUturnRightIcon, MapIcon, EllipsisHorizontalIcon, Squares2X2Icon, ArrowsRightLeftIcon, CommandLineIcon, ExclamationTriangleIcon, CpuChipIcon, TrashIcon, WrenchScrewdriverIcon, NewspaperIcon, ChartBarIcon, CloudIcon, ScaleIcon, AdjustmentsHorizontalIcon, CircleStackIcon, PlayIcon, StopIcon, ArrowsPointingOutIcon, CodeBracketIcon, GlobeAltIcon, DocumentTextIcon, ArrowPathIcon, BookOpenIcon, ChatBubbleLeftRightIcon, QuestionMarkCircleIcon, AdjustmentsVerticalIcon, Square3Stack3DIcon, DocumentMagnifyingGlassIcon, ListBulletIcon, PlayCircleIcon, PencilSquareIcon, ServerStackIcon, KeyIcon, RectangleGroupIcon, ChevronDownIcon, ChevronUpIcon, PresentationChartBarIcon, ChartPieIcon, ChartBarSquareIcon, CurrencyDollarIcon, ShieldCheckIcon, ClipboardDocumentCheckIcon, FireIcon, ShoppingBagIcon, UsersIcon, BuildingStorefrontIcon, PencilIcon, DocumentDuplicateIcon, ClipboardDocumentIcon, ClipboardIcon, PlusIcon as PlusIcon$1, XMarkIcon as XMarkIcon$1 } from '@heroicons/react/24/outline';
|
|
11
|
+
import { Bars2Icon, CursorArrowRaysIcon, HandRaisedIcon, MagnifyingGlassPlusIcon, MagnifyingGlassMinusIcon, ArrowsPointingInIcon, ArrowUturnLeftIcon, ArrowUturnRightIcon, MapIcon, EllipsisHorizontalIcon, Squares2X2Icon, ArrowsRightLeftIcon, CommandLineIcon, ExclamationTriangleIcon, CpuChipIcon, TrashIcon, WrenchScrewdriverIcon, NewspaperIcon, ChartBarIcon, CloudIcon, ScaleIcon, AdjustmentsHorizontalIcon, CircleStackIcon, PlayIcon, StopIcon, ArrowsPointingOutIcon, CodeBracketIcon, GlobeAltIcon, DocumentTextIcon, ArrowPathIcon, BookOpenIcon, ChatBubbleLeftRightIcon, QuestionMarkCircleIcon, AdjustmentsVerticalIcon, Square3Stack3DIcon, DocumentMagnifyingGlassIcon, ListBulletIcon, PlayCircleIcon, PencilSquareIcon, ServerStackIcon, KeyIcon, RectangleGroupIcon, ChevronDownIcon, ChevronUpIcon, PresentationChartBarIcon, ChartPieIcon, ChartBarSquareIcon, CurrencyDollarIcon, ShieldCheckIcon, ClipboardDocumentCheckIcon, FireIcon, ShoppingBagIcon, UsersIcon, BuildingStorefrontIcon, PencilIcon, DocumentDuplicateIcon, ClipboardDocumentIcon, ClipboardIcon, PlusIcon as PlusIcon$1, XMarkIcon as XMarkIcon$1, CheckIcon, TableCellsIcon, MagnifyingGlassIcon, VariableIcon, FunnelIcon } from '@heroicons/react/24/outline';
|
|
12
12
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
13
|
|
|
14
14
|
var DEFAULT_PASTE_OFFSET = 40;
|
|
@@ -4857,24 +4857,61 @@ function EntityNodeConfigForm({ config, entities = [], onSave, onCancel }) {
|
|
|
4857
4857
|
] })
|
|
4858
4858
|
] });
|
|
4859
4859
|
}
|
|
4860
|
-
var
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4860
|
+
var DATASOURCE_LOGOS2 = {
|
|
4861
|
+
bigquery: "/logos/datasources/bigquery.svg",
|
|
4862
|
+
postgres: "/logos/datasources/postgres.svg",
|
|
4863
|
+
snowflake: "/logos/datasources/snowflake.svg",
|
|
4864
|
+
mongodb: "/logos/datasources/mongodb.svg",
|
|
4865
|
+
redis: "/logos/datasources/redis.svg",
|
|
4866
|
+
mysql: "/logos/datasources/mysql.svg",
|
|
4867
|
+
clickhouse: "/logos/datasources/clickhouse.svg",
|
|
4868
|
+
elasticsearch: "/logos/datasources/elasticsearch.svg",
|
|
4869
|
+
duckdb: "/logos/datasources/duckdb.svg",
|
|
4870
|
+
sqlite: "/logos/datasources/sqlite.svg",
|
|
4871
|
+
mariadb: "/logos/datasources/mariadb.svg",
|
|
4872
|
+
oracle: "/logos/datasources/oracle.svg",
|
|
4873
|
+
mssql: "/logos/datasources/mssql.svg",
|
|
4874
|
+
sqlserver: "/logos/datasources/mssql.svg",
|
|
4875
|
+
cassandra: "/logos/datasources/cassandra.svg",
|
|
4876
|
+
dynamodb: "/logos/datasources/dynamodb.svg",
|
|
4877
|
+
cockroach: "/logos/datasources/cockroachdb.svg",
|
|
4878
|
+
supabase: "/logos/datasources/supabase.svg",
|
|
4879
|
+
firebase: "/logos/datasources/firebase.svg",
|
|
4880
|
+
neo4j: "/logos/datasources/neo4j.svg"
|
|
4877
4881
|
};
|
|
4882
|
+
function getDatasourceLogo2(datasourceId, dialect) {
|
|
4883
|
+
const search = (dialect ?? datasourceId).toLowerCase();
|
|
4884
|
+
for (const [key, url] of Object.entries(DATASOURCE_LOGOS2)) {
|
|
4885
|
+
if (search.includes(key)) return url;
|
|
4886
|
+
}
|
|
4887
|
+
return null;
|
|
4888
|
+
}
|
|
4889
|
+
var TYPE_COLORS = {
|
|
4890
|
+
string: "bg-gray-500/10 text-gray-500 dark:text-gray-400",
|
|
4891
|
+
varchar: "bg-gray-500/10 text-gray-500 dark:text-gray-400",
|
|
4892
|
+
text: "bg-gray-500/10 text-gray-500 dark:text-gray-400",
|
|
4893
|
+
integer: "bg-blue-500/10 text-blue-600 dark:text-blue-400",
|
|
4894
|
+
int: "bg-blue-500/10 text-blue-600 dark:text-blue-400",
|
|
4895
|
+
bigint: "bg-blue-500/10 text-blue-600 dark:text-blue-400",
|
|
4896
|
+
number: "bg-blue-500/10 text-blue-600 dark:text-blue-400",
|
|
4897
|
+
decimal: "bg-indigo-500/10 text-indigo-600 dark:text-indigo-400",
|
|
4898
|
+
float: "bg-indigo-500/10 text-indigo-600 dark:text-indigo-400",
|
|
4899
|
+
boolean: "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",
|
|
4900
|
+
date: "bg-amber-500/10 text-amber-600 dark:text-amber-400",
|
|
4901
|
+
timestamp: "bg-amber-500/10 text-amber-600 dark:text-amber-400",
|
|
4902
|
+
datetime: "bg-amber-500/10 text-amber-600 dark:text-amber-400",
|
|
4903
|
+
json: "bg-violet-500/10 text-violet-600 dark:text-violet-400",
|
|
4904
|
+
jsonb: "bg-violet-500/10 text-violet-600 dark:text-violet-400",
|
|
4905
|
+
uuid: "bg-teal-500/10 text-teal-600 dark:text-teal-400",
|
|
4906
|
+
array: "bg-pink-500/10 text-pink-600 dark:text-pink-400"
|
|
4907
|
+
};
|
|
4908
|
+
function SectionHeader({ icon: Icon, title, badge }) {
|
|
4909
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-3", children: [
|
|
4910
|
+
/* @__PURE__ */ jsx(Icon, { className: "h-4 w-4 text-gray-400 dark:text-gray-500" }),
|
|
4911
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: title }),
|
|
4912
|
+
badge !== void 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto rounded-full bg-indigo-500/10 px-2 py-0.5 text-[10px] font-semibold text-indigo-600 dark:text-indigo-400", children: badge })
|
|
4913
|
+
] });
|
|
4914
|
+
}
|
|
4878
4915
|
function DatasourceNodeConfigForm({
|
|
4879
4916
|
nodeId,
|
|
4880
4917
|
config,
|
|
@@ -4893,9 +4930,19 @@ function DatasourceNodeConfigForm({
|
|
|
4893
4930
|
const [outputVariable, setOutputVariable] = useState(config.outputVariable);
|
|
4894
4931
|
const [limit, setLimit] = useState(config.limit);
|
|
4895
4932
|
const [filterVariables, setFilterVariables] = useState({ ...config.filterVariables });
|
|
4933
|
+
const [tableSearch, setTableSearch] = useState("");
|
|
4934
|
+
const [columnSearch, setColumnSearch] = useState("");
|
|
4896
4935
|
const allColumnNames = availableColumns.map((column) => column.name);
|
|
4897
4936
|
const allSelected = selectedColumns.length > 0 && selectedColumns.length === allColumnNames.length;
|
|
4898
4937
|
const selectedDatasource = datasources.find((datasource) => datasource.id === selectedDatasourceId);
|
|
4938
|
+
const filteredTables = useMemo(
|
|
4939
|
+
() => tableSearch ? availableTables.filter((table) => table.toLowerCase().includes(tableSearch.toLowerCase())) : availableTables,
|
|
4940
|
+
[availableTables, tableSearch]
|
|
4941
|
+
);
|
|
4942
|
+
const filteredColumns = useMemo(
|
|
4943
|
+
() => columnSearch ? availableColumns.filter((column) => column.name.toLowerCase().includes(columnSearch.toLowerCase())) : availableColumns,
|
|
4944
|
+
[availableColumns, columnSearch]
|
|
4945
|
+
);
|
|
4899
4946
|
const loadTables = useCallback(async (datasourceId) => {
|
|
4900
4947
|
if (!datasourceId) {
|
|
4901
4948
|
setAvailableTables([]);
|
|
@@ -4913,14 +4960,10 @@ function DatasourceNodeConfigForm({
|
|
|
4913
4960
|
setAvailableColumns(columns);
|
|
4914
4961
|
}, [onLoadSchema]);
|
|
4915
4962
|
useEffect(() => {
|
|
4916
|
-
if (selectedDatasourceId)
|
|
4917
|
-
loadTables(selectedDatasourceId);
|
|
4918
|
-
}
|
|
4963
|
+
if (selectedDatasourceId) loadTables(selectedDatasourceId);
|
|
4919
4964
|
}, [selectedDatasourceId, loadTables]);
|
|
4920
4965
|
useEffect(() => {
|
|
4921
|
-
if (selectedDatasourceId && selectedTable)
|
|
4922
|
-
loadSchema(selectedDatasourceId, selectedTable);
|
|
4923
|
-
}
|
|
4966
|
+
if (selectedDatasourceId && selectedTable) loadSchema(selectedDatasourceId, selectedTable);
|
|
4924
4967
|
}, [selectedDatasourceId, selectedTable, loadSchema]);
|
|
4925
4968
|
const handleDatasourceChange = (datasourceId) => {
|
|
4926
4969
|
setSelectedDatasourceId(datasourceId);
|
|
@@ -4929,19 +4972,18 @@ function DatasourceNodeConfigForm({
|
|
|
4929
4972
|
setAvailableColumns([]);
|
|
4930
4973
|
setSelectedColumns([]);
|
|
4931
4974
|
setFilterVariables({});
|
|
4975
|
+
setTableSearch("");
|
|
4976
|
+
setColumnSearch("");
|
|
4932
4977
|
};
|
|
4933
4978
|
const handleTableChange = (table) => {
|
|
4934
4979
|
setSelectedTable(table);
|
|
4935
4980
|
setAvailableColumns([]);
|
|
4936
4981
|
setSelectedColumns([]);
|
|
4937
4982
|
setFilterVariables({});
|
|
4983
|
+
setColumnSearch("");
|
|
4938
4984
|
};
|
|
4939
4985
|
const handleToggleSelectAll = () => {
|
|
4940
|
-
|
|
4941
|
-
setSelectedColumns([]);
|
|
4942
|
-
} else {
|
|
4943
|
-
setSelectedColumns([...allColumnNames]);
|
|
4944
|
-
}
|
|
4986
|
+
setSelectedColumns(allSelected ? [] : [...allColumnNames]);
|
|
4945
4987
|
};
|
|
4946
4988
|
const handleToggleColumn = (columnName) => {
|
|
4947
4989
|
setSelectedColumns(
|
|
@@ -4949,7 +4991,7 @@ function DatasourceNodeConfigForm({
|
|
|
4949
4991
|
);
|
|
4950
4992
|
};
|
|
4951
4993
|
const handleAddFilter = () => {
|
|
4952
|
-
setFilterVariables((previous) => ({ ...previous,
|
|
4994
|
+
setFilterVariables((previous) => ({ ...previous, [`field_${Object.keys(previous).length}`]: "" }));
|
|
4953
4995
|
};
|
|
4954
4996
|
const handleUpdateFilterVariable = (oldKey, newKey) => {
|
|
4955
4997
|
setFilterVariables((previous) => {
|
|
@@ -4973,9 +5015,7 @@ function DatasourceNodeConfigForm({
|
|
|
4973
5015
|
const handleSave = () => {
|
|
4974
5016
|
const cleanedFilters = {};
|
|
4975
5017
|
for (const [key, value] of Object.entries(filterVariables)) {
|
|
4976
|
-
if (key.trim() && value.trim())
|
|
4977
|
-
cleanedFilters[key.trim()] = value.trim();
|
|
4978
|
-
}
|
|
5018
|
+
if (key.trim() && value.trim()) cleanedFilters[key.trim()] = value.trim();
|
|
4979
5019
|
}
|
|
4980
5020
|
onSave({
|
|
4981
5021
|
...config,
|
|
@@ -4989,130 +5029,171 @@ function DatasourceNodeConfigForm({
|
|
|
4989
5029
|
});
|
|
4990
5030
|
};
|
|
4991
5031
|
const filterEntries = Object.entries(filterVariables);
|
|
4992
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-
|
|
5032
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
4993
5033
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
4994
|
-
/* @__PURE__ */ jsx(
|
|
4995
|
-
/* @__PURE__ */ jsx("
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
datasource.
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
/* @__PURE__ */ jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300", children: t("tableLabel") }),
|
|
5017
|
-
/* @__PURE__ */ jsx("p", { className: "mb-2 text-xs text-gray-500 dark:text-gray-400", children: t("tableHelp") }),
|
|
5018
|
-
/* @__PURE__ */ jsxs(
|
|
5019
|
-
"select",
|
|
5020
|
-
{
|
|
5021
|
-
value: selectedTable,
|
|
5022
|
-
onChange: (event) => handleTableChange(event.target.value),
|
|
5023
|
-
disabled: !selectedDatasourceId,
|
|
5024
|
-
className: "w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 outline-none focus:border-indigo-400 focus:ring-2 focus:ring-indigo-400/20 disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-600 dark:bg-gray-800 dark:text-white",
|
|
5025
|
-
children: [
|
|
5026
|
-
/* @__PURE__ */ jsx("option", { value: "", children: t("selectTable") }),
|
|
5027
|
-
availableTables.map((table) => /* @__PURE__ */ jsx("option", { value: table, children: table }, table))
|
|
5028
|
-
]
|
|
5029
|
-
}
|
|
5030
|
-
)
|
|
5034
|
+
/* @__PURE__ */ jsx(SectionHeader, { icon: CircleStackIcon, title: t("datasourceLabel"), badge: datasources.length }),
|
|
5035
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2", children: datasources.map((datasource) => {
|
|
5036
|
+
const isSelected = datasource.id === selectedDatasourceId;
|
|
5037
|
+
const logo = getDatasourceLogo2(datasource.id, datasource.dialect);
|
|
5038
|
+
return /* @__PURE__ */ jsxs(
|
|
5039
|
+
"button",
|
|
5040
|
+
{
|
|
5041
|
+
type: "button",
|
|
5042
|
+
onClick: () => handleDatasourceChange(datasource.id),
|
|
5043
|
+
className: `flex items-center gap-3 rounded-xl border px-3 py-2.5 text-left transition-all ${isSelected ? "border-cyan-500/50 bg-cyan-500/5 ring-1 ring-cyan-500/20 dark:border-cyan-400/40 dark:bg-cyan-400/5" : "border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm dark:border-white/10 dark:bg-white/[0.03] dark:hover:border-white/20"}`,
|
|
5044
|
+
children: [
|
|
5045
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-9 w-9 shrink-0 items-center justify-center", children: logo ? /* @__PURE__ */ jsx("img", { src: logo, alt: datasource.dialect, className: "h-7 w-7" }) : /* @__PURE__ */ jsx(ServerStackIcon, { className: "h-6 w-6 text-gray-400" }) }),
|
|
5046
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
5047
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-xs font-semibold text-gray-900 dark:text-white", children: datasource.name }),
|
|
5048
|
+
/* @__PURE__ */ jsx("p", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: datasource.dialect })
|
|
5049
|
+
] }),
|
|
5050
|
+
isSelected && /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4 shrink-0 text-cyan-500 dark:text-cyan-400" })
|
|
5051
|
+
]
|
|
5052
|
+
},
|
|
5053
|
+
datasource.id
|
|
5054
|
+
);
|
|
5055
|
+
}) })
|
|
5031
5056
|
] }),
|
|
5032
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
5033
|
-
/* @__PURE__ */ jsx(
|
|
5034
|
-
/* @__PURE__ */
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5057
|
+
selectedDatasourceId && /* @__PURE__ */ jsxs("div", { children: [
|
|
5058
|
+
/* @__PURE__ */ jsx(SectionHeader, { icon: TableCellsIcon, title: t("tableLabel"), badge: availableTables.length || void 0 }),
|
|
5059
|
+
/* @__PURE__ */ jsxs("div", { className: "liquid-surface rounded-xl border border-white/30 dark:border-white/10", children: [
|
|
5060
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-b border-gray-200/50 px-3 py-2 dark:border-white/5", children: [
|
|
5061
|
+
/* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "h-3.5 w-3.5 text-gray-400" }),
|
|
5062
|
+
/* @__PURE__ */ jsx(
|
|
5063
|
+
"input",
|
|
5064
|
+
{
|
|
5065
|
+
type: "text",
|
|
5066
|
+
value: tableSearch,
|
|
5067
|
+
onChange: (event) => setTableSearch(event.target.value),
|
|
5068
|
+
placeholder: t("selectTable"),
|
|
5069
|
+
className: "flex-1 bg-transparent text-xs text-gray-900 outline-none placeholder:text-gray-400 dark:text-white dark:placeholder:text-gray-500"
|
|
5070
|
+
}
|
|
5071
|
+
)
|
|
5072
|
+
] }),
|
|
5073
|
+
/* @__PURE__ */ jsxs("div", { className: "max-h-36 overflow-y-auto p-1", children: [
|
|
5074
|
+
filteredTables.length === 0 && /* @__PURE__ */ jsx("p", { className: "px-3 py-3 text-center text-[10px] text-gray-400", children: availableTables.length === 0 ? t("noColumnsAvailable") : "No matches" }),
|
|
5075
|
+
filteredTables.map((table) => {
|
|
5076
|
+
const isSelected = table === selectedTable;
|
|
5077
|
+
return /* @__PURE__ */ jsxs(
|
|
5078
|
+
"button",
|
|
5079
|
+
{
|
|
5080
|
+
type: "button",
|
|
5081
|
+
onClick: () => handleTableChange(table),
|
|
5082
|
+
className: `flex w-full items-center gap-2 rounded-lg px-3 py-1.5 text-left text-xs transition-colors ${isSelected ? "bg-cyan-500/10 font-semibold text-cyan-700 dark:text-cyan-300" : "text-gray-700 hover:bg-gray-100/60 dark:text-gray-300 dark:hover:bg-white/5"}`,
|
|
5083
|
+
children: [
|
|
5084
|
+
/* @__PURE__ */ jsx(TableCellsIcon, { className: "h-3 w-3 shrink-0 text-gray-400" }),
|
|
5085
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: table }),
|
|
5086
|
+
isSelected && /* @__PURE__ */ jsx(CheckIcon, { className: "ml-auto h-3 w-3 shrink-0 text-cyan-500" })
|
|
5087
|
+
]
|
|
5088
|
+
},
|
|
5089
|
+
table
|
|
5090
|
+
);
|
|
5091
|
+
})
|
|
5092
|
+
] })
|
|
5093
|
+
] })
|
|
5045
5094
|
] }),
|
|
5046
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
5047
|
-
/* @__PURE__ */
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5095
|
+
selectedTable && /* @__PURE__ */ jsxs("div", { className: "flex items-end gap-3", children: [
|
|
5096
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
5097
|
+
/* @__PURE__ */ jsx("label", { className: "mb-1 block text-[10px] font-medium text-gray-500 dark:text-gray-400", children: t("outputVariableLabel") }),
|
|
5098
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]", children: [
|
|
5099
|
+
/* @__PURE__ */ jsx(VariableIcon, { className: "h-3.5 w-3.5 text-gray-400" }),
|
|
5100
|
+
/* @__PURE__ */ jsx(
|
|
5101
|
+
"input",
|
|
5102
|
+
{
|
|
5103
|
+
type: "text",
|
|
5104
|
+
value: outputVariable,
|
|
5105
|
+
onChange: (event) => setOutputVariable(event.target.value),
|
|
5106
|
+
placeholder: "datasourceResult",
|
|
5107
|
+
className: "flex-1 bg-transparent text-xs text-gray-900 outline-none placeholder:text-gray-400 dark:text-white dark:placeholder:text-gray-500"
|
|
5108
|
+
}
|
|
5109
|
+
)
|
|
5110
|
+
] })
|
|
5111
|
+
] }),
|
|
5112
|
+
/* @__PURE__ */ jsxs("div", { className: "w-24", children: [
|
|
5113
|
+
/* @__PURE__ */ jsx("label", { className: "mb-1 block text-[10px] font-medium text-gray-500 dark:text-gray-400", children: t("limitLabel") }),
|
|
5114
|
+
/* @__PURE__ */ jsx(
|
|
5115
|
+
"input",
|
|
5116
|
+
{
|
|
5117
|
+
type: "number",
|
|
5118
|
+
value: limit,
|
|
5119
|
+
onChange: (event) => setLimit(Math.max(1, Number.parseInt(event.target.value, 10) || 1)),
|
|
5120
|
+
min: 1,
|
|
5121
|
+
max: 1e4,
|
|
5122
|
+
className: "w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs text-gray-900 outline-none focus:border-cyan-400 dark:border-white/10 dark:bg-white/[0.03] dark:text-white"
|
|
5123
|
+
}
|
|
5124
|
+
)
|
|
5125
|
+
] })
|
|
5060
5126
|
] }),
|
|
5061
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
5062
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
5063
|
-
/* @__PURE__ */ jsx(
|
|
5127
|
+
selectedTable && /* @__PURE__ */ jsxs("div", { children: [
|
|
5128
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
5129
|
+
/* @__PURE__ */ jsx(
|
|
5130
|
+
SectionHeader,
|
|
5131
|
+
{
|
|
5132
|
+
icon: TableCellsIcon,
|
|
5133
|
+
title: t("columnsLabel"),
|
|
5134
|
+
badge: `${selectedColumns.length}/${availableColumns.length}`
|
|
5135
|
+
}
|
|
5136
|
+
),
|
|
5064
5137
|
/* @__PURE__ */ jsx(
|
|
5065
5138
|
"button",
|
|
5066
5139
|
{
|
|
5067
5140
|
type: "button",
|
|
5068
5141
|
onClick: handleToggleSelectAll,
|
|
5069
5142
|
disabled: availableColumns.length === 0,
|
|
5070
|
-
className: "text-
|
|
5143
|
+
className: "text-[10px] font-semibold text-cyan-600 hover:text-cyan-700 disabled:opacity-40 dark:text-cyan-400 dark:hover:text-cyan-300",
|
|
5071
5144
|
children: allSelected ? t("deselectAll") : t("selectAll")
|
|
5072
5145
|
}
|
|
5073
5146
|
)
|
|
5074
5147
|
] }),
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
const typeBadgeColor = COLUMN_TYPE_BADGE_COLORS[column.type.toLowerCase()] ?? COLUMN_TYPE_BADGE_COLORS.string;
|
|
5081
|
-
return /* @__PURE__ */ jsxs(
|
|
5082
|
-
"label",
|
|
5148
|
+
/* @__PURE__ */ jsxs("div", { className: "liquid-surface rounded-xl border border-white/30 dark:border-white/10", children: [
|
|
5149
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-b border-gray-200/50 px-3 py-2 dark:border-white/5", children: [
|
|
5150
|
+
/* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "h-3.5 w-3.5 text-gray-400" }),
|
|
5151
|
+
/* @__PURE__ */ jsx(
|
|
5152
|
+
"input",
|
|
5083
5153
|
{
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5154
|
+
type: "text",
|
|
5155
|
+
value: columnSearch,
|
|
5156
|
+
onChange: (event) => setColumnSearch(event.target.value),
|
|
5157
|
+
placeholder: "Search columns...",
|
|
5158
|
+
className: "flex-1 bg-transparent text-xs text-gray-900 outline-none placeholder:text-gray-400 dark:text-white dark:placeholder:text-gray-500"
|
|
5159
|
+
}
|
|
5160
|
+
)
|
|
5161
|
+
] }),
|
|
5162
|
+
/* @__PURE__ */ jsxs("div", { className: "max-h-52 overflow-y-auto p-1", children: [
|
|
5163
|
+
filteredColumns.length === 0 && /* @__PURE__ */ jsx("p", { className: "px-3 py-3 text-center text-[10px] text-gray-400", children: t("noColumnsAvailable") }),
|
|
5164
|
+
filteredColumns.map((column) => {
|
|
5165
|
+
const isSelected = selectedColumns.includes(column.name);
|
|
5166
|
+
const typeColor = TYPE_COLORS[column.type.toLowerCase()] ?? TYPE_COLORS.string;
|
|
5167
|
+
return /* @__PURE__ */ jsxs(
|
|
5168
|
+
"button",
|
|
5169
|
+
{
|
|
5170
|
+
type: "button",
|
|
5171
|
+
onClick: () => handleToggleColumn(column.name),
|
|
5172
|
+
className: `flex w-full items-center gap-2 rounded-lg px-3 py-1.5 text-left transition-colors ${isSelected ? "bg-cyan-500/8 dark:bg-cyan-400/5" : "hover:bg-gray-100/60 dark:hover:bg-white/5"}`,
|
|
5173
|
+
children: [
|
|
5174
|
+
/* @__PURE__ */ jsx("div", { className: `flex h-4 w-4 shrink-0 items-center justify-center rounded border transition-colors ${isSelected ? "border-cyan-500 bg-cyan-500 dark:border-cyan-400 dark:bg-cyan-400" : "border-gray-300 dark:border-gray-600"}`, children: isSelected && /* @__PURE__ */ jsx(CheckIcon, { className: "h-2.5 w-2.5 text-white" }) }),
|
|
5175
|
+
/* @__PURE__ */ jsxs("span", { className: "flex-1 truncate text-xs text-gray-900 dark:text-white", children: [
|
|
5176
|
+
column.name,
|
|
5177
|
+
column.nullable && /* @__PURE__ */ jsx("span", { className: "ml-1 text-[9px] text-gray-400", children: "?" })
|
|
5178
|
+
] }),
|
|
5179
|
+
/* @__PURE__ */ jsx("span", { className: `shrink-0 rounded-full px-1.5 py-0.5 text-[9px] font-medium ${typeColor}`, children: column.type })
|
|
5180
|
+
]
|
|
5181
|
+
},
|
|
5182
|
+
column.name
|
|
5183
|
+
);
|
|
5184
|
+
})
|
|
5185
|
+
] })
|
|
5105
5186
|
] })
|
|
5106
5187
|
] }),
|
|
5107
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
5108
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
5109
|
-
/* @__PURE__ */ jsx(
|
|
5188
|
+
selectedTable && /* @__PURE__ */ jsxs("div", { children: [
|
|
5189
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
5190
|
+
/* @__PURE__ */ jsx(SectionHeader, { icon: FunnelIcon, title: t("filtersLabel"), badge: filterEntries.length || void 0 }),
|
|
5110
5191
|
/* @__PURE__ */ jsxs(
|
|
5111
5192
|
"button",
|
|
5112
5193
|
{
|
|
5113
5194
|
type: "button",
|
|
5114
5195
|
onClick: handleAddFilter,
|
|
5115
|
-
className: "flex items-center gap-1 text-
|
|
5196
|
+
className: "flex items-center gap-1 text-[10px] font-semibold text-cyan-600 hover:text-cyan-700 dark:text-cyan-400 dark:hover:text-cyan-300",
|
|
5116
5197
|
children: [
|
|
5117
5198
|
/* @__PURE__ */ jsx(PlusIcon$1, { className: "h-3 w-3" }),
|
|
5118
5199
|
t("addFilter")
|
|
@@ -5120,21 +5201,20 @@ function DatasourceNodeConfigForm({
|
|
|
5120
5201
|
}
|
|
5121
5202
|
)
|
|
5122
5203
|
] }),
|
|
5123
|
-
/* @__PURE__ */ jsx("
|
|
5124
|
-
filterEntries.length > 0 && /* @__PURE__ */ jsx("div", { className: "space-y-2", children: filterEntries.map(([variableName, columnName], index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5204
|
+
filterEntries.length > 0 && /* @__PURE__ */ jsx("div", { className: "space-y-2", children: filterEntries.map(([variableName, columnName], index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]", children: [
|
|
5125
5205
|
/* @__PURE__ */ jsxs(
|
|
5126
5206
|
"select",
|
|
5127
5207
|
{
|
|
5128
5208
|
value: columnName,
|
|
5129
5209
|
onChange: (event) => handleUpdateFilterField(variableName, event.target.value),
|
|
5130
|
-
className: "flex-1 rounded
|
|
5210
|
+
className: "flex-1 rounded bg-transparent text-xs text-gray-900 outline-none dark:text-white",
|
|
5131
5211
|
children: [
|
|
5132
5212
|
/* @__PURE__ */ jsx("option", { value: "", children: t("columnName") }),
|
|
5133
5213
|
availableColumns.map((column) => /* @__PURE__ */ jsx("option", { value: column.name, children: column.name }, column.name))
|
|
5134
5214
|
]
|
|
5135
5215
|
}
|
|
5136
5216
|
),
|
|
5137
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
5217
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium text-gray-400", children: "=" }),
|
|
5138
5218
|
/* @__PURE__ */ jsx(
|
|
5139
5219
|
"input",
|
|
5140
5220
|
{
|
|
@@ -5142,7 +5222,7 @@ function DatasourceNodeConfigForm({
|
|
|
5142
5222
|
value: variableName,
|
|
5143
5223
|
onChange: (event) => handleUpdateFilterVariable(variableName, event.target.value),
|
|
5144
5224
|
placeholder: t("variableReference"),
|
|
5145
|
-
className: "flex-1
|
|
5225
|
+
className: "flex-1 bg-transparent text-xs text-gray-900 outline-none placeholder:text-gray-400 dark:text-white dark:placeholder:text-gray-500"
|
|
5146
5226
|
}
|
|
5147
5227
|
),
|
|
5148
5228
|
/* @__PURE__ */ jsx(
|
|
@@ -5150,29 +5230,20 @@ function DatasourceNodeConfigForm({
|
|
|
5150
5230
|
{
|
|
5151
5231
|
type: "button",
|
|
5152
5232
|
onClick: () => handleRemoveFilter(variableName),
|
|
5153
|
-
className: "rounded-md p-1 text-
|
|
5154
|
-
children: /* @__PURE__ */ jsx(XMarkIcon$1, { className: "h-3
|
|
5233
|
+
className: "shrink-0 rounded-md p-1 text-gray-400 transition-colors hover:bg-red-50 hover:text-red-500 dark:hover:bg-red-900/20",
|
|
5234
|
+
children: /* @__PURE__ */ jsx(XMarkIcon$1, { className: "h-3 w-3" })
|
|
5155
5235
|
}
|
|
5156
5236
|
)
|
|
5157
5237
|
] }, index)) })
|
|
5158
5238
|
] }),
|
|
5159
|
-
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2 border-t border-gray-200 pt-4 dark:border-
|
|
5239
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2 border-t border-gray-200/50 pt-4 dark:border-white/5", children: [
|
|
5240
|
+
/* @__PURE__ */ jsx(Button, { outline: true, onClick: onCancel, children: t("cancel") }),
|
|
5160
5241
|
/* @__PURE__ */ jsx(
|
|
5161
|
-
|
|
5242
|
+
Button,
|
|
5162
5243
|
{
|
|
5163
|
-
|
|
5164
|
-
onClick: onCancel,
|
|
5165
|
-
className: "rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-800",
|
|
5166
|
-
children: t("cancel")
|
|
5167
|
-
}
|
|
5168
|
-
),
|
|
5169
|
-
/* @__PURE__ */ jsx(
|
|
5170
|
-
"button",
|
|
5171
|
-
{
|
|
5172
|
-
type: "button",
|
|
5244
|
+
color: "cyan",
|
|
5173
5245
|
onClick: handleSave,
|
|
5174
5246
|
disabled: !selectedDatasourceId || !selectedTable || selectedColumns.length === 0,
|
|
5175
|
-
className: "rounded-lg bg-indigo-600 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-indigo-500 dark:hover:bg-indigo-600",
|
|
5176
5247
|
children: t("save")
|
|
5177
5248
|
}
|
|
5178
5249
|
)
|
|
@@ -7653,5 +7724,5 @@ function Workspace({
|
|
|
7653
7724
|
}
|
|
7654
7725
|
|
|
7655
7726
|
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 };
|
|
7656
|
-
//# sourceMappingURL=chunk-
|
|
7657
|
-
//# sourceMappingURL=chunk-
|
|
7727
|
+
//# sourceMappingURL=chunk-RCOGWCF2.mjs.map
|
|
7728
|
+
//# sourceMappingURL=chunk-RCOGWCF2.mjs.map
|