@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.
Files changed (275) hide show
  1. package/lib/api/anomaly-api.js +1 -1
  2. package/lib/api/attached-files-api.js +1 -1
  3. package/lib/api/login-api.js +1 -1
  4. package/lib/api/mail-message-api.js +1 -1
  5. package/lib/api/menu-config-api.js +2 -2
  6. package/lib/api/menu-config-api.js.map +1 -1
  7. package/lib/api/meta-module-api.js +1 -1
  8. package/lib/api/metafile-api.js +1 -1
  9. package/lib/api/mobile-config-api.js +1 -1
  10. package/lib/api/model-api.js +1 -1
  11. package/lib/api/net-info-utils.js +1 -1
  12. package/lib/api/traceback-api.js +1 -1
  13. package/lib/api/user-api.js +1 -1
  14. package/lib/apiProviders/Action/ActionApiProvider.js +1 -1
  15. package/lib/apiProviders/Action/ActionProvider.js +1 -1
  16. package/lib/apiProviders/Action/AosActionApi.js +1 -1
  17. package/lib/apiProviders/Action/GatewayActionApi.js +1 -1
  18. package/lib/apiProviders/Action/index.js +1 -1
  19. package/lib/apiProviders/Action/utils.js +1 -1
  20. package/lib/apiProviders/Model/AopModelApi.js +1 -1
  21. package/lib/apiProviders/Model/GatewayModelApi.js +1 -1
  22. package/lib/apiProviders/Model/ModelApiProvider.js +1 -1
  23. package/lib/apiProviders/Model/Provider.js +1 -1
  24. package/lib/apiProviders/Model/index.js +1 -1
  25. package/lib/apiProviders/Model/utils.js +1 -1
  26. package/lib/apiProviders/Standard/AxiosProvider.js +1 -1
  27. package/lib/apiProviders/Standard/ObjectFieldsProvider.js +1 -1
  28. package/lib/apiProviders/Standard/index.js +1 -1
  29. package/lib/apiProviders/Standard/requests.helper.js +1 -1
  30. package/lib/apiProviders/config.js +1 -1
  31. package/lib/apiProviders/index.js +1 -1
  32. package/lib/apiProviders/middlewares/fieldParser.js +1 -1
  33. package/lib/apiProviders/middlewares/index.js +1 -1
  34. package/lib/apiProviders/middlewares/translation.js +1 -1
  35. package/lib/apiProviders/utils.js +1 -1
  36. package/lib/app/Application.js +1 -1
  37. package/lib/app/ContextedApplication.js +1 -1
  38. package/lib/app/ContextsProvider.js +1 -1
  39. package/lib/app/Module.js +1 -1
  40. package/lib/app/RootNavigator.js +8 -6
  41. package/lib/app/RootNavigator.js.map +1 -1
  42. package/lib/app/context.helper.js +1 -1
  43. package/lib/app/index.js +1 -1
  44. package/lib/app/module-generation.helper.js +1 -1
  45. package/lib/app/types.js +1 -1
  46. package/lib/auth/api/company-api.js +1 -1
  47. package/lib/auth/api/config-api.js +1 -1
  48. package/lib/auth/api/index.js +1 -1
  49. package/lib/auth/api/language-api.js +1 -1
  50. package/lib/auth/api/user-api.js +1 -1
  51. package/lib/auth/components/index.js +1 -1
  52. package/lib/auth/components/molecules/TranslationsButton/TranslationsButton.js +1 -1
  53. package/lib/auth/components/molecules/index.js +1 -1
  54. package/lib/auth/features/asyncFunctionsIndex.js +1 -1
  55. package/lib/auth/features/companySlice.js +1 -1
  56. package/lib/auth/features/configSlice.js +1 -1
  57. package/lib/auth/features/index.js +1 -1
  58. package/lib/auth/features/languageSlice.js +1 -1
  59. package/lib/auth/features/userSlice.d.ts +1 -0
  60. package/lib/auth/features/userSlice.js +9 -3
  61. package/lib/auth/features/userSlice.js.map +1 -1
  62. package/lib/auth/hooks/use-auth-headers.js +1 -1
  63. package/lib/auth/i18n/en.json +1 -0
  64. package/lib/auth/i18n/fr.json +1 -0
  65. package/lib/auth/index.js +1 -1
  66. package/lib/auth/models/index.js +1 -1
  67. package/lib/auth/models/objectFields.js +1 -1
  68. package/lib/auth/screens/SettingsScreen.js +1 -1
  69. package/lib/auth/screens/UserScreen.js +8 -7
  70. package/lib/auth/screens/UserScreen.js.map +1 -1
  71. package/lib/auth/screens/index.js +1 -1
  72. package/lib/components/external/Camera/Camera.js +1 -1
  73. package/lib/components/external/Camera/CaptureButton.js +1 -1
  74. package/lib/components/external/CameraScanner/CameraScanner.js +1 -1
  75. package/lib/components/external/CodeHighlighter/CodeHighlighter.js +1 -1
  76. package/lib/components/external/CodeHighlighter/code-highlighter.helper.js +1 -1
  77. package/lib/components/external/PlanningView/PlanningView.js +1 -1
  78. package/lib/components/external/PlanningView/agenda.helpers.js +1 -1
  79. package/lib/components/external/Scanner/Scanner.js +1 -1
  80. package/lib/components/external/Stopwatch/Stopwatch.js +1 -1
  81. package/lib/components/external/Timer/Timer.js +1 -1
  82. package/lib/components/external/index.js +1 -1
  83. package/lib/components/index.js +1 -1
  84. package/lib/components/molecules/CameraButton/CameraButton.js +1 -1
  85. package/lib/components/molecules/DatePicker/DatePicker.js +1 -1
  86. package/lib/components/molecules/HeaderBand/HeaderBand.js +1 -1
  87. package/lib/components/molecules/HeaderOptionsMenuItem/HeaderOptionMenuItem.js +1 -1
  88. package/lib/components/molecules/InputBarCodeCard/InputBarCodeCard.js +1 -1
  89. package/lib/components/molecules/MailMessageReadIcon/MailMessageReadIcon.js +1 -1
  90. package/lib/components/molecules/TrackItem/TrackItem.js +1 -1
  91. package/lib/components/molecules/UploadFileInput/UploadFileInput.js +1 -1
  92. package/lib/components/molecules/index.js +1 -1
  93. package/lib/components/organisms/AOSImage/AOSImage.js +1 -1
  94. package/lib/components/organisms/AOSImageBubble/AOSImageBubble.js +1 -1
  95. package/lib/components/organisms/AnomalyBubble/AnomalyBubble.js +1 -1
  96. package/lib/components/organisms/AnomalyList/AnomalyList.js +1 -1
  97. package/lib/components/organisms/DateInput/DateInput.d.ts +1 -1
  98. package/lib/components/organisms/DateInput/DateInput.js +2 -2
  99. package/lib/components/organisms/DateInput/DateInput.js.map +1 -1
  100. package/lib/components/organisms/DateInput/date-input.helper.js +1 -1
  101. package/lib/components/organisms/HeaderBandList/HeaderBandList.js +1 -1
  102. package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js +1 -1
  103. package/lib/components/organisms/MailMessageCard/MailMessageCard.js +1 -1
  104. package/lib/components/organisms/MailMessageCommentCard/MailMessageCommentCard.js +1 -1
  105. package/lib/components/organisms/MailMessageNotificationCard/MailMessageNotificationCard.js +1 -1
  106. package/lib/components/organisms/ScannerAutocompleteSearch/ScannerAutocompleteSearch.js +1 -1
  107. package/lib/components/organisms/index.js +1 -1
  108. package/lib/components/pages/FormView/Alerts/ConstraintsValidatorPopup.js +1 -1
  109. package/lib/components/pages/FormView/Alerts/index.js +1 -1
  110. package/lib/components/pages/FormView/Components/Field.js +3 -2
  111. package/lib/components/pages/FormView/Components/Field.js.map +1 -1
  112. package/lib/components/pages/FormView/Components/Panel.js +1 -1
  113. package/lib/components/pages/FormView/Components/index.js +1 -1
  114. package/lib/components/pages/FormView/Custom/CustomButton.js +1 -1
  115. package/lib/components/pages/FormView/Custom/CustomPasswordInput.js +1 -1
  116. package/lib/components/pages/FormView/Custom/CustomPicker.js +1 -1
  117. package/lib/components/pages/FormView/Custom/CustomSearchBar.js +1 -1
  118. package/lib/components/pages/FormView/Custom/index.js +1 -1
  119. package/lib/components/pages/FormView/FormView.js +1 -1
  120. package/lib/components/pages/index.js +1 -1
  121. package/lib/components/templates/AttachedFilesView/AttachedFilesView.js +1 -1
  122. package/lib/components/templates/MailMessageView/MailMessageView.js +2 -2
  123. package/lib/components/templates/MailMessageView/MailMessageView.js.map +1 -1
  124. package/lib/components/templates/PopupApplicationInformation/PopupApplicationInformation.d.ts +7 -0
  125. package/lib/components/templates/{PopupApplicationNotConfigured/PopupApplicationNotConfigured.js → PopupApplicationInformation/PopupApplicationInformation.js} +7 -7
  126. package/lib/components/templates/PopupApplicationInformation/PopupApplicationInformation.js.map +1 -0
  127. package/lib/components/templates/PopupMinimalRequiredVersion/PopupMinimalRequiredVersion.js +1 -1
  128. package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.js +1 -1
  129. package/lib/components/templates/UserSearchBar/UserSearchBar.js +1 -1
  130. package/lib/components/templates/index.d.ts +1 -1
  131. package/lib/components/templates/index.js +2 -2
  132. package/lib/components/templates/index.js.map +1 -1
  133. package/lib/config/RouterProvider.js +1 -1
  134. package/lib/config/index.js +1 -1
  135. package/lib/config/routes.d.ts +3 -0
  136. package/lib/config/routes.js +3 -1
  137. package/lib/config/routes.js.map +1 -1
  138. package/lib/features/attachedFilesSlice.js +1 -1
  139. package/lib/features/authSlice.js +1 -1
  140. package/lib/features/cameraScannerSlice.js +1 -1
  141. package/lib/features/cameraSlice.js +1 -1
  142. package/lib/features/formSlice.js +1 -1
  143. package/lib/features/index.js +1 -1
  144. package/lib/features/mailMessageSlice.js +1 -1
  145. package/lib/features/menuConfigSlice.js +1 -1
  146. package/lib/features/metaJsonFieldSlice.js +1 -1
  147. package/lib/features/metaModuleSlice.js +1 -1
  148. package/lib/features/metafileSlice.js +1 -1
  149. package/lib/features/mobileConfigSlice.js +1 -1
  150. package/lib/features/onlineSlice.js +1 -1
  151. package/lib/features/scannerSlice.js +1 -1
  152. package/lib/features/userSlice.js +1 -1
  153. package/lib/forms/FormConfigsProvider.d.ts +1 -0
  154. package/lib/forms/FormConfigsProvider.js +10 -4
  155. package/lib/forms/FormConfigsProvider.js.map +1 -1
  156. package/lib/forms/api.helpers.js +1 -1
  157. package/lib/forms/display.helpers.js +1 -1
  158. package/lib/forms/index.js +1 -1
  159. package/lib/forms/register.helpers.js +1 -1
  160. package/lib/forms/studio/api.helpers.js +1 -1
  161. package/lib/forms/studio/display.helpers.js +1 -1
  162. package/lib/forms/studio/formula.helpers.js +1 -1
  163. package/lib/forms/studio/index.js +1 -1
  164. package/lib/forms/types.js +1 -1
  165. package/lib/forms/validation.helpers.js +1 -1
  166. package/lib/header/HeaderActionsProvider.d.ts +5 -2
  167. package/lib/header/HeaderActionsProvider.js +22 -19
  168. package/lib/header/HeaderActionsProvider.js.map +1 -1
  169. package/lib/header/HeaderBandContext.js +1 -1
  170. package/lib/header/header-band-context.helper.js +1 -1
  171. package/lib/header/hooks.js +15 -5
  172. package/lib/header/hooks.js.map +1 -1
  173. package/lib/header/index.js +1 -1
  174. package/lib/header/types.js +1 -1
  175. package/lib/header/utils.js +1 -1
  176. package/lib/hooks/use-background-function.js +1 -1
  177. package/lib/hooks/use-effect-debugger.js +1 -1
  178. package/lib/hooks/use-header-registers.js +1 -1
  179. package/lib/hooks/use-navigation.js +1 -1
  180. package/lib/hooks/use-scan-activator.js +1 -1
  181. package/lib/i18n/api/translation.js +1 -1
  182. package/lib/i18n/component/Translator.js +1 -1
  183. package/lib/i18n/helpers/langages.js +1 -1
  184. package/lib/i18n/helpers/translations.js +1 -1
  185. package/lib/i18n/hooks/use-translator.js +1 -1
  186. package/lib/i18n/i18n.js +1 -1
  187. package/lib/i18n/index.js +1 -1
  188. package/lib/index.js +1 -1
  189. package/lib/models/index.js +1 -1
  190. package/lib/models/objectFields.js +1 -1
  191. package/lib/models/searchFields.js +1 -1
  192. package/lib/models/sortFields.js +1 -1
  193. package/lib/navigator/Navigator.js +4 -5
  194. package/lib/navigator/Navigator.js.map +1 -1
  195. package/lib/navigator/drawer/AuthMenuIconButton.js +1 -1
  196. package/lib/navigator/drawer/BackIcon.js +1 -1
  197. package/lib/navigator/drawer/DrawerContent.js +3 -3
  198. package/lib/navigator/drawer/DrawerContent.js.map +1 -1
  199. package/lib/navigator/drawer/DrawerToggleButton.js +1 -1
  200. package/lib/navigator/drawer/Header.js +6 -11
  201. package/lib/navigator/drawer/Header.js.map +1 -1
  202. package/lib/navigator/drawer/Menu.js +1 -1
  203. package/lib/navigator/drawer/MenuIconButton.js +1 -1
  204. package/lib/navigator/drawer/MenuItem.js +1 -1
  205. package/lib/navigator/drawer/MenuItemEntry.js +1 -1
  206. package/lib/navigator/drawer/MenuTitle.js +1 -1
  207. package/lib/navigator/drawer/SubMenuItem.js +1 -1
  208. package/lib/navigator/drawer/SubMenuItemList.js +1 -1
  209. package/lib/navigator/menu.helper.js +1 -1
  210. package/lib/navigator/module.helper.d.ts +1 -1
  211. package/lib/navigator/module.helper.js +16 -15
  212. package/lib/navigator/module.helper.js.map +1 -1
  213. package/lib/navigator/roles.helper.js +1 -1
  214. package/lib/redux/hooks.js +1 -1
  215. package/lib/redux/store.js +1 -1
  216. package/lib/screens/AttachedFilesScreen.js +1 -1
  217. package/lib/screens/BarcodeDisplayScreen.js +1 -1
  218. package/lib/screens/ErrorScreen.js +1 -1
  219. package/lib/screens/JsonFieldScreen.js +1 -1
  220. package/lib/screens/LoginScreen.js +1 -1
  221. package/lib/screens/MailMessageScreen.js +1 -1
  222. package/lib/screens/SessionManagementScreen.js +1 -1
  223. package/lib/screens/index.js +1 -1
  224. package/lib/sessions/SessionStorage.js +1 -1
  225. package/lib/sessions/components/alerts/PopupCreateSession.js +1 -1
  226. package/lib/sessions/components/alerts/PopupEditSession.js +1 -1
  227. package/lib/sessions/components/alerts/PopupSession.js +1 -1
  228. package/lib/sessions/components/alerts/index.js +1 -1
  229. package/lib/sessions/components/display/LogoImage.js +1 -1
  230. package/lib/sessions/components/display/SessionCard.js +1 -1
  231. package/lib/sessions/components/display/SessionListCard.js +1 -1
  232. package/lib/sessions/components/display/index.js +1 -1
  233. package/lib/sessions/components/error/ErrorText.js +1 -1
  234. package/lib/sessions/components/error/index.js +1 -1
  235. package/lib/sessions/components/index.js +1 -1
  236. package/lib/sessions/components/inputs/DefaultCheckbox.js +1 -1
  237. package/lib/sessions/components/inputs/PasswordInput.js +1 -1
  238. package/lib/sessions/components/inputs/SessionInputs.js +1 -1
  239. package/lib/sessions/components/inputs/SessionNameInput.js +1 -1
  240. package/lib/sessions/components/inputs/UrlInput.js +1 -1
  241. package/lib/sessions/components/inputs/UsernameInput.js +1 -1
  242. package/lib/sessions/components/inputs/index.js +1 -1
  243. package/lib/sessions/hook.js +1 -1
  244. package/lib/sessions/index.js +1 -1
  245. package/lib/sessions/type.js +1 -1
  246. package/lib/sessions/utils.js +1 -1
  247. package/lib/storage/Storage.js +1 -1
  248. package/lib/tools/ClipboardProvider.js +1 -1
  249. package/lib/tools/ContactProvider.js +1 -1
  250. package/lib/tools/FilePicker.js +1 -1
  251. package/lib/tools/FileViewer.js +1 -1
  252. package/lib/tools/LinkingProvider.js +1 -1
  253. package/lib/tools/contact.helper.js +1 -1
  254. package/lib/tools/index.js +1 -1
  255. package/lib/tools/linking.helper.js +1 -1
  256. package/lib/types/anomaly-type.js +1 -1
  257. package/lib/types/index.js +1 -1
  258. package/lib/types/mail-message-notification-type.js +1 -1
  259. package/lib/types/stopwatch-type.js +1 -1
  260. package/lib/utils/agenda.js +1 -1
  261. package/lib/utils/api.js +1 -1
  262. package/lib/utils/date.js +1 -1
  263. package/lib/utils/displayers.js +1 -1
  264. package/lib/utils/filter.js +1 -1
  265. package/lib/utils/formatters.js +1 -1
  266. package/lib/utils/image.js +1 -1
  267. package/lib/utils/index.js +1 -1
  268. package/lib/utils/list.js +1 -1
  269. package/lib/utils/object.js +1 -1
  270. package/lib/utils/show-toast-message.js +1 -1
  271. package/lib/utils/string.js +1 -1
  272. package/lib/utils/time.js +1 -1
  273. package/package.json +3 -3
  274. package/lib/components/templates/PopupApplicationNotConfigured/PopupApplicationNotConfigured.d.ts +0 -4
  275. 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) 2023 Axelor (<http://axelor.com>).
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 = callBack;
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,CAAW;IAElC;QACE,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,eAAe,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IAClC,CAAC;IAED,QAAQ,CAAC,QAAQ;QACf,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC;IAClC,CAAC;IAED,IAAI,CAAC,OAAoB;QACvB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC;IAC7B,CAAC;IAEO,WAAW;QACjB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC;IAED,aAAa,CAAC,GAAW;QACvB,OAAO,qBAAqB,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;I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,CAAC,GAAG,QAAQ,CAAC,mBAAmB,CAAC,aAAa,EAAE,CAAC,CAAC;IAExE,SAAS,CAAC,GAAG,EAAE;QACb,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAEvC,OAAO,GAAG,EAAE;YACV,mBAAmB,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC3C,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,oBAAoB,GAAG,WAAW,CACtC,GAAG,CAAC,EAAE,CAAC,qBAAqB,CAAC,KAAK,EAAE,GAAG,CAAC,EACxC,CAAC,KAAK,CAAC,CACR,CAAC;IAEF,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC,EAAC,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EAAC,CAAC,EAChD,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CACjC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * Axelor Business Solutions
3
3
  *
4
- * Copyright (C) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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: HeaderActions;
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) 2023 Axelor (<http://axelor.com>).
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 = callBack;
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.refreshCallBack(key, this.headerActions[key]);
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(refreshData);
63
- }, [refreshData]);
64
- return useMemo(() => ({ headers }), [headers]);
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,CAAW;IAElC;QACE,IAAI,CAAC,aAAa,GAAG,EAAE,C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AAU,CAAC,UAAU,CAAC,CAAC;QAC/C,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,oBAAoB,GAAG,WAAW,CACtC,GAAG,CAAC,EAAE,CAAC,uBAAuB,CAAC,OAAO,EAAE,GAAG,CAAC,EAC5C,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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
- const interval = setInterval(checkInternetConnection, 2000);
80
- return () => clearInterval(interval.current);
81
- }, [checkInternetConnection]);
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',
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/header/hooks.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAChE,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM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ACR,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"}
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * Axelor Business Solutions
3
3
  *
4
- * Copyright (C) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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) 2023 Axelor (<http://axelor.com>).
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, updateAccessibleMenus, } from './module.helper';
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, restrictedMenus, user]);
62
+ }, [enabledModule]);
64
63
  const modulesScreens = useMemo(() => modules.reduce((screens, module) => ({ ...screens, ...module.screens }), {
65
64
  ...BaseScreen,
66
65
  }), [modules]);