@churchapps/apphelper 0.4.12 → 0.4.17
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.js +28 -65
- 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/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.js +12 -16
- 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 +0 -4
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +16 -52
- package/dist/components/index.js.map +1 -1
- package/dist/components/notes/AddNote.js +17 -53
- package/dist/components/notes/AddNote.js.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.js +21 -27
- 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.js +16 -20
- package/dist/components/wrapper/ChurchList.js.map +1 -1
- package/dist/components/wrapper/Drawers.js +5 -10
- package/dist/components/wrapper/Drawers.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.js +19 -56
- package/dist/components/wrapper/NewPrivateMessage.js.map +1 -1
- package/dist/components/wrapper/Notifications.js +19 -50
- package/dist/components/wrapper/Notifications.js.map +1 -1
- package/dist/components/wrapper/PrivateMessageDetails.js +5 -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 +26 -60
- package/dist/components/wrapper/PrivateMessages.js.map +1 -1
- package/dist/components/wrapper/SiteWrapper.d.ts.map +1 -1
- package/dist/components/wrapper/SiteWrapper.js +42 -42
- package/dist/components/wrapper/SiteWrapper.js.map +1 -1
- package/dist/components/wrapper/TabPanel.js +5 -8
- package/dist/components/wrapper/TabPanel.js.map +1 -1
- package/dist/components/wrapper/UserMenu.d.ts.map +1 -1
- package/dist/components/wrapper/UserMenu.js +35 -44
- package/dist/components/wrapper/UserMenu.js.map +1 -1
- package/dist/components/wrapper/index.js +7 -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/ApiHelper.js +3 -7
- package/dist/helpers/ApiHelper.js.map +1 -1
- package/dist/helpers/AppearanceHelper.js +1 -5
- package/dist/helpers/AppearanceHelper.js.map +1 -1
- package/dist/helpers/ArrayHelper.js +3 -7
- 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.js +5 -9
- 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.js +11 -18
- package/dist/helpers/Locale.js.map +1 -1
- 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 +157 -43
- 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 +7 -11
- 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 +5 -16
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +9 -54
- package/dist/helpers/index.js.map +1 -1
- package/dist/hooks/index.js +1 -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/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/package.json +6 -28
- package/src/components/ExportLink.tsx +12 -3
- package/src/components/FormCardPayment.tsx +2 -1
- package/src/components/ImageEditor.tsx +15 -12
- package/src/components/InputBox.tsx +2 -1
- package/src/components/Loading.tsx +47 -1
- package/src/components/SupportModal.tsx +8 -3
- package/src/components/header/PrimaryMenu.tsx +85 -42
- package/src/components/index.tsx +0 -5
- package/src/components/wrapper/AppList.tsx +1 -4
- package/src/components/wrapper/Notifications.tsx +2 -2
- package/src/components/wrapper/PrivateMessages.tsx +10 -1
- package/src/components/wrapper/SiteWrapper.tsx +24 -13
- package/src/components/wrapper/UserMenu.tsx +1 -4
- package/src/helpers/AnalyticsHelper.ts +1 -2
- package/src/helpers/Locale.ts +1 -1
- package/src/helpers/PersonHelper.ts +1 -2
- package/src/helpers/SocketHelper.ts +176 -37
- package/src/helpers/index.ts +44 -16
- 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/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/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/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/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,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import type {LexicalEditor} from 'lexical';
|
|
10
|
-
import 'material-symbols';
|
|
11
|
-
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
|
|
12
|
-
import {$createTextNode, TextNode} from 'lexical';
|
|
13
|
-
import {useEffect} from 'react';
|
|
14
|
-
import materialIcons from '../../IconNamesList';
|
|
15
|
-
|
|
16
|
-
import {$createEmojiNode, EmojiNode} from './EmojiNode';
|
|
17
|
-
import { EMOJI_NODE_MARKDOWN_REGEX } from './EmojiNodeTransform';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function useEmojis(editor: LexicalEditor): void {
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
if (!editor.hasNodes([EmojiNode, TextNode])) {
|
|
23
|
-
throw new Error('EmojisPlugin: EmojiNode not registered on editor');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (!materialIcons || !Array.isArray(materialIcons)) {
|
|
27
|
-
return;
|
|
28
|
-
// throw new Error('EmojisPlugin: materialIcons not properly loaded');
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return editor.registerNodeTransform(TextNode, (textNode) => {
|
|
32
|
-
if (EMOJI_NODE_MARKDOWN_REGEX.test(textNode.getTextContent()) || materialIcons.map((materialIcon : string) => ':' + materialIcon + ':').some((materialIcon : string) => textNode.getTextContent().includes(materialIcon))) {
|
|
33
|
-
|
|
34
|
-
const materialIconToInsert = materialIcons.find((materialIcon : string) => textNode.getTextContent().replaceAll(':', '').includes(materialIcon));
|
|
35
|
-
|
|
36
|
-
if (!materialIconToInsert) return;
|
|
37
|
-
|
|
38
|
-
const initialTextInput = textNode.getTextContent();
|
|
39
|
-
const emojiNode = $createEmojiNode(materialIconToInsert);
|
|
40
|
-
|
|
41
|
-
const leftoverTextNodes : Array<TextNode> = [];
|
|
42
|
-
|
|
43
|
-
initialTextInput?.split(':').forEach((leftoverTextString : string, index : number) => {
|
|
44
|
-
if (materialIcons.includes(leftoverTextString)) {
|
|
45
|
-
const emojiNode = $createEmojiNode(leftoverTextString);
|
|
46
|
-
|
|
47
|
-
leftoverTextNodes.push(emojiNode);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
leftoverTextNodes.push($createTextNode(leftoverTextString));
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
textNode.setTextContent('');
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
textNode.getParent().splice(textNode.getIndexWithinParent(), 1, leftoverTextNodes);
|
|
57
|
-
|
|
58
|
-
(leftoverTextNodes.find((node : TextNode) => materialIcons.includes(node.__text)) || leftoverTextNodes[leftoverTextNodes.length - 1]).select();
|
|
59
|
-
|
|
60
|
-
textNode.remove();
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}, [editor]);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export default function EmojisPlugin(): React.ReactElement | null {
|
|
67
|
-
const [editor] = useLexicalComposerContext();
|
|
68
|
-
useEmojis(editor);
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { ToolbarPlugin } from "./ToolbarPlugin";
|
|
2
|
-
export { CustomAutoLinkPlugin } from "./AutoLinkPlugin";
|
|
3
|
-
export { ListMaxIndentLevelPlugin } from "./ListMaxIndentLevelPlugin";
|
|
4
|
-
export { PLAYGROUND_TRANSFORMERS } from "./MarkdownTransformers";
|
|
5
|
-
export { ReadOnlyPlugin } from "./ReadOnlyPlugin";
|
|
6
|
-
export { ControlledEditorPlugin } from "./ControlledEditorPlugin";
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
export const theme = {
|
|
2
|
-
placeholder: "editor-placeholder",
|
|
3
|
-
paragraph: "editor-paragraph",
|
|
4
|
-
quote: "editor-quote",
|
|
5
|
-
heading: {
|
|
6
|
-
h1: "editor-heading-h1",
|
|
7
|
-
h2: "editor-heading-h2",
|
|
8
|
-
h3: "editor-heading-h3",
|
|
9
|
-
h4: "editor-heading-h4",
|
|
10
|
-
h5: "editor-heading-h5"
|
|
11
|
-
},
|
|
12
|
-
list: {
|
|
13
|
-
nested: {
|
|
14
|
-
listitem: "editor-nested-listitem"
|
|
15
|
-
},
|
|
16
|
-
ol: "editor-list-ol",
|
|
17
|
-
ul: "editor-list-ul",
|
|
18
|
-
listitem: "editor-listitem"
|
|
19
|
-
},
|
|
20
|
-
image: "editor-image",
|
|
21
|
-
link: "editor-link",
|
|
22
|
-
text: {
|
|
23
|
-
bold: "editor-text-bold",
|
|
24
|
-
italic: "editor-text-italic",
|
|
25
|
-
overflowed: "editor-text-overflowed",
|
|
26
|
-
hashtag: "editor-text-hashtag",
|
|
27
|
-
underline: "editor-text-underline",
|
|
28
|
-
strikethrough: "editor-text-strikethrough",
|
|
29
|
-
underlineStrikethrough: "editor-text-underlineStrikethrough",
|
|
30
|
-
code: "editor-text-code"
|
|
31
|
-
},
|
|
32
|
-
code: "editor-code",
|
|
33
|
-
codeHighlight: {
|
|
34
|
-
atrule: "editor-tokenAttr",
|
|
35
|
-
attr: "editor-tokenAttr",
|
|
36
|
-
boolean: "editor-tokenProperty",
|
|
37
|
-
builtin: "editor-tokenSelector",
|
|
38
|
-
cdata: "editor-tokenComment",
|
|
39
|
-
char: "editor-tokenSelector",
|
|
40
|
-
class: "editor-tokenFunction",
|
|
41
|
-
"class-name": "editor-tokenFunction",
|
|
42
|
-
comment: "editor-tokenComment",
|
|
43
|
-
constant: "editor-tokenProperty",
|
|
44
|
-
deleted: "editor-tokenProperty",
|
|
45
|
-
doctype: "editor-tokenComment",
|
|
46
|
-
entity: "editor-tokenOperator",
|
|
47
|
-
function: "editor-tokenFunction",
|
|
48
|
-
important: "editor-tokenVariable",
|
|
49
|
-
inserted: "editor-tokenSelector",
|
|
50
|
-
keyword: "editor-tokenAttr",
|
|
51
|
-
namespace: "editor-tokenVariable",
|
|
52
|
-
number: "editor-tokenProperty",
|
|
53
|
-
operator: "editor-tokenOperator",
|
|
54
|
-
prolog: "editor-tokenComment",
|
|
55
|
-
property: "editor-tokenProperty",
|
|
56
|
-
punctuation: "editor-tokenPunctuation",
|
|
57
|
-
regex: "editor-tokenVariable",
|
|
58
|
-
selector: "editor-tokenSelector",
|
|
59
|
-
string: "editor-tokenSelector",
|
|
60
|
-
symbol: "editor-tokenProperty",
|
|
61
|
-
tag: "editor-tokenProperty",
|
|
62
|
-
url: "editor-tokenOperator",
|
|
63
|
-
variable: "editor-tokenVariable"
|
|
64
|
-
}
|
|
65
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Chart } from "react-google-charts";
|
|
5
|
-
import { ReportOutputInterface, ReportResultInterface } from "@churchapps/helpers";
|
|
6
|
-
import { ReportHelper } from "../../helpers/ReportHelper";
|
|
7
|
-
import { Locale } from "../../helpers";
|
|
8
|
-
|
|
9
|
-
interface Props { reportResult: ReportResultInterface, output: ReportOutputInterface }
|
|
10
|
-
|
|
11
|
-
export const ChartReport = (props: Props) => {
|
|
12
|
-
let rows: any = [];
|
|
13
|
-
|
|
14
|
-
const getChartData = () => {
|
|
15
|
-
if (props.output.columns.length === 2) return getSingleData();
|
|
16
|
-
else return getMultiData();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const getHeaders = () => {
|
|
20
|
-
const result: string[] = [];
|
|
21
|
-
const uniqueValues: string[] = [];
|
|
22
|
-
|
|
23
|
-
props.reportResult.table.forEach(d => {
|
|
24
|
-
const val = ReportHelper.getField(props.output.columns[1], d);
|
|
25
|
-
if (uniqueValues.indexOf(val) === -1) uniqueValues.push(val);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
result.push(props.output.columns[0].header);
|
|
29
|
-
uniqueValues.forEach(v => result.push(v));
|
|
30
|
-
|
|
31
|
-
return result;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const getHeaderIndex = (headers: string[], header: string) => {
|
|
35
|
-
let result = -1;
|
|
36
|
-
let i = 0;
|
|
37
|
-
headers.forEach(h => {
|
|
38
|
-
if (h === header) result = i;
|
|
39
|
-
i++;
|
|
40
|
-
})
|
|
41
|
-
return result;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const transformData = (headers: string[]) => {
|
|
45
|
-
const result: any[] = [];
|
|
46
|
-
props.reportResult.table.forEach(d => {
|
|
47
|
-
const firstVal = ReportHelper.getField(props.output.columns[0], d);
|
|
48
|
-
const secondVal = ReportHelper.getField(props.output.columns[1], d);
|
|
49
|
-
const headerIndex = getHeaderIndex(headers, secondVal);
|
|
50
|
-
|
|
51
|
-
let row: any[] = []
|
|
52
|
-
if (result.length === 0 || firstVal !== result[result.length - 1][0]) {
|
|
53
|
-
row[0] = firstVal;
|
|
54
|
-
for (let i = 1; i < headers.length; i++) row[i] = 0;
|
|
55
|
-
result.push(row);
|
|
56
|
-
} else row = result[result.length - 1];
|
|
57
|
-
|
|
58
|
-
row[headerIndex] = parseFloat(d[props.output.columns[2].value]);
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
return result;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const getMultiData = () => {
|
|
65
|
-
const headers = getHeaders();
|
|
66
|
-
rows = [];
|
|
67
|
-
rows.push(headers);
|
|
68
|
-
transformData(headers).forEach(d => {
|
|
69
|
-
rows.push(d);
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
return rows;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
const getSingleData = () => {
|
|
76
|
-
rows = [];
|
|
77
|
-
rows.push([props.output.columns[0].header, props.output.columns[1].header]);
|
|
78
|
-
props.reportResult.table.forEach(d => {
|
|
79
|
-
rows.push([ReportHelper.getField(props.output.columns[0], d), parseFloat(ReportHelper.getField(props.output.columns[1], d))])
|
|
80
|
-
});
|
|
81
|
-
return rows;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
let result = <p>{Locale.label("reporting.noData")}</p>
|
|
85
|
-
if (props.reportResult.table?.length > 0) result = (<Chart chartType="ColumnChart" data={getChartData()} width="100%" height="400px" options={{ height: 400, legend: { position: "top", maxLines: 3 }, bar: { groupWidth: "75%" }, isStacked: true }} />);
|
|
86
|
-
|
|
87
|
-
return result;
|
|
88
|
-
|
|
89
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { ReportInterface, ParameterInterface } from "@churchapps/helpers";
|
|
5
|
-
import { ArrayHelper, Locale } from "../../helpers"
|
|
6
|
-
import { InputBox } from "../"
|
|
7
|
-
import { ReportFilterField } from "./ReportFilterField";
|
|
8
|
-
|
|
9
|
-
interface Props { report: ReportInterface, onChange: (report: ReportInterface) => void, onRun: () => void }
|
|
10
|
-
|
|
11
|
-
export const ReportFilter = (props: Props) => {
|
|
12
|
-
|
|
13
|
-
const handleChange = (parameter: ParameterInterface, permittedChildIds: string[]) => {
|
|
14
|
-
const r = { ...props.report };
|
|
15
|
-
const p: ParameterInterface = ArrayHelper.getOne(r.parameters, "keyName", parameter.keyName);
|
|
16
|
-
p.value = parameter.value;
|
|
17
|
-
updateChildIds(r, p, permittedChildIds)
|
|
18
|
-
props.onChange(r);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const updateChildIds = (report: ReportInterface, parameter: ParameterInterface, permittedChildIds: string[]) => {
|
|
22
|
-
switch (parameter.sourceKey) {
|
|
23
|
-
case "campus":
|
|
24
|
-
setRequiredParentIds(report, "service", permittedChildIds);
|
|
25
|
-
break;
|
|
26
|
-
case "service":
|
|
27
|
-
setRequiredParentIds(report, "serviceTime", permittedChildIds);
|
|
28
|
-
break;
|
|
29
|
-
case "serviceTime":
|
|
30
|
-
setRequiredParentIds(report, "group", permittedChildIds);
|
|
31
|
-
break;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const setRequiredParentIds = (report: ReportInterface, childSourceKey: string, requiredParentIds: string[]) => {
|
|
36
|
-
const child: ParameterInterface = ArrayHelper.getOne(report.parameters, "sourceKey", childSourceKey);
|
|
37
|
-
if (child) child.requiredParentIds = requiredParentIds;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const getInputs = () => {
|
|
41
|
-
const result: React.ReactElement[] = [];
|
|
42
|
-
props.report.parameters.forEach((p, i) => {
|
|
43
|
-
if (p.source === "dropdown" || p.source === "date") {
|
|
44
|
-
result.push(<ReportFilterField key={i} parameter={p} report={props.report} onChange={handleChange} />)
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
return result;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const inputs = getInputs();
|
|
51
|
-
if (inputs.length > 0) {
|
|
52
|
-
return <InputBox id="formSubmissionBox" headerText="Filter Report" headerIcon="summarize" saveFunction={props.onRun} saveText={Locale.label("reporting.runReport")}>
|
|
53
|
-
{inputs}
|
|
54
|
-
</InputBox>
|
|
55
|
-
} else return <> </>
|
|
56
|
-
}
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { ReportInterface, ParameterInterface } from "@churchapps/helpers";
|
|
5
|
-
import { ApiHelper, ArrayHelper, DateHelper, Locale } from "../../helpers";
|
|
6
|
-
import { FormControl, InputLabel, Select, SelectChangeEvent, TextField, MenuItem } from "@mui/material";
|
|
7
|
-
import { useMountedState } from "../../hooks/useMountedState";
|
|
8
|
-
|
|
9
|
-
interface Props {
|
|
10
|
-
parameter: ParameterInterface,
|
|
11
|
-
report: ReportInterface,
|
|
12
|
-
onChange: (parameter: ParameterInterface, permittedChildIds: string[]) => void
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const ReportFilterField = (props: Props) => {
|
|
16
|
-
|
|
17
|
-
const [rawData, setRawData] = React.useState<any[]>(null);
|
|
18
|
-
const [secondaryData, setSecondaryData] = React.useState<any[]>(null);
|
|
19
|
-
const isMounted = useMountedState();
|
|
20
|
-
|
|
21
|
-
const init = async () => {
|
|
22
|
-
switch (props.parameter.sourceKey) {
|
|
23
|
-
case "provided":
|
|
24
|
-
setRawData(props.parameter.options);
|
|
25
|
-
break;
|
|
26
|
-
case "month":
|
|
27
|
-
setRawData(getMonths());
|
|
28
|
-
break;
|
|
29
|
-
case "campus":
|
|
30
|
-
ApiHelper.get("/campuses", "AttendanceApi").then(data => { data.unshift({ id: "", name: "Any" });
|
|
31
|
-
if(isMounted()) {
|
|
32
|
-
setRawData(data);
|
|
33
|
-
}})
|
|
34
|
-
break;
|
|
35
|
-
case "service":
|
|
36
|
-
ApiHelper.get("/services", "AttendanceApi").then(data => { data.unshift({ id: "", name: "Any" });
|
|
37
|
-
if(isMounted()) {
|
|
38
|
-
setRawData(data);
|
|
39
|
-
}})
|
|
40
|
-
break;
|
|
41
|
-
case "serviceTime":
|
|
42
|
-
ApiHelper.get("/serviceTimes", "AttendanceApi").then(data => { data.unshift({ id: "", name: "Any" });
|
|
43
|
-
if(isMounted()) {
|
|
44
|
-
setRawData(data);
|
|
45
|
-
}})
|
|
46
|
-
break;
|
|
47
|
-
case "group":
|
|
48
|
-
ApiHelper.get("/groups", "MembershipApi").then(data => { data.unshift({ id: "", name: "Any" });
|
|
49
|
-
if(isMounted()) {
|
|
50
|
-
setRawData(data);
|
|
51
|
-
}})
|
|
52
|
-
ApiHelper.get("/groupServiceTimes", "AttendanceApi").then(data => {
|
|
53
|
-
if(isMounted()) {
|
|
54
|
-
setSecondaryData(data);
|
|
55
|
-
}})
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
setDefaultValue();
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const setDefaultValue = () => {
|
|
62
|
-
switch (props.parameter.source) {
|
|
63
|
-
case "date":
|
|
64
|
-
if (props.parameter.defaultValue) {
|
|
65
|
-
let dt = new Date();
|
|
66
|
-
if (props.parameter.defaultValue === "yesterday") dt.setDate(dt.getDate() - 1);
|
|
67
|
-
if (props.parameter.defaultValue === "lastYear") dt.setFullYear(dt.getFullYear() - 1);
|
|
68
|
-
if (props.parameter.defaultValue === "lastSunday") dt = DateHelper.getLastSunday();
|
|
69
|
-
const p = { ...props.parameter };
|
|
70
|
-
p.value = DateHelper.formatHtml5Date(dt);
|
|
71
|
-
props.onChange(p, []);
|
|
72
|
-
}
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const getMonths = () => {
|
|
78
|
-
const list = [Locale.label("month.january"), Locale.label("month.february"), Locale.label("month.march"), Locale.label("month.april"), Locale.label("month.may"), Locale.label("month.june"), Locale.label("month.july"), Locale.label("month.august"), Locale.label("month.september"), Locale.label("month.october"), Locale.label("month.november"), Locale.label("month.december")]
|
|
79
|
-
|
|
80
|
-
const result = [];
|
|
81
|
-
for (let i = 0; i < list.length; i++) result.push({ value: (i + 1).toString(), text: list[i] });
|
|
82
|
-
return result;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const getIdName = () => {
|
|
86
|
-
const result: { value: string, text: string }[] = [];
|
|
87
|
-
filterOptions().forEach(d => { result.push({ value: d.id, text: d.name }); });
|
|
88
|
-
return result;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const filterOptions = () => {
|
|
92
|
-
let result = rawData;
|
|
93
|
-
if (props.parameter.requiredParentIds?.length > 0) {
|
|
94
|
-
switch (props.parameter.sourceKey) {
|
|
95
|
-
case "service":
|
|
96
|
-
result = ArrayHelper.getAllArray(rawData, "campusId", props.parameter.requiredParentIds);
|
|
97
|
-
result.unshift({ id: "", name: "Any" });
|
|
98
|
-
break;
|
|
99
|
-
case "serviceTime":
|
|
100
|
-
result = ArrayHelper.getAllArray(rawData, "serviceId", props.parameter.requiredParentIds);
|
|
101
|
-
result.unshift({ id: "", name: "Any" });
|
|
102
|
-
break;
|
|
103
|
-
case "group":
|
|
104
|
-
const times = ArrayHelper.getAllArray(secondaryData, "serviceTimeId", props.parameter.requiredParentIds)
|
|
105
|
-
result = ArrayHelper.getAllArray(rawData, "id", ArrayHelper.getUniqueValues(times, "groupId"));
|
|
106
|
-
result.unshift({ id: "", name: "Any" });
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return result;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const getOptions = () => {
|
|
114
|
-
let options: { value: string, text: string }[] = []
|
|
115
|
-
if (rawData) {
|
|
116
|
-
switch (props.parameter.sourceKey) {
|
|
117
|
-
case "campus":
|
|
118
|
-
case "service":
|
|
119
|
-
case "serviceTime":
|
|
120
|
-
case "group":
|
|
121
|
-
options = getIdName();
|
|
122
|
-
break;
|
|
123
|
-
case "month":
|
|
124
|
-
case "provided":
|
|
125
|
-
options = rawData;
|
|
126
|
-
break;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return options;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const options = getOptions();
|
|
134
|
-
|
|
135
|
-
const handleChange = (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement> | SelectChangeEvent<string>) => {
|
|
136
|
-
const p = { ...props.parameter };
|
|
137
|
-
p.value = e.target.value;
|
|
138
|
-
let parentIds = [];
|
|
139
|
-
if (p.value) parentIds.push(p.value);
|
|
140
|
-
props.onChange(p, parentIds);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
React.useEffect(() => { init() }, [props.parameter.keyName, isMounted]); //eslint-disable-line
|
|
144
|
-
|
|
145
|
-
let result = <></>
|
|
146
|
-
switch (props.parameter.source) {
|
|
147
|
-
case "dropdown":
|
|
148
|
-
result = (
|
|
149
|
-
<FormControl fullWidth>
|
|
150
|
-
<InputLabel>{props.parameter.displayName}</InputLabel>
|
|
151
|
-
<Select value={options.find(v => v.value === props.parameter.value)?.value || ""} label={props.parameter.displayName} onChange={handleChange} name={props.parameter.keyName}>
|
|
152
|
-
{options.map((o,i) => <MenuItem key={i} value={o.value}>{o.text}</MenuItem>)}
|
|
153
|
-
</Select>
|
|
154
|
-
</FormControl>
|
|
155
|
-
);
|
|
156
|
-
break;
|
|
157
|
-
case "date":
|
|
158
|
-
result = (<TextField type="date" fullWidth InputLabelProps={{shrink: true}} label={Locale.label("common.date")} value={props.parameter.value || ""} onChange={handleChange} name={props.parameter.keyName} />)
|
|
159
|
-
break;
|
|
160
|
-
}
|
|
161
|
-
return result;
|
|
162
|
-
|
|
163
|
-
}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React, { useRef } from "react";
|
|
4
|
-
import { ArrayHelper, PersonInterface, ReportInterface, ReportResultInterface } from "@churchapps/helpers";
|
|
5
|
-
import { DisplayBox, ExportLink, Loading } from "../"
|
|
6
|
-
import { ApiHelper, Locale } from "../../helpers"
|
|
7
|
-
import { useReactToPrint } from "react-to-print";
|
|
8
|
-
import { TableReport } from "./TableReport";
|
|
9
|
-
import { ChartReport } from "./ChartReport";
|
|
10
|
-
import { TreeReport } from "./TreeReport";
|
|
11
|
-
import { Button, Icon, Menu, MenuItem } from "@mui/material";
|
|
12
|
-
import { useMountedState } from "../../hooks/useMountedState";
|
|
13
|
-
import { Link } from "react-router-dom";
|
|
14
|
-
|
|
15
|
-
interface Props { keyName: string, report: ReportInterface }
|
|
16
|
-
|
|
17
|
-
export const ReportOutput = (props: Props) => {
|
|
18
|
-
const [reportResult, setReportResult] = React.useState<ReportResultInterface>(null);
|
|
19
|
-
const [detailedPersonSummary, setDetailedPersonSummary] = React.useState<any[]>(null);
|
|
20
|
-
const [customHeaders, setCustomHeaders] = React.useState([]);
|
|
21
|
-
const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);
|
|
22
|
-
const [downloadData, setDownloadData] = React.useState<ReportResultInterface>(null);
|
|
23
|
-
const open = Boolean(anchorEl);
|
|
24
|
-
const contentRef = useRef<HTMLDivElement>(null);
|
|
25
|
-
const isMounted = useMountedState();
|
|
26
|
-
|
|
27
|
-
const handlePrint = useReactToPrint({
|
|
28
|
-
contentRef
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
const populatePeople = async (data: any[]) => {
|
|
32
|
-
let result: any[] = [];
|
|
33
|
-
let headers: { label: string, key: string }[] = [];
|
|
34
|
-
const peopleIds = ArrayHelper.getIds(data, "personId");
|
|
35
|
-
if (peopleIds.length > 0) {
|
|
36
|
-
const people = await ApiHelper.get("/people/ids?ids=" + peopleIds.join(","), "MembershipApi");
|
|
37
|
-
const filteredData = data.filter((d) => d.personId !== null);
|
|
38
|
-
filteredData.forEach((d) => {
|
|
39
|
-
const person: PersonInterface = ArrayHelper.getOne(people, "id", d.personId);
|
|
40
|
-
const funds = Object.assign({}, ...d.funds);
|
|
41
|
-
const obj = {
|
|
42
|
-
firstName: person.name.first,
|
|
43
|
-
lastName: person.name.last,
|
|
44
|
-
email: person.contactInfo?.email,
|
|
45
|
-
address: person.contactInfo.address1 + (person.contactInfo.address2 ? `, ${person.contactInfo.address2}` : ""),
|
|
46
|
-
city: person.contactInfo.city,
|
|
47
|
-
state: person.contactInfo.state,
|
|
48
|
-
zip: person.contactInfo.zip,
|
|
49
|
-
totalDonation: d.totalAmount,
|
|
50
|
-
...funds
|
|
51
|
-
};
|
|
52
|
-
result.push(obj);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
//for anonymous donations
|
|
57
|
-
const anonDonations = ArrayHelper.getOne(data, "personId", null);
|
|
58
|
-
if (anonDonations) {
|
|
59
|
-
const funds = Object.assign({}, ...anonDonations.funds);
|
|
60
|
-
const obj = {
|
|
61
|
-
firstName: "Anonymous",
|
|
62
|
-
totalDonation: anonDonations.totalAmount,
|
|
63
|
-
...funds
|
|
64
|
-
}
|
|
65
|
-
result.push(obj);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Collect all unique keys across all objects
|
|
69
|
-
const allKeys = new Set<string>();
|
|
70
|
-
result.forEach(obj => {
|
|
71
|
-
Object.keys(obj).forEach(key => allKeys.add(key));
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
// Create headers for all unique keys
|
|
75
|
-
allKeys.forEach(key => headers.push({ label: key, key: key }));
|
|
76
|
-
|
|
77
|
-
setCustomHeaders(headers);
|
|
78
|
-
setDetailedPersonSummary(result);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const runReport = () => {
|
|
82
|
-
if (props.report) {
|
|
83
|
-
const queryParams: string[] = [];
|
|
84
|
-
props.report.parameters.forEach(p => {
|
|
85
|
-
if (p.value) queryParams.push(p.keyName + "=" + p.value);
|
|
86
|
-
});
|
|
87
|
-
let url = "/reports/" + props.report.keyName + "/run";
|
|
88
|
-
if (queryParams) url += "?" + queryParams.join("&");
|
|
89
|
-
|
|
90
|
-
ApiHelper.get(url, "ReportingApi").then((data: ReportResultInterface) => {
|
|
91
|
-
if (isMounted()) {
|
|
92
|
-
setReportResult(data);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
const donationUrl = "/donations/summary?type=person&" + queryParams.join("&");
|
|
97
|
-
ApiHelper.get(donationUrl, "GivingApi").then((data) => { populatePeople(data); });
|
|
98
|
-
|
|
99
|
-
if (props.keyName === "groupAttendance") {
|
|
100
|
-
let url = "/reports/groupAttendanceDownload/run";
|
|
101
|
-
if (queryParams) url += "?" + queryParams.join("&");
|
|
102
|
-
ApiHelper.get(url, "ReportingApi").then((data: ReportResultInterface) => {
|
|
103
|
-
setDownloadData(data);
|
|
104
|
-
})
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const getExportMenu = (key: number) => {
|
|
110
|
-
const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {
|
|
111
|
-
setAnchorEl(event.currentTarget);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
const handleClose = () => {
|
|
115
|
-
setAnchorEl(null);
|
|
116
|
-
}
|
|
117
|
-
return (<>
|
|
118
|
-
<Button size="small" title={Locale.label("reporting.downloadOptions")} onClick={handleClick} key={key}><Icon>download</Icon></Button>
|
|
119
|
-
<Menu anchorEl={anchorEl} open={open} onClose={handleClose}>
|
|
120
|
-
{reportResult?.table?.length > 0 && <MenuItem sx={{ padding: "5px" }} onClick={handleClose}><ExportLink data={props.keyName === "groupAttendance" ? downloadData?.table : reportResult.table} filename={props.report.displayName.replace(" ", "_") + ".csv"} text={Locale.label("reporting.summary")} icon={props.keyName === "attendanceTrend" ? "calendar_month" : "volunteer_activism"} /></MenuItem>}
|
|
121
|
-
{(props.keyName === "donationSummary" && detailedPersonSummary?.length > 0) && <MenuItem sx={{ padding: "5px" }} onClick={handleClose}><ExportLink data={detailedPersonSummary} filename="Detailed_Donation_Summary.csv" text={Locale.label("reporting.detailed")} icon="person" customHeaders={customHeaders} spaceAfter={true} /></MenuItem>}
|
|
122
|
-
{(props.keyName === "donationSummary" && detailedPersonSummary?.length > 0) && <MenuItem sx={{ padding: "5px" }} onClick={handleClose}><Button onClick={() => { window.open("/downloads/DonationTemplate.docx") }}><Icon sx={{ marginRight: 1 }}>description</Icon>{Locale.label("reporting.sampleTemplate")}</Button></MenuItem>}
|
|
123
|
-
</Menu>
|
|
124
|
-
</>)
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
React.useEffect(runReport, [props.report, isMounted]);
|
|
128
|
-
|
|
129
|
-
const getEditContent = () => {
|
|
130
|
-
const result: React.ReactElement[] = [];
|
|
131
|
-
|
|
132
|
-
if (reportResult) {
|
|
133
|
-
result.push(<button type="button" className="no-default-style" key={result.length - 2} onClick={handlePrint} title="print"><Icon>print</Icon></button>);
|
|
134
|
-
}
|
|
135
|
-
if (reportResult?.table.length > 0 || detailedPersonSummary?.length > 0) {
|
|
136
|
-
result.push(getExportMenu(result.length - 1))
|
|
137
|
-
}
|
|
138
|
-
return result;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const getOutputs = () => {
|
|
142
|
-
const result: React.ReactElement[] = [];
|
|
143
|
-
reportResult.outputs.forEach(o => {
|
|
144
|
-
if (o.outputType === "table") result.push(<TableReport key={o.outputType} reportResult={reportResult} output={o} />)
|
|
145
|
-
if (o.outputType === "tree") result.push(<TreeReport key={o.outputType} reportResult={reportResult} output={o} />)
|
|
146
|
-
else if (o.outputType === "barChart") result.push(<ChartReport key={o.outputType} reportResult={reportResult} output={o} />)
|
|
147
|
-
})
|
|
148
|
-
|
|
149
|
-
return result;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
const getResults = () => {
|
|
153
|
-
if (!props.report) return (<DisplayBox ref={contentRef} id="reportsBox" headerIcon="summarize" headerText={Locale.label("reporting.runReport")} editContent={getEditContent()}><p>{Locale.label("reporting.useFilter")}</p></DisplayBox>);
|
|
154
|
-
|
|
155
|
-
else if (!reportResult) return <Loading />
|
|
156
|
-
else {
|
|
157
|
-
return (<DisplayBox ref={contentRef} id="reportsBox" headerIcon="summarize" headerText={props.report.displayName} editContent={getEditContent()}>
|
|
158
|
-
{getOutputs()}
|
|
159
|
-
</DisplayBox>);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
return (
|
|
164
|
-
<>
|
|
165
|
-
{getResults()}
|
|
166
|
-
</>
|
|
167
|
-
);
|
|
168
|
-
}
|