@logora/debate 0.3.80 → 0.3.82
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/input/text_editor/{TextEditor.module-DePSfOvG.css → TextEditor.module-CxuSL3l3.css} +1 -1
- package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-VuCq918p.css +1 -0
- package/dist/assets/components/proposal/proposal_box/ProposalBox.module-C9BaTFDH.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-C9Q6gBw3.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/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/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 +46 -46
- package/dist/components/icons/stern_icons/index.js +100 -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 +131 -125
- package/dist/components/list/paginated_list/action_bar/ActionBar.js +64 -59
- package/dist/components/list/paginated_list/action_bar/ActionBar.module.scss.js +16 -14
- package/dist/components/notification/notification_menu/NotificationMenu.js +23 -22
- package/dist/components/proposal/proposal_box/ProposalBox.js +58 -49
- package/dist/components/proposal/proposal_box/ProposalBox.module.scss.js +14 -12
- 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 +123 -145
- package/dist/components/vote/vote_box/VoteBox.module.scss.js +50 -50
- 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/list/paginated_list/action_bar/ActionBar.module-pxwFC_Y2.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,98 +1,103 @@
|
|
|
1
|
-
import { jsx as i, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import { useLocation as
|
|
1
|
+
import { jsx as i, Fragment as h, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import u from "classnames";
|
|
3
|
+
import { useState as j } from "react";
|
|
4
|
+
import { useIntl as H } from "react-intl";
|
|
5
|
+
import { useLocation as R } from "react-router";
|
|
6
6
|
import l from "./ActionBar.module.scss.js";
|
|
7
|
-
import { useResponsive as
|
|
8
|
-
import { SearchInput as
|
|
9
|
-
import { Select as
|
|
10
|
-
import { Tag as
|
|
11
|
-
import { Icon as
|
|
12
|
-
const
|
|
13
|
-
title:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
import { useResponsive as T } from "../../../hooks/use_responsive/useResponsive.js";
|
|
8
|
+
import { SearchInput as _ } from "../../../input/search_input/SearchInput.js";
|
|
9
|
+
import { Select as z } from "../../../input/select/Select.js";
|
|
10
|
+
import { Tag as D } from "../../../tag/tag/Tag.js";
|
|
11
|
+
import { Icon as F } from "../../../icons/icon/Icon.js";
|
|
12
|
+
const Z = ({
|
|
13
|
+
title: c,
|
|
14
|
+
subtitle: f,
|
|
15
|
+
showSubtitle: p = !1,
|
|
16
|
+
sortOptions: a,
|
|
17
|
+
defaultSelectOption: v,
|
|
18
|
+
searchBar: n = !1,
|
|
19
|
+
tagList: r,
|
|
20
|
+
activeTagId: d,
|
|
21
|
+
withUrlParams: m = !1,
|
|
22
|
+
onSearch: S,
|
|
23
|
+
onSortChange: g,
|
|
24
|
+
onTagChange: I
|
|
23
25
|
}) => {
|
|
24
|
-
const
|
|
25
|
-
typeof window < "u" ? window.location.search :
|
|
26
|
-
),
|
|
27
|
-
if (
|
|
28
|
-
for (const
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
const N = H(), x = R(), { isMobile: L } = T(), [y, A] = j(!1), s = new URLSearchParams(
|
|
27
|
+
typeof window < "u" ? window.location.search : x.search
|
|
28
|
+
), b = (e) => {
|
|
29
|
+
if (m) {
|
|
30
|
+
for (const o of s.keys())
|
|
31
|
+
a.map((M) => {
|
|
32
|
+
M.name === o && s.delete(o);
|
|
31
33
|
});
|
|
32
|
-
|
|
34
|
+
s.delete("sort"), s.set(
|
|
33
35
|
e.type === "filter" ? e.name : "sort",
|
|
34
36
|
e.value
|
|
35
37
|
);
|
|
36
38
|
}
|
|
37
|
-
|
|
38
|
-
}, A = (e) => {
|
|
39
|
-
d && (e.id === r ? o.delete("tagId") : o.set("tagId", e.id)), S(e.id === r ? null : e.id);
|
|
40
|
-
}, b = (e) => {
|
|
41
|
-
d && (e ? o.set("search", e) : o.delete("search")), p(e), x(e !== "");
|
|
39
|
+
g(e);
|
|
42
40
|
}, w = (e) => {
|
|
43
|
-
|
|
41
|
+
m && (e.id === d ? s.delete("tagId") : s.set("tagId", e.id)), I(e.id === d ? null : e.id);
|
|
42
|
+
}, k = (e) => {
|
|
43
|
+
m && (e ? s.set("search", e) : s.delete("search")), S(e), A(e !== "");
|
|
44
|
+
}, C = (e) => {
|
|
45
|
+
const o = d === e.id;
|
|
44
46
|
return /* @__PURE__ */ i(
|
|
45
47
|
"div",
|
|
46
48
|
{
|
|
47
49
|
className: l.tagItem,
|
|
48
|
-
onClick: () =>
|
|
50
|
+
onClick: () => w(e),
|
|
49
51
|
children: /* @__PURE__ */ i(
|
|
50
|
-
|
|
52
|
+
D,
|
|
51
53
|
{
|
|
52
54
|
text: e.display_name,
|
|
53
|
-
active:
|
|
54
|
-
rightIcon:
|
|
55
|
+
active: o,
|
|
56
|
+
rightIcon: o && /* @__PURE__ */ i(F, { name: "close", height: 10, width: 10 })
|
|
55
57
|
}
|
|
56
58
|
)
|
|
57
59
|
},
|
|
58
60
|
e.id
|
|
59
61
|
);
|
|
60
62
|
};
|
|
61
|
-
return /* @__PURE__ */ i(
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
+
return /* @__PURE__ */ i(h, { children: (c || a || n) && /* @__PURE__ */ t(h, { children: [
|
|
64
|
+
/* @__PURE__ */ t(
|
|
63
65
|
"div",
|
|
64
66
|
{
|
|
65
|
-
className:
|
|
66
|
-
[l.listHeaderOneItem]: !
|
|
67
|
+
className: u(l.listHeader, {
|
|
68
|
+
[l.listHeaderOneItem]: !n || !a
|
|
67
69
|
}),
|
|
68
70
|
children: [
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
/* @__PURE__ */ t("div", { children: [
|
|
72
|
+
c && /* @__PURE__ */ i("div", { className: l.listTitle, children: c }),
|
|
73
|
+
p && f && /* @__PURE__ */ i("div", { className: l.listSubtitle, children: f })
|
|
74
|
+
] }),
|
|
75
|
+
(a || n) && /* @__PURE__ */ t(
|
|
71
76
|
"div",
|
|
72
77
|
{
|
|
73
|
-
className:
|
|
74
|
-
[l.rightBarOneItem]: !
|
|
78
|
+
className: u(l.rightBar, {
|
|
79
|
+
[l.rightBarOneItem]: !n || !a
|
|
75
80
|
}),
|
|
76
81
|
children: [
|
|
77
|
-
|
|
78
|
-
|
|
82
|
+
n ? /* @__PURE__ */ i("div", { className: l.search, children: /* @__PURE__ */ i(
|
|
83
|
+
_,
|
|
79
84
|
{
|
|
80
|
-
onSearchSubmit:
|
|
81
|
-
placeholder:
|
|
85
|
+
onSearchSubmit: k,
|
|
86
|
+
placeholder: N.formatMessage({
|
|
82
87
|
id: "info.search_mobile",
|
|
83
88
|
defaultMessage: "Search"
|
|
84
89
|
}),
|
|
85
90
|
reducedByDefault: !1
|
|
86
91
|
}
|
|
87
92
|
) }) : null,
|
|
88
|
-
|
|
89
|
-
|
|
93
|
+
a ? /* @__PURE__ */ i(
|
|
94
|
+
z,
|
|
90
95
|
{
|
|
91
|
-
onChange:
|
|
92
|
-
options:
|
|
93
|
-
defaultOption:
|
|
96
|
+
onChange: b,
|
|
97
|
+
options: a,
|
|
98
|
+
defaultOption: v,
|
|
94
99
|
horizontalPosition: "right",
|
|
95
|
-
disabled:
|
|
100
|
+
disabled: y,
|
|
96
101
|
className: l.select
|
|
97
102
|
}
|
|
98
103
|
) : null
|
|
@@ -102,9 +107,9 @@ const X = ({
|
|
|
102
107
|
]
|
|
103
108
|
}
|
|
104
109
|
),
|
|
105
|
-
|
|
110
|
+
r && r.length > 0 && /* @__PURE__ */ i("div", { className: l.tagList, children: r.map(C) })
|
|
106
111
|
] }) });
|
|
107
112
|
};
|
|
108
113
|
export {
|
|
109
|
-
|
|
114
|
+
Z as ActionBar
|
|
110
115
|
};
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import '../../../../assets/components/list/paginated_list/action_bar/ActionBar.module-
|
|
1
|
+
import '../../../../assets/components/list/paginated_list/action_bar/ActionBar.module-VuCq918p.css';const t = "_listHeader_7x11f_3", e = "_listHeaderOneItem_7x11f_16", s = "_listTitle_7x11f_23", _ = "_listSubtitle_7x11f_30", i = "_rightBar_7x11f_36", a = "_rightBarOneItem_7x11f_46", l = "_search_7x11f_57", r = "_tagList_7x11f_67", c = "_tagItem_7x11f_82", n = "_select_7x11f_89", g = {
|
|
2
2
|
listHeader: t,
|
|
3
3
|
listHeaderOneItem: e,
|
|
4
|
-
listTitle:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
listTitle: s,
|
|
5
|
+
listSubtitle: _,
|
|
6
|
+
rightBar: i,
|
|
7
|
+
rightBarOneItem: a,
|
|
8
|
+
search: l,
|
|
8
9
|
tagList: r,
|
|
9
|
-
tagItem:
|
|
10
|
-
select:
|
|
10
|
+
tagItem: c,
|
|
11
|
+
select: n
|
|
11
12
|
};
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
g as default,
|
|
14
15
|
t as listHeader,
|
|
15
16
|
e as listHeaderOneItem,
|
|
16
|
-
|
|
17
|
-
s as
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
l as
|
|
21
|
-
|
|
17
|
+
_ as listSubtitle,
|
|
18
|
+
s as listTitle,
|
|
19
|
+
i as rightBar,
|
|
20
|
+
a as rightBarOneItem,
|
|
21
|
+
l as search,
|
|
22
|
+
n as select,
|
|
23
|
+
c as tagItem,
|
|
22
24
|
r as tagList
|
|
23
25
|
};
|
|
@@ -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,32 +1,32 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import u from "classnames";
|
|
1
|
+
import { jsx as t, jsxs as u, Fragment as S } from "react/jsx-runtime";
|
|
3
2
|
import { useState as g, useEffect as I } from "react";
|
|
3
|
+
import p from "classnames";
|
|
4
4
|
import { useIntl as N } from "react-intl";
|
|
5
5
|
import o from "./ProposalBox.module.scss.js";
|
|
6
|
-
import { useConfig as
|
|
7
|
-
import { useAuth as
|
|
8
|
-
import { useTranslatedContent as
|
|
9
|
-
import { lexicalToHtml as
|
|
10
|
-
import { HashScroll as
|
|
6
|
+
import { useConfig as y } from "../../data/config_provider/useConfig.js";
|
|
7
|
+
import { useAuth as L } from "../../auth/use_auth/useAuth.js";
|
|
8
|
+
import { useTranslatedContent as C } from "../../translation/translated_content/useTranslatedContent.js";
|
|
9
|
+
import { lexicalToHtml as B } from "../../input/text_editor/lexicalToHtml.js";
|
|
10
|
+
import { HashScroll as H } from "../../tools/hash_scroll/HashScroll.js";
|
|
11
11
|
import { ContentHeader as U } from "../../user_content/content_header/ContentHeader.js";
|
|
12
12
|
import { ReadMore as D } from "../../text/read_more/ReadMore.js";
|
|
13
13
|
import { TranslationButton as P } from "../../translation/translation_button/TranslationButton.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
14
|
+
import { SourceListItem as R } from "../../source/source_list_item/SourceListItem.js";
|
|
15
|
+
import { ContentFooter as $ } from "../../user_content/content_footer/ContentFooter.js";
|
|
16
|
+
import { UpDownVoteBox as F } from "../../vote/up_down_vote_box/UpDownVoteBox.js";
|
|
17
|
+
const ee = ({
|
|
17
18
|
proposal: e,
|
|
18
|
-
disabled:
|
|
19
|
-
fixedContentHeight:
|
|
20
|
-
contentMaxHeight: F = 156,
|
|
19
|
+
disabled: d = !1,
|
|
20
|
+
fixedContentHeight: _,
|
|
21
21
|
enableEdition: T = !0,
|
|
22
|
-
hideFooter:
|
|
22
|
+
hideFooter: v = !1
|
|
23
23
|
}) => {
|
|
24
|
-
const [
|
|
24
|
+
const [c, x] = g(null), [M, w] = g(!1), s = N(), n = y(), { currentUser: m } = L(), h = m?.moderation_status === "banned", f = `proposal_${e.id}`, i = C(
|
|
25
25
|
e.title,
|
|
26
26
|
e.language,
|
|
27
27
|
"title",
|
|
28
28
|
e.translation_entries
|
|
29
|
-
),
|
|
29
|
+
), a = C(
|
|
30
30
|
e.content,
|
|
31
31
|
e.language,
|
|
32
32
|
"content",
|
|
@@ -34,21 +34,21 @@ const Z = ({
|
|
|
34
34
|
);
|
|
35
35
|
I(() => {
|
|
36
36
|
if (e.rich_content) {
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
39
|
-
const
|
|
40
|
-
x(
|
|
37
|
+
const r = JSON.parse(e.rich_content);
|
|
38
|
+
if (r.hasOwnProperty("root")) {
|
|
39
|
+
const l = B(r);
|
|
40
|
+
x(l);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}, [e.rich_content]);
|
|
44
|
-
const
|
|
45
|
-
|
|
44
|
+
const b = () => {
|
|
45
|
+
i.toggleContent(), a.toggleContent();
|
|
46
46
|
};
|
|
47
|
-
return /* @__PURE__ */ t(
|
|
47
|
+
return /* @__PURE__ */ t(H, { elementId: f, onScroll: () => w(!0), children: /* @__PURE__ */ u(
|
|
48
48
|
"div",
|
|
49
49
|
{
|
|
50
|
-
className:
|
|
51
|
-
id:
|
|
50
|
+
className: p(o.proposalBoxContainer, { [o.flash]: M }),
|
|
51
|
+
id: f,
|
|
52
52
|
children: [
|
|
53
53
|
/* @__PURE__ */ t(
|
|
54
54
|
U,
|
|
@@ -62,39 +62,39 @@ const Z = ({
|
|
|
62
62
|
/* @__PURE__ */ t(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
|
-
className:
|
|
66
|
-
[o.fixedHeight]:
|
|
65
|
+
className: p(o.proposalBoxContent, {
|
|
66
|
+
[o.fixedHeight]: _
|
|
67
67
|
}),
|
|
68
68
|
children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
69
69
|
D,
|
|
70
70
|
{
|
|
71
|
-
content: /* @__PURE__ */
|
|
72
|
-
e.is_edited && /* @__PURE__ */ t("div", { className: o.edited, children:
|
|
71
|
+
content: /* @__PURE__ */ u(S, { children: [
|
|
72
|
+
e.is_edited && /* @__PURE__ */ t("div", { className: o.edited, children: s.formatMessage({
|
|
73
73
|
id: "proposal.updated",
|
|
74
74
|
defaultMessage: "Updated proposal"
|
|
75
75
|
}) }),
|
|
76
|
-
/* @__PURE__ */ t("div", { className: o.proposalTitle, children:
|
|
77
|
-
|
|
76
|
+
/* @__PURE__ */ t("div", { className: o.proposalTitle, children: i.translatedContent }),
|
|
77
|
+
c && !a.isTranslated ? /* @__PURE__ */ t(
|
|
78
78
|
"div",
|
|
79
79
|
{
|
|
80
80
|
className: o.proposalContent,
|
|
81
|
-
dangerouslySetInnerHTML: { __html:
|
|
81
|
+
dangerouslySetInnerHTML: { __html: c }
|
|
82
82
|
}
|
|
83
|
-
) : /* @__PURE__ */ t("div", { className: o.proposalContent, children:
|
|
84
|
-
(
|
|
83
|
+
) : /* @__PURE__ */ t("div", { className: o.proposalContent, children: a.translatedContent }),
|
|
84
|
+
(a.isTranslated || i.isTranslated) && /* @__PURE__ */ t(
|
|
85
85
|
P,
|
|
86
86
|
{
|
|
87
87
|
language: e.language,
|
|
88
|
-
callback: () =>
|
|
88
|
+
callback: () => b()
|
|
89
89
|
}
|
|
90
90
|
)
|
|
91
91
|
] }),
|
|
92
92
|
lineCount: 7,
|
|
93
|
-
readMoreText:
|
|
93
|
+
readMoreText: s.formatMessage({
|
|
94
94
|
id: "action.read_more",
|
|
95
95
|
defaultMessage: "Read more"
|
|
96
96
|
}),
|
|
97
|
-
readLessText:
|
|
97
|
+
readLessText: s.formatMessage({
|
|
98
98
|
id: "action.read_less",
|
|
99
99
|
defaultMessage: "Read less"
|
|
100
100
|
})
|
|
@@ -102,32 +102,41 @@ const Z = ({
|
|
|
102
102
|
) })
|
|
103
103
|
}
|
|
104
104
|
),
|
|
105
|
-
|
|
105
|
+
e.sources?.length > 0 && /* @__PURE__ */ t("div", { className: o.proposalSourcesList, children: e.sources.map((r, l) => /* @__PURE__ */ t(
|
|
106
106
|
R,
|
|
107
|
+
{
|
|
108
|
+
publisher: r.publisher,
|
|
109
|
+
url: r.source_url,
|
|
110
|
+
title: r.title,
|
|
111
|
+
index: l
|
|
112
|
+
},
|
|
113
|
+
r.id
|
|
114
|
+
)) }),
|
|
115
|
+
!v && /* @__PURE__ */ t(
|
|
116
|
+
$,
|
|
107
117
|
{
|
|
108
118
|
resource: e,
|
|
109
|
-
disabled:
|
|
119
|
+
disabled: d || h,
|
|
110
120
|
reportType: "Proposal",
|
|
111
121
|
deleteType: "proposals",
|
|
112
122
|
deleteListId: "proposalsList",
|
|
113
|
-
|
|
114
|
-
shareModalTitle: a.formatMessage({ id: "share.proposal" }),
|
|
123
|
+
shareModalTitle: s.formatMessage({ id: "share.proposal" }),
|
|
115
124
|
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:
|
|
125
|
+
shareTitle: s.formatMessage({ id: "share.proposal.title" }),
|
|
126
|
+
shareText: s.formatMessage({ id: "share.proposal.text" }),
|
|
127
|
+
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>`,
|
|
128
|
+
showShareCode: n?.actions?.hideCodeShare !== !0,
|
|
120
129
|
showActions: !e.author.consultation_id,
|
|
121
130
|
enableEdition: T,
|
|
122
131
|
children: /* @__PURE__ */ t(
|
|
123
|
-
|
|
132
|
+
F,
|
|
124
133
|
{
|
|
125
134
|
voteableType: "Proposal",
|
|
126
135
|
voteableId: e.id,
|
|
127
136
|
totalUpvote: e.total_upvotes,
|
|
128
137
|
totalDownvote: e.total_downvotes,
|
|
129
|
-
disabled:
|
|
130
|
-
hideDownvotes:
|
|
138
|
+
disabled: d || m?.id === e?.author?.id || h,
|
|
139
|
+
hideDownvotes: n?.actions?.hideDownvotes
|
|
131
140
|
}
|
|
132
141
|
)
|
|
133
142
|
}
|
|
@@ -137,5 +146,5 @@ const Z = ({
|
|
|
137
146
|
) });
|
|
138
147
|
};
|
|
139
148
|
export {
|
|
140
|
-
|
|
149
|
+
ee as ProposalBox
|
|
141
150
|
};
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import '../../../assets/components/proposal/proposal_box/ProposalBox.module-
|
|
1
|
+
import '../../../assets/components/proposal/proposal_box/ProposalBox.module-C9BaTFDH.css';const o = "_proposalBoxContainer_5d6lc_3", t = "_flash_5d6lc_17", s = "_edited_5d6lc_25", l = "_proposalBoxContent_5d6lc_32", p = "_proposalTitle_5d6lc_44", e = "_proposalContent_5d6lc_52", n = "_proposalSourcesList_5d6lc_56", _ = "_fixedHeight_5d6lc_68", a = {
|
|
2
2
|
proposalBoxContainer: o,
|
|
3
3
|
flash: t,
|
|
4
|
-
edited:
|
|
5
|
-
proposalBoxContent:
|
|
6
|
-
proposalTitle:
|
|
7
|
-
proposalContent:
|
|
8
|
-
|
|
4
|
+
edited: s,
|
|
5
|
+
proposalBoxContent: l,
|
|
6
|
+
proposalTitle: p,
|
|
7
|
+
proposalContent: e,
|
|
8
|
+
proposalSourcesList: n,
|
|
9
|
+
fixedHeight: _
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
a as default,
|
|
13
|
+
s as edited,
|
|
14
|
+
_ as fixedHeight,
|
|
14
15
|
t as flash,
|
|
15
16
|
o as proposalBoxContainer,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
n as
|
|
17
|
+
l as proposalBoxContent,
|
|
18
|
+
e as proposalContent,
|
|
19
|
+
n as proposalSourcesList,
|
|
20
|
+
p as proposalTitle
|
|
19
21
|
};
|
|
@@ -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
|
};
|