@logora/debate 0.4.51 → 0.4.52
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.
|
@@ -9,9 +9,10 @@ import { EMAIL_CONSENT_STORAGE_KEY as H } from "../use_auth/useAuthActions.js";
|
|
|
9
9
|
import { Icon as K } from "../../icons/icon/Icon.js";
|
|
10
10
|
import { Button as V } from "../../action/button/Button.js";
|
|
11
11
|
import { Toggle as W } from "../../input/toggle/Toggle.js";
|
|
12
|
-
|
|
12
|
+
import { utf8ToBase64url as $ } from "../use_auth/base64.js";
|
|
13
|
+
const ie = ({
|
|
13
14
|
authType: v,
|
|
14
|
-
providerName:
|
|
15
|
+
providerName: c,
|
|
15
16
|
loginUrl: M,
|
|
16
17
|
signupUrl: b,
|
|
17
18
|
termsUrl: N,
|
|
@@ -20,25 +21,25 @@ const oe = ({
|
|
|
20
21
|
oAuthRedirectUri: y,
|
|
21
22
|
scope: I,
|
|
22
23
|
redirectParameter: f = "logora_redirect",
|
|
23
|
-
trackingParameters:
|
|
24
|
-
hideActions:
|
|
24
|
+
trackingParameters: P = {},
|
|
25
|
+
hideActions: U = !1,
|
|
25
26
|
hideLoginButton: k = !1,
|
|
26
27
|
showEmailConsent: g = !1,
|
|
27
28
|
showTerms: L = !1,
|
|
28
|
-
hideBelowButton:
|
|
29
|
-
error:
|
|
29
|
+
hideBelowButton: x = !1,
|
|
30
|
+
error: R = !1
|
|
30
31
|
}) => {
|
|
31
|
-
const [h,
|
|
32
|
-
}], o = Y(),
|
|
32
|
+
const [h, T] = g ? G(H, !1) : [!1, () => {
|
|
33
|
+
}], o = Y(), d = z(), A = (t) => {
|
|
33
34
|
if (typeof window < "u") {
|
|
34
|
-
const s = t === "CURRENT_LOCATION" ? window.location : t, i = new URL(s, window.location.origin), l = i.searchParams, E = new URLSearchParams(
|
|
35
|
+
const s = t === "CURRENT_LOCATION" ? window.location : t, i = new URL(s, window.location.origin), l = i.searchParams, E = new URLSearchParams(d.search);
|
|
35
36
|
l.has("code") && l.delete("code"), f && l.append(f, window.location.toString());
|
|
36
|
-
for (const [_, F] of Object.entries(
|
|
37
|
+
for (const [_, F] of Object.entries(P)) {
|
|
37
38
|
let r = F;
|
|
38
39
|
if (r) {
|
|
39
|
-
const j =
|
|
40
|
+
const j = d.pathname.slice(
|
|
40
41
|
0,
|
|
41
|
-
|
|
42
|
+
d.pathname.lastIndexOf("/")
|
|
42
43
|
);
|
|
43
44
|
r = r.replace(
|
|
44
45
|
"{{UTM_CAMPAIGN}}",
|
|
@@ -48,19 +49,19 @@ const oe = ({
|
|
|
48
49
|
decodeURIComponent(j)
|
|
49
50
|
);
|
|
50
51
|
}
|
|
51
|
-
_ === "metadata" && r && (r =
|
|
52
|
+
_ === "metadata" && r && (r = $(r)), l.append(_, r);
|
|
52
53
|
}
|
|
53
54
|
return i.search = l.toString(), i.toString();
|
|
54
55
|
}
|
|
55
56
|
return "";
|
|
56
|
-
},
|
|
57
|
+
}, C = (t) => {
|
|
57
58
|
const s = new URL(t);
|
|
58
59
|
if (s.searchParams.delete("code"), s.searchParams.append("client_id", S), s.searchParams.append("redirect_uri", y), s.searchParams.append("scope", I), s.searchParams.append("response_type", "code"), typeof window < "u") {
|
|
59
60
|
const i = new URL(window.location.href);
|
|
60
61
|
i.searchParams.delete("code"), s.searchParams.append("state", window.btoa(i.toString()));
|
|
61
62
|
}
|
|
62
63
|
return s.href;
|
|
63
|
-
}, p = (t) => v === "oauth2_server" ?
|
|
64
|
+
}, p = (t) => v === "oauth2_server" ? C(t) : A(t), B = p(M), O = p(b);
|
|
64
65
|
return /* @__PURE__ */ n("div", { className: a.ssoForm, children: [
|
|
65
66
|
/* @__PURE__ */ e("div", { className: a.logo, children: u ? /* @__PURE__ */ e(
|
|
66
67
|
"img",
|
|
@@ -69,7 +70,7 @@ const oe = ({
|
|
|
69
70
|
width: 100,
|
|
70
71
|
className: a.logoImage,
|
|
71
72
|
src: u,
|
|
72
|
-
alt: `Logo ${
|
|
73
|
+
alt: `Logo ${c}`
|
|
73
74
|
}
|
|
74
75
|
) : /* @__PURE__ */ e(
|
|
75
76
|
K,
|
|
@@ -94,17 +95,17 @@ const oe = ({
|
|
|
94
95
|
id: "auth.sso_form.subtitle",
|
|
95
96
|
defaultMessage: "Sign up right now and receive alerts by email."
|
|
96
97
|
},
|
|
97
|
-
{ provider:
|
|
98
|
+
{ provider: c }
|
|
98
99
|
)
|
|
99
100
|
] }),
|
|
100
|
-
|
|
101
|
+
U ? null : /* @__PURE__ */ n(m, { children: [
|
|
101
102
|
/* @__PURE__ */ e(
|
|
102
103
|
V,
|
|
103
104
|
{
|
|
104
105
|
"data-tid": "link_signup",
|
|
105
106
|
"data-testid": "signup-button",
|
|
106
107
|
className: a.loginButton,
|
|
107
|
-
to:
|
|
108
|
+
to: O,
|
|
108
109
|
external: !0,
|
|
109
110
|
border: !1,
|
|
110
111
|
children: o.formatMessage({
|
|
@@ -113,7 +114,7 @@ const oe = ({
|
|
|
113
114
|
})
|
|
114
115
|
}
|
|
115
116
|
),
|
|
116
|
-
|
|
117
|
+
x ? null : /* @__PURE__ */ n(m, { children: [
|
|
117
118
|
k === !0 ? null : /* @__PURE__ */ n("div", { className: a.cgu, children: [
|
|
118
119
|
o.formatMessage({
|
|
119
120
|
id: "auth.sso_form.already_account",
|
|
@@ -126,7 +127,7 @@ const oe = ({
|
|
|
126
127
|
"data-testid": "signin-link",
|
|
127
128
|
"data-tid": "link_login",
|
|
128
129
|
rel: "nofollow",
|
|
129
|
-
href:
|
|
130
|
+
href: B,
|
|
130
131
|
children: o.formatMessage({
|
|
131
132
|
id: "auth.sso_form.signin",
|
|
132
133
|
defaultMessage: "Sign in"
|
|
@@ -146,13 +147,13 @@ const oe = ({
|
|
|
146
147
|
id: "auth.sso_form.consent_label",
|
|
147
148
|
defaultMessage: "I agree to receive emails from the editor"
|
|
148
149
|
},
|
|
149
|
-
{ variable:
|
|
150
|
+
{ variable: c }
|
|
150
151
|
),
|
|
151
|
-
onInputChanged: (t) =>
|
|
152
|
+
onInputChanged: (t) => T(!h),
|
|
152
153
|
"data-testid": "accepts-email-input"
|
|
153
154
|
}
|
|
154
155
|
) }) : null,
|
|
155
|
-
|
|
156
|
+
R ? /* @__PURE__ */ e("div", { className: a.error, children: o.formatMessage({
|
|
156
157
|
id: "auth.sso_form.error",
|
|
157
158
|
defaultMessage: "An error occurred during sign in. Please try again in a few moments."
|
|
158
159
|
}) }) : null,
|
|
@@ -189,5 +190,5 @@ const oe = ({
|
|
|
189
190
|
] });
|
|
190
191
|
};
|
|
191
192
|
export {
|
|
192
|
-
|
|
193
|
+
ie as SSOForm
|
|
193
194
|
};
|
|
@@ -1,250 +1,249 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { $isListNode as
|
|
1
|
+
import { jsxs as R, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { $isListNode as B, ListNode as Y, INSERT_ORDERED_LIST_COMMAND as Z, $isListItemNode as $, $createListNode as ee } from "@lexical/list";
|
|
3
3
|
import { useLexicalComposerContext as te } from "@lexical/react/LexicalComposerContext";
|
|
4
|
-
import { $isHeadingNode as oe, $createQuoteNode as
|
|
5
|
-
import { $setBlocksType as
|
|
4
|
+
import { $isHeadingNode as oe, $createQuoteNode as q } from "@lexical/rich-text";
|
|
5
|
+
import { $setBlocksType as K } from "@lexical/selection";
|
|
6
6
|
import { $getNearestNodeOfType as ne, mergeRegister as ie } from "@lexical/utils";
|
|
7
|
-
import
|
|
8
|
-
import { $getSelection as M, $isRangeSelection as I, SELECTION_CHANGE_COMMAND as
|
|
9
|
-
import { useRef as x, useState as N, useCallback as re, useEffect as
|
|
7
|
+
import l from "classnames";
|
|
8
|
+
import { $getSelection as M, $isRangeSelection as I, SELECTION_CHANGE_COMMAND as le, FORMAT_TEXT_COMMAND as ae, $createParagraphNode as F } from "lexical";
|
|
9
|
+
import { useRef as x, useState as N, useCallback as re, useEffect as U } from "react";
|
|
10
10
|
import { useIntl as se } from "react-intl";
|
|
11
11
|
import t from "./ToolbarPlugin.module.scss.js";
|
|
12
12
|
import { Icon as f } from "../../../icons/icon/Icon.js";
|
|
13
13
|
import { Button as ce } from "../../../action/button/Button.js";
|
|
14
|
-
const
|
|
15
|
-
const d = se(),
|
|
14
|
+
const Ce = (a) => {
|
|
15
|
+
const d = se(), j = 1, [r] = te(), H = x(null), [T, S] = N("paragraph"), [de, Q] = N(null), [V, L] = N(!1), [z, A] = N(!1), [G, v] = N(!1), D = a.hideSubmit && a.hideSourceAction && a.disableRichText, _ = re(() => {
|
|
16
16
|
const e = M();
|
|
17
17
|
if (I(e)) {
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
if (
|
|
21
|
-
const o = ne(
|
|
18
|
+
const n = e.anchor.getNode(), s = n.getKey() === "root" ? n : n.getTopLevelElementOrThrow(), u = s.getKey();
|
|
19
|
+
if (r.getElementByKey(u) !== null)
|
|
20
|
+
if (Q(u), B(s)) {
|
|
21
|
+
const o = ne(n, Y), p = o ? o.getTag() : s.getTag();
|
|
22
22
|
S(p);
|
|
23
23
|
} else {
|
|
24
|
-
const o = oe(
|
|
24
|
+
const o = oe(s) ? s.getTag() : s.getType();
|
|
25
25
|
S(o);
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
L(e.hasFormat("bold")), A(e.hasFormat("italic")), v(e.hasFormat("underline"));
|
|
28
28
|
}
|
|
29
|
-
}, [
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
}, [r]);
|
|
30
|
+
U(() => ie(
|
|
31
|
+
r.registerUpdateListener(({ editorState: e }) => {
|
|
32
32
|
e.read(() => {
|
|
33
33
|
_();
|
|
34
34
|
});
|
|
35
35
|
}),
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
r.registerCommand(
|
|
37
|
+
le,
|
|
38
38
|
() => (_(), !1),
|
|
39
|
-
|
|
39
|
+
j
|
|
40
40
|
)
|
|
41
|
-
), [
|
|
42
|
-
const y = x(!1),
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
), [r, _]);
|
|
42
|
+
const y = x(!1), c = x(null);
|
|
43
|
+
U(() => () => {
|
|
44
|
+
c.current && clearTimeout(c.current);
|
|
45
45
|
}, []);
|
|
46
|
-
const g = (e,
|
|
47
|
-
|
|
48
|
-
y.current = !1,
|
|
46
|
+
const g = (e, n) => {
|
|
47
|
+
(e.pointerType === "touch" || e.pointerType === "pen") && (e.preventDefault(), y.current = !0, n(), c.current && clearTimeout(c.current), c.current = setTimeout(() => {
|
|
48
|
+
y.current = !1, c.current = null;
|
|
49
49
|
}, 500));
|
|
50
50
|
}, h = (e) => {
|
|
51
51
|
if (y.current) {
|
|
52
|
-
y.current = !1,
|
|
52
|
+
y.current = !1, c.current && (clearTimeout(c.current), c.current = null);
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
55
|
e();
|
|
56
|
-
},
|
|
56
|
+
}, C = () => {
|
|
57
57
|
setTimeout(() => {
|
|
58
|
-
|
|
58
|
+
r.getEditorState().read(() => {
|
|
59
59
|
_();
|
|
60
60
|
});
|
|
61
61
|
}, 0);
|
|
62
62
|
}, b = (e) => {
|
|
63
|
-
|
|
63
|
+
r.dispatchCommand(ae, e), e === "bold" ? L((n) => !n) : e === "italic" ? A((n) => !n) : e === "underline" && v((n) => !n), C();
|
|
64
64
|
}, X = () => {
|
|
65
|
-
|
|
65
|
+
r.update(() => {
|
|
66
66
|
const e = M();
|
|
67
67
|
if (!I(e))
|
|
68
68
|
return;
|
|
69
|
-
const
|
|
70
|
-
for (const m of
|
|
69
|
+
const n = e.getNodes(), s = /* @__PURE__ */ new Set();
|
|
70
|
+
for (const m of n) {
|
|
71
71
|
let o = m;
|
|
72
|
-
for (; o !== null &&
|
|
72
|
+
for (; o !== null && !$(o); )
|
|
73
73
|
o = o.getParent();
|
|
74
|
-
|
|
74
|
+
$(o) && s.add(o);
|
|
75
75
|
}
|
|
76
|
-
const u = Array.from(
|
|
76
|
+
const u = Array.from(s).reverse();
|
|
77
77
|
for (const m of u) {
|
|
78
78
|
const o = m.getParent();
|
|
79
|
-
if (!
|
|
79
|
+
if (!B(o))
|
|
80
80
|
continue;
|
|
81
|
-
const p =
|
|
82
|
-
for (const
|
|
83
|
-
p.append(
|
|
84
|
-
const
|
|
85
|
-
if (o.insertAfter(p),
|
|
86
|
-
const
|
|
87
|
-
for (const W of
|
|
88
|
-
|
|
89
|
-
p.insertAfter(
|
|
81
|
+
const p = F(), J = m.getChildren();
|
|
82
|
+
for (const w of J)
|
|
83
|
+
p.append(w);
|
|
84
|
+
const k = m.getNextSiblings();
|
|
85
|
+
if (o.insertAfter(p), k.length > 0) {
|
|
86
|
+
const w = k[0].getValue(), P = ee(o.getListType(), w);
|
|
87
|
+
for (const W of k)
|
|
88
|
+
P.append(W);
|
|
89
|
+
p.insertAfter(P);
|
|
90
90
|
}
|
|
91
91
|
m.remove(), o.getChildrenSize() === 0 && o.remove();
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
|
-
},
|
|
95
|
-
T !== "ol" ?
|
|
96
|
-
},
|
|
97
|
-
T !== "quote" ?
|
|
94
|
+
}, E = () => {
|
|
95
|
+
T !== "ol" ? r.dispatchCommand(Z) : X(), C();
|
|
96
|
+
}, O = () => {
|
|
97
|
+
T !== "quote" ? r.update(() => {
|
|
98
98
|
const e = M();
|
|
99
99
|
if (I(e))
|
|
100
100
|
if (e.isCollapsed()) {
|
|
101
|
-
const
|
|
102
|
-
|
|
101
|
+
const s = e.anchor.getNode().getTopLevelElementOrThrow(), u = q();
|
|
102
|
+
s.insertAfter(u), u.selectEnd();
|
|
103
103
|
} else
|
|
104
|
-
|
|
105
|
-
}) :
|
|
104
|
+
K(e, () => q());
|
|
105
|
+
}) : r.update(() => {
|
|
106
106
|
const e = M();
|
|
107
|
-
I(e) &&
|
|
108
|
-
}),
|
|
107
|
+
I(e) && K(e, () => F());
|
|
108
|
+
}), C();
|
|
109
109
|
};
|
|
110
|
-
return
|
|
110
|
+
return D ? null : /* @__PURE__ */ R(
|
|
111
111
|
"div",
|
|
112
112
|
{
|
|
113
|
-
className:
|
|
114
|
-
[t.toolbarIsActive]:
|
|
113
|
+
className: l(t.toolbar, {
|
|
114
|
+
[t.toolbarIsActive]: D ? !1 : a.isActive
|
|
115
115
|
}),
|
|
116
|
-
ref:
|
|
116
|
+
ref: H,
|
|
117
117
|
children: [
|
|
118
|
-
a.isActive ? !a.disableRichText && /* @__PURE__ */
|
|
118
|
+
a.isActive ? !a.disableRichText && /* @__PURE__ */ R(
|
|
119
119
|
"div",
|
|
120
120
|
{
|
|
121
|
-
className:
|
|
121
|
+
className: l(t.iconToolbar, {
|
|
122
122
|
[t.shortBar]: a.shortBar
|
|
123
123
|
}),
|
|
124
124
|
children: [
|
|
125
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ i(
|
|
126
126
|
"button",
|
|
127
127
|
{
|
|
128
128
|
onPointerDown: (e) => g(e, () => b("bold")),
|
|
129
129
|
onClick: () => h(() => b("bold")),
|
|
130
130
|
type: "button",
|
|
131
|
-
className:
|
|
131
|
+
className: l(t.toolbarItem, { [t.active]: V }),
|
|
132
132
|
"data-testid": "format-bold",
|
|
133
133
|
"aria-label": d.formatMessage({
|
|
134
134
|
id: "input.text_editor.plugins.toolbar_plugin.bold.aria_label",
|
|
135
135
|
defaultMessage: "Make text bold"
|
|
136
136
|
}),
|
|
137
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ i(
|
|
138
138
|
f,
|
|
139
139
|
{
|
|
140
140
|
name: "bold",
|
|
141
141
|
width: 24,
|
|
142
142
|
height: 24,
|
|
143
|
-
className:
|
|
143
|
+
className: l(t.format, t.bold)
|
|
144
144
|
}
|
|
145
145
|
)
|
|
146
146
|
}
|
|
147
147
|
),
|
|
148
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ i(
|
|
149
149
|
"button",
|
|
150
150
|
{
|
|
151
151
|
onPointerDown: (e) => g(e, () => b("italic")),
|
|
152
152
|
onClick: () => h(() => b("italic")),
|
|
153
153
|
type: "button",
|
|
154
|
-
className:
|
|
155
|
-
[t.active]:
|
|
154
|
+
className: l(t.toolbarItem, {
|
|
155
|
+
[t.active]: z
|
|
156
156
|
}),
|
|
157
157
|
"aria-label": d.formatMessage({
|
|
158
158
|
id: "input.text_editor.plugins.toolbar_plugin.italic.aria_label",
|
|
159
159
|
defaultMessage: "Make text italic"
|
|
160
160
|
}),
|
|
161
|
-
children: /* @__PURE__ */
|
|
161
|
+
children: /* @__PURE__ */ i(
|
|
162
162
|
f,
|
|
163
163
|
{
|
|
164
164
|
name: "italic",
|
|
165
165
|
width: 24,
|
|
166
166
|
height: 24,
|
|
167
|
-
className:
|
|
167
|
+
className: l(t.format, t.italic)
|
|
168
168
|
}
|
|
169
169
|
)
|
|
170
170
|
}
|
|
171
171
|
),
|
|
172
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ i(
|
|
173
173
|
"button",
|
|
174
174
|
{
|
|
175
175
|
onPointerDown: (e) => g(e, () => b("underline")),
|
|
176
176
|
onClick: () => h(() => b("underline")),
|
|
177
177
|
type: "button",
|
|
178
|
-
className:
|
|
179
|
-
[t.active]:
|
|
178
|
+
className: l(t.toolbarItem, {
|
|
179
|
+
[t.active]: G
|
|
180
180
|
}),
|
|
181
181
|
"aria-label": d.formatMessage({
|
|
182
182
|
id: "input.text_editor.plugins.toolbar_plugin.underline.aria_label",
|
|
183
183
|
defaultMessage: "Underline text"
|
|
184
184
|
}),
|
|
185
|
-
children: /* @__PURE__ */
|
|
185
|
+
children: /* @__PURE__ */ i(
|
|
186
186
|
f,
|
|
187
187
|
{
|
|
188
188
|
name: "underline",
|
|
189
189
|
width: 24,
|
|
190
190
|
height: 24,
|
|
191
|
-
className:
|
|
191
|
+
className: l(t.format, t.underline)
|
|
192
192
|
}
|
|
193
193
|
)
|
|
194
194
|
}
|
|
195
195
|
),
|
|
196
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ i(
|
|
197
197
|
"button",
|
|
198
198
|
{
|
|
199
|
-
onPointerDown: (e) => g(e, () =>
|
|
200
|
-
onClick: () => h(() =>
|
|
199
|
+
onPointerDown: (e) => g(e, () => O()),
|
|
200
|
+
onClick: () => h(() => O()),
|
|
201
201
|
type: "button",
|
|
202
|
-
className:
|
|
202
|
+
className: l(t.toolbarItem, {
|
|
203
203
|
[t.active]: T === "quote"
|
|
204
204
|
}),
|
|
205
205
|
"aria-label": d.formatMessage({
|
|
206
206
|
id: "input.text_editor.plugins.toolbar_plugin.blockquote.aria_label",
|
|
207
207
|
defaultMessage: "Add a blockquote"
|
|
208
208
|
}),
|
|
209
|
-
children: /* @__PURE__ */
|
|
209
|
+
children: /* @__PURE__ */ i(
|
|
210
210
|
f,
|
|
211
211
|
{
|
|
212
212
|
name: "blockquote",
|
|
213
213
|
width: 24,
|
|
214
214
|
height: 24,
|
|
215
|
-
className:
|
|
215
|
+
className: l(t.format, t.quote)
|
|
216
216
|
}
|
|
217
217
|
)
|
|
218
218
|
}
|
|
219
219
|
),
|
|
220
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ i(
|
|
221
221
|
"button",
|
|
222
222
|
{
|
|
223
|
-
onPointerDown: (e) => g(e, () =>
|
|
224
|
-
onClick: () => h(() =>
|
|
223
|
+
onPointerDown: (e) => g(e, () => E()),
|
|
224
|
+
onClick: () => h(() => E()),
|
|
225
225
|
type: "button",
|
|
226
|
-
className:
|
|
226
|
+
className: l(t.toolbarItem, {
|
|
227
227
|
[t.active]: T === "ol"
|
|
228
228
|
}),
|
|
229
229
|
"aria-label": d.formatMessage({
|
|
230
230
|
id: "input.text_editor.plugins.toolbar_plugin.numbered_list.aria_label",
|
|
231
231
|
defaultMessage: "Insert a numbered list"
|
|
232
232
|
}),
|
|
233
|
-
children: /* @__PURE__ */
|
|
233
|
+
children: /* @__PURE__ */ i(
|
|
234
234
|
f,
|
|
235
235
|
{
|
|
236
236
|
name: "orderedList",
|
|
237
237
|
width: 24,
|
|
238
238
|
height: 24,
|
|
239
|
-
className:
|
|
239
|
+
className: l(t.format, t.numberedList)
|
|
240
240
|
}
|
|
241
241
|
)
|
|
242
242
|
}
|
|
243
243
|
),
|
|
244
|
-
!a.hideSourceAction && /* @__PURE__ */
|
|
244
|
+
!a.hideSourceAction && /* @__PURE__ */ i(
|
|
245
245
|
"button",
|
|
246
246
|
{
|
|
247
|
-
onPointerDown: (e) => e.preventDefault(),
|
|
248
247
|
onClick: a.onAddSource,
|
|
249
248
|
type: "button",
|
|
250
249
|
className: t.toolbarItem,
|
|
@@ -252,13 +251,13 @@ const we = (a) => {
|
|
|
252
251
|
id: "input.text_editor.plugins.toolbar_plugin.add_link.aria_label",
|
|
253
252
|
defaultMessage: "Add hyperlink"
|
|
254
253
|
}),
|
|
255
|
-
children: /* @__PURE__ */
|
|
254
|
+
children: /* @__PURE__ */ i(
|
|
256
255
|
f,
|
|
257
256
|
{
|
|
258
257
|
name: "link",
|
|
259
258
|
width: 20,
|
|
260
259
|
height: 20,
|
|
261
|
-
className:
|
|
260
|
+
className: l(t.format, t.link)
|
|
262
261
|
}
|
|
263
262
|
)
|
|
264
263
|
}
|
|
@@ -266,18 +265,18 @@ const we = (a) => {
|
|
|
266
265
|
]
|
|
267
266
|
}
|
|
268
267
|
) : null,
|
|
269
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ i("div", { className: t.actionButton, children: a.hideSubmit ? null : /* @__PURE__ */ i(
|
|
270
269
|
ce,
|
|
271
270
|
{
|
|
272
271
|
type: "button",
|
|
273
272
|
"data-testid": "submit-button",
|
|
274
273
|
handleClick: a.onSubmit,
|
|
275
|
-
className:
|
|
274
|
+
className: l(t.inputSubmitActionButton, t.submitAction),
|
|
276
275
|
"aria-label": d.formatMessage({
|
|
277
276
|
id: "input.text_editor.plugins.toolbar_plugin.submit_button.aria_label",
|
|
278
277
|
defaultMessage: "Send message"
|
|
279
278
|
}),
|
|
280
|
-
children: /* @__PURE__ */
|
|
279
|
+
children: /* @__PURE__ */ i(f, { name: "send", width: 20, height: 20 })
|
|
281
280
|
}
|
|
282
281
|
) })
|
|
283
282
|
]
|
|
@@ -285,5 +284,5 @@ const we = (a) => {
|
|
|
285
284
|
);
|
|
286
285
|
};
|
|
287
286
|
export {
|
|
288
|
-
|
|
287
|
+
Ce as ToolbarPlugin
|
|
289
288
|
};
|