@burdenoff/fe-libs 2026.1113.6 → 2026.1113.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/connections/ConnectionDialog.d.ts +13 -1
  2. package/dist/connections/ConnectionDialog.js +13 -11
  3. package/dist/connections/ConnectionDialogPanel.d.ts +5 -1
  4. package/dist/connections/ConnectionDialogPanel.js +230 -150
  5. package/dist/connections/ConnectionFormTab.d.ts +15 -0
  6. package/dist/connections/ConnectionFormTab.js +192 -189
  7. package/dist/connections/CredentialStorageSelector.d.ts +9 -0
  8. package/dist/connections/CredentialStorageSelector.js +145 -137
  9. package/dist/connections/OneScreenConnectionForm.d.ts +22 -0
  10. package/dist/connections/OneScreenConnectionForm.js +231 -0
  11. package/dist/connections/ProviderPickerPanel.d.ts +6 -0
  12. package/dist/connections/ProviderPickerPanel.js +98 -45
  13. package/dist/connections/api.d.ts +3 -0
  14. package/dist/connections/api.js +4 -2
  15. package/dist/connections/connectionFlow.d.ts +18 -0
  16. package/dist/connections/connectionFlow.js +3 -3
  17. package/dist/connections/index.d.ts +4 -3
  18. package/dist/connections/picker.d.ts +18 -0
  19. package/dist/connections/picker.js +35 -6
  20. package/dist/connections/scopes.d.ts +8 -0
  21. package/dist/connections/scopes.js +9 -1
  22. package/dist/connections/storage.d.ts +9 -1
  23. package/dist/connections/storage.js +13 -1
  24. package/dist/connections/types.d.ts +16 -0
  25. package/dist/connections/useConnectionSubmit.d.ts +38 -2
  26. package/dist/connections/useConnectionSubmit.js +115 -71
  27. package/dist/connections.js +11 -10
  28. package/dist/credentials/SchemaForm.d.ts +7 -1
  29. package/dist/credentials/SchemaForm.js +64 -64
  30. package/dist/credentials/index.d.ts +2 -2
  31. package/dist/credentials/schema.d.ts +11 -1
  32. package/dist/credentials/schema.js +13 -5
  33. package/dist/credentials/types.d.ts +9 -0
  34. package/dist/credentials.js +5 -5
  35. package/dist/ui/index.d.ts +1 -0
  36. package/dist/ui/use-heading-document-title.d.ts +19 -0
  37. package/dist/ui/use-heading-document-title.js +29 -0
  38. package/dist/ui.js +49 -48
  39. package/package.json +1 -1
@@ -4,6 +4,21 @@ import { AuthMethodFlow, FormSchema } from '../credentials/types';
4
4
  import { ConnectionsApi } from './api';
5
5
  import { ScopeOption, ScopeSelection } from './scopes';
6
6
  import { ConnectionAuthMethod, ConnectionProvider, CredentialStorageMode, CredentialStorageState } from './types';
7
+ /** How a field references an external secret; shown as written, never translated. */
8
+ export declare const SECRET_REFERENCE_EXAMPLE = "{{ $secrets.<provider>.<name> }}";
9
+ /**
10
+ * One chip per external secret the form references (BOFF-9741), so it is
11
+ * clear which values will come from a secret manager rather than this form.
12
+ */
13
+ export declare const SecretReferenceChips: FC<{
14
+ values: Record<string, unknown>;
15
+ translate: Translator;
16
+ }>;
17
+ /** The callback URL a bring-your-own OAuth app must register, with a Copy button. */
18
+ export declare const RedirectUrlBox: FC<{
19
+ callbackUrl: string;
20
+ translate: Translator;
21
+ }>;
7
22
  export interface ConnectionFormTabProps {
8
23
  api: ConnectionsApi;
9
24
  provider: ConnectionProvider;
@@ -30,194 +30,197 @@ var _ = "{{ $secrets.<provider>.<name> }}", v = ({ values: e, translate: t }) =>
30
30
  }, `${e.provider}:${e.name}:${e.field ?? ""}`);
31
31
  })
32
32
  });
33
- }, y = ({ api: l, provider: y, methods: b, method: x, flow: S, schema: C, name: w, onNameChange: T, description: E, onDescriptionChange: D, values: O, setValues: k, onMethodChange: A, storage: j, setStorage: M, supportedStorageModes: N, scopeOptions: P, defaultScopes: F, scopeSelection: I, setScopeSelection: L, callbackUrl: R, requireVault: z, canCreateVault: B, errorMessage: V, busy: H, translate: U, fieldId: W }) => {
34
- let [G, K] = u(!1);
33
+ }, y = ({ callbackUrl: e, translate: t }) => {
34
+ let [n, r] = u(!1);
35
35
  return /* @__PURE__ */ g("div", {
36
- className: "space-y-5",
37
- children: [
38
- V && /* @__PURE__ */ g("div", {
39
- role: "alert",
40
- className: "flex items-start gap-2 rounded-md border border-status-error-border/20 bg-status-error-bg/10 px-3 py-2",
41
- children: [/* @__PURE__ */ h(d, {
42
- size: 16,
43
- className: "mt-0.5 flex-shrink-0 text-status-error-text"
44
- }), /* @__PURE__ */ h("span", {
45
- className: "text-sm text-status-error-text",
46
- children: V
47
- })]
48
- }),
49
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
50
- htmlFor: W("name"),
51
- className: "mb-1.5 block text-sm font-medium text-text-primary",
52
- children: [
53
- U("integrations.addConnection.fields.connectionName", "Connection Name"),
54
- " ",
55
- /* @__PURE__ */ h("span", {
56
- className: "text-status-error-text",
57
- children: "*"
58
- })
59
- ]
60
- }), /* @__PURE__ */ h("input", {
61
- id: W("name"),
62
- type: "text",
63
- value: w,
64
- onChange: (e) => T(e.target.value),
65
- placeholder: U("integrations.addConnection.fields.connectionNamePlaceholder", "e.g., My {{provider}} Connection", { provider: y.name }),
66
- disabled: H,
67
- className: o
68
- })] }),
69
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
70
- htmlFor: W("description"),
71
- className: "mb-1.5 block text-sm font-medium text-text-primary",
72
- children: U("integrations.addConnection.fields.description", "Description")
73
- }), /* @__PURE__ */ h("input", {
74
- id: W("description"),
75
- type: "text",
76
- value: E,
77
- onChange: (e) => D(e.target.value),
78
- placeholder: U("integrations.addConnection.fields.descriptionPlaceholder", "Optional description..."),
79
- disabled: H,
80
- className: o
81
- })] }),
82
- i(S, y) && /* @__PURE__ */ h(a, {
83
- api: l,
84
- value: j,
85
- onChange: M,
86
- supportedStorageModes: N,
87
- authType: x?.authType ?? y.authType,
88
- requireVault: z,
89
- canCreateVault: B,
90
- translate: U,
91
- disabled: H
92
- }),
93
- /* @__PURE__ */ g("div", {
94
- className: "space-y-3 rounded-md border border-border-subtle/50 bg-bg-surface p-4",
95
- children: [
96
- /* @__PURE__ */ g("div", {
97
- className: "flex items-center justify-between gap-3",
98
- children: [/* @__PURE__ */ g("h3", {
99
- className: "flex items-center gap-2 text-sm font-medium text-text-primary",
100
- children: [
101
- /* @__PURE__ */ h(m, {
102
- size: 16,
103
- className: "text-primary"
104
- }),
105
- U("integrations.addConnection.authentication.title", "Authentication"),
106
- b.length <= 1 && /* @__PURE__ */ g("span", {
107
- className: "font-normal text-text-secondary",
108
- children: ["· ", x?.displayName ?? s(y.authType, U)]
109
- })
110
- ]
111
- }), /* @__PURE__ */ h(t, {
112
- methods: b,
113
- selectedKey: x?.key ?? null,
114
- onSelect: A,
115
- disabled: H,
116
- idPrefix: W("auth-method"),
117
- translate: U,
118
- compact: !0
119
- })]
120
- }),
121
- /* @__PURE__ */ h("div", {
122
- className: "space-y-2",
123
- children: /* @__PURE__ */ h(e, {
124
- method: x,
125
- translate: U
126
- })
127
- }),
128
- S === "fields" && !C && /* @__PURE__ */ g("div", {
129
- className: "flex items-center gap-2 rounded-md border border-border-default bg-status-error-bg-subtle px-3 py-2",
130
- children: [/* @__PURE__ */ h(d, {
131
- size: 16,
132
- className: "flex-shrink-0 text-status-error-text"
133
- }), /* @__PURE__ */ h("span", {
134
- className: "text-sm text-status-error-text",
135
- children: U("integrations.addConnection.authentication.noForm", "This authentication method does not declare a configuration form.")
136
- })]
137
- }),
138
- S === "fields" && C && /* @__PURE__ */ g("div", {
139
- className: "space-y-1",
140
- children: [/* @__PURE__ */ h("p", {
141
- className: "text-xs text-text-secondary",
142
- children: U("integrations.addConnection.authentication.secretsEncrypted", "Secret values are stored encrypted and never shown again.")
143
- }), /* @__PURE__ */ g("p", {
144
- className: "text-xs text-text-secondary",
145
- children: [
146
- U("integrations.addConnection.secretReferences.hint", "Or reference a secret from an external secret manager:"),
147
- " ",
148
- /* @__PURE__ */ h("code", {
149
- className: "rounded bg-bg-muted px-1 py-0.5 font-mono text-text-primary",
150
- children: _
151
- })
152
- ]
153
- })]
154
- }),
155
- S !== "minted" && C && /* @__PURE__ */ h(n, {
156
- schema: C,
157
- values: O,
158
- onChange: k,
159
- disabled: H,
160
- idPrefix: W("credential"),
161
- translate: U
162
- }),
163
- S === "fields" && C && /* @__PURE__ */ h(v, {
164
- values: O,
165
- translate: U
166
- }),
167
- S === "oauth2" && r(C) && /* @__PURE__ */ g("div", {
168
- className: "space-y-1.5 rounded-md border border-border-subtle bg-bg-surface px-3 py-2",
169
- children: [/* @__PURE__ */ g("div", {
170
- className: "flex items-center justify-between gap-2",
171
- children: [/* @__PURE__ */ h("span", {
172
- className: "text-xs font-medium text-text-primary",
173
- children: U("integrations.addConnection.authentication.redirectUriLabel", "Redirect URL to register in your app")
174
- }), /* @__PURE__ */ g("button", {
175
- type: "button",
176
- onClick: () => {
177
- navigator.clipboard?.writeText(R).then(() => {
178
- K(!0), window.setTimeout(() => K(!1), 2e3);
179
- }).catch(() => void 0);
180
- },
181
- className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",
182
- children: [/* @__PURE__ */ h(f, { size: 12 }), G ? U("integrations.addConnection.authentication.copied", "Copied") : U("integrations.addConnection.authentication.copy", "Copy")]
183
- })]
184
- }), /* @__PURE__ */ h("code", {
185
- "data-testid": "oauth-redirect-url",
186
- className: "block break-all text-xs text-text-secondary",
187
- children: R
188
- })]
189
- }),
190
- S !== "fields" && /* @__PURE__ */ h(c, {
191
- options: P,
192
- defaultScopes: F,
193
- selection: I,
194
- onChange: L,
195
- translate: U,
196
- disabled: H
197
- }),
198
- S === "oauth2" && /* @__PURE__ */ g("div", {
199
- className: "flex items-center gap-2 rounded-md border border-border-default bg-status-info-bg-subtle px-3 py-2",
200
- children: [/* @__PURE__ */ h(p, {
201
- size: 14,
202
- className: "flex-shrink-0 text-status-info-text"
203
- }), /* @__PURE__ */ h("span", {
204
- className: "text-xs text-status-info-text",
205
- children: U("integrations.addConnection.authentication.oauthPopupInfo", "A popup window will open for {{provider}} sign-in", { provider: y.name })
206
- })]
207
- }),
208
- S === "minted" && /* @__PURE__ */ g("div", {
209
- className: "flex items-center gap-2 rounded-md border border-border-default bg-status-info-bg-subtle px-3 py-2",
210
- children: [/* @__PURE__ */ h(m, {
211
- size: 14,
212
- className: "flex-shrink-0 text-status-info-text"
213
- }), /* @__PURE__ */ h("span", {
214
- className: "text-xs text-status-info-text",
215
- children: U("integrations.addConnection.authentication.serviceAccount.description", "No credentials to enter — access is granted on your behalf and tokens are issued per use.", { provider: y.name })
216
- })]
217
- })
218
- ]
219
- })
220
- ]
36
+ className: "space-y-1.5 rounded-md border border-border-subtle bg-bg-surface px-3 py-2",
37
+ children: [/* @__PURE__ */ g("div", {
38
+ className: "flex items-center justify-between gap-2",
39
+ children: [/* @__PURE__ */ h("span", {
40
+ className: "text-xs font-medium text-text-primary",
41
+ children: t("integrations.addConnection.authentication.redirectUriLabel", "Redirect URL to register in your app")
42
+ }), /* @__PURE__ */ g("button", {
43
+ type: "button",
44
+ onClick: () => {
45
+ navigator.clipboard?.writeText(e).then(() => {
46
+ r(!0), window.setTimeout(() => r(!1), 2e3);
47
+ }).catch(() => void 0);
48
+ },
49
+ className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",
50
+ children: [/* @__PURE__ */ h(f, { size: 12 }), n ? t("integrations.addConnection.authentication.copied", "Copied") : t("integrations.addConnection.authentication.copy", "Copy")]
51
+ })]
52
+ }), /* @__PURE__ */ h("code", {
53
+ "data-testid": "oauth-redirect-url",
54
+ className: "block break-all text-xs text-text-secondary",
55
+ children: e
56
+ })]
221
57
  });
222
- };
223
- export { y as ConnectionFormTab };
58
+ }, b = ({ api: l, provider: u, methods: f, method: _, flow: b, schema: x, name: S, onNameChange: C, description: w, onDescriptionChange: T, values: E, setValues: D, onMethodChange: O, storage: k, setStorage: A, supportedStorageModes: j, scopeOptions: M, defaultScopes: N, scopeSelection: P, setScopeSelection: F, callbackUrl: I, requireVault: L, canCreateVault: R, errorMessage: z, busy: B, translate: V, fieldId: H }) => /* @__PURE__ */ g("div", {
59
+ className: "space-y-5",
60
+ children: [
61
+ z && /* @__PURE__ */ g("div", {
62
+ role: "alert",
63
+ className: "flex items-start gap-2 rounded-md border border-status-error-border/20 bg-status-error-bg/10 px-3 py-2",
64
+ children: [/* @__PURE__ */ h(d, {
65
+ size: 16,
66
+ className: "mt-0.5 flex-shrink-0 text-status-error-text"
67
+ }), /* @__PURE__ */ h("span", {
68
+ className: "text-sm text-status-error-text",
69
+ children: z
70
+ })]
71
+ }),
72
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
73
+ htmlFor: H("name"),
74
+ className: "mb-1.5 block text-sm font-medium text-text-primary",
75
+ children: [
76
+ V("integrations.addConnection.fields.connectionName", "Connection Name"),
77
+ " ",
78
+ /* @__PURE__ */ h("span", {
79
+ className: "text-status-error-text",
80
+ children: "*"
81
+ })
82
+ ]
83
+ }), /* @__PURE__ */ h("input", {
84
+ id: H("name"),
85
+ type: "text",
86
+ value: S,
87
+ onChange: (e) => C(e.target.value),
88
+ placeholder: V("integrations.addConnection.fields.connectionNamePlaceholder", "e.g., My {{provider}} Connection", { provider: u.name }),
89
+ disabled: B,
90
+ className: o
91
+ })] }),
92
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
93
+ htmlFor: H("description"),
94
+ className: "mb-1.5 block text-sm font-medium text-text-primary",
95
+ children: V("integrations.addConnection.fields.description", "Description")
96
+ }), /* @__PURE__ */ h("input", {
97
+ id: H("description"),
98
+ type: "text",
99
+ value: w,
100
+ onChange: (e) => T(e.target.value),
101
+ placeholder: V("integrations.addConnection.fields.descriptionPlaceholder", "Optional description..."),
102
+ disabled: B,
103
+ className: o
104
+ })] }),
105
+ i(b, u) && /* @__PURE__ */ h(a, {
106
+ api: l,
107
+ value: k,
108
+ onChange: A,
109
+ supportedStorageModes: j,
110
+ authType: _?.authType ?? u.authType,
111
+ requireVault: L,
112
+ canCreateVault: R,
113
+ translate: V,
114
+ disabled: B
115
+ }),
116
+ /* @__PURE__ */ g("div", {
117
+ className: "space-y-3 rounded-md border border-border-subtle/50 bg-bg-surface p-4",
118
+ children: [
119
+ /* @__PURE__ */ g("div", {
120
+ className: "flex items-center justify-between gap-3",
121
+ children: [/* @__PURE__ */ g("h3", {
122
+ className: "flex items-center gap-2 text-sm font-medium text-text-primary",
123
+ children: [
124
+ /* @__PURE__ */ h(m, {
125
+ size: 16,
126
+ className: "text-primary"
127
+ }),
128
+ V("integrations.addConnection.authentication.title", "Authentication"),
129
+ f.length <= 1 && /* @__PURE__ */ g("span", {
130
+ className: "font-normal text-text-secondary",
131
+ children: ["· ", _?.displayName ?? s(u.authType, V)]
132
+ })
133
+ ]
134
+ }), /* @__PURE__ */ h(t, {
135
+ methods: f,
136
+ selectedKey: _?.key ?? null,
137
+ onSelect: O,
138
+ disabled: B,
139
+ idPrefix: H("auth-method"),
140
+ translate: V,
141
+ compact: !0
142
+ })]
143
+ }),
144
+ /* @__PURE__ */ h("div", {
145
+ className: "space-y-2",
146
+ children: /* @__PURE__ */ h(e, {
147
+ method: _,
148
+ translate: V
149
+ })
150
+ }),
151
+ b === "fields" && !x && /* @__PURE__ */ g("div", {
152
+ className: "flex items-center gap-2 rounded-md border border-border-default bg-status-error-bg-subtle px-3 py-2",
153
+ children: [/* @__PURE__ */ h(d, {
154
+ size: 16,
155
+ className: "flex-shrink-0 text-status-error-text"
156
+ }), /* @__PURE__ */ h("span", {
157
+ className: "text-sm text-status-error-text",
158
+ children: V("integrations.addConnection.authentication.noForm", "This authentication method does not declare a configuration form.")
159
+ })]
160
+ }),
161
+ b === "fields" && x && /* @__PURE__ */ g("div", {
162
+ className: "space-y-1",
163
+ children: [/* @__PURE__ */ h("p", {
164
+ className: "text-xs text-text-secondary",
165
+ children: V("integrations.addConnection.authentication.secretsEncrypted", "Secret values are stored encrypted and never shown again.")
166
+ }), /* @__PURE__ */ g("p", {
167
+ className: "text-xs text-text-secondary",
168
+ children: [
169
+ V("integrations.addConnection.secretReferences.hint", "Or reference a secret from an external secret manager:"),
170
+ " ",
171
+ /* @__PURE__ */ h("code", {
172
+ className: "rounded bg-bg-muted px-1 py-0.5 font-mono text-text-primary",
173
+ children: "{{ $secrets.<provider>.<name> }}"
174
+ })
175
+ ]
176
+ })]
177
+ }),
178
+ b !== "minted" && x && /* @__PURE__ */ h(n, {
179
+ schema: x,
180
+ values: E,
181
+ onChange: D,
182
+ disabled: B,
183
+ idPrefix: H("credential"),
184
+ translate: V
185
+ }),
186
+ b === "fields" && x && /* @__PURE__ */ h(v, {
187
+ values: E,
188
+ translate: V
189
+ }),
190
+ b === "oauth2" && r(x) && /* @__PURE__ */ h(y, {
191
+ callbackUrl: I,
192
+ translate: V
193
+ }),
194
+ b !== "fields" && /* @__PURE__ */ h(c, {
195
+ options: M,
196
+ defaultScopes: N,
197
+ selection: P,
198
+ onChange: F,
199
+ translate: V,
200
+ disabled: B
201
+ }),
202
+ b === "oauth2" && /* @__PURE__ */ g("div", {
203
+ className: "flex items-center gap-2 rounded-md border border-border-default bg-status-info-bg-subtle px-3 py-2",
204
+ children: [/* @__PURE__ */ h(p, {
205
+ size: 14,
206
+ className: "flex-shrink-0 text-status-info-text"
207
+ }), /* @__PURE__ */ h("span", {
208
+ className: "text-xs text-status-info-text",
209
+ children: V("integrations.addConnection.authentication.oauthPopupInfo", "A popup window will open for {{provider}} sign-in", { provider: u.name })
210
+ })]
211
+ }),
212
+ b === "minted" && /* @__PURE__ */ g("div", {
213
+ className: "flex items-center gap-2 rounded-md border border-border-default bg-status-info-bg-subtle px-3 py-2",
214
+ children: [/* @__PURE__ */ h(m, {
215
+ size: 14,
216
+ className: "flex-shrink-0 text-status-info-text"
217
+ }), /* @__PURE__ */ h("span", {
218
+ className: "text-xs text-status-info-text",
219
+ children: V("integrations.addConnection.authentication.serviceAccount.description", "No credentials to enter — access is granted on your behalf and tokens are issued per use.", { provider: u.name })
220
+ })]
221
+ })
222
+ ]
223
+ })
224
+ ]
225
+ });
226
+ export { b as ConnectionFormTab, y as RedirectUrlBox, _ as SECRET_REFERENCE_EXAMPLE, v as SecretReferenceChips };
@@ -15,6 +15,15 @@ interface CredentialStorageSelectorProps {
15
15
  canCreateVault: boolean;
16
16
  translate: Translator;
17
17
  disabled?: boolean;
18
+ /**
19
+ * Navigation v2's one-screen connect form (BOFF-11875): when a vault is
20
+ * needed and none is picked, pick the workspace's default vault (one named
21
+ * "Default", else the first) so the person makes no storage decision. The
22
+ * credential is stored exactly as if they had picked it themselves.
23
+ */
24
+ autoSelectVault?: boolean;
25
+ /** Reports how many vaults the person can use, once they have loaded. */
26
+ onVaultsLoaded?: (count: number) => void;
18
27
  }
19
28
  export declare const CredentialStorageSelector: FC<CredentialStorageSelectorProps>;
20
29
  export {};