@angular/cdk 12.0.6 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/focus-monitor/focus-monitor.d.ts +25 -31
- package/a11y/index.metadata.json +1 -1
- package/a11y/input-modality/input-modality-detector.d.ts +105 -0
- package/a11y/public-api.d.ts +1 -0
- package/bundles/cdk-a11y.umd.js +296 -157
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +14 -11
- package/bundles/cdk-coercion.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.js +14 -11
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +14 -11
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +14 -11
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.js +14 -11
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +14 -11
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +9 -3
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-table.umd.js +14 -11
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.js +14 -11
- package/bundles/cdk-testing-protractor.umd.js.map +1 -1
- package/bundles/cdk-testing-selenium-webdriver.umd.js +14 -11
- package/bundles/cdk-testing-selenium-webdriver.umd.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.js +26 -17
- package/bundles/cdk-testing-testbed.umd.js.map +1 -1
- package/bundles/cdk-testing.umd.js +14 -11
- package/bundles/cdk-testing.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.js +14 -11
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/esm2015/a11y/focus-monitor/focus-monitor.js +81 -121
- package/esm2015/a11y/input-modality/input-modality-detector.js +179 -0
- package/esm2015/a11y/public-api.js +2 -1
- package/esm2015/stepper/stepper.js +10 -4
- package/esm2015/testing/testbed/fake-events/dispatch-events.js +3 -3
- package/esm2015/testing/testbed/fake-events/event-objects.js +5 -3
- package/esm2015/version.js +1 -1
- package/fesm2015/a11y.js +276 -149
- package/fesm2015/a11y.js.map +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/stepper.js +9 -3
- package/fesm2015/stepper.js.map +1 -1
- package/fesm2015/testing/testbed.js +6 -4
- package/fesm2015/testing/testbed.js.map +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/stepper/index.metadata.json +1 -1
- package/stepper/stepper.d.ts +2 -1
- package/testing/testbed/fake-events/dispatch-events.d.ts +1 -1
- package/testing/testbed/fake-events/event-objects.d.ts +1 -1
package/fesm2015/cdk.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Version } from '@angular/core';
|
|
|
8
8
|
* found in the LICENSE file at https://angular.io/license
|
|
9
9
|
*/
|
|
10
10
|
/** Current version of the Angular Component Development Kit. */
|
|
11
|
-
const VERSION = new Version('12.0
|
|
11
|
+
const VERSION = new Version('12.1.0');
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
package/fesm2015/cdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.js","sources":["../../../../../../src/cdk/version.ts","../../../../../../src/cdk/public-api.ts","../../../../../../src/cdk/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('12.0
|
|
1
|
+
{"version":3,"file":"cdk.js","sources":["../../../../../../src/cdk/version.ts","../../../../../../src/cdk/public-api.ts","../../../../../../src/cdk/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('12.1.0');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './version';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;ACXtD;;;;;;;;ACAA;;;;;;;;;;"}
|
package/fesm2015/stepper.js
CHANGED
|
@@ -90,7 +90,6 @@ class CdkStep {
|
|
|
90
90
|
this._customError = null;
|
|
91
91
|
this._stepperOptions = stepperOptions ? stepperOptions : {};
|
|
92
92
|
this._displayDefaultIndicatorType = this._stepperOptions.displayDefaultIndicatorType !== false;
|
|
93
|
-
this._showError = !!this._stepperOptions.showError;
|
|
94
93
|
}
|
|
95
94
|
/** Whether the user can return to this step once it has been marked as completed. */
|
|
96
95
|
get editable() {
|
|
@@ -154,6 +153,13 @@ class CdkStep {
|
|
|
154
153
|
this.interactedStream.emit(this);
|
|
155
154
|
}
|
|
156
155
|
}
|
|
156
|
+
/** Determines whether the error state can be shown. */
|
|
157
|
+
_showError() {
|
|
158
|
+
var _a;
|
|
159
|
+
// We want to show the error state either if the user opted into/out of it using the
|
|
160
|
+
// global options, or if they've explicitly set it through the `hasError` input.
|
|
161
|
+
return (_a = this._stepperOptions.showError) !== null && _a !== void 0 ? _a : this._customError != null;
|
|
162
|
+
}
|
|
157
163
|
}
|
|
158
164
|
CdkStep.decorators = [
|
|
159
165
|
{ type: Component, args: [{
|
|
@@ -332,7 +338,7 @@ class CdkStepper {
|
|
|
332
338
|
this._getGuidelineLogic(step, isCurrentStep, state);
|
|
333
339
|
}
|
|
334
340
|
_getDefaultIndicatorLogic(step, isCurrentStep) {
|
|
335
|
-
if (step._showError && step.hasError && !isCurrentStep) {
|
|
341
|
+
if (step._showError() && step.hasError && !isCurrentStep) {
|
|
336
342
|
return STEP_STATE.ERROR;
|
|
337
343
|
}
|
|
338
344
|
else if (!step.completed || isCurrentStep) {
|
|
@@ -343,7 +349,7 @@ class CdkStepper {
|
|
|
343
349
|
}
|
|
344
350
|
}
|
|
345
351
|
_getGuidelineLogic(step, isCurrentStep, state = STEP_STATE.NUMBER) {
|
|
346
|
-
if (step._showError && step.hasError && !isCurrentStep) {
|
|
352
|
+
if (step._showError() && step.hasError && !isCurrentStep) {
|
|
347
353
|
return STEP_STATE.ERROR;
|
|
348
354
|
}
|
|
349
355
|
else if (step.completed && !isCurrentStep) {
|
package/fesm2015/stepper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepper.js","sources":["../../../../../../src/cdk/stepper/step-header.ts","../../../../../../src/cdk/stepper/step-label.ts","../../../../../../src/cdk/stepper/stepper.ts","../../../../../../src/cdk/stepper/stepper-button.ts","../../../../../../src/cdk/stepper/stepper-module.ts","../../../../../../src/cdk/stepper/public-api.ts","../../../../../../src/cdk/stepper/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef} from '@angular/core';\nimport {FocusableOption} from '@angular/cdk/a11y';\n\n\n@Directive({\n selector: '[cdkStepHeader]',\n host: {\n 'role': 'tab',\n },\n})\nexport class CdkStepHeader implements FocusableOption {\n constructor(public _elementRef: ElementRef<HTMLElement>) {}\n\n /** Focuses the step header. */\n focus() {\n this._elementRef.nativeElement.focus();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, TemplateRef} from '@angular/core';\n\n@Directive({\n selector: '[cdkStepLabel]',\n})\nexport class CdkStepLabel {\n constructor(/** @docs-private */ public template: TemplateRef<any>) { }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusableOption, FocusKeyManager} from '@angular/cdk/a11y';\nimport {Direction, Directionality} from '@angular/cdk/bidi';\nimport {\n BooleanInput,\n coerceBooleanProperty,\n coerceNumberProperty,\n NumberInput\n} from '@angular/cdk/coercion';\nimport {ENTER, hasModifierKey, SPACE} from '@angular/cdk/keycodes';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n InjectionToken,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n AfterContentInit,\n} from '@angular/core';\nimport {Observable, of as observableOf, Subject} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\n\nimport {CdkStepHeader} from './step-header';\nimport {CdkStepLabel} from './step-label';\n\n/** Used to generate unique ID for each stepper component. */\nlet nextId = 0;\n\n/**\n * Position state of the content of each step in stepper that is used for transitioning\n * the content into correct position upon step selection change.\n */\nexport type StepContentPositionState = 'previous'|'current'|'next';\n\n/** Possible orientation of a stepper. */\nexport type StepperOrientation = 'horizontal'|'vertical';\n\n/** Change event emitted on selection changes. */\nexport class StepperSelectionEvent {\n /** Index of the step now selected. */\n selectedIndex: number;\n\n /** Index of the step previously selected. */\n previouslySelectedIndex: number;\n\n /** The step instance now selected. */\n selectedStep: CdkStep;\n\n /** The step instance previously selected. */\n previouslySelectedStep: CdkStep;\n}\n\n/** The state of each step. */\nexport type StepState = 'number'|'edit'|'done'|'error'|string;\n\n/** Enum to represent the different states of the steps. */\nexport const STEP_STATE = {\n NUMBER: 'number',\n EDIT: 'edit',\n DONE: 'done',\n ERROR: 'error'\n};\n\n/** InjectionToken that can be used to specify the global stepper options. */\nexport const STEPPER_GLOBAL_OPTIONS = new InjectionToken<StepperOptions>('STEPPER_GLOBAL_OPTIONS');\n\n/** Configurable options for stepper. */\nexport interface StepperOptions {\n /**\n * Whether the stepper should display an error state or not.\n * Default behavior is assumed to be false.\n */\n showError?: boolean;\n\n /**\n * Whether the stepper should display the default indicator type\n * or not.\n * Default behavior is assumed to be true.\n */\n displayDefaultIndicatorType?: boolean;\n}\n\n@Component({\n selector: 'cdk-step',\n exportAs: 'cdkStep',\n template: '<ng-template><ng-content></ng-content></ng-template>',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CdkStep implements OnChanges {\n private _stepperOptions: StepperOptions;\n _showError: boolean;\n _displayDefaultIndicatorType: boolean;\n\n /** Template for step label if it exists. */\n @ContentChild(CdkStepLabel) stepLabel: CdkStepLabel;\n\n /** Template for step content. */\n @ViewChild(TemplateRef, {static: true}) content: TemplateRef<any>;\n\n /** The top level abstract control of the step. */\n @Input() stepControl: AbstractControlLike;\n\n /** Whether user has attempted to move away from the step. */\n interacted = false;\n\n /** Emits when the user has attempted to move away from the step. */\n @Output('interacted')\n readonly interactedStream: EventEmitter<CdkStep> = new EventEmitter<CdkStep>();\n\n /** Plain text label of the step. */\n @Input() label: string;\n\n /** Error message to display when there's an error. */\n @Input() errorMessage: string;\n\n /** Aria label for the tab. */\n @Input('aria-label') ariaLabel: string;\n\n /**\n * Reference to the element that the tab is labelled by.\n * Will be cleared if `aria-label` is set at the same time.\n */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** State of the step. */\n @Input() state: StepState;\n\n /** Whether the user can return to this step once it has been marked as completed. */\n @Input()\n get editable(): boolean {\n return this._editable;\n }\n set editable(value: boolean) {\n this._editable = coerceBooleanProperty(value);\n }\n private _editable = true;\n\n /** Whether the completion of step is optional. */\n @Input()\n get optional(): boolean {\n return this._optional;\n }\n set optional(value: boolean) {\n this._optional = coerceBooleanProperty(value);\n }\n private _optional = false;\n\n /** Whether step is marked as completed. */\n @Input()\n get completed(): boolean {\n return this._completedOverride == null ? this._getDefaultCompleted() : this._completedOverride;\n }\n set completed(value: boolean) {\n this._completedOverride = coerceBooleanProperty(value);\n }\n _completedOverride: boolean|null = null;\n\n private _getDefaultCompleted() {\n return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;\n }\n\n /** Whether step has an error. */\n @Input()\n get hasError(): boolean {\n return this._customError == null ? this._getDefaultError() : this._customError;\n }\n set hasError(value: boolean) {\n this._customError = coerceBooleanProperty(value);\n }\n private _customError: boolean|null = null;\n\n private _getDefaultError() {\n return this.stepControl && this.stepControl.invalid && this.interacted;\n }\n\n constructor(\n @Inject(forwardRef(() => CdkStepper)) public _stepper: CdkStepper,\n @Optional() @Inject(STEPPER_GLOBAL_OPTIONS) stepperOptions?: StepperOptions) {\n this._stepperOptions = stepperOptions ? stepperOptions : {};\n this._displayDefaultIndicatorType = this._stepperOptions.displayDefaultIndicatorType !== false;\n this._showError = !!this._stepperOptions.showError;\n }\n\n /** Selects this step component. */\n select(): void {\n this._stepper.selected = this;\n }\n\n /** Resets the step to its initial state. Note that this includes resetting form data. */\n reset(): void {\n this.interacted = false;\n\n if (this._completedOverride != null) {\n this._completedOverride = false;\n }\n\n if (this._customError != null) {\n this._customError = false;\n }\n\n if (this.stepControl) {\n this.stepControl.reset();\n }\n }\n\n ngOnChanges() {\n // Since basically all inputs of the MatStep get proxied through the view down to the\n // underlying MatStepHeader, we have to make sure that change detection runs correctly.\n this._stepper._stateChanged();\n }\n\n _markAsInteracted() {\n if (!this.interacted) {\n this.interacted = true;\n this.interactedStream.emit(this);\n }\n }\n\n static ngAcceptInputType_editable: BooleanInput;\n static ngAcceptInputType_hasError: BooleanInput;\n static ngAcceptInputType_optional: BooleanInput;\n static ngAcceptInputType_completed: BooleanInput;\n}\n\n@Directive({\n selector: '[cdkStepper]',\n exportAs: 'cdkStepper',\n})\nexport class CdkStepper implements AfterContentInit, AfterViewInit, OnDestroy {\n /** Emits when the component is destroyed. */\n protected readonly _destroyed = new Subject<void>();\n\n /** Used for managing keyboard focus. */\n private _keyManager: FocusKeyManager<FocusableOption>;\n\n private _document: Document;\n\n /** Full list of steps inside the stepper, including inside nested steppers. */\n @ContentChildren(CdkStep, {descendants: true}) _steps: QueryList<CdkStep>;\n\n /** Steps that belong to the current stepper, excluding ones from nested steppers. */\n readonly steps: QueryList<CdkStep> = new QueryList<CdkStep>();\n\n /** The list of step headers of the steps in the stepper. */\n @ContentChildren(CdkStepHeader, {descendants: true}) _stepHeader: QueryList<CdkStepHeader>;\n\n /** Whether the validity of previous steps should be checked or not. */\n @Input()\n get linear(): boolean {\n return this._linear;\n }\n set linear(value: boolean) {\n this._linear = coerceBooleanProperty(value);\n }\n private _linear = false;\n\n /** The index of the selected step. */\n @Input()\n get selectedIndex() {\n return this._selectedIndex;\n }\n set selectedIndex(index: number) {\n const newIndex = coerceNumberProperty(index);\n\n if (this.steps && this._steps) {\n // Ensure that the index can't be out of bounds.\n if (!this._isValidIndex(index) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.');\n }\n\n this.selected?._markAsInteracted();\n\n if (this._selectedIndex !== newIndex && !this._anyControlsInvalidOrPending(newIndex) &&\n (newIndex >= this._selectedIndex || this.steps.toArray()[newIndex].editable)) {\n this._updateSelectedItemIndex(index);\n }\n } else {\n this._selectedIndex = newIndex;\n }\n }\n private _selectedIndex = 0;\n\n /** The step that is selected. */\n @Input()\n get selected(): CdkStep | undefined {\n return this.steps ? this.steps.toArray()[this.selectedIndex] : undefined;\n }\n set selected(step: CdkStep | undefined) {\n this.selectedIndex = (step && this.steps) ? this.steps.toArray().indexOf(step) : -1;\n }\n\n /** Event emitted when the selected step has changed. */\n @Output() readonly selectionChange = new EventEmitter<StepperSelectionEvent>();\n\n /** Used to track unique ID for each stepper component. */\n _groupId: number;\n\n /** Orientation of the stepper. */\n @Input()\n get orientation(): StepperOrientation { return this._orientation; }\n set orientation(value: StepperOrientation) {\n // This is a protected method so that `MatSteppter` can hook into it.\n this._orientation = value;\n\n if (this._keyManager) {\n this._keyManager.withVerticalOrientation(value === 'vertical');\n }\n }\n\n /**\n * @deprecated To be turned into a private property. Use `orientation` instead.\n * @breaking-change 13.0.0\n */\n protected _orientation: StepperOrientation = 'horizontal';\n\n constructor(\n @Optional() private _dir: Directionality, private _changeDetectorRef: ChangeDetectorRef,\n private _elementRef: ElementRef<HTMLElement>, @Inject(DOCUMENT) _document: any) {\n this._groupId = nextId++;\n this._document = _document;\n }\n\n ngAfterContentInit() {\n this._steps.changes\n .pipe(startWith(this._steps), takeUntil(this._destroyed))\n .subscribe((steps: QueryList<CdkStep>) => {\n this.steps.reset(steps.filter(step => step._stepper === this));\n this.steps.notifyOnChanges();\n });\n }\n\n ngAfterViewInit() {\n // Note that while the step headers are content children by default, any components that\n // extend this one might have them as view children. We initialize the keyboard handling in\n // AfterViewInit so we're guaranteed for both view and content children to be defined.\n this._keyManager = new FocusKeyManager<FocusableOption>(this._stepHeader)\n .withWrap()\n .withHomeAndEnd()\n .withVerticalOrientation(this._orientation === 'vertical');\n\n (this._dir ? (this._dir.change as Observable<Direction>) : observableOf<Direction>())\n .pipe(startWith(this._layoutDirection()), takeUntil(this._destroyed))\n .subscribe(direction => this._keyManager.withHorizontalOrientation(direction));\n\n this._keyManager.updateActiveItem(this._selectedIndex);\n\n // No need to `takeUntil` here, because we're the ones destroying `steps`.\n this.steps.changes.subscribe(() => {\n if (!this.selected) {\n this._selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n });\n\n // The logic which asserts that the selected index is within bounds doesn't run before the\n // steps are initialized, because we don't how many steps there are yet so we may have an\n // invalid index on init. If that's the case, auto-correct to the default so we don't throw.\n if (!this._isValidIndex(this._selectedIndex)) {\n this._selectedIndex = 0;\n }\n }\n\n ngOnDestroy() {\n this.steps.destroy();\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Selects and focuses the next step in list. */\n next(): void {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this.steps.length - 1);\n }\n\n /** Selects and focuses the previous step in list. */\n previous(): void {\n this.selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n\n /** Resets the stepper to its initial state. Note that this includes clearing form data. */\n reset(): void {\n this._updateSelectedItemIndex(0);\n this.steps.forEach(step => step.reset());\n this._stateChanged();\n }\n\n /** Returns a unique id for each step label element. */\n _getStepLabelId(i: number): string {\n return `cdk-step-label-${this._groupId}-${i}`;\n }\n\n /** Returns unique id for each step content element. */\n _getStepContentId(i: number): string {\n return `cdk-step-content-${this._groupId}-${i}`;\n }\n\n /** Marks the component to be change detected. */\n _stateChanged() {\n this._changeDetectorRef.markForCheck();\n }\n\n /** Returns position state of the step with the given index. */\n _getAnimationDirection(index: number): StepContentPositionState {\n const position = index - this._selectedIndex;\n if (position < 0) {\n return this._layoutDirection() === 'rtl' ? 'next' : 'previous';\n } else if (position > 0) {\n return this._layoutDirection() === 'rtl' ? 'previous' : 'next';\n }\n return 'current';\n }\n\n /** Returns the type of icon to be displayed. */\n _getIndicatorType(index: number, state: StepState = STEP_STATE.NUMBER): StepState {\n const step = this.steps.toArray()[index];\n const isCurrentStep = this._isCurrentStep(index);\n\n return step._displayDefaultIndicatorType ? this._getDefaultIndicatorLogic(step, isCurrentStep) :\n this._getGuidelineLogic(step, isCurrentStep, state);\n }\n\n private _getDefaultIndicatorLogic(step: CdkStep, isCurrentStep: boolean): StepState {\n if (step._showError && step.hasError && !isCurrentStep) {\n return STEP_STATE.ERROR;\n } else if (!step.completed || isCurrentStep) {\n return STEP_STATE.NUMBER;\n } else {\n return step.editable ? STEP_STATE.EDIT : STEP_STATE.DONE;\n }\n }\n\n private _getGuidelineLogic(\n step: CdkStep, isCurrentStep: boolean, state: StepState = STEP_STATE.NUMBER): StepState {\n if (step._showError && step.hasError && !isCurrentStep) {\n return STEP_STATE.ERROR;\n } else if (step.completed && !isCurrentStep) {\n return STEP_STATE.DONE;\n } else if (step.completed && isCurrentStep) {\n return state;\n } else if (step.editable && isCurrentStep) {\n return STEP_STATE.EDIT;\n } else {\n return state;\n }\n }\n\n private _isCurrentStep(index: number) {\n return this._selectedIndex === index;\n }\n\n /** Returns the index of the currently-focused step header. */\n _getFocusIndex() {\n return this._keyManager ? this._keyManager.activeItemIndex : this._selectedIndex;\n }\n\n private _updateSelectedItemIndex(newIndex: number): void {\n const stepsArray = this.steps.toArray();\n this.selectionChange.emit({\n selectedIndex: newIndex,\n previouslySelectedIndex: this._selectedIndex,\n selectedStep: stepsArray[newIndex],\n previouslySelectedStep: stepsArray[this._selectedIndex],\n });\n\n // If focus is inside the stepper, move it to the next header, otherwise it may become\n // lost when the active step content is hidden. We can't be more granular with the check\n // (e.g. checking whether focus is inside the active step), because we don't have a\n // reference to the elements that are rendering out the content.\n this._containsFocus() ? this._keyManager.setActiveItem(newIndex) :\n this._keyManager.updateActiveItem(newIndex);\n\n this._selectedIndex = newIndex;\n this._stateChanged();\n }\n\n _onKeydown(event: KeyboardEvent) {\n const hasModifier = hasModifierKey(event);\n const keyCode = event.keyCode;\n const manager = this._keyManager;\n\n if (manager.activeItemIndex != null && !hasModifier &&\n (keyCode === SPACE || keyCode === ENTER)) {\n this.selectedIndex = manager.activeItemIndex;\n event.preventDefault();\n } else {\n manager.onKeydown(event);\n }\n }\n\n private _anyControlsInvalidOrPending(index: number): boolean {\n if (this._linear && index >= 0) {\n return this.steps.toArray().slice(0, index).some(step => {\n const control = step.stepControl;\n const isIncomplete =\n control ? (control.invalid || control.pending || !step.interacted) : !step.completed;\n return isIncomplete && !step.optional && !step._completedOverride;\n });\n }\n\n return false;\n }\n\n private _layoutDirection(): Direction {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n\n /** Checks whether the stepper contains the focused element. */\n private _containsFocus(): boolean {\n const stepperElement = this._elementRef.nativeElement;\n const focusedElement = this._document.activeElement;\n return stepperElement === focusedElement || stepperElement.contains(focusedElement);\n }\n\n /** Checks whether the passed-in index is a valid step index. */\n private _isValidIndex(index: number): boolean {\n return index > -1 && (!this.steps || index < this.steps.length);\n }\n\n static ngAcceptInputType_editable: BooleanInput;\n static ngAcceptInputType_optional: BooleanInput;\n static ngAcceptInputType_completed: BooleanInput;\n static ngAcceptInputType_hasError: BooleanInput;\n static ngAcceptInputType_linear: BooleanInput;\n static ngAcceptInputType_selectedIndex: NumberInput;\n}\n\n\n/**\n * Simplified representation of an \"AbstractControl\" from @angular/forms.\n * Used to avoid having to bring in @angular/forms for a single optional interface.\n * @docs-private\n */\ninterface AbstractControlLike {\n asyncValidator: ((control: any) => any) | null;\n dirty: boolean;\n disabled: boolean;\n enabled: boolean;\n errors: {[key: string]: any} | null;\n invalid: boolean;\n parent: any;\n pending: boolean;\n pristine: boolean;\n root: AbstractControlLike;\n status: string;\n readonly statusChanges: Observable<any>;\n touched: boolean;\n untouched: boolean;\n updateOn: any;\n valid: boolean;\n validator: ((control: any) => any) | null;\n value: any;\n readonly valueChanges: Observable<any>;\n clearAsyncValidators(): void;\n clearValidators(): void;\n disable(opts?: any): void;\n enable(opts?: any): void;\n get(path: (string | number)[] | string): AbstractControlLike | null;\n getError(errorCode: string, path?: (string | number)[] | string): any;\n hasError(errorCode: string, path?: (string | number)[] | string): boolean;\n markAllAsTouched(): void;\n markAsDirty(opts?: any): void;\n markAsPending(opts?: any): void;\n markAsPristine(opts?: any): void;\n markAsTouched(opts?: any): void;\n markAsUntouched(opts?: any): void;\n patchValue(value: any, options?: Object): void;\n reset(value?: any, options?: Object): void;\n setAsyncValidators(newValidator: (control: any) => any |\n ((control: any) => any)[] | null): void;\n setErrors(errors: {[key: string]: any} | null, opts?: any): void;\n setParent(parent: any): void;\n setValidators(newValidator: (control: any) => any |\n ((control: any) => any)[] | null): void;\n setValue(value: any, options?: Object): void;\n updateValueAndValidity(opts?: any): void;\n patchValue(value: any, options?: any): void;\n reset(formState?: any, options?: any): void;\n setValue(value: any, options?: any): void;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, HostListener, Input} from '@angular/core';\n\nimport {CdkStepper} from './stepper';\n\n/** Button that moves to the next step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperNext]',\n host: {\n '[type]': 'type',\n }\n})\nexport class CdkStepperNext {\n /** Type of the next button. Defaults to \"submit\" if not specified. */\n @Input() type: string = 'submit';\n\n constructor(public _stepper: CdkStepper) {}\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('click')\n _handleClick() {\n this._stepper.next();\n }\n}\n\n/** Button that moves to the previous step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperPrevious]',\n host: {\n '[type]': 'type',\n }\n})\nexport class CdkStepperPrevious {\n /** Type of the previous button. Defaults to \"button\" if not specified. */\n @Input() type: string = 'button';\n\n constructor(public _stepper: CdkStepper) {}\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('click')\n _handleClick() {\n this._stepper.previous();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkStepper, CdkStep} from './stepper';\nimport {CdkStepLabel} from './step-label';\nimport {CdkStepperNext, CdkStepperPrevious} from './stepper-button';\nimport {CdkStepHeader} from './step-header';\nimport {BidiModule} from '@angular/cdk/bidi';\n\n@NgModule({\n imports: [BidiModule],\n exports: [\n CdkStep,\n CdkStepper,\n CdkStepHeader,\n CdkStepLabel,\n CdkStepperNext,\n CdkStepperPrevious,\n ],\n declarations: [\n CdkStep,\n CdkStepper,\n CdkStepHeader,\n CdkStepLabel,\n CdkStepperNext,\n CdkStepperPrevious,\n ]\n})\nexport class CdkStepperModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './stepper';\nexport * from './step-label';\nexport * from './stepper-button';\nexport * from './stepper-module';\nexport * from './step-header';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["observableOf"],"mappings":";;;;;;;;;AAAA;;;;;;;MAkBa,aAAa;IACxB,YAAmB,WAAoC;QAApC,gBAAW,GAAX,WAAW,CAAyB;KAAI;;IAG3D,KAAK;QACH,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;KACxC;;;YAZF,SAAS,SAAC;gBACT,QAAQ,EAAE,iBAAiB;gBAC3B,IAAI,EAAE;oBACJ,MAAM,EAAE,KAAK;iBACd;aACF;;;YATkB,UAAU;;;ACR7B;;;;;;;MAaa,YAAY;IACvB,iCAAwC,QAA0B;QAA1B,aAAQ,GAAR,QAAQ,CAAkB;KAAK;;;YAJxE,SAAS,SAAC;gBACT,QAAQ,EAAE,gBAAgB;aAC3B;;;YAJkB,WAAW;;;ACR9B;;;;;;;AAgDA;AACA,IAAI,MAAM,GAAG,CAAC,CAAC;AAWf;MACa,qBAAqB;CAYjC;AAKD;MACa,UAAU,GAAG;IACxB,MAAM,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U;oBACV,aAAa;oBACb,YAAY;oBACZ,cAAc;oBACd,kBAAkB;iBACnB;gBACD,YAAY,EAAE;oBACZ,OAAO;oBACP,UAAU;oBACV,aAAa;oBACb,YAAY;oBACZ,cAAc;oBACd,kBAAkB;iBACnB;aACF;;;ACjCD;;;;;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"stepper.js","sources":["../../../../../../src/cdk/stepper/step-header.ts","../../../../../../src/cdk/stepper/step-label.ts","../../../../../../src/cdk/stepper/stepper.ts","../../../../../../src/cdk/stepper/stepper-button.ts","../../../../../../src/cdk/stepper/stepper-module.ts","../../../../../../src/cdk/stepper/public-api.ts","../../../../../../src/cdk/stepper/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef} from '@angular/core';\nimport {FocusableOption} from '@angular/cdk/a11y';\n\n\n@Directive({\n selector: '[cdkStepHeader]',\n host: {\n 'role': 'tab',\n },\n})\nexport class CdkStepHeader implements FocusableOption {\n constructor(public _elementRef: ElementRef<HTMLElement>) {}\n\n /** Focuses the step header. */\n focus() {\n this._elementRef.nativeElement.focus();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, TemplateRef} from '@angular/core';\n\n@Directive({\n selector: '[cdkStepLabel]',\n})\nexport class CdkStepLabel {\n constructor(/** @docs-private */ public template: TemplateRef<any>) { }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusableOption, FocusKeyManager} from '@angular/cdk/a11y';\nimport {Direction, Directionality} from '@angular/cdk/bidi';\nimport {\n BooleanInput,\n coerceBooleanProperty,\n coerceNumberProperty,\n NumberInput\n} from '@angular/cdk/coercion';\nimport {ENTER, hasModifierKey, SPACE} from '@angular/cdk/keycodes';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n InjectionToken,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n AfterContentInit,\n} from '@angular/core';\nimport {Observable, of as observableOf, Subject} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\n\nimport {CdkStepHeader} from './step-header';\nimport {CdkStepLabel} from './step-label';\n\n/** Used to generate unique ID for each stepper component. */\nlet nextId = 0;\n\n/**\n * Position state of the content of each step in stepper that is used for transitioning\n * the content into correct position upon step selection change.\n */\nexport type StepContentPositionState = 'previous'|'current'|'next';\n\n/** Possible orientation of a stepper. */\nexport type StepperOrientation = 'horizontal'|'vertical';\n\n/** Change event emitted on selection changes. */\nexport class StepperSelectionEvent {\n /** Index of the step now selected. */\n selectedIndex: number;\n\n /** Index of the step previously selected. */\n previouslySelectedIndex: number;\n\n /** The step instance now selected. */\n selectedStep: CdkStep;\n\n /** The step instance previously selected. */\n previouslySelectedStep: CdkStep;\n}\n\n/** The state of each step. */\nexport type StepState = 'number'|'edit'|'done'|'error'|string;\n\n/** Enum to represent the different states of the steps. */\nexport const STEP_STATE = {\n NUMBER: 'number',\n EDIT: 'edit',\n DONE: 'done',\n ERROR: 'error'\n};\n\n/** InjectionToken that can be used to specify the global stepper options. */\nexport const STEPPER_GLOBAL_OPTIONS = new InjectionToken<StepperOptions>('STEPPER_GLOBAL_OPTIONS');\n\n/** Configurable options for stepper. */\nexport interface StepperOptions {\n /**\n * Whether the stepper should display an error state or not.\n * Default behavior is assumed to be false.\n */\n showError?: boolean;\n\n /**\n * Whether the stepper should display the default indicator type\n * or not.\n * Default behavior is assumed to be true.\n */\n displayDefaultIndicatorType?: boolean;\n}\n\n@Component({\n selector: 'cdk-step',\n exportAs: 'cdkStep',\n template: '<ng-template><ng-content></ng-content></ng-template>',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CdkStep implements OnChanges {\n private _stepperOptions: StepperOptions;\n _displayDefaultIndicatorType: boolean;\n\n /** Template for step label if it exists. */\n @ContentChild(CdkStepLabel) stepLabel: CdkStepLabel;\n\n /** Template for step content. */\n @ViewChild(TemplateRef, {static: true}) content: TemplateRef<any>;\n\n /** The top level abstract control of the step. */\n @Input() stepControl: AbstractControlLike;\n\n /** Whether user has attempted to move away from the step. */\n interacted = false;\n\n /** Emits when the user has attempted to move away from the step. */\n @Output('interacted')\n readonly interactedStream: EventEmitter<CdkStep> = new EventEmitter<CdkStep>();\n\n /** Plain text label of the step. */\n @Input() label: string;\n\n /** Error message to display when there's an error. */\n @Input() errorMessage: string;\n\n /** Aria label for the tab. */\n @Input('aria-label') ariaLabel: string;\n\n /**\n * Reference to the element that the tab is labelled by.\n * Will be cleared if `aria-label` is set at the same time.\n */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** State of the step. */\n @Input() state: StepState;\n\n /** Whether the user can return to this step once it has been marked as completed. */\n @Input()\n get editable(): boolean {\n return this._editable;\n }\n set editable(value: boolean) {\n this._editable = coerceBooleanProperty(value);\n }\n private _editable = true;\n\n /** Whether the completion of step is optional. */\n @Input()\n get optional(): boolean {\n return this._optional;\n }\n set optional(value: boolean) {\n this._optional = coerceBooleanProperty(value);\n }\n private _optional = false;\n\n /** Whether step is marked as completed. */\n @Input()\n get completed(): boolean {\n return this._completedOverride == null ? this._getDefaultCompleted() : this._completedOverride;\n }\n set completed(value: boolean) {\n this._completedOverride = coerceBooleanProperty(value);\n }\n _completedOverride: boolean|null = null;\n\n private _getDefaultCompleted() {\n return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;\n }\n\n /** Whether step has an error. */\n @Input()\n get hasError(): boolean {\n return this._customError == null ? this._getDefaultError() : this._customError;\n }\n set hasError(value: boolean) {\n this._customError = coerceBooleanProperty(value);\n }\n private _customError: boolean|null = null;\n\n private _getDefaultError() {\n return this.stepControl && this.stepControl.invalid && this.interacted;\n }\n\n constructor(\n @Inject(forwardRef(() => CdkStepper)) public _stepper: CdkStepper,\n @Optional() @Inject(STEPPER_GLOBAL_OPTIONS) stepperOptions?: StepperOptions) {\n this._stepperOptions = stepperOptions ? stepperOptions : {};\n this._displayDefaultIndicatorType = this._stepperOptions.displayDefaultIndicatorType !== false;\n }\n\n /** Selects this step component. */\n select(): void {\n this._stepper.selected = this;\n }\n\n /** Resets the step to its initial state. Note that this includes resetting form data. */\n reset(): void {\n this.interacted = false;\n\n if (this._completedOverride != null) {\n this._completedOverride = false;\n }\n\n if (this._customError != null) {\n this._customError = false;\n }\n\n if (this.stepControl) {\n this.stepControl.reset();\n }\n }\n\n ngOnChanges() {\n // Since basically all inputs of the MatStep get proxied through the view down to the\n // underlying MatStepHeader, we have to make sure that change detection runs correctly.\n this._stepper._stateChanged();\n }\n\n _markAsInteracted() {\n if (!this.interacted) {\n this.interacted = true;\n this.interactedStream.emit(this);\n }\n }\n\n /** Determines whether the error state can be shown. */\n _showError(): boolean {\n // We want to show the error state either if the user opted into/out of it using the\n // global options, or if they've explicitly set it through the `hasError` input.\n return this._stepperOptions.showError ?? this._customError != null;\n }\n\n static ngAcceptInputType_editable: BooleanInput;\n static ngAcceptInputType_hasError: BooleanInput;\n static ngAcceptInputType_optional: BooleanInput;\n static ngAcceptInputType_completed: BooleanInput;\n}\n\n@Directive({\n selector: '[cdkStepper]',\n exportAs: 'cdkStepper',\n})\nexport class CdkStepper implements AfterContentInit, AfterViewInit, OnDestroy {\n /** Emits when the component is destroyed. */\n protected readonly _destroyed = new Subject<void>();\n\n /** Used for managing keyboard focus. */\n private _keyManager: FocusKeyManager<FocusableOption>;\n\n private _document: Document;\n\n /** Full list of steps inside the stepper, including inside nested steppers. */\n @ContentChildren(CdkStep, {descendants: true}) _steps: QueryList<CdkStep>;\n\n /** Steps that belong to the current stepper, excluding ones from nested steppers. */\n readonly steps: QueryList<CdkStep> = new QueryList<CdkStep>();\n\n /** The list of step headers of the steps in the stepper. */\n @ContentChildren(CdkStepHeader, {descendants: true}) _stepHeader: QueryList<CdkStepHeader>;\n\n /** Whether the validity of previous steps should be checked or not. */\n @Input()\n get linear(): boolean {\n return this._linear;\n }\n set linear(value: boolean) {\n this._linear = coerceBooleanProperty(value);\n }\n private _linear = false;\n\n /** The index of the selected step. */\n @Input()\n get selectedIndex() {\n return this._selectedIndex;\n }\n set selectedIndex(index: number) {\n const newIndex = coerceNumberProperty(index);\n\n if (this.steps && this._steps) {\n // Ensure that the index can't be out of bounds.\n if (!this._isValidIndex(index) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.');\n }\n\n this.selected?._markAsInteracted();\n\n if (this._selectedIndex !== newIndex && !this._anyControlsInvalidOrPending(newIndex) &&\n (newIndex >= this._selectedIndex || this.steps.toArray()[newIndex].editable)) {\n this._updateSelectedItemIndex(index);\n }\n } else {\n this._selectedIndex = newIndex;\n }\n }\n private _selectedIndex = 0;\n\n /** The step that is selected. */\n @Input()\n get selected(): CdkStep | undefined {\n return this.steps ? this.steps.toArray()[this.selectedIndex] : undefined;\n }\n set selected(step: CdkStep | undefined) {\n this.selectedIndex = (step && this.steps) ? this.steps.toArray().indexOf(step) : -1;\n }\n\n /** Event emitted when the selected step has changed. */\n @Output() readonly selectionChange = new EventEmitter<StepperSelectionEvent>();\n\n /** Used to track unique ID for each stepper component. */\n _groupId: number;\n\n /** Orientation of the stepper. */\n @Input()\n get orientation(): StepperOrientation { return this._orientation; }\n set orientation(value: StepperOrientation) {\n // This is a protected method so that `MatSteppter` can hook into it.\n this._orientation = value;\n\n if (this._keyManager) {\n this._keyManager.withVerticalOrientation(value === 'vertical');\n }\n }\n\n /**\n * @deprecated To be turned into a private property. Use `orientation` instead.\n * @breaking-change 13.0.0\n */\n protected _orientation: StepperOrientation = 'horizontal';\n\n constructor(\n @Optional() private _dir: Directionality, private _changeDetectorRef: ChangeDetectorRef,\n private _elementRef: ElementRef<HTMLElement>, @Inject(DOCUMENT) _document: any) {\n this._groupId = nextId++;\n this._document = _document;\n }\n\n ngAfterContentInit() {\n this._steps.changes\n .pipe(startWith(this._steps), takeUntil(this._destroyed))\n .subscribe((steps: QueryList<CdkStep>) => {\n this.steps.reset(steps.filter(step => step._stepper === this));\n this.steps.notifyOnChanges();\n });\n }\n\n ngAfterViewInit() {\n // Note that while the step headers are content children by default, any components that\n // extend this one might have them as view children. We initialize the keyboard handling in\n // AfterViewInit so we're guaranteed for both view and content children to be defined.\n this._keyManager = new FocusKeyManager<FocusableOption>(this._stepHeader)\n .withWrap()\n .withHomeAndEnd()\n .withVerticalOrientation(this._orientation === 'vertical');\n\n (this._dir ? (this._dir.change as Observable<Direction>) : observableOf<Direction>())\n .pipe(startWith(this._layoutDirection()), takeUntil(this._destroyed))\n .subscribe(direction => this._keyManager.withHorizontalOrientation(direction));\n\n this._keyManager.updateActiveItem(this._selectedIndex);\n\n // No need to `takeUntil` here, because we're the ones destroying `steps`.\n this.steps.changes.subscribe(() => {\n if (!this.selected) {\n this._selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n });\n\n // The logic which asserts that the selected index is within bounds doesn't run before the\n // steps are initialized, because we don't how many steps there are yet so we may have an\n // invalid index on init. If that's the case, auto-correct to the default so we don't throw.\n if (!this._isValidIndex(this._selectedIndex)) {\n this._selectedIndex = 0;\n }\n }\n\n ngOnDestroy() {\n this.steps.destroy();\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Selects and focuses the next step in list. */\n next(): void {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this.steps.length - 1);\n }\n\n /** Selects and focuses the previous step in list. */\n previous(): void {\n this.selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n\n /** Resets the stepper to its initial state. Note that this includes clearing form data. */\n reset(): void {\n this._updateSelectedItemIndex(0);\n this.steps.forEach(step => step.reset());\n this._stateChanged();\n }\n\n /** Returns a unique id for each step label element. */\n _getStepLabelId(i: number): string {\n return `cdk-step-label-${this._groupId}-${i}`;\n }\n\n /** Returns unique id for each step content element. */\n _getStepContentId(i: number): string {\n return `cdk-step-content-${this._groupId}-${i}`;\n }\n\n /** Marks the component to be change detected. */\n _stateChanged() {\n this._changeDetectorRef.markForCheck();\n }\n\n /** Returns position state of the step with the given index. */\n _getAnimationDirection(index: number): StepContentPositionState {\n const position = index - this._selectedIndex;\n if (position < 0) {\n return this._layoutDirection() === 'rtl' ? 'next' : 'previous';\n } else if (position > 0) {\n return this._layoutDirection() === 'rtl' ? 'previous' : 'next';\n }\n return 'current';\n }\n\n /** Returns the type of icon to be displayed. */\n _getIndicatorType(index: number, state: StepState = STEP_STATE.NUMBER): StepState {\n const step = this.steps.toArray()[index];\n const isCurrentStep = this._isCurrentStep(index);\n\n return step._displayDefaultIndicatorType ? this._getDefaultIndicatorLogic(step, isCurrentStep) :\n this._getGuidelineLogic(step, isCurrentStep, state);\n }\n\n private _getDefaultIndicatorLogic(step: CdkStep, isCurrentStep: boolean): StepState {\n if (step._showError() && step.hasError && !isCurrentStep) {\n return STEP_STATE.ERROR;\n } else if (!step.completed || isCurrentStep) {\n return STEP_STATE.NUMBER;\n } else {\n return step.editable ? STEP_STATE.EDIT : STEP_STATE.DONE;\n }\n }\n\n private _getGuidelineLogic(\n step: CdkStep, isCurrentStep: boolean, state: StepState = STEP_STATE.NUMBER): StepState {\n if (step._showError() && step.hasError && !isCurrentStep) {\n return STEP_STATE.ERROR;\n } else if (step.completed && !isCurrentStep) {\n return STEP_STATE.DONE;\n } else if (step.completed && isCurrentStep) {\n return state;\n } else if (step.editable && isCurrentStep) {\n return STEP_STATE.EDIT;\n } else {\n return state;\n }\n }\n\n private _isCurrentStep(index: number) {\n return this._selectedIndex === index;\n }\n\n /** Returns the index of the currently-focused step header. */\n _getFocusIndex() {\n return this._keyManager ? this._keyManager.activeItemIndex : this._selectedIndex;\n }\n\n private _updateSelectedItemIndex(newIndex: number): void {\n const stepsArray = this.steps.toArray();\n this.selectionChange.emit({\n selectedIndex: newIndex,\n previouslySelectedIndex: this._selectedIndex,\n selectedStep: stepsArray[newIndex],\n previouslySelectedStep: stepsArray[this._selectedIndex],\n });\n\n // If focus is inside the stepper, move it to the next header, otherwise it may become\n // lost when the active step content is hidden. We can't be more granular with the check\n // (e.g. checking whether focus is inside the active step), because we don't have a\n // reference to the elements that are rendering out the content.\n this._containsFocus() ? this._keyManager.setActiveItem(newIndex) :\n this._keyManager.updateActiveItem(newIndex);\n\n this._selectedIndex = newIndex;\n this._stateChanged();\n }\n\n _onKeydown(event: KeyboardEvent) {\n const hasModifier = hasModifierKey(event);\n const keyCode = event.keyCode;\n const manager = this._keyManager;\n\n if (manager.activeItemIndex != null && !hasModifier &&\n (keyCode === SPACE || keyCode === ENTER)) {\n this.selectedIndex = manager.activeItemIndex;\n event.preventDefault();\n } else {\n manager.onKeydown(event);\n }\n }\n\n private _anyControlsInvalidOrPending(index: number): boolean {\n if (this._linear && index >= 0) {\n return this.steps.toArray().slice(0, index).some(step => {\n const control = step.stepControl;\n const isIncomplete =\n control ? (control.invalid || control.pending || !step.interacted) : !step.completed;\n return isIncomplete && !step.optional && !step._completedOverride;\n });\n }\n\n return false;\n }\n\n private _layoutDirection(): Direction {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n\n /** Checks whether the stepper contains the focused element. */\n private _containsFocus(): boolean {\n const stepperElement = this._elementRef.nativeElement;\n const focusedElement = this._document.activeElement;\n return stepperElement === focusedElement || stepperElement.contains(focusedElement);\n }\n\n /** Checks whether the passed-in index is a valid step index. */\n private _isValidIndex(index: number): boolean {\n return index > -1 && (!this.steps || index < this.steps.length);\n }\n\n static ngAcceptInputType_editable: BooleanInput;\n static ngAcceptInputType_optional: BooleanInput;\n static ngAcceptInputType_completed: BooleanInput;\n static ngAcceptInputType_hasError: BooleanInput;\n static ngAcceptInputType_linear: BooleanInput;\n static ngAcceptInputType_selectedIndex: NumberInput;\n}\n\n\n/**\n * Simplified representation of an \"AbstractControl\" from @angular/forms.\n * Used to avoid having to bring in @angular/forms for a single optional interface.\n * @docs-private\n */\ninterface AbstractControlLike {\n asyncValidator: ((control: any) => any) | null;\n dirty: boolean;\n disabled: boolean;\n enabled: boolean;\n errors: {[key: string]: any} | null;\n invalid: boolean;\n parent: any;\n pending: boolean;\n pristine: boolean;\n root: AbstractControlLike;\n status: string;\n readonly statusChanges: Observable<any>;\n touched: boolean;\n untouched: boolean;\n updateOn: any;\n valid: boolean;\n validator: ((control: any) => any) | null;\n value: any;\n readonly valueChanges: Observable<any>;\n clearAsyncValidators(): void;\n clearValidators(): void;\n disable(opts?: any): void;\n enable(opts?: any): void;\n get(path: (string | number)[] | string): AbstractControlLike | null;\n getError(errorCode: string, path?: (string | number)[] | string): any;\n hasError(errorCode: string, path?: (string | number)[] | string): boolean;\n markAllAsTouched(): void;\n markAsDirty(opts?: any): void;\n markAsPending(opts?: any): void;\n markAsPristine(opts?: any): void;\n markAsTouched(opts?: any): void;\n markAsUntouched(opts?: any): void;\n patchValue(value: any, options?: Object): void;\n reset(value?: any, options?: Object): void;\n setAsyncValidators(newValidator: (control: any) => any |\n ((control: any) => any)[] | null): void;\n setErrors(errors: {[key: string]: any} | null, opts?: any): void;\n setParent(parent: any): void;\n setValidators(newValidator: (control: any) => any |\n ((control: any) => any)[] | null): void;\n setValue(value: any, options?: Object): void;\n updateValueAndValidity(opts?: any): void;\n patchValue(value: any, options?: any): void;\n reset(formState?: any, options?: any): void;\n setValue(value: any, options?: any): void;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, HostListener, Input} from '@angular/core';\n\nimport {CdkStepper} from './stepper';\n\n/** Button that moves to the next step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperNext]',\n host: {\n '[type]': 'type',\n }\n})\nexport class CdkStepperNext {\n /** Type of the next button. Defaults to \"submit\" if not specified. */\n @Input() type: string = 'submit';\n\n constructor(public _stepper: CdkStepper) {}\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('click')\n _handleClick() {\n this._stepper.next();\n }\n}\n\n/** Button that moves to the previous step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperPrevious]',\n host: {\n '[type]': 'type',\n }\n})\nexport class CdkStepperPrevious {\n /** Type of the previous button. Defaults to \"button\" if not specified. */\n @Input() type: string = 'button';\n\n constructor(public _stepper: CdkStepper) {}\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('click')\n _handleClick() {\n this._stepper.previous();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkStepper, CdkStep} from './stepper';\nimport {CdkStepLabel} from './step-label';\nimport {CdkStepperNext, CdkStepperPrevious} from './stepper-button';\nimport {CdkStepHeader} from './step-header';\nimport {BidiModule} from '@angular/cdk/bidi';\n\n@NgModule({\n imports: [BidiModule],\n exports: [\n CdkStep,\n CdkStepper,\n CdkStepHeader,\n CdkStepLabel,\n CdkStepperNext,\n CdkStepperPrevious,\n ],\n declarations: [\n CdkStep,\n CdkStepper,\n CdkStepHeader,\n CdkStepLabel,\n CdkStepperNext,\n CdkStepperPrevious,\n ]\n})\nexport class CdkStepperModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './stepper';\nexport * from './step-label';\nexport * from './stepper-button';\nexport * from './stepper-module';\nexport * from './step-header';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["observableOf"],"mappings":";;;;;;;;;AAAA;;;;;;;MAkBa,aAAa;IACxB,YAAmB,WAAoC;QAApC,gBAAW,GAAX,WAAW,CAAyB;KAAI;;IAG3D,KAAK;QACH,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;KACxC;;;YAZF,SAAS,SAAC;gBACT,QAAQ,EAAE,iBAAiB;gBAC3B,IAAI,EAAE;oBACJ,MAAM,EAAE,KAAK;iBACd;aACF;;;YATkB,UAAU;;;ACR7B;;;;;;;MAaa,YAAY;IACvB,iCAAwC,QAA0B;QAA1B,aAAQ,GAAR,QAAQ,CAAkB;KAAK;;;YAJxE,SAAS,SAAC;gBACT,QAAQ,EAAE,gBAAgB;aAC3B;;;YAJkB,WAAW;;;ACR9B;;;;;;;AAgDA;AACA,IAAI,MAAM,GAAG,CAAC,CAAC;AAWf;MACa,qBAAqB;CAYjC;AAKD;MACa,UAAU,GAAG;IACxB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;EACd;AAEF;MACa,sBAAsB,GAAG,IAAI,cAAc,CAAiB,wBAAwB,EAAE;MAyBtF,OAAO;IAsFlB,YACiD,QAAoB,EACrB,cAA+B;QAD9B,aAAQ,GAAR,QAAQ,CAAY;;QAzErE,eAAU,GAAG,KAAK,CAAC;;QAIV,qBAAgB,GAA0B,IAAI,YAAY,EAAW,CAAC;QA4BvE,cAAS,GAAG,IAAI,CAAC;QAUjB,cAAS,G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BAGlD,KAAK;4BAUL,KAAK;uBA0BL,KAAK;8BASL,MAAM;0BAMN,KAAK;;;ACvUR;;;;;;;AAYA;MAOa,cAAc;IAIzB,YAAmB,QAAoB;QAApB,aAAQ,GAAR,QAAQ,CAAY;;QAF9B,SAAI,GAAW,QAAQ,CAAC;KAEU;;;;;;IAQ3C,YAAY;QACV,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;KACtB;;;YApBF,SAAS,SAAC;gBACT,QAAQ,EAAE,wBAAwB;gBAClC,IAAI,EAAE;oBACJ,QAAQ,EAAE,MAAM;iBACjB;aACF;;;YARO,UAAU;;;mBAWf,KAAK;2BASL,YAAY,SAAC,OAAO;;AAMvB;MAOa,kBAAkB;IAI7B,YAAmB,QAAoB;QAApB,aAAQ,GAAR,QAAQ,CAAY;;QAF9B,SAAI,GAAW,QAAQ,CAAC;KAEU;;;;;;IAQ3C,YAAY;QACV,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;KAC1B;;;YApBF,SAAS,SAAC;gBACT,QAAQ,EAAE,4BAA4B;gBACtC,IAAI,EAAE;oBACJ,QAAQ,EAAE,MAAM;iBACjB;aACF;;;YAhCO,UAAU;;;mBAmCf,KAAK;2BASL,YAAY,SAAC,OAAO;;;ACtDvB;;;;;;;MAkCa,gBAAgB;;;YAnB5B,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,UAAU,CAAC;gBACrB,OAAO,EAAE;oBACP,OAAO;oBACP,UAAU;oBACV,aAAa;oBACb,YAAY;oBACZ,cAAc;oBACd,kBAAkB;iBACnB;gBACD,YAAY,EAAE;oBACZ,OAAO;oBACP,UAAU;oBACV,aAAa;oBACb,YAAY;oBACZ,cAAc;oBACd,kBAAkB;iBACnB;aACF;;;ACjCD;;;;;;;;ACAA;;;;;;"}
|
|
@@ -94,6 +94,8 @@ class TaskStateZoneInterceptor {
|
|
|
94
94
|
* Use of this source code is governed by an MIT-style license that can be
|
|
95
95
|
* found in the LICENSE file at https://angular.io/license
|
|
96
96
|
*/
|
|
97
|
+
/** Used to generate unique IDs for events. */
|
|
98
|
+
let uniqueIds = 0;
|
|
97
99
|
/**
|
|
98
100
|
* Creates a browser MouseEvent with the specified options.
|
|
99
101
|
* @docs-private
|
|
@@ -150,11 +152,11 @@ function createPointerEvent(type, clientX = 0, clientY = 0, options = { isPrimar
|
|
|
150
152
|
* Creates a browser TouchEvent with the specified pointer coordinates.
|
|
151
153
|
* @docs-private
|
|
152
154
|
*/
|
|
153
|
-
function createTouchEvent(type, pageX = 0, pageY = 0) {
|
|
155
|
+
function createTouchEvent(type, pageX = 0, pageY = 0, clientX = 0, clientY = 0) {
|
|
154
156
|
// In favor of creating events that work for most of the browsers, the event is created
|
|
155
157
|
// as a basic UI Event. The necessary details for the event will be set manually.
|
|
156
158
|
const event = document.createEvent('UIEvent');
|
|
157
|
-
const touchDetails = { pageX, pageY };
|
|
159
|
+
const touchDetails = { pageX, pageY, clientX, clientY, id: uniqueIds++ };
|
|
158
160
|
// TS3.6 removes the initUIEvent method and suggests porting to "new UIEvent()".
|
|
159
161
|
event.initUIEvent(type, true, true, window, 0);
|
|
160
162
|
// Most of the browsers don't have a "initTouchEvent" method that can be used to define
|
|
@@ -277,8 +279,8 @@ function dispatchPointerEvent(node, type, clientX = 0, clientY = 0, options) {
|
|
|
277
279
|
* Shorthand to dispatch a touch event on the specified coordinates.
|
|
278
280
|
* @docs-private
|
|
279
281
|
*/
|
|
280
|
-
function dispatchTouchEvent(node, type,
|
|
281
|
-
return dispatchEvent(node, createTouchEvent(type,
|
|
282
|
+
function dispatchTouchEvent(node, type, pageX = 0, pageY = 0, clientX = 0, clientY = 0) {
|
|
283
|
+
return dispatchEvent(node, createTouchEvent(type, pageX, pageY, clientX, clientY));
|
|
282
284
|
}
|
|
283
285
|
|
|
284
286
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing__testbed.js","sources":["../../../../../../src/cdk/testing/testbed/task-state-zone-interceptor.ts","../../../../../../src/cdk/testing/testbed/fake-events/event-objects.ts","../../../../../../src/cdk/testing/testbed/fake-events/dispatch-events.ts","../../../../../../src/cdk/testing/testbed/fake-events/element-focus.ts","../../../../../../src/cdk/testing/testbed/fake-events/type-in-element.ts","../../../../../../src/cdk/testing/testbed/fake-events/index.ts","../../../../../../src/cdk/testing/testbed/unit-test-element.ts","../../../../../../src/cdk/testing/testbed/testbed-harness-environment.ts","../../../../../../src/cdk/testing/testbed/public-api.ts","../../../../../../src/cdk/testing/testbed/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {ProxyZone, ProxyZoneStatic} from './proxy-zone-types';\n\n/** Current state of the intercepted zone. */\nexport interface TaskState {\n /** Whether the zone is stable (i.e. no microtasks and macrotasks). */\n stable: boolean;\n}\n\n/** Unique symbol that is used to patch a property to a proxy zone. */\nconst stateObservableSymbol = Symbol('ProxyZone_PATCHED#stateObservable');\n\n/** Type that describes a potentially patched proxy zone instance. */\ntype PatchedProxyZone = ProxyZone & {\n [stateObservableSymbol]: undefined|Observable<TaskState>;\n};\n\n/**\n * Interceptor that can be set up in a `ProxyZone` instance. The interceptor\n * will keep track of the task state and emit whenever the state changes.\n *\n * This serves as a workaround for https://github.com/angular/angular/issues/32896.\n */\nexport class TaskStateZoneInterceptor {\n /** Subject that can be used to emit a new state change. */\n private readonly _stateSubject = new BehaviorSubject<TaskState>(\n this._lastState ? this._getTaskStateFromInternalZoneState(this._lastState) : {stable: true});\n\n /** Public observable that emits whenever the task state changes. */\n readonly state: Observable<TaskState> = this._stateSubject;\n\n constructor(private _lastState: HasTaskState|null) {}\n\n /** This will be called whenever the task state changes in the intercepted zone. */\n onHasTask(delegate: ZoneDelegate, current: Zone, target: Zone, hasTaskState: HasTaskState) {\n if (current === target) {\n this._stateSubject.next(this._getTaskStateFromInternalZoneState(hasTaskState));\n }\n }\n\n /** Gets the task state from the internal ZoneJS task state. */\n private _getTaskStateFromInternalZoneState(state: HasTaskState): TaskState {\n return {stable: !state.macroTask && !state.microTask};\n }\n\n /**\n * Sets up the custom task state Zone interceptor in the `ProxyZone`. Throws if\n * no `ProxyZone` could be found.\n * @returns an observable that emits whenever the task state changes.\n */\n static setup(): Observable<TaskState> {\n if (Zone === undefined) {\n throw Error('Could not find ZoneJS. For test harnesses running in TestBed, ' +\n 'ZoneJS needs to be installed.');\n }\n\n // tslint:disable-next-line:variable-name\n const ProxyZoneSpec = (Zone as any)['ProxyZoneSpec'] as ProxyZoneStatic|undefined;\n\n // If there is no \"ProxyZoneSpec\" installed, we throw an error and recommend\n // setting up the proxy zone by pulling in the testing bundle.\n if (!ProxyZoneSpec) {\n throw Error(\n 'ProxyZoneSpec is needed for the test harnesses but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/zone-testing.js');\n }\n\n // Ensure that there is a proxy zone instance set up, and get\n // a reference to the instance if present.\n const zoneSpec = ProxyZoneSpec.assertPresent() as PatchedProxyZone;\n\n // If there already is a delegate registered in the proxy zone, and it\n // is type of the custom task state interceptor, we just use that state\n // observable. This allows us to only intercept Zone once per test\n // (similar to how `fakeAsync` or `async` work).\n if (zoneSpec[stateObservableSymbol]) {\n return zoneSpec[stateObservableSymbol]!;\n }\n\n // Since we intercept on environment creation and the fixture has been\n // created before, we might have missed tasks scheduled before. Fortunately\n // the proxy zone keeps track of the previous task state, so we can just pass\n // this as initial state to the task zone interceptor.\n const interceptor = new TaskStateZoneInterceptor(zoneSpec.lastTaskState);\n const zoneSpecOnHasTask = zoneSpec.onHasTask.bind(zoneSpec);\n\n // We setup the task state interceptor in the `ProxyZone`. Note that we cannot register\n // the interceptor as a new proxy zone delegate because it would mean that other zone\n // delegates (e.g. `FakeAsyncTestZone` or `AsyncTestZone`) can accidentally overwrite/disable\n // our interceptor. Since we just intend to monitor the task state of the proxy zone, it is\n // sufficient to just patch the proxy zone. This also avoids that we interfere with the task\n // queue scheduling logic.\n zoneSpec.onHasTask = function(...args: [ZoneDelegate, Zone, Zone, HasTaskState]) {\n zoneSpecOnHasTask(...args);\n interceptor.onHasTask(...args);\n };\n\n return zoneSpec[stateObservableSymbol] = interceptor.state;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ModifierKeys} from '@angular/cdk/testing';\n\n/**\n * Creates a browser MouseEvent with the specified options.\n * @docs-private\n */\nexport function createMouseEvent(\n type: string, clientX = 0, clientY = 0, button = 0, modifiers: ModifierKeys = {}) {\n const event = document.createEvent('MouseEvent');\n const originalPreventDefault = event.preventDefault.bind(event);\n\n // Note: We cannot determine the position of the mouse event based on the screen\n // because the dimensions and position of the browser window are not available\n // To provide reasonable `screenX` and `screenY` coordinates, we simply use the\n // client coordinates as if the browser is opened in fullscreen.\n const screenX = clientX;\n const screenY = clientY;\n\n event.initMouseEvent(type,\n /* canBubble */ true,\n /* cancelable */ true,\n /* view */ window,\n /* detail */ 0,\n /* screenX */ screenX,\n /* screenY */ screenY,\n /* clientX */ clientX,\n /* clientY */ clientY,\n /* ctrlKey */ !!modifiers.control,\n /* altKey */ !!modifiers.alt,\n /* shiftKey */ !!modifiers.shift,\n /* metaKey */ !!modifiers.meta,\n /* button */ button,\n /* relatedTarget */ null);\n\n // `initMouseEvent` doesn't allow us to pass the `buttons` and\n // defaults it to 0 which looks like a fake event.\n defineReadonlyEventProperty(event, 'buttons', 1);\n\n // IE won't set `defaultPrevented` on synthetic events so we need to do it manually.\n event.preventDefault = function() {\n defineReadonlyEventProperty(event, 'defaultPrevented', true);\n return originalPreventDefault();\n };\n\n return event;\n}\n\n/**\n * Creates a browser `PointerEvent` with the specified options. Pointer events\n * by default will appear as if they are the primary pointer of their type.\n * https://www.w3.org/TR/pointerevents2/#dom-pointerevent-isprimary.\n *\n * For example, if pointer events for a multi-touch interaction are created, the non-primary\n * pointer touches would need to be represented by non-primary pointer events.\n *\n * @docs-private\n */\nexport function createPointerEvent(type: string, clientX = 0, clientY = 0,\n options: PointerEventInit = {isPrimary: true}) {\n return new PointerEvent(type, {\n bubbles: true,\n cancelable: true,\n view: window,\n clientX,\n clientY,\n ...options,\n });\n}\n\n/**\n * Creates a browser TouchEvent with the specified pointer coordinates.\n * @docs-private\n */\nexport function createTouchEvent(type: string, pageX = 0, pageY = 0) {\n // In favor of creating events that work for most of the browsers, the event is created\n // as a basic UI Event. The necessary details for the event will be set manually.\n const event = document.createEvent('UIEvent');\n const touchDetails = {pageX, pageY};\n\n // TS3.6 removes the initUIEvent method and suggests porting to \"new UIEvent()\".\n (event as any).initUIEvent(type, true, true, window, 0);\n\n // Most of the browsers don't have a \"initTouchEvent\" method that can be used to define\n // the touch details.\n defineReadonlyEventProperty(event, 'touches', [touchDetails]);\n defineReadonlyEventProperty(event, 'targetTouches', [touchDetails]);\n defineReadonlyEventProperty(event, 'changedTouches', [touchDetails]);\n\n return event;\n}\n\n/**\n * Creates a keyboard event with the specified key and modifiers.\n * @docs-private\n */\nexport function createKeyboardEvent(type: string, keyCode: number = 0, key: string = '',\n modifiers: ModifierKeys = {}) {\n const event = document.createEvent('KeyboardEvent');\n const originalPreventDefault = event.preventDefault.bind(event);\n\n // Firefox does not support `initKeyboardEvent`, but supports `initKeyEvent`.\n // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyEvent.\n if ((event as any).initKeyEvent !== undefined) {\n (event as any).initKeyEvent(type, true, true, window, modifiers.control, modifiers.alt,\n modifiers.shift, modifiers.meta, keyCode);\n } else {\n // `initKeyboardEvent` expects to receive modifiers as a whitespace-delimited string\n // See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyboardEvent\n let modifiersList = '';\n\n if (modifiers.control) {\n modifiersList += 'Control ';\n }\n\n if (modifiers.alt) {\n modifiersList += 'Alt ';\n }\n\n if (modifiers.shift) {\n modifiersList += 'Shift ';\n }\n\n if (modifiers.meta) {\n modifiersList += 'Meta ';\n }\n\n // TS3.6 removed the `initKeyboardEvent` method and suggested porting to\n // `new KeyboardEvent()` constructor. We cannot use that as we support IE11.\n // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyboardEvent.\n (event as any).initKeyboardEvent(type,\n true, /* canBubble */\n true, /* cancelable */\n window, /* view */\n 0, /* char */\n key, /* key */\n 0, /* location */\n modifiersList.trim(), /* modifiersList */\n false /* repeat */);\n }\n\n // Webkit Browsers don't set the keyCode when calling the init function.\n // See related bug https://bugs.webkit.org/show_bug.cgi?id=16735\n defineReadonlyEventProperty(event, 'keyCode', keyCode);\n defineReadonlyEventProperty(event, 'key', key);\n defineReadonlyEventProperty(event, 'ctrlKey', !!modifiers.control);\n defineReadonlyEventProperty(event, 'altKey', !!modifiers.alt);\n defineReadonlyEventProperty(event, 'shiftKey', !!modifiers.shift);\n defineReadonlyEventProperty(event, 'metaKey', !!modifiers.meta);\n\n // IE won't set `defaultPrevented` on synthetic events so we need to do it manually.\n event.preventDefault = function() {\n defineReadonlyEventProperty(event, 'defaultPrevented', true);\n return originalPreventDefault();\n };\n\n return event;\n}\n\n/**\n * Creates a fake event object with any desired event type.\n * @docs-private\n */\nexport function createFakeEvent(type: string, canBubble = false, cancelable = true) {\n const event = document.createEvent('Event');\n event.initEvent(type, canBubble, cancelable);\n return event;\n}\n\n/**\n * Defines a readonly property on the given event object. Readonly properties on an event object\n * are always set as configurable as that matches default readonly properties for DOM event objects.\n */\nfunction defineReadonlyEventProperty(event: Event, propertyName: string, value: any) {\n Object.defineProperty(event, propertyName, {get: () => value, configurable: true});\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ModifierKeys} from '@angular/cdk/testing';\nimport {\n createFakeEvent,\n createKeyboardEvent,\n createMouseEvent,\n createPointerEvent,\n createTouchEvent,\n} from './event-objects';\n\n/**\n * Utility to dispatch any event on a Node.\n * @docs-private\n */\nexport function dispatchEvent<T extends Event>(node: Node | Window, event: T): T {\n node.dispatchEvent(event);\n return event;\n}\n\n/**\n * Shorthand to dispatch a fake event on a specified node.\n * @docs-private\n */\nexport function dispatchFakeEvent(node: Node | Window, type: string, canBubble?: boolean): Event {\n return dispatchEvent(node, createFakeEvent(type, canBubble));\n}\n\n/**\n * Shorthand to dispatch a keyboard event with a specified key code and\n * optional modifiers.\n * @docs-private\n */\nexport function dispatchKeyboardEvent(node: Node, type: string, keyCode?: number, key?: string,\n modifiers?: ModifierKeys): KeyboardEvent {\n return dispatchEvent(node,\n createKeyboardEvent(type, keyCode, key, modifiers));\n}\n\n/**\n * Shorthand to dispatch a mouse event on the specified coordinates.\n * @docs-private\n */\nexport function dispatchMouseEvent( node: Node, type: string, clientX = 0, clientY = 0,\n button?: number, modifiers?: ModifierKeys): MouseEvent {\n return dispatchEvent(node, createMouseEvent(type, clientX, clientY, button, modifiers));\n}\n\n/**\n * Shorthand to dispatch a pointer event on the specified coordinates.\n * @docs-private\n */\nexport function dispatchPointerEvent(node: Node, type: string, clientX = 0, clientY = 0,\n options?: PointerEventInit): PointerEvent {\n return dispatchEvent(node, createPointerEvent(type, clientX, clientY, options)) as PointerEvent;\n}\n\n/**\n * Shorthand to dispatch a touch event on the specified coordinates.\n * @docs-private\n */\nexport function dispatchTouchEvent(node: Node, type: string, x = 0, y = 0) {\n return dispatchEvent(node, createTouchEvent(type, x, y));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {dispatchFakeEvent} from './dispatch-events';\n\nfunction triggerFocusChange(element: HTMLElement, event: 'focus' | 'blur') {\n let eventFired = false;\n const handler = () => eventFired = true;\n element.addEventListener(event, handler);\n element[event]();\n element.removeEventListener(event, handler);\n if (!eventFired) {\n dispatchFakeEvent(element, event);\n }\n}\n\n/**\n * Patches an elements focus and blur methods to emit events consistently and predictably.\n * This is necessary, because some browsers, like IE11, will call the focus handlers asynchronously,\n * while others won't fire them at all if the browser window is not focused.\n * @docs-private\n */\nexport function patchElementFocus(element: HTMLElement) {\n element.focus = () => dispatchFakeEvent(element, 'focus');\n element.blur = () => dispatchFakeEvent(element, 'blur');\n}\n\n/** @docs-private */\nexport function triggerFocus(element: HTMLElement) {\n triggerFocusChange(element, 'focus');\n}\n\n/** @docs-private */\nexport function triggerBlur(element: HTMLElement) {\n triggerFocusChange(element, 'blur');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ModifierKeys} from '@angular/cdk/testing';\nimport {PERIOD} from '@angular/cdk/keycodes';\nimport {dispatchFakeEvent, dispatchKeyboardEvent} from './dispatch-events';\nimport {triggerFocus} from './element-focus';\n\n/** Input types for which the value can be entered incrementally. */\nconst incrementalInputTypes =\n new Set(['text', 'email', 'hidden', 'password', 'search', 'tel', 'url']);\n\n/**\n * Checks whether the given Element is a text input element.\n * @docs-private\n */\nexport function isTextInput(element: Element): element is HTMLInputElement | HTMLTextAreaElement {\n const nodeName = element.nodeName.toLowerCase();\n return nodeName === 'input' || nodeName === 'textarea';\n}\n\n/**\n * Focuses an input, sets its value and dispatches\n * the `input` event, simulating the user typing.\n * @param element Element onto which to set the value.\n * @param keys The keys to send to the element.\n * @docs-private\n */\nexport function typeInElement(\n element: HTMLElement, ...keys: (string | {keyCode?: number, key?: string})[]): void;\n\n/**\n * Focuses an input, sets its value and dispatches\n * the `input` event, simulating the user typing.\n * @param element Element onto which to set the value.\n * @param modifiers Modifier keys that are held while typing.\n * @param keys The keys to send to the element.\n * @docs-private\n */\nexport function typeInElement(element: HTMLElement, modifiers: ModifierKeys,\n ...keys: (string | {keyCode?: number, key?: string})[]): void;\n\nexport function typeInElement(element: HTMLElement, ...modifiersAndKeys: any) {\n const first = modifiersAndKeys[0];\n let modifiers: ModifierKeys;\n let rest: (string | {keyCode?: number, key?: string})[];\n if (typeof first !== 'string' && first.keyCode === undefined && first.key === undefined) {\n modifiers = first;\n rest = modifiersAndKeys.slice(1);\n } else {\n modifiers = {};\n rest = modifiersAndKeys;\n }\n const isInput = isTextInput(element);\n const inputType = element.getAttribute('type') || 'text';\n const keys: {keyCode?: number, key?: string}[] = rest\n .map(k => typeof k === 'string' ?\n k.split('').map(c => ({keyCode: c.toUpperCase().charCodeAt(0), key: c})) : [k])\n .reduce((arr, k) => arr.concat(k), []);\n\n // We simulate the user typing in a value by incrementally assigning the value below. The problem\n // is that for some input types, the browser won't allow for an invalid value to be set via the\n // `value` property which will always be the case when going character-by-character. If we detect\n // such an input, we have to set the value all at once or listeners to the `input` event (e.g.\n // the `ReactiveFormsModule` uses such an approach) won't receive the correct value.\n const enterValueIncrementally = inputType === 'number' && keys.length > 0 ?\n // The value can be set character by character in number inputs if it doesn't have any decimals.\n keys.every(key => key.key !== '.' && key.keyCode !== PERIOD) :\n incrementalInputTypes.has(inputType);\n\n triggerFocus(element);\n\n // When we aren't entering the value incrementally, assign it all at once ahead\n // of time so that any listeners to the key events below will have access to it.\n if (!enterValueIncrementally) {\n (element as HTMLInputElement).value = keys.reduce((value, key) => value + (key.key || ''), '');\n }\n\n for (const key of keys) {\n dispatchKeyboardEvent(element, 'keydown', key.keyCode, key.key, modifiers);\n dispatchKeyboardEvent(element, 'keypress', key.keyCode, key.key, modifiers);\n if (isInput && key.key && key.key.length === 1) {\n if (enterValueIncrementally) {\n (element as HTMLInputElement | HTMLTextAreaElement).value += key.key;\n dispatchFakeEvent(element, 'input');\n }\n }\n dispatchKeyboardEvent(element, 'keyup', key.keyCode, key.key, modifiers);\n }\n\n // Since we weren't dispatching `input` events while sending the keys, we have to do it now.\n if (!enterValueIncrementally) {\n dispatchFakeEvent(element, 'input');\n }\n}\n\n/**\n * Clears the text in an input or textarea element.\n * @docs-private\n */\nexport function clearElement(element: HTMLInputElement | HTMLTextAreaElement) {\n triggerFocus(element as HTMLElement);\n element.value = '';\n dispatchFakeEvent(element, 'input');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// These are private APIs that are used both by the public APIs inside of this package, as well\n// as in unit tests of other entry-points, hence why we need to re-export them through here.\nexport * from './dispatch-events';\nexport * from './event-objects';\nexport * from './element-focus';\nexport * from './type-in-element';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as keyCodes from '@angular/cdk/keycodes';\nimport {\n _getTextWithExcludedElements,\n ElementDimensions,\n ModifierKeys,\n TestElement,\n TestKey,\n TextOptions,\n EventData,\n} from '@angular/cdk/testing';\nimport {\n clearElement,\n createFakeEvent,\n dispatchFakeEvent,\n dispatchMouseEvent,\n dispatchPointerEvent,\n isTextInput,\n triggerBlur,\n triggerFocus,\n typeInElement,\n dispatchEvent,\n} from './fake-events';\n\n/** Maps `TestKey` constants to the `keyCode` and `key` values used by native browser events. */\nconst keyMap = {\n [TestKey.BACKSPACE]: {keyCode: keyCodes.BACKSPACE, key: 'Backspace'},\n [TestKey.TAB]: {keyCode: keyCodes.TAB, key: 'Tab'},\n [TestKey.ENTER]: {keyCode: keyCodes.ENTER, key: 'Enter'},\n [TestKey.SHIFT]: {keyCode: keyCodes.SHIFT, key: 'Shift'},\n [TestKey.CONTROL]: {keyCode: keyCodes.CONTROL, key: 'Control'},\n [TestKey.ALT]: {keyCode: keyCodes.ALT, key: 'Alt'},\n [TestKey.ESCAPE]: {keyCode: keyCodes.ESCAPE, key: 'Escape'},\n [TestKey.PAGE_UP]: {keyCode: keyCodes.PAGE_UP, key: 'PageUp'},\n [TestKey.PAGE_DOWN]: {keyCode: keyCodes.PAGE_DOWN, key: 'PageDown'},\n [TestKey.END]: {keyCode: keyCodes.END, key: 'End'},\n [TestKey.HOME]: {keyCode: keyCodes.HOME, key: 'Home'},\n [TestKey.LEFT_ARROW]: {keyCode: keyCodes.LEFT_ARROW, key: 'ArrowLeft'},\n [TestKey.UP_ARROW]: {keyCode: keyCodes.UP_ARROW, key: 'ArrowUp'},\n [TestKey.RIGHT_ARROW]: {keyCode: keyCodes.RIGHT_ARROW, key: 'ArrowRight'},\n [TestKey.DOWN_ARROW]: {keyCode: keyCodes.DOWN_ARROW, key: 'ArrowDown'},\n [TestKey.INSERT]: {keyCode: keyCodes.INSERT, key: 'Insert'},\n [TestKey.DELETE]: {keyCode: keyCodes.DELETE, key: 'Delete'},\n [TestKey.F1]: {keyCode: keyCodes.F1, key: 'F1'},\n [TestKey.F2]: {keyCode: keyCodes.F2, key: 'F2'},\n [TestKey.F3]: {keyCode: keyCodes.F3, key: 'F3'},\n [TestKey.F4]: {keyCode: keyCodes.F4, key: 'F4'},\n [TestKey.F5]: {keyCode: keyCodes.F5, key: 'F5'},\n [TestKey.F6]: {keyCode: keyCodes.F6, key: 'F6'},\n [TestKey.F7]: {keyCode: keyCodes.F7, key: 'F7'},\n [TestKey.F8]: {keyCode: keyCodes.F8, key: 'F8'},\n [TestKey.F9]: {keyCode: keyCodes.F9, key: 'F9'},\n [TestKey.F10]: {keyCode: keyCodes.F10, key: 'F10'},\n [TestKey.F11]: {keyCode: keyCodes.F11, key: 'F11'},\n [TestKey.F12]: {keyCode: keyCodes.F12, key: 'F12'},\n [TestKey.META]: {keyCode: keyCodes.META, key: 'Meta'}\n};\n\n/** A `TestElement` implementation for unit tests. */\nexport class UnitTestElement implements TestElement {\n constructor(readonly element: Element, private _stabilize: () => Promise<void>) {}\n\n /** Blur the element. */\n async blur(): Promise<void> {\n triggerBlur(this.element as HTMLElement);\n await this._stabilize();\n }\n\n /** Clear the element's input (for input and textarea elements only). */\n async clear(): Promise<void> {\n if (!isTextInput(this.element)) {\n throw Error('Attempting to clear an invalid element');\n }\n clearElement(this.element);\n await this._stabilize();\n }\n\n /**\n * Click the element at the default location for the current environment. If you need to guarantee\n * the element is clicked at a specific location, consider using `click('center')` or\n * `click(x, y)` instead.\n */\n click(modifiers?: ModifierKeys): Promise<void>;\n /** Click the element at the element's center. */\n click(location: 'center', modifiers?: ModifierKeys): Promise<void>;\n /**\n * Click the element at the specified coordinates relative to the top-left of the element.\n * @param relativeX Coordinate within the element, along the X-axis at which to click.\n * @param relativeY Coordinate within the element, along the Y-axis at which to click.\n * @param modifiers Modifier keys held while clicking\n */\n click(relativeX: number, relativeY: number, modifiers?: ModifierKeys): Promise<void>;\n async click(...args: [ModifierKeys?] | ['center', ModifierKeys?] |\n [number, number, ModifierKeys?]): Promise<void> {\n await this._dispatchMouseEventSequence('click', args, 0);\n await this._stabilize();\n }\n\n /**\n * Right clicks on the element at the specified coordinates relative to the top-left of it.\n * @param relativeX Coordinate within the element, along the X-axis at which to click.\n * @param relativeY Coordinate within the element, along the Y-axis at which to click.\n * @param modifiers Modifier keys held while clicking\n */\n rightClick(relativeX: number, relativeY: number, modifiers?: ModifierKeys): Promise<void>;\n async rightClick(...args: [ModifierKeys?] | ['center', ModifierKeys?] |\n [number, number, ModifierKeys?]): Promise<void> {\n await this._dispatchMouseEventSequence('contextmenu', args, 2);\n await this._stabilize();\n }\n\n /** Focus the element. */\n async focus(): Promise<void> {\n triggerFocus(this.element as HTMLElement);\n await this._stabilize();\n }\n\n /** Get the computed value of the given CSS property for the element. */\n async getCssValue(property: string): Promise<string> {\n await this._stabilize();\n // TODO(mmalerba): Consider adding value normalization if we run into common cases where its\n // needed.\n return getComputedStyle(this.element).getPropertyValue(property);\n }\n\n /** Hovers the mouse over the element. */\n async hover(): Promise<void> {\n this._dispatchPointerEventIfSupported('pointerenter');\n dispatchMouseEvent(this.element, 'mouseenter');\n await this._stabilize();\n }\n\n /** Moves the mouse away from the element. */\n async mouseAway(): Promise<void> {\n this._dispatchPointerEventIfSupported('pointerleave');\n dispatchMouseEvent(this.element, 'mouseleave');\n await this._stabilize();\n }\n\n /**\n * Sends the given string to the input as a series of key presses. Also fires input events\n * and attempts to add the string to the Element's value.\n */\n async sendKeys(...keys: (string | TestKey)[]): Promise<void>;\n /**\n * Sends the given string to the input as a series of key presses. Also fires input events\n * and attempts to add the string to the Element's value.\n */\n async sendKeys(modifiers: ModifierKeys, ...keys: (string | TestKey)[]): Promise<void>;\n async sendKeys(...modifiersAndKeys: any[]): Promise<void> {\n const args = modifiersAndKeys.map(k => typeof k === 'number' ? keyMap[k as TestKey] : k);\n typeInElement(this.element as HTMLElement, ...args);\n await this._stabilize();\n }\n\n /**\n * Gets the text from the element.\n * @param options Options that affect what text is included.\n */\n async text(options?: TextOptions): Promise<string> {\n await this._stabilize();\n if (options?.exclude) {\n return _getTextWithExcludedElements(this.element, options.exclude);\n }\n return (this.element.textContent || '').trim();\n }\n\n /** Gets the value for the given attribute from the element. */\n async getAttribute(name: string): Promise<string|null> {\n await this._stabilize();\n return this.element.getAttribute(name);\n }\n\n /** Checks whether the element has the given class. */\n async hasClass(name: string): Promise<boolean> {\n await this._stabilize();\n return this.element.classList.contains(name);\n }\n\n /** Gets the dimensions of the element. */\n async getDimensions(): Promise<ElementDimensions> {\n await this._stabilize();\n return this.element.getBoundingClientRect();\n }\n\n /** Gets the value of a property of an element. */\n async getProperty(name: string): Promise<any> {\n await this._stabilize();\n return (this.element as any)[name];\n }\n\n /** Sets the value of a property of an input. */\n async setInputValue(value: string): Promise<void> {\n (this.element as any).value = value;\n await this._stabilize();\n }\n\n /** Selects the options at the specified indexes inside of a native `select` element. */\n async selectOptions(...optionIndexes: number[]): Promise<void> {\n let hasChanged = false;\n const options = this.element.querySelectorAll('option');\n const indexes = new Set(optionIndexes); // Convert to a set to remove duplicates.\n\n for (let i = 0; i < options.length; i++) {\n const option = options[i];\n const wasSelected = option.selected;\n\n // We have to go through `option.selected`, because `HTMLSelectElement.value` doesn't\n // allow for multiple options to be selected, even in `multiple` mode.\n option.selected = indexes.has(i);\n\n if (option.selected !== wasSelected) {\n hasChanged = true;\n dispatchFakeEvent(this.element, 'change');\n }\n }\n\n if (hasChanged) {\n await this._stabilize();\n }\n }\n\n /** Checks whether this element matches the given selector. */\n async matchesSelector(selector: string): Promise<boolean> {\n await this._stabilize();\n const elementPrototype = Element.prototype as any;\n return (elementPrototype['matches'] || elementPrototype['msMatchesSelector'])\n .call(this.element, selector);\n }\n\n /** Checks whether the element is focused. */\n async isFocused(): Promise<boolean> {\n await this._stabilize();\n return document.activeElement === this.element;\n }\n\n /**\n * Dispatches an event with a particular name.\n * @param name Name of the event to be dispatched.\n */\n async dispatchEvent(name: string, data?: Record<string, EventData>): Promise<void> {\n const event = createFakeEvent(name);\n\n if (data) {\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the original object.\n Object.assign(event, data);\n }\n\n dispatchEvent(this.element, event);\n await this._stabilize();\n }\n\n /**\n * Dispatches a pointer event on the current element if the browser supports it.\n * @param name Name of the pointer event to be dispatched.\n * @param clientX Coordinate of the user's pointer along the X axis.\n * @param clientY Coordinate of the user's pointer along the Y axis.\n * @param button Mouse button that should be pressed when dispatching the event.\n */\n private _dispatchPointerEventIfSupported(\n name: string, clientX?: number, clientY?: number, button?: number) {\n // The latest versions of all browsers we support have the new `PointerEvent` API.\n // Though since we capture the two most recent versions of these browsers, we also\n // need to support Safari 12 at time of writing. Safari 12 does not have support for this,\n // so we need to conditionally create and dispatch these events based on feature detection.\n if (typeof PointerEvent !== 'undefined' && PointerEvent) {\n dispatchPointerEvent(this.element, name, clientX, clientY, {isPrimary: true, button});\n }\n }\n\n /** Dispatches all the events that are part of a mouse event sequence. */\n private async _dispatchMouseEventSequence(\n name: string,\n args: [ModifierKeys?] | ['center', ModifierKeys?] | [number, number, ModifierKeys?],\n button?: number) {\n let clientX: number | undefined = undefined;\n let clientY: number | undefined = undefined;\n let modifiers: ModifierKeys = {};\n\n if (args.length && typeof args[args.length - 1] === 'object') {\n modifiers = args.pop() as ModifierKeys;\n }\n\n if (args.length) {\n const {left, top, width, height} = await this.getDimensions();\n const relativeX = args[0] === 'center' ? width / 2 : args[0] as number;\n const relativeY = args[0] === 'center' ? height / 2 : args[1] as number;\n\n // Round the computed click position as decimal pixels are not\n // supported by mouse events and could lead to unexpected results.\n clientX = Math.round(left + relativeX);\n clientY = Math.round(top + relativeY);\n }\n\n this._dispatchPointerEventIfSupported('pointerdown', clientX, clientY, button);\n dispatchMouseEvent(this.element, 'mousedown', clientX, clientY, button, modifiers);\n this._dispatchPointerEventIfSupported('pointerup', clientX, clientY, button);\n dispatchMouseEvent(this.element, 'mouseup', clientX, clientY, button, modifiers);\n dispatchMouseEvent(this.element, name, clientX, clientY, button, modifiers);\n\n // This call to _stabilize should not be needed since the callers will already do that them-\n // selves. Nevertheless it breaks some tests in g3 without it. It needs to be investigated\n // why removing breaks those tests.\n await this._stabilize();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n handleAutoChangeDetectionStatus,\n HarnessEnvironment,\n HarnessLoader,\n stopHandlingAutoChangeDetectionStatus,\n TestElement\n} from '@angular/cdk/testing';\nimport {ComponentFixture, flush} from '@angular/core/testing';\nimport {Observable} from 'rxjs';\nimport {takeWhile} from 'rxjs/operators';\nimport {TaskState, TaskStateZoneInterceptor} from './task-state-zone-interceptor';\nimport {UnitTestElement} from './unit-test-element';\n\n/** Options to configure the environment. */\nexport interface TestbedHarnessEnvironmentOptions {\n /** The query function used to find DOM elements. */\n queryFn: (selector: string, root: Element) => Iterable<Element> | ArrayLike<Element>;\n}\n\n/** The default environment options. */\nconst defaultEnvironmentOptions: TestbedHarnessEnvironmentOptions = {\n queryFn: (selector: string, root: Element) => root.querySelectorAll(selector)\n};\n\n/** Whether auto change detection is currently disabled. */\nlet disableAutoChangeDetection = false;\n\n/**\n * The set of non-destroyed fixtures currently being used by `TestbedHarnessEnvironment` instances.\n */\nconst activeFixtures = new Set<ComponentFixture<unknown>>();\n\n/**\n * Installs a handler for change detection batching status changes for a specific fixture.\n * @param fixture The fixture to handle change detection batching for.\n */\nfunction installAutoChangeDetectionStatusHandler(fixture: ComponentFixture<unknown>) {\n if (!activeFixtures.size) {\n handleAutoChangeDetectionStatus(({isDisabled, onDetectChangesNow}) => {\n disableAutoChangeDetection = isDisabled;\n if (onDetectChangesNow) {\n Promise.all(Array.from(activeFixtures).map(detectChanges)).then(onDetectChangesNow);\n }\n });\n }\n activeFixtures.add(fixture);\n}\n\n/**\n * Uninstalls a handler for change detection batching status changes for a specific fixture.\n * @param fixture The fixture to stop handling change detection batching for.\n */\nfunction uninstallAutoChangeDetectionStatusHandler(fixture: ComponentFixture<unknown>) {\n activeFixtures.delete(fixture);\n if (!activeFixtures.size) {\n stopHandlingAutoChangeDetectionStatus();\n }\n}\n\n/** Whether we are currently in the fake async zone. */\nfunction isInFakeAsyncZone() {\n return Zone!.current.get('FakeAsyncTestZoneSpec') != null;\n}\n\n/**\n * Triggers change detection for a specific fixture.\n * @param fixture The fixture to trigger change detection for.\n */\nasync function detectChanges(fixture: ComponentFixture<unknown>) {\n fixture.detectChanges();\n if (isInFakeAsyncZone()) {\n flush();\n } else {\n await fixture.whenStable();\n }\n}\n\n/** A `HarnessEnvironment` implementation for Angular's Testbed. */\nexport class TestbedHarnessEnvironment extends HarnessEnvironment<Element> {\n /** Whether the environment has been destroyed. */\n private _destroyed = false;\n\n /** Observable that emits whenever the test task state changes. */\n private _taskState: Observable<TaskState>;\n\n /** The options for this environment. */\n private _options: TestbedHarnessEnvironmentOptions;\n\n protected constructor(rawRootElement: Element, private _fixture: ComponentFixture<unknown>,\n options?: TestbedHarnessEnvironmentOptions) {\n super(rawRootElement);\n this._options = {...defaultEnvironmentOptions, ...options};\n this._taskState = TaskStateZoneInterceptor.setup();\n installAutoChangeDetectionStatusHandler(_fixture);\n _fixture.componentRef.onDestroy(() => {\n uninstallAutoChangeDetectionStatusHandler(_fixture);\n this._destroyed = true;\n });\n }\n\n /** Creates a `HarnessLoader` rooted at the given fixture's root element. */\n static loader(fixture: ComponentFixture<unknown>, options?: TestbedHarnessEnvironmentOptions):\n HarnessLoader {\n return new TestbedHarnessEnvironment(fixture.nativeElement, fixture, options);\n }\n\n /**\n * Creates a `HarnessLoader` at the document root. This can be used if harnesses are\n * located outside of a fixture (e.g. overlays appended to the document body).\n */\n static documentRootLoader(fixture: ComponentFixture<unknown>,\n options?: TestbedHarnessEnvironmentOptions): HarnessLoader {\n return new TestbedHarnessEnvironment(document.body, fixture, options);\n }\n\n /** Gets the native DOM element corresponding to the given TestElement. */\n static getNativeElement(el: TestElement): Element {\n if (el instanceof UnitTestElement) {\n return el.element;\n }\n throw Error('This TestElement was not created by the TestbedHarnessEnvironment');\n }\n\n /**\n * Creates an instance of the given harness type, using the fixture's root element as the\n * harness's host element. This method should be used when creating a harness for the root element\n * of a fixture, as components do not have the correct selector when they are created as the root\n * of the fixture.\n */\n static async harnessForFixture<T extends ComponentHarness>(\n fixture: ComponentFixture<unknown>, harnessType: ComponentHarnessConstructor<T>,\n options?: TestbedHarnessEnvironmentOptions): Promise<T> {\n const environment = new TestbedHarnessEnvironment(fixture.nativeElement, fixture, options);\n await environment.forceStabilize();\n return environment.createComponentHarness(harnessType, fixture.nativeElement);\n }\n\n /**\n * Flushes change detection and async tasks captured in the Angular zone.\n * In most cases it should not be necessary to call this manually. However, there may be some edge\n * cases where it is needed to fully flush animation events.\n */\n async forceStabilize(): Promise<void> {\n if (!disableAutoChangeDetection) {\n if (this._destroyed) {\n throw Error('Harness is attempting to use a fixture that has already been destroyed.');\n }\n\n await detectChanges(this._fixture);\n }\n }\n\n /**\n * Waits for all scheduled or running async tasks to complete. This allows harness\n * authors to wait for async tasks outside of the Angular zone.\n */\n async waitForTasksOutsideAngular(): Promise<void> {\n // If we run in the fake async zone, we run \"flush\" to run any scheduled tasks. This\n // ensures that the harnesses behave inside of the FakeAsyncTestZone similar to the\n // \"AsyncTestZone\" and the root zone (i.e. neither fakeAsync or async). Note that we\n // cannot just rely on the task state observable to become stable because the state will\n // never change. This is because the task queue will be only drained if the fake async\n // zone is being flushed.\n if (isInFakeAsyncZone()) {\n flush();\n }\n\n // Wait until the task queue has been drained and the zone is stable. Note that\n // we cannot rely on \"fixture.whenStable\" since it does not catch tasks scheduled\n // outside of the Angular zone. For test harnesses, we want to ensure that the\n // app is fully stabilized and therefore need to use our own zone interceptor.\n await this._taskState.pipe(takeWhile(state => !state.stable)).toPromise();\n }\n\n /** Gets the root element for the document. */\n protected getDocumentRoot(): Element {\n return document.body;\n }\n\n /** Creates a `TestElement` from a raw element. */\n protected createTestElement(element: Element): TestElement {\n return new UnitTestElement(element, () => this.forceStabilize());\n }\n\n /** Creates a `HarnessLoader` rooted at the given raw element. */\n protected createEnvironment(element: Element): HarnessEnvironment<Element> {\n return new TestbedHarnessEnvironment(element, this._fixture, this._options);\n }\n\n /**\n * Gets a list of all elements matching the given selector under this environment's root element.\n */\n protected async getAllRawElements(selector: string): Promise<Element[]> {\n await this.forceStabilize();\n return Array.from(this._options.queryFn(selector, this.rawRootElement));\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './testbed-harness-environment';\nexport * from './unit-test-element';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;AAiBA;AACA,MAAM,qBAAqB,GAAG,MAAM,CAAC,mCAAmC,CAAC,CAAC;AAO1E;;;;;;MAMa,wBAAwB;IAQnC,YAAoB,UAA6B;QAA7B,eAAU,GAAV,UAAU,CAAmB;;QANhC,kBAAa,GAAG,IAAI,eAAe,CAChD,IAAI,CAAC,UAAU,GAAG,IA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AiB,CAAC,OAAgB;QAC1C,OAAO,IAAI,eAAe,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;KAClE;;IAGS,iBAAiB,CAAC,OAAgB;QAC1C,OAAO,IAAI,yBAAyB,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC7E;;;;IAKe,iBAAiB,CAAC,QAAgB;;YAChD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;YAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;SACzE;KAAA;;;AC7MH;;;;;;;;ACAA;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"testing__testbed.js","sources":["../../../../../../src/cdk/testing/testbed/task-state-zone-interceptor.ts","../../../../../../src/cdk/testing/testbed/fake-events/event-objects.ts","../../../../../../src/cdk/testing/testbed/fake-events/dispatch-events.ts","../../../../../../src/cdk/testing/testbed/fake-events/element-focus.ts","../../../../../../src/cdk/testing/testbed/fake-events/type-in-element.ts","../../../../../../src/cdk/testing/testbed/fake-events/index.ts","../../../../../../src/cdk/testing/testbed/unit-test-element.ts","../../../../../../src/cdk/testing/testbed/testbed-harness-environment.ts","../../../../../../src/cdk/testing/testbed/public-api.ts","../../../../../../src/cdk/testing/testbed/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {ProxyZone, ProxyZoneStatic} from './proxy-zone-types';\n\n/** Current state of the intercepted zone. */\nexport interface TaskState {\n /** Whether the zone is stable (i.e. no microtasks and macrotasks). */\n stable: boolean;\n}\n\n/** Unique symbol that is used to patch a property to a proxy zone. */\nconst stateObservableSymbol = Symbol('ProxyZone_PATCHED#stateObservable');\n\n/** Type that describes a potentially patched proxy zone instance. */\ntype PatchedProxyZone = ProxyZone & {\n [stateObservableSymbol]: undefined|Observable<TaskState>;\n};\n\n/**\n * Interceptor that can be set up in a `ProxyZone` instance. The interceptor\n * will keep track of the task state and emit whenever the state changes.\n *\n * This serves as a workaround for https://github.com/angular/angular/issues/32896.\n */\nexport class TaskStateZoneInterceptor {\n /** Subject that can be used to emit a new state change. */\n private readonly _stateSubject = new BehaviorSubject<TaskState>(\n this._lastState ? this._getTaskStateFromInternalZoneState(this._lastState) : {stable: true});\n\n /** Public observable that emits whenever the task state changes. */\n readonly state: Observable<TaskState> = this._stateSubject;\n\n constructor(private _lastState: HasTaskState|null) {}\n\n /** This will be called whenever the task state changes in the intercepted zone. */\n onHasTask(delegate: ZoneDelegate, current: Zone, target: Zone, hasTaskState: HasTaskState) {\n if (current === target) {\n this._stateSubject.next(this._getTaskStateFromInternalZoneState(hasTaskState));\n }\n }\n\n /** Gets the task state from the internal ZoneJS task state. */\n private _getTaskStateFromInternalZoneState(state: HasTaskState): TaskState {\n return {stable: !state.macroTask && !state.microTask};\n }\n\n /**\n * Sets up the custom task state Zone interceptor in the `ProxyZone`. Throws if\n * no `ProxyZone` could be found.\n * @returns an observable that emits whenever the task state changes.\n */\n static setup(): Observable<TaskState> {\n if (Zone === undefined) {\n throw Error('Could not find ZoneJS. For test harnesses running in TestBed, ' +\n 'ZoneJS needs to be installed.');\n }\n\n // tslint:disable-next-line:variable-name\n const ProxyZoneSpec = (Zone as any)['ProxyZoneSpec'] as ProxyZoneStatic|undefined;\n\n // If there is no \"ProxyZoneSpec\" installed, we throw an error and recommend\n // setting up the proxy zone by pulling in the testing bundle.\n if (!ProxyZoneSpec) {\n throw Error(\n 'ProxyZoneSpec is needed for the test harnesses but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/zone-testing.js');\n }\n\n // Ensure that there is a proxy zone instance set up, and get\n // a reference to the instance if present.\n const zoneSpec = ProxyZoneSpec.assertPresent() as PatchedProxyZone;\n\n // If there already is a delegate registered in the proxy zone, and it\n // is type of the custom task state interceptor, we just use that state\n // observable. This allows us to only intercept Zone once per test\n // (similar to how `fakeAsync` or `async` work).\n if (zoneSpec[stateObservableSymbol]) {\n return zoneSpec[stateObservableSymbol]!;\n }\n\n // Since we intercept on environment creation and the fixture has been\n // created before, we might have missed tasks scheduled before. Fortunately\n // the proxy zone keeps track of the previous task state, so we can just pass\n // this as initial state to the task zone interceptor.\n const interceptor = new TaskStateZoneInterceptor(zoneSpec.lastTaskState);\n const zoneSpecOnHasTask = zoneSpec.onHasTask.bind(zoneSpec);\n\n // We setup the task state interceptor in the `ProxyZone`. Note that we cannot register\n // the interceptor as a new proxy zone delegate because it would mean that other zone\n // delegates (e.g. `FakeAsyncTestZone` or `AsyncTestZone`) can accidentally overwrite/disable\n // our interceptor. Since we just intend to monitor the task state of the proxy zone, it is\n // sufficient to just patch the proxy zone. This also avoids that we interfere with the task\n // queue scheduling logic.\n zoneSpec.onHasTask = function(...args: [ZoneDelegate, Zone, Zone, HasTaskState]) {\n zoneSpecOnHasTask(...args);\n interceptor.onHasTask(...args);\n };\n\n return zoneSpec[stateObservableSymbol] = interceptor.state;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ModifierKeys} from '@angular/cdk/testing';\n\n/** Used to generate unique IDs for events. */\nlet uniqueIds = 0;\n\n/**\n * Creates a browser MouseEvent with the specified options.\n * @docs-private\n */\nexport function createMouseEvent(\n type: string, clientX = 0, clientY = 0, button = 0, modifiers: ModifierKeys = {}) {\n const event = document.createEvent('MouseEvent');\n const originalPreventDefault = event.preventDefault.bind(event);\n\n // Note: We cannot determine the position of the mouse event based on the screen\n // because the dimensions and position of the browser window are not available\n // To provide reasonable `screenX` and `screenY` coordinates, we simply use the\n // client coordinates as if the browser is opened in fullscreen.\n const screenX = clientX;\n const screenY = clientY;\n\n event.initMouseEvent(type,\n /* canBubble */ true,\n /* cancelable */ true,\n /* view */ window,\n /* detail */ 0,\n /* screenX */ screenX,\n /* screenY */ screenY,\n /* clientX */ clientX,\n /* clientY */ clientY,\n /* ctrlKey */ !!modifiers.control,\n /* altKey */ !!modifiers.alt,\n /* shiftKey */ !!modifiers.shift,\n /* metaKey */ !!modifiers.meta,\n /* button */ button,\n /* relatedTarget */ null);\n\n // `initMouseEvent` doesn't allow us to pass the `buttons` and\n // defaults it to 0 which looks like a fake event.\n defineReadonlyEventProperty(event, 'buttons', 1);\n\n // IE won't set `defaultPrevented` on synthetic events so we need to do it manually.\n event.preventDefault = function() {\n defineReadonlyEventProperty(event, 'defaultPrevented', true);\n return originalPreventDefault();\n };\n\n return event;\n}\n\n/**\n * Creates a browser `PointerEvent` with the specified options. Pointer events\n * by default will appear as if they are the primary pointer of their type.\n * https://www.w3.org/TR/pointerevents2/#dom-pointerevent-isprimary.\n *\n * For example, if pointer events for a multi-touch interaction are created, the non-primary\n * pointer touches would need to be represented by non-primary pointer events.\n *\n * @docs-private\n */\nexport function createPointerEvent(type: string, clientX = 0, clientY = 0,\n options: PointerEventInit = {isPrimary: true}) {\n return new PointerEvent(type, {\n bubbles: true,\n cancelable: true,\n view: window,\n clientX,\n clientY,\n ...options,\n });\n}\n\n/**\n * Creates a browser TouchEvent with the specified pointer coordinates.\n * @docs-private\n */\nexport function createTouchEvent(type: string, pageX = 0, pageY = 0, clientX = 0, clientY = 0) {\n // In favor of creating events that work for most of the browsers, the event is created\n // as a basic UI Event. The necessary details for the event will be set manually.\n const event = document.createEvent('UIEvent');\n const touchDetails = {pageX, pageY, clientX, clientY, id: uniqueIds++};\n\n // TS3.6 removes the initUIEvent method and suggests porting to \"new UIEvent()\".\n (event as any).initUIEvent(type, true, true, window, 0);\n\n // Most of the browsers don't have a \"initTouchEvent\" method that can be used to define\n // the touch details.\n defineReadonlyEventProperty(event, 'touches', [touchDetails]);\n defineReadonlyEventProperty(event, 'targetTouches', [touchDetails]);\n defineReadonlyEventProperty(event, 'changedTouches', [touchDetails]);\n\n return event;\n}\n\n/**\n * Creates a keyboard event with the specified key and modifiers.\n * @docs-private\n */\nexport function createKeyboardEvent(type: string, keyCode: number = 0, key: string = '',\n modifiers: ModifierKeys = {}) {\n const event = document.createEvent('KeyboardEvent');\n const originalPreventDefault = event.preventDefault.bind(event);\n\n // Firefox does not support `initKeyboardEvent`, but supports `initKeyEvent`.\n // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyEvent.\n if ((event as any).initKeyEvent !== undefined) {\n (event as any).initKeyEvent(type, true, true, window, modifiers.control, modifiers.alt,\n modifiers.shift, modifiers.meta, keyCode);\n } else {\n // `initKeyboardEvent` expects to receive modifiers as a whitespace-delimited string\n // See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyboardEvent\n let modifiersList = '';\n\n if (modifiers.control) {\n modifiersList += 'Control ';\n }\n\n if (modifiers.alt) {\n modifiersList += 'Alt ';\n }\n\n if (modifiers.shift) {\n modifiersList += 'Shift ';\n }\n\n if (modifiers.meta) {\n modifiersList += 'Meta ';\n }\n\n // TS3.6 removed the `initKeyboardEvent` method and suggested porting to\n // `new KeyboardEvent()` constructor. We cannot use that as we support IE11.\n // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyboardEvent.\n (event as any).initKeyboardEvent(type,\n true, /* canBubble */\n true, /* cancelable */\n window, /* view */\n 0, /* char */\n key, /* key */\n 0, /* location */\n modifiersList.trim(), /* modifiersList */\n false /* repeat */);\n }\n\n // Webkit Browsers don't set the keyCode when calling the init function.\n // See related bug https://bugs.webkit.org/show_bug.cgi?id=16735\n defineReadonlyEventProperty(event, 'keyCode', keyCode);\n defineReadonlyEventProperty(event, 'key', key);\n defineReadonlyEventProperty(event, 'ctrlKey', !!modifiers.control);\n defineReadonlyEventProperty(event, 'altKey', !!modifiers.alt);\n defineReadonlyEventProperty(event, 'shiftKey', !!modifiers.shift);\n defineReadonlyEventProperty(event, 'metaKey', !!modifiers.meta);\n\n // IE won't set `defaultPrevented` on synthetic events so we need to do it manually.\n event.preventDefault = function() {\n defineReadonlyEventProperty(event, 'defaultPrevented', true);\n return originalPreventDefault();\n };\n\n return event;\n}\n\n/**\n * Creates a fake event object with any desired event type.\n * @docs-private\n */\nexport function createFakeEvent(type: string, canBubble = false, cancelable = true) {\n const event = document.createEvent('Event');\n event.initEvent(type, canBubble, cancelable);\n return event;\n}\n\n/**\n * Defines a readonly property on the given event object. Readonly properties on an event object\n * are always set as configurable as that matches default readonly properties for DOM event objects.\n */\nfunction defineReadonlyEventProperty(event: Event, propertyName: string, value: any) {\n Object.defineProperty(event, propertyName, {get: () => value, configurable: true});\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ModifierKeys} from '@angular/cdk/testing';\nimport {\n createFakeEvent,\n createKeyboardEvent,\n createMouseEvent,\n createPointerEvent,\n createTouchEvent,\n} from './event-objects';\n\n/**\n * Utility to dispatch any event on a Node.\n * @docs-private\n */\nexport function dispatchEvent<T extends Event>(node: Node | Window, event: T): T {\n node.dispatchEvent(event);\n return event;\n}\n\n/**\n * Shorthand to dispatch a fake event on a specified node.\n * @docs-private\n */\nexport function dispatchFakeEvent(node: Node | Window, type: string, canBubble?: boolean): Event {\n return dispatchEvent(node, createFakeEvent(type, canBubble));\n}\n\n/**\n * Shorthand to dispatch a keyboard event with a specified key code and\n * optional modifiers.\n * @docs-private\n */\nexport function dispatchKeyboardEvent(node: Node, type: string, keyCode?: number, key?: string,\n modifiers?: ModifierKeys): KeyboardEvent {\n return dispatchEvent(node,\n createKeyboardEvent(type, keyCode, key, modifiers));\n}\n\n/**\n * Shorthand to dispatch a mouse event on the specified coordinates.\n * @docs-private\n */\nexport function dispatchMouseEvent( node: Node, type: string, clientX = 0, clientY = 0,\n button?: number, modifiers?: ModifierKeys): MouseEvent {\n return dispatchEvent(node, createMouseEvent(type, clientX, clientY, button, modifiers));\n}\n\n/**\n * Shorthand to dispatch a pointer event on the specified coordinates.\n * @docs-private\n */\nexport function dispatchPointerEvent(node: Node, type: string, clientX = 0, clientY = 0,\n options?: PointerEventInit): PointerEvent {\n return dispatchEvent(node, createPointerEvent(type, clientX, clientY, options)) as PointerEvent;\n}\n\n/**\n * Shorthand to dispatch a touch event on the specified coordinates.\n * @docs-private\n */\nexport function dispatchTouchEvent(node: Node, type: string, pageX = 0, pageY = 0, clientX = 0,\n clientY = 0) {\n return dispatchEvent(node, createTouchEvent(type, pageX, pageY, clientX, clientY));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {dispatchFakeEvent} from './dispatch-events';\n\nfunction triggerFocusChange(element: HTMLElement, event: 'focus' | 'blur') {\n let eventFired = false;\n const handler = () => eventFired = true;\n element.addEventListener(event, handler);\n element[event]();\n element.removeEventListener(event, handler);\n if (!eventFired) {\n dispatchFakeEvent(element, event);\n }\n}\n\n/**\n * Patches an elements focus and blur methods to emit events consistently and predictably.\n * This is necessary, because some browsers, like IE11, will call the focus handlers asynchronously,\n * while others won't fire them at all if the browser window is not focused.\n * @docs-private\n */\nexport function patchElementFocus(element: HTMLElement) {\n element.focus = () => dispatchFakeEvent(element, 'focus');\n element.blur = () => dispatchFakeEvent(element, 'blur');\n}\n\n/** @docs-private */\nexport function triggerFocus(element: HTMLElement) {\n triggerFocusChange(element, 'focus');\n}\n\n/** @docs-private */\nexport function triggerBlur(element: HTMLElement) {\n triggerFocusChange(element, 'blur');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ModifierKeys} from '@angular/cdk/testing';\nimport {PERIOD} from '@angular/cdk/keycodes';\nimport {dispatchFakeEvent, dispatchKeyboardEvent} from './dispatch-events';\nimport {triggerFocus} from './element-focus';\n\n/** Input types for which the value can be entered incrementally. */\nconst incrementalInputTypes =\n new Set(['text', 'email', 'hidden', 'password', 'search', 'tel', 'url']);\n\n/**\n * Checks whether the given Element is a text input element.\n * @docs-private\n */\nexport function isTextInput(element: Element): element is HTMLInputElement | HTMLTextAreaElement {\n const nodeName = element.nodeName.toLowerCase();\n return nodeName === 'input' || nodeName === 'textarea';\n}\n\n/**\n * Focuses an input, sets its value and dispatches\n * the `input` event, simulating the user typing.\n * @param element Element onto which to set the value.\n * @param keys The keys to send to the element.\n * @docs-private\n */\nexport function typeInElement(\n element: HTMLElement, ...keys: (string | {keyCode?: number, key?: string})[]): void;\n\n/**\n * Focuses an input, sets its value and dispatches\n * the `input` event, simulating the user typing.\n * @param element Element onto which to set the value.\n * @param modifiers Modifier keys that are held while typing.\n * @param keys The keys to send to the element.\n * @docs-private\n */\nexport function typeInElement(element: HTMLElement, modifiers: ModifierKeys,\n ...keys: (string | {keyCode?: number, key?: string})[]): void;\n\nexport function typeInElement(element: HTMLElement, ...modifiersAndKeys: any) {\n const first = modifiersAndKeys[0];\n let modifiers: ModifierKeys;\n let rest: (string | {keyCode?: number, key?: string})[];\n if (typeof first !== 'string' && first.keyCode === undefined && first.key === undefined) {\n modifiers = first;\n rest = modifiersAndKeys.slice(1);\n } else {\n modifiers = {};\n rest = modifiersAndKeys;\n }\n const isInput = isTextInput(element);\n const inputType = element.getAttribute('type') || 'text';\n const keys: {keyCode?: number, key?: string}[] = rest\n .map(k => typeof k === 'string' ?\n k.split('').map(c => ({keyCode: c.toUpperCase().charCodeAt(0), key: c})) : [k])\n .reduce((arr, k) => arr.concat(k), []);\n\n // We simulate the user typing in a value by incrementally assigning the value below. The problem\n // is that for some input types, the browser won't allow for an invalid value to be set via the\n // `value` property which will always be the case when going character-by-character. If we detect\n // such an input, we have to set the value all at once or listeners to the `input` event (e.g.\n // the `ReactiveFormsModule` uses such an approach) won't receive the correct value.\n const enterValueIncrementally = inputType === 'number' && keys.length > 0 ?\n // The value can be set character by character in number inputs if it doesn't have any decimals.\n keys.every(key => key.key !== '.' && key.keyCode !== PERIOD) :\n incrementalInputTypes.has(inputType);\n\n triggerFocus(element);\n\n // When we aren't entering the value incrementally, assign it all at once ahead\n // of time so that any listeners to the key events below will have access to it.\n if (!enterValueIncrementally) {\n (element as HTMLInputElement).value = keys.reduce((value, key) => value + (key.key || ''), '');\n }\n\n for (const key of keys) {\n dispatchKeyboardEvent(element, 'keydown', key.keyCode, key.key, modifiers);\n dispatchKeyboardEvent(element, 'keypress', key.keyCode, key.key, modifiers);\n if (isInput && key.key && key.key.length === 1) {\n if (enterValueIncrementally) {\n (element as HTMLInputElement | HTMLTextAreaElement).value += key.key;\n dispatchFakeEvent(element, 'input');\n }\n }\n dispatchKeyboardEvent(element, 'keyup', key.keyCode, key.key, modifiers);\n }\n\n // Since we weren't dispatching `input` events while sending the keys, we have to do it now.\n if (!enterValueIncrementally) {\n dispatchFakeEvent(element, 'input');\n }\n}\n\n/**\n * Clears the text in an input or textarea element.\n * @docs-private\n */\nexport function clearElement(element: HTMLInputElement | HTMLTextAreaElement) {\n triggerFocus(element as HTMLElement);\n element.value = '';\n dispatchFakeEvent(element, 'input');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// These are private APIs that are used both by the public APIs inside of this package, as well\n// as in unit tests of other entry-points, hence why we need to re-export them through here.\nexport * from './dispatch-events';\nexport * from './event-objects';\nexport * from './element-focus';\nexport * from './type-in-element';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport * as keyCodes from '@angular/cdk/keycodes';\nimport {\n _getTextWithExcludedElements,\n ElementDimensions,\n ModifierKeys,\n TestElement,\n TestKey,\n TextOptions,\n EventData,\n} from '@angular/cdk/testing';\nimport {\n clearElement,\n createFakeEvent,\n dispatchFakeEvent,\n dispatchMouseEvent,\n dispatchPointerEvent,\n isTextInput,\n triggerBlur,\n triggerFocus,\n typeInElement,\n dispatchEvent,\n} from './fake-events';\n\n/** Maps `TestKey` constants to the `keyCode` and `key` values used by native browser events. */\nconst keyMap = {\n [TestKey.BACKSPACE]: {keyCode: keyCodes.BACKSPACE, key: 'Backspace'},\n [TestKey.TAB]: {keyCode: keyCodes.TAB, key: 'Tab'},\n [TestKey.ENTER]: {keyCode: keyCodes.ENTER, key: 'Enter'},\n [TestKey.SHIFT]: {keyCode: keyCodes.SHIFT, key: 'Shift'},\n [TestKey.CONTROL]: {keyCode: keyCodes.CONTROL, key: 'Control'},\n [TestKey.ALT]: {keyCode: keyCodes.ALT, key: 'Alt'},\n [TestKey.ESCAPE]: {keyCode: keyCodes.ESCAPE, key: 'Escape'},\n [TestKey.PAGE_UP]: {keyCode: keyCodes.PAGE_UP, key: 'PageUp'},\n [TestKey.PAGE_DOWN]: {keyCode: keyCodes.PAGE_DOWN, key: 'PageDown'},\n [TestKey.END]: {keyCode: keyCodes.END, key: 'End'},\n [TestKey.HOME]: {keyCode: keyCodes.HOME, key: 'Home'},\n [TestKey.LEFT_ARROW]: {keyCode: keyCodes.LEFT_ARROW, key: 'ArrowLeft'},\n [TestKey.UP_ARROW]: {keyCode: keyCodes.UP_ARROW, key: 'ArrowUp'},\n [TestKey.RIGHT_ARROW]: {keyCode: keyCodes.RIGHT_ARROW, key: 'ArrowRight'},\n [TestKey.DOWN_ARROW]: {keyCode: keyCodes.DOWN_ARROW, key: 'ArrowDown'},\n [TestKey.INSERT]: {keyCode: keyCodes.INSERT, key: 'Insert'},\n [TestKey.DELETE]: {keyCode: keyCodes.DELETE, key: 'Delete'},\n [TestKey.F1]: {keyCode: keyCodes.F1, key: 'F1'},\n [TestKey.F2]: {keyCode: keyCodes.F2, key: 'F2'},\n [TestKey.F3]: {keyCode: keyCodes.F3, key: 'F3'},\n [TestKey.F4]: {keyCode: keyCodes.F4, key: 'F4'},\n [TestKey.F5]: {keyCode: keyCodes.F5, key: 'F5'},\n [TestKey.F6]: {keyCode: keyCodes.F6, key: 'F6'},\n [TestKey.F7]: {keyCode: keyCodes.F7, key: 'F7'},\n [TestKey.F8]: {keyCode: keyCodes.F8, key: 'F8'},\n [TestKey.F9]: {keyCode: keyCodes.F9, key: 'F9'},\n [TestKey.F10]: {keyCode: keyCodes.F10, key: 'F10'},\n [TestKey.F11]: {keyCode: keyCodes.F11, key: 'F11'},\n [TestKey.F12]: {keyCode: keyCodes.F12, key: 'F12'},\n [TestKey.META]: {keyCode: keyCodes.META, key: 'Meta'}\n};\n\n/** A `TestElement` implementation for unit tests. */\nexport class UnitTestElement implements TestElement {\n constructor(readonly element: Element, private _stabilize: () => Promise<void>) {}\n\n /** Blur the element. */\n async blur(): Promise<void> {\n triggerBlur(this.element as HTMLElement);\n await this._stabilize();\n }\n\n /** Clear the element's input (for input and textarea elements only). */\n async clear(): Promise<void> {\n if (!isTextInput(this.element)) {\n throw Error('Attempting to clear an invalid element');\n }\n clearElement(this.element);\n await this._stabilize();\n }\n\n /**\n * Click the element at the default location for the current environment. If you need to guarantee\n * the element is clicked at a specific location, consider using `click('center')` or\n * `click(x, y)` instead.\n */\n click(modifiers?: ModifierKeys): Promise<void>;\n /** Click the element at the element's center. */\n click(location: 'center', modifiers?: ModifierKeys): Promise<void>;\n /**\n * Click the element at the specified coordinates relative to the top-left of the element.\n * @param relativeX Coordinate within the element, along the X-axis at which to click.\n * @param relativeY Coordinate within the element, along the Y-axis at which to click.\n * @param modifiers Modifier keys held while clicking\n */\n click(relativeX: number, relativeY: number, modifiers?: ModifierKeys): Promise<void>;\n async click(...args: [ModifierKeys?] | ['center', ModifierKeys?] |\n [number, number, ModifierKeys?]): Promise<void> {\n await this._dispatchMouseEventSequence('click', args, 0);\n await this._stabilize();\n }\n\n /**\n * Right clicks on the element at the specified coordinates relative to the top-left of it.\n * @param relativeX Coordinate within the element, along the X-axis at which to click.\n * @param relativeY Coordinate within the element, along the Y-axis at which to click.\n * @param modifiers Modifier keys held while clicking\n */\n rightClick(relativeX: number, relativeY: number, modifiers?: ModifierKeys): Promise<void>;\n async rightClick(...args: [ModifierKeys?] | ['center', ModifierKeys?] |\n [number, number, ModifierKeys?]): Promise<void> {\n await this._dispatchMouseEventSequence('contextmenu', args, 2);\n await this._stabilize();\n }\n\n /** Focus the element. */\n async focus(): Promise<void> {\n triggerFocus(this.element as HTMLElement);\n await this._stabilize();\n }\n\n /** Get the computed value of the given CSS property for the element. */\n async getCssValue(property: string): Promise<string> {\n await this._stabilize();\n // TODO(mmalerba): Consider adding value normalization if we run into common cases where its\n // needed.\n return getComputedStyle(this.element).getPropertyValue(property);\n }\n\n /** Hovers the mouse over the element. */\n async hover(): Promise<void> {\n this._dispatchPointerEventIfSupported('pointerenter');\n dispatchMouseEvent(this.element, 'mouseenter');\n await this._stabilize();\n }\n\n /** Moves the mouse away from the element. */\n async mouseAway(): Promise<void> {\n this._dispatchPointerEventIfSupported('pointerleave');\n dispatchMouseEvent(this.element, 'mouseleave');\n await this._stabilize();\n }\n\n /**\n * Sends the given string to the input as a series of key presses. Also fires input events\n * and attempts to add the string to the Element's value.\n */\n async sendKeys(...keys: (string | TestKey)[]): Promise<void>;\n /**\n * Sends the given string to the input as a series of key presses. Also fires input events\n * and attempts to add the string to the Element's value.\n */\n async sendKeys(modifiers: ModifierKeys, ...keys: (string | TestKey)[]): Promise<void>;\n async sendKeys(...modifiersAndKeys: any[]): Promise<void> {\n const args = modifiersAndKeys.map(k => typeof k === 'number' ? keyMap[k as TestKey] : k);\n typeInElement(this.element as HTMLElement, ...args);\n await this._stabilize();\n }\n\n /**\n * Gets the text from the element.\n * @param options Options that affect what text is included.\n */\n async text(options?: TextOptions): Promise<string> {\n await this._stabilize();\n if (options?.exclude) {\n return _getTextWithExcludedElements(this.element, options.exclude);\n }\n return (this.element.textContent || '').trim();\n }\n\n /** Gets the value for the given attribute from the element. */\n async getAttribute(name: string): Promise<string|null> {\n await this._stabilize();\n return this.element.getAttribute(name);\n }\n\n /** Checks whether the element has the given class. */\n async hasClass(name: string): Promise<boolean> {\n await this._stabilize();\n return this.element.classList.contains(name);\n }\n\n /** Gets the dimensions of the element. */\n async getDimensions(): Promise<ElementDimensions> {\n await this._stabilize();\n return this.element.getBoundingClientRect();\n }\n\n /** Gets the value of a property of an element. */\n async getProperty(name: string): Promise<any> {\n await this._stabilize();\n return (this.element as any)[name];\n }\n\n /** Sets the value of a property of an input. */\n async setInputValue(value: string): Promise<void> {\n (this.element as any).value = value;\n await this._stabilize();\n }\n\n /** Selects the options at the specified indexes inside of a native `select` element. */\n async selectOptions(...optionIndexes: number[]): Promise<void> {\n let hasChanged = false;\n const options = this.element.querySelectorAll('option');\n const indexes = new Set(optionIndexes); // Convert to a set to remove duplicates.\n\n for (let i = 0; i < options.length; i++) {\n const option = options[i];\n const wasSelected = option.selected;\n\n // We have to go through `option.selected`, because `HTMLSelectElement.value` doesn't\n // allow for multiple options to be selected, even in `multiple` mode.\n option.selected = indexes.has(i);\n\n if (option.selected !== wasSelected) {\n hasChanged = true;\n dispatchFakeEvent(this.element, 'change');\n }\n }\n\n if (hasChanged) {\n await this._stabilize();\n }\n }\n\n /** Checks whether this element matches the given selector. */\n async matchesSelector(selector: string): Promise<boolean> {\n await this._stabilize();\n const elementPrototype = Element.prototype as any;\n return (elementPrototype['matches'] || elementPrototype['msMatchesSelector'])\n .call(this.element, selector);\n }\n\n /** Checks whether the element is focused. */\n async isFocused(): Promise<boolean> {\n await this._stabilize();\n return document.activeElement === this.element;\n }\n\n /**\n * Dispatches an event with a particular name.\n * @param name Name of the event to be dispatched.\n */\n async dispatchEvent(name: string, data?: Record<string, EventData>): Promise<void> {\n const event = createFakeEvent(name);\n\n if (data) {\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the original object.\n Object.assign(event, data);\n }\n\n dispatchEvent(this.element, event);\n await this._stabilize();\n }\n\n /**\n * Dispatches a pointer event on the current element if the browser supports it.\n * @param name Name of the pointer event to be dispatched.\n * @param clientX Coordinate of the user's pointer along the X axis.\n * @param clientY Coordinate of the user's pointer along the Y axis.\n * @param button Mouse button that should be pressed when dispatching the event.\n */\n private _dispatchPointerEventIfSupported(\n name: string, clientX?: number, clientY?: number, button?: number) {\n // The latest versions of all browsers we support have the new `PointerEvent` API.\n // Though since we capture the two most recent versions of these browsers, we also\n // need to support Safari 12 at time of writing. Safari 12 does not have support for this,\n // so we need to conditionally create and dispatch these events based on feature detection.\n if (typeof PointerEvent !== 'undefined' && PointerEvent) {\n dispatchPointerEvent(this.element, name, clientX, clientY, {isPrimary: true, button});\n }\n }\n\n /** Dispatches all the events that are part of a mouse event sequence. */\n private async _dispatchMouseEventSequence(\n name: string,\n args: [ModifierKeys?] | ['center', ModifierKeys?] | [number, number, ModifierKeys?],\n button?: number) {\n let clientX: number | undefined = undefined;\n let clientY: number | undefined = undefined;\n let modifiers: ModifierKeys = {};\n\n if (args.length && typeof args[args.length - 1] === 'object') {\n modifiers = args.pop() as ModifierKeys;\n }\n\n if (args.length) {\n const {left, top, width, height} = await this.getDimensions();\n const relativeX = args[0] === 'center' ? width / 2 : args[0] as number;\n const relativeY = args[0] === 'center' ? height / 2 : args[1] as number;\n\n // Round the computed click position as decimal pixels are not\n // supported by mouse events and could lead to unexpected results.\n clientX = Math.round(left + relativeX);\n clientY = Math.round(top + relativeY);\n }\n\n this._dispatchPointerEventIfSupported('pointerdown', clientX, clientY, button);\n dispatchMouseEvent(this.element, 'mousedown', clientX, clientY, button, modifiers);\n this._dispatchPointerEventIfSupported('pointerup', clientX, clientY, button);\n dispatchMouseEvent(this.element, 'mouseup', clientX, clientY, button, modifiers);\n dispatchMouseEvent(this.element, name, clientX, clientY, button, modifiers);\n\n // This call to _stabilize should not be needed since the callers will already do that them-\n // selves. Nevertheless it breaks some tests in g3 without it. It needs to be investigated\n // why removing breaks those tests.\n await this._stabilize();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n handleAutoChangeDetectionStatus,\n HarnessEnvironment,\n HarnessLoader,\n stopHandlingAutoChangeDetectionStatus,\n TestElement\n} from '@angular/cdk/testing';\nimport {ComponentFixture, flush} from '@angular/core/testing';\nimport {Observable} from 'rxjs';\nimport {takeWhile} from 'rxjs/operators';\nimport {TaskState, TaskStateZoneInterceptor} from './task-state-zone-interceptor';\nimport {UnitTestElement} from './unit-test-element';\n\n/** Options to configure the environment. */\nexport interface TestbedHarnessEnvironmentOptions {\n /** The query function used to find DOM elements. */\n queryFn: (selector: string, root: Element) => Iterable<Element> | ArrayLike<Element>;\n}\n\n/** The default environment options. */\nconst defaultEnvironmentOptions: TestbedHarnessEnvironmentOptions = {\n queryFn: (selector: string, root: Element) => root.querySelectorAll(selector)\n};\n\n/** Whether auto change detection is currently disabled. */\nlet disableAutoChangeDetection = false;\n\n/**\n * The set of non-destroyed fixtures currently being used by `TestbedHarnessEnvironment` instances.\n */\nconst activeFixtures = new Set<ComponentFixture<unknown>>();\n\n/**\n * Installs a handler for change detection batching status changes for a specific fixture.\n * @param fixture The fixture to handle change detection batching for.\n */\nfunction installAutoChangeDetectionStatusHandler(fixture: ComponentFixture<unknown>) {\n if (!activeFixtures.size) {\n handleAutoChangeDetectionStatus(({isDisabled, onDetectChangesNow}) => {\n disableAutoChangeDetection = isDisabled;\n if (onDetectChangesNow) {\n Promise.all(Array.from(activeFixtures).map(detectChanges)).then(onDetectChangesNow);\n }\n });\n }\n activeFixtures.add(fixture);\n}\n\n/**\n * Uninstalls a handler for change detection batching status changes for a specific fixture.\n * @param fixture The fixture to stop handling change detection batching for.\n */\nfunction uninstallAutoChangeDetectionStatusHandler(fixture: ComponentFixture<unknown>) {\n activeFixtures.delete(fixture);\n if (!activeFixtures.size) {\n stopHandlingAutoChangeDetectionStatus();\n }\n}\n\n/** Whether we are currently in the fake async zone. */\nfunction isInFakeAsyncZone() {\n return Zone!.current.get('FakeAsyncTestZoneSpec') != null;\n}\n\n/**\n * Triggers change detection for a specific fixture.\n * @param fixture The fixture to trigger change detection for.\n */\nasync function detectChanges(fixture: ComponentFixture<unknown>) {\n fixture.detectChanges();\n if (isInFakeAsyncZone()) {\n flush();\n } else {\n await fixture.whenStable();\n }\n}\n\n/** A `HarnessEnvironment` implementation for Angular's Testbed. */\nexport class TestbedHarnessEnvironment extends HarnessEnvironment<Element> {\n /** Whether the environment has been destroyed. */\n private _destroyed = false;\n\n /** Observable that emits whenever the test task state changes. */\n private _taskState: Observable<TaskState>;\n\n /** The options for this environment. */\n private _options: TestbedHarnessEnvironmentOptions;\n\n protected constructor(rawRootElement: Element, private _fixture: ComponentFixture<unknown>,\n options?: TestbedHarnessEnvironmentOptions) {\n super(rawRootElement);\n this._options = {...defaultEnvironmentOptions, ...options};\n this._taskState = TaskStateZoneInterceptor.setup();\n installAutoChangeDetectionStatusHandler(_fixture);\n _fixture.componentRef.onDestroy(() => {\n uninstallAutoChangeDetectionStatusHandler(_fixture);\n this._destroyed = true;\n });\n }\n\n /** Creates a `HarnessLoader` rooted at the given fixture's root element. */\n static loader(fixture: ComponentFixture<unknown>, options?: TestbedHarnessEnvironmentOptions):\n HarnessLoader {\n return new TestbedHarnessEnvironment(fixture.nativeElement, fixture, options);\n }\n\n /**\n * Creates a `HarnessLoader` at the document root. This can be used if harnesses are\n * located outside of a fixture (e.g. overlays appended to the document body).\n */\n static documentRootLoader(fixture: ComponentFixture<unknown>,\n options?: TestbedHarnessEnvironmentOptions): HarnessLoader {\n return new TestbedHarnessEnvironment(document.body, fixture, options);\n }\n\n /** Gets the native DOM element corresponding to the given TestElement. */\n static getNativeElement(el: TestElement): Element {\n if (el instanceof UnitTestElement) {\n return el.element;\n }\n throw Error('This TestElement was not created by the TestbedHarnessEnvironment');\n }\n\n /**\n * Creates an instance of the given harness type, using the fixture's root element as the\n * harness's host element. This method should be used when creating a harness for the root element\n * of a fixture, as components do not have the correct selector when they are created as the root\n * of the fixture.\n */\n static async harnessForFixture<T extends ComponentHarness>(\n fixture: ComponentFixture<unknown>, harnessType: ComponentHarnessConstructor<T>,\n options?: TestbedHarnessEnvironmentOptions): Promise<T> {\n const environment = new TestbedHarnessEnvironment(fixture.nativeElement, fixture, options);\n await environment.forceStabilize();\n return environment.createComponentHarness(harnessType, fixture.nativeElement);\n }\n\n /**\n * Flushes change detection and async tasks captured in the Angular zone.\n * In most cases it should not be necessary to call this manually. However, there may be some edge\n * cases where it is needed to fully flush animation events.\n */\n async forceStabilize(): Promise<void> {\n if (!disableAutoChangeDetection) {\n if (this._destroyed) {\n throw Error('Harness is attempting to use a fixture that has already been destroyed.');\n }\n\n await detectChanges(this._fixture);\n }\n }\n\n /**\n * Waits for all scheduled or running async tasks to complete. This allows harness\n * authors to wait for async tasks outside of the Angular zone.\n */\n async waitForTasksOutsideAngular(): Promise<void> {\n // If we run in the fake async zone, we run \"flush\" to run any scheduled tasks. This\n // ensures that the harnesses behave inside of the FakeAsyncTestZone similar to the\n // \"AsyncTestZone\" and the root zone (i.e. neither fakeAsync or async). Note that we\n // cannot just rely on the task state observable to become stable because the state will\n // never change. This is because the task queue will be only drained if the fake async\n // zone is being flushed.\n if (isInFakeAsyncZone()) {\n flush();\n }\n\n // Wait until the task queue has been drained and the zone is stable. Note that\n // we cannot rely on \"fixture.whenStable\" since it does not catch tasks scheduled\n // outside of the Angular zone. For test harnesses, we want to ensure that the\n // app is fully stabilized and therefore need to use our own zone interceptor.\n await this._taskState.pipe(takeWhile(state => !state.stable)).toPromise();\n }\n\n /** Gets the root element for the document. */\n protected getDocumentRoot(): Element {\n return document.body;\n }\n\n /** Creates a `TestElement` from a raw element. */\n protected createTestElement(element: Element): TestElement {\n return new UnitTestElement(element, () => this.forceStabilize());\n }\n\n /** Creates a `HarnessLoader` rooted at the given raw element. */\n protected createEnvironment(element: Element): HarnessEnvironment<Element> {\n return new TestbedHarnessEnvironment(element, this._fixture, this._options);\n }\n\n /**\n * Gets a list of all elements matching the given selector under this environment's root element.\n */\n protected async getAllRawElements(selector: string): Promise<Element[]> {\n await this.forceStabilize();\n return Array.from(this._options.queryFn(selector, this.rawRootElement));\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './testbed-harness-environment';\nexport * from './unit-test-element';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;AAiBA;AACA,MAAM,qBAAqB,GAAG,MAAM,CAAC,mCAAmC,CAAC,CAAC;AAO1E;;;;;;MAMa,wBAAwB;IAQnC,YAAoB,UAA6B;QAA7B,eAAU,GAAV,UAAU,CAAmB;;QANhC,kBAAa,GAAG,IAAI,eAAe,CAChD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,kCAAkC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;;QAGxF,UAAK,GAA0B,IAAI,CAAC,aAAa,CAAC;KAEN;;IAGrD,SAAS,CAAC,QAAsB,EAAE,OAAa,EAAE,MAAY,EAAE,YAA0B;QACvF,IAAI,OAAO,KAAK,MAAM,EAAE;YACtB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,kCAAkC,CAAC,YAAY,CAAC,CAAC,CAAC;SAChF;KACF;;IAGO,kCAAkC,CAAC,KAAmB;QAC5D,OAAO,EAAC,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,SAAS,EAAC,CAAC;KACvD;;;;;;IAOD,OAAO,KAAK;QACV,IAAI,IAAI,KAAK,SAAS,E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