@burdenoff/fe-libs 2026.1113.6 → 2026.1113.8
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/dist/ui/index.d.ts +1 -0
- package/dist/ui/use-heading-document-title.d.ts +19 -0
- package/dist/ui/use-heading-document-title.js +29 -0
- package/dist/ui.js +49 -48
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { ApolloClient } from '@apollo/client';
|
|
|
3
3
|
import { Translator } from '../credentials/translate';
|
|
4
4
|
import { ConnectionsApi } from './api';
|
|
5
5
|
import { ConnectionDialogPresentation } from './frame';
|
|
6
|
-
import { ConnectionDialogEvent, ConnectionVisibility, CreatedConnection } from './types';
|
|
6
|
+
import { ConnectionDialogEvent, ConnectionReconnectTarget, ConnectionVisibility, CreatedConnection } from './types';
|
|
7
7
|
export interface ConnectionDialogProps {
|
|
8
8
|
open: boolean;
|
|
9
9
|
onClose: () => void;
|
|
@@ -56,6 +56,18 @@ export interface ConnectionDialogProps {
|
|
|
56
56
|
presentation?: ConnectionDialogPresentation;
|
|
57
57
|
/** Heading while the provider picker shows. Defaults to "Add new credential". */
|
|
58
58
|
pickerTitle?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Navigation v2's one-screen form (BOFF-11875), opted into by FluidGrids:
|
|
61
|
+
* popular apps first in the picker, the required fields and one button at
|
|
62
|
+
* level 1, everything else under one "More options", no tab rail. Off (the
|
|
63
|
+
* default), the dialog is exactly the classic tabbed form.
|
|
64
|
+
*/
|
|
65
|
+
navigationV2?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Sign in again on this existing connection (Reconnect) instead of creating
|
|
68
|
+
* one. The record keeps its id, name and storage.
|
|
69
|
+
*/
|
|
70
|
+
reconnect?: ConnectionReconnectTarget | null;
|
|
59
71
|
/** Test seam: supply the service directly instead of via `client`. */
|
|
60
72
|
api?: ConnectionsApi;
|
|
61
73
|
}
|
|
@@ -29,12 +29,12 @@ var v = ({ onClose: e, translate: t }) => /* @__PURE__ */ g(m, { children: [
|
|
|
29
29
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium transition-colors hover:bg-accent",
|
|
30
30
|
children: t("integrations.common.close", "Close")
|
|
31
31
|
})
|
|
32
|
-
] }), y = ({ open: i, onClose: p, client: m, callbackUrl: y, translate: b = e, providerId: x, providerKey: S, providerSource: C = "installed", requireVault: w = !0, canCreate: T = !0, canCreateVault: E = !1, defaultName: D, extraConfig: O, showSharingTab: k = !1, defaultVisibility: A, refetchQueriesOnCreate: j, onConnectionCreated: M, onError: N, onEvent: P, renderSuccessAction: F, presentation: I = "dialog", pickerTitle: L,
|
|
33
|
-
let
|
|
34
|
-
|
|
32
|
+
] }), y = ({ open: i, onClose: p, client: m, callbackUrl: y, translate: b = e, providerId: x, providerKey: S, providerSource: C = "installed", requireVault: w = !0, canCreate: T = !0, canCreateVault: E = !1, defaultName: D, extraConfig: O, showSharingTab: k = !1, defaultVisibility: A, refetchQueriesOnCreate: j, onConnectionCreated: M, onError: N, onEvent: P, renderSuccessAction: F, presentation: I = "dialog", pickerTitle: L, navigationV2: R = !1, reconnect: z = null, api: B }) => {
|
|
33
|
+
let V = j?.join("|") ?? "", H = d(() => B ?? n(m, { refetchQueriesOnCreate: V ? V.split("|") : void 0 }), [
|
|
34
|
+
B,
|
|
35
35
|
m,
|
|
36
|
-
|
|
37
|
-
]),
|
|
36
|
+
V
|
|
37
|
+
]), U = f(null), W = f(null), G = f(null);
|
|
38
38
|
return /* @__PURE__ */ h(_.Root, {
|
|
39
39
|
open: i,
|
|
40
40
|
onOpenChange: (e) => !e && p(),
|
|
@@ -43,7 +43,7 @@ var v = ({ onClose: e, translate: t }) => /* @__PURE__ */ g(m, { children: [
|
|
|
43
43
|
style: { zIndex: c },
|
|
44
44
|
className: "fixed inset-0 bg-bg-overlay animate-in fade-in-0 duration-200"
|
|
45
45
|
}), /* @__PURE__ */ h(_.Content, {
|
|
46
|
-
ref:
|
|
46
|
+
ref: W,
|
|
47
47
|
"aria-modal": "true",
|
|
48
48
|
"aria-labelledby": T ? u : o,
|
|
49
49
|
"data-testid": "add-connection-dialog",
|
|
@@ -51,15 +51,15 @@ var v = ({ onClose: e, translate: t }) => /* @__PURE__ */ g(m, { children: [
|
|
|
51
51
|
style: { zIndex: s },
|
|
52
52
|
className: t(l, a[I][T ? "form" : "notice"]),
|
|
53
53
|
onOpenAutoFocus: (e) => {
|
|
54
|
-
|
|
54
|
+
U.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, e.preventDefault(), (G.current ?? W.current)?.focus({ preventScroll: !0 });
|
|
55
55
|
},
|
|
56
56
|
onCloseAutoFocus: (e) => {
|
|
57
57
|
e.preventDefault();
|
|
58
|
-
let t =
|
|
58
|
+
let t = U.current;
|
|
59
59
|
t && t.isConnected && t !== document.body && t.focus({ preventScroll: !0 });
|
|
60
60
|
},
|
|
61
61
|
children: T ? /* @__PURE__ */ h(r, {
|
|
62
|
-
api:
|
|
62
|
+
api: H,
|
|
63
63
|
onClose: p,
|
|
64
64
|
callbackUrl: y,
|
|
65
65
|
translate: b,
|
|
@@ -73,11 +73,13 @@ var v = ({ onClose: e, translate: t }) => /* @__PURE__ */ g(m, { children: [
|
|
|
73
73
|
showSharingTab: k,
|
|
74
74
|
defaultVisibility: A,
|
|
75
75
|
pickerTitle: L,
|
|
76
|
-
searchInputRef:
|
|
76
|
+
searchInputRef: G,
|
|
77
77
|
onConnectionCreated: M,
|
|
78
78
|
onError: N,
|
|
79
79
|
onEvent: P,
|
|
80
|
-
renderSuccessAction: F
|
|
80
|
+
renderSuccessAction: F,
|
|
81
|
+
navigationV2: R,
|
|
82
|
+
reconnect: z
|
|
81
83
|
}) : /* @__PURE__ */ h(v, {
|
|
82
84
|
onClose: p,
|
|
83
85
|
translate: b
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC, ReactNode, RefObject } from 'react';
|
|
2
2
|
import { Translator } from '../credentials/translate';
|
|
3
3
|
import { ConnectionsApi } from './api';
|
|
4
|
-
import { ConnectionDialogEvent, CreatedConnection, ConnectionVisibility } from './types';
|
|
4
|
+
import { ConnectionDialogEvent, CreatedConnection, ConnectionReconnectTarget, ConnectionVisibility } from './types';
|
|
5
5
|
export interface ConnectionDialogPanelProps {
|
|
6
6
|
api: ConnectionsApi;
|
|
7
7
|
onClose: () => void;
|
|
@@ -23,5 +23,9 @@ export interface ConnectionDialogPanelProps {
|
|
|
23
23
|
onError?: (error: Error) => void;
|
|
24
24
|
onEvent?: (event: ConnectionDialogEvent) => void;
|
|
25
25
|
renderSuccessAction?: (connection: CreatedConnection) => ReactNode;
|
|
26
|
+
/** Navigation v2's one-screen form (BOFF-11875). Off: the classic tabbed form. */
|
|
27
|
+
navigationV2?: boolean;
|
|
28
|
+
/** Sign in again on this existing connection instead of creating one. */
|
|
29
|
+
reconnect?: ConnectionReconnectTarget | null;
|
|
26
30
|
}
|
|
27
31
|
export declare const ConnectionDialogPanel: FC<ConnectionDialogPanelProps>;
|
|
@@ -1,93 +1,107 @@
|
|
|
1
1
|
import { initialValuesFromSchema as e } from "../credentials/schema.js";
|
|
2
2
|
import { cn as t } from "../lib/utils.js";
|
|
3
|
-
import { normalizeStorageMode as n, resolveFlow as r, resolveMethod as i, resolveSchema as a, selectableMethods as
|
|
4
|
-
import { ConnectionDetailsTab as
|
|
5
|
-
import { ConnectionFormTab as
|
|
3
|
+
import { normalizeStorageMode as n, resolveFlow as r, resolveMethod as i, resolveSchema as a, selectableMethods as o, supportedStorageModes as s } from "./connectionFlow.js";
|
|
4
|
+
import { ConnectionDetailsTab as ee, ConnectionSharingTab as te } from "./ConnectionDetailsTab.js";
|
|
5
|
+
import { ConnectionFormTab as ne } from "./ConnectionFormTab.js";
|
|
6
|
+
import { OneScreenConnectionForm as re } from "./OneScreenConnectionForm.js";
|
|
6
7
|
import { DialogHeading as ie } from "./DialogHeading.js";
|
|
7
8
|
import { TITLE_ID as ae } from "./frame.js";
|
|
8
9
|
import { authTypeLabel as oe } from "./labels.js";
|
|
9
10
|
import { ProviderIcon as se } from "./ProviderIcon.js";
|
|
10
11
|
import { ProviderPickerPanel as ce } from "./ProviderPickerPanel.js";
|
|
11
12
|
import { parseScopeOptions as le, requestedScopes as ue } from "./scopes.js";
|
|
12
|
-
import { EMPTY_STORAGE as
|
|
13
|
+
import { EMPTY_STORAGE as c } from "./storage.js";
|
|
13
14
|
import { useConnectionSubmit as de } from "./useConnectionSubmit.js";
|
|
14
|
-
import { useCallback as
|
|
15
|
-
import { AlertCircle as me, Check as he, CheckCircle2 as ge,
|
|
16
|
-
import { Fragment as
|
|
17
|
-
import * as
|
|
15
|
+
import { useCallback as l, useEffect as fe, useId as pe, useMemo as u, useState as d } from "react";
|
|
16
|
+
import { AlertCircle as me, Check as he, CheckCircle2 as ge, ExternalLink as _e, Info as ve, Link2 as ye, Loader2 as be, Share2 as xe, X as Se } from "lucide-react";
|
|
17
|
+
import { Fragment as Ce, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
18
|
+
import * as we from "@radix-ui/react-dialog";
|
|
18
19
|
// src/connections/ConnectionDialogPanel.tsx
|
|
19
|
-
function
|
|
20
|
+
function Te(t, n) {
|
|
20
21
|
return e(a(t, i(t, n)));
|
|
21
22
|
}
|
|
22
|
-
var
|
|
23
|
-
let T = !!(
|
|
23
|
+
var m = ({ api: e, onClose: m, callbackUrl: h, translate: g, providerId: Ee, providerKey: _, providerSource: De, requireVault: v, canCreateVault: y, defaultName: b, extraConfig: Oe, showSharingTab: x, defaultVisibility: ke, pickerTitle: Ae, searchInputRef: je, onConnectionCreated: Me, onError: Ne, onEvent: Pe, renderSuccessAction: S, navigationV2: C = !1, reconnect: w = null }) => {
|
|
24
|
+
let T = w?.providerId ?? Ee, E = !!(T || _), [D, Fe] = d(null), [O, Ie] = d(E), [k, A] = d("connection"), [j, M] = d(w?.name ?? b ?? ""), [N, Le] = d(""), [Re, ze] = d(null), [P, F] = d({}), [I, L] = d(null), [R, z] = d(c), [B, Be] = d(ke), [Ve, He] = d(null), V = pe(), H = l((e) => `${V}-${e}`, [V]), Ue = u(() => w ? {
|
|
25
|
+
id: w.connectionId,
|
|
26
|
+
name: w.name,
|
|
27
|
+
status: "",
|
|
28
|
+
errorMessage: null
|
|
29
|
+
} : null, [w]), { submit: We, busy: U, oauthWaiting: W, errorMessage: Ge, setErrorMessage: G, created: K, signInBlocked: Ke, openBlockedSignIn: qe, cancelSignIn: Je } = de({
|
|
24
30
|
api: e,
|
|
25
|
-
callbackUrl:
|
|
26
|
-
translate:
|
|
27
|
-
onConnectionCreated:
|
|
28
|
-
onError:
|
|
29
|
-
onEvent:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
callbackUrl: h,
|
|
32
|
+
translate: g,
|
|
33
|
+
onConnectionCreated: Me,
|
|
34
|
+
onError: Ne,
|
|
35
|
+
onEvent: Pe,
|
|
36
|
+
reconnectConnection: Ue
|
|
37
|
+
}), Ye = w?.name, Xe = w?.authMethodKey ?? null, q = l((e) => {
|
|
38
|
+
let t = Xe;
|
|
39
|
+
Fe(e), M(Ye ?? b ?? `${e.name} Connection`), ze(t), F(Te(e, t)), z(n(c, s(e, i(e, t)))), L(null), G("");
|
|
40
|
+
}, [
|
|
41
|
+
b,
|
|
42
|
+
Ye,
|
|
43
|
+
Xe,
|
|
44
|
+
G
|
|
45
|
+
]), Ze = l((e) => {
|
|
46
|
+
if (!D) return;
|
|
47
|
+
ze(e), F(Te(D, e));
|
|
48
|
+
let t = s(D, i(D, e));
|
|
36
49
|
z((e) => ({
|
|
37
50
|
...n(e, t),
|
|
38
51
|
secretId: ""
|
|
39
|
-
})), L(null),
|
|
40
|
-
}, [
|
|
52
|
+
})), L(null), G("");
|
|
53
|
+
}, [D, G]);
|
|
41
54
|
fe(() => {
|
|
42
|
-
if (!
|
|
55
|
+
if (!E) return;
|
|
43
56
|
let t = !1;
|
|
44
57
|
return e.getProvider({
|
|
45
|
-
id:
|
|
46
|
-
key:
|
|
58
|
+
id: T ?? void 0,
|
|
59
|
+
key: _ ?? void 0
|
|
47
60
|
}).then((e) => {
|
|
48
|
-
!t && e &&
|
|
61
|
+
!t && e && q(e);
|
|
49
62
|
}).catch(() => void 0).finally(() => {
|
|
50
|
-
t ||
|
|
63
|
+
t || Ie(!1);
|
|
51
64
|
}), () => {
|
|
52
65
|
t = !0;
|
|
53
66
|
};
|
|
54
67
|
}, [
|
|
68
|
+
E,
|
|
55
69
|
T,
|
|
56
|
-
|
|
57
|
-
x,
|
|
70
|
+
_,
|
|
58
71
|
e,
|
|
59
|
-
|
|
72
|
+
q
|
|
60
73
|
]);
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
provider:
|
|
64
|
-
method:
|
|
65
|
-
name:
|
|
66
|
-
description:
|
|
74
|
+
let J = D ? i(D, Re) : null, Y = D ? r(D, J) : "fields", X = u(() => D ? a(D, J) : null, [D, J]), Z = u(() => le(J?.availableScopes ?? D?.availableScopes), [J, D]), Qe = J && J.defaultScopes.length > 0 ? J.defaultScopes : D?.defaultScopes ?? [], $e = () => {
|
|
75
|
+
D && We({
|
|
76
|
+
provider: D,
|
|
77
|
+
method: J,
|
|
78
|
+
name: j,
|
|
79
|
+
description: N,
|
|
67
80
|
values: P,
|
|
68
81
|
storage: R,
|
|
69
|
-
requireVault:
|
|
70
|
-
extraConfig:
|
|
71
|
-
visibility: B
|
|
72
|
-
|
|
73
|
-
|
|
82
|
+
requireVault: v,
|
|
83
|
+
extraConfig: Oe,
|
|
84
|
+
visibility: B,
|
|
85
|
+
reconnect: !!w
|
|
86
|
+
}, ue(I, Z));
|
|
87
|
+
}, et = [
|
|
74
88
|
{
|
|
75
89
|
key: "connection",
|
|
76
|
-
label:
|
|
77
|
-
icon:
|
|
90
|
+
label: g("integrations.addConnection.tabs.connection", "Connection"),
|
|
91
|
+
icon: ye
|
|
78
92
|
},
|
|
79
|
-
...
|
|
93
|
+
...x ? [{
|
|
80
94
|
key: "sharing",
|
|
81
|
-
label:
|
|
82
|
-
icon:
|
|
95
|
+
label: g("integrations.addConnection.tabs.sharing", "Sharing"),
|
|
96
|
+
icon: xe
|
|
83
97
|
}] : [],
|
|
84
98
|
{
|
|
85
99
|
key: "details",
|
|
86
|
-
label:
|
|
87
|
-
icon:
|
|
100
|
+
label: g("integrations.addConnection.tabs.details", "Details"),
|
|
101
|
+
icon: ve
|
|
88
102
|
}
|
|
89
|
-
],
|
|
90
|
-
let t =
|
|
103
|
+
], Q = (e) => H(`tab-${e}`), tt = H("tabpanel"), nt = (e) => {
|
|
104
|
+
let t = et.map((e) => e.key), n = t.indexOf(k), r = {
|
|
91
105
|
ArrowRight: n + 1,
|
|
92
106
|
ArrowDown: n + 1,
|
|
93
107
|
ArrowLeft: n - 1,
|
|
@@ -97,188 +111,254 @@ var _ = ({ api: e, onClose: _, callbackUrl: v, translate: y, providerId: b, prov
|
|
|
97
111
|
}[e.key];
|
|
98
112
|
if (r === void 0) return;
|
|
99
113
|
let i = t[(r + t.length) % t.length];
|
|
100
|
-
e.preventDefault(),
|
|
101
|
-
}, $ = !!
|
|
102
|
-
return /* @__PURE__ */
|
|
103
|
-
/* @__PURE__ */
|
|
114
|
+
e.preventDefault(), A(i), document.getElementById(Q(i))?.focus();
|
|
115
|
+
}, $ = !!D && !K, rt = K?.externalAccountEmail || K?.externalAccountName || "";
|
|
116
|
+
return /* @__PURE__ */ p(Ce, { children: [
|
|
117
|
+
/* @__PURE__ */ p("div", {
|
|
104
118
|
className: "flex flex-shrink-0 items-center justify-between border-b border-border-subtle px-5 py-4",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
119
|
+
children: [/* @__PURE__ */ p("div", {
|
|
106
120
|
className: "flex min-w-0 items-center gap-3",
|
|
107
|
-
children: [
|
|
108
|
-
provider:
|
|
121
|
+
children: [D && /* @__PURE__ */ f(se, {
|
|
122
|
+
provider: D,
|
|
109
123
|
size: 32
|
|
110
|
-
}), /* @__PURE__ */
|
|
124
|
+
}), /* @__PURE__ */ p("div", {
|
|
111
125
|
className: "min-w-0",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ f(ie, {
|
|
113
127
|
id: ae,
|
|
114
|
-
className: t("text-base font-semibold text-text-primary",
|
|
115
|
-
children:
|
|
116
|
-
}), /* @__PURE__ */
|
|
128
|
+
className: t("text-base font-semibold text-text-primary", D && "truncate"),
|
|
129
|
+
children: D ? C ? w ? g("integrations.addConnection.oneScreen.reconnectTitle", "Reconnect {{provider}}", { provider: D.name }) : g("integrations.addConnection.oneScreen.title", "Connect {{provider}}", { provider: D.name }) : g("integrations.addConnection.dialog.accountTitle", "{{provider}} account", { provider: D.name }) : Ae ?? (C ? g("integrations.addConnection.oneScreen.pickerTitle", "Connect an app") : g("integrations.addConnection.dialog.title", "Add new credential"))
|
|
130
|
+
}), /* @__PURE__ */ f(we.Description, {
|
|
117
131
|
className: "text-xs text-text-secondary",
|
|
118
|
-
children:
|
|
132
|
+
children: D ? C ? g("integrations.addConnection.oneScreen.subtitle", "Your workflows can use this account once it is connected.", { provider: D.name }) : oe(J?.authType ?? D.authType, g) : g("integrations.addConnection.dialog.subtitle", "Select an app or service to connect to")
|
|
119
133
|
})]
|
|
120
134
|
})]
|
|
121
|
-
}), /* @__PURE__ */
|
|
135
|
+
}), /* @__PURE__ */ f(we.Close, {
|
|
122
136
|
asChild: !0,
|
|
123
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ f("button", {
|
|
124
138
|
type: "button",
|
|
125
139
|
className: "flex-shrink-0 rounded-md p-1.5 text-text-secondary transition-colors hover:bg-accent hover:text-text-primary",
|
|
126
|
-
"aria-label":
|
|
127
|
-
children: /* @__PURE__ */
|
|
140
|
+
"aria-label": g("integrations.addConnection.actions.close", "Close dialog"),
|
|
141
|
+
children: /* @__PURE__ */ f(Se, { size: 20 })
|
|
128
142
|
})
|
|
129
143
|
})]
|
|
130
144
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ p("div", {
|
|
132
146
|
"data-testid": "add-connection-body",
|
|
133
147
|
className: "flex min-h-0 flex-1 flex-col overflow-hidden sm:flex-row",
|
|
134
148
|
children: [
|
|
135
|
-
!
|
|
149
|
+
!E && !D && /* @__PURE__ */ f(ce, {
|
|
136
150
|
api: e,
|
|
137
|
-
source:
|
|
138
|
-
translate:
|
|
139
|
-
searchInputRef:
|
|
140
|
-
onSelect:
|
|
151
|
+
source: De,
|
|
152
|
+
translate: g,
|
|
153
|
+
searchInputRef: je,
|
|
154
|
+
onSelect: q,
|
|
155
|
+
navigationV2: C
|
|
141
156
|
}),
|
|
142
|
-
|
|
157
|
+
E && !D && O && /* @__PURE__ */ f("div", {
|
|
143
158
|
className: "flex flex-1 items-center justify-center p-8",
|
|
144
|
-
children: /* @__PURE__ */
|
|
159
|
+
children: /* @__PURE__ */ f(be, {
|
|
145
160
|
size: 32,
|
|
146
161
|
className: "animate-spin text-text-secondary"
|
|
147
162
|
})
|
|
148
163
|
}),
|
|
149
|
-
|
|
164
|
+
E && !D && !O && /* @__PURE__ */ p("div", {
|
|
150
165
|
className: "flex flex-1 flex-col items-center justify-center p-8 text-center",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ f(me, {
|
|
152
167
|
size: 32,
|
|
153
168
|
className: "mb-3 text-text-secondary"
|
|
154
|
-
}), /* @__PURE__ */
|
|
169
|
+
}), /* @__PURE__ */ f("p", {
|
|
155
170
|
className: "text-sm text-text-secondary",
|
|
156
|
-
children:
|
|
171
|
+
children: g("integrations.addConnection.providerUnavailable", "This provider isn't available.")
|
|
157
172
|
})]
|
|
158
173
|
}),
|
|
159
|
-
|
|
174
|
+
D && K && /* @__PURE__ */ p("div", {
|
|
160
175
|
className: "flex flex-1 flex-col items-center justify-center p-8 text-center",
|
|
161
176
|
children: [
|
|
162
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ f("div", {
|
|
163
178
|
className: "mb-4 rounded-full bg-status-success-bg-subtle p-3",
|
|
164
|
-
children: /* @__PURE__ */
|
|
179
|
+
children: /* @__PURE__ */ f(ge, {
|
|
165
180
|
size: 48,
|
|
166
181
|
className: "text-status-success-text"
|
|
167
182
|
})
|
|
168
183
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ f("h3", {
|
|
170
185
|
className: "mb-1 text-lg font-semibold text-text-primary",
|
|
171
|
-
children:
|
|
186
|
+
children: C ? rt ? g("integrations.addConnection.oneScreen.successAs", "{{provider}} connected as {{account}}", {
|
|
187
|
+
provider: D.name,
|
|
188
|
+
account: rt
|
|
189
|
+
}) : g("integrations.addConnection.oneScreen.success", "{{provider}} connected", { provider: D.name }) : g("integrations.addConnection.success.title", "Connection Created!")
|
|
172
190
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ f("p", {
|
|
174
192
|
className: "mb-6 text-sm text-text-secondary",
|
|
175
|
-
children:
|
|
193
|
+
children: g("integrations.addConnection.success.description", "Your {{provider}} connection has been set up successfully.", { provider: D.name })
|
|
176
194
|
}),
|
|
177
|
-
|
|
195
|
+
S ? S(K) : /* @__PURE__ */ f("button", {
|
|
178
196
|
type: "button",
|
|
179
|
-
onClick:
|
|
197
|
+
onClick: m,
|
|
180
198
|
className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90",
|
|
181
|
-
children:
|
|
199
|
+
children: g("integrations.addConnection.actions.done", "Done")
|
|
182
200
|
})
|
|
183
201
|
]
|
|
184
202
|
}),
|
|
185
|
-
|
|
203
|
+
D && $ && C && /* @__PURE__ */ f("div", {
|
|
204
|
+
"data-testid": "add-connection-pane",
|
|
205
|
+
className: "min-h-0 min-w-0 flex-1 overflow-y-auto p-5",
|
|
206
|
+
children: /* @__PURE__ */ f(re, {
|
|
207
|
+
api: e,
|
|
208
|
+
provider: D,
|
|
209
|
+
methods: o(D),
|
|
210
|
+
method: J,
|
|
211
|
+
flow: Y,
|
|
212
|
+
schema: X,
|
|
213
|
+
name: j,
|
|
214
|
+
onNameChange: M,
|
|
215
|
+
description: N,
|
|
216
|
+
onDescriptionChange: Le,
|
|
217
|
+
values: P,
|
|
218
|
+
setValues: F,
|
|
219
|
+
onMethodChange: Ze,
|
|
220
|
+
storage: R,
|
|
221
|
+
setStorage: z,
|
|
222
|
+
supportedStorageModes: s(D, J),
|
|
223
|
+
scopeOptions: Z,
|
|
224
|
+
defaultScopes: Qe,
|
|
225
|
+
scopeSelection: I,
|
|
226
|
+
setScopeSelection: L,
|
|
227
|
+
callbackUrl: h,
|
|
228
|
+
requireVault: v,
|
|
229
|
+
canCreateVault: y,
|
|
230
|
+
errorMessage: Ge,
|
|
231
|
+
busy: U,
|
|
232
|
+
translate: g,
|
|
233
|
+
fieldId: H,
|
|
234
|
+
reconnect: !!w,
|
|
235
|
+
storageAtTop: v && Ve === 0,
|
|
236
|
+
onVaultsLoaded: He,
|
|
237
|
+
sharing: x ? /* @__PURE__ */ f(te, {
|
|
238
|
+
translate: g,
|
|
239
|
+
visibility: B ?? "WORKSPACE",
|
|
240
|
+
onVisibilityChange: Be,
|
|
241
|
+
idPrefix: V
|
|
242
|
+
}) : void 0,
|
|
243
|
+
about: /* @__PURE__ */ f(ee, {
|
|
244
|
+
provider: D,
|
|
245
|
+
translate: g
|
|
246
|
+
}),
|
|
247
|
+
signInBlocked: Ke,
|
|
248
|
+
onOpenSignIn: qe
|
|
249
|
+
})
|
|
250
|
+
}),
|
|
251
|
+
D && $ && !C && /* @__PURE__ */ p(Ce, { children: [/* @__PURE__ */ f("div", {
|
|
186
252
|
role: "tablist",
|
|
187
253
|
"aria-labelledby": "add-connection-dialog-title",
|
|
188
254
|
"data-testid": "add-connection-tabs",
|
|
189
255
|
className: "flex flex-shrink-0 overflow-x-auto border-b border-border-subtle sm:block sm:w-40 sm:overflow-x-visible sm:border-b-0 sm:border-e sm:py-3",
|
|
190
|
-
children:
|
|
191
|
-
let n = e.icon, r =
|
|
192
|
-
return /* @__PURE__ */
|
|
193
|
-
id:
|
|
256
|
+
children: et.map((e) => {
|
|
257
|
+
let n = e.icon, r = k === e.key;
|
|
258
|
+
return /* @__PURE__ */ p("button", {
|
|
259
|
+
id: Q(e.key),
|
|
194
260
|
type: "button",
|
|
195
261
|
role: "tab",
|
|
196
262
|
"aria-selected": r,
|
|
197
|
-
"aria-controls":
|
|
263
|
+
"aria-controls": tt,
|
|
198
264
|
tabIndex: r ? 0 : -1,
|
|
199
|
-
onClick: () =>
|
|
200
|
-
onKeyDown:
|
|
265
|
+
onClick: () => A(e.key),
|
|
266
|
+
onKeyDown: nt,
|
|
201
267
|
className: t("flex min-w-max items-center gap-2 border-b-2 px-4 py-2 text-sm font-medium transition-colors sm:w-full sm:border-b-0 sm:border-s-2", r ? "border-primary bg-accent/50 text-text-primary" : "border-transparent text-text-secondary hover:bg-accent/30 hover:text-text-primary"),
|
|
202
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ f(n, {
|
|
203
269
|
size: 16,
|
|
204
270
|
"aria-hidden": "true"
|
|
205
271
|
}), e.label]
|
|
206
272
|
}, e.key);
|
|
207
273
|
})
|
|
208
|
-
}), /* @__PURE__ */
|
|
209
|
-
id:
|
|
274
|
+
}), /* @__PURE__ */ p("div", {
|
|
275
|
+
id: tt,
|
|
210
276
|
role: "tabpanel",
|
|
211
|
-
"aria-labelledby":
|
|
277
|
+
"aria-labelledby": Q(k),
|
|
212
278
|
"data-testid": "add-connection-pane",
|
|
213
279
|
className: "min-h-0 min-w-0 flex-1 overflow-y-auto p-5",
|
|
214
280
|
children: [
|
|
215
|
-
|
|
281
|
+
k === "connection" && /* @__PURE__ */ f(ne, {
|
|
216
282
|
api: e,
|
|
217
|
-
provider:
|
|
218
|
-
methods:
|
|
219
|
-
method:
|
|
220
|
-
flow:
|
|
221
|
-
schema:
|
|
222
|
-
name:
|
|
223
|
-
onNameChange:
|
|
224
|
-
description:
|
|
225
|
-
onDescriptionChange:
|
|
283
|
+
provider: D,
|
|
284
|
+
methods: o(D),
|
|
285
|
+
method: J,
|
|
286
|
+
flow: Y,
|
|
287
|
+
schema: X,
|
|
288
|
+
name: j,
|
|
289
|
+
onNameChange: M,
|
|
290
|
+
description: N,
|
|
291
|
+
onDescriptionChange: Le,
|
|
226
292
|
values: P,
|
|
227
293
|
setValues: F,
|
|
228
|
-
onMethodChange:
|
|
294
|
+
onMethodChange: Ze,
|
|
229
295
|
storage: R,
|
|
230
296
|
setStorage: z,
|
|
231
|
-
supportedStorageModes:
|
|
232
|
-
scopeOptions:
|
|
233
|
-
defaultScopes:
|
|
297
|
+
supportedStorageModes: s(D, J),
|
|
298
|
+
scopeOptions: Z,
|
|
299
|
+
defaultScopes: Qe,
|
|
234
300
|
scopeSelection: I,
|
|
235
301
|
setScopeSelection: L,
|
|
236
|
-
callbackUrl:
|
|
237
|
-
requireVault:
|
|
238
|
-
canCreateVault:
|
|
239
|
-
errorMessage:
|
|
302
|
+
callbackUrl: h,
|
|
303
|
+
requireVault: v,
|
|
304
|
+
canCreateVault: y,
|
|
305
|
+
errorMessage: Ge,
|
|
240
306
|
busy: U,
|
|
241
|
-
translate:
|
|
307
|
+
translate: g,
|
|
242
308
|
fieldId: H
|
|
243
309
|
}),
|
|
244
|
-
|
|
245
|
-
translate:
|
|
310
|
+
k === "sharing" && /* @__PURE__ */ f(te, {
|
|
311
|
+
translate: g,
|
|
246
312
|
visibility: B ?? "WORKSPACE",
|
|
247
|
-
onVisibilityChange:
|
|
313
|
+
onVisibilityChange: Be,
|
|
248
314
|
idPrefix: V
|
|
249
315
|
}),
|
|
250
|
-
|
|
251
|
-
provider:
|
|
252
|
-
translate:
|
|
316
|
+
k === "details" && /* @__PURE__ */ f(ee, {
|
|
317
|
+
provider: D,
|
|
318
|
+
translate: g
|
|
253
319
|
})
|
|
254
320
|
]
|
|
255
321
|
})] })
|
|
256
322
|
]
|
|
257
323
|
}),
|
|
258
|
-
|
|
324
|
+
D && $ && /* @__PURE__ */ p("div", {
|
|
259
325
|
"data-testid": "add-connection-footer",
|
|
260
326
|
className: "flex flex-shrink-0 items-center justify-end gap-2 border-t border-border-subtle px-5 py-3",
|
|
261
|
-
children: [
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
"
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
327
|
+
children: [
|
|
328
|
+
Ke && !C && /* @__PURE__ */ p("button", {
|
|
329
|
+
type: "button",
|
|
330
|
+
"data-testid": "open-sign-in-window",
|
|
331
|
+
onClick: qe,
|
|
332
|
+
className: "me-auto inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-accent",
|
|
333
|
+
children: [/* @__PURE__ */ f(_e, {
|
|
334
|
+
size: 14,
|
|
335
|
+
"aria-hidden": "true"
|
|
336
|
+
}), g("integrations.addConnection.actions.openSignInWindow", "Open sign-in window")]
|
|
337
|
+
}),
|
|
338
|
+
/* @__PURE__ */ f("button", {
|
|
339
|
+
type: "button",
|
|
340
|
+
onClick: C && W ? Je : m,
|
|
341
|
+
"data-testid": "add-connection-cancel",
|
|
342
|
+
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-accent",
|
|
343
|
+
children: g("integrations.addConnection.actions.cancel", "Cancel")
|
|
344
|
+
}),
|
|
345
|
+
/* @__PURE__ */ p("button", {
|
|
346
|
+
type: "button",
|
|
347
|
+
"data-testid": "add-connection-submit",
|
|
348
|
+
onClick: $e,
|
|
349
|
+
disabled: U || !j.trim(),
|
|
350
|
+
className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
351
|
+
children: [U ? /* @__PURE__ */ f(be, {
|
|
352
|
+
size: 14,
|
|
353
|
+
className: "animate-spin",
|
|
354
|
+
"aria-hidden": "true"
|
|
355
|
+
}) : /* @__PURE__ */ f(he, {
|
|
356
|
+
size: 14,
|
|
357
|
+
"aria-hidden": "true"
|
|
358
|
+
}), C ? W ? g("integrations.addConnection.oneScreen.waiting", "Waiting for {{provider}}…", { provider: D.name }) : Y === "oauth2" ? g("integrations.addConnection.oneScreen.signIn", "Sign in with {{provider}}", { provider: D.name }) : g("integrations.addConnection.actions.connect", "Connect") : W ? g("integrations.addConnection.actions.waiting", "Waiting...") : g("integrations.addConnection.actions.connect", "Connect")]
|
|
359
|
+
})
|
|
360
|
+
]
|
|
281
361
|
})
|
|
282
362
|
] });
|
|
283
363
|
};
|
|
284
|
-
export {
|
|
364
|
+
export { m as ConnectionDialogPanel };
|