@logora/debate 0.1.1 → 0.2.1
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 +15 -23
- package/dist/components/action/button/Button.js +1 -1
- package/dist/components/argument/argument/Argument.js +49 -49
- package/dist/components/argument/top_arguments/TopArguments.js +17 -17
- package/dist/components/auth/auth_initializer/AuthInitializer.js +5 -5
- package/dist/components/auth/auth_modal/AuthModal.js +9 -9
- package/dist/components/auth/login_form/LoginForm.js +1 -0
- package/dist/components/auth/oauth2_button/OAuth2Button.js +3 -3
- package/dist/components/auth/providers/AuthProviderFactory.js +4 -4
- package/dist/components/auth/signup_form/SignupForm.js +4 -4
- package/dist/components/auth/social_auth_form/SocialAuthForm.js +10 -10
- package/dist/components/auth/sso_form/SSOForm.js +4 -4
- package/dist/components/chart/line_chart/LineChart.js +10 -10
- package/dist/components/chart/pie_chart/PieChart.js +6 -10
- package/dist/components/consultation/consultation_box/ConsultationBox.js +19 -14
- package/dist/components/debate/debate_box/DebateBox.js +11 -11
- package/dist/components/dialog/drawer/Drawer.js +16 -16
- package/dist/components/dialog/modal/Modal.js +8 -8
- package/dist/components/dialog/toast_provider/ToastProvider.js +10 -10
- package/dist/components/hooks/use_responsive/ResponsiveProvider.js +4 -4
- 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/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/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 +100 -99
- package/dist/components/input/search_input/SearchInput.js +4 -4
- package/dist/components/input/text_editor/TextEditor.js +50 -50
- package/dist/components/input/text_editor/lexicalToHtml.js +7 -7
- package/dist/components/input/text_editor/plugins/MaxLengthPlugin.js +12 -12
- package/dist/components/input/text_editor/plugins/ResetPlugin.js +6 -6
- package/dist/components/input/text_editor/plugins/SetContentPlugin.js +6 -6
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +21 -21
- package/dist/components/intl/intl_provider/IntlProvider.js +6 -6
- package/dist/components/list/paginated_list/PaginatedList.js +16 -16
- package/dist/components/list/paginated_list/VotePaginatedList.js +6 -6
- package/dist/components/list/paginated_list/action_bar/ActionBar.js +7 -7
- package/dist/components/navbar/navbar_button/NavbarButton.js +3 -3
- package/dist/components/navbar/navbar_modal/NavbarModal.js +11 -11
- package/dist/components/notification/notification_menu/NotificationMenu.js +4 -4
- package/dist/components/proposal/proposal_box/ProposalBox.js +8 -8
- package/dist/components/share/share_box/ShareBox.js +17 -17
- package/dist/components/source/context_source_list/ContextSourceList.js +3 -3
- package/dist/components/source/source_modal/SourceModal.js +16 -16
- package/dist/components/suggestion/suggestion_banner/SuggestionBanner.js +14 -14
- package/dist/components/suggestion/suggestion_box/SuggestionBox.js +6 -6
- package/dist/components/suggestion/suggestion_input/SuggestionInput.js +13 -12
- package/dist/components/user/avatar/Avatar.js +7 -7
- package/dist/components/user/update_user_info_modal/UpdateUserInfoModal.js +17 -15
- package/dist/components/user_content/content_footer/ContentFooter.js +11 -11
- package/dist/components/user_content/summary_content_box/SummaryContentBox.js +6 -6
- package/dist/components/user_content/use_delete_content/useDeleteContent.js +7 -7
- package/dist/components/user_content/use_report_content/ReportModal.js +9 -9
- package/dist/components/vote/use_vote/useVote.js +3 -3
- package/dist/components/vote/vote_box/VoteBox.js +7 -7
- package/dist/index.js +140 -84
- 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 +57 -57
- 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 +14 -14
- 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 +15 -15
- 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 +6 -6
- 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 +1 -1
- 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 +21 -21
- package/package.json +6 -1
|
@@ -5,16 +5,16 @@ import { require_classnames as r } from "../../../node_modules/.pnpm/classnames@
|
|
|
5
5
|
import { useAuth as i } from "../../auth/use_auth/useAuth.js";
|
|
6
6
|
import { useDataProvider as ee } from "../../data/data_provider/useDataProvider.js";
|
|
7
7
|
import { useConfig as te } from "../../data/config_provider/useConfig.js";
|
|
8
|
-
import ne from "
|
|
8
|
+
import { useResponsive as ne } from "../../hooks/use_responsive/useResponsive.js";
|
|
9
|
+
import { useList as re } from "../../list/list_provider/useList.js";
|
|
10
|
+
import ie 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";
|
|
9
11
|
import a 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";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { useToast as le } from "../../dialog/toast_provider/useToast.js";
|
|
17
|
-
import { useResponsive as ue } from "../../hooks/use_responsive/useResponsive.js";
|
|
12
|
+
import { useModal as ae } from "../../dialog/modal/useModal.js";
|
|
13
|
+
import { useInput as oe } from "../input_provider/useInput.js";
|
|
14
|
+
import { useToast as se } from "../../dialog/toast_provider/useToast.js";
|
|
15
|
+
import { useAuthRequired as ce } from "../../hooks/use_auth_required/useAuthRequired.js";
|
|
16
|
+
import { Avatar as le } from "../../user/avatar/Avatar.js";
|
|
17
|
+
import { AuthorBox as ue } from "../../user/author_box/AuthorBox.js";
|
|
18
18
|
import { TextEditor as de } from "../text_editor/TextEditor.js";
|
|
19
19
|
import fe 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";
|
|
20
20
|
import { useFormValidation as pe } from "../../forms/use_form_validation/useFormValidation.js";
|
|
@@ -23,40 +23,40 @@ import o from "./ArgumentInput.module.js";
|
|
|
23
23
|
import { Suspense as he, lazy as s, useEffect as c, useRef as ge, useState as l } from "react";
|
|
24
24
|
import { useLocation as _e } from "react-router";
|
|
25
25
|
//#region src/components/input/argument_input/ArgumentInput.jsx
|
|
26
|
-
var u = t(), d = /* @__PURE__ */ e(r()), ve = s(() => import("../../modal/side_modal/index.js")), f = ({ argumentListId: e, avatarSize: t = 48, disabled: r = !1, positions: s = [], disabledPositions: f = [], groupId: p, groupName: ye, groupType: m, hideSourceAction: be = !1, isReply: h = !1, onSubmit:
|
|
27
|
-
let
|
|
26
|
+
var u = t(), d = /* @__PURE__ */ e(r()), ve = s(() => import("../../modal/side_modal/index.js")), f = ({ argumentListId: e, avatarSize: t = 48, disabled: r = !1, positions: s = [], disabledPositions: f = [], groupId: p, groupName: ye, groupType: m, hideSourceAction: be = !1, isReply: h = !1, onSubmit: g, parentId: _, placeholder: xe, positionId: v, focusOnInit: Se = !1, activeOnInit: y = !1, userGuideUrl: b, hideUserGuideLink: Ce = !1, hideCharCount: we = !1, disableAutoActivate: Te = !1 }) => {
|
|
27
|
+
let x = ie(), Ee = ee(), S = re(), C = te(), { focus: De, setFocus: w, setReset: Oe, inputContent: T, setInputContent: ke, setInputRichContent: Ae } = oe(), { isLoggedIn: E, currentUser: D } = i(), { errors: O, validate: k } = pe(), { isMobile: A } = ne(), je = _e(), j = ge(null), [M, N] = l([]), [P, F] = l(""), [I, L] = l(null), [R, z] = l(null), [B, V] = l(null), [H, U] = l(!1), [W, G] = l(!1), [K, q] = l({}), [J, Me] = fe("userSide", {}), [Y, Ne] = l(!E && C?.actions?.disableInputForVisitor), X = ce(), { showModal: Pe } = ae(), { toast: Z } = se() || {}, Fe = new URLSearchParams(typeof window < "u" ? window.location.search : je.search);
|
|
28
28
|
c(() => {
|
|
29
|
-
|
|
30
|
-
}, [
|
|
31
|
-
let Q =
|
|
29
|
+
Ne(!E && C?.actions?.disableInputForVisitor);
|
|
30
|
+
}, [E, C]);
|
|
31
|
+
let Q = D?.role === "editor" || D?.role === "moderator", Ie = D?.moderation_status === "banned";
|
|
32
32
|
c(() => {
|
|
33
33
|
let e = null;
|
|
34
|
-
typeof window < "u" && (e =
|
|
35
|
-
}, [_]), c(() => {
|
|
36
|
-
v && ($(), C(!0));
|
|
34
|
+
typeof window < "u" && (e = Fe.get("positionId")), v && v != s[2]?.id && s?.find((e) => e.id === v) ? z(v) : e && e != s[2]?.id ? z(e) : J && J.groupId == p && J.positionId != s[2]?.id && z(J.positionId);
|
|
37
35
|
}, [v]), c(() => {
|
|
36
|
+
y && ($(), w(!0));
|
|
37
|
+
}, [y]), c(() => {
|
|
38
38
|
if (typeof window < "u") {
|
|
39
|
-
let e =
|
|
40
|
-
(e === !0 || e === "true") && (
|
|
39
|
+
let e = Se || Fe.get("initArgument");
|
|
40
|
+
(e === !0 || e === "true") && (w(!0), Je());
|
|
41
41
|
}
|
|
42
42
|
}, []), c(() => {
|
|
43
|
-
|
|
44
|
-
}, [
|
|
45
|
-
|
|
46
|
-
}, [
|
|
43
|
+
De && (Re(), w(!1));
|
|
44
|
+
}, [De]), c(() => {
|
|
45
|
+
T?.id && (Le(T), w(!0));
|
|
46
|
+
}, [T]);
|
|
47
47
|
let Le = (e) => {
|
|
48
|
-
|
|
48
|
+
q(e), G(!0), N(e.sources), F(e.content), L(e.rich_content), V(e.id), Re(), z(e.position?.id), JSON.parse(e.rich_content).hasOwnProperty("root") ? Ae(e.rich_content) : ke(e.content);
|
|
49
49
|
}, Re = () => {
|
|
50
|
-
|
|
50
|
+
j.current.scrollIntoView(!1);
|
|
51
51
|
}, ze = () => {
|
|
52
|
-
|
|
52
|
+
F(""), L(null), q({}), V(null), N([]), Oe(!0);
|
|
53
53
|
}, Be = (e) => {
|
|
54
|
-
|
|
54
|
+
z(e), Ke(e);
|
|
55
55
|
}, Ve = () => {
|
|
56
|
-
|
|
56
|
+
Pe(/* @__PURE__ */ (0, u.jsx)(he, {
|
|
57
57
|
fallback: null,
|
|
58
58
|
children: /* @__PURE__ */ (0, u.jsx)(ve, {
|
|
59
|
-
modalTitle:
|
|
59
|
+
modalTitle: x.formatMessage({
|
|
60
60
|
id: "modal.side_modal.modal_title",
|
|
61
61
|
defaultMessage: "Choose your side"
|
|
62
62
|
}),
|
|
@@ -64,59 +64,59 @@ var u = t(), d = /* @__PURE__ */ e(r()), ve = s(() => import("../../modal/side_m
|
|
|
64
64
|
positions: s,
|
|
65
65
|
title: ye,
|
|
66
66
|
disabledPositions: !h && f,
|
|
67
|
-
isNeutral:
|
|
67
|
+
isNeutral: J && J.groupId == p && J.positionId === s[2]?.id
|
|
68
68
|
})
|
|
69
69
|
}));
|
|
70
70
|
}, He = () => {
|
|
71
|
-
|
|
71
|
+
E ? B ? qe() : !s || s?.length === 0 || !f?.find((e) => e?.id === R) && R || Q && h ? Ke(h && Q && s[0]?.id) : Ve() : X({ loginAction: "argument" });
|
|
72
72
|
}, Ue = (e, t) => {
|
|
73
|
-
|
|
73
|
+
Y ? X({ loginAction: "argument" }) : (F(e), L(t), k({ content: e }, [{ content: ["url", null] }]));
|
|
74
74
|
}, We = (e) => {
|
|
75
|
-
|
|
75
|
+
N(e);
|
|
76
76
|
}, Ge = [
|
|
77
77
|
{ content: ["length", 3] },
|
|
78
78
|
{ content: ["required", null] },
|
|
79
79
|
{ content: ["url", null] },
|
|
80
80
|
...!s || s?.length === 0 ? [] : [{ position_id: ["required", null] }]
|
|
81
81
|
], Ke = (t) => {
|
|
82
|
-
let n = t ||
|
|
83
|
-
content:
|
|
84
|
-
rich_content:
|
|
82
|
+
let n = t || R, r = {
|
|
83
|
+
content: P,
|
|
84
|
+
rich_content: I,
|
|
85
85
|
group_id: p,
|
|
86
86
|
...m && { group_type: m },
|
|
87
87
|
...n && { position_id: n },
|
|
88
|
-
is_reply: !!
|
|
89
|
-
message_id:
|
|
90
|
-
source_ids:
|
|
88
|
+
is_reply: !!_,
|
|
89
|
+
message_id: _ || null,
|
|
90
|
+
source_ids: M?.map((e) => e.id)
|
|
91
91
|
};
|
|
92
|
-
|
|
92
|
+
k(r, Ge) && (n && s && s.map((e) => e.id).includes(n) && Me({
|
|
93
93
|
groupId: p,
|
|
94
94
|
positionId: n
|
|
95
|
-
}), ze(),
|
|
95
|
+
}), ze(), Ee.create("messages", r).then((t) => {
|
|
96
96
|
if (t.data.success) {
|
|
97
|
-
if (
|
|
97
|
+
if (_) g(t.data.data.resource), Z(x.formatMessage({
|
|
98
98
|
id: "alert.argument_create",
|
|
99
99
|
defaultMessage: "Your contribution has been sent !"
|
|
100
100
|
}), {
|
|
101
101
|
type: "success",
|
|
102
|
-
points:
|
|
102
|
+
points: x.formatMessage({
|
|
103
103
|
id: "alert.reply_gain",
|
|
104
104
|
defaultMessage: " "
|
|
105
105
|
})
|
|
106
106
|
});
|
|
107
107
|
else {
|
|
108
108
|
let r = t.data.data.resource, i = e;
|
|
109
|
-
n && !
|
|
109
|
+
n && !A && (i = `argumentList${r.position.id}`), g?.(P, s.find((e) => e.id === n) || null), S.add(i, [r]), Z(x.formatMessage({
|
|
110
110
|
id: "alert.argument_create",
|
|
111
111
|
defaultMessage: "Your contribution has been sent !"
|
|
112
112
|
}), {
|
|
113
113
|
type: "success",
|
|
114
|
-
points:
|
|
114
|
+
points: x.formatMessage({
|
|
115
115
|
id: "alert.argument_create_gain",
|
|
116
116
|
defaultMessage: "Up to 10 eloquence points"
|
|
117
117
|
}),
|
|
118
118
|
category: "ARGUMENT",
|
|
119
|
-
contentKey:
|
|
119
|
+
contentKey: D.messages_count === 2 ? "alert.third_argument" : "alert.first_argument"
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
typeof window < "u" && window.dispatchEvent(new CustomEvent("logora:user_content:created", { detail: { content: t.data.data?.resource } }));
|
|
@@ -124,34 +124,34 @@ var u = t(), d = /* @__PURE__ */ e(r()), ve = s(() => import("../../modal/side_m
|
|
|
124
124
|
}));
|
|
125
125
|
}, qe = () => {
|
|
126
126
|
let t = {
|
|
127
|
-
content:
|
|
128
|
-
rich_content:
|
|
129
|
-
source_ids:
|
|
130
|
-
...
|
|
127
|
+
content: P,
|
|
128
|
+
rich_content: I,
|
|
129
|
+
source_ids: M?.map((e) => e.id),
|
|
130
|
+
...R && { position_id: R }
|
|
131
131
|
};
|
|
132
|
-
|
|
132
|
+
k(t, Ge) && Ee.update("messages", B, t).then((t) => {
|
|
133
133
|
if (t.data.success) {
|
|
134
134
|
let n = t.data.data.resource, r = e;
|
|
135
|
-
if (
|
|
136
|
-
let e = `argumentList${
|
|
137
|
-
|
|
138
|
-
} else
|
|
139
|
-
|
|
135
|
+
if (R && !A && (r = `argumentList${n.position?.id}`), K?.position?.id != n.position?.id && !A && !n.is_reply) {
|
|
136
|
+
let e = `argumentList${K.position.id}`, t = `argumentList${n.position.id}`;
|
|
137
|
+
S.remove(e, [n]), S.add(t, [n]);
|
|
138
|
+
} else S.update(r, [n]);
|
|
139
|
+
Z(x.formatMessage({ id: "alert.argument_modify" }), { type: "success" }), ze();
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
}, Je = () => {
|
|
143
|
-
if (!
|
|
144
|
-
|
|
143
|
+
if (!H) {
|
|
144
|
+
U(!0);
|
|
145
145
|
let e = setTimeout(() => {
|
|
146
|
-
|
|
146
|
+
U(!1);
|
|
147
147
|
}, 2e3);
|
|
148
148
|
return () => clearTimeout(e);
|
|
149
149
|
}
|
|
150
150
|
}, $ = () => {
|
|
151
|
-
|
|
151
|
+
Y ? X({ loginAction: "argument" }) : G(!0);
|
|
152
152
|
}, Ye = () => {
|
|
153
|
-
let e = f.find((e) => e.id ===
|
|
154
|
-
if (e) return
|
|
153
|
+
let e = f.find((e) => e.id === R);
|
|
154
|
+
if (e) return x.formatMessage({
|
|
155
155
|
id: "info.argument_side_limit",
|
|
156
156
|
defaultMessage: "You have reached the argument limit (10) for position {position}."
|
|
157
157
|
}, { position: e.name });
|
|
@@ -160,53 +160,53 @@ var u = t(), d = /* @__PURE__ */ e(r()), ve = s(() => import("../../modal/side_m
|
|
|
160
160
|
className: o.inputContainer,
|
|
161
161
|
children: [r && /* @__PURE__ */ (0, u.jsx)("div", {
|
|
162
162
|
className: o.disabledInputMask,
|
|
163
|
-
children: Ie ?
|
|
163
|
+
children: Ie ? x.formatMessage({
|
|
164
164
|
id: "input.argument_input.user_banned",
|
|
165
165
|
defaultMessage: "You are banned from the debate space."
|
|
166
|
-
}) :
|
|
166
|
+
}) : x.formatMessage({
|
|
167
167
|
id: "info.debate_is_inactive",
|
|
168
168
|
defaultMessage: "Debate is closed"
|
|
169
169
|
})
|
|
170
170
|
}), /* @__PURE__ */ (0, u.jsx)("div", {
|
|
171
171
|
className: (0, d.default)(o.argumentInput, {
|
|
172
|
-
[o.flash]:
|
|
172
|
+
[o.flash]: H,
|
|
173
173
|
[o.replyInputContainer]: h
|
|
174
174
|
}),
|
|
175
175
|
children: /* @__PURE__ */ (0, u.jsx)("div", {
|
|
176
176
|
"data-tid": "action_add_argument",
|
|
177
|
-
ref:
|
|
177
|
+
ref: j,
|
|
178
178
|
children: /* @__PURE__ */ (0, u.jsxs)("div", {
|
|
179
179
|
className: o.argumentInputBox,
|
|
180
|
-
children: [s.length > 0 &&
|
|
180
|
+
children: [s.length > 0 && E && (!h || !Q) && /* @__PURE__ */ (0, u.jsxs)("div", {
|
|
181
181
|
className: o.userPosition,
|
|
182
|
-
children: [/* @__PURE__ */ (0, u.jsx)("div", { children:
|
|
182
|
+
children: [/* @__PURE__ */ (0, u.jsx)("div", { children: x.formatMessage({
|
|
183
183
|
id: "input.position",
|
|
184
184
|
defaultMessage: "Your position"
|
|
185
185
|
}) }), /* @__PURE__ */ (0, u.jsx)(me, {
|
|
186
|
-
activeLabel:
|
|
186
|
+
activeLabel: R === s[0].id ? 0 : R === s[1].id ? 1 : null,
|
|
187
187
|
firstLabel: s[0],
|
|
188
188
|
secondLabel: s[1],
|
|
189
|
-
onChange: (e) =>
|
|
189
|
+
onChange: (e) => z(s[e].id)
|
|
190
190
|
})]
|
|
191
191
|
}), /* @__PURE__ */ (0, u.jsxs)("div", {
|
|
192
192
|
className: (0, d.default)(o.argumentTextInputBox, {
|
|
193
|
-
[o.argumentTextInputBoxisTablet]: !
|
|
193
|
+
[o.argumentTextInputBoxisTablet]: !A,
|
|
194
194
|
[o.replyEditorRow]: h
|
|
195
195
|
}),
|
|
196
196
|
children: [/* @__PURE__ */ (0, u.jsx)("div", {
|
|
197
197
|
className: (0, d.default)(o.argumentAuthorContainer, {
|
|
198
|
-
[o.argumentAuthorContainerMobile]:
|
|
199
|
-
[o.argumentAuthorContainerActivated]: !
|
|
198
|
+
[o.argumentAuthorContainerMobile]: A,
|
|
199
|
+
[o.argumentAuthorContainerActivated]: !A && W || h
|
|
200
200
|
}),
|
|
201
|
-
children: !
|
|
202
|
-
avatarUrl:
|
|
203
|
-
userName:
|
|
201
|
+
children: !A && W || h ? /* @__PURE__ */ (0, u.jsx)(le, {
|
|
202
|
+
avatarUrl: D.image_url,
|
|
203
|
+
userName: D.full_name,
|
|
204
204
|
size: t
|
|
205
|
-
}) : /* @__PURE__ */ (0, u.jsx)(
|
|
206
|
-
fullName:
|
|
207
|
-
avatarUrl:
|
|
208
|
-
points:
|
|
209
|
-
slug:
|
|
205
|
+
}) : /* @__PURE__ */ (0, u.jsx)(ue, {
|
|
206
|
+
fullName: D?.full_name || x.formatMessage({ id: "default_author.full_name" }),
|
|
207
|
+
avatarUrl: D?.image_url,
|
|
208
|
+
points: D?.points || 0,
|
|
209
|
+
slug: D?.hash_id
|
|
210
210
|
})
|
|
211
211
|
}), /* @__PURE__ */ (0, u.jsxs)("div", {
|
|
212
212
|
onClick: $,
|
|
@@ -220,32 +220,32 @@ var u = t(), d = /* @__PURE__ */ e(r()), ve = s(() => import("../../modal/side_m
|
|
|
220
220
|
handleSourcesChange: (e) => {
|
|
221
221
|
We(e);
|
|
222
222
|
},
|
|
223
|
-
placeholder:
|
|
224
|
-
"aria-label":
|
|
223
|
+
placeholder: xe,
|
|
224
|
+
"aria-label": x.formatMessage({
|
|
225
225
|
id: "input.argument_input.aria_label",
|
|
226
226
|
defaultMessage: "Message input field"
|
|
227
227
|
}),
|
|
228
228
|
onSubmit: He,
|
|
229
|
-
sources:
|
|
230
|
-
hideSourceAction: be ||
|
|
229
|
+
sources: M,
|
|
230
|
+
hideSourceAction: be || Y,
|
|
231
231
|
uid: `Argument${p}`,
|
|
232
232
|
onActivation: $,
|
|
233
|
-
showStylesControls:
|
|
234
|
-
disabled: r ||
|
|
235
|
-
maxLength:
|
|
236
|
-
disableRichText:
|
|
233
|
+
showStylesControls: W,
|
|
234
|
+
disabled: r || Y || Ie,
|
|
235
|
+
maxLength: Y ? !1 : C?.actions?.argumentMaxLength,
|
|
236
|
+
disableRichText: C?.actions?.disableRichText || Y,
|
|
237
237
|
shortBar: h,
|
|
238
|
-
hideSubmit:
|
|
239
|
-
allowedDomains:
|
|
240
|
-
active:
|
|
241
|
-
hideCharCount:
|
|
242
|
-
disableAutoActivate:
|
|
238
|
+
hideSubmit: Y,
|
|
239
|
+
allowedDomains: C?.allowed_sources,
|
|
240
|
+
active: y,
|
|
241
|
+
hideCharCount: we,
|
|
242
|
+
disableAutoActivate: Te
|
|
243
243
|
}),
|
|
244
|
-
|
|
244
|
+
O?.content && /* @__PURE__ */ (0, u.jsx)("div", {
|
|
245
245
|
className: o.argumentInputWarning,
|
|
246
|
-
children:
|
|
246
|
+
children: O && Object.values(O).map((e, t) => /* @__PURE__ */ (0, u.jsx)("div", { children: e }, t))
|
|
247
247
|
}),
|
|
248
|
-
|
|
248
|
+
W && f?.find((e) => e.id === R) && /* @__PURE__ */ (0, u.jsxs)("div", {
|
|
249
249
|
className: (0, d.default)(o.argumentInputWarning, o.disabledPositionWarning),
|
|
250
250
|
children: [/* @__PURE__ */ (0, u.jsx)(n, {
|
|
251
251
|
name: "announcement",
|
|
@@ -257,15 +257,16 @@ var u = t(), d = /* @__PURE__ */ e(r()), ve = s(() => import("../../modal/side_m
|
|
|
257
257
|
children: Ye()
|
|
258
258
|
})]
|
|
259
259
|
}),
|
|
260
|
-
|
|
260
|
+
W && b && !Ce && /* @__PURE__ */ (0, u.jsx)("div", {
|
|
261
261
|
className: o.guideMessage,
|
|
262
262
|
children: /* @__PURE__ */ (0, u.jsx)(a, {
|
|
263
263
|
id: "alert.guide_message",
|
|
264
264
|
defaultMessage: "Contributions must comply with our {userCharter}.",
|
|
265
265
|
values: { userCharter: /* @__PURE__ */ (0, u.jsx)("a", {
|
|
266
266
|
className: o.guideMessage,
|
|
267
|
-
href:
|
|
267
|
+
href: b,
|
|
268
268
|
target: "_blank",
|
|
269
|
+
rel: "noreferrer",
|
|
269
270
|
children: /* @__PURE__ */ (0, u.jsx)(a, {
|
|
270
271
|
id: "alert.user_charter",
|
|
271
272
|
defaultMessage: "user charter"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { require_jsx_runtime as e } from "../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
2
2
|
import { Icon as t } from "../../icons/icon/Icon.js";
|
|
3
3
|
import n 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";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { TextInput as r } from "../text_input/TextInput.js";
|
|
5
|
+
import { useOnClickOutside as i } from "../../../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";
|
|
6
6
|
import a from "./SearchInput.module.js";
|
|
7
7
|
import { useRef as o, useState as s } from "react";
|
|
8
8
|
//#region src/components/input/search_input/SearchInput.jsx
|
|
9
9
|
var c = e(), l = ({ onSearchSubmit: e, placeholder: l, disabled: u, reducedByDefault: d }) => {
|
|
10
10
|
let f = n(), [p, m] = s(""), [h, g] = s(!1), _ = o(null);
|
|
11
|
-
|
|
11
|
+
i(_, d ? () => g(!1) : null);
|
|
12
12
|
let v = (t) => {
|
|
13
13
|
t.preventDefault(), e(p);
|
|
14
14
|
}, y = (t) => {
|
|
@@ -20,7 +20,7 @@ var c = e(), l = ({ onSearchSubmit: e, placeholder: l, disabled: u, reducedByDef
|
|
|
20
20
|
method: "get",
|
|
21
21
|
autoComplete: "off",
|
|
22
22
|
ref: _,
|
|
23
|
-
children: /* @__PURE__ */ (0, c.jsx)(
|
|
23
|
+
children: /* @__PURE__ */ (0, c.jsx)(r, {
|
|
24
24
|
type: "text",
|
|
25
25
|
name: "q",
|
|
26
26
|
"aria-label": f.formatMessage({
|
|
@@ -5,28 +5,28 @@ import r from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typesc
|
|
|
5
5
|
import { SourceListItem as i } from "../../source/source_list_item/SourceListItem.js";
|
|
6
6
|
import { useModal as a } from "../../dialog/modal/useModal.js";
|
|
7
7
|
import { No as o } from "../../../node_modules/.pnpm/lexical@0.38.2/node_modules/lexical/Lexical.prod.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { n as f } from "../../../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/
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { n as h } from "../../../node_modules/.pnpm/@
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import C from "./
|
|
29
|
-
import w from "./
|
|
8
|
+
import { lt as s, nt as c } from "../../../node_modules/.pnpm/@lexical_list@0.38.2/node_modules/@lexical/list/LexicalList.prod.js";
|
|
9
|
+
import { n as ee } from "../../../node_modules/.pnpm/@lexical_overflow@0.38.2/node_modules/@lexical/overflow/LexicalOverflow.prod.js";
|
|
10
|
+
import { U as te } from "../../../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";
|
|
11
|
+
import { f as l } from "../../../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";
|
|
12
|
+
import { x as u } from "../../../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";
|
|
13
|
+
import { o as d } from "../../../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";
|
|
14
|
+
import { n as f } from "../../../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";
|
|
15
|
+
import { a as p } from "../../../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";
|
|
16
|
+
import { s as m } from "../../../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";
|
|
17
|
+
import { n as h } from "../../../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";
|
|
18
|
+
import { Et as g } from "../../../node_modules/.pnpm/@lexical_rich-text@0.38.2/node_modules/@lexical/rich-text/LexicalRichText.prod.js";
|
|
19
|
+
import { L as _ } from "../../../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";
|
|
20
|
+
import { SourceModal as v } from "../../source/source_modal/SourceModal.js";
|
|
21
|
+
import y from "./TextEditor.module.js";
|
|
22
|
+
import ne from "./EditorTheme.js";
|
|
23
|
+
import { AutoSavePlugin as re } from "./plugins/AutoSavePlugin.js";
|
|
24
|
+
import { FocusPlugin as ie } from "./plugins/FocusPlugin.js";
|
|
25
|
+
import { MaxLengthPlugin as b } from "./plugins/MaxLengthPlugin.js";
|
|
26
|
+
import { ResetPlugin as x } from "./plugins/ResetPlugin.js";
|
|
27
|
+
import { SetContentPlugin as S } from "./plugins/SetContentPlugin.js";
|
|
28
|
+
import { SetRichContentPlugin as C } from "./plugins/SetRichContentPlugin.js";
|
|
29
|
+
import { ToolbarPlugin as w } from "./plugins/ToolbarPlugin.js";
|
|
30
30
|
import { useEffect as T, useId as E, useState as D } from "react";
|
|
31
31
|
//#region src/components/input/text_editor/TextEditor.jsx
|
|
32
32
|
var O = /* @__PURE__ */ e(n()), k = t(), A = ({ placeholder: e, onSubmit: t, sources: n, hideSubmit: A = !1, hideSourceAction: j = !1, onActivation: M, disabled: N = !1, handleChange: P, handleSourcesChange: F, shortBar: I = !1, active: L = !1, maxLength: R, disableRichText: z = !1, editorRef: ae, uid: B, allowedDomains: V = [], hideCharCount: H = !1, disableAutoActivate: U = !1, ...W }) => {
|
|
@@ -40,15 +40,15 @@ var O = /* @__PURE__ */ e(n()), k = t(), A = ({ placeholder: e, onSubmit: t, sou
|
|
|
40
40
|
G || (K(!0), M && M());
|
|
41
41
|
}, le = {
|
|
42
42
|
editable: !N,
|
|
43
|
-
theme:
|
|
43
|
+
theme: ne,
|
|
44
44
|
onError(e) {
|
|
45
45
|
console.error("TextEditor error:", e);
|
|
46
46
|
},
|
|
47
47
|
nodes: [
|
|
48
|
-
|
|
49
|
-
u,
|
|
48
|
+
s,
|
|
50
49
|
c,
|
|
51
|
-
|
|
50
|
+
g,
|
|
51
|
+
ee
|
|
52
52
|
]
|
|
53
53
|
}, ue = () => {
|
|
54
54
|
$();
|
|
@@ -61,7 +61,7 @@ var O = /* @__PURE__ */ e(n()), k = t(), A = ({ placeholder: e, onSubmit: t, sou
|
|
|
61
61
|
let n = q, r = oe, i = Y;
|
|
62
62
|
t && (e.preventDefault(), t(n, r, i)), X([]);
|
|
63
63
|
}, pe = () => {
|
|
64
|
-
ce(/* @__PURE__ */ (0, k.jsx)(
|
|
64
|
+
ce(/* @__PURE__ */ (0, k.jsx)(v, {
|
|
65
65
|
onAddSource: me,
|
|
66
66
|
allowedSources: V
|
|
67
67
|
}));
|
|
@@ -73,26 +73,26 @@ var O = /* @__PURE__ */ e(n()), k = t(), A = ({ placeholder: e, onSubmit: t, sou
|
|
|
73
73
|
title: e.title,
|
|
74
74
|
index: t
|
|
75
75
|
}, t), ge = () => /* @__PURE__ */ (0, k.jsx)("div", {
|
|
76
|
-
className:
|
|
76
|
+
className: y.editorPlaceholder,
|
|
77
77
|
children: e
|
|
78
78
|
});
|
|
79
|
-
return /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: [/* @__PURE__ */ (0, k.jsx)(
|
|
79
|
+
return /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: [/* @__PURE__ */ (0, k.jsx)(l, {
|
|
80
80
|
initialConfig: le,
|
|
81
81
|
children: /* @__PURE__ */ (0, k.jsx)("div", {
|
|
82
|
-
className:
|
|
82
|
+
className: y.editorContainer,
|
|
83
83
|
onClick: ue,
|
|
84
84
|
children: /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
85
|
-
className: (0, O.default)(
|
|
85
|
+
className: (0, O.default)(y.editorInner, { [y.editorInnerInactive]: !G && !L }),
|
|
86
86
|
children: [
|
|
87
|
-
/* @__PURE__ */ (0, k.jsx)(
|
|
88
|
-
contentEditable: /* @__PURE__ */ (0, k.jsx)(
|
|
89
|
-
className: (0, O.default)(
|
|
87
|
+
/* @__PURE__ */ (0, k.jsx)(_, {
|
|
88
|
+
contentEditable: /* @__PURE__ */ (0, k.jsx)(u, {
|
|
89
|
+
className: (0, O.default)(y.editorInput, { [y.editorInputInactive]: !G }),
|
|
90
90
|
...W
|
|
91
91
|
}),
|
|
92
92
|
placeholder: e && /* @__PURE__ */ (0, k.jsx)(ge, {}),
|
|
93
|
-
ErrorBoundary:
|
|
93
|
+
ErrorBoundary: f
|
|
94
94
|
}),
|
|
95
|
-
/* @__PURE__ */ (0, k.jsx)(
|
|
95
|
+
/* @__PURE__ */ (0, k.jsx)(w, {
|
|
96
96
|
hideSourceAction: j,
|
|
97
97
|
hideSubmit: A,
|
|
98
98
|
disableRichText: z,
|
|
@@ -106,9 +106,9 @@ var O = /* @__PURE__ */ e(n()), k = t(), A = ({ placeholder: e, onSubmit: t, sou
|
|
|
106
106
|
})
|
|
107
107
|
}),
|
|
108
108
|
G && R && !H && /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
109
|
-
className:
|
|
109
|
+
className: y.charactersCount,
|
|
110
110
|
children: [
|
|
111
|
-
/* @__PURE__ */ (0, k.jsx)(
|
|
111
|
+
/* @__PURE__ */ (0, k.jsx)(te, { maxLength: R }),
|
|
112
112
|
" ",
|
|
113
113
|
Z.formatMessage({
|
|
114
114
|
id: "input.remaining_chars",
|
|
@@ -116,29 +116,29 @@ var O = /* @__PURE__ */ e(n()), k = t(), A = ({ placeholder: e, onSubmit: t, sou
|
|
|
116
116
|
})
|
|
117
117
|
]
|
|
118
118
|
}),
|
|
119
|
-
/* @__PURE__ */ (0, k.jsx)(
|
|
120
|
-
/* @__PURE__ */ (0, k.jsx)(
|
|
121
|
-
/* @__PURE__ */ (0, k.jsx)(
|
|
119
|
+
/* @__PURE__ */ (0, k.jsx)(m, {}),
|
|
120
|
+
/* @__PURE__ */ (0, k.jsx)(p, {}),
|
|
121
|
+
/* @__PURE__ */ (0, k.jsx)(h, {
|
|
122
122
|
onChange: de,
|
|
123
123
|
ignoreSelectionChange: !0
|
|
124
124
|
}),
|
|
125
|
-
/* @__PURE__ */ (0, k.jsx)(
|
|
125
|
+
/* @__PURE__ */ (0, k.jsx)(re, {
|
|
126
126
|
onSetContent: U ? () => {} : $,
|
|
127
127
|
storageUid: B || Q
|
|
128
128
|
}),
|
|
129
|
-
/* @__PURE__ */ (0, k.jsx)(
|
|
130
|
-
/* @__PURE__ */ (0, k.jsx)(
|
|
131
|
-
/* @__PURE__ */ (0, k.jsx)(
|
|
132
|
-
R && /* @__PURE__ */ (0, k.jsx)(
|
|
133
|
-
/* @__PURE__ */ (0, k.jsx)(
|
|
134
|
-
/* @__PURE__ */ (0, k.jsx)(
|
|
129
|
+
/* @__PURE__ */ (0, k.jsx)(S, {}),
|
|
130
|
+
/* @__PURE__ */ (0, k.jsx)(C, {}),
|
|
131
|
+
/* @__PURE__ */ (0, k.jsx)(ie, {}),
|
|
132
|
+
R && /* @__PURE__ */ (0, k.jsx)(b, { maxLength: R }),
|
|
133
|
+
/* @__PURE__ */ (0, k.jsx)(x, { storageUid: B || Q }),
|
|
134
|
+
/* @__PURE__ */ (0, k.jsx)(d, { editorRef: ae })
|
|
135
135
|
]
|
|
136
136
|
})
|
|
137
137
|
})
|
|
138
138
|
}), n && n.length !== 0 ? /* @__PURE__ */ (0, k.jsx)("div", {
|
|
139
|
-
className:
|
|
139
|
+
className: y.sourcesBox,
|
|
140
140
|
children: /* @__PURE__ */ (0, k.jsx)("div", {
|
|
141
|
-
className:
|
|
141
|
+
className: y.sourceList,
|
|
142
142
|
children: n.map(he)
|
|
143
143
|
})
|
|
144
144
|
}) : null] });
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { lt as e, nt as t } from "../../../node_modules/.pnpm/@lexical_list@0.38.2/node_modules/@lexical/list/LexicalList.prod.js";
|
|
2
|
+
import { g as n } from "../../../node_modules/.pnpm/@lexical_html@0.38.2/node_modules/@lexical/html/LexicalHtml.prod.js";
|
|
3
|
+
import { Et as r } from "../../../node_modules/.pnpm/@lexical_rich-text@0.38.2/node_modules/@lexical/rich-text/LexicalRichText.prod.js";
|
|
4
4
|
import { t as i } from "../../../node_modules/.pnpm/@lexical_headless@0.38.2/node_modules/@lexical/headless/LexicalHeadless.prod.js";
|
|
5
5
|
import { purify as a } from "../../../node_modules/.pnpm/dompurify@3.3.3/node_modules/dompurify/dist/purify.es.js";
|
|
6
6
|
//#region src/components/input/text_editor/lexicalToHtml.js
|
|
7
7
|
var o = (o) => {
|
|
8
8
|
let s = null, c = i({
|
|
9
9
|
nodes: [
|
|
10
|
-
t,
|
|
11
10
|
r,
|
|
12
|
-
|
|
11
|
+
t,
|
|
12
|
+
e
|
|
13
13
|
],
|
|
14
14
|
onError: () => {}
|
|
15
15
|
}), l = c.parseEditorState(o);
|
|
16
16
|
return c.setEditorState(l), c.update(() => {
|
|
17
|
-
let
|
|
18
|
-
s = a.sanitize(
|
|
17
|
+
let e = n(c, null);
|
|
18
|
+
s = a.sanitize(e);
|
|
19
19
|
}), s;
|
|
20
20
|
};
|
|
21
21
|
//#endregion
|