Revert "perf(animations): reduce size of bundle by removing AST classes (#19539)"

This reverts commit d5c9c5f183.
This commit is contained in:
Chuck Jazdzewski
2017-10-06 18:16:30 -07:00
parent 9fecd72f44
commit b1ca5d4ddf
8 changed files with 239 additions and 254 deletions

View File

@ -5,7 +5,7 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {AnimationMetadataType, ɵStyleData} from '@angular/animations';
import {ɵStyleData} from '@angular/animations';
import {copyStyles, interpolateParams} from '../util';
@ -13,7 +13,6 @@ import {SequenceAst, StyleAst, TransitionAst, TriggerAst} from './animation_ast'
import {AnimationStateStyles, AnimationTransitionFactory} from './animation_transition_factory';
/**
* @experimental Animation support is experimental.
*/
@ -61,15 +60,8 @@ function createFallbackTransition(
triggerName: string,
states: {[stateName: string]: AnimationStateStyles}): AnimationTransitionFactory {
const matchers = [(fromState: any, toState: any) => true];
const animation: SequenceAst = {type: AnimationMetadataType.Sequence, steps: [], options: null};
const transition: TransitionAst = {
type: AnimationMetadataType.Transition,
animation,
matchers,
options: null,
queryCount: 0,
depCount: 0
};
const animation = new SequenceAst([]);
const transition = new TransitionAst(matchers, animation);
return new AnimationTransitionFactory(triggerName, transition, states);
}