@studiolxd/brand 48.0.0 → 49.0.0
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/CHANGELOG.md +170 -0
- package/dist/_shared/tokens.js +0 -1
- package/dist/_shared/untrustedtext.js +27 -26
- package/dist/_types/atoms/TypingIndicator/TypingIndicator.d.ts +29 -2
- package/dist/_types/messages/BrandMessages.d.ts +25 -1
- package/dist/_types/messages/index.d.ts +1 -1
- package/dist/_types/molecules/AssistantMessage/AssistantMessage.d.ts +15 -1
- package/dist/_types/molecules/ConversationList/ConversationList.d.ts +42 -8
- package/dist/_types/molecules/FilterBar/FilterBar.d.ts +4 -3
- package/dist/_types/molecules/MessageComposer/MessageComposer.d.ts +24 -1
- package/dist/_types/molecules/Pagination/Pagination.d.ts +16 -2
- package/dist/_types/organisms/AnnotationThread/AnnotationThread.d.ts +52 -7
- package/dist/_types/organisms/ConversationThread/ConversationThread.d.ts +26 -3
- package/dist/_types/templates/ChatShell/ChatShell.d.ts +22 -4
- package/dist/_types/templates/ConnectorAuth/ConnectorAuthShell.d.ts +6 -1
- package/dist/_types/templates/ConnectorAuth/ConnectorConsentPage.d.ts +52 -18
- package/dist/_types/templates/ConnectorAuth/ConnectorExternalSignInPage.d.ts +57 -17
- package/dist/_types/templates/ConnectorAuth/ConnectorRejectionPage.d.ts +59 -15
- package/dist/_types/templates/ConnectorAuth/ConnectorRequestSummary.d.ts +43 -12
- package/dist/_types/templates/ConnectorAuth/ConnectorSignInPage.d.ts +46 -12
- package/dist/_types/templates/ConnectorAuth/UntrustedText.d.ts +31 -4
- package/dist/annotation-thread.js +49 -46
- package/dist/assistant-message.js +12 -9
- package/dist/brand.css +2 -4
- package/dist/chat-shell.js +50 -49
- package/dist/connector-consent-page.js +58 -68
- package/dist/connector-external-sign-in-page.js +22 -28
- package/dist/connector-rejection-page.js +31 -62
- package/dist/connector-request-summary.js +22 -20
- package/dist/connector-sign-in-page.js +21 -25
- package/dist/conversation-list.js +56 -55
- package/dist/conversation-thread.js +33 -31
- package/dist/filter-bar.css +1 -1
- package/dist/message-composer.js +38 -37
- package/dist/pagination.js +12 -12
- package/dist/tokens.css +2 -4
- package/dist/typing-indicator.js +12 -9
- package/package.json +1 -1
- package/src/tokens/molecules/filter-bar.css +1 -2
- package/src/tokens/scss/molecules/_filter-bar.scss +1 -2
- package/src/tokens/surface-public.css +0 -1
- package/src/tokens/tokens.json +0 -1
package/dist/chat-shell.js
CHANGED
|
@@ -1,102 +1,103 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './chat-shell.css';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
4
|
+
import { Icon as t } from "./icon.js";
|
|
5
|
+
import { Button as n } from "./button.js";
|
|
6
|
+
import { Sheet as r } from "./sheet.js";
|
|
7
|
+
import { forwardRef as i, useCallback as a, useEffect as o, useState as s } from "react";
|
|
8
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
9
|
//#region src/stories/templates/ChatShell/ChatShell.tsx
|
|
9
|
-
var
|
|
10
|
-
let [
|
|
11
|
-
|
|
12
|
-
}, [
|
|
13
|
-
|
|
14
|
-
let e = window.matchMedia(
|
|
15
|
-
|
|
10
|
+
var u = "(min-width: 1024px)", d = i(function({ list: i, header: d, children: f, composer: p, listLabel: m, listTriggerLabel: h, listOpen: g, onListOpenChange: _, className: v, ...y }, b) {
|
|
11
|
+
let x = e("chatShell"), [S, C] = s(() => typeof window > "u" ? !0 : window.matchMedia(u).matches), [w, T] = s(!1), [E, D] = s(null), O = a((e) => {
|
|
12
|
+
D(e), typeof b == "function" ? b(e) : b && (b.current = e);
|
|
13
|
+
}, [b]);
|
|
14
|
+
o(() => {
|
|
15
|
+
let e = window.matchMedia(u), t = () => {
|
|
16
|
+
C(e.matches), e.matches && T(!1);
|
|
16
17
|
};
|
|
17
18
|
return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
18
19
|
}, []);
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
}, [
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
ref:
|
|
20
|
+
let k = a((e) => {
|
|
21
|
+
g === void 0 && T(e), _?.(e);
|
|
22
|
+
}, [g, _]), A = !S && (g ?? w), j = i != null && S, M = i != null && !S;
|
|
23
|
+
return /* @__PURE__ */ l("div", {
|
|
24
|
+
ref: O,
|
|
24
25
|
className: [
|
|
25
26
|
"chat-shell",
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
j ? "chat-shell--with-list" : "",
|
|
28
|
+
v ?? ""
|
|
28
29
|
].filter(Boolean).join(" "),
|
|
29
|
-
...
|
|
30
|
+
...y,
|
|
30
31
|
children: [
|
|
31
|
-
|
|
32
|
+
j && /* @__PURE__ */ c("aside", {
|
|
32
33
|
className: "chat-shell__list",
|
|
33
|
-
"aria-label":
|
|
34
|
-
children:
|
|
34
|
+
"aria-label": x("list", m),
|
|
35
|
+
children: i
|
|
35
36
|
}),
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ l("div", {
|
|
37
38
|
className: "chat-shell__main",
|
|
38
39
|
children: [
|
|
39
|
-
(
|
|
40
|
+
(d || M) && /* @__PURE__ */ l("header", {
|
|
40
41
|
className: "chat-shell__header",
|
|
41
|
-
children: [
|
|
42
|
+
children: [M && /* @__PURE__ */ c(n, {
|
|
42
43
|
variant: "ghost",
|
|
43
44
|
size: "sm",
|
|
44
45
|
iconOnly: !0,
|
|
45
|
-
"aria-label":
|
|
46
|
+
"aria-label": x("listTrigger", h),
|
|
46
47
|
"aria-haspopup": "dialog",
|
|
47
|
-
"aria-expanded":
|
|
48
|
+
"aria-expanded": A,
|
|
48
49
|
className: "chat-shell__list-trigger",
|
|
49
|
-
onClick: () =>
|
|
50
|
-
children: /* @__PURE__ */
|
|
50
|
+
onClick: () => k(!0),
|
|
51
|
+
children: /* @__PURE__ */ c(t, {
|
|
51
52
|
name: "layout-sidebar",
|
|
52
53
|
size: "sm"
|
|
53
54
|
})
|
|
54
|
-
}),
|
|
55
|
+
}), d && /* @__PURE__ */ c("div", {
|
|
55
56
|
className: "chat-shell__header-content",
|
|
56
|
-
children:
|
|
57
|
+
children: d
|
|
57
58
|
})]
|
|
58
59
|
}),
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ c("div", {
|
|
60
61
|
className: "chat-shell__thread",
|
|
61
|
-
children:
|
|
62
|
+
children: f
|
|
62
63
|
}),
|
|
63
|
-
|
|
64
|
+
p && /* @__PURE__ */ c("div", {
|
|
64
65
|
className: "chat-shell__composer",
|
|
65
|
-
children:
|
|
66
|
+
children: p
|
|
66
67
|
})
|
|
67
68
|
]
|
|
68
69
|
}),
|
|
69
|
-
|
|
70
|
+
M && /* @__PURE__ */ l(r, {
|
|
70
71
|
side: "left",
|
|
71
|
-
open:
|
|
72
|
-
onOpenChange:
|
|
73
|
-
title:
|
|
72
|
+
open: A,
|
|
73
|
+
onOpenChange: k,
|
|
74
|
+
title: x("list", m),
|
|
74
75
|
titleHidden: !0,
|
|
75
|
-
container:
|
|
76
|
+
container: E ?? void 0,
|
|
76
77
|
hideClose: !0,
|
|
77
78
|
className: "chat-shell__drawer",
|
|
78
|
-
children: [/* @__PURE__ */
|
|
79
|
+
children: [/* @__PURE__ */ c("header", {
|
|
79
80
|
className: "chat-shell__header",
|
|
80
|
-
children: /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ c(n, {
|
|
81
82
|
variant: "ghost",
|
|
82
83
|
size: "sm",
|
|
83
84
|
iconOnly: !0,
|
|
84
|
-
"aria-label":
|
|
85
|
+
"aria-label": x("listTrigger", h),
|
|
85
86
|
"aria-expanded": !0,
|
|
86
87
|
className: "chat-shell__list-trigger",
|
|
87
|
-
onClick: () =>
|
|
88
|
-
children: /* @__PURE__ */
|
|
88
|
+
onClick: () => k(!1),
|
|
89
|
+
children: /* @__PURE__ */ c(t, {
|
|
89
90
|
name: "layout-sidebar",
|
|
90
91
|
size: "sm"
|
|
91
92
|
})
|
|
92
93
|
})
|
|
93
|
-
}), /* @__PURE__ */
|
|
94
|
+
}), /* @__PURE__ */ c("div", {
|
|
94
95
|
className: "chat-shell__drawer-list",
|
|
95
|
-
children:
|
|
96
|
+
children: i
|
|
96
97
|
})]
|
|
97
98
|
})
|
|
98
99
|
]
|
|
99
100
|
});
|
|
100
101
|
});
|
|
101
102
|
//#endregion
|
|
102
|
-
export {
|
|
103
|
+
export { d as ChatShell };
|
|
@@ -1,89 +1,79 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import { Paragraph as n } from "./paragraph.js";
|
|
5
|
+
import { Form as r } from "./form.js";
|
|
6
|
+
import { ConnectorAuthShell as i } from "./connector-auth-shell.js";
|
|
7
|
+
import { t as a } from "./_shared/untrustedtext.js";
|
|
8
|
+
import { ConnectorRequestSummary as o } from "./connector-request-summary.js";
|
|
9
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
10
|
//#region src/stories/templates/ConnectorAuth/ConnectorConsentPage.tsx
|
|
10
|
-
function
|
|
11
|
-
e,
|
|
12
|
-
" quiere ",
|
|
13
|
-
t,
|
|
14
|
-
" como ",
|
|
15
|
-
n,
|
|
16
|
-
"."
|
|
17
|
-
] }), redirectNotice: T = ({ host: e }) => /* @__PURE__ */ c(o, { children: [
|
|
18
|
-
"El acceso se enviará a ",
|
|
19
|
-
e,
|
|
20
|
-
". Continúa solo si lo reconoces."
|
|
21
|
-
] }), approveLabel: E = "Permitir acceso", denyLabel: D = "Denegar", scopeReadLabel: O = "leer los datos de este producto", scopeWriteLabel: k = "leer y modificar los datos de este producto", expandLabel: A, collapseLabel: j, valueQuotes: M, summaryLabels: N, links: P, header: F, footer: I, preferences: L, preferencesLabel: R, id: z, shell: B }) {
|
|
22
|
-
let V = m !== void 0, H = f === "read" ? O : k, U = (e) => /* @__PURE__ */ s(i, {
|
|
11
|
+
function u({ clientName: u, productName: d, accountEmail: f, scope: p = "read", redirectHost: m, action: h, hiddenFields: g, decisionName: _ = "decision", approveValue: v = "approve", denyValue: y = "deny", onApprove: b, onDeny: x, denyHref: S, initialFocus: C = "none", title: w, intro: T, redirectNotice: E, approveLabel: D, denyLabel: O, scopeReadLabel: k, scopeWriteLabel: A, expandLabel: j, collapseLabel: M, valueQuotes: N, summaryLabels: P, links: F, header: I, footer: L, preferences: R, preferencesLabel: z, id: B, shell: V }) {
|
|
12
|
+
let H = e("connectorConsent"), U = h !== void 0, W = p === "read" ? k : A, G = (e) => /* @__PURE__ */ c(a, {
|
|
23
13
|
value: e,
|
|
24
|
-
quotes:
|
|
25
|
-
}),
|
|
14
|
+
quotes: N
|
|
15
|
+
}), K = S === void 0 ? /* @__PURE__ */ c(t, {
|
|
26
16
|
variant: "outline",
|
|
27
|
-
type:
|
|
28
|
-
name:
|
|
29
|
-
value:
|
|
30
|
-
onClick:
|
|
31
|
-
autoFocus:
|
|
32
|
-
children:
|
|
33
|
-
}) : /* @__PURE__ */
|
|
17
|
+
type: U ? "submit" : "button",
|
|
18
|
+
name: U ? _ : void 0,
|
|
19
|
+
value: U ? y : void 0,
|
|
20
|
+
onClick: x,
|
|
21
|
+
autoFocus: C === "deny",
|
|
22
|
+
children: H("deny", O)
|
|
23
|
+
}) : /* @__PURE__ */ c(t, {
|
|
34
24
|
variant: "outline",
|
|
35
|
-
href:
|
|
25
|
+
href: S,
|
|
26
|
+
children: H("deny", O)
|
|
27
|
+
}), q = /* @__PURE__ */ c(t, {
|
|
28
|
+
type: U ? "submit" : "button",
|
|
29
|
+
name: U ? _ : void 0,
|
|
30
|
+
value: U ? v : void 0,
|
|
31
|
+
onClick: b,
|
|
36
32
|
children: D
|
|
37
|
-
}), G = /* @__PURE__ */ s(e, {
|
|
38
|
-
type: V ? "submit" : "button",
|
|
39
|
-
name: V ? g : void 0,
|
|
40
|
-
value: V ? _ : void 0,
|
|
41
|
-
onClick: y,
|
|
42
|
-
children: E
|
|
43
33
|
});
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
title:
|
|
46
|
-
description:
|
|
47
|
-
client: /* @__PURE__ */
|
|
48
|
-
what:
|
|
49
|
-
email: /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ c(i, {
|
|
35
|
+
title: w ?? H("title"),
|
|
36
|
+
description: T({
|
|
37
|
+
client: /* @__PURE__ */ c("strong", { children: G(u) }),
|
|
38
|
+
what: W,
|
|
39
|
+
email: /* @__PURE__ */ c("strong", { children: G(f) })
|
|
50
40
|
}),
|
|
51
|
-
header:
|
|
52
|
-
footer:
|
|
53
|
-
preferences:
|
|
54
|
-
preferencesLabel:
|
|
55
|
-
id:
|
|
56
|
-
shell:
|
|
57
|
-
children: /* @__PURE__ */
|
|
41
|
+
header: I,
|
|
42
|
+
footer: L,
|
|
43
|
+
preferences: R,
|
|
44
|
+
preferencesLabel: z,
|
|
45
|
+
id: B,
|
|
46
|
+
shell: V,
|
|
47
|
+
children: /* @__PURE__ */ l(r, {
|
|
58
48
|
size: "lg",
|
|
59
49
|
blockActions: !0,
|
|
60
|
-
method: typeof
|
|
61
|
-
action:
|
|
62
|
-
links:
|
|
63
|
-
actions: /* @__PURE__ */
|
|
50
|
+
method: typeof h == "string" ? "post" : void 0,
|
|
51
|
+
action: h,
|
|
52
|
+
links: F,
|
|
53
|
+
actions: /* @__PURE__ */ l(s, { children: [K, q] }),
|
|
64
54
|
children: [
|
|
65
|
-
|
|
55
|
+
g && Object.entries(g).map(([e, t]) => /* @__PURE__ */ c("input", {
|
|
66
56
|
type: "hidden",
|
|
67
57
|
name: e,
|
|
68
58
|
value: t
|
|
69
59
|
}, e)),
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
clientName:
|
|
72
|
-
productName:
|
|
73
|
-
accountEmail:
|
|
74
|
-
scope:
|
|
75
|
-
redirectHost:
|
|
76
|
-
scopeReadLabel:
|
|
77
|
-
scopeWriteLabel:
|
|
78
|
-
expandLabel:
|
|
79
|
-
collapseLabel:
|
|
80
|
-
valueQuotes:
|
|
81
|
-
...
|
|
60
|
+
/* @__PURE__ */ c(o, {
|
|
61
|
+
clientName: u,
|
|
62
|
+
productName: d,
|
|
63
|
+
accountEmail: f,
|
|
64
|
+
scope: p,
|
|
65
|
+
redirectHost: m,
|
|
66
|
+
scopeReadLabel: k,
|
|
67
|
+
scopeWriteLabel: A,
|
|
68
|
+
expandLabel: j,
|
|
69
|
+
collapseLabel: M,
|
|
70
|
+
valueQuotes: N,
|
|
71
|
+
...P
|
|
82
72
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ c(n, { children: E({ host: /* @__PURE__ */ c("strong", { children: G(m) }) }) })
|
|
84
74
|
]
|
|
85
75
|
})
|
|
86
76
|
});
|
|
87
77
|
}
|
|
88
78
|
//#endregion
|
|
89
|
-
export {
|
|
79
|
+
export { u as ConnectorConsentPage };
|
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import { Stack as n } from "./stack.js";
|
|
5
|
+
import { Paragraph as r } from "./paragraph.js";
|
|
6
|
+
import { Alert as i } from "./alert.js";
|
|
7
|
+
import { Form as a } from "./form.js";
|
|
8
|
+
import { InputField as o } from "./input-field.js";
|
|
9
|
+
import { ConnectorAuthShell as s } from "./connector-auth-shell.js";
|
|
10
|
+
import { t as c } from "./_shared/untrustedtext.js";
|
|
11
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
11
12
|
//#region src/stories/templates/ConnectorAuth/ConnectorExternalSignInPage.tsx
|
|
12
|
-
function d({ platformName: d
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
] }), signingInTo: x = ({ organization: e }) => /* @__PURE__ */ u(c, { children: [
|
|
17
|
-
"Iniciarás sesión en ",
|
|
18
|
-
e,
|
|
19
|
-
"."
|
|
20
|
-
] }), valueQuotes: S, organizationLabel: C = "Tu organización", submitLabel: w = ({ platform: e }) => /* @__PURE__ */ u(c, { children: ["Iniciar sesión con ", e] }), extra: T, links: E, header: D, footer: O, preferences: k, preferencesLabel: A, id: j, shell: M }) {
|
|
21
|
-
return /* @__PURE__ */ l(o, {
|
|
22
|
-
title: y,
|
|
13
|
+
function d({ platformName: d, organization: f, organizationDefaultValue: p, organizationName: m = "org", action: h, onSubmit: g, hiddenFields: _, error: v, title: y, intro: b, signingInTo: x, valueQuotes: S, organizationLabel: C, submitLabel: w, extra: T, links: E, header: D, footer: O, preferences: k, preferencesLabel: A, id: j, shell: M }) {
|
|
14
|
+
let N = e("connectorExternalSignIn");
|
|
15
|
+
return /* @__PURE__ */ l(s, {
|
|
16
|
+
title: y ?? N("title"),
|
|
23
17
|
description: b({ platform: d }),
|
|
24
18
|
header: D,
|
|
25
19
|
footer: O,
|
|
@@ -27,37 +21,37 @@ function d({ platformName: d = "tu Moodle", organization: f, organizationDefault
|
|
|
27
21
|
preferencesLabel: A,
|
|
28
22
|
id: j,
|
|
29
23
|
shell: M,
|
|
30
|
-
children: /* @__PURE__ */ u(
|
|
24
|
+
children: /* @__PURE__ */ u(n, {
|
|
31
25
|
align: "stretch",
|
|
32
26
|
children: [
|
|
33
|
-
v !== void 0 && /* @__PURE__ */ l(
|
|
27
|
+
v !== void 0 && /* @__PURE__ */ l(i, {
|
|
34
28
|
role: "alert",
|
|
35
29
|
variant: "error",
|
|
36
30
|
description: v
|
|
37
31
|
}),
|
|
38
|
-
/* @__PURE__ */ u(
|
|
32
|
+
/* @__PURE__ */ u(a, {
|
|
39
33
|
size: "lg",
|
|
40
34
|
blockActions: !0,
|
|
41
35
|
method: typeof h == "string" ? "post" : void 0,
|
|
42
36
|
action: h,
|
|
43
37
|
onSubmit: g,
|
|
44
38
|
links: E,
|
|
45
|
-
actions: /* @__PURE__ */ l(
|
|
39
|
+
actions: /* @__PURE__ */ l(t, {
|
|
46
40
|
type: "submit",
|
|
47
|
-
children: w(
|
|
41
|
+
children: N("submit", w)(d)
|
|
48
42
|
}),
|
|
49
43
|
children: [_ && Object.entries(_).map(([e, t]) => /* @__PURE__ */ l("input", {
|
|
50
44
|
type: "hidden",
|
|
51
45
|
name: e,
|
|
52
46
|
value: t
|
|
53
|
-
}, e)), f === void 0 ? /* @__PURE__ */ l(
|
|
47
|
+
}, e)), f === void 0 ? /* @__PURE__ */ l(o, {
|
|
54
48
|
id: m,
|
|
55
49
|
name: m,
|
|
56
|
-
label: C,
|
|
50
|
+
label: N("organization", C),
|
|
57
51
|
defaultValue: p,
|
|
58
52
|
autoComplete: "off",
|
|
59
53
|
required: !0
|
|
60
|
-
}) : /* @__PURE__ */ l(
|
|
54
|
+
}) : /* @__PURE__ */ l(r, { children: x({ organization: /* @__PURE__ */ l("strong", { children: /* @__PURE__ */ l(c, {
|
|
61
55
|
value: f,
|
|
62
56
|
quotes: S
|
|
63
57
|
}) }) }) })]
|
|
@@ -1,75 +1,44 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import { Stack as n } from "./stack.js";
|
|
5
|
+
import { Code as r } from "./code.js";
|
|
6
|
+
import { Paragraph as i } from "./paragraph.js";
|
|
7
|
+
import { ConnectorAuthShell as a } from "./connector-auth-shell.js";
|
|
8
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
9
|
//#region src/stories/templates/ConnectorAuth/ConnectorRejectionPage.tsx
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"invalid-redirect-uri": {
|
|
17
|
-
title: "La dirección de retorno no está permitida",
|
|
18
|
-
description: "La herramienta ha pedido que el acceso se envíe a una dirección distinta de la que tiene registrada. No se ha enviado nada a ninguna parte.",
|
|
19
|
-
hint: "Es la comprobación que impide que un acceso legítimo acabe en manos de otro. Si la herramienta es tuya, revisa la dirección de retorno que tiene configurada; si no la reconoces, no vuelvas a intentarlo.",
|
|
20
|
-
retryLabel: "Volver a la herramienta"
|
|
21
|
-
},
|
|
22
|
-
"invalid-request": {
|
|
23
|
-
title: "La petición está incompleta",
|
|
24
|
-
description: "Falta algo en lo que ha pedido la herramienta, o ha llegado alterado por el camino. No se ha concedido ningún acceso.",
|
|
25
|
-
hint: "Vuelve a la herramienta y empieza la conexión de nuevo. Un enlace copiado a mano o reutilizado de otra vez suele acabar así.",
|
|
26
|
-
retryLabel: "Volver a la herramienta"
|
|
27
|
-
},
|
|
28
|
-
"access-denied": {
|
|
29
|
-
title: "No se ha dado acceso",
|
|
30
|
-
description: "La conexión se ha cancelado. La herramienta no ha recibido ningún permiso sobre tus datos.",
|
|
31
|
-
hint: "Puedes cerrar esta pantalla. Si ha sido sin querer, vuelve a la herramienta y pide la conexión otra vez.",
|
|
32
|
-
retryLabel: "Volver a intentarlo"
|
|
33
|
-
},
|
|
34
|
-
"session-expired": {
|
|
35
|
-
title: "La sesión ha caducado",
|
|
36
|
-
description: "Ha pasado demasiado tiempo desde que se abrió esta pantalla, así que la decisión ya no vale.",
|
|
37
|
-
hint: "Inicia sesión otra vez y repite la conexión desde la herramienta. Nada de lo anterior se ha concedido.",
|
|
38
|
-
retryLabel: "Iniciar sesión"
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
function c({ reason: c, title: l, description: u, hint: d, code: f, codeLabel: p = "Código", retryHref: m, onRetry: h, retryLabel: g, retryAction: _, aside: v, header: y, footer: b, preferences: x, preferencesLabel: S, id: C, shell: w }) {
|
|
42
|
-
let T = s[c], E = g ?? T.retryLabel, D = _ ?? (m === void 0 ? h ? /* @__PURE__ */ a(e, {
|
|
43
|
-
onClick: h,
|
|
44
|
-
children: E
|
|
45
|
-
}) : null : /* @__PURE__ */ a(e, {
|
|
46
|
-
href: m,
|
|
47
|
-
children: E
|
|
10
|
+
function c({ title: c, description: l, hint: u, code: d, codeLabel: f, retryHref: p, onRetry: m, retryLabel: h, retryAction: g, aside: _, header: v, footer: y, preferences: b, preferencesLabel: x, id: S, shell: C }) {
|
|
11
|
+
let w = e("connectorRejection"), T = g ?? (p === void 0 ? m ? /* @__PURE__ */ o(t, {
|
|
12
|
+
onClick: m,
|
|
13
|
+
children: h
|
|
14
|
+
}) : null : /* @__PURE__ */ o(t, {
|
|
15
|
+
href: p,
|
|
16
|
+
children: h
|
|
48
17
|
}));
|
|
49
|
-
return /* @__PURE__ */ a
|
|
50
|
-
title:
|
|
51
|
-
description:
|
|
52
|
-
intro:
|
|
18
|
+
return /* @__PURE__ */ o(a, {
|
|
19
|
+
title: c,
|
|
20
|
+
description: l,
|
|
21
|
+
intro: d === void 0 ? void 0 : /* @__PURE__ */ s(i, {
|
|
53
22
|
size: "small",
|
|
54
23
|
children: [
|
|
55
|
-
|
|
24
|
+
w("code", f),
|
|
56
25
|
": ",
|
|
57
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ o(r, { children: d })
|
|
58
27
|
]
|
|
59
28
|
}),
|
|
60
|
-
aside:
|
|
61
|
-
header:
|
|
62
|
-
footer:
|
|
63
|
-
preferences:
|
|
64
|
-
preferencesLabel:
|
|
65
|
-
id:
|
|
66
|
-
shell:
|
|
67
|
-
children: /* @__PURE__ */
|
|
29
|
+
aside: _,
|
|
30
|
+
header: v,
|
|
31
|
+
footer: y,
|
|
32
|
+
preferences: b,
|
|
33
|
+
preferencesLabel: x,
|
|
34
|
+
id: S,
|
|
35
|
+
shell: C,
|
|
36
|
+
children: /* @__PURE__ */ s(n, {
|
|
68
37
|
align: "stretch",
|
|
69
|
-
children: [/* @__PURE__ */
|
|
38
|
+
children: [/* @__PURE__ */ o(i, {
|
|
70
39
|
size: "large",
|
|
71
|
-
children:
|
|
72
|
-
}),
|
|
40
|
+
children: u
|
|
41
|
+
}), T]
|
|
73
42
|
})
|
|
74
43
|
});
|
|
75
44
|
}
|
|
@@ -1,36 +1,38 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import './connector-request-summary.css';
|
|
2
|
-
import {
|
|
3
|
-
import { t as r } from "./
|
|
4
|
-
import {
|
|
3
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
4
|
+
import { DescriptionDetails as t, DescriptionList as n, DescriptionTerm as r } from "./description-list.js";
|
|
5
|
+
import { t as i } from "./_shared/untrustedtext.js";
|
|
6
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
7
|
//#region src/stories/templates/ConnectorAuth/ConnectorRequestSummary.tsx
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
+
function c({ clientName: c, productName: l, accountEmail: u, scope: d, redirectHost: f, clientLabel: p, productLabel: m, accountLabel: h, scopeLabel: g, redirectLabel: _, scopeReadLabel: v, scopeWriteLabel: y, expandLabel: b, collapseLabel: x, valueQuotes: S, className: C }) {
|
|
9
|
+
let w = e("connectorRequestSummary"), T = (e) => /* @__PURE__ */ o(i, {
|
|
8
10
|
value: e,
|
|
9
11
|
expandable: !0,
|
|
10
|
-
expandLabel:
|
|
11
|
-
collapseLabel:
|
|
12
|
-
quotes:
|
|
12
|
+
expandLabel: b,
|
|
13
|
+
collapseLabel: x,
|
|
14
|
+
quotes: S
|
|
13
15
|
});
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
className: ["connector-request-summary",
|
|
16
|
+
return /* @__PURE__ */ s(n, {
|
|
17
|
+
className: ["connector-request-summary", C].filter(Boolean).join(" "),
|
|
16
18
|
children: [
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ o(r, { children: w("client", p) }),
|
|
20
|
+
/* @__PURE__ */ o(t, {
|
|
19
21
|
className: "connector-request-summary__untrusted",
|
|
20
|
-
children:
|
|
22
|
+
children: T(c)
|
|
21
23
|
}),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
l !== void 0 && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(r, { children: w("product", m) }), /* @__PURE__ */ o(t, { children: l })] }),
|
|
25
|
+
u !== void 0 && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(r, { children: w("account", h) }), /* @__PURE__ */ o(t, {
|
|
24
26
|
className: "connector-request-summary__untrusted",
|
|
25
|
-
children:
|
|
27
|
+
children: T(u)
|
|
26
28
|
})] }),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
d !== void 0 && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(r, { children: w("scope", g) }), /* @__PURE__ */ o(t, { children: d === "read" ? v : y })] }),
|
|
30
|
+
f !== void 0 && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(r, { children: w("redirect", _) }), /* @__PURE__ */ o(t, {
|
|
29
31
|
className: "connector-request-summary__untrusted",
|
|
30
|
-
children:
|
|
32
|
+
children: T(f)
|
|
31
33
|
})] })
|
|
32
34
|
]
|
|
33
35
|
});
|
|
34
36
|
}
|
|
35
37
|
//#endregion
|
|
36
|
-
export {
|
|
38
|
+
export { c as ConnectorRequestSummary };
|
|
@@ -1,33 +1,29 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import { Form as n } from "./form.js";
|
|
5
|
+
import { ConnectorAuthShell as r } from "./connector-auth-shell.js";
|
|
6
|
+
import { t as i } from "./_shared/untrustedtext.js";
|
|
7
|
+
import { ConnectorRequestSummary as a } from "./connector-request-summary.js";
|
|
8
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
9
|
//#region src/stories/templates/ConnectorAuth/ConnectorSignInPage.tsx
|
|
9
|
-
function c({ clientName: c, productName: l, scope: u, redirectHost: d, signInHref: f, onSignIn: p, action: m, hiddenFields: h, title: g
|
|
10
|
-
e,
|
|
11
|
-
|
|
12
|
-
t,
|
|
13
|
-
". Identifícate para decidir si le das acceso."
|
|
14
|
-
] }), fallbackProductName: v = "este producto", signInLabel: y = "Iniciar sesión", scopeReadLabel: b, scopeWriteLabel: x, expandLabel: S, collapseLabel: C, valueQuotes: w, summaryLabels: T, links: E, header: D, footer: O, preferences: k, preferencesLabel: A, id: j, shell: M }) {
|
|
15
|
-
let N = m !== void 0, P = f === void 0 ? /* @__PURE__ */ o(e, {
|
|
16
|
-
type: N ? "submit" : "button",
|
|
10
|
+
function c({ clientName: c, productName: l, scope: u, redirectHost: d, signInHref: f, onSignIn: p, action: m, hiddenFields: h, title: g, intro: _, fallbackProductName: v, signInLabel: y, scopeReadLabel: b, scopeWriteLabel: x, expandLabel: S, collapseLabel: C, valueQuotes: w, summaryLabels: T, links: E, header: D, footer: O, preferences: k, preferencesLabel: A, id: j, shell: M }) {
|
|
11
|
+
let N = e("connectorSignIn"), P = m !== void 0, F = f === void 0 ? /* @__PURE__ */ o(t, {
|
|
12
|
+
type: P ? "submit" : "button",
|
|
17
13
|
onClick: p,
|
|
18
|
-
children: y
|
|
19
|
-
}) : /* @__PURE__ */ o(
|
|
14
|
+
children: N("signIn", y)
|
|
15
|
+
}) : /* @__PURE__ */ o(t, {
|
|
20
16
|
href: f,
|
|
21
|
-
children: y
|
|
17
|
+
children: N("signIn", y)
|
|
22
18
|
});
|
|
23
|
-
return /* @__PURE__ */ o(
|
|
24
|
-
title: g,
|
|
19
|
+
return /* @__PURE__ */ o(r, {
|
|
20
|
+
title: g ?? N("title"),
|
|
25
21
|
description: _({
|
|
26
|
-
client: /* @__PURE__ */ o("strong", { children: /* @__PURE__ */ o(
|
|
22
|
+
client: /* @__PURE__ */ o("strong", { children: /* @__PURE__ */ o(i, {
|
|
27
23
|
value: c,
|
|
28
24
|
quotes: w
|
|
29
25
|
}) }),
|
|
30
|
-
product: l ?? v
|
|
26
|
+
product: l ?? v ?? N("fallbackProduct")
|
|
31
27
|
}),
|
|
32
28
|
header: D,
|
|
33
29
|
footer: O,
|
|
@@ -35,18 +31,18 @@ function c({ clientName: c, productName: l, scope: u, redirectHost: d, signInHre
|
|
|
35
31
|
preferencesLabel: A,
|
|
36
32
|
id: j,
|
|
37
33
|
shell: M,
|
|
38
|
-
children: /* @__PURE__ */ s(
|
|
34
|
+
children: /* @__PURE__ */ s(n, {
|
|
39
35
|
size: "lg",
|
|
40
36
|
blockActions: !0,
|
|
41
|
-
method:
|
|
37
|
+
method: P ? "post" : void 0,
|
|
42
38
|
action: m,
|
|
43
39
|
links: E,
|
|
44
|
-
actions:
|
|
40
|
+
actions: F,
|
|
45
41
|
children: [h && Object.entries(h).map(([e, t]) => /* @__PURE__ */ o("input", {
|
|
46
42
|
type: "hidden",
|
|
47
43
|
name: e,
|
|
48
44
|
value: t
|
|
49
|
-
}, e)), /* @__PURE__ */ o(
|
|
45
|
+
}, e)), /* @__PURE__ */ o(a, {
|
|
50
46
|
clientName: c,
|
|
51
47
|
productName: l,
|
|
52
48
|
scope: u,
|