@eohjsc/react-native-smart-city 0.3.83 → 0.3.85
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 +2 -2
- package/src/commons/Dashboard/MyUnit/index.js +2 -3
- package/src/screens/AllCamera/__test__/index.test.js +1 -1
- package/src/screens/AllCamera/index.js +2 -2
- package/src/screens/AllGateway/components/TabPaneCT/__test__/index.test.js +1 -1
- package/src/screens/AllGateway/components/TabPaneCT/index.js +1 -1
- package/src/screens/Device/components/SensorDisplayItem.js +13 -6
- package/src/screens/Device/detail.js +0 -1
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.3.
|
|
4
|
+
"version": "0.3.85",
|
|
5
5
|
"description": "TODO",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|
|
@@ -179,7 +179,6 @@
|
|
|
179
179
|
"react-native-maps-directions": "^1.8.0",
|
|
180
180
|
"react-native-modal": "^11.5.6",
|
|
181
181
|
"react-native-modal-datetime-picker": "^8.9.3",
|
|
182
|
-
"react-native-new-snap-carousel": "^3.9.3",
|
|
183
182
|
"react-native-onesignal": "^4.3.1",
|
|
184
183
|
"react-native-pager-view": "^5.4.1",
|
|
185
184
|
"react-native-parallax-scroll-view": "^0.21.3",
|
|
@@ -191,6 +190,7 @@
|
|
|
191
190
|
"react-native-responsive-fontsize": "^0.5.1",
|
|
192
191
|
"react-native-safe-area-context": "^3.1.1",
|
|
193
192
|
"react-native-screens": "^2.9.0",
|
|
193
|
+
"react-native-snap-carousel": "4.0.0-beta.5",
|
|
194
194
|
"react-native-super-grid": "^4.0.3",
|
|
195
195
|
"react-native-svg": "^12.1.0",
|
|
196
196
|
"react-native-toast-message": "^2.1.1",
|
|
@@ -14,10 +14,11 @@ import {
|
|
|
14
14
|
} from '@react-navigation/native';
|
|
15
15
|
import NetInfo from '@react-native-community/netinfo';
|
|
16
16
|
import { BleManager } from 'react-native-ble-plx';
|
|
17
|
+
import Carousel from 'react-native-snap-carousel';
|
|
18
|
+
|
|
17
19
|
import { API, Colors, Images } from '../../../configs';
|
|
18
20
|
import Text from '../../Text';
|
|
19
21
|
import { fetchWithCache } from '../../../utils/Apis/axios';
|
|
20
|
-
|
|
21
22
|
import styles from './styles';
|
|
22
23
|
import { Section } from '../../Section';
|
|
23
24
|
import { useTranslations } from '../../../hooks/Common/useTranslations';
|
|
@@ -25,8 +26,6 @@ import { useUnitConnectRemoteDevices } from '../../../screens/Unit/hook/useUnitC
|
|
|
25
26
|
import { useWatchConfigs, useBluetoothConnection } from '../../../hooks/IoT';
|
|
26
27
|
import { SCContext } from '../../../context';
|
|
27
28
|
import { Action } from '../../../context/actionType';
|
|
28
|
-
|
|
29
|
-
import Carousel from 'react-native-new-snap-carousel';
|
|
30
29
|
import { AccessibilityLabel, DEVICE_TYPE } from '../../../configs/Constants';
|
|
31
30
|
import Routes from '../../../utils/Route';
|
|
32
31
|
import MyUnitDevice from '../../../screens/Unit/components/MyUnitDevice';
|
|
@@ -4,7 +4,7 @@ import AllCamera from '..';
|
|
|
4
4
|
import { act, create } from 'react-test-renderer';
|
|
5
5
|
import { SCProvider } from '../../../context';
|
|
6
6
|
import { mockSCStore } from '../../../context/mockStore';
|
|
7
|
-
import Carousel from 'react-native-
|
|
7
|
+
import Carousel from 'react-native-snap-carousel';
|
|
8
8
|
|
|
9
9
|
const arrCameras = [
|
|
10
10
|
{
|
|
@@ -8,9 +8,9 @@ import React, {
|
|
|
8
8
|
import { View, Text, TouchableOpacity, Platform, Image } from 'react-native';
|
|
9
9
|
import { useRoute, useNavigation } from '@react-navigation/native';
|
|
10
10
|
import { chunk } from 'lodash';
|
|
11
|
-
import Carousel from 'react-native-
|
|
12
|
-
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
11
|
+
import Carousel from 'react-native-snap-carousel';
|
|
13
12
|
|
|
13
|
+
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
14
14
|
import { Images, Colors } from '../../configs';
|
|
15
15
|
import { useHiddenStatusBar } from '../../hooks/Common/useStatusBar';
|
|
16
16
|
import { HeaderCustom } from '../../commons/Header';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { create, act } from 'react-test-renderer';
|
|
3
3
|
import SegmentedControl from '@react-native-community/segmented-control';
|
|
4
|
-
import Carousel from 'react-native-
|
|
4
|
+
import Carousel from 'react-native-snap-carousel';
|
|
5
5
|
|
|
6
6
|
import { SCProvider } from '../../../../../context';
|
|
7
7
|
import { mockSCStore } from '../../../../../context/mockStore';
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
RefreshControl,
|
|
8
8
|
} from 'react-native';
|
|
9
9
|
import SegmentedControl from '@react-native-community/segmented-control';
|
|
10
|
-
import Carousel from 'react-native-
|
|
10
|
+
import Carousel from 'react-native-snap-carousel';
|
|
11
11
|
|
|
12
12
|
import { Text, StatusBox } from '../../../../commons';
|
|
13
13
|
import { Constants } from '../../../../configs';
|
|
@@ -55,16 +55,23 @@ export const SensorDisplayItem = ({
|
|
|
55
55
|
const data = item.configuration.configs.map((config) => {
|
|
56
56
|
const configValue = configValues[config.id]?.value;
|
|
57
57
|
const configEvaluate = evaluate[config.id] || {};
|
|
58
|
+
let value = {};
|
|
58
59
|
if (configValue === null || configValue === undefined) {
|
|
59
|
-
|
|
60
|
+
value = {
|
|
61
|
+
id: config.id,
|
|
62
|
+
value: null,
|
|
63
|
+
evaluate: null,
|
|
64
|
+
};
|
|
65
|
+
} else {
|
|
66
|
+
value = {
|
|
67
|
+
id: config.id,
|
|
68
|
+
value: configValue,
|
|
69
|
+
evaluate: evaluateValue(config.id, configValue) || configEvaluate,
|
|
70
|
+
};
|
|
60
71
|
}
|
|
61
|
-
const value = {
|
|
62
|
-
id: config.id,
|
|
63
|
-
value: configValue,
|
|
64
|
-
evaluate: evaluateValue(config.id, configValue) || configEvaluate,
|
|
65
|
-
};
|
|
66
72
|
return { ...config, ...value };
|
|
67
73
|
});
|
|
74
|
+
|
|
68
75
|
return data.filter(Boolean);
|
|
69
76
|
}, [configValues, evaluateValue, item, evaluate]);
|
|
70
77
|
|