@frui.ts/screens
Advanced tools
Comparing version 0.15.0-beta.6 to 0.15.0-rc.1
@@ -7,2 +7,3 @@ import { ParseOptions } from "query-string"; | ||
private rootViewModel?; | ||
private lastActiveScreen?; | ||
parseOptions?: ParseOptions; | ||
@@ -9,0 +10,0 @@ start(rootViewModel: ICanNavigate): Promise<void>; |
@@ -80,2 +80,3 @@ "use strict"; | ||
UrlNavigationAdapter.prototype.updateUrl = function (screen) { | ||
var _a; | ||
if (this.rootViewModel) { | ||
@@ -85,3 +86,3 @@ var path = screen.getNavigationPath(); | ||
if (window.location.hash !== url) { | ||
if (url.startsWith(window.location.hash)) { | ||
if (((_a = this.lastActiveScreen) === null || _a === void 0 ? void 0 : _a.childReplacesNavigationPath) && url.startsWith(window.location.hash)) { | ||
window.history.replaceState(null, screen.name, url); | ||
@@ -94,2 +95,3 @@ } | ||
} | ||
this.lastActiveScreen = screen; | ||
}; | ||
@@ -96,0 +98,0 @@ UrlNavigationAdapter.prototype.onUrlChanged = function () { |
@@ -7,2 +7,3 @@ import { IObservableArray } from "mobx"; | ||
constructor(); | ||
get childReplacesNavigationPath(): boolean; | ||
canDeactivate(isClosing: boolean): Promise<boolean>; | ||
@@ -9,0 +10,0 @@ protected deactivateChild(child: TChild | undefined, isClosing: boolean): Promise<void>; |
@@ -87,2 +87,9 @@ "use strict"; | ||
} | ||
Object.defineProperty(ConductorOneChildActive.prototype, "childReplacesNavigationPath", { | ||
get: function () { | ||
return true; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
ConductorOneChildActive.prototype.canDeactivate = function (isClosing) { | ||
@@ -89,0 +96,0 @@ return __awaiter(this, void 0, void 0, function () { |
@@ -28,2 +28,3 @@ import { NavigationPath } from "../navigation/navigationPath"; | ||
protected onDeactivate(isClosing: boolean): Promise<any> | void; | ||
get childReplacesNavigationPath(): boolean; | ||
protected get canBeNavigationActiveScreen(): boolean; | ||
@@ -30,0 +31,0 @@ protected notifyNavigationChanged(): void; |
@@ -180,5 +180,12 @@ "use strict"; | ||
ScreenBase.prototype.onDeactivate = function (isClosing) { }; | ||
Object.defineProperty(ScreenBase.prototype, "childReplacesNavigationPath", { | ||
get: function () { | ||
return false; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(ScreenBase.prototype, "canBeNavigationActiveScreen", { | ||
get: function () { | ||
return true; | ||
return !!this.navigationName; | ||
}, | ||
@@ -185,0 +192,0 @@ enumerable: true, |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.15.0-beta.6", | ||
"version": "0.15.0-rc.1", | ||
"description": "Frui.ts core classes for application structure and navigation", | ||
@@ -38,3 +38,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@frui.ts/helpers": "^0.15.0-beta.6", | ||
"@frui.ts/helpers": "^0.15.0-rc.1", | ||
"query-string": "^6.9.0", | ||
@@ -49,3 +49,3 @@ "route-parser": "^0.0.5" | ||
}, | ||
"gitHead": "80cf5a737f5eb5403a155fd4a2e2f36d81c50264" | ||
"gitHead": "94f63f6550f4893c2bbf0ca038560fb2f4b6f2aa" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
159729
1937