@burdenoff/fe-libs 2026.810.2 → 2026.810.3
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/credentials/AuthMethodSelector.d.ts +19 -0
- package/dist/credentials/AuthMethodSelector.d.ts.map +1 -1
- package/dist/credentials/AuthMethodSelector.js +41 -39
- package/dist/credentials/index.d.ts +1 -1
- package/dist/credentials/index.d.ts.map +1 -1
- package/dist/credentials.js +2 -2
- package/package.json +1 -1
|
@@ -6,7 +6,26 @@ interface AuthMethodSelectorProps {
|
|
|
6
6
|
onSelect: (key: string) => void;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
idPrefix?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Bare select, without the label, description or warning.
|
|
11
|
+
*
|
|
12
|
+
* For a section heading row, where the control sits to the right of the
|
|
13
|
+
* heading and the explanatory copy belongs beside the fields it governs —
|
|
14
|
+
* see {@link AuthMethodNotice}. This is the placement n8n uses, and it keeps
|
|
15
|
+
* the choice visible while the fields below it scroll.
|
|
16
|
+
*/
|
|
17
|
+
compact?: boolean;
|
|
9
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* The chosen method's description, and a warning when this environment has no
|
|
21
|
+
* credentials for it.
|
|
22
|
+
*
|
|
23
|
+
* Separate from the selector so the two can be placed apart: the control in a
|
|
24
|
+
* heading row, its consequences next to the fields.
|
|
25
|
+
*/
|
|
26
|
+
export declare const AuthMethodNotice: FC<{
|
|
27
|
+
method: AuthMethodLike | null;
|
|
28
|
+
}>;
|
|
10
29
|
export declare const AuthMethodSelector: FC<AuthMethodSelectorProps>;
|
|
11
30
|
export {};
|
|
12
31
|
//# sourceMappingURL=AuthMethodSelector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthMethodSelector.d.ts","sourceRoot":"","sources":["../../src/credentials/AuthMethodSelector.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,UAAU,uBAAuB;IAC/B,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"AuthMethodSelector.d.ts","sourceRoot":"","sources":["../../src/credentials/AuthMethodSelector.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,UAAU,uBAAuB;IAC/B,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC;IAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CAAA;CAAE,CAuBlE,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA2E1D,CAAC"}
|
|
@@ -1,51 +1,53 @@
|
|
|
1
1
|
import { AlertCircle as e } from "lucide-react";
|
|
2
|
-
import {
|
|
2
|
+
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
3
|
//#region src/credentials/AuthMethodSelector.tsx
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
var i = ({ method: i }) => i ? /* @__PURE__ */ r(t, { children: [i.description && /* @__PURE__ */ n("p", {
|
|
5
|
+
className: "text-xs text-text-secondary",
|
|
6
|
+
children: i.description
|
|
7
|
+
}), !i.isConfigured && /* @__PURE__ */ r("div", {
|
|
8
|
+
className: "flex items-start gap-2 px-3 py-2 rounded-md bg-status-warning-bg-subtle border border-border-default",
|
|
9
|
+
children: [/* @__PURE__ */ n(e, {
|
|
10
|
+
size: 14,
|
|
11
|
+
className: "text-status-warning-text flex-shrink-0 mt-0.5"
|
|
12
|
+
}), /* @__PURE__ */ n("span", {
|
|
13
|
+
className: "text-xs text-status-warning-text",
|
|
14
|
+
children: "This method has no credentials configured in this environment. Ask an administrator to add them, or pick another method."
|
|
15
|
+
})]
|
|
16
|
+
})] }) : null, a = ({ methods: e, selectedKey: t, onSelect: a, disabled: o, idPrefix: s = "auth-method", compact: c = !1 }) => {
|
|
17
|
+
let l = e.filter((e) => e.isEnabled);
|
|
18
|
+
if (l.length <= 1) return null;
|
|
19
|
+
let u = l.find((e) => e.key === t) ?? null, d = /* @__PURE__ */ r("select", {
|
|
20
|
+
id: s,
|
|
21
|
+
"aria-label": "Authentication Method",
|
|
22
|
+
value: u ? u.key : "",
|
|
23
|
+
onChange: (e) => a(e.target.value),
|
|
24
|
+
disabled: o,
|
|
25
|
+
className: c ? "max-w-[16rem] truncate rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50" : "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50",
|
|
26
|
+
children: [!u && /* @__PURE__ */ n("option", {
|
|
27
|
+
value: "",
|
|
28
|
+
disabled: !0,
|
|
29
|
+
children: "Select an authentication method"
|
|
30
|
+
}), l.map((e) => /* @__PURE__ */ r("option", {
|
|
31
|
+
value: e.key,
|
|
32
|
+
disabled: !e.isConfigured,
|
|
33
|
+
children: [e.displayName, e.isConfigured ? "" : " — not configured"]
|
|
34
|
+
}, e.key))]
|
|
35
|
+
});
|
|
36
|
+
return c ? d : /* @__PURE__ */ r("div", { children: [
|
|
37
|
+
/* @__PURE__ */ r("label", {
|
|
10
38
|
htmlFor: s,
|
|
11
39
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
12
|
-
children: ["Authentication Method ", /* @__PURE__ */
|
|
40
|
+
children: ["Authentication Method ", /* @__PURE__ */ n("span", {
|
|
13
41
|
className: "text-status-error-text",
|
|
14
42
|
children: "*"
|
|
15
43
|
})]
|
|
16
44
|
}),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
onChange: (e) => a(e.target.value),
|
|
22
|
-
disabled: o,
|
|
23
|
-
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50",
|
|
24
|
-
children: [!l && /* @__PURE__ */ t("option", {
|
|
25
|
-
value: "",
|
|
26
|
-
disabled: !0,
|
|
27
|
-
children: "Select an authentication method"
|
|
28
|
-
}), c.map((e) => /* @__PURE__ */ n("option", {
|
|
29
|
-
value: e.key,
|
|
30
|
-
disabled: !e.isConfigured,
|
|
31
|
-
children: [e.displayName, e.isConfigured ? "" : " — not configured"]
|
|
32
|
-
}, e.key))]
|
|
33
|
-
}),
|
|
34
|
-
l?.description && /* @__PURE__ */ t("p", {
|
|
35
|
-
className: "mt-1 text-xs text-text-secondary",
|
|
36
|
-
children: l.description
|
|
37
|
-
}),
|
|
38
|
-
l && !l.isConfigured && /* @__PURE__ */ n("div", {
|
|
39
|
-
className: "mt-2 flex items-start gap-2 px-3 py-2 rounded-md bg-status-warning-bg-subtle border border-border-default",
|
|
40
|
-
children: [/* @__PURE__ */ t(e, {
|
|
41
|
-
size: 14,
|
|
42
|
-
className: "text-status-warning-text flex-shrink-0 mt-0.5"
|
|
43
|
-
}), /* @__PURE__ */ t("span", {
|
|
44
|
-
className: "text-xs text-status-warning-text",
|
|
45
|
-
children: "This method has no credentials configured in this environment. Ask an administrator to add them, or pick another method."
|
|
46
|
-
})]
|
|
45
|
+
d,
|
|
46
|
+
/* @__PURE__ */ n("div", {
|
|
47
|
+
className: "mt-1 space-y-2",
|
|
48
|
+
children: /* @__PURE__ */ n(i, { method: u })
|
|
47
49
|
})
|
|
48
50
|
] });
|
|
49
51
|
};
|
|
50
52
|
//#endregion
|
|
51
|
-
export {
|
|
53
|
+
export { i as AuthMethodNotice, a as AuthMethodSelector };
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* catalog change rather than React in each consuming app.
|
|
9
9
|
*/
|
|
10
10
|
export { SchemaForm, parseFormSchema, isSchemaComplete, initialValuesFromSchema, visibleValues, } from './SchemaForm';
|
|
11
|
-
export { AuthMethodSelector } from './AuthMethodSelector';
|
|
11
|
+
export { AuthMethodSelector, AuthMethodNotice } from './AuthMethodSelector';
|
|
12
12
|
export type { AuthMethodFlow, AuthMethodLike, FormSchema, SchemaProperty, } from './types';
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/credentials/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/credentials/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,YAAY,EACV,cAAc,EACd,cAAc,EACd,UAAU,EACV,cAAc,GACf,MAAM,SAAS,CAAC"}
|
package/dist/credentials.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SchemaForm as e, initialValuesFromSchema as t, isSchemaComplete as n, parseFormSchema as r, visibleValues as i } from "./credentials/SchemaForm.js";
|
|
2
|
-
import {
|
|
3
|
-
export { a as AuthMethodSelector, e as SchemaForm, t as initialValuesFromSchema, n as isSchemaComplete, r as parseFormSchema, i as visibleValues };
|
|
2
|
+
import { AuthMethodNotice as a, AuthMethodSelector as o } from "./credentials/AuthMethodSelector.js";
|
|
3
|
+
export { a as AuthMethodNotice, o as AuthMethodSelector, e as SchemaForm, t as initialValuesFromSchema, n as isSchemaComplete, r as parseFormSchema, i as visibleValues };
|