@logora/debate 0.4.36 → 0.4.37

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.
@@ -16,27 +16,27 @@ import { Link as d } from "../../action/link/Link.js";
16
16
  import { Icon as c } from "../../icons/icon/Icon.js";
17
17
  import { Avatar as A } from "../../user/avatar/Avatar.js";
18
18
  const Q = () => {
19
- const { hideModal: r } = C(), s = I(), o = M(), { pathname: u } = _(), { isLoggedIn: h, currentUser: m } = S(), p = b(), g = k?.() || {}, { isMobile: f, elementWidth: v } = g, L = f && v <= 576 && !s.isDrawer, e = (N) => !!x(N, u), w = () => {
19
+ const { hideModal: r } = C(), s = I(), e = M(), { pathname: u } = _(), { isLoggedIn: h, currentUser: m } = S(), p = b(), g = k?.() || {}, { isMobile: f, elementWidth: v } = g, L = f && v <= 576 && !s.isDrawer, o = (N) => !!x(N, u), w = () => {
20
20
  p({});
21
21
  };
22
22
  return /* @__PURE__ */ n(U, { fullScreen: !s.isDrawer, showCloseButton: !0, children: [
23
23
  /* @__PURE__ */ n("div", { className: t.modalContainer, children: [
24
24
  /* @__PURE__ */ i("div", { className: t.modalTitle, children: /* @__PURE__ */ i(l, { id: "info.menu", defaultMessage: "Navigation" }) }),
25
25
  /* @__PURE__ */ n("div", { className: t.navigationContainer, children: [
26
- /* @__PURE__ */ i(
26
+ s?.layout?.hideDebatesLink !== !0 && /* @__PURE__ */ i(
27
27
  "div",
28
28
  {
29
29
  className: a(t.modalItem, {
30
- [t.active]: e(o.indexLocation.path) || e(o.debateShowLocation.path) || e(o.rootLocation.path || "/")
30
+ [t.active]: o(e.indexLocation.path) || o(e.debateShowLocation.path) || o(e.rootLocation.path || "/")
31
31
  }),
32
32
  onClick: r,
33
33
  children: /* @__PURE__ */ n(
34
34
  d,
35
35
  {
36
36
  className: a(t.itemContainer, {
37
- [t.activeItem]: e(o.indexLocation.path) || e(o.debateShowLocation.path) || e(o.rootLocation.path || "/")
37
+ [t.activeItem]: o(e.indexLocation.path) || o(e.debateShowLocation.path) || o(e.rootLocation.path || "/")
38
38
  }),
39
- to: o.indexLocation.toUrl(),
39
+ to: e.indexLocation.toUrl(),
40
40
  "data-tid": "view_index",
41
41
  children: [
42
42
  /* @__PURE__ */ i(c, { name: "chat", height: 24, width: 24 }),
@@ -56,16 +56,16 @@ const Q = () => {
56
56
  "div",
57
57
  {
58
58
  className: a(t.modalItem, {
59
- [t.active]: e(o.consultationIndexLocation.path) || e(o.consultationShowLocation.path)
59
+ [t.active]: o(e.consultationIndexLocation.path) || o(e.consultationShowLocation.path)
60
60
  }),
61
61
  onClick: r,
62
62
  children: /* @__PURE__ */ n(
63
63
  d,
64
64
  {
65
65
  className: a(t.itemContainer, {
66
- [t.activeItem]: e(o.consultationIndexLocation.path) || e(o.consultationShowLocation.path)
66
+ [t.activeItem]: o(e.consultationIndexLocation.path) || o(e.consultationShowLocation.path)
67
67
  }),
68
- to: o.consultationIndexLocation.toUrl(),
68
+ to: e.consultationIndexLocation.toUrl(),
69
69
  "data-tid": "view_consultation",
70
70
  children: [
71
71
  /* @__PURE__ */ i(c, { name: "community", height: 24, width: 24 }),
@@ -85,16 +85,16 @@ const Q = () => {
85
85
  "div",
86
86
  {
87
87
  className: a(t.modalItem, {
88
- [t.active]: e(o.suggestionLocation.path)
88
+ [t.active]: o(e.suggestionLocation.path)
89
89
  }),
90
90
  onClick: r,
91
91
  children: /* @__PURE__ */ n(
92
92
  d,
93
93
  {
94
94
  className: a(t.itemContainer, {
95
- [t.activeItem]: e(o.suggestionLocation.path)
95
+ [t.activeItem]: o(e.suggestionLocation.path)
96
96
  }),
97
- to: o.suggestionLocation.toUrl(),
97
+ to: e.suggestionLocation.toUrl(),
98
98
  "data-tid": "view_suggestions",
99
99
  children: [
100
100
  /* @__PURE__ */ i(c, { name: "suggestion", height: 24, width: 24 }),
@@ -114,16 +114,16 @@ const Q = () => {
114
114
  "div",
115
115
  {
116
116
  className: a(t.modalItem, {
117
- [t.active]: e(o.userShowLocation.path) || e(o.userEditLocation.path)
117
+ [t.active]: o(e.userShowLocation.path) || o(e.userEditLocation.path)
118
118
  }),
119
119
  onClick: r,
120
120
  children: /* @__PURE__ */ i(
121
121
  d,
122
122
  {
123
123
  className: a(t.itemContainer, {
124
- [t.activeItem]: e(o.userShowLocation.path) || e(o.userEditLocation.path)
124
+ [t.activeItem]: o(e.userShowLocation.path) || o(e.userEditLocation.path)
125
125
  }),
126
- to: o.userShowLocation.toUrl({
126
+ to: e.userShowLocation.toUrl({
127
127
  userSlug: m.hash_id
128
128
  }),
129
129
  "data-tid": "view_user_profile",
@@ -23,7 +23,7 @@ const R = ({
23
23
  language: u = null,
24
24
  languageDialect: h = null
25
25
  }) => {
26
- const t = B(), f = _(), L = k()?.actions?.disableProfileLinks === !0, p = new Date(b) > Date.now();
26
+ const t = B(), f = _(), L = k()?.layout?.disableProfileLinks === !0, p = new Date(b) > Date.now();
27
27
  return /* @__PURE__ */ r("div", { className: N(a.authorBox, "author-box"), children: [
28
28
  !s || l || L || o ? /* @__PURE__ */ e(
29
29
  g,
@@ -1,4 +1,4 @@
1
- import { jsxs as o, jsx as a } from "react/jsx-runtime";
1
+ import { jsxs as i, jsx as a } from "react/jsx-runtime";
2
2
  import c from "classnames";
3
3
  import "react";
4
4
  import { useIntl as d, FormattedMessage as r } from "react-intl";
@@ -6,10 +6,10 @@ import s from "./UserBox.module.scss.js";
6
6
  import { useRoutes as m } from "../../data/config_provider/useRoutes.js";
7
7
  import { useConfig as _ } from "../../data/config_provider/useConfig.js";
8
8
  import { Avatar as l } from "../avatar/Avatar.js";
9
- import { Link as i } from "../../action/link/Link.js";
9
+ import { Link as o } from "../../action/link/Link.js";
10
10
  const B = ({ user: e }) => {
11
- const n = d(), t = m(), u = _()?.actions?.disableProfileLinks === !0;
12
- return /* @__PURE__ */ o("div", { className: c(s.userBox, "author-box"), children: [
11
+ const n = d(), t = m(), u = _()?.layout?.disableProfileLinks === !0;
12
+ return /* @__PURE__ */ i("div", { className: c(s.userBox, "author-box"), children: [
13
13
  /* @__PURE__ */ a("div", { className: s.userBoxHeader, children: u ? /* @__PURE__ */ a(
14
14
  l,
15
15
  {
@@ -20,7 +20,7 @@ const B = ({ user: e }) => {
20
20
  size: 60
21
21
  }
22
22
  ) : /* @__PURE__ */ a(
23
- i,
23
+ o,
24
24
  {
25
25
  to: t.userShowLocation.toUrl({ userSlug: e.hash_id }),
26
26
  "aria-label": n.formatMessage({
@@ -39,8 +39,8 @@ const B = ({ user: e }) => {
39
39
  )
40
40
  }
41
41
  ) }),
42
- /* @__PURE__ */ o("div", { className: s.userBoxDescription, children: [
43
- /* @__PURE__ */ a(i, { to: t.userShowLocation.toUrl({ userSlug: e.hash_id }), children: /* @__PURE__ */ a(
42
+ /* @__PURE__ */ i("div", { className: s.userBoxDescription, children: [
43
+ /* @__PURE__ */ a(o, { to: t.userShowLocation.toUrl({ userSlug: e.hash_id }), children: /* @__PURE__ */ a(
44
44
  "div",
45
45
  {
46
46
  "data-tid": "action_view_user_name",
@@ -50,7 +50,7 @@ const B = ({ user: e }) => {
50
50
  }
51
51
  ) }),
52
52
  e.role === "contributor" && /* @__PURE__ */ a(
53
- i,
53
+ o,
54
54
  {
55
55
  to: t.userShowLocation.toUrl({ userSlug: e.hash_id }),
56
56
  hash: "activity",
@@ -64,7 +64,7 @@ const B = ({ user: e }) => {
64
64
  ) }) })
65
65
  }
66
66
  ),
67
- /* @__PURE__ */ a(i, { to: t.userShowLocation.toUrl({ userSlug: e.hash_id }), children: /* @__PURE__ */ o("div", { className: s.userBoxStats, children: [
67
+ /* @__PURE__ */ a(o, { to: t.userShowLocation.toUrl({ userSlug: e.hash_id }), children: /* @__PURE__ */ i("div", { className: s.userBoxStats, children: [
68
68
  /* @__PURE__ */ a("div", { className: s.userDebates, children: /* @__PURE__ */ a(
69
69
  r,
70
70
  {
@@ -8,7 +8,7 @@ import { useConfig as d } from "../../data/config_provider/useConfig.js";
8
8
  import { Avatar as l } from "../avatar/Avatar.js";
9
9
  import { Link as n } from "../../action/link/Link.js";
10
10
  const N = ({ userName: a, avatarUrl: t, userSlug: e }) => {
11
- const i = f(), s = h(), m = d()?.actions?.disableProfileLinks === !0;
11
+ const i = f(), s = h(), m = d()?.layout?.disableProfileLinks === !0;
12
12
  return /* @__PURE__ */ c("div", { className: u(r.authorContainer, "author-box"), children: [
13
13
  m ? /* @__PURE__ */ o("div", { className: r.authorLink, children: /* @__PURE__ */ o(l, { avatarUrl: t, userName: a, size: 25 }) }) : /* @__PURE__ */ o(
14
14
  n,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.4.36",
3
+ "version": "0.4.37",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "description": "Design system of @Logora made with React",