@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":"agenda.helpers.js","sourceRoot":"","sources":["../../../../src/components/external/PlanningView/agenda.helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAUH,MAAM,UAAU,cAAc,CAC5B,UAAuB,EACvB,QAAsB;IAEtB,MAAM,MAAM,GAAG,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC7C,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAgB,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,cAAc,CAAC,IAAgB;IACtC,OAAO,EAAC,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAC,CAAC;AACzE,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAmB;IACjD,OAAO,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,UAAU,CAAC,IAAU;IAC5B,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;SAClD,QAAQ,EAAE;SACV,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AACtE,CAAC;AAED,SAAS,OAAO,CAAC,UAAU,EAAE,IAAI;IAC/B,IAAI,IAAI,GAAG,IAAI,IAA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C;IACzB,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;IACzB,OAAO,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export default Scanner;
2
+ declare function Scanner(): any;
@@ -0,0 +1,67 @@
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 { useEffect } from 'react';
19
+ import { DeviceEventEmitter } from 'react-native';
20
+ import { useDispatch } from 'react-redux';
21
+ import { registerBroadcastReceiver } from 'react-native-datawedge-intents';
22
+ import { scanValue, useScannerSelector } from '../../../features/scannerSlice';
23
+ const ean13LabelType = 'LABEL-TYPE-EAN13';
24
+ const KEYS = {
25
+ LABEL_TYPE: 'com.symbol.datawedge.label_type',
26
+ DATA_DISPATCH_TIME: 'com.symbol.datawedge.data_dispatch_time',
27
+ DATA_STRING: 'com.symbol.datawedge.data_string',
28
+ };
29
+ function castIntent(intent) {
30
+ return {
31
+ labelType: intent[KEYS.LABEL_TYPE],
32
+ time: new Date(intent[KEYS.DATA_DISPATCH_TIME]),
33
+ value: intent[KEYS.DATA_STRING],
34
+ };
35
+ }
36
+ const Scanner = () => {
37
+ const { isEnabled } = useScannerSelector();
38
+ const dispatch = useDispatch();
39
+ useEffect(() => {
40
+ registerBroadcastReceiver({
41
+ filterActions: [
42
+ 'com.aosmobile.zebra.ACTION',
43
+ 'com.symbol.datawedge.api.RESULT_ACTION',
44
+ ],
45
+ filterCategories: ['android.intent.category.DEFAULT'],
46
+ });
47
+ }, []);
48
+ useEffect(() => {
49
+ if (isEnabled) {
50
+ const listener = DeviceEventEmitter.addListener('datawedge_broadcast_intent', intent => {
51
+ const { labelType, value } = castIntent(intent);
52
+ if (labelType === ean13LabelType) {
53
+ dispatch(scanValue(value.slice(0, -1)));
54
+ }
55
+ else {
56
+ dispatch(scanValue(value));
57
+ }
58
+ });
59
+ return () => {
60
+ listener.remove();
61
+ };
62
+ }
63
+ }, [dispatch, isEnabled]);
64
+ return null;
65
+ };
66
+ export default Scanner;
67
+ //# sourceMappingURL=Scanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scanner.js","sourceRoot":"","sources":["../../../../src/components/external/Scanner/Scanner.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAChC,OAAO,EAAC,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAChD,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAC,SAAS,EAAE,kBAAkB,EAAC,MAAM,gCAAgC,CAAC;AAE7E,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAE1C,MAAM,IAAI,GAAG;IACX,UAAU,EAAE,iCAAiC;IAC7C,kBAAkB,EAAE,yCAAyC;IAC7D,WAAW,EAAE,kCAAkC;CAChD,CAAC;AAEF,SAAS,UAAU,CAAC,MAAM;IACxB,OAAO;QACL,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;QAClC,IAAI,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC/C,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;KAChC,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,GAAG,GAAG,EAAE;IACnB,MAAM,EAAC,SAAS,EAAC,GAAG,kBAAkB,EAAE,CAAC;IACzC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,SAAS,CAAC,GAAG,EAAE;QACb,yBAAyB,CAAC;YACxB,aAAa,EAAE;gBACb,4BAA4B;gBAC5B,wCAAwC;aACzC;YACD,gBAAgB,EAAE,CAAC,iCAAiC,CAAC;SACtD,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,SAAS,EAAE;YACb,MAAM,QAAQ,GAAG,kBAAkB,CAAC,WAAW,CAC7C,4BAA4B,EAC5B,MAAM,CAAC,EAAE;gBACP,MAAM,EAAC,SAAS,EAAE,KAAK,EAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;gBAC9C,IAAI,SAAS,KAAK,cAAc,EAAE;oBAChC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBACzC;qBAAM;oBACL,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;iBAC5B;YACH,CAAC,CACF,CAAC;YAEF,OAAO,GAAG,EAAE;gBACV,QAAQ,CAAC,MAAM,EAAE,CAAC;YACpB,CAAC,CAAC;SACH;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAE1B,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,18 @@
1
+ interface StopwatchProps {
2
+ startTime: number;
3
+ status: number;
4
+ timerFormat: string;
5
+ disable?: boolean;
6
+ disablePlay?: boolean;
7
+ disablePause?: boolean;
8
+ disableStop?: boolean;
9
+ disableCancel?: boolean;
10
+ hideCancel?: boolean;
11
+ style?: any;
12
+ onPlay: () => void;
13
+ onPause: () => void;
14
+ onStop: () => void;
15
+ onCancel?: () => void;
16
+ }
17
+ declare const Stopwatch: ({ startTime, status, timerFormat, disable, disablePlay, disablePause, disableStop, disableCancel, hideCancel, style, onPlay, onPause, onStop, onCancel, }: StopwatchProps) => JSX.Element;
18
+ export default Stopwatch;
@@ -0,0 +1,114 @@
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, useState } from 'react';
19
+ import { StyleSheet, View } from 'react-native';
20
+ import { Card, Icon, Text, useThemeColor } from '@axelor/aos-mobile-ui';
21
+ import useTranslator from '../../../i18n/hooks/use-translator';
22
+ import { StopwatchType } from '../../../types';
23
+ import { Timer } from '../../external';
24
+ const Stopwatch = ({ startTime = 0, status = StopwatchType.status.Ready, timerFormat, disable = false, disablePlay = false, disablePause = false, disableStop = false, disableCancel = false, hideCancel = false, style, onPlay = () => { }, onPause = () => { }, onStop = () => { }, onCancel = () => { }, }) => {
25
+ const Colors = useThemeColor();
26
+ const I18n = useTranslator();
27
+ const [state, setState] = useState(status);
28
+ const [time, setTime] = useState(startTime);
29
+ const borderStyle = useMemo(() => {
30
+ return getStyles(StopwatchType.getStatusBorderColor(state, Colors)).border;
31
+ }, [Colors, state]);
32
+ const handlePlayBtn = () => {
33
+ setState(StopwatchType.status.InProgress);
34
+ onPlay();
35
+ };
36
+ const handlePauseBtn = () => {
37
+ setState(StopwatchType.status.Paused);
38
+ onPause();
39
+ };
40
+ const handleStopBtn = () => {
41
+ setState(StopwatchType.status.Finished);
42
+ onStop();
43
+ };
44
+ const handleCancelBtn = () => {
45
+ setState(StopwatchType.status.Canceled);
46
+ setTime(0);
47
+ onCancel();
48
+ };
49
+ return (<Card style={[styles.container, borderStyle, style]}>
50
+ <View style={styles.row}>
51
+ <Text style={styles.status}>
52
+ {StopwatchType.getStatus(state, I18n)}
53
+ </Text>
54
+ <Icon name="stopwatch" size={18} style={styles.icon}/>
55
+ </View>
56
+ <View style={styles.row}>
57
+ <View style={styles.btnContainer}>
58
+ {state !== StopwatchType.status.InProgress && (<Icon name="play" size={25} disabled={disable ||
59
+ disablePlay ||
60
+ state === StopwatchType.status.InProgress ||
61
+ state === StopwatchType.status.Finished} touchable={true} onPress={handlePlayBtn} style={styles.btn}/>)}
62
+ {state === StopwatchType.status.InProgress && (<Icon name="pause" size={25} disabled={disable || disablePause} touchable={true} onPress={handlePauseBtn} style={styles.btn}/>)}
63
+ <Icon name="power-off" size={25} disabled={disable ||
64
+ disableStop ||
65
+ state === StopwatchType.status.Ready ||
66
+ state === StopwatchType.status.Finished} touchable={true} onPress={handleStopBtn} style={styles.btn}/>
67
+ {!hideCancel && (<Icon name="undo" size={25} disabled={disable || disableCancel || state === StopwatchType.status.Ready} touchable={true} onPress={handleCancelBtn} style={styles.btn}/>)}
68
+ </View>
69
+ <Timer time={time} onCount={setTime} style={styles.timer} isPaused={state !== StopwatchType.status.InProgress} timerFormat={timerFormat}/>
70
+ </View>
71
+ </Card>);
72
+ };
73
+ const getStyles = color => StyleSheet.create({
74
+ border: {
75
+ borderLeftWidth: 7,
76
+ borderLeftColor: color,
77
+ },
78
+ });
79
+ const styles = StyleSheet.create({
80
+ btn: {
81
+ marginRight: 20,
82
+ },
83
+ btnContainer: {
84
+ width: '60%',
85
+ flex: 1,
86
+ flexDirection: 'row',
87
+ alignItems: 'center',
88
+ justifyContent: 'flex-start',
89
+ },
90
+ container: {
91
+ alignSelf: 'center',
92
+ width: '95%',
93
+ marginHorizontal: 12,
94
+ marginVertical: '30%',
95
+ },
96
+ icon: {
97
+ width: '50%',
98
+ justifyContent: 'flex-end',
99
+ },
100
+ row: {
101
+ width: '100%',
102
+ flexDirection: 'row',
103
+ },
104
+ status: {
105
+ width: '50%',
106
+ fontSize: 14,
107
+ justifyContent: 'flex-start',
108
+ },
109
+ timer: {
110
+ justifyContent: 'flex-end',
111
+ },
112
+ });
113
+ export default Stopwatch;
114
+ //# sourceMappingURL=Stopwatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stopwatch.js","sourceRoot":"","sources":["../../../../src/components/external/Stopwatch/Stopwatch.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACtE,OAAO,aAAa,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAmBrC,MAAM,SAAS,GAAG,CAAC,EACjB,SAAS,GAAG,CAAC,EACb,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,KAAK,EACnC,WAAW,EACX,OAAO,GAAG,KAAK,EACf,WAAW,GAAG,KAAK,EACnB,YAAY,GAAG,KAAK,EACpB,WAAW,GAAG,KAAK,EACnB,aAAa,GAAG,KAAK,EACrB,UAAU,GAAG,KAAK,EAClB,KAAK,EACL,MAAM,GAAG,GAAG,EAAE,GAAE,CAAC,EACjB,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,MAAM,GAAG,GAAG,EAAE,GAAE,CAAC,EACjB,QAAQ,G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M,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,GAAG,EAAE;QACH,WAAW,EAAE,EAAE;KAChB;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,CAAC;QACP,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,YAAY;KAC7B;IACD,SAAS,EAAE;QACT,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,KAAK;QACZ,gBAAgB,EAAE,EAAE;QACpB,cAAc,EAAE,KAAK;KACtB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,KAAK;QACZ,cAAc,EAAE,UAAU;KAC3B;IACD,GAAG,EAAE;QACH,KAAK,EAAE,MAAM;QACb,aAAa,EAAE,KAAK;KACrB;IACD,MAAM,EAAE;QACN,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,EAAE;QACZ,cAAc,EAAE,YAAY;KAC7B;IACD,KAAK,EAAE;QACL,cAAc,EAAE,UAAU;KAC3B;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
@@ -0,0 +1,9 @@
1
+ interface TimerProps {
2
+ time: number;
3
+ timerFormat: string;
4
+ style?: any;
5
+ isPaused?: boolean;
6
+ onCount: (value: any) => void;
7
+ }
8
+ declare function Timer({ style, timerFormat, time, isPaused, onCount, }: TimerProps): JSX.Element;
9
+ export default Timer;
@@ -0,0 +1,60 @@
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, useCallback, useMemo } from 'react';
19
+ import { StyleSheet, View } from 'react-native';
20
+ import { Text, useThemeColor } from '@axelor/aos-mobile-ui';
21
+ import { formatDuration } from '../../../utils/formatters';
22
+ function Timer({ style, timerFormat, time = 0, isPaused = true, onCount, }) {
23
+ const interval = React.useRef(null);
24
+ const Colors = useThemeColor();
25
+ const styles = useMemo(() => {
26
+ return getStyles(Colors);
27
+ }, [Colors]);
28
+ const counterHandle = useCallback(() => {
29
+ if (isNaN(time)) {
30
+ console.warn('Timer: something went wrong');
31
+ return;
32
+ }
33
+ onCount(time + 1000);
34
+ }, [onCount, time]);
35
+ useEffect(() => {
36
+ if (isPaused) {
37
+ return;
38
+ }
39
+ interval.current = setInterval(counterHandle, 1000);
40
+ return () => clearInterval(interval.current);
41
+ }, [counterHandle, isPaused, time]);
42
+ return (<View style={[styles.timer, style]}>
43
+ <Text style={styles.text}>{formatDuration(time, timerFormat)}</Text>
44
+ </View>);
45
+ }
46
+ const getStyles = Colors => StyleSheet.create({
47
+ timer: {
48
+ flexShrink: 1,
49
+ flexDirection: 'row',
50
+ justifyContent: 'center',
51
+ alignItems: 'center',
52
+ },
53
+ text: {
54
+ fontSize: 36,
55
+ fontWeight: 'bold',
56
+ color: Colors.secondaryColor_dark.background,
57
+ },
58
+ });
59
+ export default Timer;
60
+ //# sourceMappingURL=Timer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Timer.js","sourceRoot":"","sources":["../../../../src/components/external/Timer/Timer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,IAAI,EAAE,aAAa,EAAC,MAAM,uBA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EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,SAAS,GAAG,MAAM,CAAC,EAAE,CACzB,UAAU,CAAC,MAAM,CAAC;IAChB,KAAK,EAAE;QACL,UAAU,EAAE,CAAC;QACb,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,MAAM,CAAC,mBAAmB,CAAC,UAAU;KAC7C;CACF,CAAC,CAAC;AAEL,eAAe,KAAK,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { default as Camera } from "./Camera/Camera";
2
+ export { default as CameraScanner } from "./CameraScanner/CameraScanner";
3
+ export { default as PlanningView } from "./PlanningView/PlanningView";
4
+ export { default as Scanner } from "./Scanner/Scanner";
5
+ export { default as Stopwatch } from "./Stopwatch/Stopwatch";
6
+ export { default as Timer } from "./Timer/Timer";
@@ -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
+ export { default as Camera } from './Camera/Camera';
19
+ export { default as CameraScanner } from './CameraScanner/CameraScanner';
20
+ export { default as PlanningView } from './PlanningView/PlanningView';
21
+ export { default as Scanner } from './Scanner/Scanner';
22
+ export { default as Stopwatch } from './Stopwatch/Stopwatch';
23
+ export { default as Timer } from './Timer/Timer';
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/external/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './external';
2
+ export * from './molecules';
3
+ export * from './organisms';
4
+ export * from './templates';
@@ -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 * from './external';
19
+ export * from './molecules';
20
+ export * from './organisms';
21
+ export * from './templates';
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ export default ErrorText;
2
+ declare function ErrorText({ message }: {
3
+ message: any;
4
+ }): JSX.Element;
@@ -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 React from 'react';
19
+ import { StyleSheet } from 'react-native';
20
+ import { Text } from '@axelor/aos-mobile-ui';
21
+ const ErrorText = ({ message }) => {
22
+ return <Text style={styles.text}>{message}</Text>;
23
+ };
24
+ const styles = StyleSheet.create({
25
+ text: {
26
+ color: 'red',
27
+ alignSelf: 'center',
28
+ },
29
+ });
30
+ export default ErrorText;
31
+ //# sourceMappingURL=ErrorText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorText.js","sourceRoot":"","sources":["../../../../src/components/molecules/ErrorText/ErrorText.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,IAAI,EAAC,MAAM,uBAAuB,CAAC;AAE3C,MAAM,SAAS,GAAG,CAAC,EAAC,OAAO,EAAC,EAAE,EAAE;IAC9B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
@@ -0,0 +1,9 @@
1
+ interface HeaderOptionMenuItemProps {
2
+ icon: string;
3
+ FontAwesome5?: boolean;
4
+ indicator?: number;
5
+ hideIf: boolean;
6
+ onPress: () => void;
7
+ }
8
+ declare const HeaderOptionMenuItem: ({ icon, indicator, FontAwesome5, hideIf, onPress, }: HeaderOptionMenuItemProps) => JSX.Element;
9
+ export default HeaderOptionMenuItem;
@@ -0,0 +1,56 @@
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 { StyleSheet, TouchableOpacity } from 'react-native';
20
+ import { Badge, Icon, useThemeColor } from '@axelor/aos-mobile-ui';
21
+ const HeaderOptionMenuItem = ({ icon, indicator = 0, FontAwesome5 = true, hideIf = false, onPress, }) => {
22
+ const Colors = useThemeColor();
23
+ const styles = useMemo(() => getStyles(16), []);
24
+ if (hideIf) {
25
+ return null;
26
+ }
27
+ return (<TouchableOpacity style={styles.container} onPress={onPress} activeOpacity={0.7}>
28
+ <Icon name={icon} FontAwesome5={FontAwesome5} size={22}/>
29
+ {indicator > 0 && (<Badge style={styles.badge} txtStyle={styles.badgeText} color={{
30
+ background_light: Colors.backgroundColor,
31
+ foreground: Colors.text,
32
+ background: Colors.primaryColor.background,
33
+ }} title={indicator}/>)}
34
+ </TouchableOpacity>);
35
+ };
36
+ const getStyles = badgeSize => StyleSheet.create({
37
+ badge: {
38
+ width: badgeSize,
39
+ height: badgeSize,
40
+ borderRadius: Math.ceil(badgeSize / 2),
41
+ position: 'absolute',
42
+ top: -4,
43
+ right: -8,
44
+ zIndex: 10,
45
+ },
46
+ badgeText: {
47
+ fontSize: Math.ceil(badgeSize / 2),
48
+ },
49
+ container: {
50
+ marginRight: 5,
51
+ marginLeft: 15,
52
+ flexDirection: 'row',
53
+ },
54
+ });
55
+ export default HeaderOptionMenuItem;
56
+ //# sourceMappingURL=HeaderOptionMenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderOptionMenuItem.js","sourceRoot":"","sources":["../../../../src/components/molecules/HeaderOptionsMenuItem/HeaderOptionMenuItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAC,KAAK,EAAE,IAAI,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAUjE,MAAM,oBAAoB,GAAG,CAAC,EAC5B,IAAI,EACJ,SAAS,GAAG,CAAC,EACb,YAAY,GAAG,IAAI,EACnB,MAAM,GAAG,KAAK,EACd,OAAO,GACmB,EAAE,EAAE;IAC9B,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAEhD,IAAI,MAAM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AK;KACrB;CACF,CAAC,CAAC;AAEL,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export default IconSettings;
2
+ declare function IconSettings({ onPress }: {
3
+ onPress: any;
4
+ }): JSX.Element;
@@ -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 React from 'react';
19
+ import { StyleSheet } from 'react-native';
20
+ import { Icon, useThemeColor } from '@axelor/aos-mobile-ui';
21
+ const IconSettings = ({ onPress }) => {
22
+ const Colors = useThemeColor();
23
+ return (<Icon name="cog" color={Colors.primaryColor.background} size={24} style={styles.action} touchable={true} onPress={onPress}/>);
24
+ };
25
+ const styles = StyleSheet.create({
26
+ action: {
27
+ margin: 15,
28
+ },
29
+ });
30
+ export default IconSettings;
31
+ //# sourceMappingURL=IconSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconSettings.js","sourceRoot":"","sources":["../../../../src/components/molecules/IconSettings/IconSettings.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,IAAI,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAE1D,MAAM,YAAY,GAAG,CAAC,EAAC,OAAO,EAAC,EAAE,EAAE;IACjC,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,OAAO,CACL,CAAC,IAAI,CACH,IAAI,CAAC,KAAK,CACV,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,CACtC,IAAI,CAAC,CAAC,EAAE,CAAC,CACT,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CACrB,SAAS,CAAC,CAAC,IAAI,CAAC,CAChB,OAAO,CAAC,CAAC,OAAO,CAAC,EACjB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,MAAM,EAAE;QACN,MAAM,EAAE,EAAE;KACX;CACF,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -0,0 +1,7 @@
1
+ export default InputBarCodeCard;
2
+ declare function InputBarCodeCard({ style, scanKeySearch, title, onChange, }: {
3
+ style: any;
4
+ scanKeySearch: any;
5
+ title: any;
6
+ onChange?: () => void;
7
+ }): JSX.Element;
@@ -0,0 +1,84 @@
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, { useState, useEffect, useMemo } from 'react';
19
+ import { StyleSheet, View } from 'react-native';
20
+ import { useDispatch } from 'react-redux';
21
+ import { Card, getCommonStyles, Icon, Input, Text, useThemeColor, } from '@axelor/aos-mobile-ui';
22
+ import { enableScan, useScannedValueByKey, useScannerSelector, } from '../../../features/scannerSlice';
23
+ import { CameraScanner } from '../../external';
24
+ const InputBarCodeCard = ({ style, scanKeySearch, title, onChange = () => { }, }) => {
25
+ const Colors = useThemeColor();
26
+ const [camScan, setCamScan] = useState(false);
27
+ const [scanData, setScanData] = useState(null);
28
+ const [viewCoordinate, setViewCoordinate] = useState(null);
29
+ const [inputData, setInputData] = useState(null);
30
+ const { isEnabled, scanKey } = useScannerSelector();
31
+ const scannedValue = useScannedValueByKey(scanKeySearch);
32
+ const dispatch = useDispatch();
33
+ useEffect(() => {
34
+ if (scannedValue) {
35
+ setInputData(scannedValue);
36
+ onChange(scannedValue);
37
+ }
38
+ else if (scanData != null && scanData.value != null) {
39
+ setCamScan(false);
40
+ setInputData(scanData.value);
41
+ onChange(scanData.value);
42
+ }
43
+ }, [onChange, scanData, scannedValue]);
44
+ const commonStyles = useMemo(() => getCommonStyles(Colors), [Colors]);
45
+ return (<View style={style} onLayout={event => {
46
+ const { x, y } = event.nativeEvent.layout;
47
+ setViewCoordinate({ x: x, y: y });
48
+ }}>
49
+ <CameraScanner isActive={camScan} onScan={setScanData} coordinate={viewCoordinate} onClose={() => setCamScan(false)}/>
50
+ {title && (<View style={styles.titleContainer}>
51
+ <Text style={styles.textImportant}>{title}</Text>
52
+ </View>)}
53
+ <Card style={[
54
+ commonStyles.filter,
55
+ commonStyles.filterAlign,
56
+ styles.container,
57
+ ]}>
58
+ <Input style={styles.inputField} value={inputData} onChange={onChange} onSelection={() => {
59
+ scanKeySearch ? dispatch(enableScan(scanKeySearch)) : undefined;
60
+ }}/>
61
+ <Icon name="qrcode" touchable={true} onPress={() => setCamScan(true)} color={isEnabled && scanKey === scanKeySearch
62
+ ? Colors.primaryColor.background
63
+ : Colors.secondaryColor_dark.background}/>
64
+ </Card>
65
+ </View>);
66
+ };
67
+ const styles = StyleSheet.create({
68
+ container: {
69
+ marginHorizontal: 16,
70
+ paddingRight: 15,
71
+ marginBottom: '3%',
72
+ },
73
+ inputField: {
74
+ width: '90%',
75
+ },
76
+ titleContainer: {
77
+ marginHorizontal: 16,
78
+ },
79
+ textImportant: {
80
+ fontWeight: 'bold',
81
+ },
82
+ });
83
+ export default InputBarCodeCard;
84
+ //# sourceMappingURL=InputBarCodeCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputBarCodeCard.js","sourceRoot":"","sources":["../../../../src/components/molecules/InputBarCodeCard/InputBarCodeCard.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EACL,IAAI,EACJ,eAAe,EACf,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAE7C,MAAM,gBAAgB,GAAG,CAAC,EACxB,KAAK,EACL,aAAa,EACb,KAAK,EACL,QAAQ,GAAG,GAAG,EAAE,GAAE,CAAC,GACpB,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC3D,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjD,M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