@logora/debate 0.3.80 → 0.3.81
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/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 +112 -110
- 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/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,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as a, Fragment as
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as v } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d } from "react";
|
|
3
3
|
import { useIntl as B, FormattedMessage as f } from "react-intl";
|
|
4
4
|
import s from "./SourceModal.module.scss.js";
|
|
@@ -6,24 +6,24 @@ import { useDataProvider as x } from "../../data/data_provider/useDataProvider.j
|
|
|
6
6
|
import { useModal as y } from "../../dialog/modal/useModal.js";
|
|
7
7
|
import { Modal as z } from "../../dialog/modal/Modal.js";
|
|
8
8
|
import { SearchInput as A } from "../../input/search_input/SearchInput.js";
|
|
9
|
-
import { AnnouncementDialog as
|
|
9
|
+
import { AnnouncementDialog as w } from "../../dialog/announcement_dialog/AnnouncementDialog.js";
|
|
10
10
|
import { SourceBox as I } from "../source_box/SourceBox.js";
|
|
11
11
|
import { Button as C } from "../../action/button/Button.js";
|
|
12
12
|
import { Loader as j } from "../../progress/loader/Loader.js";
|
|
13
13
|
const Q = ({
|
|
14
|
-
onAddSource:
|
|
14
|
+
onAddSource: b,
|
|
15
15
|
onHideModal: h,
|
|
16
16
|
allowedSources: t = []
|
|
17
17
|
}) => {
|
|
18
|
-
const [p, u] = d(!1), [r, n] = d(), [
|
|
19
|
-
|
|
18
|
+
const [p, u] = d(!1), [r, n] = d(), [g, i] = d(!1), S = x(), [_, M] = d(!1), l = B(), { hideModal: E } = y(), N = () => {
|
|
19
|
+
b(r), n(null), E(), h && h();
|
|
20
20
|
}, P = (o) => {
|
|
21
21
|
if (!t || t.length === 0)
|
|
22
22
|
return !0;
|
|
23
23
|
const c = o.hostname.replace("www.", "");
|
|
24
24
|
return !!t.includes(c);
|
|
25
25
|
}, U = (o) => {
|
|
26
|
-
if (
|
|
26
|
+
if (M(!1), n(null), i(!1), !o)
|
|
27
27
|
return !1;
|
|
28
28
|
let c;
|
|
29
29
|
try {
|
|
@@ -31,14 +31,14 @@ const Q = ({
|
|
|
31
31
|
} catch {
|
|
32
32
|
return i(!0), !1;
|
|
33
33
|
}
|
|
34
|
-
P(c) ? (u(!0),
|
|
34
|
+
P(c) ? (u(!0), S.create("sources/fetch", { query: o }).then(
|
|
35
35
|
(m) => {
|
|
36
36
|
m.data.success ? (n(m.data.data.resource), u(!1)) : (u(!1), i(!0));
|
|
37
37
|
},
|
|
38
38
|
(m) => {
|
|
39
39
|
u(!1), i(!0);
|
|
40
40
|
}
|
|
41
|
-
)) :
|
|
41
|
+
)) : M(!0);
|
|
42
42
|
};
|
|
43
43
|
return /* @__PURE__ */ e(
|
|
44
44
|
z,
|
|
@@ -62,14 +62,14 @@ const Q = ({
|
|
|
62
62
|
type: "url"
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
|
-
/* @__PURE__ */ e("div", { className: s.sourceInputHelp, children: /* @__PURE__ */ e(
|
|
65
|
+
!r && !g && !_ && /* @__PURE__ */ e("div", { className: s.sourceInputHelp, children: /* @__PURE__ */ e(
|
|
66
66
|
f,
|
|
67
67
|
{
|
|
68
68
|
id: "source.source_modal.input_help",
|
|
69
69
|
defaultMessage: "Press Enter to add the source"
|
|
70
70
|
}
|
|
71
71
|
) }),
|
|
72
|
-
t.length > 0 && /* @__PURE__ */ a(
|
|
72
|
+
t.length > 0 && /* @__PURE__ */ a(v, { children: [
|
|
73
73
|
/* @__PURE__ */ e("div", { className: s.separator }),
|
|
74
74
|
/* @__PURE__ */ e("div", { className: s.allowedSourcesInfo, children: /* @__PURE__ */ e(
|
|
75
75
|
f,
|
|
@@ -82,8 +82,8 @@ const Q = ({
|
|
|
82
82
|
] })
|
|
83
83
|
] }),
|
|
84
84
|
/* @__PURE__ */ a("div", { className: s.sourcePreviewBox, children: [
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
g && /* @__PURE__ */ e(
|
|
86
|
+
w,
|
|
87
87
|
{
|
|
88
88
|
message: l.formatMessage({
|
|
89
89
|
id: "source.source_modal.error",
|
|
@@ -92,8 +92,8 @@ const Q = ({
|
|
|
92
92
|
fullWidth: !0
|
|
93
93
|
}
|
|
94
94
|
),
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
_ && /* @__PURE__ */ e(
|
|
96
|
+
w,
|
|
97
97
|
{
|
|
98
98
|
message: l.formatMessage({
|
|
99
99
|
id: "source.source_modal.error_unauthorized",
|
|
@@ -102,7 +102,7 @@ const Q = ({
|
|
|
102
102
|
fullWidth: !0
|
|
103
103
|
}
|
|
104
104
|
),
|
|
105
|
-
r && /* @__PURE__ */ e("div", { children: p ? /* @__PURE__ */ e(j, {}) : /* @__PURE__ */ a(
|
|
105
|
+
r && /* @__PURE__ */ e("div", { children: p ? /* @__PURE__ */ e(j, {}) : /* @__PURE__ */ a(v, { children: [
|
|
106
106
|
/* @__PURE__ */ e(
|
|
107
107
|
I,
|
|
108
108
|
{
|
|
@@ -1,88 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { useIntl as
|
|
4
|
-
import
|
|
5
|
-
import { SectionBox as
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
title: y,
|
|
14
|
-
subtitle: g
|
|
1
|
+
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { useIntl as h } from "react-intl";
|
|
4
|
+
import m from "./Summary.module.scss.js";
|
|
5
|
+
import { SectionBox as y } from "../../section/section_box/SectionBox.js";
|
|
6
|
+
import { SummaryBox as n } from "../summary_box/SummaryBox.js";
|
|
7
|
+
const M = ({
|
|
8
|
+
summary: t,
|
|
9
|
+
tags: i = [],
|
|
10
|
+
tagClassNames: l = [],
|
|
11
|
+
title: c,
|
|
12
|
+
subtitle: d
|
|
15
13
|
}) => {
|
|
16
|
-
const
|
|
14
|
+
const a = h(), f = () => {
|
|
15
|
+
if (!t) return {};
|
|
16
|
+
if (typeof t == "object") return t;
|
|
17
17
|
try {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return (await m.json()).data?.content?.arguments || [];
|
|
22
|
-
} catch (o) {
|
|
23
|
-
console.error(o);
|
|
18
|
+
return JSON.parse(t);
|
|
19
|
+
} catch {
|
|
20
|
+
return { global: t };
|
|
24
21
|
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const r = {};
|
|
30
|
-
if (t.length === 0)
|
|
31
|
-
r["no-position"] = await u(a);
|
|
32
|
-
else {
|
|
33
|
-
const o = await Promise.all(
|
|
34
|
-
t.map((m) => u(a, m.id))
|
|
35
|
-
);
|
|
36
|
-
t.forEach((m, c) => {
|
|
37
|
-
r[m.id] = o[c];
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
x(r);
|
|
41
|
-
} catch (r) {
|
|
42
|
-
console.error(r);
|
|
43
|
-
}
|
|
44
|
-
})();
|
|
45
|
-
}, [a, t]), /* @__PURE__ */ S(
|
|
46
|
-
B,
|
|
22
|
+
}, u = (e) => e ? e.split(`
|
|
23
|
+
`).map((o) => o.trim()).filter(Boolean) : [], s = f();
|
|
24
|
+
return /* @__PURE__ */ r(
|
|
25
|
+
y,
|
|
47
26
|
{
|
|
27
|
+
className: m.sectionBox,
|
|
48
28
|
isCollapsible: !0,
|
|
49
29
|
isCollapsedByDefault: !0,
|
|
50
|
-
title:
|
|
51
|
-
subtitle:
|
|
52
|
-
children: [
|
|
53
|
-
/* @__PURE__ */
|
|
30
|
+
title: c,
|
|
31
|
+
subtitle: d,
|
|
32
|
+
children: /* @__PURE__ */ p("div", { className: m.content, children: [
|
|
33
|
+
/* @__PURE__ */ r("div", { className: m.description, children: a.formatMessage({
|
|
54
34
|
id: "summary.description.argument_summary",
|
|
55
35
|
defaultMessage: "Our algorithm produces comprehensive, well-structured summaries of the most recurrent arguments. Each published argument influences the content of this summary. The better structured the argument, the more weight it carries."
|
|
56
36
|
}) }),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
37
|
+
/* @__PURE__ */ r("div", { className: m.summaryContainer, children: i.length > 0 ? i.map((e, o) => /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
|
|
38
|
+
n,
|
|
59
39
|
{
|
|
60
|
-
summaryItems: (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
emptySummaryText:
|
|
40
|
+
summaryItems: u(s[e.id]),
|
|
41
|
+
tag: e.name,
|
|
42
|
+
tagClassName: l[o],
|
|
43
|
+
emptySummaryText: a.formatMessage({
|
|
64
44
|
id: "info.emptysummary",
|
|
65
45
|
defaultMessage: "No resume found."
|
|
66
46
|
})
|
|
67
47
|
}
|
|
68
|
-
) }
|
|
69
|
-
|
|
48
|
+
) }, e.id)) : /* @__PURE__ */ r(
|
|
49
|
+
n,
|
|
70
50
|
{
|
|
71
|
-
summaryItems: (
|
|
72
|
-
|
|
51
|
+
summaryItems: u(
|
|
52
|
+
s.global || s.untagged || Object.values(s)[0]
|
|
73
53
|
),
|
|
74
|
-
|
|
75
|
-
tagClassName: p[r],
|
|
76
|
-
emptySummaryText: i.formatMessage({
|
|
54
|
+
emptySummaryText: a.formatMessage({
|
|
77
55
|
id: "info.emptysummary",
|
|
78
56
|
defaultMessage: "No resume found."
|
|
79
57
|
})
|
|
80
58
|
}
|
|
81
|
-
) }
|
|
82
|
-
]
|
|
59
|
+
) })
|
|
60
|
+
] })
|
|
83
61
|
}
|
|
84
62
|
);
|
|
85
63
|
};
|
|
86
64
|
export {
|
|
87
|
-
|
|
65
|
+
M as Summary
|
|
88
66
|
};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import '../../../assets/components/summary/summary/Summary.module-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import '../../../assets/components/summary/summary/Summary.module-2bnx3egy.css';const t = "_sectionBox_tui97_3", n = "_content_tui97_7", o = "_summaryContainer_tui97_11", s = "_description_tui97_35", i = {
|
|
2
|
+
sectionBox: t,
|
|
3
|
+
content: n,
|
|
4
|
+
summaryContainer: o,
|
|
5
|
+
description: s
|
|
4
6
|
};
|
|
5
7
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
n as content,
|
|
9
|
+
i as default,
|
|
10
|
+
s as description,
|
|
11
|
+
t as sectionBox,
|
|
12
|
+
o as summaryContainer
|
|
9
13
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import '../../../assets/components/summary/summary_box/SummaryBox.module-
|
|
1
|
+
import '../../../assets/components/summary/summary_box/SummaryBox.module-Dr9PevSJ.css';const t = "_box_f4my1_3", m = "_stats_f4my1_17", s = "_withTag_f4my1_24", _ = "_tag_f4my1_28", a = "_summaryItem_f4my1_47", y = "_emptySummaryText_f4my1_57", e = {
|
|
2
2
|
box: t,
|
|
3
|
-
stats:
|
|
3
|
+
stats: m,
|
|
4
4
|
withTag: s,
|
|
5
|
-
tag:
|
|
6
|
-
summaryItem:
|
|
7
|
-
emptySummaryText:
|
|
5
|
+
tag: _,
|
|
6
|
+
summaryItem: a,
|
|
7
|
+
emptySummaryText: y
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
10
|
t as box,
|
|
11
11
|
e as default,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
y as emptySummaryText,
|
|
13
|
+
m as stats,
|
|
14
|
+
a as summaryItem,
|
|
15
|
+
_ as tag,
|
|
16
16
|
s as withTag
|
|
17
17
|
};
|