@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,69 @@
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 { useSelector } from 'react-redux';
20
+ import { createNativeStackNavigator } from '@react-navigation/native-stack';
21
+ import LoginScreen from '../screens/LoginScreen';
22
+ import { default as CoreNavigator } from '../navigator/Navigator';
23
+ import { useConfig, useThemeColor } from '@axelor/aos-mobile-ui';
24
+ import { getNetInfo } from '../api/net-info-utils';
25
+ import useTranslator from '../i18n/hooks/use-translator';
26
+ const { Navigator, Screen } = createNativeStackNavigator();
27
+ const RootNavigator = ({ modules, mainMenu, version, showModulesSubtitle = false, }) => {
28
+ const Colors = useThemeColor();
29
+ const I18n = useTranslator();
30
+ const { isHeaderIndicatorVisible, setIsHeaderIndicatorVisible, setHeaderIndicatorState, } = useConfig();
31
+ const { logged } = useSelector(state => state.auth);
32
+ const AppNavigator = useCallback(() => (<CoreNavigator modules={modules} mainMenu={mainMenu} showModulesSubtitle={showModulesSubtitle}/>), [modules, mainMenu, showModulesSubtitle]);
33
+ const checkInternetConnection = useCallback(async () => {
34
+ const { isConnected } = await getNetInfo();
35
+ if (!isConnected) {
36
+ setHeaderIndicatorState({
37
+ text: I18n.t('Base_NoConnection'),
38
+ color: Colors.secondaryColor.background_light,
39
+ });
40
+ setIsHeaderIndicatorVisible(true);
41
+ }
42
+ else {
43
+ if (isHeaderIndicatorVisible) {
44
+ setHeaderIndicatorState({
45
+ text: I18n.t('Base_Connected'),
46
+ color: Colors.primaryColor.background,
47
+ textColor: 'white',
48
+ });
49
+ setIsHeaderIndicatorVisible(false);
50
+ }
51
+ }
52
+ }, [
53
+ I18n,
54
+ Colors.primaryColor,
55
+ Colors.secondaryColor,
56
+ isHeaderIndicatorVisible,
57
+ setIsHeaderIndicatorVisible,
58
+ setHeaderIndicatorState,
59
+ ]);
60
+ useEffect(() => {
61
+ const interval = setInterval(checkInternetConnection, 2000);
62
+ return () => clearInterval(interval.current);
63
+ }, [checkInternetConnection]);
64
+ return (<Navigator screenOptions={{ headerShown: false }}>
65
+ {!logged ? (<Screen name="LoginScreen" component={LoginScreen} initialParams={{ version }}/>) : (<Screen name="AppNavigator" component={AppNavigator}/>)}
66
+ </Navigator>);
67
+ };
68
+ export default RootNavigator;
69
+ //# sourceMappingURL=RootNavigator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RootNavigator.js","sourceRoot":"","sources":["../../src/app/RootNavigator.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AACpD,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,0BAA0B,EAAC,MAAM,gCAAgC,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAC,SAAS,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AACjD,OAAO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Y,CAAC,UAAU;oBACrC,SAAS,EAAE,OAAO;iBACnB,CAAC,CAAC;gBACH,2BAA2B,CAAC,KAAK,CAAC,CAAC;aACpC;SACF;IACH,CAAC,EAAE;QACD,IAAI;QACJ,MAAM,CAAC,YAAY;QACnB,MAAM,CAAC,cAAc;QACrB,wBAAwB;QACxB,2BAA2B;QAC3B,uBAAuB;KACxB,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,QAAQ,GAAG,WAAW,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC;QAC5D,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC,EAAE,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAE9B,OAAO,CACL,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,EAAC,WAAW,EAAE,KAAK,EAAC,CAAC,CAC7C;MAAA,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CACT,CAAC,MAAM,CACL,IAAI,CAAC,aAAa,CAClB,SAAS,CAAC,CAAC,WAAW,CAAC,CACvB,aAAa,CAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EACzB,CACH,CAAC,CAAC,CAAC,CACF,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,EAAG,CACxD,CACH;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { default as Application } from './Application';
2
+ export { default as ContextedApplication } from './ContextedApplication';
3
+ export { default as ContextsProvider } from './ContextsProvider';
4
+ export { Module } from './Module';
5
+ export { default as RootNavigator } from './RootNavigator';
@@ -0,0 +1,22 @@
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 Application } from './Application';
19
+ export { default as ContextedApplication } from './ContextedApplication';
20
+ export { default as ContextsProvider } from './ContextsProvider';
21
+ export { default as RootNavigator } from './RootNavigator';
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC"}
Binary file
@@ -0,0 +1 @@
1
+ export function searchCompany(): 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 '@axelor/aos-mobile-core';
19
+ const companyFields = ['code', 'name', 'id'];
20
+ export async function searchCompany() {
21
+ return axiosApiProvider.post({
22
+ url: '/ws/rest/com.axelor.apps.base.db.Company/search',
23
+ data: {
24
+ data: null,
25
+ fields: companyFields,
26
+ limit: null,
27
+ offset: 0,
28
+ },
29
+ });
30
+ }
31
+ //# sourceMappingURL=company-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company-api.js","sourceRoot":"","sources":["../../../src/auth/api/company-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAEzD,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;AAE7C,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,OAAO,gBAAgB,CAAC,IAAI,CAAC;QAC3B,GAAG,EAAE,iDAAiD;QACtD,IAAI,EAAE;YACJ,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,aAAa;YACrB,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,CAAC;SACV;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export function getBaseConfig(): Promise<any>;
2
+ export function getMobileSettings(): Promise<any>;
@@ -0,0 +1,45 @@
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 '@axelor/aos-mobile-core';
19
+ export async function getBaseConfig() {
20
+ return axiosApiProvider.get({
21
+ url: '/ws/rest/com.axelor.apps.base.db.AppBase/',
22
+ });
23
+ }
24
+ export async function getMobileSettings() {
25
+ return axiosApiProvider
26
+ .get({
27
+ url: '/ws/rest/com.axelor.apps.base.db.AppMobileSettings/',
28
+ })
29
+ .then(res => {
30
+ if (res?.data?.status !== 0) {
31
+ return {
32
+ data: {
33
+ data: [
34
+ {
35
+ isTrackerMessageOnStockApp: true,
36
+ isTrackerMessageOnProductionApp: true,
37
+ },
38
+ ],
39
+ },
40
+ };
41
+ }
42
+ return res;
43
+ });
44
+ }
45
+ //# sourceMappingURL=config-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-api.js","sourceRoot":"","sources":["../../../src/auth/api/config-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAEzD,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,2CAA2C;KACjD,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACrC,OAAO,gBAAgB;SACpB,GAAG,CAAC;QACH,GAAG,EAAE,qDAAqD;KAC3D,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,EAAE;QACV,IAAI,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC,EAAE;YAC3B,OAAO;gBACL,IAAI,EAAE;oBACJ,IAAI,EAAE;wBACJ;4BACE,0BAA0B,EAAE,IAAI;4BAChC,+BAA+B,EAAE,IAAI;yBACtC;qBACF;iBACF;aACF,CAAC;SACH;QACD,OAAO,GAAG,CAAC;IACb,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { searchCompany } from "./company-api";
2
+ export { searchLanguage } from "./language-api";
3
+ export { getBaseConfig, getMobileSettings } from "./config-api";
4
+ export { getLoggedUser, postUser } from "./user-api";
@@ -0,0 +1,22 @@
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 { searchCompany } from './company-api';
19
+ export { getBaseConfig, getMobileSettings } from './config-api';
20
+ export { searchLanguage } from './language-api';
21
+ export { getLoggedUser, postUser } from './user-api';
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/api/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAC,aAAa,EAAE,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ export function searchLanguage(): Promise<any>;
@@ -0,0 +1,24 @@
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 '@axelor/aos-mobile-core';
19
+ export async function searchLanguage() {
20
+ return axiosApiProvider.get({
21
+ url: '/ws/rest/com.axelor.apps.base.db.Language/',
22
+ });
23
+ }
24
+ //# sourceMappingURL=language-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-api.js","sourceRoot":"","sources":["../../../src/auth/api/language-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAEzD,MAAM,CAAC,KAAK,UAAU,cAAc;IAClC,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,4CAA4C;KAClD,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export function getLoggedUser(userId: any): Promise<any>;
2
+ export function postUser(user: any): Promise<any>;
@@ -0,0 +1,30 @@
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 '@axelor/aos-mobile-core';
19
+ export async function getLoggedUser(userId) {
20
+ return axiosApiProvider.get({
21
+ url: `/ws/rest/com.axelor.auth.db.User/${userId}`,
22
+ });
23
+ }
24
+ export async function postUser(user) {
25
+ return axiosApiProvider.post({
26
+ url: '/ws/rest/com.axelor.auth.db.User',
27
+ data: { data: user },
28
+ });
29
+ }
30
+ //# sourceMappingURL=user-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-api.js","sourceRoot":"","sources":["../../../src/auth/api/user-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAEzD,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAM;IACxC,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,oCAAoC,MAAM,EAAE;KAClD,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,IAAI;IACjC,OAAO,gBAAgB,CAAC,IAAI,CAAC;QAC3B,GAAG,EAAE,kCAAkC;QACvC,IAAI,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC;KACnB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { fetchCompanies } from "./companySlice";
2
+ export { fetchLanguages } from "./languageSlice";
3
+ export { fetchBaseConfig, fetchMobileSettings, uploadTranslations } from "./configSlice";
4
+ export { fetchActiveUser, updateActiveUser, changeActiveCompany, changeDefaultStockLocation } from "./userSlice";
@@ -0,0 +1,22 @@
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 { fetchCompanies } from './companySlice';
19
+ export { fetchBaseConfig, fetchMobileSettings, uploadTranslations, } from './configSlice';
20
+ export { fetchLanguages } from './languageSlice';
21
+ export { fetchActiveUser, updateActiveUser, changeActiveCompany, changeDefaultStockLocation, } from './userSlice';
22
+ //# sourceMappingURL=asyncFunctionsIndex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asyncFunctionsIndex.js","sourceRoot":"","sources":["../../../src/auth/features/asyncFunctionsIndex.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,aAAa,CAAC"}
@@ -0,0 +1,14 @@
1
+ export const fetchCompanies: 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 companyReducer: import("redux").Reducer<{
12
+ loading: boolean;
13
+ companyList: any[];
14
+ }, import("redux").AnyAction>;
@@ -0,0 +1,48 @@
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 { searchCompany } from '../api/company-api';
21
+ export const fetchCompanies = createAsyncThunk('company/fetchCompany', async function (data = {}, { getState }) {
22
+ return handlerApiCall({
23
+ fetchFunction: searchCompany,
24
+ data,
25
+ action: 'fetch companies',
26
+ getState,
27
+ responseOptions: { isArrayResponse: true },
28
+ });
29
+ });
30
+ const initialState = {
31
+ loading: false,
32
+ companyList: [],
33
+ };
34
+ const companySlice = createSlice({
35
+ name: 'company',
36
+ initialState,
37
+ extraReducers: builder => {
38
+ builder.addCase(fetchCompanies.pending, state => {
39
+ state.loading = true;
40
+ });
41
+ builder.addCase(fetchCompanies.fulfilled, (state, action) => {
42
+ state.loading = false;
43
+ state.companyList = action.payload;
44
+ });
45
+ },
46
+ });
47
+ export const companyReducer = companySlice.reducer;
48
+ //# sourceMappingURL=companySlice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companySlice.js","sourceRoot":"","sources":["../../../src/auth/features/companySlice.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,EAAC,MAAM,oBAAoB,CAAC;AAEjD,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAC5C,sBAAsB,EACtB,KAAK,WAAW,IAAI,GAAG,EAAE,EAAE,EAAC,QAAQ,EAAC;IACnC,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,aAAa;QAC5B,IAAI;QACJ,MAAM,EAAE,iBAAiB;QACzB,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,IAAI,EAAC;KACzC,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,YAAY,GAAG,WAAW,CAAC;IAC/B,IAAI,EAAE,SAAS;IACf,YAAY;IACZ,aAAa,EAAE,OAAO,CAAC,EAAE;QACvB,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;YAC9C,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YAC1D,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;YACtB,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;QACrC,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,CAAC"}
@@ -0,0 +1,37 @@
1
+ export const fetchBaseConfig: 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 uploadTranslations: 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 fetchMobileSettings: import("@reduxjs/toolkit").AsyncThunk<any, void, {
22
+ state?: unknown;
23
+ dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
24
+ extra?: unknown;
25
+ rejectValue?: unknown;
26
+ serializedErrorType?: unknown;
27
+ pendingMeta?: unknown;
28
+ fulfilledMeta?: unknown;
29
+ rejectedMeta?: unknown;
30
+ }>;
31
+ export const clearMessage: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"config/clearMessage">;
32
+ export const configReducer: import("redux").Reducer<import("immer/dist/internal").WritableDraft<{
33
+ loading: boolean;
34
+ baseConfig: {};
35
+ mobileSettings: {};
36
+ message: any;
37
+ }>, import("redux").AnyAction>;
@@ -0,0 +1,82 @@
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, postTranslations } from '@axelor/aos-mobile-core';
20
+ import { getBaseConfig, getMobileSettings } from '../api/config-api';
21
+ export const fetchBaseConfig = createAsyncThunk('base/fetchBaseConfig', async function (data = {}, { getState }) {
22
+ return handlerApiCall({
23
+ fetchFunction: getBaseConfig,
24
+ data,
25
+ action: 'fetch base config',
26
+ getState,
27
+ responseOptions: { isArrayResponse: false },
28
+ });
29
+ });
30
+ export const uploadTranslations = createAsyncThunk('base/uploadTranslations', async function ({ language, translations }) {
31
+ return postTranslations(language, translations);
32
+ });
33
+ export const fetchMobileSettings = createAsyncThunk('mobile-settings/fetchMobileSettings', async function (data = {}, { getState }) {
34
+ return handlerApiCall({
35
+ fetchFunction: getMobileSettings,
36
+ data,
37
+ action: 'fetch app mobile settings',
38
+ getState,
39
+ responseOptions: { isArrayResponse: false },
40
+ });
41
+ });
42
+ const initialState = {
43
+ loading: false,
44
+ baseConfig: {},
45
+ mobileSettings: {},
46
+ message: null,
47
+ };
48
+ const configSlice = createSlice({
49
+ name: 'config',
50
+ initialState,
51
+ reducers: {
52
+ clearMessage: state => {
53
+ state.message = null;
54
+ },
55
+ },
56
+ extraReducers: builder => {
57
+ builder.addCase(fetchBaseConfig.pending, state => {
58
+ state.loading = true;
59
+ });
60
+ builder.addCase(fetchBaseConfig.fulfilled, (state, action) => {
61
+ state.loading = false;
62
+ state.baseConfig = action.payload;
63
+ });
64
+ builder.addCase(uploadTranslations.pending, state => {
65
+ state.loading = true;
66
+ });
67
+ builder.addCase(uploadTranslations.fulfilled, (state, action) => {
68
+ state.loading = false;
69
+ state.message = action.payload;
70
+ });
71
+ builder.addCase(fetchMobileSettings.pending, state => {
72
+ state.loading = true;
73
+ });
74
+ builder.addCase(fetchMobileSettings.fulfilled, (state, action) => {
75
+ state.loading = false;
76
+ state.mobileSettings = action.payload;
77
+ });
78
+ },
79
+ });
80
+ export const { clearMessage } = configSlice.actions;
81
+ export const configReducer = configSlice.reducer;
82
+ //# sourceMappingURL=configSlice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configSlice.js","sourceRoot":"","sources":["../../../src/auth/features/configSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EA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AW,CAAC,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { companyReducer as company } from "./companySlice";
2
+ export { configReducer as config } from "./configSlice";
3
+ export { languageReducer as language } from "./languageSlice";
4
+ export { userReducer as user } from "./userSlice";
@@ -0,0 +1,22 @@
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 { companyReducer as company } from './companySlice';
19
+ export { configReducer as config } from './configSlice';
20
+ export { languageReducer as language } from './languageSlice';
21
+ export { userReducer as user } from './userSlice';
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/features/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,cAAc,IAAI,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAC,aAAa,IAAI,MAAM,EAAC,MAAM,eAAe,CAAC;AACtD,OAAO,EAAC,eAAe,IAAI,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAC,WAAW,IAAI,IAAI,EAAC,MAAM,aAAa,CAAC"}
@@ -0,0 +1,14 @@
1
+ export const fetchLanguages: 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 languageReducer: import("redux").Reducer<{
12
+ loading: boolean;
13
+ languageList: any[];
14
+ }, import("redux").AnyAction>;
@@ -0,0 +1,48 @@
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 { searchLanguage } from '../api/language-api';
21
+ export const fetchLanguages = createAsyncThunk('language/fetchLanguage', async function (data = {}, { getState }) {
22
+ return handlerApiCall({
23
+ fetchFunction: searchLanguage,
24
+ data,
25
+ action: 'fetch languages',
26
+ getState,
27
+ responseOptions: { isArrayResponse: true },
28
+ });
29
+ });
30
+ const initialState = {
31
+ loading: false,
32
+ languageList: [],
33
+ };
34
+ const languageSlice = createSlice({
35
+ name: 'language',
36
+ initialState,
37
+ extraReducers: builder => {
38
+ builder.addCase(fetchLanguages.pending, state => {
39
+ state.loading = true;
40
+ });
41
+ builder.addCase(fetchLanguages.fulfilled, (state, action) => {
42
+ state.loading = false;
43
+ state.languageList = action.payload;
44
+ });
45
+ },
46
+ });
47
+ export const languageReducer = languageSlice.reducer;
48
+ //# sourceMappingURL=languageSlice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"languageSlice.js","sourceRoot":"","sources":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