@logora/debate 0.4.42 → 0.4.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/components/action/back_link/BackLink.module-B9Ok2t4H.css +1 -0
- package/dist/assets/components/action/button/Button.module-D7nbgOES.css +1 -0
- package/dist/assets/components/action/icon_text_link/IconTextLink.module-CZKufK9Y.css +1 -0
- package/dist/assets/components/argument/argument/Argument.module-CC40BY1L.css +1 -0
- package/dist/assets/components/argument/argument/ReplyFooter.module-CoC9dY8T.css +1 -0
- package/dist/assets/components/auth/sso_form/SSOForm.module-DOw9cmCF.css +1 -0
- package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-97r47y_e.css +1 -0
- package/dist/assets/components/debate/debate_box/DebateBox.module-emnqIGNF.css +1 -0
- package/dist/assets/components/dialog/dialog_box/DialogBox.module-ZoM8d2Ly.css +1 -0
- package/dist/assets/components/dialog/dropdown/Dropdown.module-BmT3rAwz.css +1 -0
- package/dist/assets/components/dialog/modal/Modal.module-Dt4SWx6U.css +1 -0
- package/dist/assets/components/dialog/toast/Toast.module-CW6j5xe7.css +1 -0
- package/dist/assets/components/dialog/tooltip/Tooltip.module-bQbmPiMf.css +1 -0
- package/dist/assets/components/embed/embed_header/EmbedHeader.module-C8RPiVBp.css +1 -0
- package/dist/assets/components/follow/follow_button/FollowButton.module-BjwLVTeb.css +1 -0
- package/dist/assets/components/gamification/badge_box/BadgeBox.module-DWqqtICw.css +1 -0
- package/dist/assets/components/gamification/point_box/{PointBox.module-BlHdQyht.css → PointBox.module-Dj6cCgSB.css} +1 -1
- package/dist/assets/components/information/information_box/InformationBox.module-DJLT957y.css +1 -0
- package/dist/assets/components/input/text_editor/TextEditor.module-KPtqT1Y6.css +1 -0
- package/dist/assets/components/input/text_editor/plugins/ToolbarPlugin.module-C3yG2biv.css +1 -0
- package/dist/assets/components/input/toggle_position/TogglePosition.module-H4gGmJ0V.css +1 -0
- package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-BDMBrj2Y.css +1 -0
- package/dist/assets/components/navigation/tabs/Tabs.module-50P6bk0B.css +1 -0
- package/dist/assets/components/notification/notification_item/NotificationItem.module-BQcDopYB.css +1 -0
- package/dist/assets/components/notification/notification_menu/NotificationMenu.module-DrCrfzVk.css +1 -0
- package/dist/assets/components/progress/progress_bar/ProgressBar.module-DoCH9Qoo.css +1 -0
- package/dist/assets/components/proposal/proposal_box/ProposalBox.module-D1ccjSLm.css +1 -0
- package/dist/assets/components/section/section_box/SectionBox.module-DF7k7Vxq.css +1 -0
- package/dist/assets/components/share/share_button/{ShareButton.module-BS6STEUD.css → ShareButton.module-BnVEYTzr.css} +1 -1
- package/dist/assets/components/skeleton/user_content_skeleton/UserContentSkeleton.module-d4r3QpYe.css +1 -0
- package/dist/assets/components/source/context_source_box/ContextSourceBox.module-doiSb_NR.css +1 -0
- package/dist/assets/components/source/context_source_list/ContextSourceList.module-Df4z4DN-.css +1 -0
- package/dist/assets/components/source/source_box/SourceBox.module-CQOBgJ5n.css +1 -0
- package/dist/assets/components/source/source_list_item/SourceListItem.module-C5YDjksb.css +1 -0
- package/dist/assets/components/suggestion/suggestion_banner/SuggestionBanner.module-P95xqaUA.css +1 -0
- package/dist/assets/components/suggestion/suggestion_box/SuggestionBox.module-CE_Wvk-K.css +1 -0
- package/dist/assets/components/suggestion/suggestion_input/SuggestionInput.module-r5N57bDp.css +1 -0
- package/dist/assets/components/summary/argument_summary_box/ArgumentSummaryBox.module-EDxcqwRa.css +1 -0
- package/dist/assets/components/summary/keyword_box/KeywordBox.module-yNHAvcRh.css +1 -0
- package/dist/assets/components/summary/summary_box/SummaryBox.module-Bu-AnMIG.css +1 -0
- package/dist/assets/components/text/read_more/ReadMore.module-Bs-YaspR.css +1 -0
- package/dist/assets/components/user/author_box/AuthorBox.module-B8Sl2v33.css +1 -0
- package/dist/assets/components/user/onboarding_modal/OnboardingModal.module-CTpt3xSh.css +1 -0
- package/dist/assets/components/user/user_box/UserBox.module-DMFhZDAH.css +1 -0
- package/dist/assets/components/user/user_box_small/UserBoxSmall.module-D4Ut5xmS.css +1 -0
- package/dist/assets/components/user_content/content_footer/ContentFooter.module-9A9E8k5l.css +1 -0
- package/dist/assets/components/user_content/content_header/ContentHeader.module-CXO2IRui.css +1 -0
- package/dist/assets/components/user_content/summary_content_box/SummaryContentBox.module-CBlL2Xii.css +1 -0
- package/dist/assets/components/user_content/use_report_content/ReportModal.module-mjFuOdmL.css +1 -0
- package/dist/assets/components/vote/suggestion_vote_box/SuggestionVoteBox.module-CKFriPV5.css +1 -0
- package/dist/assets/components/vote/vote_box/VoteBox.module-Bv7WY_vr.css +1 -0
- package/dist/assets/components/vote/vote_button/VoteButton.module-DqD79xv_.css +1 -0
- package/dist/components/action/back_link/BackLink.module.scss.js +1 -1
- package/dist/components/action/button/Button.module.scss.js +9 -9
- package/dist/components/action/icon_text_link/IconTextLink.module.scss.js +2 -2
- package/dist/components/argument/argument/Argument.js +120 -112
- package/dist/components/argument/argument/Argument.module.scss.js +40 -40
- package/dist/components/argument/argument/ReplyFooter.module.scss.js +8 -8
- package/dist/components/auth/auth_initializer/AuthInitializer.js +58 -41
- package/dist/components/auth/providers/FormAuth.js +6 -3
- package/dist/components/auth/providers/PasswordAuth.js +6 -6
- package/dist/components/auth/sso_form/SSOForm.module.scss.js +20 -20
- package/dist/components/auth/use_auth/base64.js +4 -0
- package/dist/components/auth/use_auth/useAuthActions.js +24 -24
- package/dist/components/consultation/consultation_box/ConsultationBox.js +4 -3
- package/dist/components/consultation/consultation_box/ConsultationBox.module.scss.js +25 -25
- package/dist/components/debate/debate_box/DebateBox.module.scss.js +20 -20
- package/dist/components/dialog/dialog_box/DialogBox.module.scss.js +14 -14
- package/dist/components/dialog/dropdown/Dropdown.js +19 -17
- package/dist/components/dialog/dropdown/Dropdown.module.scss.js +17 -13
- package/dist/components/dialog/modal/Modal.module.scss.js +9 -9
- package/dist/components/dialog/toast/Toast.module.scss.js +18 -18
- package/dist/components/dialog/tooltip/Tooltip.module.scss.js +8 -8
- package/dist/components/embed/embed_header/EmbedHeader.module.scss.js +18 -18
- package/dist/components/follow/follow_button/FollowButton.module.scss.js +1 -1
- package/dist/components/forms/use_form_validation/useFormValidation.js +1 -1
- package/dist/components/gamification/badge_box/BadgeBox.module.scss.js +18 -18
- package/dist/components/gamification/point_box/PointBox.module.scss.js +1 -1
- package/dist/components/icons/clarin_icons/Alarm.js +6 -0
- package/dist/components/icons/clarin_icons/Announcement.js +6 -0
- package/dist/components/icons/clarin_icons/Chat.js +6 -0
- package/dist/components/icons/clarin_icons/CheckCircle.js +9 -0
- package/dist/components/icons/clarin_icons/Clock.js +6 -0
- package/dist/components/icons/clarin_icons/Follow.js +6 -0
- package/dist/components/icons/clarin_icons/MobileClose.js +9 -0
- package/dist/components/icons/clarin_icons/Question.js +6 -0
- package/dist/components/icons/clarin_icons/Search.js +6 -0
- package/dist/components/icons/clarin_icons/Send.js +6 -0
- package/dist/components/icons/clarin_icons/Share.js +6 -0
- package/dist/components/icons/clarin_icons/Upvote.js +9 -0
- package/dist/components/icons/clarin_icons/User.js +9 -0
- package/dist/components/icons/clarin_icons/index.js +106 -0
- package/dist/components/information/information_box/InformationBox.module.scss.js +4 -4
- package/dist/components/input/argument_input/ArgumentInput.js +172 -167
- package/dist/components/input/text_editor/TextEditor.js +49 -47
- package/dist/components/input/text_editor/TextEditor.module.scss.js +28 -28
- package/dist/components/input/text_editor/plugins/IOSInsertParagraphFallbackPlugin.js +34 -0
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +143 -94
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.module.scss.js +19 -19
- package/dist/components/input/toggle_position/TogglePosition.module.scss.js +4 -4
- package/dist/components/list/paginated_list/PaginatedList.js +134 -124
- package/dist/components/list/paginated_list/action_bar/ActionBar.module.scss.js +12 -12
- package/dist/components/navbar/navbar_modal/NavbarModal.js +14 -14
- package/dist/components/navigation/tabs/Tabs.js +85 -24
- package/dist/components/navigation/tabs/Tabs.module.scss.js +19 -9
- package/dist/components/notification/notification_item/NotificationItem.module.scss.js +5 -5
- package/dist/components/notification/notification_menu/NotificationMenu.module.scss.js +2 -2
- package/dist/components/progress/progress_bar/ProgressBar.module.scss.js +10 -10
- package/dist/components/proposal/proposal_box/ProposalBox.js +58 -56
- package/dist/components/proposal/proposal_box/ProposalBox.module.scss.js +1 -1
- package/dist/components/section/section_box/SectionBox.module.scss.js +12 -12
- package/dist/components/share/share_button/ShareButton.js +26 -24
- package/dist/components/share/share_button/ShareButton.module.scss.js +5 -3
- package/dist/components/skeleton/user_content_skeleton/UserContentSkeleton.module.scss.js +4 -4
- package/dist/components/source/context_source_box/ContextSourceBox.module.scss.js +4 -4
- package/dist/components/source/context_source_list/ContextSourceList.module.scss.js +5 -5
- package/dist/components/source/source_box/SourceBox.module.scss.js +8 -8
- package/dist/components/source/source_list_item/SourceListItem.module.scss.js +7 -5
- package/dist/components/suggestion/suggestion_banner/SuggestionBanner.module.scss.js +5 -5
- package/dist/components/suggestion/suggestion_box/SuggestionBox.module.scss.js +1 -1
- package/dist/components/suggestion/suggestion_input/SuggestionInput.module.scss.js +9 -9
- package/dist/components/summary/argument_summary_box/ArgumentSummaryBox.module.scss.js +10 -10
- package/dist/components/summary/keyword_box/KeywordBox.module.scss.js +1 -1
- package/dist/components/summary/summary_box/SummaryBox.module.scss.js +8 -8
- package/dist/components/text/read_more/ReadMore.module.scss.js +4 -4
- package/dist/components/user/author_box/AuthorBox.js +18 -17
- package/dist/components/user/author_box/AuthorBox.module.scss.js +24 -24
- package/dist/components/user/onboarding_modal/OnboardingModal.js +296 -0
- package/dist/components/user/onboarding_modal/OnboardingModal.module.scss.js +29 -0
- package/dist/components/user/onboarding_modal/useOnboarding.js +80 -0
- package/dist/components/user/user_box/UserBox.js +48 -38
- package/dist/components/user/user_box/UserBox.module.scss.js +9 -9
- package/dist/components/user/user_box_small/UserBoxSmall.js +19 -18
- package/dist/components/user/user_box_small/UserBoxSmall.module.scss.js +6 -6
- package/dist/components/user_content/content_footer/ContentFooter.js +95 -92
- package/dist/components/user_content/content_footer/ContentFooter.module.scss.js +11 -11
- package/dist/components/user_content/content_header/ContentHeader.module.scss.js +22 -22
- package/dist/components/user_content/summary_content_box/SummaryContentBox.module.scss.js +1 -1
- package/dist/components/user_content/use_report_content/ReportModal.module.scss.js +8 -8
- package/dist/components/vote/suggestion_vote_box/SuggestionVoteBox.module.scss.js +1 -1
- package/dist/components/vote/vote_box/VoteBox.module.scss.js +42 -42
- package/dist/components/vote/vote_button/VoteButton.module.scss.js +5 -5
- package/dist/index.js +319 -312
- package/package.json +3 -2
- package/dist/assets/components/action/back_link/BackLink.module-nMAM5nvb.css +0 -1
- package/dist/assets/components/action/button/Button.module-BXkLuURK.css +0 -1
- package/dist/assets/components/action/icon_text_link/IconTextLink.module-B5PF-MMK.css +0 -1
- package/dist/assets/components/argument/argument/Argument.module-QZdPjj_i.css +0 -1
- package/dist/assets/components/argument/argument/ReplyFooter.module-x9Xlkt3Z.css +0 -1
- package/dist/assets/components/auth/sso_form/SSOForm.module-D5v2TrOv.css +0 -1
- package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-DjNiVt-p.css +0 -1
- package/dist/assets/components/debate/debate_box/DebateBox.module-DTLafpl4.css +0 -1
- package/dist/assets/components/dialog/dialog_box/DialogBox.module-DKztqqmb.css +0 -1
- package/dist/assets/components/dialog/dropdown/Dropdown.module-FG2Sqrqs.css +0 -1
- package/dist/assets/components/dialog/modal/Modal.module-CIj-xCzY.css +0 -1
- package/dist/assets/components/dialog/toast/Toast.module-DJ2wSlJT.css +0 -1
- package/dist/assets/components/dialog/tooltip/Tooltip.module-zMXumgnX.css +0 -1
- package/dist/assets/components/embed/embed_header/EmbedHeader.module-CoyRY_jw.css +0 -1
- package/dist/assets/components/follow/follow_button/FollowButton.module-C9YXM8AM.css +0 -1
- package/dist/assets/components/gamification/badge_box/BadgeBox.module-BnskGH9b.css +0 -1
- package/dist/assets/components/information/information_box/InformationBox.module-B_MiEPn7.css +0 -1
- package/dist/assets/components/input/text_editor/TextEditor.module-CxuSL3l3.css +0 -1
- package/dist/assets/components/input/text_editor/plugins/ToolbarPlugin.module-CbPmMciY.css +0 -1
- package/dist/assets/components/input/toggle_position/TogglePosition.module-DDIigbfA.css +0 -1
- package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-DvwCbS9k.css +0 -1
- package/dist/assets/components/navigation/tabs/Tabs.module-CtDi0tAd.css +0 -1
- package/dist/assets/components/notification/notification_item/NotificationItem.module-BWdhgSy4.css +0 -1
- package/dist/assets/components/notification/notification_menu/NotificationMenu.module-BQwbvRIV.css +0 -1
- package/dist/assets/components/progress/progress_bar/ProgressBar.module-Dy-27Wf9.css +0 -1
- package/dist/assets/components/proposal/proposal_box/ProposalBox.module-Dm8XDnr1.css +0 -1
- package/dist/assets/components/section/section_box/SectionBox.module-qQs4B6bf.css +0 -1
- package/dist/assets/components/skeleton/user_content_skeleton/UserContentSkeleton.module-DhZm1xTr.css +0 -1
- package/dist/assets/components/source/context_source_box/ContextSourceBox.module-78Gxjx0w.css +0 -1
- package/dist/assets/components/source/context_source_list/ContextSourceList.module-DUPbI-wb.css +0 -1
- package/dist/assets/components/source/source_box/SourceBox.module-Cu_m3E85.css +0 -1
- package/dist/assets/components/source/source_list_item/SourceListItem.module-fm_uHuY4.css +0 -1
- package/dist/assets/components/suggestion/suggestion_banner/SuggestionBanner.module-D37NVZLS.css +0 -1
- package/dist/assets/components/suggestion/suggestion_box/SuggestionBox.module-DHxoF0oe.css +0 -1
- package/dist/assets/components/suggestion/suggestion_input/SuggestionInput.module-BsEj7sF3.css +0 -1
- package/dist/assets/components/summary/argument_summary_box/ArgumentSummaryBox.module-DLcsyMSD.css +0 -1
- package/dist/assets/components/summary/keyword_box/KeywordBox.module-DHkYfW0l.css +0 -1
- package/dist/assets/components/summary/summary_box/SummaryBox.module-Dr9PevSJ.css +0 -1
- package/dist/assets/components/text/read_more/ReadMore.module-Ni_Mm8o8.css +0 -1
- package/dist/assets/components/user/author_box/AuthorBox.module-CbH2S-MT.css +0 -1
- package/dist/assets/components/user/update_user_info_modal/UpdateUserInfoModal.module-DJym6u4r.css +0 -1
- package/dist/assets/components/user/user_box/UserBox.module-DGKK1afI.css +0 -1
- package/dist/assets/components/user/user_box_small/UserBoxSmall.module-ibAw9gGE.css +0 -1
- package/dist/assets/components/user_content/content_footer/ContentFooter.module-ax3j7VNT.css +0 -1
- package/dist/assets/components/user_content/content_header/ContentHeader.module-B0VwpU-R.css +0 -1
- package/dist/assets/components/user_content/summary_content_box/SummaryContentBox.module-DdzWnPjq.css +0 -1
- package/dist/assets/components/user_content/use_report_content/ReportModal.module-BxF-D5C5.css +0 -1
- package/dist/assets/components/vote/suggestion_vote_box/SuggestionVoteBox.module-CZeQKWIw.css +0 -1
- package/dist/assets/components/vote/vote_box/VoteBox.module-D5sSSHpi.css +0 -1
- package/dist/assets/components/vote/vote_button/VoteButton.module-aP9ZrGSd.css +0 -1
- package/dist/components/user/update_user_info_modal/UpdateUserInfoModal.js +0 -291
- package/dist/components/user/update_user_info_modal/UpdateUserInfoModal.module.scss.js +0 -29
- package/dist/components/user/update_user_info_modal/useUpdateUserInfo.js +0 -27
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import '../../../assets/components/user/onboarding_modal/OnboardingModal.module-CTpt3xSh.css';const t = "_container_4q5jx_3", n = "_nameContainer_4q5jx_22", e = "_inputsContainer_4q5jx_48", o = "_hint_4q5jx_61", _ = "_langSelect_4q5jx_67", a = "_textArea_4q5jx_71", c = "_userSaveBox_4q5jx_129", r = "_userPictureUpload_4q5jx_138", s = "_userImageContainer_4q5jx_156", u = "_backButton_4q5jx_172", i = "_toggle_4q5jx_179", x = "_cgu_4q5jx_184", g = {
|
|
2
|
+
container: t,
|
|
3
|
+
nameContainer: n,
|
|
4
|
+
inputsContainer: e,
|
|
5
|
+
hint: o,
|
|
6
|
+
langSelect: _,
|
|
7
|
+
textArea: a,
|
|
8
|
+
userSaveBox: c,
|
|
9
|
+
userPictureUpload: r,
|
|
10
|
+
userImageContainer: s,
|
|
11
|
+
backButton: u,
|
|
12
|
+
toggle: i,
|
|
13
|
+
cgu: x
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
u as backButton,
|
|
17
|
+
x as cgu,
|
|
18
|
+
t as container,
|
|
19
|
+
g as default,
|
|
20
|
+
o as hint,
|
|
21
|
+
e as inputsContainer,
|
|
22
|
+
_ as langSelect,
|
|
23
|
+
n as nameContainer,
|
|
24
|
+
a as textArea,
|
|
25
|
+
i as toggle,
|
|
26
|
+
s as userImageContainer,
|
|
27
|
+
r as userPictureUpload,
|
|
28
|
+
c as userSaveBox
|
|
29
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { jsx as B } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useEffect as S } from "react";
|
|
3
|
+
import { OnboardingModal as E } from "./OnboardingModal.js";
|
|
4
|
+
import { useAuth as I } from "../../auth/use_auth/useAuth.js";
|
|
5
|
+
import { useModal as A } from "../../dialog/modal/useModal.js";
|
|
6
|
+
import { useDataProvider as U } from "../../data/data_provider/useDataProvider.js";
|
|
7
|
+
import { useConfig as C } from "../../data/config_provider/useConfig.js";
|
|
8
|
+
const i = "logora:onboardingBeforeLogin", g = (t) => t ? `${i}:${t}` : i, T = (t, r) => {
|
|
9
|
+
typeof window > "u" || !window.sessionStorage || window.sessionStorage.setItem(
|
|
10
|
+
g(t),
|
|
11
|
+
JSON.stringify(r)
|
|
12
|
+
);
|
|
13
|
+
}, x = () => {
|
|
14
|
+
const t = I(), { currentUser: r, isLoggedIn: f } = t, { showModal: b, isModalPresent: u } = A(), _ = U(), n = C(), [a, d] = w(!1), [l, O] = w(!1), h = () => {
|
|
15
|
+
b(
|
|
16
|
+
/* @__PURE__ */ B(
|
|
17
|
+
E,
|
|
18
|
+
{
|
|
19
|
+
showEmailConsent: n.auth?.showEmailConsent,
|
|
20
|
+
showTerms: n.auth?.hideCgu !== !0,
|
|
21
|
+
termsUrl: n.provider?.cguUrl || "https://www.logora.com/blog-posts/cgu",
|
|
22
|
+
privacyUrl: n.provider?.privacyUrl || "https://www.logora.com/blog-posts/privacy-policy"
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
S(() => {
|
|
28
|
+
if (!a && !u && f && r?.is_onboarded === !1 && n.auth?.showOnboarding === !0) {
|
|
29
|
+
if (v()) {
|
|
30
|
+
y();
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
h();
|
|
34
|
+
}
|
|
35
|
+
}, [u, f, r?.slug, r?.is_onboarded, n.auth?.showOnboarding, a, l]);
|
|
36
|
+
const p = () => {
|
|
37
|
+
if (typeof window > "u" || !window.sessionStorage)
|
|
38
|
+
return null;
|
|
39
|
+
const e = window.sessionStorage.getItem(g(n.shortname)) || window.sessionStorage.getItem(i);
|
|
40
|
+
if (!e)
|
|
41
|
+
return null;
|
|
42
|
+
try {
|
|
43
|
+
const o = JSON.parse(e);
|
|
44
|
+
return o && typeof o == "object" ? o : { accepts_terms: !0 };
|
|
45
|
+
} catch {
|
|
46
|
+
return { accepts_terms: e === "true" };
|
|
47
|
+
}
|
|
48
|
+
}, c = () => {
|
|
49
|
+
typeof window > "u" || !window.sessionStorage || (window.sessionStorage.removeItem(g(n.shortname)), window.sessionStorage.removeItem(i));
|
|
50
|
+
}, v = () => {
|
|
51
|
+
if (a || l || n.auth?.showOnboardingBeforeLogin !== !0 || !r?.slug)
|
|
52
|
+
return !1;
|
|
53
|
+
const e = p();
|
|
54
|
+
return e?.accepts_terms === !0 || e?.acceptsTerms === !0;
|
|
55
|
+
}, y = () => {
|
|
56
|
+
const e = p();
|
|
57
|
+
if (!e)
|
|
58
|
+
return;
|
|
59
|
+
const o = {
|
|
60
|
+
accepts_terms: !0,
|
|
61
|
+
is_onboarded: !0
|
|
62
|
+
};
|
|
63
|
+
e.accepts_provider_email !== void 0 ? o.accepts_provider_email = e.accepts_provider_email : e.acceptsProviderEmail !== void 0 && (o.accepts_provider_email = e.acceptsProviderEmail), e.first_name && !r.first_name && (o.first_name = e.first_name), e.last_name && !r.last_name && (o.last_name = e.last_name);
|
|
64
|
+
const m = new FormData();
|
|
65
|
+
Object.entries(o).forEach(([s, L]) => {
|
|
66
|
+
m.append(s, L);
|
|
67
|
+
}), d(!0), O(!0), _.update("users", r.slug, m).then((s) => {
|
|
68
|
+
d(!1), s.data.success ? (c(), t.setCurrentUser(s.data.data.resource)) : c();
|
|
69
|
+
}).catch(() => {
|
|
70
|
+
c(), d(!1);
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
return null;
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
i as ONBOARDING_BEFORE_LOGIN_STORAGE_KEY,
|
|
77
|
+
g as getOnboardingBeforeLoginStorageKey,
|
|
78
|
+
T as saveOnboardingBeforeLogin,
|
|
79
|
+
x as useOnboarding
|
|
80
|
+
};
|
|
@@ -1,73 +1,83 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as i, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import c from "classnames";
|
|
3
3
|
import "react";
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import
|
|
6
|
-
import { useRoutes as
|
|
7
|
-
import {
|
|
8
|
-
import { Avatar as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
import { useIntl as d, FormattedMessage as r } from "react-intl";
|
|
5
|
+
import s from "./UserBox.module.scss.js";
|
|
6
|
+
import { useRoutes as m } from "../../data/config_provider/useRoutes.js";
|
|
7
|
+
import { useConfig as _ } from "../../data/config_provider/useConfig.js";
|
|
8
|
+
import { Avatar as l } from "../avatar/Avatar.js";
|
|
9
|
+
import { Link as o } from "../../action/link/Link.js";
|
|
10
|
+
const B = ({ user: e }) => {
|
|
11
|
+
const n = d(), t = m(), u = _()?.layout?.disableProfileLinks === !0;
|
|
12
|
+
return /* @__PURE__ */ i("div", { className: c(s.userBox, "author-box"), children: [
|
|
13
|
+
/* @__PURE__ */ a("div", { className: s.userBoxHeader, children: u ? /* @__PURE__ */ a(
|
|
14
|
+
l,
|
|
14
15
|
{
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
"data-tid": "action_view_user_image",
|
|
17
|
+
userName: e.full_name,
|
|
18
|
+
avatarUrl: e.image_url,
|
|
19
|
+
isOnline: new Date(e.last_activity) > Date.now(),
|
|
20
|
+
size: 60
|
|
21
|
+
}
|
|
22
|
+
) : /* @__PURE__ */ a(
|
|
23
|
+
o,
|
|
24
|
+
{
|
|
25
|
+
to: t.userShowLocation.toUrl({ userSlug: e.hash_id }),
|
|
26
|
+
"aria-label": n.formatMessage({
|
|
17
27
|
id: "user.user_box.author_link.aria_label",
|
|
18
28
|
defaultMessage: "View profile"
|
|
19
29
|
}),
|
|
20
|
-
children: /* @__PURE__ */
|
|
21
|
-
|
|
30
|
+
children: /* @__PURE__ */ a(
|
|
31
|
+
l,
|
|
22
32
|
{
|
|
23
33
|
"data-tid": "action_view_user_image",
|
|
24
|
-
userName:
|
|
25
|
-
avatarUrl:
|
|
26
|
-
isOnline: new Date(
|
|
34
|
+
userName: e.full_name,
|
|
35
|
+
avatarUrl: e.image_url,
|
|
36
|
+
isOnline: new Date(e.last_activity) > Date.now(),
|
|
27
37
|
size: 60
|
|
28
38
|
}
|
|
29
39
|
)
|
|
30
40
|
}
|
|
31
41
|
) }),
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ i("div", { className: s.userBoxDescription, children: [
|
|
43
|
+
/* @__PURE__ */ a(o, { to: t.userShowLocation.toUrl({ userSlug: e.hash_id }), children: /* @__PURE__ */ a(
|
|
34
44
|
"div",
|
|
35
45
|
{
|
|
36
46
|
"data-tid": "action_view_user_name",
|
|
37
|
-
className:
|
|
38
|
-
title:
|
|
39
|
-
children:
|
|
47
|
+
className: s.userBoxName,
|
|
48
|
+
title: e.full_name,
|
|
49
|
+
children: e.full_name
|
|
40
50
|
}
|
|
41
51
|
) }),
|
|
42
|
-
|
|
43
|
-
|
|
52
|
+
e.role === "contributor" && /* @__PURE__ */ a(
|
|
53
|
+
o,
|
|
44
54
|
{
|
|
45
|
-
to:
|
|
55
|
+
to: t.userShowLocation.toUrl({ userSlug: e.hash_id }),
|
|
46
56
|
hash: "activity",
|
|
47
|
-
children: /* @__PURE__ */
|
|
48
|
-
|
|
57
|
+
children: /* @__PURE__ */ a("div", { className: s.userBoxPoints, children: /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(
|
|
58
|
+
r,
|
|
49
59
|
{
|
|
50
60
|
id: "user.user_box.points",
|
|
51
|
-
values: { count:
|
|
61
|
+
values: { count: e.points },
|
|
52
62
|
defaultMessage: "{count} points"
|
|
53
63
|
}
|
|
54
64
|
) }) })
|
|
55
65
|
}
|
|
56
66
|
),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
67
|
+
/* @__PURE__ */ a(o, { to: t.userShowLocation.toUrl({ userSlug: e.hash_id }), children: /* @__PURE__ */ i("div", { className: s.userBoxStats, children: [
|
|
68
|
+
/* @__PURE__ */ a("div", { className: s.userDebates, children: /* @__PURE__ */ a(
|
|
69
|
+
r,
|
|
60
70
|
{
|
|
61
71
|
id: "user.user_box.user_arguments",
|
|
62
|
-
values: { count:
|
|
72
|
+
values: { count: e.messages_count },
|
|
63
73
|
defaultMessage: "{count} arguments"
|
|
64
74
|
}
|
|
65
75
|
) }),
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
76
|
+
/* @__PURE__ */ a("div", { className: s.userVotes, children: /* @__PURE__ */ a(
|
|
77
|
+
r,
|
|
68
78
|
{
|
|
69
79
|
id: "user.user_box.user_votes",
|
|
70
|
-
values: { count:
|
|
80
|
+
values: { count: e.upvotes },
|
|
71
81
|
defaultMessage: "{count} votes"
|
|
72
82
|
}
|
|
73
83
|
) })
|
|
@@ -76,5 +86,5 @@ const N = ({ user: s }) => {
|
|
|
76
86
|
] });
|
|
77
87
|
};
|
|
78
88
|
export {
|
|
79
|
-
|
|
89
|
+
B as UserBox
|
|
80
90
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import '../../../assets/components/user/user_box/UserBox.module-
|
|
2
|
-
userBox:
|
|
1
|
+
import '../../../assets/components/user/user_box/UserBox.module-DMFhZDAH.css';const e = "_userBox_ifte1_3", s = "_userBoxHeader_ifte1_20", o = "_userBoxDescription_ifte1_44", t = "_userBoxName_ifte1_53", r = "_userBoxPoints_ifte1_71", u = "_userBoxStats_ifte1_82", x = {
|
|
2
|
+
userBox: e,
|
|
3
3
|
userBoxHeader: s,
|
|
4
|
-
userBoxDescription:
|
|
5
|
-
userBoxName:
|
|
6
|
-
userBoxPoints:
|
|
4
|
+
userBoxDescription: o,
|
|
5
|
+
userBoxName: t,
|
|
6
|
+
userBoxPoints: r,
|
|
7
7
|
userBoxStats: u
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
10
|
x as default,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
e as userBox,
|
|
12
|
+
o as userBoxDescription,
|
|
13
13
|
s as userBoxHeader,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
t as userBoxName,
|
|
15
|
+
r as userBoxPoints,
|
|
16
16
|
u as userBoxStats
|
|
17
17
|
};
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import u from "classnames";
|
|
3
3
|
import "react";
|
|
4
|
-
import { useIntl as
|
|
4
|
+
import { useIntl as f } from "react-intl";
|
|
5
5
|
import r from "./UserBoxSmall.module.scss.js";
|
|
6
|
-
import { useRoutes as
|
|
7
|
-
import {
|
|
8
|
-
import { Avatar as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
import { useRoutes as h } from "../../data/config_provider/useRoutes.js";
|
|
7
|
+
import { useConfig as d } from "../../data/config_provider/useConfig.js";
|
|
8
|
+
import { Avatar as l } from "../avatar/Avatar.js";
|
|
9
|
+
import { Link as n } from "../../action/link/Link.js";
|
|
10
|
+
const N = ({ userName: a, avatarUrl: t, userSlug: e }) => {
|
|
11
|
+
const i = f(), s = h(), m = d()?.layout?.disableProfileLinks === !0;
|
|
12
|
+
return /* @__PURE__ */ c("div", { className: u(r.authorContainer, "author-box"), children: [
|
|
13
|
+
m ? /* @__PURE__ */ o("div", { className: r.authorLink, children: /* @__PURE__ */ o(l, { avatarUrl: t, userName: a, size: 25 }) }) : /* @__PURE__ */ o(
|
|
14
|
+
n,
|
|
14
15
|
{
|
|
15
|
-
to: s.userShowLocation.toUrl({ userSlug:
|
|
16
|
+
to: s.userShowLocation.toUrl({ userSlug: e }),
|
|
16
17
|
className: r.authorLink,
|
|
17
18
|
target: "_top",
|
|
18
|
-
"aria-label":
|
|
19
|
+
"aria-label": i.formatMessage({
|
|
19
20
|
id: "user.user_box_small.author_link.aria_label",
|
|
20
21
|
defaultMessage: "View profile"
|
|
21
22
|
}),
|
|
22
|
-
children: /* @__PURE__ */ o(
|
|
23
|
+
children: /* @__PURE__ */ o(l, { avatarUrl: t, userName: a, size: 25 })
|
|
23
24
|
}
|
|
24
25
|
),
|
|
25
26
|
/* @__PURE__ */ o("div", { className: r.authorName, children: /* @__PURE__ */ o(
|
|
26
|
-
|
|
27
|
+
n,
|
|
27
28
|
{
|
|
28
|
-
to: s.userShowLocation.toUrl({ userSlug:
|
|
29
|
+
to: s.userShowLocation.toUrl({ userSlug: e }),
|
|
29
30
|
className: r.authorLink,
|
|
30
31
|
target: "_top",
|
|
31
|
-
"aria-label":
|
|
32
|
+
"aria-label": i.formatMessage({
|
|
32
33
|
id: "user.user_box_small.author_link.aria_label",
|
|
33
34
|
defaultMessage: "View profile"
|
|
34
35
|
}),
|
|
@@ -38,5 +39,5 @@ const L = ({ userName: a, avatarUrl: l, userSlug: t }) => {
|
|
|
38
39
|
] });
|
|
39
40
|
};
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
N as UserBoxSmall
|
|
42
43
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import '../../../assets/components/user/user_box_small/UserBoxSmall.module-
|
|
2
|
-
authorContainer:
|
|
3
|
-
authorName:
|
|
1
|
+
import '../../../assets/components/user/user_box_small/UserBoxSmall.module-D4Ut5xmS.css';const t = "_authorContainer_sb0ix_3", a = "_authorName_sb0ix_9", o = {
|
|
2
|
+
authorContainer: t,
|
|
3
|
+
authorName: a
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
t as authorContainer,
|
|
7
|
+
a as authorName,
|
|
8
|
+
o as default
|
|
9
9
|
};
|