@logora/debate 0.4.3 → 0.4.5
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/components/auth/auth_initializer/AuthInitializer.js +41 -44
- package/dist/components/auth/use_auth/useAuthActions.js +9 -13
- package/dist/components/icons/clarin_icons/Upvote.js +4 -4
- package/dist/components/user/{update_user_info_modal/UpdateUserInfoModal.js → onboarding_modal/OnboardingModal.js} +49 -57
- package/dist/components/user/{update_user_info_modal/UpdateUserInfoModal.module.scss.js → onboarding_modal/OnboardingModal.module.scss.js} +1 -1
- package/dist/components/user/onboarding_modal/useOnboarding.js +27 -0
- package/dist/index.js +164 -164
- package/package.json +1 -1
- package/dist/components/user/update_user_info_modal/useUpdateUserInfo.js +0 -27
- /package/dist/assets/components/user/{update_user_info_modal/UpdateUserInfoModal.module-DJym6u4r.css → onboarding_modal/OnboardingModal.module-DJym6u4r.css} +0 -0
|
@@ -1,66 +1,63 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l, Fragment as I } from "react/jsx-runtime";
|
|
2
2
|
import { useState as E, useEffect as f } from "react";
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { useConfig as O } from "../../data/config_provider/useConfig.js";
|
|
4
|
+
import { useDataProvider as q } from "../../data/data_provider/useDataProvider.js";
|
|
5
|
+
import { useAuthInterceptor as S } from "../use_auth/useAuthInterceptor.js";
|
|
6
|
+
import { authTokenHandler as T } from "../use_auth/authTokenHandler.js";
|
|
7
|
+
import { useAuthActions as _ } from "../use_auth/useAuthActions.js";
|
|
8
|
+
import { useAuthRequired as z } from "../../hooks/use_auth_required/useAuthRequired.js";
|
|
9
|
+
import { useAuth as L } from "../use_auth/useAuth.js";
|
|
10
|
+
import { AuthProviderFactory as M } from "../providers/AuthProviderFactory.js";
|
|
11
|
+
import { OnboardingModal as j } from "../../user/onboarding_modal/OnboardingModal.js";
|
|
11
12
|
import { httpClient as a } from "../../data/axios_client/httpClient.js";
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const [
|
|
13
|
+
const X = ({ authUrl: n, authType: i, provider: g, assertion: p }) => {
|
|
14
|
+
const s = "logora_user_token", e = O(), w = q();
|
|
15
|
+
S(a, n, s);
|
|
16
|
+
const [v, u] = E(!1), { getToken: A, removeToken: C } = T(
|
|
16
17
|
a,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
), { loginUser: c, logoutUser:
|
|
18
|
+
n,
|
|
19
|
+
s
|
|
20
|
+
), { loginUser: c, logoutUser: P, fetchUser: b } = _(
|
|
20
21
|
a,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
),
|
|
24
|
-
f(() => {
|
|
25
|
-
I();
|
|
26
|
-
}, []);
|
|
27
|
-
const h = (o) => {
|
|
28
|
-
r !== "social" && r !== "oauth2_server" && e.auth?.showOnboarding === !0 ? u(!0) : U(o);
|
|
29
|
-
};
|
|
22
|
+
n,
|
|
23
|
+
s
|
|
24
|
+
), m = z(), { setIsLoggingIn: x, currentUser: k } = L();
|
|
30
25
|
f(() => {
|
|
26
|
+
U();
|
|
27
|
+
}, []), f(() => {
|
|
31
28
|
if (typeof window < "u")
|
|
32
|
-
return window.addEventListener("logora:authentication:require",
|
|
33
|
-
window.removeEventListener("logora:authentication:require",
|
|
29
|
+
return window.addEventListener("logora:authentication:require", m), () => {
|
|
30
|
+
window.removeEventListener("logora:authentication:require", m);
|
|
34
31
|
};
|
|
35
32
|
}, []);
|
|
36
|
-
const
|
|
37
|
-
const o =
|
|
33
|
+
const U = () => {
|
|
34
|
+
const o = d(), t = A();
|
|
38
35
|
if (t) {
|
|
39
|
-
const
|
|
40
|
-
o.isSameUser(
|
|
36
|
+
const r = t.session_id;
|
|
37
|
+
o.isSameUser(r) ? b() : (C(), h(o));
|
|
41
38
|
} else
|
|
42
|
-
|
|
43
|
-
},
|
|
39
|
+
h(o);
|
|
40
|
+
}, h = (o) => {
|
|
44
41
|
if (o.shouldInitAuth()) {
|
|
45
42
|
const t = o.getAuthorizationParams();
|
|
46
43
|
if (t) {
|
|
47
|
-
if (
|
|
48
|
-
|
|
44
|
+
if (i !== "social" && i !== "oauth2_server" && e.auth?.showOnboarding === !0) {
|
|
45
|
+
u(!0);
|
|
49
46
|
return;
|
|
50
47
|
}
|
|
51
48
|
c(t);
|
|
52
49
|
}
|
|
53
50
|
} else
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
const
|
|
57
|
-
c(
|
|
58
|
-
},
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
-
|
|
51
|
+
P();
|
|
52
|
+
}, y = async (o) => {
|
|
53
|
+
const r = d().getAuthorizationParams();
|
|
54
|
+
await c(r), await w.update("users", k.slug, o), u(!1);
|
|
55
|
+
}, d = () => M.create(i, g, p);
|
|
56
|
+
return /* @__PURE__ */ l(I, { children: v && /* @__PURE__ */ l(
|
|
57
|
+
j,
|
|
61
58
|
{
|
|
62
59
|
pendingAuth: !0,
|
|
63
|
-
onConsentConfirmed:
|
|
60
|
+
onConsentConfirmed: y,
|
|
64
61
|
showTerms: e.auth?.hideCgu !== !0,
|
|
65
62
|
showEmailConsent: e.auth?.showEmailConsent,
|
|
66
63
|
termsUrl: e.provider?.cguUrl || "https://www.logora.com/blog-posts/cgu",
|
|
@@ -69,5 +66,5 @@ const N = ({ authUrl: s, authType: r, provider: g, assertion: p }) => {
|
|
|
69
66
|
) });
|
|
70
67
|
};
|
|
71
68
|
export {
|
|
72
|
-
|
|
69
|
+
X as AuthInitializer
|
|
73
70
|
};
|
|
@@ -11,24 +11,20 @@ const A = "logora:emailConsent", L = (c, u, f) => {
|
|
|
11
11
|
r(!0), t(!1);
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
-
d(e).then((o) => {
|
|
15
|
-
i();
|
|
16
|
-
}).catch((o) => {
|
|
14
|
+
return d(e).then((o) => i()).catch((o) => {
|
|
17
15
|
r(o);
|
|
18
16
|
});
|
|
19
17
|
}, g = () => {
|
|
20
18
|
s(!1), t(!1), n({}), a(), sessionStorage.removeItem(A), p();
|
|
21
|
-
}, i = () => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} else
|
|
27
|
-
r(!0), s(!1), t(!1), n({}), a();
|
|
28
|
-
}).catch((e) => {
|
|
19
|
+
}, i = () => l.getOneWithToken("me", "").then((e) => {
|
|
20
|
+
if (e.data.success) {
|
|
21
|
+
const o = e.data.data.resource;
|
|
22
|
+
n(o), s(!0), t(!1), m(o);
|
|
23
|
+
} else
|
|
29
24
|
r(!0), s(!1), t(!1), n({}), a();
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
}).catch((e) => {
|
|
26
|
+
r(!0), s(!1), t(!1), n({}), a();
|
|
27
|
+
}), m = (e) => {
|
|
32
28
|
typeof window < "u" && window.dispatchEvent(
|
|
33
29
|
new CustomEvent("logora:authentication:success", {
|
|
34
30
|
detail: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as V, jsx as C } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
const
|
|
4
|
-
/* @__PURE__ */ C("path", { d: "M10 6.66667L9.34267 6.55733C9.3268 6.6528 9.3319 6.75057 9.35762 6.84386C9.38334 6.93715 9.42907 7.02373 9.49161 7.09757C9.55416 7.17141 9.63204 7.23075 9.71983 7.27146C9.80762 7.31218 9.90323 7.33329 10 7.33333V6.66667ZM2.66667 6.66667V6C2.48986 6 2.32029 6.07024 2.19526 6.19526C2.07024 6.32029 2 6.48986 2 6.66667H2.66667ZM4 14H11.5733V12.6667H4V14ZM12.3733 6H10V7.33333H12.3733V6ZM10.658 6.776L11.1947 3.55267L9.88 3.33333L9.34267 6.55733L10.658 6.776ZM9.88 2H9.73733V3.33333H9.88V2ZM7.518 3.18733L5.842 5.70333L6.95133 6.44333L8.62867 3.92733L7.518 3.18733ZM5.28667 6H2.66667V7.33333H5.28667V6ZM2 6.66667V12H3.33333V6.66667H2ZM13.5347 12.392L14.3347 8.392L13.028 8.13067L12.228 12.1307L13.5347 12.392ZM5.842 5.70333C5.7811 5.79461 5.69795 5.86945 5.60119 5.9212C5.50443 5.97295 5.39639 6.00002 5.28667 6V7.33333C5.61591 7.33331 5.94006 7.252 6.23034 7.09663C6.52061 6.94126 6.76805 6.71662 6.95067 6.44267L5.842 5.70333ZM11.1947 3.55267C11.2265 3.36169 11.2164 3.16607 11.165 2.97941C11.1136 2.79274 11.0222 2.6195 10.8971 2.47174C10.772 2.32398 10.6162 2.20524 10.4405 2.12378C10.2649 2.04231 10.0736 2.00007 9.88 2V3.33333L11.1947 3.55267ZM12.3733 7.33333C12.472 7.33329 12.5694 7.35515 12.6586 7.39732C12.7478 7.43949 12.8265 7.50093 12.889 7.57721C12.9516 7.65348 12.9965 7.74269 13.0204 7.8384C13.0443 7.93411 13.0473 8.03393 13.028 8.13067L14.3347 8.392C14.3927 8.1019 14.3856 7.80255 14.3139 7.51552C14.2422 7.22849 14.1078 6.96094 13.9202 6.73214C13.7327 6.50334 13.4967 6.319 13.2294 6.19239C12.962 6.06579 12.6698 6.00008 12.374 6L12.3733 7.33333ZM11.5733 14C12.0357 14 12.4839 13.8398 12.8415 13.5466C13.1991 13.2535 13.444 12.8454 13.5347 12.392L12.228 12.1307C12.1978 12.282 12.116 12.4181 11.9966 12.5158C11.8772 12.6136 11.7276 12.6669 11.5733 12.6667V14ZM9.73733 2C9.29836 2.00001 8.86618 2.10838 8.47914 2.31551C8.09211 2.52263 7.76152 2.8221 7.518 3.18733L8.62867 3.92733C8.75039 3.74465 8.91466 3.59486 9.10818 3.49123C9.30171 3.38761 9.51782 3.33337 9.73733 3.33333V2ZM4 12.6667C3.82319 12.6667 3.65362 12.5964 3.5286 12.4714C3.40357 12.3464 3.33333 12.1768 3.33333 12H2C2 12.5304 2.21071 13.0391 2.58579 13.4142C2.96086 13.7893 3.46957 14 4 14V12.6667Z", fill: "
|
|
5
|
-
/* @__PURE__ */ C("path", { d: "M5.3335 6.66797V13.3346", stroke: "
|
|
3
|
+
const o = (L) => /* @__PURE__ */ V("svg", { ...L, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
4
|
+
/* @__PURE__ */ C("path", { d: "M10 6.66667L9.34267 6.55733C9.3268 6.6528 9.3319 6.75057 9.35762 6.84386C9.38334 6.93715 9.42907 7.02373 9.49161 7.09757C9.55416 7.17141 9.63204 7.23075 9.71983 7.27146C9.80762 7.31218 9.90323 7.33329 10 7.33333V6.66667ZM2.66667 6.66667V6C2.48986 6 2.32029 6.07024 2.19526 6.19526C2.07024 6.32029 2 6.48986 2 6.66667H2.66667ZM4 14H11.5733V12.6667H4V14ZM12.3733 6H10V7.33333H12.3733V6ZM10.658 6.776L11.1947 3.55267L9.88 3.33333L9.34267 6.55733L10.658 6.776ZM9.88 2H9.73733V3.33333H9.88V2ZM7.518 3.18733L5.842 5.70333L6.95133 6.44333L8.62867 3.92733L7.518 3.18733ZM5.28667 6H2.66667V7.33333H5.28667V6ZM2 6.66667V12H3.33333V6.66667H2ZM13.5347 12.392L14.3347 8.392L13.028 8.13067L12.228 12.1307L13.5347 12.392ZM5.842 5.70333C5.7811 5.79461 5.69795 5.86945 5.60119 5.9212C5.50443 5.97295 5.39639 6.00002 5.28667 6V7.33333C5.61591 7.33331 5.94006 7.252 6.23034 7.09663C6.52061 6.94126 6.76805 6.71662 6.95067 6.44267L5.842 5.70333ZM11.1947 3.55267C11.2265 3.36169 11.2164 3.16607 11.165 2.97941C11.1136 2.79274 11.0222 2.6195 10.8971 2.47174C10.772 2.32398 10.6162 2.20524 10.4405 2.12378C10.2649 2.04231 10.0736 2.00007 9.88 2V3.33333L11.1947 3.55267ZM12.3733 7.33333C12.472 7.33329 12.5694 7.35515 12.6586 7.39732C12.7478 7.43949 12.8265 7.50093 12.889 7.57721C12.9516 7.65348 12.9965 7.74269 13.0204 7.8384C13.0443 7.93411 13.0473 8.03393 13.028 8.13067L14.3347 8.392C14.3927 8.1019 14.3856 7.80255 14.3139 7.51552C14.2422 7.22849 14.1078 6.96094 13.9202 6.73214C13.7327 6.50334 13.4967 6.319 13.2294 6.19239C12.962 6.06579 12.6698 6.00008 12.374 6L12.3733 7.33333ZM11.5733 14C12.0357 14 12.4839 13.8398 12.8415 13.5466C13.1991 13.2535 13.444 12.8454 13.5347 12.392L12.228 12.1307C12.1978 12.282 12.116 12.4181 11.9966 12.5158C11.8772 12.6136 11.7276 12.6669 11.5733 12.6667V14ZM9.73733 2C9.29836 2.00001 8.86618 2.10838 8.47914 2.31551C8.09211 2.52263 7.76152 2.8221 7.518 3.18733L8.62867 3.92733C8.75039 3.74465 8.91466 3.59486 9.10818 3.49123C9.30171 3.38761 9.51782 3.33337 9.73733 3.33333V2ZM4 12.6667C3.82319 12.6667 3.65362 12.5964 3.5286 12.4714C3.40357 12.3464 3.33333 12.1768 3.33333 12H2C2 12.5304 2.21071 13.0391 2.58579 13.4142C2.96086 13.7893 3.46957 14 4 14V12.6667Z", fill: "currentColor" }),
|
|
5
|
+
/* @__PURE__ */ C("path", { d: "M5.3335 6.66797V13.3346", stroke: "currentColor", "stroke-width": "1.33333" })
|
|
6
6
|
] });
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
o as Upvote
|
|
9
9
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as a, jsxs as d, Fragment as
|
|
1
|
+
import { jsx as a, jsxs as d, Fragment as O } from "react/jsx-runtime";
|
|
2
2
|
import { useState as l } from "react";
|
|
3
3
|
import { useIntl as ee, FormattedMessage as ae } from "react-intl";
|
|
4
|
-
import t from "./
|
|
4
|
+
import t from "./OnboardingModal.module.scss.js";
|
|
5
5
|
import { useAuth as te } from "../../auth/use_auth/useAuth.js";
|
|
6
6
|
import { useDataProvider as se } from "../../data/data_provider/useDataProvider.js";
|
|
7
7
|
import { useConfig as re } from "../../data/config_provider/useConfig.js";
|
|
@@ -12,28 +12,28 @@ import { Modal as ne } from "../../dialog/modal/Modal.js";
|
|
|
12
12
|
import { Loader as de } from "../../progress/loader/Loader.js";
|
|
13
13
|
import { AvatarSelector as ce } from "../avatar_selector/AvatarSelector.js";
|
|
14
14
|
import { Icon as me } from "../../icons/icon/Icon.js";
|
|
15
|
-
import { Button as
|
|
16
|
-
import { TextInput as
|
|
15
|
+
import { Button as S } from "../../action/button/Button.js";
|
|
16
|
+
import { TextInput as F } from "../../input/text_input/TextInput.js";
|
|
17
17
|
import { Select as ue } from "../../input/select/Select.js";
|
|
18
|
-
import { Toggle as
|
|
19
|
-
const
|
|
18
|
+
import { Toggle as D } from "../../input/toggle/Toggle.js";
|
|
19
|
+
const Se = ({
|
|
20
20
|
termsUrl: L,
|
|
21
21
|
privacyUrl: B,
|
|
22
|
-
showEmailConsent:
|
|
23
|
-
showTerms:
|
|
22
|
+
showEmailConsent: U = !1,
|
|
23
|
+
showTerms: f = !1,
|
|
24
24
|
pendingAuth: n = !1,
|
|
25
25
|
onConsentConfirmed: y = null
|
|
26
26
|
}) => {
|
|
27
27
|
const o = te(), A = se(), r = ee(), i = re(), $ = [...Array(i.avatars?.maxFileName || 0).keys()].map(
|
|
28
28
|
(e) => `${i.avatars?.baseUrl}/${e + 1}.${i.avatars?.fileExtension}`
|
|
29
|
-
), [
|
|
29
|
+
), [p, j] = l(o.currentUser.first_name || ""), [g, R] = l(
|
|
30
30
|
o.currentUser.description || ""
|
|
31
|
-
), [
|
|
31
|
+
), [_, q] = l(o.currentUser.last_name || ""), [h, E] = l(o.currentUser.language), [z, v] = l(!1), [C, x] = l(
|
|
32
32
|
o.currentUser.image_url
|
|
33
|
-
), [
|
|
33
|
+
), [m, T] = l(null), [k, P] = l(!1), [V, W] = l(!1), { isMobile: w } = ie(), { errors: c, validate: G } = le(), { hideModal: I } = oe(), [b, H] = l(!1), [M, J] = l(!1), K = (e) => {
|
|
34
34
|
const s = new FileReader();
|
|
35
35
|
s.onloadend = () => {
|
|
36
|
-
|
|
36
|
+
x(s.result);
|
|
37
37
|
}, s.readAsDataURL(e);
|
|
38
38
|
}, Q = [
|
|
39
39
|
{ first_name: ["required", null] },
|
|
@@ -41,30 +41,22 @@ const De = ({
|
|
|
41
41
|
{ last_name: ["required", null] },
|
|
42
42
|
{ last_name: ["minChar", 2] },
|
|
43
43
|
...n ? [] : [{ language: ["required", null] }],
|
|
44
|
-
...
|
|
44
|
+
...f ? [{ accepts_terms: ["enforceValue", !0] }] : []
|
|
45
45
|
], X = (e) => {
|
|
46
46
|
e.preventDefault();
|
|
47
47
|
const s = {};
|
|
48
|
-
if (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
else {
|
|
58
|
-
const U = new FormData();
|
|
59
|
-
Object.entries(s).forEach(([g, Z]) => {
|
|
60
|
-
U.append(g, Z);
|
|
61
|
-
}), A.update("users", o.currentUser.slug, U).then((g) => {
|
|
62
|
-
g.data.success && o.setCurrentUser(g.data.data.resource), w();
|
|
63
|
-
});
|
|
64
|
-
}
|
|
48
|
+
if (p && (s.first_name = p), _ && (s.last_name = _), h && (s.language = h), m && k && (s.image = m), m && !k && (s.origin_image_url = m), g && (s.description = g), U && (s.accepts_provider_email = M), f && (s.accepts_terms = b), s.is_onboarded = !0, G(s, Q)) {
|
|
49
|
+
W(!0);
|
|
50
|
+
const N = new FormData();
|
|
51
|
+
Object.entries(s).forEach(([u, Z]) => {
|
|
52
|
+
N.append(u, Z);
|
|
53
|
+
}), n && y ? y(N) : A.update("users", o.currentUser.slug, N).then((u) => {
|
|
54
|
+
u.data.success && o.setCurrentUser(u.data.data.resource), I();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
65
57
|
}, Y = (e) => {
|
|
66
58
|
const s = /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/i;
|
|
67
|
-
T(e),
|
|
59
|
+
T(e), v(!1), s.test(e) ? (x(e), P(!1)) : (P(!0), K(e));
|
|
68
60
|
};
|
|
69
61
|
return /* @__PURE__ */ a(
|
|
70
62
|
ne,
|
|
@@ -78,13 +70,13 @@ const De = ({
|
|
|
78
70
|
defaultMessage: "Update your profile"
|
|
79
71
|
}),
|
|
80
72
|
style: {
|
|
81
|
-
width:
|
|
82
|
-
minWidth:
|
|
73
|
+
width: w ? "unset" : "max-content",
|
|
74
|
+
minWidth: w ? "unset" : "500px",
|
|
83
75
|
maxWidth: "800px"
|
|
84
76
|
},
|
|
85
77
|
showCloseButton: !1,
|
|
86
78
|
disableClickOutside: !0,
|
|
87
|
-
children: V ? /* @__PURE__ */ a(de, {}) :
|
|
79
|
+
children: V ? /* @__PURE__ */ a(de, {}) : z && !n ? /* @__PURE__ */ d(O, { children: [
|
|
88
80
|
/* @__PURE__ */ a(
|
|
89
81
|
ce,
|
|
90
82
|
{
|
|
@@ -98,21 +90,21 @@ const De = ({
|
|
|
98
90
|
"div",
|
|
99
91
|
{
|
|
100
92
|
className: t.backButton,
|
|
101
|
-
onClick: () =>
|
|
93
|
+
onClick: () => v(!1),
|
|
102
94
|
children: r.formatMessage({
|
|
103
95
|
id: "user.user_edit.back",
|
|
104
96
|
defaultMessage: "Back"
|
|
105
97
|
})
|
|
106
98
|
}
|
|
107
99
|
)
|
|
108
|
-
] }) : /* @__PURE__ */ d(
|
|
100
|
+
] }) : /* @__PURE__ */ d(O, { children: [
|
|
109
101
|
/* @__PURE__ */ d("div", { className: t.container, children: [
|
|
110
102
|
/* @__PURE__ */ d("div", { className: t.userImageContainer, children: [
|
|
111
|
-
|
|
103
|
+
C ? /* @__PURE__ */ a(
|
|
112
104
|
"img",
|
|
113
105
|
{
|
|
114
106
|
className: t.userPictureUpload,
|
|
115
|
-
src:
|
|
107
|
+
src: C,
|
|
116
108
|
alt: r.formatMessage({
|
|
117
109
|
id: "alt.my_profile_picture",
|
|
118
110
|
defaultMessage: "Ma photo de profil"
|
|
@@ -131,11 +123,11 @@ const De = ({
|
|
|
131
123
|
}
|
|
132
124
|
) }),
|
|
133
125
|
!n && /* @__PURE__ */ a(
|
|
134
|
-
|
|
126
|
+
S,
|
|
135
127
|
{
|
|
136
128
|
"data-testid": "avatar-button",
|
|
137
129
|
"data-tid": "action_save_profile",
|
|
138
|
-
onClick: () =>
|
|
130
|
+
onClick: () => v(!0),
|
|
139
131
|
style: { whiteSpace: "nowrap" },
|
|
140
132
|
children: r.formatMessage({
|
|
141
133
|
id: "user.user_edit.avatar",
|
|
@@ -147,7 +139,7 @@ const De = ({
|
|
|
147
139
|
/* @__PURE__ */ d("div", { className: t.inputsContainer, children: [
|
|
148
140
|
/* @__PURE__ */ d("div", { className: t.nameContainer, children: [
|
|
149
141
|
/* @__PURE__ */ a("div", { className: t.updateProfileInput, children: /* @__PURE__ */ a(
|
|
150
|
-
|
|
142
|
+
F,
|
|
151
143
|
{
|
|
152
144
|
type: "text",
|
|
153
145
|
name: "first_name",
|
|
@@ -160,7 +152,7 @@ const De = ({
|
|
|
160
152
|
defaultMessage: "First name"
|
|
161
153
|
}),
|
|
162
154
|
onChange: (e) => i.actions?.disableOnboardingNameUpdate === !0 ? null : j(e.target.value),
|
|
163
|
-
value:
|
|
155
|
+
value: p,
|
|
164
156
|
error: !!c.first_name,
|
|
165
157
|
message: c.first_name,
|
|
166
158
|
"data-testid": "first-name",
|
|
@@ -168,7 +160,7 @@ const De = ({
|
|
|
168
160
|
}
|
|
169
161
|
) }),
|
|
170
162
|
/* @__PURE__ */ a("div", { className: t.updateProfileInput, children: /* @__PURE__ */ a(
|
|
171
|
-
|
|
163
|
+
F,
|
|
172
164
|
{
|
|
173
165
|
type: "text",
|
|
174
166
|
name: "last_name",
|
|
@@ -181,7 +173,7 @@ const De = ({
|
|
|
181
173
|
defaultMessage: "Last name"
|
|
182
174
|
}),
|
|
183
175
|
onChange: (e) => i.actions?.disableOnboardingNameUpdate === !0 ? null : q(e.target.value),
|
|
184
|
-
value:
|
|
176
|
+
value: _,
|
|
185
177
|
error: !!c.last_name,
|
|
186
178
|
message: c.last_name,
|
|
187
179
|
"data-testid": "last-name",
|
|
@@ -204,8 +196,8 @@ const De = ({
|
|
|
204
196
|
value: e,
|
|
205
197
|
text: `${e.toUpperCase()}`
|
|
206
198
|
})),
|
|
207
|
-
defaultOption:
|
|
208
|
-
onChange: (e) =>
|
|
199
|
+
defaultOption: h,
|
|
200
|
+
onChange: (e) => E(e.value)
|
|
209
201
|
}
|
|
210
202
|
),
|
|
211
203
|
!n && /* @__PURE__ */ a("div", { className: t.userDescription, children: /* @__PURE__ */ a(
|
|
@@ -216,7 +208,7 @@ const De = ({
|
|
|
216
208
|
id: "user.user_edit.user_description",
|
|
217
209
|
defaultMessage: "Describe yourself in a few words"
|
|
218
210
|
}),
|
|
219
|
-
value:
|
|
211
|
+
value: g,
|
|
220
212
|
onChange: (e) => R(e.target.value),
|
|
221
213
|
maxLength: 500,
|
|
222
214
|
"data-testid": "description"
|
|
@@ -224,13 +216,13 @@ const De = ({
|
|
|
224
216
|
) })
|
|
225
217
|
] })
|
|
226
218
|
] }),
|
|
227
|
-
|
|
228
|
-
|
|
219
|
+
f && /* @__PURE__ */ a("div", { className: t.toggle, children: /* @__PURE__ */ a(
|
|
220
|
+
D,
|
|
229
221
|
{
|
|
230
222
|
type: "checkbox",
|
|
231
223
|
name: "accepts_terms",
|
|
232
224
|
style: { fontSize: 18 },
|
|
233
|
-
checked:
|
|
225
|
+
checked: b,
|
|
234
226
|
label: /* @__PURE__ */ a(
|
|
235
227
|
ae,
|
|
236
228
|
{
|
|
@@ -260,18 +252,18 @@ const De = ({
|
|
|
260
252
|
}
|
|
261
253
|
}
|
|
262
254
|
),
|
|
263
|
-
onInputChanged: (e) => H(!
|
|
255
|
+
onInputChanged: (e) => H(!b),
|
|
264
256
|
message: c.accepts_terms,
|
|
265
257
|
"data-testid": "accepts-terms-input"
|
|
266
258
|
}
|
|
267
259
|
) }),
|
|
268
|
-
|
|
269
|
-
|
|
260
|
+
U && /* @__PURE__ */ a("div", { className: t.toggle, children: /* @__PURE__ */ a(
|
|
261
|
+
D,
|
|
270
262
|
{
|
|
271
263
|
type: "checkbox",
|
|
272
264
|
name: "accepts_provider_email",
|
|
273
265
|
style: { fontSize: 18 },
|
|
274
|
-
checked:
|
|
266
|
+
checked: M,
|
|
275
267
|
label: r.formatMessage(
|
|
276
268
|
{
|
|
277
269
|
id: "modal.update_user_info_modal.consent_label",
|
|
@@ -279,12 +271,12 @@ const De = ({
|
|
|
279
271
|
},
|
|
280
272
|
{ provider: i.provider?.companyName }
|
|
281
273
|
),
|
|
282
|
-
onInputChanged: (e) => J(!
|
|
274
|
+
onInputChanged: (e) => J(!M),
|
|
283
275
|
"data-testid": "accepts-email-input"
|
|
284
276
|
}
|
|
285
277
|
) }),
|
|
286
278
|
/* @__PURE__ */ a("div", { className: t.userSaveBox, children: /* @__PURE__ */ a(
|
|
287
|
-
|
|
279
|
+
S,
|
|
288
280
|
{
|
|
289
281
|
"data-testid": "save-button",
|
|
290
282
|
"data-tid": "action_save_profile",
|
|
@@ -300,5 +292,5 @@ const De = ({
|
|
|
300
292
|
);
|
|
301
293
|
};
|
|
302
294
|
export {
|
|
303
|
-
|
|
295
|
+
Se as OnboardingModal
|
|
304
296
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../../../assets/components/user/
|
|
1
|
+
import '../../../assets/components/user/onboarding_modal/OnboardingModal.module-DJym6u4r.css';const t = "_container_6t85s_3", n = "_nameContainer_6t85s_22", e = "_inputsContainer_6t85s_48", s = "_hint_6t85s_61", o = "_langSelect_6t85s_67", _ = "_textArea_6t85s_71", a = "_userSaveBox_6t85s_129", c = "_userPictureUpload_6t85s_138", r = "_userImageContainer_6t85s_156", u = "_backButton_6t85s_172", i = "_toggle_6t85s_179", g = "_cgu_6t85s_184", l = {
|
|
2
2
|
container: t,
|
|
3
3
|
nameContainer: n,
|
|
4
4
|
inputsContainer: e,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as a } from "react";
|
|
3
|
+
import { OnboardingModal as l } from "./OnboardingModal.js";
|
|
4
|
+
import { useAuth as m } from "../../auth/use_auth/useAuth.js";
|
|
5
|
+
import { useModal as u } from "../../dialog/modal/useModal.js";
|
|
6
|
+
import { useConfig as p } from "../../data/config_provider/useConfig.js";
|
|
7
|
+
const b = () => {
|
|
8
|
+
const { currentUser: t, isLoggedIn: r } = m(), { showModal: n, isModalPresent: s } = u(), o = p(), i = () => {
|
|
9
|
+
n(
|
|
10
|
+
/* @__PURE__ */ e(
|
|
11
|
+
l,
|
|
12
|
+
{
|
|
13
|
+
showEmailConsent: o.auth?.showEmailConsent,
|
|
14
|
+
showTerms: o.auth?.hideCgu !== !0,
|
|
15
|
+
termsUrl: o.provider?.cguUrl || "https://www.logora.com/blog-posts/cgu",
|
|
16
|
+
privacyUrl: o.provider?.privacyUrl || "https://www.logora.com/blog-posts/privacy-policy"
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
return a(() => {
|
|
22
|
+
!s && r && t.is_onboarded === !1 && o.auth?.showOnboarding === !0 && i();
|
|
23
|
+
}, [s, r, o.auth?.showOnboarding]), null;
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
b as useOnboarding
|
|
27
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -12,16 +12,16 @@ import { Argument as c } from "./components/argument/argument/Argument.js";
|
|
|
12
12
|
import { ArgumentInput as B } from "./components/input/argument_input/ArgumentInput.js";
|
|
13
13
|
import { ArgumentSummaryBox as C } from "./components/summary/argument_summary_box/ArgumentSummaryBox.js";
|
|
14
14
|
import { AuthContext as h } from "./components/auth/use_auth/AuthContext.js";
|
|
15
|
-
import { AuthInitializer as
|
|
15
|
+
import { AuthInitializer as I } from "./components/auth/auth_initializer/AuthInitializer.js";
|
|
16
16
|
import { AuthModal as v } from "./components/auth/auth_modal/AuthModal.js";
|
|
17
17
|
import { AuthProvider as M, withAuth as F } from "./components/auth/use_auth/AuthProvider.js";
|
|
18
18
|
import { AuthProviderFactory as k } from "./components/auth/providers/AuthProviderFactory.js";
|
|
19
19
|
import { AuthorBox as R } from "./components/user/author_box/AuthorBox.js";
|
|
20
|
-
import { Avatar as
|
|
21
|
-
import { AvatarSelector as
|
|
22
|
-
import { BackLink as
|
|
23
|
-
import { BadgeBox as
|
|
24
|
-
import { BoxSkeleton as
|
|
20
|
+
import { Avatar as E } from "./components/user/avatar/Avatar.js";
|
|
21
|
+
import { AvatarSelector as y } from "./components/user/avatar_selector/AvatarSelector.js";
|
|
22
|
+
import { BackLink as H } from "./components/action/back_link/BackLink.js";
|
|
23
|
+
import { BadgeBox as U } from "./components/gamification/badge_box/BadgeBox.js";
|
|
24
|
+
import { BoxSkeleton as G } from "./components/skeleton/box_skeleton/BoxSkeleton.js";
|
|
25
25
|
import { Button as q } from "./components/action/button/Button.js";
|
|
26
26
|
import { ConfigContext as z, ConfigProvider as W } from "./components/data/config_provider/ConfigProvider.js";
|
|
27
27
|
import { ConfirmModal as j } from "./components/dialog/confirm_modal/ConfirmModal.js";
|
|
@@ -37,16 +37,16 @@ import { DialogBox as lo } from "./components/dialog/dialog_box/DialogBox.js";
|
|
|
37
37
|
import { Drawer as go } from "./components/dialog/drawer/Drawer.js";
|
|
38
38
|
import { Dropdown as So } from "./components/dialog/dropdown/Dropdown.js";
|
|
39
39
|
import { EMAIL_CONSENT_STORAGE_KEY as Ao, useAuthActions as ho } from "./components/auth/use_auth/useAuthActions.js";
|
|
40
|
-
import { EmbedHeader as
|
|
40
|
+
import { EmbedHeader as Io } from "./components/embed/embed_header/EmbedHeader.js";
|
|
41
41
|
import { ExpandableText as vo } from "./components/text/expandable_text/ExpandableText.js";
|
|
42
42
|
import { FacebookLoginButton as Mo } from "./components/auth/facebook_login_button/FacebookLoginButton.js";
|
|
43
43
|
import { FollowButton as bo } from "./components/follow/follow_button/FollowButton.js";
|
|
44
44
|
import { Form as Do } from "./components/forms/form/form.js";
|
|
45
|
-
import { FormContext as
|
|
46
|
-
import { GoogleLoginButton as
|
|
47
|
-
import { HashScroll as
|
|
48
|
-
import { Icon as
|
|
49
|
-
import { IconContext as
|
|
45
|
+
import { FormContext as wo } from "./components/forms/form/form-context.js";
|
|
46
|
+
import { GoogleLoginButton as Vo } from "./components/auth/google_login_button/GoogleLoginButton.js";
|
|
47
|
+
import { HashScroll as No } from "./components/tools/hash_scroll/HashScroll.js";
|
|
48
|
+
import { Icon as Oo } from "./components/icons/icon/Icon.js";
|
|
49
|
+
import { IconContext as $o, IconProvider as Go } from "./components/icons/icon_provider/IconProvider.js";
|
|
50
50
|
import { IconTextLink as qo } from "./components/action/icon_text_link/IconTextLink.js";
|
|
51
51
|
import { InformationBox as zo } from "./components/information/information_box/InformationBox.js";
|
|
52
52
|
import { HiddenCheckbox as Yo } from "./components/input/checkbox/hidden/hidden-checkbox.js";
|
|
@@ -62,70 +62,70 @@ import { Loader as lr } from "./components/progress/loader/Loader.js";
|
|
|
62
62
|
import { Location as gr } from "./components/util/location/Location.js";
|
|
63
63
|
import { LoginForm as Sr } from "./components/auth/login_form/LoginForm.js";
|
|
64
64
|
import { Message as Ar } from "./components/input/text_input/message.js";
|
|
65
|
-
import { Modal as
|
|
65
|
+
import { Modal as Tr } from "./components/dialog/modal/Modal.js";
|
|
66
66
|
import { ModalContext as Pr, ModalProvider as vr } from "./components/dialog/modal/ModalProvider.js";
|
|
67
67
|
import { NavbarButton as Mr } from "./components/navbar/navbar_button/NavbarButton.js";
|
|
68
68
|
import { NavbarModal as br } from "./components/navbar/navbar_modal/NavbarModal.js";
|
|
69
69
|
import { NotificationItem as Dr } from "./components/notification/notification_item/NotificationItem.js";
|
|
70
|
-
import { NotificationMenu as
|
|
71
|
-
import { OAuth2Button as
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
119
|
-
import {
|
|
70
|
+
import { NotificationMenu as wr } from "./components/notification/notification_menu/NotificationMenu.js";
|
|
71
|
+
import { OAuth2Button as Vr } from "./components/auth/oauth2_button/OAuth2Button.js";
|
|
72
|
+
import { OnboardingModal as Nr } from "./components/user/onboarding_modal/OnboardingModal.js";
|
|
73
|
+
import { PaginatedList as Or } from "./components/list/paginated_list/PaginatedList.js";
|
|
74
|
+
import { Pagination as $r } from "./components/list/pagination/Pagination.js";
|
|
75
|
+
import { PieChart as _r } from "./components/chart/pie_chart/PieChart.js";
|
|
76
|
+
import { PointBox as Kr } from "./components/gamification/point_box/PointBox.js";
|
|
77
|
+
import { ProgressBar as Wr } from "./components/progress/progress_bar/ProgressBar.js";
|
|
78
|
+
import { ProposalBox as jr } from "./components/proposal/proposal_box/ProposalBox.js";
|
|
79
|
+
import { ReadMore as Qr } from "./components/text/read_more/ReadMore.js";
|
|
80
|
+
import { ReportBox as Zr } from "./components/report/report_box/ReportBox.js";
|
|
81
|
+
import { ReportModal as re } from "./components/user_content/use_report_content/ReportModal.js";
|
|
82
|
+
import { ResponsiveProvider as te } from "./components/hooks/use_responsive/ResponsiveProvider.js";
|
|
83
|
+
import { SSOForm as me } from "./components/auth/sso_form/SSOForm.js";
|
|
84
|
+
import { ScrollToTop as fe } from "./components/tools/scroll_to_top/ScrollToTop.js";
|
|
85
|
+
import { SearchInput as ae } from "./components/input/search_input/SearchInput.js";
|
|
86
|
+
import { SectionBox as se } from "./components/section/section_box/SectionBox.js";
|
|
87
|
+
import { Select as de } from "./components/input/select/Select.js";
|
|
88
|
+
import { ShareBox as ce } from "./components/share/share_box/ShareBox.js";
|
|
89
|
+
import { ShareButton as Be } from "./components/share/share_button/ShareButton.js";
|
|
90
|
+
import { ShareModal as Ce } from "./components/share/share_modal/ShareModal.js";
|
|
91
|
+
import { SideModal as he } from "./components/modal/side_modal/SideModal.js";
|
|
92
|
+
import { SignupForm as Ie } from "./components/auth/signup_form/SignupForm.js";
|
|
93
|
+
import { SocialAuthForm as ve } from "./components/auth/social_auth_form/SocialAuthForm.js";
|
|
94
|
+
import { SourceBox as Me } from "./components/source/source_box/SourceBox.js";
|
|
95
|
+
import { SourceListItem as be } from "./components/source/source_list_item/SourceListItem.js";
|
|
96
|
+
import { SourceModal as De } from "./components/source/source_modal/SourceModal.js";
|
|
97
|
+
import { StandardErrorBoundary as we } from "./components/error/standard_error_boundary/StandardErrorBoundary.js";
|
|
98
|
+
import { SuggestionBanner as Ve } from "./components/suggestion/suggestion_banner/SuggestionBanner.js";
|
|
99
|
+
import { SuggestionBox as Ne } from "./components/suggestion/suggestion_box/SuggestionBox.js";
|
|
100
|
+
import { SuggestionInput as Oe } from "./components/suggestion/suggestion_input/SuggestionInput.js";
|
|
101
|
+
import { SuggestionVoteBox as $e } from "./components/vote/suggestion_vote_box/SuggestionVoteBox.js";
|
|
102
|
+
import { Summary as _e } from "./components/summary/summary/Summary.js";
|
|
103
|
+
import { SummaryBox as Ke } from "./components/summary/summary_box/SummaryBox.js";
|
|
104
|
+
import { SummaryContentBox as We } from "./components/user_content/summary_content_box/SummaryContentBox.js";
|
|
105
|
+
import { Tab as je } from "./components/navigation/tabs/Tab.js";
|
|
106
|
+
import { TabPanel as Qe } from "./components/navigation/tabs/TabPanel.js";
|
|
107
|
+
import { Tabs as Ze } from "./components/navigation/tabs/Tabs.js";
|
|
108
|
+
import { Tag as rt } from "./components/tag/tag/Tag.js";
|
|
109
|
+
import { TextEditor as tt } from "./components/input/text_editor/TextEditor.js";
|
|
110
|
+
import { TextInput as mt } from "./components/input/text_input/TextInput.js";
|
|
111
|
+
import { Toast as ft } from "./components/dialog/toast/Toast.js";
|
|
112
|
+
import { ToastProvider as at } from "./components/dialog/toast_provider/ToastProvider.js";
|
|
113
|
+
import { Toggle as st } from "./components/input/toggle/Toggle.js";
|
|
114
|
+
import { TogglePosition as dt } from "./components/input/toggle_position/TogglePosition.js";
|
|
115
|
+
import { Tooltip as ct } from "./components/dialog/tooltip/Tooltip.js";
|
|
116
|
+
import { TopArguments as Bt } from "./components/argument/top_arguments/TopArguments.js";
|
|
117
|
+
import { TranslatedContent as Ct } from "./components/translation/translated_content/TranslatedContent.js";
|
|
118
|
+
import { TranslationButton as ht } from "./components/translation/translation_button/TranslationButton.js";
|
|
119
|
+
import { UpDownVoteBox as It } from "./components/vote/up_down_vote_box/UpDownVoteBox.js";
|
|
120
120
|
import { UserBox as vt } from "./components/user/user_box/UserBox.js";
|
|
121
121
|
import { UserBoxSmall as Mt } from "./components/user/user_box_small/UserBoxSmall.js";
|
|
122
122
|
import { UserContentSkeleton as bt } from "./components/skeleton/user_content_skeleton/UserContentSkeleton.js";
|
|
123
123
|
import { VoteBox as Dt } from "./components/vote/vote_box/VoteBox.js";
|
|
124
|
-
import { VoteButton as
|
|
125
|
-
import { VoteContext as
|
|
126
|
-
import { VotePaginatedList as
|
|
127
|
-
import { WithAd as
|
|
128
|
-
import { authTokenHandler as
|
|
124
|
+
import { VoteButton as wt } from "./components/vote/vote_button/VoteButton.js";
|
|
125
|
+
import { VoteContext as Vt, VoteProvider as yt } from "./components/vote/vote_provider/VoteProvider.js";
|
|
126
|
+
import { VotePaginatedList as Ht } from "./components/list/paginated_list/VotePaginatedList.js";
|
|
127
|
+
import { WithAd as Ut } from "./components/ad/with_ad/WithAd.js";
|
|
128
|
+
import { authTokenHandler as Gt } from "./components/auth/use_auth/authTokenHandler.js";
|
|
129
129
|
import { classes as qt, getAccent as Kt } from "./components/input/text_input/color-accent.js";
|
|
130
130
|
import { dataProvider as Wt } from "./components/data/data_provider/DataProvider.js";
|
|
131
131
|
import { extractFormData as jt } from "./components/forms/form/extract-form-data.js";
|
|
@@ -141,25 +141,25 @@ import { useConfig as lx } from "./components/data/config_provider/useConfig.js"
|
|
|
141
141
|
import { useCssTheme as gx } from "./components/hooks/use_css_theme/useCssTheme.js";
|
|
142
142
|
import { useData as Sx } from "./components/data/data_provider/useData.js";
|
|
143
143
|
import { useDataProvider as Ax } from "./components/data/data_provider/useDataProvider.js";
|
|
144
|
-
import { useDeleteContent as
|
|
144
|
+
import { useDeleteContent as Tx } from "./components/user_content/use_delete_content/useDeleteContent.js";
|
|
145
145
|
import { useFollow as Px } from "./components/follow/use_follow/useFollow.js";
|
|
146
146
|
import { useFontLoader as Lx } from "./components/hooks/use_font_loader/useFontLoader.js";
|
|
147
147
|
import { useForm as Fx } from "./components/forms/form/use-form.js";
|
|
148
148
|
import { useFormContext as kx } from "./components/forms/form/use-form-context.js";
|
|
149
149
|
import { useFormValidation as Rx } from "./components/forms/use_form_validation/useFormValidation.js";
|
|
150
|
-
import { useGoogleAdManager as
|
|
151
|
-
import { useInput as
|
|
152
|
-
import { useList as
|
|
153
|
-
import { useLocale as
|
|
154
|
-
import { useMatomo as
|
|
150
|
+
import { useGoogleAdManager as Ex } from "./components/ad/use_google_ad_manager/useGoogleAdManager.js";
|
|
151
|
+
import { useInput as yx } from "./components/input/input_provider/useInput.js";
|
|
152
|
+
import { useList as Hx } from "./components/list/list_provider/useList.js";
|
|
153
|
+
import { useLocale as Ux } from "./components/intl/intl_provider/useLocale.js";
|
|
154
|
+
import { useMatomo as Gx } from "./components/hooks/use_matomo/useMatomo.js";
|
|
155
155
|
import { useModal as qx } from "./components/dialog/modal/useModal.js";
|
|
156
|
-
import {
|
|
157
|
-
import {
|
|
158
|
-
import {
|
|
159
|
-
import {
|
|
160
|
-
import {
|
|
161
|
-
import {
|
|
162
|
-
import {
|
|
156
|
+
import { useOnboarding as zx } from "./components/user/onboarding_modal/useOnboarding.js";
|
|
157
|
+
import { useRelativeTime as Yx } from "./components/hooks/use_relative_time/useRelativeTime.js";
|
|
158
|
+
import { useReportContent as Jx } from "./components/user_content/use_report_content/useReportContent.js";
|
|
159
|
+
import { useResponsive as Xx } from "./components/hooks/use_responsive/useResponsive.js";
|
|
160
|
+
import { useRichContent as om } from "./components/argument/argument/useRichContent.js";
|
|
161
|
+
import { useRoutes as em } from "./components/data/config_provider/useRoutes.js";
|
|
162
|
+
import { useToast as xm } from "./components/dialog/toast_provider/useToast.js";
|
|
163
163
|
import { useVote as pm } from "./components/vote/use_vote/useVote.js";
|
|
164
164
|
import { utf8ToBase64url as nm } from "./components/auth/use_auth/base64.js";
|
|
165
165
|
import { withConfig as im } from "./components/data/config_provider/withConfig.js";
|
|
@@ -171,16 +171,16 @@ export {
|
|
|
171
171
|
B as ArgumentInput,
|
|
172
172
|
C as ArgumentSummaryBox,
|
|
173
173
|
h as AuthContext,
|
|
174
|
-
|
|
174
|
+
I as AuthInitializer,
|
|
175
175
|
v as AuthModal,
|
|
176
176
|
M as AuthProvider,
|
|
177
177
|
k as AuthProviderFactory,
|
|
178
178
|
R as AuthorBox,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
E as Avatar,
|
|
180
|
+
y as AvatarSelector,
|
|
181
|
+
H as BackLink,
|
|
182
|
+
U as BadgeBox,
|
|
183
|
+
G as BoxSkeleton,
|
|
184
184
|
q as Button,
|
|
185
185
|
z as ConfigContext,
|
|
186
186
|
W as ConfigProvider,
|
|
@@ -197,17 +197,17 @@ export {
|
|
|
197
197
|
go as Drawer,
|
|
198
198
|
So as Dropdown,
|
|
199
199
|
Ao as EMAIL_CONSENT_STORAGE_KEY,
|
|
200
|
-
|
|
200
|
+
Io as EmbedHeader,
|
|
201
201
|
vo as ExpandableText,
|
|
202
202
|
Mo as FacebookLoginButton,
|
|
203
203
|
bo as FollowButton,
|
|
204
204
|
Do as Form,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
205
|
+
wo as FormContext,
|
|
206
|
+
Vo as GoogleLoginButton,
|
|
207
|
+
No as HashScroll,
|
|
208
|
+
Oo as Icon,
|
|
209
|
+
$o as IconContext,
|
|
210
|
+
Go as IconProvider,
|
|
211
211
|
qo as IconTextLink,
|
|
212
212
|
zo as InformationBox,
|
|
213
213
|
Yo as Input,
|
|
@@ -223,72 +223,72 @@ export {
|
|
|
223
223
|
gr as Location,
|
|
224
224
|
Sr as LoginForm,
|
|
225
225
|
Ar as Message,
|
|
226
|
-
|
|
226
|
+
Tr as Modal,
|
|
227
227
|
Pr as ModalContext,
|
|
228
228
|
vr as ModalProvider,
|
|
229
229
|
Mr as NavbarButton,
|
|
230
230
|
br as NavbarModal,
|
|
231
231
|
Dr as NotificationItem,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
_r as
|
|
238
|
-
Kr as
|
|
239
|
-
Wr as
|
|
240
|
-
jr as
|
|
241
|
-
Qr as
|
|
242
|
-
Zr as
|
|
243
|
-
re as
|
|
244
|
-
te as
|
|
245
|
-
me as
|
|
246
|
-
fe as
|
|
247
|
-
ae as
|
|
248
|
-
se as
|
|
249
|
-
de as
|
|
250
|
-
ce as
|
|
251
|
-
Be as
|
|
252
|
-
Ce as
|
|
253
|
-
he as
|
|
254
|
-
|
|
255
|
-
ve as
|
|
256
|
-
Me as
|
|
257
|
-
be as
|
|
258
|
-
De as
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
_e as
|
|
265
|
-
Ke as
|
|
266
|
-
We as
|
|
267
|
-
je as
|
|
268
|
-
Qe as
|
|
269
|
-
Ze as
|
|
270
|
-
rt as
|
|
271
|
-
tt as
|
|
272
|
-
mt as
|
|
273
|
-
ft as
|
|
274
|
-
at as
|
|
275
|
-
st as
|
|
276
|
-
dt as
|
|
277
|
-
ct as
|
|
278
|
-
Bt as
|
|
279
|
-
Ct as
|
|
280
|
-
ht as
|
|
281
|
-
|
|
232
|
+
wr as NotificationMenu,
|
|
233
|
+
Vr as OAuth2Button,
|
|
234
|
+
Nr as OnboardingModal,
|
|
235
|
+
Or as PaginatedList,
|
|
236
|
+
$r as Pagination,
|
|
237
|
+
_r as PieChart,
|
|
238
|
+
Kr as PointBox,
|
|
239
|
+
Wr as ProgressBar,
|
|
240
|
+
jr as ProposalBox,
|
|
241
|
+
Qr as ReadMore,
|
|
242
|
+
Zr as ReportBox,
|
|
243
|
+
re as ReportModal,
|
|
244
|
+
te as ResponsiveProvider,
|
|
245
|
+
me as SSOForm,
|
|
246
|
+
fe as ScrollToTop,
|
|
247
|
+
ae as SearchInput,
|
|
248
|
+
se as SectionBox,
|
|
249
|
+
de as Select,
|
|
250
|
+
ce as ShareBox,
|
|
251
|
+
Be as ShareButton,
|
|
252
|
+
Ce as ShareModal,
|
|
253
|
+
he as SideModal,
|
|
254
|
+
Ie as SignupForm,
|
|
255
|
+
ve as SocialAuthForm,
|
|
256
|
+
Me as SourceBox,
|
|
257
|
+
be as SourceListItem,
|
|
258
|
+
De as SourceModal,
|
|
259
|
+
we as StandardErrorBoundary,
|
|
260
|
+
Ve as SuggestionBanner,
|
|
261
|
+
Ne as SuggestionBox,
|
|
262
|
+
Oe as SuggestionInput,
|
|
263
|
+
$e as SuggestionVoteBox,
|
|
264
|
+
_e as Summary,
|
|
265
|
+
Ke as SummaryBox,
|
|
266
|
+
We as SummaryContentBox,
|
|
267
|
+
je as Tab,
|
|
268
|
+
Qe as TabPanel,
|
|
269
|
+
Ze as Tabs,
|
|
270
|
+
rt as Tag,
|
|
271
|
+
tt as TextEditor,
|
|
272
|
+
mt as TextInput,
|
|
273
|
+
ft as Toast,
|
|
274
|
+
at as ToastProvider,
|
|
275
|
+
st as Toggle,
|
|
276
|
+
dt as TogglePosition,
|
|
277
|
+
ct as Tooltip,
|
|
278
|
+
Bt as TopArguments,
|
|
279
|
+
Ct as TranslatedContent,
|
|
280
|
+
ht as TranslationButton,
|
|
281
|
+
It as UpDownVoteBox,
|
|
282
282
|
vt as UserBox,
|
|
283
283
|
Mt as UserBoxSmall,
|
|
284
284
|
bt as UserContentSkeleton,
|
|
285
285
|
Dt as VoteBox,
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
286
|
+
wt as VoteButton,
|
|
287
|
+
Vt as VoteContext,
|
|
288
|
+
Ht as VotePaginatedList,
|
|
289
|
+
yt as VoteProvider,
|
|
290
|
+
Ut as WithAd,
|
|
291
|
+
Gt as authTokenHandler,
|
|
292
292
|
r as bildIcons,
|
|
293
293
|
p as clarinIcons,
|
|
294
294
|
qt as classes,
|
|
@@ -315,26 +315,26 @@ export {
|
|
|
315
315
|
gx as useCssTheme,
|
|
316
316
|
Sx as useData,
|
|
317
317
|
Ax as useDataProvider,
|
|
318
|
-
|
|
318
|
+
Tx as useDeleteContent,
|
|
319
319
|
Px as useFollow,
|
|
320
320
|
Lx as useFontLoader,
|
|
321
321
|
Fx as useForm,
|
|
322
322
|
kx as useFormContext,
|
|
323
323
|
Rx as useFormValidation,
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
324
|
+
Ex as useGoogleAdManager,
|
|
325
|
+
yx as useInput,
|
|
326
|
+
Hx as useList,
|
|
327
|
+
Ux as useLocale,
|
|
328
|
+
Gx as useMatomo,
|
|
329
329
|
qx as useModal,
|
|
330
|
-
zx as
|
|
331
|
-
Yx as
|
|
332
|
-
Jx as
|
|
333
|
-
Xx as
|
|
334
|
-
om as
|
|
335
|
-
em as
|
|
330
|
+
zx as useOnboarding,
|
|
331
|
+
Yx as useRelativeTime,
|
|
332
|
+
Jx as useReportContent,
|
|
333
|
+
Xx as useResponsive,
|
|
334
|
+
om as useRichContent,
|
|
335
|
+
em as useRoutes,
|
|
336
|
+
xm as useToast,
|
|
336
337
|
Xt as useTranslatedContent,
|
|
337
|
-
xm as useUpdateUserInfo,
|
|
338
338
|
pm as useVote,
|
|
339
339
|
nm as utf8ToBase64url,
|
|
340
340
|
F as withAuth,
|
package/package.json
CHANGED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect as i } from "react";
|
|
3
|
-
import { UpdateUserInfoModal as p } from "./UpdateUserInfoModal.js";
|
|
4
|
-
import { useAuth as l } from "../../auth/use_auth/useAuth.js";
|
|
5
|
-
import { useModal as m } from "../../dialog/modal/useModal.js";
|
|
6
|
-
import { useConfig as u } from "../../data/config_provider/useConfig.js";
|
|
7
|
-
const U = () => {
|
|
8
|
-
const { currentUser: t, isLoggedIn: r } = l(), { showModal: e, isModalPresent: s } = m(), o = u(), n = () => {
|
|
9
|
-
e(
|
|
10
|
-
/* @__PURE__ */ a(
|
|
11
|
-
p,
|
|
12
|
-
{
|
|
13
|
-
showEmailConsent: o.auth?.showEmailConsent,
|
|
14
|
-
showTerms: o.auth?.hideCgu !== !0,
|
|
15
|
-
termsUrl: o.provider?.cguUrl || "https://www.logora.com/blog-posts/cgu",
|
|
16
|
-
privacyUrl: o.provider?.privacyUrl || "https://www.logora.com/blog-posts/privacy-policy"
|
|
17
|
-
}
|
|
18
|
-
)
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
return i(() => {
|
|
22
|
-
!s && r && t.is_onboarded === !1 && o.auth?.showOnboarding === !0 && n();
|
|
23
|
-
}, [s, r, o.auth?.showOnboarding]), null;
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
U as useUpdateUserInfo
|
|
27
|
-
};
|