@logora/debate 0.4.78 → 0.4.80
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-ClZUMdkK.css +1 -0
- package/dist/assets/components/vote/vote_button/VoteButton.module-DUgmy85T.css +1 -0
- package/dist/components/argument/argument/Argument.module.scss.js +41 -41
- package/dist/components/list/paginated_list/PaginatedList.js +74 -72
- package/dist/components/vote/vote_button/VoteButton.module.scss.js +5 -5
- package/package.json +1 -1
- package/dist/assets/components/argument/argument/Argument.module-CC40BY1L.css +0 -1
- package/dist/assets/components/vote/vote_button/VoteButton.module-_-1B5PIK.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._argument_1pjwy_3{border-radius:var(--box-border-radius, 6px);box-shadow:var(--box-shadow, 0px 2px 5px rgba(7, 42, 68, .1));transition:margin-top 2s;border:var(--box-border, 1px solid rgba(7, 42, 68, .1));scroll-margin-top:150px;background-color:var(--background-color-primary, white);padding:var(--space-unit, 1em)!important;display:flex;flex-direction:column;gap:var(--space-unit, 1em)}._edited_1pjwy_16{font-size:var(--font-size-extra-small, 14px);color:var(--text-secondary, #5F5F5F);line-height:var(--line-height-loose, 1.38em);margin-bottom:var(--spacer-xs, calc(var(--space-unit, 1em) * .325))!important}._argumentReply_1pjwy_23{position:relative;background-color:var(--text-tertiary, #fafafa);border-top-left-radius:0;border-bottom-left-radius:0;box-shadow:var(--box-shadow, 0px 2px 5px rgba(7, 42, 68, .1));border-top-right-radius:var(--box-border-radius, 6px);border-bottom-right-radius:var(--box-border-radius, 6px);border-left:6px solid;border-left-color:var(--call-primary-color, #434343)!important}._argumentReply_1pjwy_23._position-1_1pjwy_34{border-left-color:var(--for-primary-color, #cc6a6d)!important}._argumentReply_1pjwy_23._position-2_1pjwy_37{border-left-color:var(--against-primary-color, #7980bb)!important}._argumentReply_1pjwy_23._position-3_1pjwy_40{border-left-color:var(--third-position-color-primary, #9b9b9b)!important}._argumentReply_1pjwy_23._level-1_1pjwy_43{margin-left:1em!important}._argumentReply_1pjwy_23._level-2_1pjwy_46{margin-left:2em!important}._argumentReply_1pjwy_23._level-3_1pjwy_49{margin-left:3em!important}._argumentReply_1pjwy_23._level-4_1pjwy_52{margin-left:4em!important}._argumentReply_1pjwy_23._level-5_1pjwy_55{margin-left:5em!important}._argumentReply_1pjwy_23:before{content:"";border-left:4px solid var(--text-secondary, #5F5F5F);position:absolute;width:4px;height:10px;top:-10px;left:2em}@container (max-width: 575.98px){._argumentReply_1pjwy_23{border-left:4px solid}}._flash_1pjwy_73{-webkit-transition:box-shadow .8s ease-in-out;-moz-transition:box-shadow .8s ease-in-out;-o-transition:box-shadow .8s ease-in-out;transition:box-shadow .8s ease-in-out;box-shadow:-4px 4px 15px 3px #00000026}._position-1_1pjwy_34._flash_1pjwy_73{border-color:var(--for-primary-color, #cc6a6d)}._position-2_1pjwy_37._flash_1pjwy_73{border-color:var(--against-primary-color, #7980bb)}._position-3_1pjwy_40._flash_1pjwy_73{border-color:var(--third-position-color-primary, #9b9b9b);margin-top:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important}._argumentBody_1pjwy_94{font-size:var(--font-size-normal, 16px);line-height:var(--line-height-loose, 1.38em)}._argumentDeletedBody_1pjwy_99{font-size:var(--font-size-small, 16px);color:var(--text-secondary, #5F5F5F)}._fixedHeight_1pjwy_104{height:100px;overflow:hidden;position:relative}._fixedHeight_1pjwy_104:after{content:"";position:absolute;z-index:1;bottom:0;left:0;right:0;pointer-events:none;background-image:linear-gradient(to bottom,#fff0,#fff 90%);width:100%;height:5em}._argumentContent_1pjwy_122{line-height:var(--line-height-loose, 1.38em);overflow-wrap:break-word;word-wrap:break-word}._argumentContent_1pjwy_122 *{font-size:var(--font-size-normal, 16px)}._argumentSourcesList_1pjwy_131{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;font-size:var(--font-size-extra-small, 14px);font-weight:var(--font-weight-normal, 400);font-variation-settings:var(--font-variation-normal, normal)}._argumentSourcesList_1pjwy_131 a{text-decoration:none}._repliesList_1pjwy_145{margin-top:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important}._readMoreLink_1pjwy_149{margin-top:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important;display:flex;justify-content:center}._replyStyle_1pjwy_155{background:var(--text-tertiary, #fafafa)}._replyTo_1pjwy_159{display:flex!important;flex-direction:row!important;align-items:center!important;padding-bottom:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;font-size:var(--font-size-extra-small, 14px);color:var(--text-secondary, #5F5F5F);cursor:pointer;overflow:hidden;white-space:nowrap}._replyTo_1pjwy_159 span{padding-left:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;cursor:pointer;text-decoration:underline}._replyTo_1pjwy_159 svg{padding:2px 0 0 2px;fill:var(--text-secondary, #5F5F5F)}._replyingTo_1pjwy_180{display:flex!important;align-items:center!important}._headerPosition-0_1pjwy_185{background-color:var(--call-primary-color, #434343)!important}._headerPosition-1_1pjwy_189{background-color:var(--for-primary-color, #cc6a6d)!important}._headerPosition-2_1pjwy_193{background-color:var(--against-primary-color, #7980bb)!important}._headerPosition-3_1pjwy_197{background-color:var(--third-position-color-primary, #9b9b9b)!important}._voteButtonPosition-1_1pjwy_201._voteButtonPosition-1_1pjwy_201{color:var(--for-primary-color, #cc6a6d)!important}._voteButtonPosition-1_1pjwy_201._voteButtonPosition-1_1pjwy_201 svg{fill:var(--for-primary-color, #cc6a6d)!important}._voteButtonPosition-2_1pjwy_208._voteButtonPosition-2_1pjwy_208{color:var(--against-primary-color, #7980bb)!important}._voteButtonPosition-2_1pjwy_208._voteButtonPosition-2_1pjwy_208 svg{fill:var(--against-primary-color, #7980bb)!important}._voteButtonPosition-3_1pjwy_215._voteButtonPosition-3_1pjwy_215{color:var(--third-position-color-primary, #9b9b9b)!important}._voteButtonPosition-3_1pjwy_215._voteButtonPosition-3_1pjwy_215 svg{fill:var(--third-position-color-primary, #9b9b9b)!important}@media(prefers-color-scheme:dark){._replyStyle_1pjwy_155{background-color:var(--text-tertiary, #fafafa)}._argumentStyle_1pjwy_226{background-color:var(--background-color-primary, white)}}._argumentContent_1pjwy_122 ol{list-style-type:decimal!important;margin-left:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;padding-left:var(--spacer-xl, calc(var(--space-unit, 1em) * 3))!important}._argumentContent_1pjwy_122 ul{list-style-type:disc!important;margin-left:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;padding-left:var(--spacer-xl, calc(var(--space-unit, 1em) * 3))!important}._argumentContent_1pjwy_122 ol li::marker,._argumentContent_1pjwy_122 ul li::marker{content:normal!important}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._voteButton_1wca1_3{background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}._voteButton_1wca1_3:focus:not(:focus-visible){outline:none;box-shadow:none}._active_1wca1_22{font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);color:var(--call-primary-color, #434343)!important}._active_1wca1_22 svg{fill:var(--call-primary-color, #434343)!important;fill-rule:evenodd}._disabled_1wca1_32{cursor:not-allowed;opacity:.6}._disabled_1wca1_32 svg{fill:var(--text-secondary, #5F5F5F);fill-rule:evenodd}
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import '../../../assets/components/argument/argument/Argument.module-
|
|
1
|
+
import '../../../assets/components/argument/argument/Argument.module-ClZUMdkK.css';const e = "_argument_1pjwy_3", t = "_edited_1pjwy_16", o = "_argumentReply_1pjwy_23", _ = "_flash_1pjwy_73", n = "_argumentBody_1pjwy_94", i = "_argumentDeletedBody_1pjwy_99", y = "_fixedHeight_1pjwy_104", s = "_argumentContent_1pjwy_122", p = "_argumentSourcesList_1pjwy_131", r = "_repliesList_1pjwy_145", l = "_readMoreLink_1pjwy_149", a = "_replyStyle_1pjwy_155", u = "_replyTo_1pjwy_159", d = "_replyingTo_1pjwy_180", j = "_argumentStyle_1pjwy_226", w = {
|
|
2
2
|
argument: e,
|
|
3
3
|
edited: t,
|
|
4
|
-
argumentReply:
|
|
5
|
-
"position-1": "_position-
|
|
6
|
-
"position-2": "_position-
|
|
7
|
-
"position-3": "_position-
|
|
8
|
-
"level-1": "_level-
|
|
9
|
-
"level-2": "_level-
|
|
10
|
-
"level-3": "_level-
|
|
11
|
-
"level-4": "_level-
|
|
12
|
-
"level-5": "_level-
|
|
13
|
-
flash:
|
|
14
|
-
argumentBody:
|
|
15
|
-
argumentDeletedBody:
|
|
16
|
-
fixedHeight:
|
|
4
|
+
argumentReply: o,
|
|
5
|
+
"position-1": "_position-1_1pjwy_34",
|
|
6
|
+
"position-2": "_position-2_1pjwy_37",
|
|
7
|
+
"position-3": "_position-3_1pjwy_40",
|
|
8
|
+
"level-1": "_level-1_1pjwy_43",
|
|
9
|
+
"level-2": "_level-2_1pjwy_46",
|
|
10
|
+
"level-3": "_level-3_1pjwy_49",
|
|
11
|
+
"level-4": "_level-4_1pjwy_52",
|
|
12
|
+
"level-5": "_level-5_1pjwy_55",
|
|
13
|
+
flash: _,
|
|
14
|
+
argumentBody: n,
|
|
15
|
+
argumentDeletedBody: i,
|
|
16
|
+
fixedHeight: y,
|
|
17
17
|
argumentContent: s,
|
|
18
|
-
argumentSourcesList:
|
|
19
|
-
repliesList:
|
|
20
|
-
readMoreLink:
|
|
21
|
-
replyStyle:
|
|
22
|
-
replyTo:
|
|
23
|
-
replyingTo:
|
|
24
|
-
"headerPosition-0": "_headerPosition-
|
|
25
|
-
"headerPosition-1": "_headerPosition-
|
|
26
|
-
"headerPosition-2": "_headerPosition-
|
|
27
|
-
"headerPosition-3": "_headerPosition-
|
|
28
|
-
"voteButtonPosition-1": "_voteButtonPosition-
|
|
29
|
-
"voteButtonPosition-2": "_voteButtonPosition-
|
|
30
|
-
"voteButtonPosition-3": "_voteButtonPosition-
|
|
31
|
-
argumentStyle:
|
|
18
|
+
argumentSourcesList: p,
|
|
19
|
+
repliesList: r,
|
|
20
|
+
readMoreLink: l,
|
|
21
|
+
replyStyle: a,
|
|
22
|
+
replyTo: u,
|
|
23
|
+
replyingTo: d,
|
|
24
|
+
"headerPosition-0": "_headerPosition-0_1pjwy_185",
|
|
25
|
+
"headerPosition-1": "_headerPosition-1_1pjwy_189",
|
|
26
|
+
"headerPosition-2": "_headerPosition-2_1pjwy_193",
|
|
27
|
+
"headerPosition-3": "_headerPosition-3_1pjwy_197",
|
|
28
|
+
"voteButtonPosition-1": "_voteButtonPosition-1_1pjwy_201",
|
|
29
|
+
"voteButtonPosition-2": "_voteButtonPosition-2_1pjwy_208",
|
|
30
|
+
"voteButtonPosition-3": "_voteButtonPosition-3_1pjwy_215",
|
|
31
|
+
argumentStyle: j
|
|
32
32
|
};
|
|
33
33
|
export {
|
|
34
34
|
e as argument,
|
|
35
|
-
|
|
35
|
+
n as argumentBody,
|
|
36
36
|
s as argumentContent,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
i as argumentDeletedBody,
|
|
38
|
+
o as argumentReply,
|
|
39
|
+
p as argumentSourcesList,
|
|
40
|
+
j as argumentStyle,
|
|
41
|
+
w as default,
|
|
42
42
|
t as edited,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
y as fixedHeight,
|
|
44
|
+
_ as flash,
|
|
45
|
+
l as readMoreLink,
|
|
46
|
+
r as repliesList,
|
|
47
|
+
a as replyStyle,
|
|
48
|
+
u as replyTo,
|
|
49
|
+
d as replyingTo
|
|
50
50
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsxs as U, jsx as
|
|
1
|
+
import { jsxs as U, jsx as u, Fragment as Qe } from "react/jsx-runtime";
|
|
2
2
|
import Ue from "@rooks/use-previous";
|
|
3
3
|
import $e from "classnames";
|
|
4
|
-
import
|
|
5
|
-
import { useIntl as
|
|
6
|
-
import { useLocation as
|
|
4
|
+
import Ie, { useState as c, useEffect as p } from "react";
|
|
5
|
+
import { useIntl as We } from "react-intl";
|
|
6
|
+
import { useLocation as ze } from "react-router";
|
|
7
7
|
import l from "./PaginatedList.module.scss.js";
|
|
8
|
-
import { ActionBar as
|
|
9
|
-
import { useList as
|
|
10
|
-
import { useDataProvider as
|
|
11
|
-
import { useResponsive as
|
|
12
|
-
import { useData as
|
|
8
|
+
import { ActionBar as Ge } from "./action_bar/ActionBar.js";
|
|
9
|
+
import { useList as Pe } from "../list_provider/useList.js";
|
|
10
|
+
import { useDataProvider as Ve } from "../../data/data_provider/useDataProvider.js";
|
|
11
|
+
import { useResponsive as Xe } from "../../hooks/use_responsive/useResponsive.js";
|
|
12
|
+
import { useData as Ye } from "../../data/data_provider/useData.js";
|
|
13
13
|
import { uniqueBy as x } from "../../util/unique_by/uniqueBy.js";
|
|
14
|
-
import { Pagination as
|
|
15
|
-
import { StandardErrorBoundary as
|
|
14
|
+
import { Pagination as Ze } from "../pagination/Pagination.js";
|
|
15
|
+
import { StandardErrorBoundary as He } from "../../error/standard_error_boundary/StandardErrorBoundary.js";
|
|
16
16
|
const ct = ({
|
|
17
17
|
query: N,
|
|
18
18
|
sortOptions: o,
|
|
19
|
-
sort:
|
|
19
|
+
sort: b,
|
|
20
20
|
filters: m,
|
|
21
21
|
tagList: ne,
|
|
22
22
|
pinnedTagList: ae,
|
|
23
|
-
currentPage:
|
|
23
|
+
currentPage: M,
|
|
24
24
|
resource: A,
|
|
25
25
|
currentListId: a,
|
|
26
26
|
withToken: le,
|
|
@@ -32,48 +32,50 @@ const ct = ({
|
|
|
32
32
|
tagParam: re = "tag_id",
|
|
33
33
|
totalHeaderParam: D = "total",
|
|
34
34
|
onUpdateTotal: $,
|
|
35
|
-
onElementsLoad:
|
|
36
|
-
transformData:
|
|
35
|
+
onElementsLoad: R,
|
|
36
|
+
transformData: I,
|
|
37
37
|
uniqueIdKey: S = "id",
|
|
38
38
|
children: fe,
|
|
39
39
|
resourcePropName: ce,
|
|
40
|
-
loadingComponent:
|
|
41
|
-
searchBar:
|
|
42
|
-
title:
|
|
40
|
+
loadingComponent: W,
|
|
41
|
+
searchBar: ge = !1,
|
|
42
|
+
title: ue,
|
|
43
43
|
subtitle: Ee,
|
|
44
44
|
showDebateConsultationSubtitle: he = !1,
|
|
45
|
-
emptyListComponent:
|
|
46
|
-
emptyText:
|
|
47
|
-
display:
|
|
48
|
-
elementsPerLine:
|
|
45
|
+
emptyListComponent: z,
|
|
46
|
+
emptyText: G,
|
|
47
|
+
display: P,
|
|
48
|
+
elementsPerLine: V,
|
|
49
49
|
indexLayout: pe = !1,
|
|
50
50
|
gap: ve = "1em",
|
|
51
51
|
withPagination: Se = !0,
|
|
52
|
-
numberElements:
|
|
52
|
+
numberElements: X,
|
|
53
53
|
countless: ye,
|
|
54
54
|
onElementClick: we,
|
|
55
55
|
withUrlParams: Ne = !1,
|
|
56
|
-
onLoadNewPage:
|
|
56
|
+
onLoadNewPage: Y
|
|
57
57
|
}) => {
|
|
58
|
-
const J =
|
|
59
|
-
|
|
60
|
-
), [
|
|
61
|
-
|
|
62
|
-
),
|
|
58
|
+
const J = We(), t = Pe(), Z = Ve(), H = ze(), { isMobile: K, isTablet: be, isDesktop: L } = Xe(), d = new URLSearchParams(
|
|
59
|
+
typeof window < "u" ? window.location.search : H.search
|
|
60
|
+
), [k, E] = c(!1), [Me, Re] = c(!1), [r, y] = Ye(a, []), [O, ke] = c(
|
|
61
|
+
r?.length || 0
|
|
62
|
+
), [h, j] = c(M || 1), [w, B] = c(N || null), [C, q] = c(
|
|
63
|
+
d.get("tagId") ? Number.parseInt(d.get("tagId"), 10) : null
|
|
64
|
+
), [Ce, ee] = c(null), Te = () => o && o[0].type === "sort" && o[0].value || b || "", Fe = () => {
|
|
63
65
|
let e = {};
|
|
64
66
|
return o && o[0].type === "filter" && (e[o[0].name] = o[0].value), m && (e = Object.assign({}, e, m)), e;
|
|
65
|
-
}, [T, F] =
|
|
66
|
-
|
|
67
|
-
if (
|
|
68
|
-
F(
|
|
69
|
-
for (const e of
|
|
67
|
+
}, [T, F] = c(Te()), [Q, _] = c(Fe()), te = Ue(m);
|
|
68
|
+
M && M !== h && j(M), N !== void 0 && N !== w && B(N), b !== void 0 && b !== T && F(b), te && JSON.stringify(m) !== JSON.stringify(te) && JSON.stringify(m) !== JSON.stringify(Q) && _(m), p(() => {
|
|
69
|
+
if (d.get("tagId") && q(Number.parseInt(d.get("tagId"))), d.get("search") && B(d.get("search")), d.get("sort")) {
|
|
70
|
+
F(d.get("sort"));
|
|
71
|
+
for (const e of d.values()) {
|
|
70
72
|
o?.map((s) => {
|
|
71
73
|
s.value === e && ee(s.name);
|
|
72
74
|
});
|
|
73
75
|
break;
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
|
-
for (const e of
|
|
78
|
+
for (const e of d.keys()) {
|
|
77
79
|
o?.map((s) => {
|
|
78
80
|
s.name === e && (_({
|
|
79
81
|
...m,
|
|
@@ -82,7 +84,7 @@ const ct = ({
|
|
|
82
84
|
});
|
|
83
85
|
break;
|
|
84
86
|
}
|
|
85
|
-
}, [
|
|
87
|
+
}, [H.search]), p(() => {
|
|
86
88
|
A ? (j(1), y([]), E(!0), se(1)) : E(!1);
|
|
87
89
|
}, [
|
|
88
90
|
T,
|
|
@@ -104,34 +106,34 @@ const ct = ({
|
|
|
104
106
|
const e = t.updateElements[a];
|
|
105
107
|
if (e.length > 0) {
|
|
106
108
|
const s = e.filter(
|
|
107
|
-
(i) =>
|
|
109
|
+
(i) => r.some((n) => n.id === i.id)
|
|
108
110
|
);
|
|
109
111
|
if (s.length > 0) {
|
|
110
112
|
De(s);
|
|
111
113
|
const i = e.filter(
|
|
112
|
-
(
|
|
114
|
+
(f) => !r.some((g) => g.id === f.id)
|
|
113
115
|
), n = { ...t.updateElements };
|
|
114
116
|
i.length > 0 ? n[a] = i : delete n[a], t.setUpdateElements(n);
|
|
115
117
|
}
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
|
-
}, [t.updateElements,
|
|
119
|
-
if (t.removeElements && a in t.removeElements && t.removeElements[a].length > 0 &&
|
|
120
|
+
}, [t.updateElements, r]), p(() => {
|
|
121
|
+
if (t.removeElements && a in t.removeElements && t.removeElements[a].length > 0 && r.length > 0) {
|
|
120
122
|
Je(t.removeElements[a]);
|
|
121
123
|
const e = { ...t.removeElements };
|
|
122
124
|
delete e[a], t.setRemoveElements(e);
|
|
123
125
|
}
|
|
124
|
-
}, [t.removeElements,
|
|
126
|
+
}, [t.removeElements, r]);
|
|
125
127
|
const _e = (e) => {
|
|
126
128
|
e.type === "filter" ? (F(""), _({
|
|
127
129
|
...m,
|
|
128
130
|
[e.name]: e.value
|
|
129
131
|
})) : (F(e.value), _(m ? { ...m } : {}));
|
|
130
132
|
}, xe = () => {
|
|
131
|
-
typeof
|
|
133
|
+
typeof Y == "function" && Y() !== null || j(h + 1);
|
|
132
134
|
}, se = (e) => {
|
|
133
|
-
const s = le ?
|
|
134
|
-
if ((e - 1) * v <= (
|
|
135
|
+
const s = le ? Z.getListWithToken : Z.getList;
|
|
136
|
+
if ((e - 1) * v <= (X || O) || e === 1) {
|
|
135
137
|
const i = {
|
|
136
138
|
[oe]: e,
|
|
137
139
|
[ie]: v,
|
|
@@ -142,32 +144,32 @@ const ct = ({
|
|
|
142
144
|
...C && { [re]: C }
|
|
143
145
|
};
|
|
144
146
|
s(A, i).then((n) => {
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
Number.parseInt(
|
|
148
|
-
), $ && $(
|
|
149
|
-
let
|
|
150
|
-
|
|
147
|
+
const f = n.headers;
|
|
148
|
+
f && D in f && (ke(
|
|
149
|
+
Number.parseInt(f[D || "total"], 10)
|
|
150
|
+
), $ && $(f[D || "total"]));
|
|
151
|
+
let g = n?.data?.data;
|
|
152
|
+
R && R(g), I && (g = g.filter(I)), t.addElements && a in t.addElements && t.addElements[a].length > 0 && (g = [...t.addElements[a], g]), Le(g), E(!1);
|
|
151
153
|
}).catch((n) => {
|
|
152
|
-
console.error(n), n?.response?.status !== 404 &&
|
|
154
|
+
console.error(n), n?.response?.status !== 404 && Re(!0), E(!1);
|
|
153
155
|
});
|
|
154
156
|
} else
|
|
155
157
|
E(!1);
|
|
156
158
|
}, Ae = (e) => {
|
|
157
159
|
y(
|
|
158
160
|
(s) => x([...e, ...s], S || "id")
|
|
159
|
-
),
|
|
161
|
+
), R && R(e);
|
|
160
162
|
}, De = (e) => {
|
|
161
163
|
y((s) => {
|
|
162
164
|
let i = s;
|
|
163
165
|
return e.forEach(
|
|
164
166
|
(n) => i = i.map(
|
|
165
|
-
(
|
|
167
|
+
(f) => f.id === n.id ? n : f
|
|
166
168
|
)
|
|
167
169
|
), x(i, S || "id");
|
|
168
170
|
});
|
|
169
171
|
}, Je = (e) => {
|
|
170
|
-
const s = e.map((n) => n.id), i =
|
|
172
|
+
const s = e.map((n) => n.id), i = r.filter(
|
|
171
173
|
(n) => s.indexOf(n.id) === -1
|
|
172
174
|
);
|
|
173
175
|
y(x(i, S || "id"));
|
|
@@ -175,20 +177,20 @@ const ct = ({
|
|
|
175
177
|
y(
|
|
176
178
|
(s) => x([...s, ...e], S || "id")
|
|
177
179
|
);
|
|
178
|
-
}, je = (e, s) => e !== void 0 ? /* @__PURE__ */
|
|
180
|
+
}, je = (e, s) => e !== void 0 ? /* @__PURE__ */ u(
|
|
179
181
|
"li",
|
|
180
182
|
{
|
|
181
183
|
className: l.paginatedListItem,
|
|
182
184
|
"data-testid": "list-item",
|
|
183
185
|
onClick: we,
|
|
184
|
-
children: /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ u(He, { hideMessage: !0, children: Ie.cloneElement(fe, {
|
|
185
187
|
index: s,
|
|
186
188
|
[ce]: e
|
|
187
189
|
}) })
|
|
188
190
|
},
|
|
189
191
|
`${e[S || "id"]}_${e.updated_at || e.content}`
|
|
190
|
-
) : null, Be = (e) =>
|
|
191
|
-
if (
|
|
192
|
+
) : null, Be = (e) => W ? /* @__PURE__ */ u("li", { className: l.paginatedListItem, children: W }, e) : null;
|
|
193
|
+
if (Me)
|
|
192
194
|
throw new Error(
|
|
193
195
|
J.formatMessage({
|
|
194
196
|
id: "error.list",
|
|
@@ -196,15 +198,15 @@ const ct = ({
|
|
|
196
198
|
})
|
|
197
199
|
);
|
|
198
200
|
return /* @__PURE__ */ U("div", { className: l.listContainer, children: [
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
|
|
201
|
+
/* @__PURE__ */ u(
|
|
202
|
+
Ge,
|
|
201
203
|
{
|
|
202
|
-
title:
|
|
204
|
+
title: ue,
|
|
203
205
|
subtitle: Ee,
|
|
204
206
|
showDebateConsultationSubtitle: he,
|
|
205
207
|
sortOptions: o,
|
|
206
208
|
defaultSelectOption: Ce,
|
|
207
|
-
searchBar:
|
|
209
|
+
searchBar: ge,
|
|
208
210
|
tagList: ne,
|
|
209
211
|
pinnedTagList: ae,
|
|
210
212
|
activeTagId: C,
|
|
@@ -214,7 +216,7 @@ const ct = ({
|
|
|
214
216
|
withUrlParams: Ne
|
|
215
217
|
}
|
|
216
218
|
),
|
|
217
|
-
!k &&
|
|
219
|
+
!k && r.length === 0 ? z ? /* @__PURE__ */ u("div", { className: l.emptyListElement, children: z }) : /* @__PURE__ */ u("div", { className: l.emptyList, children: G || J.formatMessage({
|
|
218
220
|
id: "info.emptyList",
|
|
219
221
|
defaultMessage: "No items for now."
|
|
220
222
|
}) }) : /* @__PURE__ */ U(Qe, { children: [
|
|
@@ -223,24 +225,24 @@ const ct = ({
|
|
|
223
225
|
{
|
|
224
226
|
className: $e(l.paginatedList, {
|
|
225
227
|
[l.paginatedListIsTablet]: !K && !L,
|
|
226
|
-
[l.centeredList]:
|
|
227
|
-
[l.column]:
|
|
228
|
-
[l.twoElementsPerLine]:
|
|
229
|
-
[l.oneElementPerLine]:
|
|
228
|
+
[l.centeredList]: P === "column",
|
|
229
|
+
[l.column]: P === "column",
|
|
230
|
+
[l.twoElementsPerLine]: V === 2,
|
|
231
|
+
[l.oneElementPerLine]: V === 1,
|
|
230
232
|
[l.indexLayoutList]: pe,
|
|
231
233
|
[l.listIsDesktop]: L,
|
|
232
|
-
[l.listIsTablet]:
|
|
234
|
+
[l.listIsTablet]: be && !L,
|
|
233
235
|
[l.listIsMobile]: K
|
|
234
236
|
}),
|
|
235
237
|
style: { gap: ve },
|
|
236
238
|
children: [
|
|
237
|
-
|
|
239
|
+
r.map(je),
|
|
238
240
|
k ? Array(v).fill().map((e, s) => s).map(Be) : null
|
|
239
241
|
]
|
|
240
242
|
}
|
|
241
243
|
),
|
|
242
|
-
!k && Se !== !1 && /* @__PURE__ */
|
|
243
|
-
|
|
244
|
+
!k && Se !== !1 && /* @__PURE__ */ u(
|
|
245
|
+
Ze,
|
|
244
246
|
{
|
|
245
247
|
buttonText: J.formatMessage({
|
|
246
248
|
id: "action.see_more",
|
|
@@ -248,7 +250,7 @@ const ct = ({
|
|
|
248
250
|
}),
|
|
249
251
|
currentPage: h,
|
|
250
252
|
perPage: v,
|
|
251
|
-
totalElements:
|
|
253
|
+
totalElements: X || O,
|
|
252
254
|
onLoad: xe,
|
|
253
255
|
isLoading: k,
|
|
254
256
|
hideLoader: !0,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import '../../../assets/components/vote/vote_button/VoteButton.module-
|
|
1
|
+
import '../../../assets/components/vote/vote_button/VoteButton.module-DUgmy85T.css';const t = "_voteButton_1wca1_3", e = "_active_1wca1_22", a = "_disabled_1wca1_32", o = {
|
|
2
2
|
voteButton: t,
|
|
3
|
-
active:
|
|
4
|
-
disabled:
|
|
3
|
+
active: e,
|
|
4
|
+
disabled: a
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
e as active,
|
|
8
8
|
o as default,
|
|
9
|
-
|
|
9
|
+
a as disabled,
|
|
10
10
|
t as voteButton
|
|
11
11
|
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._argument_12a5a_3{border-radius:var(--box-border-radius, 6px);box-shadow:var(--box-shadow, 0px 2px 5px rgba(7, 42, 68, .1));transition:margin-top 2s;border:var(--box-border, 1px solid rgba(7, 42, 68, .1));scroll-margin-top:150px;background-color:var(--background-color-primary, white);padding:var(--space-unit, 1em)!important;display:flex;flex-direction:column;gap:var(--space-unit, 1em)}._edited_12a5a_16{font-size:var(--font-size-extra-small, 14px);color:var(--text-secondary, #5F5F5F);line-height:var(--line-height-loose, 1.38em);margin-bottom:var(--spacer-xs, calc(var(--space-unit, 1em) * .325))!important}._argumentReply_12a5a_23{position:relative;background-color:var(--text-tertiary, #fafafa);border-top-left-radius:0;border-bottom-left-radius:0;box-shadow:var(--box-shadow, 0px 2px 5px rgba(7, 42, 68, .1));border-top-right-radius:var(--box-border-radius, 6px);border-bottom-right-radius:var(--box-border-radius, 6px);border-left:6px solid;border-left-color:var(--call-primary-color, #434343)!important}._argumentReply_12a5a_23._position-1_12a5a_34{border-left-color:var(--for-primary-color, #cc6a6d)!important}._argumentReply_12a5a_23._position-2_12a5a_37{border-left-color:var(--against-primary-color, #7980bb)!important}._argumentReply_12a5a_23._position-3_12a5a_40{border-left-color:var(--third-position-color-primary, #9b9b9b)!important}._argumentReply_12a5a_23._level-1_12a5a_43{margin-left:1em!important}._argumentReply_12a5a_23._level-2_12a5a_46{margin-left:2em!important}._argumentReply_12a5a_23._level-3_12a5a_49{margin-left:3em!important}._argumentReply_12a5a_23._level-4_12a5a_52{margin-left:4em!important}._argumentReply_12a5a_23._level-5_12a5a_55{margin-left:5em!important}._argumentReply_12a5a_23:before{content:"";border-left:4px solid var(--text-secondary, #5F5F5F);position:absolute;width:4px;height:10px;top:-10px;left:2em}@container (max-width: 575.98px){._argumentReply_12a5a_23{border-left:4px solid}}._flash_12a5a_73{-webkit-transition:box-shadow .8s ease-in-out;-moz-transition:box-shadow .8s ease-in-out;-o-transition:box-shadow .8s ease-in-out;transition:box-shadow .8s ease-in-out;box-shadow:-4px 4px 15px 3px #00000026}._position-1_12a5a_34._flash_12a5a_73{border-color:var(--for-primary-color, #cc6a6d)}._position-2_12a5a_37._flash_12a5a_73{border-color:var(--against-primary-color, #7980bb)}._position-3_12a5a_40._flash_12a5a_73{border-color:var(--third-position-color-primary, #9b9b9b);margin-top:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important}._argumentBody_12a5a_94{font-size:var(--font-size-normal, 16px);line-height:var(--line-height-loose, 1.38em)}._argumentDeletedBody_12a5a_99{font-size:var(--font-size-small, 16px);color:var(--text-secondary, #5F5F5F)}._fixedHeight_12a5a_104{height:100px;overflow:hidden;position:relative}._fixedHeight_12a5a_104:after{content:"";position:absolute;z-index:1;bottom:0;left:0;right:0;pointer-events:none;background-image:linear-gradient(to bottom,#fff0,#fff 90%);width:100%;height:5em}._argumentContent_12a5a_122{line-height:var(--line-height-loose, 1.38em);overflow-wrap:break-word;word-wrap:break-word}._argumentContent_12a5a_122 *{font-size:var(--font-size-normal, 16px)}._argumentSourcesList_12a5a_131{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;font-size:var(--font-size-extra-small, 14px);font-weight:var(--font-weight-normal, 400);font-variation-settings:var(--font-variation-normal, normal)}._argumentSourcesList_12a5a_131 a{text-decoration:none}._repliesList_12a5a_145{margin-top:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important}._readMoreLink_12a5a_149{margin-top:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important;display:flex;justify-content:center}._replyStyle_12a5a_155{background:var(--text-tertiary, #fafafa)}._replyTo_12a5a_159{display:flex!important;flex-direction:row!important;align-items:center!important;padding-bottom:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;font-size:var(--font-size-extra-small, 14px);color:var(--text-secondary, #5F5F5F);cursor:pointer;overflow:hidden;white-space:nowrap}._replyTo_12a5a_159 span{padding-left:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;cursor:pointer;text-decoration:underline}._replyTo_12a5a_159 svg{padding:2px 0 0 2px;fill:var(--text-secondary, #5F5F5F)}._replyingTo_12a5a_180{display:flex!important;align-items:center!important}._headerPosition-0_12a5a_185{background-color:var(--call-primary-color, #434343)!important}._headerPosition-1_12a5a_189{background-color:var(--for-primary-color, #cc6a6d)!important}._headerPosition-2_12a5a_193{background-color:var(--against-primary-color, #7980bb)!important}._headerPosition-3_12a5a_197{background-color:var(--third-position-color-primary, #9b9b9b)!important}._voteButtonPosition-1_12a5a_201{color:var(--for-primary-color, #cc6a6d)!important}._voteButtonPosition-1_12a5a_201 svg{fill:var(--for-primary-color, #cc6a6d)!important}._voteButtonPosition-2_12a5a_208{color:var(--against-primary-color, #7980bb)!important}._voteButtonPosition-2_12a5a_208 svg{fill:var(--against-primary-color, #7980bb)!important}._voteButtonPosition-3_12a5a_215{color:var(--third-position-color-primary, #9b9b9b)!important}._voteButtonPosition-3_12a5a_215 svg{fill:var(--third-position-color-primary, #9b9b9b)!important}@media(prefers-color-scheme:dark){._replyStyle_12a5a_155{background-color:var(--text-tertiary, #fafafa)}._argumentStyle_12a5a_226{background-color:var(--background-color-primary, white)}}._argumentContent_12a5a_122 ol{list-style-type:decimal!important;margin-left:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;padding-left:var(--spacer-xl, calc(var(--space-unit, 1em) * 3))!important}._argumentContent_12a5a_122 ul{list-style-type:disc!important;margin-left:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;padding-left:var(--spacer-xl, calc(var(--space-unit, 1em) * 3))!important}._argumentContent_12a5a_122 ol li::marker,._argumentContent_12a5a_122 ul li::marker{content:normal!important}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._voteButton_shygl_3{background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}._voteButton_shygl_3:focus:not(:focus-visible){outline:none;box-shadow:none}._active_shygl_22{font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);color:var(--call-primary-color, #434343)}._active_shygl_22 svg{fill:var(--call-primary-color, #434343);fill-rule:evenodd}._disabled_shygl_32{cursor:not-allowed;opacity:.6}._disabled_shygl_32 svg{fill:var(--text-secondary, #5F5F5F);fill-rule:evenodd}
|