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

Commit b564c0a

Browse files
authored
chore(deps): update React Native to 0.30.0 (#65)
1 parent 8135d29 commit b564c0a

File tree

6 files changed

+33
-25
lines changed

6 files changed

+33
-25
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"@angular/platform-server": "v2.0.0-rc.4",
5858
"@angular/router-deprecated": "v2.0.0-rc.2",
5959
"hammerjs": "2.0.6",
60-
"react-native": "0.28.0",
60+
"react-native": "0.30.0",
6161
"reflect-metadata": "0.1.2",
6262
"rxjs": "5.0.0-beta.6",
6363
"zone.js": "mlaval/zone.js#prerelease0.6.13"

src/components/image.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var ANDROID_INPUTS: Array<string> = ['fadeDuration', 'loadingIndicatorSrc', 'pro
77
var IOS_INPUTS: Array<string> = ['blurRadius', 'capInsets', 'defaultSource'];
88

99
var ANDROID_BINDINGS: string = `[fadeDuration]="_fadeDuration" [loadingIndicatorSrc]="_loadingIndicatorSrc ? _loadingIndicatorSrc.uri : null"
10-
[progressiveRenderingEnabled]="_progressiveRenderingEnabled" [shouldNotifyLoadEvents]="_shouldNotifyLoadEvents" [src]="_source ? _source.uri: null"`;
10+
[progressiveRenderingEnabled]="_progressiveRenderingEnabled" [shouldNotifyLoadEvents]="_shouldNotifyLoadEvents" [src]="_source ? [{uri: _source.uri}] : null"`;
1111
var IOS_BINDINGS: string = `[blurRadius]="_blurRadius" [capInsets]="_capInsets" [defaultSource]="_defaultSource" [source]="_source"`;
1212

1313
//TODO: add iOS specific events (onError, on Progress) and specific cases (tintColor, resizeMode)
@@ -59,7 +59,7 @@ export class Image extends HighLevelComponent {
5959
/**
6060
* To be documented
6161
*/
62-
set resizeMode(value: string) {this._resizeMode = this.processEnum(value, ['cover', 'contain', 'stretch']);}
62+
set resizeMode(value: string) {this._resizeMode = this.processEnum(value, ['cover', 'contain', 'stretch', 'repeat']);}
6363

6464
/**
6565
* To be documented

src/components/ios/navigator.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {Node} from "../../renderer/node";
99
@Component({
1010
selector: 'NavigatorItem',
1111
inputs: ['instruction'],
12-
template: `<native-navitem [title]="_title" [backButtonTitle]="_backButtonTitle" [leftButtonTitle]="_leftButtonTitle" [rightButtonTitle]="_rightButtonTitle"
12+
template: `<native-navitem [title]="_title" [titleImage]="_titleImage" [backButtonTitle]="_backButtonTitle" [leftButtonTitle]="_leftButtonTitle" [rightButtonTitle]="_rightButtonTitle"
1313
[navigationBarHidden]="navigationBarHidden" [shadowHidden]="shadowHidden" [translucent]="translucent"
1414
[barTintColor]="barTintColor" [tintColor]="tintColor" [titleTextColor]="titleTextColor"
1515
[backButtonIcon]="_backButtonIcon" [leftButtonIcon]="_leftButtonIcon" [rightButtonIcon]="_rightButtonIcon"
@@ -30,6 +30,7 @@ class NavigatorItem extends HighLevelComponent implements AfterViewInit {
3030
@Input() titleTextColor: number;
3131
private _instruction: ComponentInstruction;
3232
private _title: string;
33+
private _titleImage: any;
3334
private _backButtonTitle: string;
3435
private _leftButtonTitle: string;
3536
private _rightButtonTitle: string;
@@ -62,6 +63,7 @@ class NavigatorItem extends HighLevelComponent implements AfterViewInit {
6263
this._instruction = value;
6364
var data = value.routeData.data;
6465
if (data['title']) {this._title = data['title'];}
66+
if (data['titleImage']) {this._titleImage = this.resolveAssetSource(data['titleImage']);}
6567
if (data['backButtonTitle']) {this._backButtonTitle = data['backButtonTitle'];}
6668
if (data['leftButtonTitle']) {this._leftButtonTitle = data['leftButtonTitle'];}
6769
if (data['rightButtonTitle']) {this._rightButtonTitle = data['rightButtonTitle'];}
@@ -101,7 +103,7 @@ class NavigatorItem extends HighLevelComponent implements AfterViewInit {
101103
* A Router's navigation triggers a navigation of the Navigator.
102104
*
103105
* For each route, additional data can be provided as follows:
104-
* {title: string, backButtonIcon: any, backButtonTitle: string, leftButtonIcon: any, leftButtonTitle: string, rightButtonIcon: any, rightButtonTitle: string,
106+
* {title: string, titleImage: any, backButtonIcon: any, backButtonTitle: string, leftButtonIcon: any, leftButtonTitle: string, rightButtonIcon: any, rightButtonTitle: string,
105107
* wrapperStyle: any, navigationBarHidden: boolean, shadowHidden: boolean, tintColor: string, barTintColor: string, titleTextColor: string, translucent: boolean}
106108
*
107109
* ```

src/components/text.ts

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import {Component} from '@angular/core';
22
import {isAndroid} from './../wrapper/wrapper';
33
import {HighLevelComponent, GENERIC_INPUTS, GENERIC_BINDINGS} from "./component";
44

5-
var ANDROID_INPUTS: Array<string> = [];
6-
var IOS_INPUTS: Array<string> = ['allowFontScaling', 'lineBreakMode', 'suppressHighlighting'];
5+
var ANDROID_INPUTS: Array<string> = ['selectable'];
6+
var IOS_INPUTS: Array<string> = ['allowFontScaling', 'suppressHighlighting'];
77

8-
var ANDROID_BINDINGS: string = ``;
9-
var IOS_BINDINGS: string = `[allowFontScaling]="_allowFontScaling" [lineBreakMode]="_lineBreakMode" [suppressHighlighting]="_suppressHighlighting"`;
8+
var ANDROID_BINDINGS: string = `[selectable]="_selectable"`;
9+
var IOS_BINDINGS: string = `[allowFontScaling]="_allowFontScaling" [suppressHighlighting]="_suppressHighlighting"`;
1010

1111
/**
1212
* A component for displaying a text.
@@ -23,32 +23,38 @@ export class Sample {}
2323
@Component({
2424
selector: 'Text',
2525
inputs: [
26-
'numberOfLines'
26+
'lineBreakMode', 'numberOfLines'
2727
].concat(GENERIC_INPUTS).concat(isAndroid() ? ANDROID_INPUTS : IOS_INPUTS),
28-
template: `<native-text [numberOfLines]="_numberOfLines"
28+
template: `<native-text [lineBreakMode]="_lineBreakMode" [numberOfLines]="_numberOfLines"
2929
${GENERIC_BINDINGS} ${isAndroid() ? ANDROID_BINDINGS : IOS_BINDINGS}><ng-content></ng-content></native-text>`
3030
})
3131
export class Text extends HighLevelComponent{
3232
//Properties
33+
private _lineBreakMode: string;
3334
private _numberOfLines: number;
35+
/**
36+
* To be documented
37+
*/
38+
set lineBreakMode(value: any) { this._lineBreakMode = this.processEnum(value, ['tail', 'head', 'middle', 'clip']); }
3439
/**
3540
* To be documented
3641
*/
3742
set numberOfLines(value: any) {this._numberOfLines = this.processNumber(value);}
3843

39-
private _allowFontScaling: boolean;
40-
private _lineBreakMode: string;
41-
private _suppressHighlighting: boolean;
44+
private _selectable: boolean;
4245
/**
4346
* To be documented
44-
* @platform ios
47+
* @platform android
4548
*/
46-
set allowFontScaling(value: any) {this._allowFontScaling = this.processBoolean(value);}
49+
set selectable(value: any) {this._selectable = this.processBoolean(value);}
50+
51+
private _allowFontScaling: boolean;
52+
private _suppressHighlighting: boolean;
4753
/**
4854
* To be documented
4955
* @platform ios
5056
*/
51-
set lineBreakMode(value: any) { this._lineBreakMode = this.processEnum(value, ['clipping', 'word-wrapping', 'char-wrapping', 'truncating-head', 'truncating-middle', 'truncating-tail']); }
57+
set allowFontScaling(value: any) {this._allowFontScaling = this.processBoolean(value);}
5258
/**
5359
* To be documented
5460
* @platform ios

src/components/textinput.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ export class Sample {
3636
'autoFocus', 'value',
3737
//Native
3838
'autoCapitalize', 'autoCorrect', 'blurOnSubmit', 'editable', 'keyboardType', 'maxLength', 'multiline',
39-
'password', 'placeholder', 'placeholderTextColor', 'returnKeyType', 'selectionColor', 'selectTextOnFocus'
39+
'placeholder', 'placeholderTextColor', 'returnKeyType', 'secureTextEntry', 'selectionColor', 'selectTextOnFocus'
4040
].concat(GENERIC_INPUTS).concat(isAndroid() ? ANDROID_INPUTS : IOS_INPUTS),
4141
template: `<native-textinput [text]="_nativeValue" [autoCapitalize]="_autoCapitalize" [autoCorrect]="_autoCorrect" [blurOnSubmit]="_blurOnSubmit" [editable]="_editable" [keyboardType]="_keyboardType"
42-
[maxLength]="_maxLength" [multiline]="_multiline" [password]="_password" [placeholder]="_placeholder" [placeholderTextColor]="_placeholderTextColor"
42+
[maxLength]="_maxLength" [multiline]="_multiline" [placeholder]="_placeholder" [placeholderTextColor]="_placeholderTextColor" [secureTextEntry]="_secureTextEntry"
4343
[returnKeyType]="_returnKeyType" [selectionColor]="_selectionColor" [selectTextOnFocus]="_selectTextOnFocus"
4444
(tap)="focusTextInput()" (topFocus)="_handleFocus()" (topChange)="_handleChange($event)" (topSubmitEditing)="_handleSubmitEditing($event)"
4545
(topBlur)="_handleBlur()" (topEndEditing)="_handleEndEditing($event)" ${GENERIC_BINDINGS} ${isAndroid() ? ANDROID_BINDINGS : IOS_BINDINGS}></native-textinput>`
@@ -105,10 +105,10 @@ export class TextInput extends HighLevelComponent implements OnInit {
105105
private _keyboardType: string;
106106
private _maxLength: number;
107107
private _multiline: boolean;
108-
private _password: boolean;
109108
private _placeholder: string;
110109
private _placeholderTextColor: number;
111110
private _returnKeyType: string;
111+
private _secureTextEntry: boolean;
112112
private _selectionColor: number;
113113
private _selectTextOnFocus: boolean;
114114
/**
@@ -139,10 +139,6 @@ export class TextInput extends HighLevelComponent implements OnInit {
139139
* To be documented
140140
*/
141141
set multiline(value: any) {this._multiline = this.processBoolean(value);}
142-
/**
143-
* To be documented
144-
*/
145-
set password(value: any) {this._password = this.processBoolean(value);}
146142
/**
147143
* To be documented
148144
*/
@@ -161,6 +157,10 @@ export class TextInput extends HighLevelComponent implements OnInit {
161157
* 'default', 'emergency-call', 'google', 'join', 'route', 'yahoo'
162158
*/
163159
set returnKeyType(value: string) {this._returnKeyType = this.processEnum(value, ['done', 'go', 'next', 'search', 'send', 'none', 'previous', 'default', 'emergency-call', 'google', 'join', 'route', 'yahoo']);}
160+
/**
161+
* To be documented
162+
*/
163+
set secureTextEntry(value: any) {this._secureTextEntry = this.processBoolean(value);}
164164
/**
165165
* To be documented
166166
*/

test/components/image_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('Image component', () => {
3232
fixture.detectChanges();
3333
rootRenderer.executeCommands();
3434
expect(mock.commandLogs.toString()).toEqual(
35-
'CREATE+2+test-cmp+{},CREATE+3+native-image+{"loadingIndicatorSrc":null,"src":"icon.png"},ATTACH+1+2+0,ATTACH+2+3+0');
35+
'CREATE+2+test-cmp+{},CREATE+3+native-image+{"loadingIndicatorSrc":null,"src":[{"uri":"icon.png"}]},ATTACH+1+2+0,ATTACH+2+3+0');
3636
});
3737
})));
3838

0 commit comments

Comments
 (0)