adding license and copyright header
This commit is contained in:
Родитель
d261363ee0
Коммит
244664656c
|
@ -0,0 +1,21 @@
|
|||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React, {useState, useEffect, useContext} from 'react';
|
||||
import {View, Platform} from 'react-native';
|
||||
import Settings from './Settings';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React from 'react';
|
||||
import {View, FlatList, ViewStyle, TextStyle} from 'react-native';
|
||||
import {ListItem} from 'react-native-elements';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {RouteProp} from '@react-navigation/native';
|
||||
import React from 'react';
|
||||
import {WebView} from 'react-native-webview';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React, {
|
||||
useCallback,
|
||||
useContext,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {RouteProp} from '@react-navigation/native';
|
||||
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
|
||||
import CardView from 'CardView';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React, {useMemo} from 'react';
|
||||
import {View} from 'react-native';
|
||||
import {useLogger, useTheme} from 'hooks';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React, {
|
||||
useCallback,
|
||||
useContext,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {useContext, useMemo} from 'react';
|
||||
import {ThemeContext} from './contexts/theme';
|
||||
import React from 'react';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React, {useEffect, useCallback, useContext, useMemo} from 'react';
|
||||
import {View} from 'react-native';
|
||||
import LogoLight from './assets/IoT-Plug-And-Play_Dark.svg';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {useBoolean} from 'hooks/common';
|
||||
import {useScreenDimensions} from 'hooks/layout';
|
||||
import React, {useCallback, useMemo} from 'react';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React from 'react';
|
||||
import {Platform} from 'react-native';
|
||||
import {Button as ElButton, ButtonProps} from 'react-native-elements';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React from 'react';
|
||||
import {View, ViewStyle} from 'react-native';
|
||||
import {CheckBox} from 'react-native-elements';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React, {useRef, useState, useEffect} from 'react';
|
||||
import {CardProps, IconProps, Icon, Input} from 'react-native-elements';
|
||||
import {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React, {useEffect, useRef, useState} from 'react';
|
||||
import {
|
||||
AnimatedCircularProgress,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {useTheme} from 'hooks';
|
||||
import React from 'react';
|
||||
import {Platform, View} from 'react-native';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {useTheme} from 'hooks';
|
||||
import {HeaderTitle} from '@react-navigation/stack';
|
||||
import React from 'react';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
export * from './button';
|
||||
export {default as Button} from './button';
|
||||
export * from './buttonGroup';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React, {useMemo} from 'react';
|
||||
import {
|
||||
View,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React, {useState} from 'react';
|
||||
import {StyleProp, ViewStyle} from 'react-native';
|
||||
import {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {useTheme} from 'hooks';
|
||||
import React, {useEffect} from 'react';
|
||||
import {View} from 'react-native';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React from 'react';
|
||||
import {Platform, StyleSheet, View} from 'react-native';
|
||||
import {Icon} from 'react-native-elements';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React from 'react';
|
||||
import {useSafeAreaInsets} from 'react-native-safe-area-context';
|
||||
import {View} from 'react-native';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React from 'react';
|
||||
import {Text as ELText, TextProps} from 'react-native-elements';
|
||||
import {Dimensions, Platform, PixelRatio} from 'react-native';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
export type DefaultProps = {
|
||||
emulator: boolean;
|
||||
initialized: boolean;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
export {default as IoTCProvider, IoTCContext} from './iotc';
|
||||
export {default as LogsProvider, LogsContext} from './logs';
|
||||
export {default as StorageProvider, StorageContext} from './storage';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React, {useCallback, useReducer} from 'react';
|
||||
import {IIoTCClient} from 'react-native-azure-iotcentral-client';
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React, {useCallback, useState} from 'react';
|
||||
import {LogItem, TimedLog} from '../types';
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React, {useCallback, useState} from 'react';
|
||||
import {IoTCCredentials} from 'react-native-azure-iotcentral-client';
|
||||
import * as Keychain from 'react-native-keychain';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import React, {useCallback, useState} from 'react';
|
||||
import {Appearance} from 'react-native';
|
||||
import {ThemeMode} from 'types';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
declare module '*.svg' {
|
||||
import {SvgProps} from 'react-native-svg';
|
||||
const content: React.FC<SvgProps>;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {useNavigation} from '@react-navigation/native';
|
||||
import {defaults} from 'contexts/defaults';
|
||||
import {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
export * from './common';
|
||||
export * from './iotc';
|
||||
export * from './layout';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {useContext, useState, useRef, useEffect, useCallback} from 'react';
|
||||
import {
|
||||
DecryptCredentials,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {StorageContext, ThemeContext} from 'contexts';
|
||||
import {useState, useEffect, useCallback, useContext, useMemo} from 'react';
|
||||
import {Appearance, Dimensions, ScaledSize} from 'react-native';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {
|
||||
CancellationToken,
|
||||
CommandCallback,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
declare module 'react-native-progress/CircleSnail' {
|
||||
export default class CircleSnail extends React.Component<CircleSnailPropTypes> {}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import DeviceInfo from 'react-native-device-info';
|
||||
import {DataType} from 'types';
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {ItemProps} from 'types';
|
||||
import {AVAILABLE_PROPERTIES} from './internal';
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
export type PropertiesProps = {
|
||||
id: string;
|
||||
name: string;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {EventEmitter} from 'events';
|
||||
import {
|
||||
ISensor,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {EventEmitter} from 'events';
|
||||
import {
|
||||
ISensor,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import DeviceInfo from 'react-native-device-info';
|
||||
import {EventEmitter} from 'events';
|
||||
import {ISensor, DATA_AVAILABLE_EVENT} from './internal';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {EventEmitter} from 'events';
|
||||
import {ISensor, DATA_AVAILABLE_EVENT, getRandom} from './internal';
|
||||
import Geolocation from '@react-native-community/geolocation';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {EventEmitter} from 'events';
|
||||
import {
|
||||
ISensor,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {EventEmitter} from 'events';
|
||||
import GoogleFit from 'react-native-google-fit';
|
||||
import {ISensor, DATA_AVAILABLE_EVENT, LOG_DATA} from 'sensors/internal';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import HealthKit, {SampleResult} from 'rn-apple-healthkit';
|
||||
import {EventEmitter} from 'events';
|
||||
import {requestPermissions} from '../internal';
|
||||
|
@ -82,7 +85,8 @@ export default class HealthKitClimb extends EventEmitter implements ISensor {
|
|||
if (err) {
|
||||
this.emit(
|
||||
LOG_DATA,
|
||||
`Error from Apple HealthKit - Climbs:\n${(err as any).message}`,
|
||||
`Error from Apple HealthKit - Climbs:
|
||||
${(err as any).message}`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import HealthKit from 'rn-apple-healthkit';
|
||||
import {EventEmitter} from 'events';
|
||||
import {NativeAppEventEmitter} from 'react-native';
|
||||
|
@ -87,9 +90,8 @@ export default class HealthKitSteps extends EventEmitter implements ISensor {
|
|||
if (err) {
|
||||
this.emit(
|
||||
LOG_DATA,
|
||||
`Error from Apple HealthKit - Steps:\n${
|
||||
(err as any).message
|
||||
}`,
|
||||
`Error from Apple HealthKit - Steps:
|
||||
${(err as any).message}`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import HealthKit, {HealthKitPermissions} from 'rn-apple-healthkit';
|
||||
|
||||
const PERMS = HealthKit.Constants.Permissions;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import Accelerometer from './accelerometer';
|
||||
import Barometer from './barometer';
|
||||
import Battery from './battery';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {EventEmitter} from 'events';
|
||||
|
||||
export interface ISensor extends EventEmitter {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {EventEmitter} from 'events';
|
||||
import {
|
||||
ISensor,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
const Strings = {
|
||||
Title: 'IoT Plug and Play',
|
||||
Core: {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
export function Log(msg: string | number) {
|
||||
console.log(msg);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {EventEmitter} from 'events';
|
||||
import {IIoTCLogger, IOTC_LOGGING} from 'react-native-azure-iotcentral-client';
|
||||
|
||||
|
@ -15,9 +18,8 @@ export default class EventLogger extends EventEmitter implements IIoTCLogger {
|
|||
IOTC_LOGGING[logLevel.toUpperCase() as keyof typeof IOTC_LOGGING];
|
||||
if (!this.logLevel) {
|
||||
console.error(
|
||||
`LoggingLevel ${logLevel} is unsupported.\nSupported levels: ${Object.keys(
|
||||
IOTC_LOGGING,
|
||||
).join(',')}`,
|
||||
`LoggingLevel ${logLevel} is unsupported.
|
||||
Supported levels: ${Object.keys(IOTC_LOGGING).join(',')}`,
|
||||
);
|
||||
throw new Error();
|
||||
}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {Platform} from 'react-native';
|
||||
import Torch from 'react-native-torch';
|
||||
import {TimeOut} from '.';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {IIoTCLogger, IOTC_LOGGING} from 'react-native-azure-iotcentral-client';
|
||||
|
||||
export default class WebhookLogger implements IIoTCLogger {
|
||||
|
@ -12,9 +15,8 @@ export default class WebhookLogger implements IIoTCLogger {
|
|||
IOTC_LOGGING[logLevel.toUpperCase() as keyof typeof IOTC_LOGGING];
|
||||
if (!this.logLevel) {
|
||||
console.error(
|
||||
`LoggingLevel ${logLevel} is unsupported.\nSupported levels: ${Object.keys(
|
||||
IOTC_LOGGING,
|
||||
).join(',')}`,
|
||||
`LoggingLevel ${logLevel} is unsupported.
|
||||
Supported levels: ${Object.keys(IOTC_LOGGING).join(',')}`,
|
||||
);
|
||||
throw new Error();
|
||||
}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
export * from './CustomLogger';
|
||||
export {default as EventLogger} from './EventLogger';
|
||||
export async function TimeOut(seconds: number) {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {StackNavigationProp} from '@react-navigation/stack';
|
||||
import {
|
||||
GestureResponderEvent,
|
||||
|
|
Загрузка…
Ссылка в новой задаче