index.d.ts 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. import { _AbstractConstructor } from '@angular/material/core';
  2. import { CanColor } from '@angular/material/core';
  3. import { _Constructor } from '@angular/material/core';
  4. import { ElementRef } from '@angular/core';
  5. import * as i0 from '@angular/core';
  6. import * as i2 from '@angular/common';
  7. import * as i3 from '@angular/material/core';
  8. import { InjectionToken } from '@angular/core';
  9. import { NumberInput } from '@angular/cdk/coercion';
  10. import { ThemePalette } from '@angular/material/core';
  11. declare namespace i1 {
  12. export {
  13. MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,
  14. ProgressSpinnerMode,
  15. MatProgressSpinnerDefaultOptions,
  16. MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS,
  17. MatProgressSpinner,
  18. MatSpinner
  19. }
  20. }
  21. /** Injection token to be used to override the default options for `mat-progress-spinner`. */
  22. export declare const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS: InjectionToken<MatProgressSpinnerDefaultOptions>;
  23. /** @docs-private */
  24. export declare function MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY(): MatProgressSpinnerDefaultOptions;
  25. export declare class MatProgressSpinner extends _MatProgressSpinnerBase implements CanColor {
  26. /** Whether the _mat-animation-noopable class should be applied, disabling animations. */
  27. _noopAnimations: boolean;
  28. /** The element of the determinate spinner. */
  29. _determinateCircle: ElementRef<HTMLElement>;
  30. constructor(elementRef: ElementRef<HTMLElement>, animationMode: string, defaults?: MatProgressSpinnerDefaultOptions);
  31. /**
  32. * Mode of the progress bar.
  33. *
  34. * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to
  35. * 'determinate'.
  36. * Mirrored to mode attribute.
  37. */
  38. mode: ProgressSpinnerMode;
  39. /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */
  40. get value(): number;
  41. set value(v: NumberInput);
  42. private _value;
  43. /** The diameter of the progress spinner (will set width and height of svg). */
  44. get diameter(): number;
  45. set diameter(size: NumberInput);
  46. private _diameter;
  47. /** Stroke width of the progress spinner. */
  48. get strokeWidth(): number;
  49. set strokeWidth(value: NumberInput);
  50. private _strokeWidth;
  51. /** The radius of the spinner, adjusted for stroke width. */
  52. _circleRadius(): number;
  53. /** The view box of the spinner's svg element. */
  54. _viewBox(): string;
  55. /** The stroke circumference of the svg circle. */
  56. _strokeCircumference(): number;
  57. /** The dash offset of the svg circle. */
  58. _strokeDashOffset(): number | null;
  59. /** Stroke width of the circle in percent. */
  60. _circleStrokeWidth(): number;
  61. static ɵfac: i0.ɵɵFactoryDeclaration<MatProgressSpinner, [null, { optional: true; }, null]>;
  62. static ɵcmp: i0.ɵɵComponentDeclaration<MatProgressSpinner, "mat-progress-spinner, mat-spinner", ["matProgressSpinner"], { "color": { "alias": "color"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "value": { "alias": "value"; "required": false; }; "diameter": { "alias": "diameter"; "required": false; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; }; }, {}, never, never, false, never>;
  63. }
  64. declare const _MatProgressSpinnerBase: _Constructor<CanColor> & _AbstractConstructor<CanColor> & {
  65. new (_elementRef: ElementRef): {
  66. _elementRef: ElementRef;
  67. };
  68. };
  69. /** Default `mat-progress-spinner` options that can be overridden. */
  70. export declare interface MatProgressSpinnerDefaultOptions {
  71. /** Default color of the spinner. */
  72. color?: ThemePalette;
  73. /** Diameter of the spinner. */
  74. diameter?: number;
  75. /** Width of the spinner's stroke. */
  76. strokeWidth?: number;
  77. /**
  78. * Whether the animations should be force to be enabled, ignoring if the current environment is
  79. * using NoopAnimationsModule.
  80. */
  81. _forceAnimations?: boolean;
  82. }
  83. export declare class MatProgressSpinnerModule {
  84. static ɵfac: i0.ɵɵFactoryDeclaration<MatProgressSpinnerModule, never>;
  85. static ɵmod: i0.ɵɵNgModuleDeclaration<MatProgressSpinnerModule, [typeof i1.MatProgressSpinner, typeof i1.MatProgressSpinner], [typeof i2.CommonModule], [typeof i1.MatProgressSpinner, typeof i1.MatProgressSpinner, typeof i3.MatCommonModule]>;
  86. static ɵinj: i0.ɵɵInjectorDeclaration<MatProgressSpinnerModule>;
  87. }
  88. /**
  89. * @deprecated Import Progress Spinner instead. Note that the
  90. * `mat-spinner` selector isn't deprecated.
  91. * @breaking-change 16.0.0
  92. */
  93. export declare const MatSpinner: typeof MatProgressSpinner;
  94. /** Possible mode for a progress spinner. */
  95. export declare type ProgressSpinnerMode = 'determinate' | 'indeterminate';
  96. export { }