@logora/debate 0.3.117 → 0.3.119
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/dialog/dropdown/Dropdown.module-BmT3rAwz.css +1 -0
- package/dist/components/dialog/dropdown/Dropdown.js +19 -17
- package/dist/components/dialog/dropdown/Dropdown.module.scss.js +17 -13
- package/dist/components/list/paginated_list/PaginatedList.js +93 -83
- package/dist/components/user_content/content_footer/ContentFooter.js +15 -14
- package/package.json +1 -1
- package/dist/assets/components/dialog/dropdown/Dropdown.module-FG2Sqrqs.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._dropdownWrapper_7839n_3{position:relative;display:inline-block}._dropdownHeader_7839n_8{border:none;padding:0!important;cursor:pointer;background-color:var(--background-color-primary, white)}._dropdownHeader_7839n_8:focus:not(:focus-visible){outline:none;box-shadow:none}._dropdownList_7839n_19{position:absolute;z-index:3;background:var(--background-color-primary, white);box-shadow:var(--box-shadow, 0px 2px 5px rgba(7, 42, 68, .1));border:var(--box-border, 1px solid rgba(7, 42, 68, .1));border-radius:var(--box-border-radius, 6px);overscroll-behavior-y:contain;width:max-content}._bottom_7839n_30{top:calc(100% + 2px)}._top_7839n_34{bottom:calc(100% + 2px)}._left_7839n_38{left:0!important}._right_7839n_42{right:0!important}._center_7839n_46{left:50%;transform:translate(-50%)}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useState as
|
|
1
|
+
import { jsxs as g, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import m from "classnames";
|
|
3
|
+
import { useState as x, useRef as b, useEffect as E } from "react";
|
|
4
4
|
import t from "./Dropdown.module.scss.js";
|
|
5
|
-
const
|
|
5
|
+
const y = ({
|
|
6
6
|
onClick: s,
|
|
7
|
-
horizontalPosition:
|
|
7
|
+
horizontalPosition: d = "left",
|
|
8
|
+
verticalPosition: c = "bottom",
|
|
8
9
|
disabled: l = !1,
|
|
9
|
-
closeOnContentClick:
|
|
10
|
-
className:
|
|
10
|
+
closeOnContentClick: p = !1,
|
|
11
|
+
className: f,
|
|
11
12
|
dropdownClassName: a,
|
|
12
|
-
children:
|
|
13
|
+
children: u
|
|
13
14
|
}) => {
|
|
14
|
-
const [r, o] =
|
|
15
|
+
const [r, o] = x(!1), n = b(null), w = () => {
|
|
15
16
|
l || (s && s(), o(!r));
|
|
16
17
|
};
|
|
17
18
|
return E(() => {
|
|
@@ -19,11 +20,11 @@ const k = ({
|
|
|
19
20
|
n.current && !n.current.contains(v.target) && o(!1);
|
|
20
21
|
};
|
|
21
22
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
22
|
-
}, []), /* @__PURE__ */
|
|
23
|
+
}, []), /* @__PURE__ */ g(
|
|
23
24
|
"div",
|
|
24
25
|
{
|
|
25
26
|
ref: n,
|
|
26
|
-
className:
|
|
27
|
+
className: m(t.dropdownWrapper, { [f]: f }),
|
|
27
28
|
children: [
|
|
28
29
|
/* @__PURE__ */ i(
|
|
29
30
|
"button",
|
|
@@ -31,20 +32,21 @@ const k = ({
|
|
|
31
32
|
type: "button",
|
|
32
33
|
"aria-expanded": r,
|
|
33
34
|
className: t.dropdownHeader,
|
|
34
|
-
onClick:
|
|
35
|
-
children:
|
|
35
|
+
onClick: w,
|
|
36
|
+
children: u[0]
|
|
36
37
|
}
|
|
37
38
|
),
|
|
38
39
|
r && /* @__PURE__ */ i(
|
|
39
40
|
"div",
|
|
40
41
|
{
|
|
41
|
-
className: a ||
|
|
42
|
+
className: a || m(t.dropdownList, {
|
|
43
|
+
[t[d]]: d,
|
|
42
44
|
[t[c]]: c
|
|
43
45
|
}),
|
|
44
46
|
onClick: (e) => {
|
|
45
|
-
(
|
|
47
|
+
(p || e.target === e.currentTarget) && o(!1);
|
|
46
48
|
},
|
|
47
|
-
children:
|
|
49
|
+
children: u[1]
|
|
48
50
|
}
|
|
49
51
|
)
|
|
50
52
|
]
|
|
@@ -52,5 +54,5 @@ const k = ({
|
|
|
52
54
|
);
|
|
53
55
|
};
|
|
54
56
|
export {
|
|
55
|
-
|
|
57
|
+
y as Dropdown
|
|
56
58
|
};
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import '../../../assets/components/dialog/dropdown/Dropdown.module-
|
|
2
|
-
dropdownWrapper:
|
|
3
|
-
dropdownHeader:
|
|
4
|
-
dropdownList:
|
|
5
|
-
|
|
1
|
+
import '../../../assets/components/dialog/dropdown/Dropdown.module-BmT3rAwz.css';const o = "_dropdownWrapper_7839n_3", t = "_dropdownHeader_7839n_8", n = "_dropdownList_7839n_19", r = "_bottom_7839n_30", _ = "_top_7839n_34", d = "_left_7839n_38", e = "_right_7839n_42", p = "_center_7839n_46", s = {
|
|
2
|
+
dropdownWrapper: o,
|
|
3
|
+
dropdownHeader: t,
|
|
4
|
+
dropdownList: n,
|
|
5
|
+
bottom: r,
|
|
6
|
+
top: _,
|
|
7
|
+
left: d,
|
|
6
8
|
right: e,
|
|
7
|
-
center:
|
|
9
|
+
center: p
|
|
8
10
|
};
|
|
9
11
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
r as bottom,
|
|
13
|
+
p as center,
|
|
14
|
+
s as default,
|
|
15
|
+
t as dropdownHeader,
|
|
16
|
+
n as dropdownList,
|
|
17
|
+
o as dropdownWrapper,
|
|
18
|
+
d as left,
|
|
19
|
+
e as right,
|
|
20
|
+
_ as top
|
|
17
21
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import We, { useState as
|
|
1
|
+
import { jsxs as U, jsx as g, Fragment as Qe } from "react/jsx-runtime";
|
|
2
|
+
import Ue from "@rooks/use-previous";
|
|
3
|
+
import $e from "classnames";
|
|
4
|
+
import We, { useState as f, useEffect as p } from "react";
|
|
5
5
|
import { useIntl as ze } from "react-intl";
|
|
6
6
|
import { useLocation as Ge } from "react-router";
|
|
7
|
-
import
|
|
7
|
+
import l from "./PaginatedList.module.scss.js";
|
|
8
8
|
import { ActionBar as Pe } from "./action_bar/ActionBar.js";
|
|
9
9
|
import { useList as Ve } from "../list_provider/useList.js";
|
|
10
10
|
import { useDataProvider as Xe } from "../../data/data_provider/useDataProvider.js";
|
|
@@ -15,14 +15,14 @@ import { Pagination as He } from "../pagination/Pagination.js";
|
|
|
15
15
|
import { StandardErrorBoundary as Ie } from "../../error/standard_error_boundary/StandardErrorBoundary.js";
|
|
16
16
|
const ct = ({
|
|
17
17
|
query: N,
|
|
18
|
-
sortOptions:
|
|
18
|
+
sortOptions: o,
|
|
19
19
|
sort: M,
|
|
20
|
-
filters:
|
|
20
|
+
filters: m,
|
|
21
21
|
tagList: ne,
|
|
22
22
|
pinnedTagList: ae,
|
|
23
23
|
currentPage: R,
|
|
24
24
|
resource: A,
|
|
25
|
-
currentListId:
|
|
25
|
+
currentListId: a,
|
|
26
26
|
withToken: le,
|
|
27
27
|
perPage: v,
|
|
28
28
|
perPageParam: ie = "per_page",
|
|
@@ -31,7 +31,7 @@ const ct = ({
|
|
|
31
31
|
queryParam: de = "query",
|
|
32
32
|
tagParam: re = "tag_id",
|
|
33
33
|
totalHeaderParam: D = "total",
|
|
34
|
-
onUpdateTotal:
|
|
34
|
+
onUpdateTotal: $,
|
|
35
35
|
onElementsLoad: b,
|
|
36
36
|
transformData: W,
|
|
37
37
|
uniqueIdKey: S = "id",
|
|
@@ -39,8 +39,8 @@ const ct = ({
|
|
|
39
39
|
resourcePropName: ce,
|
|
40
40
|
loadingComponent: z,
|
|
41
41
|
searchBar: ue = !1,
|
|
42
|
-
title:
|
|
43
|
-
subtitle:
|
|
42
|
+
title: ge,
|
|
43
|
+
subtitle: Ee,
|
|
44
44
|
showDebateConsultationSubtitle: he = !1,
|
|
45
45
|
emptyListComponent: G,
|
|
46
46
|
emptyText: P,
|
|
@@ -55,28 +55,28 @@ const ct = ({
|
|
|
55
55
|
withUrlParams: Ne = !1,
|
|
56
56
|
onLoadNewPage: Z
|
|
57
57
|
}) => {
|
|
58
|
-
const J = ze(), t = Ve(), H = Xe(), I = Ge(), { isMobile: K, isTablet: Me, isDesktop: L } = Ye(), [k, E] =
|
|
58
|
+
const J = ze(), t = Ve(), H = Xe(), I = Ge(), { isMobile: K, isTablet: Me, isDesktop: L } = Ye(), [k, E] = f(!1), [Re, be] = f(!1), [d, y] = Ze(a, []), [O, ke] = f(
|
|
59
59
|
d?.length || 0
|
|
60
|
-
), [
|
|
60
|
+
), [h, j] = f(R || 1), [w, B] = f(N || null), [C, q] = f(null), [Ce, ee] = f(null), c = new URLSearchParams(
|
|
61
61
|
typeof window < "u" ? window.location.search : I.search
|
|
62
|
-
),
|
|
62
|
+
), Te = () => o && o[0].type === "sort" && o[0].value || M || "", Fe = () => {
|
|
63
63
|
let e = {};
|
|
64
|
-
return
|
|
65
|
-
}, [
|
|
66
|
-
R && R !==
|
|
67
|
-
if (
|
|
68
|
-
|
|
69
|
-
for (const e of
|
|
70
|
-
|
|
64
|
+
return o && o[0].type === "filter" && (e[o[0].name] = o[0].value), m && (e = Object.assign({}, e, m)), e;
|
|
65
|
+
}, [T, F] = f(Te()), [Q, _] = f(Fe()), te = Ue(m);
|
|
66
|
+
R && R !== h && j(R), N !== void 0 && N !== w && B(N), M !== void 0 && M !== T && F(M), te && JSON.stringify(m) !== JSON.stringify(te) && JSON.stringify(m) !== JSON.stringify(Q) && _(m), p(() => {
|
|
67
|
+
if (c.get("tagId") && q(Number.parseInt(c.get("tagId"))), c.get("search") && B(c.get("search")), c.get("sort")) {
|
|
68
|
+
F(c.get("sort"));
|
|
69
|
+
for (const e of c.values()) {
|
|
70
|
+
o?.map((s) => {
|
|
71
71
|
s.value === e && ee(s.name);
|
|
72
72
|
});
|
|
73
73
|
break;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
for (const e of
|
|
77
|
-
|
|
76
|
+
for (const e of c.keys()) {
|
|
77
|
+
o?.map((s) => {
|
|
78
78
|
s.name === e && (_({
|
|
79
|
-
...
|
|
79
|
+
...m,
|
|
80
80
|
[s.name]: s.value
|
|
81
81
|
}), ee(s.name));
|
|
82
82
|
});
|
|
@@ -85,61 +85,71 @@ const ct = ({
|
|
|
85
85
|
}, [I.search]), p(() => {
|
|
86
86
|
A ? (j(1), y([]), E(!0), se(1)) : E(!1);
|
|
87
87
|
}, [
|
|
88
|
-
|
|
88
|
+
T,
|
|
89
89
|
Q,
|
|
90
90
|
w,
|
|
91
91
|
A,
|
|
92
92
|
C,
|
|
93
93
|
v
|
|
94
94
|
]), p(() => {
|
|
95
|
-
|
|
96
|
-
}, [
|
|
97
|
-
if (t.addElements &&
|
|
98
|
-
Ae(t.addElements[
|
|
95
|
+
h > 1 && (E(!0), se(h));
|
|
96
|
+
}, [h]), p(() => {
|
|
97
|
+
if (t.addElements && a in t.addElements && t.addElements[a].length > 0) {
|
|
98
|
+
Ae(t.addElements[a]);
|
|
99
99
|
const e = t.addElements;
|
|
100
|
-
delete e[
|
|
100
|
+
delete e[a], t.setAddElements(e);
|
|
101
101
|
}
|
|
102
102
|
}, [t.addElements]), p(() => {
|
|
103
|
-
if (t.updateElements &&
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
if (t.updateElements && a in t.updateElements) {
|
|
104
|
+
const e = t.updateElements[a];
|
|
105
|
+
if (e.length > 0) {
|
|
106
|
+
const s = e.filter(
|
|
107
|
+
(i) => d.some((n) => n.id === i.id)
|
|
108
|
+
);
|
|
109
|
+
if (s.length > 0) {
|
|
110
|
+
De(s);
|
|
111
|
+
const i = e.filter(
|
|
112
|
+
(r) => !d.some((u) => u.id === r.id)
|
|
113
|
+
), n = { ...t.updateElements };
|
|
114
|
+
i.length > 0 ? n[a] = i : delete n[a], t.setUpdateElements(n);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
107
117
|
}
|
|
108
118
|
}, [t.updateElements, d]), p(() => {
|
|
109
|
-
if (t.removeElements &&
|
|
110
|
-
Je(t.removeElements[
|
|
119
|
+
if (t.removeElements && a in t.removeElements && t.removeElements[a].length > 0 && d.length > 0) {
|
|
120
|
+
Je(t.removeElements[a]);
|
|
111
121
|
const e = { ...t.removeElements };
|
|
112
|
-
delete e[
|
|
122
|
+
delete e[a], t.setRemoveElements(e);
|
|
113
123
|
}
|
|
114
124
|
}, [t.removeElements, d]);
|
|
115
125
|
const _e = (e) => {
|
|
116
|
-
e.type === "filter" ? (
|
|
117
|
-
...
|
|
126
|
+
e.type === "filter" ? (F(""), _({
|
|
127
|
+
...m,
|
|
118
128
|
[e.name]: e.value
|
|
119
|
-
})) : (
|
|
129
|
+
})) : (F(e.value), _(m ? { ...m } : {}));
|
|
120
130
|
}, xe = () => {
|
|
121
|
-
typeof Z == "function" && Z() !== null || j(
|
|
131
|
+
typeof Z == "function" && Z() !== null || j(h + 1);
|
|
122
132
|
}, se = (e) => {
|
|
123
133
|
const s = le ? H.getListWithToken : H.getList;
|
|
124
134
|
if ((e - 1) * v <= (Y || O) || e === 1) {
|
|
125
|
-
const
|
|
135
|
+
const i = {
|
|
126
136
|
[oe]: e,
|
|
127
137
|
[ie]: v,
|
|
128
|
-
...
|
|
138
|
+
...T && !w && { [me]: T },
|
|
129
139
|
...w && { [de]: w },
|
|
130
140
|
...ye === !0 && { countless: !0 },
|
|
131
141
|
...Q,
|
|
132
142
|
...C && { [re]: C }
|
|
133
143
|
};
|
|
134
|
-
s(A,
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
Number.parseInt(
|
|
138
|
-
),
|
|
139
|
-
let
|
|
140
|
-
b && b(
|
|
141
|
-
}).catch((
|
|
142
|
-
console.error(
|
|
144
|
+
s(A, i).then((n) => {
|
|
145
|
+
const r = n.headers;
|
|
146
|
+
r && D in r && (ke(
|
|
147
|
+
Number.parseInt(r[D || "total"], 10)
|
|
148
|
+
), $ && $(r[D || "total"]));
|
|
149
|
+
let u = n?.data?.data;
|
|
150
|
+
b && b(u), W && (u = u.filter(W)), t.addElements && a in t.addElements && t.addElements[a].length > 0 && (u = [...t.addElements[a], u]), Le(u), E(!1);
|
|
151
|
+
}).catch((n) => {
|
|
152
|
+
console.error(n), n?.response?.status !== 404 && be(!0), E(!1);
|
|
143
153
|
});
|
|
144
154
|
} else
|
|
145
155
|
E(!1);
|
|
@@ -149,35 +159,35 @@ const ct = ({
|
|
|
149
159
|
), b && b(e);
|
|
150
160
|
}, De = (e) => {
|
|
151
161
|
y((s) => {
|
|
152
|
-
let
|
|
162
|
+
let i = s;
|
|
153
163
|
return e.forEach(
|
|
154
|
-
(
|
|
155
|
-
(
|
|
164
|
+
(n) => i = i.map(
|
|
165
|
+
(r) => r.id === n.id ? n : r
|
|
156
166
|
)
|
|
157
|
-
), x(
|
|
167
|
+
), x(i, S || "id");
|
|
158
168
|
});
|
|
159
169
|
}, Je = (e) => {
|
|
160
|
-
const s = e.map((
|
|
161
|
-
(
|
|
170
|
+
const s = e.map((n) => n.id), i = d.filter(
|
|
171
|
+
(n) => s.indexOf(n.id) === -1
|
|
162
172
|
);
|
|
163
|
-
y(x(
|
|
173
|
+
y(x(i, S || "id"));
|
|
164
174
|
}, Le = (e) => {
|
|
165
175
|
y(
|
|
166
176
|
(s) => x([...s, ...e], S || "id")
|
|
167
177
|
);
|
|
168
|
-
}, je = (e, s) => e !== void 0 ? /* @__PURE__ */
|
|
178
|
+
}, je = (e, s) => e !== void 0 ? /* @__PURE__ */ g(
|
|
169
179
|
"li",
|
|
170
180
|
{
|
|
171
|
-
className:
|
|
181
|
+
className: l.paginatedListItem,
|
|
172
182
|
"data-testid": "list-item",
|
|
173
183
|
onClick: we,
|
|
174
|
-
children: /* @__PURE__ */
|
|
184
|
+
children: /* @__PURE__ */ g(Ie, { hideMessage: !0, children: We.cloneElement(fe, {
|
|
175
185
|
index: s,
|
|
176
186
|
[ce]: e
|
|
177
187
|
}) })
|
|
178
188
|
},
|
|
179
189
|
`${e[S || "id"]}_${e.updated_at || e.content}`
|
|
180
|
-
) : null, Be = (e) => z ? /* @__PURE__ */
|
|
190
|
+
) : null, Be = (e) => z ? /* @__PURE__ */ g("li", { className: l.paginatedListItem, children: z }, e) : null;
|
|
181
191
|
if (Re)
|
|
182
192
|
throw new Error(
|
|
183
193
|
J.formatMessage({
|
|
@@ -185,14 +195,14 @@ const ct = ({
|
|
|
185
195
|
defaultMessage: "Error when loading content."
|
|
186
196
|
})
|
|
187
197
|
);
|
|
188
|
-
return /* @__PURE__ */
|
|
189
|
-
/* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ U("div", { className: l.listContainer, children: [
|
|
199
|
+
/* @__PURE__ */ g(
|
|
190
200
|
Pe,
|
|
191
201
|
{
|
|
192
|
-
title:
|
|
193
|
-
subtitle:
|
|
202
|
+
title: ge,
|
|
203
|
+
subtitle: Ee,
|
|
194
204
|
showDebateConsultationSubtitle: he,
|
|
195
|
-
sortOptions:
|
|
205
|
+
sortOptions: o,
|
|
196
206
|
defaultSelectOption: Ce,
|
|
197
207
|
searchBar: ue,
|
|
198
208
|
tagList: ne,
|
|
@@ -204,23 +214,23 @@ const ct = ({
|
|
|
204
214
|
withUrlParams: Ne
|
|
205
215
|
}
|
|
206
216
|
),
|
|
207
|
-
!k && d.length === 0 ? G ? /* @__PURE__ */
|
|
217
|
+
!k && d.length === 0 ? G ? /* @__PURE__ */ g("div", { className: l.emptyListElement, children: G }) : /* @__PURE__ */ g("div", { className: l.emptyList, children: P || J.formatMessage({
|
|
208
218
|
id: "info.emptyList",
|
|
209
219
|
defaultMessage: "No items for now."
|
|
210
|
-
}) }) : /* @__PURE__ */
|
|
211
|
-
/* @__PURE__ */
|
|
220
|
+
}) }) : /* @__PURE__ */ U(Qe, { children: [
|
|
221
|
+
/* @__PURE__ */ U(
|
|
212
222
|
"ul",
|
|
213
223
|
{
|
|
214
|
-
className:
|
|
215
|
-
[
|
|
216
|
-
[
|
|
217
|
-
[
|
|
218
|
-
[
|
|
219
|
-
[
|
|
220
|
-
[
|
|
221
|
-
[
|
|
222
|
-
[
|
|
223
|
-
[
|
|
224
|
+
className: $e(l.paginatedList, {
|
|
225
|
+
[l.paginatedListIsTablet]: !K && !L,
|
|
226
|
+
[l.centeredList]: V === "column",
|
|
227
|
+
[l.column]: V === "column",
|
|
228
|
+
[l.twoElementsPerLine]: X === 2,
|
|
229
|
+
[l.oneElementPerLine]: X === 1,
|
|
230
|
+
[l.indexLayoutList]: pe,
|
|
231
|
+
[l.listIsDesktop]: L,
|
|
232
|
+
[l.listIsTablet]: Me && !L,
|
|
233
|
+
[l.listIsMobile]: K
|
|
224
234
|
}),
|
|
225
235
|
style: { gap: ve },
|
|
226
236
|
children: [
|
|
@@ -229,14 +239,14 @@ const ct = ({
|
|
|
229
239
|
]
|
|
230
240
|
}
|
|
231
241
|
),
|
|
232
|
-
!k && Se !== !1 && /* @__PURE__ */
|
|
242
|
+
!k && Se !== !1 && /* @__PURE__ */ g(
|
|
233
243
|
He,
|
|
234
244
|
{
|
|
235
245
|
buttonText: J.formatMessage({
|
|
236
246
|
id: "action.see_more",
|
|
237
247
|
defaultMessage: "See more"
|
|
238
248
|
}),
|
|
239
|
-
currentPage:
|
|
249
|
+
currentPage: h,
|
|
240
250
|
perPage: v,
|
|
241
251
|
totalElements: Y || O,
|
|
242
252
|
onLoad: xe,
|
|
@@ -14,7 +14,7 @@ import { Link as nt } from "../../action/link/Link.js";
|
|
|
14
14
|
import { Icon as l } from "../../icons/icon/Icon.js";
|
|
15
15
|
import { ShareButton as ot } from "../../share/share_button/ShareButton.js";
|
|
16
16
|
import { Dropdown as at } from "../../dialog/dropdown/Dropdown.js";
|
|
17
|
-
const rt = O(() => import("../../share/share_modal/index.js").then((n) => ({ default: n.ShareModal }))),
|
|
17
|
+
const rt = O(() => import("../../share/share_modal/index.js").then((n) => ({ default: n.ShareModal }))), Dt = ({
|
|
18
18
|
resource: n,
|
|
19
19
|
reportType: I,
|
|
20
20
|
deleteType: k,
|
|
@@ -36,9 +36,9 @@ const rt = O(() => import("../../share/share_modal/index.js").then((n) => ({ def
|
|
|
36
36
|
showShareText: T,
|
|
37
37
|
enableEdition: j = !0,
|
|
38
38
|
enableDeletion: F = !0,
|
|
39
|
-
enableReport:
|
|
40
|
-
containerClassName:
|
|
41
|
-
voteActionClassName:
|
|
39
|
+
enableReport: P = !0,
|
|
40
|
+
containerClassName: B,
|
|
41
|
+
voteActionClassName: L,
|
|
42
42
|
replyRedirectUrl: g
|
|
43
43
|
}) => {
|
|
44
44
|
const o = Q(), y = V(), { currentUser: d } = X(), { showModal: U } = Y(), { setInputContent: W } = Z() || {}, { reportContent: w } = $(I, n.id), { deleteContent: M } = tt(
|
|
@@ -46,7 +46,7 @@ const rt = O(() => import("../../share/share_modal/index.js").then((n) => ({ def
|
|
|
46
46
|
k,
|
|
47
47
|
N,
|
|
48
48
|
x
|
|
49
|
-
), { elementWidth: c } = et(), q = () => d?.id ? n.author?.id === d?.id || n.debate_suggestion?.author?.id === d?.id : !1,
|
|
49
|
+
), { elementWidth: c } = et(), q = () => d?.id ? n.author?.id === d?.id || n.debate_suggestion?.author?.id === d?.id : !1, v = () => {
|
|
50
50
|
W(n);
|
|
51
51
|
}, G = () => {
|
|
52
52
|
if (n.created_at && y.actions?.editionTime) {
|
|
@@ -58,7 +58,7 @@ const rt = O(() => import("../../share/share_modal/index.js").then((n) => ({ def
|
|
|
58
58
|
return /* @__PURE__ */ new Date() < a;
|
|
59
59
|
}
|
|
60
60
|
return !0;
|
|
61
|
-
},
|
|
61
|
+
}, D = () => {
|
|
62
62
|
U(
|
|
63
63
|
/* @__PURE__ */ t(J, { fallback: null, children: /* @__PURE__ */ t(
|
|
64
64
|
rt,
|
|
@@ -75,14 +75,14 @@ const rt = O(() => import("../../share/share_modal/index.js").then((n) => ({ def
|
|
|
75
75
|
}, i = (a) => (s) => {
|
|
76
76
|
(s.key === "Enter" || s.key === " ") && (s.preventDefault(), a());
|
|
77
77
|
};
|
|
78
|
-
return /* @__PURE__ */ r("div", { className: b(e.container,
|
|
78
|
+
return /* @__PURE__ */ r("div", { className: b(e.container, B), children: [
|
|
79
79
|
/* @__PURE__ */ t(
|
|
80
80
|
"div",
|
|
81
81
|
{
|
|
82
82
|
onKeyDown: (a) => {
|
|
83
83
|
(a.key === "Enter" || a.key === " ") && (a.preventDefault(), onClick());
|
|
84
84
|
},
|
|
85
|
-
className: b(e.voteAction,
|
|
85
|
+
className: b(e.voteAction, L),
|
|
86
86
|
"data-tid": "action_vote_argument",
|
|
87
87
|
children: C
|
|
88
88
|
}
|
|
@@ -159,6 +159,7 @@ const rt = O(() => import("../../share/share_modal/index.js").then((n) => ({ def
|
|
|
159
159
|
{
|
|
160
160
|
className: e.moreActionDropdown,
|
|
161
161
|
horizontalPosition: "right",
|
|
162
|
+
verticalPosition: "top",
|
|
162
163
|
children: [
|
|
163
164
|
/* @__PURE__ */ t(
|
|
164
165
|
l,
|
|
@@ -181,8 +182,8 @@ const rt = O(() => import("../../share/share_modal/index.js").then((n) => ({ def
|
|
|
181
182
|
"data-tid": "action_edit_argument",
|
|
182
183
|
className: e.dropdownItem,
|
|
183
184
|
tabIndex: "0",
|
|
184
|
-
onClick:
|
|
185
|
-
onKeyDown: i(
|
|
185
|
+
onClick: v,
|
|
186
|
+
onKeyDown: i(v),
|
|
186
187
|
children: o.formatMessage({
|
|
187
188
|
id: "user_content.content_footer.update",
|
|
188
189
|
defaultMessage: "Update"
|
|
@@ -204,7 +205,7 @@ const rt = O(() => import("../../share/share_modal/index.js").then((n) => ({ def
|
|
|
204
205
|
}
|
|
205
206
|
)
|
|
206
207
|
] }),
|
|
207
|
-
|
|
208
|
+
P && /* @__PURE__ */ t(
|
|
208
209
|
"div",
|
|
209
210
|
{
|
|
210
211
|
"data-tid": "action_report_argument",
|
|
@@ -225,8 +226,8 @@ const rt = O(() => import("../../share/share_modal/index.js").then((n) => ({ def
|
|
|
225
226
|
"data-tid": "action_share_argument",
|
|
226
227
|
className: e.dropdownItem,
|
|
227
228
|
tabIndex: "0",
|
|
228
|
-
onClick:
|
|
229
|
-
onKeyDown: i(
|
|
229
|
+
onClick: D,
|
|
230
|
+
onKeyDown: i(D),
|
|
230
231
|
children: o.formatMessage({
|
|
231
232
|
id: "user_content.content_footer.share",
|
|
232
233
|
defaultMessage: "Share"
|
|
@@ -242,5 +243,5 @@ const rt = O(() => import("../../share/share_modal/index.js").then((n) => ({ def
|
|
|
242
243
|
] });
|
|
243
244
|
};
|
|
244
245
|
export {
|
|
245
|
-
|
|
246
|
+
Dt as ContentFooter
|
|
246
247
|
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._dropdownWrapper_zrxfa_3{position:relative;display:inline-block}._dropdownHeader_zrxfa_8{border:none;padding:0!important;cursor:pointer;background-color:var(--background-color-primary, white)}._dropdownHeader_zrxfa_8:focus:not(:focus-visible){outline:none;box-shadow:none}._dropdownList_zrxfa_19{position:absolute;top:calc(100% + 2px);z-index:3;background:var(--background-color-primary, white);box-shadow:var(--box-shadow, 0px 2px 5px rgba(7, 42, 68, .1));border:var(--box-border, 1px solid rgba(7, 42, 68, .1));border-radius:var(--box-border-radius, 6px);overscroll-behavior-y:contain;width:max-content}._left_zrxfa_31{left:0!important}._right_zrxfa_35{right:0!important}._center_zrxfa_39{left:50%;transform:translate(-50%)}
|