@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,277 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.NonAuthDonationInner = void 0;
|
|
41
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
|
-
const react_stripe_js_1 = require("@stripe/react-stripe-js");
|
|
43
|
-
const react_1 = __importStar(require("react"));
|
|
44
|
-
const react_google_recaptcha_1 = __importDefault(require("react-google-recaptcha"));
|
|
45
|
-
const components_1 = require("../../components");
|
|
46
|
-
const _1 = require(".");
|
|
47
|
-
const helpers_1 = require("../../helpers");
|
|
48
|
-
const material_1 = require("@mui/material");
|
|
49
|
-
const NonAuthDonationInner = ({ mainContainerCssProps, showHeader = true, ...props }) => {
|
|
50
|
-
const stripe = (0, react_stripe_js_1.useStripe)();
|
|
51
|
-
const elements = (0, react_stripe_js_1.useElements)();
|
|
52
|
-
const formStyling = { style: { base: { fontSize: "18px" } } };
|
|
53
|
-
const [firstName, setFirstName] = react_1.default.useState("");
|
|
54
|
-
const [lastName, setLastName] = react_1.default.useState("");
|
|
55
|
-
const [email, setEmail] = react_1.default.useState("");
|
|
56
|
-
const [fundsTotal, setFundsTotal] = react_1.default.useState(0);
|
|
57
|
-
const [transactionFee, setTransactionFee] = react_1.default.useState(0);
|
|
58
|
-
const [total, setTotal] = react_1.default.useState(0);
|
|
59
|
-
const [errors, setErrors] = react_1.default.useState([]);
|
|
60
|
-
const [fundDonations, setFundDonations] = react_1.default.useState([]);
|
|
61
|
-
const [funds, setFunds] = react_1.default.useState([]);
|
|
62
|
-
const [donationComplete, setDonationComplete] = react_1.default.useState(false);
|
|
63
|
-
const [processing, setProcessing] = react_1.default.useState(false);
|
|
64
|
-
const [donationType, setDonationType] = (0, react_1.useState)("once");
|
|
65
|
-
const [interval, setInterval] = (0, react_1.useState)("one_month");
|
|
66
|
-
const [startDate, setStartDate] = (0, react_1.useState)(new Date().toDateString());
|
|
67
|
-
const [captchaResponse, setCaptchaResponse] = (0, react_1.useState)("");
|
|
68
|
-
const [church, setChurch] = (0, react_1.useState)();
|
|
69
|
-
const [gateway, setGateway] = react_1.default.useState(null);
|
|
70
|
-
const [searchParams, setSearchParams] = react_1.default.useState();
|
|
71
|
-
const captchaRef = (0, react_1.useRef)(null);
|
|
72
|
-
const getUrlParam = (param) => {
|
|
73
|
-
if (typeof window === "undefined")
|
|
74
|
-
return null;
|
|
75
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
76
|
-
return urlParams.get(param);
|
|
77
|
-
};
|
|
78
|
-
const init = () => {
|
|
79
|
-
const fundId = getUrlParam("fundId");
|
|
80
|
-
const amount = getUrlParam("amount");
|
|
81
|
-
setSearchParams({ fundId, amount });
|
|
82
|
-
helpers_1.ApiHelper.get("/funds/churchId/" + props.churchId, "GivingApi").then(data => {
|
|
83
|
-
setFunds(data);
|
|
84
|
-
if (fundId && fundId !== "") {
|
|
85
|
-
const selectedFund = data.find((f) => f.id === fundId);
|
|
86
|
-
if (selectedFund) {
|
|
87
|
-
setFundDonations([{ fundId: selectedFund.id, amount: (amount && amount !== "") ? parseFloat(amount) : 0 }]);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
else if (data.length) {
|
|
91
|
-
setFundDonations([{ fundId: data[0].id }]);
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
helpers_1.ApiHelper.get("/churches/" + props.churchId, "MembershipApi").then(data => {
|
|
95
|
-
setChurch(data);
|
|
96
|
-
});
|
|
97
|
-
helpers_1.ApiHelper.get("/gateways/churchId/" + props.churchId, "GivingApi").then(data => {
|
|
98
|
-
if (data.length !== 0)
|
|
99
|
-
setGateway(data[0]);
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
const handleCaptchaChange = (value) => {
|
|
103
|
-
const captchaToken = captchaRef.current.getValue();
|
|
104
|
-
helpers_1.ApiHelper.postAnonymous("/donate/captcha-verify", { token: captchaToken }, "GivingApi").then((data) => { setCaptchaResponse(data.response); });
|
|
105
|
-
};
|
|
106
|
-
const handleCheckChange = (e, checked) => {
|
|
107
|
-
const totalPayAmount = checked ? fundsTotal + transactionFee : fundsTotal;
|
|
108
|
-
setTotal(totalPayAmount);
|
|
109
|
-
};
|
|
110
|
-
// const handleAutoPayFee = () => {
|
|
111
|
-
// let totalPayAmount = fundsTotal + transactionFee;
|
|
112
|
-
// setTotal(totalPayAmount);
|
|
113
|
-
// }
|
|
114
|
-
const handleSave = async () => {
|
|
115
|
-
if (validate()) {
|
|
116
|
-
setProcessing(true);
|
|
117
|
-
helpers_1.ApiHelper.post("/users/loadOrCreate", { userEmail: email, firstName, lastName }, "MembershipApi")
|
|
118
|
-
.catch(ex => { setErrors([ex.toString()]); setProcessing(false); })
|
|
119
|
-
.then(async (userData) => {
|
|
120
|
-
const personData = { churchId: props.churchId, firstName, lastName, email };
|
|
121
|
-
const person = await helpers_1.ApiHelper.post("/people/loadOrCreate", personData, "MembershipApi");
|
|
122
|
-
saveCard(userData, person);
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
const saveCard = async (user, person) => {
|
|
127
|
-
const cardData = elements.getElement(react_stripe_js_1.CardElement);
|
|
128
|
-
const stripePM = await stripe.createPaymentMethod({ type: "card", card: cardData });
|
|
129
|
-
if (stripePM.error) {
|
|
130
|
-
setErrors([stripePM.error.message]);
|
|
131
|
-
setProcessing(false);
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
const pm = { id: stripePM.paymentMethod.id, personId: person.id, email: email, name: person.name.display, churchId: props.churchId };
|
|
135
|
-
await helpers_1.ApiHelper.post("/paymentmethods/addcard", pm, "GivingApi").then(result => {
|
|
136
|
-
if (result?.raw?.message) {
|
|
137
|
-
setErrors([result.raw.message]);
|
|
138
|
-
setProcessing(false);
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
const d = result;
|
|
142
|
-
saveDonation(d.paymentMethod, d.customerId, person);
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
const saveDonation = async (paymentMethod, customerId, person) => {
|
|
148
|
-
const donation = {
|
|
149
|
-
amount: total,
|
|
150
|
-
id: paymentMethod.id,
|
|
151
|
-
customerId: customerId,
|
|
152
|
-
type: paymentMethod.type,
|
|
153
|
-
churchId: props.churchId,
|
|
154
|
-
funds: [],
|
|
155
|
-
person: {
|
|
156
|
-
id: person?.id,
|
|
157
|
-
email: person?.contactInfo?.email,
|
|
158
|
-
name: person?.name?.display
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
if (donationType === "recurring") {
|
|
162
|
-
donation.billing_cycle_anchor = +new Date(startDate);
|
|
163
|
-
donation.interval = helpers_1.DonationHelper.getInterval(interval);
|
|
164
|
-
}
|
|
165
|
-
for (const fundDonation of fundDonations) {
|
|
166
|
-
const fund = funds.find((fund) => fund.id === fundDonation.fundId);
|
|
167
|
-
donation.funds.push({ id: fundDonation.fundId, amount: fundDonation.amount || 0, name: fund.name });
|
|
168
|
-
}
|
|
169
|
-
const churchObj = {
|
|
170
|
-
name: church.name,
|
|
171
|
-
subDomain: church.subDomain,
|
|
172
|
-
churchURL: typeof window !== "undefined" && window.location.origin,
|
|
173
|
-
logo: props?.churchLogo
|
|
174
|
-
};
|
|
175
|
-
let results;
|
|
176
|
-
if (donationType === "once")
|
|
177
|
-
results = await helpers_1.ApiHelper.post("/donate/charge/", { ...donation, church: churchObj }, "GivingApi");
|
|
178
|
-
if (donationType === "recurring")
|
|
179
|
-
results = await helpers_1.ApiHelper.post("/donate/subscribe/", { ...donation, church: churchObj }, "GivingApi");
|
|
180
|
-
if (results?.status === "succeeded" || results?.status === "pending" || results?.status === "active") {
|
|
181
|
-
setDonationComplete(true);
|
|
182
|
-
}
|
|
183
|
-
if (results?.raw?.message) {
|
|
184
|
-
setErrors([results?.raw?.message]);
|
|
185
|
-
setProcessing(false);
|
|
186
|
-
}
|
|
187
|
-
setProcessing(false);
|
|
188
|
-
};
|
|
189
|
-
const validate = () => {
|
|
190
|
-
const result = [];
|
|
191
|
-
if (!firstName)
|
|
192
|
-
result.push(helpers_1.Locale.label("donation.donationForm.validate.firstName"));
|
|
193
|
-
if (!lastName)
|
|
194
|
-
result.push(helpers_1.Locale.label("donation.donationForm.validate.lastName"));
|
|
195
|
-
if (!email)
|
|
196
|
-
result.push(helpers_1.Locale.label("donation.donationForm.validate.email"));
|
|
197
|
-
if (fundsTotal === 0)
|
|
198
|
-
result.push(helpers_1.Locale.label("donation.donationForm.validate.amount"));
|
|
199
|
-
if (result.length === 0) {
|
|
200
|
-
if (!email.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w+)+$/))
|
|
201
|
-
result.push(helpers_1.Locale.label("donation.donationForm.validate.validEmail")); //eslint-disable-line
|
|
202
|
-
}
|
|
203
|
-
//Todo - make sure the account doesn't exist. (loadOrCreate?)
|
|
204
|
-
setErrors(result);
|
|
205
|
-
return result.length === 0;
|
|
206
|
-
};
|
|
207
|
-
const handleChange = (e) => {
|
|
208
|
-
const val = e.currentTarget.value;
|
|
209
|
-
switch (e.currentTarget.name) {
|
|
210
|
-
case "firstName":
|
|
211
|
-
setFirstName(val);
|
|
212
|
-
break;
|
|
213
|
-
case "lastName":
|
|
214
|
-
setLastName(val);
|
|
215
|
-
break;
|
|
216
|
-
case "email":
|
|
217
|
-
setEmail(val);
|
|
218
|
-
break;
|
|
219
|
-
case "startDate":
|
|
220
|
-
setStartDate(val);
|
|
221
|
-
break;
|
|
222
|
-
case "interval":
|
|
223
|
-
setInterval(val);
|
|
224
|
-
break;
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
const handleFundDonationsChange = async (fd) => {
|
|
228
|
-
setFundDonations(fd);
|
|
229
|
-
let totalAmount = 0;
|
|
230
|
-
const selectedFunds = [];
|
|
231
|
-
for (const fundDonation of fd) {
|
|
232
|
-
totalAmount += fundDonation.amount || 0;
|
|
233
|
-
const fund = funds.find((fund) => fund.id === fundDonation.fundId);
|
|
234
|
-
selectedFunds.push({ id: fundDonation.fundId, amount: fundDonation.amount || 0, name: fund.name });
|
|
235
|
-
}
|
|
236
|
-
setFundsTotal(totalAmount);
|
|
237
|
-
setTotal(totalAmount);
|
|
238
|
-
const fee = await getTransactionFee(totalAmount);
|
|
239
|
-
setTransactionFee(fee);
|
|
240
|
-
if (gateway && gateway.payFees === true) {
|
|
241
|
-
setTotal(totalAmount + fee);
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
const getTransactionFee = async (amount) => {
|
|
245
|
-
if (amount > 0) {
|
|
246
|
-
try {
|
|
247
|
-
const response = await helpers_1.ApiHelper.post("/donate/fee?churchId=" + props.churchId, { type: "creditCard", amount }, "GivingApi");
|
|
248
|
-
return response.calculatedFee;
|
|
249
|
-
}
|
|
250
|
-
catch (error) {
|
|
251
|
-
console.log("Error calculating transaction fee: ", error);
|
|
252
|
-
return 0;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
else {
|
|
256
|
-
return 0;
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
const getFundList = () => {
|
|
260
|
-
if (funds) {
|
|
261
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("hr", {}), (0, jsx_runtime_1.jsx)("h4", { children: helpers_1.Locale.label("donation.donationForm.funds") }), (0, jsx_runtime_1.jsx)(_1.FundDonations, { fundDonations: fundDonations, funds: funds, params: searchParams, updatedFunction: handleFundDonationsChange })] }));
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
react_1.default.useEffect(init, []); //eslint-disable-line
|
|
265
|
-
// React.useEffect(() => { gateway && gateway.payFees === true && handleAutoPayFee() }, [fundDonations]);
|
|
266
|
-
if (donationComplete)
|
|
267
|
-
return (0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "success", children: helpers_1.Locale.label("donation.donationForm.thankYou") });
|
|
268
|
-
else {
|
|
269
|
-
return ((0, jsx_runtime_1.jsxs)(components_1.InputBox, { headerIcon: showHeader ? "volunteer_activism" : "", headerText: showHeader ? "Donate" : "", saveFunction: handleSave, saveText: "Donate", isSubmitting: processing || !captchaResponse || captchaResponse === "robot", mainContainerCssProps: mainContainerCssProps, children: [(0, jsx_runtime_1.jsx)(components_1.ErrorMessages, { errors: errors }), (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: () => setDonationType("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: () => setDonationType("recurring"), children: helpers_1.Locale.label("donation.donationForm.makeRecurring") }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { size: { xs: 12, md: 6 }, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, label: helpers_1.Locale.label("person.firstName"), name: "firstName", value: firstName, onChange: handleChange }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { size: { xs: 12, md: 6 }, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, label: helpers_1.Locale.label("person.lastName"), name: "lastName", value: lastName, onChange: handleChange }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { size: { xs: 12, md: 6 }, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, label: helpers_1.Locale.label("person.email"), name: "email", value: email, onChange: handleChange }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { size: { xs: 12, md: 6 }, children: (0, jsx_runtime_1.jsx)(react_google_recaptcha_1.default, { sitekey: props.recaptchaSiteKey, ref: captchaRef, onChange: handleCaptchaChange }) })] }), (0, jsx_runtime_1.jsx)("div", { style: { padding: 10, border: "1px solid #CCC", borderRadius: 5, marginTop: 10 }, children: (0, jsx_runtime_1.jsx)(react_stripe_js_1.CardElement, { options: formStyling }) }), donationType === "recurring"
|
|
270
|
-
&& (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 3, style: { marginTop: 0 }, children: [(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: "Frequency", name: "interval", "aria-label": "interval", value: interval, onChange: (e) => { setInterval(e.target.value); }, 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.jsx)(material_1.Grid, { size: { xs: 12, md: 6 }, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, name: "startDate", type: "date", "aria-label": "startDate", label: helpers_1.Locale.label("donation.donationForm.startDate"), value: helpers_1.DateHelper.formatHtml5Date(new Date(startDate)), onChange: handleChange }) })] }), getFundList(), (0, jsx_runtime_1.jsx)("div", { children: fundsTotal > 0
|
|
271
|
-
&& (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(gateway && gateway.payFees === true)
|
|
272
|
-
? (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))] })
|
|
273
|
-
: ((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: ["Total Donation Amount: $", total] })] }) })] }));
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
exports.NonAuthDonationInner = NonAuthDonationInner;
|
|
277
|
-
//# sourceMappingURL=NonAuthDonationInner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NonAuthDonationInner.js","sourceRoot":"","sources":["../../../src/donationComponents/components/NonAuthDonationInner.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,6DAA8E;AAC9E,+CAAgD;AAChD,oFAA+C;AAC/C,iDAA2D;AAC3D,wBAAkC;AAClC,2CAA8F;AAE9F,4CAEuB;AAKhB,MAAM,oBAAoB,GAAoB,CAAC,EAAE,qBAAqB,EAAE,UAAU,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC9G,MAAM,MAAM,GAAG,IAAA,2BAAS,GAAE,CAAC;IAC3B,MAAM,QAAQ,GAAG,IAAA,6BAAW,GAAE,CAAC;IAC/B,MAAM,WAAW,GAAG,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAC9D,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACrD,MAAM,CAAC,QAAQ,EAAE,WAAW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, StripePaymentMethod } from "@churchapps/helpers";
|
|
4
|
-
interface Props {
|
|
5
|
-
person: PersonInterface;
|
|
6
|
-
customerId: string;
|
|
7
|
-
paymentMethods: StripePaymentMethod[];
|
|
8
|
-
stripePromise: Promise<Stripe>;
|
|
9
|
-
appName: string;
|
|
10
|
-
dataUpdate: (message?: string) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const PaymentMethods: React.FC<Props>;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=PaymentMethods.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentMethods.d.ts","sourceRoot":"","sources":["../../../src/donationComponents/components/PaymentMethods.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKhD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAe,MAAM,qBAAqB,CAAC;AAKxF,UAAU,KAAK;IAAG,MAAM,EAAE,eAAe,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,mBAAmB,EAAE,CAAC;IAAC,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE;AAE/L,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAqH1C,CAAC"}
|
|
@@ -1,84 +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.PaymentMethods = 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 _1 = require(".");
|
|
12
|
-
const components_1 = require("../../components");
|
|
13
|
-
const helpers_1 = require("../../helpers");
|
|
14
|
-
const helpers_2 = require("@churchapps/helpers");
|
|
15
|
-
const material_1 = require("@mui/material");
|
|
16
|
-
const PaymentMethods = (props) => {
|
|
17
|
-
const [editPaymentMethod, setEditPaymentMethod] = react_1.default.useState(new helpers_2.StripePaymentMethod());
|
|
18
|
-
const [mode, setMode] = react_1.default.useState("display");
|
|
19
|
-
const [verify, setVerify] = react_1.default.useState(false);
|
|
20
|
-
const handleEdit = (pm, verifyAccount) => (e) => {
|
|
21
|
-
e.preventDefault();
|
|
22
|
-
setEditPaymentMethod(pm);
|
|
23
|
-
setVerify(verifyAccount);
|
|
24
|
-
setMode("edit");
|
|
25
|
-
};
|
|
26
|
-
const handleDelete = async () => {
|
|
27
|
-
const confirmed = window.confirm(helpers_1.Locale.label("donation.paymentMethods.confirmDelete"));
|
|
28
|
-
if (confirmed) {
|
|
29
|
-
helpers_1.ApiHelper.delete("/paymentmethods/" + editPaymentMethod.id + "/" + props.customerId, "GivingApi").then(() => {
|
|
30
|
-
setMode("display");
|
|
31
|
-
props.dataUpdate(helpers_1.Locale.label("donation.paymentMethods.deleted"));
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
const MenuIcon = () => {
|
|
36
|
-
const [anchorEl, setAnchorEl] = react_1.default.useState(null);
|
|
37
|
-
const open = Boolean(anchorEl);
|
|
38
|
-
const handleClick = (e) => {
|
|
39
|
-
setAnchorEl(e.currentTarget);
|
|
40
|
-
};
|
|
41
|
-
const handleClose = () => {
|
|
42
|
-
setAnchorEl(null);
|
|
43
|
-
};
|
|
44
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, { "aria-label": "add-button", id: "addBtnGroup", "aria-controls": open ? "add-menu" : undefined, "aria-expanded": open ? "true" : undefined, "aria-haspopup": "true", onClick: handleClick, children: (0, jsx_runtime_1.jsx)(material_1.Icon, { color: "primary", children: "add" }) }), (0, jsx_runtime_1.jsxs)(material_1.Menu, { id: "add-menu", MenuListProps: { "aria-labelledby": "addBtnGroup" }, anchorEl: anchorEl, open: open, onClose: handleClose, children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, { "aria-label": "add-card", onClick: handleEdit(new helpers_2.StripePaymentMethod({ type: "card" })), children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { sx: { mr: "3px" }, children: "credit_card" }), " ", helpers_1.Locale.label("donation.paymentMethods.addCard")] }), (0, jsx_runtime_1.jsxs)(material_1.MenuItem, { "aria-label": "add-bank", onClick: handleEdit(new helpers_2.StripePaymentMethod({ type: "bank" })), children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { sx: { mr: "3px" }, children: "account_balance" }), " ", helpers_1.Locale.label("donation.paymentMethods.addBank")] })] })] }));
|
|
45
|
-
};
|
|
46
|
-
const getNewContent = () => {
|
|
47
|
-
if (!helpers_1.UserHelper.checkAccess(helpers_2.Permissions.givingApi.settings.edit) && props.appName !== "B1App")
|
|
48
|
-
return null;
|
|
49
|
-
return (0, jsx_runtime_1.jsx)(MenuIcon, {});
|
|
50
|
-
};
|
|
51
|
-
const getEditOptions = (pm) => {
|
|
52
|
-
if (!helpers_1.UserHelper.checkAccess(helpers_2.Permissions.givingApi.settings.edit) && props.appName !== "B1App")
|
|
53
|
-
return null;
|
|
54
|
-
return (0, jsx_runtime_1.jsx)("a", { "aria-label": "edit-button", onClick: handleEdit(pm), href: "about:blank", children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "edit" }) });
|
|
55
|
-
};
|
|
56
|
-
const getPMIcon = (type) => (type === "card" ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "credit_card" }) : (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "account_balance" }));
|
|
57
|
-
const getPaymentRows = () => {
|
|
58
|
-
const rows = [];
|
|
59
|
-
props.paymentMethods.forEach((method) => {
|
|
60
|
-
rows.push((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsxs)(material_1.TableCell, { className: "capitalize", children: [getPMIcon(method.type), " ", method.name + " ****" + method.last4] }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: method?.status === "new" && (0, jsx_runtime_1.jsx)("a", { href: "about:blank", "aria-label": "verify-account", onClick: handleEdit(method, true), children: helpers_1.Locale.label("donation.paymentMethods.verify") }) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: getEditOptions(method) })] }, method.id));
|
|
61
|
-
});
|
|
62
|
-
return rows;
|
|
63
|
-
};
|
|
64
|
-
const PaymentMethodsTable = () => {
|
|
65
|
-
if (!props.paymentMethods)
|
|
66
|
-
return (0, jsx_runtime_1.jsx)(components_1.Loading, {});
|
|
67
|
-
if (props.paymentMethods.length) {
|
|
68
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Table, { children: (0, jsx_runtime_1.jsx)(material_1.TableBody, { children: getPaymentRows() }) }));
|
|
69
|
-
}
|
|
70
|
-
else
|
|
71
|
-
return (0, jsx_runtime_1.jsx)("div", { children: helpers_1.Locale.label("donation.paymentMethods.noMethod") });
|
|
72
|
-
};
|
|
73
|
-
const EditForm = () => ((0, jsx_runtime_1.jsxs)(react_stripe_js_1.Elements, { stripe: props.stripePromise, children: [editPaymentMethod.type === "card" && (0, jsx_runtime_1.jsx)(_1.CardForm, { card: editPaymentMethod, customerId: props.customerId, person: props.person, setMode: setMode, deletePayment: handleDelete, updateList: (message) => { props.dataUpdate(message); } }), editPaymentMethod.type === "bank" && (0, jsx_runtime_1.jsx)(_1.BankForm, { bank: editPaymentMethod, showVerifyForm: verify, customerId: props.customerId, person: props.person, setMode: setMode, deletePayment: handleDelete, updateList: (message) => { props.dataUpdate(message); } })] }));
|
|
74
|
-
const PaymentMethods = () => {
|
|
75
|
-
if (mode === "display") {
|
|
76
|
-
return ((0, jsx_runtime_1.jsx)(components_1.DisplayBox, { "aria-label": "payment-methods-box", headerIcon: "credit_card", headerText: "Payment Methods", editContent: getNewContent(), children: (0, jsx_runtime_1.jsx)(PaymentMethodsTable, {}) }));
|
|
77
|
-
}
|
|
78
|
-
else
|
|
79
|
-
return (0, jsx_runtime_1.jsx)(EditForm, {});
|
|
80
|
-
};
|
|
81
|
-
return props.stripePromise ? (0, jsx_runtime_1.jsx)(PaymentMethods, {}) : null;
|
|
82
|
-
};
|
|
83
|
-
exports.PaymentMethods = PaymentMethods;
|
|
84
|
-
//# sourceMappingURL=PaymentMethods.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentMethods.js","sourceRoot":"","sources":["../../../src/donationComponents/components/PaymentMethods.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,kDAA0B;AAE1B,6DAAmD;AACnD,wBAAuC;AACvC,iDAAuD;AACvD,2CAA8D;AAC9D,iDAAwF;AACxF,4CAEuB;AAIhB,MAAM,cAAc,GAAoB,CAAC,KAAK,EAAE,EAAE;IACvD,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAsB,IAAI,6BAAmB,EAAE,CAAC,CAAC;IACjH,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,CAAC;IAE3D,MAAM,UAAU,GAAG,CAAC,EAAwB,EAAE,aAAuB,EAAE,EAAE,CAAC,CAAC,CAAmB,EAAE,EAAE;QAChG,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,oBAAoB,CAAC,EAAE,CAAC,CAAC;QACzB,SAAS,CAAC,aAAa,CAAC,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AC;IAEF,OAAO,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,uBAAC,cAAc,KAAkB,CAAC,CAAC,CAAC,IAAI,CAAC;AACxE,CAAC,CAAC;AArHW,QAAA,cAAc,kBAqHzB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
customerId: string;
|
|
4
|
-
paymentMethods: any[];
|
|
5
|
-
appName: string;
|
|
6
|
-
dataUpdate: (message?: string) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare const RecurringDonations: React.FC<Props>;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=RecurringDonations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RecurringDonations.d.ts","sourceRoot":"","sources":["../../../src/donationComponents/components/RecurringDonations.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,UAAU,KAAK;IAAG,UAAU,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,GAAG,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAAE;AAEvH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAyG9C,CAAC"}
|
|
@@ -1,93 +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.RecurringDonations = 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 helpers_1 = require("../../helpers");
|
|
12
|
-
const helpers_2 = require("@churchapps/helpers");
|
|
13
|
-
const _1 = require(".");
|
|
14
|
-
const material_1 = require("@mui/material");
|
|
15
|
-
;
|
|
16
|
-
const RecurringDonations = (props) => {
|
|
17
|
-
const [subscriptions, setSubscriptions] = react_1.default.useState([]);
|
|
18
|
-
const [mode, setMode] = react_1.default.useState("display");
|
|
19
|
-
const [editSubscription, setEditSubscription] = react_1.default.useState();
|
|
20
|
-
const loadData = () => {
|
|
21
|
-
if (props.customerId) {
|
|
22
|
-
helpers_1.ApiHelper.get("/customers/" + props.customerId + "/subscriptions", "GivingApi").then(subResult => {
|
|
23
|
-
const subs = [];
|
|
24
|
-
const requests = subResult.data?.map((s) => helpers_1.ApiHelper.get("/subscriptionfunds?subscriptionId=" + s.id, "GivingApi").then(subFunds => {
|
|
25
|
-
s.funds = subFunds;
|
|
26
|
-
subs.push(s);
|
|
27
|
-
}));
|
|
28
|
-
return requests && Promise.all(requests).then(() => {
|
|
29
|
-
setSubscriptions(subs);
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
const handleUpdate = (message) => {
|
|
35
|
-
loadData();
|
|
36
|
-
setMode("display");
|
|
37
|
-
if (message)
|
|
38
|
-
props.dataUpdate(message);
|
|
39
|
-
};
|
|
40
|
-
const handleEdit = (sub) => (e) => {
|
|
41
|
-
e.preventDefault();
|
|
42
|
-
setEditSubscription(sub);
|
|
43
|
-
setMode("edit");
|
|
44
|
-
};
|
|
45
|
-
const getPaymentMethod = (sub) => {
|
|
46
|
-
const pm = props.paymentMethods.find((pm) => pm.id === (sub.default_payment_method || sub.default_source));
|
|
47
|
-
if (!pm)
|
|
48
|
-
return (0, jsx_runtime_1.jsx)("span", { style: { color: "red" }, children: helpers_1.Locale.label("donation.recurring.notFound") });
|
|
49
|
-
return `${pm.name} ****${pm.last4}`;
|
|
50
|
-
};
|
|
51
|
-
const getInterval = (subscription) => {
|
|
52
|
-
const interval = subscription.plan.interval_count + " " + subscription.plan.interval;
|
|
53
|
-
return subscription.plan.interval_count > 1 ? interval + "s" : interval;
|
|
54
|
-
};
|
|
55
|
-
const getFunds = (subscription) => {
|
|
56
|
-
const result = [];
|
|
57
|
-
subscription.funds.forEach((fund) => {
|
|
58
|
-
result.push((0, jsx_runtime_1.jsxs)("div", { children: [fund.name, " ", (0, jsx_runtime_1.jsx)("span", { style: { float: "right" }, children: helpers_1.CurrencyHelper.formatCurrency(fund.amount) })] }, subscription.id + fund.id));
|
|
59
|
-
});
|
|
60
|
-
const total = (subscription.plan.amount / 100);
|
|
61
|
-
result.push((0, jsx_runtime_1.jsxs)("div", { style: { borderTop: "solid #dee2e6 1px" }, children: ["Total ", (0, jsx_runtime_1.jsx)("span", { style: { float: "right" }, children: helpers_1.CurrencyHelper.formatCurrency(total) })] }, subscription.id + "-total"));
|
|
62
|
-
return result;
|
|
63
|
-
};
|
|
64
|
-
const getEditOptions = (sub) => {
|
|
65
|
-
if ((!helpers_1.UserHelper.checkAccess(helpers_2.Permissions.givingApi.settings.edit) && props.appName !== "B1App") || props?.paymentMethods?.length === 0)
|
|
66
|
-
return null;
|
|
67
|
-
return (0, jsx_runtime_1.jsx)("a", { "aria-label": "edit-button", onClick: handleEdit(sub), href: "about:blank", children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "edit" }) });
|
|
68
|
-
};
|
|
69
|
-
const getTableHeader = () => {
|
|
70
|
-
const result = [];
|
|
71
|
-
result.push((0, jsx_runtime_1.jsxs)(material_1.TableRow, { sx: { textAlign: "left" }, children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)("b", { children: helpers_1.Locale.label("donation.recurring.startDate") }) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)("b", { children: helpers_1.Locale.label("donation.recurring.amount") }) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)("b", { children: helpers_1.Locale.label("donation.recurring.interval") }) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)("b", { children: helpers_1.Locale.label("donation.recurring.paymentMethod") }) }), props?.paymentMethods?.length > 0 && (0, jsx_runtime_1.jsx)(material_1.TableCell, {})] }, "header"));
|
|
72
|
-
return result;
|
|
73
|
-
};
|
|
74
|
-
const getTableRows = () => {
|
|
75
|
-
const rows = [];
|
|
76
|
-
subscriptions.forEach((sub) => {
|
|
77
|
-
rows.push((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { children: helpers_1.DateHelper.prettyDate(new Date(sub.billing_cycle_anchor * 1000)) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: getFunds(sub) }), (0, jsx_runtime_1.jsxs)(material_1.TableCell, { children: [helpers_1.Locale.label("donation.recurring.every"), " ", getInterval(sub)] }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { className: "capitalize", children: getPaymentMethod(sub) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: getEditOptions(sub) })] }, sub.id));
|
|
78
|
-
});
|
|
79
|
-
return rows;
|
|
80
|
-
};
|
|
81
|
-
const getSubscriptionsTable = () => ((0, jsx_runtime_1.jsxs)(material_1.Table, { children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: getTableHeader() }), (0, jsx_runtime_1.jsx)(material_1.TableBody, { children: getTableRows() })] }));
|
|
82
|
-
react_1.default.useEffect(loadData, []); //eslint-disable-line
|
|
83
|
-
if (!subscriptions.length)
|
|
84
|
-
return null;
|
|
85
|
-
if (mode === "display") {
|
|
86
|
-
return ((0, jsx_runtime_1.jsx)(components_1.DisplayBox, { "data-testid": "recurring-donations", headerIcon: "restart_alt", headerText: "Recurring Donations", children: getSubscriptionsTable() }));
|
|
87
|
-
}
|
|
88
|
-
if (mode === "edit" && editSubscription) {
|
|
89
|
-
return ((0, jsx_runtime_1.jsx)(_1.RecurringDonationsEdit, { customerId: props.customerId, paymentMethods: props.paymentMethods, editSubscription: editSubscription, subscriptionUpdated: handleUpdate }));
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
exports.RecurringDonations = RecurringDonations;
|
|
93
|
-
//# sourceMappingURL=RecurringDonations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RecurringDonations.js","sourceRoot":"","sources":["../../../src/donationComponents/components/RecurringDonations.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,kDAA0B;AAC1B,iDAA8C;AAC9C,2CAA0F;AAC1F,iDAAyE;AACzE,wBAA2C;AAC3C,4CAAuF;AAEgC,CAAC;AAEjH,MAAM,kBAAkB,GAAoB,CAAC,KAAK,EAAE,EAAE;IAC3D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,eAAK,CAAC,QAAQ,CAA0B,EAAE,CAAC,CAAC;IACtF,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClD,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,eAAK,CAAC,QAAQ,EAAyB,CAAC;IAExF,MAAM,QAAQ,GAAG,GAAG,EAAE;QACpB,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;YACrB,mBAAS,CAAC,GAAG,CAAC,aAAa,GAAG,KAAK,CAAC,UAAU,GAAG,gBAAgB,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;gBAC/F,MAAM,IAAI,GAA4B,EAAE,CAAC;gBACzC,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,mBAAS,CAAC,GAAG,CAAC,oCAAoC,GAAG,CAAC,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;oBACvI,CAAC,CAAC,KAAK,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ripePaymentMethod, SubscriptionInterface } from "@churchapps/helpers";
|
|
3
|
-
interface Props {
|
|
4
|
-
subscriptionUpdated: (message?: string) => void;
|
|
5
|
-
customerId: string;
|
|
6
|
-
paymentMethods: StripePaymentMethod[];
|
|
7
|
-
editSubscription: SubscriptionInterface;
|
|
8
|
-
}
|
|
9
|
-
export declare const RecurringDonationsEdit: React.FC<Props>;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=RecurringDonationsEdit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RecurringDonationsEdit.d.ts","sourceRoot":"","sources":["../../../src/donationComponents/components/RecurringDonationsEdit.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAKjF,UAAU,KAAK;IAAG,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,mBAAmB,EAAE,CAAC;IAAC,gBAAgB,EAAE,qBAAqB,CAAA;CAAE;AAEvK,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAmFlD,CAAC"}
|