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