@logora/debate 0.4.76 → 0.4.78
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/vote/vote_button/VoteButton.module-_-1B5PIK.css +1 -0
- package/dist/components/auth/signup_form/SignupForm.js +12 -12
- package/dist/components/auth/social_auth_form/SocialAuthForm.js +17 -17
- package/dist/components/auth/sso_form/SSOForm.js +14 -14
- package/dist/components/hooks/use_session_storage_state/useSessionStorageState.js +25 -0
- package/dist/components/input/argument_input/ArgumentInput.js +15 -15
- package/dist/components/input/text_editor/plugins/AutoSavePlugin.js +23 -25
- package/dist/components/input/text_editor/plugins/ResetPlugin.js +19 -18
- package/dist/components/intl/intl_provider/IntlProvider.js +10 -10
- package/dist/components/suggestion/suggestion_input/SuggestionInput.js +11 -11
- package/dist/components/vote/vote_box/VoteBox.js +1 -1
- package/dist/components/vote/vote_button/VoteButton.module.scss.js +6 -6
- package/dist/index.js +10 -8
- package/package.json +1 -3
- package/dist/assets/components/vote/vote_button/VoteButton.module-DqD79xv_.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._voteButton_shygl_3{background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}._voteButton_shygl_3:focus:not(:focus-visible){outline:none;box-shadow:none}._active_shygl_22{font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);color:var(--call-primary-color, #434343)}._active_shygl_22 svg{fill:var(--call-primary-color, #434343);fill-rule:evenodd}._disabled_shygl_32{cursor:not-allowed;opacity:.6}._disabled_shygl_32 svg{fill:var(--text-secondary, #5F5F5F);fill-rule:evenodd}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as e, Fragment as E, jsxs as G } from "react/jsx-runtime";
|
|
2
|
-
import P from "
|
|
3
|
-
import x from "classnames";
|
|
2
|
+
import P from "classnames";
|
|
4
3
|
import { useState as i } from "react";
|
|
5
|
-
import { useIntl as
|
|
4
|
+
import { useIntl as x } from "react-intl";
|
|
6
5
|
import r from "./SignupForm.module.scss.js";
|
|
7
|
-
import {
|
|
6
|
+
import { useSessionStorageState as F } from "../../hooks/use_session_storage_state/useSessionStorageState.js";
|
|
8
7
|
import { TextInput as m } from "../../input/text_input/TextInput.js";
|
|
9
|
-
import { Toggle as
|
|
10
|
-
import { Button as
|
|
8
|
+
import { Toggle as I } from "../../input/toggle/Toggle.js";
|
|
9
|
+
import { Button as k } from "../../action/button/Button.js";
|
|
10
|
+
import { EMAIL_CONSENT_STORAGE_KEY as q } from "../use_auth/useAuthActions.js";
|
|
11
11
|
const U = ({ onSubmit: n, providerName: f, error: t = !1 }) => {
|
|
12
|
-
const [p, g] = i(""), [c, _] = i(""), [h, M] = i(""), [d, w] = i(""), [u, b] = i(""), [l, v] =
|
|
13
|
-
|
|
12
|
+
const [p, g] = i(""), [c, _] = i(""), [h, M] = i(""), [d, w] = i(""), [u, b] = i(""), [l, v] = F(
|
|
13
|
+
q,
|
|
14
14
|
!1
|
|
15
|
-
), [o, N] = i(""), a =
|
|
15
|
+
), [o, N] = i(""), a = x(), C = (s) => {
|
|
16
16
|
s.preventDefault(), S(d, u) && n && n(
|
|
17
17
|
c,
|
|
18
18
|
h,
|
|
@@ -128,7 +128,7 @@ const U = ({ onSubmit: n, providerName: f, error: t = !1 }) => {
|
|
|
128
128
|
}
|
|
129
129
|
) }),
|
|
130
130
|
/* @__PURE__ */ e("div", { className: r.formGroup, children: /* @__PURE__ */ e(
|
|
131
|
-
|
|
131
|
+
I,
|
|
132
132
|
{
|
|
133
133
|
type: "checkbox",
|
|
134
134
|
name: "accepts_provider_email",
|
|
@@ -145,8 +145,8 @@ const U = ({ onSubmit: n, providerName: f, error: t = !1 }) => {
|
|
|
145
145
|
"data-testid": "accepts-email-input"
|
|
146
146
|
}
|
|
147
147
|
) }),
|
|
148
|
-
/* @__PURE__ */ e("div", { className:
|
|
149
|
-
|
|
148
|
+
/* @__PURE__ */ e("div", { className: P(r.formGroup, r.formSubmitGroup), children: /* @__PURE__ */ e(
|
|
149
|
+
k,
|
|
150
150
|
{
|
|
151
151
|
className: r.formSubmitButton,
|
|
152
152
|
role: "button",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r, Fragment as c } from "react/jsx-runtime";
|
|
2
|
-
import B from "@rooks/use-sessionstorage-state";
|
|
3
2
|
import { useState as N } from "react";
|
|
4
|
-
import { useIntl as
|
|
3
|
+
import { useIntl as B, FormattedMessage as O } from "react-intl";
|
|
5
4
|
import a from "./SocialAuthForm.module.scss.js";
|
|
6
|
-
import {
|
|
7
|
-
import { FacebookLoginButton as
|
|
8
|
-
import { GoogleLoginButton as
|
|
5
|
+
import { useSessionStorageState as P } from "../../hooks/use_session_storage_state/useSessionStorageState.js";
|
|
6
|
+
import { FacebookLoginButton as E } from "../facebook_login_button/FacebookLoginButton.js";
|
|
7
|
+
import { GoogleLoginButton as j } from "../google_login_button/GoogleLoginButton.js";
|
|
9
8
|
import { Icon as y } from "../../icons/icon/Icon.js";
|
|
10
|
-
import { Toggle as
|
|
11
|
-
import { SignupForm as
|
|
12
|
-
import { LoginForm as
|
|
9
|
+
import { Toggle as z } from "../../input/toggle/Toggle.js";
|
|
10
|
+
import { SignupForm as D } from "../signup_form/SignupForm.js";
|
|
11
|
+
import { LoginForm as K } from "../login_form/LoginForm.js";
|
|
12
|
+
import { EMAIL_CONSENT_STORAGE_KEY as R } from "../use_auth/useAuthActions.js";
|
|
13
13
|
const te = ({
|
|
14
14
|
lastStep: s,
|
|
15
15
|
providerName: l,
|
|
@@ -25,10 +25,10 @@ const te = ({
|
|
|
25
25
|
}) => {
|
|
26
26
|
const [w, g] = N(
|
|
27
27
|
!(s === "LOGIN" || s === "SIGNUP")
|
|
28
|
-
), [t, I] = N(s !== "SIGNUP"), [f, F] =
|
|
29
|
-
|
|
28
|
+
), [t, I] = N(s !== "SIGNUP"), [f, F] = P(
|
|
29
|
+
R,
|
|
30
30
|
!1
|
|
31
|
-
), o =
|
|
31
|
+
), o = B(), G = (i, n, M, A, Y, v) => {
|
|
32
32
|
const T = {
|
|
33
33
|
uid: typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "0000-0000-0000-0000",
|
|
34
34
|
first_name: i,
|
|
@@ -47,7 +47,7 @@ const te = ({
|
|
|
47
47
|
}, _ = (i, n) => {
|
|
48
48
|
d(i, n, "SOCIAL");
|
|
49
49
|
}, x = () => /* @__PURE__ */ e("div", { className: a.formFooterTerms, children: /* @__PURE__ */ e(
|
|
50
|
-
|
|
50
|
+
O,
|
|
51
51
|
{
|
|
52
52
|
id: "auth.social_auth_form.terms_text",
|
|
53
53
|
values: {
|
|
@@ -112,7 +112,7 @@ const te = ({
|
|
|
112
112
|
defaultMessage: "Create your account in one click to vote and start debating !"
|
|
113
113
|
}) }),
|
|
114
114
|
/* @__PURE__ */ e(
|
|
115
|
-
|
|
115
|
+
E,
|
|
116
116
|
{
|
|
117
117
|
text: o.formatMessage({
|
|
118
118
|
id: "auth.social_auth_form.facebook_login",
|
|
@@ -124,7 +124,7 @@ const te = ({
|
|
|
124
124
|
}
|
|
125
125
|
),
|
|
126
126
|
/* @__PURE__ */ e(
|
|
127
|
-
|
|
127
|
+
j,
|
|
128
128
|
{
|
|
129
129
|
text: o.formatMessage({
|
|
130
130
|
id: "auth.social_auth_form.google_login",
|
|
@@ -150,7 +150,7 @@ const te = ({
|
|
|
150
150
|
}
|
|
151
151
|
),
|
|
152
152
|
!t && /* @__PURE__ */ e("div", { className: a.checkboxContainer, children: /* @__PURE__ */ e(
|
|
153
|
-
|
|
153
|
+
z,
|
|
154
154
|
{
|
|
155
155
|
type: "checkbox",
|
|
156
156
|
name: "accepts_emails",
|
|
@@ -195,7 +195,7 @@ const te = ({
|
|
|
195
195
|
}) })
|
|
196
196
|
] }),
|
|
197
197
|
t ? /* @__PURE__ */ e("div", { className: a.loginFormContainer, children: /* @__PURE__ */ e(
|
|
198
|
-
|
|
198
|
+
K,
|
|
199
199
|
{
|
|
200
200
|
onSubmit: U,
|
|
201
201
|
error: m && s === "LOGIN",
|
|
@@ -210,7 +210,7 @@ const te = ({
|
|
|
210
210
|
{ provider: l }
|
|
211
211
|
) }),
|
|
212
212
|
/* @__PURE__ */ e(
|
|
213
|
-
|
|
213
|
+
D,
|
|
214
214
|
{
|
|
215
215
|
onSubmit: G,
|
|
216
216
|
providerName: l,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e, Fragment as m } from "react/jsx-runtime";
|
|
2
|
-
import G from "
|
|
3
|
-
import D from "classnames";
|
|
2
|
+
import G from "classnames";
|
|
4
3
|
import "react";
|
|
5
|
-
import { useIntl as
|
|
6
|
-
import { useLocation as
|
|
4
|
+
import { useIntl as D, FormattedMessage as w } from "react-intl";
|
|
5
|
+
import { useLocation as Y } from "react-router";
|
|
7
6
|
import a from "./SSOForm.module.scss.js";
|
|
8
|
-
import {
|
|
9
|
-
import { Icon as
|
|
10
|
-
import { Button as
|
|
11
|
-
import { Toggle as
|
|
7
|
+
import { useSessionStorageState as z } from "../../hooks/use_session_storage_state/useSessionStorageState.js";
|
|
8
|
+
import { Icon as H } from "../../icons/icon/Icon.js";
|
|
9
|
+
import { Button as K } from "../../action/button/Button.js";
|
|
10
|
+
import { Toggle as V } from "../../input/toggle/Toggle.js";
|
|
11
|
+
import { EMAIL_CONSENT_STORAGE_KEY as W } from "../use_auth/useAuthActions.js";
|
|
12
12
|
import { utf8ToBase64url as $ } from "../use_auth/base64.js";
|
|
13
13
|
const ie = ({
|
|
14
14
|
authType: v,
|
|
@@ -29,8 +29,8 @@ const ie = ({
|
|
|
29
29
|
hideBelowButton: x = !1,
|
|
30
30
|
error: R = !1
|
|
31
31
|
}) => {
|
|
32
|
-
const [h, T] = g ?
|
|
33
|
-
}], o =
|
|
32
|
+
const [h, T] = g ? z(W, !1) : [!1, () => {
|
|
33
|
+
}], o = D(), d = Y(), A = (t) => {
|
|
34
34
|
if (typeof window < "u") {
|
|
35
35
|
const s = t === "CURRENT_LOCATION" ? window.location : t, i = new URL(s, window.location.origin), l = i.searchParams, E = new URLSearchParams(d.search);
|
|
36
36
|
l.has("code") && l.delete("code"), f && l.append(f, window.location.toString());
|
|
@@ -73,7 +73,7 @@ const ie = ({
|
|
|
73
73
|
alt: `Logo ${c}`
|
|
74
74
|
}
|
|
75
75
|
) : /* @__PURE__ */ e(
|
|
76
|
-
|
|
76
|
+
H,
|
|
77
77
|
{
|
|
78
78
|
name: "next",
|
|
79
79
|
"aria-hidden": "true",
|
|
@@ -100,7 +100,7 @@ const ie = ({
|
|
|
100
100
|
] }),
|
|
101
101
|
U ? null : /* @__PURE__ */ n(m, { children: [
|
|
102
102
|
/* @__PURE__ */ e(
|
|
103
|
-
|
|
103
|
+
K,
|
|
104
104
|
{
|
|
105
105
|
"data-tid": "link_signup",
|
|
106
106
|
"data-testid": "signup-button",
|
|
@@ -135,8 +135,8 @@ const ie = ({
|
|
|
135
135
|
}
|
|
136
136
|
)
|
|
137
137
|
] }),
|
|
138
|
-
g ? /* @__PURE__ */ e("div", { className:
|
|
139
|
-
|
|
138
|
+
g ? /* @__PURE__ */ e("div", { className: G(a.switchBox), children: /* @__PURE__ */ e(
|
|
139
|
+
V,
|
|
140
140
|
{
|
|
141
141
|
type: "checkbox",
|
|
142
142
|
name: "accepts_provider_email",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useState as n, useEffect as a } from "react";
|
|
2
|
+
const c = (t, s) => {
|
|
3
|
+
try {
|
|
4
|
+
const e = JSON.parse(sessionStorage.getItem(t));
|
|
5
|
+
return e === null ? s : e;
|
|
6
|
+
} catch {
|
|
7
|
+
return s;
|
|
8
|
+
}
|
|
9
|
+
}, S = (t, s) => {
|
|
10
|
+
const [e, r] = n(() => c(t, s));
|
|
11
|
+
return a(() => {
|
|
12
|
+
try {
|
|
13
|
+
sessionStorage.setItem(t, JSON.stringify(e));
|
|
14
|
+
} catch {
|
|
15
|
+
}
|
|
16
|
+
}, [e]), [e, r, () => {
|
|
17
|
+
try {
|
|
18
|
+
sessionStorage.removeItem(t);
|
|
19
|
+
} catch {
|
|
20
|
+
}
|
|
21
|
+
}];
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
S as useSessionStorageState
|
|
25
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsxs as C, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import Ye from "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useLocation as Ke } from "react-router";
|
|
2
|
+
import { useRef as Ye, useState as u, useEffect as p, Suspense as je, lazy as ze } from "react";
|
|
3
|
+
import { useIntl as Oe, FormattedMessage as he } from "react-intl";
|
|
4
|
+
import { useLocation as Je } from "react-router";
|
|
6
5
|
import x from "classnames";
|
|
7
6
|
import n from "./ArgumentInput.module.scss.js";
|
|
8
|
-
import { useDataProvider as
|
|
9
|
-
import { useList as
|
|
10
|
-
import { useConfig as
|
|
11
|
-
import { useInput as
|
|
12
|
-
import { useAuth as
|
|
13
|
-
import { useFormValidation as
|
|
14
|
-
import { useResponsive as
|
|
7
|
+
import { useDataProvider as Ke } from "../../data/data_provider/useDataProvider.js";
|
|
8
|
+
import { useList as Re } from "../../list/list_provider/useList.js";
|
|
9
|
+
import { useConfig as Ge } from "../../data/config_provider/useConfig.js";
|
|
10
|
+
import { useInput as He } from "../input_provider/useInput.js";
|
|
11
|
+
import { useAuth as Qe } from "../../auth/use_auth/useAuth.js";
|
|
12
|
+
import { useFormValidation as Xe } from "../../forms/use_form_validation/useFormValidation.js";
|
|
13
|
+
import { useResponsive as Ze } from "../../hooks/use_responsive/useResponsive.js";
|
|
14
|
+
import { useSessionStorageState as et } from "../../hooks/use_session_storage_state/useSessionStorageState.js";
|
|
15
15
|
import { useAuthRequired as tt } from "../../hooks/use_auth_required/useAuthRequired.js";
|
|
16
16
|
import { useModal as nt } from "../../dialog/modal/useModal.js";
|
|
17
17
|
import { useToast as at } from "../../dialog/toast_provider/useToast.js";
|
|
@@ -20,7 +20,7 @@ import { Avatar as it } from "../../user/avatar/Avatar.js";
|
|
|
20
20
|
import { AuthorBox as ot } from "../../user/author_box/AuthorBox.js";
|
|
21
21
|
import { TextEditor as rt } from "../text_editor/TextEditor.js";
|
|
22
22
|
import { Icon as ut } from "../../icons/icon/Icon.js";
|
|
23
|
-
const dt =
|
|
23
|
+
const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ default: N.SideModal }))), Pt = ({
|
|
24
24
|
argumentListId: N,
|
|
25
25
|
avatarSize: pe = 48,
|
|
26
26
|
disabled: J = !1,
|
|
@@ -44,13 +44,13 @@ const dt = Oe(() => import("../../modal/side_modal/index.js").then((N) => ({ def
|
|
|
44
44
|
disableAutoActivate: we = !1,
|
|
45
45
|
autoFocus: Q = !1
|
|
46
46
|
}) => {
|
|
47
|
-
const r =
|
|
47
|
+
const r = Oe(), X = Ke(), L = Re(), v = Ge(), {
|
|
48
48
|
focus: Z,
|
|
49
49
|
setFocus: ee,
|
|
50
50
|
inputContent: B,
|
|
51
51
|
setInputContent: te,
|
|
52
52
|
setInputRichContent: Se
|
|
53
|
-
} =
|
|
53
|
+
} = He(), { isLoggedIn: S, currentUser: d } = Qe(), { errors: E, validate: $ } = Xe(), { isMobile: m } = Ze(), Ie = Je(), ne = Ye(null), [V, k] = u([]), [q, D] = u(""), [ae, U] = u(null), [l, b] = u(null), [se, ie] = u(null), [oe, re] = u(!1), [I, ue] = u(!1), [A, de] = u({}), [xe, W] = u(!1), [Ne, Te] = u(0), [f, Le] = et(
|
|
54
54
|
"userSide",
|
|
55
55
|
{}
|
|
56
56
|
), [g, ye] = u(
|
|
@@ -91,7 +91,7 @@ const dt = Oe(() => import("../../modal/side_modal/index.js").then((N) => ({ def
|
|
|
91
91
|
b(e), ge(e);
|
|
92
92
|
}, Ee = () => {
|
|
93
93
|
Fe(
|
|
94
|
-
/* @__PURE__ */ s(
|
|
94
|
+
/* @__PURE__ */ s(je, { fallback: null, children: /* @__PURE__ */ s(
|
|
95
95
|
dt,
|
|
96
96
|
{
|
|
97
97
|
modalTitle: r.formatMessage({
|
|
@@ -1,34 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useLexicalComposerContext as
|
|
3
|
-
import { OnChangePlugin as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (t && Object.keys(t).length !== 0) {
|
|
14
|
-
const e = o.parseEditorState(t.editorState);
|
|
15
|
-
o.setEditorState(e), n?.();
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useLexicalComposerContext as c } from "@lexical/react/LexicalComposerContext";
|
|
3
|
+
import { OnChangePlugin as s } from "@lexical/react/LexicalOnChangePlugin";
|
|
4
|
+
import { useEffect as m } from "react";
|
|
5
|
+
import { useDebouncedCallback as g } from "use-debounce";
|
|
6
|
+
const C = ({ storageUid: r, onSetContent: n }) => {
|
|
7
|
+
const [e] = c(), o = `TextEditor:content_${r}`;
|
|
8
|
+
m(() => {
|
|
9
|
+
try {
|
|
10
|
+
const t = JSON.parse(localStorage.getItem(o));
|
|
11
|
+
t?.editorState && (e.setEditorState(e.parseEditorState(t.editorState)), n?.());
|
|
12
|
+
} catch {
|
|
16
13
|
}
|
|
17
14
|
}, []);
|
|
18
|
-
const
|
|
19
|
-
(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
15
|
+
const a = g(
|
|
16
|
+
(t) => {
|
|
17
|
+
try {
|
|
18
|
+
localStorage.setItem(
|
|
19
|
+
o,
|
|
20
|
+
JSON.stringify({ editorState: JSON.stringify(t) })
|
|
21
|
+
);
|
|
22
|
+
} catch {
|
|
23
|
+
}
|
|
26
24
|
},
|
|
27
25
|
1e3,
|
|
28
26
|
!1
|
|
29
27
|
);
|
|
30
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ i(s, { onChange: a, ignoreSelectionChange: !0 });
|
|
31
29
|
};
|
|
32
30
|
export {
|
|
33
|
-
|
|
31
|
+
C as AutoSavePlugin
|
|
34
32
|
};
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { useLexicalComposerContext as
|
|
2
|
-
import l from "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const f = t !== void 0 && t !== o.current;
|
|
13
|
-
o.current = t, (f || e && !a) && p.update(() => {
|
|
14
|
-
d("skip-dom-selection");
|
|
15
|
-
const r = R(), s = g();
|
|
1
|
+
import { useLexicalComposerContext as f } from "@lexical/react/LexicalComposerContext";
|
|
2
|
+
import { $addUpdateTag as l, $getRoot as u, $createParagraphNode as d } from "lexical";
|
|
3
|
+
import { useRef as R, useEffect as g } from "react";
|
|
4
|
+
import { useInput as h } from "../../input_provider/useInput.js";
|
|
5
|
+
const E = ({ storageUid: a, resetSignal: t, isReply: n = !1 }) => {
|
|
6
|
+
const [p] = f(), { reset: e, setReset: i } = h(), o = R(t);
|
|
7
|
+
return g(() => {
|
|
8
|
+
const m = t !== void 0 && t !== o.current;
|
|
9
|
+
o.current = t, (m || e && !n) && p.update(() => {
|
|
10
|
+
l("skip-dom-selection");
|
|
11
|
+
const r = u(), s = d();
|
|
16
12
|
r.clear(), r.append(s);
|
|
17
|
-
const
|
|
18
|
-
|
|
13
|
+
const c = s.selectStart();
|
|
14
|
+
c.format = 0, c.style = "";
|
|
15
|
+
try {
|
|
16
|
+
localStorage.removeItem(`TextEditor:content_${a}`);
|
|
17
|
+
} catch {
|
|
18
|
+
}
|
|
19
|
+
e && i(!1);
|
|
19
20
|
});
|
|
20
21
|
}, [t, e]), null;
|
|
21
22
|
};
|
|
22
23
|
export {
|
|
23
|
-
|
|
24
|
+
E as ResetPlugin
|
|
24
25
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as f, Fragment as I } from "react/jsx-runtime";
|
|
2
|
-
import L from "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { flatten as L } from "flat";
|
|
3
|
+
import { useState as u, useEffect as O } from "react";
|
|
4
|
+
import { IntlProvider as P } from "react-intl";
|
|
5
|
+
import { IntlContext as b } from "./IntlContext.js";
|
|
6
|
+
import { useSessionStorageState as y } from "../../hooks/use_session_storage_state/useSessionStorageState.js";
|
|
7
7
|
const R = ({
|
|
8
8
|
language: l,
|
|
9
9
|
locales: t,
|
|
@@ -12,7 +12,7 @@ const R = ({
|
|
|
12
12
|
children: g,
|
|
13
13
|
onError: p
|
|
14
14
|
}) => {
|
|
15
|
-
const [s, h] =
|
|
15
|
+
const [s, h] = y(
|
|
16
16
|
"logora:locale",
|
|
17
17
|
null
|
|
18
18
|
), v = () => {
|
|
@@ -21,7 +21,7 @@ const R = ({
|
|
|
21
21
|
if (l)
|
|
22
22
|
return l;
|
|
23
23
|
}, x = () => !o && e in t ? t[e] : {}, [e, S] = u(v()), [c, d] = u(x());
|
|
24
|
-
|
|
24
|
+
O(() => {
|
|
25
25
|
e && (o && e in t && t[e]().then((r) => {
|
|
26
26
|
d(r?.default || r);
|
|
27
27
|
}).catch(() => d({})), s !== e && h(e));
|
|
@@ -32,12 +32,12 @@ const R = ({
|
|
|
32
32
|
Object.keys(a).indexOf(i) > -1 && (n[i] = a[i]);
|
|
33
33
|
}), n;
|
|
34
34
|
}, m = () => /* @__PURE__ */ f(
|
|
35
|
-
|
|
35
|
+
P,
|
|
36
36
|
{
|
|
37
37
|
locale: e,
|
|
38
|
-
messages: j(
|
|
38
|
+
messages: j(L(c)),
|
|
39
39
|
onError: p,
|
|
40
|
-
children: /* @__PURE__ */ f(
|
|
40
|
+
children: /* @__PURE__ */ f(b.Provider, { value: { locale: e, setLocale: S }, children: g })
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
return /* @__PURE__ */ f(I, { children: o && typeof window < "u" ? Object.keys(c).length > 0 ? m() : null : m() });
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as e, jsxs as g, Fragment as P } from "react/jsx-runtime";
|
|
2
|
-
import z from "
|
|
3
|
-
import H from "classnames";
|
|
2
|
+
import z from "classnames";
|
|
4
3
|
import { useState as l, useRef as b, useEffect as c } from "react";
|
|
5
|
-
import { useIntl as
|
|
4
|
+
import { useIntl as H, FormattedMessage as n } from "react-intl";
|
|
6
5
|
import t from "./SuggestionInput.module.scss.js";
|
|
7
|
-
import { useDataProvider as
|
|
8
|
-
import { useList as
|
|
9
|
-
import { useToast as
|
|
10
|
-
import { useAuth as
|
|
11
|
-
import { useInput as
|
|
12
|
-
import { useFormValidation as
|
|
6
|
+
import { useDataProvider as K } from "../../data/data_provider/useDataProvider.js";
|
|
7
|
+
import { useList as Q } from "../../list/list_provider/useList.js";
|
|
8
|
+
import { useToast as W } from "../../dialog/toast_provider/useToast.js";
|
|
9
|
+
import { useAuth as X } from "../../auth/use_auth/useAuth.js";
|
|
10
|
+
import { useInput as Z } from "../../input/input_provider/useInput.js";
|
|
11
|
+
import { useFormValidation as $ } from "../../forms/use_form_validation/useFormValidation.js";
|
|
12
|
+
import { useSessionStorageState as G } from "../../hooks/use_session_storage_state/useSessionStorageState.js";
|
|
13
13
|
import { useAuthRequired as U } from "../../hooks/use_auth_required/useAuthRequired.js";
|
|
14
14
|
import { TextInput as ee } from "../../input/text_input/TextInput.js";
|
|
15
15
|
import { Button as se } from "../../action/button/Button.js";
|
|
@@ -21,7 +21,7 @@ const ve = ({
|
|
|
21
21
|
userGuideUrl: d,
|
|
22
22
|
hideUserGuideLink: N = !1
|
|
23
23
|
}) => {
|
|
24
|
-
const o =
|
|
24
|
+
const o = H(), C = K(), x = Q(), { toast: T } = W() || {}, { isLoggedIn: y } = X(), { focus: f, setFocus: q } = Z(), { errors: p, validate: F } = $(), [h, E] = l(!0), [Y, v] = l(!1), [i, a] = l(""), [S, k, A] = G("userSuggestion", {}), R = b(null), u = b(null), V = U();
|
|
25
25
|
c(() => {
|
|
26
26
|
S?.suggestion && a(S.suggestion);
|
|
27
27
|
}, []), c(() => {
|
|
@@ -88,7 +88,7 @@ const ve = ({
|
|
|
88
88
|
className: t.suggestionInputContainer,
|
|
89
89
|
ref: R,
|
|
90
90
|
children: /* @__PURE__ */ g(P, { children: [
|
|
91
|
-
/* @__PURE__ */ g("div", { className:
|
|
91
|
+
/* @__PURE__ */ g("div", { className: z(t.suggestionInputItem), children: [
|
|
92
92
|
/* @__PURE__ */ e("div", { className: t.suggestionInputTitle, children: /* @__PURE__ */ e(
|
|
93
93
|
n,
|
|
94
94
|
{
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as s, Fragment as pe, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import P from "@rooks/use-sessionstorage-state";
|
|
3
2
|
import d from "classnames";
|
|
4
3
|
import { useState as N, useEffect as T } from "react";
|
|
5
4
|
import { useIntl as _e, FormattedMessage as f } from "react-intl";
|
|
6
5
|
import { useLocation as Ne } from "react-router";
|
|
7
6
|
import o from "./VoteBox.module.scss.js";
|
|
8
7
|
import { useTranslatedContent as j } from "../../translation/translated_content/useTranslatedContent.js";
|
|
8
|
+
import { useSessionStorageState as P } from "../../hooks/use_session_storage_state/useSessionStorageState.js";
|
|
9
9
|
import { useToast as be } from "../../dialog/toast_provider/useToast.js";
|
|
10
10
|
import { useAuthRequired as Se } from "../../hooks/use_auth_required/useAuthRequired.js";
|
|
11
11
|
import { useDataProvider as we } from "../../data/data_provider/useDataProvider.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import '../../../assets/components/vote/vote_button/VoteButton.module-
|
|
1
|
+
import '../../../assets/components/vote/vote_button/VoteButton.module-_-1B5PIK.css';const t = "_voteButton_shygl_3", s = "_active_shygl_22", e = "_disabled_shygl_32", o = {
|
|
2
2
|
voteButton: t,
|
|
3
|
-
active:
|
|
4
|
-
disabled:
|
|
3
|
+
active: s,
|
|
4
|
+
disabled: e
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
s as active,
|
|
8
|
+
o as default,
|
|
9
|
+
e as disabled,
|
|
10
10
|
t as voteButton
|
|
11
11
|
};
|
package/dist/index.js
CHANGED
|
@@ -160,10 +160,11 @@ import { useReportContent as rm } from "./components/user_content/use_report_con
|
|
|
160
160
|
import { useResponsive as tm } from "./components/hooks/use_responsive/useResponsive.js";
|
|
161
161
|
import { useRichContent as mm } from "./components/argument/argument/useRichContent.js";
|
|
162
162
|
import { useRoutes as fm } from "./components/data/config_provider/useRoutes.js";
|
|
163
|
-
import {
|
|
164
|
-
import {
|
|
165
|
-
import {
|
|
166
|
-
import {
|
|
163
|
+
import { useSessionStorageState as am } from "./components/hooks/use_session_storage_state/useSessionStorageState.js";
|
|
164
|
+
import { useToast as sm } from "./components/dialog/toast_provider/useToast.js";
|
|
165
|
+
import { useVote as dm } from "./components/vote/use_vote/useVote.js";
|
|
166
|
+
import { utf8ToBase64url as gm } from "./components/auth/use_auth/base64.js";
|
|
167
|
+
import { withConfig as Bm } from "./components/data/config_provider/withConfig.js";
|
|
167
168
|
export {
|
|
168
169
|
a as ActionBar,
|
|
169
170
|
s as AdUnit,
|
|
@@ -338,10 +339,11 @@ export {
|
|
|
338
339
|
tm as useResponsive,
|
|
339
340
|
mm as useRichContent,
|
|
340
341
|
fm as useRoutes,
|
|
341
|
-
am as
|
|
342
|
+
am as useSessionStorageState,
|
|
343
|
+
sm as useToast,
|
|
342
344
|
mx as useTranslatedContent,
|
|
343
|
-
|
|
344
|
-
|
|
345
|
+
dm as useVote,
|
|
346
|
+
gm as utf8ToBase64url,
|
|
345
347
|
F as withAuth,
|
|
346
|
-
|
|
348
|
+
Bm as withConfig
|
|
347
349
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logora/debate",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.78",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"description": "Design system of @Logora made with React",
|
|
@@ -64,9 +64,7 @@
|
|
|
64
64
|
"@lexical/rich-text": "^0.45.0",
|
|
65
65
|
"@lexical/selection": "^0.45.0",
|
|
66
66
|
"@lexical/utils": "^0.45.0",
|
|
67
|
-
"@rooks/use-localstorage-state": "^4.11.2",
|
|
68
67
|
"@rooks/use-previous": "^4.11.2",
|
|
69
|
-
"@rooks/use-sessionstorage-state": "^4.11.2",
|
|
70
68
|
"axios": "^1.15.2",
|
|
71
69
|
"chart.js": "^4.5.1",
|
|
72
70
|
"chartjs-plugin-datalabels": "^2.2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._voteButton_iuwpf_3{background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}._voteButton_iuwpf_3:focus:not(:focus-visible){outline:none;box-shadow:none}._active_iuwpf_22{font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);color:inherit}._active_iuwpf_22 svg{fill:currentColor!important;fill-rule:evenodd}._disabled_iuwpf_32{cursor:not-allowed;opacity:.6}._disabled_iuwpf_32 svg{fill:var(--text-secondary, #5F5F5F);fill-rule:evenodd}
|