@frui.ts/screens
Advanced tools
Comparing version 0.16.0-beta.5 to 0.16.0-beta.6
@@ -9,5 +9,6 @@ import { IScreen } from "../structure/types"; | ||
start(rootViewModel: ICanNavigate, navigationAdapter?: NavigationRoot): void; | ||
getPath(routeName: RouteName, params?: any): string | false | undefined; | ||
getPath(routeName: RouteName, params?: any): string | undefined; | ||
getUrl(routeName: RouteName, routeParams?: any, queryParams?: any): string; | ||
navigate(routeName: RouteName, routeParams?: any, queryParams?: any): void | Promise<any>; | ||
navigatePath(path: string, queryParams?: any): void | Promise<any>; | ||
dumpRoutes(): { | ||
@@ -14,0 +15,0 @@ name: RouteName; |
@@ -31,2 +31,3 @@ "use strict"; | ||
} | ||
var EMPTY = "EMPTY"; | ||
var Router = (function () { | ||
@@ -46,7 +47,8 @@ function Router() { | ||
if (route) { | ||
return route.reverse(params); | ||
var path = route.reverse(params); | ||
if (path !== false) { | ||
return path === EMPTY ? "" : path; | ||
} | ||
} | ||
else { | ||
return undefined; | ||
} | ||
return undefined; | ||
}; | ||
@@ -59,3 +61,3 @@ Router.prototype.getUrl = function (routeName, routeParams, queryParams) { | ||
var path = this.getPath(routeName, routeParams); | ||
if (path) { | ||
if (path !== undefined) { | ||
return this.navigationRoot.navigate(path, queryParams); | ||
@@ -67,2 +69,5 @@ } | ||
}; | ||
Router.prototype.navigatePath = function (path, queryParams) { | ||
return this.navigationRoot.navigate(path, queryParams); | ||
}; | ||
Router.prototype.dumpRoutes = function () { | ||
@@ -106,3 +111,3 @@ var result = []; | ||
if (routeDefinition.name) { | ||
var route = new route_parser_1.default(path); | ||
var route = new route_parser_1.default(path || EMPTY); | ||
var name_1 = routeDefinition.name === types_1.SelfLink ? key : routeDefinition.name; | ||
@@ -109,0 +114,0 @@ this.routes.set(name_1, route); |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.16.0-beta.5", | ||
"version": "0.16.0-beta.6", | ||
"description": "Frui.ts core classes for application structure and navigation", | ||
@@ -38,3 +38,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@frui.ts/helpers": "^0.16.0-beta.5", | ||
"@frui.ts/helpers": "^0.16.0-beta.6", | ||
"query-string": "^6.9.0", | ||
@@ -49,3 +49,3 @@ "route-parser": "^0.0.5" | ||
}, | ||
"gitHead": "f07b6cb55c7e54f1aa73ca9d29c3935a2e5d0b01" | ||
"gitHead": "041fa41ca3efb6160efdb6b059c07900a8d569d7" | ||
} |
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
169002
2039