Show local images.
Show local images on iOS and Android.
@@ -17,7 +17,7 @@ public class FastImageRequestListener implements RequestListener<Drawable> {
|
||||
static final String REACT_ON_LOAD_EVENT = "onFastImageLoad";
|
||||
static final String REACT_ON_LOAD_END_EVENT = "onFastImageLoadEnd";
|
||||
|
||||
private String key = null;
|
||||
private String key;
|
||||
|
||||
FastImageRequestListener(String key) {
|
||||
this.key = key;
|
||||
|
||||
@@ -95,8 +95,13 @@ class FastImageViewManager extends SimpleViewManager<FastImageViewWithUrl> imple
|
||||
.dontTransform()
|
||||
.placeholder(TRANSPARENT_DRAWABLE);
|
||||
|
||||
String stringUrl = glideUrl.toString();
|
||||
requestManager
|
||||
.load(glideUrl)
|
||||
// This will make this work for remote and local images. e.g.
|
||||
// - file:///
|
||||
// - content://
|
||||
// - data:image/png;base64
|
||||
.load(stringUrl.startsWith("http") ? glideUrl : stringUrl)
|
||||
.apply(options)
|
||||
.listener(new FastImageRequestListener(key))
|
||||
.into(view);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
typedef NS_ENUM(NSInteger, FFFPriority) {
|
||||
FFFPriorityLow,
|
||||
@@ -6,13 +7,14 @@ typedef NS_ENUM(NSInteger, FFFPriority) {
|
||||
FFFPriorityHigh
|
||||
};
|
||||
|
||||
/**
|
||||
* Object containing an image URL and associated metadata.
|
||||
*/
|
||||
// Object containing an image uri and metadata.
|
||||
@interface FFFastImageSource : NSObject
|
||||
|
||||
@property (nonatomic) NSURL* uri;
|
||||
// uri for image, or base64
|
||||
@property (nonatomic) NSURL* url;
|
||||
// priority for image request
|
||||
@property (nonatomic) FFFPriority priority;
|
||||
// headers for the image request
|
||||
@property (nonatomic) NSDictionary *headers;
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)url
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_uri = url;
|
||||
_url = url;
|
||||
_priority = priority;
|
||||
_headers = headers;
|
||||
}
|
||||
|
||||
@@ -54,10 +54,46 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)sendOnLoad:(UIImage *)image {
|
||||
onLoadEvent = @{
|
||||
@"width":[NSNumber numberWithDouble:image.size.width],
|
||||
@"height":[NSNumber numberWithDouble:image.size.height]
|
||||
};
|
||||
if (_onFastImageLoad) {
|
||||
_onFastImageLoad(onLoadEvent);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setSource:(FFFastImageSource *)source {
|
||||
if (_source != source) {
|
||||
_source = source;
|
||||
|
||||
// Load base64 images.
|
||||
NSString* url = [_source.url absoluteString];
|
||||
if (url && [url hasPrefix:@"data:image"]) {
|
||||
if (_onFastImageLoadStart) {
|
||||
_onFastImageLoadStart(@{});
|
||||
hasSentOnLoadStart = YES;
|
||||
} {
|
||||
hasSentOnLoadStart = NO;
|
||||
}
|
||||
UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:_source.url]];
|
||||
[self setImage:image];
|
||||
if (_onFastImageProgress) {
|
||||
_onFastImageProgress(@{
|
||||
@"loaded": @(1),
|
||||
@"total": @(1)
|
||||
});
|
||||
}
|
||||
hasCompleted = YES;
|
||||
[self sendOnLoad:image];
|
||||
|
||||
if (_onFastImageLoadEnd) {
|
||||
_onFastImageLoadEnd(@{});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Set headers.
|
||||
[_source.headers enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString* header, BOOL *stop) {
|
||||
[[SDWebImageDownloader sharedDownloader] setValue:header forHTTPHeaderField:key];
|
||||
@@ -88,7 +124,12 @@
|
||||
hasErrored = NO;
|
||||
|
||||
// Load the new source.
|
||||
[self sd_setImageWithURL:_source.uri
|
||||
// This will work for:
|
||||
// - https://
|
||||
// - file:///var/containers/Bundle/Application/50953EA3-CDA8-4367-A595-DE863A012336/ReactNativeFastImageExample.app/assets/src/images/fields.jpg
|
||||
// - file:///var/containers/Bundle/Application/545685CB-777E-4B07-A956-2D25043BC6EE/ReactNativeFastImageExample.app/assets/src/images/plankton.gif
|
||||
// - file:///Users/dylan/Library/Developer/CoreSimulator/Devices/61DC182B-3E72-4A18-8908-8A947A63A67F/data/Containers/Data/Application/AFC2A0D2-A1E5-48C1-8447-C42DA9E5299D/Documents/images/E1F1D5FC-88DB-492F-AD33-B35A045D626A.jpg"
|
||||
[self sd_setImageWithURL:_source.url
|
||||
placeholderImage:nil
|
||||
options:options
|
||||
progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
|
||||
@@ -112,13 +153,7 @@
|
||||
}
|
||||
} else {
|
||||
hasCompleted = YES;
|
||||
onLoadEvent = @{
|
||||
@"width":[NSNumber numberWithDouble:image.size.width],
|
||||
@"height":[NSNumber numberWithDouble:image.size.height]
|
||||
};
|
||||
if (_onFastImageLoad) {
|
||||
_onFastImageLoad(onLoadEvent);
|
||||
}
|
||||
[self sendOnLoad:image];
|
||||
if (_onFastImageLoadEnd) {
|
||||
_onFastImageLoadEnd(@{});
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ RCT_EXPORT_METHOD(preload:(nonnull NSArray<FFFastImageSource *> *)sources)
|
||||
[source.headers enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString* header, BOOL *stop) {
|
||||
[[SDWebImageDownloader sharedDownloader] setValue:header forHTTPHeaderField:key];
|
||||
}];
|
||||
[urls setObject:source.uri atIndexedSubscript:idx];
|
||||
[urls setObject:source.url atIndexedSubscript:idx];
|
||||
}];
|
||||
|
||||
[[SDWebImagePrefetcher sharedImagePrefetcher] prefetchURLs:urls];
|
||||
|
||||
@@ -13,9 +13,10 @@ RCT_ENUM_CONVERTER(FFFPriority, (@{
|
||||
if (!json) {
|
||||
return nil;
|
||||
}
|
||||
NSString *URLString = json[@"uri"];
|
||||
NSURL *url = [self NSURL:URLString];
|
||||
|
||||
|
||||
NSString *uriString = json[@"uri"];
|
||||
NSURL *uri = [self NSURL:uriString];
|
||||
|
||||
FFFPriority priority = [self FFFPriority:json[@"priority"]];
|
||||
|
||||
NSDictionary *headers = [self NSDictionary:json[@"headers"]];
|
||||
@@ -35,7 +36,7 @@ RCT_ENUM_CONVERTER(FFFPriority, (@{
|
||||
}
|
||||
}
|
||||
|
||||
FFFastImageSource *imageSource = [[FFFastImageSource alloc] initWithURL:url priority:priority headers:headers];
|
||||
FFFastImageSource *imageSource = [[FFFastImageSource alloc] initWithURL:uri priority:priority headers:headers];
|
||||
|
||||
return imageSource;
|
||||
}
|
||||
|
||||
@@ -22,16 +22,16 @@
|
||||
"url": "git+https://github.com/DylanVann/react-native-fast-image.git"
|
||||
},
|
||||
"scripts": {
|
||||
"format": "prettier --write --list-different ./**/*.js",
|
||||
"format": "prettier --write --list-different ./src/*.js",
|
||||
"prepare": "git submodule update --init --recursive",
|
||||
"test": "yarn run format && yarn run test:jest",
|
||||
"test:jest": "jest ./src/*.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-jest": "^22.4.4",
|
||||
"babel-jest": "^23.0.1",
|
||||
"babel-preset-react-native": "^4.0.0",
|
||||
"jest": "^22.4.4",
|
||||
"prettier": "^1.12.1",
|
||||
"jest": "^23.1.0",
|
||||
"prettier": "^1.13.4",
|
||||
"prettier-check": "^2.0.0",
|
||||
"prop-types": "^15.6.1",
|
||||
"react": "^16.4.0",
|
||||
|
||||
@@ -57,3 +57,5 @@ buck-out/
|
||||
|
||||
# CocoaPods
|
||||
ios/Pods
|
||||
|
||||
src
|
||||
@@ -1,32 +0,0 @@
|
||||
import React from 'react'
|
||||
import { TabNavigator, TabBarBottom } from 'react-navigation'
|
||||
import FastImageExamples from './FastImageExamples'
|
||||
import FastImageGrid from './FastImageGrid'
|
||||
import DefaultImageGrid from './DefaultImageGrid'
|
||||
|
||||
const App = TabNavigator(
|
||||
{
|
||||
fastImageExample: {
|
||||
screen: FastImageExamples,
|
||||
},
|
||||
image: {
|
||||
screen: DefaultImageGrid,
|
||||
},
|
||||
fastImage: {
|
||||
screen: FastImageGrid,
|
||||
},
|
||||
},
|
||||
{
|
||||
tabBarComponent: TabBarBottom,
|
||||
tabBarPosition: 'bottom',
|
||||
swipeEnabled: false,
|
||||
animationEnabled: false,
|
||||
tabBarOptions: {
|
||||
style: {
|
||||
backgroundColor: 'white',
|
||||
},
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
export default App
|
||||
@@ -1,60 +0,0 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const IMAGE_URL = 'https://media.giphy.com/media/GEsoqZDGVoisw/giphy.gif'
|
||||
|
||||
const BorderRadiusExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• Border radius." />
|
||||
</Section>
|
||||
<SectionFlex onPress={onPressReload}>
|
||||
<FastImage
|
||||
style={styles.imageSquare}
|
||||
source={{
|
||||
uri: IMAGE_URL + bust,
|
||||
}}
|
||||
/>
|
||||
<FastImage
|
||||
style={styles.imageRectangular}
|
||||
source={{
|
||||
uri: IMAGE_URL + bust,
|
||||
}}
|
||||
/>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
imageSquare: {
|
||||
borderRadius: 50,
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
width: 100,
|
||||
flex: 0,
|
||||
},
|
||||
imageRectangular: {
|
||||
borderRadius: 50,
|
||||
borderTopLeftRadius: 10,
|
||||
borderBottomRightRadius: 10,
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
flex: 1,
|
||||
},
|
||||
plus: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
position: 'absolute',
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(BorderRadiusExample)
|
||||
@@ -1,28 +0,0 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
|
||||
|
||||
const Button = ({ text, onPress }) => (
|
||||
<TouchableOpacity onPress={onPress}>
|
||||
<View style={styles.button}>
|
||||
<Text style={styles.text}>{text}</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
button: {
|
||||
backgroundColor: 'black',
|
||||
margin: 5,
|
||||
height: 44,
|
||||
paddingLeft: 10,
|
||||
paddingRight: 10,
|
||||
borderRadius: 10,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
text: {
|
||||
color: 'white',
|
||||
},
|
||||
})
|
||||
|
||||
export default Button
|
||||
@@ -1,16 +0,0 @@
|
||||
// @flow
|
||||
import React from 'react'
|
||||
import { Image } from 'react-native'
|
||||
import Icon from './Icons/Icon'
|
||||
import ImageGrid from './ImageGrid'
|
||||
|
||||
const DefaultImageGrid = () => <ImageGrid ImageComponent={Image} />
|
||||
|
||||
DefaultImageGrid.navigationOptions = {
|
||||
tabBarLabel: 'Image Grid',
|
||||
tabBarIcon: props => (
|
||||
<Icon name="ios-image-outline" focusedName="ios-image" {...props} />
|
||||
),
|
||||
}
|
||||
|
||||
export default DefaultImageGrid
|
||||
@@ -1,81 +0,0 @@
|
||||
import React from 'react'
|
||||
import { ScrollView, StatusBar, StyleSheet, Text, View } from 'react-native'
|
||||
import Icon from './Icons/Icon'
|
||||
import Section from './Section'
|
||||
import PriorityExample from './PriorityExample'
|
||||
import GifExample from './GifExample'
|
||||
import BorderRadiusExample from './BorderRadiusExample'
|
||||
import FeatureText from './FeatureText'
|
||||
import ProgressExample from './ProgressExample'
|
||||
import PreloadExample from './PreloadExample'
|
||||
import StatusBarUnderlay, { STATUS_BAR_HEIGHT } from './StatusBarUnderlay'
|
||||
|
||||
const FastImageExample = () => (
|
||||
<View style={styles.container}>
|
||||
<StatusBar
|
||||
translucent
|
||||
barStyle="dark-content"
|
||||
backgroundColor="transparent"
|
||||
/>
|
||||
<ScrollView
|
||||
style={styles.scrollContainer}
|
||||
contentContainerStyle={styles.scrollContentContainer}
|
||||
>
|
||||
<View style={styles.contentContainer}>
|
||||
<Section>
|
||||
<Text style={styles.titleText}>🚩 FastImage</Text>
|
||||
<FeatureText text="Tap images to reload examples." />
|
||||
</Section>
|
||||
<PriorityExample />
|
||||
<GifExample />
|
||||
<BorderRadiusExample />
|
||||
<ProgressExample />
|
||||
<PreloadExample />
|
||||
</View>
|
||||
</ScrollView>
|
||||
<StatusBarUnderlay />
|
||||
</View>
|
||||
)
|
||||
|
||||
FastImageExample.navigationOptions = {
|
||||
tabBarLabel: 'FastImage Example',
|
||||
tabBarIcon: props => (
|
||||
<Icon
|
||||
name="ios-information-circle-outline"
|
||||
focusedName="ios-information-circle"
|
||||
{...props}
|
||||
/>
|
||||
),
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
titleText: {
|
||||
fontWeight: '900',
|
||||
marginBottom: 20,
|
||||
color: '#222',
|
||||
},
|
||||
contentContainer: {
|
||||
marginTop: 20,
|
||||
marginBottom: 20,
|
||||
},
|
||||
image: {
|
||||
flex: 1,
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 10,
|
||||
},
|
||||
container: {
|
||||
flex: 1,
|
||||
alignItems: 'stretch',
|
||||
backgroundColor: '#fff',
|
||||
},
|
||||
scrollContainer: {
|
||||
marginTop: STATUS_BAR_HEIGHT,
|
||||
},
|
||||
scrollContentContainer: {
|
||||
alignItems: 'stretch',
|
||||
flex: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default FastImageExample
|
||||
@@ -1,15 +0,0 @@
|
||||
import React from 'react'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Icon from './Icons/Icon'
|
||||
import ImageGrid from './ImageGrid'
|
||||
|
||||
const FastImageGrid = () => <ImageGrid ImageComponent={FastImage} />
|
||||
|
||||
FastImageGrid.navigationOptions = {
|
||||
tabBarLabel: 'FastImage Grid',
|
||||
tabBarIcon: props => (
|
||||
<Icon name="ios-photos-outline" focusedName="ios-photos" {...props} />
|
||||
),
|
||||
}
|
||||
|
||||
export default FastImageGrid
|
||||
@@ -1,10 +0,0 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, Text } from 'react-native'
|
||||
|
||||
export default ({ text }) => <Text style={styles.style}>{text}</Text>
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
style: {
|
||||
color: '#222',
|
||||
},
|
||||
})
|
||||
@@ -1,33 +0,0 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const GIF_URL =
|
||||
'https://cdn-images-1.medium.com/max/1600/1*-CY5bU4OqiJRox7G00sftw.gif'
|
||||
|
||||
const GifExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• GIF support." />
|
||||
</Section>
|
||||
<SectionFlex onPress={onPressReload}>
|
||||
<FastImage style={styles.image} source={{ uri: GIF_URL + bust }} />
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
image: {
|
||||
backgroundColor: '#ddd',
|
||||
margin: 10,
|
||||
height: 100,
|
||||
width: 100,
|
||||
flex: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(GifExample)
|
||||
@@ -1,17 +0,0 @@
|
||||
import React from 'react'
|
||||
import Base from 'react-native-vector-icons/Ionicons'
|
||||
|
||||
const Icon = ({ size, name, focusedName, focused, tintColor }) => (
|
||||
<Base
|
||||
name={focused ? focusedName : name}
|
||||
size={size}
|
||||
style={{ width: size, height: size }}
|
||||
color={tintColor}
|
||||
/>
|
||||
)
|
||||
|
||||
Icon.defaultProps = {
|
||||
size: 26,
|
||||
}
|
||||
|
||||
export default Icon
|
||||
@@ -1,125 +0,0 @@
|
||||
import React, { Component } from 'react'
|
||||
import { FlatList, StyleSheet, Text, View } from 'react-native'
|
||||
import StatusBarUnderlay, { STATUS_BAR_HEIGHT } from './StatusBarUnderlay'
|
||||
|
||||
const getImageUrl = (id, width, height) =>
|
||||
`https://unsplash.it/${width}/${height}?image=${id}`
|
||||
|
||||
class ImageGrid extends Component {
|
||||
constructor(props: Object) {
|
||||
super(props)
|
||||
|
||||
fetch('https://unsplash.it/list')
|
||||
.then(res => res.json())
|
||||
.then(this._onFetchImagesSuccess)
|
||||
.catch(this._onFetchImagesError)
|
||||
}
|
||||
|
||||
state = {
|
||||
images: [],
|
||||
itemHeight: 0,
|
||||
}
|
||||
|
||||
_onLayout = e => {
|
||||
const width = e.nativeEvent.layout.width
|
||||
this.setState({
|
||||
itemHeight: width / 4,
|
||||
})
|
||||
}
|
||||
|
||||
_onFetchImagesError = () => {
|
||||
this.setState({
|
||||
error: true,
|
||||
})
|
||||
}
|
||||
|
||||
_onFetchImagesSuccess = images => {
|
||||
this.setState({
|
||||
images,
|
||||
})
|
||||
}
|
||||
|
||||
_getItemLayout = (data, index) => {
|
||||
const { itemHeight } = this.state
|
||||
return { length: itemHeight, offset: itemHeight * index, index }
|
||||
}
|
||||
|
||||
_renderItem = ({ item }) => {
|
||||
const ImageComponent = this.props.ImageComponent
|
||||
const uri = getImageUrl(item.id, 100, 100)
|
||||
return (
|
||||
<View style={styles.imageContainer}>
|
||||
<ImageComponent source={{ uri }} style={styles.image} />
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
_extractKey = item => {
|
||||
return item.id
|
||||
}
|
||||
|
||||
render() {
|
||||
if (this.state.error) {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.text}>Error fetching images.</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<FlatList
|
||||
onLayout={this._onLayout}
|
||||
style={styles.list}
|
||||
columnWrapperStyle={[
|
||||
styles.columnWrapper,
|
||||
{ height: this.state.itemHeight },
|
||||
]}
|
||||
data={this.state.images}
|
||||
renderItem={this._renderItem}
|
||||
numColumns={4}
|
||||
keyExtractor={this._extractKey}
|
||||
getItemLayout={this._getItemLayout}
|
||||
/>
|
||||
<StatusBarUnderlay />
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const MARGIN = 2
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
backgroundColor: '#fff',
|
||||
alignItems: 'stretch',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
text: {
|
||||
textAlign: 'center',
|
||||
},
|
||||
list: {
|
||||
marginTop: STATUS_BAR_HEIGHT,
|
||||
flex: 1,
|
||||
},
|
||||
columnWrapper: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
marginLeft: -MARGIN,
|
||||
marginRight: -MARGIN,
|
||||
},
|
||||
image: {
|
||||
flex: 1,
|
||||
width: null,
|
||||
height: null,
|
||||
margin: MARGIN,
|
||||
backgroundColor: '#eee',
|
||||
},
|
||||
imageContainer: {
|
||||
flex: 1,
|
||||
alignItems: 'stretch',
|
||||
},
|
||||
})
|
||||
|
||||
export default ImageGrid
|
||||
@@ -1,84 +0,0 @@
|
||||
import React, { Component } from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
import uuid from 'uuid/v4'
|
||||
import Button from './Button'
|
||||
import { createImageProgress } from 'react-native-image-progress'
|
||||
|
||||
const IMAGE_URL =
|
||||
'https://cdn-images-1.medium.com/max/1600/1*-CY5bU4OqiJRox7G00sftw.gif'
|
||||
|
||||
const Image = createImageProgress(FastImage)
|
||||
|
||||
class PreloadExample extends Component {
|
||||
state = {
|
||||
show: false,
|
||||
url: IMAGE_URL,
|
||||
}
|
||||
|
||||
bustCache = () => {
|
||||
const key = uuid()
|
||||
const bust = `?bust=${key}`
|
||||
// Preload images. This can be called anywhere.
|
||||
const url = IMAGE_URL + bust
|
||||
this.setState({
|
||||
url,
|
||||
show: false,
|
||||
})
|
||||
}
|
||||
|
||||
preload = () => {
|
||||
FastImage.preload([{ uri: this.state.url }])
|
||||
}
|
||||
|
||||
showImage = () => {
|
||||
this.setState({ show: true })
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• Preloading." />
|
||||
<FeatureText text="• Progress indication using react-native-image-progress." />
|
||||
</Section>
|
||||
<SectionFlex style={styles.section} onPress={this.props.onPressReload}>
|
||||
{this.state.show ? (
|
||||
<Image style={styles.image} source={{ uri: this.state.url }} />
|
||||
) : (
|
||||
<View style={styles.image} />
|
||||
)}
|
||||
<View style={{ flexDirection: 'row', marginHorizontal: 10 }}>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Button text="Bust" onPress={this.bustCache} />
|
||||
</View>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Button text="Preload" onPress={this.preload} />
|
||||
</View>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Button text="Render" onPress={this.showImage} />
|
||||
</View>
|
||||
</View>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
section: {
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
},
|
||||
image: {
|
||||
backgroundColor: '#ddd',
|
||||
margin: 10,
|
||||
height: 100,
|
||||
width: 100,
|
||||
},
|
||||
})
|
||||
|
||||
export default PreloadExample
|
||||
@@ -1,59 +0,0 @@
|
||||
import React from 'react'
|
||||
import { PixelRatio, StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const getImageUrl = (id, width, height) =>
|
||||
`https://source.unsplash.com/${id}/${width}x${height}`
|
||||
const IMAGE_SIZE = 1024
|
||||
const IMAGE_SIZE_PX = PixelRatio.getPixelSizeForLayoutSize(IMAGE_SIZE)
|
||||
const IMAGE_URLS = [
|
||||
getImageUrl('x58soEovG_M', IMAGE_SIZE_PX, IMAGE_SIZE_PX),
|
||||
getImageUrl('yPI7myL5eWY', IMAGE_SIZE_PX, IMAGE_SIZE_PX),
|
||||
getImageUrl('S7VCcp6KCKE', IMAGE_SIZE, IMAGE_SIZE),
|
||||
]
|
||||
|
||||
const PriorityExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• Prioritize images (low, normal, high)." />
|
||||
</Section>
|
||||
<SectionFlex onPress={onPressReload}>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URLS[0] + bust,
|
||||
priority: FastImage.priority.low,
|
||||
}}
|
||||
/>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URLS[1] + bust,
|
||||
priority: FastImage.priority.normal,
|
||||
}}
|
||||
/>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URLS[2] + bust,
|
||||
priority: FastImage.priority.high,
|
||||
}}
|
||||
/>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
image: {
|
||||
flex: 1,
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 10,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(PriorityExample)
|
||||
@@ -1,49 +0,0 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const IMAGE_URL = 'https://media.giphy.com/media/GEsoqZDGVoisw/giphy.gif'
|
||||
|
||||
const getTestProgressCallbacks = label => ({
|
||||
onLoadStart: () => console.log(`${label} - onLoadStart`),
|
||||
onProgress: e =>
|
||||
console.log(
|
||||
`${label} - onProgress - ${e.nativeEvent.loaded / e.nativeEvent.total}`,
|
||||
),
|
||||
onLoad: e => console.log(`${label} - onLoad`, e.nativeEvent),
|
||||
onError: () => console.log(`${label} - onError`),
|
||||
onLoadEnd: () => console.log(`${label} - onLoadEnd`),
|
||||
})
|
||||
|
||||
const ProgressExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• Progress callbacks." />
|
||||
</Section>
|
||||
<SectionFlex onPress={onPressReload}>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URL + bust,
|
||||
}}
|
||||
{...getTestProgressCallbacks('ProgressExample')}
|
||||
/>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
image: {
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
width: 100,
|
||||
flex: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(ProgressExample)
|
||||
@@ -1,13 +0,0 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
|
||||
export default ({ children }) => <View style={styles.section}>{children}</View>
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
section: {
|
||||
marginTop: 10,
|
||||
marginBottom: 10,
|
||||
marginLeft: 40,
|
||||
marginRight: 40,
|
||||
},
|
||||
})
|
||||
@@ -1,20 +0,0 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, TouchableOpacity } from 'react-native'
|
||||
|
||||
export default ({ children, onPress, style }) => (
|
||||
<TouchableOpacity style={[styles.sectionFlex, style]} onPress={onPress}>
|
||||
{children}
|
||||
</TouchableOpacity>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
sectionFlex: {
|
||||
backgroundColor: '#eee',
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'center',
|
||||
marginTop: 10,
|
||||
marginBottom: 10,
|
||||
marginLeft: -10,
|
||||
marginRight: -10,
|
||||
},
|
||||
})
|
||||
@@ -1,18 +0,0 @@
|
||||
import React from 'react'
|
||||
import { Platform, StatusBar, StyleSheet, View } from 'react-native'
|
||||
|
||||
export const STATUS_BAR_HEIGHT =
|
||||
Platform.OS === 'ios' ? 20 : StatusBar.currentHeight
|
||||
|
||||
export default () => <View style={styles.statusBarUnderlay} />
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
statusBarUnderlay: {
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
height: STATUS_BAR_HEIGHT,
|
||||
backgroundColor: 'white',
|
||||
},
|
||||
})
|
||||
@@ -1,28 +0,0 @@
|
||||
import React, { Component } from 'react'
|
||||
import uuid from 'uuid/v4'
|
||||
|
||||
export default BaseComponent => {
|
||||
class WithCacheBust extends Component {
|
||||
state = { bust: '?bust' }
|
||||
|
||||
onPressReload = () => {
|
||||
// Force complete re-render and bust image cache.
|
||||
const key = uuid()
|
||||
const bust = `?bust=${key}`
|
||||
this.setState({ bust })
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<BaseComponent
|
||||
bust={this.state.bust}
|
||||
onPressReload={this.onPressReload}
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
WithCacheBust.displayName = `withCacheBust${BaseComponent.displayName}`
|
||||
|
||||
return WithCacheBust
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import 'react-native';
|
||||
import React from 'react';
|
||||
import App from '../App';
|
||||
|
||||
// Note: test renderer must be required after react-native.
|
||||
import renderer from 'react-test-renderer';
|
||||
|
||||
it('renders correctly', () => {
|
||||
const tree = renderer.create(
|
||||
<App />
|
||||
);
|
||||
});
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppRegistry } from 'react-native'
|
||||
import App from './FastImage/App'
|
||||
import App from './src/App'
|
||||
|
||||
AppRegistry.registerComponent('ReactNativeFastImageCocoaPodsExample', () => App)
|
||||
|
||||
@@ -12,6 +12,7 @@ target 'ReactNativeFastImageCocoaPodsExample' do
|
||||
]
|
||||
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
|
||||
|
||||
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
|
||||
pod 'react-native-vector-icons', :path => '../node_modules/react-native-vector-icons'
|
||||
pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
|
||||
pod 'react-native-fast-image', :path => '../node_modules/react-native-fast-image'
|
||||
end
|
||||
@@ -3,13 +3,14 @@
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "node node_modules/react-native/local-cli/cli.js start",
|
||||
"start": "react-native start",
|
||||
"postinstall": "cp -r ./../react-native-fast-image-example/src ./src",
|
||||
"test": "jest"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "16.3.1",
|
||||
"react-native": "0.55.3",
|
||||
"react-native-fast-image": "file:../react-native-fast-image-4.0.6.tgz",
|
||||
"react-native-fast-image": "../",
|
||||
"react-native-image-progress": "^1.1.0",
|
||||
"react-native-vector-icons": "^4.5.0",
|
||||
"react-navigation": "^1.5.7",
|
||||
|
||||
@@ -4401,11 +4401,8 @@ react-native-drawer-layout@1.3.2:
|
||||
dependencies:
|
||||
react-native-dismiss-keyboard "1.0.0"
|
||||
|
||||
"react-native-fast-image@file:../react-native-fast-image-4.0.6.tgz":
|
||||
version "4.0.6"
|
||||
resolved "file:../react-native-fast-image-4.0.6.tgz#0233377da75b1ec16a5506afa56ae7114e201a8d"
|
||||
dependencies:
|
||||
prop-types "^15.5.10"
|
||||
react-native-fast-image@../:
|
||||
version "4.0.14"
|
||||
|
||||
react-native-image-progress@^1.1.0:
|
||||
version "1.1.0"
|
||||
|
||||
|
Before Width: | Height: | Size: 131 B After Width: | Height: | Size: 1007 KiB |
|
After Width: | Height: | Size: 573 KiB |
|
Before Width: | Height: | Size: 131 B After Width: | Height: | Size: 804 KiB |
@@ -1,12 +0,0 @@
|
||||
import 'react-native';
|
||||
import React from 'react';
|
||||
import App from '../App';
|
||||
|
||||
// Note: test renderer must be required after react-native.
|
||||
import renderer from 'react-test-renderer';
|
||||
|
||||
it('renders correctly', () => {
|
||||
const tree = renderer.create(
|
||||
<App />
|
||||
);
|
||||
});
|
||||
@@ -138,6 +138,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':react-native-image-picker')
|
||||
compile project(':react-native-vector-icons')
|
||||
compile project(':react-native-fast-image')
|
||||
compile fileTree(dir: "libs", include: ["*.jar"])
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
|
||||
<application
|
||||
android:name=".MainApplication"
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.reactnativefastimageexample;
|
||||
import android.app.Application;
|
||||
|
||||
import com.facebook.react.ReactApplication;
|
||||
import com.imagepicker.ImagePickerPackage;
|
||||
import com.oblador.vectoricons.VectorIconsPackage;
|
||||
import com.dylanvann.fastimage.FastImageViewPackage;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
@@ -24,7 +25,8 @@ public class MainApplication extends Application implements ReactApplication {
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
return Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage()
|
||||
new MainReactPackage(),
|
||||
new ImagePickerPackage()
|
||||
,new VectorIconsPackage()
|
||||
,new FastImageViewPackage()
|
||||
);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
rootProject.name = 'ReactNativeFastImageExample'
|
||||
include ':react-native-image-picker'
|
||||
project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android')
|
||||
include ':react-native-vector-icons'
|
||||
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
|
||||
include ':react-native-fast-image'
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
BF76C32406E64C11A8F88839 /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = CF84827B3E0B4473A6D98CD8 /* SimpleLineIcons.ttf */; };
|
||||
C53FB5F6EDC64639864B6A9E /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 64308C10C3D142E9886F32AE /* Ionicons.ttf */; };
|
||||
C830F93AFD0E44828407049D /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4BD56E1000C54038A7679FB3 /* MaterialIcons.ttf */; };
|
||||
DFFF87C3B8944A58BE72259E /* libRNImagePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BA76F16877B4B9CB4600837 /* libRNImagePicker.a */; };
|
||||
E144163E63A541BBBC1C9757 /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 89F70D91F3214C9188DA080B /* Zocial.ttf */; };
|
||||
F3FE2490DB454991A0CF4A5E /* libFastImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CEBD220F74E4232B60A8532 /* libFastImage.a */; };
|
||||
/* End PBXBuildFile section */
|
||||
@@ -341,6 +342,13 @@
|
||||
remoteGlobalIDString = 5DBEB1501B18CEA900B34395;
|
||||
remoteInfo = RNVectorIcons;
|
||||
};
|
||||
FCE6569020C4B330009D6B6C /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 296C191FEA414536A79832E9 /* RNImagePicker.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 014A3B5C1C6CF33500B6D375;
|
||||
remoteInfo = RNImagePicker;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@@ -363,11 +371,13 @@
|
||||
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ReactNativeFastImageExample/Info.plist; sourceTree = "<group>"; };
|
||||
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ReactNativeFastImageExample/main.m; sourceTree = "<group>"; };
|
||||
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
|
||||
296C191FEA414536A79832E9 /* RNImagePicker.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNImagePicker.xcodeproj; path = "../node_modules/react-native-image-picker/ios/RNImagePicker.xcodeproj"; sourceTree = "<group>"; };
|
||||
2CEBD220F74E4232B60A8532 /* libFastImage.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libFastImage.a; sourceTree = "<group>"; };
|
||||
2D02E47B1E0B4A5D006451C7 /* ReactNativeFastImageExample-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ReactNativeFastImageExample-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2D02E4901E0B4A5D006451C7 /* ReactNativeFastImageExample-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ReactNativeFastImageExample-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2F1D89E957BE4DC3B5F12D3F /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = "<group>"; };
|
||||
3BA76F16877B4B9CB4600837 /* libRNImagePicker.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNImagePicker.a; sourceTree = "<group>"; };
|
||||
47121FF188B74280ADF44814 /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = "<group>"; };
|
||||
4BD56E1000C54038A7679FB3 /* MaterialIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf"; sourceTree = "<group>"; };
|
||||
5B07421EB1E941269F1CFF5D /* RNVectorIcons.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNVectorIcons.xcodeproj; path = "../node_modules/react-native-vector-icons/RNVectorIcons.xcodeproj"; sourceTree = "<group>"; };
|
||||
@@ -415,6 +425,7 @@
|
||||
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
|
||||
F3FE2490DB454991A0CF4A5E /* libFastImage.a in Frameworks */,
|
||||
55A6D0D7E5A14DA7A816EEAD /* libRNVectorIcons.a in Frameworks */,
|
||||
DFFF87C3B8944A58BE72259E /* libRNImagePicker.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -621,6 +632,7 @@
|
||||
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
|
||||
633E06912F184278A517D8FA /* FastImage.xcodeproj */,
|
||||
5B07421EB1E941269F1CFF5D /* RNVectorIcons.xcodeproj */,
|
||||
296C191FEA414536A79832E9 /* RNImagePicker.xcodeproj */,
|
||||
);
|
||||
name = Libraries;
|
||||
sourceTree = "<group>";
|
||||
@@ -675,6 +687,7 @@
|
||||
children = (
|
||||
2CEBD220F74E4232B60A8532 /* libFastImage.a */,
|
||||
D66D90A1527B4858B6B45720 /* libRNVectorIcons.a */,
|
||||
3BA76F16877B4B9CB4600837 /* libRNImagePicker.a */,
|
||||
);
|
||||
name = "Recovered References";
|
||||
sourceTree = "<group>";
|
||||
@@ -695,6 +708,14 @@
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FCE6568D20C4B330009D6B6C /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FCE6569120C4B330009D6B6C /* libRNImagePicker.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -864,6 +885,10 @@
|
||||
ProductGroup = 146834001AC3E56700842450 /* Products */;
|
||||
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = FCE6568D20C4B330009D6B6C /* Products */;
|
||||
ProjectRef = 296C191FEA414536A79832E9 /* RNImagePicker.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = FCC7D89B205E0E300018E4B4 /* Products */;
|
||||
ProjectRef = 5B07421EB1E941269F1CFF5D /* RNVectorIcons.xcodeproj */;
|
||||
@@ -1153,6 +1178,13 @@
|
||||
remoteRef = FCC7D8A1205E0E300018E4B4 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
FCE6569120C4B330009D6B6C /* libRNImagePicker.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libRNImagePicker.a;
|
||||
remoteRef = FCE6569020C4B330009D6B6C /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
@@ -1307,6 +1339,7 @@
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../../ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = ReactNativeFastImageExampleTests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
@@ -1315,6 +1348,7 @@
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
@@ -1335,6 +1369,7 @@
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../../ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = ReactNativeFastImageExampleTests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
@@ -1343,6 +1378,7 @@
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
@@ -1364,6 +1400,7 @@
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../../ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = ReactNativeFastImageExample/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
@@ -1388,6 +1425,7 @@
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../../ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = ReactNativeFastImageExample/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
@@ -1419,6 +1457,7 @@
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../../ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = "ReactNativeFastImageExample-tvOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
@@ -1426,6 +1465,7 @@
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
@@ -1456,6 +1496,7 @@
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../../ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = "ReactNativeFastImageExample-tvOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
@@ -1463,6 +1504,7 @@
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
@@ -1488,8 +1530,16 @@
|
||||
DEVELOPMENT_TEAM = U8E2VB5JLQ;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = "ReactNativeFastImageExample-tvOSTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"-lc++",
|
||||
@@ -1514,8 +1564,16 @@
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = U8E2VB5JLQ;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
|
||||
);
|
||||
INFOPLIST_FILE = "ReactNativeFastImageExample-tvOSTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"-lc++",
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
</dict>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>We gotta see them pics.</string>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>Entypo.ttf</string>
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
const path = require('path')
|
||||
const blacklist = require('metro/src/blacklist')
|
||||
const path = require('path');
|
||||
const blacklist = require('metro/src/blacklist');
|
||||
|
||||
module.exports = {
|
||||
extraNodeModules: {},
|
||||
getBlacklistRE: () =>
|
||||
blacklist([
|
||||
/[/\\]Users[/\\]dylan[/\\]repos[/\\]react-native-fast-image[/\\]node_modules[/\\]react-native[/\\].*/,
|
||||
]),
|
||||
extraNodeModules: {
|
||||
'prop-types': path.resolve(__dirname, 'node_modules/prop-types'),
|
||||
'react': path.resolve(__dirname, 'node_modules/react'),
|
||||
'react-native': path.resolve(__dirname, 'node_modules/react-native')
|
||||
},
|
||||
getBlacklistRE: () => blacklist([
|
||||
/[/\\]Users[/\\]dylan[/\\]repos[/\\]react-native-fast-image[/\\]node_modules[/\\]react-native[/\\].*/
|
||||
]),
|
||||
getProjectRoots: () => [
|
||||
// Include current package as project root
|
||||
path.resolve(__dirname),
|
||||
// Include symlinked packages as project roots
|
||||
path.resolve('/Users/dylan/repos/react-native-fast-image'),
|
||||
path.resolve('/Users/dylan/repos/react-native-fast-image')
|
||||
],
|
||||
}
|
||||
};
|
||||
@@ -10,10 +10,11 @@
|
||||
"react": "16.3.1",
|
||||
"react-native": "0.55.3",
|
||||
"react-native-fast-image": "../",
|
||||
"react-native-image-progress": "^1.1.0",
|
||||
"react-native-image-picker": "^0.26.10",
|
||||
"react-native-image-progress": "^1.1.1",
|
||||
"react-native-status-bar-height": "^2.0.0",
|
||||
"react-native-vector-icons": "^4.5.0",
|
||||
"react-navigation": "^1.5.11",
|
||||
"react-native-vector-icons": "^4.6.0",
|
||||
"react-navigation": "^2.2.5",
|
||||
"react-timeout": "^1.1.1",
|
||||
"uuid": "3.0.1"
|
||||
},
|
||||
|
||||
@@ -1,32 +1,25 @@
|
||||
import React from 'react'
|
||||
import { TabNavigator, TabBarBottom } from 'react-navigation'
|
||||
import { YellowBox } from 'react-native'
|
||||
import { createBottomTabNavigator } from 'react-navigation'
|
||||
import FastImageExamples from './FastImageExamples'
|
||||
import FastImageGrid from './FastImageGrid'
|
||||
import DefaultImageGrid from './DefaultImageGrid'
|
||||
|
||||
const App = TabNavigator(
|
||||
{
|
||||
fastImageExample: {
|
||||
screen: FastImageExamples,
|
||||
},
|
||||
image: {
|
||||
screen: DefaultImageGrid,
|
||||
},
|
||||
fastImage: {
|
||||
screen: FastImageGrid,
|
||||
},
|
||||
YellowBox.ignoreWarnings([
|
||||
'Warning: isMounted(...) is deprecated',
|
||||
'Module RCTImageLoader',
|
||||
])
|
||||
|
||||
const App = createBottomTabNavigator({
|
||||
fastImageExample: {
|
||||
screen: FastImageExamples,
|
||||
},
|
||||
{
|
||||
tabBarComponent: TabBarBottom,
|
||||
tabBarPosition: 'bottom',
|
||||
swipeEnabled: false,
|
||||
animationEnabled: false,
|
||||
tabBarOptions: {
|
||||
style: {
|
||||
backgroundColor: 'white',
|
||||
},
|
||||
},
|
||||
image: {
|
||||
screen: DefaultImageGrid,
|
||||
},
|
||||
)
|
||||
fastImage: {
|
||||
screen: FastImageGrid,
|
||||
},
|
||||
})
|
||||
|
||||
export default App
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import React from 'react'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
const BulletText = ({ text, children }) => (
|
||||
<FeatureText text={`• ${text || children} •`} />
|
||||
)
|
||||
|
||||
export default BulletText
|
||||
@@ -9,6 +9,7 @@ import FeatureText from './FeatureText'
|
||||
import ProgressExample from './ProgressExample'
|
||||
import PreloadExample from './PreloadExample'
|
||||
import ResizeModeExample from './ResizeModeExample'
|
||||
import LocalImagesExample from './LocalImagesExample'
|
||||
import StatusBarUnderlay, { STATUS_BAR_HEIGHT } from './StatusBarUnderlay'
|
||||
|
||||
const FastImageExample = () => (
|
||||
@@ -33,6 +34,7 @@ const FastImageExample = () => (
|
||||
<ProgressExample />
|
||||
<PreloadExample />
|
||||
<ResizeModeExample />
|
||||
<LocalImagesExample />
|
||||
</View>
|
||||
</ScrollView>
|
||||
<StatusBarUnderlay />
|
||||
@@ -58,7 +60,6 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
contentContainer: {
|
||||
marginTop: 20,
|
||||
marginBottom: 20,
|
||||
},
|
||||
image: {
|
||||
flex: 1,
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, Text } from 'react-native'
|
||||
|
||||
export default ({ text }) => <Text style={styles.style}>{text}</Text>
|
||||
export default ({ text, style, children }) => (
|
||||
<Text style={[styles.style, style]}>{text || children}</Text>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
style: {
|
||||
|
||||
@@ -14,4 +14,4 @@ Icon.defaultProps = {
|
||||
size: 26,
|
||||
}
|
||||
|
||||
export default Icon
|
||||
export default Icon
|
||||
|
||||
@@ -95,7 +95,7 @@ const styles = StyleSheet.create({
|
||||
backgroundColor: '#fff',
|
||||
alignItems: 'stretch',
|
||||
justifyContent: 'center',
|
||||
backgroundColor: 'blue',
|
||||
backgroundColor: 'white',
|
||||
},
|
||||
text: {
|
||||
textAlign: 'center',
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
import React, { Component } from 'react'
|
||||
import { StyleSheet, View, Text, TouchableOpacity } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
import FieldsImage from './images/fields.jpg'
|
||||
import FieldsBase64 from './images/fields.js'
|
||||
import JellyfishImage from './images/jellyfish.gif'
|
||||
import ImagePicker from 'react-native-image-picker'
|
||||
import BulletText from './BulletText'
|
||||
|
||||
var options = {
|
||||
title: 'Select Avatar',
|
||||
customButtons: [{ name: 'fb', title: 'Choose Photo from Facebook' }],
|
||||
storageOptions: {
|
||||
skipBackup: true,
|
||||
path: 'images',
|
||||
},
|
||||
}
|
||||
|
||||
const Image = ({ source, ...p }) => (
|
||||
<FastImage style={styles.imageSquare} source={source} {...p} />
|
||||
)
|
||||
|
||||
const Row = p => <View style={styles.row} {...p} />
|
||||
|
||||
class PhotoExample extends Component {
|
||||
state = {}
|
||||
|
||||
pick = () => {
|
||||
ImagePicker.showImagePicker(options, response => {
|
||||
console.log('Response = ', response)
|
||||
if (response.didCancel) {
|
||||
console.log('User cancelled image picker')
|
||||
} else if (response.error) {
|
||||
console.log('ImagePicker Error: ', response.error)
|
||||
} else if (response.customButton) {
|
||||
console.log(
|
||||
'User tapped custom button: ',
|
||||
response.customButton,
|
||||
)
|
||||
} else {
|
||||
const fileUri = `file://${response.path}`
|
||||
const uri = response.uri
|
||||
this.setState({
|
||||
image: { uri: uri },
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Row>
|
||||
<BulletText>photo library</BulletText>
|
||||
<TouchableOpacity onPress={this.pick}>
|
||||
<Image style={styles.imageSquare} source={this.state.image}>
|
||||
<Text style={{ color: 'white', fontWeight: '900' }}>
|
||||
Pick Photo
|
||||
</Text>
|
||||
</Image>
|
||||
</TouchableOpacity>
|
||||
</Row>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const Require = () => (
|
||||
<React.Fragment>
|
||||
<BulletText>require</BulletText>
|
||||
<Image source={require('./images/fields.jpg')} />
|
||||
</React.Fragment>
|
||||
)
|
||||
|
||||
const Import = () => (
|
||||
<React.Fragment>
|
||||
<BulletText>import</BulletText>
|
||||
<Image source={FieldsImage} />
|
||||
</React.Fragment>
|
||||
)
|
||||
|
||||
const GIF = () => (
|
||||
<React.Fragment>
|
||||
<BulletText>gif</BulletText>
|
||||
<Image source={JellyfishImage} />
|
||||
</React.Fragment>
|
||||
)
|
||||
|
||||
const Base64 = () => (
|
||||
<React.Fragment>
|
||||
<BulletText>base64</BulletText>
|
||||
<Image source={{ uri: FieldsBase64 }} />
|
||||
</React.Fragment>
|
||||
)
|
||||
|
||||
const LocalImagesExample = ({ onPressReload, bust }) => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText>• Local images.</FeatureText>
|
||||
</Section>
|
||||
<View style={styles.container}>
|
||||
<Row>
|
||||
<Require />
|
||||
</Row>
|
||||
<Row>
|
||||
<Import />
|
||||
</Row>
|
||||
<Row>
|
||||
<GIF />
|
||||
</Row>
|
||||
<Row>
|
||||
<Base64 />
|
||||
</Row>
|
||||
<PhotoExample />
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
row: {
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
marginBottom: 20,
|
||||
},
|
||||
container: {
|
||||
backgroundColor: '#eee',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
paddingTop: 10,
|
||||
paddingBottom: 10,
|
||||
},
|
||||
imageSquare: {
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
marginTop: 10,
|
||||
width: 100,
|
||||
flex: 0,
|
||||
},
|
||||
plus: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
position: 'absolute',
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(LocalImagesExample)
|
||||
@@ -1,53 +1,53 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View, Text } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
import BulletText from './BulletText'
|
||||
|
||||
const IMAGE_URL = 'https://media.giphy.com/media/GEsoqZDGVoisw/giphy.gif'
|
||||
|
||||
const Label = ({ children }) => <Text style={styles.text}>{children}</Text>
|
||||
const Col = p => <View style={styles.col} {...p} />
|
||||
|
||||
const BorderRadiusExample = ({ onPressReload, bust }) => (
|
||||
const ResizeModeExample = () => (
|
||||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• resizeMode." />
|
||||
</Section>
|
||||
<SectionFlex onPress={onPressReload}>
|
||||
<View>
|
||||
<SectionFlex style={styles.container}>
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.contain}
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<Label>contain</Label>
|
||||
</View>
|
||||
<View>
|
||||
<BulletText>contain</BulletText>
|
||||
</Col>
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.center}
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<Label>center</Label>
|
||||
</View>
|
||||
<View>
|
||||
<BulletText>center</BulletText>
|
||||
</Col>
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.stretch}
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<Label>stretch</Label>
|
||||
</View>
|
||||
<View>
|
||||
<BulletText>stretch</BulletText>
|
||||
</Col>
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.cover}
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<Label>cover</Label>
|
||||
</View>
|
||||
<BulletText>cover</BulletText>
|
||||
</Col>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
||||
@@ -58,13 +58,16 @@ const styles = StyleSheet.create({
|
||||
width: 50,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
marginTop: 0,
|
||||
marginBottom: 10,
|
||||
flex: 0,
|
||||
},
|
||||
text: {
|
||||
textAlign: 'center',
|
||||
marginBottom: 20,
|
||||
container: {
|
||||
padding: 20,
|
||||
},
|
||||
col: {
|
||||
alignItems: 'center',
|
||||
},
|
||||
})
|
||||
|
||||
export default withCacheBust(BorderRadiusExample)
|
||||
export default ResizeModeExample
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, TouchableOpacity } from 'react-native'
|
||||
import { StyleSheet, TouchableOpacity, View } from 'react-native'
|
||||
|
||||
export default ({ children, onPress, style }) => (
|
||||
<TouchableOpacity style={[styles.sectionFlex, style]} onPress={onPress}>
|
||||
{children}
|
||||
</TouchableOpacity>
|
||||
)
|
||||
export default ({ children, onPress, style }) =>
|
||||
onPress ? (
|
||||
<TouchableOpacity style={[styles.sectionFlex, style]} onPress={onPress}>
|
||||
{children}
|
||||
</TouchableOpacity>
|
||||
) : (
|
||||
<View style={[styles.sectionFlex, style]}>{children}</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
sectionFlex: {
|
||||
backgroundColor: '#eee',
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'center',
|
||||
marginTop: 10,
|
||||
marginBottom: 10,
|
||||
marginLeft: -10,
|
||||
marginRight: -10,
|
||||
},
|
||||
|
||||
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 104 KiB |
@@ -1766,6 +1766,13 @@ create-react-class@^15.5.2, create-react-class@^15.6.3:
|
||||
loose-envify "^1.3.1"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
create-react-context@^0.2.1:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca"
|
||||
dependencies:
|
||||
fbjs "^0.8.0"
|
||||
gud "^1.0.0"
|
||||
|
||||
cross-spawn@^5.0.1, cross-spawn@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
|
||||
@@ -2206,7 +2213,7 @@ fbjs-scripts@^0.8.1:
|
||||
semver "^5.1.0"
|
||||
through2 "^2.0.0"
|
||||
|
||||
fbjs@^0.8.14, fbjs@^0.8.16, fbjs@^0.8.9:
|
||||
fbjs@^0.8.0, fbjs@^0.8.14, fbjs@^0.8.16, fbjs@^0.8.9:
|
||||
version "0.8.16"
|
||||
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db"
|
||||
dependencies:
|
||||
@@ -2465,6 +2472,10 @@ growly@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
|
||||
|
||||
gud@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0"
|
||||
|
||||
gulp-util@^3.0.4:
|
||||
version "3.0.8"
|
||||
resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
|
||||
@@ -2613,6 +2624,10 @@ hoist-non-react-statics@^2.2.0, hoist-non-react-statics@^2.3.1:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.0.tgz#d2ca2dfc19c5a91c5a6615ce8e564ef0347e2a40"
|
||||
|
||||
hoist-non-react-statics@^2.5.0:
|
||||
version "2.5.1"
|
||||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.1.tgz#fcf9a5aff62c083aa135deb81c824b3137f00f5f"
|
||||
|
||||
home-or-tmp@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
|
||||
@@ -4328,7 +4343,7 @@ promise@^7.1.1:
|
||||
dependencies:
|
||||
asap "~2.0.3"
|
||||
|
||||
prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0:
|
||||
prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1:
|
||||
version "15.6.1"
|
||||
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca"
|
||||
dependencies:
|
||||
@@ -4391,9 +4406,9 @@ react-devtools-core@3.1.0:
|
||||
shell-quote "^1.6.1"
|
||||
ws "^2.0.3"
|
||||
|
||||
react-lifecycles-compat@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-1.0.2.tgz#551d8b1d156346e5fcf30ffac9b32ce3f78b8850"
|
||||
react-lifecycles-compat@^3, react-lifecycles-compat@^3.0.4:
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
|
||||
|
||||
react-native-dismiss-keyboard@1.0.0:
|
||||
version "1.0.0"
|
||||
@@ -4412,13 +4427,15 @@ react-native-drawer-layout@1.3.2:
|
||||
react-native-dismiss-keyboard "1.0.0"
|
||||
|
||||
react-native-fast-image@../:
|
||||
version "4.0.12"
|
||||
dependencies:
|
||||
prop-types "^15.5.10"
|
||||
version "4.0.14"
|
||||
|
||||
react-native-image-progress@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-image-progress/-/react-native-image-progress-1.1.0.tgz#737140d699fb3fb107ec70615736dfdc2eef7b35"
|
||||
react-native-image-picker@^0.26.10:
|
||||
version "0.26.10"
|
||||
resolved "https://registry.yarnpkg.com/react-native-image-picker/-/react-native-image-picker-0.26.10.tgz#0bb9ab928984948c67aee0b9e64216bee007a9fc"
|
||||
|
||||
react-native-image-progress@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native-image-progress/-/react-native-image-progress-1.1.1.tgz#95bbe0875c7ebd54286df69cb37b598b94c54eb0"
|
||||
dependencies:
|
||||
prop-types "^15.5.10"
|
||||
|
||||
@@ -4432,21 +4449,33 @@ react-native-safe-area-view@^0.7.0:
|
||||
dependencies:
|
||||
hoist-non-react-statics "^2.3.1"
|
||||
|
||||
react-native-safe-area-view@^0.8.0:
|
||||
version "0.8.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.8.0.tgz#22d78cb8e8658d04a10cd53c1546e0bc86cb7aea"
|
||||
dependencies:
|
||||
hoist-non-react-statics "^2.3.1"
|
||||
|
||||
react-native-status-bar-height@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-status-bar-height/-/react-native-status-bar-height-2.0.0.tgz#9def59bdfa162da73134aff4f480ef2fc873ee0a"
|
||||
dependencies:
|
||||
react-native-iphone-x-helper "^1.0.1"
|
||||
|
||||
"react-native-tab-view@github:react-navigation/react-native-tab-view":
|
||||
version "0.0.74"
|
||||
resolved "https://codeload.github.com/react-navigation/react-native-tab-view/tar.gz/36ebd834d78b841fc19778c966465d02fd1213bb"
|
||||
react-native-tab-view@^0.0.77:
|
||||
version "0.0.77"
|
||||
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.77.tgz#11ceb8e7c23100d07e628dc151b57797524d00d4"
|
||||
dependencies:
|
||||
prop-types "^15.6.0"
|
||||
|
||||
react-native-vector-icons@^4.5.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-4.5.0.tgz#6b95619e64f62f05f579f74a01fe5640df95158b"
|
||||
react-native-tab-view@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.0.2.tgz#66e0bc6d38a227ed2b212e3a256b7902f6ce02ed"
|
||||
dependencies:
|
||||
prop-types "^15.6.1"
|
||||
|
||||
react-native-vector-icons@^4.6.0:
|
||||
version "4.6.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-4.6.0.tgz#e4014311ffa6de397d914ffc31b7097a874cc8d5"
|
||||
dependencies:
|
||||
lodash "^4.0.0"
|
||||
prop-types "^15.5.10"
|
||||
@@ -4516,18 +4545,42 @@ react-native@0.55.3:
|
||||
xmldoc "^0.4.0"
|
||||
yargs "^9.0.0"
|
||||
|
||||
react-navigation@^1.5.11:
|
||||
version "1.5.11"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-1.5.11.tgz#fba6ab45d7b9987c1763a5aaac53b4f6d62b7f5c"
|
||||
react-navigation-deprecated-tab-navigator@1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation-deprecated-tab-navigator/-/react-navigation-deprecated-tab-navigator-1.3.0.tgz#015dcae1e977b984ca7e99245261c15439026bb7"
|
||||
dependencies:
|
||||
react-native-tab-view "^0.0.77"
|
||||
|
||||
react-navigation-drawer@0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-0.2.1.tgz#fed9b09a41ddfdc1ff198fad04a7b6051def8adf"
|
||||
dependencies:
|
||||
react-native-drawer-layout-polyfill "^1.3.2"
|
||||
|
||||
react-navigation-tabs@0.5.1:
|
||||
version "0.5.1"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.5.1.tgz#ed33bce3a3e21b92646700de25bd94b8fc570371"
|
||||
dependencies:
|
||||
hoist-non-react-statics "^2.5.0"
|
||||
prop-types "^15.6.1"
|
||||
react-lifecycles-compat "^3.0.4"
|
||||
react-native-safe-area-view "^0.7.0"
|
||||
react-native-tab-view "^1.0.0"
|
||||
|
||||
react-navigation@^2.2.5:
|
||||
version "2.2.5"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.2.5.tgz#5c23091d2a87b63fe8d6be350d155664677b903c"
|
||||
dependencies:
|
||||
clamp "^1.0.1"
|
||||
create-react-context "^0.2.1"
|
||||
hoist-non-react-statics "^2.2.0"
|
||||
path-to-regexp "^1.7.0"
|
||||
prop-types "^15.5.10"
|
||||
react-lifecycles-compat "^1.0.2"
|
||||
react-native-drawer-layout-polyfill "^1.3.2"
|
||||
react-native-safe-area-view "^0.7.0"
|
||||
react-native-tab-view "github:react-navigation/react-native-tab-view"
|
||||
react-lifecycles-compat "^3"
|
||||
react-native-safe-area-view "^0.8.0"
|
||||
react-navigation-deprecated-tab-navigator "1.3.0"
|
||||
react-navigation-drawer "0.2.1"
|
||||
react-navigation-tabs "0.5.1"
|
||||
|
||||
react-proxy@^1.1.7:
|
||||
version "1.1.8"
|
||||
|
||||
@@ -15,11 +15,6 @@ exports[`FastImage renders correctly. 1`] = `
|
||||
}
|
||||
>
|
||||
<FastImageView
|
||||
onFastImageError={undefined}
|
||||
onFastImageLoad={undefined}
|
||||
onFastImageLoadEnd={undefined}
|
||||
onFastImageLoadStart={undefined}
|
||||
onFastImageProgress={undefined}
|
||||
resizeMode="cover"
|
||||
source={
|
||||
Object {
|
||||
@@ -44,23 +39,35 @@ exports[`FastImage renders correctly. 1`] = `
|
||||
`;
|
||||
|
||||
exports[`Renders a normal Image when not passed a uri. 1`] = `
|
||||
<Image
|
||||
onError={undefined}
|
||||
onLoad={undefined}
|
||||
onLoadEnd={undefined}
|
||||
onLoadStart={undefined}
|
||||
onProgress={undefined}
|
||||
resizeMode="cover"
|
||||
source={
|
||||
Object {
|
||||
"testUri": "../../../react-native-fast-image-example-server/pictures/jellyfish.gif",
|
||||
}
|
||||
}
|
||||
<View
|
||||
style={
|
||||
Object {
|
||||
"height": 44,
|
||||
"width": 44,
|
||||
}
|
||||
Array [
|
||||
Object {
|
||||
"height": 44,
|
||||
"width": 44,
|
||||
},
|
||||
Object {
|
||||
"overflow": "hidden",
|
||||
},
|
||||
]
|
||||
}
|
||||
/>
|
||||
>
|
||||
<FastImageView
|
||||
resizeMode="cover"
|
||||
source={
|
||||
Object {
|
||||
"testUri": "../../../react-native-fast-image-example-server/pictures/jellyfish.gif",
|
||||
}
|
||||
}
|
||||
style={
|
||||
Object {
|
||||
"bottom": 0,
|
||||
"left": 0,
|
||||
"position": "absolute",
|
||||
"right": 0,
|
||||
"top": 0,
|
||||
}
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
`;
|
||||
|
||||
@@ -14,23 +14,6 @@ const resolveAssetSource = require('react-native/Libraries/Image/resolveAssetSou
|
||||
|
||||
const FastImageViewNativeModule = NativeModules.FastImageView
|
||||
|
||||
const useLocalImage = source => {
|
||||
// No source.
|
||||
if (!source) return true
|
||||
// No uri.
|
||||
if (!source.uri) return true
|
||||
// Is a local Android image.
|
||||
if (source.uri.startsWith('file://')) return true
|
||||
// Content URI.
|
||||
if (source.uri.startsWith('content://')) return true
|
||||
// Smart album.
|
||||
if (source.uri.startsWith('photos://')) return true
|
||||
// From asset library / camera roll.
|
||||
if (source.uri.startsWith('assets-library://')) return true
|
||||
// We have a remote source.
|
||||
return false
|
||||
}
|
||||
|
||||
class FastImage extends Component {
|
||||
setNativeProps(nativeProps) {
|
||||
this._root.setNativeProps(nativeProps)
|
||||
@@ -51,23 +34,6 @@ class FastImage extends Component {
|
||||
...props
|
||||
} = this.props
|
||||
|
||||
// If there's no source or source uri just fallback to Image.
|
||||
if (useLocalImage(source)) {
|
||||
return (
|
||||
<Image
|
||||
ref={this.captureRef}
|
||||
{...props}
|
||||
style={style}
|
||||
source={source}
|
||||
onLoadStart={onLoadStart}
|
||||
onProgress={onProgress}
|
||||
onLoad={onLoad}
|
||||
onError={onError}
|
||||
onLoadEnd={onLoadEnd}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
const resolvedSource = resolveAssetSource(source)
|
||||
|
||||
return (
|
||||
@@ -82,9 +48,7 @@ class FastImage extends Component {
|
||||
onFastImageError={onError}
|
||||
onFastImageLoadEnd={onLoadEnd}
|
||||
/>
|
||||
{children && (
|
||||
<View style={StyleSheet.absoluteFill}>{children}</View>
|
||||
)}
|
||||
{children}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -911,12 +911,12 @@ babel-helpers@^6.24.1:
|
||||
babel-runtime "^6.22.0"
|
||||
babel-template "^6.24.1"
|
||||
|
||||
babel-jest@^22.4.4:
|
||||
version "22.4.4"
|
||||
resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-22.4.4.tgz#977259240420e227444ebe49e226a61e49ea659d"
|
||||
babel-jest@^23.0.1:
|
||||
version "23.0.1"
|
||||
resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.0.1.tgz#bbad3bf523fb202da05ed0a6540b48c84eed13a6"
|
||||
dependencies:
|
||||
babel-plugin-istanbul "^4.1.5"
|
||||
babel-preset-jest "^22.4.4"
|
||||
babel-plugin-istanbul "^4.1.6"
|
||||
babel-preset-jest "^23.0.1"
|
||||
|
||||
babel-messages@^6.23.0:
|
||||
version "6.23.0"
|
||||
@@ -936,7 +936,7 @@ babel-plugin-external-helpers@^6.22.0:
|
||||
dependencies:
|
||||
babel-runtime "^6.22.0"
|
||||
|
||||
babel-plugin-istanbul@^4.1.5:
|
||||
babel-plugin-istanbul@^4.1.6:
|
||||
version "4.1.6"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45"
|
||||
dependencies:
|
||||
@@ -945,9 +945,9 @@ babel-plugin-istanbul@^4.1.5:
|
||||
istanbul-lib-instrument "^1.10.1"
|
||||
test-exclude "^4.2.1"
|
||||
|
||||
babel-plugin-jest-hoist@^22.4.4:
|
||||
version "22.4.4"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.4.4.tgz#b9851906eab34c7bf6f8c895a2b08bea1a844c0b"
|
||||
babel-plugin-jest-hoist@^23.0.1:
|
||||
version "23.0.1"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.0.1.tgz#eaa11c964563aea9c21becef2bdf7853f7f3c148"
|
||||
|
||||
babel-plugin-react-transform@^3.0.0:
|
||||
version "3.0.0"
|
||||
@@ -1265,11 +1265,11 @@ babel-preset-fbjs@^2.1.2, babel-preset-fbjs@^2.1.4:
|
||||
babel-plugin-transform-react-display-name "^6.8.0"
|
||||
babel-plugin-transform-react-jsx "^6.8.0"
|
||||
|
||||
babel-preset-jest@^22.4.4:
|
||||
version "22.4.4"
|
||||
resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-22.4.4.tgz#ec9fbd8bcd7dfd24b8b5320e0e688013235b7c39"
|
||||
babel-preset-jest@^23.0.1:
|
||||
version "23.0.1"
|
||||
resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.0.1.tgz#631cc545c6cf021943013bcaf22f45d87fe62198"
|
||||
dependencies:
|
||||
babel-plugin-jest-hoist "^22.4.4"
|
||||
babel-plugin-jest-hoist "^23.0.1"
|
||||
babel-plugin-syntax-object-rest-spread "^6.13.0"
|
||||
|
||||
babel-preset-react-native@^4.0.0:
|
||||
@@ -1845,7 +1845,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9:
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@^2.1.1, debug@^2.6.3:
|
||||
debug@^2.1.1:
|
||||
version "2.6.8"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc"
|
||||
dependencies:
|
||||
@@ -2137,16 +2137,16 @@ expand-range@^1.8.1:
|
||||
dependencies:
|
||||
fill-range "^2.1.0"
|
||||
|
||||
expect@^22.4.0:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/expect/-/expect-22.4.3.tgz#d5a29d0a0e1fb2153557caef2674d4547e914674"
|
||||
expect@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/expect/-/expect-23.1.0.tgz#bfdfd57a2a20170d875999ee9787cc71f01c205f"
|
||||
dependencies:
|
||||
ansi-styles "^3.2.0"
|
||||
jest-diff "^22.4.3"
|
||||
jest-get-type "^22.4.3"
|
||||
jest-matcher-utils "^22.4.3"
|
||||
jest-message-util "^22.4.3"
|
||||
jest-regex-util "^22.4.3"
|
||||
jest-diff "^23.0.1"
|
||||
jest-get-type "^22.1.0"
|
||||
jest-matcher-utils "^23.0.1"
|
||||
jest-message-util "^23.1.0"
|
||||
jest-regex-util "^23.0.0"
|
||||
|
||||
extend-shallow@^1.1.2:
|
||||
version "1.1.4"
|
||||
@@ -2943,7 +2943,7 @@ isstream@~0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
|
||||
|
||||
istanbul-api@^1.1.14:
|
||||
istanbul-api@^1.3.1:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.1.tgz#4c3b05d18c0016d1022e079b98dc82c40f488954"
|
||||
dependencies:
|
||||
@@ -2960,10 +2960,6 @@ istanbul-api@^1.1.14:
|
||||
mkdirp "^0.5.1"
|
||||
once "^1.4.0"
|
||||
|
||||
istanbul-lib-coverage@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da"
|
||||
|
||||
istanbul-lib-coverage@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341"
|
||||
@@ -2974,7 +2970,7 @@ istanbul-lib-hook@^1.2.0:
|
||||
dependencies:
|
||||
append-transform "^0.4.0"
|
||||
|
||||
istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.8.0:
|
||||
istanbul-lib-instrument@^1.10.1:
|
||||
version "1.10.1"
|
||||
resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b"
|
||||
dependencies:
|
||||
@@ -2995,16 +2991,6 @@ istanbul-lib-report@^1.1.4:
|
||||
path-parse "^1.0.5"
|
||||
supports-color "^3.1.2"
|
||||
|
||||
istanbul-lib-source-maps@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz#a6fe1acba8ce08eebc638e572e294d267008aa0c"
|
||||
dependencies:
|
||||
debug "^2.6.3"
|
||||
istanbul-lib-coverage "^1.1.1"
|
||||
mkdirp "^0.5.1"
|
||||
rimraf "^2.6.1"
|
||||
source-map "^0.5.3"
|
||||
|
||||
istanbul-lib-source-maps@^1.2.4:
|
||||
version "1.2.4"
|
||||
resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.4.tgz#cc7ccad61629f4efff8e2f78adb8c522c9976ec7"
|
||||
@@ -3021,15 +3007,15 @@ istanbul-reports@^1.3.0:
|
||||
dependencies:
|
||||
handlebars "^4.0.3"
|
||||
|
||||
jest-changed-files@^22.2.0:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.4.3.tgz#8882181e022c38bd46a2e4d18d44d19d90a90fb2"
|
||||
jest-changed-files@^23.0.1:
|
||||
version "23.0.1"
|
||||
resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.0.1.tgz#f79572d0720844ea5df84c2a448e862c2254f60c"
|
||||
dependencies:
|
||||
throat "^4.0.0"
|
||||
|
||||
jest-cli@^22.4.4:
|
||||
version "22.4.4"
|
||||
resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-22.4.4.tgz#68cd2a2aae983adb1e6638248ca21082fd6d9e90"
|
||||
jest-cli@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.1.0.tgz#eb8bdd4ce0d15250892e31ad9b69bc99d2a8f6bf"
|
||||
dependencies:
|
||||
ansi-escapes "^3.0.0"
|
||||
chalk "^2.0.1"
|
||||
@@ -3038,24 +3024,25 @@ jest-cli@^22.4.4:
|
||||
graceful-fs "^4.1.11"
|
||||
import-local "^1.0.0"
|
||||
is-ci "^1.0.10"
|
||||
istanbul-api "^1.1.14"
|
||||
istanbul-lib-coverage "^1.1.1"
|
||||
istanbul-lib-instrument "^1.8.0"
|
||||
istanbul-lib-source-maps "^1.2.1"
|
||||
jest-changed-files "^22.2.0"
|
||||
jest-config "^22.4.4"
|
||||
jest-environment-jsdom "^22.4.1"
|
||||
istanbul-api "^1.3.1"
|
||||
istanbul-lib-coverage "^1.2.0"
|
||||
istanbul-lib-instrument "^1.10.1"
|
||||
istanbul-lib-source-maps "^1.2.4"
|
||||
jest-changed-files "^23.0.1"
|
||||
jest-config "^23.1.0"
|
||||
jest-environment-jsdom "^23.1.0"
|
||||
jest-get-type "^22.1.0"
|
||||
jest-haste-map "^22.4.2"
|
||||
jest-message-util "^22.4.0"
|
||||
jest-regex-util "^22.1.0"
|
||||
jest-resolve-dependencies "^22.1.0"
|
||||
jest-runner "^22.4.4"
|
||||
jest-runtime "^22.4.4"
|
||||
jest-snapshot "^22.4.0"
|
||||
jest-util "^22.4.1"
|
||||
jest-validate "^22.4.4"
|
||||
jest-worker "^22.2.2"
|
||||
jest-haste-map "^23.1.0"
|
||||
jest-message-util "^23.1.0"
|
||||
jest-regex-util "^23.0.0"
|
||||
jest-resolve-dependencies "^23.0.1"
|
||||
jest-runner "^23.1.0"
|
||||
jest-runtime "^23.1.0"
|
||||
jest-snapshot "^23.0.1"
|
||||
jest-util "^23.1.0"
|
||||
jest-validate "^23.0.1"
|
||||
jest-watcher "^23.1.0"
|
||||
jest-worker "^23.0.1"
|
||||
micromatch "^2.3.11"
|
||||
node-notifier "^5.2.1"
|
||||
realpath-native "^1.0.0"
|
||||
@@ -3064,32 +3051,34 @@ jest-cli@^22.4.4:
|
||||
string-length "^2.0.0"
|
||||
strip-ansi "^4.0.0"
|
||||
which "^1.2.12"
|
||||
yargs "^10.0.3"
|
||||
yargs "^11.0.0"
|
||||
|
||||
jest-config@^22.4.4:
|
||||
version "22.4.4"
|
||||
resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.4.4.tgz#72a521188720597169cd8b4ff86934ef5752d86a"
|
||||
jest-config@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.1.0.tgz#708ca0f431d356ee424fb4895d3308006bdd8241"
|
||||
dependencies:
|
||||
babel-core "^6.0.0"
|
||||
babel-jest "^23.0.1"
|
||||
chalk "^2.0.1"
|
||||
glob "^7.1.1"
|
||||
jest-environment-jsdom "^22.4.1"
|
||||
jest-environment-node "^22.4.1"
|
||||
jest-environment-jsdom "^23.1.0"
|
||||
jest-environment-node "^23.1.0"
|
||||
jest-get-type "^22.1.0"
|
||||
jest-jasmine2 "^22.4.4"
|
||||
jest-regex-util "^22.1.0"
|
||||
jest-resolve "^22.4.2"
|
||||
jest-util "^22.4.1"
|
||||
jest-validate "^22.4.4"
|
||||
pretty-format "^22.4.0"
|
||||
jest-jasmine2 "^23.1.0"
|
||||
jest-regex-util "^23.0.0"
|
||||
jest-resolve "^23.1.0"
|
||||
jest-util "^23.1.0"
|
||||
jest-validate "^23.0.1"
|
||||
pretty-format "^23.0.1"
|
||||
|
||||
jest-diff@^22.4.0, jest-diff@^22.4.3:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.4.3.tgz#e18cc3feff0aeef159d02310f2686d4065378030"
|
||||
jest-diff@^23.0.1:
|
||||
version "23.0.1"
|
||||
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.0.1.tgz#3d49137cee12c320a4b4d2b4a6fa6e82d491a16a"
|
||||
dependencies:
|
||||
chalk "^2.0.1"
|
||||
diff "^3.2.0"
|
||||
jest-get-type "^22.4.3"
|
||||
pretty-format "^22.4.3"
|
||||
jest-get-type "^22.1.0"
|
||||
pretty-format "^23.0.1"
|
||||
|
||||
jest-docblock@22.4.0:
|
||||
version "22.4.0"
|
||||
@@ -3097,28 +3086,41 @@ jest-docblock@22.4.0:
|
||||
dependencies:
|
||||
detect-newline "^2.1.0"
|
||||
|
||||
jest-docblock@^22.4.0, jest-docblock@^22.4.3:
|
||||
jest-docblock@^22.4.0:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.4.3.tgz#50886f132b42b280c903c592373bb6e93bb68b19"
|
||||
dependencies:
|
||||
detect-newline "^2.1.0"
|
||||
|
||||
jest-environment-jsdom@^22.4.1:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.4.3.tgz#d67daa4155e33516aecdd35afd82d4abf0fa8a1e"
|
||||
jest-docblock@^23.0.1:
|
||||
version "23.0.1"
|
||||
resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.0.1.tgz#deddd18333be5dc2415260a04ef3fce9276b5725"
|
||||
dependencies:
|
||||
jest-mock "^22.4.3"
|
||||
jest-util "^22.4.3"
|
||||
detect-newline "^2.1.0"
|
||||
|
||||
jest-each@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.1.0.tgz#16146b592c354867a5ae5e13cdf15c6c65b696c6"
|
||||
dependencies:
|
||||
chalk "^2.0.1"
|
||||
pretty-format "^23.0.1"
|
||||
|
||||
jest-environment-jsdom@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.1.0.tgz#85929914e23bed3577dac9755f4106d0697c479c"
|
||||
dependencies:
|
||||
jest-mock "^23.1.0"
|
||||
jest-util "^23.1.0"
|
||||
jsdom "^11.5.1"
|
||||
|
||||
jest-environment-node@^22.4.1:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.4.3.tgz#54c4eaa374c83dd52a9da8759be14ebe1d0b9129"
|
||||
jest-environment-node@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.1.0.tgz#452c0bf949cfcbbacda1e1762eeed70bc784c7d5"
|
||||
dependencies:
|
||||
jest-mock "^22.4.3"
|
||||
jest-util "^22.4.3"
|
||||
jest-mock "^23.1.0"
|
||||
jest-util "^23.1.0"
|
||||
|
||||
jest-get-type@^22.1.0, jest-get-type@^22.4.3:
|
||||
jest-get-type@^22.1.0:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4"
|
||||
|
||||
@@ -3134,51 +3136,51 @@ jest-haste-map@22.4.2:
|
||||
micromatch "^2.3.11"
|
||||
sane "^2.0.0"
|
||||
|
||||
jest-haste-map@^22.4.2:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-22.4.3.tgz#25842fa2ba350200767ac27f658d58b9d5c2e20b"
|
||||
jest-haste-map@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.1.0.tgz#18e6c7d5a8d27136f91b7d9852f85de0c7074c49"
|
||||
dependencies:
|
||||
fb-watchman "^2.0.0"
|
||||
graceful-fs "^4.1.11"
|
||||
jest-docblock "^22.4.3"
|
||||
jest-serializer "^22.4.3"
|
||||
jest-worker "^22.4.3"
|
||||
jest-docblock "^23.0.1"
|
||||
jest-serializer "^23.0.1"
|
||||
jest-worker "^23.0.1"
|
||||
micromatch "^2.3.11"
|
||||
sane "^2.0.0"
|
||||
|
||||
jest-jasmine2@^22.4.4:
|
||||
version "22.4.4"
|
||||
resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.4.4.tgz#c55f92c961a141f693f869f5f081a79a10d24e23"
|
||||
jest-jasmine2@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.1.0.tgz#4afab31729b654ddcd2b074add849396f13b30b8"
|
||||
dependencies:
|
||||
chalk "^2.0.1"
|
||||
co "^4.6.0"
|
||||
expect "^22.4.0"
|
||||
graceful-fs "^4.1.11"
|
||||
expect "^23.1.0"
|
||||
is-generator-fn "^1.0.0"
|
||||
jest-diff "^22.4.0"
|
||||
jest-matcher-utils "^22.4.0"
|
||||
jest-message-util "^22.4.0"
|
||||
jest-snapshot "^22.4.0"
|
||||
jest-util "^22.4.1"
|
||||
source-map-support "^0.5.0"
|
||||
jest-diff "^23.0.1"
|
||||
jest-each "^23.1.0"
|
||||
jest-matcher-utils "^23.0.1"
|
||||
jest-message-util "^23.1.0"
|
||||
jest-snapshot "^23.0.1"
|
||||
jest-util "^23.1.0"
|
||||
pretty-format "^23.0.1"
|
||||
|
||||
jest-leak-detector@^22.4.0:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-22.4.3.tgz#2b7b263103afae8c52b6b91241a2de40117e5b35"
|
||||
jest-leak-detector@^23.0.1:
|
||||
version "23.0.1"
|
||||
resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.0.1.tgz#9dba07505ac3495c39d3ec09ac1e564599e861a0"
|
||||
dependencies:
|
||||
pretty-format "^22.4.3"
|
||||
pretty-format "^23.0.1"
|
||||
|
||||
jest-matcher-utils@^22.4.0, jest-matcher-utils@^22.4.3:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.4.3.tgz#4632fe428ebc73ebc194d3c7b65d37b161f710ff"
|
||||
jest-matcher-utils@^23.0.1:
|
||||
version "23.0.1"
|
||||
resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.0.1.tgz#0c6c0daedf9833c2a7f36236069efecb4c3f6e5f"
|
||||
dependencies:
|
||||
chalk "^2.0.1"
|
||||
jest-get-type "^22.4.3"
|
||||
pretty-format "^22.4.3"
|
||||
jest-get-type "^22.1.0"
|
||||
pretty-format "^23.0.1"
|
||||
|
||||
jest-message-util@^22.4.0, jest-message-util@^22.4.3:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.4.3.tgz#cf3d38aafe4befddbfc455e57d65d5239e399eb7"
|
||||
jest-message-util@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.1.0.tgz#9a809ba487ecac5ce511d4e698ee3b5ee2461ea9"
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.0.0-beta.35"
|
||||
chalk "^2.0.1"
|
||||
@@ -3186,104 +3188,121 @@ jest-message-util@^22.4.0, jest-message-util@^22.4.3:
|
||||
slash "^1.0.0"
|
||||
stack-utils "^1.0.1"
|
||||
|
||||
jest-mock@^22.4.3:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.4.3.tgz#f63ba2f07a1511772cdc7979733397df770aabc7"
|
||||
jest-mock@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.1.0.tgz#a381c31b121ab1f60c462a2dadb7b86dcccac487"
|
||||
|
||||
jest-regex-util@^22.1.0, jest-regex-util@^22.4.3:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.4.3.tgz#a826eb191cdf22502198c5401a1fc04de9cef5af"
|
||||
jest-regex-util@^23.0.0:
|
||||
version "23.0.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.0.0.tgz#dd5c1fde0c46f4371314cf10f7a751a23f4e8f76"
|
||||
|
||||
jest-resolve-dependencies@^22.1.0:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-22.4.3.tgz#e2256a5a846732dc3969cb72f3c9ad7725a8195e"
|
||||
jest-resolve-dependencies@^23.0.1:
|
||||
version "23.0.1"
|
||||
resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.0.1.tgz#d01a10ddad9152c4cecdf5eac2b88571c4b6a64d"
|
||||
dependencies:
|
||||
jest-regex-util "^22.4.3"
|
||||
jest-regex-util "^23.0.0"
|
||||
jest-snapshot "^23.0.1"
|
||||
|
||||
jest-resolve@^22.4.2:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.4.3.tgz#0ce9d438c8438229aa9b916968ec6b05c1abb4ea"
|
||||
jest-resolve@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.1.0.tgz#b9e316eecebd6f00bc50a3960d1527bae65792d2"
|
||||
dependencies:
|
||||
browser-resolve "^1.11.2"
|
||||
chalk "^2.0.1"
|
||||
realpath-native "^1.0.0"
|
||||
|
||||
jest-runner@^22.4.4:
|
||||
version "22.4.4"
|
||||
resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-22.4.4.tgz#dfca7b7553e0fa617e7b1291aeb7ce83e540a907"
|
||||
jest-runner@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.1.0.tgz#fa20a933fff731a5432b3561e7f6426594fa29b5"
|
||||
dependencies:
|
||||
exit "^0.1.2"
|
||||
jest-config "^22.4.4"
|
||||
jest-docblock "^22.4.0"
|
||||
jest-haste-map "^22.4.2"
|
||||
jest-jasmine2 "^22.4.4"
|
||||
jest-leak-detector "^22.4.0"
|
||||
jest-message-util "^22.4.0"
|
||||
jest-runtime "^22.4.4"
|
||||
jest-util "^22.4.1"
|
||||
jest-worker "^22.2.2"
|
||||
graceful-fs "^4.1.11"
|
||||
jest-config "^23.1.0"
|
||||
jest-docblock "^23.0.1"
|
||||
jest-haste-map "^23.1.0"
|
||||
jest-jasmine2 "^23.1.0"
|
||||
jest-leak-detector "^23.0.1"
|
||||
jest-message-util "^23.1.0"
|
||||
jest-runtime "^23.1.0"
|
||||
jest-util "^23.1.0"
|
||||
jest-worker "^23.0.1"
|
||||
source-map-support "^0.5.6"
|
||||
throat "^4.0.0"
|
||||
|
||||
jest-runtime@^22.4.4:
|
||||
version "22.4.4"
|
||||
resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-22.4.4.tgz#9ba7792fc75582a5be0f79af6f8fe8adea314048"
|
||||
jest-runtime@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.1.0.tgz#b4ae0e87259ecacfd4a884b639db07cf4dd620af"
|
||||
dependencies:
|
||||
babel-core "^6.0.0"
|
||||
babel-jest "^22.4.4"
|
||||
babel-plugin-istanbul "^4.1.5"
|
||||
babel-plugin-istanbul "^4.1.6"
|
||||
chalk "^2.0.1"
|
||||
convert-source-map "^1.4.0"
|
||||
exit "^0.1.2"
|
||||
fast-json-stable-stringify "^2.0.0"
|
||||
graceful-fs "^4.1.11"
|
||||
jest-config "^22.4.4"
|
||||
jest-haste-map "^22.4.2"
|
||||
jest-regex-util "^22.1.0"
|
||||
jest-resolve "^22.4.2"
|
||||
jest-util "^22.4.1"
|
||||
jest-validate "^22.4.4"
|
||||
json-stable-stringify "^1.0.1"
|
||||
jest-config "^23.1.0"
|
||||
jest-haste-map "^23.1.0"
|
||||
jest-message-util "^23.1.0"
|
||||
jest-regex-util "^23.0.0"
|
||||
jest-resolve "^23.1.0"
|
||||
jest-snapshot "^23.0.1"
|
||||
jest-util "^23.1.0"
|
||||
jest-validate "^23.0.1"
|
||||
micromatch "^2.3.11"
|
||||
realpath-native "^1.0.0"
|
||||
slash "^1.0.0"
|
||||
strip-bom "3.0.0"
|
||||
write-file-atomic "^2.1.0"
|
||||
yargs "^10.0.3"
|
||||
yargs "^11.0.0"
|
||||
|
||||
jest-serializer@^22.4.0, jest-serializer@^22.4.3:
|
||||
jest-serializer@^22.4.0:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-22.4.3.tgz#a679b81a7f111e4766235f4f0c46d230ee0f7436"
|
||||
|
||||
jest-snapshot@^22.4.0:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.4.3.tgz#b5c9b42846ffb9faccb76b841315ba67887362d2"
|
||||
jest-serializer@^23.0.1:
|
||||
version "23.0.1"
|
||||
resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165"
|
||||
|
||||
jest-snapshot@^23.0.1:
|
||||
version "23.0.1"
|
||||
resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.0.1.tgz#6674fa19b9eb69a99cabecd415bddc42d6af3e7e"
|
||||
dependencies:
|
||||
chalk "^2.0.1"
|
||||
jest-diff "^22.4.3"
|
||||
jest-matcher-utils "^22.4.3"
|
||||
jest-diff "^23.0.1"
|
||||
jest-matcher-utils "^23.0.1"
|
||||
mkdirp "^0.5.1"
|
||||
natural-compare "^1.4.0"
|
||||
pretty-format "^22.4.3"
|
||||
pretty-format "^23.0.1"
|
||||
|
||||
jest-util@^22.4.1, jest-util@^22.4.3:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.4.3.tgz#c70fec8eec487c37b10b0809dc064a7ecf6aafac"
|
||||
jest-util@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.1.0.tgz#c0251baf34644c6dd2fea78a962f4263ac55772d"
|
||||
dependencies:
|
||||
callsites "^2.0.0"
|
||||
chalk "^2.0.1"
|
||||
graceful-fs "^4.1.11"
|
||||
is-ci "^1.0.10"
|
||||
jest-message-util "^22.4.3"
|
||||
jest-message-util "^23.1.0"
|
||||
mkdirp "^0.5.1"
|
||||
slash "^1.0.0"
|
||||
source-map "^0.6.0"
|
||||
|
||||
jest-validate@^22.4.4:
|
||||
version "22.4.4"
|
||||
resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.4.4.tgz#1dd0b616ef46c995de61810d85f57119dbbcec4d"
|
||||
jest-validate@^23.0.1:
|
||||
version "23.0.1"
|
||||
resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.0.1.tgz#cd9f01a89d26bb885f12a8667715e9c865a5754f"
|
||||
dependencies:
|
||||
chalk "^2.0.1"
|
||||
jest-config "^22.4.4"
|
||||
jest-get-type "^22.1.0"
|
||||
leven "^2.1.0"
|
||||
pretty-format "^22.4.0"
|
||||
pretty-format "^23.0.1"
|
||||
|
||||
jest-watcher@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.1.0.tgz#a8d5842e38d9fb4afff823df6abb42a58ae6cdbd"
|
||||
dependencies:
|
||||
ansi-escapes "^3.0.0"
|
||||
chalk "^2.0.1"
|
||||
string-length "^2.0.0"
|
||||
|
||||
jest-worker@22.2.2:
|
||||
version "22.2.2"
|
||||
@@ -3291,18 +3310,24 @@ jest-worker@22.2.2:
|
||||
dependencies:
|
||||
merge-stream "^1.0.1"
|
||||
|
||||
jest-worker@^22.2.2, jest-worker@^22.4.3:
|
||||
jest-worker@^22.2.2:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-22.4.3.tgz#5c421417cba1c0abf64bf56bd5fb7968d79dd40b"
|
||||
dependencies:
|
||||
merge-stream "^1.0.1"
|
||||
|
||||
jest@^22.4.4:
|
||||
version "22.4.4"
|
||||
resolved "https://registry.yarnpkg.com/jest/-/jest-22.4.4.tgz#ffb36c9654b339a13e10b3d4b338eb3e9d49f6eb"
|
||||
jest-worker@^23.0.1:
|
||||
version "23.0.1"
|
||||
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.0.1.tgz#9e649dd963ff4046026f91c4017f039a6aa4a7bc"
|
||||
dependencies:
|
||||
merge-stream "^1.0.1"
|
||||
|
||||
jest@^23.1.0:
|
||||
version "23.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jest/-/jest-23.1.0.tgz#bbb7f893100a11a742dd8bd0d047a54b0968ad1a"
|
||||
dependencies:
|
||||
import-local "^1.0.0"
|
||||
jest-cli "^22.4.4"
|
||||
jest-cli "^23.1.0"
|
||||
|
||||
js-tokens@^3.0.0, js-tokens@^3.0.2:
|
||||
version "3.0.2"
|
||||
@@ -4257,13 +4282,13 @@ prettier-check@^2.0.0:
|
||||
dependencies:
|
||||
execa "^0.6.0"
|
||||
|
||||
prettier@^1.12.1:
|
||||
version "1.12.1"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325"
|
||||
prettier@^1.13.4:
|
||||
version "1.13.4"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.4.tgz#31bbae6990f13b1093187c731766a14036fa72e6"
|
||||
|
||||
pretty-format@^22.4.0, pretty-format@^22.4.3:
|
||||
version "22.4.3"
|
||||
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.4.3.tgz#f873d780839a9c02e9664c8a082e9ee79eaac16f"
|
||||
pretty-format@^23.0.1:
|
||||
version "23.0.1"
|
||||
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.0.1.tgz#d61d065268e4c759083bccbca27a01ad7c7601f4"
|
||||
dependencies:
|
||||
ansi-regex "^3.0.0"
|
||||
ansi-styles "^3.2.0"
|
||||
@@ -4951,7 +4976,7 @@ source-map-support@^0.4.2:
|
||||
dependencies:
|
||||
source-map "^0.5.6"
|
||||
|
||||
source-map-support@^0.5.0:
|
||||
source-map-support@^0.5.6:
|
||||
version "0.5.6"
|
||||
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13"
|
||||
dependencies:
|
||||
@@ -5593,15 +5618,15 @@ yargs-parser@^7.0.0:
|
||||
dependencies:
|
||||
camelcase "^4.1.0"
|
||||
|
||||
yargs-parser@^8.1.0:
|
||||
version "8.1.0"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950"
|
||||
yargs-parser@^9.0.2:
|
||||
version "9.0.2"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077"
|
||||
dependencies:
|
||||
camelcase "^4.1.0"
|
||||
|
||||
yargs@^10.0.3:
|
||||
version "10.1.2"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.2.tgz#454d074c2b16a51a43e2fb7807e4f9de69ccb5c5"
|
||||
yargs@^11.0.0:
|
||||
version "11.0.0"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.0.0.tgz#c052931006c5eee74610e5fc0354bedfd08a201b"
|
||||
dependencies:
|
||||
cliui "^4.0.0"
|
||||
decamelize "^1.1.1"
|
||||
@@ -5614,7 +5639,7 @@ yargs@^10.0.3:
|
||||
string-width "^2.0.0"
|
||||
which-module "^2.0.0"
|
||||
y18n "^3.2.1"
|
||||
yargs-parser "^8.1.0"
|
||||
yargs-parser "^9.0.2"
|
||||
|
||||
yargs@^9.0.0:
|
||||
version "9.0.1"
|
||||
|
||||