@angular/material 20.1.0-next.1 → 20.1.0-rc.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.
Files changed (164) hide show
  1. package/_index.scss +1 -2
  2. package/autocomplete/_autocomplete-theme.scss +28 -37
  3. package/autocomplete/_m2-autocomplete.scss +10 -22
  4. package/badge/_badge-theme.scss +35 -44
  5. package/badge/_m2-badge.scss +46 -59
  6. package/bottom-sheet/_bottom-sheet-theme.scss +28 -40
  7. package/bottom-sheet/_m2-bottom-sheet.scss +16 -33
  8. package/button/_button-theme.scss +37 -55
  9. package/button/_fab-theme.scss +42 -56
  10. package/button/_icon-button-theme.scss +33 -49
  11. package/button/_m2-button.scss +135 -158
  12. package/button/_m2-fab.scss +60 -69
  13. package/button/_m2-icon-button.scss +30 -50
  14. package/button/_m3-button.scss +1 -2
  15. package/button/_m3-fab.scss +1 -2
  16. package/button/_m3-icon-button.scss +1 -2
  17. package/button/testing/index.d.ts +1 -0
  18. package/button-toggle/_button-toggle-theme.scss +29 -44
  19. package/button-toggle/_m2-button-toggle.scss +58 -81
  20. package/button-toggle/_m3-button-toggle.scss +1 -2
  21. package/card/_card-theme.scss +28 -36
  22. package/card/_m2-card.scss +30 -45
  23. package/checkbox/_checkbox-theme.scss +37 -50
  24. package/checkbox/_m2-checkbox.scss +30 -40
  25. package/checkbox/_m3-checkbox.scss +1 -2
  26. package/chips/_chips-theme.scss +27 -30
  27. package/chips/_m2-chip.scss +40 -53
  28. package/chips/_m3-chip.scss +1 -2
  29. package/core/_core-theme.scss +48 -67
  30. package/core/_m2-app.scss +11 -23
  31. package/core/focus-indicators/_private.scss +2 -5
  32. package/core/m2/_theming.scss +36 -41
  33. package/core/option/_m2-optgroup.scss +13 -25
  34. package/core/option/_m2-option.scss +16 -22
  35. package/core/option/_optgroup-theme.scss +28 -30
  36. package/core/option/_option-theme.scss +35 -34
  37. package/core/ripple/_m2-ripple.scss +8 -20
  38. package/core/ripple/_ripple-theme.scss +28 -33
  39. package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +14 -21
  40. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +55 -45
  41. package/core/theming/_all-theme.scss +38 -42
  42. package/core/theming/_definition.scss +22 -13
  43. package/core/theming/_inspection.scss +0 -12
  44. package/core/theming/_m2-inspection.scss +0 -33
  45. package/core/theming/_theming.scss +4 -172
  46. package/core/tokens/_m2-utils.scss +16 -68
  47. package/core/tokens/_m3-utils.scss +2 -14
  48. package/core/tokens/_token-utils.scss +7 -27
  49. package/core/tokens/m2/_index.scss +6 -0
  50. package/core/tokens/m2/_md-sys-color.scss +123 -0
  51. package/core/tokens/m2/_md-sys-elevation.scss +16 -0
  52. package/core/tokens/m2/_md-sys-motion.scss +36 -0
  53. package/core/tokens/m2/_md-sys-shape.scss +22 -0
  54. package/core/tokens/m2/_md-sys-state.scss +15 -0
  55. package/core/tokens/m2/_md-sys-typescale.scss +68 -0
  56. package/core/tokens/m3/_md-sys-color.scss +2 -2
  57. package/core/tokens/m3/_md-sys-typescale.scss +1 -1
  58. package/core/tokens/m3/_theme.scss +14 -26
  59. package/datepicker/_datepicker-theme.scss +38 -40
  60. package/datepicker/_m2-datepicker.scss +26 -40
  61. package/dialog/_dialog-theme.scss +28 -34
  62. package/dialog/_m2-dialog.scss +34 -48
  63. package/divider/_divider-theme.scss +28 -30
  64. package/divider/_m2-divider.scss +10 -21
  65. package/expansion/_expansion-theme.scss +28 -39
  66. package/expansion/_m2-expansion.scss +52 -67
  67. package/expansion/_m3-expansion.scss +3 -2
  68. package/fesm2022/autocomplete.mjs +1 -1
  69. package/fesm2022/button/testing.mjs +7 -4
  70. package/fesm2022/button/testing.mjs.map +1 -1
  71. package/fesm2022/chips.mjs +1 -1
  72. package/fesm2022/core.mjs +1 -1
  73. package/fesm2022/core.mjs.map +1 -1
  74. package/fesm2022/datepicker.mjs +1 -1
  75. package/fesm2022/expansion.mjs +2 -2
  76. package/fesm2022/expansion.mjs.map +1 -1
  77. package/fesm2022/{form-field-C9DZXojn.mjs → form-field-CFbrnFED.mjs} +3 -3
  78. package/fesm2022/{form-field-C9DZXojn.mjs.map → form-field-CFbrnFED.mjs.map} +1 -1
  79. package/fesm2022/form-field.mjs +2 -2
  80. package/fesm2022/input.mjs +3 -27
  81. package/fesm2022/input.mjs.map +1 -1
  82. package/fesm2022/menu/testing.mjs +97 -13
  83. package/fesm2022/menu/testing.mjs.map +1 -1
  84. package/fesm2022/menu.mjs +343 -122
  85. package/fesm2022/menu.mjs.map +1 -1
  86. package/fesm2022/{module-BDiw_nWS.mjs → module-B0CLRw5e.mjs} +3 -3
  87. package/fesm2022/{module-BDiw_nWS.mjs.map → module-B0CLRw5e.mjs.map} +1 -1
  88. package/fesm2022/{module-DzZHEh7B.mjs → module-B62K-792.mjs} +2 -2
  89. package/fesm2022/{module-DzZHEh7B.mjs.map → module-B62K-792.mjs.map} +1 -1
  90. package/fesm2022/paginator.mjs +3 -3
  91. package/fesm2022/select.mjs +3 -3
  92. package/fesm2022/sidenav.mjs +2 -4
  93. package/fesm2022/sidenav.mjs.map +1 -1
  94. package/fesm2022/slide-toggle.mjs +2 -2
  95. package/fesm2022/slide-toggle.mjs.map +1 -1
  96. package/fesm2022/snack-bar.mjs +2 -2
  97. package/fesm2022/timepicker.mjs +1 -1
  98. package/form-field/_form-field-theme.scss +35 -51
  99. package/form-field/_m2-form-field.scss +125 -146
  100. package/form-field/_m3-form-field.scss +1 -2
  101. package/grid-list/_grid-list-theme.scss +28 -28
  102. package/grid-list/_m2-grid-list.scss +16 -29
  103. package/icon/_icon-theme.scss +40 -41
  104. package/icon/_m2-icon.scss +7 -21
  105. package/input/_input-theme.scss +1 -4
  106. package/input/index.d.ts +0 -11
  107. package/list/_list-theme.scss +57 -53
  108. package/list/_m2-list.scss +84 -108
  109. package/list/_m3-list.scss +1 -2
  110. package/menu/_m2-menu.scss +33 -46
  111. package/menu/_menu-theme.scss +28 -33
  112. package/menu/index.d.ts +145 -61
  113. package/menu/testing/index.d.ts +50 -2
  114. package/package.json +2 -2
  115. package/paginator/_m2-paginator.scss +38 -58
  116. package/paginator/_m3-paginator.scss +1 -2
  117. package/paginator/_paginator-theme.scss +28 -33
  118. package/prebuilt-themes/deeppurple-amber.css +1 -1
  119. package/prebuilt-themes/indigo-pink.css +1 -1
  120. package/prebuilt-themes/pink-bluegrey.css +1 -1
  121. package/prebuilt-themes/purple-green.css +1 -1
  122. package/progress-bar/_m2-progress-bar.scss +11 -24
  123. package/progress-bar/_progress-bar-theme.scss +35 -43
  124. package/progress-spinner/_m2-progress-spinner.scss +9 -20
  125. package/progress-spinner/_progress-spinner-theme.scss +42 -43
  126. package/radio/_m2-radio.scss +30 -40
  127. package/radio/_m3-radio.scss +1 -2
  128. package/radio/_radio-theme.scss +33 -46
  129. package/schematics/ng-add/index.js +1 -1
  130. package/schematics/ng-generate/theme-color/schema.json +1 -1
  131. package/select/_m2-select.scss +23 -30
  132. package/select/_m3-select.scss +1 -2
  133. package/select/_select-theme.scss +38 -51
  134. package/sidenav/_m2-sidenav.scss +26 -36
  135. package/sidenav/_sidenav-theme.scss +28 -30
  136. package/slide-toggle/_m2-slide-toggle.scss +111 -143
  137. package/slide-toggle/_m3-slide-toggle.scss +1 -0
  138. package/slide-toggle/_slide-toggle-theme.scss +42 -80
  139. package/slider/_m2-slider.scss +34 -55
  140. package/slider/_slider-theme.scss +38 -45
  141. package/snack-bar/_m2-snack-bar.scss +16 -36
  142. package/snack-bar/_snack-bar-theme.scss +28 -31
  143. package/sort/_m2-sort.scss +7 -18
  144. package/sort/_sort-theme.scss +28 -33
  145. package/stepper/_m2-stepper.scss +39 -57
  146. package/stepper/_m3-stepper.scss +1 -2
  147. package/stepper/_stepper-theme.scss +41 -49
  148. package/table/_m2-table.scss +54 -72
  149. package/table/_m3-table.scss +1 -2
  150. package/table/_table-theme.scss +28 -36
  151. package/tabs/_m2-tabs.scss +31 -46
  152. package/tabs/_m3-tabs.scss +1 -2
  153. package/tabs/_tabs-theme.scss +41 -49
  154. package/timepicker/_m2-timepicker.scss +10 -22
  155. package/timepicker/_timepicker-theme.scss +28 -46
  156. package/toolbar/_m2-toolbar.scss +26 -46
  157. package/toolbar/_m3-toolbar.scss +1 -2
  158. package/toolbar/_toolbar-theme.scss +55 -46
  159. package/tooltip/_m2-tooltip.scss +16 -34
  160. package/tooltip/_tooltip-theme.scss +28 -37
  161. package/tree/_m2-tree.scss +21 -38
  162. package/tree/_m3-tree.scss +1 -2
  163. package/tree/_tree-theme.scss +28 -38
  164. package/core/tokens/_format-tokens.scss +0 -5
@@ -1 +1 @@
1
- {"version":3,"file":"input.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/input/input-errors.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/input/input.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/input/module.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.dev/license\n */\n\n/** @docs-private */\nexport function getMatInputUnsupportedTypeError(type: string): Error {\n return Error(`Input type \"${type}\" isn't supported by matInput.`);\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.dev/license\n */\n\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {getSupportedInputTypes, Platform} from '@angular/cdk/platform';\nimport {AutofillMonitor} from '@angular/cdk/text-field';\nimport {\n AfterViewInit,\n booleanAttribute,\n Directive,\n DoCheck,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n Input,\n isSignal,\n NgZone,\n OnChanges,\n OnDestroy,\n Renderer2,\n WritableSignal,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {FormGroupDirective, NgControl, NgForm, Validators} from '@angular/forms';\nimport {ErrorStateMatcher, _ErrorStateTracker} from '../core';\nimport {MatFormFieldControl, MatFormField, MAT_FORM_FIELD} from '../form-field';\nimport {Subject} from 'rxjs';\nimport {getMatInputUnsupportedTypeError} from './input-errors';\nimport {MAT_INPUT_VALUE_ACCESSOR} from './input-value-accessor';\n\n// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.\nconst MAT_INPUT_INVALID_TYPES = [\n 'button',\n 'checkbox',\n 'file',\n 'hidden',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit',\n];\n\n/** Object that can be used to configure the default options for the input. */\nexport interface MatInputConfig {\n /** Whether disabled inputs should be interactive. */\n disabledInteractive?: boolean;\n}\n\n/** Injection token that can be used to provide the default options for the input. */\nexport const MAT_INPUT_CONFIG = new InjectionToken<MatInputConfig>('MAT_INPUT_CONFIG');\n\n@Directive({\n selector: `input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]`,\n exportAs: 'matInput',\n host: {\n 'class': 'mat-mdc-input-element',\n // The BaseMatInput parent class adds `mat-input-element`, `mat-form-field-control` and\n // `mat-form-field-autofill-control` to the CSS class list, but this should not be added for\n // this MDC equivalent input.\n '[class.mat-input-server]': '_isServer',\n '[class.mat-mdc-form-field-textarea-control]': '_isInFormField && _isTextarea',\n '[class.mat-mdc-form-field-input-control]': '_isInFormField',\n '[class.mat-mdc-input-disabled-interactive]': 'disabledInteractive',\n '[class.mdc-text-field__input]': '_isInFormField',\n '[class.mat-mdc-native-select-inline]': '_isInlineSelect()',\n // Native input properties that are overwritten by Angular inputs need to be synced with\n // the native input element. Otherwise property bindings for those don't work.\n '[id]': 'id',\n '[disabled]': 'disabled && !disabledInteractive',\n '[required]': 'required',\n '[attr.name]': 'name || null',\n '[attr.readonly]': '_getReadonlyAttribute()',\n '[attr.aria-disabled]': 'disabled && disabledInteractive ? \"true\" : null',\n // Only mark the input as invalid for assistive technology if it has a value since the\n // state usually overlaps with `aria-required` when the input is empty and can be redundant.\n '[attr.aria-invalid]': '(empty && required) ? null : errorState',\n '[attr.aria-required]': 'required',\n // Native input properties that are overwritten by Angular inputs need to be synced with\n // the native input element. Otherwise property bindings for those don't work.\n '[attr.id]': 'id',\n '(focus)': '_focusChanged(true)',\n '(blur)': '_focusChanged(false)',\n '(input)': '_onInput()',\n },\n providers: [{provide: MatFormFieldControl, useExisting: MatInput}],\n})\nexport class MatInput\n implements MatFormFieldControl<any>, OnChanges, OnDestroy, AfterViewInit, DoCheck\n{\n protected _elementRef =\n inject<ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>>(ElementRef);\n protected _platform = inject(Platform);\n ngControl = inject(NgControl, {optional: true, self: true})!;\n private _autofillMonitor = inject(AutofillMonitor);\n private _ngZone = inject(NgZone);\n protected _formField? = inject<MatFormField>(MAT_FORM_FIELD, {optional: true});\n private _renderer = inject(Renderer2);\n\n protected _uid = inject(_IdGenerator).getId('mat-input-');\n protected _previousNativeValue: any;\n private _inputValueAccessor: {value: any};\n private _signalBasedValueAccessor?: {value: WritableSignal<any>};\n private _previousPlaceholder: string | null;\n private _errorStateTracker: _ErrorStateTracker;\n private _config = inject(MAT_INPUT_CONFIG, {optional: true});\n private _cleanupIosKeyup: (() => void) | undefined;\n private _cleanupWebkitWheel: (() => void) | undefined;\n\n /** Whether the component is being rendered on the server. */\n readonly _isServer: boolean;\n\n /** Whether the component is a native html select. */\n readonly _isNativeSelect: boolean;\n\n /** Whether the component is a textarea. */\n readonly _isTextarea: boolean;\n\n /** Whether the input is inside of a form field. */\n readonly _isInFormField: boolean;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n focused: boolean = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n readonly stateChanges: Subject<void> = new Subject<void>();\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n controlType: string = 'mat-input';\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n autofilled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: BooleanInput) {\n this._disabled = coerceBooleanProperty(value);\n\n // Browsers may not fire the blur event if the input is disabled too quickly.\n // Reset from here to ensure that the element doesn't become stuck.\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n protected _disabled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get id(): string {\n return this._id;\n }\n set id(value: string) {\n this._id = value || this._uid;\n }\n protected _id: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input() placeholder: string;\n\n /**\n * Name of the input.\n * @docs-private\n */\n @Input() name: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get required(): boolean {\n return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n }\n set required(value: BooleanInput) {\n this._required = coerceBooleanProperty(value);\n }\n protected _required: boolean | undefined;\n\n /** Input type of the element. */\n @Input()\n get type(): string {\n return this._type;\n }\n set type(value: string) {\n const prevType = this._type;\n this._type = value || 'text';\n this._validateType();\n\n // When using Angular inputs, developers are no longer able to set the properties on the native\n // input element. To ensure that bindings for `type` work, we need to sync the setter\n // with the native property. Textarea elements don't support the type property or attribute.\n if (!this._isTextarea && getSupportedInputTypes().has(this._type)) {\n (this._elementRef.nativeElement as HTMLInputElement).type = this._type;\n }\n\n if (this._type !== prevType) {\n this._ensureWheelDefaultBehavior();\n }\n }\n protected _type = 'text';\n\n /** An object used to control when error messages are shown. */\n @Input()\n get errorStateMatcher() {\n return this._errorStateTracker.matcher;\n }\n set errorStateMatcher(value: ErrorStateMatcher) {\n this._errorStateTracker.matcher = value;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input('aria-describedby') userAriaDescribedBy: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get value(): string {\n return this._signalBasedValueAccessor\n ? this._signalBasedValueAccessor.value()\n : this._inputValueAccessor.value;\n }\n set value(value: any) {\n if (value !== this.value) {\n if (this._signalBasedValueAccessor) {\n this._signalBasedValueAccessor.value.set(value);\n } else {\n this._inputValueAccessor.value = value;\n }\n\n this.stateChanges.next();\n }\n }\n\n /** Whether the element is readonly. */\n @Input()\n get readonly(): boolean {\n return this._readonly;\n }\n set readonly(value: BooleanInput) {\n this._readonly = coerceBooleanProperty(value);\n }\n private _readonly = false;\n\n /** Whether the input should remain interactive when it is disabled. */\n @Input({transform: booleanAttribute})\n disabledInteractive: boolean;\n\n /** Whether the input is in an error state. */\n get errorState() {\n return this._errorStateTracker.errorState;\n }\n set errorState(value: boolean) {\n this._errorStateTracker.errorState = value;\n }\n\n protected _neverEmptyInputTypes = [\n 'date',\n 'datetime',\n 'datetime-local',\n 'month',\n 'time',\n 'week',\n ].filter(t => getSupportedInputTypes().has(t));\n\n constructor(...args: unknown[]);\n\n constructor() {\n const parentForm = inject(NgForm, {optional: true});\n const parentFormGroup = inject(FormGroupDirective, {optional: true});\n const defaultErrorStateMatcher = inject(ErrorStateMatcher);\n const accessor = inject(MAT_INPUT_VALUE_ACCESSOR, {optional: true, self: true});\n\n const element = this._elementRef.nativeElement;\n const nodeName = element.nodeName.toLowerCase();\n\n if (accessor) {\n if (isSignal(accessor.value)) {\n this._signalBasedValueAccessor = accessor;\n } else {\n this._inputValueAccessor = accessor;\n }\n } else {\n // If no input value accessor was explicitly specified, use the element as the input value\n // accessor.\n this._inputValueAccessor = element;\n }\n\n this._previousNativeValue = this.value;\n\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n\n // On some versions of iOS the caret gets stuck in the wrong place when holding down the delete\n // key. In order to get around this we need to \"jiggle\" the caret loose. Since this bug only\n // exists on iOS, we only bother to install the listener on iOS.\n if (this._platform.IOS) {\n this._ngZone.runOutsideAngular(() => {\n this._cleanupIosKeyup = this._renderer.listen(element, 'keyup', this._iOSKeyupListener);\n });\n }\n\n this._errorStateTracker = new _ErrorStateTracker(\n defaultErrorStateMatcher,\n this.ngControl,\n parentFormGroup,\n parentForm,\n this.stateChanges,\n );\n this._isServer = !this._platform.isBrowser;\n this._isNativeSelect = nodeName === 'select';\n this._isTextarea = nodeName === 'textarea';\n this._isInFormField = !!this._formField;\n this.disabledInteractive = this._config?.disabledInteractive || false;\n\n if (this._isNativeSelect) {\n this.controlType = (element as HTMLSelectElement).multiple\n ? 'mat-native-select-multiple'\n : 'mat-native-select';\n }\n\n if (this._signalBasedValueAccessor) {\n effect(() => {\n // Read the value so the effect can register the dependency.\n this._signalBasedValueAccessor!.value();\n this.stateChanges.next();\n });\n }\n }\n\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(event => {\n this.autofilled = event.isAutofilled;\n this.stateChanges.next();\n });\n }\n }\n\n ngOnChanges() {\n this.stateChanges.next();\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n\n if (this._platform.isBrowser) {\n this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);\n }\n\n this._cleanupIosKeyup?.();\n this._cleanupWebkitWheel?.();\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n\n // Since the input isn't a `ControlValueAccessor`, we don't have a good way of knowing when\n // the disabled state has changed. We can't use the `ngControl.statusChanges`, because it\n // won't fire if the input is disabled with `emitEvents = false`, despite the input becoming\n // disabled.\n if (this.ngControl.disabled !== null && this.ngControl.disabled !== this.disabled) {\n this.disabled = this.ngControl.disabled;\n this.stateChanges.next();\n }\n }\n\n // We need to dirty-check the native element's value, because there are some cases where\n // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n // updating the value using `emitEvent: false`).\n this._dirtyCheckNativeValue();\n\n // We need to dirty-check and set the placeholder attribute ourselves, because whether it's\n // present or not depends on a query which is prone to \"changed after checked\" errors.\n this._dirtyCheckPlaceholder();\n }\n\n /** Focuses the input. */\n focus(options?: FocusOptions): void {\n this._elementRef.nativeElement.focus(options);\n }\n\n /** Refreshes the error state of the input. */\n updateErrorState() {\n this._errorStateTracker.updateErrorState();\n }\n\n /** Callback for the cases where the focused state of the input changes. */\n _focusChanged(isFocused: boolean) {\n if (isFocused === this.focused) {\n return;\n }\n\n if (!this._isNativeSelect && isFocused && this.disabled && this.disabledInteractive) {\n const element = this._elementRef.nativeElement as HTMLInputElement;\n\n // Focusing an input that has text will cause all the text to be selected. Clear it since\n // the user won't be able to change it. This is based on the internal implementation.\n if (element.type === 'number') {\n // setSelectionRange doesn't work on number inputs so it needs to be set briefly to text.\n element.type = 'text';\n element.setSelectionRange(0, 0);\n element.type = 'number';\n } else {\n element.setSelectionRange(0, 0);\n }\n }\n\n this.focused = isFocused;\n this.stateChanges.next();\n }\n\n _onInput() {\n // This is a noop function and is used to let Angular know whenever the value changes.\n // Angular will run a new change detection each time the `input` event has been dispatched.\n // It's necessary that Angular recognizes the value change, because when floatingLabel\n // is set to false and Angular forms aren't used, the placeholder won't recognize the\n // value changes and will not disappear.\n // Listening to the input event wouldn't be necessary when the input is using the\n // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.\n }\n\n /** Does some manual dirty checking on the native input `value` property. */\n protected _dirtyCheckNativeValue() {\n const newValue = this._elementRef.nativeElement.value;\n\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n\n /** Does some manual dirty checking on the native input `placeholder` attribute. */\n private _dirtyCheckPlaceholder() {\n const placeholder = this._getPlaceholder();\n if (placeholder !== this._previousPlaceholder) {\n const element = this._elementRef.nativeElement;\n this._previousPlaceholder = placeholder;\n placeholder\n ? element.setAttribute('placeholder', placeholder)\n : element.removeAttribute('placeholder');\n }\n }\n\n /** Gets the current placeholder of the form field. */\n protected _getPlaceholder(): string | null {\n return this.placeholder || null;\n }\n\n /** Make sure the input is a supported type. */\n protected _validateType() {\n if (\n MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1 &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throw getMatInputUnsupportedTypeError(this._type);\n }\n }\n\n /** Checks whether the input type is one of the types that are never empty. */\n protected _isNeverEmpty() {\n return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n }\n\n /** Checks whether the input is invalid based on the native validation. */\n protected _isBadInput() {\n // The `validity` property won't be present on platform-server.\n let validity = (this._elementRef.nativeElement as HTMLInputElement).validity;\n return validity && validity.badInput;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get empty(): boolean {\n return (\n !this._isNeverEmpty() &&\n !this._elementRef.nativeElement.value &&\n !this._isBadInput() &&\n !this.autofilled\n );\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat(): boolean {\n if (this._isNativeSelect) {\n // For a single-selection `<select>`, the label should float when the selected option has\n // a non-empty display value. For a `<select multiple>`, the label *always* floats to avoid\n // overlapping the label with the options.\n const selectElement = this._elementRef.nativeElement as HTMLSelectElement;\n const firstOption: HTMLOptionElement | undefined = selectElement.options[0];\n\n // On most browsers the `selectedIndex` will always be 0, however on IE and Edge it'll be\n // -1 if the `value` is set to something, that isn't in the list of options, at a later point.\n return (\n this.focused ||\n selectElement.multiple ||\n !this.empty ||\n !!(selectElement.selectedIndex > -1 && firstOption && firstOption.label)\n );\n } else {\n return (this.focused && !this.disabled) || !this.empty;\n }\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get describedByIds(): string[] {\n const element = this._elementRef.nativeElement;\n const existingDescribedBy = element.getAttribute('aria-describedby');\n\n return existingDescribedBy?.split(' ') || [];\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids: string[]) {\n const element = this._elementRef.nativeElement;\n\n if (ids.length) {\n element.setAttribute('aria-describedby', ids.join(' '));\n } else {\n element.removeAttribute('aria-describedby');\n }\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n // Do not re-focus the input element if the element is already focused. Otherwise it can happen\n // that someone clicks on a time input and the cursor resets to the \"hours\" field while the\n // \"minutes\" field was actually clicked. See: https://github.com/angular/components/issues/12849\n if (!this.focused) {\n this.focus();\n }\n }\n\n /** Whether the form control is a native select that is displayed inline. */\n _isInlineSelect(): boolean {\n const element = this._elementRef.nativeElement as HTMLSelectElement;\n return this._isNativeSelect && (element.multiple || element.size > 1);\n }\n\n private _iOSKeyupListener = (event: Event): void => {\n const el = event.target as HTMLInputElement;\n\n // Note: We specifically check for 0, rather than `!el.selectionStart`, because the two\n // indicate different things. If the value is 0, it means that the caret is at the start\n // of the input, whereas a value of `null` means that the input doesn't support\n // manipulating the selection range. Inputs that don't support setting the selection range\n // will throw an error so we want to avoid calling `setSelectionRange` on them. See:\n // https://html.spec.whatwg.org/multipage/input.html#do-not-apply\n if (!el.value && el.selectionStart === 0 && el.selectionEnd === 0) {\n // Note: Just setting `0, 0` doesn't fix the issue. Setting\n // `1, 1` fixes it for the first time that you type text and\n // then hold delete. Toggling to `1, 1` and then back to\n // `0, 0` seems to completely fix it.\n el.setSelectionRange(1, 1);\n el.setSelectionRange(0, 0);\n }\n };\n\n private _webkitBlinkWheelListener = (): void => {\n // This is a noop function and is used to enable mouse wheel input\n // on number inputs\n // on blink and webkit browsers.\n };\n\n /**\n * In blink and webkit browsers a focused number input does not increment or decrement its value\n * on mouse wheel interaction unless a wheel event listener is attached to it or one of its\n * ancestors or a passive wheel listener is attached somewhere in the DOM. For example: Hitting\n * a tooltip once enables the mouse wheel input for all number inputs as long as it exists. In\n * order to get reliable and intuitive behavior we apply a wheel event on our own thus making\n * sure increment and decrement by mouse wheel works every time.\n * @docs-private\n */\n private _ensureWheelDefaultBehavior(): void {\n this._cleanupWebkitWheel?.();\n\n if (this._type === 'number' && (this._platform.BLINK || this._platform.WEBKIT)) {\n this._cleanupWebkitWheel = this._renderer.listen(\n this._elementRef.nativeElement,\n 'wheel',\n this._webkitBlinkWheelListener,\n );\n }\n }\n\n /** Gets the value to set on the `readonly` attribute. */\n protected _getReadonlyAttribute(): string | null {\n if (this._isNativeSelect) {\n return null;\n }\n\n if (this.readonly || (this.disabled && this.disabledInteractive)) {\n return 'true';\n }\n\n return null;\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.dev/license\n */\n\nimport {TextFieldModule} from '@angular/cdk/text-field';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '../core';\nimport {MatFormFieldModule} from '../form-field';\nimport {MatInput} from './input';\n\n@NgModule({\n imports: [MatCommonModule, MatFormFieldModule, MatInput],\n exports: [MatInput, MatFormFieldModule, TextFieldModule, MatCommonModule],\n})\nexport class MatInputModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAQA;AACM,SAAU,+BAA+B,CAAC,IAAY,EAAA;AAC1D,IAAA,OAAO,KAAK,CAAC,CAAA,YAAA,EAAe,IAAI,CAAA,8BAAA,CAAgC,CAAC;AACnE;;ACyBA;AACA,MAAM,uBAAuB,GAAG;IAC9B,QAAQ;IACR,UAAU;IACV,MAAM;IACN,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;CACT;AAQD;MACa,gBAAgB,GAAG,IAAI,cAAc,CAAiB,kBAAkB;MAsCxE,QAAQ,CAAA;AAGT,IAAA,WAAW,GACnB,MAAM,CAAyE,UAAU,CAAC;AAClF,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AACtC,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,CAAE;AACpD,IAAA,gBAAgB,GAAG,MAAM,CAAC,eAAe,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c76129e412/bin/src/material/input/input.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/input/module.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.dev/license\n */\n\n/** @docs-private */\nexport function getMatInputUnsupportedTypeError(type: string): Error {\n return Error(`Input type \"${type}\" isn't supported by matInput.`);\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.dev/license\n */\n\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {getSupportedInputTypes, Platform} from '@angular/cdk/platform';\nimport {AutofillMonitor} from '@angular/cdk/text-field';\nimport {\n AfterViewInit,\n booleanAttribute,\n Directive,\n DoCheck,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n Input,\n isSignal,\n NgZone,\n OnChanges,\n OnDestroy,\n Renderer2,\n WritableSignal,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {FormGroupDirective, NgControl, NgForm, Validators} from '@angular/forms';\nimport {ErrorStateMatcher, _ErrorStateTracker} from '../core';\nimport {MatFormFieldControl, MatFormField, MAT_FORM_FIELD} from '../form-field';\nimport {Subject} from 'rxjs';\nimport {getMatInputUnsupportedTypeError} from './input-errors';\nimport {MAT_INPUT_VALUE_ACCESSOR} from './input-value-accessor';\n\n// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.\nconst MAT_INPUT_INVALID_TYPES = [\n 'button',\n 'checkbox',\n 'file',\n 'hidden',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit',\n];\n\n/** Object that can be used to configure the default options for the input. */\nexport interface MatInputConfig {\n /** Whether disabled inputs should be interactive. */\n disabledInteractive?: boolean;\n}\n\n/** Injection token that can be used to provide the default options for the input. */\nexport const MAT_INPUT_CONFIG = new InjectionToken<MatInputConfig>('MAT_INPUT_CONFIG');\n\n@Directive({\n selector: `input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]`,\n exportAs: 'matInput',\n host: {\n 'class': 'mat-mdc-input-element',\n // The BaseMatInput parent class adds `mat-input-element`, `mat-form-field-control` and\n // `mat-form-field-autofill-control` to the CSS class list, but this should not be added for\n // this MDC equivalent input.\n '[class.mat-input-server]': '_isServer',\n '[class.mat-mdc-form-field-textarea-control]': '_isInFormField && _isTextarea',\n '[class.mat-mdc-form-field-input-control]': '_isInFormField',\n '[class.mat-mdc-input-disabled-interactive]': 'disabledInteractive',\n '[class.mdc-text-field__input]': '_isInFormField',\n '[class.mat-mdc-native-select-inline]': '_isInlineSelect()',\n // Native input properties that are overwritten by Angular inputs need to be synced with\n // the native input element. Otherwise property bindings for those don't work.\n '[id]': 'id',\n '[disabled]': 'disabled && !disabledInteractive',\n '[required]': 'required',\n '[attr.name]': 'name || null',\n '[attr.readonly]': '_getReadonlyAttribute()',\n '[attr.aria-disabled]': 'disabled && disabledInteractive ? \"true\" : null',\n // Only mark the input as invalid for assistive technology if it has a value since the\n // state usually overlaps with `aria-required` when the input is empty and can be redundant.\n '[attr.aria-invalid]': '(empty && required) ? null : errorState',\n '[attr.aria-required]': 'required',\n // Native input properties that are overwritten by Angular inputs need to be synced with\n // the native input element. Otherwise property bindings for those don't work.\n '[attr.id]': 'id',\n '(focus)': '_focusChanged(true)',\n '(blur)': '_focusChanged(false)',\n '(input)': '_onInput()',\n },\n providers: [{provide: MatFormFieldControl, useExisting: MatInput}],\n})\nexport class MatInput\n implements MatFormFieldControl<any>, OnChanges, OnDestroy, AfterViewInit, DoCheck\n{\n protected _elementRef =\n inject<ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>>(ElementRef);\n protected _platform = inject(Platform);\n ngControl = inject(NgControl, {optional: true, self: true})!;\n private _autofillMonitor = inject(AutofillMonitor);\n private _ngZone = inject(NgZone);\n protected _formField? = inject<MatFormField>(MAT_FORM_FIELD, {optional: true});\n private _renderer = inject(Renderer2);\n\n protected _uid = inject(_IdGenerator).getId('mat-input-');\n protected _previousNativeValue: any;\n private _inputValueAccessor: {value: any};\n private _signalBasedValueAccessor?: {value: WritableSignal<any>};\n private _previousPlaceholder: string | null;\n private _errorStateTracker: _ErrorStateTracker;\n private _config = inject(MAT_INPUT_CONFIG, {optional: true});\n private _cleanupIosKeyup: (() => void) | undefined;\n private _cleanupWebkitWheel: (() => void) | undefined;\n\n /** Whether the component is being rendered on the server. */\n readonly _isServer: boolean;\n\n /** Whether the component is a native html select. */\n readonly _isNativeSelect: boolean;\n\n /** Whether the component is a textarea. */\n readonly _isTextarea: boolean;\n\n /** Whether the input is inside of a form field. */\n readonly _isInFormField: boolean;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n focused: boolean = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n readonly stateChanges: Subject<void> = new Subject<void>();\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n controlType: string = 'mat-input';\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n autofilled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: BooleanInput) {\n this._disabled = coerceBooleanProperty(value);\n\n // Browsers may not fire the blur event if the input is disabled too quickly.\n // Reset from here to ensure that the element doesn't become stuck.\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n protected _disabled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get id(): string {\n return this._id;\n }\n set id(value: string) {\n this._id = value || this._uid;\n }\n protected _id: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input() placeholder: string;\n\n /**\n * Name of the input.\n * @docs-private\n */\n @Input() name: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get required(): boolean {\n return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n }\n set required(value: BooleanInput) {\n this._required = coerceBooleanProperty(value);\n }\n protected _required: boolean | undefined;\n\n /** Input type of the element. */\n @Input()\n get type(): string {\n return this._type;\n }\n set type(value: string) {\n this._type = value || 'text';\n this._validateType();\n\n // When using Angular inputs, developers are no longer able to set the properties on the native\n // input element. To ensure that bindings for `type` work, we need to sync the setter\n // with the native property. Textarea elements don't support the type property or attribute.\n if (!this._isTextarea && getSupportedInputTypes().has(this._type)) {\n (this._elementRef.nativeElement as HTMLInputElement).type = this._type;\n }\n }\n protected _type = 'text';\n\n /** An object used to control when error messages are shown. */\n @Input()\n get errorStateMatcher() {\n return this._errorStateTracker.matcher;\n }\n set errorStateMatcher(value: ErrorStateMatcher) {\n this._errorStateTracker.matcher = value;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input('aria-describedby') userAriaDescribedBy: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get value(): string {\n return this._signalBasedValueAccessor\n ? this._signalBasedValueAccessor.value()\n : this._inputValueAccessor.value;\n }\n set value(value: any) {\n if (value !== this.value) {\n if (this._signalBasedValueAccessor) {\n this._signalBasedValueAccessor.value.set(value);\n } else {\n this._inputValueAccessor.value = value;\n }\n\n this.stateChanges.next();\n }\n }\n\n /** Whether the element is readonly. */\n @Input()\n get readonly(): boolean {\n return this._readonly;\n }\n set readonly(value: BooleanInput) {\n this._readonly = coerceBooleanProperty(value);\n }\n private _readonly = false;\n\n /** Whether the input should remain interactive when it is disabled. */\n @Input({transform: booleanAttribute})\n disabledInteractive: boolean;\n\n /** Whether the input is in an error state. */\n get errorState() {\n return this._errorStateTracker.errorState;\n }\n set errorState(value: boolean) {\n this._errorStateTracker.errorState = value;\n }\n\n protected _neverEmptyInputTypes = [\n 'date',\n 'datetime',\n 'datetime-local',\n 'month',\n 'time',\n 'week',\n ].filter(t => getSupportedInputTypes().has(t));\n\n constructor(...args: unknown[]);\n\n constructor() {\n const parentForm = inject(NgForm, {optional: true});\n const parentFormGroup = inject(FormGroupDirective, {optional: true});\n const defaultErrorStateMatcher = inject(ErrorStateMatcher);\n const accessor = inject(MAT_INPUT_VALUE_ACCESSOR, {optional: true, self: true});\n\n const element = this._elementRef.nativeElement;\n const nodeName = element.nodeName.toLowerCase();\n\n if (accessor) {\n if (isSignal(accessor.value)) {\n this._signalBasedValueAccessor = accessor;\n } else {\n this._inputValueAccessor = accessor;\n }\n } else {\n // If no input value accessor was explicitly specified, use the element as the input value\n // accessor.\n this._inputValueAccessor = element;\n }\n\n this._previousNativeValue = this.value;\n\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n\n // On some versions of iOS the caret gets stuck in the wrong place when holding down the delete\n // key. In order to get around this we need to \"jiggle\" the caret loose. Since this bug only\n // exists on iOS, we only bother to install the listener on iOS.\n if (this._platform.IOS) {\n this._ngZone.runOutsideAngular(() => {\n this._cleanupIosKeyup = this._renderer.listen(element, 'keyup', this._iOSKeyupListener);\n });\n }\n\n this._errorStateTracker = new _ErrorStateTracker(\n defaultErrorStateMatcher,\n this.ngControl,\n parentFormGroup,\n parentForm,\n this.stateChanges,\n );\n this._isServer = !this._platform.isBrowser;\n this._isNativeSelect = nodeName === 'select';\n this._isTextarea = nodeName === 'textarea';\n this._isInFormField = !!this._formField;\n this.disabledInteractive = this._config?.disabledInteractive || false;\n\n if (this._isNativeSelect) {\n this.controlType = (element as HTMLSelectElement).multiple\n ? 'mat-native-select-multiple'\n : 'mat-native-select';\n }\n\n if (this._signalBasedValueAccessor) {\n effect(() => {\n // Read the value so the effect can register the dependency.\n this._signalBasedValueAccessor!.value();\n this.stateChanges.next();\n });\n }\n }\n\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(event => {\n this.autofilled = event.isAutofilled;\n this.stateChanges.next();\n });\n }\n }\n\n ngOnChanges() {\n this.stateChanges.next();\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n\n if (this._platform.isBrowser) {\n this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);\n }\n\n this._cleanupIosKeyup?.();\n this._cleanupWebkitWheel?.();\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n\n // Since the input isn't a `ControlValueAccessor`, we don't have a good way of knowing when\n // the disabled state has changed. We can't use the `ngControl.statusChanges`, because it\n // won't fire if the input is disabled with `emitEvents = false`, despite the input becoming\n // disabled.\n if (this.ngControl.disabled !== null && this.ngControl.disabled !== this.disabled) {\n this.disabled = this.ngControl.disabled;\n this.stateChanges.next();\n }\n }\n\n // We need to dirty-check the native element's value, because there are some cases where\n // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n // updating the value using `emitEvent: false`).\n this._dirtyCheckNativeValue();\n\n // We need to dirty-check and set the placeholder attribute ourselves, because whether it's\n // present or not depends on a query which is prone to \"changed after checked\" errors.\n this._dirtyCheckPlaceholder();\n }\n\n /** Focuses the input. */\n focus(options?: FocusOptions): void {\n this._elementRef.nativeElement.focus(options);\n }\n\n /** Refreshes the error state of the input. */\n updateErrorState() {\n this._errorStateTracker.updateErrorState();\n }\n\n /** Callback for the cases where the focused state of the input changes. */\n _focusChanged(isFocused: boolean) {\n if (isFocused === this.focused) {\n return;\n }\n\n if (!this._isNativeSelect && isFocused && this.disabled && this.disabledInteractive) {\n const element = this._elementRef.nativeElement as HTMLInputElement;\n\n // Focusing an input that has text will cause all the text to be selected. Clear it since\n // the user won't be able to change it. This is based on the internal implementation.\n if (element.type === 'number') {\n // setSelectionRange doesn't work on number inputs so it needs to be set briefly to text.\n element.type = 'text';\n element.setSelectionRange(0, 0);\n element.type = 'number';\n } else {\n element.setSelectionRange(0, 0);\n }\n }\n\n this.focused = isFocused;\n this.stateChanges.next();\n }\n\n _onInput() {\n // This is a noop function and is used to let Angular know whenever the value changes.\n // Angular will run a new change detection each time the `input` event has been dispatched.\n // It's necessary that Angular recognizes the value change, because when floatingLabel\n // is set to false and Angular forms aren't used, the placeholder won't recognize the\n // value changes and will not disappear.\n // Listening to the input event wouldn't be necessary when the input is using the\n // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.\n }\n\n /** Does some manual dirty checking on the native input `value` property. */\n protected _dirtyCheckNativeValue() {\n const newValue = this._elementRef.nativeElement.value;\n\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n\n /** Does some manual dirty checking on the native input `placeholder` attribute. */\n private _dirtyCheckPlaceholder() {\n const placeholder = this._getPlaceholder();\n if (placeholder !== this._previousPlaceholder) {\n const element = this._elementRef.nativeElement;\n this._previousPlaceholder = placeholder;\n placeholder\n ? element.setAttribute('placeholder', placeholder)\n : element.removeAttribute('placeholder');\n }\n }\n\n /** Gets the current placeholder of the form field. */\n protected _getPlaceholder(): string | null {\n return this.placeholder || null;\n }\n\n /** Make sure the input is a supported type. */\n protected _validateType() {\n if (\n MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1 &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throw getMatInputUnsupportedTypeError(this._type);\n }\n }\n\n /** Checks whether the input type is one of the types that are never empty. */\n protected _isNeverEmpty() {\n return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n }\n\n /** Checks whether the input is invalid based on the native validation. */\n protected _isBadInput() {\n // The `validity` property won't be present on platform-server.\n let validity = (this._elementRef.nativeElement as HTMLInputElement).validity;\n return validity && validity.badInput;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get empty(): boolean {\n return (\n !this._isNeverEmpty() &&\n !this._elementRef.nativeElement.value &&\n !this._isBadInput() &&\n !this.autofilled\n );\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat(): boolean {\n if (this._isNativeSelect) {\n // For a single-selection `<select>`, the label should float when the selected option has\n // a non-empty display value. For a `<select multiple>`, the label *always* floats to avoid\n // overlapping the label with the options.\n const selectElement = this._elementRef.nativeElement as HTMLSelectElement;\n const firstOption: HTMLOptionElement | undefined = selectElement.options[0];\n\n // On most browsers the `selectedIndex` will always be 0, however on IE and Edge it'll be\n // -1 if the `value` is set to something, that isn't in the list of options, at a later point.\n return (\n this.focused ||\n selectElement.multiple ||\n !this.empty ||\n !!(selectElement.selectedIndex > -1 && firstOption && firstOption.label)\n );\n } else {\n return (this.focused && !this.disabled) || !this.empty;\n }\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get describedByIds(): string[] {\n const element = this._elementRef.nativeElement;\n const existingDescribedBy = element.getAttribute('aria-describedby');\n\n return existingDescribedBy?.split(' ') || [];\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids: string[]) {\n const element = this._elementRef.nativeElement;\n\n if (ids.length) {\n element.setAttribute('aria-describedby', ids.join(' '));\n } else {\n element.removeAttribute('aria-describedby');\n }\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n // Do not re-focus the input element if the element is already focused. Otherwise it can happen\n // that someone clicks on a time input and the cursor resets to the \"hours\" field while the\n // \"minutes\" field was actually clicked. See: https://github.com/angular/components/issues/12849\n if (!this.focused) {\n this.focus();\n }\n }\n\n /** Whether the form control is a native select that is displayed inline. */\n _isInlineSelect(): boolean {\n const element = this._elementRef.nativeElement as HTMLSelectElement;\n return this._isNativeSelect && (element.multiple || element.size > 1);\n }\n\n private _iOSKeyupListener = (event: Event): void => {\n const el = event.target as HTMLInputElement;\n\n // Note: We specifically check for 0, rather than `!el.selectionStart`, because the two\n // indicate different things. If the value is 0, it means that the caret is at the start\n // of the input, whereas a value of `null` means that the input doesn't support\n // manipulating the selection range. Inputs that don't support setting the selection range\n // will throw an error so we want to avoid calling `setSelectionRange` on them. See:\n // https://html.spec.whatwg.org/multipage/input.html#do-not-apply\n if (!el.value && el.selectionStart === 0 && el.selectionEnd === 0) {\n // Note: Just setting `0, 0` doesn't fix the issue. Setting\n // `1, 1` fixes it for the first time that you type text and\n // then hold delete. Toggling to `1, 1` and then back to\n // `0, 0` seems to completely fix it.\n el.setSelectionRange(1, 1);\n el.setSelectionRange(0, 0);\n }\n };\n\n /** Gets the value to set on the `readonly` attribute. */\n protected _getReadonlyAttribute(): string | null {\n if (this._isNativeSelect) {\n return null;\n }\n\n if (this.readonly || (this.disabled && this.disabledInteractive)) {\n return 'true';\n }\n\n return null;\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.dev/license\n */\n\nimport {TextFieldModule} from '@angular/cdk/text-field';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '../core';\nimport {MatFormFieldModule} from '../form-field';\nimport {MatInput} from './input';\n\n@NgModule({\n imports: [MatCommonModule, MatFormFieldModule, MatInput],\n exports: [MatInput, MatFormFieldModule, TextFieldModule, MatCommonModule],\n})\nexport class MatInputModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAQA;AACM,SAAU,+BAA+B,CAAC,IAAY,EAAA;AAC1D,IAAA,OAAO,KAAK,CAAC,CAAA,YAAA,EAAe,IAAI,CAAA,8BAAA,CAAgC,CAAC;AACnE;;ACyBA;AACA,MAAM,uBAAuB,GAAG;IAC9B,QAAQ;IACR,UAAU;IACV,MAAM;IACN,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;CACT;AAQD;MACa,gBAAgB,GAAG,IAAI,cAAc,CAAiB,kBAAkB;MAsCxE,QAAQ,CAAA;AAGT,IAAA,WAAW,GACnB,MAAM,CAAyE,UAAU,CAAC;AAClF,IAAA,SAAS,GAAG,MAAM,CAAC,Q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A,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAHf,OAAA,EAAA,CAAA,eAAe,EAAE,kBAAkB,EAAE,QAAQ,CAC7C,EAAA,OAAA,EAAA,CAAA,QAAQ,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,CAAA,EAAA,CAAA;wGAE7D,cAAc,EAAA,OAAA,EAAA,CAHf,eAAe,EAAE,kBAAkB,EACzB,kBAAkB,EAAE,eAAe,EAAE,eAAe,CAAA,EAAA,CAAA;;2FAE7D,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,eAAe,EAAE,kBAAkB,EAAE,QAAQ,CAAC;oBACxD,OAAO,EAAE,CAAC,QAAQ,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,CAAC;AAC1E,iBAAA;;;;;"}
@@ -76,18 +76,7 @@ class MatMenuHarness extends ContentContainerComponentHarness {
76
76
  */
77
77
  async clickItem(itemFilter, ...subItemFilters) {
78
78
  await this.open();
79
- const items = await this.getItems(itemFilter);
80
- if (!items.length) {
81
- throw Error(`Could not find item matching ${JSON.stringify(itemFilter)}`);
82
- }
83
- if (!subItemFilters.length) {
84
- return await items[0].click();
85
- }
86
- const menu = await items[0].getSubmenu();
87
- if (!menu) {
88
- throw Error(`Item matching ${JSON.stringify(itemFilter)} does not have a submenu`);
89
- }
90
- return menu.clickItem(...subItemFilters);
79
+ return clickItemImplementation(await this.getItems(itemFilter), itemFilter, subItemFilters);
91
80
  }
92
81
  async getRootHarnessLoader() {
93
82
  const panelId = await this._getPanelId();
@@ -154,6 +143,101 @@ class MatMenuItemHarness extends ContentContainerComponentHarness {
154
143
  return null;
155
144
  }
156
145
  }
146
+ async function clickItemImplementation(items, itemFilter, subItemFilters) {
147
+ if (!items.length) {
148
+ throw Error(`Could not find item matching ${JSON.stringify(itemFilter)}`);
149
+ }
150
+ if (!subItemFilters.length) {
151
+ return await items[0].click();
152
+ }
153
+ const menu = await items[0].getSubmenu();
154
+ if (!menu) {
155
+ throw Error(`Item matching ${JSON.stringify(itemFilter)} does not have a submenu`);
156
+ }
157
+ return menu.clickItem(...subItemFilters);
158
+ }
159
+
160
+ /** Harness for interacting with context menus in tests. */
161
+ class MatContextMenuHarness extends ContentContainerComponentHarness {
162
+ _documentRootLocator = this.documentRootLocatorFactory();
163
+ /** The selector for the host element of a `MatContextMenu` instance. */
164
+ static hostSelector = '.mat-context-menu-trigger';
165
+ /**
166
+ * Gets a `HarnessPredicate` that can be used to search for a context menu with specific
167
+ * attributes.
168
+ * @param options Options for filtering which menu instances are considered a match.
169
+ * @return a `HarnessPredicate` configured with the given options.
170
+ */
171
+ static with(options = {}) {
172
+ return new HarnessPredicate(this, options);
173
+ }
174
+ /** Whether the menu is open. */
175
+ async isOpen() {
176
+ return !!(await this._getMenuPanel());
177
+ }
178
+ /**
179
+ * Opens the menu.
180
+ * @param relativeX X coordinate, relative to the element, to dispatch the opening click at.
181
+ * @param relativeY Y coordinate, relative to the element, to dispatch the opening click at.
182
+ */
183
+ async open(relativeX = 0, relativeY = 0) {
184
+ if (!(await this.isOpen())) {
185
+ return (await this.host()).rightClick(relativeX, relativeY);
186
+ }
187
+ }
188
+ /** Closes the menu. */
189
+ async close() {
190
+ const panel = await this._getMenuPanel();
191
+ if (panel) {
192
+ return panel.click();
193
+ }
194
+ }
195
+ /** Gets whether the context menu trigger is disabled. */
196
+ async isDisabled() {
197
+ const host = await this.host();
198
+ return host.hasClass('mat-context-menu-trigger-disabled');
199
+ }
200
+ /**
201
+ * Gets a list of `MatMenuItemHarness` representing the items in the menu.
202
+ * @param filters Optionally filters which menu items are included.
203
+ */
204
+ async getItems(filters) {
205
+ const panelId = await this._getPanelId();
206
+ if (panelId) {
207
+ return this._documentRootLocator.locatorForAll(MatMenuItemHarness.with({
208
+ ...(filters || {}),
209
+ ancestor: `#${panelId}`,
210
+ }))();
211
+ }
212
+ return [];
213
+ }
214
+ /**
215
+ * Clicks an item in the menu, and optionally continues clicking items in subsequent sub-menus.
216
+ * @param itemFilter A filter used to represent which item in the menu should be clicked. The
217
+ * first matching menu item will be clicked.
218
+ * @param subItemFilters A list of filters representing the items to click in any subsequent
219
+ * sub-menus. The first item in the sub-menu matching the corresponding filter in
220
+ * `subItemFilters` will be clicked.
221
+ */
222
+ async clickItem(itemFilter, ...subItemFilters) {
223
+ await this.open();
224
+ return clickItemImplementation(await this.getItems(itemFilter), itemFilter, subItemFilters);
225
+ }
226
+ async getRootHarnessLoader() {
227
+ const panelId = await this._getPanelId();
228
+ return this.documentRootLocatorFactory().harnessLoaderFor(`#${panelId}`);
229
+ }
230
+ /** Gets the menu panel associated with this menu. */
231
+ async _getMenuPanel() {
232
+ const panelId = await this._getPanelId();
233
+ return panelId ? this._documentRootLocator.locatorForOptional(`#${panelId}`)() : null;
234
+ }
235
+ /** Gets the id of the menu panel associated with this menu. */
236
+ async _getPanelId() {
237
+ const panelId = await (await this.host()).getAttribute('aria-controls');
238
+ return panelId || null;
239
+ }
240
+ }
157
241
 
158
- export { MatMenuHarness, MatMenuItemHarness };
242
+ export { MatContextMenuHarness, MatMenuHarness, MatMenuItemHarness };
159
243
  //# sourceMappingURL=testing.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"testing.mjs","sources":["../../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/menu/testing/menu-harness.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.dev/license\n */\n\nimport {\n ComponentHarnessConstructor,\n ContentContainerComponentHarness,\n HarnessLoader,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {MenuHarnessFilters, MenuItemHarnessFilters} from './menu-harness-filters';\n\n/** Harness for interacting with a mat-menu in tests. */\nexport class MatMenuHarness extends ContentContainerComponentHarness<string> {\n private _documentRootLocator = this.documentRootLocatorFactory();\n\n /** The selector for the host element of a `MatMenu` instance. */\n static hostSelector = '.mat-mdc-menu-trigger';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a menu with specific attributes.\n * @param options Options for filtering which menu instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatMenuHarness>(\n this: ComponentHarnessConstructor<T>,\n options: MenuHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options).addOption(\n 'triggerText',\n options.triggerText,\n (harness, text) => HarnessPredicate.stringMatches(harness.getTriggerText(), text),\n );\n }\n\n /** Whether the menu is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this.host()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Whether the menu is open. */\n async isOpen(): Promise<boolean> {\n return !!(await this._getMenuPanel());\n }\n\n /** Gets the text of the menu's trigger element. */\n async getTriggerText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Focuses the menu. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the menu. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the menu is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Opens the menu. */\n async open(): Promise<void> {\n if (!(await this.isOpen())) {\n return (await this.host()).click();\n }\n }\n\n /** Closes the menu. */\n async close(): Promise<void> {\n const panel = await this._getMenuPanel();\n if (panel) {\n return panel.click();\n }\n }\n\n /**\n * Gets a list of `MatMenuItemHarness` representing the items in the menu.\n * @param filters Optionally filters which menu items are included.\n */\n async getItems(\n filters?: Omit<MenuItemHarnessFilters, 'ancestor'>,\n ): Promise<MatMenuItemHarness[]> {\n const panelId = await this._getPanelId();\n if (panelId) {\n return this._documentRootLocator.locatorForAll(\n MatMenuItemHarness.with({\n ...(filters || {}),\n ancestor: `#${panelId}`,\n } as MenuItemHarnessFilters),\n )();\n }\n return [];\n }\n\n /**\n * Clicks an item in the menu, and optionally continues clicking items in subsequent sub-menus.\n * @param itemFilter A filter used to represent which item in the menu should be clicked. The\n * first matching menu item will be clicked.\n * @param subItemFilters A list of filters representing the items to click in any subsequent\n * sub-menus. The first item in the sub-menu matching the corresponding filter in\n * `subItemFilters` will be clicked.\n */\n async clickItem(\n itemFilter: Omit<MenuItemHarnessFilters, 'ancestor'>,\n ...subItemFilters: Omit<MenuItemHarnessFilters, 'ancestor'>[]\n ): Promise<void> {\n await this.open();\n const items = await this.getItems(itemFilter);\n if (!items.length) {\n throw Error(`Could not find item matching ${JSON.stringify(itemFilter)}`);\n }\n\n if (!subItemFilters.length) {\n return await items[0].click();\n }\n\n const menu = await items[0].getSubmenu();\n if (!menu) {\n throw Error(`Item matching ${JSON.stringify(itemFilter)} does not have a submenu`);\n }\n return menu.clickItem(...(subItemFilters as [Omit<MenuItemHarnessFilters, 'ancestor'>]));\n }\n\n protected override async getRootHarnessLoader(): Promise<HarnessLoader> {\n const panelId = await this._getPanelId();\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${panelId}`);\n }\n\n /** Gets the menu panel associated with this menu. */\n private async _getMenuPanel(): Promise<TestElement | null> {\n const panelId = await this._getPanelId();\n return panelId ? this._documentRootLocator.locatorForOptional(`#${panelId}`)() : null;\n }\n\n /** Gets the id of the menu panel associated with this menu. */\n private async _getPanelId(): Promise<string | null> {\n const panelId = await (await this.host()).getAttribute('aria-controls');\n return panelId || null;\n }\n}\n\nexport class MatMenuItemHarness extends ContentContainerComponentHarness<string> {\n /** The selector for the host element of a `MatMenuItem` instance. */\n static hostSelector = '.mat-mdc-menu-item';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a menu item with specific attributes.\n * @param options Options for filtering which menu item instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatMenuItemHarness>(\n this: ComponentHarnessConstructor<T>,\n options: MenuItemHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getText(), text),\n )\n .addOption(\n 'hasSubmenu',\n options.hasSubmenu,\n async (harness, hasSubmenu) => (await harness.hasSubmenu()) === hasSubmenu,\n );\n }\n\n /** Whether the menu is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this.host()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Gets the text of the menu item. */\n async getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Focuses the menu item. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the menu item. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the menu item is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Clicks the menu item. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Whether this item has a submenu. */\n async hasSubmenu(): Promise<boolean> {\n return (await this.host()).matchesSelector(MatMenuHarness.hostSelector);\n }\n\n /** Gets the submenu associated with this menu item, or null if none. */\n async getSubmenu(): Promise<MatMenuHarness | null> {\n if (await this.hasSubmenu()) {\n return new MatMenuHarness(this.locatorFactory);\n }\n return null;\n }\n}\n"],"names":[],"mappings":";;;AAkBA;AACM,MAAO,cAAe,SAAQ,gCAAwC,CAAA;AAClE,IAAA,oBAAoB,GAAG,IAAI,CAAC,0BAA0B,EAAE;;AAGhE,IAAA,OAAO,YAAY,GAAG,uBAAuB;AAE7C;;;;AAIG;AACH,IAAA,OAAO,IAAI,CAET,OAAA,GAA8B,EAAE,EAAA;AAEhC,QAAA,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,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AAE;;;AAIpC,IAAA,MAAM,IAAI,GAAA;QACR,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE;;;AAInC,IAAA,MAAM,SAAS,GAAA;QACb,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE;;;AAIxC,IAAA,MAAM,KAAK,GAAA;QACT,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE;;;AAIpC,IAAA,MAAM,UAAU,GAAA;AACd,QAAA,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,eAAe,CAAC,cAAc,CAAC,YAAY,CAAC;;;AAIzE,IAAA,MAAM,UAAU,GAAA;AACd,QAAA,IAAI,MAAM,IAAI,CAAC,UAAU,EAAE,EAAE;AAC3B,YAAA,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,cAAc,CAAC;;AAEhD,QAAA,OAAO,IAAI;;;;;;"}
1
+ {"version":3,"file":"testing.mjs","sources":["../../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/menu/testing/menu-harness.ts","../../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/menu/testing/context-menu-harness.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.dev/license\n */\n\nimport {\n ComponentHarnessConstructor,\n ContentContainerComponentHarness,\n HarnessLoader,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {MenuHarnessFilters, MenuItemHarnessFilters} from './menu-harness-filters';\n\n/** Harness for interacting with a mat-menu in tests. */\nexport class MatMenuHarness extends ContentContainerComponentHarness<string> {\n private _documentRootLocator = this.documentRootLocatorFactory();\n\n /** The selector for the host element of a `MatMenu` instance. */\n static hostSelector = '.mat-mdc-menu-trigger';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a menu with specific attributes.\n * @param options Options for filtering which menu instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatMenuHarness>(\n this: ComponentHarnessConstructor<T>,\n options: MenuHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options).addOption(\n 'triggerText',\n options.triggerText,\n (harness, text) => HarnessPredicate.stringMatches(harness.getTriggerText(), text),\n );\n }\n\n /** Whether the menu is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this.host()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Whether the menu is open. */\n async isOpen(): Promise<boolean> {\n return !!(await this._getMenuPanel());\n }\n\n /** Gets the text of the menu's trigger element. */\n async getTriggerText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Focuses the menu. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the menu. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the menu is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Opens the menu. */\n async open(): Promise<void> {\n if (!(await this.isOpen())) {\n return (await this.host()).click();\n }\n }\n\n /** Closes the menu. */\n async close(): Promise<void> {\n const panel = await this._getMenuPanel();\n if (panel) {\n return panel.click();\n }\n }\n\n /**\n * Gets a list of `MatMenuItemHarness` representing the items in the menu.\n * @param filters Optionally filters which menu items are included.\n */\n async getItems(\n filters?: Omit<MenuItemHarnessFilters, 'ancestor'>,\n ): Promise<MatMenuItemHarness[]> {\n const panelId = await this._getPanelId();\n if (panelId) {\n return this._documentRootLocator.locatorForAll(\n MatMenuItemHarness.with({\n ...(filters || {}),\n ancestor: `#${panelId}`,\n } as MenuItemHarnessFilters),\n )();\n }\n return [];\n }\n\n /**\n * Clicks an item in the menu, and optionally continues clicking items in subsequent sub-menus.\n * @param itemFilter A filter used to represent which item in the menu should be clicked. The\n * first matching menu item will be clicked.\n * @param subItemFilters A list of filters representing the items to click in any subsequent\n * sub-menus. The first item in the sub-menu matching the corresponding filter in\n * `subItemFilters` will be clicked.\n */\n async clickItem(\n itemFilter: Omit<MenuItemHarnessFilters, 'ancestor'>,\n ...subItemFilters: Omit<MenuItemHarnessFilters, 'ancestor'>[]\n ): Promise<void> {\n await this.open();\n return clickItemImplementation(await this.getItems(itemFilter), itemFilter, subItemFilters);\n }\n\n protected override async getRootHarnessLoader(): Promise<HarnessLoader> {\n const panelId = await this._getPanelId();\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${panelId}`);\n }\n\n /** Gets the menu panel associated with this menu. */\n private async _getMenuPanel(): Promise<TestElement | null> {\n const panelId = await this._getPanelId();\n return panelId ? this._documentRootLocator.locatorForOptional(`#${panelId}`)() : null;\n }\n\n /** Gets the id of the menu panel associated with this menu. */\n private async _getPanelId(): Promise<string | null> {\n const panelId = await (await this.host()).getAttribute('aria-controls');\n return panelId || null;\n }\n}\n\nexport class MatMenuItemHarness extends ContentContainerComponentHarness<string> {\n /** The selector for the host element of a `MatMenuItem` instance. */\n static hostSelector = '.mat-mdc-menu-item';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a menu item with specific attributes.\n * @param options Options for filtering which menu item instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatMenuItemHarness>(\n this: ComponentHarnessConstructor<T>,\n options: MenuItemHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getText(), text),\n )\n .addOption(\n 'hasSubmenu',\n options.hasSubmenu,\n async (harness, hasSubmenu) => (await harness.hasSubmenu()) === hasSubmenu,\n );\n }\n\n /** Whether the menu is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this.host()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Gets the text of the menu item. */\n async getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Focuses the menu item. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the menu item. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the menu item is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Clicks the menu item. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Whether this item has a submenu. */\n async hasSubmenu(): Promise<boolean> {\n return (await this.host()).matchesSelector(MatMenuHarness.hostSelector);\n }\n\n /** Gets the submenu associated with this menu item, or null if none. */\n async getSubmenu(): Promise<MatMenuHarness | null> {\n if (await this.hasSubmenu()) {\n return new MatMenuHarness(this.locatorFactory);\n }\n return null;\n }\n}\n\nexport async function clickItemImplementation(\n items: MatMenuItemHarness[],\n itemFilter: Omit<MenuItemHarnessFilters, 'ancestor'>,\n subItemFilters: Omit<MenuItemHarnessFilters, 'ancestor'>[],\n): Promise<void> {\n if (!items.length) {\n throw Error(`Could not find item matching ${JSON.stringify(itemFilter)}`);\n }\n\n if (!subItemFilters.length) {\n return await items[0].click();\n }\n\n const menu = await items[0].getSubmenu();\n if (!menu) {\n throw Error(`Item matching ${JSON.stringify(itemFilter)} does not have a submenu`);\n }\n return menu.clickItem(...(subItemFilters as [Omit<MenuItemHarnessFilters, 'ancestor'>]));\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.dev/license\n */\n\nimport {\n ComponentHarnessConstructor,\n ContentContainerComponentHarness,\n HarnessLoader,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {ContextMenuHarnessFilters, MenuItemHarnessFilters} from './menu-harness-filters';\nimport {clickItemImplementation, MatMenuItemHarness} from './menu-harness';\n\n/** Harness for interacting with context menus in tests. */\nexport class MatContextMenuHarness extends ContentContainerComponentHarness<string> {\n private _documentRootLocator = this.documentRootLocatorFactory();\n\n /** The selector for the host element of a `MatContextMenu` instance. */\n static hostSelector = '.mat-context-menu-trigger';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a context menu with specific\n * attributes.\n * @param options Options for filtering which menu instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatContextMenuHarness>(\n this: ComponentHarnessConstructor<T>,\n options: ContextMenuHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options);\n }\n\n /** Whether the menu is open. */\n async isOpen(): Promise<boolean> {\n return !!(await this._getMenuPanel());\n }\n\n /**\n * Opens the menu.\n * @param relativeX X coordinate, relative to the element, to dispatch the opening click at.\n * @param relativeY Y coordinate, relative to the element, to dispatch the opening click at.\n */\n async open(relativeX = 0, relativeY = 0): Promise<void> {\n if (!(await this.isOpen())) {\n return (await this.host()).rightClick(relativeX, relativeY);\n }\n }\n\n /** Closes the menu. */\n async close(): Promise<void> {\n const panel = await this._getMenuPanel();\n if (panel) {\n return panel.click();\n }\n }\n\n /** Gets whether the context menu trigger is disabled. */\n async isDisabled(): Promise<boolean> {\n const host = await this.host();\n return host.hasClass('mat-context-menu-trigger-disabled');\n }\n\n /**\n * Gets a list of `MatMenuItemHarness` representing the items in the menu.\n * @param filters Optionally filters which menu items are included.\n */\n async getItems(\n filters?: Omit<MenuItemHarnessFilters, 'ancestor'>,\n ): Promise<MatMenuItemHarness[]> {\n const panelId = await this._getPanelId();\n if (panelId) {\n return this._documentRootLocator.locatorForAll(\n MatMenuItemHarness.with({\n ...(filters || {}),\n ancestor: `#${panelId}`,\n } as MenuItemHarnessFilters),\n )();\n }\n return [];\n }\n\n /**\n * Clicks an item in the menu, and optionally continues clicking items in subsequent sub-menus.\n * @param itemFilter A filter used to represent which item in the menu should be clicked. The\n * first matching menu item will be clicked.\n * @param subItemFilters A list of filters representing the items to click in any subsequent\n * sub-menus. The first item in the sub-menu matching the corresponding filter in\n * `subItemFilters` will be clicked.\n */\n async clickItem(\n itemFilter: Omit<MenuItemHarnessFilters, 'ancestor'>,\n ...subItemFilters: Omit<MenuItemHarnessFilters, 'ancestor'>[]\n ): Promise<void> {\n await this.open();\n return clickItemImplementation(await this.getItems(itemFilter), itemFilter, subItemFilters);\n }\n\n protected override async getRootHarnessLoader(): Promise<HarnessLoader> {\n const panelId = await this._getPanelId();\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${panelId}`);\n }\n\n /** Gets the menu panel associated with this menu. */\n private async _getMenuPanel(): Promise<TestElement | null> {\n const panelId = await this._getPanelId();\n return panelId ? this._documentRootLocator.locatorForOptional(`#${panelId}`)() : null;\n }\n\n /** Gets the id of the menu panel associated with this menu. */\n private async _getPanelId(): Promise<string | null> {\n const panelId = await (await this.host()).getAttribute('aria-controls');\n return panelId || null;\n }\n}\n"],"names":[],"mappings":";;;AAkBA;AACM,MAAO,cAAe,SAAQ,gCAAwC,CAAA;AAClE,IAAA,oBAAoB,GAAG,IAAI,CAAC,0BAA0B,EAAE;;AAGhE,IAAA,OAAO,YAAY,GAAG,uBAAuB;AAE7C;;;;AAIG;AACH,IAAA,OAAO,IAAI,CAET,OAAA,GAA8B,EAAE,EAAA;AAEhC,QAAA,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,CAClD,aAAa,EACb,OAAO,CAAC,WAAW,EACnB,CAAC,OAAO,EAAE,IAAI,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,IAAI,CAAC,CAClF;;;AAIH,IAAA,MAAM,UAAU,GAAA;AACd,QAAA,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,UAAU,CAAC;AAC7D,QAAA,OAAO,qBAAqB,CAAC,MAAM,QAAQ,CAAC;;;AAI9C,IAAA,MAAM,MAAM,GAAA;QACV,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;;;AAIvC,IAAA,MAAM,cAAc,GAAA;QAClB,OAAO,CAAC,MAAM,IAAI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