@axelor/aos-mobile-core 7.0.3 → 7.0.5

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 (254) hide show
  1. package/lib/api/metafile-api.d.ts +13 -1
  2. package/lib/api/metafile-api.js +19 -5
  3. package/lib/api/metafile-api.js.map +1 -1
  4. package/lib/api/mobile-config-api.js +9 -15
  5. package/lib/api/mobile-config-api.js.map +1 -1
  6. package/lib/api/model-api.d.ts +4 -0
  7. package/lib/api/model-api.js +28 -0
  8. package/lib/api/model-api.js.map +1 -0
  9. package/lib/apiProviders/utils.d.ts +7 -7
  10. package/lib/apiProviders/utils.js +31 -23
  11. package/lib/apiProviders/utils.js.map +1 -1
  12. package/lib/app/Module.d.ts +15 -2
  13. package/lib/auth/api/user-api.js +5 -3
  14. package/lib/auth/api/user-api.js.map +1 -1
  15. package/lib/auth/features/companySlice.d.ts +1 -1
  16. package/lib/auth/features/configSlice.d.ts +1 -1
  17. package/lib/auth/features/languageSlice.d.ts +1 -1
  18. package/lib/auth/features/userSlice.d.ts +1 -1
  19. package/lib/auth/features/userSlice.js +7 -5
  20. package/lib/auth/features/userSlice.js.map +1 -1
  21. package/lib/auth/i18n/en.json +0 -16
  22. package/lib/auth/i18n/fr.json +0 -16
  23. package/lib/auth/index.js +1 -0
  24. package/lib/auth/index.js.map +1 -1
  25. package/lib/auth/models/objectFields.js +14 -0
  26. package/lib/auth/models/objectFields.js.map +1 -1
  27. package/lib/components/external/Camera/Camera.js +15 -5
  28. package/lib/components/external/Camera/Camera.js.map +1 -1
  29. package/lib/components/external/Camera/CaptureButton.d.ts +2 -1
  30. package/lib/components/external/Camera/CaptureButton.js +3 -3
  31. package/lib/components/external/Camera/CaptureButton.js.map +1 -1
  32. package/lib/components/external/Stopwatch/Stopwatch.d.ts +5 -1
  33. package/lib/components/external/Stopwatch/Stopwatch.js +41 -11
  34. package/lib/components/external/Stopwatch/Stopwatch.js.map +1 -1
  35. package/lib/components/external/Timer/Timer.d.ts +3 -2
  36. package/lib/components/external/Timer/Timer.js +5 -4
  37. package/lib/components/external/Timer/Timer.js.map +1 -1
  38. package/lib/components/molecules/CameraButton/CameraButton.d.ts +12 -0
  39. package/lib/components/molecules/CameraButton/CameraButton.js +87 -0
  40. package/lib/components/molecules/CameraButton/CameraButton.js.map +1 -0
  41. package/lib/components/molecules/UploadFileInput/UploadFileInput.d.ts +13 -2
  42. package/lib/components/molecules/UploadFileInput/UploadFileInput.js +183 -20
  43. package/lib/components/molecules/UploadFileInput/UploadFileInput.js.map +1 -1
  44. package/lib/components/molecules/index.d.ts +1 -3
  45. package/lib/components/molecules/index.js +1 -3
  46. package/lib/components/molecules/index.js.map +1 -1
  47. package/lib/components/organisms/DateInput/DateInput.d.ts +2 -1
  48. package/lib/components/organisms/DateInput/DateInput.js +8 -5
  49. package/lib/components/organisms/DateInput/DateInput.js.map +1 -1
  50. package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.d.ts +2 -1
  51. package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js +5 -4
  52. package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js.map +1 -1
  53. package/lib/components/organisms/index.d.ts +1 -6
  54. package/lib/components/organisms/index.js +1 -6
  55. package/lib/components/organisms/index.js.map +1 -1
  56. package/lib/components/templates/AttachedFilesView/AttachedFilesView.js +1 -1
  57. package/lib/components/templates/AttachedFilesView/AttachedFilesView.js.map +1 -1
  58. package/lib/components/templates/index.d.ts +0 -3
  59. package/lib/components/templates/index.js +0 -3
  60. package/lib/components/templates/index.js.map +1 -1
  61. package/lib/config/routes.d.ts +16 -16
  62. package/lib/features/attachedFilesSlice.d.ts +1 -1
  63. package/lib/features/authSlice.d.ts +1 -1
  64. package/lib/features/cameraScannerSlice.d.ts +2 -2
  65. package/lib/features/cameraScannerSlice.js +4 -1
  66. package/lib/features/cameraScannerSlice.js.map +1 -1
  67. package/lib/features/cameraSlice.d.ts +13 -4
  68. package/lib/features/cameraSlice.js +4 -1
  69. package/lib/features/cameraSlice.js.map +1 -1
  70. package/lib/features/mailMessageSlice.d.ts +1 -1
  71. package/lib/features/menuConfigSlice.d.ts +1 -1
  72. package/lib/features/metaModuleSlice.d.ts +1 -1
  73. package/lib/features/metafileSlice.d.ts +1 -1
  74. package/lib/features/mobileConfigSlice.d.ts +1 -1
  75. package/lib/features/onlineSlice.d.ts +1 -1
  76. package/lib/features/scannerSlice.d.ts +2 -2
  77. package/lib/features/scannerSlice.js +4 -1
  78. package/lib/features/scannerSlice.js.map +1 -1
  79. package/lib/header/HeaderActionsProvider.d.ts +3 -4
  80. package/lib/header/HeaderActionsProvider.js +16 -10
  81. package/lib/header/HeaderActionsProvider.js.map +1 -1
  82. package/lib/header/hooks.d.ts +15 -1
  83. package/lib/header/hooks.js +28 -2
  84. package/lib/header/hooks.js.map +1 -1
  85. package/lib/header/index.d.ts +2 -1
  86. package/lib/header/index.js +2 -1
  87. package/lib/header/index.js.map +1 -1
  88. package/lib/header/types.d.ts +1 -0
  89. package/lib/i18n/component/Translator.d.ts +1 -1
  90. package/lib/i18n/hooks/use-translator.d.ts +1 -1
  91. package/lib/i18n/hooks/use-translator.js +3 -1
  92. package/lib/i18n/hooks/use-translator.js.map +1 -1
  93. package/lib/i18n/translations/en.json +35 -4
  94. package/lib/i18n/translations/fr.json +35 -4
  95. package/lib/index.d.ts +2 -2
  96. package/lib/index.js +2 -2
  97. package/lib/index.js.map +1 -1
  98. package/lib/navigator/Navigator.d.ts +1 -1
  99. package/lib/navigator/Navigator.js +21 -25
  100. package/lib/navigator/Navigator.js.map +1 -1
  101. package/lib/navigator/drawer/DrawerContent.js +39 -21
  102. package/lib/navigator/drawer/DrawerContent.js.map +1 -1
  103. package/lib/navigator/drawer/Header.js +26 -6
  104. package/lib/navigator/drawer/Header.js.map +1 -1
  105. package/lib/navigator/drawer/Menu.d.ts +2 -1
  106. package/lib/navigator/drawer/Menu.js +42 -17
  107. package/lib/navigator/drawer/Menu.js.map +1 -1
  108. package/lib/navigator/drawer/MenuItem.d.ts +8 -5
  109. package/lib/navigator/drawer/MenuItem.js +11 -51
  110. package/lib/navigator/drawer/MenuItem.js.map +1 -1
  111. package/lib/navigator/drawer/MenuItemEntry.d.ts +12 -0
  112. package/lib/navigator/drawer/MenuItemEntry.js +89 -0
  113. package/lib/navigator/drawer/MenuItemEntry.js.map +1 -0
  114. package/lib/navigator/drawer/SubMenuItem.d.ts +7 -0
  115. package/lib/navigator/drawer/SubMenuItem.js +34 -0
  116. package/lib/navigator/drawer/SubMenuItem.js.map +1 -0
  117. package/lib/navigator/drawer/SubMenuItemList.d.ts +10 -0
  118. package/lib/navigator/drawer/SubMenuItemList.js +46 -0
  119. package/lib/navigator/drawer/SubMenuItemList.js.map +1 -0
  120. package/lib/navigator/menu.helper.d.ts +9 -0
  121. package/lib/navigator/menu.helper.js +92 -0
  122. package/lib/navigator/menu.helper.js.map +1 -1
  123. package/lib/navigator/module.helper.d.ts +5 -0
  124. package/lib/navigator/module.helper.js +37 -1
  125. package/lib/navigator/module.helper.js.map +1 -1
  126. package/lib/redux/store.d.ts +1 -1
  127. package/lib/screens/BarcodeDisplayScreen.d.ts +4 -0
  128. package/lib/screens/BarcodeDisplayScreen.js +54 -0
  129. package/lib/screens/BarcodeDisplayScreen.js.map +1 -0
  130. package/lib/screens/LoginScreen.js +47 -73
  131. package/lib/screens/LoginScreen.js.map +1 -1
  132. package/lib/screens/SessionManagementScreen.js +41 -21
  133. package/lib/screens/SessionManagementScreen.js.map +1 -1
  134. package/lib/screens/index.d.ts +38 -0
  135. package/lib/screens/index.js +47 -0
  136. package/lib/screens/index.js.map +1 -0
  137. package/lib/sessions/SessionStorage.d.ts +4 -5
  138. package/lib/sessions/SessionStorage.js +30 -22
  139. package/lib/sessions/SessionStorage.js.map +1 -1
  140. package/lib/sessions/components/alerts/PopupCreateSession.d.ts +10 -0
  141. package/lib/sessions/components/alerts/PopupCreateSession.js +137 -0
  142. package/lib/sessions/components/alerts/PopupCreateSession.js.map +1 -0
  143. package/lib/sessions/components/alerts/PopupEditSession.d.ts +8 -0
  144. package/lib/sessions/components/alerts/PopupEditSession.js +84 -0
  145. package/lib/sessions/components/alerts/PopupEditSession.js.map +1 -0
  146. package/lib/sessions/components/alerts/PopupSession.d.ts +9 -0
  147. package/lib/sessions/components/alerts/PopupSession.js +84 -0
  148. package/lib/sessions/components/alerts/PopupSession.js.map +1 -0
  149. package/lib/sessions/components/alerts/index.d.ts +3 -0
  150. package/lib/sessions/components/alerts/index.js +21 -0
  151. package/lib/sessions/components/alerts/index.js.map +1 -0
  152. package/lib/sessions/components/buttons/DisabledButton.d.ts +7 -0
  153. package/lib/{components/molecules/LoginButton/LoginButton.js → sessions/components/buttons/DisabledButton.js} +5 -5
  154. package/lib/sessions/components/buttons/DisabledButton.js.map +1 -0
  155. package/lib/sessions/components/buttons/LoginButton.js +24 -0
  156. package/lib/sessions/components/buttons/LoginButton.js.map +1 -0
  157. package/lib/sessions/components/buttons/UpdateButton.d.ts +6 -0
  158. package/lib/sessions/components/buttons/UpdateButton.js +24 -0
  159. package/lib/sessions/components/buttons/UpdateButton.js.map +1 -0
  160. package/lib/sessions/components/buttons/index.d.ts +3 -0
  161. package/lib/sessions/components/buttons/index.js +21 -0
  162. package/lib/sessions/components/buttons/index.js.map +1 -0
  163. package/lib/sessions/components/display/LogoImage.js.map +1 -0
  164. package/lib/sessions/components/display/SessionCard.d.ts +9 -0
  165. package/lib/sessions/components/display/SessionCard.js +185 -0
  166. package/lib/sessions/components/display/SessionCard.js.map +1 -0
  167. package/lib/sessions/components/display/SessionListCard.d.ts +10 -0
  168. package/lib/sessions/components/display/SessionListCard.js +75 -0
  169. package/lib/sessions/components/display/SessionListCard.js.map +1 -0
  170. package/lib/sessions/components/display/index.d.ts +3 -0
  171. package/lib/sessions/components/display/index.js +21 -0
  172. package/lib/sessions/components/display/index.js.map +1 -0
  173. package/lib/{components/molecules/ErrorText → sessions/components/error}/ErrorText.js +2 -2
  174. package/lib/sessions/components/error/ErrorText.js.map +1 -0
  175. package/lib/sessions/components/error/index.d.ts +1 -0
  176. package/lib/sessions/components/error/index.js +19 -0
  177. package/lib/sessions/components/error/index.js.map +1 -0
  178. package/lib/sessions/components/index.d.ts +5 -0
  179. package/lib/sessions/components/index.js +23 -0
  180. package/lib/sessions/components/index.js.map +1 -0
  181. package/lib/sessions/components/inputs/DefaultCheckbox.d.ts +8 -0
  182. package/lib/sessions/components/inputs/DefaultCheckbox.js +36 -0
  183. package/lib/sessions/components/inputs/DefaultCheckbox.js.map +1 -0
  184. package/lib/{components/organisms/PasswordInput → sessions/components/inputs}/PasswordInput.d.ts +2 -1
  185. package/lib/{components/organisms/PasswordInput → sessions/components/inputs}/PasswordInput.js +5 -2
  186. package/lib/sessions/components/inputs/PasswordInput.js.map +1 -0
  187. package/lib/sessions/components/inputs/SessionInputs.d.ts +13 -0
  188. package/lib/sessions/components/inputs/SessionInputs.js +180 -0
  189. package/lib/sessions/components/inputs/SessionInputs.js.map +1 -0
  190. package/lib/{components/organisms/SessionNameInput → sessions/components/inputs}/SessionNameInput.d.ts +2 -1
  191. package/lib/{components/organisms/SessionNameInput → sessions/components/inputs}/SessionNameInput.js +5 -2
  192. package/lib/sessions/components/inputs/SessionNameInput.js.map +1 -0
  193. package/lib/{components/organisms/UrlInput → sessions/components/inputs}/UrlInput.d.ts +2 -1
  194. package/lib/{components/organisms/UrlInput → sessions/components/inputs}/UrlInput.js +14 -3
  195. package/lib/sessions/components/inputs/UrlInput.js.map +1 -0
  196. package/lib/{components/organisms/UsernameInput → sessions/components/inputs}/UsernameInput.js +10 -2
  197. package/lib/sessions/components/inputs/UsernameInput.js.map +1 -0
  198. package/lib/sessions/components/inputs/index.d.ts +6 -0
  199. package/lib/sessions/components/inputs/index.js +24 -0
  200. package/lib/sessions/components/inputs/index.js.map +1 -0
  201. package/lib/sessions/hook.d.ts +1 -1
  202. package/lib/sessions/hook.js +5 -5
  203. package/lib/sessions/hook.js.map +1 -1
  204. package/lib/sessions/index.d.ts +2 -1
  205. package/lib/sessions/index.js +2 -1
  206. package/lib/sessions/index.js.map +1 -1
  207. package/lib/sessions/type.d.ts +2 -1
  208. package/lib/sessions/type.js.map +1 -1
  209. package/lib/sessions/utils.d.ts +2 -1
  210. package/lib/sessions/utils.js +26 -7
  211. package/lib/sessions/utils.js.map +1 -1
  212. package/lib/tools/ContactProvider.d.ts +9 -0
  213. package/lib/tools/ContactProvider.js +98 -0
  214. package/lib/tools/ContactProvider.js.map +1 -0
  215. package/lib/tools/contact.helper.d.ts +21 -0
  216. package/lib/tools/contact.helper.js +136 -0
  217. package/lib/tools/contact.helper.js.map +1 -0
  218. package/lib/tools/index.d.ts +1 -0
  219. package/lib/tools/index.js +1 -0
  220. package/lib/tools/index.js.map +1 -1
  221. package/lib/utils/date.d.ts +16 -0
  222. package/lib/utils/date.js +41 -0
  223. package/lib/utils/date.js.map +1 -1
  224. package/lib/utils/index.d.ts +1 -1
  225. package/lib/utils/index.js +1 -1
  226. package/lib/utils/index.js.map +1 -1
  227. package/package.json +12 -10
  228. package/lib/components/molecules/ErrorText/ErrorText.js.map +0 -1
  229. package/lib/components/molecules/LoginButton/LoginButton.js.map +0 -1
  230. package/lib/components/molecules/SessionNumberIndicator/SessionNumberIndicator.d.ts +0 -4
  231. package/lib/components/molecules/SessionNumberIndicator/SessionNumberIndicator.js +0 -44
  232. package/lib/components/molecules/SessionNumberIndicator/SessionNumberIndicator.js.map +0 -1
  233. package/lib/components/organisms/LogoImage/LogoImage.js.map +0 -1
  234. package/lib/components/organisms/PasswordInput/PasswordInput.js.map +0 -1
  235. package/lib/components/organisms/SessionButtons/SessionButtons.d.ts +0 -17
  236. package/lib/components/organisms/SessionButtons/SessionButtons.js +0 -93
  237. package/lib/components/organisms/SessionButtons/SessionButtons.js.map +0 -1
  238. package/lib/components/organisms/SessionNameInput/SessionNameInput.js.map +0 -1
  239. package/lib/components/organisms/UrlInput/UrlInput.js.map +0 -1
  240. package/lib/components/organisms/UsernameInput/UsernameInput.js.map +0 -1
  241. package/lib/components/templates/PopupCreateSession/PopupCreateSession.d.ts +0 -10
  242. package/lib/components/templates/PopupCreateSession/PopupCreateSession.js +0 -171
  243. package/lib/components/templates/PopupCreateSession/PopupCreateSession.js.map +0 -1
  244. package/lib/components/templates/PopupSession/PopupSession.d.ts +0 -8
  245. package/lib/components/templates/PopupSession/PopupSession.js +0 -135
  246. package/lib/components/templates/PopupSession/PopupSession.js.map +0 -1
  247. package/lib/components/templates/PopupSessionList/PopupSessionList.d.ts +0 -7
  248. package/lib/components/templates/PopupSessionList/PopupSessionList.js +0 -107
  249. package/lib/components/templates/PopupSessionList/PopupSessionList.js.map +0 -1
  250. /package/lib/{components/molecules/LoginButton → sessions/components/buttons}/LoginButton.d.ts +0 -0
  251. /package/lib/{components/organisms/LogoImage → sessions/components/display}/LogoImage.d.ts +0 -0
  252. /package/lib/{components/organisms/LogoImage → sessions/components/display}/LogoImage.js +0 -0
  253. /package/lib/{components/molecules/ErrorText → sessions/components/error}/ErrorText.d.ts +0 -0
  254. /package/lib/{components/organisms/UsernameInput → sessions/components/inputs}/UsernameInput.d.ts +0 -0
@@ -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, { useCallback, useEffect, useMemo, useState } from 'react';
19
+ import { StyleSheet, View } from 'react-native';
20
+ import { useDispatch, useSelector } from 'react-redux';
21
+ import { Icon, PopUp, useThemeColor } from '@axelor/aos-mobile-ui';
22
+ import { ErrorText, SessionInputs } from '../../components';
23
+ import { login } from '../../../features/authSlice';
24
+ import { sessionStorage } from '../..';
25
+ const PopupSession = ({ sessionList, sessionActive, popupIsOpen, handleClose, showUrlInput, testInstanceConfig, }) => {
26
+ const Colors = useThemeColor();
27
+ const dispatch = useDispatch();
28
+ const { loading, error } = useSelector(state => state.auth);
29
+ const [isOpen, setIsOpen] = useState(false);
30
+ const modeDebug = useMemo(() => __DEV__, []);
31
+ const onPressLogin = useCallback(({ password }) => {
32
+ dispatch(login({
33
+ url: sessionActive.url,
34
+ username: sessionActive.username,
35
+ password,
36
+ }));
37
+ }, [dispatch, sessionActive]);
38
+ const deleteSession = useCallback(() => {
39
+ sessionStorage.removeSession({ sessionId: sessionActive?.id });
40
+ handleClose();
41
+ }, [sessionActive, handleClose]);
42
+ useEffect(() => {
43
+ setIsOpen(popupIsOpen);
44
+ }, [popupIsOpen]);
45
+ if (sessionActive == null) {
46
+ return null;
47
+ }
48
+ return (<PopUp visible={isOpen} title={sessionActive?.name} style={styles.popup}>
49
+ <View style={styles.popupContainer}>
50
+ <Icon name="times" size={20} touchable={true} onPress={handleClose} style={styles.closeIcon}/>
51
+ <ErrorText error={error}/>
52
+ <SessionInputs sessionList={sessionList} session={{
53
+ ...sessionActive,
54
+ password: modeDebug ? testInstanceConfig?.defaultPassword : '',
55
+ }} showUrlInput={showUrlInput} loading={loading} mode="connection" showPopup={setIsOpen} onValidation={onPressLogin}/>
56
+ <Icon name="trash-alt" size={20} color={Colors.errorColor.background} touchable={true} onPress={deleteSession} style={styles.binIcon}/>
57
+ </View>
58
+ </PopUp>);
59
+ };
60
+ const styles = StyleSheet.create({
61
+ popup: {
62
+ width: '90%',
63
+ paddingHorizontal: 15,
64
+ paddingRight: 15,
65
+ paddingVertical: 15,
66
+ },
67
+ popupContainer: {
68
+ flexDirection: 'column',
69
+ alignItems: 'center',
70
+ width: '120%',
71
+ },
72
+ closeIcon: {
73
+ position: 'absolute',
74
+ right: 0,
75
+ top: -30,
76
+ },
77
+ binIcon: {
78
+ position: 'absolute',
79
+ right: '1%',
80
+ bottom: '5%',
81
+ },
82
+ });
83
+ export default PopupSession;
84
+ //# sourceMappingURL=PopupSession.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PopupSession.js","sourceRoot":"","sources":["../../../../src/sessions/components/alerts/PopupSession.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,EAAC,IAAI,EAAE,KAAK,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAC,SAAS,EAAE,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAC,KAAK,EAAC,MAAM,6BAA6B,CAAC;AAClD,OAAO,EAAC,cAAc,EAAC,MAAM,OAAO,CAAC;AAErC,MAAM,YAAY,GAAG,CAAC,EACpB,WAAW,EACX,aAAa,EACb,WAAW,EACX,WAAW,EACX,YAAY,EACZ,kBAAkB,GACnB,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,EAAC,OAAO,EAAE,KAAK,EAAC,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAE1D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE,CAA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CreateSession';
2
+ export { default as PopupEditSession } from './PopupEditSession';
3
+ export { default as PopupSession } from './PopupSession';
@@ -0,0 +1,21 @@
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 PopupCreateSession } from './PopupCreateSession';
19
+ export { default as PopupEditSession } from './PopupEditSession';
20
+ export { default as PopupSession } from './PopupSession';
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sessions/components/alerts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,7 @@
1
+ declare const DisabledButton: ({ title, onPress, onDisabledPress, disabled, }: {
2
+ title: any;
3
+ onPress: any;
4
+ onDisabledPress?: () => void;
5
+ disabled: any;
6
+ }) => JSX.Element;
7
+ export default DisabledButton;
@@ -18,13 +18,13 @@
18
18
  import React, { useMemo } from 'react';
19
19
  import { StyleSheet, View } from 'react-native';
20
20
  import { Button, useThemeColor } from '@axelor/aos-mobile-ui';
21
- import useTranslator from '../../../i18n/hooks/use-translator';
22
- const LoginButton = ({ onPress, onDisabledPress = () => { }, disabled }) => {
21
+ import { useTranslator } from '../../../i18n';
22
+ const DisabledButton = ({ title, onPress, onDisabledPress = () => { }, disabled, }) => {
23
23
  const I18n = useTranslator();
24
24
  const Colors = useThemeColor();
25
25
  const styles = useMemo(() => getStyles(Colors), [Colors]);
26
26
  return (<View style={styles.container}>
27
- <Button style={styles.button} title={I18n.t('Auth_LOGIN')} onPress={disabled ? onDisabledPress : onPress} color={disabled ? Colors.secondaryColor : Colors.primaryColor}/>
27
+ <Button style={styles.button} title={I18n.t(title)} onPress={disabled ? onDisabledPress : onPress} color={disabled ? Colors.secondaryColor : Colors.primaryColor}/>
28
28
  </View>);
29
29
  };
30
30
  const getStyles = Colors => StyleSheet.create({
@@ -41,5 +41,5 @@ const getStyles = Colors => StyleSheet.create({
41
41
  shadowOffset: { width: 0, height: 0 },
42
42
  },
43
43
  });
44
- export default LoginButton;
45
- //# sourceMappingURL=LoginButton.js.map
44
+ export default DisabledButton;
45
+ //# sourceMappingURL=DisabledButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisabledButton.js","sourceRoot":"","sources":["../../../../src/sessions/components/buttons/DisabledButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAE5C,MAAM,cAAc,GAAG,CAAC,EACtB,KAAK,EACL,OAAO,EACP,eAAe,GAAG,GAAG,EAAE,GAAE,CAAC,EAC1B,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAE1D,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,MAAM,CACL,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CACrB,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CACrB,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,CAC9C,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,EAElE;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,MAAM,CAAC,EAAE,CACzB,UAAU,CAAC,MAAM,CAAC;IAChB,SAAS,EAAE;QACT,UAAU,EAAE,QAAQ;KACrB;IACD,MAAM,EAAE;QACN,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,EAAE;QACV,SAAS,EAAE,CAAC;QACZ,aAAa,EAAE,GAAG;QAClB,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC,UAAU;QAC7C,YAAY,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC;KACpC;CACF,CAAC,CAAC;AAEL,eAAe,cAAc,CAAC"}
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React from 'react';
19
+ import DisabledButton from './DisabledButton';
20
+ const LoginButton = ({ onPress, onDisabledPress = () => { }, disabled }) => {
21
+ return (<DisabledButton title="Base_Connection_Login" onPress={onPress} disabled={disabled} onDisabledPress={onDisabledPress}/>);
22
+ };
23
+ export default LoginButton;
24
+ //# sourceMappingURL=LoginButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoginButton.js","sourceRoot":"","sources":["../../../../src/sessions/components/buttons/LoginButton.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,WAAW,GAAG,CAAC,EAAC,OAAO,EAAE,eAAe,GAAG,GAAG,EAAE,GAAE,CAAC,EAAE,QAAQ,EAAC,EAAE,EAAE;IACtE,OAAO,CACL,CAAC,cAAc,CACb,KAAK,CAAC,uBAAuB,CAC7B,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,eAAe,CAAC,CAAC,eAAe,CAAC,EACjC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,6 @@
1
+ export default UpdateButton;
2
+ declare function UpdateButton({ onPress, onDisabledPress, disabled }: {
3
+ onPress: any;
4
+ onDisabledPress?: () => void;
5
+ disabled: any;
6
+ }): JSX.Element;
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React from 'react';
19
+ import DisabledButton from './DisabledButton';
20
+ const UpdateButton = ({ onPress, onDisabledPress = () => { }, disabled }) => {
21
+ return (<DisabledButton title="Base_Connection_Update" onPress={onPress} disabled={disabled} onDisabledPress={onDisabledPress}/>);
22
+ };
23
+ export default UpdateButton;
24
+ //# sourceMappingURL=UpdateButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UpdateButton.js","sourceRoot":"","sources":["../../../../src/sessions/components/buttons/UpdateButton.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,YAAY,GAAG,CAAC,EAAC,OAAO,EAAE,eAAe,GAAG,GAAG,EAAE,GAAE,CAAC,EAAE,QAAQ,EAAC,EAAE,EAAE;IACvE,OAAO,CACL,CAAC,cAAc,CACb,KAAK,CAAC,wBAAwB,CAC9B,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,eAAe,CAAC,CAAC,eAAe,CAAC,EACjC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as DisabledButton } from './DisabledButton';
2
+ export { default as LoginButton } from './LoginButton';
3
+ export { default as UpdateButton } from './UpdateButton';
@@ -0,0 +1,21 @@
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 DisabledButton } from './DisabledButton';
19
+ export { default as LoginButton } from './LoginButton';
20
+ export { default as UpdateButton } from './UpdateButton';
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sessions/components/buttons/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogoImage.js","sourceRoot":"","sources":["../../../../src/sessions/components/display/LogoImage.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClE,OAAO,EAAC,KAAK,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAC,OAAO,EAAC,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAE/C,MAAM,cAAc,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E;QACT,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;KACf;CACF,CAAC,CAAC;AAEH,KAAK,UAAU,0BAA0B,CAAC,GAAG,EAAE,QAAQ;IACrD,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE;QACxB,OAAO,IAAI,CAAC;KACb;IACD,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;SAC5B,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC;SACtB,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAEnB,IAAI,IAAI,IAAI,IAAI,EAAE;QAChB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,EAAC,GAAG,EAAE,GAAG,IAAI,QAAQ,QAAQ,EAAE,EAAC,CAAC;AAC1C,CAAC;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,9 @@
1
+ export default SessionCard;
2
+ declare function SessionCard({ session, changeActiveSession, openConnection, openEdition, isUnactive, logoFile, }: {
3
+ session: any;
4
+ changeActiveSession: any;
5
+ openConnection: any;
6
+ openEdition: any;
7
+ isUnactive: any;
8
+ logoFile: any;
9
+ }): JSX.Element;
@@ -0,0 +1,185 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useCallback, useEffect, useRef } from 'react';
19
+ import { StyleSheet, View, Animated, TouchableOpacity, Dimensions, } from 'react-native';
20
+ import { GestureHandlerRootView, RectButton } from 'react-native-gesture-handler';
21
+ import Swipeable from 'react-native-gesture-handler/Swipeable';
22
+ import Icon from 'react-native-vector-icons/FontAwesome5';
23
+ import { useThemeColor, Card, Text } from '@axelor/aos-mobile-ui';
24
+ import LogoImage from './LogoImage';
25
+ import { sessionStorage } from '../..';
26
+ const SessionCard = ({ session, changeActiveSession, openConnection, openEdition, isUnactive, logoFile, }) => {
27
+ const Colors = useThemeColor();
28
+ const ref = useRef(null);
29
+ const translateXAnim = useRef(new Animated.Value(0)).current;
30
+ const translateYAnim = useRef(new Animated.Value(0)).current;
31
+ const scaleAnim = useRef(new Animated.Value(1)).current;
32
+ const handleCloseSwipe = () => {
33
+ ref.current.close();
34
+ };
35
+ const handleConnection = useCallback(() => {
36
+ handleCloseSwipe();
37
+ changeActiveSession(session);
38
+ openConnection();
39
+ }, [changeActiveSession, openConnection, session]);
40
+ const handleEdition = useCallback(() => {
41
+ handleCloseSwipe();
42
+ changeActiveSession(session);
43
+ openEdition();
44
+ }, [changeActiveSession, openEdition, session]);
45
+ const animateRemoval = useCallback(() => {
46
+ handleCloseSwipe();
47
+ Animated.parallel([
48
+ Animated.timing(scaleAnim, {
49
+ toValue: 0,
50
+ duration: 500,
51
+ useNativeDriver: true,
52
+ }),
53
+ Animated.timing(translateXAnim, {
54
+ toValue: Dimensions.get('window').width * 0.5,
55
+ duration: 500,
56
+ useNativeDriver: true,
57
+ }),
58
+ Animated.timing(translateYAnim, {
59
+ toValue: Dimensions.get('window').height * 0.3,
60
+ duration: 500,
61
+ useNativeDriver: true,
62
+ }),
63
+ ]).start(() => {
64
+ sessionStorage.removeSession({ sessionId: session.id });
65
+ scaleAnim.setValue(1);
66
+ translateXAnim.setValue(0);
67
+ translateYAnim.setValue(0);
68
+ });
69
+ }, [scaleAnim, session, translateXAnim, translateYAnim]);
70
+ const renderActionButton = (trans, iconName, color, onPress) => {
71
+ return (<Animated.View style={[styles.actionView, { transform: [{ translateX: trans }] }]}>
72
+ <RectButton onPress={onPress}>
73
+ <View style={[
74
+ styles.action,
75
+ { borderColor: color, backgroundColor: Colors.backgroundColor },
76
+ ]}>
77
+ <Icon name={iconName} style={[
78
+ styles.icon,
79
+ { color: Colors.secondaryColor_dark.background },
80
+ ]}/>
81
+ </View>
82
+ </RectButton>
83
+ </Animated.View>);
84
+ };
85
+ const renderRightActions = (_, dragX) => {
86
+ const trans = dragX.interpolate({
87
+ inputRange: [0, 100],
88
+ outputRange: [0, 1],
89
+ });
90
+ return (<View style={styles.actionsContainer}>
91
+ {renderActionButton(trans, 'pencil-alt', Colors.infoColor.background, handleEdition)}
92
+ {renderActionButton(trans, 'trash-alt', Colors.errorColor.background, animateRemoval)}
93
+ </View>);
94
+ };
95
+ useEffect(() => {
96
+ if (isUnactive) {
97
+ handleCloseSwipe();
98
+ }
99
+ }, [isUnactive]);
100
+ return (<GestureHandlerRootView style={styles.swipeContainer}>
101
+ <Swipeable ref={ref} renderRightActions={renderRightActions}>
102
+ <TouchableOpacity onLongPress={() => {
103
+ ref.current.openRight();
104
+ }} onPress={handleConnection} activeOpacity={0.9}>
105
+ <Animated.View style={[
106
+ {
107
+ transform: [
108
+ { translateX: translateXAnim },
109
+ { translateY: translateYAnim },
110
+ { scale: scaleAnim },
111
+ ],
112
+ },
113
+ ]}>
114
+ <Card style={[
115
+ styles.cardContainer,
116
+ {
117
+ borderColor: session?.isDefault
118
+ ? Colors.primaryColor.background
119
+ : Colors.secondaryColor_dark.background,
120
+ },
121
+ ]}>
122
+ <View style={styles.imageContainer}>
123
+ <LogoImage logoFile={logoFile} url={session.url}/>
124
+ </View>
125
+ <View style={styles.textContainer}>
126
+ <Text writingType="title" fontSize={18}>
127
+ {session.name}
128
+ </Text>
129
+ <Text writingType="details" numberOfLines={1}>{`Url: ${session.url}`}</Text>
130
+ </View>
131
+ </Card>
132
+ </Animated.View>
133
+ </TouchableOpacity>
134
+ </Swipeable>
135
+ </GestureHandlerRootView>);
136
+ };
137
+ const styles = StyleSheet.create({
138
+ swipeContainer: {
139
+ width: Dimensions.get('window').width,
140
+ },
141
+ cardContainer: {
142
+ alignSelf: 'center',
143
+ flexDirection: 'row',
144
+ alignItems: 'center',
145
+ marginVertical: 4,
146
+ width: '90%',
147
+ height: 100,
148
+ borderWidth: 1,
149
+ },
150
+ imageContainer: {
151
+ width: '20%',
152
+ height: 100,
153
+ },
154
+ textContainer: {
155
+ flexDirection: 'column',
156
+ width: '70%',
157
+ marginLeft: 20,
158
+ },
159
+ actionsContainer: {
160
+ width: 50,
161
+ marginLeft: -15,
162
+ marginRight: 20,
163
+ marginVertical: 2,
164
+ flexDirection: 'column',
165
+ },
166
+ actionView: {
167
+ flex: 1,
168
+ },
169
+ action: {
170
+ width: '100%',
171
+ height: '90%',
172
+ alignSelf: 'center',
173
+ justifyContent: 'center',
174
+ alignItems: 'center',
175
+ borderWidth: 2,
176
+ borderRadius: 10,
177
+ marginVertical: 2,
178
+ marginHorizontal: 4,
179
+ },
180
+ icon: {
181
+ fontSize: 18,
182
+ },
183
+ });
184
+ export default SessionCard;
185
+ //# sourceMappingURL=SessionCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionCard.js","sourceRoot":"","sources":["../../../../src/sessions/components/display/SessionCard.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AAC5D,OAAO,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,gBAAgB,EAChB,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,sBAAsB,EAAE,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAChF,OAAO,SAAS,MAAM,wCAAwC,CAAC;AAC/D,OAAO,IAAI,MAAM,wCAAwC,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,uBAAuB,CAAC;AAChE,OA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,EAAE;QACJ,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -0,0 +1,10 @@
1
+ export default SessionListCard;
2
+ declare function SessionListCard({ logoFile, sessionList, changeActiveSession, openConnection, openEdition, openCreation, session, }: {
3
+ logoFile: any;
4
+ sessionList: any;
5
+ changeActiveSession: any;
6
+ openConnection: any;
7
+ openEdition: any;
8
+ openCreation: any;
9
+ session: any;
10
+ }): JSX.Element;
@@ -0,0 +1,75 @@
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 { ScrollView, StyleSheet, View, Dimensions } from 'react-native';
20
+ import { useThemeColor, Icon } from '@axelor/aos-mobile-ui';
21
+ import { SessionCard } from '../../components';
22
+ const SessionListCard = ({ logoFile, sessionList, changeActiveSession, openConnection, openEdition, openCreation, session, }) => {
23
+ const Colors = useThemeColor();
24
+ const sessions = useMemo(() => sessionList, [sessionList]);
25
+ const styles = useMemo(() => getStyles(Colors), [Colors]);
26
+ return (<View style={styles.container}>
27
+ <View style={styles.iconContainer}>
28
+ <Icon name="plus" style={styles.iconPlus} touchable={true} onPress={openCreation}/>
29
+ </View>
30
+ {!Array.isArray(sessions) || sessions?.length === 0 ? null : (<ScrollView contentContainerStyle={styles.contentContainer} style={styles.scrollView}>
31
+ {sessions.map(_session => (<SessionCard key={_session.id} session={_session} changeActiveSession={changeActiveSession} openConnection={openConnection} openEdition={openEdition} isUnactive={_session.id !== session?.id} logoFile={logoFile}/>))}
32
+ </ScrollView>)}
33
+ </View>);
34
+ };
35
+ const getStyles = Colors => StyleSheet.create({
36
+ container: {
37
+ maxHeight: Dimensions.get('window').height * 0.45,
38
+ width: '100%',
39
+ },
40
+ scrollView: {
41
+ width: '100%',
42
+ },
43
+ contentContainer: {
44
+ alignItems: 'center',
45
+ paddingHorizontal: '5%',
46
+ },
47
+ iconContainer: {
48
+ alignSelf: 'flex-end',
49
+ flexDirection: 'row',
50
+ marginRight: 20,
51
+ },
52
+ icon: {
53
+ marginHorizontal: 4,
54
+ },
55
+ details: {
56
+ fontStyle: 'italic',
57
+ },
58
+ iconPlus: {
59
+ margin: 4,
60
+ alignSelf: 'center',
61
+ justifyContent: 'center',
62
+ alignItems: 'center',
63
+ backgroundColor: Colors.secondaryColor_dark.foreground,
64
+ borderWidth: 1,
65
+ borderColor: Colors.primaryColor.background,
66
+ borderRadius: 10,
67
+ width: 30,
68
+ height: 30,
69
+ },
70
+ textIndicationStyle: {
71
+ width: Dimensions.get('window').width * 0.65,
72
+ },
73
+ });
74
+ export default SessionListCard;
75
+ //# sourceMappingURL=SessionListCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionListCard.js","sourceRoot":"","sources":["../../../../src/sessions/components/display/SessionListCard.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AACtE,OAAO,EAAC,aAAa,EAAE,IAAI,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,MAAM,eAAe,GAAG,CAAC,EACvB,QAAQ,EACR,WAAW,EACX,mBAAmB,E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from './SessionCard';
3
+ export { default as SessionListCard } from './SessionListCard';
@@ -0,0 +1,21 @@
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 LogoImage } from './LogoImage';
19
+ export { default as SessionCard } from './SessionCard';
20
+ export { default as SessionListCard } from './SessionListCard';
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sessions/components/display/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mBAAmB,CAAC"}
@@ -33,10 +33,10 @@ const ErrorText = ({ error, style }) => {
33
33
  }, [error]);
34
34
  const errorMessage = useMemo(() => {
35
35
  if (errorCode === LOGIN_ERROR) {
36
- return I18n.t('Auth_WrongPasswordOrUserName');
36
+ return I18n.t('Base_Connection_WrongPasswordOrUserName');
37
37
  }
38
38
  if (errorCode === URL_ERROR) {
39
- return `${I18n.t('Auth_InvalidUrl')}: ${error.url}`;
39
+ return `${I18n.t('Base_Connection_InvalidUrl')}: ${error.url}`;
40
40
  }
41
41
  return error?.message;
42
42
  }, [I18n, error, errorCode]);
@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