@logora/debate 0.4.104 → 0.4.106
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/assets/components/vote/vote_box/VoteBox.module-OmU1GLQG.css +1 -0
- package/dist/components/data/data_provider/DataProvider.js +49 -49
- package/dist/components/input/argument_input/ArgumentInput.js +245 -203
- package/dist/components/input/text_editor/TextEditor.js +76 -74
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +50 -48
- package/dist/components/vote/vote_box/VoteBox.module.scss.js +31 -31
- package/package.json +1 -1
- package/dist/assets/components/vote/vote_box/VoteBox.module-DZcJagif.css +0 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsxs as x, Fragment as
|
|
2
|
-
import { ListNode as
|
|
3
|
-
import { OverflowNode as
|
|
4
|
-
import { CharacterLimitPlugin as
|
|
5
|
-
import { LexicalComposer as
|
|
6
|
-
import { ContentEditable as
|
|
7
|
-
import { EditorRefPlugin as
|
|
8
|
-
import { LexicalErrorBoundary as
|
|
9
|
-
import { HistoryPlugin as
|
|
10
|
-
import { ListPlugin as
|
|
11
|
-
import { OnChangePlugin as
|
|
12
|
-
import { RichTextPlugin as
|
|
13
|
-
import { QuoteNode as
|
|
1
|
+
import { jsxs as x, Fragment as nt, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { ListNode as st, ListItemNode as ct } from "@lexical/list";
|
|
3
|
+
import { OverflowNode as lt } from "@lexical/overflow";
|
|
4
|
+
import { CharacterLimitPlugin as mt } from "@lexical/react/LexicalCharacterLimitPlugin";
|
|
5
|
+
import { LexicalComposer as at } from "@lexical/react/LexicalComposer";
|
|
6
|
+
import { ContentEditable as dt } from "@lexical/react/LexicalContentEditable";
|
|
7
|
+
import { EditorRefPlugin as ut } from "@lexical/react/LexicalEditorRefPlugin";
|
|
8
|
+
import { LexicalErrorBoundary as ft } from "@lexical/react/LexicalErrorBoundary";
|
|
9
|
+
import { HistoryPlugin as pt } from "@lexical/react/LexicalHistoryPlugin";
|
|
10
|
+
import { ListPlugin as ht } from "@lexical/react/LexicalListPlugin";
|
|
11
|
+
import { OnChangePlugin as gt } from "@lexical/react/LexicalOnChangePlugin";
|
|
12
|
+
import { RichTextPlugin as St } from "@lexical/react/LexicalRichTextPlugin";
|
|
13
|
+
import { QuoteNode as xt } from "@lexical/rich-text";
|
|
14
14
|
import R from "classnames";
|
|
15
|
-
import { $getRoot as
|
|
16
|
-
import { useState as p, useId as
|
|
17
|
-
import { useIntl as
|
|
18
|
-
import
|
|
15
|
+
import { $getRoot as Pt } from "lexical";
|
|
16
|
+
import { useState as p, useId as Ct, useRef as Tt, useEffect as w } from "react";
|
|
17
|
+
import { useIntl as It } from "react-intl";
|
|
18
|
+
import Nt from "./EditorTheme.js";
|
|
19
19
|
import i from "./TextEditor.module.scss.js";
|
|
20
|
-
import { AutoSavePlugin as
|
|
21
|
-
import { FocusPlugin as
|
|
22
|
-
import { IOSInsertParagraphFallbackPlugin as
|
|
23
|
-
import { MaxLengthPlugin as
|
|
24
|
-
import { ResetPlugin as
|
|
25
|
-
import { SetContentPlugin as
|
|
26
|
-
import { SetRichContentPlugin as
|
|
27
|
-
import { ToolbarPlugin as
|
|
28
|
-
import { useModal as
|
|
29
|
-
import { SourceModal as
|
|
30
|
-
import { SourceListItem as
|
|
31
|
-
const L = (l) => l?.replace(/ /g, " "),
|
|
20
|
+
import { AutoSavePlugin as vt } from "./plugins/AutoSavePlugin.js";
|
|
21
|
+
import { FocusPlugin as Et } from "./plugins/FocusPlugin.js";
|
|
22
|
+
import { IOSInsertParagraphFallbackPlugin as bt } from "./plugins/IOSInsertParagraphFallbackPlugin.js";
|
|
23
|
+
import { MaxLengthPlugin as Mt } from "./plugins/MaxLengthPlugin.js";
|
|
24
|
+
import { ResetPlugin as Rt } from "./plugins/ResetPlugin.js";
|
|
25
|
+
import { SetContentPlugin as wt } from "./plugins/SetContentPlugin.js";
|
|
26
|
+
import { SetRichContentPlugin as Lt } from "./plugins/SetRichContentPlugin.js";
|
|
27
|
+
import { ToolbarPlugin as _t } from "./plugins/ToolbarPlugin.js";
|
|
28
|
+
import { useModal as yt } from "../../dialog/modal/useModal.js";
|
|
29
|
+
import { SourceModal as At } from "../../source/source_modal/SourceModal.js";
|
|
30
|
+
import { SourceListItem as Ot } from "../../source/source_list_item/SourceListItem.js";
|
|
31
|
+
const L = (l) => l?.replace(/ /g, " "), de = ({
|
|
32
32
|
placeholder: l,
|
|
33
33
|
initialContent: _,
|
|
34
34
|
initialRichContent: y,
|
|
@@ -52,68 +52,69 @@ const L = (l) => l?.replace(/ /g, " "), ae = ({
|
|
|
52
52
|
autoFocus: a = !1,
|
|
53
53
|
isReply: d = !1,
|
|
54
54
|
resetSignal: H,
|
|
55
|
-
|
|
55
|
+
submitting: J = !1,
|
|
56
|
+
...Q
|
|
56
57
|
}) => {
|
|
57
|
-
const [s,
|
|
58
|
+
const [s, W] = p(a || S), [$, q] = p(""), [D, G] = p(""), [u, f] = p([]), { showModal: K } = yt(), N = It(), v = Ct(), E = Tt(!1);
|
|
58
59
|
w(() => {
|
|
59
60
|
a && !E.current && n && (E.current = !0, n());
|
|
60
61
|
}, [a, n]), w(() => {
|
|
61
62
|
h && f(h);
|
|
62
63
|
}, [h]);
|
|
63
64
|
const b = () => {
|
|
64
|
-
s || (
|
|
65
|
-
},
|
|
65
|
+
s || (W(!0), n && n());
|
|
66
|
+
}, V = {
|
|
66
67
|
editable: !k,
|
|
67
|
-
theme:
|
|
68
|
+
theme: Nt,
|
|
68
69
|
onError(e) {
|
|
69
70
|
console.error("TextEditor error:", e);
|
|
70
71
|
},
|
|
71
|
-
nodes: [
|
|
72
|
-
},
|
|
72
|
+
nodes: [st, ct, xt, lt]
|
|
73
|
+
}, X = () => {
|
|
73
74
|
b();
|
|
74
|
-
},
|
|
75
|
+
}, Y = (e) => {
|
|
75
76
|
e.read(() => {
|
|
76
|
-
const o =
|
|
77
|
-
|
|
77
|
+
const o = Pt().getTextContent(), r = L(o), c = JSON.stringify(e), M = L(c);
|
|
78
|
+
q(r), G(M), C && C(r, M);
|
|
78
79
|
});
|
|
79
|
-
},
|
|
80
|
-
const o =
|
|
80
|
+
}, Z = (e) => {
|
|
81
|
+
const o = $, r = D, c = u;
|
|
81
82
|
P && (e.preventDefault(), P(o, r, c)), f([]), g?.([]);
|
|
82
|
-
},
|
|
83
|
-
|
|
83
|
+
}, tt = () => {
|
|
84
|
+
K(
|
|
84
85
|
/* @__PURE__ */ t(
|
|
85
|
-
|
|
86
|
+
At,
|
|
86
87
|
{
|
|
87
|
-
onAddSource:
|
|
88
|
+
onAddSource: et,
|
|
88
89
|
allowedSources: I
|
|
89
90
|
}
|
|
90
91
|
)
|
|
91
92
|
);
|
|
92
|
-
},
|
|
93
|
+
}, et = (e) => {
|
|
93
94
|
f((o) => {
|
|
94
95
|
const r = [...o, e];
|
|
95
96
|
return g?.(r), r;
|
|
96
97
|
});
|
|
97
|
-
},
|
|
98
|
+
}, ot = (e) => {
|
|
98
99
|
f((o) => {
|
|
99
100
|
const r = o.filter(
|
|
100
101
|
(c) => c.source_url !== e.source_url
|
|
101
102
|
);
|
|
102
103
|
return g?.(r), r;
|
|
103
104
|
});
|
|
104
|
-
},
|
|
105
|
-
|
|
105
|
+
}, rt = (e, o) => /* @__PURE__ */ t(
|
|
106
|
+
Ot,
|
|
106
107
|
{
|
|
107
108
|
publisher: e.publisher,
|
|
108
109
|
url: e.source_url,
|
|
109
110
|
title: e.title,
|
|
110
111
|
index: o,
|
|
111
|
-
onRemove: () =>
|
|
112
|
+
onRemove: () => ot(e)
|
|
112
113
|
},
|
|
113
114
|
o
|
|
114
|
-
),
|
|
115
|
-
return /* @__PURE__ */ x(
|
|
116
|
-
/* @__PURE__ */ t(
|
|
115
|
+
), it = () => /* @__PURE__ */ t("div", { className: i.editorPlaceholder, children: l });
|
|
116
|
+
return /* @__PURE__ */ x(nt, { children: [
|
|
117
|
+
/* @__PURE__ */ t(at, { initialConfig: V, children: /* @__PURE__ */ t("div", { className: i.editorContainer, onClick: X, children: /* @__PURE__ */ x(
|
|
117
118
|
"div",
|
|
118
119
|
{
|
|
119
120
|
className: R(i.editorInner, {
|
|
@@ -121,30 +122,31 @@ const L = (l) => l?.replace(/ /g, " "), ae = ({
|
|
|
121
122
|
}),
|
|
122
123
|
children: [
|
|
123
124
|
/* @__PURE__ */ t(
|
|
124
|
-
|
|
125
|
+
St,
|
|
125
126
|
{
|
|
126
127
|
contentEditable: /* @__PURE__ */ t(
|
|
127
|
-
|
|
128
|
+
dt,
|
|
128
129
|
{
|
|
129
130
|
className: R(i.editorInput, {
|
|
130
131
|
[i.editorInputInactive]: !s
|
|
131
132
|
}),
|
|
132
|
-
...
|
|
133
|
+
...Q
|
|
133
134
|
}
|
|
134
135
|
),
|
|
135
|
-
placeholder: l && /* @__PURE__ */ t(
|
|
136
|
-
ErrorBoundary:
|
|
136
|
+
placeholder: l && /* @__PURE__ */ t(it, {}),
|
|
137
|
+
ErrorBoundary: ft
|
|
137
138
|
}
|
|
138
139
|
),
|
|
139
140
|
/* @__PURE__ */ t(
|
|
140
|
-
|
|
141
|
+
_t,
|
|
141
142
|
{
|
|
142
143
|
hideSourceAction: O,
|
|
144
|
+
submitting: J,
|
|
143
145
|
hideSubmit: A,
|
|
144
146
|
disableRichText: U,
|
|
145
147
|
shortBar: B,
|
|
146
|
-
onSubmit:
|
|
147
|
-
onAddSource:
|
|
148
|
+
onSubmit: Z,
|
|
149
|
+
onAddSource: tt,
|
|
148
150
|
isActive: s || S,
|
|
149
151
|
sourceTooltip: I?.length > 0 && N.formatMessage({
|
|
150
152
|
id: "input.allowed_domains_tooltip",
|
|
@@ -153,37 +155,37 @@ const L = (l) => l?.replace(/ /g, " "), ae = ({
|
|
|
153
155
|
}
|
|
154
156
|
),
|
|
155
157
|
s && m && !z && /* @__PURE__ */ x("div", { className: i.charactersCount, children: [
|
|
156
|
-
/* @__PURE__ */ t(
|
|
158
|
+
/* @__PURE__ */ t(mt, { maxLength: m }),
|
|
157
159
|
" ",
|
|
158
160
|
N.formatMessage({
|
|
159
161
|
id: "input.remaining_chars",
|
|
160
162
|
defaultMessage: "remaining characters"
|
|
161
163
|
})
|
|
162
164
|
] }),
|
|
165
|
+
/* @__PURE__ */ t(ht, {}),
|
|
163
166
|
/* @__PURE__ */ t(pt, {}),
|
|
164
|
-
/* @__PURE__ */ t(
|
|
165
|
-
/* @__PURE__ */ t(ht, { onChange: X, ignoreSelectionChange: !0 }),
|
|
167
|
+
/* @__PURE__ */ t(gt, { onChange: Y, ignoreSelectionChange: !0 }),
|
|
166
168
|
/* @__PURE__ */ t(
|
|
167
|
-
|
|
169
|
+
vt,
|
|
168
170
|
{
|
|
169
171
|
onSetContent: F ? () => {
|
|
170
172
|
} : b,
|
|
171
173
|
storageUid: T || v
|
|
172
174
|
}
|
|
173
175
|
),
|
|
174
|
-
/* @__PURE__ */ t(
|
|
175
|
-
/* @__PURE__ */ t(
|
|
176
|
-
/* @__PURE__ */ t(
|
|
177
|
-
/* @__PURE__ */ t(
|
|
178
|
-
m && /* @__PURE__ */ t(
|
|
179
|
-
/* @__PURE__ */ t(
|
|
180
|
-
/* @__PURE__ */ t(
|
|
176
|
+
/* @__PURE__ */ t(wt, { content: _, isReply: d }),
|
|
177
|
+
/* @__PURE__ */ t(Lt, { richContent: y, isReply: d }),
|
|
178
|
+
/* @__PURE__ */ t(Et, { autoFocus: a, isReply: d }),
|
|
179
|
+
/* @__PURE__ */ t(bt, {}),
|
|
180
|
+
m && /* @__PURE__ */ t(Mt, { maxLength: m }),
|
|
181
|
+
/* @__PURE__ */ t(Rt, { storageUid: T || v, resetSignal: H, isReply: d }),
|
|
182
|
+
/* @__PURE__ */ t(ut, { editorRef: j })
|
|
181
183
|
]
|
|
182
184
|
}
|
|
183
185
|
) }) }),
|
|
184
|
-
u && u.length !== 0 ? /* @__PURE__ */ t("div", { className: i.sourcesBox, children: /* @__PURE__ */ t("div", { className: i.sourceList, children: u.map(
|
|
186
|
+
u && u.length !== 0 ? /* @__PURE__ */ t("div", { className: i.sourcesBox, children: /* @__PURE__ */ t("div", { className: i.sourceList, children: u.map(rt) }) }) : null
|
|
185
187
|
] });
|
|
186
188
|
};
|
|
187
189
|
export {
|
|
188
|
-
|
|
190
|
+
de as TextEditor
|
|
189
191
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as B, jsx as
|
|
1
|
+
import { jsxs as B, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { $isListNode as $, ListNode as Y, INSERT_ORDERED_LIST_COMMAND as Z, $isListItemNode as q, $createListNode as ee } from "@lexical/list";
|
|
3
3
|
import { useLexicalComposerContext as te } from "@lexical/react/LexicalComposerContext";
|
|
4
4
|
import { $isHeadingNode as oe, $createQuoteNode as K } from "@lexical/rich-text";
|
|
5
5
|
import { $setBlocksType as F } from "@lexical/selection";
|
|
6
|
-
import { $getNearestNodeOfType as
|
|
6
|
+
import { $getNearestNodeOfType as ie, mergeRegister as ne } from "@lexical/utils";
|
|
7
7
|
import l from "classnames";
|
|
8
8
|
import { $getSelection as M, $isRangeSelection as I, SELECTION_CHANGE_COMMAND as le, FORMAT_TEXT_COMMAND as ae, $createParagraphNode as U } from "lexical";
|
|
9
9
|
import { useRef as D, useState as N, useCallback as re, useEffect as j } from "react";
|
|
@@ -11,35 +11,35 @@ 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 Ce = (
|
|
15
|
-
const d = se(), H = 1, [
|
|
14
|
+
const Ce = (a) => {
|
|
15
|
+
const d = se(), H = 1, [r] = te(), Q = D(null), [T, C] = N("paragraph"), [de, E] = N(null), [V, k] = N(!1), [z, w] = N(!1), [G, x] = N(!1), v = a.hideSubmit && a.hideSourceAction && a.disableRichText, _ = re(() => {
|
|
16
16
|
const e = M();
|
|
17
17
|
if (I(e)) {
|
|
18
18
|
const o = e.anchor.getNode(), s = o.getKey() === "root" ? o : o.getTopLevelElementOrThrow(), u = s.getKey();
|
|
19
|
-
if (
|
|
19
|
+
if (r.getElementByKey(u) !== null)
|
|
20
20
|
if (E(u), $(s)) {
|
|
21
|
-
const
|
|
21
|
+
const i = ie(o, Y), p = i ? i.getTag() : s.getTag();
|
|
22
22
|
C(p);
|
|
23
23
|
} else {
|
|
24
|
-
const
|
|
25
|
-
C(
|
|
24
|
+
const i = oe(s) ? s.getTag() : s.getType();
|
|
25
|
+
C(i);
|
|
26
26
|
}
|
|
27
27
|
k(e.hasFormat("bold")), w(e.hasFormat("italic")), x(e.hasFormat("underline"));
|
|
28
28
|
} else
|
|
29
29
|
E(null), C("paragraph"), k(!1), w(!1), x(!1);
|
|
30
|
-
}, [
|
|
31
|
-
j(() =>
|
|
32
|
-
|
|
30
|
+
}, [r]);
|
|
31
|
+
j(() => ne(
|
|
32
|
+
r.registerUpdateListener(({ editorState: e }) => {
|
|
33
33
|
e.read(() => {
|
|
34
34
|
_();
|
|
35
35
|
});
|
|
36
36
|
}),
|
|
37
|
-
|
|
37
|
+
r.registerCommand(
|
|
38
38
|
le,
|
|
39
39
|
() => (_(), !1),
|
|
40
40
|
H
|
|
41
41
|
)
|
|
42
|
-
), [
|
|
42
|
+
), [r, _]);
|
|
43
43
|
const y = D(!1), c = D(null);
|
|
44
44
|
j(() => () => {
|
|
45
45
|
c.current && clearTimeout(c.current);
|
|
@@ -56,49 +56,49 @@ const Ce = (r) => {
|
|
|
56
56
|
e();
|
|
57
57
|
}, S = () => {
|
|
58
58
|
setTimeout(() => {
|
|
59
|
-
|
|
59
|
+
r.getEditorState().read(() => {
|
|
60
60
|
_();
|
|
61
61
|
});
|
|
62
62
|
}, 0);
|
|
63
63
|
}, b = (e) => {
|
|
64
|
-
|
|
65
|
-
const o =
|
|
64
|
+
r.dispatchCommand(ae, e), e === "bold" ? k((o) => !o) : e === "italic" ? w((o) => !o) : e === "underline" && x((o) => !o), r.focus(() => {
|
|
65
|
+
const o = r.getRootElement();
|
|
66
66
|
o && o.focus();
|
|
67
67
|
}), S();
|
|
68
68
|
}, X = () => {
|
|
69
|
-
|
|
69
|
+
r.update(() => {
|
|
70
70
|
const e = M();
|
|
71
71
|
if (!I(e))
|
|
72
72
|
return;
|
|
73
73
|
const o = e.getNodes(), s = /* @__PURE__ */ new Set();
|
|
74
74
|
for (const m of o) {
|
|
75
|
-
let
|
|
76
|
-
for (;
|
|
77
|
-
|
|
78
|
-
q(
|
|
75
|
+
let i = m;
|
|
76
|
+
for (; i !== null && !q(i); )
|
|
77
|
+
i = i.getParent();
|
|
78
|
+
q(i) && s.add(i);
|
|
79
79
|
}
|
|
80
80
|
const u = Array.from(s).reverse();
|
|
81
81
|
for (const m of u) {
|
|
82
|
-
const
|
|
83
|
-
if (!$(
|
|
82
|
+
const i = m.getParent();
|
|
83
|
+
if (!$(i))
|
|
84
84
|
continue;
|
|
85
85
|
const p = U(), J = m.getChildren();
|
|
86
86
|
for (const A of J)
|
|
87
87
|
p.append(A);
|
|
88
88
|
const L = m.getNextSiblings();
|
|
89
|
-
if (
|
|
90
|
-
const A = L[0].getValue(), R = ee(
|
|
89
|
+
if (i.insertAfter(p), L.length > 0) {
|
|
90
|
+
const A = L[0].getValue(), R = ee(i.getListType(), A);
|
|
91
91
|
for (const W of L)
|
|
92
92
|
R.append(W);
|
|
93
93
|
p.insertAfter(R);
|
|
94
94
|
}
|
|
95
|
-
m.remove(),
|
|
95
|
+
m.remove(), i.getChildrenSize() === 0 && i.remove();
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
98
|
}, O = () => {
|
|
99
|
-
T !== "ol" ?
|
|
99
|
+
T !== "ol" ? r.dispatchCommand(Z) : X(), S();
|
|
100
100
|
}, P = () => {
|
|
101
|
-
T !== "quote" ?
|
|
101
|
+
T !== "quote" ? r.update(() => {
|
|
102
102
|
const e = M();
|
|
103
103
|
if (I(e))
|
|
104
104
|
if (e.isCollapsed()) {
|
|
@@ -106,7 +106,7 @@ const Ce = (r) => {
|
|
|
106
106
|
s.insertAfter(u), u.selectEnd();
|
|
107
107
|
} else
|
|
108
108
|
F(e, () => K());
|
|
109
|
-
}) :
|
|
109
|
+
}) : r.update(() => {
|
|
110
110
|
const e = M();
|
|
111
111
|
I(e) && F(e, () => U());
|
|
112
112
|
}), S();
|
|
@@ -115,18 +115,18 @@ const Ce = (r) => {
|
|
|
115
115
|
"div",
|
|
116
116
|
{
|
|
117
117
|
className: l(t.toolbar, {
|
|
118
|
-
[t.toolbarIsActive]: v ? !1 :
|
|
118
|
+
[t.toolbarIsActive]: v ? !1 : a.isActive
|
|
119
119
|
}),
|
|
120
120
|
ref: Q,
|
|
121
121
|
children: [
|
|
122
|
-
|
|
122
|
+
a.isActive ? !a.disableRichText && /* @__PURE__ */ B(
|
|
123
123
|
"div",
|
|
124
124
|
{
|
|
125
125
|
className: l(t.iconToolbar, {
|
|
126
|
-
[t.shortBar]:
|
|
126
|
+
[t.shortBar]: a.shortBar
|
|
127
127
|
}),
|
|
128
128
|
children: [
|
|
129
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ n(
|
|
130
130
|
"button",
|
|
131
131
|
{
|
|
132
132
|
onPointerDown: (e) => g(e, () => b("bold")),
|
|
@@ -138,7 +138,7 @@ const Ce = (r) => {
|
|
|
138
138
|
id: "input.text_editor.plugins.toolbar_plugin.bold.aria_label",
|
|
139
139
|
defaultMessage: "Make text bold"
|
|
140
140
|
}),
|
|
141
|
-
children: /* @__PURE__ */
|
|
141
|
+
children: /* @__PURE__ */ n(
|
|
142
142
|
f,
|
|
143
143
|
{
|
|
144
144
|
name: "bold",
|
|
@@ -149,7 +149,7 @@ const Ce = (r) => {
|
|
|
149
149
|
)
|
|
150
150
|
}
|
|
151
151
|
),
|
|
152
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ n(
|
|
153
153
|
"button",
|
|
154
154
|
{
|
|
155
155
|
onPointerDown: (e) => g(e, () => b("italic")),
|
|
@@ -162,7 +162,7 @@ const Ce = (r) => {
|
|
|
162
162
|
id: "input.text_editor.plugins.toolbar_plugin.italic.aria_label",
|
|
163
163
|
defaultMessage: "Make text italic"
|
|
164
164
|
}),
|
|
165
|
-
children: /* @__PURE__ */
|
|
165
|
+
children: /* @__PURE__ */ n(
|
|
166
166
|
f,
|
|
167
167
|
{
|
|
168
168
|
name: "italic",
|
|
@@ -173,7 +173,7 @@ const Ce = (r) => {
|
|
|
173
173
|
)
|
|
174
174
|
}
|
|
175
175
|
),
|
|
176
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ n(
|
|
177
177
|
"button",
|
|
178
178
|
{
|
|
179
179
|
onPointerDown: (e) => g(e, () => b("underline")),
|
|
@@ -186,7 +186,7 @@ const Ce = (r) => {
|
|
|
186
186
|
id: "input.text_editor.plugins.toolbar_plugin.underline.aria_label",
|
|
187
187
|
defaultMessage: "Underline text"
|
|
188
188
|
}),
|
|
189
|
-
children: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ n(
|
|
190
190
|
f,
|
|
191
191
|
{
|
|
192
192
|
name: "underline",
|
|
@@ -197,7 +197,7 @@ const Ce = (r) => {
|
|
|
197
197
|
)
|
|
198
198
|
}
|
|
199
199
|
),
|
|
200
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ n(
|
|
201
201
|
"button",
|
|
202
202
|
{
|
|
203
203
|
onPointerDown: (e) => g(e, () => P()),
|
|
@@ -210,7 +210,7 @@ const Ce = (r) => {
|
|
|
210
210
|
id: "input.text_editor.plugins.toolbar_plugin.blockquote.aria_label",
|
|
211
211
|
defaultMessage: "Add a blockquote"
|
|
212
212
|
}),
|
|
213
|
-
children: /* @__PURE__ */
|
|
213
|
+
children: /* @__PURE__ */ n(
|
|
214
214
|
f,
|
|
215
215
|
{
|
|
216
216
|
name: "blockquote",
|
|
@@ -221,7 +221,7 @@ const Ce = (r) => {
|
|
|
221
221
|
)
|
|
222
222
|
}
|
|
223
223
|
),
|
|
224
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ n(
|
|
225
225
|
"button",
|
|
226
226
|
{
|
|
227
227
|
onPointerDown: (e) => g(e, () => O()),
|
|
@@ -234,7 +234,7 @@ const Ce = (r) => {
|
|
|
234
234
|
id: "input.text_editor.plugins.toolbar_plugin.numbered_list.aria_label",
|
|
235
235
|
defaultMessage: "Insert a numbered list"
|
|
236
236
|
}),
|
|
237
|
-
children: /* @__PURE__ */
|
|
237
|
+
children: /* @__PURE__ */ n(
|
|
238
238
|
f,
|
|
239
239
|
{
|
|
240
240
|
name: "orderedList",
|
|
@@ -245,17 +245,17 @@ const Ce = (r) => {
|
|
|
245
245
|
)
|
|
246
246
|
}
|
|
247
247
|
),
|
|
248
|
-
!
|
|
248
|
+
!a.hideSourceAction && /* @__PURE__ */ n(
|
|
249
249
|
"button",
|
|
250
250
|
{
|
|
251
|
-
onClick:
|
|
251
|
+
onClick: a.onAddSource,
|
|
252
252
|
type: "button",
|
|
253
253
|
className: t.toolbarItem,
|
|
254
254
|
"aria-label": d.formatMessage({
|
|
255
255
|
id: "input.text_editor.plugins.toolbar_plugin.add_link.aria_label",
|
|
256
256
|
defaultMessage: "Add hyperlink"
|
|
257
257
|
}),
|
|
258
|
-
children: /* @__PURE__ */
|
|
258
|
+
children: /* @__PURE__ */ n(
|
|
259
259
|
f,
|
|
260
260
|
{
|
|
261
261
|
name: "link",
|
|
@@ -269,18 +269,20 @@ const Ce = (r) => {
|
|
|
269
269
|
]
|
|
270
270
|
}
|
|
271
271
|
) : null,
|
|
272
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ n("div", { className: t.actionButton, children: a.hideSubmit ? null : /* @__PURE__ */ n(
|
|
273
273
|
ce,
|
|
274
274
|
{
|
|
275
275
|
type: "button",
|
|
276
276
|
"data-testid": "submit-button",
|
|
277
|
-
handleClick:
|
|
277
|
+
handleClick: a.onSubmit,
|
|
278
|
+
disabled: a.submitting,
|
|
279
|
+
"aria-busy": a.submitting ? "true" : "false",
|
|
278
280
|
className: l(t.inputSubmitActionButton, t.submitAction),
|
|
279
281
|
"aria-label": d.formatMessage({
|
|
280
282
|
id: "input.text_editor.plugins.toolbar_plugin.submit_button.aria_label",
|
|
281
283
|
defaultMessage: "Send message"
|
|
282
284
|
}),
|
|
283
|
-
children: /* @__PURE__ */
|
|
285
|
+
children: /* @__PURE__ */ n(f, { name: "send", width: 20, height: 20 })
|
|
284
286
|
}
|
|
285
287
|
) })
|
|
286
288
|
]
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import '../../../assets/components/vote/vote_box/VoteBox.module-
|
|
1
|
+
import '../../../assets/components/vote/vote_box/VoteBox.module-OmU1GLQG.css';const o = "_voteBox_3jamb_3", t = "_voteResultsBox_3jamb_11", e = "_voteResults_3jamb_11", s = "_voteProgressHeader_3jamb_22", n = "_voteProgressHeaderAgainst_3jamb_35", _ = "_voteResultsNumberVoters_3jamb_39", u = "_voteBoxFooter_3jamb_47", v = "_voteFooterActions_3jamb_56", a = "_voteBoxActions_3jamb_62", c = "_voteBoxActionsBody_3jamb_72", i = "_voteBoxActionsBodyColumn_3jamb_80", B = "_voteAction_3jamb_84", b = "_buttonAlignLeft_3jamb_94", l = "_voteButton_3jamb_98", r = "_textAlignLeft_3jamb_109", m = "_voteBoxShowResultContainer_3jamb_113", d = "_voteBoxShowResult_3jamb_113", x = "_boldShowResult_3jamb_137", A = "_outlined_3jamb_143", j = "_voteButtonThesis_3jamb_150", R = "_voteButtonThesisSynthesisMobile_3jamb_162", g = "_voteBoxActionsBodyOutlined_3jamb_201", h = "_voteBoxActionsBodyFilledNeutral_3jamb_240", y = "_voteActionButton_3jamb_253", w = "_sideIcon_3jamb_273", C = "_progress_3jamb_278", N = "_progressBar_3jamb_284", S = "_voteCommentCounts_3jamb_301", f = "_debateNumberItem_3jamb_310", F = "_debateNumberLabel_3jamb_320", I = "_showResultButton_3jamb_324", L = "_voteResultInfoText_3jamb_337", T = {
|
|
2
2
|
voteBox: o,
|
|
3
3
|
voteResultsBox: t,
|
|
4
4
|
voteResults: e,
|
|
5
|
-
voteProgressHeader:
|
|
6
|
-
voteProgressHeaderAgainst:
|
|
5
|
+
voteProgressHeader: s,
|
|
6
|
+
voteProgressHeaderAgainst: n,
|
|
7
7
|
voteResultsNumberVoters: _,
|
|
8
8
|
voteBoxFooter: u,
|
|
9
9
|
voteFooterActions: v,
|
|
10
|
-
voteBoxActions:
|
|
11
|
-
voteBoxActionsBody:
|
|
12
|
-
voteBoxActionsBodyColumn:
|
|
13
|
-
voteAction:
|
|
14
|
-
buttonAlignLeft:
|
|
15
|
-
voteButton:
|
|
16
|
-
textAlignLeft:
|
|
17
|
-
voteBoxShowResultContainer:
|
|
18
|
-
voteBoxShowResult:
|
|
19
|
-
boldShowResult:
|
|
20
|
-
outlined:
|
|
21
|
-
voteButtonThesis:
|
|
10
|
+
voteBoxActions: a,
|
|
11
|
+
voteBoxActionsBody: c,
|
|
12
|
+
voteBoxActionsBodyColumn: i,
|
|
13
|
+
voteAction: B,
|
|
14
|
+
buttonAlignLeft: b,
|
|
15
|
+
voteButton: l,
|
|
16
|
+
textAlignLeft: r,
|
|
17
|
+
voteBoxShowResultContainer: m,
|
|
18
|
+
voteBoxShowResult: d,
|
|
19
|
+
boldShowResult: x,
|
|
20
|
+
outlined: A,
|
|
21
|
+
voteButtonThesis: j,
|
|
22
22
|
voteButtonThesisSynthesisMobile: R,
|
|
23
23
|
voteBoxActionsBodyOutlined: g,
|
|
24
24
|
voteBoxActionsBodyFilledNeutral: h,
|
|
25
|
-
voteActionButton:
|
|
25
|
+
voteActionButton: y,
|
|
26
26
|
sideIcon: w,
|
|
27
27
|
progress: C,
|
|
28
28
|
progressBar: N,
|
|
@@ -33,35 +33,35 @@ import '../../../assets/components/vote/vote_box/VoteBox.module-DZcJagif.css';co
|
|
|
33
33
|
voteResultInfoText: L
|
|
34
34
|
};
|
|
35
35
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
x as boldShowResult,
|
|
37
|
+
b as buttonAlignLeft,
|
|
38
38
|
f as debateNumberItem,
|
|
39
39
|
F as debateNumberLabel,
|
|
40
40
|
T as default,
|
|
41
|
-
|
|
41
|
+
A as outlined,
|
|
42
42
|
C as progress,
|
|
43
43
|
N as progressBar,
|
|
44
44
|
I as showResultButton,
|
|
45
45
|
w as sideIcon,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
r as textAlignLeft,
|
|
47
|
+
B as voteAction,
|
|
48
|
+
y as voteActionButton,
|
|
49
49
|
o as voteBox,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
a as voteBoxActions,
|
|
51
|
+
c as voteBoxActionsBody,
|
|
52
|
+
i as voteBoxActionsBodyColumn,
|
|
53
53
|
h as voteBoxActionsBodyFilledNeutral,
|
|
54
54
|
g as voteBoxActionsBodyOutlined,
|
|
55
55
|
u as voteBoxFooter,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
d as voteBoxShowResult,
|
|
57
|
+
m as voteBoxShowResultContainer,
|
|
58
|
+
l as voteButton,
|
|
59
|
+
j as voteButtonThesis,
|
|
60
60
|
R as voteButtonThesisSynthesisMobile,
|
|
61
61
|
S as voteCommentCounts,
|
|
62
62
|
v as voteFooterActions,
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
s as voteProgressHeader,
|
|
64
|
+
n as voteProgressHeaderAgainst,
|
|
65
65
|
L as voteResultInfoText,
|
|
66
66
|
e as voteResults,
|
|
67
67
|
t as voteResultsBox,
|