simple-boot-core
Advanced tools
Comparing version 1.0.17 to 1.0.18
{ | ||
"name": "simple-boot-core", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"main": "SimpleApplication.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
import { Intent } from 'intent/Intent'; | ||
import { ConstructorType } from 'types/Types'; | ||
export interface RouterAction { | ||
canActivate(url: Intent, module: ConstructorType<object>): void; | ||
canActivate(url: Intent, module: any): void; | ||
} |
@@ -85,19 +85,21 @@ "use strict"; | ||
var routerConfig = router.getConfig(SimDecorator_1.RouterMetadataKey); | ||
var routerStrings = parentRouters.slice(1).map(function (it) { var _a; return ((_a = it.getConfig(SimDecorator_1.RouterMetadataKey)) === null || _a === void 0 ? void 0 : _a.path) || ''; }); | ||
var isRoot = this.isRootUrl(routerConfig.path, routerStrings, path); | ||
if (isRoot) { | ||
parentRouters.push(router); | ||
var module_1 = this.findRouting(router, routerConfig, routerStrings, intent); | ||
if (module_1 === null || module_1 === void 0 ? void 0 : module_1.module) { | ||
return module_1; | ||
} | ||
else if (routerConfig.childRouters && routerConfig.childRouters.length > 0) { | ||
for (var _i = 0, _a = routerConfig.childRouters; _i < _a.length; _i++) { | ||
var child = _a[_i]; | ||
var routerAtomic = new SimAtomic_1.SimAtomic(child); | ||
var rootRouterData = routerAtomic.getConfig(SimDecorator_1.RouterMetadataKey); | ||
var router_1 = routerAtomic.value; | ||
var executeModule = this.getExecuteModule(routerAtomic, intent, parentRouters); | ||
if (router_1 && executeModule) { | ||
return executeModule; | ||
if (routerConfig) { | ||
var routerStrings = parentRouters.slice(1).map(function (it) { var _a; return ((_a = it.getConfig(SimDecorator_1.RouterMetadataKey)) === null || _a === void 0 ? void 0 : _a.path) || ''; }); | ||
var isRoot = this.isRootUrl(routerConfig.path, routerStrings, path); | ||
if (isRoot) { | ||
parentRouters.push(router); | ||
var module_1 = this.findRouting(router, routerConfig, routerStrings, intent); | ||
if (module_1 === null || module_1 === void 0 ? void 0 : module_1.module) { | ||
return module_1; | ||
} | ||
else if (routerConfig.childRouters && routerConfig.childRouters.length > 0) { | ||
for (var _i = 0, _a = routerConfig.childRouters; _i < _a.length; _i++) { | ||
var child = _a[_i]; | ||
var routerAtomic = new SimAtomic_1.SimAtomic(child); | ||
var rootRouterData = routerAtomic.getConfig(SimDecorator_1.RouterMetadataKey); | ||
var router_1 = routerAtomic.value; | ||
var executeModule = this.getExecuteModule(routerAtomic, intent, parentRouters); | ||
if (router_1 && executeModule) { | ||
return executeModule; | ||
} | ||
} | ||
@@ -104,0 +106,0 @@ } |
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
71345
1634