@axelor/aos-mobile-core 8.0.6 → 8.1.0
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 +46 -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/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 +8 -6
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.helpers.js","sourceRoot":"","sources":["../../../src/forms/studio/display.helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA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AAC,CAAC,CAAC;IAEL,OAAO,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAC,CAAC;AACzE,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/forms/studio/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/forms/studio/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
|
|
@@ -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 { useCallback, useEffect, useMemo } from 'react';
|
|
19
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
20
|
+
import { fetchObjectModelTypes } from '../../features/metaJsonFieldSlice';
|
|
21
|
+
import { useFieldsPermissions, useIsAdmin } from '../../permissions';
|
|
22
|
+
const isFieldHidden = (authorizedRoles, userRoles) => {
|
|
23
|
+
if (!Array.isArray(authorizedRoles) || authorizedRoles.length === 0) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
else if (!Array.isArray(userRoles) || userRoles.length === 0) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return authorizedRoles.every(_role => userRoles.find(({ id: roleId }) => roleId === _role.id) == null);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export const useFieldPermitter = ({ modelName }) => {
|
|
34
|
+
const dispatch = useDispatch();
|
|
35
|
+
const { modelTypes } = useSelector((state) => state.metaJsonField);
|
|
36
|
+
const { user } = useSelector((state) => state.user);
|
|
37
|
+
const isAdmin = useIsAdmin();
|
|
38
|
+
const permissions = useFieldsPermissions({
|
|
39
|
+
modelName,
|
|
40
|
+
fieldNames: modelTypes ?? [],
|
|
41
|
+
});
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
dispatch(fetchObjectModelTypes({ modelName }));
|
|
44
|
+
}, [dispatch, modelName]);
|
|
45
|
+
const roles = useMemo(() => {
|
|
46
|
+
const _userRoles = user?.roles ?? [];
|
|
47
|
+
const _groupRoles = user?.group?.roles ?? [];
|
|
48
|
+
return [..._userRoles, ..._groupRoles].filter((item, index, self) => self.findIndex(_i => _i.id === item.id) === index);
|
|
49
|
+
}, [user?.group?.roles, user?.roles]);
|
|
50
|
+
return useCallback(_item => {
|
|
51
|
+
if (isAdmin) {
|
|
52
|
+
return _item;
|
|
53
|
+
}
|
|
54
|
+
const { readonly } = permissions.find(({ key }) => key === _item.modelField) ?? {};
|
|
55
|
+
const isHidden = isFieldHidden(_item.roles, roles);
|
|
56
|
+
return { ..._item, readonly, hidden: isHidden };
|
|
57
|
+
}, [isAdmin, permissions, roles]);
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=permission.helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission.helpers.js","sourceRoot":"","sources":["../../../src/forms/studio/permission.helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AACtD,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,EAAC,qBAAqB,EAAC,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAC,oBAAoB,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAEnE,MAAM,aAAa,GAAG,CAAC,eAAe,EAAE,SAAS,EAAE,EAAE;IACnD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE;QACnE,OAAO,KAAK,CAAC;KACd;SAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;QAC9D,OAAO,IAAI,CAAC;KACb;SAAM;QACL,OAAO,eAAe,CAAC,KAAK,CAC1B,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAC,EAAE,EAAE,MAAM,EAAC,EAAE,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,IAAI,CACvE,CAAC;KACH;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAC,SAAS,EAAsB,EAAE,EAAE;IACpE,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,EAAC,UAAU,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACtE,MAAM,EAAC,IAAI,EAAC,GAAG,WAAW,CAAC,CAAC,KA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AAC,GAAG,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAC,CAAC;IAChD,CAAC,EACD,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,CAC9B,CAAC;AACJ,CAAC,CAAC"}
|
package/lib/forms/types.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export interface Field {
|
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
export type Widget = 'default' | 'increment' | 'star' | 'HTML' | 'label' | 'password' | 'file' | 'date' | 'checkbox' | 'custom';
|
|
48
|
+
export type Widget = 'default' | 'increment' | 'star' | 'HTML' | 'label' | 'password' | 'file' | 'signature' | 'date' | 'checkbox' | 'custom';
|
|
49
49
|
export type InputType = 'string' | 'email' | 'url' | 'phone' | 'date' | 'datetime' | 'time' | 'number' | 'boolean' | 'array' | 'object';
|
|
50
50
|
export interface Panel {
|
|
51
51
|
titleKey?: string;
|
|
@@ -60,7 +60,7 @@ export interface JSONObject<Type> {
|
|
|
60
60
|
}
|
|
61
61
|
export interface Form {
|
|
62
62
|
readonlyIf?: (values?: States) => boolean;
|
|
63
|
-
modelName
|
|
63
|
+
modelName: string;
|
|
64
64
|
panels?: JSONObject<Panel>;
|
|
65
65
|
/** Fields attribut is a JSON object contening all fields of object.
|
|
66
66
|
* When defining a field you need to define as key in the JSON object
|
|
@@ -92,12 +92,16 @@ export interface Action {
|
|
|
92
92
|
customComponent?: ReactElement<any>;
|
|
93
93
|
readonlyAfterAction?: boolean;
|
|
94
94
|
}
|
|
95
|
-
interface ActionProps {
|
|
95
|
+
export interface ActionProps {
|
|
96
96
|
handleReset?: () => void;
|
|
97
97
|
objectState?: any;
|
|
98
98
|
storeState?: any;
|
|
99
99
|
handleObjectChange?: (newValue?: any) => void;
|
|
100
100
|
dispatch?: Dispatch<any>;
|
|
101
101
|
}
|
|
102
|
-
export type FormActionType = 'update' | 'create' | 'reset' | 'refresh' | 'custom';
|
|
103
|
-
export {
|
|
102
|
+
export type FormActionType = 'update' | 'create' | 'reset' | 'delete' | 'refresh' | 'custom';
|
|
103
|
+
export interface FormatedAction extends Action {
|
|
104
|
+
title?: string;
|
|
105
|
+
onPress: () => void;
|
|
106
|
+
isDisabled: boolean;
|
|
107
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { HeaderBandItem } from './types';
|
|
2
3
|
interface HeaderBandContextState {
|
|
3
4
|
allBands: HeaderBandItem[];
|
|
@@ -5,6 +6,6 @@ interface HeaderBandContextState {
|
|
|
5
6
|
}
|
|
6
7
|
export declare const HeaderBandProvider: ({ children }: {
|
|
7
8
|
children: any;
|
|
8
|
-
}) => JSX.Element;
|
|
9
|
+
}) => React.JSX.Element;
|
|
9
10
|
export declare const useHeaderBand: () => HeaderBandContextState;
|
|
10
11
|
export {};
|
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
export function getTranslations(language: any): any;
|
|
2
|
-
export const selectLanguage: ((state: any, ...params: any[]) => any) &
|
|
3
|
-
clearCache: () => void;
|
|
4
|
-
}> & {
|
|
2
|
+
export const selectLanguage: ((state: any, ...params: any[]) => any) & {
|
|
5
3
|
clearCache: () => void;
|
|
4
|
+
resultsCount: () => number;
|
|
5
|
+
resetResultsCount: () => void;
|
|
6
|
+
} & {
|
|
7
|
+
resultFunc: (...resultFuncArgs: readonly any[]) => any;
|
|
8
|
+
memoizedResultFunc: ((...resultFuncArgs: readonly any[]) => any) & {
|
|
9
|
+
clearCache: () => void;
|
|
10
|
+
resultsCount: () => number;
|
|
11
|
+
resetResultsCount: () => void;
|
|
12
|
+
};
|
|
13
|
+
lastResult: () => any;
|
|
14
|
+
dependencies: import("reselect").SelectorArray<any>;
|
|
15
|
+
recomputations: () => number;
|
|
16
|
+
resetRecomputations: () => void;
|
|
17
|
+
dependencyRecomputations: () => number;
|
|
18
|
+
resetDependencyRecomputations: () => void;
|
|
19
|
+
} & {
|
|
20
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
21
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
6
22
|
};
|
|
7
23
|
export default Translator;
|
|
8
24
|
declare function Translator(): any;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"Base_NoMoreItems": "No more items.",
|
|
6
6
|
"Base_Data": "Data",
|
|
7
7
|
"Base_NoData": "No data.",
|
|
8
|
-
"
|
|
8
|
+
"Base_NoDataAvailable": "No {{title}} available.",
|
|
9
9
|
"Base_Description": "Description",
|
|
10
10
|
"Base_AllFilters": "All filters",
|
|
11
11
|
"Base_DateFormat": "MM/DD/YYYY",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"Base_Logout": "Log out",
|
|
65
65
|
"Base_TimeFormat": "HH:mm",
|
|
66
66
|
"Base_ConnectedOn": "Connected on",
|
|
67
|
+
"Base_Version": "Version {{appVersion}}",
|
|
67
68
|
"Base_Status": "Status",
|
|
68
69
|
"Base_Error": "Error",
|
|
69
70
|
"Base_Success": "Success",
|
|
@@ -118,6 +119,7 @@
|
|
|
118
119
|
"Base_Comments": "Comments",
|
|
119
120
|
"Base_Notifications": "Notifications",
|
|
120
121
|
"Base_FormNotFound": "The requested form cannot be found, please contact an administrator.",
|
|
122
|
+
"Base_FormMissingCreateAccess": "You do not have creation rights for this object.",
|
|
121
123
|
"Base_FormValidation_String": "must be a string",
|
|
122
124
|
"Base_FormValidation_Number": "must be a number",
|
|
123
125
|
"Base_FormValidation_Boolean": "must be a boolean",
|
|
@@ -156,12 +158,22 @@
|
|
|
156
158
|
"Base_FormAction_Update": "Update",
|
|
157
159
|
"Base_FormAction_Refresh": "Refresh",
|
|
158
160
|
"Base_FormAction_Reset": "Reset",
|
|
161
|
+
"Base_FormAction_Confirmation": "Confirmation",
|
|
162
|
+
"Base_FormAction_DirtyStateConfirmation": "Current changes will be lost.\nDo you really want to proceed ?",
|
|
159
163
|
"Base_SelectAll": "Select all",
|
|
164
|
+
"Base_WebView": "WebView",
|
|
160
165
|
"Base_Dashboard": "Dashboard",
|
|
161
166
|
"Base_Dashboard_Misconfigured": "This dashboard is misconfigured, please contact your administrator.",
|
|
162
167
|
"Base_Dashboard_RefreshConfig": "Refresh dashboard",
|
|
168
|
+
"Base_WebView_RefreshConfig": "Refresh webView",
|
|
163
169
|
"Base_AssignedToMe": "Assigned to me",
|
|
164
170
|
"Base_LastUpdate": "Last update",
|
|
171
|
+
"Base_StartDate": "Start date",
|
|
172
|
+
"Base_EndDate": "End date",
|
|
173
|
+
"Base_PeriodError": "Caution, start date cannot be more recent than end date.",
|
|
174
|
+
"Base_Yes": "Yes",
|
|
175
|
+
"Base_No": "No",
|
|
176
|
+
"Base_Filter": "Filter",
|
|
165
177
|
"Base_SliceAction_FetchAttachedFiles": "fetch attached files",
|
|
166
178
|
"Base_SliceAction_FetchFilesDetails": "fetch file details",
|
|
167
179
|
"Base_SliceAction_FetchMetaModule": "fetch meta modules",
|
|
@@ -178,10 +190,13 @@
|
|
|
178
190
|
"Base_SliceAction_CreateRecord": "create record",
|
|
179
191
|
"Base_SliceAction_UpdateRecord": "update record",
|
|
180
192
|
"Base_SliceAction_RefreshRecord": "refresh record",
|
|
193
|
+
"Base_SliceAction_DeleteRecord": "delete record",
|
|
181
194
|
"Base_SliceAction_FetchJsonFieldsOfModel": "fetch custom fields of model",
|
|
195
|
+
"Base_SliceAction_FetchObjectModelTypes": "fetch model types of object model",
|
|
182
196
|
"Base_SliceAction_FetchDataOfModel": "fetch data of model",
|
|
183
197
|
"Base_SliceAction_UpdateJsonFieldsObject": "update custom fields of object",
|
|
184
198
|
"Base_SliceAction_FetchAnomalies": "fetch anomalies of object",
|
|
185
199
|
"Base_SliceAction_SearchUser": "search user",
|
|
186
|
-
"Base_SliceAction_FetchDashboardConfigs": "fetch dashboard configurations"
|
|
200
|
+
"Base_SliceAction_FetchDashboardConfigs": "fetch dashboard configurations",
|
|
201
|
+
"Base_SliceAction_FetchWebViewConfigs": "fetch webView configurations"
|
|
187
202
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"Base_NoMoreItems": "Fin de la liste.",
|
|
6
6
|
"Base_Data": "Donnée",
|
|
7
7
|
"Base_NoData": "Aucune donnée.",
|
|
8
|
-
"
|
|
8
|
+
"Base_NoDataAvailable": "Aucun(e) {{title}} disponible.",
|
|
9
9
|
"Base_Description": "Description",
|
|
10
10
|
"Base_AllFilters": "Tous les filtres",
|
|
11
11
|
"Base_DateFormat": "DD/MM/YYYY",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"Base_Logout": "Déconnexion",
|
|
65
65
|
"Base_TimeFormat": "HH:mm",
|
|
66
66
|
"Base_ConnectedOn": "Connecté à",
|
|
67
|
+
"Base_Version": "Version {{appVersion}}",
|
|
67
68
|
"Base_Status": "Statut",
|
|
68
69
|
"Base_Error": "Erreur",
|
|
69
70
|
"Base_Success": "Succès",
|
|
@@ -118,6 +119,7 @@
|
|
|
118
119
|
"Base_Comments": "Commentaires",
|
|
119
120
|
"Base_Notifications": "Notifications",
|
|
120
121
|
"Base_FormNotFound": "Le formulaire demandé est introuvable, merci de contacter un administrateur.",
|
|
122
|
+
"Base_FormMissingCreateAccess": "Vous n'avez pas les droits de création sur cet objet.",
|
|
121
123
|
"Base_FormValidation_String": "doit être une chaîne de caractères",
|
|
122
124
|
"Base_FormValidation_Number": "doit être un nombre",
|
|
123
125
|
"Base_FormValidation_Boolean": "doit être un booléen",
|
|
@@ -156,12 +158,22 @@
|
|
|
156
158
|
"Base_FormAction_Update": "Mettre à jour",
|
|
157
159
|
"Base_FormAction_Refresh": "Actualiser",
|
|
158
160
|
"Base_FormAction_Reset": "Réinitialiser",
|
|
161
|
+
"Base_FormAction_Confirmation": "Confirmation",
|
|
162
|
+
"Base_FormAction_DirtyStateConfirmation": "Les modifications actuelles seront perdues.\nVoulez-vous vraiment continuer?",
|
|
159
163
|
"Base_SelectAll": "Tout sélectionner",
|
|
164
|
+
"Base_WebView": "Vue web",
|
|
160
165
|
"Base_Dashboard": "Tableau de bord",
|
|
161
166
|
"Base_Dashboard_Misconfigured": "Ce tableau de bord est mal configuré, veuillez contacter votre administrateur.",
|
|
162
167
|
"Base_Dashboard_RefreshConfig": "Actualiser le tableau de bord",
|
|
168
|
+
"Base_WebView_RefreshConfig": "Actualiser la vue web",
|
|
163
169
|
"Base_AssignedToMe": "Assigné à moi",
|
|
164
170
|
"Base_LastUpdate": "Dernière mise à jour",
|
|
171
|
+
"Base_StartDate": "Date de début",
|
|
172
|
+
"Base_EndDate": "Date de fin",
|
|
173
|
+
"Base_PeriodError": "Attention, la date de début ne peut pas être plus récente que la date de fin.",
|
|
174
|
+
"Base_Yes": "Oui",
|
|
175
|
+
"Base_No": "Non",
|
|
176
|
+
"Base_Filter": "Filtrer",
|
|
165
177
|
"Base_SliceAction_FetchAttachedFiles": "récupération des fichiers joints",
|
|
166
178
|
"Base_SliceAction_FetchFilesDetails": "récupération des détails du fichier",
|
|
167
179
|
"Base_SliceAction_FetchMetaModule": "récupération des modules",
|
|
@@ -178,10 +190,13 @@
|
|
|
178
190
|
"Base_SliceAction_CreateRecord": "création de l'objet",
|
|
179
191
|
"Base_SliceAction_UpdateRecord": "mise à jour de l'objet",
|
|
180
192
|
"Base_SliceAction_RefreshRecord": "actualisation de l'objet",
|
|
193
|
+
"Base_SliceAction_DeleteRecord": "suppression de l'objet",
|
|
181
194
|
"Base_SliceAction_FetchJsonFieldsOfModel": "récupération des champs studio du modèle",
|
|
195
|
+
"Base_SliceAction_FetchObjectModelTypes": "récupération des types de champs studio",
|
|
182
196
|
"Base_SliceAction_FetchDataOfModel": "récupération des données du model",
|
|
183
197
|
"Base_SliceAction_UpdateJsonFieldsObject": "mise à jour des champs studio de l'objet",
|
|
184
198
|
"Base_SliceAction_FetchAnomalies": "récupération des anomalies d'un object",
|
|
185
199
|
"Base_SliceAction_SearchUser": "récupération des utilisateurs",
|
|
186
|
-
"Base_SliceAction_FetchDashboardConfigs": "récupération des configurations de tableaux de bord"
|
|
200
|
+
"Base_SliceAction_FetchDashboardConfigs": "récupération des configurations de tableaux de bord",
|
|
201
|
+
"Base_SliceAction_FetchWebViewConfigs": "récupération des configurations de vues web"
|
|
187
202
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -21,4 +21,7 @@ export * from './i18n';
|
|
|
21
21
|
export * from './config';
|
|
22
22
|
export * from './header';
|
|
23
23
|
export * from './forms';
|
|
24
|
+
export * from './dashboards';
|
|
25
|
+
export * from './permissions';
|
|
26
|
+
export * from './selections';
|
|
24
27
|
export { useNavigation, useIsFocused } from './hooks/use-navigation';
|
package/lib/index.js
CHANGED
|
@@ -38,5 +38,8 @@ export * from './i18n';
|
|
|
38
38
|
export * from './config';
|
|
39
39
|
export * from './header';
|
|
40
40
|
export * from './forms';
|
|
41
|
+
export * from './dashboards';
|
|
42
|
+
export * from './permissions';
|
|
43
|
+
export * from './selections';
|
|
41
44
|
export { useNavigation, useIsFocused } from './hooks/use-navigation';
|
|
42
45
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,OAAO,CAAC;AACtB,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAChD,OAAO,EAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAC,KAAK,EAAE,MAAM,EAAC,MAAM,sBAAsB,CAAC;AACnD,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT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sB,CAAC;AACnD,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,WAAW,EACX,OAAO,IAAI,cAAc,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,aAAa,EACb,OAAO,IAAI,aAAa,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,eAAe,EACf,SAAS,EACT,MAAM,IAAI,YAAY,EACtB,OAAO,IAAI,aAAa,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AACvD,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,wBAAwB,CAAC"}
|
|
@@ -29,5 +29,22 @@ export const core_modelAPI = {
|
|
|
29
29
|
core_user: schemaContructor.object({
|
|
30
30
|
fullName: schemaContructor.string(),
|
|
31
31
|
}),
|
|
32
|
+
core_permissions: schemaContructor.object({
|
|
33
|
+
name: schemaContructor.string(),
|
|
34
|
+
object: schemaContructor.string(),
|
|
35
|
+
canRead: schemaContructor.boolean(),
|
|
36
|
+
canWrite: schemaContructor.boolean(),
|
|
37
|
+
canCreate: schemaContructor.boolean(),
|
|
38
|
+
canRemove: schemaContructor.boolean(),
|
|
39
|
+
}),
|
|
40
|
+
core_metaPermissionRule: schemaContructor.object({
|
|
41
|
+
field: schemaContructor.string(),
|
|
42
|
+
canRead: schemaContructor.boolean(),
|
|
43
|
+
canWrite: schemaContructor.boolean(),
|
|
44
|
+
metaPermission: schemaContructor.subObject().concat(schemaContructor.object({
|
|
45
|
+
name: schemaContructor.string(),
|
|
46
|
+
object: schemaContructor.string(),
|
|
47
|
+
})),
|
|
48
|
+
}),
|
|
32
49
|
};
|
|
33
50
|
//# sourceMappingURL=objectFields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectFields.js","sourceRoot":"","sources":["../../src/models/objectFields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAe,gBAAgB,EAAC,MAAM,QAAQ,CAAC;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,eAAe,EAAE,gBAAgB,CAAC,MAAM,CAAC;QACvC,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE;QAC/B,aAAa,EAAE,gBAAgB,CAAC,MAAM,EAAE;QACxC,eAAe,EAAE,gBAAgB,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC;KAC3E,CAAC;IACF,aAAa,EAAE,gBAAgB,CAAC,MAAM,CAAC;QACrC,QAAQ,EAAE,gBAAgB,CAAC,MAAM,EAAE;QACnC,SAAS,EAAE,gBAAgB,CAAC,MAAM,EAAE;KACrC,CAAC;IACF,SAAS,EAAE,gBAAgB,CAAC,MAAM,CAAC;QACjC,QAAQ,EAAE,gBAAgB,CAAC,MAAM,EAAE;KACpC,CAAC;CACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"objectFields.js","sourceRoot":"","sources":["../../src/models/objectFields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAe,gBA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C,MAAM,EAAE;SAClC,CAAC,CACH;KACF,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Menu as DrawerMenu, Screen as NavigationScreen } from '../app';
|
|
2
|
+
type MenuType = 'menu' | 'separator' | 'submenu';
|
|
3
|
+
interface Menu {
|
|
4
|
+
menuKey: string;
|
|
5
|
+
menuTitle: string;
|
|
6
|
+
menuOrder: number;
|
|
7
|
+
menuParentApplication: string;
|
|
8
|
+
menuType: MenuType;
|
|
9
|
+
parentMenuName: string;
|
|
10
|
+
}
|
|
11
|
+
interface Screen {
|
|
12
|
+
screenKey: string;
|
|
13
|
+
screenTitle: string;
|
|
14
|
+
isUsableOnShortcut: boolean;
|
|
15
|
+
}
|
|
16
|
+
type List<E> = E[];
|
|
17
|
+
declare class NavigationInformationsProvider {
|
|
18
|
+
private menus;
|
|
19
|
+
private screens;
|
|
20
|
+
constructor();
|
|
21
|
+
registerMenus(menus: {
|
|
22
|
+
[key: string]: DrawerMenu;
|
|
23
|
+
}): void;
|
|
24
|
+
registerScreens(screens: {
|
|
25
|
+
[key: string]: NavigationScreen;
|
|
26
|
+
}): void;
|
|
27
|
+
getInformations(): {
|
|
28
|
+
mobileMenuList: List<Menu>;
|
|
29
|
+
mobileScreenList: List<Screen>;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export declare const navigationInformations: NavigationInformationsProvider;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
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 { isEmpty } from '../utils';
|
|
19
|
+
import { hasSubMenus } from './menu.helper';
|
|
20
|
+
class NavigationInformationsProvider {
|
|
21
|
+
menus;
|
|
22
|
+
screens;
|
|
23
|
+
constructor() {
|
|
24
|
+
this.menus = [];
|
|
25
|
+
this.screens = [];
|
|
26
|
+
}
|
|
27
|
+
registerMenus(menus) {
|
|
28
|
+
if (isEmpty(menus)) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const menuList = [];
|
|
32
|
+
for (const [key, menu] of Object.entries(menus)) {
|
|
33
|
+
menuList.push({
|
|
34
|
+
menuKey: key,
|
|
35
|
+
menuTitle: menu.title,
|
|
36
|
+
menuOrder: menu.order,
|
|
37
|
+
menuParentApplication: menu.parent,
|
|
38
|
+
menuType: getMenuType(menu),
|
|
39
|
+
parentMenuName: undefined,
|
|
40
|
+
});
|
|
41
|
+
if (hasSubMenus(menu)) {
|
|
42
|
+
for (const [subKey, subMenu] of Object.entries(menu.subMenus)) {
|
|
43
|
+
menuList.push({
|
|
44
|
+
menuKey: subKey,
|
|
45
|
+
menuTitle: subMenu.title,
|
|
46
|
+
menuOrder: subMenu.order,
|
|
47
|
+
menuParentApplication: menu.parent,
|
|
48
|
+
menuType: 'submenu',
|
|
49
|
+
parentMenuName: key,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
this.menus = menuList;
|
|
55
|
+
}
|
|
56
|
+
registerScreens(screens) {
|
|
57
|
+
if (isEmpty(screens)) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const screenList = [];
|
|
61
|
+
for (const [key, screen] of Object.entries(screens)) {
|
|
62
|
+
screenList.push({
|
|
63
|
+
screenKey: key,
|
|
64
|
+
screenTitle: screen.title,
|
|
65
|
+
isUsableOnShortcut: screen.isUsableOnShortcut ?? false,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
this.screens = screenList;
|
|
69
|
+
}
|
|
70
|
+
getInformations() {
|
|
71
|
+
return { mobileMenuList: this.menus, mobileScreenList: this.screens };
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const getMenuType = (menu) => {
|
|
75
|
+
if (menu.separator) {
|
|
76
|
+
return 'separator';
|
|
77
|
+
}
|
|
78
|
+
return 'menu';
|
|
79
|
+
};
|
|
80
|
+
export const navigationInformations = new NavigationInformationsProvider();
|
|
81
|
+
//# sourceMappingURL=NavigationInformationsProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationInformationsProvider.js","sourceRoot":"","sources":["../../src/navigator/NavigationInformationsProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AACjC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAqB1C,MAAM,8BAA8B;IAC1B,KAAK,CAAa;IAClB,OAAO,CAAe;IAE9B;QACE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACpB,CAAC;IAED,aAAa,CAAC,KAAkC;QAC9C,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;YAClB,OAAO;SACR;QAED,MAAM,QAAQ,GAAG,EAAE,CAAC;QAEpB,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YAC/C,QAAQ,CAAC,IAAI,CAAC;gBACZ,OAAO,EAAE,GAAG;gBACZ,SAAS,EAAE,IAAI,CAAC,KAAK;g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EAAY,EAAE;IAC1C,IAAI,IAAI,CAAC,SAAS,EAAE;QAClB,OAAO,WAAW,CAAC;KACpB;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,8BAA8B,EAAE,CAAC"}
|
|
@@ -5,10 +5,8 @@ export const ModuleNavigatorContext: React.Context<{
|
|
|
5
5
|
}>;
|
|
6
6
|
export default Navigator;
|
|
7
7
|
import React from 'react';
|
|
8
|
-
declare function Navigator({
|
|
9
|
-
modules: any;
|
|
8
|
+
declare function Navigator({ mainMenu, onRefresh, versionCheckConfig }: {
|
|
10
9
|
mainMenu: any;
|
|
11
10
|
onRefresh: any;
|
|
12
|
-
version: any;
|
|
13
11
|
versionCheckConfig: any;
|
|
14
|
-
}): JSX.Element;
|
|
12
|
+
}): React.JSX.Element;
|
|
@@ -22,15 +22,21 @@ import { createStackNavigator } from '@react-navigation/stack';
|
|
|
22
22
|
import { useThemeColor } from '@axelor/aos-mobile-ui';
|
|
23
23
|
import DrawerContent from './drawer/DrawerContent';
|
|
24
24
|
import { checkModulesMenusAccessibility, getDefaultModule, manageOverridingMenus, manageWebCompatibility, manageWebConfig, moduleHasMenus, } from './module.helper';
|
|
25
|
-
import { manageSubMenusOverriding, getMenuTitle, hasSubMenus, } from './menu.helper';
|
|
25
|
+
import { manageSubMenusOverriding, getMenuTitle, hasSubMenus, formatMenus, addMenusToModules, } from './menu.helper';
|
|
26
26
|
import useTranslator from '../i18n/hooks/use-translator';
|
|
27
27
|
import { useDispatch, useSelector } from 'react-redux';
|
|
28
28
|
import BaseScreen from '../screens';
|
|
29
29
|
import Header from './drawer/Header';
|
|
30
30
|
import { fetchMetaModules } from '../features/metaModuleSlice';
|
|
31
31
|
import { fetchRequiredConfig } from '../features/appConfigSlice';
|
|
32
|
-
import {
|
|
32
|
+
import { createDashboardScreens, filterAuthorizedDashboardMenus, } from '../dashboards/menu.helpers';
|
|
33
33
|
import { fetchDashboardConfigs } from '../features/mobileDashboardSlice';
|
|
34
|
+
import { fetchWebViewConfigs } from '../features/mobileWebViewSlice';
|
|
35
|
+
import { usePermissionsFetcher } from '../permissions';
|
|
36
|
+
import { navigationInformations } from './NavigationInformationsProvider';
|
|
37
|
+
import { createWebViewScreens, filterAuthorizedWebViewMenus, } from '../webViews/menu.helper';
|
|
38
|
+
import { registerTypes } from '../selections';
|
|
39
|
+
import { useModules } from '../app';
|
|
34
40
|
const Drawer = createDrawerNavigator();
|
|
35
41
|
const Stack = createStackNavigator();
|
|
36
42
|
export const ModuleNavigatorContext = createContext({
|
|
@@ -38,18 +44,23 @@ export const ModuleNavigatorContext = createContext({
|
|
|
38
44
|
modulesMenus: {},
|
|
39
45
|
modulesScreens: {},
|
|
40
46
|
});
|
|
41
|
-
const Navigator = ({
|
|
47
|
+
const Navigator = ({ mainMenu, onRefresh, versionCheckConfig }) => {
|
|
48
|
+
const I18n = useTranslator();
|
|
49
|
+
const Colors = useThemeColor();
|
|
50
|
+
const dispatch = useDispatch();
|
|
51
|
+
const { modules } = useModules();
|
|
52
|
+
const fetchAllPermission = usePermissionsFetcher();
|
|
42
53
|
const storeState = useSelector(state => state.appConfig);
|
|
43
54
|
const { user } = useSelector(state => state.user);
|
|
44
55
|
const { dashboardConfigs } = useSelector(state => state.mobileDashboard);
|
|
56
|
+
const { webViewConfigs } = useSelector(state => state.mobileWebView);
|
|
45
57
|
const { mobileSettings } = useSelector(state => state.appConfig);
|
|
46
58
|
const { metaModules } = useSelector(state => state.metaModule);
|
|
47
|
-
const I18n = useTranslator();
|
|
48
|
-
const Colors = useThemeColor();
|
|
49
|
-
const dispatch = useDispatch();
|
|
50
59
|
const { screens: dashboardScreeens, menus: dashboardMenusConfig } = useMemo(() => createDashboardScreens(dashboardConfigs), [dashboardConfigs]);
|
|
51
|
-
const
|
|
60
|
+
const { screens: webViewScreens, menus: webViewMenusConfig } = useMemo(() => createWebViewScreens(webViewConfigs), [webViewConfigs]);
|
|
61
|
+
const enabledModule = useMemo(() => manageWebCompatibility(manageWebConfig(addMenusToModules(manageOverridingMenus(manageSubMenusOverriding(checkModulesMenusAccessibility(modules, mobileSettings?.apps))), filterAuthorizedWebViewMenus(webViewMenusConfig, user), filterAuthorizedDashboardMenus(dashboardMenusConfig, user)), storeState), metaModules), [
|
|
52
62
|
dashboardMenusConfig,
|
|
63
|
+
webViewMenusConfig,
|
|
53
64
|
metaModules,
|
|
54
65
|
mobileSettings?.apps,
|
|
55
66
|
modules,
|
|
@@ -65,25 +76,35 @@ const Navigator = ({ modules, mainMenu, onRefresh, version, versionCheckConfig,
|
|
|
65
76
|
}, [enabledModule]);
|
|
66
77
|
useEffect(() => {
|
|
67
78
|
dispatch(fetchRequiredConfig(requiredConfig));
|
|
79
|
+
registerTypes();
|
|
68
80
|
// Note: the configs only need to be fetched once at user connection
|
|
69
81
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70
82
|
}, []);
|
|
71
83
|
useEffect(() => {
|
|
72
84
|
dispatch(fetchMetaModules());
|
|
73
85
|
dispatch(fetchDashboardConfigs());
|
|
74
|
-
|
|
86
|
+
dispatch(fetchWebViewConfigs());
|
|
87
|
+
fetchAllPermission();
|
|
88
|
+
}, [dispatch, fetchAllPermission]);
|
|
75
89
|
const changeActiveModule = useCallback(moduleName => {
|
|
76
90
|
setActiveModule(enabledModule.find(_module => _module.name === moduleName));
|
|
77
91
|
}, [enabledModule]);
|
|
78
92
|
const modulesMenus = useMemo(() => {
|
|
79
93
|
return enabledModule
|
|
80
94
|
.filter(moduleHasMenus)
|
|
81
|
-
.reduce((menus, _module) => ({ ...menus, ..._module
|
|
95
|
+
.reduce((menus, _module) => ({ ...menus, ...formatMenus(_module) }), {});
|
|
82
96
|
}, [enabledModule]);
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
navigationInformations.registerMenus(modulesMenus);
|
|
99
|
+
}, [modulesMenus]);
|
|
83
100
|
const modulesScreens = useMemo(() => modules.reduce((screens, module) => ({ ...screens, ...module.screens }), {
|
|
84
101
|
...BaseScreen,
|
|
85
102
|
...dashboardScreeens,
|
|
86
|
-
|
|
103
|
+
...webViewScreens,
|
|
104
|
+
}), [dashboardScreeens, webViewScreens, modules]);
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
navigationInformations.registerScreens(modulesScreens);
|
|
107
|
+
}, [modulesScreens]);
|
|
87
108
|
const ModulesScreensStackNavigator = useCallback(({ initialRouteName, ...rest }) => (<Stack.Navigator {...rest} initialRouteName={initialRouteName}>
|
|
88
109
|
{Object.entries(modulesScreens).map(([key, { component, title, actionID, options = { shadedHeader: true } },]) => {
|
|
89
110
|
return (<Stack.Screen key={key} name={key} component={component} options={{
|
|
@@ -113,7 +134,7 @@ const Navigator = ({ modules, mainMenu, onRefresh, version, versionCheckConfig,
|
|
|
113
134
|
backgroundColor: Colors.backgroundColor,
|
|
114
135
|
width: isLargeScreen ? windowWidth * 0.5 : windowWidth * 0.8,
|
|
115
136
|
},
|
|
116
|
-
}} drawerContent={props => (<DrawerContent {...props} modules={enabledModule} onModuleClick={changeActiveModule} onRefresh={onRefresh}
|
|
137
|
+
}} drawerContent={props => (<DrawerContent {...props} modules={enabledModule} onModuleClick={changeActiveModule} onRefresh={onRefresh} versionCheckConfig={versionCheckConfig}/>)}>
|
|
117
138
|
{Object.entries(modulesMenus).map(([key, menu], index) => {
|
|
118
139
|
return (<React.Fragment key={index}>
|
|
119
140
|
<Drawer.Screen key={key} name={key} options={{
|