@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,199 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.DonationForm = void 0;
|
|
8
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
-
const react_1 = __importDefault(require("react"));
|
|
10
|
-
const components_1 = require("../../components");
|
|
11
|
-
const _1 = require(".");
|
|
12
|
-
const DonationPreviewModal_1 = require("../modals/DonationPreviewModal");
|
|
13
|
-
const helpers_1 = require("../../helpers");
|
|
14
|
-
const material_1 = require("@mui/material");
|
|
15
|
-
const helpers_2 = require("../../helpers");
|
|
16
|
-
const DonationForm = (props) => {
|
|
17
|
-
const [errorMessage, setErrorMessage] = react_1.default.useState();
|
|
18
|
-
const [fundDonations, setFundDonations] = react_1.default.useState();
|
|
19
|
-
const [funds, setFunds] = react_1.default.useState([]);
|
|
20
|
-
const [fundsTotal, setFundsTotal] = react_1.default.useState(0);
|
|
21
|
-
const [transactionFee, setTransactionFee] = react_1.default.useState(0);
|
|
22
|
-
const [payFee, setPayFee] = react_1.default.useState(0);
|
|
23
|
-
const [total, setTotal] = react_1.default.useState(0);
|
|
24
|
-
const [paymentMethodName, setPaymentMethodName] = react_1.default.useState(`${props?.paymentMethods[0]?.name} ****${props?.paymentMethods[0]?.last4}`);
|
|
25
|
-
const [donationType, setDonationType] = react_1.default.useState();
|
|
26
|
-
const [showDonationPreviewModal, setShowDonationPreviewModal] = react_1.default.useState(false);
|
|
27
|
-
const [interval, setInterval] = react_1.default.useState("one_month");
|
|
28
|
-
const [gateway, setGateway] = react_1.default.useState(null);
|
|
29
|
-
const [donation, setDonation] = react_1.default.useState({
|
|
30
|
-
id: props?.paymentMethods[0]?.id,
|
|
31
|
-
type: props?.paymentMethods[0]?.type,
|
|
32
|
-
customerId: props.customerId,
|
|
33
|
-
person: {
|
|
34
|
-
id: props.person?.id,
|
|
35
|
-
email: props.person?.contactInfo.email,
|
|
36
|
-
name: props.person?.name.display
|
|
37
|
-
},
|
|
38
|
-
amount: 0,
|
|
39
|
-
billing_cycle_anchor: +new Date(),
|
|
40
|
-
interval: {
|
|
41
|
-
interval_count: 1,
|
|
42
|
-
interval: "month"
|
|
43
|
-
},
|
|
44
|
-
funds: []
|
|
45
|
-
});
|
|
46
|
-
const loadData = () => {
|
|
47
|
-
helpers_1.ApiHelper.get("/funds", "GivingApi").then(data => {
|
|
48
|
-
setFunds(data);
|
|
49
|
-
if (data.length)
|
|
50
|
-
setFundDonations([{ fundId: data[0].id }]);
|
|
51
|
-
});
|
|
52
|
-
helpers_1.ApiHelper.get("/gateways", "GivingApi").then((data) => {
|
|
53
|
-
if (data.length !== 0)
|
|
54
|
-
setGateway(data[0]);
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
const handleKeyDown = (e) => { if (e.key === "Enter") {
|
|
58
|
-
e.preventDefault();
|
|
59
|
-
handleSave();
|
|
60
|
-
} };
|
|
61
|
-
const handleCheckChange = (e, checked) => {
|
|
62
|
-
const d = { ...donation };
|
|
63
|
-
d.amount = checked ? fundsTotal + transactionFee : fundsTotal;
|
|
64
|
-
const showFee = checked ? transactionFee : 0;
|
|
65
|
-
setTotal(d.amount);
|
|
66
|
-
setPayFee(showFee);
|
|
67
|
-
setDonation(d);
|
|
68
|
-
};
|
|
69
|
-
const handleAutoPayFee = () => {
|
|
70
|
-
const d = { ...donation };
|
|
71
|
-
d.amount = fundsTotal + transactionFee;
|
|
72
|
-
const showFee = transactionFee;
|
|
73
|
-
setTotal(d.amount);
|
|
74
|
-
setPayFee(showFee);
|
|
75
|
-
setDonation(d);
|
|
76
|
-
};
|
|
77
|
-
const handleChange = (e) => {
|
|
78
|
-
setErrorMessage(null);
|
|
79
|
-
const d = { ...donation };
|
|
80
|
-
const value = e.target.value;
|
|
81
|
-
switch (e.target.name) {
|
|
82
|
-
case "method":
|
|
83
|
-
d.id = value;
|
|
84
|
-
const pm = props.paymentMethods.find(pm => pm.id === value);
|
|
85
|
-
d.type = pm.type;
|
|
86
|
-
setPaymentMethodName(`${pm.name} ****${pm.last4}`);
|
|
87
|
-
break;
|
|
88
|
-
case "type":
|
|
89
|
-
setDonationType(value);
|
|
90
|
-
break;
|
|
91
|
-
case "date":
|
|
92
|
-
d.billing_cycle_anchor = +new Date(value);
|
|
93
|
-
break;
|
|
94
|
-
case "interval":
|
|
95
|
-
setInterval(value);
|
|
96
|
-
d.interval = helpers_2.DonationHelper.getInterval(value);
|
|
97
|
-
break;
|
|
98
|
-
case "notes":
|
|
99
|
-
d.notes = value;
|
|
100
|
-
break;
|
|
101
|
-
case "transaction-fee":
|
|
102
|
-
const element = e.target;
|
|
103
|
-
d.amount = element.checked ? fundsTotal + transactionFee : fundsTotal;
|
|
104
|
-
const showFee = element.checked ? transactionFee : 0;
|
|
105
|
-
setTotal(d.amount);
|
|
106
|
-
setPayFee(showFee);
|
|
107
|
-
}
|
|
108
|
-
setDonation(d);
|
|
109
|
-
};
|
|
110
|
-
const handleCancel = () => { setDonationType(null); };
|
|
111
|
-
const handleSave = () => {
|
|
112
|
-
if (donation.amount < .5)
|
|
113
|
-
setErrorMessage(helpers_1.Locale.label("donation.donationForm.tooLow"));
|
|
114
|
-
else
|
|
115
|
-
setShowDonationPreviewModal(true);
|
|
116
|
-
};
|
|
117
|
-
const handleDonationSelect = (type) => {
|
|
118
|
-
const dt = donationType === type ? null : type;
|
|
119
|
-
setDonationType(dt);
|
|
120
|
-
};
|
|
121
|
-
const makeDonation = async (message) => {
|
|
122
|
-
let results;
|
|
123
|
-
const churchObj = {
|
|
124
|
-
name: props?.church?.name,
|
|
125
|
-
subDomain: props?.church?.subDomain,
|
|
126
|
-
churchURL: typeof window !== "undefined" && window.location.origin,
|
|
127
|
-
logo: props?.churchLogo
|
|
128
|
-
};
|
|
129
|
-
if (donationType === "once")
|
|
130
|
-
results = await helpers_1.ApiHelper.post("/donate/charge/", { ...donation, church: churchObj }, "GivingApi");
|
|
131
|
-
if (donationType === "recurring")
|
|
132
|
-
results = await helpers_1.ApiHelper.post("/donate/subscribe/", { ...donation, church: churchObj }, "GivingApi");
|
|
133
|
-
if (results?.status === "succeeded" || results?.status === "pending" || results?.status === "active") {
|
|
134
|
-
setShowDonationPreviewModal(false);
|
|
135
|
-
setDonationType(null);
|
|
136
|
-
props.donationSuccess(message);
|
|
137
|
-
}
|
|
138
|
-
if (results?.raw?.message) {
|
|
139
|
-
setShowDonationPreviewModal(false);
|
|
140
|
-
setErrorMessage(helpers_1.Locale.label("donation.common.error") + ": " + results?.raw?.message);
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
const handleFundDonationsChange = async (fd) => {
|
|
144
|
-
setErrorMessage(null);
|
|
145
|
-
setFundDonations(fd);
|
|
146
|
-
let totalAmount = 0;
|
|
147
|
-
const selectedFunds = [];
|
|
148
|
-
for (const fundDonation of fd) {
|
|
149
|
-
totalAmount += fundDonation.amount || 0;
|
|
150
|
-
const fund = funds.find((fund) => fund.id === fundDonation.fundId);
|
|
151
|
-
selectedFunds.push({ id: fundDonation.fundId, amount: fundDonation.amount || 0, name: fund.name });
|
|
152
|
-
}
|
|
153
|
-
const d = { ...donation };
|
|
154
|
-
d.amount = totalAmount;
|
|
155
|
-
d.funds = selectedFunds;
|
|
156
|
-
setFundsTotal(totalAmount);
|
|
157
|
-
const fee = await getTransactionFee(totalAmount);
|
|
158
|
-
setTransactionFee(fee);
|
|
159
|
-
if (gateway && gateway.payFees === true) {
|
|
160
|
-
d.amount = totalAmount + fee;
|
|
161
|
-
setPayFee(fee);
|
|
162
|
-
}
|
|
163
|
-
setTotal(d.amount);
|
|
164
|
-
setDonation(d);
|
|
165
|
-
};
|
|
166
|
-
const getTransactionFee = async (amount) => {
|
|
167
|
-
if (amount > 0) {
|
|
168
|
-
let dt = "";
|
|
169
|
-
if (donation.type === "card")
|
|
170
|
-
dt = "creditCard";
|
|
171
|
-
if (donation.type === "bank")
|
|
172
|
-
dt = "ach";
|
|
173
|
-
try {
|
|
174
|
-
const response = await helpers_1.ApiHelper.post("/donate/fee?churchId=" + props?.church?.id, { type: dt, amount }, "GivingApi");
|
|
175
|
-
return response.calculatedFee;
|
|
176
|
-
}
|
|
177
|
-
catch (error) {
|
|
178
|
-
console.log("Error calculating transaction fee: ", error);
|
|
179
|
-
return 0;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
return 0;
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
react_1.default.useEffect(loadData, [props.person?.id]);
|
|
187
|
-
// React.useEffect(() => { gateway && gateway.payFees === true && handleAutoPayFee() }, [fundDonations]);
|
|
188
|
-
if (!funds.length || !props?.paymentMethods[0]?.id)
|
|
189
|
-
return null;
|
|
190
|
-
else {
|
|
191
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(DonationPreviewModal_1.DonationPreviewModal, { show: showDonationPreviewModal, onHide: () => setShowDonationPreviewModal(false), handleDonate: makeDonation, donation: donation, donationType: donationType, payFee: payFee, paymentMethodName: paymentMethodName, funds: funds }), (0, jsx_runtime_1.jsxs)(components_1.InputBox, { id: "donationBox", "aria-label": "donation-box", headerIcon: "volunteer_activism", headerText: helpers_1.Locale.label("donation.donationForm.donate"), ariaLabelSave: "save-button", cancelFunction: donationType ? handleCancel : undefined, saveFunction: donationType ? handleSave : undefined, saveText: helpers_1.Locale.label("donation.donationForm.preview"), children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 3, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { size: { xs: 12, md: 6 }, children: (0, jsx_runtime_1.jsx)(material_1.Button, { "aria-label": "single-donation", size: "small", fullWidth: true, style: { minHeight: "50px" }, variant: donationType === "once" ? "contained" : "outlined", onClick: () => handleDonationSelect("once"), children: helpers_1.Locale.label("donation.donationForm.make") }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { size: { xs: 12, md: 6 }, children: (0, jsx_runtime_1.jsx)(material_1.Button, { "aria-label": "recurring-donation", size: "small", fullWidth: true, style: { minHeight: "50px" }, variant: donationType === "recurring" ? "contained" : "outlined", onClick: () => handleDonationSelect("recurring"), children: helpers_1.Locale.label("donation.donationForm.makeRecurring") }) })] }), donationType
|
|
192
|
-
&& (0, jsx_runtime_1.jsxs)("div", { style: { marginTop: "20px" }, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, spacing: 3, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { size: 12, children: (0, jsx_runtime_1.jsxs)(material_1.FormControl, { fullWidth: true, children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { children: helpers_1.Locale.label("donation.donationForm.method") }), (0, jsx_runtime_1.jsx)(material_1.Select, { label: helpers_1.Locale.label("donation.donationForm.method"), name: "method", "aria-label": "method", value: donation.id, className: "capitalize", onChange: handleChange, children: props.paymentMethods.map((paymentMethod, i) => (0, jsx_runtime_1.jsxs)(material_1.MenuItem, { value: paymentMethod.id, children: [paymentMethod.name, " ****", paymentMethod.last4] }, i)) })] }) }) }), donationType === "recurring"
|
|
193
|
-
&& (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 3, style: { marginTop: 10 }, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { size: { xs: 12, md: 6 }, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, name: "date", type: "date", "aria-label": "date", label: helpers_1.Locale.label("donation.donationForm.startDate"), value: helpers_1.DateHelper.formatHtml5Date(new Date(donation.billing_cycle_anchor)), onChange: handleChange, onKeyDown: handleKeyDown }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { size: { xs: 12, md: 6 }, children: (0, jsx_runtime_1.jsxs)(material_1.FormControl, { fullWidth: true, children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { children: helpers_1.Locale.label("donation.donationForm.frequency") }), (0, jsx_runtime_1.jsxs)(material_1.Select, { label: helpers_1.Locale.label("donation.donationForm.frequency"), name: "interval", "aria-label": "interval", value: interval, onChange: handleChange, children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "one_week", children: helpers_1.Locale.label("donation.donationForm.weekly") }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "two_week", children: helpers_1.Locale.label("donation.donationForm.biWeekly") }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "one_month", children: helpers_1.Locale.label("donation.donationForm.monthly") }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "three_month", children: helpers_1.Locale.label("donation.donationForm.quarterly") }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "one_year", children: helpers_1.Locale.label("donation.donationForm.annually") })] })] }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "form-group", children: [funds && fundDonations
|
|
194
|
-
&& (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h4", { children: helpers_1.Locale.label("donation.donationForm.fund") }), (0, jsx_runtime_1.jsx)(_1.FundDonations, { fundDonations: fundDonations, funds: funds, updatedFunction: handleFundDonationsChange })] }), fundsTotal > 0
|
|
195
|
-
&& (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(gateway && gateway.payFees === true) ? (0, jsx_runtime_1.jsxs)(material_1.Typography, { fontSize: 14, fontStyle: "italic", children: ["*", helpers_1.Locale.label("donation.donationForm.fees").replace("{}", helpers_1.CurrencyHelper.formatCurrency(transactionFee))] }) : ((0, jsx_runtime_1.jsx)(material_1.FormGroup, { children: (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, {}), name: "transaction-fee", label: helpers_1.Locale.label("donation.donationForm.cover").replace("{}", helpers_1.CurrencyHelper.formatCurrency(transactionFee)), onChange: handleCheckChange }) })), (0, jsx_runtime_1.jsxs)("p", { children: [helpers_1.Locale.label("donation.donationForm.total"), ": $", total] })] }), (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, label: helpers_1.Locale.label("donation.donationForm.notes"), multiline: true, "aria-label": "note", name: "notes", value: donation.notes || "", onChange: handleChange, onKeyDown: handleKeyDown })] }), errorMessage && (0, jsx_runtime_1.jsx)(components_1.ErrorMessages, { errors: [errorMessage] })] })] })] }));
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
exports.DonationForm = DonationForm;
|
|
199
|
-
//# sourceMappingURL=DonationForm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DonationForm.js","sourceRoot":"","sources":["../../../src/donationComponents/components/DonationForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAGb,kDAA0B;AAE1B,iDAA2D;AAC3D,wBAAkC;AAClC,yEAAsE;AACtE,2CAA8E;AAE9E,4CAEuB;AAEvB,2CAA+C;AAIxC,MAAM,YAAY,GAAoB,CAAC,KAAK,EAAE,EAAE;IACrD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,eAAK,CAAC,QAAQ,EAAU,CAAC;IACjE,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,eAAK,CAAC,QAAQ,EAA2B,CAAC;IACpF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAkB,EAAE,CAAC,CAAC;IAC9D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAS,CAAC,CAAC,CAAC;IAC9D,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAS,CAAC,CAAC,CAAC;IACtE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAS,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAS,CAAC,CAAC,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BAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,wBAAc,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,iBAAiB,GAAI,GACtM,CACb,EACD,0CAAI,gBAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,SAAK,KAAK,IAAK,IAC7D,EAEL,uBAAC,oBAAS,IAAC,SAAS,QAAC,KAAK,EAAE,gBAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,SAAS,sBAAY,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,GAAI,IAC/L,EACL,YAAY,IAAI,uBAAC,0BAAa,IAAC,MAAM,EAAE,CAAC,YAAY,CAAC,GAAkB,IACpE,IAEC,IACV,CACJ,CAAC;IACJ,CAAC;AACD,CAAC,CAAC;AAjPW,QAAA,YAAY,gBAiPvB"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { FundDonationInterface, FundInterface } from "@churchapps/helpers";
|
|
3
|
-
interface Props {
|
|
4
|
-
fundDonation: FundDonationInterface;
|
|
5
|
-
funds: FundInterface[];
|
|
6
|
-
index: number;
|
|
7
|
-
updatedFunction: (fundDonation: FundDonationInterface, index: number) => void;
|
|
8
|
-
params?: any;
|
|
9
|
-
}
|
|
10
|
-
export declare const FundDonation: React.FC<Props>;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=FundDonation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FundDonation.d.ts","sourceRoot":"","sources":["../../../src/donationComponents/components/FundDonation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAK3E,UAAU,KAAK;IACb,YAAY,EAAE,qBAAqB,CAAC;IACpC,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,CAAC,YAAY,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9E,MAAM,CAAC,EAAE,GAAG,CAAC;CACd;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAyCxC,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.FundDonation = void 0;
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
const helpers_1 = require("../../helpers");
|
|
8
|
-
const FundDonation = (props) => {
|
|
9
|
-
const getOptions = () => {
|
|
10
|
-
const result = [];
|
|
11
|
-
for (let i = 0; i < props.funds.length; i++) {
|
|
12
|
-
const getDisabled = (props?.params?.fundId && props.params.fundId !== "") ? props.params.fundId !== props.funds[i].id : false;
|
|
13
|
-
result.push((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: props.funds[i].id, disabled: getDisabled, children: props.funds[i].name }, i));
|
|
14
|
-
}
|
|
15
|
-
return result;
|
|
16
|
-
};
|
|
17
|
-
const handleChange = (e) => {
|
|
18
|
-
const fd = { ...props.fundDonation };
|
|
19
|
-
switch (e.target.name) {
|
|
20
|
-
case "amount":
|
|
21
|
-
fd.amount = parseFloat(e.target.value.replace("$", "").replace(",", ""));
|
|
22
|
-
break;
|
|
23
|
-
case "fund":
|
|
24
|
-
fd.fundId = e.target.value;
|
|
25
|
-
break;
|
|
26
|
-
}
|
|
27
|
-
props.updatedFunction(fd, props.index);
|
|
28
|
-
};
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 3, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { size: { xs: 12, md: 6 }, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, name: "amount", label: helpers_1.Locale.label("donation.fundDonations.amount"), type: "number", disabled: props.params?.amount && props.params.amount !== "", "aria-label": "amount", lang: "en-150", value: props.fundDonation.amount || "", onChange: handleChange }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { size: { xs: 12, md: 6 }, children: (0, jsx_runtime_1.jsxs)(material_1.FormControl, { fullWidth: true, children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { children: helpers_1.Locale.label("donation.fundDonations.fund") }), (0, jsx_runtime_1.jsx)(material_1.Select, { fullWidth: true, label: helpers_1.Locale.label("donation.fundDonations.fund"), name: "fund", "aria-label": "fund", value: props.fundDonation.fundId, onChange: handleChange, children: getOptions() })] }) })] }) }));
|
|
30
|
-
};
|
|
31
|
-
exports.FundDonation = FundDonation;
|
|
32
|
-
//# sourceMappingURL=FundDonation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FundDonation.js","sourceRoot":"","sources":["../../../src/donationComponents/components/FundDonation.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;AAIb,4CAA2F;AAE3F,2CAAuC;AAUhC,MAAM,YAAY,GAAoB,CAAC,KAAK,EAAE,EAAE;IAErD,MAAM,UAAU,GAAG,GAAG,EAAE;QACtB,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5C,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM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AAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,KAAK,EAAE,gBAAa,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,MAAM,IAAI,EAAE,EAAE,QAAQ,EAAE,YAAY,GAAI,GACpQ,EACP,uBAAC,eAAI,IAAC,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,YAC3B,wBAAC,sBAAW,IAAC,SAAS,mBACpB,uBAAC,qBAAU,cAAE,gBAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,GAAc,EACtE,uBAAC,iBAAM,IAAC,SAAS,QAAC,KAAK,EAAE,gBAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,IAAI,EAAC,MAAM,gBAAY,MAAM,EAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,YACzJ,UAAU,EAAE,GACN,IACG,GACT,IACF,GACN,CACJ,CAAC;AACJ,CAAC,CAAC;AAzCW,QAAA,YAAY,gBAyCvB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { FundDonationInterface, FundInterface } from "@churchapps/helpers";
|
|
3
|
-
interface Props {
|
|
4
|
-
fundDonations: FundDonationInterface[];
|
|
5
|
-
funds: FundInterface[];
|
|
6
|
-
params?: any;
|
|
7
|
-
updatedFunction: (fundDonations: FundDonationInterface[]) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const FundDonations: React.FC<Props>;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=FundDonations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FundDonations.d.ts","sourceRoot":"","sources":["../../../src/donationComponents/components/FundDonations.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAG3E,UAAU,KAAK;IAAG,aAAa,EAAE,qBAAqB,EAAE,CAAC;IAAC,KAAK,EAAE,aAAa,EAAE,CAAC;IAAC,MAAM,CAAC,EAAE,GAAG,CAAC;IAAC,eAAe,EAAE,CAAC,aAAa,EAAE,qBAAqB,EAAE,KAAK,IAAI,CAAA;CAAE;AAEnK,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAiCzC,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.FundDonations = void 0;
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const _1 = require(".");
|
|
7
|
-
const helpers_1 = require("../../helpers");
|
|
8
|
-
const FundDonations = (props) => {
|
|
9
|
-
const handleUpdated = (fundDonation, index) => {
|
|
10
|
-
const fundDonations = [...props.fundDonations];
|
|
11
|
-
fundDonations[index] = fundDonation;
|
|
12
|
-
props.updatedFunction(fundDonations);
|
|
13
|
-
};
|
|
14
|
-
const addRow = (e) => {
|
|
15
|
-
e.preventDefault();
|
|
16
|
-
const fundDonations = [...props.fundDonations];
|
|
17
|
-
const fd = { fundId: props.funds[0].id };
|
|
18
|
-
fundDonations.push(fd);
|
|
19
|
-
props.updatedFunction(fundDonations);
|
|
20
|
-
};
|
|
21
|
-
const getRows = () => {
|
|
22
|
-
const result = [];
|
|
23
|
-
for (let i = 0; i < props.fundDonations.length; i++) {
|
|
24
|
-
const fd = props.fundDonations[i];
|
|
25
|
-
result.push((0, jsx_runtime_1.jsx)(_1.FundDonation, { fundDonation: fd, funds: props.funds, updatedFunction: handleUpdated, params: props?.params, index: i }, i));
|
|
26
|
-
}
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [getRows(), (!props?.params?.fundId || props?.params?.fundId === "") &&
|
|
30
|
-
(0, jsx_runtime_1.jsx)("a", { href: "about:blank", "aria-label": "add-fund-donation", className: "text-decoration", style: { display: "block", marginBottom: "15px" }, onClick: addRow, children: helpers_1.Locale.label("donation.fundDonations.addMore") })] }));
|
|
31
|
-
};
|
|
32
|
-
exports.FundDonations = FundDonations;
|
|
33
|
-
//# sourceMappingURL=FundDonations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FundDonations.js","sourceRoot":"","sources":["../../../src/donationComponents/components/FundDonations.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;AAGb,wBAAiC;AAEjC,2CAAuC;AAIhC,MAAM,aAAa,GAAoB,CAAC,KAAK,EAAE,EAAE;IACtD,MAAM,aAAa,GAAG,CAAC,YAAmC,EAAE,KAAa,EAAE,EAAE;QAC3E,MAAM,aAAa,GAAG,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;QAC/C,aAAa,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC;QACpC,KAAK,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;IACvC,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,CAAC,CAAmB,EAAE,EAAE;QACrC,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,MAAM,aAAa,GAAG,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;QAC/C,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,EAA2B,CAAC;QAClE,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACvB,KAAK,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;IACvC,CAAC,CAAC;IAEF,MAAM,OAAO,GAAG,GAAG,EAAE;QACnB,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACpD,MAAM,EAAE,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;YAClC,MAAM,CAAC,IAAI,CAAC,uBAAC,eAAY,IAAC,YAAY,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAU,KAAK,EAAE,CAAC,IAAX,CAAC,CAAc,CAAC,CAAC;QAC/I,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;IAEF,OAAO,CACL,6DACG,OAAO,EAAE,EACT,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,EAAE,CAAC;gBACvD,8BAAG,IAAI,EAAC,aAAa,gBAAY,mBAAmB,EAAC,SAAS,EAAC,iBAAiB,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,YAAG,gBAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,GAAK,IAE1M,CACJ,CAAC;AACJ,CAAC,CAAC;AAjCW,QAAA,aAAa,iBAiCxB"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { PaperProps } from "@mui/material/Paper";
|
|
3
|
-
interface Props {
|
|
4
|
-
churchId: string;
|
|
5
|
-
mainContainerCssProps?: PaperProps;
|
|
6
|
-
showHeader?: boolean;
|
|
7
|
-
recaptchaSiteKey: string;
|
|
8
|
-
churchLogo?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const NonAuthDonation: React.FC<Props>;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=NonAuthDonation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NonAuthDonation.d.ts","sourceRoot":"","sources":["../../../src/donationComponents/components/NonAuthDonation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,UAAU,KAAK;IAAG,QAAQ,EAAE,MAAM,CAAC;IAAC,qBAAqB,CAAC,EAAE,UAAU,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE;AAE7I,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAoB3C,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.NonAuthDonation = void 0;
|
|
8
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
-
const react_1 = __importDefault(require("react"));
|
|
10
|
-
const react_stripe_js_1 = require("@stripe/react-stripe-js");
|
|
11
|
-
const stripe_js_1 = require("@stripe/stripe-js");
|
|
12
|
-
const helpers_1 = require("../../helpers");
|
|
13
|
-
const NonAuthDonationInner_1 = require("./NonAuthDonationInner");
|
|
14
|
-
const NonAuthDonation = ({ mainContainerCssProps, showHeader, ...props }) => {
|
|
15
|
-
const [stripePromise, setStripe] = react_1.default.useState(null);
|
|
16
|
-
const init = () => {
|
|
17
|
-
helpers_1.ApiHelper.get("/gateways/churchId/" + props.churchId, "GivingApi").then(data => {
|
|
18
|
-
if (data.length && data[0]?.publicKey) {
|
|
19
|
-
setStripe((0, stripe_js_1.loadStripe)(data[0].publicKey));
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
react_1.default.useEffect(init, []); //eslint-disable-line
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(react_stripe_js_1.Elements, { stripe: stripePromise, children: (0, jsx_runtime_1.jsx)(NonAuthDonationInner_1.NonAuthDonationInner, { churchId: props.churchId, mainContainerCssProps: mainContainerCssProps, showHeader: showHeader, recaptchaSiteKey: props.recaptchaSiteKey, churchLogo: props?.churchLogo }) }) }));
|
|
25
|
-
};
|
|
26
|
-
exports.NonAuthDonation = NonAuthDonation;
|
|
27
|
-
//# sourceMappingURL=NonAuthDonation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NonAuthDonation.js","sourceRoot":"","sources":["../../../src/donationComponents/components/NonAuthDonation.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,kDAA0B;AAC1B,6DAAmD;AACnD,iDAA+C;AAE/C,2CAA0C;AAC1C,iEAA8D;AAKvD,MAAM,eAAe,GAAoB,CAAC,EAAE,qBAAqB,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAClG,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAkB,IAAI,CAAC,CAAC;IAEzE,MAAM,IAAI,GAAG,GAAG,EAAE;QAChB,mBAAS,CAAC,GAAG,CAAC,qBAAqB,GAAG,KAAK,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAC7E,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC;gBACtC,SAAS,CAAC,IAAA,sBAAU,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,eAAK,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,qBAAqB;IAEhD,OAAO,CACL,2DACE,uBAAC,0BAAQ,IAAC,MAAM,EAAE,aAAa,YAC7B,uBAAC,2CAAoB,IAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAI,GACxL,GACV,CACJ,CAAC;AACJ,CAAC,CAAC;AApBW,QAAA,eAAe,mBAoB1B"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { PaperProps } from "@mui/material/Paper";
|
|
3
|
-
interface Props {
|
|
4
|
-
churchId: string;
|
|
5
|
-
mainContainerCssProps?: PaperProps;
|
|
6
|
-
showHeader?: boolean;
|
|
7
|
-
recaptchaSiteKey: string;
|
|
8
|
-
churchLogo?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const NonAuthDonationInner: React.FC<Props>;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=NonAuthDonationInner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NonAuthDonationInner.d.ts","sourceRoot":"","sources":["../../../src/donationComponents/components/NonAuthDonationInner.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAShD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,UAAU,KAAK;IAAG,QAAQ,EAAE,MAAM,CAAC;IAAC,qBAAqB,CAAC,EAAE,UAAU,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE;AAE7I,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA2RhD,CAAC"}
|