@axelor/aos-mobile-ui 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/README.md +234 -0
  2. package/lib/components/atoms/BlockInteractionScreen/BlockInteractionScreen.d.ts +7 -0
  3. package/lib/components/atoms/BlockInteractionScreen/BlockInteractionScreen.js +50 -0
  4. package/lib/components/atoms/BlockInteractionScreen/BlockInteractionScreen.js.map +1 -0
  5. package/lib/components/atoms/Card/Card.d.ts +6 -0
  6. package/lib/components/atoms/Card/Card.js +37 -0
  7. package/lib/components/atoms/Card/Card.js.map +1 -0
  8. package/lib/components/atoms/DottedLine/DottedLine.d.ts +5 -0
  9. package/lib/components/atoms/DottedLine/DottedLine.js +38 -0
  10. package/lib/components/atoms/DottedLine/DottedLine.js.map +1 -0
  11. package/lib/components/atoms/HorizontalRule/HorizontalRule.d.ts +5 -0
  12. package/lib/components/atoms/HorizontalRule/HorizontalRule.js +35 -0
  13. package/lib/components/atoms/HorizontalRule/HorizontalRule.js.map +1 -0
  14. package/lib/components/atoms/HtmlInput/HtmlInput.d.ts +9 -0
  15. package/lib/components/atoms/HtmlInput/HtmlInput.js +50 -0
  16. package/lib/components/atoms/HtmlInput/HtmlInput.js.map +1 -0
  17. package/lib/components/atoms/Icon/Icon.d.ts +13 -0
  18. package/lib/components/atoms/Icon/Icon.js +49 -0
  19. package/lib/components/atoms/Icon/Icon.js.map +1 -0
  20. package/lib/components/atoms/Input/Input.d.ts +18 -0
  21. package/lib/components/atoms/Input/Input.js +37 -0
  22. package/lib/components/atoms/Input/Input.js.map +1 -0
  23. package/lib/components/atoms/RenderHtml/RenderHtml.d.ts +6 -0
  24. package/lib/components/atoms/RenderHtml/RenderHtml.js +50 -0
  25. package/lib/components/atoms/RenderHtml/RenderHtml.js.map +1 -0
  26. package/lib/components/atoms/Screen/Screen.d.ts +9 -0
  27. package/lib/components/atoms/Screen/Screen.js +74 -0
  28. package/lib/components/atoms/Screen/Screen.js.map +1 -0
  29. package/lib/components/atoms/ScrollView/ScrollView.d.ts +6 -0
  30. package/lib/components/atoms/ScrollView/ScrollView.js +33 -0
  31. package/lib/components/atoms/ScrollView/ScrollView.js.map +1 -0
  32. package/lib/components/atoms/Switch/Switch.d.ts +6 -0
  33. package/lib/components/atoms/Switch/Switch.js +34 -0
  34. package/lib/components/atoms/Switch/Switch.js.map +1 -0
  35. package/lib/components/atoms/Text/Text.d.ts +12 -0
  36. package/lib/components/atoms/Text/Text.js +37 -0
  37. package/lib/components/atoms/Text/Text.js.map +1 -0
  38. package/lib/components/atoms/index.d.ts +12 -0
  39. package/lib/components/atoms/index.js +30 -0
  40. package/lib/components/atoms/index.js.map +1 -0
  41. package/lib/components/index.d.ts +3 -0
  42. package/lib/components/index.js +21 -0
  43. package/lib/components/index.js.map +1 -0
  44. package/lib/components/molecules/AttachmentCard/AttachmentCard.d.ts +8 -0
  45. package/lib/components/molecules/AttachmentCard/AttachmentCard.js +61 -0
  46. package/lib/components/molecules/AttachmentCard/AttachmentCard.js.map +1 -0
  47. package/lib/components/molecules/Badge/Badge.d.ts +10 -0
  48. package/lib/components/molecules/Badge/Badge.js +43 -0
  49. package/lib/components/molecules/Badge/Badge.js.map +1 -0
  50. package/lib/components/molecules/Button/Button.d.ts +10 -0
  51. package/lib/components/molecules/Button/Button.js +48 -0
  52. package/lib/components/molecules/Button/Button.js.map +1 -0
  53. package/lib/components/molecules/CardIconButton/CardIconButton.d.ts +8 -0
  54. package/lib/components/molecules/CardIconButton/CardIconButton.js +42 -0
  55. package/lib/components/molecules/CardIconButton/CardIconButton.js.map +1 -0
  56. package/lib/components/molecules/Chip/Chip.d.ts +11 -0
  57. package/lib/components/molecules/Chip/Chip.js +69 -0
  58. package/lib/components/molecules/Chip/Chip.js.map +1 -0
  59. package/lib/components/molecules/ClearableCard/ClearableCard.d.ts +8 -0
  60. package/lib/components/molecules/ClearableCard/ClearableCard.js +43 -0
  61. package/lib/components/molecules/ClearableCard/ClearableCard.js.map +1 -0
  62. package/lib/components/molecules/DropdownCard/DropdownCard.d.ts +10 -0
  63. package/lib/components/molecules/DropdownCard/DropdownCard.js +84 -0
  64. package/lib/components/molecules/DropdownCard/DropdownCard.js.map +1 -0
  65. package/lib/components/molecules/DropdownMenu/DropdownMenu.d.ts +5 -0
  66. package/lib/components/molecules/DropdownMenu/DropdownMenu.js +57 -0
  67. package/lib/components/molecules/DropdownMenu/DropdownMenu.js.map +1 -0
  68. package/lib/components/molecules/DropdownMenuItem/DropdownMenuItem.d.ts +7 -0
  69. package/lib/components/molecules/DropdownMenuItem/DropdownMenuItem.js +42 -0
  70. package/lib/components/molecules/DropdownMenuItem/DropdownMenuItem.js.map +1 -0
  71. package/lib/components/molecules/EditableInput/EditableInput.d.ts +9 -0
  72. package/lib/components/molecules/EditableInput/EditableInput.js +65 -0
  73. package/lib/components/molecules/EditableInput/EditableInput.js.map +1 -0
  74. package/lib/components/molecules/FromTo/FromTo.d.ts +8 -0
  75. package/lib/components/molecules/FromTo/FromTo.js +44 -0
  76. package/lib/components/molecules/FromTo/FromTo.js.map +1 -0
  77. package/lib/components/molecules/HalfLabelCard/HalfLabelCard.d.ts +8 -0
  78. package/lib/components/molecules/HalfLabelCard/HalfLabelCard.js +51 -0
  79. package/lib/components/molecules/HalfLabelCard/HalfLabelCard.js.map +1 -0
  80. package/lib/components/molecules/HeaderIndicator/HeaderIndicator.d.ts +2 -0
  81. package/lib/components/molecules/HeaderIndicator/HeaderIndicator.js +65 -0
  82. package/lib/components/molecules/HeaderIndicator/HeaderIndicator.js.map +1 -0
  83. package/lib/components/molecules/IconButton/IconButton.d.ts +11 -0
  84. package/lib/components/molecules/IconButton/IconButton.js +48 -0
  85. package/lib/components/molecules/IconButton/IconButton.js.map +1 -0
  86. package/lib/components/molecules/IconInput/IconInput.d.ts +19 -0
  87. package/lib/components/molecules/IconInput/IconInput.js +50 -0
  88. package/lib/components/molecules/IconInput/IconInput.js.map +1 -0
  89. package/lib/components/molecules/Image/Image.d.ts +10 -0
  90. package/lib/components/molecules/Image/Image.js +36 -0
  91. package/lib/components/molecules/Image/Image.js.map +1 -0
  92. package/lib/components/molecules/Increment/Increment.d.ts +8 -0
  93. package/lib/components/molecules/Increment/Increment.js +97 -0
  94. package/lib/components/molecules/Increment/Increment.js.map +1 -0
  95. package/lib/components/molecules/InfoBubble/InfoBubble.d.ts +9 -0
  96. package/lib/components/molecules/InfoBubble/InfoBubble.js +73 -0
  97. package/lib/components/molecules/InfoBubble/InfoBubble.js.map +1 -0
  98. package/lib/components/molecules/LabelText/LabelText.d.ts +14 -0
  99. package/lib/components/molecules/LabelText/LabelText.js +45 -0
  100. package/lib/components/molecules/LabelText/LabelText.js.map +1 -0
  101. package/lib/components/molecules/LoadingIndicator/LoadingIndicator.d.ts +6 -0
  102. package/lib/components/molecules/LoadingIndicator/LoadingIndicator.js +49 -0
  103. package/lib/components/molecules/LoadingIndicator/LoadingIndicator.js.map +1 -0
  104. package/lib/components/molecules/MessageBox/MessageBox.d.ts +9 -0
  105. package/lib/components/molecules/MessageBox/MessageBox.js +60 -0
  106. package/lib/components/molecules/MessageBox/MessageBox.js.map +1 -0
  107. package/lib/components/molecules/MovementIndicationCard/MovementIndicationCard.d.ts +14 -0
  108. package/lib/components/molecules/MovementIndicationCard/MovementIndicationCard.js +66 -0
  109. package/lib/components/molecules/MovementIndicationCard/MovementIndicationCard.js.map +1 -0
  110. package/lib/components/molecules/MultiValuePickerButton/MultiValuePickerButton.d.ts +11 -0
  111. package/lib/components/molecules/MultiValuePickerButton/MultiValuePickerButton.js +80 -0
  112. package/lib/components/molecules/MultiValuePickerButton/MultiValuePickerButton.js.map +1 -0
  113. package/lib/components/molecules/NotesCard/NotesCard.d.ts +6 -0
  114. package/lib/components/molecules/NotesCard/NotesCard.js +55 -0
  115. package/lib/components/molecules/NotesCard/NotesCard.js.map +1 -0
  116. package/lib/components/molecules/PopUp/PopUp.d.ts +9 -0
  117. package/lib/components/molecules/PopUp/PopUp.js +74 -0
  118. package/lib/components/molecules/PopUp/PopUp.js.map +1 -0
  119. package/lib/components/molecules/RightIconButton/RightIconButton.d.ts +10 -0
  120. package/lib/components/molecules/RightIconButton/RightIconButton.js +49 -0
  121. package/lib/components/molecules/RightIconButton/RightIconButton.js.map +1 -0
  122. package/lib/components/molecules/SelectionContainer/SelectionContainer.d.ts +11 -0
  123. package/lib/components/molecules/SelectionContainer/SelectionContainer.js +111 -0
  124. package/lib/components/molecules/SelectionContainer/SelectionContainer.js.map +1 -0
  125. package/lib/components/molecules/StarScore/StarScore.d.ts +11 -0
  126. package/lib/components/molecules/StarScore/StarScore.js +58 -0
  127. package/lib/components/molecules/StarScore/StarScore.js.map +1 -0
  128. package/lib/components/molecules/SwitchCard/SwitchCard.d.ts +8 -0
  129. package/lib/components/molecules/SwitchCard/SwitchCard.js +31 -0
  130. package/lib/components/molecules/SwitchCard/SwitchCard.js.map +1 -0
  131. package/lib/components/molecules/TitledValue/TitledValue.d.ts +7 -0
  132. package/lib/components/molecules/TitledValue/TitledValue.js +40 -0
  133. package/lib/components/molecules/TitledValue/TitledValue.js.map +1 -0
  134. package/lib/components/molecules/ToggleSwitch/ToggleSwitch.d.ts +8 -0
  135. package/lib/components/molecules/ToggleSwitch/ToggleSwitch.js +66 -0
  136. package/lib/components/molecules/ToggleSwitch/ToggleSwitch.js.map +1 -0
  137. package/lib/components/molecules/UnorderedList/UnorderedList.d.ts +8 -0
  138. package/lib/components/molecules/UnorderedList/UnorderedList.js +51 -0
  139. package/lib/components/molecules/UnorderedList/UnorderedList.js.map +1 -0
  140. package/lib/components/molecules/ViewAllContainer/ViewAllContainer.d.ts +14 -0
  141. package/lib/components/molecules/ViewAllContainer/ViewAllContainer.js +91 -0
  142. package/lib/components/molecules/ViewAllContainer/ViewAllContainer.js.map +1 -0
  143. package/lib/components/molecules/index.d.ts +33 -0
  144. package/lib/components/molecules/index.js +51 -0
  145. package/lib/components/molecules/index.js.map +1 -0
  146. package/lib/components/organisms/AutoCompleteSearch/AutoCompleteSearch.d.ts +19 -0
  147. package/lib/components/organisms/AutoCompleteSearch/AutoCompleteSearch.js +148 -0
  148. package/lib/components/organisms/AutoCompleteSearch/AutoCompleteSearch.js.map +1 -0
  149. package/lib/components/organisms/ChipSelect/ChipSelect.d.ts +6 -0
  150. package/lib/components/organisms/ChipSelect/ChipSelect.js +39 -0
  151. package/lib/components/organisms/ChipSelect/ChipSelect.js.map +1 -0
  152. package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.d.ts +12 -0
  153. package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.js +40 -0
  154. package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.js.map +1 -0
  155. package/lib/components/organisms/HeaderContainer/HeaderContainer.d.ts +9 -0
  156. package/lib/components/organisms/HeaderContainer/HeaderContainer.js +65 -0
  157. package/lib/components/organisms/HeaderContainer/HeaderContainer.js.map +1 -0
  158. package/lib/components/organisms/ImageBubble/ImageBubble.d.ts +10 -0
  159. package/lib/components/organisms/ImageBubble/ImageBubble.js +105 -0
  160. package/lib/components/organisms/ImageBubble/ImageBubble.js.map +1 -0
  161. package/lib/components/organisms/MultiValuePicker/MultiValuePicker.d.ts +16 -0
  162. package/lib/components/organisms/MultiValuePicker/MultiValuePicker.js +103 -0
  163. package/lib/components/organisms/MultiValuePicker/MultiValuePicker.js.map +1 -0
  164. package/lib/components/organisms/Picker/Picker.d.ts +18 -0
  165. package/lib/components/organisms/Picker/Picker.js +101 -0
  166. package/lib/components/organisms/Picker/Picker.js.map +1 -0
  167. package/lib/components/organisms/PopUpOneButton/PopUpOneButton.d.ts +9 -0
  168. package/lib/components/organisms/PopUpOneButton/PopUpOneButton.js +35 -0
  169. package/lib/components/organisms/PopUpOneButton/PopUpOneButton.js.map +1 -0
  170. package/lib/components/organisms/PopUpTwoButton/PopUpTwoButton.d.ts +11 -0
  171. package/lib/components/organisms/PopUpTwoButton/PopUpTwoButton.js +38 -0
  172. package/lib/components/organisms/PopUpTwoButton/PopUpTwoButton.js.map +1 -0
  173. package/lib/components/organisms/ScrollList/ScrollList.d.ts +13 -0
  174. package/lib/components/organisms/ScrollList/ScrollList.js +70 -0
  175. package/lib/components/organisms/ScrollList/ScrollList.js.map +1 -0
  176. package/lib/components/organisms/SearchBar/SearchBar.d.ts +14 -0
  177. package/lib/components/organisms/SearchBar/SearchBar.js +44 -0
  178. package/lib/components/organisms/SearchBar/SearchBar.js.map +1 -0
  179. package/lib/components/organisms/index.d.ts +11 -0
  180. package/lib/components/organisms/index.js +29 -0
  181. package/lib/components/organisms/index.js.map +1 -0
  182. package/lib/config/ConfigContext.d.ts +26 -0
  183. package/lib/config/ConfigContext.js +184 -0
  184. package/lib/config/ConfigContext.js.map +1 -0
  185. package/lib/hooks/use-click-outside.d.ts +6 -0
  186. package/lib/hooks/use-click-outside.helper.d.ts +10 -0
  187. package/lib/hooks/use-click-outside.helper.js +35 -0
  188. package/lib/hooks/use-click-outside.helper.js.map +1 -0
  189. package/lib/hooks/use-click-outside.js +123 -0
  190. package/lib/hooks/use-click-outside.js.map +1 -0
  191. package/lib/index.d.ts +8 -0
  192. package/lib/index.js +26 -0
  193. package/lib/index.js.map +1 -0
  194. package/lib/theme/ThemeContext.d.ts +19 -0
  195. package/lib/theme/ThemeContext.js +110 -0
  196. package/lib/theme/ThemeContext.js.map +1 -0
  197. package/lib/theme/WritingThemeContext.d.ts +10 -0
  198. package/lib/theme/WritingThemeContext.js +77 -0
  199. package/lib/theme/WritingThemeContext.js.map +1 -0
  200. package/lib/theme/index.d.ts +4 -0
  201. package/lib/theme/index.js +22 -0
  202. package/lib/theme/index.js.map +1 -0
  203. package/lib/theme/themes.d.ts +32 -0
  204. package/lib/theme/themes.js +178 -0
  205. package/lib/theme/themes.js.map +1 -0
  206. package/lib/theme/writingTheme.d.ts +19 -0
  207. package/lib/theme/writingTheme.js +45 -0
  208. package/lib/theme/writingTheme.js.map +1 -0
  209. package/lib/tools/AnimationUtil.d.ts +12 -0
  210. package/lib/tools/AnimationUtil.js +40 -0
  211. package/lib/tools/AnimationUtil.js.map +1 -0
  212. package/lib/types/file.d.ts +5 -0
  213. package/lib/types/file.js +62 -0
  214. package/lib/types/file.js.map +1 -0
  215. package/lib/utils/arrays.d.ts +2 -0
  216. package/lib/utils/arrays.js +31 -0
  217. package/lib/utils/arrays.js.map +1 -0
  218. package/lib/utils/commons-styles.d.ts +34 -0
  219. package/lib/utils/commons-styles.js +53 -0
  220. package/lib/utils/commons-styles.js.map +1 -0
  221. package/lib/utils/formatters.d.ts +2 -0
  222. package/lib/utils/formatters.js +48 -0
  223. package/lib/utils/formatters.js.map +1 -0
  224. package/lib/utils/headerStyle.d.ts +12 -0
  225. package/lib/utils/headerStyle.js +31 -0
  226. package/lib/utils/headerStyle.js.map +1 -0
  227. package/lib/utils/list.d.ts +2 -0
  228. package/lib/utils/list.js +47 -0
  229. package/lib/utils/list.js.map +1 -0
  230. package/lib/utils/number.d.ts +4 -0
  231. package/lib/utils/number.js +34 -0
  232. package/lib/utils/number.js.map +1 -0
  233. package/lib/utils/strings.d.ts +2 -0
  234. package/lib/utils/strings.js +33 -0
  235. package/lib/utils/strings.js.map +1 -0
  236. package/package.json +49 -0
@@ -0,0 +1,65 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useEffect, useMemo, useRef } from 'react';
19
+ import { Animated, Dimensions, StatusBar, StyleSheet } from 'react-native';
20
+ import { useConfig } from '../../../config/ConfigContext';
21
+ import { useThemeColor } from '../../../theme/ThemeContext';
22
+ import { Text } from '../../atoms';
23
+ const HeaderIndicator = () => {
24
+ const Colors = useThemeColor();
25
+ const { isHeaderIndicatorVisible, headerIndicatorState } = useConfig();
26
+ const translation = useRef(new Animated.Value(0)).current;
27
+ const styles = useMemo(() => getStyles(headerIndicatorState.color || Colors.secondaryColor.background_light, headerIndicatorState.textColor || Colors.text, translation), [Colors, headerIndicatorState, translation]);
28
+ useEffect(() => {
29
+ Animated.timing(translation, {
30
+ toValue: isHeaderIndicatorVisible ? StatusBar.currentHeight : 0,
31
+ duration: 1500,
32
+ useNativeDriver: false,
33
+ }).start();
34
+ }, [translation, isHeaderIndicatorVisible]);
35
+ return (<Animated.View style={styles.container}>
36
+ <Text numberOfLines={1} style={styles.text}>
37
+ {headerIndicatorState.text}
38
+ </Text>
39
+ </Animated.View>);
40
+ };
41
+ const getStyles = (color, textColor, translation) => StyleSheet.create({
42
+ container: {
43
+ width: Dimensions.get('screen').width,
44
+ backgroundColor: color,
45
+ justifyContent: 'center',
46
+ alignItems: 'center',
47
+ position: 'absolute',
48
+ top: 0,
49
+ transform: [
50
+ {
51
+ translateY: translation,
52
+ },
53
+ ],
54
+ zIndex: 999,
55
+ },
56
+ text: {
57
+ maxWidth: '80%',
58
+ textAlign: 'center',
59
+ fontSize: 12,
60
+ paddingVertical: 3,
61
+ color: textColor,
62
+ },
63
+ });
64
+ export default HeaderIndicator;
65
+ //# sourceMappingURL=HeaderIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderIndicator.js","sourceRoot":"","sources":["../../../../src/components/molecules/HeaderIndicator/HeaderIndicator.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAC,QAAQ,EA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;QAAA,CAAC,oBAAoB,CAAC,IAAI,CAC5B;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,CAClD,UAAU,CAAC,MAAM,CAAC;IAChB,SAAS,EAAE;QACT,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK;QACrC,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,CAAC;QACN,SAAS,EAAE;YACT;gBACE,UAAU,EAAE,WAAW;aACxB;SACF;QACD,MAAM,EAAE,GAAG;KACZ;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,QAAQ;QACnB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,CAAC;QAClB,KAAK,EAAE,SAAS;KACjB;CACF,CAAC,CAAC;AAEL,eAAe,eAAe,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { Color } from '../../../theme/themes';
2
+ interface IconButtonProps {
3
+ style?: any;
4
+ color?: Color;
5
+ title: string;
6
+ iconName: string;
7
+ onPress: (any: any) => void;
8
+ disabled?: boolean;
9
+ }
10
+ declare const IconButton: ({ style, color, title, iconName, onPress, disabled, }: IconButtonProps) => JSX.Element;
11
+ export default IconButton;
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useMemo } from 'react';
19
+ import { StyleSheet, TouchableOpacity } from 'react-native';
20
+ import { getCommonStyles } from '../../../utils/commons-styles';
21
+ import { useThemeColor } from '../../../theme/ThemeContext';
22
+ import { Icon, Text } from '../../atoms';
23
+ const IconButton = ({ style, color, title, iconName, onPress = () => { }, disabled = false, }) => {
24
+ const Colors = useThemeColor();
25
+ const buttonColor = useMemo(() => (color == null ? Colors.primaryColor : color), [Colors.primaryColor, color]);
26
+ const styles = useMemo(() => {
27
+ return getStyles(buttonColor);
28
+ }, [buttonColor]);
29
+ const commonStyle = useMemo(() => getCommonStyles(Colors), [Colors]);
30
+ return (<TouchableOpacity style={[styles.container, commonStyle.button, style]} onPress={onPress} disabled={disabled}>
31
+ <Icon name={iconName} size={15} color={buttonColor.foreground}/>
32
+ <Text style={styles.text}>{title}</Text>
33
+ </TouchableOpacity>);
34
+ };
35
+ const getStyles = color => StyleSheet.create({
36
+ container: {
37
+ backgroundColor: color.background,
38
+ },
39
+ text: {
40
+ color: color.foreground,
41
+ fontSize: 15,
42
+ fontWeight: 'bold',
43
+ textAlign: 'center',
44
+ marginLeft: 10,
45
+ },
46
+ });
47
+ export default IconButton;
48
+ //# sourceMappingURL=IconButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../../src/components/molecules/IconButton/IconButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAC,eAAe,EAAC,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAC,aAAa,E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CAAC,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,KAAK,CAAC,EAAE,CACxB,UAAU,CAAC,MAAM,CAAC;IAChB,SAAS,EAAE;QACT,eAAe,EAAE,KAAK,CAAC,UAAU;KAClC;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,KAAK,CAAC,UAAU;QACvB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,EAAE;KACf;CACF,CAAC,CAAC;AAEL,eAAe,UAAU,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { KeyboardTypeOptions } from 'react-native';
2
+ interface IconInputProps {
3
+ style?: any;
4
+ value: string;
5
+ onChange: (value: any) => void;
6
+ placeholder: string;
7
+ readOnly?: boolean;
8
+ secureTextEntry?: boolean;
9
+ onSelection?: () => void;
10
+ multiline?: boolean;
11
+ numberOfLines?: number;
12
+ keyboardType?: KeyboardTypeOptions;
13
+ onEndFocus: () => void;
14
+ isFocus: boolean;
15
+ leftIconsList?: any[];
16
+ rightIconsList?: any[];
17
+ }
18
+ declare const IconInput: ({ style, value, onChange, placeholder, readOnly, secureTextEntry, onSelection, multiline, numberOfLines, keyboardType, onEndFocus, isFocus, leftIconsList, rightIconsList, }: IconInputProps) => JSX.Element;
19
+ export default IconInput;
@@ -0,0 +1,50 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useMemo } from 'react';
19
+ import { StyleSheet, View } from 'react-native';
20
+ import { useThemeColor } from '../../../theme/ThemeContext';
21
+ import { Input } from '../../atoms';
22
+ const IconInput = ({ style, value, onChange, placeholder, readOnly, secureTextEntry, onSelection = () => { }, multiline, numberOfLines, keyboardType, onEndFocus, isFocus, leftIconsList = [], rightIconsList = [], }) => {
23
+ const Colors = useThemeColor();
24
+ const styles = useMemo(() => getStyles(Colors), [Colors]);
25
+ return (<View style={[styles.container, style]}>
26
+ {leftIconsList.map((iconComponent, index) => React.cloneElement(iconComponent, { key: index }))}
27
+ <Input style={styles.input} value={value} onChange={onChange} placeholder={placeholder} readOnly={readOnly} secureTextEntry={secureTextEntry} onSelection={onSelection} multiline={multiline} numberOfLines={numberOfLines} keyboardType={keyboardType} onEndFocus={onEndFocus} isFocus={isFocus}/>
28
+ {rightIconsList.map((iconComponent, index) => React.cloneElement(iconComponent, { key: index }))}
29
+ </View>);
30
+ };
31
+ const getStyles = Colors => StyleSheet.create({
32
+ container: {
33
+ borderColor: Colors.secondaryColor.background,
34
+ borderWidth: 1,
35
+ borderRadius: 13,
36
+ backgroundColor: Colors.backgroundColor,
37
+ flexDirection: 'row',
38
+ justifyContent: 'space-between',
39
+ alignItems: 'center',
40
+ paddingLeft: 5,
41
+ paddingRight: 8,
42
+ marginHorizontal: 20,
43
+ marginVertical: 6,
44
+ },
45
+ input: {
46
+ flex: 1,
47
+ },
48
+ });
49
+ export default IconInput;
50
+ //# sourceMappingURL=IconInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconInput.js","sourceRoot":"","sources":["../../../../src/components/molecules/IconInput/IconInput.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAsB,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AACnE,OAAO,E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AC,OAAO,CAAC,EAEnB;MAAA,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,aAAa,EAAE,KAAK,EAAE,EAAE,CAC3C,KAAK,CAAC,YAAY,CAAC,aAAa,EAAE,EAAC,GAAG,EAAE,KAAK,EAAC,CAAC,CAChD,CACH;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,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC,UAAU;QAC7C,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,eAAe;QAC/B,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,CAAC;QACf,gBAAgB,EAAE,EAAE;QACpB,cAAc,EAAE,CAAC;KAClB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC;AAEL,eAAe,SAAS,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { ImageResizeMode, ImageSourcePropType, ImageStyle, StyleProp } from 'react-native';
2
+ interface ImageProps {
3
+ imageSize: StyleProp<ImageStyle>;
4
+ generalStyle: StyleProp<ImageStyle>;
5
+ resizeMode: ImageResizeMode;
6
+ source: ImageSourcePropType;
7
+ defaultIconSize: number;
8
+ }
9
+ declare const Image: ({ imageSize, generalStyle, resizeMode, source, defaultIconSize, }: ImageProps) => JSX.Element;
10
+ export default Image;
@@ -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, { useState } from 'react';
19
+ import { Image as ReactNativeImage, } from 'react-native';
20
+ import { useThemeColor } from '../../../theme/ThemeContext';
21
+ import { Icon } from '../../atoms';
22
+ const Image = ({ imageSize, generalStyle, resizeMode, source, defaultIconSize = 60, }) => {
23
+ const Colors = useThemeColor();
24
+ const [isValid, setValid] = useState(true);
25
+ const handleURIError = () => {
26
+ if (isValid) {
27
+ setValid(false);
28
+ }
29
+ };
30
+ if (source == null || isValid === false) {
31
+ return (<Icon name="camera" size={defaultIconSize} color={Colors.secondaryColor.background_light} style={generalStyle}/>);
32
+ }
33
+ return (<ReactNativeImage onError={handleURIError} resizeMode={resizeMode} source={source} style={[imageSize, generalStyle]}/>);
34
+ };
35
+ export default Image;
36
+ //# sourceMappingURL=Image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../../src/components/molecules/Image/Image.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EACL,KAAK,IAAI,gBAAgB,GAK1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAUjC,MAAM,KAAK,GAAG,CAAC,EACb,SAAS,EACT,YAAY,EACZ,UAAU,EACV,MAAM,EACN,eAAe,GAAG,EAAE,GACT,EAAE,EAAE;IACf,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE3C,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,IAAI,OAAO,EAAE;YACX,QAAQ,CAAC,KAAK,CAAC,CAAC;SACjB;IACH,CAAC,CAAC;IAEF,IAAI,MAAM,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,EAAE;QACvC,OAAO,CACL,CAAC,IAAI,CACH,IAAI,CAAC,QAAQ,CACb,IAAI,CAAC,CAAC,eAAe,CAAC,CACtB,KAAK,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAC9C,KAAK,CAAC,CAAC,YAAY,CAAC,EACpB,CACH,CAAC;KACH;IAED,OAAO,CACL,CAAC,gBAAgB,CACf,OAAO,CAAC,CAAC,cAAc,CAAC,CACxB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,EACjC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface IncrementProps {
2
+ value: string | undefined;
3
+ decimalSpacer?: string;
4
+ thousandSpacer?: string;
5
+ onValueChange: (any: any) => void;
6
+ }
7
+ declare const Increment: ({ value, decimalSpacer, thousandSpacer, onValueChange, }: IncrementProps) => JSX.Element;
8
+ export default Increment;
@@ -0,0 +1,97 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useMemo, useState } from 'react';
19
+ import { StyleSheet, View } from 'react-native';
20
+ import { formatNumber } from '../../../utils/formatters';
21
+ import { useThemeColor } from '../../../theme/ThemeContext';
22
+ import { Icon, Input } from '../../atoms';
23
+ const Increment = ({ value, decimalSpacer, thousandSpacer, onValueChange, }) => {
24
+ const Colors = useThemeColor();
25
+ const [valueQty, setValueQty] = useState(formatNumber(value, decimalSpacer, thousandSpacer));
26
+ const handlePlus = () => {
27
+ const newValue = parseFloat(valueQty) + parseFloat('1');
28
+ setValueQty(newValue.toFixed(2).toString());
29
+ onValueChange(newValue.toFixed(2));
30
+ };
31
+ const handleMinus = () => {
32
+ const newValue = parseFloat(valueQty) - parseFloat('1');
33
+ if (newValue >= 0) {
34
+ setValueQty(newValue.toFixed(2).toString());
35
+ onValueChange(newValue.toFixed(2));
36
+ }
37
+ };
38
+ const handleEndInput = () => {
39
+ if (valueQty.slice(-1) === decimalSpacer) {
40
+ valueQty.replace(/.,$/, '');
41
+ }
42
+ if (valueQty === '' || valueQty === null) {
43
+ setValueQty(`0${decimalSpacer}00`);
44
+ onValueChange(0.0);
45
+ }
46
+ else {
47
+ const newValue = parseFloat(valueQty);
48
+ if (newValue >= 0) {
49
+ setValueQty(formatNumber(newValue.toFixed(2).toString(), decimalSpacer, thousandSpacer));
50
+ onValueChange(newValue.toFixed(2));
51
+ }
52
+ else {
53
+ setValueQty(`0${decimalSpacer}00`);
54
+ onValueChange(0.0);
55
+ }
56
+ }
57
+ };
58
+ const styles = useMemo(() => getStyles(Colors), [Colors]);
59
+ return (<View style={styles.container_increment}>
60
+ <Icon name="minus" size={24} color={Colors.primaryColor.background} touchable={true} onPress={handleMinus} style={styles.container_icon}/>
61
+ <View style={styles.inputLine}>
62
+ <Input style={styles.input} value={valueQty} onChange={input => setValueQty(input)} keyboardType="numeric" onEndFocus={handleEndInput}/>
63
+ </View>
64
+ <Icon name="plus" size={24} color={Colors.primaryColor.background} touchable={true} onPress={handlePlus} style={styles.container_icon}/>
65
+ </View>);
66
+ };
67
+ const getStyles = Colors => StyleSheet.create({
68
+ container_increment: {
69
+ flexDirection: 'row',
70
+ alignItems: 'center',
71
+ },
72
+ container_icon: {
73
+ backgroundColor: Colors.backgroundColor,
74
+ elevation: 3,
75
+ justifyContent: 'center',
76
+ alignItems: 'center',
77
+ marginHorizontal: 8,
78
+ padding: 2,
79
+ paddingHorizontal: 5,
80
+ borderColor: Colors.secondaryColor.background,
81
+ borderWidth: 0.5,
82
+ borderRadius: 10,
83
+ },
84
+ input: {
85
+ fontSize: 23,
86
+ fontWeight: 'bold',
87
+ paddingBottom: 0,
88
+ },
89
+ inputLine: {
90
+ borderStyle: 'dashed',
91
+ borderBottomColor: Colors.secondaryColor.background,
92
+ borderBottomWidth: 0.7,
93
+ marginBottom: 9,
94
+ },
95
+ });
96
+ export default Increment;
97
+ //# sourceMappingURL=Increment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Increment.js","sourceRoot":"","sources":["../../../../src/components/molecules/Increment/Increment.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,aAAa,CAAC;AASxC,MAAM,SAAS,GAAG,CAAC,EACjB,KAAK,EACL,aAAa,EACb,cAAc,EACd,aAAa,GACE,EAAE,EAAE;IACnB,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,CAAC,QAAQ,EAAE,WAA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,CAAC,CAAC,UAAU,CAAC,CACpB,KAAK,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,EAEjC;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,MAAM,CAAC,EAAE,CACzB,UAAU,CAAC,MAAM,CAAC;IAChB,mBAAmB,EAAE;QACnB,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;KACrB;IACD,cAAc,EAAE;QACd,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,SAAS,EAAE,CAAC;QACZ,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,gBAAgB,EAAE,CAAC;QACnB,OAAO,EAAE,CAAC;QACV,iBAAiB,EAAE,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC,UAAU;QAC7C,WAAW,EAAE,GAAG;QAChB,YAAY,EAAE,EAAE;KACjB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,aAAa,EAAE,CAAC;KACjB;IACD,SAAS,EAAE;QACT,WAAW,EAAE,QAAQ;QACrB,iBAAiB,EAAE,MAAM,CAAC,cAAc,CAAC,UAAU;QACnD,iBAAiB,EAAE,GAAG;QACtB,YAAY,EAAE,CAAC;KAChB;CACF,CAAC,CAAC;AAEL,eAAe,SAAS,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Color } from '../../../theme/themes';
2
+ interface InfoBubbleProps {
3
+ style?: any;
4
+ iconName: string;
5
+ badgeColor: Color;
6
+ indication: string;
7
+ }
8
+ declare const InfoBubble: ({ style, iconName, badgeColor, indication, }: InfoBubbleProps) => JSX.Element;
9
+ export default InfoBubble;
@@ -0,0 +1,73 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useMemo, useState, useEffect, useRef } from 'react';
19
+ import { Dimensions, StyleSheet, TouchableOpacity, View } from 'react-native';
20
+ import { Card, Icon, Text } from '../../atoms';
21
+ import { useThemeColor } from '../../../theme/ThemeContext';
22
+ import { OUTSIDE_INDICATOR, useClickOutside, } from '../../../hooks/use-click-outside';
23
+ const InfoBubble = ({ style, iconName, badgeColor, indication, }) => {
24
+ const [isOpen, setIsOpen] = useState(false);
25
+ const wrapperRef = useRef(null);
26
+ const Colors = useThemeColor();
27
+ const clickOutside = useClickOutside({ wrapperRef, visible: isOpen });
28
+ const styles = useMemo(() => getStyles(badgeColor, Colors), [badgeColor, Colors]);
29
+ useEffect(() => {
30
+ if (clickOutside === OUTSIDE_INDICATOR && isOpen) {
31
+ setIsOpen(false);
32
+ }
33
+ }, [clickOutside, isOpen]);
34
+ const onPress = () => {
35
+ setIsOpen(current => !current);
36
+ };
37
+ return (<View ref={wrapperRef} style={[styles.container, style]}>
38
+ <TouchableOpacity onPress={onPress} activeOpacity={0.95}>
39
+ <Icon name={iconName} style={styles.imageStyle} color={badgeColor.foreground}/>
40
+ </TouchableOpacity>
41
+ {isOpen ? (<Card style={styles.indicationCard}>
42
+ <Text>{indication}</Text>
43
+ </Card>) : null}
44
+ </View>);
45
+ };
46
+ const getStyles = (badgeColor, Colors) => StyleSheet.create({
47
+ container: {
48
+ alignItems: 'center',
49
+ flexDirection: 'row',
50
+ marginVertical: 5,
51
+ },
52
+ imageStyle: {
53
+ alignSelf: 'center',
54
+ justifyContent: 'center',
55
+ alignItems: 'center',
56
+ backgroundColor: badgeColor.background_light,
57
+ borderWidth: 2,
58
+ borderColor: badgeColor.background,
59
+ borderRadius: Dimensions.get('window').width * 0.1,
60
+ width: Dimensions.get('window').width * 0.1,
61
+ height: Dimensions.get('window').width * 0.1,
62
+ },
63
+ indicationCard: {
64
+ position: 'absolute',
65
+ marginLeft: '12%',
66
+ paddingLeft: 10,
67
+ paddingVertical: 10,
68
+ paddingRight: 10,
69
+ backgroundColor: Colors.backgroundColor,
70
+ },
71
+ });
72
+ export default InfoBubble;
73
+ //# sourceMappingURL=InfoBubble.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoBubble.js","sourceRoot":"","sources":["../../../../src/components/molecules/InfoBubble/InfoBubble.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AAClE,OAAO,EAAC,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EACL,iBAAiB,EACjB,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAS1C,MAAM,UAAU,GAAG,CAAC,EAClB,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,GACM,EAAE,EAAE;IACpB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,YAAY,GAAG,eAAe,CAAC,EAAC,UAAU,EAAE,OAAO,EAAE,MAAM,EAAC,CAAC,CAAC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AAC;IAChB,SAAS,EAAE;QACT,UAAU,EAAE,QAAQ;QACpB,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,CAAC;KAClB;IACD,UAAU,EAAE;QACV,SAAS,EAAE,QAAQ;QACnB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,UAAU,CAAC,gBAAgB;QAC5C,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,UAAU,CAAC,UAAU;QAClC,YAAY,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,GAAG;QAClD,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,GAAG;QAC3C,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,GAAG;KAC7C;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,UAAU;QACpB,UAAU,EAAE,KAAK;QACjB,WAAW,EAAE,EAAE;QACf,eAAe,EAAE,EAAE;QACnB,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,MAAM,CAAC,eAAe;KACxC;CACF,CAAC,CAAC;AAEL,eAAe,UAAU,CAAC"}
@@ -0,0 +1,14 @@
1
+ interface LabelTextProps {
2
+ style?: any;
3
+ iconStyle?: any;
4
+ textStyle?: any;
5
+ title?: string | number;
6
+ value?: string | number;
7
+ size?: number;
8
+ color?: string;
9
+ iconName?: string;
10
+ FontAwesome5?: boolean;
11
+ onlyOneLine?: boolean;
12
+ }
13
+ declare const LabelText: ({ style, iconStyle, textStyle, title, value, size, color, iconName, FontAwesome5, onlyOneLine, }: LabelTextProps) => JSX.Element;
14
+ export default LabelText;
@@ -0,0 +1,45 @@
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 { View, StyleSheet } from 'react-native';
20
+ import { Icon, Text } from '../../atoms';
21
+ const LabelText = ({ style, iconStyle, textStyle, title, value, size = 12, color, iconName = null, FontAwesome5 = true, onlyOneLine = false, }) => {
22
+ return (<View style={[styles.container, style]}>
23
+ {iconName && (<Icon style={[styles.icon, iconStyle]} name={iconName} size={size} color={color} FontAwesome5={FontAwesome5}/>)}
24
+ {title && (<Text style={textStyle} fontSize={14} numberOfLines={onlyOneLine ? 1 : null}>
25
+ {title}
26
+ </Text>)}
27
+ {value && (<Text style={[styles.txtDetails, textStyle]} fontSize={14} numberOfLines={onlyOneLine ? 1 : null}>
28
+ {value}
29
+ </Text>)}
30
+ </View>);
31
+ };
32
+ const styles = StyleSheet.create({
33
+ container: {
34
+ flexDirection: 'row',
35
+ },
36
+ txtDetails: {
37
+ fontWeight: 'bold',
38
+ marginHorizontal: 5,
39
+ },
40
+ icon: {
41
+ marginRight: 5,
42
+ },
43
+ });
44
+ export default LabelText;
45
+ //# sourceMappingURL=LabelText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LabelText.js","sourceRoot":"","sources":["../../../../src/components/molecules/LabelText/LabelText.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,aAAa,CAAC;AAevC,MAAM,SAAS,GAAG,CAAC,EACjB,KAA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AAE,KAAK;KACrB;IACD,UAAU,EAAE;QACV,UAAU,EAAE,MAAM;QAClB,gBAAgB,EAAE,CAAC;KACpB;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,CAAC;KACf;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @description To activate this component, please use setActivityIndicator(true) from useConfig of aos-mobile/ui
3
+ * @description To desactivate this component, please use setActivityIndicator(false) from useConfig of aos-mobile/ui
4
+ */
5
+ declare const LoadingIndicator: () => JSX.Element;
6
+ export default LoadingIndicator;
@@ -0,0 +1,49 @@
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 { ActivityIndicator, StyleSheet, Dimensions } from 'react-native';
20
+ import { useConfig } from '../../../config/ConfigContext';
21
+ import { useThemeColor } from '../../../theme/ThemeContext';
22
+ import { BlockInteractionScreen, Card } from '../../atoms';
23
+ /**
24
+ * @description To activate this component, please use setActivityIndicator(true) from useConfig of aos-mobile/ui
25
+ * @description To desactivate this component, please use setActivityIndicator(false) from useConfig of aos-mobile/ui
26
+ */
27
+ const LoadingIndicator = () => {
28
+ const Colors = useThemeColor();
29
+ const { showActivityIndicator } = useConfig();
30
+ if (!showActivityIndicator) {
31
+ return null;
32
+ }
33
+ return (<BlockInteractionScreen hideHeader={true}>
34
+ <Card style={styles.loadingIndicatorCard}>
35
+ <ActivityIndicator size="large" color={Colors.primaryColor.background}/>
36
+ </Card>
37
+ </BlockInteractionScreen>);
38
+ };
39
+ const styles = StyleSheet.create({
40
+ loadingIndicatorCard: {
41
+ position: 'relative',
42
+ top: Dimensions.get('window').height * 0.4,
43
+ left: Dimensions.get('window').width * 0.4,
44
+ elevation: 24,
45
+ paddingRight: 24,
46
+ },
47
+ });
48
+ export default LoadingIndicator;
49
+ //# sourceMappingURL=LoadingIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingIndicator.js","sourceRoot":"","sources":["../../../../src/components/molecules/LoadingIndicator/LoadingIndicator.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AACvE,OAAO,EAAC,SAAS,EAAC,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAC,sBAAsB,EAAE,IAAI,EAAC,MAAM,aAAa,CAAC;AAEzD;;;GAGG;AAEH,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC5B,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,EAAC,qBAAqB,EAAC,GAAG,SAAS,EAAE,CAAC;IAE5C,IAAI,CAAC,qBAAqB,EAAE;QAC1B,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CACvC;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CACvC;QAAA,CAAC,iBAAiB,CAChB,IAAI,CAAC,OAAO,CACZ,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,EAE1C;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,sBAAsB,CAAC,CAC1B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,oBAAoB,EAAE;QACpB,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,GAAG;QAC1C,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,GAAG;QAC1C,SAAS,EAAE,EAAE;QACb,YAAY,EAAE,EAAE;KACjB;CACF,CAAC,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,9 @@
1
+ interface MessageBoxProps {
2
+ placeholder: string;
3
+ disabled?: boolean;
4
+ value?: string;
5
+ onChange?: (any: any) => void;
6
+ onSend?: (any: any) => void;
7
+ }
8
+ declare const MessageBox: ({ placeholder, disabled, value, onChange, onSend, }: MessageBoxProps) => JSX.Element;
9
+ export default MessageBox;