1 line
12 KiB
Text
1 line
12 KiB
Text
|
{"version":3,"file":"animations.mjs","sources":["../../../../../../packages/platform-browser/animations/src/providers.ts","../../../../../../packages/platform-browser/animations/src/module.ts","../../../../../../packages/platform-browser/animations/src/animations.ts","../../../../../../packages/platform-browser/animations/public_api.ts","../../../../../../packages/platform-browser/animations/index.ts","../../../../../../packages/platform-browser/animations/animations.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC 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 {AnimationDriver, NoopAnimationDriver, ɵAnimationEngine as AnimationEngine, ɵAnimationRendererFactory as AnimationRendererFactory, ɵAnimationStyleNormalizer as AnimationStyleNormalizer, ɵWebAnimationsDriver as WebAnimationsDriver, ɵWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer} from '@angular/animations/browser';\nimport {DOCUMENT} from '@angular/common';\nimport {ANIMATION_MODULE_TYPE, inject, Inject, Injectable, NgZone, OnDestroy, Provider, RendererFactory2, ɵChangeDetectionScheduler as ChangeDetectionScheduler} from '@angular/core';\nimport {ɵDomRendererFactory2 as DomRendererFactory2} from '@angular/platform-browser';\n\n@Injectable()\nexport class InjectableAnimationEngine extends AnimationEngine implements OnDestroy {\n // The `ApplicationRef` is injected here explicitly to force the dependency ordering.\n // Since the `ApplicationRef` should be created earlier before the `AnimationEngine`, they\n // both have `ngOnDestroy` hooks and `flush()` must be called after all views are destroyed.\n constructor(\n @Inject(DOCUMENT) doc: Document, driver: AnimationDriver,\n normalizer: AnimationStyleNormalizer) {\n super(doc, driver, normalizer, inject(ChangeDetectionScheduler, {optional: true}));\n }\n\n ngOnDestroy(): void {\n this.flush();\n }\n}\n\nexport function instantiateDefaultStyleNormalizer() {\n return new WebAnimationsStyleNormalizer();\n}\n\nexport function instantiateRendererFactory(\n renderer: DomRendererFactory2, engine: AnimationEngine, zone: NgZone) {\n return new AnimationRendererFactory(renderer, engine, zone);\n}\n\nconst SHARED_ANIMATION_PROVIDERS: Provider[] = [\n {provide: AnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer},\n {provide: AnimationEngine, useClass: InjectableAnimationEngine}, {\n provide: RendererFactory2,\n useFactory: instantiateRendererFactory,\n deps: [DomRendererFactory2, AnimationEngine, NgZone]\n }\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nexport const BROWSER_ANIMATIONS_PROVIDERS: Provider[] = [\n {provide: AnimationDriver, useFactory: () => new WebAnimationsDriver()},\n {provide: ANIMATION_MODULE_TYPE, useValue: 'BrowserAnimations'}, ...SHARED_ANIMATION_PROVIDERS\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserTestingModule.\n */\nexport const BROWSER_NOOP_ANIMATIONS_PROVIDERS: Provider[] = [\n {provide: AnimationDriver, useClass: NoopAnimationDriver},\n {provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations'}, ...SHARED_ANIMATION_PROVIDERS\n];\n","/**\n * @license\n * Copyright Google LLC 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 */\nimport {ModuleWithProviders, NgModule, Provider} from '@angular/core';\nimport {BrowserModule} from '@angular/platform-browser';\n\nimport {BROWSER_ANIMATIONS_PROVIDERS, BROWSER_NOOP_ANIMATIONS_PROVIDERS} from './providers';\n\n/**\n * Object used to configure the behavior of {@link BrowserAnimationsModule}\n * @publicApi\n */\nexport interface BrowserAnimationsModuleConfig {\n /**\n * Whether animations should be disabled. Passin
|