@logora/debate 0.4.42 → 0.4.44
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/action/back_link/BackLink.module-B9Ok2t4H.css +1 -0
- package/dist/assets/components/action/button/Button.module-D7nbgOES.css +1 -0
- package/dist/assets/components/action/icon_text_link/IconTextLink.module-CZKufK9Y.css +1 -0
- package/dist/assets/components/argument/argument/Argument.module-CC40BY1L.css +1 -0
- package/dist/assets/components/argument/argument/ReplyFooter.module-CoC9dY8T.css +1 -0
- package/dist/assets/components/auth/sso_form/SSOForm.module-DOw9cmCF.css +1 -0
- package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-97r47y_e.css +1 -0
- package/dist/assets/components/debate/debate_box/DebateBox.module-emnqIGNF.css +1 -0
- package/dist/assets/components/dialog/dialog_box/DialogBox.module-ZoM8d2Ly.css +1 -0
- package/dist/assets/components/dialog/dropdown/Dropdown.module-BmT3rAwz.css +1 -0
- package/dist/assets/components/dialog/modal/Modal.module-Dt4SWx6U.css +1 -0
- package/dist/assets/components/dialog/toast/Toast.module-CW6j5xe7.css +1 -0
- package/dist/assets/components/dialog/tooltip/Tooltip.module-bQbmPiMf.css +1 -0
- package/dist/assets/components/embed/embed_header/EmbedHeader.module-C8RPiVBp.css +1 -0
- package/dist/assets/components/follow/follow_button/FollowButton.module-BjwLVTeb.css +1 -0
- package/dist/assets/components/gamification/badge_box/BadgeBox.module-DWqqtICw.css +1 -0
- package/dist/assets/components/gamification/point_box/{PointBox.module-BlHdQyht.css → PointBox.module-Dj6cCgSB.css} +1 -1
- package/dist/assets/components/information/information_box/InformationBox.module-DJLT957y.css +1 -0
- package/dist/assets/components/input/text_editor/TextEditor.module-KPtqT1Y6.css +1 -0
- package/dist/assets/components/input/text_editor/plugins/ToolbarPlugin.module-C3yG2biv.css +1 -0
- package/dist/assets/components/input/toggle_position/TogglePosition.module-H4gGmJ0V.css +1 -0
- package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-BDMBrj2Y.css +1 -0
- package/dist/assets/components/navigation/tabs/Tabs.module-50P6bk0B.css +1 -0
- package/dist/assets/components/notification/notification_item/NotificationItem.module-BQcDopYB.css +1 -0
- package/dist/assets/components/notification/notification_menu/NotificationMenu.module-DrCrfzVk.css +1 -0
- package/dist/assets/components/progress/progress_bar/ProgressBar.module-DoCH9Qoo.css +1 -0
- package/dist/assets/components/proposal/proposal_box/ProposalBox.module-D1ccjSLm.css +1 -0
- package/dist/assets/components/section/section_box/SectionBox.module-DF7k7Vxq.css +1 -0
- package/dist/assets/components/share/share_button/{ShareButton.module-BS6STEUD.css → ShareButton.module-BnVEYTzr.css} +1 -1
- package/dist/assets/components/skeleton/user_content_skeleton/UserContentSkeleton.module-d4r3QpYe.css +1 -0
- package/dist/assets/components/source/context_source_box/ContextSourceBox.module-doiSb_NR.css +1 -0
- package/dist/assets/components/source/context_source_list/ContextSourceList.module-Df4z4DN-.css +1 -0
- package/dist/assets/components/source/source_box/SourceBox.module-CQOBgJ5n.css +1 -0
- package/dist/assets/components/source/source_list_item/SourceListItem.module-C5YDjksb.css +1 -0
- package/dist/assets/components/suggestion/suggestion_banner/SuggestionBanner.module-P95xqaUA.css +1 -0
- package/dist/assets/components/suggestion/suggestion_box/SuggestionBox.module-CE_Wvk-K.css +1 -0
- package/dist/assets/components/suggestion/suggestion_input/SuggestionInput.module-r5N57bDp.css +1 -0
- package/dist/assets/components/summary/argument_summary_box/ArgumentSummaryBox.module-EDxcqwRa.css +1 -0
- package/dist/assets/components/summary/keyword_box/KeywordBox.module-yNHAvcRh.css +1 -0
- package/dist/assets/components/summary/summary_box/SummaryBox.module-Bu-AnMIG.css +1 -0
- package/dist/assets/components/text/read_more/ReadMore.module-Bs-YaspR.css +1 -0
- package/dist/assets/components/user/author_box/AuthorBox.module-B8Sl2v33.css +1 -0
- package/dist/assets/components/user/onboarding_modal/OnboardingModal.module-CTpt3xSh.css +1 -0
- package/dist/assets/components/user/user_box/UserBox.module-DMFhZDAH.css +1 -0
- package/dist/assets/components/user/user_box_small/UserBoxSmall.module-D4Ut5xmS.css +1 -0
- package/dist/assets/components/user_content/content_footer/ContentFooter.module-9A9E8k5l.css +1 -0
- package/dist/assets/components/user_content/content_header/ContentHeader.module-CXO2IRui.css +1 -0
- package/dist/assets/components/user_content/summary_content_box/SummaryContentBox.module-CBlL2Xii.css +1 -0
- package/dist/assets/components/user_content/use_report_content/ReportModal.module-mjFuOdmL.css +1 -0
- package/dist/assets/components/vote/suggestion_vote_box/SuggestionVoteBox.module-CKFriPV5.css +1 -0
- package/dist/assets/components/vote/vote_box/VoteBox.module-BZU12qxT.css +1 -0
- package/dist/assets/components/vote/vote_button/VoteButton.module-DqD79xv_.css +1 -0
- package/dist/components/action/back_link/BackLink.module.scss.js +1 -1
- package/dist/components/action/button/Button.module.scss.js +9 -9
- package/dist/components/action/icon_text_link/IconTextLink.module.scss.js +2 -2
- package/dist/components/argument/argument/Argument.js +120 -112
- package/dist/components/argument/argument/Argument.module.scss.js +40 -40
- package/dist/components/argument/argument/ReplyFooter.module.scss.js +8 -8
- package/dist/components/auth/auth_initializer/AuthInitializer.js +58 -41
- package/dist/components/auth/providers/FormAuth.js +6 -3
- package/dist/components/auth/providers/PasswordAuth.js +6 -6
- package/dist/components/auth/sso_form/SSOForm.module.scss.js +20 -20
- package/dist/components/auth/use_auth/base64.js +4 -0
- package/dist/components/auth/use_auth/useAuthActions.js +24 -24
- package/dist/components/consultation/consultation_box/ConsultationBox.js +4 -3
- package/dist/components/consultation/consultation_box/ConsultationBox.module.scss.js +25 -25
- package/dist/components/debate/debate_box/DebateBox.module.scss.js +20 -20
- package/dist/components/dialog/dialog_box/DialogBox.module.scss.js +14 -14
- package/dist/components/dialog/dropdown/Dropdown.js +19 -17
- package/dist/components/dialog/dropdown/Dropdown.module.scss.js +17 -13
- package/dist/components/dialog/modal/Modal.module.scss.js +9 -9
- package/dist/components/dialog/toast/Toast.module.scss.js +18 -18
- package/dist/components/dialog/tooltip/Tooltip.module.scss.js +8 -8
- package/dist/components/embed/embed_header/EmbedHeader.module.scss.js +18 -18
- package/dist/components/follow/follow_button/FollowButton.module.scss.js +1 -1
- package/dist/components/forms/use_form_validation/useFormValidation.js +1 -1
- package/dist/components/gamification/badge_box/BadgeBox.module.scss.js +18 -18
- package/dist/components/gamification/point_box/PointBox.module.scss.js +1 -1
- package/dist/components/icons/clarin_icons/Alarm.js +6 -0
- package/dist/components/icons/clarin_icons/Announcement.js +6 -0
- package/dist/components/icons/clarin_icons/Chat.js +6 -0
- package/dist/components/icons/clarin_icons/CheckCircle.js +9 -0
- package/dist/components/icons/clarin_icons/Clock.js +6 -0
- package/dist/components/icons/clarin_icons/Follow.js +6 -0
- package/dist/components/icons/clarin_icons/MobileClose.js +9 -0
- package/dist/components/icons/clarin_icons/Question.js +6 -0
- package/dist/components/icons/clarin_icons/Search.js +6 -0
- package/dist/components/icons/clarin_icons/Send.js +6 -0
- package/dist/components/icons/clarin_icons/Share.js +6 -0
- package/dist/components/icons/clarin_icons/Upvote.js +9 -0
- package/dist/components/icons/clarin_icons/User.js +9 -0
- package/dist/components/icons/clarin_icons/index.js +106 -0
- package/dist/components/information/information_box/InformationBox.module.scss.js +4 -4
- package/dist/components/input/argument_input/ArgumentInput.js +172 -167
- package/dist/components/input/text_editor/TextEditor.js +49 -47
- package/dist/components/input/text_editor/TextEditor.module.scss.js +28 -28
- package/dist/components/input/text_editor/plugins/IOSInsertParagraphFallbackPlugin.js +34 -0
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +143 -94
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.module.scss.js +19 -19
- package/dist/components/input/toggle_position/TogglePosition.module.scss.js +4 -4
- package/dist/components/list/paginated_list/PaginatedList.js +134 -124
- package/dist/components/list/paginated_list/action_bar/ActionBar.module.scss.js +12 -12
- package/dist/components/navbar/navbar_modal/NavbarModal.js +14 -14
- package/dist/components/navigation/tabs/Tabs.js +85 -24
- package/dist/components/navigation/tabs/Tabs.module.scss.js +19 -9
- package/dist/components/notification/notification_item/NotificationItem.module.scss.js +5 -5
- package/dist/components/notification/notification_menu/NotificationMenu.module.scss.js +2 -2
- package/dist/components/progress/progress_bar/ProgressBar.module.scss.js +10 -10
- package/dist/components/proposal/proposal_box/ProposalBox.js +58 -56
- package/dist/components/proposal/proposal_box/ProposalBox.module.scss.js +1 -1
- package/dist/components/section/section_box/SectionBox.module.scss.js +12 -12
- package/dist/components/share/share_button/ShareButton.js +26 -24
- package/dist/components/share/share_button/ShareButton.module.scss.js +5 -3
- package/dist/components/skeleton/user_content_skeleton/UserContentSkeleton.module.scss.js +4 -4
- package/dist/components/source/context_source_box/ContextSourceBox.module.scss.js +4 -4
- package/dist/components/source/context_source_list/ContextSourceList.module.scss.js +5 -5
- package/dist/components/source/source_box/SourceBox.module.scss.js +8 -8
- package/dist/components/source/source_list_item/SourceListItem.module.scss.js +7 -5
- package/dist/components/suggestion/suggestion_banner/SuggestionBanner.module.scss.js +5 -5
- package/dist/components/suggestion/suggestion_box/SuggestionBox.module.scss.js +1 -1
- package/dist/components/suggestion/suggestion_input/SuggestionInput.module.scss.js +9 -9
- package/dist/components/summary/argument_summary_box/ArgumentSummaryBox.module.scss.js +10 -10
- package/dist/components/summary/keyword_box/KeywordBox.module.scss.js +1 -1
- package/dist/components/summary/summary_box/SummaryBox.module.scss.js +8 -8
- package/dist/components/text/read_more/ReadMore.module.scss.js +4 -4
- package/dist/components/user/author_box/AuthorBox.js +18 -17
- package/dist/components/user/author_box/AuthorBox.module.scss.js +24 -24
- package/dist/components/user/onboarding_modal/OnboardingModal.js +296 -0
- package/dist/components/user/onboarding_modal/OnboardingModal.module.scss.js +29 -0
- package/dist/components/user/onboarding_modal/useOnboarding.js +80 -0
- package/dist/components/user/user_box/UserBox.js +48 -38
- package/dist/components/user/user_box/UserBox.module.scss.js +9 -9
- package/dist/components/user/user_box_small/UserBoxSmall.js +19 -18
- package/dist/components/user/user_box_small/UserBoxSmall.module.scss.js +6 -6
- package/dist/components/user_content/content_footer/ContentFooter.js +95 -92
- package/dist/components/user_content/content_footer/ContentFooter.module.scss.js +11 -11
- package/dist/components/user_content/content_header/ContentHeader.module.scss.js +22 -22
- package/dist/components/user_content/summary_content_box/SummaryContentBox.module.scss.js +1 -1
- package/dist/components/user_content/use_report_content/ReportModal.module.scss.js +8 -8
- package/dist/components/vote/suggestion_vote_box/SuggestionVoteBox.module.scss.js +1 -1
- package/dist/components/vote/vote_box/VoteBox.module.scss.js +54 -54
- package/dist/components/vote/vote_button/VoteButton.module.scss.js +5 -5
- package/dist/index.js +319 -312
- package/package.json +3 -2
- package/dist/assets/components/action/back_link/BackLink.module-nMAM5nvb.css +0 -1
- package/dist/assets/components/action/button/Button.module-BXkLuURK.css +0 -1
- package/dist/assets/components/action/icon_text_link/IconTextLink.module-B5PF-MMK.css +0 -1
- package/dist/assets/components/argument/argument/Argument.module-QZdPjj_i.css +0 -1
- package/dist/assets/components/argument/argument/ReplyFooter.module-x9Xlkt3Z.css +0 -1
- package/dist/assets/components/auth/sso_form/SSOForm.module-D5v2TrOv.css +0 -1
- package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-DjNiVt-p.css +0 -1
- package/dist/assets/components/debate/debate_box/DebateBox.module-DTLafpl4.css +0 -1
- package/dist/assets/components/dialog/dialog_box/DialogBox.module-DKztqqmb.css +0 -1
- package/dist/assets/components/dialog/dropdown/Dropdown.module-FG2Sqrqs.css +0 -1
- package/dist/assets/components/dialog/modal/Modal.module-CIj-xCzY.css +0 -1
- package/dist/assets/components/dialog/toast/Toast.module-DJ2wSlJT.css +0 -1
- package/dist/assets/components/dialog/tooltip/Tooltip.module-zMXumgnX.css +0 -1
- package/dist/assets/components/embed/embed_header/EmbedHeader.module-CoyRY_jw.css +0 -1
- package/dist/assets/components/follow/follow_button/FollowButton.module-C9YXM8AM.css +0 -1
- package/dist/assets/components/gamification/badge_box/BadgeBox.module-BnskGH9b.css +0 -1
- package/dist/assets/components/information/information_box/InformationBox.module-B_MiEPn7.css +0 -1
- package/dist/assets/components/input/text_editor/TextEditor.module-CxuSL3l3.css +0 -1
- package/dist/assets/components/input/text_editor/plugins/ToolbarPlugin.module-CbPmMciY.css +0 -1
- package/dist/assets/components/input/toggle_position/TogglePosition.module-DDIigbfA.css +0 -1
- package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-DvwCbS9k.css +0 -1
- package/dist/assets/components/navigation/tabs/Tabs.module-CtDi0tAd.css +0 -1
- package/dist/assets/components/notification/notification_item/NotificationItem.module-BWdhgSy4.css +0 -1
- package/dist/assets/components/notification/notification_menu/NotificationMenu.module-BQwbvRIV.css +0 -1
- package/dist/assets/components/progress/progress_bar/ProgressBar.module-Dy-27Wf9.css +0 -1
- package/dist/assets/components/proposal/proposal_box/ProposalBox.module-Dm8XDnr1.css +0 -1
- package/dist/assets/components/section/section_box/SectionBox.module-qQs4B6bf.css +0 -1
- package/dist/assets/components/skeleton/user_content_skeleton/UserContentSkeleton.module-DhZm1xTr.css +0 -1
- package/dist/assets/components/source/context_source_box/ContextSourceBox.module-78Gxjx0w.css +0 -1
- package/dist/assets/components/source/context_source_list/ContextSourceList.module-DUPbI-wb.css +0 -1
- package/dist/assets/components/source/source_box/SourceBox.module-Cu_m3E85.css +0 -1
- package/dist/assets/components/source/source_list_item/SourceListItem.module-fm_uHuY4.css +0 -1
- package/dist/assets/components/suggestion/suggestion_banner/SuggestionBanner.module-D37NVZLS.css +0 -1
- package/dist/assets/components/suggestion/suggestion_box/SuggestionBox.module-DHxoF0oe.css +0 -1
- package/dist/assets/components/suggestion/suggestion_input/SuggestionInput.module-BsEj7sF3.css +0 -1
- package/dist/assets/components/summary/argument_summary_box/ArgumentSummaryBox.module-DLcsyMSD.css +0 -1
- package/dist/assets/components/summary/keyword_box/KeywordBox.module-DHkYfW0l.css +0 -1
- package/dist/assets/components/summary/summary_box/SummaryBox.module-Dr9PevSJ.css +0 -1
- package/dist/assets/components/text/read_more/ReadMore.module-Ni_Mm8o8.css +0 -1
- package/dist/assets/components/user/author_box/AuthorBox.module-CbH2S-MT.css +0 -1
- package/dist/assets/components/user/update_user_info_modal/UpdateUserInfoModal.module-DJym6u4r.css +0 -1
- package/dist/assets/components/user/user_box/UserBox.module-DGKK1afI.css +0 -1
- package/dist/assets/components/user/user_box_small/UserBoxSmall.module-ibAw9gGE.css +0 -1
- package/dist/assets/components/user_content/content_footer/ContentFooter.module-ax3j7VNT.css +0 -1
- package/dist/assets/components/user_content/content_header/ContentHeader.module-B0VwpU-R.css +0 -1
- package/dist/assets/components/user_content/summary_content_box/SummaryContentBox.module-DdzWnPjq.css +0 -1
- package/dist/assets/components/user_content/use_report_content/ReportModal.module-BxF-D5C5.css +0 -1
- package/dist/assets/components/vote/suggestion_vote_box/SuggestionVoteBox.module-CZeQKWIw.css +0 -1
- package/dist/assets/components/vote/vote_box/VoteBox.module-D5sSSHpi.css +0 -1
- package/dist/assets/components/vote/vote_button/VoteButton.module-aP9ZrGSd.css +0 -1
- package/dist/components/user/update_user_info_modal/UpdateUserInfoModal.js +0 -291
- package/dist/components/user/update_user_info_modal/UpdateUserInfoModal.module.scss.js +0 -29
- package/dist/components/user/update_user_info_modal/useUpdateUserInfo.js +0 -27
|
@@ -14,20 +14,21 @@ import { QuoteNode as he } from "@lexical/rich-text";
|
|
|
14
14
|
import b from "classnames";
|
|
15
15
|
import { $getRoot as ge } from "lexical";
|
|
16
16
|
import { useState as f, useId as Se, useRef as xe, useEffect as M } from "react";
|
|
17
|
-
import { useIntl as
|
|
18
|
-
import
|
|
17
|
+
import { useIntl as Pe } from "react-intl";
|
|
18
|
+
import Ce from "./EditorTheme.js";
|
|
19
19
|
import i from "./TextEditor.module.scss.js";
|
|
20
20
|
import { AutoSavePlugin as Te } from "./plugins/AutoSavePlugin.js";
|
|
21
|
-
import { FocusPlugin as
|
|
21
|
+
import { FocusPlugin as Ie } from "./plugins/FocusPlugin.js";
|
|
22
|
+
import { IOSInsertParagraphFallbackPlugin as Ne } from "./plugins/IOSInsertParagraphFallbackPlugin.js";
|
|
22
23
|
import { MaxLengthPlugin as ve } from "./plugins/MaxLengthPlugin.js";
|
|
23
24
|
import { ResetPlugin as Ee } from "./plugins/ResetPlugin.js";
|
|
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 y = (l) => l?.replace(/ /g, " "),
|
|
25
|
+
import { SetContentPlugin as Re } from "./plugins/SetContentPlugin.js";
|
|
26
|
+
import { SetRichContentPlugin as be } from "./plugins/SetRichContentPlugin.js";
|
|
27
|
+
import { ToolbarPlugin as Me } from "./plugins/ToolbarPlugin.js";
|
|
28
|
+
import { useModal as ye } from "../../dialog/modal/useModal.js";
|
|
29
|
+
import { SourceModal as we } from "../../source/source_modal/SourceModal.js";
|
|
30
|
+
import { SourceListItem as Le } from "../../source/source_list_item/SourceListItem.js";
|
|
31
|
+
const y = (l) => l?.replace(/ /g, " "), lt = ({
|
|
31
32
|
placeholder: l,
|
|
32
33
|
initialContent: w,
|
|
33
34
|
initialRichContent: L,
|
|
@@ -36,50 +37,50 @@ const y = (l) => l?.replace(/ /g, " "), st = ({
|
|
|
36
37
|
hideSubmit: _ = !1,
|
|
37
38
|
hideSourceAction: A = !1,
|
|
38
39
|
onActivation: n,
|
|
39
|
-
disabled:
|
|
40
|
-
handleChange:
|
|
40
|
+
disabled: O = !1,
|
|
41
|
+
handleChange: P,
|
|
41
42
|
handleSourcesChange: h,
|
|
42
|
-
shortBar:
|
|
43
|
+
shortBar: k = !1,
|
|
43
44
|
active: g = !1,
|
|
44
45
|
maxLength: m,
|
|
45
|
-
disableRichText:
|
|
46
|
-
editorRef:
|
|
47
|
-
uid:
|
|
46
|
+
disableRichText: B = !1,
|
|
47
|
+
editorRef: U,
|
|
48
|
+
uid: C,
|
|
48
49
|
allowedDomains: T = [],
|
|
49
|
-
hideCharCount:
|
|
50
|
+
hideCharCount: j = !1,
|
|
50
51
|
disableAutoActivate: z = !1,
|
|
51
52
|
autoFocus: a = !1,
|
|
52
|
-
...
|
|
53
|
+
...F
|
|
53
54
|
}) => {
|
|
54
|
-
const [s,
|
|
55
|
+
const [s, H] = f(a || g), [J, Q] = f(""), [W, $] = f(""), [d, u] = f([]), { showModal: q } = ye(), I = Pe(), N = Se(), v = xe(!1);
|
|
55
56
|
M(() => {
|
|
56
|
-
a && !
|
|
57
|
+
a && !v.current && n && (v.current = !0, n());
|
|
57
58
|
}, [a, n]), M(() => {
|
|
58
59
|
p && u(p);
|
|
59
60
|
}, [p]);
|
|
60
|
-
const
|
|
61
|
-
s || (
|
|
62
|
-
},
|
|
63
|
-
editable: !
|
|
64
|
-
theme:
|
|
61
|
+
const E = () => {
|
|
62
|
+
s || (H(!0), n && n());
|
|
63
|
+
}, D = {
|
|
64
|
+
editable: !O,
|
|
65
|
+
theme: Ce,
|
|
65
66
|
onError(t) {
|
|
66
67
|
console.error("TextEditor error:", t);
|
|
67
68
|
},
|
|
68
69
|
nodes: [re, ie, he, ne]
|
|
69
70
|
}, G = () => {
|
|
70
|
-
|
|
71
|
+
E();
|
|
71
72
|
}, K = (t) => {
|
|
72
73
|
t.read(() => {
|
|
73
74
|
const o = ge().getTextContent(), r = y(o), c = JSON.stringify(t), R = y(c);
|
|
74
|
-
|
|
75
|
+
Q(r), $(R), P && P(r, R);
|
|
75
76
|
});
|
|
76
77
|
}, V = (t) => {
|
|
77
|
-
const o =
|
|
78
|
+
const o = J, r = W, c = d;
|
|
78
79
|
x && (t.preventDefault(), x(o, r, c)), u([]), h?.([]);
|
|
79
80
|
}, X = () => {
|
|
80
|
-
|
|
81
|
+
q(
|
|
81
82
|
/* @__PURE__ */ e(
|
|
82
|
-
|
|
83
|
+
we,
|
|
83
84
|
{
|
|
84
85
|
onAddSource: Y,
|
|
85
86
|
allowedSources: T
|
|
@@ -99,7 +100,7 @@ const y = (l) => l?.replace(/ /g, " "), st = ({
|
|
|
99
100
|
return h?.(r), r;
|
|
100
101
|
});
|
|
101
102
|
}, ee = (t, o) => /* @__PURE__ */ e(
|
|
102
|
-
|
|
103
|
+
Le,
|
|
103
104
|
{
|
|
104
105
|
publisher: t.publisher,
|
|
105
106
|
url: t.source_url,
|
|
@@ -110,7 +111,7 @@ const y = (l) => l?.replace(/ /g, " "), st = ({
|
|
|
110
111
|
o
|
|
111
112
|
), te = () => /* @__PURE__ */ e("div", { className: i.editorPlaceholder, children: l });
|
|
112
113
|
return /* @__PURE__ */ S(oe, { children: [
|
|
113
|
-
/* @__PURE__ */ e(ce, { initialConfig:
|
|
114
|
+
/* @__PURE__ */ e(ce, { initialConfig: D, children: /* @__PURE__ */ e("div", { className: i.editorContainer, onClick: G, children: /* @__PURE__ */ S(
|
|
114
115
|
"div",
|
|
115
116
|
{
|
|
116
117
|
className: b(i.editorInner, {
|
|
@@ -126,7 +127,7 @@ const y = (l) => l?.replace(/ /g, " "), st = ({
|
|
|
126
127
|
className: b(i.editorInput, {
|
|
127
128
|
[i.editorInputInactive]: !s
|
|
128
129
|
}),
|
|
129
|
-
...
|
|
130
|
+
...F
|
|
130
131
|
}
|
|
131
132
|
),
|
|
132
133
|
placeholder: l && /* @__PURE__ */ e(te, {}),
|
|
@@ -134,25 +135,25 @@ const y = (l) => l?.replace(/ /g, " "), st = ({
|
|
|
134
135
|
}
|
|
135
136
|
),
|
|
136
137
|
/* @__PURE__ */ e(
|
|
137
|
-
|
|
138
|
+
Me,
|
|
138
139
|
{
|
|
139
140
|
hideSourceAction: A,
|
|
140
141
|
hideSubmit: _,
|
|
141
|
-
disableRichText:
|
|
142
|
-
shortBar:
|
|
142
|
+
disableRichText: B,
|
|
143
|
+
shortBar: k,
|
|
143
144
|
onSubmit: V,
|
|
144
145
|
onAddSource: X,
|
|
145
146
|
isActive: s || g,
|
|
146
|
-
sourceTooltip: T?.length > 0 &&
|
|
147
|
+
sourceTooltip: T?.length > 0 && I.formatMessage({
|
|
147
148
|
id: "input.allowed_domains_tooltip",
|
|
148
149
|
defaultMessage: "With the new source function, you can add links to your article."
|
|
149
150
|
})
|
|
150
151
|
}
|
|
151
152
|
),
|
|
152
|
-
s && m && !
|
|
153
|
+
s && m && !j && /* @__PURE__ */ S("div", { className: i.charactersCount, children: [
|
|
153
154
|
/* @__PURE__ */ e(se, { maxLength: m }),
|
|
154
155
|
" ",
|
|
155
|
-
|
|
156
|
+
I.formatMessage({
|
|
156
157
|
id: "input.remaining_chars",
|
|
157
158
|
defaultMessage: "remaining characters"
|
|
158
159
|
})
|
|
@@ -164,16 +165,17 @@ const y = (l) => l?.replace(/ /g, " "), st = ({
|
|
|
164
165
|
Te,
|
|
165
166
|
{
|
|
166
167
|
onSetContent: z ? () => {
|
|
167
|
-
} :
|
|
168
|
-
storageUid:
|
|
168
|
+
} : E,
|
|
169
|
+
storageUid: C || N
|
|
169
170
|
}
|
|
170
171
|
),
|
|
171
|
-
/* @__PURE__ */ e(
|
|
172
|
-
/* @__PURE__ */ e(
|
|
173
|
-
/* @__PURE__ */ e(
|
|
172
|
+
/* @__PURE__ */ e(Re, { content: w }),
|
|
173
|
+
/* @__PURE__ */ e(be, { richContent: L }),
|
|
174
|
+
/* @__PURE__ */ e(Ie, { autoFocus: a }),
|
|
175
|
+
/* @__PURE__ */ e(Ne, {}),
|
|
174
176
|
m && /* @__PURE__ */ e(ve, { maxLength: m }),
|
|
175
|
-
/* @__PURE__ */ e(Ee, { storageUid:
|
|
176
|
-
/* @__PURE__ */ e(me, { editorRef:
|
|
177
|
+
/* @__PURE__ */ e(Ee, { storageUid: C || N }),
|
|
178
|
+
/* @__PURE__ */ e(me, { editorRef: U })
|
|
177
179
|
]
|
|
178
180
|
}
|
|
179
181
|
) }) }),
|
|
@@ -181,5 +183,5 @@ const y = (l) => l?.replace(/ /g, " "), st = ({
|
|
|
181
183
|
] });
|
|
182
184
|
};
|
|
183
185
|
export {
|
|
184
|
-
|
|
186
|
+
lt as TextEditor
|
|
185
187
|
};
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import '../../../assets/components/input/text_editor/TextEditor.module-
|
|
1
|
+
import '../../../assets/components/input/text_editor/TextEditor.module-KPtqT1Y6.css';const t = "_ltr_43sv6_3", e = "_editorContainer_43sv6_7", o = "_editorInner_43sv6_15", r = "_editorInnerInactive_43sv6_19", i = "_editorPlaceholder_43sv6_24", s = "_editorInput_43sv6_36", n = "_editorInputInactive_43sv6_47", d = "_editorTextBold_43sv6_52", _ = "_editorTextItalic_43sv6_57", c = "_editorTextUnderline_43sv6_61", a = "_editorTextStrikethrough_43sv6_65", I = "_editorTextUnderlineStrikethrough_43sv6_69", l = "_editorParagraph_43sv6_73", v = "_editorQuote_43sv6_83", u = "_editorListOl_43sv6_93", h = "_editorListItem_43sv6_100", x = "_editorNestedListItem_43sv6_107", T = "_sourcesBox_43sv6_120", L = "_sourceList_43sv6_131", p = "_charactersCount_43sv6_142", g = {
|
|
2
2
|
ltr: t,
|
|
3
3
|
editorContainer: e,
|
|
4
4
|
editorInner: o,
|
|
5
5
|
editorInnerInactive: r,
|
|
6
6
|
editorPlaceholder: i,
|
|
7
|
-
editorInput:
|
|
8
|
-
editorInputInactive:
|
|
9
|
-
editorTextBold:
|
|
10
|
-
editorTextItalic:
|
|
11
|
-
editorTextUnderline:
|
|
12
|
-
editorTextStrikethrough:
|
|
13
|
-
editorTextUnderlineStrikethrough:
|
|
14
|
-
editorParagraph:
|
|
15
|
-
editorQuote:
|
|
7
|
+
editorInput: s,
|
|
8
|
+
editorInputInactive: n,
|
|
9
|
+
editorTextBold: d,
|
|
10
|
+
editorTextItalic: _,
|
|
11
|
+
editorTextUnderline: c,
|
|
12
|
+
editorTextStrikethrough: a,
|
|
13
|
+
editorTextUnderlineStrikethrough: I,
|
|
14
|
+
editorParagraph: l,
|
|
15
|
+
editorQuote: v,
|
|
16
16
|
editorListOl: u,
|
|
17
17
|
editorListItem: h,
|
|
18
|
-
editorNestedListItem:
|
|
19
|
-
sourcesBox:
|
|
20
|
-
sourceList:
|
|
21
|
-
charactersCount:
|
|
18
|
+
editorNestedListItem: x,
|
|
19
|
+
sourcesBox: T,
|
|
20
|
+
sourceList: L,
|
|
21
|
+
charactersCount: p
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
p as charactersCount,
|
|
25
|
+
g as default,
|
|
26
26
|
e as editorContainer,
|
|
27
27
|
o as editorInner,
|
|
28
28
|
r as editorInnerInactive,
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
s as editorInput,
|
|
30
|
+
n as editorInputInactive,
|
|
31
31
|
h as editorListItem,
|
|
32
32
|
u as editorListOl,
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
x as editorNestedListItem,
|
|
34
|
+
l as editorParagraph,
|
|
35
35
|
i as editorPlaceholder,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
v as editorQuote,
|
|
37
|
+
d as editorTextBold,
|
|
38
|
+
_ as editorTextItalic,
|
|
39
|
+
a as editorTextStrikethrough,
|
|
40
|
+
c as editorTextUnderline,
|
|
41
|
+
I as editorTextUnderlineStrikethrough,
|
|
42
42
|
t as ltr,
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
L as sourceList,
|
|
44
|
+
T as sourcesBox
|
|
45
45
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useLexicalComposerContext as u } from "@lexical/react/LexicalComposerContext";
|
|
2
|
+
import { IS_IOS as d, INSERT_PARAGRAPH_COMMAND as l } from "lexical";
|
|
3
|
+
import { useRef as f, useEffect as m } from "react";
|
|
4
|
+
const E = 100, p = (t) => t.key === "Enter" && !t.shiftKey && !t.altKey && !t.ctrlKey && !t.metaKey && !t.isComposing, i = (t) => JSON.stringify(t.toJSON()), A = () => {
|
|
5
|
+
const [t] = u(), r = f([]);
|
|
6
|
+
return m(() => {
|
|
7
|
+
if (!d)
|
|
8
|
+
return;
|
|
9
|
+
const s = (e) => {
|
|
10
|
+
if (!p(e) || e.defaultPrevented)
|
|
11
|
+
return;
|
|
12
|
+
const o = i(t.getEditorState()), n = {
|
|
13
|
+
timeoutId: null
|
|
14
|
+
};
|
|
15
|
+
n.timeoutId = setTimeout(() => {
|
|
16
|
+
r.current = r.current.filter(
|
|
17
|
+
(c) => c !== n
|
|
18
|
+
), i(t.getEditorState()) === o && t.dispatchCommand(l, void 0);
|
|
19
|
+
}, E), r.current.push(n);
|
|
20
|
+
}, a = t.registerRootListener(
|
|
21
|
+
(e, o) => {
|
|
22
|
+
o?.removeEventListener("keydown", s), e?.addEventListener("keydown", s);
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
return () => {
|
|
26
|
+
r.current.forEach((e) => {
|
|
27
|
+
clearTimeout(e.timeoutId);
|
|
28
|
+
}), r.current = [], a();
|
|
29
|
+
};
|
|
30
|
+
}, [t]), null;
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
A as IOSInsertParagraphFallbackPlugin
|
|
34
|
+
};
|
|
@@ -1,85 +1,129 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { $isListNode as
|
|
3
|
-
import { useLexicalComposerContext as
|
|
4
|
-
import { $isHeadingNode as
|
|
5
|
-
import { $setBlocksType as
|
|
6
|
-
import { $getNearestNodeOfType as
|
|
1
|
+
import { jsxs as L, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { $isListNode as k, ListNode as z, INSERT_ORDERED_LIST_COMMAND as G, $isListItemNode as w, $createListNode as X } from "@lexical/list";
|
|
3
|
+
import { useLexicalComposerContext as J } from "@lexical/react/LexicalComposerContext";
|
|
4
|
+
import { $isHeadingNode as W, $createQuoteNode as A } from "@lexical/rich-text";
|
|
5
|
+
import { $setBlocksType as v } from "@lexical/selection";
|
|
6
|
+
import { $getNearestNodeOfType as Y, mergeRegister as Z } from "@lexical/utils";
|
|
7
7
|
import a from "classnames";
|
|
8
|
-
import { $getSelection as
|
|
9
|
-
import { useRef as
|
|
10
|
-
import { useIntl as
|
|
8
|
+
import { $getSelection as N, $isRangeSelection as _, SELECTION_CHANGE_COMMAND as ee, FORMAT_TEXT_COMMAND as te, $createParagraphNode as E } from "lexical";
|
|
9
|
+
import { useRef as oe, useState as g, useCallback as ie, useEffect as ae } from "react";
|
|
10
|
+
import { useIntl as ne } from "react-intl";
|
|
11
11
|
import e from "./ToolbarPlugin.module.scss.js";
|
|
12
|
-
import { Icon as
|
|
13
|
-
import { Button as
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
22
|
-
f
|
|
12
|
+
import { Icon as u } from "../../../icons/icon/Icon.js";
|
|
13
|
+
import { Button as le } from "../../../action/button/Button.js";
|
|
14
|
+
const ye = (n) => {
|
|
15
|
+
const r = ne(), D = 1, [l] = J(), O = oe(null), [h, I] = g("paragraph"), [se, P] = g(null), [B, R] = g(!1), [$, q] = g(!1), [K, F] = g(!1), S = n.hideSubmit && n.hideSourceAction && n.disableRichText, p = ie(() => {
|
|
16
|
+
const t = N();
|
|
17
|
+
if (_(t)) {
|
|
18
|
+
const c = t.anchor.getNode(), s = c.getKey() === "root" ? c : c.getTopLevelElementOrThrow(), d = s.getKey();
|
|
19
|
+
if (l.getElementByKey(d) !== null)
|
|
20
|
+
if (P(d), k(s)) {
|
|
21
|
+
const o = Y(c, z), f = o ? o.getTag() : s.getTag();
|
|
22
|
+
I(f);
|
|
23
23
|
} else {
|
|
24
|
-
const
|
|
25
|
-
|
|
24
|
+
const o = W(s) ? s.getTag() : s.getType();
|
|
25
|
+
I(o);
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
R(t.hasFormat("bold")), q(t.hasFormat("italic")), F(t.hasFormat("underline"));
|
|
28
28
|
}
|
|
29
|
-
}, [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
}, [l]);
|
|
30
|
+
ae(() => Z(
|
|
31
|
+
l.registerUpdateListener(({ editorState: t }) => {
|
|
32
|
+
t.read(() => {
|
|
33
|
+
p();
|
|
34
34
|
});
|
|
35
35
|
}),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
(
|
|
39
|
-
|
|
36
|
+
l.registerCommand(
|
|
37
|
+
ee,
|
|
38
|
+
() => (p(), !1),
|
|
39
|
+
D
|
|
40
40
|
)
|
|
41
|
-
), [
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
), [l, p]);
|
|
42
|
+
const b = (t) => {
|
|
43
|
+
t.pointerType !== "touch" && t.pointerType !== "pen" && t.preventDefault();
|
|
44
|
+
}, x = () => {
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
l.getEditorState().read(() => {
|
|
47
|
+
p();
|
|
48
|
+
});
|
|
49
|
+
}, 0);
|
|
50
|
+
}, T = (t) => {
|
|
51
|
+
l.dispatchCommand(te, t);
|
|
52
|
+
}, U = () => {
|
|
53
|
+
l.update(() => {
|
|
54
|
+
const t = N();
|
|
55
|
+
if (!_(t))
|
|
56
|
+
return;
|
|
57
|
+
const c = t.getNodes(), s = /* @__PURE__ */ new Set();
|
|
58
|
+
for (const m of c) {
|
|
59
|
+
let o = m;
|
|
60
|
+
for (; o !== null && !w(o); )
|
|
61
|
+
o = o.getParent();
|
|
62
|
+
w(o) && s.add(o);
|
|
63
|
+
}
|
|
64
|
+
const d = Array.from(s).reverse();
|
|
65
|
+
for (const m of d) {
|
|
66
|
+
const o = m.getParent();
|
|
67
|
+
if (!k(o))
|
|
68
|
+
continue;
|
|
69
|
+
const f = E(), Q = m.getChildren();
|
|
70
|
+
for (const M of Q)
|
|
71
|
+
f.append(M);
|
|
72
|
+
const y = m.getNextSiblings();
|
|
73
|
+
if (o.insertAfter(f), y.length > 0) {
|
|
74
|
+
const M = y[0].getValue(), C = X(o.getListType(), M);
|
|
75
|
+
for (const V of y)
|
|
76
|
+
C.append(V);
|
|
77
|
+
f.insertAfter(C);
|
|
78
|
+
}
|
|
79
|
+
m.remove(), o.getChildrenSize() === 0 && o.remove();
|
|
80
|
+
}
|
|
51
81
|
});
|
|
82
|
+
}, j = () => {
|
|
83
|
+
h !== "ol" ? l.dispatchCommand(G) : U(), x();
|
|
84
|
+
}, H = () => {
|
|
85
|
+
h !== "quote" ? l.update(() => {
|
|
86
|
+
const t = N();
|
|
87
|
+
if (_(t))
|
|
88
|
+
if (t.isCollapsed()) {
|
|
89
|
+
const s = t.anchor.getNode().getTopLevelElementOrThrow(), d = A();
|
|
90
|
+
s.insertAfter(d), d.selectEnd();
|
|
91
|
+
} else
|
|
92
|
+
v(t, () => A());
|
|
93
|
+
}) : l.update(() => {
|
|
94
|
+
const t = N();
|
|
95
|
+
_(t) && v(t, () => E());
|
|
96
|
+
}), x();
|
|
52
97
|
};
|
|
53
|
-
return
|
|
98
|
+
return S ? null : /* @__PURE__ */ L(
|
|
54
99
|
"div",
|
|
55
100
|
{
|
|
56
101
|
className: a(e.toolbar, {
|
|
57
|
-
[e.toolbarIsActive]:
|
|
102
|
+
[e.toolbarIsActive]: S ? !1 : n.isActive
|
|
58
103
|
}),
|
|
59
|
-
ref:
|
|
104
|
+
ref: O,
|
|
60
105
|
children: [
|
|
61
|
-
|
|
106
|
+
n.isActive ? !n.disableRichText && /* @__PURE__ */ L(
|
|
62
107
|
"div",
|
|
63
108
|
{
|
|
64
109
|
className: a(e.iconToolbar, {
|
|
65
|
-
[e.shortBar]:
|
|
110
|
+
[e.shortBar]: n.shortBar
|
|
66
111
|
}),
|
|
67
112
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ i(
|
|
69
114
|
"button",
|
|
70
115
|
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
},
|
|
116
|
+
onPointerDown: b,
|
|
117
|
+
onClick: () => T("bold"),
|
|
74
118
|
type: "button",
|
|
75
|
-
className: a(e.toolbarItem, { [e.active]:
|
|
119
|
+
className: a(e.toolbarItem, { [e.active]: B }),
|
|
76
120
|
"data-testid": "format-bold",
|
|
77
|
-
"aria-label":
|
|
121
|
+
"aria-label": r.formatMessage({
|
|
78
122
|
id: "input.text_editor.plugins.toolbar_plugin.bold.aria_label",
|
|
79
123
|
defaultMessage: "Make text bold"
|
|
80
124
|
}),
|
|
81
|
-
children: /* @__PURE__ */
|
|
82
|
-
|
|
125
|
+
children: /* @__PURE__ */ i(
|
|
126
|
+
u,
|
|
83
127
|
{
|
|
84
128
|
name: "bold",
|
|
85
129
|
width: 24,
|
|
@@ -89,22 +133,21 @@ const me = (l) => {
|
|
|
89
133
|
)
|
|
90
134
|
}
|
|
91
135
|
),
|
|
92
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ i(
|
|
93
137
|
"button",
|
|
94
138
|
{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
},
|
|
139
|
+
onPointerDown: b,
|
|
140
|
+
onClick: () => T("italic"),
|
|
98
141
|
type: "button",
|
|
99
142
|
className: a(e.toolbarItem, {
|
|
100
|
-
[e.active]:
|
|
143
|
+
[e.active]: $
|
|
101
144
|
}),
|
|
102
|
-
"aria-label":
|
|
145
|
+
"aria-label": r.formatMessage({
|
|
103
146
|
id: "input.text_editor.plugins.toolbar_plugin.italic.aria_label",
|
|
104
147
|
defaultMessage: "Make text italic"
|
|
105
148
|
}),
|
|
106
|
-
children: /* @__PURE__ */
|
|
107
|
-
|
|
149
|
+
children: /* @__PURE__ */ i(
|
|
150
|
+
u,
|
|
108
151
|
{
|
|
109
152
|
name: "italic",
|
|
110
153
|
width: 24,
|
|
@@ -114,22 +157,21 @@ const me = (l) => {
|
|
|
114
157
|
)
|
|
115
158
|
}
|
|
116
159
|
),
|
|
117
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ i(
|
|
118
161
|
"button",
|
|
119
162
|
{
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
},
|
|
163
|
+
onPointerDown: b,
|
|
164
|
+
onClick: () => T("underline"),
|
|
123
165
|
type: "button",
|
|
124
166
|
className: a(e.toolbarItem, {
|
|
125
|
-
[e.active]:
|
|
167
|
+
[e.active]: K
|
|
126
168
|
}),
|
|
127
|
-
"aria-label":
|
|
169
|
+
"aria-label": r.formatMessage({
|
|
128
170
|
id: "input.text_editor.plugins.toolbar_plugin.underline.aria_label",
|
|
129
171
|
defaultMessage: "Underline text"
|
|
130
172
|
}),
|
|
131
|
-
children: /* @__PURE__ */
|
|
132
|
-
|
|
173
|
+
children: /* @__PURE__ */ i(
|
|
174
|
+
u,
|
|
133
175
|
{
|
|
134
176
|
name: "underline",
|
|
135
177
|
width: 24,
|
|
@@ -139,18 +181,21 @@ const me = (l) => {
|
|
|
139
181
|
)
|
|
140
182
|
}
|
|
141
183
|
),
|
|
142
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ i(
|
|
143
185
|
"button",
|
|
144
186
|
{
|
|
145
|
-
|
|
187
|
+
onPointerDown: b,
|
|
188
|
+
onClick: () => H(),
|
|
146
189
|
type: "button",
|
|
147
|
-
className: a(e.toolbarItem, {
|
|
148
|
-
|
|
190
|
+
className: a(e.toolbarItem, {
|
|
191
|
+
[e.active]: h === "quote"
|
|
192
|
+
}),
|
|
193
|
+
"aria-label": r.formatMessage({
|
|
149
194
|
id: "input.text_editor.plugins.toolbar_plugin.blockquote.aria_label",
|
|
150
195
|
defaultMessage: "Add a blockquote"
|
|
151
196
|
}),
|
|
152
|
-
children: /* @__PURE__ */
|
|
153
|
-
|
|
197
|
+
children: /* @__PURE__ */ i(
|
|
198
|
+
u,
|
|
154
199
|
{
|
|
155
200
|
name: "blockquote",
|
|
156
201
|
width: 24,
|
|
@@ -160,18 +205,21 @@ const me = (l) => {
|
|
|
160
205
|
)
|
|
161
206
|
}
|
|
162
207
|
),
|
|
163
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ i(
|
|
164
209
|
"button",
|
|
165
210
|
{
|
|
166
|
-
|
|
211
|
+
onPointerDown: b,
|
|
212
|
+
onClick: () => j(),
|
|
167
213
|
type: "button",
|
|
168
|
-
className: a(e.toolbarItem, {
|
|
169
|
-
|
|
214
|
+
className: a(e.toolbarItem, {
|
|
215
|
+
[e.active]: h === "ol"
|
|
216
|
+
}),
|
|
217
|
+
"aria-label": r.formatMessage({
|
|
170
218
|
id: "input.text_editor.plugins.toolbar_plugin.numbered_list.aria_label",
|
|
171
219
|
defaultMessage: "Insert a numbered list"
|
|
172
220
|
}),
|
|
173
|
-
children: /* @__PURE__ */
|
|
174
|
-
|
|
221
|
+
children: /* @__PURE__ */ i(
|
|
222
|
+
u,
|
|
175
223
|
{
|
|
176
224
|
name: "orderedList",
|
|
177
225
|
width: 24,
|
|
@@ -181,18 +229,19 @@ const me = (l) => {
|
|
|
181
229
|
)
|
|
182
230
|
}
|
|
183
231
|
),
|
|
184
|
-
!
|
|
232
|
+
!n.hideSourceAction && /* @__PURE__ */ i(
|
|
185
233
|
"button",
|
|
186
234
|
{
|
|
187
|
-
|
|
235
|
+
onPointerDown: b,
|
|
236
|
+
onClick: n.onAddSource,
|
|
188
237
|
type: "button",
|
|
189
238
|
className: e.toolbarItem,
|
|
190
|
-
"aria-label":
|
|
239
|
+
"aria-label": r.formatMessage({
|
|
191
240
|
id: "input.text_editor.plugins.toolbar_plugin.add_link.aria_label",
|
|
192
241
|
defaultMessage: "Add hyperlink"
|
|
193
242
|
}),
|
|
194
|
-
children: /* @__PURE__ */
|
|
195
|
-
|
|
243
|
+
children: /* @__PURE__ */ i(
|
|
244
|
+
u,
|
|
196
245
|
{
|
|
197
246
|
name: "link",
|
|
198
247
|
width: 20,
|
|
@@ -205,18 +254,18 @@ const me = (l) => {
|
|
|
205
254
|
]
|
|
206
255
|
}
|
|
207
256
|
) : null,
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
|
|
257
|
+
/* @__PURE__ */ i("div", { className: e.actionButton, children: n.hideSubmit ? null : /* @__PURE__ */ i(
|
|
258
|
+
le,
|
|
210
259
|
{
|
|
211
260
|
type: "button",
|
|
212
261
|
"data-testid": "submit-button",
|
|
213
|
-
handleClick:
|
|
262
|
+
handleClick: n.onSubmit,
|
|
214
263
|
className: a(e.inputSubmitActionButton, e.submitAction),
|
|
215
|
-
"aria-label":
|
|
264
|
+
"aria-label": r.formatMessage({
|
|
216
265
|
id: "input.text_editor.plugins.toolbar_plugin.submit_button.aria_label",
|
|
217
266
|
defaultMessage: "Send message"
|
|
218
267
|
}),
|
|
219
|
-
children: /* @__PURE__ */
|
|
268
|
+
children: /* @__PURE__ */ i(u, { name: "send", width: 20, height: 20 })
|
|
220
269
|
}
|
|
221
270
|
) })
|
|
222
271
|
]
|
|
@@ -224,5 +273,5 @@ const me = (l) => {
|
|
|
224
273
|
);
|
|
225
274
|
};
|
|
226
275
|
export {
|
|
227
|
-
|
|
276
|
+
ye as ToolbarPlugin
|
|
228
277
|
};
|