forked from microsoft/react-native-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into RevampPreparedScriptStore
- Loading branch information
Showing
37 changed files
with
589 additions
and
114 deletions.
There are no files selected for viewing
9 changes: 0 additions & 9 deletions
9
change/react-native-windows-2019-10-30-16-44-34-FixGetPropertyNames.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
* @format | ||
*/ | ||
|
||
import * as React from 'react'; | ||
import { | ||
AppRegistry, | ||
Switch, | ||
StyleSheet, | ||
View, | ||
Text, | ||
ScrollView, | ||
TouchableOpacity, | ||
} from 'react-native'; | ||
|
||
export default class Bootstrap extends React.Component<{}, any> { | ||
state = { | ||
horizontalValue: true, | ||
snapToStartValue: false, | ||
snapToEndValue: false, | ||
zoomValue: false, | ||
alignToStartValue: true, | ||
}; | ||
|
||
toggleSwitch1 = (value: boolean) => { | ||
this.setState({horizontalValue: value}); | ||
}; | ||
|
||
toggleSwitch2 = (value: boolean) => { | ||
this.setState({snapToStartValue: value}); | ||
}; | ||
|
||
toggleSwitch3 = (value: boolean) => { | ||
this.setState({snapToEndValue: value}); | ||
}; | ||
|
||
toggleSwitch4 = (value: boolean) => { | ||
this.setState({zoomValue: value}); | ||
}; | ||
|
||
toggleSwitch5 = (value: boolean) => { | ||
this.setState({alignToStartValue: value}); | ||
}; | ||
|
||
makeItems = (nItems: number, styles: Object): Array<any> => { | ||
const items = []; | ||
for (let i = 0; i < nItems; i++) { | ||
items[i] = ( | ||
<TouchableOpacity key={i} style={styles}> | ||
<Text>{'Item ' + i}</Text> | ||
</TouchableOpacity> | ||
); | ||
} | ||
return items; | ||
}; | ||
|
||
render() { | ||
const item = ( | ||
<View | ||
style={{ | ||
flex: 1, | ||
alignSelf: 'auto', | ||
flexDirection: 'column', | ||
justifyContent: 'flex-start', | ||
}}> | ||
<View style={{flex: 0.2, alignSelf: 'center', flexDirection: 'row'}}> | ||
<View | ||
style={{ | ||
flexDirection: 'column', | ||
alignSelf: 'stretch', | ||
justifyContent: 'center', | ||
padding: 20, | ||
}}> | ||
<Text> | ||
{this.state.horizontalValue ? 'Horizontal ' : 'Vertical '} | ||
</Text> | ||
<Switch | ||
onValueChange={this.toggleSwitch1} | ||
value={this.state.horizontalValue} | ||
/> | ||
</View> | ||
<View | ||
style={{ | ||
flexDirection: 'column', | ||
alignSelf: 'stretch', | ||
justifyContent: 'center', | ||
padding: 20, | ||
}}> | ||
<Text> | ||
{this.state.snapToStartValue | ||
? 'SnapToStart On ' | ||
: 'SnapToStart Off '} | ||
</Text> | ||
<Switch | ||
onValueChange={this.toggleSwitch2} | ||
value={this.state.snapToStartValue} | ||
/> | ||
</View> | ||
<View | ||
style={{ | ||
flexDirection: 'column', | ||
alignSelf: 'stretch', | ||
justifyContent: 'center', | ||
padding: 20, | ||
}}> | ||
<Text> | ||
{this.state.snapToEndValue ? 'SnapToEnd On ' : 'SnapToEnd Off '} | ||
</Text> | ||
<Switch | ||
onValueChange={this.toggleSwitch3} | ||
value={this.state.snapToEndValue} | ||
/> | ||
</View> | ||
<View | ||
style={{ | ||
flexDirection: 'column', | ||
alignSelf: 'stretch', | ||
justifyContent: 'center', | ||
padding: 20, | ||
}}> | ||
<Text> | ||
{this.state.zoomValue ? 'Zoom 2.0 on ' : 'Zoom 2.0 Off '} | ||
</Text> | ||
<Switch | ||
onValueChange={this.toggleSwitch4} | ||
value={this.state.zoomValue} | ||
/> | ||
</View> | ||
<View | ||
style={{ | ||
flexDirection: 'column', | ||
alignSelf: 'stretch', | ||
justifyContent: 'center', | ||
padding: 20, | ||
}}> | ||
<Text> | ||
{this.state.alignToStartValue ? 'AlignToStart' : 'AlignToEnd'} | ||
</Text> | ||
<Switch | ||
onValueChange={this.toggleSwitch5} | ||
value={this.state.alignToStartValue} | ||
/> | ||
</View> | ||
</View> | ||
<View style={{flex: 0.8, alignSelf: 'center', flexDirection: 'column'}}> | ||
<Text>SnapToOffsets[100, 500]</Text> | ||
<View> | ||
<ScrollView | ||
style={ | ||
this.state.horizontalValue | ||
? styles.horizontalScrollViewStyle | ||
: styles.verticalScrollViewStyle | ||
} | ||
snapToOffsets={[100.0, 500.0]} | ||
minimumZoomScale={0.1} | ||
maximumZoomScale={2.0} | ||
zoomScale={this.state.zoomValue ? 2.0 : 1.0} | ||
snapToStart={this.state.snapToStartValue} | ||
snapToEnd={this.state.snapToEndValue} | ||
snapToAlignment={this.state.alignToStartValue ? 'start' : 'end'} | ||
horizontal={this.state.horizontalValue}> | ||
{this.makeItems(20, [styles.itemWrapper])} | ||
</ScrollView> | ||
</View> | ||
</View> | ||
</View> | ||
); | ||
|
||
return item; | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
horizontalScrollViewStyle: { | ||
padding: 10, | ||
width: 500, | ||
height: 120, | ||
}, | ||
verticalScrollViewStyle: { | ||
padding: 10, | ||
width: 120, | ||
height: 500, | ||
}, | ||
itemWrapper: { | ||
backgroundColor: '#dddddd', | ||
alignItems: 'center', | ||
borderRadius: 5, | ||
borderWidth: 5, | ||
borderColor: '#a52a2a', | ||
padding: 10, | ||
margin: 5, | ||
width: 90, | ||
height: 90, | ||
}, | ||
}); | ||
|
||
AppRegistry.registerComponent('Bootstrap', () => Bootstrap); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
{ | ||
"name": "react-native-windows-extended", | ||
"entries": [ | ||
{ | ||
"date": "Fri, 01 Nov 2019 23:40:12 GMT", | ||
"tag": "react-native-windows-extended_v0.60.15", | ||
"version": "0.60.15", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"comment": "Updating react-native to version: 0.60.0-microsoft.15", | ||
"author": "[email protected]", | ||
"commit": "87802f691c664b1170a782120562999c1c32932a" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Thu, 31 Oct 2019 18:11:20 GMT", | ||
"tag": "react-native-windows-extended_v0.60.14", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
# Change Log - react-native-windows-extended | ||
|
||
This log was last generated on Thu, 31 Oct 2019 18:11:20 GMT and should not be manually modified. | ||
This log was last generated on Fri, 01 Nov 2019 23:40:12 GMT and should not be manually modified. | ||
|
||
## 0.60.15 | ||
Fri, 01 Nov 2019 23:40:12 GMT | ||
|
||
### Patches | ||
|
||
- Updating react-native to version: 0.60.0-microsoft.15 ([email protected]) | ||
## 0.60.14 | ||
Thu, 31 Oct 2019 18:11:20 GMT | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,69 @@ | ||
{ | ||
"name": "react-native-windows", | ||
"entries": [ | ||
{ | ||
"date": "Fri, 01 Nov 2019 23:40:12 GMT", | ||
"tag": "react-native-windows_v0.60.0-vnext.61", | ||
"version": "0.60.0-vnext.61", | ||
"comments": { | ||
"none": [ | ||
{ | ||
"comment": "Move ScriptStore and RuntimeHolder to RNW.", | ||
"author": "[email protected]", | ||
"commit": "6a2c28a3e05f5026ef7c07f756a6393102cbd169" | ||
} | ||
], | ||
"prerelease": [ | ||
{ | ||
"comment": "Updating react-native to version: 0.60.0-microsoft.15", | ||
"author": "[email protected]", | ||
"commit": "4988e4a8effa4b9d760410f6bead68e9f3f7555a" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Fri, 01 Nov 2019 21:25:27 GMT", | ||
"tag": "react-native-windows_v0.60.0-vnext.60", | ||
"version": "0.60.0-vnext.60", | ||
"comments": { | ||
"none": [ | ||
{ | ||
"comment": "Fix some nit suggestions from PR #3568.", | ||
"author": "[email protected]", | ||
"commit": "09b426a5bbf575ad23a721c50d0b374c84364b72" | ||
} | ||
], | ||
"prerelease": [ | ||
{ | ||
"comment": "Support snapToStart and snapToEnd for ScrollView", | ||
"author": "[email protected]", | ||
"commit": "37662c94ca8556f3e63aeafbd474fabab71e40b4" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Fri, 01 Nov 2019 18:09:07 GMT", | ||
"tag": "react-native-windows_v0.60.0-vnext.59", | ||
"version": "0.60.0-vnext.59", | ||
"comments": { | ||
"none": [ | ||
{ | ||
"comment": "Implement ChakraRuntime::getPropertyNames() properly in native.", | ||
"author": "[email protected]", | ||
"commit": "7c96aa9beae65248b1b4c4c668b08ea56e4b4392" | ||
} | ||
], | ||
"prerelease": [ | ||
{ | ||
"comment": "Call native animation callbacks only once", | ||
"author": "[email protected]", | ||
"commit": "141e2654c5b5ed958591c4933a82d85213b56e40" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Thu, 31 Oct 2019 18:11:20 GMT", | ||
"tag": "react-native-windows_v0.60.0-vnext.58", | ||
|
Oops, something went wrong.