ripple-loader.d-C3HznB6v.d.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import * as i0 from '@angular/core';
  2. import { OnDestroy } from '@angular/core';
  3. /**
  4. * Handles attaching ripples on demand.
  5. *
  6. * This service allows us to avoid eagerly creating & attaching MatRipples.
  7. * It works by creating & attaching a ripple only when a component is first interacted with.
  8. *
  9. * @docs-private
  10. */
  11. declare class MatRippleLoader implements OnDestroy {
  12. private _document;
  13. private _animationMode;
  14. private _globalRippleOptions;
  15. private _platform;
  16. private _ngZone;
  17. private _injector;
  18. private _eventCleanups;
  19. private _hosts;
  20. constructor();
  21. ngOnDestroy(): void;
  22. /**
  23. * Configures the ripple that will be rendered by the ripple loader.
  24. *
  25. * Stores the given information about how the ripple should be configured on the host
  26. * element so that it can later be retrived & used when the ripple is actually created.
  27. */
  28. configureRipple(host: HTMLElement, config: {
  29. className?: string;
  30. centered?: boolean;
  31. disabled?: boolean;
  32. }): void;
  33. /** Sets the disabled state on the ripple instance corresponding to the given host element. */
  34. setDisabled(host: HTMLElement, disabled: boolean): void;
  35. /**
  36. * Handles creating and attaching component internals
  37. * when a component is initially interacted with.
  38. */
  39. private _onInteraction;
  40. /** Creates a MatRipple and appends it to the given element. */
  41. private _createRipple;
  42. destroyRipple(host: HTMLElement): void;
  43. static ɵfac: i0.ɵɵFactoryDeclaration<MatRippleLoader, never>;
  44. static ɵprov: i0.ɵɵInjectableDeclaration<MatRippleLoader>;
  45. }
  46. export { MatRippleLoader as M };