@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 @@
1
+ {"version":3,"file":"MenuIconButton.js","sourceRoot":"","sources":["../../../src/navigator/drawer/MenuIconButton.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAChE,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAEhE,MAAM,KAAK,GAAG,EAAE,CAAC;AACjB,MAAM,MAAM,GAAG,EAAE,CAAC;AAClB,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,cAAc,GAAG,KAAK,GAAG,CAAC,CAAC;AAEjC,MAAM,cAAc,GAAG,CAAC,EACtB,KAAK,EACL,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,GACjB,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,OAAO,CACL,CAAC,gBAAgB,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,IAAI,CAAC,CACpB;MAAA,CAAC,IAAI,CACH,KAAK,CAAC,CAAC;YACL,MAAM,CAAC,SAAS;YAChB,EAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,EAAC;YACzD;gBACE,eAAe,EAAE,QAAQ;oBACvB,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,gBAAgB;oBACxC,CAAC,CAAC,KAAK;wBACP,CAAC,CAAC,KAAK;wBACP,CAAC,CAAC,MAAM,CAAC,eAAe;aAC3B;YACD,KAAK;SACN,CAAC,CACF;QAAA,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,EAAE,CAAC,CACT,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CACJ,QAAQ;YACN,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,UAAU;YAClC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,UAAU,CAC1C,EAEL;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,QAAQ,IAAI,CACX,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CACnD;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,IAAI,CAAC,CACR,CACH;IAAA,EAAE,gBAAgB,CAAC,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,MAAM;QACd,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,QAAQ;QACxB,SAAS,EAAE,CAAC;KACb;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,cAAc,CAAC"}
@@ -0,0 +1,8 @@
1
+ export default MenuItem;
2
+ declare function MenuItem({ icon, title, isActive, onPress, disabled }: {
3
+ icon: any;
4
+ title: any;
5
+ isActive: any;
6
+ onPress: any;
7
+ disabled: any;
8
+ }): JSX.Element;
@@ -0,0 +1,71 @@
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, { useMemo } from 'react';
19
+ import { View, StyleSheet, TouchableOpacity } from 'react-native';
20
+ import { Icon, Text, useThemeColor } from '@axelor/aos-mobile-ui';
21
+ const MenuItem = ({ icon, title, isActive, onPress, disabled }) => {
22
+ const Colors = useThemeColor();
23
+ const styles = useMemo(() => getStyles(Colors, disabled), [Colors, disabled]);
24
+ const backgroundColor = useMemo(() => getIndicatorColor(isActive ? Colors.primaryColor.background : Colors.backgroundColor).container, [Colors.backgroundColor, Colors.primaryColor.background, isActive]);
25
+ return (<TouchableOpacity onPress={onPress} disabled={disabled}>
26
+ <View style={[styles.menuItemContainer]}>
27
+ <View style={[styles.menuItemActive, backgroundColor]}/>
28
+ {icon && (<Icon style={styles.menuItemIcon} name={icon} size={24} color={disabled
29
+ ? Colors.secondaryColor.background_light
30
+ : Colors.secondaryColor_dark.background}/>)}
31
+ <View style={styles.menuItemTextContainer}>
32
+ <Text style={styles.menuItemTitle}>{title}</Text>
33
+ </View>
34
+ </View>
35
+ </TouchableOpacity>);
36
+ };
37
+ const getIndicatorColor = color => {
38
+ return StyleSheet.create({
39
+ container: {
40
+ backgroundColor: color,
41
+ },
42
+ });
43
+ };
44
+ const getStyles = (Colors, disabled) => StyleSheet.create({
45
+ menuItemContainer: {
46
+ flexDirection: 'row',
47
+ paddingVertical: 8,
48
+ },
49
+ menuItemActive: {
50
+ width: 7,
51
+ height: 32,
52
+ borderTopRightRadius: 8,
53
+ borderBottomRightRadius: 8,
54
+ },
55
+ menuItemIcon: {
56
+ marginLeft: 12,
57
+ marginRight: 18,
58
+ },
59
+ menuItemTextContainer: {
60
+ flex: 1,
61
+ alignSelf: 'center',
62
+ paddingRight: 16,
63
+ },
64
+ menuItemTitle: {
65
+ fontSize: 16,
66
+ fontWeight: 'bold',
67
+ color: disabled ? Colors.secondaryColor.background_light : Colors.text,
68
+ },
69
+ });
70
+ export default MenuItem;
71
+ //# sourceMappingURL=MenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItem.js","sourceRoot":"","sources":["../../../src/navigator/drawer/MenuItem.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAChE,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAEhE,MAAM,QAAQ,GAAG,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAC,EAAE,EAAE;IAC9D,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE9E,MAAM,eAAe,GAAG,OAAO,CAC7B,GAAG,EAAE,CACH,iBAAiB,CACf,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,CACnE,CAAC,SAAS,EACb,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CACnE,CAAC;IAEF,OAAO,CACL,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,Q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AE,CAAC;KAC3B;IACD,YAAY,EAAE;QACZ,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,EAAE;KAChB;IACD,qBAAqB,EAAE;QACrB,IAAI,EAAE,CAAC;QACP,SAAS,EAAE,QAAQ;QACnB,YAAY,EAAE,EAAE;KACjB;IACD,aAAa,EAAE;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI;KACvE;CACF,CAAC,CAAC;AAEL,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,8 @@
1
+ export function getMenuTitle(menu: any, { I18n }: {
2
+ I18n: any;
3
+ }): any;
4
+ export function isMenuEnabled({ listMenu, menuKey, user }: {
5
+ listMenu: any;
6
+ menuKey: any;
7
+ user: any;
8
+ }): boolean;
@@ -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 { userHaveAccessToConfig } from './roles.helper';
19
+ const userHaveAccessToMenu = ({ menuConfig, user }) => {
20
+ return userHaveAccessToConfig({ config: menuConfig, user: user });
21
+ };
22
+ const areMenusRestricted = ({ listMenu }) => {
23
+ if (listMenu == null || listMenu.length === 0) {
24
+ return false;
25
+ }
26
+ return true;
27
+ };
28
+ const doesMenuHasRestriction = ({ menuConfig }) => {
29
+ if (menuConfig == null) {
30
+ return false;
31
+ }
32
+ return true;
33
+ };
34
+ export const isMenuEnabled = ({ listMenu, menuKey, user }) => {
35
+ if (areMenusRestricted({ listMenu })) {
36
+ const menuConfig = listMenu.find(menu => menu.technicalName === menuKey);
37
+ if (doesMenuHasRestriction({ menuConfig })) {
38
+ return userHaveAccessToMenu({ menuConfig, user });
39
+ }
40
+ return true;
41
+ }
42
+ return true;
43
+ };
44
+ export function getMenuTitle(menu, { I18n }) {
45
+ if (menu.title != null) {
46
+ return I18n.t(menu.title);
47
+ }
48
+ return menu.screen;
49
+ }
50
+ //# sourceMappingURL=menu.helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.helper.js","sourceRoot":"","sources":["../../src/navigator/menu.helper.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,sBAAsB,EAAC,MAAM,gBAAgB,CAAC;AAEtD,MAAM,oBAAoB,GAAG,CAAC,EAAC,UAAU,EAAE,IAAI,EAAC,EAAE,EAAE;IAClD,OAAO,sBAAsB,CAAC,EAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;AAClE,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE;IACxC,IAAI,QAAQ,IAAI,IAAI,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QAC7C,OAAO,KAAK,CAAC;KACd;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE;IAC9C,IAAI,UAAU,IAAI,IAAI,EAAE;QACtB,OAAO,KAAK,CAAC;KACd;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAC,EAAE,EAAE;IACzD,IAAI,kBAAkB,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAE;QAClC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,KAAK,OAAO,CAAC,CAAC;QACzE,IAAI,sBAAsB,CAAC,EAAC,UAAU,EAAC,CAAC,EAAE;YACxC,OAAO,oBAAoB,CAAC,EAAC,UAAU,EAAE,IAAI,EAAC,CAAC,CAAC;SACjD;QACD,OAAO,IAAI,CAAC;KACb;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,IAAI,EAAE,EAAC,IAAI,EAAC;IACvC,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE;QACtB,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3B;IACD,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export function filterAuthorizedModules(modules: any, mobileConfigs: any, user: any): any;
2
+ export function moduleHasMenus(_module: any): boolean;
3
+ export function filterEnabledMenus(_module: any, restrictedMenus: any, user: any): {};
4
+ export function updateAccessibleMenus(_module: any, restrictedMenus: any, user: any): any;
5
+ export function moduleInMenuFooter(_module: any): boolean;
6
+ export function getDefaultModule(modules: any, mainMenu: any): any;
7
+ export function numberOfModules(modules: any): any;
@@ -0,0 +1,95 @@
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 { isMenuEnabled } from './menu.helper';
19
+ import { userHaveAccessToConfig } from './roles.helper';
20
+ export function filterAuthorizedModules(modules, mobileConfigs, user) {
21
+ if (modules == null || mobileConfigs == null || mobileConfigs.length === 0) {
22
+ return modules;
23
+ }
24
+ const authorizedModules = [];
25
+ modules.forEach(_module => {
26
+ const mobileConfigForModule = mobileConfigs?.filter(config => config.sequence === _module.name);
27
+ if (mobileConfigForModule == null || mobileConfigForModule.length === 0) {
28
+ authorizedModules.push(_module);
29
+ }
30
+ else if (mobileConfigForModule[0].isAppEnable) {
31
+ if (mobileConfigForModule[0].authorizedRoles == null ||
32
+ mobileConfigForModule[0].authorizedRoles.length === 0) {
33
+ authorizedModules.push(_module);
34
+ }
35
+ else if (userHaveAccessToConfig({ config: mobileConfigForModule[0], user: user })) {
36
+ authorizedModules.push(_module);
37
+ }
38
+ }
39
+ });
40
+ return authorizedModules;
41
+ }
42
+ export function moduleHasMenus(_module) {
43
+ return _module.menus != null && Object.keys(_module.menus).length > 0;
44
+ }
45
+ export function filterEnabledMenus(_module, restrictedMenus, user) {
46
+ if (moduleHasMenus(_module)) {
47
+ const enabledMenus = {};
48
+ const { menus } = _module;
49
+ const menuKeys = Object.keys(menus);
50
+ menuKeys.forEach(_key => {
51
+ if (isMenuEnabled({ listMenu: restrictedMenus, menuKey: _key, user: user })) {
52
+ enabledMenus[_key] = menus[_key];
53
+ }
54
+ });
55
+ return enabledMenus;
56
+ }
57
+ return [];
58
+ }
59
+ export function updateAccessibleMenus(_module, restrictedMenus, user) {
60
+ return {
61
+ ..._module,
62
+ menus: filterEnabledMenus(_module, restrictedMenus, user),
63
+ };
64
+ }
65
+ export function moduleInMenuFooter(_module) {
66
+ return !!_module?.options?.isInMenuFooter;
67
+ }
68
+ export function getDefaultModule(modules, mainMenu) {
69
+ if (modules == null || modules.length === 0) {
70
+ return null;
71
+ }
72
+ if (mainMenu != null && modulesContainsMenu(modules, mainMenu)) {
73
+ return findModuleWithMenu(modules, mainMenu);
74
+ }
75
+ return firstModulesWithMenus(modules);
76
+ }
77
+ export function numberOfModules(modules) {
78
+ return modules.filter(moduleHasMenus).length;
79
+ }
80
+ function modulesContainsMenu(modules, menuKey) {
81
+ return modules
82
+ .filter(moduleHasMenus)
83
+ .some(_module => _module.menus[menuKey] != null);
84
+ }
85
+ function findModuleWithMenu(modules, menuKey) {
86
+ return modules
87
+ .filter(moduleHasMenus)
88
+ .find(_module => _module.menus[menuKey] != null);
89
+ }
90
+ function firstModulesWithMenus(modules) {
91
+ return modules
92
+ .filter(_module => _module.menus)
93
+ .find(_module => Object.keys(_module.menus).length > 0);
94
+ }
95
+ //# sourceMappingURL=module.helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.helper.js","sourceRoot":"","sources":["../../src/navigator/module.helper.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAC,sBAAsB,EAAC,MAAM,gBAAgB,CAAC;AAEtD,MAAM,UAAU,uBAAuB,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI;IAClE,IAAI,OAAO,IAAI,IAAI,IAAI,aAAa,IAAI,IAAI,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE;QAC1E,OAAO,OAAO,CAAC;KAChB;IACD,MAAM,iBAAiB,GAAG,EAAE,CAAC;IAE7B,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QACxB,MAAM,qBAAqB,GAAG,aAAa,EAAE,MAAM,CACjD,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC,IAAI,CAC3C,CAAC;QAEF,IAAI,qBAAqB,IAAI,IAAI,IAAI,qBAAqB,CAAC,MAAM,KAAK,CAAC,EAAE;YACvE,iBAAiB,CAAC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,qBAAqB,CAAC,OAAO;IACpC,OAAO,OAAO;SACX,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;SAChC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,4 @@
1
+ export function userHaveAccessToConfig({ config, user }: {
2
+ config: any;
3
+ user: any;
4
+ }): boolean;
@@ -0,0 +1,33 @@
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 function userHaveAccessToConfig({ config, user }) {
19
+ const { authorizedRoles } = config;
20
+ const { roles } = user;
21
+ if (authorizedRoles == null ||
22
+ authorizedRoles.length === 0 ||
23
+ roles == null ||
24
+ roles.length === 0) {
25
+ return false;
26
+ }
27
+ const authorizedRoleIds = authorizedRoles.map(_role => _role.id);
28
+ if (roles.some(_role => authorizedRoleIds.includes(_role.id))) {
29
+ return true;
30
+ }
31
+ return false;
32
+ }
33
+ //# sourceMappingURL=roles.helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roles.helper.js","sourceRoot":"","sources":["../../src/navigator/roles.helper.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,UAAU,sBAAsB,CAAC,EAAC,MAAM,EAAE,IAAI,EAAC;IACnD,MAAM,EAAC,eAAe,EAAC,GAAG,MAAM,CAAC;IACjC,MAAM,EAAC,KAAK,EAAC,GAAG,IAAI,CAAC;IAErB,IACE,eAAe,IAAI,IAAI;QACvB,eAAe,CAAC,MAAM,KAAK,CAAC;QAC5B,KAAK,IAAI,IAAI;QACb,KAAK,CAAC,MAAM,KAAK,CAAC,EAClB;QACA,OAAO,KAAK,CAAC;KACd;IAED,MAAM,iBAAiB,GAAG,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACjE,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE;QAC7D,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Action, AnyAction } from '@reduxjs/toolkit';
2
+ import { Dispatch } from 'react';
3
+ import { DefaultRootState } from 'react-redux';
4
+ export declare function useDispatch<A extends Action = AnyAction>(): Dispatch<A>;
5
+ export declare function useSelector(selector: (state: DefaultRootState) => any): any;
@@ -0,0 +1,25 @@
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 { useSelector as useReduxSelector, useDispatch as useReduxDispatch, } from 'react-redux';
19
+ export function useDispatch() {
20
+ return useReduxDispatch();
21
+ }
22
+ export function useSelector(selector) {
23
+ return useReduxSelector(selector);
24
+ }
25
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/redux/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAEL,WAAW,IAAI,gBAAgB,EAC/B,WAAW,IAAI,gBAAgB,GAChC,MAAM,aAAa,CAAC;AAErB,MAAM,UAAU,WAAW;IACzB,OAAO,gBAAgB,EAAE,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAA0C;IACpE,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC"}
@@ -0,0 +1 @@
1
+ export function configGlobalStore(externalReducers: any): import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<any, import("redux").AnyAction, [import("@reduxjs/toolkit").ThunkMiddleware<any, import("redux").AnyAction, undefined>]>;
@@ -0,0 +1,28 @@
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 { configureStore } from '@reduxjs/toolkit';
19
+ import * as coreReducers from '../features';
20
+ export const configGlobalStore = externalReducers => {
21
+ return configureStore({
22
+ reducer: {
23
+ ...coreReducers,
24
+ ...externalReducers,
25
+ },
26
+ });
27
+ };
28
+ //# sourceMappingURL=store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/redux/store.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,YAAY,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,EAAE;IAClD,OAAO,cAAc,CAAC;QACpB,OAAO,EAAE;YACP,GAAG,YAAY;YACf,GAAG,gBAAgB;SACpB;KACF,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ declare const AttachedFilesScreen: ({ route, navigation }: {
2
+ route: any;
3
+ navigation: any;
4
+ }) => JSX.Element;
5
+ export default AttachedFilesScreen;
@@ -0,0 +1,26 @@
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 from 'react';
19
+ import { AttachedFilesView } from '../components';
20
+ const AttachedFilesScreen = ({ route, navigation }) => {
21
+ const { files, model, modelId, screenTitle } = route.params;
22
+ const isStatic = files && files.length > 0;
23
+ return (<AttachedFilesView files={files} model={model} modelId={modelId} screenTitle={screenTitle} navigation={navigation} isStaticList={isStatic} isMetaFile={isStatic}/>);
24
+ };
25
+ export default AttachedFilesScreen;
26
+ //# sourceMappingURL=AttachedFilesScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachedFilesScreen.js","sourceRoot":"","sources":["../../src/screens/AttachedFilesScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAEhD,MAAM,mBAAmB,GAAG,CAAC,EAAC,KAAK,EAAE,UAAU,EAAC,EAAE,EAAE;IAClD,MAAM,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAC1D,MAAM,QAAQ,GAAG,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAE3C,OAAO,CACL,CAAC,iBAAiB,CAChB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,YAAY,CAAC,CAAC,QAAQ,CAAC,CACvB,UAAU,CAAC,CAAC,QAAQ,CAAC,EACrB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default ErrorScreen;
2
+ declare function ErrorScreen({ errorMessage, onReloadPress }: {
3
+ errorMessage: any;
4
+ onReloadPress: any;
5
+ }): JSX.Element;
@@ -0,0 +1,46 @@
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 from 'react';
19
+ import { StyleSheet, ScrollView, Dimensions } from 'react-native';
20
+ import { Text, Screen, Image, Button } from '@axelor/aos-mobile-ui';
21
+ const ErrorScreen = ({ errorMessage, onReloadPress }) => {
22
+ return (<Screen fixedItems={<Button title="RELOAD SCREEN" onPress={onReloadPress}/>}>
23
+ <ScrollView contentContainerStyle={styles.container}>
24
+ <Image resizeMode="contain" source={require('../assets/Logo_Axelor.png')} imageSize={styles.imageContainer} defaultIconSize={80}/>
25
+ <Text style={styles.text}>{errorMessage}</Text>
26
+ </ScrollView>
27
+ </Screen>);
28
+ };
29
+ const styles = StyleSheet.create({
30
+ container: {
31
+ justifyContent: 'center',
32
+ height: Dimensions.get('window').height,
33
+ },
34
+ imageContainer: {
35
+ alignItems: 'center',
36
+ width: '100%',
37
+ height: '15%',
38
+ marginVertical: '15%',
39
+ },
40
+ text: {
41
+ alignSelf: 'center',
42
+ marginHorizontal: 10,
43
+ },
44
+ });
45
+ export default ErrorScreen;
46
+ //# sourceMappingURL=ErrorScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorScreen.js","sourceRoot":"","sources":["../../src/screens/ErrorScreen.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAChE,OAAO,EAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAElE,MAAM,WAAW,GAAG,CAAC,EAAC,YAAY,EAAE,aAAa,EAAC,EAAE,EAAE;IACpD,OAAO,CACL,CAAC,MAAM,CACL,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,EAAG,CAAC,CACrE;MAAA,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAClD;QAAA,CAAC,KAAK,CACJ,UAAU,CAAC,SAAS,CACpB,MAAM,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC,CAC7C,SAAS,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CACjC,eAAe,CAAC,CAAC,EAAE,CAAC,EAEtB;QAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,CAChD;MAAA,EAAE,UAAU,CACd;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,cAAc,EAAE,QAAQ;QACxB,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM;KACxC;IACD,cAAc,EAAE;QACd,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,KAAK;QACb,cAAc,EAAE,KAAK;KACtB;IACD,IAAI,EAAE;QACJ,SAAS,EAAE,QAAQ;QACnB,gBAAgB,EAAE,EAAE;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -0,0 +1,4 @@
1
+ export default LoginScreen;
2
+ declare function LoginScreen({ route }: {
3
+ route: any;
4
+ }): JSX.Element;
@@ -0,0 +1,115 @@
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, { useEffect, useState } from 'react';
19
+ import { ActivityIndicator, StyleSheet, View, Dimensions } from 'react-native';
20
+ import { useThemeColor, Text, Screen, ScrollView } from '@axelor/aos-mobile-ui';
21
+ import { CameraScanner, ErrorText, LoginButton, LogoImage, PasswordInput, UrlInput, UsernameInput, } from '../components';
22
+ import { useDispatch, useSelector } from 'react-redux';
23
+ import { login } from '../features/authSlice';
24
+ import { enableScan, useScannedValueByKey, useScannerSelector, } from '../features/scannerSlice';
25
+ const urlScanKey = 'login_url';
26
+ const LoginScreen = ({ route }) => {
27
+ const { loading, error } = useSelector(state => state.auth);
28
+ const [camScan, setCamScan] = useState(false);
29
+ const [scanData, setScanData] = useState(null);
30
+ const { isEnabled, scanKey } = useScannerSelector();
31
+ const scannedValue = useScannedValueByKey(urlScanKey);
32
+ const appVersion = route?.params?.version;
33
+ const Colors = useThemeColor();
34
+ const dispatch = useDispatch();
35
+ const [url, setUrl] = useState();
36
+ const [username, setUsername] = useState();
37
+ const [password, setPassword] = useState();
38
+ useEffect(() => {
39
+ if (scannedValue) {
40
+ if (scannedValue.includes('username') === true) {
41
+ const parseScannnedData = JSON.parse(scannedValue);
42
+ setUrl(parseScannnedData.url);
43
+ setUsername(parseScannnedData.username);
44
+ }
45
+ else {
46
+ setUrl(scannedValue);
47
+ }
48
+ }
49
+ else if (scanData != null && scanData.value != null) {
50
+ if (scanData.value.includes('username') === true) {
51
+ const parseScannnedData = JSON.parse(scanData.value);
52
+ setUrl(parseScannnedData.url);
53
+ setUsername(parseScannnedData.username);
54
+ setCamScan(false);
55
+ }
56
+ else {
57
+ setUrl(scanData.value);
58
+ setCamScan(false);
59
+ }
60
+ }
61
+ }, [scanData, scannedValue]);
62
+ return (<Screen style={styles.container} fixedItems={<View style={styles.copyright}>
63
+ <Text>{`© 2005 - ${new Date().getFullYear()} Axelor. All rights reserved.`}</Text>
64
+ <Text>{`Version ${appVersion}`}</Text>
65
+ </View>}>
66
+ <CameraScanner isActive={camScan} onScan={setScanData} onClose={() => setCamScan(false)}/>
67
+ <ScrollView>
68
+ <View style={styles.imageContainer}>
69
+ <LogoImage url={url}/>
70
+ </View>
71
+ <UrlInput value={url} onChange={setUrl} readOnly={loading} onScanPress={() => setCamScan(true)} onSelection={() => {
72
+ dispatch(enableScan(urlScanKey));
73
+ }} scanIconColor={isEnabled && scanKey === urlScanKey
74
+ ? Colors.primaryColor.background
75
+ : Colors.secondaryColor_dark.background}/>
76
+ <UsernameInput value={username} onChange={setUsername} readOnly={loading}/>
77
+ <PasswordInput value={password} onChange={setPassword} readOnly={loading}/>
78
+ <View style={styles.buttonContainer}>
79
+ {loading ? (<ActivityIndicator size="large"/>) : (<LoginButton onPress={() => dispatch(login({ url, username, password }))} disabled={loading}/>)}
80
+ </View>
81
+ <View style={styles.errorContainer}>
82
+ {error && <ErrorText message={error.message}/>}
83
+ </View>
84
+ </ScrollView>
85
+ </Screen>);
86
+ };
87
+ const styles = StyleSheet.create({
88
+ container: {
89
+ justifyContent: 'center',
90
+ },
91
+ imageContainer: {
92
+ alignItems: 'center',
93
+ width: '100%',
94
+ height: '15%',
95
+ marginTop: Dimensions.get('window').height < 500 ? '25%' : '50%',
96
+ marginBottom: '10%',
97
+ },
98
+ imageSize: {
99
+ flex: 1,
100
+ },
101
+ buttonContainer: {
102
+ flex: 1,
103
+ },
104
+ errorContainer: {
105
+ flex: 1,
106
+ },
107
+ copyright: {
108
+ alignSelf: 'center',
109
+ alignItems: 'center',
110
+ position: 'absolute',
111
+ bottom: 10,
112
+ },
113
+ });
114
+ export default LoginScreen;
115
+ //# sourceMappingURL=LoginScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoginScreen.js","sourceRoot":"","sources":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AAE;QACf,IAAI,EAAE,CAAC;KACR;IACD,cAAc,EAAE;QACd,IAAI,EAAE,CAAC;KACR;IACD,SAAS,EAAE;QACT,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,QAAQ;QACpB,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,EAAE;KACX;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -0,0 +1,5 @@
1
+ declare const MailMessageScreen: ({ route, navigation }: {
2
+ route: any;
3
+ navigation: any;
4
+ }) => JSX.Element;
5
+ export default MailMessageScreen;