@logora/debate 0.3.90 → 0.3.92
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/argument/argument/Argument.module-QZdPjj_i.css +1 -0
- package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-DjNiVt-p.css +1 -0
- package/dist/assets/components/follow/follow_button/FollowButton.module-C9YXM8AM.css +1 -0
- package/dist/assets/components/input/text_editor/{TextEditor.module-DePSfOvG.css → TextEditor.module-CxuSL3l3.css} +1 -1
- package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-DvwCbS9k.css +1 -0
- package/dist/assets/components/navigation/tabs/Tabs.module-CFizOU1d.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/source/context_source_list/ContextSourceList.module-DUPbI-wb.css +1 -0
- package/dist/assets/components/source/source_list_item/SourceListItem.module-fm_uHuY4.css +1 -0
- package/dist/assets/components/summary/summary/Summary.module-2bnx3egy.css +1 -0
- package/dist/assets/components/summary/summary_box/SummaryBox.module-Dr9PevSJ.css +1 -0
- package/dist/assets/components/vote/vote_box/VoteBox.module-D5sSSHpi.css +1 -0
- package/dist/components/argument/argument/Argument.js +111 -106
- package/dist/components/argument/argument/Argument.module.scss.js +31 -31
- package/dist/components/auth/providers/FormAuth.js +8 -7
- package/dist/components/auth/use_auth/base64.js +4 -0
- package/dist/components/consultation/consultation_box/ConsultationBox.js +80 -111
- package/dist/components/consultation/consultation_box/ConsultationBox.module.scss.js +31 -29
- package/dist/components/dialog/dropdown/Dropdown.js +35 -28
- package/dist/components/follow/follow_button/FollowButton.js +17 -16
- package/dist/components/follow/follow_button/FollowButton.module.scss.js +6 -4
- package/dist/components/icons/bild_icons/index.js +58 -56
- package/dist/components/icons/clarin_icons/Alarm.js +6 -0
- package/dist/components/icons/clarin_icons/Announcement.js +6 -0
- package/dist/components/icons/clarin_icons/Chat.js +6 -0
- package/dist/components/icons/clarin_icons/CheckCircle.js +9 -0
- package/dist/components/icons/clarin_icons/Clock.js +6 -0
- package/dist/components/icons/clarin_icons/Follow.js +6 -0
- package/dist/components/icons/clarin_icons/MobileClose.js +9 -0
- package/dist/components/icons/clarin_icons/Question.js +6 -0
- package/dist/components/icons/clarin_icons/Search.js +6 -0
- package/dist/components/icons/clarin_icons/Send.js +10 -0
- package/dist/components/icons/clarin_icons/Share.js +6 -0
- package/dist/components/icons/clarin_icons/Upvote.js +9 -0
- package/dist/components/icons/clarin_icons/User.js +9 -0
- package/dist/components/icons/clarin_icons/index.js +106 -0
- package/dist/components/icons/hero_icons/index.js +20 -18
- package/dist/components/icons/krone_icons/index.js +48 -46
- package/dist/components/icons/regular_icons/Follow.js +6 -0
- package/dist/components/icons/regular_icons/index.js +20 -18
- package/dist/components/icons/spiegel_icons/Downvote.js +6 -0
- package/dist/components/icons/spiegel_icons/Upvote.js +6 -0
- package/dist/components/icons/spiegel_icons/index.js +54 -52
- package/dist/components/icons/stern_icons/index.js +102 -70
- package/dist/components/input/argument_input/ArgumentInput.js +201 -197
- package/dist/components/input/select/Select.js +19 -19
- package/dist/components/input/text_editor/TextEditor.js +143 -129
- package/dist/components/input/text_editor/TextEditor.module.scss.js +5 -5
- package/dist/components/input/text_editor/plugins/FocusPlugin.js +12 -8
- package/dist/components/input/text_editor/plugins/SetContentPlugin.js +13 -13
- package/dist/components/input/text_editor/plugins/SetRichContentPlugin.js +10 -10
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +70 -72
- package/dist/components/list/paginated_list/PaginatedList.js +152 -144
- package/dist/components/list/paginated_list/action_bar/ActionBar.js +72 -61
- package/dist/components/list/paginated_list/action_bar/ActionBar.module.scss.js +18 -16
- package/dist/components/navigation/tabs/Tabs.js +85 -24
- package/dist/components/navigation/tabs/Tabs.module.scss.js +20 -10
- package/dist/components/notification/notification_menu/NotificationMenu.js +23 -22
- package/dist/components/proposal/proposal_box/ProposalBox.js +70 -59
- package/dist/components/proposal/proposal_box/ProposalBox.module.scss.js +14 -10
- package/dist/components/section/section_box/SectionBox.js +10 -10
- package/dist/components/section/section_box/SectionBox.module.scss.js +9 -9
- package/dist/components/source/context_source_box/ContextSourceBox.js +7 -7
- package/dist/components/source/context_source_list/ContextSourceList.js +10 -13
- package/dist/components/source/context_source_list/ContextSourceList.module.scss.js +14 -12
- package/dist/components/source/source_list_item/SourceListItem.js +42 -28
- package/dist/components/source/source_list_item/SourceListItem.module.scss.js +8 -6
- package/dist/components/source/source_modal/SourceModal.js +15 -15
- package/dist/components/summary/summary/Summary.js +41 -63
- package/dist/components/summary/summary/Summary.module.scss.js +10 -6
- package/dist/components/summary/summary_box/SummaryBox.module.scss.js +9 -9
- package/dist/components/vote/vote_box/VoteBox.js +122 -143
- package/dist/components/vote/vote_box/VoteBox.module.scss.js +50 -48
- package/dist/index.js +323 -319
- package/package.json +1 -1
- package/dist/assets/components/argument/argument/Argument.module-gLfNRLks.css +0 -1
- package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-BnTr5IaF.css +0 -1
- package/dist/assets/components/follow/follow_button/FollowButton.module-Da-cPgwT.css +0 -1
- package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-pxwFC_Y2.css +0 -1
- package/dist/assets/components/navigation/tabs/Tabs.module-CtDi0tAd.css +0 -1
- package/dist/assets/components/proposal/proposal_box/ProposalBox.module-T4ms_LQ7.css +0 -1
- package/dist/assets/components/section/section_box/SectionBox.module-DUeUtdWr.css +0 -1
- package/dist/assets/components/source/context_source_list/ContextSourceList.module-D6X_0dB7.css +0 -1
- package/dist/assets/components/source/source_list_item/SourceListItem.module-mTxHhXPV.css +0 -1
- package/dist/assets/components/summary/summary/Summary.module-DjfmUlkW.css +0 -1
- package/dist/assets/components/summary/summary_box/SummaryBox.module-DQVkA8l7.css +0 -1
- package/dist/assets/components/vote/vote_box/VoteBox.module-CDrqb2SZ.css +0 -1
|
@@ -1,30 +1,91 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsxs as A, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import h, { useId as C, useRef as v, useState as y, useCallback as T, useEffect as N } from "react";
|
|
3
|
+
import n from "./Tabs.module.scss.js";
|
|
4
|
+
import { Icon as I } from "../../icons/icon/Icon.js";
|
|
5
|
+
const O = ({ value: d, onChange: c, children: u, label: $ }) => {
|
|
6
|
+
const m = C(), w = v([]), a = v(null), i = h.Children.count(u), [p, R] = y(!1), [g, S] = y(!1), o = T(() => {
|
|
7
|
+
const e = a.current;
|
|
8
|
+
e && (R(e.scrollLeft > 1), S(e.scrollLeft + e.clientWidth < e.scrollWidth - 1));
|
|
9
|
+
}, []);
|
|
10
|
+
N(() => {
|
|
11
|
+
o();
|
|
12
|
+
const e = a.current;
|
|
13
|
+
if (!e) return;
|
|
14
|
+
const t = new ResizeObserver(o);
|
|
15
|
+
return t.observe(e), () => t.disconnect();
|
|
16
|
+
}, [u, o]);
|
|
17
|
+
const k = (e, t) => {
|
|
18
|
+
t.stopPropagation();
|
|
19
|
+
const r = a.current;
|
|
20
|
+
if (!r) return;
|
|
21
|
+
const b = Array.from(r.children), f = d;
|
|
22
|
+
if (e === "left") {
|
|
23
|
+
if (f <= 0) return;
|
|
24
|
+
const l = f - 1;
|
|
25
|
+
b[l]?.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" }), c(t, l);
|
|
26
|
+
} else {
|
|
27
|
+
if (f >= b.length - 1) return;
|
|
28
|
+
const l = f + 1;
|
|
29
|
+
b[l]?.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" }), c(t, l);
|
|
30
|
+
}
|
|
31
|
+
setTimeout(o, 300);
|
|
32
|
+
}, L = (e, t) => {
|
|
33
|
+
let r;
|
|
34
|
+
if (e.key === "ArrowRight") r = (t + 1) % i;
|
|
35
|
+
else if (e.key === "ArrowLeft") r = (t - 1 + i) % i;
|
|
36
|
+
else if (e.key === "Home") r = 0;
|
|
37
|
+
else if (e.key === "End") r = i - 1;
|
|
11
38
|
else return;
|
|
12
|
-
|
|
39
|
+
e.preventDefault(), c(e, r), w.current[r]?.focus();
|
|
13
40
|
};
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
41
|
+
return /* @__PURE__ */ A("div", { className: n.tabsWrapper, children: [
|
|
42
|
+
/* @__PURE__ */ s(
|
|
43
|
+
"button",
|
|
44
|
+
{
|
|
45
|
+
type: "button",
|
|
46
|
+
className: `${n.arrow} ${n.arrowLeft} ${p ? "" : n.arrowHidden}`,
|
|
47
|
+
onClick: (e) => k("left", e),
|
|
48
|
+
"aria-label": "Onglet précédent",
|
|
49
|
+
tabIndex: p ? 0 : -1,
|
|
50
|
+
children: /* @__PURE__ */ s(I, { name: "lightArrow", height: 24, width: 24 })
|
|
24
51
|
}
|
|
25
|
-
|
|
26
|
-
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ s(
|
|
54
|
+
"ul",
|
|
55
|
+
{
|
|
56
|
+
ref: a,
|
|
57
|
+
role: "tablist",
|
|
58
|
+
"aria-label": $,
|
|
59
|
+
className: n.navTabs,
|
|
60
|
+
onScroll: o,
|
|
61
|
+
children: h.Children.map(
|
|
62
|
+
u,
|
|
63
|
+
(e, t) => h.cloneElement(e, {
|
|
64
|
+
active: d === t,
|
|
65
|
+
id: `${m}-tab-${t}`,
|
|
66
|
+
panelId: `${m}-panel-${t}`,
|
|
67
|
+
onClick: (r) => c(r, t),
|
|
68
|
+
onKeyDown: (r) => L(r, t),
|
|
69
|
+
ref: (r) => {
|
|
70
|
+
w.current[t] = r;
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
/* @__PURE__ */ s(
|
|
77
|
+
"button",
|
|
78
|
+
{
|
|
79
|
+
type: "button",
|
|
80
|
+
className: `${n.arrow} ${n.arrowRight} ${g ? "" : n.arrowHidden}`,
|
|
81
|
+
onClick: (e) => k("right", e),
|
|
82
|
+
"aria-label": "Onglet suivant",
|
|
83
|
+
tabIndex: g ? 0 : -1,
|
|
84
|
+
children: /* @__PURE__ */ s(I, { name: "lightArrow", height: 24, width: 24 })
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
] });
|
|
27
88
|
};
|
|
28
89
|
export {
|
|
29
|
-
|
|
90
|
+
O as Tabs
|
|
30
91
|
};
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
import '../../../assets/components/navigation/tabs/Tabs.module-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import '../../../assets/components/navigation/tabs/Tabs.module-CFizOU1d.css';const a = "_tabsWrapper_s0wnb_3", n = "_navTabs_s0wnb_11", r = "_arrow_s0wnb_38", s = "_arrowLeft_s0wnb_62", t = "_arrowRight_s0wnb_71", _ = "_arrowHidden_s0wnb_80", o = "_navItem_s0wnb_85", w = "_navLink_s0wnb_89", e = "_active_s0wnb_119", b = {
|
|
2
|
+
tabsWrapper: a,
|
|
3
|
+
navTabs: n,
|
|
4
|
+
arrow: r,
|
|
5
|
+
arrowLeft: s,
|
|
6
|
+
arrowRight: t,
|
|
7
|
+
arrowHidden: _,
|
|
8
|
+
navItem: o,
|
|
9
|
+
navLink: w,
|
|
10
|
+
active: e
|
|
6
11
|
};
|
|
7
12
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
e as active,
|
|
14
|
+
r as arrow,
|
|
15
|
+
_ as arrowHidden,
|
|
16
|
+
s as arrowLeft,
|
|
17
|
+
t as arrowRight,
|
|
18
|
+
b as default,
|
|
19
|
+
o as navItem,
|
|
20
|
+
w as navLink,
|
|
21
|
+
n as navTabs,
|
|
22
|
+
a as tabsWrapper
|
|
13
23
|
};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { jsxs as a, Fragment as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as a, Fragment as c, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l } from "react";
|
|
3
3
|
import { useIntl as m } from "react-intl";
|
|
4
|
-
import
|
|
4
|
+
import e from "./NotificationMenu.module.scss.js";
|
|
5
5
|
import { useDataProvider as f } from "../../data/data_provider/useDataProvider.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
import { StandardErrorBoundary as u } from "../../error/standard_error_boundary/StandardErrorBoundary.js";
|
|
7
|
+
import { PaginatedList as p } from "../../list/paginated_list/PaginatedList.js";
|
|
8
|
+
import { NotificationItem as h } from "../notification_item/NotificationItem.js";
|
|
9
|
+
import { UserContentSkeleton as g } from "../../skeleton/user_content_skeleton/UserContentSkeleton.js";
|
|
10
|
+
const P = ({ notificationDefinitions: o = {} }) => {
|
|
11
|
+
const i = m(), r = f(), [n, s] = l(!1), d = () => {
|
|
12
|
+
s(!0), r.create("notifications/read/all", {}).then(() => {
|
|
12
13
|
});
|
|
13
14
|
};
|
|
14
|
-
return /* @__PURE__ */ a(
|
|
15
|
-
/* @__PURE__ */ a("div", { className:
|
|
16
|
-
/* @__PURE__ */ t("div", { className:
|
|
15
|
+
return /* @__PURE__ */ a(c, { children: [
|
|
16
|
+
/* @__PURE__ */ a("div", { className: e.notificationMenuHeader, children: [
|
|
17
|
+
/* @__PURE__ */ t("div", { className: e.notificationMenuHeaderText, children: i.formatMessage({
|
|
17
18
|
id: "header.notifications",
|
|
18
19
|
defaultMessage: "Alerts"
|
|
19
20
|
}) }),
|
|
@@ -22,21 +23,21 @@ const C = ({ notificationDefinitions: o = {} }) => {
|
|
|
22
23
|
{
|
|
23
24
|
id: "read_all_notifications",
|
|
24
25
|
"data-tid": "action_read_all_notifications",
|
|
25
|
-
className:
|
|
26
|
+
className: e.readNotificationsButton,
|
|
26
27
|
tabIndex: "0",
|
|
27
|
-
onClick:
|
|
28
|
-
children:
|
|
28
|
+
onClick: d,
|
|
29
|
+
children: i.formatMessage({
|
|
29
30
|
id: "notifications.read_all",
|
|
30
31
|
defaultMessage: "Mark all as read"
|
|
31
32
|
})
|
|
32
33
|
}
|
|
33
34
|
)
|
|
34
35
|
] }),
|
|
35
|
-
/* @__PURE__ */ t("div", { className:
|
|
36
|
-
|
|
36
|
+
/* @__PURE__ */ t("div", { className: e.notificationList, children: /* @__PURE__ */ t(u, { hideMessage: !0, children: /* @__PURE__ */ t(
|
|
37
|
+
p,
|
|
37
38
|
{
|
|
38
39
|
currentListId: "notificationList",
|
|
39
|
-
loadingComponent: /* @__PURE__ */ t(
|
|
40
|
+
loadingComponent: /* @__PURE__ */ t(g, { numberLines: 0 }),
|
|
40
41
|
resourcePropName: "notification",
|
|
41
42
|
resource: "notifications",
|
|
42
43
|
sort: "-created_at",
|
|
@@ -45,16 +46,16 @@ const C = ({ notificationDefinitions: o = {} }) => {
|
|
|
45
46
|
display: "column",
|
|
46
47
|
gap: "0px",
|
|
47
48
|
children: /* @__PURE__ */ t(
|
|
48
|
-
|
|
49
|
+
h,
|
|
49
50
|
{
|
|
50
51
|
notificationDefinitions: o,
|
|
51
|
-
isRead:
|
|
52
|
+
isRead: n
|
|
52
53
|
}
|
|
53
54
|
)
|
|
54
55
|
}
|
|
55
|
-
) })
|
|
56
|
+
) }) })
|
|
56
57
|
] });
|
|
57
58
|
};
|
|
58
59
|
export {
|
|
59
|
-
|
|
60
|
+
P as NotificationMenu
|
|
60
61
|
};
|
|
@@ -1,57 +1,58 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useIntl as
|
|
1
|
+
import { jsx as t, jsxs as g, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, useEffect as N } from "react";
|
|
3
|
+
import C from "classnames";
|
|
4
|
+
import { useIntl as y } from "react-intl";
|
|
5
5
|
import o from "./ProposalBox.module.scss.js";
|
|
6
|
-
import { useConfig as
|
|
6
|
+
import { useConfig as L } from "../../data/config_provider/useConfig.js";
|
|
7
7
|
import { useAuth as B } from "../../auth/use_auth/useAuth.js";
|
|
8
|
-
import { useTranslatedContent as
|
|
8
|
+
import { useTranslatedContent as _ } from "../../translation/translated_content/useTranslatedContent.js";
|
|
9
9
|
import { lexicalToHtml as H } from "../../input/text_editor/lexicalToHtml.js";
|
|
10
|
-
import { HashScroll as
|
|
11
|
-
import { ContentHeader as
|
|
12
|
-
import { ReadMore as
|
|
13
|
-
import { TranslationButton as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
10
|
+
import { HashScroll as U } from "../../tools/hash_scroll/HashScroll.js";
|
|
11
|
+
import { ContentHeader as D } from "../../user_content/content_header/ContentHeader.js";
|
|
12
|
+
import { ReadMore as P } from "../../text/read_more/ReadMore.js";
|
|
13
|
+
import { TranslationButton as R } from "../../translation/translation_button/TranslationButton.js";
|
|
14
|
+
import { SourceListItem as $ } from "../../source/source_list_item/SourceListItem.js";
|
|
15
|
+
import { ContentFooter as F } from "../../user_content/content_footer/ContentFooter.js";
|
|
16
|
+
import { UpDownVoteBox as j } from "../../vote/up_down_vote_box/UpDownVoteBox.js";
|
|
17
|
+
const te = ({
|
|
17
18
|
proposal: e,
|
|
18
|
-
disabled:
|
|
19
|
-
fixedContentHeight:
|
|
20
|
-
|
|
21
|
-
enableEdition:
|
|
22
|
-
hideFooter:
|
|
19
|
+
disabled: d = !1,
|
|
20
|
+
fixedContentHeight: c,
|
|
21
|
+
fitContent: T = !1,
|
|
22
|
+
enableEdition: v = !0,
|
|
23
|
+
hideFooter: x = !1
|
|
23
24
|
}) => {
|
|
24
|
-
const [
|
|
25
|
+
const [m, M] = p(null), [w, b] = p(!1), r = y(), n = L(), { currentUser: h } = B(), f = h?.moderation_status === "banned", u = `proposal_${e.id}`, i = _(
|
|
25
26
|
e.title,
|
|
26
27
|
e.language,
|
|
27
28
|
"title",
|
|
28
29
|
e.translation_entries
|
|
29
|
-
),
|
|
30
|
+
), a = _(
|
|
30
31
|
e.content,
|
|
31
32
|
e.language,
|
|
32
33
|
"content",
|
|
33
34
|
e.translation_entries
|
|
34
35
|
);
|
|
35
|
-
|
|
36
|
+
N(() => {
|
|
36
37
|
if (e.rich_content) {
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
39
|
-
const
|
|
40
|
-
|
|
38
|
+
const s = JSON.parse(e.rich_content);
|
|
39
|
+
if (s.hasOwnProperty("root")) {
|
|
40
|
+
const l = H(s);
|
|
41
|
+
M(l);
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
}, [e.rich_content]);
|
|
44
|
-
const
|
|
45
|
-
|
|
45
|
+
const S = () => {
|
|
46
|
+
i.toggleContent(), a.toggleContent();
|
|
46
47
|
};
|
|
47
|
-
return /* @__PURE__ */ t(
|
|
48
|
+
return /* @__PURE__ */ t(U, { elementId: u, onScroll: () => b(!0), children: /* @__PURE__ */ g(
|
|
48
49
|
"div",
|
|
49
50
|
{
|
|
50
|
-
className:
|
|
51
|
-
id:
|
|
51
|
+
className: C(o.proposalBoxContainer, { [o.flash]: w }),
|
|
52
|
+
id: u,
|
|
52
53
|
children: [
|
|
53
54
|
/* @__PURE__ */ t(
|
|
54
|
-
|
|
55
|
+
D,
|
|
55
56
|
{
|
|
56
57
|
author: e.author,
|
|
57
58
|
tag: e.tag?.display_name,
|
|
@@ -62,39 +63,40 @@ const Z = ({
|
|
|
62
63
|
/* @__PURE__ */ t(
|
|
63
64
|
"div",
|
|
64
65
|
{
|
|
65
|
-
className:
|
|
66
|
-
[o.fixedHeight]:
|
|
66
|
+
className: C(o.proposalBoxContent, {
|
|
67
|
+
[o.fixedHeight]: c,
|
|
68
|
+
[o.withMinHeight]: !T && !c
|
|
67
69
|
}),
|
|
68
70
|
children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
69
|
-
|
|
71
|
+
P,
|
|
70
72
|
{
|
|
71
|
-
content: /* @__PURE__ */
|
|
72
|
-
e.is_edited && /* @__PURE__ */ t("div", { className: o.edited, children:
|
|
73
|
+
content: /* @__PURE__ */ g(I, { children: [
|
|
74
|
+
e.is_edited && /* @__PURE__ */ t("div", { className: o.edited, children: r.formatMessage({
|
|
73
75
|
id: "proposal.updated",
|
|
74
76
|
defaultMessage: "Updated proposal"
|
|
75
77
|
}) }),
|
|
76
|
-
/* @__PURE__ */ t("div", { className: o.proposalTitle, children:
|
|
77
|
-
|
|
78
|
+
/* @__PURE__ */ t("div", { className: o.proposalTitle, children: i.translatedContent }),
|
|
79
|
+
m && !a.isTranslated ? /* @__PURE__ */ t(
|
|
78
80
|
"div",
|
|
79
81
|
{
|
|
80
82
|
className: o.proposalContent,
|
|
81
|
-
dangerouslySetInnerHTML: { __html:
|
|
83
|
+
dangerouslySetInnerHTML: { __html: m }
|
|
82
84
|
}
|
|
83
|
-
) : /* @__PURE__ */ t("div", { className: o.proposalContent, children:
|
|
84
|
-
(
|
|
85
|
-
|
|
85
|
+
) : /* @__PURE__ */ t("div", { className: o.proposalContent, children: a.translatedContent }),
|
|
86
|
+
(a.isTranslated || i.isTranslated) && /* @__PURE__ */ t(
|
|
87
|
+
R,
|
|
86
88
|
{
|
|
87
89
|
language: e.language,
|
|
88
|
-
callback: () =>
|
|
90
|
+
callback: () => S()
|
|
89
91
|
}
|
|
90
92
|
)
|
|
91
93
|
] }),
|
|
92
94
|
lineCount: 7,
|
|
93
|
-
readMoreText:
|
|
95
|
+
readMoreText: r.formatMessage({
|
|
94
96
|
id: "action.read_more",
|
|
95
97
|
defaultMessage: "Read more"
|
|
96
98
|
}),
|
|
97
|
-
readLessText:
|
|
99
|
+
readLessText: r.formatMessage({
|
|
98
100
|
id: "action.read_less",
|
|
99
101
|
defaultMessage: "Read less"
|
|
100
102
|
})
|
|
@@ -102,32 +104,41 @@ const Z = ({
|
|
|
102
104
|
) })
|
|
103
105
|
}
|
|
104
106
|
),
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
e.sources?.length > 0 && /* @__PURE__ */ t("div", { className: o.proposalSourcesList, children: e.sources.map((s, l) => /* @__PURE__ */ t(
|
|
108
|
+
$,
|
|
109
|
+
{
|
|
110
|
+
publisher: s.publisher,
|
|
111
|
+
url: s.source_url,
|
|
112
|
+
title: s.title,
|
|
113
|
+
index: l
|
|
114
|
+
},
|
|
115
|
+
s.id
|
|
116
|
+
)) }),
|
|
117
|
+
!x && /* @__PURE__ */ t(
|
|
118
|
+
F,
|
|
107
119
|
{
|
|
108
120
|
resource: e,
|
|
109
|
-
disabled:
|
|
121
|
+
disabled: d || f,
|
|
110
122
|
reportType: "Proposal",
|
|
111
123
|
deleteType: "proposals",
|
|
112
124
|
deleteListId: "proposalsList",
|
|
113
|
-
|
|
114
|
-
shareModalTitle: a.formatMessage({ id: "share.proposal" }),
|
|
125
|
+
shareModalTitle: r.formatMessage({ id: "share.proposal" }),
|
|
115
126
|
shareUrl: `https://app.logora.fr/share/p/${e.id}`,
|
|
116
|
-
shareTitle:
|
|
117
|
-
shareText:
|
|
118
|
-
shareCode: `<iframe src="https://cdn.logora.com/embed.html?shortname=${
|
|
119
|
-
showShareCode:
|
|
127
|
+
shareTitle: r.formatMessage({ id: "share.proposal.title" }),
|
|
128
|
+
shareText: r.formatMessage({ id: "share.proposal.text" }),
|
|
129
|
+
shareCode: `<iframe src="https://cdn.logora.com/embed.html?shortname=${n.shortname}&id=${e.id}&resource=proposal" frameborder="0" width="100%" height="335px" scrolling="no"></iframe>`,
|
|
130
|
+
showShareCode: n?.actions?.hideCodeShare !== !0,
|
|
120
131
|
showActions: !e.author.consultation_id,
|
|
121
|
-
enableEdition:
|
|
132
|
+
enableEdition: v,
|
|
122
133
|
children: /* @__PURE__ */ t(
|
|
123
|
-
|
|
134
|
+
j,
|
|
124
135
|
{
|
|
125
136
|
voteableType: "Proposal",
|
|
126
137
|
voteableId: e.id,
|
|
127
138
|
totalUpvote: e.total_upvotes,
|
|
128
139
|
totalDownvote: e.total_downvotes,
|
|
129
|
-
disabled:
|
|
130
|
-
hideDownvotes:
|
|
140
|
+
disabled: d || h?.id === e?.author?.id || f,
|
|
141
|
+
hideDownvotes: n?.actions?.hideDownvotes
|
|
131
142
|
}
|
|
132
143
|
)
|
|
133
144
|
}
|
|
@@ -137,5 +148,5 @@ const Z = ({
|
|
|
137
148
|
) });
|
|
138
149
|
};
|
|
139
150
|
export {
|
|
140
|
-
|
|
151
|
+
te as ProposalBox
|
|
141
152
|
};
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import '../../../assets/components/proposal/proposal_box/ProposalBox.module-
|
|
1
|
+
import '../../../assets/components/proposal/proposal_box/ProposalBox.module-Dm8XDnr1.css';const o = "_proposalBoxContainer_5x1d0_3", t = "_flash_5x1d0_17", s = "_edited_5x1d0_25", e = "_proposalBoxContent_5x1d0_32", n = "_withMinHeight_5x1d0_40", p = "_proposalTitle_5x1d0_44", i = "_proposalContent_5x1d0_52", _ = "_proposalSourcesList_5x1d0_56", a = "_fixedHeight_5x1d0_68", l = {
|
|
2
2
|
proposalBoxContainer: o,
|
|
3
3
|
flash: t,
|
|
4
|
-
edited:
|
|
4
|
+
edited: s,
|
|
5
5
|
proposalBoxContent: e,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
withMinHeight: n,
|
|
7
|
+
proposalTitle: p,
|
|
8
|
+
proposalContent: i,
|
|
9
|
+
proposalSourcesList: _,
|
|
10
|
+
fixedHeight: a
|
|
9
11
|
};
|
|
10
12
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
l as default,
|
|
14
|
+
s as edited,
|
|
15
|
+
a as fixedHeight,
|
|
14
16
|
t as flash,
|
|
15
17
|
o as proposalBoxContainer,
|
|
16
18
|
e as proposalBoxContent,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
i as proposalContent,
|
|
20
|
+
_ as proposalSourcesList,
|
|
21
|
+
p as proposalTitle,
|
|
22
|
+
n as withMinHeight
|
|
19
23
|
};
|
|
@@ -6,20 +6,20 @@ import { useResponsive as N } from "../../hooks/use_responsive/useResponsive.js"
|
|
|
6
6
|
import { Icon as g } from "../../icons/icon/Icon.js";
|
|
7
7
|
const I = ({
|
|
8
8
|
isCollapsible: t = !1,
|
|
9
|
-
isCollapsedByDefault:
|
|
10
|
-
title:
|
|
9
|
+
isCollapsedByDefault: n = !1,
|
|
10
|
+
title: a,
|
|
11
11
|
subtitle: r = "",
|
|
12
|
-
className:
|
|
13
|
-
titleClassName:
|
|
14
|
-
children:
|
|
12
|
+
className: m,
|
|
13
|
+
titleClassName: l,
|
|
14
|
+
children: d
|
|
15
15
|
}) => {
|
|
16
|
-
const [c, h] = x(
|
|
16
|
+
const [c, h] = x(n), { isMobile: f } = N(), p = () => {
|
|
17
17
|
t && h((v) => !v);
|
|
18
18
|
};
|
|
19
19
|
return /* @__PURE__ */ s(
|
|
20
20
|
"div",
|
|
21
21
|
{
|
|
22
|
-
className: o(e.sectionBoxContainer, {
|
|
22
|
+
className: o(e.sectionBoxContainer, m, {
|
|
23
23
|
[e.isMobile]: f
|
|
24
24
|
}),
|
|
25
25
|
children: [
|
|
@@ -30,8 +30,8 @@ const I = ({
|
|
|
30
30
|
onClick: t ? p : null,
|
|
31
31
|
children: [
|
|
32
32
|
/* @__PURE__ */ s("div", { className: e.titleContainer, children: [
|
|
33
|
-
/* @__PURE__ */ i("div", { className: o(
|
|
34
|
-
r && /* @__PURE__ */ i("div", { className: o(
|
|
33
|
+
/* @__PURE__ */ i("div", { className: o(l, e.title), children: a }),
|
|
34
|
+
r && /* @__PURE__ */ i("div", { className: o(e.subtitle), children: r })
|
|
35
35
|
] }),
|
|
36
36
|
t && /* @__PURE__ */ i(
|
|
37
37
|
g,
|
|
@@ -47,7 +47,7 @@ const I = ({
|
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
|
-
(!c || !t) && /* @__PURE__ */ i("div", { className: o(e.body
|
|
50
|
+
(!c || !t) && /* @__PURE__ */ i("div", { className: o(e.body), children: d })
|
|
51
51
|
]
|
|
52
52
|
}
|
|
53
53
|
);
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import '../../../assets/components/section/section_box/SectionBox.module-
|
|
1
|
+
import '../../../assets/components/section/section_box/SectionBox.module-qQs4B6bf.css';const t = "_sectionBoxContainer_tcujo_3", o = "_isMobile_tcujo_15", e = "_header_tcujo_19", i = "_collapsible_tcujo_26", c = "_iconLightArrow_tcujo_30", n = "_iconRotated_tcujo_36", _ = "_titleContainer_tcujo_40", s = "_title_tcujo_40", l = "_subtitle_tcujo_54", a = "_body_tcujo_59", r = {
|
|
2
2
|
sectionBoxContainer: t,
|
|
3
3
|
isMobile: o,
|
|
4
4
|
header: e,
|
|
5
5
|
collapsible: i,
|
|
6
|
-
iconLightArrow:
|
|
6
|
+
iconLightArrow: c,
|
|
7
7
|
iconRotated: n,
|
|
8
8
|
titleContainer: _,
|
|
9
|
-
title:
|
|
10
|
-
subtitle:
|
|
11
|
-
body:
|
|
9
|
+
title: s,
|
|
10
|
+
subtitle: l,
|
|
11
|
+
body: a
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
a as body,
|
|
15
15
|
i as collapsible,
|
|
16
16
|
r as default,
|
|
17
17
|
e as header,
|
|
18
|
-
|
|
18
|
+
c as iconLightArrow,
|
|
19
19
|
n as iconRotated,
|
|
20
20
|
o as isMobile,
|
|
21
21
|
t as sectionBoxContainer,
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
l as subtitle,
|
|
23
|
+
s as title,
|
|
24
24
|
_ as titleContainer
|
|
25
25
|
};
|
|
@@ -2,13 +2,13 @@ import { jsxs as a, Fragment as n, jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { useIntl as l, FormattedDate as m } from "react-intl";
|
|
4
4
|
import e from "./ContextSourceBox.module.scss.js";
|
|
5
|
-
const
|
|
5
|
+
const x = ({ title: r, imageUrl: c, date: i, author: t }) => {
|
|
6
6
|
const o = l();
|
|
7
7
|
return /* @__PURE__ */ a("div", { className: e.container, children: [
|
|
8
8
|
/* @__PURE__ */ a("div", { className: e.content, children: [
|
|
9
9
|
/* @__PURE__ */ a("div", { className: e.infos, children: [
|
|
10
|
-
|
|
11
|
-
/* @__PURE__ */ s("span", { className: e.sourceAuthor, children:
|
|
10
|
+
t && /* @__PURE__ */ a(n, { children: [
|
|
11
|
+
/* @__PURE__ */ s("span", { className: e.sourceAuthor, children: t }),
|
|
12
12
|
/* @__PURE__ */ s("span", { className: e.separator, children: "·" })
|
|
13
13
|
] }),
|
|
14
14
|
/* @__PURE__ */ s("span", { className: e.sourcePublishedDate, children: /* @__PURE__ */ s(
|
|
@@ -21,21 +21,21 @@ const g = ({ title: t, imageUrl: c, date: i, author: r }) => {
|
|
|
21
21
|
}
|
|
22
22
|
) })
|
|
23
23
|
] }),
|
|
24
|
-
/* @__PURE__ */ s("div", { className: e.sourceTitle, children:
|
|
24
|
+
/* @__PURE__ */ s("div", { className: e.sourceTitle, children: r })
|
|
25
25
|
] }),
|
|
26
26
|
/* @__PURE__ */ s(
|
|
27
27
|
"img",
|
|
28
28
|
{
|
|
29
29
|
src: c,
|
|
30
30
|
alt: o.formatMessage({
|
|
31
|
-
id: "source.context_source_box.alt"
|
|
32
|
-
defaultMessage: "Debate source image"
|
|
31
|
+
id: "source.context_source_box.alt"
|
|
33
32
|
}),
|
|
33
|
+
"data-testid": "context-source-image",
|
|
34
34
|
className: e.image
|
|
35
35
|
}
|
|
36
36
|
)
|
|
37
37
|
] });
|
|
38
38
|
};
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
x as ContextSourceBox
|
|
41
41
|
};
|