UNPKG

7.03 kBTypeScriptView Raw
1/**
2 * @license Angular v13.0.3
3 * (c) 2010-2021 Google LLC. https://angular.io/
4 * License: MIT
5 */
6
7import { AnimationBuilder } from '@angular/animations';
8import { AnimationDriver } from '@angular/animations/browser';
9import { AnimationFactory } from '@angular/animations';
10import { AnimationMetadata } from '@angular/animations';
11import { AnimationOptions } from '@angular/animations';
12import { AnimationPlayer } from '@angular/animations';
13import * as i0 from '@angular/core';
14import * as i1 from '@angular/platform-browser';
15import { InjectionToken } from '@angular/core';
16import { ModuleWithProviders } from '@angular/core';
17import { NgZone } from '@angular/core';
18import { OnDestroy } from '@angular/core';
19import { Renderer2 } from '@angular/core';
20import { RendererFactory2 } from '@angular/core';
21import { RendererStyleFlags2 } from '@angular/core';
22import { RendererType2 } from '@angular/core';
23import { ɵAnimationEngine } from '@angular/animations/browser';
24import { ɵAnimationStyleNormalizer } from '@angular/animations/browser';
25
26/**
27 * @publicApi
28 */
29export declare const ANIMATION_MODULE_TYPE: InjectionToken<"NoopAnimations" | "BrowserAnimations">;
30
31declare class BaseAnimationRenderer implements Renderer2 {
32 protected namespaceId: string;
33 delegate: Renderer2;
34 engine: ɵAnimationEngine;
35 constructor(namespaceId: string, delegate: Renderer2, engine: ɵAnimationEngine);
36 get data(): {
37 [key: string]: any;
38 };
39 destroyNode: ((n: any) => void) | null;
40 destroy(): void;
41 createElement(name: string, namespace?: string | null | undefined): any;
42 createComment(value: string): any;
43 createText(value: string): any;
44 appendChild(parent: any, newChild: any): void;
45 insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void;
46 removeChild(parent: any, oldChild: any, isHostElement: boolean): void;
47 selectRootElement(selectorOrNode: any, preserveContent?: boolean): any;
48 parentNode(node: any): any;
49 nextSibling(node: any): any;
50 setAttribute(el: any, name: string, value: string, namespace?: string | null | undefined): void;
51 removeAttribute(el: any, name: string, namespace?: string | null | undefined): void;
52 addClass(el: any, name: string): void;
53 removeClass(el: any, name: string): void;
54 setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2 | undefined): void;
55 removeStyle(el: any, style: string, flags?: RendererStyleFlags2 | undefined): void;
56 setProperty(el: any, name: string, value: any): void;
57 setValue(node: any, value: string): void;
58 listen(target: any, eventName: string, callback: (event: any) => boolean | void): () => void;
59 protected disableAnimations(element: any, value: boolean): void;
60}
61
62/**
63 * Exports `BrowserModule` with additional [dependency-injection providers](guide/glossary#provider)
64 * for use with animations. See [Animations](guide/animations).
65 * @publicApi
66 */
67export declare class BrowserAnimationsModule {
68 /**
69 * Configures the module based on the specified object.
70 *
71 * @param config Object used to configure the behavior of the `BrowserAnimationsModule`.
72 * @see `BrowserAnimationsModuleConfig`
73 *
74 * @usageNotes
75 * When registering the `BrowserAnimationsModule`, you can use the `withConfig`
76 * function as follows:
77 * ```
78 * @NgModule({
79 * imports: [BrowserAnimationsModule.withConfig(config)]
80 * })
81 * class MyNgModule {}
82 * ```
83 */
84 static withConfig(config: BrowserAnimationsModuleConfig): ModuleWithProviders<BrowserAnimationsModule>;
85 static ɵfac: i0.ɵɵFactoryDeclaration<BrowserAnimationsModule, never>;
86 static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserAnimationsModule, never, never, [typeof i1.BrowserModule]>;
87 static ɵinj: i0.ɵɵInjectorDeclaration<BrowserAnimationsModule>;
88}
89
90/**
91 * Object used to configure the behavior of {@link BrowserAnimationsModule}
92 * @publicApi
93 */
94export declare interface BrowserAnimationsModuleConfig {
95 /**
96 * Whether animations should be disabled. Passing this is identical to providing the
97 * `NoopAnimationsModule`, but it can be controlled based on a runtime value.
98 */
99 disableAnimations?: boolean;
100}
101
102/**
103 * A null player that must be imported to allow disabling of animations.
104 * @publicApi
105 */
106export declare class NoopAnimationsModule {
107 static ɵfac: i0.ɵɵFactoryDeclaration<NoopAnimationsModule, never>;
108 static ɵmod: i0.ɵɵNgModuleDeclaration<NoopAnimationsModule, never, never, [typeof i1.BrowserModule]>;
109 static ɵinj: i0.ɵɵInjectorDeclaration<NoopAnimationsModule>;
110}
111
112export declare class ɵAnimationRenderer extends BaseAnimationRenderer implements Renderer2 {
113 factory: ɵAnimationRendererFactory;
114 constructor(factory: ɵAnimationRendererFactory, namespaceId: string, delegate: Renderer2, engine: ɵAnimationEngine);
115 setProperty(el: any, name: string, value: any): void;
116 listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => any): () => void;
117}
118
119export declare class ɵAnimationRendererFactory implements RendererFactory2 {
120 private delegate;
121 private engine;
122 private _zone;
123 private _currentId;
124 private _microtaskId;
125 private _animationCallbacksBuffer;
126 private _rendererCache;
127 private _cdRecurDepth;
128 private promise;
129 constructor(delegate: RendererFactory2, engine: ɵAnimationEngine, _zone: NgZone);
130 createRenderer(hostElement: any, type: RendererType2): Renderer2;
131 begin(): void;
132 private _scheduleCountTask;
133 end(): void;
134 whenRenderingDone(): Promise<any>;
135 static ɵfac: i0.ɵɵFactoryDeclaration<ɵAnimationRendererFactory, never>;
136 static ɵprov: i0.ɵɵInjectableDeclaration<ɵAnimationRendererFactory>;
137}
138
139export declare class ɵBrowserAnimationBuilder extends AnimationBuilder {
140 private _nextAnimationId;
141 private _renderer;
142 constructor(rootRenderer: RendererFactory2, doc: any);
143 build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory;
144 static ɵfac: i0.ɵɵFactoryDeclaration<ɵBrowserAnimationBuilder, never>;
145 static ɵprov: i0.ɵɵInjectableDeclaration<ɵBrowserAnimationBuilder>;
146}
147
148export declare class ɵBrowserAnimationFactory extends AnimationFactory {
149 private _id;
150 private _renderer;
151 constructor(_id: string, _renderer: ɵAnimationRenderer);
152 create(element: any, options?: AnimationOptions): AnimationPlayer;
153}
154
155export declare class ɵInjectableAnimationEngine extends ɵAnimationEngine implements OnDestroy {
156 constructor(doc: any, driver: AnimationDriver, normalizer: ɵAnimationStyleNormalizer);
157 ngOnDestroy(): void;
158 static ɵfac: i0.ɵɵFactoryDeclaration<ɵInjectableAnimationEngine, never>;
159 static ɵprov: i0.ɵɵInjectableDeclaration<ɵInjectableAnimationEngine>;
160}
161
162export { }