@logora/debate 0.4.49 → 0.4.51
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/input/text_editor/plugins/ToolbarPlugin.module-DPrYyi_2.css +1 -0
- package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-DP4kPR9x.css +1 -0
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +54 -56
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.module.scss.js +12 -12
- package/dist/components/list/paginated_list/action_bar/ActionBar.js +126 -74
- package/dist/components/list/paginated_list/action_bar/ActionBar.module.scss.js +28 -18
- package/package.json +1 -1
- package/dist/assets/components/input/text_editor/plugins/ToolbarPlugin.module-C3yG2biv.css +0 -1
- package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-BDMBrj2Y.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._toolbar_1vwec_3{display:flex!important;justify-content:space-between!important;flex-wrap:wrap;background:var(--background-color-primary, white);padding-top:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important;vertical-align:middle;align-items:flex-start;gap:var(--space-unit, 1em)}._toolbar_1vwec_3._toolbarIsActive_1vwec_13{border-top:1px solid var(--text-tertiary, #fafafa)}._iconToolbar_1vwec_17{display:flex!important;gap:var(--spacer-lg, calc(var(--space-unit, 1em) * 1.5))}._iconToolbar_1vwec_17._shortBar_1vwec_21{gap:var(--spacer-md, calc(var(--space-unit, 1em) * .75))}._toolbarItem_1vwec_25{border:0;background:none;padding:0!important;cursor:pointer;vertical-align:middle;touch-action:manipulation;display:flex;align-items:center;justify-content:center;outline:none}@container (max-width: 575.98px){._toolbarItem_1vwec_25{min-width:44px;min-height:44px}}._toolbarItem_1vwec_25._disabled_1vwec_43{cursor:not-allowed}._toolbarItem_1vwec_25:active,._toolbarItem_1vwec_25._active_1vwec_46{background-color:#bababa66;border-radius:50%}._toolbarItem_1vwec_25 ._format_1vwec_50{background-size:contain;display:inline-block;vertical-align:-.25em;display:flex!important}._actionButton_1vwec_57{display:flex!important;gap:var(--space-unit, 1em);margin-left:auto}._inputSubmitActionButton_1vwec_63{width:100%;height:35px;display:flex!important;justify-content:center!important;align-items:center!important;background-color:var(--call-primary-color, #434343)!important}._inputSubmitActionButton_1vwec_63._submitAction_1vwec_71 svg{fill:var(--text-light, white)!important}._inputSubmitActionButton_1vwec_63 ._inputSourceText_1vwec_74{display:none!important;margin-left:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;font-size:var(--font-size-small, 16px)}@container (min-width: 576px){._inputSubmitActionButton_1vwec_63 ._inputSourceText_1vwec_74{display:block!important}}._tooltip_1vwec_85{width:230px!important;margin-left:-117px!important}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._listHeader_10hfs_3{display:flex;justify-content:space-between;align-items:center;position:relative;flex-wrap:wrap;gap:var(--space-unit, 1em)}@container (max-width: 575.98px){._listHeader_10hfs_3{flex-direction:column;align-items:flex-start}._listHeader_10hfs_3._listHeaderOneItem_10hfs_16{flex-direction:row;align-items:center;flex-wrap:nowrap!important}}._listTitle_10hfs_23{font-size:var(--font-size-extra-large, 22px);line-height:var(--line-height-tight, 1.08em);font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);font-family:var(--title-font-family, var(--font-family, "Montserrat"))}._listSubtitle_10hfs_31{color:var(--text-primary, #222222);font-weight:var(--font-weight-normal, 400);font-variation-settings:var(--font-variation-normal, normal);font-size:var(--font-size-normal, 16px);margin-top:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}._rightBar_10hfs_39{display:flex;gap:var(--space-unit, 1em);flex-wrap:wrap}@container (max-width: 575.98px){._rightBar_10hfs_39{width:100%;justify-content:space-between}._rightBar_10hfs_39._rightBarOneItem_10hfs_49{justify-content:flex-end}}._rightBar_10hfs_39{flex:1 1 auto;justify-content:flex-end;align-items:center;flex-direction:row}._search_10hfs_60{flex:1;max-width:35%}@container (max-width: 575.98px){._search_10hfs_60{max-width:80%}}._tagSection_10hfs_70{position:relative;display:flex;align-items:stretch;width:100%;max-width:100%}._tagList_10hfs_78{display:flex;flex-direction:row;justify-content:flex-start;flex:1;overflow-x:auto;overflow-y:hidden;gap:var(--spacer-md, calc(var(--space-unit, 1em) * .75));padding-bottom:var(--spacer-md, calc(var(--space-unit, 1em) * .75));scrollbar-width:none}@container (max-width: 575.98px){._tagList_10hfs_78{gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}}._tagList_10hfs_78::-webkit-scrollbar{display:none}._arrow_10hfs_98{position:absolute;top:0;bottom:0;z-index:2;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;padding:0;transition:opacity .2s ease;outline:none;background:none;line-height:0}._arrow_10hfs_98 svg{display:block}._arrow_10hfs_98:focus-visible{outline:2px solid var(--call-primary-color, #434343);outline-offset:-2px}._arrowLeft_10hfs_122{left:0;padding-left:var(--spacer-xs, calc(var(--space-unit, 1em) * .325));background:linear-gradient(to right,var(--background-color-container, white) 40%,transparent)}._arrowLeft_10hfs_122 svg{transform:rotate(90deg)}._arrowRight_10hfs_131{right:0;padding-right:var(--spacer-xs, calc(var(--space-unit, 1em) * .325));background:linear-gradient(to left,var(--background-color-container, white) 40%,transparent)}._arrowRight_10hfs_131 svg{transform:rotate(-90deg)}._arrowHidden_10hfs_140{opacity:0;pointer-events:none}._tagItem_10hfs_145{display:flex!important;color:var(--text-secondary, #5F5F5F);cursor:pointer;white-space:nowrap}._select_10hfs_152{max-width:300px}@container (max-width: 575.98px){._select_10hfs_152{max-width:300px}}
|
|
@@ -1,52 +1,50 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { $isListNode as
|
|
3
|
-
import { useLexicalComposerContext as
|
|
4
|
-
import { $isHeadingNode as
|
|
5
|
-
import { $setBlocksType as
|
|
6
|
-
import { $getNearestNodeOfType as
|
|
1
|
+
import { jsxs as E, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { $isListNode as P, ListNode as Y, INSERT_ORDERED_LIST_COMMAND as Z, $isListItemNode as O, $createListNode as ee } from "@lexical/list";
|
|
3
|
+
import { useLexicalComposerContext as te } from "@lexical/react/LexicalComposerContext";
|
|
4
|
+
import { $isHeadingNode as oe, $createQuoteNode as R } from "@lexical/rich-text";
|
|
5
|
+
import { $setBlocksType as B } from "@lexical/selection";
|
|
6
|
+
import { $getNearestNodeOfType as ne, mergeRegister as ie } from "@lexical/utils";
|
|
7
7
|
import i from "classnames";
|
|
8
|
-
import { $getSelection as M, $isRangeSelection as I, SELECTION_CHANGE_COMMAND as
|
|
9
|
-
import { useRef as
|
|
10
|
-
import { useIntl as
|
|
8
|
+
import { $getSelection as M, $isRangeSelection as I, SELECTION_CHANGE_COMMAND as ae, FORMAT_TEXT_COMMAND as le, $createParagraphNode as $ } from "lexical";
|
|
9
|
+
import { useRef as x, useState as N, useCallback as re, useEffect as q } from "react";
|
|
10
|
+
import { useIntl as se } from "react-intl";
|
|
11
11
|
import t from "./ToolbarPlugin.module.scss.js";
|
|
12
12
|
import { Icon as f } from "../../../icons/icon/Icon.js";
|
|
13
|
-
import { Button as
|
|
14
|
-
const
|
|
15
|
-
const d =
|
|
13
|
+
import { Button as ce } from "../../../action/button/Button.js";
|
|
14
|
+
const we = (a) => {
|
|
15
|
+
const d = se(), K = 1, [l] = te(), F = x(null), [T, S] = N("paragraph"), [de, U] = N(null), [j, H] = N(!1), [Q, V] = N(!1), [z, G] = N(!1), L = a.hideSubmit && a.hideSourceAction && a.disableRichText, _ = re(() => {
|
|
16
16
|
const e = M();
|
|
17
17
|
if (I(e)) {
|
|
18
18
|
const c = e.anchor.getNode(), r = c.getKey() === "root" ? c : c.getTopLevelElementOrThrow(), u = r.getKey();
|
|
19
19
|
if (l.getElementByKey(u) !== null)
|
|
20
|
-
if (
|
|
21
|
-
const o =
|
|
22
|
-
|
|
20
|
+
if (U(u), P(r)) {
|
|
21
|
+
const o = ne(c, Y), p = o ? o.getTag() : r.getTag();
|
|
22
|
+
S(p);
|
|
23
23
|
} else {
|
|
24
|
-
const o =
|
|
25
|
-
|
|
24
|
+
const o = oe(r) ? r.getTag() : r.getType();
|
|
25
|
+
S(o);
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
H(e.hasFormat("bold")), V(e.hasFormat("italic")), G(e.hasFormat("underline"));
|
|
28
28
|
}
|
|
29
29
|
}, [l]);
|
|
30
|
-
|
|
30
|
+
q(() => ie(
|
|
31
31
|
l.registerUpdateListener(({ editorState: e }) => {
|
|
32
32
|
e.read(() => {
|
|
33
33
|
_();
|
|
34
34
|
});
|
|
35
35
|
}),
|
|
36
36
|
l.registerCommand(
|
|
37
|
-
|
|
37
|
+
ae,
|
|
38
38
|
() => (_(), !1),
|
|
39
|
-
|
|
39
|
+
K
|
|
40
40
|
)
|
|
41
41
|
), [l, _]);
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
}, y = k(!1), s = k(null);
|
|
45
|
-
K(() => () => {
|
|
42
|
+
const y = x(!1), s = x(null);
|
|
43
|
+
q(() => () => {
|
|
46
44
|
s.current && clearTimeout(s.current);
|
|
47
45
|
}, []);
|
|
48
46
|
const g = (e, c) => {
|
|
49
|
-
|
|
47
|
+
e.preventDefault(), (e.pointerType === "touch" || e.pointerType === "pen") && (y.current = !0, c(), s.current && clearTimeout(s.current), s.current = setTimeout(() => {
|
|
50
48
|
y.current = !1, s.current = null;
|
|
51
49
|
}, 500));
|
|
52
50
|
}, h = (e) => {
|
|
@@ -62,8 +60,8 @@ const Ce = (a) => {
|
|
|
62
60
|
});
|
|
63
61
|
}, 0);
|
|
64
62
|
}, b = (e) => {
|
|
65
|
-
l.dispatchCommand(
|
|
66
|
-
},
|
|
63
|
+
l.dispatchCommand(le, e), w();
|
|
64
|
+
}, X = () => {
|
|
67
65
|
l.update(() => {
|
|
68
66
|
const e = M();
|
|
69
67
|
if (!I(e))
|
|
@@ -71,53 +69,53 @@ const Ce = (a) => {
|
|
|
71
69
|
const c = e.getNodes(), r = /* @__PURE__ */ new Set();
|
|
72
70
|
for (const m of c) {
|
|
73
71
|
let o = m;
|
|
74
|
-
for (; o !== null && !
|
|
72
|
+
for (; o !== null && !O(o); )
|
|
75
73
|
o = o.getParent();
|
|
76
|
-
|
|
74
|
+
O(o) && r.add(o);
|
|
77
75
|
}
|
|
78
76
|
const u = Array.from(r).reverse();
|
|
79
77
|
for (const m of u) {
|
|
80
78
|
const o = m.getParent();
|
|
81
|
-
if (!
|
|
79
|
+
if (!P(o))
|
|
82
80
|
continue;
|
|
83
|
-
const p =
|
|
84
|
-
for (const
|
|
85
|
-
p.append(
|
|
81
|
+
const p = $(), J = m.getChildren();
|
|
82
|
+
for (const k of J)
|
|
83
|
+
p.append(k);
|
|
86
84
|
const C = m.getNextSiblings();
|
|
87
85
|
if (o.insertAfter(p), C.length > 0) {
|
|
88
|
-
const
|
|
89
|
-
for (const
|
|
90
|
-
|
|
91
|
-
p.insertAfter(
|
|
86
|
+
const k = C[0].getValue(), v = ee(o.getListType(), k);
|
|
87
|
+
for (const W of C)
|
|
88
|
+
v.append(W);
|
|
89
|
+
p.insertAfter(v);
|
|
92
90
|
}
|
|
93
91
|
m.remove(), o.getChildrenSize() === 0 && o.remove();
|
|
94
92
|
}
|
|
95
93
|
});
|
|
94
|
+
}, A = () => {
|
|
95
|
+
T !== "ol" ? l.dispatchCommand(Z) : X(), w();
|
|
96
96
|
}, D = () => {
|
|
97
|
-
T !== "ol" ? l.dispatchCommand(ee) : J(), w();
|
|
98
|
-
}, v = () => {
|
|
99
97
|
T !== "quote" ? l.update(() => {
|
|
100
98
|
const e = M();
|
|
101
99
|
if (I(e))
|
|
102
100
|
if (e.isCollapsed()) {
|
|
103
|
-
const r = e.anchor.getNode().getTopLevelElementOrThrow(), u =
|
|
101
|
+
const r = e.anchor.getNode().getTopLevelElementOrThrow(), u = R();
|
|
104
102
|
r.insertAfter(u), u.selectEnd();
|
|
105
103
|
} else
|
|
106
|
-
|
|
104
|
+
B(e, () => R());
|
|
107
105
|
}) : l.update(() => {
|
|
108
106
|
const e = M();
|
|
109
|
-
I(e) &&
|
|
107
|
+
I(e) && B(e, () => $());
|
|
110
108
|
}), w();
|
|
111
109
|
};
|
|
112
|
-
return L ? null : /* @__PURE__ */
|
|
110
|
+
return L ? null : /* @__PURE__ */ E(
|
|
113
111
|
"div",
|
|
114
112
|
{
|
|
115
113
|
className: i(t.toolbar, {
|
|
116
114
|
[t.toolbarIsActive]: L ? !1 : a.isActive
|
|
117
115
|
}),
|
|
118
|
-
ref:
|
|
116
|
+
ref: F,
|
|
119
117
|
children: [
|
|
120
|
-
a.isActive ? !a.disableRichText && /* @__PURE__ */
|
|
118
|
+
a.isActive ? !a.disableRichText && /* @__PURE__ */ E(
|
|
121
119
|
"div",
|
|
122
120
|
{
|
|
123
121
|
className: i(t.iconToolbar, {
|
|
@@ -130,7 +128,7 @@ const Ce = (a) => {
|
|
|
130
128
|
onPointerDown: (e) => g(e, () => b("bold")),
|
|
131
129
|
onClick: () => h(() => b("bold")),
|
|
132
130
|
type: "button",
|
|
133
|
-
className: i(t.toolbarItem, { [t.active]:
|
|
131
|
+
className: i(t.toolbarItem, { [t.active]: j }),
|
|
134
132
|
"data-testid": "format-bold",
|
|
135
133
|
"aria-label": d.formatMessage({
|
|
136
134
|
id: "input.text_editor.plugins.toolbar_plugin.bold.aria_label",
|
|
@@ -154,7 +152,7 @@ const Ce = (a) => {
|
|
|
154
152
|
onClick: () => h(() => b("italic")),
|
|
155
153
|
type: "button",
|
|
156
154
|
className: i(t.toolbarItem, {
|
|
157
|
-
[t.active]:
|
|
155
|
+
[t.active]: Q
|
|
158
156
|
}),
|
|
159
157
|
"aria-label": d.formatMessage({
|
|
160
158
|
id: "input.text_editor.plugins.toolbar_plugin.italic.aria_label",
|
|
@@ -178,7 +176,7 @@ const Ce = (a) => {
|
|
|
178
176
|
onClick: () => h(() => b("underline")),
|
|
179
177
|
type: "button",
|
|
180
178
|
className: i(t.toolbarItem, {
|
|
181
|
-
[t.active]:
|
|
179
|
+
[t.active]: z
|
|
182
180
|
}),
|
|
183
181
|
"aria-label": d.formatMessage({
|
|
184
182
|
id: "input.text_editor.plugins.toolbar_plugin.underline.aria_label",
|
|
@@ -198,8 +196,8 @@ const Ce = (a) => {
|
|
|
198
196
|
/* @__PURE__ */ n(
|
|
199
197
|
"button",
|
|
200
198
|
{
|
|
201
|
-
onPointerDown: (e) => g(e, () =>
|
|
202
|
-
onClick: () => h(() =>
|
|
199
|
+
onPointerDown: (e) => g(e, () => D()),
|
|
200
|
+
onClick: () => h(() => D()),
|
|
203
201
|
type: "button",
|
|
204
202
|
className: i(t.toolbarItem, {
|
|
205
203
|
[t.active]: T === "quote"
|
|
@@ -222,8 +220,8 @@ const Ce = (a) => {
|
|
|
222
220
|
/* @__PURE__ */ n(
|
|
223
221
|
"button",
|
|
224
222
|
{
|
|
225
|
-
onPointerDown: (e) => g(e, () =>
|
|
226
|
-
onClick: () => h(() =>
|
|
223
|
+
onPointerDown: (e) => g(e, () => A()),
|
|
224
|
+
onClick: () => h(() => A()),
|
|
227
225
|
type: "button",
|
|
228
226
|
className: i(t.toolbarItem, {
|
|
229
227
|
[t.active]: T === "ol"
|
|
@@ -246,7 +244,7 @@ const Ce = (a) => {
|
|
|
246
244
|
!a.hideSourceAction && /* @__PURE__ */ n(
|
|
247
245
|
"button",
|
|
248
246
|
{
|
|
249
|
-
onPointerDown:
|
|
247
|
+
onPointerDown: (e) => e.preventDefault(),
|
|
250
248
|
onClick: a.onAddSource,
|
|
251
249
|
type: "button",
|
|
252
250
|
className: t.toolbarItem,
|
|
@@ -269,7 +267,7 @@ const Ce = (a) => {
|
|
|
269
267
|
}
|
|
270
268
|
) : null,
|
|
271
269
|
/* @__PURE__ */ n("div", { className: t.actionButton, children: a.hideSubmit ? null : /* @__PURE__ */ n(
|
|
272
|
-
|
|
270
|
+
ce,
|
|
273
271
|
{
|
|
274
272
|
type: "button",
|
|
275
273
|
"data-testid": "submit-button",
|
|
@@ -287,5 +285,5 @@ const Ce = (a) => {
|
|
|
287
285
|
);
|
|
288
286
|
};
|
|
289
287
|
export {
|
|
290
|
-
|
|
288
|
+
we as ToolbarPlugin
|
|
291
289
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import '../../../../assets/components/input/text_editor/plugins/ToolbarPlugin.module-
|
|
1
|
+
import '../../../../assets/components/input/text_editor/plugins/ToolbarPlugin.module-DPrYyi_2.css';const t = "_toolbar_1vwec_3", o = "_toolbarIsActive_1vwec_13", c = "_iconToolbar_1vwec_17", n = "_shortBar_1vwec_21", _ = "_toolbarItem_1vwec_25", i = "_active_1vwec_46", a = "_format_1vwec_50", s = "_actionButton_1vwec_57", e = "_inputSubmitActionButton_1vwec_63", r = "_submitAction_1vwec_71", b = {
|
|
2
2
|
toolbar: t,
|
|
3
3
|
toolbarIsActive: o,
|
|
4
|
-
iconToolbar:
|
|
4
|
+
iconToolbar: c,
|
|
5
5
|
shortBar: n,
|
|
6
6
|
toolbarItem: _,
|
|
7
|
-
active:
|
|
8
|
-
format:
|
|
7
|
+
active: i,
|
|
8
|
+
format: a,
|
|
9
9
|
actionButton: s,
|
|
10
|
-
inputSubmitActionButton:
|
|
11
|
-
submitAction:
|
|
10
|
+
inputSubmitActionButton: e,
|
|
11
|
+
submitAction: r
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
14
|
s as actionButton,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
i as active,
|
|
16
|
+
b as default,
|
|
17
|
+
a as format,
|
|
18
|
+
c as iconToolbar,
|
|
19
|
+
e as inputSubmitActionButton,
|
|
20
20
|
n as shortBar,
|
|
21
|
-
|
|
21
|
+
r as submitAction,
|
|
22
22
|
t as toolbar,
|
|
23
23
|
o as toolbarIsActive,
|
|
24
24
|
_ as toolbarItem
|
|
@@ -1,109 +1,129 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import { useLocation as
|
|
6
|
-
import
|
|
7
|
-
import { useResponsive as
|
|
8
|
-
import { SearchInput as
|
|
9
|
-
import { Select as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
const
|
|
13
|
-
title:
|
|
14
|
-
subtitle:
|
|
15
|
-
showDebateConsultationSubtitle:
|
|
16
|
-
sortOptions:
|
|
17
|
-
defaultSelectOption:
|
|
18
|
-
searchBar:
|
|
19
|
-
tagList:
|
|
20
|
-
pinnedTagList:
|
|
21
|
-
activeTagId:
|
|
22
|
-
withUrlParams:
|
|
23
|
-
onSearch:
|
|
24
|
-
onSortChange:
|
|
25
|
-
onTagChange:
|
|
1
|
+
import { jsx as r, Fragment as T, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import R from "classnames";
|
|
3
|
+
import { useState as v, useRef as G, useCallback as J, useEffect as K } from "react";
|
|
4
|
+
import { useIntl as Q } from "react-intl";
|
|
5
|
+
import { useLocation as V } from "react-router";
|
|
6
|
+
import t from "./ActionBar.module.scss.js";
|
|
7
|
+
import { useResponsive as X } from "../../../hooks/use_responsive/useResponsive.js";
|
|
8
|
+
import { SearchInput as Y } from "../../../input/search_input/SearchInput.js";
|
|
9
|
+
import { Select as Z } from "../../../input/select/Select.js";
|
|
10
|
+
import { Icon as b } from "../../../icons/icon/Icon.js";
|
|
11
|
+
import { Tag as U } from "../../../tag/tag/Tag.js";
|
|
12
|
+
const de = ({
|
|
13
|
+
title: f,
|
|
14
|
+
subtitle: w,
|
|
15
|
+
showDebateConsultationSubtitle: k = !1,
|
|
16
|
+
sortOptions: n,
|
|
17
|
+
defaultSelectOption: x,
|
|
18
|
+
searchBar: o = !1,
|
|
19
|
+
tagList: m,
|
|
20
|
+
pinnedTagList: h = [],
|
|
21
|
+
activeTagId: u,
|
|
22
|
+
withUrlParams: g = !1,
|
|
23
|
+
onSearch: $,
|
|
24
|
+
onSortChange: L,
|
|
25
|
+
onTagChange: H
|
|
26
26
|
}) => {
|
|
27
|
-
const
|
|
28
|
-
typeof window < "u" ? window.location.search :
|
|
29
|
-
),
|
|
27
|
+
const B = Q(), M = V(), { isMobile: q } = X(), [j, z] = v(!1), s = G(null), [y, P] = v(!1), [A, W] = v(!1), a = new URLSearchParams(
|
|
28
|
+
typeof window < "u" ? window.location.search : M.search
|
|
29
|
+
), S = Array.isArray(m) ? m : m?.data || [], C = [
|
|
30
30
|
...new Set(
|
|
31
|
-
(Array.isArray(
|
|
31
|
+
(Array.isArray(h) ? h : [h]).filter(Boolean).map(String)
|
|
32
32
|
)
|
|
33
|
-
],
|
|
34
|
-
...
|
|
35
|
-
...
|
|
36
|
-
] : [],
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
], p = S.length > 0 ? [
|
|
34
|
+
...C.map((e) => S.find((l) => String(l.id) === e)).filter(Boolean),
|
|
35
|
+
...S.filter((e) => !C.includes(String(e.id)))
|
|
36
|
+
] : [], i = J(() => {
|
|
37
|
+
const e = s.current;
|
|
38
|
+
e && (P(e.scrollLeft > 1), W(e.scrollLeft + e.clientWidth < e.scrollWidth - 1));
|
|
39
|
+
}, []);
|
|
40
|
+
K(() => {
|
|
41
|
+
i();
|
|
42
|
+
const e = s.current;
|
|
43
|
+
if (!e) return;
|
|
44
|
+
const l = new ResizeObserver(i);
|
|
45
|
+
return l.observe(e), () => l.disconnect();
|
|
46
|
+
}, [p, i]);
|
|
47
|
+
const I = (e, l) => {
|
|
48
|
+
l.stopPropagation();
|
|
49
|
+
const c = s.current;
|
|
50
|
+
if (!c) return;
|
|
51
|
+
const N = 200;
|
|
52
|
+
c.scrollBy({
|
|
53
|
+
left: e === "left" ? -N : N,
|
|
54
|
+
behavior: "smooth"
|
|
55
|
+
}), setTimeout(i, 300);
|
|
56
|
+
}, _ = (e) => {
|
|
57
|
+
if (g) {
|
|
58
|
+
for (const l of a.keys())
|
|
59
|
+
n.map((c) => {
|
|
60
|
+
c.name === l && a.delete(l);
|
|
41
61
|
});
|
|
42
|
-
|
|
62
|
+
a.delete("sort"), a.set(
|
|
43
63
|
e.type === "filter" ? e.name : "sort",
|
|
44
64
|
e.value
|
|
45
65
|
);
|
|
46
66
|
}
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
const
|
|
54
|
-
return /* @__PURE__ */
|
|
67
|
+
L(e);
|
|
68
|
+
}, D = (e) => {
|
|
69
|
+
g && (e.id === u ? a.delete("tagId") : a.set("tagId", e.id)), H(e.id === u ? null : e.id);
|
|
70
|
+
}, E = (e) => {
|
|
71
|
+
g && (e ? a.set("search", e) : a.delete("search")), $(e), z(e !== "");
|
|
72
|
+
}, F = (e) => {
|
|
73
|
+
const l = u === e.id;
|
|
74
|
+
return /* @__PURE__ */ r(
|
|
55
75
|
"div",
|
|
56
76
|
{
|
|
57
|
-
className:
|
|
58
|
-
onClick: () =>
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
-
|
|
77
|
+
className: t.tagItem,
|
|
78
|
+
onClick: () => D(e),
|
|
79
|
+
children: /* @__PURE__ */ r(
|
|
80
|
+
U,
|
|
61
81
|
{
|
|
62
82
|
text: e.display_name,
|
|
63
|
-
active:
|
|
64
|
-
rightIcon:
|
|
83
|
+
active: l,
|
|
84
|
+
rightIcon: l && /* @__PURE__ */ r(b, { name: "close", height: 10, width: 10 })
|
|
65
85
|
}
|
|
66
86
|
)
|
|
67
87
|
},
|
|
68
88
|
e.id
|
|
69
89
|
);
|
|
70
90
|
};
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
91
|
+
return /* @__PURE__ */ r(T, { children: (f || n || o) && /* @__PURE__ */ d(T, { children: [
|
|
92
|
+
/* @__PURE__ */ d(
|
|
73
93
|
"div",
|
|
74
94
|
{
|
|
75
|
-
className:
|
|
76
|
-
[
|
|
95
|
+
className: R(t.listHeader, {
|
|
96
|
+
[t.listHeaderOneItem]: !o || !n
|
|
77
97
|
}),
|
|
78
98
|
children: [
|
|
79
|
-
|
|
80
|
-
(
|
|
99
|
+
f && /* @__PURE__ */ r("div", { className: t.listTitle, children: f }),
|
|
100
|
+
(n || o) && /* @__PURE__ */ d(
|
|
81
101
|
"div",
|
|
82
102
|
{
|
|
83
|
-
className:
|
|
84
|
-
[
|
|
103
|
+
className: R(t.rightBar, {
|
|
104
|
+
[t.rightBarOneItem]: !o || !n
|
|
85
105
|
}),
|
|
86
106
|
children: [
|
|
87
|
-
|
|
88
|
-
|
|
107
|
+
o ? /* @__PURE__ */ r("div", { className: t.search, children: /* @__PURE__ */ r(
|
|
108
|
+
Y,
|
|
89
109
|
{
|
|
90
|
-
onSearchSubmit:
|
|
91
|
-
placeholder:
|
|
110
|
+
onSearchSubmit: E,
|
|
111
|
+
placeholder: B.formatMessage({
|
|
92
112
|
id: "info.search_mobile",
|
|
93
113
|
defaultMessage: "Search"
|
|
94
114
|
}),
|
|
95
115
|
reducedByDefault: !1
|
|
96
116
|
}
|
|
97
117
|
) }) : null,
|
|
98
|
-
|
|
99
|
-
|
|
118
|
+
n ? /* @__PURE__ */ r(
|
|
119
|
+
Z,
|
|
100
120
|
{
|
|
101
|
-
onChange:
|
|
102
|
-
options:
|
|
103
|
-
defaultOption:
|
|
121
|
+
onChange: _,
|
|
122
|
+
options: n,
|
|
123
|
+
defaultOption: x,
|
|
104
124
|
horizontalPosition: "right",
|
|
105
|
-
disabled:
|
|
106
|
-
className:
|
|
125
|
+
disabled: j,
|
|
126
|
+
className: t.select
|
|
107
127
|
}
|
|
108
128
|
) : null
|
|
109
129
|
]
|
|
@@ -112,10 +132,42 @@ const O = ({
|
|
|
112
132
|
]
|
|
113
133
|
}
|
|
114
134
|
),
|
|
115
|
-
|
|
116
|
-
|
|
135
|
+
k && w && /* @__PURE__ */ r("div", { className: t.listSubtitle, children: w }),
|
|
136
|
+
p.length > 0 && /* @__PURE__ */ d("div", { className: t.tagSection, children: [
|
|
137
|
+
/* @__PURE__ */ r(
|
|
138
|
+
"button",
|
|
139
|
+
{
|
|
140
|
+
type: "button",
|
|
141
|
+
className: `${t.arrow} ${t.arrowLeft} ${y ? "" : t.arrowHidden}`,
|
|
142
|
+
onClick: (e) => I("left", e),
|
|
143
|
+
"aria-label": "Tag précédent",
|
|
144
|
+
tabIndex: y ? 0 : -1,
|
|
145
|
+
children: /* @__PURE__ */ r(b, { name: "lightArrow", height: 24, width: 24 })
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
/* @__PURE__ */ r(
|
|
149
|
+
"div",
|
|
150
|
+
{
|
|
151
|
+
ref: s,
|
|
152
|
+
className: t.tagList,
|
|
153
|
+
onScroll: i,
|
|
154
|
+
children: p.map(F)
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
/* @__PURE__ */ r(
|
|
158
|
+
"button",
|
|
159
|
+
{
|
|
160
|
+
type: "button",
|
|
161
|
+
className: `${t.arrow} ${t.arrowRight} ${A ? "" : t.arrowHidden}`,
|
|
162
|
+
onClick: (e) => I("right", e),
|
|
163
|
+
"aria-label": "Tag suivant",
|
|
164
|
+
tabIndex: A ? 0 : -1,
|
|
165
|
+
children: /* @__PURE__ */ r(b, { name: "lightArrow", height: 24, width: 24 })
|
|
166
|
+
}
|
|
167
|
+
)
|
|
168
|
+
] })
|
|
117
169
|
] }) });
|
|
118
170
|
};
|
|
119
171
|
export {
|
|
120
|
-
|
|
172
|
+
de as ActionBar
|
|
121
173
|
};
|
|
@@ -1,25 +1,35 @@
|
|
|
1
|
-
import '../../../../assets/components/list/paginated_list/action_bar/ActionBar.module-
|
|
1
|
+
import '../../../../assets/components/list/paginated_list/action_bar/ActionBar.module-DP4kPR9x.css';const t = "_listHeader_10hfs_3", s = "_listHeaderOneItem_10hfs_16", e = "_listTitle_10hfs_23", r = "_listSubtitle_10hfs_31", _ = "_rightBar_10hfs_39", a = "_rightBarOneItem_10hfs_49", i = "_search_10hfs_60", o = "_tagSection_10hfs_70", n = "_tagList_10hfs_78", h = "_arrow_10hfs_98", c = "_arrowLeft_10hfs_122", l = "_arrowRight_10hfs_131", f = "_arrowHidden_10hfs_140", g = "_tagItem_10hfs_145", d = "_select_10hfs_152", w = {
|
|
2
2
|
listHeader: t,
|
|
3
|
-
listHeaderOneItem:
|
|
4
|
-
listTitle:
|
|
5
|
-
listSubtitle:
|
|
3
|
+
listHeaderOneItem: s,
|
|
4
|
+
listTitle: e,
|
|
5
|
+
listSubtitle: r,
|
|
6
6
|
rightBar: _,
|
|
7
|
-
rightBarOneItem:
|
|
8
|
-
search:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
rightBarOneItem: a,
|
|
8
|
+
search: i,
|
|
9
|
+
tagSection: o,
|
|
10
|
+
tagList: n,
|
|
11
|
+
arrow: h,
|
|
12
|
+
arrowLeft: c,
|
|
13
|
+
arrowRight: l,
|
|
14
|
+
arrowHidden: f,
|
|
15
|
+
tagItem: g,
|
|
16
|
+
select: d
|
|
12
17
|
};
|
|
13
18
|
export {
|
|
14
|
-
|
|
19
|
+
h as arrow,
|
|
20
|
+
f as arrowHidden,
|
|
21
|
+
c as arrowLeft,
|
|
22
|
+
l as arrowRight,
|
|
23
|
+
w as default,
|
|
15
24
|
t as listHeader,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
s as listHeaderOneItem,
|
|
26
|
+
r as listSubtitle,
|
|
27
|
+
e as listTitle,
|
|
19
28
|
_ as rightBar,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
a as rightBarOneItem,
|
|
30
|
+
i as search,
|
|
31
|
+
d as select,
|
|
32
|
+
g as tagItem,
|
|
33
|
+
n as tagList,
|
|
34
|
+
o as tagSection
|
|
25
35
|
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._toolbar_awaxp_3{display:flex!important;justify-content:space-between!important;flex-wrap:wrap;background:var(--background-color-primary, white);padding-top:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important;vertical-align:middle;align-items:flex-start;gap:var(--space-unit, 1em)}._toolbar_awaxp_3._toolbarIsActive_awaxp_13{border-top:1px solid var(--text-tertiary, #fafafa)}._iconToolbar_awaxp_17{display:flex!important;gap:var(--spacer-lg, calc(var(--space-unit, 1em) * 1.5))}._iconToolbar_awaxp_17._shortBar_awaxp_21{gap:var(--spacer-md, calc(var(--space-unit, 1em) * .75))}._toolbarItem_awaxp_25{border:0;background:none;padding:0!important;cursor:pointer;vertical-align:middle;touch-action:manipulation;display:flex;align-items:center;justify-content:center}@container (max-width: 575.98px){._toolbarItem_awaxp_25{min-width:44px;min-height:44px}}._toolbarItem_awaxp_25._disabled_awaxp_42{cursor:not-allowed}._toolbarItem_awaxp_25._active_awaxp_45{background-color:#bababa66;border-radius:50%}._toolbarItem_awaxp_25 ._format_awaxp_49{background-size:contain;display:inline-block;vertical-align:-.25em;display:flex!important}._actionButton_awaxp_56{display:flex!important;gap:var(--space-unit, 1em);margin-left:auto}._inputSubmitActionButton_awaxp_62{width:100%;height:35px;display:flex!important;justify-content:center!important;align-items:center!important;background-color:var(--call-primary-color, #434343)!important}._inputSubmitActionButton_awaxp_62._submitAction_awaxp_70 svg{fill:var(--text-light, white)!important}._inputSubmitActionButton_awaxp_62 ._inputSourceText_awaxp_73{display:none!important;margin-left:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;font-size:var(--font-size-small, 16px)}@container (min-width: 576px){._inputSubmitActionButton_awaxp_62 ._inputSourceText_awaxp_73{display:block!important}}._tooltip_awaxp_84{width:230px!important;margin-left:-117px!important}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._listHeader_fga2s_3{display:flex;justify-content:space-between;align-items:center;position:relative;flex-wrap:wrap;gap:var(--space-unit, 1em)}@container (max-width: 575.98px){._listHeader_fga2s_3{flex-direction:column;align-items:flex-start}._listHeader_fga2s_3._listHeaderOneItem_fga2s_16{flex-direction:row;align-items:center;flex-wrap:nowrap!important}}._listTitle_fga2s_23{font-size:var(--font-size-extra-large, 22px);line-height:var(--line-height-tight, 1.08em);font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);font-family:var(--title-font-family, var(--font-family, "Montserrat"))}._listSubtitle_fga2s_31{color:var(--text-primary, #222222);font-weight:var(--font-weight-normal, 400);font-variation-settings:var(--font-variation-normal, normal);font-size:var(--font-size-normal, 16px);margin-top:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}._rightBar_fga2s_39{display:flex;gap:var(--space-unit, 1em);flex-wrap:wrap}@container (max-width: 575.98px){._rightBar_fga2s_39{width:100%;justify-content:space-between}._rightBar_fga2s_39._rightBarOneItem_fga2s_49{justify-content:flex-end}}._rightBar_fga2s_39{flex:1 1 auto;justify-content:flex-end;align-items:center;flex-direction:row}._search_fga2s_60{flex:1;max-width:35%}@container (max-width: 575.98px){._search_fga2s_60{max-width:80%}}._tagList_fga2s_70{display:flex;flex-direction:row;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;gap:var(--spacer-md, calc(var(--space-unit, 1em) * .75));padding-bottom:var(--spacer-md, calc(var(--space-unit, 1em) * .75))}@container (max-width: 575.98px){._tagList_fga2s_70{gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}}._tagItem_fga2s_85{display:flex!important;color:var(--text-secondary, #5F5F5F);cursor:pointer;white-space:nowrap}._select_fga2s_92{max-width:300px}@container (max-width: 575.98px){._select_fga2s_92{max-width:300px}}
|