index.d.ts 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. import { _AbstractConstructor } from '@angular/material/core';
  2. import { CanColor } from '@angular/material/core';
  3. import { ChangeDetectorRef } from '@angular/core';
  4. import { _Constructor } from '@angular/material/core';
  5. import { ElementRef } from '@angular/core';
  6. import * as i0 from '@angular/core';
  7. import * as i2 from '@angular/material/core';
  8. import * as i3 from '@angular/common';
  9. import { ProgressSpinnerMode as LegacyProgressSpinnerMode } from '@angular/material/progress-spinner';
  10. import { MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS as MAT_LEGACY_PROGRESS_SPINNER_DEFAULT_OPTIONS } from '@angular/material/progress-spinner';
  11. import { MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY as MAT_LEGACY_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY } from '@angular/material/progress-spinner';
  12. import { MatProgressSpinnerDefaultOptions as MatLegacyProgressSpinnerDefaultOptions } from '@angular/material/progress-spinner';
  13. import { NgZone } from '@angular/core';
  14. import { NumberInput } from '@angular/cdk/coercion';
  15. import { OnDestroy } from '@angular/core';
  16. import { OnInit } from '@angular/core';
  17. import { Platform } from '@angular/cdk/platform';
  18. import { ViewportRuler } from '@angular/cdk/scrolling';
  19. declare namespace i1 {
  20. export {
  21. MatLegacyProgressSpinner
  22. }
  23. }
  24. export { LegacyProgressSpinnerMode }
  25. export { MAT_LEGACY_PROGRESS_SPINNER_DEFAULT_OPTIONS }
  26. export { MAT_LEGACY_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY }
  27. /**
  28. * `<mat-progress-spinner>` component.
  29. * @deprecated Use `MatProgressSpinner` from `@angular/material/progress-spinner` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
  30. * @breaking-change 17.0.0
  31. */
  32. export declare class MatLegacyProgressSpinner extends _MatProgressSpinnerBase implements OnInit, OnDestroy, CanColor {
  33. private _document;
  34. private _nonce?;
  35. private _diameter;
  36. private _value;
  37. private _strokeWidth;
  38. private _resizeSubscription;
  39. /**
  40. * Element to which we should add the generated style tags for the indeterminate animation.
  41. * For most elements this is the document, but for the ones in the Shadow DOM we need to
  42. * use the shadow root.
  43. */
  44. private _styleRoot;
  45. /**
  46. * Tracks diameters of existing instances to de-dupe generated styles (default d = 100).
  47. * We need to keep track of which elements the diameters were attached to, because for
  48. * elements in the Shadow DOM the style tags are attached to the shadow root, rather
  49. * than the document head.
  50. */
  51. private static _diameters;
  52. /** Whether the _mat-animation-noopable class should be applied, disabling animations. */
  53. _noopAnimations: boolean;
  54. /** A string that is used for setting the spinner animation-name CSS property */
  55. _spinnerAnimationLabel: string;
  56. /** The diameter of the progress spinner (will set width and height of svg). */
  57. get diameter(): number;
  58. set diameter(size: NumberInput);
  59. /** Stroke width of the progress spinner. */
  60. get strokeWidth(): number;
  61. set strokeWidth(value: NumberInput);
  62. /** Mode of the progress circle */
  63. mode: LegacyProgressSpinnerMode;
  64. /** Value of the progress circle. */
  65. get value(): number;
  66. set value(newValue: NumberInput);
  67. constructor(elementRef: ElementRef<HTMLElement>, _platform: Platform, _document: any, animationMode: string, defaults?: MatLegacyProgressSpinnerDefaultOptions,
  68. /**
  69. * @deprecated `changeDetectorRef`, `viewportRuler` and `ngZone`
  70. * parameters to become required.
  71. * @breaking-change 14.0.0
  72. */
  73. changeDetectorRef?: ChangeDetectorRef, viewportRuler?: ViewportRuler, ngZone?: NgZone, _nonce?: string | null | undefined);
  74. ngOnInit(): void;
  75. ngOnDestroy(): void;
  76. /** The radius of the spinner, adjusted for stroke width. */
  77. _getCircleRadius(): number;
  78. /** The view box of the spinner's svg element. */
  79. _getViewBox(): string;
  80. /** The stroke circumference of the svg circle. */
  81. _getStrokeCircumference(): number;
  82. /** The dash offset of the svg circle. */
  83. _getStrokeDashOffset(): number | null;
  84. /** Stroke width of the circle in percent. */
  85. _getCircleStrokeWidth(): number;
  86. /** Gets the `transform-origin` for the inner circle element. */
  87. _getCircleTransformOrigin(svg: HTMLElement): string;
  88. /** Dynamically generates a style tag containing the correct animation for this diameter. */
  89. private _attachStyleNode;
  90. /** Generates animation styles adjusted for the spinner's diameter. */
  91. private _getAnimationText;
  92. /** Returns the circle diameter formatted for use with the animation-name CSS property. */
  93. private _getSpinnerAnimationLabel;
  94. static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyProgressSpinner, [null, null, { optional: true; }, { optional: true; }, null, null, null, null, { optional: true; }]>;
  95. static ɵcmp: i0.ɵɵComponentDeclaration<MatLegacyProgressSpinner, "mat-progress-spinner, mat-spinner", ["matProgressSpinner"], { "color": { "alias": "color"; "required": false; }; "diameter": { "alias": "diameter"; "required": false; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, false, never>;
  96. }
  97. export { MatLegacyProgressSpinnerDefaultOptions }
  98. /**
  99. * @deprecated Use `MatProgressSpinnerModule` from `@angular/material/progress-spinner` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
  100. * @breaking-change 17.0.0
  101. */
  102. export declare class MatLegacyProgressSpinnerModule {
  103. static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyProgressSpinnerModule, never>;
  104. static ɵmod: i0.ɵɵNgModuleDeclaration<MatLegacyProgressSpinnerModule, [typeof i1.MatLegacyProgressSpinner], [typeof i2.MatCommonModule, typeof i3.CommonModule], [typeof i1.MatLegacyProgressSpinner, typeof i2.MatCommonModule]>;
  105. static ɵinj: i0.ɵɵInjectorDeclaration<MatLegacyProgressSpinnerModule>;
  106. }
  107. /**
  108. * @deprecated Import Progress Spinner instead. Note that the
  109. * `mat-spinner` selector isn't deprecated.
  110. * @breaking-change 8.0.0
  111. */
  112. export declare const MatLegacySpinner: typeof MatLegacyProgressSpinner;
  113. /** @docs-private */
  114. declare const _MatProgressSpinnerBase: _Constructor<CanColor> & _AbstractConstructor<CanColor> & {
  115. new (_elementRef: ElementRef): {
  116. _elementRef: ElementRef;
  117. };
  118. };
  119. export { }