@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,18 +1,19 @@
|
|
|
1
1
|
import { AuthProvider as s } from "./AuthProvider.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { utf8ToBase64url as e } from "../use_auth/base64.js";
|
|
3
|
+
class u extends s {
|
|
4
|
+
constructor(r, t) {
|
|
5
|
+
super(), this.providerName = r, this.userData = t;
|
|
5
6
|
}
|
|
6
7
|
shouldInitAuth() {
|
|
7
8
|
return !!this.userData;
|
|
8
9
|
}
|
|
9
10
|
getSessionId = () => null;
|
|
10
|
-
isSameUser(
|
|
11
|
+
isSameUser(r) {
|
|
11
12
|
return !0;
|
|
12
13
|
}
|
|
13
14
|
getAssertion() {
|
|
14
|
-
const
|
|
15
|
-
return
|
|
15
|
+
const r = JSON.stringify(this.userData);
|
|
16
|
+
return e(r);
|
|
16
17
|
}
|
|
17
18
|
getAuthorizationParams() {
|
|
18
19
|
return {
|
|
@@ -25,5 +26,5 @@ class o extends s {
|
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
+
u as FormAuth
|
|
29
30
|
};
|
|
@@ -1,75 +1,55 @@
|
|
|
1
|
-
import { jsx as t, Fragment as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as t, Fragment as g, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import i from "classnames";
|
|
3
3
|
import { useMemo as p } from "react";
|
|
4
|
-
import { useIntl as f, FormattedMessage as
|
|
4
|
+
import { useIntl as f, FormattedMessage as h } from "react-intl";
|
|
5
5
|
import o from "./ConsultationBox.module.scss.js";
|
|
6
|
-
import { useRelativeTime as _ } from "../../hooks/use_relative_time/useRelativeTime.js";
|
|
7
6
|
import { useRoutes as v } from "../../data/config_provider/useRoutes.js";
|
|
8
7
|
import { useResponsive as N } from "../../hooks/use_responsive/useResponsive.js";
|
|
9
|
-
import { Link as
|
|
10
|
-
import { TranslatedContent as
|
|
11
|
-
import {
|
|
8
|
+
import { Link as r } from "../../action/link/Link.js";
|
|
9
|
+
import { TranslatedContent as _ } from "../../translation/translated_content/TranslatedContent.js";
|
|
10
|
+
import { Tooltip as m } from "../../dialog/tooltip/Tooltip.js";
|
|
11
|
+
import { Icon as d } from "../../icons/icon/Icon.js";
|
|
12
12
|
import { ProgressBar as x } from "../../progress/progress_bar/ProgressBar.js";
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
id: "consultation.consultation_box.consultation_ended",
|
|
18
|
-
defaultMessage: "Consultation ended"
|
|
19
|
-
}
|
|
20
|
-
) }) : /* @__PURE__ */ n(d, { children: [
|
|
21
|
-
/* @__PURE__ */ n("span", { children: [
|
|
13
|
+
const P = ({ consultation: e, showVoteProgress: u = !0 }) => {
|
|
14
|
+
const a = f(), l = p(() => /* @__PURE__ */ new Date()), c = new Date(e.ends_at), n = v(), { isMobile: I } = N();
|
|
15
|
+
return /* @__PURE__ */ t(g, { children: /* @__PURE__ */ s("div", { className: o.container, children: [
|
|
16
|
+
/* @__PURE__ */ s("div", { className: o.consultationImageBox, children: [
|
|
22
17
|
/* @__PURE__ */ t(
|
|
23
|
-
|
|
18
|
+
r,
|
|
24
19
|
{
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
to: n.consultationShowLocation.toUrl({
|
|
21
|
+
consultationSlug: e.slug
|
|
22
|
+
}),
|
|
23
|
+
children: /* @__PURE__ */ t(
|
|
24
|
+
"img",
|
|
25
|
+
{
|
|
26
|
+
loading: "lazy",
|
|
27
|
+
className: o.consultationImage,
|
|
28
|
+
src: e.image_url,
|
|
29
|
+
alt: a.formatMessage({
|
|
30
|
+
id: "consultation.consultation_box.alt",
|
|
31
|
+
defaultMessage: "Presentation image for the consultation"
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
)
|
|
27
35
|
}
|
|
28
36
|
),
|
|
29
|
-
" ",
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
e.ends_at && c < l && /* @__PURE__ */ t("div", { className: i(o.consultationTime, o.ended), children: /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(
|
|
38
|
+
h,
|
|
39
|
+
{
|
|
40
|
+
id: "consultation.consultation_box.consultation_ended",
|
|
41
|
+
defaultMessage: "Consultation ended"
|
|
42
|
+
}
|
|
43
|
+
) }) })
|
|
32
44
|
] }),
|
|
33
|
-
/* @__PURE__ */ t("span", { children: g })
|
|
34
|
-
] });
|
|
35
|
-
return /* @__PURE__ */ t(d, { children: /* @__PURE__ */ n("div", { className: o.container, children: [
|
|
36
45
|
/* @__PURE__ */ t(
|
|
37
|
-
|
|
46
|
+
r,
|
|
38
47
|
{
|
|
39
|
-
to:
|
|
40
|
-
consultationSlug: e.slug
|
|
41
|
-
}),
|
|
42
|
-
children: /* @__PURE__ */ t(
|
|
43
|
-
"img",
|
|
44
|
-
{
|
|
45
|
-
loading: "lazy",
|
|
46
|
-
className: o.consultationImage,
|
|
47
|
-
src: e.image_url,
|
|
48
|
-
alt: u.formatMessage({
|
|
49
|
-
id: "consultation.consultation_box.alt",
|
|
50
|
-
defaultMessage: "Presentation image for the consultation"
|
|
51
|
-
})
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
e.ends_at && /* @__PURE__ */ t(
|
|
57
|
-
"div",
|
|
58
|
-
{
|
|
59
|
-
className: l(o.consultationTime, {
|
|
60
|
-
[o.ended]: s < i
|
|
61
|
-
}),
|
|
62
|
-
children: h()
|
|
63
|
-
}
|
|
64
|
-
),
|
|
65
|
-
/* @__PURE__ */ t(
|
|
66
|
-
c,
|
|
67
|
-
{
|
|
68
|
-
to: r.consultationShowLocation.toUrl({
|
|
48
|
+
to: n.consultationShowLocation.toUrl({
|
|
69
49
|
consultationSlug: e.slug
|
|
70
50
|
}),
|
|
71
51
|
children: /* @__PURE__ */ t("div", { className: o.consultationTitle, children: /* @__PURE__ */ t(
|
|
72
|
-
|
|
52
|
+
_,
|
|
73
53
|
{
|
|
74
54
|
originalContent: e.title,
|
|
75
55
|
originalLanguage: e.language,
|
|
@@ -80,72 +60,61 @@ const D = ({ consultation: e }) => {
|
|
|
80
60
|
}
|
|
81
61
|
),
|
|
82
62
|
/* @__PURE__ */ t(
|
|
83
|
-
|
|
63
|
+
r,
|
|
84
64
|
{
|
|
85
|
-
to:
|
|
65
|
+
to: n.consultationShowLocation.toUrl({
|
|
86
66
|
consultationSlug: e.slug
|
|
87
|
-
})
|
|
88
|
-
children: /* @__PURE__ */ n("div", { className: o.consultationButtonContainer, children: [
|
|
89
|
-
e.ends_at && s < i ? /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(
|
|
90
|
-
a,
|
|
91
|
-
{
|
|
92
|
-
id: "consultation.consultation_box.action_show_result",
|
|
93
|
-
defaultMessage: "Show result"
|
|
94
|
-
}
|
|
95
|
-
) }) : /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(
|
|
96
|
-
a,
|
|
97
|
-
{
|
|
98
|
-
id: "consultation.consultation_box.action_consultation_participate",
|
|
99
|
-
defaultMessage: "Participate"
|
|
100
|
-
}
|
|
101
|
-
) }),
|
|
102
|
-
/* @__PURE__ */ t(
|
|
103
|
-
m,
|
|
104
|
-
{
|
|
105
|
-
name: "arrow",
|
|
106
|
-
width: 18,
|
|
107
|
-
height: 18,
|
|
108
|
-
className: o.arrowIcon
|
|
109
|
-
}
|
|
110
|
-
)
|
|
111
|
-
] })
|
|
67
|
+
})
|
|
112
68
|
}
|
|
113
69
|
),
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
|
|
70
|
+
/* @__PURE__ */ s("div", { className: o.consultationInformations, children: [
|
|
71
|
+
/* @__PURE__ */ s("div", { className: o.consultationLeft, children: [
|
|
72
|
+
/* @__PURE__ */ t(
|
|
73
|
+
m,
|
|
118
74
|
{
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
),
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
75
|
+
text: a.formatMessage({
|
|
76
|
+
id: "info.votes_count",
|
|
77
|
+
defaultMessage: "Number of votes"
|
|
78
|
+
}),
|
|
79
|
+
position: "top",
|
|
80
|
+
children: /* @__PURE__ */ s(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
className: i(
|
|
84
|
+
o.consultationGroupInformation,
|
|
85
|
+
o.consultationGroupRight
|
|
86
|
+
),
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ t("span", { className: o.consultationTextInformation, children: e.total_votes }),
|
|
89
|
+
/* @__PURE__ */ t(d, { name: "votebox", width: 15, height: 20, className: o.iconVote })
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
)
|
|
127
93
|
}
|
|
128
94
|
),
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
95
|
+
/* @__PURE__ */ t(
|
|
96
|
+
m,
|
|
97
|
+
{
|
|
98
|
+
text: a.formatMessage({
|
|
99
|
+
id: "info.proposals_count",
|
|
100
|
+
defaultMessage: "Number of proposals"
|
|
101
|
+
}),
|
|
102
|
+
position: "top",
|
|
103
|
+
children: /* @__PURE__ */ s("div", { className: o.consultationGroupInformation, children: [
|
|
104
|
+
/* @__PURE__ */ t("span", { className: o.consultationTextInformation, children: e.proposals_count }),
|
|
105
|
+
/* @__PURE__ */ t(d, { name: "chat", width: 15, height: 20, className: o.iconChat })
|
|
106
|
+
] })
|
|
107
|
+
}
|
|
108
|
+
)
|
|
133
109
|
] }),
|
|
134
|
-
e.vote_goal > 0 && /* @__PURE__ */ t(
|
|
110
|
+
u && e.vote_goal > 0 && c > l && /* @__PURE__ */ t(
|
|
135
111
|
"div",
|
|
136
112
|
{
|
|
137
|
-
className:
|
|
113
|
+
className: i(
|
|
138
114
|
o.consultationGroupInformation,
|
|
139
115
|
o.progressBarContainer
|
|
140
116
|
),
|
|
141
|
-
children:
|
|
142
|
-
a,
|
|
143
|
-
{
|
|
144
|
-
id: "consultation.consultation_box.stats_votes",
|
|
145
|
-
values: { votesCount: e.total_votes },
|
|
146
|
-
defaultMessage: "{votesCount} votes"
|
|
147
|
-
}
|
|
148
|
-
) : /* @__PURE__ */ t(
|
|
117
|
+
children: /* @__PURE__ */ t(
|
|
149
118
|
x,
|
|
150
119
|
{
|
|
151
120
|
className: o.progress,
|
|
@@ -162,5 +131,5 @@ const D = ({ consultation: e }) => {
|
|
|
162
131
|
] }) });
|
|
163
132
|
};
|
|
164
133
|
export {
|
|
165
|
-
|
|
134
|
+
P as ConsultationBox
|
|
166
135
|
};
|
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
import '../../../assets/components/consultation/consultation_box/ConsultationBox.module-
|
|
2
|
-
container:
|
|
1
|
+
import '../../../assets/components/consultation/consultation_box/ConsultationBox.module-DjNiVt-p.css';const t = "_container_tvku5_3", o = "_consultationImageBox_tvku5_19", n = "_consultationImage_tvku5_19", s = "_consultationTime_tvku5_32", a = "_ended_tvku5_54", i = "_consultationTitle_tvku5_58", c = "_iconVote_tvku5_69", u = "_iconChat_tvku5_73", _ = "_consultationInformations_tvku5_97", e = "_consultationLeft_tvku5_107", r = "_consultationGroupInformation_tvku5_110", l = "_consultationGroupRight_tvku5_114", m = "_progressBarContainer_tvku5_117", k = "_progress_tvku5_117", v = "_bar_tvku5_131", g = "_consultationTextInformation_tvku5_140", I = {
|
|
2
|
+
container: t,
|
|
3
|
+
consultationImageBox: o,
|
|
3
4
|
consultationImage: n,
|
|
4
|
-
consultationTime:
|
|
5
|
-
ended:
|
|
6
|
-
consultationTitle:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
consultationInformations:
|
|
10
|
-
consultationLeft:
|
|
11
|
-
consultationGroupInformation:
|
|
12
|
-
consultationGroupRight:
|
|
13
|
-
progressBarContainer:
|
|
14
|
-
progress:
|
|
15
|
-
bar:
|
|
16
|
-
consultationTextInformation:
|
|
5
|
+
consultationTime: s,
|
|
6
|
+
ended: a,
|
|
7
|
+
consultationTitle: i,
|
|
8
|
+
iconVote: c,
|
|
9
|
+
iconChat: u,
|
|
10
|
+
consultationInformations: _,
|
|
11
|
+
consultationLeft: e,
|
|
12
|
+
consultationGroupInformation: r,
|
|
13
|
+
consultationGroupRight: l,
|
|
14
|
+
progressBarContainer: m,
|
|
15
|
+
progress: k,
|
|
16
|
+
bar: v,
|
|
17
|
+
consultationTextInformation: g
|
|
17
18
|
};
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
e as consultationGroupInformation,
|
|
23
|
-
u as consultationGroupRight,
|
|
20
|
+
v as bar,
|
|
21
|
+
r as consultationGroupInformation,
|
|
22
|
+
l as consultationGroupRight,
|
|
24
23
|
n as consultationImage,
|
|
25
|
-
|
|
26
|
-
_ as
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
o as consultationImageBox,
|
|
25
|
+
_ as consultationInformations,
|
|
26
|
+
e as consultationLeft,
|
|
27
|
+
g as consultationTextInformation,
|
|
28
|
+
s as consultationTime,
|
|
29
|
+
i as consultationTitle,
|
|
30
|
+
t as container,
|
|
31
31
|
I as default,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
a as ended,
|
|
33
|
+
u as iconChat,
|
|
34
|
+
c as iconVote,
|
|
35
|
+
k as progress,
|
|
36
|
+
m as progressBarContainer
|
|
35
37
|
};
|
|
@@ -1,43 +1,50 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
className:
|
|
11
|
-
dropdownClassName:
|
|
12
|
-
children:
|
|
1
|
+
import { jsxs as w, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import u from "classnames";
|
|
3
|
+
import { useState as g, useRef as x, useEffect as E } from "react";
|
|
4
|
+
import t from "./Dropdown.module.scss.js";
|
|
5
|
+
const k = ({
|
|
6
|
+
onClick: s,
|
|
7
|
+
horizontalPosition: c = "left",
|
|
8
|
+
disabled: l = !1,
|
|
9
|
+
closeOnContentClick: m = !1,
|
|
10
|
+
className: d,
|
|
11
|
+
dropdownClassName: a,
|
|
12
|
+
children: f
|
|
13
13
|
}) => {
|
|
14
|
-
const [
|
|
15
|
-
|
|
14
|
+
const [r, o] = g(!1), n = x(null), p = () => {
|
|
15
|
+
l || (s && s(), o(!r));
|
|
16
16
|
};
|
|
17
|
-
return
|
|
17
|
+
return E(() => {
|
|
18
|
+
const e = (v) => {
|
|
19
|
+
n.current && !n.current.contains(v.target) && o(!1);
|
|
20
|
+
};
|
|
21
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
22
|
+
}, []), /* @__PURE__ */ w(
|
|
18
23
|
"div",
|
|
19
24
|
{
|
|
20
|
-
ref:
|
|
21
|
-
className:
|
|
25
|
+
ref: n,
|
|
26
|
+
className: u(t.dropdownWrapper, { [d]: d }),
|
|
22
27
|
children: [
|
|
23
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ i(
|
|
24
29
|
"button",
|
|
25
30
|
{
|
|
26
31
|
type: "button",
|
|
27
|
-
"aria-expanded":
|
|
28
|
-
className:
|
|
29
|
-
onClick:
|
|
30
|
-
children:
|
|
32
|
+
"aria-expanded": r,
|
|
33
|
+
className: t.dropdownHeader,
|
|
34
|
+
onClick: p,
|
|
35
|
+
children: f[0]
|
|
31
36
|
}
|
|
32
37
|
),
|
|
33
|
-
|
|
38
|
+
r && /* @__PURE__ */ i(
|
|
34
39
|
"div",
|
|
35
40
|
{
|
|
36
|
-
className:
|
|
37
|
-
[
|
|
41
|
+
className: a || u(t.dropdownList, {
|
|
42
|
+
[t[c]]: c
|
|
38
43
|
}),
|
|
39
|
-
onClick: () =>
|
|
40
|
-
|
|
44
|
+
onClick: (e) => {
|
|
45
|
+
(m || e.target === e.currentTarget) && o(!1);
|
|
46
|
+
},
|
|
47
|
+
children: f[1]
|
|
41
48
|
}
|
|
42
49
|
)
|
|
43
50
|
]
|
|
@@ -45,5 +52,5 @@ const y = ({
|
|
|
45
52
|
);
|
|
46
53
|
};
|
|
47
54
|
export {
|
|
48
|
-
|
|
55
|
+
k as Dropdown
|
|
49
56
|
};
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as o, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import w from "classnames";
|
|
3
3
|
import "react";
|
|
4
4
|
import { useIntl as c } from "react-intl";
|
|
5
5
|
import e from "./FollowButton.module.scss.js";
|
|
6
|
-
import { useFollow as
|
|
7
|
-
import { Tooltip as
|
|
6
|
+
import { useFollow as p } from "../use_follow/useFollow.js";
|
|
7
|
+
import { Tooltip as h } from "../../dialog/tooltip/Tooltip.js";
|
|
8
8
|
import { Button as u } from "../../action/button/Button.js";
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
import { Icon as a } from "../../icons/icon/Icon.js";
|
|
10
|
+
const B = ({
|
|
11
|
+
followableType: i,
|
|
11
12
|
followableId: r,
|
|
12
|
-
tooltipText:
|
|
13
|
-
dataTid:
|
|
13
|
+
tooltipText: f,
|
|
14
|
+
dataTid: n,
|
|
14
15
|
noBorder: l
|
|
15
16
|
}) => {
|
|
16
|
-
const s = c(), { followActive: t, handleFollow: d } =
|
|
17
|
-
|
|
17
|
+
const s = c(), { followActive: t, handleFollow: d } = p(
|
|
18
|
+
i,
|
|
18
19
|
r
|
|
19
20
|
);
|
|
20
|
-
return /* @__PURE__ */ o(
|
|
21
|
+
return /* @__PURE__ */ o(h, { text: f, children: /* @__PURE__ */ m(
|
|
21
22
|
u,
|
|
22
23
|
{
|
|
23
|
-
"data-tid":
|
|
24
|
-
className:
|
|
24
|
+
"data-tid": n,
|
|
25
|
+
className: w(e.followUserButton, {
|
|
25
26
|
[e.followUserButtonNoBorder]: l
|
|
26
27
|
}),
|
|
27
28
|
active: l || t,
|
|
@@ -29,7 +30,7 @@ const j = ({
|
|
|
29
30
|
"data-testid": "button",
|
|
30
31
|
border: !1,
|
|
31
32
|
children: [
|
|
32
|
-
!t && l && /* @__PURE__ */ o("span", { className: e.followIcon, children: "
|
|
33
|
+
!t && l && /* @__PURE__ */ o("span", { className: e.followIcon, children: /* @__PURE__ */ o(a, { name: "follow", width: 16, height: 16 }) }),
|
|
33
34
|
t ? /* @__PURE__ */ o("span", { "data-testid": "followed", children: s.formatMessage({
|
|
34
35
|
id: "follow.followed",
|
|
35
36
|
defaultMessage: "Followed"
|
|
@@ -37,11 +38,11 @@ const j = ({
|
|
|
37
38
|
id: "follow.follow",
|
|
38
39
|
defaultMessage: "Follow"
|
|
39
40
|
}) }),
|
|
40
|
-
!t && !l && /* @__PURE__ */ o("span", { className: e.followIcon, children: "
|
|
41
|
+
!t && !l && /* @__PURE__ */ o("span", { className: e.followIcon, children: /* @__PURE__ */ o(a, { name: "follow", width: 16, height: 16 }) })
|
|
41
42
|
]
|
|
42
43
|
}
|
|
43
44
|
) });
|
|
44
45
|
};
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
B as FollowButton
|
|
47
48
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import '../../../assets/components/follow/follow_button/FollowButton.module-
|
|
1
|
+
import '../../../assets/components/follow/follow_button/FollowButton.module-C9YXM8AM.css';const o = "_followUserButton_o22h6_3", l = "_followUserButtonNoBorder_o22h6_12", t = "_followIcon_o22h6_18", n = {
|
|
2
2
|
followUserButton: o,
|
|
3
|
-
followUserButtonNoBorder:
|
|
3
|
+
followUserButtonNoBorder: l,
|
|
4
|
+
followIcon: t
|
|
4
5
|
};
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
n as default,
|
|
8
|
+
t as followIcon,
|
|
7
9
|
o as followUserButton,
|
|
8
|
-
|
|
10
|
+
l as followUserButtonNoBorder
|
|
9
11
|
};
|
|
@@ -11,9 +11,9 @@ import { PauseCircle as w } from "./PauseCircle.js";
|
|
|
11
11
|
import { Alarm as b } from "../regular_icons/Alarm.js";
|
|
12
12
|
import { Announcement as L } from "../regular_icons/Announcement.js";
|
|
13
13
|
import { Arrow as B } from "../regular_icons/Arrow.js";
|
|
14
|
-
import { Blockquote as
|
|
15
|
-
import { Bold as
|
|
16
|
-
import { Camera as
|
|
14
|
+
import { Blockquote as U } from "../regular_icons/Blockquote.js";
|
|
15
|
+
import { Bold as y } from "../regular_icons/Bold.js";
|
|
16
|
+
import { Camera as E } from "../regular_icons/Camera.js";
|
|
17
17
|
import { CheckCircle as P } from "../regular_icons/CheckCircle.js";
|
|
18
18
|
import { Checkbox as q } from "../regular_icons/Checkbox.js";
|
|
19
19
|
import { Clock as I } from "../regular_icons/Clock.js";
|
|
@@ -24,38 +24,39 @@ import { Document as J } from "../regular_icons/Document.js";
|
|
|
24
24
|
import { Downvote as W } from "../regular_icons/Downvote.js";
|
|
25
25
|
import { Facebook as Y } from "../regular_icons/Facebook.js";
|
|
26
26
|
import { Flag as _ } from "../regular_icons/Flag.js";
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
27
|
+
import { Follow as oo } from "../regular_icons/Follow.js";
|
|
28
|
+
import { Home as eo } from "../regular_icons/Home.js";
|
|
29
|
+
import { Italic as mo } from "../regular_icons/Italic.js";
|
|
30
|
+
import { Link as xo } from "../regular_icons/Link.js";
|
|
31
|
+
import { Logora as lo } from "../regular_icons/Logora.js";
|
|
32
|
+
import { Mail as no } from "../regular_icons/Mail.js";
|
|
33
|
+
import { MinusCircle as Co } from "../regular_icons/MinusCircle.js";
|
|
34
|
+
import { MobileMenu as so } from "../regular_icons/MobileMenu.js";
|
|
35
|
+
import { Next as ho } from "../regular_icons/Next.js";
|
|
36
|
+
import { OpenBlank as go } from "../regular_icons/OpenBlank.js";
|
|
37
|
+
import { OrderedList as So } from "../regular_icons/OrderedList.js";
|
|
38
|
+
import { Point as Ao } from "../regular_icons/Point.js";
|
|
39
|
+
import { Question as Mo } from "../regular_icons/Question.js";
|
|
40
|
+
import { Refresh as Fo } from "../regular_icons/Refresh.js";
|
|
41
|
+
import { Reply as vo } from "../regular_icons/Reply.js";
|
|
42
|
+
import { Search as Do } from "../regular_icons/Search.js";
|
|
43
|
+
import { Send as Oo } from "../regular_icons/Send.js";
|
|
44
|
+
import { Share as Ro } from "../regular_icons/Share.js";
|
|
45
|
+
import { SmallArrow as Ho } from "../regular_icons/SmallArrow.js";
|
|
46
|
+
import { Source as No } from "../regular_icons/Source.js";
|
|
47
|
+
import { Suggestion as To } from "../regular_icons/Suggestion.js";
|
|
48
|
+
import { Twitter as jo } from "../regular_icons/Twitter.js";
|
|
49
|
+
import { Underline as Go } from "../regular_icons/Underline.js";
|
|
50
|
+
import { Upvote as Ko } from "../regular_icons/Upvote.js";
|
|
51
|
+
import { User as Xo } from "../regular_icons/User.js";
|
|
52
|
+
import { Votebox as Zo } from "../regular_icons/Votebox.js";
|
|
52
53
|
export {
|
|
53
54
|
b as Alarm,
|
|
54
55
|
L as Announcement,
|
|
55
56
|
B as Arrow,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
U as Blockquote,
|
|
58
|
+
y as Bold,
|
|
59
|
+
E as Camera,
|
|
59
60
|
e as Chat,
|
|
60
61
|
m as Check,
|
|
61
62
|
P as CheckCircle,
|
|
@@ -72,33 +73,34 @@ export {
|
|
|
72
73
|
C as ExpertBadge,
|
|
73
74
|
Y as Facebook,
|
|
74
75
|
_ as Flag,
|
|
75
|
-
oo as
|
|
76
|
-
eo as
|
|
76
|
+
oo as Follow,
|
|
77
|
+
eo as Home,
|
|
78
|
+
mo as Italic,
|
|
77
79
|
s as LightArrow,
|
|
78
|
-
|
|
80
|
+
xo as Link,
|
|
79
81
|
h as Login,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
lo as Logora,
|
|
83
|
+
no as Mail,
|
|
84
|
+
Co as MinusCircle,
|
|
83
85
|
d as MobileClose,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
so as MobileMenu,
|
|
87
|
+
ho as Next,
|
|
88
|
+
go as OpenBlank,
|
|
89
|
+
So as OrderedList,
|
|
88
90
|
w as PauseCircle,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
91
|
+
Ao as Point,
|
|
92
|
+
Mo as Question,
|
|
93
|
+
Fo as Refresh,
|
|
94
|
+
vo as Reply,
|
|
95
|
+
Do as Search,
|
|
96
|
+
Oo as Send,
|
|
97
|
+
Ro as Share,
|
|
98
|
+
Ho as SmallArrow,
|
|
99
|
+
No as Source,
|
|
100
|
+
To as Suggestion,
|
|
101
|
+
jo as Twitter,
|
|
102
|
+
Go as Underline,
|
|
103
|
+
Ko as Upvote,
|
|
104
|
+
Xo as User,
|
|
105
|
+
Zo as Votebox
|
|
104
106
|
};
|