@logora/debate 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/_virtual/_rolldown/runtime.js +6 -18
- package/dist/assets/debate-89_S7oMP.css +2 -0
- package/dist/components/action/back_link/BackLink.js +15 -16
- package/dist/components/action/button/Button.js +21 -22
- package/dist/components/action/icon_text_link/IconTextLink.js +26 -27
- package/dist/components/action/link/Link.js +7 -7
- package/dist/components/ad/ad_unit/AdUnit.js +17 -17
- package/dist/components/ad/with_ad/WithAd.js +10 -10
- package/dist/components/argument/argument/Argument.js +123 -124
- package/dist/components/argument/argument/ReplyFooter.js +22 -23
- package/dist/components/argument/top_arguments/TopArguments.js +43 -43
- package/dist/components/auth/auth_modal/AuthModal.js +55 -55
- package/dist/components/auth/facebook_login_button/FacebookIcon.js +5 -5
- package/dist/components/auth/facebook_login_button/FacebookLoginButton.js +14 -14
- package/dist/components/auth/google_login_button/GoogleIcon.js +7 -7
- package/dist/components/auth/google_login_button/GoogleLoginButton.js +15 -15
- package/dist/components/auth/login_form/LoginForm.js +37 -38
- package/dist/components/auth/oauth2_button/OAuth2Button.js +18 -19
- package/dist/components/auth/signup_form/SignupForm.js +68 -69
- package/dist/components/auth/social_auth_form/SocialAuthForm.js +109 -110
- package/dist/components/auth/sso_form/SSOForm.js +68 -70
- package/dist/components/auth/use_auth/AuthProvider.js +11 -11
- package/dist/components/chart/line_chart/LineChart.js +53 -54
- package/dist/components/chart/pie_chart/PieChart.js +20 -20
- package/dist/components/consultation/consultation_box/ConsultationBox.js +70 -72
- package/dist/components/data/axios_client/httpClient.js +1 -1
- package/dist/components/data/config_provider/ConfigProvider.js +5 -5
- package/dist/components/data/config_provider/withConfig.js +5 -5
- package/dist/components/debate/debate_box/DebateBox.js +95 -97
- package/dist/components/dialog/announcement_dialog/AnnouncementDialog.js +14 -15
- package/dist/components/dialog/confirm_modal/ConfirmModal.js +26 -27
- package/dist/components/dialog/countdown/Countdown.js +12 -12
- package/dist/components/dialog/dialog_box/DialogBox.js +33 -34
- package/dist/components/dialog/drawer/Drawer.js +85 -85
- package/dist/components/dialog/dropdown/Dropdown.js +21 -22
- package/dist/components/dialog/modal/Modal.js +37 -38
- package/dist/components/dialog/modal/ModalProvider.js +14 -14
- package/dist/components/dialog/toast/Toast.js +26 -27
- package/dist/components/dialog/toast_provider/ToastProvider.js +18 -18
- package/dist/components/dialog/tooltip/Tooltip.js +23 -24
- package/dist/components/embed/embed_header/EmbedHeader.js +38 -39
- package/dist/components/error/standard_error_boundary/StandardErrorBoundary.js +7 -7
- package/dist/components/follow/follow_button/FollowButton.js +25 -26
- package/dist/components/forms/form/form.js +9 -10
- package/dist/components/forms/use_form_validation/useFormValidation.js +3 -3
- package/dist/components/gamification/badge_box/BadgeBox.js +50 -52
- package/dist/components/gamification/point_box/PointBox.js +12 -12
- package/dist/components/hooks/use_auth_required/useAuthRequired.js +10 -10
- package/dist/components/hooks/use_font_loader/useFontLoader.js +5 -5
- package/dist/components/hooks/use_relative_time/useRelativeTime.js +1 -1
- package/dist/components/hooks/use_responsive/ResponsiveProvider.js +17 -17
- package/dist/components/icons/bild_icons/Alarm.js +15 -0
- package/dist/components/icons/bild_icons/Announcement.js +20 -0
- package/dist/components/icons/bild_icons/Arrow.js +11 -0
- package/dist/components/icons/bild_icons/Blockquote.js +11 -0
- package/dist/components/icons/bild_icons/Bold.js +11 -0
- package/dist/components/icons/bild_icons/Camera.js +11 -0
- package/dist/components/icons/bild_icons/Chat.js +44 -0
- package/dist/components/icons/bild_icons/Check.js +12 -0
- package/dist/components/icons/bild_icons/CheckCircle.js +20 -0
- package/dist/components/icons/bild_icons/Checkbox.js +11 -0
- package/dist/components/icons/bild_icons/Clap.js +21 -0
- package/dist/components/icons/bild_icons/Clock.js +11 -0
- package/dist/components/icons/bild_icons/Close.js +11 -0
- package/dist/components/icons/bild_icons/Code.js +32 -0
- package/dist/components/icons/bild_icons/Community.js +11 -0
- package/dist/components/icons/bild_icons/Crown.js +12 -0
- package/dist/components/icons/bild_icons/Document.js +11 -0
- package/dist/components/icons/bild_icons/Downvote.js +11 -0
- package/dist/components/icons/bild_icons/Ellipsis.js +12 -0
- package/dist/components/icons/bild_icons/ExpertBadge.js +33 -0
- package/dist/components/icons/bild_icons/Facebook.js +11 -0
- package/dist/components/icons/bild_icons/Flag.js +11 -0
- package/dist/components/icons/bild_icons/Home.js +11 -0
- package/dist/components/icons/bild_icons/Italic.js +11 -0
- package/dist/components/icons/bild_icons/LightArrow.js +12 -0
- package/dist/components/icons/bild_icons/Link.js +11 -0
- package/dist/components/icons/bild_icons/Login.js +19 -0
- package/dist/components/icons/bild_icons/Logora.js +25 -0
- package/dist/components/icons/bild_icons/Mail.js +11 -0
- package/dist/components/icons/bild_icons/MinusCircle.js +24 -0
- package/dist/components/icons/bild_icons/MobileClose.js +19 -0
- package/dist/components/icons/bild_icons/MobileMenu.js +29 -0
- package/dist/components/icons/bild_icons/Next.js +22 -0
- package/dist/components/icons/bild_icons/OpenBlank.js +15 -0
- package/dist/components/icons/bild_icons/OrderedList.js +11 -0
- package/dist/components/icons/bild_icons/PauseCircle.js +34 -0
- package/dist/components/icons/bild_icons/Point.js +21 -0
- package/dist/components/icons/bild_icons/Question.js +18 -0
- package/dist/components/icons/bild_icons/Refresh.js +11 -0
- package/dist/components/icons/bild_icons/Reply.js +11 -0
- package/dist/components/icons/bild_icons/Search.js +11 -0
- package/dist/components/icons/bild_icons/Send.js +11 -0
- package/dist/components/icons/bild_icons/Share.js +12 -0
- package/dist/components/icons/bild_icons/SmallArrow.js +11 -0
- package/dist/components/icons/bild_icons/Source.js +11 -0
- package/dist/components/icons/bild_icons/Suggestion.js +19 -0
- package/dist/components/icons/bild_icons/Twitter.js +29 -0
- package/dist/components/icons/bild_icons/Underline.js +11 -0
- package/dist/components/icons/bild_icons/Upvote.js +11 -0
- package/dist/components/icons/bild_icons/User.js +11 -0
- package/dist/components/icons/bild_icons/Versus.js +14 -0
- package/dist/components/icons/bild_icons/Votebox.js +12 -0
- package/dist/components/icons/bild_icons/index.js +110 -0
- package/dist/components/icons/hero_icons/Alarm.js +18 -0
- package/dist/components/icons/hero_icons/Announcement.js +18 -0
- package/dist/components/icons/hero_icons/Arrow.js +18 -0
- package/dist/components/icons/hero_icons/Blockquote.js +27 -0
- package/dist/components/icons/hero_icons/Bold.js +17 -0
- package/dist/components/icons/hero_icons/Camera.js +22 -0
- package/dist/components/icons/hero_icons/Chat.js +18 -0
- package/dist/components/icons/hero_icons/Check.js +18 -0
- package/dist/components/icons/hero_icons/CheckCircle.js +20 -0
- package/dist/components/icons/hero_icons/Checkbox.js +18 -0
- package/dist/components/icons/hero_icons/Clap.js +18 -0
- package/dist/components/icons/hero_icons/Clock.js +18 -0
- package/dist/components/icons/hero_icons/Close.js +18 -0
- package/dist/components/icons/hero_icons/Code.js +18 -0
- package/dist/components/icons/hero_icons/Community.js +18 -0
- package/dist/components/icons/hero_icons/Crown.js +18 -0
- package/dist/components/icons/hero_icons/Downvote.js +18 -0
- package/dist/components/icons/hero_icons/Ellipsis.js +18 -0
- package/dist/components/icons/hero_icons/ExpertBadge.js +18 -0
- package/dist/components/icons/hero_icons/Facebook.js +11 -0
- package/dist/components/icons/hero_icons/Flag.js +11 -0
- package/dist/components/icons/hero_icons/Home.js +18 -0
- package/dist/components/icons/hero_icons/Italic.js +17 -0
- package/dist/components/icons/hero_icons/LightArrow.js +12 -0
- package/dist/components/icons/hero_icons/Link.js +18 -0
- package/dist/components/icons/hero_icons/Login.js +19 -0
- package/dist/components/icons/hero_icons/Logora.js +25 -0
- package/dist/components/icons/hero_icons/Mail.js +18 -0
- package/dist/components/icons/hero_icons/MinusCircle.js +24 -0
- package/dist/components/icons/hero_icons/MobileClose.js +18 -0
- package/dist/components/icons/hero_icons/MobileMenu.js +18 -0
- package/dist/components/icons/hero_icons/Next.js +18 -0
- package/dist/components/icons/hero_icons/OpenBlank.js +18 -0
- package/dist/components/icons/hero_icons/OrderedList.js +47 -0
- package/dist/components/icons/hero_icons/PauseCircle.js +34 -0
- package/dist/components/icons/hero_icons/Point.js +21 -0
- package/dist/components/icons/hero_icons/Question.js +18 -0
- package/dist/components/icons/hero_icons/Refresh.js +18 -0
- package/dist/components/icons/hero_icons/Reply.js +18 -0
- package/dist/components/icons/hero_icons/Search.js +18 -0
- package/dist/components/icons/hero_icons/Send.js +18 -0
- package/dist/components/icons/hero_icons/Share.js +18 -0
- package/dist/components/icons/hero_icons/SmallArrow.js +18 -0
- package/dist/components/icons/hero_icons/Source.js +18 -0
- package/dist/components/icons/hero_icons/Suggestion.js +18 -0
- package/dist/components/icons/hero_icons/Twitter.js +29 -0
- package/dist/components/icons/hero_icons/Underline.js +27 -0
- package/dist/components/icons/hero_icons/Upvote.js +18 -0
- package/dist/components/icons/hero_icons/User.js +18 -0
- package/dist/components/icons/hero_icons/Versus.js +18 -0
- package/dist/components/icons/hero_icons/Votebox.js +18 -0
- package/dist/components/icons/hero_icons/index.js +108 -0
- package/dist/components/icons/icon/Icon.js +9 -9
- package/dist/components/icons/icon_provider/IconProvider.js +5 -5
- package/dist/components/icons/krone_icons/Alarm.js +28 -0
- package/dist/components/icons/krone_icons/Announcement.js +16 -0
- package/dist/components/icons/krone_icons/Arrow.js +11 -0
- package/dist/components/icons/krone_icons/Blockquote.js +11 -0
- package/dist/components/icons/krone_icons/Bold.js +11 -0
- package/dist/components/icons/krone_icons/Camera.js +11 -0
- package/dist/components/icons/krone_icons/Chat.js +30 -0
- package/dist/components/icons/krone_icons/Check.js +11 -0
- package/dist/components/icons/krone_icons/CheckBox.js +5 -5
- package/dist/components/icons/krone_icons/CheckCircle.js +20 -0
- package/dist/components/icons/krone_icons/Clap.js +30 -0
- package/dist/components/icons/krone_icons/Clock.js +11 -0
- package/dist/components/icons/krone_icons/Close.js +11 -0
- package/dist/components/icons/krone_icons/Code.js +32 -0
- package/dist/components/icons/krone_icons/Community.js +11 -0
- package/dist/components/icons/krone_icons/Crown.js +11 -0
- package/dist/components/icons/krone_icons/Document.js +11 -0
- package/dist/components/icons/krone_icons/Downvote.js +11 -0
- package/dist/components/icons/krone_icons/Ellipsis.js +18 -0
- package/dist/components/icons/krone_icons/ExpertBadge.js +30 -0
- package/dist/components/icons/krone_icons/Facebook.js +11 -0
- package/dist/components/icons/krone_icons/Flag.js +11 -0
- package/dist/components/icons/krone_icons/Home.js +30 -0
- package/dist/components/icons/krone_icons/Italic.js +11 -0
- package/dist/components/icons/krone_icons/LightArrow.js +11 -0
- package/dist/components/icons/krone_icons/Link.js +11 -0
- package/dist/components/icons/krone_icons/Login.js +18 -0
- package/dist/components/icons/krone_icons/Logora.js +25 -0
- package/dist/components/icons/krone_icons/Mail.js +11 -0
- package/dist/components/icons/krone_icons/MinusCircle.js +24 -0
- package/dist/components/icons/krone_icons/MobileClose.js +18 -0
- package/dist/components/icons/krone_icons/MobileMenu.js +29 -0
- package/dist/components/icons/krone_icons/Next.js +22 -0
- package/dist/components/icons/krone_icons/OpenBlank.js +15 -0
- package/dist/components/icons/krone_icons/OrderedList.js +11 -0
- package/dist/components/icons/krone_icons/PauseCircle.js +33 -0
- package/dist/components/icons/krone_icons/Point.js +21 -0
- package/dist/components/icons/krone_icons/Question.js +30 -0
- package/dist/components/icons/krone_icons/Refresh.js +11 -0
- package/dist/components/icons/krone_icons/Reply.js +18 -0
- package/dist/components/icons/krone_icons/Search.js +11 -0
- package/dist/components/icons/krone_icons/Send.js +26 -0
- package/dist/components/icons/krone_icons/Share.js +14 -0
- package/dist/components/icons/krone_icons/SmallArrow.js +11 -0
- package/dist/components/icons/krone_icons/Source.js +11 -0
- package/dist/components/icons/krone_icons/Suggestion.js +30 -0
- package/dist/components/icons/krone_icons/Twitter.js +29 -0
- package/dist/components/icons/krone_icons/Underline.js +11 -0
- package/dist/components/icons/krone_icons/Upvote.js +30 -0
- package/dist/components/icons/krone_icons/User.js +33 -0
- package/dist/components/icons/krone_icons/Versus.js +11 -0
- package/dist/components/icons/krone_icons/Votebox.js +30 -0
- package/dist/components/icons/krone_icons/index.js +110 -0
- package/dist/components/icons/regular_icons/Alarm.js +15 -0
- package/dist/components/icons/regular_icons/Announcement.js +20 -0
- package/dist/components/icons/regular_icons/Arrow.js +11 -0
- package/dist/components/icons/regular_icons/Blockquote.js +11 -0
- package/dist/components/icons/regular_icons/Bold.js +11 -0
- package/dist/components/icons/regular_icons/Camera.js +11 -0
- package/dist/components/icons/regular_icons/Chat.js +16 -0
- package/dist/components/icons/regular_icons/Check.js +11 -0
- package/dist/components/icons/regular_icons/CheckCircle.js +20 -0
- package/dist/components/icons/regular_icons/Checkbox.js +11 -0
- package/dist/components/icons/regular_icons/Clap.js +15 -0
- package/dist/components/icons/regular_icons/Clock.js +11 -0
- package/dist/components/icons/regular_icons/Close.js +11 -0
- package/dist/components/icons/regular_icons/Code.js +32 -0
- package/dist/components/icons/regular_icons/Community.js +11 -0
- package/dist/components/icons/regular_icons/Crown.js +11 -0
- package/dist/components/icons/regular_icons/Document.js +11 -0
- package/dist/components/icons/regular_icons/Downvote.js +11 -0
- package/dist/components/icons/regular_icons/Ellipsis.js +11 -0
- package/dist/components/icons/regular_icons/ExpertBadge.js +32 -0
- package/dist/components/icons/regular_icons/Facebook.js +11 -0
- package/dist/components/icons/regular_icons/Flag.js +11 -0
- package/dist/components/icons/regular_icons/Home.js +11 -0
- package/dist/components/icons/regular_icons/Italic.js +11 -0
- package/dist/components/icons/regular_icons/LightArrow.js +11 -0
- package/dist/components/icons/regular_icons/Link.js +11 -0
- package/dist/components/icons/regular_icons/Login.js +18 -0
- package/dist/components/icons/regular_icons/Logora.js +25 -0
- package/dist/components/icons/regular_icons/Mail.js +11 -0
- package/dist/components/icons/regular_icons/MinusCircle.js +24 -0
- package/dist/components/icons/regular_icons/MobileClose.js +18 -0
- package/dist/components/icons/regular_icons/MobileMenu.js +29 -0
- package/dist/components/icons/regular_icons/Next.js +22 -0
- package/dist/components/icons/regular_icons/OpenBlank.js +15 -0
- package/dist/components/icons/regular_icons/OrderedList.js +11 -0
- package/dist/components/icons/regular_icons/PauseCircle.js +33 -0
- package/dist/components/icons/regular_icons/Point.js +21 -0
- package/dist/components/icons/regular_icons/Question.js +18 -0
- package/dist/components/icons/regular_icons/Refresh.js +11 -0
- package/dist/components/icons/regular_icons/Reply.js +11 -0
- package/dist/components/icons/regular_icons/Search.js +11 -0
- package/dist/components/icons/regular_icons/Send.js +11 -0
- package/dist/components/icons/regular_icons/Share.js +12 -0
- package/dist/components/icons/regular_icons/SmallArrow.js +11 -0
- package/dist/components/icons/regular_icons/Source.js +11 -0
- package/dist/components/icons/regular_icons/Suggestion.js +19 -0
- package/dist/components/icons/regular_icons/Twitter.js +29 -0
- package/dist/components/icons/regular_icons/Underline.js +11 -0
- package/dist/components/icons/regular_icons/Upvote.js +11 -0
- package/dist/components/icons/regular_icons/User.js +11 -0
- package/dist/components/icons/regular_icons/Versus.js +11 -0
- package/dist/components/icons/regular_icons/Votebox.js +12 -0
- package/dist/components/icons/regular_icons/index.js +110 -0
- package/dist/components/icons/spiegel_icons/Alarm.js +15 -0
- package/dist/components/icons/spiegel_icons/Announcement.js +20 -0
- package/dist/components/icons/spiegel_icons/Arrow.js +11 -0
- package/dist/components/icons/spiegel_icons/Blockquote.js +26 -0
- package/dist/components/icons/spiegel_icons/Bold.js +16 -0
- package/dist/components/icons/spiegel_icons/Camera.js +11 -0
- package/dist/components/icons/spiegel_icons/Chat.js +12 -0
- package/dist/components/icons/spiegel_icons/Check.js +11 -0
- package/dist/components/icons/spiegel_icons/CheckCircle.js +20 -0
- package/dist/components/icons/spiegel_icons/Checkbox.js +26 -0
- package/dist/components/icons/spiegel_icons/Clap.js +26 -0
- package/dist/components/icons/spiegel_icons/Clock.js +26 -0
- package/dist/components/icons/spiegel_icons/Close.js +15 -0
- package/dist/components/icons/spiegel_icons/Code.js +32 -0
- package/dist/components/icons/spiegel_icons/Community.js +11 -0
- package/dist/components/icons/spiegel_icons/Crown.js +12 -0
- package/dist/components/icons/spiegel_icons/Downvote.js +11 -0
- package/dist/components/icons/spiegel_icons/Ellipsis.js +12 -0
- package/dist/components/icons/spiegel_icons/ExpertBadge.js +28 -0
- package/dist/components/icons/spiegel_icons/Facebook.js +16 -0
- package/dist/components/icons/spiegel_icons/Flag.js +20 -0
- package/dist/components/icons/spiegel_icons/Home.js +11 -0
- package/dist/components/icons/spiegel_icons/Italic.js +16 -0
- package/dist/components/icons/spiegel_icons/LightArrow.js +12 -0
- package/dist/components/icons/spiegel_icons/Link.js +26 -0
- package/dist/components/icons/spiegel_icons/Login.js +19 -0
- package/dist/components/icons/spiegel_icons/Logora.js +25 -0
- package/dist/components/icons/spiegel_icons/Mail.js +16 -0
- package/dist/components/icons/spiegel_icons/MinusCircle.js +20 -0
- package/dist/components/icons/spiegel_icons/MobileClose.js +19 -0
- package/dist/components/icons/spiegel_icons/MobileMenu.js +29 -0
- package/dist/components/icons/spiegel_icons/Next.js +22 -0
- package/dist/components/icons/spiegel_icons/OpenBlank.js +15 -0
- package/dist/components/icons/spiegel_icons/OrderedList.js +29 -0
- package/dist/components/icons/spiegel_icons/PauseCircle.js +20 -0
- package/dist/components/icons/spiegel_icons/Point.js +21 -0
- package/dist/components/icons/spiegel_icons/Question.js +30 -0
- package/dist/components/icons/spiegel_icons/Refresh.js +11 -0
- package/dist/components/icons/spiegel_icons/Reply.js +12 -0
- package/dist/components/icons/spiegel_icons/Search.js +11 -0
- package/dist/components/icons/spiegel_icons/Send.js +11 -0
- package/dist/components/icons/spiegel_icons/Share.js +26 -0
- package/dist/components/icons/spiegel_icons/SmallArrow.js +12 -0
- package/dist/components/icons/spiegel_icons/Source.js +11 -0
- package/dist/components/icons/spiegel_icons/Suggestion.js +16 -0
- package/dist/components/icons/spiegel_icons/Twitter.js +29 -0
- package/dist/components/icons/spiegel_icons/Underline.js +26 -0
- package/dist/components/icons/spiegel_icons/Upvote.js +11 -0
- package/dist/components/icons/spiegel_icons/User.js +11 -0
- package/dist/components/icons/spiegel_icons/Versus.js +14 -0
- package/dist/components/icons/spiegel_icons/Votebox.js +26 -0
- package/dist/components/icons/spiegel_icons/index.js +108 -0
- package/dist/components/input/argument_input/ArgumentInput.js +167 -169
- package/dist/components/input/checkbox/hidden/hidden-checkbox.js +9 -11
- package/dist/components/input/checkbox/indicator/checkbox-indicator.js +11 -12
- package/dist/components/input/checkbox/label/checkbox-label.js +17 -18
- package/dist/components/input/input_provider/InputProvider.js +7 -7
- package/dist/components/input/search_input/SearchInput.js +25 -25
- package/dist/components/input/select/Select.js +38 -39
- package/dist/components/input/text_editor/TextEditor.js +107 -108
- package/dist/components/input/text_editor/lexicalToHtml.js +10 -10
- package/dist/components/input/text_editor/plugins/AutoSavePlugin.js +12 -12
- package/dist/components/input/text_editor/plugins/FocusPlugin.js +4 -4
- package/dist/components/input/text_editor/plugins/MaxLengthPlugin.js +14 -14
- package/dist/components/input/text_editor/plugins/ResetPlugin.js +9 -9
- package/dist/components/input/text_editor/plugins/SetContentPlugin.js +8 -8
- package/dist/components/input/text_editor/plugins/SetRichContentPlugin.js +4 -4
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +84 -85
- package/dist/components/input/text_input/TextInput.js +28 -29
- package/dist/components/input/text_input/color-accent.js +8 -9
- package/dist/components/input/text_input/message.js +9 -11
- package/dist/components/input/toggle/Toggle.js +19 -21
- package/dist/components/input/toggle_position/TogglePosition.js +33 -34
- package/dist/components/intl/intl_provider/IntlProvider.js +28 -28
- package/dist/components/list/list_provider/ListProvider.js +7 -7
- package/dist/components/list/paginated_list/PaginatedList.js +133 -134
- package/dist/components/list/paginated_list/VotePaginatedList.js +13 -13
- package/dist/components/list/paginated_list/action_bar/ActionBar.js +53 -54
- package/dist/components/list/pagination/Pagination.js +17 -17
- package/dist/components/modal/side_modal/SideModal.js +36 -36
- package/dist/components/navbar/navbar_button/NavbarButton.js +16 -17
- package/dist/components/navbar/navbar_modal/NavbarModal.js +85 -86
- package/dist/components/notification/notification_item/NotificationItem.js +31 -32
- package/dist/components/notification/notification_menu/NotificationMenu.js +27 -27
- package/dist/components/progress/loader/Loader.js +7 -7
- package/dist/components/progress/progress_bar/ProgressBar.js +37 -38
- package/dist/components/proposal/proposal_box/ProposalBox.js +72 -73
- package/dist/components/report/report_box/ReportBox.js +59 -60
- package/dist/components/section/section_box/SectionBox.js +27 -28
- package/dist/components/share/share_box/ShareBox.js +53 -53
- package/dist/components/share/share_button/ShareButton.js +43 -44
- package/dist/components/share/share_modal/ShareModal.js +12 -12
- package/dist/components/skeleton/box_skeleton/BoxSkeleton.js +22 -22
- package/dist/components/skeleton/user_content_skeleton/UserContentSkeleton.js +31 -32
- package/dist/components/source/context_source_box/ContextSourceBox.js +28 -29
- package/dist/components/source/context_source_list/ContextSourceList.js +27 -28
- package/dist/components/source/source_box/SourceBox.js +23 -23
- package/dist/components/source/source_list_item/SourceListItem.js +15 -15
- package/dist/components/source/source_modal/SourceModal.js +59 -60
- package/dist/components/suggestion/suggestion_banner/SuggestionBanner.js +46 -48
- package/dist/components/suggestion/suggestion_box/SuggestionBox.js +57 -59
- package/dist/components/suggestion/suggestion_input/SuggestionInput.js +86 -88
- package/dist/components/summary/argument_summary_box/ArgumentSummaryBox.js +40 -41
- package/dist/components/summary/keyword_box/KeywordBox.js +21 -21
- package/dist/components/summary/summary/Summary.js +34 -34
- package/dist/components/summary/summary_box/SummaryBox.js +16 -16
- package/dist/components/tag/tag/Tag.js +9 -10
- package/dist/components/text/expandable_text/ArrowIcon.js +5 -5
- package/dist/components/text/expandable_text/ExpandableText.js +36 -37
- package/dist/components/text/read_more/ReadMore.js +46 -47
- package/dist/components/tools/hash_scroll/HashScroll.js +12 -12
- package/dist/components/translation/translated_content/TranslatedContent.js +3 -3
- package/dist/components/translation/translated_content/useTranslatedContent.js +5 -5
- package/dist/components/translation/translation_button/TranslationButton.js +14 -16
- package/dist/components/user/author_box/AuthorBox.js +69 -71
- package/dist/components/user/avatar/Avatar.js +37 -38
- package/dist/components/user/avatar/DefaultAvatar.js +6 -6
- package/dist/components/user/avatar_selector/AvatarSelector.js +55 -56
- package/dist/components/user/update_user_info_modal/UpdateUserInfoModal.js +123 -124
- package/dist/components/user/update_user_info_modal/useUpdateUserInfo.js +12 -12
- package/dist/components/user/user_box/UserBox.js +47 -49
- package/dist/components/user/user_box_small/UserBoxSmall.js +26 -27
- package/dist/components/user_content/content_footer/ContentFooter.js +84 -85
- package/dist/components/user_content/content_header/ContentHeader.js +68 -69
- package/dist/components/user_content/summary_content_box/SummaryContentBox.js +42 -43
- package/dist/components/user_content/use_delete_content/useDeleteContent.js +16 -16
- package/dist/components/user_content/use_report_content/ReportModal.js +117 -118
- package/dist/components/user_content/use_report_content/useReportContent.js +13 -13
- package/dist/components/util/location/Location.js +1 -1
- package/dist/components/vote/suggestion_vote_box/SuggestionVoteBox.js +37 -37
- package/dist/components/vote/up_down_vote_box/UpDownVoteBox.js +31 -32
- package/dist/components/vote/vote_box/VoteBox.js +165 -167
- package/dist/components/vote/vote_button/VoteButton.js +21 -22
- package/dist/components/vote/vote_provider/VoteProvider.js +17 -17
- package/dist/index.js +85 -29
- package/package.json +7 -2
- package/dist/assets/debate-Bv79XlHp.css +0 -2
- package/dist/node_modules/.pnpm/@formatjs_fast-memoize@2.2.7/node_modules/@formatjs/fast-memoize/lib/index.js +0 -51
- 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
- package/dist/node_modules/.pnpm/@formatjs_icu-messageformat-parser@2.11.4/node_modules/@formatjs/icu-messageformat-parser/lib/error.js +0 -7
- package/dist/node_modules/.pnpm/@formatjs_icu-messageformat-parser@2.11.4/node_modules/@formatjs/icu-messageformat-parser/lib/index.js +0 -26
- package/dist/node_modules/.pnpm/@formatjs_icu-messageformat-parser@2.11.4/node_modules/@formatjs/icu-messageformat-parser/lib/manipulator.js +0 -1
- package/dist/node_modules/.pnpm/@formatjs_icu-messageformat-parser@2.11.4/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js +0 -499
- package/dist/node_modules/.pnpm/@formatjs_icu-messageformat-parser@2.11.4/node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js +0 -4
- 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
- package/dist/node_modules/.pnpm/@formatjs_icu-messageformat-parser@2.11.4/node_modules/@formatjs/icu-messageformat-parser/lib/types.js +0 -44
- package/dist/node_modules/.pnpm/@formatjs_icu-skeleton-parser@1.8.16/node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js +0 -101
- package/dist/node_modules/.pnpm/@formatjs_icu-skeleton-parser@1.8.16/node_modules/@formatjs/icu-skeleton-parser/lib/number.js +0 -182
- package/dist/node_modules/.pnpm/@formatjs_icu-skeleton-parser@1.8.16/node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js +0 -4
- 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
- package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/dateTime.js +0 -80
- package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/displayName.js +0 -22
- package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/error.js +0 -66
- package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/list.js +0 -39
- package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/message.js +0 -59
- package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/number.js +0 -53
- package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/plural.js +0 -18
- package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/relativeTime.js +0 -22
- package/dist/node_modules/.pnpm/@formatjs_intl@3.1.8_typescript@5.9.3/node_modules/@formatjs/intl/lib/src/utils.js +0 -115
- package/dist/node_modules/.pnpm/@kurkle_color@0.3.4/node_modules/@kurkle/color/dist/color.esm.js +0 -470
- package/dist/node_modules/.pnpm/@lexical_clipboard@0.38.2/node_modules/@lexical/clipboard/LexicalClipboard.prod.js +0 -163
- package/dist/node_modules/.pnpm/@lexical_dragon@0.38.2/node_modules/@lexical/dragon/LexicalDragon.prod.js +0 -51
- package/dist/node_modules/.pnpm/@lexical_extension@0.38.2/node_modules/@lexical/extension/LexicalExtension.prod.js +0 -796
- package/dist/node_modules/.pnpm/@lexical_headless@0.38.2/node_modules/@lexical/headless/LexicalHeadless.prod.js +0 -21
- package/dist/node_modules/.pnpm/@lexical_history@0.38.2/node_modules/@lexical/history/LexicalHistory.prod.js +0 -132
- package/dist/node_modules/.pnpm/@lexical_html@0.38.2/node_modules/@lexical/html/LexicalHtml.prod.js +0 -88
- package/dist/node_modules/.pnpm/@lexical_list@0.38.2/node_modules/@lexical/list/LexicalList.prod.js +0 -737
- package/dist/node_modules/.pnpm/@lexical_overflow@0.38.2/node_modules/@lexical/overflow/LexicalOverflow.prod.js +0 -37
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/@lexical_rich-text@0.38.2/node_modules/@lexical/rich-text/LexicalRichText.prod.js +0 -418
- package/dist/node_modules/.pnpm/@lexical_selection@0.38.2/node_modules/@lexical/selection/LexicalSelection.prod.js +0 -170
- package/dist/node_modules/.pnpm/@lexical_text@0.38.2/node_modules/@lexical/text/LexicalText.prod.js +0 -33
- package/dist/node_modules/.pnpm/@lexical_utils@0.38.2/node_modules/@lexical/utils/LexicalUtils.prod.js +0 -112
- 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
- package/dist/node_modules/.pnpm/@rooks_use-previous@4.11.2/node_modules/@rooks/use-previous/lib/index.esm.js +0 -10
- 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
- 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
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/adapters/adapters.js +0 -41
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/adapters/fetch.js +0 -128
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/adapters/xhr.js +0 -59
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/axios.js +0 -30
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/cancel/CancelToken.js +0 -59
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/cancel/CanceledError.js +0 -9
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/cancel/isCancel.js +0 -6
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/Axios.js +0 -131
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/AxiosError.js +0 -34
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/AxiosHeaders.js +0 -171
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/InterceptorManager.js +0 -28
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/buildFullPath.js +0 -9
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/dispatchRequest.js +0 -23
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/mergeConfig.js +0 -67
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/settle.js +0 -8
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/transformData.js +0 -12
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/defaults/index.js +0 -81
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/defaults/transitional.js +0 -9
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/env/data.js +0 -4
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -32
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -77
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/bind.js +0 -8
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/buildURL.js +0 -17
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/combineURLs.js +0 -6
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/composeSignals.js +0 -27
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/cookies.js +0 -26
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/formDataToJSON.js +0 -27
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -6
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/isAxiosError.js +0 -7
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -5
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/parseHeaders.js +0 -28
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/parseProtocol.js +0 -7
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/progressEventReducer.js +0 -30
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/resolveConfig.js +0 -28
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/speedometer.js +0 -16
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/spread.js +0 -8
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/throttle.js +0 -14
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/toFormData.js +0 -67
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -14
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/trackStream.js +0 -51
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/validator.js +0 -47
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -4
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -4
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -5
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/platform/browser/index.js +0 -22
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/platform/common/utils.js +0 -15
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/platform/index.js +0 -9
- package/dist/node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/utils.js +0 -235
- package/dist/node_modules/.pnpm/chart.js@4.5.1/node_modules/chart.js/auto/auto.js +0 -5
- package/dist/node_modules/.pnpm/chart.js@4.5.1/node_modules/chart.js/dist/chart.js +0 -6301
- package/dist/node_modules/.pnpm/chart.js@4.5.1/node_modules/chart.js/dist/chunks/helpers.dataset.js +0 -1381
- 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
- package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js +0 -32
- package/dist/node_modules/.pnpm/copy-to-clipboard@3.3.3/node_modules/copy-to-clipboard/index.js +0 -43
- package/dist/node_modules/.pnpm/dompurify@3.3.3/node_modules/dompurify/dist/purify.es.js +0 -549
- package/dist/node_modules/.pnpm/flat@5.0.2/node_modules/flat/index.js +0 -59
- package/dist/node_modules/.pnpm/goober@2.1.18_csstype@3.2.3/node_modules/goober/dist/goober.modern.js +0 -75
- 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
- package/dist/node_modules/.pnpm/intl-messageformat@10.7.18/node_modules/intl-messageformat/lib/src/core.js +0 -154
- package/dist/node_modules/.pnpm/intl-messageformat@10.7.18/node_modules/intl-messageformat/lib/src/error.js +0 -36
- package/dist/node_modules/.pnpm/intl-messageformat@10.7.18/node_modules/intl-messageformat/lib/src/formatters.js +0 -107
- package/dist/node_modules/.pnpm/lexical@0.38.2/node_modules/lexical/Lexical.prod.js +0 -5093
- package/dist/node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist.es2015/index.js +0 -198
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +0 -82
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +0 -62
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +0 -10
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js +0 -453
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -27
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js +0 -10
- package/dist/node_modules/.pnpm/toggle-selection@1.0.6/node_modules/toggle-selection/index.js +0 -26
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +0 -34
- package/dist/node_modules/.pnpm/use-debounce@10.1.1_react@18.3.1/node_modules/use-debounce/dist/index.module.js +0 -70
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/webfontloader@1.6.28/node_modules/webfontloader/webfontloader.js +0 -482
|
@@ -1,287 +1,285 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import { useEffect as p, useState as m } from "react";
|
|
21
|
-
import { useLocation as oe } from "react-router";
|
|
1
|
+
import { Link as e } from "../../action/link/Link.js";
|
|
2
|
+
import { Icon as t } from "../../icons/icon/Icon.js";
|
|
3
|
+
import { Button as n } from "../../action/button/Button.js";
|
|
4
|
+
import { useAuth as r } from "../../auth/use_auth/useAuth.js";
|
|
5
|
+
import { useDataProvider as i } from "../../data/data_provider/useDataProvider.js";
|
|
6
|
+
import { useConfig as ee } from "../../data/config_provider/useConfig.js";
|
|
7
|
+
import { useResponsive as te } from "../../hooks/use_responsive/useResponsive.js";
|
|
8
|
+
import { useTranslatedContent as a } from "../../translation/translated_content/useTranslatedContent.js";
|
|
9
|
+
import { Tooltip as o } from "../../dialog/tooltip/Tooltip.js";
|
|
10
|
+
import { useToast as ne } from "../../dialog/toast_provider/useToast.js";
|
|
11
|
+
import { useAuthRequired as re } from "../../hooks/use_auth_required/useAuthRequired.js";
|
|
12
|
+
import { ProgressBar as ie } from "../../progress/progress_bar/ProgressBar.js";
|
|
13
|
+
import s from "./VoteBox.module.js";
|
|
14
|
+
import { useEffect as c, useState as l } from "react";
|
|
15
|
+
import { Fragment as ae, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
16
|
+
import f from "classnames";
|
|
17
|
+
import { FormattedMessage as p, useIntl as oe } from "react-intl";
|
|
18
|
+
import { useLocation as se } from "react-router";
|
|
19
|
+
import m from "@rooks/use-sessionstorage-state";
|
|
22
20
|
//#region src/components/vote/vote_box/VoteBox.jsx
|
|
23
|
-
var h =
|
|
24
|
-
let [
|
|
25
|
-
let
|
|
26
|
-
return
|
|
27
|
-
count: Number.parseFloat(
|
|
28
|
-
percentage:
|
|
29
|
-
}),
|
|
30
|
-
})()), W =
|
|
31
|
-
|
|
32
|
-
Y === !1 && (J ?
|
|
33
|
-
}, [Y, J]),
|
|
34
|
-
if (
|
|
35
|
-
let [e, t] =
|
|
36
|
-
e && (t ? Q(t) :
|
|
21
|
+
var h = ({ numberVotes: h, votePositions: g, voteableType: _, voteableId: v, redirectUrl: y, displayColumn: b, textAlignLeft: ce, showTotal: le = !0, voteBoxClassName: x, buttonContainerClassName: S, buttonClassName: C, showResultClassName: w, onVote: T, disabled: E = !1, showVotesCommentsNumber: ue = !1, commentsCount: de }) => {
|
|
22
|
+
let [D, O] = l(!0), [k, A] = l(void 0), [j, M] = l(!1), [N, fe] = l(Number.parseFloat(h.total) || Object.values(h).reduce((e, t) => e + Number.parseFloat(t), 0) || 0), P = a(g[0]?.name, g[0]?.language, "name", g[0]?.translation_entries), F = a(g[1]?.name, g[1]?.language, "name", g[1]?.translation_entries), I = a(g[2]?.name, g[2]?.language, "name", g[2]?.translation_entries), [L, pe, R] = m("storedUserVote", {}), [me, he, z] = m("userSide", {}), { toast: B } = ne() || {}, { isMobile: V } = te(), [H, U] = l((() => {
|
|
23
|
+
let e = {};
|
|
24
|
+
return g?.forEach((t) => e[t.id] = {
|
|
25
|
+
count: Number.parseFloat(h[t.id]) || 0,
|
|
26
|
+
percentage: N === 0 ? 0 : Math.round(100 * ((h[t.id] || 0) / N))
|
|
27
|
+
}), e;
|
|
28
|
+
})()), W = re(), ge = se(), G = i(), K = ee(), q = oe(), { isLoggedIn: J, isLoggingIn: Y } = r();
|
|
29
|
+
c(() => {
|
|
30
|
+
Y === !1 && (J ? ve(v) : O(!1));
|
|
31
|
+
}, [Y, J]), c(() => {
|
|
32
|
+
if (D === !1 && !y) {
|
|
33
|
+
let [e, t] = _e();
|
|
34
|
+
e && (t ? Q(t) : M(!0));
|
|
37
35
|
}
|
|
38
|
-
}, [
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
let
|
|
42
|
-
if (
|
|
43
|
-
let e = new URLSearchParams(typeof window < "u" ? window.location.search :
|
|
36
|
+
}, [D]), c(() => {
|
|
37
|
+
T && T(k);
|
|
38
|
+
}, [k]);
|
|
39
|
+
let _e = () => {
|
|
40
|
+
if (L && Object.keys(L).length !== 0) return L.groupId === v && L.voteableType === _ ? [!0, L.positionId] : (R(), [!1, !1]);
|
|
41
|
+
let e = new URLSearchParams(typeof window < "u" ? window.location.search : ge.search);
|
|
44
42
|
return [!!e.get("initVote"), Number.parseInt(e.get("positionId")) || !1];
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
e.data.data.resource ? (
|
|
43
|
+
}, ve = (e) => {
|
|
44
|
+
O(!0), T && T(k), G.getOneWithToken("votes", `${_.toLowerCase()}/${e}`, {}).then((e) => {
|
|
45
|
+
e.data.data.resource ? (A(e.data.data.resource), M(!0), O(!1)) : (O(!1), M(!1));
|
|
48
46
|
}).catch((e) => {
|
|
49
|
-
|
|
47
|
+
O(!1);
|
|
50
48
|
});
|
|
51
|
-
}, X = (e, t) => t === 0 ? 0 : Math.round(e / t * 100),
|
|
49
|
+
}, X = (e, t) => t === 0 ? 0 : Math.round(e / t * 100), ye = (e) => {
|
|
52
50
|
let t = {
|
|
53
|
-
voteable_id:
|
|
54
|
-
voteable_type:
|
|
51
|
+
voteable_id: v,
|
|
52
|
+
voteable_type: _ || "Group",
|
|
55
53
|
position_id: e
|
|
56
54
|
};
|
|
57
|
-
|
|
58
|
-
groupId:
|
|
59
|
-
voteableType:
|
|
55
|
+
he({
|
|
56
|
+
groupId: v,
|
|
57
|
+
voteableType: _,
|
|
60
58
|
positionId: e
|
|
61
|
-
}),
|
|
62
|
-
e.data.success && (
|
|
59
|
+
}), k ? (xe(e, k.position_id), j === !1 && $(), e !== k.position_id && G.update("votes", k.id, t).then((e) => {
|
|
60
|
+
e.data.success && (A(e.data.data.resource), B(q.formatMessage({
|
|
63
61
|
id: "header.vote_confirm_modal",
|
|
64
62
|
defaultMessage: "Your vote has been saved !"
|
|
65
63
|
}), { type: "success" }));
|
|
66
|
-
})) : (
|
|
67
|
-
e.data.success && (
|
|
64
|
+
})) : (be(e), $(), G.create("votes", t).then((e) => {
|
|
65
|
+
e.data.success && (A(e.data.data.resource), B(q.formatMessage({
|
|
68
66
|
id: "header.vote_confirm_modal",
|
|
69
67
|
defaultMessage: "Your vote has been saved !"
|
|
70
68
|
}), { type: "success" }));
|
|
71
69
|
}));
|
|
72
|
-
},
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
if (e ===
|
|
76
|
-
count:
|
|
77
|
-
percentage: X(
|
|
70
|
+
}, be = (e) => {
|
|
71
|
+
let t = H[e].count + 1, n = N + 1, r = {};
|
|
72
|
+
g.forEach((i) => {
|
|
73
|
+
if (e === i.id) r[i.id] = {
|
|
74
|
+
count: t,
|
|
75
|
+
percentage: X(t, n)
|
|
78
76
|
};
|
|
79
77
|
else {
|
|
80
|
-
let e = H[
|
|
81
|
-
i
|
|
78
|
+
let e = H[i.id].count;
|
|
79
|
+
r[i.id] = {
|
|
82
80
|
count: e,
|
|
83
|
-
percentage: X(e,
|
|
81
|
+
percentage: X(e, n)
|
|
84
82
|
};
|
|
85
83
|
}
|
|
86
|
-
}), U(
|
|
87
|
-
},
|
|
84
|
+
}), U(r), fe(n);
|
|
85
|
+
}, xe = (e, t) => {
|
|
88
86
|
t !== e && U({
|
|
89
87
|
...H,
|
|
90
88
|
[t]: {
|
|
91
89
|
count: H[t].count - 1,
|
|
92
|
-
percentage: X(H[t].count - 1,
|
|
90
|
+
percentage: X(H[t].count - 1, N)
|
|
93
91
|
},
|
|
94
92
|
[e]: {
|
|
95
93
|
count: H[e].count + 1,
|
|
96
|
-
percentage: X(H[e].count + 1,
|
|
94
|
+
percentage: X(H[e].count + 1, N)
|
|
97
95
|
}
|
|
98
96
|
});
|
|
99
|
-
}, Z = (e) =>
|
|
97
|
+
}, Z = (e) => y + `?${new URLSearchParams({
|
|
100
98
|
initVote: "true",
|
|
101
99
|
...e && { positionId: e }
|
|
102
100
|
}).toString()}`, Q = (e) => {
|
|
103
|
-
J ? Object.keys(H).includes(e.toString()) && (
|
|
104
|
-
groupId:
|
|
105
|
-
voteableType:
|
|
101
|
+
J ? Object.keys(H).includes(e.toString()) && (ye(e), R()) : (Object.keys(H).includes(e.toString()) && pe({
|
|
102
|
+
groupId: v,
|
|
103
|
+
voteableType: _,
|
|
106
104
|
positionId: e
|
|
107
105
|
}), W({ loginAction: "vote" }));
|
|
108
106
|
}, $ = () => {
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
let
|
|
112
|
-
t === 0 ?
|
|
113
|
-
let
|
|
114
|
-
return /* @__PURE__ */ (
|
|
115
|
-
className: (
|
|
116
|
-
children: /* @__PURE__ */ (
|
|
107
|
+
j && z(), M(!j);
|
|
108
|
+
}, Se = (e, t) => {
|
|
109
|
+
let r;
|
|
110
|
+
t === 0 ? r = P.translatedContent : t === 1 ? r = F.translatedContent : t === 2 && (r = I.translatedContent);
|
|
111
|
+
let i = typeof window < "u" && !y;
|
|
112
|
+
return /* @__PURE__ */ u("div", {
|
|
113
|
+
className: f(s.voteAction, { [s.buttonAlignLeft]: s.buttonAlignLeft }),
|
|
114
|
+
children: /* @__PURE__ */ u(n, {
|
|
117
115
|
"data-tid": "action_vote",
|
|
118
116
|
type: "button",
|
|
119
|
-
title:
|
|
120
|
-
className: (
|
|
121
|
-
[
|
|
122
|
-
[
|
|
117
|
+
title: r,
|
|
118
|
+
className: f(s.voteButton, {
|
|
119
|
+
[s.textAlignLeft]: ce,
|
|
120
|
+
[C]: C
|
|
123
121
|
}),
|
|
124
|
-
onClick:
|
|
125
|
-
disabled:
|
|
122
|
+
onClick: i ? () => Q(e.id) : null,
|
|
123
|
+
disabled: E,
|
|
126
124
|
"data-testid": "voteButton",
|
|
127
|
-
to:
|
|
128
|
-
target:
|
|
129
|
-
rel:
|
|
130
|
-
external:
|
|
131
|
-
children: /* @__PURE__ */ (
|
|
125
|
+
to: i ? null : Z(e.id),
|
|
126
|
+
target: i ? null : "_top",
|
|
127
|
+
rel: i ? null : "nofollow",
|
|
128
|
+
external: i ? null : !0,
|
|
129
|
+
children: /* @__PURE__ */ u("div", {
|
|
132
130
|
"data-tid": "action_vote",
|
|
133
|
-
className: (
|
|
134
|
-
children:
|
|
131
|
+
className: f(s.voteButtonThesis, { [s.voteButtonThesisSynthesisMobile]: !b }),
|
|
132
|
+
children: r
|
|
135
133
|
})
|
|
136
134
|
})
|
|
137
135
|
}, t);
|
|
138
|
-
},
|
|
139
|
-
J || K.actions?.unloggedVoteResults === !0 ?
|
|
136
|
+
}, Ce = () => {
|
|
137
|
+
J || K.actions?.unloggedVoteResults === !0 ? M(!0) : W({ loginAction: "vote" });
|
|
140
138
|
};
|
|
141
|
-
return /* @__PURE__ */ (
|
|
142
|
-
className: (
|
|
143
|
-
children: /* @__PURE__ */ (
|
|
144
|
-
className:
|
|
139
|
+
return /* @__PURE__ */ u("div", {
|
|
140
|
+
className: f(s.voteBox, { [x]: x }),
|
|
141
|
+
children: /* @__PURE__ */ u(ae, { children: j || E ? /* @__PURE__ */ d("div", {
|
|
142
|
+
className: s.voteResultsBox,
|
|
145
143
|
"data-testid": "voteResultsBox",
|
|
146
|
-
children: [/* @__PURE__ */ (
|
|
147
|
-
className:
|
|
148
|
-
children:
|
|
149
|
-
let
|
|
150
|
-
return
|
|
151
|
-
className:
|
|
144
|
+
children: [/* @__PURE__ */ u("div", {
|
|
145
|
+
className: s.voteResults,
|
|
146
|
+
children: g.map((e, n) => {
|
|
147
|
+
let r;
|
|
148
|
+
return n === 0 ? r = P.translatedContent : n === 1 ? r = F.translatedContent : n === 2 && (r = I.translatedContent), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("div", {
|
|
149
|
+
className: n > 0 ? f(s.voteProgressHeader, s.voteProgressHeaderAgainst) : s.voteProgressHeader,
|
|
152
150
|
children: [
|
|
153
|
-
|
|
151
|
+
r,
|
|
154
152
|
" ",
|
|
155
|
-
|
|
156
|
-
title: q.formatMessage({ id: "vote.vote_box.vote_side" }) +
|
|
157
|
-
className:
|
|
153
|
+
k && k.position_id === e.id ? /* @__PURE__ */ u("span", {
|
|
154
|
+
title: q.formatMessage({ id: "vote.vote_box.vote_side" }) + r,
|
|
155
|
+
className: s.sideIcon,
|
|
158
156
|
"aria-hidden": "true",
|
|
159
|
-
children: /* @__PURE__ */ (
|
|
157
|
+
children: /* @__PURE__ */ u(t, {
|
|
160
158
|
name: "checkbox",
|
|
161
159
|
width: 16,
|
|
162
160
|
height: 16
|
|
163
161
|
})
|
|
164
162
|
}) : null
|
|
165
163
|
]
|
|
166
|
-
}), /* @__PURE__ */ (
|
|
164
|
+
}), /* @__PURE__ */ d(ie, {
|
|
167
165
|
progress: H[e.id].percentage / 100,
|
|
168
166
|
goal: 1,
|
|
169
|
-
className:
|
|
170
|
-
innerClassName:
|
|
167
|
+
className: s.progress,
|
|
168
|
+
innerClassName: s.progressBar,
|
|
171
169
|
children: [H[e.id].percentage, "%"]
|
|
172
|
-
})] },
|
|
170
|
+
})] }, n);
|
|
173
171
|
})
|
|
174
|
-
}), /* @__PURE__ */ (
|
|
175
|
-
className:
|
|
176
|
-
children: [
|
|
177
|
-
className:
|
|
178
|
-
children: /* @__PURE__ */ (
|
|
172
|
+
}), /* @__PURE__ */ d("div", {
|
|
173
|
+
className: s.voteBoxFooter,
|
|
174
|
+
children: [le && /* @__PURE__ */ u("div", {
|
|
175
|
+
className: s.voteResultsNumberVoters,
|
|
176
|
+
children: /* @__PURE__ */ u(p, {
|
|
179
177
|
id: "vote.vote_box.votes",
|
|
180
|
-
values: { votesCount:
|
|
178
|
+
values: { votesCount: N },
|
|
181
179
|
defaultMessage: "{votesCount} votes"
|
|
182
180
|
})
|
|
183
|
-
}), !
|
|
181
|
+
}), !E && /* @__PURE__ */ u("div", { children: k ? /* @__PURE__ */ u("button", {
|
|
184
182
|
"data-tid": "action_edit_vote",
|
|
185
|
-
className:
|
|
183
|
+
className: s.voteActionButton,
|
|
186
184
|
type: "button",
|
|
187
185
|
onClick: $,
|
|
188
|
-
children: /* @__PURE__ */ (
|
|
186
|
+
children: /* @__PURE__ */ u(p, {
|
|
189
187
|
id: "vote.vote_box.update",
|
|
190
188
|
defaultMessage: "Modify"
|
|
191
189
|
})
|
|
192
|
-
}) : !K?.actions?.hideSHowResultButton && /* @__PURE__ */ (
|
|
190
|
+
}) : !K?.actions?.hideSHowResultButton && /* @__PURE__ */ u("button", {
|
|
193
191
|
type: "button",
|
|
194
|
-
className:
|
|
195
|
-
onClick: () =>
|
|
196
|
-
children: /* @__PURE__ */ (
|
|
192
|
+
className: s.voteActionButton,
|
|
193
|
+
onClick: () => M(!1),
|
|
194
|
+
children: /* @__PURE__ */ u(p, {
|
|
197
195
|
id: "vote.vote_box.back",
|
|
198
196
|
defaultMessage: "Back to vote"
|
|
199
197
|
})
|
|
200
198
|
}) })]
|
|
201
199
|
})]
|
|
202
|
-
}) : /* @__PURE__ */ (
|
|
203
|
-
className:
|
|
200
|
+
}) : /* @__PURE__ */ d("div", {
|
|
201
|
+
className: s.voteBoxActions,
|
|
204
202
|
children: [
|
|
205
|
-
/* @__PURE__ */ (
|
|
206
|
-
className: (
|
|
207
|
-
[
|
|
208
|
-
[
|
|
203
|
+
/* @__PURE__ */ u("div", {
|
|
204
|
+
className: f(s.voteBoxActionsBody, {
|
|
205
|
+
[s.voteBoxActionsBodyColumn]: b,
|
|
206
|
+
[S]: S
|
|
209
207
|
}),
|
|
210
|
-
children:
|
|
208
|
+
children: g.map((e, t) => Se(e, t))
|
|
211
209
|
}),
|
|
212
|
-
|
|
213
|
-
className:
|
|
214
|
-
children: [/* @__PURE__ */ (
|
|
210
|
+
ue && /* @__PURE__ */ d("div", {
|
|
211
|
+
className: s.voteCommentCounts,
|
|
212
|
+
children: [/* @__PURE__ */ u(o, {
|
|
215
213
|
position: V ? "right" : "bottom",
|
|
216
214
|
text: q.formatMessage({
|
|
217
215
|
id: "info.votes_count",
|
|
218
216
|
defaultMessage: "Votes"
|
|
219
217
|
}),
|
|
220
|
-
children: /* @__PURE__ */ (
|
|
221
|
-
className:
|
|
222
|
-
children: [/* @__PURE__ */ (
|
|
218
|
+
children: /* @__PURE__ */ d("div", {
|
|
219
|
+
className: s.debateNumberItem,
|
|
220
|
+
children: [/* @__PURE__ */ u(t, {
|
|
223
221
|
name: "votebox",
|
|
224
222
|
width: 20,
|
|
225
223
|
height: 20
|
|
226
|
-
}), /* @__PURE__ */ (
|
|
227
|
-
className:
|
|
228
|
-
children: /* @__PURE__ */ (
|
|
224
|
+
}), /* @__PURE__ */ u("div", {
|
|
225
|
+
className: s.debateNumberLabel,
|
|
226
|
+
children: /* @__PURE__ */ u(p, {
|
|
229
227
|
id: "vote.vote_box.votes",
|
|
230
|
-
values: { votesCount:
|
|
228
|
+
values: { votesCount: N },
|
|
231
229
|
defaultMessage: "{votesCount} votes"
|
|
232
230
|
})
|
|
233
231
|
})]
|
|
234
232
|
})
|
|
235
|
-
}), /* @__PURE__ */ (
|
|
233
|
+
}), /* @__PURE__ */ u(o, {
|
|
236
234
|
position: V ? "right" : "bottom",
|
|
237
235
|
text: q.formatMessage({
|
|
238
236
|
id: "info.arguments_count",
|
|
239
237
|
defaultMessage: "Comments"
|
|
240
238
|
}),
|
|
241
|
-
children: /* @__PURE__ */ (
|
|
242
|
-
className:
|
|
243
|
-
children: [/* @__PURE__ */ (
|
|
239
|
+
children: /* @__PURE__ */ d("div", {
|
|
240
|
+
className: s.debateNumberItem,
|
|
241
|
+
children: [/* @__PURE__ */ u(t, {
|
|
244
242
|
name: "chat",
|
|
245
243
|
width: 20,
|
|
246
244
|
height: 20
|
|
247
|
-
}), /* @__PURE__ */ (
|
|
248
|
-
className:
|
|
249
|
-
children: /* @__PURE__ */ (
|
|
245
|
+
}), /* @__PURE__ */ u("div", {
|
|
246
|
+
className: s.debateNumberLabel,
|
|
247
|
+
children: /* @__PURE__ */ u(p, {
|
|
250
248
|
id: "vote.vote_box.comments",
|
|
251
|
-
values: { count:
|
|
249
|
+
values: { count: de ?? 0 },
|
|
252
250
|
defaultMessage: "{count} comments"
|
|
253
251
|
})
|
|
254
252
|
})]
|
|
255
253
|
})
|
|
256
254
|
})]
|
|
257
255
|
}),
|
|
258
|
-
/* @__PURE__ */ (
|
|
259
|
-
className: (
|
|
260
|
-
children: /* @__PURE__ */ (
|
|
261
|
-
className:
|
|
262
|
-
children: typeof window < "u" && !
|
|
256
|
+
/* @__PURE__ */ u("div", {
|
|
257
|
+
className: f(s.voteBoxActions, s.voteBoxShowResultContainer, { [w]: w }),
|
|
258
|
+
children: /* @__PURE__ */ u("div", {
|
|
259
|
+
className: s.voteBoxShowResult,
|
|
260
|
+
children: typeof window < "u" && !y ? !K?.actions?.hideSHowResultButton && /* @__PURE__ */ u("button", {
|
|
263
261
|
type: "button",
|
|
264
|
-
onClick:
|
|
262
|
+
onClick: Ce,
|
|
265
263
|
"data-tid": "show_vote_result",
|
|
266
264
|
"data-testid": "show-result",
|
|
267
|
-
className:
|
|
268
|
-
children: /* @__PURE__ */ (
|
|
269
|
-
className: (
|
|
270
|
-
children: /* @__PURE__ */ (
|
|
265
|
+
className: s.showResultButton,
|
|
266
|
+
children: /* @__PURE__ */ u("span", {
|
|
267
|
+
className: f(s.boldShowResult, s.outlined),
|
|
268
|
+
children: /* @__PURE__ */ u(p, {
|
|
271
269
|
id: "vote.vote_box.show_result",
|
|
272
270
|
defaultMessage: "Show result"
|
|
273
271
|
})
|
|
274
272
|
})
|
|
275
|
-
}) : /* @__PURE__ */ (
|
|
273
|
+
}) : /* @__PURE__ */ u(e, {
|
|
276
274
|
to: Z(null),
|
|
277
275
|
rel: "nofollow",
|
|
278
276
|
"data-tid": "show_vote_result",
|
|
279
277
|
target: "_top",
|
|
280
278
|
external: !0,
|
|
281
279
|
"data-testid": "show-result",
|
|
282
|
-
children: /* @__PURE__ */ (
|
|
283
|
-
className: (
|
|
284
|
-
children: /* @__PURE__ */ (
|
|
280
|
+
children: /* @__PURE__ */ u("span", {
|
|
281
|
+
className: f(s.boldShowResult, s.outlined),
|
|
282
|
+
children: /* @__PURE__ */ u(p, {
|
|
285
283
|
id: "vote.vote_box.show_result",
|
|
286
284
|
defaultMessage: "Show result"
|
|
287
285
|
})
|
|
@@ -294,4 +292,4 @@ var h = /* @__PURE__ */ e(i()), g = t(), _ = ({ numberVotes: e, votePositions: t
|
|
|
294
292
|
});
|
|
295
293
|
};
|
|
296
294
|
//#endregion
|
|
297
|
-
export {
|
|
295
|
+
export { h as VoteBox };
|
|
@@ -1,40 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { require_classnames as r } from "../../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js";
|
|
5
|
-
import i 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";
|
|
6
|
-
import { useVote as a } from "../use_vote/useVote.js";
|
|
7
|
-
import o from "./VoteButton.module.js";
|
|
1
|
+
import { Icon as e } from "../../icons/icon/Icon.js";
|
|
2
|
+
import { useVote as t } from "../use_vote/useVote.js";
|
|
3
|
+
import n from "./VoteButton.module.js";
|
|
8
4
|
import "react";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import a from "classnames";
|
|
7
|
+
import { useIntl as o } from "react-intl";
|
|
9
8
|
//#region src/components/vote/vote_button/VoteButton.jsx
|
|
10
|
-
var s =
|
|
11
|
-
let { totalUpvotes:
|
|
12
|
-
return /* @__PURE__ */ (
|
|
9
|
+
var s = ({ voteableType: s, voteableId: c, totalUpvote: l = 0, totalDownvote: u = 0, activeClassName: d, disabled: f = !1 }) => {
|
|
10
|
+
let { totalUpvotes: p, activeVote: m, handleVote: h } = t(s, c, l, u), g = o();
|
|
11
|
+
return /* @__PURE__ */ i("button", {
|
|
13
12
|
type: "button",
|
|
14
|
-
className: (
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
13
|
+
className: a(n.voteButton, {
|
|
14
|
+
[n.active]: m,
|
|
15
|
+
[d]: m,
|
|
16
|
+
[n.disabled]: f
|
|
18
17
|
}),
|
|
19
|
-
onClick:
|
|
18
|
+
onClick: f ? null : () => h(!0),
|
|
20
19
|
"data-testid": "vote-button",
|
|
21
20
|
"data-tid": "action_vote_argument",
|
|
22
|
-
"aria-pressed":
|
|
23
|
-
"aria-label":
|
|
21
|
+
"aria-pressed": m,
|
|
22
|
+
"aria-label": g.formatMessage({
|
|
24
23
|
id: "vote.vote_button.aria_label",
|
|
25
24
|
defaultMessage: "Like argument"
|
|
26
25
|
}),
|
|
27
|
-
children: [/* @__PURE__ */ (
|
|
26
|
+
children: [/* @__PURE__ */ r(e, {
|
|
28
27
|
name: "clap",
|
|
29
28
|
"aria-hidden": "true",
|
|
30
29
|
"data-tid": "action_vote_argument",
|
|
31
30
|
height: 18,
|
|
32
31
|
width: 18
|
|
33
|
-
}), /* @__PURE__ */ (
|
|
34
|
-
className:
|
|
35
|
-
children:
|
|
32
|
+
}), /* @__PURE__ */ r("span", {
|
|
33
|
+
className: n.voteNumber,
|
|
34
|
+
children: p
|
|
36
35
|
})]
|
|
37
36
|
});
|
|
38
37
|
};
|
|
39
38
|
//#endregion
|
|
40
|
-
export {
|
|
39
|
+
export { s as VoteButton };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { useAuth as e } from "../../auth/use_auth/useAuth.js";
|
|
2
|
+
import { useDataProvider as t } from "../../data/data_provider/useDataProvider.js";
|
|
3
|
+
import { createContext as n, useEffect as r, useState as i } from "react";
|
|
4
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/vote/vote_provider/VoteProvider.jsx
|
|
6
|
-
var o =
|
|
7
|
-
let c =
|
|
6
|
+
var o = n(), s = ({ voteableType: n, children: s }) => {
|
|
7
|
+
let c = t(), { isLoggedIn: l, currentUser: u } = e(), [d, f] = i({}), [p, m] = i([]), h = () => {
|
|
8
8
|
c.getList("votes", {
|
|
9
9
|
page: 1,
|
|
10
10
|
per_page: Math.max(1, p.length),
|
|
11
11
|
user_id: u.id,
|
|
12
12
|
voteable_id: p.join(","),
|
|
13
|
-
voteable_type:
|
|
13
|
+
voteable_type: n,
|
|
14
14
|
countless: !0
|
|
15
|
-
}).then((
|
|
16
|
-
if (
|
|
17
|
-
let
|
|
18
|
-
p.map((
|
|
19
|
-
r[
|
|
15
|
+
}).then((e) => {
|
|
16
|
+
if (e.data.success) {
|
|
17
|
+
let t = e.data.data, r = {};
|
|
18
|
+
p.map((e) => {
|
|
19
|
+
r[e] = t.find((t) => t.voteable_id === e && t.voteable_type === n) || null;
|
|
20
20
|
}), f((e) => ({
|
|
21
21
|
...e,
|
|
22
22
|
...r
|
|
@@ -24,17 +24,17 @@ var o = e(), s = r(), c = ({ voteableType: e, children: r }) => {
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
|
-
return
|
|
28
|
-
l &&
|
|
29
|
-
}, [l, p]), /* @__PURE__ */ (
|
|
27
|
+
return r(() => {
|
|
28
|
+
l && n && p && p.length > 0 && h();
|
|
29
|
+
}, [l, p]), /* @__PURE__ */ a(o.Provider, {
|
|
30
30
|
value: {
|
|
31
31
|
votes: d,
|
|
32
32
|
addVoteableIds: (e) => {
|
|
33
33
|
m((t) => [...t, ...e]);
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
children:
|
|
36
|
+
children: s
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
39
|
//#endregion
|
|
40
|
-
export {
|
|
40
|
+
export { o as VoteContext, s as VoteProvider };
|