@angular/router 0.1.0 → 2.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/router.umd.js +1812 -0
- package/bundles/router.umd.min.js +2 -0
- package/esm/index.d.ts +15 -0
- package/esm/index.js +15 -0
- package/esm/index.js.map +1 -0
- package/esm/src/constants.d.ts +5 -0
- package/esm/src/constants.js +6 -0
- package/esm/src/constants.js.map +1 -0
- package/esm/src/constants.metadata.json +1 -0
- package/esm/src/core_private.d.ts +3 -0
- package/esm/src/core_private.js +4 -0
- package/esm/src/core_private.js.map +1 -0
- package/esm/src/core_private.metadata.json +1 -0
- package/esm/src/directives/router_directives.d.ts +21 -0
- package/esm/src/directives/router_directives.js +24 -0
- package/esm/src/directives/router_directives.js.map +1 -0
- package/esm/src/directives/router_directives.metadata.json +1 -0
- package/esm/src/directives/router_link.d.ts +49 -0
- package/esm/src/directives/router_link.js +68 -0
- package/esm/src/directives/router_link.js.map +1 -0
- package/esm/src/directives/router_link.metadata.json +1 -0
- package/esm/src/directives/router_outlet.d.ts +36 -0
- package/esm/src/directives/router_outlet.js +42 -0
- package/esm/src/directives/router_outlet.js.map +1 -0
- package/esm/src/directives/router_outlet.metadata.json +1 -0
- package/esm/src/facade/async.d.ts +90 -0
- package/esm/src/facade/async.js +137 -0
- package/esm/src/facade/async.js.map +1 -0
- package/esm/src/facade/base_wrapped_exception.d.ts +14 -0
- package/esm/src/facade/base_wrapped_exception.js +17 -0
- package/esm/src/facade/base_wrapped_exception.js.map +1 -0
- package/esm/src/facade/collection.d.ts +103 -0
- package/esm/src/facade/collection.js +343 -0
- package/esm/src/facade/collection.js.map +1 -0
- package/esm/src/facade/collection.metadata.json +1 -0
- package/esm/src/facade/exception_handler.d.ts +29 -0
- package/esm/src/facade/exception_handler.js +124 -0
- package/esm/src/facade/exception_handler.js.map +1 -0
- package/esm/src/facade/exceptions.d.ts +32 -0
- package/esm/src/facade/exceptions.js +42 -0
- package/esm/src/facade/exceptions.js.map +1 -0
- package/esm/src/facade/exceptions.metadata.json +1 -0
- package/esm/src/facade/lang.d.ts +158 -0
- package/esm/src/facade/lang.js +386 -0
- package/esm/src/facade/lang.js.map +1 -0
- package/esm/src/facade/lang.metadata.json +1 -0
- package/esm/src/facade/promise.d.ts +17 -0
- package/esm/src/facade/promise.js +41 -0
- package/esm/src/facade/promise.js.map +1 -0
- package/esm/src/interfaces.d.ts +23 -0
- package/esm/src/interfaces.js +1 -0
- package/esm/src/interfaces.js.map +1 -0
- package/esm/src/lifecycle_reflector.d.ts +1 -0
- package/esm/src/lifecycle_reflector.js +10 -0
- package/esm/src/lifecycle_reflector.js.map +1 -0
- package/esm/src/link.d.ts +2 -0
- package/esm/src/link.js +183 -0
- package/esm/src/link.js.map +1 -0
- package/esm/src/metadata/decorators.d.ts +16 -0
- package/esm/src/metadata/decorators.js +9 -0
- package/esm/src/metadata/decorators.js.map +1 -0
- package/esm/src/metadata/decorators.metadata.json +1 -0
- package/esm/src/metadata/metadata.d.ts +48 -0
- package/esm/src/metadata/metadata.js +48 -0
- package/esm/src/metadata/metadata.js.map +1 -0
- package/esm/src/recognize.d.ts +4 -0
- package/esm/src/recognize.js +164 -0
- package/esm/src/recognize.js.map +1 -0
- package/esm/src/router.d.ts +95 -0
- package/esm/src/router.js +243 -0
- package/esm/src/router.js.map +1 -0
- package/esm/src/router_providers.d.ts +23 -0
- package/esm/src/router_providers.js +26 -0
- package/esm/src/router_providers.js.map +1 -0
- package/esm/src/router_providers.metadata.json +1 -0
- package/esm/src/router_providers_common.d.ts +11 -0
- package/esm/src/router_providers_common.js +32 -0
- package/esm/src/router_providers_common.js.map +1 -0
- package/esm/src/router_providers_common.metadata.json +1 -0
- package/esm/src/router_url_serializer.d.ts +21 -0
- package/esm/src/router_url_serializer.js +164 -0
- package/esm/src/router_url_serializer.js.map +1 -0
- package/esm/src/segments.d.ts +51 -0
- package/esm/src/segments.js +137 -0
- package/esm/src/segments.js.map +1 -0
- package/esm/src/segments.metadata.json +1 -0
- package/esm/testing/router_testing_providers.d.ts +1 -0
- package/esm/testing/router_testing_providers.js +31 -0
- package/esm/testing/router_testing_providers.js.map +1 -0
- package/esm/testing/router_testing_providers.metadata.json +1 -0
- package/esm/testing.d.ts +1 -0
- package/esm/testing.js +2 -0
- package/esm/testing.js.map +1 -0
- package/index.d.ts +15 -0
- package/index.js +31 -0
- package/index.js.map +1 -0
- package/package.json +16 -1
- package/src/constants.d.ts +5 -0
- package/src/constants.js +7 -0
- package/src/constants.js.map +1 -0
- package/src/constants.metadata.json +1 -0
- package/src/core_private.d.ts +3 -0
- package/src/core_private.js +5 -0
- package/src/core_private.js.map +1 -0
- package/src/core_private.metadata.json +1 -0
- package/src/directives/router_directives.d.ts +21 -0
- package/src/directives/router_directives.js +25 -0
- package/src/directives/router_directives.js.map +1 -0
- package/src/directives/router_directives.metadata.json +1 -0
- package/src/directives/router_link.d.ts +49 -0
- package/src/directives/router_link.js +76 -0
- package/src/directives/router_link.js.map +1 -0
- package/src/directives/router_link.metadata.json +1 -0
- package/src/directives/router_outlet.d.ts +36 -0
- package/src/directives/router_outlet.js +53 -0
- package/src/directives/router_outlet.js.map +1 -0
- package/src/directives/router_outlet.metadata.json +1 -0
- package/src/facade/async.d.ts +90 -0
- package/src/facade/async.js +160 -0
- package/src/facade/async.js.map +1 -0
- package/src/facade/base_wrapped_exception.d.ts +14 -0
- package/src/facade/base_wrapped_exception.js +50 -0
- package/src/facade/base_wrapped_exception.js.map +1 -0
- package/src/facade/collection.d.ts +103 -0
- package/src/facade/collection.js +368 -0
- package/src/facade/collection.js.map +1 -0
- package/src/facade/collection.metadata.json +1 -0
- package/src/facade/exception_handler.d.ts +29 -0
- package/src/facade/exception_handler.js +133 -0
- package/src/facade/exception_handler.js.map +1 -0
- package/src/facade/exceptions.d.ts +32 -0
- package/src/facade/exceptions.js +82 -0
- package/src/facade/exceptions.js.map +1 -0
- package/src/facade/exceptions.metadata.json +1 -0
- package/src/facade/lang.d.ts +158 -0
- package/src/facade/lang.js +480 -0
- package/src/facade/lang.js.map +1 -0
- package/src/facade/lang.metadata.json +1 -0
- package/src/facade/promise.d.ts +17 -0
- package/src/facade/promise.js +49 -0
- package/src/facade/promise.js.map +1 -0
- package/src/interfaces.d.ts +23 -0
- package/src/interfaces.js +2 -0
- package/src/interfaces.js.map +1 -0
- package/src/lifecycle_reflector.d.ts +1 -0
- package/src/lifecycle_reflector.js +12 -0
- package/src/lifecycle_reflector.js.map +1 -0
- package/src/link.d.ts +2 -0
- package/src/link.js +189 -0
- package/src/link.js.map +1 -0
- package/src/metadata/decorators.d.ts +16 -0
- package/src/metadata/decorators.js +10 -0
- package/src/metadata/decorators.js.map +1 -0
- package/src/metadata/decorators.metadata.json +1 -0
- package/src/metadata/metadata.d.ts +48 -0
- package/src/metadata/metadata.js +66 -0
- package/src/metadata/metadata.js.map +1 -0
- package/src/recognize.d.ts +4 -0
- package/src/recognize.js +172 -0
- package/src/recognize.js.map +1 -0
- package/src/router.d.ts +95 -0
- package/src/router.js +276 -0
- package/src/router.js.map +1 -0
- package/src/router_providers.d.ts +23 -0
- package/src/router_providers.js +27 -0
- package/src/router_providers.js.map +1 -0
- package/src/router_providers.metadata.json +1 -0
- package/src/router_providers_common.d.ts +11 -0
- package/src/router_providers_common.js +35 -0
- package/src/router_providers_common.js.map +1 -0
- package/src/router_providers_common.metadata.json +1 -0
- package/src/router_url_serializer.d.ts +21 -0
- package/src/router_url_serializer.js +184 -0
- package/src/router_url_serializer.js.map +1 -0
- package/src/segments.d.ts +51 -0
- package/src/segments.js +181 -0
- package/src/segments.js.map +1 -0
- package/src/segments.metadata.json +1 -0
- package/testing/router_testing_providers.d.ts +1 -0
- package/testing/router_testing_providers.js +35 -0
- package/testing/router_testing_providers.js.map +1 -0
- package/testing/router_testing_providers.metadata.json +1 -0
- package/testing.d.ts +1 -0
- package/testing.js +6 -0
- package/testing.js.map +1 -0
- package/angular1/angular_1_router.js +0 -2922
- package/angular1/ng_route_shim.js +0 -349
- package/angular2/router.dev.js +0 -3107
- package/angular2/router.js +0 -3107
- package/angular2/router.min.js +0 -3
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { LocationStrategy } from '@angular/common';
|
|
2
|
+
import { OnDestroy } from '@angular/core';
|
|
3
|
+
import { Router } from '../router';
|
|
4
|
+
import { RouteSegment } from '../segments';
|
|
5
|
+
/**
|
|
6
|
+
* The RouterLink directive lets you link to specific parts of your app.
|
|
7
|
+
*
|
|
8
|
+
* Consider the following route configuration:
|
|
9
|
+
|
|
10
|
+
* ```
|
|
11
|
+
* @Routes([
|
|
12
|
+
* { path: '/user', component: UserCmp }
|
|
13
|
+
* ]);
|
|
14
|
+
* class MyComp {}
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* When linking to this `User` route, you can write:
|
|
18
|
+
*
|
|
19
|
+
* ```
|
|
20
|
+
* <a [routerLink]="['/user']">link to user component</a>
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* RouterLink expects the value to be an array of path segments, followed by the params
|
|
24
|
+
* for that level of routing. For instance `['/team', {teamId: 1}, 'user', {userId: 2}]`
|
|
25
|
+
* means that we want to generate a link to `/team;teamId=1/user;userId=2`.
|
|
26
|
+
*
|
|
27
|
+
* The first segment name can be prepended with `/`, `./`, or `../`.
|
|
28
|
+
* If the segment begins with `/`, the router will look up the route from the root of the app.
|
|
29
|
+
* If the segment begins with `./`, or doesn't begin with a slash, the router will
|
|
30
|
+
* instead look in the current component's children for the route.
|
|
31
|
+
* And if the segment begins with `../`, the router will go up one segment in the url.
|
|
32
|
+
*
|
|
33
|
+
* See {@link Router.createUrlTree} for more information.
|
|
34
|
+
*/
|
|
35
|
+
export declare class RouterLink implements OnDestroy {
|
|
36
|
+
private _routeSegment;
|
|
37
|
+
private _router;
|
|
38
|
+
private _locationStrategy;
|
|
39
|
+
target: string;
|
|
40
|
+
private _commands;
|
|
41
|
+
private _subscription;
|
|
42
|
+
href: string;
|
|
43
|
+
isActive: boolean;
|
|
44
|
+
constructor(_routeSegment: RouteSegment, _router: Router, _locationStrategy: LocationStrategy);
|
|
45
|
+
ngOnDestroy(): void;
|
|
46
|
+
routerLink: any[] | any;
|
|
47
|
+
onClick(button: number, ctrlKey: boolean, metaKey: boolean): boolean;
|
|
48
|
+
private _updateTargetUrlAndHref();
|
|
49
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var common_1 = require('@angular/common');
|
|
3
|
+
var core_1 = require('@angular/core');
|
|
4
|
+
var async_1 = require('../facade/async');
|
|
5
|
+
var lang_1 = require('../facade/lang');
|
|
6
|
+
var router_1 = require('../router');
|
|
7
|
+
var segments_1 = require('../segments');
|
|
8
|
+
var RouterLink = (function () {
|
|
9
|
+
function RouterLink(_routeSegment, _router, _locationStrategy) {
|
|
10
|
+
var _this = this;
|
|
11
|
+
this._routeSegment = _routeSegment;
|
|
12
|
+
this._router = _router;
|
|
13
|
+
this._locationStrategy = _locationStrategy;
|
|
14
|
+
this._commands = [];
|
|
15
|
+
this.isActive = false;
|
|
16
|
+
// because auxiliary links take existing primary and auxiliary routes into account,
|
|
17
|
+
// we need to update the link whenever params or other routes change.
|
|
18
|
+
this._subscription =
|
|
19
|
+
async_1.ObservableWrapper.subscribe(_router.changes, function (_) { _this._updateTargetUrlAndHref(); });
|
|
20
|
+
}
|
|
21
|
+
RouterLink.prototype.ngOnDestroy = function () { async_1.ObservableWrapper.dispose(this._subscription); };
|
|
22
|
+
Object.defineProperty(RouterLink.prototype, "routerLink", {
|
|
23
|
+
set: function (data) {
|
|
24
|
+
if (lang_1.isArray(data)) {
|
|
25
|
+
this._commands = data;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
this._commands = [data];
|
|
29
|
+
}
|
|
30
|
+
this._updateTargetUrlAndHref();
|
|
31
|
+
},
|
|
32
|
+
enumerable: true,
|
|
33
|
+
configurable: true
|
|
34
|
+
});
|
|
35
|
+
RouterLink.prototype.onClick = function (button, ctrlKey, metaKey) {
|
|
36
|
+
if (button != 0 || ctrlKey || metaKey) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
if (lang_1.isString(this.target) && this.target != '_self') {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
this._router.navigate(this._commands, this._routeSegment);
|
|
43
|
+
return false;
|
|
44
|
+
};
|
|
45
|
+
RouterLink.prototype._updateTargetUrlAndHref = function () {
|
|
46
|
+
var tree = this._router.createUrlTree(this._commands, this._routeSegment);
|
|
47
|
+
if (lang_1.isPresent(tree)) {
|
|
48
|
+
this.href = this._locationStrategy.prepareExternalUrl(this._router.serializeUrl(tree));
|
|
49
|
+
this.isActive = this._router.urlTree.contains(tree);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
this.isActive = false;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
/** @nocollapse */
|
|
56
|
+
RouterLink.decorators = [
|
|
57
|
+
{ type: core_1.Directive, args: [{ selector: '[routerLink]' },] },
|
|
58
|
+
];
|
|
59
|
+
/** @nocollapse */
|
|
60
|
+
RouterLink.ctorParameters = [
|
|
61
|
+
{ type: segments_1.RouteSegment, },
|
|
62
|
+
{ type: router_1.Router, },
|
|
63
|
+
{ type: common_1.LocationStrategy, },
|
|
64
|
+
];
|
|
65
|
+
/** @nocollapse */
|
|
66
|
+
RouterLink.propDecorators = {
|
|
67
|
+
'target': [{ type: core_1.Input },],
|
|
68
|
+
'href': [{ type: core_1.HostBinding },],
|
|
69
|
+
'isActive': [{ type: core_1.HostBinding, args: ['class.router-link-active',] },],
|
|
70
|
+
'routerLink': [{ type: core_1.Input },],
|
|
71
|
+
'onClick': [{ type: core_1.HostListener, args: ['click', ['$event.button', '$event.ctrlKey', '$event.metaKey'],] },],
|
|
72
|
+
};
|
|
73
|
+
return RouterLink;
|
|
74
|
+
}());
|
|
75
|
+
exports.RouterLink = RouterLink;
|
|
76
|
+
//# sourceMappingURL=router_link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router_link.js","sourceRoot":"","sources":["../../../../../modules/@angular/router/src/directives/router_link.ts"],"names":[],"mappings":";AAAA,uBAA+B,iBAAiB,CAAC,CAAA;AACjD,qBAAqE,eAAe,CAAC,CAAA;AAErF,sBAAgC,iBAAiB,CAAC,CAAA;AAClD,qBAA2C,gBAAgB,CAAC,CAAA;AAC5D,uBAAqB,WAAW,CAAC,CAAA;AACjC,yBAA2B,aAAa,CAAC,CAAA;AACzC;IAIE,oBACY,aAA2B,EAAU,OAAe,EACpD,iBAAmC;QANjD,iBA8DC;QAzDa,kBAAa,GAAb,aAAa,CAAc;QAAU,YAAO,GAAP,OAAO,CAAQ;QACpD,sBAAiB,GAAjB,iBAAiB,CAAkB;QALvC,cAAS,GAAU,EAAE,CAAC;QACY,aAAQ,GAAY,KAAK,CAAC;QAKlE,mFAAmF;QACnF,qEAAqE;QACrE,IAAI,CAAC,aAAa;YACd,yBAAiB,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,UAAC,CAAC,IAAO,KAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/F,CAAC;IAED,gCAAW,GAAX,cAAgB,yBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAChE,sBAAI,kCAAU;aAAd,UAAe,IAAe;YAC5B,EAAE,CAAC,CAAC,cAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAClB,IAAI,CAAC,SAAS,GAAU,IAAI,CAAC;YAC/B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC;YACD,IAAI,CAAC,uBAAuB,EAAE,CAAC;QACjC,CAAC;;;OAAA;IACD,4BAAO,GAAP,UAAQ,MAAc,EAAE,OAAgB,EAAE,OAAgB;QACxD,EAAE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ACzB,CAAC;IACF,kBAAkB;IACX,yBAAc,GAA2C;QAChE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,YAAK,EAAE,EAAE;QAC5B,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,kBAAW,EAAE,EAAE;QAChC,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,kBAAW,EAAE,IAAI,EAAE,CAAC,0BAA0B,EAAG,EAAE,EAAE;QAC1E,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,YAAK,EAAE,EAAE;QAChC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,mBAAY,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,EAAG,EAAE,EAAE;KAC7G,CAAC;IACF,iBAAC;AAAD,CAAC,AA9DD,IA8DC;AA9DY,kBAAU,aA8DtB,CAAA","sourcesContent":["import {LocationStrategy} from '@angular/common';\nimport {Directive, HostBinding, HostListener, Input, OnDestroy} from '@angular/core';\n\nimport {ObservableWrapper} from '../facade/async';\nimport {isArray, isPresent, isString} from '../facade/lang';\nimport {Router} from '../router';\nimport {RouteSegment} from '../segments';\nexport class RouterLink implements OnDestroy { target: string;\n private _commands: any[] = [];\n private _subscription: any; href: string; isActive: boolean = false;\n\n constructor(\n private _routeSegment: RouteSegment, private _router: Router,\n private _locationStrategy: LocationStrategy) {\n // because auxiliary links take existing primary and auxiliary routes into account,\n // we need to update the link whenever params or other routes change.\n this._subscription =\n ObservableWrapper.subscribe(_router.changes, (_) => { this._updateTargetUrlAndHref(); });\n }\n\n ngOnDestroy() { ObservableWrapper.dispose(this._subscription); }\n set routerLink(data: any[]|any) {\n if (isArray(data)) {\n this._commands = <any[]>data;\n } else {\n this._commands = [data];\n }\n this._updateTargetUrlAndHref();\n }\n onClick(button: number, ctrlKey: boolean, metaKey: boolean): boolean {\n if (button != 0 || ctrlKey || metaKey) {\n return true;\n }\n\n if (isString(this.target) && this.target != '_self') {\n return true;\n }\n\n this._router.navigate(this._commands, this._routeSegment);\n return false;\n }\n\n private _updateTargetUrlAndHref(): void {\n let tree = this._router.createUrlTree(this._commands, this._routeSegment);\n if (isPresent(tree)) {\n this.href = this._locationStrategy.prepareExternalUrl(this._router.serializeUrl(tree));\n this.isActive = this._router.urlTree.contains(tree);\n } else {\n this.isActive = false;\n }\n }\n/** @nocollapse */\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{selector: '[routerLink]'}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: {type: Function, decorators?: DecoratorInvocation[]}[] = [\n{type: RouteSegment, },\n{type: Router, },\n{type: LocationStrategy, },\n];\n/** @nocollapse */\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'target': [{ type: Input },],\n'href': [{ type: HostBinding },],\n'isActive': [{ type: HostBinding, args: ['class.router-link-active', ] },],\n'routerLink': [{ type: Input },],\n'onClick': [{ type: HostListener, args: ['click', ['$event.button', '$event.ctrlKey', '$event.metaKey'], ] },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"__symbolic":"module","version":1,"metadata":{"RouterLink":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[routerLink]"}]}],"members":{"target":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"href":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"}}]}],"isActive":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.router-link-active"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../segments","name":"RouteSegment"},{"__symbolic":"reference","module":"../router","name":"Router"},{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["click",["$event.button","$event.ctrlKey","$event.metaKey"]]}]}],"_updateTargetUrlAndHref":[{"__symbolic":"method"}]}}}}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ComponentFactory, ComponentRef, ResolvedReflectiveProvider, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { RouterOutletMap } from '../router';
|
|
3
|
+
/**
|
|
4
|
+
* A router outlet is a placeholder that Angular dynamically fills based on the application's route.
|
|
5
|
+
*
|
|
6
|
+
* ## Use
|
|
7
|
+
*
|
|
8
|
+
* ```
|
|
9
|
+
* <router-outlet></router-outlet>
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* Outlets can be named.
|
|
13
|
+
*
|
|
14
|
+
* ```
|
|
15
|
+
* <router-outlet name="right"></router-outlet>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class RouterOutlet {
|
|
19
|
+
private _location;
|
|
20
|
+
private _activated;
|
|
21
|
+
outletMap: RouterOutletMap;
|
|
22
|
+
constructor(parentOutletMap: RouterOutletMap, _location: ViewContainerRef, name: string);
|
|
23
|
+
deactivate(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Returns the loaded component.
|
|
26
|
+
*/
|
|
27
|
+
component: Object;
|
|
28
|
+
/**
|
|
29
|
+
* Returns true is the outlet is not empty.
|
|
30
|
+
*/
|
|
31
|
+
isActivated: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Called by the Router to instantiate a new component.
|
|
34
|
+
*/
|
|
35
|
+
activate(factory: ComponentFactory<any>, providers: ResolvedReflectiveProvider[], outletMap: RouterOutletMap): ComponentRef<any>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var core_1 = require('@angular/core');
|
|
3
|
+
var constants_1 = require('../constants');
|
|
4
|
+
var lang_1 = require('../facade/lang');
|
|
5
|
+
var router_1 = require('../router');
|
|
6
|
+
var RouterOutlet = (function () {
|
|
7
|
+
function RouterOutlet(parentOutletMap, _location, name) {
|
|
8
|
+
this._location = _location;
|
|
9
|
+
parentOutletMap.registerOutlet(lang_1.isBlank(name) ? constants_1.DEFAULT_OUTLET_NAME : name, this);
|
|
10
|
+
}
|
|
11
|
+
RouterOutlet.prototype.deactivate = function () {
|
|
12
|
+
this._activated.destroy();
|
|
13
|
+
this._activated = null;
|
|
14
|
+
};
|
|
15
|
+
Object.defineProperty(RouterOutlet.prototype, "component", {
|
|
16
|
+
/**
|
|
17
|
+
* Returns the loaded component.
|
|
18
|
+
*/
|
|
19
|
+
get: function () { return lang_1.isPresent(this._activated) ? this._activated.instance : null; },
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(RouterOutlet.prototype, "isActivated", {
|
|
24
|
+
/**
|
|
25
|
+
* Returns true is the outlet is not empty.
|
|
26
|
+
*/
|
|
27
|
+
get: function () { return lang_1.isPresent(this._activated); },
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* Called by the Router to instantiate a new component.
|
|
33
|
+
*/
|
|
34
|
+
RouterOutlet.prototype.activate = function (factory, providers, outletMap) {
|
|
35
|
+
this.outletMap = outletMap;
|
|
36
|
+
var inj = core_1.ReflectiveInjector.fromResolvedProviders(providers, this._location.parentInjector);
|
|
37
|
+
this._activated = this._location.createComponent(factory, this._location.length, inj, []);
|
|
38
|
+
return this._activated;
|
|
39
|
+
};
|
|
40
|
+
/** @nocollapse */
|
|
41
|
+
RouterOutlet.decorators = [
|
|
42
|
+
{ type: core_1.Directive, args: [{ selector: 'router-outlet' },] },
|
|
43
|
+
];
|
|
44
|
+
/** @nocollapse */
|
|
45
|
+
RouterOutlet.ctorParameters = [
|
|
46
|
+
{ type: router_1.RouterOutletMap, },
|
|
47
|
+
{ type: core_1.ViewContainerRef, },
|
|
48
|
+
{ type: undefined, decorators: [{ type: core_1.Attribute, args: ['name',] },] },
|
|
49
|
+
];
|
|
50
|
+
return RouterOutlet;
|
|
51
|
+
}());
|
|
52
|
+
exports.RouterOutlet = RouterOutlet;
|
|
53
|
+
//# sourceMappingURL=router_outlet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router_outlet.js","sourceRoot":"","sources":["../../../../../modules/@angular/router/src/directives/router_outlet.ts"],"names":[],"mappings":";AAAA,qBAAqI,eAAe,CAAC,CAAA;AAErJ,0BAAkC,cAAc,CAAC,CAAA;AACjD,qBAAiC,gBAAgB,CAAC,CAAA;AAClD,uBAA8B,WAAW,CAAC,CAAA;AAC1C;IAIE,sBACI,eAAgC,EAAU,SAA2B,EAAE,IAAY;QAAzC,cAAS,GAAT,SAAS,CAAkB;QACvE,eAAe,CAAC,cAAc,CAAC,cAAO,CAAC,IAAI,CAAC,GAAG,+BAAmB,GAAG,IAAI,EAAE,IAAI,CAAC,CAAC;IACnF,CAAC;IAED,iCAAU,GAAV;QACE,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACzB,CAAC;IAKD,sBAAI,mCAAS;QAHb;;WAEG;aACH,cAA0B,MAAM,CAAC,gBAAS,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC;;;OAAA;IAKhG,sBAAI,qCAAW;QAHf;;WAEG;aACH,cAA6B,MAAM,CAAC,gBAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;;;OAAA;IAEjE;;OAEG;IACH,+BAAQ,GAAR,UACI,OAA8B,EAAE,SAAuC,EACvE,SAA0B;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,GAAG,GAAG,yBAAkB,CAAC,qBAAqB,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAC7F,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;QAC1F,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IACH,kBAAkB;IACX,uBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,gBAAS,EAAE,IAAI,EAAE,CAAC,EAAC,QAAQ,EAAE,eAAe,EAAC,EAAG,EAAE;KACzD,CAAC;IACF,kBAAkB;IACX,2BAAc,GAA2D;QAChF,EAAC,IAAI,EAAE,wBAAe,GAAG;QACzB,EAAC,IAAI,EAAE,uBAAgB,GAAG;QAC1B,EAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,gBAAS,EAAE,IAAI,EAAE,CAAC,MAAM,EAAG,EAAE,EAAG,EAAC;KACvE,CAAC;IACF,mBAAC;AAAD,CAAC,AA7CD,IA6CC;AA7CY,oBAAY,eA6CxB,CAAA","sourcesContent":["import {Attribute, ComponentFactory, ComponentRef, Directive, ReflectiveInjector, ResolvedReflectiveProvider, ViewContainerRef} from '@angular/core';\n\nimport {DEFAULT_OUTLET_NAME} from '../constants';\nimport {isBlank, isPresent} from '../facade/lang';\nimport {RouterOutletMap} from '../router';\nexport class RouterOutlet {\n private _activated: ComponentRef<any>;\n public outletMap: RouterOutletMap;\n\n constructor(\n parentOutletMap: RouterOutletMap, private _location: ViewContainerRef, name: string) {\n parentOutletMap.registerOutlet(isBlank(name) ? DEFAULT_OUTLET_NAME : name, this);\n }\n\n deactivate(): void {\n this._activated.destroy();\n this._activated = null;\n }\n\n /**\n * Returns the loaded component.\n */\n get component(): Object { return isPresent(this._activated) ? this._activated.instance : null; }\n\n /**\n * Returns true is the outlet is not empty.\n */\n get isActivated(): boolean { return isPresent(this._activated); }\n\n /**\n * Called by the Router to instantiate a new component.\n */\n activate(\n factory: ComponentFactory<any>, providers: ResolvedReflectiveProvider[],\n outletMap: RouterOutletMap): ComponentRef<any> {\n this.outletMap = outletMap;\n let inj = ReflectiveInjector.fromResolvedProviders(providers, this._location.parentInjector);\n this._activated = this._location.createComponent(factory, this._location.length, inj, []);\n return this._activated;\n }\n/** @nocollapse */\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{selector: 'router-outlet'}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: {type: Function, decorators?: DecoratorInvocation[]}[] = [\n{type: RouterOutletMap, },\n{type: ViewContainerRef, },\n{type: undefined, decorators: [{ type: Attribute, args: ['name', ] }, ]},\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"__symbolic":"module","version":1,"metadata":{"RouterOutlet":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"router-outlet"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute"},"arguments":["name"]}]],"parameters":[{"__symbolic":"reference","module":"../router","name":"RouterOutletMap"},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef"},{"__symbolic":"reference","name":"string"}]}],"deactivate":[{"__symbolic":"method"}],"activate":[{"__symbolic":"method"}]}}}}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Observable } from 'rxjs/Observable';
|
|
2
|
+
import { Subject } from 'rxjs/Subject';
|
|
3
|
+
export { Observable } from 'rxjs/Observable';
|
|
4
|
+
export { Subject } from 'rxjs/Subject';
|
|
5
|
+
export { PromiseCompleter, PromiseWrapper } from './promise';
|
|
6
|
+
export declare class TimerWrapper {
|
|
7
|
+
static setTimeout(fn: (...args: any[]) => void, millis: number): number;
|
|
8
|
+
static clearTimeout(id: number): void;
|
|
9
|
+
static setInterval(fn: (...args: any[]) => void, millis: number): number;
|
|
10
|
+
static clearInterval(id: number): void;
|
|
11
|
+
}
|
|
12
|
+
export declare class ObservableWrapper {
|
|
13
|
+
static subscribe<T>(emitter: any, onNext: (value: T) => void, onError?: (exception: any) => void, onComplete?: () => void): Object;
|
|
14
|
+
static isObservable(obs: any): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Returns whether `obs` has any subscribers listening to events.
|
|
17
|
+
*/
|
|
18
|
+
static hasSubscribers(obs: EventEmitter<any>): boolean;
|
|
19
|
+
static dispose(subscription: any): void;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated - use callEmit() instead
|
|
22
|
+
*/
|
|
23
|
+
static callNext(emitter: EventEmitter<any>, value: any): void;
|
|
24
|
+
static callEmit(emitter: EventEmitter<any>, value: any): void;
|
|
25
|
+
static callError(emitter: EventEmitter<any>, error: any): void;
|
|
26
|
+
static callComplete(emitter: EventEmitter<any>): void;
|
|
27
|
+
static fromPromise(promise: Promise<any>): Observable<any>;
|
|
28
|
+
static toPromise(obj: Observable<any>): Promise<any>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Use by directives and components to emit custom Events.
|
|
32
|
+
*
|
|
33
|
+
* ### Examples
|
|
34
|
+
*
|
|
35
|
+
* In the following example, `Zippy` alternatively emits `open` and `close` events when its
|
|
36
|
+
* title gets clicked:
|
|
37
|
+
*
|
|
38
|
+
* ```
|
|
39
|
+
* @Component({
|
|
40
|
+
* selector: 'zippy',
|
|
41
|
+
* template: `
|
|
42
|
+
* <div class="zippy">
|
|
43
|
+
* <div (click)="toggle()">Toggle</div>
|
|
44
|
+
* <div [hidden]="!visible">
|
|
45
|
+
* <ng-content></ng-content>
|
|
46
|
+
* </div>
|
|
47
|
+
* </div>`})
|
|
48
|
+
* export class Zippy {
|
|
49
|
+
* visible: boolean = true;
|
|
50
|
+
* @Output() open: EventEmitter<any> = new EventEmitter();
|
|
51
|
+
* @Output() close: EventEmitter<any> = new EventEmitter();
|
|
52
|
+
*
|
|
53
|
+
* toggle() {
|
|
54
|
+
* this.visible = !this.visible;
|
|
55
|
+
* if (this.visible) {
|
|
56
|
+
* this.open.emit(null);
|
|
57
|
+
* } else {
|
|
58
|
+
* this.close.emit(null);
|
|
59
|
+
* }
|
|
60
|
+
* }
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* The events payload can be accessed by the parameter `$event` on the components output event
|
|
65
|
+
* handler:
|
|
66
|
+
*
|
|
67
|
+
* ```
|
|
68
|
+
* <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* Uses Rx.Observable but provides an adapter to make it work as specified here:
|
|
72
|
+
* https://github.com/jhusain/observable-spec
|
|
73
|
+
*
|
|
74
|
+
* Once a reference implementation of the spec is available, switch to it.
|
|
75
|
+
* @stable
|
|
76
|
+
*/
|
|
77
|
+
export declare class EventEmitter<T> extends Subject<T> {
|
|
78
|
+
__isAsync: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Creates an instance of [EventEmitter], which depending on [isAsync],
|
|
81
|
+
* delivers events synchronously or asynchronously.
|
|
82
|
+
*/
|
|
83
|
+
constructor(isAsync?: boolean);
|
|
84
|
+
emit(value: T): void;
|
|
85
|
+
/**
|
|
86
|
+
* @deprecated - use .emit(value) instead
|
|
87
|
+
*/
|
|
88
|
+
next(value: any): void;
|
|
89
|
+
subscribe(generatorOrNext?: any, error?: any, complete?: any): any;
|
|
90
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || function (d, b) {
|
|
3
|
+
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
4
|
+
function __() { this.constructor = d; }
|
|
5
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
6
|
+
};
|
|
7
|
+
var Subject_1 = require('rxjs/Subject');
|
|
8
|
+
var PromiseObservable_1 = require('rxjs/observable/PromiseObservable');
|
|
9
|
+
var toPromise_1 = require('rxjs/operator/toPromise');
|
|
10
|
+
var lang_1 = require('./lang');
|
|
11
|
+
var Observable_1 = require('rxjs/Observable');
|
|
12
|
+
exports.Observable = Observable_1.Observable;
|
|
13
|
+
var Subject_2 = require('rxjs/Subject');
|
|
14
|
+
exports.Subject = Subject_2.Subject;
|
|
15
|
+
var promise_1 = require('./promise');
|
|
16
|
+
exports.PromiseCompleter = promise_1.PromiseCompleter;
|
|
17
|
+
exports.PromiseWrapper = promise_1.PromiseWrapper;
|
|
18
|
+
var TimerWrapper = (function () {
|
|
19
|
+
function TimerWrapper() {
|
|
20
|
+
}
|
|
21
|
+
TimerWrapper.setTimeout = function (fn, millis) {
|
|
22
|
+
return lang_1.global.setTimeout(fn, millis);
|
|
23
|
+
};
|
|
24
|
+
TimerWrapper.clearTimeout = function (id) { lang_1.global.clearTimeout(id); };
|
|
25
|
+
TimerWrapper.setInterval = function (fn, millis) {
|
|
26
|
+
return lang_1.global.setInterval(fn, millis);
|
|
27
|
+
};
|
|
28
|
+
TimerWrapper.clearInterval = function (id) { lang_1.global.clearInterval(id); };
|
|
29
|
+
return TimerWrapper;
|
|
30
|
+
}());
|
|
31
|
+
exports.TimerWrapper = TimerWrapper;
|
|
32
|
+
var ObservableWrapper = (function () {
|
|
33
|
+
function ObservableWrapper() {
|
|
34
|
+
}
|
|
35
|
+
// TODO(vsavkin): when we use rxnext, try inferring the generic type from the first arg
|
|
36
|
+
ObservableWrapper.subscribe = function (emitter, onNext, onError, onComplete) {
|
|
37
|
+
if (onComplete === void 0) { onComplete = function () { }; }
|
|
38
|
+
onError = (typeof onError === 'function') && onError || lang_1.noop;
|
|
39
|
+
onComplete = (typeof onComplete === 'function') && onComplete || lang_1.noop;
|
|
40
|
+
return emitter.subscribe({ next: onNext, error: onError, complete: onComplete });
|
|
41
|
+
};
|
|
42
|
+
ObservableWrapper.isObservable = function (obs) { return !!obs.subscribe; };
|
|
43
|
+
/**
|
|
44
|
+
* Returns whether `obs` has any subscribers listening to events.
|
|
45
|
+
*/
|
|
46
|
+
ObservableWrapper.hasSubscribers = function (obs) { return obs.observers.length > 0; };
|
|
47
|
+
ObservableWrapper.dispose = function (subscription) { subscription.unsubscribe(); };
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated - use callEmit() instead
|
|
50
|
+
*/
|
|
51
|
+
ObservableWrapper.callNext = function (emitter, value) { emitter.next(value); };
|
|
52
|
+
ObservableWrapper.callEmit = function (emitter, value) { emitter.emit(value); };
|
|
53
|
+
ObservableWrapper.callError = function (emitter, error) { emitter.error(error); };
|
|
54
|
+
ObservableWrapper.callComplete = function (emitter) { emitter.complete(); };
|
|
55
|
+
ObservableWrapper.fromPromise = function (promise) {
|
|
56
|
+
return PromiseObservable_1.PromiseObservable.create(promise);
|
|
57
|
+
};
|
|
58
|
+
ObservableWrapper.toPromise = function (obj) { return toPromise_1.toPromise.call(obj); };
|
|
59
|
+
return ObservableWrapper;
|
|
60
|
+
}());
|
|
61
|
+
exports.ObservableWrapper = ObservableWrapper;
|
|
62
|
+
/**
|
|
63
|
+
* Use by directives and components to emit custom Events.
|
|
64
|
+
*
|
|
65
|
+
* ### Examples
|
|
66
|
+
*
|
|
67
|
+
* In the following example, `Zippy` alternatively emits `open` and `close` events when its
|
|
68
|
+
* title gets clicked:
|
|
69
|
+
*
|
|
70
|
+
* ```
|
|
71
|
+
* @Component({
|
|
72
|
+
* selector: 'zippy',
|
|
73
|
+
* template: `
|
|
74
|
+
* <div class="zippy">
|
|
75
|
+
* <div (click)="toggle()">Toggle</div>
|
|
76
|
+
* <div [hidden]="!visible">
|
|
77
|
+
* <ng-content></ng-content>
|
|
78
|
+
* </div>
|
|
79
|
+
* </div>`})
|
|
80
|
+
* export class Zippy {
|
|
81
|
+
* visible: boolean = true;
|
|
82
|
+
* @Output() open: EventEmitter<any> = new EventEmitter();
|
|
83
|
+
* @Output() close: EventEmitter<any> = new EventEmitter();
|
|
84
|
+
*
|
|
85
|
+
* toggle() {
|
|
86
|
+
* this.visible = !this.visible;
|
|
87
|
+
* if (this.visible) {
|
|
88
|
+
* this.open.emit(null);
|
|
89
|
+
* } else {
|
|
90
|
+
* this.close.emit(null);
|
|
91
|
+
* }
|
|
92
|
+
* }
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* The events payload can be accessed by the parameter `$event` on the components output event
|
|
97
|
+
* handler:
|
|
98
|
+
*
|
|
99
|
+
* ```
|
|
100
|
+
* <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* Uses Rx.Observable but provides an adapter to make it work as specified here:
|
|
104
|
+
* https://github.com/jhusain/observable-spec
|
|
105
|
+
*
|
|
106
|
+
* Once a reference implementation of the spec is available, switch to it.
|
|
107
|
+
* @stable
|
|
108
|
+
*/
|
|
109
|
+
var EventEmitter = (function (_super) {
|
|
110
|
+
__extends(EventEmitter, _super);
|
|
111
|
+
/**
|
|
112
|
+
* Creates an instance of [EventEmitter], which depending on [isAsync],
|
|
113
|
+
* delivers events synchronously or asynchronously.
|
|
114
|
+
*/
|
|
115
|
+
function EventEmitter(isAsync) {
|
|
116
|
+
if (isAsync === void 0) { isAsync = false; }
|
|
117
|
+
_super.call(this);
|
|
118
|
+
this.__isAsync = isAsync;
|
|
119
|
+
}
|
|
120
|
+
EventEmitter.prototype.emit = function (value) { _super.prototype.next.call(this, value); };
|
|
121
|
+
/**
|
|
122
|
+
* @deprecated - use .emit(value) instead
|
|
123
|
+
*/
|
|
124
|
+
EventEmitter.prototype.next = function (value) { _super.prototype.next.call(this, value); };
|
|
125
|
+
EventEmitter.prototype.subscribe = function (generatorOrNext, error, complete) {
|
|
126
|
+
var schedulerFn;
|
|
127
|
+
var errorFn = function (err) { return null; };
|
|
128
|
+
var completeFn = function () { return null; };
|
|
129
|
+
if (generatorOrNext && typeof generatorOrNext === 'object') {
|
|
130
|
+
schedulerFn = this.__isAsync ? function (value /** TODO #9100 */) {
|
|
131
|
+
setTimeout(function () { return generatorOrNext.next(value); });
|
|
132
|
+
} : function (value /** TODO #9100 */) { generatorOrNext.next(value); };
|
|
133
|
+
if (generatorOrNext.error) {
|
|
134
|
+
errorFn = this.__isAsync ? function (err) { setTimeout(function () { return generatorOrNext.error(err); }); } :
|
|
135
|
+
function (err) { generatorOrNext.error(err); };
|
|
136
|
+
}
|
|
137
|
+
if (generatorOrNext.complete) {
|
|
138
|
+
completeFn = this.__isAsync ? function () { setTimeout(function () { return generatorOrNext.complete(); }); } :
|
|
139
|
+
function () { generatorOrNext.complete(); };
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
schedulerFn = this.__isAsync ? function (value /** TODO #9100 */) {
|
|
144
|
+
setTimeout(function () { return generatorOrNext(value); });
|
|
145
|
+
} : function (value /** TODO #9100 */) { generatorOrNext(value); };
|
|
146
|
+
if (error) {
|
|
147
|
+
errorFn =
|
|
148
|
+
this.__isAsync ? function (err) { setTimeout(function () { return error(err); }); } : function (err) { error(err); };
|
|
149
|
+
}
|
|
150
|
+
if (complete) {
|
|
151
|
+
completeFn =
|
|
152
|
+
this.__isAsync ? function () { setTimeout(function () { return complete(); }); } : function () { complete(); };
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return _super.prototype.subscribe.call(this, schedulerFn, errorFn, completeFn);
|
|
156
|
+
};
|
|
157
|
+
return EventEmitter;
|
|
158
|
+
}(Subject_1.Subject));
|
|
159
|
+
exports.EventEmitter = EventEmitter;
|
|
160
|
+
//# sourceMappingURL=async.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async.js","sourceRoot":"","sources":["../../../../../modules/@angular/router/src/facade/async.ts"],"names":[],"mappings":";;;;;;AACA,wBAAsB,cAAc,CAAC,CAAA;AACrC,kCAAgC,mCAAmC,CAAC,CAAA;AACpE,0BAAwB,yBAAyB,CAAC,CAAA;AAElD,qBAA2B,QAAQ,CAAC,CAAA;AAEpC,2BAAyB,iBAAiB,CAAC;AAAnC,6CAAmC;AAC3C,wBAAsB,cAAc,CAAC;AAA7B,oCAA6B;AACrC,wBAA+C,WAAW,CAAC;AAAnD,sDAAgB;AAAE,kDAAiC;AAE3D;IAAA;IAUA,CAAC;IATQ,uBAAU,GAAjB,UAAkB,EAA4B,EAAE,MAAc;QAC5D,MAAM,CAAC,aAAM,CAAC,UAAU,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IACM,yBAAY,GAAnB,UAAoB,EAAU,IAAU,aAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAE3D,wBAAW,GAAlB,UAAmB,EAA4B,EAAE,MAAc;QAC7D,MAAM,CAAC,aAAM,CAAC,WAAW,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;IACM,0BAAa,GAApB,UAAqB,EAAU,IAAU,aAAM,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACtE,mBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,oBAAY,eAUxB,CAAA;AAED;IAAA;IAmCA,CAAC;IAlCC,uFAAuF;IAChF,2BAAS,GAAhB,UACI,OAAY,EAAE,MAA0B,EAAE,OAAkC,EAC5E,UAAiC;QAAjC,0BAAiC,GAAjC,aAAyB,cAAO,CAAC;QACnC,OAAO,GAAG,CAAC,OAAO,OAAO,KAAK,UAAU,CAAC,IAAI,OAAO,IAAI,WAAI,CAAC;QAC7D,UAAU,GAAG,CAAC,OAAO,UAAU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,CAAC,CAAC;IAC3D,CAAC;IACH,mBAAC;AAAD,CAAC,AA7DD,CAAqC,iBAAO,GA6D3C;AA7DY,oBAAY,eA6DxB,CAAA","sourcesContent":["import {Observable} from 'rxjs/Observable';\nimport {Subject} from 'rxjs/Subject';\nimport {PromiseObservable} from 'rxjs/observable/PromiseObservable';\nimport {toPromise} from 'rxjs/operator/toPromise';\n\nimport {global, noop} from './lang';\n\nexport {Observable} from 'rxjs/Observable';\nexport {Subject} from 'rxjs/Subject';\nexport {PromiseCompleter, PromiseWrapper} from './promise';\n\nexport class TimerWrapper {\n static setTimeout(fn: (...args: any[]) => void, millis: number): number {\n return global.setTimeout(fn, millis);\n }\n static clearTimeout(id: number): void { global.clearTimeout(id); }\n\n static setInterval(fn: (...args: any[]) => void, millis: number): number {\n return global.setInterval(fn, millis);\n }\n static clearInterval(id: number): void { global.clearInterval(id); }\n}\n\nexport class ObservableWrapper {\n // TODO(vsavkin): when we use rxnext, try inferring the generic type from the first arg\n static subscribe<T>(\n emitter: any, onNext: (value: T) => void, onError?: (exception: any) => void,\n onComplete: () => void = () => {}): Object {\n onError = (typeof onError === 'function') && onError || noop;\n onComplete = (typeof onComplete === 'function') && onComplete || noop;\n return emitter.subscribe({next: onNext, error: onError, complete: onComplete});\n }\n\n static isObservable(obs: any): boolean { return !!obs.subscribe; }\n\n /**\n * Returns whether `obs` has any subscribers listening to events.\n */\n static hasSubscribers(obs: EventEmitter<any>): boolean { return obs.observers.length > 0; }\n\n static dispose(subscription: any) { subscription.unsubscribe(); }\n\n /**\n * @deprecated - use callEmit() instead\n */\n static callNext(emitter: EventEmitter<any>, value: any) { emitter.next(value); }\n\n static callEmit(emitter: EventEmitter<any>, value: any) { emitter.emit(value); }\n\n static callError(emitter: EventEmitter<any>, error: any) { emitter.error(error); }\n\n static callComplete(emitter: EventEmitter<any>) { emitter.complete(); }\n\n static fromPromise(promise: Promise<any>): Observable<any> {\n return PromiseObservable.create(promise);\n }\n\n static toPromise(obj: Observable<any>): Promise<any> { return toPromise.call(obj); }\n}\n\n/**\n * Use by directives and components to emit custom Events.\n *\n * ### Examples\n *\n * In the following example, `Zippy` alternatively emits `open` and `close` events when its\n * title gets clicked:\n *\n * ```\n * @Component({\n * selector: 'zippy',\n * template: `\n * <div class=\"zippy\">\n * <div (click)=\"toggle()\">Toggle</div>\n * <div [hidden]=\"!visible\">\n * <ng-content></ng-content>\n * </div>\n * </div>`})\n * export class Zippy {\n * visible: boolean = true;\n * @Output() open: EventEmitter<any> = new EventEmitter();\n * @Output() close: EventEmitter<any> = new EventEmitter();\n *\n * toggle() {\n * this.visible = !this.visible;\n * if (this.visible) {\n * this.open.emit(null);\n * } else {\n * this.close.emit(null);\n * }\n * }\n * }\n * ```\n *\n * The events payload can be accessed by the parameter `$event` on the components output event\n * handler:\n *\n * ```\n * <zippy (open)=\"onOpen($event)\" (close)=\"onClose($event)\"></zippy>\n * ```\n *\n * Uses Rx.Observable but provides an adapter to make it work as specified here:\n * https://github.com/jhusain/observable-spec\n *\n * Once a reference implementation of the spec is available, switch to it.\n * @stable\n */\nexport class EventEmitter<T> extends Subject<T> {\n // TODO: mark this as internal once all the facades are gone\n // we can't mark it as internal now because EventEmitter exported via @angular/core would not\n // contain this property making it incompatible with all the code that uses EventEmitter via\n // facades, which are local to the code and do not have this property stripped.\n // tslint:disable-next-line\n __isAsync: boolean;\n\n /**\n * Creates an instance of [EventEmitter], which depending on [isAsync],\n * delivers events synchronously or asynchronously.\n */\n constructor(isAsync: boolean = false) {\n super();\n this.__isAsync = isAsync;\n }\n\n emit(value: T) { super.next(value); }\n\n /**\n * @deprecated - use .emit(value) instead\n */\n next(value: any) { super.next(value); }\n\n subscribe(generatorOrNext?: any, error?: any, complete?: any): any {\n let schedulerFn: any /** TODO #9100 */;\n let errorFn = (err: any): any /** TODO #9100 */ => null;\n let completeFn = (): any /** TODO #9100 */ => null;\n\n if (generatorOrNext && typeof generatorOrNext === 'object') {\n schedulerFn = this.__isAsync ? (value: any /** TODO #9100 */) => {\n setTimeout(() => generatorOrNext.next(value));\n } : (value: any /** TODO #9100 */) => { generatorOrNext.next(value); };\n\n if (generatorOrNext.error) {\n errorFn = this.__isAsync ? (err) => { setTimeout(() => generatorOrNext.error(err)); } :\n (err) => { generatorOrNext.error(err); };\n }\n\n if (generatorOrNext.complete) {\n completeFn = this.__isAsync ? () => { setTimeout(() => generatorOrNext.complete()); } :\n () => { generatorOrNext.complete(); };\n }\n } else {\n schedulerFn = this.__isAsync ? (value: any /** TODO #9100 */) => {\n setTimeout(() => generatorOrNext(value));\n } : (value: any /** TODO #9100 */) => { generatorOrNext(value); };\n\n if (error) {\n errorFn =\n this.__isAsync ? (err) => { setTimeout(() => error(err)); } : (err) => { error(err); };\n }\n\n if (complete) {\n completeFn =\n this.__isAsync ? () => { setTimeout(() => complete()); } : () => { complete(); };\n }\n }\n\n return super.subscribe(schedulerFn, errorFn, completeFn);\n }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A base class for the WrappedException that can be used to identify
|
|
3
|
+
* a WrappedException from ExceptionHandler without adding circular
|
|
4
|
+
* dependency.
|
|
5
|
+
*/
|
|
6
|
+
export declare class BaseWrappedException extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
wrapperMessage: string;
|
|
9
|
+
wrapperStack: any;
|
|
10
|
+
originalException: any;
|
|
11
|
+
originalStack: any;
|
|
12
|
+
context: any;
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || function (d, b) {
|
|
3
|
+
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
4
|
+
function __() { this.constructor = d; }
|
|
5
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* A base class for the WrappedException that can be used to identify
|
|
9
|
+
* a WrappedException from ExceptionHandler without adding circular
|
|
10
|
+
* dependency.
|
|
11
|
+
*/
|
|
12
|
+
var BaseWrappedException = (function (_super) {
|
|
13
|
+
__extends(BaseWrappedException, _super);
|
|
14
|
+
function BaseWrappedException(message) {
|
|
15
|
+
_super.call(this, message);
|
|
16
|
+
}
|
|
17
|
+
Object.defineProperty(BaseWrappedException.prototype, "wrapperMessage", {
|
|
18
|
+
get: function () { return ''; },
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(BaseWrappedException.prototype, "wrapperStack", {
|
|
23
|
+
get: function () { return null; },
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(BaseWrappedException.prototype, "originalException", {
|
|
28
|
+
get: function () { return null; },
|
|
29
|
+
enumerable: true,
|
|
30
|
+
configurable: true
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(BaseWrappedException.prototype, "originalStack", {
|
|
33
|
+
get: function () { return null; },
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(BaseWrappedException.prototype, "context", {
|
|
38
|
+
get: function () { return null; },
|
|
39
|
+
enumerable: true,
|
|
40
|
+
configurable: true
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(BaseWrappedException.prototype, "message", {
|
|
43
|
+
get: function () { return ''; },
|
|
44
|
+
enumerable: true,
|
|
45
|
+
configurable: true
|
|
46
|
+
});
|
|
47
|
+
return BaseWrappedException;
|
|
48
|
+
}(Error));
|
|
49
|
+
exports.BaseWrappedException = BaseWrappedException;
|
|
50
|
+
//# sourceMappingURL=base_wrapped_exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base_wrapped_exception.js","sourceRoot":"","sources":["../../../../../modules/@angular/router/src/facade/base_wrapped_exception.ts"],"names":[],"mappings":";;;;;;AAAA;;;;GAIG;AACH;IAA0C,wCAAK;IAC7C,8BAAY,OAAe;QAAI,kBAAM,OAAO,CAAC,CAAC;IAAC,CAAC;IAEhD,sBAAI,gDAAc;aAAlB,cAA+B,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;;;OAAA;IAC3C,sBAAI,8CAAY;aAAhB,cAA0B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;;;OAAA;IACxC,sBAAI,mDAAiB;aAArB,cAA+B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;;;OAAA;IAC7C,sBAAI,+CAAa;aAAjB,cAA2B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;;;OAAA;IACzC,sBAAI,yCAAO;aAAX,cAAqB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;;;OAAA;IACnC,sBAAI,yCAAO;aAAX,cAAwB,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;;;OAAA;IACtC,2BAAC;AAAD,CAAC,AATD,CAA0C,KAAK,GAS9C;AATY,4BAAoB,uBAShC,CAAA","sourcesContent":["/**\n * A base class for the WrappedException that can be used to identify\n * a WrappedException from ExceptionHandler without adding circular\n * dependency.\n */\nexport class BaseWrappedException extends Error {\n constructor(message: string) { super(message); }\n\n get wrapperMessage(): string { return ''; }\n get wrapperStack(): any { return null; }\n get originalException(): any { return null; }\n get originalStack(): any { return null; }\n get context(): any { return null; }\n get message(): string { return ''; }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|