@frui.ts/screens
Advanced tools
Comparing version 0.16.0-beta.8 to 0.16.0-beta.9
@@ -21,3 +21,4 @@ import { IScreen } from "../structure/types"; | ||
static getChildUrlFactory<TChild extends IScreen = IScreen>(parent: ICanNavigate & INavigationParent<TChild>, defaultParams?: any): (child: string | number | TChild, childParams?: any) => string; | ||
static getScreenUrl(screen: ICanNavigate, query?: any): string; | ||
} | ||
export {}; |
@@ -151,2 +151,7 @@ "use strict"; | ||
}; | ||
Router.getScreenUrl = function (screen, query) { | ||
var screenPath = screen.getNavigationPath(); | ||
var url = screenPath.path ? navigationPath_1.appendQueryString(screenPath.path, query !== null && query !== void 0 ? query : screenPath.params) : undefined; | ||
return navigationConfiguration_1.default.hashPrefix + url; | ||
}; | ||
Router.Self = types_1.SelfLink; | ||
@@ -153,0 +158,0 @@ return Router; |
@@ -105,9 +105,15 @@ "use strict"; | ||
hash = window.location.hash; | ||
if (!(hash && hash.startsWith(navigationConfiguration_1.default.hashPrefix))) return [3, 2]; | ||
if (!!hash) return [3, 2]; | ||
return [4, this.navigate(undefined, undefined)]; | ||
case 1: | ||
_a.sent(); | ||
return [3, 4]; | ||
case 2: | ||
if (!hash.startsWith(navigationConfiguration_1.default.hashPrefix)) return [3, 4]; | ||
path = query_string_1.parseUrl(hash.substr(navigationConfiguration_1.default.hashPrefix.length), this.parseOptions); | ||
return [4, this.navigate(path.url, path.query)]; | ||
case 1: | ||
case 3: | ||
_a.sent(); | ||
_a.label = 2; | ||
case 2: return [2]; | ||
_a.label = 4; | ||
case 4: return [2]; | ||
} | ||
@@ -114,0 +120,0 @@ }); |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.16.0-beta.8", | ||
"version": "0.16.0-beta.9", | ||
"description": "Frui.ts core classes for application structure and navigation", | ||
@@ -38,3 +38,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@frui.ts/helpers": "^0.16.0-beta.8", | ||
"@frui.ts/helpers": "^0.16.0-beta.9", | ||
"query-string": "^6.9.0", | ||
@@ -49,3 +49,3 @@ "route-parser": "^0.0.5" | ||
}, | ||
"gitHead": "3929260426de2cfac52d07c93a6cfa02aa3a2f7a" | ||
"gitHead": "11f682f07f90f920a737421f8d542ae8eab208c2" | ||
} |
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
171174
2054