stepper.mjs 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. import * as i2$1 from '@angular/cdk/portal';
  2. import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
  3. import { CdkStepLabel, CdkStepHeader, CdkStep, STEPPER_GLOBAL_OPTIONS, CdkStepper, CdkStepperNext, CdkStepperPrevious, CdkStepperModule } from '@angular/cdk/stepper';
  4. import * as i3 from '@angular/common';
  5. import { CommonModule } from '@angular/common';
  6. import * as i0 from '@angular/core';
  7. import { Directive, Injectable, Optional, SkipSelf, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, forwardRef, Inject, ContentChild, QueryList, EventEmitter, ViewChildren, ContentChildren, Output, NgModule } from '@angular/core';
  8. import * as i1 from '@angular/material/core';
  9. import { mixinColor, ErrorStateMatcher, MatCommonModule, MatRippleModule } from '@angular/material/core';
  10. import * as i4 from '@angular/material/icon';
  11. import { MatIconModule } from '@angular/material/icon';
  12. import * as i2 from '@angular/cdk/a11y';
  13. import { Subject, Subscription } from 'rxjs';
  14. import * as i3$1 from '@angular/cdk/bidi';
  15. import { switchMap, map, startWith, takeUntil, distinctUntilChanged } from 'rxjs/operators';
  16. import { trigger, state, style, transition, animate } from '@angular/animations';
  17. class MatStepLabel extends CdkStepLabel {
  18. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepLabel, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
  19. static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: MatStepLabel, selector: "[matStepLabel]", usesInheritance: true, ngImport: i0 }); }
  20. }
  21. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepLabel, decorators: [{
  22. type: Directive,
  23. args: [{
  24. selector: '[matStepLabel]',
  25. }]
  26. }] });
  27. /** Stepper data that is required for internationalization. */
  28. class MatStepperIntl {
  29. constructor() {
  30. /**
  31. * Stream that emits whenever the labels here are changed. Use this to notify
  32. * components if the labels have changed after initialization.
  33. */
  34. this.changes = new Subject();
  35. /** Label that is rendered below optional steps. */
  36. this.optionalLabel = 'Optional';
  37. /** Label that is used to indicate step as completed to screen readers. */
  38. this.completedLabel = 'Completed';
  39. /** Label that is used to indicate step as editable to screen readers. */
  40. this.editableLabel = 'Editable';
  41. }
  42. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepperIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
  43. static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepperIntl, providedIn: 'root' }); }
  44. }
  45. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepperIntl, decorators: [{
  46. type: Injectable,
  47. args: [{ providedIn: 'root' }]
  48. }] });
  49. /** @docs-private */
  50. function MAT_STEPPER_INTL_PROVIDER_FACTORY(parentIntl) {
  51. return parentIntl || new MatStepperIntl();
  52. }
  53. /** @docs-private */
  54. const MAT_STEPPER_INTL_PROVIDER = {
  55. provide: MatStepperIntl,
  56. deps: [[new Optional(), new SkipSelf(), MatStepperIntl]],
  57. useFactory: MAT_STEPPER_INTL_PROVIDER_FACTORY,
  58. };
  59. // Boilerplate for applying mixins to MatStepHeader.
  60. /** @docs-private */
  61. const _MatStepHeaderBase = mixinColor(class MatStepHeaderBase extends CdkStepHeader {
  62. constructor(elementRef) {
  63. super(elementRef);
  64. }
  65. }, 'primary');
  66. class MatStepHeader extends _MatStepHeaderBase {
  67. constructor(_intl, _focusMonitor, _elementRef, changeDetectorRef) {
  68. super(_elementRef);
  69. this._intl = _intl;
  70. this._focusMonitor = _focusMonitor;
  71. this._intlSubscription = _intl.changes.subscribe(() => changeDetectorRef.markForCheck());
  72. }
  73. ngAfterViewInit() {
  74. this._focusMonitor.monitor(this._elementRef, true);
  75. }
  76. ngOnDestroy() {
  77. this._intlSubscription.unsubscribe();
  78. this._focusMonitor.stopMonitoring(this._elementRef);
  79. }
  80. /** Focuses the step header. */
  81. focus(origin, options) {
  82. if (origin) {
  83. this._focusMonitor.focusVia(this._elementRef, origin, options);
  84. }
  85. else {
  86. this._elementRef.nativeElement.focus(options);
  87. }
  88. }
  89. /** Returns string label of given step if it is a text label. */
  90. _stringLabel() {
  91. return this.label instanceof MatStepLabel ? null : this.label;
  92. }
  93. /** Returns MatStepLabel if the label of given step is a template label. */
  94. _templateLabel() {
  95. return this.label instanceof MatStepLabel ? this.label : null;
  96. }
  97. /** Returns the host HTML element. */
  98. _getHostElement() {
  99. return this._elementRef.nativeElement;
  100. }
  101. /** Template context variables that are exposed to the `matStepperIcon` instances. */
  102. _getIconContext() {
  103. return {
  104. index: this.index,
  105. active: this.active,
  106. optional: this.optional,
  107. };
  108. }
  109. _getDefaultTextForState(state) {
  110. if (state == 'number') {
  111. return `${this.index + 1}`;
  112. }
  113. if (state == 'edit') {
  114. return 'create';
  115. }
  116. if (state == 'error') {
  117. return 'warning';
  118. }
  119. return state;
  120. }
  121. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepHeader, deps: [{ token: MatStepperIntl }, { token: i2.FocusMonitor }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
  122. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: MatStepHeader, selector: "mat-step-header", inputs: { color: "color", state: "state", label: "label", errorMessage: "errorMessage", iconOverrides: "iconOverrides", index: "index", selected: "selected", active: "active", optional: "optional", disableRipple: "disableRipple" }, host: { attributes: { "role": "tab" }, classAttribute: "mat-step-header" }, usesInheritance: true, ngImport: i0, template: "<div class=\"mat-step-header-ripple mat-focus-indicator\" matRipple\n [matRippleTrigger]=\"_getHostElement()\"\n [matRippleDisabled]=\"disableRipple\"></div>\n\n<div class=\"mat-step-icon-state-{{state}} mat-step-icon\" [class.mat-step-icon-selected]=\"selected\">\n <div class=\"mat-step-icon-content\" [ngSwitch]=\"!!(iconOverrides && iconOverrides[state])\">\n <ng-container\n *ngSwitchCase=\"true\"\n [ngTemplateOutlet]=\"iconOverrides[state]\"\n [ngTemplateOutletContext]=\"_getIconContext()\"></ng-container>\n <ng-container *ngSwitchDefault [ngSwitch]=\"state\">\n <span aria-hidden=\"true\" *ngSwitchCase=\"'number'\">{{_getDefaultTextForState(state)}}</span>\n <span class=\"cdk-visually-hidden\" *ngIf=\"state === 'done'\">{{_intl.completedLabel}}</span>\n <span class=\"cdk-visually-hidden\" *ngIf=\"state === 'edit'\">{{_intl.editableLabel}}</span>\n <mat-icon aria-hidden=\"true\" *ngSwitchDefault>{{_getDefaultTextForState(state)}}</mat-icon>\n </ng-container>\n </div>\n</div>\n<div class=\"mat-step-label\"\n [class.mat-step-label-active]=\"active\"\n [class.mat-step-label-selected]=\"selected\"\n [class.mat-step-label-error]=\"state == 'error'\">\n <!-- If there is a label template, use it. -->\n <div class=\"mat-step-text-label\" *ngIf=\"_templateLabel()\">\n <ng-container [ngTemplateOutlet]=\"_templateLabel()!.template\"></ng-container>\n </div>\n <!-- If there is no label template, fall back to the text label. -->\n <div class=\"mat-step-text-label\" *ngIf=\"_stringLabel()\">{{label}}</div>\n\n <div class=\"mat-step-optional\" *ngIf=\"optional && state != 'error'\">{{_intl.optionalLabel}}</div>\n <div class=\"mat-step-sub-label-error\" *ngIf=\"state == 'error'\">{{errorMessage}}</div>\n</div>\n\n", styles: [".mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:\"\"}.cdk-high-contrast-active .mat-step-header{outline:solid 1px}.cdk-high-contrast-active .mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.cdk-high-contrast-active .mat-step-header[aria-disabled=true]{outline-color:GrayText}.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-label,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-icon,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}.mat-step-optional,.mat-step-sub-label-error{font-size:12px}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
  123. }
  124. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepHeader, decorators: [{
  125. type: Component,
  126. args: [{ selector: 'mat-step-header', inputs: ['color'], host: {
  127. 'class': 'mat-step-header',
  128. 'role': 'tab',
  129. }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mat-step-header-ripple mat-focus-indicator\" matRipple\n [matRippleTrigger]=\"_getHostElement()\"\n [matRippleDisabled]=\"disableRipple\"></div>\n\n<div class=\"mat-step-icon-state-{{state}} mat-step-icon\" [class.mat-step-icon-selected]=\"selected\">\n <div class=\"mat-step-icon-content\" [ngSwitch]=\"!!(iconOverrides && iconOverrides[state])\">\n <ng-container\n *ngSwitchCase=\"true\"\n [ngTemplateOutlet]=\"iconOverrides[state]\"\n [ngTemplateOutletContext]=\"_getIconContext()\"></ng-container>\n <ng-container *ngSwitchDefault [ngSwitch]=\"state\">\n <span aria-hidden=\"true\" *ngSwitchCase=\"'number'\">{{_getDefaultTextForState(state)}}</span>\n <span class=\"cdk-visually-hidden\" *ngIf=\"state === 'done'\">{{_intl.completedLabel}}</span>\n <span class=\"cdk-visually-hidden\" *ngIf=\"state === 'edit'\">{{_intl.editableLabel}}</span>\n <mat-icon aria-hidden=\"true\" *ngSwitchDefault>{{_getDefaultTextForState(state)}}</mat-icon>\n </ng-container>\n </div>\n</div>\n<div class=\"mat-step-label\"\n [class.mat-step-label-active]=\"active\"\n [class.mat-step-label-selected]=\"selected\"\n [class.mat-step-label-error]=\"state == 'error'\">\n <!-- If there is a label template, use it. -->\n <div class=\"mat-step-text-label\" *ngIf=\"_templateLabel()\">\n <ng-container [ngTemplateOutlet]=\"_templateLabel()!.template\"></ng-container>\n </div>\n <!-- If there is no label template, fall back to the text label. -->\n <div class=\"mat-step-text-label\" *ngIf=\"_stringLabel()\">{{label}}</div>\n\n <div class=\"mat-step-optional\" *ngIf=\"optional && state != 'error'\">{{_intl.optionalLabel}}</div>\n <div class=\"mat-step-sub-label-error\" *ngIf=\"state == 'error'\">{{errorMessage}}</div>\n</div>\n\n", styles: [".mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:\"\"}.cdk-high-contrast-active .mat-step-header{outline:solid 1px}.cdk-high-contrast-active .mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.cdk-high-contrast-active .mat-step-header[aria-disabled=true]{outline-color:GrayText}.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-label,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-icon,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}.mat-step-optional,.mat-step-sub-label-error{font-size:12px}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"] }]
  130. }], ctorParameters: function () { return [{ type: MatStepperIntl }, { type: i2.FocusMonitor }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { state: [{
  131. type: Input
  132. }], label: [{
  133. type: Input
  134. }], errorMessage: [{
  135. type: Input
  136. }], iconOverrides: [{
  137. type: Input
  138. }], index: [{
  139. type: Input
  140. }], selected: [{
  141. type: Input
  142. }], active: [{
  143. type: Input
  144. }], optional: [{
  145. type: Input
  146. }], disableRipple: [{
  147. type: Input
  148. }] } });
  149. const DEFAULT_HORIZONTAL_ANIMATION_DURATION = '500ms';
  150. const DEFAULT_VERTICAL_ANIMATION_DURATION = '225ms';
  151. /**
  152. * Animations used by the Material steppers.
  153. * @docs-private
  154. */
  155. const matStepperAnimations = {
  156. /** Animation that transitions the step along the X axis in a horizontal stepper. */
  157. horizontalStepTransition: trigger('horizontalStepTransition', [
  158. state('previous', style({ transform: 'translate3d(-100%, 0, 0)', visibility: 'hidden' })),
  159. // Transition to `inherit`, rather than `visible`,
  160. // because visibility on a child element the one from the parent,
  161. // making this element focusable inside of a `hidden` element.
  162. state('current', style({ transform: 'none', visibility: 'inherit' })),
  163. state('next', style({ transform: 'translate3d(100%, 0, 0)', visibility: 'hidden' })),
  164. transition('* => *', animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)'), {
  165. params: { 'animationDuration': DEFAULT_HORIZONTAL_ANIMATION_DURATION },
  166. }),
  167. ]),
  168. /** Animation that transitions the step along the Y axis in a vertical stepper. */
  169. verticalStepTransition: trigger('verticalStepTransition', [
  170. state('previous', style({ height: '0px', visibility: 'hidden' })),
  171. state('next', style({ height: '0px', visibility: 'hidden' })),
  172. // Transition to `inherit`, rather than `visible`,
  173. // because visibility on a child element the one from the parent,
  174. // making this element focusable inside of a `hidden` element.
  175. state('current', style({ height: '*', visibility: 'inherit' })),
  176. transition('* <=> current', animate('{{animationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)'), {
  177. params: { 'animationDuration': DEFAULT_VERTICAL_ANIMATION_DURATION },
  178. }),
  179. ]),
  180. };
  181. /**
  182. * Template to be used to override the icons inside the step header.
  183. */
  184. class MatStepperIcon {
  185. constructor(templateRef) {
  186. this.templateRef = templateRef;
  187. }
  188. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepperIcon, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
  189. static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: MatStepperIcon, selector: "ng-template[matStepperIcon]", inputs: { name: ["matStepperIcon", "name"] }, ngImport: i0 }); }
  190. }
  191. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepperIcon, decorators: [{
  192. type: Directive,
  193. args: [{
  194. selector: 'ng-template[matStepperIcon]',
  195. }]
  196. }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { name: [{
  197. type: Input,
  198. args: ['matStepperIcon']
  199. }] } });
  200. /**
  201. * Content for a `mat-step` that will be rendered lazily.
  202. */
  203. class MatStepContent {
  204. constructor(_template) {
  205. this._template = _template;
  206. }
  207. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepContent, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
  208. static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: MatStepContent, selector: "ng-template[matStepContent]", ngImport: i0 }); }
  209. }
  210. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepContent, decorators: [{
  211. type: Directive,
  212. args: [{
  213. selector: 'ng-template[matStepContent]',
  214. }]
  215. }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
  216. class MatStep extends CdkStep {
  217. constructor(stepper, _errorStateMatcher, _viewContainerRef, stepperOptions) {
  218. super(stepper, stepperOptions);
  219. this._errorStateMatcher = _errorStateMatcher;
  220. this._viewContainerRef = _viewContainerRef;
  221. this._isSelected = Subscription.EMPTY;
  222. /** Content for step label given by `<ng-template matStepLabel>`. */
  223. // We need an initializer here to avoid a TS error.
  224. this.stepLabel = undefined;
  225. }
  226. ngAfterContentInit() {
  227. this._isSelected = this._stepper.steps.changes
  228. .pipe(switchMap(() => {
  229. return this._stepper.selectionChange.pipe(map(event => event.selectedStep === this), startWith(this._stepper.selected === this));
  230. }))
  231. .subscribe(isSelected => {
  232. if (isSelected && this._lazyContent && !this._portal) {
  233. this._portal = new TemplatePortal(this._lazyContent._template, this._viewContainerRef);
  234. }
  235. });
  236. }
  237. ngOnDestroy() {
  238. this._isSelected.unsubscribe();
  239. }
  240. /** Custom error state matcher that additionally checks for validity of interacted form. */
  241. isErrorState(control, form) {
  242. const originalErrorState = this._errorStateMatcher.isErrorState(control, form);
  243. // Custom error state checks for the validity of form that is not submitted or touched
  244. // since user can trigger a form change by calling for another step without directly
  245. // interacting with the current form.
  246. const customErrorState = !!(control && control.invalid && this.interacted);
  247. return originalErrorState || customErrorState;
  248. }
  249. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStep, deps: [{ token: forwardRef(() => MatStepper) }, { token: i1.ErrorStateMatcher, skipSelf: true }, { token: i0.ViewContainerRef }, { token: STEPPER_GLOBAL_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
  250. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: MatStep, selector: "mat-step", inputs: { color: "color" }, providers: [
  251. { provide: ErrorStateMatcher, useExisting: MatStep },
  252. { provide: CdkStep, useExisting: MatStep },
  253. ], queries: [{ propertyName: "stepLabel", first: true, predicate: MatStepLabel, descendants: true }, { propertyName: "_lazyContent", first: true, predicate: MatStepContent, descendants: true }], exportAs: ["matStep"], usesInheritance: true, ngImport: i0, template: "<ng-template>\n <ng-content></ng-content>\n <ng-template [cdkPortalOutlet]=\"_portal\"></ng-template>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
  254. }
  255. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStep, decorators: [{
  256. type: Component,
  257. args: [{ selector: 'mat-step', providers: [
  258. { provide: ErrorStateMatcher, useExisting: MatStep },
  259. { provide: CdkStep, useExisting: MatStep },
  260. ], encapsulation: ViewEncapsulation.None, exportAs: 'matStep', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template>\n <ng-content></ng-content>\n <ng-template [cdkPortalOutlet]=\"_portal\"></ng-template>\n</ng-template>\n" }]
  261. }], ctorParameters: function () { return [{ type: MatStepper, decorators: [{
  262. type: Inject,
  263. args: [forwardRef(() => MatStepper)]
  264. }] }, { type: i1.ErrorStateMatcher, decorators: [{
  265. type: SkipSelf
  266. }] }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
  267. type: Optional
  268. }, {
  269. type: Inject,
  270. args: [STEPPER_GLOBAL_OPTIONS]
  271. }] }]; }, propDecorators: { stepLabel: [{
  272. type: ContentChild,
  273. args: [MatStepLabel]
  274. }], color: [{
  275. type: Input
  276. }], _lazyContent: [{
  277. type: ContentChild,
  278. args: [MatStepContent, { static: false }]
  279. }] } });
  280. class MatStepper extends CdkStepper {
  281. /** Duration for the animation. Will be normalized to milliseconds if no units are set. */
  282. get animationDuration() {
  283. return this._animationDuration;
  284. }
  285. set animationDuration(value) {
  286. this._animationDuration = /^\d+$/.test(value) ? value + 'ms' : value;
  287. }
  288. constructor(dir, changeDetectorRef, elementRef) {
  289. super(dir, changeDetectorRef, elementRef);
  290. /** The list of step headers of the steps in the stepper. */
  291. // We need an initializer here to avoid a TS error.
  292. this._stepHeader = undefined;
  293. /** Full list of steps inside the stepper, including inside nested steppers. */
  294. // We need an initializer here to avoid a TS error.
  295. this._steps = undefined;
  296. /** Steps that belong to the current stepper, excluding ones from nested steppers. */
  297. this.steps = new QueryList();
  298. /** Event emitted when the current step is done transitioning in. */
  299. this.animationDone = new EventEmitter();
  300. /**
  301. * Whether the label should display in bottom or end position.
  302. * Only applies in the `horizontal` orientation.
  303. */
  304. this.labelPosition = 'end';
  305. /**
  306. * Position of the stepper's header.
  307. * Only applies in the `horizontal` orientation.
  308. */
  309. this.headerPosition = 'top';
  310. /** Consumer-specified template-refs to be used to override the header icons. */
  311. this._iconOverrides = {};
  312. /** Stream of animation `done` events when the body expands/collapses. */
  313. this._animationDone = new Subject();
  314. this._animationDuration = '';
  315. const nodeName = elementRef.nativeElement.nodeName.toLowerCase();
  316. this.orientation = nodeName === 'mat-vertical-stepper' ? 'vertical' : 'horizontal';
  317. }
  318. ngAfterContentInit() {
  319. super.ngAfterContentInit();
  320. this._icons.forEach(({ name, templateRef }) => (this._iconOverrides[name] = templateRef));
  321. // Mark the component for change detection whenever the content children query changes
  322. this.steps.changes.pipe(takeUntil(this._destroyed)).subscribe(() => {
  323. this._stateChanged();
  324. });
  325. this._animationDone
  326. .pipe(
  327. // This needs a `distinctUntilChanged` in order to avoid emitting the same event twice due
  328. // to a bug in animations where the `.done` callback gets invoked twice on some browsers.
  329. // See https://github.com/angular/angular/issues/24084
  330. distinctUntilChanged((x, y) => x.fromState === y.fromState && x.toState === y.toState), takeUntil(this._destroyed))
  331. .subscribe(event => {
  332. if (event.toState === 'current') {
  333. this.animationDone.emit();
  334. }
  335. });
  336. }
  337. _stepIsNavigable(index, step) {
  338. return step.completed || this.selectedIndex === index || !this.linear;
  339. }
  340. _getAnimationDuration() {
  341. if (this.animationDuration) {
  342. return this.animationDuration;
  343. }
  344. return this.orientation === 'horizontal'
  345. ? DEFAULT_HORIZONTAL_ANIMATION_DURATION
  346. : DEFAULT_VERTICAL_ANIMATION_DURATION;
  347. }
  348. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepper, deps: [{ token: i3$1.Directionality, optional: true }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
  349. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: { selectedIndex: "selectedIndex", disableRipple: "disableRipple", color: "color", labelPosition: "labelPosition", headerPosition: "headerPosition", animationDuration: "animationDuration" }, outputs: { animationDone: "animationDone" }, host: { attributes: { "role": "tablist", "ngSkipHydration": "" }, properties: { "class.mat-stepper-horizontal": "orientation === \"horizontal\"", "class.mat-stepper-vertical": "orientation === \"vertical\"", "class.mat-stepper-label-position-end": "orientation === \"horizontal\" && labelPosition == \"end\"", "class.mat-stepper-label-position-bottom": "orientation === \"horizontal\" && labelPosition == \"bottom\"", "class.mat-stepper-header-position-bottom": "headerPosition === \"bottom\"", "attr.aria-orientation": "orientation" } }, providers: [{ provide: CdkStepper, useExisting: MatStepper }], queries: [{ propertyName: "_steps", predicate: MatStep, descendants: true }, { propertyName: "_icons", predicate: MatStepperIcon, descendants: true }], viewQueries: [{ propertyName: "_stepHeader", predicate: MatStepHeader, descendants: true }], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"], usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"orientation\">\n <!-- Horizontal stepper -->\n <div class=\"mat-horizontal-stepper-wrapper\" *ngSwitchCase=\"'horizontal'\">\n <div class=\"mat-horizontal-stepper-header-container\">\n <ng-container *ngFor=\"let step of steps; let i = index; let isLast = last\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate\"\n [ngTemplateOutletContext]=\"{step: step, i: i}\"></ng-container>\n <div *ngIf=\"!isLast\" class=\"mat-stepper-horizontal-line\"></div>\n </ng-container>\n </div>\n\n <div class=\"mat-horizontal-content-container\">\n <div *ngFor=\"let step of steps; let i = index\"\n class=\"mat-horizontal-stepper-content\" role=\"tabpanel\"\n [@horizontalStepTransition]=\"{\n 'value': _getAnimationDirection(i),\n 'params': {'animationDuration': _getAnimationDuration()}\n }\"\n (@horizontalStepTransition.done)=\"_animationDone.next($event)\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [class.mat-horizontal-stepper-content-inactive]=\"selectedIndex !== i\">\n <ng-container [ngTemplateOutlet]=\"step.content\"></ng-container>\n </div>\n </div>\n </div>\n\n <!-- Vertical stepper -->\n <ng-container *ngSwitchCase=\"'vertical'\">\n <div class=\"mat-step\" *ngFor=\"let step of steps; let i = index; let isLast = last\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate\"\n [ngTemplateOutletContext]=\"{step: step, i: i}\"></ng-container>\n <div class=\"mat-vertical-content-container\" [class.mat-stepper-vertical-line]=\"!isLast\">\n <div class=\"mat-vertical-stepper-content\" role=\"tabpanel\"\n [@verticalStepTransition]=\"{\n 'value': _getAnimationDirection(i),\n 'params': {'animationDuration': _getAnimationDuration()}\n }\"\n (@verticalStepTransition.done)=\"_animationDone.next($event)\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [class.mat-vertical-stepper-content-inactive]=\"selectedIndex !== i\">\n <div class=\"mat-vertical-content\">\n <ng-container [ngTemplateOutlet]=\"step.content\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n\n</ng-container>\n\n<!-- Common step templating -->\n<ng-template let-step=\"step\" let-i=\"i\" #stepTemplate>\n <mat-step-header\n [class.mat-horizontal-stepper-header]=\"orientation === 'horizontal'\"\n [class.mat-vertical-stepper-header]=\"orientation === 'vertical'\"\n (click)=\"step.select()\"\n (keydown)=\"_onKeydown($event)\"\n [tabIndex]=\"_getFocusIndex() === i ? 0 : -1\"\n [id]=\"_getStepLabelId(i)\"\n [attr.aria-posinset]=\"i + 1\"\n [attr.aria-setsize]=\"steps.length\"\n [attr.aria-controls]=\"_getStepContentId(i)\"\n [attr.aria-selected]=\"selectedIndex == i\"\n [attr.aria-label]=\"step.ariaLabel || null\"\n [attr.aria-labelledby]=\"(!step.ariaLabel && step.ariaLabelledby) ? step.ariaLabelledby : null\"\n [attr.aria-disabled]=\"_stepIsNavigable(i, step) ? null : true\"\n [index]=\"i\"\n [state]=\"_getIndicatorType(i, step.state)\"\n [label]=\"step.stepLabel || step.label\"\n [selected]=\"selectedIndex === i\"\n [active]=\"_stepIsNavigable(i, step)\"\n [optional]=\"step.optional\"\n [errorMessage]=\"step.errorMessage\"\n [iconOverrides]=\"_iconOverrides\"\n [disableRipple]=\"disableRipple || !_stepIsNavigable(i, step)\"\n [color]=\"step.color || color\"></mat-step-header>\n</ng-template>\n", styles: [".mat-stepper-vertical,.mat-stepper-horizontal{display:block}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-header-position-bottom .mat-horizontal-stepper-header-container{order:1}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-wrapper{display:flex;flex-direction:column}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-inactive{height:0;overflow:hidden}.mat-horizontal-stepper-content:not(.mat-horizontal-stepper-content-inactive){visibility:inherit !important}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.cdk-high-contrast-active .mat-horizontal-content-container{outline:solid 1px}.mat-stepper-header-position-bottom .mat-horizontal-content-container{padding:24px 24px 0 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}.cdk-high-contrast-active .mat-vertical-content-container{outline:solid 1px}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:\"\";position:absolute;left:0;border-left-width:1px;border-left-style:solid}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-stepper-content:not(.mat-vertical-stepper-content-inactive){visibility:inherit !important}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: MatStepHeader, selector: "mat-step-header", inputs: ["color", "state", "label", "errorMessage", "iconOverrides", "index", "selected", "active", "optional", "disableRipple"] }], animations: [
  350. matStepperAnimations.horizontalStepTransition,
  351. matStepperAnimations.verticalStepTransition,
  352. ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
  353. }
  354. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepper, decorators: [{
  355. type: Component,
  356. args: [{ selector: 'mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]', exportAs: 'matStepper, matVerticalStepper, matHorizontalStepper', inputs: ['selectedIndex'], host: {
  357. '[class.mat-stepper-horizontal]': 'orientation === "horizontal"',
  358. '[class.mat-stepper-vertical]': 'orientation === "vertical"',
  359. '[class.mat-stepper-label-position-end]': 'orientation === "horizontal" && labelPosition == "end"',
  360. '[class.mat-stepper-label-position-bottom]': 'orientation === "horizontal" && labelPosition == "bottom"',
  361. '[class.mat-stepper-header-position-bottom]': 'headerPosition === "bottom"',
  362. '[attr.aria-orientation]': 'orientation',
  363. 'role': 'tablist',
  364. 'ngSkipHydration': '',
  365. }, animations: [
  366. matStepperAnimations.horizontalStepTransition,
  367. matStepperAnimations.verticalStepTransition,
  368. ], providers: [{ provide: CdkStepper, useExisting: MatStepper }], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"orientation\">\n <!-- Horizontal stepper -->\n <div class=\"mat-horizontal-stepper-wrapper\" *ngSwitchCase=\"'horizontal'\">\n <div class=\"mat-horizontal-stepper-header-container\">\n <ng-container *ngFor=\"let step of steps; let i = index; let isLast = last\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate\"\n [ngTemplateOutletContext]=\"{step: step, i: i}\"></ng-container>\n <div *ngIf=\"!isLast\" class=\"mat-stepper-horizontal-line\"></div>\n </ng-container>\n </div>\n\n <div class=\"mat-horizontal-content-container\">\n <div *ngFor=\"let step of steps; let i = index\"\n class=\"mat-horizontal-stepper-content\" role=\"tabpanel\"\n [@horizontalStepTransition]=\"{\n 'value': _getAnimationDirection(i),\n 'params': {'animationDuration': _getAnimationDuration()}\n }\"\n (@horizontalStepTransition.done)=\"_animationDone.next($event)\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [class.mat-horizontal-stepper-content-inactive]=\"selectedIndex !== i\">\n <ng-container [ngTemplateOutlet]=\"step.content\"></ng-container>\n </div>\n </div>\n </div>\n\n <!-- Vertical stepper -->\n <ng-container *ngSwitchCase=\"'vertical'\">\n <div class=\"mat-step\" *ngFor=\"let step of steps; let i = index; let isLast = last\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate\"\n [ngTemplateOutletContext]=\"{step: step, i: i}\"></ng-container>\n <div class=\"mat-vertical-content-container\" [class.mat-stepper-vertical-line]=\"!isLast\">\n <div class=\"mat-vertical-stepper-content\" role=\"tabpanel\"\n [@verticalStepTransition]=\"{\n 'value': _getAnimationDirection(i),\n 'params': {'animationDuration': _getAnimationDuration()}\n }\"\n (@verticalStepTransition.done)=\"_animationDone.next($event)\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [class.mat-vertical-stepper-content-inactive]=\"selectedIndex !== i\">\n <div class=\"mat-vertical-content\">\n <ng-container [ngTemplateOutlet]=\"step.content\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n\n</ng-container>\n\n<!-- Common step templating -->\n<ng-template let-step=\"step\" let-i=\"i\" #stepTemplate>\n <mat-step-header\n [class.mat-horizontal-stepper-header]=\"orientation === 'horizontal'\"\n [class.mat-vertical-stepper-header]=\"orientation === 'vertical'\"\n (click)=\"step.select()\"\n (keydown)=\"_onKeydown($event)\"\n [tabIndex]=\"_getFocusIndex() === i ? 0 : -1\"\n [id]=\"_getStepLabelId(i)\"\n [attr.aria-posinset]=\"i + 1\"\n [attr.aria-setsize]=\"steps.length\"\n [attr.aria-controls]=\"_getStepContentId(i)\"\n [attr.aria-selected]=\"selectedIndex == i\"\n [attr.aria-label]=\"step.ariaLabel || null\"\n [attr.aria-labelledby]=\"(!step.ariaLabel && step.ariaLabelledby) ? step.ariaLabelledby : null\"\n [attr.aria-disabled]=\"_stepIsNavigable(i, step) ? null : true\"\n [index]=\"i\"\n [state]=\"_getIndicatorType(i, step.state)\"\n [label]=\"step.stepLabel || step.label\"\n [selected]=\"selectedIndex === i\"\n [active]=\"_stepIsNavigable(i, step)\"\n [optional]=\"step.optional\"\n [errorMessage]=\"step.errorMessage\"\n [iconOverrides]=\"_iconOverrides\"\n [disableRipple]=\"disableRipple || !_stepIsNavigable(i, step)\"\n [color]=\"step.color || color\"></mat-step-header>\n</ng-template>\n", styles: [".mat-stepper-vertical,.mat-stepper-horizontal{display:block}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-header-position-bottom .mat-horizontal-stepper-header-container{order:1}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-wrapper{display:flex;flex-direction:column}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-inactive{height:0;overflow:hidden}.mat-horizontal-stepper-content:not(.mat-horizontal-stepper-content-inactive){visibility:inherit !important}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.cdk-high-contrast-active .mat-horizontal-content-container{outline:solid 1px}.mat-stepper-header-position-bottom .mat-horizontal-content-container{padding:24px 24px 0 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}.cdk-high-contrast-active .mat-vertical-content-container{outline:solid 1px}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:\"\";position:absolute;left:0;border-left-width:1px;border-left-style:solid}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-stepper-content:not(.mat-vertical-stepper-content-inactive){visibility:inherit !important}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}"] }]
  369. }], ctorParameters: function () { return [{ type: i3$1.Directionality, decorators: [{
  370. type: Optional
  371. }] }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { _stepHeader: [{
  372. type: ViewChildren,
  373. args: [MatStepHeader]
  374. }], _steps: [{
  375. type: ContentChildren,
  376. args: [MatStep, { descendants: true }]
  377. }], _icons: [{
  378. type: ContentChildren,
  379. args: [MatStepperIcon, { descendants: true }]
  380. }], animationDone: [{
  381. type: Output
  382. }], disableRipple: [{
  383. type: Input
  384. }], color: [{
  385. type: Input
  386. }], labelPosition: [{
  387. type: Input
  388. }], headerPosition: [{
  389. type: Input
  390. }], animationDuration: [{
  391. type: Input
  392. }] } });
  393. /** Button that moves to the next step in a stepper workflow. */
  394. class MatStepperNext extends CdkStepperNext {
  395. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepperNext, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
  396. static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: MatStepperNext, selector: "button[matStepperNext]", inputs: { type: "type" }, host: { properties: { "type": "type" }, classAttribute: "mat-stepper-next" }, usesInheritance: true, ngImport: i0 }); }
  397. }
  398. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepperNext, decorators: [{
  399. type: Directive,
  400. args: [{
  401. selector: 'button[matStepperNext]',
  402. host: {
  403. 'class': 'mat-stepper-next',
  404. '[type]': 'type',
  405. },
  406. inputs: ['type'],
  407. }]
  408. }] });
  409. /** Button that moves to the previous step in a stepper workflow. */
  410. class MatStepperPrevious extends CdkStepperPrevious {
  411. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepperPrevious, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
  412. static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: MatStepperPrevious, selector: "button[matStepperPrevious]", inputs: { type: "type" }, host: { properties: { "type": "type" }, classAttribute: "mat-stepper-previous" }, usesInheritance: true, ngImport: i0 }); }
  413. }
  414. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepperPrevious, decorators: [{
  415. type: Directive,
  416. args: [{
  417. selector: 'button[matStepperPrevious]',
  418. host: {
  419. 'class': 'mat-stepper-previous',
  420. '[type]': 'type',
  421. },
  422. inputs: ['type'],
  423. }]
  424. }] });
  425. class MatStepperModule {
  426. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
  427. static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: MatStepperModule, declarations: [MatStep,
  428. MatStepLabel,
  429. MatStepper,
  430. MatStepperNext,
  431. MatStepperPrevious,
  432. MatStepHeader,
  433. MatStepperIcon,
  434. MatStepContent], imports: [MatCommonModule,
  435. CommonModule,
  436. PortalModule,
  437. CdkStepperModule,
  438. MatIconModule,
  439. MatRippleModule], exports: [MatCommonModule,
  440. MatStep,
  441. MatStepLabel,
  442. MatStepper,
  443. MatStepperNext,
  444. MatStepperPrevious,
  445. MatStepHeader,
  446. MatStepperIcon,
  447. MatStepContent] }); }
  448. static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepperModule, providers: [MAT_STEPPER_INTL_PROVIDER, ErrorStateMatcher], imports: [MatCommonModule,
  449. CommonModule,
  450. PortalModule,
  451. CdkStepperModule,
  452. MatIconModule,
  453. MatRippleModule, MatCommonModule] }); }
  454. }
  455. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MatStepperModule, decorators: [{
  456. type: NgModule,
  457. args: [{
  458. imports: [
  459. MatCommonModule,
  460. CommonModule,
  461. PortalModule,
  462. CdkStepperModule,
  463. MatIconModule,
  464. MatRippleModule,
  465. ],
  466. exports: [
  467. MatCommonModule,
  468. MatStep,
  469. MatStepLabel,
  470. MatStepper,
  471. MatStepperNext,
  472. MatStepperPrevious,
  473. MatStepHeader,
  474. MatStepperIcon,
  475. MatStepContent,
  476. ],
  477. declarations: [
  478. MatStep,
  479. MatStepLabel,
  480. MatStepper,
  481. MatStepperNext,
  482. MatStepperPrevious,
  483. MatStepHeader,
  484. MatStepperIcon,
  485. MatStepContent,
  486. ],
  487. providers: [MAT_STEPPER_INTL_PROVIDER, ErrorStateMatcher],
  488. }]
  489. }] });
  490. /**
  491. * Generated bundle index. Do not edit.
  492. */
  493. export { MAT_STEPPER_INTL_PROVIDER, MAT_STEPPER_INTL_PROVIDER_FACTORY, MatStep, MatStepContent, MatStepHeader, MatStepLabel, MatStepper, MatStepperIcon, MatStepperIntl, MatStepperModule, MatStepperNext, MatStepperPrevious, matStepperAnimations };
  494. //# sourceMappingURL=stepper.mjs.map