chore(router): update config before publishing to npm

This commit is contained in:
vsavkin 2016-06-08 17:00:05 -07:00
parent 66caabca0c
commit f195bb608c
86 changed files with 15 additions and 3425 deletions

View File

@ -2,4 +2,5 @@ node_modules/
dist/
typings/
npm-debug.log
.idea/
.idea/
package

View File

@ -0,0 +1 @@
# Router

View File

@ -1 +0,0 @@
# vladivostok

View File

@ -1,2 +0,0 @@
import { RouterConfig } from './config';
export declare function provideRouter(config: RouterConfig): any[];

View File

@ -1,30 +0,0 @@
import { RouterOutletMap } from './router_outlet_map';
import { UrlSerializer, DefaultUrlSerializer } from './url_serializer';
import { ActivatedRoute } from './router_state';
import { Router } from './router';
import { ComponentResolver, ApplicationRef, Injector } from '@angular/core';
import { LocationStrategy, PathLocationStrategy, Location } from '@angular/common';
export function provideRouter(config) {
return [
Location,
{ provide: LocationStrategy, useClass: PathLocationStrategy },
{ provide: UrlSerializer, useClass: DefaultUrlSerializer },
{
provide: Router,
useFactory: (ref, resolver, urlSerializer, outletMap, location, injector) => {
if (ref.componentTypes.length == 0) {
throw new Error("Bootstrap at least one component before injecting Router.");
}
const componentType = ref.componentTypes[0];
const r = new Router(componentType, resolver, urlSerializer, outletMap, location, injector);
r.resetConfig(config);
ref.registerDisposeListener(() => r.dispose());
return r;
},
deps: [ApplicationRef, ComponentResolver, UrlSerializer, RouterOutletMap, Location, Injector]
},
RouterOutletMap,
{ provide: ActivatedRoute, useFactory: (r) => r.routerState.root, deps: [Router] },
];
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uX3JvdXRlcl9wcm92aWRlcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29tbW9uX3JvdXRlcl9wcm92aWRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ik9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxxQkFBcUI7T0FDOUMsRUFBRSxhQUFhLEVBQUUsb0J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biAgICAgICAgfVxuICAgICAgICBjb25zdCBjb21wb25lbnRUeXBlID0gcmVmLmNvbXBvbmVudFR5cGVzWzBdO1xuICAgICAgICBjb25zdCByID0gbmV3IFJvdXRlcihjb21wb25lbnRUeXBlLCByZXNvbHZlciwgdXJsU2VyaWFsaXplciwgb3V0bGV0TWFwLCBsb2NhdGlvbiwgaW5qZWN0b3IpO1xuICAgICAgICByLnJlc2V0Q29uZmlnKGNvbmZpZyk7XG4gICAgICAgIHJlZi5yZWdpc3RlckRpc3Bvc2VMaXN0ZW5lcigoKSA9PiByLmRpc3Bvc2UoKSk7XG4gICAgICAgIHJldHVybiByO1xuICAgICAgfSxcbiAgICAgIGRlcHM6IFtBcHBsaWNhdGlvblJlZiwgQ29tcG9uZW50UmVzb2x2ZXIsIFVybFNlcmlhbGl6ZXIsIFJvdXRlck91dGxldE1hcCwgTG9jYXRpb24sIEluamVjdG9yXVxuICAgIH0sXG5cbiAgICBSb3V0ZXJPdXRsZXRNYXAsXG4gICAge3Byb3ZpZGU6IEFjdGl2YXRlZFJvdXRlLCB1c2VGYWN0b3J5OiAocikgPT4gci5yb3V0ZXJTdGF0ZS5yb290LCBkZXBzOiBbUm91dGVyXX0sXG4gIF07XG59XG4iXX0=

View File

@ -1,11 +0,0 @@
import { Type } from '@angular/core';
export declare type RouterConfig = Route[];
export interface Route {
index?: boolean;
path?: string;
component: Type | string;
outlet?: string;
canActivate?: any[];
canDeactivate?: any[];
children?: Route[];
}

View File

@ -1 +0,0 @@
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVHlwZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5leHBvcnQgdHlwZSBSb3V0ZXJDb25maWcgPSBSb3V0ZVtdO1xuXG5leHBvcnQgaW50ZXJmYWNlIFJvdXRlIHtcbiAgaW5kZXg/OiBib29sZWFuO1xuICBwYXRoPzogc3RyaW5nO1xuICBjb21wb25lbnQ6IFR5cGUgfCBzdHJpbmc7XG4gIG91dGxldD86IHN0cmluZztcbiAgY2FuQWN0aXZhdGU/OiBhbnlbXSxcbiAgY2FuRGVhY3RpdmF0ZT86IGFueVtdLFxuICBjaGlsZHJlbj86IFJvdXRlW107XG59Il19

View File

@ -1,2 +0,0 @@
import { RouterStateSnapshot, RouterState } from './router_state';
export declare function createRouterState(curr: RouterStateSnapshot, prevState: RouterState): RouterState;

File diff suppressed because one or more lines are too long

View File

@ -1,4 +0,0 @@
import { UrlTree } from './url_tree';
import { ActivatedRoute } from './router_state';
import { Params } from './shared';
export declare function createUrlTree(route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParameters: Params | undefined, fragment: string | undefined): UrlTree;

File diff suppressed because one or more lines are too long

View File

@ -1,13 +0,0 @@
import { Router } from '../router';
import { ActivatedRoute } from '../router_state';
export declare class RouterLink {
private router;
private route;
target: string;
private commands;
href: string;
constructor(router: Router, route: ActivatedRoute);
routerLink: any[] | string;
onClick(): boolean;
private updateTargetUrlAndHref();
}

View File

@ -1,65 +0,0 @@
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Directive, HostListener, HostBinding, Input } from '@angular/core';
import { Router } from '../router';
import { ActivatedRoute } from '../router_state';
export let RouterLink = class RouterLink {
constructor(router, route) {
this.router = router;
this.route = route;
this.commands = [];
}
set routerLink(data) {
if (Array.isArray(data)) {
this.commands = data;
}
else {
this.commands = [data];
}
this.updateTargetUrlAndHref();
}
onClick() {
if (!(typeof this.target === "string") || this.target == '_self') {
this.router.navigate(this.commands, { relativeTo: this.route });
return false;
}
return true;
}
updateTargetUrlAndHref() {
const tree = this.router.createUrlTree(this.commands, { relativeTo: this.route });
if (tree) {
this.href = this.router.serializeUrl(tree);
}
}
};
__decorate([
Input(),
__metadata('design:type', String)
], RouterLink.prototype, "target", void 0);
__decorate([
HostBinding(),
__metadata('design:type', String)
], RouterLink.prototype, "href", void 0);
__decorate([
Input(),
__metadata('design:type', Object),
__metadata('design:paramtypes', [Object])
], RouterLink.prototype, "routerLink", null);
__decorate([
HostListener("click"),
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', Boolean)
], RouterLink.prototype, "onClick", null);
RouterLink = __decorate([
Directive({ selector: '[routerLink]' }),
__metadata('design:paramtypes', [Router, ActivatedRoute])
], RouterLink);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX2xpbmsuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvZGlyZWN0aXZlcy9yb3V0ZXJfbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7T0FBTyxFQUNMLFNBQVMsRUFDVCxZQUFZLEVBQ1osV0FBVyxFQUNYLEtBQUssRUFDTixNQUFNLGVBQWU7T0FDZixFQUFDLE1BQU0sRUFBQyxNQUFNLFdBQVc7T0FDekIsRUFBQyxjQUFjLEVBQUMsTUFBTSxpQkFBaUI7QUE0QjlDO0lBVUUsWUFBb0IsTUFBYyxFQUFVLEtBQXFCO1FBQTdDLFdBQU0sR0FBTixNQUF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SB0aGlzLnJvdXRlci5jcmVhdGVVcmxUcmVlKHRoaXMuY29tbWFuZHMsIHtyZWxhdGl2ZVRvOiB0aGlzLnJvdXRlfSk7XG4gICAgaWYgKHRyZWUpIHtcbiAgICAgIHRoaXMuaHJlZiA9IHRoaXMucm91dGVyLnNlcmlhbGl6ZVVybCh0cmVlKTtcbiAgICB9XG4gIH1cbn1cbiJdfQ==

View File

@ -1,12 +0,0 @@
import { ViewContainerRef, ComponentFactory, ResolvedReflectiveProvider } from '@angular/core';
import { RouterOutletMap } from '../router_outlet_map';
export declare class RouterOutlet {
private location;
private activated;
outletMap: RouterOutletMap;
constructor(parentOutletMap: RouterOutletMap, location: ViewContainerRef, name: string);
readonly isActivated: boolean;
readonly component: Object;
deactivate(): void;
activate(factory: ComponentFactory<any>, providers: ResolvedReflectiveProvider[], outletMap: RouterOutletMap): void;
}

View File

@ -1,44 +0,0 @@
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
import { Directive, ViewContainerRef, Attribute, ReflectiveInjector } from '@angular/core';
import { RouterOutletMap } from '../router_outlet_map';
import { PRIMARY_OUTLET } from '../shared';
export let RouterOutlet = class RouterOutlet {
constructor(parentOutletMap, location, name) {
this.location = location;
parentOutletMap.registerOutlet(name ? name : PRIMARY_OUTLET, this);
}
get isActivated() { return !!this.activated; }
get component() {
if (!this.activated)
throw new Error("Outlet is not activated");
return this.activated.instance;
}
deactivate() {
if (this.activated) {
this.activated.destroy();
this.activated = null;
}
}
activate(factory, providers, outletMap) {
this.outletMap = outletMap;
const inj = ReflectiveInjector.fromResolvedProviders(providers, this.location.parentInjector);
this.activated = this.location.createComponent(factory, this.location.length, inj, []);
}
};
RouterOutlet = __decorate([
Directive({ selector: 'router-outlet' }),
__param(2, Attribute('name')),
__metadata('design:paramtypes', [RouterOutletMap, ViewContainerRef, String])
], RouterOutlet);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX291dGxldC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9kaXJlY3RpdmVzL3JvdXRlcl9vdXRsZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O09BQU8sRUFBVyxTQUFTLEVBQUUsZ0JBQWdCLEVBQUUsU0FBUyxFQUE4RCxrQkFBa0IsRUFBQyxNQUFNLGVBQWU7T0FDdkosRUFBQyxlQUFlLEVBQUMsTUFBTSxzQkFBc0I7T0FDN0MsRUFBQyxjQUFjLEVBQUMsTUFBTSxXQUFXO0FBR3hDO0lBT0UsWUFBWSxlQUErQixFQUFVLFFBQXlCLEVBQy9DLElBQVc7UUFEVyxhQUFRLEdBQVIsUUFBUSxDQUFpQjtRQUU1RSxlQUFlLENBQUMsY0FBYyxDQUFDLElBQUksR0FBRyxJQUFJLEdBQUcsY0FBYyxFQUFFLElBQUksQ0FBQyxDQUFDO0lBQ3JFLENBQUM7SUFFRCxJQUFJLFdBQVcsS0FBYyxNQUFNLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDO0lBQ3ZELElBQUksU0FBUztRQUNYLEVBQUUsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQztZQU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AgICAgIHRoaXMuYWN0aXZhdGVkLmRlc3Ryb3koKTtcbiAgICAgIHRoaXMuYWN0aXZhdGVkID0gbnVsbDtcbiAgICB9XG4gIH1cblxuICBhY3RpdmF0ZShmYWN0b3J5OiBDb21wb25lbnRGYWN0b3J5PGFueT4sIHByb3ZpZGVyczogUmVzb2x2ZWRSZWZsZWN0aXZlUHJvdmlkZXJbXSxcbiAgICAgICAgICAgb3V0bGV0TWFwOiBSb3V0ZXJPdXRsZXRNYXApOiB2b2lkIHtcbiAgICB0aGlzLm91dGxldE1hcCA9IG91dGxldE1hcDtcbiAgICBjb25zdCBpbmogPSBSZWZsZWN0aXZlSW5qZWN0b3IuZnJvbVJlc29sdmVkUHJvdmlkZXJzKHByb3ZpZGVycywgdGhpcy5sb2NhdGlvbi5wYXJlbnRJbmplY3Rvcik7XG4gICAgdGhpcy5hY3RpdmF0ZWQgPSB0aGlzLmxvY2F0aW9uLmNyZWF0ZUNvbXBvbmVudChmYWN0b3J5LCB0aGlzLmxvY2F0aW9uLmxlbmd0aCwgaW5qLCBbXSk7XG4gIH1cbn1cbiJdfQ==

View File

@ -1,12 +0,0 @@
export { Router, Event, NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from './router';
export { UrlSerializer, DefaultUrlSerializer } from './url_serializer';
export { RouterState, ActivatedRoute, RouterStateSnapshot, ActivatedRouteSnapshot } from './router_state';
export { UrlTree, UrlSegment } from './url_tree';
export { RouterOutletMap } from './router_outlet_map';
export { RouterConfig, Route } from './config';
export { Params, PRIMARY_OUTLET } from './shared';
export { provideRouter } from './router_providers';
export { CanActivate, CanDeactivate } from './interfaces';
import { RouterOutlet } from './directives/router_outlet';
import { RouterLink } from './directives/router_link';
export declare const ROUTER_DIRECTIVES: (typeof RouterOutlet | typeof RouterLink)[];

View File

@ -1,11 +0,0 @@
export { Router, NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from './router';
export { UrlSerializer, DefaultUrlSerializer } from './url_serializer';
export { RouterState, ActivatedRoute, RouterStateSnapshot, ActivatedRouteSnapshot } from './router_state';
export { UrlTree, UrlSegment } from './url_tree';
export { RouterOutletMap } from './router_outlet_map';
export { PRIMARY_OUTLET } from './shared';
export { provideRouter } from './router_providers';
import { RouterOutlet } from './directives/router_outlet';
import { RouterLink } from './directives/router_link';
export const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsU0FBUyxNQUFNLEVBQVMsZUFBZSxFQUFFLGFBQWEsRUFBRSxnQkFBZ0IsRUFBRSxlQUFlLFFBQVEsVUFBVSxDQUFDO0FBQzVHLFNBQVMsYUFBYSxFQUFFLG9CQUFvQixRQUFRLGtCQUFrQixDQUFDO0FBQ3ZFLFNBQVMsV0FBVyxFQUFFLGNBQWMsRUFBRSxtQkFBbUIsRUFBRSxzQkFBc0IsUUFBUSxnQkFBZ0IsQ0FBQztBQUMxRyxTQUFTLE9BQU8sRUFBRSxVQUFVLFFBQU8sWUFBWSxDQUFDO0FBQ2hELFNBQVMsZUFBZSxRQUFRLHFCQUFxQixDQUFDO0FBRXRELFNBQWlCLGNBQWMsUUFBUSxVQUFVLENBQUM7QUFDbEQsU0FBUyxhQUFhLFFBQVEsb0JBQW9CLENBQUM7QUFDTyxPQUVuRCxFQUFFLFlBQVksRUFBRSxNQUFNLDRCQUE0QjtPQUNsRCxFQUFFLFVBQVUsRUFBRSxNQUFNLDBCQUEwQjtBQUVyRCxPQUFPLE1BQU0saUJBQWlCLEdBQUcsQ0FBQyxZQUFZLEVBQUUsVUFBVSxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBSb3V0ZXIsIEV2ZW50LCBOYXZpZ2F0aW9uU3RhcnQsIE5hdmlnYXRpb25FbmQsIE5hdmlnYXRpb25DYW5jZWwsIE5hdmlnYXRpb25FcnJvciB9IGZyb20gJy4vcm91dGVyJztcbmV4cG9ydCB7IFVybFNlcmlhbGl6ZXIsIERlZmF1bHRVcmxTZXJpYWxpemVyIH0gZnJvbSAnLi91cmxfc2VyaWFsaXplcic7XG5leHBvcnQgeyBSb3V0ZXJTdGF0ZSwgQWN0aXZhdGVkUm91dGUsIFJvdXRlclN0YXRlU25hcHNob3QsIEFjdGl2YXRlZFJvdXRlU25hcHNob3QgfSBmcm9tICcuL3JvdXRlcl9zdGF0ZSc7XG5leHBvcnQgeyBVcmxUcmVlLCBVcmxTZWdtZW50fSBmcm9tICcuL3VybF90cmVlJztcbmV4cG9ydCB7IFJvdXRlck91dGxldE1hcCB9IGZyb20gJy4vcm91dGVyX291dGxldF9tYXAnO1xuZXhwb3J0IHsgUm91dGVyQ29uZmlnLCBSb3V0ZSB9IGZyb20gJy4vY29uZmlnJztcbmV4cG9ydCB7IFBhcmFtcywgUFJJTUFSWV9PVVRMRVQgfSBmcm9tICcuL3NoYXJlZCc7XG5leHBvcnQgeyBwcm92aWRlUm91dGVyIH0gZnJvbSAnLi9yb3V0ZXJfcHJvdmlkZXJzJztcbmV4cG9ydCB7IENhbkFjdGl2YXRlLCBDYW5EZWFjdGl2YXRlIH0gZnJvbSAnLi9pbnRlcmZhY2VzJztcblxuaW1wb3J0IHsgUm91dGVyT3V0bGV0IH0gZnJvbSAnLi9kaXJlY3RpdmVzL3JvdXRlcl9vdXRsZXQnO1xuaW1wb3J0IHsgUm91dGVyTGluayB9IGZyb20gJy4vZGlyZWN0aXZlcy9yb3V0ZXJfbGluayc7XG5cbmV4cG9ydCBjb25zdCBST1VURVJfRElSRUNUSVZFUyA9IFtSb3V0ZXJPdXRsZXQsIFJvdXRlckxpbmtdOyJdfQ==

View File

@ -1,8 +0,0 @@
import { Observable } from 'rxjs/Observable';
import { ActivatedRouteSnapshot, RouterStateSnapshot } from './router_state';
export interface CanActivate {
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean;
}
export interface CanDeactivate<T> {
canDeactivate(component: T, route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean;
}

View File

@ -1 +0,0 @@
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9pbnRlcmZhY2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge09ic2VydmFibGV9IGZyb20gJ3J4anMvT2JzZXJ2YWJsZSc7XG5pbXBvcnQge0FjdGl2YXRlZFJvdXRlU25hcHNob3QsIFJvdXRlclN0YXRlU25hcHNob3R9IGZyb20gJy4vcm91dGVyX3N0YXRlJztcblxuLyoqXG4gKiBBbiBpbnRlcmZhY2UgYSBjbGFzcyBjYW4gaW1wbGVtZW50IHRvIGJlIGEgZ3VhcmQgZGVjaWRpbmcgaWYgYSByb3V0ZSBjYW4gYmUgYWN0aXZhdGVkLlxuICovXG5leHBvcnQgaW50ZXJmYWNlIENhbkFjdGl2YXRlIHtcbiAgY2FuQWN0aXZhdGUocm91dGU6QWN0aXZhdGVkUm91dGVTbmFwc2hvdCwgc3RhdGU6Um91dGVyU3RhdGVTbmFwc2hvdCk6T2JzZXJ2YWJsZTxib29sZWFuPiB8IGJvb2xlYW47XG59XG5cbi8qKlxuICogQW4gaW50ZXJmYWNlIGEgY2xhc3MgY2FuIGltcGxlbWVudCB0byBiZSBhIGd1YXJkIGRlY2lkaW5nIGlmIGEgcm91dGUgY2FuIGJlIGRlYWN0aXZhdGVkLlxuICovXG5leHBvcnQgaW50ZXJmYWNlIENhbkRlYWN0aXZhdGU8VD4ge1xuICBjYW5EZWFjdGl2YXRlKGNvbXBvbmVudDpULCByb3V0ZTpBY3RpdmF0ZWRSb3V0ZVNuYXBzaG90LCBzdGF0ZTpSb3V0ZXJTdGF0ZVNuYXBzaG90KTpPYnNlcnZhYmxlPGJvb2xlYW4+IHwgYm9vbGVhbjtcbn0iXX0=

View File

@ -1,6 +0,0 @@
import { UrlTree } from './url_tree';
import { RouterStateSnapshot } from './router_state';
import { RouterConfig } from './config';
import { Type } from '@angular/core';
import { Observable } from 'rxjs/Observable';
export declare function recognize(rootComponentType: Type, config: RouterConfig, url: UrlTree): Observable<RouterStateSnapshot>;

File diff suppressed because one or more lines are too long

View File

@ -1,6 +0,0 @@
import { RouterStateSnapshot } from './router_state';
import { ComponentResolver } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/toPromise';
export declare function resolve(resolver: ComponentResolver, state: RouterStateSnapshot): Observable<RouterStateSnapshot>;

View File

@ -1,23 +0,0 @@
import 'rxjs/add/operator/map';
import { forkJoin } from 'rxjs/observable/forkJoin';
import { fromPromise } from 'rxjs/observable/fromPromise';
import 'rxjs/add/operator/toPromise';
export function resolve(resolver, state) {
return resolveNode(resolver, state._root).map(_ => state);
}
function resolveNode(resolver, node) {
if (node.children.length === 0) {
return fromPromise(resolver.resolveComponent(node.value.component).then(factory => {
node.value._resolvedComponentFactory = factory;
return node.value;
}));
}
else {
const c = node.children.map(c => resolveNode(resolver, c).toPromise());
return forkJoin(c).map(_ => resolver.resolveComponent(node.value.component).then(factory => {
node.value._resolvedComponentFactory = factory;
return node.value;
}));
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9yZXNvbHZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJPQUlPLHVCQUF1QjtPQUN2QixFQUFDLFFBQVEsRUFBQyxNQUFNLDBCQUEwQjtPQUMxQyxF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Pik6IE9ic2VydmFibGU8YW55PiB7XG4gIGlmIChub2RlLmNoaWxkcmVuLmxlbmd0aCA9PT0gMCkge1xuICAgIHJldHVybiBmcm9tUHJvbWlzZShyZXNvbHZlci5yZXNvbHZlQ29tcG9uZW50KDxhbnk+bm9kZS52YWx1ZS5jb21wb25lbnQpLnRoZW4oZmFjdG9yeSA9PiB7XG4gICAgICBub2RlLnZhbHVlLl9yZXNvbHZlZENvbXBvbmVudEZhY3RvcnkgPSBmYWN0b3J5O1xuICAgICAgcmV0dXJuIG5vZGUudmFsdWU7XG4gICAgfSkpO1xuICAgIFxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGMgPSBub2RlLmNoaWxkcmVuLm1hcChjID0+IHJlc29sdmVOb2RlKHJlc29sdmVyLCBjKS50b1Byb21pc2UoKSk7XG4gICAgcmV0dXJuIGZvcmtKb2luKGMpLm1hcChfID0+IHJlc29sdmVyLnJlc29sdmVDb21wb25lbnQoPGFueT5ub2RlLnZhbHVlLmNvbXBvbmVudCkudGhlbihmYWN0b3J5ID0+IHtcbiAgICAgIG5vZGUudmFsdWUuX3Jlc29sdmVkQ29tcG9uZW50RmFjdG9yeSA9IGZhY3Rvcnk7XG4gICAgICByZXR1cm4gbm9kZS52YWx1ZTtcbiAgICB9KSk7XG4gIH1cbn0iXX0=

View File

@ -1,69 +0,0 @@
import { ComponentResolver, Type, Injector } from '@angular/core';
import { Location } from '@angular/common';
import { UrlSerializer } from './url_serializer';
import { RouterOutletMap } from './router_outlet_map';
import { UrlTree } from './url_tree';
import { Params } from './shared';
import { RouterState, ActivatedRoute } from './router_state';
import { RouterConfig } from './config';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/scan';
import 'rxjs/add/operator/mergeMap';
import 'rxjs/add/operator/concat';
import 'rxjs/add/operator/concatMap';
export interface NavigationExtras {
relativeTo?: ActivatedRoute;
queryParameters?: Params;
fragment?: string;
}
export declare class NavigationStart {
id: number;
url: UrlTree;
constructor(id: number, url: UrlTree);
}
export declare class NavigationEnd {
id: number;
url: UrlTree;
constructor(id: number, url: UrlTree);
}
export declare class NavigationCancel {
id: number;
url: UrlTree;
constructor(id: number, url: UrlTree);
}
export declare class NavigationError {
id: number;
url: UrlTree;
error: any;
constructor(id: number, url: UrlTree, error: any);
}
export declare type Event = NavigationStart | NavigationEnd | NavigationCancel | NavigationError;
export declare class Router {
private rootComponentType;
private resolver;
private urlSerializer;
private outletMap;
private location;
private injector;
private currentUrlTree;
private currentRouterState;
private config;
private locationSubscription;
private routerEvents;
private navigationId;
constructor(rootComponentType: Type, resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector);
readonly routerState: RouterState;
readonly urlTree: UrlTree;
readonly events: Observable<Event>;
navigateByUrl(url: string): Promise<boolean>;
resetConfig(config: RouterConfig): void;
dispose(): void;
createUrlTree(commands: any[], {relativeTo, queryParameters, fragment}?: NavigationExtras): UrlTree;
navigate(commands: any[], extras?: NavigationExtras): Promise<boolean>;
serializeUrl(url: UrlTree): string;
parseUrl(url: string): UrlTree;
private scheduleNavigation(url, pop);
private setUpLocationChangeListener();
private runNavigate(url, pop, id);
}

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
import { RouterOutlet } from './directives/router_outlet';
export declare class RouterOutletMap {
_outlets: {
[name: string]: RouterOutlet;
};
registerOutlet(name: string, outlet: RouterOutlet): void;
}

View File

@ -1,7 +0,0 @@
export class RouterOutletMap {
constructor() {
this._outlets = {};
}
registerOutlet(name, outlet) { this._outlets[name] = outlet; }
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX291dGxldF9tYXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcm91dGVyX291dGxldF9tYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS0E7SUFBQTtRQUVFLGFBQVEsR0FBbUMsRUFBRSxDQUFDO0lBRWhELENBQUM7SUFEQyxjQUFjLENBQUMsSUFBWSxFQUFFLE1BQW9CLElBQVUsSUFBSSxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsR0FBRyxNQUFNLENBQUMsQ0FBQyxDQUFDO0FBQzVGLENBQUM7QUFBQSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFJvdXRlck91dGxldCB9IGZyb20gJy4vZGlyZWN0aXZlcy9yb3V0ZXJfb3V0bGV0JztcblxuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNsYXNzIFJvdXRlck91dGxldE1hcCB7XG4gIC8qKiBAaW50ZXJuYWwgKi9cbiAgX291dGxldHM6IHtbbmFtZTogc3RyaW5nXTogUm91dGVyT3V0bGV0fSA9IHt9O1xuICByZWdpc3Rlck91dGxldChuYW1lOiBzdHJpbmcsIG91dGxldDogUm91dGVyT3V0bGV0KTogdm9pZCB7IHRoaXMuX291dGxldHNbbmFtZV0gPSBvdXRsZXQ7IH1cbn1cbiJdfQ==

View File

@ -1,2 +0,0 @@
import { RouterConfig } from './config';
export declare function provideRouter(config: RouterConfig): any[];

View File

@ -1,10 +0,0 @@
import * as common from './common_router_providers';
import { BrowserPlatformLocation } from '@angular/platform-browser';
import { PlatformLocation } from '@angular/common';
export function provideRouter(config) {
return [
{ provide: PlatformLocation, useClass: BrowserPlatformLocation },
...common.provideRouter(config)
];
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX3Byb3ZpZGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9yb3V0ZXJfcHJvdmlkZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJPQUNPLEtBQUssTUFBTSxNQUFNLDJCQUEyQjtPQUM1QyxFQUFDLHVCQUF1QixFQUFDLE1BQU0sMkJBQTJCO09BQzFELEV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mZpZzogUm91dGVyQ29uZmlnKTphbnlbXSB7XG4gIHJldHVybiBbXG4gICAge3Byb3ZpZGU6IFBsYXRmb3JtTG9jYXRpb24sIHVzZUNsYXNzOiBCcm93c2VyUGxhdGZvcm1Mb2NhdGlvbn0sXG4gICAgLi4uY29tbW9uLnByb3ZpZGVSb3V0ZXIoY29uZmlnKVxuICBdO1xufVxuIl19

View File

@ -1,38 +0,0 @@
import { Tree, TreeNode } from './utils/tree';
import { UrlSegment } from './url_tree';
import { Route } from './config';
import { Params } from './shared';
import { Observable } from 'rxjs/Observable';
import { Type, ComponentFactory } from '@angular/core';
export declare class RouterState extends Tree<ActivatedRoute> {
queryParams: Observable<Params>;
fragment: Observable<string>;
snapshot: RouterStateSnapshot;
constructor(root: TreeNode<ActivatedRoute>, queryParams: Observable<Params>, fragment: Observable<string>, snapshot: RouterStateSnapshot);
}
export declare function createEmptyState(rootComponent: Type): RouterState;
export declare class ActivatedRoute {
urlSegments: Observable<UrlSegment[]>;
params: Observable<Params>;
outlet: string;
component: Type | string;
_futureSnapshot: ActivatedRouteSnapshot;
snapshot: ActivatedRouteSnapshot;
constructor(urlSegments: Observable<UrlSegment[]>, params: Observable<Params>, outlet: string, component: Type | string, futureSnapshot: ActivatedRouteSnapshot);
}
export declare class ActivatedRouteSnapshot {
urlSegments: UrlSegment[];
params: Params;
outlet: string;
component: Type | string;
_resolvedComponentFactory: ComponentFactory<any>;
_routeConfig: Route | null;
_lastUrlSegment: UrlSegment;
constructor(urlSegments: UrlSegment[], params: Params, outlet: string, component: Type | string, routeConfig: Route | null, lastUrlSegment: UrlSegment);
}
export declare class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {
queryParams: Params;
fragment: string | null;
constructor(root: TreeNode<ActivatedRouteSnapshot>, queryParams: Params, fragment: string | null);
}
export declare function advanceActivatedRoute(route: ActivatedRoute): void;

File diff suppressed because one or more lines are too long

View File

@ -1,4 +0,0 @@
export declare const PRIMARY_OUTLET: string;
export declare type Params = {
[key: string]: string;
};

View File

@ -1,2 +0,0 @@
export const PRIMARY_OUTLET = "PRIMARY_OUTLET";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhcmVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3NoYXJlZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQSxPQUFPLE1BQU0sY0FBYyxHQUFXLGdCQUFnQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBOYW1lIG9mIHRoZSBwcmltYXJ5IG91dGxldC5cbiAqIEB0eXBlIHtzdHJpbmd9XG4gKi9cbmV4cG9ydCBjb25zdCBQUklNQVJZX09VVExFVDogc3RyaW5nID0gXCJQUklNQVJZX09VVExFVFwiO1xuXG4vKipcbiAqIEEgY29sbGVjdGlvbiBvZiBwYXJhbWV0ZXJzLlxuICovXG5leHBvcnQgdHlwZSBQYXJhbXMgPSB7IFtrZXk6IHN0cmluZ106IHN0cmluZyB9O1xuIl19

View File

@ -1,10 +0,0 @@
import { UrlTree, UrlSegment } from './url_tree';
export declare abstract class UrlSerializer {
abstract parse(url: string): UrlTree;
abstract serialize(tree: UrlTree): string;
}
export declare class DefaultUrlSerializer implements UrlSerializer {
parse(url: string): UrlTree;
serialize(tree: UrlTree): string;
}
export declare function serializeSegment(segment: UrlSegment): string;

File diff suppressed because one or more lines are too long

View File

@ -1,23 +0,0 @@
import { Tree, TreeNode } from './utils/tree';
export declare function createEmptyUrlTree(): UrlTree;
export declare class UrlTree extends Tree<UrlSegment> {
queryParameters: {
[key: string]: string;
};
fragment: string | null;
constructor(root: TreeNode<UrlSegment>, queryParameters: {
[key: string]: string;
}, fragment: string | null);
}
export declare class UrlSegment {
path: string;
parameters: {
[key: string]: string;
};
outlet: string;
constructor(path: string, parameters: {
[key: string]: string;
}, outlet: string);
toString(): string;
}
export declare function equalUrlSegments(a: UrlSegment[], b: UrlSegment[]): boolean;

View File

@ -1,43 +0,0 @@
import { Tree, TreeNode } from './utils/tree';
import { shallowEqual } from './utils/collection';
import { PRIMARY_OUTLET } from './shared';
export function createEmptyUrlTree() {
return new UrlTree(new TreeNode(new UrlSegment("", {}, PRIMARY_OUTLET), []), {}, null);
}
export class UrlTree extends Tree {
constructor(root, queryParameters, fragment) {
super(root);
this.queryParameters = queryParameters;
this.fragment = fragment;
}
}
export class UrlSegment {
constructor(path, parameters, outlet) {
this.path = path;
this.parameters = parameters;
this.outlet = outlet;
}
toString() {
const params = [];
for (let prop in this.parameters) {
if (this.parameters.hasOwnProperty(prop)) {
params.push(`${prop}=${this.parameters[prop]}`);
}
}
const paramsString = params.length > 0 ? `(${params.join(',')})` : '';
const outlet = this.outlet === PRIMARY_OUTLET ? '' : `${this.outlet}:`;
return `${outlet}${this.path}${paramsString}`;
}
}
export function equalUrlSegments(a, b) {
if (a.length !== b.length)
return false;
for (let i = 0; i < a.length; ++i) {
if (a[i].path !== b[i].path)
return false;
if (!shallowEqual(a[i].parameters, b[i].parameters))
return false;
}
return true;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXJsX3RyZWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXJsX3RyZWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ik9BQU8sRUFBRSxJQUFJLEVBQUUsUUFBUSxFQUFFLE1BQU0sY0FBYztPQUN0QyxFQUFFLFlBQVksRUFBRSxNQUFNLG9CQUFvQjtPQUMxQyxFQUFFLGNBQWMsRUFBRSxNQUFNLFVBQVU7QUFFekM7SUFDRSxNQUFNLENBQUMsSUFBSSxPQUFPLENBQUMsSUFBSSxRQUFRLENBQWEsSUFBSSxVQUFVLENBQUMsRUFBRSxFQUFFLEVBQUUsRUFBRSxjQUFjLENBQUMsRUFBRSxFQUFFLENBQUMsRUFBRSxFQUFFLEVBQUUsSU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hbXMubGVuZ3RoID4gMCA/IGAoJHtwYXJhbXMuam9pbignLCcpfSlgIDogJyc7XG4gICAgY29uc3Qgb3V0bGV0ID0gdGhpcy5vdXRsZXQgPT09IFBSSU1BUllfT1VUTEVUID8gJycgOiBgJHt0aGlzLm91dGxldH06YDtcbiAgICByZXR1cm4gYCR7b3V0bGV0fSR7dGhpcy5wYXRofSR7cGFyYW1zU3RyaW5nfWA7XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGVxdWFsVXJsU2VnbWVudHMoYTogVXJsU2VnbWVudFtdLCBiOiBVcmxTZWdtZW50W10pOiBib29sZWFuIHtcbiAgaWYgKGEubGVuZ3RoICE9PSBiLmxlbmd0aCkgcmV0dXJuIGZhbHNlO1xuICBmb3IgKGxldCBpID0gMDsgaSA8IGEubGVuZ3RoOyArK2kpIHtcbiAgICBpZiAoYVtpXS5wYXRoICE9PSBiW2ldLnBhdGgpIHJldHVybiBmYWxzZTtcbiAgICBpZiAoIXNoYWxsb3dFcXVhbChhW2ldLnBhcmFtZXRlcnMsIGJbaV0ucGFyYW1ldGVycykpIHJldHVybiBmYWxzZTtcbiAgfVxuICByZXR1cm4gdHJ1ZTtcbn1cbiJdfQ==

View File

@ -1,18 +0,0 @@
export declare function shallowEqual(a: {
[x: string]: any;
}, b: {
[x: string]: any;
}): boolean;
export declare function flatten<T>(a: T[][]): T[];
export declare function first<T>(a: T[]): T | null;
export declare function and(bools: boolean[]): boolean;
export declare function merge<V>(m1: {
[key: string]: V;
}, m2: {
[key: string]: V;
}): {
[key: string]: V;
};
export declare function forEach<K, V>(map: {
[key: string]: V;
}, callback: Function): void;

View File

@ -1,52 +0,0 @@
export function shallowEqual(a, b) {
var k1 = Object.keys(a);
var k2 = Object.keys(b);
if (k1.length != k2.length) {
return false;
}
var key;
for (var i = 0; i < k1.length; i++) {
key = k1[i];
if (a[key] !== b[key]) {
return false;
}
}
return true;
}
export function flatten(a) {
const target = [];
for (let i = 0; i < a.length; ++i) {
for (let j = 0; j < a[i].length; ++j) {
target.push(a[i][j]);
}
}
return target;
}
export function first(a) {
return a.length > 0 ? a[0] : null;
}
export function and(bools) {
return bools.reduce((a, b) => a && b, true);
}
export function merge(m1, m2) {
var m = {};
for (var attr in m1) {
if (m1.hasOwnProperty(attr)) {
m[attr] = m1[attr];
}
}
for (var attr in m2) {
if (m2.hasOwnProperty(attr)) {
m[attr] = m2[attr];
}
}
return m;
}
export function forEach(map, callback) {
for (var prop in map) {
if (map.hasOwnProperty(prop)) {
callback(map[prop], prop);
}
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy91dGlscy9jb2xsZWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDZCQUE2QixDQUFtQixFQUFFLENBQW1CO0lBQ25FLElBQUksRUFBRSxHQUFHLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDeEIsSUFBSSxFQUFFLEdBQUcsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUN4QixFQUFFLENBQUMsQ0FBQyxFQUFFLENBQUMsTUFBTSxJQUFJLEVBQUUsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1FBQzNCLE1BQU0sQ0FBQyxLQUFLLENBQUM7SUFDZixDQUFDO0lBQ0QsSUFBSSxHQUFHLENBQUM7SUFDUixHQUFHLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxFQUFFLEVBQUUsQ0FBQztRQUNuQyxHQUFHLEdBQUcsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ1osRUFBRSxDQUFDLENBQUMsQ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PSB7fTtcblxuICBmb3IgKHZhciBhdHRyIGluIG0xKSB7XG4gICAgaWYgKG0xLmhhc093blByb3BlcnR5KGF0dHIpKSB7XG4gICAgICBtW2F0dHJdID0gbTFbYXR0cl07XG4gICAgfVxuICB9XG5cbiAgZm9yICh2YXIgYXR0ciBpbiBtMikge1xuICAgIGlmIChtMi5oYXNPd25Qcm9wZXJ0eShhdHRyKSkge1xuICAgICAgbVthdHRyXSA9IG0yW2F0dHJdO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBtO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZm9yRWFjaDxLLCBWPihtYXA6IHtba2V5OiBzdHJpbmddOiBWfSwgY2FsbGJhY2s6IC8qKFYsIEspID0+IHZvaWQqLyBGdW5jdGlvbik6IHZvaWQge1xuICBmb3IgKHZhciBwcm9wIGluIG1hcCkge1xuICAgIGlmIChtYXAuaGFzT3duUHJvcGVydHkocHJvcCkpIHtcbiAgICAgIGNhbGxiYWNrKG1hcFtwcm9wXSwgcHJvcCk7XG4gICAgfVxuICB9XG59Il19

View File

@ -1,16 +0,0 @@
export declare class Tree<T> {
_root: TreeNode<T>;
constructor(root: TreeNode<T>);
readonly root: T;
parent(t: T): T | null;
children(t: T): T[];
firstChild(t: T): T | null;
siblings(t: T): T[];
pathFromRoot(t: T): T[];
contains(tree: Tree<T>): boolean;
}
export declare class TreeNode<T> {
value: T;
children: TreeNode<T>[];
constructor(value: T, children: TreeNode<T>[]);
}

File diff suppressed because one or more lines are too long

View File

@ -1,68 +0,0 @@
{
"name": "vladivostok",
"version": "0.9.1",
"description": "",
"main": "./build/src/index.js",
"jsnext:main": "./build/es6/index.js",
"scripts": {
"karma": "karma start",
"test": "npm run build; karma start",
"build_watch": "rm -rf dist; tsc -w",
"build": "rm -rf dist; tsc",
"build_npm": "rm -rf dist && tsc -p tsconfig.publish.es5.json && tsc -p tsconfig.publish.es6.json",
"postbuild_npm": "cp package.json README.md dist/ && npm run rewrite_npm_package",
"rewrite_npm_package": "node --harmony_destructuring tools/rewrite-published-package.js",
"build_bundle": "cp -r src router && tsc typings/index.d.ts src/router.ts --rootDir . --module system -t es5 --outFile dist/bundles/router.js --moduleResolution node --emitDecoratorMetadata --experimentalDecorators"
},
"keywords": [
"angular2",
"angular",
"router"
],
"repository": {
"type": "git",
"url": "git+https://github.com/angular/vladivostok.git"
},
"author": "vsavkin",
"license": "MIT",
"bugs": {
"url": "https://github.com/angular/vladivostok/issues"
},
"homepage": "https://github.com/angular/vladivostok#readme",
"devDependencies": {
"es6-module-loader": "^0.17.10",
"es6-shim": "^0.35.0",
"gulp": "^3.9.0",
"gulp-jasmine": "^2.2.1",
"gulp-typescript": "^2.10.0",
"http-server": "^0.8.5",
"jasmine": "^2.4.1",
"jasmine-core": "^2.4.1",
"json": "^9.0.3",
"karma": "^0.13.19",
"karma-chrome-launcher": "^0.2.2",
"karma-firefox-launcher": "^0.1.7",
"karma-jasmine": "^0.3.6",
"karma-systemjs": "^0.10.0",
"karma-sourcemap-loader": "~0.3",
"parse5": "^1.3.2",
"protractor": "3.0.0",
"reflect-metadata": "0.1.2",
"systemjs": "^0.19.16",
"systemjs-builder": "^0.15.7",
"traceur": "0.0.96",
"tsd": "^0.6.5",
"typescript": "^1.9.0-dev.20160409",
"typings": "^1.0.4",
"zone.js": "^0.6.6"
},
"typings": "router.d.ts",
"peerDependencies": {
"@angular/common": "2.0.0-rc.1",
"@angular/compiler": "2.0.0-rc.1",
"@angular/core": "2.0.0-rc.1",
"@angular/platform-browser": "2.0.0-rc.1",
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
"rxjs": "5.0.0-beta.6"
}
}

View File

@ -1,2 +0,0 @@
import { RouterConfig } from './config';
export declare function provideRouter(config: RouterConfig): any[];

View File

@ -1,32 +0,0 @@
"use strict";
var router_outlet_map_1 = require('./router_outlet_map');
var url_serializer_1 = require('./url_serializer');
var router_state_1 = require('./router_state');
var router_1 = require('./router');
var core_1 = require('@angular/core');
var common_1 = require('@angular/common');
function provideRouter(config) {
return [
common_1.Location,
{ provide: common_1.LocationStrategy, useClass: common_1.PathLocationStrategy },
{ provide: url_serializer_1.UrlSerializer, useClass: url_serializer_1.DefaultUrlSerializer },
{
provide: router_1.Router,
useFactory: function (ref, resolver, urlSerializer, outletMap, location, injector) {
if (ref.componentTypes.length == 0) {
throw new Error("Bootstrap at least one component before injecting Router.");
}
var componentType = ref.componentTypes[0];
var r = new router_1.Router(componentType, resolver, urlSerializer, outletMap, location, injector);
r.resetConfig(config);
ref.registerDisposeListener(function () { return r.dispose(); });
return r;
},
deps: [core_1.ApplicationRef, core_1.ComponentResolver, url_serializer_1.UrlSerializer, router_outlet_map_1.RouterOutletMap, common_1.Location, core_1.Injector]
},
router_outlet_map_1.RouterOutletMap,
{ provide: router_state_1.ActivatedRoute, useFactory: function (r) { return r.routerState.root; }, deps: [router_1.Router] },
];
}
exports.provideRouter = provideRouter;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uX3JvdXRlcl9wcm92aWRlcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29tbW9uX3JvdXRlcl9wcm92aWRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLGtDQUFnQyxxQkFBcUIsQ0FBQyxDQUFBO0FBQ3RELCtCQUFvRCxrQkFBa0IsQ0FBQyxDQUFBO0FBQ3ZFLDZCQUErQixnQkFBZ0IsQ0FBQyxDQUFBO0FBQ2hELHVCQUF1QixVQUFVLENBQUMsQ0FBQTtBQUVsQyxxQkFBNEQsZUFBZSxDQUFDLENBQUE7QUFDNUUsdUJBQWlFLGlCQUFpQixDQUFDLENBQUE7QUFvQm5GLHVCQUE4QixNQUFvQjtJQUNoRCxNQUFNLENBQUM7UUFDTCxpQkFBUTtRQUNSLEVBQUMsT0FBTyxFQUFFLHlCQUFnQixFQUFFLFFBQVEsRUFBRSw2QkFBb0IsRUFB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zcG9zZSgpKTtcbiAgICAgICAgcmV0dXJuIHI7XG4gICAgICB9LFxuICAgICAgZGVwczogW0FwcGxpY2F0aW9uUmVmLCBDb21wb25lbnRSZXNvbHZlciwgVXJsU2VyaWFsaXplciwgUm91dGVyT3V0bGV0TWFwLCBMb2NhdGlvbiwgSW5qZWN0b3JdXG4gICAgfSxcblxuICAgIFJvdXRlck91dGxldE1hcCxcbiAgICB7cHJvdmlkZTogQWN0aXZhdGVkUm91dGUsIHVzZUZhY3Rvcnk6IChyKSA9PiByLnJvdXRlclN0YXRlLnJvb3QsIGRlcHM6IFtSb3V0ZXJdfSxcbiAgXTtcbn1cbiJdfQ==

View File

@ -1,11 +0,0 @@
import { Type } from '@angular/core';
export declare type RouterConfig = Route[];
export interface Route {
index?: boolean;
path?: string;
component: Type | string;
outlet?: string;
canActivate?: any[];
canDeactivate?: any[];
children?: Route[];
}

View File

@ -1,2 +0,0 @@
"use strict";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVHlwZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5leHBvcnQgdHlwZSBSb3V0ZXJDb25maWcgPSBSb3V0ZVtdO1xuXG5leHBvcnQgaW50ZXJmYWNlIFJvdXRlIHtcbiAgaW5kZXg/OiBib29sZWFuO1xuICBwYXRoPzogc3RyaW5nO1xuICBjb21wb25lbnQ6IFR5cGUgfCBzdHJpbmc7XG4gIG91dGxldD86IHN0cmluZztcbiAgY2FuQWN0aXZhdGU/OiBhbnlbXSxcbiAgY2FuRGVhY3RpdmF0ZT86IGFueVtdLFxuICBjaGlsZHJlbj86IFJvdXRlW107XG59Il19

View File

@ -1,2 +0,0 @@
import { RouterStateSnapshot, RouterState } from './router_state';
export declare function createRouterState(curr: RouterStateSnapshot, prevState: RouterState): RouterState;

File diff suppressed because one or more lines are too long

View File

@ -1,4 +0,0 @@
import { UrlTree } from './url_tree';
import { ActivatedRoute } from './router_state';
import { Params } from './shared';
export declare function createUrlTree(route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParameters: Params | undefined, fragment: string | undefined): UrlTree;

File diff suppressed because one or more lines are too long

View File

@ -1,13 +0,0 @@
import { Router } from '../router';
import { ActivatedRoute } from '../router_state';
export declare class RouterLink {
private router;
private route;
target: string;
private commands;
href: string;
constructor(router: Router, route: ActivatedRoute);
routerLink: any[] | string;
onClick(): boolean;
private updateTargetUrlAndHref();
}

View File

@ -1,72 +0,0 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require('@angular/core');
var router_1 = require('../router');
var router_state_1 = require('../router_state');
var RouterLink = (function () {
function RouterLink(router, route) {
this.router = router;
this.route = route;
this.commands = [];
}
Object.defineProperty(RouterLink.prototype, "routerLink", {
set: function (data) {
if (Array.isArray(data)) {
this.commands = data;
}
else {
this.commands = [data];
}
this.updateTargetUrlAndHref();
},
enumerable: true,
configurable: true
});
RouterLink.prototype.onClick = function () {
if (!(typeof this.target === "string") || this.target == '_self') {
this.router.navigate(this.commands, { relativeTo: this.route });
return false;
}
return true;
};
RouterLink.prototype.updateTargetUrlAndHref = function () {
var tree = this.router.createUrlTree(this.commands, { relativeTo: this.route });
if (tree) {
this.href = this.router.serializeUrl(tree);
}
};
__decorate([
core_1.Input(),
__metadata('design:type', String)
], RouterLink.prototype, "target", void 0);
__decorate([
core_1.HostBinding(),
__metadata('design:type', String)
], RouterLink.prototype, "href", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Object),
__metadata('design:paramtypes', [Object])
], RouterLink.prototype, "routerLink", null);
__decorate([
core_1.HostListener("click"),
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', Boolean)
], RouterLink.prototype, "onClick", null);
RouterLink = __decorate([
core_1.Directive({ selector: '[routerLink]' }),
__metadata('design:paramtypes', [router_1.Router, router_state_1.ActivatedRoute])
], RouterLink);
return RouterLink;
}());
exports.RouterLink = RouterLink;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX2xpbmsuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZGlyZWN0aXZlcy9yb3V0ZXJfbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEscUJBS08sZUFBZSxDQUFDLENBQUE7QUFDdkIsdUJBQXFCLFdBQVcsQ0FBQyxDQUFBO0FBQ2pDLDZCQUE2QixpQkFBaUIsQ0FBQyxDQUFBO0FBNEIvQztJQVVFLG9CQUFvQixNQUFjLEVBQVUsS0FBcUI7UUFBN0MsV0FBTSxHQUFOLE1BQU0sQ0FBUTtRQUFVLFVBQUssR0FBTCxLQUFLLENBQWdCO1FBUnpELGFBQVEsR0FBVSxFQUFFLENBQUM7SUFRdUMsQ0FBQztJQUdyRSxzQkFBSSxrQ0FBVTthQUFkLFVBQWUsSUFBb0I7WUFDakMsRUFBRSxDQUFDLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7Z0JBQ3hCLElBQUks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m91dGVyLnNlcmlhbGl6ZVVybCh0cmVlKTtcbiAgICB9XG4gIH1cbn1cbiJdfQ==

View File

@ -1,12 +0,0 @@
import { ViewContainerRef, ComponentFactory, ResolvedReflectiveProvider } from '@angular/core';
import { RouterOutletMap } from '../router_outlet_map';
export declare class RouterOutlet {
private location;
private activated;
outletMap: RouterOutletMap;
constructor(parentOutletMap: RouterOutletMap, location: ViewContainerRef, name: string);
readonly isActivated: boolean;
readonly component: Object;
deactivate(): void;
activate(factory: ComponentFactory<any>, providers: ResolvedReflectiveProvider[], outletMap: RouterOutletMap): void;
}

View File

@ -1,55 +0,0 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var core_1 = require('@angular/core');
var router_outlet_map_1 = require('../router_outlet_map');
var shared_1 = require('../shared');
var RouterOutlet = (function () {
function RouterOutlet(parentOutletMap, location, name) {
this.location = location;
parentOutletMap.registerOutlet(name ? name : shared_1.PRIMARY_OUTLET, this);
}
Object.defineProperty(RouterOutlet.prototype, "isActivated", {
get: function () { return !!this.activated; },
enumerable: true,
configurable: true
});
Object.defineProperty(RouterOutlet.prototype, "component", {
get: function () {
if (!this.activated)
throw new Error("Outlet is not activated");
return this.activated.instance;
},
enumerable: true,
configurable: true
});
RouterOutlet.prototype.deactivate = function () {
if (this.activated) {
this.activated.destroy();
this.activated = null;
}
};
RouterOutlet.prototype.activate = function (factory, providers, outletMap) {
this.outletMap = outletMap;
var inj = core_1.ReflectiveInjector.fromResolvedProviders(providers, this.location.parentInjector);
this.activated = this.location.createComponent(factory, this.location.length, inj, []);
};
RouterOutlet = __decorate([
core_1.Directive({ selector: 'router-outlet' }),
__param(2, core_1.Attribute('name')),
__metadata('design:paramtypes', [router_outlet_map_1.RouterOutletMap, core_1.ViewContainerRef, String])
], RouterOutlet);
return RouterOutlet;
}());
exports.RouterOutlet = RouterOutlet;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX291dGxldC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9kaXJlY3RpdmVzL3JvdXRlcl9vdXRsZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQUFBLHFCQUErSSxlQUFlLENBQUMsQ0FBQTtBQUMvSixrQ0FBOEIsc0JBQXNCLENBQUMsQ0FBQTtBQUNyRCx1QkFBNkIsV0FBVyxDQUFDLENBQUE7QUFHekM7SUFPRSxzQkFBWSxlQUErQixFQUFVLFFBQXlCLEVBQy9DLElBQVc7UUFEVyxhQUFRLEdBQVIsUUFBUSxDQUFpQjtRQUU1RSxlQUFlLENBQUMsY0FBYyxDQUFDLElBQUksR0FBRyxJQUFJLEdBQUcsdUJBQWMsRUFBRSxJQUFJLENBQUMsQ0FBQztJQUNyRSxDQUFDO0lBRUQsc0JBQUkscUNBQVc7YUFBZixjQUE2QixNQUFNLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDOzs7T0FBQTtJQUN2RCxzQkFBSSxtQ0FBUzthQUFiO1lBQ0UsRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDO2dCQUFDLE1BQU0sSUFBSSxLQUFLLENBQ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aWYgKHRoaXMuYWN0aXZhdGVkKSB7XG4gICAgICB0aGlzLmFjdGl2YXRlZC5kZXN0cm95KCk7XG4gICAgICB0aGlzLmFjdGl2YXRlZCA9IG51bGw7XG4gICAgfVxuICB9XG5cbiAgYWN0aXZhdGUoZmFjdG9yeTogQ29tcG9uZW50RmFjdG9yeTxhbnk+LCBwcm92aWRlcnM6IFJlc29sdmVkUmVmbGVjdGl2ZVByb3ZpZGVyW10sXG4gICAgICAgICAgIG91dGxldE1hcDogUm91dGVyT3V0bGV0TWFwKTogdm9pZCB7XG4gICAgdGhpcy5vdXRsZXRNYXAgPSBvdXRsZXRNYXA7XG4gICAgY29uc3QgaW5qID0gUmVmbGVjdGl2ZUluamVjdG9yLmZyb21SZXNvbHZlZFByb3ZpZGVycyhwcm92aWRlcnMsIHRoaXMubG9jYXRpb24ucGFyZW50SW5qZWN0b3IpO1xuICAgIHRoaXMuYWN0aXZhdGVkID0gdGhpcy5sb2NhdGlvbi5jcmVhdGVDb21wb25lbnQoZmFjdG9yeSwgdGhpcy5sb2NhdGlvbi5sZW5ndGgsIGluaiwgW10pO1xuICB9XG59XG4iXX0=

View File

@ -1,12 +0,0 @@
export { Router, Event, NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from './router';
export { UrlSerializer, DefaultUrlSerializer } from './url_serializer';
export { RouterState, ActivatedRoute, RouterStateSnapshot, ActivatedRouteSnapshot } from './router_state';
export { UrlTree, UrlSegment } from './url_tree';
export { RouterOutletMap } from './router_outlet_map';
export { RouterConfig, Route } from './config';
export { Params, PRIMARY_OUTLET } from './shared';
export { provideRouter } from './router_providers';
export { CanActivate, CanDeactivate } from './interfaces';
import { RouterOutlet } from './directives/router_outlet';
import { RouterLink } from './directives/router_link';
export declare const ROUTER_DIRECTIVES: (typeof RouterOutlet | typeof RouterLink)[];

View File

@ -1,28 +0,0 @@
"use strict";
var router_1 = require('./router');
exports.Router = router_1.Router;
exports.NavigationStart = router_1.NavigationStart;
exports.NavigationEnd = router_1.NavigationEnd;
exports.NavigationCancel = router_1.NavigationCancel;
exports.NavigationError = router_1.NavigationError;
var url_serializer_1 = require('./url_serializer');
exports.UrlSerializer = url_serializer_1.UrlSerializer;
exports.DefaultUrlSerializer = url_serializer_1.DefaultUrlSerializer;
var router_state_1 = require('./router_state');
exports.RouterState = router_state_1.RouterState;
exports.ActivatedRoute = router_state_1.ActivatedRoute;
exports.RouterStateSnapshot = router_state_1.RouterStateSnapshot;
exports.ActivatedRouteSnapshot = router_state_1.ActivatedRouteSnapshot;
var url_tree_1 = require('./url_tree');
exports.UrlTree = url_tree_1.UrlTree;
exports.UrlSegment = url_tree_1.UrlSegment;
var router_outlet_map_1 = require('./router_outlet_map');
exports.RouterOutletMap = router_outlet_map_1.RouterOutletMap;
var shared_1 = require('./shared');
exports.PRIMARY_OUTLET = shared_1.PRIMARY_OUTLET;
var router_providers_1 = require('./router_providers');
exports.provideRouter = router_providers_1.provideRouter;
var router_outlet_1 = require('./directives/router_outlet');
var router_link_1 = require('./directives/router_link');
exports.ROUTER_DIRECTIVES = [router_outlet_1.RouterOutlet, router_link_1.RouterLink];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHVCQUFpRyxVQUFVLENBQUM7QUFBbkcsaUNBQU07QUFBUyxtREFBZTtBQUFFLCtDQUFhO0FBQUUscURBQWdCO0FBQUUsbURBQWtDO0FBQzVHLCtCQUFvRCxrQkFBa0IsQ0FBQztBQUE5RCx1REFBYTtBQUFFLHFFQUErQztBQUN2RSw2QkFBeUYsZ0JBQWdCLENBQUM7QUFBakcsaURBQVc7QUFBRSx1REFBYztBQUFFLGlFQUFtQjtBQUFFLHVFQUErQztBQUMxRyx5QkFBbUMsWUFBWSxDQUFDO0FBQXZDLHFDQUFPO0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cm91dGVyX3Byb3ZpZGVycyc7XG5leHBvcnQgeyBDYW5BY3RpdmF0ZSwgQ2FuRGVhY3RpdmF0ZSB9IGZyb20gJy4vaW50ZXJmYWNlcyc7XG5cbmltcG9ydCB7IFJvdXRlck91dGxldCB9IGZyb20gJy4vZGlyZWN0aXZlcy9yb3V0ZXJfb3V0bGV0JztcbmltcG9ydCB7IFJvdXRlckxpbmsgfSBmcm9tICcuL2RpcmVjdGl2ZXMvcm91dGVyX2xpbmsnO1xuXG5leHBvcnQgY29uc3QgUk9VVEVSX0RJUkVDVElWRVMgPSBbUm91dGVyT3V0bGV0LCBSb3V0ZXJMaW5rXTsiXX0=

View File

@ -1,8 +0,0 @@
import { Observable } from 'rxjs/Observable';
import { ActivatedRouteSnapshot, RouterStateSnapshot } from './router_state';
export interface CanActivate {
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean;
}
export interface CanDeactivate<T> {
canDeactivate(component: T, route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean;
}

View File

@ -1,2 +0,0 @@
"use strict";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbnRlcmZhY2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge09ic2VydmFibGV9IGZyb20gJ3J4anMvT2JzZXJ2YWJsZSc7XG5pbXBvcnQge0FjdGl2YXRlZFJvdXRlU25hcHNob3QsIFJvdXRlclN0YXRlU25hcHNob3R9IGZyb20gJy4vcm91dGVyX3N0YXRlJztcblxuLyoqXG4gKiBBbiBpbnRlcmZhY2UgYSBjbGFzcyBjYW4gaW1wbGVtZW50IHRvIGJlIGEgZ3VhcmQgZGVjaWRpbmcgaWYgYSByb3V0ZSBjYW4gYmUgYWN0aXZhdGVkLlxuICovXG5leHBvcnQgaW50ZXJmYWNlIENhbkFjdGl2YXRlIHtcbiAgY2FuQWN0aXZhdGUocm91dGU6QWN0aXZhdGVkUm91dGVTbmFwc2hvdCwgc3RhdGU6Um91dGVyU3RhdGVTbmFwc2hvdCk6T2JzZXJ2YWJsZTxib29sZWFuPiB8IGJvb2xlYW47XG59XG5cbi8qKlxuICogQW4gaW50ZXJmYWNlIGEgY2xhc3MgY2FuIGltcGxlbWVudCB0byBiZSBhIGd1YXJkIGRlY2lkaW5nIGlmIGEgcm91dGUgY2FuIGJlIGRlYWN0aXZhdGVkLlxuICovXG5leHBvcnQgaW50ZXJmYWNlIENhbkRlYWN0aXZhdGU8VD4ge1xuICBjYW5EZWFjdGl2YXRlKGNvbXBvbmVudDpULCByb3V0ZTpBY3RpdmF0ZWRSb3V0ZVNuYXBzaG90LCBzdGF0ZTpSb3V0ZXJTdGF0ZVNuYXBzaG90KTpPYnNlcnZhYmxlPGJvb2xlYW4+IHwgYm9vbGVhbjtcbn0iXX0=

View File

@ -1,6 +0,0 @@
import { UrlTree } from './url_tree';
import { RouterStateSnapshot } from './router_state';
import { RouterConfig } from './config';
import { Type } from '@angular/core';
import { Observable } from 'rxjs/Observable';
export declare function recognize(rootComponentType: Type, config: RouterConfig, url: UrlTree): Observable<RouterStateSnapshot>;

File diff suppressed because one or more lines are too long

View File

@ -1,6 +0,0 @@
import { RouterStateSnapshot } from './router_state';
import { ComponentResolver } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/toPromise';
export declare function resolve(resolver: ComponentResolver, state: RouterStateSnapshot): Observable<RouterStateSnapshot>;

View File

@ -1,25 +0,0 @@
"use strict";
require('rxjs/add/operator/map');
var forkJoin_1 = require('rxjs/observable/forkJoin');
var fromPromise_1 = require('rxjs/observable/fromPromise');
require('rxjs/add/operator/toPromise');
function resolve(resolver, state) {
return resolveNode(resolver, state._root).map(function (_) { return state; });
}
exports.resolve = resolve;
function resolveNode(resolver, node) {
if (node.children.length === 0) {
return fromPromise_1.fromPromise(resolver.resolveComponent(node.value.component).then(function (factory) {
node.value._resolvedComponentFactory = factory;
return node.value;
}));
}
else {
var c = node.children.map(function (c) { return resolveNode(resolver, c).toPromise(); });
return forkJoin_1.forkJoin(c).map(function (_) { return resolver.resolveComponent(node.value.component).then(function (factory) {
node.value._resolvedComponentFactory = factory;
return node.value;
}); });
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yZXNvbHZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFJQSxRQUFPLHVCQUF1QixDQUFDLENBQUE7QUFDL0IseUJBQXVCLDBCQUEwQixDQUFDLENBQUE7QUFDbEQsNEJBQTBCLDZCQUE2QixDQUFDLENBQUE7QUFDeEQsUUFBTyw2QkFBNkIsQ0FBQyxDQUFBO0FBRXJDLGlCQUF3QixRQUEyQixFQUFFLEtBQTBCO0lBQzdFLE1BQU0sQ0FBQyxXQUFXLENBQUMsUUFBUSxFQUFFLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQyxHQUFHLENBQUMsVUFBQSxDQUFDLElBQUksT0FBQSxLQUFLLEVBQUwsQ0FBSyxDQUFDLENBQUM7QUFDNUQsQ0FBQztBQUZlLGVBQU8sVUFFdEIsQ0FBQTtBQUVELHFCQUFxQixRQUEyQixFQUFFLElBQXNDO0lBQ3RGLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsTUFBTSxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDL0IsTUFBTSxDQUFDLHlCQUFXLENBQUMsUUFBUSxDQUFDLGdCQUFnQixDQUFNLElBQUksQ0FBQyxLQUFLLENBQUMsU0FBUyxDQUFDLENBQUMsSUFBSSxDQ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x2ZXIsIGMpLnRvUHJvbWlzZSgpKTtcbiAgICByZXR1cm4gZm9ya0pvaW4oYykubWFwKF8gPT4gcmVzb2x2ZXIucmVzb2x2ZUNvbXBvbmVudCg8YW55Pm5vZGUudmFsdWUuY29tcG9uZW50KS50aGVuKGZhY3RvcnkgPT4ge1xuICAgICAgbm9kZS52YWx1ZS5fcmVzb2x2ZWRDb21wb25lbnRGYWN0b3J5ID0gZmFjdG9yeTtcbiAgICAgIHJldHVybiBub2RlLnZhbHVlO1xuICAgIH0pKTtcbiAgfVxufSJdfQ==

View File

@ -1,69 +0,0 @@
import { ComponentResolver, Type, Injector } from '@angular/core';
import { Location } from '@angular/common';
import { UrlSerializer } from './url_serializer';
import { RouterOutletMap } from './router_outlet_map';
import { UrlTree } from './url_tree';
import { Params } from './shared';
import { RouterState, ActivatedRoute } from './router_state';
import { RouterConfig } from './config';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/scan';
import 'rxjs/add/operator/mergeMap';
import 'rxjs/add/operator/concat';
import 'rxjs/add/operator/concatMap';
export interface NavigationExtras {
relativeTo?: ActivatedRoute;
queryParameters?: Params;
fragment?: string;
}
export declare class NavigationStart {
id: number;
url: UrlTree;
constructor(id: number, url: UrlTree);
}
export declare class NavigationEnd {
id: number;
url: UrlTree;
constructor(id: number, url: UrlTree);
}
export declare class NavigationCancel {
id: number;
url: UrlTree;
constructor(id: number, url: UrlTree);
}
export declare class NavigationError {
id: number;
url: UrlTree;
error: any;
constructor(id: number, url: UrlTree, error: any);
}
export declare type Event = NavigationStart | NavigationEnd | NavigationCancel | NavigationError;
export declare class Router {
private rootComponentType;
private resolver;
private urlSerializer;
private outletMap;
private location;
private injector;
private currentUrlTree;
private currentRouterState;
private config;
private locationSubscription;
private routerEvents;
private navigationId;
constructor(rootComponentType: Type, resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector);
readonly routerState: RouterState;
readonly urlTree: UrlTree;
readonly events: Observable<Event>;
navigateByUrl(url: string): Promise<boolean>;
resetConfig(config: RouterConfig): void;
dispose(): void;
createUrlTree(commands: any[], {relativeTo, queryParameters, fragment}?: NavigationExtras): UrlTree;
navigate(commands: any[], extras?: NavigationExtras): Promise<boolean>;
serializeUrl(url: UrlTree): string;
parseUrl(url: string): UrlTree;
private scheduleNavigation(url, pop);
private setUpLocationChangeListener();
private runNavigate(url, pop, id);
}

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
import { RouterOutlet } from './directives/router_outlet';
export declare class RouterOutletMap {
_outlets: {
[name: string]: RouterOutlet;
};
registerOutlet(name: string, outlet: RouterOutlet): void;
}

View File

@ -1,10 +0,0 @@
"use strict";
var RouterOutletMap = (function () {
function RouterOutletMap() {
this._outlets = {};
}
RouterOutletMap.prototype.registerOutlet = function (name, outlet) { this._outlets[name] = outlet; };
return RouterOutletMap;
}());
exports.RouterOutletMap = RouterOutletMap;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX291dGxldF9tYXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcm91dGVyX291dGxldF9tYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUtBO0lBQUE7UUFFRSxhQUFRLEdBQW1DLEVBQUUsQ0FBQztJQUVoRCxDQUFDO0lBREMsd0NBQWMsR0FBZCxVQUFlLElBQVksRUFBRSxNQUFvQixJQUFVLElBQUksQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLEdBQUcsTUFBTSxDQUFDLENBQUMsQ0FBQztJQUM1RixzQkFBQztBQUFELENBQUMsQUFKRCxJQUlDO0FBSlksdUJBQWUsa0JBSTNCLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBSb3V0ZXJPdXRsZXQgfSBmcm9tICcuL2RpcmVjdGl2ZXMvcm91dGVyX291dGxldCc7XG5cbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjbGFzcyBSb3V0ZXJPdXRsZXRNYXAge1xuICAvKiogQGludGVybmFsICovXG4gIF9vdXRsZXRzOiB7W25hbWU6IHN0cmluZ106IFJvdXRlck91dGxldH0gPSB7fTtcbiAgcmVnaXN0ZXJPdXRsZXQobmFtZTogc3RyaW5nLCBvdXRsZXQ6IFJvdXRlck91dGxldCk6IHZvaWQgeyB0aGlzLl9vdXRsZXRzW25hbWVdID0gb3V0bGV0OyB9XG59XG4iXX0=

View File

@ -1,2 +0,0 @@
import { RouterConfig } from './config';
export declare function provideRouter(config: RouterConfig): any[];

View File

@ -1,11 +0,0 @@
"use strict";
var common = require('./common_router_providers');
var platform_browser_1 = require('@angular/platform-browser');
var common_1 = require('@angular/common');
function provideRouter(config) {
return [
{ provide: common_1.PlatformLocation, useClass: platform_browser_1.BrowserPlatformLocation }
].concat(common.provideRouter(config));
}
exports.provideRouter = provideRouter;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX3Byb3ZpZGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yb3V0ZXJfcHJvdmlkZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQSxJQUFZLE1BQU0sV0FBTSwyQkFBMkIsQ0FBQyxDQUFBO0FBQ3BELGlDQUFzQywyQkFBMkIsQ0FBQyxDQUFBO0FBQ2xFLHVCQUErQixpQkFBaUIsQ0FBQyxDQUFBO0FBb0JqRCx1QkFBOEIsTUFBb0I7SUFDaEQsTUFBTSxDQUFDO1FBQ0wsRUFBQyxPQUFPLEVBQUUseUJBQWdCLEVBQUUsUUFBUSxFQUFFLDBDQUF1QixFQUFDO2FBQzNELE1BQU0sQ0FBQyxhQUFhLENBQUMsTUFBTSxDQUFDLENBQ2hDLENBQUM7QUFDSixDQUFDO0FBTGUscUJBQWEsZ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Tree, TreeNode } from './utils/tree';
import { UrlSegment } from './url_tree';
import { Route } from './config';
import { Params } from './shared';
import { Observable } from 'rxjs/Observable';
import { Type, ComponentFactory } from '@angular/core';
export declare class RouterState extends Tree<ActivatedRoute> {
queryParams: Observable<Params>;
fragment: Observable<string>;
snapshot: RouterStateSnapshot;
constructor(root: TreeNode<ActivatedRoute>, queryParams: Observable<Params>, fragment: Observable<string>, snapshot: RouterStateSnapshot);
}
export declare function createEmptyState(rootComponent: Type): RouterState;
export declare class ActivatedRoute {
urlSegments: Observable<UrlSegment[]>;
params: Observable<Params>;
outlet: string;
component: Type | string;
_futureSnapshot: ActivatedRouteSnapshot;
snapshot: ActivatedRouteSnapshot;
constructor(urlSegments: Observable<UrlSegment[]>, params: Observable<Params>, outlet: string, component: Type | string, futureSnapshot: ActivatedRouteSnapshot);
}
export declare class ActivatedRouteSnapshot {
urlSegments: UrlSegment[];
params: Params;
outlet: string;
component: Type | string;
_resolvedComponentFactory: ComponentFactory<any>;
_routeConfig: Route | null;
_lastUrlSegment: UrlSegment;
constructor(urlSegments: UrlSegment[], params: Params, outlet: string, component: Type | string, routeConfig: Route | null, lastUrlSegment: UrlSegment);
}
export declare class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {
queryParams: Params;
fragment: string | null;
constructor(root: TreeNode<ActivatedRouteSnapshot>, queryParams: Params, fragment: string | null);
}
export declare function advanceActivatedRoute(route: ActivatedRoute): void;

File diff suppressed because one or more lines are too long

View File

@ -1,4 +0,0 @@
export declare const PRIMARY_OUTLET: string;
export declare type Params = {
[key: string]: string;
};

View File

@ -1,3 +0,0 @@
"use strict";
exports.PRIMARY_OUTLET = "PRIMARY_OUTLET";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhcmVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NoYXJlZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBSWEsc0JBQWMsR0FBVyxnQkFBZ0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogTmFtZSBvZiB0aGUgcHJpbWFyeSBvdXRsZXQuXG4gKiBAdHlwZSB7c3RyaW5nfVxuICovXG5leHBvcnQgY29uc3QgUFJJTUFSWV9PVVRMRVQ6IHN0cmluZyA9IFwiUFJJTUFSWV9PVVRMRVRcIjtcblxuLyoqXG4gKiBBIGNvbGxlY3Rpb24gb2YgcGFyYW1ldGVycy5cbiAqL1xuZXhwb3J0IHR5cGUgUGFyYW1zID0geyBba2V5OiBzdHJpbmddOiBzdHJpbmcgfTtcbiJdfQ==

View File

@ -1,10 +0,0 @@
import { UrlTree, UrlSegment } from './url_tree';
export declare abstract class UrlSerializer {
abstract parse(url: string): UrlTree;
abstract serialize(tree: UrlTree): string;
}
export declare class DefaultUrlSerializer implements UrlSerializer {
parse(url: string): UrlTree;
serialize(tree: UrlTree): string;
}
export declare function serializeSegment(segment: UrlSegment): string;

File diff suppressed because one or more lines are too long

View File

@ -1,23 +0,0 @@
import { Tree, TreeNode } from './utils/tree';
export declare function createEmptyUrlTree(): UrlTree;
export declare class UrlTree extends Tree<UrlSegment> {
queryParameters: {
[key: string]: string;
};
fragment: string | null;
constructor(root: TreeNode<UrlSegment>, queryParameters: {
[key: string]: string;
}, fragment: string | null);
}
export declare class UrlSegment {
path: string;
parameters: {
[key: string]: string;
};
outlet: string;
constructor(path: string, parameters: {
[key: string]: string;
}, outlet: string);
toString(): string;
}
export declare function equalUrlSegments(a: UrlSegment[], b: UrlSegment[]): boolean;

View File

@ -1,56 +0,0 @@
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var tree_1 = require('./utils/tree');
var collection_1 = require('./utils/collection');
var shared_1 = require('./shared');
function createEmptyUrlTree() {
return new UrlTree(new tree_1.TreeNode(new UrlSegment("", {}, shared_1.PRIMARY_OUTLET), []), {}, null);
}
exports.createEmptyUrlTree = createEmptyUrlTree;
var UrlTree = (function (_super) {
__extends(UrlTree, _super);
function UrlTree(root, queryParameters, fragment) {
_super.call(this, root);
this.queryParameters = queryParameters;
this.fragment = fragment;
}
return UrlTree;
}(tree_1.Tree));
exports.UrlTree = UrlTree;
var UrlSegment = (function () {
function UrlSegment(path, parameters, outlet) {
this.path = path;
this.parameters = parameters;
this.outlet = outlet;
}
UrlSegment.prototype.toString = function () {
var params = [];
for (var prop in this.parameters) {
if (this.parameters.hasOwnProperty(prop)) {
params.push(prop + "=" + this.parameters[prop]);
}
}
var paramsString = params.length > 0 ? "(" + params.join(',') + ")" : '';
var outlet = this.outlet === shared_1.PRIMARY_OUTLET ? '' : this.outlet + ":";
return "" + outlet + this.path + paramsString;
};
return UrlSegment;
}());
exports.UrlSegment = UrlSegment;
function equalUrlSegments(a, b) {
if (a.length !== b.length)
return false;
for (var i = 0; i < a.length; ++i) {
if (a[i].path !== b[i].path)
return false;
if (!collection_1.shallowEqual(a[i].parameters, b[i].parameters))
return false;
}
return true;
}
exports.equalUrlSegments = equalUrlSegments;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXJsX3RyZWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdXJsX3RyZWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEscUJBQStCLGNBQWMsQ0FBQyxDQUFBO0FBQzlDLDJCQUE2QixvQkFBb0IsQ0FBQyxDQUFBO0FBQ2xELHVCQUErQixVQUFVLENBQUMsQ0FBQTtBQUUxQztJQUNFLE1BQU0sQ0FBQyxJQUFJLE9BQU8sQ0FBQyxJQUFJLGVBQVEsQ0FBYSxJQUFJLFVBQVUsQ0FBQyxFQUFFLEVBQUUsRUFBRSxFQUFFLHVCQUFjLENBQUM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LnBhcmFtZXRlcnMpIHtcbiAgICAgIGlmICh0aGlzLnBhcmFtZXRlcnMuaGFzT3duUHJvcGVydHkocHJvcCkpIHtcbiAgICAgICAgcGFyYW1zLnB1c2goYCR7cHJvcH09JHt0aGlzLnBhcmFtZXRlcnNbcHJvcF19YCk7XG4gICAgICB9XG4gICAgfVxuICAgIGNvbnN0IHBhcmFtc1N0cmluZyA9IHBhcmFtcy5sZW5ndGggPiAwID8gYCgke3BhcmFtcy5qb2luKCcsJyl9KWAgOiAnJztcbiAgICBjb25zdCBvdXRsZXQgPSB0aGlzLm91dGxldCA9PT0gUFJJTUFSWV9PVVRMRVQgPyAnJyA6IGAke3RoaXMub3V0bGV0fTpgO1xuICAgIHJldHVybiBgJHtvdXRsZXR9JHt0aGlzLnBhdGh9JHtwYXJhbXNTdHJpbmd9YDtcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gZXF1YWxVcmxTZWdtZW50cyhhOiBVcmxTZWdtZW50W10sIGI6IFVybFNlZ21lbnRbXSk6IGJvb2xlYW4ge1xuICBpZiAoYS5sZW5ndGggIT09IGIubGVuZ3RoKSByZXR1cm4gZmFsc2U7XG4gIGZvciAobGV0IGkgPSAwOyBpIDwgYS5sZW5ndGg7ICsraSkge1xuICAgIGlmIChhW2ldLnBhdGggIT09IGJbaV0ucGF0aCkgcmV0dXJuIGZhbHNlO1xuICAgIGlmICghc2hhbGxvd0VxdWFsKGFbaV0ucGFyYW1ldGVycywgYltpXS5wYXJhbWV0ZXJzKSkgcmV0dXJuIGZhbHNlO1xuICB9XG4gIHJldHVybiB0cnVlO1xufVxuIl19

View File

@ -1,18 +0,0 @@
export declare function shallowEqual(a: {
[x: string]: any;
}, b: {
[x: string]: any;
}): boolean;
export declare function flatten<T>(a: T[][]): T[];
export declare function first<T>(a: T[]): T | null;
export declare function and(bools: boolean[]): boolean;
export declare function merge<V>(m1: {
[key: string]: V;
}, m2: {
[key: string]: V;
}): {
[key: string]: V;
};
export declare function forEach<K, V>(map: {
[key: string]: V;
}, callback: Function): void;

View File

@ -1,59 +0,0 @@
"use strict";
function shallowEqual(a, b) {
var k1 = Object.keys(a);
var k2 = Object.keys(b);
if (k1.length != k2.length) {
return false;
}
var key;
for (var i = 0; i < k1.length; i++) {
key = k1[i];
if (a[key] !== b[key]) {
return false;
}
}
return true;
}
exports.shallowEqual = shallowEqual;
function flatten(a) {
var target = [];
for (var i = 0; i < a.length; ++i) {
for (var j = 0; j < a[i].length; ++j) {
target.push(a[i][j]);
}
}
return target;
}
exports.flatten = flatten;
function first(a) {
return a.length > 0 ? a[0] : null;
}
exports.first = first;
function and(bools) {
return bools.reduce(function (a, b) { return a && b; }, true);
}
exports.and = and;
function merge(m1, m2) {
var m = {};
for (var attr in m1) {
if (m1.hasOwnProperty(attr)) {
m[attr] = m1[attr];
}
}
for (var attr in m2) {
if (m2.hasOwnProperty(attr)) {
m[attr] = m2[attr];
}
}
return m;
}
exports.merge = merge;
function forEach(map, callback) {
for (var prop in map) {
if (map.hasOwnProperty(prop)) {
callback(map[prop], prop);
}
}
}
exports.forEach = forEach;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlscy9jb2xsZWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxzQkFBNkIsQ0FBbUIsRUFBRSxDQUFtQjtJQUNuRSxJQUFJLEVBQUUsR0FBRyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBQ3hCLElBQUksRUFBRSxHQUFHLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDeEIsRUFBRSxDQUFDLENBQUMsRUFBRSxDQUFDLE1BQU0sSUFBSSxFQUFFLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztRQUM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@@
export declare class Tree<T> {
_root: TreeNode<T>;
constructor(root: TreeNode<T>);
readonly root: T;
parent(t: T): T | null;
children(t: T): T[];
firstChild(t: T): T | null;
siblings(t: T): T[];
pathFromRoot(t: T): T[];
contains(tree: Tree<T>): boolean;
}
export declare class TreeNode<T> {
value: T;
children: TreeNode<T>[];
constructor(value: T, children: TreeNode<T>[]);
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
module.exports = require('src/index');

View File

@ -1,15 +1,15 @@
{
"name": "vladivostok",
"version": "0.9.1",
"name": "@angular/router",
"version": "3.0.0-alpha.0",
"description": "",
"main": "./build/src/index.js",
"jsnext:main": "./build/es6/index.js",
"main": "./dist/index.js",
"jsnext:main": "./dist/esm/index.js",
"scripts": {
"karma": "karma start",
"test": "npm run build; karma start",
"build_watch": "rm -rf dist; tsc -w",
"build": "rm -rf dist; tsc",
"build_npm": "rm -rf dist && tsc -p tsconfig.publish.es5.json && tsc -p tsconfig.publish.es6.json",
"build_npm": "rm -rf dist && tsc -p tsconfig.publish.es5.json && tsc -p tsconfig.publish.esm.json",
"postbuild_npm": "cp package.json README.md dist/ && npm run rewrite_npm_package",
"postinstall": "typings install",
"rewrite_npm_package": "node --harmony_destructuring tools/rewrite-published-package.js",
@ -70,5 +70,5 @@
"tslint": "^3.6.0",
"codelyzer": "0.0.14"
},
"typings": "build/src/index.d.ts"
"typings": "dist/index.d.ts"
}

View File

@ -9,7 +9,7 @@ var [MAIN, JSNEXT_MAIN] = ['main', 'jsnext:main'].map(k => srcPackage[k].replace
var outPackage = Object.assign({}, srcPackage, {
peerDependencies: srcPackage.dependencies,
main: MAIN,
typings: "router.d.ts",
typings: "index.d.ts",
"jsnext:main": JSNEXT_MAIN,
dependencies: undefined
});

View File

@ -6,7 +6,7 @@
"target": "es5",
"noImplicitAny": false,
"outDir": "dist",
"rootDir": ".",
"rootDir": "src",
"inlineSourceMap": true,
"inlineSources": true,
"declaration": true,

View File

@ -4,8 +4,8 @@
"emitDecoratorMetadata": true,
"target": "es6",
"noImplicitAny": false,
"outDir": "dist/es6",
"rootDir": ".",
"outDir": "dist/esm",
"rootDir": "src",
"inlineSourceMap": true,
"inlineSources": true,
"declaration": true,

View File

@ -1,5 +1,5 @@
{
"name": "vladivostok",
"name": "@angular/router",
"version": false,
"globalDependencies": {
"jasmine": "registry:dt/jasmine#2.2.0+20160505161446",