@logora/debate 0.3.79 → 0.3.80
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/argument/argument/Argument.module-gLfNRLks.css +1 -0
- package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-BnTr5IaF.css +1 -0
- package/dist/assets/components/input/text_editor/{TextEditor.module-CxuSL3l3.css → TextEditor.module-DePSfOvG.css} +1 -1
- package/dist/assets/components/proposal/proposal_box/ProposalBox.module-T4ms_LQ7.css +1 -0
- package/dist/assets/components/section/section_box/SectionBox.module-DUeUtdWr.css +1 -0
- package/dist/assets/components/source/context_source_list/ContextSourceList.module-D6X_0dB7.css +1 -0
- package/dist/assets/components/source/source_list_item/SourceListItem.module-mTxHhXPV.css +1 -0
- package/dist/assets/components/summary/summary/Summary.module-DjfmUlkW.css +1 -0
- package/dist/assets/components/summary/summary_box/SummaryBox.module-DQVkA8l7.css +1 -0
- package/dist/assets/components/vote/vote_box/VoteBox.module-CDrqb2SZ.css +1 -0
- package/dist/components/argument/argument/Argument.js +108 -113
- package/dist/components/argument/argument/Argument.module.scss.js +31 -31
- package/dist/components/consultation/consultation_box/ConsultationBox.js +111 -80
- package/dist/components/consultation/consultation_box/ConsultationBox.module.scss.js +29 -31
- package/dist/components/dialog/dropdown/Dropdown.js +28 -35
- package/dist/components/icons/spiegel_icons/index.js +46 -46
- package/dist/components/icons/stern_icons/index.js +70 -100
- package/dist/components/input/argument_input/ArgumentInput.js +186 -187
- package/dist/components/input/select/Select.js +19 -19
- package/dist/components/input/text_editor/TextEditor.js +129 -143
- package/dist/components/input/text_editor/TextEditor.module.scss.js +5 -5
- package/dist/components/input/text_editor/plugins/FocusPlugin.js +8 -12
- package/dist/components/input/text_editor/plugins/SetContentPlugin.js +13 -13
- package/dist/components/input/text_editor/plugins/SetRichContentPlugin.js +10 -10
- package/dist/components/list/paginated_list/PaginatedList.js +110 -112
- package/dist/components/notification/notification_menu/NotificationMenu.js +22 -23
- package/dist/components/proposal/proposal_box/ProposalBox.js +49 -58
- package/dist/components/proposal/proposal_box/ProposalBox.module.scss.js +12 -14
- package/dist/components/section/section_box/SectionBox.js +10 -10
- package/dist/components/section/section_box/SectionBox.module.scss.js +9 -9
- package/dist/components/source/context_source_box/ContextSourceBox.js +7 -7
- package/dist/components/source/context_source_list/ContextSourceList.js +13 -10
- package/dist/components/source/context_source_list/ContextSourceList.module.scss.js +12 -14
- package/dist/components/source/source_list_item/SourceListItem.js +28 -42
- package/dist/components/source/source_list_item/SourceListItem.module.scss.js +6 -8
- package/dist/components/source/source_modal/SourceModal.js +15 -15
- package/dist/components/summary/summary/Summary.js +63 -41
- package/dist/components/summary/summary/Summary.module.scss.js +6 -10
- package/dist/components/summary/summary_box/SummaryBox.module.scss.js +9 -9
- package/dist/components/vote/vote_box/VoteBox.js +145 -123
- package/dist/components/vote/vote_box/VoteBox.module.scss.js +50 -50
- package/package.json +1 -1
- package/dist/assets/components/argument/argument/Argument.module-QZdPjj_i.css +0 -1
- package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-DjNiVt-p.css +0 -1
- package/dist/assets/components/proposal/proposal_box/ProposalBox.module-C9BaTFDH.css +0 -1
- package/dist/assets/components/section/section_box/SectionBox.module-qQs4B6bf.css +0 -1
- package/dist/assets/components/source/context_source_list/ContextSourceList.module-DUPbI-wb.css +0 -1
- package/dist/assets/components/source/source_list_item/SourceListItem.module-fm_uHuY4.css +0 -1
- package/dist/assets/components/summary/summary/Summary.module-2bnx3egy.css +0 -1
- package/dist/assets/components/summary/summary_box/SummaryBox.module-Dr9PevSJ.css +0 -1
- package/dist/assets/components/vote/vote_box/VoteBox.module-C9Q6gBw3.css +0 -1
- package/dist/components/icons/spiegel_icons/Downvote.js +0 -6
- package/dist/components/icons/spiegel_icons/Upvote.js +0 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as c, jsxs as
|
|
1
|
+
import { jsx as c, jsxs as u } from "react/jsx-runtime";
|
|
2
2
|
import h from "classnames";
|
|
3
3
|
import { useState as b, useEffect as p } from "react";
|
|
4
|
-
import
|
|
4
|
+
import r from "./Select.module.scss.js";
|
|
5
5
|
import { Dropdown as k } from "../../dialog/dropdown/Dropdown.js";
|
|
6
6
|
import { Icon as y } from "../../icons/icon/Icon.js";
|
|
7
|
-
const
|
|
7
|
+
const I = ({
|
|
8
8
|
options: a,
|
|
9
9
|
defaultOption: n,
|
|
10
10
|
onChange: s,
|
|
@@ -13,7 +13,7 @@ const N = ({
|
|
|
13
13
|
className: m,
|
|
14
14
|
horizontalPosition: v = "left"
|
|
15
15
|
}) => {
|
|
16
|
-
const d = n ? a.filter((e) => e.name === n)[0] : a[0], [
|
|
16
|
+
const d = n ? a.filter((e) => e.name === n)[0] : a[0], [f, l] = b(d);
|
|
17
17
|
p(() => {
|
|
18
18
|
i === !0 && l(d);
|
|
19
19
|
}, [i]), p(() => {
|
|
@@ -22,29 +22,29 @@ const N = ({
|
|
|
22
22
|
const w = (e) => {
|
|
23
23
|
l(e), s && s(e);
|
|
24
24
|
}, x = (e) => {
|
|
25
|
-
const
|
|
25
|
+
const t = e.currentTarget;
|
|
26
26
|
switch (e.key) {
|
|
27
27
|
case "Enter":
|
|
28
28
|
case " ":
|
|
29
|
-
e.preventDefault(),
|
|
29
|
+
e.preventDefault(), t.click();
|
|
30
30
|
break;
|
|
31
31
|
case "ArrowDown":
|
|
32
|
-
e.preventDefault(),
|
|
32
|
+
e.preventDefault(), t.nextElementSibling?.focus();
|
|
33
33
|
break;
|
|
34
34
|
case "ArrowUp":
|
|
35
|
-
e.preventDefault(),
|
|
35
|
+
e.preventDefault(), t.previousElementSibling?.focus();
|
|
36
36
|
break;
|
|
37
37
|
}
|
|
38
38
|
}, D = (e) => {
|
|
39
|
-
const
|
|
39
|
+
const t = f?.name === e.name;
|
|
40
40
|
return e.name !== "" && /* @__PURE__ */ c(
|
|
41
41
|
"div",
|
|
42
42
|
{
|
|
43
43
|
role: "option",
|
|
44
|
-
"aria-selected":
|
|
44
|
+
"aria-selected": t,
|
|
45
45
|
tabIndex: 0,
|
|
46
|
-
className: h(
|
|
47
|
-
[
|
|
46
|
+
className: h(r.selectOption, {
|
|
47
|
+
[r.selectOptionActive]: t
|
|
48
48
|
}),
|
|
49
49
|
value: e.value,
|
|
50
50
|
"data-tid": e.dataTid,
|
|
@@ -55,22 +55,22 @@ const N = ({
|
|
|
55
55
|
e.value
|
|
56
56
|
);
|
|
57
57
|
};
|
|
58
|
-
return /* @__PURE__ */ c("div", { className:
|
|
59
|
-
/* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ c("div", { className: r.selectContainer, children: /* @__PURE__ */ u(k, { horizontalPosition: v, children: [
|
|
59
|
+
/* @__PURE__ */ u(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
62
|
-
className: h(
|
|
62
|
+
className: h(r.selectInput, {
|
|
63
63
|
[m]: m,
|
|
64
|
-
[
|
|
64
|
+
[r.disabled]: o
|
|
65
65
|
}),
|
|
66
66
|
children: [
|
|
67
|
-
/* @__PURE__ */ c("span", { className:
|
|
67
|
+
/* @__PURE__ */ c("span", { className: r.currentOptionText, children: f?.text }),
|
|
68
68
|
" ",
|
|
69
69
|
/* @__PURE__ */ c(
|
|
70
70
|
y,
|
|
71
71
|
{
|
|
72
72
|
name: "lightArrow",
|
|
73
|
-
className:
|
|
73
|
+
className: r.arrowDown,
|
|
74
74
|
height: 10,
|
|
75
75
|
width: 10
|
|
76
76
|
}
|
|
@@ -82,5 +82,5 @@ const N = ({
|
|
|
82
82
|
] }) });
|
|
83
83
|
};
|
|
84
84
|
export {
|
|
85
|
-
|
|
85
|
+
I as Select
|
|
86
86
|
};
|
|
@@ -1,185 +1,171 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ListNode as
|
|
3
|
-
import { OverflowNode as
|
|
4
|
-
import { CharacterLimitPlugin as
|
|
5
|
-
import { LexicalComposer as
|
|
6
|
-
import { ContentEditable as
|
|
7
|
-
import { EditorRefPlugin as
|
|
8
|
-
import { LexicalErrorBoundary as
|
|
9
|
-
import { HistoryPlugin as
|
|
10
|
-
import { ListPlugin as
|
|
11
|
-
import { OnChangePlugin as
|
|
12
|
-
import { RichTextPlugin as
|
|
13
|
-
import { QuoteNode as
|
|
14
|
-
import
|
|
15
|
-
import { $getRoot as
|
|
16
|
-
import { useState as
|
|
17
|
-
import { useIntl as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { AutoSavePlugin as
|
|
21
|
-
import { FocusPlugin as
|
|
22
|
-
import { MaxLengthPlugin as
|
|
23
|
-
import { ResetPlugin as
|
|
24
|
-
import { SetContentPlugin as
|
|
25
|
-
import { SetRichContentPlugin as
|
|
26
|
-
import { ToolbarPlugin as
|
|
27
|
-
import { useModal as
|
|
28
|
-
import { SourceModal as
|
|
29
|
-
import { SourceListItem as
|
|
30
|
-
const
|
|
1
|
+
import { jsxs as u, Fragment as X, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { ListNode as Y, ListItemNode as Z } from "@lexical/list";
|
|
3
|
+
import { OverflowNode as tt } from "@lexical/overflow";
|
|
4
|
+
import { CharacterLimitPlugin as ot } from "@lexical/react/LexicalCharacterLimitPlugin";
|
|
5
|
+
import { LexicalComposer as et } from "@lexical/react/LexicalComposer";
|
|
6
|
+
import { ContentEditable as rt } from "@lexical/react/LexicalContentEditable";
|
|
7
|
+
import { EditorRefPlugin as it } from "@lexical/react/LexicalEditorRefPlugin";
|
|
8
|
+
import { LexicalErrorBoundary as nt } from "@lexical/react/LexicalErrorBoundary";
|
|
9
|
+
import { HistoryPlugin as st } from "@lexical/react/LexicalHistoryPlugin";
|
|
10
|
+
import { ListPlugin as lt } from "@lexical/react/LexicalListPlugin";
|
|
11
|
+
import { OnChangePlugin as ct } from "@lexical/react/LexicalOnChangePlugin";
|
|
12
|
+
import { RichTextPlugin as mt } from "@lexical/react/LexicalRichTextPlugin";
|
|
13
|
+
import { QuoteNode as at } from "@lexical/rich-text";
|
|
14
|
+
import I from "classnames";
|
|
15
|
+
import { $getRoot as dt } from "lexical";
|
|
16
|
+
import { useState as a, useId as ft, useEffect as b } from "react";
|
|
17
|
+
import { useIntl as ut } from "react-intl";
|
|
18
|
+
import pt from "./EditorTheme.js";
|
|
19
|
+
import e from "./TextEditor.module.scss.js";
|
|
20
|
+
import { AutoSavePlugin as ht } from "./plugins/AutoSavePlugin.js";
|
|
21
|
+
import { FocusPlugin as gt } from "./plugins/FocusPlugin.js";
|
|
22
|
+
import { MaxLengthPlugin as xt } from "./plugins/MaxLengthPlugin.js";
|
|
23
|
+
import { ResetPlugin as St } from "./plugins/ResetPlugin.js";
|
|
24
|
+
import { SetContentPlugin as Ct } from "./plugins/SetContentPlugin.js";
|
|
25
|
+
import { SetRichContentPlugin as Pt } from "./plugins/SetRichContentPlugin.js";
|
|
26
|
+
import { ToolbarPlugin as Tt } from "./plugins/ToolbarPlugin.js";
|
|
27
|
+
import { useModal as vt } from "../../dialog/modal/useModal.js";
|
|
28
|
+
import { SourceModal as Nt } from "../../source/source_modal/SourceModal.js";
|
|
29
|
+
import { SourceListItem as Et } from "../../source/source_list_item/SourceListItem.js";
|
|
30
|
+
const M = (l) => l?.replace(/ /g, " "), to = ({
|
|
31
31
|
placeholder: l,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
disableAutoActivate: z = !1,
|
|
51
|
-
autoFocus: a = !1,
|
|
52
|
-
...H
|
|
32
|
+
onSubmit: p,
|
|
33
|
+
sources: r,
|
|
34
|
+
hideSubmit: y = !1,
|
|
35
|
+
hideSourceAction: R = !1,
|
|
36
|
+
onActivation: h,
|
|
37
|
+
disabled: w = !1,
|
|
38
|
+
handleChange: g,
|
|
39
|
+
handleSourcesChange: x,
|
|
40
|
+
shortBar: A = !1,
|
|
41
|
+
active: S = !1,
|
|
42
|
+
maxLength: c,
|
|
43
|
+
disableRichText: L = !1,
|
|
44
|
+
editorRef: _,
|
|
45
|
+
uid: C,
|
|
46
|
+
allowedDomains: P = [],
|
|
47
|
+
hideCharCount: B = !1,
|
|
48
|
+
disableAutoActivate: F = !1,
|
|
49
|
+
...O
|
|
53
50
|
}) => {
|
|
54
|
-
const [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}, [
|
|
58
|
-
|
|
59
|
-
}, [
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
editable: !
|
|
64
|
-
theme:
|
|
65
|
-
onError(
|
|
66
|
-
console.error("TextEditor error:",
|
|
51
|
+
const [n, U] = a(!1), [j, k] = a(""), [z, H] = a(""), [s, d] = a([]), { showModal: J } = vt(), T = ut(), v = ft();
|
|
52
|
+
b(() => {
|
|
53
|
+
r && r.length > 0 && d(r);
|
|
54
|
+
}, [r]), b(() => {
|
|
55
|
+
x && s.length > 0 && x(s);
|
|
56
|
+
}, [s]);
|
|
57
|
+
const N = () => {
|
|
58
|
+
n || (U(!0), h && h());
|
|
59
|
+
}, Q = {
|
|
60
|
+
editable: !w,
|
|
61
|
+
theme: pt,
|
|
62
|
+
onError(o) {
|
|
63
|
+
console.error("TextEditor error:", o);
|
|
67
64
|
},
|
|
68
|
-
nodes: [
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
65
|
+
nodes: [Y, Z, at, tt]
|
|
66
|
+
}, W = () => {
|
|
67
|
+
N();
|
|
68
|
+
}, $ = (o) => {
|
|
69
|
+
o.read(() => {
|
|
70
|
+
const i = dt().getTextContent(), m = M(i), f = JSON.stringify(o), E = M(f);
|
|
71
|
+
k(m), H(E), g && g(m, E);
|
|
75
72
|
});
|
|
76
|
-
},
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
73
|
+
}, q = (o) => {
|
|
74
|
+
const i = j, m = z, f = s;
|
|
75
|
+
p && (o.preventDefault(), p(i, m, f)), d([]);
|
|
76
|
+
}, D = () => {
|
|
77
|
+
J(
|
|
78
|
+
/* @__PURE__ */ t(
|
|
79
|
+
Nt,
|
|
83
80
|
{
|
|
84
|
-
onAddSource:
|
|
85
|
-
allowedSources:
|
|
81
|
+
onAddSource: G,
|
|
82
|
+
allowedSources: P
|
|
86
83
|
}
|
|
87
84
|
)
|
|
88
85
|
);
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
});
|
|
94
|
-
}, Z = (t) => {
|
|
95
|
-
u((o) => {
|
|
96
|
-
const r = o.filter(
|
|
97
|
-
(c) => c.source_url !== t.source_url
|
|
98
|
-
);
|
|
99
|
-
return h?.(r), r;
|
|
100
|
-
});
|
|
101
|
-
}, ee = (t, o) => /* @__PURE__ */ e(
|
|
102
|
-
we,
|
|
86
|
+
}, G = (o) => {
|
|
87
|
+
d([...s, o]);
|
|
88
|
+
}, K = (o, i) => /* @__PURE__ */ t(
|
|
89
|
+
Et,
|
|
103
90
|
{
|
|
104
|
-
publisher:
|
|
105
|
-
url:
|
|
106
|
-
title:
|
|
107
|
-
index:
|
|
108
|
-
onRemove: () => Z(t)
|
|
91
|
+
publisher: o.publisher,
|
|
92
|
+
url: o.source_url,
|
|
93
|
+
title: o.title,
|
|
94
|
+
index: i
|
|
109
95
|
},
|
|
110
|
-
|
|
111
|
-
),
|
|
112
|
-
return /* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */
|
|
96
|
+
i
|
|
97
|
+
), V = () => /* @__PURE__ */ t("div", { className: e.editorPlaceholder, children: l });
|
|
98
|
+
return /* @__PURE__ */ u(X, { children: [
|
|
99
|
+
/* @__PURE__ */ t(et, { initialConfig: Q, children: /* @__PURE__ */ t("div", { className: e.editorContainer, onClick: W, children: /* @__PURE__ */ u(
|
|
114
100
|
"div",
|
|
115
101
|
{
|
|
116
|
-
className:
|
|
117
|
-
[
|
|
102
|
+
className: I(e.editorInner, {
|
|
103
|
+
[e.editorInnerInactive]: !n && !S
|
|
118
104
|
}),
|
|
119
105
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
|
|
106
|
+
/* @__PURE__ */ t(
|
|
107
|
+
mt,
|
|
122
108
|
{
|
|
123
|
-
contentEditable: /* @__PURE__ */
|
|
124
|
-
|
|
109
|
+
contentEditable: /* @__PURE__ */ t(
|
|
110
|
+
rt,
|
|
125
111
|
{
|
|
126
|
-
className:
|
|
127
|
-
[
|
|
112
|
+
className: I(e.editorInput, {
|
|
113
|
+
[e.editorInputInactive]: !n
|
|
128
114
|
}),
|
|
129
|
-
...
|
|
115
|
+
...O
|
|
130
116
|
}
|
|
131
117
|
),
|
|
132
|
-
placeholder: l && /* @__PURE__ */
|
|
133
|
-
ErrorBoundary:
|
|
118
|
+
placeholder: l && /* @__PURE__ */ t(V, {}),
|
|
119
|
+
ErrorBoundary: nt
|
|
134
120
|
}
|
|
135
121
|
),
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
|
|
122
|
+
/* @__PURE__ */ t(
|
|
123
|
+
Tt,
|
|
138
124
|
{
|
|
139
|
-
hideSourceAction:
|
|
140
|
-
hideSubmit:
|
|
141
|
-
disableRichText:
|
|
142
|
-
shortBar:
|
|
143
|
-
onSubmit:
|
|
144
|
-
onAddSource:
|
|
145
|
-
isActive:
|
|
146
|
-
sourceTooltip:
|
|
125
|
+
hideSourceAction: R,
|
|
126
|
+
hideSubmit: y,
|
|
127
|
+
disableRichText: L,
|
|
128
|
+
shortBar: A,
|
|
129
|
+
onSubmit: q,
|
|
130
|
+
onAddSource: D,
|
|
131
|
+
isActive: n || S,
|
|
132
|
+
sourceTooltip: P?.length > 0 && T.formatMessage({
|
|
147
133
|
id: "input.allowed_domains_tooltip",
|
|
148
134
|
defaultMessage: "With the new source function, you can add links to your article."
|
|
149
135
|
})
|
|
150
136
|
}
|
|
151
137
|
),
|
|
152
|
-
|
|
153
|
-
/* @__PURE__ */
|
|
138
|
+
n && c && !B && /* @__PURE__ */ u("div", { className: e.charactersCount, children: [
|
|
139
|
+
/* @__PURE__ */ t(ot, { maxLength: c }),
|
|
154
140
|
" ",
|
|
155
|
-
|
|
141
|
+
T.formatMessage({
|
|
156
142
|
id: "input.remaining_chars",
|
|
157
143
|
defaultMessage: "remaining characters"
|
|
158
144
|
})
|
|
159
145
|
] }),
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
|
|
146
|
+
/* @__PURE__ */ t(lt, {}),
|
|
147
|
+
/* @__PURE__ */ t(st, {}),
|
|
148
|
+
/* @__PURE__ */ t(ct, { onChange: $, ignoreSelectionChange: !0 }),
|
|
149
|
+
/* @__PURE__ */ t(
|
|
150
|
+
ht,
|
|
165
151
|
{
|
|
166
|
-
onSetContent:
|
|
167
|
-
} :
|
|
168
|
-
storageUid:
|
|
152
|
+
onSetContent: F ? () => {
|
|
153
|
+
} : N,
|
|
154
|
+
storageUid: C || v
|
|
169
155
|
}
|
|
170
156
|
),
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ t(Ct, {}),
|
|
158
|
+
/* @__PURE__ */ t(Pt, {}),
|
|
159
|
+
/* @__PURE__ */ t(gt, {}),
|
|
160
|
+
c && /* @__PURE__ */ t(xt, { maxLength: c }),
|
|
161
|
+
/* @__PURE__ */ t(St, { storageUid: C || v }),
|
|
162
|
+
/* @__PURE__ */ t(it, { editorRef: _ })
|
|
177
163
|
]
|
|
178
164
|
}
|
|
179
165
|
) }) }),
|
|
180
|
-
|
|
166
|
+
r && r.length !== 0 ? /* @__PURE__ */ t("div", { className: e.sourcesBox, children: /* @__PURE__ */ t("div", { className: e.sourceList, children: r.map(K) }) }) : null
|
|
181
167
|
] });
|
|
182
168
|
};
|
|
183
169
|
export {
|
|
184
|
-
|
|
170
|
+
to as TextEditor
|
|
185
171
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../../../assets/components/input/text_editor/TextEditor.module-
|
|
1
|
+
import '../../../assets/components/input/text_editor/TextEditor.module-DePSfOvG.css';const t = "_ltr_1m7ly_3", e = "_editorContainer_1m7ly_7", o = "_editorInner_1m7ly_14", r = "_editorInnerInactive_1m7ly_18", i = "_editorPlaceholder_1m7ly_23", n = "_editorInput_1m7ly_35", d = "_editorInputInactive_1m7ly_46", _ = "_editorTextBold_1m7ly_51", s = "_editorTextItalic_1m7ly_55", l = "_editorTextUnderline_1m7ly_59", c = "_editorTextStrikethrough_1m7ly_63", a = "_editorTextUnderlineStrikethrough_1m7ly_67", I = "_editorParagraph_1m7ly_71", m = "_editorQuote_1m7ly_81", u = "_editorListOl_1m7ly_91", h = "_editorListItem_1m7ly_98", y = "_editorNestedListItem_1m7ly_105", x = "_sourcesBox_1m7ly_118", T = "_sourceList_1m7ly_129", L = "_charactersCount_1m7ly_140", p = {
|
|
2
2
|
ltr: t,
|
|
3
3
|
editorContainer: e,
|
|
4
4
|
editorInner: o,
|
|
@@ -12,10 +12,10 @@ import '../../../assets/components/input/text_editor/TextEditor.module-CxuSL3l3.
|
|
|
12
12
|
editorTextStrikethrough: c,
|
|
13
13
|
editorTextUnderlineStrikethrough: a,
|
|
14
14
|
editorParagraph: I,
|
|
15
|
-
editorQuote:
|
|
15
|
+
editorQuote: m,
|
|
16
16
|
editorListOl: u,
|
|
17
17
|
editorListItem: h,
|
|
18
|
-
editorNestedListItem:
|
|
18
|
+
editorNestedListItem: y,
|
|
19
19
|
sourcesBox: x,
|
|
20
20
|
sourceList: T,
|
|
21
21
|
charactersCount: L
|
|
@@ -30,10 +30,10 @@ export {
|
|
|
30
30
|
d as editorInputInactive,
|
|
31
31
|
h as editorListItem,
|
|
32
32
|
u as editorListOl,
|
|
33
|
-
|
|
33
|
+
y as editorNestedListItem,
|
|
34
34
|
I as editorParagraph,
|
|
35
35
|
i as editorPlaceholder,
|
|
36
|
-
|
|
36
|
+
m as editorQuote,
|
|
37
37
|
_ as editorTextBold,
|
|
38
38
|
s as editorTextItalic,
|
|
39
39
|
c as editorTextStrikethrough,
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import { useLexicalComposerContext as
|
|
2
|
-
import {
|
|
3
|
-
import { useInput as
|
|
4
|
-
const
|
|
5
|
-
const [o] =
|
|
6
|
-
return
|
|
7
|
-
|
|
1
|
+
import { useLexicalComposerContext as e } from "@lexical/react/LexicalComposerContext";
|
|
2
|
+
import { useEffect as r } from "react";
|
|
3
|
+
import { useInput as n } from "../../input_provider/useInput.js";
|
|
4
|
+
const f = () => {
|
|
5
|
+
const [o] = e(), { focus: t } = n();
|
|
6
|
+
return r(() => {
|
|
7
|
+
t && o.focus(() => {
|
|
8
8
|
o.getRootElement().focus();
|
|
9
9
|
});
|
|
10
|
-
}, [e, o]), s(() => {
|
|
11
|
-
t && !r.current && (r.current = !0, o.focus(() => {
|
|
12
|
-
o.getRootElement().focus();
|
|
13
|
-
}));
|
|
14
10
|
}, [t, o]), null;
|
|
15
11
|
};
|
|
16
12
|
export {
|
|
17
|
-
|
|
13
|
+
f as FocusPlugin
|
|
18
14
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { useLexicalComposerContext as
|
|
2
|
-
import { $getRoot as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { useInput as
|
|
5
|
-
const
|
|
6
|
-
const [
|
|
7
|
-
return
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
1
|
+
import { useLexicalComposerContext as p } from "@lexical/react/LexicalComposerContext";
|
|
2
|
+
import { $getRoot as u, $createParagraphNode as a, $createTextNode as c } from "lexical";
|
|
3
|
+
import { useEffect as s } from "react";
|
|
4
|
+
import { useInput as i } from "../../input_provider/useInput.js";
|
|
5
|
+
const C = () => {
|
|
6
|
+
const [n] = p(), { inputContent: t, setInputContent: r } = i();
|
|
7
|
+
return s(() => {
|
|
8
|
+
t && n.update(() => {
|
|
9
|
+
const e = u();
|
|
10
|
+
e.clear();
|
|
11
|
+
const o = a();
|
|
12
|
+
o.append(c(t)), e.append(o), r(null);
|
|
13
13
|
});
|
|
14
14
|
}, [t]), null;
|
|
15
15
|
};
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
C as SetContentPlugin
|
|
18
18
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { useLexicalComposerContext as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import { useInput as
|
|
4
|
-
const m = (
|
|
5
|
-
const [t] =
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
t.setEditorState(
|
|
1
|
+
import { useLexicalComposerContext as r } from "@lexical/react/LexicalComposerContext";
|
|
2
|
+
import { useEffect as i } from "react";
|
|
3
|
+
import { useInput as s } from "../../input_provider/useInput.js";
|
|
4
|
+
const m = () => {
|
|
5
|
+
const [t] = r(), { inputRichContent: e, setInputRichContent: o } = s();
|
|
6
|
+
return i(() => {
|
|
7
|
+
e && t.update(() => {
|
|
8
|
+
const n = t.parseEditorState(e);
|
|
9
|
+
t.setEditorState(n), o(null);
|
|
10
10
|
});
|
|
11
|
-
}, [
|
|
11
|
+
}, [e]), null;
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
14
|
m as SetRichContentPlugin
|