@burdenoff/microfe-botmanor 2026.1127.1 → 2026.1127.3
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/BotlitRoutes.js +31 -24
- package/dist/botlit/BotlitRoutes.js.map +1 -1
- package/dist/botlit/BotmanorRootInner.js +45 -44
- package/dist/botlit/BotmanorRootInner.js.map +1 -1
- package/dist/botlit/components/AgentA2APanel.js +63 -62
- package/dist/botlit/components/AgentA2APanel.js.map +1 -1
- package/dist/botlit/components/AgentBindingsPanel.js +125 -124
- package/dist/botlit/components/AgentBindingsPanel.js.map +1 -1
- package/dist/botlit/components/AgentFallbackModelsPicker.js +56 -55
- package/dist/botlit/components/AgentFallbackModelsPicker.js.map +1 -1
- package/dist/botlit/components/AiOperationsPanel.js.map +1 -1
- package/dist/botlit/components/AssistantChannelPanel.js +40 -39
- package/dist/botlit/components/AssistantChannelPanel.js.map +1 -1
- package/dist/botlit/components/AssistantRuntimeSetupPanel.js +36 -35
- package/dist/botlit/components/AssistantRuntimeSetupPanel.js.map +1 -1
- package/dist/botlit/components/BotAgentsPanel.js +104 -103
- package/dist/botlit/components/BotAgentsPanel.js.map +1 -1
- package/dist/botlit/components/BotFormFields.js +118 -117
- package/dist/botlit/components/BotFormFields.js.map +1 -1
- package/dist/botlit/components/BucketDialogs.js +110 -110
- package/dist/botlit/components/BucketDialogs.js.map +1 -1
- package/dist/botlit/components/ChannelRoutesPanel.js +29 -28
- package/dist/botlit/components/ChannelRoutesPanel.js.map +1 -1
- package/dist/botlit/components/CreateChannelRouteDialog.js +105 -105
- package/dist/botlit/components/CreateChannelRouteDialog.js.map +1 -1
- package/dist/botlit/components/DescribeBotDialog.js +86 -86
- package/dist/botlit/components/DescribeBotDialog.js.map +1 -1
- package/dist/botlit/components/EmptyState.d.ts +8 -0
- package/dist/botlit/components/EmptyState.js +43 -30
- package/dist/botlit/components/EmptyState.js.map +1 -1
- package/dist/botlit/components/HandoffConfigPanel.js +125 -124
- package/dist/botlit/components/HandoffConfigPanel.js.map +1 -1
- package/dist/botlit/components/HandoffTargetPickers.js +42 -41
- package/dist/botlit/components/HandoffTargetPickers.js.map +1 -1
- package/dist/botlit/components/KnowledgeBackendMigrationPanel.js +106 -105
- package/dist/botlit/components/KnowledgeBackendMigrationPanel.js.map +1 -1
- package/dist/botlit/components/KnowledgeRetrievalTestPanel.js +76 -75
- package/dist/botlit/components/KnowledgeRetrievalTestPanel.js.map +1 -1
- package/dist/botlit/components/KnowledgeSourceImportPanel.js +76 -75
- package/dist/botlit/components/KnowledgeSourceImportPanel.js.map +1 -1
- package/dist/botlit/components/ModelRegistrationPanel.js +70 -69
- package/dist/botlit/components/ModelRegistrationPanel.js.map +1 -1
- package/dist/botlit/components/StorePackageDraftCard.js +87 -86
- package/dist/botlit/components/StorePackageDraftCard.js.map +1 -1
- package/dist/botlit/components/SuggestionsPanel.js.map +1 -1
- package/dist/botlit/hooks/useLLMProviders.d.ts +1 -1
- package/dist/botlit/hooks/useLLMProviders.js.map +1 -1
- package/dist/botlit/hooks/useMCPServers.d.ts +1 -1
- package/dist/botlit/hooks/useMCPServers.js.map +1 -1
- package/dist/botlit/pages/A2AAgentDetailPage.js +263 -262
- package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/A2ARegistryPage.js +47 -46
- package/dist/botlit/pages/A2ARegistryPage.js.map +1 -1
- package/dist/botlit/pages/AgentBuilderPage.js +426 -425
- package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
- package/dist/botlit/pages/AgentDetailPage.js +1 -0
- package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/AgentsListPage.js +248 -247
- package/dist/botlit/pages/AgentsListPage.js.map +1 -1
- package/dist/botlit/pages/BotChannelsTab.js +324 -310
- package/dist/botlit/pages/BotChannelsTab.js.map +1 -1
- package/dist/botlit/pages/BotDetailPage.js +1 -0
- package/dist/botlit/pages/BotDetailPage.js.map +1 -1
- package/dist/botlit/pages/BotWorkflowTab.js +126 -121
- package/dist/botlit/pages/BotWorkflowTab.js.map +1 -1
- package/dist/botlit/pages/BotsListPage.js +1 -0
- package/dist/botlit/pages/BotsListPage.js.map +1 -1
- package/dist/botlit/pages/BucketDetailPage.js +1 -0
- package/dist/botlit/pages/BucketDetailPage.js.map +1 -1
- package/dist/botlit/pages/BucketsPage.js +1 -0
- package/dist/botlit/pages/BucketsPage.js.map +1 -1
- package/dist/botlit/pages/ChannelDetailPage.js +267 -266
- package/dist/botlit/pages/ChannelDetailPage.js.map +1 -1
- package/dist/botlit/pages/ChannelsPage.js +187 -186
- package/dist/botlit/pages/ChannelsPage.js.map +1 -1
- package/dist/botlit/pages/ChatPage.js +69 -68
- package/dist/botlit/pages/ChatPage.js.map +1 -1
- package/dist/botlit/pages/ExecutionDetailPage.js +1 -0
- package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
- package/dist/botlit/pages/ExecutionsPage.js +191 -191
- package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
- package/dist/botlit/pages/HandoffsPage.js +65 -64
- package/dist/botlit/pages/HandoffsPage.js.map +1 -1
- package/dist/botlit/pages/InstalledPackagesPage.js +146 -145
- package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -1
- package/dist/botlit/pages/KnowledgeBaseDetailPage.js +235 -234
- package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
- package/dist/botlit/pages/KnowledgeBasesPage.js +152 -151
- package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
- package/dist/botlit/pages/MCPServerDetailPage.js +183 -182
- package/dist/botlit/pages/MCPServerDetailPage.js.map +1 -1
- package/dist/botlit/pages/MCPServersPage.js +145 -145
- package/dist/botlit/pages/MCPServersPage.js.map +1 -1
- package/dist/botlit/pages/PoliciesPage.js.map +1 -1
- package/dist/botlit/pages/PolicyDetailPage.js +293 -292
- package/dist/botlit/pages/PolicyDetailPage.js.map +1 -1
- package/dist/botlit/pages/PromptStudioPage.js +229 -229
- package/dist/botlit/pages/PromptStudioPage.js.map +1 -1
- package/dist/botlit/pages/PromptTemplateDetailPage.js +280 -279
- package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -1
- package/dist/botlit/pages/PromptTemplatesPage.js +31 -30
- package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -1
- package/dist/botlit/pages/RetrievalProfileDetailPage.js +204 -203
- package/dist/botlit/pages/RetrievalProfileDetailPage.js.map +1 -1
- package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -1
- package/dist/botlit/pages/SettingsPage.js +153 -153
- package/dist/botlit/pages/SettingsPage.js.map +1 -1
- package/dist/botlit/pages/SkillDetailPage.js +305 -304
- package/dist/botlit/pages/SkillDetailPage.js.map +1 -1
- package/dist/botlit/pages/SkillsPage.js.map +1 -1
- package/dist/botlit/pages/StorePackageDetailPage.js +1 -0
- package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -1
- package/dist/botlit/pages/StorePage.js +173 -173
- package/dist/botlit/pages/StorePage.js.map +1 -1
- package/dist/botlit/permissions/PermissionRequired.d.ts +2 -0
- package/dist/botlit/permissions/PermissionRequired.js +6 -6
- package/dist/botlit/permissions/PermissionRequired.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/confirmAction.d.ts +13 -11
- package/dist/botlit/utils/confirmAction.js +26 -4
- package/dist/botlit/utils/confirmAction.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +6 -6
- package/dist/generated/wspace-operations.js +6 -6
- package/dist/generated/wspace-operations.js.map +1 -1
- package/package.json +3 -3
|
@@ -11,24 +11,24 @@ import { FormField as m, Input as te, Textarea as ne } from "../components/Input
|
|
|
11
11
|
import { Badge as re, StatusBadge as ie } from "../components/Badge.js";
|
|
12
12
|
import { EmptyState as ae } from "../components/EmptyState.js";
|
|
13
13
|
import { ErrorState as oe } from "../components/ErrorState.js";
|
|
14
|
-
import { routeMetadataString as
|
|
15
|
-
import { CreateChannelRouteDialog as
|
|
14
|
+
import { routeMetadataString as h, useAllChannelRoutes as se, useChannelConnector as ce, useCreateChannelConnector as le, useDeleteChannelConnector as ue, useFindChannelConnector as de, useUpdateChannelConnector as fe, useUpdateChannelRoute as pe } from "../hooks/useChannels.js";
|
|
15
|
+
import { CreateChannelRouteDialog as me } from "../components/CreateChannelRouteDialog.js";
|
|
16
16
|
import "../hooks/index.js";
|
|
17
|
-
import { ChannelCredentialFields as
|
|
18
|
-
import { ChannelType as
|
|
19
|
-
import { PLATFORM_CREDENTIALS as
|
|
20
|
-
import { formatRelativeTime as
|
|
21
|
-
import { toUnion as
|
|
22
|
-
import { useGlobalChannels as
|
|
23
|
-
import { confirmAction as
|
|
24
|
-
import { graphqlErrorMessage as
|
|
25
|
-
import { PROVISIONED_CHANNEL_KEY as
|
|
17
|
+
import { ChannelCredentialFields as he, InboundWebhookCard as ge } from "../components/ChannelSetupPanels.js";
|
|
18
|
+
import { ChannelType as _e } from "../../generated/global-types.js";
|
|
19
|
+
import { PLATFORM_CREDENTIALS as ve, connectorPlatform as ye, useActiveOrganizationId as be, useInboundChannel as xe, useProvisionChannel as Se, validateCredentials as Ce } from "../hooks/useChannelSetup.js";
|
|
20
|
+
import { formatRelativeTime as we } from "../utils/formatters.js";
|
|
21
|
+
import { toUnion as g } from "../utils/unions.js";
|
|
22
|
+
import { useGlobalChannels as Te, useInitiateSlackConnect as Ee, useLinkIntegrationConnection as De, useMyUserPlatformConnection as Oe, useRevokeSlackConnection as ke, useToggleSlackNotifications as Ae } from "../hooks/useUserPlatformConnection.js";
|
|
23
|
+
import { confirmAction as je } from "../utils/confirmAction.js";
|
|
24
|
+
import { graphqlErrorMessage as _, isNotFoundError as Me } from "../utils/errors.js";
|
|
25
|
+
import { PROVISIONED_CHANNEL_KEY as Ne, channelTypeLabel as Pe, provisionedChannelOf as Fe } from "../utils/channelConnectors.js";
|
|
26
26
|
import "../permissions/index.js";
|
|
27
|
-
import { useEffect as
|
|
28
|
-
import { GlassCard as
|
|
27
|
+
import { useEffect as Ie, useMemo as Le, useRef as Re, useState as v } from "react";
|
|
28
|
+
import { GlassCard as ze, NextSteps as Be, PagePurpose as Ve, ThemedSelect as y } from "@burdenoff/fe-libs/ui";
|
|
29
29
|
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
30
|
-
import { useParams as
|
|
31
|
-
import { ArrowLeft as
|
|
30
|
+
import { useParams as He, useSearchParams as Ue } from "react-router";
|
|
31
|
+
import { ArrowLeft as We, Bell as Ge, BellOff as Ke, CheckCircle2 as qe, Edit as Je, Globe as C, Hash as w, Info as Ye, Loader2 as Xe, MessageSquare as Ze, Plus as Qe, Power as $e, PowerOff as et, Radio as tt, Save as nt, Settings as rt, Shield as it, Slack as T, Trash2 as at, Unlink as ot, X as st } from "lucide-react";
|
|
32
32
|
import { toast as E } from "sonner";
|
|
33
33
|
// src/botlit/pages/ChannelDetailPage.tsx
|
|
34
34
|
var D = [
|
|
@@ -39,196 +39,196 @@ var D = [
|
|
|
39
39
|
"WHATSAPP",
|
|
40
40
|
"WEBHOOK",
|
|
41
41
|
"CUSTOM"
|
|
42
|
-
],
|
|
42
|
+
], ct = [
|
|
43
43
|
"PRIVATE",
|
|
44
44
|
"WORKSPACE",
|
|
45
45
|
"PUBLIC"
|
|
46
|
-
],
|
|
46
|
+
], lt = 255, ut = 2e3, dt = "channel-connector-create-form", ft = "channel-connector-edit-form", O = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm", pt = ({ type: e }) => {
|
|
47
47
|
switch (e) {
|
|
48
48
|
case "SLACK": return /* @__PURE__ */ x(w, { size: 18 });
|
|
49
49
|
case "WEB_WIDGET": return /* @__PURE__ */ x(C, { size: 18 });
|
|
50
|
-
case "TEAMS": return /* @__PURE__ */ x(
|
|
51
|
-
default: return /* @__PURE__ */ x(
|
|
50
|
+
case "TEAMS": return /* @__PURE__ */ x(Ze, { size: 18 });
|
|
51
|
+
default: return /* @__PURE__ */ x(tt, { size: 18 });
|
|
52
52
|
}
|
|
53
53
|
}, k = ({ isNew: C }) => {
|
|
54
|
-
let w = i(), { connectorId: k } =
|
|
55
|
-
channelType:
|
|
56
|
-
organizationId:
|
|
57
|
-
}), [
|
|
58
|
-
|
|
59
|
-
if (
|
|
54
|
+
let w = i(), { connectorId: k } = He(), { navigateTo: A, workspaceId: mt } = e(), [j, ht] = Ue(), { data: M, loading: gt, error: _t, refetch: vt } = ce(C ? void 0 : k), { data: N, loading: yt, error: P, refetch: bt } = se(C ? void 0 : k), F = !yt && !P, { data: xt } = ee(), [St, Ct] = le(), [wt, Tt] = fe(), [Et, Dt] = ue(), [Ot] = pe(), I = be(), kt = de(), { provision: At, discard: jt, loading: Mt } = Se(), Nt = Le(() => ({
|
|
55
|
+
channelType: _e.Communication,
|
|
56
|
+
organizationId: I ?? void 0
|
|
57
|
+
}), [I]), { data: Pt } = Te(Nt), Ft = M && ye(M.type) ? M.credentialsRefId : void 0, { data: It, loading: Lt, error: Rt, refetch: zt } = xe(Ft), Bt = M?.type === "SLACK" && M?.credentialsRefId ? M.credentialsRefId : void 0, { data: L, loading: Vt, refetch: R } = Oe(Bt), { initiate: Ht } = Ee(), { link: Ut, loading: Wt } = De(), { toggle: Gt, loading: Kt } = Ae(), { revoke: qt, loading: Jt } = ke(), [Yt, Xt] = v(null), Zt = Re(!1);
|
|
58
|
+
Ie(() => {
|
|
59
|
+
if (Zt.current) return;
|
|
60
60
|
let e = j.get("integrationConnectionId"), t = j.get("channelId");
|
|
61
61
|
if (!e || !t) return;
|
|
62
|
-
|
|
62
|
+
Zt.current = !0;
|
|
63
63
|
let n = new URLSearchParams(j);
|
|
64
|
-
n.delete("integrationConnectionId"), n.delete("channelId"),
|
|
65
|
-
e ?
|
|
64
|
+
n.delete("integrationConnectionId"), n.delete("channelId"), ht(n, { replace: !0 }), Xt(null), Ut(e, t).then((e) => {
|
|
65
|
+
e ? R() : Xt(w("botlit.channelDetail.slack.linkFailed", "Failed to link Slack connection. Please try again."));
|
|
66
66
|
});
|
|
67
67
|
}, [
|
|
68
68
|
j,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
ht,
|
|
70
|
+
Ut,
|
|
71
|
+
R,
|
|
72
72
|
w
|
|
73
73
|
]);
|
|
74
|
-
let
|
|
75
|
-
if (!
|
|
74
|
+
let Qt = () => {
|
|
75
|
+
if (!Bt) return;
|
|
76
76
|
let e = `${window.location.origin}${window.location.pathname}`;
|
|
77
|
-
Bt
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
}, [
|
|
77
|
+
Ht(Bt, e);
|
|
78
|
+
}, $t = async () => {
|
|
79
|
+
L && await Gt(L.id, !L.notificationsEnabled) && await R();
|
|
80
|
+
}, en = async () => {
|
|
81
|
+
L && await qt(L.id) && await R();
|
|
82
|
+
}, [z, tn] = v(!1), [nn, B] = v(!1), [rn, an] = v(null), on = {
|
|
83
83
|
name: "",
|
|
84
84
|
description: "",
|
|
85
|
-
type:
|
|
85
|
+
type: g(j.get("type") ?? "WEB_WIDGET", D, "WEB_WIDGET"),
|
|
86
86
|
visibility: "PRIVATE",
|
|
87
87
|
credentialsRefId: ""
|
|
88
|
-
}, [
|
|
89
|
-
|
|
90
|
-
let Q = (e) =>
|
|
91
|
-
|
|
92
|
-
if (!(C ||
|
|
88
|
+
}, [V, H] = v(on), [sn, U] = v(on), [cn, W] = v(!1), [ln, G] = v(null), [un, dn] = v(!0), [fn, pn] = v("new"), [K, q] = v({}), J = ye(V.type), Y = ve[V.type], X = Y ? fn : "existing", mn = J && I ? Pt.filter((e) => e.organizationId === I && e.platform === J && e.status === "ACTIVE") : [], hn = mn.some((e) => e.id === V.credentialsRefId), gn = JSON.stringify(V) !== JSON.stringify(sn) || Object.values(K).some((e) => e.trim() !== "") || !!C && (!un || fn !== "new"), Z = {};
|
|
89
|
+
V.name.trim() || (Z.name = w("botlit.channelDetail.form.errors.nameRequired", "Enter a name for the connector.")), C && J && X === "existing" && !hn && (Z.channel = w("botlit.channelDetail.form.errors.channelRequired", "Select the channel this connector routes."));
|
|
90
|
+
let Q = (e) => cn ? Z[e] : void 0;
|
|
91
|
+
Ie(() => {
|
|
92
|
+
if (!(C || z) || !gn) return;
|
|
93
93
|
let e = (e) => {
|
|
94
94
|
e.preventDefault(), e.returnValue = "";
|
|
95
95
|
};
|
|
96
96
|
return window.addEventListener("beforeunload", e), () => window.removeEventListener("beforeunload", e);
|
|
97
97
|
}, [
|
|
98
98
|
C,
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
z,
|
|
100
|
+
gn
|
|
101
101
|
]);
|
|
102
|
-
let
|
|
102
|
+
let _n = async () => !gn || je({
|
|
103
103
|
title: w("botlit.channelDetail.discard.title", "Discard changes?"),
|
|
104
104
|
message: w("botlit.channelDetail.discard.message", "You have unsaved changes. If you leave now they will be lost."),
|
|
105
105
|
confirmLabel: w("botlit.common.discard", "Discard"),
|
|
106
106
|
cancelLabel: w("botlit.common.keepEditing", "Keep editing")
|
|
107
|
-
}),
|
|
108
|
-
await
|
|
109
|
-
},
|
|
110
|
-
await
|
|
111
|
-
}, yn = async (e) => {
|
|
112
|
-
(!B || await gn()) && A(e);
|
|
107
|
+
}), vn = async () => {
|
|
108
|
+
await _n() && (U(V), q({}), A("channels"));
|
|
109
|
+
}, yn = async () => {
|
|
110
|
+
await _n() && (tn(!1), W(!1), G(null));
|
|
113
111
|
}, bn = async (e) => {
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
(!z || await _n()) && A(e);
|
|
113
|
+
}, xn = async (e) => {
|
|
114
|
+
if (e.preventDefault(), W(!0), G(null), Z.name || Z.channel) return;
|
|
115
|
+
let t = un ? "ACTIVE" : "DRAFT", n = V.name.trim(), r;
|
|
116
116
|
if (J && X === "new" && Y) {
|
|
117
|
-
let e = Ce(Y,
|
|
117
|
+
let e = Ce(Y, K);
|
|
118
118
|
if (e) {
|
|
119
|
-
|
|
119
|
+
G(e);
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
|
-
if (!
|
|
123
|
-
|
|
122
|
+
if (!I) {
|
|
123
|
+
G(w("botlit.channelDetail.form.errors.organizationRequired", "Select an organization before connecting a channel."));
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
126
|
try {
|
|
127
|
-
r = await
|
|
127
|
+
r = await At({
|
|
128
128
|
name: n,
|
|
129
|
-
description:
|
|
130
|
-
organizationId:
|
|
129
|
+
description: V.description || void 0,
|
|
130
|
+
organizationId: I,
|
|
131
131
|
definition: Y,
|
|
132
|
-
credentials:
|
|
132
|
+
credentials: K
|
|
133
133
|
});
|
|
134
134
|
} catch (e) {
|
|
135
|
-
|
|
135
|
+
G(_(e, w("botlit.channelDetail.form.errors.provisionFailed", "Failed to create the channel.")));
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
try {
|
|
140
|
-
let e = await
|
|
140
|
+
let e = await St({
|
|
141
141
|
name: n,
|
|
142
|
-
type:
|
|
143
|
-
description:
|
|
144
|
-
visibility:
|
|
142
|
+
type: V.type,
|
|
143
|
+
description: V.description || void 0,
|
|
144
|
+
visibility: V.visibility,
|
|
145
145
|
status: t,
|
|
146
|
-
credentialsRefId: J ? r ?? (X === "existing" ?
|
|
147
|
-
metadata: r ? { [
|
|
146
|
+
credentialsRefId: J ? r ?? (X === "existing" ? V.credentialsRefId : void 0) : void 0,
|
|
147
|
+
metadata: r ? { [Ne]: r } : void 0
|
|
148
148
|
});
|
|
149
|
-
|
|
149
|
+
q({}), U(V), E.success(w("botlit.channelDetail.create.success", "Channel \"{{name}}\" created", { name: e.name })), A(`channels/${e.id}`);
|
|
150
150
|
} catch (e) {
|
|
151
151
|
if (r) {
|
|
152
152
|
let e = r;
|
|
153
|
-
await
|
|
153
|
+
await kt(e).catch(() => void 0) === null && await jt(e).catch(() => void 0);
|
|
154
154
|
}
|
|
155
|
-
|
|
155
|
+
G(_(e, w("botlit.channelDetail.create.error", "Failed to create channel connector.")));
|
|
156
156
|
}
|
|
157
|
-
},
|
|
157
|
+
}, Sn = async () => {
|
|
158
158
|
if (!k || !M) return;
|
|
159
159
|
let e = M.status !== "ACTIVE";
|
|
160
160
|
try {
|
|
161
|
-
await
|
|
161
|
+
await wt({
|
|
162
162
|
connectorId: k,
|
|
163
163
|
input: { status: e ? "ACTIVE" : "DRAFT" }
|
|
164
|
-
}), E.success(e ? w("botlit.channelDetail.status.activated", "Connector activated") : w("botlit.channelDetail.status.deactivated", "Connector deactivated")),
|
|
164
|
+
}), E.success(e ? w("botlit.channelDetail.status.activated", "Connector activated") : w("botlit.channelDetail.status.deactivated", "Connector deactivated")), vt(), zt();
|
|
165
165
|
} catch (e) {
|
|
166
|
-
E.error(
|
|
166
|
+
E.error(_(e, w("botlit.channelDetail.status.failed", "Failed to change the connector status.")));
|
|
167
167
|
}
|
|
168
|
-
},
|
|
169
|
-
if (e.preventDefault(),
|
|
170
|
-
await
|
|
168
|
+
}, Cn = async (e) => {
|
|
169
|
+
if (e.preventDefault(), W(!0), G(null), k && !Z.name) try {
|
|
170
|
+
await wt({
|
|
171
171
|
connectorId: k,
|
|
172
172
|
input: {
|
|
173
|
-
name:
|
|
174
|
-
description:
|
|
175
|
-
visibility:
|
|
176
|
-
credentialsRefId:
|
|
173
|
+
name: V.name.trim(),
|
|
174
|
+
description: V.description || void 0,
|
|
175
|
+
visibility: V.visibility,
|
|
176
|
+
credentialsRefId: V.credentialsRefId || void 0
|
|
177
177
|
}
|
|
178
|
-
}),
|
|
178
|
+
}), U(V), E.success(w("botlit.channelDetail.update.success", "Channel updated")), tn(!1), W(!1), vt();
|
|
179
179
|
} catch (e) {
|
|
180
|
-
|
|
180
|
+
G(_(e, w("botlit.channelDetail.update.error", "Failed to update channel connector.")));
|
|
181
181
|
}
|
|
182
|
-
},
|
|
183
|
-
if (!k || !M || !
|
|
184
|
-
let e = N.length, i =
|
|
185
|
-
if (await
|
|
182
|
+
}, wn = async () => {
|
|
183
|
+
if (!k || !M || !F) return;
|
|
184
|
+
let e = N.length, i = Fe(M);
|
|
185
|
+
if (await je({
|
|
186
186
|
title: w("botlit.channelDetail.delete.title", "Delete connector?"),
|
|
187
187
|
message: [e > 0 ? w("botlit.channelDetail.delete.messageWithRoutes", "Delete \"{{name}}\"? Its {{count}} route(s) are deleted with it and this channel stops answering. This cannot be undone.", {
|
|
188
188
|
name: M.name,
|
|
189
189
|
count: e
|
|
190
|
-
}) : w("botlit.channelDetail.delete.message", "Delete \"{{name}}\"? This cannot be undone.", { name: M.name }), i ? w("botlit.channelDetail.delete.ownChannel", "The {{platform}} channel and the credentials saved for this connector are deleted too.", { platform:
|
|
190
|
+
}) : w("botlit.channelDetail.delete.message", "Delete \"{{name}}\"? This cannot be undone.", { name: M.name }), i ? w("botlit.channelDetail.delete.ownChannel", "The {{platform}} channel and the credentials saved for this connector are deleted too.", { platform: Pe(M.type, w) }) : ""].filter(Boolean).join(" "),
|
|
191
191
|
confirmLabel: w("botlit.common.delete", "Delete"),
|
|
192
192
|
cancelLabel: w("botlit.common.cancel", "Cancel")
|
|
193
193
|
})) {
|
|
194
194
|
n("medium");
|
|
195
195
|
try {
|
|
196
|
-
await
|
|
196
|
+
await Et(k);
|
|
197
197
|
} catch (e) {
|
|
198
|
-
t() && r("error"), E.error(
|
|
198
|
+
t() && r("error"), E.error(_(e, w("botlit.channelDetail.delete.error", "The connector could not be deleted.")));
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
201
201
|
if (t() && r("success"), E.success(w("botlit.channelDetail.delete.success", "Connector \"{{name}}\" deleted", { name: M.name })), i) try {
|
|
202
|
-
await
|
|
202
|
+
await kt(i) === null && await jt(i);
|
|
203
203
|
} catch (e) {
|
|
204
|
-
E.warning(
|
|
204
|
+
E.warning(_(e, w("botlit.channelDetail.delete.channelLeft", "The connector was deleted, but its channel could not be removed. Delete it from Channels in Settings.")));
|
|
205
205
|
}
|
|
206
206
|
A("channels");
|
|
207
207
|
}
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
let t =
|
|
208
|
+
}, Tn = async (e) => {
|
|
209
|
+
an(e.id);
|
|
210
|
+
let t = h(e, "locationName") ?? e.locationId;
|
|
211
211
|
try {
|
|
212
|
-
await
|
|
212
|
+
await Ot({
|
|
213
213
|
routeId: e.id,
|
|
214
214
|
input: { isActive: !e.isActive }
|
|
215
|
-
}), E.success(e.isActive ? w("botlit.channelRoutes.toggle.off", "Route turned off: {{location}}", { location: t }) : w("botlit.channelRoutes.toggle.on", "Route turned on: {{location}}", { location: t })),
|
|
215
|
+
}), E.success(e.isActive ? w("botlit.channelRoutes.toggle.off", "Route turned off: {{location}}", { location: t }) : w("botlit.channelRoutes.toggle.on", "Route turned on: {{location}}", { location: t })), bt();
|
|
216
216
|
} catch (e) {
|
|
217
|
-
E.error(
|
|
217
|
+
E.error(_(e, w("botlit.channelRoutes.toggle.failed", "The route could not be changed.")));
|
|
218
218
|
} finally {
|
|
219
|
-
|
|
219
|
+
an(null);
|
|
220
220
|
}
|
|
221
|
-
},
|
|
221
|
+
}, En = () => {
|
|
222
222
|
if (!M) return;
|
|
223
223
|
let e = {
|
|
224
224
|
name: M.name,
|
|
225
225
|
description: M.description || "",
|
|
226
|
-
type:
|
|
227
|
-
visibility:
|
|
226
|
+
type: g(M.type, D, "CUSTOM"),
|
|
227
|
+
visibility: g(M.visibility, ct, "PRIVATE"),
|
|
228
228
|
credentialsRefId: M.credentialsRefId || ""
|
|
229
229
|
};
|
|
230
|
-
|
|
231
|
-
},
|
|
230
|
+
H(e), U(e), W(!1), G(null), tn(!0);
|
|
231
|
+
}, Dn = /* @__PURE__ */ S(b, { children: [
|
|
232
232
|
/* @__PURE__ */ x("option", {
|
|
233
233
|
value: "PRIVATE",
|
|
234
234
|
children: w("botlit.visibility.private", "Private")
|
|
@@ -241,10 +241,10 @@ var D = [
|
|
|
241
241
|
value: "PUBLIC",
|
|
242
242
|
children: w("botlit.visibility.public", "Public")
|
|
243
243
|
})
|
|
244
|
-
] }),
|
|
244
|
+
] }), On = ln && /* @__PURE__ */ x("p", {
|
|
245
245
|
role: "alert",
|
|
246
246
|
className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
|
|
247
|
-
children:
|
|
247
|
+
children: ln
|
|
248
248
|
});
|
|
249
249
|
if (C) return /* @__PURE__ */ x(a, {
|
|
250
250
|
title: w("botlit.channelDetail.create.title", "Create Channel Connector"),
|
|
@@ -254,24 +254,24 @@ var D = [
|
|
|
254
254
|
children: [/* @__PURE__ */ x(p, {
|
|
255
255
|
type: "button",
|
|
256
256
|
variant: "outline",
|
|
257
|
-
onClick: () => void
|
|
257
|
+
onClick: () => void vn(),
|
|
258
258
|
children: w("botlit.common.cancel", "Cancel")
|
|
259
259
|
}), /* @__PURE__ */ x(p, {
|
|
260
260
|
type: "submit",
|
|
261
|
-
form:
|
|
262
|
-
leftIcon: /* @__PURE__ */ x(
|
|
263
|
-
isLoading:
|
|
261
|
+
form: dt,
|
|
262
|
+
leftIcon: /* @__PURE__ */ x(nt, { size: 16 }),
|
|
263
|
+
isLoading: Mt || Ct.loading || Tt.loading,
|
|
264
264
|
children: w("botlit.common.create", "Create")
|
|
265
265
|
})]
|
|
266
266
|
}),
|
|
267
267
|
children: /* @__PURE__ */ S("form", {
|
|
268
|
-
id:
|
|
268
|
+
id: dt,
|
|
269
269
|
noValidate: !0,
|
|
270
270
|
className: "max-w-2xl space-y-6",
|
|
271
|
-
onSubmit: (e) => void
|
|
271
|
+
onSubmit: (e) => void xn(e),
|
|
272
272
|
children: [
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
On,
|
|
274
|
+
cn && (Z.name || Z.channel) && /* @__PURE__ */ x("p", {
|
|
275
275
|
role: "alert",
|
|
276
276
|
className: "text-sm text-status-error-text",
|
|
277
277
|
children: w("botlit.channelDetail.form.errors.summary", "Fix the highlighted fields to create the connector.")
|
|
@@ -287,11 +287,11 @@ var D = [
|
|
|
287
287
|
children: /* @__PURE__ */ x(te, {
|
|
288
288
|
id: "channel-connector-name",
|
|
289
289
|
placeholder: w("botlit.channelDetail.form.namePlaceholder", "e.g., Production Slack"),
|
|
290
|
-
value:
|
|
291
|
-
maxLength:
|
|
290
|
+
value: V.name,
|
|
291
|
+
maxLength: lt,
|
|
292
292
|
"aria-invalid": !!Q("name"),
|
|
293
|
-
onChange: (e) =>
|
|
294
|
-
...
|
|
293
|
+
onChange: (e) => H({
|
|
294
|
+
...V,
|
|
295
295
|
name: e.target.value
|
|
296
296
|
})
|
|
297
297
|
})
|
|
@@ -302,10 +302,10 @@ var D = [
|
|
|
302
302
|
children: /* @__PURE__ */ x(ne, {
|
|
303
303
|
id: "channel-connector-description",
|
|
304
304
|
placeholder: w("botlit.channelDetail.form.descriptionPlaceholder", "What is this channel connector for?"),
|
|
305
|
-
value:
|
|
306
|
-
maxLength:
|
|
307
|
-
onChange: (e) =>
|
|
308
|
-
...
|
|
305
|
+
value: V.description,
|
|
306
|
+
maxLength: ut,
|
|
307
|
+
onChange: (e) => H({
|
|
308
|
+
...V,
|
|
309
309
|
description: e.target.value
|
|
310
310
|
}),
|
|
311
311
|
rows: 3
|
|
@@ -317,32 +317,32 @@ var D = [
|
|
|
317
317
|
label: w("botlit.channelDetail.form.type", "Channel Type"),
|
|
318
318
|
htmlFor: "channel-connector-type",
|
|
319
319
|
required: !0,
|
|
320
|
-
children: /* @__PURE__ */ x(
|
|
320
|
+
children: /* @__PURE__ */ x(y, {
|
|
321
321
|
id: "channel-connector-type",
|
|
322
322
|
className: O,
|
|
323
|
-
value:
|
|
324
|
-
onChange: (e) =>
|
|
325
|
-
...
|
|
323
|
+
value: V.type,
|
|
324
|
+
onChange: (e) => H({
|
|
325
|
+
...V,
|
|
326
326
|
type: e.target.value,
|
|
327
327
|
credentialsRefId: ""
|
|
328
328
|
}),
|
|
329
329
|
children: D.map((e) => /* @__PURE__ */ x("option", {
|
|
330
330
|
value: e,
|
|
331
|
-
children:
|
|
331
|
+
children: Pe(e, w)
|
|
332
332
|
}, e))
|
|
333
333
|
})
|
|
334
334
|
}), /* @__PURE__ */ x(m, {
|
|
335
335
|
label: w("botlit.channelDetail.form.visibility", "Visibility"),
|
|
336
336
|
htmlFor: "channel-connector-visibility",
|
|
337
|
-
children: /* @__PURE__ */ x(
|
|
337
|
+
children: /* @__PURE__ */ x(y, {
|
|
338
338
|
id: "channel-connector-visibility",
|
|
339
339
|
className: O,
|
|
340
|
-
value:
|
|
341
|
-
onChange: (e) =>
|
|
342
|
-
...
|
|
340
|
+
value: V.visibility,
|
|
341
|
+
onChange: (e) => H({
|
|
342
|
+
...V,
|
|
343
343
|
visibility: e.target.value
|
|
344
344
|
}),
|
|
345
|
-
children:
|
|
345
|
+
children: Dn
|
|
346
346
|
})
|
|
347
347
|
})]
|
|
348
348
|
}),
|
|
@@ -351,8 +351,8 @@ var D = [
|
|
|
351
351
|
children: [/* @__PURE__ */ x("input", {
|
|
352
352
|
type: "checkbox",
|
|
353
353
|
className: "mt-1",
|
|
354
|
-
checked:
|
|
355
|
-
onChange: (e) =>
|
|
354
|
+
checked: un,
|
|
355
|
+
onChange: (e) => dn(e.target.checked)
|
|
356
356
|
}), /* @__PURE__ */ S("span", { children: [/* @__PURE__ */ x("span", {
|
|
357
357
|
className: "font-medium",
|
|
358
358
|
children: w("botlit.channelDetail.form.activateNow", "Activate now")
|
|
@@ -365,7 +365,7 @@ var D = [
|
|
|
365
365
|
})] }),
|
|
366
366
|
J && /* @__PURE__ */ S(c, { children: [/* @__PURE__ */ S(d, { children: [/* @__PURE__ */ S(f, {
|
|
367
367
|
className: "flex items-center gap-2",
|
|
368
|
-
children: [/* @__PURE__ */ x(
|
|
368
|
+
children: [/* @__PURE__ */ x(tt, { size: 18 }), w("botlit.channelDetail.platform.title", "Platform Connection")]
|
|
369
369
|
}), /* @__PURE__ */ x(u, { children: Y ? w("botlit.channelDetail.platform.descriptionCredentials", "Enter the credentials of your platform app, or link a channel that is already set up.") : w("botlit.channelDetail.platform.descriptionExisting", "Link a channel that is already set up for this platform.") })] }), /* @__PURE__ */ S(l, {
|
|
370
370
|
className: "space-y-4",
|
|
371
371
|
children: [Y && /* @__PURE__ */ S("div", {
|
|
@@ -378,7 +378,7 @@ var D = [
|
|
|
378
378
|
type: "radio",
|
|
379
379
|
name: "connection-mode",
|
|
380
380
|
checked: X === "new",
|
|
381
|
-
onChange: () =>
|
|
381
|
+
onChange: () => pn("new")
|
|
382
382
|
}), w("botlit.channelDetail.platform.modeNew", "Connect with credentials")]
|
|
383
383
|
}), /* @__PURE__ */ S("label", {
|
|
384
384
|
className: "flex items-center gap-2",
|
|
@@ -386,41 +386,41 @@ var D = [
|
|
|
386
386
|
type: "radio",
|
|
387
387
|
name: "connection-mode",
|
|
388
388
|
checked: X === "existing",
|
|
389
|
-
onChange: () =>
|
|
389
|
+
onChange: () => pn("existing")
|
|
390
390
|
}), w("botlit.channelDetail.platform.modeExisting", "Use an existing channel")]
|
|
391
391
|
})]
|
|
392
|
-
}), X === "new" && Y ? /* @__PURE__ */ x(
|
|
392
|
+
}), X === "new" && Y ? /* @__PURE__ */ x(he, {
|
|
393
393
|
definition: Y,
|
|
394
|
-
values:
|
|
395
|
-
onChange:
|
|
394
|
+
values: K,
|
|
395
|
+
onChange: q
|
|
396
396
|
}) : /* @__PURE__ */ x(m, {
|
|
397
397
|
label: w("botlit.channelDetail.platform.channel", "Channel"),
|
|
398
398
|
htmlFor: "channel-connector-channel",
|
|
399
399
|
description: w("botlit.channelDetail.platform.channelHint", "Channels of this platform in your organization"),
|
|
400
400
|
required: !0,
|
|
401
401
|
error: Q("channel"),
|
|
402
|
-
children: /* @__PURE__ */ S(
|
|
402
|
+
children: /* @__PURE__ */ S(y, {
|
|
403
403
|
id: "channel-connector-channel",
|
|
404
404
|
className: O,
|
|
405
|
-
value:
|
|
405
|
+
value: V.credentialsRefId,
|
|
406
406
|
"aria-invalid": !!Q("channel"),
|
|
407
|
-
onChange: (e) =>
|
|
408
|
-
...
|
|
407
|
+
onChange: (e) => H({
|
|
408
|
+
...V,
|
|
409
409
|
credentialsRefId: e.target.value
|
|
410
410
|
}),
|
|
411
411
|
children: [/* @__PURE__ */ x("option", {
|
|
412
412
|
value: "",
|
|
413
|
-
children:
|
|
414
|
-
}),
|
|
413
|
+
children: mn.length > 0 ? w("botlit.channelDetail.platform.channelPlaceholder", "Select a channel...") : w("botlit.channelDetail.platform.noChannels", "No channels of this platform yet")
|
|
414
|
+
}), mn.map((e) => /* @__PURE__ */ x("option", {
|
|
415
415
|
value: e.id,
|
|
416
416
|
children: e.name
|
|
417
417
|
}, e.id))]
|
|
418
418
|
})
|
|
419
419
|
})]
|
|
420
420
|
})] }),
|
|
421
|
-
|
|
421
|
+
V.type === "WEB_WIDGET" && /* @__PURE__ */ S("div", {
|
|
422
422
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-4 text-sm",
|
|
423
|
-
children: [/* @__PURE__ */ x(
|
|
423
|
+
children: [/* @__PURE__ */ x(Ye, {
|
|
424
424
|
size: 18,
|
|
425
425
|
"aria-hidden": "true",
|
|
426
426
|
className: "mt-0.5 shrink-0 text-text-secondary"
|
|
@@ -432,21 +432,22 @@ var D = [
|
|
|
432
432
|
]
|
|
433
433
|
})
|
|
434
434
|
});
|
|
435
|
-
if (
|
|
435
|
+
if (gt) return /* @__PURE__ */ x(a, {
|
|
436
436
|
title: w("botlit.common.loading", "Loading..."),
|
|
437
437
|
children: /* @__PURE__ */ x("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
|
|
438
438
|
});
|
|
439
|
-
if (
|
|
439
|
+
if (_t && !Me(_t)) return /* @__PURE__ */ x(a, {
|
|
440
440
|
title: w("botlit.channelDetail.loadError.title", "Connector unavailable"),
|
|
441
441
|
children: /* @__PURE__ */ x(oe, {
|
|
442
442
|
resource: w("botlit.channelDetail.resource", "this channel connector"),
|
|
443
|
-
error:
|
|
444
|
-
onRetry: () => void
|
|
443
|
+
error: _t,
|
|
444
|
+
onRetry: () => void vt()
|
|
445
445
|
})
|
|
446
446
|
});
|
|
447
447
|
if (!M) return /* @__PURE__ */ x(a, {
|
|
448
448
|
title: w("botlit.channelDetail.notFound.title", "Connector Not Found"),
|
|
449
449
|
children: /* @__PURE__ */ x(ae, {
|
|
450
|
+
kind: "not-found",
|
|
450
451
|
illustration: "empty-notifications",
|
|
451
452
|
title: w("botlit.channelDetail.notFound.title", "Connector Not Found"),
|
|
452
453
|
description: w("botlit.channelDetail.notFound.description", "This channel connector doesn't exist in this workspace."),
|
|
@@ -456,7 +457,7 @@ var D = [
|
|
|
456
457
|
})
|
|
457
458
|
})
|
|
458
459
|
});
|
|
459
|
-
let $ =
|
|
460
|
+
let $ = g(M.type, D, "CUSTOM"), kn = N.filter((e) => e.isActive).length, An = (e) => xt.find((t) => t.id === e.appId)?.name ?? h(e, "appName") ?? w("botlit.channelRoutes.unknownBot", "Unknown bot");
|
|
460
461
|
return /* @__PURE__ */ x(a, {
|
|
461
462
|
title: /* @__PURE__ */ S("div", {
|
|
462
463
|
className: "flex items-center gap-3",
|
|
@@ -465,12 +466,12 @@ var D = [
|
|
|
465
466
|
variant: "ghost",
|
|
466
467
|
size: "icon",
|
|
467
468
|
"aria-label": w("botlit.channelDetail.backToChannels", "Back to Channels"),
|
|
468
|
-
onClick: () => void
|
|
469
|
-
children: /* @__PURE__ */ x(
|
|
469
|
+
onClick: () => void bn("channels"),
|
|
470
|
+
children: /* @__PURE__ */ x(We, { size: 20 })
|
|
470
471
|
}),
|
|
471
472
|
/* @__PURE__ */ x("div", {
|
|
472
473
|
className: "p-2 rounded-lg bg-action-primary-bg/10",
|
|
473
|
-
children: /* @__PURE__ */ x(
|
|
474
|
+
children: /* @__PURE__ */ x(pt, { type: $ })
|
|
474
475
|
}),
|
|
475
476
|
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
|
|
476
477
|
className: "flex items-center gap-2",
|
|
@@ -487,29 +488,29 @@ var D = [
|
|
|
487
488
|
permission: o.CHANNEL_CREATE,
|
|
488
489
|
children: /* @__PURE__ */ x(p, {
|
|
489
490
|
variant: "outline",
|
|
490
|
-
leftIcon: /* @__PURE__ */ x(
|
|
491
|
-
onClick: () =>
|
|
491
|
+
leftIcon: /* @__PURE__ */ x(Qe, { size: 16 }),
|
|
492
|
+
onClick: () => B(!0),
|
|
492
493
|
children: w("botlit.channelDetail.routes.add", "Add Route")
|
|
493
494
|
})
|
|
494
|
-
}),
|
|
495
|
+
}), z ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(p, {
|
|
495
496
|
type: "button",
|
|
496
497
|
variant: "outline",
|
|
497
|
-
onClick: () => void
|
|
498
|
+
onClick: () => void yn(),
|
|
498
499
|
children: w("botlit.common.cancel", "Cancel")
|
|
499
500
|
}), /* @__PURE__ */ x(p, {
|
|
500
501
|
type: "submit",
|
|
501
|
-
form:
|
|
502
|
-
leftIcon: /* @__PURE__ */ x(
|
|
503
|
-
isLoading:
|
|
502
|
+
form: ft,
|
|
503
|
+
leftIcon: /* @__PURE__ */ x(nt, { size: 16 }),
|
|
504
|
+
isLoading: Tt.loading,
|
|
504
505
|
children: w("botlit.common.save", "Save")
|
|
505
506
|
})] }) : /* @__PURE__ */ S(b, { children: [
|
|
506
507
|
/* @__PURE__ */ x(s, {
|
|
507
508
|
permission: o.CHANNEL_UPDATE,
|
|
508
509
|
children: /* @__PURE__ */ x(p, {
|
|
509
510
|
variant: M.status === "ACTIVE" ? "outline" : "primary",
|
|
510
|
-
leftIcon: M.status === "ACTIVE" ? /* @__PURE__ */ x(
|
|
511
|
-
onClick: () => void
|
|
512
|
-
isLoading:
|
|
511
|
+
leftIcon: M.status === "ACTIVE" ? /* @__PURE__ */ x(et, { size: 16 }) : /* @__PURE__ */ x($e, { size: 16 }),
|
|
512
|
+
onClick: () => void Sn(),
|
|
513
|
+
isLoading: Tt.loading && !z,
|
|
513
514
|
children: M.status === "ACTIVE" ? w("botlit.channelDetail.actions.deactivate", "Deactivate") : w("botlit.channelDetail.actions.activate", "Activate")
|
|
514
515
|
})
|
|
515
516
|
}),
|
|
@@ -517,8 +518,8 @@ var D = [
|
|
|
517
518
|
permission: o.CHANNEL_UPDATE,
|
|
518
519
|
children: /* @__PURE__ */ x(p, {
|
|
519
520
|
variant: "outline",
|
|
520
|
-
leftIcon: /* @__PURE__ */ x(
|
|
521
|
-
onClick:
|
|
521
|
+
leftIcon: /* @__PURE__ */ x(Je, { size: 16 }),
|
|
522
|
+
onClick: En,
|
|
522
523
|
children: w("botlit.common.edit", "Edit")
|
|
523
524
|
})
|
|
524
525
|
}),
|
|
@@ -526,11 +527,11 @@ var D = [
|
|
|
526
527
|
permission: o.CHANNEL_DELETE,
|
|
527
528
|
children: /* @__PURE__ */ x(p, {
|
|
528
529
|
variant: "destructive",
|
|
529
|
-
leftIcon: /* @__PURE__ */ x(
|
|
530
|
-
isLoading:
|
|
531
|
-
disabled: !
|
|
532
|
-
title:
|
|
533
|
-
onClick: () => void
|
|
530
|
+
leftIcon: /* @__PURE__ */ x(at, { size: 16 }),
|
|
531
|
+
isLoading: Dt.loading,
|
|
532
|
+
disabled: !F,
|
|
533
|
+
title: F ? void 0 : w("botlit.channelDetail.delete.waitForRoutes", "Available once this connector’s routes have loaded."),
|
|
534
|
+
onClick: () => void wn(),
|
|
534
535
|
children: w("botlit.common.delete", "Delete")
|
|
535
536
|
})
|
|
536
537
|
})
|
|
@@ -539,44 +540,44 @@ var D = [
|
|
|
539
540
|
children: /* @__PURE__ */ S("div", {
|
|
540
541
|
className: "space-y-6",
|
|
541
542
|
children: [
|
|
542
|
-
/* @__PURE__ */ x(
|
|
543
|
-
icon: /* @__PURE__ */ x(
|
|
543
|
+
/* @__PURE__ */ x(Ve, {
|
|
544
|
+
icon: /* @__PURE__ */ x(tt, { size: 18 }),
|
|
544
545
|
children: w("botlit.channelDetail.purpose", "This connector links BotManor to one messaging platform. From here you add routes — each mapping a location on the channel (a Slack channel, a number, or * for every location) to the bot that should answer there — change the connector settings, and manage its connection. Add at least one route that is turned on so messages on this channel reach a bot.")
|
|
545
546
|
}),
|
|
546
|
-
/* @__PURE__ */ x(
|
|
547
|
+
/* @__PURE__ */ x(Be, {
|
|
547
548
|
storageKey: `botlit-channel-${M.id}`,
|
|
548
549
|
steps: [
|
|
549
550
|
{
|
|
550
551
|
id: "route",
|
|
551
552
|
label: w("botlit.channelDetail.next.route", "Add a route"),
|
|
552
553
|
description: w("botlit.channelDetail.next.routeDescription", "Point an incoming location on this channel at one of your bots."),
|
|
553
|
-
icon: /* @__PURE__ */ x(
|
|
554
|
-
onClick: () =>
|
|
555
|
-
done:
|
|
554
|
+
icon: /* @__PURE__ */ x(Qe, { size: 16 }),
|
|
555
|
+
onClick: () => B(!0),
|
|
556
|
+
done: kn > 0
|
|
556
557
|
},
|
|
557
558
|
{
|
|
558
559
|
id: "edit",
|
|
559
560
|
label: w("botlit.channelDetail.next.edit", "Review connector settings"),
|
|
560
561
|
description: w("botlit.channelDetail.next.editDescription", "Confirm the name, visibility and channel-specific configuration."),
|
|
561
|
-
icon: /* @__PURE__ */ x(
|
|
562
|
-
onClick:
|
|
562
|
+
icon: /* @__PURE__ */ x(rt, { size: 16 }),
|
|
563
|
+
onClick: En
|
|
563
564
|
},
|
|
564
565
|
{
|
|
565
566
|
id: "bots",
|
|
566
567
|
label: w("botlit.channelDetail.next.bots", "Check your bots"),
|
|
567
568
|
description: w("botlit.channelDetail.next.botsDescription", "Make sure the bot you are routing to is active and configured."),
|
|
568
|
-
icon: /* @__PURE__ */ x(
|
|
569
|
-
onClick: () => void
|
|
569
|
+
icon: /* @__PURE__ */ x(Ze, { size: 16 }),
|
|
570
|
+
onClick: () => void bn("bots")
|
|
570
571
|
}
|
|
571
572
|
]
|
|
572
573
|
}),
|
|
573
|
-
|
|
574
|
-
id:
|
|
574
|
+
z && /* @__PURE__ */ S(c, { children: [/* @__PURE__ */ x(d, { children: /* @__PURE__ */ x(f, { children: w("botlit.channelDetail.edit.title", "Edit Channel") }) }), /* @__PURE__ */ x(l, { children: /* @__PURE__ */ S("form", {
|
|
575
|
+
id: ft,
|
|
575
576
|
noValidate: !0,
|
|
576
577
|
className: "space-y-4",
|
|
577
|
-
onSubmit: (e) => void
|
|
578
|
+
onSubmit: (e) => void Cn(e),
|
|
578
579
|
children: [
|
|
579
|
-
|
|
580
|
+
On,
|
|
580
581
|
/* @__PURE__ */ x(m, {
|
|
581
582
|
label: w("botlit.channelDetail.form.name", "Connector Name"),
|
|
582
583
|
htmlFor: "channel-connector-edit-name",
|
|
@@ -584,11 +585,11 @@ var D = [
|
|
|
584
585
|
error: Q("name"),
|
|
585
586
|
children: /* @__PURE__ */ x(te, {
|
|
586
587
|
id: "channel-connector-edit-name",
|
|
587
|
-
value:
|
|
588
|
-
maxLength:
|
|
588
|
+
value: V.name,
|
|
589
|
+
maxLength: lt,
|
|
589
590
|
"aria-invalid": !!Q("name"),
|
|
590
|
-
onChange: (e) =>
|
|
591
|
-
...
|
|
591
|
+
onChange: (e) => H({
|
|
592
|
+
...V,
|
|
592
593
|
name: e.target.value
|
|
593
594
|
})
|
|
594
595
|
})
|
|
@@ -598,10 +599,10 @@ var D = [
|
|
|
598
599
|
htmlFor: "channel-connector-edit-description",
|
|
599
600
|
children: /* @__PURE__ */ x(ne, {
|
|
600
601
|
id: "channel-connector-edit-description",
|
|
601
|
-
value:
|
|
602
|
-
maxLength:
|
|
603
|
-
onChange: (e) =>
|
|
604
|
-
...
|
|
602
|
+
value: V.description,
|
|
603
|
+
maxLength: ut,
|
|
604
|
+
onChange: (e) => H({
|
|
605
|
+
...V,
|
|
605
606
|
description: e.target.value
|
|
606
607
|
}),
|
|
607
608
|
rows: 2
|
|
@@ -610,15 +611,15 @@ var D = [
|
|
|
610
611
|
/* @__PURE__ */ x(m, {
|
|
611
612
|
label: w("botlit.channelDetail.form.visibility", "Visibility"),
|
|
612
613
|
htmlFor: "channel-connector-edit-visibility",
|
|
613
|
-
children: /* @__PURE__ */ x(
|
|
614
|
+
children: /* @__PURE__ */ x(y, {
|
|
614
615
|
id: "channel-connector-edit-visibility",
|
|
615
616
|
className: O,
|
|
616
|
-
value:
|
|
617
|
-
onChange: (e) =>
|
|
618
|
-
...
|
|
617
|
+
value: V.visibility,
|
|
618
|
+
onChange: (e) => H({
|
|
619
|
+
...V,
|
|
619
620
|
visibility: e.target.value
|
|
620
621
|
}),
|
|
621
|
-
children:
|
|
622
|
+
children: Dn
|
|
622
623
|
})
|
|
623
624
|
})
|
|
624
625
|
]
|
|
@@ -631,11 +632,11 @@ var D = [
|
|
|
631
632
|
children: [
|
|
632
633
|
/* @__PURE__ */ x("div", {
|
|
633
634
|
className: "p-3 rounded-full bg-action-primary-bg/10 w-fit mx-auto mb-2",
|
|
634
|
-
children: /* @__PURE__ */ x(
|
|
635
|
+
children: /* @__PURE__ */ x(pt, { type: $ })
|
|
635
636
|
}),
|
|
636
637
|
/* @__PURE__ */ x("p", {
|
|
637
638
|
className: "text-lg font-bold",
|
|
638
|
-
children:
|
|
639
|
+
children: Pe(M.type, w)
|
|
639
640
|
}),
|
|
640
641
|
/* @__PURE__ */ x("p", {
|
|
641
642
|
className: "text-sm text-text-secondary",
|
|
@@ -643,16 +644,16 @@ var D = [
|
|
|
643
644
|
})
|
|
644
645
|
]
|
|
645
646
|
}) }),
|
|
646
|
-
/* @__PURE__ */ S(
|
|
647
|
+
/* @__PURE__ */ S(ze, {
|
|
647
648
|
treatment: "glass",
|
|
648
649
|
glow: !0,
|
|
649
650
|
className: "p-6 text-center",
|
|
650
651
|
children: [/* @__PURE__ */ x("p", {
|
|
651
652
|
className: "text-3xl font-bold tabular-nums text-text-primary",
|
|
652
|
-
children:
|
|
653
|
+
children: F ? kn : "—"
|
|
653
654
|
}), /* @__PURE__ */ x("p", {
|
|
654
655
|
className: "text-sm text-text-secondary",
|
|
655
|
-
children:
|
|
656
|
+
children: F ? w("botlit.channelDetail.overview.activeRoutes", "Active routes of {{count}}", { count: N.length }) : P ? w("botlit.channelDetail.overview.routesUnavailable", "Routes could not be loaded") : w("botlit.channelDetail.overview.routesLoading", "Counting routes...")
|
|
656
657
|
})]
|
|
657
658
|
}),
|
|
658
659
|
/* @__PURE__ */ x(c, { children: /* @__PURE__ */ S(l, {
|
|
@@ -668,7 +669,7 @@ var D = [
|
|
|
668
669
|
}),
|
|
669
670
|
M.lastUnroutedAt && /* @__PURE__ */ x("p", {
|
|
670
671
|
className: "mt-1 text-xs text-text-secondary",
|
|
671
|
-
children: w("botlit.channelDetail.overview.lastUnrouted", "Last {{when}}", { when:
|
|
672
|
+
children: w("botlit.channelDetail.overview.lastUnrouted", "Last {{when}}", { when: we(M.lastUnroutedAt) })
|
|
672
673
|
})
|
|
673
674
|
]
|
|
674
675
|
}) }),
|
|
@@ -687,7 +688,7 @@ var D = [
|
|
|
687
688
|
M.unroutedMessageCount > 0 && /* @__PURE__ */ S("div", {
|
|
688
689
|
role: "status",
|
|
689
690
|
className: "flex items-start gap-3 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-4 text-sm",
|
|
690
|
-
children: [/* @__PURE__ */ x(
|
|
691
|
+
children: [/* @__PURE__ */ x(Ye, {
|
|
691
692
|
size: 18,
|
|
692
693
|
"aria-hidden": "true",
|
|
693
694
|
className: "mt-0.5 shrink-0 text-status-warning-text"
|
|
@@ -698,7 +699,7 @@ var D = [
|
|
|
698
699
|
}),
|
|
699
700
|
$ === "WEB_WIDGET" && /* @__PURE__ */ S("div", {
|
|
700
701
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-4 text-sm",
|
|
701
|
-
children: [/* @__PURE__ */ x(
|
|
702
|
+
children: [/* @__PURE__ */ x(Ye, {
|
|
702
703
|
size: 18,
|
|
703
704
|
"aria-hidden": "true",
|
|
704
705
|
className: "mt-0.5 shrink-0 text-text-secondary"
|
|
@@ -707,15 +708,15 @@ var D = [
|
|
|
707
708
|
children: w("botlit.channelDetail.webWidget.note", "To put an assistant on your website, publish it from the agent: open the agent and use its Website panel, which sets the allowed sites and gives you the embed code.")
|
|
708
709
|
})]
|
|
709
710
|
}),
|
|
710
|
-
|
|
711
|
-
channel:
|
|
712
|
-
loading:
|
|
713
|
-
error:
|
|
711
|
+
Ft && /* @__PURE__ */ x(ge, {
|
|
712
|
+
channel: It,
|
|
713
|
+
loading: Lt,
|
|
714
|
+
error: Rt,
|
|
714
715
|
connectorActive: M.status === "ACTIVE",
|
|
715
|
-
workspaceId:
|
|
716
|
-
hint:
|
|
717
|
-
usesInboundUrl:
|
|
718
|
-
onRefresh: () => void
|
|
716
|
+
workspaceId: mt,
|
|
717
|
+
hint: ve[M.type]?.inboundHint,
|
|
718
|
+
usesInboundUrl: ve[M.type]?.usesInboundUrl ?? !0,
|
|
719
|
+
onRefresh: () => void zt()
|
|
719
720
|
}),
|
|
720
721
|
/* @__PURE__ */ S(c, { children: [/* @__PURE__ */ x(d, {
|
|
721
722
|
className: "flex flex-row items-center justify-between",
|
|
@@ -723,7 +724,7 @@ var D = [
|
|
|
723
724
|
}), /* @__PURE__ */ x(l, { children: P ? /* @__PURE__ */ x(oe, {
|
|
724
725
|
resource: w("botlit.channelRoutes.resource", "channel routes"),
|
|
725
726
|
error: P,
|
|
726
|
-
onRetry: () => void
|
|
727
|
+
onRetry: () => void bt()
|
|
727
728
|
}) : N.length > 0 ? /* @__PURE__ */ x("ul", {
|
|
728
729
|
className: "space-y-3",
|
|
729
730
|
children: N.map((e) => /* @__PURE__ */ S("li", {
|
|
@@ -732,28 +733,28 @@ var D = [
|
|
|
732
733
|
className: "flex items-center gap-4",
|
|
733
734
|
children: [/* @__PURE__ */ x("div", {
|
|
734
735
|
className: "p-2 rounded-lg bg-bg-sunken",
|
|
735
|
-
children: /* @__PURE__ */ x(
|
|
736
|
+
children: /* @__PURE__ */ x(Ze, {
|
|
736
737
|
size: 18,
|
|
737
738
|
className: "text-text-secondary"
|
|
738
739
|
})
|
|
739
740
|
}), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("p", {
|
|
740
741
|
className: "flex items-center gap-2 font-medium",
|
|
741
|
-
children: [
|
|
742
|
+
children: [h(e, "locationName") ?? e.locationId, /* @__PURE__ */ x(re, {
|
|
742
743
|
variant: e.isActive ? "success" : "outline",
|
|
743
744
|
children: e.isActive ? w("botlit.channelRoutes.status.on", "On") : w("botlit.channelRoutes.status.off", "Off")
|
|
744
745
|
})]
|
|
745
746
|
}), /* @__PURE__ */ x("p", {
|
|
746
747
|
className: "text-sm text-text-secondary",
|
|
747
|
-
children: w("botlit.channelDetail.routes.connectedTo", "Connected to: {{bot}}", { bot:
|
|
748
|
+
children: w("botlit.channelDetail.routes.connectedTo", "Connected to: {{bot}}", { bot: An(e) })
|
|
748
749
|
})] })]
|
|
749
750
|
}), /* @__PURE__ */ x(s, {
|
|
750
751
|
permission: o.CHANNEL_UPDATE,
|
|
751
752
|
children: /* @__PURE__ */ x(p, {
|
|
752
753
|
variant: "outline",
|
|
753
754
|
size: "sm",
|
|
754
|
-
leftIcon: e.isActive ? /* @__PURE__ */ x(
|
|
755
|
-
isLoading:
|
|
756
|
-
onClick: () => void
|
|
755
|
+
leftIcon: e.isActive ? /* @__PURE__ */ x(et, { size: 14 }) : /* @__PURE__ */ x($e, { size: 14 }),
|
|
756
|
+
isLoading: rn === e.id,
|
|
757
|
+
onClick: () => void Tn(e),
|
|
757
758
|
children: e.isActive ? w("botlit.channelRoutes.actions.turnOff", "Turn off") : w("botlit.channelRoutes.actions.turnOn", "Turn on")
|
|
758
759
|
})
|
|
759
760
|
})]
|
|
@@ -765,56 +766,56 @@ var D = [
|
|
|
765
766
|
action: /* @__PURE__ */ x(s, {
|
|
766
767
|
permission: o.CHANNEL_CREATE,
|
|
767
768
|
children: /* @__PURE__ */ x(p, {
|
|
768
|
-
leftIcon: /* @__PURE__ */ x(
|
|
769
|
-
onClick: () =>
|
|
769
|
+
leftIcon: /* @__PURE__ */ x(Qe, { size: 16 }),
|
|
770
|
+
onClick: () => B(!0),
|
|
770
771
|
children: w("botlit.channelDetail.routes.add", "Add Route")
|
|
771
772
|
})
|
|
772
773
|
})
|
|
773
774
|
}) })] }),
|
|
774
|
-
/* @__PURE__ */ x(
|
|
775
|
-
open:
|
|
776
|
-
onOpenChange:
|
|
775
|
+
/* @__PURE__ */ x(me, {
|
|
776
|
+
open: nn,
|
|
777
|
+
onOpenChange: B,
|
|
777
778
|
connectorId: M.id,
|
|
778
|
-
onCreated: () => void
|
|
779
|
+
onCreated: () => void bt()
|
|
779
780
|
}),
|
|
780
781
|
M.type === "SLACK" && M.credentialsRefId && /* @__PURE__ */ S(c, { children: [/* @__PURE__ */ S(d, { children: [/* @__PURE__ */ S(f, {
|
|
781
782
|
className: "flex items-center gap-2",
|
|
782
783
|
children: [/* @__PURE__ */ x(T, { size: 18 }), w("botlit.channelDetail.slack.title", "Your Slack Account")]
|
|
783
|
-
}), /* @__PURE__ */ x(u, { children: w("botlit.channelDetail.slack.description", "Connect your personal Slack account to receive direct messages from this bot") })] }), /* @__PURE__ */ S(l, { children: [
|
|
784
|
+
}), /* @__PURE__ */ x(u, { children: w("botlit.channelDetail.slack.description", "Connect your personal Slack account to receive direct messages from this bot") })] }), /* @__PURE__ */ S(l, { children: [Yt && /* @__PURE__ */ S("div", {
|
|
784
785
|
role: "alert",
|
|
785
786
|
className: "mb-4 flex items-start gap-2 rounded-lg border border-status-error-border/40 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
|
|
786
|
-
children: [/* @__PURE__ */ x("span", { children:
|
|
787
|
+
children: [/* @__PURE__ */ x("span", { children: Yt }), /* @__PURE__ */ x("button", {
|
|
787
788
|
type: "button",
|
|
788
789
|
"aria-label": w("botlit.common.dismiss", "Dismiss"),
|
|
789
|
-
onClick: () =>
|
|
790
|
+
onClick: () => Xt(null),
|
|
790
791
|
className: "ml-auto cursor-pointer text-status-error-text/70 hover:text-status-error-text",
|
|
791
|
-
children: /* @__PURE__ */ x(
|
|
792
|
+
children: /* @__PURE__ */ x(st, { size: 14 })
|
|
792
793
|
})]
|
|
793
|
-
}),
|
|
794
|
+
}), Wt ? /* @__PURE__ */ S("div", {
|
|
794
795
|
className: "flex items-center gap-2 py-4 text-text-secondary",
|
|
795
|
-
children: [/* @__PURE__ */ x(
|
|
796
|
+
children: [/* @__PURE__ */ x(Xe, {
|
|
796
797
|
size: 16,
|
|
797
798
|
className: "animate-spin"
|
|
798
799
|
}), /* @__PURE__ */ x("span", {
|
|
799
800
|
className: "text-sm",
|
|
800
801
|
children: w("botlit.channelDetail.slack.linking", "Linking Slack connection...")
|
|
801
802
|
})]
|
|
802
|
-
}) :
|
|
803
|
+
}) : Vt ? /* @__PURE__ */ S("div", {
|
|
803
804
|
className: "flex items-center gap-2 py-4 text-text-secondary",
|
|
804
|
-
children: [/* @__PURE__ */ x(
|
|
805
|
+
children: [/* @__PURE__ */ x(Xe, {
|
|
805
806
|
size: 16,
|
|
806
807
|
className: "animate-spin"
|
|
807
808
|
}), /* @__PURE__ */ x("span", {
|
|
808
809
|
className: "text-sm",
|
|
809
810
|
children: w("botlit.channelDetail.slack.checking", "Checking connection...")
|
|
810
811
|
})]
|
|
811
|
-
}) :
|
|
812
|
+
}) : L && L.dmAllowed ? /* @__PURE__ */ S("div", {
|
|
812
813
|
className: "space-y-4",
|
|
813
814
|
children: [
|
|
814
815
|
/* @__PURE__ */ S("div", {
|
|
815
816
|
className: "flex items-center gap-3 p-3 rounded-lg bg-bg-sunken",
|
|
816
817
|
children: [
|
|
817
|
-
/* @__PURE__ */ x(
|
|
818
|
+
/* @__PURE__ */ x(qe, {
|
|
818
819
|
size: 20,
|
|
819
820
|
className: "text-status-success-text shrink-0"
|
|
820
821
|
}),
|
|
@@ -823,21 +824,21 @@ var D = [
|
|
|
823
824
|
children: [
|
|
824
825
|
/* @__PURE__ */ x("p", {
|
|
825
826
|
className: "font-medium text-sm",
|
|
826
|
-
children:
|
|
827
|
+
children: L.externalDisplayName || L.externalUsername || L.externalUserId
|
|
827
828
|
}),
|
|
828
|
-
|
|
829
|
+
L.externalUsername && L.externalDisplayName && /* @__PURE__ */ S("p", {
|
|
829
830
|
className: "text-xs text-text-secondary",
|
|
830
|
-
children: ["@",
|
|
831
|
+
children: ["@", L.externalUsername]
|
|
831
832
|
}),
|
|
832
|
-
|
|
833
|
+
L.connectedAt && /* @__PURE__ */ x("p", {
|
|
833
834
|
className: "text-xs text-text-secondary",
|
|
834
|
-
children: w("botlit.channelDetail.slack.connectedOn", "Connected {{date}}", { date: new Date(
|
|
835
|
+
children: w("botlit.channelDetail.slack.connectedOn", "Connected {{date}}", { date: new Date(L.connectedAt).toLocaleDateString() })
|
|
835
836
|
})
|
|
836
837
|
]
|
|
837
838
|
}),
|
|
838
839
|
/* @__PURE__ */ x("div", {
|
|
839
840
|
className: "flex items-center gap-1",
|
|
840
|
-
children:
|
|
841
|
+
children: L.isTokenExpired && /* @__PURE__ */ x(re, {
|
|
841
842
|
variant: "outline",
|
|
842
843
|
className: "text-xs text-status-warning-text border-status-warning-border",
|
|
843
844
|
children: w("botlit.channelDetail.slack.tokenExpired", "Token expired")
|
|
@@ -849,10 +850,10 @@ var D = [
|
|
|
849
850
|
className: "flex items-center justify-between p-3 border border-border-subtle rounded-lg",
|
|
850
851
|
children: [/* @__PURE__ */ S("div", {
|
|
851
852
|
className: "flex items-center gap-2",
|
|
852
|
-
children: [
|
|
853
|
+
children: [L.notificationsEnabled ? /* @__PURE__ */ x(Ge, {
|
|
853
854
|
size: 16,
|
|
854
855
|
className: "text-primary"
|
|
855
|
-
}) : /* @__PURE__ */ x(
|
|
856
|
+
}) : /* @__PURE__ */ x(Ke, {
|
|
856
857
|
size: 16,
|
|
857
858
|
className: "text-text-secondary"
|
|
858
859
|
}), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
@@ -860,30 +861,30 @@ var D = [
|
|
|
860
861
|
children: w("botlit.channelDetail.slack.notifications", "DM Notifications")
|
|
861
862
|
}), /* @__PURE__ */ x("p", {
|
|
862
863
|
className: "text-xs text-text-secondary",
|
|
863
|
-
children:
|
|
864
|
+
children: L.notificationsEnabled ? w("botlit.channelDetail.slack.notificationsOn", "You will receive bot DMs") : w("botlit.channelDetail.slack.notificationsOff", "DM notifications are paused")
|
|
864
865
|
})] })]
|
|
865
866
|
}), /* @__PURE__ */ x(p, {
|
|
866
867
|
variant: "outline",
|
|
867
868
|
size: "sm",
|
|
868
|
-
onClick: () => void
|
|
869
|
-
isLoading:
|
|
870
|
-
children:
|
|
869
|
+
onClick: () => void $t(),
|
|
870
|
+
isLoading: Kt,
|
|
871
|
+
children: L.notificationsEnabled ? w("botlit.common.disable", "Disable") : w("botlit.common.enable", "Enable")
|
|
871
872
|
})]
|
|
872
873
|
}),
|
|
873
874
|
/* @__PURE__ */ S("div", {
|
|
874
875
|
className: "flex gap-2 justify-end pt-2",
|
|
875
|
-
children: [
|
|
876
|
+
children: [L.isTokenExpired && /* @__PURE__ */ x(p, {
|
|
876
877
|
variant: "outline",
|
|
877
878
|
size: "sm",
|
|
878
879
|
leftIcon: /* @__PURE__ */ x(T, { size: 14 }),
|
|
879
|
-
onClick:
|
|
880
|
+
onClick: Qt,
|
|
880
881
|
children: w("botlit.channelDetail.slack.reconnect", "Reconnect")
|
|
881
882
|
}), /* @__PURE__ */ x(p, {
|
|
882
883
|
variant: "destructive",
|
|
883
884
|
size: "sm",
|
|
884
|
-
leftIcon: /* @__PURE__ */ x(
|
|
885
|
-
onClick: () => void
|
|
886
|
-
isLoading:
|
|
885
|
+
leftIcon: /* @__PURE__ */ x(ot, { size: 14 }),
|
|
886
|
+
onClick: () => void en(),
|
|
887
|
+
isLoading: Jt,
|
|
887
888
|
children: w("botlit.channelDetail.slack.disconnect", "Disconnect")
|
|
888
889
|
})]
|
|
889
890
|
})
|
|
@@ -907,14 +908,14 @@ var D = [
|
|
|
907
908
|
})] }),
|
|
908
909
|
/* @__PURE__ */ x(p, {
|
|
909
910
|
leftIcon: /* @__PURE__ */ x(T, { size: 16 }),
|
|
910
|
-
onClick:
|
|
911
|
+
onClick: Qt,
|
|
911
912
|
children: w("botlit.channelDetail.slack.connect", "Connect with Slack")
|
|
912
913
|
})
|
|
913
914
|
]
|
|
914
915
|
})] })] }),
|
|
915
916
|
M.defaultPolicyBindings && /* @__PURE__ */ S(c, { children: [/* @__PURE__ */ S(d, { children: [/* @__PURE__ */ S(f, {
|
|
916
917
|
className: "flex items-center gap-2",
|
|
917
|
-
children: [/* @__PURE__ */ x(
|
|
918
|
+
children: [/* @__PURE__ */ x(it, { size: 18 }), w("botlit.channelDetail.policies.title", "Default Policy Bindings")]
|
|
918
919
|
}), /* @__PURE__ */ x(u, { children: w("botlit.channelDetail.policies.description", "Default policies applied to all routes on this connector") })] }), /* @__PURE__ */ x(l, { children: /* @__PURE__ */ x("div", {
|
|
919
920
|
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
920
921
|
children: Object.entries(M.defaultPolicyBindings).map(([e, t]) => t ? /* @__PURE__ */ S("div", {
|
|
@@ -930,7 +931,7 @@ var D = [
|
|
|
930
931
|
}) })] }),
|
|
931
932
|
/* @__PURE__ */ S(c, { children: [/* @__PURE__ */ x(d, { children: /* @__PURE__ */ S(f, {
|
|
932
933
|
className: "flex items-center gap-2",
|
|
933
|
-
children: [/* @__PURE__ */ x(
|
|
934
|
+
children: [/* @__PURE__ */ x(rt, { size: 18 }), w("botlit.channelDetail.metadata.title", "Details")]
|
|
934
935
|
}) }), /* @__PURE__ */ x(l, { children: /* @__PURE__ */ S("dl", {
|
|
935
936
|
className: "grid grid-cols-2 md:grid-cols-4 gap-6 text-sm",
|
|
936
937
|
children: [
|
|
@@ -939,21 +940,21 @@ var D = [
|
|
|
939
940
|
children: w("botlit.channelDetail.metadata.created", "Created")
|
|
940
941
|
}), /* @__PURE__ */ x("dd", {
|
|
941
942
|
className: "font-medium",
|
|
942
|
-
children:
|
|
943
|
+
children: we(M.createdAt)
|
|
943
944
|
})] }),
|
|
944
945
|
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", {
|
|
945
946
|
className: "text-text-secondary",
|
|
946
947
|
children: w("botlit.channelDetail.metadata.updated", "Updated")
|
|
947
948
|
}), /* @__PURE__ */ x("dd", {
|
|
948
949
|
className: "font-medium",
|
|
949
|
-
children:
|
|
950
|
+
children: we(M.updatedAt)
|
|
950
951
|
})] }),
|
|
951
952
|
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", {
|
|
952
953
|
className: "text-text-secondary",
|
|
953
954
|
children: w("botlit.channelDetail.metadata.linkedChannel", "Linked channel")
|
|
954
955
|
}), /* @__PURE__ */ x("dd", {
|
|
955
956
|
className: "font-medium break-all",
|
|
956
|
-
children:
|
|
957
|
+
children: It?.name ?? M.credentialsRefId ?? w("botlit.channelDetail.metadata.notConfigured", "Not configured")
|
|
957
958
|
})] }),
|
|
958
959
|
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", {
|
|
959
960
|
className: "text-text-secondary",
|