commit
41e3de6aa6
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var React = require('react-native/addons');
|
var React = require('react-native');
|
||||||
var {
|
var {
|
||||||
AppRegistry,
|
AppRegistry,
|
||||||
NavigatorIOS,
|
NavigatorIOS,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* * Copyright 2004-present Facebook. All Rights Reserved.
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
* */
|
* @flow
|
||||||
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var React = require('react-native');
|
var React = require('react-native');
|
||||||
|
@ -103,10 +104,10 @@ exports.description = 'Interface to show iOS\' action sheets';
|
||||||
exports.examples = [
|
exports.examples = [
|
||||||
{
|
{
|
||||||
title: 'Show Action Sheet',
|
title: 'Show Action Sheet',
|
||||||
render() { return <ActionSheetExample />; }
|
render(): ReactElement { return <ActionSheetExample />; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Show Share Action Sheet',
|
title: 'Show Share Action Sheet',
|
||||||
render() { return <ShareActionSheetExample />; }
|
render(): ReactElement { return <ShareActionSheetExample />; }
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
|
* @flow
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -128,7 +129,7 @@ exports.examples = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Start/stop',
|
title: 'Start/stop',
|
||||||
render: function() {
|
render: function(): ReactElement {
|
||||||
return <ToggleAnimatingActivityIndicator />;
|
return <ToggleAnimatingActivityIndicator />;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
|
* @flow
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -19,7 +20,7 @@ exports.description = 'Example of using the ad support API.';
|
||||||
exports.examples = [
|
exports.examples = [
|
||||||
{
|
{
|
||||||
title: 'Ad Support IOS',
|
title: 'Ad Support IOS',
|
||||||
render: function() {
|
render: function(): ReactElement {
|
||||||
return <AdSupportIOSExample />;
|
return <AdSupportIOSExample />;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
|
* @flow
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
|
* @flow
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* @providesModule AppStateIOSExample
|
* @providesModule AppStateIOSExample
|
||||||
|
* @flow
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -60,10 +61,10 @@ exports.examples = [
|
||||||
{
|
{
|
||||||
title: 'Subscribed AppStateIOS:',
|
title: 'Subscribed AppStateIOS:',
|
||||||
description: 'This changes according to the current state, so you can only ever see it rendered as "active"',
|
description: 'This changes according to the current state, so you can only ever see it rendered as "active"',
|
||||||
render() { return <AppStateSubscription showCurrentOnly={true} />; }
|
render(): ReactElement { return <AppStateSubscription showCurrentOnly={true} />; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Previous states:',
|
title: 'Previous states:',
|
||||||
render() { return <AppStateSubscription showCurrentOnly={false} />; }
|
render(): ReactElement { return <AppStateSubscription showCurrentOnly={false} />; }
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
|
* @flow
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -98,6 +99,6 @@ exports.description = 'Asynchronous local disk storage.';
|
||||||
exports.examples = [
|
exports.examples = [
|
||||||
{
|
{
|
||||||
title: 'Basics - getItem, setItem, removeItem',
|
title: 'Basics - getItem, setItem, removeItem',
|
||||||
render() { return <BasicStorageExample />; }
|
render(): ReactElement { return <BasicStorageExample />; }
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
|
* @flow
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -108,6 +109,6 @@ exports.description = 'Example component that uses CameraRoll to list user\'s ph
|
||||||
exports.examples = [
|
exports.examples = [
|
||||||
{
|
{
|
||||||
title: 'Photos',
|
title: 'Photos',
|
||||||
render() { return <CameraRollExample />; }
|
render(): ReactElement { return <CameraRollExample />; }
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* @providesModule CameraRollView
|
* @providesModule CameraRollView
|
||||||
|
* @flow
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ var propTypes = {
|
||||||
var CameraRollView = React.createClass({
|
var CameraRollView = React.createClass({
|
||||||
propTypes: propTypes,
|
propTypes: propTypes,
|
||||||
|
|
||||||
getDefaultProps: function() {
|
getDefaultProps: function(): Object {
|
||||||
return {
|
return {
|
||||||
groupTypes: 'SavedPhotos',
|
groupTypes: 'SavedPhotos',
|
||||||
batchSize: 5,
|
batchSize: 5,
|
||||||
|
@ -75,9 +76,9 @@ var CameraRollView = React.createClass({
|
||||||
var ds = new ListView.DataSource({rowHasChanged: this._rowHasChanged});
|
var ds = new ListView.DataSource({rowHasChanged: this._rowHasChanged});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
assets: [],
|
assets: ([]: Array<Image>),
|
||||||
groupTypes: this.props.groupTypes,
|
groupTypes: this.props.groupTypes,
|
||||||
lastCursor: null,
|
lastCursor: (null : ?string),
|
||||||
noMore: false,
|
noMore: false,
|
||||||
loadingMore: false,
|
loadingMore: false,
|
||||||
dataSource: ds,
|
dataSource: ds,
|
||||||
|
@ -99,21 +100,21 @@ var CameraRollView = React.createClass({
|
||||||
this.fetch();
|
this.fetch();
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillReceiveProps: function(nextProps) {
|
componentWillReceiveProps: function(nextProps: {groupTypes?: string}) {
|
||||||
if (this.props.groupTypes !== nextProps.groupTypes) {
|
if (this.props.groupTypes !== nextProps.groupTypes) {
|
||||||
this.fetch(true);
|
this.fetch(true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_fetch: function(clear) {
|
_fetch: function(clear?: boolean) {
|
||||||
if (clear) {
|
if (clear) {
|
||||||
this.setState(this.getInitialState(), this.fetch);
|
this.setState(this.getInitialState(), this.fetch);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var fetchParams = {
|
var fetchParams: Object = {
|
||||||
first: this.props.batchSize,
|
first: this.props.batchSize,
|
||||||
groupTypes: this.props.groupTypes,
|
groupTypes: this.props.groupTypes
|
||||||
};
|
};
|
||||||
if (this.state.lastCursor) {
|
if (this.state.lastCursor) {
|
||||||
fetchParams.after = this.state.lastCursor;
|
fetchParams.after = this.state.lastCursor;
|
||||||
|
@ -126,7 +127,7 @@ var CameraRollView = React.createClass({
|
||||||
* Fetches more images from the camera roll. If clear is set to true, it will
|
* Fetches more images from the camera roll. If clear is set to true, it will
|
||||||
* set the component to its initial state and re-fetch the images.
|
* set the component to its initial state and re-fetch the images.
|
||||||
*/
|
*/
|
||||||
fetch: function(clear) {
|
fetch: function(clear?: boolean) {
|
||||||
if (!this.state.loadingMore) {
|
if (!this.state.loadingMore) {
|
||||||
this.setState({loadingMore: true}, () => { this._fetch(clear); });
|
this.setState({loadingMore: true}, () => { this._fetch(clear); });
|
||||||
}
|
}
|
||||||
|
@ -144,7 +145,7 @@ var CameraRollView = React.createClass({
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
_rowHasChanged: function(r1, r2) {
|
_rowHasChanged: function(r1: Array<Image>, r2: Array<Image>): boolean {
|
||||||
if (r1.length !== r2.length) {
|
if (r1.length !== r2.length) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -166,7 +167,7 @@ var CameraRollView = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
// rowData is an array of images
|
// rowData is an array of images
|
||||||
_renderRow: function(rowData, sectionID, rowID) {
|
_renderRow: function(rowData: Array<Image>, sectionID: string, rowID: string) {
|
||||||
var images = rowData.map((image) => {
|
var images = rowData.map((image) => {
|
||||||
if (image === null) {
|
if (image === null) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -181,9 +182,9 @@ var CameraRollView = React.createClass({
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
_appendAssets: function(data) {
|
_appendAssets: function(data: Object) {
|
||||||
var assets = data.edges;
|
var assets = data.edges;
|
||||||
var newState = { loadingMore: false };
|
var newState: Object = { loadingMore: false };
|
||||||
|
|
||||||
if (!data.page_info.has_next_page) {
|
if (!data.page_info.has_next_page) {
|
||||||
newState.noMore = true;
|
newState.noMore = true;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
|
* @flow
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -118,7 +119,7 @@ exports.description = 'Select dates and times using the native UIDatePicker.';
|
||||||
exports.examples = [
|
exports.examples = [
|
||||||
{
|
{
|
||||||
title: '<DatePickerIOS>',
|
title: '<DatePickerIOS>',
|
||||||
render: function() {
|
render: function(): ReactElement {
|
||||||
return <DatePickerExample />;
|
return <DatePickerExample />;
|
||||||
},
|
},
|
||||||
}];
|
}];
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
|
* @flow
|
||||||
*/
|
*/
|
||||||
/* eslint no-console: 0 */
|
/* eslint no-console: 0 */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -19,13 +20,15 @@ exports.description = 'Examples of using the Geolocation API.';
|
||||||
exports.examples = [
|
exports.examples = [
|
||||||
{
|
{
|
||||||
title: 'navigator.geolocation',
|
title: 'navigator.geolocation',
|
||||||
render: function() {
|
render: function(): ReactElement {
|
||||||
return <GeolocationExample />;
|
return <GeolocationExample />;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
var GeolocationExample = React.createClass({
|
var GeolocationExample = React.createClass({
|
||||||
|
watchID: (null: ?number),
|
||||||
|
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {
|
return {
|
||||||
initialPosition: 'unknown',
|
initialPosition: 'unknown',
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
|
* @flow
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
|
* @flow
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -28,6 +29,8 @@ var ListViewSimpleExample = React.createClass({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_pressData: ({}: {[key: number]: boolean}),
|
||||||
|
|
||||||
componentWillMount: function() {
|
componentWillMount: function() {
|
||||||
this._pressData = {};
|
this._pressData = {};
|
||||||
},
|
},
|
||||||
|
@ -46,7 +49,7 @@ var ListViewSimpleExample = React.createClass({
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
_renderRow: function(rowData, sectionID, rowID) {
|
_renderRow: function(rowData: string, sectionID: number, rowID: number) {
|
||||||
var rowHash = Math.abs(hashCode(rowData));
|
var rowHash = Math.abs(hashCode(rowData));
|
||||||
var imgSource = {
|
var imgSource = {
|
||||||
uri: THUMB_URLS[rowHash % THUMB_URLS.length],
|
uri: THUMB_URLS[rowHash % THUMB_URLS.length],
|
||||||
|
@ -66,7 +69,7 @@ var ListViewSimpleExample = React.createClass({
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
_genRows: function(pressData) {
|
_genRows: function(pressData: {[key: number]: boolean}): Array<string> {
|
||||||
var dataBlob = [];
|
var dataBlob = [];
|
||||||
for (var ii = 0; ii < 100; ii++) {
|
for (var ii = 0; ii < 100; ii++) {
|
||||||
var pressedText = pressData[ii] ? ' (pressed)' : '';
|
var pressedText = pressData[ii] ? ' (pressed)' : '';
|
||||||
|
@ -75,7 +78,7 @@ var ListViewSimpleExample = React.createClass({
|
||||||
return dataBlob;
|
return dataBlob;
|
||||||
},
|
},
|
||||||
|
|
||||||
_pressRow: function(rowID) {
|
_pressRow: function(rowID: number) {
|
||||||
this._pressData[rowID] = !this._pressData[rowID];
|
this._pressData[rowID] = !this._pressData[rowID];
|
||||||
this.setState({dataSource: this.state.dataSource.cloneWithRows(
|
this.setState({dataSource: this.state.dataSource.cloneWithRows(
|
||||||
this._genRows(this._pressData)
|
this._genRows(this._pressData)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var React = require('react-native/addons');
|
var React = require('react-native');
|
||||||
var ViewExample = require('./ViewExample');
|
var ViewExample = require('./ViewExample');
|
||||||
var {
|
var {
|
||||||
PixelRatio,
|
PixelRatio,
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var React = require('react-native/addons');
|
var React = require('react-native');
|
||||||
var UIExplorerList = require('./UIExplorerList');
|
var UIExplorerList = require('./UIExplorerList');
|
||||||
|
|
||||||
var {
|
var {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var React = require('react-native/addons');
|
var React = require('react-native');
|
||||||
var {
|
var {
|
||||||
ListView,
|
ListView,
|
||||||
PixelRatio,
|
PixelRatio,
|
||||||
|
|
|
@ -152,7 +152,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
|
@ -186,7 +186,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
|
|
|
@ -157,7 +157,7 @@
|
||||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||||
"$(SRCROOT)/../../ReactKit/**",
|
"$(SRCROOT)/../../ReactKit/**",
|
||||||
);
|
);
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
|
@ -196,7 +196,7 @@
|
||||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||||
"$(SRCROOT)/../../ReactKit/**",
|
"$(SRCROOT)/../../ReactKit/**",
|
||||||
);
|
);
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
|
|
|
@ -152,7 +152,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
|
@ -186,7 +186,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
|
|
|
@ -194,7 +194,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
|
@ -228,7 +228,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
|
|
|
@ -158,7 +158,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
|
|
|
@ -176,7 +176,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
|
@ -210,7 +210,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
|
|
|
@ -44,7 +44,7 @@ class AlertIOS {
|
||||||
static alert(
|
static alert(
|
||||||
title: ?string,
|
title: ?string,
|
||||||
message: ?string,
|
message: ?string,
|
||||||
buttons: ?Array<{
|
buttons?: Array<{
|
||||||
text: ?string;
|
text: ?string;
|
||||||
onPress: ?Function;
|
onPress: ?Function;
|
||||||
}>
|
}>
|
||||||
|
|
|
@ -157,7 +157,7 @@
|
||||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||||
"$(SRCROOT)/../../ReactKit/**",
|
"$(SRCROOT)/../../ReactKit/**",
|
||||||
);
|
);
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
|
@ -196,7 +196,7 @@
|
||||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||||
"$(SRCROOT)/../../ReactKit/**",
|
"$(SRCROOT)/../../ReactKit/**",
|
||||||
);
|
);
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* @flow
|
|
||||||
*/
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var LinkedStateMixin = require('LinkedStateMixin');
|
|
||||||
var ReactComponentWithPureRenderMixin = require('ReactComponentWithPureRenderMixin');
|
|
||||||
var ReactNative = require('react-native');
|
|
||||||
var ReactUpdates = require('ReactUpdates');
|
|
||||||
|
|
||||||
var cloneWithProps = require('cloneWithProps');
|
|
||||||
var update = require('update');
|
|
||||||
|
|
||||||
var addons = {
|
|
||||||
LinkedStateMixin: LinkedStateMixin,
|
|
||||||
PureRenderMixin: ReactComponentWithPureRenderMixin,
|
|
||||||
batchedUpdates: ReactUpdates.batchedUpdates,
|
|
||||||
cloneWithProps: cloneWithProps,
|
|
||||||
update: update,
|
|
||||||
Perf: undefined,
|
|
||||||
TestUtils: undefined,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (__DEV__) {
|
|
||||||
addons.Perf = require('ReactDefaultPerf');
|
|
||||||
addons.TestUtils = require('ReactTestUtils');
|
|
||||||
}
|
|
||||||
|
|
||||||
var ReactNativeWithAddons = {
|
|
||||||
...ReactNative,
|
|
||||||
addons: addons,
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = ReactNativeWithAddons;
|
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"name": "react-native",
|
|
||||||
"main": "react-native.js",
|
|
||||||
"directories": {".": ""}
|
|
||||||
}
|
|
|
@ -5,9 +5,14 @@
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var ReactNative = {
|
// Export React, plus some native additions.
|
||||||
...require('React'),
|
//
|
||||||
|
// The use of Object.create/assign is to work around a Flow bug (#6560135).
|
||||||
|
// Once that is fixed, change this back to
|
||||||
|
//
|
||||||
|
// var ReactNative = {...require('React'), /* additions */}
|
||||||
|
//
|
||||||
|
var ReactNative = Object.assign(Object.create(require('React')), {
|
||||||
// Components
|
// Components
|
||||||
ActivityIndicatorIOS: require('ActivityIndicatorIOS'),
|
ActivityIndicatorIOS: require('ActivityIndicatorIOS'),
|
||||||
DatePickerIOS: require('DatePickerIOS'),
|
DatePickerIOS: require('DatePickerIOS'),
|
||||||
|
@ -45,7 +50,20 @@ var ReactNative = {
|
||||||
TimerMixin: require('TimerMixin'),
|
TimerMixin: require('TimerMixin'),
|
||||||
VibrationIOS: require('VibrationIOS'),
|
VibrationIOS: require('VibrationIOS'),
|
||||||
|
|
||||||
invariant: require('invariant'),
|
addons: {
|
||||||
};
|
batchedUpdates: require('ReactUpdates').batchedUpdates,
|
||||||
|
LinkedStateMixin: require('LinkedStateMixin'),
|
||||||
|
Perf: undefined,
|
||||||
|
PureRenderMixin: require('ReactComponentWithPureRenderMixin'),
|
||||||
|
TestUtils: undefined,
|
||||||
|
cloneWithProps: require('cloneWithProps'),
|
||||||
|
update: require('update'),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (__DEV__) {
|
||||||
|
ReactNative.addons.Perf = require('ReactDefaultPerf');
|
||||||
|
ReactNative.addons.TestUtils = require('ReactTestUtils');
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = ReactNative;
|
module.exports = ReactNative;
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
/**
|
||||||
|
* @generated SignedSource<<4595f3986407fd02332cf9f5fc12e70f>>
|
||||||
|
*
|
||||||
|
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
* !! This file is a check-in of a static_upstream project! !!
|
||||||
|
* !! !!
|
||||||
|
* !! You should not modify this file directly. Instead: !!
|
||||||
|
* !! 1) Use `fjs use-upstream` to temporarily replace this with !!
|
||||||
|
* !! the latest version from upstream. !!
|
||||||
|
* !! 2) Make your changes, test them, etc. !!
|
||||||
|
* !! 3) Use `fjs push-upstream` to copy your changes back to !!
|
||||||
|
* !! static_upstream. !!
|
||||||
|
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
*
|
||||||
|
* @providesModule clearImmediate
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = global.clearImmediate ||
|
||||||
|
require('ImmediateImplementation').clearImmediate;
|
|
@ -546,7 +546,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
|
@ -581,7 +581,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
|
|
|
@ -67,7 +67,7 @@ RCT_REMAP_VIEW_PROPERTY(contentOffset, scrollView.contentOffset);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGSize size = ((id<RCTScrollableProtocol>)view).contentSize;
|
CGSize size = ((RCTScrollView *)view).scrollView.contentSize;
|
||||||
callback(@[@{
|
callback(@[@{
|
||||||
@"width" : @(size.width),
|
@"width" : @(size.width),
|
||||||
@"height" : @(size.height)
|
@"height" : @(size.height)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "react-native-github",
|
"name": "react-native",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "Build native apps with React!",
|
"description": "Build native apps with React!",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -20,6 +20,7 @@
|
||||||
"source-map"
|
"source-map"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"main": "Libraries/react-native/react-native.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"lint": "node linter.js Examples/",
|
"lint": "node linter.js Examples/",
|
||||||
|
|
|
@ -72,6 +72,8 @@ console.log('\n' +
|
||||||
' ===============================================================\n'
|
' ===============================================================\n'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log('Looking for JS files in\n ', options.projectRoots.join('\n '));
|
||||||
|
|
||||||
process.on('uncaughtException', function(e) {
|
process.on('uncaughtException', function(e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
console.error(e.stack);
|
console.error(e.stack);
|
||||||
|
|
Loading…
Reference in New Issue