Skip to content

Commit f5a98f4

Browse files
matskokara
authored andcommitted
fix(core): remove core animation import symbols (#22692)
This patch removes the deprecated support for animation symbol imports from @angular/core. BREAKING CHANGE: it is no longer possible to import animation-related functions from @angular/core. All animation symbols must now be imported from @angular/animations. PR Close #22692
1 parent c09bd67 commit f5a98f4

File tree

9 files changed

+9
-296
lines changed

9 files changed

+9
-296
lines changed

aio/content/examples/router/src/app/animations.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// #docregion
2-
import { animate, AnimationEntryMetadata, state, style, transition, trigger } from '@angular/core';
2+
import { animate, state, style, transition, trigger } from '@angular/animations';
33

44
// Component transition animations
5-
export const slideInDownAnimation: AnimationEntryMetadata =
5+
export const slideInDownAnimation =
66
trigger('routeAnimation', [
77
state('*',
88
style({

modules/playground/src/animate/app/animate-app.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {Component, animate, keyframes, state, style, transition, trigger} from '@angular/core';
9+
import {animate, keyframes, state, style, transition, trigger} from '@angular/animations';
10+
import {Component} from '@angular/core';
1011

1112
@Component({
1213
host: {

modules/playground/src/animate/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88
import {NgModule} from '@angular/core';
9-
import {BrowserModule} from '@angular/platform-browser';
109
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
10+
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
1111

1212
import {AnimateApp} from './app/animate-app';
1313

14-
@NgModule({declarations: [AnimateApp], bootstrap: [AnimateApp], imports: [BrowserModule]})
14+
@NgModule({declarations: [AnimateApp], bootstrap: [AnimateApp], imports: [BrowserAnimationsModule]})
1515
class ExampleModule {
1616
}
1717

modules/playground/src/web_workers/animations/index_common.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {Component, animate, state, style, transition, trigger} from '@angular/core';
9+
import {animate, state, style, transition, trigger} from '@angular/animations';
10+
import {Component} from '@angular/core';
1011

1112
@Component({
1213
selector: 'animation-app',

packages/animations/browser/test/dsl/animation_spec.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
import {AUTO_STYLE, AnimationMetadata, AnimationMetadataType, animate, animation, group, keyframes, query, sequence, state, style, transition, trigger, useAnimation, ɵStyleData} from '@angular/animations';
9-
import {AnimationOptions} from '@angular/core/src/animation/dsl';
8+
import {AUTO_STYLE, AnimationMetadata, AnimationMetadataType, AnimationOptions, animate, animation, group, keyframes, query, sequence, state, style, transition, trigger, useAnimation, ɵStyleData} from '@angular/animations';
109

1110
import {Animation} from '../../src/dsl/animation';
1211
import {buildAnimationAst} from '../../src/dsl/animation_ast_builder';

packages/core/src/animation/animation_metadata_wrapped.ts

-150
This file was deleted.

packages/core/src/animation/dsl.ts

-1
This file was deleted.

packages/core/src/core.ts

-25
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,3 @@ export * from './core_private_export';
3535
export * from './core_render3_private_export';
3636
export {Sanitizer, SecurityContext} from './sanitization/security';
3737
export * from './codegen_private_exports';
38-
export * from './animation/animation_metadata_wrapped';
39-
import {AnimationTriggerMetadata} from './animation/animation_metadata_wrapped';
40-
41-
42-
// For backwards compatibility.
43-
/**
44-
* @deprecated from v4
45-
*/
46-
export type AnimationEntryMetadata = any;
47-
/**
48-
* @deprecated from v4
49-
*/
50-
export type AnimationStateTransitionMetadata = any;
51-
/**
52-
* @deprecated from v4
53-
*/
54-
export type AnimationPlayer = any;
55-
/**
56-
* @deprecated from v4
57-
*/
58-
export type AnimationStyles = any;
59-
/**
60-
* @deprecated from v4
61-
*/
62-
export type AnimationKeyframe = any;

0 commit comments

Comments
 (0)