@axelor/aos-mobile-core 7.1.0 → 7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/lib/api/metafile-api.d.ts +1 -0
  2. package/lib/api/metafile-api.js +6 -1
  3. package/lib/api/metafile-api.js.map +1 -1
  4. package/lib/apiProviders/utils.d.ts +7 -7
  5. package/lib/apiProviders/utils.js +18 -22
  6. package/lib/apiProviders/utils.js.map +1 -1
  7. package/lib/app/Module.d.ts +15 -2
  8. package/lib/auth/api/user-api.js +5 -3
  9. package/lib/auth/api/user-api.js.map +1 -1
  10. package/lib/auth/features/userSlice.js +7 -1
  11. package/lib/auth/features/userSlice.js.map +1 -1
  12. package/lib/auth/i18n/en.json +0 -16
  13. package/lib/auth/i18n/fr.json +0 -16
  14. package/lib/auth/index.js +1 -0
  15. package/lib/auth/index.js.map +1 -1
  16. package/lib/auth/models/objectFields.js +14 -0
  17. package/lib/auth/models/objectFields.js.map +1 -1
  18. package/lib/components/molecules/UploadFileInput/UploadFileInput.d.ts +8 -3
  19. package/lib/components/molecules/UploadFileInput/UploadFileInput.js +111 -19
  20. package/lib/components/molecules/UploadFileInput/UploadFileInput.js.map +1 -1
  21. package/lib/components/molecules/index.d.ts +0 -3
  22. package/lib/components/molecules/index.js +0 -3
  23. package/lib/components/molecules/index.js.map +1 -1
  24. package/lib/components/organisms/DateInput/DateInput.d.ts +2 -1
  25. package/lib/components/organisms/DateInput/DateInput.js +8 -5
  26. package/lib/components/organisms/DateInput/DateInput.js.map +1 -1
  27. package/lib/components/organisms/index.d.ts +1 -6
  28. package/lib/components/organisms/index.js +1 -6
  29. package/lib/components/organisms/index.js.map +1 -1
  30. package/lib/components/templates/index.d.ts +0 -3
  31. package/lib/components/templates/index.js +0 -3
  32. package/lib/components/templates/index.js.map +1 -1
  33. package/lib/header/HeaderActionsProvider.d.ts +3 -4
  34. package/lib/header/HeaderActionsProvider.js +16 -10
  35. package/lib/header/HeaderActionsProvider.js.map +1 -1
  36. package/lib/header/index.d.ts +2 -1
  37. package/lib/header/index.js +2 -1
  38. package/lib/header/index.js.map +1 -1
  39. package/lib/i18n/hooks/use-translator.d.ts +1 -1
  40. package/lib/i18n/translations/en.json +34 -4
  41. package/lib/i18n/translations/fr.json +34 -4
  42. package/lib/navigator/Navigator.js +19 -7
  43. package/lib/navigator/Navigator.js.map +1 -1
  44. package/lib/navigator/drawer/DrawerContent.js +39 -21
  45. package/lib/navigator/drawer/DrawerContent.js.map +1 -1
  46. package/lib/navigator/drawer/Header.js +26 -6
  47. package/lib/navigator/drawer/Header.js.map +1 -1
  48. package/lib/navigator/drawer/Menu.d.ts +2 -1
  49. package/lib/navigator/drawer/Menu.js +42 -17
  50. package/lib/navigator/drawer/Menu.js.map +1 -1
  51. package/lib/navigator/drawer/MenuItem.d.ts +8 -5
  52. package/lib/navigator/drawer/MenuItem.js +11 -51
  53. package/lib/navigator/drawer/MenuItem.js.map +1 -1
  54. package/lib/navigator/drawer/MenuItemEntry.d.ts +12 -0
  55. package/lib/navigator/drawer/MenuItemEntry.js +89 -0
  56. package/lib/navigator/drawer/MenuItemEntry.js.map +1 -0
  57. package/lib/navigator/drawer/SubMenuItem.d.ts +7 -0
  58. package/lib/navigator/drawer/SubMenuItem.js +34 -0
  59. package/lib/navigator/drawer/SubMenuItem.js.map +1 -0
  60. package/lib/navigator/drawer/SubMenuItemList.d.ts +10 -0
  61. package/lib/navigator/drawer/SubMenuItemList.js +46 -0
  62. package/lib/navigator/drawer/SubMenuItemList.js.map +1 -0
  63. package/lib/navigator/menu.helper.d.ts +9 -0
  64. package/lib/navigator/menu.helper.js +92 -0
  65. package/lib/navigator/menu.helper.js.map +1 -1
  66. package/lib/navigator/module.helper.d.ts +5 -0
  67. package/lib/navigator/module.helper.js +37 -1
  68. package/lib/navigator/module.helper.js.map +1 -1
  69. package/lib/screens/LoginScreen.js +47 -73
  70. package/lib/screens/LoginScreen.js.map +1 -1
  71. package/lib/screens/SessionManagementScreen.js +41 -21
  72. package/lib/screens/SessionManagementScreen.js.map +1 -1
  73. package/lib/sessions/SessionStorage.d.ts +4 -5
  74. package/lib/sessions/SessionStorage.js +30 -22
  75. package/lib/sessions/SessionStorage.js.map +1 -1
  76. package/lib/{components/templates/PopupCreateSession → sessions/components/alerts}/PopupCreateSession.d.ts +2 -2
  77. package/lib/sessions/components/alerts/PopupCreateSession.js +128 -0
  78. package/lib/sessions/components/alerts/PopupCreateSession.js.map +1 -0
  79. package/lib/sessions/components/alerts/PopupEditSession.d.ts +8 -0
  80. package/lib/sessions/components/alerts/PopupEditSession.js +83 -0
  81. package/lib/sessions/components/alerts/PopupEditSession.js.map +1 -0
  82. package/lib/sessions/components/alerts/PopupSession.d.ts +9 -0
  83. package/lib/sessions/components/alerts/PopupSession.js +84 -0
  84. package/lib/sessions/components/alerts/PopupSession.js.map +1 -0
  85. package/lib/sessions/components/alerts/index.d.ts +3 -0
  86. package/lib/sessions/components/alerts/index.js +21 -0
  87. package/lib/sessions/components/alerts/index.js.map +1 -0
  88. package/lib/sessions/components/buttons/DisabledButton.d.ts +7 -0
  89. package/lib/{components/molecules/LoginButton/LoginButton.js → sessions/components/buttons/DisabledButton.js} +5 -5
  90. package/lib/sessions/components/buttons/DisabledButton.js.map +1 -0
  91. package/lib/sessions/components/buttons/LoginButton.js +24 -0
  92. package/lib/sessions/components/buttons/LoginButton.js.map +1 -0
  93. package/lib/sessions/components/buttons/UpdateButton.d.ts +6 -0
  94. package/lib/sessions/components/buttons/UpdateButton.js +24 -0
  95. package/lib/sessions/components/buttons/UpdateButton.js.map +1 -0
  96. package/lib/sessions/components/buttons/index.d.ts +3 -0
  97. package/lib/sessions/components/buttons/index.js +21 -0
  98. package/lib/sessions/components/buttons/index.js.map +1 -0
  99. package/lib/sessions/components/display/LogoImage.js.map +1 -0
  100. package/lib/sessions/components/display/SessionCard.d.ts +9 -0
  101. package/lib/sessions/components/display/SessionCard.js +185 -0
  102. package/lib/sessions/components/display/SessionCard.js.map +1 -0
  103. package/lib/sessions/components/display/SessionListCard.d.ts +10 -0
  104. package/lib/sessions/components/display/SessionListCard.js +78 -0
  105. package/lib/sessions/components/display/SessionListCard.js.map +1 -0
  106. package/lib/sessions/components/display/index.d.ts +3 -0
  107. package/lib/sessions/components/display/index.js +21 -0
  108. package/lib/sessions/components/display/index.js.map +1 -0
  109. package/lib/{components/molecules/ErrorText → sessions/components/error}/ErrorText.js +2 -2
  110. package/lib/sessions/components/error/ErrorText.js.map +1 -0
  111. package/lib/sessions/components/error/index.d.ts +1 -0
  112. package/lib/sessions/components/error/index.js +19 -0
  113. package/lib/sessions/components/error/index.js.map +1 -0
  114. package/lib/sessions/components/index.d.ts +5 -0
  115. package/lib/sessions/components/index.js +23 -0
  116. package/lib/sessions/components/index.js.map +1 -0
  117. package/lib/sessions/components/inputs/DefaultCheckbox.d.ts +8 -0
  118. package/lib/sessions/components/inputs/DefaultCheckbox.js +36 -0
  119. package/lib/sessions/components/inputs/DefaultCheckbox.js.map +1 -0
  120. package/lib/{components/organisms/PasswordInput → sessions/components/inputs}/PasswordInput.d.ts +2 -1
  121. package/lib/{components/organisms/PasswordInput → sessions/components/inputs}/PasswordInput.js +5 -2
  122. package/lib/sessions/components/inputs/PasswordInput.js.map +1 -0
  123. package/lib/sessions/components/inputs/SessionInputs.d.ts +12 -0
  124. package/lib/sessions/components/inputs/SessionInputs.js +177 -0
  125. package/lib/sessions/components/inputs/SessionInputs.js.map +1 -0
  126. package/lib/{components/organisms/SessionNameInput → sessions/components/inputs}/SessionNameInput.d.ts +2 -1
  127. package/lib/{components/organisms/SessionNameInput → sessions/components/inputs}/SessionNameInput.js +5 -2
  128. package/lib/sessions/components/inputs/SessionNameInput.js.map +1 -0
  129. package/lib/{components/organisms/UrlInput → sessions/components/inputs}/UrlInput.d.ts +2 -1
  130. package/lib/{components/organisms/UrlInput → sessions/components/inputs}/UrlInput.js +14 -3
  131. package/lib/sessions/components/inputs/UrlInput.js.map +1 -0
  132. package/lib/{components/organisms/UsernameInput → sessions/components/inputs}/UsernameInput.js +10 -2
  133. package/lib/sessions/components/inputs/UsernameInput.js.map +1 -0
  134. package/lib/sessions/components/inputs/index.d.ts +6 -0
  135. package/lib/sessions/components/inputs/index.js +24 -0
  136. package/lib/sessions/components/inputs/index.js.map +1 -0
  137. package/lib/sessions/hook.d.ts +1 -1
  138. package/lib/sessions/hook.js +5 -5
  139. package/lib/sessions/hook.js.map +1 -1
  140. package/lib/sessions/index.d.ts +2 -1
  141. package/lib/sessions/index.js +2 -1
  142. package/lib/sessions/index.js.map +1 -1
  143. package/lib/sessions/type.d.ts +2 -1
  144. package/lib/sessions/type.js.map +1 -1
  145. package/lib/sessions/utils.d.ts +2 -1
  146. package/lib/sessions/utils.js +26 -7
  147. package/lib/sessions/utils.js.map +1 -1
  148. package/lib/tools/ContactProvider.d.ts +9 -0
  149. package/lib/tools/ContactProvider.js +98 -0
  150. package/lib/tools/ContactProvider.js.map +1 -0
  151. package/lib/tools/contact.helper.d.ts +21 -0
  152. package/lib/tools/contact.helper.js +136 -0
  153. package/lib/tools/contact.helper.js.map +1 -0
  154. package/lib/tools/index.d.ts +1 -0
  155. package/lib/tools/index.js +1 -0
  156. package/lib/tools/index.js.map +1 -1
  157. package/lib/utils/date.d.ts +16 -0
  158. package/lib/utils/date.js +41 -0
  159. package/lib/utils/date.js.map +1 -1
  160. package/lib/utils/index.d.ts +1 -1
  161. package/lib/utils/index.js +1 -1
  162. package/lib/utils/index.js.map +1 -1
  163. package/package.json +8 -5
  164. package/lib/components/molecules/ErrorText/ErrorText.js.map +0 -1
  165. package/lib/components/molecules/LoginButton/LoginButton.js.map +0 -1
  166. package/lib/components/molecules/SessionNumberIndicator/SessionNumberIndicator.d.ts +0 -4
  167. package/lib/components/molecules/SessionNumberIndicator/SessionNumberIndicator.js +0 -44
  168. package/lib/components/molecules/SessionNumberIndicator/SessionNumberIndicator.js.map +0 -1
  169. package/lib/components/organisms/LogoImage/LogoImage.js.map +0 -1
  170. package/lib/components/organisms/PasswordInput/PasswordInput.js.map +0 -1
  171. package/lib/components/organisms/SessionButtons/SessionButtons.d.ts +0 -17
  172. package/lib/components/organisms/SessionButtons/SessionButtons.js +0 -93
  173. package/lib/components/organisms/SessionButtons/SessionButtons.js.map +0 -1
  174. package/lib/components/organisms/SessionNameInput/SessionNameInput.js.map +0 -1
  175. package/lib/components/organisms/UrlInput/UrlInput.js.map +0 -1
  176. package/lib/components/organisms/UsernameInput/UsernameInput.js.map +0 -1
  177. package/lib/components/templates/PopupCreateSession/PopupCreateSession.js +0 -171
  178. package/lib/components/templates/PopupCreateSession/PopupCreateSession.js.map +0 -1
  179. package/lib/components/templates/PopupSession/PopupSession.d.ts +0 -8
  180. package/lib/components/templates/PopupSession/PopupSession.js +0 -135
  181. package/lib/components/templates/PopupSession/PopupSession.js.map +0 -1
  182. package/lib/components/templates/PopupSessionList/PopupSessionList.d.ts +0 -7
  183. package/lib/components/templates/PopupSessionList/PopupSessionList.js +0 -107
  184. package/lib/components/templates/PopupSessionList/PopupSessionList.js.map +0 -1
  185. /package/lib/{components/molecules/LoginButton → sessions/components/buttons}/LoginButton.d.ts +0 -0
  186. /package/lib/{components/organisms/LogoImage → sessions/components/display}/LogoImage.d.ts +0 -0
  187. /package/lib/{components/organisms/LogoImage → sessions/components/display}/LogoImage.js +0 -0
  188. /package/lib/{components/molecules/ErrorText → sessions/components/error}/ErrorText.d.ts +0 -0
  189. /package/lib/{components/organisms/UsernameInput → sessions/components/inputs}/UsernameInput.d.ts +0 -0
@@ -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;;;;;;;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;QAChB,KAAK,EAAE,EAAE;QACT,UAAU,EAAE,CAAC,EAAE;QACf,WAAW,EAAE,EAAE;QACf,cAAc,EAAE,CAAC;QACjB,aAAa,EAAE,QAAQ;KACxB;IACD,UAAU,EAAE;QACV,IAAI,EAAE,CAAC;KACR;IACD,MAAM,EAAE;QACN,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,KAAK;QACb,SAAS,EAAE,QAAQ;QACnB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,CAAC;QACjB,gBAAgB,EAAE,CAAC;KACpB;IACD,IAAI,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,78 @@
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
+ if (!Array.isArray(sessions) || sessions?.length === 0) {
27
+ return null;
28
+ }
29
+ return (<View style={styles.container}>
30
+ <View style={styles.iconContainer}>
31
+ <Icon name="plus" style={styles.iconPlus} touchable={true} onPress={openCreation}/>
32
+ </View>
33
+ <ScrollView contentContainerStyle={styles.contentContainer} style={styles.scrollView}>
34
+ {sessions.map(_session => (<SessionCard key={_session.id} session={_session} changeActiveSession={changeActiveSession} openConnection={openConnection} openEdition={openEdition} isUnactive={_session.id !== session?.id} logoFile={logoFile}/>))}
35
+ </ScrollView>
36
+ </View>);
37
+ };
38
+ const getStyles = Colors => StyleSheet.create({
39
+ container: {
40
+ maxHeight: Dimensions.get('window').height * 0.45,
41
+ width: '100%',
42
+ },
43
+ scrollView: {
44
+ width: '100%',
45
+ },
46
+ contentContainer: {
47
+ alignItems: 'center',
48
+ paddingHorizontal: '5%',
49
+ },
50
+ iconContainer: {
51
+ alignSelf: 'flex-end',
52
+ flexDirection: 'row',
53
+ marginRight: 20,
54
+ },
55
+ icon: {
56
+ marginHorizontal: 4,
57
+ },
58
+ details: {
59
+ fontStyle: 'italic',
60
+ },
61
+ iconPlus: {
62
+ margin: 4,
63
+ alignSelf: 'center',
64
+ justifyContent: 'center',
65
+ alignItems: 'center',
66
+ backgroundColor: Colors.secondaryColor_dark.foreground,
67
+ borderWidth: 1,
68
+ borderColor: Colors.primaryColor.background,
69
+ borderRadius: 10,
70
+ width: 30,
71
+ height: 30,
72
+ },
73
+ textIndicationStyle: {
74
+ width: Dimensions.get('window').width * 0.65,
75
+ },
76
+ });
77
+ export default SessionListCard;
78
+ //# 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,EACnB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,OAAO,GACR,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAE3D,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAE1D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,EAAE,MAAM,KAAK,CAAC,EAAE;QACtD,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAChC;QAAA,CAAC,IAAI,CACH,IAAI,CAAC,MAAM,CACX,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CACvB,SAAS,CAAC,CAAC,IAAI,CAAC,CAChB,OAAO,CAAC,CAAC,YAAY,CAAC,EAE1B;MAAA,EAAE,IAAI,CAC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AE,QAAQ;QACpB,eAAe,EAAE,MAAM,CAAC,mBAAmB,CAAC,UAAU;QACtD,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,MAAM,CAAC,YAAY,CAAC,UAAU;QAC3C,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;KACX;IACD,mBAAmB,EAAE;QACnB,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,IAAI;KAC7C;CACF,CAAC,CAAC;AAEL,eAAe,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as LogoImage } from './LogoImage';
2
+ export { default as SessionCard } 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]);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorText.js","sourceRoot":"","sources":["../../../../src/sessions/components/error/ErrorText.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAExC,MAAM,gBAAgB,GAAG,SAAS,CAAC;AACnC,MAAM,WAAW,GAAG,GAAG,CAAC;AACxB,MAAM,SAAS,GAAG,GAAG,CAAC;AAEtB,MAAM,SAAS,GAAG,CAAC,EAAC,KAAK,EAAE,KAAK,EAAC,EAAE,EAAE;IACnC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE;QAC7B,IAAI,KAAK,EAAE,OAAO,IAAI,IAAI,EAAE;YAC1B,OAAO,IAAI,CAAC;SACb;QAED,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;QAE7D,OAAO,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAC9D,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE;QAChC,IAAI,SAAS,KAAK,WAAW,EAAE;YAC7B,OAAO,IAAI,CAAC,CAAC,CAAC,yCAAyC,CAAC,CAAC;SAC1D;QAED,IAAI,SAAS,KAAK,SAAS,EAAE;YAC3B,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,4BAA4B,CAAC,KAAK,KAAK,CAAC,GAAG,EAAE,CAAC;SAChE;QAED,OAAO,KAAK,EAAE,OAAO,CAAC;IACxB,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;IAE7B,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,EAAG,CACzE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
@@ -0,0 +1 @@
1
+ export { default as ErrorText } from './ErrorText';
@@ -0,0 +1,19 @@
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 ErrorText } from './ErrorText';
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sessions/components/error/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './alerts';
2
+ export * from './buttons';
3
+ export * from './display';
4
+ export * from './error';
5
+ export * from './inputs';
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ export * from './alerts';
19
+ export * from './buttons';
20
+ export * from './display';
21
+ export * from './error';
22
+ export * from './inputs';
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sessions/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface props {
2
+ style?: any;
3
+ value?: boolean;
4
+ onChange?: (value: boolean) => void;
5
+ hidden?: boolean;
6
+ }
7
+ declare const DefaultCheckbox: ({ style, value, onChange, hidden }: props) => JSX.Element;
8
+ export default DefaultCheckbox;
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React from 'react';
19
+ import { StyleSheet } from 'react-native';
20
+ import { Checkbox } from '@axelor/aos-mobile-ui';
21
+ import { useTranslator } from '../../../i18n';
22
+ const DefaultCheckbox = ({ style, value, onChange, hidden = false }) => {
23
+ const I18n = useTranslator();
24
+ if (hidden) {
25
+ return null;
26
+ }
27
+ return (<Checkbox title={I18n.t('Base_Connection_DefaultSession')} isDefaultChecked={value} onChange={onChange} iconSize={30} style={[styles.checkbox, style]}/>);
28
+ };
29
+ const styles = StyleSheet.create({
30
+ checkbox: {
31
+ alignSelf: 'flex-start',
32
+ marginLeft: 20,
33
+ },
34
+ });
35
+ export default DefaultCheckbox;
36
+ //# sourceMappingURL=DefaultCheckbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultCheckbox.js","sourceRoot":"","sources":["../../../../src/sessions/components/inputs/DefaultCheckbox.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAS5C,MAAM,eAAe,GAAG,CAAC,EAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,GAAG,KAAK,EAAQ,EAAE,EAAE;IAC1E,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,IAAI,MAAM,EAAE;QACV,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,CAAC,QAAQ,CACP,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAChD,gBAAgB,CAAC,CAAC,KAAK,CAAC,CACxB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,QAAQ,CAAC,CAAC,EAAE,CAAC,CACb,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,EAChC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE;QACR,SAAS,EAAE,YAAY;QACvB,UAAU,EAAE,EAAE;KACf;CACF,CAAC,CAAC;AAEH,eAAe,eAAe,CAAC"}
@@ -1,8 +1,9 @@
1
1
  export default PasswordInput;
2
- declare function PasswordInput({ style, value, onChange, readOnly, showRequiredFields, }: {
2
+ declare function PasswordInput({ style, value, onChange, readOnly, showRequiredFields, hidden, }: {
3
3
  style: any;
4
4
  value: any;
5
5
  onChange: any;
6
6
  readOnly: any;
7
7
  showRequiredFields?: boolean;
8
+ hidden?: boolean;
8
9
  }): JSX.Element;
@@ -20,12 +20,15 @@ import { StyleSheet } from 'react-native';
20
20
  import { getCommonStyles, Icon, IconInput, useThemeColor, } from '@axelor/aos-mobile-ui';
21
21
  import useTranslator from '../../../i18n/hooks/use-translator';
22
22
  import { checkNullString } from '../../../utils';
23
- const PasswordInput = ({ style, value, onChange, readOnly, showRequiredFields = false, }) => {
23
+ const PasswordInput = ({ style, value, onChange, readOnly, showRequiredFields = false, hidden = false, }) => {
24
24
  const I18n = useTranslator();
25
25
  const Colors = useThemeColor();
26
26
  const [visible, setVisible] = useState(false);
27
27
  const commonStyles = useMemo(() => getCommonStyles(Colors, checkNullString(value)), [Colors, value]);
28
- return (<IconInput style={[style, showRequiredFields ? commonStyles.inputFocused : null]} value={value} onChange={onChange} readOnly={readOnly} required={true} secureTextEntry={!visible} placeholder={I18n.t('Auth_Password')} leftIconsList={[<Icon name="key" size={17} style={styles.icon}/>]} rightIconsList={[
28
+ if (hidden) {
29
+ return null;
30
+ }
31
+ return (<IconInput style={[style, showRequiredFields ? commonStyles.inputFocused : null]} value={value} onChange={onChange} readOnly={readOnly} required={true} secureTextEntry={!visible} placeholder={I18n.t('Base_Connection_Password')} leftIconsList={[<Icon name="key" size={17} style={styles.icon}/>]} rightIconsList={[
29
32
  <Icon name={visible ? 'eye' : 'eye-slash'} size={17} touchable={true} onPress={() => setVisible(!visible)} style={styles.icon}/>,
30
33
  ]}/>);
31
34
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasswordInput.js","sourceRoot":"","sources":["../../../../src/sessions/components/inputs/PasswordInput.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EACL,eAAe,EACf,IAAI,EACJ,SAAS,EACT,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,aAAa,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAE/C,MAAM,aAAa,GAAG,CAAC,EACrB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,kBAAkB,GAAG,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CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CACpC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EACnB;SACH,CAAC,EACF,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,CAAC;KACV;CACF,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
@@ -0,0 +1,12 @@
1
+ export default SessionInputs;
2
+ declare function SessionInputs({ style, sessionList, session, showUrlInput, loading, mode, showPopup, onValidation, hidden, }: {
3
+ style: any;
4
+ sessionList: any;
5
+ session: any;
6
+ showUrlInput: any;
7
+ loading: any;
8
+ mode: any;
9
+ showPopup: any;
10
+ onValidation: any;
11
+ hidden: any;
12
+ }): JSX.Element;