@axelor/aos-mobile-core 7.2.3 → 7.2.5
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/lib/api/anomaly-api.js +1 -1
- package/lib/api/attached-files-api.js +1 -1
- package/lib/api/login-api.js +1 -1
- package/lib/api/mail-message-api.js +1 -1
- package/lib/api/menu-config-api.js +2 -2
- package/lib/api/menu-config-api.js.map +1 -1
- package/lib/api/meta-module-api.js +1 -1
- package/lib/api/metafile-api.js +1 -1
- package/lib/api/mobile-config-api.js +1 -1
- package/lib/api/model-api.js +1 -1
- package/lib/api/net-info-utils.js +1 -1
- package/lib/api/traceback-api.js +1 -1
- package/lib/api/user-api.js +1 -1
- package/lib/apiProviders/Action/ActionApiProvider.js +1 -1
- package/lib/apiProviders/Action/ActionProvider.js +1 -1
- package/lib/apiProviders/Action/AosActionApi.js +1 -1
- package/lib/apiProviders/Action/GatewayActionApi.js +1 -1
- package/lib/apiProviders/Action/index.js +1 -1
- package/lib/apiProviders/Action/utils.js +1 -1
- package/lib/apiProviders/Model/AopModelApi.js +1 -1
- package/lib/apiProviders/Model/GatewayModelApi.js +1 -1
- package/lib/apiProviders/Model/ModelApiProvider.js +1 -1
- package/lib/apiProviders/Model/Provider.js +1 -1
- package/lib/apiProviders/Model/index.js +1 -1
- package/lib/apiProviders/Model/utils.js +1 -1
- package/lib/apiProviders/Standard/AxiosProvider.js +1 -1
- package/lib/apiProviders/Standard/ObjectFieldsProvider.js +1 -1
- package/lib/apiProviders/Standard/index.js +1 -1
- package/lib/apiProviders/Standard/requests.helper.js +1 -1
- package/lib/apiProviders/config.js +1 -1
- package/lib/apiProviders/index.js +1 -1
- package/lib/apiProviders/middlewares/fieldParser.js +1 -1
- package/lib/apiProviders/middlewares/index.js +1 -1
- package/lib/apiProviders/middlewares/translation.js +1 -1
- package/lib/apiProviders/utils.js +1 -1
- package/lib/app/Application.js +1 -1
- package/lib/app/ContextedApplication.js +1 -1
- package/lib/app/ContextsProvider.js +1 -1
- package/lib/app/Module.js +1 -1
- package/lib/app/RootNavigator.js +8 -6
- package/lib/app/RootNavigator.js.map +1 -1
- package/lib/app/context.helper.js +1 -1
- package/lib/app/index.js +1 -1
- package/lib/app/module-generation.helper.js +1 -1
- package/lib/app/types.js +1 -1
- package/lib/auth/api/company-api.js +1 -1
- package/lib/auth/api/config-api.js +1 -1
- package/lib/auth/api/index.js +1 -1
- package/lib/auth/api/language-api.js +1 -1
- package/lib/auth/api/user-api.js +1 -1
- package/lib/auth/components/index.js +1 -1
- package/lib/auth/components/molecules/TranslationsButton/TranslationsButton.js +1 -1
- package/lib/auth/components/molecules/index.js +1 -1
- package/lib/auth/features/asyncFunctionsIndex.js +1 -1
- package/lib/auth/features/companySlice.js +1 -1
- package/lib/auth/features/configSlice.js +1 -1
- package/lib/auth/features/index.js +1 -1
- package/lib/auth/features/languageSlice.js +1 -1
- package/lib/auth/features/userSlice.d.ts +1 -0
- package/lib/auth/features/userSlice.js +9 -3
- package/lib/auth/features/userSlice.js.map +1 -1
- package/lib/auth/hooks/use-auth-headers.js +1 -1
- package/lib/auth/i18n/en.json +1 -0
- package/lib/auth/i18n/fr.json +1 -0
- package/lib/auth/index.js +1 -1
- package/lib/auth/models/index.js +1 -1
- package/lib/auth/models/objectFields.js +1 -1
- package/lib/auth/screens/SettingsScreen.js +1 -1
- package/lib/auth/screens/UserScreen.js +8 -7
- package/lib/auth/screens/UserScreen.js.map +1 -1
- package/lib/auth/screens/index.js +1 -1
- package/lib/components/external/Camera/Camera.js +1 -1
- package/lib/components/external/Camera/CaptureButton.js +1 -1
- package/lib/components/external/CameraScanner/CameraScanner.js +1 -1
- package/lib/components/external/CodeHighlighter/CodeHighlighter.js +1 -1
- package/lib/components/external/CodeHighlighter/code-highlighter.helper.js +1 -1
- package/lib/components/external/PlanningView/PlanningView.js +1 -1
- package/lib/components/external/PlanningView/agenda.helpers.js +1 -1
- package/lib/components/external/Scanner/Scanner.js +1 -1
- package/lib/components/external/Stopwatch/Stopwatch.js +1 -1
- package/lib/components/external/Timer/Timer.js +1 -1
- package/lib/components/external/index.js +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/molecules/CameraButton/CameraButton.js +1 -1
- package/lib/components/molecules/DatePicker/DatePicker.js +1 -1
- package/lib/components/molecules/HeaderBand/HeaderBand.js +1 -1
- package/lib/components/molecules/HeaderOptionsMenuItem/HeaderOptionMenuItem.js +1 -1
- package/lib/components/molecules/InputBarCodeCard/InputBarCodeCard.js +1 -1
- package/lib/components/molecules/MailMessageReadIcon/MailMessageReadIcon.js +1 -1
- package/lib/components/molecules/TrackItem/TrackItem.js +1 -1
- package/lib/components/molecules/UploadFileInput/UploadFileInput.js +1 -1
- package/lib/components/molecules/index.js +1 -1
- package/lib/components/organisms/AOSImage/AOSImage.js +1 -1
- package/lib/components/organisms/AOSImageBubble/AOSImageBubble.js +1 -1
- package/lib/components/organisms/AnomalyBubble/AnomalyBubble.js +1 -1
- package/lib/components/organisms/AnomalyList/AnomalyList.js +1 -1
- package/lib/components/organisms/DateInput/DateInput.d.ts +1 -1
- package/lib/components/organisms/DateInput/DateInput.js +2 -2
- package/lib/components/organisms/DateInput/DateInput.js.map +1 -1
- package/lib/components/organisms/DateInput/date-input.helper.js +1 -1
- package/lib/components/organisms/HeaderBandList/HeaderBandList.js +1 -1
- package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js +1 -1
- package/lib/components/organisms/MailMessageCard/MailMessageCard.js +1 -1
- package/lib/components/organisms/MailMessageCommentCard/MailMessageCommentCard.js +1 -1
- package/lib/components/organisms/MailMessageNotificationCard/MailMessageNotificationCard.js +1 -1
- package/lib/components/organisms/ScannerAutocompleteSearch/ScannerAutocompleteSearch.js +1 -1
- package/lib/components/organisms/index.js +1 -1
- package/lib/components/pages/FormView/Alerts/ConstraintsValidatorPopup.js +1 -1
- package/lib/components/pages/FormView/Alerts/index.js +1 -1
- package/lib/components/pages/FormView/Components/Field.js +3 -2
- package/lib/components/pages/FormView/Components/Field.js.map +1 -1
- package/lib/components/pages/FormView/Components/Panel.js +1 -1
- package/lib/components/pages/FormView/Components/index.js +1 -1
- package/lib/components/pages/FormView/Custom/CustomButton.js +1 -1
- package/lib/components/pages/FormView/Custom/CustomPasswordInput.js +1 -1
- package/lib/components/pages/FormView/Custom/CustomPicker.js +1 -1
- package/lib/components/pages/FormView/Custom/CustomSearchBar.js +1 -1
- package/lib/components/pages/FormView/Custom/index.js +1 -1
- package/lib/components/pages/FormView/FormView.js +1 -1
- package/lib/components/pages/index.js +1 -1
- package/lib/components/templates/AttachedFilesView/AttachedFilesView.js +1 -1
- package/lib/components/templates/MailMessageView/MailMessageView.js +2 -2
- package/lib/components/templates/MailMessageView/MailMessageView.js.map +1 -1
- package/lib/components/templates/PopupApplicationInformation/PopupApplicationInformation.d.ts +7 -0
- package/lib/components/templates/{PopupApplicationNotConfigured/PopupApplicationNotConfigured.js → PopupApplicationInformation/PopupApplicationInformation.js} +7 -7
- package/lib/components/templates/PopupApplicationInformation/PopupApplicationInformation.js.map +1 -0
- package/lib/components/templates/PopupMinimalRequiredVersion/PopupMinimalRequiredVersion.js +1 -1
- package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.js +1 -1
- package/lib/components/templates/UserSearchBar/UserSearchBar.js +1 -1
- package/lib/components/templates/index.d.ts +1 -1
- package/lib/components/templates/index.js +2 -2
- package/lib/components/templates/index.js.map +1 -1
- package/lib/config/RouterProvider.js +1 -1
- package/lib/config/index.js +1 -1
- package/lib/config/routes.d.ts +3 -0
- package/lib/config/routes.js +3 -1
- package/lib/config/routes.js.map +1 -1
- package/lib/features/attachedFilesSlice.js +1 -1
- package/lib/features/authSlice.js +1 -1
- package/lib/features/cameraScannerSlice.js +1 -1
- package/lib/features/cameraSlice.js +1 -1
- package/lib/features/formSlice.js +1 -1
- package/lib/features/index.js +1 -1
- package/lib/features/mailMessageSlice.js +1 -1
- package/lib/features/menuConfigSlice.js +1 -1
- package/lib/features/metaJsonFieldSlice.js +1 -1
- package/lib/features/metaModuleSlice.js +1 -1
- package/lib/features/metafileSlice.js +1 -1
- package/lib/features/mobileConfigSlice.js +1 -1
- package/lib/features/onlineSlice.js +1 -1
- package/lib/features/scannerSlice.js +1 -1
- package/lib/features/userSlice.js +1 -1
- package/lib/forms/FormConfigsProvider.d.ts +1 -0
- package/lib/forms/FormConfigsProvider.js +10 -4
- package/lib/forms/FormConfigsProvider.js.map +1 -1
- package/lib/forms/api.helpers.js +1 -1
- package/lib/forms/display.helpers.js +1 -1
- package/lib/forms/index.js +1 -1
- package/lib/forms/register.helpers.js +1 -1
- package/lib/forms/studio/api.helpers.js +1 -1
- package/lib/forms/studio/display.helpers.js +1 -1
- package/lib/forms/studio/formula.helpers.js +1 -1
- package/lib/forms/studio/index.js +1 -1
- package/lib/forms/types.js +1 -1
- package/lib/forms/validation.helpers.js +1 -1
- package/lib/header/HeaderActionsProvider.d.ts +5 -2
- package/lib/header/HeaderActionsProvider.js +22 -19
- package/lib/header/HeaderActionsProvider.js.map +1 -1
- package/lib/header/HeaderBandContext.js +1 -1
- package/lib/header/header-band-context.helper.js +1 -1
- package/lib/header/hooks.js +15 -5
- package/lib/header/hooks.js.map +1 -1
- package/lib/header/index.js +1 -1
- package/lib/header/types.js +1 -1
- package/lib/header/utils.js +1 -1
- package/lib/hooks/use-background-function.js +1 -1
- package/lib/hooks/use-effect-debugger.js +1 -1
- package/lib/hooks/use-header-registers.js +1 -1
- package/lib/hooks/use-navigation.js +1 -1
- package/lib/hooks/use-scan-activator.js +1 -1
- package/lib/i18n/api/translation.js +1 -1
- package/lib/i18n/component/Translator.js +1 -1
- package/lib/i18n/helpers/langages.js +1 -1
- package/lib/i18n/helpers/translations.js +1 -1
- package/lib/i18n/hooks/use-translator.js +1 -1
- package/lib/i18n/i18n.js +1 -1
- package/lib/i18n/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/models/index.js +1 -1
- package/lib/models/objectFields.js +1 -1
- package/lib/models/searchFields.js +1 -1
- package/lib/models/sortFields.js +1 -1
- package/lib/navigator/Navigator.js +4 -5
- package/lib/navigator/Navigator.js.map +1 -1
- package/lib/navigator/drawer/AuthMenuIconButton.js +1 -1
- package/lib/navigator/drawer/BackIcon.js +1 -1
- package/lib/navigator/drawer/DrawerContent.js +3 -3
- package/lib/navigator/drawer/DrawerContent.js.map +1 -1
- package/lib/navigator/drawer/DrawerToggleButton.js +1 -1
- package/lib/navigator/drawer/Header.js +6 -11
- package/lib/navigator/drawer/Header.js.map +1 -1
- package/lib/navigator/drawer/Menu.js +1 -1
- package/lib/navigator/drawer/MenuIconButton.js +1 -1
- package/lib/navigator/drawer/MenuItem.js +1 -1
- package/lib/navigator/drawer/MenuItemEntry.js +1 -1
- package/lib/navigator/drawer/MenuTitle.js +1 -1
- package/lib/navigator/drawer/SubMenuItem.js +1 -1
- package/lib/navigator/drawer/SubMenuItemList.js +1 -1
- package/lib/navigator/menu.helper.js +1 -1
- package/lib/navigator/module.helper.d.ts +1 -1
- package/lib/navigator/module.helper.js +16 -15
- package/lib/navigator/module.helper.js.map +1 -1
- package/lib/navigator/roles.helper.js +1 -1
- package/lib/redux/hooks.js +1 -1
- package/lib/redux/store.js +1 -1
- package/lib/screens/AttachedFilesScreen.js +1 -1
- package/lib/screens/BarcodeDisplayScreen.js +1 -1
- package/lib/screens/ErrorScreen.js +1 -1
- package/lib/screens/JsonFieldScreen.js +1 -1
- package/lib/screens/LoginScreen.js +1 -1
- package/lib/screens/MailMessageScreen.js +1 -1
- package/lib/screens/SessionManagementScreen.js +1 -1
- package/lib/screens/index.js +1 -1
- package/lib/sessions/SessionStorage.js +1 -1
- package/lib/sessions/components/alerts/PopupCreateSession.js +1 -1
- package/lib/sessions/components/alerts/PopupEditSession.js +1 -1
- package/lib/sessions/components/alerts/PopupSession.js +1 -1
- package/lib/sessions/components/alerts/index.js +1 -1
- package/lib/sessions/components/display/LogoImage.js +1 -1
- package/lib/sessions/components/display/SessionCard.js +1 -1
- package/lib/sessions/components/display/SessionListCard.js +1 -1
- package/lib/sessions/components/display/index.js +1 -1
- package/lib/sessions/components/error/ErrorText.js +1 -1
- package/lib/sessions/components/error/index.js +1 -1
- package/lib/sessions/components/index.js +1 -1
- package/lib/sessions/components/inputs/DefaultCheckbox.js +1 -1
- package/lib/sessions/components/inputs/PasswordInput.js +1 -1
- package/lib/sessions/components/inputs/SessionInputs.js +1 -1
- package/lib/sessions/components/inputs/SessionNameInput.js +1 -1
- package/lib/sessions/components/inputs/UrlInput.js +1 -1
- package/lib/sessions/components/inputs/UsernameInput.js +1 -1
- package/lib/sessions/components/inputs/index.js +1 -1
- package/lib/sessions/hook.js +1 -1
- package/lib/sessions/index.js +1 -1
- package/lib/sessions/type.js +1 -1
- package/lib/sessions/utils.js +1 -1
- package/lib/storage/Storage.js +1 -1
- package/lib/tools/ClipboardProvider.js +1 -1
- package/lib/tools/ContactProvider.js +1 -1
- package/lib/tools/FilePicker.js +1 -1
- package/lib/tools/FileViewer.js +1 -1
- package/lib/tools/LinkingProvider.js +1 -1
- package/lib/tools/contact.helper.js +1 -1
- package/lib/tools/index.js +1 -1
- package/lib/tools/linking.helper.js +1 -1
- package/lib/types/anomaly-type.js +1 -1
- package/lib/types/index.js +1 -1
- package/lib/types/mail-message-notification-type.js +1 -1
- package/lib/types/stopwatch-type.js +1 -1
- package/lib/utils/agenda.js +1 -1
- package/lib/utils/api.js +1 -1
- package/lib/utils/date.js +1 -1
- package/lib/utils/displayers.js +1 -1
- package/lib/utils/filter.js +1 -1
- package/lib/utils/formatters.js +1 -1
- package/lib/utils/image.js +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/list.js +1 -1
- package/lib/utils/object.js +1 -1
- package/lib/utils/show-toast-message.js +1 -1
- package/lib/utils/string.js +1 -1
- package/lib/utils/time.js +1 -1
- package/package.json +3 -3
- package/lib/components/templates/PopupApplicationNotConfigured/PopupApplicationNotConfigured.d.ts +0 -4
- package/lib/components/templates/PopupApplicationNotConfigured/PopupApplicationNotConfigured.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -22,16 +22,19 @@ class FormConfigsProvider {
|
|
|
22
22
|
refreshCallBack;
|
|
23
23
|
constructor() {
|
|
24
24
|
this.formConfigs = {};
|
|
25
|
-
this.refreshCallBack =
|
|
25
|
+
this.refreshCallBack = [];
|
|
26
26
|
}
|
|
27
27
|
register(callBack) {
|
|
28
|
-
this.refreshCallBack
|
|
28
|
+
this.refreshCallBack.push(callBack);
|
|
29
|
+
}
|
|
30
|
+
unregister(callBack) {
|
|
31
|
+
this.refreshCallBack = this.refreshCallBack.filter(_f => _f !== callBack);
|
|
29
32
|
}
|
|
30
33
|
init(configs) {
|
|
31
34
|
this.formConfigs = configs;
|
|
32
35
|
}
|
|
33
36
|
updateState() {
|
|
34
|
-
this.refreshCallBack(this.formConfigs);
|
|
37
|
+
this.refreshCallBack.forEach(_f => _f(this.formConfigs));
|
|
35
38
|
}
|
|
36
39
|
getFormConfig(key) {
|
|
37
40
|
return fetchOptionsOfFormKey(this.formConfigs, key);
|
|
@@ -49,6 +52,9 @@ export const useFormConfig = (modelKey) => {
|
|
|
49
52
|
const [forms, setForms] = useState(formConfigsProvider.getAllConfigs());
|
|
50
53
|
useEffect(() => {
|
|
51
54
|
formConfigsProvider.register(setForms);
|
|
55
|
+
return () => {
|
|
56
|
+
formConfigsProvider.unregister(setForms);
|
|
57
|
+
};
|
|
52
58
|
}, []);
|
|
53
59
|
const getFormConfigOfModel = useCallback(key => fetchOptionsOfFormKey(forms, key), [forms]);
|
|
54
60
|
return useMemo(() => ({ config: getFormConfigOfModel(modelKey) }), [getFormConfigOfModel, modelKey]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormConfigsProvider.js","sourceRoot":"","sources":["../../src/forms/FormConfigsProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAC,cAAc,EAAE,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AAMzE,MAAM,mBAAmB;IACf,WAAW,CAAc;IACzB,eAAe,
|
|
1
|
+
{"version":3,"file":"FormConfigsProvider.js","sourceRoot":"","sources":["../../src/forms/FormConfigsProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAC,cAAc,EAAE,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AAMzE,MAAM,mBAAmB;IACf,WAAW,CAAc;IACzB,eAAe,CAAa;IAEpC;QACE,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,QAAQ,CAAC,QAAQ;QACf,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,UAAU,CAAC,QAAQ;QACjB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC;IAC5E,CAAC;IAED,IAAI,CAAC,OAAoB;QACvB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC;IAC7B,CAAC;IAEO,WAAW;QACjB,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,WAA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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/forms/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/forms/types.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -4,11 +4,14 @@ declare class HeaderActionsProvider {
|
|
|
4
4
|
private refreshCallBack;
|
|
5
5
|
constructor();
|
|
6
6
|
register(callBack: any): void;
|
|
7
|
+
unregister(callBack: any): void;
|
|
8
|
+
private updateState;
|
|
7
9
|
registerModel(key: string, options: HeaderOptions): void;
|
|
8
10
|
getHeaderOptions(key: string): HeaderOptions;
|
|
11
|
+
getAllHeaderActions(): HeaderActions;
|
|
9
12
|
}
|
|
10
13
|
export declare const headerActionsProvider: HeaderActionsProvider;
|
|
11
|
-
export declare const useHeaderActions: () => {
|
|
12
|
-
headers:
|
|
14
|
+
export declare const useHeaderActions: (actionID: string) => {
|
|
15
|
+
headers: HeaderOptions;
|
|
13
16
|
};
|
|
14
17
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -22,10 +22,16 @@ class HeaderActionsProvider {
|
|
|
22
22
|
refreshCallBack;
|
|
23
23
|
constructor() {
|
|
24
24
|
this.headerActions = {};
|
|
25
|
-
this.refreshCallBack =
|
|
25
|
+
this.refreshCallBack = [];
|
|
26
26
|
}
|
|
27
27
|
register(callBack) {
|
|
28
|
-
this.refreshCallBack
|
|
28
|
+
this.refreshCallBack.push(callBack);
|
|
29
|
+
}
|
|
30
|
+
unregister(callBack) {
|
|
31
|
+
this.refreshCallBack = this.refreshCallBack.filter(_f => _f !== callBack);
|
|
32
|
+
}
|
|
33
|
+
updateState() {
|
|
34
|
+
this.refreshCallBack.forEach(_f => _f(this.headerActions));
|
|
29
35
|
}
|
|
30
36
|
registerModel(key, options) {
|
|
31
37
|
if (!Object.keys(this.headerActions).includes(key)) {
|
|
@@ -39,28 +45,25 @@ class HeaderActionsProvider {
|
|
|
39
45
|
actions: mergeActions(oldOptions.actions, options.actions),
|
|
40
46
|
};
|
|
41
47
|
}
|
|
42
|
-
this.
|
|
48
|
+
this.updateState();
|
|
43
49
|
}
|
|
44
50
|
getHeaderOptions(key) {
|
|
45
51
|
return fetchOptionsOfHeaderKey(this.headerActions, key);
|
|
46
52
|
}
|
|
53
|
+
getAllHeaderActions() {
|
|
54
|
+
return this.headerActions;
|
|
55
|
+
}
|
|
47
56
|
}
|
|
48
57
|
export const headerActionsProvider = new HeaderActionsProvider();
|
|
49
|
-
export const useHeaderActions = () => {
|
|
50
|
-
const [headers, setHeaders] = useState();
|
|
51
|
-
const refreshData = useCallback((key, options) => {
|
|
52
|
-
setHeaders(_current => {
|
|
53
|
-
if (_current?.[key] === options) {
|
|
54
|
-
return _current;
|
|
55
|
-
}
|
|
56
|
-
const updatedHeaders = _current != null ? { ..._current } : {};
|
|
57
|
-
updatedHeaders[key] = options;
|
|
58
|
-
return updatedHeaders;
|
|
59
|
-
});
|
|
60
|
-
}, []);
|
|
58
|
+
export const useHeaderActions = (actionID) => {
|
|
59
|
+
const [headers, setHeaders] = useState(headerActionsProvider.getAllHeaderActions());
|
|
61
60
|
useEffect(() => {
|
|
62
|
-
headerActionsProvider.register(
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
headerActionsProvider.register(options => setHeaders({ ...options }));
|
|
62
|
+
return () => {
|
|
63
|
+
headerActionsProvider.unregister(setHeaders);
|
|
64
|
+
};
|
|
65
|
+
}, []);
|
|
66
|
+
const getFormConfigOfModel = useCallback(key => fetchOptionsOfHeaderKey(headers, key), [headers]);
|
|
67
|
+
return useMemo(() => ({ headers: getFormConfigOfModel(actionID) }), [actionID, getFormConfigOfModel]);
|
|
65
68
|
};
|
|
66
69
|
//# sourceMappingURL=HeaderActionsProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderActionsProvider.js","sourceRoot":"","sources":["../../src/header/HeaderActionsProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAC,uBAAuB,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AAE9D,MAAM,qBAAqB;IACjB,aAAa,CAAgB;IAC7B,eAAe,
|
|
1
|
+
{"version":3,"file":"HeaderActionsProvider.js","sourceRoot":"","sources":["../../src/header/HeaderActionsProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAC,uBAAuB,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AAE9D,MAAM,qBAAqB;IACjB,aAAa,CAAgB;IAC7B,eAAe,CAAa;IAEpC;QACE,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QACxB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,QAAQ,CAAC,QAAQ;QACf,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,UAAU,CAAC,QAAQ;QACjB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC;IAC5E,CAAC;IAEO,WAAW;QACjB,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,aAAa,CAAC,GAAW,EAAE,OAAsB;QAC/C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,C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AO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC,EAAC,OAAO,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EAAC,CAAC,EACjD,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CACjC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/header/hooks.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
import { useNavigation } from '@react-navigation/native';
|
|
19
|
-
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
19
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
20
20
|
import { useDispatch, useSelector } from 'react-redux';
|
|
21
21
|
import { countAttachmentFiles } from '../features/attachedFilesSlice';
|
|
22
22
|
import { countUnreadMailMessages } from '../features/mailMessageSlice';
|
|
@@ -26,10 +26,13 @@ import { fetchModel } from '../api/model-api';
|
|
|
26
26
|
import { useOnline } from '../features/onlineSlice';
|
|
27
27
|
import { getNetInfo } from '../api/net-info-utils';
|
|
28
28
|
import { fetchJsonFieldsOfModel } from '../forms';
|
|
29
|
+
import { useIsFocused } from '../hooks/use-navigation';
|
|
29
30
|
export const useBasicActions = ({ model, modelId, disableMailMessages, disableJsonFields = false, attachedFileScreenTitle, barcodeFieldname = 'barCode', }) => {
|
|
30
31
|
const navigation = useNavigation();
|
|
31
32
|
const I18n = useTranslator();
|
|
32
33
|
const online = useOnline();
|
|
34
|
+
const connectionInterval = useRef();
|
|
35
|
+
const isFocused = useIsFocused();
|
|
33
36
|
const dispatch = useDispatch();
|
|
34
37
|
const { attachments } = useSelector(state => state.attachedFiles);
|
|
35
38
|
const { unreadMessages } = useSelector(state => state.mailMessages);
|
|
@@ -76,9 +79,16 @@ export const useBasicActions = ({ model, modelId, disableMailMessages, disableJs
|
|
|
76
79
|
setIsConnected(_isConnected);
|
|
77
80
|
}, []);
|
|
78
81
|
useEffect(() => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
if (isFocused) {
|
|
83
|
+
connectionInterval.current = setInterval(checkInternetConnection, 2000);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
clearInterval(connectionInterval.current);
|
|
87
|
+
}
|
|
88
|
+
return () => {
|
|
89
|
+
clearInterval(connectionInterval.current);
|
|
90
|
+
};
|
|
91
|
+
}, [checkInternetConnection, isFocused]);
|
|
82
92
|
const mailMessagesAction = useMemo(() => {
|
|
83
93
|
return {
|
|
84
94
|
key: 'mailMessages',
|
package/lib/header/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/header/hooks.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,E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D,IAAI;QACJ,iBAAiB;QACjB,iBAAiB;QACjB,MAAM,CAAC,SAAS;QAChB,WAAW;QACX,UAAU;QACV,KAAK;QACL,OAAO;KACR,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,eAAe,EAAE;YACnB,OAAO;gBACL,kBAAkB;gBAClB,mBAAmB;gBACnB,aAAa;gBACb,gBAAgB;aACjB,CAAC;SACH;QAED,OAAO;YACL,kBAAkB,EAAE,EAAC,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAC;YACvD,mBAAmB,EAAE,EAAC,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAC;YACzD,aAAa,EAAE,EAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAC;YAC7C,gBAAgB,EAAE,EAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAC;SACxD,CAAC;IACJ,CAAC,EAAE;QACD,mBAAmB;QACnB,aAAa;QACb,gBAAgB;QAChB,kBAAkB;QAClB,eAAe;KAChB,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/lib/header/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/header/types.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/header/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/i18n/i18n.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/i18n/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/models/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/models/sortFields.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -21,7 +21,7 @@ import { createDrawerNavigator } from '@react-navigation/drawer';
|
|
|
21
21
|
import { createStackNavigator } from '@react-navigation/stack';
|
|
22
22
|
import { useThemeColor } from '@axelor/aos-mobile-ui';
|
|
23
23
|
import DrawerContent from './drawer/DrawerContent';
|
|
24
|
-
import { filterAuthorizedModules, getDefaultModule, manageOverridingMenus, manageWebCompatibility, moduleHasMenus,
|
|
24
|
+
import { filterAuthorizedModules, getDefaultModule, manageOverridingMenus, manageWebCompatibility, moduleHasMenus, } from './module.helper';
|
|
25
25
|
import { manageSubMenusOverriding, getMenuTitle, hasSubMenus, } from './menu.helper';
|
|
26
26
|
import useTranslator from '../i18n/hooks/use-translator';
|
|
27
27
|
import { useDispatch, useSelector } from 'react-redux';
|
|
@@ -45,7 +45,7 @@ const Navigator = ({ modules, mainMenu, onRefresh, version, versionCheckConfig,
|
|
|
45
45
|
const I18n = useTranslator();
|
|
46
46
|
const Colors = useThemeColor();
|
|
47
47
|
const dispatch = useDispatch();
|
|
48
|
-
const enabledModule = useMemo(() => manageWebCompatibility(manageOverridingMenus(manageSubMenusOverriding(filterAuthorizedModules(modules, mobileConfigs, user))), metaModules), [metaModules, mobileConfigs, modules, user]);
|
|
48
|
+
const enabledModule = useMemo(() => manageWebCompatibility(manageOverridingMenus(manageSubMenusOverriding(filterAuthorizedModules(modules, mobileConfigs, restrictedMenus, user))), metaModules), [metaModules, mobileConfigs, modules, restrictedMenus, user]);
|
|
49
49
|
const [activeModule, setActiveModule] = useState(getDefaultModule(enabledModule, mainMenu));
|
|
50
50
|
useEffect(() => {
|
|
51
51
|
dispatch(fetchMobileConfig());
|
|
@@ -57,10 +57,9 @@ const Navigator = ({ modules, mainMenu, onRefresh, version, versionCheckConfig,
|
|
|
57
57
|
}, [enabledModule]);
|
|
58
58
|
const modulesMenus = useMemo(() => {
|
|
59
59
|
return enabledModule
|
|
60
|
-
.map(_module => updateAccessibleMenus(_module, restrictedMenus, user))
|
|
61
60
|
.filter(moduleHasMenus)
|
|
62
61
|
.reduce((menus, _module) => ({ ...menus, ..._module.menus }), {});
|
|
63
|
-
}, [enabledModule
|
|
62
|
+
}, [enabledModule]);
|
|
64
63
|
const modulesScreens = useMemo(() => modules.reduce((screens, module) => ({ ...screens, ...module.screens }), {
|
|
65
64
|
...BaseScreen,
|
|
66
65
|
}), [modules]);
|