@angular/core 2.2.0-rc.0 → 2.2.3
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/core-testing.umd.js +44 -11
- package/bundles/core.umd.js +560 -513
- package/bundles/core.umd.min.js +8 -8
- package/package.json +1 -1
- package/src/animation/animation_group_player.d.ts +3 -1
- package/src/animation/animation_group_player.js +18 -7
- package/src/animation/animation_group_player.js.map +1 -1
- package/src/animation/animation_player.d.ts +1 -1
- package/src/animation/animation_player.js +1 -1
- package/src/animation/animation_player.js.map +1 -1
- package/src/animation/animation_queue.js +8 -0
- package/src/animation/animation_queue.js.map +1 -1
- package/src/animation/animation_sequence_player.d.ts +3 -1
- package/src/animation/animation_sequence_player.js +20 -8
- package/src/animation/animation_sequence_player.js.map +1 -1
- package/src/animation/animation_style_util.js +1 -0
- package/src/animation/animation_style_util.js.map +1 -1
- package/src/animation/animation_style_util.metadata.json +1 -1
- package/src/animation/metadata.js.map +1 -1
- package/src/animation/view_animation_map.js.map +1 -1
- package/src/change_detection/constants.d.ts +1 -1
- package/src/change_detection/constants.js +1 -1
- package/src/change_detection/constants.js.map +1 -1
- package/src/change_detection/differs/default_iterable_differ.js +2 -2
- package/src/change_detection/differs/default_iterable_differ.js.map +1 -1
- package/src/change_detection/differs/default_keyvalue_differ.js.map +1 -1
- package/src/change_detection/differs/iterable_differs.js.map +1 -1
- package/src/change_detection/differs/keyvalue_differs.js.map +1 -1
- package/src/core_private_export.d.ts +8 -3
- package/src/core_private_export.js +6 -2
- package/src/core_private_export.js.map +1 -1
- package/src/core_private_export.metadata.json +1 -1
- package/src/debug/debug_node.js +12 -24
- package/src/debug/debug_node.js.map +1 -1
- package/src/debug/debug_node.metadata.json +1 -1
- package/src/debug/debug_renderer.d.ts +2 -2
- package/src/debug/debug_renderer.js +7 -5
- package/src/debug/debug_renderer.js.map +1 -1
- package/src/di/reflective_errors.js.map +1 -1
- package/src/di/reflective_injector.js.map +1 -1
- package/src/di/reflective_key.js.map +1 -1
- package/src/di/reflective_provider.js +13 -14
- package/src/di/reflective_provider.js.map +1 -1
- package/src/facade/collection.d.ts +2 -10
- package/src/facade/collection.js +8 -73
- package/src/facade/collection.js.map +1 -1
- package/src/facade/lang.d.ts +0 -1
- package/src/facade/lang.js +5 -24
- package/src/facade/lang.js.map +1 -1
- package/src/facade/lang.metadata.json +1 -1
- package/src/linker/animation_view_context.d.ts +1 -1
- package/src/linker/animation_view_context.js +16 -5
- package/src/linker/animation_view_context.js.map +1 -1
- package/src/linker/component_factory.d.ts +8 -6
- package/src/linker/component_factory.js +17 -23
- package/src/linker/component_factory.js.map +1 -1
- package/src/linker/component_factory_resolver.js.map +1 -1
- package/src/linker/debug_context.js +6 -9
- package/src/linker/debug_context.js.map +1 -1
- package/src/linker/element_injector.js +1 -8
- package/src/linker/element_injector.js.map +1 -1
- package/src/linker/ng_module_factory.js.map +1 -1
- package/src/linker/ng_module_factory_loader.js.map +1 -1
- package/src/linker/system_js_ng_module_factory_loader.js +2 -1
- package/src/linker/system_js_ng_module_factory_loader.js.map +1 -1
- package/src/linker/template_ref.d.ts +5 -4
- package/src/linker/template_ref.js +8 -6
- package/src/linker/template_ref.js.map +1 -1
- package/src/linker/view.d.ts +29 -17
- package/src/linker/view.js +143 -51
- package/src/linker/view.js.map +1 -1
- package/src/linker/{element.d.ts → view_container.d.ts} +4 -7
- package/src/linker/{element.js → view_container.js} +45 -50
- package/src/linker/view_container.js.map +1 -0
- package/src/linker/view_container_ref.d.ts +2 -2
- package/src/linker/view_container_ref.js.map +1 -1
- package/src/linker/view_utils.d.ts +6 -10
- package/src/linker/view_utils.js +17 -14
- package/src/linker/view_utils.js.map +1 -1
- package/src/linker/view_utils.metadata.json +1 -1
- package/src/profile/wtf_impl.js.map +1 -1
- package/src/reflection/reflection_capabilities.js +5 -2
- package/src/reflection/reflection_capabilities.js.map +1 -1
- package/src/render/api.d.ts +8 -1
- package/src/render/api.js.map +1 -1
- package/src/testability/testability.js +2 -3
- package/src/testability/testability.js.map +1 -1
- package/src/util/decorators.js.map +1 -1
- package/testing/async.js.map +1 -1
- package/testing/facade/lang.d.ts +0 -1
- package/testing/facade/lang.js +5 -24
- package/testing/facade/lang.js.map +1 -1
- package/testing/facade/lang.metadata.json +1 -1
- package/testing/fake_async.js.map +1 -1
- package/testing/mock_animation_player.d.ts +16 -1
- package/testing/mock_animation_player.js +43 -14
- package/testing/mock_animation_player.js.map +1 -1
- package/testing/test_bed.js.map +1 -1
- package/testing/testing.js.map +1 -1
- package/src/linker/element.js.map +0 -1
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ export declare class AnimationGroupPlayer implements AnimationPlayer {
|
|
|
5
5
|
private _onStartFns;
|
|
6
6
|
private _finished;
|
|
7
7
|
private _started;
|
|
8
|
+
private _destroyed;
|
|
8
9
|
parentPlayer: AnimationPlayer;
|
|
9
10
|
constructor(_players: AnimationPlayer[]);
|
|
10
11
|
private _onFinish();
|
|
@@ -18,6 +19,7 @@ export declare class AnimationGroupPlayer implements AnimationPlayer {
|
|
|
18
19
|
finish(): void;
|
|
19
20
|
destroy(): void;
|
|
20
21
|
reset(): void;
|
|
21
|
-
setPosition(p:
|
|
22
|
+
setPosition(p: number): void;
|
|
22
23
|
getPosition(): number;
|
|
24
|
+
players: AnimationPlayer[];
|
|
23
25
|
}
|
|
@@ -14,6 +14,7 @@ export var AnimationGroupPlayer = (function () {
|
|
|
14
14
|
this._onStartFns = [];
|
|
15
15
|
this._finished = false;
|
|
16
16
|
this._started = false;
|
|
17
|
+
this._destroyed = false;
|
|
17
18
|
this.parentPlayer = null;
|
|
18
19
|
var count = 0;
|
|
19
20
|
var total = this._players.length;
|
|
@@ -34,9 +35,6 @@ export var AnimationGroupPlayer = (function () {
|
|
|
34
35
|
AnimationGroupPlayer.prototype._onFinish = function () {
|
|
35
36
|
if (!this._finished) {
|
|
36
37
|
this._finished = true;
|
|
37
|
-
if (!isPresent(this.parentPlayer)) {
|
|
38
|
-
this.destroy();
|
|
39
|
-
}
|
|
40
38
|
this._onDoneFns.forEach(function (fn) { return fn(); });
|
|
41
39
|
this._onDoneFns = [];
|
|
42
40
|
}
|
|
@@ -63,11 +61,19 @@ export var AnimationGroupPlayer = (function () {
|
|
|
63
61
|
this._players.forEach(function (player) { return player.finish(); });
|
|
64
62
|
};
|
|
65
63
|
AnimationGroupPlayer.prototype.destroy = function () {
|
|
66
|
-
this.
|
|
67
|
-
|
|
64
|
+
if (!this._destroyed) {
|
|
65
|
+
this._onFinish();
|
|
66
|
+
this._players.forEach(function (player) { return player.destroy(); });
|
|
67
|
+
this._destroyed = true;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
AnimationGroupPlayer.prototype.reset = function () {
|
|
71
|
+
this._players.forEach(function (player) { return player.reset(); });
|
|
72
|
+
this._destroyed = false;
|
|
73
|
+
this._finished = false;
|
|
74
|
+
this._started = false;
|
|
68
75
|
};
|
|
69
|
-
AnimationGroupPlayer.prototype.
|
|
70
|
-
AnimationGroupPlayer.prototype.setPosition = function (p /** TODO #9100 */) {
|
|
76
|
+
AnimationGroupPlayer.prototype.setPosition = function (p) {
|
|
71
77
|
this._players.forEach(function (player) { player.setPosition(p); });
|
|
72
78
|
};
|
|
73
79
|
AnimationGroupPlayer.prototype.getPosition = function () {
|
|
@@ -78,6 +84,11 @@ export var AnimationGroupPlayer = (function () {
|
|
|
78
84
|
});
|
|
79
85
|
return min;
|
|
80
86
|
};
|
|
87
|
+
Object.defineProperty(AnimationGroupPlayer.prototype, "players", {
|
|
88
|
+
get: function () { return this._players; },
|
|
89
|
+
enumerable: true,
|
|
90
|
+
configurable: true
|
|
91
|
+
});
|
|
81
92
|
return AnimationGroupPlayer;
|
|
82
93
|
}());
|
|
83
94
|
//# sourceMappingURL=animation_group_player.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation_group_player.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/animation/animation_group_player.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,SAAS,EAAE,iBAAiB,EAAC,MAAM,gBAAgB;AAI3D;
|
|
1
|
+
{"version":3,"file":"animation_group_player.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/animation/animation_group_player.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,SAAS,EAAE,iBAAiB,EAAC,MAAM,gBAAgB;AAI3D;IASE,8BAAoB,QAA2B;QATjD,iBA4FC;QAnFqB,aAAQ,GAAR,QAAQ,CAAmB;QARvC,eAAU,GAAe,EAAE,CAAC;QAC5B,gBAAW,GAAe,EAAE,CAAC;QAC7B,cAAS,GAAG,KAAK,CAAC;QAClB,aAAQ,GAAG,KAAK,CAAC;QACjB,eAAU,GAAG,KAAK,CAAC;QAEpB,iBAAY,GAAoB,IAAI,CAAC;QAG1C,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QACnC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC;YACf,iBAAiB,CAAC,cAAM,OAAA,KAAI,CAAC,SAAS,EAAE,EAAhB,CAAgB,CAAC,CAAC;QAC5C,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAA,MAAM;gBAC1B,MAAM,CAAC,YAAY,GAAG,KAAI,CAAC;gBAC3B,MAAM,CAAC,MAAM,CAAC;oBACZ,EAAE,CAAC,CAAC,EAAE,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;wBACrB,KAAI,CAAC,SAAS,EAAE,CAAC;oBACnB,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAEO,wCAAS,GAAjB;QACE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;YACpB,IAAI,CAAC,SAAS,GAAG,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,CAAC,OAAO,CAAC,UAAA,MAAM;YAC1B,IAAM,CAAC,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;YAC/B,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,GAAG,CAAC;IACb,CAAC;IAED,sBAAI,yCAAO;aAAX,cAAmC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;;;OAAA;IAC5D,2BAAC;AAAD,CAAC,AA5FD,IA4FC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isPresent, scheduleMicroTask} from '../facade/lang';\n\nimport {AnimationPlayer} from './animation_player';\n\nexport class AnimationGroupPlayer implements AnimationPlayer {\n private _onDoneFns: Function[] = [];\n private _onStartFns: Function[] = [];\n private _finished = false;\n private _started = false;\n private _destroyed = false;\n\n public parentPlayer: AnimationPlayer = null;\n\n constructor(private _players: AnimationPlayer[]) {\n let count = 0;\n const total = this._players.length;\n if (total == 0) {\n scheduleMicroTask(() => this._onFinish());\n } else {\n this._players.forEach(player => {\n player.parentPlayer = this;\n player.onDone(() => {\n if (++count >= total) {\n this._onFinish();\n }\n });\n });\n }\n }\n\n private _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n\n init(): void { this._players.forEach(player => player.init()); }\n\n onStart(fn: () => void): void { this._onStartFns.push(fn); }\n\n onDone(fn: () => void): void { this._onDoneFns.push(fn); }\n\n hasStarted() { return this._started; }\n\n play() {\n if (!isPresent(this.parentPlayer)) {\n this.init();\n }\n if (!this.hasStarted()) {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n this._started = true;\n }\n this._players.forEach(player => player.play());\n }\n\n pause(): void { this._players.forEach(player => player.pause()); }\n\n restart(): void { this._players.forEach(player => player.restart()); }\n\n finish(): void {\n this._onFinish();\n this._players.forEach(player => player.finish());\n }\n\n destroy(): void {\n if (!this._destroyed) {\n this._onFinish();\n this._players.forEach(player => player.destroy());\n this._destroyed = true;\n }\n }\n\n reset(): void {\n this._players.forEach(player => player.reset());\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n }\n\n setPosition(p: number): void {\n this._players.forEach(player => { player.setPosition(p); });\n }\n\n getPosition(): number {\n let min = 0;\n this._players.forEach(player => {\n const p = player.getPosition();\n min = Math.min(p, min);\n });\n return min;\n }\n\n get players(): AnimationPlayer[] { return this._players; }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -50,7 +50,7 @@ export var NoOpAnimationPlayer = (function () {
|
|
|
50
50
|
NoOpAnimationPlayer.prototype.finish = function () { this._onFinish(); };
|
|
51
51
|
NoOpAnimationPlayer.prototype.destroy = function () { };
|
|
52
52
|
NoOpAnimationPlayer.prototype.reset = function () { };
|
|
53
|
-
NoOpAnimationPlayer.prototype.setPosition = function (p
|
|
53
|
+
NoOpAnimationPlayer.prototype.setPosition = function (p) { };
|
|
54
54
|
NoOpAnimationPlayer.prototype.getPosition = function () { return 0; };
|
|
55
55
|
return NoOpAnimationPlayer;
|
|
56
56
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation_player.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/animation/animation_player.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,iBAAiB,EAAC,MAAM,gBAAgB;AAGhD;;GAEG;AACH;IAAA;IAeA,CAAC;IAFC,sBAAI,yCAAY;aAAhB,cAAsC,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC;aACvF,UAAiB,MAAuB,IAAI,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC;;;OADN;IAEzF,sBAAC;AAAD,C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iB,CAAC;IAClB,mCAAK,GAAL,cAAe,CAAC;IAChB,yCAAW,GAAX,UAAY,
|
|
1
|
+
{"version":3,"file":"animation_player.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/animation/animation_player.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,iBAAiB,EAAC,MAAM,gBAAgB;AAGhD;;GAEG;AACH;IAAA;IAeA,CAAC;IAFC,sBAAI,yCAAY;aAAhB,cAAsC,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC;aACvF,UAAiB,MAAuB,IAAI,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC;;;OADN;IAEzF,sBAAC;AAAD,CAAC,AAfD,IAeC;AAED;IAKE;QALF,iBA6BC;QA5BS,eAAU,GAAe,EAAE,CAAC;QAC5B,gBAAW,GAAe,EAAE,CAAC;QAC7B,aAAQ,GAAG,KAAK,CAAC;QAClB,iBAAY,GAAoB,IAAI,CAAC;QAC5B,iBAAiB,CAAC,cAAM,OAAA,KAAI,CAAC,SAAS,EAAE,EAAhB,CAAgB,CAAC,CAAC;IAAC,CAAC;IAC5D,gBAAgB;IAChB,uCAAS,GAAT;QACE,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAA,EAAE,IAAI,OAAA,EAAE,EAAE,EAAJ,CAAI,CAAC,CAAC;QACpC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;IACvB,CAAC;IACD,qCAAO,GAAP,UAAQ,EAAc,IAAU,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5D,oCAAM,GAAN,UAAO,EAAc,IAAU,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC1D,wCAAU,GAAV,cAAwB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC/C,kCAAI,GAAJ,cAAc,CAAC;IACf,kCAAI,GAAJ;QACE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;YACvB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAA,EAAE,IAAI,OAAA,EAAE,EAAE,EAAJ,CAAI,CAAC,CAAC;YACrC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACxB,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IACD,mCAAK,GAAL,cAAe,CAAC;IAChB,qCAAO,GAAP,cAAiB,CAAC;IAClB,oCAAM,GAAN,cAAiB,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IACpC,qCAAO,GAAP,cAAiB,CAAC;IAClB,mCAAK,GAAL,cAAe,CAAC;IAChB,yCAAW,GAAX,UAAY,CAAS,IAAS,CAAC;IAC/B,yCAAW,GAAX,cAAwB,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,0BAAC;AAAD,CAAC,AA7BD,IA6BC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {scheduleMicroTask} from '../facade/lang';\n\n\n/**\n * @experimental Animation support is experimental.\n */\nexport abstract class AnimationPlayer {\n abstract onDone(fn: () => void): void;\n abstract onStart(fn: () => void): void;\n abstract init(): void;\n abstract hasStarted(): boolean;\n abstract play(): void;\n abstract pause(): void;\n abstract restart(): void;\n abstract finish(): void;\n abstract destroy(): void;\n abstract reset(): void;\n abstract setPosition(p: any /** TODO #9100 */): void;\n abstract getPosition(): number;\n get parentPlayer(): AnimationPlayer { throw new Error('NOT IMPLEMENTED: Base Class'); }\n set parentPlayer(player: AnimationPlayer) { throw new Error('NOT IMPLEMENTED: Base Class'); }\n}\n\nexport class NoOpAnimationPlayer implements AnimationPlayer {\n private _onDoneFns: Function[] = [];\n private _onStartFns: Function[] = [];\n private _started = false;\n public parentPlayer: AnimationPlayer = null;\n constructor() { scheduleMicroTask(() => this._onFinish()); }\n /** @internal */\n _onFinish() {\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n onStart(fn: () => void): void { this._onStartFns.push(fn); }\n onDone(fn: () => void): void { this._onDoneFns.push(fn); }\n hasStarted(): boolean { return this._started; }\n init(): void {}\n play(): void {\n if (!this.hasStarted()) {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n }\n this._started = true;\n }\n pause(): void {}\n restart(): void {}\n finish(): void { this._onFinish(); }\n destroy(): void {}\n reset(): void {}\n setPosition(p: number): void {}\n getPosition(): number { return 0; }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -12,6 +12,14 @@ export function queueAnimation(player) {
|
|
|
12
12
|
}
|
|
13
13
|
/** @internal */
|
|
14
14
|
export function triggerQueuedAnimations() {
|
|
15
|
+
// this code is wrapped into a single promise such that the
|
|
16
|
+
// onStart and onDone player callbacks are triggered outside
|
|
17
|
+
// of the digest cycle of animations
|
|
18
|
+
if (_queuedAnimations.length) {
|
|
19
|
+
Promise.resolve(null).then(_triggerAnimations);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function _triggerAnimations() {
|
|
15
23
|
for (var i = 0; i < _queuedAnimations.length; i++) {
|
|
16
24
|
var player = _queuedAnimations[i];
|
|
17
25
|
player.play();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation_queue.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/animation/animation_queue.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,IAAI,iBAAiB,GAAsB,EAAE,CAAC;AAE9C,gBAAgB;AAChB,+BAA+B,MAAuB;IACpD,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC;AAED,gBAAgB;AAChB;IACE,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,iBAAiB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClD,
|
|
1
|
+
{"version":3,"file":"animation_queue.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/animation/animation_queue.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,IAAI,iBAAiB,GAAsB,EAAE,CAAC;AAE9C,gBAAgB;AAChB,+BAA+B,MAAuB;IACpD,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC;AAED,gBAAgB;AAChB;IACE,2DAA2D;IAC3D,4DAA4D;IAC5D,oCAAoC;IACpC,EAAE,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;QAC7B,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACjD,CAAC;AACH,CAAC;AAED;IACE,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,iBAAiB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClD,IAAM,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;QACpC,MAAM,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC;IACD,iBAAiB,GAAG,EAAE,CAAC;AACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AnimationPlayer} from './animation_player';\n\nlet _queuedAnimations: AnimationPlayer[] = [];\n\n/** @internal */\nexport function queueAnimation(player: AnimationPlayer) {\n _queuedAnimations.push(player);\n}\n\n/** @internal */\nexport function triggerQueuedAnimations() {\n // this code is wrapped into a single promise such that the\n // onStart and onDone player callbacks are triggered outside\n // of the digest cycle of animations\n if (_queuedAnimations.length) {\n Promise.resolve(null).then(_triggerAnimations);\n }\n}\n\nfunction _triggerAnimations() {\n for (let i = 0; i < _queuedAnimations.length; i++) {\n const player = _queuedAnimations[i];\n player.play();\n }\n _queuedAnimations = [];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -7,6 +7,7 @@ export declare class AnimationSequencePlayer implements AnimationPlayer {
|
|
|
7
7
|
private _onStartFns;
|
|
8
8
|
private _finished;
|
|
9
9
|
private _started;
|
|
10
|
+
private _destroyed;
|
|
10
11
|
parentPlayer: AnimationPlayer;
|
|
11
12
|
constructor(_players: AnimationPlayer[]);
|
|
12
13
|
private _onNext(start);
|
|
@@ -21,6 +22,7 @@ export declare class AnimationSequencePlayer implements AnimationPlayer {
|
|
|
21
22
|
reset(): void;
|
|
22
23
|
finish(): void;
|
|
23
24
|
destroy(): void;
|
|
24
|
-
setPosition(p:
|
|
25
|
+
setPosition(p: number): void;
|
|
25
26
|
getPosition(): number;
|
|
27
|
+
players: AnimationPlayer[];
|
|
26
28
|
}
|
|
@@ -16,6 +16,7 @@ export var AnimationSequencePlayer = (function () {
|
|
|
16
16
|
this._onStartFns = [];
|
|
17
17
|
this._finished = false;
|
|
18
18
|
this._started = false;
|
|
19
|
+
this._destroyed = false;
|
|
19
20
|
this.parentPlayer = null;
|
|
20
21
|
this._players.forEach(function (player) { player.parentPlayer = _this; });
|
|
21
22
|
this._onNext(false);
|
|
@@ -44,9 +45,6 @@ export var AnimationSequencePlayer = (function () {
|
|
|
44
45
|
AnimationSequencePlayer.prototype._onFinish = function () {
|
|
45
46
|
if (!this._finished) {
|
|
46
47
|
this._finished = true;
|
|
47
|
-
if (!isPresent(this.parentPlayer)) {
|
|
48
|
-
this.destroy();
|
|
49
|
-
}
|
|
50
48
|
this._onDoneFns.forEach(function (fn) { return fn(); });
|
|
51
49
|
this._onDoneFns = [];
|
|
52
50
|
}
|
|
@@ -68,22 +66,36 @@ export var AnimationSequencePlayer = (function () {
|
|
|
68
66
|
};
|
|
69
67
|
AnimationSequencePlayer.prototype.pause = function () { this._activePlayer.pause(); };
|
|
70
68
|
AnimationSequencePlayer.prototype.restart = function () {
|
|
69
|
+
this.reset();
|
|
71
70
|
if (this._players.length > 0) {
|
|
72
|
-
this.reset();
|
|
73
71
|
this._players[0].restart();
|
|
74
72
|
}
|
|
75
73
|
};
|
|
76
|
-
AnimationSequencePlayer.prototype.reset = function () {
|
|
74
|
+
AnimationSequencePlayer.prototype.reset = function () {
|
|
75
|
+
this._players.forEach(function (player) { return player.reset(); });
|
|
76
|
+
this._destroyed = false;
|
|
77
|
+
this._finished = false;
|
|
78
|
+
this._started = false;
|
|
79
|
+
};
|
|
77
80
|
AnimationSequencePlayer.prototype.finish = function () {
|
|
78
81
|
this._onFinish();
|
|
79
82
|
this._players.forEach(function (player) { return player.finish(); });
|
|
80
83
|
};
|
|
81
84
|
AnimationSequencePlayer.prototype.destroy = function () {
|
|
82
|
-
this.
|
|
83
|
-
|
|
85
|
+
if (!this._destroyed) {
|
|
86
|
+
this._onFinish();
|
|
87
|
+
this._players.forEach(function (player) { return player.destroy(); });
|
|
88
|
+
this._destroyed = true;
|
|
89
|
+
this._activePlayer = new NoOpAnimationPlayer();
|
|
90
|
+
}
|
|
84
91
|
};
|
|
85
|
-
AnimationSequencePlayer.prototype.setPosition = function (p
|
|
92
|
+
AnimationSequencePlayer.prototype.setPosition = function (p) { this._players[0].setPosition(p); };
|
|
86
93
|
AnimationSequencePlayer.prototype.getPosition = function () { return this._players[0].getPosition(); };
|
|
94
|
+
Object.defineProperty(AnimationSequencePlayer.prototype, "players", {
|
|
95
|
+
get: function () { return this._players; },
|
|
96
|
+
enumerable: true,
|
|
97
|
+
configurable: true
|
|
98
|
+
});
|
|
87
99
|
return AnimationSequencePlayer;
|
|
88
100
|
}());
|
|
89
101
|
//# sourceMappingURL=animation_sequence_player.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation_sequence_player.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/animation/animation_sequence_player.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,SAAS,EAAE,iBAAiB,EAAC,MAAM,gBAAgB;OAEpD,EAAkB,mBAAmB,EAAC,MAAM,oBAAoB;AAEvE;
|
|
1
|
+
{"version":3,"file":"animation_sequence_player.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/animation/animation_sequence_player.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,SAAS,EAAE,iBAAiB,EAAC,MAAM,gBAAgB;OAEpD,EAAkB,mBAAmB,EAAC,MAAM,oBAAoB;AAEvE;IAWE,iCAAoB,QAA2B;QAXjD,iBAmGC;QAxFqB,aAAQ,GAAR,QAAQ,CAAmB;QAVvC,kBAAa,GAAW,CAAC,CAAC;QAE1B,eAAU,GAAe,EAAE,CAAC;QAC5B,gBAAW,GAAe,EAAE,CAAC;QAC7B,cAAS,GAAG,KAAK,CAAC;QAClB,aAAQ,GAAG,KAAK,CAAC;QACjB,eAAU,GAAG,KAAK,CAAC;QAEpB,iBAAY,GAAoB,IAAI,CAAC;QAG1C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAA,MAAM,IAAM,MAAM,CAAC,YAAY,GAAG,KAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACjE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;IAEO,yCAAO,GAAf,UAAgB,KAAc;QAA9B,iBAkBC;QAjBC,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;YAAC,MAAM,CAAC;QAE3B,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC;YAC9B,IAAI,CAAC,aAAa,GAAG,IAAI,mBAAmB,EAAE,CAAC;YAC/C,iBAAiB,CAAC,cAAM,OAAA,KAAI,CAAC,SAAS,EAAE,EAAhB,CAAgB,CAAC,CAAC;QAC5C,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,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MAAM,CAAC,MAAM,EAAE,EAAf,CAAe,CAAC,CAAC;IACnD,CAAC;IAED,yCAAO,GAAP;QACE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YACrB,IAAI,CAAC,SAAS,EAAE,CAAC;YACjB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAA,MAAM,IAAI,OAAA,MAAM,CAAC,OAAO,EAAE,EAAhB,CAAgB,CAAC,CAAC;YAClD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YACvB,IAAI,CAAC,aAAa,GAAG,IAAI,mBAAmB,EAAE,CAAC;QACjD,CAAC;IACH,CAAC;IAED,6CAAW,GAAX,UAAY,CAAS,IAAU,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEjE,6CAAW,GAAX,cAAwB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IAEhE,sBAAI,4CAAO;aAAX,cAAmC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;;;OAAA;IAC5D,8BAAC;AAAD,CAAC,AAnGD,IAmGC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isPresent, scheduleMicroTask} from '../facade/lang';\n\nimport {AnimationPlayer, NoOpAnimationPlayer} from './animation_player';\n\nexport class AnimationSequencePlayer implements AnimationPlayer {\n private _currentIndex: number = 0;\n private _activePlayer: AnimationPlayer;\n private _onDoneFns: Function[] = [];\n private _onStartFns: Function[] = [];\n private _finished = false;\n private _started = false;\n private _destroyed = false;\n\n public parentPlayer: AnimationPlayer = null;\n\n constructor(private _players: AnimationPlayer[]) {\n this._players.forEach(player => { player.parentPlayer = this; });\n this._onNext(false);\n }\n\n private _onNext(start: boolean) {\n if (this._finished) return;\n\n if (this._players.length == 0) {\n this._activePlayer = new NoOpAnimationPlayer();\n scheduleMicroTask(() => this._onFinish());\n } else if (this._currentIndex >= this._players.length) {\n this._activePlayer = new NoOpAnimationPlayer();\n this._onFinish();\n } else {\n const player = this._players[this._currentIndex++];\n player.onDone(() => this._onNext(true));\n\n this._activePlayer = player;\n if (start) {\n player.play();\n }\n }\n }\n\n private _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n\n init(): void { this._players.forEach(player => player.init()); }\n\n onStart(fn: () => void): void { this._onStartFns.push(fn); }\n\n onDone(fn: () => void): void { this._onDoneFns.push(fn); }\n\n hasStarted() { return this._started; }\n\n play(): void {\n if (!isPresent(this.parentPlayer)) {\n this.init();\n }\n if (!this.hasStarted()) {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n this._started = true;\n }\n this._activePlayer.play();\n }\n\n pause(): void { this._activePlayer.pause(); }\n\n restart(): void {\n this.reset();\n if (this._players.length > 0) {\n this._players[0].restart();\n }\n }\n\n reset(): void {\n this._players.forEach(player => player.reset());\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n }\n\n finish(): void {\n this._onFinish();\n this._players.forEach(player => player.finish());\n }\n\n destroy(): void {\n if (!this._destroyed) {\n this._onFinish();\n this._players.forEach(player => player.destroy());\n this._destroyed = true;\n this._activePlayer = new NoOpAnimationPlayer();\n }\n }\n\n setPosition(p: number): void { this._players[0].setPosition(p); }\n\n getPosition(): number { return this._players[0].getPosition(); }\n\n get players(): AnimationPlayer[] { return this._players; }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -65,6 +65,7 @@ export function balanceAnimationKeyframes(collectedStyles, finalStateStyles, key
|
|
|
65
65
|
if (hasExtraFirstStyles) {
|
|
66
66
|
firstKeyframe.styles.styles.push(extraFirstKeyframeStyles);
|
|
67
67
|
}
|
|
68
|
+
collectAndResolveStyles(collectedStyles, [finalStateStyles]);
|
|
68
69
|
return keyframes;
|
|
69
70
|
}
|
|
70
71
|
export function clearStyles(styles) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation_style_util.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/animation/animation_style_util.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,gBAAgB,EAAC,MAAM,sBAAsB;OAC9C,EAAC,SAAS,EAAC,MAAM,gBAAgB;OAEjC,EAAC,eAAe,EAAC,MAAM,uBAAuB;OAC9C,EAAC,UAAU,EAAC,MAAM,YAAY;AAErC,4CACI,cAAgD,EAAE,SAA2C,EAC7F,SAAwB;IAAxB,yBAAwB,GAAxB,gBAAwB;IAC1B,
|
|
1
|
+
{"version":3,"file":"animation_style_util.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/animation/animation_style_util.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,gBAAgB,EAAC,MAAM,sBAAsB;OAC9C,EAAC,SAAS,EAAC,MAAM,gBAAgB;OAEjC,EAAC,eAAe,EAAC,MAAM,uBAAuB;OAC9C,EAAC,UAAU,EAAC,MAAM,YAAY;AAErC,4CACI,cAAgD,EAAE,SAA2C,EAC7F,SAAwB;IAAxB,yBAAwB,GAAxB,gBAAwB;IAC1B,IAAM,WAAW,GAA4B,EAAE,CAAC;IAEhD,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAA,IAAI;QACjC,IAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;QAC9B,WAAW,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI,UAAU,GAAG,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;IACzE,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,UAAA,IAAI;QACtC,EAAE,CAAC,CA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,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,WAAW,CAAC;AACrB,CAAC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {StringMapWrapper} from '../facade/collection';\nimport {isPresent} from '../facade/lang';\n\nimport {FILL_STYLE_FLAG} from './animation_constants';\nimport {AUTO_STYLE} from './metadata';\n\nexport function prepareFinalAnimationStyles(\n previousStyles: {[key: string]: string | number}, newStyles: {[key: string]: string | number},\n nullValue: string = null): {[key: string]: string} {\n const finalStyles: {[key: string]: string} = {};\n\n Object.keys(newStyles).forEach(prop => {\n const value = newStyles[prop];\n finalStyles[prop] = value == AUTO_STYLE ? nullValue : value.toString();\n });\n\n Object.keys(previousStyles).forEach(prop => {\n if (!isPresent(finalStyles[prop])) {\n finalStyles[prop] = nullValue;\n }\n });\n\n return finalStyles;\n}\n\nexport function balanceAnimationKeyframes(\n collectedStyles: {[key: string]: string | number},\n finalStateStyles: {[key: string]: string | number}, keyframes: any[]): any[] {\n const limit = keyframes.length - 1;\n const firstKeyframe = keyframes[0];\n\n // phase 1: copy all the styles from the first keyframe into the lookup map\n const flatenedFirstKeyframeStyles = flattenStyles(firstKeyframe.styles.styles);\n\n const extraFirstKeyframeStyles: {[key: string]: string} = {};\n let hasExtraFirstStyles = false;\n Object.keys(collectedStyles).forEach(prop => {\n const value = collectedStyles[prop] as string;\n // if the style is already defined in the first keyframe then\n // we do not replace it.\n if (!flatenedFirstKeyframeStyles[prop]) {\n flatenedFirstKeyframeStyles[prop] = value;\n extraFirstKeyframeStyles[prop] = value;\n hasExtraFirstStyles = true;\n }\n });\n\n const keyframeCollectedStyles = StringMapWrapper.merge({}, flatenedFirstKeyframeStyles);\n\n // phase 2: normalize the final keyframe\n const finalKeyframe = keyframes[limit];\n finalKeyframe.styles.styles.unshift(finalStateStyles);\n\n const flatenedFinalKeyframeStyles = flattenStyles(finalKeyframe.styles.styles);\n const extraFinalKeyframeStyles: {[key: string]: string} = {};\n let hasExtraFinalStyles = false;\n Object.keys(keyframeCollectedStyles).forEach(prop => {\n if (!isPresent(flatenedFinalKeyframeStyles[prop])) {\n extraFinalKeyframeStyles[prop] = AUTO_STYLE;\n hasExtraFinalStyles = true;\n }\n });\n\n if (hasExtraFinalStyles) {\n finalKeyframe.styles.styles.push(extraFinalKeyframeStyles);\n }\n\n Object.keys(flatenedFinalKeyframeStyles).forEach(prop => {\n if (!isPresent(flatenedFirstKeyframeStyles[prop])) {\n extraFirstKeyframeStyles[prop] = AUTO_STYLE;\n hasExtraFirstStyles = true;\n }\n });\n\n if (hasExtraFirstStyles) {\n firstKeyframe.styles.styles.push(extraFirstKeyframeStyles);\n }\n\n collectAndResolveStyles(collectedStyles, [finalStateStyles]);\n\n return keyframes;\n}\n\nexport function clearStyles(styles: {[key: string]: string | number}): {[key: string]: string} {\n const finalStyles: {[key: string]: string} = {};\n Object.keys(styles).forEach(key => { finalStyles[key] = null; });\n return finalStyles;\n}\n\nexport function collectAndResolveStyles(\n collection: {[key: string]: string | number}, styles: {[key: string]: string | number}[]) {\n return styles.map(entry => {\n const stylesObj: {[key: string]: string | number} = {};\n Object.keys(entry).forEach(prop => {\n let value = entry[prop];\n if (value == FILL_STYLE_FLAG) {\n value = collection[prop];\n if (!isPresent(value)) {\n value = AUTO_STYLE;\n }\n }\n collection[prop] = value;\n stylesObj[prop] = value;\n });\n return stylesObj;\n });\n}\n\nexport function renderStyles(\n element: any, renderer: any, styles: {[key: string]: string | number}): void {\n Object.keys(styles).forEach(prop => { renderer.setElementStyle(element, prop, styles[prop]); });\n}\n\nexport function flattenStyles(styles: {[key: string]: string | number}[]): {[key: string]: string} {\n const finalStyles: {[key: string]: string} = {};\n styles.forEach(entry => {\n Object.keys(entry).forEach(prop => { finalStyles[prop] = entry[prop] as string; });\n });\n return finalStyles;\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":1,"metadata":{"collectAndResolveStyles":{"__symbolic":"function","parameters":["collection","styles"],"value":{"__symbolic":"error","message":"Function call not supported","line":
|
|
1
|
+
{"__symbolic":"module","version":1,"metadata":{"collectAndResolveStyles":{"__symbolic":"function","parameters":["collection","styles"],"value":{"__symbolic":"error","message":"Function call not supported","line":99,"character":20}}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/animation/metadata.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;;;;;OAEI,EAAC,SAAS,EAAC,MAAM,gBAAgB;AAExC;;GAEG;AACH,OAAO,IAAM,UAAU,GAAG,GAAG,CAAC;AAE9B;;;;;;GAMG;AACH;IACE,gCAAmB,IAAY,EAAS,WAAqC;QAA1D,SAAI,GAAJ,IAAI,CAAQ;QAAS,gBAAW,GAAX,WAAW,CAA0B;IAAG,CAAC;IACnF,6BAAC;AAAD,CAAC,AAFD,IAEC;AAED;;GAEG;AACH;IAAA;IAA8C,CAAC;IAAD,6BAAC;AAAD,CAAC,AAA/C,IAA+C;AAE/C;;;;;;GAMG;AACH;IAAuD,qDAAsB;IAC3E,2CAAmB,aAAqB,EAAS,MAA8B;QAAI,iBAAO,CAAC;QAAxE,kBAAa,GAAb,aAAa,CAAQ;QAAS,WAAM,GAAN,MAAM,CAAwB;IAAa,CAAC;IAC/F,wCAAC;AAAD,CAAC,AAFD,CAAuD,sBAAsB,GAE5E;AAED;;;;;;GAMG;AACH;IAAsD,oDAAsB;IAC1E,0CAAmB,eAAuB,EAAS,KAAwB;QAAI,iBAAO,CAAC;QAApE,oBAAe,GAAf,eAAe,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAmB;IAAa,CAAC;IAC3F,uCAAC;AAAD,CAAC,AAFD,CAAsD,sBAAsB,GAE3E;AAED;;GAEG;AACH;IAAA;IAAyC,CAA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xF,MAAM,CAAC,IAAI,gCAAgC,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AAC9E,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAwB,IAAY,EAAE,SAA8B;IAClE,MAAM,CAAC,IAAI,sBAAsB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACrD,CAAC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isPresent} from '../facade/lang';\n\n/**\n * @experimental Animation support is experimental.\n */\nexport const AUTO_STYLE = '*';\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link trigger trigger\n * animation function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationEntryMetadata {\n constructor(public name: string, public definitions: AnimationStateMetadata[]) {}\n}\n\n/**\n * @experimental Animation support is experimental.\n */\nexport abstract class AnimationStateMetadata {}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link state state animation\n * function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationStateDeclarationMetadata extends AnimationStateMetadata {\n constructor(public stateNameExpr: string, public styles: AnimationStyleMetadata) { super(); }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the\n * {@link transition transition animation function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationStateTransitionMetadata extends AnimationStateMetadata {\n constructor(public stateChangeExpr: string, public steps: AnimationMetadata) { super(); }\n}\n\n/**\n * @experimental Animation support is experimental.\n */\nexport abstract class AnimationMetadata {}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link keyframes keyframes\n * animation function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationKeyframesSequenceMetadata extends AnimationMetadata {\n constructor(public steps: AnimationStyleMetadata[]) { super(); }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link style style animation\n * function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationStyleMetadata extends AnimationMetadata {\n constructor(\n public styles: Array<string|{[key: string]: string | number}>, public offset: number = null) {\n super();\n }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link animate animate\n * animation function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationAnimateMetadata extends AnimationMetadata {\n constructor(\n public timings: string|number,\n public styles: AnimationStyleMetadata|AnimationKeyframesSequenceMetadata) {\n super();\n }\n}\n\n/**\n * @experimental Animation support is experimental.\n */\nexport abstract class AnimationWithStepsMetadata extends AnimationMetadata {\n constructor() { super(); }\n get steps(): AnimationMetadata[] { throw new Error('NOT IMPLEMENTED: Base Class'); }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link sequence sequence\n * animation function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationSequenceMetadata extends AnimationWithStepsMetadata {\n constructor(private _steps: AnimationMetadata[]) { super(); }\n get steps(): AnimationMetadata[] { return this._steps; }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link group group animation\n * function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationGroupMetadata extends AnimationWithStepsMetadata {\n constructor(private _steps: AnimationMetadata[]) { super(); }\n get steps(): AnimationMetadata[] { return this._steps; }\n}\n\n/**\n * `animate` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `animate` specifies an animation step that will apply the provided `styles` data for a given\n * amount of\n * time based on the provided `timing` expression value. Calls to `animate` are expected to be\n * used within {@link sequence an animation sequence}, {@link group group}, or {@link transition\n * transition}.\n *\n * ### Usage\n *\n * The `animate` function accepts two input parameters: `timing` and `styles`:\n *\n * - `timing` is a string based value that can be a combination of a duration with optional\n * delay and easing values. The format for the expression breaks down to `duration delay easing`\n * (therefore a value such as `1s 100ms ease-out` will be parse itself into `duration=1000,\n * delay=100, easing=ease-out`.\n * If a numeric value is provided then that will be used as the `duration` value in millisecond\n * form.\n * - `styles` is the style input data which can either be a call to {@link style style} or {@link\n * keyframes keyframes}.\n * If left empty then the styles from the destination state will be collected and used (this is\n * useful when\n * describing an animation step that will complete an animation by {@link\n * transition#the-final-animate-call animating to the final state}).\n *\n * ```typescript\n * // various functions for specifying timing data\n * animate(500, style(...))\n * animate(\"1s\", style(...))\n * animate(\"100ms 0.5s\", style(...))\n * animate(\"5s ease\", style(...))\n * animate(\"5s 10ms cubic-bezier(.17,.67,.88,.1)\", style(...))\n *\n * // either style() of keyframes() can be used\n * animate(500, style({ background: \"red\" }))\n * animate(500, keyframes([\n * style({ background: \"blue\" })),\n * style({ background: \"red\" }))\n * ])\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function animate(\n timing: string | number, styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata =\n null): AnimationAnimateMetadata {\n var stylesEntry = styles;\n if (!isPresent(stylesEntry)) {\n var EMPTY_STYLE: {[key: string]: string | number} = {};\n stylesEntry = new AnimationStyleMetadata([EMPTY_STYLE], 1);\n }\n return new AnimationAnimateMetadata(timing, stylesEntry);\n}\n\n/**\n * `group` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `group` specifies a list of animation steps that are all run in parallel. Grouped animations\n * are useful when a series of styles must be animated/closed off\n * at different statrting/ending times.\n *\n * The `group` function can either be used within a {@link sequence sequence} or a {@link transition\n * transition}\n * and it will only continue to the next instruction once all of the inner animation steps\n * have completed.\n *\n * ### Usage\n *\n * The `steps` data that is passed into the `group` animation function can either consist\n * of {@link style style} or {@link animate animate} function calls. Each call to `style()` or\n * `animate()`\n * within a group will be executed instantly (use {@link keyframes keyframes} or a\n * {@link animate#usage animate() with a delay value} to offset styles to be applied at a later\n * time).\n *\n * ```typescript\n * group([\n * animate(\"1s\", { background: \"black\" }))\n * animate(\"2s\", { color: \"white\" }))\n * ])\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function group(steps: AnimationMetadata[]): AnimationGroupMetadata {\n return new AnimationGroupMetadata(steps);\n}\n\n/**\n * `sequence` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `sequence` Specifies a list of animation steps that are run one by one. (`sequence` is used\n * by default when an array is passed as animation data into {@link transition transition}.)\n *\n * The `sequence` function can either be used within a {@link group group} or a {@link transition\n * transition}\n * and it will only continue to the next instruction once each of the inner animation steps\n * have completed.\n *\n * To perform animation styling in parallel with other animation steps then\n * have a look at the {@link group group} animation function.\n *\n * ### Usage\n *\n * The `steps` data that is passed into the `sequence` animation function can either consist\n * of {@link style style} or {@link animate animate} function calls. A call to `style()` will apply\n * the\n * provided styling data immediately while a call to `animate()` will apply its styling\n * data over a given time depending on its timing data.\n *\n * ```typescript\n * sequence([\n * style({ opacity: 0 })),\n * animate(\"1s\", { opacity: 1 }))\n * ])\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function sequence(steps: AnimationMetadata[]): AnimationSequenceMetadata {\n return new AnimationSequenceMetadata(steps);\n}\n\n/**\n * `style` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `style` declares a key/value object containing CSS properties/styles that can then\n * be used for {@link state animation states}, within an {@link sequence animation sequence}, or as\n * styling data for both {@link animate animate} and {@link keyframes keyframes}.\n *\n * ### Usage\n *\n * `style` takes in a key/value string map as data and expects one or more CSS property/value\n * pairs to be defined.\n *\n * ```typescript\n * // string values are used for css properties\n * style({ background: \"red\", color: \"blue\" })\n *\n * // numerical (pixel) values are also supported\n * style({ width: 100, height: 0 })\n * ```\n *\n * #### Auto-styles (using `*`)\n *\n * When an asterix (`*`) character is used as a value then it will be detected from the element\n * being animated\n * and applied as animation data when the animation starts.\n *\n * This feature proves useful for a state depending on layout and/or environment factors; in such\n * cases\n * the styles are calculated just before the animation starts.\n *\n * ```typescript\n * // the steps below will animate from 0 to the\n * // actual height of the element\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function style(\n tokens: string | {[key: string]: string | number} |\n Array<string|{[key: string]: string | number}>): AnimationStyleMetadata {\n var input: Array<{[key: string]: string | number}|string>;\n var offset: number = null;\n if (typeof tokens === 'string') {\n input = [<string>tokens];\n } else {\n if (Array.isArray(tokens)) {\n input = <Array<{[key: string]: string | number}>>tokens;\n } else {\n input = [<{[key: string]: string | number}>tokens];\n }\n input.forEach(entry => {\n var entryOffset = (entry as any /** TODO #9100 */)['offset'];\n if (isPresent(entryOffset)) {\n offset = offset == null ? parseFloat(entryOffset) : offset;\n }\n });\n }\n return new AnimationStyleMetadata(input, offset);\n}\n\n/**\n * `state` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `state` declares an animation state within the given trigger. When a state is\n * active within a component then its associated styles will persist on\n * the element that the trigger is attached to (even when the animation ends).\n *\n * To animate between states, have a look at the animation {@link transition transition}\n * DSL function. To register states to an animation trigger please have a look\n * at the {@link trigger trigger} function.\n *\n * #### The `void` state\n *\n * The `void` state value is a reserved word that angular uses to determine when the element is not\n * apart\n * of the application anymore (e.g. when an `ngIf` evaluates to false then the state of the\n * associated element\n * is void).\n *\n * #### The `*` (default) state\n *\n * The `*` state (when styled) is a fallback state that will be used if\n * the state that is being animated is not declared within the trigger.\n *\n * ### Usage\n *\n * `state` will declare an animation state with its associated styles\n * within the given trigger.\n *\n * - `stateNameExpr` can be one or more state names separated by commas.\n * - `styles` refers to the {@link style styling data} that will be persisted on the element once\n * the state\n * has been reached.\n *\n * ```typescript\n * // \"void\" is a reserved name for a state and is used to represent\n * // the state in which an element is detached from from the application.\n * state(\"void\", style({ height: 0 }))\n *\n * // user-defined states\n * state(\"closed\", style({ height: 0 }))\n * state(\"open, visible\", style({ height: \"*\" }))\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function state(\n stateNameExpr: string, styles: AnimationStyleMetadata): AnimationStateDeclarationMetadata {\n return new AnimationStateDeclarationMetadata(stateNameExpr, styles);\n}\n\n/**\n * `keyframes` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `keyframes` specifies a collection of {@link style style} entries each optionally characterized\n * by an `offset` value.\n *\n * ### Usage\n *\n * The `keyframes` animation function is designed to be used alongside the {@link animate animate}\n * animation function. Instead of applying animations from where they are\n * currently to their destination, keyframes can describe how each style entry is applied\n * and at what point within the animation arc (much like CSS Keyframe Animations do).\n *\n * For each `style()` entry an `offset` value can be set. Doing so allows to specifiy at\n * what percentage of the animate time the styles will be applied.\n *\n * ```typescript\n * // the provided offset values describe when each backgroundColor value is applied.\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\", offset: 0 }),\n * style({ backgroundColor: \"blue\", offset: 0.2 }),\n * style({ backgroundColor: \"orange\", offset: 0.3 }),\n * style({ backgroundColor: \"black\", offset: 1 })\n * ]))\n * ```\n *\n * Alternatively, if there are no `offset` values used within the style entries then the offsets\n * will\n * be calculated automatically.\n *\n * ```typescript\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\" }) // offset = 0\n * style({ backgroundColor: \"blue\" }) // offset = 0.33\n * style({ backgroundColor: \"orange\" }) // offset = 0.66\n * style({ backgroundColor: \"black\" }) // offset = 1\n * ]))\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata {\n return new AnimationKeyframesSequenceMetadata(steps);\n}\n\n/**\n * `transition` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `transition` declares the {@link sequence sequence of animation steps} that will be run when the\n * provided\n * `stateChangeExpr` value is satisfied. The `stateChangeExpr` consists of a `state1 => state2`\n * which consists\n * of two known states (use an asterix (`*`) to refer to a dynamic starting and/or ending state).\n *\n * Animation transitions are placed within an {@link trigger animation trigger}. For an transition\n * to animate to\n * a state value and persist its styles then one or more {@link state animation states} is expected\n * to be defined.\n *\n * ### Usage\n *\n * An animation transition is kicked off the `stateChangeExpr` predicate evaluates to true based on\n * what the\n * previous state is and what the current state has become. In other words, if a transition is\n * defined that\n * matches the old/current state criteria then the associated animation will be triggered.\n *\n * ```typescript\n * // all transition/state changes are defined within an animation trigger\n * trigger(\"myAnimationTrigger\", [\n * // if a state is defined then its styles will be persisted when the\n * // animation has fully completed itself\n * state(\"on\", style({ background: \"green\" })),\n * state(\"off\", style({ background: \"grey\" })),\n *\n * // a transition animation that will be kicked off when the state value\n * // bound to \"myAnimationTrigger\" changes from \"on\" to \"off\"\n * transition(\"on => off\", animate(500)),\n *\n * // it is also possible to do run the same animation for both directions\n * transition(\"on <=> off\", animate(500)),\n *\n * // or to define multiple states pairs separated by commas\n * transition(\"on => off, off => void\", animate(500)),\n *\n * // this is a catch-all state change for when an element is inserted into\n * // the page and the destination state is unknown\n * transition(\"void => *\", [\n * style({ opacity: 0 }),\n * animate(500)\n * ]),\n *\n * // this will capture a state change between any states\n * transition(\"* => *\", animate(\"1s 0s\")),\n * ])\n * ```\n *\n * The template associated with this component will make use of the `myAnimationTrigger`\n * animation trigger by binding to an element within its template code.\n *\n * ```html\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div [@myAnimationTrigger]=\"myStatusExp\">...</div>\n * ```\n *\n * #### The final `animate` call\n *\n * If the final step within the transition steps is a call to `animate()` that **only**\n * uses a timing value with **no style data** then it will be automatically used as the final\n * animation\n * arc for the element to animate itself to the final state. This involves an automatic mix of\n * adding/removing CSS styles so that the element will be in the exact state it should be for the\n * applied state to be presented correctly.\n *\n * ```\n * // start off by hiding the element, but make sure that it animates properly to whatever state\n * // is currently active for \"myAnimationTrigger\"\n * transition(\"void => *\", [\n * style({ opacity: 0 }),\n * animate(500)\n * ])\n * ```\n *\n * ### Transition Aliases (`:enter` and `:leave`)\n *\n * Given that enter (insertion) and leave (removal) animations are so common,\n * the `transition` function accepts both `:enter` and `:leave` values which\n * are aliases for the `void => *` and `* => void` state changes.\n *\n * ```\n * transition(\":enter\", [\n * style({ opacity: 0 }),\n * animate(500, style({ opacity: 1 }))\n * ])\n * transition(\":leave\", [\n * animate(500, style({ opacity: 0 }))\n * ])\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function transition(stateChangeExpr: string, steps: AnimationMetadata | AnimationMetadata[]):\n AnimationStateTransitionMetadata {\n var animationData = Array.isArray(steps) ? new AnimationSequenceMetadata(steps) : steps;\n return new AnimationStateTransitionMetadata(stateChangeExpr, animationData);\n}\n\n/**\n * `trigger` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `trigger` Creates an animation trigger which will a list of {@link state state} and {@link\n * transition transition}\n * entries that will be evaluated when the expression bound to the trigger changes.\n *\n * Triggers are registered within the component annotation data under the\n * {@link Component#animations-anchor animations section}. An animation trigger can\n * be placed on an element within a template by referencing the name of the\n * trigger followed by the expression value that the trigger is bound to\n * (in the form of `[@triggerName]=\"expression\"`.\n *\n * ### Usage\n *\n * `trigger` will create an animation trigger reference based on the provided `name` value.\n * The provided `animation` value is expected to be an array consisting of {@link state state} and\n * {@link transition transition}\n * declarations.\n *\n * ```typescript\n * @Component({\n * selector: 'my-component',\n * templateUrl: 'my-component-tpl.html',\n * animations: [\n * trigger(\"myAnimationTrigger\", [\n * state(...),\n * state(...),\n * transition(...),\n * transition(...)\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"something\";\n * }\n * ```\n *\n * The template associated with this component will make use of the `myAnimationTrigger`\n * animation trigger by binding to an element within its template code.\n *\n * ```html\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div [@myAnimationTrigger]=\"myStatusExp\">...</div>\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function trigger(name: string, animation: AnimationMetadata[]): AnimationEntryMetadata {\n return new AnimationEntryMetadata(name, animation);\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/animation/metadata.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;;;;;OAEI,EAAC,SAAS,EAAC,MAAM,gBAAgB;AAExC;;GAEG;AACH,OAAO,IAAM,UAAU,GAAG,GAAG,CAAC;AAE9B;;;;;;GAMG;AACH;IACE,gCAAmB,IAAY,EAAS,WAAqC;QAA1D,SAAI,GAAJ,IAAI,CAAQ;QAAS,gBAAW,GAAX,WAAW,CAA0B;IAAG,CAAC;IACnF,6BAAC;AAAD,CAAC,AAFD,IAEC;AAED;;GAEG;AACH;IAAA;IAA8C,CAAC;IAAD,6BAAC;AAAD,CAAC,AAA/C,IAA+C;AAE/C;;;;;;GAMG;AACH;IAAuD,qDAAsB;IAC3E,2CAAmB,aAAqB,EAAS,MAA8B;QAAI,iBAAO,CAAC;QAAxE,kBAAa,GAAb,aAAa,CAAQ;QAAS,WAAM,GAAN,MAAM,CAAwB;IAAa,CAAC;IAC/F,wCAAC;AAAD,CAAC,AAFD,CAAuD,sBAAsB,GAE5E;AAED;;;;;;GAMG;AACH;IAAsD,oDAAsB;IAC1E,0CAAmB,eAAuB,EAAS,KAAwB;QAAI,iBAAO,CAAC;QAApE,oBAAe,GAAf,eAAe,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAmB;IAAa,CAAC;IAC3F,uCAAC;AAAD,CAAC,AAFD,CAAsD,sBAAsB,GAE3E;AAED;;GAEG;AACH;IAAA;IAAyC,CAAC;IAAD,wBAAC;AAAD,CAAC,AAA1C,IAA0C;AAE1C;;;;;;GAMG;AACH;IAAwD,sDAAiB;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AED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAwB,IAAY,EAAE,SAA8B;IAClE,MAAM,CAAC,IAAI,sBAAsB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACrD,CAAC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isPresent} from '../facade/lang';\n\n/**\n * @experimental Animation support is experimental.\n */\nexport const AUTO_STYLE = '*';\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link trigger trigger\n * animation function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationEntryMetadata {\n constructor(public name: string, public definitions: AnimationStateMetadata[]) {}\n}\n\n/**\n * @experimental Animation support is experimental.\n */\nexport abstract class AnimationStateMetadata {}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link state state animation\n * function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationStateDeclarationMetadata extends AnimationStateMetadata {\n constructor(public stateNameExpr: string, public styles: AnimationStyleMetadata) { super(); }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the\n * {@link transition transition animation function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationStateTransitionMetadata extends AnimationStateMetadata {\n constructor(public stateChangeExpr: string, public steps: AnimationMetadata) { super(); }\n}\n\n/**\n * @experimental Animation support is experimental.\n */\nexport abstract class AnimationMetadata {}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link keyframes keyframes\n * animation function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationKeyframesSequenceMetadata extends AnimationMetadata {\n constructor(public steps: AnimationStyleMetadata[]) { super(); }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link style style animation\n * function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationStyleMetadata extends AnimationMetadata {\n constructor(\n public styles: Array<string|{[key: string]: string | number}>, public offset: number = null) {\n super();\n }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link animate animate\n * animation function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationAnimateMetadata extends AnimationMetadata {\n constructor(\n public timings: string|number,\n public styles: AnimationStyleMetadata|AnimationKeyframesSequenceMetadata) {\n super();\n }\n}\n\n/**\n * @experimental Animation support is experimental.\n */\nexport abstract class AnimationWithStepsMetadata extends AnimationMetadata {\n constructor() { super(); }\n get steps(): AnimationMetadata[] { throw new Error('NOT IMPLEMENTED: Base Class'); }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link sequence sequence\n * animation function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationSequenceMetadata extends AnimationWithStepsMetadata {\n constructor(private _steps: AnimationMetadata[]) { super(); }\n get steps(): AnimationMetadata[] { return this._steps; }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link group group animation\n * function} is called.\n *\n * @experimental Animation support is experimental.\n */\nexport class AnimationGroupMetadata extends AnimationWithStepsMetadata {\n constructor(private _steps: AnimationMetadata[]) { super(); }\n get steps(): AnimationMetadata[] { return this._steps; }\n}\n\n/**\n * `animate` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `animate` specifies an animation step that will apply the provided `styles` data for a given\n * amount of\n * time based on the provided `timing` expression value. Calls to `animate` are expected to be\n * used within {@link sequence an animation sequence}, {@link group group}, or {@link transition\n * transition}.\n *\n * ### Usage\n *\n * The `animate` function accepts two input parameters: `timing` and `styles`:\n *\n * - `timing` is a string based value that can be a combination of a duration with optional\n * delay and easing values. The format for the expression breaks down to `duration delay easing`\n * (therefore a value such as `1s 100ms ease-out` will be parse itself into `duration=1000,\n * delay=100, easing=ease-out`.\n * If a numeric value is provided then that will be used as the `duration` value in millisecond\n * form.\n * - `styles` is the style input data which can either be a call to {@link style style} or {@link\n * keyframes keyframes}.\n * If left empty then the styles from the destination state will be collected and used (this is\n * useful when\n * describing an animation step that will complete an animation by {@link\n * transition#the-final-animate-call animating to the final state}).\n *\n * ```typescript\n * // various functions for specifying timing data\n * animate(500, style(...))\n * animate(\"1s\", style(...))\n * animate(\"100ms 0.5s\", style(...))\n * animate(\"5s ease\", style(...))\n * animate(\"5s 10ms cubic-bezier(.17,.67,.88,.1)\", style(...))\n *\n * // either style() of keyframes() can be used\n * animate(500, style({ background: \"red\" }))\n * animate(500, keyframes([\n * style({ background: \"blue\" })),\n * style({ background: \"red\" }))\n * ])\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function animate(\n timing: string | number, styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata =\n null): AnimationAnimateMetadata {\n let stylesEntry = styles;\n if (!isPresent(stylesEntry)) {\n const EMPTY_STYLE: {[key: string]: string | number} = {};\n stylesEntry = new AnimationStyleMetadata([EMPTY_STYLE], 1);\n }\n return new AnimationAnimateMetadata(timing, stylesEntry);\n}\n\n/**\n * `group` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `group` specifies a list of animation steps that are all run in parallel. Grouped animations\n * are useful when a series of styles must be animated/closed off\n * at different statrting/ending times.\n *\n * The `group` function can either be used within a {@link sequence sequence} or a {@link transition\n * transition}\n * and it will only continue to the next instruction once all of the inner animation steps\n * have completed.\n *\n * ### Usage\n *\n * The `steps` data that is passed into the `group` animation function can either consist\n * of {@link style style} or {@link animate animate} function calls. Each call to `style()` or\n * `animate()`\n * within a group will be executed instantly (use {@link keyframes keyframes} or a\n * {@link animate#usage animate() with a delay value} to offset styles to be applied at a later\n * time).\n *\n * ```typescript\n * group([\n * animate(\"1s\", { background: \"black\" }))\n * animate(\"2s\", { color: \"white\" }))\n * ])\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function group(steps: AnimationMetadata[]): AnimationGroupMetadata {\n return new AnimationGroupMetadata(steps);\n}\n\n/**\n * `sequence` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `sequence` Specifies a list of animation steps that are run one by one. (`sequence` is used\n * by default when an array is passed as animation data into {@link transition transition}.)\n *\n * The `sequence` function can either be used within a {@link group group} or a {@link transition\n * transition}\n * and it will only continue to the next instruction once each of the inner animation steps\n * have completed.\n *\n * To perform animation styling in parallel with other animation steps then\n * have a look at the {@link group group} animation function.\n *\n * ### Usage\n *\n * The `steps` data that is passed into the `sequence` animation function can either consist\n * of {@link style style} or {@link animate animate} function calls. A call to `style()` will apply\n * the\n * provided styling data immediately while a call to `animate()` will apply its styling\n * data over a given time depending on its timing data.\n *\n * ```typescript\n * sequence([\n * style({ opacity: 0 })),\n * animate(\"1s\", { opacity: 1 }))\n * ])\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function sequence(steps: AnimationMetadata[]): AnimationSequenceMetadata {\n return new AnimationSequenceMetadata(steps);\n}\n\n/**\n * `style` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `style` declares a key/value object containing CSS properties/styles that can then\n * be used for {@link state animation states}, within an {@link sequence animation sequence}, or as\n * styling data for both {@link animate animate} and {@link keyframes keyframes}.\n *\n * ### Usage\n *\n * `style` takes in a key/value string map as data and expects one or more CSS property/value\n * pairs to be defined.\n *\n * ```typescript\n * // string values are used for css properties\n * style({ background: \"red\", color: \"blue\" })\n *\n * // numerical (pixel) values are also supported\n * style({ width: 100, height: 0 })\n * ```\n *\n * #### Auto-styles (using `*`)\n *\n * When an asterix (`*`) character is used as a value then it will be detected from the element\n * being animated\n * and applied as animation data when the animation starts.\n *\n * This feature proves useful for a state depending on layout and/or environment factors; in such\n * cases\n * the styles are calculated just before the animation starts.\n *\n * ```typescript\n * // the steps below will animate from 0 to the\n * // actual height of the element\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function style(\n tokens: string | {[key: string]: string | number} |\n Array<string|{[key: string]: string | number}>): AnimationStyleMetadata {\n let input: Array<{[key: string]: string | number}|string>;\n let offset: number = null;\n if (typeof tokens === 'string') {\n input = [<string>tokens];\n } else {\n if (Array.isArray(tokens)) {\n input = <Array<{[key: string]: string | number}>>tokens;\n } else {\n input = [<{[key: string]: string | number}>tokens];\n }\n input.forEach(entry => {\n const entryOffset = (entry as any /** TODO #9100 */)['offset'];\n if (isPresent(entryOffset)) {\n offset = offset == null ? parseFloat(entryOffset) : offset;\n }\n });\n }\n return new AnimationStyleMetadata(input, offset);\n}\n\n/**\n * `state` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `state` declares an animation state within the given trigger. When a state is\n * active within a component then its associated styles will persist on\n * the element that the trigger is attached to (even when the animation ends).\n *\n * To animate between states, have a look at the animation {@link transition transition}\n * DSL function. To register states to an animation trigger please have a look\n * at the {@link trigger trigger} function.\n *\n * #### The `void` state\n *\n * The `void` state value is a reserved word that angular uses to determine when the element is not\n * apart\n * of the application anymore (e.g. when an `ngIf` evaluates to false then the state of the\n * associated element\n * is void).\n *\n * #### The `*` (default) state\n *\n * The `*` state (when styled) is a fallback state that will be used if\n * the state that is being animated is not declared within the trigger.\n *\n * ### Usage\n *\n * `state` will declare an animation state with its associated styles\n * within the given trigger.\n *\n * - `stateNameExpr` can be one or more state names separated by commas.\n * - `styles` refers to the {@link style styling data} that will be persisted on the element once\n * the state\n * has been reached.\n *\n * ```typescript\n * // \"void\" is a reserved name for a state and is used to represent\n * // the state in which an element is detached from from the application.\n * state(\"void\", style({ height: 0 }))\n *\n * // user-defined states\n * state(\"closed\", style({ height: 0 }))\n * state(\"open, visible\", style({ height: \"*\" }))\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function state(\n stateNameExpr: string, styles: AnimationStyleMetadata): AnimationStateDeclarationMetadata {\n return new AnimationStateDeclarationMetadata(stateNameExpr, styles);\n}\n\n/**\n * `keyframes` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `keyframes` specifies a collection of {@link style style} entries each optionally characterized\n * by an `offset` value.\n *\n * ### Usage\n *\n * The `keyframes` animation function is designed to be used alongside the {@link animate animate}\n * animation function. Instead of applying animations from where they are\n * currently to their destination, keyframes can describe how each style entry is applied\n * and at what point within the animation arc (much like CSS Keyframe Animations do).\n *\n * For each `style()` entry an `offset` value can be set. Doing so allows to specifiy at\n * what percentage of the animate time the styles will be applied.\n *\n * ```typescript\n * // the provided offset values describe when each backgroundColor value is applied.\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\", offset: 0 }),\n * style({ backgroundColor: \"blue\", offset: 0.2 }),\n * style({ backgroundColor: \"orange\", offset: 0.3 }),\n * style({ backgroundColor: \"black\", offset: 1 })\n * ]))\n * ```\n *\n * Alternatively, if there are no `offset` values used within the style entries then the offsets\n * will\n * be calculated automatically.\n *\n * ```typescript\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\" }) // offset = 0\n * style({ backgroundColor: \"blue\" }) // offset = 0.33\n * style({ backgroundColor: \"orange\" }) // offset = 0.66\n * style({ backgroundColor: \"black\" }) // offset = 1\n * ]))\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata {\n return new AnimationKeyframesSequenceMetadata(steps);\n}\n\n/**\n * `transition` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `transition` declares the {@link sequence sequence of animation steps} that will be run when the\n * provided\n * `stateChangeExpr` value is satisfied. The `stateChangeExpr` consists of a `state1 => state2`\n * which consists\n * of two known states (use an asterix (`*`) to refer to a dynamic starting and/or ending state).\n *\n * Animation transitions are placed within an {@link trigger animation trigger}. For an transition\n * to animate to\n * a state value and persist its styles then one or more {@link state animation states} is expected\n * to be defined.\n *\n * ### Usage\n *\n * An animation transition is kicked off the `stateChangeExpr` predicate evaluates to true based on\n * what the\n * previous state is and what the current state has become. In other words, if a transition is\n * defined that\n * matches the old/current state criteria then the associated animation will be triggered.\n *\n * ```typescript\n * // all transition/state changes are defined within an animation trigger\n * trigger(\"myAnimationTrigger\", [\n * // if a state is defined then its styles will be persisted when the\n * // animation has fully completed itself\n * state(\"on\", style({ background: \"green\" })),\n * state(\"off\", style({ background: \"grey\" })),\n *\n * // a transition animation that will be kicked off when the state value\n * // bound to \"myAnimationTrigger\" changes from \"on\" to \"off\"\n * transition(\"on => off\", animate(500)),\n *\n * // it is also possible to do run the same animation for both directions\n * transition(\"on <=> off\", animate(500)),\n *\n * // or to define multiple states pairs separated by commas\n * transition(\"on => off, off => void\", animate(500)),\n *\n * // this is a catch-all state change for when an element is inserted into\n * // the page and the destination state is unknown\n * transition(\"void => *\", [\n * style({ opacity: 0 }),\n * animate(500)\n * ]),\n *\n * // this will capture a state change between any states\n * transition(\"* => *\", animate(\"1s 0s\")),\n * ])\n * ```\n *\n * The template associated with this component will make use of the `myAnimationTrigger`\n * animation trigger by binding to an element within its template code.\n *\n * ```html\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div [@myAnimationTrigger]=\"myStatusExp\">...</div>\n * ```\n *\n * #### The final `animate` call\n *\n * If the final step within the transition steps is a call to `animate()` that **only**\n * uses a timing value with **no style data** then it will be automatically used as the final\n * animation\n * arc for the element to animate itself to the final state. This involves an automatic mix of\n * adding/removing CSS styles so that the element will be in the exact state it should be for the\n * applied state to be presented correctly.\n *\n * ```\n * // start off by hiding the element, but make sure that it animates properly to whatever state\n * // is currently active for \"myAnimationTrigger\"\n * transition(\"void => *\", [\n * style({ opacity: 0 }),\n * animate(500)\n * ])\n * ```\n *\n * ### Transition Aliases (`:enter` and `:leave`)\n *\n * Given that enter (insertion) and leave (removal) animations are so common,\n * the `transition` function accepts both `:enter` and `:leave` values which\n * are aliases for the `void => *` and `* => void` state changes.\n *\n * ```\n * transition(\":enter\", [\n * style({ opacity: 0 }),\n * animate(500, style({ opacity: 1 }))\n * ])\n * transition(\":leave\", [\n * animate(500, style({ opacity: 0 }))\n * ])\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function transition(stateChangeExpr: string, steps: AnimationMetadata | AnimationMetadata[]):\n AnimationStateTransitionMetadata {\n const animationData = Array.isArray(steps) ? new AnimationSequenceMetadata(steps) : steps;\n return new AnimationStateTransitionMetadata(stateChangeExpr, animationData);\n}\n\n/**\n * `trigger` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link Component#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `trigger` Creates an animation trigger which will a list of {@link state state} and {@link\n * transition transition}\n * entries that will be evaluated when the expression bound to the trigger changes.\n *\n * Triggers are registered within the component annotation data under the\n * {@link Component#animations-anchor animations section}. An animation trigger can\n * be placed on an element within a template by referencing the name of the\n * trigger followed by the expression value that the trigger is bound to\n * (in the form of `[@triggerName]=\"expression\"`.\n *\n * ### Usage\n *\n * `trigger` will create an animation trigger reference based on the provided `name` value.\n * The provided `animation` value is expected to be an array consisting of {@link state state} and\n * {@link transition transition}\n * declarations.\n *\n * ```typescript\n * @Component({\n * selector: 'my-component',\n * templateUrl: 'my-component-tpl.html',\n * animations: [\n * trigger(\"myAnimationTrigger\", [\n * state(...),\n * state(...),\n * transition(...),\n * transition(...)\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"something\";\n * }\n * ```\n *\n * The template associated with this component will make use of the `myAnimationTrigger`\n * animation trigger by binding to an element within its template code.\n *\n * ```html\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div [@myAnimationTrigger]=\"myStatusExp\">...</div>\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nexport function trigger(name: string, animation: AnimationMetadata[]): AnimationEntryMetadata {\n return new AnimationEntryMetadata(name, animation);\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view_animation_map.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/animation/view_animation_map.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAGI,EAAC,SAAS,EAAC,MAAM,gBAAgB;AAIxC;IAAA;QACU,SAAI,GAAG,IAAI,GAAG,EAAyC,CAAC;QACxD,gBAAW,GAAsB,EAAE,CAAC;IA4C9C,CAAC;IA1CC,+BAAI,GAAJ,UAAK,OAAY,EAAE,aAAqB;QACtC,
|
|
1
|
+
{"version":3,"file":"view_animation_map.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/animation/view_animation_map.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAGI,EAAC,SAAS,EAAC,MAAM,gBAAgB;AAIxC;IAAA;QACU,SAAI,GAAG,IAAI,GAAG,EAAyC,CAAC;QACxD,gBAAW,GAAsB,EAAE,CAAC;IA4C9C,CAAC;IA1CC,+BAAI,GAAJ,UAAK,OAAY,EAAE,aAAqB;QACtC,IAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAClD,EAAE,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;YAClC,MAAM,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAED,kDAAuB,GAAvB,UAAwB,OAAY;QAClC,IAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAElC,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,EAAE,CAAC,CAAC,CA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MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;gBACjD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;IACH,CAAC;IACH,uBAAC;AAAD,CAAC,AA9CD,IA8CC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {isPresent} from '../facade/lang';\n\nimport {AnimationPlayer} from './animation_player';\n\nexport class ViewAnimationMap {\n private _map = new Map<any, {[key: string]: AnimationPlayer}>();\n private _allPlayers: AnimationPlayer[] = [];\n\n find(element: any, animationName: string): AnimationPlayer {\n const playersByAnimation = this._map.get(element);\n if (isPresent(playersByAnimation)) {\n return playersByAnimation[animationName];\n }\n }\n\n findAllPlayersByElement(element: any): AnimationPlayer[] {\n const el = this._map.get(element);\n\n return el ? Object.keys(el).map(k => el[k]) : [];\n }\n\n set(element: any, animationName: string, player: AnimationPlayer): void {\n let playersByAnimation = this._map.get(element);\n if (!isPresent(playersByAnimation)) {\n playersByAnimation = {};\n }\n const existingEntry = playersByAnimation[animationName];\n if (isPresent(existingEntry)) {\n this.remove(element, animationName);\n }\n playersByAnimation[animationName] = player;\n this._allPlayers.push(player);\n this._map.set(element, playersByAnimation);\n }\n\n getAllPlayers(): AnimationPlayer[] { return this._allPlayers; }\n\n remove(element: any, animationName: string): void {\n const playersByAnimation = this._map.get(element);\n if (playersByAnimation) {\n const player = playersByAnimation[animationName];\n delete playersByAnimation[animationName];\n const index = this._allPlayers.indexOf(player);\n this._allPlayers.splice(index, 1);\n\n if (Object.keys(playersByAnimation).length === 0) {\n this._map.delete(element);\n }\n }\n }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -18,7 +18,7 @@ export declare enum ChangeDetectionStrategy {
|
|
|
18
18
|
*/
|
|
19
19
|
export declare enum ChangeDetectorStatus {
|
|
20
20
|
/**
|
|
21
|
-
* `
|
|
21
|
+
* `CheckOnce` means that after calling detectChanges the mode of the change detector
|
|
22
22
|
* will become `Checked`.
|
|
23
23
|
*/
|
|
24
24
|
CheckOnce = 0,
|
|
@@ -28,7 +28,7 @@ export var ChangeDetectionStrategy;
|
|
|
28
28
|
export var ChangeDetectorStatus;
|
|
29
29
|
(function (ChangeDetectorStatus) {
|
|
30
30
|
/**
|
|
31
|
-
* `
|
|
31
|
+
* `CheckOnce` means that after calling detectChanges the mode of the change detector
|
|
32
32
|
* will become `Checked`.
|
|
33
33
|
*/
|
|
34
34
|
ChangeDetectorStatus[ChangeDetectorStatus["CheckOnce"] = 0] = "CheckOnce";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/change_detection/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,OAAO,EAAC,MAAM,gBAAgB;AAEtC;;;;GAIG;AACH,WAAY,uBAUX;AAVD,WAAY,uBAAuB;IACjC;;OAEG;IACH,yEAAM,CAAA;IAEN;;OAEG;IACH,2EAAO,CAAA;AACT,CAAC,EAVW,uBAAuB,KAAvB,uBAAuB,QAUlC;AAED;;GAEG;AACH,WAAY,oBAoCX;AApCD,WAAY,oBAAoB;IAC9B;;;OAGG;IACH,yEAAS,CAAA;IAET;;;OAGG;IACH,qEAAO,CAAA;IAEP;;;OAGG;IACH,6EAAW,CAAA;IAEX;;;OAGG;IACH,uEAAQ,CAAA;IAER;;;;OAIG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,yEAAS,CAAA;AACX,CAAC,EApCW,oBAAoB,KAApB,oBAAoB,QAoC/B;AAED,iDAAiD,uBAAgD;IAE/F,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC;QACnC,uBAAuB,KAAK,uBAAuB,CAAC,OAAO,CAAC;AAClE,CAAC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isBlank} from '../facade/lang';\n\n/**\n * Describes within the change detector which strategy will be used the next time change\n * detection is triggered.\n * @stable\n */\nexport enum ChangeDetectionStrategy {\n /**\n * `OnPush` means that the change detector's mode will be set to `CheckOnce` during hydration.\n */\n OnPush,\n\n /**\n * `Default` means that the change detector's mode will be set to `CheckAlways` during hydration.\n */\n Default,\n}\n\n/**\n * Describes the status of the detector.\n */\nexport enum ChangeDetectorStatus {\n /**\n * `
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/change_detection/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;OAEI,EAAC,OAAO,EAAC,MAAM,gBAAgB;AAEtC;;;;GAIG;AACH,WAAY,uBAUX;AAVD,WAAY,uBAAuB;IACjC;;OAEG;IACH,yEAAM,CAAA;IAEN;;OAEG;IACH,2EAAO,CAAA;AACT,CAAC,EAVW,uBAAuB,KAAvB,uBAAuB,QAUlC;AAED;;GAEG;AACH,WAAY,oBAoCX;AApCD,WAAY,oBAAoB;IAC9B;;;OAGG;IACH,yEAAS,CAAA;IAET;;;OAGG;IACH,qEAAO,CAAA;IAEP;;;OAGG;IACH,6EAAW,CAAA;IAEX;;;OAGG;IACH,uEAAQ,CAAA;IAER;;;;OAIG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,yEAAS,CAAA;AACX,CAAC,EApCW,oBAAoB,KAApB,oBAAoB,QAoC/B;AAED,iDAAiD,uBAAgD;IAE/F,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC;QACnC,uBAAuB,KAAK,uBAAuB,CAAC,OAAO,CAAC;AAClE,CAAC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isBlank} from '../facade/lang';\n\n/**\n * Describes within the change detector which strategy will be used the next time change\n * detection is triggered.\n * @stable\n */\nexport enum ChangeDetectionStrategy {\n /**\n * `OnPush` means that the change detector's mode will be set to `CheckOnce` during hydration.\n */\n OnPush,\n\n /**\n * `Default` means that the change detector's mode will be set to `CheckAlways` during hydration.\n */\n Default,\n}\n\n/**\n * Describes the status of the detector.\n */\nexport enum ChangeDetectorStatus {\n /**\n * `CheckOnce` means that after calling detectChanges the mode of the change detector\n * will become `Checked`.\n */\n CheckOnce,\n\n /**\n * `Checked` means that the change detector should be skipped until its mode changes to\n * `CheckOnce`.\n */\n Checked,\n\n /**\n * `CheckAlways` means that after calling detectChanges the mode of the change detector\n * will remain `CheckAlways`.\n */\n CheckAlways,\n\n /**\n * `Detached` means that the change detector sub tree is not a part of the main tree and\n * should be skipped.\n */\n Detached,\n\n /**\n * `Errored` means that the change detector encountered an error checking a binding\n * or calling a directive lifecycle method and is now in an inconsistent state. Change\n * detectors in this state will no longer detect changes.\n */\n Errored,\n\n /**\n * `Destroyed` means that the change detector is destroyed.\n */\n Destroyed,\n}\n\nexport function isDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy):\n boolean {\n return isBlank(changeDetectionStrategy) ||\n changeDetectionStrategy === ChangeDetectionStrategy.Default;\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -228,8 +228,8 @@ export var DefaultIterableDiffer = (function () {
|
|
|
228
228
|
*/
|
|
229
229
|
DefaultIterableDiffer.prototype._reset = function () {
|
|
230
230
|
if (this.isDirty) {
|
|
231
|
-
var record;
|
|
232
|
-
var nextRecord;
|
|
231
|
+
var record = void 0;
|
|
232
|
+
var nextRecord = void 0;
|
|
233
233
|
for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {
|
|
234
234
|
record._nextPrevious = record._next;
|
|
235
235
|
}
|