@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,11 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var _a;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const ApiHelper_1 = require("./ApiHelper");
|
|
6
|
-
class ErrorHelper {
|
|
2
|
+
import { ApiHelper } from "@churchapps/helpers";
|
|
3
|
+
export class ErrorHelper {
|
|
7
4
|
}
|
|
8
|
-
exports.ErrorHelper = ErrorHelper;
|
|
9
5
|
_a = ErrorHelper;
|
|
10
6
|
ErrorHelper.init = (getAppData, customErrorHandler) => {
|
|
11
7
|
_a.getAppData = getAppData;
|
|
@@ -30,7 +26,7 @@ ErrorHelper.logError = (errorType, message, details) => {
|
|
|
30
26
|
if (log.message.indexOf("clientErrors") > -1)
|
|
31
27
|
return;
|
|
32
28
|
try {
|
|
33
|
-
|
|
29
|
+
ApiHelper.postAnonymous("/clientErrors", [log], "MembershipApi");
|
|
34
30
|
}
|
|
35
31
|
catch (error) {
|
|
36
32
|
console.log(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorHelper.js","sourceRoot":"","sources":["../../src/helpers/ErrorHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorHelper.js","sourceRoot":"","sources":["../../src/helpers/ErrorHelper.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD,MAAM,OAAO,WAAW;;;AAKhB,gBAAI,GAAG,CAAC,UAAuC,EAAE,kBAAyD,EAAE,EAAE;IACpH,EAAW,CAAC,UAAU,GAAG,UAAU,CAAC;IACpC,EAAW,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AACrD,CAAC,AAHU,CAGV;AAEM,oBAAQ,GAAG,CAAC,SAAiB,EAAE,OAAe,EAAE,OAAe,EAAE,EAAE;IACzE,IAAI,EAAI,CAAC,UAAU,EAAE,CAAC;QACrB,MAAM,IAAI,GAAG,EAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,MAAM,GAAG,GAAsB;YAC9B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7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cAAc,
|
|
1
|
+
{"version":3,"file":"EventHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/EventHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAY,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,qBAAa,WAAW;IAEtB,MAAM,CAAC,QAAQ,GAAI,OAAM,cAAc,EAAE,WAAU,IAAI,EAAE,SAAQ,IAAI,YAYpE;IAED,MAAM,CAAC,YAAY,GAAI,OAAM,cAAc,WAI1C;IAED,MAAM,CAAC,kBAAkB,GAAI,QAAO,cAAc,EAAE,UAQnD;IAED,MAAM,CAAC,qBAAqB,GAAI,SAAQ,aAAa,YAIpD;IAED,MAAM,CAAC,SAAS,GAAI,SAAQ,aAAa,UAIxC;CAEF"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.EventHelper = void 0;
|
|
4
|
-
const rrule_1 = require("rrule");
|
|
5
|
-
class EventHelper {
|
|
1
|
+
import { RRule } from "rrule";
|
|
2
|
+
export class EventHelper {
|
|
6
3
|
}
|
|
7
|
-
exports.EventHelper = EventHelper;
|
|
8
4
|
EventHelper.getRange = (event, startDate, endDate) => {
|
|
9
5
|
const start = new Date(event.start);
|
|
10
6
|
const rrule = EventHelper.getFullRRule(event);
|
|
@@ -17,25 +13,22 @@ EventHelper.getRange = (event, startDate, endDate) => {
|
|
|
17
13
|
return dates;
|
|
18
14
|
};
|
|
19
15
|
EventHelper.getFullRRule = (event) => {
|
|
20
|
-
let rrule =
|
|
16
|
+
let rrule = RRule.fromString(event.recurrenceRule);
|
|
21
17
|
rrule.options.dtstart = new Date(event.start);
|
|
22
|
-
console.log("START", rrule.options.dtstart, event.start, rrule);
|
|
23
18
|
return rrule;
|
|
24
19
|
};
|
|
25
20
|
EventHelper.removeExcludeDates = (events) => {
|
|
26
21
|
for (let i = events.length - 1; i >= 0; i--) {
|
|
27
22
|
if (events[i].exceptionDates?.length > 0) {
|
|
28
23
|
const parsedDates = events[i].exceptionDates.map(d => new Date(d).toISOString());
|
|
29
|
-
//console.log("Compare", events[i].start.toISOString(), parsedDates, parsedDates.indexOf(events[i].start.toISOString()));
|
|
30
24
|
if (parsedDates.indexOf(events[i].start.toISOString()) > -1)
|
|
31
25
|
events.splice(i, 1);
|
|
32
26
|
}
|
|
33
27
|
}
|
|
34
28
|
};
|
|
35
29
|
EventHelper.getPartialRRuleString = (options) => {
|
|
36
|
-
const parts = new
|
|
30
|
+
const parts = new RRule(options).toString().split("RRULE:");
|
|
37
31
|
const result = parts.length === 2 ? parts[1] : "";
|
|
38
|
-
console.log("getPartialRRuleString", options, new rrule_1.RRule(options).toString(), result);
|
|
39
32
|
return result;
|
|
40
33
|
};
|
|
41
34
|
EventHelper.cleanRule = (options) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventHelper.js","sourceRoot":"","sources":["../../src/helpers/EventHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EventHelper.js","sourceRoot":"","sources":["../../src/helpers/EventHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAY,MAAM,OAAO,CAAC;AAGxC,MAAM,OAAO,WAAW;;AAEf,oBAAQ,GAAG,CAAC,KAAoB,EAAE,SAAc,EAAE,OAAY,EAAE,EAAE;IACvE,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAEhD,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;QAChB,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAA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,CAAC,CAAC;IAC5D,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,KAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAChD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAA;AAEM,qBAAS,GAAG,CAAC,OAAqB,EAAE,EAAE;IAC3C,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;AAC/B,CAAC,CAAA"}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.FileHelper = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
class FileHelper {
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
export class FileHelper {
|
|
9
3
|
static dataURLtoBlob(dataurl) {
|
|
10
4
|
let arr = dataurl.split(","), mime = arr[0].match(/:(.*?);/)[1], bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
|
|
11
5
|
while (n--) {
|
|
@@ -14,7 +8,6 @@ class FileHelper {
|
|
|
14
8
|
return new Blob([u8arr], { type: mime });
|
|
15
9
|
}
|
|
16
10
|
}
|
|
17
|
-
exports.FileHelper = FileHelper;
|
|
18
11
|
FileHelper.postPresignedFile = (presigned, uploadedFile, progressCallback) => {
|
|
19
12
|
const formData = new FormData();
|
|
20
13
|
//formData.append("key", presigned.key); //no longer needed with new aws sdk
|
|
@@ -29,6 +22,6 @@ FileHelper.postPresignedFile = (presigned, uploadedFile, progressCallback) => {
|
|
|
29
22
|
progressCallback(Math.round((100 * data.loaded) / data.total));
|
|
30
23
|
}
|
|
31
24
|
};
|
|
32
|
-
return
|
|
25
|
+
return axios.post(presigned.url, formData, axiosConfig);
|
|
33
26
|
};
|
|
34
27
|
//# sourceMappingURL=FileHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileHelper.js","sourceRoot":"","sources":["../../src/helpers/FileHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileHelper.js","sourceRoot":"","sources":["../../src/helpers/FileHelper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,OAAO,UAAU;IAoBrB,MAAM,CAAC,aAAa,CAAC,OAAe;QAClC,IAAI,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAC7D,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;QAClE,OAAO,CAAC,EAAE,EAAE,CAAC;YACX,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,CAAC;;AAzBM,4BAAiB,GAAG,CAAC,SAAc,EAAE,YAAkB,EAAE,gBAA2C,EAAE,EAAE;IAC7G,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;IAChC,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACtC,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IACnD,KAAK,MAAM,QAAQ,IAAI,SAAS,CAAC,MAAM;QAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC/F,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAEtC,MAAM,WAAW,GAAG;QAClB,OAAO,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE;QAClD,gBAAgB,EAAE,CAAC,IAAS,EAAE,EAAE;YAC9B,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACjE,CAAC;KACF,CAAC;IAEF,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;AAC1D,CAAC,CAAC"}
|
package/dist/helpers/Locale.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ export declare class Locale {
|
|
|
5
5
|
private static deepMerge;
|
|
6
6
|
private static isObject;
|
|
7
7
|
static t(key: string, options?: Record<string, unknown>): string;
|
|
8
|
-
static label(key: string): string;
|
|
8
|
+
static label(key: string, fallback?: string): string;
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=Locale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Locale.d.ts","sourceRoot":"","sources":["../../src/helpers/Locale.ts"],"names":[],"mappings":"AAgBA,qBAAa,MAAM;IAClB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAaxC;IACF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAA4C;IAE9E,MAAM,CAAC,IAAI,GAAU,UAAU,MAAM,EAAE,KAAG,OAAO,CAAC,IAAI,CAAC,CA4CrD;IAEF,OAAO,CAAC,MAAM,CAAC,SAAS;IAgBxB,OAAO,CAAC,MAAM,CAAC,QAAQ;IAKvB,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;IAKhE,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"Locale.d.ts","sourceRoot":"","sources":["../../src/helpers/Locale.ts"],"names":[],"mappings":"AAgBA,qBAAa,MAAM;IAClB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAaxC;IACF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAA4C;IAE9E,MAAM,CAAC,IAAI,GAAU,UAAU,MAAM,EAAE,KAAG,OAAO,CAAC,IAAI,CAAC,CA4CrD;IAEF,OAAO,CAAC,MAAM,CAAC,SAAS;IAgBxB,OAAO,CAAC,MAAM,CAAC,QAAQ;IAKvB,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;IAKhE,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM;CAQpD"}
|
package/dist/helpers/Locale.js
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
1
|
var _a;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const i18next_chained_backend_1 = __importDefault(require("i18next-chained-backend"));
|
|
12
|
-
class Locale {
|
|
2
|
+
import i18n from "i18next";
|
|
3
|
+
import { initReactI18next } from "react-i18next/initReactI18next";
|
|
4
|
+
import LanguageDetector from "i18next-browser-languagedetector";
|
|
5
|
+
import Backend from "i18next-chained-backend";
|
|
6
|
+
export class Locale {
|
|
13
7
|
static deepMerge(target, source) {
|
|
14
8
|
for (const key in source) {
|
|
15
9
|
if (this.isObject(source[key])) {
|
|
@@ -27,14 +21,18 @@ class Locale {
|
|
|
27
21
|
}
|
|
28
22
|
// New helper method that uses i18n
|
|
29
23
|
static t(key, options) {
|
|
30
|
-
return
|
|
24
|
+
return i18n.t(key, options);
|
|
31
25
|
}
|
|
32
26
|
// Keep the old method for backward compatibility
|
|
33
|
-
static label(key) {
|
|
34
|
-
|
|
27
|
+
static label(key, fallback) {
|
|
28
|
+
const translation = this.t(key);
|
|
29
|
+
// If translation equals the key, it means no translation was found
|
|
30
|
+
if (translation === key && fallback) {
|
|
31
|
+
return fallback;
|
|
32
|
+
}
|
|
33
|
+
return translation;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
|
-
exports.Locale = Locale;
|
|
38
36
|
_a = Locale;
|
|
39
37
|
Locale.supportedLanguages = [
|
|
40
38
|
"de",
|
|
@@ -70,14 +68,14 @@ Locale.init = async (backends) => {
|
|
|
70
68
|
}
|
|
71
69
|
}
|
|
72
70
|
// Initialize i18n
|
|
73
|
-
await
|
|
74
|
-
.use(
|
|
75
|
-
.use(
|
|
76
|
-
.use(
|
|
71
|
+
await i18n
|
|
72
|
+
.use(Backend)
|
|
73
|
+
.use(LanguageDetector)
|
|
74
|
+
.use(initReactI18next)
|
|
77
75
|
.init({
|
|
78
76
|
resources,
|
|
79
77
|
fallbackLng: "en",
|
|
80
|
-
debug:
|
|
78
|
+
debug: false,
|
|
81
79
|
interpolation: {
|
|
82
80
|
escapeValue: false,
|
|
83
81
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Locale.js","sourceRoot":"","sources":["../../src/helpers/Locale.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Locale.js","sourceRoot":"","sources":["../../src/helpers/Locale.ts"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OA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AE,EAAE,EAAE,CAAC;QACtC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAChC,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;YAC7C,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;YAClE,SAAS,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,EAAI,CAAC,SAAS,CAC3C,SAAS,CAAC,IAAI,CAAC,CAAC,WAAW,EAC3B,IAAI,CACJ,CAAC;QACH,CAAC;IACF,CAAC;IAED,kBAAkB;IAClB,MAAM,IAAI;SACR,GAAG,CAAC,OAAO,CAAC;SACZ,GAAG,CAAC,gBAAgB,CAAC;SACrB,GAAG,CAAC,gBAAgB,CAAC;SACrB,IAAI,CAAC;QACL,SAAS;QACT,WAAW,EAAE,IAAI;QACjB,KAAK,EAAE,KAAK;QACZ,aAAa,EAAE;YACd,WAAW,EAAE,KAAK;SAClB;QACD,SAAS,EAAE;YACV,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,MAAM,EAAE,CAAC,cAAc,CAAC;SACxB;KACD,CAAC,CAAC;AACL,CAAC,AA5CU,CA4CT"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { UserContextInterface } from "@churchapps/helpers";
|
|
2
|
+
export interface NotificationCounts {
|
|
3
|
+
notificationCount: number;
|
|
4
|
+
pmCount: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class NotificationService {
|
|
7
|
+
private static instance;
|
|
8
|
+
private counts;
|
|
9
|
+
private listeners;
|
|
10
|
+
private isInitialized;
|
|
11
|
+
private currentPersonId;
|
|
12
|
+
private loadTimeout;
|
|
13
|
+
private constructor();
|
|
14
|
+
static getInstance(): NotificationService;
|
|
15
|
+
/**
|
|
16
|
+
* Initialize the notification service with user context
|
|
17
|
+
*/
|
|
18
|
+
initialize(context: UserContextInterface): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Register websocket handlers for real-time notification updates
|
|
21
|
+
*/
|
|
22
|
+
private registerWebSocketHandlers;
|
|
23
|
+
/**
|
|
24
|
+
* Load notification counts from the API with debouncing
|
|
25
|
+
*/
|
|
26
|
+
private debouncedLoadNotificationCounts;
|
|
27
|
+
/**
|
|
28
|
+
* Load notification counts from the API
|
|
29
|
+
*/
|
|
30
|
+
loadNotificationCounts(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Update counts and notify all listeners
|
|
33
|
+
*/
|
|
34
|
+
private updateCounts;
|
|
35
|
+
/**
|
|
36
|
+
* Subscribe to notification count changes
|
|
37
|
+
*/
|
|
38
|
+
subscribe(listener: (counts: NotificationCounts) => void): () => void;
|
|
39
|
+
/**
|
|
40
|
+
* Get current notification counts
|
|
41
|
+
*/
|
|
42
|
+
getCounts(): NotificationCounts;
|
|
43
|
+
/**
|
|
44
|
+
* Manually refresh notification counts
|
|
45
|
+
*/
|
|
46
|
+
refresh(): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Cleanup the service
|
|
49
|
+
*/
|
|
50
|
+
cleanup(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Check if service is initialized
|
|
53
|
+
*/
|
|
54
|
+
isReady(): boolean;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=NotificationService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationService.d.ts","sourceRoot":"","sources":["../../src/helpers/NotificationService.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEtE,MAAM,WAAW,kBAAkB;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAsB;IAC7C,OAAO,CAAC,MAAM,CAA4D;IAC1E,OAAO,CAAC,SAAS,CAAmD;IACpE,OAAO,CAAC,aAAa,CAAkB;IACvC,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,WAAW,CAAoB;IAEvC,OAAO;IAEP,MAAM,CAAC,WAAW,IAAI,mBAAmB;IAOzC;;OAEG;IACG,UAAU,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgC9D;;OAEG;IACH,OAAO,CAAC,yBAAyB;IA8BjC;;OAEG;IACH,OAAO,CAAC,+BAA+B;IAUvC;;OAEG;IACG,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;IAmB7C;;OAEG;IACH,OAAO,CAAC,YAAY;IAmBpB;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,GAAG,MAAM,IAAI;IAYrE;;OAEG;IACH,SAAS,IAAI,kBAAkB;IAI/B;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI9B;;OAEG;IACH,OAAO,IAAI,IAAI;IAsBf;;OAEG;IACH,OAAO,IAAI,OAAO;CAGnB"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { SocketHelper } from "./SocketHelper";
|
|
2
|
+
import { ApiHelper } from "@churchapps/helpers";
|
|
3
|
+
export class NotificationService {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.counts = { notificationCount: 0, pmCount: 0 };
|
|
6
|
+
this.listeners = [];
|
|
7
|
+
this.isInitialized = false;
|
|
8
|
+
this.currentPersonId = null;
|
|
9
|
+
this.loadTimeout = null;
|
|
10
|
+
}
|
|
11
|
+
static getInstance() {
|
|
12
|
+
if (!NotificationService.instance) {
|
|
13
|
+
NotificationService.instance = new NotificationService();
|
|
14
|
+
}
|
|
15
|
+
return NotificationService.instance;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Initialize the notification service with user context
|
|
19
|
+
*/
|
|
20
|
+
async initialize(context) {
|
|
21
|
+
if (this.isInitialized)
|
|
22
|
+
return;
|
|
23
|
+
try {
|
|
24
|
+
// Store current person ID for conversation counting
|
|
25
|
+
this.currentPersonId = context?.person?.id || null;
|
|
26
|
+
// Initialize WebSocket connection
|
|
27
|
+
await SocketHelper.init();
|
|
28
|
+
// Set person/church context for websocket
|
|
29
|
+
if (context?.person?.id && context?.userChurch?.church?.id) {
|
|
30
|
+
SocketHelper.setPersonChurch({
|
|
31
|
+
personId: context.person.id,
|
|
32
|
+
churchId: context.userChurch.church.id
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
// Register handlers for notification updates
|
|
36
|
+
this.registerWebSocketHandlers();
|
|
37
|
+
// Load initial notification counts
|
|
38
|
+
await this.loadNotificationCounts();
|
|
39
|
+
this.isInitialized = true;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
console.error("❌ Failed to initialize NotificationService:", error);
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Register websocket handlers for real-time notification updates
|
|
48
|
+
*/
|
|
49
|
+
registerWebSocketHandlers() {
|
|
50
|
+
// Handler for new private messages
|
|
51
|
+
SocketHelper.addHandler("privateMessage", "NotificationService-PM", (data) => {
|
|
52
|
+
console.log('🔔 NotificationService: New private message received, updating counts');
|
|
53
|
+
this.debouncedLoadNotificationCounts();
|
|
54
|
+
});
|
|
55
|
+
// Handler for general notifications
|
|
56
|
+
SocketHelper.addHandler("notification", "NotificationService-Notification", (data) => {
|
|
57
|
+
console.log('🔔 NotificationService: New notification received, updating counts');
|
|
58
|
+
this.debouncedLoadNotificationCounts();
|
|
59
|
+
});
|
|
60
|
+
// Handler for message updates that could affect notification counts
|
|
61
|
+
SocketHelper.addHandler("message", "NotificationService-MessageUpdate", (data) => {
|
|
62
|
+
// Only update counts if the message update involves the current person
|
|
63
|
+
if (data?.message?.personId === this.currentPersonId ||
|
|
64
|
+
data?.notifyPersonId === this.currentPersonId) {
|
|
65
|
+
console.log('🔔 NotificationService: Message update affecting current user, updating counts');
|
|
66
|
+
this.debouncedLoadNotificationCounts();
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
// Handler for reconnect events
|
|
70
|
+
SocketHelper.addHandler("reconnect", "NotificationService-Reconnect", (data) => {
|
|
71
|
+
console.log('🔔 NotificationService: WebSocket reconnected, refreshing counts');
|
|
72
|
+
this.loadNotificationCounts(); // Don't debounce reconnect - need immediate update
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Load notification counts from the API with debouncing
|
|
77
|
+
*/
|
|
78
|
+
debouncedLoadNotificationCounts() {
|
|
79
|
+
if (this.loadTimeout) {
|
|
80
|
+
clearTimeout(this.loadTimeout);
|
|
81
|
+
}
|
|
82
|
+
this.loadTimeout = setTimeout(() => {
|
|
83
|
+
this.loadNotificationCounts();
|
|
84
|
+
}, 300); // 300ms debounce
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Load notification counts from the API
|
|
88
|
+
*/
|
|
89
|
+
async loadNotificationCounts() {
|
|
90
|
+
try {
|
|
91
|
+
// Use the unreadCount endpoint which returns both notification and PM counts
|
|
92
|
+
const counts = await ApiHelper.get("/notifications/unreadCount", "MessagingApi");
|
|
93
|
+
const newCounts = {
|
|
94
|
+
notificationCount: counts?.notificationCount || 0,
|
|
95
|
+
pmCount: counts?.pmCount || 0
|
|
96
|
+
};
|
|
97
|
+
// Update counts and notify listeners
|
|
98
|
+
this.updateCounts(newCounts);
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
console.error("❌ Failed to load notification counts:", error);
|
|
102
|
+
// Don't throw - just log the error and keep existing counts
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Update counts and notify all listeners
|
|
107
|
+
*/
|
|
108
|
+
updateCounts(newCounts) {
|
|
109
|
+
const countsChanged = this.counts.notificationCount !== newCounts.notificationCount ||
|
|
110
|
+
this.counts.pmCount !== newCounts.pmCount;
|
|
111
|
+
if (countsChanged) {
|
|
112
|
+
this.counts = { ...newCounts };
|
|
113
|
+
// Notify all listeners
|
|
114
|
+
this.listeners.forEach(listener => {
|
|
115
|
+
try {
|
|
116
|
+
listener(this.counts);
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
console.error("❌ Error in notification listener:", error);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Subscribe to notification count changes
|
|
126
|
+
*/
|
|
127
|
+
subscribe(listener) {
|
|
128
|
+
this.listeners.push(listener);
|
|
129
|
+
// Immediately call with current counts
|
|
130
|
+
listener(this.counts);
|
|
131
|
+
// Return unsubscribe function
|
|
132
|
+
return () => {
|
|
133
|
+
this.listeners = this.listeners.filter(l => l !== listener);
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Get current notification counts
|
|
138
|
+
*/
|
|
139
|
+
getCounts() {
|
|
140
|
+
return { ...this.counts };
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Manually refresh notification counts
|
|
144
|
+
*/
|
|
145
|
+
async refresh() {
|
|
146
|
+
await this.loadNotificationCounts();
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Cleanup the service
|
|
150
|
+
*/
|
|
151
|
+
cleanup() {
|
|
152
|
+
// Clear any pending timeout
|
|
153
|
+
if (this.loadTimeout) {
|
|
154
|
+
clearTimeout(this.loadTimeout);
|
|
155
|
+
this.loadTimeout = null;
|
|
156
|
+
}
|
|
157
|
+
// Remove websocket handlers
|
|
158
|
+
SocketHelper.removeHandler("NotificationService-PM");
|
|
159
|
+
SocketHelper.removeHandler("NotificationService-Notification");
|
|
160
|
+
SocketHelper.removeHandler("NotificationService-MessageUpdate");
|
|
161
|
+
SocketHelper.removeHandler("NotificationService-Reconnect");
|
|
162
|
+
// Clear listeners
|
|
163
|
+
this.listeners = [];
|
|
164
|
+
// Reset state
|
|
165
|
+
this.counts = { notificationCount: 0, pmCount: 0 };
|
|
166
|
+
this.currentPersonId = null;
|
|
167
|
+
this.isInitialized = false;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Check if service is initialized
|
|
171
|
+
*/
|
|
172
|
+
isReady() {
|
|
173
|
+
return this.isInitialized && SocketHelper.isConnected();
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingURL=NotificationService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationService.js","sourceRoot":"","sources":["../../src/helpers/NotificationService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAwB,MAAM,qBAAqB,CAAC;AAOtE,MAAM,OAAO,mBAAmB;IAQ9B;QANQ,WAAM,GAAuB,EAAE,iBAAiB,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;QAClE,cAAS,GAAgD,EAAE,CAAC;QAC5D,kBAAa,GAAY,KAAK,CAAC;QAC/B,oBAAe,GAAkB,IAAI,CAAC;QACtC,gBAAW,GAAe,IAAI,CAAC;IAEhB,CAAC;IAExB,MAAM,CAAC,WAAW;QAChB,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,CAAC;YAClC,mBAAmB,CAAC,QAAQ,GAAG,IAAI,mBAAmB,EAAE,CAAC;QAC3D,CAAC;QACD,OAAO,mBAAmB,CAAC,QAAQ,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU,CAAC,OAA6B;QAC5C,IAAI,IAAI,CAAC,aAAa;YAAE,OAAO;QAE/B,IAAI,CAAC;YACH,oDAAoD;YACpD,IAAI,CAAC,eAAe,GAAG,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,IAAI,CAAC;Y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C;YACrB,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC/B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAC1B,CAAC;QAED,4BAA4B;QAC5B,YAAY,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC;QACrD,YAAY,CAAC,aAAa,CAAC,kCAAkC,CAAC,CAAC;QAC/D,YAAY,CAAC,aAAa,CAAC,mCAAmC,CAAC,CAAC;QAChE,YAAY,CAAC,aAAa,CAAC,+BAA+B,CAAC,CAAC;QAE5D,kBAAkB;QAClB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QAEpB,cAAc;QACd,IAAI,CAAC,MAAM,GAAG,EAAE,iBAAiB,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;QACnD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,aAAa,IAAI,YAAY,CAAC,WAAW,EAAE,CAAC;IAC1D,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/PersonHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"PersonHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/PersonHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAA2B,MAAM,qBAAqB,CAAC;AAGrG,qBAAa,YAAY;IAExB,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,eAAe;IAO1C,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM;IAUtC,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;WAKtE,cAAc,CAAC,QAAQ,EAAE,oBAAoB,EAAE,QAAQ,EAAE,oBAAoB,GAAG,OAAO;WAUvF,eAAe,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM;WAItD,iBAAiB,CAAC,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,oBAAoB,GAAG,oBAAoB;WAa/G,uBAAuB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO;CAOvE"}
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const CommonEnvironmentHelper_1 = require("./CommonEnvironmentHelper");
|
|
5
|
-
const Locale_1 = require("./Locale");
|
|
6
|
-
class PersonHelper {
|
|
1
|
+
import { CommonEnvironmentHelper } from "@churchapps/helpers";
|
|
2
|
+
import { Locale } from "./Locale";
|
|
3
|
+
export class PersonHelper {
|
|
7
4
|
static getPhotoUrl(person) {
|
|
8
5
|
if (!person?.photo)
|
|
9
6
|
return "/images/sample-profile.png";
|
|
10
7
|
else
|
|
11
8
|
return (person?.photo?.startsWith("data:image/png;base64,") || person.photo?.indexOf("://") > -1)
|
|
12
9
|
? person.photo
|
|
13
|
-
:
|
|
10
|
+
: CommonEnvironmentHelper.ContentRoot + person.photo;
|
|
14
11
|
}
|
|
15
12
|
static getAge(birthdate) {
|
|
16
13
|
if (birthdate !== undefined && birthdate !== null) {
|
|
17
14
|
let ageDifMs = Date.now() - new Date(birthdate).getTime();
|
|
18
15
|
let ageDate = new Date(ageDifMs);
|
|
19
16
|
let years = Math.abs(ageDate.getUTCFullYear() - 1970);
|
|
20
|
-
return years + " " +
|
|
17
|
+
return years + " " + Locale.label("person.years");
|
|
21
18
|
}
|
|
22
19
|
else
|
|
23
20
|
return "";
|
|
@@ -58,5 +55,4 @@ class PersonHelper {
|
|
|
58
55
|
return false;
|
|
59
56
|
}
|
|
60
57
|
}
|
|
61
|
-
exports.PersonHelper = PersonHelper;
|
|
62
58
|
//# sourceMappingURL=PersonHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonHelper.js","sourceRoot":"","sources":["../../src/helpers/PersonHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PersonHelper.js","sourceRoot":"","sources":["../../src/helpers/PersonHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACrG,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,OAAO,YAAY;IAExB,MAAM,CAAC,WAAW,CAAC,MAAuB;QACzC,IAAI,CAAC,MAAM,EAAE,KAAK;YAAE,OAAO,4BAA4B,CAAA;;YAClD,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,wBAAwB,CAAC,IAAI,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;gBACrG,CAAC,CAAC,MAAM,CAAC,KAAK;gBACd,CAAC,CAAC,uBAAuB,CAAC,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,SAAe;QAC5B,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;YACnD,IAAI,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC;YAC1D,IAAI,OAAO,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;YACjC,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,CAAC;YACtD,OAAO,KAAK,GAAG,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QACnD,CAAC;;YACI,OAAO,EAAE,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,cAAc,CA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EAAE,YAAY,CAAC,GAAG;SACrB,CAAA;QAED,OAAO,cAAc,CAAA;IACtB,CAAC;IAEM,MAAM,CAAC,uBAAuB,CAAC,MAAuB;QAC5D,MAAM,aAAa,GAAW,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC;QAC9E,IAAI,aAAa,KAAK,EAAE,EAAE,CAAC;YAC1B,OAAO,IAAI,CAAC;QACb,CAAC;QACD,OAAO,KAAK,CAAC;IACd,CAAC;CACD"}
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SlugHelper = void 0;
|
|
7
|
-
const slug_1 = __importDefault(require("slug"));
|
|
8
|
-
class SlugHelper {
|
|
1
|
+
import slug from "slug";
|
|
2
|
+
export class SlugHelper {
|
|
9
3
|
static slugifyString(string, type, removeCharacters) {
|
|
10
4
|
const charactersToRemove = removeCharacters ? removeCharacters : ["for", "and", "nor", "but", "or", "yet", "so", "the", "a", "an"];
|
|
11
5
|
const characStr = charactersToRemove.join("|");
|
|
12
6
|
if (type === "urlPath") {
|
|
13
|
-
|
|
7
|
+
slug.extend({ '/': '/' }); //To keep '/' in the url since it's a special character.
|
|
14
8
|
}
|
|
15
|
-
const initialSlug = (
|
|
9
|
+
const initialSlug = slug(string, { remove: new RegExp('\\b(' + characStr + ')\\b', 'gi') });
|
|
16
10
|
const verfiedSlug = this.numerifySlug(initialSlug);
|
|
17
11
|
return verfiedSlug;
|
|
18
12
|
}
|
|
@@ -36,5 +30,4 @@ class SlugHelper {
|
|
|
36
30
|
return initialString;
|
|
37
31
|
}
|
|
38
32
|
}
|
|
39
|
-
exports.SlugHelper = SlugHelper;
|
|
40
33
|
//# sourceMappingURL=SlugHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlugHelper.js","sourceRoot":"","sources":["../../src/helpers/SlugHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SlugHelper.js","sourceRoot":"","sources":["../../src/helpers/SlugHelper.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,OAAO,UAAU;IAErB,MAAM,CAAC,aAAa,CAAC,MAAc,EAAE,IAA2B,EAAE,gBAA2B;QAC3F,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;QACnI,MAAM,SAAS,GAAG,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/C,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,IAAI,CAAC,MAAM,CAAC,EAAC,GAAG,EAAE,GAAG,EAAC,CAAC,CAAC,CAAC,wDAAwD;QACnF,CAAC;QACD,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,MAAM,CAAC,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5F,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QACnD,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,qCAAqC;IACrC,MAAM,CAAC,YAAY,CAAC,IAAY;QAC9B,IAAI,aAAa,GAAG,IAAI,CAAC;QACzB,MAAM,KAAK,GAAG,mBAAmB,CAAC;QAClC,MAAM,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAEhD,IAAI,YAAY,EAAE,CAAC;YACjB,YAAY,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC5B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;gBAC3B,IAAI,WAAW,GAAG,IAAI,CAAC;gBACvB,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;oBACf,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;oBAC7B,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gBACzB,CAAC;gBACD,MAAM,cAAc,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;gBAChE,aAAa,GAAG,cAAc,CAAC;YACjC,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;CAEF"}
|
|
@@ -4,6 +4,10 @@ export declare class SocketHelper {
|
|
|
4
4
|
static socketId: string;
|
|
5
5
|
static actionHandlers: SocketActionHandlerInterface[];
|
|
6
6
|
private static personIdChurchId;
|
|
7
|
+
private static reconnectTimeout;
|
|
8
|
+
private static isCleanedUp;
|
|
9
|
+
private static maxReconnectAttempts;
|
|
10
|
+
private static reconnectAttempts;
|
|
7
11
|
static setPersonChurch: (pc: {
|
|
8
12
|
personId: string;
|
|
9
13
|
churchId: string;
|
|
@@ -11,6 +15,14 @@ export declare class SocketHelper {
|
|
|
11
15
|
static createAlertConnection: () => void;
|
|
12
16
|
static init: () => Promise<void>;
|
|
13
17
|
static addHandler: (action: string, id: string, handleMessage: (data: any) => void) => void;
|
|
18
|
+
static removeHandler: (id: string) => void;
|
|
19
|
+
static removeHandlersByAction: (action: string) => void;
|
|
20
|
+
static clearAllHandlers: () => void;
|
|
14
21
|
static handleMessage: (payload: SocketPayloadInterface) => void;
|
|
22
|
+
static cleanup: () => void;
|
|
23
|
+
static disconnect: () => void;
|
|
24
|
+
static isConnected: () => boolean;
|
|
25
|
+
static getConnectionState: () => string;
|
|
26
|
+
static setupGlobalCleanup: () => () => void;
|
|
15
27
|
}
|
|
16
28
|
//# sourceMappingURL=SocketHelper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocketHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/SocketHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,4BAA4B,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"SocketHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/SocketHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,4BAA4B,EAAE,sBAAsB,EAAwE,MAAM,qBAAqB,CAAC;AAEhN,qBAAa,YAAY;IACvB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC;IACzB,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,cAAc,EAAE,4BAA4B,EAAE,CAAM;IAC3D,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAkE;IACjG,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAuB;IACtD,OAAO,CAAC,MAAM,CAAC,WAAW,CAAkB;IAC5C,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAc;IACjD,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAa;IAE7C,MAAM,CAAC,eAAe,GAAI,IAAI;QAAC,QAAQ,EAAC,MAAM,CAAC;QAAC,QAAQ,EAAC,MAAM,CAAA;KAAC,UAK/D;IAED,MAAM,CAAC,qBAAqB,aAQ3B;IAED,MAAM,CAAC,IAAI,sBA0EV;IAED,MAAM,CAAC,UAAU,GAAI,QAAQ,MAAM,EAAE,IAAI,MAAM,EAAE,eAAe,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,UAOlF;IAED,MAAM,CAAC,aAAa,GAAI,IAAI,MAAM,UAEjC;IAED,MAAM,CAAC,sBAAsB,GAAI,QAAQ,MAAM,UAE9C;IAED,MAAM,CAAC,gBAAgB,aAEtB;IAED,MAAM,CAAC,aAAa,GAAI,SAAS,sBAAsB,UAqBtD;IAED,MAAM,CAAC,OAAO,aAwBb;IAED,MAAM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