@burdenoff/microfe-integrations 2026.1107.2 → 2026.1109.2

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 (247) 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 +2 -22
  4. package/dist/generated/wspace-operations.d.ts +995 -705
  5. package/dist/generated/wspace-operations.js +180 -167
  6. package/dist/generated/wspace-operations.js.map +1 -1
  7. package/dist/generated/wspace-types.d.ts +4 -24
  8. package/dist/generated/wspace-types.js +1 -2
  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 +1 -3
  57. package/dist/integrations/components/MailMessageBody.js +4 -5
  58. package/dist/integrations/components/MailMessageBody.js.map +1 -1
  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 +19 -43
  91. package/dist/integrations/hooks/useMailbox.js +46 -47
  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 +135 -140
  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 +0 -2
  147. package/dist/integrations/store/mailboxStore.js +1 -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 +0 -2
  164. package/dist/integrations/utils/mailHtml.js +3 -4
  165. package/dist/integrations/utils/mailHtml.js.map +1 -1
  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 +20 -36
  178. package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -1
  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 +63 -49
  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/MailMessageBody.d.ts.map +0 -1
  206. package/dist/integrations/components/ProviderCard.d.ts.map +0 -1
  207. package/dist/integrations/constants/featureFlags.d.ts.map +0 -1
  208. package/dist/integrations/constants/permissions.d.ts.map +0 -1
  209. package/dist/integrations/events/integrations-events.d.ts.map +0 -1
  210. package/dist/integrations/events/useIntegrationsEventBus.d.ts.map +0 -1
  211. package/dist/integrations/hooks/useConnections.d.ts.map +0 -1
  212. package/dist/integrations/hooks/useConnectorSubmissions.d.ts.map +0 -1
  213. package/dist/integrations/hooks/useFormatDate.d.ts.map +0 -1
  214. package/dist/integrations/hooks/useFormatLastUsed.d.ts.map +0 -1
  215. package/dist/integrations/hooks/useLabel.d.ts.map +0 -1
  216. package/dist/integrations/hooks/useLogs.d.ts.map +0 -1
  217. package/dist/integrations/hooks/useMailbox.d.ts.map +0 -1
  218. package/dist/integrations/hooks/useProviders.d.ts.map +0 -1
  219. package/dist/integrations/hooks/useTr.d.ts.map +0 -1
  220. package/dist/integrations/index.d.ts.map +0 -1
  221. package/dist/integrations/pages/AddConnectionWizard.d.ts.map +0 -1
  222. package/dist/integrations/pages/ConnectionDetail.d.ts.map +0 -1
  223. package/dist/integrations/pages/ConnectionLogs.d.ts.map +0 -1
  224. package/dist/integrations/pages/ConnectionsList.d.ts.map +0 -1
  225. package/dist/integrations/pages/ConnectorReviewQueuePage.d.ts.map +0 -1
  226. package/dist/integrations/pages/ConnectorSubmissionsPage.d.ts.map +0 -1
  227. package/dist/integrations/pages/IntegrationsOverview.d.ts.map +0 -1
  228. package/dist/integrations/pages/IntegrationsSettings.d.ts.map +0 -1
  229. package/dist/integrations/pages/IntegrationsUserLandingPage.d.ts.map +0 -1
  230. package/dist/integrations/pages/MailboxInbox.d.ts.map +0 -1
  231. package/dist/integrations/pages/ProviderCatalog.d.ts.map +0 -1
  232. package/dist/integrations/pages/ProviderDetail.d.ts.map +0 -1
  233. package/dist/integrations/pages/ProviderEditorPage.d.ts.map +0 -1
  234. package/dist/integrations/providers/IntegrationsProvider.d.ts.map +0 -1
  235. package/dist/integrations/store/integrationsStore.d.ts.map +0 -1
  236. package/dist/integrations/store/mailboxStore.d.ts.map +0 -1
  237. package/dist/integrations/translations/en.d.ts.map +0 -1
  238. package/dist/integrations/types/index.d.ts.map +0 -1
  239. package/dist/integrations/utils/appearance.d.ts.map +0 -1
  240. package/dist/integrations/utils/cn.d.ts.map +0 -1
  241. package/dist/integrations/utils/constants.d.ts.map +0 -1
  242. package/dist/integrations/utils/integrationsHelpers.d.ts.map +0 -1
  243. package/dist/integrations/utils/mailHtml.d.ts.map +0 -1
  244. package/dist/integrations/utils/mappers.d.ts.map +0 -1
  245. package/dist/integrations/utils/navigation.d.ts.map +0 -1
  246. package/dist/integrations/utils/paths.d.ts.map +0 -1
  247. package/dist/utils/nativeBridge.d.ts.map +0 -1
@@ -1,17 +1,17 @@
1
- import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
2
- import { useTr as t } from "../hooks/useTr.js";
3
- import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
1
+ import { useTr as e } from "../hooks/useTr.js";
2
+ import { INTEGRATION_PERMISSIONS as t } from "../constants/permissions.js";
3
+ import { useIntegrations as n } from "../providers/IntegrationsProvider.js";
4
4
  import { joinPath as r } from "../utils/navigation.js";
5
5
  import { useInstallPlugin as i, useProvider as a, useUpdatePlugin as o } from "../hooks/useProviders.js";
6
6
  import { AuthMethodsEditor as s } from "../components/AuthMethodsEditor.js";
7
- import { useEffect as c, useId as l, useState as u } from "react";
8
- import { ArrowLeft as d, Loader2 as f, Save as p, Shield as m } from "lucide-react";
9
- import { useParams as h } from "react-router";
10
- import { usePermissions as g } from "@burdenoff/fe-libs/shared/providers/shell";
11
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
12
- import { Button as y, EmphasisPanel as b, GlassCard as x, OptionalFields as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
13
- //#region src/integrations/pages/ProviderEditorPage.tsx
14
- var w = [
7
+ import { useId as c, useState as l } from "react";
8
+ import { ArrowLeft as u, Loader2 as d, Save as f, Shield as p } from "lucide-react";
9
+ import { useParams as m } from "react-router";
10
+ import { usePermissions as h } from "@burdenoff/fe-libs/shared/providers/shell";
11
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
12
+ import { Button as v, EmphasisPanel as y, GlassCard as b, OptionalFields as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
13
+ // src/integrations/pages/ProviderEditorPage.tsx
14
+ var C = [
15
15
  "COMMUNICATION",
16
16
  "PRODUCTIVITY",
17
17
  "CLOUD_STORAGE",
@@ -23,7 +23,7 @@ var w = [
23
23
  "PAYMENT",
24
24
  "ANALYTICS",
25
25
  "CUSTOM"
26
- ], T = [
26
+ ], w = [
27
27
  "OAUTH2",
28
28
  "API_KEY",
29
29
  "BASIC_AUTH",
@@ -31,7 +31,7 @@ var w = [
31
31
  "SERVICE_ACCOUNT",
32
32
  "CUSTOM"
33
33
  ];
34
- function E(e, t) {
34
+ function T(e, t) {
35
35
  let n = e.trim();
36
36
  if (n) try {
37
37
  return JSON.parse(n);
@@ -39,7 +39,7 @@ function E(e, t) {
39
39
  throw Error(`${t} must be valid JSON`);
40
40
  }
41
41
  }
42
- function D(e) {
42
+ function E(e) {
43
43
  return {
44
44
  communication: "COMMUNICATION",
45
45
  productivity: "PRODUCTIVITY",
@@ -54,7 +54,7 @@ function D(e) {
54
54
  other: "CUSTOM"
55
55
  }[e || ""] || "CUSTOM";
56
56
  }
57
- function O(e) {
57
+ function D(e) {
58
58
  return {
59
59
  oauth2: "OAUTH2",
60
60
  api_key: "API_KEY",
@@ -63,8 +63,8 @@ function O(e) {
63
63
  service_account: "SERVICE_ACCOUNT"
64
64
  }[e || ""] || "CUSTOM";
65
65
  }
66
- function k() {
67
- let { providerId: k } = h(), A = !!k, { basePath: j = "/", navigate: M } = e(), N = t(), { hasPermission: P, isLoading: F } = g(), I = P(n.PROVIDER_CREATE), L = P(n.PROVIDER_UPDATE), { provider: R, loading: z } = a(k ?? ""), { installPlugin: B, loading: V } = i(), { updatePlugin: H, loading: U } = o(), [W, G] = u(""), [K, q] = u({
66
+ function O() {
67
+ let { providerId: O } = m(), k = !!O, { basePath: A = "/", navigate: j } = n(), M = e(), { hasPermission: N, isLoading: P } = h(), F = N(t.PROVIDER_CREATE), I = N(t.PROVIDER_UPDATE), { provider: L, loading: R } = a(O ?? ""), { installPlugin: z, loading: B } = i(), { updatePlugin: V, loading: H } = o(), [U, W] = l(""), [G, K] = l({
68
68
  key: "",
69
69
  name: "",
70
70
  description: "",
@@ -87,398 +87,395 @@ function k() {
87
87
  rateLimitConfig: "",
88
88
  configSchema: "",
89
89
  isEnabled: !0
90
- });
91
- c(() => {
92
- !R || !A || q({
93
- key: R.key,
94
- name: R.name,
95
- description: R.description || "",
96
- category: D(R.category),
97
- authType: O(R.authType),
98
- icon: R.icon || "",
99
- color: R.color || "",
100
- website: R.website || "",
101
- docsUrl: R.docsUrl || "",
102
- baseUrl: R.baseUrl || "",
103
- apiVersion: R.apiVersion || "",
104
- pluginVersion: R.pluginVersion || "1.0.0",
105
- pluginAuthor: R.pluginAuthor || "",
106
- pluginRepository: R.pluginRepository || "",
107
- displayOrder: String(R.displayOrder || 0),
108
- defaultScopes: (R.defaultScopes || []).join(", "),
109
- supportedFeatures: (R.supportedFeatures || []).join(", "),
110
- oauthConfig: R.oauthConfig ? JSON.stringify(R.oauthConfig, null, 2) : "",
111
- availableScopes: R.availableScopes ? JSON.stringify(R.availableScopes, null, 2) : "",
112
- rateLimitConfig: R.rateLimitConfig ? JSON.stringify(R.rateLimitConfig, null, 2) : "",
113
- configSchema: R.configSchema ? JSON.stringify(R.configSchema, null, 2) : "",
114
- isEnabled: R.isEnabled
115
- });
116
- }, [A, R]);
117
- let J = A ? L : I, Y = l(), X = (e) => `${Y}-${e}`, Z = (e, t) => {
118
- q((n) => ({
90
+ }), [q, J] = l(null);
91
+ L && k && L !== q && (J(L), K({
92
+ key: L.key,
93
+ name: L.name,
94
+ description: L.description || "",
95
+ category: E(L.category),
96
+ authType: D(L.authType),
97
+ icon: L.icon || "",
98
+ color: L.color || "",
99
+ website: L.website || "",
100
+ docsUrl: L.docsUrl || "",
101
+ baseUrl: L.baseUrl || "",
102
+ apiVersion: L.apiVersion || "",
103
+ pluginVersion: L.pluginVersion || "1.0.0",
104
+ pluginAuthor: L.pluginAuthor || "",
105
+ pluginRepository: L.pluginRepository || "",
106
+ displayOrder: String(L.displayOrder || 0),
107
+ defaultScopes: (L.defaultScopes || []).join(", "),
108
+ supportedFeatures: (L.supportedFeatures || []).join(", "),
109
+ oauthConfig: L.oauthConfig ? JSON.stringify(L.oauthConfig, null, 2) : "",
110
+ availableScopes: L.availableScopes ? JSON.stringify(L.availableScopes, null, 2) : "",
111
+ rateLimitConfig: L.rateLimitConfig ? JSON.stringify(L.rateLimitConfig, null, 2) : "",
112
+ configSchema: L.configSchema ? JSON.stringify(L.configSchema, null, 2) : "",
113
+ isEnabled: L.isEnabled
114
+ }));
115
+ let Y = k ? I : F, X = c(), Z = (e) => `${X}-${e}`, Q = (e, t) => {
116
+ K((n) => ({
119
117
  ...n,
120
118
  [e]: t
121
119
  }));
122
120
  };
123
- return F || A && z ? /* @__PURE__ */ _("div", {
121
+ return P || k && R ? /* @__PURE__ */ g("div", {
124
122
  className: "flex items-center justify-center py-20",
125
- children: /* @__PURE__ */ _(f, {
123
+ children: /* @__PURE__ */ g(d, {
126
124
  size: 44,
127
125
  className: "animate-spin text-primary"
128
126
  })
129
- }) : J ? /* @__PURE__ */ v("div", {
127
+ }) : Y ? /* @__PURE__ */ _("div", {
130
128
  className: "space-y-6 p-6 max-w-5xl mx-auto",
131
129
  children: [
132
- /* @__PURE__ */ v("div", {
130
+ /* @__PURE__ */ _("div", {
133
131
  className: "rounded-xl border border-border-seam bg-accent-wash p-6 flex items-center gap-4",
134
- children: [/* @__PURE__ */ _(y, {
132
+ children: [/* @__PURE__ */ g(v, {
135
133
  variant: "ghost",
136
134
  size: "icon",
137
- onClick: () => M?.(r(j, "providers")),
138
- "aria-label": N("integrations.common.back", "Back"),
139
- children: /* @__PURE__ */ _(d, { size: 20 })
140
- }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h1", {
135
+ onClick: () => j?.(r(A, "providers")),
136
+ "aria-label": M("integrations.common.back", "Back"),
137
+ children: /* @__PURE__ */ g(u, { size: 20 })
138
+ }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h1", {
141
139
  className: "text-2xl font-bold text-text-primary",
142
- children: A ? N("integrations.providerEditor.editTitle", "Edit Provider") : N("integrations.providerEditor.addTitle", "Add Provider")
143
- }), /* @__PURE__ */ _("p", {
140
+ children: k ? M("integrations.providerEditor.editTitle", "Edit Provider") : M("integrations.providerEditor.addTitle", "Add Provider")
141
+ }), /* @__PURE__ */ g("p", {
144
142
  className: "text-sm text-text-secondary mt-1",
145
- children: N("integrations.providerEditor.subtitle", "Configure catalog metadata, auth configuration, and runtime settings.")
143
+ children: M("integrations.providerEditor.subtitle", "Configure catalog metadata, auth configuration, and runtime settings.")
146
144
  })] })]
147
145
  }),
148
- /* @__PURE__ */ _(C, {
149
- icon: /* @__PURE__ */ _(m, { size: 16 }),
150
- children: N("integrations.providerEditor.purpose", "Providers are the building blocks of integrations: each one tells the platform how to authenticate with and call an external service. Use this form to register a new provider (or edit an existing one) — set its identity and category, choose how it authenticates, and optionally supply advanced OAuth, scope, and rate-limit configuration. Once saved and enabled, anyone in the workspace can create connections to it.")
146
+ /* @__PURE__ */ g(S, {
147
+ icon: /* @__PURE__ */ g(p, { size: 16 }),
148
+ children: M("integrations.providerEditor.purpose", "Providers are the building blocks of integrations: each one tells the platform how to authenticate with and call an external service. Use this form to register a new provider (or edit an existing one) — set its identity and category, choose how it authenticates, and optionally supply advanced OAuth, scope, and rate-limit configuration. Once saved and enabled, anyone in the workspace can create connections to it.")
151
149
  }),
152
- W && /* @__PURE__ */ _("div", {
150
+ U && /* @__PURE__ */ g("div", {
153
151
  className: "rounded-xl border border-border-seam bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
154
- children: W
152
+ children: U
155
153
  }),
156
- /* @__PURE__ */ v("div", {
154
+ /* @__PURE__ */ _("div", {
157
155
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
158
156
  children: [
159
- /* @__PURE__ */ v(b, {
157
+ /* @__PURE__ */ _(y, {
160
158
  className: "p-5 space-y-4",
161
159
  children: [
162
- /* @__PURE__ */ _("h2", {
160
+ /* @__PURE__ */ g("h2", {
163
161
  className: "font-semibold text-text-primary",
164
- children: N("integrations.providerEditor.sections.coreDetails", "Core details")
162
+ children: M("integrations.providerEditor.sections.coreDetails", "Core details")
165
163
  }),
166
- !A && /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
167
- htmlFor: X("key"),
164
+ !k && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
165
+ htmlFor: Z("key"),
168
166
  className: "block text-sm font-medium mb-1.5 text-text-primary",
169
- children: N("integrations.providerEditor.fields.key", "Key")
170
- }), /* @__PURE__ */ _("input", {
171
- id: X("key"),
172
- "aria-label": N("integrations.providerEditor.fields.key", "Key"),
173
- value: K.key,
174
- onChange: (e) => Z("key", e.target.value),
167
+ children: M("integrations.providerEditor.fields.key", "Key")
168
+ }), /* @__PURE__ */ g("input", {
169
+ id: Z("key"),
170
+ "aria-label": M("integrations.providerEditor.fields.key", "Key"),
171
+ value: G.key,
172
+ onChange: (e) => Q("key", e.target.value),
175
173
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm",
176
- placeholder: N("integrations.providerEditor.fields.keyPlaceholder", "e.g. slack-user")
174
+ placeholder: M("integrations.providerEditor.fields.keyPlaceholder", "e.g. slack-user")
177
175
  })] }),
178
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
179
- htmlFor: X("name"),
176
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
177
+ htmlFor: Z("name"),
180
178
  className: "block text-sm font-medium mb-1.5 text-text-primary",
181
- children: N("integrations.providerEditor.fields.name", "Name")
182
- }), /* @__PURE__ */ _("input", {
183
- id: X("name"),
184
- "aria-label": N("integrations.providerEditor.fields.name", "Name"),
185
- value: K.name,
186
- onChange: (e) => Z("name", e.target.value),
179
+ children: M("integrations.providerEditor.fields.name", "Name")
180
+ }), /* @__PURE__ */ g("input", {
181
+ id: Z("name"),
182
+ "aria-label": M("integrations.providerEditor.fields.name", "Name"),
183
+ value: G.name,
184
+ onChange: (e) => Q("name", e.target.value),
187
185
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
188
186
  })] }),
189
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
190
- htmlFor: X("description"),
187
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
188
+ htmlFor: Z("description"),
191
189
  className: "block text-sm font-medium mb-1.5 text-text-primary",
192
- children: N("integrations.providerEditor.fields.description", "Description")
193
- }), /* @__PURE__ */ _("textarea", {
194
- id: X("description"),
195
- "aria-label": N("integrations.providerEditor.fields.description", "Description"),
196
- value: K.description,
197
- onChange: (e) => Z("description", e.target.value),
190
+ children: M("integrations.providerEditor.fields.description", "Description")
191
+ }), /* @__PURE__ */ g("textarea", {
192
+ id: Z("description"),
193
+ "aria-label": M("integrations.providerEditor.fields.description", "Description"),
194
+ value: G.description,
195
+ onChange: (e) => Q("description", e.target.value),
198
196
  rows: 4,
199
197
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
200
198
  })] }),
201
- /* @__PURE__ */ v("div", {
199
+ /* @__PURE__ */ _("div", {
202
200
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
203
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
204
- htmlFor: X("category"),
201
+ children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
202
+ htmlFor: Z("category"),
205
203
  className: "block text-sm font-medium mb-1.5 text-text-primary",
206
- children: N("integrations.providerEditor.fields.category", "Category")
207
- }), /* @__PURE__ */ _("select", {
208
- id: X("category"),
209
- "aria-label": N("integrations.providerEditor.fields.category", "Category"),
210
- value: K.category,
211
- onChange: (e) => Z("category", e.target.value),
204
+ children: M("integrations.providerEditor.fields.category", "Category")
205
+ }), /* @__PURE__ */ g("select", {
206
+ id: Z("category"),
207
+ "aria-label": M("integrations.providerEditor.fields.category", "Category"),
208
+ value: G.category,
209
+ onChange: (e) => Q("category", e.target.value),
212
210
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
213
- children: w.map((e) => /* @__PURE__ */ _("option", {
211
+ children: C.map((e) => /* @__PURE__ */ g("option", {
214
212
  value: e,
215
213
  children: e
216
214
  }, e))
217
- })] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
218
- htmlFor: X("authType"),
215
+ })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
216
+ htmlFor: Z("authType"),
219
217
  className: "block text-sm font-medium mb-1.5 text-text-primary",
220
- children: N("integrations.providerEditor.fields.authType", "Auth Type")
221
- }), /* @__PURE__ */ _("select", {
222
- id: X("authType"),
223
- "aria-label": N("integrations.providerEditor.fields.authType", "Auth Type"),
224
- value: K.authType,
225
- onChange: (e) => Z("authType", e.target.value),
218
+ children: M("integrations.providerEditor.fields.authType", "Auth Type")
219
+ }), /* @__PURE__ */ g("select", {
220
+ id: Z("authType"),
221
+ "aria-label": M("integrations.providerEditor.fields.authType", "Auth Type"),
222
+ value: G.authType,
223
+ onChange: (e) => Q("authType", e.target.value),
226
224
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
227
- children: T.map((e) => /* @__PURE__ */ _("option", {
225
+ children: w.map((e) => /* @__PURE__ */ g("option", {
228
226
  value: e,
229
227
  children: e
230
228
  }, e))
231
229
  })] })]
232
230
  }),
233
- /* @__PURE__ */ v("div", {
231
+ /* @__PURE__ */ _("div", {
234
232
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
235
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
236
- htmlFor: X("website"),
233
+ children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
234
+ htmlFor: Z("website"),
237
235
  className: "block text-sm font-medium mb-1.5 text-text-primary",
238
- children: N("integrations.providerEditor.fields.website", "Website")
239
- }), /* @__PURE__ */ _("input", {
240
- id: X("website"),
241
- "aria-label": N("integrations.providerEditor.fields.website", "Website"),
242
- value: K.website,
243
- onChange: (e) => Z("website", e.target.value),
236
+ children: M("integrations.providerEditor.fields.website", "Website")
237
+ }), /* @__PURE__ */ g("input", {
238
+ id: Z("website"),
239
+ "aria-label": M("integrations.providerEditor.fields.website", "Website"),
240
+ value: G.website,
241
+ onChange: (e) => Q("website", e.target.value),
244
242
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
245
- })] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
246
- htmlFor: X("docsUrl"),
243
+ })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
244
+ htmlFor: Z("docsUrl"),
247
245
  className: "block text-sm font-medium mb-1.5 text-text-primary",
248
- children: N("integrations.providerEditor.fields.docsUrl", "Docs URL")
249
- }), /* @__PURE__ */ _("input", {
250
- id: X("docsUrl"),
251
- "aria-label": N("integrations.providerEditor.fields.docsUrl", "Docs URL"),
252
- value: K.docsUrl,
253
- onChange: (e) => Z("docsUrl", e.target.value),
246
+ children: M("integrations.providerEditor.fields.docsUrl", "Docs URL")
247
+ }), /* @__PURE__ */ g("input", {
248
+ id: Z("docsUrl"),
249
+ "aria-label": M("integrations.providerEditor.fields.docsUrl", "Docs URL"),
250
+ value: G.docsUrl,
251
+ onChange: (e) => Q("docsUrl", e.target.value),
254
252
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
255
253
  })] })]
256
254
  }),
257
- /* @__PURE__ */ v("div", {
255
+ /* @__PURE__ */ _("div", {
258
256
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
259
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
260
- htmlFor: X("pluginVersion"),
257
+ children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
258
+ htmlFor: Z("pluginVersion"),
261
259
  className: "block text-sm font-medium mb-1.5 text-text-primary",
262
- children: N("integrations.providerEditor.fields.pluginVersion", "Plugin version")
263
- }), /* @__PURE__ */ _("input", {
264
- id: X("pluginVersion"),
265
- "aria-label": N("integrations.providerEditor.fields.pluginVersion", "Plugin version"),
266
- value: K.pluginVersion,
267
- onChange: (e) => Z("pluginVersion", e.target.value),
260
+ children: M("integrations.providerEditor.fields.pluginVersion", "Plugin version")
261
+ }), /* @__PURE__ */ g("input", {
262
+ id: Z("pluginVersion"),
263
+ "aria-label": M("integrations.providerEditor.fields.pluginVersion", "Plugin version"),
264
+ value: G.pluginVersion,
265
+ onChange: (e) => Q("pluginVersion", e.target.value),
268
266
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
269
- })] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
270
- htmlFor: X("displayOrder"),
267
+ })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
268
+ htmlFor: Z("displayOrder"),
271
269
  className: "block text-sm font-medium mb-1.5 text-text-primary",
272
- children: N("integrations.providerEditor.fields.displayOrder", "Display order")
273
- }), /* @__PURE__ */ _("input", {
274
- id: X("displayOrder"),
275
- "aria-label": N("integrations.providerEditor.fields.displayOrder", "Display order"),
270
+ children: M("integrations.providerEditor.fields.displayOrder", "Display order")
271
+ }), /* @__PURE__ */ g("input", {
272
+ id: Z("displayOrder"),
273
+ "aria-label": M("integrations.providerEditor.fields.displayOrder", "Display order"),
276
274
  type: "number",
277
- value: K.displayOrder,
278
- onChange: (e) => Z("displayOrder", e.target.value),
275
+ value: G.displayOrder,
276
+ onChange: (e) => Q("displayOrder", e.target.value),
279
277
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
280
278
  })] })]
281
279
  }),
282
- /* @__PURE__ */ v("div", {
280
+ /* @__PURE__ */ _("div", {
283
281
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
284
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
285
- htmlFor: X("pluginAuthor"),
282
+ children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
283
+ htmlFor: Z("pluginAuthor"),
286
284
  className: "block text-sm font-medium mb-1.5 text-text-primary",
287
- children: N("integrations.providerEditor.fields.pluginAuthor", "Plugin author")
288
- }), /* @__PURE__ */ _("input", {
289
- id: X("pluginAuthor"),
290
- "aria-label": N("integrations.providerEditor.fields.pluginAuthor", "Plugin author"),
291
- value: K.pluginAuthor,
292
- onChange: (e) => Z("pluginAuthor", e.target.value),
285
+ children: M("integrations.providerEditor.fields.pluginAuthor", "Plugin author")
286
+ }), /* @__PURE__ */ g("input", {
287
+ id: Z("pluginAuthor"),
288
+ "aria-label": M("integrations.providerEditor.fields.pluginAuthor", "Plugin author"),
289
+ value: G.pluginAuthor,
290
+ onChange: (e) => Q("pluginAuthor", e.target.value),
293
291
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
294
- })] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
295
- htmlFor: X("pluginRepository"),
292
+ })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
293
+ htmlFor: Z("pluginRepository"),
296
294
  className: "block text-sm font-medium mb-1.5 text-text-primary",
297
- children: N("integrations.providerEditor.fields.repository", "Repository")
298
- }), /* @__PURE__ */ _("input", {
299
- id: X("pluginRepository"),
300
- "aria-label": N("integrations.providerEditor.fields.repository", "Repository"),
301
- value: K.pluginRepository,
302
- onChange: (e) => Z("pluginRepository", e.target.value),
295
+ children: M("integrations.providerEditor.fields.repository", "Repository")
296
+ }), /* @__PURE__ */ g("input", {
297
+ id: Z("pluginRepository"),
298
+ "aria-label": M("integrations.providerEditor.fields.repository", "Repository"),
299
+ value: G.pluginRepository,
300
+ onChange: (e) => Q("pluginRepository", e.target.value),
303
301
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
304
302
  })] })]
305
303
  })
306
304
  ]
307
305
  }),
308
- /* @__PURE__ */ v(x, {
306
+ /* @__PURE__ */ _(b, {
309
307
  className: "border-border-seam p-5 space-y-4",
310
308
  children: [
311
- /* @__PURE__ */ _("h2", {
309
+ /* @__PURE__ */ g("h2", {
312
310
  className: "font-semibold text-text-primary",
313
- children: N("integrations.providerEditor.sections.runtimeConfig", "Runtime config")
311
+ children: M("integrations.providerEditor.sections.runtimeConfig", "Runtime config")
314
312
  }),
315
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
316
- htmlFor: X("baseUrl"),
313
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
314
+ htmlFor: Z("baseUrl"),
317
315
  className: "block text-sm font-medium mb-1.5 text-text-primary",
318
- children: N("integrations.providerEditor.fields.baseUrl", "Base URL")
319
- }), /* @__PURE__ */ _("input", {
320
- id: X("baseUrl"),
321
- "aria-label": N("integrations.providerEditor.fields.baseUrl", "Base URL"),
322
- value: K.baseUrl,
323
- onChange: (e) => Z("baseUrl", e.target.value),
316
+ children: M("integrations.providerEditor.fields.baseUrl", "Base URL")
317
+ }), /* @__PURE__ */ g("input", {
318
+ id: Z("baseUrl"),
319
+ "aria-label": M("integrations.providerEditor.fields.baseUrl", "Base URL"),
320
+ value: G.baseUrl,
321
+ onChange: (e) => Q("baseUrl", e.target.value),
324
322
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
325
323
  })] }),
326
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
327
- htmlFor: X("apiVersion"),
324
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
325
+ htmlFor: Z("apiVersion"),
328
326
  className: "block text-sm font-medium mb-1.5 text-text-primary",
329
- children: N("integrations.providerEditor.fields.apiVersion", "API version")
330
- }), /* @__PURE__ */ _("input", {
331
- id: X("apiVersion"),
332
- "aria-label": N("integrations.providerEditor.fields.apiVersion", "API version"),
333
- value: K.apiVersion,
334
- onChange: (e) => Z("apiVersion", e.target.value),
327
+ children: M("integrations.providerEditor.fields.apiVersion", "API version")
328
+ }), /* @__PURE__ */ g("input", {
329
+ id: Z("apiVersion"),
330
+ "aria-label": M("integrations.providerEditor.fields.apiVersion", "API version"),
331
+ value: G.apiVersion,
332
+ onChange: (e) => Q("apiVersion", e.target.value),
335
333
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
336
334
  })] }),
337
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
338
- htmlFor: X("defaultScopes"),
335
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
336
+ htmlFor: Z("defaultScopes"),
339
337
  className: "block text-sm font-medium mb-1.5 text-text-primary",
340
- children: N("integrations.providerEditor.fields.defaultScopes", "Default scopes")
341
- }), /* @__PURE__ */ _("input", {
342
- id: X("defaultScopes"),
343
- "aria-label": N("integrations.providerEditor.fields.defaultScopes", "Default scopes"),
344
- value: K.defaultScopes,
345
- onChange: (e) => Z("defaultScopes", e.target.value),
346
- placeholder: N("integrations.providerEditor.fields.defaultScopesPlaceholder", "openid, profile, email"),
338
+ children: M("integrations.providerEditor.fields.defaultScopes", "Default scopes")
339
+ }), /* @__PURE__ */ g("input", {
340
+ id: Z("defaultScopes"),
341
+ "aria-label": M("integrations.providerEditor.fields.defaultScopes", "Default scopes"),
342
+ value: G.defaultScopes,
343
+ onChange: (e) => Q("defaultScopes", e.target.value),
344
+ placeholder: M("integrations.providerEditor.fields.defaultScopesPlaceholder", "openid, profile, email"),
347
345
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
348
346
  })] }),
349
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
350
- htmlFor: X("supportedFeatures"),
347
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
348
+ htmlFor: Z("supportedFeatures"),
351
349
  className: "block text-sm font-medium mb-1.5 text-text-primary",
352
- children: N("integrations.providerEditor.fields.supportedFeatures", "Supported features")
353
- }), /* @__PURE__ */ _("input", {
354
- id: X("supportedFeatures"),
355
- "aria-label": N("integrations.providerEditor.fields.supportedFeatures", "Supported features"),
356
- value: K.supportedFeatures,
357
- onChange: (e) => Z("supportedFeatures", e.target.value),
358
- placeholder: N("integrations.providerEditor.fields.supportedFeaturesPlaceholder", "messages, files, events"),
350
+ children: M("integrations.providerEditor.fields.supportedFeatures", "Supported features")
351
+ }), /* @__PURE__ */ g("input", {
352
+ id: Z("supportedFeatures"),
353
+ "aria-label": M("integrations.providerEditor.fields.supportedFeatures", "Supported features"),
354
+ value: G.supportedFeatures,
355
+ onChange: (e) => Q("supportedFeatures", e.target.value),
356
+ placeholder: M("integrations.providerEditor.fields.supportedFeaturesPlaceholder", "messages, files, events"),
359
357
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
360
358
  })] }),
361
- /* @__PURE__ */ _(S, {
362
- title: N("integrations.providerEditor.sections.advancedConfig", "Advanced provider config"),
363
- description: N("integrations.providerEditor.sections.advancedConfigDescription", "Raw JSON for OAuth, scopes, rate limiting, and config schema. Most providers leave these blank."),
364
- children: /* @__PURE__ */ _("div", {
359
+ /* @__PURE__ */ g(x, {
360
+ title: M("integrations.providerEditor.sections.advancedConfig", "Advanced provider config"),
361
+ description: M("integrations.providerEditor.sections.advancedConfigDescription", "Raw JSON for OAuth, scopes, rate limiting, and config schema. Most providers leave these blank."),
362
+ children: /* @__PURE__ */ g("div", {
365
363
  className: "space-y-3",
366
364
  children: [
367
- ["oauthConfig", N("integrations.providerEditor.fields.oauthConfig", "OAuth config JSON")],
368
- ["availableScopes", N("integrations.providerEditor.fields.availableScopes", "Available scopes JSON")],
369
- ["rateLimitConfig", N("integrations.providerEditor.fields.rateLimitConfig", "Rate limit config JSON")],
370
- ["configSchema", N("integrations.providerEditor.fields.configSchema", "Config schema JSON")]
371
- ].map(([e, t]) => /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
372
- htmlFor: X(e),
365
+ ["oauthConfig", M("integrations.providerEditor.fields.oauthConfig", "OAuth config JSON")],
366
+ ["availableScopes", M("integrations.providerEditor.fields.availableScopes", "Available scopes JSON")],
367
+ ["rateLimitConfig", M("integrations.providerEditor.fields.rateLimitConfig", "Rate limit config JSON")],
368
+ ["configSchema", M("integrations.providerEditor.fields.configSchema", "Config schema JSON")]
369
+ ].map(([e, t]) => /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
370
+ htmlFor: Z(e),
373
371
  className: "block text-sm font-medium mb-1.5 text-text-primary",
374
372
  children: t
375
- }), /* @__PURE__ */ _("textarea", {
376
- id: X(e),
373
+ }), /* @__PURE__ */ g("textarea", {
374
+ id: Z(e),
377
375
  "aria-label": t,
378
- value: K[e],
379
- onChange: (t) => Z(e, t.target.value),
376
+ value: G[e],
377
+ onChange: (t) => Q(e, t.target.value),
380
378
  rows: 4,
381
379
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm font-mono"
382
380
  })] }, e))
383
381
  })
384
382
  }),
385
- /* @__PURE__ */ v("label", {
383
+ /* @__PURE__ */ _("label", {
386
384
  className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5",
387
- children: [/* @__PURE__ */ _("input", {
385
+ children: [/* @__PURE__ */ g("input", {
388
386
  type: "checkbox",
389
- checked: K.isEnabled,
390
- onChange: (e) => Z("isEnabled", e.target.checked),
391
- "aria-label": N("integrations.providerEditor.fields.enabled", "Provider enabled")
392
- }), /* @__PURE__ */ _("span", {
387
+ checked: G.isEnabled,
388
+ onChange: (e) => Q("isEnabled", e.target.checked),
389
+ "aria-label": M("integrations.providerEditor.fields.enabled", "Provider enabled")
390
+ }), /* @__PURE__ */ g("span", {
393
391
  className: "text-sm text-text-primary",
394
- children: N("integrations.providerEditor.fields.enabled", "Provider enabled")
392
+ children: M("integrations.providerEditor.fields.enabled", "Provider enabled")
395
393
  })]
396
394
  })
397
395
  ]
398
396
  }),
399
- A && R && /* @__PURE__ */ _(x, {
397
+ k && L && /* @__PURE__ */ g(b, {
400
398
  className: "p-5",
401
- children: /* @__PURE__ */ _(s, {
402
- provider: R,
403
- canManage: J
399
+ children: /* @__PURE__ */ g(s, {
400
+ provider: L,
401
+ canManage: Y
404
402
  })
405
403
  })
406
404
  ]
407
405
  }),
408
- /* @__PURE__ */ _("div", {
406
+ /* @__PURE__ */ g("div", {
409
407
  className: "flex justify-end",
410
- children: /* @__PURE__ */ v(y, {
408
+ children: /* @__PURE__ */ _(v, {
411
409
  onClick: async () => {
412
410
  try {
413
- G("");
411
+ W("");
414
412
  let e = {
415
- name: K.name.trim(),
416
- description: K.description.trim() || void 0,
417
- icon: K.icon.trim() || void 0,
418
- color: K.color.trim() || void 0,
419
- website: K.website.trim() || void 0,
420
- docsUrl: K.docsUrl.trim() || void 0,
421
- baseUrl: K.baseUrl.trim() || void 0,
422
- apiVersion: K.apiVersion.trim() || void 0,
423
- pluginVersion: K.pluginVersion.trim() || void 0,
424
- pluginAuthor: K.pluginAuthor.trim() || void 0,
425
- pluginRepository: K.pluginRepository.trim() || void 0,
426
- displayOrder: Number(K.displayOrder || "0"),
427
- defaultScopes: K.defaultScopes.split(",").flatMap((e) => {
413
+ name: G.name.trim(),
414
+ description: G.description.trim() || void 0,
415
+ icon: G.icon.trim() || void 0,
416
+ color: G.color.trim() || void 0,
417
+ website: G.website.trim() || void 0,
418
+ docsUrl: G.docsUrl.trim() || void 0,
419
+ baseUrl: G.baseUrl.trim() || void 0,
420
+ apiVersion: G.apiVersion.trim() || void 0,
421
+ pluginVersion: G.pluginVersion.trim() || void 0,
422
+ pluginAuthor: G.pluginAuthor.trim() || void 0,
423
+ pluginRepository: G.pluginRepository.trim() || void 0,
424
+ displayOrder: Number(G.displayOrder || "0"),
425
+ defaultScopes: G.defaultScopes.split(",").flatMap((e) => {
428
426
  let t = e.trim();
429
427
  return t ? [t] : [];
430
428
  }),
431
- supportedFeatures: K.supportedFeatures.split(",").flatMap((e) => {
429
+ supportedFeatures: G.supportedFeatures.split(",").flatMap((e) => {
432
430
  let t = e.trim();
433
431
  return t ? [t] : [];
434
432
  }),
435
- oauthConfig: E(K.oauthConfig, "OAuth config"),
436
- availableScopes: E(K.availableScopes, "Available scopes"),
437
- rateLimitConfig: E(K.rateLimitConfig, "Rate limit config"),
438
- configSchema: E(K.configSchema, "Config schema"),
439
- isEnabled: K.isEnabled
433
+ oauthConfig: T(G.oauthConfig, "OAuth config"),
434
+ availableScopes: T(G.availableScopes, "Available scopes"),
435
+ rateLimitConfig: T(G.rateLimitConfig, "Rate limit config"),
436
+ configSchema: T(G.configSchema, "Config schema"),
437
+ isEnabled: G.isEnabled
440
438
  };
441
- if (A && k) await H(k, e), M?.(r(j, `providers/${k}`));
439
+ if (k && O) await V(O, e), j?.(r(A, `providers/${O}`));
442
440
  else {
443
- let t = await B({
444
- key: K.key.trim(),
445
- category: K.category,
446
- authType: K.authType,
441
+ let t = await z({
442
+ key: G.key.trim(),
443
+ category: G.category,
444
+ authType: G.authType,
447
445
  ...e
448
446
  });
449
- M?.(r(j, `providers/${t?.id || ""}`));
447
+ j?.(r(A, `providers/${t?.id || ""}`));
450
448
  }
451
449
  } catch (e) {
452
- G(e instanceof Error ? e.message : N("integrations.providerEditor.errors.saveFailed", "Failed to save provider"));
450
+ W(e instanceof Error ? e.message : M("integrations.providerEditor.errors.saveFailed", "Failed to save provider"));
453
451
  }
454
452
  },
455
- disabled: V || U,
456
- children: [V || U ? /* @__PURE__ */ _(f, {
453
+ disabled: B || H,
454
+ children: [B || H ? /* @__PURE__ */ g(d, {
457
455
  size: 16,
458
456
  className: "animate-spin"
459
- }) : /* @__PURE__ */ _(p, { size: 16 }), A ? N("integrations.common.save", "Save Provider") : N("integrations.common.create", "Create Provider")]
457
+ }) : /* @__PURE__ */ g(f, { size: 16 }), k ? M("integrations.common.save", "Save Provider") : M("integrations.common.create", "Create Provider")]
460
458
  })
461
459
  })
462
460
  ]
463
- }) : /* @__PURE__ */ v("div", {
461
+ }) : /* @__PURE__ */ _("div", {
464
462
  className: "flex flex-col items-center justify-center py-20 text-center p-6",
465
463
  children: [
466
- /* @__PURE__ */ _(m, {
464
+ /* @__PURE__ */ g(p, {
467
465
  size: 48,
468
466
  className: "text-text-secondary mb-4"
469
467
  }),
470
- /* @__PURE__ */ _("h2", {
468
+ /* @__PURE__ */ g("h2", {
471
469
  className: "text-xl font-bold text-text-primary mb-2",
472
- children: N("integrations.providerEditor.accessDenied.title", "Access Denied")
470
+ children: M("integrations.providerEditor.accessDenied.title", "Access Denied")
473
471
  }),
474
- /* @__PURE__ */ _("p", {
472
+ /* @__PURE__ */ g("p", {
475
473
  className: "text-sm text-text-secondary max-w-md",
476
- children: N("integrations.providerEditor.accessDenied.description", "You do not have permission to manage providers.")
474
+ children: M("integrations.providerEditor.accessDenied.description", "You do not have permission to manage providers.")
477
475
  })
478
476
  ]
479
477
  });
480
478
  }
481
- //#endregion
482
- export { k as ProviderEditorPage };
479
+ export { O as ProviderEditorPage };
483
480
 
484
481
  //# sourceMappingURL=ProviderEditorPage.js.map