@burdenoff/fe-libs 2026.1029.11 → 2026.1030.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/connections/ConnectionDetailsTab.d.ts +4 -1
- package/dist/connections/ConnectionDetailsTab.js +18 -15
- package/dist/connections/ConnectionDialog.d.ts +8 -2
- package/dist/connections/ConnectionDialog.js +18 -17
- package/dist/connections/ConnectionDialogPanel.d.ts +3 -1
- package/dist/connections/ConnectionDialogPanel.js +141 -135
- package/dist/connections/ShareConnectionDialog.d.ts +23 -0
- package/dist/connections/ShareConnectionDialog.js +146 -0
- package/dist/connections/SharePanels.d.ts +32 -0
- package/dist/connections/SharePanels.js +158 -0
- package/dist/connections/VisibilityChoice.d.ts +12 -0
- package/dist/connections/VisibilityChoice.js +60 -0
- package/dist/connections/api.d.ts +12 -1
- package/dist/connections/api.js +1 -1
- package/dist/connections/connectionFlow.d.ts +6 -1
- package/dist/connections/connectionFlow.js +1 -1
- package/dist/connections/index.d.ts +4 -1
- package/dist/connections/sharingApi.d.ts +28 -0
- package/dist/connections/sharingApi.js +215 -0
- package/dist/connections/types.d.ts +31 -0
- package/dist/connections/useConnectionSharingDraft.d.ts +40 -0
- package/dist/connections/useConnectionSharingDraft.js +93 -0
- package/dist/connections.js +12 -9
- package/dist/shared/assistant/i18nManifest.d.ts +18 -0
- package/dist/shared/assistant/i18nManifest.js +18 -0
- package/dist/shared/assistant/index.d.ts +4 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +9 -1
- package/dist/shared/assistant/ui/AIAssistantPanel.js +194 -174
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts +33 -0
- package/dist/shared/assistant/ui/AssistantChatArea.js +1463 -1397
- package/dist/shared/assistant/ui/AssistantLanguageMenu.d.ts +9 -1
- package/dist/shared/assistant/ui/AssistantLanguageMenu.js +22 -22
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts +16 -2
- package/dist/shared/assistant/ui/AssistantOverlay.js +219 -200
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts +16 -2
- package/dist/shared/assistant/ui/assistantOverlayState.js +57 -40
- package/dist/shared/assistant/ui/compact/AssistantConversationMenu.js +53 -52
- package/dist/shared/assistant/ui/compact/AssistantDiscardDraftDialog.js +3 -4
- package/dist/shared/assistant/ui/compact/AssistantLanguagePill.d.ts +29 -0
- package/dist/shared/assistant/ui/compact/AssistantLanguagePill.js +98 -0
- package/dist/shared/assistant/ui/compact/AssistantVoiceReady.d.ts +31 -0
- package/dist/shared/assistant/ui/compact/AssistantVoiceReady.js +41 -0
- package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.d.ts +6 -0
- package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.js +5 -5
- package/dist/shared/assistant/ui/compact/AssistantWindowHeader.d.ts +22 -5
- package/dist/shared/assistant/ui/compact/AssistantWindowHeader.js +45 -31
- package/dist/shared/assistant/ui/compact/windowView.d.ts +50 -0
- package/dist/shared/assistant/ui/compact/windowView.js +31 -0
- package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +6 -0
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +90 -89
- package/dist/shared/assistant/ui/composer/AssistantModeMenu.d.ts +6 -0
- package/dist/shared/assistant/ui/composer/AssistantModeMenu.js +83 -83
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +31 -0
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +270 -166
- package/dist/shared/assistant/ui/voice/VoiceStage.d.ts +8 -0
- package/dist/shared/assistant/ui/voice/VoiceStage.js +10 -10
- package/dist/shared/assistant/voice/voiceStartedCue.d.ts +11 -0
- package/dist/shared/assistant/voice/voiceStartedCue.js +7 -0
- package/dist/shared-assistant.js +266 -262
- package/dist/ui/modal-shell.d.ts +6 -1
- package/dist/ui/modal-shell.js +7 -6
- package/package.json +1 -1
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { Translator } from '../credentials/translate';
|
|
3
|
-
import { ConnectionProvider } from './types';
|
|
3
|
+
import { ConnectionProvider, ConnectionVisibility } from './types';
|
|
4
4
|
export declare const ConnectionDetailsTab: FC<{
|
|
5
5
|
provider: ConnectionProvider;
|
|
6
6
|
translate: Translator;
|
|
7
7
|
}>;
|
|
8
8
|
export declare const ConnectionSharingTab: FC<{
|
|
9
9
|
translate: Translator;
|
|
10
|
+
visibility: ConnectionVisibility;
|
|
11
|
+
onVisibilityChange: (value: ConnectionVisibility) => void;
|
|
12
|
+
idPrefix: string;
|
|
10
13
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { authTypeLabel as e, categoryLabel as t } from "./labels.js";
|
|
2
2
|
import { ProviderIcon as n } from "./ProviderIcon.js";
|
|
3
|
-
import {
|
|
3
|
+
import { VisibilityChoice as r } from "./VisibilityChoice.js";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
//#region src/connections/ConnectionDetailsTab.tsx
|
|
6
6
|
var o = ({ provider: r, translate: o }) => /* @__PURE__ */ a("div", {
|
|
@@ -51,21 +51,24 @@ var o = ({ provider: r, translate: o }) => /* @__PURE__ */ a("div", {
|
|
|
51
51
|
children: e.url
|
|
52
52
|
})] }, e.label))
|
|
53
53
|
]
|
|
54
|
-
}), s = ({ translate: e }) => /* @__PURE__ */ a("div", {
|
|
54
|
+
}), s = ({ translate: e, visibility: t, onVisibilityChange: n, idPrefix: o }) => /* @__PURE__ */ a("div", {
|
|
55
55
|
className: "space-y-4",
|
|
56
|
-
children: [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ i("h3", {
|
|
58
|
+
className: "text-sm font-semibold text-text-primary",
|
|
59
|
+
children: e("integrations.addConnection.tabs.sharing", "Sharing")
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ i(r, {
|
|
62
|
+
value: t,
|
|
63
|
+
onChange: n,
|
|
64
|
+
translate: e,
|
|
65
|
+
idPrefix: o
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ i("p", {
|
|
68
|
+
className: "text-xs text-text-secondary",
|
|
69
|
+
children: e("integrations.addConnection.sharing.later", "Once it is created, use Share on the connection to add people, groups or projects.")
|
|
70
|
+
})
|
|
71
|
+
]
|
|
69
72
|
});
|
|
70
73
|
//#endregion
|
|
71
74
|
export { o as ConnectionDetailsTab, s as ConnectionSharingTab };
|
|
@@ -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, CreatedConnection } from './types';
|
|
6
|
+
import { ConnectionDialogEvent, ConnectionVisibility, CreatedConnection } from './types';
|
|
7
7
|
export interface ConnectionDialogProps {
|
|
8
8
|
open: boolean;
|
|
9
9
|
onClose: () => void;
|
|
@@ -35,8 +35,14 @@ export interface ConnectionDialogProps {
|
|
|
35
35
|
defaultName?: string;
|
|
36
36
|
/** Settings stored on the connection, e.g. a Botlit return path. */
|
|
37
37
|
extraConfig?: Record<string, unknown>;
|
|
38
|
-
/** Show the Sharing tab. */
|
|
38
|
+
/** Show the Sharing tab, where the person chooses who can use the new connection. */
|
|
39
39
|
showSharingTab?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Who can reach the new connection unless the person changes it on the
|
|
42
|
+
* Sharing tab (BOFF-9726). Undefined leaves it to the integrations service,
|
|
43
|
+
* which makes it visible to the whole workspace.
|
|
44
|
+
*/
|
|
45
|
+
defaultVisibility?: ConnectionVisibility;
|
|
40
46
|
/** Named queries to refetch after a create, e.g. `GetConnections`. */
|
|
41
47
|
refetchQueriesOnCreate?: string[];
|
|
42
48
|
/** Called once the connection is usable. */
|
|
@@ -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: l, onClose: p, client: m, callbackUrl: y, translate: b = t, providerId: x, providerKey: S, providerSource: C = "installed", requireVault: w = !0, canCreate: T = !0, canCreateVault: E = !1, defaultName: D, extraConfig: O, showSharingTab: k = !1,
|
|
33
|
-
let
|
|
34
|
-
|
|
32
|
+
] }), y = ({ open: l, onClose: p, client: m, callbackUrl: y, translate: b = t, 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, api: R }) => {
|
|
33
|
+
let z = j?.join("|") ?? "", B = d(() => R ?? n(m, { refetchQueriesOnCreate: z ? z.split("|") : void 0 }), [
|
|
34
|
+
R,
|
|
35
35
|
m,
|
|
36
|
-
|
|
37
|
-
]),
|
|
36
|
+
z
|
|
37
|
+
]), V = f(null), H = f(null), U = f(null);
|
|
38
38
|
return /* @__PURE__ */ h(_.Root, {
|
|
39
39
|
open: l,
|
|
40
40
|
onOpenChange: (e) => !e && p(),
|
|
@@ -43,23 +43,23 @@ var v = ({ onClose: e, translate: t }) => /* @__PURE__ */ g(m, { children: [
|
|
|
43
43
|
style: { zIndex: o },
|
|
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: H,
|
|
47
47
|
"aria-modal": "true",
|
|
48
48
|
"aria-labelledby": T ? c : i,
|
|
49
49
|
"data-testid": "add-connection-dialog",
|
|
50
|
-
"data-presentation":
|
|
50
|
+
"data-presentation": I,
|
|
51
51
|
style: { zIndex: a },
|
|
52
|
-
className: e(s, r[
|
|
52
|
+
className: e(s, r[I][T ? "form" : "notice"]),
|
|
53
53
|
onOpenAutoFocus: (e) => {
|
|
54
|
-
|
|
54
|
+
V.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, e.preventDefault(), (U.current ?? H.current)?.focus({ preventScroll: !0 });
|
|
55
55
|
},
|
|
56
56
|
onCloseAutoFocus: (e) => {
|
|
57
57
|
e.preventDefault();
|
|
58
|
-
let t =
|
|
58
|
+
let t = V.current;
|
|
59
59
|
t && t.isConnected && t !== document.body && t.focus({ preventScroll: !0 });
|
|
60
60
|
},
|
|
61
61
|
children: T ? /* @__PURE__ */ h(u, {
|
|
62
|
-
api:
|
|
62
|
+
api: B,
|
|
63
63
|
onClose: p,
|
|
64
64
|
callbackUrl: y,
|
|
65
65
|
translate: b,
|
|
@@ -71,12 +71,13 @@ var v = ({ onClose: e, translate: t }) => /* @__PURE__ */ g(m, { children: [
|
|
|
71
71
|
defaultName: D,
|
|
72
72
|
extraConfig: O,
|
|
73
73
|
showSharingTab: k,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
defaultVisibility: A,
|
|
75
|
+
pickerTitle: L,
|
|
76
|
+
searchInputRef: U,
|
|
77
|
+
onConnectionCreated: M,
|
|
78
|
+
onError: N,
|
|
79
|
+
onEvent: P,
|
|
80
|
+
renderSuccessAction: F
|
|
80
81
|
}) : /* @__PURE__ */ h(v, {
|
|
81
82
|
onClose: p,
|
|
82
83
|
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 } from './types';
|
|
4
|
+
import { ConnectionDialogEvent, CreatedConnection, ConnectionVisibility } from './types';
|
|
5
5
|
export interface ConnectionDialogPanelProps {
|
|
6
6
|
api: ConnectionsApi;
|
|
7
7
|
onClose: () => void;
|
|
@@ -15,6 +15,8 @@ export interface ConnectionDialogPanelProps {
|
|
|
15
15
|
defaultName?: string;
|
|
16
16
|
extraConfig?: Record<string, unknown>;
|
|
17
17
|
showSharingTab: boolean;
|
|
18
|
+
/** Where the Sharing tab starts. Undefined leaves visibility to the service. */
|
|
19
|
+
defaultVisibility?: ConnectionVisibility;
|
|
18
20
|
pickerTitle?: string;
|
|
19
21
|
searchInputRef: RefObject<HTMLInputElement | null>;
|
|
20
22
|
onConnectionCreated?: (connection: CreatedConnection) => void;
|
|
@@ -12,81 +12,82 @@ import { DialogHeading as le } from "./DialogHeading.js";
|
|
|
12
12
|
import { ProviderPickerPanel as ue } from "./ProviderPickerPanel.js";
|
|
13
13
|
import { useConnectionSubmit as de } from "./useConnectionSubmit.js";
|
|
14
14
|
import { useCallback as c, useEffect as fe, useId as pe, useMemo as l, useState as u } from "react";
|
|
15
|
-
import { AlertCircle as me, Check as he, CheckCircle2 as ge, Info as _e, Link2 as ve, Loader2 as d, Share2 as
|
|
16
|
-
import { Fragment as
|
|
17
|
-
import * as
|
|
15
|
+
import { AlertCircle as me, Check as he, CheckCircle2 as ge, Info as _e, Link2 as ve, Loader2 as d, Share2 as ye, X as be } from "lucide-react";
|
|
16
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
17
|
+
import * as h from "@radix-ui/react-dialog";
|
|
18
18
|
//#region src/connections/ConnectionDialogPanel.tsx
|
|
19
|
-
function
|
|
19
|
+
function g(e, n) {
|
|
20
20
|
return t(a(e, i(e, n)));
|
|
21
21
|
}
|
|
22
|
-
var
|
|
23
|
-
let
|
|
22
|
+
var _ = ({ api: t, onClose: _, callbackUrl: v, translate: y, providerId: b, providerKey: x, providerSource: xe, requireVault: S, canCreateVault: Se, defaultName: C, extraConfig: Ce, showSharingTab: we, defaultVisibility: Te, pickerTitle: Ee, searchInputRef: De, onConnectionCreated: Oe, onError: ke, onEvent: Ae, renderSuccessAction: w }) => {
|
|
23
|
+
let T = !!(b || x), [E, je] = u(null), [D, Me] = u(T), [O, k] = u("connection"), [A, j] = u(C ?? ""), [M, Ne] = u(""), [Pe, N] = u(null), [P, F] = u({}), [I, L] = u(null), [R, z] = u(s), [B, Fe] = u(Te), V = pe(), H = c((e) => `${V}-${e}`, [V]), { submit: Ie, busy: U, oauthWaiting: Le, errorMessage: Re, setErrorMessage: W, created: G } = de({
|
|
24
24
|
api: t,
|
|
25
|
-
callbackUrl:
|
|
26
|
-
translate:
|
|
27
|
-
onConnectionCreated:
|
|
28
|
-
onError:
|
|
29
|
-
onEvent:
|
|
30
|
-
}),
|
|
31
|
-
|
|
32
|
-
}, [
|
|
33
|
-
if (!
|
|
34
|
-
|
|
35
|
-
let t = o(
|
|
36
|
-
|
|
25
|
+
callbackUrl: v,
|
|
26
|
+
translate: y,
|
|
27
|
+
onConnectionCreated: Oe,
|
|
28
|
+
onError: ke,
|
|
29
|
+
onEvent: Ae
|
|
30
|
+
}), K = c((e) => {
|
|
31
|
+
je(e), j(C ?? `${e.name} Connection`), N(null), F(g(e, null)), z(n(s, o(e, i(e, null)))), L(null), W("");
|
|
32
|
+
}, [C, W]), ze = c((e) => {
|
|
33
|
+
if (!E) return;
|
|
34
|
+
N(e), F(g(E, e));
|
|
35
|
+
let t = o(E, i(E, e));
|
|
36
|
+
z((e) => ({
|
|
37
37
|
...n(e, t),
|
|
38
38
|
secretId: ""
|
|
39
|
-
})),
|
|
40
|
-
}, [
|
|
39
|
+
})), L(null), W("");
|
|
40
|
+
}, [E, W]);
|
|
41
41
|
fe(() => {
|
|
42
|
-
if (!
|
|
42
|
+
if (!T) return;
|
|
43
43
|
let e = !1;
|
|
44
44
|
return t.getProvider({
|
|
45
|
-
id:
|
|
46
|
-
key:
|
|
45
|
+
id: b ?? void 0,
|
|
46
|
+
key: x ?? void 0
|
|
47
47
|
}).then((t) => {
|
|
48
|
-
!e && t &&
|
|
48
|
+
!e && t && K(t);
|
|
49
49
|
}).catch(() => void 0).finally(() => {
|
|
50
|
-
e ||
|
|
50
|
+
e || Me(!1);
|
|
51
51
|
}), () => {
|
|
52
52
|
e = !0;
|
|
53
53
|
};
|
|
54
54
|
}, [
|
|
55
|
-
|
|
55
|
+
T,
|
|
56
|
+
b,
|
|
56
57
|
x,
|
|
57
|
-
S,
|
|
58
58
|
t,
|
|
59
|
-
|
|
59
|
+
K
|
|
60
60
|
]);
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
provider:
|
|
64
|
-
method:
|
|
65
|
-
name:
|
|
66
|
-
description:
|
|
67
|
-
values:
|
|
68
|
-
storage:
|
|
69
|
-
requireVault:
|
|
70
|
-
extraConfig:
|
|
71
|
-
|
|
61
|
+
let q = E ? i(E, Pe) : null, Be = E ? r(E, q) : "fields", Ve = l(() => E ? a(E, q) : null, [E, q]), J = l(() => oe(q?.availableScopes ?? E?.availableScopes), [q, E]), Y = q && q.defaultScopes.length > 0 ? q.defaultScopes : E?.defaultScopes ?? [], He = () => {
|
|
62
|
+
E && Ie({
|
|
63
|
+
provider: E,
|
|
64
|
+
method: q,
|
|
65
|
+
name: A,
|
|
66
|
+
description: M,
|
|
67
|
+
values: P,
|
|
68
|
+
storage: R,
|
|
69
|
+
requireVault: S,
|
|
70
|
+
extraConfig: Ce,
|
|
71
|
+
visibility: B
|
|
72
|
+
}, se(I, J));
|
|
72
73
|
}, X = [
|
|
73
74
|
{
|
|
74
75
|
key: "connection",
|
|
75
|
-
label:
|
|
76
|
+
label: y("integrations.addConnection.tabs.connection", "Connection"),
|
|
76
77
|
icon: ve
|
|
77
78
|
},
|
|
78
|
-
...
|
|
79
|
+
...we ? [{
|
|
79
80
|
key: "sharing",
|
|
80
|
-
label:
|
|
81
|
-
icon:
|
|
81
|
+
label: y("integrations.addConnection.tabs.sharing", "Sharing"),
|
|
82
|
+
icon: ye
|
|
82
83
|
}] : [],
|
|
83
84
|
{
|
|
84
85
|
key: "details",
|
|
85
|
-
label:
|
|
86
|
+
label: y("integrations.addConnection.tabs.details", "Details"),
|
|
86
87
|
icon: _e
|
|
87
88
|
}
|
|
88
|
-
], Z = (e) =>
|
|
89
|
-
let t = X.map((e) => e.key), n = t.indexOf(
|
|
89
|
+
], Z = (e) => H(`tab-${e}`), Q = H("tabpanel"), Ue = (e) => {
|
|
90
|
+
let t = X.map((e) => e.key), n = t.indexOf(O), r = {
|
|
90
91
|
ArrowRight: n + 1,
|
|
91
92
|
ArrowDown: n + 1,
|
|
92
93
|
ArrowLeft: n - 1,
|
|
@@ -96,184 +97,189 @@ var v = ({ api: t, onClose: v, callbackUrl: y, translate: b, providerId: x, prov
|
|
|
96
97
|
}[e.key];
|
|
97
98
|
if (r === void 0) return;
|
|
98
99
|
let i = t[(r + t.length) % t.length];
|
|
99
|
-
e.preventDefault(),
|
|
100
|
-
}, $ = !!
|
|
101
|
-
return /* @__PURE__ */
|
|
102
|
-
/* @__PURE__ */
|
|
100
|
+
e.preventDefault(), k(i), document.getElementById(Z(i))?.focus();
|
|
101
|
+
}, $ = !!E && !G;
|
|
102
|
+
return /* @__PURE__ */ m(f, { children: [
|
|
103
|
+
/* @__PURE__ */ m("div", {
|
|
103
104
|
className: "flex flex-shrink-0 items-center justify-between border-b border-border-subtle px-5 py-4",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
105
|
+
children: [/* @__PURE__ */ m("div", {
|
|
105
106
|
className: "flex min-w-0 items-center gap-3",
|
|
106
|
-
children: [
|
|
107
|
-
provider:
|
|
107
|
+
children: [E && /* @__PURE__ */ p(ne, {
|
|
108
|
+
provider: E,
|
|
108
109
|
size: 32
|
|
109
|
-
}), /* @__PURE__ */
|
|
110
|
+
}), /* @__PURE__ */ m("div", {
|
|
110
111
|
className: "min-w-0",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
112
|
+
children: [/* @__PURE__ */ p(le, {
|
|
112
113
|
id: ae,
|
|
113
|
-
className: e("text-base font-semibold text-text-primary",
|
|
114
|
-
children:
|
|
115
|
-
}), /* @__PURE__ */
|
|
114
|
+
className: e("text-base font-semibold text-text-primary", E && "truncate"),
|
|
115
|
+
children: E ? y("integrations.addConnection.dialog.accountTitle", "{{provider}} account", { provider: E.name }) : Ee ?? y("integrations.addConnection.dialog.title", "Add new credential")
|
|
116
|
+
}), /* @__PURE__ */ p(h.Description, {
|
|
116
117
|
className: "text-xs text-text-secondary",
|
|
117
|
-
children:
|
|
118
|
+
children: E ? te(q?.authType ?? E.authType, y) : y("integrations.addConnection.dialog.subtitle", "Select an app or service to connect to")
|
|
118
119
|
})]
|
|
119
120
|
})]
|
|
120
|
-
}), /* @__PURE__ */
|
|
121
|
+
}), /* @__PURE__ */ p(h.Close, {
|
|
121
122
|
asChild: !0,
|
|
122
|
-
children: /* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ p("button", {
|
|
123
124
|
type: "button",
|
|
124
125
|
className: "flex-shrink-0 rounded-md p-1.5 text-text-secondary transition-colors hover:bg-accent hover:text-text-primary",
|
|
125
|
-
"aria-label":
|
|
126
|
-
children: /* @__PURE__ */
|
|
126
|
+
"aria-label": y("integrations.addConnection.actions.close", "Close dialog"),
|
|
127
|
+
children: /* @__PURE__ */ p(be, { size: 20 })
|
|
127
128
|
})
|
|
128
129
|
})]
|
|
129
130
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ m("div", {
|
|
131
132
|
"data-testid": "add-connection-body",
|
|
132
133
|
className: "flex min-h-0 flex-1 flex-col overflow-hidden sm:flex-row",
|
|
133
134
|
children: [
|
|
134
|
-
!
|
|
135
|
+
!T && !E && /* @__PURE__ */ p(ue, {
|
|
135
136
|
api: t,
|
|
136
|
-
source:
|
|
137
|
-
translate:
|
|
138
|
-
searchInputRef:
|
|
139
|
-
onSelect:
|
|
137
|
+
source: xe,
|
|
138
|
+
translate: y,
|
|
139
|
+
searchInputRef: De,
|
|
140
|
+
onSelect: K
|
|
140
141
|
}),
|
|
141
|
-
|
|
142
|
+
T && !E && D && /* @__PURE__ */ p("div", {
|
|
142
143
|
className: "flex flex-1 items-center justify-center p-8",
|
|
143
|
-
children: /* @__PURE__ */
|
|
144
|
+
children: /* @__PURE__ */ p(d, {
|
|
144
145
|
size: 32,
|
|
145
146
|
className: "animate-spin text-text-secondary"
|
|
146
147
|
})
|
|
147
148
|
}),
|
|
148
|
-
|
|
149
|
+
T && !E && !D && /* @__PURE__ */ m("div", {
|
|
149
150
|
className: "flex flex-1 flex-col items-center justify-center p-8 text-center",
|
|
150
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ p(me, {
|
|
151
152
|
size: 32,
|
|
152
153
|
className: "mb-3 text-text-secondary"
|
|
153
|
-
}), /* @__PURE__ */
|
|
154
|
+
}), /* @__PURE__ */ p("p", {
|
|
154
155
|
className: "text-sm text-text-secondary",
|
|
155
|
-
children:
|
|
156
|
+
children: y("integrations.addConnection.providerUnavailable", "This provider isn't available.")
|
|
156
157
|
})]
|
|
157
158
|
}),
|
|
158
|
-
|
|
159
|
+
E && G && /* @__PURE__ */ m("div", {
|
|
159
160
|
className: "flex flex-1 flex-col items-center justify-center p-8 text-center",
|
|
160
161
|
children: [
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ p("div", {
|
|
162
163
|
className: "mb-4 rounded-full bg-status-success-bg-subtle p-3",
|
|
163
|
-
children: /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ p(ge, {
|
|
164
165
|
size: 48,
|
|
165
166
|
className: "text-status-success-text"
|
|
166
167
|
})
|
|
167
168
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ p("h3", {
|
|
169
170
|
className: "mb-1 text-lg font-semibold text-text-primary",
|
|
170
|
-
children:
|
|
171
|
+
children: y("integrations.addConnection.success.title", "Connection Created!")
|
|
171
172
|
}),
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ p("p", {
|
|
173
174
|
className: "mb-6 text-sm text-text-secondary",
|
|
174
|
-
children:
|
|
175
|
+
children: y("integrations.addConnection.success.description", "Your {{provider}} connection has been set up successfully.", { provider: E.name })
|
|
175
176
|
}),
|
|
176
|
-
|
|
177
|
+
w ? w(G) : /* @__PURE__ */ p("button", {
|
|
177
178
|
type: "button",
|
|
178
|
-
onClick:
|
|
179
|
+
onClick: _,
|
|
179
180
|
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",
|
|
180
|
-
children:
|
|
181
|
+
children: y("integrations.addConnection.actions.done", "Done")
|
|
181
182
|
})
|
|
182
183
|
]
|
|
183
184
|
}),
|
|
184
|
-
|
|
185
|
+
E && $ && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
|
|
185
186
|
role: "tablist",
|
|
186
187
|
"aria-labelledby": "add-connection-dialog-title",
|
|
187
188
|
"data-testid": "add-connection-tabs",
|
|
188
189
|
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-r sm:py-3",
|
|
189
190
|
children: X.map((t) => {
|
|
190
|
-
let n = t.icon, r =
|
|
191
|
-
return /* @__PURE__ */
|
|
191
|
+
let n = t.icon, r = O === t.key;
|
|
192
|
+
return /* @__PURE__ */ m("button", {
|
|
192
193
|
id: Z(t.key),
|
|
193
194
|
type: "button",
|
|
194
195
|
role: "tab",
|
|
195
196
|
"aria-selected": r,
|
|
196
197
|
"aria-controls": Q,
|
|
197
198
|
tabIndex: r ? 0 : -1,
|
|
198
|
-
onClick: () =>
|
|
199
|
-
onKeyDown:
|
|
199
|
+
onClick: () => k(t.key),
|
|
200
|
+
onKeyDown: Ue,
|
|
200
201
|
className: e("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-l-2", r ? "border-primary bg-accent/50 text-text-primary" : "border-transparent text-text-secondary hover:bg-accent/30 hover:text-text-primary"),
|
|
201
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ p(n, {
|
|
202
203
|
size: 16,
|
|
203
204
|
"aria-hidden": "true"
|
|
204
205
|
}), t.label]
|
|
205
206
|
}, t.key);
|
|
206
207
|
})
|
|
207
|
-
}), /* @__PURE__ */
|
|
208
|
+
}), /* @__PURE__ */ m("div", {
|
|
208
209
|
id: Q,
|
|
209
210
|
role: "tabpanel",
|
|
210
|
-
"aria-labelledby": Z(
|
|
211
|
+
"aria-labelledby": Z(O),
|
|
211
212
|
"data-testid": "add-connection-pane",
|
|
212
213
|
className: "min-h-0 min-w-0 flex-1 overflow-y-auto p-5",
|
|
213
214
|
children: [
|
|
214
|
-
|
|
215
|
+
O === "connection" && /* @__PURE__ */ p(ce, {
|
|
215
216
|
api: t,
|
|
216
|
-
provider:
|
|
217
|
-
methods: ee(
|
|
218
|
-
method:
|
|
219
|
-
flow:
|
|
220
|
-
schema:
|
|
221
|
-
name:
|
|
222
|
-
onNameChange:
|
|
223
|
-
description:
|
|
224
|
-
onDescriptionChange:
|
|
225
|
-
values:
|
|
226
|
-
setValues:
|
|
227
|
-
onMethodChange:
|
|
228
|
-
storage:
|
|
229
|
-
setStorage:
|
|
230
|
-
supportedStorageModes: o(
|
|
231
|
-
scopeOptions:
|
|
232
|
-
defaultScopes:
|
|
233
|
-
scopeSelection:
|
|
234
|
-
setScopeSelection:
|
|
235
|
-
callbackUrl:
|
|
236
|
-
requireVault:
|
|
237
|
-
canCreateVault:
|
|
238
|
-
errorMessage:
|
|
239
|
-
busy:
|
|
240
|
-
translate:
|
|
241
|
-
fieldId:
|
|
217
|
+
provider: E,
|
|
218
|
+
methods: ee(E),
|
|
219
|
+
method: q,
|
|
220
|
+
flow: Be,
|
|
221
|
+
schema: Ve,
|
|
222
|
+
name: A,
|
|
223
|
+
onNameChange: j,
|
|
224
|
+
description: M,
|
|
225
|
+
onDescriptionChange: Ne,
|
|
226
|
+
values: P,
|
|
227
|
+
setValues: F,
|
|
228
|
+
onMethodChange: ze,
|
|
229
|
+
storage: R,
|
|
230
|
+
setStorage: z,
|
|
231
|
+
supportedStorageModes: o(E, q),
|
|
232
|
+
scopeOptions: J,
|
|
233
|
+
defaultScopes: Y,
|
|
234
|
+
scopeSelection: I,
|
|
235
|
+
setScopeSelection: L,
|
|
236
|
+
callbackUrl: v,
|
|
237
|
+
requireVault: S,
|
|
238
|
+
canCreateVault: Se,
|
|
239
|
+
errorMessage: Re,
|
|
240
|
+
busy: U,
|
|
241
|
+
translate: y,
|
|
242
|
+
fieldId: H
|
|
243
|
+
}),
|
|
244
|
+
O === "sharing" && /* @__PURE__ */ p(ie, {
|
|
245
|
+
translate: y,
|
|
246
|
+
visibility: B ?? "WORKSPACE",
|
|
247
|
+
onVisibilityChange: Fe,
|
|
248
|
+
idPrefix: V
|
|
242
249
|
}),
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
translate: b
|
|
250
|
+
O === "details" && /* @__PURE__ */ p(re, {
|
|
251
|
+
provider: E,
|
|
252
|
+
translate: y
|
|
247
253
|
})
|
|
248
254
|
]
|
|
249
255
|
})] })
|
|
250
256
|
]
|
|
251
257
|
}),
|
|
252
|
-
|
|
258
|
+
E && $ && /* @__PURE__ */ m("div", {
|
|
253
259
|
"data-testid": "add-connection-footer",
|
|
254
260
|
className: "flex flex-shrink-0 items-center justify-end gap-2 border-t border-border-subtle px-5 py-3",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
261
|
+
children: [/* @__PURE__ */ p("button", {
|
|
256
262
|
type: "button",
|
|
257
|
-
onClick:
|
|
263
|
+
onClick: _,
|
|
258
264
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-accent",
|
|
259
|
-
children:
|
|
260
|
-
}), /* @__PURE__ */
|
|
265
|
+
children: y("integrations.addConnection.actions.cancel", "Cancel")
|
|
266
|
+
}), /* @__PURE__ */ m("button", {
|
|
261
267
|
type: "button",
|
|
262
268
|
"data-testid": "add-connection-submit",
|
|
263
|
-
onClick:
|
|
264
|
-
disabled:
|
|
269
|
+
onClick: He,
|
|
270
|
+
disabled: U || !A.trim(),
|
|
265
271
|
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",
|
|
266
|
-
children: [
|
|
272
|
+
children: [U ? /* @__PURE__ */ p(d, {
|
|
267
273
|
size: 14,
|
|
268
274
|
className: "animate-spin",
|
|
269
275
|
"aria-hidden": "true"
|
|
270
|
-
}) : /* @__PURE__ */
|
|
276
|
+
}) : /* @__PURE__ */ p(he, {
|
|
271
277
|
size: 14,
|
|
272
278
|
"aria-hidden": "true"
|
|
273
|
-
}),
|
|
279
|
+
}), Le ? y("integrations.addConnection.actions.waiting", "Waiting...") : y("integrations.addConnection.actions.connect", "Connect")]
|
|
274
280
|
})]
|
|
275
281
|
})
|
|
276
282
|
] });
|
|
277
283
|
};
|
|
278
284
|
//#endregion
|
|
279
|
-
export {
|
|
285
|
+
export { _ as ConnectionDialogPanel };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ApolloClient } from '@apollo/client';
|
|
3
|
+
import { Translator } from '../credentials/translate';
|
|
4
|
+
import { ConnectionSharingApi } from './sharingApi';
|
|
5
|
+
import { ConnectionSharing } from './types';
|
|
6
|
+
export interface ShareConnectionDialogProps {
|
|
7
|
+
open: boolean;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
/** The host's Apollo client, pointed at the workspace gateway. */
|
|
10
|
+
client: ApolloClient;
|
|
11
|
+
/** The connection to share; nothing loads while it is null. */
|
|
12
|
+
connectionId: string | null;
|
|
13
|
+
/** The current workspace, whose members, groups and projects can be chosen. */
|
|
14
|
+
workspaceId: string;
|
|
15
|
+
/** Host translator; English when omitted. */
|
|
16
|
+
translate?: Translator;
|
|
17
|
+
/** Called with the saved sharing. */
|
|
18
|
+
onShared?: (sharing: ConnectionSharing) => void;
|
|
19
|
+
/** Test seam: supply the service directly instead of via `client`. */
|
|
20
|
+
api?: ConnectionSharingApi;
|
|
21
|
+
}
|
|
22
|
+
export declare const SHARE_TITLE_ID = "share-connection-dialog-title";
|
|
23
|
+
export declare const ShareConnectionDialog: FC<ShareConnectionDialogProps>;
|