@logora/debate 0.3.0 → 0.3.1

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.
@@ -0,0 +1 @@
1
+ ._container_gptfy_3{display:flex!important;flex-direction:column!important;padding:var(--space-unit, 1em)!important;height:100%;row-gap:var(--box-spacing, var(--space-unit, 1em));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))}._icon_gptfy_14{position:relative;width:30px;height:30px;min-width:30px;max-height:30px;border-radius:50%;background-color:var(--call-primary-color, #434343);margin-right:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important}._icon_gptfy_14 svg{position:absolute;transform:translate(-50%,-50%);top:50%;left:50%;fill:var(--text-light, white)}._title_gptfy_32{display:flex!important;align-items:center!important;font-size:var(--font-size-large, 20px);font-weight:var(--font-weight-bold, 700);color:var(--text-primary, #222222)}._point_gptfy_40{font-weight:var(--font-weight-bold, 700)}._point_gptfy_40 svg{display:inline-block;vertical-align:middle;margin-right:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important}._point_gptfy_40 ._pointNumber_gptfy_48{margin-right:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;margin-left:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important}._text_gptfy_53{height:100%;color:var(--text-primary, #222222)}._textSpacing_gptfy_58{margin-right:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important}._link_gptfy_62{display:flex!important;align-items:center!important;padding-right:var(--space-unit, 1em)!important;padding-left:var(--space-unit, 1em)!important;padding-top:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;padding-bottom:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;width:fit-content;border:1px solid;border-color:var(--text-primary, #222222);border-radius:var(--box-border-radius, 6px);cursor:pointer}._link_gptfy_62 svg{display:inline-block;vertical-align:middle;margin-left:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;transform:rotate(-90deg);fill:var(--text-primary, #222222)}._link_gptfy_62 a{color:var(--text-primary, #222222)!important;text-decoration:none}._link_gptfy_62:hover{opacity:.9}._moduleNotActive_gptfy_90{font-size:var(--font-size-extra-small, 14px);color:var(--text-secondary, #5F5F5F);font-style:italic}
@@ -1,4 +1,4 @@
1
- import { jsx as o, jsxs as l, Fragment as u } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as l, Fragment as h } from "react/jsx-runtime";
2
2
  import B from "classnames";
3
3
  import { useState as f, useEffect as re, useCallback as ie, Suspense as ae, lazy as le } from "react";
4
4
  import { useIntl as ne } from "react-intl";
@@ -8,29 +8,29 @@ import { useRichContent as ce } from "./useRichContent.js";
8
8
  import { useAuth as pe } from "../../auth/use_auth/useAuth.js";
9
9
  import { useConfig as me } from "../../data/config_provider/useConfig.js";
10
10
  import { useTranslatedContent as $ } from "../../translation/translated_content/useTranslatedContent.js";
11
- import { SourceListItem as he } from "../../source/source_list_item/SourceListItem.js";
12
- import { HashScroll as ue } from "../../tools/hash_scroll/HashScroll.js";
11
+ import { SourceListItem as ue } from "../../source/source_list_item/SourceListItem.js";
12
+ import { HashScroll as he } from "../../tools/hash_scroll/HashScroll.js";
13
13
  import { ContentHeader as fe } from "../../user_content/content_header/ContentHeader.js";
14
14
  import { Icon as D } from "../../icons/icon/Icon.js";
15
15
  import { ReadMore as ye } from "../../text/read_more/ReadMore.js";
16
- import { TranslationButton as _e } from "../../translation/translation_button/TranslationButton.js";
17
- import { ContentFooter as ge } from "../../user_content/content_footer/ContentFooter.js";
16
+ import { TranslationButton as ge } from "../../translation/translation_button/TranslationButton.js";
17
+ import { ContentFooter as _e } from "../../user_content/content_footer/ContentFooter.js";
18
18
  import { VoteButton as Me } from "../../vote/vote_button/VoteButton.js";
19
19
  import { VotePaginatedList as be } from "../../list/paginated_list/VotePaginatedList.js";
20
20
  import { UserContentSkeleton as ve } from "../../skeleton/user_content_skeleton/UserContentSkeleton.js";
21
21
  import { Button as Ce } from "../../action/button/Button.js";
22
- const Ie = le(() => import("../../input/argument_input/index.js")), Se = ({
22
+ const Ie = le(() => import("../../input/argument_input/index.js").then((e) => ({ default: e.ArgumentInput }))), Se = ({
23
23
  argument: e,
24
24
  argumentReplies: n,
25
25
  nestingLevel: y = 0,
26
26
  groupType: I,
27
27
  groupName: S,
28
- positions: _ = [],
28
+ positions: g = [],
29
29
  disableLinks: E = !1,
30
30
  parentArgument: d,
31
31
  flashParent: P,
32
32
  expandable: F,
33
- disabled: g = !1,
33
+ disabled: _ = !1,
34
34
  hideFooter: R = !1,
35
35
  hideReplies: T,
36
36
  vote: j,
@@ -43,7 +43,7 @@ const Ie = le(() => import("../../input/argument_input/index.js")), Se = ({
43
43
  replyRedirectUrl: q,
44
44
  hideContent: J = !1
45
45
  }) => {
46
- const i = ne(), { isLoggedIn: K, currentUser: c } = pe(), N = c?.moderation_status === "banned", r = me(), [p, M] = f(!1), [Q, w] = f(!1), [W, X] = f(!1), x = ce(e), [m, b] = f(), h = $(
46
+ const i = ne(), { isLoggedIn: K, currentUser: c } = pe(), N = c?.moderation_status === "banned", r = me(), [p, M] = f(!1), [Q, w] = f(!1), [W, X] = f(!1), x = ce(e), [m, b] = f(), u = $(
47
47
  e.content,
48
48
  e.language,
49
49
  "content",
@@ -53,7 +53,7 @@ const Ie = le(() => import("../../input/argument_input/index.js")), Se = ({
53
53
  e.position?.language,
54
54
  "name",
55
55
  e.position?.translation_entries
56
- ), v = `argument_${e.id}`, C = e.position && _?.map((t) => t.id).indexOf(e.position.id) + 1;
56
+ ), v = `argument_${e.id}`, C = e.position && g?.map((t) => t.id).indexOf(e.position.id) + 1;
57
57
  re(() => {
58
58
  n !== void 0 && se();
59
59
  }, [n]);
@@ -70,7 +70,7 @@ const Ie = le(() => import("../../input/argument_input/index.js")), Se = ({
70
70
  if (!m?.find((a) => a.id === t.id))
71
71
  return t;
72
72
  }, oe = ie((t, a) => /* @__PURE__ */ o(
73
- he,
73
+ ue,
74
74
  {
75
75
  publisher: t.publisher,
76
76
  url: t.source_url,
@@ -90,16 +90,16 @@ const Ie = le(() => import("../../input/argument_input/index.js")), Se = ({
90
90
  {
91
91
  ...t ? { argument: t } : {},
92
92
  nestingLevel: y + 1,
93
- disabled: g,
93
+ disabled: _,
94
94
  groupName: S,
95
95
  groupType: I,
96
- positions: _,
96
+ positions: g,
97
97
  argumentReplies: n,
98
98
  parentArgument: e,
99
99
  flashParent: (a) => ee(`argument_${a}`)
100
100
  }
101
101
  );
102
- return /* @__PURE__ */ l(ue, { elementId: v, onScroll: () => w(!0), children: [
102
+ return /* @__PURE__ */ l(he, { elementId: v, onScroll: () => w(!0), children: [
103
103
  /* @__PURE__ */ l(
104
104
  "div",
105
105
  {
@@ -136,7 +136,7 @@ const Ie = le(() => import("../../input/argument_input/index.js")), Se = ({
136
136
  }) }) : J ? /* @__PURE__ */ o("div", { className: s.argumentDeletedBody, children: i.formatMessage({
137
137
  id: "argument.argument.content_deleted",
138
138
  defaultMessage: "This content has been removed."
139
- }) }) : /* @__PURE__ */ l(u, { children: [
139
+ }) }) : /* @__PURE__ */ l(h, { children: [
140
140
  /* @__PURE__ */ l(
141
141
  "div",
142
142
  {
@@ -167,23 +167,23 @@ const Ie = le(() => import("../../input/argument_input/index.js")), Se = ({
167
167
  /* @__PURE__ */ o(
168
168
  ye,
169
169
  {
170
- content: /* @__PURE__ */ l(u, { children: [
170
+ content: /* @__PURE__ */ l(h, { children: [
171
171
  e.is_edited && /* @__PURE__ */ o("div", { className: s.edited, children: i.formatMessage({
172
172
  id: "argument.argument.updated",
173
173
  defaultMessage: "Updated argument"
174
174
  }) }),
175
- x && !h.isTranslated ? /* @__PURE__ */ o(
175
+ x && !u.isTranslated ? /* @__PURE__ */ o(
176
176
  "div",
177
177
  {
178
178
  className: s.argumentContent,
179
179
  dangerouslySetInnerHTML: { __html: x }
180
180
  }
181
- ) : /* @__PURE__ */ o("div", { className: s.argumentContent, children: h.translatedContent }),
182
- h.isTranslated && /* @__PURE__ */ o(
183
- _e,
181
+ ) : /* @__PURE__ */ o("div", { className: s.argumentContent, children: u.translatedContent }),
182
+ u.isTranslated && /* @__PURE__ */ o(
183
+ ge,
184
184
  {
185
185
  language: e.language,
186
- callback: () => h.toggleContent()
186
+ callback: () => u.toggleContent()
187
187
  }
188
188
  )
189
189
  ] }),
@@ -206,10 +206,10 @@ const Ie = le(() => import("../../input/argument_input/index.js")), Se = ({
206
206
  e.sources?.length > 0 && /* @__PURE__ */ o("div", { className: s.argumentSourcesList, children: e.sources.map(oe) })
207
207
  ] }),
208
208
  !R && !e.is_deleted && /* @__PURE__ */ o(
209
- ge,
209
+ _e,
210
210
  {
211
211
  resource: e,
212
- disabled: g || e.status === "rejected" || !K && r?.actions?.disableInputForVisitor === !0 || N,
212
+ disabled: _ || e.status === "rejected" || !K && r?.actions?.disableInputForVisitor === !0 || N,
213
213
  reportType: "Message",
214
214
  softDelete: r.actions?.softDelete,
215
215
  deleteType: "messages",
@@ -259,17 +259,17 @@ const Ie = le(() => import("../../input/argument_input/index.js")), Se = ({
259
259
  ]
260
260
  }
261
261
  ),
262
- !T && /* @__PURE__ */ l(u, { children: [
262
+ !T && /* @__PURE__ */ l(h, { children: [
263
263
  W && /* @__PURE__ */ o(ae, { fallback: null, children: /* @__PURE__ */ o(
264
264
  Ie,
265
265
  {
266
266
  groupId: e.group_id,
267
267
  groupType: I,
268
268
  groupName: S,
269
- positions: _,
269
+ positions: g,
270
270
  parentId: e.id,
271
271
  positionId: j?.position_id,
272
- disabled: g,
272
+ disabled: _,
273
273
  hideSourceAction: r?.actions?.disableUserSources || !1,
274
274
  onSubmit: (t) => {
275
275
  A(), b([t]), M(!0);
@@ -302,7 +302,7 @@ const Ie = le(() => import("../../input/argument_input/index.js")), Se = ({
302
302
  perPage: 5,
303
303
  display: "column",
304
304
  resourcePropName: "argument",
305
- emptyListComponent: /* @__PURE__ */ o(u, {}),
305
+ emptyListComponent: /* @__PURE__ */ o(h, {}),
306
306
  transformData: (t) => te(t),
307
307
  children: k(e)
308
308
  }
@@ -0,0 +1,42 @@
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import "react";
3
+ import { useIntl as d, FormattedMessage as h } from "react-intl";
4
+ import i from "./InformationBox.module.scss.js";
5
+ import { Link as p } from "../../action/link/Link.js";
6
+ import { Icon as f } from "../../icons/icon/Icon.js";
7
+ const M = ({
8
+ icon: o,
9
+ title: t,
10
+ points: a,
11
+ description: s,
12
+ textLink: r,
13
+ link: l,
14
+ isActive: c = !1
15
+ }) => {
16
+ const m = d();
17
+ return /* @__PURE__ */ n("div", { className: i.container, children: [
18
+ /* @__PURE__ */ n("div", { className: i.title, children: [
19
+ o && /* @__PURE__ */ e("div", { className: i.icon, "data-testid": "icon", children: o }),
20
+ /* @__PURE__ */ e("span", { children: t })
21
+ ] }),
22
+ /* @__PURE__ */ e("div", { className: i.point, children: /* @__PURE__ */ e("span", { className: i.pointNumber, children: /* @__PURE__ */ e(
23
+ h,
24
+ {
25
+ id: "information.information_box.eloquence_point",
26
+ values: { count: a },
27
+ defaultMessage: "From {count} eloquence points"
28
+ }
29
+ ) }) }),
30
+ /* @__PURE__ */ e("div", { className: i.text, children: /* @__PURE__ */ e("span", { children: s }) }),
31
+ c ? /* @__PURE__ */ e("div", { className: i.link, children: /* @__PURE__ */ n(p, { to: l, children: [
32
+ /* @__PURE__ */ e("span", { children: r }),
33
+ /* @__PURE__ */ e(f, { name: "lightArrow", width: 10, height: 10 })
34
+ ] }) }) : /* @__PURE__ */ e("span", { className: i.moduleNotActive, children: m.formatMessage({
35
+ id: "information.information_box.module_not_active",
36
+ defaultMessage: "Module not available on this debate space"
37
+ }) })
38
+ ] });
39
+ };
40
+ export {
41
+ M as InformationBox
42
+ };
@@ -0,0 +1,21 @@
1
+ import '../../../assets/components/information/information_box/InformationBox.module-B_MiEPn7.css';const t = "_container_gptfy_3", o = "_icon_gptfy_14", n = "_title_gptfy_32", _ = "_point_gptfy_40", e = "_pointNumber_gptfy_48", i = "_text_gptfy_53", c = "_link_gptfy_62", p = "_moduleNotActive_gptfy_90", s = {
2
+ container: t,
3
+ icon: o,
4
+ title: n,
5
+ point: _,
6
+ pointNumber: e,
7
+ text: i,
8
+ link: c,
9
+ moduleNotActive: p
10
+ };
11
+ export {
12
+ t as container,
13
+ s as default,
14
+ o as icon,
15
+ c as link,
16
+ p as moduleNotActive,
17
+ _ as point,
18
+ e as pointNumber,
19
+ i as text,
20
+ n as title
21
+ };
@@ -1,4 +1,4 @@
1
- import { ArgumentInput as r } from "./ArgumentInput.js";
1
+ import { ArgumentInput as t } from "./ArgumentInput.js";
2
2
  export {
3
- r as default
3
+ t as ArgumentInput
4
4
  };