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