@logora/debate 0.3.62 → 0.3.63
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.
|
@@ -1,77 +1,86 @@
|
|
|
1
|
-
import { jsx as o, jsxs as l, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useIntl as
|
|
1
|
+
import { jsx as o, jsxs as l, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import D from "classnames";
|
|
3
|
+
import { useState as g, useEffect as P, useCallback as de, Suspense as ce, lazy as pe } from "react";
|
|
4
|
+
import { useIntl as ue } from "react-intl";
|
|
5
5
|
import s from "./Argument.module.scss.js";
|
|
6
|
-
import { ReplyFooter as
|
|
7
|
-
import { useRichContent as
|
|
8
|
-
import { useAuth as
|
|
9
|
-
import { useConfig as
|
|
10
|
-
import { useTranslatedContent as
|
|
11
|
-
import { SourceListItem as
|
|
12
|
-
import { HashScroll as
|
|
13
|
-
import { ContentHeader as
|
|
14
|
-
import { Icon as
|
|
15
|
-
import { ReadMore as
|
|
16
|
-
import { TranslationButton as
|
|
17
|
-
import { ContentFooter as
|
|
18
|
-
import { VoteButton as
|
|
19
|
-
import { VotePaginatedList as
|
|
20
|
-
import { UserContentSkeleton as
|
|
6
|
+
import { ReplyFooter as me } from "./ReplyFooter.js";
|
|
7
|
+
import { useRichContent as he } from "./useRichContent.js";
|
|
8
|
+
import { useAuth as fe } from "../../auth/use_auth/useAuth.js";
|
|
9
|
+
import { useConfig as ye } from "../../data/config_provider/useConfig.js";
|
|
10
|
+
import { useTranslatedContent as F } from "../../translation/translated_content/useTranslatedContent.js";
|
|
11
|
+
import { SourceListItem as _e } from "../../source/source_list_item/SourceListItem.js";
|
|
12
|
+
import { HashScroll as ge } from "../../tools/hash_scroll/HashScroll.js";
|
|
13
|
+
import { ContentHeader as be } from "../../user_content/content_header/ContentHeader.js";
|
|
14
|
+
import { Icon as j } from "../../icons/icon/Icon.js";
|
|
15
|
+
import { ReadMore as Me } from "../../text/read_more/ReadMore.js";
|
|
16
|
+
import { TranslationButton as ve } from "../../translation/translation_button/TranslationButton.js";
|
|
17
|
+
import { ContentFooter as Ie } from "../../user_content/content_footer/ContentFooter.js";
|
|
18
|
+
import { VoteButton as Ce } from "../../vote/vote_button/VoteButton.js";
|
|
19
|
+
import { VotePaginatedList as Re } from "../../list/paginated_list/VotePaginatedList.js";
|
|
20
|
+
import { UserContentSkeleton as we } from "../../skeleton/user_content_skeleton/UserContentSkeleton.js";
|
|
21
21
|
import { Button as Se } from "../../action/button/Button.js";
|
|
22
|
-
const
|
|
22
|
+
const Te = pe(() => import("../../input/argument_input/index.js").then((e) => ({ default: e.ArgumentInput }))), G = (e) => e?.replace(/ /g, " "), Ne = ({
|
|
23
23
|
argument: e,
|
|
24
|
-
argumentReplies:
|
|
25
|
-
nestingLevel:
|
|
26
|
-
maxNestingLevel:
|
|
24
|
+
argumentReplies: d,
|
|
25
|
+
nestingLevel: b = 0,
|
|
26
|
+
maxNestingLevel: w = 2,
|
|
27
27
|
groupType: S,
|
|
28
|
-
groupName:
|
|
29
|
-
positions:
|
|
30
|
-
disableLinks:
|
|
31
|
-
parentArgument:
|
|
32
|
-
flashParent:
|
|
33
|
-
expandable:
|
|
34
|
-
disabled:
|
|
35
|
-
hideFooter:
|
|
36
|
-
hideReplies:
|
|
37
|
-
vote:
|
|
38
|
-
fixedContentHeight:
|
|
39
|
-
enableEdition:
|
|
40
|
-
enableDeletion:
|
|
41
|
-
deleteListId:
|
|
42
|
-
showModerationFeedback:
|
|
43
|
-
lineCount:
|
|
44
|
-
replyRedirectUrl:
|
|
45
|
-
hideContent:
|
|
28
|
+
groupName: T,
|
|
29
|
+
positions: M = [],
|
|
30
|
+
disableLinks: H = !1,
|
|
31
|
+
parentArgument: c,
|
|
32
|
+
flashParent: V,
|
|
33
|
+
expandable: z,
|
|
34
|
+
disabled: v = !1,
|
|
35
|
+
hideFooter: N = !1,
|
|
36
|
+
hideReplies: A,
|
|
37
|
+
vote: O,
|
|
38
|
+
fixedContentHeight: Y = !1,
|
|
39
|
+
enableEdition: q = !0,
|
|
40
|
+
enableDeletion: J = !0,
|
|
41
|
+
deleteListId: K,
|
|
42
|
+
showModerationFeedback: Q,
|
|
43
|
+
lineCount: W = 5,
|
|
44
|
+
replyRedirectUrl: X,
|
|
45
|
+
hideContent: Z = !1
|
|
46
46
|
}) => {
|
|
47
|
-
const i =
|
|
47
|
+
const i = ue(), { isLoggedIn: ee, currentUser: p } = fe(), x = p?.moderation_status === "banned", r = ye(), [u, I] = g(!1), [te, L] = g(!1), [oe, se] = g(!1), U = he(e), [m, h] = g(), f = F(
|
|
48
48
|
e.content,
|
|
49
49
|
e.language,
|
|
50
50
|
"content",
|
|
51
51
|
e.translation_entries
|
|
52
|
-
),
|
|
52
|
+
), re = F(
|
|
53
53
|
e.position?.name,
|
|
54
54
|
e.position?.language,
|
|
55
55
|
"name",
|
|
56
56
|
e.position?.translation_entries
|
|
57
|
-
),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
57
|
+
), C = `argument_${e.id}`, R = e.position && M?.map((t) => t.id).indexOf(e.position.id) + 1;
|
|
58
|
+
P(() => {
|
|
59
|
+
d !== void 0 && ne();
|
|
60
|
+
}, [d]), P(() => {
|
|
61
|
+
if (typeof window > "u") return;
|
|
62
|
+
const t = (a) => {
|
|
63
|
+
const n = a.detail?.reply;
|
|
64
|
+
!n || n.reply_to_id !== e.id || h((y) => !y || y.length === 0 ? y : y.map((E) => E.id === n.id ? n : E));
|
|
65
|
+
};
|
|
66
|
+
return window.addEventListener("logora:reply:updated", t), () => {
|
|
67
|
+
window.removeEventListener("logora:reply:updated", t);
|
|
68
|
+
};
|
|
69
|
+
}, [e.id]);
|
|
70
|
+
const ie = (t) => {
|
|
71
|
+
if (C === t) {
|
|
72
|
+
const n = document.getElementById(t);
|
|
73
|
+
n && n.scrollIntoView({ behavior: "smooth" }), L(!0);
|
|
65
74
|
}
|
|
66
|
-
}, L = () => {
|
|
67
|
-
ee((t) => !t);
|
|
68
75
|
}, k = () => {
|
|
69
|
-
|
|
70
|
-
},
|
|
76
|
+
se((t) => !t);
|
|
77
|
+
}, $ = () => {
|
|
78
|
+
I((t) => !t), h([]);
|
|
79
|
+
}, ae = (t) => {
|
|
71
80
|
if (!m?.find((a) => a.id === t.id))
|
|
72
81
|
return t;
|
|
73
|
-
},
|
|
74
|
-
|
|
82
|
+
}, le = de((t, a) => /* @__PURE__ */ o(
|
|
83
|
+
_e,
|
|
75
84
|
{
|
|
76
85
|
publisher: t.publisher,
|
|
77
86
|
url: t.source_url,
|
|
@@ -79,54 +88,54 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
79
88
|
index: a
|
|
80
89
|
},
|
|
81
90
|
a
|
|
82
|
-
), []),
|
|
83
|
-
if (
|
|
84
|
-
const t =
|
|
91
|
+
), []), ne = () => {
|
|
92
|
+
if (d && Array.isArray(d)) {
|
|
93
|
+
const t = d.filter(
|
|
85
94
|
(a) => a.reply_to_id === e.id
|
|
86
95
|
);
|
|
87
|
-
t.length > 0 && (
|
|
96
|
+
t.length > 0 && (h(t), I(!0));
|
|
88
97
|
}
|
|
89
|
-
},
|
|
90
|
-
|
|
98
|
+
}, B = (t = null) => /* @__PURE__ */ o(
|
|
99
|
+
Ae,
|
|
91
100
|
{
|
|
92
101
|
...t ? { argument: t } : {},
|
|
93
|
-
nestingLevel:
|
|
94
|
-
maxNestingLevel:
|
|
95
|
-
disabled:
|
|
96
|
-
groupName:
|
|
102
|
+
nestingLevel: b + 1,
|
|
103
|
+
maxNestingLevel: w,
|
|
104
|
+
disabled: v,
|
|
105
|
+
groupName: T,
|
|
97
106
|
groupType: S,
|
|
98
|
-
positions:
|
|
99
|
-
argumentReplies:
|
|
107
|
+
positions: M,
|
|
108
|
+
argumentReplies: d,
|
|
100
109
|
parentArgument: e,
|
|
101
|
-
flashParent: (a) =>
|
|
110
|
+
flashParent: (a) => ie(`argument_${a}`)
|
|
102
111
|
}
|
|
103
112
|
);
|
|
104
|
-
return /* @__PURE__ */ l(
|
|
113
|
+
return /* @__PURE__ */ l(ge, { elementId: C, onScroll: () => L(!0), children: [
|
|
105
114
|
/* @__PURE__ */ l(
|
|
106
115
|
"div",
|
|
107
116
|
{
|
|
108
|
-
className:
|
|
117
|
+
className: D(
|
|
109
118
|
s.argument,
|
|
110
119
|
{
|
|
111
|
-
[s.flash]:
|
|
120
|
+
[s.flash]: te,
|
|
112
121
|
[s.argumentReply]: e.is_reply === !0
|
|
113
122
|
},
|
|
114
|
-
s[`level-${
|
|
115
|
-
s[`position-${!(e.author.role === "editor" || e.author.role === "moderator") &&
|
|
123
|
+
s[`level-${b}`],
|
|
124
|
+
s[`position-${!(e.author.role === "editor" || e.author.role === "moderator") && R}`]
|
|
116
125
|
),
|
|
117
|
-
id:
|
|
126
|
+
id: C,
|
|
118
127
|
children: [
|
|
119
128
|
/* @__PURE__ */ o(
|
|
120
|
-
|
|
129
|
+
be,
|
|
121
130
|
{
|
|
122
131
|
selectedContent: e.is_selected,
|
|
123
132
|
author: e.author,
|
|
124
|
-
tag: (e.author.role === "editor" || e.author.role === "moderator") && e.is_reply ? null :
|
|
133
|
+
tag: (e.author.role === "editor" || e.author.role === "moderator") && e.is_reply ? null : re.translatedContent,
|
|
125
134
|
date: e.created_at,
|
|
126
|
-
tagClassName: s[`headerPosition-${
|
|
127
|
-
disableLinks:
|
|
135
|
+
tagClassName: s[`headerPosition-${R}`],
|
|
136
|
+
disableLinks: H,
|
|
128
137
|
isDeleted: e.is_deleted,
|
|
129
|
-
showModerationFeedback:
|
|
138
|
+
showModerationFeedback: Q ?? (e.status === "rejected" && r.moderation?.showFeedback === !0),
|
|
130
139
|
moderationReason: e.moderation_entry?.moderation_reason,
|
|
131
140
|
moderationNotes: e.moderation_entry?.moderator_notes,
|
|
132
141
|
moderationPolicyUrl: r.provider?.userGuideUrl
|
|
@@ -135,61 +144,61 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
135
144
|
e.is_deleted ? /* @__PURE__ */ o("div", { className: s.argumentDeletedBody, children: i.formatMessage({
|
|
136
145
|
id: "info.deleted_by_user",
|
|
137
146
|
defaultMessage: "Content deleted by the user"
|
|
138
|
-
}) }) :
|
|
147
|
+
}) }) : Z ? /* @__PURE__ */ o("div", { className: s.argumentDeletedBody, children: i.formatMessage({
|
|
139
148
|
id: "argument.argument.content_deleted",
|
|
140
149
|
defaultMessage: "This content has been removed."
|
|
141
|
-
}) }) : /* @__PURE__ */ l(
|
|
150
|
+
}) }) : /* @__PURE__ */ l(_, { children: [
|
|
142
151
|
/* @__PURE__ */ l(
|
|
143
152
|
"div",
|
|
144
153
|
{
|
|
145
|
-
className:
|
|
146
|
-
[s.fixedHeight]: r?.layout?.showAllArgumentInEmbed !== !0 ?
|
|
154
|
+
className: D(s.argumentBody, {
|
|
155
|
+
[s.fixedHeight]: r?.layout?.showAllArgumentInEmbed !== !0 ? Y : !1
|
|
147
156
|
}),
|
|
148
157
|
children: [
|
|
149
|
-
e.is_reply &&
|
|
158
|
+
e.is_reply && c && /* @__PURE__ */ l(
|
|
150
159
|
"div",
|
|
151
160
|
{
|
|
152
161
|
className: s.replyTo,
|
|
153
|
-
onClick: () =>
|
|
162
|
+
onClick: () => V(c.id),
|
|
154
163
|
children: [
|
|
155
164
|
i.formatMessage({
|
|
156
165
|
id: "info.replying_to",
|
|
157
166
|
defaultMessage: "Replying to"
|
|
158
167
|
}),
|
|
159
168
|
/* @__PURE__ */ l("span", { className: s.replyingTo, children: [
|
|
160
|
-
|
|
169
|
+
c.is_deleted ? i.formatMessage({
|
|
161
170
|
id: "info.deleted",
|
|
162
171
|
defaultMessage: "Deleted"
|
|
163
|
-
}) :
|
|
164
|
-
/* @__PURE__ */ o(
|
|
172
|
+
}) : c.author.full_name,
|
|
173
|
+
/* @__PURE__ */ o(j, { name: "chat", height: 16 })
|
|
165
174
|
] })
|
|
166
175
|
]
|
|
167
176
|
}
|
|
168
177
|
),
|
|
169
178
|
/* @__PURE__ */ o(
|
|
170
|
-
|
|
179
|
+
Me,
|
|
171
180
|
{
|
|
172
|
-
content: /* @__PURE__ */ l(
|
|
181
|
+
content: /* @__PURE__ */ l(_, { children: [
|
|
173
182
|
e.is_edited && /* @__PURE__ */ o("div", { className: s.edited, children: i.formatMessage({
|
|
174
183
|
id: "argument.argument.updated",
|
|
175
184
|
defaultMessage: "Updated argument"
|
|
176
185
|
}) }),
|
|
177
|
-
|
|
186
|
+
U && !f.isTranslated ? /* @__PURE__ */ o(
|
|
178
187
|
"div",
|
|
179
188
|
{
|
|
180
189
|
className: s.argumentContent,
|
|
181
|
-
dangerouslySetInnerHTML: { __html:
|
|
190
|
+
dangerouslySetInnerHTML: { __html: G(U) }
|
|
182
191
|
}
|
|
183
|
-
) : /* @__PURE__ */ o("div", { className: s.argumentContent, children:
|
|
184
|
-
|
|
185
|
-
|
|
192
|
+
) : /* @__PURE__ */ o("div", { className: s.argumentContent, children: G(f.translatedContent) }),
|
|
193
|
+
f.isTranslated && /* @__PURE__ */ o(
|
|
194
|
+
ve,
|
|
186
195
|
{
|
|
187
196
|
language: e.language,
|
|
188
|
-
callback: () =>
|
|
197
|
+
callback: () => f.toggleContent()
|
|
189
198
|
}
|
|
190
199
|
)
|
|
191
200
|
] }),
|
|
192
|
-
lineCount: r?.layout?.showAllArgumentInEmbed !== !0 ?
|
|
201
|
+
lineCount: r?.layout?.showAllArgumentInEmbed !== !0 ? W : void 0,
|
|
193
202
|
readMoreText: i.formatMessage({
|
|
194
203
|
id: "action.read_more",
|
|
195
204
|
defaultMessage: "Read more"
|
|
@@ -198,27 +207,27 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
198
207
|
id: "action.read_less",
|
|
199
208
|
defaultMessage: "Read less"
|
|
200
209
|
}),
|
|
201
|
-
expandable: r?.layout?.showAllArgumentInEmbed !== !0 ?
|
|
210
|
+
expandable: r?.layout?.showAllArgumentInEmbed !== !0 ? z : !1,
|
|
202
211
|
readMoreClassName: e.is_reply ? s.replyStyle : s.argumentStyle
|
|
203
212
|
}
|
|
204
213
|
)
|
|
205
214
|
]
|
|
206
215
|
}
|
|
207
216
|
),
|
|
208
|
-
e.sources?.length > 0 && /* @__PURE__ */ o("div", { className: s.argumentSourcesList, children: e.sources.map(
|
|
217
|
+
e.sources?.length > 0 && /* @__PURE__ */ o("div", { className: s.argumentSourcesList, children: e.sources.map(le) })
|
|
209
218
|
] }),
|
|
210
|
-
!
|
|
211
|
-
|
|
219
|
+
!N && !e.is_deleted && /* @__PURE__ */ o(
|
|
220
|
+
Ie,
|
|
212
221
|
{
|
|
213
222
|
resource: e,
|
|
214
|
-
disabled:
|
|
223
|
+
disabled: v || e.status === "rejected" || !ee && r?.actions?.disableInputForVisitor === !0 || x,
|
|
215
224
|
reportType: "Message",
|
|
216
225
|
softDelete: r.actions?.softDelete,
|
|
217
226
|
deleteType: "messages",
|
|
218
|
-
deleteListId:
|
|
219
|
-
enableReply:
|
|
220
|
-
handleReplyTo:
|
|
221
|
-
replyRedirectUrl:
|
|
227
|
+
deleteListId: K,
|
|
228
|
+
enableReply: b <= w || p.role === "editor" || p.role === "moderator",
|
|
229
|
+
handleReplyTo: k,
|
|
230
|
+
replyRedirectUrl: X,
|
|
222
231
|
shareUrl: `https://app.logora.fr/share/a/${e.id}`,
|
|
223
232
|
shareTitle: i.formatMessage({
|
|
224
233
|
id: "share.argument.title",
|
|
@@ -233,49 +242,49 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
233
242
|
showShareText: !0,
|
|
234
243
|
showShareButton: r?.actions?.hideShareButton !== !0,
|
|
235
244
|
enableReport: !(e.score === 100 && e.manual_score),
|
|
236
|
-
enableEdition:
|
|
237
|
-
enableDeletion:
|
|
245
|
+
enableEdition: q,
|
|
246
|
+
enableDeletion: J,
|
|
238
247
|
children: /* @__PURE__ */ o(
|
|
239
|
-
|
|
248
|
+
Ce,
|
|
240
249
|
{
|
|
241
250
|
voteableType: "Message",
|
|
242
251
|
voteableId: e.id,
|
|
243
252
|
totalUpvote: e.upvotes,
|
|
244
253
|
totalDownvote: 0,
|
|
245
|
-
activeClassName: s[`voteButtonPosition-${
|
|
246
|
-
disabled: e.status === "rejected" ||
|
|
254
|
+
activeClassName: s[`voteButtonPosition-${R}`],
|
|
255
|
+
disabled: e.status === "rejected" || p?.id === e?.author?.id || x
|
|
247
256
|
}
|
|
248
257
|
)
|
|
249
258
|
}
|
|
250
259
|
),
|
|
251
|
-
!
|
|
252
|
-
|
|
260
|
+
!N && !A && /* @__PURE__ */ o(
|
|
261
|
+
me,
|
|
253
262
|
{
|
|
254
263
|
numberReplies: e.number_replies,
|
|
255
264
|
repliesAuthors: e.replies_authors,
|
|
256
|
-
expandReplies:
|
|
257
|
-
onToggleReplies:
|
|
265
|
+
expandReplies: u,
|
|
266
|
+
onToggleReplies: $,
|
|
258
267
|
isReply: e.is_reply
|
|
259
268
|
}
|
|
260
269
|
)
|
|
261
270
|
]
|
|
262
271
|
}
|
|
263
272
|
),
|
|
264
|
-
!
|
|
265
|
-
|
|
266
|
-
|
|
273
|
+
!A && /* @__PURE__ */ l(_, { children: [
|
|
274
|
+
oe && /* @__PURE__ */ o(ce, { fallback: null, children: /* @__PURE__ */ o(
|
|
275
|
+
Te,
|
|
267
276
|
{
|
|
268
277
|
groupId: e.group_id,
|
|
269
278
|
groupType: S,
|
|
270
|
-
groupName:
|
|
271
|
-
positions:
|
|
279
|
+
groupName: T,
|
|
280
|
+
positions: M,
|
|
272
281
|
parentId: e.id,
|
|
273
|
-
positionId:
|
|
274
|
-
disabled:
|
|
282
|
+
positionId: O?.position_id,
|
|
283
|
+
disabled: v,
|
|
275
284
|
hideSourceAction: r?.actions?.disableUserSources || !1,
|
|
276
285
|
argumentListId: `argument_${e.id}_reply_list`,
|
|
277
286
|
onSubmit: (t) => {
|
|
278
|
-
|
|
287
|
+
k(), h([t]), I(!0);
|
|
279
288
|
},
|
|
280
289
|
isReply: !0,
|
|
281
290
|
avatarSize: 40,
|
|
@@ -288,13 +297,13 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
288
297
|
},
|
|
289
298
|
`Reply${e.id}`
|
|
290
299
|
) }),
|
|
291
|
-
m?.length > 0 &&
|
|
292
|
-
|
|
293
|
-
|
|
300
|
+
m?.length > 0 && u && /* @__PURE__ */ o("div", { className: s.repliesList, children: m.map((t) => B(t)) }),
|
|
301
|
+
u && /* @__PURE__ */ o("div", { className: s.repliesList, children: /* @__PURE__ */ o(
|
|
302
|
+
Re,
|
|
294
303
|
{
|
|
295
304
|
voteableType: "Message",
|
|
296
305
|
currentListId: `argument_${e.id}_reply_list`,
|
|
297
|
-
loadingComponent: /* @__PURE__ */ o(
|
|
306
|
+
loadingComponent: /* @__PURE__ */ o(we, {}),
|
|
298
307
|
resource: "messages",
|
|
299
308
|
sort: "+created_at",
|
|
300
309
|
filters: {
|
|
@@ -305,17 +314,17 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
305
314
|
perPage: 5,
|
|
306
315
|
display: "column",
|
|
307
316
|
resourcePropName: "argument",
|
|
308
|
-
emptyListComponent: /* @__PURE__ */ o(
|
|
309
|
-
transformData: (t) =>
|
|
310
|
-
children:
|
|
317
|
+
emptyListComponent: /* @__PURE__ */ o(_, {}),
|
|
318
|
+
transformData: (t) => ae(t),
|
|
319
|
+
children: B(e)
|
|
311
320
|
}
|
|
312
321
|
) }),
|
|
313
|
-
m?.length > 0 && !
|
|
322
|
+
m?.length > 0 && !u && /* @__PURE__ */ o("div", { className: s.repliesList, children: e.number_replies > 1 && /* @__PURE__ */ o("div", { className: s.readMoreLink, children: /* @__PURE__ */ o(
|
|
314
323
|
Se,
|
|
315
324
|
{
|
|
316
325
|
role: "link",
|
|
317
|
-
rightIcon: /* @__PURE__ */ o(
|
|
318
|
-
handleClick:
|
|
326
|
+
rightIcon: /* @__PURE__ */ o(j, { name: "lightArrow", height: 10, width: 10 }),
|
|
327
|
+
handleClick: $,
|
|
319
328
|
children: i.formatMessage({
|
|
320
329
|
id: "argument.argument.see_more",
|
|
321
330
|
defaultMessage: "See more"
|
|
@@ -324,8 +333,8 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
324
333
|
) }) })
|
|
325
334
|
] })
|
|
326
335
|
] });
|
|
327
|
-
},
|
|
336
|
+
}, Ae = Ne;
|
|
328
337
|
export {
|
|
329
|
-
|
|
330
|
-
|
|
338
|
+
Ne as Argument,
|
|
339
|
+
Ae as ArgumentContainer
|
|
331
340
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as _, jsx as
|
|
1
|
+
import { jsxs as _, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import $e from "@rooks/use-sessionstorage-state";
|
|
3
|
-
import { useRef as qe, useState as c, useEffect as
|
|
3
|
+
import { useRef as qe, useState as c, useEffect as v, Suspense as De, lazy as We } from "react";
|
|
4
4
|
import { useIntl as Ye, FormattedMessage as me } from "react-intl";
|
|
5
5
|
import { useLocation as ke } from "react-router";
|
|
6
|
-
import
|
|
6
|
+
import C from "classnames";
|
|
7
7
|
import n from "./ArgumentInput.module.scss.js";
|
|
8
8
|
import { useDataProvider as Re } from "../../data/data_provider/useDataProvider.js";
|
|
9
9
|
import { useList as je } from "../../list/list_provider/useList.js";
|
|
@@ -20,95 +20,95 @@ import { Avatar as et } from "../../user/avatar/Avatar.js";
|
|
|
20
20
|
import { AuthorBox as tt } from "../../user/author_box/AuthorBox.js";
|
|
21
21
|
import { TextEditor as nt } from "../text_editor/TextEditor.js";
|
|
22
22
|
import { Icon as at } from "../../icons/icon/Icon.js";
|
|
23
|
-
const
|
|
24
|
-
argumentListId:
|
|
25
|
-
avatarSize:
|
|
23
|
+
const it = We(() => import("../../modal/side_modal/index.js").then((I) => ({ default: I.SideModal }))), xt = ({
|
|
24
|
+
argumentListId: I,
|
|
25
|
+
avatarSize: fe = 48,
|
|
26
26
|
disabled: z = !1,
|
|
27
27
|
positions: a = [],
|
|
28
28
|
disabledPositions: S = [],
|
|
29
|
-
groupId:
|
|
30
|
-
groupName:
|
|
29
|
+
groupId: M,
|
|
30
|
+
groupName: ge,
|
|
31
31
|
groupType: O,
|
|
32
32
|
hideSourceAction: he = !1,
|
|
33
|
-
isReply:
|
|
33
|
+
isReply: d = !1,
|
|
34
34
|
onSubmit: J,
|
|
35
|
-
parentId:
|
|
35
|
+
parentId: L,
|
|
36
36
|
placeholder: pe,
|
|
37
|
-
positionId:
|
|
37
|
+
positionId: w,
|
|
38
38
|
focusOnInit: _e = !1,
|
|
39
|
-
activeOnInit:
|
|
39
|
+
activeOnInit: F = !1,
|
|
40
40
|
userGuideUrl: K,
|
|
41
|
-
hideUserGuideLink:
|
|
42
|
-
hideCharCount:
|
|
43
|
-
disableAutoActivate:
|
|
41
|
+
hideUserGuideLink: ve = !1,
|
|
42
|
+
hideCharCount: Me = !1,
|
|
43
|
+
disableAutoActivate: we = !1
|
|
44
44
|
}) => {
|
|
45
|
-
const r = Ye(), G = Re(),
|
|
45
|
+
const r = Ye(), G = Re(), y = je(), h = ze(), {
|
|
46
46
|
focus: H,
|
|
47
|
-
setFocus:
|
|
47
|
+
setFocus: x,
|
|
48
48
|
setReset: be,
|
|
49
|
-
inputContent:
|
|
49
|
+
inputContent: E,
|
|
50
50
|
setInputContent: Q,
|
|
51
|
-
setInputRichContent:
|
|
52
|
-
} = Oe(), { isLoggedIn:
|
|
51
|
+
setInputRichContent: Ae
|
|
52
|
+
} = Oe(), { isLoggedIn: b, currentUser: u } = Je(), { errors: P, validate: B } = Ke(), { isMobile: m } = Ge(), Ce = ke(), X = qe(null), [V, U] = c([]), [$, q] = c(""), [Z, D] = c(null), [l, p] = c(null), [ee, te] = c(null), [ne, ae] = c(!1), [A, ie] = c(!1), [W, se] = c({}), [f, Ie] = $e(
|
|
53
53
|
"userSide",
|
|
54
54
|
{}
|
|
55
|
-
), [
|
|
56
|
-
!
|
|
57
|
-
), Y = He(), { showModal:
|
|
58
|
-
typeof window < "u" ? window.location.search :
|
|
55
|
+
), [g, Se] = c(
|
|
56
|
+
!b && h?.actions?.disableInputForVisitor
|
|
57
|
+
), Y = He(), { showModal: ye } = Qe(), { toast: k } = Xe() || {}, oe = new URLSearchParams(
|
|
58
|
+
typeof window < "u" ? window.location.search : Ce.search
|
|
59
59
|
);
|
|
60
|
-
|
|
60
|
+
v(() => {
|
|
61
61
|
Se(
|
|
62
|
-
!
|
|
62
|
+
!b && h?.actions?.disableInputForVisitor
|
|
63
63
|
);
|
|
64
|
-
}, [
|
|
65
|
-
const R =
|
|
66
|
-
|
|
64
|
+
}, [b, h]);
|
|
65
|
+
const R = u?.role === "editor" || u?.role === "moderator", re = u?.moderation_status === "banned";
|
|
66
|
+
v(() => {
|
|
67
67
|
let e = null;
|
|
68
|
-
typeof window < "u" && (e =
|
|
69
|
-
}, [
|
|
70
|
-
|
|
71
|
-
}, [
|
|
68
|
+
typeof window < "u" && (e = oe.get("positionId")), w && w != a[2]?.id && a?.find((t) => t.id === w) ? p(w) : e && e != a[2]?.id ? p(e) : f && f.groupId == M && f.positionId != a[2]?.id && p(f.positionId);
|
|
69
|
+
}, [w]), v(() => {
|
|
70
|
+
F && (j(), x(!0));
|
|
71
|
+
}, [F]), v(() => {
|
|
72
72
|
if (typeof window < "u") {
|
|
73
|
-
const e = _e ||
|
|
74
|
-
(e === !0 || e === "true") && (
|
|
73
|
+
const e = _e || oe.get("initArgument");
|
|
74
|
+
(e === !0 || e === "true") && (x(!0), Be());
|
|
75
75
|
}
|
|
76
|
-
}, []),
|
|
77
|
-
H && (
|
|
78
|
-
}, [H]),
|
|
79
|
-
|
|
80
|
-
}, [
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
}, ue = () => {
|
|
84
|
-
X.current.scrollIntoView(!1);
|
|
76
|
+
}, []), v(() => {
|
|
77
|
+
H && (de(), x(!1));
|
|
78
|
+
}, [H]), v(() => {
|
|
79
|
+
E?.id && (xe(E), x(!0));
|
|
80
|
+
}, [E]);
|
|
81
|
+
const xe = (e) => {
|
|
82
|
+
se(e), ie(!0), U(e.sources), q(e.content), D(e.rich_content), te(e.id), de(), p(e.position?.id), JSON.parse(e.rich_content).hasOwnProperty("root") ? Ae(e.rich_content) : Q(e.content);
|
|
85
83
|
}, de = () => {
|
|
86
|
-
|
|
87
|
-
},
|
|
84
|
+
X.current.scrollIntoView(!1);
|
|
85
|
+
}, ue = () => {
|
|
86
|
+
q(""), D(null), se({}), te(null), U([]), be(!0), Q(null);
|
|
87
|
+
}, Ne = (e) => {
|
|
88
88
|
p(e), ce(e);
|
|
89
89
|
}, Te = () => {
|
|
90
|
-
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
90
|
+
ye(
|
|
91
|
+
/* @__PURE__ */ i(De, { fallback: null, children: /* @__PURE__ */ i(
|
|
92
|
+
it,
|
|
93
93
|
{
|
|
94
94
|
modalTitle: r.formatMessage({
|
|
95
95
|
id: "modal.side_modal.modal_title",
|
|
96
96
|
defaultMessage: "Choose your side"
|
|
97
97
|
}),
|
|
98
|
-
onChooseSide:
|
|
98
|
+
onChooseSide: Ne,
|
|
99
99
|
positions: a,
|
|
100
|
-
title:
|
|
101
|
-
disabledPositions: !
|
|
102
|
-
isNeutral:
|
|
100
|
+
title: ge,
|
|
101
|
+
disabledPositions: !d && S,
|
|
102
|
+
isNeutral: f && f.groupId == M && f.positionId === a[2]?.id
|
|
103
103
|
}
|
|
104
104
|
) })
|
|
105
105
|
);
|
|
106
106
|
}, Le = () => {
|
|
107
|
-
|
|
107
|
+
b ? ee ? Pe() : !a || a?.length === 0 || !S?.find((e) => e?.id === l) && l || R && d ? ce(d && R && a[0]?.id) : Te() : Y({ loginAction: "argument" });
|
|
108
108
|
}, Fe = (e, t) => {
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
|
|
109
|
+
g ? Y({ loginAction: "argument" }) : (q(e), D(t), B({ content: e }, [{ content: ["url", null] }]));
|
|
110
|
+
}, Ee = (e) => {
|
|
111
|
+
U(e);
|
|
112
112
|
}, le = [
|
|
113
113
|
{ content: ["length", 3] },
|
|
114
114
|
{ content: ["required", null] },
|
|
@@ -116,22 +116,22 @@ const ot = We(() => import("../../modal/side_modal/index.js").then((v) => ({ def
|
|
|
116
116
|
...!a || a?.length === 0 ? [] : [{ position_id: ["required", null] }]
|
|
117
117
|
], ce = (e) => {
|
|
118
118
|
const t = e || l, s = {
|
|
119
|
-
content:
|
|
119
|
+
content: $,
|
|
120
120
|
rich_content: Z,
|
|
121
|
-
group_id:
|
|
121
|
+
group_id: M,
|
|
122
122
|
...O && { group_type: O },
|
|
123
123
|
...t && { position_id: t },
|
|
124
|
-
is_reply: !!
|
|
125
|
-
message_id:
|
|
126
|
-
source_ids:
|
|
124
|
+
is_reply: !!L,
|
|
125
|
+
message_id: L || null,
|
|
126
|
+
source_ids: V?.map((o) => o.id)
|
|
127
127
|
};
|
|
128
|
-
|
|
129
|
-
groupId:
|
|
128
|
+
B(s, le) && (t && a && a.map((o) => o.id).includes(t) && Ie({
|
|
129
|
+
groupId: M,
|
|
130
130
|
positionId: t
|
|
131
|
-
}),
|
|
132
|
-
if (
|
|
133
|
-
if (
|
|
134
|
-
J(
|
|
131
|
+
}), ue(), G.create("messages", s).then((o) => {
|
|
132
|
+
if (o.data.success) {
|
|
133
|
+
if (L)
|
|
134
|
+
J(o.data.data.resource), k(
|
|
135
135
|
r.formatMessage({
|
|
136
136
|
id: "alert.argument_create",
|
|
137
137
|
defaultMessage: "Your contribution has been sent !"
|
|
@@ -145,12 +145,12 @@ const ot = We(() => import("../../modal/side_modal/index.js").then((v) => ({ def
|
|
|
145
145
|
}
|
|
146
146
|
);
|
|
147
147
|
else {
|
|
148
|
-
const
|
|
149
|
-
let
|
|
150
|
-
t && !m && (
|
|
151
|
-
|
|
148
|
+
const N = o.data.data.resource;
|
|
149
|
+
let T = I;
|
|
150
|
+
t && !m && (T = `argumentList${N.position.id}`), J?.(
|
|
151
|
+
$,
|
|
152
152
|
a.find((Ue) => Ue.id === t) || null
|
|
153
|
-
),
|
|
153
|
+
), y.add(T, [N]), k(
|
|
154
154
|
r.formatMessage({
|
|
155
155
|
id: "alert.argument_create",
|
|
156
156
|
defaultMessage: "Your contribution has been sent !"
|
|
@@ -162,42 +162,45 @@ const ot = We(() => import("../../modal/side_modal/index.js").then((v) => ({ def
|
|
|
162
162
|
defaultMessage: "Up to 10 eloquence points"
|
|
163
163
|
}),
|
|
164
164
|
category: "ARGUMENT",
|
|
165
|
-
contentKey:
|
|
165
|
+
contentKey: u.messages_count === 2 ? "alert.third_argument" : "alert.first_argument"
|
|
166
166
|
}
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
169
|
typeof window < "u" && window.dispatchEvent(
|
|
170
170
|
new CustomEvent("logora:user_content:created", {
|
|
171
171
|
detail: {
|
|
172
|
-
content:
|
|
172
|
+
content: o.data.data?.resource
|
|
173
173
|
}
|
|
174
174
|
})
|
|
175
175
|
);
|
|
176
176
|
}
|
|
177
177
|
}));
|
|
178
|
-
},
|
|
178
|
+
}, Pe = () => {
|
|
179
179
|
const e = {
|
|
180
|
-
content:
|
|
180
|
+
content: $,
|
|
181
181
|
rich_content: Z,
|
|
182
|
-
source_ids:
|
|
182
|
+
source_ids: V?.map((t) => t.id),
|
|
183
183
|
...l && { position_id: l }
|
|
184
184
|
};
|
|
185
|
-
|
|
185
|
+
B(e, le) && G.update("messages", ee, e).then((t) => {
|
|
186
186
|
if (t.data.success) {
|
|
187
187
|
const s = t.data.data.resource;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
x.remove(T, [s]), x.add(L, [s]);
|
|
188
|
+
let o = I;
|
|
189
|
+
if (s.is_reply ? o = `argument_${s.reply_to_id || W?.reply_to_id}_reply_list` : l && !m && (o = `argumentList${s.position?.id}`), W?.position?.id != s.position?.id && !m && !s.is_reply) {
|
|
190
|
+
const N = `argumentList${W.position.id}`, T = `argumentList${s.position.id}`;
|
|
191
|
+
y.remove(N, [s]), y.add(T, [s]);
|
|
193
192
|
} else
|
|
194
|
-
|
|
193
|
+
y.update(o, [s]), s.is_reply && typeof window < "u" && window.dispatchEvent(
|
|
194
|
+
new CustomEvent("logora:reply:updated", {
|
|
195
|
+
detail: { reply: s }
|
|
196
|
+
})
|
|
197
|
+
);
|
|
195
198
|
k(r.formatMessage({ id: "alert.argument_modify" }), {
|
|
196
199
|
type: "success"
|
|
197
|
-
}),
|
|
200
|
+
}), ue();
|
|
198
201
|
}
|
|
199
202
|
});
|
|
200
|
-
},
|
|
203
|
+
}, Be = () => {
|
|
201
204
|
if (!ne) {
|
|
202
205
|
ae(!0);
|
|
203
206
|
const e = setTimeout(() => {
|
|
@@ -206,7 +209,7 @@ const ot = We(() => import("../../modal/side_modal/index.js").then((v) => ({ def
|
|
|
206
209
|
return () => clearTimeout(e);
|
|
207
210
|
}
|
|
208
211
|
}, j = () => {
|
|
209
|
-
|
|
212
|
+
g ? Y({ loginAction: "argument" }) : ie(!0);
|
|
210
213
|
}, Ve = () => {
|
|
211
214
|
const e = S.find(
|
|
212
215
|
(t) => t.id === l
|
|
@@ -221,27 +224,27 @@ const ot = We(() => import("../../modal/side_modal/index.js").then((v) => ({ def
|
|
|
221
224
|
);
|
|
222
225
|
};
|
|
223
226
|
return /* @__PURE__ */ _("div", { className: n.inputContainer, children: [
|
|
224
|
-
z && /* @__PURE__ */
|
|
227
|
+
z && /* @__PURE__ */ i("div", { className: n.disabledInputMask, children: re ? r.formatMessage({
|
|
225
228
|
id: "input.argument_input.user_banned",
|
|
226
229
|
defaultMessage: "You are banned from the debate space."
|
|
227
230
|
}) : r.formatMessage({
|
|
228
231
|
id: "info.debate_is_inactive",
|
|
229
232
|
defaultMessage: "Debate is closed"
|
|
230
233
|
}) }),
|
|
231
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ i(
|
|
232
235
|
"div",
|
|
233
236
|
{
|
|
234
|
-
className:
|
|
237
|
+
className: C(n.argumentInput, {
|
|
235
238
|
[n.flash]: ne,
|
|
236
|
-
[n.replyInputContainer]:
|
|
239
|
+
[n.replyInputContainer]: d
|
|
237
240
|
}),
|
|
238
|
-
children: /* @__PURE__ */
|
|
239
|
-
a.length > 0 &&
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
+
children: /* @__PURE__ */ i("div", { "data-tid": "action_add_argument", ref: X, children: /* @__PURE__ */ _("div", { className: n.argumentInputBox, children: [
|
|
242
|
+
a.length > 0 && b && (!d || !R) && /* @__PURE__ */ _("div", { className: n.userPosition, children: [
|
|
243
|
+
/* @__PURE__ */ i("div", { children: r.formatMessage({
|
|
241
244
|
id: "input.position",
|
|
242
245
|
defaultMessage: "Your position"
|
|
243
246
|
}) }),
|
|
244
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ i(
|
|
245
248
|
Ze,
|
|
246
249
|
{
|
|
247
250
|
activeLabel: l === a[0].id ? 0 : l === a[1].id ? 1 : null,
|
|
@@ -254,32 +257,32 @@ const ot = We(() => import("../../modal/side_modal/index.js").then((v) => ({ def
|
|
|
254
257
|
/* @__PURE__ */ _(
|
|
255
258
|
"div",
|
|
256
259
|
{
|
|
257
|
-
className:
|
|
260
|
+
className: C(n.argumentTextInputBox, {
|
|
258
261
|
[n.argumentTextInputBoxisTablet]: !m,
|
|
259
|
-
[n.replyEditorRow]:
|
|
262
|
+
[n.replyEditorRow]: d
|
|
260
263
|
}),
|
|
261
264
|
children: [
|
|
262
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ i(
|
|
263
266
|
"div",
|
|
264
267
|
{
|
|
265
|
-
className:
|
|
268
|
+
className: C(n.argumentAuthorContainer, {
|
|
266
269
|
[n.argumentAuthorContainerMobile]: m,
|
|
267
|
-
[n.argumentAuthorContainerActivated]: !m &&
|
|
270
|
+
[n.argumentAuthorContainerActivated]: !m && A || d
|
|
268
271
|
}),
|
|
269
|
-
children: !m &&
|
|
272
|
+
children: !m && A || d ? /* @__PURE__ */ i(
|
|
270
273
|
et,
|
|
271
274
|
{
|
|
272
|
-
avatarUrl:
|
|
273
|
-
userName:
|
|
274
|
-
size:
|
|
275
|
+
avatarUrl: u.image_url,
|
|
276
|
+
userName: u.full_name,
|
|
277
|
+
size: fe
|
|
275
278
|
}
|
|
276
|
-
) : /* @__PURE__ */
|
|
279
|
+
) : /* @__PURE__ */ i(
|
|
277
280
|
tt,
|
|
278
281
|
{
|
|
279
|
-
fullName:
|
|
280
|
-
avatarUrl:
|
|
281
|
-
points:
|
|
282
|
-
slug:
|
|
282
|
+
fullName: u?.full_name || r.formatMessage({ id: "default_author.full_name" }),
|
|
283
|
+
avatarUrl: u?.image_url,
|
|
284
|
+
points: u?.points || 0,
|
|
285
|
+
slug: u?.hash_id
|
|
283
286
|
}
|
|
284
287
|
)
|
|
285
288
|
}
|
|
@@ -289,18 +292,18 @@ const ot = We(() => import("../../modal/side_modal/index.js").then((v) => ({ def
|
|
|
289
292
|
{
|
|
290
293
|
onClick: j,
|
|
291
294
|
"data-testid": "argument-input",
|
|
292
|
-
className:
|
|
293
|
-
[n.replyTextEditorBox]:
|
|
295
|
+
className: C(n.textEditorBox, {
|
|
296
|
+
[n.replyTextEditorBox]: d
|
|
294
297
|
}),
|
|
295
298
|
children: [
|
|
296
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ i(
|
|
297
300
|
nt,
|
|
298
301
|
{
|
|
299
302
|
handleChange: (e, t) => {
|
|
300
303
|
Fe(e, t);
|
|
301
304
|
},
|
|
302
305
|
handleSourcesChange: (e) => {
|
|
303
|
-
|
|
306
|
+
Ee(e);
|
|
304
307
|
},
|
|
305
308
|
placeholder: pe,
|
|
306
309
|
"aria-label": r.formatMessage({
|
|
@@ -308,34 +311,34 @@ const ot = We(() => import("../../modal/side_modal/index.js").then((v) => ({ def
|
|
|
308
311
|
defaultMessage: "Message input field"
|
|
309
312
|
}),
|
|
310
313
|
onSubmit: Le,
|
|
311
|
-
sources:
|
|
312
|
-
hideSourceAction: he ||
|
|
313
|
-
uid: `Argument${
|
|
314
|
+
sources: V,
|
|
315
|
+
hideSourceAction: he || g,
|
|
316
|
+
uid: `Argument${M}`,
|
|
314
317
|
onActivation: j,
|
|
315
|
-
showStylesControls:
|
|
316
|
-
disabled: z ||
|
|
317
|
-
maxLength:
|
|
318
|
-
disableRichText: h?.actions?.disableRichText ||
|
|
319
|
-
shortBar:
|
|
320
|
-
hideSubmit:
|
|
318
|
+
showStylesControls: A,
|
|
319
|
+
disabled: z || g || re,
|
|
320
|
+
maxLength: g ? !1 : h?.actions?.argumentMaxLength,
|
|
321
|
+
disableRichText: h?.actions?.disableRichText || g,
|
|
322
|
+
shortBar: d,
|
|
323
|
+
hideSubmit: g,
|
|
321
324
|
allowedDomains: h?.allowed_sources,
|
|
322
|
-
active:
|
|
323
|
-
hideCharCount:
|
|
324
|
-
disableAutoActivate:
|
|
325
|
+
active: F,
|
|
326
|
+
hideCharCount: Me,
|
|
327
|
+
disableAutoActivate: we
|
|
325
328
|
}
|
|
326
329
|
),
|
|
327
|
-
|
|
328
|
-
|
|
330
|
+
P?.content && /* @__PURE__ */ i("div", { className: n.argumentInputWarning, children: P && Object.values(P).map((e, t) => /* @__PURE__ */ i("div", { children: e }, t)) }),
|
|
331
|
+
A && S?.find(
|
|
329
332
|
(e) => e.id === l
|
|
330
333
|
) && /* @__PURE__ */ _(
|
|
331
334
|
"div",
|
|
332
335
|
{
|
|
333
|
-
className:
|
|
336
|
+
className: C(
|
|
334
337
|
n.argumentInputWarning,
|
|
335
338
|
n.disabledPositionWarning
|
|
336
339
|
),
|
|
337
340
|
children: [
|
|
338
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ i(
|
|
339
342
|
at,
|
|
340
343
|
{
|
|
341
344
|
name: "announcement",
|
|
@@ -344,24 +347,24 @@ const ot = We(() => import("../../modal/side_modal/index.js").then((v) => ({ def
|
|
|
344
347
|
width: 20
|
|
345
348
|
}
|
|
346
349
|
),
|
|
347
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ i("div", { className: n.argumentInputWarningText, children: Ve() })
|
|
348
351
|
]
|
|
349
352
|
}
|
|
350
353
|
),
|
|
351
|
-
|
|
354
|
+
A && K && !ve && /* @__PURE__ */ i("div", { className: n.guideMessage, children: /* @__PURE__ */ i(
|
|
352
355
|
me,
|
|
353
356
|
{
|
|
354
357
|
id: "alert.guide_message",
|
|
355
358
|
defaultMessage: "Contributions must comply with our {userCharter}.",
|
|
356
359
|
values: {
|
|
357
|
-
userCharter: /* @__PURE__ */
|
|
360
|
+
userCharter: /* @__PURE__ */ i(
|
|
358
361
|
"a",
|
|
359
362
|
{
|
|
360
363
|
className: n.guideMessage,
|
|
361
364
|
href: K,
|
|
362
365
|
target: "_blank",
|
|
363
366
|
rel: "noreferrer",
|
|
364
|
-
children: /* @__PURE__ */
|
|
367
|
+
children: /* @__PURE__ */ i(
|
|
365
368
|
me,
|
|
366
369
|
{
|
|
367
370
|
id: "alert.user_charter",
|
|
@@ -385,5 +388,5 @@ const ot = We(() => import("../../modal/side_modal/index.js").then((v) => ({ def
|
|
|
385
388
|
] });
|
|
386
389
|
};
|
|
387
390
|
export {
|
|
388
|
-
|
|
391
|
+
xt as ArgumentInput
|
|
389
392
|
};
|