UNPKG

28.1 kBJavaScriptView Raw
1import { FocusKeyManager } from '@angular/cdk/a11y';
2import * as i1 from '@angular/cdk/bidi';
3import { BidiModule } from '@angular/cdk/bidi';
4import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
5import { hasModifierKey, SPACE, ENTER } from '@angular/cdk/keycodes';
6import * as i0 from '@angular/core';
7import { Directive, InjectionToken, EventEmitter, forwardRef, TemplateRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, Optional, ContentChild, ViewChild, Input, Output, QueryList, ContentChildren, NgModule } from '@angular/core';
8import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
9import { Subject, of } from 'rxjs';
10import { startWith, takeUntil } from 'rxjs/operators';
11
12/**
13 * @license
14 * Copyright Google LLC All Rights Reserved.
15 *
16 * Use of this source code is governed by an MIT-style license that can be
17 * found in the LICENSE file at https://angular.io/license
18 */
19class CdkStepHeader {
20 constructor(_elementRef) {
21 this._elementRef = _elementRef;
22 }
23 /** Focuses the step header. */
24 focus() {
25 this._elementRef.nativeElement.focus();
26 }
27}
28CdkStepHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStepHeader, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
29CdkStepHeader.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.1", type: CdkStepHeader, selector: "[cdkStepHeader]", host: { attributes: { "role": "tab" } }, ngImport: i0 });
30i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStepHeader, decorators: [{
31 type: Directive,
32 args: [{
33 selector: '[cdkStepHeader]',
34 host: {
35 'role': 'tab',
36 },
37 }]
38 }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
39
40/**
41 * @license
42 * Copyright Google LLC All Rights Reserved.
43 *
44 * Use of this source code is governed by an MIT-style license that can be
45 * found in the LICENSE file at https://angular.io/license
46 */
47class CdkStepLabel {
48 constructor(/** @docs-private */ template) {
49 this.template = template;
50 }
51}
52CdkStepLabel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStepLabel, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
53CdkStepLabel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.1", type: CdkStepLabel, selector: "[cdkStepLabel]", ngImport: i0 });
54i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStepLabel, decorators: [{
55 type: Directive,
56 args: [{
57 selector: '[cdkStepLabel]',
58 }]
59 }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
60
61/**
62 * @license
63 * Copyright Google LLC All Rights Reserved.
64 *
65 * Use of this source code is governed by an MIT-style license that can be
66 * found in the LICENSE file at https://angular.io/license
67 */
68/** Used to generate unique ID for each stepper component. */
69let nextId = 0;
70/** Change event emitted on selection changes. */
71class StepperSelectionEvent {
72}
73/** Enum to represent the different states of the steps. */
74const STEP_STATE = {
75 NUMBER: 'number',
76 EDIT: 'edit',
77 DONE: 'done',
78 ERROR: 'error',
79};
80/** InjectionToken that can be used to specify the global stepper options. */
81const STEPPER_GLOBAL_OPTIONS = new InjectionToken('STEPPER_GLOBAL_OPTIONS');
82class CdkStep {
83 constructor(_stepper, stepperOptions) {
84 this._stepper = _stepper;
85 /** Whether user has attempted to move away from the step. */
86 this.interacted = false;
87 /** Emits when the user has attempted to move away from the step. */
88 this.interactedStream = new EventEmitter();
89 this._editable = true;
90 this._optional = false;
91 this._completedOverride = null;
92 this._customError = null;
93 this._stepperOptions = stepperOptions ? stepperOptions : {};
94 this._displayDefaultIndicatorType = this._stepperOptions.displayDefaultIndicatorType !== false;
95 }
96 /** Whether the user can return to this step once it has been marked as completed. */
97 get editable() {
98 return this._editable;
99 }
100 set editable(value) {
101 this._editable = coerceBooleanProperty(value);
102 }
103 /** Whether the completion of step is optional. */
104 get optional() {
105 return this._optional;
106 }
107 set optional(value) {
108 this._optional = coerceBooleanProperty(value);
109 }
110 /** Whether step is marked as completed. */
111 get completed() {
112 return this._completedOverride == null ? this._getDefaultCompleted() : this._completedOverride;
113 }
114 set completed(value) {
115 this._completedOverride = coerceBooleanProperty(value);
116 }
117 _getDefaultCompleted() {
118 return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;
119 }
120 /** Whether step has an error. */
121 get hasError() {
122 return this._customError == null ? this._getDefaultError() : this._customError;
123 }
124 set hasError(value) {
125 this._customError = coerceBooleanProperty(value);
126 }
127 _getDefaultError() {
128 return this.stepControl && this.stepControl.invalid && this.interacted;
129 }
130 /** Selects this step component. */
131 select() {
132 this._stepper.selected = this;
133 }
134 /** Resets the step to its initial state. Note that this includes resetting form data. */
135 reset() {
136 this.interacted = false;
137 if (this._completedOverride != null) {
138 this._completedOverride = false;
139 }
140 if (this._customError != null) {
141 this._customError = false;
142 }
143 if (this.stepControl) {
144 this.stepControl.reset();
145 }
146 }
147 ngOnChanges() {
148 // Since basically all inputs of the MatStep get proxied through the view down to the
149 // underlying MatStepHeader, we have to make sure that change detection runs correctly.
150 this._stepper._stateChanged();
151 }
152 _markAsInteracted() {
153 if (!this.interacted) {
154 this.interacted = true;
155 this.interactedStream.emit(this);
156 }
157 }
158 /** Determines whether the error state can be shown. */
159 _showError() {
160 // We want to show the error state either if the user opted into/out of it using the
161 // global options, or if they've explicitly set it through the `hasError` input.
162 return this._stepperOptions.showError ?? this._customError != null;
163 }
164}
165CdkStep.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStep, deps: [{ token: forwardRef(() => CdkStepper) }, { token: STEPPER_GLOBAL_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
166CdkStep.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.1", type: CdkStep, selector: "cdk-step", inputs: { stepControl: "stepControl", label: "label", errorMessage: "errorMessage", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], state: "state", editable: "editable", optional: "optional", completed: "completed", hasError: "hasError" }, outputs: { interactedStream: "interacted" }, queries: [{ propertyName: "stepLabel", first: true, predicate: CdkStepLabel, descendants: true }], viewQueries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true, static: true }], exportAs: ["cdkStep"], usesOnChanges: true, ngImport: i0, template: '<ng-template><ng-content></ng-content></ng-template>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
167i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStep, decorators: [{
168 type: Component,
169 args: [{
170 selector: 'cdk-step',
171 exportAs: 'cdkStep',
172 template: '<ng-template><ng-content></ng-content></ng-template>',
173 encapsulation: ViewEncapsulation.None,
174 changeDetection: ChangeDetectionStrategy.OnPush,
175 }]
176 }], ctorParameters: function () { return [{ type: CdkStepper, decorators: [{
177 type: Inject,
178 args: [forwardRef(() => CdkStepper)]
179 }] }, { type: undefined, decorators: [{
180 type: Optional
181 }, {
182 type: Inject,
183 args: [STEPPER_GLOBAL_OPTIONS]
184 }] }]; }, propDecorators: { stepLabel: [{
185 type: ContentChild,
186 args: [CdkStepLabel]
187 }], content: [{
188 type: ViewChild,
189 args: [TemplateRef, { static: true }]
190 }], stepControl: [{
191 type: Input
192 }], interactedStream: [{
193 type: Output,
194 args: ['interacted']
195 }], label: [{
196 type: Input
197 }], errorMessage: [{
198 type: Input
199 }], ariaLabel: [{
200 type: Input,
201 args: ['aria-label']
202 }], ariaLabelledby: [{
203 type: Input,
204 args: ['aria-labelledby']
205 }], state: [{
206 type: Input
207 }], editable: [{
208 type: Input
209 }], optional: [{
210 type: Input
211 }], completed: [{
212 type: Input
213 }], hasError: [{
214 type: Input
215 }] } });
216class CdkStepper {
217 constructor(_dir, _changeDetectorRef, _elementRef) {
218 this._dir = _dir;
219 this._changeDetectorRef = _changeDetectorRef;
220 this._elementRef = _elementRef;
221 /** Emits when the component is destroyed. */
222 this._destroyed = new Subject();
223 /** Steps that belong to the current stepper, excluding ones from nested steppers. */
224 this.steps = new QueryList();
225 /** List of step headers sorted based on their DOM order. */
226 this._sortedHeaders = new QueryList();
227 this._linear = false;
228 this._selectedIndex = 0;
229 /** Event emitted when the selected step has changed. */
230 this.selectionChange = new EventEmitter();
231 this._orientation = 'horizontal';
232 this._groupId = nextId++;
233 }
234 /** Whether the validity of previous steps should be checked or not. */
235 get linear() {
236 return this._linear;
237 }
238 set linear(value) {
239 this._linear = coerceBooleanProperty(value);
240 }
241 /** The index of the selected step. */
242 get selectedIndex() {
243 return this._selectedIndex;
244 }
245 set selectedIndex(index) {
246 const newIndex = coerceNumberProperty(index);
247 if (this.steps && this._steps) {
248 // Ensure that the index can't be out of bounds.
249 if (!this._isValidIndex(newIndex) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
250 throw Error('cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.');
251 }
252 this.selected?._markAsInteracted();
253 if (this._selectedIndex !== newIndex &&
254 !this._anyControlsInvalidOrPending(newIndex) &&
255 (newIndex >= this._selectedIndex || this.steps.toArray()[newIndex].editable)) {
256 this._updateSelectedItemIndex(newIndex);
257 }
258 }
259 else {
260 this._selectedIndex = newIndex;
261 }
262 }
263 /** The step that is selected. */
264 get selected() {
265 return this.steps ? this.steps.toArray()[this.selectedIndex] : undefined;
266 }
267 set selected(step) {
268 this.selectedIndex = step && this.steps ? this.steps.toArray().indexOf(step) : -1;
269 }
270 /** Orientation of the stepper. */
271 get orientation() {
272 return this._orientation;
273 }
274 set orientation(value) {
275 // This is a protected method so that `MatStepper` can hook into it.
276 this._orientation = value;
277 if (this._keyManager) {
278 this._keyManager.withVerticalOrientation(value === 'vertical');
279 }
280 }
281 ngAfterContentInit() {
282 this._steps.changes
283 .pipe(startWith(this._steps), takeUntil(this._destroyed))
284 .subscribe((steps) => {
285 this.steps.reset(steps.filter(step => step._stepper === this));
286 this.steps.notifyOnChanges();
287 });
288 }
289 ngAfterViewInit() {
290 // If the step headers are defined outside of the `ngFor` that renders the steps, like in the
291 // Material stepper, they won't appear in the `QueryList` in the same order as they're
292 // rendered in the DOM which will lead to incorrect keyboard navigation. We need to sort
293 // them manually to ensure that they're correct. Alternatively, we can change the Material
294 // template to inline the headers in the `ngFor`, but that'll result in a lot of
295 // code duplication. See #23539.
296 this._stepHeader.changes
297 .pipe(startWith(this._stepHeader), takeUntil(this._destroyed))
298 .subscribe((headers) => {
299 this._sortedHeaders.reset(headers.toArray().sort((a, b) => {
300 const documentPosition = a._elementRef.nativeElement.compareDocumentPosition(b._elementRef.nativeElement);
301 // `compareDocumentPosition` returns a bitmask so we have to use a bitwise operator.
302 // https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
303 // tslint:disable-next-line:no-bitwise
304 return documentPosition & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
305 }));
306 this._sortedHeaders.notifyOnChanges();
307 });
308 // Note that while the step headers are content children by default, any components that
309 // extend this one might have them as view children. We initialize the keyboard handling in
310 // AfterViewInit so we're guaranteed for both view and content children to be defined.
311 this._keyManager = new FocusKeyManager(this._sortedHeaders)
312 .withWrap()
313 .withHomeAndEnd()
314 .withVerticalOrientation(this._orientation === 'vertical');
315 (this._dir ? this._dir.change : of())
316 .pipe(startWith(this._layoutDirection()), takeUntil(this._destroyed))
317 .subscribe(direction => this._keyManager.withHorizontalOrientation(direction));
318 this._keyManager.updateActiveItem(this._selectedIndex);
319 // No need to `takeUntil` here, because we're the ones destroying `steps`.
320 this.steps.changes.subscribe(() => {
321 if (!this.selected) {
322 this._selectedIndex = Math.max(this._selectedIndex - 1, 0);
323 }
324 });
325 // The logic which asserts that the selected index is within bounds doesn't run before the
326 // steps are initialized, because we don't how many steps there are yet so we may have an
327 // invalid index on init. If that's the case, auto-correct to the default so we don't throw.
328 if (!this._isValidIndex(this._selectedIndex)) {
329 this._selectedIndex = 0;
330 }
331 }
332 ngOnDestroy() {
333 this.steps.destroy();
334 this._sortedHeaders.destroy();
335 this._destroyed.next();
336 this._destroyed.complete();
337 }
338 /** Selects and focuses the next step in list. */
339 next() {
340 this.selectedIndex = Math.min(this._selectedIndex + 1, this.steps.length - 1);
341 }
342 /** Selects and focuses the previous step in list. */
343 previous() {
344 this.selectedIndex = Math.max(this._selectedIndex - 1, 0);
345 }
346 /** Resets the stepper to its initial state. Note that this includes clearing form data. */
347 reset() {
348 this._updateSelectedItemIndex(0);
349 this.steps.forEach(step => step.reset());
350 this._stateChanged();
351 }
352 /** Returns a unique id for each step label element. */
353 _getStepLabelId(i) {
354 return `cdk-step-label-${this._groupId}-${i}`;
355 }
356 /** Returns unique id for each step content element. */
357 _getStepContentId(i) {
358 return `cdk-step-content-${this._groupId}-${i}`;
359 }
360 /** Marks the component to be change detected. */
361 _stateChanged() {
362 this._changeDetectorRef.markForCheck();
363 }
364 /** Returns position state of the step with the given index. */
365 _getAnimationDirection(index) {
366 const position = index - this._selectedIndex;
367 if (position < 0) {
368 return this._layoutDirection() === 'rtl' ? 'next' : 'previous';
369 }
370 else if (position > 0) {
371 return this._layoutDirection() === 'rtl' ? 'previous' : 'next';
372 }
373 return 'current';
374 }
375 /** Returns the type of icon to be displayed. */
376 _getIndicatorType(index, state = STEP_STATE.NUMBER) {
377 const step = this.steps.toArray()[index];
378 const isCurrentStep = this._isCurrentStep(index);
379 return step._displayDefaultIndicatorType
380 ? this._getDefaultIndicatorLogic(step, isCurrentStep)
381 : this._getGuidelineLogic(step, isCurrentStep, state);
382 }
383 _getDefaultIndicatorLogic(step, isCurrentStep) {
384 if (step._showError() && step.hasError && !isCurrentStep) {
385 return STEP_STATE.ERROR;
386 }
387 else if (!step.completed || isCurrentStep) {
388 return STEP_STATE.NUMBER;
389 }
390 else {
391 return step.editable ? STEP_STATE.EDIT : STEP_STATE.DONE;
392 }
393 }
394 _getGuidelineLogic(step, isCurrentStep, state = STEP_STATE.NUMBER) {
395 if (step._showError() && step.hasError && !isCurrentStep) {
396 return STEP_STATE.ERROR;
397 }
398 else if (step.completed && !isCurrentStep) {
399 return STEP_STATE.DONE;
400 }
401 else if (step.completed && isCurrentStep) {
402 return state;
403 }
404 else if (step.editable && isCurrentStep) {
405 return STEP_STATE.EDIT;
406 }
407 else {
408 return state;
409 }
410 }
411 _isCurrentStep(index) {
412 return this._selectedIndex === index;
413 }
414 /** Returns the index of the currently-focused step header. */
415 _getFocusIndex() {
416 return this._keyManager ? this._keyManager.activeItemIndex : this._selectedIndex;
417 }
418 _updateSelectedItemIndex(newIndex) {
419 const stepsArray = this.steps.toArray();
420 this.selectionChange.emit({
421 selectedIndex: newIndex,
422 previouslySelectedIndex: this._selectedIndex,
423 selectedStep: stepsArray[newIndex],
424 previouslySelectedStep: stepsArray[this._selectedIndex],
425 });
426 // If focus is inside the stepper, move it to the next header, otherwise it may become
427 // lost when the active step content is hidden. We can't be more granular with the check
428 // (e.g. checking whether focus is inside the active step), because we don't have a
429 // reference to the elements that are rendering out the content.
430 this._containsFocus()
431 ? this._keyManager.setActiveItem(newIndex)
432 : this._keyManager.updateActiveItem(newIndex);
433 this._selectedIndex = newIndex;
434 this._stateChanged();
435 }
436 _onKeydown(event) {
437 const hasModifier = hasModifierKey(event);
438 const keyCode = event.keyCode;
439 const manager = this._keyManager;
440 if (manager.activeItemIndex != null &&
441 !hasModifier &&
442 (keyCode === SPACE || keyCode === ENTER)) {
443 this.selectedIndex = manager.activeItemIndex;
444 event.preventDefault();
445 }
446 else {
447 manager.onKeydown(event);
448 }
449 }
450 _anyControlsInvalidOrPending(index) {
451 if (this._linear && index >= 0) {
452 return this.steps
453 .toArray()
454 .slice(0, index)
455 .some(step => {
456 const control = step.stepControl;
457 const isIncomplete = control
458 ? control.invalid || control.pending || !step.interacted
459 : !step.completed;
460 return isIncomplete && !step.optional && !step._completedOverride;
461 });
462 }
463 return false;
464 }
465 _layoutDirection() {
466 return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
467 }
468 /** Checks whether the stepper contains the focused element. */
469 _containsFocus() {
470 const stepperElement = this._elementRef.nativeElement;
471 const focusedElement = _getFocusedElementPierceShadowDom();
472 return stepperElement === focusedElement || stepperElement.contains(focusedElement);
473 }
474 /** Checks whether the passed-in index is a valid step index. */
475 _isValidIndex(index) {
476 return index > -1 && (!this.steps || index < this.steps.length);
477 }
478}
479CdkStepper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStepper, deps: [{ token: i1.Directionality, optional: true }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
480CdkStepper.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.1", type: CdkStepper, selector: "[cdkStepper]", inputs: { linear: "linear", selectedIndex: "selectedIndex", selected: "selected", orientation: "orientation" }, outputs: { selectionChange: "selectionChange" }, queries: [{ propertyName: "_steps", predicate: CdkStep, descendants: true }, { propertyName: "_stepHeader", predicate: CdkStepHeader, descendants: true }], exportAs: ["cdkStepper"], ngImport: i0 });
481i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStepper, decorators: [{
482 type: Directive,
483 args: [{
484 selector: '[cdkStepper]',
485 exportAs: 'cdkStepper',
486 }]
487 }], ctorParameters: function () { return [{ type: i1.Directionality, decorators: [{
488 type: Optional
489 }] }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { _steps: [{
490 type: ContentChildren,
491 args: [CdkStep, { descendants: true }]
492 }], _stepHeader: [{
493 type: ContentChildren,
494 args: [CdkStepHeader, { descendants: true }]
495 }], linear: [{
496 type: Input
497 }], selectedIndex: [{
498 type: Input
499 }], selected: [{
500 type: Input
501 }], selectionChange: [{
502 type: Output
503 }], orientation: [{
504 type: Input
505 }] } });
506
507/**
508 * @license
509 * Copyright Google LLC All Rights Reserved.
510 *
511 * Use of this source code is governed by an MIT-style license that can be
512 * found in the LICENSE file at https://angular.io/license
513 */
514/** Button that moves to the next step in a stepper workflow. */
515class CdkStepperNext {
516 constructor(_stepper) {
517 this._stepper = _stepper;
518 /** Type of the next button. Defaults to "submit" if not specified. */
519 this.type = 'submit';
520 }
521}
522CdkStepperNext.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStepperNext, deps: [{ token: CdkStepper }], target: i0.ɵɵFactoryTarget.Directive });
523CdkStepperNext.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.1", type: CdkStepperNext, selector: "button[cdkStepperNext]", inputs: { type: "type" }, host: { listeners: { "click": "_stepper.next()" }, properties: { "type": "type" } }, ngImport: i0 });
524i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStepperNext, decorators: [{
525 type: Directive,
526 args: [{
527 selector: 'button[cdkStepperNext]',
528 host: {
529 '[type]': 'type',
530 '(click)': '_stepper.next()',
531 },
532 }]
533 }], ctorParameters: function () { return [{ type: CdkStepper }]; }, propDecorators: { type: [{
534 type: Input
535 }] } });
536/** Button that moves to the previous step in a stepper workflow. */
537class CdkStepperPrevious {
538 constructor(_stepper) {
539 this._stepper = _stepper;
540 /** Type of the previous button. Defaults to "button" if not specified. */
541 this.type = 'button';
542 }
543}
544CdkStepperPrevious.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStepperPrevious, deps: [{ token: CdkStepper }], target: i0.ɵɵFactoryTarget.Directive });
545CdkStepperPrevious.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.1", type: CdkStepperPrevious, selector: "button[cdkStepperPrevious]", inputs: { type: "type" }, host: { listeners: { "click": "_stepper.previous()" }, properties: { "type": "type" } }, ngImport: i0 });
546i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStepperPrevious, decorators: [{
547 type: Directive,
548 args: [{
549 selector: 'button[cdkStepperPrevious]',
550 host: {
551 '[type]': 'type',
552 '(click)': '_stepper.previous()',
553 },
554 }]
555 }], ctorParameters: function () { return [{ type: CdkStepper }]; }, propDecorators: { type: [{
556 type: Input
557 }] } });
558
559/**
560 * @license
561 * Copyright Google LLC All Rights Reserved.
562 *
563 * Use of this source code is governed by an MIT-style license that can be
564 * found in the LICENSE file at https://angular.io/license
565 */
566class CdkStepperModule {
567}
568CdkStepperModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStepperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
569CdkStepperModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.1", ngImport: i0, type: CdkStepperModule, declarations: [CdkStep,
570 CdkStepper,
571 CdkStepHeader,
572 CdkStepLabel,
573 CdkStepperNext,
574 CdkStepperPrevious], imports: [BidiModule], exports: [CdkStep, CdkStepper, CdkStepHeader, CdkStepLabel, CdkStepperNext, CdkStepperPrevious] });
575CdkStepperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStepperModule, imports: [BidiModule] });
576i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkStepperModule, decorators: [{
577 type: NgModule,
578 args: [{
579 imports: [BidiModule],
580 exports: [CdkStep, CdkStepper, CdkStepHeader, CdkStepLabel, CdkStepperNext, CdkStepperPrevious],
581 declarations: [
582 CdkStep,
583 CdkStepper,
584 CdkStepHeader,
585 CdkStepLabel,
586 CdkStepperNext,
587 CdkStepperPrevious,
588 ],
589 }]
590 }] });
591
592/**
593 * @license
594 * Copyright Google LLC All Rights Reserved.
595 *
596 * Use of this source code is governed by an MIT-style license that can be
597 * found in the LICENSE file at https://angular.io/license
598 */
599
600/**
601 * @license
602 * Copyright Google LLC All Rights Reserved.
603 *
604 * Use of this source code is governed by an MIT-style license that can be
605 * found in the LICENSE file at https://angular.io/license
606 */
607
608/**
609 * Generated bundle index. Do not edit.
610 */
611
612export { CdkStep, CdkStepHeader, CdkStepLabel, CdkStepper, CdkStepperModule, CdkStepperNext, CdkStepperPrevious, STEPPER_GLOBAL_OPTIONS, STEP_STATE, StepperSelectionEvent };
613//# sourceMappingURL=stepper.mjs.map