@axelor/aos-mobile-core 8.0.7 → 8.1.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 +3 -22
- package/lib/api/login-api.js +3 -3
- package/lib/api/login-api.js.map +1 -1
- package/lib/api/metafile-api.js +1 -1
- package/lib/api/metafile-api.js.map +1 -1
- package/lib/apiProviders/Standard/ObjectFieldsProvider.d.ts +1 -1
- package/lib/apiProviders/Standard/requests.helper.d.ts +1 -0
- package/lib/apiProviders/Standard/requests.helper.js +3 -0
- package/lib/apiProviders/Standard/requests.helper.js.map +1 -1
- package/lib/apiProviders/utils.js +14 -8
- package/lib/apiProviders/utils.js.map +1 -1
- package/lib/app/Application.d.ts +3 -2
- package/lib/app/Application.js +7 -3
- package/lib/app/Application.js.map +1 -1
- package/lib/app/ContextedApplication.d.ts +2 -3
- package/lib/app/ContextedApplication.js +9 -4
- package/lib/app/ContextedApplication.js.map +1 -1
- package/lib/app/ContextsProvider.d.ts +1 -3
- package/lib/app/ContextsProvider.js +26 -15
- package/lib/app/ContextsProvider.js.map +1 -1
- package/lib/app/RootNavigator.d.ts +3 -4
- package/lib/app/RootNavigator.js +4 -5
- package/lib/app/RootNavigator.js.map +1 -1
- package/lib/app/context.helper.d.ts +3 -3
- package/lib/app/context.helper.js +50 -0
- package/lib/app/context.helper.js.map +1 -1
- package/lib/app/index.d.ts +1 -1
- package/lib/app/index.js +1 -0
- package/lib/app/index.js.map +1 -1
- package/lib/app/modules/ModuleProvider.d.ts +18 -0
- package/lib/app/modules/ModuleProvider.js +73 -0
- package/lib/app/modules/ModuleProvider.js.map +1 -0
- package/lib/app/modules/index.d.ts +2 -0
- package/lib/app/modules/index.js +20 -0
- package/lib/app/modules/index.js.map +1 -0
- package/lib/app/{Module.d.ts → modules/types.d.ts} +5 -2
- package/lib/app/{Module.js → modules/types.js} +1 -1
- package/lib/app/modules/types.js.map +1 -0
- package/lib/auth/api/config-api.d.ts +1 -0
- package/lib/auth/api/config-api.js +26 -0
- package/lib/auth/api/config-api.js.map +1 -0
- package/lib/auth/components/molecules/DashboardsCard/DashboardsCard.d.ts +5 -0
- package/lib/auth/components/molecules/DashboardsCard/DashboardsCard.js +49 -0
- package/lib/auth/components/molecules/DashboardsCard/DashboardsCard.js.map +1 -0
- package/lib/auth/components/molecules/NavigationToolsButton/NavigationToolsButton.d.ts +3 -0
- package/lib/auth/components/molecules/NavigationToolsButton/NavigationToolsButton.js +60 -0
- package/lib/auth/components/molecules/NavigationToolsButton/NavigationToolsButton.js.map +1 -0
- package/lib/auth/components/molecules/ShortcutsCard/ShortcutsCard.d.ts +7 -0
- package/lib/auth/components/molecules/ShortcutsCard/ShortcutsCard.js +71 -0
- package/lib/auth/components/molecules/ShortcutsCard/ShortcutsCard.js.map +1 -0
- package/lib/auth/components/molecules/TranslationsButton/TranslationsButton.d.ts +2 -1
- package/lib/auth/components/molecules/TranslationsButton/TranslationsButton.js +5 -3
- package/lib/auth/components/molecules/TranslationsButton/TranslationsButton.js.map +1 -1
- package/lib/auth/components/molecules/UserCard/UserCard.d.ts +6 -0
- package/lib/auth/components/molecules/UserCard/UserCard.js +105 -0
- package/lib/auth/components/molecules/UserCard/UserCard.js.map +1 -0
- package/lib/auth/components/molecules/index.d.ts +4 -0
- package/lib/auth/components/molecules/index.js +4 -0
- package/lib/auth/components/molecules/index.js.map +1 -1
- package/lib/auth/features/companySlice.d.ts +1 -10
- package/lib/auth/features/configSlice.d.ts +3 -11
- package/lib/auth/features/configSlice.js +20 -0
- package/lib/auth/features/configSlice.js.map +1 -1
- package/lib/auth/features/localizationSlice.d.ts +1 -10
- package/lib/auth/features/userSlice.d.ts +3 -21
- package/lib/auth/i18n/en.json +3 -1
- package/lib/auth/i18n/fr.json +3 -1
- package/lib/auth/index.d.ts +1 -1
- package/lib/auth/models/objectFields.js +4 -1
- package/lib/auth/models/objectFields.js.map +1 -1
- package/lib/auth/screens/SettingsScreen.d.ts +2 -1
- package/lib/auth/screens/SettingsScreen.js +45 -13
- package/lib/auth/screens/SettingsScreen.js.map +1 -1
- package/lib/auth/screens/UserScreen.d.ts +2 -1
- package/lib/auth/screens/UserScreen.js +18 -75
- package/lib/auth/screens/UserScreen.js.map +1 -1
- package/lib/components/external/Camera/Camera.d.ts +2 -1
- package/lib/components/external/Camera/Camera.js +49 -64
- package/lib/components/external/Camera/Camera.js.map +1 -1
- package/lib/components/external/Camera/CaptureButton.d.ts +1 -1
- package/lib/components/external/Camera/CaptureButton.js.map +1 -1
- package/lib/components/external/CodeHighlighter/CodeHighlighter.d.ts +2 -1
- package/lib/components/external/PlanningView/PlanningView.d.ts +1 -1
- package/lib/components/external/Stopwatch/Stopwatch.d.ts +2 -1
- package/lib/components/external/Timer/Timer.d.ts +2 -2
- package/lib/components/external/Timer/Timer.js +3 -2
- package/lib/components/external/Timer/Timer.js.map +1 -1
- package/lib/components/external/Toast/Toast.d.ts +2 -1
- package/lib/components/external/WebView/WebView.d.ts +9 -0
- package/lib/components/external/WebView/WebView.js +52 -0
- package/lib/components/external/WebView/WebView.js.map +1 -0
- package/lib/components/external/index.d.ts +1 -1
- package/lib/components/external/index.js +1 -1
- package/lib/components/external/index.js.map +1 -1
- package/lib/components/molecules/CameraButton/CameraButton.d.ts +2 -1
- package/lib/components/molecules/DateDisplay/DateDisplay.d.ts +2 -1
- package/lib/components/molecules/DatePicker/DatePicker.d.ts +2 -1
- package/lib/components/molecules/FocusScreen/FocusScreen.d.ts +2 -1
- package/lib/components/molecules/HeaderBand/HeaderBand.d.ts +2 -1
- package/lib/components/molecules/HeaderBand/HeaderBand.js +31 -8
- package/lib/components/molecules/HeaderBand/HeaderBand.js.map +1 -1
- package/lib/components/molecules/HeaderOptionsMenuItem/HeaderOptionMenuItem.d.ts +2 -2
- package/lib/components/molecules/InputBarCodeCard/InputBarCodeCard.d.ts +2 -1
- package/lib/components/molecules/MailMessageReadIcon/MailMessageReadIcon.d.ts +2 -1
- package/lib/components/molecules/PeriodDisplay/PeriodDisplay.d.ts +2 -1
- package/lib/components/molecules/TrackItem/TrackItem.d.ts +2 -1
- package/lib/components/molecules/UploadFileInput/UploadFileInput.d.ts +2 -1
- package/lib/components/organisms/AOSImage/AOSImage.d.ts +2 -1
- package/lib/components/organisms/AOSImageBubble/AOSImageBubble.d.ts +2 -1
- package/lib/components/organisms/AnomalyBubble/AnomalyBubble.d.ts +2 -1
- package/lib/components/organisms/AnomalyList/AnomalyList.d.ts +2 -1
- package/lib/components/organisms/DateInput/DateInput.d.ts +2 -1
- package/lib/components/organisms/HeaderBandList/HeaderBandList.d.ts +2 -1
- package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.d.ts +2 -1
- package/lib/components/organisms/MailMessageCard/MailMessageCard.d.ts +2 -1
- package/lib/components/organisms/MailMessageCommentCard/MailMessageCommentCard.d.ts +2 -1
- package/lib/components/organisms/MailMessageNotificationCard/MailMessageNotificationCard.d.ts +2 -1
- package/lib/components/organisms/ScannerAutocompleteSearch/ScannerAutocompleteSearch.d.ts +2 -1
- package/lib/components/organisms/SignatureInput/PictureIcon.d.ts +9 -0
- package/lib/components/organisms/SignatureInput/PictureIcon.js +35 -0
- package/lib/components/organisms/SignatureInput/PictureIcon.js.map +1 -0
- package/lib/components/organisms/SignatureInput/SignatureInput.d.ts +16 -0
- package/lib/components/organisms/SignatureInput/SignatureInput.js +197 -0
- package/lib/components/organisms/SignatureInput/SignatureInput.js.map +1 -0
- package/lib/components/organisms/index.d.ts +1 -0
- package/lib/components/organisms/index.js +1 -0
- package/lib/components/organisms/index.js.map +1 -1
- package/lib/components/pages/CustomFieldForm/CustomFieldForm.d.ts +2 -1
- package/lib/components/pages/CustomFieldForm/CustomFieldForm.js +7 -5
- package/lib/components/pages/CustomFieldForm/CustomFieldForm.js.map +1 -1
- package/lib/components/pages/FormView/Alerts/ConfirmationPopup.d.ts +7 -0
- package/lib/components/pages/FormView/Alerts/ConfirmationPopup.js +45 -0
- package/lib/components/pages/FormView/Alerts/ConfirmationPopup.js.map +1 -0
- package/lib/components/pages/FormView/Alerts/ConstraintsValidatorPopup.d.ts +2 -1
- package/lib/components/pages/FormView/Alerts/index.d.ts +1 -0
- package/lib/components/pages/FormView/Alerts/index.js +1 -0
- package/lib/components/pages/FormView/Alerts/index.js.map +1 -1
- package/lib/components/pages/FormView/Buttons/FloatingTools.d.ts +14 -0
- package/lib/components/pages/FormView/Buttons/FloatingTools.js +103 -0
- package/lib/components/pages/FormView/Buttons/FloatingTools.js.map +1 -0
- package/lib/components/pages/FormView/Buttons/index.d.ts +1 -0
- package/lib/components/pages/FormView/Buttons/index.js +19 -0
- package/lib/components/pages/FormView/Buttons/index.js.map +1 -0
- package/lib/components/pages/FormView/Components/Field.d.ts +3 -1
- package/lib/components/pages/FormView/Components/Field.js +14 -6
- package/lib/components/pages/FormView/Components/Field.js.map +1 -1
- package/lib/components/pages/FormView/Components/Panel.d.ts +2 -2
- package/lib/components/pages/FormView/Custom/CustomButton.d.ts +2 -1
- package/lib/components/pages/FormView/Custom/CustomPasswordInput.d.ts +2 -1
- package/lib/components/pages/FormView/Custom/CustomPicker.d.ts +2 -1
- package/lib/components/pages/FormView/Custom/CustomSearchBar.d.ts +2 -1
- package/lib/components/pages/FormView/FormView.d.ts +6 -2
- package/lib/components/pages/FormView/FormView.js +96 -119
- package/lib/components/pages/FormView/FormView.js.map +1 -1
- package/lib/components/templates/AttachedFilesView/AttachedFilesView.d.ts +5 -2
- package/lib/components/templates/AttachedFilesView/AttachedFilesView.js +2 -2
- package/lib/components/templates/AttachedFilesView/AttachedFilesView.js.map +1 -1
- package/lib/components/templates/MailMessageView/MailMessageView.d.ts +5 -2
- package/lib/components/templates/MailMessageView/MailMessageView.js +2 -2
- package/lib/components/templates/MailMessageView/MailMessageView.js.map +1 -1
- package/lib/components/templates/PeriodInput/PeriodInput.d.ts +15 -0
- package/lib/components/templates/PeriodInput/PeriodInput.js +85 -0
- package/lib/components/templates/PeriodInput/PeriodInput.js.map +1 -0
- package/lib/components/templates/PopupApplicationInformation/PopupApplicationInformation.d.ts +2 -1
- package/lib/components/templates/PopupMinimalRequiredVersion/PopupMinimalRequiredVersion.d.ts +2 -1
- package/lib/components/templates/SearchListView/SearchListView.d.ts +27 -0
- package/lib/components/templates/SearchListView/SearchListView.js +81 -0
- package/lib/components/templates/SearchListView/SearchListView.js.map +1 -0
- package/lib/components/templates/SearchTreeView/SearchTreeView.d.ts +38 -0
- package/lib/components/templates/SearchTreeView/SearchTreeView.js +110 -0
- package/lib/components/templates/SearchTreeView/SearchTreeView.js.map +1 -0
- package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.d.ts +2 -1
- package/lib/components/templates/UserSearchBar/UserSearchBar.d.ts +2 -1
- package/lib/components/templates/index.d.ts +3 -0
- package/lib/components/templates/index.js +3 -0
- package/lib/components/templates/index.js.map +1 -1
- package/lib/dashboards/api.helpers.d.ts +1 -0
- package/lib/dashboards/api.helpers.js +5 -0
- package/lib/dashboards/api.helpers.js.map +1 -1
- package/lib/dashboards/component/AOPChart/AOPChart.d.ts +6 -0
- package/lib/dashboards/component/AOPChart/AOPChart.js +67 -0
- package/lib/dashboards/component/AOPChart/AOPChart.js.map +1 -0
- package/lib/dashboards/component/AOPChart/api.helpers.d.ts +16 -0
- package/lib/dashboards/component/AOPChart/api.helpers.js +59 -0
- package/lib/dashboards/component/AOPChart/api.helpers.js.map +1 -0
- package/lib/dashboards/component/AOPChart/format.helpers.d.ts +11 -0
- package/lib/dashboards/component/AOPChart/format.helpers.js +47 -0
- package/lib/dashboards/component/AOPChart/format.helpers.js.map +1 -0
- package/lib/dashboards/component/RefreshChart/RefreshChart.d.ts +8 -0
- package/lib/dashboards/component/RefreshChart/RefreshChart.js +83 -0
- package/lib/dashboards/component/RefreshChart/RefreshChart.js.map +1 -0
- package/lib/dashboards/component/index.d.ts +2 -0
- package/lib/dashboards/component/index.js +20 -0
- package/lib/dashboards/component/index.js.map +1 -0
- package/lib/dashboards/index.d.ts +2 -0
- package/lib/dashboards/index.js +20 -0
- package/lib/dashboards/index.js.map +1 -0
- package/lib/dashboards/menu.helpers.d.ts +1 -24
- package/lib/dashboards/menu.helpers.js +0 -9
- package/lib/dashboards/menu.helpers.js.map +1 -1
- package/lib/dashboards/view/DashboardScreen.d.ts +7 -3
- package/lib/dashboards/view/DashboardScreen.js +4 -65
- package/lib/dashboards/view/DashboardScreen.js.map +1 -1
- package/lib/dashboards/view/DashboardView.d.ts +10 -0
- package/lib/dashboards/view/DashboardView.js +87 -0
- package/lib/dashboards/view/DashboardView.js.map +1 -0
- package/lib/dashboards/view/index.d.ts +1 -0
- package/lib/dashboards/view/index.js +1 -0
- package/lib/dashboards/view/index.js.map +1 -1
- package/lib/features/appConfigSlice.d.ts +1 -10
- package/lib/features/attachedFilesSlice.d.ts +3 -30
- package/lib/features/authSlice.d.ts +39 -34
- package/lib/features/authSlice.js +7 -2
- package/lib/features/authSlice.js.map +1 -1
- package/lib/features/formSlice.d.ts +5 -31
- package/lib/features/formSlice.js +10 -1
- package/lib/features/formSlice.js.map +1 -1
- package/lib/features/index.d.ts +2 -0
- package/lib/features/index.js +2 -0
- package/lib/features/index.js.map +1 -1
- package/lib/features/mailMessageSlice.d.ts +8 -80
- package/lib/features/metaJsonFieldSlice.d.ts +5 -30
- package/lib/features/metaJsonFieldSlice.js +14 -1
- package/lib/features/metaJsonFieldSlice.js.map +1 -1
- package/lib/features/metaModuleSlice.d.ts +1 -10
- package/lib/features/metafileSlice.d.ts +1 -10
- package/lib/features/mobileDashboardSlice.d.ts +1 -10
- package/lib/features/mobileWebViewSlice.d.ts +4 -0
- package/lib/features/mobileWebViewSlice.js +43 -0
- package/lib/features/mobileWebViewSlice.js.map +1 -0
- package/lib/features/onlineSlice.d.ts +3 -3
- package/lib/features/permissionSlice.d.ts +6 -0
- package/lib/features/permissionSlice.js +59 -0
- package/lib/features/permissionSlice.js.map +1 -0
- package/lib/features/userSlice.d.ts +1 -10
- package/lib/forms/action.helpers.d.ts +3 -0
- package/lib/forms/action.helpers.js +106 -0
- package/lib/forms/action.helpers.js.map +1 -0
- package/lib/forms/api.helpers.d.ts +4 -0
- package/lib/forms/api.helpers.js +13 -0
- package/lib/forms/api.helpers.js.map +1 -1
- package/lib/forms/display.helpers.d.ts +1 -2
- package/lib/forms/display.helpers.js +2 -19
- package/lib/forms/display.helpers.js.map +1 -1
- package/lib/forms/index.d.ts +1 -0
- package/lib/forms/index.js +1 -0
- package/lib/forms/index.js.map +1 -1
- package/lib/forms/studio/api.helpers.d.ts +3 -0
- package/lib/forms/studio/api.helpers.js +26 -0
- package/lib/forms/studio/api.helpers.js.map +1 -1
- package/lib/forms/studio/display.helpers.d.ts +2 -1
- package/lib/forms/studio/display.helpers.js +10 -4
- package/lib/forms/studio/display.helpers.js.map +1 -1
- package/lib/forms/studio/index.d.ts +1 -0
- package/lib/forms/studio/index.js +1 -0
- package/lib/forms/studio/index.js.map +1 -1
- package/lib/forms/studio/permission.helpers.d.ts +3 -0
- package/lib/forms/studio/permission.helpers.js +59 -0
- package/lib/forms/studio/permission.helpers.js.map +1 -0
- package/lib/forms/types.d.ts +9 -5
- package/lib/header/HeaderBandContext.d.ts +2 -1
- package/lib/i18n/component/Translator.d.ts +19 -3
- package/lib/i18n/translations/en.json +17 -2
- package/lib/i18n/translations/fr.json +17 -2
- package/lib/index.d.ts +3 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/models/objectFields.js +17 -0
- package/lib/models/objectFields.js.map +1 -1
- package/lib/navigator/NavigationInformationsProvider.d.ts +33 -0
- package/lib/navigator/NavigationInformationsProvider.js +81 -0
- package/lib/navigator/NavigationInformationsProvider.js.map +1 -0
- package/lib/navigator/Navigator.d.ts +2 -4
- package/lib/navigator/Navigator.js +32 -11
- package/lib/navigator/Navigator.js.map +1 -1
- package/lib/navigator/drawer/AuthMenuIconButton.d.ts +2 -1
- package/lib/navigator/drawer/BackIcon.d.ts +2 -1
- package/lib/navigator/drawer/DrawerContent.d.ts +3 -3
- package/lib/navigator/drawer/DrawerContent.js +3 -2
- package/lib/navigator/drawer/DrawerContent.js.map +1 -1
- package/lib/navigator/drawer/DrawerToggleButton.d.ts +2 -1
- package/lib/navigator/drawer/Header.d.ts +2 -1
- package/lib/navigator/drawer/Menu.d.ts +2 -1
- package/lib/navigator/drawer/MenuIconButton.d.ts +2 -1
- package/lib/navigator/drawer/MenuItem.d.ts +2 -1
- package/lib/navigator/drawer/MenuItemEntry.d.ts +2 -1
- package/lib/navigator/drawer/MenuSeparator.d.ts +2 -1
- package/lib/navigator/drawer/MenuTitle.d.ts +2 -1
- package/lib/navigator/drawer/SubMenuItem.d.ts +2 -1
- package/lib/navigator/drawer/SubMenuItemList.d.ts +2 -1
- package/lib/navigator/menu.helper.d.ts +4 -0
- package/lib/navigator/menu.helper.js +21 -0
- package/lib/navigator/menu.helper.js.map +1 -1
- package/lib/navigator/module.helper.d.ts +1 -2
- package/lib/navigator/module.helper.js.map +1 -1
- package/lib/permissions/api.helpers.d.ts +6 -0
- package/lib/permissions/api.helpers.js +64 -0
- package/lib/permissions/api.helpers.js.map +1 -0
- package/lib/permissions/format.helpers.d.ts +5 -0
- package/lib/permissions/format.helpers.js +81 -0
- package/lib/permissions/format.helpers.js.map +1 -0
- package/lib/permissions/hooks.d.ts +14 -0
- package/lib/permissions/hooks.js +97 -0
- package/lib/permissions/hooks.js.map +1 -0
- package/lib/permissions/index.d.ts +1 -0
- package/lib/permissions/index.js +19 -0
- package/lib/permissions/index.js.map +1 -0
- package/lib/permissions/type.helpers.d.ts +30 -0
- package/lib/permissions/type.helpers.js +34 -0
- package/lib/permissions/type.helpers.js.map +1 -0
- package/lib/redux/hooks.d.ts +2 -4
- package/lib/redux/hooks.js.map +1 -1
- package/lib/redux/store.d.ts +3 -1
- package/lib/screens/AttachedFilesScreen.d.ts +2 -1
- package/lib/screens/BarcodeDisplayScreen.d.ts +2 -1
- package/lib/screens/ErrorScreen.d.ts +2 -1
- package/lib/screens/JsonFieldScreen.d.ts +2 -1
- package/lib/screens/LoginScreen.d.ts +2 -1
- package/lib/screens/LoginScreen.js +1 -2
- package/lib/screens/LoginScreen.js.map +1 -1
- package/lib/screens/MailMessageScreen.d.ts +2 -1
- package/lib/screens/SessionManagementScreen.d.ts +2 -1
- package/lib/screens/SessionManagementScreen.js +2 -1
- package/lib/screens/SessionManagementScreen.js.map +1 -1
- package/lib/selections/SelectionProvider.d.ts +4 -0
- package/lib/selections/SelectionProvider.js +79 -0
- package/lib/selections/SelectionProvider.js.map +1 -0
- package/lib/selections/api.helpers.d.ts +3 -0
- package/lib/selections/api.helpers.js +31 -0
- package/lib/selections/api.helpers.js.map +1 -0
- package/lib/selections/format.helpers.d.ts +6 -0
- package/lib/selections/format.helpers.js +41 -0
- package/lib/selections/format.helpers.js.map +1 -0
- package/lib/selections/hooks.d.ts +8 -0
- package/lib/selections/hooks.js +93 -0
- package/lib/selections/hooks.js.map +1 -0
- package/lib/selections/index.d.ts +3 -0
- package/lib/selections/index.js +21 -0
- package/lib/selections/index.js.map +1 -0
- package/lib/selections/types.d.ts +61 -0
- package/lib/selections/types.js +19 -0
- package/lib/selections/types.js.map +1 -0
- package/lib/sessions/components/alerts/PopupCreateSession.d.ts +2 -1
- package/lib/sessions/components/alerts/PopupCreateSession.js +2 -2
- package/lib/sessions/components/alerts/PopupCreateSession.js.map +1 -1
- package/lib/sessions/components/alerts/PopupEditSession.d.ts +2 -1
- package/lib/sessions/components/alerts/PopupSession.d.ts +2 -1
- package/lib/sessions/components/alerts/PopupSession.js +1 -0
- package/lib/sessions/components/alerts/PopupSession.js.map +1 -1
- package/lib/sessions/components/display/LogoImage.d.ts +2 -1
- package/lib/sessions/components/display/SessionCard.d.ts +2 -1
- package/lib/sessions/components/display/SessionListCard.d.ts +2 -1
- package/lib/sessions/components/error/ErrorText.d.ts +2 -1
- package/lib/sessions/components/inputs/DefaultCheckbox.d.ts +2 -1
- package/lib/sessions/components/inputs/PasswordInput.d.ts +2 -1
- package/lib/sessions/components/inputs/SessionInputs.d.ts +2 -1
- package/lib/sessions/components/inputs/SessionInputs.js +2 -2
- package/lib/sessions/components/inputs/SessionInputs.js.map +1 -1
- package/lib/sessions/components/inputs/SessionNameInput.d.ts +2 -1
- package/lib/sessions/components/inputs/UrlInput.d.ts +2 -1
- package/lib/sessions/components/inputs/UsernameInput.d.ts +2 -1
- package/lib/tools/FilePicker.d.ts +1 -1
- package/lib/tools/FilePicker.js +12 -14
- package/lib/tools/FilePicker.js.map +1 -1
- package/lib/tools/LinkingProvider.d.ts +5 -0
- package/lib/tools/LinkingProvider.js +8 -1
- package/lib/tools/LinkingProvider.js.map +1 -1
- package/lib/tools/index.d.ts +1 -0
- package/lib/tools/index.js +1 -0
- package/lib/tools/index.js.map +1 -1
- package/lib/tools/linking.helper.d.ts +5 -0
- package/lib/tools/linking.helper.js +12 -0
- package/lib/tools/linking.helper.js.map +1 -1
- package/lib/webViews/api.helpers.d.ts +4 -0
- package/lib/webViews/api.helpers.js +29 -0
- package/lib/webViews/api.helpers.js.map +1 -0
- package/lib/webViews/display.helpers.d.ts +1 -0
- package/lib/webViews/display.helpers.js +21 -0
- package/lib/webViews/display.helpers.js.map +1 -0
- package/lib/webViews/menu.helper.d.ts +29 -0
- package/lib/webViews/menu.helper.js +77 -0
- package/lib/webViews/menu.helper.js.map +1 -0
- package/lib/webViews/view/WebViewScreen.d.ts +8 -0
- package/lib/webViews/view/WebViewScreen.js +68 -0
- package/lib/webViews/view/WebViewScreen.js.map +1 -0
- package/lib/webViews/view/index.d.ts +1 -0
- package/lib/webViews/view/index.js +19 -0
- package/lib/webViews/view/index.js.map +1 -0
- package/package.json +51 -60
- package/lib/app/Module.js.map +0 -1
- package/lib/components/external/CameraScanner/CameraScanner.d.ts +0 -2
- package/lib/components/external/CameraScanner/CameraScanner.js +0 -88
- package/lib/components/external/CameraScanner/CameraScanner.js.map +0 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { default as AttachedFilesView } from "./AttachedFilesView/AttachedFilesView";
|
|
2
2
|
export { default as MailMessageView } from "./MailMessageView/MailMessageView";
|
|
3
|
+
export { default as PeriodInput } from "./PeriodInput/PeriodInput";
|
|
3
4
|
export { default as PopupApplicationInformation } from "./PopupApplicationInformation/PopupApplicationInformation";
|
|
4
5
|
export { default as PopupMinimalRequiredVersion } from "./PopupMinimalRequiredVersion/PopupMinimalRequiredVersion";
|
|
6
|
+
export { default as SearchListView } from "./SearchListView/SearchListView";
|
|
7
|
+
export { default as SearchTreeView } from "./SearchTreeView/SearchTreeView";
|
|
5
8
|
export { default as SocialNetworkLinks } from "./SocialNetworkLinks/SocialNetworkLinks";
|
|
6
9
|
export { default as UserSearchBar } from "./UserSearchBar/UserSearchBar";
|
|
@@ -17,8 +17,11 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export { default as AttachedFilesView } from './AttachedFilesView/AttachedFilesView';
|
|
19
19
|
export { default as MailMessageView } from './MailMessageView/MailMessageView';
|
|
20
|
+
export { default as PeriodInput } from './PeriodInput/PeriodInput';
|
|
20
21
|
export { default as PopupApplicationInformation } from './PopupApplicationInformation/PopupApplicationInformation';
|
|
21
22
|
export { default as PopupMinimalRequiredVersion } from './PopupMinimalRequiredVersion/PopupMinimalRequiredVersion';
|
|
23
|
+
export { default as SearchListView } from './SearchListView/SearchListView';
|
|
24
|
+
export { default as SearchTreeView } from './SearchTreeView/SearchTreeView';
|
|
22
25
|
export { default as SocialNetworkLinks } from './SocialNetworkLinks/SocialNetworkLinks';
|
|
23
26
|
export { default as UserSearchBar } from './UserSearchBar/UserSearchBar';
|
|
24
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/templates/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAC,OAAO,IAAI,2BAA2B,EAAC,MAAM,2DAA2D,CAAC;AACjH,OAAO,EAAC,OAAO,IAAI,2BAA2B,EAAC,MAAM,2DAA2D,CAAC;AACjH,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,+BAA+B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/templates/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,2BAA2B,EAAC,MAAM,2DAA2D,CAAC;AACjH,OAAO,EAAC,OAAO,IAAI,2BAA2B,EAAC,MAAM,2DAA2D,CAAC;AACjH,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,+BAA+B,CAAC"}
|
|
@@ -29,4 +29,9 @@ export async function fetchDashboardConfigs() {
|
|
|
29
29
|
url: 'ws/rest/com.axelor.apps.mobilesettings.db.MobileDashboard',
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
+
export async function fetchChartById(mobileChartId) {
|
|
33
|
+
return axiosApiProvider.get({
|
|
34
|
+
url: `/ws/aos/mobilechart/${mobileChartId}`,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
32
37
|
//# sourceMappingURL=api.helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.helpers.js","sourceRoot":"","sources":["../../src/dashboards/api.helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAEjD,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,EAAC,EAAE,EAAe;IACrD,IAAI,EAAE,IAAI,IAAI,EAAE;QACd,OAAO,IAAI,CAAC;KACb;IAED,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,2BAA2B,EAAE,EAAE;KACrC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB;IACzC,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,2DAA2D;KACjE,CAAC,CAAC;AACL,CAAC"}
|
|
1
|
+
{"version":3,"file":"api.helpers.js","sourceRoot":"","sources":["../../src/dashboards/api.helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAEjD,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,EAAC,EAAE,EAAe;IACrD,IAAI,EAAE,IAAI,IAAI,EAAE;QACd,OAAO,IAAI,CAAC;KACb;IAED,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,2BAA2B,EAAE,EAAE;KACrC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB;IACzC,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,2DAA2D;KACjE,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,aAAa;IAChD,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,uBAAuB,aAAa,EAAE;KAC5C,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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, { useEffect, useState } from 'react';
|
|
19
|
+
import { ChartRender } from '@axelor/aos-mobile-ui';
|
|
20
|
+
import { fetchActionView, fetchChartDataset, fetchTypeChart, getChartParameter, } from './api.helpers';
|
|
21
|
+
import { transformData } from './format.helpers';
|
|
22
|
+
const DEFAULT_CHART_CONFIG = { type: '', dataset: [], title: '' };
|
|
23
|
+
const AOPChart = ({ actionViewName, widthGraph, }) => {
|
|
24
|
+
const [chart, setChart] = useState(DEFAULT_CHART_CONFIG);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
const fetchChartData = async () => {
|
|
27
|
+
let result = { ...DEFAULT_CHART_CONFIG };
|
|
28
|
+
try {
|
|
29
|
+
const actionViewResponse = await fetchActionView({
|
|
30
|
+
actionViewName: actionViewName,
|
|
31
|
+
});
|
|
32
|
+
const context = actionViewResponse?.data?.data[0]?.view?.context;
|
|
33
|
+
const chartName = actionViewResponse?.data?.data[0]?.view.views[0].name;
|
|
34
|
+
const typeResponse = await fetchTypeChart({ chartName: chartName });
|
|
35
|
+
result.title = typeResponse?.data?.data?.title;
|
|
36
|
+
result.type = typeResponse?.data?.data?.series[0].type;
|
|
37
|
+
const onInit = typeResponse?.data?.data?.onInit;
|
|
38
|
+
let parameter = null;
|
|
39
|
+
if (onInit) {
|
|
40
|
+
const paramResponse = await getChartParameter({
|
|
41
|
+
chartName,
|
|
42
|
+
action: onInit,
|
|
43
|
+
context: context,
|
|
44
|
+
});
|
|
45
|
+
parameter = paramResponse?.data?.data[0].values;
|
|
46
|
+
}
|
|
47
|
+
const datasetResponse = await fetchChartDataset({
|
|
48
|
+
chartName,
|
|
49
|
+
parameter,
|
|
50
|
+
context,
|
|
51
|
+
});
|
|
52
|
+
result.dataset = datasetResponse?.data?.data?.dataset;
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
result = { ...DEFAULT_CHART_CONFIG };
|
|
56
|
+
}
|
|
57
|
+
setChart(result);
|
|
58
|
+
};
|
|
59
|
+
fetchChartData();
|
|
60
|
+
}, [actionViewName]);
|
|
61
|
+
if (chart.dataset?.length <= 0) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return (<ChartRender dataList={transformData(chart.dataset)} title={chart.title} type={chart.type} widthGraph={widthGraph}/>);
|
|
65
|
+
};
|
|
66
|
+
export default AOPChart;
|
|
67
|
+
//# sourceMappingURL=AOPChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AOPChart.js","sourceRoot":"","sources":["../../../../src/dashboards/component/AOPChart/AOPChart.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACjD,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EA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AC;wBAC5C,SAAS;wBACT,MAAM,EAAE,MAAM;wBACd,OAAO,EAAE,OAAO;qBACjB,CAAC,CAAC;oBACH,SAAS,GAAG,aAAa,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;iBACjD;gBAED,MAAM,eAAe,GAAG,MAAM,iBAAiB,CAAC;oBAC9C,SAAS;oBACT,SAAS;oBACT,OAAO;iBACR,CAAC,CAAC;gBACH,MAAM,CAAC,OAAO,GAAG,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC;aACvD;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,GAAG,EAAC,GAAG,oBAAoB,EAAC,CAAC;aACpC;YAED,QAAQ,CAAC,MAAM,CAAC,CAAC;QACnB,CAAC,CAAC;QAEF,cAAc,EAAE,CAAC;IACnB,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC;IAErB,IAAI,KAAK,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE;QAC9B,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,CAAC,WAAW,CACV,QAAQ,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CACvC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CACnB,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,EACvB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function fetchActionView({ actionViewName }: {
|
|
2
|
+
actionViewName: any;
|
|
3
|
+
}): Promise<any>;
|
|
4
|
+
export declare function fetchTypeChart({ chartName }: {
|
|
5
|
+
chartName: string;
|
|
6
|
+
}): Promise<any>;
|
|
7
|
+
export declare function fetchChartDataset({ chartName, parameter, context }: {
|
|
8
|
+
chartName: any;
|
|
9
|
+
parameter: any;
|
|
10
|
+
context: any;
|
|
11
|
+
}): Promise<any>;
|
|
12
|
+
export declare function getChartParameter({ action, chartName, context }: {
|
|
13
|
+
action: any;
|
|
14
|
+
chartName: any;
|
|
15
|
+
context: any;
|
|
16
|
+
}): Promise<any>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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 { axiosApiProvider } from '../../../apiProviders';
|
|
19
|
+
export async function fetchActionView({ actionViewName }) {
|
|
20
|
+
return axiosApiProvider.post({
|
|
21
|
+
url: `/ws/action/${actionViewName}`,
|
|
22
|
+
data: {
|
|
23
|
+
data: {
|
|
24
|
+
context: {
|
|
25
|
+
_id: null,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
model: 'com.axelor.meta.db.MetaAction',
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export async function fetchTypeChart({ chartName }) {
|
|
33
|
+
return axiosApiProvider.get({ url: `/ws/meta/chart/${chartName}` });
|
|
34
|
+
}
|
|
35
|
+
export async function fetchChartDataset({ chartName, parameter, context }) {
|
|
36
|
+
return axiosApiProvider.post({
|
|
37
|
+
url: `/ws/meta/chart/${chartName}`,
|
|
38
|
+
data: {
|
|
39
|
+
data: { ...parameter, ...context },
|
|
40
|
+
fields: ['dataset'],
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
export async function getChartParameter({ action, chartName, context }) {
|
|
45
|
+
return axiosApiProvider.post({
|
|
46
|
+
url: 'ws/action',
|
|
47
|
+
data: {
|
|
48
|
+
action: action,
|
|
49
|
+
data: {
|
|
50
|
+
context: {
|
|
51
|
+
...context,
|
|
52
|
+
_chart: chartName,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
model: 'com.axelor.script.ScriptBindings',
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=api.helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.helpers.js","sourceRoot":"","sources":["../../../../src/dashboards/component/AOPChart/api.helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AAEvD,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,EAAC,cAAc,EAAC;IACpD,OAAO,gBAAgB,CAAC,IAAI,CAAC;QAC3B,GAAG,EAAE,cAAc,cAAc,EAAE;QACnC,IAAI,EAAE;YACJ,IAAI,EAAE;gBACJ,OAAO,EAAE;oBACP,GAAG,EAAE,IAAI;iBACV;aACF;YACD,KAAK,EAAE,+BAA+B;SACvC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,EAAC,SAAS,EAAsB;IACnE,OAAO,gBAAgB,CAAC,GAAG,CAAC,EAAC,GAAG,EAAE,kBAAkB,SAAS,EAAE,EAAC,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAC;IACrE,OAAO,gBAAgB,CAAC,IAAI,CAAC;QAC3B,GAAG,EAAE,kBAAkB,SAAS,EAAE;QAClC,IAAI,EAAE;YACJ,IAAI,EAAE,EAAC,GAAG,SAAS,EAAE,GAAG,OAAO,EAAC;YAChC,MAAM,EAAE,CAAC,SAAS,CAAC;SACpB;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAC;IAClE,OAAO,gBAAgB,CAAC,IAAI,CAAC;QAC3B,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE;YACJ,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,OAAO,EAAE;oBACP,GAAG,OAAO;oBACV,MAAM,EAAE,SAAS;iBAClB;aACF;YACD,KAAK,EAAE,kCAAkC;SAC1C;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface Data {
|
|
2
|
+
label: string;
|
|
3
|
+
value: number;
|
|
4
|
+
}
|
|
5
|
+
interface AxesKeys {
|
|
6
|
+
valueKey: string;
|
|
7
|
+
labelKey: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const getAxesKeys: (data: any) => AxesKeys;
|
|
10
|
+
export declare const transformData: (data: any[]) => Data[][];
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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 const getAxesKeys = (data) => {
|
|
19
|
+
const sample = data[0];
|
|
20
|
+
let valueKey = '';
|
|
21
|
+
let labelKey = '';
|
|
22
|
+
Object.keys(sample).forEach(key => {
|
|
23
|
+
const value = sample[key];
|
|
24
|
+
if (!isNaN(parseFloat(value)) && valueKey === '') {
|
|
25
|
+
valueKey = key;
|
|
26
|
+
}
|
|
27
|
+
else if (labelKey === '') {
|
|
28
|
+
labelKey = key;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
if (valueKey === '' || labelKey === '') {
|
|
32
|
+
throw new Error("Couldn't find appropriate keys for value and label in data.");
|
|
33
|
+
}
|
|
34
|
+
return { valueKey, labelKey };
|
|
35
|
+
};
|
|
36
|
+
export const transformData = (data) => {
|
|
37
|
+
if (!Array.isArray(data) || data.length === 0) {
|
|
38
|
+
return [[]];
|
|
39
|
+
}
|
|
40
|
+
const { valueKey, labelKey } = getAxesKeys(data);
|
|
41
|
+
const transformed = data.map(item => ({
|
|
42
|
+
label: item[labelKey],
|
|
43
|
+
value: parseFloat(item[valueKey]) || 0,
|
|
44
|
+
}));
|
|
45
|
+
return [transformed];
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=format.helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.helpers.js","sourceRoot":"","sources":["../../../../src/dashboards/component/AOPChart/format.helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAYH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAS,EAAY,EAAE;IACjD,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACvB,IAAI,QAAQ,GAAW,EAAE,CAAC;IAC1B,IAAI,QAAQ,GAA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
|
|
5
|
+
hideCardBackground?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const RefreshChart: ({ style, chartId, hideCardBackground, }: RefreshChartProps) => React.JSX.Element;
|
|
8
|
+
export default RefreshChart;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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, { useEffect, useMemo, useState } from 'react';
|
|
19
|
+
import { StyleSheet, View } from 'react-native';
|
|
20
|
+
import { ChartRender, Icon } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { fetchChartById } from '../../api.helpers';
|
|
22
|
+
import AOPChart from '../AOPChart/AOPChart';
|
|
23
|
+
const DEFAULT_CONFIG = {
|
|
24
|
+
dataList: [],
|
|
25
|
+
chartName: null,
|
|
26
|
+
chartType: null,
|
|
27
|
+
actionViewName: null,
|
|
28
|
+
};
|
|
29
|
+
const RefreshChart = ({ style, chartId, hideCardBackground = false, }) => {
|
|
30
|
+
const [charConfig, setChartConfig] = useState(DEFAULT_CONFIG);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
refreshChart(chartId);
|
|
33
|
+
}, [chartId]);
|
|
34
|
+
const refreshChart = _chartId => {
|
|
35
|
+
fetchChartById(_chartId)
|
|
36
|
+
.then(res => {
|
|
37
|
+
const { data } = res;
|
|
38
|
+
if (data?.object?.metaActionName) {
|
|
39
|
+
setChartConfig({
|
|
40
|
+
...DEFAULT_CONFIG,
|
|
41
|
+
actionViewName: data.object.metaActionName,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
setChartConfig({
|
|
46
|
+
...DEFAULT_CONFIG,
|
|
47
|
+
dataList: [data.object.valueList],
|
|
48
|
+
chartName: data.object.chartName,
|
|
49
|
+
chartType: data.object.chartType,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
.catch(() => {
|
|
54
|
+
setChartConfig(DEFAULT_CONFIG);
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
const content = useMemo(() => {
|
|
58
|
+
if (charConfig.actionViewName) {
|
|
59
|
+
return <AOPChart actionViewName={charConfig.actionViewName}/>;
|
|
60
|
+
}
|
|
61
|
+
else if (charConfig.dataList.length > 0 && charConfig.chartType) {
|
|
62
|
+
return (<ChartRender dataList={charConfig.dataList} title={charConfig.chartName} type={charConfig.chartType} hideCardBackground={hideCardBackground}/>);
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}, [charConfig, hideCardBackground]);
|
|
66
|
+
if (content == null) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return (<View style={style}>
|
|
70
|
+
{content}
|
|
71
|
+
<Icon name="arrow-clockwise" style={styles.icon} touchable={true} onPress={() => refreshChart(chartId)}/>
|
|
72
|
+
</View>);
|
|
73
|
+
};
|
|
74
|
+
const styles = StyleSheet.create({
|
|
75
|
+
icon: {
|
|
76
|
+
position: 'absolute',
|
|
77
|
+
right: 10,
|
|
78
|
+
top: 10,
|
|
79
|
+
zIndex: 1,
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
export default RefreshChart;
|
|
83
|
+
//# sourceMappingURL=RefreshChart.js.map
|
|
@@ -0,0 +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OAAO,CAAC,CAAC,EAEzC;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,EAAE;QACT,GAAG,EAAE,EAAE;QACP,MAAM,EAAE,CAAC;KACV;CACF,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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 AOPChart } from './AOPChart/AOPChart';
|
|
19
|
+
export { default as RefreshChart } from './RefreshChart/RefreshChart';
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dashboards/component/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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 * from './component';
|
|
19
|
+
export * from './view';
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dashboards/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Menu,
|
|
1
|
+
import { Menu, Screen } from '../app';
|
|
2
2
|
type DashboardMenuConfig = {
|
|
3
3
|
[menuKey: string]: {
|
|
4
4
|
menu: Menu;
|
|
@@ -26,27 +26,4 @@ export declare const createDashboardScreens: (dashboardConfigs: {
|
|
|
26
26
|
export declare const filterAuthorizedDashboardMenus: (dashboardConfigs: DashboardMenuConfig, { roles: userRoles }: {
|
|
27
27
|
roles: any[];
|
|
28
28
|
}) => Menus;
|
|
29
|
-
export declare const addDashboardMenus: (modules: Module[], dashboardMenus: Menus) => {
|
|
30
|
-
menus: {
|
|
31
|
-
[x: string]: Menu;
|
|
32
|
-
};
|
|
33
|
-
name: string;
|
|
34
|
-
title?: string;
|
|
35
|
-
subtitle?: string;
|
|
36
|
-
icon?: string;
|
|
37
|
-
compatibilityAOS?: import("../app/Module").Compatibility;
|
|
38
|
-
disabled?: boolean;
|
|
39
|
-
screens?: {
|
|
40
|
-
[screenKey: string]: Screen;
|
|
41
|
-
};
|
|
42
|
-
translations?: {
|
|
43
|
-
[languageKey: string]: any;
|
|
44
|
-
};
|
|
45
|
-
reducers?: {
|
|
46
|
-
[key: string]: import("redux").Reducer;
|
|
47
|
-
};
|
|
48
|
-
backgroundFunctions?: Function[];
|
|
49
|
-
models?: import("../app").Models;
|
|
50
|
-
requiredConfig?: string[];
|
|
51
|
-
}[];
|
|
52
29
|
export {};
|
|
@@ -77,13 +77,4 @@ export const filterAuthorizedDashboardMenus = (dashboardConfigs, { roles: userRo
|
|
|
77
77
|
});
|
|
78
78
|
return menus;
|
|
79
79
|
};
|
|
80
|
-
export const addDashboardMenus = (modules, dashboardMenus) => {
|
|
81
|
-
return modules.map(_module => {
|
|
82
|
-
const associatedMenus = Object.fromEntries(Object.entries(dashboardMenus).filter(([, { parent }]) => parent === _module.name));
|
|
83
|
-
return {
|
|
84
|
-
..._module,
|
|
85
|
-
menus: { ...(_module.menus ?? {}), ...(associatedMenus ?? {}) },
|
|
86
|
-
};
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
80
|
//# sourceMappingURL=menu.helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.helpers.js","sourceRoot":"","sources":["../../src/dashboards/menu.helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,uBAAuB,EAAC,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAC,eAAe,EAAC,MAAM,QAAQ,CAAC;AAcvC,MAAM,qBAAqB,GAAG,EAAE,CAAC,EAAE;IACjC,OAAO,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,EAAC,GAAG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E,KAAK,WAAW,CAAC,EAAE,CAAC,CAC7D,CAAC;SACH;IACH,CAAC,CAAC;SACD,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,EAAC,IAAI,EAAC,CAAC,EAAE,EAAE;QACzB,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACpB,CAAC,CAAC,CAAC;IAEL,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface DashboardScreenProps {
|
|
3
|
+
dashboardId: number;
|
|
3
4
|
hideCardBackground?: boolean;
|
|
4
|
-
|
|
5
|
+
chartWidth?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const DashboardScreen: ({ dashboardId, hideCardBackground, chartWidth, }: DashboardScreenProps) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -15,70 +15,9 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import React
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import { createDashboardActionID } from '../display.helpers';
|
|
23
|
-
import { ActivityIndicator } from 'react-native';
|
|
24
|
-
import { fetchDashboard } from '../api.helpers';
|
|
25
|
-
import { formatDateTime } from '../../utils';
|
|
26
|
-
export const DashboardScreen = ({ dashboardId, hideCardBackground = false }) => {
|
|
27
|
-
const I18n = useTranslator();
|
|
28
|
-
const [dashboard, setDashboard] = useState({});
|
|
29
|
-
const [loading, setLoading] = useState(false);
|
|
30
|
-
const [lastUpdate, setLastUpdate] = useState(new Date());
|
|
31
|
-
const refresh = useCallback(() => {
|
|
32
|
-
setLoading(true);
|
|
33
|
-
fetchDashboard({ id: dashboardId })
|
|
34
|
-
.then(response => {
|
|
35
|
-
setDashboard({ ...(response?.data?.object ?? {}), id: dashboardId });
|
|
36
|
-
setLastUpdate(new Date());
|
|
37
|
-
})
|
|
38
|
-
.catch(() => setDashboard({}))
|
|
39
|
-
.finally(() => setLoading(false));
|
|
40
|
-
}, [dashboardId]);
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
let isMounted = true;
|
|
43
|
-
if (isMounted) {
|
|
44
|
-
refresh();
|
|
45
|
-
}
|
|
46
|
-
return () => {
|
|
47
|
-
isMounted = false;
|
|
48
|
-
};
|
|
49
|
-
}, [refresh]);
|
|
50
|
-
useEffect(() => {
|
|
51
|
-
headerActionsProvider.registerModel(createDashboardActionID(dashboardId), {
|
|
52
|
-
actions: [
|
|
53
|
-
{
|
|
54
|
-
key: 'refreshConfig',
|
|
55
|
-
order: 10,
|
|
56
|
-
showInHeader: false,
|
|
57
|
-
iconName: 'arrow-repeat',
|
|
58
|
-
title: I18n.t('Base_Dashboard_RefreshConfig'),
|
|
59
|
-
onPress: refresh,
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
});
|
|
63
|
-
}, [I18n, dashboardId, refresh]);
|
|
64
|
-
const dashboardData = useMemo(() => {
|
|
65
|
-
if (!Array.isArray(dashboard?.dashboardLineList)) {
|
|
66
|
-
return [];
|
|
67
|
-
}
|
|
68
|
-
return dashboard?.dashboardLineList.map(elt => ({
|
|
69
|
-
graphList: elt.chartList.map(ch => ({
|
|
70
|
-
type: ch.chartType,
|
|
71
|
-
dataList: [ch.valueList],
|
|
72
|
-
title: ch?.chartName,
|
|
73
|
-
})),
|
|
74
|
-
}));
|
|
75
|
-
}, [dashboard]);
|
|
76
|
-
if (loading) {
|
|
77
|
-
return <ActivityIndicator size="large"/>;
|
|
78
|
-
}
|
|
79
|
-
if (!Array.isArray(dashboardData) || dashboardData.length === 0) {
|
|
80
|
-
return (<WarningCard errorMessage={I18n.t('Base_Dashboard_Misconfigured')}/>);
|
|
81
|
-
}
|
|
82
|
-
return (<Dashboard lineList={dashboardData} hideCardBackground={hideCardBackground} translator={I18n.t} lastUpdate={formatDateTime(lastUpdate, I18n.t('Base_DateTimeFormat'))} displayLastUpdate={true}/>);
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import { DashboardView } from './DashboardView';
|
|
20
|
+
export const DashboardScreen = ({ dashboardId, hideCardBackground, chartWidth, }) => {
|
|
21
|
+
return (<DashboardView dashboardId={dashboardId} isHeaderAction={true} hideCardBackground={hideCardBackground} displayLastUpdate={true} chartWidth={chartWidth}/>);
|
|
83
22
|
};
|
|
84
23
|
//# sourceMappingURL=DashboardScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardScreen.js","sourceRoot":"","sources":["../../../src/dashboards/view/DashboardScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"DashboardScreen.js","sourceRoot":"","sources":["../../../src/dashboards/view/DashboardScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAQ9C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,WAAW,EACX,kBAAkB,EAClB,UAAU,GACW,EAAE,EAAE;IACzB,OAAO,CACL,CAAC,aAAa,CACZ,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,cAAc,CAAC,CAAC,IAAI,CAAC,CACrB,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,iBAAiB,CAAC,CAAC,IAAI,CAAC,CACxB,UAAU,CAAC,CAAC,UAAU,CAAC,EACvB,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface DashboardViewProps {
|
|
3
|
+
dashboardId: number;
|
|
4
|
+
isHeaderAction?: boolean;
|
|
5
|
+
hideCardBackground?: boolean;
|
|
6
|
+
displayLastUpdate?: boolean;
|
|
7
|
+
chartWidth?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const DashboardView: ({ dashboardId, isHeaderAction, hideCardBackground, displayLastUpdate, chartWidth, }: DashboardViewProps) => React.JSX.Element;
|
|
10
|
+
export {};
|