@logora/debate 0.4.111 → 0.4.113
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/auth/subscription_modal/SubscriptionModal.module-DC7Au7I2.css +1 -0
- package/dist/components/auth/auth_modal/AuthModal.js +29 -38
- package/dist/components/auth/sso_form/SSOForm.js +33 -36
- package/dist/components/auth/subscription_modal/SubscriptionModal.js +54 -21
- package/dist/components/auth/subscription_modal/SubscriptionModal.module.scss.js +16 -6
- package/dist/components/hooks/use_auth_required/useAuthRequired.js +20 -14
- package/package.json +1 -1
- package/dist/assets/components/auth/subscription_modal/SubscriptionModal.module-xQS4aWtJ.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._body_m3gxh_3{display:flex;flex-direction:column;align-items:center;padding-top:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;padding-bottom:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;padding-right:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;padding-left:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important}._logo_m3gxh_13{align-self:center}@container (min-width: 576px){._logo_m3gxh_13{margin-top:0!important}}._logo_m3gxh_13{margin-bottom:var(--space-unit, 1em)!important}._logoImage_m3gxh_25{object-fit:contain;width:100px!important;max-height:100px!important}._icon_m3gxh_31{width:120px;height:120px;fill-rule:evenodd;fill:var(--call-primary-color, #434343)!important}@container (max-width: 767.98px){._icon_m3gxh_31{width:80px;height:80px}}._mainText_m3gxh_44{font-size:var(--font-size-normal, 16px);font-weight:var(--font-weight-normal, 400);font-variation-settings:var(--font-variation-normal, normal);color:var(--text-primary, #222222);text-align:center;margin-right:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;margin-left:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important}@container (min-width: 576px){._mainText_m3gxh_44{margin-right:var(--spacer-lg, calc(var(--space-unit, 1em) * 1.5))!important}}@container (min-width: 576px){._mainText_m3gxh_44{margin-left:var(--spacer-lg, calc(var(--space-unit, 1em) * 1.5))!important}}@container (max-width: 767.98px){._mainText_m3gxh_44{font-size:var(--font-size-small, 16px)}}._title_m3gxh_69{font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);margin-bottom:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important}._button_m3gxh_75{margin-top:var(--space-unit, 1em)!important;margin-bottom:var(--space-unit, 1em)!important}
|
|
@@ -1,50 +1,44 @@
|
|
|
1
|
-
import { jsx as t, Fragment as
|
|
1
|
+
import { jsx as t, Fragment as _ } from "react/jsx-runtime";
|
|
2
2
|
import { useState as h, useEffect as m } from "react";
|
|
3
|
-
import
|
|
4
|
-
import { useConfig as
|
|
5
|
-
import { useModal as
|
|
6
|
-
import { useAuth as
|
|
7
|
-
import { useAuthActions as
|
|
8
|
-
import { httpClient as
|
|
9
|
-
import { Modal as
|
|
10
|
-
import { Loader as
|
|
11
|
-
import { SocialAuthForm as
|
|
12
|
-
import { SSOForm as
|
|
13
|
-
import { AuthProviderFactory as
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
text: p,
|
|
18
|
-
buttonLabel: d,
|
|
19
|
-
url: g
|
|
20
|
-
}) => {
|
|
21
|
-
const o = P(), { hideModal: f } = T(), { isLoggedIn: l, authError: r } = L(), [A, n] = h(!1), [e, U] = h(null), { loginUser: v } = R(
|
|
22
|
-
B,
|
|
3
|
+
import w from "./AuthModal.module.scss.js";
|
|
4
|
+
import { useConfig as I } from "../../data/config_provider/useConfig.js";
|
|
5
|
+
import { useModal as y } from "../../dialog/modal/useModal.js";
|
|
6
|
+
import { useAuth as C } from "../use_auth/useAuth.js";
|
|
7
|
+
import { useAuthActions as E } from "../use_auth/useAuthActions.js";
|
|
8
|
+
import { httpClient as P } from "../../data/http_client/httpClient.js";
|
|
9
|
+
import { Modal as T } from "../../dialog/modal/Modal.js";
|
|
10
|
+
import { Loader as R } from "../../progress/loader/Loader.js";
|
|
11
|
+
import { SocialAuthForm as B } from "../social_auth_form/SocialAuthForm.js";
|
|
12
|
+
import { SSOForm as L } from "../sso_form/SSOForm.js";
|
|
13
|
+
import { AuthProviderFactory as M } from "../providers/AuthProviderFactory.js";
|
|
14
|
+
const $ = ({ onHideModal: s = null }) => {
|
|
15
|
+
const o = I(), { hideModal: c } = y(), { isLoggedIn: l, authError: r } = C(), [p, n] = h(!1), [e, d] = h(null), { loginUser: g } = E(
|
|
16
|
+
P,
|
|
23
17
|
process.env.API_AUTH_URL,
|
|
24
18
|
"logora_user_token"
|
|
25
19
|
);
|
|
26
20
|
m(() => {
|
|
27
|
-
l &&
|
|
21
|
+
l && f();
|
|
28
22
|
}, [l]), m(() => {
|
|
29
23
|
e && r && n(!1);
|
|
30
24
|
}, [e, r]);
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
const
|
|
25
|
+
const f = () => {
|
|
26
|
+
c(), s && s();
|
|
27
|
+
}, A = (i, a, u) => {
|
|
28
|
+
d(u), n(!0), U(i, a);
|
|
29
|
+
}, U = (i, a) => {
|
|
30
|
+
const v = M.create(
|
|
37
31
|
o.auth?.type,
|
|
38
32
|
o.shortname,
|
|
39
33
|
i,
|
|
40
34
|
a
|
|
41
35
|
).getAuthorizationParams();
|
|
42
|
-
v
|
|
36
|
+
g(v);
|
|
43
37
|
};
|
|
44
|
-
return /* @__PURE__ */ t(
|
|
45
|
-
|
|
38
|
+
return /* @__PURE__ */ t(T, { "data-vid": "login_modal", children: /* @__PURE__ */ t("div", { className: w.loginModalBody, children: p ? /* @__PURE__ */ t(R, {}) : /* @__PURE__ */ t(_, { children: o.auth.type === "form" || o.auth.type === "social" ? /* @__PURE__ */ t(
|
|
39
|
+
B,
|
|
46
40
|
{
|
|
47
|
-
onSubmit:
|
|
41
|
+
onSubmit: A,
|
|
48
42
|
error: r,
|
|
49
43
|
lastStep: e,
|
|
50
44
|
facebookClientId: process.env.FACEBOOK_CLIENT_ID,
|
|
@@ -57,7 +51,7 @@ const V = ({
|
|
|
57
51
|
privacyUrl: o.provider?.privacyUrl || "https://www.logora.com/blog-posts/privacy-policy"
|
|
58
52
|
}
|
|
59
53
|
) : /* @__PURE__ */ t(
|
|
60
|
-
|
|
54
|
+
L,
|
|
61
55
|
{
|
|
62
56
|
authType: o.auth.type,
|
|
63
57
|
error: r && e === "OAUTH2",
|
|
@@ -66,10 +60,7 @@ const V = ({
|
|
|
66
60
|
scope: o.auth.scope,
|
|
67
61
|
logoUrl: o.logo_url,
|
|
68
62
|
loginUrl: o.auth.login_url,
|
|
69
|
-
signupUrl:
|
|
70
|
-
title: c,
|
|
71
|
-
subtitle: p,
|
|
72
|
-
signupLabel: d,
|
|
63
|
+
signupUrl: o.auth.registration_url || o.auth.login_url,
|
|
73
64
|
termsUrl: o.provider?.cguUrl || "https://www.logora.com/blog-posts/cgu",
|
|
74
65
|
redirectParameter: o.auth.redirectParameter,
|
|
75
66
|
trackingParameters: o.auth.trackingParameters,
|
|
@@ -83,5 +74,5 @@ const V = ({
|
|
|
83
74
|
) }) }) });
|
|
84
75
|
};
|
|
85
76
|
export {
|
|
86
|
-
|
|
77
|
+
$ as AuthModal
|
|
87
78
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e, Fragment as m } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import G from "classnames";
|
|
3
3
|
import "react";
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import { useLocation as
|
|
4
|
+
import { useIntl as D, FormattedMessage as w } from "react-intl";
|
|
5
|
+
import { useLocation as Y } from "react-router";
|
|
6
6
|
import a from "./SSOForm.module.scss.js";
|
|
7
|
-
import { useSessionStorageState as
|
|
8
|
-
import { Icon as
|
|
9
|
-
import { Button as
|
|
10
|
-
import { Toggle as
|
|
11
|
-
import { EMAIL_CONSENT_STORAGE_KEY as
|
|
12
|
-
import { utf8ToBase64url as
|
|
13
|
-
const
|
|
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
|
+
import { utf8ToBase64url as $ } from "../use_auth/base64.js";
|
|
13
|
+
const ie = ({
|
|
14
14
|
authType: v,
|
|
15
15
|
providerName: c,
|
|
16
16
|
loginUrl: M,
|
|
@@ -27,44 +27,41 @@ const de = ({
|
|
|
27
27
|
showEmailConsent: g = !1,
|
|
28
28
|
showTerms: L = !1,
|
|
29
29
|
hideBelowButton: x = !1,
|
|
30
|
-
error: R = !1
|
|
31
|
-
title: T,
|
|
32
|
-
subtitle: A,
|
|
33
|
-
signupLabel: C
|
|
30
|
+
error: R = !1
|
|
34
31
|
}) => {
|
|
35
|
-
const [h,
|
|
36
|
-
}], o =
|
|
32
|
+
const [h, T] = g ? z(W, !1) : [!1, () => {
|
|
33
|
+
}], o = D(), d = Y(), A = (t) => {
|
|
37
34
|
if (typeof window < "u") {
|
|
38
|
-
const s = t === "CURRENT_LOCATION" ? window.location : t, i = new URL(s, window.location.origin), l = i.searchParams,
|
|
35
|
+
const s = t === "CURRENT_LOCATION" ? window.location : t, i = new URL(s, window.location.origin), l = i.searchParams, E = new URLSearchParams(d.search);
|
|
39
36
|
l.has("code") && l.delete("code"), f && l.append(f, window.location.toString());
|
|
40
|
-
for (const [_,
|
|
41
|
-
let r =
|
|
37
|
+
for (const [_, F] of Object.entries(P)) {
|
|
38
|
+
let r = F;
|
|
42
39
|
if (r) {
|
|
43
|
-
const
|
|
40
|
+
const j = d.pathname.slice(
|
|
44
41
|
0,
|
|
45
42
|
d.pathname.lastIndexOf("/")
|
|
46
43
|
);
|
|
47
44
|
r = r.replace(
|
|
48
45
|
"{{UTM_CAMPAIGN}}",
|
|
49
|
-
|
|
46
|
+
E.get("utm_campaign")
|
|
50
47
|
), r = r.replace(
|
|
51
48
|
"{{CURRENT_PATH}}",
|
|
52
|
-
decodeURIComponent(
|
|
49
|
+
decodeURIComponent(j)
|
|
53
50
|
);
|
|
54
51
|
}
|
|
55
|
-
_ === "metadata" && r && (r =
|
|
52
|
+
_ === "metadata" && r && (r = $(r)), l.append(_, r);
|
|
56
53
|
}
|
|
57
54
|
return i.search = l.toString(), i.toString();
|
|
58
55
|
}
|
|
59
56
|
return "";
|
|
60
|
-
},
|
|
57
|
+
}, C = (t) => {
|
|
61
58
|
const s = new URL(t);
|
|
62
59
|
if (s.searchParams.delete("code"), s.searchParams.append("client_id", S), s.searchParams.append("redirect_uri", y), s.searchParams.append("scope", I), s.searchParams.append("response_type", "code"), typeof window < "u") {
|
|
63
60
|
const i = new URL(window.location.href);
|
|
64
61
|
i.searchParams.delete("code"), s.searchParams.append("state", window.btoa(i.toString()));
|
|
65
62
|
}
|
|
66
63
|
return s.href;
|
|
67
|
-
}, p = (t) => v === "oauth2_server" ?
|
|
64
|
+
}, p = (t) => v === "oauth2_server" ? C(t) : A(t), B = p(M), O = p(b);
|
|
68
65
|
return /* @__PURE__ */ n("div", { className: a.ssoForm, children: [
|
|
69
66
|
/* @__PURE__ */ e("div", { className: a.logo, children: u ? /* @__PURE__ */ e(
|
|
70
67
|
"img",
|
|
@@ -76,7 +73,7 @@ const de = ({
|
|
|
76
73
|
alt: `Logo ${c}`
|
|
77
74
|
}
|
|
78
75
|
) : /* @__PURE__ */ e(
|
|
79
|
-
|
|
76
|
+
H,
|
|
80
77
|
{
|
|
81
78
|
name: "next",
|
|
82
79
|
"aria-hidden": "true",
|
|
@@ -87,13 +84,13 @@ const de = ({
|
|
|
87
84
|
) }),
|
|
88
85
|
/* @__PURE__ */ n("div", { className: a.mainText, children: [
|
|
89
86
|
/* @__PURE__ */ n("div", { className: a.title, children: [
|
|
90
|
-
|
|
87
|
+
o.formatMessage({
|
|
91
88
|
id: "auth.sso_form.title",
|
|
92
89
|
defaultMessage: "Debate now !"
|
|
93
90
|
}),
|
|
94
91
|
/* @__PURE__ */ e("br", {})
|
|
95
92
|
] }),
|
|
96
|
-
|
|
93
|
+
o.formatMessage(
|
|
97
94
|
{
|
|
98
95
|
id: "auth.sso_form.subtitle",
|
|
99
96
|
defaultMessage: "Sign up right now and receive alerts by email."
|
|
@@ -103,15 +100,15 @@ const de = ({
|
|
|
103
100
|
] }),
|
|
104
101
|
U ? null : /* @__PURE__ */ n(m, { children: [
|
|
105
102
|
/* @__PURE__ */ e(
|
|
106
|
-
|
|
103
|
+
K,
|
|
107
104
|
{
|
|
108
105
|
"data-tid": "link_signup",
|
|
109
106
|
"data-testid": "signup-button",
|
|
110
107
|
className: a.loginButton,
|
|
111
|
-
to:
|
|
108
|
+
to: O,
|
|
112
109
|
external: !0,
|
|
113
110
|
border: !1,
|
|
114
|
-
children:
|
|
111
|
+
children: o.formatMessage({
|
|
115
112
|
id: "auth.sso_form.signup",
|
|
116
113
|
defaultMessage: "Sign up"
|
|
117
114
|
})
|
|
@@ -130,7 +127,7 @@ const de = ({
|
|
|
130
127
|
"data-testid": "signin-link",
|
|
131
128
|
"data-tid": "link_login",
|
|
132
129
|
rel: "nofollow",
|
|
133
|
-
href:
|
|
130
|
+
href: B,
|
|
134
131
|
children: o.formatMessage({
|
|
135
132
|
id: "auth.sso_form.signin",
|
|
136
133
|
defaultMessage: "Sign in"
|
|
@@ -138,8 +135,8 @@ const de = ({
|
|
|
138
135
|
}
|
|
139
136
|
)
|
|
140
137
|
] }),
|
|
141
|
-
g ? /* @__PURE__ */ e("div", { className:
|
|
142
|
-
|
|
138
|
+
g ? /* @__PURE__ */ e("div", { className: G(a.switchBox), children: /* @__PURE__ */ e(
|
|
139
|
+
V,
|
|
143
140
|
{
|
|
144
141
|
type: "checkbox",
|
|
145
142
|
name: "accepts_provider_email",
|
|
@@ -152,7 +149,7 @@ const de = ({
|
|
|
152
149
|
},
|
|
153
150
|
{ variable: c }
|
|
154
151
|
),
|
|
155
|
-
onInputChanged: (t) =>
|
|
152
|
+
onInputChanged: (t) => T(!h),
|
|
156
153
|
"data-testid": "accepts-email-input"
|
|
157
154
|
}
|
|
158
155
|
) }) : null,
|
|
@@ -193,5 +190,5 @@ const de = ({
|
|
|
193
190
|
] });
|
|
194
191
|
};
|
|
195
192
|
export {
|
|
196
|
-
|
|
193
|
+
ie as SSOForm
|
|
197
194
|
};
|
|
@@ -1,26 +1,59 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { useIntl as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
import { useIntl as n } from "react-intl";
|
|
4
|
+
import e from "./SubscriptionModal.module.scss.js";
|
|
5
|
+
import { useConfig as c } from "../../data/config_provider/useConfig.js";
|
|
6
|
+
import { Modal as u } from "../../dialog/modal/Modal.js";
|
|
7
|
+
import { Icon as g } from "../../icons/icon/Icon.js";
|
|
8
|
+
import { Button as b } from "../../action/button/Button.js";
|
|
9
|
+
const y = ({ title: a, text: m, buttonLabel: l, url: i }) => {
|
|
10
|
+
const t = n(), s = c(), d = s?.provider?.companyName;
|
|
11
|
+
return /* @__PURE__ */ o(u, { "data-vid": "subscription_modal", children: /* @__PURE__ */ r("div", { className: e.body, children: [
|
|
12
|
+
/* @__PURE__ */ o("div", { className: e.logo, children: s?.logo_url ? /* @__PURE__ */ o(
|
|
13
|
+
"img",
|
|
14
|
+
{
|
|
15
|
+
height: 100,
|
|
16
|
+
width: 100,
|
|
17
|
+
className: e.logoImage,
|
|
18
|
+
src: s.logo_url,
|
|
19
|
+
alt: `Logo ${d || ""}`
|
|
20
|
+
}
|
|
21
|
+
) : /* @__PURE__ */ o(
|
|
22
|
+
g,
|
|
23
|
+
{
|
|
24
|
+
name: "next",
|
|
25
|
+
"aria-hidden": "true",
|
|
26
|
+
height: 50,
|
|
27
|
+
width: 50,
|
|
28
|
+
className: e.icon
|
|
29
|
+
}
|
|
30
|
+
) }),
|
|
31
|
+
/* @__PURE__ */ r("div", { className: e.mainText, children: [
|
|
32
|
+
/* @__PURE__ */ o("div", { className: e.title, children: a || t.formatMessage({
|
|
33
|
+
id: "auth.subscription_modal.title",
|
|
34
|
+
defaultMessage: "Subscribe to comment"
|
|
35
|
+
}) }),
|
|
36
|
+
m || t.formatMessage({
|
|
37
|
+
id: "auth.subscription_modal.text",
|
|
38
|
+
defaultMessage: "Commenting is reserved to subscribers."
|
|
39
|
+
})
|
|
40
|
+
] }),
|
|
41
|
+
i && /* @__PURE__ */ o(
|
|
42
|
+
b,
|
|
43
|
+
{
|
|
44
|
+
"data-tid": "link_subscribe",
|
|
45
|
+
className: e.button,
|
|
46
|
+
to: i,
|
|
47
|
+
external: !0,
|
|
48
|
+
border: !1,
|
|
49
|
+
children: l || t.formatMessage({
|
|
50
|
+
id: "auth.subscription_modal.button",
|
|
51
|
+
defaultMessage: "Subscribe"
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
)
|
|
22
55
|
] }) });
|
|
23
56
|
};
|
|
24
57
|
export {
|
|
25
|
-
|
|
58
|
+
y as SubscriptionModal
|
|
26
59
|
};
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import '../../../assets/components/auth/subscription_modal/SubscriptionModal.module-
|
|
2
|
-
body:
|
|
3
|
-
|
|
1
|
+
import '../../../assets/components/auth/subscription_modal/SubscriptionModal.module-DC7Au7I2.css';const o = "_body_m3gxh_3", t = "_logo_m3gxh_13", _ = "_logoImage_m3gxh_25", n = "_icon_m3gxh_31", g = "_mainText_m3gxh_44", m = "_title_m3gxh_69", e = "_button_m3gxh_75", c = {
|
|
2
|
+
body: o,
|
|
3
|
+
logo: t,
|
|
4
|
+
logoImage: _,
|
|
5
|
+
icon: n,
|
|
6
|
+
mainText: g,
|
|
7
|
+
title: m,
|
|
8
|
+
button: e
|
|
4
9
|
};
|
|
5
10
|
export {
|
|
6
|
-
|
|
7
|
-
e as
|
|
8
|
-
|
|
11
|
+
o as body,
|
|
12
|
+
e as button,
|
|
13
|
+
c as default,
|
|
14
|
+
n as icon,
|
|
15
|
+
t as logo,
|
|
16
|
+
_ as logoImage,
|
|
17
|
+
g as mainText,
|
|
18
|
+
m as title
|
|
9
19
|
};
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as f, useContext as i, Suspense as
|
|
3
|
-
import { ConfigContext as
|
|
2
|
+
import { createContext as f, useContext as i, Suspense as u, lazy as s } from "react";
|
|
3
|
+
import { ConfigContext as d } from "../../data/config_provider/ConfigProvider.js";
|
|
4
4
|
import { useModal as h } from "../../dialog/modal/useModal.js";
|
|
5
|
-
import { useAuth as
|
|
6
|
-
const
|
|
7
|
-
const { config: t } = i(
|
|
8
|
-
return !!(r &&
|
|
9
|
-
},
|
|
10
|
-
const { config: t } = i(
|
|
5
|
+
import { useAuth as p } from "../../auth/use_auth/useAuth.js";
|
|
6
|
+
const w = s(() => import("../../auth/auth_modal/index.js").then((t) => ({ default: t.AuthModal }))), m = s(() => import("../../auth/subscription_modal/index.js").then((t) => ({ default: t.SubscriptionModal }))), l = f(null), b = () => {
|
|
7
|
+
const { config: t } = i(d), e = i(l), { isLoggedIn: r, currentUser: o } = p() || {};
|
|
8
|
+
return !!(r && e && t?.[e]?.subscribersOnly === !0 && o?.is_subscriber !== !0);
|
|
9
|
+
}, x = () => {
|
|
10
|
+
const { config: t } = i(d), e = i(l), r = b(), { showModal: o } = h(), c = e ? t?.[e] : null;
|
|
11
11
|
return (a = {}) => {
|
|
12
12
|
if (r) {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
if (typeof window < "u" && window.dispatchEvent(
|
|
14
|
+
new CustomEvent("logora:subscription:requested", {
|
|
15
|
+
detail: { module: e, redirectUrl: window.location.href }
|
|
16
|
+
})
|
|
17
|
+
), t?.auth?.disableSubscriptionModal === !0)
|
|
18
|
+
return;
|
|
19
|
+
o(
|
|
20
|
+
/* @__PURE__ */ n(u, { fallback: null, children: /* @__PURE__ */ n(m, { ...c?.subscriptionModal }) })
|
|
15
21
|
);
|
|
16
22
|
return;
|
|
17
23
|
}
|
|
@@ -23,13 +29,13 @@ const p = l(() => import("../../auth/auth_modal/index.js").then((t) => ({ defaul
|
|
|
23
29
|
new CustomEvent("logora:authentication:requested", {
|
|
24
30
|
detail: { redirectUrl: window.location.href }
|
|
25
31
|
})
|
|
26
|
-
)), t?.auth?.disableLoginModal !== !0 &&
|
|
27
|
-
/* @__PURE__ */ n(
|
|
32
|
+
)), t?.auth?.disableLoginModal !== !0 && o(
|
|
33
|
+
/* @__PURE__ */ n(u, { fallback: null, children: /* @__PURE__ */ n(w, { ...a }) })
|
|
28
34
|
);
|
|
29
35
|
};
|
|
30
36
|
};
|
|
31
37
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
38
|
+
l as ModuleContext,
|
|
39
|
+
x as useAuthRequired,
|
|
34
40
|
b as useSubscriptionRequired
|
|
35
41
|
};
|
package/package.json
CHANGED
package/dist/assets/components/auth/subscription_modal/SubscriptionModal.module-xQS4aWtJ.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._body_14nv4_3{display:flex;flex-direction:column;align-items:center;text-align:center;gap:1em;padding-top:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;padding-bottom:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;padding-right:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;padding-left:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important}._title_14nv4_15{font-weight:700;font-size:1.2em}
|