legacy-progress-spinner.mjs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. import { coerceNumberProperty } from '@angular/cdk/coercion';
  2. import * as i1 from '@angular/cdk/platform';
  3. import { _getShadowRoot } from '@angular/cdk/platform';
  4. import * as i2 from '@angular/cdk/scrolling';
  5. import * as i3 from '@angular/common';
  6. import { DOCUMENT, CommonModule } from '@angular/common';
  7. import * as i0 from '@angular/core';
  8. import { CSP_NONCE, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Inject, Input, NgModule } from '@angular/core';
  9. import { mixinColor, MatCommonModule } from '@angular/material/core';
  10. import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
  11. import { MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS } from '@angular/material/progress-spinner';
  12. export { MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS as MAT_LEGACY_PROGRESS_SPINNER_DEFAULT_OPTIONS, MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY as MAT_LEGACY_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY } from '@angular/material/progress-spinner';
  13. import { Subscription } from 'rxjs';
  14. /**
  15. * Base reference size of the spinner.
  16. * @docs-private
  17. */
  18. const BASE_SIZE = 100;
  19. /**
  20. * Base reference stroke width of the spinner.
  21. * @docs-private
  22. */
  23. const BASE_STROKE_WIDTH = 10;
  24. // Boilerplate for applying mixins to MatLegacyProgressSpinner.
  25. /** @docs-private */
  26. const _MatProgressSpinnerBase = mixinColor(class {
  27. constructor(_elementRef) {
  28. this._elementRef = _elementRef;
  29. }
  30. }, 'primary');
  31. // .0001 percentage difference is necessary in order to avoid unwanted animation frames
  32. // for example because the animation duration is 4 seconds, .1% accounts to 4ms
  33. // which are enough to see the flicker described in
  34. // https://github.com/angular/components/issues/8984
  35. const INDETERMINATE_ANIMATION_TEMPLATE = `
  36. @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {
  37. 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }
  38. 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }
  39. 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }
  40. 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }
  41. 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }
  42. 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }
  43. 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }
  44. 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }
  45. 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }
  46. 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }
  47. 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }
  48. 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }
  49. 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }
  50. 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }
  51. 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }
  52. 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }
  53. }
  54. `;
  55. /**
  56. * `<mat-progress-spinner>` component.
  57. * @deprecated Use `MatProgressSpinner` from `@angular/material/progress-spinner` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
  58. * @breaking-change 17.0.0
  59. */
  60. class MatLegacyProgressSpinner extends _MatProgressSpinnerBase {
  61. /**
  62. * Tracks diameters of existing instances to de-dupe generated styles (default d = 100).
  63. * We need to keep track of which elements the diameters were attached to, because for
  64. * elements in the Shadow DOM the style tags are attached to the shadow root, rather
  65. * than the document head.
  66. */
  67. static { this._diameters = new WeakMap(); }
  68. /** The diameter of the progress spinner (will set width and height of svg). */
  69. get diameter() {
  70. return this._diameter;
  71. }
  72. set diameter(size) {
  73. this._diameter = coerceNumberProperty(size);
  74. this._spinnerAnimationLabel = this._getSpinnerAnimationLabel();
  75. // If this is set before `ngOnInit`, the style root may not have been resolved yet.
  76. if (this._styleRoot) {
  77. this._attachStyleNode();
  78. }
  79. }
  80. /** Stroke width of the progress spinner. */
  81. get strokeWidth() {
  82. return this._strokeWidth || this.diameter / 10;
  83. }
  84. set strokeWidth(value) {
  85. this._strokeWidth = coerceNumberProperty(value);
  86. }
  87. /** Value of the progress circle. */
  88. get value() {
  89. return this.mode === 'determinate' ? this._value : 0;
  90. }
  91. set value(newValue) {
  92. this._value = Math.max(0, Math.min(100, coerceNumberProperty(newValue)));
  93. }
  94. constructor(elementRef, _platform, _document, animationMode, defaults,
  95. /**
  96. * @deprecated `changeDetectorRef`, `viewportRuler` and `ngZone`
  97. * parameters to become required.
  98. * @breaking-change 14.0.0
  99. */
  100. changeDetectorRef, viewportRuler, ngZone, _nonce) {
  101. super(elementRef);
  102. this._document = _document;
  103. this._nonce = _nonce;
  104. this._diameter = BASE_SIZE;
  105. this._value = 0;
  106. this._resizeSubscription = Subscription.EMPTY;
  107. /** Mode of the progress circle */
  108. this.mode = 'determinate';
  109. const trackedDiameters = MatLegacyProgressSpinner._diameters;
  110. this._spinnerAnimationLabel = this._getSpinnerAnimationLabel();
  111. // The base size is already inserted via the component's structural styles. We still
  112. // need to track it so we don't end up adding the same styles again.
  113. if (!trackedDiameters.has(_document.head)) {
  114. trackedDiameters.set(_document.head, new Set([BASE_SIZE]));
  115. }
  116. this._noopAnimations =
  117. animationMode === 'NoopAnimations' && !!defaults && !defaults._forceAnimations;
  118. if (elementRef.nativeElement.nodeName.toLowerCase() === 'mat-spinner') {
  119. this.mode = 'indeterminate';
  120. }
  121. if (defaults) {
  122. if (defaults.color) {
  123. this.color = this.defaultColor = defaults.color;
  124. }
  125. if (defaults.diameter) {
  126. this.diameter = defaults.diameter;
  127. }
  128. if (defaults.strokeWidth) {
  129. this.strokeWidth = defaults.strokeWidth;
  130. }
  131. }
  132. // Safari has an issue where the circle isn't positioned correctly when the page has a
  133. // different zoom level from the default. This handler triggers a recalculation of the
  134. // `transform-origin` when the page zoom level changes.
  135. // See `_getCircleTransformOrigin` for more info.
  136. // @breaking-change 14.0.0 Remove null checks for `_changeDetectorRef`,
  137. // `viewportRuler` and `ngZone`.
  138. if (_platform.isBrowser && _platform.SAFARI && viewportRuler && changeDetectorRef && ngZone) {
  139. this._resizeSubscription = viewportRuler.change(150).subscribe(() => {
  140. // When the window is resize while the spinner is in `indeterminate` mode, we
  141. // have to mark for check so the transform origin of the circle can be recomputed.
  142. if (this.mode === 'indeterminate') {
  143. ngZone.run(() => changeDetectorRef.markForCheck());
  144. }
  145. });
  146. }
  147. }
  148. ngOnInit() {
  149. const element = this._elementRef.nativeElement;
  150. // Note that we need to look up the root node in ngOnInit, rather than the constructor, because
  151. // Angular seems to create the element outside the shadow root and then moves it inside, if the
  152. // node is inside an `ngIf` and a ShadowDom-encapsulated component.
  153. this._styleRoot = _getShadowRoot(element) || this._document.head;
  154. this._attachStyleNode();
  155. element.classList.add('mat-progress-spinner-indeterminate-animation');
  156. }
  157. ngOnDestroy() {
  158. this._resizeSubscription.unsubscribe();
  159. }
  160. /** The radius of the spinner, adjusted for stroke width. */
  161. _getCircleRadius() {
  162. return (this.diameter - BASE_STROKE_WIDTH) / 2;
  163. }
  164. /** The view box of the spinner's svg element. */
  165. _getViewBox() {
  166. const viewBox = this._getCircleRadius() * 2 + this.strokeWidth;
  167. return `0 0 ${viewBox} ${viewBox}`;
  168. }
  169. /** The stroke circumference of the svg circle. */
  170. _getStrokeCircumference() {
  171. return 2 * Math.PI * this._getCircleRadius();
  172. }
  173. /** The dash offset of the svg circle. */
  174. _getStrokeDashOffset() {
  175. if (this.mode === 'determinate') {
  176. return (this._getStrokeCircumference() * (100 - this._value)) / 100;
  177. }
  178. return null;
  179. }
  180. /** Stroke width of the circle in percent. */
  181. _getCircleStrokeWidth() {
  182. return (this.strokeWidth / this.diameter) * 100;
  183. }
  184. /** Gets the `transform-origin` for the inner circle element. */
  185. _getCircleTransformOrigin(svg) {
  186. // Safari has an issue where the `transform-origin` doesn't work as expected when the page
  187. // has a different zoom level from the default. The problem appears to be that a zoom
  188. // is applied on the `svg` node itself. We can work around it by calculating the origin
  189. // based on the zoom level. On all other browsers the `currentScale` appears to always be 1.
  190. const scale = (svg.currentScale ?? 1) * 50;
  191. return `${scale}% ${scale}%`;
  192. }
  193. /** Dynamically generates a style tag containing the correct animation for this diameter. */
  194. _attachStyleNode() {
  195. const styleRoot = this._styleRoot;
  196. const currentDiameter = this._diameter;
  197. const diameters = MatLegacyProgressSpinner._diameters;
  198. let diametersForElement = diameters.get(styleRoot);
  199. if (!diametersForElement || !diametersForElement.has(currentDiameter)) {
  200. const styleTag = this._document.createElement('style');
  201. if (this._nonce) {
  202. styleTag.nonce = this._nonce;
  203. }
  204. styleTag.setAttribute('mat-spinner-animation', this._spinnerAnimationLabel);
  205. styleTag.textContent = this._getAnimationText();
  206. styleRoot.appendChild(styleTag);
  207. if (!diametersForElement) {
  208. diametersForElement = new Set();
  209. diameters.set(styleRoot, diametersForElement);
  210. }
  211. diametersForElement.add(currentDiameter);
  212. }
  213. }
  214. /** Generates animation styles adjusted for the spinner's diameter. */
  215. _getAnimationText() {
  216. const strokeCircumference = this._getStrokeCircumference();
  217. return (INDETERMINATE_ANIMATION_TEMPLATE
  218. // Animation should begin at 5% and end at 80%
  219. .replace(/START_VALUE/g, `${0.95 * strokeCircumference}`)
  220. .replace(/END_VALUE/g, `${0.2 * strokeCircumference}`)
  221. .replace(/DIAMETER/g, `${this._spinnerAnimationLabel}`));
  222. }
  223. /** Returns the circle diameter formatted for use with the animation-name CSS property. */
  224. _getSpinnerAnimationLabel() {
  225. // The string of a float point number will include a period ‘.’ character,
  226. // which is not valid for a CSS animation-name.
  227. return this.diameter.toString().replace('.', '_');
  228. }
  229. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatLegacyProgressSpinner, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: DOCUMENT, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS }, { token: i0.ChangeDetectorRef }, { token: i2.ViewportRuler }, { token: i0.NgZone }, { token: CSP_NONCE, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
  230. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: MatLegacyProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: { color: "color", diameter: "diameter", strokeWidth: "strokeWidth", mode: "mode", value: "value" }, host: { attributes: { "role": "progressbar", "tabindex": "-1" }, properties: { "class._mat-animation-noopable": "_noopAnimations", "style.width.px": "diameter", "style.height.px": "diameter", "attr.aria-valuemin": "mode === \"determinate\" ? 0 : null", "attr.aria-valuemax": "mode === \"determinate\" ? 100 : null", "attr.aria-valuenow": "mode === \"determinate\" ? value : null", "attr.mode": "mode" }, classAttribute: "mat-progress-spinner mat-spinner" }, exportAs: ["matProgressSpinner"], usesInheritance: true, ngImport: i0, template: "<!--\n preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's\n center. The center of the circle will remain at the center of the mat-progress-spinner\n element containing the SVG.\n-->\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<svg\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n [attr.viewBox]=\"_getViewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n focusable=\"false\"\n [ngSwitch]=\"mode === 'indeterminate'\"\n aria-hidden=\"true\"\n #svg>\n\n <!--\n Technically we can reuse the same `circle` element, however Safari has an issue that breaks\n the SVG rendering in determinate mode, after switching between indeterminate and determinate.\n Using a different element avoids the issue. An alternative to this is adding `display: none`\n for a split second and then removing it when switching between modes, but it's hard to know\n for how long to hide the element and it can cause the UI to blink.\n -->\n <circle\n *ngSwitchCase=\"true\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + _spinnerAnimationLabel\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n\n <circle\n *ngSwitchCase=\"false\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n</svg>\n", styles: [".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:rgba(0,0,0,0);transition:stroke-dashoffset 225ms linear}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:CanvasText}.mat-progress-spinner[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}.mat-progress-spinner[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}.mat-progress-spinner._mat-animation-noopable svg,.mat-progress-spinner._mat-animation-noopable circle{animation:none;transition:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}"], dependencies: [{ kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
  231. }
  232. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatLegacyProgressSpinner, decorators: [{
  233. type: Component,
  234. args: [{ selector: 'mat-progress-spinner, mat-spinner', exportAs: 'matProgressSpinner', host: {
  235. 'role': 'progressbar',
  236. // `mat-spinner` is here for backward compatibility.
  237. 'class': 'mat-progress-spinner mat-spinner',
  238. // set tab index to -1 so screen readers will read the aria-label
  239. // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox
  240. 'tabindex': '-1',
  241. '[class._mat-animation-noopable]': `_noopAnimations`,
  242. '[style.width.px]': 'diameter',
  243. '[style.height.px]': 'diameter',
  244. '[attr.aria-valuemin]': 'mode === "determinate" ? 0 : null',
  245. '[attr.aria-valuemax]': 'mode === "determinate" ? 100 : null',
  246. '[attr.aria-valuenow]': 'mode === "determinate" ? value : null',
  247. '[attr.mode]': 'mode',
  248. }, inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!--\n preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's\n center. The center of the circle will remain at the center of the mat-progress-spinner\n element containing the SVG.\n-->\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<svg\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n [attr.viewBox]=\"_getViewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n focusable=\"false\"\n [ngSwitch]=\"mode === 'indeterminate'\"\n aria-hidden=\"true\"\n #svg>\n\n <!--\n Technically we can reuse the same `circle` element, however Safari has an issue that breaks\n the SVG rendering in determinate mode, after switching between indeterminate and determinate.\n Using a different element avoids the issue. An alternative to this is adding `display: none`\n for a split second and then removing it when switching between modes, but it's hard to know\n for how long to hide the element and it can cause the UI to blink.\n -->\n <circle\n *ngSwitchCase=\"true\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + _spinnerAnimationLabel\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n\n <circle\n *ngSwitchCase=\"false\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n</svg>\n", styles: [".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:rgba(0,0,0,0);transition:stroke-dashoffset 225ms linear}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:CanvasText}.mat-progress-spinner[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}.mat-progress-spinner[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}.mat-progress-spinner._mat-animation-noopable svg,.mat-progress-spinner._mat-animation-noopable circle{animation:none;transition:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}"] }]
  249. }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Platform }, { type: undefined, decorators: [{
  250. type: Optional
  251. }, {
  252. type: Inject,
  253. args: [DOCUMENT]
  254. }] }, { type: undefined, decorators: [{
  255. type: Optional
  256. }, {
  257. type: Inject,
  258. args: [ANIMATION_MODULE_TYPE]
  259. }] }, { type: undefined, decorators: [{
  260. type: Inject,
  261. args: [MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS]
  262. }] }, { type: i0.ChangeDetectorRef }, { type: i2.ViewportRuler }, { type: i0.NgZone }, { type: undefined, decorators: [{
  263. type: Inject,
  264. args: [CSP_NONCE]
  265. }, {
  266. type: Optional
  267. }] }]; }, propDecorators: { diameter: [{
  268. type: Input
  269. }], strokeWidth: [{
  270. type: Input
  271. }], mode: [{
  272. type: Input
  273. }], value: [{
  274. type: Input
  275. }] } });
  276. /**
  277. * @deprecated Use `MatProgressSpinnerModule` from `@angular/material/progress-spinner` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
  278. * @breaking-change 17.0.0
  279. */
  280. class MatLegacyProgressSpinnerModule {
  281. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatLegacyProgressSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
  282. static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: MatLegacyProgressSpinnerModule, declarations: [MatLegacyProgressSpinner], imports: [MatCommonModule, CommonModule], exports: [MatLegacyProgressSpinner, MatCommonModule] }); }
  283. static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatLegacyProgressSpinnerModule, imports: [MatCommonModule, CommonModule, MatCommonModule] }); }
  284. }
  285. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatLegacyProgressSpinnerModule, decorators: [{
  286. type: NgModule,
  287. args: [{
  288. imports: [MatCommonModule, CommonModule],
  289. exports: [MatLegacyProgressSpinner, MatCommonModule],
  290. declarations: [MatLegacyProgressSpinner],
  291. }]
  292. }] });
  293. /**
  294. * @deprecated Import Progress Spinner instead. Note that the
  295. * `mat-spinner` selector isn't deprecated.
  296. * @breaking-change 8.0.0
  297. */
  298. // tslint:disable-next-line:variable-name
  299. const MatLegacySpinner = MatLegacyProgressSpinner;
  300. /**
  301. * Generated bundle index. Do not edit.
  302. */
  303. export { MatLegacyProgressSpinner, MatLegacyProgressSpinnerModule, MatLegacySpinner };
  304. //# sourceMappingURL=legacy-progress-spinner.mjs.map