@datatechsolutions/ui 3.10.0 → 3.11.1
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/contracts.d.mts +18 -2
- package/dist/astrlabe/contracts.d.ts +18 -2
- package/dist/astrlabe/index.d.mts +2 -2
- package/dist/astrlabe/index.d.ts +2 -2
- package/dist/astrlabe/index.js +108 -108
- package/dist/astrlabe/index.mjs +4 -4
- package/dist/astrlabe/workflow-canvas.js +4 -4
- package/dist/astrlabe/workflow-canvas.mjs +3 -3
- package/dist/{chunk-JB3U6ORY.mjs → chunk-3U3CIARA.mjs} +3 -3
- package/dist/{chunk-JB3U6ORY.mjs.map → chunk-3U3CIARA.mjs.map} +1 -1
- package/dist/{chunk-5U43K6G3.mjs → chunk-7DZ2C5IN.mjs} +24 -22
- package/dist/chunk-7DZ2C5IN.mjs.map +1 -0
- package/dist/{chunk-EC34PGUO.js → chunk-APONR6ZM.js} +136 -136
- package/dist/chunk-APONR6ZM.js.map +1 -0
- package/dist/{chunk-AMESLEIO.js → chunk-BTMHQCDB.js} +63 -63
- package/dist/{chunk-AMESLEIO.js.map → chunk-BTMHQCDB.js.map} +1 -1
- package/dist/{chunk-L3R425GB.js → chunk-CLXEVSGB.js} +13 -13
- package/dist/{chunk-L3R425GB.js.map → chunk-CLXEVSGB.js.map} +1 -1
- package/dist/{chunk-TSNKICPP.js → chunk-CVCMJJ56.js} +10 -10
- package/dist/{chunk-TSNKICPP.js.map → chunk-CVCMJJ56.js.map} +1 -1
- package/dist/{chunk-MSMEECO6.js → chunk-DPXCJVJT.js} +9 -9
- package/dist/{chunk-MSMEECO6.js.map → chunk-DPXCJVJT.js.map} +1 -1
- package/dist/{chunk-A256OE5E.mjs → chunk-E3NMVWRL.mjs} +5 -5
- package/dist/chunk-E3NMVWRL.mjs.map +1 -0
- package/dist/{chunk-HEXTU6W3.mjs → chunk-I77TTBYO.mjs} +6 -6
- package/dist/{chunk-HEXTU6W3.mjs.map → chunk-I77TTBYO.mjs.map} +1 -1
- package/dist/{chunk-RHRJXK5R.mjs → chunk-IGOMJHC6.mjs} +11 -3
- package/dist/chunk-IGOMJHC6.mjs.map +1 -0
- package/dist/{chunk-DA3H7ERQ.mjs → chunk-IHOCYBHM.mjs} +3 -3
- package/dist/{chunk-DA3H7ERQ.mjs.map → chunk-IHOCYBHM.mjs.map} +1 -1
- package/dist/{chunk-C4D3EI5L.mjs → chunk-K3LIDGMA.mjs} +3 -3
- package/dist/{chunk-C4D3EI5L.mjs.map → chunk-K3LIDGMA.mjs.map} +1 -1
- package/dist/{chunk-YSYEV2Z6.js → chunk-KDVZIDVF.js} +46 -44
- package/dist/chunk-KDVZIDVF.js.map +1 -0
- package/dist/{chunk-NM37GLCL.mjs → chunk-LHAOIPYP.mjs} +3 -3
- package/dist/{chunk-NM37GLCL.mjs.map → chunk-LHAOIPYP.mjs.map} +1 -1
- package/dist/{chunk-MAOZWOA6.js → chunk-LM6BJOKX.js} +55 -55
- package/dist/{chunk-MAOZWOA6.js.map → chunk-LM6BJOKX.js.map} +1 -1
- package/dist/{chunk-2A45ZEK4.js → chunk-MN777KLN.js} +45 -45
- package/dist/{chunk-2A45ZEK4.js.map → chunk-MN777KLN.js.map} +1 -1
- package/dist/{chunk-FIJMOTP4.js → chunk-NW32BM3F.js} +34 -34
- package/dist/{chunk-FIJMOTP4.js.map → chunk-NW32BM3F.js.map} +1 -1
- package/dist/{chunk-W6MBDTKF.mjs → chunk-O4DIKNNH.mjs} +3 -3
- package/dist/{chunk-W6MBDTKF.mjs.map → chunk-O4DIKNNH.mjs.map} +1 -1
- package/dist/{chunk-5AKTDJFR.js → chunk-OD2AZBEX.js} +25 -25
- package/dist/{chunk-5AKTDJFR.js.map → chunk-OD2AZBEX.js.map} +1 -1
- package/dist/{chunk-5KI7FB3E.mjs → chunk-OKCEK7GH.mjs} +225 -234
- package/dist/chunk-OKCEK7GH.mjs.map +1 -0
- package/dist/{chunk-KHUWFL6W.js → chunk-OO4YMN4P.js} +4 -4
- package/dist/{chunk-KHUWFL6W.js.map → chunk-OO4YMN4P.js.map} +1 -1
- package/dist/{chunk-O4HH77A4.js → chunk-OSXBMLZP.js} +68 -68
- package/dist/{chunk-O4HH77A4.js.map → chunk-OSXBMLZP.js.map} +1 -1
- package/dist/{chunk-6ZYATZS3.mjs → chunk-Q6MMJYEG.mjs} +3 -3
- package/dist/{chunk-6ZYATZS3.mjs.map → chunk-Q6MMJYEG.mjs.map} +1 -1
- package/dist/{chunk-NSZN54HW.js → chunk-QASAHGLE.js} +4 -4
- package/dist/{chunk-NSZN54HW.js.map → chunk-QASAHGLE.js.map} +1 -1
- package/dist/{chunk-BU4WMSK3.mjs → chunk-QDW3IJIL.mjs} +3 -3
- package/dist/{chunk-BU4WMSK3.mjs.map → chunk-QDW3IJIL.mjs.map} +1 -1
- package/dist/{chunk-FENA4YGN.mjs → chunk-QKWNQOJB.mjs} +3 -3
- package/dist/{chunk-FENA4YGN.mjs.map → chunk-QKWNQOJB.mjs.map} +1 -1
- package/dist/{chunk-H7X3SXMB.mjs → chunk-S46LUR7O.mjs} +7 -7
- package/dist/{chunk-H7X3SXMB.mjs.map → chunk-S46LUR7O.mjs.map} +1 -1
- package/dist/{chunk-FD376DZ6.mjs → chunk-S4LHC5SF.mjs} +3 -3
- package/dist/{chunk-FD376DZ6.mjs.map → chunk-S4LHC5SF.mjs.map} +1 -1
- package/dist/{chunk-B76RTA7D.js → chunk-SSKKTSMA.js} +35 -35
- package/dist/{chunk-B76RTA7D.js.map → chunk-SSKKTSMA.js.map} +1 -1
- package/dist/{chunk-LVR4SR65.js → chunk-TIJXCRM4.js} +223 -234
- package/dist/chunk-TIJXCRM4.js.map +1 -0
- package/dist/{chunk-6UX2SRA2.mjs → chunk-VHU5FWFB.mjs} +3 -3
- package/dist/{chunk-6UX2SRA2.mjs.map → chunk-VHU5FWFB.mjs.map} +1 -1
- package/dist/{chunk-SY4MUT5V.js → chunk-ZUU7G3PC.js} +11 -2
- package/dist/chunk-ZUU7G3PC.js.map +1 -0
- package/dist/index.d.mts +26 -40
- package/dist/index.d.ts +26 -40
- package/dist/index.js +663 -671
- package/dist/index.mjs +2 -2
- package/dist/platform/admin/index.js +10 -10
- package/dist/platform/admin/index.mjs +4 -4
- package/dist/platform/agents-workspace.js +7 -7
- package/dist/platform/agents-workspace.mjs +6 -6
- package/dist/platform/app-shell.js +4 -4
- package/dist/platform/app-shell.mjs +3 -3
- package/dist/platform/auth/index.js +22 -22
- package/dist/platform/auth/index.mjs +4 -4
- package/dist/platform/billing/index.js +4 -4
- package/dist/platform/billing/index.mjs +3 -3
- package/dist/platform/impersonation/index.js +4 -4
- package/dist/platform/impersonation/index.mjs +3 -3
- package/dist/platform/index.js +82 -82
- package/dist/platform/index.mjs +18 -18
- package/dist/platform/pages/index.d.mts +3 -3
- package/dist/platform/pages/index.d.ts +3 -3
- package/dist/platform/pages/index.js +734 -701
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +452 -419
- package/dist/platform/pages/index.mjs.map +1 -1
- package/dist/platform/settings/index.js +7 -7
- package/dist/platform/settings/index.mjs +6 -6
- package/dist/platform/workflow-api-client.d.mts +1 -1
- package/dist/platform/workflow-api-client.d.ts +1 -1
- package/dist/platform/workflow-api-client.js +65 -61
- package/dist/platform/workflow-api-client.mjs +1 -1
- package/dist/platform/workflow-canvas-shell.js +5 -5
- package/dist/platform/workflow-canvas-shell.mjs +4 -4
- package/dist/{rule-form-BYJzyork.d.mts → rule-form-BkKCY8Tc.d.mts} +8 -2
- package/dist/{rule-form-BYJzyork.d.ts → rule-form-CBD8wlrw.d.ts} +8 -2
- package/dist/{workflow-api-client-CpFl3WcG.d.mts → workflow-api-client-D9_0Spdz.d.mts} +16 -1
- package/dist/{workflow-api-client-uLICOanv.d.ts → workflow-api-client-E1QFRgeP.d.ts} +16 -1
- package/package.json +1 -1
- package/dist/chunk-5KI7FB3E.mjs.map +0 -1
- package/dist/chunk-5U43K6G3.mjs.map +0 -1
- package/dist/chunk-A256OE5E.mjs.map +0 -1
- package/dist/chunk-EC34PGUO.js.map +0 -1
- package/dist/chunk-LVR4SR65.js.map +0 -1
- package/dist/chunk-RHRJXK5R.mjs.map +0 -1
- package/dist/chunk-SY4MUT5V.js.map +0 -1
- package/dist/chunk-YSYEV2Z6.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { adaptWorkflowGraphToUi, formatDurationMs } from '../../chunk-UQXVCVAN.mjs';
|
|
3
|
-
import { WorkflowWorkspace } from '../../chunk-
|
|
4
|
-
export { RolesPageView, UsersPageView } from '../../chunk-
|
|
5
|
-
import { DatasourceModal, findDialect, findCategory, DIALECT_CATEGORIES } from '../../chunk-
|
|
6
|
-
export { DIALECT_CATEGORIES, DatasourceFormModal, DatasourceModal, findCategory, findDialect } from '../../chunk-
|
|
7
|
-
import { defaultRuleForm, RuleForm, ExecutionTimelinePanel, defaultRuleCondition, defaultRuleAction, RuleConditionBuilder, RuleActionBuilder } from '../../chunk-
|
|
3
|
+
import { WorkflowWorkspace } from '../../chunk-7DZ2C5IN.mjs';
|
|
4
|
+
export { RolesPageView, UsersPageView } from '../../chunk-7DZ2C5IN.mjs';
|
|
5
|
+
import { DatasourceModal, findDialect, findCategory, DIALECT_CATEGORIES } from '../../chunk-S4LHC5SF.mjs';
|
|
6
|
+
export { DIALECT_CATEGORIES, DatasourceFormModal, DatasourceModal, findCategory, findDialect } from '../../chunk-S4LHC5SF.mjs';
|
|
7
|
+
import { defaultRuleForm, RuleForm, ExecutionTimelinePanel, defaultRuleCondition, defaultRuleAction, RuleConditionBuilder, RuleActionBuilder } from '../../chunk-E3NMVWRL.mjs';
|
|
8
8
|
import '../../chunk-JB6RNAD2.mjs';
|
|
9
9
|
import '../../chunk-LEXBTVGM.mjs';
|
|
10
|
-
import '../../chunk-
|
|
11
|
-
import { HeroSection, PageLoadingState, PageEmptyState,
|
|
10
|
+
import '../../chunk-IHOCYBHM.mjs';
|
|
11
|
+
import { HeroSection, SearchBar, PageLoadingState, PageEmptyState, EntityCard, CreateActionButton, GlassModal, FormGrid, FormSelect, FormInput, FormTextarea, SectionHeader, Text, Form, FormActionsRow, Table, TableHead, TableRow, TableHeader, TableBody, TableCell, InlineForm, CopyableId, ListCard, ListCardItem, Avatar, SectionCard, Tabs, TabsList, TabsTrigger, TabsContent, StepIndicator, FilterTileButton, FormToggle, Spinner, StatusBadge, ChipPicker, FormCheckbox, SegmentedControl, DatePicker, TimePicker } from '../../chunk-OKCEK7GH.mjs';
|
|
12
12
|
import '../../chunk-7VJ7CMMT.mjs';
|
|
13
|
-
import '../../chunk-
|
|
13
|
+
import '../../chunk-IGOMJHC6.mjs';
|
|
14
14
|
import '../../chunk-3AY5HIQ6.mjs';
|
|
15
15
|
import '../../chunk-PLTLRL2V.mjs';
|
|
16
16
|
import { Badge, Button } from '../../chunk-WR55H7DH.mjs';
|
|
@@ -33,30 +33,29 @@ function AgentsModelsPageView({ labels, models, loading }) {
|
|
|
33
33
|
label: labels.title,
|
|
34
34
|
title: labels.title,
|
|
35
35
|
subtitle: labels.subtitle,
|
|
36
|
-
gradient: "from-emerald-500 to-teal-700"
|
|
36
|
+
gradient: "from-emerald-500 to-teal-700",
|
|
37
|
+
toolbar: !isEmpty ? /* @__PURE__ */ jsx(
|
|
38
|
+
SearchBar,
|
|
39
|
+
{
|
|
40
|
+
searchTerm,
|
|
41
|
+
onSearchChange: setSearchTerm,
|
|
42
|
+
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
43
|
+
noBorder: true
|
|
44
|
+
}
|
|
45
|
+
) : void 0
|
|
37
46
|
}
|
|
38
47
|
);
|
|
39
|
-
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
accentGradient: "from-emerald-500 to-teal-700",
|
|
52
|
-
icon: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-emerald-500/10 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-400", children: /* @__PURE__ */ jsx(CubeTransparentIcon, { className: "h-6 w-6" }) }),
|
|
53
|
-
title: model.name,
|
|
54
|
-
subtitle: `${labels.provider}: ${model.provider}`,
|
|
55
|
-
status: /* @__PURE__ */ jsx(Badge, { color: model.enabled ? "emerald" : "zinc", children: model.enabled ? labels.enabled : labels.disabled })
|
|
56
|
-
},
|
|
57
|
-
model.id
|
|
58
|
-
)) })
|
|
59
|
-
] });
|
|
48
|
+
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredModels.map((model) => /* @__PURE__ */ jsx(
|
|
49
|
+
EntityCard,
|
|
50
|
+
{
|
|
51
|
+
accentGradient: "from-emerald-500 to-teal-700",
|
|
52
|
+
icon: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-emerald-500/10 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-400", children: /* @__PURE__ */ jsx(CubeTransparentIcon, { className: "h-6 w-6" }) }),
|
|
53
|
+
title: model.name,
|
|
54
|
+
subtitle: `${labels.provider}: ${model.provider}`,
|
|
55
|
+
status: /* @__PURE__ */ jsx(Badge, { color: model.enabled ? "emerald" : "zinc", children: model.enabled ? labels.enabled : labels.disabled })
|
|
56
|
+
},
|
|
57
|
+
model.id
|
|
58
|
+
)) });
|
|
60
59
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
61
60
|
hero,
|
|
62
61
|
content
|
|
@@ -963,7 +962,16 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete, o
|
|
|
963
962
|
title: labels.title,
|
|
964
963
|
subtitle: labels.subtitle,
|
|
965
964
|
gradient: "from-fuchsia-500 to-purple-700",
|
|
966
|
-
toolbar: /* @__PURE__ */ jsx(
|
|
965
|
+
toolbar: !isEmpty ? /* @__PURE__ */ jsx(
|
|
966
|
+
SearchBar,
|
|
967
|
+
{
|
|
968
|
+
searchTerm,
|
|
969
|
+
onSearchChange: setSearchTerm,
|
|
970
|
+
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
971
|
+
noBorder: true
|
|
972
|
+
}
|
|
973
|
+
) : void 0,
|
|
974
|
+
actions: /* @__PURE__ */ jsx(
|
|
967
975
|
CreateActionButton,
|
|
968
976
|
{
|
|
969
977
|
mode: "desktop",
|
|
@@ -983,43 +991,33 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete, o
|
|
|
983
991
|
accent: "fuchsia"
|
|
984
992
|
}
|
|
985
993
|
);
|
|
986
|
-
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
},
|
|
1014
|
-
children: labels.delete
|
|
1015
|
-
}
|
|
1016
|
-
)
|
|
1017
|
-
] }),
|
|
1018
|
-
children: rule.description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: rule.description })
|
|
1019
|
-
},
|
|
1020
|
-
rule.ruleId
|
|
1021
|
-
)) })
|
|
1022
|
-
] });
|
|
994
|
+
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredRules.map((rule) => /* @__PURE__ */ jsx(
|
|
995
|
+
EntityCard,
|
|
996
|
+
{
|
|
997
|
+
accentGradient: "from-fuchsia-500 to-purple-700",
|
|
998
|
+
icon: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-fuchsia-500/10 text-fuchsia-600 dark:bg-fuchsia-500/20 dark:text-fuchsia-400", children: /* @__PURE__ */ jsx(AdjustmentsHorizontalIcon, { className: "h-6 w-6" }) }),
|
|
999
|
+
title: rule.name,
|
|
1000
|
+
subtitle: `${labels.order}: ${rule.order ?? 0}`,
|
|
1001
|
+
status: /* @__PURE__ */ jsx(Badge, { color: rule.enabled ? "emerald" : "zinc", children: rule.enabled ? labels.enabled : labels.disabled }),
|
|
1002
|
+
footer: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
1003
|
+
/* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(rule), children: labels.edit }),
|
|
1004
|
+
/* @__PURE__ */ jsx(
|
|
1005
|
+
Button,
|
|
1006
|
+
{
|
|
1007
|
+
type: "button",
|
|
1008
|
+
size: "sm",
|
|
1009
|
+
color: "rose",
|
|
1010
|
+
onClick: () => {
|
|
1011
|
+
if (window.confirm(labels.deleteConfirm)) onDelete(rule);
|
|
1012
|
+
},
|
|
1013
|
+
children: labels.delete
|
|
1014
|
+
}
|
|
1015
|
+
)
|
|
1016
|
+
] }),
|
|
1017
|
+
children: rule.description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: rule.description })
|
|
1018
|
+
},
|
|
1019
|
+
rule.ruleId
|
|
1020
|
+
)) });
|
|
1023
1021
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1024
1022
|
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1025
1023
|
hero,
|
|
@@ -1095,7 +1093,10 @@ function ruleToFormValue(rule) {
|
|
|
1095
1093
|
status: typeof rule.status === "string" ? rule.status : base.status,
|
|
1096
1094
|
validFrom: typeof rule.validFrom === "string" ? rule.validFrom : base.validFrom,
|
|
1097
1095
|
validUntil: typeof rule.validUntil === "string" ? rule.validUntil : base.validUntil,
|
|
1098
|
-
tags: Array.isArray(rule.tags) ? rule.tags.filter((tag) => typeof tag === "string") : base.tags
|
|
1096
|
+
tags: Array.isArray(rule.tags) ? rule.tags.filter((tag) => typeof tag === "string") : base.tags,
|
|
1097
|
+
// Round-trip recurrence (Fallback 4) — backend persists it as the
|
|
1098
|
+
// structured `{ kind, ... }` blob the wizard sends.
|
|
1099
|
+
recurrence: rule.recurrence ?? null
|
|
1099
1100
|
};
|
|
1100
1101
|
}
|
|
1101
1102
|
function pickAction(rule) {
|
|
@@ -1123,6 +1124,7 @@ var SAMPLE_DATASOURCES = [
|
|
|
1123
1124
|
timeoutMs: 3e4,
|
|
1124
1125
|
allowedTables: null,
|
|
1125
1126
|
blockedColumns: null,
|
|
1127
|
+
maskPii: null,
|
|
1126
1128
|
enabled: true,
|
|
1127
1129
|
createdAt: "2026-03-20T10:00:00Z",
|
|
1128
1130
|
updatedAt: "2026-03-20T10:00:00Z",
|
|
@@ -1139,6 +1141,7 @@ var SAMPLE_DATASOURCES = [
|
|
|
1139
1141
|
timeoutMs: 15e3,
|
|
1140
1142
|
allowedTables: null,
|
|
1141
1143
|
blockedColumns: null,
|
|
1144
|
+
maskPii: null,
|
|
1142
1145
|
enabled: true,
|
|
1143
1146
|
createdAt: "2026-03-18T08:30:00Z",
|
|
1144
1147
|
updatedAt: "2026-03-22T14:00:00Z",
|
|
@@ -1155,6 +1158,7 @@ var SAMPLE_DATASOURCES = [
|
|
|
1155
1158
|
timeoutMs: 3e4,
|
|
1156
1159
|
allowedTables: null,
|
|
1157
1160
|
blockedColumns: null,
|
|
1161
|
+
maskPii: null,
|
|
1158
1162
|
enabled: true,
|
|
1159
1163
|
createdAt: "2026-03-15T09:00:00Z",
|
|
1160
1164
|
updatedAt: "2026-03-21T11:00:00Z",
|
|
@@ -1171,6 +1175,7 @@ var SAMPLE_DATASOURCES = [
|
|
|
1171
1175
|
timeoutMs: 1e4,
|
|
1172
1176
|
allowedTables: null,
|
|
1173
1177
|
blockedColumns: null,
|
|
1178
|
+
maskPii: null,
|
|
1174
1179
|
enabled: false,
|
|
1175
1180
|
createdAt: "2026-03-10T12:00:00Z",
|
|
1176
1181
|
updatedAt: "2026-03-19T16:00:00Z",
|
|
@@ -1187,6 +1192,7 @@ var SAMPLE_DATASOURCES = [
|
|
|
1187
1192
|
timeoutMs: 5e3,
|
|
1188
1193
|
allowedTables: null,
|
|
1189
1194
|
blockedColumns: null,
|
|
1195
|
+
maskPii: null,
|
|
1190
1196
|
enabled: true,
|
|
1191
1197
|
createdAt: "2026-03-12T07:00:00Z",
|
|
1192
1198
|
updatedAt: "2026-03-23T09:00:00Z",
|
|
@@ -1203,6 +1209,7 @@ var SAMPLE_DATASOURCES = [
|
|
|
1203
1209
|
timeoutMs: 2e4,
|
|
1204
1210
|
allowedTables: null,
|
|
1205
1211
|
blockedColumns: null,
|
|
1212
|
+
maskPii: null,
|
|
1206
1213
|
enabled: true,
|
|
1207
1214
|
createdAt: "2026-03-22T15:00:00Z",
|
|
1208
1215
|
updatedAt: "2026-03-25T10:00:00Z",
|
|
@@ -1294,6 +1301,7 @@ function DatasourcesPageView({
|
|
|
1294
1301
|
timeoutMs: 3e4,
|
|
1295
1302
|
allowedTables: null,
|
|
1296
1303
|
blockedColumns: null,
|
|
1304
|
+
maskPii: null,
|
|
1297
1305
|
enabled: true,
|
|
1298
1306
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1299
1307
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -1310,7 +1318,16 @@ function DatasourcesPageView({
|
|
|
1310
1318
|
title: labels.title,
|
|
1311
1319
|
subtitle: labels.subtitle,
|
|
1312
1320
|
gradient: "from-amber-500 to-orange-600",
|
|
1313
|
-
toolbar: /* @__PURE__ */ jsx(
|
|
1321
|
+
toolbar: !isEmpty ? /* @__PURE__ */ jsx(
|
|
1322
|
+
SearchBar,
|
|
1323
|
+
{
|
|
1324
|
+
searchTerm,
|
|
1325
|
+
onSearchChange: setSearchTerm,
|
|
1326
|
+
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
1327
|
+
noBorder: true
|
|
1328
|
+
}
|
|
1329
|
+
) : void 0,
|
|
1330
|
+
actions: /* @__PURE__ */ jsx(
|
|
1314
1331
|
CreateActionButton,
|
|
1315
1332
|
{
|
|
1316
1333
|
mode: "desktop",
|
|
@@ -1330,14 +1347,6 @@ function DatasourcesPageView({
|
|
|
1330
1347
|
accent: "amber"
|
|
1331
1348
|
}
|
|
1332
1349
|
),
|
|
1333
|
-
!isEmpty && /* @__PURE__ */ jsx(
|
|
1334
|
-
SearchBar,
|
|
1335
|
-
{
|
|
1336
|
-
searchTerm,
|
|
1337
|
-
onSearchChange: setSearchTerm,
|
|
1338
|
-
placeholder: labels.searchPlaceholder ?? labels.title
|
|
1339
|
-
}
|
|
1340
|
-
),
|
|
1341
1350
|
isEmpty ? /* @__PURE__ */ jsx(
|
|
1342
1351
|
PageEmptyState,
|
|
1343
1352
|
{
|
|
@@ -1418,31 +1427,30 @@ function AgentsIndexPageView({ labels }) {
|
|
|
1418
1427
|
label: labels.title,
|
|
1419
1428
|
title: labels.title,
|
|
1420
1429
|
subtitle: labels.subtitle,
|
|
1421
|
-
gradient: "from-violet-500 to-indigo-700"
|
|
1430
|
+
gradient: "from-violet-500 to-indigo-700",
|
|
1431
|
+
toolbar: !isEmpty ? /* @__PURE__ */ jsx(
|
|
1432
|
+
SearchBar,
|
|
1433
|
+
{
|
|
1434
|
+
searchTerm,
|
|
1435
|
+
onSearchChange: setSearchTerm,
|
|
1436
|
+
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
1437
|
+
noBorder: true
|
|
1438
|
+
}
|
|
1439
|
+
) : void 0
|
|
1422
1440
|
}
|
|
1423
1441
|
);
|
|
1424
|
-
const content = /* @__PURE__ */
|
|
1425
|
-
|
|
1426
|
-
|
|
1442
|
+
const content = /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4", children: filteredTiles.map((tile) => {
|
|
1443
|
+
const Icon = tile.icon;
|
|
1444
|
+
return /* @__PURE__ */ jsx(Link, { href: tile.href, className: "block focus:outline-none", children: /* @__PURE__ */ jsx(
|
|
1445
|
+
EntityCard,
|
|
1427
1446
|
{
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1447
|
+
accentGradient: tile.gradient,
|
|
1448
|
+
icon: /* @__PURE__ */ jsx("div", { className: `flex h-11 w-11 items-center justify-center rounded-lg bg-gradient-to-br ${tile.gradient} shadow-lg`, children: /* @__PURE__ */ jsx(Icon, { className: "h-6 w-6 text-white" }) }),
|
|
1449
|
+
title: tile.title,
|
|
1450
|
+
children: /* @__PURE__ */ jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: tile.subtitle })
|
|
1431
1451
|
}
|
|
1432
|
-
),
|
|
1433
|
-
|
|
1434
|
-
const Icon = tile.icon;
|
|
1435
|
-
return /* @__PURE__ */ jsx(Link, { href: tile.href, className: "block focus:outline-none", children: /* @__PURE__ */ jsx(
|
|
1436
|
-
EntityCard,
|
|
1437
|
-
{
|
|
1438
|
-
accentGradient: tile.gradient,
|
|
1439
|
-
icon: /* @__PURE__ */ jsx("div", { className: `flex h-11 w-11 items-center justify-center rounded-lg bg-gradient-to-br ${tile.gradient} shadow-lg`, children: /* @__PURE__ */ jsx(Icon, { className: "h-6 w-6 text-white" }) }),
|
|
1440
|
-
title: tile.title,
|
|
1441
|
-
children: /* @__PURE__ */ jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: tile.subtitle })
|
|
1442
|
-
}
|
|
1443
|
-
) }, tile.id);
|
|
1444
|
-
}) })
|
|
1445
|
-
] });
|
|
1452
|
+
) }, tile.id);
|
|
1453
|
+
}) });
|
|
1446
1454
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1447
1455
|
hero,
|
|
1448
1456
|
content
|
|
@@ -1533,6 +1541,7 @@ var BADGE_COLOR = {
|
|
|
1533
1541
|
function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onView, onViewTimeline }) {
|
|
1534
1542
|
const [statusFilter, setStatusFilter] = useState("all");
|
|
1535
1543
|
const [searchTerm, setSearchTerm] = useState("");
|
|
1544
|
+
const [filtersOpen, setFiltersOpen] = useState(false);
|
|
1536
1545
|
const statusOptions = useMemo(() => [
|
|
1537
1546
|
{ value: "all", label: labels.filterAll },
|
|
1538
1547
|
{ value: "pending", label: labels.statusPending },
|
|
@@ -1575,54 +1584,61 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
1575
1584
|
title: labels.title,
|
|
1576
1585
|
subtitle: labels.subtitle,
|
|
1577
1586
|
gradient: "from-indigo-500 to-sky-700",
|
|
1578
|
-
toolbar:
|
|
1579
|
-
|
|
1587
|
+
toolbar: !isEmpty ? /* @__PURE__ */ jsx(
|
|
1588
|
+
SearchBar,
|
|
1580
1589
|
{
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1590
|
+
searchTerm,
|
|
1591
|
+
onSearchChange: setSearchTerm,
|
|
1592
|
+
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
1593
|
+
noBorder: true,
|
|
1594
|
+
filtersModal: {
|
|
1595
|
+
open: filtersOpen,
|
|
1596
|
+
onOpen: () => setFiltersOpen(true),
|
|
1597
|
+
onClose: () => setFiltersOpen(false),
|
|
1598
|
+
title: labels.filterStatus,
|
|
1599
|
+
count: statusFilter !== "all" ? 1 : 0,
|
|
1600
|
+
onClear: statusFilter !== "all" ? () => setStatusFilter("all") : void 0,
|
|
1601
|
+
children: /* @__PURE__ */ jsx(
|
|
1602
|
+
FormSelect,
|
|
1603
|
+
{
|
|
1604
|
+
name: "statusFilter",
|
|
1605
|
+
label: labels.filterStatus,
|
|
1606
|
+
options: statusOptions,
|
|
1607
|
+
value: statusFilter,
|
|
1608
|
+
onValueChange: setStatusFilter
|
|
1609
|
+
}
|
|
1610
|
+
)
|
|
1611
|
+
}
|
|
1586
1612
|
}
|
|
1587
|
-
)
|
|
1613
|
+
) : void 0
|
|
1588
1614
|
}
|
|
1589
1615
|
);
|
|
1590
|
-
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : filteredRuns.length === 0 ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
/* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => onReplay(run), children: labels.replay }),
|
|
1611
|
-
run.status === "running" && /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", color: "rose", onClick: () => onCancel(run), children: labels.cancel })
|
|
1616
|
+
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : filteredRuns.length === 0 ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredRuns.map((run) => /* @__PURE__ */ jsxs(
|
|
1617
|
+
EntityCard,
|
|
1618
|
+
{
|
|
1619
|
+
accentGradient: "from-indigo-500 to-sky-700",
|
|
1620
|
+
icon: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-indigo-500/10 text-indigo-600 dark:bg-indigo-500/20 dark:text-indigo-400", children: /* @__PURE__ */ jsx(ClockIcon, { className: "h-6 w-6" }) }),
|
|
1621
|
+
title: run.id.slice(0, 8),
|
|
1622
|
+
subtitle: `${labels.startedAt}: ${new Date(run.createdAt).toLocaleString()}`,
|
|
1623
|
+
status: /* @__PURE__ */ jsx(Badge, { color: BADGE_COLOR[run.status] ?? "zinc", children: statusLabelFor(run.status) }),
|
|
1624
|
+
footer: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
1625
|
+
onView && /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => onView(run), children: labels.view }),
|
|
1626
|
+
onViewTimeline && labels.timeline && /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => onViewTimeline(run), children: labels.timeline }),
|
|
1627
|
+
/* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => onReplay(run), children: labels.replay }),
|
|
1628
|
+
run.status === "running" && /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", color: "rose", onClick: () => onCancel(run), children: labels.cancel })
|
|
1629
|
+
] }),
|
|
1630
|
+
children: [
|
|
1631
|
+
/* @__PURE__ */ jsxs("dl", { className: "mt-1 grid grid-cols-2 gap-1 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
1632
|
+
/* @__PURE__ */ jsx("dt", { children: labels.duration }),
|
|
1633
|
+
/* @__PURE__ */ jsx("dd", { className: "text-right", children: formatDurationMs(run.totalDurationMs) }),
|
|
1634
|
+
/* @__PURE__ */ jsx("dt", { children: labels.triggeredBy }),
|
|
1635
|
+
/* @__PURE__ */ jsx("dd", { className: "text-right truncate", children: run.triggeredBy || "\u2014" })
|
|
1612
1636
|
] }),
|
|
1613
|
-
children:
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
/* @__PURE__ */ jsx("dd", { className: "text-right truncate", children: run.triggeredBy || "\u2014" })
|
|
1619
|
-
] }),
|
|
1620
|
-
run.error && /* @__PURE__ */ jsx("p", { className: "mt-1 line-clamp-2 text-xs text-rose-600 dark:text-rose-400", children: run.error })
|
|
1621
|
-
]
|
|
1622
|
-
},
|
|
1623
|
-
run.id
|
|
1624
|
-
)) })
|
|
1625
|
-
] });
|
|
1637
|
+
run.error && /* @__PURE__ */ jsx("p", { className: "mt-1 line-clamp-2 text-xs text-rose-600 dark:text-rose-400", children: run.error })
|
|
1638
|
+
]
|
|
1639
|
+
},
|
|
1640
|
+
run.id
|
|
1641
|
+
)) });
|
|
1626
1642
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1627
1643
|
hero,
|
|
1628
1644
|
content
|
|
@@ -1746,7 +1762,16 @@ function ConnectionsPageView({
|
|
|
1746
1762
|
title: labels.title,
|
|
1747
1763
|
subtitle: labels.subtitle,
|
|
1748
1764
|
gradient: "from-sky-500 to-indigo-600",
|
|
1749
|
-
toolbar: /* @__PURE__ */ jsx(
|
|
1765
|
+
toolbar: !isEmpty ? /* @__PURE__ */ jsx(
|
|
1766
|
+
SearchBar,
|
|
1767
|
+
{
|
|
1768
|
+
searchTerm,
|
|
1769
|
+
onSearchChange: setSearchTerm,
|
|
1770
|
+
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
1771
|
+
noBorder: true
|
|
1772
|
+
}
|
|
1773
|
+
) : void 0,
|
|
1774
|
+
actions: /* @__PURE__ */ jsx(
|
|
1750
1775
|
CreateActionButton,
|
|
1751
1776
|
{
|
|
1752
1777
|
mode: "desktop",
|
|
@@ -1766,50 +1791,40 @@ function ConnectionsPageView({
|
|
|
1766
1791
|
accent: "sky"
|
|
1767
1792
|
}
|
|
1768
1793
|
);
|
|
1769
|
-
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
{
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
] }),
|
|
1804
|
-
children: /* @__PURE__ */ jsxs("dl", { className: "mt-1 space-y-0.5 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
1805
|
-
conn.region && /* @__PURE__ */ jsx(Row, { label: "Region", value: conn.region }),
|
|
1806
|
-
conn.endpoint && /* @__PURE__ */ jsx(Row, { label: "Endpoint", value: conn.endpoint }),
|
|
1807
|
-
conn.modelFilter && conn.modelFilter.length > 0 && /* @__PURE__ */ jsx(Row, { label: "Models", value: conn.modelFilter.join(", ") })
|
|
1808
|
-
] })
|
|
1809
|
-
},
|
|
1810
|
-
conn.id
|
|
1811
|
-
)) })
|
|
1812
|
-
] });
|
|
1794
|
+
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredConnections.map((conn) => /* @__PURE__ */ jsx(
|
|
1795
|
+
EntityCard,
|
|
1796
|
+
{
|
|
1797
|
+
accentGradient: "from-sky-500 to-indigo-600",
|
|
1798
|
+
icon: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-sky-500/10 text-sky-600 dark:bg-sky-500/20 dark:text-sky-400", children: /* @__PURE__ */ jsx(LinkIcon, { className: "h-6 w-6" }) }),
|
|
1799
|
+
title: conn.name,
|
|
1800
|
+
subtitle: providerLabel(conn.providerSlug),
|
|
1801
|
+
status: /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
|
|
1802
|
+
/* @__PURE__ */ jsx(Badge, { color: conn.enabled ? "emerald" : "zinc", children: conn.enabled ? labels.enable : labels.disable }),
|
|
1803
|
+
conn.credentialRef ? /* @__PURE__ */ jsx(Badge, { color: "indigo", children: "Secret set" }) : /* @__PURE__ */ jsx(Badge, { color: "amber", children: "No secret" })
|
|
1804
|
+
] }),
|
|
1805
|
+
footer: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
1806
|
+
/* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(conn), children: labels.edit }),
|
|
1807
|
+
/* @__PURE__ */ jsx(
|
|
1808
|
+
Button,
|
|
1809
|
+
{
|
|
1810
|
+
type: "button",
|
|
1811
|
+
size: "sm",
|
|
1812
|
+
color: "rose",
|
|
1813
|
+
onClick: async () => {
|
|
1814
|
+
if (window.confirm(labels.deleteConfirm)) await onDelete(conn);
|
|
1815
|
+
},
|
|
1816
|
+
children: labels.delete
|
|
1817
|
+
}
|
|
1818
|
+
)
|
|
1819
|
+
] }),
|
|
1820
|
+
children: /* @__PURE__ */ jsxs("dl", { className: "mt-1 space-y-0.5 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
1821
|
+
conn.region && /* @__PURE__ */ jsx(Row, { label: "Region", value: conn.region }),
|
|
1822
|
+
conn.endpoint && /* @__PURE__ */ jsx(Row, { label: "Endpoint", value: conn.endpoint }),
|
|
1823
|
+
conn.modelFilter && conn.modelFilter.length > 0 && /* @__PURE__ */ jsx(Row, { label: "Models", value: conn.modelFilter.join(", ") })
|
|
1824
|
+
] })
|
|
1825
|
+
},
|
|
1826
|
+
conn.id
|
|
1827
|
+
)) });
|
|
1813
1828
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1814
1829
|
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1815
1830
|
hero,
|
|
@@ -2267,6 +2282,15 @@ function AgentsWorkspacePageView({
|
|
|
2267
2282
|
title: labels.title,
|
|
2268
2283
|
subtitle: labels.subtitle,
|
|
2269
2284
|
gradient: "from-violet-500 to-indigo-700",
|
|
2285
|
+
toolbar: !isEmpty ? /* @__PURE__ */ jsx(
|
|
2286
|
+
SearchBar,
|
|
2287
|
+
{
|
|
2288
|
+
searchTerm,
|
|
2289
|
+
onSearchChange: setSearchTerm,
|
|
2290
|
+
placeholder: labels.searchPlaceholder,
|
|
2291
|
+
noBorder: true
|
|
2292
|
+
}
|
|
2293
|
+
) : void 0,
|
|
2270
2294
|
actions: /* @__PURE__ */ jsx(
|
|
2271
2295
|
CreateActionButton,
|
|
2272
2296
|
{
|
|
@@ -2294,84 +2318,74 @@ function AgentsWorkspacePageView({
|
|
|
2294
2318
|
message: labels.emptyMessage,
|
|
2295
2319
|
iconName: "folder-open"
|
|
2296
2320
|
}
|
|
2297
|
-
) : /* @__PURE__ */ jsxs("div", { className: "
|
|
2298
|
-
/* @__PURE__ */ jsx(
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
),
|
|
2306
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-[20rem_minmax(0,1fr)]", children: [
|
|
2307
|
-
/* @__PURE__ */ jsx("div", { className: "lg:sticky lg:top-4", children: /* @__PURE__ */ jsx(ListCard, { variant: "glass", children: filteredAgents.map((agent) => {
|
|
2308
|
-
const id = String(agent.agentId ?? agent.id ?? "");
|
|
2309
|
-
const active = id === selectedId;
|
|
2310
|
-
const initials = deriveInitials(String(agent.name ?? id));
|
|
2311
|
-
const modelName = models.find((m) => m.id === String(agent.modelId ?? ""))?.name ?? String(agent.modelId ?? "");
|
|
2312
|
-
return /* @__PURE__ */ jsx(
|
|
2313
|
-
ListCardItem,
|
|
2314
|
-
{
|
|
2315
|
-
leading: /* @__PURE__ */ jsx(Avatar, { tone: active ? "violet" : "slate", initials }),
|
|
2316
|
-
trailing: agent.activePromptVersion > 0 ? /* @__PURE__ */ jsxs(Badge, { color: "emerald", children: [
|
|
2317
|
-
"v",
|
|
2318
|
-
agent.activePromptVersion
|
|
2319
|
-
] }) : /* @__PURE__ */ jsx(Badge, { color: "zinc", children: "draft" }),
|
|
2320
|
-
pressable: true,
|
|
2321
|
-
onPress: () => {
|
|
2322
|
-
setSelectedId(id);
|
|
2323
|
-
onSelectAgent?.(id);
|
|
2324
|
-
},
|
|
2325
|
-
className: active ? "bg-violet-500/5 dark:bg-violet-400/10" : "",
|
|
2326
|
-
children: /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2327
|
-
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-semibold text-slate-900 dark:text-slate-100", children: String(agent.name ?? id) }),
|
|
2328
|
-
modelName && /* @__PURE__ */ jsx("p", { className: "truncate text-xs text-slate-500 dark:text-slate-400", children: modelName })
|
|
2329
|
-
] })
|
|
2330
|
-
},
|
|
2331
|
-
id
|
|
2332
|
-
);
|
|
2333
|
-
}) }) }),
|
|
2334
|
-
/* @__PURE__ */ jsx("div", { children: selectedAgent ? /* @__PURE__ */ jsx(
|
|
2335
|
-
AgentDetail,
|
|
2336
|
-
{
|
|
2337
|
-
agent: selectedAgent,
|
|
2338
|
-
labels,
|
|
2339
|
-
models,
|
|
2340
|
-
tools,
|
|
2341
|
-
connections,
|
|
2342
|
-
prompts: promptsByAgent[String(selectedAgent.agentId ?? selectedAgent.id ?? "")] ?? [],
|
|
2343
|
-
onUpdateAgent,
|
|
2344
|
-
onDeleteAgent,
|
|
2345
|
-
onCreatePrompt,
|
|
2346
|
-
onActivatePrompt,
|
|
2347
|
-
onAttachTool,
|
|
2348
|
-
onDetachTool,
|
|
2349
|
-
onUpdateModel,
|
|
2350
|
-
onCleared: () => {
|
|
2351
|
-
setSelectedId(null);
|
|
2352
|
-
onSelectAgent?.(null);
|
|
2353
|
-
}
|
|
2354
|
-
},
|
|
2355
|
-
String(selectedAgent.agentId ?? selectedAgent.id ?? "")
|
|
2356
|
-
) : /* @__PURE__ */ jsx(
|
|
2357
|
-
SectionCard,
|
|
2321
|
+
) : /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-[20rem_minmax(0,1fr)]", children: [
|
|
2322
|
+
/* @__PURE__ */ jsx("div", { className: "lg:sticky lg:top-4", children: /* @__PURE__ */ jsx(ListCard, { variant: "glass", children: filteredAgents.map((agent) => {
|
|
2323
|
+
const id = String(agent.agentId ?? agent.id ?? "");
|
|
2324
|
+
const active = id === selectedId;
|
|
2325
|
+
const initials = deriveInitials(String(agent.name ?? id));
|
|
2326
|
+
const modelName = models.find((m) => m.id === String(agent.modelId ?? ""))?.name ?? String(agent.modelId ?? "");
|
|
2327
|
+
return /* @__PURE__ */ jsx(
|
|
2328
|
+
ListCardItem,
|
|
2358
2329
|
{
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2330
|
+
leading: /* @__PURE__ */ jsx(Avatar, { tone: active ? "violet" : "slate", initials }),
|
|
2331
|
+
trailing: agent.activePromptVersion > 0 ? /* @__PURE__ */ jsxs(Badge, { color: "emerald", children: [
|
|
2332
|
+
"v",
|
|
2333
|
+
agent.activePromptVersion
|
|
2334
|
+
] }) : /* @__PURE__ */ jsx(Badge, { color: "zinc", children: "draft" }),
|
|
2335
|
+
pressable: true,
|
|
2336
|
+
onPress: () => {
|
|
2337
|
+
setSelectedId(id);
|
|
2338
|
+
onSelectAgent?.(id);
|
|
2363
2339
|
},
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
{
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2340
|
+
className: active ? "bg-violet-500/5 dark:bg-violet-400/10" : "",
|
|
2341
|
+
children: /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2342
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-semibold text-slate-900 dark:text-slate-100", children: String(agent.name ?? id) }),
|
|
2343
|
+
modelName && /* @__PURE__ */ jsx("p", { className: "truncate text-xs text-slate-500 dark:text-slate-400", children: modelName })
|
|
2344
|
+
] })
|
|
2345
|
+
},
|
|
2346
|
+
id
|
|
2347
|
+
);
|
|
2348
|
+
}) }) }),
|
|
2349
|
+
/* @__PURE__ */ jsx("div", { children: selectedAgent ? /* @__PURE__ */ jsx(
|
|
2350
|
+
AgentDetail,
|
|
2351
|
+
{
|
|
2352
|
+
agent: selectedAgent,
|
|
2353
|
+
labels,
|
|
2354
|
+
models,
|
|
2355
|
+
tools,
|
|
2356
|
+
connections,
|
|
2357
|
+
prompts: promptsByAgent[String(selectedAgent.agentId ?? selectedAgent.id ?? "")] ?? [],
|
|
2358
|
+
onUpdateAgent,
|
|
2359
|
+
onDeleteAgent,
|
|
2360
|
+
onCreatePrompt,
|
|
2361
|
+
onActivatePrompt,
|
|
2362
|
+
onAttachTool,
|
|
2363
|
+
onDetachTool,
|
|
2364
|
+
onUpdateModel,
|
|
2365
|
+
onCleared: () => {
|
|
2366
|
+
setSelectedId(null);
|
|
2367
|
+
onSelectAgent?.(null);
|
|
2372
2368
|
}
|
|
2373
|
-
|
|
2374
|
-
|
|
2369
|
+
},
|
|
2370
|
+
String(selectedAgent.agentId ?? selectedAgent.id ?? "")
|
|
2371
|
+
) : /* @__PURE__ */ jsx(
|
|
2372
|
+
SectionCard,
|
|
2373
|
+
{
|
|
2374
|
+
header: {
|
|
2375
|
+
icon: /* @__PURE__ */ jsx(CpuChipIcon, { className: "h-4 w-4" }),
|
|
2376
|
+
title: labels.noSelection,
|
|
2377
|
+
subtitle: labels.noSelectionMessage
|
|
2378
|
+
},
|
|
2379
|
+
children: /* @__PURE__ */ jsx(
|
|
2380
|
+
PageEmptyState,
|
|
2381
|
+
{
|
|
2382
|
+
title: labels.noSelection,
|
|
2383
|
+
message: labels.noSelectionMessage,
|
|
2384
|
+
iconName: "folder-open"
|
|
2385
|
+
}
|
|
2386
|
+
)
|
|
2387
|
+
}
|
|
2388
|
+
) })
|
|
2375
2389
|
] });
|
|
2376
2390
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
2377
2391
|
hero,
|
|
@@ -2979,11 +2993,9 @@ function AgentNewWizardPageView({
|
|
|
2979
2993
|
labels.wizardStep4Subtitle,
|
|
2980
2994
|
labels.wizardStep5Subtitle
|
|
2981
2995
|
];
|
|
2982
|
-
const
|
|
2996
|
+
const indicatorSteps = stepTitles.map((title, idx) => ({
|
|
2983
2997
|
id: String(idx + 1),
|
|
2984
|
-
|
|
2985
|
-
description: stepSubtitles[idx],
|
|
2986
|
-
status: idx + 1 < step ? "complete" : idx + 1 === step ? "current" : "upcoming"
|
|
2998
|
+
title
|
|
2987
2999
|
}));
|
|
2988
3000
|
function markTouched() {
|
|
2989
3001
|
if (!touched) setTouched(true);
|
|
@@ -3082,7 +3094,17 @@ function AgentNewWizardPageView({
|
|
|
3082
3094
|
label: counter,
|
|
3083
3095
|
title: labels.pageTitle,
|
|
3084
3096
|
subtitle: stepSubtitles[step - 1],
|
|
3085
|
-
gradient: activePreset.accent
|
|
3097
|
+
gradient: activePreset.accent,
|
|
3098
|
+
children: /* @__PURE__ */ jsx(
|
|
3099
|
+
StepIndicator,
|
|
3100
|
+
{
|
|
3101
|
+
accent: "indigo",
|
|
3102
|
+
currentStep: step - 1,
|
|
3103
|
+
onStepChange: (idx) => goToStep(idx + 1),
|
|
3104
|
+
progressLabel: labels.pageTitle,
|
|
3105
|
+
steps: indicatorSteps
|
|
3106
|
+
}
|
|
3107
|
+
)
|
|
3086
3108
|
}
|
|
3087
3109
|
);
|
|
3088
3110
|
function renderStep1() {
|
|
@@ -3595,22 +3617,10 @@ function AgentNewWizardPageView({
|
|
|
3595
3617
|
if (step < TOTAL_STEPS) goNext();
|
|
3596
3618
|
else void submit();
|
|
3597
3619
|
},
|
|
3598
|
-
className: "space-y-
|
|
3620
|
+
className: "space-y-4",
|
|
3599
3621
|
children: [
|
|
3600
|
-
/* @__PURE__ */ jsx(
|
|
3601
|
-
|
|
3602
|
-
{
|
|
3603
|
-
steps: timelineSteps,
|
|
3604
|
-
progressLabel: labels.pageTitle,
|
|
3605
|
-
onStepClick: (idx) => {
|
|
3606
|
-
goToStep(idx + 1);
|
|
3607
|
-
}
|
|
3608
|
-
}
|
|
3609
|
-
),
|
|
3610
|
-
/* @__PURE__ */ jsxs("div", { className: "w-full space-y-5", children: [
|
|
3611
|
-
stepBody,
|
|
3612
|
-
footer
|
|
3613
|
-
] })
|
|
3622
|
+
/* @__PURE__ */ jsx("div", { className: "liquid-surface rounded-2xl p-5 sm:p-8", children: stepBody }),
|
|
3623
|
+
footer
|
|
3614
3624
|
]
|
|
3615
3625
|
}
|
|
3616
3626
|
);
|
|
@@ -3696,9 +3706,19 @@ function DatasourceNewWizardPageView({
|
|
|
3696
3706
|
const [readOnly, setReadOnly] = useState(true);
|
|
3697
3707
|
const [maxPoolSize, setMaxPoolSize] = useState("5");
|
|
3698
3708
|
const [timeoutMs, setTimeoutMs] = useState("5000");
|
|
3699
|
-
const [
|
|
3700
|
-
const [
|
|
3709
|
+
const [allowedTablesItems, setAllowedTablesItems] = useState([]);
|
|
3710
|
+
const [allowedTablesSelected, setAllowedTablesSelected] = useState([]);
|
|
3711
|
+
const [blockedColumnsItems, setBlockedColumnsItems] = useState([]);
|
|
3712
|
+
const [blockedColumnsSelected, setBlockedColumnsSelected] = useState([]);
|
|
3701
3713
|
const [maskPii, setMaskPii] = useState(false);
|
|
3714
|
+
const allowedTablesStyle = {
|
|
3715
|
+
bg: "bg-amber-500/15",
|
|
3716
|
+
text: "text-amber-700 dark:text-amber-300"
|
|
3717
|
+
};
|
|
3718
|
+
const blockedColumnsStyle = {
|
|
3719
|
+
bg: "bg-rose-500/15",
|
|
3720
|
+
text: "text-rose-700 dark:text-rose-300"
|
|
3721
|
+
};
|
|
3702
3722
|
const [submitting, setSubmitting] = useState(false);
|
|
3703
3723
|
const [touched, setTouched] = useState(false);
|
|
3704
3724
|
const [testStatus, setTestStatus] = useState("idle");
|
|
@@ -3767,10 +3787,9 @@ function DatasourceNewWizardPageView({
|
|
|
3767
3787
|
if (Number.isFinite(pool) && pool > 0) payload.maxPoolSize = pool;
|
|
3768
3788
|
const timeout = Number(timeoutMs);
|
|
3769
3789
|
if (Number.isFinite(timeout) && timeout > 0) payload.timeoutMs = timeout;
|
|
3770
|
-
|
|
3771
|
-
if (
|
|
3772
|
-
|
|
3773
|
-
if (blocked.length > 0) payload.blockedColumns = blocked;
|
|
3790
|
+
if (allowedTablesSelected.length > 0) payload.allowedTables = [...allowedTablesSelected];
|
|
3791
|
+
if (blockedColumnsSelected.length > 0) payload.blockedColumns = [...blockedColumnsSelected];
|
|
3792
|
+
if (maskPii) payload.maskPii = true;
|
|
3774
3793
|
return payload;
|
|
3775
3794
|
}
|
|
3776
3795
|
async function handleTestConnection() {
|
|
@@ -3787,11 +3806,7 @@ function DatasourceNewWizardPageView({
|
|
|
3787
3806
|
async function submit() {
|
|
3788
3807
|
setSubmitting(true);
|
|
3789
3808
|
try {
|
|
3790
|
-
|
|
3791
|
-
...buildPayload(),
|
|
3792
|
-
...maskPii ? { maskPii: true } : {}
|
|
3793
|
-
};
|
|
3794
|
-
await onSubmit(payload);
|
|
3809
|
+
await onSubmit(buildPayload());
|
|
3795
3810
|
} finally {
|
|
3796
3811
|
setSubmitting(false);
|
|
3797
3812
|
}
|
|
@@ -3827,11 +3842,9 @@ function DatasourceNewWizardPageView({
|
|
|
3827
3842
|
labels.wizardStep3Subtitle,
|
|
3828
3843
|
labels.wizardStep4Subtitle
|
|
3829
3844
|
];
|
|
3830
|
-
const
|
|
3845
|
+
const indicatorSteps = stepTitles.map((title, idx) => ({
|
|
3831
3846
|
id: String(idx + 1),
|
|
3832
|
-
|
|
3833
|
-
description: stepSubtitles[idx],
|
|
3834
|
-
status: idx + 1 < step ? "complete" : idx + 1 === step ? "current" : "upcoming"
|
|
3847
|
+
title
|
|
3835
3848
|
}));
|
|
3836
3849
|
const counter = labels.wizardStepCounter.replace("{current}", String(step)).replace("{total}", String(TOTAL_STEPS2));
|
|
3837
3850
|
const hero = /* @__PURE__ */ jsx(
|
|
@@ -3841,7 +3854,17 @@ function DatasourceNewWizardPageView({
|
|
|
3841
3854
|
label: counter,
|
|
3842
3855
|
title: labels.pageTitle,
|
|
3843
3856
|
subtitle: stepSubtitles[step - 1] ?? labels.pageSubtitle,
|
|
3844
|
-
gradient: category?.gradient ?? "from-amber-500 to-orange-600"
|
|
3857
|
+
gradient: category?.gradient ?? "from-amber-500 to-orange-600",
|
|
3858
|
+
children: /* @__PURE__ */ jsx(
|
|
3859
|
+
StepIndicator,
|
|
3860
|
+
{
|
|
3861
|
+
accent: "indigo",
|
|
3862
|
+
currentStep: step - 1,
|
|
3863
|
+
onStepChange: (idx) => goToStep(idx + 1),
|
|
3864
|
+
progressLabel: labels.pageTitle,
|
|
3865
|
+
steps: indicatorSteps
|
|
3866
|
+
}
|
|
3867
|
+
)
|
|
3845
3868
|
}
|
|
3846
3869
|
);
|
|
3847
3870
|
function renderStep1() {
|
|
@@ -4312,32 +4335,54 @@ function DatasourceNewWizardPageView({
|
|
|
4312
4335
|
}
|
|
4313
4336
|
)
|
|
4314
4337
|
] }),
|
|
4315
|
-
/* @__PURE__ */
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4338
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
4339
|
+
/* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.fieldAllowedTables }),
|
|
4340
|
+
/* @__PURE__ */ jsx(
|
|
4341
|
+
ChipPicker,
|
|
4342
|
+
{
|
|
4343
|
+
items: allowedTablesItems,
|
|
4344
|
+
selectedIds: allowedTablesSelected,
|
|
4345
|
+
onChange: (ids) => {
|
|
4346
|
+
setAllowedTablesSelected(ids);
|
|
4347
|
+
markTouched();
|
|
4348
|
+
},
|
|
4349
|
+
onItemsChange: (items) => {
|
|
4350
|
+
setAllowedTablesItems(items);
|
|
4351
|
+
markTouched();
|
|
4352
|
+
},
|
|
4353
|
+
allowCustom: true,
|
|
4354
|
+
unselectedStyle: allowedTablesStyle,
|
|
4355
|
+
showActions: false,
|
|
4356
|
+
addPlaceholder: labels.fieldAllowedTablesPlaceholder,
|
|
4357
|
+
addAriaLabel: labels.fieldAllowedTables
|
|
4358
|
+
}
|
|
4359
|
+
),
|
|
4360
|
+
/* @__PURE__ */ jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.fieldAllowedTablesHint })
|
|
4361
|
+
] }),
|
|
4362
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
4363
|
+
/* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.fieldBlockedColumns }),
|
|
4364
|
+
/* @__PURE__ */ jsx(
|
|
4365
|
+
ChipPicker,
|
|
4366
|
+
{
|
|
4367
|
+
items: blockedColumnsItems,
|
|
4368
|
+
selectedIds: blockedColumnsSelected,
|
|
4369
|
+
onChange: (ids) => {
|
|
4370
|
+
setBlockedColumnsSelected(ids);
|
|
4371
|
+
markTouched();
|
|
4372
|
+
},
|
|
4373
|
+
onItemsChange: (items) => {
|
|
4374
|
+
setBlockedColumnsItems(items);
|
|
4375
|
+
markTouched();
|
|
4376
|
+
},
|
|
4377
|
+
allowCustom: true,
|
|
4378
|
+
unselectedStyle: blockedColumnsStyle,
|
|
4379
|
+
showActions: false,
|
|
4380
|
+
addPlaceholder: labels.fieldBlockedColumnsPlaceholder,
|
|
4381
|
+
addAriaLabel: labels.fieldBlockedColumns
|
|
4382
|
+
}
|
|
4383
|
+
),
|
|
4384
|
+
/* @__PURE__ */ jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.fieldBlockedColumnsHint })
|
|
4385
|
+
] }),
|
|
4341
4386
|
/* @__PURE__ */ jsx(
|
|
4342
4387
|
FormCheckbox,
|
|
4343
4388
|
{
|
|
@@ -4357,8 +4402,8 @@ function DatasourceNewWizardPageView({
|
|
|
4357
4402
|
function renderStep4() {
|
|
4358
4403
|
const categoryLabel = category ? labels[category.labelKey] ?? category.id : labels.reviewNoneValue;
|
|
4359
4404
|
const dialectLabel = dialectOption?.label ?? labels.reviewNoneValue;
|
|
4360
|
-
const allowed =
|
|
4361
|
-
const blocked =
|
|
4405
|
+
const allowed = allowedTablesSelected;
|
|
4406
|
+
const blocked = blockedColumnsSelected;
|
|
4362
4407
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
4363
4408
|
/* @__PURE__ */ jsx(
|
|
4364
4409
|
SectionCard,
|
|
@@ -4450,20 +4495,10 @@ function DatasourceNewWizardPageView({
|
|
|
4450
4495
|
if (step < TOTAL_STEPS2) goNext();
|
|
4451
4496
|
else void submit();
|
|
4452
4497
|
},
|
|
4453
|
-
className: "space-y-
|
|
4498
|
+
className: "space-y-4",
|
|
4454
4499
|
children: [
|
|
4455
|
-
/* @__PURE__ */ jsx(
|
|
4456
|
-
|
|
4457
|
-
{
|
|
4458
|
-
steps: timelineSteps,
|
|
4459
|
-
progressLabel: labels.pageTitle,
|
|
4460
|
-
onStepClick: (idx) => goToStep(idx + 1)
|
|
4461
|
-
}
|
|
4462
|
-
),
|
|
4463
|
-
/* @__PURE__ */ jsxs("div", { className: "w-full space-y-5", children: [
|
|
4464
|
-
stepBody,
|
|
4465
|
-
footer
|
|
4466
|
-
] })
|
|
4500
|
+
/* @__PURE__ */ jsx("div", { className: "liquid-surface rounded-2xl p-5 sm:p-8", children: stepBody }),
|
|
4501
|
+
footer
|
|
4467
4502
|
]
|
|
4468
4503
|
}
|
|
4469
4504
|
);
|
|
@@ -4478,9 +4513,6 @@ function ReviewRow2({ label, value }) {
|
|
|
4478
4513
|
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 truncate text-xs font-semibold text-gray-900 dark:text-white", children: value })
|
|
4479
4514
|
] });
|
|
4480
4515
|
}
|
|
4481
|
-
function splitList(raw) {
|
|
4482
|
-
return raw.split(",").map((s) => s.trim()).filter((s) => s.length > 0);
|
|
4483
|
-
}
|
|
4484
4516
|
async function simulateTest() {
|
|
4485
4517
|
await new Promise((r) => setTimeout(r, 1500));
|
|
4486
4518
|
return true;
|
|
@@ -4594,7 +4626,12 @@ function RuleNewWizardPageView({
|
|
|
4594
4626
|
const [priority, setPriority] = useState(50);
|
|
4595
4627
|
const [enabled, setEnabled] = useState(true);
|
|
4596
4628
|
const [status, setStatus] = useState("active");
|
|
4597
|
-
const [
|
|
4629
|
+
const [tagsItems, setTagsItems] = useState([]);
|
|
4630
|
+
const [tagsSelected, setTagsSelected] = useState([]);
|
|
4631
|
+
const tagsStyle = {
|
|
4632
|
+
bg: "bg-fuchsia-500/15",
|
|
4633
|
+
text: "text-fuchsia-700 dark:text-fuchsia-300"
|
|
4634
|
+
};
|
|
4598
4635
|
const [combinator, setCombinator] = useState("and");
|
|
4599
4636
|
const [condition, setCondition] = useState(defaultRuleCondition());
|
|
4600
4637
|
const [actionTileId, setActionTileId] = useState("");
|
|
@@ -4644,49 +4681,40 @@ function RuleNewWizardPageView({
|
|
|
4644
4681
|
next.setHours(time?.hours ?? 0, time?.minutes ?? 0, 0, 0);
|
|
4645
4682
|
return next.toISOString();
|
|
4646
4683
|
}
|
|
4647
|
-
const tags = useMemo(
|
|
4648
|
-
() => tagsInput.split(",").map((t) => t.trim()).filter((t) => t.length > 0),
|
|
4649
|
-
[tagsInput]
|
|
4650
|
-
);
|
|
4684
|
+
const tags = useMemo(() => [...tagsSelected], [tagsSelected]);
|
|
4651
4685
|
function buildPayload() {
|
|
4652
4686
|
const validFrom = combineDateTime(validFromDate, validFromTime);
|
|
4653
4687
|
const validUntil = noExpiry ? null : combineDateTime(validUntilDate, validUntilTime);
|
|
4654
|
-
const conditionWithCombinator = combinator === "
|
|
4688
|
+
const conditionWithCombinator = combinator === "and" ? condition : {
|
|
4655
4689
|
operator: "boolean_expression",
|
|
4656
|
-
combinator
|
|
4657
|
-
operands: [condition],
|
|
4658
|
-
// The engine ignores extra fields, so this is forward-compat.
|
|
4659
|
-
...{ notFlag: true }
|
|
4660
|
-
} : combinator === "or" ? {
|
|
4661
|
-
operator: "boolean_expression",
|
|
4662
|
-
combinator: "or",
|
|
4690
|
+
combinator,
|
|
4663
4691
|
operands: [condition]
|
|
4664
|
-
}
|
|
4692
|
+
};
|
|
4665
4693
|
const finalAction = {
|
|
4666
4694
|
type: action.type,
|
|
4667
4695
|
params: {
|
|
4668
4696
|
...action.params ?? {},
|
|
4669
|
-
actionVariant: actionTileId
|
|
4670
|
-
recurrence,
|
|
4671
|
-
...recurrence === "cron" && cronExpression ? { cronExpression } : {},
|
|
4672
|
-
...recurrence === "recurring" ? {
|
|
4673
|
-
weekdays,
|
|
4674
|
-
...recurringTime ? { timeOfDay: `${pad(recurringTime.hours)}:${pad(recurringTime.minutes)}` } : {}
|
|
4675
|
-
} : {}
|
|
4697
|
+
actionVariant: actionTileId
|
|
4676
4698
|
}
|
|
4677
4699
|
};
|
|
4678
|
-
const
|
|
4700
|
+
const recurrencePayload = recurrence === "cron" ? { kind: "cron", expression: cronExpression.trim() } : recurrence === "recurring" ? {
|
|
4701
|
+
kind: "recurring",
|
|
4702
|
+
weekdays: [...weekdays],
|
|
4703
|
+
timeOfDay: recurringTime ? `${pad(recurringTime.hours)}:${pad(recurringTime.minutes)}` : "00:00"
|
|
4704
|
+
} : { kind: "one-off" };
|
|
4679
4705
|
return {
|
|
4680
4706
|
name: name.trim() || "Untitled Rule",
|
|
4681
4707
|
description: description.trim() || void 0,
|
|
4682
4708
|
enabled,
|
|
4683
4709
|
priority,
|
|
4684
|
-
|
|
4710
|
+
// `paused` ships as-is — backend understands it natively (Fallback 2).
|
|
4711
|
+
status,
|
|
4685
4712
|
validFrom,
|
|
4686
4713
|
validUntil,
|
|
4687
4714
|
tags,
|
|
4688
4715
|
condition: conditionWithCombinator,
|
|
4689
|
-
action: finalAction
|
|
4716
|
+
action: finalAction,
|
|
4717
|
+
recurrence: recurrencePayload
|
|
4690
4718
|
};
|
|
4691
4719
|
}
|
|
4692
4720
|
async function submit() {
|
|
@@ -4730,11 +4758,9 @@ function RuleNewWizardPageView({
|
|
|
4730
4758
|
labels.wizardStep4Subtitle,
|
|
4731
4759
|
labels.wizardStep5Subtitle
|
|
4732
4760
|
];
|
|
4733
|
-
const
|
|
4761
|
+
const indicatorSteps = stepTitles.map((title, idx) => ({
|
|
4734
4762
|
id: String(idx + 1),
|
|
4735
|
-
|
|
4736
|
-
description: stepSubtitles[idx],
|
|
4737
|
-
status: idx + 1 < step ? "complete" : idx + 1 === step ? "current" : "upcoming"
|
|
4763
|
+
title
|
|
4738
4764
|
}));
|
|
4739
4765
|
const counter = labels.wizardStepCounter.replace("{current}", String(step)).replace("{total}", String(TOTAL_STEPS3));
|
|
4740
4766
|
const hero = /* @__PURE__ */ jsx(
|
|
@@ -4744,7 +4770,17 @@ function RuleNewWizardPageView({
|
|
|
4744
4770
|
label: counter,
|
|
4745
4771
|
title: labels.pageTitle,
|
|
4746
4772
|
subtitle: stepSubtitles[step - 1] ?? labels.pageSubtitle,
|
|
4747
|
-
gradient: "from-fuchsia-500 to-purple-700"
|
|
4773
|
+
gradient: "from-fuchsia-500 to-purple-700",
|
|
4774
|
+
children: /* @__PURE__ */ jsx(
|
|
4775
|
+
StepIndicator,
|
|
4776
|
+
{
|
|
4777
|
+
accent: "violet",
|
|
4778
|
+
currentStep: step - 1,
|
|
4779
|
+
onStepChange: (idx) => goToStep(idx + 1),
|
|
4780
|
+
progressLabel: labels.pageTitle,
|
|
4781
|
+
steps: indicatorSteps
|
|
4782
|
+
}
|
|
4783
|
+
)
|
|
4748
4784
|
}
|
|
4749
4785
|
);
|
|
4750
4786
|
function renderStep1() {
|
|
@@ -5026,19 +5062,30 @@ function RuleNewWizardPageView({
|
|
|
5026
5062
|
}
|
|
5027
5063
|
)
|
|
5028
5064
|
] }),
|
|
5029
|
-
/* @__PURE__ */
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5065
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
5066
|
+
/* @__PURE__ */ jsx("label", { className: "block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.tagsLabel }),
|
|
5067
|
+
/* @__PURE__ */ jsx(
|
|
5068
|
+
ChipPicker,
|
|
5069
|
+
{
|
|
5070
|
+
items: tagsItems,
|
|
5071
|
+
selectedIds: tagsSelected,
|
|
5072
|
+
onChange: (ids) => {
|
|
5073
|
+
setTagsSelected(ids);
|
|
5074
|
+
markTouched();
|
|
5075
|
+
},
|
|
5076
|
+
onItemsChange: (items) => {
|
|
5077
|
+
setTagsItems(items);
|
|
5078
|
+
markTouched();
|
|
5079
|
+
},
|
|
5080
|
+
allowCustom: true,
|
|
5081
|
+
unselectedStyle: tagsStyle,
|
|
5082
|
+
showActions: false,
|
|
5083
|
+
addPlaceholder: labels.tagsPlaceholder,
|
|
5084
|
+
addAriaLabel: labels.tagsLabel
|
|
5085
|
+
}
|
|
5086
|
+
),
|
|
5087
|
+
/* @__PURE__ */ jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.tagsHint })
|
|
5088
|
+
] }),
|
|
5042
5089
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
5043
5090
|
/* @__PURE__ */ jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.recurrenceLabel }),
|
|
5044
5091
|
/* @__PURE__ */ jsx(
|
|
@@ -5074,29 +5121,25 @@ function RuleNewWizardPageView({
|
|
|
5074
5121
|
recurrence === "recurring" && /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
5075
5122
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
5076
5123
|
/* @__PURE__ */ jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.weekdaysLabel }),
|
|
5077
|
-
/* @__PURE__ */ jsx(
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
"inline-flex h-9 min-w-9 items-center justify-center rounded-full px-3 text-xs font-semibold transition",
|
|
5093
|
-
selected ? "bg-fuchsia-500 text-white shadow ring-2 ring-fuchsia-300/70" : "liquid-surface text-slate-700 dark:text-slate-300 hover:bg-fuchsia-500/10"
|
|
5094
|
-
].join(" "),
|
|
5095
|
-
children: label
|
|
5124
|
+
/* @__PURE__ */ jsx(
|
|
5125
|
+
ChipPicker,
|
|
5126
|
+
{
|
|
5127
|
+
items: WEEKDAYS.map((d) => ({
|
|
5128
|
+
id: d.id,
|
|
5129
|
+
name: labels[d.labelKey] ?? d.id,
|
|
5130
|
+
style: {
|
|
5131
|
+
bg: "bg-fuchsia-500/15",
|
|
5132
|
+
text: "text-fuchsia-700 dark:text-fuchsia-300"
|
|
5133
|
+
}
|
|
5134
|
+
})),
|
|
5135
|
+
selectedIds: weekdays,
|
|
5136
|
+
onChange: (ids) => {
|
|
5137
|
+
setWeekdays(ids);
|
|
5138
|
+
markTouched();
|
|
5096
5139
|
},
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5140
|
+
showActions: false
|
|
5141
|
+
}
|
|
5142
|
+
)
|
|
5100
5143
|
] }),
|
|
5101
5144
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
5102
5145
|
/* @__PURE__ */ jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.timeOfDayLabel }),
|
|
@@ -5252,20 +5295,10 @@ function RuleNewWizardPageView({
|
|
|
5252
5295
|
if (step < TOTAL_STEPS3) goNext();
|
|
5253
5296
|
else void submit();
|
|
5254
5297
|
},
|
|
5255
|
-
className: "space-y-
|
|
5298
|
+
className: "space-y-4",
|
|
5256
5299
|
children: [
|
|
5257
|
-
/* @__PURE__ */ jsx(
|
|
5258
|
-
|
|
5259
|
-
{
|
|
5260
|
-
steps: timelineSteps,
|
|
5261
|
-
progressLabel: labels.pageTitle,
|
|
5262
|
-
onStepClick: (idx) => goToStep(idx + 1)
|
|
5263
|
-
}
|
|
5264
|
-
),
|
|
5265
|
-
/* @__PURE__ */ jsxs("div", { className: "w-full space-y-5", children: [
|
|
5266
|
-
stepBody,
|
|
5267
|
-
footer
|
|
5268
|
-
] })
|
|
5300
|
+
/* @__PURE__ */ jsx("div", { className: "liquid-surface rounded-2xl p-5 sm:p-8", children: stepBody }),
|
|
5301
|
+
footer
|
|
5269
5302
|
]
|
|
5270
5303
|
}
|
|
5271
5304
|
);
|