@logora/debate 0.3.59 → 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.
- package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-CZB4qRb2.css +1 -0
- package/dist/components/argument/argument/Argument.js +67 -62
- package/dist/components/consultation/consultation_box/ConsultationBox.module.scss.js +17 -17
- package/dist/components/input/argument_input/ArgumentInput.js +133 -132
- package/package.json +1 -1
- package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-BPJksgZ-.css +0 -1
package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-CZB4qRb2.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._container_jsaa0_3{display:flex!important;flex-direction:column!important;justify-content:space-between!important;box-shadow:var(--box-shadow, 0px 2px 5px rgba(7, 42, 68, .1));border:var(--box-border, 1px solid rgba(7, 42, 68, .1));color:var(--text-primary, #222222);border-radius:var(--box-border-radius, 6px);background:var(--background-color-primary, white)}._container_jsaa0_3 a{text-decoration:none!important;color:var(--text-primary, #222222)!important}._consultationImageBox_jsaa0_18{position:relative}._consultationImage_jsaa0_18{border-top-right-radius:var(--box-border-radius, 6px);border-top-left-radius:var(--box-border-radius, 6px);width:100%;aspect-ratio:var(--img-aspect-ratio, 16/9);object-fit:cover;display:block}._consultationTime_jsaa0_31{display:flex!important;align-items:center!important;position:absolute;left:var(--space-unit, 1em);bottom:var(--space-unit, 1em);padding-right:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important;padding-left:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important;padding-top:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;padding-bottom:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;background-color:var(--call-primary-color, #434343);border-radius:var(--box-border-radius, 6px);font-size:var(--font-size-normal, 16px);color:var(--text-light, white);max-width:93%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._consultationTime_jsaa0_31 span{color:var(--text-light, white)}._consultationTime_jsaa0_31._ended_jsaa0_53{background-color:var(--call-primary-color, #434343)}._consultationTitle_jsaa0_57{padding-top:var(--spacer-lg, calc(var(--space-unit, 1em) * 1.5))!important;padding-bottom:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;padding-right:var(--space-unit, 1em)!important;padding-left:var(--space-unit, 1em)!important;font-size:var(--font-size-normal, 16px);font-weight:var(--font-weight-bold, 700)}._iconVote_jsaa0_66{padding-top:3px!important}._iconChat_jsaa0_70{padding-top:6px!important}._consultationButtonContainer_jsaa0_74{display:flex!important;padding-right:var(--space-unit, 1em)!important;padding-left:var(--space-unit, 1em)!important;padding-bottom:var(--spacer-lg, calc(var(--space-unit, 1em) * 1.5))!important;color:var(--text-secondary, #5F5F5F);font-size:var(--font-size-small, 16px)}._consultationButtonContainer_jsaa0_74:hover{text-decoration:underline;text-decoration-color:var(--text-secondary, #5F5F5F)}._consultationButtonContainer_jsaa0_74 ._arrowIcon_jsaa0_86{margin-left:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;transform:rotate(180deg);fill:var(--text-secondary, #5F5F5F);top:1px;position:relative}._consultationInformations_jsaa0_94{display:flex!important;justify-content:space-between!important;align-items:center!important;padding-right:var(--space-unit, 1em)!important;padding-left:var(--space-unit, 1em)!important;padding-top:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;padding-bottom:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;min-height:50px}._consultationInformations_jsaa0_94 ._consultationLeft_jsaa0_104{display:flex!important}._consultationInformations_jsaa0_94 ._consultationGroupInformation_jsaa0_107{display:flex!important;align-items:center!important}._consultationInformations_jsaa0_94 ._consultationGroupInformation_jsaa0_107._consultationGroupRight_jsaa0_111{padding-right:var(--space-unit, 1em)!important}._consultationInformations_jsaa0_94 ._progressBarContainer_jsaa0_114{width:60%;display:flex!important;flex-direction:column!important;align-items:flex-end!important;font-size:var(--font-size-extra-small, 14px)}._consultationInformations_jsaa0_94 ._progressBarContainer_jsaa0_114 ._progress_jsaa0_114{margin-top:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;height:15px;width:100%;border-radius:var(--box-border-radius, 6px);background-color:var(--background-color-secondary, #E8E8E8)!important}._consultationInformations_jsaa0_94 ._progressBarContainer_jsaa0_114 ._bar_jsaa0_128{background-color:var(--call-primary-color, #434343)}._consultationInformations_jsaa0_94 ._progressBarContainer_jsaa0_114 ._totalVotes_jsaa0_131{margin-right:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important}._consultationInformations_jsaa0_94 ._progressBarContainer_jsaa0_114 ._totalVotesPercentage_jsaa0_134{margin-left:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important}._consultationInformations_jsaa0_94 ._consultationTextInformation_jsaa0_137{padding-right:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;padding-top:10px!important}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as o, jsxs as l, Fragment as
|
|
1
|
+
import { jsx as o, jsxs as l, Fragment as y } from "react/jsx-runtime";
|
|
2
2
|
import B from "classnames";
|
|
3
|
-
import { useState as
|
|
3
|
+
import { useState as _, useEffect as ae, useCallback as le, Suspense as ne, lazy as de } from "react";
|
|
4
4
|
import { useIntl as ce } from "react-intl";
|
|
5
5
|
import s from "./Argument.module.scss.js";
|
|
6
6
|
import { ReplyFooter as pe } from "./ReplyFooter.js";
|
|
@@ -22,18 +22,18 @@ import { Button as Se } from "../../action/button/Button.js";
|
|
|
22
22
|
const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({ default: e.ArgumentInput }))), P = (e) => e?.replace(/ /g, " "), Te = ({
|
|
23
23
|
argument: e,
|
|
24
24
|
argumentReplies: n,
|
|
25
|
-
nestingLevel:
|
|
26
|
-
maxNestingLevel:
|
|
27
|
-
groupType:
|
|
28
|
-
groupName:
|
|
29
|
-
positions:
|
|
25
|
+
nestingLevel: g = 0,
|
|
26
|
+
maxNestingLevel: S = 2,
|
|
27
|
+
groupType: R,
|
|
28
|
+
groupName: T,
|
|
29
|
+
positions: b = [],
|
|
30
30
|
disableLinks: F = !1,
|
|
31
|
-
parentArgument:
|
|
31
|
+
parentArgument: c,
|
|
32
32
|
flashParent: j,
|
|
33
33
|
expandable: G,
|
|
34
|
-
disabled:
|
|
35
|
-
hideFooter:
|
|
36
|
-
hideReplies:
|
|
34
|
+
disabled: M = !1,
|
|
35
|
+
hideFooter: N = !1,
|
|
36
|
+
hideReplies: w,
|
|
37
37
|
vote: H,
|
|
38
38
|
fixedContentHeight: V = !1,
|
|
39
39
|
enableEdition: z = !0,
|
|
@@ -44,7 +44,7 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
44
44
|
replyRedirectUrl: K,
|
|
45
45
|
hideContent: Q = !1
|
|
46
46
|
}) => {
|
|
47
|
-
const i = ce(), { isLoggedIn: W, currentUser:
|
|
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(
|
|
48
48
|
e.content,
|
|
49
49
|
e.language,
|
|
50
50
|
"content",
|
|
@@ -54,21 +54,21 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
54
54
|
e.position?.language,
|
|
55
55
|
"name",
|
|
56
56
|
e.position?.translation_entries
|
|
57
|
-
),
|
|
57
|
+
), I = `argument_${e.id}`, C = e.position && b?.map((t) => t.id).indexOf(e.position.id) + 1;
|
|
58
58
|
ae(() => {
|
|
59
59
|
n !== void 0 && ie();
|
|
60
60
|
}, [n]);
|
|
61
61
|
const oe = (t) => {
|
|
62
|
-
if (
|
|
63
|
-
const
|
|
64
|
-
|
|
62
|
+
if (I === t) {
|
|
63
|
+
const d = document.getElementById(t);
|
|
64
|
+
d && d.scrollIntoView({ behavior: "smooth" }), x(!0);
|
|
65
65
|
}
|
|
66
|
-
},
|
|
66
|
+
}, U = () => {
|
|
67
67
|
ee((t) => !t);
|
|
68
68
|
}, k = () => {
|
|
69
|
-
|
|
69
|
+
v((t) => !t), h([]);
|
|
70
70
|
}, se = (t) => {
|
|
71
|
-
if (!
|
|
71
|
+
if (!u?.find((a) => a.id === t.id))
|
|
72
72
|
return t;
|
|
73
73
|
}, re = le((t, a) => /* @__PURE__ */ o(
|
|
74
74
|
fe,
|
|
@@ -84,24 +84,24 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
84
84
|
const t = n.filter(
|
|
85
85
|
(a) => a.reply_to_id === e.id
|
|
86
86
|
);
|
|
87
|
-
t.length > 0 && (
|
|
87
|
+
t.length > 0 && (h(t), v(!0));
|
|
88
88
|
}
|
|
89
|
-
},
|
|
89
|
+
}, $ = (t = null) => /* @__PURE__ */ o(
|
|
90
90
|
Ne,
|
|
91
91
|
{
|
|
92
92
|
...t ? { argument: t } : {},
|
|
93
|
-
nestingLevel:
|
|
94
|
-
maxNestingLevel:
|
|
95
|
-
disabled:
|
|
96
|
-
groupName:
|
|
97
|
-
groupType:
|
|
98
|
-
positions:
|
|
93
|
+
nestingLevel: g + 1,
|
|
94
|
+
maxNestingLevel: S,
|
|
95
|
+
disabled: M,
|
|
96
|
+
groupName: T,
|
|
97
|
+
groupType: R,
|
|
98
|
+
positions: b,
|
|
99
99
|
argumentReplies: n,
|
|
100
100
|
parentArgument: e,
|
|
101
101
|
flashParent: (a) => oe(`argument_${a}`)
|
|
102
102
|
}
|
|
103
103
|
);
|
|
104
|
-
return /* @__PURE__ */ l(ye, { elementId:
|
|
104
|
+
return /* @__PURE__ */ l(ye, { elementId: I, onScroll: () => x(!0), children: [
|
|
105
105
|
/* @__PURE__ */ l(
|
|
106
106
|
"div",
|
|
107
107
|
{
|
|
@@ -111,10 +111,10 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
111
111
|
[s.flash]: X,
|
|
112
112
|
[s.argumentReply]: e.is_reply === !0
|
|
113
113
|
},
|
|
114
|
-
s[`level-${
|
|
115
|
-
s[`position-${!(e.author.role === "editor" || e.author.role === "moderator") &&
|
|
114
|
+
s[`level-${g}`],
|
|
115
|
+
s[`position-${!(e.author.role === "editor" || e.author.role === "moderator") && C}`]
|
|
116
116
|
),
|
|
117
|
-
id:
|
|
117
|
+
id: I,
|
|
118
118
|
children: [
|
|
119
119
|
/* @__PURE__ */ o(
|
|
120
120
|
_e,
|
|
@@ -123,7 +123,7 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
123
123
|
author: e.author,
|
|
124
124
|
tag: (e.author.role === "editor" || e.author.role === "moderator") && e.is_reply ? null : te.translatedContent,
|
|
125
125
|
date: e.created_at,
|
|
126
|
-
tagClassName: s[`headerPosition-${
|
|
126
|
+
tagClassName: s[`headerPosition-${C}`],
|
|
127
127
|
disableLinks: F,
|
|
128
128
|
isDeleted: e.is_deleted,
|
|
129
129
|
showModerationFeedback: q ?? (e.status === "rejected" && r.moderation?.showFeedback === !0),
|
|
@@ -138,7 +138,7 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
138
138
|
}) }) : Q ? /* @__PURE__ */ o("div", { className: s.argumentDeletedBody, children: i.formatMessage({
|
|
139
139
|
id: "argument.argument.content_deleted",
|
|
140
140
|
defaultMessage: "This content has been removed."
|
|
141
|
-
}) }) : /* @__PURE__ */ l(
|
|
141
|
+
}) }) : /* @__PURE__ */ l(y, { children: [
|
|
142
142
|
/* @__PURE__ */ l(
|
|
143
143
|
"div",
|
|
144
144
|
{
|
|
@@ -146,21 +146,21 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
146
146
|
[s.fixedHeight]: r?.layout?.showAllArgumentInEmbed !== !0 ? V : !1
|
|
147
147
|
}),
|
|
148
148
|
children: [
|
|
149
|
-
e.is_reply &&
|
|
149
|
+
e.is_reply && c && /* @__PURE__ */ l(
|
|
150
150
|
"div",
|
|
151
151
|
{
|
|
152
152
|
className: s.replyTo,
|
|
153
|
-
onClick: () => j(
|
|
153
|
+
onClick: () => j(c.id),
|
|
154
154
|
children: [
|
|
155
155
|
i.formatMessage({
|
|
156
156
|
id: "info.replying_to",
|
|
157
157
|
defaultMessage: "Replying to"
|
|
158
158
|
}),
|
|
159
159
|
/* @__PURE__ */ l("span", { className: s.replyingTo, children: [
|
|
160
|
-
|
|
160
|
+
c.is_deleted ? i.formatMessage({
|
|
161
161
|
id: "info.deleted",
|
|
162
162
|
defaultMessage: "Deleted"
|
|
163
|
-
}) :
|
|
163
|
+
}) : c.author.full_name,
|
|
164
164
|
/* @__PURE__ */ o(E, { name: "chat", height: 16 })
|
|
165
165
|
] })
|
|
166
166
|
]
|
|
@@ -169,23 +169,23 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
169
169
|
/* @__PURE__ */ o(
|
|
170
170
|
ge,
|
|
171
171
|
{
|
|
172
|
-
content: /* @__PURE__ */ l(
|
|
172
|
+
content: /* @__PURE__ */ l(y, { children: [
|
|
173
173
|
e.is_edited && /* @__PURE__ */ o("div", { className: s.edited, children: i.formatMessage({
|
|
174
174
|
id: "argument.argument.updated",
|
|
175
175
|
defaultMessage: "Updated argument"
|
|
176
176
|
}) }),
|
|
177
|
-
|
|
177
|
+
L && !f.isTranslated ? /* @__PURE__ */ o(
|
|
178
178
|
"div",
|
|
179
179
|
{
|
|
180
180
|
className: s.argumentContent,
|
|
181
|
-
dangerouslySetInnerHTML: { __html: P(
|
|
181
|
+
dangerouslySetInnerHTML: { __html: P(L) }
|
|
182
182
|
}
|
|
183
|
-
) : /* @__PURE__ */ o("div", { className: s.argumentContent, children: P(
|
|
184
|
-
|
|
183
|
+
) : /* @__PURE__ */ o("div", { className: s.argumentContent, children: P(f.translatedContent) }),
|
|
184
|
+
f.isTranslated && /* @__PURE__ */ o(
|
|
185
185
|
be,
|
|
186
186
|
{
|
|
187
187
|
language: e.language,
|
|
188
|
-
callback: () =>
|
|
188
|
+
callback: () => f.toggleContent()
|
|
189
189
|
}
|
|
190
190
|
)
|
|
191
191
|
] }),
|
|
@@ -207,17 +207,17 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
207
207
|
),
|
|
208
208
|
e.sources?.length > 0 && /* @__PURE__ */ o("div", { className: s.argumentSourcesList, children: e.sources.map(re) })
|
|
209
209
|
] }),
|
|
210
|
-
!
|
|
210
|
+
!N && !e.is_deleted && /* @__PURE__ */ o(
|
|
211
211
|
Me,
|
|
212
212
|
{
|
|
213
213
|
resource: e,
|
|
214
|
-
disabled:
|
|
214
|
+
disabled: M || e.status === "rejected" || !W && r?.actions?.disableInputForVisitor === !0 || A,
|
|
215
215
|
reportType: "Message",
|
|
216
216
|
softDelete: r.actions?.softDelete,
|
|
217
217
|
deleteType: "messages",
|
|
218
218
|
deleteListId: Y,
|
|
219
|
-
enableReply:
|
|
220
|
-
handleReplyTo:
|
|
219
|
+
enableReply: g <= S || p.role === "editor" || p.role === "moderator",
|
|
220
|
+
handleReplyTo: U,
|
|
221
221
|
replyRedirectUrl: K,
|
|
222
222
|
shareUrl: `https://app.logora.fr/share/a/${e.id}`,
|
|
223
223
|
shareTitle: i.formatMessage({
|
|
@@ -242,18 +242,18 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
242
242
|
voteableId: e.id,
|
|
243
243
|
totalUpvote: e.upvotes,
|
|
244
244
|
totalDownvote: 0,
|
|
245
|
-
activeClassName: s[`voteButtonPosition-${
|
|
246
|
-
disabled: e.status === "rejected" ||
|
|
245
|
+
activeClassName: s[`voteButtonPosition-${C}`],
|
|
246
|
+
disabled: e.status === "rejected" || p?.id === e?.author?.id || A
|
|
247
247
|
}
|
|
248
248
|
)
|
|
249
249
|
}
|
|
250
250
|
),
|
|
251
|
-
!
|
|
251
|
+
!N && !w && /* @__PURE__ */ o(
|
|
252
252
|
pe,
|
|
253
253
|
{
|
|
254
254
|
numberReplies: e.number_replies,
|
|
255
255
|
repliesAuthors: e.replies_authors,
|
|
256
|
-
expandReplies:
|
|
256
|
+
expandReplies: m,
|
|
257
257
|
onToggleReplies: k,
|
|
258
258
|
isReply: e.is_reply
|
|
259
259
|
}
|
|
@@ -261,21 +261,26 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
261
261
|
]
|
|
262
262
|
}
|
|
263
263
|
),
|
|
264
|
-
!
|
|
264
|
+
!w && /* @__PURE__ */ l(y, { children: [
|
|
265
265
|
Z && /* @__PURE__ */ o(ne, { fallback: null, children: /* @__PURE__ */ o(
|
|
266
266
|
Re,
|
|
267
267
|
{
|
|
268
268
|
groupId: e.group_id,
|
|
269
|
-
groupType:
|
|
270
|
-
groupName:
|
|
271
|
-
positions:
|
|
269
|
+
groupType: R,
|
|
270
|
+
groupName: T,
|
|
271
|
+
positions: b,
|
|
272
272
|
parentId: e.id,
|
|
273
273
|
positionId: H?.position_id,
|
|
274
|
-
disabled:
|
|
274
|
+
disabled: M,
|
|
275
275
|
hideSourceAction: r?.actions?.disableUserSources || !1,
|
|
276
276
|
argumentListId: `argument_${e.id}_reply_list`,
|
|
277
277
|
onSubmit: (t) => {
|
|
278
|
-
|
|
278
|
+
U(), h([t]), v(!0);
|
|
279
|
+
},
|
|
280
|
+
onUpdate: (t) => {
|
|
281
|
+
h(
|
|
282
|
+
(a) => a.map((d) => d.id === t.id ? t : d)
|
|
283
|
+
);
|
|
279
284
|
},
|
|
280
285
|
isReply: !0,
|
|
281
286
|
avatarSize: 40,
|
|
@@ -288,8 +293,8 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
288
293
|
},
|
|
289
294
|
`Reply${e.id}`
|
|
290
295
|
) }),
|
|
291
|
-
|
|
292
|
-
|
|
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(
|
|
293
298
|
Ie,
|
|
294
299
|
{
|
|
295
300
|
voteableType: "Message",
|
|
@@ -305,12 +310,12 @@ const Re = de(() => import("../../input/argument_input/index.js").then((e) => ({
|
|
|
305
310
|
perPage: 5,
|
|
306
311
|
display: "column",
|
|
307
312
|
resourcePropName: "argument",
|
|
308
|
-
emptyListComponent: /* @__PURE__ */ o(
|
|
313
|
+
emptyListComponent: /* @__PURE__ */ o(y, {}),
|
|
309
314
|
transformData: (t) => se(t),
|
|
310
|
-
children:
|
|
315
|
+
children: $(e)
|
|
311
316
|
}
|
|
312
317
|
) }),
|
|
313
|
-
|
|
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(
|
|
314
319
|
Se,
|
|
315
320
|
{
|
|
316
321
|
role: "link",
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import '../../../assets/components/consultation/consultation_box/ConsultationBox.module-
|
|
1
|
+
import '../../../assets/components/consultation/consultation_box/ConsultationBox.module-CZB4qRb2.css';const o = "_container_jsaa0_3", n = "_consultationImageBox_jsaa0_18", t = "_consultationImage_jsaa0_18", a = "_consultationTime_jsaa0_31", s = "_ended_jsaa0_53", i = "_consultationTitle_jsaa0_57", c = "_iconVote_jsaa0_66", _ = "_iconChat_jsaa0_70", e = "_consultationInformations_jsaa0_94", r = "_consultationLeft_jsaa0_104", u = "_consultationGroupInformation_jsaa0_107", l = "_consultationGroupRight_jsaa0_111", m = "_progressBarContainer_jsaa0_114", j = "_progress_jsaa0_114", g = "_bar_jsaa0_128", I = "_consultationTextInformation_jsaa0_137", f = {
|
|
2
2
|
container: o,
|
|
3
3
|
consultationImageBox: n,
|
|
4
4
|
consultationImage: t,
|
|
5
|
-
consultationTime:
|
|
6
|
-
ended:
|
|
7
|
-
consultationTitle:
|
|
8
|
-
iconVote:
|
|
9
|
-
iconChat:
|
|
10
|
-
consultationInformations:
|
|
11
|
-
consultationLeft:
|
|
5
|
+
consultationTime: a,
|
|
6
|
+
ended: s,
|
|
7
|
+
consultationTitle: i,
|
|
8
|
+
iconVote: c,
|
|
9
|
+
iconChat: _,
|
|
10
|
+
consultationInformations: e,
|
|
11
|
+
consultationLeft: r,
|
|
12
12
|
consultationGroupInformation: u,
|
|
13
13
|
consultationGroupRight: l,
|
|
14
14
|
progressBarContainer: m,
|
|
15
|
-
progress:
|
|
15
|
+
progress: j,
|
|
16
16
|
bar: g,
|
|
17
17
|
consultationTextInformation: I
|
|
18
18
|
};
|
|
@@ -22,16 +22,16 @@ export {
|
|
|
22
22
|
l as consultationGroupRight,
|
|
23
23
|
t as consultationImage,
|
|
24
24
|
n as consultationImageBox,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
e as consultationInformations,
|
|
26
|
+
r as consultationLeft,
|
|
27
27
|
I as consultationTextInformation,
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
a as consultationTime,
|
|
29
|
+
i as consultationTitle,
|
|
30
30
|
o as container,
|
|
31
31
|
f as default,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
s as ended,
|
|
33
|
+
_ as iconChat,
|
|
34
|
+
c as iconVote,
|
|
35
|
+
j as progress,
|
|
36
36
|
m as progressBarContainer
|
|
37
37
|
};
|
|
@@ -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
|
};
|
package/package.json
CHANGED
package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-BPJksgZ-.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._container_e2zsr_3{display:flex!important;flex-direction:column!important;justify-content:space-between!important;box-shadow:var(--box-shadow, 0px 2px 5px rgba(7, 42, 68, .1));border:var(--box-border, 1px solid rgba(7, 42, 68, .1));color:var(--text-primary, #222222);border-radius:var(--box-border-radius, 6px);background:var(--background-color-primary, white)}._container_e2zsr_3 a{text-decoration:none!important;color:var(--text-primary, #222222)!important}._consultationImageBox_e2zsr_18{position:relative}._consultationImage_e2zsr_18{border-top-right-radius:var(--box-border-radius, 6px);border-top-left-radius:var(--box-border-radius, 6px);width:100%;aspect-ratio:16/9;object-fit:cover;display:block}._consultationTime_e2zsr_31{display:flex!important;align-items:center!important;position:absolute;left:var(--space-unit, 1em);bottom:var(--space-unit, 1em);padding-right:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important;padding-left:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important;padding-top:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;padding-bottom:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;background-color:var(--call-primary-color, #434343);border-radius:var(--box-border-radius, 6px);font-size:var(--font-size-normal, 16px);color:var(--text-light, white);max-width:93%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._consultationTime_e2zsr_31 span{color:var(--text-light, white)}._consultationTime_e2zsr_31._ended_e2zsr_53{background-color:var(--call-primary-color, #434343)}._consultationTitle_e2zsr_57{padding-top:var(--spacer-lg, calc(var(--space-unit, 1em) * 1.5))!important;padding-bottom:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;padding-right:var(--space-unit, 1em)!important;padding-left:var(--space-unit, 1em)!important;font-size:var(--font-size-normal, 16px);font-weight:var(--font-weight-bold, 700)}._iconVote_e2zsr_66{padding-top:3px!important}._iconChat_e2zsr_70{padding-top:6px!important}._consultationButtonContainer_e2zsr_74{display:flex!important;padding-right:var(--space-unit, 1em)!important;padding-left:var(--space-unit, 1em)!important;padding-bottom:var(--spacer-lg, calc(var(--space-unit, 1em) * 1.5))!important;color:var(--text-secondary, #5F5F5F);font-size:var(--font-size-small, 16px)}._consultationButtonContainer_e2zsr_74:hover{text-decoration:underline;text-decoration-color:var(--text-secondary, #5F5F5F)}._consultationButtonContainer_e2zsr_74 ._arrowIcon_e2zsr_86{margin-left:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;transform:rotate(180deg);fill:var(--text-secondary, #5F5F5F);top:1px;position:relative}._consultationInformations_e2zsr_94{display:flex!important;justify-content:space-between!important;align-items:center!important;padding-right:var(--space-unit, 1em)!important;padding-left:var(--space-unit, 1em)!important;padding-top:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;padding-bottom:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;min-height:50px}._consultationInformations_e2zsr_94 ._consultationLeft_e2zsr_104{display:flex!important}._consultationInformations_e2zsr_94 ._consultationGroupInformation_e2zsr_107{display:flex!important;align-items:center!important}._consultationInformations_e2zsr_94 ._consultationGroupInformation_e2zsr_107._consultationGroupRight_e2zsr_111{padding-right:var(--space-unit, 1em)!important}._consultationInformations_e2zsr_94 ._progressBarContainer_e2zsr_114{width:60%;display:flex!important;flex-direction:column!important;align-items:flex-end!important;font-size:var(--font-size-extra-small, 14px)}._consultationInformations_e2zsr_94 ._progressBarContainer_e2zsr_114 ._progress_e2zsr_114{margin-top:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;height:15px;width:100%;border-radius:var(--box-border-radius, 6px);background-color:var(--background-color-secondary, #E8E8E8)!important}._consultationInformations_e2zsr_94 ._progressBarContainer_e2zsr_114 ._bar_e2zsr_128{background-color:var(--call-primary-color, #434343)}._consultationInformations_e2zsr_94 ._progressBarContainer_e2zsr_114 ._totalVotes_e2zsr_131{margin-right:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important}._consultationInformations_e2zsr_94 ._progressBarContainer_e2zsr_114 ._totalVotesPercentage_e2zsr_134{margin-left:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important}._consultationInformations_e2zsr_94 ._consultationTextInformation_e2zsr_137{padding-right:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;padding-top:10px!important}
|