@studiolxd/brand 48.1.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 +137 -0
- 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/MessageComposer/MessageComposer.d.ts +24 -1
- 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/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/message-composer.js +38 -37
- package/dist/typing-indicator.js +12 -9
- package/package.json +1 -1
|
@@ -1,109 +1,112 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import './annotation-thread.css';
|
|
2
|
-
import {
|
|
3
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
4
|
+
import { Tag as t } from "./tag.js";
|
|
3
5
|
import "react";
|
|
4
|
-
import { jsx as
|
|
6
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
7
|
//#region src/stories/organisms/AnnotationThread/AnnotationThread.tsx
|
|
6
|
-
var
|
|
8
|
+
var i = {
|
|
7
9
|
open: "warning",
|
|
8
10
|
acknowledged: "info",
|
|
9
11
|
resolved: "success"
|
|
10
|
-
},
|
|
12
|
+
}, a = {
|
|
11
13
|
day: "numeric",
|
|
12
14
|
month: "short",
|
|
13
15
|
hour: "2-digit",
|
|
14
16
|
minute: "2-digit"
|
|
15
17
|
};
|
|
16
|
-
function
|
|
17
|
-
let o = e.date instanceof Date ? e.date : new Date(e.date), s = new Intl.DateTimeFormat(
|
|
18
|
-
return /* @__PURE__ */
|
|
18
|
+
function o({ entry: e, locale: t, dateFormat: i, editedLabel: a }) {
|
|
19
|
+
let o = e.date instanceof Date ? e.date : new Date(e.date), s = new Intl.DateTimeFormat(t, i).format(o);
|
|
20
|
+
return /* @__PURE__ */ r("article", {
|
|
19
21
|
className: "annotation-thread__item",
|
|
20
22
|
children: [
|
|
21
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ r("header", {
|
|
22
24
|
className: "annotation-thread__header",
|
|
23
25
|
children: [
|
|
24
|
-
e.avatar && /* @__PURE__ */
|
|
26
|
+
e.avatar && /* @__PURE__ */ n("span", {
|
|
25
27
|
className: "annotation-thread__avatar",
|
|
26
28
|
children: e.avatar
|
|
27
29
|
}),
|
|
28
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ n("span", {
|
|
29
31
|
className: "annotation-thread__author",
|
|
30
32
|
children: e.author
|
|
31
33
|
}),
|
|
32
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ n("time", {
|
|
33
35
|
className: "annotation-thread__date",
|
|
34
36
|
dateTime: o.toISOString(),
|
|
35
37
|
children: s
|
|
36
38
|
}),
|
|
37
|
-
e.edited && /* @__PURE__ */
|
|
39
|
+
e.edited && /* @__PURE__ */ n("span", {
|
|
38
40
|
className: "annotation-thread__edited",
|
|
39
|
-
children: a
|
|
41
|
+
children: a()
|
|
40
42
|
}),
|
|
41
|
-
e.meta && /* @__PURE__ */
|
|
43
|
+
e.meta && /* @__PURE__ */ n("span", {
|
|
42
44
|
className: "annotation-thread__meta",
|
|
43
45
|
children: e.meta
|
|
44
46
|
})
|
|
45
47
|
]
|
|
46
48
|
}),
|
|
47
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ n("div", {
|
|
48
50
|
className: "annotation-thread__body",
|
|
49
51
|
children: e.body
|
|
50
52
|
}),
|
|
51
|
-
e.actions && /* @__PURE__ */
|
|
53
|
+
e.actions && /* @__PURE__ */ n("div", {
|
|
52
54
|
className: "annotation-thread__item-actions",
|
|
53
55
|
children: e.actions
|
|
54
56
|
})
|
|
55
57
|
]
|
|
56
58
|
});
|
|
57
59
|
}
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
+
function s({ annotation: s, replies: c = [], status: l = "open", actions: u, reply: d, locale: f = "es-ES", dateFormat: p = a, openLabel: m, acknowledgedLabel: h, resolvedLabel: g, editedLabel: _, repliesLabel: v, label: y, className: b, ...x }) {
|
|
61
|
+
let S = e("annotationThread");
|
|
62
|
+
return /* @__PURE__ */ r("article", {
|
|
60
63
|
className: [
|
|
61
64
|
"annotation-thread",
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
l === "open" ? "" : `annotation-thread--${l}`,
|
|
66
|
+
b ?? ""
|
|
64
67
|
].filter(Boolean).join(" "),
|
|
65
|
-
"aria-label":
|
|
66
|
-
...
|
|
68
|
+
"aria-label": S("label", y),
|
|
69
|
+
...x,
|
|
67
70
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ n("div", {
|
|
69
72
|
className: "annotation-thread__status",
|
|
70
|
-
children: /* @__PURE__ */ t
|
|
71
|
-
variant:
|
|
73
|
+
children: /* @__PURE__ */ n(t, {
|
|
74
|
+
variant: i[l],
|
|
72
75
|
children: {
|
|
73
|
-
open:
|
|
74
|
-
acknowledged:
|
|
75
|
-
resolved:
|
|
76
|
-
}[
|
|
76
|
+
open: () => S("open", m),
|
|
77
|
+
acknowledged: () => S("acknowledged", h),
|
|
78
|
+
resolved: () => S("resolved", g)
|
|
79
|
+
}[l]()
|
|
77
80
|
})
|
|
78
81
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
entry:
|
|
81
|
-
locale:
|
|
82
|
-
dateFormat:
|
|
83
|
-
editedLabel:
|
|
82
|
+
/* @__PURE__ */ n(o, {
|
|
83
|
+
entry: s,
|
|
84
|
+
locale: f,
|
|
85
|
+
dateFormat: p,
|
|
86
|
+
editedLabel: () => S("edited", _)
|
|
84
87
|
}),
|
|
85
|
-
|
|
88
|
+
c.length > 0 && /* @__PURE__ */ r("div", {
|
|
86
89
|
className: "annotation-thread__replies",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
90
|
+
children: [/* @__PURE__ */ n("p", {
|
|
88
91
|
className: "annotation-thread__replies-label",
|
|
89
|
-
children:
|
|
90
|
-
}),
|
|
92
|
+
children: S("replies", v)(c.length)
|
|
93
|
+
}), c.map((e) => /* @__PURE__ */ n(o, {
|
|
91
94
|
entry: e,
|
|
92
|
-
locale:
|
|
93
|
-
dateFormat:
|
|
94
|
-
editedLabel:
|
|
95
|
+
locale: f,
|
|
96
|
+
dateFormat: p,
|
|
97
|
+
editedLabel: () => S("edited", _)
|
|
95
98
|
}, e.id))]
|
|
96
99
|
}),
|
|
97
|
-
|
|
100
|
+
d && /* @__PURE__ */ n("div", {
|
|
98
101
|
className: "annotation-thread__reply",
|
|
99
|
-
children:
|
|
102
|
+
children: d
|
|
100
103
|
}),
|
|
101
|
-
|
|
104
|
+
u && /* @__PURE__ */ n("footer", {
|
|
102
105
|
className: "annotation-thread__actions",
|
|
103
|
-
children:
|
|
106
|
+
children: u
|
|
104
107
|
})
|
|
105
108
|
]
|
|
106
109
|
});
|
|
107
110
|
}
|
|
108
111
|
//#endregion
|
|
109
|
-
export {
|
|
112
|
+
export { s as AnnotationThread };
|
|
@@ -5,12 +5,12 @@ import { t as n } from "./_shared/messagetimestamp.js";
|
|
|
5
5
|
import { forwardRef as r } from "react";
|
|
6
6
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
7
|
//#region src/stories/molecules/AssistantMessage/AssistantMessage.tsx
|
|
8
|
-
var o = r(function({ children: r, model: o, timestamp: s, locale: c, timestampFormat: l, isStreaming: u = !1,
|
|
9
|
-
let
|
|
8
|
+
var o = r(function({ children: r, model: o, timestamp: s, locale: c, timestampFormat: l, isStreaming: u = !1, streamingName: d, streamingLabel: f, className: p, ...m }, h) {
|
|
9
|
+
let g = n(s, c, l);
|
|
10
10
|
return /* @__PURE__ */ a("div", {
|
|
11
|
-
ref:
|
|
12
|
-
className: `assistant-message${
|
|
13
|
-
...
|
|
11
|
+
ref: h,
|
|
12
|
+
className: `assistant-message${p ? ` ${p}` : ""}`,
|
|
13
|
+
...m,
|
|
14
14
|
children: [
|
|
15
15
|
o && /* @__PURE__ */ i("span", {
|
|
16
16
|
className: "assistant-message__model",
|
|
@@ -18,12 +18,15 @@ var o = r(function({ children: r, model: o, timestamp: s, locale: c, timestampFo
|
|
|
18
18
|
}),
|
|
19
19
|
/* @__PURE__ */ i(e, {
|
|
20
20
|
role: "assistant",
|
|
21
|
-
children: u ? /* @__PURE__ */ i(t, {
|
|
21
|
+
children: u ? /* @__PURE__ */ i(t, {
|
|
22
|
+
name: d,
|
|
23
|
+
label: f
|
|
24
|
+
}) : r
|
|
22
25
|
}),
|
|
23
|
-
|
|
26
|
+
g && !u && /* @__PURE__ */ i("time", {
|
|
24
27
|
className: "assistant-message__timestamp",
|
|
25
|
-
dateTime:
|
|
26
|
-
children:
|
|
28
|
+
dateTime: g.dateTime,
|
|
29
|
+
children: g.label
|
|
27
30
|
})
|
|
28
31
|
]
|
|
29
32
|
});
|
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
|
}) }) }) })]
|