index.d.ts 8.2 KB

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