@logora/debate 0.3.92 → 0.3.93
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/navigation/tabs/Tabs.module-CYpmMK3l.css +1 -0
- package/dist/components/auth/providers/FormAuth.js +7 -5
- package/dist/components/auth/providers/PasswordAuth.js +6 -6
- package/dist/components/auth/use_auth/useAuthActions.js +21 -17
- package/dist/components/input/text_editor/TextEditor.js +10 -10
- package/dist/components/input/text_editor/plugins/FocusPlugin.js +15 -13
- package/dist/components/navigation/tabs/Tabs.module.scss.js +16 -16
- package/package.json +1 -1
- package/dist/assets/components/navigation/tabs/Tabs.module-CFizOU1d.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._tabsWrapper_14x1i_3{position:relative;display:flex;align-items:stretch;width:100%;max-width:100%}._navTabs_14x1i_11{display:flex;flex-wrap:nowrap;gap:var(--spacer-xs, calc(var(--space-unit, 1em) * .325));white-space:nowrap;padding-left:0;margin-top:0;margin-bottom:0;border-bottom:none!important;list-style:none;flex:1}@container (max-width: 575.98px){._navTabs_14x1i_11{font-size:var(--font-size-normal, 16px);gap:var(--space-unit, 1em)}}._navTabs_14x1i_11{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none}._navTabs_14x1i_11::-webkit-scrollbar{display:none}._arrow_14x1i_39{position:absolute;top:0;bottom:0;z-index:2;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;padding:0;transition:opacity .2s ease;outline:none;background:none;line-height:0}._arrow_14x1i_39 svg{display:block}._arrow_14x1i_39:focus-visible{outline:2px solid var(--call-primary-color, #434343);outline-offset:-2px}._arrowLeft_14x1i_63{left:0;padding-left:var(--spacer-xs, calc(var(--space-unit, 1em) * .325));background:linear-gradient(to right,var(--background-color-container, white) 40%,transparent)}._arrowLeft_14x1i_63 svg{transform:rotate(90deg)}._arrowRight_14x1i_72{right:0;padding-right:var(--spacer-xs, calc(var(--space-unit, 1em) * .325));background:linear-gradient(to left,var(--background-color-container, white) 40%,transparent)}._arrowRight_14x1i_72 svg{transform:rotate(-90deg)}._arrowHidden_14x1i_81{opacity:0;pointer-events:none}._navItem_14x1i_86{cursor:pointer}._navLink_14x1i_90{display:block;position:relative;padding:var(--spacer-md, calc(var(--space-unit, 1em) * .75)) var(--spacer-md, calc(var(--space-unit, 1em) * .75));border:none!important;color:var(--text-primary, #222222);outline:0}._navLink_14x1i_90:hover,._navLink_14x1i_90:focus{text-decoration:none;color:var(--text-primary, #222222)!important;background:transparent}._navLink_14x1i_90._disabled_14x1i_103{color:var(--darkest-text-tertiary, #c7c7c7);pointer-events:none;cursor:default}._navLink_14x1i_90:after{content:"";background-color:var(--text-primary, #222222);height:2px;position:absolute;width:100%;left:0;bottom:0;z-index:1;transition:transform .25s ease 0s;transform:scaleX(0)}._navLink_14x1i_90._active_14x1i_120{color:var(--text-primary, #222222)!important;background:transparent;font-weight:var(--font-weight-bold, 700)}._navLink_14x1i_90._active_14x1i_120:after{transform:scaleX(1)}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { AuthProvider as s } from "./AuthProvider.js";
|
|
2
2
|
import { utf8ToBase64url as e } from "../use_auth/base64.js";
|
|
3
3
|
class u extends s {
|
|
4
|
-
constructor(
|
|
5
|
-
super(), this.providerName =
|
|
4
|
+
constructor(t, r) {
|
|
5
|
+
super(), this.providerName = t, this.userData = r;
|
|
6
6
|
}
|
|
7
7
|
shouldInitAuth() {
|
|
8
8
|
return !!this.userData;
|
|
9
9
|
}
|
|
10
10
|
getSessionId = () => null;
|
|
11
|
-
isSameUser(
|
|
11
|
+
isSameUser(t) {
|
|
12
12
|
return !0;
|
|
13
13
|
}
|
|
14
14
|
getAssertion() {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
if (!this.userData || typeof this.userData != "object")
|
|
16
|
+
return null;
|
|
17
|
+
const t = JSON.stringify(this.userData);
|
|
18
|
+
return e(t);
|
|
17
19
|
}
|
|
18
20
|
getAuthorizationParams() {
|
|
19
21
|
return {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { AuthProvider as
|
|
2
|
-
class i extends
|
|
3
|
-
constructor(
|
|
4
|
-
super(), this.providerName =
|
|
1
|
+
import { AuthProvider as t } from "./AuthProvider.js";
|
|
2
|
+
class i extends t {
|
|
3
|
+
constructor(s, r) {
|
|
4
|
+
super(), this.providerName = s, this.userData = r;
|
|
5
5
|
}
|
|
6
6
|
shouldInitAuth() {
|
|
7
7
|
return !!this.userData;
|
|
8
8
|
}
|
|
9
9
|
getSessionId = () => null;
|
|
10
|
-
isSameUser(
|
|
10
|
+
isSameUser(s) {
|
|
11
11
|
return !0;
|
|
12
12
|
}
|
|
13
13
|
getAuthorizationParams() {
|
|
14
|
-
return {
|
|
14
|
+
return !this.userData?.email || !this.userData?.password ? null : {
|
|
15
15
|
grant_type: "password",
|
|
16
16
|
username: this.userData.email,
|
|
17
17
|
password: this.userData.password,
|
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
import { authTokenHandler as
|
|
1
|
+
import { authTokenHandler as m } from "./authTokenHandler.js";
|
|
2
2
|
import { useAuth as w } from "./useAuth.js";
|
|
3
3
|
import { useDataProvider as v } from "../../data/data_provider/useDataProvider.js";
|
|
4
|
-
const I = "logora:emailConsent", L = (i, u,
|
|
5
|
-
const { removeToken:
|
|
4
|
+
const I = "logora:emailConsent", L = (i, u, f) => {
|
|
5
|
+
const { removeToken: a, fetchToken: d } = m(
|
|
6
6
|
i,
|
|
7
7
|
u,
|
|
8
|
-
|
|
9
|
-
), { setCurrentUser:
|
|
10
|
-
|
|
8
|
+
f
|
|
9
|
+
), { setCurrentUser: n, setIsLoggedIn: s, setIsLoggingIn: t, setAuthError: r } = w(), l = v(), h = (e) => {
|
|
10
|
+
if (!e) {
|
|
11
|
+
r(!0), t(!1);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
d(e).then((o) => {
|
|
11
15
|
c();
|
|
12
|
-
}).catch((
|
|
13
|
-
|
|
16
|
+
}).catch((o) => {
|
|
17
|
+
r(o);
|
|
14
18
|
});
|
|
15
19
|
}, g = () => {
|
|
16
|
-
|
|
20
|
+
s(!1), t(!1), n({}), a(), E();
|
|
17
21
|
}, c = () => {
|
|
18
|
-
|
|
22
|
+
l.getOneWithToken("me", "").then((e) => {
|
|
19
23
|
if (e.data.success) {
|
|
20
|
-
const
|
|
21
|
-
o
|
|
24
|
+
const o = e.data.data.resource;
|
|
25
|
+
n(o), s(!0), t(!1), p(o);
|
|
22
26
|
} else
|
|
23
|
-
|
|
27
|
+
r(!0), s(!1), t(!1), n({}), a();
|
|
24
28
|
}).catch((e) => {
|
|
25
|
-
|
|
29
|
+
r(!0), s(!1), t(!1), n({}), a();
|
|
26
30
|
});
|
|
27
|
-
},
|
|
31
|
+
}, p = (e) => {
|
|
28
32
|
typeof window < "u" && window.dispatchEvent(
|
|
29
33
|
new CustomEvent("logora:authentication:success", {
|
|
30
34
|
detail: {
|
|
@@ -32,11 +36,11 @@ const I = "logora:emailConsent", L = (i, u, d) => {
|
|
|
32
36
|
}
|
|
33
37
|
})
|
|
34
38
|
);
|
|
35
|
-
},
|
|
39
|
+
}, E = () => {
|
|
36
40
|
typeof window < "u" && window.dispatchEvent(new CustomEvent("logora:authentication:logout"));
|
|
37
41
|
};
|
|
38
42
|
return {
|
|
39
|
-
loginUser:
|
|
43
|
+
loginUser: h,
|
|
40
44
|
logoutUser: g,
|
|
41
45
|
fetchUser: c
|
|
42
46
|
};
|
|
@@ -35,7 +35,7 @@ const y = (l) => l?.replace(/ /g, " "), st = ({
|
|
|
35
35
|
sources: p,
|
|
36
36
|
hideSubmit: _ = !1,
|
|
37
37
|
hideSourceAction: A = !1,
|
|
38
|
-
onActivation:
|
|
38
|
+
onActivation: s,
|
|
39
39
|
disabled: B = !1,
|
|
40
40
|
handleChange: C,
|
|
41
41
|
handleSourcesChange: h,
|
|
@@ -51,14 +51,14 @@ const y = (l) => l?.replace(/ /g, " "), st = ({
|
|
|
51
51
|
autoFocus: a = !1,
|
|
52
52
|
...H
|
|
53
53
|
}) => {
|
|
54
|
-
const [
|
|
54
|
+
const [n, J] = f(a || g), [Q, W] = f(""), [$, q] = f(""), [d, u] = f([]), { showModal: D } = Me(), N = Ce(), v = Se(), E = xe(!1);
|
|
55
55
|
M(() => {
|
|
56
|
-
a && !E.current &&
|
|
57
|
-
}, [a,
|
|
56
|
+
a && !E.current && s && (E.current = !0, s());
|
|
57
|
+
}, [a, s]), M(() => {
|
|
58
58
|
p && u(p);
|
|
59
59
|
}, [p]);
|
|
60
60
|
const I = () => {
|
|
61
|
-
|
|
61
|
+
n || (J(!0), s && s());
|
|
62
62
|
}, F = {
|
|
63
63
|
editable: !B,
|
|
64
64
|
theme: Pe,
|
|
@@ -114,7 +114,7 @@ const y = (l) => l?.replace(/ /g, " "), st = ({
|
|
|
114
114
|
"div",
|
|
115
115
|
{
|
|
116
116
|
className: b(i.editorInner, {
|
|
117
|
-
[i.editorInnerInactive]: !
|
|
117
|
+
[i.editorInnerInactive]: !n && !g
|
|
118
118
|
}),
|
|
119
119
|
children: [
|
|
120
120
|
/* @__PURE__ */ e(
|
|
@@ -124,7 +124,7 @@ const y = (l) => l?.replace(/ /g, " "), st = ({
|
|
|
124
124
|
le,
|
|
125
125
|
{
|
|
126
126
|
className: b(i.editorInput, {
|
|
127
|
-
[i.editorInputInactive]: !
|
|
127
|
+
[i.editorInputInactive]: !n
|
|
128
128
|
}),
|
|
129
129
|
...H
|
|
130
130
|
}
|
|
@@ -142,14 +142,14 @@ const y = (l) => l?.replace(/ /g, " "), st = ({
|
|
|
142
142
|
shortBar: O,
|
|
143
143
|
onSubmit: V,
|
|
144
144
|
onAddSource: X,
|
|
145
|
-
isActive:
|
|
145
|
+
isActive: n || g,
|
|
146
146
|
sourceTooltip: T?.length > 0 && N.formatMessage({
|
|
147
147
|
id: "input.allowed_domains_tooltip",
|
|
148
148
|
defaultMessage: "With the new source function, you can add links to your article."
|
|
149
149
|
})
|
|
150
150
|
}
|
|
151
151
|
),
|
|
152
|
-
|
|
152
|
+
n && m && !k && /* @__PURE__ */ S("div", { className: i.charactersCount, children: [
|
|
153
153
|
/* @__PURE__ */ e(se, { maxLength: m }),
|
|
154
154
|
" ",
|
|
155
155
|
N.formatMessage({
|
|
@@ -170,7 +170,7 @@ const y = (l) => l?.replace(/ /g, " "), st = ({
|
|
|
170
170
|
),
|
|
171
171
|
/* @__PURE__ */ e(Ie, { content: w }),
|
|
172
172
|
/* @__PURE__ */ e(Re, { richContent: L }),
|
|
173
|
-
/* @__PURE__ */ e(Ne, { autoFocus: a }),
|
|
173
|
+
/* @__PURE__ */ e(Ne, { autoFocus: a, isActive: n }),
|
|
174
174
|
m && /* @__PURE__ */ e(ve, { maxLength: m }),
|
|
175
175
|
/* @__PURE__ */ e(Ee, { storageUid: P || v }),
|
|
176
176
|
/* @__PURE__ */ e(me, { editorRef: j })
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { useLexicalComposerContext as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useInput as
|
|
4
|
-
const
|
|
5
|
-
const [o] =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
o.getRootElement().focus();
|
|
1
|
+
import { useLexicalComposerContext as l } from "@lexical/react/LexicalComposerContext";
|
|
2
|
+
import { useRef as f, useEffect as r } from "react";
|
|
3
|
+
import { useInput as m } from "../../input_provider/useInput.js";
|
|
4
|
+
const d = ({ autoFocus: n = !1, isActive: t = !1 }) => {
|
|
5
|
+
const [o] = l(), { focus: s } = m(), u = f(!1), c = f(t), e = () => {
|
|
6
|
+
o.focus(() => {
|
|
7
|
+
o.getRootElement()?.focus();
|
|
9
8
|
});
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
};
|
|
10
|
+
return r(() => {
|
|
11
|
+
s && e();
|
|
12
|
+
}, [s, o]), r(() => {
|
|
13
|
+
n && !u.current && (u.current = !0, e());
|
|
14
|
+
}, [n, o]), r(() => {
|
|
15
|
+
t && !c.current && e(), c.current = t;
|
|
14
16
|
}, [t, o]), null;
|
|
15
17
|
};
|
|
16
18
|
export {
|
|
17
|
-
|
|
19
|
+
d as FocusPlugin
|
|
18
20
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import '../../../assets/components/navigation/tabs/Tabs.module-
|
|
1
|
+
import '../../../assets/components/navigation/tabs/Tabs.module-CYpmMK3l.css';const a = "_tabsWrapper_14x1i_3", r = "_navTabs_14x1i_11", t = "_arrow_14x1i_39", _ = "_arrowLeft_14x1i_63", n = "_arrowRight_14x1i_72", o = "_arrowHidden_14x1i_81", i = "_navItem_14x1i_86", s = "_navLink_14x1i_90", e = "_active_14x1i_120", c = {
|
|
2
2
|
tabsWrapper: a,
|
|
3
|
-
navTabs:
|
|
4
|
-
arrow:
|
|
5
|
-
arrowLeft:
|
|
6
|
-
arrowRight:
|
|
7
|
-
arrowHidden:
|
|
8
|
-
navItem:
|
|
9
|
-
navLink:
|
|
3
|
+
navTabs: r,
|
|
4
|
+
arrow: t,
|
|
5
|
+
arrowLeft: _,
|
|
6
|
+
arrowRight: n,
|
|
7
|
+
arrowHidden: o,
|
|
8
|
+
navItem: i,
|
|
9
|
+
navLink: s,
|
|
10
10
|
active: e
|
|
11
11
|
};
|
|
12
12
|
export {
|
|
13
13
|
e as active,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
t as arrow,
|
|
15
|
+
o as arrowHidden,
|
|
16
|
+
_ as arrowLeft,
|
|
17
|
+
n as arrowRight,
|
|
18
|
+
c as default,
|
|
19
|
+
i as navItem,
|
|
20
|
+
s as navLink,
|
|
21
|
+
r as navTabs,
|
|
22
22
|
a as tabsWrapper
|
|
23
23
|
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._tabsWrapper_s0wnb_3{position:relative;display:flex;align-items:stretch;width:100%;max-width:100%}._navTabs_s0wnb_11{display:flex;flex-wrap:nowrap;gap:var(--spacer-xs, calc(var(--space-unit, 1em) * .325));white-space:nowrap;padding-left:0;margin-top:0;margin-bottom:0;border-bottom:none!important;list-style:none;flex:1}@container (max-width: 575.98px){._navTabs_s0wnb_11{font-size:var(--font-size-normal, 16px);gap:var(--space-unit, 1em)}}._navTabs_s0wnb_11{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}._navTabs_s0wnb_11::-webkit-scrollbar{display:none}._arrow_s0wnb_38{position:absolute;top:0;bottom:0;z-index:2;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;padding:0;transition:opacity .2s ease;outline:none;background:none;line-height:0}._arrow_s0wnb_38 svg{display:block}._arrow_s0wnb_38:focus-visible{outline:2px solid var(--call-primary-color, #434343);outline-offset:-2px}._arrowLeft_s0wnb_62{left:0;padding-left:var(--spacer-xs, calc(var(--space-unit, 1em) * .325));background:linear-gradient(to right,var(--background-color-container, white) 40%,transparent)}._arrowLeft_s0wnb_62 svg{transform:rotate(90deg)}._arrowRight_s0wnb_71{right:0;padding-right:var(--spacer-xs, calc(var(--space-unit, 1em) * .325));background:linear-gradient(to left,var(--background-color-container, white) 40%,transparent)}._arrowRight_s0wnb_71 svg{transform:rotate(-90deg)}._arrowHidden_s0wnb_80{opacity:0;pointer-events:none}._navItem_s0wnb_85{cursor:pointer}._navLink_s0wnb_89{display:block;position:relative;padding:var(--spacer-md, calc(var(--space-unit, 1em) * .75)) var(--spacer-md, calc(var(--space-unit, 1em) * .75));border:none!important;color:var(--text-primary, #222222);outline:0}._navLink_s0wnb_89:hover,._navLink_s0wnb_89:focus{text-decoration:none;color:var(--text-primary, #222222)!important;background:transparent}._navLink_s0wnb_89._disabled_s0wnb_102{color:var(--darkest-text-tertiary, #c7c7c7);pointer-events:none;cursor:default}._navLink_s0wnb_89:after{content:"";background-color:var(--text-primary, #222222);height:2px;position:absolute;width:100%;left:0;bottom:0;z-index:1;transition:transform .25s ease 0s;transform:scaleX(0)}._navLink_s0wnb_89._active_s0wnb_119{color:var(--text-primary, #222222)!important;background:transparent;font-weight:var(--font-weight-bold, 700)}._navLink_s0wnb_89._active_s0wnb_119:after{transform:scaleX(1)}
|