Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 99a778e

Browse files
committed
chore(deps): update React Native to 0.22.2
1 parent 2441ef6 commit 99a778e

File tree

6 files changed

+30
-27
lines changed

6 files changed

+30
-27
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"dependencies": {
4141
"angular2": "2.0.0-beta.9",
4242
"hammerjs": "2.0.6",
43-
"react-native": "0.21.0",
43+
"react-native": "0.22.2",
4444
"reflect-metadata": "0.1.2",
4545
"rxjs": "5.0.0-beta.2",
4646
"zone.js": "0.5.15",

sample/samples/ios/apis.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class APIsApp {
9191
cancelButtonIndex: 4,
9292
destructiveButtonIndex: 3,
9393
tintColor: 'black'},
94-
(actionIndex) => {console.log(actionIndex)}
94+
(actionIndex: number) => {console.log(actionIndex)}
9595
)
9696
}
9797

@@ -101,8 +101,8 @@ export class APIsApp {
101101
message: 'message to go with the shared url',
102102
subject: 'a subject to go in the email heading',
103103
},
104-
(error) => console.log(error),
105-
(success, method) => {
104+
(error: any) => console.log(error),
105+
(success: boolean, method: string) => {
106106
if (success) {
107107
console.log(`Shared via ${method}`);
108108
} else {

sample/samples/ios/kitchensink.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class KitchenSinkApp {
3131

3232
constructor(private zone: NgZone) {}
3333

34-
_actions(event) {
34+
_actions(event: any) {
3535
var todoMVC: TodoMVC = this.navigator.activeComponent;
3636
ActionSheetIOS.showActionSheetWithOptions({
3737
title: 'Actions',

src/components/android/drawer_layout.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export class DrawerLayoutContent {}
4343
//Non-native
4444
'keyboardDismissMode',
4545
//Native
46-
'drawerPosition', 'drawerWidth',
46+
'drawerLockMode', 'drawerPosition', 'drawerWidth',
4747
].concat(GENERIC_INPUTS),
48-
template: `<native-drawerlayout [drawerPosition]="_drawerPosition" [drawerWidth]="_drawerWidth"
48+
template: `<native-drawerlayout [drawerLockMode]="_drawerLockMode" [drawerPosition]="_drawerPosition" [drawerWidth]="_drawerWidth"
4949
(topDrawerClosed)="_handleDrawerClosed($event)" (topDrawerOpened)="_handleDrawerOpened($event)"
5050
(topDrawerSlide)="_handleDrawerSlide($event)" (topDrawerStateChanged)="_handleDrawerStateChanged($event)"
5151
${GENERIC_BINDINGS}>
@@ -84,12 +84,17 @@ export class DrawerLayout extends HighLevelComponent {
8484

8585
//Properties
8686
private _keyboardDismissMode: string;
87+
private _drawerLockMode: string;
8788
private _drawerPosition: number;
8889
private _drawerWidth: number;
8990
/**
9091
* To be documented
9192
*/
9293
set keyboardDismissMode(value: string) {this._keyboardDismissMode = this.processEnum(value, ['none', 'on-drag']);}
94+
/**
95+
* To be documented
96+
*/
97+
set drawerLockMode(value: string) {this._drawerLockMode = this.processEnum(value, ['unlocked', 'locked-closed', 'locked-open']);}
9398
/**
9499
* To be documented
95100
*/

src/components/textinput.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import {ReactNativeWrapper, isAndroid} from './../wrapper/wrapper';
55
import {HighLevelComponent, GENERIC_INPUTS, GENERIC_BINDINGS} from "./component";
66

77
var ANDROID_INPUTS: Array<string> = ['numberOfLines', 'underlineColorAndroid'];
8-
var IOS_INPUTS: Array<string> = ['blurOnSubmit', 'clearButtonMode', 'clearTextOnFocus', 'enablesReturnKeyAutomatically',
8+
var IOS_INPUTS: Array<string> = ['clearButtonMode', 'clearTextOnFocus', 'enablesReturnKeyAutomatically',
99
'keyboardAppearance', 'returnKeyType', 'selectTextOnFocus'];
1010

1111
var ANDROID_BINDINGS: string = `[numberOfLines]="_numberOfLines" [underlineColorAndroid]="_underlineColorAndroid" (topTextInput)="_handleKeyPress($event)"`;
12-
var IOS_BINDINGS: string = `[blurOnSubmit]="_blurOnSubmit" [clearButtonMode]="_clearButtonMode" [clearTextOnFocus]="_clearTextOnFocus"
12+
var IOS_BINDINGS: string = `[clearButtonMode]="_clearButtonMode" [clearTextOnFocus]="_clearTextOnFocus"
1313
[enablesReturnKeyAutomatically]="_enablesReturnKeyAutomatically" [keyboardAppearance]="_keyboardAppearance"
1414
[returnKeyType]="_returnKeyType" [selectTextOnFocus]="_selectTextOnFocus" (topKeyPress)="_handleKeyPress($event)"`;
1515

@@ -33,10 +33,10 @@ export class Sample {
3333
//Non-native
3434
'autoFocus',
3535
//Native
36-
'autoCapitalize', 'autoCorrect', 'editable', 'keyboardType', 'maxLength', 'multiline',
36+
'autoCapitalize', 'autoCorrect', 'blurOnSubmit', 'editable', 'keyboardType', 'maxLength', 'multiline',
3737
'password', 'placeholder', 'placeholderTextColor', 'selectionColor'
3838
].concat(GENERIC_INPUTS).concat(isAndroid() ? ANDROID_INPUTS : IOS_INPUTS),
39-
template: `<native-textinput [text]="_getText()" [autoCapitalize]="_autoCapitalize" [autoCorrect]="_autoCorrect" [editable]="_editable" [keyboardType]="_keyboardType"
39+
template: `<native-textinput [text]="_getText()" [autoCapitalize]="_autoCapitalize" [autoCorrect]="_autoCorrect" [blurOnSubmit]="_blurOnSubmit" [editable]="_editable" [keyboardType]="_keyboardType"
4040
[maxLength]="_maxLength" [multiline]="_multiline" [password]="_password" [placeholder]="_placeholder" [placeholderTextColor]="_placeholderTextColor" [selectionColor]="_selectionColor"
4141
(tap)="focusTextInput()" (topFocus)="_handleFocus()" (topChange)="_handleChange($event)" (topSubmitEditing)="_handleSubmitEditing($event)"
4242
(topBlur)="_handleBlur()" (topEndEditing)="_handleEndEditing($event)" ${GENERIC_BINDINGS} ${isAndroid() ? ANDROID_BINDINGS : IOS_BINDINGS}></native-textinput>`
@@ -89,6 +89,7 @@ export class TextInput extends HighLevelComponent implements OnInit {
8989

9090
private _autoCapitalize : string;
9191
private _autoCorrect: boolean;
92+
private _blurOnSubmit: boolean;
9293
private _editable: boolean;
9394
private _keyboardType: string;
9495
private _maxLength: number;
@@ -105,6 +106,10 @@ export class TextInput extends HighLevelComponent implements OnInit {
105106
* To be documented
106107
*/
107108
set autoCorrect(value: any) { this._autoCorrect = this.processBoolean(value);}
109+
/**
110+
* To be documented
111+
*/
112+
set blurOnSubmit(value: any) {this._blurOnSubmit = this.processBoolean(value);}
108113
/**
109114
* To be documented
110115
*/
@@ -151,18 +156,12 @@ export class TextInput extends HighLevelComponent implements OnInit {
151156
*/
152157
set underlineColorAndroid(value: string) {this._underlineColorAndroid = this.processColor(value);}
153158

154-
private _blurOnSubmit: boolean;
155159
private _clearButtonMode: boolean;
156160
private _clearTextOnFocus: boolean;
157161
private _enablesReturnKeyAutomatically: boolean;
158162
private _keyboardAppearance: string;
159163
private _returnKeyType: string;
160164
private _selectTextOnFocus: boolean;
161-
/**
162-
* To be documented
163-
* @platform ios
164-
*/
165-
set blurOnSubmit(value: any) {this._blurOnSubmit = this.processBoolean(value);}
166165
/**
167166
* To be documented
168167
* @platform ios

src/components/webview.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import {ReactNativeWrapper, isAndroid} from './../wrapper/wrapper';
55
import {HighLevelComponent, GENERIC_INPUTS, GENERIC_BINDINGS} from "./component";
66

77
var ANDROID_INPUTS: Array<string> = ['domStorageEnabled', 'javaScriptEnabled'];
8-
var IOS_INPUTS: Array<string> = ['allowsInlineMediaPlayback', 'bounces', 'decelerationRate', 'scalesPageToFit', 'scrollEnabled'];
8+
var IOS_INPUTS: Array<string> = ['allowsInlineMediaPlayback', 'bounces', 'decelerationRate', 'scrollEnabled'];
99

1010
var ANDROID_BINDINGS: string = `[domStorageEnabled]="_domStorageEnabled" [javaScriptEnabled]="_javaScriptEnabled"`;
1111
var IOS_BINDINGS: string = `[allowsInlineMediaPlayback]="_allowsInlineMediaPlayback" [bounces]="_bounces" [decelerationRate]="_decelerationRate"
12-
[scalesPageToFit]="_scalesPageToFit" [scrollEnabled]="_scrollEnabled"`;
12+
[scrollEnabled]="_scrollEnabled"`;
1313

1414
//TODO: onNavigationStateChange, renderError, renderLoading, startInLoadingState, processDecelerationRate(iOS)
1515

@@ -29,10 +29,10 @@ export class Sample {}
2929
@Component({
3030
selector: 'WebView',
3131
inputs: [
32-
'automaticallyAdjustContentInsets', 'contentInset', 'injectedJavaScript', 'source'
32+
'automaticallyAdjustContentInsets', 'contentInset', 'injectedJavaScript', 'scalesPageToFit', 'source'
3333
].concat(GENERIC_INPUTS).concat(isAndroid() ? ANDROID_INPUTS : IOS_INPUTS),
3434
template: `<native-webview [automaticallyAdjustContentInsets]="_automaticallyAdjustContentInsets" [contentInset]="_contentInset"
35-
[injectedJavaScript]="_injectedJavaScript" [source]="_source"
35+
[injectedJavaScript]="_injectedJavaScript" [scalesPageToFit]="_scalesPageToFit" [source]="_source"
3636
(topLoadingStart)="_handleLoadingStart($event)" (topLoadingFinish)="_handleLoadingFinish($event)" (topLoadingError)="_handleLoadingError($event)"
3737
${GENERIC_BINDINGS} ${isAndroid() ? ANDROID_BINDINGS : IOS_BINDINGS}></native-webview>`
3838
})
@@ -61,6 +61,7 @@ export class WebView extends HighLevelComponent{
6161
private _automaticallyAdjustContentInsets: boolean;
6262
private _contentInset: any;
6363
private _injectedJavaScript: string;
64+
private _scalesPageToFit: boolean;
6465
private _source: any;
6566
/**
6667
* To be documented
@@ -74,6 +75,10 @@ export class WebView extends HighLevelComponent{
7475
* To be documented
7576
*/
7677
set injectedJavaScript(value: any) {this._injectedJavaScript = value;}
78+
/**
79+
* To be documented
80+
*/
81+
set scalesPageToFit(value: any) {this._scalesPageToFit = this.processBoolean(value);}
7782
/**
7883
* To be documented
7984
*/
@@ -95,7 +100,6 @@ export class WebView extends HighLevelComponent{
95100
private _allowsInlineMediaPlayback: boolean;
96101
private _scrollEnabled: boolean;
97102
private _decelerationRate: number;
98-
private _scalesPageToFit: boolean;
99103
private _bounces: boolean;
100104
/**
101105
* To be documented
@@ -112,11 +116,6 @@ export class WebView extends HighLevelComponent{
112116
* @platform ios
113117
*/
114118
set decelerationRate(value: any) {this._decelerationRate = this.processNumber(value);}
115-
/**
116-
* To be documented
117-
* @platform ios
118-
*/
119-
set scalesPageToFit(value: any) {this._scalesPageToFit = this.processBoolean(value);}
120119
/**
121120
* To be documented
122121
* @platform ios

0 commit comments

Comments
 (0)