@burdenoff/microfe-integrations 2026.830.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.
- package/dist/integrations/components/AddConnectionDialog.d.ts.map +1 -1
- package/dist/integrations/components/AddConnectionDialog.js +151 -152
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/AuthMethodSelector.d.ts.map +1 -1
- package/dist/integrations/components/AuthMethodSelector.js +48 -40
- package/dist/integrations/components/AuthMethodSelector.js.map +1 -1
- package/dist/integrations/components/AuthMethodsEditor.d.ts.map +1 -1
- package/dist/integrations/components/AuthMethodsEditor.js +207 -190
- package/dist/integrations/components/AuthMethodsEditor.js.map +1 -1
- package/dist/integrations/components/ConnectionCard.d.ts.map +1 -1
- package/dist/integrations/components/ConnectionCard.js +102 -98
- package/dist/integrations/components/ConnectionCard.js.map +1 -1
- package/dist/integrations/components/ConnectionStatusBadge.d.ts.map +1 -1
- package/dist/integrations/components/ConnectionStatusBadge.js +9 -5
- package/dist/integrations/components/ConnectionStatusBadge.js.map +1 -1
- package/dist/integrations/components/CredentialStorageSelector.d.ts.map +1 -1
- package/dist/integrations/components/CredentialStorageSelector.js +124 -121
- package/dist/integrations/components/CredentialStorageSelector.js.map +1 -1
- package/dist/integrations/components/ProviderCard.d.ts.map +1 -1
- package/dist/integrations/components/ProviderCard.js +25 -65
- package/dist/integrations/components/ProviderCard.js.map +1 -1
- package/dist/integrations/components/SchemaForm.d.ts.map +1 -1
- package/dist/integrations/components/SchemaForm.js +116 -111
- package/dist/integrations/components/SchemaForm.js.map +1 -1
- package/dist/integrations/hooks/useFormatDate.d.ts +7 -0
- package/dist/integrations/hooks/useFormatDate.d.ts.map +1 -0
- package/dist/integrations/hooks/useFormatDate.js +17 -0
- package/dist/integrations/hooks/useFormatDate.js.map +1 -0
- package/dist/integrations/hooks/useFormatLastUsed.d.ts +9 -0
- package/dist/integrations/hooks/useFormatLastUsed.d.ts.map +1 -0
- package/dist/integrations/hooks/useFormatLastUsed.js +15 -0
- package/dist/integrations/hooks/useFormatLastUsed.js.map +1 -0
- package/dist/integrations/hooks/useLabel.d.ts +13 -0
- package/dist/integrations/hooks/useLabel.d.ts.map +1 -0
- package/dist/integrations/hooks/useLabel.js +20 -0
- package/dist/integrations/hooks/useLabel.js.map +1 -0
- package/dist/integrations/hooks/useTr.d.ts +17 -0
- package/dist/integrations/hooks/useTr.d.ts.map +1 -0
- package/dist/integrations/hooks/useTr.js +14 -0
- package/dist/integrations/hooks/useTr.js.map +1 -0
- package/dist/integrations/pages/AddConnectionWizard.d.ts.map +1 -1
- package/dist/integrations/pages/AddConnectionWizard.js +396 -387
- package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.d.ts.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +128 -128
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.d.ts.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.js +210 -181
- package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.d.ts.map +1 -1
- package/dist/integrations/pages/ConnectionsList.js +136 -115
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.d.ts.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.js +76 -77
- package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
- package/dist/integrations/pages/IntegrationsSettings.d.ts.map +1 -1
- package/dist/integrations/pages/IntegrationsSettings.js +59 -61
- package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
- package/dist/integrations/pages/IntegrationsUserLandingPage.d.ts.map +1 -1
- package/dist/integrations/pages/IntegrationsUserLandingPage.js +29 -28
- package/dist/integrations/pages/IntegrationsUserLandingPage.js.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.d.ts.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.js +99 -141
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.d.ts.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +208 -220
- 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 +262 -261
- package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
- package/dist/integrations/translations/en.d.ts +731 -0
- package/dist/integrations/translations/en.d.ts.map +1 -0
- package/dist/integrations/utils/integrationsHelpers.js +2 -16
- package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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
|
|
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
|
|
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
|
|
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
|
-
},
|
|
46
|
-
let { upsertAuthMethod:
|
|
47
|
-
if (!
|
|
48
|
-
if (
|
|
49
|
-
|
|
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 (
|
|
54
|
-
let t =
|
|
54
|
+
if (M.configSchema.trim()) {
|
|
55
|
+
let t = w(M.configSchema);
|
|
55
56
|
if (!t) {
|
|
56
|
-
|
|
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
|
|
63
|
-
key:
|
|
64
|
-
displayName:
|
|
65
|
-
description:
|
|
66
|
-
authType:
|
|
67
|
-
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:
|
|
70
|
-
isEnabled:
|
|
71
|
-
displayOrder: Number(
|
|
72
|
-
}),
|
|
70
|
+
isDefault: M.isDefault,
|
|
71
|
+
isEnabled: M.isEnabled,
|
|
72
|
+
displayOrder: Number(M.displayOrder) || 0
|
|
73
|
+
}), N(null);
|
|
73
74
|
} catch (e) {
|
|
74
|
-
|
|
75
|
+
F(e instanceof Error ? e.message : D("integrations.providerEditor.errors.saveMethodFailed", "Failed to save method"));
|
|
75
76
|
}
|
|
76
|
-
},
|
|
77
|
-
if (window.confirm(
|
|
78
|
-
|
|
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
|
|
81
|
+
await A(x.id, e);
|
|
81
82
|
} catch (e) {
|
|
82
|
-
|
|
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__ */
|
|
87
|
+
return /* @__PURE__ */ h("div", {
|
|
87
88
|
className: "space-y-4",
|
|
88
89
|
children: [
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ h("div", {
|
|
90
91
|
className: "flex items-start justify-between gap-4",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
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
|
-
})] }),
|
|
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: () =>
|
|
101
|
-
children: [
|
|
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
|
-
|
|
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__ */
|
|
111
|
+
children: [/* @__PURE__ */ m(s, {
|
|
107
112
|
size: 16,
|
|
108
113
|
className: "text-status-error-text flex-shrink-0"
|
|
109
|
-
}), /* @__PURE__ */
|
|
114
|
+
}), /* @__PURE__ */ m("span", {
|
|
110
115
|
className: "text-sm text-status-error-text",
|
|
111
|
-
children:
|
|
116
|
+
children: P
|
|
112
117
|
})]
|
|
113
118
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ h("div", {
|
|
115
120
|
className: "space-y-2",
|
|
116
|
-
children: [
|
|
121
|
+
children: [R.length === 0 && /* @__PURE__ */ m("p", {
|
|
117
122
|
className: "text-sm text-text-secondary",
|
|
118
|
-
children: "No authentication methods defined yet."
|
|
119
|
-
}),
|
|
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__ */
|
|
126
|
+
children: [/* @__PURE__ */ h("div", {
|
|
122
127
|
className: "flex-1 min-w-0",
|
|
123
|
-
children: [/* @__PURE__ */
|
|
128
|
+
children: [/* @__PURE__ */ h("div", {
|
|
124
129
|
className: "flex items-center gap-2",
|
|
125
130
|
children: [
|
|
126
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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: [
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ m(d, { size: 12 }),
|
|
140
|
+
" ",
|
|
141
|
+
D("integrations.providerEditor.authMethods.default", "default")
|
|
142
|
+
]
|
|
134
143
|
}),
|
|
135
|
-
!e.isEnabled && /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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
|
-
}),
|
|
163
|
+
}), E && /* @__PURE__ */ h("div", {
|
|
155
164
|
className: "flex items-center gap-1",
|
|
156
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ m(g, {
|
|
157
166
|
variant: "ghost",
|
|
158
167
|
size: "sm",
|
|
159
|
-
onClick: () =>
|
|
160
|
-
children: "Edit"
|
|
161
|
-
}), /* @__PURE__ */
|
|
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":
|
|
165
|
-
onClick: () =>
|
|
166
|
-
disabled:
|
|
167
|
-
children: /* @__PURE__ */
|
|
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
|
-
|
|
181
|
+
M && /* @__PURE__ */ h("div", {
|
|
173
182
|
className: "rounded-md border border-border-subtle p-4 space-y-3",
|
|
174
183
|
children: [
|
|
175
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ h("div", {
|
|
176
185
|
className: "grid grid-cols-1 md:grid-cols-2 gap-3",
|
|
177
186
|
children: [
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
label: "Key",
|
|
180
|
-
id:
|
|
187
|
+
/* @__PURE__ */ m(T, {
|
|
188
|
+
label: D("integrations.providerEditor.authMethods.key", "Key"),
|
|
189
|
+
id: L("key"),
|
|
181
190
|
required: !0,
|
|
182
|
-
children: /* @__PURE__ */
|
|
183
|
-
id:
|
|
184
|
-
"aria-label": "
|
|
185
|
-
value:
|
|
186
|
-
onChange: (e) =>
|
|
187
|
-
...
|
|
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:
|
|
199
|
+
placeholder: D("integrations.providerEditor.authMethods.keyPlaceholder", "service-account"),
|
|
200
|
+
className: S
|
|
192
201
|
})
|
|
193
202
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
label: "Display name",
|
|
196
|
-
id:
|
|
203
|
+
/* @__PURE__ */ m(T, {
|
|
204
|
+
label: D("integrations.providerEditor.authMethods.displayName", "Display name"),
|
|
205
|
+
id: L("displayName"),
|
|
197
206
|
required: !0,
|
|
198
|
-
children: /* @__PURE__ */
|
|
199
|
-
id:
|
|
200
|
-
"aria-label": "Display name",
|
|
201
|
-
value:
|
|
202
|
-
onChange: (e) =>
|
|
203
|
-
...
|
|
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:
|
|
215
|
+
placeholder: D("integrations.providerEditor.authMethods.displayNamePlaceholder", "Service Account"),
|
|
216
|
+
className: S
|
|
208
217
|
})
|
|
209
218
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
label: "Auth type",
|
|
212
|
-
id:
|
|
213
|
-
children: /* @__PURE__ */
|
|
214
|
-
id:
|
|
215
|
-
"aria-label": "Auth type",
|
|
216
|
-
value:
|
|
217
|
-
onChange: (e) =>
|
|
218
|
-
...
|
|
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:
|
|
222
|
-
children:
|
|
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__ */
|
|
229
|
-
label: "Flow",
|
|
230
|
-
id:
|
|
231
|
-
children: /* @__PURE__ */
|
|
232
|
-
id:
|
|
233
|
-
"aria-label": "Flow",
|
|
234
|
-
value:
|
|
235
|
-
onChange: (e) =>
|
|
236
|
-
...
|
|
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:
|
|
240
|
-
children:
|
|
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__ */
|
|
249
|
-
label: "Description",
|
|
250
|
-
id:
|
|
251
|
-
children: /* @__PURE__ */
|
|
252
|
-
id:
|
|
253
|
-
"aria-label": "Description",
|
|
254
|
-
value:
|
|
255
|
-
onChange: (e) =>
|
|
256
|
-
...
|
|
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:
|
|
268
|
+
className: S
|
|
260
269
|
})
|
|
261
270
|
}),
|
|
262
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ h("div", {
|
|
263
272
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
264
|
-
children: [/* @__PURE__ */
|
|
265
|
-
label: "Field schema (JSON)",
|
|
266
|
-
id:
|
|
267
|
-
children: /* @__PURE__ */
|
|
268
|
-
id:
|
|
269
|
-
"aria-label": "Field schema",
|
|
270
|
-
value:
|
|
271
|
-
onChange: (e) =>
|
|
272
|
-
...
|
|
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:
|
|
278
|
-
className: `${
|
|
286
|
+
placeholder: C,
|
|
287
|
+
className: `${S} font-mono text-xs`
|
|
279
288
|
})
|
|
280
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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:
|
|
286
|
-
schema:
|
|
294
|
+
children: B ? /* @__PURE__ */ m(r, {
|
|
295
|
+
schema: B,
|
|
287
296
|
values: {},
|
|
288
297
|
onChange: () => void 0,
|
|
289
298
|
disabled: !0,
|
|
290
|
-
idPrefix:
|
|
291
|
-
}) : /* @__PURE__ */
|
|
299
|
+
idPrefix: L("preview")
|
|
300
|
+
}) : /* @__PURE__ */ m("p", {
|
|
292
301
|
className: "text-xs text-text-secondary",
|
|
293
|
-
children:
|
|
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__ */
|
|
306
|
+
/* @__PURE__ */ h("div", {
|
|
298
307
|
className: "flex flex-wrap items-center gap-4",
|
|
299
308
|
children: [
|
|
300
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ h("label", {
|
|
301
310
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
311
|
+
children: [/* @__PURE__ */ m("input", {
|
|
303
312
|
type: "checkbox",
|
|
304
|
-
"aria-label": "Default method",
|
|
305
|
-
checked:
|
|
306
|
-
onChange: (e) =>
|
|
307
|
-
...
|
|
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__ */
|
|
321
|
+
/* @__PURE__ */ h("label", {
|
|
313
322
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
314
|
-
children: [/* @__PURE__ */
|
|
323
|
+
children: [/* @__PURE__ */ m("input", {
|
|
315
324
|
type: "checkbox",
|
|
316
|
-
"aria-label": "Enabled",
|
|
317
|
-
checked:
|
|
318
|
-
onChange: (e) =>
|
|
319
|
-
...
|
|
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__ */
|
|
325
|
-
label: "Order",
|
|
326
|
-
id:
|
|
333
|
+
/* @__PURE__ */ m(T, {
|
|
334
|
+
label: D("integrations.providerEditor.authMethods.order", "Order"),
|
|
335
|
+
id: L("displayOrder"),
|
|
327
336
|
inline: !0,
|
|
328
|
-
children: /* @__PURE__ */
|
|
329
|
-
id:
|
|
330
|
-
"aria-label": "
|
|
337
|
+
children: /* @__PURE__ */ m("input", {
|
|
338
|
+
id: L("displayOrder"),
|
|
339
|
+
"aria-label": D("integrations.providerEditor.authMethods.order", "Order"),
|
|
331
340
|
type: "number",
|
|
332
|
-
value:
|
|
333
|
-
onChange: (e) =>
|
|
334
|
-
...
|
|
341
|
+
value: M.displayOrder,
|
|
342
|
+
onChange: (e) => N({
|
|
343
|
+
...M,
|
|
335
344
|
displayOrder: e.target.value
|
|
336
345
|
}),
|
|
337
|
-
className: `${
|
|
346
|
+
className: `${S} w-20`
|
|
338
347
|
})
|
|
339
348
|
})
|
|
340
349
|
]
|
|
341
350
|
}),
|
|
342
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ h("div", {
|
|
343
352
|
className: "flex items-center gap-2",
|
|
344
|
-
children: [/* @__PURE__ */
|
|
345
|
-
onClick:
|
|
346
|
-
disabled:
|
|
347
|
-
children: [
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
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: () =>
|
|
354
|
-
disabled:
|
|
355
|
-
children: [
|
|
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
|
-
},
|
|
363
|
-
function
|
|
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
|
|
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__ */
|
|
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__ */
|
|
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 {
|
|
405
|
+
export { x as AuthMethodsEditor };
|
|
389
406
|
|
|
390
407
|
//# sourceMappingURL=AuthMethodsEditor.js.map
|