@datatechsolutions/ui 2.11.41 → 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 +145 -134
- package/dist/astrlabe/index.js.map +1 -1
- package/dist/astrlabe/index.mjs +16 -5
- package/dist/astrlabe/index.mjs.map +1 -1
- package/dist/astrlabe/workflow-canvas.js +4 -4
- package/dist/astrlabe/workflow-canvas.mjs +3 -3
- package/dist/{chunk-XFYGRDN3.js → chunk-7XITJWOE.js} +287 -205
- package/dist/chunk-7XITJWOE.js.map +1 -0
- package/dist/{chunk-MDD6H63O.mjs → chunk-DNGI4ASL.mjs} +3 -3
- package/dist/{chunk-MDD6H63O.mjs.map → chunk-DNGI4ASL.mjs.map} +1 -1
- package/dist/{chunk-2IOPJ5BM.js → chunk-KEUOCEOO.js} +3 -3
- package/dist/{chunk-2IOPJ5BM.js.map → chunk-KEUOCEOO.js.map} +1 -1
- package/dist/{chunk-W7SNLP5J.mjs → chunk-RCOGWCF2.mjs} +242 -160
- package/dist/chunk-RCOGWCF2.mjs.map +1 -0
- package/dist/index.js +718 -718
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-W7SNLP5J.mjs.map +0 -1
- package/dist/chunk-XFYGRDN3.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkKEUOCEOO_js = require('./chunk-KEUOCEOO.js');
|
|
5
5
|
var chunkYXN2K77G_js = require('./chunk-YXN2K77G.js');
|
|
6
6
|
var chunkP4YYEM4B_js = require('./chunk-P4YYEM4B.js');
|
|
7
7
|
var chunkPWBWP5FJ_js = require('./chunk-PWBWP5FJ.js');
|
|
@@ -1656,7 +1656,7 @@ var AgentToolFlowNode = react.memo(function AgentToolFlowNode2({ id, data, selec
|
|
|
1656
1656
|
event.stopPropagation();
|
|
1657
1657
|
},
|
|
1658
1658
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1659
|
-
|
|
1659
|
+
chunkKEUOCEOO_js.ToggleSwitch,
|
|
1660
1660
|
{
|
|
1661
1661
|
checked: Boolean(agentTool.enabled),
|
|
1662
1662
|
onChange: () => data.onToggle?.(agentTool),
|
|
@@ -1764,7 +1764,7 @@ var ToolFlowNode = react.memo(function ToolFlowNode2({ id, data, selected }) {
|
|
|
1764
1764
|
event.preventDefault();
|
|
1765
1765
|
},
|
|
1766
1766
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1767
|
-
|
|
1767
|
+
chunkKEUOCEOO_js.ToggleSwitch,
|
|
1768
1768
|
{
|
|
1769
1769
|
checked: Boolean(tool.enabled),
|
|
1770
1770
|
onChange: () => onToggle(tool),
|
|
@@ -1916,7 +1916,7 @@ var RuleFlowNode = react.memo(function RuleFlowNode2({ id, data, selected }) {
|
|
|
1916
1916
|
event.preventDefault();
|
|
1917
1917
|
},
|
|
1918
1918
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1919
|
-
|
|
1919
|
+
chunkKEUOCEOO_js.ToggleSwitch,
|
|
1920
1920
|
{
|
|
1921
1921
|
checked: Boolean(rule.enabled),
|
|
1922
1922
|
onChange: () => onToggle(rule),
|
|
@@ -2849,7 +2849,18 @@ var DATASOURCE_LOGOS = {
|
|
|
2849
2849
|
mysql: "/logos/datasources/mysql.svg",
|
|
2850
2850
|
clickhouse: "/logos/datasources/clickhouse.svg",
|
|
2851
2851
|
elasticsearch: "/logos/datasources/elasticsearch.svg",
|
|
2852
|
-
duckdb: "/logos/datasources/duckdb.svg"
|
|
2852
|
+
duckdb: "/logos/datasources/duckdb.svg",
|
|
2853
|
+
sqlite: "/logos/datasources/sqlite.svg",
|
|
2854
|
+
mariadb: "/logos/datasources/mariadb.svg",
|
|
2855
|
+
oracle: "/logos/datasources/oracle.svg",
|
|
2856
|
+
mssql: "/logos/datasources/mssql.svg",
|
|
2857
|
+
sqlserver: "/logos/datasources/mssql.svg",
|
|
2858
|
+
cassandra: "/logos/datasources/cassandra.svg",
|
|
2859
|
+
dynamodb: "/logos/datasources/dynamodb.svg",
|
|
2860
|
+
cockroach: "/logos/datasources/cockroachdb.svg",
|
|
2861
|
+
supabase: "/logos/datasources/supabase.svg",
|
|
2862
|
+
firebase: "/logos/datasources/firebase.svg",
|
|
2863
|
+
neo4j: "/logos/datasources/neo4j.svg"
|
|
2853
2864
|
};
|
|
2854
2865
|
function getDatasourceLogo(datasourceId, dialect) {
|
|
2855
2866
|
const search = (dialect ?? datasourceId).toLowerCase();
|
|
@@ -2884,7 +2895,7 @@ var DatasourceFlowNode = react.memo(function DatasourceFlowNode2({ id, data, sel
|
|
|
2884
2895
|
const content = /* @__PURE__ */ jsxRuntime.jsxs(NodeCard, { compact: isCompact, selected, nodeType: "datasource", children: [
|
|
2885
2896
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between", children: [
|
|
2886
2897
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
2887
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-xl
|
|
2898
|
+
logo ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-xl", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: config.dialect ?? "", className: "h-8 w-8" }) }) : /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(outline.ServerStackIcon, { className: "h-5 w-5 text-white" }) }),
|
|
2888
2899
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2889
2900
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: label }),
|
|
2890
2901
|
!isCompact && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-0.5 line-clamp-1 text-xs text-gray-500 dark:text-gray-400", children: [
|
|
@@ -2903,7 +2914,7 @@ var DatasourceFlowNode = react.memo(function DatasourceFlowNode2({ id, data, sel
|
|
|
2903
2914
|
event.preventDefault();
|
|
2904
2915
|
},
|
|
2905
2916
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2906
|
-
|
|
2917
|
+
chunkKEUOCEOO_js.ToggleSwitch,
|
|
2907
2918
|
{
|
|
2908
2919
|
checked: true,
|
|
2909
2920
|
onChange: () => {
|
|
@@ -3231,8 +3242,8 @@ function ConfigFormActions({
|
|
|
3231
3242
|
saveDisabled = false
|
|
3232
3243
|
}) {
|
|
3233
3244
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2 border-t border-gray-200 pt-4 dark:border-gray-700", children: [
|
|
3234
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3235
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3245
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKEUOCEOO_js.Button, { type: "button", outline: true, onClick: onCancel, children: cancelLabel }),
|
|
3246
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKEUOCEOO_js.Button, { type: "button", onClick: onSave, disabled: saveDisabled, children: saveLabel })
|
|
3236
3247
|
] });
|
|
3237
3248
|
}
|
|
3238
3249
|
var COLOR_CLASSES = {
|
|
@@ -3479,7 +3490,7 @@ function IfElseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3479
3490
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3 flex items-center justify-between", children: [
|
|
3480
3491
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: t("conditionsLabel") }),
|
|
3481
3492
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3482
|
-
|
|
3493
|
+
chunkKEUOCEOO_js.Button,
|
|
3483
3494
|
{
|
|
3484
3495
|
type: "button",
|
|
3485
3496
|
onClick: handleAddCondition,
|
|
@@ -3490,7 +3501,7 @@ function IfElseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3490
3501
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: conditions.map((condition, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 rounded-lg border border-gray-200 bg-gray-50 p-3 dark:border-gray-700 dark:bg-gray-800/50", children: [
|
|
3491
3502
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid flex-1 grid-cols-3 gap-2", children: [
|
|
3492
3503
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3493
|
-
|
|
3504
|
+
chunkKEUOCEOO_js.FormInput,
|
|
3494
3505
|
{
|
|
3495
3506
|
type: "text",
|
|
3496
3507
|
label: t("variableLabel"),
|
|
@@ -3501,7 +3512,7 @@ function IfElseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3501
3512
|
}
|
|
3502
3513
|
) }),
|
|
3503
3514
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3504
|
-
|
|
3515
|
+
chunkKEUOCEOO_js.FormSelect,
|
|
3505
3516
|
{
|
|
3506
3517
|
label: t("operatorLabel"),
|
|
3507
3518
|
value: condition.operator,
|
|
@@ -3511,7 +3522,7 @@ function IfElseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3511
3522
|
}
|
|
3512
3523
|
) }),
|
|
3513
3524
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3514
|
-
|
|
3525
|
+
chunkKEUOCEOO_js.FormInput,
|
|
3515
3526
|
{
|
|
3516
3527
|
type: "text",
|
|
3517
3528
|
label: t("valueLabel"),
|
|
@@ -3523,7 +3534,7 @@ function IfElseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3523
3534
|
) })
|
|
3524
3535
|
] }),
|
|
3525
3536
|
conditions.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3526
|
-
|
|
3537
|
+
chunkKEUOCEOO_js.IconButton,
|
|
3527
3538
|
{
|
|
3528
3539
|
onClick: () => handleRemoveCondition(index),
|
|
3529
3540
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.TrashIcon, { className: "h-4 w-4" }),
|
|
@@ -3678,7 +3689,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3678
3689
|
};
|
|
3679
3690
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3680
3691
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3681
|
-
|
|
3692
|
+
chunkKEUOCEOO_js.FormSelect,
|
|
3682
3693
|
{
|
|
3683
3694
|
label: t("methodLabel"),
|
|
3684
3695
|
value: method,
|
|
@@ -3687,7 +3698,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3687
3698
|
}
|
|
3688
3699
|
),
|
|
3689
3700
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3690
|
-
|
|
3701
|
+
chunkKEUOCEOO_js.FormInput,
|
|
3691
3702
|
{
|
|
3692
3703
|
type: "text",
|
|
3693
3704
|
label: t("urlLabel"),
|
|
@@ -3700,7 +3711,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3700
3711
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
3701
3712
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: t("headersLabel") }),
|
|
3702
3713
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3703
|
-
|
|
3714
|
+
chunkKEUOCEOO_js.Button,
|
|
3704
3715
|
{
|
|
3705
3716
|
type: "button",
|
|
3706
3717
|
onClick: handleAddHeader,
|
|
@@ -3710,7 +3721,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3710
3721
|
] }),
|
|
3711
3722
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: headerEntries.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3712
3723
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3713
|
-
|
|
3724
|
+
chunkKEUOCEOO_js.FormInput,
|
|
3714
3725
|
{
|
|
3715
3726
|
type: "text",
|
|
3716
3727
|
value: entry.key,
|
|
@@ -3720,7 +3731,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3720
3731
|
}
|
|
3721
3732
|
),
|
|
3722
3733
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3723
|
-
|
|
3734
|
+
chunkKEUOCEOO_js.FormInput,
|
|
3724
3735
|
{
|
|
3725
3736
|
type: "text",
|
|
3726
3737
|
value: entry.value,
|
|
@@ -3730,7 +3741,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3730
3741
|
}
|
|
3731
3742
|
),
|
|
3732
3743
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3733
|
-
|
|
3744
|
+
chunkKEUOCEOO_js.IconButton,
|
|
3734
3745
|
{
|
|
3735
3746
|
onClick: () => handleRemoveHeader(index),
|
|
3736
3747
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.TrashIcon, { className: "h-4 w-4" }),
|
|
@@ -3742,7 +3753,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3742
3753
|
] }, index)) })
|
|
3743
3754
|
] }),
|
|
3744
3755
|
method !== "GET" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3745
|
-
|
|
3756
|
+
chunkKEUOCEOO_js.FormTextarea,
|
|
3746
3757
|
{
|
|
3747
3758
|
label: t("bodyLabel"),
|
|
3748
3759
|
value: body,
|
|
@@ -3753,7 +3764,7 @@ function HttpRequestNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3753
3764
|
}
|
|
3754
3765
|
),
|
|
3755
3766
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3756
|
-
|
|
3767
|
+
chunkKEUOCEOO_js.FormInput,
|
|
3757
3768
|
{
|
|
3758
3769
|
type: "number",
|
|
3759
3770
|
label: t("timeoutLabel"),
|
|
@@ -3784,7 +3795,7 @@ function TemplateTransformNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3784
3795
|
};
|
|
3785
3796
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3786
3797
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3787
|
-
|
|
3798
|
+
chunkKEUOCEOO_js.FormTextarea,
|
|
3788
3799
|
{
|
|
3789
3800
|
label: t("templateLabel"),
|
|
3790
3801
|
value: template,
|
|
@@ -3795,7 +3806,7 @@ function TemplateTransformNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3795
3806
|
}
|
|
3796
3807
|
),
|
|
3797
3808
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3798
|
-
|
|
3809
|
+
chunkKEUOCEOO_js.FormInput,
|
|
3799
3810
|
{
|
|
3800
3811
|
type: "text",
|
|
3801
3812
|
label: t("outputVariableLabel"),
|
|
@@ -3824,7 +3835,7 @@ function IterationNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3824
3835
|
};
|
|
3825
3836
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3826
3837
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3827
|
-
|
|
3838
|
+
chunkKEUOCEOO_js.FormInput,
|
|
3828
3839
|
{
|
|
3829
3840
|
type: "text",
|
|
3830
3841
|
label: t("iteratorVariableLabel"),
|
|
@@ -3834,7 +3845,7 @@ function IterationNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3834
3845
|
}
|
|
3835
3846
|
),
|
|
3836
3847
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3837
|
-
|
|
3848
|
+
chunkKEUOCEOO_js.FormInput,
|
|
3838
3849
|
{
|
|
3839
3850
|
type: "number",
|
|
3840
3851
|
label: t("maxIterationsLabel"),
|
|
@@ -3865,7 +3876,7 @@ function KnowledgeBaseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3865
3876
|
};
|
|
3866
3877
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3867
3878
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3868
|
-
|
|
3879
|
+
chunkKEUOCEOO_js.FormInput,
|
|
3869
3880
|
{
|
|
3870
3881
|
type: "text",
|
|
3871
3882
|
label: t("sourceIdLabel"),
|
|
@@ -3875,7 +3886,7 @@ function KnowledgeBaseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3875
3886
|
}
|
|
3876
3887
|
),
|
|
3877
3888
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3878
|
-
|
|
3889
|
+
chunkKEUOCEOO_js.FormInput,
|
|
3879
3890
|
{
|
|
3880
3891
|
type: "number",
|
|
3881
3892
|
label: t("topKLabel"),
|
|
@@ -3886,7 +3897,7 @@ function KnowledgeBaseNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3886
3897
|
}
|
|
3887
3898
|
),
|
|
3888
3899
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3889
|
-
|
|
3900
|
+
chunkKEUOCEOO_js.FormInput,
|
|
3890
3901
|
{
|
|
3891
3902
|
type: "number",
|
|
3892
3903
|
label: t("similarityThresholdLabel"),
|
|
@@ -3917,7 +3928,7 @@ function AnswerNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
3917
3928
|
};
|
|
3918
3929
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3919
3930
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3920
|
-
|
|
3931
|
+
chunkKEUOCEOO_js.FormTextarea,
|
|
3921
3932
|
{
|
|
3922
3933
|
label: t("outputTemplateLabel"),
|
|
3923
3934
|
hint: t("outputTemplateHelp"),
|
|
@@ -4351,7 +4362,7 @@ function VariableAggregatorNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4351
4362
|
}
|
|
4352
4363
|
),
|
|
4353
4364
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4354
|
-
|
|
4365
|
+
chunkKEUOCEOO_js.FormInput,
|
|
4355
4366
|
{
|
|
4356
4367
|
type: "text",
|
|
4357
4368
|
label: t("outputVariableLabel"),
|
|
@@ -4361,7 +4372,7 @@ function VariableAggregatorNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4361
4372
|
}
|
|
4362
4373
|
),
|
|
4363
4374
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4364
|
-
|
|
4375
|
+
chunkKEUOCEOO_js.FormSelect,
|
|
4365
4376
|
{
|
|
4366
4377
|
label: t("aggregationModeLabel"),
|
|
4367
4378
|
value: aggregationMode,
|
|
@@ -4394,7 +4405,7 @@ function DocumentExtractorNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4394
4405
|
};
|
|
4395
4406
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
4396
4407
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4397
|
-
|
|
4408
|
+
chunkKEUOCEOO_js.FormSelect,
|
|
4398
4409
|
{
|
|
4399
4410
|
label: t("extractionModeLabel"),
|
|
4400
4411
|
value: extractionMode,
|
|
@@ -4403,7 +4414,7 @@ function DocumentExtractorNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4403
4414
|
}
|
|
4404
4415
|
),
|
|
4405
4416
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4406
|
-
|
|
4417
|
+
chunkKEUOCEOO_js.FormInput,
|
|
4407
4418
|
{
|
|
4408
4419
|
type: "text",
|
|
4409
4420
|
label: t("outputVariableLabel"),
|
|
@@ -4580,7 +4591,7 @@ function IterationStartNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4580
4591
|
};
|
|
4581
4592
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
4582
4593
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4583
|
-
|
|
4594
|
+
chunkKEUOCEOO_js.FormInput,
|
|
4584
4595
|
{
|
|
4585
4596
|
type: "text",
|
|
4586
4597
|
label: t("iteratorVariableLabel"),
|
|
@@ -4590,7 +4601,7 @@ function IterationStartNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4590
4601
|
}
|
|
4591
4602
|
),
|
|
4592
4603
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4593
|
-
|
|
4604
|
+
chunkKEUOCEOO_js.FormInput,
|
|
4594
4605
|
{
|
|
4595
4606
|
type: "text",
|
|
4596
4607
|
label: t("itemVariableLabel"),
|
|
@@ -4600,7 +4611,7 @@ function IterationStartNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
4600
4611
|
}
|
|
4601
4612
|
),
|
|
4602
4613
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4603
|
-
|
|
4614
|
+
chunkKEUOCEOO_js.FormInput,
|
|
4604
4615
|
{
|
|
4605
4616
|
type: "text",
|
|
4606
4617
|
label: t("indexVariableLabel"),
|
|
@@ -4848,24 +4859,61 @@ function EntityNodeConfigForm({ config, entities = [], onSave, onCancel }) {
|
|
|
4848
4859
|
] })
|
|
4849
4860
|
] });
|
|
4850
4861
|
}
|
|
4851
|
-
var
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
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"
|
|
4868
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
|
+
}
|
|
4869
4917
|
function DatasourceNodeConfigForm({
|
|
4870
4918
|
nodeId,
|
|
4871
4919
|
config,
|
|
@@ -4884,9 +4932,19 @@ function DatasourceNodeConfigForm({
|
|
|
4884
4932
|
const [outputVariable, setOutputVariable] = react.useState(config.outputVariable);
|
|
4885
4933
|
const [limit, setLimit] = react.useState(config.limit);
|
|
4886
4934
|
const [filterVariables, setFilterVariables] = react.useState({ ...config.filterVariables });
|
|
4935
|
+
const [tableSearch, setTableSearch] = react.useState("");
|
|
4936
|
+
const [columnSearch, setColumnSearch] = react.useState("");
|
|
4887
4937
|
const allColumnNames = availableColumns.map((column) => column.name);
|
|
4888
4938
|
const allSelected = selectedColumns.length > 0 && selectedColumns.length === allColumnNames.length;
|
|
4889
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
|
+
);
|
|
4890
4948
|
const loadTables = react.useCallback(async (datasourceId) => {
|
|
4891
4949
|
if (!datasourceId) {
|
|
4892
4950
|
setAvailableTables([]);
|
|
@@ -4904,14 +4962,10 @@ function DatasourceNodeConfigForm({
|
|
|
4904
4962
|
setAvailableColumns(columns);
|
|
4905
4963
|
}, [onLoadSchema]);
|
|
4906
4964
|
react.useEffect(() => {
|
|
4907
|
-
if (selectedDatasourceId)
|
|
4908
|
-
loadTables(selectedDatasourceId);
|
|
4909
|
-
}
|
|
4965
|
+
if (selectedDatasourceId) loadTables(selectedDatasourceId);
|
|
4910
4966
|
}, [selectedDatasourceId, loadTables]);
|
|
4911
4967
|
react.useEffect(() => {
|
|
4912
|
-
if (selectedDatasourceId && selectedTable)
|
|
4913
|
-
loadSchema(selectedDatasourceId, selectedTable);
|
|
4914
|
-
}
|
|
4968
|
+
if (selectedDatasourceId && selectedTable) loadSchema(selectedDatasourceId, selectedTable);
|
|
4915
4969
|
}, [selectedDatasourceId, selectedTable, loadSchema]);
|
|
4916
4970
|
const handleDatasourceChange = (datasourceId) => {
|
|
4917
4971
|
setSelectedDatasourceId(datasourceId);
|
|
@@ -4920,19 +4974,18 @@ function DatasourceNodeConfigForm({
|
|
|
4920
4974
|
setAvailableColumns([]);
|
|
4921
4975
|
setSelectedColumns([]);
|
|
4922
4976
|
setFilterVariables({});
|
|
4977
|
+
setTableSearch("");
|
|
4978
|
+
setColumnSearch("");
|
|
4923
4979
|
};
|
|
4924
4980
|
const handleTableChange = (table) => {
|
|
4925
4981
|
setSelectedTable(table);
|
|
4926
4982
|
setAvailableColumns([]);
|
|
4927
4983
|
setSelectedColumns([]);
|
|
4928
4984
|
setFilterVariables({});
|
|
4985
|
+
setColumnSearch("");
|
|
4929
4986
|
};
|
|
4930
4987
|
const handleToggleSelectAll = () => {
|
|
4931
|
-
|
|
4932
|
-
setSelectedColumns([]);
|
|
4933
|
-
} else {
|
|
4934
|
-
setSelectedColumns([...allColumnNames]);
|
|
4935
|
-
}
|
|
4988
|
+
setSelectedColumns(allSelected ? [] : [...allColumnNames]);
|
|
4936
4989
|
};
|
|
4937
4990
|
const handleToggleColumn = (columnName) => {
|
|
4938
4991
|
setSelectedColumns(
|
|
@@ -4940,7 +4993,7 @@ function DatasourceNodeConfigForm({
|
|
|
4940
4993
|
);
|
|
4941
4994
|
};
|
|
4942
4995
|
const handleAddFilter = () => {
|
|
4943
|
-
setFilterVariables((previous) => ({ ...previous,
|
|
4996
|
+
setFilterVariables((previous) => ({ ...previous, [`field_${Object.keys(previous).length}`]: "" }));
|
|
4944
4997
|
};
|
|
4945
4998
|
const handleUpdateFilterVariable = (oldKey, newKey) => {
|
|
4946
4999
|
setFilterVariables((previous) => {
|
|
@@ -4964,9 +5017,7 @@ function DatasourceNodeConfigForm({
|
|
|
4964
5017
|
const handleSave = () => {
|
|
4965
5018
|
const cleanedFilters = {};
|
|
4966
5019
|
for (const [key, value] of Object.entries(filterVariables)) {
|
|
4967
|
-
if (key.trim() && value.trim())
|
|
4968
|
-
cleanedFilters[key.trim()] = value.trim();
|
|
4969
|
-
}
|
|
5020
|
+
if (key.trim() && value.trim()) cleanedFilters[key.trim()] = value.trim();
|
|
4970
5021
|
}
|
|
4971
5022
|
onSave({
|
|
4972
5023
|
...config,
|
|
@@ -4980,130 +5031,171 @@ function DatasourceNodeConfigForm({
|
|
|
4980
5031
|
});
|
|
4981
5032
|
};
|
|
4982
5033
|
const filterEntries = Object.entries(filterVariables);
|
|
4983
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-
|
|
4984
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4985
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300", children: t("datasourceLabel") }),
|
|
4986
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-xs text-gray-500 dark:text-gray-400", children: t("datasourceHelp") }),
|
|
4987
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4988
|
-
"select",
|
|
4989
|
-
{
|
|
4990
|
-
value: selectedDatasourceId,
|
|
4991
|
-
onChange: (event) => handleDatasourceChange(event.target.value),
|
|
4992
|
-
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 dark:border-gray-600 dark:bg-gray-800 dark:text-white",
|
|
4993
|
-
children: [
|
|
4994
|
-
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: t("selectDatasource") }),
|
|
4995
|
-
datasources.map((datasource) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: datasource.id, children: [
|
|
4996
|
-
datasource.name,
|
|
4997
|
-
" (",
|
|
4998
|
-
datasource.dialect,
|
|
4999
|
-
")"
|
|
5000
|
-
] }, datasource.id))
|
|
5001
|
-
]
|
|
5002
|
-
}
|
|
5003
|
-
),
|
|
5004
|
-
selectedDatasource && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-300", children: selectedDatasource.dialect }) })
|
|
5005
|
-
] }),
|
|
5034
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
5006
5035
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5007
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5008
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
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
|
+
}) })
|
|
5022
5058
|
] }),
|
|
5023
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5024
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5025
|
-
/* @__PURE__ */ jsxRuntime.
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
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
|
+
] })
|
|
5036
5096
|
] }),
|
|
5037
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5038
|
-
/* @__PURE__ */ jsxRuntime.
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
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
|
+
] })
|
|
5051
5128
|
] }),
|
|
5052
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5053
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
5054
|
-
/* @__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
|
+
),
|
|
5055
5139
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5056
5140
|
"button",
|
|
5057
5141
|
{
|
|
5058
5142
|
type: "button",
|
|
5059
5143
|
onClick: handleToggleSelectAll,
|
|
5060
5144
|
disabled: availableColumns.length === 0,
|
|
5061
|
-
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",
|
|
5062
5146
|
children: allSelected ? t("deselectAll") : t("selectAll")
|
|
5063
5147
|
}
|
|
5064
5148
|
)
|
|
5065
5149
|
] }),
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
const typeBadgeColor = COLUMN_TYPE_BADGE_COLORS[column.type.toLowerCase()] ?? COLUMN_TYPE_BADGE_COLORS.string;
|
|
5072
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5073
|
-
"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",
|
|
5074
5155
|
{
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
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
|
+
] })
|
|
5096
5188
|
] })
|
|
5097
5189
|
] }),
|
|
5098
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5099
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
5100
|
-
/* @__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 }),
|
|
5101
5193
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5102
5194
|
"button",
|
|
5103
5195
|
{
|
|
5104
5196
|
type: "button",
|
|
5105
5197
|
onClick: handleAddFilter,
|
|
5106
|
-
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",
|
|
5107
5199
|
children: [
|
|
5108
5200
|
/* @__PURE__ */ jsxRuntime.jsx(outline.PlusIcon, { className: "h-3 w-3" }),
|
|
5109
5201
|
t("addFilter")
|
|
@@ -5111,21 +5203,20 @@ function DatasourceNodeConfigForm({
|
|
|
5111
5203
|
}
|
|
5112
5204
|
)
|
|
5113
5205
|
] }),
|
|
5114
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
5115
|
-
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: [
|
|
5116
5207
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5117
5208
|
"select",
|
|
5118
5209
|
{
|
|
5119
5210
|
value: columnName,
|
|
5120
5211
|
onChange: (event) => handleUpdateFilterField(variableName, event.target.value),
|
|
5121
|
-
className: "flex-1 rounded
|
|
5212
|
+
className: "flex-1 rounded bg-transparent text-xs text-gray-900 outline-none dark:text-white",
|
|
5122
5213
|
children: [
|
|
5123
5214
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: t("columnName") }),
|
|
5124
5215
|
availableColumns.map((column) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: column.name, children: column.name }, column.name))
|
|
5125
5216
|
]
|
|
5126
5217
|
}
|
|
5127
5218
|
),
|
|
5128
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
5219
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium text-gray-400", children: "=" }),
|
|
5129
5220
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5130
5221
|
"input",
|
|
5131
5222
|
{
|
|
@@ -5133,7 +5224,7 @@ function DatasourceNodeConfigForm({
|
|
|
5133
5224
|
value: variableName,
|
|
5134
5225
|
onChange: (event) => handleUpdateFilterVariable(variableName, event.target.value),
|
|
5135
5226
|
placeholder: t("variableReference"),
|
|
5136
|
-
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"
|
|
5137
5228
|
}
|
|
5138
5229
|
),
|
|
5139
5230
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5141,29 +5232,20 @@ function DatasourceNodeConfigForm({
|
|
|
5141
5232
|
{
|
|
5142
5233
|
type: "button",
|
|
5143
5234
|
onClick: () => handleRemoveFilter(variableName),
|
|
5144
|
-
className: "rounded-md p-1 text-
|
|
5145
|
-
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" })
|
|
5146
5237
|
}
|
|
5147
5238
|
)
|
|
5148
5239
|
] }, index)) })
|
|
5149
5240
|
] }),
|
|
5150
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2 border-t border-gray-200 pt-4 dark:border-
|
|
5151
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5152
|
-
"button",
|
|
5153
|
-
{
|
|
5154
|
-
type: "button",
|
|
5155
|
-
onClick: onCancel,
|
|
5156
|
-
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",
|
|
5157
|
-
children: t("cancel")
|
|
5158
|
-
}
|
|
5159
|
-
),
|
|
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") }),
|
|
5160
5243
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5161
|
-
|
|
5244
|
+
chunkKEUOCEOO_js.Button,
|
|
5162
5245
|
{
|
|
5163
|
-
|
|
5246
|
+
color: "cyan",
|
|
5164
5247
|
onClick: handleSave,
|
|
5165
5248
|
disabled: !selectedDatasourceId || !selectedTable || selectedColumns.length === 0,
|
|
5166
|
-
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",
|
|
5167
5249
|
children: t("save")
|
|
5168
5250
|
}
|
|
5169
5251
|
)
|
|
@@ -5194,7 +5276,7 @@ function GroupNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
5194
5276
|
};
|
|
5195
5277
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
5196
5278
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5197
|
-
|
|
5279
|
+
chunkKEUOCEOO_js.FormInput,
|
|
5198
5280
|
{
|
|
5199
5281
|
type: "text",
|
|
5200
5282
|
label: translations("labelField"),
|
|
@@ -5204,7 +5286,7 @@ function GroupNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
5204
5286
|
}
|
|
5205
5287
|
),
|
|
5206
5288
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5207
|
-
|
|
5289
|
+
chunkKEUOCEOO_js.FormTextarea,
|
|
5208
5290
|
{
|
|
5209
5291
|
label: translations("descriptionField"),
|
|
5210
5292
|
value: description,
|
|
@@ -5362,7 +5444,7 @@ function ModelProviderNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
5362
5444
|
};
|
|
5363
5445
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
5364
5446
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5365
|
-
|
|
5447
|
+
chunkKEUOCEOO_js.FormInput,
|
|
5366
5448
|
{
|
|
5367
5449
|
type: "text",
|
|
5368
5450
|
label: t("nameLabel"),
|
|
@@ -5372,7 +5454,7 @@ function ModelProviderNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
5372
5454
|
}
|
|
5373
5455
|
),
|
|
5374
5456
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5375
|
-
|
|
5457
|
+
chunkKEUOCEOO_js.FormSelect,
|
|
5376
5458
|
{
|
|
5377
5459
|
label: t("providerTypeLabel"),
|
|
5378
5460
|
value: providerType,
|
|
@@ -5381,7 +5463,7 @@ function ModelProviderNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
5381
5463
|
}
|
|
5382
5464
|
),
|
|
5383
5465
|
showRegion && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5384
|
-
|
|
5466
|
+
chunkKEUOCEOO_js.FormSelect,
|
|
5385
5467
|
{
|
|
5386
5468
|
label: t("regionLabel"),
|
|
5387
5469
|
value: region,
|
|
@@ -5390,7 +5472,7 @@ function ModelProviderNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
5390
5472
|
}
|
|
5391
5473
|
),
|
|
5392
5474
|
showEndpoint && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5393
|
-
|
|
5475
|
+
chunkKEUOCEOO_js.FormInput,
|
|
5394
5476
|
{
|
|
5395
5477
|
type: "text",
|
|
5396
5478
|
label: t("endpointLabel"),
|
|
@@ -5400,7 +5482,7 @@ function ModelProviderNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
5400
5482
|
}
|
|
5401
5483
|
),
|
|
5402
5484
|
showApiKey && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5403
|
-
|
|
5485
|
+
chunkKEUOCEOO_js.FormInput,
|
|
5404
5486
|
{
|
|
5405
5487
|
type: "password",
|
|
5406
5488
|
label: t("apiKeyLabel"),
|
|
@@ -5410,7 +5492,7 @@ function ModelProviderNodeConfigForm({ config, onSave, onCancel }) {
|
|
|
5410
5492
|
}
|
|
5411
5493
|
),
|
|
5412
5494
|
showCredentialRef && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5413
|
-
|
|
5495
|
+
chunkKEUOCEOO_js.FormInput,
|
|
5414
5496
|
{
|
|
5415
5497
|
type: "text",
|
|
5416
5498
|
label: t("credentialRefLabel"),
|
|
@@ -5554,7 +5636,7 @@ function LogicNodeModal({ onSave, entities = [], datasources = [], onLoadTables,
|
|
|
5554
5636
|
}
|
|
5555
5637
|
};
|
|
5556
5638
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5557
|
-
|
|
5639
|
+
chunkKEUOCEOO_js.GlassModal,
|
|
5558
5640
|
{
|
|
5559
5641
|
open,
|
|
5560
5642
|
onClose: closeModal,
|
|
@@ -5614,7 +5696,7 @@ function NodeContextMenu({ position, targetId, onClose, onEdit, onDuplicate, onC
|
|
|
5614
5696
|
}
|
|
5615
5697
|
];
|
|
5616
5698
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5617
|
-
|
|
5699
|
+
chunkKEUOCEOO_js.ContextMenu,
|
|
5618
5700
|
{
|
|
5619
5701
|
position,
|
|
5620
5702
|
onClose,
|
|
@@ -5671,7 +5753,7 @@ function PanelContextMenu({ position, onClose, onPaste, onSelectAll, onFitView,
|
|
|
5671
5753
|
}
|
|
5672
5754
|
];
|
|
5673
5755
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5674
|
-
|
|
5756
|
+
chunkKEUOCEOO_js.ContextMenu,
|
|
5675
5757
|
{
|
|
5676
5758
|
position,
|
|
5677
5759
|
onClose,
|
|
@@ -5818,7 +5900,7 @@ function SelectionContextMenu({
|
|
|
5818
5900
|
}
|
|
5819
5901
|
];
|
|
5820
5902
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5821
|
-
|
|
5903
|
+
chunkKEUOCEOO_js.ContextMenu,
|
|
5822
5904
|
{
|
|
5823
5905
|
position,
|
|
5824
5906
|
onClose,
|
|
@@ -7707,5 +7789,5 @@ exports.useModalStore = useModalStore;
|
|
|
7707
7789
|
exports.useWorkflowBuilderClient = useWorkflowBuilderClient;
|
|
7708
7790
|
exports.useWorkflowBuilderClientOptional = useWorkflowBuilderClientOptional;
|
|
7709
7791
|
exports.useWorkflowStore = useWorkflowStore;
|
|
7710
|
-
//# sourceMappingURL=chunk-
|
|
7711
|
-
//# sourceMappingURL=chunk-
|
|
7792
|
+
//# sourceMappingURL=chunk-7XITJWOE.js.map
|
|
7793
|
+
//# sourceMappingURL=chunk-7XITJWOE.js.map
|