@eohjsc/react-native-smart-city 0.7.44 → 0.7.46

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eohjsc/react-native-smart-city",
3
3
  "title": "React Native Smart Home",
4
- "version": "0.7.44",
4
+ "version": "0.7.46",
5
5
  "description": "TODO",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -1,5 +1,6 @@
1
1
  import React, { memo, useState, useEffect } from 'react';
2
2
  import { StyleSheet, Animated, Easing, Platform } from 'react-native';
3
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
3
4
 
4
5
  import { AccessibilityLabel } from '../../configs/Constants';
5
6
  import useKeyboardAnimated from '../../hooks/Explore/useKeyboardAnimated';
@@ -26,6 +27,7 @@ const BottomButtonView = memo(
26
27
  disableKeyBoardAnimated = false,
27
28
  }) => {
28
29
  const transY = useKeyboardAnimated();
30
+ const insets = useSafeAreaInsets();
29
31
  const [keyboardAnim] = useState(new Animated.Value(0));
30
32
 
31
33
  useEffect(() => {
@@ -46,6 +48,7 @@ const BottomButtonView = memo(
46
48
  : styleCustom.container,
47
49
  // eslint-disable-next-line react-native/no-inline-styles
48
50
  { bottom: disableKeyBoardAnimated ? 0.1 : keyboardAnim },
51
+ { paddingBottom: insets.bottom },
49
52
  rowButton && styleCustom.horizontalContainer,
50
53
  style,
51
54
  ]}
@@ -96,7 +96,10 @@ const Highcharts = (props) => {
96
96
  return (
97
97
  <WebView
98
98
  style={[props.styles, props.webviewStyles]}
99
- source={{ html: concatHTML }}
99
+ source={{
100
+ html: concatHTML,
101
+ baseUrl: 'https://code.highcharts.com',
102
+ }}
100
103
  javaScriptEnabled={true}
101
104
  domStorageEnabled={true}
102
105
  scalesPageToFit={true}
@@ -9,6 +9,7 @@ const styles = StyleSheet.create({
9
9
  contentContainer: {
10
10
  flex: 1,
11
11
  justifyContent: 'space-between',
12
+ paddingBottom: 48,
12
13
  },
13
14
  scrollContainer: {
14
15
  width: '100%',
@@ -6,6 +6,7 @@ import {
6
6
  Platform,
7
7
  Easing,
8
8
  } from 'react-native';
9
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
9
10
 
10
11
  import { Colors } from '../../configs';
11
12
  import Text from '../../commons/Text';
@@ -35,6 +36,7 @@ const ViewButtonBottom = ({
35
36
  }) => {
36
37
  const useTwoButton = leftTitle && rightTitle;
37
38
  const transY = useKeyboardAnimated();
39
+ const insets = useSafeAreaInsets();
38
40
  const [keyboardAnim] = useState(new Animated.Value(0));
39
41
 
40
42
  const RightButtonView = useMemo(() => {
@@ -56,6 +58,7 @@ const ViewButtonBottom = ({
56
58
  styles.container,
57
59
  wrapStyle,
58
60
  !disableKeyBoardAnimated && { bottom: keyboardAnim },
61
+ { paddingBottom: insets.bottom },
59
62
  ]}
60
63
  >
61
64
  {leftTitle && (
@@ -115,7 +118,7 @@ const styles = StyleSheet.create({
115
118
  bottom: 0,
116
119
  },
117
120
  button: {
118
- paddingVertical: 24,
121
+ paddingBottom: 10,
119
122
  width: '100%',
120
123
  flex: 1,
121
124
  justifyContent: 'center',
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
2
- import { TouchableOpacity, View } from 'react-native';
2
+ import { ScrollView, TouchableOpacity, View } from 'react-native';
3
3
  import { useNavigation } from '@react-navigation/native';
4
4
 
5
5
  import { useTranslations } from '../../hooks/Common/useTranslations';
@@ -221,9 +221,9 @@ const SelectDeviceType = ({ route }) => {
221
221
  return (
222
222
  <View style={styles.container}>
223
223
  <HeaderCustom title={t('choose_type_of_device')} isShowSeparator />
224
- <View style={styles.contentContainer}>
224
+ <ScrollView style={styles.contentContainer}>
225
225
  <SelectDeviceGrid options={listDeviceType} onSelect={handleOnSelect} />
226
- </View>
226
+ </ScrollView>
227
227
  <ViewButtonBottom
228
228
  leftTitle={t('cancel')}
229
229
  onLeftClick={goBack}
@@ -9,9 +9,8 @@ export default StyleSheet.create({
9
9
  backgroundColor: Colors.White,
10
10
  },
11
11
  contentContainer: {
12
- flex: 1,
13
- justifyContent: 'space-between',
14
- paddingVertical: 16,
12
+ paddingTop: 16,
13
+ marginBottom: 48,
15
14
  },
16
15
  gridContainer: {
17
16
  flexDirection: 'row',
@@ -13,6 +13,7 @@ export default StyleSheet.create({
13
13
  contentContainer: {
14
14
  flex: 1,
15
15
  justifyContent: 'space-between',
16
+ paddingBottom: 40,
16
17
  },
17
18
  title: {
18
19
  color: Colors.Gray9,
@@ -47,6 +48,6 @@ export default StyleSheet.create({
47
48
  fontSize: 14,
48
49
  },
49
50
  wrapViewButtonStyle: {
50
- paddingTop: 70,
51
+ paddingTop: 48,
51
52
  },
52
53
  });