@datatechsolutions/ui 3.10.0 → 3.11.0

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.
Files changed (117) hide show
  1. package/dist/astrlabe/contracts.d.mts +18 -2
  2. package/dist/astrlabe/contracts.d.ts +18 -2
  3. package/dist/astrlabe/index.d.mts +2 -2
  4. package/dist/astrlabe/index.d.ts +2 -2
  5. package/dist/astrlabe/index.js +109 -109
  6. package/dist/astrlabe/index.mjs +5 -5
  7. package/dist/astrlabe/workflow-canvas.js +5 -5
  8. package/dist/astrlabe/workflow-canvas.mjs +4 -4
  9. package/dist/{chunk-NM37GLCL.mjs → chunk-2AJ73ULK.mjs} +3 -3
  10. package/dist/{chunk-NM37GLCL.mjs.map → chunk-2AJ73ULK.mjs.map} +1 -1
  11. package/dist/{chunk-MSMEECO6.js → chunk-35O2X7WY.js} +9 -9
  12. package/dist/{chunk-MSMEECO6.js.map → chunk-35O2X7WY.js.map} +1 -1
  13. package/dist/{chunk-5KI7FB3E.mjs → chunk-35P352JX.mjs} +225 -234
  14. package/dist/chunk-35P352JX.mjs.map +1 -0
  15. package/dist/{chunk-FD376DZ6.mjs → chunk-37FWIPYO.mjs} +3 -3
  16. package/dist/{chunk-FD376DZ6.mjs.map → chunk-37FWIPYO.mjs.map} +1 -1
  17. package/dist/{chunk-DA3H7ERQ.mjs → chunk-3US2QXEF.mjs} +3 -3
  18. package/dist/{chunk-DA3H7ERQ.mjs.map → chunk-3US2QXEF.mjs.map} +1 -1
  19. package/dist/{chunk-FIJMOTP4.js → chunk-62BD4WLW.js} +34 -34
  20. package/dist/{chunk-FIJMOTP4.js.map → chunk-62BD4WLW.js.map} +1 -1
  21. package/dist/{chunk-O4HH77A4.js → chunk-6TKCMQ75.js} +68 -68
  22. package/dist/{chunk-O4HH77A4.js.map → chunk-6TKCMQ75.js.map} +1 -1
  23. package/dist/{chunk-BU4WMSK3.mjs → chunk-7D52TFVL.mjs} +3 -3
  24. package/dist/{chunk-BU4WMSK3.mjs.map → chunk-7D52TFVL.mjs.map} +1 -1
  25. package/dist/{chunk-6UX2SRA2.mjs → chunk-7KPMLHPR.mjs} +3 -3
  26. package/dist/{chunk-6UX2SRA2.mjs.map → chunk-7KPMLHPR.mjs.map} +1 -1
  27. package/dist/{chunk-AMESLEIO.js → chunk-7MPIYSRH.js} +63 -63
  28. package/dist/{chunk-AMESLEIO.js.map → chunk-7MPIYSRH.js.map} +1 -1
  29. package/dist/{chunk-6ZYATZS3.mjs → chunk-7V7WEXHS.mjs} +3 -3
  30. package/dist/{chunk-6ZYATZS3.mjs.map → chunk-7V7WEXHS.mjs.map} +1 -1
  31. package/dist/{chunk-5AKTDJFR.js → chunk-BCJATFZE.js} +25 -25
  32. package/dist/{chunk-5AKTDJFR.js.map → chunk-BCJATFZE.js.map} +1 -1
  33. package/dist/{chunk-2A45ZEK4.js → chunk-BO3RXG6M.js} +45 -45
  34. package/dist/{chunk-2A45ZEK4.js.map → chunk-BO3RXG6M.js.map} +1 -1
  35. package/dist/{chunk-L3R425GB.js → chunk-G52HXPSB.js} +13 -13
  36. package/dist/{chunk-L3R425GB.js.map → chunk-G52HXPSB.js.map} +1 -1
  37. package/dist/{chunk-MAOZWOA6.js → chunk-GKI74CPB.js} +55 -55
  38. package/dist/{chunk-MAOZWOA6.js.map → chunk-GKI74CPB.js.map} +1 -1
  39. package/dist/{chunk-TSNKICPP.js → chunk-GTJGX7IZ.js} +10 -10
  40. package/dist/{chunk-TSNKICPP.js.map → chunk-GTJGX7IZ.js.map} +1 -1
  41. package/dist/{chunk-EC34PGUO.js → chunk-H475T2N7.js} +136 -136
  42. package/dist/chunk-H475T2N7.js.map +1 -0
  43. package/dist/{chunk-FENA4YGN.mjs → chunk-HUAWGBYL.mjs} +3 -3
  44. package/dist/{chunk-FENA4YGN.mjs.map → chunk-HUAWGBYL.mjs.map} +1 -1
  45. package/dist/{chunk-RHRJXK5R.mjs → chunk-IGOMJHC6.mjs} +11 -3
  46. package/dist/chunk-IGOMJHC6.mjs.map +1 -0
  47. package/dist/{chunk-B76RTA7D.js → chunk-JTD3BBVI.js} +35 -35
  48. package/dist/{chunk-B76RTA7D.js.map → chunk-JTD3BBVI.js.map} +1 -1
  49. package/dist/{chunk-JB3U6ORY.mjs → chunk-K4AJL4BH.mjs} +3 -3
  50. package/dist/{chunk-JB3U6ORY.mjs.map → chunk-K4AJL4BH.mjs.map} +1 -1
  51. package/dist/{chunk-HEXTU6W3.mjs → chunk-KTEEXEAX.mjs} +6 -6
  52. package/dist/{chunk-HEXTU6W3.mjs.map → chunk-KTEEXEAX.mjs.map} +1 -1
  53. package/dist/{chunk-C4D3EI5L.mjs → chunk-NM3YTQ26.mjs} +3 -3
  54. package/dist/{chunk-C4D3EI5L.mjs.map → chunk-NM3YTQ26.mjs.map} +1 -1
  55. package/dist/{chunk-H7X3SXMB.mjs → chunk-NRVV4PHB.mjs} +7 -7
  56. package/dist/{chunk-H7X3SXMB.mjs.map → chunk-NRVV4PHB.mjs.map} +1 -1
  57. package/dist/{chunk-KHUWFL6W.js → chunk-O2CUOJ74.js} +4 -4
  58. package/dist/{chunk-KHUWFL6W.js.map → chunk-O2CUOJ74.js.map} +1 -1
  59. package/dist/{chunk-NSZN54HW.js → chunk-PHBZ3TXE.js} +4 -4
  60. package/dist/{chunk-NSZN54HW.js.map → chunk-PHBZ3TXE.js.map} +1 -1
  61. package/dist/{chunk-W6MBDTKF.mjs → chunk-R3CGJK7D.mjs} +3 -3
  62. package/dist/{chunk-W6MBDTKF.mjs.map → chunk-R3CGJK7D.mjs.map} +1 -1
  63. package/dist/{chunk-5U43K6G3.mjs → chunk-TCIK6WHT.mjs} +24 -22
  64. package/dist/chunk-TCIK6WHT.mjs.map +1 -0
  65. package/dist/{chunk-YSYEV2Z6.js → chunk-Z6FZQOTW.js} +46 -44
  66. package/dist/chunk-Z6FZQOTW.js.map +1 -0
  67. package/dist/{chunk-LVR4SR65.js → chunk-ZGVN23J4.js} +223 -234
  68. package/dist/chunk-ZGVN23J4.js.map +1 -0
  69. package/dist/{chunk-A256OE5E.mjs → chunk-ZJMYLUZ2.mjs} +5 -5
  70. package/dist/chunk-ZJMYLUZ2.mjs.map +1 -0
  71. package/dist/{chunk-SY4MUT5V.js → chunk-ZUU7G3PC.js} +11 -2
  72. package/dist/chunk-ZUU7G3PC.js.map +1 -0
  73. package/dist/index.d.mts +26 -40
  74. package/dist/index.d.ts +26 -40
  75. package/dist/index.js +664 -672
  76. package/dist/index.mjs +3 -3
  77. package/dist/platform/admin/index.js +11 -11
  78. package/dist/platform/admin/index.mjs +5 -5
  79. package/dist/platform/agents-workspace.js +8 -8
  80. package/dist/platform/agents-workspace.mjs +7 -7
  81. package/dist/platform/app-shell.js +5 -5
  82. package/dist/platform/app-shell.mjs +4 -4
  83. package/dist/platform/auth/index.js +23 -23
  84. package/dist/platform/auth/index.mjs +5 -5
  85. package/dist/platform/billing/index.js +5 -5
  86. package/dist/platform/billing/index.mjs +4 -4
  87. package/dist/platform/impersonation/index.js +5 -5
  88. package/dist/platform/impersonation/index.mjs +4 -4
  89. package/dist/platform/index.js +86 -86
  90. package/dist/platform/index.mjs +19 -19
  91. package/dist/platform/pages/index.d.mts +3 -3
  92. package/dist/platform/pages/index.d.ts +3 -3
  93. package/dist/platform/pages/index.js +583 -548
  94. package/dist/platform/pages/index.js.map +1 -1
  95. package/dist/platform/pages/index.mjs +288 -253
  96. package/dist/platform/pages/index.mjs.map +1 -1
  97. package/dist/platform/settings/index.js +8 -8
  98. package/dist/platform/settings/index.mjs +7 -7
  99. package/dist/platform/workflow-api-client.d.mts +1 -1
  100. package/dist/platform/workflow-api-client.d.ts +1 -1
  101. package/dist/platform/workflow-api-client.js +65 -61
  102. package/dist/platform/workflow-api-client.mjs +1 -1
  103. package/dist/platform/workflow-canvas-shell.js +6 -6
  104. package/dist/platform/workflow-canvas-shell.mjs +5 -5
  105. package/dist/{rule-form-BYJzyork.d.mts → rule-form-BkKCY8Tc.d.mts} +8 -2
  106. package/dist/{rule-form-BYJzyork.d.ts → rule-form-CBD8wlrw.d.ts} +8 -2
  107. package/dist/{workflow-api-client-CpFl3WcG.d.mts → workflow-api-client-D9_0Spdz.d.mts} +16 -1
  108. package/dist/{workflow-api-client-uLICOanv.d.ts → workflow-api-client-E1QFRgeP.d.ts} +16 -1
  109. package/package.json +1 -1
  110. package/dist/chunk-5KI7FB3E.mjs.map +0 -1
  111. package/dist/chunk-5U43K6G3.mjs.map +0 -1
  112. package/dist/chunk-A256OE5E.mjs.map +0 -1
  113. package/dist/chunk-EC34PGUO.js.map +0 -1
  114. package/dist/chunk-LVR4SR65.js.map +0 -1
  115. package/dist/chunk-RHRJXK5R.mjs.map +0 -1
  116. package/dist/chunk-SY4MUT5V.js.map +0 -1
  117. package/dist/chunk-YSYEV2Z6.js.map +0 -1
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import { adaptWorkflowGraphToUi, formatDurationMs } from '../../chunk-UQXVCVAN.mjs';
3
- import { WorkflowWorkspace } from '../../chunk-5U43K6G3.mjs';
4
- export { RolesPageView, UsersPageView } from '../../chunk-5U43K6G3.mjs';
5
- import { DatasourceModal, findDialect, findCategory, DIALECT_CATEGORIES } from '../../chunk-FD376DZ6.mjs';
6
- export { DIALECT_CATEGORIES, DatasourceFormModal, DatasourceModal, findCategory, findDialect } from '../../chunk-FD376DZ6.mjs';
7
- import { defaultRuleForm, RuleForm, ExecutionTimelinePanel, defaultRuleCondition, defaultRuleAction, RuleConditionBuilder, RuleActionBuilder } from '../../chunk-A256OE5E.mjs';
3
+ import { WorkflowWorkspace } from '../../chunk-TCIK6WHT.mjs';
4
+ export { RolesPageView, UsersPageView } from '../../chunk-TCIK6WHT.mjs';
5
+ import { DatasourceModal, findDialect, findCategory, DIALECT_CATEGORIES } from '../../chunk-37FWIPYO.mjs';
6
+ export { DIALECT_CATEGORIES, DatasourceFormModal, DatasourceModal, findCategory, findDialect } from '../../chunk-37FWIPYO.mjs';
7
+ import { defaultRuleForm, RuleForm, ExecutionTimelinePanel, defaultRuleCondition, defaultRuleAction, RuleConditionBuilder, RuleActionBuilder } from '../../chunk-ZJMYLUZ2.mjs';
8
8
  import '../../chunk-JB6RNAD2.mjs';
9
9
  import '../../chunk-LEXBTVGM.mjs';
10
- import '../../chunk-DA3H7ERQ.mjs';
11
- import { HeroSection, PageLoadingState, PageEmptyState, SearchBar, 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, StepTimeline, FilterTileButton, FormToggle, Spinner, StatusBadge, FormCheckbox, SegmentedControl, DatePicker, TimePicker } from '../../chunk-5KI7FB3E.mjs';
12
- import '../../chunk-7VJ7CMMT.mjs';
13
- import '../../chunk-RHRJXK5R.mjs';
10
+ import '../../chunk-3US2QXEF.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-35P352JX.mjs';
12
+ import '../../chunk-IGOMJHC6.mjs';
14
13
  import '../../chunk-3AY5HIQ6.mjs';
14
+ import '../../chunk-7VJ7CMMT.mjs';
15
15
  import '../../chunk-PLTLRL2V.mjs';
16
16
  import { Badge, Button } from '../../chunk-WR55H7DH.mjs';
17
17
  import '../../chunk-D2JF6C3E.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__ */ jsxs(Fragment, { children: [
40
- /* @__PURE__ */ jsx(
41
- SearchBar,
42
- {
43
- searchTerm,
44
- onSearchChange: setSearchTerm,
45
- placeholder: labels.searchPlaceholder ?? labels.title
46
- }
47
- ),
48
- /* @__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
- )) })
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
@@ -1095,7 +1094,10 @@ function ruleToFormValue(rule) {
1095
1094
  status: typeof rule.status === "string" ? rule.status : base.status,
1096
1095
  validFrom: typeof rule.validFrom === "string" ? rule.validFrom : base.validFrom,
1097
1096
  validUntil: typeof rule.validUntil === "string" ? rule.validUntil : base.validUntil,
1098
- tags: Array.isArray(rule.tags) ? rule.tags.filter((tag) => typeof tag === "string") : base.tags
1097
+ tags: Array.isArray(rule.tags) ? rule.tags.filter((tag) => typeof tag === "string") : base.tags,
1098
+ // Round-trip recurrence (Fallback 4) — backend persists it as the
1099
+ // structured `{ kind, ... }` blob the wizard sends.
1100
+ recurrence: rule.recurrence ?? null
1099
1101
  };
1100
1102
  }
1101
1103
  function pickAction(rule) {
@@ -1123,6 +1125,7 @@ var SAMPLE_DATASOURCES = [
1123
1125
  timeoutMs: 3e4,
1124
1126
  allowedTables: null,
1125
1127
  blockedColumns: null,
1128
+ maskPii: null,
1126
1129
  enabled: true,
1127
1130
  createdAt: "2026-03-20T10:00:00Z",
1128
1131
  updatedAt: "2026-03-20T10:00:00Z",
@@ -1139,6 +1142,7 @@ var SAMPLE_DATASOURCES = [
1139
1142
  timeoutMs: 15e3,
1140
1143
  allowedTables: null,
1141
1144
  blockedColumns: null,
1145
+ maskPii: null,
1142
1146
  enabled: true,
1143
1147
  createdAt: "2026-03-18T08:30:00Z",
1144
1148
  updatedAt: "2026-03-22T14:00:00Z",
@@ -1155,6 +1159,7 @@ var SAMPLE_DATASOURCES = [
1155
1159
  timeoutMs: 3e4,
1156
1160
  allowedTables: null,
1157
1161
  blockedColumns: null,
1162
+ maskPii: null,
1158
1163
  enabled: true,
1159
1164
  createdAt: "2026-03-15T09:00:00Z",
1160
1165
  updatedAt: "2026-03-21T11:00:00Z",
@@ -1171,6 +1176,7 @@ var SAMPLE_DATASOURCES = [
1171
1176
  timeoutMs: 1e4,
1172
1177
  allowedTables: null,
1173
1178
  blockedColumns: null,
1179
+ maskPii: null,
1174
1180
  enabled: false,
1175
1181
  createdAt: "2026-03-10T12:00:00Z",
1176
1182
  updatedAt: "2026-03-19T16:00:00Z",
@@ -1187,6 +1193,7 @@ var SAMPLE_DATASOURCES = [
1187
1193
  timeoutMs: 5e3,
1188
1194
  allowedTables: null,
1189
1195
  blockedColumns: null,
1196
+ maskPii: null,
1190
1197
  enabled: true,
1191
1198
  createdAt: "2026-03-12T07:00:00Z",
1192
1199
  updatedAt: "2026-03-23T09:00:00Z",
@@ -1203,6 +1210,7 @@ var SAMPLE_DATASOURCES = [
1203
1210
  timeoutMs: 2e4,
1204
1211
  allowedTables: null,
1205
1212
  blockedColumns: null,
1213
+ maskPii: null,
1206
1214
  enabled: true,
1207
1215
  createdAt: "2026-03-22T15:00:00Z",
1208
1216
  updatedAt: "2026-03-25T10:00:00Z",
@@ -1294,6 +1302,7 @@ function DatasourcesPageView({
1294
1302
  timeoutMs: 3e4,
1295
1303
  allowedTables: null,
1296
1304
  blockedColumns: null,
1305
+ maskPii: null,
1297
1306
  enabled: true,
1298
1307
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
1299
1308
  updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
@@ -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__ */ jsxs(Fragment, { children: [
1425
- !isEmpty && /* @__PURE__ */ jsx(
1426
- SearchBar,
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
- searchTerm,
1429
- onSearchChange: setSearchTerm,
1430
- placeholder: labels.searchPlaceholder ?? labels.title
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
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4", children: filteredTiles.map((tile) => {
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: /* @__PURE__ */ jsx("div", { className: "w-full sm:w-48", children: /* @__PURE__ */ jsx(
1579
- FormSelect,
1587
+ toolbar: !isEmpty ? /* @__PURE__ */ jsx(
1588
+ SearchBar,
1580
1589
  {
1581
- name: "statusFilter",
1582
- label: labels.filterStatus,
1583
- options: statusOptions,
1584
- value: statusFilter,
1585
- onValueChange: setStatusFilter
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__ */ jsxs(Fragment, { children: [
1591
- !isEmpty && /* @__PURE__ */ jsx(
1592
- SearchBar,
1593
- {
1594
- searchTerm,
1595
- onSearchChange: setSearchTerm,
1596
- placeholder: labels.searchPlaceholder ?? labels.title
1597
- }
1598
- ),
1599
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredRuns.map((run) => /* @__PURE__ */ jsxs(
1600
- EntityCard,
1601
- {
1602
- accentGradient: "from-indigo-500 to-sky-700",
1603
- 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" }) }),
1604
- title: run.id.slice(0, 8),
1605
- subtitle: `${labels.startedAt}: ${new Date(run.createdAt).toLocaleString()}`,
1606
- status: /* @__PURE__ */ jsx(Badge, { color: BADGE_COLOR[run.status] ?? "zinc", children: statusLabelFor(run.status) }),
1607
- footer: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
1608
- onView && /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => onView(run), children: labels.view }),
1609
- onViewTimeline && labels.timeline && /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => onViewTimeline(run), children: labels.timeline }),
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
- /* @__PURE__ */ jsxs("dl", { className: "mt-1 grid grid-cols-2 gap-1 text-xs text-slate-500 dark:text-slate-400", children: [
1615
- /* @__PURE__ */ jsx("dt", { children: labels.duration }),
1616
- /* @__PURE__ */ jsx("dd", { className: "text-right", children: formatDurationMs(run.totalDurationMs) }),
1617
- /* @__PURE__ */ jsx("dt", { children: labels.triggeredBy }),
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
@@ -2979,11 +2995,9 @@ function AgentNewWizardPageView({
2979
2995
  labels.wizardStep4Subtitle,
2980
2996
  labels.wizardStep5Subtitle
2981
2997
  ];
2982
- const timelineSteps = stepTitles.map((title, idx) => ({
2998
+ const indicatorSteps = stepTitles.map((title, idx) => ({
2983
2999
  id: String(idx + 1),
2984
- name: title,
2985
- description: stepSubtitles[idx],
2986
- status: idx + 1 < step ? "complete" : idx + 1 === step ? "current" : "upcoming"
3000
+ title
2987
3001
  }));
2988
3002
  function markTouched() {
2989
3003
  if (!touched) setTouched(true);
@@ -3082,7 +3096,17 @@ function AgentNewWizardPageView({
3082
3096
  label: counter,
3083
3097
  title: labels.pageTitle,
3084
3098
  subtitle: stepSubtitles[step - 1],
3085
- gradient: activePreset.accent
3099
+ gradient: activePreset.accent,
3100
+ children: /* @__PURE__ */ jsx(
3101
+ StepIndicator,
3102
+ {
3103
+ accent: "indigo",
3104
+ currentStep: step - 1,
3105
+ onStepChange: (idx) => goToStep(idx + 1),
3106
+ progressLabel: labels.pageTitle,
3107
+ steps: indicatorSteps
3108
+ }
3109
+ )
3086
3110
  }
3087
3111
  );
3088
3112
  function renderStep1() {
@@ -3595,22 +3619,10 @@ function AgentNewWizardPageView({
3595
3619
  if (step < TOTAL_STEPS) goNext();
3596
3620
  else void submit();
3597
3621
  },
3598
- className: "space-y-5",
3622
+ className: "space-y-4",
3599
3623
  children: [
3600
- /* @__PURE__ */ jsx(
3601
- StepTimeline,
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
- ] })
3624
+ /* @__PURE__ */ jsx("div", { className: "liquid-surface rounded-2xl p-5 sm:p-8", children: stepBody }),
3625
+ footer
3614
3626
  ]
3615
3627
  }
3616
3628
  );
@@ -3696,9 +3708,19 @@ function DatasourceNewWizardPageView({
3696
3708
  const [readOnly, setReadOnly] = useState(true);
3697
3709
  const [maxPoolSize, setMaxPoolSize] = useState("5");
3698
3710
  const [timeoutMs, setTimeoutMs] = useState("5000");
3699
- const [allowedTables, setAllowedTables] = useState("");
3700
- const [blockedColumns, setBlockedColumns] = useState("");
3711
+ const [allowedTablesItems, setAllowedTablesItems] = useState([]);
3712
+ const [allowedTablesSelected, setAllowedTablesSelected] = useState([]);
3713
+ const [blockedColumnsItems, setBlockedColumnsItems] = useState([]);
3714
+ const [blockedColumnsSelected, setBlockedColumnsSelected] = useState([]);
3701
3715
  const [maskPii, setMaskPii] = useState(false);
3716
+ const allowedTablesStyle = {
3717
+ bg: "bg-amber-500/15",
3718
+ text: "text-amber-700 dark:text-amber-300"
3719
+ };
3720
+ const blockedColumnsStyle = {
3721
+ bg: "bg-rose-500/15",
3722
+ text: "text-rose-700 dark:text-rose-300"
3723
+ };
3702
3724
  const [submitting, setSubmitting] = useState(false);
3703
3725
  const [touched, setTouched] = useState(false);
3704
3726
  const [testStatus, setTestStatus] = useState("idle");
@@ -3767,10 +3789,9 @@ function DatasourceNewWizardPageView({
3767
3789
  if (Number.isFinite(pool) && pool > 0) payload.maxPoolSize = pool;
3768
3790
  const timeout = Number(timeoutMs);
3769
3791
  if (Number.isFinite(timeout) && timeout > 0) payload.timeoutMs = timeout;
3770
- const allowed = splitList(allowedTables);
3771
- if (allowed.length > 0) payload.allowedTables = allowed;
3772
- const blocked = splitList(blockedColumns);
3773
- if (blocked.length > 0) payload.blockedColumns = blocked;
3792
+ if (allowedTablesSelected.length > 0) payload.allowedTables = [...allowedTablesSelected];
3793
+ if (blockedColumnsSelected.length > 0) payload.blockedColumns = [...blockedColumnsSelected];
3794
+ if (maskPii) payload.maskPii = true;
3774
3795
  return payload;
3775
3796
  }
3776
3797
  async function handleTestConnection() {
@@ -3787,11 +3808,7 @@ function DatasourceNewWizardPageView({
3787
3808
  async function submit() {
3788
3809
  setSubmitting(true);
3789
3810
  try {
3790
- const payload = {
3791
- ...buildPayload(),
3792
- ...maskPii ? { maskPii: true } : {}
3793
- };
3794
- await onSubmit(payload);
3811
+ await onSubmit(buildPayload());
3795
3812
  } finally {
3796
3813
  setSubmitting(false);
3797
3814
  }
@@ -3827,11 +3844,9 @@ function DatasourceNewWizardPageView({
3827
3844
  labels.wizardStep3Subtitle,
3828
3845
  labels.wizardStep4Subtitle
3829
3846
  ];
3830
- const timelineSteps = stepTitles.map((title, idx) => ({
3847
+ const indicatorSteps = stepTitles.map((title, idx) => ({
3831
3848
  id: String(idx + 1),
3832
- name: title,
3833
- description: stepSubtitles[idx],
3834
- status: idx + 1 < step ? "complete" : idx + 1 === step ? "current" : "upcoming"
3849
+ title
3835
3850
  }));
3836
3851
  const counter = labels.wizardStepCounter.replace("{current}", String(step)).replace("{total}", String(TOTAL_STEPS2));
3837
3852
  const hero = /* @__PURE__ */ jsx(
@@ -3841,7 +3856,17 @@ function DatasourceNewWizardPageView({
3841
3856
  label: counter,
3842
3857
  title: labels.pageTitle,
3843
3858
  subtitle: stepSubtitles[step - 1] ?? labels.pageSubtitle,
3844
- gradient: category?.gradient ?? "from-amber-500 to-orange-600"
3859
+ gradient: category?.gradient ?? "from-amber-500 to-orange-600",
3860
+ children: /* @__PURE__ */ jsx(
3861
+ StepIndicator,
3862
+ {
3863
+ accent: "indigo",
3864
+ currentStep: step - 1,
3865
+ onStepChange: (idx) => goToStep(idx + 1),
3866
+ progressLabel: labels.pageTitle,
3867
+ steps: indicatorSteps
3868
+ }
3869
+ )
3845
3870
  }
3846
3871
  );
3847
3872
  function renderStep1() {
@@ -4312,32 +4337,54 @@ function DatasourceNewWizardPageView({
4312
4337
  }
4313
4338
  )
4314
4339
  ] }),
4315
- /* @__PURE__ */ jsx(
4316
- FormInput,
4317
- {
4318
- label: labels.fieldAllowedTables,
4319
- value: allowedTables,
4320
- onValueChange: (v) => {
4321
- setAllowedTables(v);
4322
- markTouched();
4323
- },
4324
- placeholder: labels.fieldAllowedTablesPlaceholder,
4325
- hint: labels.fieldAllowedTablesHint
4326
- }
4327
- ),
4328
- /* @__PURE__ */ jsx(
4329
- FormInput,
4330
- {
4331
- label: labels.fieldBlockedColumns,
4332
- value: blockedColumns,
4333
- onValueChange: (v) => {
4334
- setBlockedColumns(v);
4335
- markTouched();
4336
- },
4337
- placeholder: labels.fieldBlockedColumnsPlaceholder,
4338
- hint: labels.fieldBlockedColumnsHint
4339
- }
4340
- ),
4340
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
4341
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.fieldAllowedTables }),
4342
+ /* @__PURE__ */ jsx(
4343
+ ChipPicker,
4344
+ {
4345
+ items: allowedTablesItems,
4346
+ selectedIds: allowedTablesSelected,
4347
+ onChange: (ids) => {
4348
+ setAllowedTablesSelected(ids);
4349
+ markTouched();
4350
+ },
4351
+ onItemsChange: (items) => {
4352
+ setAllowedTablesItems(items);
4353
+ markTouched();
4354
+ },
4355
+ allowCustom: true,
4356
+ unselectedStyle: allowedTablesStyle,
4357
+ showActions: false,
4358
+ addPlaceholder: labels.fieldAllowedTablesPlaceholder,
4359
+ addAriaLabel: labels.fieldAllowedTables
4360
+ }
4361
+ ),
4362
+ /* @__PURE__ */ jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.fieldAllowedTablesHint })
4363
+ ] }),
4364
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
4365
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.fieldBlockedColumns }),
4366
+ /* @__PURE__ */ jsx(
4367
+ ChipPicker,
4368
+ {
4369
+ items: blockedColumnsItems,
4370
+ selectedIds: blockedColumnsSelected,
4371
+ onChange: (ids) => {
4372
+ setBlockedColumnsSelected(ids);
4373
+ markTouched();
4374
+ },
4375
+ onItemsChange: (items) => {
4376
+ setBlockedColumnsItems(items);
4377
+ markTouched();
4378
+ },
4379
+ allowCustom: true,
4380
+ unselectedStyle: blockedColumnsStyle,
4381
+ showActions: false,
4382
+ addPlaceholder: labels.fieldBlockedColumnsPlaceholder,
4383
+ addAriaLabel: labels.fieldBlockedColumns
4384
+ }
4385
+ ),
4386
+ /* @__PURE__ */ jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.fieldBlockedColumnsHint })
4387
+ ] }),
4341
4388
  /* @__PURE__ */ jsx(
4342
4389
  FormCheckbox,
4343
4390
  {
@@ -4357,8 +4404,8 @@ function DatasourceNewWizardPageView({
4357
4404
  function renderStep4() {
4358
4405
  const categoryLabel = category ? labels[category.labelKey] ?? category.id : labels.reviewNoneValue;
4359
4406
  const dialectLabel = dialectOption?.label ?? labels.reviewNoneValue;
4360
- const allowed = splitList(allowedTables);
4361
- const blocked = splitList(blockedColumns);
4407
+ const allowed = allowedTablesSelected;
4408
+ const blocked = blockedColumnsSelected;
4362
4409
  return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
4363
4410
  /* @__PURE__ */ jsx(
4364
4411
  SectionCard,
@@ -4450,20 +4497,10 @@ function DatasourceNewWizardPageView({
4450
4497
  if (step < TOTAL_STEPS2) goNext();
4451
4498
  else void submit();
4452
4499
  },
4453
- className: "space-y-5",
4500
+ className: "space-y-4",
4454
4501
  children: [
4455
- /* @__PURE__ */ jsx(
4456
- StepTimeline,
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
- ] })
4502
+ /* @__PURE__ */ jsx("div", { className: "liquid-surface rounded-2xl p-5 sm:p-8", children: stepBody }),
4503
+ footer
4467
4504
  ]
4468
4505
  }
4469
4506
  );
@@ -4478,9 +4515,6 @@ function ReviewRow2({ label, value }) {
4478
4515
  /* @__PURE__ */ jsx("dd", { className: "mt-0.5 truncate text-xs font-semibold text-gray-900 dark:text-white", children: value })
4479
4516
  ] });
4480
4517
  }
4481
- function splitList(raw) {
4482
- return raw.split(",").map((s) => s.trim()).filter((s) => s.length > 0);
4483
- }
4484
4518
  async function simulateTest() {
4485
4519
  await new Promise((r) => setTimeout(r, 1500));
4486
4520
  return true;
@@ -4594,7 +4628,12 @@ function RuleNewWizardPageView({
4594
4628
  const [priority, setPriority] = useState(50);
4595
4629
  const [enabled, setEnabled] = useState(true);
4596
4630
  const [status, setStatus] = useState("active");
4597
- const [tagsInput, setTagsInput] = useState("");
4631
+ const [tagsItems, setTagsItems] = useState([]);
4632
+ const [tagsSelected, setTagsSelected] = useState([]);
4633
+ const tagsStyle = {
4634
+ bg: "bg-fuchsia-500/15",
4635
+ text: "text-fuchsia-700 dark:text-fuchsia-300"
4636
+ };
4598
4637
  const [combinator, setCombinator] = useState("and");
4599
4638
  const [condition, setCondition] = useState(defaultRuleCondition());
4600
4639
  const [actionTileId, setActionTileId] = useState("");
@@ -4644,49 +4683,40 @@ function RuleNewWizardPageView({
4644
4683
  next.setHours(time?.hours ?? 0, time?.minutes ?? 0, 0, 0);
4645
4684
  return next.toISOString();
4646
4685
  }
4647
- const tags = useMemo(
4648
- () => tagsInput.split(",").map((t) => t.trim()).filter((t) => t.length > 0),
4649
- [tagsInput]
4650
- );
4686
+ const tags = useMemo(() => [...tagsSelected], [tagsSelected]);
4651
4687
  function buildPayload() {
4652
4688
  const validFrom = combineDateTime(validFromDate, validFromTime);
4653
4689
  const validUntil = noExpiry ? null : combineDateTime(validUntilDate, validUntilTime);
4654
- const conditionWithCombinator = combinator === "not" ? {
4690
+ const conditionWithCombinator = combinator === "and" ? condition : {
4655
4691
  operator: "boolean_expression",
4656
- combinator: "and",
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",
4692
+ combinator,
4663
4693
  operands: [condition]
4664
- } : condition;
4694
+ };
4665
4695
  const finalAction = {
4666
4696
  type: action.type,
4667
4697
  params: {
4668
4698
  ...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
- } : {}
4699
+ actionVariant: actionTileId
4676
4700
  }
4677
4701
  };
4678
- const wireStatus = status === "paused" ? "draft" : status;
4702
+ const recurrencePayload = recurrence === "cron" ? { kind: "cron", expression: cronExpression.trim() } : recurrence === "recurring" ? {
4703
+ kind: "recurring",
4704
+ weekdays: [...weekdays],
4705
+ timeOfDay: recurringTime ? `${pad(recurringTime.hours)}:${pad(recurringTime.minutes)}` : "00:00"
4706
+ } : { kind: "one-off" };
4679
4707
  return {
4680
4708
  name: name.trim() || "Untitled Rule",
4681
4709
  description: description.trim() || void 0,
4682
4710
  enabled,
4683
4711
  priority,
4684
- status: wireStatus,
4712
+ // `paused` ships as-is — backend understands it natively (Fallback 2).
4713
+ status,
4685
4714
  validFrom,
4686
4715
  validUntil,
4687
4716
  tags,
4688
4717
  condition: conditionWithCombinator,
4689
- action: finalAction
4718
+ action: finalAction,
4719
+ recurrence: recurrencePayload
4690
4720
  };
4691
4721
  }
4692
4722
  async function submit() {
@@ -4730,11 +4760,9 @@ function RuleNewWizardPageView({
4730
4760
  labels.wizardStep4Subtitle,
4731
4761
  labels.wizardStep5Subtitle
4732
4762
  ];
4733
- const timelineSteps = stepTitles.map((title, idx) => ({
4763
+ const indicatorSteps = stepTitles.map((title, idx) => ({
4734
4764
  id: String(idx + 1),
4735
- name: title,
4736
- description: stepSubtitles[idx],
4737
- status: idx + 1 < step ? "complete" : idx + 1 === step ? "current" : "upcoming"
4765
+ title
4738
4766
  }));
4739
4767
  const counter = labels.wizardStepCounter.replace("{current}", String(step)).replace("{total}", String(TOTAL_STEPS3));
4740
4768
  const hero = /* @__PURE__ */ jsx(
@@ -4744,7 +4772,17 @@ function RuleNewWizardPageView({
4744
4772
  label: counter,
4745
4773
  title: labels.pageTitle,
4746
4774
  subtitle: stepSubtitles[step - 1] ?? labels.pageSubtitle,
4747
- gradient: "from-fuchsia-500 to-purple-700"
4775
+ gradient: "from-fuchsia-500 to-purple-700",
4776
+ children: /* @__PURE__ */ jsx(
4777
+ StepIndicator,
4778
+ {
4779
+ accent: "violet",
4780
+ currentStep: step - 1,
4781
+ onStepChange: (idx) => goToStep(idx + 1),
4782
+ progressLabel: labels.pageTitle,
4783
+ steps: indicatorSteps
4784
+ }
4785
+ )
4748
4786
  }
4749
4787
  );
4750
4788
  function renderStep1() {
@@ -5026,19 +5064,30 @@ function RuleNewWizardPageView({
5026
5064
  }
5027
5065
  )
5028
5066
  ] }),
5029
- /* @__PURE__ */ jsx(
5030
- FormInput,
5031
- {
5032
- label: labels.tagsLabel,
5033
- value: tagsInput,
5034
- onValueChange: (v) => {
5035
- setTagsInput(v);
5036
- markTouched();
5037
- },
5038
- placeholder: labels.tagsPlaceholder,
5039
- hint: labels.tagsHint
5040
- }
5041
- ),
5067
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
5068
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.tagsLabel }),
5069
+ /* @__PURE__ */ jsx(
5070
+ ChipPicker,
5071
+ {
5072
+ items: tagsItems,
5073
+ selectedIds: tagsSelected,
5074
+ onChange: (ids) => {
5075
+ setTagsSelected(ids);
5076
+ markTouched();
5077
+ },
5078
+ onItemsChange: (items) => {
5079
+ setTagsItems(items);
5080
+ markTouched();
5081
+ },
5082
+ allowCustom: true,
5083
+ unselectedStyle: tagsStyle,
5084
+ showActions: false,
5085
+ addPlaceholder: labels.tagsPlaceholder,
5086
+ addAriaLabel: labels.tagsLabel
5087
+ }
5088
+ ),
5089
+ /* @__PURE__ */ jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.tagsHint })
5090
+ ] }),
5042
5091
  /* @__PURE__ */ jsxs("div", { children: [
5043
5092
  /* @__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
5093
  /* @__PURE__ */ jsx(
@@ -5074,29 +5123,25 @@ function RuleNewWizardPageView({
5074
5123
  recurrence === "recurring" && /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
5075
5124
  /* @__PURE__ */ jsxs("div", { children: [
5076
5125
  /* @__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("div", { className: "flex flex-wrap gap-2", children: WEEKDAYS.map((d) => {
5078
- const selected = weekdays.includes(d.id);
5079
- const label = labels[d.labelKey] ?? d.id;
5080
- return /* @__PURE__ */ jsx(
5081
- "button",
5082
- {
5083
- type: "button",
5084
- "aria-pressed": selected,
5085
- onClick: () => {
5086
- setWeekdays(
5087
- (current) => current.includes(d.id) ? current.filter((id) => id !== d.id) : [...current, d.id]
5088
- );
5089
- markTouched();
5090
- },
5091
- className: [
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
5126
+ /* @__PURE__ */ jsx(
5127
+ ChipPicker,
5128
+ {
5129
+ items: WEEKDAYS.map((d) => ({
5130
+ id: d.id,
5131
+ name: labels[d.labelKey] ?? d.id,
5132
+ style: {
5133
+ bg: "bg-fuchsia-500/15",
5134
+ text: "text-fuchsia-700 dark:text-fuchsia-300"
5135
+ }
5136
+ })),
5137
+ selectedIds: weekdays,
5138
+ onChange: (ids) => {
5139
+ setWeekdays(ids);
5140
+ markTouched();
5096
5141
  },
5097
- d.id
5098
- );
5099
- }) })
5142
+ showActions: false
5143
+ }
5144
+ )
5100
5145
  ] }),
5101
5146
  /* @__PURE__ */ jsxs("div", { children: [
5102
5147
  /* @__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 +5297,10 @@ function RuleNewWizardPageView({
5252
5297
  if (step < TOTAL_STEPS3) goNext();
5253
5298
  else void submit();
5254
5299
  },
5255
- className: "space-y-5",
5300
+ className: "space-y-4",
5256
5301
  children: [
5257
- /* @__PURE__ */ jsx(
5258
- StepTimeline,
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
- ] })
5302
+ /* @__PURE__ */ jsx("div", { className: "liquid-surface rounded-2xl p-5 sm:p-8", children: stepBody }),
5303
+ footer
5269
5304
  ]
5270
5305
  }
5271
5306
  );