@burdenoff/microfe-integrations 2026.625.3 → 2026.626.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.
@@ -7,9 +7,9 @@ import { ArrowLeft as l, Loader2 as u, Save as d, Shield as f } from "lucide-rea
7
7
  import { useParams as p } from "react-router-dom";
8
8
  import { usePermissions as m } from "@burdenoff/fe-libs/shared/providers/shell";
9
9
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
10
- import { Button as _, GlassCard as v, OptionalFields as y } from "@burdenoff/fe-libs/ui";
10
+ import { Button as _, EmphasisPanel as v, GlassCard as y, OptionalFields as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
11
11
  //#region src/integrations/pages/ProviderEditorPage.tsx
12
- var b = [
12
+ var S = [
13
13
  "COMMUNICATION",
14
14
  "PRODUCTIVITY",
15
15
  "CLOUD_STORAGE",
@@ -21,7 +21,7 @@ var b = [
21
21
  "PAYMENT",
22
22
  "ANALYTICS",
23
23
  "CUSTOM"
24
- ], x = [
24
+ ], C = [
25
25
  "OAUTH2",
26
26
  "API_KEY",
27
27
  "BASIC_AUTH",
@@ -29,7 +29,7 @@ var b = [
29
29
  "SERVICE_ACCOUNT",
30
30
  "CUSTOM"
31
31
  ];
32
- function S(e, t) {
32
+ function w(e, t) {
33
33
  let n = e.trim();
34
34
  if (n) try {
35
35
  return JSON.parse(n);
@@ -37,7 +37,7 @@ function S(e, t) {
37
37
  throw Error(`${t} must be valid JSON`);
38
38
  }
39
39
  }
40
- function C(e) {
40
+ function T(e) {
41
41
  return {
42
42
  communication: "COMMUNICATION",
43
43
  productivity: "PRODUCTIVITY",
@@ -52,7 +52,7 @@ function C(e) {
52
52
  other: "CUSTOM"
53
53
  }[e || ""] || "CUSTOM";
54
54
  }
55
- function w(e) {
55
+ function E(e) {
56
56
  return {
57
57
  oauth2: "OAUTH2",
58
58
  api_key: "API_KEY",
@@ -61,8 +61,8 @@ function w(e) {
61
61
  service_account: "SERVICE_ACCOUNT"
62
62
  }[e || ""] || "CUSTOM";
63
63
  }
64
- function T() {
65
- let { providerId: T } = p(), E = !!T, { basePath: D = "/", navigate: O } = e(), { hasPermission: k, isLoading: A } = m(), j = k(t.PROVIDER_CREATE), M = k(t.PROVIDER_UPDATE), { provider: N, loading: P } = i(T ?? ""), { installPlugin: F, loading: I } = r(), { updatePlugin: L, loading: R } = a(), [z, B] = c(""), [V, H] = c({
64
+ function D() {
65
+ let { providerId: D } = p(), O = !!D, { basePath: k = "/", navigate: A } = e(), { hasPermission: j, isLoading: M } = m(), N = j(t.PROVIDER_CREATE), P = j(t.PROVIDER_UPDATE), { provider: F, loading: I } = i(D ?? ""), { installPlugin: L, loading: R } = r(), { updatePlugin: z, loading: B } = a(), [V, H] = c(""), [U, W] = c({
66
66
  key: "",
67
67
  name: "",
68
68
  description: "",
@@ -87,44 +87,44 @@ function T() {
87
87
  isEnabled: !0
88
88
  });
89
89
  o(() => {
90
- !N || !E || H({
91
- key: N.key,
92
- name: N.name,
93
- description: N.description || "",
94
- category: C(N.category),
95
- authType: w(N.authType),
96
- icon: N.icon || "",
97
- color: N.color || "",
98
- website: N.website || "",
99
- docsUrl: N.docsUrl || "",
100
- baseUrl: N.baseUrl || "",
101
- apiVersion: N.apiVersion || "",
102
- pluginVersion: N.pluginVersion || "1.0.0",
103
- pluginAuthor: N.pluginAuthor || "",
104
- pluginRepository: N.pluginRepository || "",
105
- displayOrder: String(N.displayOrder || 0),
106
- defaultScopes: (N.defaultScopes || []).join(", "),
107
- supportedFeatures: (N.supportedFeatures || []).join(", "),
108
- oauthConfig: N.oauthConfig ? JSON.stringify(N.oauthConfig, null, 2) : "",
109
- availableScopes: N.availableScopes ? JSON.stringify(N.availableScopes, null, 2) : "",
110
- rateLimitConfig: N.rateLimitConfig ? JSON.stringify(N.rateLimitConfig, null, 2) : "",
111
- configSchema: N.configSchema ? JSON.stringify(N.configSchema, null, 2) : "",
112
- isEnabled: N.isEnabled
90
+ !F || !O || W({
91
+ key: F.key,
92
+ name: F.name,
93
+ description: F.description || "",
94
+ category: T(F.category),
95
+ authType: E(F.authType),
96
+ icon: F.icon || "",
97
+ color: F.color || "",
98
+ website: F.website || "",
99
+ docsUrl: F.docsUrl || "",
100
+ baseUrl: F.baseUrl || "",
101
+ apiVersion: F.apiVersion || "",
102
+ pluginVersion: F.pluginVersion || "1.0.0",
103
+ pluginAuthor: F.pluginAuthor || "",
104
+ pluginRepository: F.pluginRepository || "",
105
+ displayOrder: String(F.displayOrder || 0),
106
+ defaultScopes: (F.defaultScopes || []).join(", "),
107
+ supportedFeatures: (F.supportedFeatures || []).join(", "),
108
+ oauthConfig: F.oauthConfig ? JSON.stringify(F.oauthConfig, null, 2) : "",
109
+ availableScopes: F.availableScopes ? JSON.stringify(F.availableScopes, null, 2) : "",
110
+ rateLimitConfig: F.rateLimitConfig ? JSON.stringify(F.rateLimitConfig, null, 2) : "",
111
+ configSchema: F.configSchema ? JSON.stringify(F.configSchema, null, 2) : "",
112
+ isEnabled: F.isEnabled
113
113
  });
114
- }, [E, N]);
115
- let U = E ? M : j, W = s(), G = (e) => `${W}-${e}`, K = (e, t) => {
116
- H((n) => ({
114
+ }, [O, F]);
115
+ let G = O ? P : N, K = s(), q = (e) => `${K}-${e}`, J = (e, t) => {
116
+ W((n) => ({
117
117
  ...n,
118
118
  [e]: t
119
119
  }));
120
120
  };
121
- return A || E && P ? /* @__PURE__ */ h("div", {
121
+ return M || O && I ? /* @__PURE__ */ h("div", {
122
122
  className: "flex items-center justify-center py-20",
123
123
  children: /* @__PURE__ */ h(u, {
124
124
  size: 44,
125
125
  className: "animate-spin text-primary"
126
126
  })
127
- }) : U ? /* @__PURE__ */ g("div", {
127
+ }) : G ? /* @__PURE__ */ g("div", {
128
128
  className: "space-y-6 p-6 max-w-5xl mx-auto",
129
129
  children: [
130
130
  /* @__PURE__ */ g("div", {
@@ -132,92 +132,96 @@ function T() {
132
132
  children: [/* @__PURE__ */ h(_, {
133
133
  variant: "ghost",
134
134
  size: "icon",
135
- onClick: () => O?.(n(D, "providers")),
135
+ onClick: () => A?.(n(k, "providers")),
136
136
  "aria-label": "Back to providers",
137
137
  children: /* @__PURE__ */ h(l, { size: 20 })
138
138
  }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
139
139
  className: "text-2xl font-bold text-text-primary",
140
- children: E ? "Edit Provider" : "Add Provider"
140
+ children: O ? "Edit Provider" : "Add Provider"
141
141
  }), /* @__PURE__ */ h("p", {
142
142
  className: "text-sm text-text-secondary mt-1",
143
143
  children: "Configure catalog metadata, auth configuration, and runtime settings."
144
144
  })] })]
145
145
  }),
146
- z && /* @__PURE__ */ h("div", {
146
+ /* @__PURE__ */ h(x, {
147
+ icon: /* @__PURE__ */ h(f, { size: 16 }),
148
+ children: "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."
149
+ }),
150
+ V && /* @__PURE__ */ h("div", {
147
151
  className: "rounded-xl border border-border-seam bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
148
- children: z
152
+ children: V
149
153
  }),
150
154
  /* @__PURE__ */ g("div", {
151
155
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
152
156
  children: [/* @__PURE__ */ g(v, {
153
- className: "border-border-seam p-5 space-y-4",
157
+ className: "p-5 space-y-4",
154
158
  children: [
155
159
  /* @__PURE__ */ h("h2", {
156
160
  className: "font-semibold text-text-primary",
157
161
  children: "Core details"
158
162
  }),
159
- !E && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
160
- htmlFor: G("key"),
163
+ !O && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
164
+ htmlFor: q("key"),
161
165
  className: "block text-sm font-medium mb-1.5 text-text-primary",
162
166
  children: "Key"
163
167
  }), /* @__PURE__ */ h("input", {
164
- id: G("key"),
168
+ id: q("key"),
165
169
  "aria-label": "Key",
166
- value: V.key,
167
- onChange: (e) => K("key", e.target.value),
170
+ value: U.key,
171
+ onChange: (e) => J("key", e.target.value),
168
172
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm",
169
173
  placeholder: "e.g. slack-user"
170
174
  })] }),
171
175
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
172
- htmlFor: G("name"),
176
+ htmlFor: q("name"),
173
177
  className: "block text-sm font-medium mb-1.5 text-text-primary",
174
178
  children: "Name"
175
179
  }), /* @__PURE__ */ h("input", {
176
- id: G("name"),
180
+ id: q("name"),
177
181
  "aria-label": "Name",
178
- value: V.name,
179
- onChange: (e) => K("name", e.target.value),
182
+ value: U.name,
183
+ onChange: (e) => J("name", e.target.value),
180
184
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
181
185
  })] }),
182
186
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
183
- htmlFor: G("description"),
187
+ htmlFor: q("description"),
184
188
  className: "block text-sm font-medium mb-1.5 text-text-primary",
185
189
  children: "Description"
186
190
  }), /* @__PURE__ */ h("textarea", {
187
- id: G("description"),
191
+ id: q("description"),
188
192
  "aria-label": "Description",
189
- value: V.description,
190
- onChange: (e) => K("description", e.target.value),
193
+ value: U.description,
194
+ onChange: (e) => J("description", e.target.value),
191
195
  rows: 4,
192
196
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
193
197
  })] }),
194
198
  /* @__PURE__ */ g("div", {
195
199
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
196
200
  children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
197
- htmlFor: G("category"),
201
+ htmlFor: q("category"),
198
202
  className: "block text-sm font-medium mb-1.5 text-text-primary",
199
203
  children: "Category"
200
204
  }), /* @__PURE__ */ h("select", {
201
- id: G("category"),
205
+ id: q("category"),
202
206
  "aria-label": "Category",
203
- value: V.category,
204
- onChange: (e) => K("category", e.target.value),
207
+ value: U.category,
208
+ onChange: (e) => J("category", e.target.value),
205
209
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm",
206
- children: b.map((e) => /* @__PURE__ */ h("option", {
210
+ children: S.map((e) => /* @__PURE__ */ h("option", {
207
211
  value: e,
208
212
  children: e
209
213
  }, e))
210
214
  })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
211
- htmlFor: G("authType"),
215
+ htmlFor: q("authType"),
212
216
  className: "block text-sm font-medium mb-1.5 text-text-primary",
213
217
  children: "Auth Type"
214
218
  }), /* @__PURE__ */ h("select", {
215
- id: G("authType"),
219
+ id: q("authType"),
216
220
  "aria-label": "Auth Type",
217
- value: V.authType,
218
- onChange: (e) => K("authType", e.target.value),
221
+ value: U.authType,
222
+ onChange: (e) => J("authType", e.target.value),
219
223
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm",
220
- children: x.map((e) => /* @__PURE__ */ h("option", {
224
+ children: C.map((e) => /* @__PURE__ */ h("option", {
221
225
  value: e,
222
226
  children: e
223
227
  }, e))
@@ -226,78 +230,78 @@ function T() {
226
230
  /* @__PURE__ */ g("div", {
227
231
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
228
232
  children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
229
- htmlFor: G("website"),
233
+ htmlFor: q("website"),
230
234
  className: "block text-sm font-medium mb-1.5 text-text-primary",
231
235
  children: "Website"
232
236
  }), /* @__PURE__ */ h("input", {
233
- id: G("website"),
237
+ id: q("website"),
234
238
  "aria-label": "Website",
235
- value: V.website,
236
- onChange: (e) => K("website", e.target.value),
239
+ value: U.website,
240
+ onChange: (e) => J("website", e.target.value),
237
241
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
238
242
  })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
239
- htmlFor: G("docsUrl"),
243
+ htmlFor: q("docsUrl"),
240
244
  className: "block text-sm font-medium mb-1.5 text-text-primary",
241
245
  children: "Docs URL"
242
246
  }), /* @__PURE__ */ h("input", {
243
- id: G("docsUrl"),
247
+ id: q("docsUrl"),
244
248
  "aria-label": "Docs URL",
245
- value: V.docsUrl,
246
- onChange: (e) => K("docsUrl", e.target.value),
249
+ value: U.docsUrl,
250
+ onChange: (e) => J("docsUrl", e.target.value),
247
251
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
248
252
  })] })]
249
253
  }),
250
254
  /* @__PURE__ */ g("div", {
251
255
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
252
256
  children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
253
- htmlFor: G("pluginVersion"),
257
+ htmlFor: q("pluginVersion"),
254
258
  className: "block text-sm font-medium mb-1.5 text-text-primary",
255
259
  children: "Plugin version"
256
260
  }), /* @__PURE__ */ h("input", {
257
- id: G("pluginVersion"),
261
+ id: q("pluginVersion"),
258
262
  "aria-label": "Plugin version",
259
- value: V.pluginVersion,
260
- onChange: (e) => K("pluginVersion", e.target.value),
263
+ value: U.pluginVersion,
264
+ onChange: (e) => J("pluginVersion", e.target.value),
261
265
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
262
266
  })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
263
- htmlFor: G("displayOrder"),
267
+ htmlFor: q("displayOrder"),
264
268
  className: "block text-sm font-medium mb-1.5 text-text-primary",
265
269
  children: "Display order"
266
270
  }), /* @__PURE__ */ h("input", {
267
- id: G("displayOrder"),
271
+ id: q("displayOrder"),
268
272
  "aria-label": "Display order",
269
273
  type: "number",
270
- value: V.displayOrder,
271
- onChange: (e) => K("displayOrder", e.target.value),
274
+ value: U.displayOrder,
275
+ onChange: (e) => J("displayOrder", e.target.value),
272
276
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
273
277
  })] })]
274
278
  }),
275
279
  /* @__PURE__ */ g("div", {
276
280
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
277
281
  children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
278
- htmlFor: G("pluginAuthor"),
282
+ htmlFor: q("pluginAuthor"),
279
283
  className: "block text-sm font-medium mb-1.5 text-text-primary",
280
284
  children: "Plugin author"
281
285
  }), /* @__PURE__ */ h("input", {
282
- id: G("pluginAuthor"),
286
+ id: q("pluginAuthor"),
283
287
  "aria-label": "Plugin author",
284
- value: V.pluginAuthor,
285
- onChange: (e) => K("pluginAuthor", e.target.value),
288
+ value: U.pluginAuthor,
289
+ onChange: (e) => J("pluginAuthor", e.target.value),
286
290
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
287
291
  })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
288
- htmlFor: G("pluginRepository"),
292
+ htmlFor: q("pluginRepository"),
289
293
  className: "block text-sm font-medium mb-1.5 text-text-primary",
290
294
  children: "Repository"
291
295
  }), /* @__PURE__ */ h("input", {
292
- id: G("pluginRepository"),
296
+ id: q("pluginRepository"),
293
297
  "aria-label": "Repository",
294
- value: V.pluginRepository,
295
- onChange: (e) => K("pluginRepository", e.target.value),
298
+ value: U.pluginRepository,
299
+ onChange: (e) => J("pluginRepository", e.target.value),
296
300
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
297
301
  })] })]
298
302
  })
299
303
  ]
300
- }), /* @__PURE__ */ g(v, {
304
+ }), /* @__PURE__ */ g(y, {
301
305
  className: "border-border-seam p-5 space-y-4",
302
306
  children: [
303
307
  /* @__PURE__ */ h("h2", {
@@ -305,52 +309,52 @@ function T() {
305
309
  children: "Runtime config"
306
310
  }),
307
311
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
308
- htmlFor: G("baseUrl"),
312
+ htmlFor: q("baseUrl"),
309
313
  className: "block text-sm font-medium mb-1.5 text-text-primary",
310
314
  children: "Base URL"
311
315
  }), /* @__PURE__ */ h("input", {
312
- id: G("baseUrl"),
316
+ id: q("baseUrl"),
313
317
  "aria-label": "Base URL",
314
- value: V.baseUrl,
315
- onChange: (e) => K("baseUrl", e.target.value),
318
+ value: U.baseUrl,
319
+ onChange: (e) => J("baseUrl", e.target.value),
316
320
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
317
321
  })] }),
318
322
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
319
- htmlFor: G("apiVersion"),
323
+ htmlFor: q("apiVersion"),
320
324
  className: "block text-sm font-medium mb-1.5 text-text-primary",
321
325
  children: "API version"
322
326
  }), /* @__PURE__ */ h("input", {
323
- id: G("apiVersion"),
327
+ id: q("apiVersion"),
324
328
  "aria-label": "API version",
325
- value: V.apiVersion,
326
- onChange: (e) => K("apiVersion", e.target.value),
329
+ value: U.apiVersion,
330
+ onChange: (e) => J("apiVersion", e.target.value),
327
331
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
328
332
  })] }),
329
333
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
330
- htmlFor: G("defaultScopes"),
334
+ htmlFor: q("defaultScopes"),
331
335
  className: "block text-sm font-medium mb-1.5 text-text-primary",
332
336
  children: "Default scopes"
333
337
  }), /* @__PURE__ */ h("input", {
334
- id: G("defaultScopes"),
338
+ id: q("defaultScopes"),
335
339
  "aria-label": "Default scopes",
336
- value: V.defaultScopes,
337
- onChange: (e) => K("defaultScopes", e.target.value),
340
+ value: U.defaultScopes,
341
+ onChange: (e) => J("defaultScopes", e.target.value),
338
342
  placeholder: "openid, profile, email",
339
343
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
340
344
  })] }),
341
345
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
342
- htmlFor: G("supportedFeatures"),
346
+ htmlFor: q("supportedFeatures"),
343
347
  className: "block text-sm font-medium mb-1.5 text-text-primary",
344
348
  children: "Supported features"
345
349
  }), /* @__PURE__ */ h("input", {
346
- id: G("supportedFeatures"),
350
+ id: q("supportedFeatures"),
347
351
  "aria-label": "Supported features",
348
- value: V.supportedFeatures,
349
- onChange: (e) => K("supportedFeatures", e.target.value),
352
+ value: U.supportedFeatures,
353
+ onChange: (e) => J("supportedFeatures", e.target.value),
350
354
  placeholder: "messages, files, events",
351
355
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
352
356
  })] }),
353
- /* @__PURE__ */ h(y, {
357
+ /* @__PURE__ */ h(b, {
354
358
  title: "Advanced provider config",
355
359
  description: "Raw JSON for OAuth, scopes, rate limiting, and config schema. Most providers leave these blank.",
356
360
  children: /* @__PURE__ */ h("div", {
@@ -361,14 +365,14 @@ function T() {
361
365
  ["rateLimitConfig", "Rate limit config JSON"],
362
366
  ["configSchema", "Config schema JSON"]
363
367
  ].map(([e, t]) => /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
364
- htmlFor: G(e),
368
+ htmlFor: q(e),
365
369
  className: "block text-sm font-medium mb-1.5 text-text-primary",
366
370
  children: t
367
371
  }), /* @__PURE__ */ h("textarea", {
368
- id: G(e),
372
+ id: q(e),
369
373
  "aria-label": t,
370
- value: V[e],
371
- onChange: (t) => K(e, t.target.value),
374
+ value: U[e],
375
+ onChange: (t) => J(e, t.target.value),
372
376
  rows: 4,
373
377
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm font-mono"
374
378
  })] }, e))
@@ -378,8 +382,8 @@ function T() {
378
382
  className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5",
379
383
  children: [/* @__PURE__ */ h("input", {
380
384
  type: "checkbox",
381
- checked: V.isEnabled,
382
- onChange: (e) => K("isEnabled", e.target.checked),
385
+ checked: U.isEnabled,
386
+ onChange: (e) => J("isEnabled", e.target.checked),
383
387
  "aria-label": "Provider enabled"
384
388
  }), /* @__PURE__ */ h("span", {
385
389
  className: "text-sm text-text-primary",
@@ -394,53 +398,53 @@ function T() {
394
398
  children: /* @__PURE__ */ g(_, {
395
399
  onClick: async () => {
396
400
  try {
397
- B("");
401
+ H("");
398
402
  let e = {
399
- name: V.name.trim(),
400
- description: V.description.trim() || void 0,
401
- icon: V.icon.trim() || void 0,
402
- color: V.color.trim() || void 0,
403
- website: V.website.trim() || void 0,
404
- docsUrl: V.docsUrl.trim() || void 0,
405
- baseUrl: V.baseUrl.trim() || void 0,
406
- apiVersion: V.apiVersion.trim() || void 0,
407
- pluginVersion: V.pluginVersion.trim() || void 0,
408
- pluginAuthor: V.pluginAuthor.trim() || void 0,
409
- pluginRepository: V.pluginRepository.trim() || void 0,
410
- displayOrder: Number(V.displayOrder || "0"),
411
- defaultScopes: V.defaultScopes.split(",").flatMap((e) => {
403
+ name: U.name.trim(),
404
+ description: U.description.trim() || void 0,
405
+ icon: U.icon.trim() || void 0,
406
+ color: U.color.trim() || void 0,
407
+ website: U.website.trim() || void 0,
408
+ docsUrl: U.docsUrl.trim() || void 0,
409
+ baseUrl: U.baseUrl.trim() || void 0,
410
+ apiVersion: U.apiVersion.trim() || void 0,
411
+ pluginVersion: U.pluginVersion.trim() || void 0,
412
+ pluginAuthor: U.pluginAuthor.trim() || void 0,
413
+ pluginRepository: U.pluginRepository.trim() || void 0,
414
+ displayOrder: Number(U.displayOrder || "0"),
415
+ defaultScopes: U.defaultScopes.split(",").flatMap((e) => {
412
416
  let t = e.trim();
413
417
  return t ? [t] : [];
414
418
  }),
415
- supportedFeatures: V.supportedFeatures.split(",").flatMap((e) => {
419
+ supportedFeatures: U.supportedFeatures.split(",").flatMap((e) => {
416
420
  let t = e.trim();
417
421
  return t ? [t] : [];
418
422
  }),
419
- oauthConfig: S(V.oauthConfig, "OAuth config"),
420
- availableScopes: S(V.availableScopes, "Available scopes"),
421
- rateLimitConfig: S(V.rateLimitConfig, "Rate limit config"),
422
- configSchema: S(V.configSchema, "Config schema"),
423
- isEnabled: V.isEnabled
423
+ oauthConfig: w(U.oauthConfig, "OAuth config"),
424
+ availableScopes: w(U.availableScopes, "Available scopes"),
425
+ rateLimitConfig: w(U.rateLimitConfig, "Rate limit config"),
426
+ configSchema: w(U.configSchema, "Config schema"),
427
+ isEnabled: U.isEnabled
424
428
  };
425
- if (E && T) await L(T, e), O?.(n(D, `providers/${T}`));
429
+ if (O && D) await z(D, e), A?.(n(k, `providers/${D}`));
426
430
  else {
427
- let t = await F({
428
- key: V.key.trim(),
429
- category: V.category,
430
- authType: V.authType,
431
+ let t = await L({
432
+ key: U.key.trim(),
433
+ category: U.category,
434
+ authType: U.authType,
431
435
  ...e
432
436
  });
433
- O?.(n(D, `providers/${t?.id || ""}`));
437
+ A?.(n(k, `providers/${t?.id || ""}`));
434
438
  }
435
439
  } catch (e) {
436
- B(e instanceof Error ? e.message : "Failed to save provider");
440
+ H(e instanceof Error ? e.message : "Failed to save provider");
437
441
  }
438
442
  },
439
- disabled: I || R,
440
- children: [I || R ? /* @__PURE__ */ h(u, {
443
+ disabled: R || B,
444
+ children: [R || B ? /* @__PURE__ */ h(u, {
441
445
  size: 16,
442
446
  className: "animate-spin"
443
- }) : /* @__PURE__ */ h(d, { size: 16 }), E ? "Save Provider" : "Create Provider"]
447
+ }) : /* @__PURE__ */ h(d, { size: 16 }), O ? "Save Provider" : "Create Provider"]
444
448
  })
445
449
  })
446
450
  ]
@@ -463,6 +467,6 @@ function T() {
463
467
  });
464
468
  }
465
469
  //#endregion
466
- export { T as ProviderEditorPage };
470
+ export { D as ProviderEditorPage };
467
471
 
468
472
  //# sourceMappingURL=ProviderEditorPage.js.map