@logora/debate 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -23
- package/dist/components/action/button/Button.js +1 -1
- package/dist/components/argument/argument/Argument.js +49 -49
- package/dist/components/argument/top_arguments/TopArguments.js +17 -17
- package/dist/components/auth/auth_initializer/AuthInitializer.js +5 -5
- package/dist/components/auth/auth_modal/AuthModal.js +9 -9
- package/dist/components/auth/login_form/LoginForm.js +1 -0
- package/dist/components/auth/oauth2_button/OAuth2Button.js +3 -3
- package/dist/components/auth/providers/AuthProviderFactory.js +4 -4
- package/dist/components/auth/signup_form/SignupForm.js +4 -4
- package/dist/components/auth/social_auth_form/SocialAuthForm.js +10 -10
- package/dist/components/auth/sso_form/SSOForm.js +4 -4
- package/dist/components/chart/line_chart/LineChart.js +10 -10
- package/dist/components/chart/pie_chart/PieChart.js +6 -10
- package/dist/components/consultation/consultation_box/ConsultationBox.js +19 -14
- package/dist/components/debate/debate_box/DebateBox.js +11 -11
- package/dist/components/dialog/drawer/Drawer.js +16 -16
- package/dist/components/dialog/modal/Modal.js +8 -8
- package/dist/components/dialog/toast_provider/ToastProvider.js +10 -10
- package/dist/components/hooks/use_responsive/ResponsiveProvider.js +4 -4
- package/dist/components/input/argument_input/ArgumentInput.js +100 -99
- package/dist/components/input/search_input/SearchInput.js +4 -4
- package/dist/components/input/text_editor/TextEditor.js +50 -50
- package/dist/components/input/text_editor/lexicalToHtml.js +7 -7
- package/dist/components/input/text_editor/plugins/MaxLengthPlugin.js +12 -12
- package/dist/components/input/text_editor/plugins/ResetPlugin.js +6 -6
- package/dist/components/input/text_editor/plugins/SetContentPlugin.js +6 -6
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +21 -21
- package/dist/components/intl/intl_provider/IntlProvider.js +6 -6
- package/dist/components/list/paginated_list/PaginatedList.js +16 -16
- package/dist/components/list/paginated_list/VotePaginatedList.js +6 -6
- package/dist/components/list/paginated_list/action_bar/ActionBar.js +7 -7
- package/dist/components/navbar/navbar_button/NavbarButton.js +3 -3
- package/dist/components/navbar/navbar_modal/NavbarModal.js +11 -11
- package/dist/components/notification/notification_menu/NotificationMenu.js +4 -4
- package/dist/components/proposal/proposal_box/ProposalBox.js +8 -8
- package/dist/components/share/share_box/ShareBox.js +17 -17
- package/dist/components/source/context_source_list/ContextSourceList.js +3 -3
- package/dist/components/source/source_modal/SourceModal.js +16 -16
- package/dist/components/suggestion/suggestion_banner/SuggestionBanner.js +14 -14
- package/dist/components/suggestion/suggestion_box/SuggestionBox.js +6 -6
- package/dist/components/suggestion/suggestion_input/SuggestionInput.js +13 -12
- package/dist/components/user/avatar/Avatar.js +7 -7
- package/dist/components/user/update_user_info_modal/UpdateUserInfoModal.js +17 -15
- package/dist/components/user_content/content_footer/ContentFooter.js +11 -11
- package/dist/components/user_content/summary_content_box/SummaryContentBox.js +6 -6
- package/dist/components/user_content/use_delete_content/useDeleteContent.js +7 -7
- package/dist/components/user_content/use_report_content/ReportModal.js +9 -9
- package/dist/components/vote/use_vote/useVote.js +3 -3
- package/dist/components/vote/vote_box/VoteBox.js +7 -7
- package/dist/index.js +56 -56
- package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalCharacterLimitPlugin.prod.js +57 -57
- package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalComposer.prod.js +14 -14
- package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalContentEditable.prod.js +15 -15
- package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalListPlugin.prod.js +6 -6
- package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +1 -1
- package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +21 -21
- package/package.json +6 -1
|
@@ -2,18 +2,18 @@ import { __toESM as e } from "../../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { require_jsx_runtime as t } from "../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
3
3
|
import { Icon as n } from "../../icons/icon/Icon.js";
|
|
4
4
|
import { require_classnames as r } from "../../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js";
|
|
5
|
-
import i from "
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { StandardErrorBoundary as i } from "../../error/standard_error_boundary/StandardErrorBoundary.js";
|
|
6
|
+
import { Loader as a } from "../../progress/loader/Loader.js";
|
|
7
|
+
import o from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/useIntl.js";
|
|
8
|
+
import { Select as s } from "../../input/select/Select.js";
|
|
9
|
+
import { Tag as c } from "../../tag/tag/Tag.js";
|
|
10
10
|
import "../../../node_modules/.pnpm/chart.js@4.5.1/node_modules/chart.js/auto/auto.js";
|
|
11
11
|
import { Line as l } from "../../../node_modules/.pnpm/react-chartjs-2@5.3.1_chart.js@4.5.1_react@18.3.1/node_modules/react-chartjs-2/dist/index.js";
|
|
12
12
|
import u from "./LineChart.module.js";
|
|
13
13
|
import { useEffect as d, useState as f } from "react";
|
|
14
14
|
//#region src/components/chart/line_chart/LineChart.jsx
|
|
15
15
|
var p = /* @__PURE__ */ e(r()), m = t(), h = ({ data: e, labels: t, onFilterChange: r, title: h, className: g, filterOptions: _ }) => {
|
|
16
|
-
let v =
|
|
16
|
+
let v = o(), y = {
|
|
17
17
|
responsive: !0,
|
|
18
18
|
maintainAspectRatio: !1,
|
|
19
19
|
plugins: {
|
|
@@ -62,7 +62,7 @@ var p = /* @__PURE__ */ e(r()), m = t(), h = ({ data: e, labels: t, onFilterChan
|
|
|
62
62
|
return /* @__PURE__ */ (0, m.jsx)("div", {
|
|
63
63
|
className: u.tagItem,
|
|
64
64
|
onClick: () => T(e.id == w ? null : e.id),
|
|
65
|
-
children: /* @__PURE__ */ (0, m.jsx)(
|
|
65
|
+
children: /* @__PURE__ */ (0, m.jsx)(c, {
|
|
66
66
|
text: e.display_name || e.name,
|
|
67
67
|
active: t,
|
|
68
68
|
rightIcon: t && /* @__PURE__ */ (0, m.jsx)(n, {
|
|
@@ -73,11 +73,11 @@ var p = /* @__PURE__ */ e(r()), m = t(), h = ({ data: e, labels: t, onFilterChan
|
|
|
73
73
|
})
|
|
74
74
|
}, e.id);
|
|
75
75
|
};
|
|
76
|
-
return /* @__PURE__ */ (0, m.jsx)(
|
|
76
|
+
return /* @__PURE__ */ (0, m.jsx)(i, { children: /* @__PURE__ */ (0, m.jsxs)("div", {
|
|
77
77
|
className: (0, p.default)(u.lineChartContainer, g),
|
|
78
78
|
children: [/* @__PURE__ */ (0, m.jsxs)("div", {
|
|
79
79
|
className: u.lineChartFilterOptions,
|
|
80
|
-
children: [/* @__PURE__ */ (0, m.jsx)(
|
|
80
|
+
children: [/* @__PURE__ */ (0, m.jsx)(s, {
|
|
81
81
|
options: _,
|
|
82
82
|
onChange: (e) => O(e.value)
|
|
83
83
|
}), t && /* @__PURE__ */ (0, m.jsx)("div", {
|
|
@@ -88,7 +88,7 @@ var p = /* @__PURE__ */ e(r()), m = t(), h = ({ data: e, labels: t, onFilterChan
|
|
|
88
88
|
name: "aaa"
|
|
89
89
|
}, ...t].sort((e, t) => e.name.localeCompare(t.name, "fr", { ignorePunctuation: !0 })).map(A)
|
|
90
90
|
})]
|
|
91
|
-
}), b ? /* @__PURE__ */ (0, m.jsx)(
|
|
91
|
+
}), b ? /* @__PURE__ */ (0, m.jsx)(a, {}) : /* @__PURE__ */ (0, m.jsx)("div", {
|
|
92
92
|
className: u.lineChartWrapper,
|
|
93
93
|
children: /* @__PURE__ */ (0, m.jsx)(l, {
|
|
94
94
|
data: E,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { require_jsx_runtime as e } from "../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
2
|
-
import t from "
|
|
2
|
+
import { StandardErrorBoundary as t } from "../../error/standard_error_boundary/StandardErrorBoundary.js";
|
|
3
3
|
import { Loader as n } from "../../progress/loader/Loader.js";
|
|
4
|
-
import
|
|
4
|
+
import r from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/useIntl.js";
|
|
5
5
|
import "../../../node_modules/.pnpm/chart.js@4.5.1/node_modules/chart.js/auto/auto.js";
|
|
6
6
|
import { Pie as i } from "../../../node_modules/.pnpm/react-chartjs-2@5.3.1_chart.js@4.5.1_react@18.3.1/node_modules/react-chartjs-2/dist/index.js";
|
|
7
7
|
import "../../../node_modules/.pnpm/chartjs-plugin-datalabels@2.2.0_chart.js@4.5.1/node_modules/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.esm.js";
|
|
@@ -18,7 +18,7 @@ var c = e(), l = [
|
|
|
18
18
|
"rgba(255, 143, 102, 0.8)",
|
|
19
19
|
"rgba(93, 82, 179, 0.8)"
|
|
20
20
|
], u = ({ data: e, labels: u, totalItemsCount: d, pieTitle: f, colors: p, minPercentageValue: m = .75 }) => {
|
|
21
|
-
let h =
|
|
21
|
+
let h = r(), [g, _] = s(void 0), [v, y] = s(0), [b, x] = s(!0);
|
|
22
22
|
o(() => {
|
|
23
23
|
e != null && (S(e), y(e.length));
|
|
24
24
|
}, [e]);
|
|
@@ -46,21 +46,17 @@ var c = e(), l = [
|
|
|
46
46
|
display: !0,
|
|
47
47
|
color: "white",
|
|
48
48
|
font: { size: "16" },
|
|
49
|
-
formatter:
|
|
50
|
-
return e >= v ? e + " %" : " ";
|
|
51
|
-
}
|
|
49
|
+
formatter: (e) => e >= v ? e + " %" : " "
|
|
52
50
|
},
|
|
53
51
|
title: {
|
|
54
52
|
display: !0,
|
|
55
53
|
font: { size: "16" },
|
|
56
54
|
text: f
|
|
57
55
|
},
|
|
58
|
-
tooltip: { callbacks: { label:
|
|
59
|
-
return ` ${e.label}`;
|
|
60
|
-
} } }
|
|
56
|
+
tooltip: { callbacks: { label: (e) => ` ${e.label}` } }
|
|
61
57
|
}
|
|
62
58
|
};
|
|
63
|
-
return /* @__PURE__ */ (0, c.jsx)(
|
|
59
|
+
return /* @__PURE__ */ (0, c.jsx)(t, { children: b ? /* @__PURE__ */ (0, c.jsx)(n, {}) : /* @__PURE__ */ (0, c.jsx)("div", {
|
|
64
60
|
className: a.pieChart,
|
|
65
61
|
"data-testid": "pieChartCanvas",
|
|
66
62
|
children: /* @__PURE__ */ (0, c.jsx)(i, {
|
|
@@ -4,23 +4,28 @@ import { Link as n } from "../../action/link/Link.js";
|
|
|
4
4
|
import { Icon as r } from "../../icons/icon/Icon.js";
|
|
5
5
|
import { require_classnames as i } from "../../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js";
|
|
6
6
|
import { useRoutes as a } from "../../data/config_provider/useRoutes.js";
|
|
7
|
-
import o from "
|
|
8
|
-
import s from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { useResponsive as o } from "../../hooks/use_responsive/useResponsive.js";
|
|
8
|
+
import s from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/useIntl.js";
|
|
9
|
+
import c from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/message.js";
|
|
10
|
+
import { TranslatedContent as l } from "../../translation/translated_content/TranslatedContent.js";
|
|
11
|
+
import { useRelativeTime as u } from "../../hooks/use_relative_time/useRelativeTime.js";
|
|
12
12
|
import { ProgressBar as d } from "../../progress/progress_bar/ProgressBar.js";
|
|
13
13
|
import f from "./ConsultationBox.module.js";
|
|
14
14
|
import { useMemo as p } from "react";
|
|
15
15
|
//#region src/components/consultation/consultation_box/ConsultationBox.jsx
|
|
16
16
|
var m = /* @__PURE__ */ e(i()), h = t(), g = ({ consultation: e }) => {
|
|
17
|
-
let t =
|
|
17
|
+
let t = s(), i = p(() => /* @__PURE__ */ new Date()), g = new Date(e.ends_at), _ = u(g.getTime()), v = a(), { isMobile: y } = o(), b = () => g < i ? /* @__PURE__ */ (0, h.jsx)("span", { children: /* @__PURE__ */ (0, h.jsx)(c, {
|
|
18
18
|
id: "consultation.consultation_box.consultation_ended",
|
|
19
19
|
defaultMessage: "Consultation ended"
|
|
20
|
-
}) }) : /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [/* @__PURE__ */ (0, h.jsxs)("span", { children: [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
}) }) : /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [/* @__PURE__ */ (0, h.jsxs)("span", { children: [
|
|
21
|
+
/* @__PURE__ */ (0, h.jsx)(c, {
|
|
22
|
+
id: "consultation.consultation_box.in_progress",
|
|
23
|
+
defaultMessage: "Consultation in progress"
|
|
24
|
+
}),
|
|
25
|
+
" ",
|
|
26
|
+
"-",
|
|
27
|
+
" "
|
|
28
|
+
] }), /* @__PURE__ */ (0, h.jsx)("span", { children: _ })] });
|
|
24
29
|
return /* @__PURE__ */ (0, h.jsx)(h.Fragment, { children: /* @__PURE__ */ (0, h.jsxs)("div", {
|
|
25
30
|
className: f.container,
|
|
26
31
|
children: [
|
|
@@ -44,7 +49,7 @@ var m = /* @__PURE__ */ e(i()), h = t(), g = ({ consultation: e }) => {
|
|
|
44
49
|
to: v.consultationShowLocation.toUrl({ consultationSlug: e.slug }),
|
|
45
50
|
children: /* @__PURE__ */ (0, h.jsx)("div", {
|
|
46
51
|
className: f.consultationTitle,
|
|
47
|
-
children: /* @__PURE__ */ (0, h.jsx)(
|
|
52
|
+
children: /* @__PURE__ */ (0, h.jsx)(l, {
|
|
48
53
|
originalContent: e.title,
|
|
49
54
|
originalLanguage: e.language,
|
|
50
55
|
targetField: "title",
|
|
@@ -56,10 +61,10 @@ var m = /* @__PURE__ */ e(i()), h = t(), g = ({ consultation: e }) => {
|
|
|
56
61
|
to: v.consultationShowLocation.toUrl({ consultationSlug: e.slug }),
|
|
57
62
|
children: /* @__PURE__ */ (0, h.jsxs)("div", {
|
|
58
63
|
className: f.consultationButtonContainer,
|
|
59
|
-
children: [e.ends_at && g < i ? /* @__PURE__ */ (0, h.jsx)("span", { children: /* @__PURE__ */ (0, h.jsx)(
|
|
64
|
+
children: [e.ends_at && g < i ? /* @__PURE__ */ (0, h.jsx)("span", { children: /* @__PURE__ */ (0, h.jsx)(c, {
|
|
60
65
|
id: "consultation.consultation_box.action_show_result",
|
|
61
66
|
defaultMessage: "Show result"
|
|
62
|
-
}) }) : /* @__PURE__ */ (0, h.jsx)("span", { children: /* @__PURE__ */ (0, h.jsx)(
|
|
67
|
+
}) }) : /* @__PURE__ */ (0, h.jsx)("span", { children: /* @__PURE__ */ (0, h.jsx)(c, {
|
|
63
68
|
id: "consultation.consultation_box.action_consultation_participate",
|
|
64
69
|
defaultMessage: "Participate"
|
|
65
70
|
}) }), /* @__PURE__ */ (0, h.jsx)(r, {
|
|
@@ -97,7 +102,7 @@ var m = /* @__PURE__ */ e(i()), h = t(), g = ({ consultation: e }) => {
|
|
|
97
102
|
})]
|
|
98
103
|
}), e.vote_goal > 0 && /* @__PURE__ */ (0, h.jsx)("div", {
|
|
99
104
|
className: (0, m.default)(f.consultationGroupInformation, f.progressBarContainer),
|
|
100
|
-
children: g < i ? /* @__PURE__ */ (0, h.jsx)(
|
|
105
|
+
children: g < i ? /* @__PURE__ */ (0, h.jsx)(c, {
|
|
101
106
|
id: "consultation.consultation_box.stats_votes",
|
|
102
107
|
values: { votesCount: e.total_votes },
|
|
103
108
|
defaultMessage: "{votesCount} votes"
|
|
@@ -5,17 +5,17 @@ import { Icon as r } from "../../icons/icon/Icon.js";
|
|
|
5
5
|
import { require_classnames as i } from "../../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js";
|
|
6
6
|
import { useConfig as a } from "../../data/config_provider/useConfig.js";
|
|
7
7
|
import { useRoutes as o } from "../../data/config_provider/useRoutes.js";
|
|
8
|
-
import s from "
|
|
9
|
-
import c from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
import { useResponsive as s } from "../../hooks/use_responsive/useResponsive.js";
|
|
9
|
+
import c from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/useIntl.js";
|
|
10
|
+
import l from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/message.js";
|
|
11
|
+
import { useTranslatedContent as u } from "../../translation/translated_content/useTranslatedContent.js";
|
|
12
|
+
import { Tooltip as d } from "../../dialog/tooltip/Tooltip.js";
|
|
13
|
+
import { Avatar as f } from "../../user/avatar/Avatar.js";
|
|
14
14
|
import p from "./DebateBox.module.js";
|
|
15
15
|
import "react";
|
|
16
16
|
//#region src/components/debate/debate_box/DebateBox.jsx
|
|
17
17
|
var m = /* @__PURE__ */ e(i()), h = t(), g = ({ debate: e }) => {
|
|
18
|
-
let t = a(), i = o(), g =
|
|
18
|
+
let t = a(), i = o(), g = c(), { isMobile: _ } = s(), v = e.votes_count?.total || Object.values(e.votes_count).reduce((e, t) => e + Number.parseFloat(t), 0) || 0, y = e.group_context?.positions.reduce((t, n) => Number.parseInt(e.votes_count[n.id]) > Number.parseInt(e.votes_count[t.id]) ? n : t), b = u(e.name, e.language, "name", e.translation_entries), x = u(y.name, y.language, "name", y.translation_entries), S = (e, t) => t == 0 || e == 0 ? 0 : Math.round(e / t * 100);
|
|
19
19
|
return /* @__PURE__ */ (0, h.jsxs)("div", {
|
|
20
20
|
className: p.debateBox,
|
|
21
21
|
children: [/* @__PURE__ */ (0, h.jsxs)("div", {
|
|
@@ -42,7 +42,7 @@ var m = /* @__PURE__ */ e(i()), h = t(), g = ({ debate: e }) => {
|
|
|
42
42
|
})
|
|
43
43
|
}), e.is_active === !1 && /* @__PURE__ */ (0, h.jsx)("div", {
|
|
44
44
|
className: p.inactiveDebate,
|
|
45
|
-
children: /* @__PURE__ */ (0, h.jsx)(
|
|
45
|
+
children: /* @__PURE__ */ (0, h.jsx)(l, {
|
|
46
46
|
id: "debate.debate_box.debate_is_inactive",
|
|
47
47
|
defaultMessage: "Debate is ended"
|
|
48
48
|
})
|
|
@@ -55,7 +55,7 @@ var m = /* @__PURE__ */ e(i()), h = t(), g = ({ debate: e }) => {
|
|
|
55
55
|
height: 15
|
|
56
56
|
}), /* @__PURE__ */ (0, h.jsxs)("span", {
|
|
57
57
|
className: p.authorSuggestion,
|
|
58
|
-
children: [/* @__PURE__ */ (0, h.jsx)(
|
|
58
|
+
children: [/* @__PURE__ */ (0, h.jsx)(l, {
|
|
59
59
|
id: "debate.debate_box.suggestion_author_short",
|
|
60
60
|
defaultMessage: "Suggested by"
|
|
61
61
|
}), /* @__PURE__ */ (0, h.jsx)("span", {
|
|
@@ -103,7 +103,7 @@ var m = /* @__PURE__ */ e(i()), h = t(), g = ({ debate: e }) => {
|
|
|
103
103
|
className: p.debateParticipantItem,
|
|
104
104
|
children: /* @__PURE__ */ (0, h.jsx)(n, {
|
|
105
105
|
to: i.userShowLocation.toUrl({ userSlug: e.hash_id }),
|
|
106
|
-
children: /* @__PURE__ */ (0, h.jsx)(
|
|
106
|
+
children: /* @__PURE__ */ (0, h.jsx)(f, {
|
|
107
107
|
avatarUrl: e.image_url,
|
|
108
108
|
userName: e.full_name,
|
|
109
109
|
isOnline: new Date(e.last_activity) > Date.now(),
|
|
@@ -112,7 +112,7 @@ var m = /* @__PURE__ */ e(i()), h = t(), g = ({ debate: e }) => {
|
|
|
112
112
|
})
|
|
113
113
|
}, t)), e.participants_count > 3 && /* @__PURE__ */ (0, h.jsx)("div", {
|
|
114
114
|
className: p.debateParticipantItem,
|
|
115
|
-
children: /* @__PURE__ */ (0, h.jsx)(
|
|
115
|
+
children: /* @__PURE__ */ (0, h.jsx)(d, {
|
|
116
116
|
text: g.formatMessage({
|
|
117
117
|
id: "debate.debate_box.participants_count",
|
|
118
118
|
defaultMessage: "Number of debaters"
|
|
@@ -5,22 +5,22 @@ import { IconTextLink as r } from "../../action/icon_text_link/IconTextLink.js";
|
|
|
5
5
|
import { useAuth as i } from "../../auth/use_auth/useAuth.js";
|
|
6
6
|
import { useConfig as a } from "../../data/config_provider/useConfig.js";
|
|
7
7
|
import { useRoutes as o } from "../../data/config_provider/useRoutes.js";
|
|
8
|
-
import s from "
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import f from "
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
8
|
+
import { Loader as s } from "../../progress/loader/Loader.js";
|
|
9
|
+
import c from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/useIntl.js";
|
|
10
|
+
import { Dropdown as l } from "../dropdown/Dropdown.js";
|
|
11
|
+
import { useAuthRequired as u } from "../../hooks/use_auth_required/useAuthRequired.js";
|
|
12
|
+
import { Avatar as d } from "../../user/avatar/Avatar.js";
|
|
13
|
+
import { NavbarButton as f } from "../../navbar/navbar_button/NavbarButton.js";
|
|
14
|
+
import { NotificationMenu as p } from "../../notification/notification_menu/NotificationMenu.js";
|
|
15
|
+
import m from "../../../node_modules/.pnpm/react-modern-drawer@1.4.0_react@18.3.1/node_modules/react-modern-drawer/dist/index.modern.js";
|
|
16
16
|
/* empty css */
|
|
17
17
|
import h from "./Drawer.module.js";
|
|
18
18
|
import { Suspense as g, useEffect as _, useState as v } from "react";
|
|
19
19
|
import { useLocation as y } from "react-router";
|
|
20
20
|
//#region src/components/dialog/drawer/Drawer.jsx
|
|
21
21
|
var b = e(), x = ({ isOpen: e = !1, onClose: x, title: S, size: C = "30vw", enableOverlay: w = !1, pathParameter: T = null, children: E, notificationDefinitions: D = {} }) => {
|
|
22
|
-
let [O, k] = v(e), A = y(), j = o(), M = a(), N =
|
|
23
|
-
|
|
22
|
+
let [O, k] = v(e), A = y(), j = o(), M = a(), N = c(), { isLoggedIn: P, currentUser: F } = i();
|
|
23
|
+
u();
|
|
24
24
|
let [I, L] = v(0), R = () => {
|
|
25
25
|
if (k(!1), T && typeof window < "u") {
|
|
26
26
|
let e = new URL(window.location);
|
|
@@ -39,7 +39,7 @@ var b = e(), x = ({ isOpen: e = !1, onClose: x, title: S, size: C = "30vw", enab
|
|
|
39
39
|
if (typeof window < "u") return window.addEventListener("logora:drawer:close", R), () => {
|
|
40
40
|
window.removeEventListener("logora:drawer:close", R);
|
|
41
41
|
};
|
|
42
|
-
}, []), /* @__PURE__ */ (0, b.jsx)(b.Fragment, { children: /* @__PURE__ */ (0, b.jsxs)(
|
|
42
|
+
}, []), /* @__PURE__ */ (0, b.jsx)(b.Fragment, { children: /* @__PURE__ */ (0, b.jsxs)(m, {
|
|
43
43
|
open: O,
|
|
44
44
|
onClose: R,
|
|
45
45
|
direction: "right",
|
|
@@ -71,13 +71,13 @@ var b = e(), x = ({ isOpen: e = !1, onClose: x, title: S, size: C = "30vw", enab
|
|
|
71
71
|
className: h.headerRowBottom,
|
|
72
72
|
children: [/* @__PURE__ */ (0, b.jsx)("div", {
|
|
73
73
|
className: h.headerLeft,
|
|
74
|
-
children: /* @__PURE__ */ (0, b.jsx)(
|
|
74
|
+
children: /* @__PURE__ */ (0, b.jsx)(f, {
|
|
75
75
|
inDrawer: !0,
|
|
76
76
|
showNavbarButtonInDrawer: M?.layout?.showNavbarButtonInDrawer !== !1
|
|
77
77
|
})
|
|
78
78
|
}), P && M?.layout?.showProfileNotificationInDrawer !== !1 && /* @__PURE__ */ (0, b.jsxs)("div", {
|
|
79
79
|
className: h.headerRight,
|
|
80
|
-
children: [/* @__PURE__ */ (0, b.jsxs)(
|
|
80
|
+
children: [/* @__PURE__ */ (0, b.jsxs)(l, {
|
|
81
81
|
onClick: () => {
|
|
82
82
|
L(0);
|
|
83
83
|
},
|
|
@@ -96,14 +96,14 @@ var b = e(), x = ({ isOpen: e = !1, onClose: x, title: S, size: C = "30vw", enab
|
|
|
96
96
|
})
|
|
97
97
|
})
|
|
98
98
|
}), /* @__PURE__ */ (0, b.jsx)(g, {
|
|
99
|
-
fallback: /* @__PURE__ */ (0, b.jsx)(
|
|
100
|
-
children: /* @__PURE__ */ (0, b.jsx)(
|
|
99
|
+
fallback: /* @__PURE__ */ (0, b.jsx)(s, {}),
|
|
100
|
+
children: /* @__PURE__ */ (0, b.jsx)(p, { notificationDefinitions: D })
|
|
101
101
|
})]
|
|
102
102
|
}), /* @__PURE__ */ (0, b.jsx)("div", {
|
|
103
103
|
className: h.drawerProfile,
|
|
104
104
|
children: /* @__PURE__ */ (0, b.jsx)(t, {
|
|
105
105
|
to: j.userShowLocation.toUrl({ userSlug: F.hash_id }),
|
|
106
|
-
children: /* @__PURE__ */ (0, b.jsx)(
|
|
106
|
+
children: /* @__PURE__ */ (0, b.jsx)(d, {
|
|
107
107
|
avatarUrl: F.image_url,
|
|
108
108
|
userName: F.full_name,
|
|
109
109
|
size: 30
|
|
@@ -3,12 +3,12 @@ import { require_jsx_runtime as t } from "../../../node_modules/.pnpm/react@18.3
|
|
|
3
3
|
import { Icon as n } from "../../icons/icon/Icon.js";
|
|
4
4
|
import { require_classnames as r } from "../../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js";
|
|
5
5
|
import i from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/useIntl.js";
|
|
6
|
-
import
|
|
7
|
-
import o from "./
|
|
6
|
+
import a from "./Modal.module.js";
|
|
7
|
+
import { useModal as o } from "./useModal.js";
|
|
8
8
|
import { useEffect as s, useRef as c } from "react";
|
|
9
9
|
//#region src/components/dialog/modal/Modal.jsx
|
|
10
10
|
var l = /* @__PURE__ */ e(r()), u = t(), d = ({ title: e, showCloseButton: t = !1, fullScreen: r, children: d, disableClickOutside: f = !1, ...p }) => {
|
|
11
|
-
let m = c(), h = i(), { hideModal: g } =
|
|
11
|
+
let m = c(), h = i(), { hideModal: g } = o();
|
|
12
12
|
s(() => {
|
|
13
13
|
let e = m.current;
|
|
14
14
|
if (!e) return;
|
|
@@ -25,21 +25,21 @@ var l = /* @__PURE__ */ e(r()), u = t(), d = ({ title: e, showCloseButton: t = !
|
|
|
25
25
|
};
|
|
26
26
|
return /* @__PURE__ */ (0, u.jsx)("dialog", {
|
|
27
27
|
ref: m,
|
|
28
|
-
className: (0, l.default)(
|
|
28
|
+
className: (0, l.default)(a.modalDialog, { [a.modalDialogFullScreen]: r }),
|
|
29
29
|
"aria-labelledby": e ? "modal-title" : void 0,
|
|
30
30
|
onClick: _,
|
|
31
31
|
onClose: v,
|
|
32
32
|
...p,
|
|
33
33
|
children: /* @__PURE__ */ (0, u.jsxs)("div", {
|
|
34
|
-
className: (0, l.default)(
|
|
34
|
+
className: (0, l.default)(a.modalContainer),
|
|
35
35
|
children: [/* @__PURE__ */ (0, u.jsxs)("div", {
|
|
36
|
-
className: (0, l.default)(
|
|
36
|
+
className: (0, l.default)(a.modalHeader, { [a.modalHeaderWithTitle]: e }),
|
|
37
37
|
children: [e && /* @__PURE__ */ (0, u.jsx)("div", {
|
|
38
38
|
id: "modal-title",
|
|
39
39
|
children: e
|
|
40
40
|
}), t && /* @__PURE__ */ (0, u.jsx)("button", {
|
|
41
41
|
type: "button",
|
|
42
|
-
className:
|
|
42
|
+
className: a.modalExitButton,
|
|
43
43
|
onClick: g,
|
|
44
44
|
"aria-label": h.formatMessage({
|
|
45
45
|
id: "dialog.modal.aria_label",
|
|
@@ -55,7 +55,7 @@ var l = /* @__PURE__ */ e(r()), u = t(), d = ({ title: e, showCloseButton: t = !
|
|
|
55
55
|
})
|
|
56
56
|
})]
|
|
57
57
|
}), /* @__PURE__ */ (0, u.jsx)("div", {
|
|
58
|
-
className:
|
|
58
|
+
className: a.modalContent,
|
|
59
59
|
children: d
|
|
60
60
|
})]
|
|
61
61
|
})
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { require_jsx_runtime as e } from "../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Toast as t } from "../toast/Toast.js";
|
|
3
|
+
import { Fe as n, V as r, h as i, zt as a } from "../../../node_modules/.pnpm/react-hot-toast@2.6.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-hot-toast/dist/index.js";
|
|
4
|
+
import { ToastContext as o } from "./ToastContext.js";
|
|
5
5
|
import s from "./ToastProvider.module.js";
|
|
6
6
|
import "react";
|
|
7
7
|
//#region src/components/dialog/toast_provider/ToastProvider.jsx
|
|
8
8
|
var c = e(), l = ({ children: e }) => {
|
|
9
|
-
let { toasts: l } =
|
|
10
|
-
return /* @__PURE__ */ (0, c.jsx)(
|
|
9
|
+
let { toasts: l } = r();
|
|
10
|
+
return /* @__PURE__ */ (0, c.jsx)(o.Provider, {
|
|
11
11
|
value: {
|
|
12
|
-
toast:
|
|
12
|
+
toast: a,
|
|
13
13
|
toasts: l
|
|
14
14
|
},
|
|
15
|
-
children: /* @__PURE__ */ (0, c.jsxs)(c.Fragment, { children: [e, /* @__PURE__ */ (0, c.jsx)(
|
|
15
|
+
children: /* @__PURE__ */ (0, c.jsxs)(c.Fragment, { children: [e, /* @__PURE__ */ (0, c.jsx)(n, {
|
|
16
16
|
position: "bottom-center",
|
|
17
17
|
containerClassName: s.toaster,
|
|
18
18
|
toastOptions: { duration: 4e3 },
|
|
19
|
-
children: (e) => /* @__PURE__ */ (0, c.jsx)(
|
|
20
|
-
text:
|
|
19
|
+
children: (e) => /* @__PURE__ */ (0, c.jsx)(t, {
|
|
20
|
+
text: i(e.message, e),
|
|
21
21
|
points: e.points,
|
|
22
22
|
variant: e.type,
|
|
23
|
-
handleClose: () =>
|
|
23
|
+
handleClose: () => a.remove(e.id)
|
|
24
24
|
})
|
|
25
25
|
})] })
|
|
26
26
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { require_jsx_runtime as e } from "../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { c as t } from "../../../node_modules/.pnpm/use-debounce@10.1.1_react@18.3.1/node_modules/use-debounce/dist/index.module.js";
|
|
3
|
+
import { ResponsiveContext as n } from "./ResponsiveContext.js";
|
|
4
4
|
import { useEffect as r, useState as i } from "react";
|
|
5
5
|
//#region src/components/hooks/use_responsive/ResponsiveProvider.jsx
|
|
6
6
|
var a = e(), o = ({ containerPath: e, containerWidth: o, children: s, isMobile: c }) => {
|
|
7
|
-
let [l, u] = i(o), d =
|
|
7
|
+
let [l, u] = i(o), d = t(() => {
|
|
8
8
|
if (typeof window < "u" && e) {
|
|
9
9
|
let t = document.querySelector(e);
|
|
10
10
|
t && u(t.getBoundingClientRect().width.toFixed(2));
|
|
@@ -19,7 +19,7 @@ var a = e(), o = ({ containerPath: e, containerWidth: o, children: s, isMobile:
|
|
|
19
19
|
if (typeof window < "u" && e) return window.addEventListener("resize", d), () => {
|
|
20
20
|
window.removeEventListener("resize", d);
|
|
21
21
|
};
|
|
22
|
-
}, [d, e]), /* @__PURE__ */ (0, a.jsx)(
|
|
22
|
+
}, [d, e]), /* @__PURE__ */ (0, a.jsx)(n.Provider, {
|
|
23
23
|
value: {
|
|
24
24
|
elementWidth: l,
|
|
25
25
|
isMobile: c || l <= 576,
|