@burdenoff/microfe-botmanor 2026.1120.6 → 2026.1120.8
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/botlit/components/AssistantChannelPanel.js +3 -3
- package/dist/botlit/components/AssistantChannelPanel.js.map +1 -1
- package/dist/botlit/components/ChannelRoutesPanel.d.ts +9 -0
- package/dist/botlit/components/ChannelRoutesPanel.js +275 -0
- package/dist/botlit/components/ChannelRoutesPanel.js.map +1 -0
- package/dist/botlit/components/CreateChannelRouteDialog.d.ts +13 -0
- package/dist/botlit/components/CreateChannelRouteDialog.js +188 -0
- package/dist/botlit/components/CreateChannelRouteDialog.js.map +1 -0
- package/dist/botlit/components/DashboardUsagePanel.d.ts +8 -0
- package/dist/botlit/components/DashboardUsagePanel.js +277 -0
- package/dist/botlit/components/DashboardUsagePanel.js.map +1 -0
- package/dist/botlit/components/LiveIndicator.d.ts +9 -0
- package/dist/botlit/components/LiveIndicator.js +21 -0
- package/dist/botlit/components/LiveIndicator.js.map +1 -0
- package/dist/botlit/components/RunStatsCard.d.ts +9 -0
- package/dist/botlit/components/RunStatsCard.js +138 -0
- package/dist/botlit/components/RunStatsCard.js.map +1 -0
- package/dist/botlit/hooks/index.d.ts +3 -3
- package/dist/botlit/hooks/index.js +19 -19
- package/dist/botlit/hooks/useBots.d.ts +5 -0
- package/dist/botlit/hooks/useBots.js +63 -50
- package/dist/botlit/hooks/useBots.js.map +1 -1
- package/dist/botlit/hooks/useChannels.d.ts +49 -23
- package/dist/botlit/hooks/useChannels.js +141 -135
- package/dist/botlit/hooks/useChannels.js.map +1 -1
- package/dist/botlit/hooks/useExecutionLiveUpdates.d.ts +29 -0
- package/dist/botlit/hooks/useExecutionLiveUpdates.js +124 -0
- package/dist/botlit/hooks/useExecutionLiveUpdates.js.map +1 -0
- package/dist/botlit/hooks/useUsageStats.d.ts +71 -0
- package/dist/botlit/hooks/useUsageStats.js +115 -0
- package/dist/botlit/hooks/useUsageStats.js.map +1 -0
- package/dist/botlit/pages/AgentDetailPage.js +48 -43
- package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/BotChannelsTab.js +12 -3
- package/dist/botlit/pages/BotChannelsTab.js.map +1 -1
- package/dist/botlit/pages/BotDetailPage.js +317 -309
- package/dist/botlit/pages/BotDetailPage.js.map +1 -1
- package/dist/botlit/pages/ChannelDetailPage.js +642 -776
- package/dist/botlit/pages/ChannelDetailPage.js.map +1 -1
- package/dist/botlit/pages/ChannelRoutesPage.js +22 -208
- package/dist/botlit/pages/ChannelRoutesPage.js.map +1 -1
- package/dist/botlit/pages/ChannelsPage.js +314 -251
- package/dist/botlit/pages/ChannelsPage.js.map +1 -1
- package/dist/botlit/pages/DashboardPage.js +155 -153
- package/dist/botlit/pages/DashboardPage.js.map +1 -1
- package/dist/botlit/pages/ExecutionDetailPage.js +142 -132
- package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
- package/dist/botlit/pages/ExecutionsPage.js +150 -141
- package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
- package/dist/botlit/pages/PromptStudioPage.js +172 -172
- package/dist/botlit/pages/PromptStudioPage.js.map +1 -1
- package/dist/botlit/permissions/botmanorPermissions.d.ts +1 -0
- package/dist/botlit/permissions/botmanorPermissions.js +1 -0
- package/dist/botlit/permissions/botmanorPermissions.js.map +1 -1
- package/dist/botlit/utils/channelConnectors.d.ts +13 -0
- package/dist/botlit/utils/channelConnectors.js +21 -1
- package/dist/botlit/utils/channelConnectors.js.map +1 -1
- package/dist/botlit/utils/errors.d.ts +8 -0
- package/dist/botlit/utils/errors.js +21 -1
- package/dist/botlit/utils/errors.js.map +1 -1
- package/dist/botlit/utils/formatters.js +6 -2
- package/dist/botlit/utils/formatters.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +321 -12
- package/dist/generated/wspace-operations.js +188 -91
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +130 -0
- package/dist/generated/wspace-types.js +8 -4
- package/dist/generated/wspace-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,313 +3,376 @@ import { useTr as t } from "../../shared/hooks/useTr.js";
|
|
|
3
3
|
import { PageLayout as n } from "../components/PageLayout.js";
|
|
4
4
|
import { BOTMANOR_PERMISSIONS as r } from "../permissions/botmanorPermissions.js";
|
|
5
5
|
import { BotmanorPermissionGate as i } from "../permissions/useBotmanorPermissions.js";
|
|
6
|
-
import { Card as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Input as
|
|
9
|
-
import { Badge as
|
|
10
|
-
import { EmptyState as
|
|
11
|
-
import { ErrorState as
|
|
6
|
+
import { Card as ee, CardContent as te, CardDescription as a, CardHeader as o, CardTitle as s } from "../components/Card.js";
|
|
7
|
+
import { Button as c } from "../components/Button.js";
|
|
8
|
+
import { Input as l } from "../components/Input.js";
|
|
9
|
+
import { Badge as u, StatusBadge as ne } from "../components/Badge.js";
|
|
10
|
+
import { EmptyState as d } from "../components/EmptyState.js";
|
|
11
|
+
import { ErrorState as re } from "../components/ErrorState.js";
|
|
12
|
+
import { LoadMore as ie } from "../components/LoadMore.js";
|
|
13
|
+
import { ChannelRoutesPanel as ae } from "../components/ChannelRoutesPanel.js";
|
|
12
14
|
import "../hooks/index.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
+
import { useAllChannelRoutes as oe, useChannelConnectors as se, useChannelOverview as f } from "../hooks/useChannels.js";
|
|
16
|
+
import { formatRelativeTime as p } from "../utils/formatters.js";
|
|
17
|
+
import { channelTypeLabel as m } from "../utils/channelConnectors.js";
|
|
15
18
|
import "../permissions/index.js";
|
|
16
|
-
import { useMemo as
|
|
17
|
-
import { GlassCard as
|
|
18
|
-
import {
|
|
19
|
-
import { Link as
|
|
20
|
-
import {
|
|
19
|
+
import { useMemo as h, useRef as g, useState as _ } from "react";
|
|
20
|
+
import { GlassCard as v, PagePurpose as y } from "@burdenoff/fe-libs/ui";
|
|
21
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
22
|
+
import { Link as S, useSearchParams as ce } from "react-router";
|
|
23
|
+
import { Filter as le, Globe as C, Hash as w, MessageSquare as T, Plus as ue, Search as de, Slack as E, Webhook as D } from "lucide-react";
|
|
21
24
|
// src/botlit/pages/ChannelsPage.tsx
|
|
22
|
-
var
|
|
25
|
+
var O = ({ type: e, className: t }) => {
|
|
23
26
|
switch (e) {
|
|
24
|
-
case "SLACK": return /* @__PURE__ */
|
|
25
|
-
case "DISCORD": return /* @__PURE__ */
|
|
26
|
-
case "TEAMS": return /* @__PURE__ */ T
|
|
27
|
-
case "WEB_WIDGET": return /* @__PURE__ */
|
|
28
|
-
case "WEBHOOK": return /* @__PURE__ */
|
|
29
|
-
default: return /* @__PURE__ */ T
|
|
27
|
+
case "SLACK": return /* @__PURE__ */ b(E, { className: t });
|
|
28
|
+
case "DISCORD": return /* @__PURE__ */ b(w, { className: t });
|
|
29
|
+
case "TEAMS": return /* @__PURE__ */ b(T, { className: t });
|
|
30
|
+
case "WEB_WIDGET": return /* @__PURE__ */ b(C, { className: t });
|
|
31
|
+
case "WEBHOOK": return /* @__PURE__ */ b(D, { className: t });
|
|
32
|
+
default: return /* @__PURE__ */ b(T, { className: t });
|
|
30
33
|
}
|
|
31
|
-
},
|
|
32
|
-
|
|
34
|
+
}, k = ["connectors", "routes"], A = [
|
|
35
|
+
"WEB_WIDGET",
|
|
36
|
+
"SLACK",
|
|
37
|
+
"TEAMS",
|
|
38
|
+
"DISCORD",
|
|
39
|
+
"WHATSAPP",
|
|
40
|
+
"WEBHOOK",
|
|
41
|
+
"CUSTOM"
|
|
42
|
+
], j = [
|
|
43
|
+
"ACTIVE",
|
|
44
|
+
"DRAFT",
|
|
45
|
+
"DEPRECATED",
|
|
46
|
+
"ARCHIVED"
|
|
47
|
+
], M = "h-10 rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm", N = () => {
|
|
48
|
+
let C = t(), { getPath: w, navigateTo: E } = e(), [D, N] = ce(), P = D.get("tab") === "routes" ? "routes" : "connectors", F = g({
|
|
49
|
+
connectors: null,
|
|
50
|
+
routes: null
|
|
51
|
+
}), [I, L] = _(""), [R, z] = _(!1), [B, V] = _(""), [H, U] = _(""), fe = h(() => ({
|
|
52
|
+
search: I,
|
|
53
|
+
type: B ? [B] : void 0,
|
|
54
|
+
status: H ? [H] : void 0
|
|
55
|
+
}), [
|
|
56
|
+
I,
|
|
57
|
+
B,
|
|
58
|
+
H
|
|
59
|
+
]), { data: W, loading: G, error: K, refetch: pe, hasMore: me, loadingMore: he, loadMore: ge } = se(fe), { data: q, error: _e, refetch: J } = f(), { data: Y, loading: ve, error: X, refetch: ye } = oe(), Z = !ve && !X, be = h(() => {
|
|
33
60
|
let e = /* @__PURE__ */ new Map();
|
|
34
|
-
for (let t of
|
|
61
|
+
for (let t of Y) t.isActive && e.set(t.connectorId, (e.get(t.connectorId) ?? 0) + 1);
|
|
35
62
|
return e;
|
|
36
|
-
}, [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
63
|
+
}, [Y]), xe = !!(I.trim() || B || H), Se = q?.connectorCount === 0, Q = (e) => {
|
|
64
|
+
let t = new URLSearchParams(D);
|
|
65
|
+
e === "connectors" ? t.delete("tab") : t.set("tab", e), N(t, { replace: !0 });
|
|
66
|
+
}, Ce = (e, t) => {
|
|
67
|
+
let n = null;
|
|
68
|
+
if (e.key === "ArrowRight" ? n = (t + 1) % k.length : e.key === "ArrowLeft" ? n = (t - 1 + k.length) % k.length : e.key === "Home" ? n = 0 : e.key === "End" && (n = k.length - 1), n === null) return;
|
|
69
|
+
e.preventDefault();
|
|
70
|
+
let r = k[n];
|
|
71
|
+
Q(r), F.current[r]?.focus();
|
|
72
|
+
}, we = (e) => e === "connectors" ? q ? C("botlit.channels.tabs.connectorsCount", "Connectors ({{count}})", { count: q.connectorCount }) : C("botlit.channels.tabs.connectors", "Connectors") : q ? C("botlit.channels.tabs.routesCount", "Routes ({{active}} on of {{count}})", {
|
|
73
|
+
active: q.activeRouteCount,
|
|
74
|
+
count: q.routeCount
|
|
75
|
+
}) : C("botlit.channels.tabs.routes", "Routes"), $ = /* @__PURE__ */ b(i, {
|
|
76
|
+
permission: r.CHANNEL_CREATE,
|
|
77
|
+
children: /* @__PURE__ */ b(c, {
|
|
78
|
+
leftIcon: /* @__PURE__ */ b(ue, { size: 16 }),
|
|
79
|
+
onClick: () => E("channels/new"),
|
|
80
|
+
children: C("botlit.channels.actions.addChannel", "Add Channel")
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
return /* @__PURE__ */ b(n, {
|
|
84
|
+
title: C("botlit.channels.title", "Channels"),
|
|
85
|
+
description: C("botlit.channels.description", "Connect agents to messaging platforms and configure routing"),
|
|
86
|
+
actions: /* @__PURE__ */ x("div", {
|
|
41
87
|
className: "flex gap-2",
|
|
42
|
-
children: [/* @__PURE__ */
|
|
88
|
+
children: [/* @__PURE__ */ b(c, {
|
|
43
89
|
variant: "outline",
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
})
|
|
48
|
-
}), /* @__PURE__ */ T(i, {
|
|
49
|
-
permission: r.CHANNEL_CREATE,
|
|
50
|
-
children: /* @__PURE__ */ T(u, {
|
|
51
|
-
leftIcon: /* @__PURE__ */ T(N, { size: 16 }),
|
|
52
|
-
children: /* @__PURE__ */ T(D, {
|
|
53
|
-
to: j("channels/new"),
|
|
54
|
-
children: A("botlit.channels.actions.addChannel", "Add Channel")
|
|
55
|
-
})
|
|
56
|
-
})
|
|
57
|
-
})]
|
|
90
|
+
onClick: () => E("channels/routes"),
|
|
91
|
+
children: C("botlit.channels.actions.viewRoutes", "View Routes")
|
|
92
|
+
}), !(P === "connectors" && Se) && $]
|
|
58
93
|
}),
|
|
59
|
-
children: /* @__PURE__ */
|
|
94
|
+
children: /* @__PURE__ */ x("div", {
|
|
60
95
|
className: "space-y-6",
|
|
61
96
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
icon: /* @__PURE__ */ T
|
|
64
|
-
children:
|
|
97
|
+
/* @__PURE__ */ b(y, {
|
|
98
|
+
icon: /* @__PURE__ */ b(T, { size: 18 }),
|
|
99
|
+
children: C("botlit.channels.purpose", "Channels are where your bots actually talk to people. Connect a messaging platform — a website chat widget, Slack, Microsoft Teams, Discord, WhatsApp or a custom webhook — then add a route that points an incoming location at the bot that should answer. Use this page to manage those connectors and routing rules in one place.")
|
|
65
100
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
className:
|
|
71
|
-
children:
|
|
72
|
-
|
|
73
|
-
" (",
|
|
74
|
-
H.length,
|
|
75
|
-
")"
|
|
76
|
-
]
|
|
77
|
-
}), /* @__PURE__ */ E("button", {
|
|
78
|
-
onClick: () => B("routes"),
|
|
79
|
-
className: `px-4 py-2 text-sm font-medium border-b-2 transition-colors ${z === "routes" ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"}`,
|
|
80
|
-
children: [
|
|
81
|
-
A("botlit.channels.tabs.routes", "Routes"),
|
|
82
|
-
" (",
|
|
83
|
-
K.length,
|
|
84
|
-
")"
|
|
85
|
-
]
|
|
86
|
-
})]
|
|
87
|
-
}),
|
|
88
|
-
/* @__PURE__ */ E("div", {
|
|
89
|
-
className: "flex items-center gap-4",
|
|
90
|
-
children: [/* @__PURE__ */ E("div", {
|
|
91
|
-
className: "relative flex-1 max-w-md",
|
|
92
|
-
children: [/* @__PURE__ */ T(P, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ T(d, {
|
|
93
|
-
placeholder: A("botlit.channels.searchPlaceholder", "Search {{tab}}...", { tab: z }),
|
|
94
|
-
value: I,
|
|
95
|
-
onChange: (e) => L(e.target.value),
|
|
96
|
-
className: "pl-9"
|
|
97
|
-
})]
|
|
98
|
-
}), /* @__PURE__ */ T(u, {
|
|
101
|
+
_e && /* @__PURE__ */ x("div", {
|
|
102
|
+
role: "alert",
|
|
103
|
+
className: "flex flex-wrap items-center justify-between gap-3 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle px-4 py-3 text-sm",
|
|
104
|
+
children: [/* @__PURE__ */ b("span", {
|
|
105
|
+
className: "text-text-primary",
|
|
106
|
+
children: C("botlit.channels.errors.overview", "Channel totals could not be loaded.")
|
|
107
|
+
}), /* @__PURE__ */ b(c, {
|
|
99
108
|
variant: "outline",
|
|
100
|
-
|
|
101
|
-
|
|
109
|
+
size: "sm",
|
|
110
|
+
onClick: () => void J(),
|
|
111
|
+
children: C("botlit.common.retry", "Retry")
|
|
102
112
|
})]
|
|
103
113
|
}),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
children: [/* @__PURE__ */ T("div", {
|
|
126
|
-
className: "p-2 bg-action-primary-bg/10 rounded-lg",
|
|
127
|
-
children: /* @__PURE__ */ T(R, {
|
|
128
|
-
type: e.type,
|
|
129
|
-
className: "h-5 w-5 text-primary"
|
|
130
|
-
})
|
|
131
|
-
}), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(l, {
|
|
132
|
-
className: "text-base",
|
|
133
|
-
children: e.name
|
|
134
|
-
}), /* @__PURE__ */ T(s, {
|
|
135
|
-
className: "text-xs",
|
|
136
|
-
children: e.description
|
|
137
|
-
})] })]
|
|
138
|
-
}), /* @__PURE__ */ T(p, { status: e.status })]
|
|
139
|
-
}) }), /* @__PURE__ */ T(o, { children: /* @__PURE__ */ E("div", {
|
|
140
|
-
className: "space-y-3",
|
|
141
|
-
children: [
|
|
142
|
-
/* @__PURE__ */ E("div", {
|
|
143
|
-
className: "flex items-center justify-between",
|
|
144
|
-
children: [/* @__PURE__ */ T("span", {
|
|
145
|
-
className: "text-sm text-text-secondary",
|
|
146
|
-
children: A("botlit.channels.list.type", "Type")
|
|
147
|
-
}), /* @__PURE__ */ T(f, {
|
|
148
|
-
variant: "outline",
|
|
149
|
-
className: "capitalize",
|
|
150
|
-
children: e.type.toLowerCase().replace("_", " ")
|
|
151
|
-
})]
|
|
152
|
-
}),
|
|
153
|
-
/* @__PURE__ */ E("div", {
|
|
154
|
-
className: "flex items-center justify-between",
|
|
155
|
-
children: [/* @__PURE__ */ T("span", {
|
|
156
|
-
className: "text-sm text-text-secondary",
|
|
157
|
-
children: A("botlit.channels.list.activeRoutes", "Active Routes")
|
|
158
|
-
}), /* @__PURE__ */ T(f, {
|
|
159
|
-
variant: "secondary",
|
|
160
|
-
children: X.get(e.id) ?? 0
|
|
161
|
-
})]
|
|
162
|
-
}),
|
|
163
|
-
/* @__PURE__ */ E("div", {
|
|
164
|
-
className: "pt-3 border-t border-border-subtle text-xs text-text-secondary",
|
|
165
|
-
children: [
|
|
166
|
-
A("botlit.botsList.createdLabel", "Created"),
|
|
167
|
-
" ",
|
|
168
|
-
g(e.createdAt)
|
|
169
|
-
]
|
|
170
|
-
})
|
|
171
|
-
]
|
|
172
|
-
}) })]
|
|
173
|
-
})
|
|
174
|
-
}, e.id))
|
|
175
|
-
}) : /* @__PURE__ */ T(m, {
|
|
176
|
-
illustration: "empty-notifications",
|
|
177
|
-
title: A("botlit.channels.empty.connectors.title", "No channel connectors"),
|
|
178
|
-
description: A("botlit.channels.empty.connectors.description", "Connect messaging platforms to deploy agents across multiple channels."),
|
|
179
|
-
action: /* @__PURE__ */ T(i, {
|
|
180
|
-
permission: r.CHANNEL_CREATE,
|
|
181
|
-
children: /* @__PURE__ */ T(u, {
|
|
182
|
-
leftIcon: /* @__PURE__ */ T(N, { size: 16 }),
|
|
183
|
-
children: /* @__PURE__ */ T(D, {
|
|
184
|
-
to: j("channels/new"),
|
|
185
|
-
children: A("botlit.channels.actions.addChannel", "Add Channel")
|
|
186
|
-
})
|
|
187
|
-
})
|
|
114
|
+
/* @__PURE__ */ b("div", {
|
|
115
|
+
role: "tablist",
|
|
116
|
+
"aria-label": C("botlit.channels.tabs.label", "Channels sections"),
|
|
117
|
+
className: "flex gap-1 border-b border-border-subtle",
|
|
118
|
+
children: k.map((e, t) => {
|
|
119
|
+
let n = P === e;
|
|
120
|
+
return /* @__PURE__ */ b("button", {
|
|
121
|
+
ref: (t) => {
|
|
122
|
+
F.current[e] = t;
|
|
123
|
+
},
|
|
124
|
+
type: "button",
|
|
125
|
+
role: "tab",
|
|
126
|
+
id: `channels-tab-${e}`,
|
|
127
|
+
"aria-selected": n,
|
|
128
|
+
"aria-controls": `channels-panel-${e}`,
|
|
129
|
+
tabIndex: n ? 0 : -1,
|
|
130
|
+
onClick: () => Q(e),
|
|
131
|
+
onKeyDown: (e) => Ce(e, t),
|
|
132
|
+
className: `px-4 py-2 text-sm font-medium border-b-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary ${n ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"}`,
|
|
133
|
+
children: we(e)
|
|
134
|
+
}, e);
|
|
188
135
|
})
|
|
189
|
-
})
|
|
190
|
-
|
|
191
|
-
|
|
136
|
+
}),
|
|
137
|
+
P === "connectors" && /* @__PURE__ */ x("div", {
|
|
138
|
+
role: "tabpanel",
|
|
139
|
+
id: "channels-panel-connectors",
|
|
140
|
+
"aria-labelledby": "channels-tab-connectors",
|
|
141
|
+
className: "space-y-6",
|
|
192
142
|
children: [
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
className: "flex items-center justify-between",
|
|
207
|
-
children: [/* @__PURE__ */ T("div", {
|
|
208
|
-
className: "flex items-center gap-4",
|
|
209
|
-
children: /* @__PURE__ */ E("div", {
|
|
210
|
-
className: "flex items-center gap-2 text-sm",
|
|
211
|
-
children: [
|
|
212
|
-
/* @__PURE__ */ T(f, {
|
|
213
|
-
variant: "outline",
|
|
214
|
-
children: _(e, "locationName") ?? e.locationId
|
|
215
|
-
}),
|
|
216
|
-
/* @__PURE__ */ T(O, {
|
|
217
|
-
size: 16,
|
|
218
|
-
className: "text-text-secondary"
|
|
219
|
-
}),
|
|
220
|
-
/* @__PURE__ */ T(f, {
|
|
221
|
-
variant: "secondary",
|
|
222
|
-
children: _(e, "appName") ?? e.appId ?? "—"
|
|
223
|
-
})
|
|
224
|
-
]
|
|
225
|
-
})
|
|
226
|
-
}), /* @__PURE__ */ E("div", {
|
|
227
|
-
className: "flex items-center gap-2",
|
|
228
|
-
children: [/* @__PURE__ */ T("span", {
|
|
229
|
-
className: "text-xs text-text-secondary",
|
|
230
|
-
children: g(e.createdAt)
|
|
231
|
-
}), /* @__PURE__ */ T(i, {
|
|
232
|
-
permission: r.CHANNEL_UPDATE,
|
|
233
|
-
children: /* @__PURE__ */ T(u, {
|
|
234
|
-
variant: "ghost",
|
|
235
|
-
size: "icon",
|
|
236
|
-
children: /* @__PURE__ */ T(F, { size: 16 })
|
|
237
|
-
})
|
|
143
|
+
/* @__PURE__ */ x("div", {
|
|
144
|
+
className: "flex flex-wrap items-center gap-4",
|
|
145
|
+
children: [/* @__PURE__ */ x("div", {
|
|
146
|
+
className: "relative flex-1 max-w-md",
|
|
147
|
+
children: [/* @__PURE__ */ b(de, {
|
|
148
|
+
"aria-hidden": "true",
|
|
149
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary"
|
|
150
|
+
}), /* @__PURE__ */ b(l, {
|
|
151
|
+
"aria-label": C("botlit.channels.searchConnectors", "Search connectors"),
|
|
152
|
+
placeholder: C("botlit.channels.searchConnectorsPlaceholder", "Search connectors..."),
|
|
153
|
+
value: I,
|
|
154
|
+
onChange: (e) => L(e.target.value),
|
|
155
|
+
className: "pl-9"
|
|
238
156
|
})]
|
|
157
|
+
}), /* @__PURE__ */ b(c, {
|
|
158
|
+
variant: "outline",
|
|
159
|
+
leftIcon: /* @__PURE__ */ b(le, { size: 16 }),
|
|
160
|
+
"aria-expanded": R,
|
|
161
|
+
"aria-controls": "channels-connector-filters",
|
|
162
|
+
onClick: () => z((e) => !e),
|
|
163
|
+
children: C("botlit.channels.filters.filters", "Filters")
|
|
239
164
|
})]
|
|
165
|
+
}),
|
|
166
|
+
R && /* @__PURE__ */ x("div", {
|
|
167
|
+
id: "channels-connector-filters",
|
|
168
|
+
className: "flex flex-wrap items-end gap-4",
|
|
169
|
+
children: [
|
|
170
|
+
/* @__PURE__ */ x("label", {
|
|
171
|
+
className: "grid gap-1 text-xs text-text-secondary",
|
|
172
|
+
children: [C("botlit.channels.filters.type", "Type"), /* @__PURE__ */ x("select", {
|
|
173
|
+
className: M,
|
|
174
|
+
value: B,
|
|
175
|
+
onChange: (e) => V(e.target.value),
|
|
176
|
+
children: [/* @__PURE__ */ b("option", {
|
|
177
|
+
value: "",
|
|
178
|
+
children: C("botlit.channels.filters.allTypes", "All types")
|
|
179
|
+
}), A.map((e) => /* @__PURE__ */ b("option", {
|
|
180
|
+
value: e,
|
|
181
|
+
children: m(e, C)
|
|
182
|
+
}, e))]
|
|
183
|
+
})]
|
|
184
|
+
}),
|
|
185
|
+
/* @__PURE__ */ x("label", {
|
|
186
|
+
className: "grid gap-1 text-xs text-text-secondary",
|
|
187
|
+
children: [C("botlit.channels.filters.status", "Status"), /* @__PURE__ */ x("select", {
|
|
188
|
+
className: M,
|
|
189
|
+
value: H,
|
|
190
|
+
onChange: (e) => U(e.target.value),
|
|
191
|
+
children: [/* @__PURE__ */ b("option", {
|
|
192
|
+
value: "",
|
|
193
|
+
children: C("botlit.channels.filters.allStatuses", "All statuses")
|
|
194
|
+
}), j.map((e) => /* @__PURE__ */ b("option", {
|
|
195
|
+
value: e,
|
|
196
|
+
children: C(`botlit.status.${e.toLowerCase()}`, e.charAt(0) + e.slice(1).toLowerCase())
|
|
197
|
+
}, e))]
|
|
198
|
+
})]
|
|
199
|
+
}),
|
|
200
|
+
(B || H) && /* @__PURE__ */ b(c, {
|
|
201
|
+
variant: "ghost",
|
|
202
|
+
size: "sm",
|
|
203
|
+
onClick: () => {
|
|
204
|
+
V(""), U("");
|
|
205
|
+
},
|
|
206
|
+
children: C("botlit.channels.filters.clear", "Clear filters")
|
|
207
|
+
})
|
|
208
|
+
]
|
|
209
|
+
}),
|
|
210
|
+
G ? /* @__PURE__ */ b("div", {
|
|
211
|
+
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
212
|
+
children: [
|
|
213
|
+
1,
|
|
214
|
+
2,
|
|
215
|
+
3
|
|
216
|
+
].map((e) => /* @__PURE__ */ b("div", { className: "h-48 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
|
|
217
|
+
}) : K ? /* @__PURE__ */ b(re, {
|
|
218
|
+
resource: C("botlit.channels.resource", "channel connectors"),
|
|
219
|
+
error: K,
|
|
220
|
+
onRetry: () => void pe()
|
|
221
|
+
}) : W.length > 0 ? /* @__PURE__ */ b("div", {
|
|
222
|
+
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
223
|
+
children: W.map((e) => /* @__PURE__ */ b(S, {
|
|
224
|
+
to: w(`channels/${e.id}`),
|
|
225
|
+
className: "rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
226
|
+
children: /* @__PURE__ */ x(ee, {
|
|
227
|
+
className: "h-full hover:border-primary/50 transition-colors cursor-pointer",
|
|
228
|
+
children: [/* @__PURE__ */ b(o, { children: /* @__PURE__ */ x("div", {
|
|
229
|
+
className: "flex items-start justify-between",
|
|
230
|
+
children: [/* @__PURE__ */ x("div", {
|
|
231
|
+
className: "flex items-center gap-3",
|
|
232
|
+
children: [/* @__PURE__ */ b("div", {
|
|
233
|
+
className: "p-2 bg-action-primary-bg/10 rounded-lg",
|
|
234
|
+
children: /* @__PURE__ */ b(O, {
|
|
235
|
+
type: e.type,
|
|
236
|
+
className: "h-5 w-5 text-primary"
|
|
237
|
+
})
|
|
238
|
+
}), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b(s, {
|
|
239
|
+
className: "text-base",
|
|
240
|
+
children: e.name
|
|
241
|
+
}), /* @__PURE__ */ b(a, {
|
|
242
|
+
className: "text-xs",
|
|
243
|
+
children: e.description
|
|
244
|
+
})] })]
|
|
245
|
+
}), /* @__PURE__ */ b(ne, { status: e.status })]
|
|
246
|
+
}) }), /* @__PURE__ */ b(te, { children: /* @__PURE__ */ x("div", {
|
|
247
|
+
className: "space-y-3",
|
|
248
|
+
children: [
|
|
249
|
+
/* @__PURE__ */ x("div", {
|
|
250
|
+
className: "flex items-center justify-between",
|
|
251
|
+
children: [/* @__PURE__ */ b("span", {
|
|
252
|
+
className: "text-sm text-text-secondary",
|
|
253
|
+
children: C("botlit.channels.list.type", "Type")
|
|
254
|
+
}), /* @__PURE__ */ b(u, {
|
|
255
|
+
variant: "outline",
|
|
256
|
+
children: m(e.type, C)
|
|
257
|
+
})]
|
|
258
|
+
}),
|
|
259
|
+
/* @__PURE__ */ x("div", {
|
|
260
|
+
className: "flex items-center justify-between",
|
|
261
|
+
children: [/* @__PURE__ */ b("span", {
|
|
262
|
+
className: "text-sm text-text-secondary",
|
|
263
|
+
children: C("botlit.channels.list.activeRoutes", "Active Routes")
|
|
264
|
+
}), /* @__PURE__ */ b(u, {
|
|
265
|
+
variant: "secondary",
|
|
266
|
+
title: Z ? void 0 : X ? C("botlit.channels.list.routeCountUnavailable", "Routes could not be loaded") : C("botlit.common.loading", "Loading..."),
|
|
267
|
+
children: Z ? be.get(e.id) ?? 0 : "—"
|
|
268
|
+
})]
|
|
269
|
+
}),
|
|
270
|
+
e.unroutedMessageCount > 0 && /* @__PURE__ */ x("div", {
|
|
271
|
+
className: "flex items-center justify-between",
|
|
272
|
+
children: [/* @__PURE__ */ b("span", {
|
|
273
|
+
className: "text-sm text-text-secondary",
|
|
274
|
+
children: C("botlit.channels.list.unrouted", "Unanswered messages")
|
|
275
|
+
}), /* @__PURE__ */ b(u, {
|
|
276
|
+
variant: "warning",
|
|
277
|
+
children: e.unroutedMessageCount
|
|
278
|
+
})]
|
|
279
|
+
}),
|
|
280
|
+
/* @__PURE__ */ b("div", {
|
|
281
|
+
className: "pt-3 border-t border-border-subtle text-xs text-text-secondary",
|
|
282
|
+
children: C("botlit.channels.list.created", "Created {{when}}", { when: p(e.createdAt) })
|
|
283
|
+
})
|
|
284
|
+
]
|
|
285
|
+
}) })]
|
|
286
|
+
})
|
|
287
|
+
}, e.id))
|
|
288
|
+
}) : xe ? /* @__PURE__ */ b(d, {
|
|
289
|
+
illustration: "empty-search",
|
|
290
|
+
title: C("botlit.channels.empty.filtered.title", "No connectors match"),
|
|
291
|
+
description: C("botlit.channels.empty.filtered.description", "No connector matches the search and filters. Change or clear them.")
|
|
292
|
+
}) : /* @__PURE__ */ b(d, {
|
|
293
|
+
illustration: "empty-notifications",
|
|
294
|
+
title: C("botlit.channels.empty.connectors.title", "No channel connectors"),
|
|
295
|
+
description: C("botlit.channels.empty.connectors.description", "Connect messaging platforms to deploy agents across multiple channels."),
|
|
296
|
+
action: $
|
|
297
|
+
}),
|
|
298
|
+
/* @__PURE__ */ b(ie, {
|
|
299
|
+
hasMore: me && !G,
|
|
300
|
+
loadingMore: he,
|
|
301
|
+
onLoadMore: () => void ge(),
|
|
302
|
+
loadedCount: W.length
|
|
240
303
|
})
|
|
241
|
-
|
|
242
|
-
})
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
304
|
+
]
|
|
305
|
+
}),
|
|
306
|
+
P === "routes" && /* @__PURE__ */ b("div", {
|
|
307
|
+
role: "tabpanel",
|
|
308
|
+
id: "channels-panel-routes",
|
|
309
|
+
"aria-labelledby": "channels-tab-routes",
|
|
310
|
+
children: /* @__PURE__ */ b(ae, {
|
|
311
|
+
showSummary: !1,
|
|
312
|
+
onRoutesChanged: () => {
|
|
313
|
+
J(), ye();
|
|
314
|
+
}
|
|
252
315
|
})
|
|
253
|
-
})
|
|
254
|
-
/* @__PURE__ */
|
|
316
|
+
}),
|
|
317
|
+
/* @__PURE__ */ x(v, {
|
|
255
318
|
treatment: "glass",
|
|
256
319
|
glow: !0,
|
|
257
320
|
className: "p-6",
|
|
258
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ x("div", {
|
|
259
322
|
className: "mb-4",
|
|
260
|
-
children: [/* @__PURE__ */
|
|
323
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
261
324
|
className: "text-lg font-semibold tracking-tight text-text-primary",
|
|
262
|
-
children:
|
|
263
|
-
}), /* @__PURE__ */
|
|
325
|
+
children: C("botlit.channels.integrations.title", "Available Integrations")
|
|
326
|
+
}), /* @__PURE__ */ b("p", {
|
|
264
327
|
className: "text-sm text-text-secondary",
|
|
265
|
-
children:
|
|
328
|
+
children: C("botlit.channels.integrations.description", "Connect to popular messaging platforms")
|
|
266
329
|
})]
|
|
267
|
-
}), /* @__PURE__ */
|
|
330
|
+
}), /* @__PURE__ */ b("div", {
|
|
268
331
|
className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4",
|
|
269
332
|
children: [
|
|
270
333
|
{
|
|
271
334
|
type: "WEB_WIDGET",
|
|
272
|
-
name:
|
|
273
|
-
desc:
|
|
335
|
+
name: C("botlit.channels.integrations.webWidget", "Web Widget"),
|
|
336
|
+
desc: C("botlit.channels.integrations.webWidgetDesc", "Embed on websites")
|
|
274
337
|
},
|
|
275
338
|
{
|
|
276
339
|
type: "SLACK",
|
|
277
|
-
name:
|
|
278
|
-
desc:
|
|
340
|
+
name: C("botlit.channels.integrations.slack", "Slack"),
|
|
341
|
+
desc: C("botlit.channels.integrations.slackDesc", "Workspace integration")
|
|
279
342
|
},
|
|
280
343
|
{
|
|
281
344
|
type: "TEAMS",
|
|
282
|
-
name:
|
|
283
|
-
desc:
|
|
345
|
+
name: C("botlit.channels.integrations.teams", "MS Teams"),
|
|
346
|
+
desc: C("botlit.channels.integrations.teamsDesc", "Teams app")
|
|
284
347
|
},
|
|
285
348
|
{
|
|
286
349
|
type: "DISCORD",
|
|
287
|
-
name:
|
|
288
|
-
desc:
|
|
350
|
+
name: C("botlit.channels.integrations.discord", "Discord"),
|
|
351
|
+
desc: C("botlit.channels.integrations.discordDesc", "Bot integration")
|
|
289
352
|
},
|
|
290
353
|
{
|
|
291
354
|
type: "WHATSAPP",
|
|
292
|
-
name:
|
|
293
|
-
desc:
|
|
355
|
+
name: C("botlit.channels.integrations.whatsapp", "WhatsApp"),
|
|
356
|
+
desc: C("botlit.channels.integrations.whatsappDesc", "Business API")
|
|
294
357
|
},
|
|
295
358
|
{
|
|
296
359
|
type: "WEBHOOK",
|
|
297
|
-
name:
|
|
298
|
-
desc:
|
|
360
|
+
name: C("botlit.channels.integrations.webhook", "Webhook"),
|
|
361
|
+
desc: C("botlit.channels.integrations.webhookDesc", "Custom integration")
|
|
299
362
|
}
|
|
300
|
-
].map((e) => /* @__PURE__ */
|
|
301
|
-
to:
|
|
363
|
+
].map((e) => /* @__PURE__ */ x(S, {
|
|
364
|
+
to: w(`channels/new?type=${e.type}`),
|
|
302
365
|
className: "p-4 text-center border border-border-subtle rounded-lg hover:bg-accent transition-colors",
|
|
303
366
|
children: [
|
|
304
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ b(O, {
|
|
305
368
|
type: e.type,
|
|
306
369
|
className: "h-8 w-8 mx-auto text-text-secondary"
|
|
307
370
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ b("p", {
|
|
309
372
|
className: "mt-2 font-medium text-sm",
|
|
310
373
|
children: e.name
|
|
311
374
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ b("p", {
|
|
313
376
|
className: "text-xs text-text-secondary",
|
|
314
377
|
children: e.desc
|
|
315
378
|
})
|
|
@@ -321,6 +384,6 @@ var R = ({ type: e, className: t }) => {
|
|
|
321
384
|
})
|
|
322
385
|
});
|
|
323
386
|
};
|
|
324
|
-
export {
|
|
387
|
+
export { N as ChannelsPage };
|
|
325
388
|
|
|
326
389
|
//# sourceMappingURL=ChannelsPage.js.map
|