@logora/debate 0.2.1 → 0.2.3

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 (859) hide show
  1. package/dist/assets/components/action/back_link/BackLink.module-nMAM5nvb.css +1 -0
  2. package/dist/assets/components/action/button/Button.module-BDXB-NbU.css +1 -0
  3. package/dist/assets/components/action/icon_text_link/IconTextLink.module-B5PF-MMK.css +1 -0
  4. package/dist/assets/components/ad/ad_unit/AdUnit.module-C_5JFle_.css +1 -0
  5. package/dist/assets/components/argument/argument/Argument.module-ynS4ZRdG.css +1 -0
  6. package/dist/assets/components/argument/argument/ReplyFooter.module-DQL2iGS0.css +1 -0
  7. package/dist/assets/components/argument/top_arguments/TopArguments.module-BwLPbpJ0.css +1 -0
  8. package/dist/assets/components/auth/auth_modal/AuthModal.module-RhX-zUfZ.css +1 -0
  9. package/dist/assets/components/auth/facebook_login_button/FacebookLoginButton.module-DwTlkJ7n.css +1 -0
  10. package/dist/assets/components/auth/google_login_button/GoogleLoginButton.module-C9XnfW0J.css +1 -0
  11. package/dist/assets/components/auth/login_form/LoginForm.module-uN7oeX8e.css +1 -0
  12. package/dist/assets/components/auth/oauth2_button/OAuth2Button.module-BDxwikoC.css +1 -0
  13. package/dist/assets/components/auth/signup_form/SignupForm.module-BEj4tidE.css +1 -0
  14. package/dist/assets/components/auth/social_auth_form/SocialAuthForm.module-DYgKVEK4.css +1 -0
  15. package/dist/assets/components/auth/sso_form/SSOForm.module-D5v2TrOv.css +1 -0
  16. package/dist/assets/components/chart/line_chart/LineChart.module-DTKqDhLv.css +1 -0
  17. package/dist/assets/components/chart/pie_chart/PieChart.module-bTKTwTOZ.css +1 -0
  18. package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-BnTr5IaF.css +1 -0
  19. package/dist/assets/components/debate/debate_box/DebateBox.module-ek6ldCNI.css +1 -0
  20. package/dist/assets/components/dialog/announcement_dialog/AnnouncementDialog.module-X5I5xt5N.css +1 -0
  21. package/dist/assets/components/dialog/confirm_modal/ConfirmModal.module-CWzzKcm5.css +1 -0
  22. package/dist/assets/components/dialog/dialog_box/DialogBox.module-DKztqqmb.css +1 -0
  23. package/dist/assets/components/dialog/drawer/Drawer.module-DlSpsEkA.css +1 -0
  24. package/dist/assets/components/dialog/dropdown/Dropdown.module-BL67cFpj.css +1 -0
  25. package/dist/assets/components/dialog/modal/Modal.module-CIj-xCzY.css +1 -0
  26. package/dist/assets/components/dialog/toast/Toast.module-DJ2wSlJT.css +1 -0
  27. package/dist/assets/components/dialog/toast_provider/ToastProvider.module-Dg1lvYKc.css +1 -0
  28. package/dist/assets/components/dialog/tooltip/Tooltip.module-zMXumgnX.css +1 -0
  29. package/dist/assets/components/embed/embed_header/EmbedHeader.module-DajJz2CY.css +1 -0
  30. package/dist/assets/components/error/standard_error_boundary/StandardErrorBoundary.module-nVUIMoUd.css +1 -0
  31. package/dist/assets/components/follow/follow_button/FollowButton.module-Da-cPgwT.css +1 -0
  32. package/dist/assets/components/gamification/badge_box/BadgeBox.module-BnskGH9b.css +1 -0
  33. package/dist/assets/components/gamification/point_box/PointBox.module-BzKRidYf.css +1 -0
  34. package/dist/assets/components/input/argument_input/ArgumentInput.module-CDv7j77K.css +1 -0
  35. package/dist/assets/components/input/checkbox/hidden/hidden-checkbox.module-BfKmji_8.css +1 -0
  36. package/dist/assets/components/input/checkbox/indicator/checkbox-indicator.module-4cSB11ys.css +1 -0
  37. package/dist/assets/components/input/search_input/SearchInput.module-C_q8rryY.css +1 -0
  38. package/dist/assets/components/input/select/Select.module-Bf-5XrJ1.css +1 -0
  39. package/dist/assets/components/input/text_editor/TextEditor.module-DePSfOvG.css +1 -0
  40. package/dist/assets/components/input/text_editor/plugins/ToolbarPlugin.module-CbPmMciY.css +1 -0
  41. package/dist/assets/components/input/text_input/TextInput.module-BBojTQEu.css +1 -0
  42. package/dist/assets/components/input/toggle/Toggle.module-B_g0Uxy3.css +1 -0
  43. package/dist/assets/components/input/toggle_position/TogglePosition.module-DDIigbfA.css +1 -0
  44. package/dist/assets/components/list/paginated_list/PaginatedList.module-DI1wH2Na.css +1 -0
  45. package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-pxwFC_Y2.css +1 -0
  46. package/dist/assets/components/list/pagination/Pagination.module-L9-ykJZ2.css +1 -0
  47. package/dist/assets/components/modal/side_modal/SideModal.module-57E9_p4y.css +1 -0
  48. package/dist/assets/components/navbar/navbar_button/NavbarButton.module-lKeBjoEX.css +1 -0
  49. package/dist/assets/components/navbar/navbar_modal/NavbarModal.module-B02ZOEuE.css +1 -0
  50. package/dist/assets/components/notification/notification_item/NotificationItem.module-BWdhgSy4.css +1 -0
  51. package/dist/assets/components/notification/notification_menu/NotificationMenu.module-BQwbvRIV.css +1 -0
  52. package/dist/assets/components/progress/loader/Loader.module-BK-wXEtx.css +1 -0
  53. package/dist/assets/components/progress/progress_bar/ProgressBar.module-Dy-27Wf9.css +1 -0
  54. package/dist/assets/components/proposal/proposal_box/ProposalBox.module-T4ms_LQ7.css +1 -0
  55. package/dist/assets/components/report/report_box/ReportBox.module-B-_0iQqX.css +1 -0
  56. package/dist/assets/components/section/section_box/SectionBox.module-DUeUtdWr.css +1 -0
  57. package/dist/assets/components/share/share_box/ShareBox.module-AIRPhwtg.css +1 -0
  58. package/dist/assets/components/share/share_button/ShareButton.module-BS6STEUD.css +1 -0
  59. package/dist/assets/components/share/share_modal/ShareModal.module-CczX4YRd.css +1 -0
  60. package/dist/assets/components/skeleton/user_content_skeleton/UserContentSkeleton.module-DhZm1xTr.css +1 -0
  61. package/dist/assets/components/source/context_source_box/ContextSourceBox.module-78Gxjx0w.css +1 -0
  62. package/dist/assets/components/source/context_source_list/ContextSourceList.module-D6X_0dB7.css +1 -0
  63. package/dist/assets/components/source/source_box/SourceBox.module-Cu_m3E85.css +1 -0
  64. package/dist/assets/components/source/source_list_item/SourceListItem.module-mTxHhXPV.css +1 -0
  65. package/dist/assets/components/source/source_modal/SourceModal.module-DfEHopJo.css +1 -0
  66. package/dist/assets/components/suggestion/suggestion_banner/SuggestionBanner.module-D37NVZLS.css +1 -0
  67. package/dist/assets/components/suggestion/suggestion_box/SuggestionBox.module-fwf3pCuJ.css +1 -0
  68. package/dist/assets/components/suggestion/suggestion_input/SuggestionInput.module-BsEj7sF3.css +1 -0
  69. package/dist/assets/components/summary/argument_summary_box/ArgumentSummaryBox.module-DLcsyMSD.css +1 -0
  70. package/dist/assets/components/summary/keyword_box/KeywordBox.module-DHkYfW0l.css +1 -0
  71. package/dist/assets/components/summary/summary/Summary.module-DjfmUlkW.css +1 -0
  72. package/dist/assets/components/summary/summary_box/SummaryBox.module-DQVkA8l7.css +1 -0
  73. package/dist/assets/components/tag/tag/Tag.module-DSSGWMKh.css +1 -0
  74. package/dist/assets/components/text/expandable_text/ExpandableText.module-C9NQVGvu.css +1 -0
  75. package/dist/assets/components/text/read_more/ReadMore.module-Ni_Mm8o8.css +1 -0
  76. package/dist/assets/components/translation/translation_button/TranslationButton.module-DZv7Csu4.css +1 -0
  77. package/dist/assets/components/user/author_box/AuthorBox.module-CbH2S-MT.css +1 -0
  78. package/dist/assets/components/user/avatar/Avatar.module-DmWuUR8K.css +1 -0
  79. package/dist/assets/components/user/avatar_selector/AvatarSelector.module-C2_Sfb_6.css +1 -0
  80. package/dist/assets/components/user/update_user_info_modal/UpdateUserInfoModal.module-DJym6u4r.css +1 -0
  81. package/dist/assets/components/user/user_box/UserBox.module-DGKK1afI.css +1 -0
  82. package/dist/assets/components/user/user_box_small/UserBoxSmall.module-ibAw9gGE.css +1 -0
  83. package/dist/assets/components/user_content/content_footer/ContentFooter.module-B9R3dZFl.css +1 -0
  84. package/dist/assets/components/user_content/content_header/ContentHeader.module-B0VwpU-R.css +1 -0
  85. package/dist/assets/components/user_content/summary_content_box/SummaryContentBox.module-DdzWnPjq.css +1 -0
  86. package/dist/assets/components/user_content/use_report_content/ReportModal.module-BxF-D5C5.css +1 -0
  87. package/dist/assets/components/vote/suggestion_vote_box/SuggestionVoteBox.module-CZeQKWIw.css +1 -0
  88. package/dist/assets/components/vote/up_down_vote_box/UpDownVoteBox.module-Bk_s4Ph0.css +1 -0
  89. package/dist/assets/components/vote/vote_box/VoteBox.module-BhTSjU8w.css +1 -0
  90. package/dist/assets/components/vote/vote_button/VoteButton.module-mxq12D3_.css +1 -0
  91. package/dist/components/action/back_link/BackLink.js +21 -23
  92. package/dist/components/action/back_link/BackLink.module.scss.js +9 -0
  93. package/dist/components/action/button/Button.js +74 -33
  94. package/dist/components/action/button/Button.module.scss.js +17 -0
  95. package/dist/components/action/icon_text_link/IconTextLink.js +51 -35
  96. package/dist/components/action/icon_text_link/IconTextLink.module.scss.js +19 -0
  97. package/dist/components/action/link/Link.js +36 -22
  98. package/dist/components/ad/ad_unit/AdUnit.js +41 -41
  99. package/dist/components/ad/ad_unit/AdUnit.module.scss.js +7 -0
  100. package/dist/components/ad/use_google_ad_manager/useGoogleAdManager.js +21 -21
  101. package/dist/components/ad/with_ad/WithAd.js +29 -13
  102. package/dist/components/argument/argument/Argument.js +327 -266
  103. package/dist/components/argument/argument/Argument.module.scss.js +50 -0
  104. package/dist/components/argument/argument/ReplyFooter.js +52 -38
  105. package/dist/components/argument/argument/ReplyFooter.module.scss.js +15 -0
  106. package/dist/components/argument/argument/useRichContent.js +16 -13
  107. package/dist/components/argument/top_arguments/TopArguments.js +93 -61
  108. package/dist/components/argument/top_arguments/TopArguments.module.scss.js +13 -0
  109. package/dist/components/auth/auth_initializer/AuthInitializer.js +51 -34
  110. package/dist/components/auth/auth_modal/AuthModal.js +77 -67
  111. package/dist/components/auth/auth_modal/AuthModal.module.scss.js +7 -0
  112. package/dist/components/auth/auth_modal/index.js +4 -2
  113. package/dist/components/auth/facebook_login_button/FacebookIcon.js +19 -13
  114. package/dist/components/auth/facebook_login_button/FacebookLoginButton.js +30 -28
  115. package/dist/components/auth/facebook_login_button/FacebookLoginButton.module.scss.js +9 -0
  116. package/dist/components/auth/google_login_button/GoogleIcon.js +43 -28
  117. package/dist/components/auth/google_login_button/GoogleLoginButton.js +33 -30
  118. package/dist/components/auth/google_login_button/GoogleLoginButton.module.scss.js +9 -0
  119. package/dist/components/auth/login_form/LoginForm.js +86 -83
  120. package/dist/components/auth/login_form/LoginForm.module.scss.js +15 -0
  121. package/dist/components/auth/oauth2_button/OAuth2Button.js +52 -35
  122. package/dist/components/auth/oauth2_button/OAuth2Button.module.scss.js +9 -0
  123. package/dist/components/auth/providers/AuthProvider.js +20 -19
  124. package/dist/components/auth/providers/AuthProviderFactory.js +9 -9
  125. package/dist/components/auth/providers/FormAuth.js +28 -28
  126. package/dist/components/auth/providers/JWTAuth.js +26 -26
  127. package/dist/components/auth/providers/OAuth2ServerAuth.js +35 -34
  128. package/dist/components/auth/providers/PasswordAuth.js +23 -23
  129. package/dist/components/auth/signup_form/SignupForm.js +164 -154
  130. package/dist/components/auth/signup_form/SignupForm.module.scss.js +11 -0
  131. package/dist/components/auth/social_auth_form/SocialAuthForm.js +225 -198
  132. package/dist/components/auth/social_auth_form/SocialAuthForm.module.scss.js +39 -0
  133. package/dist/components/auth/sso_form/SSOForm.js +191 -145
  134. package/dist/components/auth/sso_form/SSOForm.module.scss.js +31 -0
  135. package/dist/components/auth/use_auth/AuthContext.js +5 -5
  136. package/dist/components/auth/use_auth/AuthProvider.js +26 -25
  137. package/dist/components/auth/use_auth/AuthStorage.js +28 -28
  138. package/dist/components/auth/use_auth/authTokenHandler.js +46 -44
  139. package/dist/components/auth/use_auth/useAuth.js +5 -5
  140. package/dist/components/auth/use_auth/useAuthActions.js +46 -34
  141. package/dist/components/auth/use_auth/useAuthInterceptor.js +34 -26
  142. package/dist/components/chart/line_chart/LineChart.js +99 -100
  143. package/dist/components/chart/line_chart/LineChart.module.scss.js +15 -0
  144. package/dist/components/chart/pie_chart/PieChart.js +83 -68
  145. package/dist/components/chart/pie_chart/PieChart.module.scss.js +7 -0
  146. package/dist/components/consultation/consultation_box/ConsultationBox.js +164 -121
  147. package/dist/components/consultation/consultation_box/ConsultationBox.module.scss.js +35 -0
  148. package/dist/components/data/axios_client/httpClient.js +7 -7
  149. package/dist/components/data/config_provider/ConfigProvider.js +7 -12
  150. package/dist/components/data/config_provider/useConfig.js +7 -7
  151. package/dist/components/data/config_provider/useRoutes.js +7 -7
  152. package/dist/components/data/config_provider/withConfig.js +6 -9
  153. package/dist/components/data/data_provider/DataProvider.js +106 -99
  154. package/dist/components/data/data_provider/DataProviderContext.js +5 -5
  155. package/dist/components/data/data_provider/useData.js +10 -8
  156. package/dist/components/data/data_provider/useDataProvider.js +7 -7
  157. package/dist/components/debate/debate_box/DebateBox.js +185 -154
  158. package/dist/components/debate/debate_box/DebateBox.module.scss.js +49 -0
  159. package/dist/components/dialog/announcement_dialog/AnnouncementDialog.js +36 -29
  160. package/dist/components/dialog/announcement_dialog/AnnouncementDialog.module.scss.js +13 -0
  161. package/dist/components/dialog/confirm_modal/ConfirmModal.js +47 -36
  162. package/dist/components/dialog/confirm_modal/ConfirmModal.module.scss.js +13 -0
  163. package/dist/components/dialog/countdown/Countdown.js +22 -22
  164. package/dist/components/dialog/dialog_box/DialogBox.js +51 -50
  165. package/dist/components/dialog/dialog_box/DialogBox.module.scss.js +27 -0
  166. package/dist/components/dialog/drawer/Drawer.js +140 -126
  167. package/dist/components/dialog/drawer/Drawer.module.scss.js +31 -0
  168. package/dist/components/dialog/dropdown/Dropdown.js +48 -28
  169. package/dist/components/dialog/dropdown/Dropdown.module.scss.js +17 -0
  170. package/dist/components/dialog/modal/Modal.js +83 -64
  171. package/dist/components/dialog/modal/Modal.module.scss.js +19 -0
  172. package/dist/components/dialog/modal/ModalProvider.js +16 -19
  173. package/dist/components/dialog/modal/useModal.js +6 -6
  174. package/dist/components/dialog/toast/Toast.js +35 -39
  175. package/dist/components/dialog/toast/Toast.module.scss.js +25 -0
  176. package/dist/components/dialog/toast_provider/ToastContext.js +5 -5
  177. package/dist/components/dialog/toast_provider/ToastProvider.js +32 -27
  178. package/dist/components/dialog/toast_provider/ToastProvider.module.scss.js +7 -0
  179. package/dist/components/dialog/toast_provider/useToast.js +8 -11
  180. package/dist/components/dialog/tooltip/Tooltip.js +43 -31
  181. package/dist/components/dialog/tooltip/Tooltip.module.scss.js +21 -0
  182. package/dist/components/embed/embed_header/EmbedHeader.js +97 -71
  183. package/dist/components/embed/embed_header/EmbedHeader.module.scss.js +29 -0
  184. package/dist/components/error/standard_error_boundary/StandardErrorBoundary.js +16 -17
  185. package/dist/components/error/standard_error_boundary/StandardErrorBoundary.module.scss.js +7 -0
  186. package/dist/components/follow/follow_button/FollowButton.js +45 -47
  187. package/dist/components/follow/follow_button/FollowButton.module.scss.js +9 -0
  188. package/dist/components/follow/use_follow/useFollow.js +41 -35
  189. package/dist/components/forms/form/extract-form-data.js +10 -10
  190. package/dist/components/forms/form/form-context.js +5 -5
  191. package/dist/components/forms/form/form.js +22 -26
  192. package/dist/components/forms/form/use-form-context.js +28 -31
  193. package/dist/components/forms/form/use-form.js +6 -6
  194. package/dist/components/forms/use_form_validation/useFormValidation.js +50 -44
  195. package/dist/components/gamification/badge_box/BadgeBox.js +102 -92
  196. package/dist/components/gamification/badge_box/BadgeBox.module.scss.js +32 -0
  197. package/dist/components/gamification/point_box/PointBox.js +12 -18
  198. package/dist/components/gamification/point_box/PointBox.module.scss.js +11 -0
  199. package/dist/components/hooks/use_auth_required/useAuthRequired.js +22 -15
  200. package/dist/components/hooks/use_css_theme/useCssTheme.js +16 -15
  201. package/dist/components/hooks/use_font_loader/useFontLoader.js +12 -8
  202. package/dist/components/hooks/use_matomo/useMatomo.js +9 -9
  203. package/dist/components/hooks/use_relative_time/useRelativeTime.js +32 -52
  204. package/dist/components/hooks/use_responsive/ResponsiveContext.js +5 -5
  205. package/dist/components/hooks/use_responsive/ResponsiveProvider.js +41 -32
  206. package/dist/components/hooks/use_responsive/useResponsive.js +8 -13
  207. package/dist/components/icons/bild_icons/Alarm.js +12 -14
  208. package/dist/components/icons/bild_icons/Announcement.js +14 -19
  209. package/dist/components/icons/bild_icons/Arrow.js +5 -10
  210. package/dist/components/icons/bild_icons/Blockquote.js +5 -10
  211. package/dist/components/icons/bild_icons/Bold.js +5 -10
  212. package/dist/components/icons/bild_icons/Camera.js +8 -10
  213. package/dist/components/icons/bild_icons/Chat.js +37 -43
  214. package/dist/components/icons/bild_icons/Check.js +14 -11
  215. package/dist/components/icons/bild_icons/CheckCircle.js +21 -19
  216. package/dist/components/icons/bild_icons/Checkbox.js +8 -10
  217. package/dist/components/icons/bild_icons/Clap.js +32 -20
  218. package/dist/components/icons/bild_icons/Clock.js +5 -10
  219. package/dist/components/icons/bild_icons/Close.js +5 -10
  220. package/dist/components/icons/bild_icons/Code.js +35 -31
  221. package/dist/components/icons/bild_icons/Community.js +5 -10
  222. package/dist/components/icons/bild_icons/Crown.js +14 -11
  223. package/dist/components/icons/bild_icons/Document.js +5 -10
  224. package/dist/components/icons/bild_icons/Downvote.js +5 -10
  225. package/dist/components/icons/bild_icons/Ellipsis.js +14 -11
  226. package/dist/components/icons/bild_icons/ExpertBadge.js +50 -32
  227. package/dist/components/icons/bild_icons/Facebook.js +5 -10
  228. package/dist/components/icons/bild_icons/Flag.js +5 -10
  229. package/dist/components/icons/bild_icons/Home.js +5 -10
  230. package/dist/components/icons/bild_icons/Italic.js +5 -10
  231. package/dist/components/icons/bild_icons/LightArrow.js +14 -11
  232. package/dist/components/icons/bild_icons/Link.js +8 -10
  233. package/dist/components/icons/bild_icons/Login.js +30 -18
  234. package/dist/components/icons/bild_icons/Logora.js +55 -24
  235. package/dist/components/icons/bild_icons/Mail.js +5 -10
  236. package/dist/components/icons/bild_icons/MinusCircle.js +20 -23
  237. package/dist/components/icons/bild_icons/MobileClose.js +23 -18
  238. package/dist/components/icons/bild_icons/MobileMenu.js +28 -28
  239. package/dist/components/icons/bild_icons/Next.js +22 -21
  240. package/dist/components/icons/bild_icons/OpenBlank.js +20 -14
  241. package/dist/components/icons/bild_icons/OrderedList.js +5 -10
  242. package/dist/components/icons/bild_icons/PauseCircle.js +22 -33
  243. package/dist/components/icons/bild_icons/Point.js +24 -20
  244. package/dist/components/icons/bild_icons/Question.js +14 -17
  245. package/dist/components/icons/bild_icons/Refresh.js +8 -10
  246. package/dist/components/icons/bild_icons/Reply.js +8 -10
  247. package/dist/components/icons/bild_icons/Search.js +5 -10
  248. package/dist/components/icons/bild_icons/Send.js +5 -10
  249. package/dist/components/icons/bild_icons/Share.js +14 -11
  250. package/dist/components/icons/bild_icons/SmallArrow.js +5 -10
  251. package/dist/components/icons/bild_icons/Source.js +5 -10
  252. package/dist/components/icons/bild_icons/Suggestion.js +24 -18
  253. package/dist/components/icons/bild_icons/Twitter.js +43 -28
  254. package/dist/components/icons/bild_icons/Underline.js +5 -10
  255. package/dist/components/icons/bild_icons/Upvote.js +5 -10
  256. package/dist/components/icons/bild_icons/User.js +5 -10
  257. package/dist/components/icons/bild_icons/Versus.js +11 -13
  258. package/dist/components/icons/bild_icons/Votebox.js +14 -11
  259. package/dist/components/icons/bild_icons/index.js +105 -109
  260. package/dist/components/icons/hero_icons/Alarm.js +23 -17
  261. package/dist/components/icons/hero_icons/Announcement.js +23 -17
  262. package/dist/components/icons/hero_icons/Arrow.js +23 -17
  263. package/dist/components/icons/hero_icons/Blockquote.js +25 -26
  264. package/dist/components/icons/hero_icons/Bold.js +22 -16
  265. package/dist/components/icons/hero_icons/Camera.js +33 -21
  266. package/dist/components/icons/hero_icons/Chat.js +23 -17
  267. package/dist/components/icons/hero_icons/Check.js +23 -17
  268. package/dist/components/icons/hero_icons/CheckCircle.js +21 -19
  269. package/dist/components/icons/hero_icons/Checkbox.js +23 -17
  270. package/dist/components/icons/hero_icons/Clap.js +23 -17
  271. package/dist/components/icons/hero_icons/Clock.js +23 -17
  272. package/dist/components/icons/hero_icons/Close.js +23 -17
  273. package/dist/components/icons/hero_icons/Code.js +23 -17
  274. package/dist/components/icons/hero_icons/Community.js +23 -17
  275. package/dist/components/icons/hero_icons/Crown.js +23 -17
  276. package/dist/components/icons/hero_icons/Downvote.js +23 -17
  277. package/dist/components/icons/hero_icons/Ellipsis.js +23 -17
  278. package/dist/components/icons/hero_icons/ExpertBadge.js +23 -17
  279. package/dist/components/icons/hero_icons/Facebook.js +5 -10
  280. package/dist/components/icons/hero_icons/Flag.js +5 -10
  281. package/dist/components/icons/hero_icons/Home.js +23 -17
  282. package/dist/components/icons/hero_icons/Italic.js +22 -16
  283. package/dist/components/icons/hero_icons/LightArrow.js +14 -11
  284. package/dist/components/icons/hero_icons/Link.js +23 -17
  285. package/dist/components/icons/hero_icons/Login.js +24 -18
  286. package/dist/components/icons/hero_icons/Logora.js +55 -24
  287. package/dist/components/icons/hero_icons/Mail.js +23 -17
  288. package/dist/components/icons/hero_icons/MinusCircle.js +20 -23
  289. package/dist/components/icons/hero_icons/MobileClose.js +23 -17
  290. package/dist/components/icons/hero_icons/MobileMenu.js +23 -17
  291. package/dist/components/icons/hero_icons/Next.js +23 -17
  292. package/dist/components/icons/hero_icons/OpenBlank.js +23 -17
  293. package/dist/components/icons/hero_icons/OrderedList.js +60 -46
  294. package/dist/components/icons/hero_icons/PauseCircle.js +22 -33
  295. package/dist/components/icons/hero_icons/Point.js +24 -20
  296. package/dist/components/icons/hero_icons/Question.js +23 -17
  297. package/dist/components/icons/hero_icons/Refresh.js +23 -17
  298. package/dist/components/icons/hero_icons/Reply.js +23 -17
  299. package/dist/components/icons/hero_icons/Search.js +23 -17
  300. package/dist/components/icons/hero_icons/Send.js +23 -17
  301. package/dist/components/icons/hero_icons/Share.js +23 -17
  302. package/dist/components/icons/hero_icons/SmallArrow.js +23 -17
  303. package/dist/components/icons/hero_icons/Source.js +23 -17
  304. package/dist/components/icons/hero_icons/Suggestion.js +23 -17
  305. package/dist/components/icons/hero_icons/Twitter.js +43 -28
  306. package/dist/components/icons/hero_icons/Underline.js +25 -26
  307. package/dist/components/icons/hero_icons/Upvote.js +23 -17
  308. package/dist/components/icons/hero_icons/User.js +23 -17
  309. package/dist/components/icons/hero_icons/Versus.js +23 -17
  310. package/dist/components/icons/hero_icons/Votebox.js +23 -17
  311. package/dist/components/icons/hero_icons/index.js +103 -107
  312. package/dist/components/icons/icon/Icon.js +23 -19
  313. package/dist/components/icons/icon_provider/IconProvider.js +7 -9
  314. package/dist/components/icons/krone_icons/Alarm.js +29 -27
  315. package/dist/components/icons/krone_icons/Announcement.js +21 -15
  316. package/dist/components/icons/krone_icons/Arrow.js +5 -10
  317. package/dist/components/icons/krone_icons/Blockquote.js +5 -10
  318. package/dist/components/icons/krone_icons/Bold.js +5 -10
  319. package/dist/components/icons/krone_icons/Camera.js +8 -10
  320. package/dist/components/icons/krone_icons/Chat.js +31 -29
  321. package/dist/components/icons/krone_icons/Check.js +5 -10
  322. package/dist/components/icons/krone_icons/CheckBox.js +22 -16
  323. package/dist/components/icons/krone_icons/CheckCircle.js +21 -19
  324. package/dist/components/icons/krone_icons/Clap.js +31 -29
  325. package/dist/components/icons/krone_icons/Clock.js +5 -10
  326. package/dist/components/icons/krone_icons/Close.js +5 -10
  327. package/dist/components/icons/krone_icons/Code.js +35 -31
  328. package/dist/components/icons/krone_icons/Community.js +5 -10
  329. package/dist/components/icons/krone_icons/Crown.js +5 -10
  330. package/dist/components/icons/krone_icons/Document.js +5 -10
  331. package/dist/components/icons/krone_icons/Downvote.js +5 -10
  332. package/dist/components/icons/krone_icons/Ellipsis.js +23 -17
  333. package/dist/components/icons/krone_icons/ExpertBadge.js +31 -29
  334. package/dist/components/icons/krone_icons/Facebook.js +5 -10
  335. package/dist/components/icons/krone_icons/Flag.js +5 -10
  336. package/dist/components/icons/krone_icons/Home.js +31 -29
  337. package/dist/components/icons/krone_icons/Italic.js +5 -10
  338. package/dist/components/icons/krone_icons/LightArrow.js +5 -10
  339. package/dist/components/icons/krone_icons/Link.js +8 -10
  340. package/dist/components/icons/krone_icons/Login.js +29 -17
  341. package/dist/components/icons/krone_icons/Logora.js +55 -24
  342. package/dist/components/icons/krone_icons/Mail.js +5 -10
  343. package/dist/components/icons/krone_icons/MinusCircle.js +20 -23
  344. package/dist/components/icons/krone_icons/MobileClose.js +14 -17
  345. package/dist/components/icons/krone_icons/MobileMenu.js +28 -28
  346. package/dist/components/icons/krone_icons/Next.js +22 -21
  347. package/dist/components/icons/krone_icons/OpenBlank.js +20 -14
  348. package/dist/components/icons/krone_icons/OrderedList.js +5 -10
  349. package/dist/components/icons/krone_icons/PauseCircle.js +21 -32
  350. package/dist/components/icons/krone_icons/Point.js +24 -20
  351. package/dist/components/icons/krone_icons/Question.js +31 -29
  352. package/dist/components/icons/krone_icons/Refresh.js +8 -10
  353. package/dist/components/icons/krone_icons/Reply.js +23 -17
  354. package/dist/components/icons/krone_icons/Search.js +5 -10
  355. package/dist/components/icons/krone_icons/Send.js +30 -25
  356. package/dist/components/icons/krone_icons/Share.js +16 -13
  357. package/dist/components/icons/krone_icons/SmallArrow.js +5 -10
  358. package/dist/components/icons/krone_icons/Source.js +5 -10
  359. package/dist/components/icons/krone_icons/Suggestion.js +31 -29
  360. package/dist/components/icons/krone_icons/Twitter.js +43 -28
  361. package/dist/components/icons/krone_icons/Underline.js +5 -10
  362. package/dist/components/icons/krone_icons/Upvote.js +31 -29
  363. package/dist/components/icons/krone_icons/User.js +37 -32
  364. package/dist/components/icons/krone_icons/Versus.js +5 -10
  365. package/dist/components/icons/krone_icons/Votebox.js +31 -29
  366. package/dist/components/icons/krone_icons/index.js +105 -109
  367. package/dist/components/icons/regular_icons/Alarm.js +12 -14
  368. package/dist/components/icons/regular_icons/Announcement.js +14 -19
  369. package/dist/components/icons/regular_icons/Arrow.js +5 -10
  370. package/dist/components/icons/regular_icons/Blockquote.js +5 -10
  371. package/dist/components/icons/regular_icons/Bold.js +5 -10
  372. package/dist/components/icons/regular_icons/Camera.js +8 -10
  373. package/dist/components/icons/regular_icons/Chat.js +10 -15
  374. package/dist/components/icons/regular_icons/Check.js +5 -10
  375. package/dist/components/icons/regular_icons/CheckCircle.js +21 -19
  376. package/dist/components/icons/regular_icons/Checkbox.js +8 -10
  377. package/dist/components/icons/regular_icons/Clap.js +12 -14
  378. package/dist/components/icons/regular_icons/Clock.js +5 -10
  379. package/dist/components/icons/regular_icons/Close.js +5 -10
  380. package/dist/components/icons/regular_icons/Code.js +35 -31
  381. package/dist/components/icons/regular_icons/Community.js +5 -10
  382. package/dist/components/icons/regular_icons/Crown.js +5 -10
  383. package/dist/components/icons/regular_icons/Document.js +5 -10
  384. package/dist/components/icons/regular_icons/Downvote.js +5 -10
  385. package/dist/components/icons/regular_icons/Ellipsis.js +5 -10
  386. package/dist/components/icons/regular_icons/ExpertBadge.js +41 -31
  387. package/dist/components/icons/regular_icons/Facebook.js +5 -10
  388. package/dist/components/icons/regular_icons/Flag.js +5 -10
  389. package/dist/components/icons/regular_icons/Home.js +5 -10
  390. package/dist/components/icons/regular_icons/Italic.js +5 -10
  391. package/dist/components/icons/regular_icons/LightArrow.js +5 -10
  392. package/dist/components/icons/regular_icons/Link.js +8 -10
  393. package/dist/components/icons/regular_icons/Login.js +29 -17
  394. package/dist/components/icons/regular_icons/Logora.js +55 -24
  395. package/dist/components/icons/regular_icons/Mail.js +5 -10
  396. package/dist/components/icons/regular_icons/MinusCircle.js +20 -23
  397. package/dist/components/icons/regular_icons/MobileClose.js +14 -17
  398. package/dist/components/icons/regular_icons/MobileMenu.js +28 -28
  399. package/dist/components/icons/regular_icons/Next.js +22 -21
  400. package/dist/components/icons/regular_icons/OpenBlank.js +20 -14
  401. package/dist/components/icons/regular_icons/OrderedList.js +5 -10
  402. package/dist/components/icons/regular_icons/PauseCircle.js +21 -32
  403. package/dist/components/icons/regular_icons/Point.js +24 -20
  404. package/dist/components/icons/regular_icons/Question.js +14 -17
  405. package/dist/components/icons/regular_icons/Refresh.js +8 -10
  406. package/dist/components/icons/regular_icons/Reply.js +8 -10
  407. package/dist/components/icons/regular_icons/Search.js +5 -10
  408. package/dist/components/icons/regular_icons/Send.js +5 -10
  409. package/dist/components/icons/regular_icons/Share.js +14 -11
  410. package/dist/components/icons/regular_icons/SmallArrow.js +5 -10
  411. package/dist/components/icons/regular_icons/Source.js +5 -10
  412. package/dist/components/icons/regular_icons/Suggestion.js +24 -18
  413. package/dist/components/icons/regular_icons/Twitter.js +43 -28
  414. package/dist/components/icons/regular_icons/Underline.js +5 -10
  415. package/dist/components/icons/regular_icons/Upvote.js +5 -10
  416. package/dist/components/icons/regular_icons/User.js +5 -10
  417. package/dist/components/icons/regular_icons/Versus.js +5 -10
  418. package/dist/components/icons/regular_icons/Votebox.js +14 -11
  419. package/dist/components/icons/regular_icons/index.js +105 -109
  420. package/dist/components/icons/spiegel_icons/Alarm.js +12 -14
  421. package/dist/components/icons/spiegel_icons/Announcement.js +14 -19
  422. package/dist/components/icons/spiegel_icons/Arrow.js +5 -10
  423. package/dist/components/icons/spiegel_icons/Blockquote.js +24 -25
  424. package/dist/components/icons/spiegel_icons/Bold.js +21 -15
  425. package/dist/components/icons/spiegel_icons/Camera.js +8 -10
  426. package/dist/components/icons/spiegel_icons/Chat.js +14 -11
  427. package/dist/components/icons/spiegel_icons/Check.js +5 -10
  428. package/dist/components/icons/spiegel_icons/CheckCircle.js +31 -19
  429. package/dist/components/icons/spiegel_icons/Checkbox.js +24 -25
  430. package/dist/components/icons/spiegel_icons/Clap.js +24 -25
  431. package/dist/components/icons/spiegel_icons/Clock.js +27 -25
  432. package/dist/components/icons/spiegel_icons/Close.js +12 -14
  433. package/dist/components/icons/spiegel_icons/Code.js +35 -31
  434. package/dist/components/icons/spiegel_icons/Community.js +5 -10
  435. package/dist/components/icons/spiegel_icons/Crown.js +14 -11
  436. package/dist/components/icons/spiegel_icons/Downvote.js +5 -10
  437. package/dist/components/icons/spiegel_icons/Ellipsis.js +14 -11
  438. package/dist/components/icons/spiegel_icons/ExpertBadge.js +32 -27
  439. package/dist/components/icons/spiegel_icons/Facebook.js +21 -15
  440. package/dist/components/icons/spiegel_icons/Flag.js +31 -19
  441. package/dist/components/icons/spiegel_icons/Home.js +5 -10
  442. package/dist/components/icons/spiegel_icons/Italic.js +21 -15
  443. package/dist/components/icons/spiegel_icons/LightArrow.js +14 -11
  444. package/dist/components/icons/spiegel_icons/Link.js +21 -25
  445. package/dist/components/icons/spiegel_icons/Login.js +24 -18
  446. package/dist/components/icons/spiegel_icons/Logora.js +55 -24
  447. package/dist/components/icons/spiegel_icons/Mail.js +21 -15
  448. package/dist/components/icons/spiegel_icons/MinusCircle.js +31 -19
  449. package/dist/components/icons/spiegel_icons/MobileClose.js +23 -18
  450. package/dist/components/icons/spiegel_icons/MobileMenu.js +28 -28
  451. package/dist/components/icons/spiegel_icons/Next.js +22 -21
  452. package/dist/components/icons/spiegel_icons/OpenBlank.js +20 -14
  453. package/dist/components/icons/spiegel_icons/OrderedList.js +24 -28
  454. package/dist/components/icons/spiegel_icons/PauseCircle.js +31 -19
  455. package/dist/components/icons/spiegel_icons/Point.js +24 -20
  456. package/dist/components/icons/spiegel_icons/Question.js +28 -29
  457. package/dist/components/icons/spiegel_icons/Refresh.js +8 -10
  458. package/dist/components/icons/spiegel_icons/Reply.js +14 -11
  459. package/dist/components/icons/spiegel_icons/Search.js +5 -10
  460. package/dist/components/icons/spiegel_icons/Send.js +5 -10
  461. package/dist/components/icons/spiegel_icons/Share.js +24 -25
  462. package/dist/components/icons/spiegel_icons/SmallArrow.js +14 -11
  463. package/dist/components/icons/spiegel_icons/Source.js +5 -10
  464. package/dist/components/icons/spiegel_icons/Suggestion.js +21 -15
  465. package/dist/components/icons/spiegel_icons/Twitter.js +43 -28
  466. package/dist/components/icons/spiegel_icons/Underline.js +24 -25
  467. package/dist/components/icons/spiegel_icons/Upvote.js +5 -10
  468. package/dist/components/icons/spiegel_icons/User.js +5 -10
  469. package/dist/components/icons/spiegel_icons/Versus.js +11 -13
  470. package/dist/components/icons/spiegel_icons/Votebox.js +24 -25
  471. package/dist/components/icons/spiegel_icons/index.js +103 -107
  472. package/dist/components/input/argument_input/ArgumentInput.js +387 -285
  473. package/dist/components/input/argument_input/ArgumentInput.module.scss.js +43 -0
  474. package/dist/components/input/argument_input/index.js +4 -2
  475. package/dist/components/input/checkbox/hidden/hidden-checkbox.js +15 -14
  476. package/dist/components/input/checkbox/hidden/hidden-checkbox.module.scss.js +7 -0
  477. package/dist/components/input/checkbox/indicator/checkbox-indicator.js +19 -16
  478. package/dist/components/input/checkbox/indicator/checkbox-indicator.module.scss.js +9 -0
  479. package/dist/components/input/checkbox/label/checkbox-label.js +38 -25
  480. package/dist/components/input/input_provider/InputProvider.js +24 -20
  481. package/dist/components/input/input_provider/useInput.js +5 -5
  482. package/dist/components/input/search_input/SearchInput.js +99 -73
  483. package/dist/components/input/search_input/SearchInput.module.scss.js +11 -0
  484. package/dist/components/input/select/Select.js +85 -75
  485. package/dist/components/input/select/Select.module.scss.js +19 -0
  486. package/dist/components/input/text_editor/EditorTheme.js +70 -68
  487. package/dist/components/input/text_editor/TextEditor.js +170 -146
  488. package/dist/components/input/text_editor/TextEditor.module.scss.js +45 -0
  489. package/dist/components/input/text_editor/lexicalToHtml.js +19 -21
  490. package/dist/components/input/text_editor/plugins/AutoSavePlugin.js +33 -24
  491. package/dist/components/input/text_editor/plugins/FocusPlugin.js +13 -13
  492. package/dist/components/input/text_editor/plugins/MaxLengthPlugin.js +25 -22
  493. package/dist/components/input/text_editor/plugins/ResetPlugin.js +20 -17
  494. package/dist/components/input/text_editor/plugins/SetContentPlugin.js +17 -17
  495. package/dist/components/input/text_editor/plugins/SetRichContentPlugin.js +14 -14
  496. package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +229 -169
  497. package/dist/components/input/text_editor/plugins/ToolbarPlugin.module.scss.js +25 -0
  498. package/dist/components/input/text_input/TextInput.js +61 -35
  499. package/dist/components/input/text_input/TextInput.module.scss.js +21 -0
  500. package/dist/components/input/text_input/color-accent.js +11 -11
  501. package/dist/components/input/text_input/message.js +8 -14
  502. package/dist/components/input/toggle/Toggle.js +23 -26
  503. package/dist/components/input/toggle/Toggle.module.scss.js +15 -0
  504. package/dist/components/input/toggle_position/TogglePosition.js +65 -47
  505. package/dist/components/input/toggle_position/TogglePosition.module.scss.js +15 -0
  506. package/dist/components/intl/intl_provider/IntlContext.js +5 -5
  507. package/dist/components/intl/intl_provider/IntlProvider.js +46 -37
  508. package/dist/components/intl/intl_provider/useLocale.js +8 -11
  509. package/dist/components/list/list_provider/ListProvider.js +45 -44
  510. package/dist/components/list/list_provider/useList.js +34 -21
  511. package/dist/components/list/paginated_list/PaginatedList.js +244 -177
  512. package/dist/components/list/paginated_list/PaginatedList.module.scss.js +33 -0
  513. package/dist/components/list/paginated_list/VotePaginatedList.js +22 -18
  514. package/dist/components/list/paginated_list/action_bar/ActionBar.js +109 -74
  515. package/dist/components/list/paginated_list/action_bar/ActionBar.module.scss.js +23 -0
  516. package/dist/components/list/pagination/Pagination.js +33 -26
  517. package/dist/components/list/pagination/Pagination.module.scss.js +7 -0
  518. package/dist/components/modal/side_modal/SideModal.js +72 -58
  519. package/dist/components/modal/side_modal/SideModal.module.scss.js +19 -0
  520. package/dist/components/modal/side_modal/index.js +3 -1
  521. package/dist/components/navbar/navbar_button/NavbarButton.js +32 -28
  522. package/dist/components/navbar/navbar_button/NavbarButton.module.scss.js +9 -0
  523. package/dist/components/navbar/navbar_modal/NavbarModal.js +182 -155
  524. package/dist/components/navbar/navbar_modal/NavbarModal.module.scss.js +25 -0
  525. package/dist/components/notification/notification_item/NotificationItem.js +77 -48
  526. package/dist/components/notification/notification_item/NotificationItem.module.scss.js +17 -0
  527. package/dist/components/notification/notification_menu/NotificationMenu.js +59 -52
  528. package/dist/components/notification/notification_menu/NotificationMenu.module.scss.js +13 -0
  529. package/dist/components/progress/loader/Loader.js +6 -12
  530. package/dist/components/progress/loader/Loader.module.scss.js +9 -0
  531. package/dist/components/progress/progress_bar/ProgressBar.js +48 -57
  532. package/dist/components/progress/progress_bar/ProgressBar.module.scss.js +23 -0
  533. package/dist/components/proposal/proposal_box/ProposalBox.js +139 -107
  534. package/dist/components/proposal/proposal_box/ProposalBox.module.scss.js +19 -0
  535. package/dist/components/report/report_box/ReportBox.js +103 -101
  536. package/dist/components/report/report_box/ReportBox.module.scss.js +19 -0
  537. package/dist/components/section/section_box/SectionBox.js +56 -39
  538. package/dist/components/section/section_box/SectionBox.module.scss.js +25 -0
  539. package/dist/components/share/share_box/ShareBox.js +182 -130
  540. package/dist/components/share/share_box/ShareBox.module.scss.js +17 -0
  541. package/dist/components/share/share_button/ShareButton.js +91 -72
  542. package/dist/components/share/share_button/ShareButton.module.scss.js +15 -0
  543. package/dist/components/share/share_modal/ShareModal.js +30 -26
  544. package/dist/components/share/share_modal/ShareModal.module.scss.js +7 -0
  545. package/dist/components/share/share_modal/index.js +4 -2
  546. package/dist/components/skeleton/box_skeleton/BoxSkeleton.js +84 -62
  547. package/dist/components/skeleton/user_content_skeleton/UserContentSkeleton.js +49 -56
  548. package/dist/components/skeleton/user_content_skeleton/UserContentSkeleton.module.scss.js +23 -0
  549. package/dist/components/source/context_source_box/ContextSourceBox.js +39 -43
  550. package/dist/components/source/context_source_box/ContextSourceBox.module.scss.js +17 -0
  551. package/dist/components/source/context_source_list/ContextSourceList.js +53 -41
  552. package/dist/components/source/context_source_list/ContextSourceList.module.scss.js +15 -0
  553. package/dist/components/source/source_box/SourceBox.js +31 -38
  554. package/dist/components/source/source_box/SourceBox.module.scss.js +19 -0
  555. package/dist/components/source/source_list_item/SourceListItem.js +33 -31
  556. package/dist/components/source/source_list_item/SourceListItem.module.scss.js +9 -0
  557. package/dist/components/source/source_modal/SourceModal.js +138 -109
  558. package/dist/components/source/source_modal/SourceModal.module.scss.js +19 -0
  559. package/dist/components/suggestion/suggestion_banner/SuggestionBanner.js +122 -98
  560. package/dist/components/suggestion/suggestion_banner/SuggestionBanner.module.scss.js +23 -0
  561. package/dist/components/suggestion/suggestion_box/SuggestionBox.js +117 -96
  562. package/dist/components/suggestion/suggestion_box/SuggestionBox.module.scss.js +23 -0
  563. package/dist/components/suggestion/suggestion_input/SuggestionInput.js +182 -156
  564. package/dist/components/suggestion/suggestion_input/SuggestionInput.module.scss.js +19 -0
  565. package/dist/components/summary/argument_summary_box/ArgumentSummaryBox.js +64 -61
  566. package/dist/components/summary/argument_summary_box/ArgumentSummaryBox.module.scss.js +23 -0
  567. package/dist/components/summary/keyword_box/KeywordBox.js +34 -36
  568. package/dist/components/summary/keyword_box/KeywordBox.module.scss.js +13 -0
  569. package/dist/components/summary/summary/Summary.js +87 -72
  570. package/dist/components/summary/summary/Summary.module.scss.js +9 -0
  571. package/dist/components/summary/summary_box/SummaryBox.js +17 -21
  572. package/dist/components/summary/summary_box/SummaryBox.module.scss.js +17 -0
  573. package/dist/components/tag/tag/Tag.js +34 -18
  574. package/dist/components/tag/tag/Tag.module.scss.js +9 -0
  575. package/dist/components/text/expandable_text/ArrowIcon.js +5 -10
  576. package/dist/components/text/expandable_text/ExpandableText.js +71 -52
  577. package/dist/components/text/expandable_text/ExpandableText.module.scss.js +17 -0
  578. package/dist/components/text/read_more/ReadMore.js +79 -62
  579. package/dist/components/text/read_more/ReadMore.module.scss.js +19 -0
  580. package/dist/components/tools/hash_scroll/HashScroll.js +17 -17
  581. package/dist/components/tools/scroll_to_top/ScrollToTop.js +16 -14
  582. package/dist/components/translation/translated_content/TranslatedContent.js +19 -6
  583. package/dist/components/translation/translated_content/useTranslatedContent.js +53 -25
  584. package/dist/components/translation/translation_button/TranslationButton.js +50 -34
  585. package/dist/components/translation/translation_button/TranslationButton.module.scss.js +7 -0
  586. package/dist/components/user/author_box/AuthorBox.js +116 -112
  587. package/dist/components/user/author_box/AuthorBox.module.scss.js +33 -0
  588. package/dist/components/user/avatar/Avatar.js +75 -53
  589. package/dist/components/user/avatar/Avatar.module.scss.js +13 -0
  590. package/dist/components/user/avatar/DefaultAvatar.js +11 -16
  591. package/dist/components/user/avatar_selector/AvatarSelector.js +127 -107
  592. package/dist/components/user/avatar_selector/AvatarSelector.module.scss.js +33 -0
  593. package/dist/components/user/update_user_info_modal/UpdateUserInfoModal.js +290 -250
  594. package/dist/components/user/update_user_info_modal/UpdateUserInfoModal.module.scss.js +29 -0
  595. package/dist/components/user/update_user_info_modal/useUpdateUserInfo.js +26 -25
  596. package/dist/components/user/user_box/UserBox.js +78 -80
  597. package/dist/components/user/user_box/UserBox.module.scss.js +17 -0
  598. package/dist/components/user/user_box_small/UserBoxSmall.js +40 -42
  599. package/dist/components/user/user_box_small/UserBoxSmall.module.scss.js +9 -0
  600. package/dist/components/user_content/content_footer/ContentFooter.js +245 -171
  601. package/dist/components/user_content/content_footer/ContentFooter.module.scss.js +19 -0
  602. package/dist/components/user_content/content_header/ContentHeader.js +126 -119
  603. package/dist/components/user_content/content_header/ContentHeader.module.scss.js +29 -0
  604. package/dist/components/user_content/summary_content_box/SummaryContentBox.js +102 -70
  605. package/dist/components/user_content/summary_content_box/SummaryContentBox.module.scss.js +17 -0
  606. package/dist/components/user_content/use_delete_content/useDeleteContent.js +52 -44
  607. package/dist/components/user_content/use_report_content/ReportModal.js +267 -265
  608. package/dist/components/user_content/use_report_content/ReportModal.module.scss.js +27 -0
  609. package/dist/components/user_content/use_report_content/useReportContent.js +25 -23
  610. package/dist/components/util/lang_emojis/langEmojis.js +59 -57
  611. package/dist/components/util/location/Location.js +49 -40
  612. package/dist/components/util/unique_by/uniqueBy.js +8 -6
  613. package/dist/components/vote/suggestion_vote_box/SuggestionVoteBox.js +93 -80
  614. package/dist/components/vote/suggestion_vote_box/SuggestionVoteBox.module.scss.js +9 -0
  615. package/dist/components/vote/up_down_vote_box/UpDownVoteBox.js +71 -54
  616. package/dist/components/vote/up_down_vote_box/UpDownVoteBox.module.scss.js +17 -0
  617. package/dist/components/vote/use_vote/useVote.js +74 -61
  618. package/dist/components/vote/vote_box/VoteBox.js +423 -296
  619. package/dist/components/vote/vote_box/VoteBox.module.scss.js +59 -0
  620. package/dist/components/vote/vote_button/VoteButton.js +55 -38
  621. package/dist/components/vote/vote_button/VoteButton.module.scss.js +11 -0
  622. package/dist/components/vote/vote_provider/VoteProvider.js +36 -39
  623. package/dist/index.js +310 -202
  624. package/package.json +23 -17
  625. package/dist/_virtual/_rolldown/runtime.js +0 -23
  626. package/dist/assets/debate-Bv79XlHp.css +0 -2
  627. package/dist/components/action/back_link/BackLink.module.js +0 -6
  628. package/dist/components/action/button/Button.module.js +0 -10
  629. package/dist/components/action/icon_text_link/IconTextLink.module.js +0 -11
  630. package/dist/components/ad/ad_unit/AdUnit.module.js +0 -3
  631. package/dist/components/argument/argument/Argument.module.js +0 -34
  632. package/dist/components/argument/argument/ReplyFooter.module.js +0 -10
  633. package/dist/components/argument/top_arguments/TopArguments.module.js +0 -9
  634. package/dist/components/auth/auth_modal/AuthModal.module.js +0 -3
  635. package/dist/components/auth/facebook_login_button/FacebookLoginButton.module.js +0 -6
  636. package/dist/components/auth/google_login_button/GoogleLoginButton.module.js +0 -6
  637. package/dist/components/auth/login_form/LoginForm.module.js +0 -9
  638. package/dist/components/auth/oauth2_button/OAuth2Button.module.js +0 -6
  639. package/dist/components/auth/signup_form/SignupForm.module.js +0 -7
  640. package/dist/components/auth/social_auth_form/SocialAuthForm.module.js +0 -21
  641. package/dist/components/auth/sso_form/SSOForm.module.js +0 -17
  642. package/dist/components/chart/line_chart/LineChart.module.js +0 -9
  643. package/dist/components/chart/pie_chart/PieChart.module.js +0 -3
  644. package/dist/components/consultation/consultation_box/ConsultationBox.module.js +0 -21
  645. package/dist/components/debate/debate_box/DebateBox.module.js +0 -26
  646. package/dist/components/dialog/announcement_dialog/AnnouncementDialog.module.js +0 -8
  647. package/dist/components/dialog/confirm_modal/ConfirmModal.module.js +0 -8
  648. package/dist/components/dialog/dialog_box/DialogBox.module.js +0 -16
  649. package/dist/components/dialog/drawer/Drawer.module.js +0 -17
  650. package/dist/components/dialog/dropdown/Dropdown.module.js +0 -10
  651. package/dist/components/dialog/modal/Modal.module.js +0 -12
  652. package/dist/components/dialog/toast/Toast.module.js +0 -14
  653. package/dist/components/dialog/toast_provider/ToastProvider.module.js +0 -3
  654. package/dist/components/dialog/tooltip/Tooltip.module.js +0 -12
  655. package/dist/components/embed/embed_header/EmbedHeader.module.js +0 -18
  656. package/dist/components/error/standard_error_boundary/StandardErrorBoundary.module.js +0 -3
  657. package/dist/components/follow/follow_button/FollowButton.module.js +0 -6
  658. package/dist/components/gamification/badge_box/BadgeBox.module.js +0 -19
  659. package/dist/components/gamification/point_box/PointBox.module.js +0 -7
  660. package/dist/components/input/argument_input/ArgumentInput.module.js +0 -23
  661. package/dist/components/input/checkbox/hidden/hidden-checkbox.module.js +0 -3
  662. package/dist/components/input/checkbox/indicator/checkbox-indicator.module.js +0 -6
  663. package/dist/components/input/search_input/SearchInput.module.js +0 -8
  664. package/dist/components/input/select/Select.module.js +0 -12
  665. package/dist/components/input/text_editor/TextEditor.module.js +0 -24
  666. package/dist/components/input/text_editor/plugins/ToolbarPlugin.module.js +0 -17
  667. package/dist/components/input/text_input/TextInput.module.js +0 -12
  668. package/dist/components/input/toggle/Toggle.module.js +0 -9
  669. package/dist/components/input/toggle_position/TogglePosition.module.js +0 -10
  670. package/dist/components/list/paginated_list/PaginatedList.module.js +0 -18
  671. package/dist/components/list/paginated_list/action_bar/ActionBar.module.js +0 -13
  672. package/dist/components/list/pagination/Pagination.module.js +0 -3
  673. package/dist/components/modal/side_modal/SideModal.module.js +0 -11
  674. package/dist/components/navbar/navbar_button/NavbarButton.module.js +0 -6
  675. package/dist/components/navbar/navbar_modal/NavbarModal.module.js +0 -16
  676. package/dist/components/notification/notification_item/NotificationItem.module.js +0 -10
  677. package/dist/components/notification/notification_menu/NotificationMenu.module.js +0 -8
  678. package/dist/components/progress/loader/Loader.module.js +0 -7
  679. package/dist/components/progress/progress_bar/ProgressBar.module.js +0 -14
  680. package/dist/components/proposal/proposal_box/ProposalBox.module.js +0 -11
  681. package/dist/components/report/report_box/ReportBox.module.js +0 -11
  682. package/dist/components/section/section_box/SectionBox.module.js +0 -14
  683. package/dist/components/share/share_box/ShareBox.module.js +0 -10
  684. package/dist/components/share/share_button/ShareButton.module.js +0 -9
  685. package/dist/components/share/share_modal/ShareModal.module.js +0 -3
  686. package/dist/components/skeleton/user_content_skeleton/UserContentSkeleton.module.js +0 -13
  687. package/dist/components/source/context_source_box/ContextSourceBox.module.js +0 -10
  688. package/dist/components/source/context_source_list/ContextSourceList.module.js +0 -10
  689. package/dist/components/source/source_box/SourceBox.module.js +0 -11
  690. package/dist/components/source/source_list_item/SourceListItem.module.js +0 -6
  691. package/dist/components/source/source_modal/SourceModal.module.js +0 -11
  692. package/dist/components/suggestion/suggestion_banner/SuggestionBanner.module.js +0 -13
  693. package/dist/components/suggestion/suggestion_box/SuggestionBox.module.js +0 -13
  694. package/dist/components/suggestion/suggestion_input/SuggestionInput.module.js +0 -11
  695. package/dist/components/summary/argument_summary_box/ArgumentSummaryBox.module.js +0 -13
  696. package/dist/components/summary/keyword_box/KeywordBox.module.js +0 -11
  697. package/dist/components/summary/summary/Summary.module.js +0 -6
  698. package/dist/components/summary/summary_box/SummaryBox.module.js +0 -10
  699. package/dist/components/tag/tag/Tag.module.js +0 -6
  700. package/dist/components/text/expandable_text/ExpandableText.module.js +0 -10
  701. package/dist/components/text/read_more/ReadMore.module.js +0 -11
  702. package/dist/components/translation/translation_button/TranslationButton.module.js +0 -3
  703. package/dist/components/user/author_box/AuthorBox.module.js +0 -18
  704. package/dist/components/user/avatar/Avatar.module.js +0 -8
  705. package/dist/components/user/avatar_selector/AvatarSelector.module.js +0 -18
  706. package/dist/components/user/update_user_info_modal/UpdateUserInfoModal.module.js +0 -23
  707. package/dist/components/user/user_box/UserBox.module.js +0 -13
  708. package/dist/components/user/user_box_small/UserBoxSmall.module.js +0 -6
  709. package/dist/components/user_content/content_footer/ContentFooter.module.js +0 -11
  710. package/dist/components/user_content/content_header/ContentHeader.module.js +0 -16
  711. package/dist/components/user_content/summary_content_box/SummaryContentBox.module.js +0 -10
  712. package/dist/components/user_content/use_report_content/ReportModal.module.js +0 -15
  713. package/dist/components/vote/suggestion_vote_box/SuggestionVoteBox.module.js +0 -6
  714. package/dist/components/vote/up_down_vote_box/UpDownVoteBox.module.js +0 -10
  715. package/dist/components/vote/vote_box/VoteBox.module.js +0 -31
  716. package/dist/components/vote/vote_button/VoteButton.module.js +0 -7
  717. package/dist/node_modules/.pnpm/@formatjs_fast-memoize@2.2.7/node_modules/@formatjs/fast-memoize/lib/index.js +0 -51
  718. package/dist/node_modules/.pnpm/@formatjs_icu-messageformat-parser@2.11.4/node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js +0 -28
  719. package/dist/node_modules/.pnpm/@formatjs_icu-messageformat-parser@2.11.4/node_modules/@formatjs/icu-messageformat-parser/lib/error.js +0 -7
  720. package/dist/node_modules/.pnpm/@formatjs_icu-messageformat-parser@2.11.4/node_modules/@formatjs/icu-messageformat-parser/lib/index.js +0 -26
  721. package/dist/node_modules/.pnpm/@formatjs_icu-messageformat-parser@2.11.4/node_modules/@formatjs/icu-messageformat-parser/lib/manipulator.js +0 -1
  722. package/dist/node_modules/.pnpm/@formatjs_icu-messageformat-parser@2.11.4/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js +0 -499
  723. package/dist/node_modules/.pnpm/@formatjs_icu-messageformat-parser@2.11.4/node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js +0 -4
  724. package/dist/node_modules/.pnpm/@formatjs_icu-messageformat-parser@2.11.4/node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js +0 -1159
  725. package/dist/node_modules/.pnpm/@formatjs_icu-messageformat-parser@2.11.4/node_modules/@formatjs/icu-messageformat-parser/lib/types.js +0 -44
  726. package/dist/node_modules/.pnpm/@formatjs_icu-skeleton-parser@1.8.16/node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js +0 -101
  727. package/dist/node_modules/.pnpm/@formatjs_icu-skeleton-parser@1.8.16/node_modules/@formatjs/icu-skeleton-parser/lib/number.js +0 -182
  728. package/dist/node_modules/.pnpm/@formatjs_icu-skeleton-parser@1.8.16/node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js +0 -4
  729. package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/create-intl.js +0 -39
  730. package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/dateTime.js +0 -80
  731. package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/displayName.js +0 -22
  732. package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/error.js +0 -66
  733. package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/list.js +0 -39
  734. package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/message.js +0 -59
  735. package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/number.js +0 -53
  736. package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/plural.js +0 -18
  737. package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/relativeTime.js +0 -22
  738. package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/utils.js +0 -115
  739. package/dist/node_modules/.pnpm/@kurkle_color@0.3.4/node_modules/@kurkle/color/dist/color.esm.js +0 -470
  740. package/dist/node_modules/.pnpm/@lexical_clipboard@0.38.2/node_modules/@lexical/clipboard/LexicalClipboard.prod.js +0 -163
  741. package/dist/node_modules/.pnpm/@lexical_dragon@0.38.2/node_modules/@lexical/dragon/LexicalDragon.prod.js +0 -51
  742. package/dist/node_modules/.pnpm/@lexical_extension@0.38.2/node_modules/@lexical/extension/LexicalExtension.prod.js +0 -796
  743. package/dist/node_modules/.pnpm/@lexical_headless@0.38.2/node_modules/@lexical/headless/LexicalHeadless.prod.js +0 -21
  744. package/dist/node_modules/.pnpm/@lexical_history@0.38.2/node_modules/@lexical/history/LexicalHistory.prod.js +0 -132
  745. package/dist/node_modules/.pnpm/@lexical_html@0.38.2/node_modules/@lexical/html/LexicalHtml.prod.js +0 -88
  746. package/dist/node_modules/.pnpm/@lexical_list@0.38.2/node_modules/@lexical/list/LexicalList.prod.js +0 -737
  747. package/dist/node_modules/.pnpm/@lexical_overflow@0.38.2/node_modules/@lexical/overflow/LexicalOverflow.prod.js +0 -37
  748. package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalCharacterLimitPlugin.prod.js +0 -136
  749. package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalComposer.prod.js +0 -53
  750. package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalComposerContext.prod.js +0 -20
  751. package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalContentEditable.prod.js +0 -85
  752. package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalEditorRefPlugin.prod.js +0 -11
  753. package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalErrorBoundary.prod.js +0 -20
  754. package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalHistoryPlugin.prod.js +0 -17
  755. package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalListPlugin.prod.js +0 -16
  756. package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +0 -20
  757. package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalReactProviderExtension.prod.js +0 -5
  758. package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +0 -96
  759. package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/useLexicalEditable.prod.js +0 -23
  760. package/dist/node_modules/.pnpm/@lexical_rich-text@0.38.2/node_modules/@lexical/rich-text/LexicalRichText.prod.js +0 -418
  761. package/dist/node_modules/.pnpm/@lexical_selection@0.38.2/node_modules/@lexical/selection/LexicalSelection.prod.js +0 -170
  762. package/dist/node_modules/.pnpm/@lexical_text@0.38.2/node_modules/@lexical/text/LexicalText.prod.js +0 -33
  763. package/dist/node_modules/.pnpm/@lexical_utils@0.38.2/node_modules/@lexical/utils/LexicalUtils.prod.js +0 -112
  764. package/dist/node_modules/.pnpm/@rooks_use-localstorage-state@4.11.2_react@18.3.1/node_modules/@rooks/use-localstorage-state/lib/index.esm.js +0 -50
  765. package/dist/node_modules/.pnpm/@rooks_use-previous@4.11.2/node_modules/@rooks/use-previous/lib/index.esm.js +0 -10
  766. package/dist/node_modules/.pnpm/@rooks_use-sessionstorage-state@4.11.2_react@18.3.1/node_modules/@rooks/use-sessionstorage-state/lib/index.esm.js +0 -50
  767. package/dist/node_modules/.pnpm/are-passive-events-supported@1.1.1/node_modules/are-passive-events-supported/dist/are-passive-events-supported.esm.browser.js +0 -11
  768. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/adapters/adapters.js +0 -41
  769. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/adapters/fetch.js +0 -128
  770. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/adapters/xhr.js +0 -59
  771. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/axios.js +0 -30
  772. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/cancel/CancelToken.js +0 -59
  773. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/cancel/CanceledError.js +0 -9
  774. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/cancel/isCancel.js +0 -6
  775. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/Axios.js +0 -131
  776. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/AxiosError.js +0 -34
  777. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/AxiosHeaders.js +0 -171
  778. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/InterceptorManager.js +0 -28
  779. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/buildFullPath.js +0 -9
  780. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/dispatchRequest.js +0 -23
  781. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/mergeConfig.js +0 -67
  782. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/settle.js +0 -8
  783. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/transformData.js +0 -12
  784. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/defaults/index.js +0 -81
  785. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/defaults/transitional.js +0 -9
  786. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/env/data.js +0 -4
  787. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -32
  788. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -77
  789. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/bind.js +0 -8
  790. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/buildURL.js +0 -17
  791. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/combineURLs.js +0 -6
  792. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/composeSignals.js +0 -27
  793. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/cookies.js +0 -26
  794. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/formDataToJSON.js +0 -27
  795. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -6
  796. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/isAxiosError.js +0 -7
  797. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -5
  798. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/parseHeaders.js +0 -28
  799. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/parseProtocol.js +0 -7
  800. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/progressEventReducer.js +0 -30
  801. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/resolveConfig.js +0 -28
  802. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/speedometer.js +0 -16
  803. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/spread.js +0 -8
  804. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/throttle.js +0 -14
  805. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/toFormData.js +0 -67
  806. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -14
  807. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/trackStream.js +0 -51
  808. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/validator.js +0 -47
  809. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -4
  810. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -4
  811. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -5
  812. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/platform/browser/index.js +0 -22
  813. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/platform/common/utils.js +0 -15
  814. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/platform/index.js +0 -9
  815. package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/utils.js +0 -235
  816. package/dist/node_modules/.pnpm/chart.js@4.5.1/node_modules/chart.js/auto/auto.js +0 -5
  817. package/dist/node_modules/.pnpm/chart.js@4.5.1/node_modules/chart.js/dist/chart.js +0 -6301
  818. package/dist/node_modules/.pnpm/chart.js@4.5.1/node_modules/chart.js/dist/chunks/helpers.dataset.js +0 -1381
  819. package/dist/node_modules/.pnpm/chartjs-plugin-datalabels@2.2.0_chart.js@4.5.1/node_modules/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.esm.js +0 -354
  820. package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js +0 -32
  821. package/dist/node_modules/.pnpm/copy-to-clipboard@3.3.3/node_modules/copy-to-clipboard/index.js +0 -43
  822. package/dist/node_modules/.pnpm/dompurify@3.3.3/node_modules/dompurify/dist/purify.es.js +0 -549
  823. package/dist/node_modules/.pnpm/flat@5.0.2/node_modules/flat/index.js +0 -59
  824. package/dist/node_modules/.pnpm/goober@2.1.18_csstype@3.2.3/node_modules/goober/dist/goober.modern.js +0 -75
  825. package/dist/node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +0 -68
  826. package/dist/node_modules/.pnpm/intl-messageformat@10.7.18/node_modules/intl-messageformat/lib/src/core.js +0 -154
  827. package/dist/node_modules/.pnpm/intl-messageformat@10.7.18/node_modules/intl-messageformat/lib/src/error.js +0 -36
  828. package/dist/node_modules/.pnpm/intl-messageformat@10.7.18/node_modules/intl-messageformat/lib/src/formatters.js +0 -107
  829. package/dist/node_modules/.pnpm/lexical@0.38.2/node_modules/lexical/Lexical.prod.js +0 -5093
  830. package/dist/node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist.es2015/index.js +0 -198
  831. package/dist/node_modules/.pnpm/react-chartjs-2@5.3.1_chart.js@4.5.1_react@18.3.1/node_modules/react-chartjs-2/dist/index.js +0 -76
  832. package/dist/node_modules/.pnpm/react-copy-to-clipboard@5.1.1_react@18.3.1/node_modules/react-copy-to-clipboard/lib/Component.js +0 -160
  833. package/dist/node_modules/.pnpm/react-copy-to-clipboard@5.1.1_react@18.3.1/node_modules/react-copy-to-clipboard/lib/index.js +0 -10
  834. package/dist/node_modules/.pnpm/react-error-boundary@6.1.1_react@18.3.1/node_modules/react-error-boundary/dist/react-error-boundary.js +0 -58
  835. package/dist/node_modules/.pnpm/react-hot-toast@2.6.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-hot-toast/dist/index.js +0 -494
  836. package/dist/node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/index.js +0 -13
  837. package/dist/node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/createFormattedComponent.js +0 -35
  838. package/dist/node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/createIntl.js +0 -39
  839. package/dist/node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/injectIntl.js +0 -9
  840. package/dist/node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/message.js +0 -22
  841. package/dist/node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/provider.js +0 -45
  842. package/dist/node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/useIntl.js +0 -10
  843. package/dist/node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/utils.js +0 -33
  844. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +0 -82
  845. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +0 -62
  846. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +0 -10
  847. package/dist/node_modules/.pnpm/react-loading-skeleton@3.5.0_react@18.3.1/node_modules/react-loading-skeleton/dist/index.js +0 -49
  848. package/dist/node_modules/.pnpm/react-modern-drawer@1.4.0_react@18.3.1/node_modules/react-modern-drawer/dist/index.modern.js +0 -84
  849. package/dist/node_modules/.pnpm/react-oauth-popup@1.0.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-oauth-popup/dist/index.js +0 -106
  850. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js +0 -453
  851. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -27
  852. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js +0 -10
  853. package/dist/node_modules/.pnpm/toggle-selection@1.0.6/node_modules/toggle-selection/index.js +0 -26
  854. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +0 -34
  855. package/dist/node_modules/.pnpm/use-debounce@10.1.1_react@18.3.1/node_modules/use-debounce/dist/index.module.js +0 -70
  856. package/dist/node_modules/.pnpm/use-isomorphic-layout-effect@1.2.1_@types_react@19.2.14_react@18.3.1/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js +0 -5
  857. package/dist/node_modules/.pnpm/use-latest@1.3.0_@types_react@19.2.14_react@18.3.1/node_modules/use-latest/dist/use-latest.esm.js +0 -11
  858. package/dist/node_modules/.pnpm/use-onclickoutside@0.4.1_@types_react@19.2.14_react@18.3.1/node_modules/use-onclickoutside/dist/use-onclickoutside.browser.esm.js +0 -26
  859. package/dist/node_modules/.pnpm/webfontloader@1.6.28/node_modules/webfontloader/webfontloader.js +0 -482
@@ -1,297 +1,424 @@
1
- import { __toESM as e } from "../../../_virtual/_rolldown/runtime.js";
2
- import { require_jsx_runtime as t } from "../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
3
- import { Link as n } from "../../action/link/Link.js";
4
- import { Icon as r } from "../../icons/icon/Icon.js";
5
- import { require_classnames as i } from "../../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js";
6
- import { Button as a } from "../../action/button/Button.js";
7
- import { useAuth as ee } from "../../auth/use_auth/useAuth.js";
8
- import { useDataProvider as o } from "../../data/data_provider/useDataProvider.js";
9
- import { useConfig as te } from "../../data/config_provider/useConfig.js";
10
- import { useResponsive as ne } from "../../hooks/use_responsive/useResponsive.js";
11
- import s from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/useIntl.js";
12
- import c from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/message.js";
13
- import { useTranslatedContent as l } from "../../translation/translated_content/useTranslatedContent.js";
14
- import { Tooltip as u } from "../../dialog/tooltip/Tooltip.js";
15
- import { useToast as re } from "../../dialog/toast_provider/useToast.js";
16
- import { useAuthRequired as ie } from "../../hooks/use_auth_required/useAuthRequired.js";
17
- import d from "../../../node_modules/.pnpm/@rooks_use-sessionstorage-state@4.11.2_react@18.3.1/node_modules/@rooks/use-sessionstorage-state/lib/index.esm.js";
18
- import { ProgressBar as ae } from "../../progress/progress_bar/ProgressBar.js";
19
- import f from "./VoteBox.module.js";
20
- import { useEffect as p, useState as m } from "react";
21
- import { useLocation as oe } from "react-router";
22
- //#region src/components/vote/vote_box/VoteBox.jsx
23
- var h = /* @__PURE__ */ e(i()), g = t(), _ = ({ numberVotes: e, votePositions: t, voteableType: i, voteableId: _, redirectUrl: v, displayColumn: y, textAlignLeft: se, showTotal: ce = !0, voteBoxClassName: b, buttonContainerClassName: x, buttonClassName: S, showResultClassName: C, onVote: w, disabled: T = !1, showVotesCommentsNumber: le = !1, commentsCount: ue }) => {
24
- let [E, D] = m(!0), [O, k] = m(void 0), [A, j] = m(!1), [M, de] = m(Number.parseFloat(e.total) || Object.values(e).reduce((e, t) => e + Number.parseFloat(t), 0) || 0), N = l(t[0]?.name, t[0]?.language, "name", t[0]?.translation_entries), P = l(t[1]?.name, t[1]?.language, "name", t[1]?.translation_entries), F = l(t[2]?.name, t[2]?.language, "name", t[2]?.translation_entries), [I, fe, L] = d("storedUserVote", {}), [pe, R, z] = d("userSide", {}), { toast: B } = re() || {}, { isMobile: V } = ne(), [H, U] = m((() => {
25
- let n = {};
26
- return t?.forEach((t) => n[t.id] = {
27
- count: Number.parseFloat(e[t.id]) || 0,
28
- percentage: M === 0 ? 0 : Math.round(100 * ((e[t.id] || 0) / M))
29
- }), n;
30
- })()), W = ie(), me = oe(), G = o(), K = te(), q = s(), { isLoggedIn: J, isLoggingIn: Y } = ee();
31
- p(() => {
32
- Y === !1 && (J ? ge(_) : D(!1));
33
- }, [Y, J]), p(() => {
34
- if (E === !1 && !v) {
35
- let [e, t] = he();
36
- e && (t ? Q(t) : j(!0));
37
- }
38
- }, [E]), p(() => {
39
- w && w(O);
40
- }, [O]);
41
- let he = () => {
42
- if (I && Object.keys(I).length !== 0) return I.groupId === _ && I.voteableType === i ? [!0, I.positionId] : (L(), [!1, !1]);
43
- let e = new URLSearchParams(typeof window < "u" ? window.location.search : me.search);
44
- return [!!e.get("initVote"), Number.parseInt(e.get("positionId")) || !1];
45
- }, ge = (e) => {
46
- D(!0), w && w(O), G.getOneWithToken("votes", `${i.toLowerCase()}/${e}`, {}).then((e) => {
47
- e.data.data.resource ? (k(e.data.data.resource), j(!0), D(!1)) : (D(!1), j(!1));
48
- }).catch((e) => {
49
- D(!1);
50
- });
51
- }, X = (e, t) => t === 0 ? 0 : Math.round(e / t * 100), _e = (e) => {
52
- let t = {
53
- voteable_id: _,
54
- voteable_type: i || "Group",
55
- position_id: e
56
- };
57
- R({
58
- groupId: _,
59
- voteableType: i,
60
- positionId: e
61
- }), O ? (ye(e, O.position_id), A === !1 && $(), e !== O.position_id && G.update("votes", O.id, t).then((e) => {
62
- e.data.success && (k(e.data.data.resource), B(q.formatMessage({
63
- id: "header.vote_confirm_modal",
64
- defaultMessage: "Your vote has been saved !"
65
- }), { type: "success" }));
66
- })) : (ve(e), $(), G.create("votes", t).then((e) => {
67
- e.data.success && (k(e.data.data.resource), B(q.formatMessage({
68
- id: "header.vote_confirm_modal",
69
- defaultMessage: "Your vote has been saved !"
70
- }), { type: "success" }));
71
- }));
72
- }, ve = (e) => {
73
- let n = H[e].count + 1, r = M + 1, i = {};
74
- t.forEach((t) => {
75
- if (e === t.id) i[t.id] = {
76
- count: n,
77
- percentage: X(n, r)
78
- };
79
- else {
80
- let e = H[t.id].count;
81
- i[t.id] = {
82
- count: e,
83
- percentage: X(e, r)
84
- };
85
- }
86
- }), U(i), de(r);
87
- }, ye = (e, t) => {
88
- t !== e && U({
89
- ...H,
90
- [t]: {
91
- count: H[t].count - 1,
92
- percentage: X(H[t].count - 1, M)
93
- },
94
- [e]: {
95
- count: H[e].count + 1,
96
- percentage: X(H[e].count + 1, M)
97
- }
98
- });
99
- }, Z = (e) => v + `?${new URLSearchParams({
100
- initVote: "true",
101
- ...e && { positionId: e }
102
- }).toString()}`, Q = (e) => {
103
- J ? Object.keys(H).includes(e.toString()) && (_e(e), L()) : (Object.keys(H).includes(e.toString()) && fe({
104
- groupId: _,
105
- voteableType: i,
106
- positionId: e
107
- }), W({ loginAction: "vote" }));
108
- }, $ = () => {
109
- A && z(), j(!A);
110
- }, be = (e, t) => {
111
- let n;
112
- t === 0 ? n = N.translatedContent : t === 1 ? n = P.translatedContent : t === 2 && (n = F.translatedContent);
113
- let r = typeof window < "u" && !v;
114
- return /* @__PURE__ */ (0, g.jsx)("div", {
115
- className: (0, h.default)(f.voteAction, { [f.buttonAlignLeft]: f.buttonAlignLeft }),
116
- children: /* @__PURE__ */ (0, g.jsx)(a, {
117
- "data-tid": "action_vote",
118
- type: "button",
119
- title: n,
120
- className: (0, h.default)(f.voteButton, {
121
- [f.textAlignLeft]: se,
122
- [S]: S
123
- }),
124
- onClick: r ? () => Q(e.id) : null,
125
- disabled: T,
126
- "data-testid": "voteButton",
127
- to: r ? null : Z(e.id),
128
- target: r ? null : "_top",
129
- rel: r ? null : "nofollow",
130
- external: r ? null : !0,
131
- children: /* @__PURE__ */ (0, g.jsx)("div", {
132
- "data-tid": "action_vote",
133
- className: (0, h.default)(f.voteButtonThesis, { [f.voteButtonThesisSynthesisMobile]: !y }),
134
- children: n
135
- })
136
- })
137
- }, t);
138
- }, xe = () => {
139
- J || K.actions?.unloggedVoteResults === !0 ? j(!0) : W({ loginAction: "vote" });
140
- };
141
- return /* @__PURE__ */ (0, g.jsx)("div", {
142
- className: (0, h.default)(f.voteBox, { [b]: b }),
143
- children: /* @__PURE__ */ (0, g.jsx)(g.Fragment, { children: A || T ? /* @__PURE__ */ (0, g.jsxs)("div", {
144
- className: f.voteResultsBox,
145
- "data-testid": "voteResultsBox",
146
- children: [/* @__PURE__ */ (0, g.jsx)("div", {
147
- className: f.voteResults,
148
- children: t.map((e, t) => {
149
- let n;
150
- return t === 0 ? n = N.translatedContent : t === 1 ? n = P.translatedContent : t === 2 && (n = F.translatedContent), /* @__PURE__ */ (0, g.jsxs)("div", { children: [/* @__PURE__ */ (0, g.jsxs)("div", {
151
- className: t > 0 ? (0, h.default)(f.voteProgressHeader, f.voteProgressHeaderAgainst) : f.voteProgressHeader,
152
- children: [
153
- n,
154
- " ",
155
- O && O.position_id === e.id ? /* @__PURE__ */ (0, g.jsx)("span", {
156
- title: q.formatMessage({ id: "vote.vote_box.vote_side" }) + n,
157
- className: f.sideIcon,
158
- "aria-hidden": "true",
159
- children: /* @__PURE__ */ (0, g.jsx)(r, {
160
- name: "checkbox",
161
- width: 16,
162
- height: 16
163
- })
164
- }) : null
165
- ]
166
- }), /* @__PURE__ */ (0, g.jsxs)(ae, {
167
- progress: H[e.id].percentage / 100,
168
- goal: 1,
169
- className: f.progress,
170
- innerClassName: f.progressBar,
171
- children: [H[e.id].percentage, "%"]
172
- })] }, t);
173
- })
174
- }), /* @__PURE__ */ (0, g.jsxs)("div", {
175
- className: f.voteBoxFooter,
176
- children: [ce && /* @__PURE__ */ (0, g.jsx)("div", {
177
- className: f.voteResultsNumberVoters,
178
- children: /* @__PURE__ */ (0, g.jsx)(c, {
179
- id: "vote.vote_box.votes",
180
- values: { votesCount: M },
181
- defaultMessage: "{votesCount} votes"
182
- })
183
- }), !T && /* @__PURE__ */ (0, g.jsx)("div", { children: O ? /* @__PURE__ */ (0, g.jsx)("button", {
184
- "data-tid": "action_edit_vote",
185
- className: f.voteActionButton,
186
- type: "button",
187
- onClick: $,
188
- children: /* @__PURE__ */ (0, g.jsx)(c, {
189
- id: "vote.vote_box.update",
190
- defaultMessage: "Modify"
191
- })
192
- }) : !K?.actions?.hideSHowResultButton && /* @__PURE__ */ (0, g.jsx)("button", {
193
- type: "button",
194
- className: f.voteActionButton,
195
- onClick: () => j(!1),
196
- children: /* @__PURE__ */ (0, g.jsx)(c, {
197
- id: "vote.vote_box.back",
198
- defaultMessage: "Back to vote"
199
- })
200
- }) })]
201
- })]
202
- }) : /* @__PURE__ */ (0, g.jsxs)("div", {
203
- className: f.voteBoxActions,
204
- children: [
205
- /* @__PURE__ */ (0, g.jsx)("div", {
206
- className: (0, h.default)(f.voteBoxActionsBody, {
207
- [f.voteBoxActionsBodyColumn]: y,
208
- [x]: x
209
- }),
210
- children: t.map((e, t) => be(e, t))
211
- }),
212
- le && /* @__PURE__ */ (0, g.jsxs)("div", {
213
- className: f.voteCommentCounts,
214
- children: [/* @__PURE__ */ (0, g.jsx)(u, {
215
- position: V ? "right" : "bottom",
216
- text: q.formatMessage({
217
- id: "info.votes_count",
218
- defaultMessage: "Votes"
219
- }),
220
- children: /* @__PURE__ */ (0, g.jsxs)("div", {
221
- className: f.debateNumberItem,
222
- children: [/* @__PURE__ */ (0, g.jsx)(r, {
223
- name: "votebox",
224
- width: 20,
225
- height: 20
226
- }), /* @__PURE__ */ (0, g.jsx)("div", {
227
- className: f.debateNumberLabel,
228
- children: /* @__PURE__ */ (0, g.jsx)(c, {
229
- id: "vote.vote_box.votes",
230
- values: { votesCount: M },
231
- defaultMessage: "{votesCount} votes"
232
- })
233
- })]
234
- })
235
- }), /* @__PURE__ */ (0, g.jsx)(u, {
236
- position: V ? "right" : "bottom",
237
- text: q.formatMessage({
238
- id: "info.arguments_count",
239
- defaultMessage: "Comments"
240
- }),
241
- children: /* @__PURE__ */ (0, g.jsxs)("div", {
242
- className: f.debateNumberItem,
243
- children: [/* @__PURE__ */ (0, g.jsx)(r, {
244
- name: "chat",
245
- width: 20,
246
- height: 20
247
- }), /* @__PURE__ */ (0, g.jsx)("div", {
248
- className: f.debateNumberLabel,
249
- children: /* @__PURE__ */ (0, g.jsx)(c, {
250
- id: "vote.vote_box.comments",
251
- values: { count: ue ?? 0 },
252
- defaultMessage: "{count} comments"
253
- })
254
- })]
255
- })
256
- })]
257
- }),
258
- /* @__PURE__ */ (0, g.jsx)("div", {
259
- className: (0, h.default)(f.voteBoxActions, f.voteBoxShowResultContainer, { [C]: C }),
260
- children: /* @__PURE__ */ (0, g.jsx)("div", {
261
- className: f.voteBoxShowResult,
262
- children: typeof window < "u" && !v ? !K?.actions?.hideSHowResultButton && /* @__PURE__ */ (0, g.jsx)("button", {
263
- type: "button",
264
- onClick: xe,
265
- "data-tid": "show_vote_result",
266
- "data-testid": "show-result",
267
- className: f.showResultButton,
268
- children: /* @__PURE__ */ (0, g.jsx)("span", {
269
- className: (0, h.default)(f.boldShowResult, f.outlined),
270
- children: /* @__PURE__ */ (0, g.jsx)(c, {
271
- id: "vote.vote_box.show_result",
272
- defaultMessage: "Show result"
273
- })
274
- })
275
- }) : /* @__PURE__ */ (0, g.jsx)(n, {
276
- to: Z(null),
277
- rel: "nofollow",
278
- "data-tid": "show_vote_result",
279
- target: "_top",
280
- external: !0,
281
- "data-testid": "show-result",
282
- children: /* @__PURE__ */ (0, g.jsx)("span", {
283
- className: (0, h.default)(f.boldShowResult, f.outlined),
284
- children: /* @__PURE__ */ (0, g.jsx)(c, {
285
- id: "vote.vote_box.show_result",
286
- defaultMessage: "Show result"
287
- })
288
- })
289
- })
290
- })
291
- })
292
- ]
293
- }) })
294
- });
1
+ import { jsx as s, Fragment as Se, jsxs as l } from "react/jsx-runtime";
2
+ import P from "@rooks/use-sessionstorage-state";
3
+ import d from "classnames";
4
+ import { useState as b, useEffect as k } from "react";
5
+ import { useIntl as be, FormattedMessage as m } from "react-intl";
6
+ import { useLocation as _e } from "react-router";
7
+ import o from "./VoteBox.module.scss.js";
8
+ import { useTranslatedContent as T } from "../../translation/translated_content/useTranslatedContent.js";
9
+ import { useToast as we } from "../../dialog/toast_provider/useToast.js";
10
+ import { useResponsive as Ne } from "../../hooks/use_responsive/useResponsive.js";
11
+ import { useAuthRequired as Be } from "../../hooks/use_auth_required/useAuthRequired.js";
12
+ import { useDataProvider as Ce } from "../../data/data_provider/useDataProvider.js";
13
+ import { useConfig as xe } from "../../data/config_provider/useConfig.js";
14
+ import { useAuth as Me } from "../../auth/use_auth/useAuth.js";
15
+ import { Icon as j } from "../../icons/icon/Icon.js";
16
+ import { ProgressBar as Ve } from "../../progress/progress_bar/ProgressBar.js";
17
+ import { Tooltip as ee } from "../../dialog/tooltip/Tooltip.js";
18
+ import { Link as Re } from "../../action/link/Link.js";
19
+ import { Button as Ae } from "../../action/button/Button.js";
20
+ const Qe = ({
21
+ numberVotes: _,
22
+ votePositions: r,
23
+ voteableType: h,
24
+ voteableId: v,
25
+ redirectUrl: w,
26
+ displayColumn: F,
27
+ textAlignLeft: te,
28
+ showTotal: oe = !0,
29
+ voteBoxClassName: O,
30
+ buttonContainerClassName: H,
31
+ buttonClassName: E,
32
+ showResultClassName: U,
33
+ onVote: N,
34
+ disabled: V = !1,
35
+ showVotesCommentsNumber: se = !1,
36
+ commentsCount: ae
37
+ }) => {
38
+ const [I, g] = b(!0), [c, R] = b(void 0), [B, f] = b(!1), [u, ne] = b(
39
+ Number.parseFloat(_.total) || Object.values(_).reduce(
40
+ (e, t) => e + Number.parseFloat(t),
41
+ 0
42
+ ) || 0
43
+ ), $ = T(
44
+ r[0]?.name,
45
+ r[0]?.language,
46
+ "name",
47
+ r[0]?.translation_entries
48
+ ), q = T(
49
+ r[1]?.name,
50
+ r[1]?.language,
51
+ "name",
52
+ r[1]?.translation_entries
53
+ ), Y = T(
54
+ r[2]?.name,
55
+ r[2]?.language,
56
+ "name",
57
+ r[2]?.translation_entries
58
+ ), [p, re, D] = P(
59
+ "storedUserVote",
60
+ {}
61
+ ), [ye, ie, ce] = P("userSide", {}), { toast: G } = we() || {}, { isMobile: W } = Ne(), le = () => {
62
+ const e = {};
63
+ return r?.forEach(
64
+ (t) => e[t.id] = {
65
+ count: Number.parseFloat(_[t.id]) || 0,
66
+ percentage: u === 0 ? 0 : Math.round(
67
+ 100 * ((_[t.id] || 0) / u)
68
+ )
69
+ }
70
+ ), e;
71
+ }, [i, z] = b(le()), J = Be(), de = _e(), A = Ce(), y = xe(), S = be(), { isLoggedIn: C, isLoggingIn: K } = Me();
72
+ k(() => {
73
+ K === !1 && (C ? me(v) : g(!1));
74
+ }, [K, C]), k(() => {
75
+ if (I === !1 && !w) {
76
+ const [e, t] = ue();
77
+ e && (t ? X(t) : f(!0));
78
+ }
79
+ }, [I]), k(() => {
80
+ N && N(c);
81
+ }, [c]);
82
+ const ue = () => {
83
+ if (p && Object.keys(p).length !== 0)
84
+ return p.groupId === v && p.voteableType === h ? [!0, p.positionId] : (D(), [!1, !1]);
85
+ const e = new URLSearchParams(
86
+ typeof window < "u" ? window.location.search : de.search
87
+ ), t = !!e.get("initVote"), a = Number.parseInt(e.get("positionId")) || !1;
88
+ return [t, a];
89
+ }, me = (e) => {
90
+ g(!0), N && N(c), A.getOneWithToken("votes", `${h.toLowerCase()}/${e}`, {}).then((t) => {
91
+ t.data.data.resource ? (R(t.data.data.resource), f(!0), g(!1)) : (g(!1), f(!1));
92
+ }).catch((t) => {
93
+ g(!1);
94
+ });
95
+ }, x = (e, t) => t === 0 ? 0 : Math.round(100 * (e / t)), fe = (e) => {
96
+ const t = {
97
+ voteable_id: v,
98
+ voteable_type: h || "Group",
99
+ position_id: e
100
+ };
101
+ ie({
102
+ groupId: v,
103
+ voteableType: h,
104
+ positionId: e
105
+ }), c ? (ve(e, c.position_id), B === !1 && L(), e !== c.position_id && A.update("votes", c.id, t).then((n) => {
106
+ n.data.success && (R(n.data.data.resource), G(
107
+ S.formatMessage({
108
+ id: "header.vote_confirm_modal",
109
+ defaultMessage: "Your vote has been saved !"
110
+ }),
111
+ { type: "success" }
112
+ ));
113
+ })) : (he(e), L(), A.create("votes", t).then((n) => {
114
+ n.data.success && (R(n.data.data.resource), G(
115
+ S.formatMessage({
116
+ id: "header.vote_confirm_modal",
117
+ defaultMessage: "Your vote has been saved !"
118
+ }),
119
+ { type: "success" }
120
+ ));
121
+ }));
122
+ }, he = (e) => {
123
+ const t = i[e].count + 1, a = u + 1, n = {};
124
+ r.forEach((M) => {
125
+ if (e === M.id)
126
+ n[M.id] = {
127
+ count: t,
128
+ percentage: x(t, a)
129
+ };
130
+ else {
131
+ const Z = i[M.id].count;
132
+ n[M.id] = {
133
+ count: Z,
134
+ percentage: x(Z, a)
135
+ };
136
+ }
137
+ }), z(n), ne(a);
138
+ }, ve = (e, t) => {
139
+ if (t !== e) {
140
+ const a = {
141
+ ...i,
142
+ [t]: {
143
+ count: i[t].count - 1,
144
+ percentage: x(
145
+ i[t].count - 1,
146
+ u
147
+ )
148
+ },
149
+ [e]: {
150
+ count: i[e].count + 1,
151
+ percentage: x(
152
+ i[e].count + 1,
153
+ u
154
+ )
155
+ }
156
+ };
157
+ z(a);
158
+ }
159
+ }, Q = (e) => {
160
+ const t = new URLSearchParams({
161
+ initVote: "true",
162
+ ...e && { positionId: e }
163
+ });
164
+ return w + `?${t.toString()}`;
165
+ }, X = (e) => {
166
+ C ? Object.keys(i).includes(e.toString()) && (fe(e), D()) : (Object.keys(i).includes(e.toString()) && re({
167
+ groupId: v,
168
+ voteableType: h,
169
+ positionId: e
170
+ }), J({ loginAction: "vote" }));
171
+ }, L = () => {
172
+ B && ce(), f(!B);
173
+ }, ge = (e, t) => {
174
+ let a;
175
+ t === 0 ? a = $.translatedContent : t === 1 ? a = q.translatedContent : t === 2 && (a = Y.translatedContent);
176
+ const n = typeof window < "u" && !w;
177
+ return /* @__PURE__ */ s(
178
+ "div",
179
+ {
180
+ className: d(o.voteAction, {
181
+ [o.buttonAlignLeft]: o.buttonAlignLeft
182
+ }),
183
+ children: /* @__PURE__ */ s(
184
+ Ae,
185
+ {
186
+ "data-tid": "action_vote",
187
+ type: "button",
188
+ title: a,
189
+ className: d(o.voteButton, {
190
+ [o.textAlignLeft]: te,
191
+ [E]: E
192
+ }),
193
+ onClick: n ? () => X(e.id) : null,
194
+ disabled: V,
195
+ "data-testid": "voteButton",
196
+ to: n ? null : Q(e.id),
197
+ target: n ? null : "_top",
198
+ rel: n ? null : "nofollow",
199
+ external: n ? null : !0,
200
+ children: /* @__PURE__ */ s(
201
+ "div",
202
+ {
203
+ "data-tid": "action_vote",
204
+ className: d(o.voteButtonThesis, {
205
+ [o.voteButtonThesisSynthesisMobile]: !F
206
+ }),
207
+ children: a
208
+ }
209
+ )
210
+ }
211
+ )
212
+ },
213
+ t
214
+ );
215
+ }, pe = () => {
216
+ C || y.actions?.unloggedVoteResults === !0 ? f(!0) : J({ loginAction: "vote" });
217
+ };
218
+ return /* @__PURE__ */ s(
219
+ "div",
220
+ {
221
+ className: d(o.voteBox, { [O]: O }),
222
+ children: /* @__PURE__ */ s(Se, { children: B || V ? /* @__PURE__ */ l("div", { className: o.voteResultsBox, "data-testid": "voteResultsBox", children: [
223
+ /* @__PURE__ */ s("div", { className: o.voteResults, children: r.map((e, t) => {
224
+ let a;
225
+ return t === 0 ? a = $.translatedContent : t === 1 ? a = q.translatedContent : t === 2 && (a = Y.translatedContent), /* @__PURE__ */ l("div", { children: [
226
+ /* @__PURE__ */ l(
227
+ "div",
228
+ {
229
+ className: t > 0 ? d(
230
+ o.voteProgressHeader,
231
+ o.voteProgressHeaderAgainst
232
+ ) : o.voteProgressHeader,
233
+ children: [
234
+ a,
235
+ " ",
236
+ c && c.position_id === e.id ? /* @__PURE__ */ s(
237
+ "span",
238
+ {
239
+ title: S.formatMessage({
240
+ id: "vote.vote_box.vote_side"
241
+ }) + a,
242
+ className: o.sideIcon,
243
+ "aria-hidden": "true",
244
+ children: /* @__PURE__ */ s(j, { name: "checkbox", width: 16, height: 16 })
245
+ }
246
+ ) : null
247
+ ]
248
+ }
249
+ ),
250
+ /* @__PURE__ */ l(
251
+ Ve,
252
+ {
253
+ progress: i[e.id].percentage / 100,
254
+ goal: 1,
255
+ className: o.progress,
256
+ innerClassName: o.progressBar,
257
+ children: [
258
+ i[e.id].percentage,
259
+ "%"
260
+ ]
261
+ }
262
+ )
263
+ ] }, t);
264
+ }) }),
265
+ /* @__PURE__ */ l("div", { className: o.voteBoxFooter, children: [
266
+ oe && /* @__PURE__ */ s("div", { className: o.voteResultsNumberVoters, children: /* @__PURE__ */ s(
267
+ m,
268
+ {
269
+ id: "vote.vote_box.votes",
270
+ values: { votesCount: u },
271
+ defaultMessage: "{votesCount} votes"
272
+ }
273
+ ) }),
274
+ !V && /* @__PURE__ */ s("div", { children: c ? /* @__PURE__ */ s(
275
+ "button",
276
+ {
277
+ "data-tid": "action_edit_vote",
278
+ className: o.voteActionButton,
279
+ type: "button",
280
+ onClick: L,
281
+ children: /* @__PURE__ */ s(
282
+ m,
283
+ {
284
+ id: "vote.vote_box.update",
285
+ defaultMessage: "Modify"
286
+ }
287
+ )
288
+ }
289
+ ) : !y?.actions?.hideSHowResultButton && /* @__PURE__ */ s(
290
+ "button",
291
+ {
292
+ type: "button",
293
+ className: o.voteActionButton,
294
+ onClick: () => f(!1),
295
+ children: /* @__PURE__ */ s(
296
+ m,
297
+ {
298
+ id: "vote.vote_box.back",
299
+ defaultMessage: "Back to vote"
300
+ }
301
+ )
302
+ }
303
+ ) })
304
+ ] })
305
+ ] }) : /* @__PURE__ */ l("div", { className: o.voteBoxActions, children: [
306
+ /* @__PURE__ */ s(
307
+ "div",
308
+ {
309
+ className: d(o.voteBoxActionsBody, {
310
+ [o.voteBoxActionsBodyColumn]: F,
311
+ [H]: H
312
+ }),
313
+ children: r.map(
314
+ (e, t) => ge(e, t)
315
+ )
316
+ }
317
+ ),
318
+ se && /* @__PURE__ */ l("div", { className: o.voteCommentCounts, children: [
319
+ /* @__PURE__ */ s(
320
+ ee,
321
+ {
322
+ position: W ? "right" : "bottom",
323
+ text: S.formatMessage({
324
+ id: "info.votes_count",
325
+ defaultMessage: "Votes"
326
+ }),
327
+ children: /* @__PURE__ */ l("div", { className: o.debateNumberItem, children: [
328
+ /* @__PURE__ */ s(j, { name: "votebox", width: 20, height: 20 }),
329
+ /* @__PURE__ */ s("div", { className: o.debateNumberLabel, children: /* @__PURE__ */ s(
330
+ m,
331
+ {
332
+ id: "vote.vote_box.votes",
333
+ values: { votesCount: u },
334
+ defaultMessage: "{votesCount} votes"
335
+ }
336
+ ) })
337
+ ] })
338
+ }
339
+ ),
340
+ /* @__PURE__ */ s(
341
+ ee,
342
+ {
343
+ position: W ? "right" : "bottom",
344
+ text: S.formatMessage({
345
+ id: "info.arguments_count",
346
+ defaultMessage: "Comments"
347
+ }),
348
+ children: /* @__PURE__ */ l("div", { className: o.debateNumberItem, children: [
349
+ /* @__PURE__ */ s(j, { name: "chat", width: 20, height: 20 }),
350
+ /* @__PURE__ */ s("div", { className: o.debateNumberLabel, children: /* @__PURE__ */ s(
351
+ m,
352
+ {
353
+ id: "vote.vote_box.comments",
354
+ values: { count: ae ?? 0 },
355
+ defaultMessage: "{count} comments"
356
+ }
357
+ ) })
358
+ ] })
359
+ }
360
+ )
361
+ ] }),
362
+ /* @__PURE__ */ s(
363
+ "div",
364
+ {
365
+ className: d(
366
+ o.voteBoxActions,
367
+ o.voteBoxShowResultContainer,
368
+ { [U]: U }
369
+ ),
370
+ children: /* @__PURE__ */ s("div", { className: o.voteBoxShowResult, children: typeof window < "u" && !w ? !y?.actions?.hideSHowResultButton && /* @__PURE__ */ s(
371
+ "button",
372
+ {
373
+ type: "button",
374
+ onClick: pe,
375
+ "data-tid": "show_vote_result",
376
+ "data-testid": "show-result",
377
+ className: o.showResultButton,
378
+ children: /* @__PURE__ */ s(
379
+ "span",
380
+ {
381
+ className: d(o.boldShowResult, o.outlined),
382
+ children: /* @__PURE__ */ s(
383
+ m,
384
+ {
385
+ id: "vote.vote_box.show_result",
386
+ defaultMessage: "Show result"
387
+ }
388
+ )
389
+ }
390
+ )
391
+ }
392
+ ) : /* @__PURE__ */ s(
393
+ Re,
394
+ {
395
+ to: Q(null),
396
+ rel: "nofollow",
397
+ "data-tid": "show_vote_result",
398
+ target: "_top",
399
+ external: !0,
400
+ "data-testid": "show-result",
401
+ children: /* @__PURE__ */ s(
402
+ "span",
403
+ {
404
+ className: d(o.boldShowResult, o.outlined),
405
+ children: /* @__PURE__ */ s(
406
+ m,
407
+ {
408
+ id: "vote.vote_box.show_result",
409
+ defaultMessage: "Show result"
410
+ }
411
+ )
412
+ }
413
+ )
414
+ }
415
+ ) })
416
+ }
417
+ )
418
+ ] }) })
419
+ }
420
+ );
421
+ };
422
+ export {
423
+ Qe as VoteBox
295
424
  };
296
- //#endregion
297
- export { _ as VoteBox };