@axelor/aos-mobile-core 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/README.md +310 -0
  2. package/lib/api/attached-files-api.d.ts +8 -0
  3. package/lib/api/attached-files-api.js +51 -0
  4. package/lib/api/attached-files-api.js.map +1 -0
  5. package/lib/api/login-api.d.ts +5 -0
  6. package/lib/api/login-api.js +41 -0
  7. package/lib/api/login-api.js.map +1 -0
  8. package/lib/api/mail-message-api.d.ts +43 -0
  9. package/lib/api/mail-message-api.js +114 -0
  10. package/lib/api/mail-message-api.js.map +1 -0
  11. package/lib/api/menu-config-api.d.ts +5 -0
  12. package/lib/api/menu-config-api.js +68 -0
  13. package/lib/api/menu-config-api.js.map +1 -0
  14. package/lib/api/metafile-api.d.ts +6 -0
  15. package/lib/api/metafile-api.js +50 -0
  16. package/lib/api/metafile-api.js.map +1 -0
  17. package/lib/api/mobile-config-api.d.ts +1 -0
  18. package/lib/api/mobile-config-api.js +31 -0
  19. package/lib/api/mobile-config-api.js.map +1 -0
  20. package/lib/api/net-info-utils.d.ts +5 -0
  21. package/lib/api/net-info-utils.js +29 -0
  22. package/lib/api/net-info-utils.js.map +1 -0
  23. package/lib/api/traceback-api.d.ts +7 -0
  24. package/lib/api/traceback-api.js +35 -0
  25. package/lib/api/traceback-api.js.map +1 -0
  26. package/lib/api/utils.d.ts +25 -0
  27. package/lib/api/utils.js +92 -0
  28. package/lib/api/utils.js.map +1 -0
  29. package/lib/app/Application.d.ts +15 -0
  30. package/lib/app/Application.js +29 -0
  31. package/lib/app/Application.js.map +1 -0
  32. package/lib/app/ContextedApplication.d.ts +9 -0
  33. package/lib/app/ContextedApplication.js +80 -0
  34. package/lib/app/ContextedApplication.js.map +1 -0
  35. package/lib/app/ContextsProvider.d.ts +14 -0
  36. package/lib/app/ContextsProvider.js +63 -0
  37. package/lib/app/ContextsProvider.js.map +1 -0
  38. package/lib/app/Module.d.ts +26 -0
  39. package/lib/app/Module.js +19 -0
  40. package/lib/app/Module.js.map +1 -0
  41. package/lib/app/RootNavigator.d.ts +7 -0
  42. package/lib/app/RootNavigator.js +69 -0
  43. package/lib/app/RootNavigator.js.map +1 -0
  44. package/lib/app/index.d.ts +5 -0
  45. package/lib/app/index.js +22 -0
  46. package/lib/app/index.js.map +1 -0
  47. package/lib/assets/Logo_Axelor.png +0 -0
  48. package/lib/auth/api/company-api.d.ts +1 -0
  49. package/lib/auth/api/company-api.js +31 -0
  50. package/lib/auth/api/company-api.js.map +1 -0
  51. package/lib/auth/api/config-api.d.ts +2 -0
  52. package/lib/auth/api/config-api.js +45 -0
  53. package/lib/auth/api/config-api.js.map +1 -0
  54. package/lib/auth/api/index.d.ts +4 -0
  55. package/lib/auth/api/index.js +22 -0
  56. package/lib/auth/api/index.js.map +1 -0
  57. package/lib/auth/api/language-api.d.ts +1 -0
  58. package/lib/auth/api/language-api.js +24 -0
  59. package/lib/auth/api/language-api.js.map +1 -0
  60. package/lib/auth/api/user-api.d.ts +2 -0
  61. package/lib/auth/api/user-api.js +30 -0
  62. package/lib/auth/api/user-api.js.map +1 -0
  63. package/lib/auth/features/asyncFunctionsIndex.d.ts +4 -0
  64. package/lib/auth/features/asyncFunctionsIndex.js +22 -0
  65. package/lib/auth/features/asyncFunctionsIndex.js.map +1 -0
  66. package/lib/auth/features/companySlice.d.ts +14 -0
  67. package/lib/auth/features/companySlice.js +48 -0
  68. package/lib/auth/features/companySlice.js.map +1 -0
  69. package/lib/auth/features/configSlice.d.ts +37 -0
  70. package/lib/auth/features/configSlice.js +82 -0
  71. package/lib/auth/features/configSlice.js.map +1 -0
  72. package/lib/auth/features/index.d.ts +4 -0
  73. package/lib/auth/features/index.js +22 -0
  74. package/lib/auth/features/index.js.map +1 -0
  75. package/lib/auth/features/languageSlice.d.ts +14 -0
  76. package/lib/auth/features/languageSlice.js +48 -0
  77. package/lib/auth/features/languageSlice.js.map +1 -0
  78. package/lib/auth/features/userSlice.d.ts +27 -0
  79. package/lib/auth/features/userSlice.js +83 -0
  80. package/lib/auth/features/userSlice.js.map +1 -0
  81. package/lib/auth/i18n/en.json +23 -0
  82. package/lib/auth/i18n/fr.json +23 -0
  83. package/lib/auth/index.d.ts +5 -0
  84. package/lib/auth/index.js +55 -0
  85. package/lib/auth/index.js.map +1 -0
  86. package/lib/auth/screens/SettingsScreen.d.ts +4 -0
  87. package/lib/auth/screens/SettingsScreen.js +79 -0
  88. package/lib/auth/screens/SettingsScreen.js.map +1 -0
  89. package/lib/auth/screens/UserScreen.d.ts +5 -0
  90. package/lib/auth/screens/UserScreen.js +116 -0
  91. package/lib/auth/screens/UserScreen.js.map +1 -0
  92. package/lib/auth/screens/index.d.ts +2 -0
  93. package/lib/auth/screens/index.js +20 -0
  94. package/lib/auth/screens/index.js.map +1 -0
  95. package/lib/axios/AxiosApi.d.ts +12 -0
  96. package/lib/axios/AxiosApi.js +32 -0
  97. package/lib/axios/AxiosApi.js.map +1 -0
  98. package/lib/components/external/Camera/Camera.d.ts +2 -0
  99. package/lib/components/external/Camera/Camera.js +148 -0
  100. package/lib/components/external/Camera/Camera.js.map +1 -0
  101. package/lib/components/external/Camera/CaptureButton.d.ts +10 -0
  102. package/lib/components/external/Camera/CaptureButton.js +118 -0
  103. package/lib/components/external/Camera/CaptureButton.js.map +1 -0
  104. package/lib/components/external/CameraScanner/CameraScanner.d.ts +10 -0
  105. package/lib/components/external/CameraScanner/CameraScanner.js +87 -0
  106. package/lib/components/external/CameraScanner/CameraScanner.js.map +1 -0
  107. package/lib/components/external/PlanningView/PlanningView.d.ts +11 -0
  108. package/lib/components/external/PlanningView/PlanningView.js +123 -0
  109. package/lib/components/external/PlanningView/PlanningView.js.map +1 -0
  110. package/lib/components/external/PlanningView/agenda.helpers.d.ts +10 -0
  111. package/lib/components/external/PlanningView/agenda.helpers.js +90 -0
  112. package/lib/components/external/PlanningView/agenda.helpers.js.map +1 -0
  113. package/lib/components/external/Scanner/Scanner.d.ts +2 -0
  114. package/lib/components/external/Scanner/Scanner.js +67 -0
  115. package/lib/components/external/Scanner/Scanner.js.map +1 -0
  116. package/lib/components/external/Stopwatch/Stopwatch.d.ts +18 -0
  117. package/lib/components/external/Stopwatch/Stopwatch.js +114 -0
  118. package/lib/components/external/Stopwatch/Stopwatch.js.map +1 -0
  119. package/lib/components/external/Timer/Timer.d.ts +9 -0
  120. package/lib/components/external/Timer/Timer.js +60 -0
  121. package/lib/components/external/Timer/Timer.js.map +1 -0
  122. package/lib/components/external/index.d.ts +6 -0
  123. package/lib/components/external/index.js +24 -0
  124. package/lib/components/external/index.js.map +1 -0
  125. package/lib/components/index.d.ts +4 -0
  126. package/lib/components/index.js +22 -0
  127. package/lib/components/index.js.map +1 -0
  128. package/lib/components/molecules/ErrorText/ErrorText.d.ts +4 -0
  129. package/lib/components/molecules/ErrorText/ErrorText.js +31 -0
  130. package/lib/components/molecules/ErrorText/ErrorText.js.map +1 -0
  131. package/lib/components/molecules/HeaderOptionsMenuItem/HeaderOptionMenuItem.d.ts +9 -0
  132. package/lib/components/molecules/HeaderOptionsMenuItem/HeaderOptionMenuItem.js +56 -0
  133. package/lib/components/molecules/HeaderOptionsMenuItem/HeaderOptionMenuItem.js.map +1 -0
  134. package/lib/components/molecules/IconSettings/IconSettings.d.ts +4 -0
  135. package/lib/components/molecules/IconSettings/IconSettings.js +31 -0
  136. package/lib/components/molecules/IconSettings/IconSettings.js.map +1 -0
  137. package/lib/components/molecules/InputBarCodeCard/InputBarCodeCard.d.ts +7 -0
  138. package/lib/components/molecules/InputBarCodeCard/InputBarCodeCard.js +84 -0
  139. package/lib/components/molecules/InputBarCodeCard/InputBarCodeCard.js.map +1 -0
  140. package/lib/components/molecules/LoginButton/LoginButton.d.ts +4 -0
  141. package/lib/components/molecules/LoginButton/LoginButton.js +40 -0
  142. package/lib/components/molecules/LoginButton/LoginButton.js.map +1 -0
  143. package/lib/components/molecules/MailMessageReadIcon/MailMessageReadIcon.d.ts +7 -0
  144. package/lib/components/molecules/MailMessageReadIcon/MailMessageReadIcon.js +55 -0
  145. package/lib/components/molecules/MailMessageReadIcon/MailMessageReadIcon.js.map +1 -0
  146. package/lib/components/molecules/TrackItem/TrackItem.d.ts +9 -0
  147. package/lib/components/molecules/TrackItem/TrackItem.js +65 -0
  148. package/lib/components/molecules/TrackItem/TrackItem.js.map +1 -0
  149. package/lib/components/molecules/index.d.ts +7 -0
  150. package/lib/components/molecules/index.js +25 -0
  151. package/lib/components/molecules/index.js.map +1 -0
  152. package/lib/components/organisms/AOSImage/AOSImage.d.ts +15 -0
  153. package/lib/components/organisms/AOSImage/AOSImage.js +37 -0
  154. package/lib/components/organisms/AOSImage/AOSImage.js.map +1 -0
  155. package/lib/components/organisms/AOSImageBubble/AOSImageBubble.d.ts +9 -0
  156. package/lib/components/organisms/AOSImageBubble/AOSImageBubble.js +30 -0
  157. package/lib/components/organisms/AOSImageBubble/AOSImageBubble.js.map +1 -0
  158. package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.d.ts +9 -0
  159. package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js +68 -0
  160. package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js.map +1 -0
  161. package/lib/components/organisms/LogoImage/LogoImage.d.ts +4 -0
  162. package/lib/components/organisms/LogoImage/LogoImage.js +52 -0
  163. package/lib/components/organisms/LogoImage/LogoImage.js.map +1 -0
  164. package/lib/components/organisms/MailMessageCard/MailMessageCard.d.ts +17 -0
  165. package/lib/components/organisms/MailMessageCard/MailMessageCard.js +79 -0
  166. package/lib/components/organisms/MailMessageCard/MailMessageCard.js.map +1 -0
  167. package/lib/components/organisms/MailMessageCommentCard/MailMessageCommentCard.d.ts +12 -0
  168. package/lib/components/organisms/MailMessageCommentCard/MailMessageCommentCard.js +139 -0
  169. package/lib/components/organisms/MailMessageCommentCard/MailMessageCommentCard.js.map +1 -0
  170. package/lib/components/organisms/MailMessageNotificationCard/MailMessageNotificationCard.d.ts +15 -0
  171. package/lib/components/organisms/MailMessageNotificationCard/MailMessageNotificationCard.js +79 -0
  172. package/lib/components/organisms/MailMessageNotificationCard/MailMessageNotificationCard.js.map +1 -0
  173. package/lib/components/organisms/PasswordInput/PasswordInput.d.ts +7 -0
  174. package/lib/components/organisms/PasswordInput/PasswordInput.js +36 -0
  175. package/lib/components/organisms/PasswordInput/PasswordInput.js.map +1 -0
  176. package/lib/components/organisms/ScannerAutocompleteSearch/ScannerAutocompleteSearch.d.ts +17 -0
  177. package/lib/components/organisms/ScannerAutocompleteSearch/ScannerAutocompleteSearch.js +68 -0
  178. package/lib/components/organisms/ScannerAutocompleteSearch/ScannerAutocompleteSearch.js.map +1 -0
  179. package/lib/components/organisms/UrlInput/UrlInput.d.ts +10 -0
  180. package/lib/components/organisms/UrlInput/UrlInput.js +38 -0
  181. package/lib/components/organisms/UrlInput/UrlInput.js.map +1 -0
  182. package/lib/components/organisms/UsernameInput/UsernameInput.d.ts +6 -0
  183. package/lib/components/organisms/UsernameInput/UsernameInput.js +33 -0
  184. package/lib/components/organisms/UsernameInput/UsernameInput.js.map +1 -0
  185. package/lib/components/organisms/index.d.ts +11 -0
  186. package/lib/components/organisms/index.js +29 -0
  187. package/lib/components/organisms/index.js.map +1 -0
  188. package/lib/components/templates/AttachedFilesView/AttachedFilesView.d.ts +10 -0
  189. package/lib/components/templates/AttachedFilesView/AttachedFilesView.js +87 -0
  190. package/lib/components/templates/AttachedFilesView/AttachedFilesView.js.map +1 -0
  191. package/lib/components/templates/MailMessageView/MailMessageView.d.ts +6 -0
  192. package/lib/components/templates/MailMessageView/MailMessageView.js +140 -0
  193. package/lib/components/templates/MailMessageView/MailMessageView.js.map +1 -0
  194. package/lib/components/templates/index.d.ts +2 -0
  195. package/lib/components/templates/index.js +20 -0
  196. package/lib/components/templates/index.js.map +1 -0
  197. package/lib/features/attachedFilesSlice.d.ts +35 -0
  198. package/lib/features/attachedFilesSlice.js +82 -0
  199. package/lib/features/attachedFilesSlice.js.map +1 -0
  200. package/lib/features/authSlice.d.ts +44 -0
  201. package/lib/features/authSlice.js +67 -0
  202. package/lib/features/authSlice.js.map +1 -0
  203. package/lib/features/cameraSlice.d.ts +14 -0
  204. package/lib/features/cameraSlice.js +52 -0
  205. package/lib/features/cameraSlice.js.map +1 -0
  206. package/lib/features/index.d.ts +8 -0
  207. package/lib/features/index.js +26 -0
  208. package/lib/features/index.js.map +1 -0
  209. package/lib/features/mailMessageSlice.d.ts +97 -0
  210. package/lib/features/mailMessageSlice.js +219 -0
  211. package/lib/features/mailMessageSlice.js.map +1 -0
  212. package/lib/features/menuConfigSlice.d.ts +14 -0
  213. package/lib/features/menuConfigSlice.js +48 -0
  214. package/lib/features/menuConfigSlice.js.map +1 -0
  215. package/lib/features/metafileSlice.d.ts +14 -0
  216. package/lib/features/metafileSlice.js +48 -0
  217. package/lib/features/metafileSlice.js.map +1 -0
  218. package/lib/features/mobileConfigSlice.d.ts +14 -0
  219. package/lib/features/mobileConfigSlice.js +52 -0
  220. package/lib/features/mobileConfigSlice.js.map +1 -0
  221. package/lib/features/scannerSlice.d.ts +14 -0
  222. package/lib/features/scannerSlice.js +52 -0
  223. package/lib/features/scannerSlice.js.map +1 -0
  224. package/lib/hooks/use-effect-debugger.d.ts +1 -0
  225. package/lib/hooks/use-effect-debugger.js +47 -0
  226. package/lib/hooks/use-effect-debugger.js.map +1 -0
  227. package/lib/i18n/api/translation.d.ts +2 -0
  228. package/lib/i18n/api/translation.js +38 -0
  229. package/lib/i18n/api/translation.js.map +1 -0
  230. package/lib/i18n/component/Translator.d.ts +6 -0
  231. package/lib/i18n/component/Translator.js +74 -0
  232. package/lib/i18n/component/Translator.js.map +1 -0
  233. package/lib/i18n/helpers/langages.d.ts +3 -0
  234. package/lib/i18n/helpers/langages.js +34 -0
  235. package/lib/i18n/helpers/langages.js.map +1 -0
  236. package/lib/i18n/helpers/translations.d.ts +1 -0
  237. package/lib/i18n/helpers/translations.js +24 -0
  238. package/lib/i18n/helpers/translations.js.map +1 -0
  239. package/lib/i18n/hooks/use-translator.d.ts +5 -0
  240. package/lib/i18n/hooks/use-translator.js +24 -0
  241. package/lib/i18n/hooks/use-translator.js.map +1 -0
  242. package/lib/i18n/i18n.d.ts +20 -0
  243. package/lib/i18n/i18n.js +53 -0
  244. package/lib/i18n/i18n.js.map +1 -0
  245. package/lib/i18n/index.d.ts +4 -0
  246. package/lib/i18n/index.js +22 -0
  247. package/lib/i18n/index.js.map +1 -0
  248. package/lib/i18n/translations/en.json +52 -0
  249. package/lib/i18n/translations/fr.json +52 -0
  250. package/lib/index.d.ts +18 -0
  251. package/lib/index.js +36 -0
  252. package/lib/index.js.map +1 -0
  253. package/lib/navigator/Navigator.d.ts +12 -0
  254. package/lib/navigator/Navigator.js +118 -0
  255. package/lib/navigator/Navigator.js.map +1 -0
  256. package/lib/navigator/drawer/AuthMenuIconButton.d.ts +6 -0
  257. package/lib/navigator/drawer/AuthMenuIconButton.js +29 -0
  258. package/lib/navigator/drawer/AuthMenuIconButton.js.map +1 -0
  259. package/lib/navigator/drawer/BackIcon.d.ts +4 -0
  260. package/lib/navigator/drawer/BackIcon.js +32 -0
  261. package/lib/navigator/drawer/BackIcon.js.map +1 -0
  262. package/lib/navigator/drawer/DrawerContent.d.ts +8 -0
  263. package/lib/navigator/drawer/DrawerContent.js +177 -0
  264. package/lib/navigator/drawer/DrawerContent.js.map +1 -0
  265. package/lib/navigator/drawer/DrawerToggleButton.d.ts +4 -0
  266. package/lib/navigator/drawer/DrawerToggleButton.js +32 -0
  267. package/lib/navigator/drawer/DrawerToggleButton.js.map +1 -0
  268. package/lib/navigator/drawer/Menu.d.ts +8 -0
  269. package/lib/navigator/drawer/Menu.js +91 -0
  270. package/lib/navigator/drawer/Menu.js.map +1 -0
  271. package/lib/navigator/drawer/MenuIconButton.d.ts +10 -0
  272. package/lib/navigator/drawer/MenuIconButton.js +64 -0
  273. package/lib/navigator/drawer/MenuIconButton.js.map +1 -0
  274. package/lib/navigator/drawer/MenuItem.d.ts +8 -0
  275. package/lib/navigator/drawer/MenuItem.js +71 -0
  276. package/lib/navigator/drawer/MenuItem.js.map +1 -0
  277. package/lib/navigator/menu.helper.d.ts +8 -0
  278. package/lib/navigator/menu.helper.js +50 -0
  279. package/lib/navigator/menu.helper.js.map +1 -0
  280. package/lib/navigator/module.helper.d.ts +7 -0
  281. package/lib/navigator/module.helper.js +95 -0
  282. package/lib/navigator/module.helper.js.map +1 -0
  283. package/lib/navigator/roles.helper.d.ts +4 -0
  284. package/lib/navigator/roles.helper.js +33 -0
  285. package/lib/navigator/roles.helper.js.map +1 -0
  286. package/lib/redux/hooks.d.ts +5 -0
  287. package/lib/redux/hooks.js +25 -0
  288. package/lib/redux/hooks.js.map +1 -0
  289. package/lib/redux/store.d.ts +1 -0
  290. package/lib/redux/store.js +28 -0
  291. package/lib/redux/store.js.map +1 -0
  292. package/lib/screens/AttachedFilesScreen.d.ts +5 -0
  293. package/lib/screens/AttachedFilesScreen.js +26 -0
  294. package/lib/screens/AttachedFilesScreen.js.map +1 -0
  295. package/lib/screens/ErrorScreen.d.ts +5 -0
  296. package/lib/screens/ErrorScreen.js +46 -0
  297. package/lib/screens/ErrorScreen.js.map +1 -0
  298. package/lib/screens/LoginScreen.d.ts +4 -0
  299. package/lib/screens/LoginScreen.js +115 -0
  300. package/lib/screens/LoginScreen.js.map +1 -0
  301. package/lib/screens/MailMessageScreen.d.ts +5 -0
  302. package/lib/screens/MailMessageScreen.js +25 -0
  303. package/lib/screens/MailMessageScreen.js.map +1 -0
  304. package/lib/storage/Storage.d.ts +17 -0
  305. package/lib/storage/Storage.js +53 -0
  306. package/lib/storage/Storage.js.map +1 -0
  307. package/lib/tools/ClipboardProvider.d.ts +7 -0
  308. package/lib/tools/ClipboardProvider.js +59 -0
  309. package/lib/tools/ClipboardProvider.js.map +1 -0
  310. package/lib/tools/FileViewer.d.ts +13 -0
  311. package/lib/tools/FileViewer.js +48 -0
  312. package/lib/tools/FileViewer.js.map +1 -0
  313. package/lib/tools/LinkingProvider.d.ts +17 -0
  314. package/lib/tools/LinkingProvider.js +94 -0
  315. package/lib/tools/LinkingProvider.js.map +1 -0
  316. package/lib/tools/index.d.ts +3 -0
  317. package/lib/tools/index.js +21 -0
  318. package/lib/tools/index.js.map +1 -0
  319. package/lib/tools/linking.helper.d.ts +25 -0
  320. package/lib/tools/linking.helper.js +70 -0
  321. package/lib/tools/linking.helper.js.map +1 -0
  322. package/lib/types/index.d.ts +2 -0
  323. package/lib/types/index.js +20 -0
  324. package/lib/types/index.js.map +1 -0
  325. package/lib/types/mail-message-notification-type.d.ts +12 -0
  326. package/lib/types/mail-message-notification-type.js +48 -0
  327. package/lib/types/mail-message-notification-type.js.map +1 -0
  328. package/lib/types/stopwatch-type.d.ts +14 -0
  329. package/lib/types/stopwatch-type.js +64 -0
  330. package/lib/types/stopwatch-type.js.map +1 -0
  331. package/lib/utils/agenda.d.ts +1 -0
  332. package/lib/utils/agenda.js +28 -0
  333. package/lib/utils/agenda.js.map +1 -0
  334. package/lib/utils/date.d.ts +4 -0
  335. package/lib/utils/date.js +41 -0
  336. package/lib/utils/date.js.map +1 -0
  337. package/lib/utils/displayers.d.ts +1 -0
  338. package/lib/utils/displayers.js +19 -0
  339. package/lib/utils/displayers.js.map +1 -0
  340. package/lib/utils/formatters.d.ts +5 -0
  341. package/lib/utils/formatters.js +74 -0
  342. package/lib/utils/formatters.js.map +1 -0
  343. package/lib/utils/index.d.ts +9 -0
  344. package/lib/utils/index.js +27 -0
  345. package/lib/utils/index.js.map +1 -0
  346. package/lib/utils/list.d.ts +3 -0
  347. package/lib/utils/list.js +101 -0
  348. package/lib/utils/list.js.map +1 -0
  349. package/lib/utils/object.d.ts +2 -0
  350. package/lib/utils/object.js +36 -0
  351. package/lib/utils/object.js.map +1 -0
  352. package/lib/utils/show-toast-message.d.ts +2 -0
  353. package/lib/utils/show-toast-message.js +22 -0
  354. package/lib/utils/show-toast-message.js.map +1 -0
  355. package/lib/utils/string.d.ts +4 -0
  356. package/lib/utils/string.js +54 -0
  357. package/lib/utils/string.js.map +1 -0
  358. package/lib/utils/time.d.ts +4 -0
  359. package/lib/utils/time.js +78 -0
  360. package/lib/utils/time.js.map +1 -0
  361. package/package.json +95 -0
@@ -0,0 +1,27 @@
1
+ export const fetchActiveUser: import("@reduxjs/toolkit").AsyncThunk<any, void, {
2
+ state?: unknown;
3
+ dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
4
+ extra?: unknown;
5
+ rejectValue?: unknown;
6
+ serializedErrorType?: unknown;
7
+ pendingMeta?: unknown;
8
+ fulfilledMeta?: unknown;
9
+ rejectedMeta?: unknown;
10
+ }>;
11
+ export const updateActiveUser: import("@reduxjs/toolkit").AsyncThunk<any, void, {
12
+ state?: unknown;
13
+ dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
14
+ extra?: unknown;
15
+ rejectValue?: unknown;
16
+ serializedErrorType?: unknown;
17
+ pendingMeta?: unknown;
18
+ fulfilledMeta?: unknown;
19
+ rejectedMeta?: unknown;
20
+ }>;
21
+ export const changeActiveCompany: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "user/changeActiveCompany">;
22
+ export const changeDefaultStockLocation: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "user/changeDefaultStockLocation">;
23
+ export const userReducer: import("redux").Reducer<import("immer/dist/internal").WritableDraft<{
24
+ loadingUser: boolean;
25
+ user: {};
26
+ canModifyCompany: boolean;
27
+ }>, import("redux").AnyAction>;
@@ -0,0 +1,83 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
19
+ import { handlerApiCall } from '../../api/utils';
20
+ import { getLoggedUser, postUser } from '../api/user-api';
21
+ export const fetchActiveUser = createAsyncThunk('user/fetchActiveUser', async function (userId, { getState }) {
22
+ return handlerApiCall({
23
+ fetchFunction: getLoggedUser,
24
+ data: userId,
25
+ action: 'fetch active user',
26
+ getState,
27
+ responseOptions: { isArrayResponse: false },
28
+ });
29
+ });
30
+ export const updateActiveUser = createAsyncThunk('user/updateActiveUser', async function (user, { getState }) {
31
+ return handlerApiCall({
32
+ fetchFunction: postUser,
33
+ data: user,
34
+ action: 'update active user',
35
+ getState,
36
+ responseOptions: { isArrayResponse: false },
37
+ });
38
+ });
39
+ const initialState = {
40
+ loadingUser: true,
41
+ user: {},
42
+ canModifyCompany: false,
43
+ };
44
+ const userSlice = createSlice({
45
+ name: 'user',
46
+ initialState,
47
+ reducers: {
48
+ changeActiveCompany: (state, action) => {
49
+ state.user = { ...state.user, activeCompany: action.payload.newCompany };
50
+ },
51
+ changeDefaultStockLocation: (state, action) => {
52
+ state.user = {
53
+ ...state.user,
54
+ workshopStockLocation: action.payload.newStockLocation,
55
+ };
56
+ },
57
+ },
58
+ extraReducers: builder => {
59
+ builder.addCase(fetchActiveUser.pending, state => {
60
+ state.loadingUser = true;
61
+ });
62
+ builder.addCase(fetchActiveUser.fulfilled, (state, action) => {
63
+ state.loadingUser = false;
64
+ state.user = action.payload;
65
+ if (state.user.activeCompany == null) {
66
+ state.canModifyCompany = true;
67
+ }
68
+ });
69
+ builder.addCase(updateActiveUser.pending, state => {
70
+ state.loadingUser = true;
71
+ });
72
+ builder.addCase(updateActiveUser.fulfilled, (state, action) => {
73
+ state.loadingUser = false;
74
+ state.user = action.payload;
75
+ if (state.user.activeCompany == null) {
76
+ state.canModifyCompany = true;
77
+ }
78
+ });
79
+ },
80
+ });
81
+ export const { changeActiveCompany, changeDefaultStockLocation } = userSlice.actions;
82
+ export const userReducer = userSlice.reducer;
83
+ //# sourceMappingURL=userSlice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userSlice.js","sourceRoot":"","sources":["../../../src/auth/features/userSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAExD,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAC7C,sBAAsB,EACtB,KAAK,WAAW,MAAM,EAAE,EAAC,QAAQ,EAAC;IAChC,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,aAAa;QAC5B,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,mBAAmB;QAC3B,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,KAAK,EAAC;KAC1C,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAC9C,uBAAuB,EACvB,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAC;IAC9B,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,QAAQ;QACvB,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,oBAAoB;QAC5B,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,KAAK,EAAC;KAC1C,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,WAAW,EAAE,IAAI;IACjB,IAAI,EAAE,EAAE;IACR,gBAAgB,EAAE,KAAK;CACxB,CAAC;AAEF,MAAM,SAAS,GAAG,WAAW,CAAC;IAC5B,IAAI,EAAE,MAAM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CAAC,OAAO,CAAC;YAC5B,IAAI,KAAK,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE;gBACpC,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;aAC/B;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,EAAC,mBAAmB,EAAE,0BAA0B,EAAC,GAC5D,SAAS,CAAC,OAAO,CAAC;AAEpB,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC"}
@@ -0,0 +1,23 @@
1
+ {
2
+ "Auth_LOGIN": "Login",
3
+ "Auth_LOGOUT": "Logout",
4
+ "Auth_Password": "Password",
5
+ "Auth_URL": "URL",
6
+ "Auth_Username": "Username",
7
+ "Auth_Error": "Error",
8
+ "Auth_Warning": "Warning",
9
+ "Auth_CannotOpenFile": "Cannot open file",
10
+ "Auth_Close": "Close",
11
+ "User_User": "User",
12
+ "User_VirtualKeyboardConfig": "Hide virtual keyboard",
13
+ "User_ShowFilter": "Show filter",
14
+ "User_ColorForColorBlind": "Color blind mode",
15
+ "User_SendTranslations": "Send translations",
16
+ "User_UserProfile": "User Profile",
17
+ "User_Settings": "Settings",
18
+ "User_Company": "Company",
19
+ "User_ActiveCompany": "Active company",
20
+ "User_DefaultStockLocation": "Default stock location",
21
+ "User_Language": "Language",
22
+ "User_Theme": "Theme"
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "Auth_LOGIN": "Se connecter",
3
+ "Auth_LOGOUT": "Se déconnecter",
4
+ "Auth_Password": "Mot de passe",
5
+ "Auth_URL": "URL",
6
+ "Auth_Username": "Nom utilisateur",
7
+ "Auth_Error": "Erreur",
8
+ "Auth_Warning": "Attention",
9
+ "Auth_CannotOpenFile": "Impossible d'ouvrir le fichier",
10
+ "Auth_Close": "Fermer",
11
+ "User_User": "Utilisateur",
12
+ "User_VirtualKeyboardConfig": "Cacher le clavier virtuel",
13
+ "User_ShowFilter": "Afficher les filtres",
14
+ "User_ColorForColorBlind": "Mode daltonien",
15
+ "User_SendTranslations": "Envoyer les traductions",
16
+ "User_UserProfile": "Profil utilisateur",
17
+ "User_Settings": "Paramètres",
18
+ "User_Company": "Société",
19
+ "User_ActiveCompany": "Société active",
20
+ "User_DefaultStockLocation": "Emplacement de stock par défaut",
21
+ "User_Language": "Langage",
22
+ "User_Theme": "Thème"
23
+ }
@@ -0,0 +1,5 @@
1
+ import { Module } from '../app/Module';
2
+ export declare const authModule: Module;
3
+ export * from './screens';
4
+ export * from './api';
5
+ export * from './features/asyncFunctionsIndex';
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import enTranslations from './i18n/en.json';
19
+ import frTranslations from './i18n/fr.json';
20
+ import * as authReducers from './features';
21
+ import { SettingsScreen, UserScreen } from './screens';
22
+ export const authModule = {
23
+ name: 'Auth',
24
+ title: 'User_User',
25
+ subtitle: 'User_User',
26
+ icon: 'user',
27
+ menus: {
28
+ auth_menu_user: {
29
+ title: 'User_UserProfile',
30
+ icon: 'user',
31
+ screen: 'UserScreen',
32
+ },
33
+ },
34
+ screens: {
35
+ UserScreen: {
36
+ title: 'User_UserProfile',
37
+ component: UserScreen,
38
+ },
39
+ SettingsScreen: {
40
+ title: 'User_Settings',
41
+ component: SettingsScreen,
42
+ },
43
+ },
44
+ translations: {
45
+ en: enTranslations,
46
+ fr: frTranslations,
47
+ },
48
+ reducers: {
49
+ ...authReducers,
50
+ },
51
+ };
52
+ export * from './screens';
53
+ export * from './api';
54
+ export * from './features/asyncFunctionsIndex';
55
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,cAAc,MAAM,gBAAgB,CAAC;AAC5C,OAAO,cAAc,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,YAAY,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAC,cAAc,EAAE,UAAU,EAAC,MAAM,WAAW,CAAC;AAErD,MAAM,CAAC,MAAM,UAAU,GAAW;IAChC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,WAAW;IAClB,QAAQ,EAAE,WAAW;IACrB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE;QACL,cAAc,EAAE;YACd,KAAK,EAAE,kBAAkB;YACzB,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,YAAY;SACrB;KACF;IACD,OAAO,EAAE;QACP,UAAU,EAAE;YACV,KAAK,EAAE,kBAAkB;YACzB,SAAS,EAAE,UAAU;SACtB;QACD,cAAc,EAAE;YACd,KAAK,EAAE,eAAe;YACtB,SAAS,EAAE,cAAc;SAC1B;KACF;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,cAAc;QAClB,EAAE,EAAE,cAAc;KACnB;IACD,QAAQ,EAAE;QACR,GAAG,YAAY;KAChB;CACF,CAAC;AAEF,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,gCAAgC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export default SettingsScreen;
2
+ declare function SettingsScreen({ route }: {
3
+ route: any;
4
+ }): JSX.Element;
@@ -0,0 +1,79 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useCallback, useEffect } from 'react';
19
+ import { StyleSheet, View, Dimensions } from 'react-native';
20
+ import { Screen, SwitchCard, useConfig, useTheme, RightIconButton, Icon, useThemeColor, } from '@axelor/aos-mobile-ui';
21
+ import { getTranslations, selectLanguage, showToastMessage, useDispatch, useSelector, useTranslator, } from '@axelor/aos-mobile-core';
22
+ import { clearMessage, uploadTranslations } from '../features/configSlice';
23
+ const SettingsScreen = ({ route }) => {
24
+ const { message } = useSelector(state => state.config);
25
+ const { showFilter, hideVirtualKeyboard, setActivityIndicator, toggleFilterConfig, toggleVirtualKeyboardConfig, } = useConfig();
26
+ const language = useSelector(selectLanguage);
27
+ const Colors = useThemeColor();
28
+ const I18n = useTranslator();
29
+ const Theme = useTheme();
30
+ const dispatch = useDispatch();
31
+ useEffect(() => {
32
+ if (message) {
33
+ showToastMessage({ type: 'success', position: 'bottom', text1: message });
34
+ setActivityIndicator(false);
35
+ dispatch(clearMessage());
36
+ }
37
+ }, [message, dispatch, setActivityIndicator]);
38
+ const handleToggleColorBlind = useCallback(state => {
39
+ if (state) {
40
+ Theme.activateColorBlind();
41
+ }
42
+ else {
43
+ Theme.desactivateColorBlind();
44
+ }
45
+ }, [Theme]);
46
+ const handleSendTranslations = useCallback(() => {
47
+ setActivityIndicator(true);
48
+ const translations = getTranslations(language);
49
+ dispatch(uploadTranslations({ language, translations }));
50
+ }, [dispatch, language, setActivityIndicator]);
51
+ return (<Screen style={styles.screen}>
52
+ <View style={styles.container}>
53
+ <SwitchCard title={I18n.t('User_ShowFilter')} defaultValue={showFilter} onToggle={toggleFilterConfig}/>
54
+ <SwitchCard title={I18n.t('User_VirtualKeyboardConfig')} defaultValue={hideVirtualKeyboard} onToggle={toggleVirtualKeyboardConfig}/>
55
+ <SwitchCard title={I18n.t('User_ColorForColorBlind')} defaultValue={Theme.isColorBlind} onToggle={state => handleToggleColorBlind(state)}/>
56
+ {route.params.user == null ||
57
+ route.params.user.group.code !== 'admins' ? null : (<RightIconButton icon={<Icon name="chevron-right" color={Colors.primaryColor.background}/>} style={styles.RightIconButton} title={I18n.t('User_SendTranslations')} onPress={handleSendTranslations}/>)}
58
+ </View>
59
+ </Screen>);
60
+ };
61
+ const styles = StyleSheet.create({
62
+ screen: {
63
+ justifyContent: 'space-between',
64
+ },
65
+ container: {
66
+ marginTop: 15,
67
+ justifyContent: 'center',
68
+ alignItems: 'center',
69
+ },
70
+ RightIconButton: {
71
+ width: Dimensions.get('window').width * 0.9,
72
+ height: 40,
73
+ marginLeft: 18,
74
+ paddingRight: 50,
75
+ paddingLeft: 10,
76
+ },
77
+ });
78
+ export default SettingsScreen;
79
+ //# sourceMappingURL=SettingsScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsScreen.js","sourceRoot":"","sources":["../../../src/auth/screens/SettingsScreen.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AACpD,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EACL,MAAM,EACN,UAAU,EACV,SAAS,EACT,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,aAAa,GACd,MAAM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,CAAC,EACtC,CACH,CACD,KAAK,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAC9B,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CACvC,OAAO,CAAC,CAAC,sBAAsB,CAAC,EAChC,CACH,CACH;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,MAAM,EAAE;QACN,cAAc,EAAE,eAAe;KAChC;IACD,SAAS,EAAE;QACT,SAAS,EAAE,EAAE;QACb,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;IACD,eAAe,EAAE;QACf,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,GAAG;QAC3C,MAAM,EAAE,EAAE;QACV,UAAU,EAAE,EAAE;QACd,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,EAAE;KAChB;CACF,CAAC,CAAC;AAEH,eAAe,cAAc,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default UserScreen;
2
+ declare function UserScreen({ children, navigation }: {
3
+ children: any;
4
+ navigation: any;
5
+ }): JSX.Element;
@@ -0,0 +1,116 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useCallback, useEffect, useMemo } from 'react';
19
+ import DeviceInfo from 'react-native-device-info';
20
+ import { StyleSheet, Dimensions, View } from 'react-native';
21
+ import { Icon, ImageBubble, Picker, Screen, ScrollView, Text, useConfig, useTheme, useThemeColor, } from '@axelor/aos-mobile-ui';
22
+ import { logout, useDispatch, useSelector, useTranslator } from '../../index';
23
+ import { IconSettings } from '../../components';
24
+ import { fetchCompanies } from '../features/companySlice';
25
+ import { fetchLanguages } from '../features/languageSlice';
26
+ import { changeActiveCompany, updateActiveUser, fetchActiveUser, } from '../features/userSlice';
27
+ import { fetchBaseConfig, fetchMobileSettings } from '../features/configSlice';
28
+ const UserScreen = ({ children, navigation }) => {
29
+ const { companyList } = useSelector(state => state.company);
30
+ const { userId, baseUrl } = useSelector(state => state.auth);
31
+ const { languageList } = useSelector(state => state.language);
32
+ const { loading, baseConfig } = useSelector(state => state.config);
33
+ const { loadingUser, user, canModifyCompany } = useSelector(state => state.user);
34
+ const Theme = useTheme();
35
+ const Colors = useThemeColor();
36
+ const I18n = useTranslator();
37
+ const { setFilterConfig, setVirtualKeyboardConfig } = useConfig();
38
+ const dispatch = useDispatch();
39
+ useEffect(() => {
40
+ dispatch(fetchActiveUser(userId));
41
+ dispatch(fetchCompanies());
42
+ dispatch(fetchLanguages());
43
+ dispatch(fetchBaseConfig());
44
+ dispatch(fetchMobileSettings());
45
+ }, [dispatch, userId]);
46
+ React.useLayoutEffect(() => {
47
+ navigation.setOptions({
48
+ headerRight: () => (<IconSettings onPress={() => navigation.navigate('SettingsScreen', { user: user })}/>),
49
+ });
50
+ }, [navigation, user]);
51
+ useEffect(() => {
52
+ const SMALL_SCREEN_HEIGHT = 500;
53
+ DeviceInfo.getManufacturer().then(manufacturer => setVirtualKeyboardConfig(manufacturer === 'Zebra Technologies'));
54
+ setFilterConfig(Dimensions.get('window').height > SMALL_SCREEN_HEIGHT);
55
+ }, [setFilterConfig, setVirtualKeyboardConfig]);
56
+ const styles = useMemo(() => {
57
+ return getStyles(Colors);
58
+ }, [Colors]);
59
+ const updateActiveCompany = useCallback(company => {
60
+ dispatch(changeActiveCompany({
61
+ newCompany: {
62
+ $version: company?.$version,
63
+ code: company?.code,
64
+ id: company?.id,
65
+ name: company?.name,
66
+ },
67
+ }));
68
+ }, [dispatch]);
69
+ const handleChangeTheme = useCallback(newTheme => Theme.changeTheme(newTheme), [Theme]);
70
+ const updateLanguage = useCallback(language => {
71
+ dispatch(updateActiveUser({ id: user.id, language, version: user.version }));
72
+ }, [dispatch, user]);
73
+ return (<Screen style={styles.container} loading={loadingUser || loading}>
74
+ <ScrollView>
75
+ <View style={styles.imageContainer}>
76
+ <ImageBubble style={styles.imageIcon} imageSize={Dimensions.get('window').width * 0.3} defaultIconSize={60} source={{
77
+ uri: `${baseUrl}ws/rest/com.axelor.auth.db.User/${user.id}/image/download?v=${user.version}&parentId=${user.id}&parentModel=com.axelor.auth.db.User&image=true`,
78
+ }} listComponent={[
79
+ null,
80
+ <Icon style={styles.logOutIcon} name="power-off" color={Colors.primaryColor.background} size={Dimensions.get('window').width * 0.07} touchable={true} onPress={() => dispatch(logout())}/>,
81
+ ]}/>
82
+ <Text style={styles.textUser}>{user.name}</Text>
83
+ </View>
84
+ {baseConfig.enableMultiCompany && (<Picker title={I18n.t('User_ActiveCompany')} listItems={companyList} labelField="name" valueField="id" onValueChange={updateActiveCompany} isValueItem={true} disabled={!canModifyCompany} disabledValue={user?.activeCompany?.name}/>)}
85
+ {children}
86
+ {languageList.length > 1 && (<Picker title={I18n.t('User_Language')} defaultValue={user.language} listItems={languageList} labelField="name" valueField="code" onValueChange={updateLanguage} emptyValue={false}/>)}
87
+ {!Theme.isColorBlind && Theme.themes?.length !== 1 && (<Picker title={I18n.t('User_Theme')} defaultValue={Theme.activeTheme?.key} listItems={Theme.themes} labelField="name" valueField="key" onValueChange={handleChangeTheme} emptyValue={false}/>)}
88
+ </ScrollView>
89
+ </Screen>);
90
+ };
91
+ const getStyles = Colors => StyleSheet.create({
92
+ container: {
93
+ justifyContent: 'center',
94
+ },
95
+ imageContainer: {
96
+ alignItems: 'center',
97
+ },
98
+ imageIcon: {
99
+ backgroundColor: Colors.backgroundColor,
100
+ },
101
+ logOutIcon: {
102
+ backgroundColor: Colors.backgroundColor,
103
+ borderRadius: Dimensions.get('window').width * 0.1,
104
+ width: Dimensions.get('window').width * 0.1,
105
+ height: Dimensions.get('window').width * 0.1,
106
+ elevation: 5,
107
+ },
108
+ textUser: {
109
+ fontSize: 16,
110
+ fontWeight: 'bold',
111
+ marginBottom: 30,
112
+ marginTop: 0,
113
+ },
114
+ });
115
+ export default UserScreen;
116
+ //# sourceMappingURL=UserScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserScreen.js","sourceRoot":"","sources":["../../../src/auth/screens/UserScreen.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAC7D,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EACL,IAAI,EACJ,WAAW,EACX,MAAM,EACN,MAAM,EACN,UAAU,EACV,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAC,cAAc,EAAC,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AACzD,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,eAAe,EAAE,mBAAmB,EAAC,MAAM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,CACrC,SAAS,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CACxB,UAAU,CAAC,MAAM,CACjB,UAAU,CAAC,KAAK,CAChB,aAAa,CAAC,CAAC,iBAAiB,CAAC,CACjC,UAAU,CAAC,CAAC,KAAK,CAAC,EAClB,CACH,CACH;MAAA,EAAE,UAAU,CACd;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,MAAM,CAAC,EAAE,CACzB,UAAU,CAAC,MAAM,CAAC;IAChB,SAAS,EAAE;QACT,cAAc,EAAE,QAAQ;KACzB;IACD,cAAc,EAAE;QACd,UAAU,EAAE,QAAQ;KACrB;IACD,SAAS,EAAE;QACT,eAAe,EAAE,MAAM,CAAC,eAAe;KACxC;IACD,UAAU,EAAE;QACV,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,YAAY,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,GAAG;QAClD,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,GAAG;QAC3C,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,GAAG;QAC5C,SAAS,EAAE,CAAC;KACb;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAC;AAEL,eAAe,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as SettingsScreen } from "./SettingsScreen";
2
+ export { default as UserScreen } from "./UserScreen";
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ export { default as SettingsScreen } from './SettingsScreen';
19
+ export { default as UserScreen } from './UserScreen';
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/screens/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,cAAc,CAAC"}
@@ -0,0 +1,12 @@
1
+ interface ApiCallProps {
2
+ url: string;
3
+ data?: any;
4
+ }
5
+ declare class AxiosApiProvider {
6
+ constructor();
7
+ post({ url, data }: ApiCallProps): Promise<any>;
8
+ put({ url, data }: ApiCallProps): Promise<any>;
9
+ get({ url }: ApiCallProps): Promise<any>;
10
+ }
11
+ export declare const axiosApiProvider: AxiosApiProvider;
12
+ export {};
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import axios from 'axios';
19
+ class AxiosApiProvider {
20
+ constructor() { }
21
+ post({ url, data }) {
22
+ return axios.post(url, data);
23
+ }
24
+ put({ url, data }) {
25
+ return axios.put(url, data);
26
+ }
27
+ get({ url }) {
28
+ return axios.get(url);
29
+ }
30
+ }
31
+ export const axiosApiProvider = new AxiosApiProvider();
32
+ //# sourceMappingURL=AxiosApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AxiosApi.js","sourceRoot":"","sources":["../../src/axios/AxiosApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,gBAAgB;IACpB,gBAAe,CAAC;IAEhB,IAAI,CAAC,EAAC,GAAG,EAAE,IAAI,EAAe;QAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,GAAG,CAAC,EAAC,GAAG,EAAE,IAAI,EAAe;QAC3B,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,GAAG,CAAC,EAAC,GAAG,EAAe;QACrB,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;CACF;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export default Camera;
2
+ declare function Camera(): JSX.Element;