@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
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import React, { useState, useEffect, useCallback } from 'react';
|
|
2
|
+
import { NotificationService } from '../helpers/NotificationService';
|
|
3
|
+
/**
|
|
4
|
+
* Custom hook for managing real-time notifications
|
|
5
|
+
*
|
|
6
|
+
* @param context - User context containing person and church information
|
|
7
|
+
* @returns Object containing notification counts and management functions
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const { counts, isLoading, refresh } = useNotifications(context);
|
|
12
|
+
*
|
|
13
|
+
* return (
|
|
14
|
+
* <UserMenu
|
|
15
|
+
* notificationCounts={counts}
|
|
16
|
+
* loadCounts={refresh}
|
|
17
|
+
* // ... other props
|
|
18
|
+
* />
|
|
19
|
+
* );
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export function useNotifications(context) {
|
|
23
|
+
const [counts, setCounts] = useState({ notificationCount: 0, pmCount: 0 });
|
|
24
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
25
|
+
const [error, setError] = useState(null);
|
|
26
|
+
// Get the singleton instance only once
|
|
27
|
+
const notificationService = React.useMemo(() => NotificationService.getInstance(), []);
|
|
28
|
+
// Initialize the service when context becomes available
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (!context?.person?.id || !context?.userChurch?.church?.id) {
|
|
31
|
+
setIsLoading(false);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const initializeService = async () => {
|
|
35
|
+
try {
|
|
36
|
+
setIsLoading(true);
|
|
37
|
+
setError(null);
|
|
38
|
+
await notificationService.initialize(context);
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
console.error("❌ useNotifications: Failed to initialize:", err);
|
|
42
|
+
setError(err instanceof Error ? err.message : 'Failed to initialize notifications');
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
setIsLoading(false);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
initializeService();
|
|
49
|
+
}, [context?.person?.id, context?.userChurch?.church?.id]);
|
|
50
|
+
// Subscribe to notification count changes
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
const unsubscribe = notificationService.subscribe((newCounts) => {
|
|
53
|
+
setCounts(newCounts);
|
|
54
|
+
});
|
|
55
|
+
// Cleanup subscription on unmount
|
|
56
|
+
return () => {
|
|
57
|
+
unsubscribe();
|
|
58
|
+
};
|
|
59
|
+
}, [notificationService]);
|
|
60
|
+
// Refresh function - memoized without dependencies for stable reference
|
|
61
|
+
const refresh = useCallback(async () => {
|
|
62
|
+
try {
|
|
63
|
+
setError(null);
|
|
64
|
+
await NotificationService.getInstance().refresh();
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
console.error("❌ useNotifications: Refresh failed:", err);
|
|
68
|
+
setError(err instanceof Error ? err.message : 'Failed to refresh notifications');
|
|
69
|
+
}
|
|
70
|
+
}, []);
|
|
71
|
+
return {
|
|
72
|
+
counts,
|
|
73
|
+
isLoading,
|
|
74
|
+
isReady: notificationService.isReady(),
|
|
75
|
+
refresh,
|
|
76
|
+
error
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=useNotifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNotifications.js","sourceRoot":"","sources":["../../src/hooks/useNotifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAsB,MAAM,gCAAgC,CAAC;AAWzF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAoC;IACnE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAqB,EAAE,iBAAiB,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IAC/F,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAExD,uCAAuC;IACvC,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IAEvF,wDAAwD;IACxD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;YAC7D,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO;QACT,CAAC;QAED,MAAM,iBAAiB,GAAG,KAAK,IAAI,EAAE;YACnC,IAAI,CAAC;gBACH,YAAY,CAAC,IAAI,CAAC,CAAC;gBACnB,QAAQ,CAAC,IAAI,CAAC,CAAC;gBAEf,MAAM,mBAAmB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YAChD,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,2CAA2C,EAAE,GAAG,CAAC,CAAC;gBAChE,QAAQ,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC;YACtF,CAAC;oBAAS,CAAC;gBACT,YAAY,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;QACH,CAAC,CAAC;QAEF,iBAAiB,EAAE,CAAC;IACtB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;IAE3D,0CAA0C;IAC1C,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,WAAW,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,EAAE;YAC9D,SAAS,CAAC,SAAS,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,kCAAkC;QAClC,OAAO,GAAG,EAAE;YACV,WAAW,EAAE,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAE1B,wEAAwE;IACxE,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QACrC,IAAI,CAAC;YACH,QAAQ,CAAC,IAAI,CAAC,CAAC;YACf,MAAM,mBAAmB,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC;QACpD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,qCAAqC,EAAE,GAAG,CAAC,CAAC;YAC1D,QAAQ,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC;QACnF,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,MAAM;QACN,SAAS;QACT,OAAO,EAAE,mBAAmB,CAAC,OAAO,EAAE;QACtC,OAAO;QACP,KAAK;KACN,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./helpers"), exports);
|
|
18
|
-
__exportStar(require("./components"), exports);
|
|
19
|
-
__exportStar(require("@churchapps/helpers"), exports);
|
|
20
|
-
__exportStar(require("./pageComponents"), exports);
|
|
21
|
-
__exportStar(require("./hooks"), exports);
|
|
22
|
-
__exportStar(require("./donationComponents"), exports);
|
|
1
|
+
export * from "./helpers";
|
|
2
|
+
export * from "./components";
|
|
3
|
+
export * from "./hooks";
|
|
23
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
|
@@ -58,13 +58,17 @@
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
#primaryNavButton {
|
|
61
|
-
margin-right:
|
|
61
|
+
margin-right:15px;
|
|
62
62
|
text-transform: "none";
|
|
63
|
+
height: 48px !important;
|
|
64
|
+
min-height: 48px !important;
|
|
65
|
+
max-height: 48px !important;
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
#primaryNavButton img {
|
|
66
|
-
height:35px;
|
|
69
|
+
height:35px !important;
|
|
67
70
|
margin-right:15px;
|
|
71
|
+
max-height:35px !important;
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
#primaryNavButton h2 {
|
package/package.json
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@churchapps/apphelper",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.18",
|
|
4
4
|
"description": "Library of helper functions for React and NextJS ChurchApps",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "dist/index.js",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
10
|
"clean": "rimraf dist",
|
|
10
|
-
"copy-css": "copyfiles -f src/components/markdownEditor/editor.css dist/components/markdownEditor",
|
|
11
|
-
"copy-icons": "copyfiles -f src/components/markdownEditor/images/icons/* dist/components/markdownEditor/images/icons",
|
|
12
|
-
"copy-emojis": "copyfiles -f src/components/markdownEditor/images/emoji/* dist/components/markdownEditor/images/emoji",
|
|
13
11
|
"copy-languages": "copyfiles -a public/** dist",
|
|
14
|
-
"copy-assets": "npm-run-all copy-
|
|
15
|
-
"link": "link",
|
|
12
|
+
"copy-assets": "npm-run-all copy-languages",
|
|
16
13
|
"tsc": "tsc",
|
|
17
|
-
"
|
|
18
|
-
"build": "npm-run-all clean tsc copy-assets",
|
|
19
|
-
"updateLink": "npm-run-all clean tsc && npm rm @churchapps/apphelper -g && npm link"
|
|
14
|
+
"build": "npm-run-all clean tsc copy-assets"
|
|
20
15
|
},
|
|
21
16
|
"repository": {
|
|
22
17
|
"type": "git",
|
|
@@ -32,8 +27,8 @@
|
|
|
32
27
|
},
|
|
33
28
|
"homepage": "https://github.com/LiveChurchSolutions/AppHelper#readme",
|
|
34
29
|
"peerDependencies": {
|
|
35
|
-
"react": "^
|
|
36
|
-
"react-dom": "^
|
|
30
|
+
"react": "^18.0.0",
|
|
31
|
+
"react-dom": "^18.0.0",
|
|
37
32
|
"react-router-dom": "^7.6.3"
|
|
38
33
|
},
|
|
39
34
|
"dependencies": {
|
|
@@ -41,19 +36,8 @@
|
|
|
41
36
|
"@emotion/cache": "^11.13.5",
|
|
42
37
|
"@emotion/react": "^11.14.0",
|
|
43
38
|
"@emotion/styled": "^11.14.1",
|
|
44
|
-
"@lexical/code": "^0.33.0",
|
|
45
|
-
"@lexical/link": "^0.33.0",
|
|
46
|
-
"@lexical/list": "^0.33.0",
|
|
47
|
-
"@lexical/markdown": "^0.33.0",
|
|
48
|
-
"@lexical/react": "^0.33.0",
|
|
49
|
-
"@lexical/rich-text": "^0.33.0",
|
|
50
|
-
"@lexical/selection": "^0.33.0",
|
|
51
|
-
"@lexical/table": "^0.33.0",
|
|
52
|
-
"@lexical/utils": "^0.33.0",
|
|
53
39
|
"@mui/lab": "^7.0.0-beta.14",
|
|
54
40
|
"@mui/material": "^7.2.0",
|
|
55
|
-
"@stripe/react-stripe-js": "^3.7.0",
|
|
56
|
-
"@stripe/stripe-js": "^7.4.0",
|
|
57
41
|
"axios": "^1.10.0",
|
|
58
42
|
"cropperjs": "^2.0.0",
|
|
59
43
|
"date-fns": "^4.1.0",
|
|
@@ -63,9 +47,6 @@
|
|
|
63
47
|
"i18next-chained-backend": "^4.6.2",
|
|
64
48
|
"i18next-http-backend": "^3.0.2",
|
|
65
49
|
"jwt-decode": "^4.0.0",
|
|
66
|
-
"lexical": "^0.33.0",
|
|
67
|
-
"marked": "^16.0.0",
|
|
68
|
-
"material-symbols": "^0.32.0",
|
|
69
50
|
"mui-tel-input": "^9.0.1",
|
|
70
51
|
"react-activity": "^2.1.3",
|
|
71
52
|
"react-cookie": "^8.0.1",
|
|
@@ -73,10 +54,8 @@
|
|
|
73
54
|
"react-csv": "^2.2.2",
|
|
74
55
|
"react-ga4": "^2.1.0",
|
|
75
56
|
"react-google-charts": "^5.2.1",
|
|
76
|
-
"react-google-recaptcha": "^3.1.0",
|
|
77
57
|
"react-i18next": "^15.6.0",
|
|
78
58
|
"react-to-print": "^3.1.1",
|
|
79
|
-
"rrule": "^2.8.1",
|
|
80
59
|
"slug": "^11.0.0"
|
|
81
60
|
},
|
|
82
61
|
"devDependencies": {
|
|
@@ -84,7 +63,6 @@
|
|
|
84
63
|
"@types/react": "^19.1.8",
|
|
85
64
|
"@types/react-csv": "^1.1.10",
|
|
86
65
|
"@types/react-dom": "^19.1.6",
|
|
87
|
-
"@types/react-google-recaptcha": "^2.1.5",
|
|
88
66
|
"@types/slug": "^5.0.7",
|
|
89
67
|
"copyfiles": "^2.4.1",
|
|
90
68
|
"npm-run-all2": "^8.0.4",
|
package/public/css/styles.css
CHANGED
|
@@ -58,13 +58,17 @@
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
#primaryNavButton {
|
|
61
|
-
margin-right:
|
|
61
|
+
margin-right:15px;
|
|
62
62
|
text-transform: "none";
|
|
63
|
+
height: 48px !important;
|
|
64
|
+
min-height: 48px !important;
|
|
65
|
+
max-height: 48px !important;
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
#primaryNavButton img {
|
|
66
|
-
height:35px;
|
|
69
|
+
height:35px !important;
|
|
67
70
|
margin-right:15px;
|
|
71
|
+
max-height:35px !important;
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
#primaryNavButton h2 {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { Button, Icon } from "@mui/material";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import {
|
|
4
|
+
import React, { Suspense, lazy } from "react";
|
|
5
|
+
import { Loading } from "./Loading";
|
|
6
|
+
|
|
7
|
+
// Lazy load the CSVLink component
|
|
8
|
+
const CSVLink = lazy(() => import("react-csv").then(module => ({ default: module.CSVLink })));
|
|
6
9
|
|
|
7
10
|
interface Props {
|
|
8
11
|
data: any[],
|
|
@@ -65,7 +68,13 @@ export const ExportLink: React.FC<Props> = (props) => {
|
|
|
65
68
|
else {
|
|
66
69
|
let items = [];
|
|
67
70
|
if (props.spaceBefore) items.push(" ");
|
|
68
|
-
items.push(
|
|
71
|
+
items.push(
|
|
72
|
+
<Suspense key={props.filename} fallback={<Button><Icon sx={{ marginRight: props.text ? 1 : 0 }}>{props.icon || "file_download"}</Icon>{props.text || ""}</Button>}>
|
|
73
|
+
<CSVLink data={people} headers={props.customHeaders || getHeaders()} filename={props.filename || "export.csv"}>
|
|
74
|
+
<Button><Icon sx={{ marginRight: props.text ? 1 : 0 }}>{props.icon || "file_download"}</Icon>{props.text || ""}</Button>
|
|
75
|
+
</CSVLink>
|
|
76
|
+
</Suspense>
|
|
77
|
+
);
|
|
69
78
|
if (props.spaceAfter) items.push(" ");
|
|
70
79
|
return (<>{items}</>);
|
|
71
80
|
}
|
|
@@ -4,7 +4,8 @@ import React, { forwardRef, useImperativeHandle } from "react";
|
|
|
4
4
|
import { CardElement, useElements, useStripe } from "@stripe/react-stripe-js";
|
|
5
5
|
import { Box, Grid, TextField } from "@mui/material";
|
|
6
6
|
import { QuestionInterface } from "@churchapps/helpers";
|
|
7
|
-
import { ApiHelper, Locale, UserInterface, PersonInterface,
|
|
7
|
+
import { ApiHelper, Locale, UserInterface, PersonInterface, StripeDonationInterface, ChurchInterface, FundInterface, ArrayHelper, UserHelper } from "../helpers";
|
|
8
|
+
import { StripePaymentMethod } from "@churchapps/helpers";
|
|
8
9
|
|
|
9
10
|
interface Props {
|
|
10
11
|
churchId: string,
|
|
@@ -25,10 +26,10 @@ export const FormCardPayment = forwardRef((props: Props, ref) => {
|
|
|
25
26
|
|
|
26
27
|
const getChurchData = () => {
|
|
27
28
|
let fundId = props.question.choices.find(c => c.text === "FundId")?.value;
|
|
28
|
-
ApiHelper.get("/churches/" + props.churchId, "MembershipApi").then(data => {
|
|
29
|
+
ApiHelper.get("/churches/" + props.churchId, "MembershipApi").then((data: any) => {
|
|
29
30
|
setChurch(data);
|
|
30
31
|
});
|
|
31
|
-
ApiHelper.get("/funds/churchId/" + props.churchId, "GivingApi").then(data => {
|
|
32
|
+
ApiHelper.get("/funds/churchId/" + props.churchId, "GivingApi").then((data: any) => {
|
|
32
33
|
const result = ArrayHelper.getOne(data, "id", fundId);
|
|
33
34
|
setFund(result);
|
|
34
35
|
})
|
|
@@ -58,10 +58,9 @@ export const FormSubmissionEdit: React.FC<Props> = ({showHeader = true, noBackgr
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
const loadData = () => {
|
|
61
|
-
|
|
62
|
-
if (!UniqueIdHelper.isMissing(props.
|
|
63
|
-
else if (!UniqueIdHelper.isMissing(props.
|
|
64
|
-
else if (!UniqueIdHelper.isMissing(props.unRestrictedFormId)) ApiHelper.get("/questions/unrestricted?formId=" + props.unRestrictedFormId, "MembershipApi").then(data => setFormSubmissionData(data));
|
|
61
|
+
if (!UniqueIdHelper.isMissing(props.formSubmissionId)) ApiHelper.get("/formsubmissions/" + props.formSubmissionId + "/?include=questions,answers,form", "MembershipApi").then((data: any) => setFormSubmission(data));
|
|
62
|
+
else if (!UniqueIdHelper.isMissing(props.addFormId)) ApiHelper.get("/questions/?formId=" + props.addFormId, "MembershipApi").then((data: any) => setFormSubmissionData(data));
|
|
63
|
+
else if (!UniqueIdHelper.isMissing(props.unRestrictedFormId)) ApiHelper.get("/questions/unrestricted?formId=" + props.unRestrictedFormId, "MembershipApi").then((data: any) => setFormSubmissionData(data));
|
|
65
64
|
}
|
|
66
65
|
|
|
67
66
|
const getDefaultValue = (q: QuestionInterface) => {
|
|
@@ -116,7 +115,7 @@ export const FormSubmissionEdit: React.FC<Props> = ({showHeader = true, noBackgr
|
|
|
116
115
|
fs.submissionDate = new Date();
|
|
117
116
|
fs.churchId = props.churchId || null;
|
|
118
117
|
|
|
119
|
-
ApiHelper.post("/formsubmissions/", [fs], "MembershipApi").then((res) => {
|
|
118
|
+
ApiHelper.post("/formsubmissions/", [fs], "MembershipApi").then((res: any) => {
|
|
120
119
|
if (res?.[0]?.error) {
|
|
121
120
|
setErrors([res?.[0].error]);
|
|
122
121
|
} else {
|
|
@@ -143,7 +142,7 @@ export const FormSubmissionEdit: React.FC<Props> = ({showHeader = true, noBackgr
|
|
|
143
142
|
|
|
144
143
|
React.useEffect(() => {
|
|
145
144
|
if (props.churchId) {
|
|
146
|
-
ApiHelper.get("/gateways/churchId/" + props.churchId, "GivingApi").then(data => {
|
|
145
|
+
ApiHelper.get("/gateways/churchId/" + props.churchId, "GivingApi").then((data: any) => {
|
|
147
146
|
if (data.length && data[0]?.publicKey) {
|
|
148
147
|
setStripe(loadStripe(data[0].publicKey));
|
|
149
148
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import React, { useState, useEffect, useRef } from "react";
|
|
4
|
-
import
|
|
5
|
-
// import "cropperjs/dist/cropper.css"; // CSS import removed due to Next.js compatibility issues
|
|
6
|
-
import { InputBox, SmallButton } from ".";
|
|
3
|
+
import React, { useState, useEffect, useRef, Suspense, lazy } from "react";
|
|
4
|
+
import { InputBox, SmallButton, Loading } from ".";
|
|
7
5
|
import { Locale } from "../helpers";
|
|
8
6
|
|
|
7
|
+
// Lazy load the Cropper component
|
|
8
|
+
const Cropper = lazy(() => import("react-cropper").then(module => ({ default: module.default })));
|
|
9
|
+
|
|
9
10
|
interface Props {
|
|
10
11
|
title?: string;
|
|
11
12
|
photoUrl: string;
|
|
@@ -125,14 +126,16 @@ export function ImageEditor(props: Props) {
|
|
|
125
126
|
</div>
|
|
126
127
|
}
|
|
127
128
|
>
|
|
128
|
-
<
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
<Suspense fallback={<Loading />}>
|
|
130
|
+
<Cropper
|
|
131
|
+
ref={cropperRef}
|
|
132
|
+
src={photoSrc}
|
|
133
|
+
style={{ height: 240, width: "100%" }}
|
|
134
|
+
aspectRatio={props.aspectRatio}
|
|
135
|
+
guides={false}
|
|
136
|
+
crop={handleCrop}
|
|
137
|
+
/>
|
|
138
|
+
</Suspense>
|
|
136
139
|
</InputBox>
|
|
137
140
|
);
|
|
138
141
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { Paper, Box, Typography, Stack, Button,
|
|
4
|
+
import { Paper, Box, Typography, Stack, Button, PaperProps } from "@mui/material";
|
|
5
|
+
import { Icon } from "@mui/material";
|
|
5
6
|
import { HelpIcon } from "./HelpIcon";
|
|
6
7
|
import { Locale } from "../helpers";
|
|
7
8
|
import { styled, useTheme } from '@mui/material/styles';
|
|
@@ -2,7 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Dots } from "react-activity";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// Inline CSS for react-activity to avoid external dependencies
|
|
7
|
+
const activityStyles = `
|
|
8
|
+
.activity-loader {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: inline-block;
|
|
11
|
+
}
|
|
12
|
+
.activity-dots {
|
|
13
|
+
position: relative;
|
|
14
|
+
display: inline-block;
|
|
15
|
+
}
|
|
16
|
+
.activity-dots > div {
|
|
17
|
+
position: absolute;
|
|
18
|
+
border-radius: 50%;
|
|
19
|
+
animation: activity-dots 1.2s infinite ease-in-out;
|
|
20
|
+
animation-fill-mode: both;
|
|
21
|
+
}
|
|
22
|
+
.activity-dots > div:nth-child(1) { animation-delay: -1.1s; }
|
|
23
|
+
.activity-dots > div:nth-child(2) { animation-delay: -1.0s; }
|
|
24
|
+
.activity-dots > div:nth-child(3) { animation-delay: -0.9s; }
|
|
25
|
+
.activity-dots > div:nth-child(4) { animation-delay: -0.8s; }
|
|
26
|
+
.activity-dots > div:nth-child(5) { animation-delay: -0.7s; }
|
|
27
|
+
.activity-dots > div:nth-child(6) { animation-delay: -0.6s; }
|
|
28
|
+
.activity-dots > div:nth-child(7) { animation-delay: -0.5s; }
|
|
29
|
+
.activity-dots > div:nth-child(8) { animation-delay: -0.4s; }
|
|
30
|
+
.activity-dots > div:nth-child(9) { animation-delay: -0.3s; }
|
|
31
|
+
.activity-dots > div:nth-child(10) { animation-delay: -0.2s; }
|
|
32
|
+
.activity-dots > div:nth-child(11) { animation-delay: -0.1s; }
|
|
33
|
+
.activity-dots > div:nth-child(12) { animation-delay: 0s; }
|
|
34
|
+
|
|
35
|
+
@keyframes activity-dots {
|
|
36
|
+
0%, 80%, 100% {
|
|
37
|
+
transform: scale(0);
|
|
38
|
+
}
|
|
39
|
+
40% {
|
|
40
|
+
transform: scale(1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
|
|
45
|
+
// Add styles to document head if not already present
|
|
46
|
+
if (typeof document !== 'undefined' && !document.getElementById('activity-styles')) {
|
|
47
|
+
const style = document.createElement('style');
|
|
48
|
+
style.id = 'activity-styles';
|
|
49
|
+
style.textContent = activityStyles;
|
|
50
|
+
document.head.appendChild(style);
|
|
51
|
+
}
|
|
6
52
|
|
|
7
53
|
interface Props { size?: "sm" | "md" | "lg", loadingText?: string, color?: string }
|
|
8
54
|
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { Box, Typography, Stack } from "@mui/material";
|
|
3
|
+
|
|
4
|
+
interface PageHeaderProps {
|
|
5
|
+
icon: ReactNode;
|
|
6
|
+
title: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
children?: ReactNode; // For action buttons or tabs
|
|
9
|
+
statistics?: Array<{ icon: ReactNode; value: string; label: string }>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const PageHeader: React.FC<PageHeaderProps> = ({ icon, title, subtitle, children, statistics }) => {
|
|
13
|
+
return (
|
|
14
|
+
<Box sx={{
|
|
15
|
+
backgroundColor: "var(--c1l2)",
|
|
16
|
+
color: "#FFF",
|
|
17
|
+
position: 'relative',
|
|
18
|
+
left: '50%',
|
|
19
|
+
right: '50%',
|
|
20
|
+
marginLeft: '-50vw',
|
|
21
|
+
marginRight: '-50vw',
|
|
22
|
+
width: '100vw',
|
|
23
|
+
'--c1': '#1565C0',
|
|
24
|
+
'--c1d1': '#1358AD',
|
|
25
|
+
'--c1d2': '#114A99',
|
|
26
|
+
'--c1l2': '#568BDA'
|
|
27
|
+
}}>
|
|
28
|
+
<Box sx={{
|
|
29
|
+
paddingX: { xs: 2, sm: 3, md: 4 },
|
|
30
|
+
paddingY: 3
|
|
31
|
+
}}>
|
|
32
|
+
<Stack direction={{ xs: "column", md: "row" }} spacing={{ xs: 2, md: 4 }} alignItems={{ xs: "flex-start", md: "center" }} sx={{ width: "100%" }}>
|
|
33
|
+
{/* Left side: Title and Icon */}
|
|
34
|
+
<Stack direction="row" spacing={2} alignItems="center" sx={{ flex: 1 }}>
|
|
35
|
+
<Box
|
|
36
|
+
sx={{
|
|
37
|
+
backgroundColor: "rgba(255,255,255,0.2)",
|
|
38
|
+
borderRadius: "12px",
|
|
39
|
+
p: 1.5,
|
|
40
|
+
display: "flex",
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
justifyContent: "center",
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
{React.cloneElement(icon as React.ReactElement<any>, { sx: { fontSize: 32, color: "#FFF" } })}
|
|
46
|
+
</Box>
|
|
47
|
+
<Box>
|
|
48
|
+
<Typography
|
|
49
|
+
variant="h4"
|
|
50
|
+
sx={{
|
|
51
|
+
fontWeight: 600,
|
|
52
|
+
mb: 0.5,
|
|
53
|
+
fontSize: { xs: "1.75rem", md: "2.125rem" },
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
{title}
|
|
57
|
+
</Typography>
|
|
58
|
+
{subtitle && (
|
|
59
|
+
<Typography
|
|
60
|
+
variant="body1"
|
|
61
|
+
sx={{
|
|
62
|
+
color: "rgba(255,255,255,0.9)",
|
|
63
|
+
fontSize: { xs: "0.875rem", md: "1rem" },
|
|
64
|
+
}}
|
|
65
|
+
>
|
|
66
|
+
{subtitle}
|
|
67
|
+
</Typography>
|
|
68
|
+
)}
|
|
69
|
+
</Box>
|
|
70
|
+
</Stack>
|
|
71
|
+
|
|
72
|
+
{/* Right side: Action Buttons/Tabs */}
|
|
73
|
+
{children && (
|
|
74
|
+
<Stack
|
|
75
|
+
direction="row"
|
|
76
|
+
spacing={1}
|
|
77
|
+
sx={{
|
|
78
|
+
flexShrink: 0,
|
|
79
|
+
justifyContent: { xs: "flex-start", md: "flex-end" },
|
|
80
|
+
width: { xs: "100%", md: "auto" },
|
|
81
|
+
}}
|
|
82
|
+
>
|
|
83
|
+
{children}
|
|
84
|
+
</Stack>
|
|
85
|
+
)}
|
|
86
|
+
</Stack>
|
|
87
|
+
|
|
88
|
+
{/* Statistics row */}
|
|
89
|
+
{statistics && statistics.length > 0 && (
|
|
90
|
+
<Stack direction={{ xs: "column", sm: "row" }} spacing={3} sx={{ mt: 3 }}>
|
|
91
|
+
{statistics.map((stat, index) => (
|
|
92
|
+
<Stack key={index} direction="row" spacing={1} alignItems="center">
|
|
93
|
+
{React.cloneElement(stat.icon as React.ReactElement<any>, { sx: { color: "#FFF", fontSize: 20 } })}
|
|
94
|
+
<Typography variant="h6" sx={{ color: "#FFF", fontWeight: 600, mr: 1 }}>
|
|
95
|
+
{stat.value}
|
|
96
|
+
</Typography>
|
|
97
|
+
<Typography variant="body2" sx={{ color: "rgba(255,255,255,0.9)", fontSize: "0.875rem" }}>
|
|
98
|
+
{stat.label}
|
|
99
|
+
</Typography>
|
|
100
|
+
</Stack>
|
|
101
|
+
))}
|
|
102
|
+
</Stack>
|
|
103
|
+
)}
|
|
104
|
+
</Box>
|
|
105
|
+
</Box>
|
|
106
|
+
);
|
|
107
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Avatar, SxProps } from "@mui/material";
|
|
5
|
+
import { PersonInterface } from "@churchapps/helpers";
|
|
6
|
+
import { PersonHelper } from "../helpers";
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
person: PersonInterface;
|
|
10
|
+
size?: "small" | "medium" | "large" | "xlarge" | "xxlarge" | "responsive";
|
|
11
|
+
sx?: SxProps;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const PersonAvatar: React.FC<Props> = ({ person, size = "medium", sx, onClick }) => {
|
|
16
|
+
const [imageError, setImageError] = React.useState(false);
|
|
17
|
+
|
|
18
|
+
const getSizeProps = () => {
|
|
19
|
+
switch (size) {
|
|
20
|
+
case "small":
|
|
21
|
+
return { width: 48, height: 48 };
|
|
22
|
+
case "medium":
|
|
23
|
+
return { width: 56, height: 56 };
|
|
24
|
+
case "large":
|
|
25
|
+
return { width: 80, height: 80 };
|
|
26
|
+
case "xlarge":
|
|
27
|
+
return { width: 100, height: 100 };
|
|
28
|
+
case "xxlarge":
|
|
29
|
+
return { width: 120, height: 120 };
|
|
30
|
+
case "responsive":
|
|
31
|
+
return { width: { xs: 70, sm: 80, md: 100 }, height: { xs: 70, sm: 80, md: 100 } };
|
|
32
|
+
default:
|
|
33
|
+
return { width: 56, height: 56 };
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const getInitials = () => {
|
|
38
|
+
if (!person?.name?.display) return "?";
|
|
39
|
+
|
|
40
|
+
const names = person.name.display.trim().split(" ");
|
|
41
|
+
if (names.length >= 2) {
|
|
42
|
+
return (names[0][0] + names[names.length - 1][0]).toUpperCase();
|
|
43
|
+
} else if (names.length === 1) {
|
|
44
|
+
return names[0][0]?.toUpperCase() || "?";
|
|
45
|
+
}
|
|
46
|
+
return "?";
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const photoUrl = PersonHelper.getPhotoUrl(person);
|
|
50
|
+
const sizeProps = getSizeProps();
|
|
51
|
+
|
|
52
|
+
// Combine default styles with custom sx
|
|
53
|
+
const combinedSx = {
|
|
54
|
+
...sizeProps,
|
|
55
|
+
cursor: onClick ? "pointer" : "default",
|
|
56
|
+
"&:hover": onClick ? {
|
|
57
|
+
opacity: 0.8,
|
|
58
|
+
transition: "opacity 0.2s ease-in-out",
|
|
59
|
+
} : {},
|
|
60
|
+
...sx,
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const handleImageError = () => {
|
|
64
|
+
setImageError(true);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<Avatar
|
|
69
|
+
src={!imageError ? photoUrl : undefined}
|
|
70
|
+
alt={person?.name?.display || "User avatar"}
|
|
71
|
+
sx={combinedSx}
|
|
72
|
+
onClick={onClick}
|
|
73
|
+
onError={handleImageError}
|
|
74
|
+
>
|
|
75
|
+
{(imageError || !photoUrl) && getInitials()}
|
|
76
|
+
</Avatar>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
@@ -13,9 +13,14 @@ export const SupportModal: React.FC<Props> = ({ appName = "", onClose }) => {
|
|
|
13
13
|
const subject = appName ? `?subject=${appName} Support` : ""
|
|
14
14
|
|
|
15
15
|
return (<>
|
|
16
|
-
<Dialog
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
<Dialog
|
|
17
|
+
open={true}
|
|
18
|
+
onClose={onClose}
|
|
19
|
+
aria-labelledby="support-modal-title"
|
|
20
|
+
aria-describedby="support-modal-content"
|
|
21
|
+
>
|
|
22
|
+
<DialogTitle id="support-modal-title">Get Support</DialogTitle>
|
|
23
|
+
<DialogContent id="support-modal-content">
|
|
19
24
|
<Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>info</Icon> {Locale.label("support.documentation")}:</Stack></b> <a href="https://support.churchapps.org" target="_new">https://support.churchapps.org</a></Stack>
|
|
20
25
|
<Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}} mb={2}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>forum</Icon> {Locale.label("support.discussions")}:</Stack></b> <a href="https://github.com/orgs/ChurchApps/discussions" target="_new">https://github.com/orgs/ChurchApps/discussions</a></Stack>
|
|
21
26
|
</DialogContent>
|