blob: bc585287b5894807c81d5cb46bfdf2c6ddff78cf [file] [log] [blame]
{"version":3,"file":"radio.js","sources":["../../../src/material/radio/radio-module.ts","../../../src/material/radio/radio.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 {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatRadioButton, MatRadioGroup} from './radio';\n\n\n@NgModule({\n imports: [CommonModule, MatRippleModule, MatCommonModule],\n exports: [MatRadioGroup, MatRadioButton, MatCommonModule],\n declarations: [MatRadioGroup, MatRadioButton],\n})\nexport class MatRadioModule {}\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 {FocusMonitor} from '@angular/cdk/a11y';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {UniqueSelectionDispatcher} from '@angular/cdk/collections';\nimport {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n InjectionToken,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanDisableRipple,\n CanDisableRippleCtor,\n HasTabIndex,\n HasTabIndexCtor,\n mixinDisableRipple,\n mixinTabIndex,\n ThemePalette,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\n\nexport interface MatRadioDefaultOptions {\n color: ThemePalette;\n}\n\nexport const MAT_RADIO_DEFAULT_OPTIONS =\n new InjectionToken<MatRadioDefaultOptions>('mat-radio-default-options', {\n providedIn: 'root',\n factory: MAT_RADIO_DEFAULT_OPTIONS_FACTORY\n});\n\nexport function MAT_RADIO_DEFAULT_OPTIONS_FACTORY(): MatRadioDefaultOptions {\n return {\n color: 'accent'\n };\n}\n\n// Increasing integer for generating unique ids for radio components.\nlet nextUniqueId = 0;\n\n/**\n * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This\n * allows it to support [(ngModel)] and ngControl.\n * @docs-private\n */\nexport const MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatRadioGroup),\n multi: true\n};\n\n/** Change event object emitted by MatRadio and MatRadioGroup. */\nexport class MatRadioChange {\n constructor(\n /** The MatRadioButton that emits the change event. */\n public source: MatRadioButton,\n /** The value of the MatRadioButton. */\n public value: any) {}\n}\n\n/**\n * A group of radio buttons. May contain one or more `<mat-radio-button>` elements.\n */\n@Directive({\n selector: 'mat-radio-group',\n exportAs: 'matRadioGroup',\n providers: [MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR],\n host: {\n 'role': 'radiogroup',\n 'class': 'mat-radio-group',\n },\n})\nexport class MatRadioGroup implements AfterContentInit, ControlValueAccessor {\n /** Selected value for the radio group. */\n private _value: any = null;\n\n /** The HTML name attribute applied to radio buttons in this group. */\n private _name: string = `mat-radio-group-${nextUniqueId++}`;\n\n /** The currently selected radio button. Should match value. */\n private _selected: MatRadioButton | null = null;\n\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n private _labelPosition: 'before' | 'after' = 'after';\n\n /** Whether the radio group is disabled. */\n private _disabled: boolean = false;\n\n /** Whether the radio group is required. */\n private _required: boolean = false;\n\n /** The method to be called in order to update ngModel */\n _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n onTouched: () => any = () => {};\n\n /**\n * Event emitted when the group value changes.\n * Change events are only emitted when the value changes due to user interaction with\n * a radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** Child radio buttons. */\n @ContentChildren(forwardRef(() => MatRadioButton), { descendants: true })\n _radios: QueryList<MatRadioButton>;\n\n /** Theme color for all of the radio buttons in the group. */\n @Input() color: ThemePalette;\n\n /** Name of the radio button group. All radio buttons inside this group will use this name. */\n @Input()\n get name(): string { return this._name; }\n set name(value: string) {\n this._name = value;\n this._updateRadioButtonNames();\n }\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition;\n }\n set labelPosition(v) {\n this._labelPosition = v === 'before' ? 'before' : 'after';\n this._markRadiosForCheck();\n }\n\n /**\n * Value for the radio-group. Should equal the value of the selected radio button if there is\n * a corresponding radio button with a matching value. If there is not such a corresponding\n * radio button, this value persists to be applied in case a new radio button is added with a\n * matching value.\n */\n @Input()\n get value(): any { return this._value; }\n set value(newValue: any) {\n if (this._value !== newValue) {\n // Set this before proceeding to ensure no circular loop occurs with selection.\n this._value = newValue;\n\n this._updateSelectedRadioFromValue();\n this._checkSelectedRadioButton();\n }\n }\n\n _checkSelectedRadioButton() {\n if (this._selected && !this._selected.checked) {\n this._selected.checked = true;\n }\n }\n\n /**\n * The currently selected radio button. If set to a new radio button, the radio group value\n * will be updated to match the new selected button.\n */\n @Input()\n get selected() { return this._selected; }\n set selected(selected: MatRadioButton | null) {\n this._selected = selected;\n this.value = selected ? selected.value : null;\n this._checkSelectedRadioButton();\n }\n\n /** Whether the radio group is disabled */\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n\n /** Whether the radio group is required */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n\n constructor(private _changeDetector: ChangeDetectorRef) { }\n\n /**\n * Initialize properties once content children are available.\n * This allows us to propagate relevant attributes to associated buttons.\n */\n ngAfterContentInit() {\n // Mark this component as initialized in AfterContentInit because the initial value can\n // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the\n // NgModel occurs *after* the OnInit of the MatRadioGroup.\n this._isInitialized = true;\n }\n\n /**\n * Mark this group as being \"touched\" (for ngModel). Meant to be called by the contained\n * radio buttons upon their blur.\n */\n _touch() {\n if (this.onTouched) {\n this.onTouched();\n }\n }\n\n private _updateRadioButtonNames(): void {\n if (this._radios) {\n this._radios.forEach(radio => {\n radio.name = this.name;\n radio._markForCheck();\n });\n }\n }\n\n /** Updates the `selected` radio button from the internal _value state. */\n private _updateSelectedRadioFromValue(): void {\n // If the value already matches the selected radio, do nothing.\n const isAlreadySelected = this._selected !== null && this._selected.value === this._value;\n\n if (this._radios && !isAlreadySelected) {\n this._selected = null;\n this._radios.forEach(radio => {\n radio.checked = this.value === radio.value;\n if (radio.checked) {\n this._selected = radio;\n }\n });\n }\n }\n\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent(): void {\n if (this._isInitialized) {\n this.change.emit(new MatRadioChange(this._selected!, this._value));\n }\n }\n\n _markRadiosForCheck() {\n if (this._radios) {\n this._radios.forEach(radio => radio._markForCheck());\n }\n }\n\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value\n */\n writeValue(value: any) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n this._changeDetector.markForCheck();\n }\n}\n\n// Boilerplate for applying mixins to MatRadioButton.\n/** @docs-private */\nclass MatRadioButtonBase {\n // Since the disabled property is manually defined for the MatRadioButton and isn't set up in\n // the mixin base class. To be able to use the tabindex mixin, a disabled property must be\n // defined to properly work.\n disabled: boolean;\n\n constructor(public _elementRef: ElementRef) {}\n}\n// As per Material design specifications the selection control radio should use the accent color\n// palette by default. https://material.io/guidelines/components/selection-controls.html\nconst _MatRadioButtonMixinBase:\n CanDisableRippleCtor & HasTabIndexCtor & typeof MatRadioButtonBase =\n mixinDisableRipple(mixinTabIndex(MatRadioButtonBase));\n\n/**\n * A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-radio-button',\n templateUrl: 'radio.html',\n styleUrls: ['radio.css'],\n inputs: ['disableRipple', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matRadioButton',\n host: {\n 'class': 'mat-radio-button',\n '[class.mat-radio-checked]': 'checked',\n '[class.mat-radio-disabled]': 'disabled',\n '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n '[class.mat-primary]': 'color === \"primary\"',\n '[class.mat-accent]': 'color === \"accent\"',\n '[class.mat-warn]': 'color === \"warn\"',\n // Needs to be -1 so the `focus` event still fires.\n '[attr.tabindex]': '-1',\n '[attr.id]': 'id',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the native element.\n '(focus)': '_inputElement.nativeElement.focus()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatRadioButton extends _MatRadioButtonMixinBase\n implements OnInit, AfterViewInit, OnDestroy, CanDisableRipple, HasTabIndex {\n\n private _uniqueId: string = `mat-radio-${++nextUniqueId}`;\n\n /** The unique ID for the radio button. */\n @Input() id: string = this._uniqueId;\n\n /** Analog to HTML 'name' attribute used to group radios for unique selection. */\n @Input() name: string;\n\n /** Used to set the 'aria-label' attribute on the underlying input element. */\n @Input('aria-label') ariaLabel: string;\n\n /** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n /** Whether this radio button is checked. */\n @Input()\n get checked(): boolean { return this._checked; }\n set checked(value: boolean) {\n const newCheckedState = coerceBooleanProperty(value);\n if (this._checked !== newCheckedState) {\n this._checked = newCheckedState;\n if (newCheckedState && this.radioGroup && this.radioGroup.value !== this.value) {\n this.radioGroup.selected = this;\n } else if (!newCheckedState && this.radioGroup && this.radioGroup.value === this.value) {\n\n // When unchecking the selected radio button, update the selected radio\n // property on the group.\n this.radioGroup.selected = null;\n }\n\n if (newCheckedState) {\n // Notify all radio buttons with the same name to un-check.\n this._radioDispatcher.notify(this.id, this.name);\n }\n this._changeDetector.markForCheck();\n }\n }\n\n /** The value of this radio button. */\n @Input()\n get value(): any { return this._value; }\n set value(value: any) {\n if (this._value !== value) {\n this._value = value;\n if (this.radioGroup !== null) {\n if (!this.checked) {\n // Update checked when the value changed to match the radio group's value\n this.checked = this.radioGroup.value === value;\n }\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n }\n }\n }\n\n /** Whether the label should appear after or before the radio button. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition || (this.radioGroup && this.radioGroup.labelPosition) || 'after';\n }\n set labelPosition(value) {\n this._labelPosition = value;\n }\n private _labelPosition: 'before' | 'after';\n\n /** Whether the radio button is disabled. */\n @Input()\n get disabled(): boolean {\n return this._disabled || (this.radioGroup !== null && this.radioGroup.disabled);\n }\n set disabled(value: boolean) {\n const newDisabledState = coerceBooleanProperty(value);\n if (this._disabled !== newDisabledState) {\n this._disabled = newDisabledState;\n this._changeDetector.markForCheck();\n }\n }\n\n /** Whether the radio button is required. */\n @Input()\n get required(): boolean {\n return this._required || (this.radioGroup && this.radioGroup.required);\n }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n }\n\n /** Theme color of the radio button. */\n @Input()\n get color(): ThemePalette {\n return this._color ||\n (this.radioGroup && this.radioGroup.color) ||\n this._providerOverride && this._providerOverride.color || 'accent';\n }\n set color(newValue: ThemePalette) { this._color = newValue; }\n private _color: ThemePalette;\n\n /**\n * Event emitted when the checked state of this radio button changes.\n * Change events are only emitted when the value changes due to user interaction with\n * the radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** The parent radio group. May or may not be present. */\n radioGroup: MatRadioGroup;\n\n /** ID of the native input element inside `<mat-radio-button>` */\n get inputId(): string { return `${this.id || this._uniqueId}-input`; }\n\n /** Whether this radio is checked. */\n private _checked: boolean = false;\n\n /** Whether this radio is disabled. */\n private _disabled: boolean;\n\n /** Whether this radio is required. */\n private _required: boolean;\n\n /** Value assigned to this radio. */\n private _value: any = null;\n\n /** Unregister function for _radioDispatcher */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n /** The native `<input type=radio>` element */\n @ViewChild('input', {static: false}) _inputElement: ElementRef<HTMLInputElement>;\n\n constructor(@Optional() radioGroup: MatRadioGroup,\n elementRef: ElementRef,\n private _changeDetector: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _radioDispatcher: UniqueSelectionDispatcher,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n @Optional() @Inject(MAT_RADIO_DEFAULT_OPTIONS)\n private _providerOverride?: MatRadioDefaultOptions) {\n super(elementRef);\n\n // Assertions. Ideally these should be stripped out by the compiler.\n // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.\n this.radioGroup = radioGroup;\n\n this._removeUniqueSelectionListener =\n _radioDispatcher.listen((id: string, name: string) => {\n if (id !== this.id && name === this.name) {\n this.checked = false;\n }\n });\n }\n\n /** Focuses the radio button. */\n focus(): void {\n this._focusMonitor.focusVia(this._inputElement, 'keyboard');\n }\n\n /**\n * Marks the radio button as needing checking for change detection.\n * This method is exposed because the parent radio group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }\n\n ngOnInit() {\n if (this.radioGroup) {\n // If the radio is inside a radio group, determine if it should be checked\n this.checked = this.radioGroup.value === this._value;\n // Copy name from parent radio group\n this.name = this.radioGroup.name;\n }\n }\n\n ngAfterViewInit() {\n this._focusMonitor\n .monitor(this._elementRef, true)\n .subscribe(focusOrigin => {\n if (!focusOrigin && this.radioGroup) {\n this.radioGroup._touch();\n }\n });\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._removeUniqueSelectionListener();\n }\n\n /** Dispatch change event with current value. */\n private _emitChangeEvent(): void {\n this.change.emit(new MatRadioChange(this, this._value));\n }\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n _onInputClick(event: Event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `radio-button` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n }\n\n /**\n * Triggered when the radio button received a click or the input recognized any change.\n * Clicking on a label element, will trigger a change event on the associated input.\n */\n _onInputChange(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n\n const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;\n this.checked = true;\n this._emitChangeEvent();\n\n if (this.radioGroup) {\n this.radioGroup._controlValueAccessorChangeFn(this.value);\n if (groupValueChanged) {\n this.radioGroup._emitChangeE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