Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React, { Component } from 'react'
import {
Alert,
Image,
StyleSheet,
TouchableHighlight,
TouchableOpacity,
TextInput,
Text,
View
} from 'react-native';
var Actions = require('react-native-router-flux').Actions;
import { CLOUD } from '../../cloud/cloudAPI'
import { logOut } from '../../util/util';
import { TopBar } from '../components/Topbar';
import { TextEditInput } from '../components/editComponents/TextEditInput'
import { Background } from '../components/Background'
import { setupStyle, NextButton } from './SetupShared'
import { styles, colors, screenWidth, screenHeight } from './../styles'
import { LOG } from '../../logging/Log'
export class SetupAddSphere extends Component {
constructor() {
super();
this.state = {sphereName:'', processing:false, processingText:'Setting up Sphere...'}
}
saveSphereName() {
import * as React from 'react'; import { Component } from 'react';
import {
ActivityIndicator,
Alert,
TouchableOpacity,
PixelRatio,
ScrollView,
StyleSheet,
Switch,
TextInput,
Text,
View
} from 'react-native';
const Actions = require('react-native-router-flux').Actions;
import {styles, colors, screenWidth, screenHeight, availableScreenHeight} from '../../styles'
import {IconButton} from "../../components/IconButton";
import {eventBus} from "../../../util/EventBus";
import {Util} from "../../../util/Util";
import {Scheduler} from "../../../logic/Scheduler";
import {BatchCommandHandler} from "../../../logic/BatchCommandHandler";
import {LOG} from "../../../logging/Log";
export class DeviceTime extends Component {
tickInterval : any;
unsubscribeStoreEvents : any;
timeSet : number;
constructor() {
import { Languages } from "../../../../Languages"
import * as React from 'react'; import { Component } from 'react';
import {
ActivityIndicator,
Alert,
TouchableOpacity,
PixelRatio,
ScrollView,
StyleSheet,
Switch,
TextInput,
Text,
View
} from 'react-native';
const Actions = require('react-native-router-flux').Actions;
import {screenWidth} from '../../../styles'
import {Util} from "../../../../util/Util";
/**
I want this Crownstone to turn on when I enter the room
I want this Crownstone to turn on when I enter the floor
I want this Crownstone to turn on when I enter floor X
I want this Crownstone to turn on when I enter zone X
I want this Crownstone to turn on when I enter room X
I want this Crownstone to turn on when I enter the sphere when it's dark outside
When this Crownstone turns on and its between 22 and 6, only turn it on for 50%
import React, { Component } from 'react'
import {
Alert,
Dimensions,
TouchableHighlight,
PixelRatio,
ScrollView,
Switch,
Text,
View
} from 'react-native';
import { Background } from './../components/Background'
import { ListEditableItems } from './../components/ListEditableItems'
let Actions = require('react-native-router-flux').Actions;
import { styles, colors } from './../styles'
export class SettingsChangePassword extends Component {
componentDidMount() {
this.unsubscribe = this.props.store.subscribe(() => {
this.forceUpdate();
})
}
componentWillUnmount() {
this.unsubscribe();
}
_getItems() {
let requiredData = {sphereId: this.props.sphereId, locationId: this.props.locationId};
import {
Alert,
Dimensions,
TouchableHighlight,
PixelRatio,
ScrollView,
Switch,
Text,
View
} from 'react-native';
import { Background } from '../components/Background'
import { ListEditableItems } from '../components/ListEditableItems'
import { getRoomNames } from '../../util/dataUtil'
import { CLOUD } from '../../cloud/cloudAPI'
var Actions = require('react-native-router-flux').Actions;
import { styles, colors } from '../styles'
export class SettingsRoomAdd extends Component {
constructor() {
super();
this.state = {name:'', icon: 'ios-document'};
}
_getItems() {
const store = this.props.store;
const state = store.getState();
import React, { Component } from 'react'
import {
Alert,
Dimensions,
TouchableHighlight,
PixelRatio,
ScrollView,
Switch,
Text,
View
} from 'react-native';
import { Background } from './../components/Background'
import { ListEditableItems } from './../components/ListEditableItems'
var Actions = require('react-native-router-flux').Actions;
import { styles, colors } from './../styles'
export class SettingsChangeEmail extends Component {
componentDidMount() {
this.unsubscribe = this.props.store.subscribe(() => {
this.forceUpdate();
})
}
componentWillUnmount() {
this.unsubscribe();
}
_getItems() {
let requiredData = {sphereId: this.props.sphereId, locationId: this.props.locationId};
Alert,
Image,
Text,
View,
ScrollView,
TouchableOpacity,
TouchableWithoutFeedback,
} from 'react-native';
import { IconButton } from '../components/IconButton'
import { OverlayBox } from '../components/overlays/OverlayBox'
import { colors , screenHeight, screenWidth} from '../styles'
import { eventBus } from "../../util/EventBus";
import { SeparatedItemList } from "../components/SeparatedItemList";
import { Icon } from "../components/Icon";
const Actions = require('react-native-router-flux').Actions;
export class SphereSelectionOverlay extends Component {
unsubscribe : any;
activeSphere : string;
constructor(props) {
super(props);
this.state = { visible: false };
this.unsubscribe = [];
}
componentDidMount() {
this.unsubscribe.push(eventBus.on("showSphereSelectionOverlay", () => {
this.setState({ visible: true });
import React, { Component } from 'react'
import {
Alert,
Dimensions,
TouchableHighlight,
PixelRatio,
ScrollView,
Switch,
Text,
View
} from 'react-native';
import { Background } from '../components/Background'
import { ListEditableItems } from '../components/ListEditableItems'
import { getRoomName, getRoomNames, getRoomIdFromName } from '../../util/dataUtil'
var Actions = require('react-native-router-flux').Actions;
import { styles, colors } from '../styles'
import { NO_LOCATION_NAME } from '../../ExternalConfig'
import { CLOUD } from '../../cloud/cloudAPI'
import { BLEutil } from '../../native/BLEutil'
import { IconButton } from '../components/IconButton'
import { BleActions } from '../../native/Proxy'
import { LOG } from '../../logging/Log'
export class SettingsCrownstone extends Component {
constructor() {
super();
this.deleting = false;
}
componentDidMount() {
import {
Alert,
Dimensions,
TouchableHighlight,
PixelRatio,
ScrollView,
Switch,
Text,
View
} from 'react-native';
import { Background } from './../components/Background'
import { ListEditableItems } from './../components/ListEditableItems'
import { EditSpacer } from './../components/editComponents/EditSpacer'
var Actions = require('react-native-router-flux').Actions;
import { styles, colors } from './../styles'
export class SettingsRooms extends Component {
_getItems() {
return [
{type:'spacer'},
{label:'Manage Profile', type:'navigation', callback: (newValue) => {}},
{label:'Manage Group', type:'navigation', callback: (newValue) => {}},
//{label:'Add, remove, or change the permissions of the people in your group.', type:'explanation', below:true},
{label:'Manage Crownstones', type:'navigation', callback: (newValue) => {}},
//{label:'Here you can reset Crownstones to factory settings. (ie. remove ownership)', type:'explanation', below:true},
{label:'Manage Locations', type:'navigation', callback: (newValue) => {}},
//{label:'You can add or remove locations (rooms) to your app. Localization works in rooms without Crownstones but it may be less accurate.', type:'explanation', below:true},
{label:'App Complexity', type:'navigation', callback: (newValue) => {}},
//{label:'You can add or remove features from your app interface to tailor it to your needs.', type:'explanation', below:true},
import React, { Component } from 'react'
import {
Alert,
Image,
StyleSheet,
TouchableHighlight,
TouchableOpacity,
TextInput,
Text,
View
} from 'react-native';
var Actions = require('react-native-router-flux').Actions;
import { Background } from '../components/Background'
import { setupStyle, SkipButton } from './SetupShared'
import { styles, colors, width, height } from './../styles'
export class SetupAddCrownstoneSelect extends Component {
render() {
return (