Skip to content

Commit f6d5580

Browse files
authored
Merge branch 'master' into djenkov/e2e-reset-root
2 parents 97dd021 + bdd9ece commit f6d5580

File tree

12 files changed

+146
-157
lines changed

12 files changed

+146
-157
lines changed

Diff for: .gitignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ ng-sample/app/**/*.js
2929

3030
# Webpack configuration files
3131
webpack.config.js
32-
vendor.ts
33-
vendor-platform.android.ts
34-
vendor-platform.ios.ts
32+
tsconfig.esm.json
3533

3634
# IDEs and editors
3735
/.idea

Diff for: CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
<a name="6.0.6"></a>
2+
## [6.0.6](https://github.com/NativeScript/nativescript-angular/compare/6.0.0...6.0.6) (2018-06-22)
3+
4+
> IMPORTANT! You should use this version with @angular/* v6.0.6 and up.
5+
6+
### Bug Fixes
7+
8+
* clean up properly shared modal page router outlets ([#1360](https://github.com/NativeScript/nativescript-angular/issues/1360)) ([3332ca2](https://github.com/NativeScript/nativescript-angular/commit/3332ca2))
9+
* **animations:** inject document object in the animation engine ([#1395](https://github.com/NativeScript/nativescript-angular/issues/1395)) ([379e958](https://github.com/NativeScript/nativescript-angular/commit/379e958)), closes [#1393](https://github.com/NativeScript/nativescript-angular/issues/1393)
10+
* **modal:** lower isModalNavigation flag when closing modal ([#1378](https://github.com/NativeScript/nativescript-angular/issues/1378)) ([6ab1cac](https://github.com/NativeScript/nativescript-angular/commit/6ab1cac))
11+
12+
113
<a name="6.0.0"></a>
214
# [6.0.0](https://github.com/NativeScript/nativescript-angular/compare/5.3.0...6.0.0) (2018-05-30)
315

Diff for: e2e/renderer/package.json

+12-29
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,26 @@
44
"readme": "NativeScript Application",
55
"repository": "<fill-your-repository-here>",
66
"nativescript": {
7-
"id": "org.nativescript.renderer",
8-
"tns-android": {
9-
"version": "4.1.0-2018.4.13.1"
10-
}
7+
"id": "org.nativescript.renderer"
118
},
129
"dependencies": {
13-
"@angular/common": "~6.0.0-rc.3",
14-
"@angular/compiler": "~6.0.0-rc.3",
15-
"@angular/core": "~6.0.0-rc.3",
16-
"@angular/forms": "~6.0.0-rc.3",
17-
"@angular/http": "~6.0.0-rc.3",
18-
"@angular/platform-browser": "~6.0.0-rc.3",
19-
"@angular/platform-browser-dynamic": "~6.0.0-rc.3",
20-
"@angular/router": "~6.0.0-rc.3",
10+
"@angular/common": "~6.0.6",
11+
"@angular/compiler": "~6.0.6",
12+
"@angular/core": "~6.0.6",
13+
"@angular/forms": "~6.0.6",
14+
"@angular/http": "~6.0.6",
15+
"@angular/platform-browser": "~6.0.6",
16+
"@angular/platform-browser-dynamic": "~6.0.6",
17+
"@angular/router": "~6.0.6",
2118
"nativescript-angular": "file:../../nativescript-angular",
2219
"nativescript-intl": "^3.0.0",
2320
"reflect-metadata": "~0.1.8",
24-
"rxjs": "~6.0.0-rc.1",
21+
"rxjs": "~6.1.0",
2522
"tns-core-modules": "next",
2623
"zone.js": "^0.8.4"
2724
},
2825
"devDependencies": {
29-
"@angular-devkit/core": "~0.5.5",
30-
"@angular/compiler-cli": "~6.0.0-rc.3",
31-
"@ngtools/webpack": "~6.0.0-rc.3",
26+
"@angular/compiler-cli": "~6.1.0-beta.1",
3227
"@types/chai": "^4.0.2",
3328
"@types/mocha": "^2.2.41",
3429
"@types/node": "^7.0.5",
@@ -37,29 +32,17 @@
3732
"babylon": "6.17.4",
3833
"chai": "~4.1.1",
3934
"chai-as-promised": "~7.1.1",
40-
"clean-webpack-plugin": "~0.1.19",
4135
"colors": "^1.1.2",
42-
"copy-webpack-plugin": "~4.5.1",
43-
"css-loader": "~0.28.7",
44-
"extract-text-webpack-plugin": "~3.0.2",
4536
"lazy": "1.0.11",
4637
"mocha": "~3.5.0",
4738
"mocha-junit-reporter": "^1.13.0",
4839
"mocha-multi": "^0.11.0",
4940
"nativescript-dev-appium": "next",
5041
"nativescript-dev-typescript": "~0.7.1",
5142
"nativescript-dev-webpack": "next",
52-
"nativescript-worker-loader": "~0.8.1",
53-
"raw-loader": "~0.5.1",
54-
"resolve-url-loader": "~2.3.0",
5543
"tslib": "^1.7.1",
5644
"typescript": "~2.7.2",
57-
"uglifyjs-webpack-plugin": "~1.2.4",
58-
"webpack": "~4.5.0",
59-
"webpack-bundle-analyzer": "^2.9.1",
60-
"clean-webpack-plugin": "~0.1.19",
61-
"webpack-cli": "~2.0.14",
62-
"webpack-sources": "~1.1.0"
45+
"@angular-devkit/build-angular": "~0.7.0-rc.0"
6346
},
6447
"scripts": {
6548
"e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",

Diff for: e2e/renderer/tsconfig.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
"*": [
1717
"./node_modules/tns-core-modules/*",
1818
"./node_modules/*"
19+
],
20+
"~/*": [
21+
"app/*"
1922
]
2023
}
2124
},
@@ -24,4 +27,4 @@
2427
"platforms",
2528
"e2e"
2629
]
27-
}
30+
}

Diff for: e2e/router/package.json

+15-36
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,28 @@
44
"readme": "NativeScript Application",
55
"repository": "<fill-your-repository-here>",
66
"nativescript": {
7-
"id": "org.nativescript.router",
8-
"tns-android": {
9-
"version": "next"
10-
},
11-
"tns-ios": {
12-
"version": "next"
13-
}
7+
"id": "org.nativescript.router"
148
},
159
"dependencies": {
16-
"@angular/animations": "~6.0.0-rc.3",
17-
"@angular/common": "~6.0.0-rc.3",
18-
"@angular/compiler": "~6.0.0-rc.3",
19-
"@angular/core": "~6.0.0-rc.3",
20-
"@angular/forms": "~6.0.0-rc.3",
21-
"@angular/http": "~6.0.0-rc.3",
22-
"@angular/platform-browser": "~6.0.0-rc.3",
23-
"@angular/platform-browser-dynamic": "~6.0.0-rc.3",
24-
"@angular/router": "~6.0.0-rc.3",
10+
"@angular/animations": "~6.0.6",
11+
"@angular/common": "~6.0.6",
12+
"@angular/compiler": "~6.0.6",
13+
"@angular/core": "~6.0.6",
14+
"@angular/forms": "~6.0.6",
15+
"@angular/http": "~6.0.6",
16+
"@angular/platform-browser": "~6.0.6",
17+
"@angular/platform-browser-dynamic": "~6.0.6",
18+
"@angular/router": "~6.0.6",
2519
"nativescript-angular": "file:../../nativescript-angular",
2620
"nativescript-intl": "^3.0.0",
2721
"reflect-metadata": "~0.1.8",
28-
"rxjs": "~6.0.0-rc.1",
22+
"rxjs": "~6.1.0",
2923
"tns-core-modules": "next",
30-
"zone.js": "^0.8.4"
24+
"zone.js": "^0.8.26"
3125
},
3226
"devDependencies": {
33-
"@angular-devkit/core": "~0.5.5",
34-
"@angular/compiler-cli": "~6.0.0-rc.3",
35-
"@ngtools/webpack": "~6.0.0-rc.3",
27+
"@angular-devkit/build-angular": "~0.7.0-rc.0",
28+
"@angular/compiler-cli": "~6.1.0-beta.1",
3629
"@types/chai": "^4.0.2",
3730
"@types/mocha": "^2.2.41",
3831
"@types/node": "^7.0.5",
@@ -41,30 +34,16 @@
4134
"babylon": "6.17.4",
4235
"chai": "~4.1.1",
4336
"chai-as-promised": "~7.1.1",
44-
"clean-webpack-plugin": "~0.1.19",
4537
"colors": "^1.1.2",
46-
"copy-webpack-plugin": "~4.5.1",
47-
"css-loader": "~0.28.7",
48-
"extract-text-webpack-plugin": "~3.0.2",
4938
"lazy": "1.0.11",
5039
"mocha": "~3.5.0",
5140
"mocha-junit-reporter": "^1.13.0",
5241
"mocha-multi": "^0.11.0",
5342
"nativescript-dev-appium": "next",
5443
"nativescript-dev-typescript": "~0.4.0",
5544
"nativescript-dev-webpack": "next",
56-
"nativescript-worker-loader": "~0.8.1",
57-
"raw-loader": "~0.5.1",
58-
"resolve-url-loader": "~2.3.0",
5945
"tslib": "^1.7.1",
60-
"typescript": "~2.7.2",
61-
"uglifyjs-webpack-plugin": "~1.2.4",
62-
"webpack": "~4.5.0",
63-
"webpack-bundle-analyzer": "^2.9.1",
64-
"webpack-sources": "~1.1.0",
65-
"webpack-cli": "~2.0.14",
66-
"webpack-sources": "~1.1.0",
67-
"clean-webpack-plugin": "~0.1.19"
46+
"typescript": "~2.7.2"
6847
},
6948
"scripts": {
7049
"e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",

Diff for: nativescript-angular/animations/animations.module.ts

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
import { NgModule, Injectable, NgZone, Provider, RendererFactory2, Optional, SkipSelf } from "@angular/core";
2-
1+
import {
2+
NgModule,
3+
Injectable,
4+
Inject,
5+
NgZone,
6+
Provider,
7+
RendererFactory2,
8+
Optional,
9+
SkipSelf,
10+
} from "@angular/core";
11+
import { DOCUMENT } from "@angular/common";
312
import { AnimationBuilder } from "@angular/animations";
413

514
import {
@@ -21,8 +30,8 @@ import { throwIfAlreadyLoaded } from "../common/utils";
2130

2231
@Injectable()
2332
export class InjectableAnimationEngine extends AnimationEngine {
24-
constructor(driver: AnimationDriver, normalizer: AnimationStyleNormalizer) {
25-
super(driver, normalizer);
33+
constructor(@Inject(DOCUMENT) doc: any, driver: AnimationDriver, normalizer: AnimationStyleNormalizer) {
34+
super(doc.body, driver, normalizer);
2635
}
2736
}
2837

Diff for: nativescript-angular/directives/tab-view.ts

+51-40
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ import { InvisibleNode } from "../element-registry";
1414
import { rendererLog } from "../trace";
1515
import { isBlank } from "../lang-facade";
1616

17+
export interface TabViewItemDef {
18+
title?: string;
19+
iconSource?: string;
20+
textTransform?: TextTransform;
21+
}
22+
1723
@Directive({
1824
selector: "TabView", // tslint:disable-line:directive-selector
1925
})
@@ -52,9 +58,7 @@ export class TabViewDirective implements AfterViewInit {
5258
})
5359
export class TabViewItemDirective implements OnInit {
5460
private item: TabViewItem;
55-
private _title: string;
56-
private _iconSource: string;
57-
private _textTransform: TextTransform;
61+
private _config: TabViewItemDef;
5862

5963
constructor(
6064
private owner: TabViewDirective,
@@ -63,46 +67,46 @@ export class TabViewItemDirective implements OnInit {
6367
) {
6468
}
6569

66-
@Input("tabItem") config: any; // tslint:disable-line:no-input-rename
70+
@Input("tabItem")
71+
set config(config: TabViewItemDef) {
72+
if (!this._config
73+
|| this._config.iconSource !== config.iconSource
74+
|| this._config.title !== config.title
75+
|| this._config.textTransform !== config.textTransform) {
76+
this._config = config;
77+
this.applyConfig();
78+
}
79+
}
80+
81+
get config(): TabViewItemDef { // tslint:disable-line:no-input-rename
82+
return this._config || {};
83+
}
6784

6885
@Input()
69-
get title() {
70-
return this._title;
86+
set title(title: string) {
87+
this.config = Object.assign(this.config, { title });
7188
}
7289

73-
set title(value: string) {
74-
if (this._title !== value) {
75-
this._title = value;
76-
this.ensureItem();
77-
this.item.title = this._title;
78-
}
90+
get title() {
91+
return this.config.title;
7992
}
8093

8194
@Input()
82-
get iconSource() {
83-
return this._iconSource;
95+
set iconSource(iconSource: string) {
96+
this.config = Object.assign(this.config, { iconSource });
8497
}
8598

86-
set iconSource(value: string) {
87-
if (this._iconSource !== value) {
88-
this._iconSource = value;
89-
this.ensureItem();
90-
this.item.iconSource = this._iconSource;
91-
}
99+
get iconSource() {
100+
return this.config.iconSource;
92101
}
93102

94-
95103
@Input()
96-
get textTransform() {
97-
return this._textTransform;
104+
set textTransform(textTransform: TextTransform) {
105+
this.config = Object.assign(this.config, { textTransform });
98106
}
99107

100-
set textTransform(value: TextTransform) {
101-
if (this._textTransform && this._textTransform !== value) {
102-
this._textTransform = value;
103-
this.ensureItem();
104-
this.item.textTransform = this._textTransform;
105-
}
108+
get textTransform() {
109+
return this.config.textTransform;
106110
}
107111

108112
private ensureItem() {
@@ -111,19 +115,26 @@ export class TabViewItemDirective implements OnInit {
111115
}
112116
}
113117

114-
ngOnInit() {
118+
private applyConfig() {
115119
this.ensureItem();
116-
if (this.config) {
117-
this.item.title = this._title || this.config.title;
118-
this.item.iconSource = this._iconSource || this.config.iconSource;
119-
120-
// TabViewItem textTransform has a default value for Android that kick in
121-
// only if no value (even a null value) is set.
122-
const textTransformValue = this._textTransform || this.config.textTransform;
123-
if (textTransformValue) {
124-
this.item.textTransform = textTransformValue;
125-
}
120+
121+
if (this.config.title) {
122+
this.item.title = this.config.title;
123+
}
124+
125+
if (this.config.iconSource) {
126+
this.item.iconSource = this.config.iconSource;
127+
}
128+
129+
// TabViewItem textTransform has a default value for Android that kick in
130+
// only if no value (even a null value) is set.
131+
if (this.config.textTransform) {
132+
this.item.textTransform = this.config.textTransform;
126133
}
134+
}
135+
136+
ngOnInit() {
137+
this.applyConfig();
127138

128139
const viewRef = this.viewContainer.createEmbeddedView(this.templateRef);
129140
// Filter out text nodes and comments

0 commit comments

Comments
 (0)