bidi-module.d-D-fEBKdS.d.ts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import * as i0 from '@angular/core';
  2. import { OnDestroy, EventEmitter, AfterContentInit } from '@angular/core';
  3. type Direction = 'ltr' | 'rtl';
  4. /**
  5. * The directionality (LTR / RTL) context for the application (or a subtree of it).
  6. * Exposes the current direction and a stream of direction changes.
  7. */
  8. declare class Directionality implements OnDestroy {
  9. /** The current 'ltr' or 'rtl' value. */
  10. readonly value: Direction;
  11. /** Stream that emits whenever the 'ltr' / 'rtl' state changes. */
  12. readonly change: EventEmitter<Direction>;
  13. constructor(...args: unknown[]);
  14. ngOnDestroy(): void;
  15. static ɵfac: i0.ɵɵFactoryDeclaration<Directionality, never>;
  16. static ɵprov: i0.ɵɵInjectableDeclaration<Directionality>;
  17. }
  18. /**
  19. * Directive to listen for changes of direction of part of the DOM.
  20. *
  21. * Provides itself as Directionality such that descendant directives only need to ever inject
  22. * Directionality to get the closest direction.
  23. */
  24. declare class Dir implements Directionality, AfterContentInit, OnDestroy {
  25. /** Normalized direction that accounts for invalid/unsupported values. */
  26. private _dir;
  27. /** Whether the `value` has been set to its initial value. */
  28. private _isInitialized;
  29. /** Direction as passed in by the consumer. */
  30. _rawDir: string;
  31. /** Event emitted when the direction changes. */
  32. readonly change: EventEmitter<Direction>;
  33. /** @docs-private */
  34. get dir(): Direction;
  35. set dir(value: Direction | 'auto');
  36. /** Current layout direction of the element. */
  37. get value(): Direction;
  38. /** Initialize once default value has been set. */
  39. ngAfterContentInit(): void;
  40. ngOnDestroy(): void;
  41. static ɵfac: i0.ɵɵFactoryDeclaration<Dir, never>;
  42. static ɵdir: i0.ɵɵDirectiveDeclaration<Dir, "[dir]", ["dir"], { "dir": { "alias": "dir"; "required": false; }; }, { "change": "dirChange"; }, never, never, true, never>;
  43. }
  44. declare class BidiModule {
  45. static ɵfac: i0.ɵɵFactoryDeclaration<BidiModule, never>;
  46. static ɵmod: i0.ɵɵNgModuleDeclaration<BidiModule, never, [typeof Dir], [typeof Dir]>;
  47. static ɵinj: i0.ɵɵInjectorDeclaration<BidiModule>;
  48. }
  49. export { BidiModule as B, Directionality as D, Dir as b };
  50. export type { Direction as a };