@burdenoff/microfe-integrations 2026.731.1 → 2026.807.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.
- package/dist/generated/wspace-operations.d.ts +351 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +131 -71
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +70519 -34096
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/integrations/IntegrationsAdminRoutes.js +1 -1
- package/dist/integrations/IntegrationsAdminRoutes.js.map +1 -1
- package/dist/integrations/IntegrationsUserRoutes.js +1 -1
- package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
- package/dist/integrations/components/AddConnectionDialog.d.ts.map +1 -1
- package/dist/integrations/components/AddConnectionDialog.js +238 -484
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/AuthMethodSelector.d.ts +13 -0
- package/dist/integrations/components/AuthMethodSelector.d.ts.map +1 -0
- package/dist/integrations/components/AuthMethodSelector.js +48 -0
- package/dist/integrations/components/AuthMethodSelector.js.map +1 -0
- package/dist/integrations/components/AuthMethodsEditor.d.ts +10 -0
- package/dist/integrations/components/AuthMethodsEditor.d.ts.map +1 -0
- package/dist/integrations/components/AuthMethodsEditor.js +388 -0
- package/dist/integrations/components/AuthMethodsEditor.js.map +1 -0
- package/dist/integrations/components/ProviderIcon.d.ts +5 -4
- package/dist/integrations/components/ProviderIcon.d.ts.map +1 -1
- package/dist/integrations/components/ProviderIcon.js +18 -14
- package/dist/integrations/components/ProviderIcon.js.map +1 -1
- package/dist/integrations/components/SchemaForm.d.ts +43 -0
- package/dist/integrations/components/SchemaForm.d.ts.map +1 -0
- package/dist/integrations/components/SchemaForm.js +170 -0
- package/dist/integrations/components/SchemaForm.js.map +1 -0
- package/dist/integrations/hooks/useConnections.d.ts +12 -0
- package/dist/integrations/hooks/useConnections.d.ts.map +1 -1
- package/dist/integrations/hooks/useConnections.js +63 -52
- package/dist/integrations/hooks/useConnections.js.map +1 -1
- package/dist/integrations/hooks/useProviders.d.ts +27 -0
- package/dist/integrations/hooks/useProviders.d.ts.map +1 -1
- package/dist/integrations/hooks/useProviders.js +49 -33
- package/dist/integrations/hooks/useProviders.js.map +1 -1
- package/dist/integrations/pages/AddConnectionWizard.js +1 -1
- package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +1 -1
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.js +7 -7
- package/dist/integrations/pages/IntegrationsUserLandingPage.js +1 -1
- package/dist/integrations/pages/IntegrationsUserLandingPage.js.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.js +10 -10
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +1 -1
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/dist/integrations/pages/ProviderEditorPage.d.ts.map +1 -1
- package/dist/integrations/pages/ProviderEditorPage.js +326 -315
- package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
- package/dist/integrations/providers/IntegrationsProvider.js +1 -1
- package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
- package/dist/integrations/types/index.d.ts +24 -0
- package/dist/integrations/types/index.d.ts.map +1 -1
- package/dist/integrations/utils/constants.d.ts +12 -13
- package/dist/integrations/utils/constants.d.ts.map +1 -1
- package/dist/integrations/utils/constants.js +1 -18
- package/dist/integrations/utils/constants.js.map +1 -1
- package/dist/integrations/utils/integrationsHelpers.d.ts +7 -0
- package/dist/integrations/utils/integrationsHelpers.d.ts.map +1 -1
- package/dist/integrations/utils/integrationsHelpers.js +4 -1
- package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
- package/dist/integrations/utils/mappers.d.ts +0 -3
- package/dist/integrations/utils/mappers.d.ts.map +1 -1
- package/dist/integrations/utils/mappers.js +24 -4
- package/dist/integrations/utils/mappers.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,388 @@
|
|
|
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";
|
|
7
|
+
//#region src/integrations/components/AuthMethodsEditor.tsx
|
|
8
|
+
var g = [
|
|
9
|
+
"OAUTH2",
|
|
10
|
+
"OAUTH1",
|
|
11
|
+
"API_KEY",
|
|
12
|
+
"BASIC_AUTH",
|
|
13
|
+
"BEARER_TOKEN",
|
|
14
|
+
"SERVICE_ACCOUNT",
|
|
15
|
+
"WORKSPACE_APP_TOKEN",
|
|
16
|
+
"CUSTOM"
|
|
17
|
+
], _ = [
|
|
18
|
+
"FIELDS",
|
|
19
|
+
"OAUTH2",
|
|
20
|
+
"MINTED"
|
|
21
|
+
];
|
|
22
|
+
function v(e) {
|
|
23
|
+
return {
|
|
24
|
+
key: e.key,
|
|
25
|
+
displayName: e.displayName,
|
|
26
|
+
description: e.description ?? "",
|
|
27
|
+
authType: e.authType.toUpperCase(),
|
|
28
|
+
flow: e.flow.toUpperCase(),
|
|
29
|
+
configSchema: e.configSchema ? JSON.stringify(e.configSchema, null, 2) : "",
|
|
30
|
+
isDefault: e.isDefault,
|
|
31
|
+
isEnabled: e.isEnabled,
|
|
32
|
+
displayOrder: String(e.displayOrder)
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
var y = {
|
|
36
|
+
key: "",
|
|
37
|
+
displayName: "",
|
|
38
|
+
description: "",
|
|
39
|
+
authType: "API_KEY",
|
|
40
|
+
flow: "FIELDS",
|
|
41
|
+
configSchema: "",
|
|
42
|
+
isDefault: !1,
|
|
43
|
+
isEnabled: !0,
|
|
44
|
+
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");
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
let e = null;
|
|
53
|
+
if (A.configSchema.trim()) {
|
|
54
|
+
let t = C(A.configSchema);
|
|
55
|
+
if (!t) {
|
|
56
|
+
N("Field schema is not valid JSON");
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
e = t;
|
|
60
|
+
}
|
|
61
|
+
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,
|
|
68
|
+
configSchema: e,
|
|
69
|
+
isDefault: A.isDefault,
|
|
70
|
+
isEnabled: A.isEnabled,
|
|
71
|
+
displayOrder: Number(A.displayOrder) || 0
|
|
72
|
+
}), j(null);
|
|
73
|
+
} catch (e) {
|
|
74
|
+
N(e instanceof Error ? e.message : "Failed to save method");
|
|
75
|
+
}
|
|
76
|
+
}, B = async (e) => {
|
|
77
|
+
N("");
|
|
78
|
+
try {
|
|
79
|
+
await O(b.id, e);
|
|
80
|
+
} catch (e) {
|
|
81
|
+
N(e instanceof Error ? e.message : "Failed to remove method");
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
return /* @__PURE__ */ m("div", {
|
|
85
|
+
className: "space-y-4",
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ m("div", {
|
|
88
|
+
className: "flex items-start justify-between gap-4",
|
|
89
|
+
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h3", {
|
|
90
|
+
className: "text-sm font-semibold text-text-primary",
|
|
91
|
+
children: "Authentication Methods"
|
|
92
|
+
}), /* @__PURE__ */ p("p", {
|
|
93
|
+
className: "text-xs text-text-secondary mt-1",
|
|
94
|
+
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."
|
|
95
|
+
})] }), T && !A && /* @__PURE__ */ m(h, {
|
|
96
|
+
variant: "outline",
|
|
97
|
+
size: "sm",
|
|
98
|
+
onClick: () => j({ ...y }),
|
|
99
|
+
children: [/* @__PURE__ */ p(l, { size: 14 }), " Add method"]
|
|
100
|
+
})]
|
|
101
|
+
}),
|
|
102
|
+
M && /* @__PURE__ */ m("div", {
|
|
103
|
+
className: "flex items-center gap-2 px-3 py-2 rounded-md bg-status-error-bg-subtle border border-border-default",
|
|
104
|
+
children: [/* @__PURE__ */ p(o, {
|
|
105
|
+
size: 16,
|
|
106
|
+
className: "text-status-error-text flex-shrink-0"
|
|
107
|
+
}), /* @__PURE__ */ p("span", {
|
|
108
|
+
className: "text-sm text-status-error-text",
|
|
109
|
+
children: M
|
|
110
|
+
})]
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ m("div", {
|
|
113
|
+
className: "space-y-2",
|
|
114
|
+
children: [I.length === 0 && /* @__PURE__ */ p("p", {
|
|
115
|
+
className: "text-sm text-text-secondary",
|
|
116
|
+
children: "No authentication methods defined yet."
|
|
117
|
+
}), I.map((e) => /* @__PURE__ */ m("div", {
|
|
118
|
+
className: "flex items-center gap-3 p-3 rounded-md border border-border-subtle",
|
|
119
|
+
children: [/* @__PURE__ */ m("div", {
|
|
120
|
+
className: "flex-1 min-w-0",
|
|
121
|
+
children: [/* @__PURE__ */ m("div", {
|
|
122
|
+
className: "flex items-center gap-2",
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ p("span", {
|
|
125
|
+
className: "text-sm font-medium text-text-primary truncate",
|
|
126
|
+
children: e.displayName
|
|
127
|
+
}),
|
|
128
|
+
e.isDefault && /* @__PURE__ */ m("span", {
|
|
129
|
+
title: "Default method",
|
|
130
|
+
className: "inline-flex items-center gap-1 text-xs text-text-secondary",
|
|
131
|
+
children: [/* @__PURE__ */ p(u, { size: 12 }), " default"]
|
|
132
|
+
}),
|
|
133
|
+
!e.isEnabled && /* @__PURE__ */ p("span", {
|
|
134
|
+
className: "text-xs text-text-secondary",
|
|
135
|
+
children: "disabled"
|
|
136
|
+
}),
|
|
137
|
+
!e.isConfigured && /* @__PURE__ */ p("span", {
|
|
138
|
+
className: "text-xs text-status-warning-text",
|
|
139
|
+
children: "not configured"
|
|
140
|
+
})
|
|
141
|
+
]
|
|
142
|
+
}), /* @__PURE__ */ m("div", {
|
|
143
|
+
className: "text-xs text-text-secondary mt-0.5",
|
|
144
|
+
children: [
|
|
145
|
+
e.key,
|
|
146
|
+
" · ",
|
|
147
|
+
e.authType,
|
|
148
|
+
" · ",
|
|
149
|
+
e.flow
|
|
150
|
+
]
|
|
151
|
+
})]
|
|
152
|
+
}), T && /* @__PURE__ */ m("div", {
|
|
153
|
+
className: "flex items-center gap-1",
|
|
154
|
+
children: [/* @__PURE__ */ p(h, {
|
|
155
|
+
variant: "ghost",
|
|
156
|
+
size: "sm",
|
|
157
|
+
onClick: () => j(v(e)),
|
|
158
|
+
children: "Edit"
|
|
159
|
+
}), /* @__PURE__ */ p(h, {
|
|
160
|
+
variant: "ghost",
|
|
161
|
+
size: "sm",
|
|
162
|
+
"aria-label": `Remove ${e.displayName}`,
|
|
163
|
+
onClick: () => B(e.key),
|
|
164
|
+
disabled: L,
|
|
165
|
+
children: /* @__PURE__ */ p(d, { size: 14 })
|
|
166
|
+
})]
|
|
167
|
+
})]
|
|
168
|
+
}, e.key))]
|
|
169
|
+
}),
|
|
170
|
+
A && /* @__PURE__ */ m("div", {
|
|
171
|
+
className: "rounded-md border border-border-subtle p-4 space-y-3",
|
|
172
|
+
children: [
|
|
173
|
+
/* @__PURE__ */ m("div", {
|
|
174
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-3",
|
|
175
|
+
children: [
|
|
176
|
+
/* @__PURE__ */ p(w, {
|
|
177
|
+
label: "Key",
|
|
178
|
+
id: F("key"),
|
|
179
|
+
required: !0,
|
|
180
|
+
children: /* @__PURE__ */ p("input", {
|
|
181
|
+
id: F("key"),
|
|
182
|
+
"aria-label": "Method key",
|
|
183
|
+
value: A.key,
|
|
184
|
+
onChange: (e) => j({
|
|
185
|
+
...A,
|
|
186
|
+
key: e.target.value
|
|
187
|
+
}),
|
|
188
|
+
placeholder: "service-account",
|
|
189
|
+
className: x
|
|
190
|
+
})
|
|
191
|
+
}),
|
|
192
|
+
/* @__PURE__ */ p(w, {
|
|
193
|
+
label: "Display name",
|
|
194
|
+
id: F("displayName"),
|
|
195
|
+
required: !0,
|
|
196
|
+
children: /* @__PURE__ */ p("input", {
|
|
197
|
+
id: F("displayName"),
|
|
198
|
+
"aria-label": "Display name",
|
|
199
|
+
value: A.displayName,
|
|
200
|
+
onChange: (e) => j({
|
|
201
|
+
...A,
|
|
202
|
+
displayName: e.target.value
|
|
203
|
+
}),
|
|
204
|
+
placeholder: "Service Account",
|
|
205
|
+
className: x
|
|
206
|
+
})
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ p(w, {
|
|
209
|
+
label: "Auth type",
|
|
210
|
+
id: F("authType"),
|
|
211
|
+
children: /* @__PURE__ */ p("select", {
|
|
212
|
+
id: F("authType"),
|
|
213
|
+
"aria-label": "Auth type",
|
|
214
|
+
value: A.authType,
|
|
215
|
+
onChange: (e) => j({
|
|
216
|
+
...A,
|
|
217
|
+
authType: e.target.value
|
|
218
|
+
}),
|
|
219
|
+
className: x,
|
|
220
|
+
children: g.map((e) => /* @__PURE__ */ p("option", {
|
|
221
|
+
value: e,
|
|
222
|
+
children: e
|
|
223
|
+
}, e))
|
|
224
|
+
})
|
|
225
|
+
}),
|
|
226
|
+
/* @__PURE__ */ p(w, {
|
|
227
|
+
label: "Flow",
|
|
228
|
+
id: F("flow"),
|
|
229
|
+
children: /* @__PURE__ */ p("select", {
|
|
230
|
+
id: F("flow"),
|
|
231
|
+
"aria-label": "Flow",
|
|
232
|
+
value: A.flow,
|
|
233
|
+
onChange: (e) => j({
|
|
234
|
+
...A,
|
|
235
|
+
flow: e.target.value
|
|
236
|
+
}),
|
|
237
|
+
className: x,
|
|
238
|
+
children: _.map((e) => /* @__PURE__ */ p("option", {
|
|
239
|
+
value: e,
|
|
240
|
+
children: e
|
|
241
|
+
}, e))
|
|
242
|
+
})
|
|
243
|
+
})
|
|
244
|
+
]
|
|
245
|
+
}),
|
|
246
|
+
/* @__PURE__ */ p(w, {
|
|
247
|
+
label: "Description",
|
|
248
|
+
id: F("description"),
|
|
249
|
+
children: /* @__PURE__ */ p("input", {
|
|
250
|
+
id: F("description"),
|
|
251
|
+
"aria-label": "Description",
|
|
252
|
+
value: A.description,
|
|
253
|
+
onChange: (e) => j({
|
|
254
|
+
...A,
|
|
255
|
+
description: e.target.value
|
|
256
|
+
}),
|
|
257
|
+
className: x
|
|
258
|
+
})
|
|
259
|
+
}),
|
|
260
|
+
/* @__PURE__ */ m("div", {
|
|
261
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
262
|
+
children: [/* @__PURE__ */ p(w, {
|
|
263
|
+
label: "Field schema (JSON)",
|
|
264
|
+
id: F("configSchema"),
|
|
265
|
+
children: /* @__PURE__ */ p("textarea", {
|
|
266
|
+
id: F("configSchema"),
|
|
267
|
+
"aria-label": "Field schema",
|
|
268
|
+
value: A.configSchema,
|
|
269
|
+
onChange: (e) => j({
|
|
270
|
+
...A,
|
|
271
|
+
configSchema: e.target.value
|
|
272
|
+
}),
|
|
273
|
+
rows: 12,
|
|
274
|
+
spellCheck: !1,
|
|
275
|
+
placeholder: S,
|
|
276
|
+
className: `${x} font-mono text-xs`
|
|
277
|
+
})
|
|
278
|
+
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
|
|
279
|
+
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
280
|
+
children: "Live preview"
|
|
281
|
+
}), /* @__PURE__ */ p("div", {
|
|
282
|
+
className: "rounded-md border border-border-subtle p-3 bg-bg-surface min-h-[200px]",
|
|
283
|
+
children: R ? /* @__PURE__ */ p(n, {
|
|
284
|
+
schema: R,
|
|
285
|
+
values: {},
|
|
286
|
+
onChange: () => void 0,
|
|
287
|
+
disabled: !0,
|
|
288
|
+
idPrefix: F("preview")
|
|
289
|
+
}) : /* @__PURE__ */ p("p", {
|
|
290
|
+
className: "text-xs text-text-secondary",
|
|
291
|
+
children: A.configSchema.trim() ? "Not a valid object schema yet." : "Describe fields on the left to preview the form users will see."
|
|
292
|
+
})
|
|
293
|
+
})] })]
|
|
294
|
+
}),
|
|
295
|
+
/* @__PURE__ */ m("div", {
|
|
296
|
+
className: "flex flex-wrap items-center gap-4",
|
|
297
|
+
children: [
|
|
298
|
+
/* @__PURE__ */ m("label", {
|
|
299
|
+
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
300
|
+
children: [/* @__PURE__ */ p("input", {
|
|
301
|
+
type: "checkbox",
|
|
302
|
+
"aria-label": "Default method",
|
|
303
|
+
checked: A.isDefault,
|
|
304
|
+
onChange: (e) => j({
|
|
305
|
+
...A,
|
|
306
|
+
isDefault: e.target.checked
|
|
307
|
+
})
|
|
308
|
+
}), "Default method"]
|
|
309
|
+
}),
|
|
310
|
+
/* @__PURE__ */ m("label", {
|
|
311
|
+
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
312
|
+
children: [/* @__PURE__ */ p("input", {
|
|
313
|
+
type: "checkbox",
|
|
314
|
+
"aria-label": "Enabled",
|
|
315
|
+
checked: A.isEnabled,
|
|
316
|
+
onChange: (e) => j({
|
|
317
|
+
...A,
|
|
318
|
+
isEnabled: e.target.checked
|
|
319
|
+
})
|
|
320
|
+
}), "Enabled"]
|
|
321
|
+
}),
|
|
322
|
+
/* @__PURE__ */ p(w, {
|
|
323
|
+
label: "Order",
|
|
324
|
+
id: F("displayOrder"),
|
|
325
|
+
inline: !0,
|
|
326
|
+
children: /* @__PURE__ */ p("input", {
|
|
327
|
+
id: F("displayOrder"),
|
|
328
|
+
"aria-label": "Display order",
|
|
329
|
+
type: "number",
|
|
330
|
+
value: A.displayOrder,
|
|
331
|
+
onChange: (e) => j({
|
|
332
|
+
...A,
|
|
333
|
+
displayOrder: e.target.value
|
|
334
|
+
}),
|
|
335
|
+
className: `${x} w-20`
|
|
336
|
+
})
|
|
337
|
+
})
|
|
338
|
+
]
|
|
339
|
+
}),
|
|
340
|
+
/* @__PURE__ */ m("div", {
|
|
341
|
+
className: "flex items-center gap-2",
|
|
342
|
+
children: [/* @__PURE__ */ m(h, {
|
|
343
|
+
onClick: z,
|
|
344
|
+
disabled: L,
|
|
345
|
+
children: [L ? /* @__PURE__ */ p(c, {
|
|
346
|
+
size: 14,
|
|
347
|
+
className: "animate-spin"
|
|
348
|
+
}) : /* @__PURE__ */ p(s, { size: 14 }), " Save method"]
|
|
349
|
+
}), /* @__PURE__ */ m(h, {
|
|
350
|
+
variant: "outline",
|
|
351
|
+
onClick: () => j(null),
|
|
352
|
+
disabled: L,
|
|
353
|
+
children: [/* @__PURE__ */ p(f, { size: 14 }), " Cancel"]
|
|
354
|
+
})]
|
|
355
|
+
})
|
|
356
|
+
]
|
|
357
|
+
})
|
|
358
|
+
]
|
|
359
|
+
});
|
|
360
|
+
}, 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}";
|
|
361
|
+
function C(e) {
|
|
362
|
+
if (!e.trim()) return null;
|
|
363
|
+
try {
|
|
364
|
+
let t = JSON.parse(e);
|
|
365
|
+
return typeof t == "object" && t && !Array.isArray(t) ? t : null;
|
|
366
|
+
} catch {
|
|
367
|
+
return null;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
var w = ({ label: e, id: t, required: n, inline: r, children: i }) => /* @__PURE__ */ m("div", {
|
|
371
|
+
className: r ? "flex items-center gap-2" : void 0,
|
|
372
|
+
children: [/* @__PURE__ */ m("label", {
|
|
373
|
+
htmlFor: t,
|
|
374
|
+
className: r ? "text-sm font-medium text-text-primary" : "block text-sm font-medium text-text-primary mb-1.5",
|
|
375
|
+
children: [
|
|
376
|
+
e,
|
|
377
|
+
" ",
|
|
378
|
+
n && /* @__PURE__ */ p("span", {
|
|
379
|
+
className: "text-status-error-text",
|
|
380
|
+
children: "*"
|
|
381
|
+
})
|
|
382
|
+
]
|
|
383
|
+
}), i]
|
|
384
|
+
});
|
|
385
|
+
//#endregion
|
|
386
|
+
export { b as AuthMethodsEditor };
|
|
387
|
+
|
|
388
|
+
//# sourceMappingURL=AuthMethodsEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthMethodsEditor.js","names":[],"sources":["../../../src/integrations/components/AuthMethodsEditor.tsx"],"sourcesContent":["/**\n * AuthMethodsEditor — admin surface for a provider's authentication methods.\n *\n * This is the screen that turns \"add a way to authenticate\" from a code change\n * into a data change. Each method carries its own type, flow and field schema;\n * the connection UI renders whatever is defined here, so no provider or auth\n * type ever needs bespoke React again.\n *\n * The schema editor shows a live preview using the *same* renderer end users\n * get, so an admin can see the form they are describing instead of writing JSON\n * Schema blind and finding out at connect time.\n */\nimport type { FC } from 'react';\nimport { useId, useState } from 'react';\nimport { AlertCircle, Check, Loader2, Plus, Star, Trash2, X } from 'lucide-react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { useDeleteAuthMethod, useUpsertAuthMethod } from '../hooks/useProviders';\nimport type { IntegrationAuthMethod, IntegrationProvider } from '../types';\nimport { SchemaForm, parseFormSchema } from './SchemaForm';\n\nconst AUTH_TYPES = [\n 'OAUTH2',\n 'OAUTH1',\n 'API_KEY',\n 'BASIC_AUTH',\n 'BEARER_TOKEN',\n 'SERVICE_ACCOUNT',\n 'WORKSPACE_APP_TOKEN',\n 'CUSTOM',\n] as const;\n\nconst FLOWS = ['FIELDS', 'OAUTH2', 'MINTED'] as const;\n\ninterface MethodDraft {\n key: string;\n displayName: string;\n description: string;\n authType: string;\n flow: string;\n configSchema: string;\n isDefault: boolean;\n isEnabled: boolean;\n displayOrder: string;\n}\n\nfunction toDraft(method: IntegrationAuthMethod): MethodDraft {\n return {\n key: method.key,\n displayName: method.displayName,\n description: method.description ?? '',\n authType: method.authType.toUpperCase(),\n flow: method.flow.toUpperCase(),\n configSchema: method.configSchema ? JSON.stringify(method.configSchema, null, 2) : '',\n isDefault: method.isDefault,\n isEnabled: method.isEnabled,\n displayOrder: String(method.displayOrder),\n };\n}\n\nconst EMPTY_DRAFT: MethodDraft = {\n key: '',\n displayName: '',\n description: '',\n authType: 'API_KEY',\n flow: 'FIELDS',\n configSchema: '',\n isDefault: false,\n isEnabled: true,\n displayOrder: '0',\n};\n\ninterface AuthMethodsEditorProps {\n provider: IntegrationProvider;\n canManage: boolean;\n}\n\nexport const AuthMethodsEditor: FC<AuthMethodsEditorProps> = ({ provider, canManage }) => {\n const { upsertAuthMethod, loading: saving } = useUpsertAuthMethod();\n const { deleteAuthMethod, loading: deleting } = useDeleteAuthMethod();\n const [draft, setDraft] = useState<MethodDraft | null>(null);\n const [errorMessage, setErrorMessage] = useState('');\n const idPrefix = useId();\n const fieldId = (name: string) => `${idPrefix}-${name}`;\n\n const methods = provider.authMethods ?? [];\n const busy = saving || deleting;\n\n const previewSchema = draft ? parseFormSchema(safeParse(draft.configSchema)) : null;\n\n const handleSave = async () => {\n if (!draft) return;\n setErrorMessage('');\n\n if (!draft.key.trim() || !draft.displayName.trim()) {\n setErrorMessage('Key and display name are required');\n return;\n }\n\n let configSchema: Record<string, unknown> | null = null;\n if (draft.configSchema.trim()) {\n const parsed = safeParse(draft.configSchema);\n if (!parsed) {\n setErrorMessage('Field schema is not valid JSON');\n return;\n }\n configSchema = parsed;\n }\n\n try {\n await upsertAuthMethod(provider.id, {\n key: draft.key.trim(),\n displayName: draft.displayName.trim(),\n description: draft.description.trim() || undefined,\n authType: draft.authType,\n flow: draft.flow,\n configSchema,\n isDefault: draft.isDefault,\n isEnabled: draft.isEnabled,\n displayOrder: Number(draft.displayOrder) || 0,\n });\n setDraft(null);\n } catch (error) {\n setErrorMessage(error instanceof Error ? error.message : 'Failed to save method');\n }\n };\n\n const handleDelete = async (key: string) => {\n setErrorMessage('');\n try {\n await deleteAuthMethod(provider.id, key);\n } catch (error) {\n setErrorMessage(error instanceof Error ? error.message : 'Failed to remove method');\n }\n };\n\n return (\n <div className=\"space-y-4\">\n <div className=\"flex items-start justify-between gap-4\">\n <div>\n <h3 className=\"text-sm font-semibold text-text-primary\">Authentication Methods</h3>\n <p className=\"text-xs text-text-secondary mt-1\">\n Ways users can authenticate against this provider. When more than one is enabled, the\n connection form shows a dropdown. Fields come from each method's schema.\n </p>\n </div>\n {canManage && !draft && (\n <Button variant=\"outline\" size=\"sm\" onClick={() => setDraft({ ...EMPTY_DRAFT })}>\n <Plus size={14} /> Add method\n </Button>\n )}\n </div>\n\n {errorMessage && (\n <div className=\"flex items-center gap-2 px-3 py-2 rounded-md bg-status-error-bg-subtle border border-border-default\">\n <AlertCircle size={16} className=\"text-status-error-text flex-shrink-0\" />\n <span className=\"text-sm text-status-error-text\">{errorMessage}</span>\n </div>\n )}\n\n <div className=\"space-y-2\">\n {methods.length === 0 && (\n <p className=\"text-sm text-text-secondary\">No authentication methods defined yet.</p>\n )}\n {methods.map((method) => (\n <div\n key={method.key}\n className=\"flex items-center gap-3 p-3 rounded-md border border-border-subtle\"\n >\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm font-medium text-text-primary truncate\">\n {method.displayName}\n </span>\n {method.isDefault && (\n <span\n title=\"Default method\"\n className=\"inline-flex items-center gap-1 text-xs text-text-secondary\"\n >\n <Star size={12} /> default\n </span>\n )}\n {!method.isEnabled && <span className=\"text-xs text-text-secondary\">disabled</span>}\n {!method.isConfigured && (\n <span className=\"text-xs text-status-warning-text\">not configured</span>\n )}\n </div>\n <div className=\"text-xs text-text-secondary mt-0.5\">\n {method.key} · {method.authType} · {method.flow}\n </div>\n </div>\n {canManage && (\n <div className=\"flex items-center gap-1\">\n <Button variant=\"ghost\" size=\"sm\" onClick={() => setDraft(toDraft(method))}>\n Edit\n </Button>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n aria-label={`Remove ${method.displayName}`}\n onClick={() => handleDelete(method.key)}\n disabled={busy}\n >\n <Trash2 size={14} />\n </Button>\n </div>\n )}\n </div>\n ))}\n </div>\n\n {draft && (\n <div className=\"rounded-md border border-border-subtle p-4 space-y-3\">\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-3\">\n <Field label=\"Key\" id={fieldId('key')} required>\n <input\n id={fieldId('key')}\n aria-label=\"Method key\"\n value={draft.key}\n onChange={(event) => setDraft({ ...draft, key: event.target.value })}\n placeholder=\"service-account\"\n className={INPUT_CLASS}\n />\n </Field>\n <Field label=\"Display name\" id={fieldId('displayName')} required>\n <input\n id={fieldId('displayName')}\n aria-label=\"Display name\"\n value={draft.displayName}\n onChange={(event) => setDraft({ ...draft, displayName: event.target.value })}\n placeholder=\"Service Account\"\n className={INPUT_CLASS}\n />\n </Field>\n <Field label=\"Auth type\" id={fieldId('authType')}>\n <select\n id={fieldId('authType')}\n aria-label=\"Auth type\"\n value={draft.authType}\n onChange={(event) => setDraft({ ...draft, authType: event.target.value })}\n className={INPUT_CLASS}\n >\n {AUTH_TYPES.map((type) => (\n <option key={type} value={type}>\n {type}\n </option>\n ))}\n </select>\n </Field>\n <Field label=\"Flow\" id={fieldId('flow')}>\n <select\n id={fieldId('flow')}\n aria-label=\"Flow\"\n value={draft.flow}\n onChange={(event) => setDraft({ ...draft, flow: event.target.value })}\n className={INPUT_CLASS}\n >\n {FLOWS.map((flow) => (\n <option key={flow} value={flow}>\n {flow}\n </option>\n ))}\n </select>\n </Field>\n </div>\n\n <Field label=\"Description\" id={fieldId('description')}>\n <input\n id={fieldId('description')}\n aria-label=\"Description\"\n value={draft.description}\n onChange={(event) => setDraft({ ...draft, description: event.target.value })}\n className={INPUT_CLASS}\n />\n </Field>\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <Field label=\"Field schema (JSON)\" id={fieldId('configSchema')}>\n <textarea\n id={fieldId('configSchema')}\n aria-label=\"Field schema\"\n value={draft.configSchema}\n onChange={(event) => setDraft({ ...draft, configSchema: event.target.value })}\n rows={12}\n spellCheck={false}\n placeholder={SCHEMA_PLACEHOLDER}\n className={`${INPUT_CLASS} font-mono text-xs`}\n />\n </Field>\n <div>\n <span className=\"block text-sm font-medium text-text-primary mb-1.5\">\n Live preview\n </span>\n <div className=\"rounded-md border border-border-subtle p-3 bg-bg-surface min-h-[200px]\">\n {previewSchema ? (\n <SchemaForm\n schema={previewSchema}\n values={{}}\n onChange={() => undefined}\n disabled\n idPrefix={fieldId('preview')}\n />\n ) : (\n <p className=\"text-xs text-text-secondary\">\n {draft.configSchema.trim()\n ? 'Not a valid object schema yet.'\n : 'Describe fields on the left to preview the form users will see.'}\n </p>\n )}\n </div>\n </div>\n </div>\n\n <div className=\"flex flex-wrap items-center gap-4\">\n <label className=\"flex items-center gap-2 text-sm text-text-primary\">\n <input\n type=\"checkbox\"\n aria-label=\"Default method\"\n checked={draft.isDefault}\n onChange={(event) => setDraft({ ...draft, isDefault: event.target.checked })}\n />\n Default method\n </label>\n <label className=\"flex items-center gap-2 text-sm text-text-primary\">\n <input\n type=\"checkbox\"\n aria-label=\"Enabled\"\n checked={draft.isEnabled}\n onChange={(event) => setDraft({ ...draft, isEnabled: event.target.checked })}\n />\n Enabled\n </label>\n <Field label=\"Order\" id={fieldId('displayOrder')} inline>\n <input\n id={fieldId('displayOrder')}\n aria-label=\"Display order\"\n type=\"number\"\n value={draft.displayOrder}\n onChange={(event) => setDraft({ ...draft, displayOrder: event.target.value })}\n className={`${INPUT_CLASS} w-20`}\n />\n </Field>\n </div>\n\n <div className=\"flex items-center gap-2\">\n <Button onClick={handleSave} disabled={busy}>\n {busy ? <Loader2 size={14} className=\"animate-spin\" /> : <Check size={14} />} Save\n method\n </Button>\n <Button variant=\"outline\" onClick={() => setDraft(null)} disabled={busy}>\n <X size={14} /> Cancel\n </Button>\n </div>\n </div>\n )}\n </div>\n );\n};\n\nconst INPUT_CLASS =\n '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';\n\nconst SCHEMA_PLACEHOLDER = `{\n \"type\": \"object\",\n \"properties\": {\n \"apiKey\": { \"type\": \"string\", \"title\": \"API Key\", \"secret\": true }\n },\n \"required\": [\"apiKey\"]\n}`;\n\nfunction safeParse(raw: string): Record<string, unknown> | null {\n if (!raw.trim()) return null;\n try {\n const parsed: unknown = JSON.parse(raw);\n return typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed)\n ? (parsed as Record<string, unknown>)\n : null;\n } catch {\n return null;\n }\n}\n\nconst Field: FC<{\n label: string;\n id: string;\n required?: boolean;\n inline?: boolean;\n children: React.ReactNode;\n}> = ({ label, id, required, inline, children }) => (\n <div className={inline ? 'flex items-center gap-2' : undefined}>\n <label\n htmlFor={id}\n className={\n inline\n ? 'text-sm font-medium text-text-primary'\n : 'block text-sm font-medium text-text-primary mb-1.5'\n }\n >\n {label} {required && <span className=\"text-status-error-text\">*</span>}\n </label>\n {children}\n </div>\n);\n"],"mappings":";;;;;;;AAoBA,IAAM,IAAa;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EAEK,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IAAO,kBAAC,GAAD;QAAS,MAAM;QAAI,WAAU;QAAiB,CAAA,GAAG,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA,EAAC,eAEtE;UACT,kBAAC,GAAD;OAAQ,SAAQ;OAAU,eAAe,EAAS,KAAK;OAAE,UAAU;iBAAnE,CACE,kBAAC,GAAD,EAAG,MAAM,IAAM,CAAA,EAAA,UACR;SACL;;KACF;;GAEJ;;GAIJ,IACJ,gLAEI,IAAqB;AAQ3B,SAAS,EAAU,GAA6C;AAC9D,KAAI,CAAC,EAAI,MAAM,CAAE,QAAO;AACxB,KAAI;EACF,IAAM,IAAkB,KAAK,MAAM,EAAI;AACvC,SAAO,OAAO,KAAW,YAAY,KAAmB,CAAC,MAAM,QAAQ,EAAO,GACzE,IACD;SACE;AACN,SAAO;;;AAIX,IAAM,KAMA,EAAE,UAAO,OAAI,aAAU,WAAQ,kBACnC,kBAAC,OAAD;CAAK,WAAW,IAAS,4BAA4B,KAAA;WAArD,CACE,kBAAC,SAAD;EACE,SAAS;EACT,WACE,IACI,0CACA;YALR;GAQG;GAAM;GAAE,KAAY,kBAAC,QAAD;IAAM,WAAU;cAAyB;IAAQ,CAAA;GAChE;KACP,EACG"}
|
|
@@ -7,12 +7,13 @@ interface ProviderIconProps {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Renders provider icon
|
|
10
|
+
* Renders a provider icon.
|
|
11
11
|
*
|
|
12
12
|
* Priority:
|
|
13
|
-
* 1.
|
|
14
|
-
* 2.
|
|
15
|
-
* 3.
|
|
13
|
+
* 1. `https://…`, `/…` or `data:…` → render <img>
|
|
14
|
+
* 2. `iconify:<name>` → render that Iconify icon directly (no lookup table)
|
|
15
|
+
* 3. Legacy bare key matched against PROVIDER_ICONS
|
|
16
|
+
* 4. Fallback → category icon
|
|
16
17
|
*/
|
|
17
18
|
export declare const ProviderIcon: FC<ProviderIconProps>;
|
|
18
19
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderIcon.d.ts","sourceRoot":"","sources":["../../../src/integrations/components/ProviderIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,mBAAmB,EAAoB,MAAM,UAAU,CAAC;AAGtE,UAAU,iBAAiB;IACzB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"ProviderIcon.d.ts","sourceRoot":"","sources":["../../../src/integrations/components/ProviderIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,mBAAmB,EAAoB,MAAM,UAAU,CAAC;AAGtE,UAAU,iBAAiB;IACzB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA6FD;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAiD9C,CAAC"}
|
|
@@ -51,12 +51,16 @@ function s(e) {
|
|
|
51
51
|
return o[e] ?? o.other;
|
|
52
52
|
}
|
|
53
53
|
function c(e) {
|
|
54
|
-
|
|
54
|
+
let t = e.icon ?? "";
|
|
55
|
+
return t.startsWith("iconify:") ? t.slice(8) : a[t || e.key] ?? a[e.key] ?? s(e.category);
|
|
55
56
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
function l(e) {
|
|
58
|
+
return e ? e.startsWith("http") || e.startsWith("/") || e.startsWith("data:") : !1;
|
|
59
|
+
}
|
|
60
|
+
var u = ({ provider: a, size: o = 40, className: s }) => {
|
|
61
|
+
let u = Math.round(o * .55), d = n(r(a));
|
|
62
|
+
if (l(a.icon)) return /* @__PURE__ */ i("div", {
|
|
63
|
+
className: e("flex items-center justify-center rounded-xl flex-shrink-0 overflow-hidden", d.surface, s),
|
|
60
64
|
style: {
|
|
61
65
|
width: o,
|
|
62
66
|
height: o
|
|
@@ -66,30 +70,30 @@ var l = ({ provider: a, size: o = 40, className: s }) => {
|
|
|
66
70
|
alt: a.name,
|
|
67
71
|
className: "object-contain",
|
|
68
72
|
style: {
|
|
69
|
-
width:
|
|
70
|
-
height:
|
|
73
|
+
width: u,
|
|
74
|
+
height: u
|
|
71
75
|
},
|
|
72
76
|
onError: (e) => {
|
|
73
77
|
e.target.style.display = "none";
|
|
74
78
|
}
|
|
75
79
|
})
|
|
76
80
|
});
|
|
77
|
-
let
|
|
81
|
+
let f = c(a);
|
|
78
82
|
return /* @__PURE__ */ i("div", {
|
|
79
|
-
className: e("flex items-center justify-center rounded-xl flex-shrink-0",
|
|
83
|
+
className: e("flex items-center justify-center rounded-xl flex-shrink-0", d.surface, s),
|
|
80
84
|
style: {
|
|
81
85
|
width: o,
|
|
82
86
|
height: o
|
|
83
87
|
},
|
|
84
88
|
children: /* @__PURE__ */ i(t, {
|
|
85
|
-
icon:
|
|
86
|
-
width:
|
|
87
|
-
height:
|
|
88
|
-
className:
|
|
89
|
+
icon: f,
|
|
90
|
+
width: u,
|
|
91
|
+
height: u,
|
|
92
|
+
className: d.icon
|
|
89
93
|
})
|
|
90
94
|
});
|
|
91
95
|
};
|
|
92
96
|
//#endregion
|
|
93
|
-
export {
|
|
97
|
+
export { u as ProviderIcon };
|
|
94
98
|
|
|
95
99
|
//# sourceMappingURL=ProviderIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderIcon.js","names":[],"sources":["../../../src/integrations/components/ProviderIcon.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Icon } from '@iconify/react';\nimport { cn } from '../utils/cn';\nimport type { IntegrationProvider, ProviderCategory } from '../types';\nimport { getAccentClasses, getProviderAccent } from '../utils/appearance';\n\ninterface ProviderIconProps {\n provider: IntegrationProvider;\n size?: number;\n className?: string;\n}\n\n// ============================================================================\n// Provider icon mapping — same Iconify icon names as fluidgrids-fe-sdk\n// ============================================================================\n\nconst PROVIDER_ICONS: Record<string, string> = {\n // Google services\n 'google-gmail': 'logos:google-gmail',\n 'google-drive': 'logos:google-drive',\n 'google-calendar': 'logos:google-calendar',\n 'google-sheets': 'simple-icons:googlesheets',\n 'google-docs': 'simple-icons:googledocs',\n 'google-chat': 'simple-icons:googlechat',\n 'google-forms': 'simple-icons:googleforms',\n 'google-workspace-admin-domain-wide-delegation': 'logos:google-workspace',\n // Microsoft services\n 'microsoft-outlook': 'vscode-icons:file-type-outlook',\n 'microsoft-onedrive': 'simple-icons:onedrive',\n 'microsoft-teams': 'logos:microsoft-teams',\n 'microsoft-excel': 'vscode-icons:file-type-excel',\n // Other OAuth2\n github: 'mdi:github',\n slack: 'logos:slack-icon',\n salesforce: 'logos:salesforce',\n hubspot: 'simple-icons:hubspot',\n notion: 'simple-icons:notion',\n airtable: 'simple-icons:airtable',\n // API Key\n openai: 'simple-icons:openai',\n anthropic: 'simple-icons:anthropic',\n sendgrid: 'simple-icons:sendgrid',\n twilio: 'logos:twilio-icon',\n // Generic\n 'generic-oauth2': 'mdi:key-chain',\n 'generic-api-key': 'mdi:key-variant',\n 'generic-basic-auth': 'mdi:lock-outline',\n};\n\n/**\n * Fallback Iconify icons per category\n */\nconst CATEGORY_ICONS: Record<string, string> = {\n communication: 'mdi:message-text-outline',\n project_management: 'mdi:view-dashboard-outline',\n cloud_storage: 'mdi:cloud-outline',\n crm: 'mdi:account-group-outline',\n analytics: 'mdi:chart-bar',\n developer_tools: 'mdi:code-braces',\n finance: 'mdi:currency-usd',\n support: 'mdi:headset',\n social: 'mdi:share-variant-outline',\n ai: 'mdi:brain',\n email: 'mdi:email-outline',\n calendar: 'mdi:calendar-outline',\n productivity: 'mdi:file-document-outline',\n marketing: 'mdi:bullhorn-outline',\n hr: 'mdi:account-tie-outline',\n other: 'mdi:puzzle-outline',\n};\n\nfunction getCategoryIcon(category: ProviderCategory): string {\n return CATEGORY_ICONS[category] ?? CATEGORY_ICONS.other;\n}\n\nfunction getProviderIconName(provider: IntegrationProvider): string {\n const
|
|
1
|
+
{"version":3,"file":"ProviderIcon.js","names":[],"sources":["../../../src/integrations/components/ProviderIcon.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Icon } from '@iconify/react';\nimport { cn } from '../utils/cn';\nimport type { IntegrationProvider, ProviderCategory } from '../types';\nimport { getAccentClasses, getProviderAccent } from '../utils/appearance';\n\ninterface ProviderIconProps {\n provider: IntegrationProvider;\n size?: number;\n className?: string;\n}\n\n// ============================================================================\n// Provider icon mapping — same Iconify icon names as fluidgrids-fe-sdk\n// ============================================================================\n\nconst PROVIDER_ICONS: Record<string, string> = {\n // Google services\n 'google-gmail': 'logos:google-gmail',\n 'google-drive': 'logos:google-drive',\n 'google-calendar': 'logos:google-calendar',\n 'google-sheets': 'simple-icons:googlesheets',\n 'google-docs': 'simple-icons:googledocs',\n 'google-chat': 'simple-icons:googlechat',\n 'google-forms': 'simple-icons:googleforms',\n 'google-workspace-admin-domain-wide-delegation': 'logos:google-workspace',\n // Microsoft services\n 'microsoft-outlook': 'vscode-icons:file-type-outlook',\n 'microsoft-onedrive': 'simple-icons:onedrive',\n 'microsoft-teams': 'logos:microsoft-teams',\n 'microsoft-excel': 'vscode-icons:file-type-excel',\n // Other OAuth2\n github: 'mdi:github',\n slack: 'logos:slack-icon',\n salesforce: 'logos:salesforce',\n hubspot: 'simple-icons:hubspot',\n notion: 'simple-icons:notion',\n airtable: 'simple-icons:airtable',\n // API Key\n openai: 'simple-icons:openai',\n anthropic: 'simple-icons:anthropic',\n sendgrid: 'simple-icons:sendgrid',\n twilio: 'logos:twilio-icon',\n // Generic\n 'generic-oauth2': 'mdi:key-chain',\n 'generic-api-key': 'mdi:key-variant',\n 'generic-basic-auth': 'mdi:lock-outline',\n};\n\n/**\n * Fallback Iconify icons per category\n */\nconst CATEGORY_ICONS: Record<string, string> = {\n communication: 'mdi:message-text-outline',\n project_management: 'mdi:view-dashboard-outline',\n cloud_storage: 'mdi:cloud-outline',\n crm: 'mdi:account-group-outline',\n analytics: 'mdi:chart-bar',\n developer_tools: 'mdi:code-braces',\n finance: 'mdi:currency-usd',\n support: 'mdi:headset',\n social: 'mdi:share-variant-outline',\n ai: 'mdi:brain',\n email: 'mdi:email-outline',\n calendar: 'mdi:calendar-outline',\n productivity: 'mdi:file-document-outline',\n marketing: 'mdi:bullhorn-outline',\n hr: 'mdi:account-tie-outline',\n other: 'mdi:puzzle-outline',\n};\n\nfunction getCategoryIcon(category: ProviderCategory): string {\n return CATEGORY_ICONS[category] ?? CATEGORY_ICONS.other;\n}\n\n/**\n * Resolve the Iconify icon name for a provider.\n *\n * `provider.icon` is self-describing: an `iconify:` prefix names an Iconify icon\n * directly, so a provider added from the admin console gets a real logo without\n * anyone editing this file. PROVIDER_ICONS below is now only a compatibility\n * shim for the built-in rows still seeded with bare keys like `google-gmail`,\n * and can be deleted once those are migrated to `iconify:logos:google-gmail`.\n */\nfunction getProviderIconName(provider: IntegrationProvider): string {\n const icon = provider.icon ?? '';\n if (icon.startsWith('iconify:')) return icon.slice('iconify:'.length);\n\n const iconKey = icon || provider.key;\n return (\n PROVIDER_ICONS[iconKey] ?? PROVIDER_ICONS[provider.key] ?? getCategoryIcon(provider.category)\n );\n}\n\n/**\n * True when the icon value is something the browser can load directly.\n * Supports remote URLs, app-relative paths and inline data URIs (admin upload).\n */\nfunction isImageSource(icon: string | undefined): icon is string {\n if (!icon) return false;\n return icon.startsWith('http') || icon.startsWith('/') || icon.startsWith('data:');\n}\n\n/**\n * Renders a provider icon.\n *\n * Priority:\n * 1. `https://…`, `/…` or `data:…` → render <img>\n * 2. `iconify:<name>` → render that Iconify icon directly (no lookup table)\n * 3. Legacy bare key matched against PROVIDER_ICONS\n * 4. Fallback → category icon\n */\nexport const ProviderIcon: FC<ProviderIconProps> = ({ provider, size = 40, className }) => {\n const iconSize = Math.round(size * 0.55);\n const accent = getAccentClasses(getProviderAccent(provider));\n\n // 1. Directly loadable image source\n if (isImageSource(provider.icon)) {\n return (\n <div\n className={cn(\n 'flex items-center justify-center rounded-xl flex-shrink-0 overflow-hidden',\n accent.surface,\n className\n )}\n style={{\n width: size,\n height: size,\n }}\n >\n <img\n src={provider.icon}\n alt={provider.name}\n className=\"object-contain\"\n style={{ width: iconSize, height: iconSize }}\n onError={(e) => {\n (e.target as HTMLImageElement).style.display = 'none';\n }}\n />\n </div>\n );\n }\n\n // 2 & 3. Iconify icon (provider-specific or category fallback)\n const iconName = getProviderIconName(provider);\n\n return (\n <div\n className={cn(\n 'flex items-center justify-center rounded-xl flex-shrink-0',\n accent.surface,\n className\n )}\n style={{\n width: size,\n height: size,\n }}\n >\n <Icon icon={iconName} width={iconSize} height={iconSize} className={accent.icon} />\n </div>\n );\n};\n"],"mappings":";;;;;AAgBA,IAAM,IAAyC;CAE7C,gBAAgB;CAChB,gBAAgB;CAChB,mBAAmB;CACnB,iBAAiB;CACjB,eAAe;CACf,eAAe;CACf,gBAAgB;CAChB,iDAAiD;CAEjD,qBAAqB;CACrB,sBAAsB;CACtB,mBAAmB;CACnB,mBAAmB;CAEnB,QAAQ;CACR,OAAO;CACP,YAAY;CACZ,SAAS;CACT,QAAQ;CACR,UAAU;CAEV,QAAQ;CACR,WAAW;CACX,UAAU;CACV,QAAQ;CAER,kBAAkB;CAClB,mBAAmB;CACnB,sBAAsB;CACvB,EAKK,IAAyC;CAC7C,eAAe;CACf,oBAAoB;CACpB,eAAe;CACf,KAAK;CACL,WAAW;CACX,iBAAiB;CACjB,SAAS;CACT,SAAS;CACT,QAAQ;CACR,IAAI;CACJ,OAAO;CACP,UAAU;CACV,cAAc;CACd,WAAW;CACX,IAAI;CACJ,OAAO;CACR;AAED,SAAS,EAAgB,GAAoC;AAC3D,QAAO,EAAe,MAAa,EAAe;;AAYpD,SAAS,EAAoB,GAAuC;CAClE,IAAM,IAAO,EAAS,QAAQ;AAI9B,QAHI,EAAK,WAAW,WAAW,GAAS,EAAK,MAAM,EAAkB,GAInE,EAFc,KAAQ,EAAS,QAEJ,EAAe,EAAS,QAAQ,EAAgB,EAAS,SAAS;;AAQjG,SAAS,EAAc,GAA0C;AAE/D,QADK,IACE,EAAK,WAAW,OAAO,IAAI,EAAK,WAAW,IAAI,IAAI,EAAK,WAAW,QAAQ,GADhE;;AAapB,IAAa,KAAuC,EAAE,aAAU,UAAO,IAAI,mBAAgB;CACzF,IAAM,IAAW,KAAK,MAAM,IAAO,IAAK,EAClC,IAAS,EAAiB,EAAkB,EAAS,CAAC;AAG5D,KAAI,EAAc,EAAS,KAAK,CAC9B,QACE,kBAAC,OAAD;EACE,WAAW,EACT,6EACA,EAAO,SACP,EACD;EACD,OAAO;GACL,OAAO;GACP,QAAQ;GACT;YAED,kBAAC,OAAD;GACE,KAAK,EAAS;GACd,KAAK,EAAS;GACd,WAAU;GACV,OAAO;IAAE,OAAO;IAAU,QAAQ;IAAU;GAC5C,UAAU,MAAM;AACb,MAAE,OAA4B,MAAM,UAAU;;GAEjD,CAAA;EACE,CAAA;CAKV,IAAM,IAAW,EAAoB,EAAS;AAE9C,QACE,kBAAC,OAAD;EACE,WAAW,EACT,6DACA,EAAO,SACP,EACD;EACD,OAAO;GACL,OAAO;GACP,QAAQ;GACT;YAED,kBAAC,GAAD;GAAM,MAAM;GAAU,OAAO;GAAU,QAAQ;GAAU,WAAW,EAAO;GAAQ,CAAA;EAC/E,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SchemaProperty {
|
|
4
|
+
type?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
secret?: boolean;
|
|
9
|
+
format?: string;
|
|
10
|
+
default?: string | number | boolean;
|
|
11
|
+
enum?: Array<string | {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}>;
|
|
15
|
+
showIf?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export interface FormSchema {
|
|
18
|
+
type?: string;
|
|
19
|
+
properties: Record<string, SchemaProperty>;
|
|
20
|
+
required: string[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Narrow an arbitrary JSON value to a renderable schema. Returns null when the
|
|
24
|
+
* value isn't a usable object schema, so callers can fall back rather than
|
|
25
|
+
* rendering an empty form.
|
|
26
|
+
*/
|
|
27
|
+
export declare function parseFormSchema(raw: unknown): FormSchema | null;
|
|
28
|
+
/**
|
|
29
|
+
* Required fields that are visible and filled. Hidden fields are excluded on
|
|
30
|
+
* purpose — a `showIf` field the user never saw must not block submission.
|
|
31
|
+
*/
|
|
32
|
+
export declare function isSchemaComplete(schema: FormSchema, values: Record<string, unknown>): boolean;
|
|
33
|
+
interface SchemaFormProps {
|
|
34
|
+
schema: FormSchema;
|
|
35
|
+
values: Record<string, unknown>;
|
|
36
|
+
onChange: (values: Record<string, unknown>) => void;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/** Prefix for generated element ids so several forms can coexist on a page. */
|
|
39
|
+
idPrefix?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare const SchemaForm: FC<SchemaFormProps>;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=SchemaForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaForm.d.ts","sourceRoot":"","sources":["../../../src/integrations/components/SchemaForm.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE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