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