From 352c348f89a0f6b00f56c078019fdcaa0d50498e Mon Sep 17 00:00:00 2001 From: Dzmitry Shylovich Date: Thu, 19 Jan 2017 02:30:02 +0300 Subject: [PATCH] fix(core): export animation classes required for Renderer impl Closes #14001 --- .../core/src/animation/animation_keyframe.ts | 3 ++ .../core/src/animation/animation_player.ts | 3 ++ .../core/src/animation/animation_styles.ts | 3 ++ modules/@angular/core/src/core.ts | 4 ++- tools/public_api_guard/core/index.d.ts | 35 +++++++++++++++++++ 5 files changed, 47 insertions(+), 1 deletion(-) diff --git a/modules/@angular/core/src/animation/animation_keyframe.ts b/modules/@angular/core/src/animation/animation_keyframe.ts index f33aeeaff402ef..a367bdc0d9649b 100644 --- a/modules/@angular/core/src/animation/animation_keyframe.ts +++ b/modules/@angular/core/src/animation/animation_keyframe.ts @@ -8,6 +8,9 @@ import {AnimationStyles} from './animation_styles'; +/** + * @experimental + */ export class AnimationKeyframe { constructor(public offset: number, public styles: AnimationStyles) {} } diff --git a/modules/@angular/core/src/animation/animation_player.ts b/modules/@angular/core/src/animation/animation_player.ts index c086bf09fb8f4e..df64c8418c7b2d 100644 --- a/modules/@angular/core/src/animation/animation_player.ts +++ b/modules/@angular/core/src/animation/animation_player.ts @@ -29,6 +29,9 @@ export abstract class AnimationPlayer { set parentPlayer(player: AnimationPlayer) { throw new Error('NOT IMPLEMENTED: Base Class'); } } +/** + * @experimental + */ export class NoOpAnimationPlayer implements AnimationPlayer { private _onDoneFns: Function[] = []; private _onStartFns: Function[] = []; diff --git a/modules/@angular/core/src/animation/animation_styles.ts b/modules/@angular/core/src/animation/animation_styles.ts index 78f249969dfc61..12e3b14027660c 100644 --- a/modules/@angular/core/src/animation/animation_styles.ts +++ b/modules/@angular/core/src/animation/animation_styles.ts @@ -6,6 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ +/** + * @experimental + */ export class AnimationStyles { constructor(public styles: {[key: string]: string | number}[]) {} } diff --git a/modules/@angular/core/src/core.ts b/modules/@angular/core/src/core.ts index 94c576cb7ce2c9..ec7285ee8bc2be 100644 --- a/modules/@angular/core/src/core.ts +++ b/modules/@angular/core/src/core.ts @@ -34,5 +34,7 @@ export {ErrorHandler} from './error_handler'; export * from './core_private_export'; export * from './animation/metadata'; export {AnimationTransitionEvent} from './animation/animation_transition_event'; -export {AnimationPlayer} from './animation/animation_player'; +export {AnimationPlayer, NoOpAnimationPlayer} from './animation/animation_player'; +export {AnimationStyles} from './animation/animation_styles'; +export {AnimationKeyframe} from './animation/animation_keyframe'; export {Sanitizer, SecurityContext} from './security'; diff --git a/tools/public_api_guard/core/index.d.ts b/tools/public_api_guard/core/index.d.ts index b59124e704069b..11a7a0a940da8c 100644 --- a/tools/public_api_guard/core/index.d.ts +++ b/tools/public_api_guard/core/index.d.ts @@ -44,6 +44,13 @@ export declare class AnimationGroupMetadata extends AnimationWithStepsMetadata { constructor(_steps: AnimationMetadata[]); } +/** @experimental */ +export declare class AnimationKeyframe { + offset: number; + styles: AnimationStyles; + constructor(offset: number, styles: AnimationStyles); +} + /** @experimental */ export declare class AnimationKeyframesSequenceMetadata extends AnimationMetadata { steps: AnimationStyleMetadata[]; @@ -106,6 +113,16 @@ export declare class AnimationStyleMetadata extends AnimationMetadata { }>, offset?: number); } +/** @experimental */ +export declare class AnimationStyles { + styles: { + [key: string]: string | number; + }[]; + constructor(styles: { + [key: string]: string | number; + }[]); +} + /** @experimental */ export declare class AnimationTransitionEvent { element: ElementRef; @@ -669,6 +686,24 @@ export declare class NgZone { /** @experimental */ export declare const NO_ERRORS_SCHEMA: SchemaMetadata; +/** @experimental */ +export declare class NoOpAnimationPlayer implements AnimationPlayer { + parentPlayer: AnimationPlayer; + constructor(); + destroy(): void; + finish(): void; + getPosition(): number; + hasStarted(): boolean; + init(): void; + onDone(fn: () => void): void; + onStart(fn: () => void): void; + pause(): void; + play(): void; + reset(): void; + restart(): void; + setPosition(p: number): void; +} + /** @stable */ export declare abstract class OnChanges { abstract ngOnChanges(changes: SimpleChanges): void;