diff --git a/CHANGELOG.md b/CHANGELOG.md
index b6a67121d..ac1f29fef 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,29 @@
-Cross Platform Modules Changelog
-==============================
+
+## [5.0.3](https://github.com/NativeScript/NativeScript/compare/5.0.2...5.0.3) (2018-11-20)
+
+
+### Bug Fixes
+
+* crash on Android Tab-View [#6466](https://github.com/NativeScript/NativeScript/issues/6466) ([#6467](https://github.com/NativeScript/NativeScript/issues/6467)) ([db33cf3](https://github.com/NativeScript/NativeScript/commit/db33cf3)), closes [ac04ede#diff-f1459d509d1432b432c29bcd30e462fbL97](https://github.com/ac04ede/issues/diff-f1459d509d1432b432c29bcd30e462fbL97)
+* doc of transitionAndroid property of NavigationEntry interface ([#6563](https://github.com/NativeScript/NativeScript/issues/6563)) ([efe3318](https://github.com/NativeScript/NativeScript/commit/efe3318))
+* layoutChanged event in landscape ([#6520](https://github.com/NativeScript/NativeScript/issues/6520)) ([7fbdc7a](https://github.com/NativeScript/NativeScript/commit/7fbdc7a))
+* nested frames order with tabs & suspend/resume ([#6528](https://github.com/NativeScript/NativeScript/issues/6528)) ([7df8038](https://github.com/NativeScript/NativeScript/commit/7df8038))
+* Resolve incorrect name of listener when unsubscribing ([#6487](https://github.com/NativeScript/NativeScript/issues/6487)) ([af5eb73](https://github.com/NativeScript/NativeScript/commit/af5eb73))
+* Resolve incorrect name of listener when unsubscribing ([#6487](https://github.com/NativeScript/NativeScript/issues/6487)) ([2933a9a](https://github.com/NativeScript/NativeScript/commit/2933a9a))
+* **image:** uncaught error in promise with image handling ([#6453](https://github.com/NativeScript/NativeScript/issues/6453)) ([950fdcf](https://github.com/NativeScript/NativeScript/commit/950fdcf))
+* **android:** back navigation on app suspend/resume ([#6489](https://github.com/NativeScript/NativeScript/issues/6489)) ([999e378](https://github.com/NativeScript/NativeScript/commit/999e378))
+* **android:** back navigation on app suspend/resume ([#6489](https://github.com/NativeScript/NativeScript/issues/6489)) ([fac970e](https://github.com/NativeScript/NativeScript/commit/fac970e))
+* **android:** IllegalStateException with tabview&nested frames ([#6495](https://github.com/NativeScript/NativeScript/issues/6495)) ([7d21b5c](https://github.com/NativeScript/NativeScript/commit/7d21b5c))
+* **android:** IllegalStateException with tabview&nested frames ([#6495](https://github.com/NativeScript/NativeScript/issues/6495)) ([41ba93d](https://github.com/NativeScript/NativeScript/commit/41ba93d))
+* **ios:** safe area handling in scrollview ([#6561](https://github.com/NativeScript/NativeScript/issues/6561)) ([51a191f](https://github.com/NativeScript/NativeScript/commit/51a191f))
+* **ios:** scrollview safe area when no scroll ([#6568](https://github.com/NativeScript/NativeScript/issues/6568)) ([f90995f](https://github.com/NativeScript/NativeScript/commit/f90995f))
+
+
+### Features
+
+* add number and phone input types for prompt dialog ([#6365](https://github.com/NativeScript/NativeScript/issues/6365)) ([7e7c050](https://github.com/NativeScript/NativeScript/commit/7e7c050))
+
+
## [5.0.2](https://github.com/NativeScript/NativeScript/compare/5.0.1...5.0.2) (2018-11-07)
diff --git a/apps/app/ui-tests-app/dialogs/dialogs.xml b/apps/app/ui-tests-app/dialogs/dialogs.xml
index b8a68129d..0ada85f9b 100644
--- a/apps/app/ui-tests-app/dialogs/dialogs.xml
+++ b/apps/app/ui-tests-app/dialogs/dialogs.xml
@@ -7,7 +7,9 @@
-
+
+
+
diff --git a/apps/app/ui-tests-app/dialogs/view-model.ts b/apps/app/ui-tests-app/dialogs/view-model.ts
index 2d5e81646..398275200 100644
--- a/apps/app/ui-tests-app/dialogs/view-model.ts
+++ b/apps/app/ui-tests-app/dialogs/view-model.ts
@@ -138,6 +138,46 @@ export class SettingsViewModel extends observable.Observable {
});
}
+ public promptNumber(args: observable.EventData) {
+ dialogs.prompt({
+ title: "Name",
+ message: "Enter a number:",
+ cancelButtonText: "Cancel",
+ neutralButtonText: "Ignore",
+ okButtonText: "OK",
+ defaultText: "1234",
+ inputType: dialogs.inputType.number
+ }).then((promptResult) => {
+ console.log("### Result: " + promptResult.result + ", Text: " + promptResult.text);
+ if (promptResult.result) {
+ this.set("name", promptResult.text);
+ }
+ else {
+ this.set("name", "1234");
+ }
+ });
+ }
+
+ public promptPhone(args: observable.EventData) {
+ dialogs.prompt({
+ title: "Name",
+ message: "Enter a phone:",
+ cancelButtonText: "Cancel",
+ neutralButtonText: "Ignore",
+ okButtonText: "OK",
+ defaultText: "1234",
+ inputType: dialogs.inputType.phone
+ }).then((promptResult) => {
+ console.log("### Result: " + promptResult.result + ", Text: " + promptResult.text);
+ if (promptResult.result) {
+ this.set("name", promptResult.text);
+ }
+ else {
+ this.set("name", "1234");
+ }
+ });
+ }
+
public promptCapitalizationNone(args: observable.EventData) {
dialogs.prompt({
title: "Name",
diff --git a/apps/app/ui-tests-app/issues/issue-6439.css b/apps/app/ui-tests-app/issues/issue-6439.css
new file mode 100644
index 000000000..95f4f5a0d
--- /dev/null
+++ b/apps/app/ui-tests-app/issues/issue-6439.css
@@ -0,0 +1,8 @@
+.hr-light {
+ height: 1;
+ background-color: gray;
+}
+
+.title {
+ height: 200;
+}
\ No newline at end of file
diff --git a/apps/app/ui-tests-app/issues/issue-6439.xml b/apps/app/ui-tests-app/issues/issue-6439.xml
new file mode 100644
index 000000000..c59847062
--- /dev/null
+++ b/apps/app/ui-tests-app/issues/issue-6439.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/app/ui-tests-app/issues/issue-ng-repo-1599.css b/apps/app/ui-tests-app/issues/issue-ng-repo-1599.css
new file mode 100644
index 000000000..421162395
--- /dev/null
+++ b/apps/app/ui-tests-app/issues/issue-ng-repo-1599.css
@@ -0,0 +1,35 @@
+.page {
+ padding: 20;
+}
+
+.title {
+ font-weight: bold;
+}
+
+.list-items {
+ border-radius: 10;
+ background-repeat: no-repeat;
+ background-size: cover;
+ background-position: center top;
+ background-color: black;
+ margin-top: 20;
+}
+
+.item-title {
+ color: white;
+ vertical-align: bottom;
+ font-size: 30;
+ padding: 180 20 20;
+ font-weight: 600;
+}
+
+.list-item__row {
+ padding-left: 20;
+}
+
+.list-item {
+ border-radius: 4;
+ background-color: white;
+ margin: 0 10 20 0;
+ padding: 5 10;
+}
\ No newline at end of file
diff --git a/apps/app/ui-tests-app/issues/issue-ng-repo-1599.xml b/apps/app/ui-tests-app/issues/issue-ng-repo-1599.xml
new file mode 100644
index 000000000..88d363d5d
--- /dev/null
+++ b/apps/app/ui-tests-app/issues/issue-ng-repo-1599.xml
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/app/ui-tests-app/issues/main-page.ts b/apps/app/ui-tests-app/issues/main-page.ts
index fa2dec103..82f8ee5fc 100644
--- a/apps/app/ui-tests-app/issues/main-page.ts
+++ b/apps/app/ui-tests-app/issues/main-page.ts
@@ -27,6 +27,8 @@ export function loadExamples() {
examples.set("3354-ios", "issues/issue-3354");
examples.set("4450", "issues/issue-4450");
examples.set("5274", "issues/issue-5274");
+ examples.set("ng-repo-1599", "issues/issue-ng-repo-1599");
+ examples.set("6439", "issues/issue-6439");
return examples;
}
\ No newline at end of file
diff --git a/apps/app/ui-tests-app/scroll-view/safe-area-root-element.xml b/apps/app/ui-tests-app/scroll-view/safe-area-root-element.xml
index 0d63dc6c6..668c51055 100644
--- a/apps/app/ui-tests-app/scroll-view/safe-area-root-element.xml
+++ b/apps/app/ui-tests-app/scroll-view/safe-area-root-element.xml
@@ -6,7 +6,7 @@
-
+
diff --git a/apps/app/ui-tests-app/scroll-view/safe-area-sub-element.xml b/apps/app/ui-tests-app/scroll-view/safe-area-sub-element.xml
index febf79f0e..3d4b43732 100644
--- a/apps/app/ui-tests-app/scroll-view/safe-area-sub-element.xml
+++ b/apps/app/ui-tests-app/scroll-view/safe-area-sub-element.xml
@@ -6,8 +6,8 @@
-
-
+
+
diff --git a/apps/package.json b/apps/package.json
index 70c68f984..a548304ff 100644
--- a/apps/package.json
+++ b/apps/package.json
@@ -20,8 +20,8 @@
"babel-types": "6.11.1",
"babylon": "6.8.3",
"lazy": "1.0.11",
- "nativescript-dev-typescript": "^0.7.1",
+ "nativescript-dev-typescript": "next",
"tns-platform-declarations": "*",
- "typescript": "^2.7.2"
+ "typescript": "^3.1.6"
}
}
\ No newline at end of file
diff --git a/e2e/modal-navigation/package.json b/e2e/modal-navigation/package.json
index 884821c9d..adb4a0f50 100644
--- a/e2e/modal-navigation/package.json
+++ b/e2e/modal-navigation/package.json
@@ -27,7 +27,7 @@
"nativescript-dev-typescript": "next",
"nativescript-dev-webpack": "next",
"rimraf": "^2.6.2",
- "typescript": "^3.1.1"
+ "typescript": "^3.1.6"
},
"scripts": {
"e2e": "npm run clean-e2e && tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",
diff --git a/package.json b/package.json
index 00090b12b..cbd61d119 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,7 @@
"tslint": "^5.4.3",
"typedoc": "^0.5.10",
"typedoc-plugin-external-module-name": "git://github.com/PanayotCankov/typedoc-plugin-external-module-name.git#with-js",
- "typescript": "^2.6.1"
+ "typescript": "^3.1.6"
},
"scripts": {
"setup": "npm run dev-link-tns-platform-declarations && npm run dev-link-tns-core-modules && npm run dev-link-tests && npm run dev-link-apps && npm run dev-link-e2e-modal",
diff --git a/tests/app/testRunner.ts b/tests/app/testRunner.ts
index f6c9982ca..a119642a0 100644
--- a/tests/app/testRunner.ts
+++ b/tests/app/testRunner.ts
@@ -136,11 +136,15 @@ allTests["FLEXBOXLAYOUT"] = flexBoxLayoutTests;
import * as safeAreaLayoutTests from "./ui/layouts/safe-area-tests";
import * as safeAreaListViewtTests from "./ui/list-view/list-view-safe-area-tests";
import * as scrollViewSafeAreaTests from "./ui/scroll-view/scroll-view-safe-area-tests";
+import * as repeaterSafeAreaTests from "./ui/repeater/repeater-safe-area-tests";
+import * as webViewSafeAreaTests from "./ui/web-view/web-view-safe-area-tests";
if (platform.isIOS && ios.MajorVersion > 10) {
allTests["SAFEAREALAYOUT"] = safeAreaLayoutTests;
allTests["SAFEAREA-LISTVIEW"] = safeAreaListViewtTests;
allTests["SAFEAREA-SCROLL-VIEW"] = scrollViewSafeAreaTests;
+ allTests["SAFEAREA-REPEATER"] = repeaterSafeAreaTests;
+ allTests["SAFEAREA-WEBVIEW"] = webViewSafeAreaTests;
}
import * as stylePropertiesTests from "./ui/styling/style-properties-tests";
diff --git a/tests/app/ui/helper.ts b/tests/app/ui/helper.ts
index 5d3c4ff81..0f8509712 100644
--- a/tests/app/ui/helper.ts
+++ b/tests/app/ui/helper.ts
@@ -209,8 +209,8 @@ export function waitUntilNavigatedTo(page: Page, action: Function) {
TKUnit.waitUntilReady(() => completed, 5);
}
-export function waitUntilNavigatedFrom(action: Function) {
- const currentPage = frame.topmost().currentPage;
+export function waitUntilNavigatedFrom(action: Function, topFrame?: frame.Frame) {
+ const currentPage = topFrame ? topFrame.currentPage : frame.topmost().currentPage;
let completed = false;
function navigatedFrom(args) {
args.object.page.off("navigatedFrom", navigatedFrom);
@@ -226,19 +226,19 @@ export function waitUntilLayoutReady(view: View): void {
TKUnit.waitUntilReady(() => view.isLayoutValid);
}
-export function navigateWithEntry(entry: frame.NavigationEntry): Page {
+export function navigateWithEntry(entry: frame.NavigationEntry, topFrame?: frame.Frame): Page {
const page = createViewFromEntry(entry) as Page;
entry.moduleName = null;
entry.create = function () {
return page;
};
- waitUntilNavigatedFrom(() => frame.topmost().navigate(entry));
+ waitUntilNavigatedFrom(() => topFrame ? topFrame.navigate(entry) : frame.topmost().navigate(entry));
return page;
}
-export function goBack() {
- waitUntilNavigatedFrom(() => frame.topmost().goBack());
+export function goBack(topFrame?: frame.Frame) {
+ waitUntilNavigatedFrom(() => topFrame ? topFrame.goBack() : frame.topmost().goBack());
}
export function assertAreClose(actual: number, expected: number, message: string): void {
diff --git a/tests/app/ui/layouts/safe-area-tests.ts b/tests/app/ui/layouts/safe-area-tests.ts
index ec6e7aeca..befc69138 100644
--- a/tests/app/ui/layouts/safe-area-tests.ts
+++ b/tests/app/ui/layouts/safe-area-tests.ts
@@ -6,6 +6,8 @@ import * as platform from "tns-core-modules/platform";
import { ios as iosUtils } from "tns-core-modules/utils/utils";
import * as helper from "../helper";
import { parse } from "tns-core-modules/ui/builder";
+import { Page } from "tns-core-modules/ui/page";
+import { Label } from "tns-core-modules/ui/label";
import {
dipToDp, left, top, right, bottom, height, width,
equal, closeEnough, lessOrCloseEnough, greaterOrCloseEnough, check,
@@ -37,6 +39,30 @@ export class SafeAreaTests extends testModule.UITest {
// no operation
};
+ public test_layout_changed_event_count() {
+ const page = parse(`
+
+
+
+
+
+ `);
+ let gridLayoutChangedCounter = 0;
+ let labelLayoutChangedCounter = 0;
+ const grid = page.getViewById("grid");
+ grid.on(view.View.layoutChangedEvent, () => {
+ gridLayoutChangedCounter++;
+ });
+ const label =