@logora/debate 0.4.67 → 0.4.69
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/skeleton/page_skeleton/PageSkeleton.module-BqtcAizZ.css +1 -0
- package/dist/components/notification/notification_item/NotificationItem.js +13 -13
- package/dist/components/skeleton/page_skeleton/PageSkeleton.js +79 -0
- package/dist/components/skeleton/page_skeleton/PageSkeleton.module.scss.js +31 -0
- package/dist/index.js +304 -312
- package/package.json +1 -1
- package/dist/assets/components/skeleton/comments_skeleton/CommentsSkeleton.module-DxtFozVV.css +0 -1
- package/dist/assets/components/skeleton/consultation_skeleton/ConsultationSkeleton.module-DZ19OJWm.css +0 -1
- package/dist/assets/components/skeleton/debate_skeleton/DebateSkeleton.module-DXz8__D7.css +0 -1
- package/dist/assets/components/skeleton/suggestion_skeleton/SuggestionSkeleton.module-99fNFsmU.css +0 -1
- package/dist/assets/components/skeleton/user_page_skeleton/UserPageSkeleton.module-mlNfXOfB.css +0 -1
- package/dist/components/skeleton/comments_skeleton/CommentsSkeleton.js +0 -74
- package/dist/components/skeleton/comments_skeleton/CommentsSkeleton.module.scss.js +0 -33
- package/dist/components/skeleton/consultation_skeleton/ConsultationSkeleton.js +0 -76
- package/dist/components/skeleton/consultation_skeleton/ConsultationSkeleton.module.scss.js +0 -27
- package/dist/components/skeleton/debate_skeleton/DebateSkeleton.js +0 -90
- package/dist/components/skeleton/debate_skeleton/DebateSkeleton.module.scss.js +0 -31
- package/dist/components/skeleton/suggestion_skeleton/SuggestionSkeleton.js +0 -64
- package/dist/components/skeleton/suggestion_skeleton/SuggestionSkeleton.module.scss.js +0 -31
- package/dist/components/skeleton/user_page_skeleton/UserPageSkeleton.js +0 -79
- package/dist/components/skeleton/user_page_skeleton/UserPageSkeleton.module.scss.js +0 -29
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._pageSkeleton_vzch9_3{display:flex;flex-direction:column;gap:var(--space-unit, 1em);width:100%}._header_vzch9_10{display:flex;flex-direction:row;gap:var(--space-unit, 1em);align-items:center}@media(max-width:640px){._header_vzch9_10{flex-direction:column;align-items:flex-start}}._headerLines_vzch9_23{display:flex;flex-direction:column;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5));flex:1;min-width:120px}._lineMain_vzch9_31{width:70%;height:var(--font-size-extra-large, 22px)}._lineSecondary_vzch9_36{width:45%;height:var(--font-size-normal, 16px)}._photoCircle_vzch9_41{width:80px;height:80px;flex-shrink:0}._photoBox_vzch9_47{width:210px;height:140px;flex-shrink:0;border-radius:var(--box-border-radius, 6px)}@media(max-width:640px){._photoBox_vzch9_47{width:100%}}._tabsRow_vzch9_59{display:flex;flex-direction:row;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}._tab_vzch9_59{width:110px;height:32px;border-radius:var(--box-border-radius, 6px)}@media(max-width:640px){._tab_vzch9_59{width:90px}}._contentList_vzch9_76{display:flex;flex-direction:column;gap:var(--space-unit, 1em)}._contentItem_vzch9_82{display:flex;flex-direction:column;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5));border-radius:var(--box-border-radius, 6px);box-shadow:var(--box-shadow, 0px 2px 5px rgba(7, 42, 68, .1));border:var(--box-border, 1px solid rgba(7, 42, 68, .1));padding:var(--space-unit, 1em)}._contentLine_vzch9_92{width:100%;height:var(--font-size-normal, 16px)}._contentLineShort_vzch9_97{width:55%;height:var(--font-size-normal, 16px)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import w from "classnames";
|
|
3
3
|
import "react";
|
|
4
4
|
import { useIntl as I } from "react-intl";
|
|
@@ -11,21 +11,21 @@ import { useConfig as R } from "../../data/config_provider/useConfig.js";
|
|
|
11
11
|
const $ = ({
|
|
12
12
|
notification: i,
|
|
13
13
|
notificationDefinitions: a = {},
|
|
14
|
-
isRead:
|
|
14
|
+
isRead: m
|
|
15
15
|
}) => {
|
|
16
|
-
const { id:
|
|
16
|
+
const { id: f, created_at: l, notify_type: c, is_opened: r } = i, p = I(), v = C(), h = x(), _ = N(), u = y(new Date(l).getTime()), s = R();
|
|
17
17
|
if (!(c in a))
|
|
18
18
|
return null;
|
|
19
19
|
const o = a[c], g = () => {
|
|
20
20
|
if (typeof window < "u") {
|
|
21
21
|
const n = o.getRedirectUrl(
|
|
22
22
|
i,
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
v,
|
|
24
|
+
s
|
|
25
25
|
);
|
|
26
|
-
n?.pathname?.startsWith("http") ? window.location.href = n.pathname :
|
|
26
|
+
n?.pathname?.startsWith("http") ? window.location.href = n.pathname : _(n);
|
|
27
27
|
}
|
|
28
|
-
r ||
|
|
28
|
+
r || h.create(`notifications/read/${f}`, {}).catch(() => {
|
|
29
29
|
});
|
|
30
30
|
};
|
|
31
31
|
return /* @__PURE__ */ e(
|
|
@@ -34,12 +34,12 @@ const $ = ({
|
|
|
34
34
|
className: t.notificationItem,
|
|
35
35
|
tabIndex: "0",
|
|
36
36
|
onClick: () => g(),
|
|
37
|
-
children: /* @__PURE__ */
|
|
37
|
+
children: /* @__PURE__ */ d(
|
|
38
38
|
"div",
|
|
39
39
|
{
|
|
40
40
|
"data-tid": "action_view_notification",
|
|
41
41
|
className: w(t.notificationItemBody, {
|
|
42
|
-
[t.read]: r ||
|
|
42
|
+
[t.read]: r || m
|
|
43
43
|
}),
|
|
44
44
|
children: [
|
|
45
45
|
/* @__PURE__ */ e(
|
|
@@ -47,22 +47,22 @@ const $ = ({
|
|
|
47
47
|
{
|
|
48
48
|
"data-tid": "action_view_notification",
|
|
49
49
|
className: t.notificationImageContainer,
|
|
50
|
-
children: o.getImage(i)
|
|
50
|
+
children: o.getImage(i, s)
|
|
51
51
|
}
|
|
52
52
|
),
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ d(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
56
|
"data-tid": "action_view_notification",
|
|
57
57
|
className: t.notificationItemContent,
|
|
58
58
|
children: [
|
|
59
|
-
/* @__PURE__ */ e("div", { "data-tid": "action_view_notification", children: o.getContent(i,
|
|
59
|
+
/* @__PURE__ */ e("div", { "data-tid": "action_view_notification", children: o.getContent(i, p) }),
|
|
60
60
|
/* @__PURE__ */ e(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
63
|
"data-tid": "action_view_notification",
|
|
64
64
|
className: t.notificationItemDate,
|
|
65
|
-
children:
|
|
65
|
+
children: u
|
|
66
66
|
}
|
|
67
67
|
)
|
|
68
68
|
]
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsx as s, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import t from "react-loading-skeleton";
|
|
4
|
+
import "react-loading-skeleton/dist/skeleton.css";
|
|
5
|
+
import e from "./PageSkeleton.module.scss.js";
|
|
6
|
+
const k = ({
|
|
7
|
+
photo: a = "right",
|
|
8
|
+
items: d = 3,
|
|
9
|
+
tabs: o = !1,
|
|
10
|
+
enableAnimation: c = !0,
|
|
11
|
+
className: m
|
|
12
|
+
}) => {
|
|
13
|
+
const i = /* @__PURE__ */ r("div", { className: e.headerLines, children: [
|
|
14
|
+
/* @__PURE__ */ s(t, { enableAnimation: c, className: e.lineMain }),
|
|
15
|
+
/* @__PURE__ */ s(
|
|
16
|
+
t,
|
|
17
|
+
{
|
|
18
|
+
enableAnimation: c,
|
|
19
|
+
className: e.lineSecondary
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
] }), l = a === "left" ? /* @__PURE__ */ s(
|
|
23
|
+
t,
|
|
24
|
+
{
|
|
25
|
+
enableAnimation: c,
|
|
26
|
+
circle: !0,
|
|
27
|
+
className: e.photoCircle
|
|
28
|
+
}
|
|
29
|
+
) : /* @__PURE__ */ s(t, { enableAnimation: c, className: e.photoBox });
|
|
30
|
+
return /* @__PURE__ */ s("div", { "data-testid": "page-skeleton", className: m, children: /* @__PURE__ */ r("div", { className: e.pageSkeleton, children: [
|
|
31
|
+
/* @__PURE__ */ r("div", { className: e.header, children: [
|
|
32
|
+
a === "left" && l,
|
|
33
|
+
i,
|
|
34
|
+
a === "right" && l
|
|
35
|
+
] }),
|
|
36
|
+
o && /* @__PURE__ */ r("div", { className: e.tabsRow, children: [
|
|
37
|
+
/* @__PURE__ */ s(
|
|
38
|
+
t,
|
|
39
|
+
{
|
|
40
|
+
enableAnimation: c,
|
|
41
|
+
className: e.tab
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ s(
|
|
45
|
+
t,
|
|
46
|
+
{
|
|
47
|
+
enableAnimation: c,
|
|
48
|
+
className: e.tab
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ s(
|
|
52
|
+
t,
|
|
53
|
+
{
|
|
54
|
+
enableAnimation: c,
|
|
55
|
+
className: e.tab
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ s("div", { className: e.contentList, children: Array.from({ length: d }).map((N, h) => /* @__PURE__ */ r("div", { className: e.contentItem, children: [
|
|
60
|
+
/* @__PURE__ */ s(
|
|
61
|
+
t,
|
|
62
|
+
{
|
|
63
|
+
enableAnimation: c,
|
|
64
|
+
className: e.contentLine
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ s(
|
|
68
|
+
t,
|
|
69
|
+
{
|
|
70
|
+
enableAnimation: c,
|
|
71
|
+
className: e.contentLineShort
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
] }, h)) })
|
|
75
|
+
] }) });
|
|
76
|
+
};
|
|
77
|
+
export {
|
|
78
|
+
k as PageSkeleton
|
|
79
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import '../../../assets/components/skeleton/page_skeleton/PageSkeleton.module-BqtcAizZ.css';const t = "_pageSkeleton_vzch9_3", n = "_header_vzch9_10", e = "_headerLines_vzch9_23", o = "_lineMain_vzch9_31", c = "_lineSecondary_vzch9_36", _ = "_photoCircle_vzch9_41", h = "_photoBox_vzch9_47", s = "_tabsRow_vzch9_59", i = "_tab_vzch9_59", a = "_contentList_vzch9_76", r = "_contentItem_vzch9_82", l = "_contentLine_vzch9_92", v = "_contentLineShort_vzch9_97", z = {
|
|
2
|
+
pageSkeleton: t,
|
|
3
|
+
header: n,
|
|
4
|
+
headerLines: e,
|
|
5
|
+
lineMain: o,
|
|
6
|
+
lineSecondary: c,
|
|
7
|
+
photoCircle: _,
|
|
8
|
+
photoBox: h,
|
|
9
|
+
tabsRow: s,
|
|
10
|
+
tab: i,
|
|
11
|
+
contentList: a,
|
|
12
|
+
contentItem: r,
|
|
13
|
+
contentLine: l,
|
|
14
|
+
contentLineShort: v
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
r as contentItem,
|
|
18
|
+
l as contentLine,
|
|
19
|
+
v as contentLineShort,
|
|
20
|
+
a as contentList,
|
|
21
|
+
z as default,
|
|
22
|
+
n as header,
|
|
23
|
+
e as headerLines,
|
|
24
|
+
o as lineMain,
|
|
25
|
+
c as lineSecondary,
|
|
26
|
+
t as pageSkeleton,
|
|
27
|
+
h as photoBox,
|
|
28
|
+
_ as photoCircle,
|
|
29
|
+
i as tab,
|
|
30
|
+
s as tabsRow
|
|
31
|
+
};
|