@logora/debate 0.3.116 → 0.3.118
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.
|
@@ -2,96 +2,90 @@ import { jsxs as k, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { $isListNode as $, ListNode as q, INSERT_ORDERED_LIST_COMMAND as K, REMOVE_LIST_COMMAND as F } from "@lexical/list";
|
|
3
3
|
import { useLexicalComposerContext as U } from "@lexical/react/LexicalComposerContext";
|
|
4
4
|
import { $isHeadingNode as P, $createQuoteNode as x } from "@lexical/rich-text";
|
|
5
|
-
import { $setBlocksType as
|
|
5
|
+
import { $setBlocksType as I } from "@lexical/selection";
|
|
6
6
|
import { $getNearestNodeOfType as j, mergeRegister as H } from "@lexical/utils";
|
|
7
7
|
import a from "classnames";
|
|
8
|
-
import { $getSelection as
|
|
8
|
+
import { $getSelection as p, $isRangeSelection as N, SELECTION_CHANGE_COMMAND as Q, FORMAT_TEXT_COMMAND as G, $createParagraphNode as V } from "lexical";
|
|
9
9
|
import { useRef as X, useState as m, useCallback as z, useEffect as J } from "react";
|
|
10
10
|
import { useIntl as W } from "react-intl";
|
|
11
11
|
import e from "./ToolbarPlugin.module.scss.js";
|
|
12
12
|
import { Icon as d } from "../../../icons/icon/Icon.js";
|
|
13
13
|
import { Button as Y } from "../../../action/button/Button.js";
|
|
14
|
-
const he = (
|
|
15
|
-
const c = W(),
|
|
16
|
-
const t =
|
|
17
|
-
if (
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
if (v(u), $(
|
|
21
|
-
const g = j(
|
|
14
|
+
const he = (l) => {
|
|
15
|
+
const c = W(), E = 1, [n] = U(), A = X(null), [b, M] = m("paragraph"), [Z, v] = m(null), [w, T] = m(!1), [D, _] = m(!1), [L, y] = m(!1), S = l.hideSubmit && l.hideSourceAction && l.disableRichText, h = z(() => {
|
|
16
|
+
const t = p();
|
|
17
|
+
if (N(t)) {
|
|
18
|
+
const s = t.anchor.getNode(), r = s.getKey() === "root" ? s : s.getTopLevelElementOrThrow(), u = r.getKey();
|
|
19
|
+
if (n.getElementByKey(u) !== null)
|
|
20
|
+
if (v(u), $(r)) {
|
|
21
|
+
const g = j(s, q), B = g ? g.getTag() : r.getTag();
|
|
22
22
|
M(B);
|
|
23
23
|
} else {
|
|
24
|
-
const g = P(
|
|
24
|
+
const g = P(r) ? r.getTag() : r.getType();
|
|
25
25
|
M(g);
|
|
26
26
|
}
|
|
27
|
-
T(t.hasFormat("bold")), _(t.hasFormat("italic")),
|
|
27
|
+
T(t.hasFormat("bold")), _(t.hasFormat("italic")), y(t.hasFormat("underline"));
|
|
28
28
|
}
|
|
29
|
-
}, [
|
|
29
|
+
}, [n]);
|
|
30
30
|
J(() => H(
|
|
31
|
-
|
|
31
|
+
n.registerUpdateListener(({ editorState: t }) => {
|
|
32
32
|
t.read(() => {
|
|
33
33
|
h();
|
|
34
34
|
});
|
|
35
35
|
}),
|
|
36
|
-
|
|
36
|
+
n.registerCommand(
|
|
37
37
|
Q,
|
|
38
38
|
() => (h(), !1),
|
|
39
|
-
|
|
39
|
+
E
|
|
40
40
|
)
|
|
41
|
-
), [
|
|
42
|
-
const
|
|
41
|
+
), [n, h]);
|
|
42
|
+
const i = (t) => {
|
|
43
43
|
t.preventDefault();
|
|
44
44
|
}, C = () => {
|
|
45
45
|
setTimeout(() => {
|
|
46
|
-
|
|
46
|
+
n.getEditorState().read(() => {
|
|
47
47
|
h();
|
|
48
48
|
});
|
|
49
49
|
}, 0);
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
const r = f();
|
|
53
|
-
if (!p(r))
|
|
54
|
-
return;
|
|
55
|
-
const n = !r.hasFormat(t);
|
|
56
|
-
i.dispatchCommand(V, t), t === "bold" && T(n), t === "italic" && _(n), t === "underline" && S(n);
|
|
57
|
-
});
|
|
50
|
+
}, f = (t) => {
|
|
51
|
+
n.dispatchCommand(G, t), t === "bold" && T((s) => !s), t === "italic" && _((s) => !s), t === "underline" && y((s) => !s);
|
|
58
52
|
}, O = () => {
|
|
59
|
-
b !== "ol" ?
|
|
53
|
+
b !== "ol" ? n.dispatchCommand(K) : n.dispatchCommand(F), C();
|
|
60
54
|
}, R = () => {
|
|
61
|
-
b !== "quote" ?
|
|
62
|
-
const t =
|
|
63
|
-
if (
|
|
55
|
+
b !== "quote" ? n.update(() => {
|
|
56
|
+
const t = p();
|
|
57
|
+
if (N(t))
|
|
64
58
|
if (t.isCollapsed()) {
|
|
65
|
-
const
|
|
66
|
-
|
|
59
|
+
const r = t.anchor.getNode().getTopLevelElementOrThrow(), u = x();
|
|
60
|
+
r.insertAfter(u), u.selectEnd();
|
|
67
61
|
} else
|
|
68
|
-
|
|
69
|
-
}) :
|
|
70
|
-
const t =
|
|
71
|
-
|
|
62
|
+
I(t, () => x());
|
|
63
|
+
}) : n.update(() => {
|
|
64
|
+
const t = p();
|
|
65
|
+
N(t) && I(t, () => V());
|
|
72
66
|
}), C();
|
|
73
67
|
};
|
|
74
|
-
return
|
|
68
|
+
return S ? null : /* @__PURE__ */ k(
|
|
75
69
|
"div",
|
|
76
70
|
{
|
|
77
71
|
className: a(e.toolbar, {
|
|
78
|
-
[e.toolbarIsActive]:
|
|
72
|
+
[e.toolbarIsActive]: S ? !1 : l.isActive
|
|
79
73
|
}),
|
|
80
74
|
ref: A,
|
|
81
75
|
children: [
|
|
82
|
-
|
|
76
|
+
l.isActive ? !l.disableRichText && /* @__PURE__ */ k(
|
|
83
77
|
"div",
|
|
84
78
|
{
|
|
85
79
|
className: a(e.iconToolbar, {
|
|
86
|
-
[e.shortBar]:
|
|
80
|
+
[e.shortBar]: l.shortBar
|
|
87
81
|
}),
|
|
88
82
|
children: [
|
|
89
83
|
/* @__PURE__ */ o(
|
|
90
84
|
"button",
|
|
91
85
|
{
|
|
92
|
-
onTouchStart:
|
|
93
|
-
onMouseDown:
|
|
94
|
-
onClick: () =>
|
|
86
|
+
onTouchStart: i,
|
|
87
|
+
onMouseDown: i,
|
|
88
|
+
onClick: () => f("bold"),
|
|
95
89
|
type: "button",
|
|
96
90
|
className: a(e.toolbarItem, { [e.active]: w }),
|
|
97
91
|
"data-testid": "format-bold",
|
|
@@ -113,9 +107,9 @@ const he = (s) => {
|
|
|
113
107
|
/* @__PURE__ */ o(
|
|
114
108
|
"button",
|
|
115
109
|
{
|
|
116
|
-
onTouchStart:
|
|
117
|
-
onMouseDown:
|
|
118
|
-
onClick: () =>
|
|
110
|
+
onTouchStart: i,
|
|
111
|
+
onMouseDown: i,
|
|
112
|
+
onClick: () => f("italic"),
|
|
119
113
|
type: "button",
|
|
120
114
|
className: a(e.toolbarItem, {
|
|
121
115
|
[e.active]: D
|
|
@@ -138,9 +132,9 @@ const he = (s) => {
|
|
|
138
132
|
/* @__PURE__ */ o(
|
|
139
133
|
"button",
|
|
140
134
|
{
|
|
141
|
-
onTouchStart:
|
|
142
|
-
onMouseDown:
|
|
143
|
-
onClick: () =>
|
|
135
|
+
onTouchStart: i,
|
|
136
|
+
onMouseDown: i,
|
|
137
|
+
onClick: () => f("underline"),
|
|
144
138
|
type: "button",
|
|
145
139
|
className: a(e.toolbarItem, {
|
|
146
140
|
[e.active]: L
|
|
@@ -163,8 +157,8 @@ const he = (s) => {
|
|
|
163
157
|
/* @__PURE__ */ o(
|
|
164
158
|
"button",
|
|
165
159
|
{
|
|
166
|
-
onTouchStart:
|
|
167
|
-
onMouseDown:
|
|
160
|
+
onTouchStart: i,
|
|
161
|
+
onMouseDown: i,
|
|
168
162
|
onClick: () => R(),
|
|
169
163
|
type: "button",
|
|
170
164
|
className: a(e.toolbarItem, {
|
|
@@ -188,8 +182,8 @@ const he = (s) => {
|
|
|
188
182
|
/* @__PURE__ */ o(
|
|
189
183
|
"button",
|
|
190
184
|
{
|
|
191
|
-
onTouchStart:
|
|
192
|
-
onMouseDown:
|
|
185
|
+
onTouchStart: i,
|
|
186
|
+
onMouseDown: i,
|
|
193
187
|
onClick: () => O(),
|
|
194
188
|
type: "button",
|
|
195
189
|
className: a(e.toolbarItem, {
|
|
@@ -210,12 +204,12 @@ const he = (s) => {
|
|
|
210
204
|
)
|
|
211
205
|
}
|
|
212
206
|
),
|
|
213
|
-
!
|
|
207
|
+
!l.hideSourceAction && /* @__PURE__ */ o(
|
|
214
208
|
"button",
|
|
215
209
|
{
|
|
216
|
-
onTouchStart:
|
|
217
|
-
onMouseDown:
|
|
218
|
-
onClick:
|
|
210
|
+
onTouchStart: i,
|
|
211
|
+
onMouseDown: i,
|
|
212
|
+
onClick: l.onAddSource,
|
|
219
213
|
type: "button",
|
|
220
214
|
className: e.toolbarItem,
|
|
221
215
|
"aria-label": c.formatMessage({
|
|
@@ -236,12 +230,12 @@ const he = (s) => {
|
|
|
236
230
|
]
|
|
237
231
|
}
|
|
238
232
|
) : null,
|
|
239
|
-
/* @__PURE__ */ o("div", { className: e.actionButton, children:
|
|
233
|
+
/* @__PURE__ */ o("div", { className: e.actionButton, children: l.hideSubmit ? null : /* @__PURE__ */ o(
|
|
240
234
|
Y,
|
|
241
235
|
{
|
|
242
236
|
type: "button",
|
|
243
237
|
"data-testid": "submit-button",
|
|
244
|
-
handleClick:
|
|
238
|
+
handleClick: l.onSubmit,
|
|
245
239
|
className: a(e.inputSubmitActionButton, e.submitAction),
|
|
246
240
|
"aria-label": c.formatMessage({
|
|
247
241
|
id: "input.text_editor.plugins.toolbar_plugin.submit_button.aria_label",
|
|
@@ -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,
|