@churchapps/apphelper 0.4.12 → 0.4.18
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/components/DisplayBox.js +12 -18
- package/dist/components/DisplayBox.js.map +1 -1
- package/dist/components/ErrorMessages.js +9 -46
- package/dist/components/ErrorMessages.js.map +1 -1
- package/dist/components/ExportLink.d.ts.map +1 -1
- package/dist/components/ExportLink.js +8 -10
- package/dist/components/ExportLink.js.map +1 -1
- package/dist/components/FloatingSupport.js +7 -14
- package/dist/components/FloatingSupport.js.map +1 -1
- package/dist/components/FormCardPayment.d.ts.map +1 -1
- package/dist/components/FormCardPayment.js +28 -64
- package/dist/components/FormCardPayment.js.map +1 -1
- package/dist/components/FormSubmissionEdit.d.ts.map +1 -1
- package/dist/components/FormSubmissionEdit.js +28 -66
- package/dist/components/FormSubmissionEdit.js.map +1 -1
- package/dist/components/HelpIcon.js +3 -7
- package/dist/components/HelpIcon.js.map +1 -1
- package/dist/components/ImageEditor.d.ts.map +1 -1
- package/dist/components/ImageEditor.js +13 -19
- package/dist/components/ImageEditor.js.map +1 -1
- package/dist/components/InputBox.d.ts.map +1 -1
- package/dist/components/InputBox.js +13 -15
- package/dist/components/InputBox.js.map +1 -1
- package/dist/components/Loading.d.ts +0 -1
- package/dist/components/Loading.d.ts.map +1 -1
- package/dist/components/Loading.js +52 -12
- package/dist/components/Loading.js.map +1 -1
- package/dist/components/PageHeader.d.ts +15 -0
- package/dist/components/PageHeader.d.ts.map +1 -0
- package/dist/components/PageHeader.js +41 -0
- package/dist/components/PageHeader.js.map +1 -0
- package/dist/components/PersonAvatar.d.ts +12 -0
- package/dist/components/PersonAvatar.d.ts.map +1 -0
- package/dist/components/PersonAvatar.js +55 -0
- package/dist/components/PersonAvatar.js.map +1 -0
- package/dist/components/QuestionEdit.js +20 -26
- package/dist/components/QuestionEdit.js.map +1 -1
- package/dist/components/SmallButton.js +9 -15
- package/dist/components/SmallButton.js.map +1 -1
- package/dist/components/SupportModal.d.ts.map +1 -1
- package/dist/components/SupportModal.js +5 -9
- package/dist/components/SupportModal.js.map +1 -1
- package/dist/components/TabPanel.js +5 -9
- package/dist/components/TabPanel.js.map +1 -1
- package/dist/components/header/Banner.js +3 -7
- package/dist/components/header/Banner.js.map +1 -1
- package/dist/components/header/PrimaryMenu.d.ts.map +1 -1
- package/dist/components/header/PrimaryMenu.js +30 -30
- package/dist/components/header/PrimaryMenu.js.map +1 -1
- package/dist/components/header/SecondaryMenu.js +6 -10
- package/dist/components/header/SecondaryMenu.js.map +1 -1
- package/dist/components/header/SecondaryMenuAlt.js +8 -15
- package/dist/components/header/SecondaryMenuAlt.js.map +1 -1
- package/dist/components/header/SiteHeader.d.ts +2 -1
- package/dist/components/header/SiteHeader.d.ts.map +1 -1
- package/dist/components/header/SiteHeader.js +109 -17
- package/dist/components/header/SiteHeader.js.map +1 -1
- package/dist/components/header/SupportDrawer.js +14 -18
- package/dist/components/header/SupportDrawer.js.map +1 -1
- package/dist/components/header/index.js +2 -7
- package/dist/components/header/index.js.map +1 -1
- package/dist/components/index.d.ts +2 -4
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +18 -52
- package/dist/components/index.js.map +1 -1
- package/dist/components/notes/AddNote.d.ts.map +1 -1
- package/dist/components/notes/AddNote.js +56 -54
- package/dist/components/notes/AddNote.js.map +1 -1
- package/dist/components/notes/Note.d.ts.map +1 -1
- package/dist/components/notes/Note.js +11 -15
- package/dist/components/notes/Note.js.map +1 -1
- package/dist/components/notes/Notes.d.ts.map +1 -1
- package/dist/components/notes/Notes.js +134 -40
- package/dist/components/notes/Notes.js.map +1 -1
- package/dist/components/notes/index.js +3 -9
- package/dist/components/notes/index.js.map +1 -1
- package/dist/components/wrapper/AppList.d.ts.map +1 -1
- package/dist/components/wrapper/AppList.js +7 -13
- package/dist/components/wrapper/AppList.js.map +1 -1
- package/dist/components/wrapper/ChurchList.d.ts.map +1 -1
- package/dist/components/wrapper/ChurchList.js +55 -21
- package/dist/components/wrapper/ChurchList.js.map +1 -1
- package/dist/components/wrapper/NavItem.js +11 -15
- package/dist/components/wrapper/NavItem.js.map +1 -1
- package/dist/components/wrapper/NewPrivateMessage.d.ts.map +1 -1
- package/dist/components/wrapper/NewPrivateMessage.js +38 -68
- package/dist/components/wrapper/NewPrivateMessage.js.map +1 -1
- package/dist/components/wrapper/Notifications.d.ts.map +1 -1
- package/dist/components/wrapper/Notifications.js +53 -57
- package/dist/components/wrapper/Notifications.js.map +1 -1
- package/dist/components/wrapper/PrivateMessageDetails.d.ts +1 -0
- package/dist/components/wrapper/PrivateMessageDetails.d.ts.map +1 -1
- package/dist/components/wrapper/PrivateMessageDetails.js +54 -9
- package/dist/components/wrapper/PrivateMessageDetails.js.map +1 -1
- package/dist/components/wrapper/PrivateMessages.d.ts.map +1 -1
- package/dist/components/wrapper/PrivateMessages.js +363 -78
- package/dist/components/wrapper/PrivateMessages.js.map +1 -1
- package/dist/components/wrapper/UserMenu.d.ts.map +1 -1
- package/dist/components/wrapper/UserMenu.js +182 -54
- package/dist/components/wrapper/UserMenu.js.map +1 -1
- package/dist/components/wrapper/index.d.ts +2 -1
- package/dist/components/wrapper/index.d.ts.map +1 -1
- package/dist/components/wrapper/index.js +8 -17
- package/dist/components/wrapper/index.js.map +1 -1
- package/dist/helpers/AnalyticsHelper.d.ts.map +1 -1
- package/dist/helpers/AnalyticsHelper.js +11 -19
- package/dist/helpers/AnalyticsHelper.js.map +1 -1
- package/dist/helpers/AppearanceHelper.js +1 -5
- package/dist/helpers/AppearanceHelper.js.map +1 -1
- package/dist/helpers/ArrayHelper.d.ts.map +1 -1
- package/dist/helpers/ArrayHelper.js +3 -8
- package/dist/helpers/ArrayHelper.js.map +1 -1
- package/dist/helpers/CurrencyHelper.js +1 -5
- package/dist/helpers/CurrencyHelper.js.map +1 -1
- package/dist/helpers/DateHelper.js +3 -7
- package/dist/helpers/DateHelper.js.map +1 -1
- package/dist/helpers/ErrorHelper.js +3 -7
- package/dist/helpers/ErrorHelper.js.map +1 -1
- package/dist/helpers/EventHelper.d.ts.map +1 -1
- package/dist/helpers/EventHelper.js +4 -11
- package/dist/helpers/EventHelper.js.map +1 -1
- package/dist/helpers/FileHelper.js +3 -10
- package/dist/helpers/FileHelper.js.map +1 -1
- package/dist/helpers/Locale.d.ts +1 -1
- package/dist/helpers/Locale.d.ts.map +1 -1
- package/dist/helpers/Locale.js +18 -20
- package/dist/helpers/Locale.js.map +1 -1
- package/dist/helpers/NotificationService.d.ts +56 -0
- package/dist/helpers/NotificationService.d.ts.map +1 -0
- package/dist/helpers/NotificationService.js +176 -0
- package/dist/helpers/NotificationService.js.map +1 -0
- package/dist/helpers/PersonHelper.d.ts.map +1 -1
- package/dist/helpers/PersonHelper.js +5 -9
- package/dist/helpers/PersonHelper.js.map +1 -1
- package/dist/helpers/SlugHelper.js +4 -11
- package/dist/helpers/SlugHelper.js.map +1 -1
- package/dist/helpers/SocketHelper.d.ts +12 -0
- package/dist/helpers/SocketHelper.d.ts.map +1 -1
- package/dist/helpers/SocketHelper.js +163 -44
- package/dist/helpers/SocketHelper.js.map +1 -1
- package/dist/helpers/UniqueIdHelper.js +1 -5
- package/dist/helpers/UniqueIdHelper.js.map +1 -1
- package/dist/helpers/UserHelper.js +8 -12
- package/dist/helpers/UserHelper.js.map +1 -1
- package/dist/helpers/createEmotionCache.js +3 -9
- package/dist/helpers/createEmotionCache.js.map +1 -1
- package/dist/helpers/index.d.ts +7 -16
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +10 -54
- package/dist/helpers/index.js.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -5
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useMountedState.js +5 -9
- package/dist/hooks/useMountedState.js.map +1 -1
- package/dist/hooks/useNotifications.d.ts +30 -0
- package/dist/hooks/useNotifications.d.ts.map +1 -0
- package/dist/hooks/useNotifications.js +79 -0
- package/dist/hooks/useNotifications.js.map +1 -0
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -22
- package/dist/index.js.map +1 -1
- package/dist/public/css/styles.css +6 -2
- package/package.json +6 -28
- package/public/css/styles.css +6 -2
- package/src/components/ExportLink.tsx +12 -3
- package/src/components/FormCardPayment.tsx +4 -3
- package/src/components/FormSubmissionEdit.tsx +5 -6
- package/src/components/ImageEditor.tsx +15 -12
- package/src/components/InputBox.tsx +2 -1
- package/src/components/Loading.tsx +47 -1
- package/src/components/PageHeader.tsx +107 -0
- package/src/components/PersonAvatar.tsx +78 -0
- package/src/components/SupportModal.tsx +8 -3
- package/src/components/header/PrimaryMenu.tsx +85 -42
- package/src/components/header/SiteHeader.tsx +131 -8
- package/src/components/header/SupportDrawer.tsx +1 -1
- package/src/components/index.tsx +2 -5
- package/src/components/notes/AddNote.tsx +105 -19
- package/src/components/notes/Note.tsx +43 -22
- package/src/components/notes/Notes.tsx +160 -21
- package/src/components/wrapper/AppList.tsx +1 -4
- package/src/components/wrapper/ChurchList.tsx +45 -5
- package/src/components/wrapper/NewPrivateMessage.tsx +181 -44
- package/src/components/wrapper/Notifications.tsx +164 -29
- package/src/components/wrapper/PrivateMessageDetails.tsx +100 -13
- package/src/components/wrapper/PrivateMessages.tsx +539 -56
- package/src/components/wrapper/UserMenu.tsx +218 -38
- package/src/components/wrapper/index.tsx +3 -2
- package/src/helpers/AnalyticsHelper.ts +1 -2
- package/src/helpers/ArrayHelper.ts +0 -1
- package/src/helpers/ErrorHelper.ts +1 -1
- package/src/helpers/EventHelper.ts +0 -3
- package/src/helpers/Locale.ts +8 -3
- package/src/helpers/NotificationService.ts +211 -0
- package/src/helpers/PersonHelper.ts +1 -2
- package/src/helpers/SocketHelper.ts +184 -39
- package/src/helpers/UserHelper.ts +2 -2
- package/src/helpers/index.ts +46 -16
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useNotifications.ts +94 -0
- package/src/index.ts +1 -4
- package/tsconfig.json +2 -2
- package/.eslintignore +0 -4
- package/.github/FUNDING.yml +0 -1
- package/.vscode/settings.json +0 -6
- package/CHUMS_COMPONENT_EXTRACTION_CANDIDATES.md +0 -210
- package/CLAUDE.md +0 -111
- package/COMPONENT_USAGE_REPORT.md +0 -322
- package/LICENSE +0 -21
- package/README.md +0 -24
- package/b1app-specific-components.md +0 -146
- package/component-usage-analysis.md +0 -169
- package/dist/components/markdownEditor/Editor.d.ts +0 -13
- package/dist/components/markdownEditor/Editor.d.ts.map +0 -1
- package/dist/components/markdownEditor/Editor.js +0 -92
- package/dist/components/markdownEditor/Editor.js.map +0 -1
- package/dist/components/markdownEditor/IconNamesList.d.ts +0 -3
- package/dist/components/markdownEditor/IconNamesList.d.ts.map +0 -1
- package/dist/components/markdownEditor/IconNamesList.js +0 -16
- package/dist/components/markdownEditor/IconNamesList.js.map +0 -1
- package/dist/components/markdownEditor/MarkdownEditor.d.ts +0 -10
- package/dist/components/markdownEditor/MarkdownEditor.d.ts.map +0 -1
- package/dist/components/markdownEditor/MarkdownEditor.js +0 -45
- package/dist/components/markdownEditor/MarkdownEditor.js.map +0 -1
- package/dist/components/markdownEditor/MarkdownModal.d.ts +0 -9
- package/dist/components/markdownEditor/MarkdownModal.d.ts.map +0 -1
- package/dist/components/markdownEditor/MarkdownModal.js +0 -24
- package/dist/components/markdownEditor/MarkdownModal.js.map +0 -1
- package/dist/components/markdownEditor/MarkdownPreview.d.ts +0 -9
- package/dist/components/markdownEditor/MarkdownPreview.d.ts.map +0 -1
- package/dist/components/markdownEditor/MarkdownPreview.js +0 -45
- package/dist/components/markdownEditor/MarkdownPreview.js.map +0 -1
- package/dist/components/markdownEditor/MarkdownPreviewLight.d.ts +0 -7
- package/dist/components/markdownEditor/MarkdownPreviewLight.d.ts.map +0 -1
- package/dist/components/markdownEditor/MarkdownPreviewLight.js +0 -53
- package/dist/components/markdownEditor/MarkdownPreviewLight.js.map +0 -1
- package/dist/components/markdownEditor/editor.css +0 -787
- package/dist/components/markdownEditor/images/emoji/1F600.png +0 -0
- package/dist/components/markdownEditor/images/emoji/1F641.png +0 -0
- package/dist/components/markdownEditor/images/emoji/1F642.png +0 -0
- package/dist/components/markdownEditor/images/emoji/2764.png +0 -0
- package/dist/components/markdownEditor/images/icons/arrow-clockwise.svg +0 -4
- package/dist/components/markdownEditor/images/icons/arrow-counterclockwise.svg +0 -4
- package/dist/components/markdownEditor/images/icons/chat-square-quote.svg +0 -4
- package/dist/components/markdownEditor/images/icons/chevron-down.svg +0 -3
- package/dist/components/markdownEditor/images/icons/code.svg +0 -3
- package/dist/components/markdownEditor/images/icons/journal-code.svg +0 -5
- package/dist/components/markdownEditor/images/icons/journal-text.svg +0 -5
- package/dist/components/markdownEditor/images/icons/justify.svg +0 -3
- package/dist/components/markdownEditor/images/icons/link.svg +0 -4
- package/dist/components/markdownEditor/images/icons/list-ol.svg +0 -4
- package/dist/components/markdownEditor/images/icons/list-ul.svg +0 -3
- package/dist/components/markdownEditor/images/icons/pencil-fill.svg +0 -3
- package/dist/components/markdownEditor/images/icons/text-center.svg +0 -3
- package/dist/components/markdownEditor/images/icons/text-left.svg +0 -3
- package/dist/components/markdownEditor/images/icons/text-paragraph.svg +0 -3
- package/dist/components/markdownEditor/images/icons/text-right.svg +0 -3
- package/dist/components/markdownEditor/images/icons/type-bold.svg +0 -3
- package/dist/components/markdownEditor/images/icons/type-h1.svg +0 -3
- package/dist/components/markdownEditor/images/icons/type-h2.svg +0 -3
- package/dist/components/markdownEditor/images/icons/type-h3.svg +0 -3
- package/dist/components/markdownEditor/images/icons/type-h4.svg +0 -13
- package/dist/components/markdownEditor/images/icons/type-italic.svg +0 -3
- package/dist/components/markdownEditor/images/icons/type-strikethrough.svg +0 -3
- package/dist/components/markdownEditor/images/icons/type-underline.svg +0 -3
- package/dist/components/markdownEditor/index.d.ts +0 -4
- package/dist/components/markdownEditor/index.d.ts.map +0 -1
- package/dist/components/markdownEditor/index.js +0 -10
- package/dist/components/markdownEditor/index.js.map +0 -1
- package/dist/components/markdownEditor/plugins/AutoLinkPlugin.d.ts +0 -2
- package/dist/components/markdownEditor/plugins/AutoLinkPlugin.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/AutoLinkPlugin.js +0 -31
- package/dist/components/markdownEditor/plugins/AutoLinkPlugin.js.map +0 -1
- package/dist/components/markdownEditor/plugins/ControlledEditorPlugin.d.ts +0 -8
- package/dist/components/markdownEditor/plugins/ControlledEditorPlugin.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/ControlledEditorPlugin.js +0 -19
- package/dist/components/markdownEditor/plugins/ControlledEditorPlugin.js.map +0 -1
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/FloatingTextFormatToolbarPlugin.d.ts +0 -6
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/FloatingTextFormatToolbarPlugin.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/FloatingTextFormatToolbarPlugin.js +0 -310
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/FloatingTextFormatToolbarPlugin.js.map +0 -1
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/getDOMRangeRect.d.ts +0 -2
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/getDOMRangeRect.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/getDOMRangeRect.js +0 -19
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/getDOMRangeRect.js.map +0 -1
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/getSelectNode.d.ts +0 -2
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/getSelectNode.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/getSelectNode.js +0 -21
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/getSelectNode.js.map +0 -1
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/setFloatingElemPosition.d.ts +0 -2
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/setFloatingElemPosition.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/setFloatingElemPosition.js +0 -29
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/setFloatingElemPosition.js.map +0 -1
- package/dist/components/markdownEditor/plugins/ListMaxIndentLevelPlugin.d.ts +0 -2
- package/dist/components/markdownEditor/plugins/ListMaxIndentLevelPlugin.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/ListMaxIndentLevelPlugin.js +0 -45
- package/dist/components/markdownEditor/plugins/ListMaxIndentLevelPlugin.js.map +0 -1
- package/dist/components/markdownEditor/plugins/MarkdownTransformers.d.ts +0 -12
- package/dist/components/markdownEditor/plugins/MarkdownTransformers.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/MarkdownTransformers.js +0 -85
- package/dist/components/markdownEditor/plugins/MarkdownTransformers.js.map +0 -1
- package/dist/components/markdownEditor/plugins/ReadOnlyPlugin.d.ts +0 -6
- package/dist/components/markdownEditor/plugins/ReadOnlyPlugin.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/ReadOnlyPlugin.js +0 -12
- package/dist/components/markdownEditor/plugins/ReadOnlyPlugin.js.map +0 -1
- package/dist/components/markdownEditor/plugins/ToolbarPlugin.d.ts +0 -7
- package/dist/components/markdownEditor/plugins/ToolbarPlugin.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/ToolbarPlugin.js +0 -282
- package/dist/components/markdownEditor/plugins/ToolbarPlugin.js.map +0 -1
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNode.d.ts +0 -27
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNode.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNode.js +0 -158
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNode.js.map +0 -1
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.d.ts +0 -4
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.js +0 -21
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.js.map +0 -1
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.d.ts +0 -3
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.js +0 -71
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.js.map +0 -1
- package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.d.ts +0 -5
- package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.js +0 -190
- package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.js.map +0 -1
- package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.types.d.ts +0 -11
- package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.types.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.types.js +0 -3
- package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.types.js.map +0 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojiNode.d.ts +0 -24
- package/dist/components/markdownEditor/plugins/emoji/EmojiNode.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojiNode.js +0 -66
- package/dist/components/markdownEditor/plugins/emoji/EmojiNode.js.map +0 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojiNodeTransform.d.ts +0 -4
- package/dist/components/markdownEditor/plugins/emoji/EmojiNodeTransform.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojiNodeTransform.js +0 -35
- package/dist/components/markdownEditor/plugins/emoji/EmojiNodeTransform.js.map +0 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojiPickerPlugin.d.ts +0 -9
- package/dist/components/markdownEditor/plugins/emoji/EmojiPickerPlugin.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojiPickerPlugin.js +0 -103
- package/dist/components/markdownEditor/plugins/emoji/EmojiPickerPlugin.js.map +0 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.d.ts +0 -10
- package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.js +0 -59
- package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.js.map +0 -1
- package/dist/components/markdownEditor/plugins/index.d.ts +0 -7
- package/dist/components/markdownEditor/plugins/index.d.ts.map +0 -1
- package/dist/components/markdownEditor/plugins/index.js +0 -16
- package/dist/components/markdownEditor/plugins/index.js.map +0 -1
- package/dist/components/markdownEditor/theme.d.ts +0 -66
- package/dist/components/markdownEditor/theme.d.ts.map +0 -1
- package/dist/components/markdownEditor/theme.js +0 -69
- package/dist/components/markdownEditor/theme.js.map +0 -1
- package/dist/components/reporting/ChartReport.d.ts +0 -8
- package/dist/components/reporting/ChartReport.d.ts.map +0 -1
- package/dist/components/reporting/ChartReport.js +0 -81
- package/dist/components/reporting/ChartReport.js.map +0 -1
- package/dist/components/reporting/ReportFilter.d.ts +0 -9
- package/dist/components/reporting/ReportFilter.d.ts.map +0 -1
- package/dist/components/reporting/ReportFilter.js +0 -52
- package/dist/components/reporting/ReportFilter.js.map +0 -1
- package/dist/components/reporting/ReportFilterField.d.ts +0 -9
- package/dist/components/reporting/ReportFilterField.d.ts.map +0 -1
- package/dist/components/reporting/ReportFilterField.js +0 -156
- package/dist/components/reporting/ReportFilterField.js.map +0 -1
- package/dist/components/reporting/ReportOutput.d.ts +0 -8
- package/dist/components/reporting/ReportOutput.d.ts.map +0 -1
- package/dist/components/reporting/ReportOutput.js +0 -177
- package/dist/components/reporting/ReportOutput.js.map +0 -1
- package/dist/components/reporting/ReportWithFilter.d.ts +0 -7
- package/dist/components/reporting/ReportWithFilter.d.ts.map +0 -1
- package/dist/components/reporting/ReportWithFilter.js +0 -65
- package/dist/components/reporting/ReportWithFilter.js.map +0 -1
- package/dist/components/reporting/TableReport.d.ts +0 -8
- package/dist/components/reporting/TableReport.d.ts.map +0 -1
- package/dist/components/reporting/TableReport.js +0 -30
- package/dist/components/reporting/TableReport.js.map +0 -1
- package/dist/components/reporting/TreeReport.d.ts +0 -8
- package/dist/components/reporting/TreeReport.d.ts.map +0 -1
- package/dist/components/reporting/TreeReport.js +0 -89
- package/dist/components/reporting/TreeReport.js.map +0 -1
- package/dist/components/reporting/index.d.ts +0 -5
- package/dist/components/reporting/index.d.ts.map +0 -1
- package/dist/components/reporting/index.js +0 -12
- package/dist/components/reporting/index.js.map +0 -1
- package/dist/components/wrapper/Drawers.d.ts +0 -5
- package/dist/components/wrapper/Drawers.d.ts.map +0 -1
- package/dist/components/wrapper/Drawers.js +0 -54
- package/dist/components/wrapper/Drawers.js.map +0 -1
- package/dist/components/wrapper/SiteWrapper.d.ts +0 -15
- package/dist/components/wrapper/SiteWrapper.d.ts.map +0 -1
- package/dist/components/wrapper/SiteWrapper.js +0 -60
- package/dist/components/wrapper/SiteWrapper.js.map +0 -1
- package/dist/components/wrapper/TabPanel.d.ts +0 -9
- package/dist/components/wrapper/TabPanel.d.ts.map +0 -1
- package/dist/components/wrapper/TabPanel.js +0 -20
- package/dist/components/wrapper/TabPanel.js.map +0 -1
- package/dist/donationComponents/components/BankForm.d.ts +0 -14
- package/dist/donationComponents/components/BankForm.d.ts.map +0 -1
- package/dist/donationComponents/components/BankForm.js +0 -126
- package/dist/donationComponents/components/BankForm.js.map +0 -1
- package/dist/donationComponents/components/CardForm.d.ts +0 -13
- package/dist/donationComponents/components/CardForm.d.ts.map +0 -1
- package/dist/donationComponents/components/CardForm.js +0 -122
- package/dist/donationComponents/components/CardForm.js.map +0 -1
- package/dist/donationComponents/components/DonationForm.d.ts +0 -15
- package/dist/donationComponents/components/DonationForm.d.ts.map +0 -1
- package/dist/donationComponents/components/DonationForm.js +0 -199
- package/dist/donationComponents/components/DonationForm.js.map +0 -1
- package/dist/donationComponents/components/FundDonation.d.ts +0 -12
- package/dist/donationComponents/components/FundDonation.d.ts.map +0 -1
- package/dist/donationComponents/components/FundDonation.js +0 -32
- package/dist/donationComponents/components/FundDonation.js.map +0 -1
- package/dist/donationComponents/components/FundDonations.d.ts +0 -11
- package/dist/donationComponents/components/FundDonations.d.ts.map +0 -1
- package/dist/donationComponents/components/FundDonations.js +0 -33
- package/dist/donationComponents/components/FundDonations.js.map +0 -1
- package/dist/donationComponents/components/NonAuthDonation.d.ts +0 -12
- package/dist/donationComponents/components/NonAuthDonation.d.ts.map +0 -1
- package/dist/donationComponents/components/NonAuthDonation.js +0 -27
- package/dist/donationComponents/components/NonAuthDonation.js.map +0 -1
- package/dist/donationComponents/components/NonAuthDonationInner.d.ts +0 -12
- package/dist/donationComponents/components/NonAuthDonationInner.d.ts.map +0 -1
- package/dist/donationComponents/components/NonAuthDonationInner.js +0 -277
- package/dist/donationComponents/components/NonAuthDonationInner.js.map +0 -1
- package/dist/donationComponents/components/PaymentMethods.d.ts +0 -14
- package/dist/donationComponents/components/PaymentMethods.d.ts.map +0 -1
- package/dist/donationComponents/components/PaymentMethods.js +0 -84
- package/dist/donationComponents/components/PaymentMethods.js.map +0 -1
- package/dist/donationComponents/components/RecurringDonations.d.ts +0 -10
- package/dist/donationComponents/components/RecurringDonations.d.ts.map +0 -1
- package/dist/donationComponents/components/RecurringDonations.js +0 -93
- package/dist/donationComponents/components/RecurringDonations.js.map +0 -1
- package/dist/donationComponents/components/RecurringDonationsEdit.d.ts +0 -11
- package/dist/donationComponents/components/RecurringDonationsEdit.d.ts.map +0 -1
- package/dist/donationComponents/components/RecurringDonationsEdit.js +0 -66
- package/dist/donationComponents/components/RecurringDonationsEdit.js.map +0 -1
- package/dist/donationComponents/components/index.d.ts +0 -11
- package/dist/donationComponents/components/index.d.ts.map +0 -1
- package/dist/donationComponents/components/index.js +0 -24
- package/dist/donationComponents/components/index.js.map +0 -1
- package/dist/donationComponents/index.d.ts +0 -3
- package/dist/donationComponents/index.d.ts.map +0 -1
- package/dist/donationComponents/index.js +0 -21
- package/dist/donationComponents/index.js.map +0 -1
- package/dist/donationComponents/modals/DonationPreviewModal.d.ts +0 -15
- package/dist/donationComponents/modals/DonationPreviewModal.d.ts.map +0 -1
- package/dist/donationComponents/modals/DonationPreviewModal.js +0 -33
- package/dist/donationComponents/modals/DonationPreviewModal.js.map +0 -1
- package/dist/helpers/ApiHelper.d.ts +0 -18
- package/dist/helpers/ApiHelper.d.ts.map +0 -1
- package/dist/helpers/ApiHelper.js +0 -123
- package/dist/helpers/ApiHelper.js.map +0 -1
- package/dist/helpers/CommonEnvironmentHelper.d.ts +0 -21
- package/dist/helpers/CommonEnvironmentHelper.d.ts.map +0 -1
- package/dist/helpers/CommonEnvironmentHelper.js +0 -100
- package/dist/helpers/CommonEnvironmentHelper.js.map +0 -1
- package/dist/helpers/DonationHelper.d.ts +0 -8
- package/dist/helpers/DonationHelper.d.ts.map +0 -1
- package/dist/helpers/DonationHelper.js +0 -33
- package/dist/helpers/DonationHelper.js.map +0 -1
- package/dist/helpers/ReportHelper.d.ts +0 -5
- package/dist/helpers/ReportHelper.d.ts.map +0 -1
- package/dist/helpers/ReportHelper.js +0 -37
- package/dist/helpers/ReportHelper.js.map +0 -1
- package/dist/pageComponents/LoginPage.d.ts +0 -25
- package/dist/pageComponents/LoginPage.d.ts.map +0 -1
- package/dist/pageComponents/LoginPage.js +0 -288
- package/dist/pageComponents/LoginPage.js.map +0 -1
- package/dist/pageComponents/LogoutPage.d.ts +0 -9
- package/dist/pageComponents/LogoutPage.d.ts.map +0 -1
- package/dist/pageComponents/LogoutPage.js +0 -37
- package/dist/pageComponents/LogoutPage.js.map +0 -1
- package/dist/pageComponents/components/Forgot.d.ts +0 -8
- package/dist/pageComponents/components/Forgot.d.ts.map +0 -1
- package/dist/pageComponents/components/Forgot.js +0 -53
- package/dist/pageComponents/components/Forgot.js.map +0 -1
- package/dist/pageComponents/components/Login.d.ts +0 -15
- package/dist/pageComponents/components/Login.d.ts.map +0 -1
- package/dist/pageComponents/components/Login.js +0 -73
- package/dist/pageComponents/components/Login.js.map +0 -1
- package/dist/pageComponents/components/LoginSetPassword.d.ts +0 -13
- package/dist/pageComponents/components/LoginSetPassword.d.ts.map +0 -1
- package/dist/pageComponents/components/LoginSetPassword.js +0 -112
- package/dist/pageComponents/components/LoginSetPassword.js.map +0 -1
- package/dist/pageComponents/components/Register.d.ts +0 -12
- package/dist/pageComponents/components/Register.d.ts.map +0 -1
- package/dist/pageComponents/components/Register.js +0 -95
- package/dist/pageComponents/components/Register.js.map +0 -1
- package/dist/pageComponents/components/SelectChurchModal.d.ts +0 -14
- package/dist/pageComponents/components/SelectChurchModal.d.ts.map +0 -1
- package/dist/pageComponents/components/SelectChurchModal.js +0 -37
- package/dist/pageComponents/components/SelectChurchModal.js.map +0 -1
- package/dist/pageComponents/components/SelectChurchRegister.d.ts +0 -11
- package/dist/pageComponents/components/SelectChurchRegister.d.ts.map +0 -1
- package/dist/pageComponents/components/SelectChurchRegister.js +0 -89
- package/dist/pageComponents/components/SelectChurchRegister.js.map +0 -1
- package/dist/pageComponents/components/SelectChurchSearch.d.ts +0 -10
- package/dist/pageComponents/components/SelectChurchSearch.d.ts.map +0 -1
- package/dist/pageComponents/components/SelectChurchSearch.js +0 -58
- package/dist/pageComponents/components/SelectChurchSearch.js.map +0 -1
- package/dist/pageComponents/components/SelectableChurch.d.ts +0 -9
- package/dist/pageComponents/components/SelectableChurch.d.ts.map +0 -1
- package/dist/pageComponents/components/SelectableChurch.js +0 -18
- package/dist/pageComponents/components/SelectableChurch.js.map +0 -1
- package/dist/pageComponents/index.d.ts +0 -4
- package/dist/pageComponents/index.d.ts.map +0 -1
- package/dist/pageComponents/index.js +0 -10
- package/dist/pageComponents/index.js.map +0 -1
- package/src/components/markdownEditor/Editor.tsx +0 -150
- package/src/components/markdownEditor/IconNamesList.ts +0 -14
- package/src/components/markdownEditor/MarkdownEditor.tsx +0 -18
- package/src/components/markdownEditor/MarkdownModal.tsx +0 -49
- package/src/components/markdownEditor/MarkdownPreview.tsx +0 -18
- package/src/components/markdownEditor/MarkdownPreviewLight.tsx +0 -53
- package/src/components/markdownEditor/editor.css +0 -787
- package/src/components/markdownEditor/images/emoji/1F600.png +0 -0
- package/src/components/markdownEditor/images/emoji/1F641.png +0 -0
- package/src/components/markdownEditor/images/emoji/1F642.png +0 -0
- package/src/components/markdownEditor/images/emoji/2764.png +0 -0
- package/src/components/markdownEditor/images/icons/arrow-clockwise.svg +0 -4
- package/src/components/markdownEditor/images/icons/arrow-counterclockwise.svg +0 -4
- package/src/components/markdownEditor/images/icons/chat-square-quote.svg +0 -4
- package/src/components/markdownEditor/images/icons/chevron-down.svg +0 -3
- package/src/components/markdownEditor/images/icons/code.svg +0 -3
- package/src/components/markdownEditor/images/icons/journal-code.svg +0 -5
- package/src/components/markdownEditor/images/icons/journal-text.svg +0 -5
- package/src/components/markdownEditor/images/icons/justify.svg +0 -3
- package/src/components/markdownEditor/images/icons/link.svg +0 -4
- package/src/components/markdownEditor/images/icons/list-ol.svg +0 -4
- package/src/components/markdownEditor/images/icons/list-ul.svg +0 -3
- package/src/components/markdownEditor/images/icons/pencil-fill.svg +0 -3
- package/src/components/markdownEditor/images/icons/text-center.svg +0 -3
- package/src/components/markdownEditor/images/icons/text-left.svg +0 -3
- package/src/components/markdownEditor/images/icons/text-paragraph.svg +0 -3
- package/src/components/markdownEditor/images/icons/text-right.svg +0 -3
- package/src/components/markdownEditor/images/icons/type-bold.svg +0 -3
- package/src/components/markdownEditor/images/icons/type-h1.svg +0 -3
- package/src/components/markdownEditor/images/icons/type-h2.svg +0 -3
- package/src/components/markdownEditor/images/icons/type-h3.svg +0 -3
- package/src/components/markdownEditor/images/icons/type-h4.svg +0 -13
- package/src/components/markdownEditor/images/icons/type-italic.svg +0 -3
- package/src/components/markdownEditor/images/icons/type-strikethrough.svg +0 -3
- package/src/components/markdownEditor/images/icons/type-underline.svg +0 -3
- package/src/components/markdownEditor/index.ts +0 -3
- package/src/components/markdownEditor/plugins/AutoLinkPlugin.tsx +0 -35
- package/src/components/markdownEditor/plugins/ControlledEditorPlugin.tsx +0 -24
- package/src/components/markdownEditor/plugins/FloatingTextMenu/FloatingTextFormatToolbarPlugin.tsx +0 -445
- package/src/components/markdownEditor/plugins/FloatingTextMenu/getDOMRangeRect.tsx +0 -17
- package/src/components/markdownEditor/plugins/FloatingTextMenu/getSelectNode.tsx +0 -17
- package/src/components/markdownEditor/plugins/FloatingTextMenu/setFloatingElemPosition.tsx +0 -33
- package/src/components/markdownEditor/plugins/ListMaxIndentLevelPlugin.tsx +0 -68
- package/src/components/markdownEditor/plugins/MarkdownTransformers.ts +0 -106
- package/src/components/markdownEditor/plugins/ReadOnlyPlugin.tsx +0 -15
- package/src/components/markdownEditor/plugins/ToolbarPlugin.tsx +0 -424
- package/src/components/markdownEditor/plugins/customLink/CustomLinkNode.tsx +0 -224
- package/src/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.tsx +0 -32
- package/src/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.tsx +0 -102
- package/src/components/markdownEditor/plugins/customLink/FloatingLinkEditor.tsx +0 -270
- package/src/components/markdownEditor/plugins/customLink/FloatingLinkEditor.types.ts +0 -11
- package/src/components/markdownEditor/plugins/emoji/EmojiNode.tsx +0 -95
- package/src/components/markdownEditor/plugins/emoji/EmojiNodeTransform.ts +0 -41
- package/src/components/markdownEditor/plugins/emoji/EmojiPickerPlugin.tsx +0 -152
- package/src/components/markdownEditor/plugins/emoji/EmojisPlugin.tsx +0 -70
- package/src/components/markdownEditor/plugins/index.ts +0 -6
- package/src/components/markdownEditor/theme.ts +0 -65
- package/src/components/reporting/ChartReport.tsx +0 -89
- package/src/components/reporting/ReportFilter.tsx +0 -56
- package/src/components/reporting/ReportFilterField.tsx +0 -163
- package/src/components/reporting/ReportOutput.tsx +0 -168
- package/src/components/reporting/ReportWithFilter.tsx +0 -72
- package/src/components/reporting/TableReport.tsx +0 -44
- package/src/components/reporting/TreeReport.tsx +0 -103
- package/src/components/reporting/index.ts +0 -4
- package/src/components/wrapper/Drawers.tsx +0 -62
- package/src/components/wrapper/SiteWrapper.tsx +0 -99
- package/src/components/wrapper/TabPanel.tsx +0 -32
- package/src/donationComponents/components/BankForm.tsx +0 -163
- package/src/donationComponents/components/CardForm.tsx +0 -104
- package/src/donationComponents/components/DonationForm.tsx +0 -260
- package/src/donationComponents/components/FundDonation.tsx +0 -59
- package/src/donationComponents/components/FundDonations.tsx +0 -44
- package/src/donationComponents/components/NonAuthDonation.tsx +0 -34
- package/src/donationComponents/components/NonAuthDonationInner.tsx +0 -300
- package/src/donationComponents/components/PaymentMethods.tsx +0 -133
- package/src/donationComponents/components/RecurringDonations.tsx +0 -117
- package/src/donationComponents/components/RecurringDonationsEdit.tsx +0 -96
- package/src/donationComponents/components/index.tsx +0 -10
- package/src/donationComponents/index.ts +0 -2
- package/src/donationComponents/modals/DonationPreviewModal.tsx +0 -70
- package/src/helpers/ApiHelper.ts +0 -127
- package/src/helpers/CommonEnvironmentHelper.ts +0 -98
- package/src/helpers/DonationHelper.ts +0 -26
- package/src/helpers/ReportHelper.ts +0 -34
- package/src/pageComponents/LoginPage.tsx +0 -284
- package/src/pageComponents/LogoutPage.tsx +0 -43
- package/src/pageComponents/components/Forgot.tsx +0 -81
- package/src/pageComponents/components/Login.tsx +0 -62
- package/src/pageComponents/components/LoginSetPassword.tsx +0 -98
- package/src/pageComponents/components/Register.tsx +0 -103
- package/src/pageComponents/components/SelectChurchModal.tsx +0 -58
- package/src/pageComponents/components/SelectChurchRegister.tsx +0 -87
- package/src/pageComponents/components/SelectChurchSearch.tsx +0 -71
- package/src/pageComponents/components/SelectableChurch.tsx +0 -40
- package/src/pageComponents/index.ts +0 -3
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getSelectedNode = getSelectedNode;
|
|
7
|
-
exports.ToolbarPlugin = ToolbarPlugin;
|
|
8
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
-
const LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
10
|
-
const react_1 = require("react");
|
|
11
|
-
const lexical_1 = require("lexical");
|
|
12
|
-
const selection_1 = require("@lexical/selection");
|
|
13
|
-
const utils_1 = require("@lexical/utils");
|
|
14
|
-
const list_1 = require("@lexical/list");
|
|
15
|
-
const react_dom_1 = require("react-dom");
|
|
16
|
-
const rich_text_1 = require("@lexical/rich-text");
|
|
17
|
-
const code_1 = require("@lexical/code");
|
|
18
|
-
const material_1 = require("@mui/material");
|
|
19
|
-
const FloatingLinkEditor_1 = __importDefault(require("./customLink/FloatingLinkEditor"));
|
|
20
|
-
const CustomLinkNode_1 = require("./customLink/CustomLinkNode");
|
|
21
|
-
const LowPriority = 1;
|
|
22
|
-
const supportedBlockTypes = new Set(["paragraph", "quote", "code", "h1", "h2", "h3", "h4", "ul", "ol"]);
|
|
23
|
-
const blockTypeToBlockName = {
|
|
24
|
-
code: "Code Block",
|
|
25
|
-
h1: "Large Heading",
|
|
26
|
-
h2: "Small Heading",
|
|
27
|
-
h3: "Heading",
|
|
28
|
-
h4: "Heading",
|
|
29
|
-
h5: "Heading",
|
|
30
|
-
ol: "Numbered List",
|
|
31
|
-
paragraph: "Normal",
|
|
32
|
-
quote: "Quote",
|
|
33
|
-
ul: "Bulleted List"
|
|
34
|
-
};
|
|
35
|
-
function Divider() {
|
|
36
|
-
return (0, jsx_runtime_1.jsx)("div", { className: "divider" });
|
|
37
|
-
}
|
|
38
|
-
/*
|
|
39
|
-
function positionEditorElement(editor: any, rect: any) {
|
|
40
|
-
if (rect === null) {
|
|
41
|
-
editor.style.opacity = "0";
|
|
42
|
-
editor.style.top = "-1000px";
|
|
43
|
-
editor.style.left = "-1000px";
|
|
44
|
-
} else {
|
|
45
|
-
editor.style.opacity = "1";
|
|
46
|
-
editor.style.top = `${rect.top + rect.height + window.pageYOffset + 10}px`;
|
|
47
|
-
editor.style.left = `${rect.left + window.pageXOffset - editor.offsetWidth / 2 + rect.width / 2}px`;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
*/
|
|
51
|
-
function Select({ onChange, className, options, value }) {
|
|
52
|
-
return ((0, jsx_runtime_1.jsxs)("select", { className: className, onChange: onChange, value: value, children: [(0, jsx_runtime_1.jsx)("option", { hidden: true, value: "" }), options.map((option) => ((0, jsx_runtime_1.jsx)("option", { value: option, children: option }, option)))] }));
|
|
53
|
-
}
|
|
54
|
-
function getSelectedNode(selection) {
|
|
55
|
-
const anchor = selection.anchor;
|
|
56
|
-
const focus = selection.focus;
|
|
57
|
-
const anchorNode = selection.anchor.getNode();
|
|
58
|
-
const focusNode = selection.focus.getNode();
|
|
59
|
-
if (anchorNode === focusNode) {
|
|
60
|
-
return anchorNode;
|
|
61
|
-
}
|
|
62
|
-
const isBackward = selection.isBackward();
|
|
63
|
-
if (isBackward) {
|
|
64
|
-
return (0, selection_1.$isAtNodeEnd)(focus) ? anchorNode : focusNode;
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
return (0, selection_1.$isAtNodeEnd)(anchor) ? focusNode : anchorNode;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
function BlockOptionsDropdownList({ editor, blockType, toolbarRef, setShowBlockOptionsDropDown }) {
|
|
71
|
-
const dropDownRef = (0, react_1.useRef)(null);
|
|
72
|
-
(0, react_1.useEffect)(() => {
|
|
73
|
-
const toolbar = toolbarRef.current;
|
|
74
|
-
const dropDown = dropDownRef.current;
|
|
75
|
-
if (toolbar !== null && dropDown !== null) {
|
|
76
|
-
const { top, left } = toolbar.getBoundingClientRect();
|
|
77
|
-
dropDown.style.top = `${top + 40}px`;
|
|
78
|
-
dropDown.style.left = `${left}px`;
|
|
79
|
-
}
|
|
80
|
-
}, [dropDownRef, toolbarRef]);
|
|
81
|
-
(0, react_1.useEffect)(() => {
|
|
82
|
-
const dropDown = dropDownRef.current;
|
|
83
|
-
const toolbar = toolbarRef.current;
|
|
84
|
-
if (dropDown !== null && toolbar !== null) {
|
|
85
|
-
const handle = (event) => {
|
|
86
|
-
const target = event.target;
|
|
87
|
-
if (!dropDown.contains(target) && !toolbar.contains(target)) {
|
|
88
|
-
setShowBlockOptionsDropDown(false);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
document.addEventListener("click", handle);
|
|
92
|
-
return () => {
|
|
93
|
-
document.removeEventListener("click", handle);
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
}, [dropDownRef, setShowBlockOptionsDropDown, toolbarRef]);
|
|
97
|
-
const formatParagraph = () => {
|
|
98
|
-
if (blockType !== "paragraph") {
|
|
99
|
-
editor.update(() => {
|
|
100
|
-
const selection = (0, lexical_1.$getSelection)();
|
|
101
|
-
if ((0, lexical_1.$isRangeSelection)(selection)) {
|
|
102
|
-
(0, selection_1.$wrapNodes)(selection, () => (0, lexical_1.$createParagraphNode)());
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
setShowBlockOptionsDropDown(false);
|
|
107
|
-
};
|
|
108
|
-
const formatLargeHeading = () => {
|
|
109
|
-
if (blockType !== "h1") {
|
|
110
|
-
editor.update(() => {
|
|
111
|
-
const selection = (0, lexical_1.$getSelection)();
|
|
112
|
-
if ((0, lexical_1.$isRangeSelection)(selection)) {
|
|
113
|
-
(0, selection_1.$wrapNodes)(selection, () => (0, rich_text_1.$createHeadingNode)("h1"));
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
setShowBlockOptionsDropDown(false);
|
|
118
|
-
};
|
|
119
|
-
const formatSmallHeading = () => {
|
|
120
|
-
if (blockType !== "h2") {
|
|
121
|
-
editor.update(() => {
|
|
122
|
-
const selection = (0, lexical_1.$getSelection)();
|
|
123
|
-
if ((0, lexical_1.$isRangeSelection)(selection)) {
|
|
124
|
-
(0, selection_1.$wrapNodes)(selection, () => (0, rich_text_1.$createHeadingNode)("h2"));
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
setShowBlockOptionsDropDown(false);
|
|
129
|
-
};
|
|
130
|
-
const formatHeading3 = () => {
|
|
131
|
-
if (blockType !== "h3") {
|
|
132
|
-
editor.update(() => {
|
|
133
|
-
const selection = (0, lexical_1.$getSelection)();
|
|
134
|
-
if ((0, lexical_1.$isRangeSelection)(selection)) {
|
|
135
|
-
(0, selection_1.$wrapNodes)(selection, () => (0, rich_text_1.$createHeadingNode)("h3"));
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
setShowBlockOptionsDropDown(false);
|
|
140
|
-
};
|
|
141
|
-
const formatHeading4 = () => {
|
|
142
|
-
if (blockType !== "h4") {
|
|
143
|
-
editor.update(() => {
|
|
144
|
-
const selection = (0, lexical_1.$getSelection)();
|
|
145
|
-
if ((0, lexical_1.$isRangeSelection)(selection)) {
|
|
146
|
-
(0, selection_1.$wrapNodes)(selection, () => (0, rich_text_1.$createHeadingNode)("h4"));
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
setShowBlockOptionsDropDown(false);
|
|
151
|
-
};
|
|
152
|
-
const formatBulletList = () => {
|
|
153
|
-
if (blockType !== "ul") {
|
|
154
|
-
editor.dispatchCommand(list_1.INSERT_UNORDERED_LIST_COMMAND);
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
editor.dispatchCommand(list_1.REMOVE_LIST_COMMAND);
|
|
158
|
-
}
|
|
159
|
-
setShowBlockOptionsDropDown(false);
|
|
160
|
-
};
|
|
161
|
-
const formatNumberedList = () => {
|
|
162
|
-
if (blockType !== "ol") {
|
|
163
|
-
editor.dispatchCommand(list_1.INSERT_ORDERED_LIST_COMMAND);
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
editor.dispatchCommand(list_1.REMOVE_LIST_COMMAND);
|
|
167
|
-
}
|
|
168
|
-
setShowBlockOptionsDropDown(false);
|
|
169
|
-
};
|
|
170
|
-
const formatQuote = () => {
|
|
171
|
-
if (blockType !== "quote") {
|
|
172
|
-
editor.update(() => {
|
|
173
|
-
const selection = (0, lexical_1.$getSelection)();
|
|
174
|
-
if ((0, lexical_1.$isRangeSelection)(selection)) {
|
|
175
|
-
(0, selection_1.$wrapNodes)(selection, () => (0, rich_text_1.$createQuoteNode)());
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
setShowBlockOptionsDropDown(false);
|
|
180
|
-
};
|
|
181
|
-
const formatCodeBlock = () => {
|
|
182
|
-
if (blockType !== "code") {
|
|
183
|
-
editor.update(() => {
|
|
184
|
-
const selection = (0, lexical_1.$getSelection)();
|
|
185
|
-
if ((0, lexical_1.$isRangeSelection)(selection)) {
|
|
186
|
-
(0, selection_1.$wrapNodes)(selection, () => (0, code_1.$createCodeNode)());
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
setShowBlockOptionsDropDown(false);
|
|
191
|
-
};
|
|
192
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "dropdown", ref: dropDownRef, children: [(0, jsx_runtime_1.jsxs)("button", { className: "item", onClick: formatParagraph, children: [(0, jsx_runtime_1.jsx)("span", { className: "icon paragraph" }), (0, jsx_runtime_1.jsx)("span", { className: "text", children: "Normal" }), blockType === "paragraph" && (0, jsx_runtime_1.jsx)("span", { className: "active" })] }), (0, jsx_runtime_1.jsxs)("button", { className: "item", onClick: formatLargeHeading, children: [(0, jsx_runtime_1.jsx)("span", { className: "icon large-heading" }), (0, jsx_runtime_1.jsx)("span", { className: "text", children: "Large Heading" }), blockType === "h1" && (0, jsx_runtime_1.jsx)("span", { className: "active" })] }), (0, jsx_runtime_1.jsxs)("button", { className: "item", onClick: formatSmallHeading, children: [(0, jsx_runtime_1.jsx)("span", { className: "icon small-heading" }), (0, jsx_runtime_1.jsx)("span", { className: "text", children: "Small Heading" }), blockType === "h2" && (0, jsx_runtime_1.jsx)("span", { className: "active" })] }), (0, jsx_runtime_1.jsxs)("button", { className: "item", onClick: formatHeading3, children: [(0, jsx_runtime_1.jsx)("span", { className: "icon h3" }), (0, jsx_runtime_1.jsx)("span", { className: "text", children: "Heading 3" }), blockType === "h4" && (0, jsx_runtime_1.jsx)("span", { className: "active" })] }), (0, jsx_runtime_1.jsxs)("button", { className: "item", onClick: formatHeading4, children: [(0, jsx_runtime_1.jsx)("span", { className: "icon h4" }), (0, jsx_runtime_1.jsx)("span", { className: "text", children: "Heading 4" }), blockType === "h4" && (0, jsx_runtime_1.jsx)("span", { className: "active" })] }), (0, jsx_runtime_1.jsxs)("button", { className: "item", onClick: formatBulletList, children: [(0, jsx_runtime_1.jsx)("span", { className: "icon bullet-list" }), (0, jsx_runtime_1.jsx)("span", { className: "text", children: "Bullet List" }), blockType === "ul" && (0, jsx_runtime_1.jsx)("span", { className: "active" })] }), (0, jsx_runtime_1.jsxs)("button", { className: "item", onClick: formatNumberedList, children: [(0, jsx_runtime_1.jsx)("span", { className: "icon numbered-list" }), (0, jsx_runtime_1.jsx)("span", { className: "text", children: "Numbered List" }), blockType === "ol" && (0, jsx_runtime_1.jsx)("span", { className: "active" })] }), (0, jsx_runtime_1.jsxs)("button", { className: "item", onClick: formatQuote, children: [(0, jsx_runtime_1.jsx)("span", { className: "icon quote" }), (0, jsx_runtime_1.jsx)("span", { className: "text", children: "Quote" }), blockType === "quote" && (0, jsx_runtime_1.jsx)("span", { className: "active" })] }), (0, jsx_runtime_1.jsxs)("button", { className: "item", onClick: formatCodeBlock, children: [(0, jsx_runtime_1.jsx)("span", { className: "icon code" }), (0, jsx_runtime_1.jsx)("span", { className: "text", children: "Code" }), blockType === "code" && (0, jsx_runtime_1.jsx)("span", { className: "active" })] })] }));
|
|
193
|
-
}
|
|
194
|
-
function ToolbarPlugin(props) {
|
|
195
|
-
const [editor] = (0, LexicalComposerContext_1.useLexicalComposerContext)();
|
|
196
|
-
const toolbarRef = (0, react_1.useRef)(null);
|
|
197
|
-
const [blockType, setBlockType] = (0, react_1.useState)("paragraph");
|
|
198
|
-
const [selectedElementKey, setSelectedElementKey] = (0, react_1.useState)(null);
|
|
199
|
-
const [showBlockOptionsDropDown, setShowBlockOptionsDropDown] = (0, react_1.useState)(false);
|
|
200
|
-
const [codeLanguage, setCodeLanguage] = (0, react_1.useState)("");
|
|
201
|
-
const [isLink, setIsLink] = (0, react_1.useState)(false);
|
|
202
|
-
const [isBold, setIsBold] = (0, react_1.useState)(false);
|
|
203
|
-
const [isItalic, setIsItalic] = (0, react_1.useState)(false);
|
|
204
|
-
const [isUnderline, setIsUnderline] = (0, react_1.useState)(false);
|
|
205
|
-
const [isCode, setIsCode] = (0, react_1.useState)(false);
|
|
206
|
-
//const [isStrikethrough, setIsStrikethrough] = useState(false);
|
|
207
|
-
const [linkUrl, setLinkUrl] = (0, react_1.useState)("https://");
|
|
208
|
-
const [targetAttribute, setTargetAttribute] = (0, react_1.useState)("_self");
|
|
209
|
-
const [classNamesList, setClassNamesList] = (0, react_1.useState)(["primary"]);
|
|
210
|
-
const updateToolbar = (0, react_1.useCallback)(() => {
|
|
211
|
-
const selection = (0, lexical_1.$getSelection)();
|
|
212
|
-
if ((0, lexical_1.$isRangeSelection)(selection)) {
|
|
213
|
-
const anchorNode = selection.anchor.getNode();
|
|
214
|
-
const element = anchorNode.getKey() === "root" ? anchorNode : anchorNode.getTopLevelElementOrThrow();
|
|
215
|
-
const elementKey = element.getKey();
|
|
216
|
-
const elementDOM = editor.getElementByKey(elementKey);
|
|
217
|
-
if (elementDOM !== null) {
|
|
218
|
-
setSelectedElementKey(elementKey);
|
|
219
|
-
if ((0, list_1.$isListNode)(element)) {
|
|
220
|
-
const parentList = (0, utils_1.$getNearestNodeOfType)(anchorNode, list_1.ListNode);
|
|
221
|
-
const type = parentList ? parentList.getTag() : element.getTag();
|
|
222
|
-
setBlockType(type);
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
const type = (0, rich_text_1.$isHeadingNode)(element) ? element.getTag() : element.getType();
|
|
226
|
-
setBlockType(type);
|
|
227
|
-
if ((0, code_1.$isCodeNode)(element)) {
|
|
228
|
-
setCodeLanguage(element.getLanguage() || (0, code_1.getDefaultCodeLanguage)());
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
// Update text format
|
|
233
|
-
setIsBold(selection.hasFormat("bold"));
|
|
234
|
-
setIsItalic(selection.hasFormat("italic"));
|
|
235
|
-
setIsUnderline(selection.hasFormat("underline"));
|
|
236
|
-
setIsCode(selection.hasFormat("code"));
|
|
237
|
-
//setIsStrikethrough(selection.hasFormat("strikethrough"));
|
|
238
|
-
// Update links
|
|
239
|
-
const node = getSelectedNode(selection);
|
|
240
|
-
const parent = node.getParent();
|
|
241
|
-
if ((0, CustomLinkNode_1.$isCustomLinkNode)(parent) || (0, CustomLinkNode_1.$isCustomLinkNode)(node)) {
|
|
242
|
-
setIsLink(true);
|
|
243
|
-
}
|
|
244
|
-
else {
|
|
245
|
-
setIsLink(false);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}, [editor]);
|
|
249
|
-
(0, react_1.useEffect)(() => (0, utils_1.mergeRegister)(editor.registerUpdateListener(({ editorState }) => {
|
|
250
|
-
editorState.read(() => {
|
|
251
|
-
updateToolbar();
|
|
252
|
-
});
|
|
253
|
-
}), editor.registerCommand(lexical_1.SELECTION_CHANGE_COMMAND, (_payload, newEditor) => {
|
|
254
|
-
updateToolbar();
|
|
255
|
-
return false;
|
|
256
|
-
}, LowPriority)), [editor, updateToolbar]);
|
|
257
|
-
const codeLanguges = (0, react_1.useMemo)(() => (0, code_1.getCodeLanguages)(), []);
|
|
258
|
-
const onCodeLanguageSelect = (0, react_1.useCallback)((e) => {
|
|
259
|
-
editor.update(() => {
|
|
260
|
-
if (selectedElementKey !== null) {
|
|
261
|
-
const node = (0, lexical_1.$getNodeByKey)(selectedElementKey);
|
|
262
|
-
if ((0, code_1.$isCodeNode)(node)) {
|
|
263
|
-
node.setLanguage(e.target.value);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
}, [editor, selectedElementKey]);
|
|
268
|
-
const insertLink = (0, react_1.useCallback)(() => {
|
|
269
|
-
editor.dispatchCommand(CustomLinkNode_1.TOGGLE_CUSTOM_LINK_NODE_COMMAND, {
|
|
270
|
-
url: linkUrl,
|
|
271
|
-
classNames: classNamesList,
|
|
272
|
-
target: targetAttribute
|
|
273
|
-
});
|
|
274
|
-
}, [editor, isLink]); //eslint-disable-line
|
|
275
|
-
const editorEl = (typeof window !== 'undefined') && window.document.getElementById('elementEditDialog');
|
|
276
|
-
const portalKey = editorEl ? editorEl : document.body;
|
|
277
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "toolbar", ref: toolbarRef, children: [supportedBlockTypes.has(blockType) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("button", { className: "toolbar-item block-controls", onClick: () => setShowBlockOptionsDropDown(!showBlockOptionsDropDown), "aria-label": "Formatting Options", children: [(0, jsx_runtime_1.jsx)("span", { className: "icon block-type " + blockType }), (0, jsx_runtime_1.jsx)("span", { className: "text", children: blockTypeToBlockName[blockType] }), (0, jsx_runtime_1.jsx)("i", { className: "chevron-down" })] }), showBlockOptionsDropDown
|
|
278
|
-
&& (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(BlockOptionsDropdownList, { editor: editor, blockType: blockType, toolbarRef: toolbarRef, setShowBlockOptionsDropDown: setShowBlockOptionsDropDown }), portalKey), (0, jsx_runtime_1.jsx)(Divider, {})] })), blockType === "code"
|
|
279
|
-
? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Select, { className: "toolbar-item code-language", onChange: onCodeLanguageSelect, options: codeLanguges, value: codeLanguage }), (0, jsx_runtime_1.jsx)("i", { className: "chevron-down inside" })] }))
|
|
280
|
-
: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("button", { onClick: () => { editor.dispatchCommand(lexical_1.FORMAT_TEXT_COMMAND, "bold"); }, className: "toolbar-item spaced " + (isBold ? "active" : ""), "aria-label": "Format Bold", children: (0, jsx_runtime_1.jsx)("i", { className: "format bold" }) }), (0, jsx_runtime_1.jsx)("button", { onClick: () => { editor.dispatchCommand(lexical_1.FORMAT_TEXT_COMMAND, "italic"); }, className: "toolbar-item spaced " + (isItalic ? "active" : ""), "aria-label": "Format Italics", children: (0, jsx_runtime_1.jsx)("i", { className: "format italic" }) }), (0, jsx_runtime_1.jsx)("button", { onClick: () => { editor.dispatchCommand(lexical_1.FORMAT_TEXT_COMMAND, "underline"); }, className: "toolbar-item spaced " + (isUnderline ? "active" : ""), "aria-label": "Format Underline", children: (0, jsx_runtime_1.jsx)("i", { className: "format underline" }) }), (0, jsx_runtime_1.jsx)("button", { onClick: insertLink, className: "toolbar-item spaced " + (isLink ? "active" : ""), "aria-label": "Insert Link", children: (0, jsx_runtime_1.jsx)("i", { className: "format link" }) }), (0, jsx_runtime_1.jsx)("button", { onClick: () => { editor.dispatchCommand(lexical_1.FORMAT_TEXT_COMMAND, "code"); }, className: "toolbar-item spaced " + (isCode ? "active" : ""), "aria-label": "Format Code", children: (0, jsx_runtime_1.jsx)("i", { className: "format code" }) }), isLink && (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(FloatingLinkEditor_1.default, { selectedElementKey: selectedElementKey, linkUrl: linkUrl, setLinkUrl: setLinkUrl, classNamesList: classNamesList, setClassNamesList: setClassNamesList, targetAttribute: targetAttribute, setTargetAttribute: setTargetAttribute }), portalKey)] })), (0, jsx_runtime_1.jsx)(Divider, {}), (0, jsx_runtime_1.jsx)("button", { onClick: () => { props.goFullScreen(); }, className: "toolbar-item spaced", "aria-label": "Full Screen", children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "fullscreen" }) })] }));
|
|
281
|
-
}
|
|
282
|
-
//# sourceMappingURL=ToolbarPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarPlugin.js","sourceRoot":"","sources":["../../../../src/components/markdownEditor/plugins/ToolbarPlugin.tsx"],"names":[],"mappings":";;;;;AA8DA,0CAcC;AA+LD,sCA4JC;;AAtaD,kFAAkF;AAClF,iCAA0E;AAC1E,qCAAgJ;AAChJ,kDAA8D;AAC9D,0CAAsE;AACtE,wCAAuI;AACvI,yCAAyC;AACzC,kDAA0F;AAC1F,wCAAuG;AACvG,4CAAqC;AACrC,yFAAiE;AACjE,gEAAiG;AAEjG,MAAM,WAAW,GAAG,CAAC,CAAC;AAEtB,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAExG,MAAM,oBAAoB,GAAQ;IAChC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,eAAe;IACnB,EAAE,EAAE,eAAe;IACnB,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,eAAe;IACnB,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,OAAO;IACd,EAAE,EAAE,eAAe;CACpB,CAAC;AAEF,SAAS,OAAO;IACd,OAAO,gCAAK,SAAS,EAAC,SAAS,GAAG,CAAC;AACrC,CAAC;AAED;;;;;;;;;;;;EAYE;AAEF,SAAS,MAAM,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EA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BAAkB,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAE,kBAAkB,EAAE,kBAAkB,GAAI,EAAE,SAAS,CAAC,IAC3R,CAAC,EACN,uBAAC,OAAO,KAAG,EACX,mCAAQ,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,YAAY,EAAE,CAAA,CAAC,CAAC,EAAE,SAAS,EAAC,qBAAqB,gBAAY,aAAa,YACvG,uBAAC,eAAI,6BAAkB,GAChB,IACL,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { LexicalNode, LexicalCommand, NodeKey } from "lexical";
|
|
2
|
-
import { LinkNode } from "@lexical/link";
|
|
3
|
-
export interface LinkCustomizationAttributes {
|
|
4
|
-
url: string;
|
|
5
|
-
target?: string;
|
|
6
|
-
classNames?: Array<string>;
|
|
7
|
-
}
|
|
8
|
-
export declare class CustomLinkNode extends LinkNode {
|
|
9
|
-
__url: string;
|
|
10
|
-
__target: string;
|
|
11
|
-
__classNames: Array<string>;
|
|
12
|
-
constructor(url: string, target: string, classNames: Array<string>, key?: NodeKey);
|
|
13
|
-
static importJSON(serializedNode: any): LinkNode;
|
|
14
|
-
exportJSON(): import("@lexical/link").SerializedLinkNode | import("@lexical/link").SerializedAutoLinkNode;
|
|
15
|
-
static getType(): string;
|
|
16
|
-
static clone(node: CustomLinkNode): CustomLinkNode;
|
|
17
|
-
createDOM(): HTMLAnchorElement;
|
|
18
|
-
updateDOM(): boolean;
|
|
19
|
-
setClassNames(classNames: Array<string>): void;
|
|
20
|
-
}
|
|
21
|
-
export declare const TOGGLE_CUSTOM_LINK_NODE_COMMAND: LexicalCommand<LinkCustomizationAttributes>;
|
|
22
|
-
export declare function $createCustomLinkNode(url: string, target: string, classNames: Array<string>): CustomLinkNode;
|
|
23
|
-
export declare function $isCustomLinkNode(node: LexicalNode | null | undefined | any): node is CustomLinkNode;
|
|
24
|
-
export declare const toggleCustomLinkNode: ({ url, target, classNames, getNodeByKey }: LinkCustomizationAttributes & {
|
|
25
|
-
getNodeByKey: (key: NodeKey) => HTMLElement | null;
|
|
26
|
-
}) => void;
|
|
27
|
-
//# sourceMappingURL=CustomLinkNode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CustomLinkNode.d.ts","sourceRoot":"","sources":["../../../../../src/components/markdownEditor/plugins/customLink/CustomLinkNode.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,cAAc,EAA8C,OAAO,EAA4C,MAAM,SAAS,CAAC;AACpK,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,MAAM,WAAW,2BAA2B;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;gBAE1B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,EACzB,GAAG,CAAC,EAAE,OAAO;IAQf,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,GAAG;IAIrC,UAAU;IAIV,MAAM,CAAC,OAAO,IAAK,MAAM;IAIzB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAG,cAAc,GAAI,cAAc;IAMpD,SAAS;IAYT,SAAS,IAAI,OAAO;IAIpB,aAAa,CAAC,UAAU,EAAG,KAAK,CAAC,MAAM,CAAC,GAAI,IAAI;CAKjD;AAED,eAAO,MAAM,+BAA+B,EAAE,cAAc,CAAC,2BAA2B,CAAmB,CAAC;AAE5G,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,GACxB,cAAc,CAEhB;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,GAAG,GACzC,IAAI,IAAI,cAAc,CAExB;AAED,eAAO,MAAM,oBAAoB,GAC/B,2CAKI,2BAA2B,GAAG;IAChC,YAAY,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,WAAW,GAAG,IAAI,CAAC;CACpD,KAAG,IAmHL,CAAA"}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.toggleCustomLinkNode = exports.TOGGLE_CUSTOM_LINK_NODE_COMMAND = exports.CustomLinkNode = void 0;
|
|
7
|
-
exports.$createCustomLinkNode = $createCustomLinkNode;
|
|
8
|
-
exports.$isCustomLinkNode = $isCustomLinkNode;
|
|
9
|
-
const lexical_1 = require("lexical");
|
|
10
|
-
const link_1 = require("@lexical/link");
|
|
11
|
-
const utils_1 = __importDefault(require("@lexical/utils"));
|
|
12
|
-
class CustomLinkNode extends link_1.LinkNode {
|
|
13
|
-
constructor(url, target, classNames, key) {
|
|
14
|
-
super(url, { target }, key);
|
|
15
|
-
this.__url = url || "https://";
|
|
16
|
-
this.__target = target || "_self";
|
|
17
|
-
this.__classNames = classNames || [];
|
|
18
|
-
}
|
|
19
|
-
static importJSON(serializedNode) {
|
|
20
|
-
return super.importJSON(serializedNode);
|
|
21
|
-
}
|
|
22
|
-
exportJSON() {
|
|
23
|
-
return super.exportJSON();
|
|
24
|
-
}
|
|
25
|
-
static getType() {
|
|
26
|
-
return "customlinknode";
|
|
27
|
-
}
|
|
28
|
-
static clone(node) {
|
|
29
|
-
const newLinkNode = new CustomLinkNode(node.__url, node.__target, node.__classNames, node.__key);
|
|
30
|
-
return (0, lexical_1.$applyNodeReplacement)(newLinkNode);
|
|
31
|
-
}
|
|
32
|
-
createDOM() {
|
|
33
|
-
const link = document.createElement("a");
|
|
34
|
-
link.href = this.__url;
|
|
35
|
-
link.setAttribute("target", this.__target || "_blank");
|
|
36
|
-
utils_1.default.addClassNamesToElement(link, (this.__classNames || []).join(" "));
|
|
37
|
-
return link;
|
|
38
|
-
}
|
|
39
|
-
updateDOM() {
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
setClassNames(classNames) {
|
|
43
|
-
const writable = this.getWritable();
|
|
44
|
-
writable.__classNames = classNames;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.CustomLinkNode = CustomLinkNode;
|
|
48
|
-
exports.TOGGLE_CUSTOM_LINK_NODE_COMMAND = (0, lexical_1.createCommand)();
|
|
49
|
-
function $createCustomLinkNode(url, target, classNames) {
|
|
50
|
-
return (0, lexical_1.$applyNodeReplacement)(new CustomLinkNode(url, target, classNames));
|
|
51
|
-
}
|
|
52
|
-
function $isCustomLinkNode(node) {
|
|
53
|
-
return node instanceof link_1.LinkNode;
|
|
54
|
-
}
|
|
55
|
-
const toggleCustomLinkNode = ({ url, target = "_blank", classNames = [], getNodeByKey }) => {
|
|
56
|
-
const addAttributesToLinkNode = (linkNode, { url, target, classNames }) => {
|
|
57
|
-
const dom = getNodeByKey(linkNode.getKey());
|
|
58
|
-
if (!dom)
|
|
59
|
-
return;
|
|
60
|
-
const uniqueClassNames = classNames;
|
|
61
|
-
linkNode.setURL(url);
|
|
62
|
-
linkNode.setTarget(target);
|
|
63
|
-
linkNode.setClassNames(uniqueClassNames);
|
|
64
|
-
dom.setAttribute("href", url);
|
|
65
|
-
dom.setAttribute("target", target);
|
|
66
|
-
dom.setAttribute("class", uniqueClassNames.join(" "));
|
|
67
|
-
};
|
|
68
|
-
const selection = (0, lexical_1.$getSelection)();
|
|
69
|
-
if (!(0, lexical_1.$isRangeSelection)(selection)) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
const nodes = selection.extract();
|
|
73
|
-
if (url === null) {
|
|
74
|
-
// Remove LinkNodes
|
|
75
|
-
nodes.forEach((node) => {
|
|
76
|
-
const parent = node.getParent();
|
|
77
|
-
if ($isCustomLinkNode(parent)) {
|
|
78
|
-
const children = parent.getChildren();
|
|
79
|
-
for (let i = 0; i < children.length; i++) {
|
|
80
|
-
parent.insertBefore(children[i]);
|
|
81
|
-
}
|
|
82
|
-
parent.remove();
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
// Add or merge LinkNodes
|
|
88
|
-
if (nodes.length === 1) {
|
|
89
|
-
const firstNode = nodes[0];
|
|
90
|
-
// if the first node is a LinkNode or if its
|
|
91
|
-
// parent is a LinkNode, we update the URL, target and rel.
|
|
92
|
-
const linkNode = $isCustomLinkNode(firstNode)
|
|
93
|
-
? firstNode
|
|
94
|
-
: $getLinkAncestor(firstNode);
|
|
95
|
-
if (linkNode !== null && $isCustomLinkNode(linkNode)) {
|
|
96
|
-
addAttributesToLinkNode(linkNode, { url, target, classNames });
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
let prevParent = null;
|
|
101
|
-
let linkNode = null;
|
|
102
|
-
nodes.forEach((node) => {
|
|
103
|
-
const parent = node.getParent();
|
|
104
|
-
if (parent === linkNode
|
|
105
|
-
|| parent === null
|
|
106
|
-
|| ((0, lexical_1.$isElementNode)(node) && !node.isInline())) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
if ($isCustomLinkNode(parent)) {
|
|
110
|
-
linkNode = parent;
|
|
111
|
-
addAttributesToLinkNode(parent, { url, target, classNames });
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
if (!parent.is(prevParent)) {
|
|
115
|
-
prevParent = parent;
|
|
116
|
-
linkNode = $createCustomLinkNode(url, target, classNames);
|
|
117
|
-
if ($isCustomLinkNode(parent)) {
|
|
118
|
-
if (node.getPreviousSibling() === null) {
|
|
119
|
-
parent.insertBefore(linkNode);
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
parent.insertAfter(linkNode);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
node.insertBefore(linkNode);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
if ($isCustomLinkNode(node)) {
|
|
130
|
-
if (node.is(linkNode)) {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
if (linkNode !== null) {
|
|
134
|
-
const children = node.getChildren();
|
|
135
|
-
for (let i = 0; i < children.length; i++) {
|
|
136
|
-
linkNode.append(children[i]);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
node.remove();
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
if (linkNode !== null) {
|
|
143
|
-
linkNode.append(node);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
exports.toggleCustomLinkNode = toggleCustomLinkNode;
|
|
149
|
-
const $getLinkAncestor = (node) => ($getAncestor(node, (ancestor) => $isCustomLinkNode(ancestor)));
|
|
150
|
-
const $getAncestor = (node, predicate) => {
|
|
151
|
-
let parent = node;
|
|
152
|
-
while (parent !== null
|
|
153
|
-
&& (parent = parent.getParent()) !== null
|
|
154
|
-
&& !predicate(parent))
|
|
155
|
-
;
|
|
156
|
-
return parent;
|
|
157
|
-
};
|
|
158
|
-
//# sourceMappingURL=CustomLinkNode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CustomLinkNode.js","sourceRoot":"","sources":["../../../../../src/components/markdownEditor/plugins/customLink/CustomLinkNode.tsx"],"names":[],"mappings":";;;;;;AAqEA,sDAMC;AA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AAC,QAAQ,CAAC,EAAE,CAAC;oBACtB,OAAO;gBACT,CAAC;gBACD,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;oBACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;oBAEpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;wBACzC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC/B,CAAC;gBACH,CAAC;gBAED,IAAI,CAAC,MAAM,EAAE,CAAC;gBACd,OAAO;YACT,CAAC;YAED,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;gBACtB,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACxB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAA;AA3HY,QAAA,oBAAoB,wBA2HhC;AAED,MAAM,gBAAgB,GAAG,CAAC,IAAiB,EAAsB,EAAE,CAAC,CAClE,YAAY,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAC9D,CAAA;AAED,MAAM,YAAY,GAAG,CACnB,IAAiB,EACjB,SAA6C,EACzB,EAAE;IACtB,IAAI,MAAM,GAAuB,IAAI,CAAC;IACtC,OACE,MAAM,KAAK,IAAI;WACZ,CAAC,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC,KAAK,IAAI;WACtC,CAAC,SAAS,CAAC,MAAM,CAAC;QACtB,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CustomLinkNodePlugin.d.ts","sourceRoot":"","sources":["../../../../../src/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAUtC,QAAA,MAAM,oBAAoB,EAAE,EAmB3B,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const react_1 = require("react");
|
|
4
|
-
const LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
5
|
-
const CustomLinkNode_1 = require("./CustomLinkNode");
|
|
6
|
-
const COMMAND_PRIORITY = 1;
|
|
7
|
-
const CustomLinkNodePlugin = () => {
|
|
8
|
-
const [editor] = (0, LexicalComposerContext_1.useLexicalComposerContext)();
|
|
9
|
-
(0, react_1.useEffect)(() => {
|
|
10
|
-
editor.registerCommand(CustomLinkNode_1.TOGGLE_CUSTOM_LINK_NODE_COMMAND, (props) => {
|
|
11
|
-
(0, CustomLinkNode_1.toggleCustomLinkNode)({
|
|
12
|
-
...props,
|
|
13
|
-
getNodeByKey: (key) => editor.getElementByKey(key)
|
|
14
|
-
});
|
|
15
|
-
return true;
|
|
16
|
-
}, COMMAND_PRIORITY);
|
|
17
|
-
}, [editor]);
|
|
18
|
-
return null;
|
|
19
|
-
};
|
|
20
|
-
exports.default = CustomLinkNodePlugin;
|
|
21
|
-
//# sourceMappingURL=CustomLinkNodePlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CustomLinkNodePlugin.js","sourceRoot":"","sources":["../../../../../src/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.tsx"],"names":[],"mappings":";;AAAA,iCAAsC;AACtC,kFAAkF;AAClF,qDAI0B;AAE1B,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAE3B,MAAM,oBAAoB,GAAO,GAAG,EAAE;IACpC,MAAM,CAAC,MAAM,CAAC,GAAG,IAAA,kDAAyB,GAAE,CAAC;IAE7C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,CAAC,eAAe,CACpB,gDAA+B,EAC/B,CAAC,KAAkC,EAAE,EAAE;YACrC,IAAA,qCAAoB,EAAC;gBACnB,GAAG,KAAK;gBACR,YAAY,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC;aAC3D,CAAC,CAAC;YAEH,OAAO,IAAI,CAAC;QACd,CAAC,EACD,gBAAgB,CACjB,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,kBAAe,oBAAoB,CAAC"}
|
package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CustomLinkNodeTransformer.d.ts","sourceRoot":"","sources":["../../../../../src/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAyE9D,eAAO,MAAM,4BAA4B,EAAE,oBA4B1C,CAAC"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CUSTOM_LINK_NODE_TRANSFORMER = void 0;
|
|
7
|
-
const lexical_1 = require("lexical");
|
|
8
|
-
const CustomLinkNode_1 = require("./CustomLinkNode");
|
|
9
|
-
const EmojiNode_1 = require("../emoji/EmojiNode");
|
|
10
|
-
const IconNamesList_1 = __importDefault(require("../../IconNamesList"));
|
|
11
|
-
const CUSTOM_LINK_NODE_MARKDOWN_REGEX_QUERY = /(?:\[([^[]+?)\])(?:\(([^(]+)\))(?:({([^}]*)})?)(?:((.*)\)?))$/;
|
|
12
|
-
const CUSTOM_LINK_NODE_MARKDOWN_REGEX = new RegExp(CUSTOM_LINK_NODE_MARKDOWN_REGEX_QUERY);
|
|
13
|
-
const replaceCustomLinkNode = (textNode, match) => {
|
|
14
|
-
let linkUrl = match[2], linkText = match[1];
|
|
15
|
-
if (match.input.length > match.input.trim().length) {
|
|
16
|
-
linkText = ' '.repeat(match.input.length - match.input.trim().length) + linkText;
|
|
17
|
-
}
|
|
18
|
-
const otherText = match[5];
|
|
19
|
-
const linkNode = (0, CustomLinkNode_1.$createCustomLinkNode)(linkUrl, match[4] ? (match[4].includes("_self") ? "_self" : "_blank") : "_blank", match[4]
|
|
20
|
-
? match[4]
|
|
21
|
-
.split(" ")
|
|
22
|
-
.filter((word) => word[0] === ".")
|
|
23
|
-
.map((word) => word.replace(".", ""))
|
|
24
|
-
: []);
|
|
25
|
-
const linkTextNode = (0, lexical_1.$createTextNode)(linkText);
|
|
26
|
-
linkTextNode.setFormat(textNode.getFormat());
|
|
27
|
-
linkNode.append(linkTextNode);
|
|
28
|
-
textNode.replace(linkNode);
|
|
29
|
-
const emojiText = otherText.replace(CUSTOM_LINK_NODE_MARKDOWN_REGEX, '').trim();
|
|
30
|
-
if (match[5]) {
|
|
31
|
-
const otherTextNode = (0, lexical_1.$createTextNode)(match[5].replace(CUSTOM_LINK_NODE_MARKDOWN_REGEX, ''));
|
|
32
|
-
linkNode.getParent().append(otherTextNode);
|
|
33
|
-
}
|
|
34
|
-
if (CUSTOM_LINK_NODE_MARKDOWN_REGEX.test(match[5])) {
|
|
35
|
-
const blankNode = (0, lexical_1.$createTextNode)("");
|
|
36
|
-
linkNode.getParent().append(blankNode);
|
|
37
|
-
replaceCustomLinkNode(blankNode, match[5].match(CUSTOM_LINK_NODE_MARKDOWN_REGEX_QUERY));
|
|
38
|
-
}
|
|
39
|
-
if (emojiText) {
|
|
40
|
-
if (!IconNamesList_1.default.includes(emojiText.replaceAll(':', '')))
|
|
41
|
-
return;
|
|
42
|
-
linkNode.getParent().append((0, EmojiNode_1.$createEmojiNode)(emojiText.replaceAll(':', '')));
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
exports.CUSTOM_LINK_NODE_TRANSFORMER = {
|
|
46
|
-
dependencies: [EmojiNode_1.EmojiNode, CustomLinkNode_1.CustomLinkNode],
|
|
47
|
-
export: (node, exportChildren, exportFormat) => {
|
|
48
|
-
if (!(0, CustomLinkNode_1.$isCustomLinkNode)(node)) {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
const linkContent = `[${node.getTextContent()}](${node.__url}){:target="${node.__target}" ${node
|
|
52
|
-
?.__classNames
|
|
53
|
-
?.join(' ')
|
|
54
|
-
.split(' ')
|
|
55
|
-
.map((className) => "." + className.replaceAll('.', ''))
|
|
56
|
-
.join(" ")}}`;
|
|
57
|
-
const firstChild = node.getFirstChild();
|
|
58
|
-
if (node.getChildrenSize() === 1 && (0, lexical_1.$isTextNode)(firstChild)) {
|
|
59
|
-
return exportFormat(firstChild, linkContent);
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
return linkContent;
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
importRegExp: CUSTOM_LINK_NODE_MARKDOWN_REGEX,
|
|
66
|
-
regExp: CUSTOM_LINK_NODE_MARKDOWN_REGEX,
|
|
67
|
-
replace: replaceCustomLinkNode,
|
|
68
|
-
trigger: "[",
|
|
69
|
-
type: "text-match"
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=CustomLinkNodeTransformer.js.map
|