@burdenoff/fe-libs 2026.930.3 → 2026.930.5

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 (97) hide show
  1. package/dist/chrome/globalSearch/AdvancedFiltersPanel.js +2 -2
  2. package/dist/chrome/notificationCenter/NotificationFilters.js +1 -1
  3. package/dist/connections/ConnectionDetailsTab.d.ts +11 -0
  4. package/dist/connections/ConnectionDetailsTab.d.ts.map +1 -0
  5. package/dist/connections/ConnectionDetailsTab.js +71 -0
  6. package/dist/connections/ConnectionDialog.d.ts +57 -0
  7. package/dist/connections/ConnectionDialog.d.ts.map +1 -0
  8. package/dist/connections/ConnectionDialog.js +88 -0
  9. package/dist/connections/ConnectionDialogPanel.d.ts +26 -0
  10. package/dist/connections/ConnectionDialogPanel.d.ts.map +1 -0
  11. package/dist/connections/ConnectionDialogPanel.js +272 -0
  12. package/dist/connections/ConnectionFormTab.d.ts +37 -0
  13. package/dist/connections/ConnectionFormTab.d.ts.map +1 -0
  14. package/dist/connections/ConnectionFormTab.js +185 -0
  15. package/dist/connections/CredentialStorageSelector.d.ts +19 -0
  16. package/dist/connections/CredentialStorageSelector.d.ts.map +1 -0
  17. package/dist/connections/CredentialStorageSelector.js +294 -0
  18. package/dist/connections/DialogHeading.d.ts +7 -0
  19. package/dist/connections/DialogHeading.d.ts.map +1 -0
  20. package/dist/connections/DialogHeading.js +16 -0
  21. package/dist/connections/ProviderIcon.d.ts +10 -0
  22. package/dist/connections/ProviderIcon.d.ts.map +1 -0
  23. package/dist/connections/ProviderIcon.js +57 -0
  24. package/dist/connections/ProviderPickerPanel.d.ts +15 -0
  25. package/dist/connections/ProviderPickerPanel.d.ts.map +1 -0
  26. package/dist/connections/ProviderPickerPanel.js +84 -0
  27. package/dist/connections/ScopePicker.d.ts +15 -0
  28. package/dist/connections/ScopePicker.d.ts.map +1 -0
  29. package/dist/connections/ScopePicker.js +38 -0
  30. package/dist/connections/api.d.ts +60 -0
  31. package/dist/connections/api.d.ts.map +1 -0
  32. package/dist/connections/api.js +259 -0
  33. package/dist/connections/assets/bigconsole.png.js +4 -0
  34. package/dist/connections/assets/burdenoff.png.js +4 -0
  35. package/dist/connections/connectionFlow.d.ts +81 -0
  36. package/dist/connections/connectionFlow.d.ts.map +1 -0
  37. package/dist/connections/connectionFlow.js +101 -0
  38. package/dist/connections/frame.d.ts +32 -0
  39. package/dist/connections/frame.d.ts.map +1 -0
  40. package/dist/connections/frame.js +13 -0
  41. package/dist/connections/index.d.ts +24 -0
  42. package/dist/connections/index.d.ts.map +1 -0
  43. package/dist/connections/labels.d.ts +5 -0
  44. package/dist/connections/labels.d.ts.map +1 -0
  45. package/dist/connections/labels.js +35 -0
  46. package/dist/connections/oauthPopup.d.ts +48 -0
  47. package/dist/connections/oauthPopup.d.ts.map +1 -0
  48. package/dist/connections/oauthPopup.js +70 -0
  49. package/dist/connections/picker.d.ts +7 -0
  50. package/dist/connections/picker.d.ts.map +1 -0
  51. package/dist/connections/picker.js +16 -0
  52. package/dist/connections/providerIdentity.d.ts +23 -0
  53. package/dist/connections/providerIdentity.d.ts.map +1 -0
  54. package/dist/connections/providerIdentity.js +175 -0
  55. package/dist/connections/scopes.d.ts +42 -0
  56. package/dist/connections/scopes.d.ts.map +1 -0
  57. package/dist/connections/scopes.js +30 -0
  58. package/dist/connections/storage.d.ts +8 -0
  59. package/dist/connections/storage.d.ts.map +1 -0
  60. package/dist/connections/storage.js +21 -0
  61. package/dist/connections/types.d.ts +82 -0
  62. package/dist/connections/types.d.ts.map +1 -0
  63. package/dist/connections/useConnectionSubmit.d.ts +22 -0
  64. package/dist/connections/useConnectionSubmit.d.ts.map +1 -0
  65. package/dist/connections/useConnectionSubmit.js +99 -0
  66. package/dist/connections.d.ts +2 -0
  67. package/dist/connections.js +14 -0
  68. package/dist/credentials/AuthMethodSelector.d.ts +4 -0
  69. package/dist/credentials/AuthMethodSelector.d.ts.map +1 -1
  70. package/dist/credentials/AuthMethodSelector.js +42 -33
  71. package/dist/credentials/SchemaForm.d.ts +3 -28
  72. package/dist/credentials/SchemaForm.d.ts.map +1 -1
  73. package/dist/credentials/SchemaForm.js +116 -162
  74. package/dist/credentials/index.d.ts +5 -2
  75. package/dist/credentials/index.d.ts.map +1 -1
  76. package/dist/credentials/methods.d.ts +11 -0
  77. package/dist/credentials/methods.d.ts.map +1 -0
  78. package/dist/credentials/methods.js +6 -0
  79. package/dist/credentials/schema.d.ts +43 -0
  80. package/dist/credentials/schema.d.ts.map +1 -0
  81. package/dist/credentials/schema.js +56 -0
  82. package/dist/credentials/translate.d.ts +18 -0
  83. package/dist/credentials/translate.d.ts.map +1 -0
  84. package/dist/credentials/translate.js +7 -0
  85. package/dist/credentials/types.d.ts +1 -1
  86. package/dist/credentials.js +6 -3
  87. package/dist/shared/assistant/ui/AssistantLanguageMenu.js +2 -2
  88. package/dist/shared/assistant/ui/AssistantReplyLanguageSelector.js +1 -1
  89. package/dist/shared/assistant/ui/composer/AssistantLanguageSelector.js +1 -1
  90. package/dist/shared/assistant/ui/composer/AssistantVoiceSelector.js +1 -1
  91. package/dist/shared/assistant/writeReplyBinder.d.ts +1 -1
  92. package/dist/shared/pages/searchPage/FiltersPanel.js +1 -1
  93. package/dist/shared/pages/searchPage/SearchToolbar.js +1 -1
  94. package/dist/sharing/ShareDialog.js +2 -2
  95. package/dist/storage/StorageFolderPicker.js +1 -1
  96. package/package.json +11 -2
  97. package/src/shared/tokens/build/semantic.css +131 -0
@@ -0,0 +1,185 @@
1
+ import { SchemaForm as e } from "../credentials/SchemaForm.js";
2
+ import { AuthMethodNotice as t, AuthMethodSelector as n } from "../credentials/AuthMethodSelector.js";
3
+ import { collectsOwnClientId as r, needsCredentialStorage as i } from "./connectionFlow.js";
4
+ import { authTypeLabel as a } from "./labels.js";
5
+ import { CredentialStorageSelector as o } from "./CredentialStorageSelector.js";
6
+ import { INPUT_CLASS as s } from "./frame.js";
7
+ import { ScopePicker as c } from "./ScopePicker.js";
8
+ import { useState as l } from "react";
9
+ import { AlertCircle as u, Copy as d, ExternalLink as f, Shield as p } from "lucide-react";
10
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
11
+ //#region src/connections/ConnectionFormTab.tsx
12
+ var g = ({ api: g, provider: _, methods: v, method: y, flow: b, schema: x, name: S, onNameChange: C, description: w, onDescriptionChange: T, values: E, setValues: D, onMethodChange: O, storage: k, setStorage: A, scopeOptions: j, defaultScopes: M, scopeSelection: N, setScopeSelection: P, callbackUrl: F, requireVault: I, canCreateVault: L, errorMessage: R, busy: z, translate: B, fieldId: V }) => {
13
+ let [H, U] = l(!1);
14
+ return /* @__PURE__ */ h("div", {
15
+ className: "space-y-5",
16
+ children: [
17
+ R && /* @__PURE__ */ h("div", {
18
+ role: "alert",
19
+ className: "flex items-start gap-2 rounded-md border border-status-error-border/20 bg-status-error-bg/10 px-3 py-2",
20
+ children: [/* @__PURE__ */ m(u, {
21
+ size: 16,
22
+ className: "mt-0.5 flex-shrink-0 text-status-error-text"
23
+ }), /* @__PURE__ */ m("span", {
24
+ className: "text-sm text-status-error-text",
25
+ children: R
26
+ })]
27
+ }),
28
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
29
+ htmlFor: V("name"),
30
+ className: "mb-1.5 block text-sm font-medium text-text-primary",
31
+ children: [
32
+ B("integrations.addConnection.fields.connectionName", "Connection Name"),
33
+ " ",
34
+ /* @__PURE__ */ m("span", {
35
+ className: "text-status-error-text",
36
+ children: "*"
37
+ })
38
+ ]
39
+ }), /* @__PURE__ */ m("input", {
40
+ id: V("name"),
41
+ type: "text",
42
+ value: S,
43
+ onChange: (e) => C(e.target.value),
44
+ placeholder: B("integrations.addConnection.fields.connectionNamePlaceholder", "e.g., My {{provider}} Connection", { provider: _.name }),
45
+ disabled: z,
46
+ className: s
47
+ })] }),
48
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
49
+ htmlFor: V("description"),
50
+ className: "mb-1.5 block text-sm font-medium text-text-primary",
51
+ children: B("integrations.addConnection.fields.description", "Description")
52
+ }), /* @__PURE__ */ m("input", {
53
+ id: V("description"),
54
+ type: "text",
55
+ value: w,
56
+ onChange: (e) => T(e.target.value),
57
+ placeholder: B("integrations.addConnection.fields.descriptionPlaceholder", "Optional description..."),
58
+ disabled: z,
59
+ className: s
60
+ })] }),
61
+ i(b, _) && /* @__PURE__ */ m(o, {
62
+ api: g,
63
+ value: k,
64
+ onChange: A,
65
+ authType: y?.authType ?? _.authType,
66
+ requireVault: I,
67
+ canCreateVault: L,
68
+ translate: B,
69
+ disabled: z
70
+ }),
71
+ /* @__PURE__ */ h("div", {
72
+ className: "space-y-3 rounded-md border border-border-subtle/50 bg-bg-surface p-4",
73
+ children: [
74
+ /* @__PURE__ */ h("div", {
75
+ className: "flex items-center justify-between gap-3",
76
+ children: [/* @__PURE__ */ h("h3", {
77
+ className: "flex items-center gap-2 text-sm font-medium text-text-primary",
78
+ children: [
79
+ /* @__PURE__ */ m(p, {
80
+ size: 16,
81
+ className: "text-primary"
82
+ }),
83
+ B("integrations.addConnection.authentication.title", "Authentication"),
84
+ v.length <= 1 && /* @__PURE__ */ h("span", {
85
+ className: "font-normal text-text-secondary",
86
+ children: ["· ", y?.displayName ?? a(_.authType, B)]
87
+ })
88
+ ]
89
+ }), /* @__PURE__ */ m(n, {
90
+ methods: v,
91
+ selectedKey: y?.key ?? null,
92
+ onSelect: O,
93
+ disabled: z,
94
+ idPrefix: V("auth-method"),
95
+ translate: B,
96
+ compact: !0
97
+ })]
98
+ }),
99
+ /* @__PURE__ */ m("div", {
100
+ className: "space-y-2",
101
+ children: /* @__PURE__ */ m(t, {
102
+ method: y,
103
+ translate: B
104
+ })
105
+ }),
106
+ b === "fields" && !x && /* @__PURE__ */ h("div", {
107
+ className: "flex items-center gap-2 rounded-md border border-border-default bg-status-error-bg-subtle px-3 py-2",
108
+ children: [/* @__PURE__ */ m(u, {
109
+ size: 16,
110
+ className: "flex-shrink-0 text-status-error-text"
111
+ }), /* @__PURE__ */ m("span", {
112
+ className: "text-sm text-status-error-text",
113
+ children: B("integrations.addConnection.authentication.noForm", "This authentication method does not declare a configuration form.")
114
+ })]
115
+ }),
116
+ b === "fields" && x && /* @__PURE__ */ m("p", {
117
+ className: "text-xs text-text-secondary",
118
+ children: B("integrations.addConnection.authentication.secretsEncrypted", "Secret values are stored encrypted and never shown again.")
119
+ }),
120
+ b !== "minted" && x && /* @__PURE__ */ m(e, {
121
+ schema: x,
122
+ values: E,
123
+ onChange: D,
124
+ disabled: z,
125
+ idPrefix: V("credential"),
126
+ translate: B
127
+ }),
128
+ b === "oauth2" && r(x) && /* @__PURE__ */ h("div", {
129
+ className: "space-y-1.5 rounded-md border border-border-subtle bg-bg-surface px-3 py-2",
130
+ children: [/* @__PURE__ */ h("div", {
131
+ className: "flex items-center justify-between gap-2",
132
+ children: [/* @__PURE__ */ m("span", {
133
+ className: "text-xs font-medium text-text-primary",
134
+ children: B("integrations.addConnection.authentication.redirectUriLabel", "Redirect URL to register in your app")
135
+ }), /* @__PURE__ */ h("button", {
136
+ type: "button",
137
+ onClick: () => {
138
+ navigator.clipboard?.writeText(F).then(() => {
139
+ U(!0), window.setTimeout(() => U(!1), 2e3);
140
+ }).catch(() => void 0);
141
+ },
142
+ className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",
143
+ children: [/* @__PURE__ */ m(d, { size: 12 }), H ? B("integrations.addConnection.authentication.copied", "Copied") : B("integrations.addConnection.authentication.copy", "Copy")]
144
+ })]
145
+ }), /* @__PURE__ */ m("code", {
146
+ "data-testid": "oauth-redirect-url",
147
+ className: "block break-all text-xs text-text-secondary",
148
+ children: F
149
+ })]
150
+ }),
151
+ b !== "fields" && /* @__PURE__ */ m(c, {
152
+ options: j,
153
+ defaultScopes: M,
154
+ selection: N,
155
+ onChange: P,
156
+ translate: B,
157
+ disabled: z
158
+ }),
159
+ b === "oauth2" && /* @__PURE__ */ h("div", {
160
+ className: "flex items-center gap-2 rounded-md border border-border-default bg-status-info-bg-subtle px-3 py-2",
161
+ children: [/* @__PURE__ */ m(f, {
162
+ size: 14,
163
+ className: "flex-shrink-0 text-status-info-text"
164
+ }), /* @__PURE__ */ m("span", {
165
+ className: "text-xs text-status-info-text",
166
+ children: B("integrations.addConnection.authentication.oauthPopupInfo", "A popup window will open for {{provider}} sign-in", { provider: _.name })
167
+ })]
168
+ }),
169
+ b === "minted" && /* @__PURE__ */ h("div", {
170
+ className: "flex items-center gap-2 rounded-md border border-border-default bg-status-info-bg-subtle px-3 py-2",
171
+ children: [/* @__PURE__ */ m(p, {
172
+ size: 14,
173
+ className: "flex-shrink-0 text-status-info-text"
174
+ }), /* @__PURE__ */ m("span", {
175
+ className: "text-xs text-status-info-text",
176
+ children: B("integrations.addConnection.authentication.serviceAccount.description", "No credentials to enter — access is granted on your behalf and tokens are issued per use.")
177
+ })]
178
+ })
179
+ ]
180
+ })
181
+ ]
182
+ });
183
+ };
184
+ //#endregion
185
+ export { g as ConnectionFormTab };
@@ -0,0 +1,19 @@
1
+ import { FC } from 'react';
2
+ import { Translator } from '../credentials/translate';
3
+ import { ConnectionsApi } from './api';
4
+ import { CredentialStorageState, ProviderAuthType } from './types';
5
+ interface CredentialStorageSelectorProps {
6
+ api: ConnectionsApi;
7
+ value: CredentialStorageState;
8
+ onChange: (update: (current: CredentialStorageState) => CredentialStorageState) => void;
9
+ authType: ProviderAuthType;
10
+ /** False lets the integrations service hold the secret when no vault is picked. */
11
+ requireVault: boolean;
12
+ /** Vaults belong to the security module; creating one needs its own grant. */
13
+ canCreateVault: boolean;
14
+ translate: Translator;
15
+ disabled?: boolean;
16
+ }
17
+ export declare const CredentialStorageSelector: FC<CredentialStorageSelectorProps>;
18
+ export {};
19
+ //# sourceMappingURL=CredentialStorageSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CredentialStorageSelector.d.ts","sourceRoot":"","sources":["../../src/connections/CredentialStorageSelector.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAA2C,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAGjB,MAAM,SAAS,CAAC;AAEjB,UAAU,8BAA8B;IACtC,GAAG,EAAE,cAAc,CAAC;IACpB,KAAK,EAAE,sBAAsB,CAAC;IAC9B,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,sBAAsB,KAAK,IAAI,CAAC;IACxF,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,mFAAmF;IACnF,YAAY,EAAE,OAAO,CAAC;IACtB,8EAA8E;IAC9E,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,UAAU,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAWD,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CAwUxE,CAAC"}
@@ -0,0 +1,294 @@
1
+ import { compatibleSecrets as e } from "./storage.js";
2
+ import { useCallback as t, useEffect as n, useId as r, useState as i } from "react";
3
+ import { AlertCircle as a, Database as o, FolderKey as s, KeyRound as c, Loader2 as l, Plus as u, X as d } from "lucide-react";
4
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
5
+ //#region src/connections/CredentialStorageSelector.tsx
6
+ var h = "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", g = `${h} scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary`, _ = ({ api: a, value: d, onChange: _, authType: y, requireVault: b, canCreateVault: x, translate: S, disabled: C }) => {
7
+ let [w, T] = i([]), [E, D] = i(!0), [O, k] = i([]), [A, j] = i(!1), [M, N] = i(!1), P = r(), F = t(async () => {
8
+ D(!0);
9
+ try {
10
+ T(await a.listVaults());
11
+ } catch {
12
+ T([]);
13
+ } finally {
14
+ D(!1);
15
+ }
16
+ }, [a]);
17
+ n(() => {
18
+ F();
19
+ }, [F]), n(() => {
20
+ if (d.mode !== "existing" || !d.vaultId) {
21
+ k([]);
22
+ return;
23
+ }
24
+ let t = !1;
25
+ return j(!0), a.listVaultSecrets(d.vaultId).then((n) => {
26
+ t || k(e(n, y));
27
+ }).catch(() => {
28
+ t || k([]);
29
+ }).finally(() => {
30
+ t || j(!1);
31
+ }), () => {
32
+ t = !0;
33
+ };
34
+ }, [
35
+ a,
36
+ y,
37
+ d.mode,
38
+ d.vaultId
39
+ ]);
40
+ let I = async (e) => {
41
+ await F(), _((t) => ({
42
+ ...t,
43
+ vaultId: e,
44
+ secretId: ""
45
+ })), N(!1);
46
+ }, L = `${P}-vault`, R = `${P}-managed-name`, z = `${P}-existing-secret`, B = b ? S("integrations.addConnection.credentialStorage.selectVault", "Select a vault") : S("integrations.addConnection.credentialStorage.noVault", "No vault — stored encrypted by the integrations service"), V = (e, t, n, r) => {
47
+ let i = t, a = d.mode === e;
48
+ return /* @__PURE__ */ m("button", {
49
+ type: "button",
50
+ disabled: C,
51
+ "aria-pressed": a,
52
+ onClick: () => _((t) => ({
53
+ ...t,
54
+ mode: e,
55
+ ...e === "managed" ? { secretId: "" } : {}
56
+ })),
57
+ className: `rounded-xl border px-4 py-3 text-left transition-colors disabled:opacity-60 ${a ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/40 hover:bg-accent/30"}`,
58
+ children: [/* @__PURE__ */ m("span", {
59
+ className: "flex items-center gap-2 text-sm font-medium text-text-primary",
60
+ children: [/* @__PURE__ */ p(i, {
61
+ size: 16,
62
+ className: "text-primary"
63
+ }), n]
64
+ }), /* @__PURE__ */ p("span", {
65
+ className: "mt-1 block text-xs text-text-secondary",
66
+ children: r
67
+ })]
68
+ });
69
+ };
70
+ return /* @__PURE__ */ m("div", {
71
+ className: "space-y-4 rounded-xl border border-border-subtle/50 bg-bg-surface p-4",
72
+ children: [
73
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("h3", {
74
+ className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
75
+ children: [/* @__PURE__ */ p(o, {
76
+ size: 16,
77
+ className: "text-primary"
78
+ }), S("integrations.addConnection.credentialStorage.title", "Credential Storage")]
79
+ }), /* @__PURE__ */ p("p", {
80
+ className: "mt-1 text-xs text-text-secondary",
81
+ children: b ? S("integrations.addConnection.credentialStorage.description", "Connections use vault-managed secrets by default. You can also reuse an existing compatible secret.") : S("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.")
82
+ })] }),
83
+ /* @__PURE__ */ m("div", {
84
+ className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
85
+ children: [V("managed", s, S("integrations.addConnection.credentialStorage.dedicatedSecret", "Dedicated secret"), S("integrations.addConnection.credentialStorage.dedicatedSecretDescription", "Create and own a vault secret for this connection.")), V("existing", c, S("integrations.addConnection.credentialStorage.existingSecret", "Existing secret"), S("integrations.addConnection.credentialStorage.existingSecretDescription", "Reference an already stored secret from the vault."))]
86
+ }),
87
+ /* @__PURE__ */ m("div", {
88
+ className: "space-y-2",
89
+ children: [/* @__PURE__ */ m("div", {
90
+ className: "flex items-center justify-between gap-2",
91
+ children: [/* @__PURE__ */ p("label", {
92
+ htmlFor: L,
93
+ className: "block text-xs font-semibold uppercase tracking-wide text-text-primary",
94
+ children: S("integrations.addConnection.credentialStorage.vaultLabel", "Vault")
95
+ }), !M && x && /* @__PURE__ */ m("button", {
96
+ type: "button",
97
+ disabled: C,
98
+ onClick: () => N(!0),
99
+ className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",
100
+ children: [
101
+ /* @__PURE__ */ p(u, { size: 13 }),
102
+ " ",
103
+ S("integrations.addConnection.credentialStorage.newVault", "New vault")
104
+ ]
105
+ })]
106
+ }), M ? /* @__PURE__ */ p(v, {
107
+ api: a,
108
+ translate: S,
109
+ onCreated: (e) => void I(e),
110
+ onCancel: () => N(!1)
111
+ }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", {
112
+ className: "relative",
113
+ children: [/* @__PURE__ */ m("select", {
114
+ id: L,
115
+ value: d.vaultId,
116
+ disabled: C,
117
+ onChange: (e) => _((t) => ({
118
+ ...t,
119
+ vaultId: e.target.value,
120
+ secretId: ""
121
+ })),
122
+ className: g,
123
+ children: [/* @__PURE__ */ p("option", {
124
+ value: "",
125
+ children: B
126
+ }), w.map((e) => /* @__PURE__ */ m("option", {
127
+ value: e.id,
128
+ children: [
129
+ e.name,
130
+ " (",
131
+ e.secretCount,
132
+ ")"
133
+ ]
134
+ }, e.id))]
135
+ }), E && /* @__PURE__ */ p(l, {
136
+ size: 16,
137
+ className: "absolute right-3 top-3 animate-spin text-text-secondary"
138
+ })]
139
+ }), b && !E && w.length === 0 && (x ? /* @__PURE__ */ m("p", {
140
+ className: "text-xs text-text-secondary",
141
+ children: [
142
+ S("integrations.addConnection.credentialStorage.noVaults.canCreate", "No vaults yet. Create one to store this connection's credentials."),
143
+ " ",
144
+ /* @__PURE__ */ p("button", {
145
+ type: "button",
146
+ onClick: () => N(!0),
147
+ className: "font-medium text-primary hover:underline",
148
+ children: S("integrations.addConnection.credentialStorage.noVaults.createOne", "Create one")
149
+ })
150
+ ]
151
+ }) : /* @__PURE__ */ p("p", {
152
+ className: "text-xs text-text-secondary",
153
+ children: S("integrations.addConnection.credentialStorage.noVaults.readOnly", "No vaults yet. Ask an administrator to create one — a connection needs a vault to store its credentials.")
154
+ }))] })]
155
+ }),
156
+ d.mode === "managed" ? d.vaultId ? /* @__PURE__ */ m("div", {
157
+ className: "space-y-2",
158
+ children: [
159
+ /* @__PURE__ */ p("label", {
160
+ htmlFor: R,
161
+ className: "block text-xs font-semibold uppercase tracking-wide text-text-primary",
162
+ children: S("integrations.addConnection.credentialStorage.managedSecretName", "Managed secret name")
163
+ }),
164
+ /* @__PURE__ */ p("input", {
165
+ id: R,
166
+ type: "text",
167
+ value: d.managedSecretName,
168
+ disabled: C,
169
+ onChange: (e) => _((t) => ({
170
+ ...t,
171
+ managedSecretName: e.target.value
172
+ })),
173
+ placeholder: S("integrations.addConnection.credentialStorage.managedSecretPlaceholder", "Optional custom vault secret name"),
174
+ className: h
175
+ }),
176
+ /* @__PURE__ */ p("p", {
177
+ className: "text-xs text-text-secondary",
178
+ children: S("integrations.addConnection.credentialStorage.managedSecretHint", "Leave empty to auto-generate a secret name from the connection and provider.")
179
+ })
180
+ ]
181
+ }) : null : /* @__PURE__ */ m("div", {
182
+ className: "space-y-2",
183
+ children: [
184
+ /* @__PURE__ */ p("label", {
185
+ htmlFor: z,
186
+ className: "block text-xs font-semibold uppercase tracking-wide text-text-primary",
187
+ children: S("integrations.addConnection.credentialStorage.existingSecretLabel", "Existing secret")
188
+ }),
189
+ /* @__PURE__ */ m("div", {
190
+ className: "relative",
191
+ children: [/* @__PURE__ */ m("select", {
192
+ id: z,
193
+ value: d.secretId,
194
+ onChange: (e) => _((t) => ({
195
+ ...t,
196
+ secretId: e.target.value
197
+ })),
198
+ disabled: C || !d.vaultId,
199
+ className: g,
200
+ children: [/* @__PURE__ */ p("option", {
201
+ value: "",
202
+ children: S("integrations.addConnection.credentialStorage.selectExistingSecret", "Select an existing secret")
203
+ }), O.map((e) => /* @__PURE__ */ m("option", {
204
+ value: e.id,
205
+ children: [
206
+ e.name,
207
+ " · ",
208
+ e.type
209
+ ]
210
+ }, e.id))]
211
+ }), A && /* @__PURE__ */ p(l, {
212
+ size: 16,
213
+ className: "absolute right-3 top-3 animate-spin text-text-secondary"
214
+ })]
215
+ }),
216
+ /* @__PURE__ */ p("p", {
217
+ className: "text-xs text-text-secondary",
218
+ children: S("integrations.addConnection.credentialStorage.existingSecretHint", "For OAuth and basic auth, choose a structured credential secret created for integrations.")
219
+ })
220
+ ]
221
+ })
222
+ ]
223
+ });
224
+ }, v = ({ api: e, translate: t, onCreated: n, onCancel: o }) => {
225
+ let [s, c] = i(""), [f, g] = i(!1), [_, v] = i(null), y = r(), b = async () => {
226
+ if (!(!s.trim() || f)) {
227
+ g(!0), v(null);
228
+ try {
229
+ n((await e.createVault(s)).id);
230
+ } catch (e) {
231
+ v(e instanceof Error ? e.message : t("integrations.addConnection.credentialStorage.createVaultFailed", "The vault could not be created"));
232
+ } finally {
233
+ g(!1);
234
+ }
235
+ }
236
+ };
237
+ return /* @__PURE__ */ m("div", {
238
+ className: "space-y-2 rounded-lg border border-primary/40 bg-action-primary-bg/5 p-3",
239
+ children: [
240
+ /* @__PURE__ */ m("div", {
241
+ className: "flex items-center justify-between gap-2",
242
+ children: [/* @__PURE__ */ p("label", {
243
+ htmlFor: y,
244
+ className: "text-xs font-medium text-text-primary",
245
+ children: t("integrations.addConnection.credentialStorage.newVaultName", "New vault name")
246
+ }), /* @__PURE__ */ p("button", {
247
+ type: "button",
248
+ onClick: o,
249
+ "aria-label": t("integrations.addConnection.credentialStorage.cancelCreateVault", "Cancel creating a vault"),
250
+ className: "text-text-secondary hover:text-text-primary",
251
+ children: /* @__PURE__ */ p(d, { size: 14 })
252
+ })]
253
+ }),
254
+ /* @__PURE__ */ p("input", {
255
+ id: y,
256
+ type: "text",
257
+ value: s,
258
+ autoFocus: !0,
259
+ onChange: (e) => c(e.target.value),
260
+ onKeyDown: (e) => {
261
+ e.key === "Enter" && (e.preventDefault(), b());
262
+ },
263
+ placeholder: t("integrations.addConnection.credentialStorage.newVaultPlaceholder", "e.g. Integrations"),
264
+ disabled: f,
265
+ className: h
266
+ }),
267
+ _ && /* @__PURE__ */ m("p", {
268
+ className: "flex items-center gap-1.5 text-xs text-status-error-text",
269
+ children: [/* @__PURE__ */ p(a, {
270
+ size: 13,
271
+ className: "flex-shrink-0"
272
+ }), _]
273
+ }),
274
+ /* @__PURE__ */ m("div", {
275
+ className: "flex items-center gap-2",
276
+ children: [/* @__PURE__ */ m("button", {
277
+ type: "button",
278
+ onClick: () => void b(),
279
+ disabled: f || !s.trim(),
280
+ 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",
281
+ children: [f ? /* @__PURE__ */ p(l, {
282
+ size: 13,
283
+ className: "animate-spin"
284
+ }) : /* @__PURE__ */ p(u, { size: 13 }), t("integrations.addConnection.credentialStorage.createVault", "Create vault")]
285
+ }), /* @__PURE__ */ p("span", {
286
+ className: "text-xs text-text-secondary",
287
+ children: t("integrations.addConnection.credentialStorage.scopedHint", "Scoped to this workspace.")
288
+ })]
289
+ })
290
+ ]
291
+ });
292
+ };
293
+ //#endregion
294
+ export { _ as CredentialStorageSelector };
@@ -0,0 +1,7 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export declare const DialogHeading: FC<{
3
+ id: string;
4
+ className: string;
5
+ children: ReactNode;
6
+ }>;
7
+ //# sourceMappingURL=DialogHeading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogHeading.d.ts","sourceRoot":"","sources":["../../src/connections/DialogHeading.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3C,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,CAYpF,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import * as t from "@radix-ui/react-dialog";
3
+ //#region src/connections/DialogHeading.tsx
4
+ var n = ({ id: n, className: r, children: i }) => /* @__PURE__ */ e(t.Title, {
5
+ asChild: !0,
6
+ children: /* @__PURE__ */ e("div", {
7
+ className: "min-w-0",
8
+ children: /* @__PURE__ */ e("h2", {
9
+ id: n,
10
+ className: r,
11
+ children: i
12
+ })
13
+ })
14
+ });
15
+ //#endregion
16
+ export { n as DialogHeading };
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { ProviderIdentity } from './providerIdentity';
3
+ export interface ProviderIconProps {
4
+ provider: ProviderIdentity;
5
+ size?: number;
6
+ variant?: 'tile' | 'bare';
7
+ className?: string;
8
+ }
9
+ export declare const ProviderIcon: FC<ProviderIconProps>;
10
+ //# sourceMappingURL=ProviderIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProviderIcon.d.ts","sourceRoot":"","sources":["../../src/connections/ProviderIcon.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AACH,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAM1C,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAW5B,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA+E9C,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { cn as e } from "../lib/utils.js";
2
+ import { getProviderAccent as t, getProviderIconName as n, getProviderImageSource as r, getProviderTextIcon as i } from "./providerIdentity.js";
3
+ import a from "./assets/bigconsole.png.js";
4
+ import o from "./assets/burdenoff.png.js";
5
+ import { useState as s } from "react";
6
+ import { jsx as c } from "react/jsx-runtime";
7
+ import { Icon as l } from "@iconify/react";
8
+ //#region src/connections/ProviderIcon.tsx
9
+ var u = {
10
+ bigconsole: a,
11
+ burdenoff: o
12
+ }, d = ({ provider: a, size: o = 40, variant: d = "tile", className: f }) => {
13
+ let [p, m] = s(null), h = i(a), g = r(a, u), _ = t(a.category), v = d === "tile", y = v ? Math.round(o * .55) : o;
14
+ if (h) return /* @__PURE__ */ c("span", {
15
+ role: "img",
16
+ "aria-label": h,
17
+ className: e("inline-flex flex-shrink-0 items-center justify-center whitespace-nowrap font-semibold tracking-tight text-text-primary", v ? e("rounded-xl px-2", _.surface) : "rounded-md bg-accent/30 px-1.5", f),
18
+ style: {
19
+ width: "max-content",
20
+ minWidth: v ? Math.round(o * 1.7) : o,
21
+ height: o,
22
+ fontSize: Math.max(10, Math.round(o * (v ? .25 : .4)))
23
+ },
24
+ children: h
25
+ });
26
+ let b = g && g !== p ? /* @__PURE__ */ c("img", {
27
+ src: g,
28
+ alt: "",
29
+ className: "flex-shrink-0 object-contain",
30
+ style: {
31
+ width: y,
32
+ height: y
33
+ },
34
+ onError: () => m(g)
35
+ }) : (() => {
36
+ let t = n(a);
37
+ return /* @__PURE__ */ c(l, {
38
+ icon: t,
39
+ width: y,
40
+ height: y,
41
+ className: e("flex-shrink-0", !v || t === "thesvg:bedrock-aws" ? "text-text-primary" : _.icon)
42
+ });
43
+ })();
44
+ return v ? /* @__PURE__ */ c("span", {
45
+ className: e("inline-flex flex-shrink-0 items-center justify-center overflow-hidden rounded-xl", _.surface, f),
46
+ style: {
47
+ width: o,
48
+ height: o
49
+ },
50
+ children: b
51
+ }) : /* @__PURE__ */ c("span", {
52
+ className: e("inline-flex", f),
53
+ children: b
54
+ });
55
+ };
56
+ //#endregion
57
+ export { d as ProviderIcon };
@@ -0,0 +1,15 @@
1
+ import { FC, RefObject } from 'react';
2
+ import { Translator } from '../credentials/translate';
3
+ import { ConnectionsApi } from './api';
4
+ import { ConnectionProvider } from './types';
5
+ interface ProviderPickerPanelProps {
6
+ api: ConnectionsApi;
7
+ source: 'installed' | 'catalog';
8
+ translate: Translator;
9
+ /** The dialog focuses this on open. */
10
+ searchInputRef: RefObject<HTMLInputElement | null>;
11
+ onSelect: (provider: ConnectionProvider) => void;
12
+ }
13
+ export declare const ProviderPickerPanel: FC<ProviderPickerPanelProps>;
14
+ export {};
15
+ //# sourceMappingURL=ProviderPickerPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProviderPickerPanel.d.ts","sourceRoot":"","sources":["../../src/connections/ProviderPickerPanel.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAgC,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAG3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAK5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,UAAU,wBAAwB;IAChC,GAAG,EAAE,cAAc,CAAC;IACpB,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IAChC,SAAS,EAAE,UAAU,CAAC;IACtB,uCAAuC;IACvC,cAAc,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACnD,QAAQ,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAClD;AAED,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAuH5D,CAAC"}