refactor(compiler): remove stale metadata classes for animations

These are no longer needed as animations are a purely
runtime concept.
This commit is contained in:
Tobias Bosch
2017-10-04 10:51:34 -07:00
committed by Alex Rickabaugh
parent e107322f5c
commit 3052063c05
4 changed files with 8 additions and 70 deletions

View File

@ -5,7 +5,6 @@
* 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 {CompileAnimationEntryMetadata} from '@angular/compiler';
import {CompileStylesheetMetadata, CompileTemplateMetadata} from '@angular/compiler/src/compile_metadata';
import {CompilerConfig, preserveWhitespacesDefault} from '@angular/compiler/src/config';
import {DirectiveNormalizer} from '@angular/compiler/src/directive_normalizer';
@ -30,7 +29,7 @@ function normalizeTemplate(normalizer: DirectiveNormalizer, o: {
styleUrls?: string[];
interpolation?: [string, string] | null;
encapsulation?: ViewEncapsulation | null;
animations?: CompileAnimationEntryMetadata[];
animations?: any[];
preserveWhitespaces?: boolean | null;
}) {
return normalizer.normalizeTemplate({
@ -55,7 +54,7 @@ function normalizeTemplateOnly(normalizer: DirectiveNormalizer, o: {
styleUrls?: string[];
interpolation?: [string, string] | null;
encapsulation?: ViewEncapsulation | null;
animations?: CompileAnimationEntryMetadata[];
animations?: any[];
preserveWhitespaces?: boolean | null;
}) {
return normalizer.normalizeTemplateOnly({
@ -111,7 +110,7 @@ function normalizeLoadedTemplate(
styleUrls?: string[];
interpolation?: [string, string] | null;
encapsulation?: ViewEncapsulation | null;
animations?: CompileAnimationEntryMetadata[];
animations?: any[];
preserveWhitespaces?: boolean;
},
template: string, templateAbsUrl: string) {

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {CompileQueryMetadata, CompilerConfig, JitReflector, ProxyClass, StaticSymbol, preserveWhitespacesDefault} from '@angular/compiler';
import {CompileAnimationEntryMetadata, CompileDiDependencyMetadata, CompileDirectiveMetadata, CompileDirectiveSummary, CompilePipeMetadata, CompilePipeSummary, CompileProviderMetadata, CompileTemplateMetadata, CompileTokenMetadata, CompileTypeMetadata, tokenReference} from '@angular/compiler/src/compile_metadata';
import {CompileDiDependencyMetadata, CompileDirectiveMetadata, CompileDirectiveSummary, CompilePipeMetadata, CompilePipeSummary, CompileProviderMetadata, CompileTemplateMetadata, CompileTokenMetadata, CompileTypeMetadata, tokenReference} from '@angular/compiler/src/compile_metadata';
import {DomElementSchemaRegistry} from '@angular/compiler/src/schema/dom_element_schema_registry';
import {ElementSchemaRegistry} from '@angular/compiler/src/schema/element_schema_registry';
import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, PropertyBindingType, ProviderAstType, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '@angular/compiler/src/template_parser/template_ast';
@ -132,7 +132,7 @@ export function main() {
});
beforeEach(inject([TemplateParser], (parser: TemplateParser) => {
const someAnimation = new CompileAnimationEntryMetadata('someAnimation', []);
const someAnimation = ['someAnimation'];
const someTemplate = compileTemplateMetadata({animations: [someAnimation]});
const component = compileDirectiveMetadataCreate({
isHost: false,
@ -575,7 +575,7 @@ Binding to attribute 'onEvent' is disallowed for security reasons ("<my-componen
it('should not issue a warning when host attributes contain a valid property-bound animation trigger',
() => {
const animationEntries = [new CompileAnimationEntryMetadata('prop', [])];
const animationEntries = ['prop'];
const dirA = compileDirectiveMetadataCreate({
selector: 'div',
template: compileTemplateMetadata({animations: animationEntries}),