index.d.ts 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. import { _AbstractConstructor } from '@angular/material/core';
  2. import { AfterViewInit } from '@angular/core';
  3. import { CanColor } from '@angular/material/core';
  4. import { ChangeDetectorRef } from '@angular/core';
  5. import { _Constructor } from '@angular/material/core';
  6. import { ElementRef } from '@angular/core';
  7. import { EventEmitter } from '@angular/core';
  8. import * as i0 from '@angular/core';
  9. import * as i2 from '@angular/material/core';
  10. import { InjectionToken } from '@angular/core';
  11. import { NgZone } from '@angular/core';
  12. import { NumberInput } from '@angular/cdk/coercion';
  13. import { OnDestroy } from '@angular/core';
  14. import { ThemePalette } from '@angular/material/core';
  15. declare namespace i1 {
  16. export {
  17. MAT_PROGRESS_BAR_LOCATION_FACTORY,
  18. ProgressAnimationEnd,
  19. MatProgressBarDefaultOptions,
  20. MAT_PROGRESS_BAR_DEFAULT_OPTIONS,
  21. MAT_PROGRESS_BAR_LOCATION,
  22. MatProgressBarLocation,
  23. ProgressBarMode,
  24. MatProgressBar
  25. }
  26. }
  27. /** Injection token to be used to override the default options for `mat-progress-bar`. */
  28. export declare const MAT_PROGRESS_BAR_DEFAULT_OPTIONS: InjectionToken<MatProgressBarDefaultOptions>;
  29. /**
  30. * Injection token used to provide the current location to `MatProgressBar`.
  31. * Used to handle server-side rendering and to stub out during unit tests.
  32. * @docs-private
  33. */
  34. export declare const MAT_PROGRESS_BAR_LOCATION: InjectionToken<MatProgressBarLocation>;
  35. /** @docs-private */
  36. export declare function MAT_PROGRESS_BAR_LOCATION_FACTORY(): MatProgressBarLocation;
  37. export declare class MatProgressBar extends _MatProgressBarBase implements AfterViewInit, OnDestroy, CanColor {
  38. private _ngZone;
  39. private _changeDetectorRef;
  40. _animationMode?: string | undefined;
  41. constructor(elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _changeDetectorRef: ChangeDetectorRef, _animationMode?: string | undefined, defaults?: MatProgressBarDefaultOptions);
  42. /** Flag that indicates whether NoopAnimations mode is set to true. */
  43. _isNoopAnimation: boolean;
  44. /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */
  45. get value(): number;
  46. set value(v: NumberInput);
  47. private _value;
  48. /** Buffer value of the progress bar. Defaults to zero. */
  49. get bufferValue(): number;
  50. set bufferValue(v: NumberInput);
  51. private _bufferValue;
  52. /**
  53. * Event emitted when animation of the primary progress bar completes. This event will not
  54. * be emitted when animations are disabled, nor will it be emitted for modes with continuous
  55. * animations (indeterminate and query).
  56. */
  57. readonly animationEnd: EventEmitter<ProgressAnimationEnd>;
  58. /**
  59. * Mode of the progress bar.
  60. *
  61. * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to
  62. * 'determinate'.
  63. * Mirrored to mode attribute.
  64. */
  65. get mode(): ProgressBarMode;
  66. set mode(value: ProgressBarMode);
  67. private _mode;
  68. ngAfterViewInit(): void;
  69. ngOnDestroy(): void;
  70. /** Gets the transform style that should be applied to the primary bar. */
  71. _getPrimaryBarTransform(): string;
  72. /** Gets the `flex-basis` value that should be applied to the buffer bar. */
  73. _getBufferBarFlexBasis(): string;
  74. /** Returns whether the progress bar is indeterminate. */
  75. _isIndeterminate(): boolean;
  76. /** Event handler for `transitionend` events. */
  77. private _transitionendHandler;
  78. static ɵfac: i0.ɵɵFactoryDeclaration<MatProgressBar, [null, null, null, { optional: true; }, { optional: true; }]>;
  79. static ɵcmp: i0.ɵɵComponentDeclaration<MatProgressBar, "mat-progress-bar", ["matProgressBar"], { "color": { "alias": "color"; "required": false; }; "value": { "alias": "value"; "required": false; }; "bufferValue": { "alias": "bufferValue"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; }, { "animationEnd": "animationEnd"; }, never, never, false, never>;
  80. }
  81. /** @docs-private */
  82. declare const _MatProgressBarBase: _Constructor<CanColor> & _AbstractConstructor<CanColor> & {
  83. new (_elementRef: ElementRef<HTMLElement>): {
  84. _elementRef: ElementRef<HTMLElement>;
  85. };
  86. };
  87. /** Default `mat-progress-bar` options that can be overridden. */
  88. export declare interface MatProgressBarDefaultOptions {
  89. /** Default color of the progress bar. */
  90. color?: ThemePalette;
  91. /** Default mode of the progress bar. */
  92. mode?: ProgressBarMode;
  93. }
  94. /**
  95. * Stubbed out location for `MatProgressBar`.
  96. * @docs-private
  97. */
  98. export declare interface MatProgressBarLocation {
  99. getPathname: () => string;
  100. }
  101. export declare class MatProgressBarModule {
  102. static ɵfac: i0.ɵɵFactoryDeclaration<MatProgressBarModule, never>;
  103. static ɵmod: i0.ɵɵNgModuleDeclaration<MatProgressBarModule, [typeof i1.MatProgressBar], never, [typeof i1.MatProgressBar, typeof i2.MatCommonModule]>;
  104. static ɵinj: i0.ɵɵInjectorDeclaration<MatProgressBarModule>;
  105. }
  106. /** Last animation end data. */
  107. export declare interface ProgressAnimationEnd {
  108. value: number;
  109. }
  110. export declare type ProgressBarMode = 'determinate' | 'indeterminate' | 'buffer' | 'query';
  111. export { }