@burdenoff/fe-libs 2026.1113.6 → 2026.1113.7
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/connections/ConnectionDialog.d.ts +13 -1
- package/dist/connections/ConnectionDialog.js +13 -11
- package/dist/connections/ConnectionDialogPanel.d.ts +5 -1
- package/dist/connections/ConnectionDialogPanel.js +230 -150
- package/dist/connections/ConnectionFormTab.d.ts +15 -0
- package/dist/connections/ConnectionFormTab.js +192 -189
- package/dist/connections/CredentialStorageSelector.d.ts +9 -0
- package/dist/connections/CredentialStorageSelector.js +145 -137
- package/dist/connections/OneScreenConnectionForm.d.ts +22 -0
- package/dist/connections/OneScreenConnectionForm.js +231 -0
- package/dist/connections/ProviderPickerPanel.d.ts +6 -0
- package/dist/connections/ProviderPickerPanel.js +98 -45
- package/dist/connections/api.d.ts +3 -0
- package/dist/connections/api.js +4 -2
- package/dist/connections/connectionFlow.d.ts +18 -0
- package/dist/connections/connectionFlow.js +3 -3
- package/dist/connections/index.d.ts +4 -3
- package/dist/connections/picker.d.ts +18 -0
- package/dist/connections/picker.js +35 -6
- package/dist/connections/scopes.d.ts +8 -0
- package/dist/connections/scopes.js +9 -1
- package/dist/connections/storage.d.ts +9 -1
- package/dist/connections/storage.js +13 -1
- package/dist/connections/types.d.ts +16 -0
- package/dist/connections/useConnectionSubmit.d.ts +38 -2
- package/dist/connections/useConnectionSubmit.js +115 -71
- package/dist/connections.js +11 -10
- package/dist/credentials/SchemaForm.d.ts +7 -1
- package/dist/credentials/SchemaForm.js +64 -64
- package/dist/credentials/index.d.ts +2 -2
- package/dist/credentials/schema.d.ts +11 -1
- package/dist/credentials/schema.js +13 -5
- package/dist/credentials/types.d.ts +9 -0
- package/dist/credentials.js +5 -5
- package/package.json +1 -1
|
@@ -1,138 +1,146 @@
|
|
|
1
|
-
import { compatibleSecrets as e } from "./storage.js";
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import { AlertCircle as
|
|
4
|
-
import { Fragment as
|
|
1
|
+
import { compatibleSecrets as e, withDefaultVault as t } from "./storage.js";
|
|
2
|
+
import { useCallback as n, useEffect as r, useEffectEvent as i, useId as a, useState as o } from "react";
|
|
3
|
+
import { AlertCircle as s, Database as c, FolderKey as l, KeyRound as u, Loader2 as d, Plus as f, X as p } from "lucide-react";
|
|
4
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
5
5
|
// src/connections/CredentialStorageSelector.tsx
|
|
6
|
-
var
|
|
7
|
-
let [
|
|
8
|
-
|
|
6
|
+
var _ = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-60", v = `${_} scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary`, y = ({ api: s, value: p, onChange: y, supportedStorageModes: x = ["managed", "existing"], authType: S, requireVault: C, canCreateVault: w, translate: T, disabled: E, autoSelectVault: D = !1, onVaultsLoaded: O }) => {
|
|
7
|
+
let [k, A] = o([]), [j, M] = o(!0), [N, P] = o([]), [F, I] = o(!1), [L, R] = o(!1), z = a(), B = x.includes("managed"), V = x.includes("existing"), H = C || !B, U = n(async () => {
|
|
8
|
+
M(!0);
|
|
9
9
|
try {
|
|
10
|
-
|
|
10
|
+
let e = await s.listVaults();
|
|
11
|
+
return A(e), e;
|
|
11
12
|
} catch {
|
|
12
|
-
|
|
13
|
+
return A([]), [];
|
|
13
14
|
} finally {
|
|
14
|
-
|
|
15
|
+
M(!1);
|
|
15
16
|
}
|
|
16
|
-
}, [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
}, [s]), W = i((e) => {
|
|
18
|
+
O?.(e.length), D && H && y((n) => t(n, e));
|
|
19
|
+
});
|
|
20
|
+
r(() => {
|
|
21
|
+
let e = !1;
|
|
22
|
+
return U().then((t) => {
|
|
23
|
+
e || W(t);
|
|
24
|
+
}), () => {
|
|
25
|
+
e = !0;
|
|
26
|
+
};
|
|
27
|
+
}, [U]), r(() => {
|
|
28
|
+
if (!V || p.mode !== "existing" || !p.vaultId) {
|
|
29
|
+
P([]), I(!1);
|
|
22
30
|
return;
|
|
23
31
|
}
|
|
24
32
|
let t = !1;
|
|
25
|
-
return
|
|
26
|
-
t ||
|
|
33
|
+
return I(!0), s.listVaultSecrets(p.vaultId).then((n) => {
|
|
34
|
+
t || P(e(n, S));
|
|
27
35
|
}).catch(() => {
|
|
28
|
-
t ||
|
|
36
|
+
t || P([]);
|
|
29
37
|
}).finally(() => {
|
|
30
|
-
t ||
|
|
38
|
+
t || I(!1);
|
|
31
39
|
}), () => {
|
|
32
40
|
t = !0;
|
|
33
41
|
};
|
|
34
42
|
}, [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
s,
|
|
44
|
+
S,
|
|
45
|
+
V,
|
|
46
|
+
p.mode,
|
|
47
|
+
p.vaultId
|
|
40
48
|
]);
|
|
41
|
-
let
|
|
42
|
-
await
|
|
49
|
+
let G = async (e) => {
|
|
50
|
+
await U(), y((t) => ({
|
|
43
51
|
...t,
|
|
44
52
|
vaultId: e,
|
|
45
53
|
secretId: ""
|
|
46
|
-
})),
|
|
47
|
-
},
|
|
48
|
-
if (!
|
|
54
|
+
})), R(!1);
|
|
55
|
+
}, K = `${z}-vault`, q = `${z}-managed-name`, J = `${z}-existing-secret`, Y = H ? T("integrations.addConnection.credentialStorage.selectVault", "Select a vault") : T("integrations.addConnection.credentialStorage.noVault", "No vault — stored encrypted by the integrations service");
|
|
56
|
+
if (!B && !V) return /* @__PURE__ */ h("div", {
|
|
49
57
|
role: "alert",
|
|
50
58
|
className: "rounded-md border border-border-default bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
|
|
51
|
-
children:
|
|
59
|
+
children: T("integrations.addConnection.credentialStorage.noCompatibleMode", "This authentication method has no compatible credential storage mode. Ask an administrator to correct its configuration.")
|
|
52
60
|
});
|
|
53
|
-
let
|
|
54
|
-
let i = t, a =
|
|
55
|
-
return /* @__PURE__ */
|
|
61
|
+
let X = (e, t, n, r) => {
|
|
62
|
+
let i = t, a = p.mode === e;
|
|
63
|
+
return /* @__PURE__ */ g("button", {
|
|
56
64
|
type: "button",
|
|
57
|
-
disabled:
|
|
65
|
+
disabled: E,
|
|
58
66
|
"aria-pressed": a,
|
|
59
67
|
onClick: () => {
|
|
60
|
-
|
|
68
|
+
x.includes(e) && y((t) => ({
|
|
61
69
|
...t,
|
|
62
70
|
mode: e,
|
|
63
71
|
...e === "managed" ? { secretId: "" } : {}
|
|
64
72
|
}));
|
|
65
73
|
},
|
|
66
74
|
className: `rounded-xl border px-4 py-3 text-start transition-colors disabled:opacity-60 ${a ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/40 hover:bg-accent/30"}`,
|
|
67
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ g("span", {
|
|
68
76
|
className: "flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
69
|
-
children: [/* @__PURE__ */
|
|
77
|
+
children: [/* @__PURE__ */ h(i, {
|
|
70
78
|
size: 16,
|
|
71
79
|
className: "text-primary"
|
|
72
80
|
}), n]
|
|
73
|
-
}), /* @__PURE__ */
|
|
81
|
+
}), /* @__PURE__ */ h("span", {
|
|
74
82
|
className: "mt-1 block text-xs text-text-secondary",
|
|
75
83
|
children: r
|
|
76
84
|
})]
|
|
77
85
|
});
|
|
78
86
|
};
|
|
79
|
-
return /* @__PURE__ */
|
|
87
|
+
return /* @__PURE__ */ g("div", {
|
|
80
88
|
className: "space-y-4 rounded-xl border border-border-subtle/50 bg-bg-surface p-4",
|
|
81
89
|
children: [
|
|
82
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("h3", {
|
|
83
91
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
84
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ h(c, {
|
|
85
93
|
size: 16,
|
|
86
94
|
className: "text-primary"
|
|
87
|
-
}),
|
|
88
|
-
}), /* @__PURE__ */
|
|
95
|
+
}), T("integrations.addConnection.credentialStorage.title", "Credential Storage")]
|
|
96
|
+
}), /* @__PURE__ */ h("p", {
|
|
89
97
|
className: "mt-1 text-xs text-text-secondary",
|
|
90
|
-
children:
|
|
98
|
+
children: B && V ? H ? T("integrations.addConnection.credentialStorage.description", "Connections use vault-managed secrets by default. You can also reuse an existing compatible secret.") : T("integrations.addConnection.credentialStorage.optionalDescription", "Optional. Without a vault, the integrations service stores the credential encrypted. Pick a vault to manage it yourself, or reuse an existing secret.") : B ? H ? T("integrations.addConnection.credentialStorage.managedOnlyDescription", "Choose a vault to create a dedicated secret for this connection.") : T("integrations.addConnection.credentialStorage.managedOnlyOptionalDescription", "Without a vault, the integrations service stores the credential encrypted. You can choose a vault for a dedicated secret.") : T("integrations.addConnection.credentialStorage.existingOnlyDescription", "Choose a vault and an existing compatible secret.")
|
|
91
99
|
})] }),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
className: `grid grid-cols-1 gap-3 ${
|
|
94
|
-
children: [
|
|
100
|
+
/* @__PURE__ */ g("div", {
|
|
101
|
+
className: `grid grid-cols-1 gap-3 ${B && V ? "sm:grid-cols-2" : ""}`,
|
|
102
|
+
children: [B && X("managed", l, T("integrations.addConnection.credentialStorage.dedicatedSecret", "Dedicated secret"), T("integrations.addConnection.credentialStorage.dedicatedSecretDescription", "Create and own a vault secret for this connection.")), V && X("existing", u, T("integrations.addConnection.credentialStorage.existingSecret", "Existing secret"), T("integrations.addConnection.credentialStorage.existingSecretDescription", "Reference an already stored secret from the vault."))]
|
|
95
103
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ g("div", {
|
|
97
105
|
className: "space-y-2",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ g("div", {
|
|
99
107
|
className: "flex items-center justify-between gap-2",
|
|
100
|
-
children: [/* @__PURE__ */
|
|
101
|
-
htmlFor:
|
|
108
|
+
children: [/* @__PURE__ */ h("label", {
|
|
109
|
+
htmlFor: K,
|
|
102
110
|
className: "block text-xs font-semibold uppercase tracking-wide text-text-primary",
|
|
103
|
-
children:
|
|
104
|
-
}), !
|
|
111
|
+
children: T("integrations.addConnection.credentialStorage.vaultLabel", "Vault")
|
|
112
|
+
}), !L && w && /* @__PURE__ */ g("button", {
|
|
105
113
|
type: "button",
|
|
106
|
-
disabled:
|
|
107
|
-
onClick: () =>
|
|
114
|
+
disabled: E,
|
|
115
|
+
onClick: () => R(!0),
|
|
108
116
|
className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",
|
|
109
117
|
children: [
|
|
110
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ h(f, { size: 13 }),
|
|
111
119
|
" ",
|
|
112
|
-
|
|
120
|
+
T("integrations.addConnection.credentialStorage.newVault", "New vault")
|
|
113
121
|
]
|
|
114
122
|
})]
|
|
115
|
-
}),
|
|
116
|
-
api:
|
|
117
|
-
translate:
|
|
118
|
-
onCreated: (e) => void
|
|
119
|
-
onCancel: () =>
|
|
120
|
-
}) : /* @__PURE__ */ m
|
|
123
|
+
}), L ? /* @__PURE__ */ h(b, {
|
|
124
|
+
api: s,
|
|
125
|
+
translate: T,
|
|
126
|
+
onCreated: (e) => void G(e),
|
|
127
|
+
onCancel: () => R(!1)
|
|
128
|
+
}) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g("div", {
|
|
121
129
|
className: "relative",
|
|
122
|
-
children: [/* @__PURE__ */
|
|
123
|
-
id:
|
|
124
|
-
value:
|
|
125
|
-
disabled:
|
|
126
|
-
onChange: (e) =>
|
|
130
|
+
children: [/* @__PURE__ */ g("select", {
|
|
131
|
+
id: K,
|
|
132
|
+
value: p.vaultId,
|
|
133
|
+
disabled: E,
|
|
134
|
+
onChange: (e) => y((t) => ({
|
|
127
135
|
...t,
|
|
128
136
|
vaultId: e.target.value,
|
|
129
137
|
secretId: ""
|
|
130
138
|
})),
|
|
131
|
-
className:
|
|
132
|
-
children: [/* @__PURE__ */
|
|
139
|
+
className: v,
|
|
140
|
+
children: [/* @__PURE__ */ h("option", {
|
|
133
141
|
value: "",
|
|
134
|
-
children:
|
|
135
|
-
}),
|
|
142
|
+
children: Y
|
|
143
|
+
}), k.map((e) => /* @__PURE__ */ g("option", {
|
|
136
144
|
value: e.id,
|
|
137
145
|
children: [
|
|
138
146
|
e.name,
|
|
@@ -141,75 +149,75 @@ var h = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5
|
|
|
141
149
|
")"
|
|
142
150
|
]
|
|
143
151
|
}, e.id))]
|
|
144
|
-
}),
|
|
152
|
+
}), j && /* @__PURE__ */ h(d, {
|
|
145
153
|
size: 16,
|
|
146
154
|
className: "absolute end-3 top-3 animate-spin text-text-secondary"
|
|
147
155
|
})]
|
|
148
|
-
}),
|
|
156
|
+
}), H && !j && k.length === 0 && (w ? /* @__PURE__ */ g("p", {
|
|
149
157
|
className: "text-xs text-text-secondary",
|
|
150
158
|
children: [
|
|
151
|
-
|
|
159
|
+
T("integrations.addConnection.credentialStorage.noVaults.canCreate", "No vaults yet. Create one to store this connection's credentials."),
|
|
152
160
|
" ",
|
|
153
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ h("button", {
|
|
154
162
|
type: "button",
|
|
155
|
-
onClick: () =>
|
|
163
|
+
onClick: () => R(!0),
|
|
156
164
|
className: "font-medium text-primary hover:underline",
|
|
157
|
-
children:
|
|
165
|
+
children: T("integrations.addConnection.credentialStorage.noVaults.createOne", "Create one")
|
|
158
166
|
})
|
|
159
167
|
]
|
|
160
|
-
}) : /* @__PURE__ */
|
|
168
|
+
}) : /* @__PURE__ */ h("p", {
|
|
161
169
|
className: "text-xs text-text-secondary",
|
|
162
|
-
children:
|
|
170
|
+
children: T("integrations.addConnection.credentialStorage.noVaults.readOnly", "No vaults yet. Ask an administrator to create one — a connection needs a vault to store its credentials.")
|
|
163
171
|
}))] })]
|
|
164
172
|
}),
|
|
165
|
-
|
|
173
|
+
p.mode === "managed" || !V ? B && p.vaultId ? /* @__PURE__ */ g("div", {
|
|
166
174
|
className: "space-y-2",
|
|
167
175
|
children: [
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
htmlFor:
|
|
176
|
+
/* @__PURE__ */ h("label", {
|
|
177
|
+
htmlFor: q,
|
|
170
178
|
className: "block text-xs font-semibold uppercase tracking-wide text-text-primary",
|
|
171
|
-
children:
|
|
179
|
+
children: T("integrations.addConnection.credentialStorage.managedSecretName", "Managed secret name")
|
|
172
180
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
id:
|
|
181
|
+
/* @__PURE__ */ h("input", {
|
|
182
|
+
id: q,
|
|
175
183
|
type: "text",
|
|
176
|
-
value:
|
|
177
|
-
disabled:
|
|
178
|
-
onChange: (e) =>
|
|
184
|
+
value: p.managedSecretName,
|
|
185
|
+
disabled: E,
|
|
186
|
+
onChange: (e) => y((t) => ({
|
|
179
187
|
...t,
|
|
180
188
|
managedSecretName: e.target.value
|
|
181
189
|
})),
|
|
182
|
-
placeholder:
|
|
183
|
-
className:
|
|
190
|
+
placeholder: T("integrations.addConnection.credentialStorage.managedSecretPlaceholder", "Optional custom vault secret name"),
|
|
191
|
+
className: _
|
|
184
192
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ h("p", {
|
|
186
194
|
className: "text-xs text-text-secondary",
|
|
187
|
-
children:
|
|
195
|
+
children: T("integrations.addConnection.credentialStorage.managedSecretHint", "Leave empty to auto-generate a secret name from the connection and provider.")
|
|
188
196
|
})
|
|
189
197
|
]
|
|
190
|
-
}) : null : /* @__PURE__ */
|
|
198
|
+
}) : null : /* @__PURE__ */ g("div", {
|
|
191
199
|
className: "space-y-2",
|
|
192
200
|
children: [
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
htmlFor:
|
|
201
|
+
/* @__PURE__ */ h("label", {
|
|
202
|
+
htmlFor: J,
|
|
195
203
|
className: "block text-xs font-semibold uppercase tracking-wide text-text-primary",
|
|
196
|
-
children:
|
|
204
|
+
children: T("integrations.addConnection.credentialStorage.existingSecretLabel", "Existing secret")
|
|
197
205
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ g("div", {
|
|
199
207
|
className: "relative",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
201
|
-
id:
|
|
202
|
-
value:
|
|
203
|
-
onChange: (e) =>
|
|
208
|
+
children: [/* @__PURE__ */ g("select", {
|
|
209
|
+
id: J,
|
|
210
|
+
value: p.secretId,
|
|
211
|
+
onChange: (e) => y((t) => ({
|
|
204
212
|
...t,
|
|
205
213
|
secretId: e.target.value
|
|
206
214
|
})),
|
|
207
|
-
disabled:
|
|
208
|
-
className:
|
|
209
|
-
children: [/* @__PURE__ */
|
|
215
|
+
disabled: E || !p.vaultId,
|
|
216
|
+
className: v,
|
|
217
|
+
children: [/* @__PURE__ */ h("option", {
|
|
210
218
|
value: "",
|
|
211
|
-
children:
|
|
212
|
-
}),
|
|
219
|
+
children: T("integrations.addConnection.credentialStorage.selectExistingSecret", "Select an existing secret")
|
|
220
|
+
}), N.map((e) => /* @__PURE__ */ g("option", {
|
|
213
221
|
value: e.id,
|
|
214
222
|
children: [
|
|
215
223
|
e.name,
|
|
@@ -217,81 +225,81 @@ var h = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5
|
|
|
217
225
|
e.type
|
|
218
226
|
]
|
|
219
227
|
}, e.id))]
|
|
220
|
-
}),
|
|
228
|
+
}), F && /* @__PURE__ */ h(d, {
|
|
221
229
|
size: 16,
|
|
222
230
|
className: "absolute end-3 top-3 animate-spin text-text-secondary"
|
|
223
231
|
})]
|
|
224
232
|
}),
|
|
225
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ h("p", {
|
|
226
234
|
className: "text-xs text-text-secondary",
|
|
227
|
-
children:
|
|
235
|
+
children: T("integrations.addConnection.credentialStorage.existingSecretHint", "For OAuth and basic auth, choose a structured credential secret created for integrations.")
|
|
228
236
|
})
|
|
229
237
|
]
|
|
230
238
|
})
|
|
231
239
|
]
|
|
232
240
|
});
|
|
233
|
-
},
|
|
234
|
-
let [
|
|
235
|
-
if (
|
|
236
|
-
|
|
241
|
+
}, b = ({ api: e, translate: t, onCreated: n, onCancel: r }) => {
|
|
242
|
+
let [i, c] = o(""), [l, u] = o(!1), [m, v] = o(null), y = a(), b = async () => {
|
|
243
|
+
if (i.trim() && !l) {
|
|
244
|
+
u(!0), v(null);
|
|
237
245
|
try {
|
|
238
|
-
n((await e.createVault(
|
|
246
|
+
n((await e.createVault(i)).id);
|
|
239
247
|
} catch (e) {
|
|
240
248
|
v(e instanceof Error ? e.message : t("integrations.addConnection.credentialStorage.createVaultFailed", "The vault could not be created"));
|
|
241
249
|
} finally {
|
|
242
|
-
|
|
250
|
+
u(!1);
|
|
243
251
|
}
|
|
244
252
|
}
|
|
245
253
|
};
|
|
246
|
-
return /* @__PURE__ */
|
|
254
|
+
return /* @__PURE__ */ g("div", {
|
|
247
255
|
className: "space-y-2 rounded-lg border border-primary/40 bg-action-primary-bg/5 p-3",
|
|
248
256
|
children: [
|
|
249
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ g("div", {
|
|
250
258
|
className: "flex items-center justify-between gap-2",
|
|
251
|
-
children: [/* @__PURE__ */
|
|
259
|
+
children: [/* @__PURE__ */ h("label", {
|
|
252
260
|
htmlFor: y,
|
|
253
261
|
className: "text-xs font-medium text-text-primary",
|
|
254
262
|
children: t("integrations.addConnection.credentialStorage.newVaultName", "New vault name")
|
|
255
|
-
}), /* @__PURE__ */
|
|
263
|
+
}), /* @__PURE__ */ h("button", {
|
|
256
264
|
type: "button",
|
|
257
|
-
onClick:
|
|
265
|
+
onClick: r,
|
|
258
266
|
"aria-label": t("integrations.addConnection.credentialStorage.cancelCreateVault", "Cancel creating a vault"),
|
|
259
267
|
className: "text-text-secondary hover:text-text-primary",
|
|
260
|
-
children: /* @__PURE__ */ p
|
|
268
|
+
children: /* @__PURE__ */ h(p, { size: 14 })
|
|
261
269
|
})]
|
|
262
270
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ h("input", {
|
|
264
272
|
id: y,
|
|
265
273
|
type: "text",
|
|
266
|
-
value:
|
|
274
|
+
value: i,
|
|
267
275
|
autoFocus: !0,
|
|
268
276
|
onChange: (e) => c(e.target.value),
|
|
269
277
|
onKeyDown: (e) => {
|
|
270
278
|
e.key === "Enter" && (e.preventDefault(), b());
|
|
271
279
|
},
|
|
272
280
|
placeholder: t("integrations.addConnection.credentialStorage.newVaultPlaceholder", "e.g. Integrations"),
|
|
273
|
-
disabled:
|
|
274
|
-
className:
|
|
281
|
+
disabled: l,
|
|
282
|
+
className: _
|
|
275
283
|
}),
|
|
276
|
-
|
|
284
|
+
m && /* @__PURE__ */ g("p", {
|
|
277
285
|
className: "flex items-center gap-1.5 text-xs text-status-error-text",
|
|
278
|
-
children: [/* @__PURE__ */
|
|
286
|
+
children: [/* @__PURE__ */ h(s, {
|
|
279
287
|
size: 13,
|
|
280
288
|
className: "flex-shrink-0"
|
|
281
|
-
}),
|
|
289
|
+
}), m]
|
|
282
290
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ g("div", {
|
|
284
292
|
className: "flex items-center gap-2",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ g("button", {
|
|
286
294
|
type: "button",
|
|
287
295
|
onClick: () => void b(),
|
|
288
|
-
disabled:
|
|
296
|
+
disabled: l || !i.trim(),
|
|
289
297
|
className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
290
|
-
children: [
|
|
298
|
+
children: [l ? /* @__PURE__ */ h(d, {
|
|
291
299
|
size: 13,
|
|
292
300
|
className: "animate-spin"
|
|
293
|
-
}) : /* @__PURE__ */
|
|
294
|
-
}), /* @__PURE__ */
|
|
301
|
+
}) : /* @__PURE__ */ h(f, { size: 13 }), t("integrations.addConnection.credentialStorage.createVault", "Create vault")]
|
|
302
|
+
}), /* @__PURE__ */ h("span", {
|
|
295
303
|
className: "text-xs text-text-secondary",
|
|
296
304
|
children: t("integrations.addConnection.credentialStorage.scopedHint", "Scoped to this workspace.")
|
|
297
305
|
})]
|
|
@@ -299,4 +307,4 @@ var h = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5
|
|
|
299
307
|
]
|
|
300
308
|
});
|
|
301
309
|
};
|
|
302
|
-
export {
|
|
310
|
+
export { y as CredentialStorageSelector };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { ConnectionFormTabProps } from './ConnectionFormTab';
|
|
3
|
+
/** The remembered open/closed state of the connect form's "More options". */
|
|
4
|
+
export declare const CONNECT_MORE_OPTIONS_KEY = "connections.connect.more-options";
|
|
5
|
+
export interface OneScreenConnectionFormProps extends ConnectionFormTabProps {
|
|
6
|
+
/** Signing in again on an existing connection: its name, storage and sharing are kept. */
|
|
7
|
+
reconnect: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Show where the key is kept at level 1: a vault is required and the person
|
|
10
|
+
* has none, so there is nothing to pick for them and the choice cannot hide.
|
|
11
|
+
*/
|
|
12
|
+
storageAtTop: boolean;
|
|
13
|
+
onVaultsLoaded: (count: number) => void;
|
|
14
|
+
/** Who can use the new connection (the classic Sharing tab), when the host shows it. */
|
|
15
|
+
sharing?: ReactNode;
|
|
16
|
+
/** What the app is (the classic Details tab). */
|
|
17
|
+
about?: ReactNode;
|
|
18
|
+
/** The browser blocked the sign-in window; offer to open it from a click. */
|
|
19
|
+
signInBlocked: boolean;
|
|
20
|
+
onOpenSignIn: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const OneScreenConnectionForm: FC<OneScreenConnectionFormProps>;
|