index.d.ts 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. import * as i0 from '@angular/core';
  2. import { InjectionToken, AfterViewInit, OnDestroy, ElementRef, EventEmitter } from '@angular/core';
  3. import { T as ThemePalette } from '../palette.d-BSSFKjO6.js';
  4. import { M as MatCommonModule } from '../common-module.d-C8xzHJDr.js';
  5. import '@angular/cdk/bidi';
  6. /** Last animation end data. */
  7. interface ProgressAnimationEnd {
  8. value: number;
  9. }
  10. /** Default `mat-progress-bar` options that can be overridden. */
  11. interface MatProgressBarDefaultOptions {
  12. /**
  13. * Default theme color of the progress bar. This API is supported in M2 themes only,
  14. * it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-bar/styling.
  15. *
  16. * For information on applying color variants in M3, see
  17. * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
  18. */
  19. color?: ThemePalette;
  20. /** Default mode of the progress bar. */
  21. mode?: ProgressBarMode;
  22. }
  23. /** Injection token to be used to override the default options for `mat-progress-bar`. */
  24. declare const MAT_PROGRESS_BAR_DEFAULT_OPTIONS: InjectionToken<MatProgressBarDefaultOptions>;
  25. /**
  26. * Injection token used to provide the current location to `MatProgressBar`.
  27. * Used to handle server-side rendering and to stub out during unit tests.
  28. * @docs-private
  29. */
  30. declare const MAT_PROGRESS_BAR_LOCATION: InjectionToken<MatProgressBarLocation>;
  31. /**
  32. * Stubbed out location for `MatProgressBar`.
  33. * @docs-private
  34. */
  35. interface MatProgressBarLocation {
  36. getPathname: () => string;
  37. }
  38. /**
  39. * @docs-private
  40. * @deprecated No longer used, will be removed.
  41. * @breaking-change 21.0.0
  42. */
  43. declare function MAT_PROGRESS_BAR_LOCATION_FACTORY(): MatProgressBarLocation;
  44. type ProgressBarMode = 'determinate' | 'indeterminate' | 'buffer' | 'query';
  45. declare class MatProgressBar implements AfterViewInit, OnDestroy {
  46. readonly _elementRef: ElementRef<HTMLElement>;
  47. private _ngZone;
  48. private _changeDetectorRef;
  49. private _renderer;
  50. private _cleanupTransitionEnd;
  51. _animationMode?: "NoopAnimations" | "BrowserAnimations" | null | undefined;
  52. constructor(...args: unknown[]);
  53. /** Flag that indicates whether NoopAnimations mode is set to true. */
  54. _isNoopAnimation: boolean;
  55. /**
  56. * Theme color of the progress bar. This API is supported in M2 themes only, it
  57. * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-bar/styling.
  58. *
  59. * For information on applying color variants in M3, see
  60. * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
  61. */
  62. get color(): string | null | undefined;
  63. set color(value: string | null | undefined);
  64. private _color;
  65. private _defaultColor;
  66. /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */
  67. get value(): number;
  68. set value(v: number);
  69. private _value;
  70. /** Buffer value of the progress bar. Defaults to zero. */
  71. get bufferValue(): number;
  72. set bufferValue(v: number);
  73. private _bufferValue;
  74. /**
  75. * Event emitted when animation of the primary progress bar completes. This event will not
  76. * be emitted when animations are disabled, nor will it be emitted for modes with continuous
  77. * animations (indeterminate and query).
  78. */
  79. readonly animationEnd: EventEmitter<ProgressAnimationEnd>;
  80. /**
  81. * Mode of the progress bar.
  82. *
  83. * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to
  84. * 'determinate'.
  85. * Mirrored to mode attribute.
  86. */
  87. get mode(): ProgressBarMode;
  88. set mode(value: ProgressBarMode);
  89. private _mode;
  90. ngAfterViewInit(): void;
  91. ngOnDestroy(): void;
  92. /** Gets the transform style that should be applied to the primary bar. */
  93. _getPrimaryBarTransform(): string;
  94. /** Gets the `flex-basis` value that should be applied to the buffer bar. */
  95. _getBufferBarFlexBasis(): string;
  96. /** Returns whether the progress bar is indeterminate. */
  97. _isIndeterminate(): boolean;
  98. /** Event handler for `transitionend` events. */
  99. private _transitionendHandler;
  100. static ɵfac: i0.ɵɵFactoryDeclaration<MatProgressBar, never>;
  101. 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, true, never>;
  102. static ngAcceptInputType_value: unknown;
  103. static ngAcceptInputType_bufferValue: unknown;
  104. }
  105. declare class MatProgressBarModule {
  106. static ɵfac: i0.ɵɵFactoryDeclaration<MatProgressBarModule, never>;
  107. static ɵmod: i0.ɵɵNgModuleDeclaration<MatProgressBarModule, never, [typeof MatProgressBar], [typeof MatProgressBar, typeof MatCommonModule]>;
  108. static ɵinj: i0.ɵɵInjectorDeclaration<MatProgressBarModule>;
  109. }
  110. export { MAT_PROGRESS_BAR_DEFAULT_OPTIONS, MAT_PROGRESS_BAR_LOCATION, MAT_PROGRESS_BAR_LOCATION_FACTORY, MatProgressBar, MatProgressBarModule };
  111. export type { MatProgressBarDefaultOptions, MatProgressBarLocation, ProgressAnimationEnd, ProgressBarMode };