@axelor/aos-mobile-core 8.0.6 → 8.1.0

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 (391) hide show
  1. package/README.md +3 -22
  2. package/lib/api/login-api.js +3 -3
  3. package/lib/api/login-api.js.map +1 -1
  4. package/lib/api/metafile-api.js +1 -1
  5. package/lib/api/metafile-api.js.map +1 -1
  6. package/lib/apiProviders/Standard/ObjectFieldsProvider.d.ts +1 -1
  7. package/lib/apiProviders/Standard/requests.helper.d.ts +1 -0
  8. package/lib/apiProviders/Standard/requests.helper.js +3 -0
  9. package/lib/apiProviders/Standard/requests.helper.js.map +1 -1
  10. package/lib/apiProviders/utils.js +14 -8
  11. package/lib/apiProviders/utils.js.map +1 -1
  12. package/lib/app/Application.d.ts +3 -2
  13. package/lib/app/Application.js +7 -3
  14. package/lib/app/Application.js.map +1 -1
  15. package/lib/app/ContextedApplication.d.ts +2 -3
  16. package/lib/app/ContextedApplication.js +9 -4
  17. package/lib/app/ContextedApplication.js.map +1 -1
  18. package/lib/app/ContextsProvider.d.ts +1 -3
  19. package/lib/app/ContextsProvider.js +26 -15
  20. package/lib/app/ContextsProvider.js.map +1 -1
  21. package/lib/app/RootNavigator.d.ts +3 -4
  22. package/lib/app/RootNavigator.js +4 -5
  23. package/lib/app/RootNavigator.js.map +1 -1
  24. package/lib/app/context.helper.d.ts +3 -3
  25. package/lib/app/context.helper.js +46 -0
  26. package/lib/app/context.helper.js.map +1 -1
  27. package/lib/app/index.d.ts +1 -1
  28. package/lib/app/index.js +1 -0
  29. package/lib/app/index.js.map +1 -1
  30. package/lib/app/modules/ModuleProvider.d.ts +18 -0
  31. package/lib/app/modules/ModuleProvider.js +73 -0
  32. package/lib/app/modules/ModuleProvider.js.map +1 -0
  33. package/lib/app/modules/index.d.ts +2 -0
  34. package/lib/app/modules/index.js +20 -0
  35. package/lib/app/modules/index.js.map +1 -0
  36. package/lib/app/{Module.d.ts → modules/types.d.ts} +5 -2
  37. package/lib/app/{Module.js → modules/types.js} +1 -1
  38. package/lib/app/modules/types.js.map +1 -0
  39. package/lib/auth/api/config-api.d.ts +1 -0
  40. package/lib/auth/api/config-api.js +26 -0
  41. package/lib/auth/api/config-api.js.map +1 -0
  42. package/lib/auth/components/molecules/DashboardsCard/DashboardsCard.d.ts +5 -0
  43. package/lib/auth/components/molecules/DashboardsCard/DashboardsCard.js +49 -0
  44. package/lib/auth/components/molecules/DashboardsCard/DashboardsCard.js.map +1 -0
  45. package/lib/auth/components/molecules/NavigationToolsButton/NavigationToolsButton.d.ts +3 -0
  46. package/lib/auth/components/molecules/NavigationToolsButton/NavigationToolsButton.js +60 -0
  47. package/lib/auth/components/molecules/NavigationToolsButton/NavigationToolsButton.js.map +1 -0
  48. package/lib/auth/components/molecules/ShortcutsCard/ShortcutsCard.d.ts +7 -0
  49. package/lib/auth/components/molecules/ShortcutsCard/ShortcutsCard.js +71 -0
  50. package/lib/auth/components/molecules/ShortcutsCard/ShortcutsCard.js.map +1 -0
  51. package/lib/auth/components/molecules/TranslationsButton/TranslationsButton.d.ts +2 -1
  52. package/lib/auth/components/molecules/TranslationsButton/TranslationsButton.js +5 -3
  53. package/lib/auth/components/molecules/TranslationsButton/TranslationsButton.js.map +1 -1
  54. package/lib/auth/components/molecules/UserCard/UserCard.d.ts +6 -0
  55. package/lib/auth/components/molecules/UserCard/UserCard.js +105 -0
  56. package/lib/auth/components/molecules/UserCard/UserCard.js.map +1 -0
  57. package/lib/auth/components/molecules/index.d.ts +4 -0
  58. package/lib/auth/components/molecules/index.js +4 -0
  59. package/lib/auth/components/molecules/index.js.map +1 -1
  60. package/lib/auth/features/companySlice.d.ts +1 -10
  61. package/lib/auth/features/configSlice.d.ts +3 -11
  62. package/lib/auth/features/configSlice.js +20 -0
  63. package/lib/auth/features/configSlice.js.map +1 -1
  64. package/lib/auth/features/localizationSlice.d.ts +1 -10
  65. package/lib/auth/features/userSlice.d.ts +3 -21
  66. package/lib/auth/i18n/en.json +3 -1
  67. package/lib/auth/i18n/fr.json +3 -1
  68. package/lib/auth/index.d.ts +1 -1
  69. package/lib/auth/models/objectFields.js +4 -1
  70. package/lib/auth/models/objectFields.js.map +1 -1
  71. package/lib/auth/screens/SettingsScreen.d.ts +2 -1
  72. package/lib/auth/screens/SettingsScreen.js +45 -13
  73. package/lib/auth/screens/SettingsScreen.js.map +1 -1
  74. package/lib/auth/screens/UserScreen.d.ts +2 -1
  75. package/lib/auth/screens/UserScreen.js +18 -75
  76. package/lib/auth/screens/UserScreen.js.map +1 -1
  77. package/lib/components/external/Camera/Camera.d.ts +2 -1
  78. package/lib/components/external/Camera/Camera.js +49 -64
  79. package/lib/components/external/Camera/Camera.js.map +1 -1
  80. package/lib/components/external/Camera/CaptureButton.d.ts +1 -1
  81. package/lib/components/external/Camera/CaptureButton.js.map +1 -1
  82. package/lib/components/external/CodeHighlighter/CodeHighlighter.d.ts +2 -1
  83. package/lib/components/external/PlanningView/PlanningView.d.ts +1 -1
  84. package/lib/components/external/Stopwatch/Stopwatch.d.ts +2 -1
  85. package/lib/components/external/Timer/Timer.d.ts +2 -2
  86. package/lib/components/external/Toast/Toast.d.ts +2 -1
  87. package/lib/components/external/WebView/WebView.d.ts +9 -0
  88. package/lib/components/external/WebView/WebView.js +52 -0
  89. package/lib/components/external/WebView/WebView.js.map +1 -0
  90. package/lib/components/external/index.d.ts +1 -1
  91. package/lib/components/external/index.js +1 -1
  92. package/lib/components/external/index.js.map +1 -1
  93. package/lib/components/molecules/CameraButton/CameraButton.d.ts +2 -1
  94. package/lib/components/molecules/DateDisplay/DateDisplay.d.ts +2 -1
  95. package/lib/components/molecules/DatePicker/DatePicker.d.ts +2 -1
  96. package/lib/components/molecules/FocusScreen/FocusScreen.d.ts +2 -1
  97. package/lib/components/molecules/HeaderBand/HeaderBand.d.ts +2 -1
  98. package/lib/components/molecules/HeaderBand/HeaderBand.js +31 -8
  99. package/lib/components/molecules/HeaderBand/HeaderBand.js.map +1 -1
  100. package/lib/components/molecules/HeaderOptionsMenuItem/HeaderOptionMenuItem.d.ts +2 -2
  101. package/lib/components/molecules/InputBarCodeCard/InputBarCodeCard.d.ts +2 -1
  102. package/lib/components/molecules/MailMessageReadIcon/MailMessageReadIcon.d.ts +2 -1
  103. package/lib/components/molecules/PeriodDisplay/PeriodDisplay.d.ts +2 -1
  104. package/lib/components/molecules/TrackItem/TrackItem.d.ts +2 -1
  105. package/lib/components/molecules/UploadFileInput/UploadFileInput.d.ts +2 -1
  106. package/lib/components/organisms/AOSImage/AOSImage.d.ts +2 -1
  107. package/lib/components/organisms/AOSImageBubble/AOSImageBubble.d.ts +2 -1
  108. package/lib/components/organisms/AnomalyBubble/AnomalyBubble.d.ts +2 -1
  109. package/lib/components/organisms/AnomalyList/AnomalyList.d.ts +2 -1
  110. package/lib/components/organisms/DateInput/DateInput.d.ts +2 -1
  111. package/lib/components/organisms/HeaderBandList/HeaderBandList.d.ts +2 -1
  112. package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.d.ts +2 -1
  113. package/lib/components/organisms/MailMessageCard/MailMessageCard.d.ts +2 -1
  114. package/lib/components/organisms/MailMessageCommentCard/MailMessageCommentCard.d.ts +2 -1
  115. package/lib/components/organisms/MailMessageNotificationCard/MailMessageNotificationCard.d.ts +2 -1
  116. package/lib/components/organisms/ScannerAutocompleteSearch/ScannerAutocompleteSearch.d.ts +2 -1
  117. package/lib/components/organisms/SignatureInput/PictureIcon.d.ts +9 -0
  118. package/lib/components/organisms/SignatureInput/PictureIcon.js +35 -0
  119. package/lib/components/organisms/SignatureInput/PictureIcon.js.map +1 -0
  120. package/lib/components/organisms/SignatureInput/SignatureInput.d.ts +16 -0
  121. package/lib/components/organisms/SignatureInput/SignatureInput.js +197 -0
  122. package/lib/components/organisms/SignatureInput/SignatureInput.js.map +1 -0
  123. package/lib/components/organisms/index.d.ts +1 -0
  124. package/lib/components/organisms/index.js +1 -0
  125. package/lib/components/organisms/index.js.map +1 -1
  126. package/lib/components/pages/CustomFieldForm/CustomFieldForm.d.ts +2 -1
  127. package/lib/components/pages/CustomFieldForm/CustomFieldForm.js +8 -6
  128. package/lib/components/pages/CustomFieldForm/CustomFieldForm.js.map +1 -1
  129. package/lib/components/pages/FormView/Alerts/ConfirmationPopup.d.ts +7 -0
  130. package/lib/components/pages/FormView/Alerts/ConfirmationPopup.js +45 -0
  131. package/lib/components/pages/FormView/Alerts/ConfirmationPopup.js.map +1 -0
  132. package/lib/components/pages/FormView/Alerts/ConstraintsValidatorPopup.d.ts +2 -1
  133. package/lib/components/pages/FormView/Alerts/index.d.ts +1 -0
  134. package/lib/components/pages/FormView/Alerts/index.js +1 -0
  135. package/lib/components/pages/FormView/Alerts/index.js.map +1 -1
  136. package/lib/components/pages/FormView/Buttons/FloatingTools.d.ts +14 -0
  137. package/lib/components/pages/FormView/Buttons/FloatingTools.js +103 -0
  138. package/lib/components/pages/FormView/Buttons/FloatingTools.js.map +1 -0
  139. package/lib/components/pages/FormView/Buttons/index.d.ts +1 -0
  140. package/lib/components/pages/FormView/Buttons/index.js +19 -0
  141. package/lib/components/pages/FormView/Buttons/index.js.map +1 -0
  142. package/lib/components/pages/FormView/Components/Field.d.ts +3 -1
  143. package/lib/components/pages/FormView/Components/Field.js +14 -6
  144. package/lib/components/pages/FormView/Components/Field.js.map +1 -1
  145. package/lib/components/pages/FormView/Components/Panel.d.ts +2 -2
  146. package/lib/components/pages/FormView/Custom/CustomButton.d.ts +2 -1
  147. package/lib/components/pages/FormView/Custom/CustomPasswordInput.d.ts +2 -1
  148. package/lib/components/pages/FormView/Custom/CustomPicker.d.ts +2 -1
  149. package/lib/components/pages/FormView/Custom/CustomSearchBar.d.ts +2 -1
  150. package/lib/components/pages/FormView/FormView.d.ts +6 -2
  151. package/lib/components/pages/FormView/FormView.js +96 -119
  152. package/lib/components/pages/FormView/FormView.js.map +1 -1
  153. package/lib/components/templates/AttachedFilesView/AttachedFilesView.d.ts +5 -2
  154. package/lib/components/templates/AttachedFilesView/AttachedFilesView.js +2 -2
  155. package/lib/components/templates/AttachedFilesView/AttachedFilesView.js.map +1 -1
  156. package/lib/components/templates/MailMessageView/MailMessageView.d.ts +5 -2
  157. package/lib/components/templates/MailMessageView/MailMessageView.js +2 -2
  158. package/lib/components/templates/MailMessageView/MailMessageView.js.map +1 -1
  159. package/lib/components/templates/PeriodInput/PeriodInput.d.ts +15 -0
  160. package/lib/components/templates/PeriodInput/PeriodInput.js +85 -0
  161. package/lib/components/templates/PeriodInput/PeriodInput.js.map +1 -0
  162. package/lib/components/templates/PopupApplicationInformation/PopupApplicationInformation.d.ts +2 -1
  163. package/lib/components/templates/PopupMinimalRequiredVersion/PopupMinimalRequiredVersion.d.ts +2 -1
  164. package/lib/components/templates/SearchListView/SearchListView.d.ts +27 -0
  165. package/lib/components/templates/SearchListView/SearchListView.js +81 -0
  166. package/lib/components/templates/SearchListView/SearchListView.js.map +1 -0
  167. package/lib/components/templates/SearchTreeView/SearchTreeView.d.ts +38 -0
  168. package/lib/components/templates/SearchTreeView/SearchTreeView.js +110 -0
  169. package/lib/components/templates/SearchTreeView/SearchTreeView.js.map +1 -0
  170. package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.d.ts +2 -1
  171. package/lib/components/templates/UserSearchBar/UserSearchBar.d.ts +2 -1
  172. package/lib/components/templates/index.d.ts +3 -0
  173. package/lib/components/templates/index.js +3 -0
  174. package/lib/components/templates/index.js.map +1 -1
  175. package/lib/dashboards/api.helpers.d.ts +1 -0
  176. package/lib/dashboards/api.helpers.js +5 -0
  177. package/lib/dashboards/api.helpers.js.map +1 -1
  178. package/lib/dashboards/component/AOPChart/AOPChart.d.ts +6 -0
  179. package/lib/dashboards/component/AOPChart/AOPChart.js +67 -0
  180. package/lib/dashboards/component/AOPChart/AOPChart.js.map +1 -0
  181. package/lib/dashboards/component/AOPChart/api.helpers.d.ts +16 -0
  182. package/lib/dashboards/component/AOPChart/api.helpers.js +59 -0
  183. package/lib/dashboards/component/AOPChart/api.helpers.js.map +1 -0
  184. package/lib/dashboards/component/AOPChart/format.helpers.d.ts +11 -0
  185. package/lib/dashboards/component/AOPChart/format.helpers.js +47 -0
  186. package/lib/dashboards/component/AOPChart/format.helpers.js.map +1 -0
  187. package/lib/dashboards/component/RefreshChart/RefreshChart.d.ts +8 -0
  188. package/lib/dashboards/component/RefreshChart/RefreshChart.js +83 -0
  189. package/lib/dashboards/component/RefreshChart/RefreshChart.js.map +1 -0
  190. package/lib/dashboards/component/index.d.ts +2 -0
  191. package/lib/dashboards/component/index.js +20 -0
  192. package/lib/dashboards/component/index.js.map +1 -0
  193. package/lib/dashboards/index.d.ts +2 -0
  194. package/lib/dashboards/index.js +20 -0
  195. package/lib/dashboards/index.js.map +1 -0
  196. package/lib/dashboards/menu.helpers.d.ts +1 -24
  197. package/lib/dashboards/menu.helpers.js +0 -9
  198. package/lib/dashboards/menu.helpers.js.map +1 -1
  199. package/lib/dashboards/view/DashboardScreen.d.ts +7 -3
  200. package/lib/dashboards/view/DashboardScreen.js +4 -65
  201. package/lib/dashboards/view/DashboardScreen.js.map +1 -1
  202. package/lib/dashboards/view/DashboardView.d.ts +10 -0
  203. package/lib/dashboards/view/DashboardView.js +87 -0
  204. package/lib/dashboards/view/DashboardView.js.map +1 -0
  205. package/lib/dashboards/view/index.d.ts +1 -0
  206. package/lib/dashboards/view/index.js +1 -0
  207. package/lib/dashboards/view/index.js.map +1 -1
  208. package/lib/features/appConfigSlice.d.ts +1 -10
  209. package/lib/features/attachedFilesSlice.d.ts +3 -30
  210. package/lib/features/authSlice.d.ts +39 -34
  211. package/lib/features/authSlice.js +7 -2
  212. package/lib/features/authSlice.js.map +1 -1
  213. package/lib/features/formSlice.d.ts +5 -31
  214. package/lib/features/formSlice.js +10 -1
  215. package/lib/features/formSlice.js.map +1 -1
  216. package/lib/features/index.d.ts +2 -0
  217. package/lib/features/index.js +2 -0
  218. package/lib/features/index.js.map +1 -1
  219. package/lib/features/mailMessageSlice.d.ts +8 -80
  220. package/lib/features/metaJsonFieldSlice.d.ts +5 -30
  221. package/lib/features/metaJsonFieldSlice.js +14 -1
  222. package/lib/features/metaJsonFieldSlice.js.map +1 -1
  223. package/lib/features/metaModuleSlice.d.ts +1 -10
  224. package/lib/features/metafileSlice.d.ts +1 -10
  225. package/lib/features/mobileDashboardSlice.d.ts +1 -10
  226. package/lib/features/mobileWebViewSlice.d.ts +4 -0
  227. package/lib/features/mobileWebViewSlice.js +43 -0
  228. package/lib/features/mobileWebViewSlice.js.map +1 -0
  229. package/lib/features/onlineSlice.d.ts +3 -3
  230. package/lib/features/permissionSlice.d.ts +6 -0
  231. package/lib/features/permissionSlice.js +59 -0
  232. package/lib/features/permissionSlice.js.map +1 -0
  233. package/lib/features/userSlice.d.ts +1 -10
  234. package/lib/forms/action.helpers.d.ts +3 -0
  235. package/lib/forms/action.helpers.js +106 -0
  236. package/lib/forms/action.helpers.js.map +1 -0
  237. package/lib/forms/api.helpers.d.ts +4 -0
  238. package/lib/forms/api.helpers.js +13 -0
  239. package/lib/forms/api.helpers.js.map +1 -1
  240. package/lib/forms/display.helpers.d.ts +1 -2
  241. package/lib/forms/display.helpers.js +2 -19
  242. package/lib/forms/display.helpers.js.map +1 -1
  243. package/lib/forms/index.d.ts +1 -0
  244. package/lib/forms/index.js +1 -0
  245. package/lib/forms/index.js.map +1 -1
  246. package/lib/forms/studio/api.helpers.d.ts +3 -0
  247. package/lib/forms/studio/api.helpers.js +26 -0
  248. package/lib/forms/studio/api.helpers.js.map +1 -1
  249. package/lib/forms/studio/display.helpers.d.ts +2 -1
  250. package/lib/forms/studio/display.helpers.js +10 -4
  251. package/lib/forms/studio/display.helpers.js.map +1 -1
  252. package/lib/forms/studio/index.d.ts +1 -0
  253. package/lib/forms/studio/index.js +1 -0
  254. package/lib/forms/studio/index.js.map +1 -1
  255. package/lib/forms/studio/permission.helpers.d.ts +3 -0
  256. package/lib/forms/studio/permission.helpers.js +59 -0
  257. package/lib/forms/studio/permission.helpers.js.map +1 -0
  258. package/lib/forms/types.d.ts +9 -5
  259. package/lib/header/HeaderBandContext.d.ts +2 -1
  260. package/lib/i18n/component/Translator.d.ts +19 -3
  261. package/lib/i18n/translations/en.json +17 -2
  262. package/lib/i18n/translations/fr.json +17 -2
  263. package/lib/index.d.ts +3 -0
  264. package/lib/index.js +3 -0
  265. package/lib/index.js.map +1 -1
  266. package/lib/models/objectFields.js +17 -0
  267. package/lib/models/objectFields.js.map +1 -1
  268. package/lib/navigator/NavigationInformationsProvider.d.ts +33 -0
  269. package/lib/navigator/NavigationInformationsProvider.js +81 -0
  270. package/lib/navigator/NavigationInformationsProvider.js.map +1 -0
  271. package/lib/navigator/Navigator.d.ts +2 -4
  272. package/lib/navigator/Navigator.js +32 -11
  273. package/lib/navigator/Navigator.js.map +1 -1
  274. package/lib/navigator/drawer/AuthMenuIconButton.d.ts +2 -1
  275. package/lib/navigator/drawer/BackIcon.d.ts +2 -1
  276. package/lib/navigator/drawer/DrawerContent.d.ts +3 -3
  277. package/lib/navigator/drawer/DrawerContent.js +3 -2
  278. package/lib/navigator/drawer/DrawerContent.js.map +1 -1
  279. package/lib/navigator/drawer/DrawerToggleButton.d.ts +2 -1
  280. package/lib/navigator/drawer/Header.d.ts +2 -1
  281. package/lib/navigator/drawer/Menu.d.ts +2 -1
  282. package/lib/navigator/drawer/MenuIconButton.d.ts +2 -1
  283. package/lib/navigator/drawer/MenuItem.d.ts +2 -1
  284. package/lib/navigator/drawer/MenuItemEntry.d.ts +2 -1
  285. package/lib/navigator/drawer/MenuSeparator.d.ts +2 -1
  286. package/lib/navigator/drawer/MenuTitle.d.ts +2 -1
  287. package/lib/navigator/drawer/SubMenuItem.d.ts +2 -1
  288. package/lib/navigator/drawer/SubMenuItemList.d.ts +2 -1
  289. package/lib/navigator/menu.helper.d.ts +4 -0
  290. package/lib/navigator/menu.helper.js +21 -0
  291. package/lib/navigator/menu.helper.js.map +1 -1
  292. package/lib/navigator/module.helper.d.ts +1 -2
  293. package/lib/navigator/module.helper.js.map +1 -1
  294. package/lib/permissions/api.helpers.d.ts +6 -0
  295. package/lib/permissions/api.helpers.js +64 -0
  296. package/lib/permissions/api.helpers.js.map +1 -0
  297. package/lib/permissions/format.helpers.d.ts +5 -0
  298. package/lib/permissions/format.helpers.js +81 -0
  299. package/lib/permissions/format.helpers.js.map +1 -0
  300. package/lib/permissions/hooks.d.ts +14 -0
  301. package/lib/permissions/hooks.js +97 -0
  302. package/lib/permissions/hooks.js.map +1 -0
  303. package/lib/permissions/index.d.ts +1 -0
  304. package/lib/permissions/index.js +19 -0
  305. package/lib/permissions/index.js.map +1 -0
  306. package/lib/permissions/type.helpers.d.ts +30 -0
  307. package/lib/permissions/type.helpers.js +34 -0
  308. package/lib/permissions/type.helpers.js.map +1 -0
  309. package/lib/redux/hooks.d.ts +2 -4
  310. package/lib/redux/hooks.js.map +1 -1
  311. package/lib/redux/store.d.ts +3 -1
  312. package/lib/screens/AttachedFilesScreen.d.ts +2 -1
  313. package/lib/screens/BarcodeDisplayScreen.d.ts +2 -1
  314. package/lib/screens/ErrorScreen.d.ts +2 -1
  315. package/lib/screens/JsonFieldScreen.d.ts +2 -1
  316. package/lib/screens/LoginScreen.d.ts +2 -1
  317. package/lib/screens/LoginScreen.js +1 -2
  318. package/lib/screens/LoginScreen.js.map +1 -1
  319. package/lib/screens/MailMessageScreen.d.ts +2 -1
  320. package/lib/screens/SessionManagementScreen.d.ts +2 -1
  321. package/lib/screens/SessionManagementScreen.js +2 -1
  322. package/lib/screens/SessionManagementScreen.js.map +1 -1
  323. package/lib/selections/SelectionProvider.d.ts +4 -0
  324. package/lib/selections/SelectionProvider.js +79 -0
  325. package/lib/selections/SelectionProvider.js.map +1 -0
  326. package/lib/selections/api.helpers.d.ts +3 -0
  327. package/lib/selections/api.helpers.js +31 -0
  328. package/lib/selections/api.helpers.js.map +1 -0
  329. package/lib/selections/format.helpers.d.ts +6 -0
  330. package/lib/selections/format.helpers.js +41 -0
  331. package/lib/selections/format.helpers.js.map +1 -0
  332. package/lib/selections/hooks.d.ts +8 -0
  333. package/lib/selections/hooks.js +93 -0
  334. package/lib/selections/hooks.js.map +1 -0
  335. package/lib/selections/index.d.ts +3 -0
  336. package/lib/selections/index.js +21 -0
  337. package/lib/selections/index.js.map +1 -0
  338. package/lib/selections/types.d.ts +61 -0
  339. package/lib/selections/types.js +19 -0
  340. package/lib/selections/types.js.map +1 -0
  341. package/lib/sessions/components/alerts/PopupCreateSession.d.ts +2 -1
  342. package/lib/sessions/components/alerts/PopupCreateSession.js +2 -2
  343. package/lib/sessions/components/alerts/PopupCreateSession.js.map +1 -1
  344. package/lib/sessions/components/alerts/PopupEditSession.d.ts +2 -1
  345. package/lib/sessions/components/alerts/PopupSession.d.ts +2 -1
  346. package/lib/sessions/components/alerts/PopupSession.js +1 -0
  347. package/lib/sessions/components/alerts/PopupSession.js.map +1 -1
  348. package/lib/sessions/components/display/LogoImage.d.ts +2 -1
  349. package/lib/sessions/components/display/SessionCard.d.ts +2 -1
  350. package/lib/sessions/components/display/SessionListCard.d.ts +2 -1
  351. package/lib/sessions/components/error/ErrorText.d.ts +2 -1
  352. package/lib/sessions/components/inputs/DefaultCheckbox.d.ts +2 -1
  353. package/lib/sessions/components/inputs/PasswordInput.d.ts +2 -1
  354. package/lib/sessions/components/inputs/SessionInputs.d.ts +2 -1
  355. package/lib/sessions/components/inputs/SessionInputs.js +2 -2
  356. package/lib/sessions/components/inputs/SessionInputs.js.map +1 -1
  357. package/lib/sessions/components/inputs/SessionNameInput.d.ts +2 -1
  358. package/lib/sessions/components/inputs/UrlInput.d.ts +2 -1
  359. package/lib/sessions/components/inputs/UsernameInput.d.ts +2 -1
  360. package/lib/tools/FilePicker.d.ts +1 -1
  361. package/lib/tools/FilePicker.js +12 -14
  362. package/lib/tools/FilePicker.js.map +1 -1
  363. package/lib/tools/LinkingProvider.d.ts +5 -0
  364. package/lib/tools/LinkingProvider.js +8 -1
  365. package/lib/tools/LinkingProvider.js.map +1 -1
  366. package/lib/tools/index.d.ts +1 -0
  367. package/lib/tools/index.js +1 -0
  368. package/lib/tools/index.js.map +1 -1
  369. package/lib/tools/linking.helper.d.ts +5 -0
  370. package/lib/tools/linking.helper.js +12 -0
  371. package/lib/tools/linking.helper.js.map +1 -1
  372. package/lib/webViews/api.helpers.d.ts +4 -0
  373. package/lib/webViews/api.helpers.js +29 -0
  374. package/lib/webViews/api.helpers.js.map +1 -0
  375. package/lib/webViews/display.helpers.d.ts +1 -0
  376. package/lib/webViews/display.helpers.js +21 -0
  377. package/lib/webViews/display.helpers.js.map +1 -0
  378. package/lib/webViews/menu.helper.d.ts +29 -0
  379. package/lib/webViews/menu.helper.js +77 -0
  380. package/lib/webViews/menu.helper.js.map +1 -0
  381. package/lib/webViews/view/WebViewScreen.d.ts +8 -0
  382. package/lib/webViews/view/WebViewScreen.js +68 -0
  383. package/lib/webViews/view/WebViewScreen.js.map +1 -0
  384. package/lib/webViews/view/index.d.ts +1 -0
  385. package/lib/webViews/view/index.js +19 -0
  386. package/lib/webViews/view/index.js.map +1 -0
  387. package/package.json +51 -60
  388. package/lib/app/Module.js.map +0 -1
  389. package/lib/components/external/CameraScanner/CameraScanner.d.ts +0 -2
  390. package/lib/components/external/CameraScanner/CameraScanner.js +0 -88
  391. package/lib/components/external/CameraScanner/CameraScanner.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"context.helper.js","sourceRoot":"","sources":["../../src/app/context.helper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAS,KAAK,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,KAAK,CAAC;AAGlD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,YAA0B,EAC1B,aAA2B,EAC3B,EAAE;IACF,MAAM,MAAM,GAAiB,EAAC,GAAG,YAAY,EAAC,CAAC;IAC/C,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAE3C,MAAM,UAAU,GAAG,MA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E,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,KAAK,CAAC,KAAK,GAAG,CAC1D;qBACF,CAAC;iBACH;YACH,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,IAAI,CAAC;gBACV,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,WAAW,EAAE,KAAK,CAAC,WAAW;gBAC9B,MAAM;aACP,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;KACJ;SAAM;QACL,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KAC/B;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAc,EAAE,OAAe,EAAU,EAAE;IACzE,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;IAE/B,OAAO;QACL,YAAY,EAAE,MAAM,EAAE,YAAY;YAChC,CAAC,CAAC,qBAAqB,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;YACjE,CAAC,CAAC,MAAM,CAAC,YAAY;QACvB,UAAU,EAAE,MAAM,EAAE,UAAU;YAC5B,CAAC,CAAC,mBAAmB,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;YAC3D,CAAC,CAAC,MAAM,CAAC,UAAU;QACrB,YAAY,EAAE,MAAM,EAAE,YAAY;YAChC,CAAC,CAAC,qBAAqB,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;YACjE,CAAC,CAAC,MAAM,CAAC,YAAY;QACvB,WAAW,EAAE,MAAM,EAAE,WAAW;YAC9B,CAAC,CAAC,oBAAoB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC;YAC9D,CAAC,CAAC,MAAM,CAAC,WAAW;KACvB,CAAC;AACJ,CAAC,CAAC"}
@@ -2,5 +2,5 @@ export { default as Application } from './Application';
2
2
  export { default as ContextedApplication } from './ContextedApplication';
3
3
  export { default as ContextsProvider } from './ContextsProvider';
4
4
  export { schemaContructor } from './module-generation.helper';
5
- export { Menu, Models, Module, ObjectFields, Screen, SearchFields, SortFields, } from './Module';
5
+ export * from './modules';
6
6
  export { default as RootNavigator } from './RootNavigator';
package/lib/app/index.js CHANGED
@@ -19,5 +19,6 @@ export { default as Application } from './Application';
19
19
  export { default as ContextedApplication } from './ContextedApplication';
20
20
  export { default as ContextsProvider } from './ContextsProvider';
21
21
  export { schemaContructor } from './module-generation.helper';
22
+ export * from './modules';
22
23
  export { default as RootNavigator } from './RootNavigator';
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAC;AAU5D,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAC;AAC5D,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { Module } from './types';
2
+ declare class ModuleProvider {
3
+ private modules;
4
+ private refreshCallBack;
5
+ constructor();
6
+ init(_modules: Module[]): void;
7
+ registerCallback(callBack: Function): void;
8
+ unregisterCallback(callBack: Function): void;
9
+ registerModule(_module: Module): void;
10
+ getModules(): Module[];
11
+ private updateState;
12
+ }
13
+ export declare const modulesProvider: ModuleProvider;
14
+ export declare const useModules: () => {
15
+ modules: Module[];
16
+ checkModule: (name: string) => boolean;
17
+ };
18
+ export {};
@@ -0,0 +1,73 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 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, useMemo, useState } from 'react';
19
+ class ModuleProvider {
20
+ modules;
21
+ refreshCallBack;
22
+ constructor() {
23
+ this.modules = [];
24
+ this.refreshCallBack = [];
25
+ }
26
+ init(_modules) {
27
+ this.modules = _modules ?? [];
28
+ this.updateState();
29
+ }
30
+ registerCallback(callBack) {
31
+ this.refreshCallBack.push(callBack);
32
+ }
33
+ unregisterCallback(callBack) {
34
+ this.refreshCallBack = this.refreshCallBack.filter(_f => _f !== callBack);
35
+ }
36
+ registerModule(_module) {
37
+ if (this.modules.find(({ name }) => name === _module.name) == null) {
38
+ this.modules = [...this.modules, _module];
39
+ }
40
+ else {
41
+ this.modules = this.modules.map(_m => {
42
+ if (_m.name === _module.name) {
43
+ return _module;
44
+ }
45
+ else {
46
+ return _m;
47
+ }
48
+ });
49
+ }
50
+ this.updateState();
51
+ }
52
+ getModules() {
53
+ return this.modules;
54
+ }
55
+ updateState() {
56
+ this.refreshCallBack.forEach(_f => _f(this.modules));
57
+ }
58
+ }
59
+ export const modulesProvider = new ModuleProvider();
60
+ export const useModules = () => {
61
+ const [modules, setModules] = useState(modulesProvider.getModules());
62
+ useEffect(() => {
63
+ modulesProvider.registerCallback(data => setModules([...data]));
64
+ return () => {
65
+ modulesProvider.unregisterCallback(setModules);
66
+ };
67
+ }, []);
68
+ return useMemo(() => ({
69
+ modules,
70
+ checkModule: moduleName => modules.find(({ name }) => name === moduleName) != null,
71
+ }), [modules]);
72
+ };
73
+ //# sourceMappingURL=ModuleProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModuleProvider.js","sourceRoot":"","sources":["../../../src/app/modules/ModuleProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAGnD,MAAM,cAAc;IACV,OAAO,CAAW;IAClB,eAAe,CAAa;IAEpC;QACE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,IAAI,CAAC,QAAkB;QACrB,IAAI,CAAC,OAAO,GAAG,QAAQ,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAED,gBAAgB,CAAC,QAAkB;QACjC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,kBAAkB,CAAC,QAAkB;QACnC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC;IAC5E,CAAC;IAED,cAAc,CAAC,O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,CACZ,GAAG,EAAE,CAAC,CAAC;QACL,OAAO;QACP,WAAW,EAAE,UAAU,CAAC,EAAE,CACxB,OAAO,CAAC,IAAI,CAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAE,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,IAAI;KACxD,CAAC,EACF,CAAC,OAAO,CAAC,CACV,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './ModuleProvider';
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 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 './types';
19
+ export * from './ModuleProvider';
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app/modules/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC"}
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { Reducer } from '@reduxjs/toolkit';
3
3
  import { Schema } from 'yup';
4
- import { FormConfigs } from '../forms/types';
4
+ import { FormConfigs } from '../../forms/types';
5
+ import { ModuleSelections } from '../../selections';
5
6
  interface MinimumMenuFields {
6
7
  title: string;
7
8
  hideIf?: (storeState: any) => boolean;
@@ -21,7 +22,7 @@ interface MenuWithScreen extends MenuBase {
21
22
  }
22
23
  export interface SubMenu extends MenuWithScreen {
23
24
  }
24
- interface MenuWithSubMenus extends MenuBase {
25
+ export interface MenuWithSubMenus extends MenuBase {
25
26
  subMenus: {
26
27
  [subMenuKey: string]: SubMenu;
27
28
  };
@@ -38,6 +39,7 @@ export interface Screen {
38
39
  title: string;
39
40
  actionID?: string;
40
41
  options?: ScreenOptions;
42
+ isUsableOnShortcut?: boolean;
41
43
  }
42
44
  export interface ObjectFields {
43
45
  [objectKey: string]: Schema;
@@ -53,6 +55,7 @@ export interface Models {
53
55
  searchFields?: SearchFields;
54
56
  formsRegister?: FormConfigs;
55
57
  headerRegisters?: Function;
58
+ typeObjects?: ModuleSelections;
56
59
  }
57
60
  type version = `${number}.${number}.${number}` | '-';
58
61
  export interface Compatibility {
@@ -16,4 +16,4 @@
16
16
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
17
  */
18
18
  export {};
19
- //# sourceMappingURL=Module.js.map
19
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/app/modules/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
@@ -0,0 +1 @@
1
+ export function uploadNavigationTools(): Promise<any>;
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 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 { navigationInformations } from '../../navigator/NavigationInformationsProvider';
19
+ import { axiosApiProvider } from '../../apiProviders';
20
+ export async function uploadNavigationTools() {
21
+ return axiosApiProvider.post({
22
+ url: '/ws/aos/mobilesettings/navigation',
23
+ data: navigationInformations.getInformations(),
24
+ });
25
+ }
26
+ //# sourceMappingURL=config-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-api.js","sourceRoot":"","sources":["../../../src/auth/api/config-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,sBAAsB,EAAC,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAEpD,MAAM,CAAC,KAAK,UAAU,qBAAqB;IACzC,OAAO,gBAAgB,CAAC,IAAI,CAAC;QAC3B,GAAG,EAAE,mCAAmC;QACxC,IAAI,EAAE,sBAAsB,CAAC,eAAe,EAAE;KAC/C,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const DashboardsCard: ({ style }: {
3
+ style: any;
4
+ }) => React.JSX.Element;
5
+ export default DashboardsCard;
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 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 { Dimensions, StyleSheet } from 'react-native';
20
+ import { Card } from '@axelor/aos-mobile-ui';
21
+ import { DashboardView } from '../../../../dashboards/view';
22
+ import { useSelector } from '../../../../index';
23
+ const DashboardsCard = ({ style }) => {
24
+ const { mobileSettings } = useSelector((state) => state.appConfig);
25
+ const renderDashboards = () => {
26
+ return mobileSettings.dashboardIdList.map((dashboardId, index) => {
27
+ return (<DashboardView dashboardId={dashboardId} hideCardBackground chartWidth={Dimensions.get('window').width * 0.85} key={index}/>);
28
+ });
29
+ };
30
+ if (!Array.isArray(mobileSettings?.dashboardIdList) ||
31
+ mobileSettings?.dashboardIdList.length === 0) {
32
+ return null;
33
+ }
34
+ return <Card style={[styles.card, style]}>{renderDashboards()}</Card>;
35
+ };
36
+ const styles = StyleSheet.create({
37
+ card: {
38
+ flexDirection: 'row',
39
+ width: '90%',
40
+ justifyContent: 'center',
41
+ alignSelf: 'center',
42
+ paddingVertical: 0,
43
+ paddingHorizontal: 0,
44
+ paddingRight: 0,
45
+ zIndex: 1,
46
+ },
47
+ });
48
+ export default DashboardsCard;
49
+ //# sourceMappingURL=DashboardsCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DashboardsCard.js","sourceRoot":"","sources":["../../../../../src/auth/components/molecules/DashboardsCard/DashboardsCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AACpD,OAAO,EAAC,IAAI,EAAC,MAAM,uBAAuB,CAAC;AAC3C,OAAO,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAE9C,MAAM,cAAc,GAAG,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE;IACjC,MAAM,EAAC,cAAc,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAEtE,MAAM,gBAAgB,GAAG,GAAG,EAAE;QAC5B,OAAO,cAAc,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE;YAC/D,OAAO,CACL,CAAC,aAAa,CACZ,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,kBAAkB,CAClB,UAAU,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAClD,GAAG,CAAC,CAAC,KAAK,CAAC,EACX,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,IACE,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE,eAAe,CAAC;QAC/C,cAAc,EAAE,eAAe,CAAC,MAAM,KAAK,CAAC,EAC5C;QACA,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;AACxE,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,aAAa,EAAE,KAAK;QACpB,KAAK,EAAE,KAAK;QACZ,cAAc,EAAE,QAAQ;QACxB,SAAS,EAAE,QAAQ;QACnB,eAAe,EAAE,CAAC;QAClB,iBAAiB,EAAE,CAAC;QACpB,YAAY,EAAE,CAAC;QACf,MAAM,EAAE,CAAC;KACV;CACF,CAAC,CAAC;AAEH,eAAe,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const NavigationToolsButton: ({}: {}) => React.JSX.Element;
3
+ export default NavigationToolsButton;
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useCallback, useEffect, useMemo } from 'react';
19
+ import { Dimensions, StyleSheet } from 'react-native';
20
+ import { useDispatch, useSelector } from 'react-redux';
21
+ import { useThemeColor, useConfig, RightIconButton, Icon, } from '@axelor/aos-mobile-ui';
22
+ import { useTranslator } from '../../../../i18n';
23
+ import { uploadNavigationTools } from '../../../features/configSlice';
24
+ import { useIsAdmin } from '../../../../permissions';
25
+ const NavigationToolsButton = ({}) => {
26
+ const I18n = useTranslator();
27
+ const Colors = useThemeColor();
28
+ const dispatch = useDispatch();
29
+ const isAdmin = useIsAdmin();
30
+ const { setActivityIndicator } = useConfig();
31
+ const { loading } = useSelector((state) => state.config);
32
+ const styles = useMemo(() => getStyles(Colors), [Colors]);
33
+ useEffect(() => {
34
+ if (!loading) {
35
+ setActivityIndicator(false);
36
+ }
37
+ }, [dispatch, setActivityIndicator, loading]);
38
+ const handleSend = useCallback(() => {
39
+ setActivityIndicator(true);
40
+ dispatch(uploadNavigationTools());
41
+ }, [dispatch, setActivityIndicator]);
42
+ if (!isAdmin) {
43
+ return null;
44
+ }
45
+ return (<RightIconButton icon={<Icon name="chevron-right" color={Colors.primaryColor.background}/>} style={styles.content} title={I18n.t('User_SendNavigationInformations')} onPress={handleSend}/>);
46
+ };
47
+ const getStyles = (Colors) => StyleSheet.create({
48
+ content: {
49
+ width: Dimensions.get('window').width * 0.9,
50
+ height: 40,
51
+ alignSelf: 'center',
52
+ borderColor: Colors.secondaryColor.background,
53
+ borderWidth: 1,
54
+ paddingLeft: 10,
55
+ paddingRight: 25,
56
+ marginRight: 0,
57
+ },
58
+ });
59
+ export default NavigationToolsButton;
60
+ //# sourceMappingURL=NavigationToolsButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationToolsButton.js","sourceRoot":"","sources":["../../../../../src/auth/components/molecules/NavigationToolsButton/NavigationToolsButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAC,UAAU,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AACpD,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,aAAa,EAEb,SAAS,EACT,eAAe,EACf,IAAI,GACL,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAC,qBAAqB,EAAC,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAC,UAAU,EAAC,MAAM,yBAAyB,CAAC;AAEnD,MAAM,qBAAqB,GAAG,CAAC,EAAE,EAAE,EAAE;IACnC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,MAAM,EAAC,oBAAoB,EAAC,GAAG,SAAS,EAAE,CAAC;IAE3C,MAAM,EAAC,OAAO,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5D,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAE1D,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,OAAO,EAAE;YACZ,oBAAoB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ortcutsCard: ({ style, horizontal }: ShortcutsCardProps) => React.JSX.Element;
7
+ export default ShortcutsCard;
@@ -0,0 +1,71 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useCallback, useMemo } from 'react';
19
+ import { Dimensions, FlatList, StyleSheet, TouchableOpacity } from 'react-native';
20
+ import { Card, Icon, Text } from '@axelor/aos-mobile-ui';
21
+ import { useSelector } from '../../../../index';
22
+ import { useNavigation } from '../../../../hooks/use-navigation';
23
+ const CARD_PERCENT_WIDTH = 90;
24
+ const CARD_PADDING = 16;
25
+ const ShortcutsCard = ({ style, horizontal = true }) => {
26
+ const navigation = useNavigation();
27
+ const { mobileSettings } = useSelector((state) => state.appConfig);
28
+ const styles = useMemo(() => {
29
+ const cardWidth = Dimensions.get('window').width * (CARD_PERCENT_WIDTH / 100);
30
+ const insideCardWidth = cardWidth - CARD_PADDING * 2;
31
+ const baseNumberShortcutPerLine = Dimensions.get('window').width < 500 ? 3 : 6;
32
+ const numberShortcutPerLine = horizontal
33
+ ? baseNumberShortcutPerLine + 0.5
34
+ : baseNumberShortcutPerLine;
35
+ const shortCutWidth = insideCardWidth / numberShortcutPerLine;
36
+ return getStyles(shortCutWidth);
37
+ }, [horizontal]);
38
+ const renderShortCut = useCallback(({ item }) => {
39
+ return (<TouchableOpacity style={styles.shortcut} onPress={() => navigation.navigate(item.mobileScreenName)} key={item.shortcutId}>
40
+ <Icon name={item.iconName} size={35}/>
41
+ <Text fontSize={14} numberOfLines={2}>
42
+ {item.name}
43
+ </Text>
44
+ </TouchableOpacity>);
45
+ }, [navigation, styles.shortcut]);
46
+ if (!Array.isArray(mobileSettings?.mobileShortcutList) ||
47
+ mobileSettings?.mobileShortcutList.length === 0) {
48
+ return null;
49
+ }
50
+ return (<Card style={[styles.card, style]}>
51
+ {horizontal ? (<FlatList data={mobileSettings?.mobileShortcutList} renderItem={renderShortCut} horizontal/>) : (mobileSettings?.mobileShortcutList.map(item => renderShortCut({ item })))}
52
+ </Card>);
53
+ };
54
+ const getStyles = (shortCutWidth) => StyleSheet.create({
55
+ card: {
56
+ flexDirection: 'row',
57
+ flexWrap: 'wrap',
58
+ width: `${CARD_PERCENT_WIDTH}%`,
59
+ alignSelf: 'center',
60
+ paddingHorizontal: CARD_PADDING,
61
+ paddingRight: CARD_PADDING,
62
+ zIndex: 1,
63
+ },
64
+ shortcut: {
65
+ width: shortCutWidth,
66
+ padding: 5,
67
+ alignItems: 'center',
68
+ },
69
+ });
70
+ export default ShortcutsCard;
71
+ //# sourceMappingURL=ShortcutsCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShortcutsCard.js","sourceRoot":"","sources":["../../../../../src/auth/components/molecules/ShortcutsCard/ShortcutsCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAChF,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAE/D,MAAM,kBAAkB,GAAG,E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AAY;QAC1B,MAAM,EAAE,CAAC;KACV;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,aAAa;QACpB,OAAO,EAAE,CAAC;QACV,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC,CAAC;AAEL,eAAe,aAAa,CAAC"}
@@ -1,2 +1,3 @@
1
- declare const TranslationsButton: ({}: {}) => JSX.Element;
1
+ import React from 'react';
2
+ declare const TranslationsButton: ({}: {}) => React.JSX.Element;
2
3
  export default TranslationsButton;
@@ -22,14 +22,15 @@ import { useThemeColor, useConfig, RightIconButton, Icon, } from '@axelor/aos-mo
22
22
  import { getTranslations, selectLanguage, useTranslator } from '../../../../i18n';
23
23
  import { showToastMessage } from '../../../../utils';
24
24
  import { clearMessage, uploadTranslations } from '../../../features/configSlice';
25
+ import { useIsAdmin } from '../../../../permissions';
25
26
  const TranslationsButton = ({}) => {
26
27
  const I18n = useTranslator();
27
28
  const Colors = useThemeColor();
28
29
  const dispatch = useDispatch();
30
+ const isAdmin = useIsAdmin();
29
31
  const { setActivityIndicator } = useConfig();
30
32
  const language = useSelector(selectLanguage);
31
33
  const { message } = useSelector((state) => state.config);
32
- const { user } = useSelector((state) => state.user);
33
34
  const styles = useMemo(() => getStyles(Colors), [Colors]);
34
35
  useEffect(() => {
35
36
  if (message) {
@@ -43,7 +44,7 @@ const TranslationsButton = ({}) => {
43
44
  const translations = getTranslations(language);
44
45
  dispatch(uploadTranslations({ language, translations }));
45
46
  }, [dispatch, language, setActivityIndicator]);
46
- if (user?.group?.code !== 'admins') {
47
+ if (!isAdmin) {
47
48
  return null;
48
49
  }
49
50
  return (<RightIconButton icon={<Icon name="chevron-right" color={Colors.primaryColor.background}/>} style={styles.content} title={I18n.t('User_SendTranslations')} onPress={handleSendTranslations}/>);
@@ -52,11 +53,12 @@ const getStyles = (Colors) => StyleSheet.create({
52
53
  content: {
53
54
  width: Dimensions.get('window').width * 0.9,
54
55
  height: 40,
56
+ alignSelf: 'center',
55
57
  borderColor: Colors.secondaryColor.background,
56
58
  borderWidth: 1,
57
- marginHorizontal: 18,
58
59
  paddingLeft: 10,
59
60
  paddingRight: 25,
61
+ marginRight: 0,
60
62
  },
61
63
  });
62
64
  export default TranslationsButton;
@@ -1 +1 @@
1
- {"version":3,"file":"TranslationsButton.js","sourceRoot":"","sources":["../../../../../src/auth/components/molecules/TranslationsButton/TranslationsButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAC,UAAU,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AACpD,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,aAAa,EAEb,SAAS,EACT,eAAe,EACf,IAAI,GACL,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,eAAe,EAAE,cAAc,EAAE,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAC,YAAY,EAAE,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;AAE/E,MAAM,kBAAkB,GAAG,CAAC,EAAE,EAAE,EAAE;IAChC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,EAAC,oBAAoB,EAAC,GAAG,SAAS,EAAE,CAAC;IAE3C,MAAM,QAAQ,GAAG,WAAW,CAAC,cAAc,CAAC,CAAC;IAE7C,MAAM,EAAC,OAAO,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5D,MAAM,EAAC,IAAI,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,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AC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAmB,EAAE,EAAE,CACxC,UAAU,CAAC,MAAM,CAAC;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,GAAG;QAC3C,MAAM,EAAE,EAAE;QACV,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC,UAAU;QAC7C,WAAW,EAAE,CAAC;QACd,gBAAgB,EAAE,EAAE;QACpB,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,EAAE;KACjB;CACF,CAAC,CAAC;AAEL,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"TranslationsButton.js","sourceRoot":"","sources":["../../../../../src/auth/components/molecules/TranslationsButton/TranslationsButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAC,UAAU,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AACpD,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,aAAa,EAEb,SAAS,EACT,eAAe,EACf,IAAI,GACL,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,eAAe,EAAE,cAAc,EAAE,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAC,YAAY,EAAE,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAC,UAAU,EAAC,MAAM,yBAAyB,CAAC;AAEnD,MAAM,kBAAkB,GAAG,CAAC,EAAE,EAAE,EAAE;IAChC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,W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,UAAU,CAAC,EAAG,CACrE,CACD,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CACtB,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CACvC,OAAO,CAAC,CAAC,sBAAsB,CAAC,EAChC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAmB,EAAE,EAAE,CACxC,UAAU,CAAC,MAAM,CAAC;IAChB,OAAO,EAAE;QACP,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,GAAG;QAC3C,MAAM,EAAE,EAAE;QACV,SAAS,EAAE,QAAQ;QACnB,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC,UAAU;QAC7C,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,CAAC;KACf;CACF,CAAC,CAAC;AAEL,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare const UserCard: ({ children, style }: {
3
+ children: any;
4
+ style: any;
5
+ }) => React.JSX.Element;
6
+ export default UserCard;