@axelor/aos-mobile-core 0.0.1
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/README.md +310 -0
- package/lib/api/attached-files-api.d.ts +8 -0
- package/lib/api/attached-files-api.js +51 -0
- package/lib/api/attached-files-api.js.map +1 -0
- package/lib/api/login-api.d.ts +5 -0
- package/lib/api/login-api.js +41 -0
- package/lib/api/login-api.js.map +1 -0
- package/lib/api/mail-message-api.d.ts +43 -0
- package/lib/api/mail-message-api.js +114 -0
- package/lib/api/mail-message-api.js.map +1 -0
- package/lib/api/menu-config-api.d.ts +5 -0
- package/lib/api/menu-config-api.js +68 -0
- package/lib/api/menu-config-api.js.map +1 -0
- package/lib/api/metafile-api.d.ts +6 -0
- package/lib/api/metafile-api.js +50 -0
- package/lib/api/metafile-api.js.map +1 -0
- package/lib/api/mobile-config-api.d.ts +1 -0
- package/lib/api/mobile-config-api.js +31 -0
- package/lib/api/mobile-config-api.js.map +1 -0
- package/lib/api/net-info-utils.d.ts +5 -0
- package/lib/api/net-info-utils.js +29 -0
- package/lib/api/net-info-utils.js.map +1 -0
- package/lib/api/traceback-api.d.ts +7 -0
- package/lib/api/traceback-api.js +35 -0
- package/lib/api/traceback-api.js.map +1 -0
- package/lib/api/utils.d.ts +25 -0
- package/lib/api/utils.js +92 -0
- package/lib/api/utils.js.map +1 -0
- package/lib/app/Application.d.ts +15 -0
- package/lib/app/Application.js +29 -0
- package/lib/app/Application.js.map +1 -0
- package/lib/app/ContextedApplication.d.ts +9 -0
- package/lib/app/ContextedApplication.js +80 -0
- package/lib/app/ContextedApplication.js.map +1 -0
- package/lib/app/ContextsProvider.d.ts +14 -0
- package/lib/app/ContextsProvider.js +63 -0
- package/lib/app/ContextsProvider.js.map +1 -0
- package/lib/app/Module.d.ts +26 -0
- package/lib/app/Module.js +19 -0
- package/lib/app/Module.js.map +1 -0
- package/lib/app/RootNavigator.d.ts +7 -0
- package/lib/app/RootNavigator.js +69 -0
- package/lib/app/RootNavigator.js.map +1 -0
- package/lib/app/index.d.ts +5 -0
- package/lib/app/index.js +22 -0
- package/lib/app/index.js.map +1 -0
- package/lib/assets/Logo_Axelor.png +0 -0
- package/lib/auth/api/company-api.d.ts +1 -0
- package/lib/auth/api/company-api.js +31 -0
- package/lib/auth/api/company-api.js.map +1 -0
- package/lib/auth/api/config-api.d.ts +2 -0
- package/lib/auth/api/config-api.js +45 -0
- package/lib/auth/api/config-api.js.map +1 -0
- package/lib/auth/api/index.d.ts +4 -0
- package/lib/auth/api/index.js +22 -0
- package/lib/auth/api/index.js.map +1 -0
- package/lib/auth/api/language-api.d.ts +1 -0
- package/lib/auth/api/language-api.js +24 -0
- package/lib/auth/api/language-api.js.map +1 -0
- package/lib/auth/api/user-api.d.ts +2 -0
- package/lib/auth/api/user-api.js +30 -0
- package/lib/auth/api/user-api.js.map +1 -0
- package/lib/auth/features/asyncFunctionsIndex.d.ts +4 -0
- package/lib/auth/features/asyncFunctionsIndex.js +22 -0
- package/lib/auth/features/asyncFunctionsIndex.js.map +1 -0
- package/lib/auth/features/companySlice.d.ts +14 -0
- package/lib/auth/features/companySlice.js +48 -0
- package/lib/auth/features/companySlice.js.map +1 -0
- package/lib/auth/features/configSlice.d.ts +37 -0
- package/lib/auth/features/configSlice.js +82 -0
- package/lib/auth/features/configSlice.js.map +1 -0
- package/lib/auth/features/index.d.ts +4 -0
- package/lib/auth/features/index.js +22 -0
- package/lib/auth/features/index.js.map +1 -0
- package/lib/auth/features/languageSlice.d.ts +14 -0
- package/lib/auth/features/languageSlice.js +48 -0
- package/lib/auth/features/languageSlice.js.map +1 -0
- package/lib/auth/features/userSlice.d.ts +27 -0
- package/lib/auth/features/userSlice.js +83 -0
- package/lib/auth/features/userSlice.js.map +1 -0
- package/lib/auth/i18n/en.json +23 -0
- package/lib/auth/i18n/fr.json +23 -0
- package/lib/auth/index.d.ts +5 -0
- package/lib/auth/index.js +55 -0
- package/lib/auth/index.js.map +1 -0
- package/lib/auth/screens/SettingsScreen.d.ts +4 -0
- package/lib/auth/screens/SettingsScreen.js +79 -0
- package/lib/auth/screens/SettingsScreen.js.map +1 -0
- package/lib/auth/screens/UserScreen.d.ts +5 -0
- package/lib/auth/screens/UserScreen.js +116 -0
- package/lib/auth/screens/UserScreen.js.map +1 -0
- package/lib/auth/screens/index.d.ts +2 -0
- package/lib/auth/screens/index.js +20 -0
- package/lib/auth/screens/index.js.map +1 -0
- package/lib/axios/AxiosApi.d.ts +12 -0
- package/lib/axios/AxiosApi.js +32 -0
- package/lib/axios/AxiosApi.js.map +1 -0
- package/lib/components/external/Camera/Camera.d.ts +2 -0
- package/lib/components/external/Camera/Camera.js +148 -0
- package/lib/components/external/Camera/Camera.js.map +1 -0
- package/lib/components/external/Camera/CaptureButton.d.ts +10 -0
- package/lib/components/external/Camera/CaptureButton.js +118 -0
- package/lib/components/external/Camera/CaptureButton.js.map +1 -0
- package/lib/components/external/CameraScanner/CameraScanner.d.ts +10 -0
- package/lib/components/external/CameraScanner/CameraScanner.js +87 -0
- package/lib/components/external/CameraScanner/CameraScanner.js.map +1 -0
- package/lib/components/external/PlanningView/PlanningView.d.ts +11 -0
- package/lib/components/external/PlanningView/PlanningView.js +123 -0
- package/lib/components/external/PlanningView/PlanningView.js.map +1 -0
- package/lib/components/external/PlanningView/agenda.helpers.d.ts +10 -0
- package/lib/components/external/PlanningView/agenda.helpers.js +90 -0
- package/lib/components/external/PlanningView/agenda.helpers.js.map +1 -0
- package/lib/components/external/Scanner/Scanner.d.ts +2 -0
- package/lib/components/external/Scanner/Scanner.js +67 -0
- package/lib/components/external/Scanner/Scanner.js.map +1 -0
- package/lib/components/external/Stopwatch/Stopwatch.d.ts +18 -0
- package/lib/components/external/Stopwatch/Stopwatch.js +114 -0
- package/lib/components/external/Stopwatch/Stopwatch.js.map +1 -0
- package/lib/components/external/Timer/Timer.d.ts +9 -0
- package/lib/components/external/Timer/Timer.js +60 -0
- package/lib/components/external/Timer/Timer.js.map +1 -0
- package/lib/components/external/index.d.ts +6 -0
- package/lib/components/external/index.js +24 -0
- package/lib/components/external/index.js.map +1 -0
- package/lib/components/index.d.ts +4 -0
- package/lib/components/index.js +22 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/molecules/ErrorText/ErrorText.d.ts +4 -0
- package/lib/components/molecules/ErrorText/ErrorText.js +31 -0
- package/lib/components/molecules/ErrorText/ErrorText.js.map +1 -0
- package/lib/components/molecules/HeaderOptionsMenuItem/HeaderOptionMenuItem.d.ts +9 -0
- package/lib/components/molecules/HeaderOptionsMenuItem/HeaderOptionMenuItem.js +56 -0
- package/lib/components/molecules/HeaderOptionsMenuItem/HeaderOptionMenuItem.js.map +1 -0
- package/lib/components/molecules/IconSettings/IconSettings.d.ts +4 -0
- package/lib/components/molecules/IconSettings/IconSettings.js +31 -0
- package/lib/components/molecules/IconSettings/IconSettings.js.map +1 -0
- package/lib/components/molecules/InputBarCodeCard/InputBarCodeCard.d.ts +7 -0
- package/lib/components/molecules/InputBarCodeCard/InputBarCodeCard.js +84 -0
- package/lib/components/molecules/InputBarCodeCard/InputBarCodeCard.js.map +1 -0
- package/lib/components/molecules/LoginButton/LoginButton.d.ts +4 -0
- package/lib/components/molecules/LoginButton/LoginButton.js +40 -0
- package/lib/components/molecules/LoginButton/LoginButton.js.map +1 -0
- package/lib/components/molecules/MailMessageReadIcon/MailMessageReadIcon.d.ts +7 -0
- package/lib/components/molecules/MailMessageReadIcon/MailMessageReadIcon.js +55 -0
- package/lib/components/molecules/MailMessageReadIcon/MailMessageReadIcon.js.map +1 -0
- package/lib/components/molecules/TrackItem/TrackItem.d.ts +9 -0
- package/lib/components/molecules/TrackItem/TrackItem.js +65 -0
- package/lib/components/molecules/TrackItem/TrackItem.js.map +1 -0
- package/lib/components/molecules/index.d.ts +7 -0
- package/lib/components/molecules/index.js +25 -0
- package/lib/components/molecules/index.js.map +1 -0
- package/lib/components/organisms/AOSImage/AOSImage.d.ts +15 -0
- package/lib/components/organisms/AOSImage/AOSImage.js +37 -0
- package/lib/components/organisms/AOSImage/AOSImage.js.map +1 -0
- package/lib/components/organisms/AOSImageBubble/AOSImageBubble.d.ts +9 -0
- package/lib/components/organisms/AOSImageBubble/AOSImageBubble.js +30 -0
- package/lib/components/organisms/AOSImageBubble/AOSImageBubble.js.map +1 -0
- package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.d.ts +9 -0
- package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js +68 -0
- package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js.map +1 -0
- package/lib/components/organisms/LogoImage/LogoImage.d.ts +4 -0
- package/lib/components/organisms/LogoImage/LogoImage.js +52 -0
- package/lib/components/organisms/LogoImage/LogoImage.js.map +1 -0
- package/lib/components/organisms/MailMessageCard/MailMessageCard.d.ts +17 -0
- package/lib/components/organisms/MailMessageCard/MailMessageCard.js +79 -0
- package/lib/components/organisms/MailMessageCard/MailMessageCard.js.map +1 -0
- package/lib/components/organisms/MailMessageCommentCard/MailMessageCommentCard.d.ts +12 -0
- package/lib/components/organisms/MailMessageCommentCard/MailMessageCommentCard.js +139 -0
- package/lib/components/organisms/MailMessageCommentCard/MailMessageCommentCard.js.map +1 -0
- package/lib/components/organisms/MailMessageNotificationCard/MailMessageNotificationCard.d.ts +15 -0
- package/lib/components/organisms/MailMessageNotificationCard/MailMessageNotificationCard.js +79 -0
- package/lib/components/organisms/MailMessageNotificationCard/MailMessageNotificationCard.js.map +1 -0
- package/lib/components/organisms/PasswordInput/PasswordInput.d.ts +7 -0
- package/lib/components/organisms/PasswordInput/PasswordInput.js +36 -0
- package/lib/components/organisms/PasswordInput/PasswordInput.js.map +1 -0
- package/lib/components/organisms/ScannerAutocompleteSearch/ScannerAutocompleteSearch.d.ts +17 -0
- package/lib/components/organisms/ScannerAutocompleteSearch/ScannerAutocompleteSearch.js +68 -0
- package/lib/components/organisms/ScannerAutocompleteSearch/ScannerAutocompleteSearch.js.map +1 -0
- package/lib/components/organisms/UrlInput/UrlInput.d.ts +10 -0
- package/lib/components/organisms/UrlInput/UrlInput.js +38 -0
- package/lib/components/organisms/UrlInput/UrlInput.js.map +1 -0
- package/lib/components/organisms/UsernameInput/UsernameInput.d.ts +6 -0
- package/lib/components/organisms/UsernameInput/UsernameInput.js +33 -0
- package/lib/components/organisms/UsernameInput/UsernameInput.js.map +1 -0
- package/lib/components/organisms/index.d.ts +11 -0
- package/lib/components/organisms/index.js +29 -0
- package/lib/components/organisms/index.js.map +1 -0
- package/lib/components/templates/AttachedFilesView/AttachedFilesView.d.ts +10 -0
- package/lib/components/templates/AttachedFilesView/AttachedFilesView.js +87 -0
- package/lib/components/templates/AttachedFilesView/AttachedFilesView.js.map +1 -0
- package/lib/components/templates/MailMessageView/MailMessageView.d.ts +6 -0
- package/lib/components/templates/MailMessageView/MailMessageView.js +140 -0
- package/lib/components/templates/MailMessageView/MailMessageView.js.map +1 -0
- package/lib/components/templates/index.d.ts +2 -0
- package/lib/components/templates/index.js +20 -0
- package/lib/components/templates/index.js.map +1 -0
- package/lib/features/attachedFilesSlice.d.ts +35 -0
- package/lib/features/attachedFilesSlice.js +82 -0
- package/lib/features/attachedFilesSlice.js.map +1 -0
- package/lib/features/authSlice.d.ts +44 -0
- package/lib/features/authSlice.js +67 -0
- package/lib/features/authSlice.js.map +1 -0
- package/lib/features/cameraSlice.d.ts +14 -0
- package/lib/features/cameraSlice.js +52 -0
- package/lib/features/cameraSlice.js.map +1 -0
- package/lib/features/index.d.ts +8 -0
- package/lib/features/index.js +26 -0
- package/lib/features/index.js.map +1 -0
- package/lib/features/mailMessageSlice.d.ts +97 -0
- package/lib/features/mailMessageSlice.js +219 -0
- package/lib/features/mailMessageSlice.js.map +1 -0
- package/lib/features/menuConfigSlice.d.ts +14 -0
- package/lib/features/menuConfigSlice.js +48 -0
- package/lib/features/menuConfigSlice.js.map +1 -0
- package/lib/features/metafileSlice.d.ts +14 -0
- package/lib/features/metafileSlice.js +48 -0
- package/lib/features/metafileSlice.js.map +1 -0
- package/lib/features/mobileConfigSlice.d.ts +14 -0
- package/lib/features/mobileConfigSlice.js +52 -0
- package/lib/features/mobileConfigSlice.js.map +1 -0
- package/lib/features/scannerSlice.d.ts +14 -0
- package/lib/features/scannerSlice.js +52 -0
- package/lib/features/scannerSlice.js.map +1 -0
- package/lib/hooks/use-effect-debugger.d.ts +1 -0
- package/lib/hooks/use-effect-debugger.js +47 -0
- package/lib/hooks/use-effect-debugger.js.map +1 -0
- package/lib/i18n/api/translation.d.ts +2 -0
- package/lib/i18n/api/translation.js +38 -0
- package/lib/i18n/api/translation.js.map +1 -0
- package/lib/i18n/component/Translator.d.ts +6 -0
- package/lib/i18n/component/Translator.js +74 -0
- package/lib/i18n/component/Translator.js.map +1 -0
- package/lib/i18n/helpers/langages.d.ts +3 -0
- package/lib/i18n/helpers/langages.js +34 -0
- package/lib/i18n/helpers/langages.js.map +1 -0
- package/lib/i18n/helpers/translations.d.ts +1 -0
- package/lib/i18n/helpers/translations.js +24 -0
- package/lib/i18n/helpers/translations.js.map +1 -0
- package/lib/i18n/hooks/use-translator.d.ts +5 -0
- package/lib/i18n/hooks/use-translator.js +24 -0
- package/lib/i18n/hooks/use-translator.js.map +1 -0
- package/lib/i18n/i18n.d.ts +20 -0
- package/lib/i18n/i18n.js +53 -0
- package/lib/i18n/i18n.js.map +1 -0
- package/lib/i18n/index.d.ts +4 -0
- package/lib/i18n/index.js +22 -0
- package/lib/i18n/index.js.map +1 -0
- package/lib/i18n/translations/en.json +52 -0
- package/lib/i18n/translations/fr.json +52 -0
- package/lib/index.d.ts +18 -0
- package/lib/index.js +36 -0
- package/lib/index.js.map +1 -0
- package/lib/navigator/Navigator.d.ts +12 -0
- package/lib/navigator/Navigator.js +118 -0
- package/lib/navigator/Navigator.js.map +1 -0
- package/lib/navigator/drawer/AuthMenuIconButton.d.ts +6 -0
- package/lib/navigator/drawer/AuthMenuIconButton.js +29 -0
- package/lib/navigator/drawer/AuthMenuIconButton.js.map +1 -0
- package/lib/navigator/drawer/BackIcon.d.ts +4 -0
- package/lib/navigator/drawer/BackIcon.js +32 -0
- package/lib/navigator/drawer/BackIcon.js.map +1 -0
- package/lib/navigator/drawer/DrawerContent.d.ts +8 -0
- package/lib/navigator/drawer/DrawerContent.js +177 -0
- package/lib/navigator/drawer/DrawerContent.js.map +1 -0
- package/lib/navigator/drawer/DrawerToggleButton.d.ts +4 -0
- package/lib/navigator/drawer/DrawerToggleButton.js +32 -0
- package/lib/navigator/drawer/DrawerToggleButton.js.map +1 -0
- package/lib/navigator/drawer/Menu.d.ts +8 -0
- package/lib/navigator/drawer/Menu.js +91 -0
- package/lib/navigator/drawer/Menu.js.map +1 -0
- package/lib/navigator/drawer/MenuIconButton.d.ts +10 -0
- package/lib/navigator/drawer/MenuIconButton.js +64 -0
- package/lib/navigator/drawer/MenuIconButton.js.map +1 -0
- package/lib/navigator/drawer/MenuItem.d.ts +8 -0
- package/lib/navigator/drawer/MenuItem.js +71 -0
- package/lib/navigator/drawer/MenuItem.js.map +1 -0
- package/lib/navigator/menu.helper.d.ts +8 -0
- package/lib/navigator/menu.helper.js +50 -0
- package/lib/navigator/menu.helper.js.map +1 -0
- package/lib/navigator/module.helper.d.ts +7 -0
- package/lib/navigator/module.helper.js +95 -0
- package/lib/navigator/module.helper.js.map +1 -0
- package/lib/navigator/roles.helper.d.ts +4 -0
- package/lib/navigator/roles.helper.js +33 -0
- package/lib/navigator/roles.helper.js.map +1 -0
- package/lib/redux/hooks.d.ts +5 -0
- package/lib/redux/hooks.js +25 -0
- package/lib/redux/hooks.js.map +1 -0
- package/lib/redux/store.d.ts +1 -0
- package/lib/redux/store.js +28 -0
- package/lib/redux/store.js.map +1 -0
- package/lib/screens/AttachedFilesScreen.d.ts +5 -0
- package/lib/screens/AttachedFilesScreen.js +26 -0
- package/lib/screens/AttachedFilesScreen.js.map +1 -0
- package/lib/screens/ErrorScreen.d.ts +5 -0
- package/lib/screens/ErrorScreen.js +46 -0
- package/lib/screens/ErrorScreen.js.map +1 -0
- package/lib/screens/LoginScreen.d.ts +4 -0
- package/lib/screens/LoginScreen.js +115 -0
- package/lib/screens/LoginScreen.js.map +1 -0
- package/lib/screens/MailMessageScreen.d.ts +5 -0
- package/lib/screens/MailMessageScreen.js +25 -0
- package/lib/screens/MailMessageScreen.js.map +1 -0
- package/lib/storage/Storage.d.ts +17 -0
- package/lib/storage/Storage.js +53 -0
- package/lib/storage/Storage.js.map +1 -0
- package/lib/tools/ClipboardProvider.d.ts +7 -0
- package/lib/tools/ClipboardProvider.js +59 -0
- package/lib/tools/ClipboardProvider.js.map +1 -0
- package/lib/tools/FileViewer.d.ts +13 -0
- package/lib/tools/FileViewer.js +48 -0
- package/lib/tools/FileViewer.js.map +1 -0
- package/lib/tools/LinkingProvider.d.ts +17 -0
- package/lib/tools/LinkingProvider.js +94 -0
- package/lib/tools/LinkingProvider.js.map +1 -0
- package/lib/tools/index.d.ts +3 -0
- package/lib/tools/index.js +21 -0
- package/lib/tools/index.js.map +1 -0
- package/lib/tools/linking.helper.d.ts +25 -0
- package/lib/tools/linking.helper.js +70 -0
- package/lib/tools/linking.helper.js.map +1 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.js +20 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/mail-message-notification-type.d.ts +12 -0
- package/lib/types/mail-message-notification-type.js +48 -0
- package/lib/types/mail-message-notification-type.js.map +1 -0
- package/lib/types/stopwatch-type.d.ts +14 -0
- package/lib/types/stopwatch-type.js +64 -0
- package/lib/types/stopwatch-type.js.map +1 -0
- package/lib/utils/agenda.d.ts +1 -0
- package/lib/utils/agenda.js +28 -0
- package/lib/utils/agenda.js.map +1 -0
- package/lib/utils/date.d.ts +4 -0
- package/lib/utils/date.js +41 -0
- package/lib/utils/date.js.map +1 -0
- package/lib/utils/displayers.d.ts +1 -0
- package/lib/utils/displayers.js +19 -0
- package/lib/utils/displayers.js.map +1 -0
- package/lib/utils/formatters.d.ts +5 -0
- package/lib/utils/formatters.js +74 -0
- package/lib/utils/formatters.js.map +1 -0
- package/lib/utils/index.d.ts +9 -0
- package/lib/utils/index.js +27 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/list.d.ts +3 -0
- package/lib/utils/list.js +101 -0
- package/lib/utils/list.js.map +1 -0
- package/lib/utils/object.d.ts +2 -0
- package/lib/utils/object.js +36 -0
- package/lib/utils/object.js.map +1 -0
- package/lib/utils/show-toast-message.d.ts +2 -0
- package/lib/utils/show-toast-message.js +22 -0
- package/lib/utils/show-toast-message.js.map +1 -0
- package/lib/utils/string.d.ts +4 -0
- package/lib/utils/string.js +54 -0
- package/lib/utils/string.js.map +1 -0
- package/lib/utils/time.d.ts +4 -0
- package/lib/utils/time.js +78 -0
- package/lib/utils/time.js.map +1 -0
- package/package.json +95 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import { StyleSheet, View } from 'react-native';
|
|
20
|
+
import { Button } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import useTranslator from '../../../i18n/hooks/use-translator';
|
|
22
|
+
const LoginButton = ({ onPress }) => {
|
|
23
|
+
const I18n = useTranslator();
|
|
24
|
+
return (<View style={styles.container}>
|
|
25
|
+
<Button style={styles.button} title={I18n.t('Auth_LOGIN')} onPress={onPress}/>
|
|
26
|
+
</View>);
|
|
27
|
+
};
|
|
28
|
+
const styles = StyleSheet.create({
|
|
29
|
+
container: {
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
},
|
|
32
|
+
button: {
|
|
33
|
+
marginTop: 15,
|
|
34
|
+
width: 150,
|
|
35
|
+
height: 30,
|
|
36
|
+
elevation: 5,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
export default LoginButton;
|
|
40
|
+
//# sourceMappingURL=LoginButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoginButton.js","sourceRoot":"","sources":["../../../../src/components/molecules/LoginButton/LoginButton.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAC7C,OAAO,aAAa,MAAM,oCAAoC,CAAC;AAE/D,MAAM,WAAW,GAAG,CAAC,EAAC,OAAO,EAAC,EAAE,EAAE;IAChC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,MAAM,CACL,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CACrB,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAC5B,OAAO,CAAC,CAAC,OAAO,CAAC,EAErB;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,UAAU,EAAE,QAAQ;KACrB;IACD,MAAM,EAAE;QACN,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,EAAE;QACV,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useCallback } from 'react';
|
|
19
|
+
import { StyleSheet } from 'react-native';
|
|
20
|
+
import { Icon, useThemeColor } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { useDispatch } from '../../../redux/hooks';
|
|
22
|
+
import { markAllMailMessageAsRead, markMailMessageAsRead, } from '../../../features/mailMessageSlice';
|
|
23
|
+
const MailMessageReadIcon = ({ allMessagesRead = false, mailMessageFlag, modelId, model, }) => {
|
|
24
|
+
const Colors = useThemeColor();
|
|
25
|
+
const dispatch = useDispatch();
|
|
26
|
+
const isRead = mailMessageFlag != null ? mailMessageFlag?.isRead : allMessagesRead;
|
|
27
|
+
const handleMarkAsRead = useCallback(() => {
|
|
28
|
+
dispatch(markMailMessageAsRead({
|
|
29
|
+
mailFlagList: [mailMessageFlag],
|
|
30
|
+
modelId,
|
|
31
|
+
model,
|
|
32
|
+
}));
|
|
33
|
+
}, [dispatch, mailMessageFlag, model, modelId]);
|
|
34
|
+
const handleMarkAll = useCallback(() => {
|
|
35
|
+
dispatch(markAllMailMessageAsRead({
|
|
36
|
+
modelId,
|
|
37
|
+
model,
|
|
38
|
+
}));
|
|
39
|
+
}, [dispatch, model, modelId]);
|
|
40
|
+
return (<Icon name={mailMessageFlag == null ? 'check-double' : 'check'} color={isRead
|
|
41
|
+
? Colors.primaryColor.background
|
|
42
|
+
: Colors.secondaryColor.background} size={mailMessageFlag == null ? 18 : 15} touchable={!isRead} onPress={mailMessageFlag != null ? handleMarkAsRead : handleMarkAll} style={mailMessageFlag == null ? styles.doucleCheckIcon : styles.checkIcon}/>);
|
|
43
|
+
};
|
|
44
|
+
const styles = StyleSheet.create({
|
|
45
|
+
checkIcon: {
|
|
46
|
+
width: '10%',
|
|
47
|
+
justifyContent: 'flex-end',
|
|
48
|
+
alignItems: 'center',
|
|
49
|
+
},
|
|
50
|
+
doucleCheckIcon: {
|
|
51
|
+
flex: 1,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
export default MailMessageReadIcon;
|
|
55
|
+
//# sourceMappingURL=MailMessageReadIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MailMessageReadIcon.js","sourceRoot":"","sources":["../../../../src/components/molecules/MailMessageReadIcon/MailMessageReadIcon.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,IAAI,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACjD,OAAO,EACL,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,oCAAoC,CAA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CAAC,aAAa,CAAC,CACpE,KAAK,CAAC,CACJ,eAAe,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CACpE,EACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,KAAK,EAAE,KAAK;QACZ,cAAc,EAAE,UAAU;QAC1B,UAAU,EAAE,QAAQ;KACrB;IACD,eAAe,EAAE;QACf,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const formatDateItem: (date: any, I18n: any) => any;
|
|
2
|
+
declare const TrackItem: ({ title, oldDisplayValue, oldValue, displayValue, value }: {
|
|
3
|
+
title: any;
|
|
4
|
+
oldDisplayValue: any;
|
|
5
|
+
oldValue: any;
|
|
6
|
+
displayValue: any;
|
|
7
|
+
value: any;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export default TrackItem;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useCallback, useMemo } from 'react';
|
|
19
|
+
import { StyleSheet } from 'react-native';
|
|
20
|
+
import { Icon, Text } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { isDate, isDateTime } from '../../../utils/date';
|
|
22
|
+
import useTranslator from '../../../i18n/hooks/use-translator';
|
|
23
|
+
import { formatDate, formatDateTime } from '../../../utils/formatters';
|
|
24
|
+
export const formatDateItem = (date, I18n) => {
|
|
25
|
+
return isDateTime(date)
|
|
26
|
+
? formatDateTime(date, I18n.t('Base_DateTimeFormat'))
|
|
27
|
+
: formatDate(date, I18n.t('Base_DateFormat'));
|
|
28
|
+
};
|
|
29
|
+
const TrackItem = ({ title, oldDisplayValue, oldValue, displayValue, value }) => {
|
|
30
|
+
const I18n = useTranslator();
|
|
31
|
+
const values = useMemo(() => {
|
|
32
|
+
return {
|
|
33
|
+
oldValue: oldDisplayValue || oldValue,
|
|
34
|
+
value: displayValue || value,
|
|
35
|
+
};
|
|
36
|
+
}, [oldDisplayValue, oldValue, displayValue, value]);
|
|
37
|
+
const parseDate = useCallback((item) => {
|
|
38
|
+
return isDate(item) ? formatDateItem(item, I18n) : item;
|
|
39
|
+
}, [I18n]);
|
|
40
|
+
return (<Text style={styles.listItem}>
|
|
41
|
+
<Text style={styles.itemTitle}>{`${title}: `}</Text>
|
|
42
|
+
<Text style={styles.itemValue}>
|
|
43
|
+
{parseDate(values.oldValue)}
|
|
44
|
+
{values.oldValue && (<Icon name="long-arrow-right" size={10} FontAwesome5={false} style={styles.arrowIcon}/>)}
|
|
45
|
+
{parseDate(values.value)}
|
|
46
|
+
</Text>
|
|
47
|
+
</Text>);
|
|
48
|
+
};
|
|
49
|
+
const styles = StyleSheet.create({
|
|
50
|
+
arrowIcon: {
|
|
51
|
+
paddingHorizontal: 5,
|
|
52
|
+
},
|
|
53
|
+
listItem: {
|
|
54
|
+
flexDirection: 'row',
|
|
55
|
+
fontSize: 13,
|
|
56
|
+
},
|
|
57
|
+
itemTitle: {
|
|
58
|
+
fontWeight: 'bold',
|
|
59
|
+
},
|
|
60
|
+
itemValue: {
|
|
61
|
+
textAlign: 'justify',
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
export default TrackItem;
|
|
65
|
+
//# sourceMappingURL=TrackItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrackItem.js","sourceRoot":"","sources":["../../../../src/components/molecules/TrackItem/TrackItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAC;AACvD,OAAO,aAAa,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAErE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;IAC3C,OAAO,UAAU,CAAC,IAAI,CAAC;QACrB,CAAC,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC;QACrD,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,EAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAC,EAAE,EAAE;IAC5E,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE;QAC1B,OAAO;YACL,QAAQ,EAAE,eAAe,IA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AAS,EAAE;QACT,UAAU,EAAE,MAAM;KACnB;IAED,SAAS,EAAE;QACT,SAAS,EAAE,SAAS;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as ErrorText } from "./ErrorText/ErrorText";
|
|
2
|
+
export { default as HeaderOptionMenuItem } from "./HeaderOptionsMenuItem/HeaderOptionMenuItem";
|
|
3
|
+
export { default as IconSettings } from "./IconSettings/IconSettings";
|
|
4
|
+
export { default as InputBarCodeCard } from "./InputBarCodeCard/InputBarCodeCard";
|
|
5
|
+
export { default as LoginButton } from "./LoginButton/LoginButton";
|
|
6
|
+
export { default as MailMessageReadIcon } from "./MailMessageReadIcon/MailMessageReadIcon";
|
|
7
|
+
export { default as TrackItem } from "./TrackItem/TrackItem";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
export { default as ErrorText } from './ErrorText/ErrorText';
|
|
19
|
+
export { default as HeaderOptionMenuItem } from './HeaderOptionsMenuItem/HeaderOptionMenuItem';
|
|
20
|
+
export { default as IconSettings } from './IconSettings/IconSettings';
|
|
21
|
+
export { default as InputBarCodeCard } from './InputBarCodeCard/InputBarCodeCard';
|
|
22
|
+
export { default as LoginButton } from './LoginButton/LoginButton';
|
|
23
|
+
export { default as MailMessageReadIcon } from './MailMessageReadIcon/MailMessageReadIcon';
|
|
24
|
+
export { default as TrackItem } from './TrackItem/TrackItem';
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/molecules/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAC,OAAO,IAAI,oBAAoB,EAAC,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ImageResizeMode, ImageStyle, StyleProp } from 'react-native';
|
|
2
|
+
interface MetaFileProps {
|
|
3
|
+
id: number;
|
|
4
|
+
fileName: string;
|
|
5
|
+
}
|
|
6
|
+
interface AOSImageProps {
|
|
7
|
+
imageSize: StyleProp<ImageStyle>;
|
|
8
|
+
generalStyle?: StyleProp<ImageStyle>;
|
|
9
|
+
resizeMode: ImageResizeMode;
|
|
10
|
+
metaFile: MetaFileProps;
|
|
11
|
+
defaultIconSize: number;
|
|
12
|
+
enableImageViewer?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const AOSImage: ({ imageSize, generalStyle, resizeMode, metaFile, defaultIconSize, enableImageViewer, }: AOSImageProps) => JSX.Element;
|
|
15
|
+
export default AOSImage;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import { TouchableOpacity, } from 'react-native';
|
|
20
|
+
import { Image } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { useSelector } from 'react-redux';
|
|
22
|
+
import { openFileInExternalApp } from '../../../tools/FileViewer';
|
|
23
|
+
import useTranslator from '../../../i18n/hooks/use-translator';
|
|
24
|
+
const AOSImage = ({ imageSize, generalStyle, resizeMode, metaFile, defaultIconSize = 60, enableImageViewer = false, }) => {
|
|
25
|
+
const { baseUrl, token, jsessionId } = useSelector((state) => state.auth);
|
|
26
|
+
const I18n = useTranslator();
|
|
27
|
+
const handleShowFile = async () => {
|
|
28
|
+
await openFileInExternalApp({ fileName: metaFile?.fileName, id: metaFile?.id, isMetaFile: true }, { baseUrl: baseUrl, token: token, jsessionId: jsessionId }, I18n);
|
|
29
|
+
};
|
|
30
|
+
return (<TouchableOpacity disabled={!enableImageViewer || metaFile?.id == null || metaFile?.fileName == null} onPress={handleShowFile}>
|
|
31
|
+
<Image imageSize={imageSize} generalStyle={generalStyle} resizeMode={resizeMode} source={{
|
|
32
|
+
uri: `${baseUrl}ws/rest/com.axelor.meta.db.MetaFile/${metaFile?.id}/content/download`,
|
|
33
|
+
}} defaultIconSize={defaultIconSize}/>
|
|
34
|
+
</TouchableOpacity>);
|
|
35
|
+
};
|
|
36
|
+
export default AOSImage;
|
|
37
|
+
//# sourceMappingURL=AOSImage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AOSImage.js","sourceRoot":"","sources":["../../../../src/components/organisms/AOSImage/AOSImage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAIL,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,KAAK,EAAC,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAC;AAChE,OAAO,aAAa,MAAM,oCAAoC,CAAC;AAgB/D,MAAM,QAAQ,GAAG,CAAC,EAChB,SAAS,EACT,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,eAAe,GAAG,EAAE,EACpB,iBAAiB,GAAG,KAAK,GACX,EAAE,EAAE;IAClB,MAAM,EAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7E,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,cAAc,GAAG,KAAK,IAAI,EAAE;QAChC,MAAM,qBAAqB,CACzB,EAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAC,EAClE,EAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAC,EACxD,IAAI,CACL,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,gBAAgB,CACf,QAAQ,CAAC,CACP,CAAC,iBAAiB,IAAI,QAAQ,EAAE,EAAE,IAAI,IAAI,IAAI,QAAQ,EAAE,QAAQ,IAAI,IAAI,CACzE,CACD,OAAO,CAAC,CAAC,cAAc,CAAC,CACxB;MAAA,CAAC,KAAK,CACJ,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,MAAM,CAAC,CAAC;YACN,GAAG,EAAE,GAAG,OAAO,uCAAuC,QAAQ,EAAE,EAAE,mBAAmB;SACtF,CAAC,CACF,eAAe,CAAC,CAAC,eAAe,CAAC,EAErC;IAAA,EAAE,gBAAgB,CAAC,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface AOSImageBubbleProps {
|
|
2
|
+
imageSize?: number;
|
|
3
|
+
style?: any;
|
|
4
|
+
metaFileId: number;
|
|
5
|
+
defaultIconSize?: number;
|
|
6
|
+
listComponent?: any;
|
|
7
|
+
}
|
|
8
|
+
declare const AOSImageBubble: ({ imageSize, style, metaFileId, defaultIconSize, listComponent, }: AOSImageBubbleProps) => JSX.Element;
|
|
9
|
+
export default AOSImageBubble;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import { ImageBubble } from '@axelor/aos-mobile-ui';
|
|
20
|
+
import { useSelector } from 'react-redux';
|
|
21
|
+
const AOSImageBubble = ({ imageSize, style, metaFileId, defaultIconSize = 60, listComponent = [], }) => {
|
|
22
|
+
const { baseUrl } = useSelector((state) => state.auth);
|
|
23
|
+
return (<ImageBubble style={style} source={metaFileId
|
|
24
|
+
? {
|
|
25
|
+
uri: `${baseUrl}ws/rest/com.axelor.meta.db.MetaFile/${metaFileId}/content/download`,
|
|
26
|
+
}
|
|
27
|
+
: null} listComponent={listComponent} imageSize={imageSize} defaultIconSize={defaultIconSize}/>);
|
|
28
|
+
};
|
|
29
|
+
export default AOSImageBubble;
|
|
30
|
+
//# sourceMappingURL=AOSImageBubble.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AOSImageBubble.js","sourceRoot":"","sources":["../../../../src/components/organisms/AOSImageBubble/AOSImageBubble.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAUxC,MAAM,cAAc,GAAG,CAAC,EACtB,SAAS,EACT,KAAK,EACL,UAAU,EACV,eAAe,GAAG,EAAE,EACpB,aAAa,GAAG,EAAE,GACE,EAAE,EAAE;IACxB,MAAM,EAAC,OAAO,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAE1D,OAAO,CACL,CAAC,WAAW,CACV,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CACL,UAAU;YACR,CAAC,CAAC;gBACE,GAAG,EAAE,GAAG,OAAO,uCAAuC,UAAU,mBAAmB;aACpF;YACH,CAAC,CAAC,IAAI,CACT,CACD,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,eAAe,CAAC,CAAC,eAAe,CAAC,EACjC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default HeaderOptionsMenu;
|
|
2
|
+
declare function HeaderOptionsMenu({ model, modelId, children, navigation, disableMailMessages, attachedFileScreenTitle, }: {
|
|
3
|
+
model: any;
|
|
4
|
+
modelId: any;
|
|
5
|
+
children: any;
|
|
6
|
+
navigation: any;
|
|
7
|
+
disableMailMessages: any;
|
|
8
|
+
attachedFileScreenTitle: any;
|
|
9
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
19
|
+
import { StyleSheet, View } from 'react-native';
|
|
20
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
21
|
+
import { DropdownMenu } from '@axelor/aos-mobile-ui';
|
|
22
|
+
import { countAttachmentFiles } from '../../../features/attachedFilesSlice';
|
|
23
|
+
import { countUnreadMailMessages } from '../../../features/mailMessageSlice';
|
|
24
|
+
import { HeaderOptionMenuItem } from '../../molecules';
|
|
25
|
+
const HeaderOptionsMenu = ({ model, modelId, children, navigation, disableMailMessages, attachedFileScreenTitle, }) => {
|
|
26
|
+
const [disableAttachementFiles, setDisableAttachementFiles] = useState(true);
|
|
27
|
+
const { attachments } = useSelector(state => state.attachedFiles);
|
|
28
|
+
const { unreadMessages } = useSelector(state => state.mailMessages);
|
|
29
|
+
const dispatch = useDispatch();
|
|
30
|
+
const countUnreadMessagesAPI = useCallback(() => {
|
|
31
|
+
dispatch(countUnreadMailMessages({ model, modelId }));
|
|
32
|
+
}, [dispatch, model, modelId]);
|
|
33
|
+
const countAttachmentsAPI = useCallback(() => {
|
|
34
|
+
dispatch(countAttachmentFiles({ model, modelId }));
|
|
35
|
+
}, [dispatch, model, modelId]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
countUnreadMessagesAPI();
|
|
38
|
+
}, [countUnreadMessagesAPI]);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
countAttachmentsAPI();
|
|
41
|
+
}, [countAttachmentsAPI]);
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
setDisableAttachementFiles(attachments === 0);
|
|
44
|
+
}, [attachments]);
|
|
45
|
+
return (<View style={styles.container}>
|
|
46
|
+
<HeaderOptionMenuItem icon="bell" FontAwesome5={false} indicator={unreadMessages} hideIf={disableMailMessages} onPress={() => navigation.navigate('MailMessageScreen', {
|
|
47
|
+
model,
|
|
48
|
+
modelId,
|
|
49
|
+
})}/>
|
|
50
|
+
<HeaderOptionMenuItem icon="paperclip" indicator={attachments} hideIf={disableAttachementFiles} onPress={() => navigation.navigate('AttachedFilesScreen', {
|
|
51
|
+
model,
|
|
52
|
+
modelId,
|
|
53
|
+
screenTitle: attachedFileScreenTitle,
|
|
54
|
+
})}/>
|
|
55
|
+
{children && <DropdownMenu>{children}</DropdownMenu>}
|
|
56
|
+
</View>);
|
|
57
|
+
};
|
|
58
|
+
const styles = StyleSheet.create({
|
|
59
|
+
container: {
|
|
60
|
+
borderRadius: 13,
|
|
61
|
+
flexDirection: 'row',
|
|
62
|
+
justifyContent: 'center',
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
marginHorizontal: 15,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
export default HeaderOptionsMenu;
|
|
68
|
+
//# sourceMappingURL=HeaderOptionsMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderOptionsMenu.js","sourceRoot":"","sources":["../../../../src/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAC,oBAAoB,EAAC,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAC,uBAAuB,EAAC,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAC,oBAAoB,EAAC,MAAM,iBAAiB,CAAC;AAErD,MAAM,iBAAiB,GAAG,CAAC,EACzB,KAAK,EACL,OAAO,EACP,QAAQ,EACR,UAAU,EACV,mBAAmB,EACnB,uBAAuB,GACxB,EAAE,EAAE;IACH,MAAM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C,KAAK,CAAC,CACpB,SAAS,CAAC,CAAC,cAAc,CAAC,CAC1B,MAAM,CAAC,CAAC,mBAAmB,CAAC,CAC5B,OAAO,CAAC,CAAC,GAAG,EAAE,CACZ,UAAU,CAAC,QAAQ,CAAC,mBAAmB,EAAE;YACvC,KAAK;YACL,OAAO;SACR,CAAC,CACH,EAEH;MAAA,CAAC,oBAAoB,CACnB,IAAI,CAAC,WAAW,CAChB,SAAS,CAAC,CAAC,WAAW,CAAC,CACvB,MAAM,CAAC,CAAC,uBAAuB,CAAC,CAChC,OAAO,CAAC,CAAC,GAAG,EAAE,CACZ,UAAU,CAAC,QAAQ,CAAC,qBAAqB,EAAE;YACzC,KAAK;YACL,OAAO;YACP,WAAW,EAAE,uBAAuB;SACrC,CAAC,CACH,EAEH;MAAA,CAAC,QAAQ,IAAI,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC,CACtD;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,YAAY,EAAE,EAAE;QAChB,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,gBAAgB,EAAE,EAAE;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import axios from 'axios';
|
|
19
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
20
|
+
import { Image } from 'react-native';
|
|
21
|
+
import { StyleSheet } from 'react-native';
|
|
22
|
+
const axelorLogoPath = '../../../assets/Logo_Axelor.png';
|
|
23
|
+
const LogoImage = ({ url }) => {
|
|
24
|
+
const axelorLogo = useRef(require(axelorLogoPath)).current;
|
|
25
|
+
const [urlLogoSource, setUrlLogoSource] = useState(generateImageSourceWithUrl(url));
|
|
26
|
+
const [source, setSource] = useState(axelorLogo);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
setUrlLogoSource(generateImageSourceWithUrl(url));
|
|
29
|
+
}, [url]);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
axios
|
|
32
|
+
.head(urlLogoSource.uri)
|
|
33
|
+
.then(({ status }) => {
|
|
34
|
+
if (status === 200) {
|
|
35
|
+
setSource(urlLogoSource);
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
.catch(() => setSource(axelorLogo));
|
|
39
|
+
}, [axelorLogo, urlLogoSource]);
|
|
40
|
+
return (<Image resizeMode="contain" style={styles.imageSize} source={source}/>);
|
|
41
|
+
};
|
|
42
|
+
const styles = StyleSheet.create({
|
|
43
|
+
imageSize: {
|
|
44
|
+
width: '100%',
|
|
45
|
+
height: '100%',
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
const generateImageSourceWithUrl = url => ({ uri: concatLogoSuffixToUrl(url) });
|
|
49
|
+
const concatLogoSuffixToUrl = url => `${url}/img/${logoName}`;
|
|
50
|
+
const logoName = 'logo.png';
|
|
51
|
+
export default LogoImage;
|
|
52
|
+
//# sourceMappingURL=Log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AC,CAAC,CAAC;IAEhC,OAAO,CACL,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,EAAG,CACxE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;KACf;CACF,CAAC,CAAC;AAEH,MAAM,0BAA0B,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,EAAC,GAAG,EAAE,qBAAqB,CAAC,GAAG,CAAC,EAAC,CAAC,CAAC;AAC9E,MAAM,qBAAqB,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,QAAQ,QAAQ,EAAE,CAAC;AAC9D,MAAM,QAAQ,GAAG,UAAU,CAAC;AAE5B,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default MailMessageCard;
|
|
2
|
+
declare function MailMessageCard({ author, avatar, body, eventText, eventTime, files, style, subject, title, type, flags, navigation, relatedId, relatedModel, }: {
|
|
3
|
+
author: any;
|
|
4
|
+
avatar: any;
|
|
5
|
+
body: any;
|
|
6
|
+
eventText: any;
|
|
7
|
+
eventTime: any;
|
|
8
|
+
files: any;
|
|
9
|
+
style: any;
|
|
10
|
+
subject: any;
|
|
11
|
+
title: any;
|
|
12
|
+
type: any;
|
|
13
|
+
flags: any;
|
|
14
|
+
navigation: any;
|
|
15
|
+
relatedId: any;
|
|
16
|
+
relatedModel: any;
|
|
17
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useMemo } from 'react';
|
|
19
|
+
import { Dimensions, StyleSheet, View } from 'react-native';
|
|
20
|
+
import { useSelector } from 'react-redux';
|
|
21
|
+
import { Image, Text, useThemeColor } from '@axelor/aos-mobile-ui';
|
|
22
|
+
import { formatDateTime } from '../../../utils/formatters';
|
|
23
|
+
import useTranslator from '../../../i18n/hooks/use-translator';
|
|
24
|
+
import { MailMessageCommentCard, MailMessageNotificationCard, } from '../../organisms';
|
|
25
|
+
const mailMessageTypes = {
|
|
26
|
+
comment: 'comment',
|
|
27
|
+
notificaiton: 'notification',
|
|
28
|
+
};
|
|
29
|
+
const MailMessageCard = ({ author, avatar, body, eventText, eventTime, files, style, subject, title, type, flags, navigation, relatedId, relatedModel, }) => {
|
|
30
|
+
const Colors = useThemeColor();
|
|
31
|
+
const I18n = useTranslator();
|
|
32
|
+
const { baseUrl } = useSelector(state => state.auth);
|
|
33
|
+
const styles = useMemo(() => getStyles(Colors), [Colors]);
|
|
34
|
+
return (<View style={[styles.container, style]}>
|
|
35
|
+
<View style={styles.avatarContainer}>
|
|
36
|
+
<Image imageSize={Dimensions.get('window').width * 0.1} generalStyle={styles.avatar} defaultIconSize={25} resizeMode="contain" source={{
|
|
37
|
+
uri: baseUrl + avatar,
|
|
38
|
+
}}/>
|
|
39
|
+
</View>
|
|
40
|
+
<View style={styles.cardContainer}>
|
|
41
|
+
<Text style={styles.author}>
|
|
42
|
+
{`${author} ${eventText} - ${formatDateTime(eventTime, I18n.t('Base_DateTimeFormat'))}`}
|
|
43
|
+
</Text>
|
|
44
|
+
{type === mailMessageTypes.comment && (<MailMessageCommentCard subject={subject} files={files} value={body} flags={flags} navigation={navigation} relatedId={relatedId} relatedModel={relatedModel}/>)}
|
|
45
|
+
{type === mailMessageTypes.notificaiton && (<MailMessageNotificationCard title={title} tracks={JSON.parse(body ?? '{}').tracks} tag={JSON.parse(body ?? '{}').tags[0]} flags={flags} relatedId={relatedId} relatedModel={relatedModel}/>)}
|
|
46
|
+
</View>
|
|
47
|
+
</View>);
|
|
48
|
+
};
|
|
49
|
+
const getStyles = Colors => StyleSheet.create({
|
|
50
|
+
avatarContainer: {
|
|
51
|
+
padding: 10,
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
justifyContent: 'flex-start',
|
|
54
|
+
},
|
|
55
|
+
avatar: {
|
|
56
|
+
alignSelf: 'center',
|
|
57
|
+
justifyContent: 'center',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
backgroundColor: Colors.backgroundColor,
|
|
60
|
+
borderRadius: Dimensions.get('window').width * 0.12,
|
|
61
|
+
width: Dimensions.get('window').width * 0.12,
|
|
62
|
+
height: Dimensions.get('window').width * 0.12,
|
|
63
|
+
},
|
|
64
|
+
author: {
|
|
65
|
+
width: '100%',
|
|
66
|
+
fontSize: 12,
|
|
67
|
+
paddingLeft: 10,
|
|
68
|
+
},
|
|
69
|
+
cardContainer: {
|
|
70
|
+
width: Dimensions.get('window').width * 0.83,
|
|
71
|
+
overflow: 'hidden',
|
|
72
|
+
},
|
|
73
|
+
container: {
|
|
74
|
+
flexDirection: 'row',
|
|
75
|
+
marginBottom: 10,
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
export default MailMessageCard;
|
|
79
|
+
//# sourceMappingURL=MailMessageCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MailMessageCard.js","sourceRoot":"","sources":["../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: number;
|
|
4
|
+
subject?: string;
|
|
5
|
+
files: [any];
|
|
6
|
+
value: string;
|
|
7
|
+
flags?: any;
|
|
8
|
+
style?: any;
|
|
9
|
+
navigation?: any;
|
|
10
|
+
}
|
|
11
|
+
declare const MailMessageCommentCard: ({ relatedModel, relatedId, subject, files, value, flags, style, navigation, }: MailMessageCommentCardProps) => JSX.Element;
|
|
12
|
+
export default MailMessageCommentCard;
|