@datatechsolutions/ui 2.11.44 → 2.11.46
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-36EAW7JS.js → chunk-3B5V4VUC.js} +28 -15
- package/dist/chunk-3B5V4VUC.js.map +1 -0
- package/dist/{chunk-IWATRHQP.mjs → chunk-MAGSMQG7.mjs} +28 -15
- package/dist/chunk-MAGSMQG7.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-36EAW7JS.js.map +0 -1
- package/dist/chunk-IWATRHQP.mjs.map +0 -1
|
@@ -1216,7 +1216,8 @@ function DatasourceNodeConfigForm({
|
|
|
1216
1216
|
onCancel,
|
|
1217
1217
|
datasources,
|
|
1218
1218
|
onLoadTables,
|
|
1219
|
-
onLoadSchema
|
|
1219
|
+
onLoadSchema,
|
|
1220
|
+
readOnly = false
|
|
1220
1221
|
}) {
|
|
1221
1222
|
const t = useTranslations("agents.workflow.datasourceNodeConfig");
|
|
1222
1223
|
const [activeSectionId, setActiveSectionId] = useState("connection");
|
|
@@ -1338,9 +1339,12 @@ function DatasourceNodeConfigForm({
|
|
|
1338
1339
|
{
|
|
1339
1340
|
type: "button",
|
|
1340
1341
|
onClick: () => {
|
|
1341
|
-
|
|
1342
|
-
|
|
1342
|
+
if (!readOnly) {
|
|
1343
|
+
handleDatasourceChange(datasource.id);
|
|
1344
|
+
setActiveSectionId("table");
|
|
1345
|
+
}
|
|
1343
1346
|
},
|
|
1347
|
+
disabled: readOnly && datasource.id !== selectedDatasourceId,
|
|
1344
1348
|
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"}`,
|
|
1345
1349
|
children: [
|
|
1346
1350
|
/* @__PURE__ */ jsx("div", { className: "flex h-9 w-9 shrink-0 items-center justify-center", children: logo2 ? /* @__PURE__ */ jsx("img", { src: logo2, alt: datasource.dialect, className: "h-7 w-7" }) : /* @__PURE__ */ jsx(ServerStackIcon, { className: "h-6 w-6 text-gray-400" }) }),
|
|
@@ -1382,8 +1386,10 @@ function DatasourceNodeConfigForm({
|
|
|
1382
1386
|
{
|
|
1383
1387
|
type: "button",
|
|
1384
1388
|
onClick: () => {
|
|
1385
|
-
|
|
1386
|
-
|
|
1389
|
+
if (!readOnly) {
|
|
1390
|
+
handleTableChange(table);
|
|
1391
|
+
setActiveSectionId("columns");
|
|
1392
|
+
}
|
|
1387
1393
|
},
|
|
1388
1394
|
className: `flex w-full items-center gap-2 rounded-lg px-3 py-2 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"}`,
|
|
1389
1395
|
children: [
|
|
@@ -1407,7 +1413,7 @@ function DatasourceNodeConfigForm({
|
|
|
1407
1413
|
availableColumns.length,
|
|
1408
1414
|
" selected"
|
|
1409
1415
|
] }),
|
|
1410
|
-
/* @__PURE__ */ jsx(
|
|
1416
|
+
!readOnly && /* @__PURE__ */ jsx(
|
|
1411
1417
|
"button",
|
|
1412
1418
|
{
|
|
1413
1419
|
type: "button",
|
|
@@ -1441,7 +1447,9 @@ function DatasourceNodeConfigForm({
|
|
|
1441
1447
|
"button",
|
|
1442
1448
|
{
|
|
1443
1449
|
type: "button",
|
|
1444
|
-
onClick: () =>
|
|
1450
|
+
onClick: () => {
|
|
1451
|
+
if (!readOnly) handleToggleColumn(column.name);
|
|
1452
|
+
},
|
|
1445
1453
|
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"}`,
|
|
1446
1454
|
children: [
|
|
1447
1455
|
/* @__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" }) }),
|
|
@@ -1462,7 +1470,7 @@ function DatasourceNodeConfigForm({
|
|
|
1462
1470
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
1463
1471
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1464
1472
|
/* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: t("filtersHelp") }),
|
|
1465
|
-
/* @__PURE__ */ jsxs(
|
|
1473
|
+
!readOnly && /* @__PURE__ */ jsxs(
|
|
1466
1474
|
"button",
|
|
1467
1475
|
{
|
|
1468
1476
|
type: "button",
|
|
@@ -1496,7 +1504,8 @@ function DatasourceNodeConfigForm({
|
|
|
1496
1504
|
{
|
|
1497
1505
|
value: columnName,
|
|
1498
1506
|
onChange: (event) => handleUpdateFilterField(variableName, event.target.value),
|
|
1499
|
-
|
|
1507
|
+
disabled: readOnly,
|
|
1508
|
+
className: "flex-1 rounded bg-transparent text-xs text-gray-900 outline-none disabled:opacity-60 dark:text-white",
|
|
1500
1509
|
children: [
|
|
1501
1510
|
/* @__PURE__ */ jsx("option", { value: "", children: t("columnName") }),
|
|
1502
1511
|
availableColumns.map((column) => /* @__PURE__ */ jsx("option", { value: column.name, children: column.name }, column.name))
|
|
@@ -1511,10 +1520,11 @@ function DatasourceNodeConfigForm({
|
|
|
1511
1520
|
value: variableName,
|
|
1512
1521
|
onChange: (event) => handleUpdateFilterVariable(variableName, event.target.value),
|
|
1513
1522
|
placeholder: t("variableReference"),
|
|
1523
|
+
readOnly,
|
|
1514
1524
|
className: "flex-1 bg-transparent text-xs text-gray-900 outline-none placeholder:text-gray-400 dark:text-white dark:placeholder:text-gray-500"
|
|
1515
1525
|
}
|
|
1516
1526
|
),
|
|
1517
|
-
/* @__PURE__ */ jsx(
|
|
1527
|
+
!readOnly && /* @__PURE__ */ jsx(
|
|
1518
1528
|
"button",
|
|
1519
1529
|
{
|
|
1520
1530
|
type: "button",
|
|
@@ -1539,6 +1549,7 @@ function DatasourceNodeConfigForm({
|
|
|
1539
1549
|
value: outputVariable,
|
|
1540
1550
|
onChange: (event) => setOutputVariable(event.target.value),
|
|
1541
1551
|
placeholder: "datasourceResult",
|
|
1552
|
+
readOnly,
|
|
1542
1553
|
className: "flex-1 bg-transparent text-sm text-gray-900 outline-none placeholder:text-gray-400 dark:text-white dark:placeholder:text-gray-500"
|
|
1543
1554
|
}
|
|
1544
1555
|
)
|
|
@@ -1555,6 +1566,7 @@ function DatasourceNodeConfigForm({
|
|
|
1555
1566
|
onChange: (event) => setLimit(Math.max(1, Number.parseInt(event.target.value, 10) || 1)),
|
|
1556
1567
|
min: 1,
|
|
1557
1568
|
max: 1e4,
|
|
1569
|
+
readOnly,
|
|
1558
1570
|
className: "w-32 rounded-xl border border-gray-200 bg-white px-3 py-2.5 text-sm text-gray-900 outline-none focus:border-cyan-400 dark:border-white/10 dark:bg-white/[0.03] dark:text-white"
|
|
1559
1571
|
}
|
|
1560
1572
|
)
|
|
@@ -1620,10 +1632,10 @@ function DatasourceNodeConfigForm({
|
|
|
1620
1632
|
activeSectionId,
|
|
1621
1633
|
onSectionChange: setActiveSectionId
|
|
1622
1634
|
},
|
|
1623
|
-
footer: /* @__PURE__ */
|
|
1635
|
+
footer: /* @__PURE__ */ jsx("div", { className: "flex justify-end gap-2 px-6 py-3", children: readOnly ? /* @__PURE__ */ jsx(Button, { outline: true, onClick: onCancel, children: "Close" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1624
1636
|
/* @__PURE__ */ jsx(Button, { outline: true, onClick: onCancel, children: t("cancel") }),
|
|
1625
1637
|
/* @__PURE__ */ jsx(Button, { color: "cyan", onClick: handleSave, disabled: !canSave, children: t("save") })
|
|
1626
|
-
] }),
|
|
1638
|
+
] }) }),
|
|
1627
1639
|
children: renderSection()
|
|
1628
1640
|
}
|
|
1629
1641
|
);
|
|
@@ -3431,7 +3443,7 @@ var DatasourceFlowNode = memo(function DatasourceFlowNode2({ id, data, selected
|
|
|
3431
3443
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3432
3444
|
/* @__PURE__ */ jsx(NodeRunningIndicator, { nodeId: id }),
|
|
3433
3445
|
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Left, id: "left-in", colorClass: "!bg-cyan-400" }),
|
|
3434
|
-
|
|
3446
|
+
!onEdit ? /* @__PURE__ */ jsx("div", { className: "w-full", children: content }) : /* @__PURE__ */ jsx(
|
|
3435
3447
|
"button",
|
|
3436
3448
|
{
|
|
3437
3449
|
type: "button",
|
|
@@ -7668,6 +7680,7 @@ function WorkflowCanvasInner({
|
|
|
7668
7680
|
open: true,
|
|
7669
7681
|
nodeId: editingLogicNode.nodeId,
|
|
7670
7682
|
config: editingLogicNode.config,
|
|
7683
|
+
readOnly: Boolean(nodes.find((n) => n.id === editingLogicNode.nodeId)?.data?.readOnly),
|
|
7671
7684
|
onSave: (updatedConfig) => {
|
|
7672
7685
|
handleSaveLogicNodeConfig(editingLogicNode.nodeId, updatedConfig);
|
|
7673
7686
|
setEditingLogicNodeId(null);
|
|
@@ -7815,5 +7828,5 @@ function Workspace({
|
|
|
7815
7828
|
}
|
|
7816
7829
|
|
|
7817
7830
|
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 };
|
|
7818
|
-
//# sourceMappingURL=chunk-
|
|
7819
|
-
//# sourceMappingURL=chunk-
|
|
7831
|
+
//# sourceMappingURL=chunk-MAGSMQG7.mjs.map
|
|
7832
|
+
//# sourceMappingURL=chunk-MAGSMQG7.mjs.map
|