Commit 9c6f7442 by Tonk

Merge branch 'injectedFirebase' into ejectedExpo

parents 7bf59c85 a3e7d977
......@@ -13,23 +13,160 @@ import rootStore from './reduxStore';
import { Root } from 'native-base';
import { fixTimerWarning } from './utils/fixTimerWarning';
// import { default as customMapping } from './custom-mapping.json';
import { fireStore } from './firebase';
console.disableYellowBox = true;
const Application = () => {
useEffect(() => {
fixTimerWarning();
}, []);
return (
<ApplicationProvider mapping={mapping} theme={myTheme}>
<Provider store={rootStore}>
<Root>
<Root>
<ApplicationProvider mapping={mapping} theme={myTheme}>
<Provider store={rootStore}>
<AppContainer />
</Root>
</Provider>
</ApplicationProvider>
</Provider>
</ApplicationProvider>
</Root>
);
};
export default Application;
const createMockData = () => {
// const deviceId = 'iYs6Th9Pkg1vTEDIyPa5';
const deviceId = '8998c7d5-4476-41d9-81c6-9ef2dbac2505';
const batch = fireStore.batch();
/*------------------------------*/
const mainRef = fireStore.doc(`device/${deviceId}`);
batch.set(mainRef, main);
for (let i = 1; i <= 5; i++) {
let mainTimerRef = fireStore
.collection('device')
.doc(deviceId)
.collection('Timers')
.doc();
batch.set(mainTimerRef, timer);
}
/*------------------------------*/
for (let i = 1; i <= 4; i++) {
const mcbLinks = {
type: 'mcbLink',
name: `MCB Link ${i}`,
description: `description ${i}`,
};
let mcbLinksRef = fireStore
.collection('device')
.doc(deviceId)
.collection('mcbLinks')
.doc(i.toString());
for (let z = 1; z <= 5; z++) {
let mcbLinkTimerRef = fireStore
.collection('device')
.doc(deviceId)
.collection('mcbLinks')
.doc(i.toString())
.collection('Timers')
.doc();
batch.set(mcbLinkTimerRef, timer);
}
batch.set(mcbLinksRef, mcbLinks);
}
/*------------------------------*/
for (let i = 1; i <= 4; i++) {
for (let j = 1; j <= 8; j++) {
let subBreakers = {
type: 'subBreaker',
name: `Sub Breaker ${j}`,
description: `description ${j}`,
};
let subBreakersRef = fireStore
.collection('device')
.doc(deviceId)
.collection('mcbLinks')
.doc(i.toString())
.collection('subBreakers')
.doc(j.toString());
for (let z = 1; z <= 5; z++) {
let subBreakerTimerRef = fireStore
.collection('device')
.doc(deviceId)
.collection('mcbLinks')
.doc(i.toString())
.collection('subBreakers')
.doc(j.toString())
.collection('Timers')
.doc();
batch.set(subBreakerTimerRef, timer);
}
batch.set(subBreakersRef, subBreakers);
}
}
batch.commit();
};
// const mcbLinkId = 1;
// const subBreakerId = 2;
const main = {
type: 'main',
name: 'Main',
description: 'description',
notification: true,
rcbo: 10,
};
const timer = {
isActive: false,
isPowerOn: false,
timer: 0,
repeatOn: [
{ id: 0, isRepeat: false, day: 'Sunday' },
{ id: 1, isRepeat: false, day: 'Monday' },
{ id: 2, isRepeat: false, day: 'Tuesday' },
{ id: 3, isRepeat: false, day: 'Wednesday' },
{ id: 4, isRepeat: false, day: 'Thursday' },
{ id: 5, isRepeat: false, day: 'Friday' },
{ id: 6, isRepeat: false, day: 'Saturday' },
],
};
// const mcbLinks = {
// // id: mcbLinkId,
// type: 'mcbLink',
// name: `MCB Link ${mcbLinkId}`,
// description: `description ${mcbLinkId}`,
// };
// const subBreakers = {
// // id: subBreakerId,
// type: 'subBreaker',
// name: `Sub Breaker ${subBreakerId}`,
// description: `description ${subBreakerId}`,
// };
// const timer = {
// isActive: false,
// isPowerOn: false,
// timer: 1566378008,
// repeatOn: [
// { id: 0, isRepeat: false, day: 'Sunday' },
// { id: 1, isRepeat: false, day: 'Monday' },
// { id: 2, isRepeat: false, day: 'Tuesday' },
// { id: 3, isRepeat: false, day: 'Wednesday' },
// { id: 4, isRepeat: false, day: 'Thursday' },
// { id: 5, isRepeat: false, day: 'Friday' },
// { id: 6, isRepeat: false, day: 'Saturday' },
// ],
// };
import React from 'react';
import { Platform } from 'react-native';
import { Icon, View } from 'native-base';
import { color } from './constants/Styles';
import {
......@@ -16,8 +17,8 @@ import SmartMeterDetailScreen from './screens/Private/SmartMeterScreen/SmartMete
import CameraScreen from './screens/Private/CameraScreen';
// Timer
import TimerScreen from './screens/Private/TimerScreen/TimerScreen';
import TimerScreenAndriod from './screens/Private/TimerScreen/TimerScreen.andriod';
import TimerScreenIos from './screens/Private/TimerScreen/TimerScreen.ios';
// Setting
import SettingScreen from './screens/Private/SettingScreen/SettingScreen';
import Setting from './screens/Private/SettingScreen/Setting';
......@@ -48,11 +49,24 @@ const defaultNavigationOptions = {
fontSize: 18,
fontFamily: 'Avenir-Roman',
},
tabBarOptions: {
keyboardHidesTabBar: true,
},
};
const SmartMeterStack = createStackNavigator(
const HomeStack = createStackNavigator(
{
SmartMeter: SmartMeterScreen,
},
{
headerLayoutPreset: 'center',
defaultNavigationOptions,
}
);
const SmartMeterStack = createStackNavigator(
{
// SmartMeter: SmartMeterScreen,
SmartMeterDetail: SmartMeterDetailScreen,
},
{
......@@ -77,7 +91,7 @@ const CameraStack = createStackNavigator(
const TimerStack = createStackNavigator(
{
Timer: TimerScreen,
Timer: Platform.OS === 'android' ? TimerScreenAndriod : TimerScreenIos,
},
{
headerLayoutPreset: 'center',
......@@ -220,6 +234,7 @@ const WithBottomTabStack = createBottomTabNavigator(
const MainStack = createStackNavigator(
{
Home: HomeStack,
WithBottomTab: WithBottomTabStack,
Camera: CameraStack,
},
......
......@@ -16,47 +16,64 @@ const Row = ({ data }) => {
<RectButton style={styles.rectButton} onPress={() => alert('hello ' + data.name)}>
<View style={{ flexDirection: 'row', paddingVertical: 5 }}>
<View style={{ flex: 1 }}>
<Text style={[theme.title, { color: data.active ? color.black : color.grey }]}>
{format(data.time, 'h:mm')}{' '}
<View style={{ flexDirection: 'row', alignItems: 'flex-end', justifyContent: 'space-between' }}>
<Text style={[theme.title, { color: data.isActive ? color.black : color.grey, fontSize: 18 }]}>
{format(data.timer, 'hh:mm')}
</Text>
<Text
style={[
theme.description,
theme.textDark,
{ color: data.active ? color.black : color.grey },
{
color: data.isActive ? color.black : color.grey,
fontSize: 12,
fontWeight: 'normal',
},
]}
>
{format(data.time, 'A')}
{format(data.timer, 'A')}
</Text>
</Text>
<View style={theme.rowContainer}>
{data.repeatDays.map((item, index) => (
</View>
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
{data.repeatOn.map((el, index) => (
<Text
key={index}
style={[
theme.description,
{
color: data.active
? item.isRepeat
color: data.isActive
? el.isRepeat
? color.primary
: color.grey
: item.isRepeat
: el.isRepeat
? color.darkGrey
: color.grey,
fontSize: 12,
},
]}
>
{item.day}{' '}
{el.day.substr(0, 1)}
</Text>
))}
</View>
</View>
<View style={{ flex: 1 }}>
<View style={{ flex: 2, paddingHorizontal: 35 }}>
<Text
style={[theme.title, { fontWeight: 'normal', color: data.active ? color.black : color.grey }]}
style={[
theme.title,
{ fontWeight: 'normal', color: data.isActive ? color.black : color.grey, fontSize: 18 },
]}
>
{data.name}
</Text>
<Text style={theme.description}>{data.active ? 'Active' : 'Inactive'} </Text>
<Text style={[theme.description, { fontSize: 12 }]}>
{data.type === 'main'
? 'Main'
: data.type === 'mcbLink'
? `MCB LINK${data.id}`
: `MCB Link${data.mcbLinkId} | Sub Breaker${data.id}`}
</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<View style={{ alignItems: 'center' }}>
......@@ -64,14 +81,19 @@ const Row = ({ data }) => {
style={[
theme.title,
{
color: data.active ? (data.power ? color.success : color.primary) : color.grey,
color: data.isActive
? data.isPowerOn
? color.success
: color.primary
: color.grey,
fontWeight: 'normal',
fontSize: 16,
},
]}
>
{data.power ? 'ON' : 'OFF'}
{data.isPowerOn ? 'ON' : 'OFF'}
</Text>
<Text style={theme.description}>Power</Text>
<Text style={[theme.description, { fontSize: 12 }]}>Power</Text>
</View>
</View>
</View>
......@@ -84,6 +106,7 @@ class SwipeableRow extends Component {
state = {
isVisible: false,
};
renderRightActions = (progress, dragX) => {
const scale = dragX.interpolate({
inputRange: [-80, 0],
......@@ -126,7 +149,6 @@ class SwipeableRow extends Component {
);
};
updateRef = instance => {
// this._swipeableRow = instance;
this.swipeInstance = instance;
};
cfDelete = () => {
......@@ -154,7 +176,7 @@ class SwipeableRow extends Component {
containerStyle={{ backgroundColor: color.primary }}
onSwipeableWillOpen={this._onSwipeOpen}
>
<Row data={this.props.item} />
<Row data={this.props.item} index={this.props.index} />
</Swipeable>
);
}
......
......@@ -60,7 +60,7 @@ export const theme = StyleSheet.create({
color: color.grey,
},
description: {
fontSize: 14,
fontSize: 12,
fontFamily: 'Avenir-Roman',
color: color.grey,
},
......
......@@ -14,15 +14,16 @@
"@react-native-community/async-storage": "^1.6.1",
"date-fns": "^1.30.1",
"firebase": "^6.3.5",
"lodash.set": "^4.3.2",
"lodash": "^4.17.15",
"lodash.defaults": "^4.2.0",
"lodash.flatten": "^4.4.0",
"native-base": "^2.12.2",
"react": "^16.9.0",
"react-addons-update": "^15.6.2",
"react-native": "^0.60.4",
"react-native-barcode-mask": "^1.0.5",
"react-native-calendar-picker": "^6.0.1",
"react-native-camera": "^2.11.1",
"react-native-date-picker": "^2.5.1",
"react-native-date-picker": "^2.7.0",
"react-native-elements": "^1.1.0",
"react-native-gesture-handler": "^1.3.0",
"react-native-linear-gradient": "^2.5.4",
......
import { fireStore } from '../../firebase';
// export const GET_ALL_DEVICE_ID = 'GET_ALL_DEVICE_ID';
export const GET_ALL_DEVICE_INFO = 'GET_ALL_DEVICE_INFO';
// export const getAllDeviceIdAction = allDeviceId => ({
// type: GET_ALL_DEVICE_ID,
// allDeviceId,
// });
export const getAllDeviceInfoAction = allDeviceInfo => ({
type: GET_ALL_DEVICE_INFO,
allDeviceInfo,
});
// export const getAllDeviceId = () => async (dispatch, getState) => {
// const { currentUserReducer } = getState();
// const currentUserId = currentUserReducer.uid;
// const allOwnerDeviceId = await fireStore
// .collection('owner')
// .doc(currentUserId)
// .get();
// const allSharingDeviceId = await fireStore
// .collection('sharing')
// .doc(currentUserId)
// .get();
// const allDeviceId = Object.keys({ ...allOwnerDeviceId.data(), ...allSharingDeviceId.data() });
// return dispatch(getAllDeviceIdAction(allDeviceId));
// };
export const getAllDeviceInfo = () => async (dispatch, getState) => {
const { currentUserReducer } = getState();
const currentUserId = currentUserReducer.uid;
try {
const allOwnerDevice = await fireStore
.collection('owner')
.doc(currentUserId)
.get();
const allSharingDevice = await fireStore
.collection('sharing')
.doc(currentUserId)
.get();
const allOwnerDeviceId = Object.keys({ ...allOwnerDevice.data() });
const allSharingDeviceId = Object.keys({ ...allSharingDevice.data() });
let alldeviceInfo = [];
await allOwnerDeviceId.map((deviceId, index) => {
fireStore
.collection('device')
.doc(deviceId)
.get()
.then(deviceInfo =>
alldeviceInfo.push(Object.assign(deviceInfo.data(), { deviceId, isSharing: false }))
);
});
await allSharingDeviceId.map((deviceId, index) => {
fireStore
.collection('device')
.doc(deviceId)
.get()
.then(deviceInfo =>
alldeviceInfo.push(Object.assign(deviceInfo.data(), { deviceId, isSharing: true }))
);
});
const allDataInfo = await alldeviceInfo;
console.log(allDataInfo);
return dispatch(getAllDeviceInfoAction(allDataInfo));
} catch (error) {
alert(error);
}
};
import { fireStore } from '../../firebase';
export const GET_ALL_MAIN_DEVICE_INFO = 'GET_ALL_MAIN_DEVICE_INFO';
export const GET_ALL_MAIN_DEVICE_INFO_LOADING = 'GET_ALL_MAIN_DEVICE_INFO_LOADING';
export const GET_ALL_MAIN_DEVICE_INFO_ERROR = 'GET_ALL_MAIN_DEVICE_INFO_ERROR';
export const getAllMainDeviceInfoAction = allMainDeviceInfo => ({
type: GET_ALL_MAIN_DEVICE_INFO,
allMainDeviceInfo,
});
export const loadingAction = bool => ({
type: GET_ALL_MAIN_DEVICE_INFO_LOADING,
isLoading: bool,
});
export const errorAction = error => ({
type: GET_ALL_MAIN_DEVICE_INFO_ERROR,
error,
});
export const getAllMainDeviceInfo = () => async (dispatch, getState) => {
const { currentUserReducer } = getState();
const currentUserId = currentUserReducer.uid;
try {
dispatch(loadingAction(true));
const allOwnerDevice = await fireStore
.collection('owner')
.doc(currentUserId)
.get();
const allSharingDevice = await fireStore
.collection('sharing')
.doc(currentUserId)
.get();
const allOwnerDeviceId = Object.keys({ ...allOwnerDevice.data() });
const allSharingDeviceId = Object.keys({ ...allSharingDevice.data() });
let allMainDeviceInfoData = [];
allOwnerDeviceId.map(async (deviceId, index) => {
let ownerDeviceInfo = await fireStore
.collection('device')
.doc(deviceId)
.get();
let ownerDeviceInfoData = await ownerDeviceInfo.data();
// let { timers, ...rest } = ownerDeviceInfoData;
allMainDeviceInfoData.push(Object.assign(ownerDeviceInfoData, { deviceId, isSharing: false }));
});
allSharingDeviceId.map(async (deviceId, index) => {
let sharingDeviceInfo = await fireStore
.collection('device')
.doc(deviceId)
.get();
let sharingDeviceInfoData = await sharingDeviceInfo.data();
// let { timers, ...rest } = sharingDeviceInfoData;
allMainDeviceInfoData.push(Object.assign(sharingDeviceInfoData, { deviceId, isSharing: true }));
});
// console.log('allMainDeviceInfoData', allMainDeviceInfoData);
dispatch(getAllMainDeviceInfoAction(allMainDeviceInfoData));
} catch (error) {
dispatch(errorAction(error.message || error || 'Error'));
}
dispatch(loadingAction(false));
};
import app from '../../firebase';
export const GET_CURRENT_USER = 'GET_CURRENT_USER';
export const getCurrentUserAction = (displayName, email, emailVerified, phoneNumber, uid) => ({
......@@ -11,7 +9,7 @@ export const getCurrentUserAction = (displayName, email, emailVerified, phoneNum
uid,
});
export const getCurrentUser = () => async dispatch => {
const { displayName, email, emailVerified, phoneNumber, uid } = await app.auth().currentUser;
return dispatch(getCurrentUserAction(displayName, email, emailVerified, phoneNumber, uid));
export const getCurrentUser = user => dispatch => {
const { displayName, email, emailVerified, phoneNumber, uid } = user;
dispatch(getCurrentUserAction(displayName, email, emailVerified, phoneNumber, uid));
};
export const SET_CURRENT_SELECTED = 'SET_CURRENT_SELECTED';
export const setCurrentSelectedAction = selectedDeviceId => ({
type: GET_CURRENT_SELECTED,
type: SET_CURRENT_SELECTED,
selectedDeviceId,
});
export const setCurrentSelected = DeviceId => async dispatch => {
return dispatch(setCurrentSelectedAction(DeviceId));
export const setCurrentSelected = deviceId => dispatch => {
dispatch(setCurrentSelectedAction(deviceId));
};
import AsyncStorage from '@react-native-community/async-storage';
export const getToken = token => ({
type: 'GET_TOKEN',
token,
});
export const saveToken = token => ({
type: 'SAVE_TOKEN',
token,
});
export const removeToken = () => ({
type: 'REMOVE_TOKEN',
});
export const loading = bool => ({
type: 'LOADING',
isLoading: bool,
});
export const error = error => ({
type: 'ERROR',
error,
});
export const getUserToken = () => async dispatch => {
try {
await AsyncStorage.getItem('userToken');
dispatch(loading(false));
dispatch(getToken(data));
} catch (err) {
dispatch(loading(false));
dispatch(error(err.message || 'ERROR'));
}
};
export const saveUserToken = data => async dispatch => {
try {
await AsyncStorage.setItem('userToken', '');
dispatch(loading(false));
dispatch(saveToken(data));
} catch (err) {
dispatch(loading(false));
dispatch(error(err.message || 'ERROR'));
}
};
export const removeUserToken = () => async dispatch => {
try {
await AsyncStorage.removeItem('userToken');
dispatch(loading(false));
dispatch(removeToken(data));
} catch (err) {
dispatch(loading(false));
dispatch(error(err.message || 'ERROR'));
}
};
import { fireStore } from '../../firebase';
import _ from 'lodash';
export const GET_TIMERS = 'GET_TIMERS';
export const GET_TIMERS_LOADING = 'GET_TIMERS_LOADING';
export const GET_TIMERS_ERROR = 'GET_TIMERS_ERROR';
export const GET_EXISTED_DATA = 'GET_EXISTED_DATA';
export const GET_MAIN_DEVICE_TIMERS = 'GET_MAIN_DEVICE_TIMERS';
export const GET_MCBLINKS_TIMERS = 'GET_MCBLINKS_TIMERS';
export const GET_SUBBREAKERS_TIMERS = 'GET_SUBBREAKERS_TIMERS';
export const getTimersAction = timers => ({
type: GET_TIMERS,
timers,
});
export const getMainDeviceTImersAction = mainDeviceTimers => ({
type: GET_MAIN_DEVICE_TIMERS,
mainDeviceTimers,
});
export const getMcbLinksTimersAction = mcbLinksTimers => ({
type: GET_MCBLINKS_TIMERS,
mcbLinksTimers,
});
export const getSubBreakersTimersAction = subBreakersTimers => ({
type: GET_SUBBREAKERS_TIMERS,
subBreakersTimers,
});
export const getExistedDataAction = existedData => ({
type: GET_EXISTED_DATA,
existedData,
});
export const loadingAction = bool => ({
type: GET_TIMERS_LOADING,
isLoading: bool,
});
export const errorAction = error => ({
type: GET_TIMERS_ERROR,
error,
});
export const getTimers = () => async (dispatch, getState) => {
const { currentSelectedDeviceReducer } = getState();
const { selectedDeviceId } = currentSelectedDeviceReducer;
try {
dispatch(loadingAction(true));
let allTimersData = [];
let mainDeviceTimers = [];
let mcbLinksTimers = [];
let subBreakersTimers = [];
//main device section
/*-------------------------------------*/
const selectedDeviceDetails = await fireStore
.collection('device')
.doc(selectedDeviceId)
.get();
const selectedDeviceTimers = await fireStore
.collection('device')
.doc(selectedDeviceId)
.collection('Timers')
.orderBy('timer', 'asc')
.where('timer', '>', 0)
.get();
const selectedDeviceDetailsData = selectedDeviceDetails.data();
// const selectedDeviceTimersData = selectedDeviceTimers.data();
selectedDeviceTimers.docs.map(timer => {
mainDeviceTimers.push(timer.data());
});
// //mcblink section
// /*-------------------------------------*/
// const selectedDeviceMcbLinks = await fireStore
// .collection('device')
// .doc(selectedDeviceId)
// .collection('mcbLinks')
// .get();
// let existedMcbLinks = [];
// let selectedDeviceMcbLinksData = [];
// selectedDeviceMcbLinks.docs.map(mcbLink => {
// existedMcbLinks.push(mcbLink.data().id);
// selectedDeviceMcbLinksData.push(mcbLink.data());
// let mcbLinkData = mcbLink.data();
// mcbLinksTimers.push(mcbLinkData.timers);
// mcbLinkData.timers.map(timer => {
// allTimersData.push(
// Object.assign(timer, {
// id: mcbLink.data().id,
// type: mcbLink.data().type,
// name: mcbLink.data().name,
// })
// );
// });
// });
// //subbreaker section
// /*-------------------------------------*/
// let existedSubBreakers = [];
// let selectedDeviceSubBreakersData = [];
// selectedDeviceMcbLinksData.map(async mcbLink => {
// let selectedDeviceSubBreakers = await fireStore
// .collection('device')
// .doc(selectedDeviceId)
// .collection('mcbLinks')
// .doc(mcbLink.id.toString())
// .collection('subBreakers')
// .get();
// return selectedDeviceSubBreakers.docs.map(subBreaker => {
// existedSubBreakers.push([mcbLink.id, subBreaker.data().id]);
// selectedDeviceSubBreakersData.push(subBreaker.data());
// let subBreakerData = subBreaker.data();
// subBreakersTimers.push(subBreakerData.timers);
// subBreakerData.timers.map(timer => {
// allTimersData.push(
// Object.assign(timer, {
// mcbLinkId: mcbLink.id,
// id: subBreaker.data().id,
// type: subBreaker.data().type,
// name: subBreaker.data().name,
// })
// );
// });
// });
// });
// console.log('selectedDeviceMcbLinksData', selectedDeviceMcbLinksData);
// const existedData = { existedMcbLinks, existedSubBreakers };
// // console.log(mainDeviceTimers, mcbLinksTimers, subBreakersTimers);
// dispatch(getExistedDataAction(existedData));
dispatch(getMainDeviceTImersAction(mainDeviceTimers));
// dispatch(getMcbLinksTimersAction(mcbLinksTimers));
// dispatch(getSubBreakersTimersAction(subBreakersTimers));
// dispatch(getTimersAction(allTimersData));
} catch (error) {
dispatch(errorAction(error.message || error || 'Error'));
}
dispatch(loadingAction(false));
};
// export const getTimers = () => async (dispatch, getState) => {
// const { currentSelectedDeviceReducer } = getState();
// const { selectedDeviceId } = currentSelectedDeviceReducer;
// try {
// dispatch(loadingAction(true));
// let allTimersData = [];
// let mainDeviceTimers = [];
// let mcbLinksTimers = [];
// let subBreakersTimers = [];
// //main device section
// /*-------------------------------------*/
// const selectedDevice = await fireStore
// .collection('device')
// .doc(selectedDeviceId)
// .get();
// const selectedDeviceData = await selectedDevice.data();
// mainDeviceTimers.push(selectedDeviceData.timers);
// selectedDeviceData.timers.map(timer =>
// allTimersData.push(Object.assign(timer, { type: selectedDeviceData.type, name: selectedDeviceData.name }))
// );
// //mcblink section
// /*-------------------------------------*/
// const selectedDeviceMcbLinks = await fireStore
// .collection('device')
// .doc(selectedDeviceId)
// .collection('mcbLinks')
// .get();
// let existedMcbLinks = [];
// let selectedDeviceMcbLinksData = [];
// selectedDeviceMcbLinks.docs.map(mcbLink => {
// existedMcbLinks.push(mcbLink.data().id);
// selectedDeviceMcbLinksData.push(mcbLink.data());
// let mcbLinkData = mcbLink.data();
// mcbLinksTimers.push(mcbLinkData.timers);
// mcbLinkData.timers.map(timer => {
// allTimersData.push(
// Object.assign(timer, {
// id: mcbLink.data().id,
// type: mcbLink.data().type,
// name: mcbLink.data().name,
// })
// );
// });
// });
// //subbreaker section
// /*-------------------------------------*/
// let existedSubBreakers = [];
// let selectedDeviceSubBreakersData = [];
// selectedDeviceMcbLinksData.map(async mcbLink => {
// let selectedDeviceSubBreakers = await fireStore
// .collection('device')
// .doc(selectedDeviceId)
// .collection('mcbLinks')
// .doc(mcbLink.id.toString())
// .collection('subBreakers')
// .get();
// return selectedDeviceSubBreakers.docs.map(subBreaker => {
// existedSubBreakers.push([mcbLink.id, subBreaker.data().id]);
// selectedDeviceSubBreakersData.push(subBreaker.data());
// let subBreakerData = subBreaker.data();
// subBreakersTimers.push(subBreakerData.timers);
// subBreakerData.timers.map(timer => {
// allTimersData.push(
// Object.assign(timer, {
// mcbLinkId: mcbLink.id,
// id: subBreaker.data().id,
// type: subBreaker.data().type,
// name: subBreaker.data().name,
// })
// );
// });
// });
// });
// console.log('selectedDeviceMcbLinksData', selectedDeviceMcbLinksData);
// const existedData = { existedMcbLinks, existedSubBreakers };
// // console.log(mainDeviceTimers, mcbLinksTimers, subBreakersTimers);
// dispatch(getExistedDataAction(existedData));
// dispatch(getMainDeviceTImersAction(mainDeviceTimers));
// dispatch(getMcbLinksTimersAction(mcbLinksTimers));
// dispatch(getSubBreakersTimersAction(subBreakersTimers));
// dispatch(getTimersAction(allTimersData));
// } catch (error) {
// dispatch(errorAction(error.message || error || 'Error'));
// }
// dispatch(loadingAction(false));
// };
// export const getTimers = () => async (dispatch, getState) => {
// dispatch(loadingAction(true));
// const { currentSelectedDeviceReducer } = getState();
// const { selectedDeviceId } = currentSelectedDeviceReducer;
// try {
// const allSelectedDevice = await fireStore
// .collection('device')
// .doc(selectedDeviceId)
// .get();
// let allSelectedDeviceData = await allSelectedDevice.data();
// let allTimersData = [];
// allSelectedDeviceData.timers.map(timer =>
// allTimersData.push(
// Object.assign(timer, { type: allSelectedDeviceData.type, name: allSelectedDeviceData.name })
// )
// );
// allSelectedDeviceData.mcbLinks.map(mcbLink =>
// mcbLink.timers.map(timer =>
// allTimersData.push(
// Object.assign(timer, {
// id: mcbLink.id,
// type: mcbLink.type,
// name: mcbLink.name,
// })
// )
// )
// );
// allSelectedDeviceData.mcbLinks.map(mcbLink =>
// mcbLink.subBreakers.map(subBreaker =>
// subBreaker.timers.map(timer =>
// allTimersData.push(
// Object.assign(timer, {
// mcbId: mcbLink.id,
// id: subBreaker.id,
// type: subBreaker.type,
// name: subBreaker.name,
// })
// )
// )
// )
// );
// // console.log('allTimersData', allTimersData);
// dispatch(getTimersAction(allTimersData));
// dispatch(loadingAction(false));
// } catch (error) {
// dispatch(errorAction(error.message || error || 'Error'));
// dispatch(loadingAction(false));
// }
// };
......@@ -3,6 +3,6 @@ import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import logger from 'redux-logger';
const middleware = __DEV__ === true ? applyMiddleware(thunk, logger) : applyMiddleware(thunk);
const middleware = __DEV__ ? [thunk, logger] : [thunk];
export default (store = createStore(allReducers, middleware));
export default (store = createStore(allReducers, applyMiddleware(...middleware)));
import {
// GET_ALL_DEVICE_ID,
GET_ALL_DEVICE_INFO,
} from '../actions/allDataAction';
const initState = {
// allDeviceId: null,
allDeviceInfo: null,
};
const allDataReducer = (state = initState, action) => {
switch (action.type) {
// case GET_ALL_DEVICE_ID:
// return { ...state, allDeviceId: action.allDeviceId };
case GET_ALL_DEVICE_INFO:
return { ...state, allDeviceInfo: action.allDeviceInfo };
default:
return state;
}
};
export default allDataReducer;
import {
GET_ALL_MAIN_DEVICE_INFO,
GET_ALL_MAIN_DEVICE_INFO_LOADING,
GET_ALL_MAIN_DEVICE_INFO_ERROR,
} from '../actions/allMainDeviceAction';
const initState = {
allMainDeviceInfo: [],
isLoading: true,
error: null,
};
const allMainDeviceReducer = (state = initState, action) => {
switch (action.type) {
case GET_ALL_MAIN_DEVICE_INFO:
return { ...state, allMainDeviceInfo: action.allMainDeviceInfo };
case GET_ALL_MAIN_DEVICE_INFO_LOADING:
return { ...state, isLoading: action.isLoading };
case GET_ALL_MAIN_DEVICE_INFO_ERROR:
return { ...state, error: action.error };
default:
return state;
}
};
export default allMainDeviceReducer;
const initialState = {
token: {},
loading: true,
error: null,
};
const authReducer = (state = initialState, action) => {
switch (action.type) {
case 'GET_TOKEN':
return { ...state, token: action.token };
case 'SAVE_TOKEN':
return { ...state, token: action.token };
case 'REMOVE_TOKEN':
return { ...state, token: action.token };
case 'LOADING':
return { ...state, loading: action.isLoading };
case 'ERROR':
return { ...state, error: action.error };
default:
return state;
}
};
export default authReducer;
import { GET_CURRENT_USER } from '../actions/cerrentUserAction';
const initState = {
displayName: null,
email: null,
emailVerified: null,
phoneNumber: null,
uid: null,
displayName: '',
email: '',
emailVerified: '',
phoneNumber: '',
uid: '',
};
const currentUserReducer = (state = initState, action) => {
......
import { combineReducers } from 'redux';
// import authReducer from './authReducer';
import { reducer as form } from 'redux-form';
import allDataReducer from './allDataReducer';
import allMainDeviceReducer from './allMainDeviceReducer';
import currentUserReducer from './currentUserReducer';
import currentSelectedDeviceReducer from './currentSelectedReducer';
import timersReducer from './timersReducer';
export default combineReducers({
// token: authReducer,
currentSelectedDeviceReducer,
currentUserReducer,
allDataReducer,
allMainDeviceReducer,
timersReducer,
form,
});
import {
GET_TIMERS,
GET_TIMERS_LOADING,
GET_TIMERS_ERROR,
GET_EXISTED_DATA,
GET_MAIN_DEVICE_TIMERS,
GET_MCBLINKS_TIMERS,
GET_SUBBREAKERS_TIMERS,
} from '../actions/timersAction';
const initState = {
timers: [],
mainDeviceTimers: [],
mcbLinksTimers: [],
subBreakersTimers: [],
existedData: {},
isLoading: true,
error: null,
};
const timersReducer = (state = initState, action) => {
switch (action.type) {
case GET_EXISTED_DATA:
return { ...state, existedData: action.existedData };
case GET_TIMERS:
return { ...state, timers: action.timers };
case GET_MAIN_DEVICE_TIMERS:
return { ...state, mainDeviceTimers: action.mainDeviceTimers };
case GET_MCBLINKS_TIMERS:
return { ...state, mcbLinksTimers: action.mcbLinksTimers };
case GET_SUBBREAKERS_TIMERS:
return { ...state, subBreakersTimers: action.subBreakersTimers };
case GET_TIMERS_LOADING:
return { ...state, isLoading: action.isLoading };
case GET_TIMERS_ERROR:
return { ...state, error: action.error };
default:
return state;
}
};
export default timersReducer;
......@@ -24,7 +24,7 @@ class SettingScreen extends React.Component {
});
}
state = {
data: this.props.allDeviceInfo[0],
data: [],
isVisible: false,
pressQr: false,
pressMail: false,
......@@ -191,7 +191,7 @@ class SettingScreen extends React.Component {
}
}
const mapStateToProps = state => ({
allDeviceInfo: state.allDataReducer.allDeviceInfo,
allMainDeviceInfo: state.allMainDeviceReducer.allMainDeviceInfo,
});
export default connect(mapStateToProps)(SettingScreen);
......
......@@ -86,13 +86,13 @@ const LimitCurrent = [
class SmartMeterDetailScreen extends Component {
static navigationOptions = ({ navigation }) => {
const deviceName = navigation.getParam('deviceName', '');
const deviceName = navigation.getParam('name', '');
return {
title: deviceName,
headerLeft: (
<HeaderButtons HeaderButtonComponent={IoniconsHeaderButton}>
<Item title="back" iconName="ios-arrow-back" onPress={() => navigation.goBack()} />
<Item title="back" iconName="ios-arrow-back" onPress={() => navigation.popToTop()} />
</HeaderButtons>
),
headerRight: (
......@@ -119,7 +119,7 @@ class SmartMeterDetailScreen extends Component {
state = {
mbOn: false,
sb: this.expandState(),
data: this.props.allDeviceInfo[0],
data: [],
};
renderCurrent(item, index) {
return (
......@@ -279,7 +279,7 @@ class SmartMeterDetailScreen extends Component {
}
}}
numColumns={3}
keyExtractor={(item, index) => index}
keyExtractor={(item, index) => index.toString()}
style={{ paddingTop: 20 }}
/>
{/* MCB Link */}
......@@ -293,7 +293,7 @@ class SmartMeterDetailScreen extends Component {
}
const mapStateToProps = state => ({
allDeviceInfo: state.allDataReducer.allDeviceInfo,
allDeviceInfo: state.allMainDeviceReducer.allDeviceInfo,
});
export default connect(mapStateToProps)(SmartMeterDetailScreen);
......
import React, { Component } from 'react';
import React, { PureComponent } from 'react';
import { Text } from 'native-base';
import { FlatList, View } from 'react-native';
import { theme } from '../../../constants/Styles';
......@@ -6,130 +6,102 @@ import MeterCard from '../../../components/MeterCard';
import { HeaderButtons, Item } from 'react-navigation-header-buttons';
import IoniconsHeaderButton from '../../../components/IoniconsHeaderButton';
import { isIphoneX } from '../../../utils/isPhoneX';
import { getAllDeviceInfo } from '../../../reduxStore/actions/allDataAction';
import { getAllMainDeviceInfo } from '../../../reduxStore/actions/allMainDeviceAction';
import { setCurrentSelected } from '../../../reduxStore/actions/currentSelectedAction';
import { connect } from 'react-redux';
import { getTimers } from '../../../reduxStore/actions/timersAction';
let Data = [
// {
// deviceName: 'Device 1',
// description: 'Lorem ipsum dolorsit amet,consectetur adipiscing elit. Cras sagitti.',
// img: 'https://www.tunnelbear.com/static/img/android@2x.b83f4df.png',
// isOnline: true,
// isOn: true,
// },
// {
// deviceName: 'Device 2',
// description: 'Lorem ipsum dolorsit amet,consectetur adipiscing elit. Cras sagitti.',
// img: 'https://www.tunnelbear.com/static/img/android@2x.b83f4df.png',
// isOnline: false,
// isOn: true,
// },
// {
// deviceName: 'Device 3',
// description: 'Lorem ipsum dolorsit amet,consectetur adipiscing elit. Cras sagitti.',
// img: 'https://www.tunnelbear.com/static/img/android@2x.b83f4df.png',
// isOnline: true,
// isOn: false,
// },
// {
// deviceName: 'Device 4',
// description: 'Lorem ipsum dolorsit amet,consectetur adipiscing elit. Cras sagitti.',
// img: 'https://www.tunnelbear.com/static/img/android@2x.b83f4df.png',
// isOnline: false,
// isOn: false,
// },
];
class SmartMeterScreen extends Component {
class SmartMeterScreen extends PureComponent {
static navigationOptions = ({ navigation }) => ({
title: 'Home',
headerLeft: (
<HeaderButtons HeaderButtonComponent={IoniconsHeaderButton}>
<Item title="menu" iconName="ios-menu" onPress={() => console.log('menu')} />
</HeaderButtons>
),
// headerLeft: (
// <HeaderButtons HeaderButtonComponent={IoniconsHeaderButton}>
// <Item title="menu" iconName="ios-menu" onPress={() => console.log('menu')} />
// </HeaderButtons>
// ),
headerRight: (
<HeaderButtons HeaderButtonComponent={IoniconsHeaderButton}>
<Item title="add" iconName="ios-add" onPress={() => navigation.navigate('Camera')} />
<Item title="menu" iconName="ios-add" onPress={() => navigation.navigate('Camera')} />
</HeaderButtons>
),
});
state = {
initData: this.props.allDeviceInfo,
data: this.props.allDeviceInfo,
isLoading: true,
data: [],
};
static getDerivedStateFromProps = (nextProps, prevState) => {
if (prevState.data !== nextProps.allDeviceInfo) {
return {
data: nextProps.allDeviceInfo,
};
} else null;
_isMounted = false;
componentDidMount = () => {
this._isMounted = true;
// this.getData();
};
componentDidMount = async () => {
await this.props.getAllDeviceInfo();
renderItem = ({ item, index }) => {
return (
<MeterCard
name={item.name || 'Untitled'}
description={item.description || ''}
img={item.img || null}
isOnline={item.isOnline || false}
isOn={item.isOn || false}
onPressEachCard={async () => {
await this.props.setCurrentSelected(item.deviceId);
await this.props.getTimers();
this.props.navigation.navigate('SmartMeterDetail', { name: item.name || '' });
}}
/>
);
};
componentDidUpdate = (prevProps, prevState) => {
if (prevState.data !== this.state.data) {
this.setState({ isLoading: false });
}
getData = async () => {
this._isMounted = false;
await this.props.getAllMainDeviceInfo();
};
render() {
console.log(this.state);
let { allDeviceInfo, getAllDeviceInfo, setCurrentSelected } = this.props;
const { isLoading } = this.state;
const { allMainDeviceInfo, isLoading, error } = this.props;
return (
return !error ? (
<FlatList
removeClippedSubviews={true}
refreshing={isLoading}
onRefresh={getAllDeviceInfo}
onRefresh={this.getData}
style={[theme.container, theme.containerWithPadding]}
contentContainerStyle={{ paddingBottom: isIphoneX() ? 90 : 55 }} //iPhoneX BottomSpace = 34
data={this.state.initData}
extraData={this.state.data}
keyExtractor={(item, index) => `Card${index}`}
data={allMainDeviceInfo}
extraData={allMainDeviceInfo}
keyExtractor={(item, index) => `Card${item.deviceId}`}
ListEmptyComponent={() => (
<View>
<Text style={[theme.normalText, { marginTop: 20 }]}>
{isLoading ? '' : 'No Device Connected'}
{isLoading ? '' : this._isMounted ? 'No Device Connected' : ''}
</Text>
</View>
)}
ListHeaderComponent={() => (
<Text style={[theme.smallTitle, theme.textDark, { marginBottom: 10 }]}>Smart meter</Text>
)}
renderItem={({ item, index }) => (
<MeterCard
// key={`mastercard${index}`}
name={item.name || 'Untitled'}
description={item.description || ''}
img={item.img || null}
isOnline={item.isOnline || false}
isOn={item.isOn || false}
onPressEachCard={() => {
setCurrentSelected(item.deviceId);
this.props.navigation.navigate('SmartMeterDetail', { name: item.name });
}}
/>
)}
renderItem={this.renderItem}
/>
) : (
<View>
<Text>{error}</Text>
</View>
);
}
}
const mapStateToProps = state => ({
allDeviceInfo: state.allDataReducer.allDeviceInfo,
allMainDeviceInfo: state.allMainDeviceReducer.allMainDeviceInfo,
isLoading: state.allMainDeviceReducer.isLoading,
error: state.allMainDeviceReducer.error,
});
const mapDispatchToProps = {
getAllDeviceInfo,
getAllMainDeviceInfo,
setCurrentSelected,
getTimers,
};
export default connect(
......
......@@ -25,6 +25,7 @@ import { isIphoneX } from '../../../utils/isPhoneX';
import FadeDimBG from '../../../components/FadeDimBG';
import SlideUpModal from '../../../components/SlideUpModal';
import { connect } from 'react-redux';
import { getTimers } from '../../../reduxStore/actions/timersAction';
// mock data
const MultipleMockData = [
......@@ -203,23 +204,6 @@ class TimerScreen extends Component {
search: '',
};
// renderTimerFab = () => {
// return (
// <Fab
// containerStyle={{
// bottom: '15%',
// // right: '50%', // centerFAB
// // marginRight: -28,
// }}
// style={{ backgroundColor: color.primary }}
// position="bottomRight"
// onPress={() => this.setState({ isVisible: true })}
// >
// <Icon name="add" />
// </Fab>
// );
// };
autoCloseSwipeRow = swipeInstance => {
if (this.currentlyOpenSwipe && this.currentlyOpenSwipe !== swipeInstance) {
this.currentlyOpenSwipe.close();
......@@ -258,8 +242,9 @@ class TimerScreen extends Component {
};
componentDidUpdate = (prevProps, prevState) => {
prevState !== this.state && console.log(this.state);
prevProps !== this.props && console.log(this.props);
if (prevProps.timers !== this.props.timers) {
console.log('timers =>', this.props.timers || '');
}
};
render() {
......@@ -279,7 +264,7 @@ class TimerScreen extends Component {
/>
<Icon
name="md-funnel"
style={{ color: '#c7cad1', fontSize: 14, marginLeft: 10 }}
style={{ color: '#c7cad1', fontSize: 20, marginLeft: 10, marginRight: 5 }}
onPress={() => this.setState({ isfilterVisible: true })}
/>
</View>
......@@ -287,10 +272,11 @@ class TimerScreen extends Component {
{/* List Timer */}
<FlatList
contentContainerStyle={{ paddingBottom: isIphoneX() ? 90 : 55 }}
data={MultipleMockData[0].timer}
data={this.props.timers}
extraData={this.props.timers}
ListEmptyComponent={() => (
<View>
<Text style={[theme.normalText, theme.mt2]}>No Subbreaker</Text>
<Text style={[theme.normalText, theme.mt2]}>No timers</Text>
</View>
)}
ItemSeparatorComponent={() => <View style={styles.separator} />}
......@@ -542,10 +528,20 @@ class TimerScreen extends Component {
}
const mapStateToProps = state => ({
allDeviceInfo: state.allDataReducer.allDeviceInfo,
allMainDeviceInfo: state.allMainDeviceReducer.allMainDeviceInfo,
timers: state.timersReducer.timers,
isLoading: state.timersReducer.isLoading,
selectedDeviceId: state.currentSelectedDeviceReducer.selectedDeviceId,
});
export default connect(mapStateToProps)(TimerScreen);
const mapDispatchToProps = {
getTimers,
};
export default connect(
mapStateToProps,
mapDispatchToProps
)(TimerScreen);
const pickerStyle = {
inputIOS: {
......@@ -569,7 +565,7 @@ const styles = StyleSheet.create({
flex: 1,
display: 'flex',
backgroundColor: 'transparent',
height: 30,
height: 33,
paddingVertical: 0,
borderTopWidth: 0,
borderBottomWidth: 0,
......@@ -579,10 +575,10 @@ const styles = StyleSheet.create({
borderBottomWidth: 1,
backgroundColor: 'transparent',
minHeight: 10,
height: 30,
height: 33,
borderColor: '#c7cad1',
},
searchBarInput: { fontFamily: 'Avenir-Roman', fontSize: 12, color: color.grey },
searchBarInput: { fontFamily: 'Avenir-Roman', fontSize: 14, color: color.grey, marginTop: 3 },
separator: {
marginHorizontal: 10,
height: StyleSheet.hairlineWidth,
......
......@@ -5,28 +5,25 @@ import logo from '../../assets/images/logo2.png';
import { width } from '../../constants/Layout';
import app from '../../firebase';
import { connect } from 'react-redux';
import { getAllDeviceInfo } from '../../reduxStore/actions/allDataAction';
import { getCurrentUser } from '../../reduxStore/actions/cerrentUserAction';
import { getAllMainDeviceInfo } from '../../reduxStore/actions/allMainDeviceAction';
class AuthLoadingScreen extends Component {
static navigationOptions = {
header: null,
};
constructor(props) {
super(props);
this._bootstrapAsync();
}
state = {
isShowImg: true,
authentication: null,
alreadyLaunched: null,
RememberedLogin: null,
};
showLogoThenIndicator = () => {
setTimeout(() => {
this.setState({ isShowImg: false });
}, 1200);
}, 1200); // 1200
};
_bootstrapAsync = async () => {
......@@ -38,46 +35,18 @@ class AuthLoadingScreen extends Component {
app.auth().onAuthStateChanged(async user => {
if (user) {
await this.props.getCurrentUser();
await this.props.getAllDeviceInfo();
this.props.navigation.navigate(RememberedLogin ? 'Main' : 'Login');
await this.props.getCurrentUser(user);
await this.props.getAllMainDeviceInfo();
this.props.navigation.navigate(RememberedLogin === 'true' ? 'Main' : 'Login');
} else {
this.props.navigation.navigate(alreadyLaunched ? 'Login' : 'Onboarding');
this.props.navigation.navigate(alreadyLaunched === 'true' ? 'Login' : 'Onboarding');
}
});
};
// componentDidMount = async () => {
// this.showLogoThenIndicator();
// // Preload data from an external API
// // Preload data using AsyncStorage
// const alreadyLaunched = await AsyncStorage.getItem('alreadyLaunched');
// const RememberedLogin = await AsyncStorage.getItem('RememberedLogin');
// app.auth().onAuthStateChanged(async user => {
// if (user) {
// this.props.getCurrentUser && (await this.props.getCurrentUser());
// this.setState({ authentication: true });
// this.props.navigation.navigate(RememberedLogin ? 'Main' : 'Login');
// } else {
// this.setState({ authentication: false });
// this.props.navigation.navigate(alreadyLaunched ? 'Login' : 'Onboarding');
// }
// });
// };
// componentDidUpdate = async (prevProps, prevState) => {
// if (prevState.authentication !== this.state.authentication) {
// this.props.getCurrentUser && (await this.props.getCurrentUser());
// this.props.navigation.navigate(
// this.state.RememberedLogin
// ? 'Main'
// : this.state.authentication || this.state.alreadyLaunched
// ? 'Login'
// : 'Onboarding'
// );
// }
// };
componentDidMount = async () => {
await this._bootstrapAsync();
};
render() {
return (
......@@ -98,12 +67,16 @@ class AuthLoadingScreen extends Component {
}
}
mapStateToProps = state => ({
uid: state.currentUserReducer.uid,
});
const mapDispatchToProps = {
getCurrentUser,
getAllDeviceInfo,
getAllMainDeviceInfo,
};
export default connect(
null,
mapStateToProps,
mapDispatchToProps
)(AuthLoadingScreen);
......@@ -4491,6 +4491,16 @@ lodash.clone@^4.5.0:
resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6"
integrity sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=
lodash.defaults@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=
lodash.flatten@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f"
integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=
lodash.isequal@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
......@@ -4501,11 +4511,6 @@ lodash.merge@^4.6.1:
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
lodash.set@^4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"
integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=
lodash.sortby@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
......@@ -4526,7 +4531,7 @@ lodash@4.17.11:
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.6.1:
lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.6.1:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
......@@ -5873,14 +5878,6 @@ rc@^1.2.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"
react-addons-update@^15.6.2:
version "15.6.2"
resolved "https://registry.yarnpkg.com/react-addons-update/-/react-addons-update-15.6.2.tgz#e53753c5b34887974510c882d7fb075851d5e504"
integrity sha1-5TdTxbNIh5dFEMiC1/sHWFHV5QQ=
dependencies:
fbjs "^0.8.9"
object-assign "^4.1.0"
react-deep-force-update@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.1.2.tgz#3d2ae45c2c9040cbb1772be52f8ea1ade6ca2ee1"
......@@ -5931,10 +5928,10 @@ react-native-camera@^2.11.1:
dependencies:
prop-types "^15.6.2"
react-native-date-picker@^2.5.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/react-native-date-picker/-/react-native-date-picker-2.6.1.tgz#ad322cc12a760ad7a2cabce18928652dd4f8b8f0"
integrity sha512-9FVOMulMs5mWfjWcoEuHotIh5LiJPHvrSUEsHfiYW48kME3GF/nE0DyNg4qDuJFRsZr8mIdiNyLQHQbnhGKZ/Q==
react-native-date-picker@^2.7.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/react-native-date-picker/-/react-native-date-picker-2.7.0.tgz#91c6cd85c45309763e58982c46fcf3dba2d1da55"
integrity sha512-pevfIzZ2jnYZe3jrDsUN2EM0fGcal3lL2aqExDux7d01C4QWOJJdHbut2URjL/EzS1v2ByLQJNT0ErjniheRiw==
dependencies:
moment "^2.22.1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment