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