@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.
Files changed (62) hide show
  1. package/dist/connections/ConnectionDetailsTab.d.ts +4 -1
  2. package/dist/connections/ConnectionDetailsTab.js +18 -15
  3. package/dist/connections/ConnectionDialog.d.ts +8 -2
  4. package/dist/connections/ConnectionDialog.js +18 -17
  5. package/dist/connections/ConnectionDialogPanel.d.ts +3 -1
  6. package/dist/connections/ConnectionDialogPanel.js +141 -135
  7. package/dist/connections/ShareConnectionDialog.d.ts +23 -0
  8. package/dist/connections/ShareConnectionDialog.js +146 -0
  9. package/dist/connections/SharePanels.d.ts +32 -0
  10. package/dist/connections/SharePanels.js +158 -0
  11. package/dist/connections/VisibilityChoice.d.ts +12 -0
  12. package/dist/connections/VisibilityChoice.js +60 -0
  13. package/dist/connections/api.d.ts +12 -1
  14. package/dist/connections/api.js +1 -1
  15. package/dist/connections/connectionFlow.d.ts +6 -1
  16. package/dist/connections/connectionFlow.js +1 -1
  17. package/dist/connections/index.d.ts +4 -1
  18. package/dist/connections/sharingApi.d.ts +28 -0
  19. package/dist/connections/sharingApi.js +215 -0
  20. package/dist/connections/types.d.ts +31 -0
  21. package/dist/connections/useConnectionSharingDraft.d.ts +40 -0
  22. package/dist/connections/useConnectionSharingDraft.js +93 -0
  23. package/dist/connections.js +12 -9
  24. package/dist/shared/assistant/i18nManifest.d.ts +18 -0
  25. package/dist/shared/assistant/i18nManifest.js +18 -0
  26. package/dist/shared/assistant/index.d.ts +4 -0
  27. package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +9 -1
  28. package/dist/shared/assistant/ui/AIAssistantPanel.js +194 -174
  29. package/dist/shared/assistant/ui/AssistantChatArea.d.ts +33 -0
  30. package/dist/shared/assistant/ui/AssistantChatArea.js +1463 -1397
  31. package/dist/shared/assistant/ui/AssistantLanguageMenu.d.ts +9 -1
  32. package/dist/shared/assistant/ui/AssistantLanguageMenu.js +22 -22
  33. package/dist/shared/assistant/ui/AssistantOverlay.d.ts +16 -2
  34. package/dist/shared/assistant/ui/AssistantOverlay.js +219 -200
  35. package/dist/shared/assistant/ui/assistantOverlayState.d.ts +16 -2
  36. package/dist/shared/assistant/ui/assistantOverlayState.js +57 -40
  37. package/dist/shared/assistant/ui/compact/AssistantConversationMenu.js +53 -52
  38. package/dist/shared/assistant/ui/compact/AssistantDiscardDraftDialog.js +3 -4
  39. package/dist/shared/assistant/ui/compact/AssistantLanguagePill.d.ts +29 -0
  40. package/dist/shared/assistant/ui/compact/AssistantLanguagePill.js +98 -0
  41. package/dist/shared/assistant/ui/compact/AssistantVoiceReady.d.ts +31 -0
  42. package/dist/shared/assistant/ui/compact/AssistantVoiceReady.js +41 -0
  43. package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.d.ts +6 -0
  44. package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.js +5 -5
  45. package/dist/shared/assistant/ui/compact/AssistantWindowHeader.d.ts +22 -5
  46. package/dist/shared/assistant/ui/compact/AssistantWindowHeader.js +45 -31
  47. package/dist/shared/assistant/ui/compact/windowView.d.ts +50 -0
  48. package/dist/shared/assistant/ui/compact/windowView.js +31 -0
  49. package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +6 -0
  50. package/dist/shared/assistant/ui/composer/AssistantComposer.js +90 -89
  51. package/dist/shared/assistant/ui/composer/AssistantModeMenu.d.ts +6 -0
  52. package/dist/shared/assistant/ui/composer/AssistantModeMenu.js +83 -83
  53. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +31 -0
  54. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +270 -166
  55. package/dist/shared/assistant/ui/voice/VoiceStage.d.ts +8 -0
  56. package/dist/shared/assistant/ui/voice/VoiceStage.js +10 -10
  57. package/dist/shared/assistant/voice/voiceStartedCue.d.ts +11 -0
  58. package/dist/shared/assistant/voice/voiceStartedCue.js +7 -0
  59. package/dist/shared-assistant.js +266 -262
  60. package/dist/ui/modal-shell.d.ts +6 -1
  61. package/dist/ui/modal-shell.js +7 -6
  62. 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 { Share2 as r } from "lucide-react";
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: [/* @__PURE__ */ i("h3", {
57
- className: "text-sm font-semibold text-text-primary",
58
- children: e("integrations.addConnection.tabs.sharing", "Sharing")
59
- }), /* @__PURE__ */ a("div", {
60
- className: "rounded-md border border-border-subtle bg-accent/30 p-4 text-center",
61
- children: [/* @__PURE__ */ i(r, {
62
- size: 32,
63
- className: "mx-auto mb-2 text-text-secondary"
64
- }), /* @__PURE__ */ i("p", {
65
- className: "text-sm text-text-secondary",
66
- children: e("integrations.addConnection.sharing.placeholder", "Connection sharing settings will be available in a future update.")
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, refetchQueriesOnCreate: A, onConnectionCreated: j, onError: M, onEvent: N, renderSuccessAction: P, presentation: F = "dialog", pickerTitle: I, api: L }) => {
33
- let R = A?.join("|") ?? "", z = d(() => L ?? n(m, { refetchQueriesOnCreate: R ? R.split("|") : void 0 }), [
34
- L,
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
- R
37
- ]), B = f(null), V = f(null), H = f(null);
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: V,
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": F,
50
+ "data-presentation": I,
51
51
  style: { zIndex: a },
52
- className: e(s, r[F][T ? "form" : "notice"]),
52
+ className: e(s, r[I][T ? "form" : "notice"]),
53
53
  onOpenAutoFocus: (e) => {
54
- B.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, e.preventDefault(), (H.current ?? V.current)?.focus({ preventScroll: !0 });
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 = B.current;
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: z,
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
- pickerTitle: I,
75
- searchInputRef: H,
76
- onConnectionCreated: j,
77
- onError: M,
78
- onEvent: N,
79
- renderSuccessAction: P
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 f, X as ye } from "lucide-react";
16
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
17
- import * as g from "@radix-ui/react-dialog";
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 _(e, n) {
19
+ function g(e, n) {
20
20
  return t(a(e, i(e, n)));
21
21
  }
22
- var v = ({ api: t, onClose: v, callbackUrl: y, translate: b, providerId: x, providerKey: S, providerSource: be, requireVault: C, canCreateVault: xe, defaultName: w, extraConfig: Se, showSharingTab: Ce, pickerTitle: we, searchInputRef: Te, onConnectionCreated: Ee, onError: De, onEvent: Oe, renderSuccessAction: T }) => {
23
- let E = !!(x || S), [D, ke] = u(null), [O, k] = u(E), [A, j] = u("connection"), [M, N] = u(w ?? ""), [P, Ae] = u(""), [je, F] = u(null), [I, L] = u({}), [R, z] = u(null), [B, V] = u(s), H = pe(), U = c((e) => `${H}-${e}`, [H]), { submit: Me, busy: W, oauthWaiting: Ne, errorMessage: Pe, setErrorMessage: G, created: K } = de({
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: y,
26
- translate: b,
27
- onConnectionCreated: Ee,
28
- onError: De,
29
- onEvent: Oe
30
- }), q = c((e) => {
31
- ke(e), N(w ?? `${e.name} Connection`), F(null), L(_(e, null)), V(n(s, o(e, i(e, null)))), z(null), G("");
32
- }, [w, G]), Fe = c((e) => {
33
- if (!D) return;
34
- F(e), L(_(D, e));
35
- let t = o(D, i(D, e));
36
- V((e) => ({
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
- })), z(null), G("");
40
- }, [D, G]);
39
+ })), L(null), W("");
40
+ }, [E, W]);
41
41
  fe(() => {
42
- if (!E) return;
42
+ if (!T) return;
43
43
  let e = !1;
44
44
  return t.getProvider({
45
- id: x ?? void 0,
46
- key: S ?? void 0
45
+ id: b ?? void 0,
46
+ key: x ?? void 0
47
47
  }).then((t) => {
48
- !e && t && q(t);
48
+ !e && t && K(t);
49
49
  }).catch(() => void 0).finally(() => {
50
- e || k(!1);
50
+ e || Me(!1);
51
51
  }), () => {
52
52
  e = !0;
53
53
  };
54
54
  }, [
55
- E,
55
+ T,
56
+ b,
56
57
  x,
57
- S,
58
58
  t,
59
- q
59
+ K
60
60
  ]);
61
- let J = D ? i(D, je) : null, Ie = D ? r(D, J) : "fields", Le = l(() => D ? a(D, J) : null, [D, J]), Y = l(() => oe(J?.availableScopes ?? D?.availableScopes), [J, D]), Re = J && J.defaultScopes.length > 0 ? J.defaultScopes : D?.defaultScopes ?? [], ze = () => {
62
- D && Me({
63
- provider: D,
64
- method: J,
65
- name: M,
66
- description: P,
67
- values: I,
68
- storage: B,
69
- requireVault: C,
70
- extraConfig: Se
71
- }, se(R, Y));
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: b("integrations.addConnection.tabs.connection", "Connection"),
76
+ label: y("integrations.addConnection.tabs.connection", "Connection"),
76
77
  icon: ve
77
78
  },
78
- ...Ce ? [{
79
+ ...we ? [{
79
80
  key: "sharing",
80
- label: b("integrations.addConnection.tabs.sharing", "Sharing"),
81
- icon: f
81
+ label: y("integrations.addConnection.tabs.sharing", "Sharing"),
82
+ icon: ye
82
83
  }] : [],
83
84
  {
84
85
  key: "details",
85
- label: b("integrations.addConnection.tabs.details", "Details"),
86
+ label: y("integrations.addConnection.tabs.details", "Details"),
86
87
  icon: _e
87
88
  }
88
- ], Z = (e) => U(`tab-${e}`), Q = U("tabpanel"), Be = (e) => {
89
- let t = X.map((e) => e.key), n = t.indexOf(A), r = {
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(), j(i), document.getElementById(Z(i))?.focus();
100
- }, $ = !!D && !K;
101
- return /* @__PURE__ */ h(p, { children: [
102
- /* @__PURE__ */ h("div", {
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__ */ h("div", {
105
+ children: [/* @__PURE__ */ m("div", {
105
106
  className: "flex min-w-0 items-center gap-3",
106
- children: [D && /* @__PURE__ */ m(ne, {
107
- provider: D,
107
+ children: [E && /* @__PURE__ */ p(ne, {
108
+ provider: E,
108
109
  size: 32
109
- }), /* @__PURE__ */ h("div", {
110
+ }), /* @__PURE__ */ m("div", {
110
111
  className: "min-w-0",
111
- children: [/* @__PURE__ */ m(le, {
112
+ children: [/* @__PURE__ */ p(le, {
112
113
  id: ae,
113
- className: e("text-base font-semibold text-text-primary", D && "truncate"),
114
- children: D ? b("integrations.addConnection.dialog.accountTitle", "{{provider}} account", { provider: D.name }) : we ?? b("integrations.addConnection.dialog.title", "Add new credential")
115
- }), /* @__PURE__ */ m(g.Description, {
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: D ? te(J?.authType ?? D.authType, b) : b("integrations.addConnection.dialog.subtitle", "Select an app or service to connect to")
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__ */ m(g.Close, {
121
+ }), /* @__PURE__ */ p(h.Close, {
121
122
  asChild: !0,
122
- children: /* @__PURE__ */ m("button", {
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": b("integrations.addConnection.actions.close", "Close dialog"),
126
- children: /* @__PURE__ */ m(ye, { size: 20 })
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__ */ h("div", {
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
- !E && !D && /* @__PURE__ */ m(ue, {
135
+ !T && !E && /* @__PURE__ */ p(ue, {
135
136
  api: t,
136
- source: be,
137
- translate: b,
138
- searchInputRef: Te,
139
- onSelect: q
137
+ source: xe,
138
+ translate: y,
139
+ searchInputRef: De,
140
+ onSelect: K
140
141
  }),
141
- E && !D && O && /* @__PURE__ */ m("div", {
142
+ T && !E && D && /* @__PURE__ */ p("div", {
142
143
  className: "flex flex-1 items-center justify-center p-8",
143
- children: /* @__PURE__ */ m(d, {
144
+ children: /* @__PURE__ */ p(d, {
144
145
  size: 32,
145
146
  className: "animate-spin text-text-secondary"
146
147
  })
147
148
  }),
148
- E && !D && !O && /* @__PURE__ */ h("div", {
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__ */ m(me, {
151
+ children: [/* @__PURE__ */ p(me, {
151
152
  size: 32,
152
153
  className: "mb-3 text-text-secondary"
153
- }), /* @__PURE__ */ m("p", {
154
+ }), /* @__PURE__ */ p("p", {
154
155
  className: "text-sm text-text-secondary",
155
- children: b("integrations.addConnection.providerUnavailable", "This provider isn't available.")
156
+ children: y("integrations.addConnection.providerUnavailable", "This provider isn't available.")
156
157
  })]
157
158
  }),
158
- D && K && /* @__PURE__ */ h("div", {
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__ */ m("div", {
162
+ /* @__PURE__ */ p("div", {
162
163
  className: "mb-4 rounded-full bg-status-success-bg-subtle p-3",
163
- children: /* @__PURE__ */ m(ge, {
164
+ children: /* @__PURE__ */ p(ge, {
164
165
  size: 48,
165
166
  className: "text-status-success-text"
166
167
  })
167
168
  }),
168
- /* @__PURE__ */ m("h3", {
169
+ /* @__PURE__ */ p("h3", {
169
170
  className: "mb-1 text-lg font-semibold text-text-primary",
170
- children: b("integrations.addConnection.success.title", "Connection Created!")
171
+ children: y("integrations.addConnection.success.title", "Connection Created!")
171
172
  }),
172
- /* @__PURE__ */ m("p", {
173
+ /* @__PURE__ */ p("p", {
173
174
  className: "mb-6 text-sm text-text-secondary",
174
- children: b("integrations.addConnection.success.description", "Your {{provider}} connection has been set up successfully.", { provider: D.name })
175
+ children: y("integrations.addConnection.success.description", "Your {{provider}} connection has been set up successfully.", { provider: E.name })
175
176
  }),
176
- T ? T(K) : /* @__PURE__ */ m("button", {
177
+ w ? w(G) : /* @__PURE__ */ p("button", {
177
178
  type: "button",
178
- onClick: v,
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: b("integrations.addConnection.actions.done", "Done")
181
+ children: y("integrations.addConnection.actions.done", "Done")
181
182
  })
182
183
  ]
183
184
  }),
184
- D && $ && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
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 = A === t.key;
191
- return /* @__PURE__ */ h("button", {
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: () => j(t.key),
199
- onKeyDown: Be,
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__ */ m(n, {
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__ */ h("div", {
208
+ }), /* @__PURE__ */ m("div", {
208
209
  id: Q,
209
210
  role: "tabpanel",
210
- "aria-labelledby": Z(A),
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
- A === "connection" && /* @__PURE__ */ m(ce, {
215
+ O === "connection" && /* @__PURE__ */ p(ce, {
215
216
  api: t,
216
- provider: D,
217
- methods: ee(D),
218
- method: J,
219
- flow: Ie,
220
- schema: Le,
221
- name: M,
222
- onNameChange: N,
223
- description: P,
224
- onDescriptionChange: Ae,
225
- values: I,
226
- setValues: L,
227
- onMethodChange: Fe,
228
- storage: B,
229
- setStorage: V,
230
- supportedStorageModes: o(D, J),
231
- scopeOptions: Y,
232
- defaultScopes: Re,
233
- scopeSelection: R,
234
- setScopeSelection: z,
235
- callbackUrl: y,
236
- requireVault: C,
237
- canCreateVault: xe,
238
- errorMessage: Pe,
239
- busy: W,
240
- translate: b,
241
- fieldId: U
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
- A === "sharing" && /* @__PURE__ */ m(ie, { translate: b }),
244
- A === "details" && /* @__PURE__ */ m(re, {
245
- provider: D,
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
- D && $ && /* @__PURE__ */ h("div", {
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__ */ m("button", {
261
+ children: [/* @__PURE__ */ p("button", {
256
262
  type: "button",
257
- onClick: v,
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: b("integrations.addConnection.actions.cancel", "Cancel")
260
- }), /* @__PURE__ */ h("button", {
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: ze,
264
- disabled: W || !M.trim(),
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: [W ? /* @__PURE__ */ m(d, {
272
+ children: [U ? /* @__PURE__ */ p(d, {
267
273
  size: 14,
268
274
  className: "animate-spin",
269
275
  "aria-hidden": "true"
270
- }) : /* @__PURE__ */ m(he, {
276
+ }) : /* @__PURE__ */ p(he, {
271
277
  size: 14,
272
278
  "aria-hidden": "true"
273
- }), Ne ? b("integrations.addConnection.actions.waiting", "Waiting...") : b("integrations.addConnection.actions.connect", "Connect")]
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 { v as ConnectionDialogPanel };
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>;