@burdenoff/microfe-integrations 2026.828.1 → 2026.830.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 (75) hide show
  1. package/dist/integrations/components/AddConnectionDialog.d.ts.map +1 -1
  2. package/dist/integrations/components/AddConnectionDialog.js +151 -152
  3. package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
  4. package/dist/integrations/components/AuthMethodSelector.d.ts.map +1 -1
  5. package/dist/integrations/components/AuthMethodSelector.js +48 -40
  6. package/dist/integrations/components/AuthMethodSelector.js.map +1 -1
  7. package/dist/integrations/components/AuthMethodsEditor.d.ts.map +1 -1
  8. package/dist/integrations/components/AuthMethodsEditor.js +207 -190
  9. package/dist/integrations/components/AuthMethodsEditor.js.map +1 -1
  10. package/dist/integrations/components/ConnectionCard.d.ts.map +1 -1
  11. package/dist/integrations/components/ConnectionCard.js +102 -98
  12. package/dist/integrations/components/ConnectionCard.js.map +1 -1
  13. package/dist/integrations/components/ConnectionStatusBadge.d.ts.map +1 -1
  14. package/dist/integrations/components/ConnectionStatusBadge.js +9 -5
  15. package/dist/integrations/components/ConnectionStatusBadge.js.map +1 -1
  16. package/dist/integrations/components/CredentialStorageSelector.d.ts.map +1 -1
  17. package/dist/integrations/components/CredentialStorageSelector.js +124 -121
  18. package/dist/integrations/components/CredentialStorageSelector.js.map +1 -1
  19. package/dist/integrations/components/ProviderCard.d.ts.map +1 -1
  20. package/dist/integrations/components/ProviderCard.js +25 -65
  21. package/dist/integrations/components/ProviderCard.js.map +1 -1
  22. package/dist/integrations/components/SchemaForm.d.ts.map +1 -1
  23. package/dist/integrations/components/SchemaForm.js +116 -111
  24. package/dist/integrations/components/SchemaForm.js.map +1 -1
  25. package/dist/integrations/hooks/useFormatDate.d.ts +7 -0
  26. package/dist/integrations/hooks/useFormatDate.d.ts.map +1 -0
  27. package/dist/integrations/hooks/useFormatDate.js +17 -0
  28. package/dist/integrations/hooks/useFormatDate.js.map +1 -0
  29. package/dist/integrations/hooks/useFormatLastUsed.d.ts +9 -0
  30. package/dist/integrations/hooks/useFormatLastUsed.d.ts.map +1 -0
  31. package/dist/integrations/hooks/useFormatLastUsed.js +15 -0
  32. package/dist/integrations/hooks/useFormatLastUsed.js.map +1 -0
  33. package/dist/integrations/hooks/useLabel.d.ts +13 -0
  34. package/dist/integrations/hooks/useLabel.d.ts.map +1 -0
  35. package/dist/integrations/hooks/useLabel.js +20 -0
  36. package/dist/integrations/hooks/useLabel.js.map +1 -0
  37. package/dist/integrations/hooks/useTr.d.ts +17 -0
  38. package/dist/integrations/hooks/useTr.d.ts.map +1 -0
  39. package/dist/integrations/hooks/useTr.js +14 -0
  40. package/dist/integrations/hooks/useTr.js.map +1 -0
  41. package/dist/integrations/pages/AddConnectionWizard.d.ts.map +1 -1
  42. package/dist/integrations/pages/AddConnectionWizard.js +396 -387
  43. package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
  44. package/dist/integrations/pages/ConnectionDetail.d.ts.map +1 -1
  45. package/dist/integrations/pages/ConnectionDetail.js +128 -128
  46. package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
  47. package/dist/integrations/pages/ConnectionLogs.d.ts.map +1 -1
  48. package/dist/integrations/pages/ConnectionLogs.js +210 -181
  49. package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
  50. package/dist/integrations/pages/ConnectionsList.d.ts.map +1 -1
  51. package/dist/integrations/pages/ConnectionsList.js +136 -115
  52. package/dist/integrations/pages/ConnectionsList.js.map +1 -1
  53. package/dist/integrations/pages/IntegrationsOverview.d.ts.map +1 -1
  54. package/dist/integrations/pages/IntegrationsOverview.js +76 -77
  55. package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
  56. package/dist/integrations/pages/IntegrationsSettings.d.ts.map +1 -1
  57. package/dist/integrations/pages/IntegrationsSettings.js +59 -61
  58. package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
  59. package/dist/integrations/pages/IntegrationsUserLandingPage.d.ts.map +1 -1
  60. package/dist/integrations/pages/IntegrationsUserLandingPage.js +29 -28
  61. package/dist/integrations/pages/IntegrationsUserLandingPage.js.map +1 -1
  62. package/dist/integrations/pages/ProviderCatalog.d.ts.map +1 -1
  63. package/dist/integrations/pages/ProviderCatalog.js +99 -141
  64. package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
  65. package/dist/integrations/pages/ProviderDetail.d.ts.map +1 -1
  66. package/dist/integrations/pages/ProviderDetail.js +208 -220
  67. package/dist/integrations/pages/ProviderDetail.js.map +1 -1
  68. package/dist/integrations/pages/ProviderEditorPage.d.ts.map +1 -1
  69. package/dist/integrations/pages/ProviderEditorPage.js +262 -261
  70. package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
  71. package/dist/integrations/translations/en.d.ts +731 -0
  72. package/dist/integrations/translations/en.d.ts.map +1 -0
  73. package/dist/integrations/utils/integrationsHelpers.js +2 -16
  74. package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
  75. package/package.json +1 -1
@@ -1,11 +1,12 @@
1
- import { useDeleteAuthMethod as e, useUpsertAuthMethod as t } from "../hooks/useProviders.js";
2
- import { SchemaForm as n, parseFormSchema as r } from "./SchemaForm.js";
3
- import { useId as i, useState as a } from "react";
4
- import { AlertCircle as o, Check as s, Loader2 as c, Plus as l, Star as u, Trash2 as d, X as f } from "lucide-react";
5
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
6
- import { Button as h } from "@burdenoff/fe-libs/ui";
1
+ import { useTr as e } from "../hooks/useTr.js";
2
+ import { useDeleteAuthMethod as t, useUpsertAuthMethod as n } from "../hooks/useProviders.js";
3
+ import { SchemaForm as r, parseFormSchema as i } from "./SchemaForm.js";
4
+ import { useId as a, useState as o } from "react";
5
+ import { AlertCircle as s, Check as c, Loader2 as l, Plus as u, Star as d, Trash2 as f, X as p } from "lucide-react";
6
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
7
+ import { Button as g } from "@burdenoff/fe-libs/ui";
7
8
  //#region src/integrations/components/AuthMethodsEditor.tsx
8
- var g = [
9
+ var _ = [
9
10
  "OAUTH2",
10
11
  "OAUTH1",
11
12
  "API_KEY",
@@ -14,12 +15,12 @@ var g = [
14
15
  "SERVICE_ACCOUNT",
15
16
  "WORKSPACE_APP_TOKEN",
16
17
  "CUSTOM"
17
- ], _ = [
18
+ ], v = [
18
19
  "FIELDS",
19
20
  "OAUTH2",
20
21
  "MINTED"
21
22
  ];
22
- function v(e) {
23
+ function y(e) {
23
24
  return {
24
25
  key: e.key,
25
26
  displayName: e.displayName,
@@ -32,7 +33,7 @@ function v(e) {
32
33
  displayOrder: String(e.displayOrder)
33
34
  };
34
35
  }
35
- var y = {
36
+ var b = {
36
37
  key: "",
37
38
  displayName: "",
38
39
  description: "",
@@ -42,106 +43,114 @@ var y = {
42
43
  isDefault: !1,
43
44
  isEnabled: !0,
44
45
  displayOrder: "0"
45
- }, b = ({ provider: b, canManage: T }) => {
46
- let { upsertAuthMethod: E, loading: D } = t(), { deleteAuthMethod: O, loading: k } = e(), [A, j] = a(null), [M, N] = a(""), P = i(), F = (e) => `${P}-${e}`, I = b.authMethods ?? [], L = D || k, R = A ? r(C(A.configSchema)) : null, z = async () => {
47
- if (!A) return;
48
- if (N(""), !A.key.trim() || !A.displayName.trim()) {
49
- N("Key and display name are required");
46
+ }, x = ({ provider: x, canManage: E }) => {
47
+ let D = e(), { upsertAuthMethod: O, loading: k } = n(), { deleteAuthMethod: A, loading: j } = t(), [M, N] = o(null), [P, F] = o(""), I = a(), L = (e) => `${I}-${e}`, R = x.authMethods ?? [], z = k || j, B = M ? i(w(M.configSchema)) : null, V = async () => {
48
+ if (!M) return;
49
+ if (F(""), !M.key.trim() || !M.displayName.trim()) {
50
+ F(D("integrations.providerEditor.errors.keyAndNameRequired", "Key and display name are required"));
50
51
  return;
51
52
  }
52
53
  let e = null;
53
- if (A.configSchema.trim()) {
54
- let t = C(A.configSchema);
54
+ if (M.configSchema.trim()) {
55
+ let t = w(M.configSchema);
55
56
  if (!t) {
56
- N("Field schema is not valid JSON");
57
+ F(D("integrations.providerEditor.errors.invalidSchema", "Field schema is not valid JSON"));
57
58
  return;
58
59
  }
59
60
  e = t;
60
61
  }
61
62
  try {
62
- await E(b.id, {
63
- key: A.key.trim(),
64
- displayName: A.displayName.trim(),
65
- description: A.description.trim() || void 0,
66
- authType: A.authType,
67
- flow: A.flow,
63
+ await O(x.id, {
64
+ key: M.key.trim(),
65
+ displayName: M.displayName.trim(),
66
+ description: M.description.trim() || void 0,
67
+ authType: M.authType,
68
+ flow: M.flow,
68
69
  configSchema: e,
69
- isDefault: A.isDefault,
70
- isEnabled: A.isEnabled,
71
- displayOrder: Number(A.displayOrder) || 0
72
- }), j(null);
70
+ isDefault: M.isDefault,
71
+ isEnabled: M.isEnabled,
72
+ displayOrder: Number(M.displayOrder) || 0
73
+ }), N(null);
73
74
  } catch (e) {
74
- N(e instanceof Error ? e.message : "Failed to save method");
75
+ F(e instanceof Error ? e.message : D("integrations.providerEditor.errors.saveMethodFailed", "Failed to save method"));
75
76
  }
76
- }, B = async (e) => {
77
- if (window.confirm(`Remove the "${e}" authentication method? Connections still using it will block the removal.`)) {
78
- N("");
77
+ }, H = async (e) => {
78
+ if (window.confirm(D("integrations.providerEditor.authMethods.deleteConfirm", "Remove the \"{{key}}\" authentication method? Connections still using it will block the removal.", { key: e }))) {
79
+ F("");
79
80
  try {
80
- await O(b.id, e);
81
+ await A(x.id, e);
81
82
  } catch (e) {
82
- N(e instanceof Error ? e.message : "Failed to remove method");
83
+ F(e instanceof Error ? e.message : D("integrations.providerEditor.errors.removeMethodFailed", "Failed to remove method"));
83
84
  }
84
85
  }
85
86
  };
86
- return /* @__PURE__ */ m("div", {
87
+ return /* @__PURE__ */ h("div", {
87
88
  className: "space-y-4",
88
89
  children: [
89
- /* @__PURE__ */ m("div", {
90
+ /* @__PURE__ */ h("div", {
90
91
  className: "flex items-start justify-between gap-4",
91
- children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h3", {
92
+ children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
92
93
  className: "text-sm font-semibold text-text-primary",
93
- children: "Authentication Methods"
94
- }), /* @__PURE__ */ p("p", {
94
+ children: D("integrations.providerEditor.sections.authMethods", "Authentication Methods")
95
+ }), /* @__PURE__ */ m("p", {
95
96
  className: "text-xs text-text-secondary mt-1",
96
- children: "Ways users can authenticate against this provider. When more than one is enabled, the connection form shows a dropdown. Fields come from each method's schema."
97
- })] }), T && !A && /* @__PURE__ */ m(h, {
97
+ children: D("integrations.providerEditor.sections.authMethodsDescription", "Ways users can authenticate against this provider. When more than one is enabled, the connection form shows a dropdown. Fields come from each method's schema.")
98
+ })] }), E && !M && /* @__PURE__ */ h(g, {
98
99
  variant: "outline",
99
100
  size: "sm",
100
- onClick: () => j({ ...y }),
101
- children: [/* @__PURE__ */ p(l, { size: 14 }), " Add method"]
101
+ onClick: () => N({ ...b }),
102
+ children: [
103
+ /* @__PURE__ */ m(u, { size: 14 }),
104
+ " ",
105
+ D("integrations.providerEditor.authMethods.add", "Add method")
106
+ ]
102
107
  })]
103
108
  }),
104
- M && /* @__PURE__ */ m("div", {
109
+ P && /* @__PURE__ */ h("div", {
105
110
  className: "flex items-center gap-2 px-3 py-2 rounded-md bg-status-error-bg-subtle border border-border-default",
106
- children: [/* @__PURE__ */ p(o, {
111
+ children: [/* @__PURE__ */ m(s, {
107
112
  size: 16,
108
113
  className: "text-status-error-text flex-shrink-0"
109
- }), /* @__PURE__ */ p("span", {
114
+ }), /* @__PURE__ */ m("span", {
110
115
  className: "text-sm text-status-error-text",
111
- children: M
116
+ children: P
112
117
  })]
113
118
  }),
114
- /* @__PURE__ */ m("div", {
119
+ /* @__PURE__ */ h("div", {
115
120
  className: "space-y-2",
116
- children: [I.length === 0 && /* @__PURE__ */ p("p", {
121
+ children: [R.length === 0 && /* @__PURE__ */ m("p", {
117
122
  className: "text-sm text-text-secondary",
118
- children: "No authentication methods defined yet."
119
- }), I.map((e) => /* @__PURE__ */ m("div", {
123
+ children: D("integrations.providerEditor.authMethods.none", "No authentication methods defined yet.")
124
+ }), R.map((e) => /* @__PURE__ */ h("div", {
120
125
  className: "flex items-center gap-3 p-3 rounded-md border border-border-subtle",
121
- children: [/* @__PURE__ */ m("div", {
126
+ children: [/* @__PURE__ */ h("div", {
122
127
  className: "flex-1 min-w-0",
123
- children: [/* @__PURE__ */ m("div", {
128
+ children: [/* @__PURE__ */ h("div", {
124
129
  className: "flex items-center gap-2",
125
130
  children: [
126
- /* @__PURE__ */ p("span", {
131
+ /* @__PURE__ */ m("span", {
127
132
  className: "text-sm font-medium text-text-primary truncate",
128
133
  children: e.displayName
129
134
  }),
130
- e.isDefault && /* @__PURE__ */ m("span", {
131
- title: "Default method",
135
+ e.isDefault && /* @__PURE__ */ h("span", {
136
+ title: D("integrations.providerEditor.authMethods.defaultMethod", "Default method"),
132
137
  className: "inline-flex items-center gap-1 text-xs text-text-secondary",
133
- children: [/* @__PURE__ */ p(u, { size: 12 }), " default"]
138
+ children: [
139
+ /* @__PURE__ */ m(d, { size: 12 }),
140
+ " ",
141
+ D("integrations.providerEditor.authMethods.default", "default")
142
+ ]
134
143
  }),
135
- !e.isEnabled && /* @__PURE__ */ p("span", {
144
+ !e.isEnabled && /* @__PURE__ */ m("span", {
136
145
  className: "text-xs text-text-secondary",
137
- children: "disabled"
146
+ children: D("integrations.providerEditor.authMethods.disabled", "disabled")
138
147
  }),
139
- !e.isConfigured && /* @__PURE__ */ p("span", {
148
+ !e.isConfigured && /* @__PURE__ */ m("span", {
140
149
  className: "text-xs text-status-warning-text",
141
- children: "not configured"
150
+ children: D("integrations.providerEditor.authMethods.notConfigured", "not configured")
142
151
  })
143
152
  ]
144
- }), /* @__PURE__ */ m("div", {
153
+ }), /* @__PURE__ */ h("div", {
145
154
  className: "text-xs text-text-secondary mt-0.5",
146
155
  children: [
147
156
  e.key,
@@ -151,93 +160,93 @@ var y = {
151
160
  e.flow
152
161
  ]
153
162
  })]
154
- }), T && /* @__PURE__ */ m("div", {
163
+ }), E && /* @__PURE__ */ h("div", {
155
164
  className: "flex items-center gap-1",
156
- children: [/* @__PURE__ */ p(h, {
165
+ children: [/* @__PURE__ */ m(g, {
157
166
  variant: "ghost",
158
167
  size: "sm",
159
- onClick: () => j(v(e)),
160
- children: "Edit"
161
- }), /* @__PURE__ */ p(h, {
168
+ onClick: () => N(y(e)),
169
+ children: D("integrations.providerEditor.authMethods.edit", "Edit")
170
+ }), /* @__PURE__ */ m(g, {
162
171
  variant: "ghost",
163
172
  size: "sm",
164
- "aria-label": `Remove ${e.displayName}`,
165
- onClick: () => B(e.key),
166
- disabled: L,
167
- children: /* @__PURE__ */ p(d, { size: 14 })
173
+ "aria-label": D("integrations.providerEditor.authMethods.removeAriaLabel", "Remove {{name}}", { name: e.displayName }),
174
+ onClick: () => H(e.key),
175
+ disabled: z,
176
+ children: /* @__PURE__ */ m(f, { size: 14 })
168
177
  })]
169
178
  })]
170
179
  }, e.key))]
171
180
  }),
172
- A && /* @__PURE__ */ m("div", {
181
+ M && /* @__PURE__ */ h("div", {
173
182
  className: "rounded-md border border-border-subtle p-4 space-y-3",
174
183
  children: [
175
- /* @__PURE__ */ m("div", {
184
+ /* @__PURE__ */ h("div", {
176
185
  className: "grid grid-cols-1 md:grid-cols-2 gap-3",
177
186
  children: [
178
- /* @__PURE__ */ p(w, {
179
- label: "Key",
180
- id: F("key"),
187
+ /* @__PURE__ */ m(T, {
188
+ label: D("integrations.providerEditor.authMethods.key", "Key"),
189
+ id: L("key"),
181
190
  required: !0,
182
- children: /* @__PURE__ */ p("input", {
183
- id: F("key"),
184
- "aria-label": "Method key",
185
- value: A.key,
186
- onChange: (e) => j({
187
- ...A,
191
+ children: /* @__PURE__ */ m("input", {
192
+ id: L("key"),
193
+ "aria-label": D("integrations.providerEditor.authMethods.key", "Key"),
194
+ value: M.key,
195
+ onChange: (e) => N({
196
+ ...M,
188
197
  key: e.target.value
189
198
  }),
190
- placeholder: "service-account",
191
- className: x
199
+ placeholder: D("integrations.providerEditor.authMethods.keyPlaceholder", "service-account"),
200
+ className: S
192
201
  })
193
202
  }),
194
- /* @__PURE__ */ p(w, {
195
- label: "Display name",
196
- id: F("displayName"),
203
+ /* @__PURE__ */ m(T, {
204
+ label: D("integrations.providerEditor.authMethods.displayName", "Display name"),
205
+ id: L("displayName"),
197
206
  required: !0,
198
- children: /* @__PURE__ */ p("input", {
199
- id: F("displayName"),
200
- "aria-label": "Display name",
201
- value: A.displayName,
202
- onChange: (e) => j({
203
- ...A,
207
+ children: /* @__PURE__ */ m("input", {
208
+ id: L("displayName"),
209
+ "aria-label": D("integrations.providerEditor.authMethods.displayName", "Display name"),
210
+ value: M.displayName,
211
+ onChange: (e) => N({
212
+ ...M,
204
213
  displayName: e.target.value
205
214
  }),
206
- placeholder: "Service Account",
207
- className: x
215
+ placeholder: D("integrations.providerEditor.authMethods.displayNamePlaceholder", "Service Account"),
216
+ className: S
208
217
  })
209
218
  }),
210
- /* @__PURE__ */ p(w, {
211
- label: "Auth type",
212
- id: F("authType"),
213
- children: /* @__PURE__ */ p("select", {
214
- id: F("authType"),
215
- "aria-label": "Auth type",
216
- value: A.authType,
217
- onChange: (e) => j({
218
- ...A,
219
+ /* @__PURE__ */ m(T, {
220
+ label: D("integrations.providerEditor.authMethods.authType", "Auth type"),
221
+ id: L("authType"),
222
+ children: /* @__PURE__ */ m("select", {
223
+ id: L("authType"),
224
+ "aria-label": D("integrations.providerEditor.authMethods.authType", "Auth type"),
225
+ value: M.authType,
226
+ onChange: (e) => N({
227
+ ...M,
219
228
  authType: e.target.value
220
229
  }),
221
- className: x,
222
- children: g.map((e) => /* @__PURE__ */ p("option", {
230
+ className: S,
231
+ children: _.map((e) => /* @__PURE__ */ m("option", {
223
232
  value: e,
224
233
  children: e
225
234
  }, e))
226
235
  })
227
236
  }),
228
- /* @__PURE__ */ p(w, {
229
- label: "Flow",
230
- id: F("flow"),
231
- children: /* @__PURE__ */ p("select", {
232
- id: F("flow"),
233
- "aria-label": "Flow",
234
- value: A.flow,
235
- onChange: (e) => j({
236
- ...A,
237
+ /* @__PURE__ */ m(T, {
238
+ label: D("integrations.providerEditor.authMethods.flow", "Flow"),
239
+ id: L("flow"),
240
+ children: /* @__PURE__ */ m("select", {
241
+ id: L("flow"),
242
+ "aria-label": D("integrations.providerEditor.authMethods.flow", "Flow"),
243
+ value: M.flow,
244
+ onChange: (e) => N({
245
+ ...M,
237
246
  flow: e.target.value
238
247
  }),
239
- className: x,
240
- children: _.map((e) => /* @__PURE__ */ p("option", {
248
+ className: S,
249
+ children: v.map((e) => /* @__PURE__ */ m("option", {
241
250
  value: e,
242
251
  children: e
243
252
  }, e))
@@ -245,122 +254,130 @@ var y = {
245
254
  })
246
255
  ]
247
256
  }),
248
- /* @__PURE__ */ p(w, {
249
- label: "Description",
250
- id: F("description"),
251
- children: /* @__PURE__ */ p("input", {
252
- id: F("description"),
253
- "aria-label": "Description",
254
- value: A.description,
255
- onChange: (e) => j({
256
- ...A,
257
+ /* @__PURE__ */ m(T, {
258
+ label: D("integrations.providerEditor.fields.description", "Description"),
259
+ id: L("description"),
260
+ children: /* @__PURE__ */ m("input", {
261
+ id: L("description"),
262
+ "aria-label": D("integrations.providerEditor.fields.description", "Description"),
263
+ value: M.description,
264
+ onChange: (e) => N({
265
+ ...M,
257
266
  description: e.target.value
258
267
  }),
259
- className: x
268
+ className: S
260
269
  })
261
270
  }),
262
- /* @__PURE__ */ m("div", {
271
+ /* @__PURE__ */ h("div", {
263
272
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
264
- children: [/* @__PURE__ */ p(w, {
265
- label: "Field schema (JSON)",
266
- id: F("configSchema"),
267
- children: /* @__PURE__ */ p("textarea", {
268
- id: F("configSchema"),
269
- "aria-label": "Field schema",
270
- value: A.configSchema,
271
- onChange: (e) => j({
272
- ...A,
273
+ children: [/* @__PURE__ */ m(T, {
274
+ label: D("integrations.providerEditor.authMethods.configSchema", "Field schema (JSON)"),
275
+ id: L("configSchema"),
276
+ children: /* @__PURE__ */ m("textarea", {
277
+ id: L("configSchema"),
278
+ "aria-label": D("integrations.providerEditor.authMethods.configSchema", "Field schema (JSON)"),
279
+ value: M.configSchema,
280
+ onChange: (e) => N({
281
+ ...M,
273
282
  configSchema: e.target.value
274
283
  }),
275
284
  rows: 12,
276
285
  spellCheck: !1,
277
- placeholder: S,
278
- className: `${x} font-mono text-xs`
286
+ placeholder: C,
287
+ className: `${S} font-mono text-xs`
279
288
  })
280
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
289
+ }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("span", {
281
290
  className: "block text-sm font-medium text-text-primary mb-1.5",
282
- children: "Live preview"
283
- }), /* @__PURE__ */ p("div", {
291
+ children: D("integrations.providerEditor.authMethods.livePreview", "Live preview")
292
+ }), /* @__PURE__ */ m("div", {
284
293
  className: "rounded-md border border-border-subtle p-3 bg-bg-surface min-h-[200px]",
285
- children: R ? /* @__PURE__ */ p(n, {
286
- schema: R,
294
+ children: B ? /* @__PURE__ */ m(r, {
295
+ schema: B,
287
296
  values: {},
288
297
  onChange: () => void 0,
289
298
  disabled: !0,
290
- idPrefix: F("preview")
291
- }) : /* @__PURE__ */ p("p", {
299
+ idPrefix: L("preview")
300
+ }) : /* @__PURE__ */ m("p", {
292
301
  className: "text-xs text-text-secondary",
293
- children: A.configSchema.trim() ? "Not a valid object schema yet." : "Describe fields on the left to preview the form users will see."
302
+ children: M.configSchema.trim() ? D("integrations.providerEditor.authMethods.previewInvalid", "Not a valid object schema yet.") : D("integrations.providerEditor.authMethods.previewEmpty", "Describe fields on the left to preview the form users will see.")
294
303
  })
295
304
  })] })]
296
305
  }),
297
- /* @__PURE__ */ m("div", {
306
+ /* @__PURE__ */ h("div", {
298
307
  className: "flex flex-wrap items-center gap-4",
299
308
  children: [
300
- /* @__PURE__ */ m("label", {
309
+ /* @__PURE__ */ h("label", {
301
310
  className: "flex items-center gap-2 text-sm text-text-primary",
302
- children: [/* @__PURE__ */ p("input", {
311
+ children: [/* @__PURE__ */ m("input", {
303
312
  type: "checkbox",
304
- "aria-label": "Default method",
305
- checked: A.isDefault,
306
- onChange: (e) => j({
307
- ...A,
313
+ "aria-label": D("integrations.providerEditor.authMethods.defaultMethod", "Default method"),
314
+ checked: M.isDefault,
315
+ onChange: (e) => N({
316
+ ...M,
308
317
  isDefault: e.target.checked
309
318
  })
310
- }), "Default method"]
319
+ }), D("integrations.providerEditor.authMethods.defaultMethod", "Default method")]
311
320
  }),
312
- /* @__PURE__ */ m("label", {
321
+ /* @__PURE__ */ h("label", {
313
322
  className: "flex items-center gap-2 text-sm text-text-primary",
314
- children: [/* @__PURE__ */ p("input", {
323
+ children: [/* @__PURE__ */ m("input", {
315
324
  type: "checkbox",
316
- "aria-label": "Enabled",
317
- checked: A.isEnabled,
318
- onChange: (e) => j({
319
- ...A,
325
+ "aria-label": D("integrations.providerEditor.authMethods.enabled", "Enabled"),
326
+ checked: M.isEnabled,
327
+ onChange: (e) => N({
328
+ ...M,
320
329
  isEnabled: e.target.checked
321
330
  })
322
- }), "Enabled"]
331
+ }), D("integrations.providerEditor.authMethods.enabled", "Enabled")]
323
332
  }),
324
- /* @__PURE__ */ p(w, {
325
- label: "Order",
326
- id: F("displayOrder"),
333
+ /* @__PURE__ */ m(T, {
334
+ label: D("integrations.providerEditor.authMethods.order", "Order"),
335
+ id: L("displayOrder"),
327
336
  inline: !0,
328
- children: /* @__PURE__ */ p("input", {
329
- id: F("displayOrder"),
330
- "aria-label": "Display order",
337
+ children: /* @__PURE__ */ m("input", {
338
+ id: L("displayOrder"),
339
+ "aria-label": D("integrations.providerEditor.authMethods.order", "Order"),
331
340
  type: "number",
332
- value: A.displayOrder,
333
- onChange: (e) => j({
334
- ...A,
341
+ value: M.displayOrder,
342
+ onChange: (e) => N({
343
+ ...M,
335
344
  displayOrder: e.target.value
336
345
  }),
337
- className: `${x} w-20`
346
+ className: `${S} w-20`
338
347
  })
339
348
  })
340
349
  ]
341
350
  }),
342
- /* @__PURE__ */ m("div", {
351
+ /* @__PURE__ */ h("div", {
343
352
  className: "flex items-center gap-2",
344
- children: [/* @__PURE__ */ m(h, {
345
- onClick: z,
346
- disabled: L,
347
- children: [L ? /* @__PURE__ */ p(c, {
348
- size: 14,
349
- className: "animate-spin"
350
- }) : /* @__PURE__ */ p(s, { size: 14 }), " Save method"]
351
- }), /* @__PURE__ */ m(h, {
353
+ children: [/* @__PURE__ */ h(g, {
354
+ onClick: V,
355
+ disabled: z,
356
+ children: [
357
+ z ? /* @__PURE__ */ m(l, {
358
+ size: 14,
359
+ className: "animate-spin"
360
+ }) : /* @__PURE__ */ m(c, { size: 14 }),
361
+ " ",
362
+ D("integrations.providerEditor.authMethods.save", "Save method")
363
+ ]
364
+ }), /* @__PURE__ */ h(g, {
352
365
  variant: "outline",
353
- onClick: () => j(null),
354
- disabled: L,
355
- children: [/* @__PURE__ */ p(f, { size: 14 }), " Cancel"]
366
+ onClick: () => N(null),
367
+ disabled: z,
368
+ children: [
369
+ /* @__PURE__ */ m(p, { size: 14 }),
370
+ " ",
371
+ D("integrations.common.cancel", "Cancel")
372
+ ]
356
373
  })]
357
374
  })
358
375
  ]
359
376
  })
360
377
  ]
361
378
  });
362
- }, x = "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50", S = "{\n \"type\": \"object\",\n \"properties\": {\n \"apiKey\": { \"type\": \"string\", \"title\": \"API Key\", \"secret\": true }\n },\n \"required\": [\"apiKey\"]\n}";
363
- function C(e) {
379
+ }, S = "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50", C = "{\n \"type\": \"object\",\n \"properties\": {\n \"apiKey\": { \"type\": \"string\", \"title\": \"API Key\", \"secret\": true }\n },\n \"required\": [\"apiKey\"]\n}";
380
+ function w(e) {
364
381
  if (!e.trim()) return null;
365
382
  try {
366
383
  let t = JSON.parse(e);
@@ -369,15 +386,15 @@ function C(e) {
369
386
  return null;
370
387
  }
371
388
  }
372
- var w = ({ label: e, id: t, required: n, inline: r, children: i }) => /* @__PURE__ */ m("div", {
389
+ var T = ({ label: e, id: t, required: n, inline: r, children: i }) => /* @__PURE__ */ h("div", {
373
390
  className: r ? "flex items-center gap-2" : void 0,
374
- children: [/* @__PURE__ */ m("label", {
391
+ children: [/* @__PURE__ */ h("label", {
375
392
  htmlFor: t,
376
393
  className: r ? "text-sm font-medium text-text-primary" : "block text-sm font-medium text-text-primary mb-1.5",
377
394
  children: [
378
395
  e,
379
396
  " ",
380
- n && /* @__PURE__ */ p("span", {
397
+ n && /* @__PURE__ */ m("span", {
381
398
  className: "text-status-error-text",
382
399
  children: "*"
383
400
  })
@@ -385,6 +402,6 @@ var w = ({ label: e, id: t, required: n, inline: r, children: i }) => /* @__PURE
385
402
  }), i]
386
403
  });
387
404
  //#endregion
388
- export { b as AuthMethodsEditor };
405
+ export { x as AuthMethodsEditor };
389
406
 
390
407
  //# sourceMappingURL=AuthMethodsEditor.js.map