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