@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,50 @@
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 { axiosApiProvider } from '../axios/AxiosApi';
19
+ const MetaFileFields = ['id', 'fileName', 'createdOn'];
20
+ const createCriteria = listFiles => {
21
+ if (listFiles != null) {
22
+ let criterias = [];
23
+ listFiles.forEach(item => {
24
+ criterias.push({ fieldName: 'id', operator: '=', value: item.id });
25
+ });
26
+ return criterias;
27
+ }
28
+ };
29
+ export async function fetchFileDetails({ listFiles, isMetaFile, }) {
30
+ const model = isMetaFile
31
+ ? 'com.axelor.meta.db.MetaFile'
32
+ : 'com.axelor.dms.db.DMSFile';
33
+ return axiosApiProvider.post({
34
+ url: `/ws/rest/${model}/search`,
35
+ data: {
36
+ data: {
37
+ criteria: [
38
+ {
39
+ operator: 'or',
40
+ criteria: createCriteria(listFiles),
41
+ },
42
+ ],
43
+ },
44
+ fields: MetaFileFields,
45
+ limit: null,
46
+ offset: 0,
47
+ },
48
+ });
49
+ }
50
+ //# sourceMappingURL=metafile-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metafile-api.js","sourceRoot":"","sources":["../../src/api/metafile-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAEnD,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AAEvD,MAAM,cAAc,GAAG,SAAS,CAAC,EAAE;IACjC,IAAI,SAAS,IAAI,IAAI,EAAE;QACrB,IAAI,SAAS,GAAG,EAAE,CAAC;QACnB,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACvB,SAAS,CAAC,IAAI,CAAC,EAAC,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAC,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;KAClB;AACH,CAAC,CAAC;AAOF,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EACrC,SAAS,EACT,UAAU,GACY;IACtB,MAAM,KAAK,GAAG,UAAU;QACtB,CAAC,CAAC,6BAA6B;QAC/B,CAAC,CAAC,2BAA2B,CAAC;IAChC,OAAO,gBAAgB,CAAC,IAAI,CAAC;QAC3B,GAAG,EAAE,YAAY,KAAK,SAAS;QAC/B,IAAI,EAAE;YACJ,IAAI,EAAE;gBACJ,QAAQ,EAAE;oBACR;wBACE,QAAQ,EAAE,IAAI;wBACd,QAAQ,EAAE,cAAc,CAAC,SAAS,CAAC;qBACpC;iBACF;aACF;YACD,MAAM,EAAE,cAAc;YACtB,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,CAAC;SACV;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function getMobileConfigs(): Promise<any>;
@@ -0,0 +1,31 @@
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 { axiosApiProvider } from '../axios/AxiosApi';
19
+ export async function getMobileConfigs() {
20
+ return axiosApiProvider
21
+ .get({
22
+ url: '/ws/rest/com.axelor.apps.mobilesettings.db.MobileConfig',
23
+ })
24
+ .then(res => {
25
+ if (res?.status !== 0) {
26
+ return { data: { data: [] } };
27
+ }
28
+ return res;
29
+ });
30
+ }
31
+ //# sourceMappingURL=mobile-config-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile-config-api.js","sourceRoot":"","sources":["../../src/api/mobile-config-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,OAAO,gBAAgB;SACpB,GAAG,CAAC;QACH,GAAG,EAAE,yDAAyD;KAC/D,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,EAAE;QACV,IAAI,GAAG,EAAE,MAAM,KAAK,CAAC,EAAE;YACrB,OAAO,EAAC,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAC,EAAC,CAAC;SAC3B;QACD,OAAO,GAAG,CAAC;IACb,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,5 @@
1
+ interface NetInfoState {
2
+ isConnected: boolean;
3
+ }
4
+ export declare function getNetInfo(): Promise<NetInfoState>;
5
+ export {};
@@ -0,0 +1,29 @@
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 { axiosApiProvider } from '../axios/AxiosApi';
19
+ export async function getNetInfo() {
20
+ return axiosApiProvider
21
+ .get({
22
+ url: 'https://www.google.com/',
23
+ })
24
+ .then(res => ({ isConnected: res?.status === 200 }))
25
+ .catch(() => {
26
+ return { isConnected: false };
27
+ });
28
+ }
29
+ //# sourceMappingURL=net-info-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"net-info-utils.js","sourceRoot":"","sources":["../../src/api/net-info-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAMnD,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,OAAO,gBAAgB;SACpB,GAAG,CAAC;QACH,GAAG,EAAE,yBAAyB;KAC/B,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAC,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,GAAG,EAAC,CAAC,CAAC;SACjD,KAAK,CAAC,GAAG,EAAE;QACV,OAAO,EAAC,WAAW,EAAE,KAAK,EAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,7 @@
1
+ interface traceErrorProps {
2
+ message: string;
3
+ cause: string;
4
+ userId: number;
5
+ }
6
+ export declare const traceError: ({ message, cause, userId }: traceErrorProps) => Promise<import("axios").AxiosResponse<any, any>>;
7
+ export {};
@@ -0,0 +1,35 @@
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
+ const TECHNICAL_ABNORMALITY = 0;
20
+ const CONFIGURATION_PROBLEM = 4;
21
+ export const traceError = ({ message, cause, userId }) => {
22
+ return axios.put('/ws/rest/com.axelor.exception.db.TraceBack', {
23
+ data: {
24
+ origin: 'mobile app',
25
+ typeSelect: TECHNICAL_ABNORMALITY,
26
+ categorySelect: CONFIGURATION_PROBLEM,
27
+ date: new Date(),
28
+ exception: message,
29
+ message: message,
30
+ cause: JSON.stringify(cause),
31
+ internalUser: { id: userId },
32
+ },
33
+ });
34
+ };
35
+ //# sourceMappingURL=traceback-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"traceback-api.js","sourceRoot":"","sources":["../../src/api/traceback-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAQhC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAkB,EAAE,EAAE;IACtE,OAAO,KAAK,CAAC,GAAG,CAAC,4CAA4C,EAAE;QAC7D,IAAI,EAAE;YACJ,MAAM,EAAE,YAAY;YACpB,UAAU,EAAE,qBAAqB;YACjC,cAAc,EAAE,qBAAqB;YACrC,IAAI,EAAE,IAAI,IAAI,EAAE;YAChB,SAAS,EAAE,OAAO;YAClB,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;YAC5B,YAAY,EAAE,EAAC,EAAE,EAAE,MAAM,EAAC;SAC3B;KACF,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ export declare const getApiResponseData: (response: any, { isArrayResponse }: {
2
+ isArrayResponse?: boolean;
3
+ }) => any;
4
+ export declare const getFirstData: (data: any) => any;
5
+ export declare const handlerError: (message: any, { getState }: {
6
+ getState?: () => void;
7
+ }, { showErrorToast, errorTracing }: errorOptionsProps) => (error: any) => void;
8
+ interface ApiHandlerProps {
9
+ fetchFunction: (data: any) => Promise<any>;
10
+ data: any;
11
+ action: string;
12
+ getState: () => any;
13
+ responseOptions?: {
14
+ showToast?: boolean;
15
+ isArrayResponse?: boolean;
16
+ returnTotal?: boolean;
17
+ };
18
+ errorOptions?: errorOptionsProps;
19
+ }
20
+ interface errorOptionsProps {
21
+ showErrorToast?: boolean;
22
+ errorTracing?: boolean;
23
+ }
24
+ export declare const handlerApiCall: ({ fetchFunction, data, action, getState, responseOptions: { showToast, isArrayResponse, returnTotal, }, errorOptions, }: ApiHandlerProps) => Promise<any>;
25
+ export {};
@@ -0,0 +1,92 @@
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 Toast from 'react-native-toast-message';
19
+ import { traceError } from './traceback-api';
20
+ export const getApiResponseData = (response, { isArrayResponse = true }) => {
21
+ if (response.data && response.data.object != null) {
22
+ return response.data.object;
23
+ }
24
+ return isArrayResponse
25
+ ? response?.data?.data
26
+ : getFirstData(response?.data?.data);
27
+ };
28
+ const getApiResponseCode = response => response?.data?.codeStatus || response?.status;
29
+ const getApiResponseMessage = response => response?.data?.messageStatus || response?.statusTxt;
30
+ const getApiResponseTotal = response => response?.data?.total || 0;
31
+ export const getFirstData = data => {
32
+ if (data instanceof Array) {
33
+ return data[0];
34
+ }
35
+ return null;
36
+ };
37
+ const getUser = ({ getState }) => {
38
+ return getState()?.auth?.userId;
39
+ };
40
+ const manageError = (error, action, userId, { showErrorToast = true, errorTracing = true }) => {
41
+ if (error.response) {
42
+ const message = error?.response?.data?.messageStatus || error?.response?.statusText;
43
+ const code = error.response?.data?.codeStatus || error?.response?.status;
44
+ if (errorTracing) {
45
+ traceError({
46
+ message: 'API request',
47
+ cause: error.response.data ? error.response.data : error,
48
+ userId,
49
+ });
50
+ }
51
+ if (showErrorToast) {
52
+ Toast.show({
53
+ type: 'error',
54
+ position: 'bottom',
55
+ bottomOffset: 20,
56
+ text1: `Error ${code}`,
57
+ text2: `Failed to ${action}: ${message}.`,
58
+ });
59
+ }
60
+ }
61
+ };
62
+ export const handlerError = (message, { getState = () => { } }, { showErrorToast, errorTracing }) => {
63
+ return error => manageError(error, message, getUser({ getState }), {
64
+ showErrorToast,
65
+ errorTracing,
66
+ });
67
+ };
68
+ const manageSucess = (response, { showToast = false, isArrayResponse, returnTotal = false }) => {
69
+ const data = getApiResponseData(response, { isArrayResponse });
70
+ const code = getApiResponseCode(response);
71
+ const message = getApiResponseMessage(response);
72
+ const total = getApiResponseTotal(response);
73
+ if (showToast) {
74
+ Toast.show({
75
+ type: 'success',
76
+ position: 'bottom',
77
+ bottomOffset: 20,
78
+ text1: `Success ${code}`,
79
+ text2: `${message ? message : 'Request successful'}.`,
80
+ });
81
+ }
82
+ return returnTotal ? total : data;
83
+ };
84
+ const handlerSuccess = ({ showToast, isArrayResponse, returnTotal }) => {
85
+ return response => manageSucess(response, { showToast, isArrayResponse, returnTotal });
86
+ };
87
+ export const handlerApiCall = ({ fetchFunction, data, action, getState, responseOptions: { showToast = false, isArrayResponse = false, returnTotal = false, }, errorOptions = { showErrorToast: true, errorTracing: true }, }) => {
88
+ return fetchFunction(data)
89
+ .catch(handlerError(action, { getState }, errorOptions))
90
+ .then(handlerSuccess({ showToast, isArrayResponse, returnTotal }));
91
+ };
92
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/api/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,4BAA4B,CAAC;AAC/C,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,QAAQ,EAAE,EAAC,eAAe,GAAG,IAAI,EAAC,EAAE,EAAE;IACvE,IAAI,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,EAAE;QACjD,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;KAC7B;IACD,OAAO,eAAe;QACpB,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI;QACtB,CAAC,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,QAAQ,CAAC,EAAE,CACpC,QAAQ,EAAE,IAAI,EAAE,UAAU,IAAI,QAAQ,EAAE,MAAM,CAAC;AAEjD,MAAM,qBAAqB,GAAG,QAAQ,CAAC,EAAE,CACvC,QAAQ,EAAE,IAAI,EAAE,aAAa,IA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AAE;IACnE,OAAO,QAAQ,CAAC,EAAE,CAChB,YAAY,CAAC,QAAQ,EAAE,EAAC,SAAS,EAAE,eAAe,EAAE,WAAW,EAAC,CAAC,CAAC;AACtE,CAAC,CAAC;AAoBF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,aAAa,EACb,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,eAAe,EAAE,EACf,SAAS,GAAG,KAAK,EACjB,eAAe,GAAG,KAAK,EACvB,WAAW,GAAG,KAAK,GACpB,EACD,YAAY,GAAG,EAAC,cAAc,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAC,GACzC,EAAE,EAAE;IACpB,OAAO,aAAa,CAAC,IAAI,CAAC;SACvB,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,EAAC,QAAQ,EAAC,EAAE,YAAY,CAAC,CAAC;SACrD,IAAI,CAAC,cAAc,CAAC,EAAC,SAAS,EAAE,eAAe,EAAE,WAAW,EAAC,CAAC,CAAC,CAAC;AACrE,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Theme, Writing } from '@axelor/aos-mobile-ui';
2
+ import { Module } from './Module';
3
+ interface ApplicationProps {
4
+ modules: Module[];
5
+ mainMenu?: string;
6
+ additionalsReducers?: any;
7
+ version: string;
8
+ themes?: Theme[];
9
+ defaultTheme?: Theme;
10
+ writingThemes?: Writing[];
11
+ defaultWritingTheme?: Writing;
12
+ showModulesSubtitle: boolean;
13
+ }
14
+ declare const Application: ({ modules: modulesProvided, mainMenu, additionalsReducers, version, themes, defaultTheme, writingThemes, defaultWritingTheme, showModulesSubtitle, }: ApplicationProps) => JSX.Element;
15
+ export default Application;
@@ -0,0 +1,29 @@
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, { useRef } from 'react';
19
+ import ContextsProvider from './ContextsProvider';
20
+ import ContextedApplication from './ContextedApplication';
21
+ import { authModule } from '../auth';
22
+ const Application = ({ modules: modulesProvided, mainMenu, additionalsReducers, version, themes, defaultTheme, writingThemes, defaultWritingTheme, showModulesSubtitle = false, }) => {
23
+ const modules = useRef([authModule, ...modulesProvided]).current;
24
+ return (<ContextsProvider modules={modules} additionalsReducers={additionalsReducers} defaultTheme={defaultTheme} themes={themes} defaultWritingTheme={defaultWritingTheme} writingThemes={writingThemes}>
25
+ <ContextedApplication modules={modules} mainMenu={mainMenu} version={version} showModulesSubtitle={showModulesSubtitle}/>
26
+ </ContextsProvider>);
27
+ };
28
+ export default Application;
29
+ //# sourceMappingURL=Application.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Application.js","sourceRoot":"","sources":["../../src/app/Application.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,MAAM,EAAC,MAAM,OAAO,CAAC;AAGpC,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAcnC,MAAM,WAAW,GAAG,CAAC,EACnB,OAAO,EAAE,eAAe,EACxB,QAAQ,EACR,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,mBAAmB,GAAG,KAAK,GACV,EAAE,EAAE;IACrB,MAAM,OAAO,GAAa,MAAM,CAAC,CAAC,UAAU,EAAE,GAAG,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC;IAE3E,OAAO,CACL,CAAC,gBAAgB,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,CACzC,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,CACzC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B;MAAA,CAAC,oBAAoB,CACnB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,EAE7C;IAAA,EAAE,gBAAgB,CAAC,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Module } from './Module';
2
+ interface ContextedApplicationProps {
3
+ modules: Module[];
4
+ mainMenu?: string;
5
+ version: string;
6
+ showModulesSubtitle: boolean;
7
+ }
8
+ declare const ContextedApplication: ({ modules, mainMenu, version, showModulesSubtitle, }: ContextedApplicationProps) => JSX.Element;
9
+ export default ContextedApplication;
@@ -0,0 +1,80 @@
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, useMemo } from 'react';
19
+ import { StyleSheet } from 'react-native';
20
+ import Toast, { BaseToast, ErrorToast } from 'react-native-toast-message';
21
+ import { NavigationContainer } from '@react-navigation/native';
22
+ import axios from 'axios';
23
+ import { LoadingIndicator, HeaderIndicator, useThemeColor, } from '@axelor/aos-mobile-ui';
24
+ import { ErrorBoundary } from '@axelor/aos-mobile-error';
25
+ import RootNavigator from './RootNavigator';
26
+ import Translator from '../i18n/component/Translator';
27
+ import { getActiveUserId } from '../api/login-api';
28
+ import ErrorScreen from '../screens/ErrorScreen';
29
+ import { Camera, Scanner } from '../components';
30
+ const ContextedApplication = ({ modules, mainMenu, version, showModulesSubtitle = false, }) => {
31
+ const Colors = useThemeColor();
32
+ const styles = useMemo(() => getStyles(Colors), [Colors]);
33
+ const toastConfig = {
34
+ success: props => (<BaseToast {...props} style={[styles.success, styles.toast]} contentContainerStyle={styles.toastContent} text1Style={styles.title} text2Style={styles.detail} text2NumberOfLines={3}/>),
35
+ error: props => (<ErrorToast {...props} style={[styles.error, styles.toast]} contentContainerStyle={styles.toastContent} text1Style={styles.title} text2Style={styles.detail} text2NumberOfLines={3}/>),
36
+ };
37
+ const traceBackPutMethod = useCallback(({ additionalURL, data }) => {
38
+ return axios.put(additionalURL, { data: data });
39
+ }, []);
40
+ return (<>
41
+ <Camera />
42
+ <Scanner />
43
+ <Translator />
44
+ <ErrorBoundary errorScreen={ErrorScreen} userIdfetcher={getActiveUserId} putMethod={traceBackPutMethod}>
45
+ <NavigationContainer>
46
+ <HeaderIndicator />
47
+ <LoadingIndicator />
48
+ <RootNavigator modules={modules} mainMenu={mainMenu} version={version} showModulesSubtitle={showModulesSubtitle}/>
49
+ </NavigationContainer>
50
+ </ErrorBoundary>
51
+ <Toast config={toastConfig}/>
52
+ </>);
53
+ };
54
+ const getStyles = (Colors) => StyleSheet.create({
55
+ error: {
56
+ borderLeftColor: Colors.errorColor.background,
57
+ },
58
+ success: {
59
+ borderLeftColor: Colors.successColor.background,
60
+ },
61
+ toast: {
62
+ width: '90%',
63
+ height: 90,
64
+ },
65
+ toastContent: {
66
+ paddingVertical: 5,
67
+ },
68
+ title: {
69
+ fontSize: 18,
70
+ color: Colors.text,
71
+ flex: 1,
72
+ },
73
+ detail: {
74
+ fontSize: 16,
75
+ color: Colors.text,
76
+ flex: 3,
77
+ },
78
+ });
79
+ export default ContextedApplication;
80
+ //# sourceMappingURL=ContextedApplication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextedApplication.js","sourceRoot":"","sources":["../../src/app/ContextedApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,gBAAgB,EAChB,eAAe,EAEf,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACvD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AACjD,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAC,MAAM,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AAS9C,MAAM,oBAAoB,GAAG,CAAC,EAC5B,OAAO,EACP,QAAQ,EACR,OAAO,EACP,mBAAmB,GAAG,KAAK,GACD,EAAE,EAAE;IAC9B,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,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Aa,CAAC,CAAC,eAAe,CAAC,CAC/B,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAC9B;QAAA,CAAC,mBAAmB,CAClB;UAAA,CAAC,eAAe,CAAC,AAAD,EAChB;UAAA,CAAC,gBAAgB,CAAC,AAAD,EACjB;UAAA,CAAC,aAAa,CACZ,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,EAE7C;QAAA,EAAE,mBAAmB,CACvB;MAAA,EAAE,aAAa,CACf;MAAA,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,EAC7B;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAmB,EAAE,EAAE,CACxC,UAAU,CAAC,MAAM,CAAC;IAChB,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC,UAAU,CAAC,UAAU;KAC9C;IACD,OAAO,EAAE;QACP,eAAe,EAAE,MAAM,CAAC,YAAY,CAAC,UAAU;KAChD;IACD,KAAK,EAAE;QACL,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,EAAE;KACX;IACD,YAAY,EAAE;QACZ,eAAe,EAAE,CAAC;KACnB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC,IAAI;QAClB,IAAI,EAAE,CAAC;KACR;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC,IAAI;QAClB,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC;AAEL,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { Theme, Writing } from '@axelor/aos-mobile-ui';
3
+ import { Module } from './Module';
4
+ interface ContextsProviderProps {
5
+ modules: Module[];
6
+ additionalsReducers?: any;
7
+ themes?: Theme[];
8
+ defaultTheme?: Theme;
9
+ writingThemes?: Writing[];
10
+ defaultWritingTheme?: Writing;
11
+ children: React.ReactNode;
12
+ }
13
+ declare const ContextsProvider: ({ modules, additionalsReducers, themes, defaultTheme, writingThemes, defaultWritingTheme, children, }: ContextsProviderProps) => JSX.Element;
14
+ export default ContextsProvider;
@@ -0,0 +1,63 @@
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, { createContext, useEffect, useMemo, useState } from 'react';
19
+ import { Provider } from 'react-redux';
20
+ import { ConfigProvider, OutsideAlerterProvider, ThemeProvider, WritingThemeProvider, } from '@axelor/aos-mobile-ui';
21
+ import { configI18n } from '../i18n/i18n';
22
+ import enTranslation from '../i18n/translations/en.json';
23
+ import frTranslation from '../i18n/translations/fr.json';
24
+ import { configGlobalStore } from '../redux/store';
25
+ const ApplicationContext = createContext(null);
26
+ const ContextsProvider = ({ modules, additionalsReducers, themes, defaultTheme, writingThemes, defaultWritingTheme, children, }) => {
27
+ const [loading, setLoading] = useState(true);
28
+ const appTranslations = useMemo(() => modules.reduce((translations, _module) => ({
29
+ en: { ...translations.en, ..._module.translations?.en },
30
+ fr: { ...translations.fr, ..._module.translations?.fr },
31
+ }), { en: enTranslation, fr: frTranslation }), [modules]);
32
+ useEffect(() => {
33
+ configI18n({
34
+ resources: [
35
+ { lng: 'en', translationsObject: appTranslations.en },
36
+ { lng: 'fr', translationsObject: appTranslations.fr },
37
+ ],
38
+ });
39
+ setLoading(false);
40
+ // I18n should be initialize only once
41
+ // eslint-disable-next-line react-hooks/exhaustive-deps
42
+ }, []);
43
+ const externalsReducers = useMemo(() => modules.reduce((reducers, _module) => ({ ...reducers, ..._module.reducers }), {
44
+ ...additionalsReducers,
45
+ }), [additionalsReducers, modules]);
46
+ const store = useMemo(() => configGlobalStore(externalsReducers), [externalsReducers]);
47
+ if (loading) {
48
+ return null;
49
+ }
50
+ return (<ApplicationContext.Provider value={{}}>
51
+ <Provider store={store}>
52
+ <OutsideAlerterProvider>
53
+ <ThemeProvider themes={themes} defaultTheme={defaultTheme}>
54
+ <WritingThemeProvider themes={writingThemes} defaultTheme={defaultWritingTheme}>
55
+ <ConfigProvider>{children}</ConfigProvider>
56
+ </WritingThemeProvider>
57
+ </ThemeProvider>
58
+ </OutsideAlerterProvider>
59
+ </Provider>
60
+ </ApplicationContext.Provider>);
61
+ };
62
+ export default ContextsProvider;
63
+ //# sourceMappingURL=ContextsProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextsProvider.js","sourceRoot":"","sources":["../../src/app/ContextsProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACzE,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,aAAa,EACb,oBAAoB,GAGrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,aAAa,MAAM,8BAA8B,CAAC;AACzD,OAAO,aAAa,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AAEjD,MAAM,kBAAkB,GA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BAAmB;KACvB,CACF,EACH,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAC/B,CAAC;IAEF,MAAM,KAAK,GAAG,OAAO,CACnB,GAAG,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,EAC1C,CAAC,iBAAiB,CAAC,CACpB,CAAC;IAEF,IAAI,OAAO,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CACrC;MAAA,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CACrB;QAAA,CAAC,sBAAsB,CACrB;UAAA,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,CACxD;YAAA,CAAC,oBAAoB,CACnB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,YAAY,CAAC,CAAC,mBAAmB,CAAC,CAClC;cAAA,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,EAAE,cAAc,CAC5C;YAAA,EAAE,oBAAoB,CACxB;UAAA,EAAE,aAAa,CACjB;QAAA,EAAE,sBAAsB,CAC1B;MAAA,EAAE,QAAQ,CACZ;IAAA,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAC/B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ export interface Module {
3
+ name: string;
4
+ title: string;
5
+ subtitle: string;
6
+ icon: string;
7
+ disabled?: boolean;
8
+ menus: {
9
+ [screenKey: string]: {
10
+ title: string;
11
+ icon: string;
12
+ screen: string;
13
+ disabled?: boolean;
14
+ };
15
+ };
16
+ screens: {
17
+ [screenKey: string]: React.FC<any> | {
18
+ component: React.FC<any>;
19
+ title: string;
20
+ };
21
+ };
22
+ translations?: {
23
+ [languageKey: string]: any;
24
+ };
25
+ reducers?: any;
26
+ }
@@ -0,0 +1,19 @@
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 {};
19
+ //# sourceMappingURL=Module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Module.js","sourceRoot":"","sources":["../../src/app/Module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
@@ -0,0 +1,7 @@
1
+ export default RootNavigator;
2
+ declare function RootNavigator({ modules, mainMenu, version, showModulesSubtitle, }: {
3
+ modules: any;
4
+ mainMenu: any;
5
+ version: any;
6
+ showModulesSubtitle?: boolean;
7
+ }): JSX.Element;