@burdenoff/microfe-integrations 2026.1107.1 → 2026.1109.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/dist/dev/main.d.ts +0 -2
  2. package/dist/generated/global-operations.d.ts +4 -2
  3. package/dist/generated/global-types.d.ts +210 -190
  4. package/dist/generated/wspace-operations.d.ts +1195 -670
  5. package/dist/generated/wspace-operations.js +265 -149
  6. package/dist/generated/wspace-operations.js.map +1 -1
  7. package/dist/generated/wspace-types.d.ts +8728 -376
  8. package/dist/generated/wspace-types.js +6 -3
  9. package/dist/generated/wspace-types.js.map +1 -1
  10. package/dist/index.d.ts +0 -1
  11. package/dist/integrations/ConnectSourceDialog.d.ts +0 -2
  12. package/dist/integrations/ConnectSourceDialog.js +13 -14
  13. package/dist/integrations/ConnectSourceDialog.js.map +1 -1
  14. package/dist/integrations/ConnectionsPanel.d.ts +0 -2
  15. package/dist/integrations/ConnectionsPanel.js +5 -6
  16. package/dist/integrations/ConnectionsPanel.js.map +1 -1
  17. package/dist/integrations/IntegrationsAdminRoot.d.ts +0 -2
  18. package/dist/integrations/IntegrationsAdminRoot.js +14 -11
  19. package/dist/integrations/IntegrationsAdminRoot.js.map +1 -1
  20. package/dist/integrations/IntegrationsAdminRoutes.d.ts +1 -2
  21. package/dist/integrations/IntegrationsAdminRoutes.js +1 -2
  22. package/dist/integrations/IntegrationsAdminRoutes.js.map +1 -1
  23. package/dist/integrations/IntegrationsRoot.d.ts +0 -2
  24. package/dist/integrations/IntegrationsRoot.js +9 -6
  25. package/dist/integrations/IntegrationsRoot.js.map +1 -1
  26. package/dist/integrations/IntegrationsUserRoutes.d.ts +1 -2
  27. package/dist/integrations/IntegrationsUserRoutes.js +7 -8
  28. package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
  29. package/dist/integrations/components/AddConnectionDialog.d.ts +1 -3
  30. package/dist/integrations/components/AddConnectionDialog.js +12 -15
  31. package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
  32. package/dist/integrations/components/AuthMethodsEditor.d.ts +0 -2
  33. package/dist/integrations/components/AuthMethodsEditor.js +1 -2
  34. package/dist/integrations/components/AuthMethodsEditor.js.map +1 -1
  35. package/dist/integrations/components/ConfirmDialog.d.ts +1 -3
  36. package/dist/integrations/components/ConfirmDialog.js +1 -2
  37. package/dist/integrations/components/ConfirmDialog.js.map +1 -1
  38. package/dist/integrations/components/ConnectionCard.d.ts +0 -2
  39. package/dist/integrations/components/ConnectionCard.js +9 -10
  40. package/dist/integrations/components/ConnectionCard.js.map +1 -1
  41. package/dist/integrations/components/ConnectionModalFrame.d.ts +0 -2
  42. package/dist/integrations/components/ConnectionModalFrame.js +2 -3
  43. package/dist/integrations/components/ConnectionModalFrame.js.map +1 -1
  44. package/dist/integrations/components/ConnectionSharing.d.ts +0 -2
  45. package/dist/integrations/components/ConnectionSharing.js +7 -8
  46. package/dist/integrations/components/ConnectionSharing.js.map +1 -1
  47. package/dist/integrations/components/ConnectionStatusBadge.d.ts +0 -2
  48. package/dist/integrations/components/ConnectionStatusBadge.js +1 -2
  49. package/dist/integrations/components/ConnectionStatusBadge.js.map +1 -1
  50. package/dist/integrations/components/ConnectorSubmissionCard.d.ts +2 -4
  51. package/dist/integrations/components/ConnectorSubmissionCard.js +8 -9
  52. package/dist/integrations/components/ConnectorSubmissionCard.js.map +1 -1
  53. package/dist/integrations/components/ConnectorSubmissionPager.d.ts +1 -2
  54. package/dist/integrations/components/ConnectorSubmissionPager.js +1 -2
  55. package/dist/integrations/components/ConnectorSubmissionPager.js.map +1 -1
  56. package/dist/integrations/components/MailMessageBody.d.ts +5 -0
  57. package/dist/integrations/components/MailMessageBody.js +174 -0
  58. package/dist/integrations/components/MailMessageBody.js.map +1 -0
  59. package/dist/integrations/components/ProviderCard.d.ts +0 -2
  60. package/dist/integrations/components/ProviderCard.js +8 -9
  61. package/dist/integrations/components/ProviderCard.js.map +1 -1
  62. package/dist/integrations/constants/featureFlags.d.ts +0 -1
  63. package/dist/integrations/constants/featureFlags.js +1 -2
  64. package/dist/integrations/constants/featureFlags.js.map +1 -1
  65. package/dist/integrations/constants/permissions.d.ts +0 -1
  66. package/dist/integrations/constants/permissions.js +1 -2
  67. package/dist/integrations/constants/permissions.js.map +1 -1
  68. package/dist/integrations/events/integrations-events.d.ts +0 -1
  69. package/dist/integrations/events/useIntegrationsEventBus.d.ts +0 -2
  70. package/dist/integrations/events/useIntegrationsEventBus.js +1 -2
  71. package/dist/integrations/events/useIntegrationsEventBus.js.map +1 -1
  72. package/dist/integrations/hooks/useConnections.d.ts +3 -14
  73. package/dist/integrations/hooks/useConnections.js +74 -75
  74. package/dist/integrations/hooks/useConnections.js.map +1 -1
  75. package/dist/integrations/hooks/useConnectorSubmissions.d.ts +2 -10
  76. package/dist/integrations/hooks/useConnectorSubmissions.js +23 -24
  77. package/dist/integrations/hooks/useConnectorSubmissions.js.map +1 -1
  78. package/dist/integrations/hooks/useFormatDate.d.ts +0 -1
  79. package/dist/integrations/hooks/useFormatDate.js +1 -2
  80. package/dist/integrations/hooks/useFormatDate.js.map +1 -1
  81. package/dist/integrations/hooks/useFormatLastUsed.d.ts +0 -1
  82. package/dist/integrations/hooks/useFormatLastUsed.js +1 -2
  83. package/dist/integrations/hooks/useFormatLastUsed.js.map +1 -1
  84. package/dist/integrations/hooks/useLabel.d.ts +0 -2
  85. package/dist/integrations/hooks/useLabel.js +1 -2
  86. package/dist/integrations/hooks/useLabel.js.map +1 -1
  87. package/dist/integrations/hooks/useLogs.d.ts +1 -6
  88. package/dist/integrations/hooks/useLogs.js +6 -7
  89. package/dist/integrations/hooks/useLogs.js.map +1 -1
  90. package/dist/integrations/hooks/useMailbox.d.ts +77 -40
  91. package/dist/integrations/hooks/useMailbox.js +113 -35
  92. package/dist/integrations/hooks/useMailbox.js.map +1 -1
  93. package/dist/integrations/hooks/useProviders.d.ts +3 -14
  94. package/dist/integrations/hooks/useProviders.js +42 -43
  95. package/dist/integrations/hooks/useProviders.js.map +1 -1
  96. package/dist/integrations/hooks/useTr.d.ts +0 -1
  97. package/dist/integrations/hooks/useTr.js +1 -2
  98. package/dist/integrations/hooks/useTr.js.map +1 -1
  99. package/dist/integrations/index.d.ts +0 -1
  100. package/dist/integrations/index.js +9 -8
  101. package/dist/integrations/pages/AddConnectionWizard.d.ts +1 -2
  102. package/dist/integrations/pages/AddConnectionWizard.js +291 -306
  103. package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
  104. package/dist/integrations/pages/ConnectionDetail.d.ts +1 -2
  105. package/dist/integrations/pages/ConnectionDetail.js +241 -246
  106. package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
  107. package/dist/integrations/pages/ConnectionLogs.d.ts +1 -2
  108. package/dist/integrations/pages/ConnectionLogs.js +154 -155
  109. package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
  110. package/dist/integrations/pages/ConnectionsList.d.ts +1 -2
  111. package/dist/integrations/pages/ConnectionsList.js +40 -41
  112. package/dist/integrations/pages/ConnectionsList.js.map +1 -1
  113. package/dist/integrations/pages/ConnectorReviewQueuePage.d.ts +1 -2
  114. package/dist/integrations/pages/ConnectorReviewQueuePage.js +9 -10
  115. package/dist/integrations/pages/ConnectorReviewQueuePage.js.map +1 -1
  116. package/dist/integrations/pages/ConnectorSubmissionsPage.d.ts +1 -2
  117. package/dist/integrations/pages/ConnectorSubmissionsPage.js +138 -139
  118. package/dist/integrations/pages/ConnectorSubmissionsPage.js.map +1 -1
  119. package/dist/integrations/pages/IntegrationsOverview.d.ts +1 -2
  120. package/dist/integrations/pages/IntegrationsOverview.js +35 -36
  121. package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
  122. package/dist/integrations/pages/IntegrationsSettings.d.ts +1 -2
  123. package/dist/integrations/pages/IntegrationsSettings.js +7 -8
  124. package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
  125. package/dist/integrations/pages/IntegrationsUserLandingPage.d.ts +1 -2
  126. package/dist/integrations/pages/IntegrationsUserLandingPage.js +1 -2
  127. package/dist/integrations/pages/IntegrationsUserLandingPage.js.map +1 -1
  128. package/dist/integrations/pages/MailboxInbox.d.ts +1 -2
  129. package/dist/integrations/pages/MailboxInbox.js +442 -280
  130. package/dist/integrations/pages/MailboxInbox.js.map +1 -1
  131. package/dist/integrations/pages/ProviderCatalog.d.ts +1 -2
  132. package/dist/integrations/pages/ProviderCatalog.js +107 -108
  133. package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
  134. package/dist/integrations/pages/ProviderDetail.d.ts +1 -2
  135. package/dist/integrations/pages/ProviderDetail.js +21 -22
  136. package/dist/integrations/pages/ProviderDetail.js.map +1 -1
  137. package/dist/integrations/pages/ProviderEditorPage.d.ts +1 -2
  138. package/dist/integrations/pages/ProviderEditorPage.js +261 -264
  139. package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
  140. package/dist/integrations/providers/IntegrationsProvider.d.ts +0 -2
  141. package/dist/integrations/providers/IntegrationsProvider.js +109 -96
  142. package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
  143. package/dist/integrations/store/integrationsStore.d.ts +0 -2
  144. package/dist/integrations/store/integrationsStore.js +1 -2
  145. package/dist/integrations/store/integrationsStore.js.map +1 -1
  146. package/dist/integrations/store/mailboxStore.d.ts +3 -2
  147. package/dist/integrations/store/mailboxStore.js +8 -2
  148. package/dist/integrations/store/mailboxStore.js.map +1 -1
  149. package/dist/integrations/translations/en.d.ts +0 -1
  150. package/dist/integrations/types/index.d.ts +0 -1
  151. package/dist/integrations/utils/appearance.d.ts +0 -1
  152. package/dist/integrations/utils/appearance.js +1 -2
  153. package/dist/integrations/utils/appearance.js.map +1 -1
  154. package/dist/integrations/utils/cn.d.ts +0 -2
  155. package/dist/integrations/utils/cn.js +2 -3
  156. package/dist/integrations/utils/cn.js.map +1 -1
  157. package/dist/integrations/utils/constants.d.ts +0 -1
  158. package/dist/integrations/utils/constants.js +1 -2
  159. package/dist/integrations/utils/constants.js.map +1 -1
  160. package/dist/integrations/utils/integrationsHelpers.d.ts +0 -2
  161. package/dist/integrations/utils/integrationsHelpers.js +1 -2
  162. package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
  163. package/dist/integrations/utils/mailHtml.d.ts +31 -0
  164. package/dist/integrations/utils/mailHtml.js +126 -0
  165. package/dist/integrations/utils/mailHtml.js.map +1 -0
  166. package/dist/integrations/utils/mappers.d.ts +0 -2
  167. package/dist/integrations/utils/mappers.js +2 -3
  168. package/dist/integrations/utils/mappers.js.map +1 -1
  169. package/dist/integrations/utils/navigation.d.ts +0 -1
  170. package/dist/integrations/utils/navigation.js +2 -8
  171. package/dist/integrations/utils/navigation.js.map +1 -1
  172. package/dist/integrations/utils/paths.d.ts +0 -1
  173. package/dist/integrations/utils/paths.js +1 -2
  174. package/dist/integrations/utils/paths.js.map +1 -1
  175. package/dist/node_modules/clsx/dist/clsx.js +8 -7
  176. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  177. package/dist/node_modules/dompurify/dist/purify.es.js +878 -0
  178. package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -0
  179. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +229 -167
  180. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  181. package/dist/utils/nativeBridge.d.ts +0 -1
  182. package/dist/utils/nativeBridge.js +1 -2
  183. package/package.json +67 -50
  184. package/dist/dev/main.d.ts.map +0 -1
  185. package/dist/generated/global-operations.d.ts.map +0 -1
  186. package/dist/generated/global-types.d.ts.map +0 -1
  187. package/dist/generated/wspace-operations.d.ts.map +0 -1
  188. package/dist/generated/wspace-types.d.ts.map +0 -1
  189. package/dist/index.d.ts.map +0 -1
  190. package/dist/integrations/ConnectSourceDialog.d.ts.map +0 -1
  191. package/dist/integrations/ConnectionsPanel.d.ts.map +0 -1
  192. package/dist/integrations/IntegrationsAdminRoot.d.ts.map +0 -1
  193. package/dist/integrations/IntegrationsAdminRoutes.d.ts.map +0 -1
  194. package/dist/integrations/IntegrationsRoot.d.ts.map +0 -1
  195. package/dist/integrations/IntegrationsUserRoutes.d.ts.map +0 -1
  196. package/dist/integrations/components/AddConnectionDialog.d.ts.map +0 -1
  197. package/dist/integrations/components/AuthMethodsEditor.d.ts.map +0 -1
  198. package/dist/integrations/components/ConfirmDialog.d.ts.map +0 -1
  199. package/dist/integrations/components/ConnectionCard.d.ts.map +0 -1
  200. package/dist/integrations/components/ConnectionModalFrame.d.ts.map +0 -1
  201. package/dist/integrations/components/ConnectionSharing.d.ts.map +0 -1
  202. package/dist/integrations/components/ConnectionStatusBadge.d.ts.map +0 -1
  203. package/dist/integrations/components/ConnectorSubmissionCard.d.ts.map +0 -1
  204. package/dist/integrations/components/ConnectorSubmissionPager.d.ts.map +0 -1
  205. package/dist/integrations/components/ProviderCard.d.ts.map +0 -1
  206. package/dist/integrations/constants/featureFlags.d.ts.map +0 -1
  207. package/dist/integrations/constants/permissions.d.ts.map +0 -1
  208. package/dist/integrations/events/integrations-events.d.ts.map +0 -1
  209. package/dist/integrations/events/useIntegrationsEventBus.d.ts.map +0 -1
  210. package/dist/integrations/hooks/useConnections.d.ts.map +0 -1
  211. package/dist/integrations/hooks/useConnectorSubmissions.d.ts.map +0 -1
  212. package/dist/integrations/hooks/useFormatDate.d.ts.map +0 -1
  213. package/dist/integrations/hooks/useFormatLastUsed.d.ts.map +0 -1
  214. package/dist/integrations/hooks/useLabel.d.ts.map +0 -1
  215. package/dist/integrations/hooks/useLogs.d.ts.map +0 -1
  216. package/dist/integrations/hooks/useMailbox.d.ts.map +0 -1
  217. package/dist/integrations/hooks/useProviders.d.ts.map +0 -1
  218. package/dist/integrations/hooks/useTr.d.ts.map +0 -1
  219. package/dist/integrations/index.d.ts.map +0 -1
  220. package/dist/integrations/pages/AddConnectionWizard.d.ts.map +0 -1
  221. package/dist/integrations/pages/ConnectionDetail.d.ts.map +0 -1
  222. package/dist/integrations/pages/ConnectionLogs.d.ts.map +0 -1
  223. package/dist/integrations/pages/ConnectionsList.d.ts.map +0 -1
  224. package/dist/integrations/pages/ConnectorReviewQueuePage.d.ts.map +0 -1
  225. package/dist/integrations/pages/ConnectorSubmissionsPage.d.ts.map +0 -1
  226. package/dist/integrations/pages/IntegrationsOverview.d.ts.map +0 -1
  227. package/dist/integrations/pages/IntegrationsSettings.d.ts.map +0 -1
  228. package/dist/integrations/pages/IntegrationsUserLandingPage.d.ts.map +0 -1
  229. package/dist/integrations/pages/MailboxInbox.d.ts.map +0 -1
  230. package/dist/integrations/pages/ProviderCatalog.d.ts.map +0 -1
  231. package/dist/integrations/pages/ProviderDetail.d.ts.map +0 -1
  232. package/dist/integrations/pages/ProviderEditorPage.d.ts.map +0 -1
  233. package/dist/integrations/providers/IntegrationsProvider.d.ts.map +0 -1
  234. package/dist/integrations/store/integrationsStore.d.ts.map +0 -1
  235. package/dist/integrations/store/mailboxStore.d.ts.map +0 -1
  236. package/dist/integrations/translations/en.d.ts.map +0 -1
  237. package/dist/integrations/types/index.d.ts.map +0 -1
  238. package/dist/integrations/utils/appearance.d.ts.map +0 -1
  239. package/dist/integrations/utils/cn.d.ts.map +0 -1
  240. package/dist/integrations/utils/constants.d.ts.map +0 -1
  241. package/dist/integrations/utils/integrationsHelpers.d.ts.map +0 -1
  242. package/dist/integrations/utils/mappers.d.ts.map +0 -1
  243. package/dist/integrations/utils/navigation.d.ts.map +0 -1
  244. package/dist/integrations/utils/paths.d.ts.map +0 -1
  245. package/dist/utils/nativeBridge.d.ts.map +0 -1
@@ -1,81 +1,62 @@
1
- import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
1
+ import { cn as e } from "../utils/cn.js";
2
2
  import { useTr as t } from "../hooks/useTr.js";
3
- import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
4
- import { joinPath as r } from "../utils/navigation.js";
5
- import { cn as i } from "../utils/cn.js";
6
- import { useGetConnectionLazyQuery as ee } from "../../generated/wspace-operations.js";
3
+ import { useAuthTypeLabel as n, useCategoryLabel as r } from "../hooks/useLabel.js";
4
+ import { useIntegrations as i } from "../providers/IntegrationsProvider.js";
5
+ import { INTEGRATION_PERMISSIONS as ee } from "../constants/permissions.js";
6
+ import { joinPath as a } from "../utils/navigation.js";
7
7
  import { useProvider as te, useProviderByKey as ne, useProviders as re } from "../hooks/useProviders.js";
8
8
  import { useAuthenticateWithApiKey as ie, useAuthenticateWithBasicAuth as ae, useAuthenticateWithBearerToken as oe, useAuthenticateWithCustomConfig as se, useAuthenticateWithServiceAccount as ce, useCreateConnection as le, useInitiateOAuth as ue } from "../hooks/useConnections.js";
9
- import { useAuthTypeLabel as de, useCategoryLabel as fe } from "../hooks/useLabel.js";
10
- import { useCallback as a, useEffect as pe, useMemo as o, useRef as me, useState as s } from "react";
11
- import { AlertCircle as c, ArrowLeft as he, ArrowRight as ge, Check as _e, CheckCircle2 as ve, ExternalLink as ye, Key as be, Link as xe, Loader2 as l, Lock as Se, Search as Ce, Shield as we } from "lucide-react";
12
- import { useLocation as Te, useParams as Ee } from "react-router";
13
- import { useApolloClient as De } from "@apollo/client/react";
14
- import { usePermissions as Oe } from "@burdenoff/fe-libs/shared/providers/shell";
15
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
16
- import { CredentialStorageSelector as ke, ProviderIcon as f, createConnectionsApi as Ae, waitForOAuthCompletion as je } from "@burdenoff/fe-libs/connections";
17
- import { Button as p, GlassCard as Me, IllustratedEmptyState as Ne, PagePurpose as Pe } from "@burdenoff/fe-libs/ui";
18
- import { SchemaForm as Fe, initialValuesFromSchema as Ie, isSchemaComplete as Le, parseFormSchema as Re, visibleValues as ze } from "@burdenoff/fe-libs/credentials";
19
- //#region src/integrations/pages/AddConnectionWizard.tsx
20
- function m() {
21
- let { providerId: m } = Ee(), { basePath: h = "/", navigate: g, apiGatewayUrl: _ } = e(), v = t(), Be = fe(), y = de(), b = Te().search, x = o(() => new URLSearchParams(b), [b]), S = x.get("providerKey") ?? null, C = x.get("returnTo") ?? null, w = x.get("channelId") ?? null, T = !!(C && w), { provider: Ve, loading: He } = ne(S ?? ""), { providers: E, loading: D } = re(), { hasPermission: Ue, isLoading: We } = Oe(), Ge = Ue(n.CONNECTION_CREATE), Ke = !We && Ue(n.VAULT_CREATE), qe = De(), Je = o(() => Ae(qe), [qe]), { createConnection: Ye, loading: Xe } = le(), { initiateOAuth: Ze, loading: Qe } = ue(), { authenticateWithApiKey: $e, loading: et } = ie(), { authenticateWithBasicAuth: tt, loading: nt } = ae(), { authenticateWithBearerToken: O, loading: rt } = oe(), { authenticateWithServiceAccount: it, loading: at } = ce(), { authenticateWithCustomConfig: k, loading: ot } = se(), [st] = ee({ fetchPolicy: "network-only" }), [A, j] = s(m || S ? "configure" : "select_provider"), [M, ct] = s(null), [N, lt] = s(""), [P, F] = s(""), [I, ut] = s(""), [L, dt] = s(""), [R, ft] = s(""), [z, pt] = s(""), [B, mt] = s(""), [ht, gt] = s({}), [V, _t] = s({
9
+ import { useGetConnectionLazyQuery as de } from "../../generated/wspace-operations.js";
10
+ import { useCallback as o, useEffect as fe, useMemo as s, useRef as pe, useState as c } from "react";
11
+ import { AlertCircle as l, ArrowLeft as u, ArrowRight as me, Check as he, CheckCircle2 as ge, ExternalLink as _e, Key as ve, Link as ye, Loader2 as d, Lock as be, Search as xe, Shield as Se } from "lucide-react";
12
+ import { useLocation as Ce, useParams as we } from "react-router";
13
+ import { useApolloClient as Te } from "@apollo/client/react";
14
+ import { usePermissions as Ee } from "@burdenoff/fe-libs/shared/providers/shell";
15
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
16
+ import { CredentialStorageSelector as De, ProviderIcon as Oe, createConnectionsApi as ke, waitForOAuthCompletion as Ae } from "@burdenoff/fe-libs/connections";
17
+ import { Button as m, GlassCard as je, IllustratedEmptyState as Me, PagePurpose as Ne } from "@burdenoff/fe-libs/ui";
18
+ import { SchemaForm as Pe, initialValuesFromSchema as Fe, isSchemaComplete as Ie, parseFormSchema as Le, visibleValues as Re } from "@burdenoff/fe-libs/credentials";
19
+ // src/integrations/pages/AddConnectionWizard.tsx
20
+ function h() {
21
+ let { providerId: h } = we(), { basePath: g = "/", navigate: _, apiGatewayUrl: v } = i(), y = t(), ze = r(), b = n(), Be = Ce().search, x = s(() => new URLSearchParams(Be), [Be]), S = x.get("providerKey") ?? null, C = x.get("returnTo") ?? null, w = x.get("channelId") ?? null, T = !!(C && w), { provider: Ve, loading: He } = ne(S ?? ""), { providers: E, loading: D } = re(), { hasPermission: Ue, isLoading: We } = Ee(), Ge = Ue(ee.CONNECTION_CREATE), Ke = !We && Ue(ee.VAULT_CREATE), qe = Te(), Je = s(() => ke(qe), [qe]), { createConnection: Ye, loading: Xe } = le(), { initiateOAuth: Ze, loading: Qe } = ue(), { authenticateWithApiKey: $e, loading: et } = ie(), { authenticateWithBasicAuth: O, loading: tt } = ae(), { authenticateWithBearerToken: nt, loading: rt } = oe(), { authenticateWithServiceAccount: k, loading: it } = ce(), { authenticateWithCustomConfig: at, loading: ot } = se(), [st] = de({ fetchPolicy: "network-only" }), [A, j] = c(h || S ? "configure" : "select_provider"), [M, ct] = c(null), [N, lt] = c(""), [P, F] = c(""), [I, ut] = c(""), [L, dt] = c(""), [R, ft] = c(""), [z, pt] = c(""), [B, mt] = c(""), [ht, gt] = c({}), [V, _t] = c({
22
22
  mode: "managed",
23
23
  vaultId: "",
24
24
  secretId: "",
25
25
  managedSecretName: ""
26
- }), [H, U] = s(""), [W, vt] = s(null), [yt, bt] = s(!1), G = me(null), K = me(null);
27
- pe(() => () => {
26
+ }), [H, U] = c(""), [W, vt] = c(null), [yt, bt] = c(!1), G = pe(null), K = pe(null);
27
+ fe(() => () => {
28
28
  K.current?.(), G.current && !G.current.closed && G.current.close();
29
29
  }, []);
30
- let q = o(() => !m || !E ? null : E.find((e) => e.id === m) || null, [m, E]), { provider: xt, loading: St } = te(m && !q && !D ? m : ""), J = o(() => Ve ?? q ?? xt, [
30
+ let q = s(() => !h || !E ? null : E.find((e) => e.id === h) || null, [h, E]), { provider: xt, loading: St } = te(h && !q && !D ? h : ""), J = s(() => Ve ?? q ?? xt, [
31
31
  Ve,
32
32
  q,
33
33
  xt
34
34
  ]);
35
- pe(() => {
36
- J && !M && A === "configure" && (ct(J), P || F(`${J.name} Connection`));
37
- }, [
38
- J,
39
- M,
40
- A,
41
- P
42
- ]);
43
- let Y = o(() => {
35
+ J && !M && A === "configure" && (ct(J), P || F(`${J.name} Connection`));
36
+ let Y = s(() => {
44
37
  if (!M) return null;
45
- let e = (M.authMethods ?? []).filter((e) => e.isEnabled);
46
- return Re((e.find((e) => e.authType === "custom") ?? e.find((e) => e.isDefault) ?? e[0] ?? null)?.configSchema ?? M.configSchema);
47
- }, [M]), X = o(() => ({
48
- ...Ie(Y),
38
+ let e = (M.authMethods ?? []).filter((e) => e.isEnabled), t = e.find((e) => e.authType === "custom") ?? e.find((e) => e.isDefault) ?? e[0] ?? null;
39
+ return Le(t?.configSchema ?? M.configSchema);
40
+ }, [M]), X = s(() => ({
41
+ ...Fe(Y),
49
42
  ...ht
50
- }), [Y, ht]), Ct = o(() => {
43
+ }), [Y, ht]), Ct = s(() => {
51
44
  let e = (E ?? []).filter((e) => e.pluginStatus === "installed" && e.isEnabled);
52
45
  if (!N) return e;
53
46
  let t = N.toLowerCase();
54
47
  return e.filter((e) => e.name.toLowerCase().includes(t) || (e.description ?? "").toLowerCase().includes(t));
55
- }, [E, N]), wt = a((e) => {
48
+ }, [E, N]), wt = o((e) => {
56
49
  ct(e), gt({}), F(`${e.name} Connection`), j("configure");
57
- }, []), Tt = a(() => {
58
- if (!P.trim()) {
59
- U(v("integrations.addConnection.errors.nameRequired", "Connection name is required"));
60
- return;
61
- }
62
- if (!V.vaultId) {
63
- U(v("integrations.addConnection.errors.vaultRequired", "Please select a vault for storing or referencing credentials"));
64
- return;
65
- }
66
- if (V.mode === "existing" && !V.secretId) {
67
- U(v("integrations.addConnection.errors.secretRequired", "Please select an existing vault secret to reuse"));
68
- return;
69
- }
70
- U(""), j("authenticate");
50
+ }, []), Tt = o(() => {
51
+ P.trim() ? V.vaultId ? V.mode === "existing" && !V.secretId ? U(y("integrations.addConnection.errors.secretRequired", "Please select an existing vault secret to reuse")) : (U(""), j("authenticate")) : U(y("integrations.addConnection.errors.vaultRequired", "Please select a vault for storing or referencing credentials")) : U(y("integrations.addConnection.errors.nameRequired", "Connection name is required"));
71
52
  }, [
72
53
  P,
73
54
  V,
74
- v
75
- ]), Et = a(async () => {
55
+ y
56
+ ]), Et = o(async () => {
76
57
  if (M) try {
77
58
  U("");
78
- let e = _ ? `${_}/integrations/oauth/callback` : "/integrations/oauth/callback", t = T ? {
59
+ let e = v ? `${v}/integrations/oauth/callback` : "/integrations/oauth/callback", t = T ? {
79
60
  returnTo: C,
80
61
  channelId: w
81
62
  } : void 0, n = W ?? await Ye({
@@ -88,95 +69,100 @@ function m() {
88
69
  ...t ? { config: t } : {}
89
70
  });
90
71
  if (!n) {
91
- U(v("integrations.addConnection.errors.createFailed", "Failed to create connection")), j("error");
72
+ U(y("integrations.addConnection.errors.createFailed", "Failed to create connection")), j("error");
92
73
  return;
93
74
  }
94
75
  switch (vt(n), M.authType) {
95
76
  case "oauth2": {
96
77
  let t = await Ze(n, e, M.key);
97
- if (t?.redirectUrl) if (T) {
98
- window.location.href = t.redirectUrl;
99
- return;
100
- } else {
101
- let e = window.screenX + (window.innerWidth - 600) / 2, r = window.screenY + (window.innerHeight - 700) / 2, i = window.open(t.redirectUrl, "oauth_popup", `width=600,height=700,left=${e},top=${r},toolbar=no,menubar=no,scrollbars=yes,resizable=yes`);
102
- if (!i) {
103
- U(v("integrations.addConnection.authentication.popupBlocked", "Popup was blocked. Please allow popups for this site and try again.")), j("error");
78
+ if (t?.redirectUrl) {
79
+ if (T) {
80
+ window.location.href = t.redirectUrl;
104
81
  return;
105
82
  }
106
- G.current = i, bt(!0), K.current?.(), K.current = je({
107
- connectionId: n,
108
- popup: i,
109
- fetchConnection: async () => {
110
- let { data: e } = await st({ variables: { id: n } });
111
- return e?.getConnection ?? null;
112
- },
113
- onSuccess: () => {
114
- j("success");
115
- },
116
- onError: (e) => {
117
- U(e), j("error");
118
- },
119
- onSettled: () => {
120
- K.current = null, G.current = null, bt(!1);
83
+ {
84
+ let e = window.screenX + (window.innerWidth - 600) / 2, r = window.screenY + (window.innerHeight - 700) / 2, i = window.open(t.redirectUrl, "oauth_popup", `width=600,height=700,left=${e},top=${r},toolbar=no,menubar=no,scrollbars=yes,resizable=yes`);
85
+ if (!i) {
86
+ U(y("integrations.addConnection.authentication.popupBlocked", "Popup was blocked. Please allow popups for this site and try again.")), j("error");
87
+ return;
121
88
  }
122
- });
123
- return;
89
+ G.current = i, bt(!0), K.current?.(), K.current = Ae({
90
+ connectionId: n,
91
+ popup: i,
92
+ fetchConnection: async () => {
93
+ let { data: e } = await st({ variables: { id: n } });
94
+ return e?.getConnection ?? null;
95
+ },
96
+ onSuccess: () => {
97
+ j("success");
98
+ },
99
+ onError: (e) => {
100
+ U(e), j("error");
101
+ },
102
+ onSettled: () => {
103
+ K.current = null, G.current = null, bt(!1);
104
+ }
105
+ });
106
+ return;
107
+ }
124
108
  }
125
109
  j("success");
126
110
  break;
127
111
  }
128
112
  case "api_key":
129
113
  if (!L.trim()) {
130
- U(v("integrations.addConnection.errors.apiKeyRequired", "API key is required"));
114
+ U(y("integrations.addConnection.errors.apiKeyRequired", "API key is required"));
131
115
  return;
132
116
  }
133
117
  await $e(n, L.trim()), j("success");
134
118
  break;
135
119
  case "basic_auth":
136
120
  if (!R.trim() || !z.trim()) {
137
- U(v("integrations.addConnection.errors.basicAuthRequired", "Username and password are required"));
121
+ U(y("integrations.addConnection.errors.basicAuthRequired", "Username and password are required"));
138
122
  return;
139
123
  }
140
- await tt(n, R.trim(), z.trim()), j("success");
124
+ await O(n, R.trim(), z.trim()), j("success");
141
125
  break;
142
126
  case "bearer_token":
143
127
  if (!B.trim()) {
144
- U(v("integrations.addConnection.errors.bearerTokenRequired", "Bearer token is required"));
128
+ U(y("integrations.addConnection.errors.bearerTokenRequired", "Bearer token is required"));
145
129
  return;
146
130
  }
147
- await O(n, B.trim()), j("success");
131
+ await nt(n, B.trim()), j("success");
148
132
  break;
149
133
  case "service_account":
150
- await it(n, M.defaultScopes && M.defaultScopes.length > 0 ? M.defaultScopes : void 0), j("success");
134
+ await k(n, M.defaultScopes && M.defaultScopes.length > 0 ? M.defaultScopes : void 0), j("success");
151
135
  break;
152
136
  case "custom": {
153
137
  if (!Y) {
154
- U(v("integrations.addConnection.authentication.custom.missingSchema", "This provider does not declare a configuration form."));
138
+ U(y("integrations.addConnection.authentication.custom.missingSchema", "This provider does not declare a configuration form."));
155
139
  return;
156
140
  }
157
- if (!Le(Y, X)) {
158
- U(v("integrations.addConnection.errors.fieldsRequired", "Please fill in all required fields"));
141
+ if (!Ie(Y, X)) {
142
+ U(y("integrations.addConnection.errors.fieldsRequired", "Please fill in all required fields"));
159
143
  return;
160
144
  }
161
145
  let e = {};
162
- for (let [t, n] of Object.entries(ze(Y, X))) if (t in Y.properties) if (typeof n == "string") {
163
- let r = n.trim();
164
- r && (e[t] = r);
165
- } else n != null && (e[t] = n);
166
- await k(n, e), j("success");
146
+ for (let [t, n] of Object.entries(Re(Y, X))) if (t in Y.properties) {
147
+ if (typeof n == "string") {
148
+ let r = n.trim();
149
+ r && (e[t] = r);
150
+ } else n != null && (e[t] = n);
151
+ }
152
+ await at(n, e), j("success");
167
153
  break;
168
154
  }
169
155
  default: j("success");
170
156
  }
171
157
  } catch (e) {
172
- U(e instanceof Error ? e.message : v("integrations.addConnection.errors.authFailed", "Authentication failed")), j("error");
158
+ U(e instanceof Error ? e.message : y("integrations.addConnection.errors.authFailed", "Authentication failed")), j("error");
173
159
  }
174
160
  }, [
175
161
  M,
176
162
  P,
177
163
  I,
178
164
  L,
179
- v,
165
+ y,
180
166
  R,
181
167
  z,
182
168
  B,
@@ -186,568 +172,567 @@ function m() {
186
172
  Ze,
187
173
  st,
188
174
  $e,
189
- tt,
190
175
  O,
191
- it,
176
+ nt,
192
177
  k,
178
+ at,
193
179
  T,
194
180
  C,
195
181
  w,
196
- _,
182
+ v,
197
183
  W,
198
184
  V
199
- ]), Dt = a(() => {
185
+ ]), Dt = o(() => {
200
186
  if (!C || !W) return;
201
187
  let e = new URL(C, window.location.origin);
202
- e.searchParams.set("integrationConnectionId", W), w && e.searchParams.set("channelId", w), g?.(e.pathname + e.search);
188
+ e.searchParams.set("integrationConnectionId", W), w && e.searchParams.set("channelId", w), _?.(e.pathname + e.search);
203
189
  }, [
204
190
  C,
205
191
  W,
206
192
  w,
207
- g
208
- ]), Z = Xe || Qe || yt || et || nt || rt || at || ot, Ot = S ? He : D || St, Q = [
193
+ _
194
+ ]), Z = Xe || Qe || yt || et || tt || rt || it || ot, Ot = S ? He : D || St, Q = [
209
195
  {
210
196
  key: "select_provider",
211
- label: v("integrations.addConnection.steps.selectProvider", "Select Provider")
197
+ label: y("integrations.addConnection.steps.selectProvider", "Select Provider")
212
198
  },
213
199
  {
214
200
  key: "configure",
215
- label: v("integrations.addConnection.steps.configure", "Configure")
201
+ label: y("integrations.addConnection.steps.configure", "Configure")
216
202
  },
217
203
  {
218
204
  key: "authenticate",
219
- label: v("integrations.addConnection.steps.authenticate", "Authenticate")
205
+ label: y("integrations.addConnection.steps.authenticate", "Authenticate")
220
206
  }
221
207
  ], $ = Q.findIndex((e) => e.key === A);
222
- return We ? /* @__PURE__ */ u("div", {
208
+ return We ? /* @__PURE__ */ f("div", {
223
209
  className: "flex items-center justify-center py-20",
224
- children: /* @__PURE__ */ u(l, {
210
+ children: /* @__PURE__ */ f(d, {
225
211
  size: 48,
226
212
  className: "animate-spin text-primary"
227
213
  })
228
- }) : Ge ? /* @__PURE__ */ d("div", {
214
+ }) : Ge ? /* @__PURE__ */ p("div", {
229
215
  className: "space-y-6 p-6 max-w-3xl mx-auto",
230
216
  children: [
231
- /* @__PURE__ */ d("div", {
217
+ /* @__PURE__ */ p("div", {
232
218
  className: "flex items-center gap-4",
233
219
  children: [
234
- /* @__PURE__ */ u(p, {
220
+ /* @__PURE__ */ f(m, {
235
221
  variant: "ghost",
236
222
  size: "icon",
237
- onClick: () => g?.(r(h, "connections")),
238
- "aria-label": v("integrations.common.back", "Back"),
239
- children: /* @__PURE__ */ u(he, { size: 20 })
223
+ onClick: () => _?.(a(g, "connections")),
224
+ "aria-label": y("integrations.common.back", "Back"),
225
+ children: /* @__PURE__ */ f(u, { size: 20 })
240
226
  }),
241
- /* @__PURE__ */ u("h1", {
227
+ /* @__PURE__ */ f("h1", {
242
228
  className: "text-2xl font-bold text-text-primary",
243
- children: v("integrations.addConnection.title", "Add Connection")
229
+ children: y("integrations.addConnection.title", "Add Connection")
244
230
  }),
245
- T && /* @__PURE__ */ u("span", {
231
+ T && /* @__PURE__ */ f("span", {
246
232
  className: "ml-auto text-xs font-medium px-2.5 py-1 rounded-full bg-action-primary-bg/10 text-primary",
247
- children: v("integrations.addConnection.botChannelSetup", "Bot Channel Setup")
233
+ children: y("integrations.addConnection.botChannelSetup", "Bot Channel Setup")
248
234
  })
249
235
  ]
250
236
  }),
251
- A !== "success" && A !== "error" && /* @__PURE__ */ u(Pe, {
252
- icon: /* @__PURE__ */ u(xe, { size: 16 }),
253
- children: T ? v("integrations.addConnection.botChannelPurpose", "Connect an external account so your bot channel can act on your behalf. Pick the service, name the connection, choose where its credentials live, then authenticate — you will be sent back to finish linking the channel.") : v("integrations.addConnection.purpose", "A connection is a one-time, authenticated link between your workspace and an external service. Choose a provider, give the connection a recognizable name, decide where its credentials are stored, then authenticate. Once created, the rest of the platform can reuse it without asking you to log in again.")
237
+ A !== "success" && A !== "error" && /* @__PURE__ */ f(Ne, {
238
+ icon: /* @__PURE__ */ f(ye, { size: 16 }),
239
+ children: T ? y("integrations.addConnection.botChannelPurpose", "Connect an external account so your bot channel can act on your behalf. Pick the service, name the connection, choose where its credentials live, then authenticate — you will be sent back to finish linking the channel.") : y("integrations.addConnection.purpose", "A connection is a one-time, authenticated link between your workspace and an external service. Choose a provider, give the connection a recognizable name, decide where its credentials are stored, then authenticate. Once created, the rest of the platform can reuse it without asking you to log in again.")
254
240
  }),
255
- A !== "success" && A !== "error" && /* @__PURE__ */ u("div", {
241
+ A !== "success" && A !== "error" && /* @__PURE__ */ f("div", {
256
242
  className: "flex items-center gap-2",
257
- children: Q.map((e, t) => /* @__PURE__ */ d("div", {
243
+ children: Q.map((t, n) => /* @__PURE__ */ p("div", {
258
244
  className: "flex items-center gap-2",
259
245
  children: [
260
- /* @__PURE__ */ u("div", {
261
- className: i("w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium transition-all", t < $ ? "bg-action-primary-bg text-action-primary-text" : t === $ ? "bg-action-primary-bg text-action-primary-text ring-4 ring-primary/20" : "bg-bg-sunken text-text-secondary"),
262
- children: t < $ ? /* @__PURE__ */ u(_e, { size: 16 }) : t + 1
246
+ /* @__PURE__ */ f("div", {
247
+ className: e("w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium transition-all", n < $ ? "bg-action-primary-bg text-action-primary-text" : n === $ ? "bg-action-primary-bg text-action-primary-text ring-4 ring-primary/20" : "bg-bg-sunken text-text-secondary"),
248
+ children: n < $ ? /* @__PURE__ */ f(he, { size: 16 }) : n + 1
263
249
  }),
264
- /* @__PURE__ */ u("span", {
265
- className: i("text-sm font-medium hidden sm:inline", t === $ ? "text-text-primary" : "text-text-secondary"),
266
- children: e.label
250
+ /* @__PURE__ */ f("span", {
251
+ className: e("text-sm font-medium hidden sm:inline", n === $ ? "text-text-primary" : "text-text-secondary"),
252
+ children: t.label
267
253
  }),
268
- t < Q.length - 1 && /* @__PURE__ */ u("div", { className: "w-8 h-px bg-border" })
254
+ n < Q.length - 1 && /* @__PURE__ */ f("div", { className: "w-8 h-px bg-border" })
269
255
  ]
270
- }, e.key))
256
+ }, t.key))
271
257
  }),
272
- H && A !== "error" && /* @__PURE__ */ d("div", {
258
+ H && A !== "error" && /* @__PURE__ */ p("div", {
273
259
  className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-4 flex items-center gap-3",
274
- children: [/* @__PURE__ */ u(c, {
260
+ children: [/* @__PURE__ */ f(l, {
275
261
  size: 20,
276
262
  className: "text-status-error-text flex-shrink-0"
277
- }), /* @__PURE__ */ u("p", {
263
+ }), /* @__PURE__ */ f("p", {
278
264
  className: "text-sm text-status-error-text",
279
265
  children: H
280
266
  })]
281
267
  }),
282
- A === "configure" && Ot && !M && /* @__PURE__ */ u("div", {
268
+ A === "configure" && Ot && !M && /* @__PURE__ */ f("div", {
283
269
  className: "flex items-center justify-center py-12",
284
- children: /* @__PURE__ */ u(l, {
270
+ children: /* @__PURE__ */ f(d, {
285
271
  size: 24,
286
272
  className: "animate-spin text-text-secondary"
287
273
  })
288
274
  }),
289
- A === "configure" && !Ot && !M && (m || S) && /* @__PURE__ */ d("div", {
275
+ A === "configure" && !Ot && !M && (h || S) && /* @__PURE__ */ p("div", {
290
276
  className: "flex flex-col items-center justify-center py-12 text-center",
291
- children: [/* @__PURE__ */ u(c, {
277
+ children: [/* @__PURE__ */ f(l, {
292
278
  size: 32,
293
279
  className: "text-text-secondary mb-3"
294
- }), /* @__PURE__ */ u("p", {
280
+ }), /* @__PURE__ */ f("p", {
295
281
  className: "text-sm text-text-secondary",
296
- children: v("integrations.addConnection.providerUnavailable", "This provider isn't available.")
282
+ children: y("integrations.addConnection.providerUnavailable", "This provider isn't available.")
297
283
  })]
298
284
  }),
299
- A === "select_provider" && /* @__PURE__ */ d("div", {
285
+ A === "select_provider" && /* @__PURE__ */ p("div", {
300
286
  className: "space-y-4",
301
287
  children: [
302
- /* @__PURE__ */ d("div", {
288
+ /* @__PURE__ */ p("div", {
303
289
  className: "relative group",
304
- children: [/* @__PURE__ */ u(Ce, {
290
+ children: [/* @__PURE__ */ f(xe, {
305
291
  size: 18,
306
292
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
307
- }), /* @__PURE__ */ u("input", {
293
+ }), /* @__PURE__ */ f("input", {
308
294
  type: "text",
309
- placeholder: v("integrations.addConnection.search.placeholder", "Search installed providers..."),
310
- "aria-label": v("integrations.addConnection.search.ariaLabel", "Search installed providers"),
295
+ placeholder: y("integrations.addConnection.search.placeholder", "Search installed providers..."),
296
+ "aria-label": y("integrations.addConnection.search.ariaLabel", "Search installed providers"),
311
297
  value: N,
312
298
  onChange: (e) => lt(e.target.value),
313
299
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
314
300
  })]
315
301
  }),
316
- D && /* @__PURE__ */ u("div", {
302
+ D && /* @__PURE__ */ f("div", {
317
303
  className: "flex items-center justify-center py-12",
318
- children: /* @__PURE__ */ u(l, {
304
+ children: /* @__PURE__ */ f(d, {
319
305
  size: 24,
320
306
  className: "animate-spin text-text-secondary"
321
307
  })
322
308
  }),
323
- !D && Ct.length === 0 && /* @__PURE__ */ u(Ne, {
309
+ !D && Ct.length === 0 && /* @__PURE__ */ f(Me, {
324
310
  illustration: N ? "empty-search" : "empty-data",
325
- title: N ? v("integrations.addConnection.empty.noMatchingProviders", "No matching providers") : v("integrations.addConnection.empty.noInstalledProviders", "No installed providers yet"),
326
- description: N ? v("integrations.addConnection.empty.matchingDescription", "No installed provider matches your search. Try a different term or install one from the catalog.") : v("integrations.addConnection.empty.installedDescription", "You need at least one installed, enabled provider before you can create a connection. Install one from the catalog to get started."),
327
- action: /* @__PURE__ */ u(p, {
328
- onClick: () => g?.(r(h, "providers")),
329
- children: v("integrations.addConnection.empty.browseCatalog", "Browse Catalog")
311
+ title: N ? y("integrations.addConnection.empty.noMatchingProviders", "No matching providers") : y("integrations.addConnection.empty.noInstalledProviders", "No installed providers yet"),
312
+ description: N ? y("integrations.addConnection.empty.matchingDescription", "No installed provider matches your search. Try a different term or install one from the catalog.") : y("integrations.addConnection.empty.installedDescription", "You need at least one installed, enabled provider before you can create a connection. Install one from the catalog to get started."),
313
+ action: /* @__PURE__ */ f(m, {
314
+ onClick: () => _?.(a(g, "providers")),
315
+ children: y("integrations.addConnection.empty.browseCatalog", "Browse Catalog")
330
316
  })
331
317
  }),
332
- /* @__PURE__ */ u("div", {
318
+ /* @__PURE__ */ f("div", {
333
319
  className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
334
- children: Ct.map((e) => /* @__PURE__ */ d("button", {
320
+ children: Ct.map((t) => /* @__PURE__ */ p("button", {
335
321
  type: "button",
336
- onClick: () => wt(e),
337
- className: i("flex items-start gap-3 p-4 rounded-xl border border-border-seam bg-bg-surface text-left", "hover:border-border-strong hover:shadow-[var(--shadow-pop)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", "transition-[box-shadow,border-color] duration-200"),
338
- children: [/* @__PURE__ */ u(f, {
339
- provider: e,
322
+ onClick: () => wt(t),
323
+ className: e("flex items-start gap-3 p-4 rounded-xl border border-border-seam bg-bg-surface text-left", "hover:border-border-strong hover:shadow-[var(--shadow-pop)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", "transition-[box-shadow,border-color] duration-200"),
324
+ children: [/* @__PURE__ */ f(Oe, {
325
+ provider: t,
340
326
  size: 40
341
- }), /* @__PURE__ */ d("div", {
327
+ }), /* @__PURE__ */ p("div", {
342
328
  className: "flex-1 min-w-0",
343
- children: [/* @__PURE__ */ u("h3", {
329
+ children: [/* @__PURE__ */ f("h3", {
344
330
  className: "font-medium text-text-primary truncate",
345
- children: e.name
346
- }), /* @__PURE__ */ d("p", {
331
+ children: t.name
332
+ }), /* @__PURE__ */ p("p", {
347
333
  className: "text-xs text-text-secondary mt-0.5",
348
334
  children: [
349
- v(`integrations.category.${e.category}`, Be(e.category)),
335
+ y(`integrations.category.${t.category}`, ze(t.category)),
350
336
  " ",
351
337
  "·",
352
338
  " ",
353
- v(`integrations.authType.${e.authType}`, y(e.authType))
339
+ y(`integrations.authType.${t.authType}`, b(t.authType))
354
340
  ]
355
341
  })]
356
342
  })]
357
- }, e.id))
343
+ }, t.id))
358
344
  })
359
345
  ]
360
346
  }),
361
- A === "configure" && M && /* @__PURE__ */ d("div", {
347
+ A === "configure" && M && /* @__PURE__ */ p("div", {
362
348
  className: "space-y-6",
363
349
  children: [
364
- /* @__PURE__ */ d(Me, {
350
+ /* @__PURE__ */ p(je, {
365
351
  className: "flex items-center gap-3 p-4 border-border-seam",
366
- children: [/* @__PURE__ */ u(f, {
352
+ children: [/* @__PURE__ */ f(Oe, {
367
353
  provider: M,
368
354
  size: 40
369
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h3", {
355
+ }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h3", {
370
356
  className: "font-medium text-text-primary",
371
357
  children: M.name
372
- }), /* @__PURE__ */ u("p", {
358
+ }), /* @__PURE__ */ f("p", {
373
359
  className: "text-xs text-text-secondary",
374
- children: v(`integrations.authType.${M.authType}`, y(M.authType))
360
+ children: y(`integrations.authType.${M.authType}`, b(M.authType))
375
361
  })] })]
376
362
  }),
377
- /* @__PURE__ */ d("div", {
363
+ /* @__PURE__ */ p("div", {
378
364
  className: "space-y-4",
379
365
  children: [
380
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
366
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
381
367
  htmlFor: "conn-name",
382
368
  className: "block text-sm font-semibold mb-2",
383
369
  children: [
384
- v("integrations.addConnection.fields.connectionName", "Connection Name"),
370
+ y("integrations.addConnection.fields.connectionName", "Connection Name"),
385
371
  " ",
386
- /* @__PURE__ */ u("span", {
372
+ /* @__PURE__ */ f("span", {
387
373
  className: "text-status-error-text",
388
374
  children: "*"
389
375
  })
390
376
  ]
391
- }), /* @__PURE__ */ u("input", {
377
+ }), /* @__PURE__ */ f("input", {
392
378
  type: "text",
393
379
  id: "conn-name",
394
- "aria-label": v("integrations.addConnection.fields.connectionName", "Connection Name"),
380
+ "aria-label": y("integrations.addConnection.fields.connectionName", "Connection Name"),
395
381
  value: P,
396
382
  onChange: (e) => F(e.target.value),
397
- placeholder: v("integrations.addConnection.fields.connectionNamePlaceholder", "e.g., My Slack Workspace"),
383
+ placeholder: y("integrations.addConnection.fields.connectionNamePlaceholder", "e.g., My Slack Workspace"),
398
384
  className: "w-full px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
399
385
  })] }),
400
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
386
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
401
387
  htmlFor: "conn-desc",
402
388
  className: "block text-sm font-semibold mb-2",
403
- children: v("integrations.addConnection.fields.description", "Description")
404
- }), /* @__PURE__ */ u("textarea", {
389
+ children: y("integrations.addConnection.fields.description", "Description")
390
+ }), /* @__PURE__ */ f("textarea", {
405
391
  id: "conn-desc",
406
- "aria-label": v("integrations.addConnection.fields.description", "Description"),
392
+ "aria-label": y("integrations.addConnection.fields.description", "Description"),
407
393
  value: I,
408
394
  onChange: (e) => ut(e.target.value),
409
395
  rows: 3,
410
- placeholder: v("integrations.addConnection.fields.descriptionPlaceholder", "Optional description..."),
396
+ placeholder: y("integrations.addConnection.fields.descriptionPlaceholder", "Optional description..."),
411
397
  className: "w-full px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
412
398
  })] }),
413
- /* @__PURE__ */ u(ke, {
399
+ /* @__PURE__ */ f(De, {
414
400
  api: Je,
415
401
  value: V,
416
402
  onChange: _t,
417
403
  authType: M.authType,
418
404
  requireVault: !0,
419
405
  canCreateVault: Ke,
420
- translate: v
406
+ translate: y
421
407
  })
422
408
  ]
423
409
  }),
424
- /* @__PURE__ */ d("div", {
410
+ /* @__PURE__ */ p("div", {
425
411
  className: "flex gap-3",
426
- children: [/* @__PURE__ */ u(p, {
412
+ children: [/* @__PURE__ */ f(m, {
427
413
  variant: "outline",
428
- onClick: () => m || S ? g?.(r(h, "connections")) : j("select_provider"),
429
- children: v("integrations.addConnection.actions.back", "Back")
430
- }), /* @__PURE__ */ d(p, {
414
+ onClick: () => h || S ? _?.(a(g, "connections")) : j("select_provider"),
415
+ children: y("integrations.addConnection.actions.back", "Back")
416
+ }), /* @__PURE__ */ p(m, {
431
417
  onClick: Tt,
432
418
  children: [
433
- v("integrations.addConnection.actions.next", "Next"),
419
+ y("integrations.addConnection.actions.next", "Next"),
434
420
  " ",
435
- /* @__PURE__ */ u(ge, { size: 16 })
421
+ /* @__PURE__ */ f(me, { size: 16 })
436
422
  ]
437
423
  })]
438
424
  })
439
425
  ]
440
426
  }),
441
- A === "authenticate" && M && /* @__PURE__ */ d("div", {
427
+ A === "authenticate" && M && /* @__PURE__ */ p("div", {
442
428
  className: "space-y-6",
443
- children: [/* @__PURE__ */ d(Me, {
429
+ children: [/* @__PURE__ */ p(je, {
444
430
  treatment: "glass",
445
431
  glow: !0,
446
432
  className: "border-border-seam p-5",
447
433
  children: [
448
- /* @__PURE__ */ d("h2", {
434
+ /* @__PURE__ */ p("h2", {
449
435
  className: "font-semibold text-text-primary flex items-center gap-2 mb-4",
450
436
  children: [
451
- /* @__PURE__ */ u(we, {
437
+ /* @__PURE__ */ f(Se, {
452
438
  size: 18,
453
439
  className: "text-primary"
454
440
  }),
455
- v("integrations.addConnection.authentication.title", "Authentication"),
441
+ y("integrations.addConnection.authentication.title", "Authentication"),
456
442
  ":",
457
443
  " ",
458
- v(`integrations.authType.${M.authType}`, y(M.authType))
444
+ y(`integrations.authType.${M.authType}`, b(M.authType))
459
445
  ]
460
446
  }),
461
- M.authType === "oauth2" && /* @__PURE__ */ d("div", {
447
+ M.authType === "oauth2" && /* @__PURE__ */ p("div", {
462
448
  className: "space-y-4",
463
- children: [/* @__PURE__ */ u("p", {
449
+ children: [/* @__PURE__ */ f("p", {
464
450
  className: "text-sm text-text-secondary",
465
- children: v("integrations.addConnection.authentication.oauthRedirect", "You will be redirected to {{provider}} to authorize access. After granting permission, you'll be redirected back.", { provider: M.name })
466
- }), /* @__PURE__ */ d("div", {
451
+ children: y("integrations.addConnection.authentication.oauthRedirect", "You will be redirected to {{provider}} to authorize access. After granting permission, you'll be redirected back.", { provider: M.name })
452
+ }), /* @__PURE__ */ p("div", {
467
453
  className: "p-3 rounded-lg bg-status-info-bg-subtle border border-border-default text-sm text-status-info-text flex items-center gap-2",
468
- children: [/* @__PURE__ */ u(ye, { size: 16 }), T ? v("integrations.addConnection.authentication.botChannelRedirect", "You'll be redirected back to the bot channel setup after authorization.") : v("integrations.addConnection.authentication.oauthPopupInfo", "A new window will open for OAuth authentication")]
454
+ children: [/* @__PURE__ */ f(_e, { size: 16 }), T ? y("integrations.addConnection.authentication.botChannelRedirect", "You'll be redirected back to the bot channel setup after authorization.") : y("integrations.addConnection.authentication.oauthPopupInfo", "A new window will open for OAuth authentication")]
469
455
  })]
470
456
  }),
471
- M.authType === "api_key" && /* @__PURE__ */ d("div", {
457
+ M.authType === "api_key" && /* @__PURE__ */ p("div", {
472
458
  className: "space-y-4",
473
- children: [/* @__PURE__ */ u("p", {
459
+ children: [/* @__PURE__ */ f("p", {
474
460
  className: "text-sm text-text-secondary",
475
- children: v("integrations.addConnection.authentication.apiKeyHint", "Enter your {{provider}} API key. You can typically find this in your account settings.", { provider: M.name })
476
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
461
+ children: y("integrations.addConnection.authentication.apiKeyHint", "Enter your {{provider}} API key. You can typically find this in your account settings.", { provider: M.name })
462
+ }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
477
463
  htmlFor: "api-key",
478
464
  className: "block text-sm font-semibold mb-2",
479
465
  children: [
480
- v("integrations.addConnection.fields.apiKey", "API Key"),
466
+ y("integrations.addConnection.fields.apiKey", "API Key"),
481
467
  " ",
482
- /* @__PURE__ */ u("span", {
468
+ /* @__PURE__ */ f("span", {
483
469
  className: "text-status-error-text",
484
470
  children: "*"
485
471
  })
486
472
  ]
487
- }), /* @__PURE__ */ d("div", {
473
+ }), /* @__PURE__ */ p("div", {
488
474
  className: "relative",
489
- children: [/* @__PURE__ */ u(be, {
475
+ children: [/* @__PURE__ */ f(ve, {
490
476
  size: 16,
491
477
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
492
- }), /* @__PURE__ */ u("input", {
478
+ }), /* @__PURE__ */ f("input", {
493
479
  type: "password",
494
480
  id: "api-key",
495
- "aria-label": v("integrations.addConnection.fields.apiKey", "API Key"),
481
+ "aria-label": y("integrations.addConnection.fields.apiKey", "API Key"),
496
482
  value: L,
497
483
  onChange: (e) => dt(e.target.value),
498
- placeholder: v("integrations.addConnection.fields.apiKeyPlaceholder", "Enter your API key"),
484
+ placeholder: y("integrations.addConnection.fields.apiKeyPlaceholder", "Enter your API key"),
499
485
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
500
486
  })]
501
487
  })] })]
502
488
  }),
503
- M.authType === "basic_auth" && /* @__PURE__ */ d("div", {
489
+ M.authType === "basic_auth" && /* @__PURE__ */ p("div", {
504
490
  className: "space-y-4",
505
491
  children: [
506
- /* @__PURE__ */ u("p", {
492
+ /* @__PURE__ */ f("p", {
507
493
  className: "text-sm text-text-secondary",
508
- children: v("integrations.addConnection.authentication.basicAuthHint", "Enter your {{provider}} credentials.", { provider: M.name })
494
+ children: y("integrations.addConnection.authentication.basicAuthHint", "Enter your {{provider}} credentials.", { provider: M.name })
509
495
  }),
510
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
496
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
511
497
  htmlFor: "username",
512
498
  className: "block text-sm font-semibold mb-2",
513
499
  children: [
514
- v("integrations.addConnection.fields.username", "Username"),
500
+ y("integrations.addConnection.fields.username", "Username"),
515
501
  " ",
516
- /* @__PURE__ */ u("span", {
502
+ /* @__PURE__ */ f("span", {
517
503
  className: "text-status-error-text",
518
504
  children: "*"
519
505
  })
520
506
  ]
521
- }), /* @__PURE__ */ u("input", {
507
+ }), /* @__PURE__ */ f("input", {
522
508
  type: "text",
523
509
  id: "username",
524
- "aria-label": v("integrations.addConnection.fields.username", "Username"),
510
+ "aria-label": y("integrations.addConnection.fields.username", "Username"),
525
511
  value: R,
526
512
  onChange: (e) => ft(e.target.value),
527
- placeholder: v("integrations.addConnection.fields.usernamePlaceholder", "Username or email"),
513
+ placeholder: y("integrations.addConnection.fields.usernamePlaceholder", "Username or email"),
528
514
  className: "w-full px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
529
515
  })] }),
530
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
516
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
531
517
  htmlFor: "password",
532
518
  className: "block text-sm font-semibold mb-2",
533
519
  children: [
534
- v("integrations.addConnection.fields.password", "Password"),
520
+ y("integrations.addConnection.fields.password", "Password"),
535
521
  " ",
536
- /* @__PURE__ */ u("span", {
522
+ /* @__PURE__ */ f("span", {
537
523
  className: "text-status-error-text",
538
524
  children: "*"
539
525
  })
540
526
  ]
541
- }), /* @__PURE__ */ d("div", {
527
+ }), /* @__PURE__ */ p("div", {
542
528
  className: "relative",
543
- children: [/* @__PURE__ */ u(Se, {
529
+ children: [/* @__PURE__ */ f(be, {
544
530
  size: 16,
545
531
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
546
- }), /* @__PURE__ */ u("input", {
532
+ }), /* @__PURE__ */ f("input", {
547
533
  type: "password",
548
534
  id: "password",
549
- "aria-label": v("integrations.addConnection.fields.password", "Password"),
535
+ "aria-label": y("integrations.addConnection.fields.password", "Password"),
550
536
  value: z,
551
537
  onChange: (e) => pt(e.target.value),
552
- placeholder: v("integrations.addConnection.fields.passwordPlaceholder", "Password"),
538
+ placeholder: y("integrations.addConnection.fields.passwordPlaceholder", "Password"),
553
539
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
554
540
  })]
555
541
  })] })
556
542
  ]
557
543
  }),
558
- M.authType === "bearer_token" && /* @__PURE__ */ d("div", {
544
+ M.authType === "bearer_token" && /* @__PURE__ */ p("div", {
559
545
  className: "space-y-4",
560
- children: [/* @__PURE__ */ u("p", {
546
+ children: [/* @__PURE__ */ f("p", {
561
547
  className: "text-sm text-text-secondary",
562
- children: v("integrations.addConnection.authentication.bearerTokenHint", "Enter your {{provider}} bearer token.", { provider: M.name })
563
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
548
+ children: y("integrations.addConnection.authentication.bearerTokenHint", "Enter your {{provider}} bearer token.", { provider: M.name })
549
+ }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
564
550
  htmlFor: "bearer-token",
565
551
  className: "block text-sm font-semibold mb-2",
566
552
  children: [
567
- v("integrations.addConnection.fields.bearerToken", "Bearer Token"),
553
+ y("integrations.addConnection.fields.bearerToken", "Bearer Token"),
568
554
  " ",
569
- /* @__PURE__ */ u("span", {
555
+ /* @__PURE__ */ f("span", {
570
556
  className: "text-status-error-text",
571
557
  children: "*"
572
558
  })
573
559
  ]
574
- }), /* @__PURE__ */ d("div", {
560
+ }), /* @__PURE__ */ p("div", {
575
561
  className: "relative",
576
- children: [/* @__PURE__ */ u(be, {
562
+ children: [/* @__PURE__ */ f(ve, {
577
563
  size: 16,
578
564
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
579
- }), /* @__PURE__ */ u("input", {
565
+ }), /* @__PURE__ */ f("input", {
580
566
  type: "password",
581
567
  id: "bearer-token",
582
- "aria-label": v("integrations.addConnection.fields.bearerToken", "Bearer Token"),
568
+ "aria-label": y("integrations.addConnection.fields.bearerToken", "Bearer Token"),
583
569
  value: B,
584
570
  onChange: (e) => mt(e.target.value),
585
- placeholder: v("integrations.addConnection.fields.bearerTokenPlaceholder", "Enter your token"),
571
+ placeholder: y("integrations.addConnection.fields.bearerTokenPlaceholder", "Enter your token"),
586
572
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
587
573
  })]
588
574
  })] })]
589
575
  }),
590
- M.authType === "service_account" && /* @__PURE__ */ u("div", {
576
+ M.authType === "service_account" && /* @__PURE__ */ f("div", {
591
577
  className: "space-y-4",
592
- children: /* @__PURE__ */ d("div", {
578
+ children: /* @__PURE__ */ p("div", {
593
579
  className: "rounded-lg border border-border bg-status-success-bg-subtle p-4",
594
580
  children: [
595
- /* @__PURE__ */ u("p", {
581
+ /* @__PURE__ */ f("p", {
596
582
  className: "text-sm font-semibold text-foreground",
597
- children: v("integrations.addConnection.authentication.serviceAccount.title", "No credentials needed")
583
+ children: y("integrations.addConnection.authentication.serviceAccount.title", "No credentials needed")
598
584
  }),
599
- /* @__PURE__ */ u("p", {
585
+ /* @__PURE__ */ f("p", {
600
586
  className: "text-sm text-muted-foreground mt-1",
601
- children: v("integrations.addConnection.authentication.serviceAccount.description", "{{provider}} is a first-party integration. Connecting grants {{provider}} permission to act on your behalf; access tokens are issued securely per use — there are no keys or secrets to manage.", { provider: M.name })
587
+ children: y("integrations.addConnection.authentication.serviceAccount.description", "{{provider}} is a first-party integration. Connecting grants {{provider}} permission to act on your behalf; access tokens are issued securely per use — there are no keys or secrets to manage.", { provider: M.name })
602
588
  }),
603
- M.defaultScopes && M.defaultScopes.length > 0 && /* @__PURE__ */ u("p", {
589
+ M.defaultScopes && M.defaultScopes.length > 0 && /* @__PURE__ */ f("p", {
604
590
  className: "text-sm text-muted-foreground mt-2",
605
- children: v("integrations.addConnection.authentication.serviceAccount.scopes", "Scopes: {{scopes}}", { scopes: M.defaultScopes.join(", ") })
591
+ children: y("integrations.addConnection.authentication.serviceAccount.scopes", "Scopes: {{scopes}}", { scopes: M.defaultScopes.join(", ") })
606
592
  })
607
593
  ]
608
594
  })
609
595
  }),
610
- M.authType === "custom" && (Y ? /* @__PURE__ */ d("div", {
596
+ M.authType === "custom" && (Y ? /* @__PURE__ */ p("div", {
611
597
  className: "space-y-4",
612
- children: [/* @__PURE__ */ u("p", {
598
+ children: [/* @__PURE__ */ f("p", {
613
599
  className: "text-sm text-text-secondary",
614
- children: v("integrations.addConnection.authentication.custom.hint", "Enter your {{provider}} configuration. Secret fields are stored encrypted and never shown again.", { provider: M.name })
615
- }), /* @__PURE__ */ u(Fe, {
600
+ children: y("integrations.addConnection.authentication.custom.hint", "Enter your {{provider}} configuration. Secret fields are stored encrypted and never shown again.", { provider: M.name })
601
+ }), /* @__PURE__ */ f(Pe, {
616
602
  schema: Y,
617
603
  values: X,
618
604
  onChange: gt,
619
605
  disabled: Z,
620
606
  idPrefix: "custom",
621
- translate: v
607
+ translate: y
622
608
  })]
623
- }) : /* @__PURE__ */ d("div", {
609
+ }) : /* @__PURE__ */ p("div", {
624
610
  className: "flex items-center gap-2 px-3 py-2 rounded-lg bg-status-error-bg-subtle border border-border-default",
625
- children: [/* @__PURE__ */ u(c, {
611
+ children: [/* @__PURE__ */ f(l, {
626
612
  size: 16,
627
613
  className: "text-status-error-text flex-shrink-0"
628
- }), /* @__PURE__ */ u("span", {
614
+ }), /* @__PURE__ */ f("span", {
629
615
  className: "text-sm text-status-error-text",
630
- children: v("integrations.addConnection.authentication.custom.missingSchema", "This provider does not declare a configuration form.")
616
+ children: y("integrations.addConnection.authentication.custom.missingSchema", "This provider does not declare a configuration form.")
631
617
  })]
632
618
  }))
633
619
  ]
634
- }), /* @__PURE__ */ d("div", {
620
+ }), /* @__PURE__ */ p("div", {
635
621
  className: "flex gap-3",
636
- children: [/* @__PURE__ */ u(p, {
622
+ children: [/* @__PURE__ */ f(m, {
637
623
  variant: "outline",
638
624
  onClick: () => j("configure"),
639
625
  disabled: Z,
640
- children: v("integrations.addConnection.actions.back", "Back")
641
- }), /* @__PURE__ */ d(p, {
626
+ children: y("integrations.addConnection.actions.back", "Back")
627
+ }), /* @__PURE__ */ p(m, {
642
628
  onClick: Et,
643
629
  disabled: Z,
644
- children: [Z ? /* @__PURE__ */ u(l, {
630
+ children: [Z ? /* @__PURE__ */ f(d, {
645
631
  size: 16,
646
632
  className: "animate-spin"
647
- }) : /* @__PURE__ */ u(_e, { size: 16 }), M.authType === "oauth2" ? v("integrations.addConnection.actions.authorize", "Authorize") : v("integrations.addConnection.actions.connect", "Connect")]
633
+ }) : /* @__PURE__ */ f(he, { size: 16 }), M.authType === "oauth2" ? y("integrations.addConnection.actions.authorize", "Authorize") : y("integrations.addConnection.actions.connect", "Connect")]
648
634
  })]
649
635
  })]
650
636
  }),
651
- A === "success" && /* @__PURE__ */ d("div", {
637
+ A === "success" && /* @__PURE__ */ p("div", {
652
638
  className: "flex flex-col items-center justify-center py-12 text-center",
653
639
  children: [
654
- /* @__PURE__ */ u("div", {
640
+ /* @__PURE__ */ f("div", {
655
641
  className: "p-4 rounded-full bg-status-success-bg-subtle mb-4",
656
- children: /* @__PURE__ */ u(ve, {
642
+ children: /* @__PURE__ */ f(ge, {
657
643
  size: 48,
658
644
  className: "text-status-success-text"
659
645
  })
660
646
  }),
661
- /* @__PURE__ */ u("h2", {
647
+ /* @__PURE__ */ f("h2", {
662
648
  className: "text-xl font-bold text-text-primary mb-2",
663
- children: v("integrations.addConnection.success.title", "Connection Created!")
649
+ children: y("integrations.addConnection.success.title", "Connection Created!")
664
650
  }),
665
- /* @__PURE__ */ u("p", {
651
+ /* @__PURE__ */ f("p", {
666
652
  className: "text-sm text-text-secondary mb-6 max-w-sm",
667
- children: v("integrations.addConnection.success.description", "Your {{provider}} connection has been set up successfully.", { provider: M?.name ?? "" })
653
+ children: y("integrations.addConnection.success.description", "Your {{provider}} connection has been set up successfully.", { provider: M?.name ?? "" })
668
654
  }),
669
- /* @__PURE__ */ d("div", {
655
+ /* @__PURE__ */ p("div", {
670
656
  className: "flex gap-3",
671
657
  children: [
672
- T && W && /* @__PURE__ */ d(p, {
658
+ T && W && /* @__PURE__ */ p(m, {
673
659
  onClick: Dt,
674
- children: [/* @__PURE__ */ u(xe, { size: 16 }), v("integrations.addConnection.actions.linkToBotChannel", "Link to Bot Channel")]
660
+ children: [/* @__PURE__ */ f(ye, { size: 16 }), y("integrations.addConnection.actions.linkToBotChannel", "Link to Bot Channel")]
675
661
  }),
676
- !T && W && /* @__PURE__ */ u(p, {
677
- onClick: () => g?.(r(h, `connections/${W}`)),
678
- children: v("integrations.addConnection.actions.viewConnection", "View Connection")
662
+ !T && W && /* @__PURE__ */ f(m, {
663
+ onClick: () => _?.(a(g, `connections/${W}`)),
664
+ children: y("integrations.addConnection.actions.viewConnection", "View Connection")
679
665
  }),
680
- /* @__PURE__ */ u(p, {
666
+ /* @__PURE__ */ f(m, {
681
667
  variant: "outline",
682
- onClick: () => g?.(r(h, "connections")),
683
- children: v("integrations.addConnection.actions.allConnections", "All Connections")
668
+ onClick: () => _?.(a(g, "connections")),
669
+ children: y("integrations.addConnection.actions.allConnections", "All Connections")
684
670
  })
685
671
  ]
686
672
  })
687
673
  ]
688
674
  }),
689
- A === "error" && /* @__PURE__ */ d("div", {
675
+ A === "error" && /* @__PURE__ */ p("div", {
690
676
  className: "flex flex-col items-center justify-center py-12 text-center",
691
677
  children: [
692
- /* @__PURE__ */ u("div", {
678
+ /* @__PURE__ */ f("div", {
693
679
  className: "p-4 rounded-full bg-status-error-bg-subtle mb-4",
694
- children: /* @__PURE__ */ u(c, {
680
+ children: /* @__PURE__ */ f(l, {
695
681
  size: 48,
696
682
  className: "text-status-error-text"
697
683
  })
698
684
  }),
699
- /* @__PURE__ */ u("h2", {
685
+ /* @__PURE__ */ f("h2", {
700
686
  className: "text-xl font-bold text-text-primary mb-2",
701
- children: v("integrations.addConnection.failed.title", "Connection Failed")
687
+ children: y("integrations.addConnection.failed.title", "Connection Failed")
702
688
  }),
703
- /* @__PURE__ */ u("p", {
689
+ /* @__PURE__ */ f("p", {
704
690
  className: "text-sm text-status-error-text mb-6 max-w-sm",
705
- children: H || v("integrations.addConnection.errors.unexpected", "An unexpected error occurred.")
691
+ children: H || y("integrations.addConnection.errors.unexpected", "An unexpected error occurred.")
706
692
  }),
707
- /* @__PURE__ */ d("div", {
693
+ /* @__PURE__ */ p("div", {
708
694
  className: "flex gap-3",
709
- children: [/* @__PURE__ */ u(p, {
695
+ children: [/* @__PURE__ */ f(m, {
710
696
  onClick: () => {
711
697
  U(""), j("authenticate");
712
698
  },
713
- children: v("integrations.addConnection.actions.tryAgain", "Try Again")
714
- }), /* @__PURE__ */ u(p, {
699
+ children: y("integrations.addConnection.actions.tryAgain", "Try Again")
700
+ }), /* @__PURE__ */ f(m, {
715
701
  variant: "outline",
716
- onClick: () => g?.(r(h, "connections")),
717
- children: v("integrations.addConnection.actions.cancel", "Cancel")
702
+ onClick: () => _?.(a(g, "connections")),
703
+ children: y("integrations.addConnection.actions.cancel", "Cancel")
718
704
  })]
719
705
  })
720
706
  ]
721
707
  })
722
708
  ]
723
- }) : /* @__PURE__ */ d("div", {
709
+ }) : /* @__PURE__ */ p("div", {
724
710
  className: "flex flex-col items-center justify-center py-20 text-center p-6",
725
711
  children: [
726
- /* @__PURE__ */ u(we, {
712
+ /* @__PURE__ */ f(Se, {
727
713
  size: 48,
728
714
  className: "text-text-secondary mb-4"
729
715
  }),
730
- /* @__PURE__ */ u("h2", {
716
+ /* @__PURE__ */ f("h2", {
731
717
  className: "text-xl font-bold text-text-primary mb-2",
732
- children: v("integrations.addConnection.denied.title", "Access Denied")
718
+ children: y("integrations.addConnection.denied.title", "Access Denied")
733
719
  }),
734
- /* @__PURE__ */ u("p", {
720
+ /* @__PURE__ */ f("p", {
735
721
  className: "text-sm text-text-secondary mb-6 max-w-sm",
736
- children: v("integrations.addConnection.denied.description", "You don't have permission to create connections.")
722
+ children: y("integrations.addConnection.denied.description", "You don't have permission to create connections.")
737
723
  }),
738
- /* @__PURE__ */ d(p, {
724
+ /* @__PURE__ */ p(m, {
739
725
  variant: "outline",
740
- onClick: () => g?.(r(h, "connections")),
726
+ onClick: () => _?.(a(g, "connections")),
741
727
  children: [
742
- /* @__PURE__ */ u(he, { size: 16 }),
728
+ /* @__PURE__ */ f(u, { size: 16 }),
743
729
  " ",
744
- v("integrations.addConnection.denied.back", "Back to Connections")
730
+ y("integrations.addConnection.denied.back", "Back to Connections")
745
731
  ]
746
732
  })
747
733
  ]
748
734
  });
749
735
  }
750
- //#endregion
751
- export { m as AddConnectionWizard };
736
+ export { h as AddConnectionWizard };
752
737
 
753
738
  //# sourceMappingURL=AddConnectionWizard.js.map