@logora/debate 0.3.90 → 0.3.92

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.
Files changed (88) hide show
  1. package/dist/assets/components/argument/argument/Argument.module-QZdPjj_i.css +1 -0
  2. package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-DjNiVt-p.css +1 -0
  3. package/dist/assets/components/follow/follow_button/FollowButton.module-C9YXM8AM.css +1 -0
  4. package/dist/assets/components/input/text_editor/{TextEditor.module-DePSfOvG.css → TextEditor.module-CxuSL3l3.css} +1 -1
  5. package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-DvwCbS9k.css +1 -0
  6. package/dist/assets/components/navigation/tabs/Tabs.module-CFizOU1d.css +1 -0
  7. package/dist/assets/components/proposal/proposal_box/ProposalBox.module-Dm8XDnr1.css +1 -0
  8. package/dist/assets/components/section/section_box/SectionBox.module-qQs4B6bf.css +1 -0
  9. package/dist/assets/components/source/context_source_list/ContextSourceList.module-DUPbI-wb.css +1 -0
  10. package/dist/assets/components/source/source_list_item/SourceListItem.module-fm_uHuY4.css +1 -0
  11. package/dist/assets/components/summary/summary/Summary.module-2bnx3egy.css +1 -0
  12. package/dist/assets/components/summary/summary_box/SummaryBox.module-Dr9PevSJ.css +1 -0
  13. package/dist/assets/components/vote/vote_box/VoteBox.module-D5sSSHpi.css +1 -0
  14. package/dist/components/argument/argument/Argument.js +111 -106
  15. package/dist/components/argument/argument/Argument.module.scss.js +31 -31
  16. package/dist/components/auth/providers/FormAuth.js +8 -7
  17. package/dist/components/auth/use_auth/base64.js +4 -0
  18. package/dist/components/consultation/consultation_box/ConsultationBox.js +80 -111
  19. package/dist/components/consultation/consultation_box/ConsultationBox.module.scss.js +31 -29
  20. package/dist/components/dialog/dropdown/Dropdown.js +35 -28
  21. package/dist/components/follow/follow_button/FollowButton.js +17 -16
  22. package/dist/components/follow/follow_button/FollowButton.module.scss.js +6 -4
  23. package/dist/components/icons/bild_icons/index.js +58 -56
  24. package/dist/components/icons/clarin_icons/Alarm.js +6 -0
  25. package/dist/components/icons/clarin_icons/Announcement.js +6 -0
  26. package/dist/components/icons/clarin_icons/Chat.js +6 -0
  27. package/dist/components/icons/clarin_icons/CheckCircle.js +9 -0
  28. package/dist/components/icons/clarin_icons/Clock.js +6 -0
  29. package/dist/components/icons/clarin_icons/Follow.js +6 -0
  30. package/dist/components/icons/clarin_icons/MobileClose.js +9 -0
  31. package/dist/components/icons/clarin_icons/Question.js +6 -0
  32. package/dist/components/icons/clarin_icons/Search.js +6 -0
  33. package/dist/components/icons/clarin_icons/Send.js +10 -0
  34. package/dist/components/icons/clarin_icons/Share.js +6 -0
  35. package/dist/components/icons/clarin_icons/Upvote.js +9 -0
  36. package/dist/components/icons/clarin_icons/User.js +9 -0
  37. package/dist/components/icons/clarin_icons/index.js +106 -0
  38. package/dist/components/icons/hero_icons/index.js +20 -18
  39. package/dist/components/icons/krone_icons/index.js +48 -46
  40. package/dist/components/icons/regular_icons/Follow.js +6 -0
  41. package/dist/components/icons/regular_icons/index.js +20 -18
  42. package/dist/components/icons/spiegel_icons/Downvote.js +6 -0
  43. package/dist/components/icons/spiegel_icons/Upvote.js +6 -0
  44. package/dist/components/icons/spiegel_icons/index.js +54 -52
  45. package/dist/components/icons/stern_icons/index.js +102 -70
  46. package/dist/components/input/argument_input/ArgumentInput.js +201 -197
  47. package/dist/components/input/select/Select.js +19 -19
  48. package/dist/components/input/text_editor/TextEditor.js +143 -129
  49. package/dist/components/input/text_editor/TextEditor.module.scss.js +5 -5
  50. package/dist/components/input/text_editor/plugins/FocusPlugin.js +12 -8
  51. package/dist/components/input/text_editor/plugins/SetContentPlugin.js +13 -13
  52. package/dist/components/input/text_editor/plugins/SetRichContentPlugin.js +10 -10
  53. package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +70 -72
  54. package/dist/components/list/paginated_list/PaginatedList.js +152 -144
  55. package/dist/components/list/paginated_list/action_bar/ActionBar.js +72 -61
  56. package/dist/components/list/paginated_list/action_bar/ActionBar.module.scss.js +18 -16
  57. package/dist/components/navigation/tabs/Tabs.js +85 -24
  58. package/dist/components/navigation/tabs/Tabs.module.scss.js +20 -10
  59. package/dist/components/notification/notification_menu/NotificationMenu.js +23 -22
  60. package/dist/components/proposal/proposal_box/ProposalBox.js +70 -59
  61. package/dist/components/proposal/proposal_box/ProposalBox.module.scss.js +14 -10
  62. package/dist/components/section/section_box/SectionBox.js +10 -10
  63. package/dist/components/section/section_box/SectionBox.module.scss.js +9 -9
  64. package/dist/components/source/context_source_box/ContextSourceBox.js +7 -7
  65. package/dist/components/source/context_source_list/ContextSourceList.js +10 -13
  66. package/dist/components/source/context_source_list/ContextSourceList.module.scss.js +14 -12
  67. package/dist/components/source/source_list_item/SourceListItem.js +42 -28
  68. package/dist/components/source/source_list_item/SourceListItem.module.scss.js +8 -6
  69. package/dist/components/source/source_modal/SourceModal.js +15 -15
  70. package/dist/components/summary/summary/Summary.js +41 -63
  71. package/dist/components/summary/summary/Summary.module.scss.js +10 -6
  72. package/dist/components/summary/summary_box/SummaryBox.module.scss.js +9 -9
  73. package/dist/components/vote/vote_box/VoteBox.js +122 -143
  74. package/dist/components/vote/vote_box/VoteBox.module.scss.js +50 -48
  75. package/dist/index.js +323 -319
  76. package/package.json +1 -1
  77. package/dist/assets/components/argument/argument/Argument.module-gLfNRLks.css +0 -1
  78. package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-BnTr5IaF.css +0 -1
  79. package/dist/assets/components/follow/follow_button/FollowButton.module-Da-cPgwT.css +0 -1
  80. package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-pxwFC_Y2.css +0 -1
  81. package/dist/assets/components/navigation/tabs/Tabs.module-CtDi0tAd.css +0 -1
  82. package/dist/assets/components/proposal/proposal_box/ProposalBox.module-T4ms_LQ7.css +0 -1
  83. package/dist/assets/components/section/section_box/SectionBox.module-DUeUtdWr.css +0 -1
  84. package/dist/assets/components/source/context_source_list/ContextSourceList.module-D6X_0dB7.css +0 -1
  85. package/dist/assets/components/source/source_list_item/SourceListItem.module-mTxHhXPV.css +0 -1
  86. package/dist/assets/components/summary/summary/Summary.module-DjfmUlkW.css +0 -1
  87. package/dist/assets/components/summary/summary_box/SummaryBox.module-DQVkA8l7.css +0 -1
  88. package/dist/assets/components/vote/vote_box/VoteBox.module-CDrqb2SZ.css +0 -1
@@ -1,43 +1,41 @@
1
- import { jsx as s, Fragment as be, jsxs as l } from "react/jsx-runtime";
1
+ import { jsx as s, Fragment as pe, jsxs as l } from "react/jsx-runtime";
2
2
  import P from "@rooks/use-sessionstorage-state";
3
3
  import d from "classnames";
4
- import { useState as N, useEffect as L } from "react";
5
- import { useIntl as Ne, FormattedMessage as m } from "react-intl";
6
- import { useLocation as Se } from "react-router";
4
+ import { useState as b, useEffect as L } from "react";
5
+ import { useIntl as _e, FormattedMessage as m } from "react-intl";
6
+ import { useLocation as be } from "react-router";
7
7
  import o from "./VoteBox.module.scss.js";
8
8
  import { useTranslatedContent as k } from "../../translation/translated_content/useTranslatedContent.js";
9
- import { useToast as we } from "../../dialog/toast_provider/useToast.js";
10
- import { useResponsive as Ce } from "../../hooks/use_responsive/useResponsive.js";
11
- import { useAuthRequired as xe } from "../../hooks/use_auth_required/useAuthRequired.js";
12
- import { useDataProvider as Be } from "../../data/data_provider/useDataProvider.js";
13
- import { useConfig as Me } from "../../data/config_provider/useConfig.js";
14
- import { useAuth as Ve } from "../../auth/use_auth/useAuth.js";
9
+ import { useToast as Ne } from "../../dialog/toast_provider/useToast.js";
10
+ import { useAuthRequired as Se } from "../../hooks/use_auth_required/useAuthRequired.js";
11
+ import { useDataProvider as we } from "../../data/data_provider/useDataProvider.js";
12
+ import { useConfig as Be } from "../../data/config_provider/useConfig.js";
13
+ import { useAuth as Ce } from "../../auth/use_auth/useAuth.js";
15
14
  import { Icon as T } from "../../icons/icon/Icon.js";
16
- import { ProgressBar as Re } from "../../progress/progress_bar/ProgressBar.js";
17
- import { Tooltip as ee } from "../../dialog/tooltip/Tooltip.js";
18
- import { Link as Ae } from "../../action/link/Link.js";
19
- import { Button as ye } from "../../action/button/Button.js";
20
- const Xe = ({
21
- numberVotes: S,
15
+ import { ProgressBar as xe } from "../../progress/progress_bar/ProgressBar.js";
16
+ import { Link as Ve } from "../../action/link/Link.js";
17
+ import { Button as Me } from "../../action/button/Button.js";
18
+ const We = ({
19
+ numberVotes: N,
22
20
  votePositions: r,
23
- voteableType: h,
24
- voteableId: g,
25
- redirectUrl: w,
21
+ voteableType: v,
22
+ voteableId: h,
23
+ redirectUrl: S,
26
24
  displayColumn: j,
27
- textAlignLeft: te,
28
- showTotal: oe = !0,
29
- voteBoxClassName: F,
30
- buttonContainerClassName: O,
25
+ textAlignLeft: ee,
26
+ showTotal: te = !0,
27
+ voteBoxClassName: O,
28
+ buttonContainerClassName: F,
31
29
  buttonClassName: E,
32
30
  showResultClassName: I,
33
- onVote: C,
34
- disabled: V = !1,
35
- showVotesCommentsNumber: se = !1,
36
- commentsCount: ae,
31
+ onVote: w,
32
+ disabled: M = !1,
33
+ showVotesCommentsNumber: oe = !1,
34
+ commentsCount: se,
37
35
  hideShowResultButton: U = !1
38
36
  }) => {
39
- const [H, p] = N(!0), [c, R] = N(void 0), [_, f] = N(!1), [u, ne] = N(
40
- Number.parseFloat(S.total) || Object.values(S).reduce(
37
+ const [H, g] = b(!0), [c, A] = b(void 0), [p, f] = b(!1), [u, ae] = b(
38
+ Number.parseFloat(N.total) || Object.values(N).reduce(
41
39
  (e, t) => e + Number.parseFloat(t),
42
40
  0
43
41
  ) || 0
@@ -56,125 +54,125 @@ const Xe = ({
56
54
  r[2]?.language,
57
55
  "name",
58
56
  r[2]?.translation_entries
59
- ), [b, re, D] = P(
57
+ ), [_, ne, D] = P(
60
58
  "storedUserVote",
61
59
  {}
62
- ), [Le, ie, ce] = P("userSide", {}), { toast: G } = we() || {}, { isMobile: W } = Ce(), le = () => {
60
+ ), [Ae, re, ie] = P("userSide", {}), { toast: G } = Ne() || {}, ce = () => {
63
61
  const e = {};
64
62
  return r?.forEach(
65
63
  (t) => e[t.id] = {
66
- count: Number.parseFloat(S[t.id]) || 0,
64
+ count: Number.parseFloat(N[t.id]) || 0,
67
65
  percentage: u === 0 ? 0 : Math.round(
68
- 100 * ((S[t.id] || 0) / u)
66
+ 100 * ((N[t.id] || 0) / u)
69
67
  )
70
68
  }
71
69
  ), e;
72
- }, [i, z] = N(le()), J = xe(), de = Se(), A = Be(), ue = Me(), v = Ne(), { isLoggedIn: x, isLoggingIn: K } = Ve();
70
+ }, [i, W] = b(ce()), z = Se(), le = be(), y = we(), J = Be(), B = _e(), { isLoggedIn: C, isLoggingIn: K } = Ce();
73
71
  L(() => {
74
- K === !1 && (x ? fe(g) : p(!1));
75
- }, [K, x]), L(() => {
76
- if (H === !1 && !w) {
77
- const [e, t] = me();
72
+ K === !1 && (C ? ue(h) : g(!1));
73
+ }, [K, C]), L(() => {
74
+ if (H === !1 && !S) {
75
+ const [e, t] = de();
78
76
  e && (t ? X(t) : f(!0));
79
77
  }
80
78
  }, [H]), L(() => {
81
- C && C(c);
79
+ w && w(c);
82
80
  }, [c]);
83
- const me = () => {
84
- if (b && Object.keys(b).length !== 0)
85
- return b.groupId === g && b.voteableType === h ? [!0, b.positionId] : (D(), [!1, !1]);
81
+ const de = () => {
82
+ if (_ && Object.keys(_).length !== 0)
83
+ return _.groupId === h && _.voteableType === v ? [!0, _.positionId] : (D(), [!1, !1]);
86
84
  const e = new URLSearchParams(
87
- typeof window < "u" ? window.location.search : de.search
85
+ typeof window < "u" ? window.location.search : le.search
88
86
  ), t = !!e.get("initVote"), a = Number.parseInt(e.get("positionId")) || !1;
89
87
  return [t, a];
90
- }, fe = (e) => {
91
- p(!0), C && C(c), A.getOneWithToken("votes", `${h.toLowerCase()}/${e}`, {}).then((t) => {
92
- t.data.data.resource ? (R(t.data.data.resource), f(!0), p(!1)) : (p(!1), f(!1));
88
+ }, ue = (e) => {
89
+ g(!0), w && w(c), y.getOneWithToken("votes", `${v.toLowerCase()}/${e}`, {}).then((t) => {
90
+ t.data.data.resource ? (A(t.data.data.resource), f(!0), g(!1)) : (g(!1), f(!1));
93
91
  }).catch((t) => {
94
- p(!1);
92
+ g(!1);
95
93
  });
96
- }, B = (e, t) => t === 0 ? 0 : Math.round(100 * (e / t)), ve = (e) => {
94
+ }, x = (e, t) => t === 0 ? 0 : Math.round(100 * (e / t)), me = (e) => {
97
95
  const t = {
98
- voteable_id: g,
99
- voteable_type: h || "Group",
96
+ voteable_id: h,
97
+ voteable_type: v || "Group",
100
98
  position_id: e
101
99
  };
102
- ie({
103
- groupId: g,
104
- voteableType: h,
100
+ re({
101
+ groupId: h,
102
+ voteableType: v,
105
103
  positionId: e
106
- }), c ? (ge(e, c.position_id), _ === !1 && y(), e !== c.position_id && A.update("votes", c.id, t).then((n) => {
107
- n.data.success && (R(n.data.data.resource), G(
108
- v.formatMessage({
104
+ }), c ? (ve(e, c.position_id), p === !1 && R(), e !== c.position_id && y.update("votes", c.id, t).then((n) => {
105
+ n.data.success && (A(n.data.data.resource), G(
106
+ B.formatMessage({
109
107
  id: "header.vote_confirm_modal",
110
108
  defaultMessage: "Your vote has been saved !"
111
109
  }),
112
110
  { type: "success" }
113
111
  ));
114
- })) : (he(e), y(), A.create("votes", t).then((n) => {
115
- n.data.success && (R(n.data.data.resource), G(
116
- v.formatMessage({
112
+ })) : (fe(e), R(), y.create("votes", t).then((n) => {
113
+ n.data.success && (A(n.data.data.resource), G(
114
+ B.formatMessage({
117
115
  id: "header.vote_confirm_modal",
118
116
  defaultMessage: "Your vote has been saved !"
119
117
  }),
120
118
  { type: "success" }
121
119
  ));
122
120
  }));
123
- }, he = (e) => {
121
+ }, fe = (e) => {
124
122
  const t = i[e].count + 1, a = u + 1, n = {};
125
- r.forEach((M) => {
126
- if (e === M.id)
127
- n[M.id] = {
123
+ r.forEach((V) => {
124
+ if (e === V.id)
125
+ n[V.id] = {
128
126
  count: t,
129
- percentage: B(t, a)
127
+ percentage: x(t, a)
130
128
  };
131
129
  else {
132
- const Z = i[M.id].count;
133
- n[M.id] = {
130
+ const Z = i[V.id].count;
131
+ n[V.id] = {
134
132
  count: Z,
135
- percentage: B(Z, a)
133
+ percentage: x(Z, a)
136
134
  };
137
135
  }
138
- }), z(n), ne(a);
139
- }, ge = (e, t) => {
136
+ }), W(n), ae(a);
137
+ }, ve = (e, t) => {
140
138
  if (t !== e) {
141
139
  const a = {
142
140
  ...i,
143
141
  [t]: {
144
142
  count: i[t].count - 1,
145
- percentage: B(
143
+ percentage: x(
146
144
  i[t].count - 1,
147
145
  u
148
146
  )
149
147
  },
150
148
  [e]: {
151
149
  count: i[e].count + 1,
152
- percentage: B(
150
+ percentage: x(
153
151
  i[e].count + 1,
154
152
  u
155
153
  )
156
154
  }
157
155
  };
158
- z(a);
156
+ W(a);
159
157
  }
160
158
  }, Q = (e) => {
161
159
  const t = new URLSearchParams({
162
160
  initVote: "true",
163
161
  ...e && { positionId: e }
164
162
  });
165
- return w + `?${t.toString()}`;
163
+ return S + `?${t.toString()}`;
166
164
  }, X = (e) => {
167
- x ? Object.keys(i).includes(e.toString()) && (ve(e), D()) : (Object.keys(i).includes(e.toString()) && re({
168
- groupId: g,
169
- voteableType: h,
165
+ C ? Object.keys(i).includes(e.toString()) && (me(e), D()) : (Object.keys(i).includes(e.toString()) && ne({
166
+ groupId: h,
167
+ voteableType: v,
170
168
  positionId: e
171
- }), J({ loginAction: "vote" }));
172
- }, y = () => {
173
- _ && ce(), f(!_);
174
- }, pe = (e, t) => {
169
+ }), z({ loginAction: "vote" }));
170
+ }, R = () => {
171
+ p && ie(), f(!p);
172
+ }, he = (e, t) => {
175
173
  let a;
176
174
  t === 0 ? a = $.translatedContent : t === 1 ? a = q.translatedContent : t === 2 && (a = Y.translatedContent);
177
- const n = typeof window < "u" && !w;
175
+ const n = typeof window < "u" && !S;
178
176
  return /* @__PURE__ */ s(
179
177
  "div",
180
178
  {
@@ -182,17 +180,17 @@ const Xe = ({
182
180
  [o.buttonAlignLeft]: o.buttonAlignLeft
183
181
  }),
184
182
  children: /* @__PURE__ */ s(
185
- ye,
183
+ Me,
186
184
  {
187
185
  "data-tid": "action_vote",
188
186
  type: "button",
189
187
  title: a,
190
188
  className: d(o.voteButton, {
191
- [o.textAlignLeft]: te,
189
+ [o.textAlignLeft]: ee,
192
190
  [E]: E
193
191
  }),
194
192
  onClick: n ? () => X(e.id) : null,
195
- disabled: V,
193
+ disabled: M,
196
194
  "data-testid": "voteButton",
197
195
  to: n ? null : Q(e.id),
198
196
  target: n ? null : "_top",
@@ -213,14 +211,14 @@ const Xe = ({
213
211
  },
214
212
  t
215
213
  );
216
- }, _e = () => {
217
- x || ue.actions?.unloggedVoteResults === !0 ? f(!0) : J({ loginAction: "vote" });
214
+ }, ge = () => {
215
+ C || J.actions?.unloggedVoteResults === !0 ? f(!0) : z({ loginAction: "vote" });
218
216
  };
219
217
  return /* @__PURE__ */ s(
220
218
  "div",
221
219
  {
222
- className: d(o.voteBox, { [F]: F }),
223
- children: /* @__PURE__ */ s(be, { children: _ || V ? /* @__PURE__ */ l("div", { className: o.voteResultsBox, "data-testid": "voteResultsBox", children: [
220
+ className: d(o.voteBox, { [O]: O }),
221
+ children: /* @__PURE__ */ s(pe, { children: p || M ? /* @__PURE__ */ l("div", { className: o.voteResultsBox, "data-testid": "voteResultsBox", children: [
224
222
  /* @__PURE__ */ s("div", { className: o.voteResults, children: r.map((e, t) => {
225
223
  let a;
226
224
  return t === 0 ? a = $.translatedContent : t === 1 ? a = q.translatedContent : t === 2 && (a = Y.translatedContent), /* @__PURE__ */ l("div", { children: [
@@ -237,7 +235,7 @@ const Xe = ({
237
235
  c && c.position_id === e.id ? /* @__PURE__ */ s(
238
236
  "span",
239
237
  {
240
- title: v.formatMessage({
238
+ title: B.formatMessage({
241
239
  id: "vote.vote_box.vote_side"
242
240
  }) + a,
243
241
  className: o.sideIcon,
@@ -249,7 +247,7 @@ const Xe = ({
249
247
  }
250
248
  ),
251
249
  /* @__PURE__ */ l(
252
- Re,
250
+ xe,
253
251
  {
254
252
  progress: i[e.id].percentage / 100,
255
253
  goal: 1,
@@ -264,7 +262,7 @@ const Xe = ({
264
262
  ] }, t);
265
263
  }) }),
266
264
  /* @__PURE__ */ l("div", { className: o.voteBoxFooter, children: [
267
- oe && /* @__PURE__ */ s("div", { className: o.voteResultsNumberVoters, children: /* @__PURE__ */ s(
265
+ te && /* @__PURE__ */ s("div", { className: o.voteResultsNumberVoters, children: /* @__PURE__ */ s(
268
266
  m,
269
267
  {
270
268
  id: "vote.vote_box.votes",
@@ -272,13 +270,13 @@ const Xe = ({
272
270
  defaultMessage: "{votesCount} votes"
273
271
  }
274
272
  ) }),
275
- !V && /* @__PURE__ */ s("div", { children: c ? /* @__PURE__ */ s(
273
+ !M && /* @__PURE__ */ s("div", { children: c ? /* @__PURE__ */ s(
276
274
  "button",
277
275
  {
278
276
  "data-tid": "action_edit_vote",
279
277
  className: o.voteActionButton,
280
278
  type: "button",
281
- onClick: y,
279
+ onClick: R,
282
280
  children: /* @__PURE__ */ s(
283
281
  m,
284
282
  {
@@ -309,56 +307,37 @@ const Xe = ({
309
307
  {
310
308
  className: d(o.voteBoxActionsBody, {
311
309
  [o.voteBoxActionsBodyColumn]: j,
312
- [O]: O
310
+ [o.voteBoxActionsBodyOutlined]: J.layout?.outlinedVoteButtons,
311
+ [F]: F
313
312
  }),
314
313
  children: r.map(
315
- (e, t) => pe(e, t)
314
+ (e, t) => he(e, t)
316
315
  )
317
316
  }
318
317
  ),
319
- se && /* @__PURE__ */ l("div", { className: o.voteCommentCounts, children: [
320
- /* @__PURE__ */ s(
321
- ee,
322
- {
323
- position: W ? "right" : "bottom",
324
- text: v.formatMessage({
325
- id: "info.votes_count",
326
- defaultMessage: "Votes"
327
- }),
328
- children: /* @__PURE__ */ l("div", { className: o.debateNumberItem, children: [
329
- /* @__PURE__ */ s(T, { name: "votebox", width: 20, height: 20 }),
330
- /* @__PURE__ */ s("div", { className: o.debateNumberLabel, children: /* @__PURE__ */ s(
331
- m,
332
- {
333
- id: "vote.vote_box.votes",
334
- values: { votesCount: u },
335
- defaultMessage: "{votesCount} votes"
336
- }
337
- ) })
338
- ] })
339
- }
340
- ),
341
- /* @__PURE__ */ s(
342
- ee,
343
- {
344
- position: W ? "right" : "bottom",
345
- text: v.formatMessage({
346
- id: "info.arguments_count",
347
- defaultMessage: "Comments"
348
- }),
349
- children: /* @__PURE__ */ l("div", { className: o.debateNumberItem, children: [
350
- /* @__PURE__ */ s(T, { name: "chat", width: 20, height: 20 }),
351
- /* @__PURE__ */ s("div", { className: o.debateNumberLabel, children: /* @__PURE__ */ s(
352
- m,
353
- {
354
- id: "vote.vote_box.comments",
355
- values: { count: ae ?? 0 },
356
- defaultMessage: "{count} comments"
357
- }
358
- ) })
359
- ] })
360
- }
361
- )
318
+ oe && /* @__PURE__ */ l("div", { className: o.voteCommentCounts, children: [
319
+ /* @__PURE__ */ l("div", { className: o.debateNumberItem, children: [
320
+ /* @__PURE__ */ s(T, { name: "votebox", width: 20, height: 20 }),
321
+ /* @__PURE__ */ s("div", { className: o.debateNumberLabel, children: /* @__PURE__ */ s(
322
+ m,
323
+ {
324
+ id: "vote.vote_box.votes",
325
+ values: { votesCount: u },
326
+ defaultMessage: "{votesCount} votes"
327
+ }
328
+ ) })
329
+ ] }),
330
+ /* @__PURE__ */ l("div", { className: o.debateNumberItem, children: [
331
+ /* @__PURE__ */ s(T, { name: "chat", width: 20, height: 20 }),
332
+ /* @__PURE__ */ s("div", { className: o.debateNumberLabel, children: /* @__PURE__ */ s(
333
+ m,
334
+ {
335
+ id: "vote.vote_box.comments",
336
+ values: { count: se ?? 0 },
337
+ defaultMessage: "{count} comments"
338
+ }
339
+ ) })
340
+ ] })
362
341
  ] }),
363
342
  /* @__PURE__ */ s(
364
343
  "div",
@@ -368,14 +347,14 @@ const Xe = ({
368
347
  o.voteBoxShowResultContainer,
369
348
  { [I]: I }
370
349
  ),
371
- children: /* @__PURE__ */ s("div", { className: o.voteBoxShowResult, children: U ? !_ && /* @__PURE__ */ s("div", { className: o.voteResultInfoText, children: v.formatMessage({
350
+ children: /* @__PURE__ */ s("div", { className: o.voteBoxShowResult, children: U ? !p && /* @__PURE__ */ s("div", { className: o.voteResultInfoText, children: B.formatMessage({
372
351
  id: "vote.vote_box.result_after_vote",
373
352
  defaultMessage: "Le résultat s'affichera après le vote."
374
- }) }) : typeof window < "u" && !w ? /* @__PURE__ */ s(
353
+ }) }) : typeof window < "u" && !S ? /* @__PURE__ */ s(
375
354
  "button",
376
355
  {
377
356
  type: "button",
378
- onClick: _e,
357
+ onClick: ge,
379
358
  "data-tid": "show_vote_result",
380
359
  "data-testid": "show-result",
381
360
  className: o.showResultButton,
@@ -388,7 +367,7 @@ const Xe = ({
388
367
  ) })
389
368
  }
390
369
  ) : /* @__PURE__ */ s(
391
- Ae,
370
+ Ve,
392
371
  {
393
372
  to: Q(null),
394
373
  rel: "nofollow",
@@ -412,5 +391,5 @@ const Xe = ({
412
391
  );
413
392
  };
414
393
  export {
415
- Xe as VoteBox
394
+ We as VoteBox
416
395
  };
@@ -1,63 +1,65 @@
1
- import '../../../assets/components/vote/vote_box/VoteBox.module-CDrqb2SZ.css';const t = "_voteBox_29yqs_3", o = "_voteResultsBox_29yqs_11", e = "_voteResults_29yqs_11", s = "_voteProgressHeader_29yqs_22", n = "_voteProgressHeaderAgainst_29yqs_35", _ = "_voteResultsNumberVoters_29yqs_39", u = "_voteBoxFooter_29yqs_47", v = "_voteBoxActions_29yqs_56", r = "_voteBoxActionsBody_29yqs_66", c = "_voteBoxActionsBodyColumn_29yqs_74", B = "_voteAction_29yqs_78", l = "_buttonAlignLeft_29yqs_88", i = "_voteButton_29yqs_92", y = "_textAlignLeft_29yqs_103", x = "_voteBoxShowResultContainer_29yqs_107", q = "_voteBoxShowResult_29yqs_107", d = "_boldShowResult_29yqs_131", b = "_outlined_29yqs_136", a = "_voteButtonThesis_29yqs_143", A = "_voteButtonThesisSynthesisMobile_29yqs_155", R = "_voteActionButton_29yqs_194", g = "_sideIcon_29yqs_209", h = "_progress_29yqs_214", m = "_progressBar_29yqs_220", w = "_voteCommentCounts_29yqs_237", C = "_debateNumberItem_29yqs_245", S = "_debateNumberLabel_29yqs_254", f = "_showResultButton_29yqs_258", I = "_voteResultInfoText_29yqs_271", L = {
2
- voteBox: t,
3
- voteResultsBox: o,
1
+ import '../../../assets/components/vote/vote_box/VoteBox.module-D5sSSHpi.css';const o = "_voteBox_iwgj8_3", t = "_voteResultsBox_iwgj8_11", e = "_voteResults_iwgj8_11", s = "_voteProgressHeader_iwgj8_22", n = "_voteProgressHeaderAgainst_iwgj8_35", _ = "_voteResultsNumberVoters_iwgj8_39", i = "_voteBoxFooter_iwgj8_47", u = "_voteBoxActions_iwgj8_56", v = "_voteBoxActionsBody_iwgj8_66", B = "_voteBoxActionsBodyColumn_iwgj8_74", c = "_voteAction_iwgj8_78", r = "_buttonAlignLeft_iwgj8_88", g = "_voteButton_iwgj8_92", l = "_textAlignLeft_iwgj8_103", w = "_voteBoxShowResultContainer_iwgj8_107", d = "_voteBoxShowResult_iwgj8_107", x = "_boldShowResult_iwgj8_131", j = "_outlined_iwgj8_136", b = "_voteButtonThesis_iwgj8_143", A = "_voteButtonThesisSynthesisMobile_iwgj8_155", a = "_voteBoxActionsBodyOutlined_iwgj8_194", R = "_voteActionButton_iwgj8_233", h = "_sideIcon_iwgj8_248", m = "_progress_iwgj8_253", y = "_progressBar_iwgj8_259", C = "_voteCommentCounts_iwgj8_276", S = "_debateNumberItem_iwgj8_284", f = "_debateNumberLabel_iwgj8_293", I = "_showResultButton_iwgj8_297", L = "_voteResultInfoText_iwgj8_310", N = {
2
+ voteBox: o,
3
+ voteResultsBox: t,
4
4
  voteResults: e,
5
5
  voteProgressHeader: s,
6
6
  voteProgressHeaderAgainst: n,
7
7
  voteResultsNumberVoters: _,
8
- voteBoxFooter: u,
9
- voteBoxActions: v,
10
- voteBoxActionsBody: r,
11
- voteBoxActionsBodyColumn: c,
12
- voteAction: B,
13
- buttonAlignLeft: l,
14
- voteButton: i,
15
- textAlignLeft: y,
16
- voteBoxShowResultContainer: x,
17
- voteBoxShowResult: q,
18
- boldShowResult: d,
19
- outlined: b,
20
- voteButtonThesis: a,
8
+ voteBoxFooter: i,
9
+ voteBoxActions: u,
10
+ voteBoxActionsBody: v,
11
+ voteBoxActionsBodyColumn: B,
12
+ voteAction: c,
13
+ buttonAlignLeft: r,
14
+ voteButton: g,
15
+ textAlignLeft: l,
16
+ voteBoxShowResultContainer: w,
17
+ voteBoxShowResult: d,
18
+ boldShowResult: x,
19
+ outlined: j,
20
+ voteButtonThesis: b,
21
21
  voteButtonThesisSynthesisMobile: A,
22
+ voteBoxActionsBodyOutlined: a,
22
23
  voteActionButton: R,
23
- sideIcon: g,
24
- progress: h,
25
- progressBar: m,
26
- voteCommentCounts: w,
27
- debateNumberItem: C,
28
- debateNumberLabel: S,
29
- showResultButton: f,
30
- voteResultInfoText: I
24
+ sideIcon: h,
25
+ progress: m,
26
+ progressBar: y,
27
+ voteCommentCounts: C,
28
+ debateNumberItem: S,
29
+ debateNumberLabel: f,
30
+ showResultButton: I,
31
+ voteResultInfoText: L
31
32
  };
32
33
  export {
33
- d as boldShowResult,
34
- l as buttonAlignLeft,
35
- C as debateNumberItem,
36
- S as debateNumberLabel,
37
- L as default,
38
- b as outlined,
39
- h as progress,
40
- m as progressBar,
41
- f as showResultButton,
42
- g as sideIcon,
43
- y as textAlignLeft,
44
- B as voteAction,
34
+ x as boldShowResult,
35
+ r as buttonAlignLeft,
36
+ S as debateNumberItem,
37
+ f as debateNumberLabel,
38
+ N as default,
39
+ j as outlined,
40
+ m as progress,
41
+ y as progressBar,
42
+ I as showResultButton,
43
+ h as sideIcon,
44
+ l as textAlignLeft,
45
+ c as voteAction,
45
46
  R as voteActionButton,
46
- t as voteBox,
47
- v as voteBoxActions,
48
- r as voteBoxActionsBody,
49
- c as voteBoxActionsBodyColumn,
50
- u as voteBoxFooter,
51
- q as voteBoxShowResult,
52
- x as voteBoxShowResultContainer,
53
- i as voteButton,
54
- a as voteButtonThesis,
47
+ o as voteBox,
48
+ u as voteBoxActions,
49
+ v as voteBoxActionsBody,
50
+ B as voteBoxActionsBodyColumn,
51
+ a as voteBoxActionsBodyOutlined,
52
+ i as voteBoxFooter,
53
+ d as voteBoxShowResult,
54
+ w as voteBoxShowResultContainer,
55
+ g as voteButton,
56
+ b as voteButtonThesis,
55
57
  A as voteButtonThesisSynthesisMobile,
56
- w as voteCommentCounts,
58
+ C as voteCommentCounts,
57
59
  s as voteProgressHeader,
58
60
  n as voteProgressHeaderAgainst,
59
- I as voteResultInfoText,
61
+ L as voteResultInfoText,
60
62
  e as voteResults,
61
- o as voteResultsBox,
63
+ t as voteResultsBox,
62
64
  _ as voteResultsNumberVoters
63
65
  };