@logora/debate 0.4.41 → 0.4.42
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-nMAM5nvb.css +1 -0
- package/dist/assets/components/action/button/Button.module-BXkLuURK.css +1 -0
- package/dist/assets/components/action/icon_text_link/IconTextLink.module-B5PF-MMK.css +1 -0
- package/dist/assets/components/argument/argument/Argument.module-QZdPjj_i.css +1 -0
- package/dist/assets/components/argument/argument/ReplyFooter.module-x9Xlkt3Z.css +1 -0
- package/dist/assets/components/auth/sso_form/SSOForm.module-D5v2TrOv.css +1 -0
- package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-DjNiVt-p.css +1 -0
- package/dist/assets/components/debate/debate_box/DebateBox.module-DTLafpl4.css +1 -0
- package/dist/assets/components/dialog/dialog_box/DialogBox.module-DKztqqmb.css +1 -0
- package/dist/assets/components/dialog/dropdown/Dropdown.module-FG2Sqrqs.css +1 -0
- package/dist/assets/components/dialog/modal/Modal.module-CIj-xCzY.css +1 -0
- package/dist/assets/components/dialog/toast/Toast.module-DJ2wSlJT.css +1 -0
- package/dist/assets/components/dialog/tooltip/Tooltip.module-zMXumgnX.css +1 -0
- package/dist/assets/components/embed/embed_header/EmbedHeader.module-CoyRY_jw.css +1 -0
- package/dist/assets/components/follow/follow_button/FollowButton.module-C9YXM8AM.css +1 -0
- package/dist/assets/components/gamification/badge_box/BadgeBox.module-BnskGH9b.css +1 -0
- package/dist/assets/components/gamification/point_box/{PointBox.module-Dj6cCgSB.css → PointBox.module-BlHdQyht.css} +1 -1
- package/dist/assets/components/information/information_box/InformationBox.module-B_MiEPn7.css +1 -0
- package/dist/assets/components/input/text_editor/TextEditor.module-CxuSL3l3.css +1 -0
- package/dist/assets/components/input/text_editor/plugins/ToolbarPlugin.module-CbPmMciY.css +1 -0
- package/dist/assets/components/input/toggle_position/TogglePosition.module-DDIigbfA.css +1 -0
- package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-DvwCbS9k.css +1 -0
- package/dist/assets/components/navigation/tabs/Tabs.module-CtDi0tAd.css +1 -0
- package/dist/assets/components/notification/notification_item/NotificationItem.module-BWdhgSy4.css +1 -0
- package/dist/assets/components/notification/notification_menu/NotificationMenu.module-BQwbvRIV.css +1 -0
- package/dist/assets/components/progress/progress_bar/ProgressBar.module-Dy-27Wf9.css +1 -0
- package/dist/assets/components/proposal/proposal_box/ProposalBox.module-Dm8XDnr1.css +1 -0
- package/dist/assets/components/section/section_box/SectionBox.module-qQs4B6bf.css +1 -0
- package/dist/assets/components/share/share_button/{ShareButton.module-BnVEYTzr.css → ShareButton.module-BS6STEUD.css} +1 -1
- package/dist/assets/components/skeleton/user_content_skeleton/UserContentSkeleton.module-DhZm1xTr.css +1 -0
- package/dist/assets/components/source/context_source_box/ContextSourceBox.module-78Gxjx0w.css +1 -0
- package/dist/assets/components/source/context_source_list/ContextSourceList.module-DUPbI-wb.css +1 -0
- package/dist/assets/components/source/source_box/SourceBox.module-Cu_m3E85.css +1 -0
- package/dist/assets/components/source/source_list_item/SourceListItem.module-fm_uHuY4.css +1 -0
- package/dist/assets/components/suggestion/suggestion_banner/SuggestionBanner.module-D37NVZLS.css +1 -0
- package/dist/assets/components/suggestion/suggestion_box/SuggestionBox.module-DHxoF0oe.css +1 -0
- package/dist/assets/components/suggestion/suggestion_input/SuggestionInput.module-BsEj7sF3.css +1 -0
- package/dist/assets/components/summary/argument_summary_box/ArgumentSummaryBox.module-DLcsyMSD.css +1 -0
- package/dist/assets/components/summary/keyword_box/KeywordBox.module-DHkYfW0l.css +1 -0
- package/dist/assets/components/summary/summary_box/SummaryBox.module-Dr9PevSJ.css +1 -0
- package/dist/assets/components/text/read_more/ReadMore.module-Ni_Mm8o8.css +1 -0
- package/dist/assets/components/user/author_box/AuthorBox.module-CbH2S-MT.css +1 -0
- package/dist/assets/components/user/update_user_info_modal/UpdateUserInfoModal.module-DJym6u4r.css +1 -0
- package/dist/assets/components/user/user_box/UserBox.module-DGKK1afI.css +1 -0
- package/dist/assets/components/user/user_box_small/UserBoxSmall.module-ibAw9gGE.css +1 -0
- package/dist/assets/components/user_content/content_footer/ContentFooter.module-ax3j7VNT.css +1 -0
- package/dist/assets/components/user_content/content_header/ContentHeader.module-B0VwpU-R.css +1 -0
- package/dist/assets/components/user_content/summary_content_box/SummaryContentBox.module-DdzWnPjq.css +1 -0
- package/dist/assets/components/user_content/use_report_content/ReportModal.module-BxF-D5C5.css +1 -0
- package/dist/assets/components/vote/suggestion_vote_box/SuggestionVoteBox.module-CZeQKWIw.css +1 -0
- package/dist/assets/components/vote/vote_box/VoteBox.module-D5sSSHpi.css +1 -0
- package/dist/assets/components/vote/vote_button/VoteButton.module-aP9ZrGSd.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 +112 -120
- 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 +41 -59
- package/dist/components/auth/providers/FormAuth.js +3 -6
- 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/useAuthActions.js +24 -24
- package/dist/components/consultation/consultation_box/ConsultationBox.js +3 -4
- 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 +17 -19
- package/dist/components/dialog/dropdown/Dropdown.module.scss.js +13 -17
- 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/information/information_box/InformationBox.module.scss.js +4 -4
- package/dist/components/input/argument_input/ArgumentInput.js +167 -172
- package/dist/components/input/text_editor/TextEditor.js +47 -49
- package/dist/components/input/text_editor/TextEditor.module.scss.js +28 -28
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +94 -143
- 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 +124 -134
- 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 +24 -85
- package/dist/components/navigation/tabs/Tabs.module.scss.js +9 -19
- 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 +56 -58
- 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 +24 -26
- package/dist/components/share/share_button/ShareButton.module.scss.js +3 -5
- 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 +5 -7
- 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 +17 -18
- package/dist/components/user/author_box/AuthorBox.module.scss.js +24 -24
- package/dist/components/user/{onboarding_modal/OnboardingModal.js → update_user_info_modal/UpdateUserInfoModal.js} +110 -115
- package/dist/components/user/update_user_info_modal/UpdateUserInfoModal.module.scss.js +29 -0
- package/dist/components/user/update_user_info_modal/useUpdateUserInfo.js +27 -0
- package/dist/components/user/user_box/UserBox.js +38 -48
- package/dist/components/user/user_box/UserBox.module.scss.js +9 -9
- package/dist/components/user/user_box_small/UserBoxSmall.js +18 -19
- package/dist/components/user/user_box_small/UserBoxSmall.module.scss.js +6 -6
- package/dist/components/user_content/content_footer/ContentFooter.js +92 -95
- 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 +320 -324
- package/package.json +1 -1
- package/dist/assets/components/action/back_link/BackLink.module-B9Ok2t4H.css +0 -1
- package/dist/assets/components/action/button/Button.module-D7nbgOES.css +0 -1
- package/dist/assets/components/action/icon_text_link/IconTextLink.module-CZKufK9Y.css +0 -1
- package/dist/assets/components/argument/argument/Argument.module-CC40BY1L.css +0 -1
- package/dist/assets/components/argument/argument/ReplyFooter.module-CoC9dY8T.css +0 -1
- package/dist/assets/components/auth/sso_form/SSOForm.module-DOw9cmCF.css +0 -1
- package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-97r47y_e.css +0 -1
- package/dist/assets/components/debate/debate_box/DebateBox.module-emnqIGNF.css +0 -1
- package/dist/assets/components/dialog/dialog_box/DialogBox.module-ZoM8d2Ly.css +0 -1
- package/dist/assets/components/dialog/dropdown/Dropdown.module-BmT3rAwz.css +0 -1
- package/dist/assets/components/dialog/modal/Modal.module-Dt4SWx6U.css +0 -1
- package/dist/assets/components/dialog/toast/Toast.module-CW6j5xe7.css +0 -1
- package/dist/assets/components/dialog/tooltip/Tooltip.module-bQbmPiMf.css +0 -1
- package/dist/assets/components/embed/embed_header/EmbedHeader.module-C8RPiVBp.css +0 -1
- package/dist/assets/components/follow/follow_button/FollowButton.module-BjwLVTeb.css +0 -1
- package/dist/assets/components/gamification/badge_box/BadgeBox.module-DWqqtICw.css +0 -1
- package/dist/assets/components/information/information_box/InformationBox.module-DJLT957y.css +0 -1
- package/dist/assets/components/input/text_editor/TextEditor.module-KPtqT1Y6.css +0 -1
- package/dist/assets/components/input/text_editor/plugins/ToolbarPlugin.module-C3yG2biv.css +0 -1
- package/dist/assets/components/input/toggle_position/TogglePosition.module-H4gGmJ0V.css +0 -1
- package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-BDMBrj2Y.css +0 -1
- package/dist/assets/components/navigation/tabs/Tabs.module-50P6bk0B.css +0 -1
- package/dist/assets/components/notification/notification_item/NotificationItem.module-BQcDopYB.css +0 -1
- package/dist/assets/components/notification/notification_menu/NotificationMenu.module-DrCrfzVk.css +0 -1
- package/dist/assets/components/progress/progress_bar/ProgressBar.module-DoCH9Qoo.css +0 -1
- package/dist/assets/components/proposal/proposal_box/ProposalBox.module-D1ccjSLm.css +0 -1
- package/dist/assets/components/section/section_box/SectionBox.module-DF7k7Vxq.css +0 -1
- package/dist/assets/components/skeleton/user_content_skeleton/UserContentSkeleton.module-d4r3QpYe.css +0 -1
- package/dist/assets/components/source/context_source_box/ContextSourceBox.module-doiSb_NR.css +0 -1
- package/dist/assets/components/source/context_source_list/ContextSourceList.module-Df4z4DN-.css +0 -1
- package/dist/assets/components/source/source_box/SourceBox.module-CQOBgJ5n.css +0 -1
- package/dist/assets/components/source/source_list_item/SourceListItem.module-C5YDjksb.css +0 -1
- package/dist/assets/components/suggestion/suggestion_banner/SuggestionBanner.module-P95xqaUA.css +0 -1
- package/dist/assets/components/suggestion/suggestion_box/SuggestionBox.module-CE_Wvk-K.css +0 -1
- package/dist/assets/components/suggestion/suggestion_input/SuggestionInput.module-r5N57bDp.css +0 -1
- package/dist/assets/components/summary/argument_summary_box/ArgumentSummaryBox.module-EDxcqwRa.css +0 -1
- package/dist/assets/components/summary/keyword_box/KeywordBox.module-yNHAvcRh.css +0 -1
- package/dist/assets/components/summary/summary_box/SummaryBox.module-Bu-AnMIG.css +0 -1
- package/dist/assets/components/text/read_more/ReadMore.module-Bs-YaspR.css +0 -1
- package/dist/assets/components/user/author_box/AuthorBox.module-B8Sl2v33.css +0 -1
- package/dist/assets/components/user/onboarding_modal/OnboardingModal.module-CTpt3xSh.css +0 -1
- package/dist/assets/components/user/user_box/UserBox.module-DMFhZDAH.css +0 -1
- package/dist/assets/components/user/user_box_small/UserBoxSmall.module-D4Ut5xmS.css +0 -1
- package/dist/assets/components/user_content/content_footer/ContentFooter.module-9A9E8k5l.css +0 -1
- package/dist/assets/components/user_content/content_header/ContentHeader.module-CXO2IRui.css +0 -1
- package/dist/assets/components/user_content/summary_content_box/SummaryContentBox.module-CBlL2Xii.css +0 -1
- package/dist/assets/components/user_content/use_report_content/ReportModal.module-mjFuOdmL.css +0 -1
- package/dist/assets/components/vote/suggestion_vote_box/SuggestionVoteBox.module-CKFriPV5.css +0 -1
- package/dist/assets/components/vote/vote_box/VoteBox.module-Bv7WY_vr.css +0 -1
- package/dist/assets/components/vote/vote_button/VoteButton.module-DqD79xv_.css +0 -1
- package/dist/components/auth/use_auth/base64.js +0 -4
- package/dist/components/icons/clarin_icons/Alarm.js +0 -6
- package/dist/components/icons/clarin_icons/Announcement.js +0 -6
- package/dist/components/icons/clarin_icons/Chat.js +0 -6
- package/dist/components/icons/clarin_icons/CheckCircle.js +0 -9
- package/dist/components/icons/clarin_icons/Clock.js +0 -6
- package/dist/components/icons/clarin_icons/Follow.js +0 -6
- package/dist/components/icons/clarin_icons/MobileClose.js +0 -9
- package/dist/components/icons/clarin_icons/Question.js +0 -6
- package/dist/components/icons/clarin_icons/Search.js +0 -6
- package/dist/components/icons/clarin_icons/Send.js +0 -6
- package/dist/components/icons/clarin_icons/Share.js +0 -6
- package/dist/components/icons/clarin_icons/Upvote.js +0 -9
- package/dist/components/icons/clarin_icons/User.js +0 -9
- package/dist/components/icons/clarin_icons/index.js +0 -106
- package/dist/components/input/text_editor/plugins/IOSInsertParagraphFallbackPlugin.js +0 -34
- package/dist/components/user/onboarding_modal/OnboardingModal.module.scss.js +0 -29
- package/dist/components/user/onboarding_modal/useOnboarding.js +0 -27
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import '../../../../assets/components/input/text_editor/plugins/ToolbarPlugin.module-
|
|
2
|
-
toolbar:
|
|
3
|
-
toolbarIsActive:
|
|
4
|
-
iconToolbar:
|
|
5
|
-
shortBar:
|
|
6
|
-
toolbarItem:
|
|
7
|
-
active:
|
|
1
|
+
import '../../../../assets/components/input/text_editor/plugins/ToolbarPlugin.module-CbPmMciY.css';const o = "_toolbar_qbyoz_3", t = "_toolbarIsActive_qbyoz_13", n = "_iconToolbar_qbyoz_17", _ = "_shortBar_qbyoz_21", c = "_toolbarItem_qbyoz_25", b = "_active_qbyoz_35", i = "_format_qbyoz_39", a = "_actionButton_qbyoz_46", s = "_inputSubmitActionButton_qbyoz_52", r = "_submitAction_qbyoz_60", u = {
|
|
2
|
+
toolbar: o,
|
|
3
|
+
toolbarIsActive: t,
|
|
4
|
+
iconToolbar: n,
|
|
5
|
+
shortBar: _,
|
|
6
|
+
toolbarItem: c,
|
|
7
|
+
active: b,
|
|
8
8
|
format: i,
|
|
9
|
-
actionButton:
|
|
10
|
-
inputSubmitActionButton:
|
|
11
|
-
submitAction:
|
|
9
|
+
actionButton: a,
|
|
10
|
+
inputSubmitActionButton: s,
|
|
11
|
+
submitAction: r
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
a as actionButton,
|
|
15
|
+
b as active,
|
|
16
16
|
u as default,
|
|
17
17
|
i as format,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
n as iconToolbar,
|
|
19
|
+
s as inputSubmitActionButton,
|
|
20
|
+
_ as shortBar,
|
|
21
|
+
r as submitAction,
|
|
22
|
+
o as toolbar,
|
|
23
|
+
t as toolbarIsActive,
|
|
24
|
+
c as toolbarItem
|
|
25
25
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import '../../../assets/components/input/toggle_position/TogglePosition.module-
|
|
1
|
+
import '../../../assets/components/input/toggle_position/TogglePosition.module-DDIigbfA.css';const e = "_container_re8y3_3", l = "_label_re8y3_11", t = "_labelActive_re8y3_25", a = "_firstLabelDefault_re8y3_35", c = "_secondLabelDefault_re8y3_42", n = {
|
|
2
2
|
container: e,
|
|
3
3
|
label: l,
|
|
4
4
|
labelActive: t,
|
|
5
5
|
firstLabelDefault: a,
|
|
6
|
-
secondLabelDefault:
|
|
6
|
+
secondLabelDefault: c
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
9
|
e as container,
|
|
10
|
-
|
|
10
|
+
n as default,
|
|
11
11
|
a as firstLabelDefault,
|
|
12
12
|
l as label,
|
|
13
13
|
t as labelActive,
|
|
14
|
-
|
|
14
|
+
c as secondLabelDefault
|
|
15
15
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useIntl as
|
|
6
|
-
import { useLocation as
|
|
7
|
-
import
|
|
8
|
-
import { ActionBar as
|
|
1
|
+
import { jsxs as $, jsx as c, Fragment as Qe } from "react/jsx-runtime";
|
|
2
|
+
import $e from "@rooks/use-previous";
|
|
3
|
+
import Pe from "classnames";
|
|
4
|
+
import Ue, { useState as m, useEffect as h } from "react";
|
|
5
|
+
import { useIntl as We } from "react-intl";
|
|
6
|
+
import { useLocation as ze } from "react-router";
|
|
7
|
+
import a from "./PaginatedList.module.scss.js";
|
|
8
|
+
import { ActionBar as Ge } from "./action_bar/ActionBar.js";
|
|
9
9
|
import { useList as Ve } from "../list_provider/useList.js";
|
|
10
10
|
import { useDataProvider as Xe } from "../../data/data_provider/useDataProvider.js";
|
|
11
11
|
import { useResponsive as Ye } from "../../hooks/use_responsive/useResponsive.js";
|
|
@@ -14,36 +14,36 @@ import { uniqueBy as x } from "../../util/unique_by/uniqueBy.js";
|
|
|
14
14
|
import { Pagination as He } from "../pagination/Pagination.js";
|
|
15
15
|
import { StandardErrorBoundary as Ie } from "../../error/standard_error_boundary/StandardErrorBoundary.js";
|
|
16
16
|
const ct = ({
|
|
17
|
-
query:
|
|
18
|
-
sortOptions:
|
|
19
|
-
sort:
|
|
20
|
-
filters:
|
|
17
|
+
query: w,
|
|
18
|
+
sortOptions: i,
|
|
19
|
+
sort: N,
|
|
20
|
+
filters: o,
|
|
21
21
|
tagList: ne,
|
|
22
22
|
pinnedTagList: ae,
|
|
23
|
-
currentPage:
|
|
23
|
+
currentPage: M,
|
|
24
24
|
resource: A,
|
|
25
|
-
currentListId:
|
|
25
|
+
currentListId: n,
|
|
26
26
|
withToken: le,
|
|
27
|
-
perPage:
|
|
27
|
+
perPage: p,
|
|
28
28
|
perPageParam: ie = "per_page",
|
|
29
29
|
pageParam: oe = "page",
|
|
30
30
|
sortParam: me = "sort",
|
|
31
31
|
queryParam: de = "query",
|
|
32
32
|
tagParam: re = "tag_id",
|
|
33
33
|
totalHeaderParam: D = "total",
|
|
34
|
-
onUpdateTotal:
|
|
35
|
-
onElementsLoad:
|
|
36
|
-
transformData:
|
|
37
|
-
uniqueIdKey:
|
|
34
|
+
onUpdateTotal: P,
|
|
35
|
+
onElementsLoad: R,
|
|
36
|
+
transformData: U,
|
|
37
|
+
uniqueIdKey: v = "id",
|
|
38
38
|
children: fe,
|
|
39
39
|
resourcePropName: ce,
|
|
40
|
-
loadingComponent:
|
|
40
|
+
loadingComponent: W,
|
|
41
41
|
searchBar: ue = !1,
|
|
42
|
-
title:
|
|
43
|
-
subtitle:
|
|
42
|
+
title: Ee,
|
|
43
|
+
subtitle: ge,
|
|
44
44
|
showDebateConsultationSubtitle: he = !1,
|
|
45
|
-
emptyListComponent:
|
|
46
|
-
emptyText:
|
|
45
|
+
emptyListComponent: z,
|
|
46
|
+
emptyText: G,
|
|
47
47
|
display: V,
|
|
48
48
|
elementsPerLine: X,
|
|
49
49
|
indexLayout: pe = !1,
|
|
@@ -55,139 +55,129 @@ const ct = ({
|
|
|
55
55
|
withUrlParams: Ne = !1,
|
|
56
56
|
onLoadNewPage: Z
|
|
57
57
|
}) => {
|
|
58
|
-
const J =
|
|
59
|
-
|
|
60
|
-
), [
|
|
58
|
+
const J = We(), t = Ve(), H = Xe(), I = ze(), { isMobile: K, isTablet: Me, isDesktop: j } = Ye(), [b, u] = m(!1), [Re, be] = m(!1), [k, S] = Ze(n, []), [O, ke] = m(
|
|
59
|
+
k?.length || 0
|
|
60
|
+
), [E, B] = m(M || 1), [y, L] = m(w || null), [C, q] = m(null), [Ce, ee] = m(null), d = new URLSearchParams(
|
|
61
61
|
typeof window < "u" ? window.location.search : I.search
|
|
62
|
-
),
|
|
62
|
+
), Fe = () => i && i[0].type === "sort" && i[0].value || N || "", Te = () => {
|
|
63
63
|
let e = {};
|
|
64
|
-
return
|
|
65
|
-
}, [
|
|
66
|
-
|
|
67
|
-
if (
|
|
68
|
-
|
|
69
|
-
for (const e of
|
|
70
|
-
|
|
64
|
+
return i && i[0].type === "filter" && (e[i[0].name] = i[0].value), o && (e = Object.assign({}, e, o)), e;
|
|
65
|
+
}, [F, T] = m(Fe()), [Q, _] = m(Te()), te = $e(o);
|
|
66
|
+
M && M !== E && B(M), w !== void 0 && w !== y && L(w), N !== void 0 && N !== F && T(N), te && JSON.stringify(o) !== JSON.stringify(te) && JSON.stringify(o) !== JSON.stringify(Q) && _(o), h(() => {
|
|
67
|
+
if (d.get("tagId") && q(Number.parseInt(d.get("tagId"))), d.get("search") && L(d.get("search")), d.get("sort")) {
|
|
68
|
+
T(d.get("sort"));
|
|
69
|
+
for (const e of d.values()) {
|
|
70
|
+
i?.map((s) => {
|
|
71
71
|
s.value === e && ee(s.name);
|
|
72
72
|
});
|
|
73
73
|
break;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
for (const e of
|
|
77
|
-
|
|
76
|
+
for (const e of d.keys()) {
|
|
77
|
+
i?.map((s) => {
|
|
78
78
|
s.name === e && (_({
|
|
79
|
-
...
|
|
79
|
+
...o,
|
|
80
80
|
[s.name]: s.value
|
|
81
81
|
}), ee(s.name));
|
|
82
82
|
});
|
|
83
83
|
break;
|
|
84
84
|
}
|
|
85
|
-
}, [I.search]),
|
|
86
|
-
A ? (
|
|
85
|
+
}, [I.search]), h(() => {
|
|
86
|
+
A ? (B(1), S([]), u(!0), se(1)) : u(!1);
|
|
87
87
|
}, [
|
|
88
|
-
|
|
88
|
+
F,
|
|
89
89
|
Q,
|
|
90
|
-
|
|
90
|
+
y,
|
|
91
91
|
A,
|
|
92
92
|
C,
|
|
93
|
-
|
|
94
|
-
]),
|
|
95
|
-
|
|
96
|
-
}, [
|
|
97
|
-
if (t.addElements &&
|
|
98
|
-
Ae(t.addElements[
|
|
93
|
+
p
|
|
94
|
+
]), h(() => {
|
|
95
|
+
E > 1 && (u(!0), se(E));
|
|
96
|
+
}, [E]), h(() => {
|
|
97
|
+
if (t.addElements && n in t.addElements && t.addElements[n].length > 0) {
|
|
98
|
+
Ae(t.addElements[n]);
|
|
99
99
|
const e = t.addElements;
|
|
100
|
-
delete e[
|
|
100
|
+
delete e[n], t.setAddElements(e);
|
|
101
101
|
}
|
|
102
|
-
}, [t.addElements]),
|
|
103
|
-
if (t.updateElements &&
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
(i) => d.some((n) => n.id === i.id)
|
|
108
|
-
);
|
|
109
|
-
if (s.length > 0) {
|
|
110
|
-
De(s);
|
|
111
|
-
const i = e.filter(
|
|
112
|
-
(r) => !d.some((u) => u.id === r.id)
|
|
113
|
-
), n = { ...t.updateElements };
|
|
114
|
-
i.length > 0 ? n[a] = i : delete n[a], t.setUpdateElements(n);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
102
|
+
}, [t.addElements]), h(() => {
|
|
103
|
+
if (t.updateElements && n in t.updateElements && (console.log("[PaginatedList] update received for listId:", n, t.updateElements[n]), t.updateElements[n].length > 0)) {
|
|
104
|
+
De(t.updateElements[n]);
|
|
105
|
+
const e = t.updateElements;
|
|
106
|
+
delete e[n], t.setUpdateElements(e);
|
|
117
107
|
}
|
|
118
|
-
}, [t.updateElements
|
|
119
|
-
if (t.removeElements &&
|
|
120
|
-
Je(t.removeElements[
|
|
121
|
-
const e =
|
|
122
|
-
delete e[
|
|
108
|
+
}, [t.updateElements]), h(() => {
|
|
109
|
+
if (t.removeElements && n in t.removeElements && t.removeElements[n].length > 0) {
|
|
110
|
+
Je(t.removeElements[n]);
|
|
111
|
+
const e = t.removeElements;
|
|
112
|
+
delete e[n], t.setRemoveElements(e);
|
|
123
113
|
}
|
|
124
|
-
}, [t.removeElements
|
|
114
|
+
}, [t.removeElements]);
|
|
125
115
|
const _e = (e) => {
|
|
126
|
-
e.type === "filter" ? (
|
|
127
|
-
...
|
|
116
|
+
e.type === "filter" ? (T(""), _({
|
|
117
|
+
...o,
|
|
128
118
|
[e.name]: e.value
|
|
129
|
-
})) : (
|
|
119
|
+
})) : (T(e.value), _(o ? { ...o } : {}));
|
|
130
120
|
}, xe = () => {
|
|
131
|
-
typeof Z == "function" && Z() !== null ||
|
|
121
|
+
typeof Z == "function" && Z() !== null || B(E + 1);
|
|
132
122
|
}, se = (e) => {
|
|
133
123
|
const s = le ? H.getListWithToken : H.getList;
|
|
134
|
-
if ((e - 1) *
|
|
135
|
-
const
|
|
124
|
+
if ((e - 1) * p <= (Y || O) || e === 1) {
|
|
125
|
+
const r = {
|
|
136
126
|
[oe]: e,
|
|
137
|
-
[ie]:
|
|
138
|
-
...
|
|
139
|
-
...
|
|
127
|
+
[ie]: p,
|
|
128
|
+
...F && !y && { [me]: F },
|
|
129
|
+
...y && { [de]: y },
|
|
140
130
|
...ye === !0 && { countless: !0 },
|
|
141
131
|
...Q,
|
|
142
132
|
...C && { [re]: C }
|
|
143
133
|
};
|
|
144
|
-
s(A,
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
Number.parseInt(
|
|
148
|
-
),
|
|
149
|
-
let
|
|
150
|
-
|
|
151
|
-
}).catch((
|
|
152
|
-
console.error(
|
|
134
|
+
s(A, r).then((l) => {
|
|
135
|
+
const f = l.headers;
|
|
136
|
+
f && D in f && (ke(
|
|
137
|
+
Number.parseInt(f[D || "total"], 10)
|
|
138
|
+
), P && P(f[D || "total"]));
|
|
139
|
+
let g = l?.data?.data;
|
|
140
|
+
R && R(g), U && (g = g.filter(U)), t.addElements && n in t.addElements && t.addElements[n].length > 0 && (g = [...t.addElements[n], g]), je(g), u(!1);
|
|
141
|
+
}).catch((l) => {
|
|
142
|
+
console.error(l), l?.response?.status !== 404 && be(!0), u(!1);
|
|
153
143
|
});
|
|
154
144
|
} else
|
|
155
|
-
|
|
145
|
+
u(!1);
|
|
156
146
|
}, Ae = (e) => {
|
|
157
|
-
|
|
158
|
-
(s) => x([...e, ...s],
|
|
159
|
-
),
|
|
147
|
+
S(
|
|
148
|
+
(s) => x([...e, ...s], v || "id")
|
|
149
|
+
), R && R(e);
|
|
160
150
|
}, De = (e) => {
|
|
161
|
-
|
|
162
|
-
let
|
|
151
|
+
S((s) => {
|
|
152
|
+
let r = s;
|
|
163
153
|
return e.forEach(
|
|
164
|
-
(
|
|
165
|
-
(
|
|
154
|
+
(l) => r = r.map(
|
|
155
|
+
(f) => f.id === l.id ? l : f
|
|
166
156
|
)
|
|
167
|
-
), x(
|
|
157
|
+
), x(r, v || "id");
|
|
168
158
|
});
|
|
169
159
|
}, Je = (e) => {
|
|
170
|
-
const s = e.map((
|
|
171
|
-
(
|
|
160
|
+
const s = e.map((l) => l.id), r = k.filter(
|
|
161
|
+
(l) => s.indexOf(l.id) === -1
|
|
172
162
|
);
|
|
173
|
-
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
(s) => x([...s, ...e],
|
|
163
|
+
S(x(r, v || "id"));
|
|
164
|
+
}, je = (e) => {
|
|
165
|
+
S(
|
|
166
|
+
(s) => x([...s, ...e], v || "id")
|
|
177
167
|
);
|
|
178
|
-
},
|
|
168
|
+
}, Be = (e, s) => e !== void 0 ? /* @__PURE__ */ c(
|
|
179
169
|
"li",
|
|
180
170
|
{
|
|
181
|
-
className:
|
|
171
|
+
className: a.paginatedListItem,
|
|
182
172
|
"data-testid": "list-item",
|
|
183
173
|
onClick: we,
|
|
184
|
-
children: /* @__PURE__ */
|
|
174
|
+
children: /* @__PURE__ */ c(Ie, { hideMessage: !0, children: Ue.cloneElement(fe, {
|
|
185
175
|
index: s,
|
|
186
176
|
[ce]: e
|
|
187
177
|
}) })
|
|
188
178
|
},
|
|
189
|
-
`${e[
|
|
190
|
-
) : null,
|
|
179
|
+
`${e[v || "id"]}_${e.updated_at || e.content}`
|
|
180
|
+
) : null, Le = (e) => W ? /* @__PURE__ */ c("li", { className: a.paginatedListItem, children: W }, e) : null;
|
|
191
181
|
if (Re)
|
|
192
182
|
throw new Error(
|
|
193
183
|
J.formatMessage({
|
|
@@ -195,62 +185,62 @@ const ct = ({
|
|
|
195
185
|
defaultMessage: "Error when loading content."
|
|
196
186
|
})
|
|
197
187
|
);
|
|
198
|
-
return /* @__PURE__ */
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
|
|
188
|
+
return /* @__PURE__ */ $("div", { className: a.listContainer, children: [
|
|
189
|
+
/* @__PURE__ */ c(
|
|
190
|
+
Ge,
|
|
201
191
|
{
|
|
202
|
-
title:
|
|
203
|
-
subtitle:
|
|
192
|
+
title: Ee,
|
|
193
|
+
subtitle: ge,
|
|
204
194
|
showDebateConsultationSubtitle: he,
|
|
205
|
-
sortOptions:
|
|
195
|
+
sortOptions: i,
|
|
206
196
|
defaultSelectOption: Ce,
|
|
207
197
|
searchBar: ue,
|
|
208
198
|
tagList: ne,
|
|
209
199
|
pinnedTagList: ae,
|
|
210
200
|
activeTagId: C,
|
|
211
|
-
onSearch: (e) =>
|
|
201
|
+
onSearch: (e) => L(e),
|
|
212
202
|
onSortChange: _e,
|
|
213
203
|
onTagChange: (e) => q(e),
|
|
214
204
|
withUrlParams: Ne
|
|
215
205
|
}
|
|
216
206
|
),
|
|
217
|
-
!
|
|
207
|
+
!b && k.length === 0 ? z ? /* @__PURE__ */ c("div", { className: a.emptyListElement, children: z }) : /* @__PURE__ */ c("div", { className: a.emptyList, children: G || J.formatMessage({
|
|
218
208
|
id: "info.emptyList",
|
|
219
209
|
defaultMessage: "No items for now."
|
|
220
|
-
}) }) : /* @__PURE__ */
|
|
221
|
-
/* @__PURE__ */
|
|
210
|
+
}) }) : /* @__PURE__ */ $(Qe, { children: [
|
|
211
|
+
/* @__PURE__ */ $(
|
|
222
212
|
"ul",
|
|
223
213
|
{
|
|
224
|
-
className:
|
|
225
|
-
[
|
|
226
|
-
[
|
|
227
|
-
[
|
|
228
|
-
[
|
|
229
|
-
[
|
|
230
|
-
[
|
|
231
|
-
[
|
|
232
|
-
[
|
|
233
|
-
[
|
|
214
|
+
className: Pe(a.paginatedList, {
|
|
215
|
+
[a.paginatedListIsTablet]: !K && !j,
|
|
216
|
+
[a.centeredList]: V === "column",
|
|
217
|
+
[a.column]: V === "column",
|
|
218
|
+
[a.twoElementsPerLine]: X === 2,
|
|
219
|
+
[a.oneElementPerLine]: X === 1,
|
|
220
|
+
[a.indexLayoutList]: pe,
|
|
221
|
+
[a.listIsDesktop]: j,
|
|
222
|
+
[a.listIsTablet]: Me && !j,
|
|
223
|
+
[a.listIsMobile]: K
|
|
234
224
|
}),
|
|
235
225
|
style: { gap: ve },
|
|
236
226
|
children: [
|
|
237
|
-
|
|
238
|
-
|
|
227
|
+
k.map(Be),
|
|
228
|
+
b ? Array(p).fill().map((e, s) => s).map(Le) : null
|
|
239
229
|
]
|
|
240
230
|
}
|
|
241
231
|
),
|
|
242
|
-
!
|
|
232
|
+
!b && Se !== !1 && /* @__PURE__ */ c(
|
|
243
233
|
He,
|
|
244
234
|
{
|
|
245
235
|
buttonText: J.formatMessage({
|
|
246
236
|
id: "action.see_more",
|
|
247
237
|
defaultMessage: "See more"
|
|
248
238
|
}),
|
|
249
|
-
currentPage:
|
|
250
|
-
perPage:
|
|
239
|
+
currentPage: E,
|
|
240
|
+
perPage: p,
|
|
251
241
|
totalElements: Y || O,
|
|
252
242
|
onLoad: xe,
|
|
253
|
-
isLoading:
|
|
243
|
+
isLoading: b,
|
|
254
244
|
hideLoader: !0,
|
|
255
245
|
"data-tid": "list_read_more"
|
|
256
246
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import '../../../../assets/components/list/paginated_list/action_bar/ActionBar.module-
|
|
1
|
+
import '../../../../assets/components/list/paginated_list/action_bar/ActionBar.module-DvwCbS9k.css';const t = "_listHeader_un1z2_3", e = "_listHeaderOneItem_un1z2_16", s = "_listTitle_un1z2_23", _ = "_listSubtitle_un1z2_30", i = "_rightBar_un1z2_37", n = "_rightBarOneItem_un1z2_47", a = "_search_un1z2_58", l = "_tagList_un1z2_68", r = "_tagItem_un1z2_83", c = "_select_un1z2_90", u = {
|
|
2
2
|
listHeader: t,
|
|
3
3
|
listHeaderOneItem: e,
|
|
4
4
|
listTitle: s,
|
|
5
|
-
listSubtitle:
|
|
6
|
-
rightBar:
|
|
7
|
-
rightBarOneItem:
|
|
8
|
-
search:
|
|
9
|
-
tagList:
|
|
5
|
+
listSubtitle: _,
|
|
6
|
+
rightBar: i,
|
|
7
|
+
rightBarOneItem: n,
|
|
8
|
+
search: a,
|
|
9
|
+
tagList: l,
|
|
10
10
|
tagItem: r,
|
|
11
11
|
select: c
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
u as default,
|
|
15
15
|
t as listHeader,
|
|
16
16
|
e as listHeaderOneItem,
|
|
17
|
-
|
|
17
|
+
_ as listSubtitle,
|
|
18
18
|
s as listTitle,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
i as rightBar,
|
|
20
|
+
n as rightBarOneItem,
|
|
21
|
+
a as search,
|
|
22
22
|
c as select,
|
|
23
23
|
r as tagItem,
|
|
24
|
-
|
|
24
|
+
l as tagList
|
|
25
25
|
};
|
|
@@ -16,27 +16,27 @@ import { Link as d } from "../../action/link/Link.js";
|
|
|
16
16
|
import { Icon as c } from "../../icons/icon/Icon.js";
|
|
17
17
|
import { Avatar as A } from "../../user/avatar/Avatar.js";
|
|
18
18
|
const Q = () => {
|
|
19
|
-
const { hideModal: r } = C(), s = I(),
|
|
19
|
+
const { hideModal: r } = C(), s = I(), o = M(), { pathname: u } = _(), { isLoggedIn: h, currentUser: m } = S(), p = b(), g = k?.() || {}, { isMobile: f, elementWidth: v } = g, L = f && v <= 576 && !s.isDrawer, e = (N) => !!x(N, u), w = () => {
|
|
20
20
|
p({});
|
|
21
21
|
};
|
|
22
22
|
return /* @__PURE__ */ n(U, { fullScreen: !s.isDrawer, showCloseButton: !0, children: [
|
|
23
23
|
/* @__PURE__ */ n("div", { className: t.modalContainer, children: [
|
|
24
24
|
/* @__PURE__ */ i("div", { className: t.modalTitle, children: /* @__PURE__ */ i(l, { id: "info.menu", defaultMessage: "Navigation" }) }),
|
|
25
25
|
/* @__PURE__ */ n("div", { className: t.navigationContainer, children: [
|
|
26
|
-
|
|
26
|
+
/* @__PURE__ */ i(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
29
29
|
className: a(t.modalItem, {
|
|
30
|
-
[t.active]: o
|
|
30
|
+
[t.active]: e(o.indexLocation.path) || e(o.debateShowLocation.path) || e(o.rootLocation.path || "/")
|
|
31
31
|
}),
|
|
32
32
|
onClick: r,
|
|
33
33
|
children: /* @__PURE__ */ n(
|
|
34
34
|
d,
|
|
35
35
|
{
|
|
36
36
|
className: a(t.itemContainer, {
|
|
37
|
-
[t.activeItem]: o
|
|
37
|
+
[t.activeItem]: e(o.indexLocation.path) || e(o.debateShowLocation.path) || e(o.rootLocation.path || "/")
|
|
38
38
|
}),
|
|
39
|
-
to:
|
|
39
|
+
to: o.indexLocation.toUrl(),
|
|
40
40
|
"data-tid": "view_index",
|
|
41
41
|
children: [
|
|
42
42
|
/* @__PURE__ */ i(c, { name: "chat", height: 24, width: 24 }),
|
|
@@ -56,16 +56,16 @@ const Q = () => {
|
|
|
56
56
|
"div",
|
|
57
57
|
{
|
|
58
58
|
className: a(t.modalItem, {
|
|
59
|
-
[t.active]: o
|
|
59
|
+
[t.active]: e(o.consultationIndexLocation.path) || e(o.consultationShowLocation.path)
|
|
60
60
|
}),
|
|
61
61
|
onClick: r,
|
|
62
62
|
children: /* @__PURE__ */ n(
|
|
63
63
|
d,
|
|
64
64
|
{
|
|
65
65
|
className: a(t.itemContainer, {
|
|
66
|
-
[t.activeItem]: o
|
|
66
|
+
[t.activeItem]: e(o.consultationIndexLocation.path) || e(o.consultationShowLocation.path)
|
|
67
67
|
}),
|
|
68
|
-
to:
|
|
68
|
+
to: o.consultationIndexLocation.toUrl(),
|
|
69
69
|
"data-tid": "view_consultation",
|
|
70
70
|
children: [
|
|
71
71
|
/* @__PURE__ */ i(c, { name: "community", height: 24, width: 24 }),
|
|
@@ -85,16 +85,16 @@ const Q = () => {
|
|
|
85
85
|
"div",
|
|
86
86
|
{
|
|
87
87
|
className: a(t.modalItem, {
|
|
88
|
-
[t.active]: o
|
|
88
|
+
[t.active]: e(o.suggestionLocation.path)
|
|
89
89
|
}),
|
|
90
90
|
onClick: r,
|
|
91
91
|
children: /* @__PURE__ */ n(
|
|
92
92
|
d,
|
|
93
93
|
{
|
|
94
94
|
className: a(t.itemContainer, {
|
|
95
|
-
[t.activeItem]: o
|
|
95
|
+
[t.activeItem]: e(o.suggestionLocation.path)
|
|
96
96
|
}),
|
|
97
|
-
to:
|
|
97
|
+
to: o.suggestionLocation.toUrl(),
|
|
98
98
|
"data-tid": "view_suggestions",
|
|
99
99
|
children: [
|
|
100
100
|
/* @__PURE__ */ i(c, { name: "suggestion", height: 24, width: 24 }),
|
|
@@ -114,16 +114,16 @@ const Q = () => {
|
|
|
114
114
|
"div",
|
|
115
115
|
{
|
|
116
116
|
className: a(t.modalItem, {
|
|
117
|
-
[t.active]: o
|
|
117
|
+
[t.active]: e(o.userShowLocation.path) || e(o.userEditLocation.path)
|
|
118
118
|
}),
|
|
119
119
|
onClick: r,
|
|
120
120
|
children: /* @__PURE__ */ i(
|
|
121
121
|
d,
|
|
122
122
|
{
|
|
123
123
|
className: a(t.itemContainer, {
|
|
124
|
-
[t.activeItem]: o
|
|
124
|
+
[t.activeItem]: e(o.userShowLocation.path) || e(o.userEditLocation.path)
|
|
125
125
|
}),
|
|
126
|
-
to:
|
|
126
|
+
to: o.userShowLocation.toUrl({
|
|
127
127
|
userSlug: m.hash_id
|
|
128
128
|
}),
|
|
129
129
|
"data-tid": "view_user_profile",
|