material-stepper.umd.js 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
  1. /**
  2. * @license
  3. * Copyright Google LLC All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.io/license
  7. */
  8. (function (global, factory) {
  9. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/cdk/stepper'), require('rxjs'), require('@angular/cdk/a11y'), require('@angular/animations'), require('@angular/cdk/bidi'), require('@angular/common'), require('@angular/material/core'), require('rxjs/operators'), require('@angular/cdk/portal'), require('@angular/material/button'), require('@angular/material/icon')) :
  10. typeof define === 'function' && define.amd ? define('@angular/material/stepper', ['exports', '@angular/core', '@angular/cdk/stepper', 'rxjs', '@angular/cdk/a11y', '@angular/animations', '@angular/cdk/bidi', '@angular/common', '@angular/material/core', 'rxjs/operators', '@angular/cdk/portal', '@angular/material/button', '@angular/material/icon'], factory) :
  11. (factory((global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.stepper = {}),global.ng.core,global.ng.cdk.stepper,global.rxjs,global.ng.cdk.a11y,global.ng.animations,global.ng.cdk.bidi,global.ng.common,global.ng.material.core,global.rxjs.operators,global.ng.cdk.portal,global.ng.material.button,global.ng.material.icon));
  12. }(this, (function (exports,core,stepper,rxjs,a11y,animations,bidi,common,core$1,operators,portal,button,icon) { 'use strict';
  13. /*! *****************************************************************************
  14. Copyright (c) Microsoft Corporation. All rights reserved.
  15. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  16. this file except in compliance with the License. You may obtain a copy of the
  17. License at http://www.apache.org/licenses/LICENSE-2.0
  18. THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  19. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  20. WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  21. MERCHANTABLITY OR NON-INFRINGEMENT.
  22. See the Apache Version 2.0 License for specific language governing permissions
  23. and limitations under the License.
  24. ***************************************************************************** */
  25. /* global Reflect, Promise */
  26. var extendStatics = function(d, b) {
  27. extendStatics = Object.setPrototypeOf ||
  28. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  29. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  30. return extendStatics(d, b);
  31. };
  32. function __extends(d, b) {
  33. extendStatics(d, b);
  34. function __() { this.constructor = d; }
  35. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  36. }
  37. /**
  38. * @fileoverview added by tsickle
  39. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  40. */
  41. var MatStepLabel = /** @class */ (function (_super) {
  42. __extends(MatStepLabel, _super);
  43. function MatStepLabel() {
  44. return _super !== null && _super.apply(this, arguments) || this;
  45. }
  46. MatStepLabel.decorators = [
  47. { type: core.Directive, args: [{
  48. selector: '[matStepLabel]',
  49. },] },
  50. ];
  51. return MatStepLabel;
  52. }(stepper.CdkStepLabel));
  53. /**
  54. * @fileoverview added by tsickle
  55. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  56. */
  57. /**
  58. * Stepper data that is required for internationalization.
  59. */
  60. var MatStepperIntl = /** @class */ (function () {
  61. function MatStepperIntl() {
  62. /**
  63. * Stream that emits whenever the labels here are changed. Use this to notify
  64. * components if the labels have changed after initialization.
  65. */
  66. this.changes = new rxjs.Subject();
  67. /**
  68. * Label that is rendered below optional steps.
  69. */
  70. this.optionalLabel = 'Optional';
  71. }
  72. MatStepperIntl.decorators = [
  73. { type: core.Injectable, args: [{ providedIn: 'root' },] },
  74. ];
  75. /** @nocollapse */ MatStepperIntl.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function MatStepperIntl_Factory() { return new MatStepperIntl(); }, token: MatStepperIntl, providedIn: "root" });
  76. return MatStepperIntl;
  77. }());
  78. /**
  79. * \@docs-private
  80. * @param {?} parentIntl
  81. * @return {?}
  82. */
  83. function MAT_STEPPER_INTL_PROVIDER_FACTORY(parentIntl) {
  84. return parentIntl || new MatStepperIntl();
  85. }
  86. /**
  87. * \@docs-private
  88. * @type {?}
  89. */
  90. var MAT_STEPPER_INTL_PROVIDER = {
  91. provide: MatStepperIntl,
  92. deps: [[new core.Optional(), new core.SkipSelf(), MatStepperIntl]],
  93. useFactory: MAT_STEPPER_INTL_PROVIDER_FACTORY
  94. };
  95. /**
  96. * @fileoverview added by tsickle
  97. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  98. */
  99. var MatStepHeader = /** @class */ (function (_super) {
  100. __extends(MatStepHeader, _super);
  101. function MatStepHeader(_intl, _focusMonitor, _elementRef, changeDetectorRef) {
  102. var _this = _super.call(this, _elementRef) || this;
  103. _this._intl = _intl;
  104. _this._focusMonitor = _focusMonitor;
  105. _focusMonitor.monitor(_elementRef, true);
  106. _this._intlSubscription = _intl.changes.subscribe((/**
  107. * @return {?}
  108. */
  109. function () { return changeDetectorRef.markForCheck(); }));
  110. return _this;
  111. }
  112. /**
  113. * @return {?}
  114. */
  115. MatStepHeader.prototype.ngOnDestroy = /**
  116. * @return {?}
  117. */
  118. function () {
  119. this._intlSubscription.unsubscribe();
  120. this._focusMonitor.stopMonitoring(this._elementRef);
  121. };
  122. /** Focuses the step header. */
  123. /**
  124. * Focuses the step header.
  125. * @return {?}
  126. */
  127. MatStepHeader.prototype.focus = /**
  128. * Focuses the step header.
  129. * @return {?}
  130. */
  131. function () {
  132. this._focusMonitor.focusVia(this._elementRef, 'program');
  133. };
  134. /** Returns string label of given step if it is a text label. */
  135. /**
  136. * Returns string label of given step if it is a text label.
  137. * @return {?}
  138. */
  139. MatStepHeader.prototype._stringLabel = /**
  140. * Returns string label of given step if it is a text label.
  141. * @return {?}
  142. */
  143. function () {
  144. return this.label instanceof MatStepLabel ? null : this.label;
  145. };
  146. /** Returns MatStepLabel if the label of given step is a template label. */
  147. /**
  148. * Returns MatStepLabel if the label of given step is a template label.
  149. * @return {?}
  150. */
  151. MatStepHeader.prototype._templateLabel = /**
  152. * Returns MatStepLabel if the label of given step is a template label.
  153. * @return {?}
  154. */
  155. function () {
  156. return this.label instanceof MatStepLabel ? this.label : null;
  157. };
  158. /** Returns the host HTML element. */
  159. /**
  160. * Returns the host HTML element.
  161. * @return {?}
  162. */
  163. MatStepHeader.prototype._getHostElement = /**
  164. * Returns the host HTML element.
  165. * @return {?}
  166. */
  167. function () {
  168. return this._elementRef.nativeElement;
  169. };
  170. /** Template context variables that are exposed to the `matStepperIcon` instances. */
  171. /**
  172. * Template context variables that are exposed to the `matStepperIcon` instances.
  173. * @return {?}
  174. */
  175. MatStepHeader.prototype._getIconContext = /**
  176. * Template context variables that are exposed to the `matStepperIcon` instances.
  177. * @return {?}
  178. */
  179. function () {
  180. return {
  181. index: this.index,
  182. active: this.active,
  183. optional: this.optional
  184. };
  185. };
  186. /**
  187. * @param {?} state
  188. * @return {?}
  189. */
  190. MatStepHeader.prototype._getDefaultTextForState = /**
  191. * @param {?} state
  192. * @return {?}
  193. */
  194. function (state$$1) {
  195. if (state$$1 == 'number') {
  196. return "" + (this.index + 1);
  197. }
  198. if (state$$1 == 'edit') {
  199. return 'create';
  200. }
  201. if (state$$1 == 'error') {
  202. return 'warning';
  203. }
  204. return state$$1;
  205. };
  206. MatStepHeader.decorators = [
  207. { type: core.Component, args: [{selector: 'mat-step-header',
  208. template: "<div class=\"mat-step-header-ripple\" matRipple [matRippleTrigger]=\"_getHostElement()\" [matRippleDisabled]=\"disableRipple\"></div><div class=\"mat-step-icon-state-{{state}} mat-step-icon\" [class.mat-step-icon-selected]=\"selected\"><div class=\"mat-step-icon-content\" [ngSwitch]=\"!!(iconOverrides && iconOverrides[state])\"><ng-container *ngSwitchCase=\"true\" [ngTemplateOutlet]=\"iconOverrides[state]\" [ngTemplateOutletContext]=\"_getIconContext()\"></ng-container><ng-container *ngSwitchDefault [ngSwitch]=\"state\"><span *ngSwitchCase=\"'number'\">{{_getDefaultTextForState(state)}}</span><mat-icon *ngSwitchDefault>{{_getDefaultTextForState(state)}}</mat-icon></ng-container></div></div><div class=\"mat-step-label\" [class.mat-step-label-active]=\"active\" [class.mat-step-label-selected]=\"selected\" [class.mat-step-label-error]=\"state == 'error'\"><ng-container *ngIf=\"_templateLabel()\" [ngTemplateOutlet]=\"_templateLabel()!.template\"></ng-container><div class=\"mat-step-text-label\" *ngIf=\"_stringLabel()\">{{label}}</div><div class=\"mat-step-optional\" *ngIf=\"optional && state != 'error'\">{{_intl.optionalLabel}}</div><div class=\"mat-step-sub-label-error\" *ngIf=\"state == 'error'\">{{errorMessage}}</div></div>",
  209. styles: [".mat-step-header{overflow:hidden;outline:0;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:transparent}.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 .mat-icon,.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.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}"],
  210. host: {
  211. 'class': 'mat-step-header',
  212. 'role': 'tab',
  213. },
  214. encapsulation: core.ViewEncapsulation.None,
  215. changeDetection: core.ChangeDetectionStrategy.OnPush,
  216. },] },
  217. ];
  218. /** @nocollapse */
  219. MatStepHeader.ctorParameters = function () { return [
  220. { type: MatStepperIntl },
  221. { type: a11y.FocusMonitor },
  222. { type: core.ElementRef },
  223. { type: core.ChangeDetectorRef }
  224. ]; };
  225. MatStepHeader.propDecorators = {
  226. state: [{ type: core.Input }],
  227. label: [{ type: core.Input }],
  228. errorMessage: [{ type: core.Input }],
  229. iconOverrides: [{ type: core.Input }],
  230. index: [{ type: core.Input }],
  231. selected: [{ type: core.Input }],
  232. active: [{ type: core.Input }],
  233. optional: [{ type: core.Input }],
  234. disableRipple: [{ type: core.Input }]
  235. };
  236. return MatStepHeader;
  237. }(stepper.CdkStepHeader));
  238. /**
  239. * @fileoverview added by tsickle
  240. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  241. */
  242. /**
  243. * Animations used by the Material steppers.
  244. * \@docs-private
  245. * @type {?}
  246. */
  247. var matStepperAnimations = {
  248. /**
  249. * Animation that transitions the step along the X axis in a horizontal stepper.
  250. */
  251. horizontalStepTransition: animations.trigger('stepTransition', [
  252. animations.state('previous', animations.style({ transform: 'translate3d(-100%, 0, 0)', visibility: 'hidden' })),
  253. animations.state('current', animations.style({ transform: 'none', visibility: 'visible' })),
  254. animations.state('next', animations.style({ transform: 'translate3d(100%, 0, 0)', visibility: 'hidden' })),
  255. animations.transition('* => *', animations.animate('500ms cubic-bezier(0.35, 0, 0.25, 1)'))
  256. ]),
  257. /**
  258. * Animation that transitions the step along the Y axis in a vertical stepper.
  259. */
  260. verticalStepTransition: animations.trigger('stepTransition', [
  261. animations.state('previous', animations.style({ height: '0px', visibility: 'hidden' })),
  262. animations.state('next', animations.style({ height: '0px', visibility: 'hidden' })),
  263. animations.state('current', animations.style({ height: '*', visibility: 'visible' })),
  264. animations.transition('* <=> current', animations.animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)'))
  265. ])
  266. };
  267. /**
  268. * @fileoverview added by tsickle
  269. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  270. */
  271. /**
  272. * Template to be used to override the icons inside the step header.
  273. */
  274. var MatStepperIcon = /** @class */ (function () {
  275. function MatStepperIcon(templateRef) {
  276. this.templateRef = templateRef;
  277. }
  278. MatStepperIcon.decorators = [
  279. { type: core.Directive, args: [{
  280. selector: 'ng-template[matStepperIcon]',
  281. },] },
  282. ];
  283. /** @nocollapse */
  284. MatStepperIcon.ctorParameters = function () { return [
  285. { type: core.TemplateRef }
  286. ]; };
  287. MatStepperIcon.propDecorators = {
  288. name: [{ type: core.Input, args: ['matStepperIcon',] }]
  289. };
  290. return MatStepperIcon;
  291. }());
  292. /**
  293. * @fileoverview added by tsickle
  294. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  295. */
  296. var MatStep = /** @class */ (function (_super) {
  297. __extends(MatStep, _super);
  298. /** @breaking-change 8.0.0 remove the `?` after `stepperOptions` */
  299. function MatStep(stepper$$1, _errorStateMatcher, stepperOptions) {
  300. var _this = _super.call(this, stepper$$1, stepperOptions) || this;
  301. _this._errorStateMatcher = _errorStateMatcher;
  302. return _this;
  303. }
  304. /** Custom error state matcher that additionally checks for validity of interacted form. */
  305. /**
  306. * Custom error state matcher that additionally checks for validity of interacted form.
  307. * @param {?} control
  308. * @param {?} form
  309. * @return {?}
  310. */
  311. MatStep.prototype.isErrorState = /**
  312. * Custom error state matcher that additionally checks for validity of interacted form.
  313. * @param {?} control
  314. * @param {?} form
  315. * @return {?}
  316. */
  317. function (control, form) {
  318. /** @type {?} */
  319. var originalErrorState = this._errorStateMatcher.isErrorState(control, form);
  320. // Custom error state checks for the validity of form that is not submitted or touched
  321. // since user can trigger a form change by calling for another step without directly
  322. // interacting with the current form.
  323. /** @type {?} */
  324. var customErrorState = !!(control && control.invalid && this.interacted);
  325. return originalErrorState || customErrorState;
  326. };
  327. MatStep.decorators = [
  328. { type: core.Component, args: [{selector: 'mat-step',
  329. template: "<ng-template><ng-content></ng-content></ng-template>",
  330. providers: [{ provide: core$1.ErrorStateMatcher, useExisting: MatStep }],
  331. encapsulation: core.ViewEncapsulation.None,
  332. exportAs: 'matStep',
  333. changeDetection: core.ChangeDetectionStrategy.OnPush,
  334. },] },
  335. ];
  336. /** @nocollapse */
  337. MatStep.ctorParameters = function () { return [
  338. { type: MatStepper, decorators: [{ type: core.Inject, args: [core.forwardRef((/**
  339. * @return {?}
  340. */
  341. function () { return MatStepper; })),] }] },
  342. { type: core$1.ErrorStateMatcher, decorators: [{ type: core.SkipSelf }] },
  343. { type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [stepper.STEPPER_GLOBAL_OPTIONS,] }] }
  344. ]; };
  345. MatStep.propDecorators = {
  346. stepLabel: [{ type: core.ContentChild, args: [MatStepLabel, { static: false },] }]
  347. };
  348. return MatStep;
  349. }(stepper.CdkStep));
  350. var MatStepper = /** @class */ (function (_super) {
  351. __extends(MatStepper, _super);
  352. function MatStepper() {
  353. var _this = _super !== null && _super.apply(this, arguments) || this;
  354. /**
  355. * Event emitted when the current step is done transitioning in.
  356. */
  357. _this.animationDone = new core.EventEmitter();
  358. /**
  359. * Consumer-specified template-refs to be used to override the header icons.
  360. */
  361. _this._iconOverrides = {};
  362. /**
  363. * Stream of animation `done` events when the body expands/collapses.
  364. */
  365. _this._animationDone = new rxjs.Subject();
  366. return _this;
  367. }
  368. /**
  369. * @return {?}
  370. */
  371. MatStepper.prototype.ngAfterContentInit = /**
  372. * @return {?}
  373. */
  374. function () {
  375. var _this = this;
  376. this._icons.forEach((/**
  377. * @param {?} __0
  378. * @return {?}
  379. */
  380. function (_a) {
  381. var name = _a.name, templateRef = _a.templateRef;
  382. return _this._iconOverrides[name] = templateRef;
  383. }));
  384. // Mark the component for change detection whenever the content children query changes
  385. this._steps.changes.pipe(operators.takeUntil(this._destroyed)).subscribe((/**
  386. * @return {?}
  387. */
  388. function () { return _this._stateChanged(); }));
  389. this._animationDone.pipe(
  390. // This needs a `distinctUntilChanged` in order to avoid emitting the same event twice due
  391. // to a bug in animations where the `.done` callback gets invoked twice on some browsers.
  392. // See https://github.com/angular/angular/issues/24084
  393. operators.distinctUntilChanged((/**
  394. * @param {?} x
  395. * @param {?} y
  396. * @return {?}
  397. */
  398. function (x, y) { return x.fromState === y.fromState && x.toState === y.toState; })), operators.takeUntil(this._destroyed)).subscribe((/**
  399. * @param {?} event
  400. * @return {?}
  401. */
  402. function (event) {
  403. if (((/** @type {?} */ (event.toState))) === 'current') {
  404. _this.animationDone.emit();
  405. }
  406. }));
  407. };
  408. MatStepper.decorators = [
  409. { type: core.Directive, args: [{ selector: '[matStepper]', providers: [{ provide: stepper.CdkStepper, useExisting: MatStepper }] },] },
  410. ];
  411. MatStepper.propDecorators = {
  412. _stepHeader: [{ type: core.ViewChildren, args: [MatStepHeader,] }],
  413. _steps: [{ type: core.ContentChildren, args: [MatStep,] }],
  414. _icons: [{ type: core.ContentChildren, args: [MatStepperIcon,] }],
  415. animationDone: [{ type: core.Output }],
  416. disableRipple: [{ type: core.Input }]
  417. };
  418. return MatStepper;
  419. }(stepper.CdkStepper));
  420. var MatHorizontalStepper = /** @class */ (function (_super) {
  421. __extends(MatHorizontalStepper, _super);
  422. function MatHorizontalStepper() {
  423. var _this = _super !== null && _super.apply(this, arguments) || this;
  424. /**
  425. * Whether the label should display in bottom or end position.
  426. */
  427. _this.labelPosition = 'end';
  428. return _this;
  429. }
  430. MatHorizontalStepper.decorators = [
  431. { type: core.Component, args: [{selector: 'mat-horizontal-stepper',
  432. exportAs: 'matHorizontalStepper',
  433. template: "<div class=\"mat-horizontal-stepper-header-container\"><ng-container *ngFor=\"let step of steps; let i = index; let isLast = last\"><mat-step-header class=\"mat-horizontal-stepper-header\" (click)=\"step.select()\" (keydown)=\"_onKeydown($event)\" [tabIndex]=\"_getFocusIndex() === i ? 0 : -1\" [id]=\"_getStepLabelId(i)\" [attr.aria-posinset]=\"i + 1\" [attr.aria-setsize]=\"steps.length\" [attr.aria-controls]=\"_getStepContentId(i)\" [attr.aria-selected]=\"selectedIndex == i\" [attr.aria-label]=\"step.ariaLabel || null\" [attr.aria-labelledby]=\"(!step.ariaLabel && step.ariaLabelledby) ? step.ariaLabelledby : null\" [index]=\"i\" [state]=\"_getIndicatorType(i, step.state)\" [label]=\"step.stepLabel || step.label\" [selected]=\"selectedIndex === i\" [active]=\"step.completed || selectedIndex === i || !linear\" [optional]=\"step.optional\" [errorMessage]=\"step.errorMessage\" [iconOverrides]=\"_iconOverrides\" [disableRipple]=\"disableRipple\"></mat-step-header><div *ngIf=\"!isLast\" class=\"mat-stepper-horizontal-line\"></div></ng-container></div><div class=\"mat-horizontal-content-container\"><div *ngFor=\"let step of steps; let i = index\" [attr.tabindex]=\"selectedIndex === i ? 0 : null\" class=\"mat-horizontal-stepper-content\" role=\"tabpanel\" [@stepTransition]=\"_getAnimationDirection(i)\" (@stepTransition.done)=\"_animationDone.next($event)\" [id]=\"_getStepContentId(i)\" [attr.aria-labelledby]=\"_getStepLabelId(i)\" [attr.aria-expanded]=\"selectedIndex === i\"><ng-container [ngTemplateOutlet]=\"step.content\"></ng-container></div></div>",
  434. styles: [".mat-stepper-horizontal,.mat-stepper-vertical{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-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;top:36px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-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,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{border-top-width:1px;border-top-style:solid;content:'';display:inline-block;height:0;position:absolute;top:36px;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;padding:24px}.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:first-child::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before{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;padding:24px;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-content{outline:0}.mat-horizontal-stepper-content[aria-expanded=false]{height:0;overflow:hidden}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:'';position:absolute;top:-16px;bottom:-16px;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-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}"],
  435. inputs: ['selectedIndex'],
  436. host: {
  437. 'class': 'mat-stepper-horizontal',
  438. '[class.mat-stepper-label-position-end]': 'labelPosition == "end"',
  439. '[class.mat-stepper-label-position-bottom]': 'labelPosition == "bottom"',
  440. 'aria-orientation': 'horizontal',
  441. 'role': 'tablist',
  442. },
  443. animations: [matStepperAnimations.horizontalStepTransition],
  444. providers: [
  445. { provide: MatStepper, useExisting: MatHorizontalStepper },
  446. { provide: stepper.CdkStepper, useExisting: MatHorizontalStepper }
  447. ],
  448. encapsulation: core.ViewEncapsulation.None,
  449. changeDetection: core.ChangeDetectionStrategy.OnPush,
  450. },] },
  451. ];
  452. MatHorizontalStepper.propDecorators = {
  453. labelPosition: [{ type: core.Input }]
  454. };
  455. return MatHorizontalStepper;
  456. }(MatStepper));
  457. var MatVerticalStepper = /** @class */ (function (_super) {
  458. __extends(MatVerticalStepper, _super);
  459. function MatVerticalStepper(dir, changeDetectorRef,
  460. // @breaking-change 8.0.0 `elementRef` and `_document` parameters to become required.
  461. elementRef, _document) {
  462. var _this = _super.call(this, dir, changeDetectorRef, elementRef, _document) || this;
  463. _this._orientation = 'vertical';
  464. return _this;
  465. }
  466. MatVerticalStepper.decorators = [
  467. { type: core.Component, args: [{selector: 'mat-vertical-stepper',
  468. exportAs: 'matVerticalStepper',
  469. template: "<div class=\"mat-step\" *ngFor=\"let step of steps; let i = index; let isLast = last\"><mat-step-header class=\"mat-vertical-stepper-header\" (click)=\"step.select()\" (keydown)=\"_onKeydown($event)\" [tabIndex]=\"_getFocusIndex() == i ? 0 : -1\" [id]=\"_getStepLabelId(i)\" [attr.aria-posinset]=\"i + 1\" [attr.aria-setsize]=\"steps.length\" [attr.aria-controls]=\"_getStepContentId(i)\" [attr.aria-selected]=\"selectedIndex === i\" [attr.aria-label]=\"step.ariaLabel || null\" [attr.aria-labelledby]=\"(!step.ariaLabel && step.ariaLabelledby) ? step.ariaLabelledby : null\" [index]=\"i\" [state]=\"_getIndicatorType(i, step.state)\" [label]=\"step.stepLabel || step.label\" [selected]=\"selectedIndex === i\" [active]=\"step.completed || selectedIndex === i || !linear\" [optional]=\"step.optional\" [errorMessage]=\"step.errorMessage\" [iconOverrides]=\"_iconOverrides\" [disableRipple]=\"disableRipple\"></mat-step-header><div class=\"mat-vertical-content-container\" [class.mat-stepper-vertical-line]=\"!isLast\"><div class=\"mat-vertical-stepper-content\" role=\"tabpanel\" [attr.tabindex]=\"selectedIndex === i ? 0 : null\" [@stepTransition]=\"_getAnimationDirection(i)\" (@stepTransition.done)=\"_animationDone.next($event)\" [id]=\"_getStepContentId(i)\" [attr.aria-labelledby]=\"_getStepLabelId(i)\" [attr.aria-expanded]=\"selectedIndex === i\"><div class=\"mat-vertical-content\"><ng-container [ngTemplateOutlet]=\"step.content\"></ng-container></div></div></div></div>",
  470. styles: [".mat-stepper-horizontal,.mat-stepper-vertical{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-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;top:36px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-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,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{border-top-width:1px;border-top-style:solid;content:'';display:inline-block;height:0;position:absolute;top:36px;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;padding:24px}.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:first-child::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before{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;padding:24px;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-content{outline:0}.mat-horizontal-stepper-content[aria-expanded=false]{height:0;overflow:hidden}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:'';position:absolute;top:-16px;bottom:-16px;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-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}"],
  471. inputs: ['selectedIndex'],
  472. host: {
  473. 'class': 'mat-stepper-vertical',
  474. 'aria-orientation': 'vertical',
  475. 'role': 'tablist',
  476. },
  477. animations: [matStepperAnimations.verticalStepTransition],
  478. providers: [
  479. { provide: MatStepper, useExisting: MatVerticalStepper },
  480. { provide: stepper.CdkStepper, useExisting: MatVerticalStepper }
  481. ],
  482. encapsulation: core.ViewEncapsulation.None,
  483. changeDetection: core.ChangeDetectionStrategy.OnPush,
  484. },] },
  485. ];
  486. /** @nocollapse */
  487. MatVerticalStepper.ctorParameters = function () { return [
  488. { type: bidi.Directionality, decorators: [{ type: core.Optional }] },
  489. { type: core.ChangeDetectorRef },
  490. { type: core.ElementRef },
  491. { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
  492. ]; };
  493. return MatVerticalStepper;
  494. }(MatStepper));
  495. /**
  496. * @fileoverview added by tsickle
  497. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  498. */
  499. /**
  500. * Button that moves to the next step in a stepper workflow.
  501. */
  502. var MatStepperNext = /** @class */ (function (_super) {
  503. __extends(MatStepperNext, _super);
  504. function MatStepperNext() {
  505. return _super !== null && _super.apply(this, arguments) || this;
  506. }
  507. MatStepperNext.decorators = [
  508. { type: core.Directive, args: [{
  509. selector: 'button[matStepperNext]',
  510. host: {
  511. '[type]': 'type',
  512. },
  513. inputs: ['type']
  514. },] },
  515. ];
  516. return MatStepperNext;
  517. }(stepper.CdkStepperNext));
  518. /**
  519. * Button that moves to the previous step in a stepper workflow.
  520. */
  521. var MatStepperPrevious = /** @class */ (function (_super) {
  522. __extends(MatStepperPrevious, _super);
  523. function MatStepperPrevious() {
  524. return _super !== null && _super.apply(this, arguments) || this;
  525. }
  526. MatStepperPrevious.decorators = [
  527. { type: core.Directive, args: [{
  528. selector: 'button[matStepperPrevious]',
  529. host: {
  530. '[type]': 'type',
  531. },
  532. inputs: ['type']
  533. },] },
  534. ];
  535. return MatStepperPrevious;
  536. }(stepper.CdkStepperPrevious));
  537. /**
  538. * @fileoverview added by tsickle
  539. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  540. */
  541. var MatStepperModule = /** @class */ (function () {
  542. function MatStepperModule() {
  543. }
  544. MatStepperModule.decorators = [
  545. { type: core.NgModule, args: [{
  546. imports: [
  547. core$1.MatCommonModule,
  548. common.CommonModule,
  549. portal.PortalModule,
  550. button.MatButtonModule,
  551. stepper.CdkStepperModule,
  552. icon.MatIconModule,
  553. core$1.MatRippleModule,
  554. ],
  555. exports: [
  556. core$1.MatCommonModule,
  557. MatHorizontalStepper,
  558. MatVerticalStepper,
  559. MatStep,
  560. MatStepLabel,
  561. MatStepper,
  562. MatStepperNext,
  563. MatStepperPrevious,
  564. MatStepHeader,
  565. MatStepperIcon,
  566. ],
  567. declarations: [
  568. MatHorizontalStepper,
  569. MatVerticalStepper,
  570. MatStep,
  571. MatStepLabel,
  572. MatStepper,
  573. MatStepperNext,
  574. MatStepperPrevious,
  575. MatStepHeader,
  576. MatStepperIcon,
  577. ],
  578. providers: [MAT_STEPPER_INTL_PROVIDER, core$1.ErrorStateMatcher],
  579. },] },
  580. ];
  581. return MatStepperModule;
  582. }());
  583. exports.MatStepperModule = MatStepperModule;
  584. exports.MatStepLabel = MatStepLabel;
  585. exports.MatStep = MatStep;
  586. exports.MatStepper = MatStepper;
  587. exports.MatHorizontalStepper = MatHorizontalStepper;
  588. exports.MatVerticalStepper = MatVerticalStepper;
  589. exports.MatStepperNext = MatStepperNext;
  590. exports.MatStepperPrevious = MatStepperPrevious;
  591. exports.MatStepHeader = MatStepHeader;
  592. exports.MAT_STEPPER_INTL_PROVIDER_FACTORY = MAT_STEPPER_INTL_PROVIDER_FACTORY;
  593. exports.MatStepperIntl = MatStepperIntl;
  594. exports.MAT_STEPPER_INTL_PROVIDER = MAT_STEPPER_INTL_PROVIDER;
  595. exports.matStepperAnimations = matStepperAnimations;
  596. exports.MatStepperIcon = MatStepperIcon;
  597. Object.defineProperty(exports, '__esModule', { value: true });
  598. })));
  599. //# sourceMappingURL=material-stepper.umd.js.map