@angular/material 12.2.0-rc.0 → 12.2.3

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 (51) hide show
  1. package/bundles/material-checkbox.umd.js +1 -1
  2. package/bundles/material-checkbox.umd.js.map +1 -1
  3. package/bundles/material-core.umd.js +15 -14
  4. package/bundles/material-core.umd.js.map +1 -1
  5. package/bundles/material-datepicker.umd.js +51 -8
  6. package/bundles/material-datepicker.umd.js.map +1 -1
  7. package/bundles/material-expansion.umd.js +1 -1
  8. package/bundles/material-expansion.umd.js.map +1 -1
  9. package/bundles/material-stepper.umd.js +1 -1
  10. package/bundles/material-stepper.umd.js.map +1 -1
  11. package/bundles/material-tabs.umd.js +1 -1
  12. package/checkbox/index.metadata.json +1 -1
  13. package/core/common-behaviors/common-module.d.ts +2 -2
  14. package/core/index.metadata.json +1 -1
  15. package/core/theming/_theming.scss +3 -1
  16. package/datepicker/index.metadata.json +1 -1
  17. package/datepicker/month-view.d.ts +6 -0
  18. package/datepicker/multi-year-view.d.ts +4 -0
  19. package/datepicker/year-view.d.ts +4 -0
  20. package/esm2015/checkbox/checkbox.js +2 -2
  21. package/esm2015/core/common-behaviors/common-module.js +15 -14
  22. package/esm2015/core/version.js +1 -1
  23. package/esm2015/datepicker/calendar-body.js +2 -2
  24. package/esm2015/datepicker/month-view.js +21 -4
  25. package/esm2015/datepicker/multi-year-view.js +16 -3
  26. package/esm2015/datepicker/year-view.js +16 -3
  27. package/esm2015/expansion/expansion-panel.js +2 -2
  28. package/esm2015/stepper/stepper.js +2 -2
  29. package/esm2015/tabs/tab-group.js +1 -1
  30. package/expansion/expansion-panel.d.ts +1 -1
  31. package/fesm2015/checkbox.js +1 -1
  32. package/fesm2015/checkbox.js.map +1 -1
  33. package/fesm2015/core.js +15 -14
  34. package/fesm2015/core.js.map +1 -1
  35. package/fesm2015/datepicker.js +51 -8
  36. package/fesm2015/datepicker.js.map +1 -1
  37. package/fesm2015/expansion.js +1 -1
  38. package/fesm2015/expansion.js.map +1 -1
  39. package/fesm2015/stepper.js +1 -1
  40. package/fesm2015/stepper.js.map +1 -1
  41. package/fesm2015/tabs.js +1 -1
  42. package/package.json +3 -6
  43. package/prebuilt-themes/deeppurple-amber.css +1 -1
  44. package/prebuilt-themes/indigo-pink.css +1 -1
  45. package/prebuilt-themes/pink-bluegrey.css +1 -1
  46. package/prebuilt-themes/purple-green.css +1 -1
  47. package/schematics/ng-add/index.js +1 -1
  48. package/schematics/ng-add/index.mjs +1 -1
  49. package/stepper/_stepper-theme.scss +6 -1
  50. package/stepper/index.metadata.json +1 -1
  51. package/tabs/index.metadata.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","sources":["../../../../../../src/material/checkbox/checkbox-config.ts","../../../../../../src/material/checkbox/checkbox.ts","../../../../../../src/material/checkbox/checkbox-required-validator.ts","../../../../../../src/material/checkbox/checkbox-module.ts","../../../../../../src/material/checkbox/public-api.ts","../../../../../../src/material/checkbox/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {InjectionToken} from '@angular/core';\nimport {ThemePalette} from '@angular/material/core';\n\n/** Default `mat-checkbox` options that can be overridden. */\nexport interface MatCheckboxDefaultOptions {\n /** Default theme color palette to be used for checkboxes. */\n color?: ThemePalette;\n /** Default checkbox click action for checkboxes. */\n clickAction?: MatCheckboxClickAction;\n}\n\n/** Injection token to be used to override the default options for `mat-checkbox`. */\nexport const MAT_CHECKBOX_DEFAULT_OPTIONS =\n new InjectionToken<MatCheckboxDefaultOptions>('mat-checkbox-default-options', {\n providedIn: 'root',\n factory: MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY\n });\n\n/** @docs-private */\nexport function MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY(): MatCheckboxDefaultOptions {\n return {\n color: 'accent',\n clickAction: 'check-indeterminate',\n };\n}\n\n/**\n * Checkbox click action when user click on input element.\n * noop: Do not toggle checked or indeterminate.\n * check: Only toggle checked status, ignore indeterminate.\n * check-indeterminate: Toggle checked status, set indeterminate to false. Default behavior.\n * undefined: Same as `check-indeterminate`.\n */\nexport type MatCheckboxClickAction = 'noop' | 'check' | 'check-indeterminate' | undefined;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusableOption, FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty, NumberInput} from '@angular/cdk/coercion';\nimport {\n AfterViewChecked,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n AfterViewInit,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanColor,\n CanDisable,\n CanDisableRipple,\n HasTabIndex,\n MatRipple,\n mixinColor,\n mixinDisabled,\n mixinDisableRipple,\n mixinTabIndex,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {\n MAT_CHECKBOX_DEFAULT_OPTIONS,\n MatCheckboxDefaultOptions,\n MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY,\n} from './checkbox-config';\n\n\n// Increasing integer for generating unique ids for checkbox components.\nlet nextUniqueId = 0;\n\n// Default checkbox configuration.\nconst defaults = MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY();\n\n/**\n * Provider Expression that allows mat-checkbox to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nexport const MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatCheckbox),\n multi: true\n};\n\n/**\n * Represents the different states that require custom transitions between them.\n * @docs-private\n */\nexport const enum TransitionCheckState {\n /** The initial state of the component before any user interaction. */\n Init,\n /** The state representing the component when it's becoming checked. */\n Checked,\n /** The state representing the component when it's becoming unchecked. */\n Unchecked,\n /** The state representing the component when it's becoming indeterminate. */\n Indeterminate\n}\n\n/** Change event object emitted by MatCheckbox. */\nexport class MatCheckboxChange {\n /** The source MatCheckbox of the event. */\n source: MatCheckbox;\n /** The new `checked` value of the checkbox. */\n checked: boolean;\n}\n\n// Boilerplate for applying mixins to MatCheckbox.\n/** @docs-private */\nconst _MatCheckboxBase = mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(class {\n constructor(public _elementRef: ElementRef) {}\n}))));\n\n\n/**\n * A material design checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A MatCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n * See: https://material.io/design/components/selection-controls.html\n */\n@Component({\n selector: 'mat-checkbox',\n templateUrl: 'checkbox.html',\n styleUrls: ['checkbox.css'],\n exportAs: 'matCheckbox',\n host: {\n 'class': 'mat-checkbox',\n '[id]': 'id',\n '[attr.tabindex]': 'null',\n '[class.mat-checkbox-indeterminate]': 'indeterminate',\n '[class.mat-checkbox-checked]': 'checked',\n '[class.mat-checkbox-disabled]': 'disabled',\n '[class.mat-checkbox-label-before]': 'labelPosition == \"before\"',\n '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n },\n providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR],\n inputs: ['disableRipple', 'color', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatCheckbox extends _MatCheckboxBase implements ControlValueAccessor,\n AfterViewInit, AfterViewChecked, OnDestroy, CanColor, CanDisable, HasTabIndex, CanDisableRipple,\n FocusableOption {\n\n /**\n * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will\n * take precedence so this may be omitted.\n */\n @Input('aria-label') ariaLabel: string = '';\n\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n private _uniqueId: string = `mat-checkbox-${++nextUniqueId}`;\n\n /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */\n @Input() id: string = this._uniqueId;\n\n /** Returns the unique id for the visual hidden input. */\n get inputId(): string { return `${this.id || this._uniqueId}-input`; }\n\n /** Whether the checkbox is required. */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) { this._required = coerceBooleanProperty(value); }\n private _required: boolean;\n\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n @Input() labelPosition: 'before' | 'after' = 'after';\n\n /** Name value will be applied to the input element if present */\n @Input() name: string | null = null;\n\n /** Event emitted when the checkbox's `checked` value changes. */\n @Output() readonly change: EventEmitter<MatCheckboxChange> =\n new EventEmitter<MatCheckboxChange>();\n\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n @Output() readonly indeterminateChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The value attribute of the native input element */\n @Input() value: string;\n\n /** The native `<input type=\"checkbox\">` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n /** Reference to the ripple instance of the checkbox. */\n @ViewChild(MatRipple) ripple: MatRipple;\n\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @docs-private\n */\n _onTouched: () => any = () => {};\n\n private _currentAnimationClass: string = '';\n\n private _currentCheckState: TransitionCheckState = TransitionCheckState.Init;\n\n private _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n constructor(elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _ngZone: NgZone,\n @Attribute('tabindex') tabIndex: string,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n @Optional() @Inject(MAT_CHECKBOX_DEFAULT_OPTIONS)\n private _options?: MatCheckboxDefaultOptions) {\n super(elementRef);\n this._options = this._options || defaults;\n this.color = this.defaultColor = this._options.color || defaults.color;\n this.tabIndex = parseInt(tabIndex) || 0;\n }\n\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin) {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state change\n // (such as a form control's 'ng-touched') will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n });\n\n this._syncIndeterminate(this._indeterminate);\n }\n\n // TODO: Delete next major revision.\n ngAfterViewChecked() {}\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n /**\n * Whether the checkbox is checked.\n */\n @Input()\n get checked(): boolean { return this._checked; }\n set checked(value: boolean) {\n if (value != this.checked) {\n this._checked = value;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _checked: boolean = false;\n\n /**\n * Whether the checkbox is disabled. This fully overrides the implementation provided by\n * mixinDisabled, but the mixin is still required because mixinTabIndex requires it.\n */\n @Input()\n override get disabled() { return this._disabled; }\n override set disabled(value: any) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this.disabled) {\n this._disabled = newValue;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _disabled: boolean = false;\n\n /**\n * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n @Input()\n get indeterminate(): boolean { return this._indeterminate; }\n set indeterminate(value: boolean) {\n const changed = value != this._indeterminate;\n this._indeterminate = coerceBooleanProperty(value);\n\n if (changed) {\n if (this._indeterminate) {\n this._transitionCheckState(TransitionCheckState.Indeterminate);\n } else {\n this._transitionCheckState(\n this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n }\n this.indeterminateChange.emit(this._indeterminate);\n }\n\n this._syncIndeterminate(this._indeterminate);\n }\n private _indeterminate: boolean = false;\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n /** Method being called whenever the label text changes. */\n _onLabelTextChange() {\n // Since the event of the `cdkObserveContent` directive runs outside of the zone, the checkbox\n // component will be only marked for check, but no actual change detection runs automatically.\n // Instead of going back into the zone in order to trigger a change detection which causes\n // *all* components to be checked (if explicitly marked or not using OnPush), we only trigger\n // an explicit change detection for the checkbox view and its children.\n this._changeDetectorRef.detectChanges();\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: any) {\n this.checked = !!value;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: any) {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n _getAriaChecked(): 'true' | 'false' | 'mixed' {\n if (this.checked) {\n return 'true';\n }\n\n return this.indeterminate ? 'mixed' : 'false';\n }\n\n private _transitionCheckState(newState: TransitionCheckState) {\n let oldState = this._currentCheckState;\n let element: HTMLElement = this._elementRef.nativeElement;\n\n if (oldState === newState) {\n return;\n }\n if (this._currentAnimationClass.length > 0) {\n element.classList.remove(this._currentAnimationClass);\n }\n\n this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(\n oldState, newState);\n this._currentCheckState = newState;\n\n if (this._currentAnimationClass.length > 0) {\n element.classList.add(this._currentAnimationClass);\n\n // Remove the animation class to avoid animation when the checkbox is moved between containers\n const animationClass = this._currentAnimationClass;\n\n this._ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n element.classList.remove(animationClass);\n }, 1000);\n });\n }\n }\n\n private _emitChangeEvent() {\n const event = new MatCheckboxChange();\n event.source = this;\n event.checked = this.checked;\n\n this._controlValueAccessorChangeFn(this.checked);\n this.change.emit(event);\n\n // Assigning the value again here is redundant, but we have to do it in case it was\n // changed inside the `change` listener which will cause the input to be out of sync.\n if (this._inputElement) {\n this._inputElement.nativeElement.checked = this.checked;\n }\n }\n\n /** Toggles the `checked` state of the checkbox. */\n toggle(): void {\n this.checked = !this.checked;\n }\n\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n * Do not toggle on (change) event since IE doesn't fire change event when\n * indeterminate checkbox is clicked.\n * @param event\n */\n _onInputClick(event: Event) {\n const clickAction = this._options?.clickAction;\n\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 `checkbox` 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 // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click\n if (!this.disabled && clickAction !== 'noop') {\n // When user manually click on the checkbox, `indeterminate` is set to false.\n if (this.indeterminate && clickAction !== 'check') {\n\n Promise.resolve().then(() => {\n this._indeterminate = false;\n this.indeterminateChange.emit(this._indeterminate);\n });\n }\n\n this.toggle();\n this._transitionCheckState(\n this._checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this._emitChangeEvent();\n } else if (!this.disabled && clickAction === 'noop') {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `mat-checkbox`.\n this._inputElement.nativeElement.checked = this.checked;\n this._inputElement.nativeElement.indeterminate = this.indeterminate;\n }\n }\n\n /** Focuses the checkbox. */\n focus(origin?: FocusOrigin, options?: FocusOptions): void {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n } else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n\n _onInteractionEvent(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\n private _getAnimationClassForCheckStateTransition(\n oldState: TransitionCheckState, newState: TransitionCheckState): string {\n // Don't transition if animations are disabled.\n if (this._animationMode === 'NoopAnimations') {\n return '';\n }\n\n let animSuffix: string = '';\n\n switch (oldState) {\n case TransitionCheckState.Init:\n // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or\n // [checked] bound to it.\n if (newState === TransitionCheckState.Checked) {\n animSuffix = 'unchecked-checked';\n } else if (newState == TransitionCheckState.Indeterminate) {\n animSuffix = 'unchecked-indeterminate';\n } else {\n return '';\n }\n break;\n case TransitionCheckState.Unchecked:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'unchecked-checked' : 'unchecked-indeterminate';\n break;\n case TransitionCheckState.Checked:\n animSuffix = newState === TransitionCheckState.Unchecked ?\n 'checked-unchecked' : 'checked-indeterminate';\n break;\n case TransitionCheckState.Indeterminate:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'indeterminate-checked' : 'indeterminate-unchecked';\n break;\n }\n\n return `mat-checkbox-anim-${animSuffix}`;\n }\n\n /**\n * Syncs the indeterminate value with the checkbox DOM node.\n *\n * We sync `indeterminate` directly on the DOM node, because in Ivy the check for whether a\n * property is supported on an element boils down to `if (propName in element)`. Domino's\n * HTMLInputElement doesn't have an `indeterminate` property so Ivy will warn during\n * server-side rendering.\n */\n private _syncIndeterminate(value: boolean) {\n const nativeCheckbox = this._inputElement;\n\n if (nativeCheckbox) {\n nativeCheckbox.nativeElement.indeterminate = value;\n }\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_indeterminate: BooleanInput;\n static ngAcceptInputType_tabIndex: NumberInput;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Directive,\n forwardRef,\n Provider,\n} from '@angular/core';\nimport {\n CheckboxRequiredValidator,\n NG_VALIDATORS,\n} from '@angular/forms';\n\nexport const MAT_CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatCheckboxRequiredValidator),\n multi: true\n};\n\n/**\n * Validator for Material checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `mat-checkbox`.\n */\n@Directive({\n selector: `mat-checkbox[required][formControlName],\n mat-checkbox[required][formControl], mat-checkbox[required][ngModel]`,\n providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],\n})\nexport class MatCheckboxRequiredValidator extends CheckboxRequiredValidator {}\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 {ObserversModule} from '@angular/cdk/observers';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatCheckbox} from './checkbox';\nimport {MatCheckboxRequiredValidator} from './checkbox-required-validator';\n\n/** This module is used by both original and MDC-based checkbox implementations. */\n@NgModule({\n exports: [MatCheckboxRequiredValidator],\n declarations: [MatCheckboxRequiredValidator],\n})\nexport class _MatCheckboxRequiredValidatorModule {\n}\n\n@NgModule({\n imports: [\n MatRippleModule, MatCommonModule, ObserversModule,\n _MatCheckboxRequiredValidatorModule\n ],\n exports: [MatCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule],\n declarations: [MatCheckbox],\n})\nexport class MatCheckboxModule {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './checkbox';\nexport * from './checkbox-config';\nexport * from './checkbox-module';\nexport * from './checkbox-required-validator';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;AAkBA;MACa,4BAA4B,GACrC,IAAI,cAAc,CAA4B,8BAA8B,EAAE;IAC5E,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,oCAAoC;CAC9C,EAAE;AAEP;SACgB,oCAAoC;IAClD,OAAO;QACL,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,qBAAqB;KACnC,CAAC;AACJ;;AC/BA;;;;;;;AAiDA;AACA,IAAI,YAAY,GAAG,CAAC,CAAC;AAErB;AACA,MAAM,QAAQ,GAAG,oCAAoC,EAAE,CAAC;AAExD;;;;;MAKa,mCAAmC,GAAQ;IACtD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;IAC1C,KAAK,EAAE,IAAI;EACX;AAiBF;MACa,iBAAiB;CAK7B;AAED;AACA;AACA,MAAM,gBAAgB,GAAG,aAAa,CAAC,UAAU,CAAC,kBAAkB,CAAC,aAAa,CAAC;IACjF,YAAmB,WAAuB;QAAvB,gBAAW,GAAX,WAAW,CAAY;KAAI;CAC/C,CAAC,CAAC,CAAC,CAAC,CAAC;AAGN;;;;;;;;MA4Ba,WAAY,SAAQ,gBAAgB;IAkE/C,YAAY,UAAmC,EAC3B,kBAAqC,EACrC,aAA2B,EAC3B,OAAe,EACA,QAAgB,EACW,cAAuB,EAE7D,QAAoC;QAC1D,KAAK,CAAC,UAAU,CAAC,CAAC;QAPA,uBAAkB,GAAlB,kBAAkB,CAAmB;QACrC,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C,UAAU;YAFV,iBAAiB;YANM,YAAY;YAanC,MAAM;yCA6KO,SAAS,SAAC,UAAU;yCACpB,QAAQ,YAAI,MAAM,SAAC,qBAAqB;4CACxC,QAAQ,YAAI,MAAM,SAAC,4BAA4B;;;wBAhE3D,KAAK,SAAC,YAAY;6BAKlB,KAAK,SAAC,iBAAiB;8BAGvB,KAAK,SAAC,kBAAkB;iBAKxB,KAAK;uBAML,KAAK;4BAML,KAAK;mBAGL,KAAK;qBAGL,MAAM;kCAIN,MAAM;oBAGN,KAAK;4BAGL,SAAS,SAAC,OAAO;qBAGjB,SAAS,SAAC,SAAS;sBAwDnB,KAAK;uBAcL,KAAK;4BAkBL,KAAK;;;ACxQR;;;;;;;MAkBa,+BAA+B,GAAa;IACvD,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,MAAM,4BAA4B,CAAC;IAC3D,KAAK,EAAE,IAAI;EACX;AAEF;;;;;MAUa,4BAA6B,SAAQ,yBAAyB;;;YAL1E,SAAS,SAAC;gBACT,QAAQ,EAAE;kFACsE;gBAChF,SAAS,EAAE,CAAC,+BAA+B,CAAC;aAC7C;;;ACjCD;;;;;;;AAcA;MAKa,mCAAmC;;;YAJ/C,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,4BAA4B,CAAC;gBACvC,YAAY,EAAE,CAAC,4BAA4B,CAAC;aAC7C;;MAYY,iBAAiB;;;YAR7B,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,eAAe,EAAE,eAAe,EAAE,eAAe;oBACjD,mCAAmC;iBACpC;gBACD,OAAO,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,mCAAmC,CAAC;gBAC5E,YAAY,EAAE,CAAC,WAAW,CAAC;aAC5B;;;AC7BD;;;;;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"checkbox.js","sources":["../../../../../../src/material/checkbox/checkbox-config.ts","../../../../../../src/material/checkbox/checkbox.ts","../../../../../../src/material/checkbox/checkbox-required-validator.ts","../../../../../../src/material/checkbox/checkbox-module.ts","../../../../../../src/material/checkbox/public-api.ts","../../../../../../src/material/checkbox/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {InjectionToken} from '@angular/core';\nimport {ThemePalette} from '@angular/material/core';\n\n/** Default `mat-checkbox` options that can be overridden. */\nexport interface MatCheckboxDefaultOptions {\n /** Default theme color palette to be used for checkboxes. */\n color?: ThemePalette;\n /** Default checkbox click action for checkboxes. */\n clickAction?: MatCheckboxClickAction;\n}\n\n/** Injection token to be used to override the default options for `mat-checkbox`. */\nexport const MAT_CHECKBOX_DEFAULT_OPTIONS =\n new InjectionToken<MatCheckboxDefaultOptions>('mat-checkbox-default-options', {\n providedIn: 'root',\n factory: MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY\n });\n\n/** @docs-private */\nexport function MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY(): MatCheckboxDefaultOptions {\n return {\n color: 'accent',\n clickAction: 'check-indeterminate',\n };\n}\n\n/**\n * Checkbox click action when user click on input element.\n * noop: Do not toggle checked or indeterminate.\n * check: Only toggle checked status, ignore indeterminate.\n * check-indeterminate: Toggle checked status, set indeterminate to false. Default behavior.\n * undefined: Same as `check-indeterminate`.\n */\nexport type MatCheckboxClickAction = 'noop' | 'check' | 'check-indeterminate' | undefined;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusableOption, FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty, NumberInput} from '@angular/cdk/coercion';\nimport {\n AfterViewChecked,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n AfterViewInit,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanColor,\n CanDisable,\n CanDisableRipple,\n HasTabIndex,\n MatRipple,\n mixinColor,\n mixinDisabled,\n mixinDisableRipple,\n mixinTabIndex,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {\n MAT_CHECKBOX_DEFAULT_OPTIONS,\n MatCheckboxDefaultOptions,\n MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY,\n} from './checkbox-config';\n\n\n// Increasing integer for generating unique ids for checkbox components.\nlet nextUniqueId = 0;\n\n// Default checkbox configuration.\nconst defaults = MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY();\n\n/**\n * Provider Expression that allows mat-checkbox to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nexport const MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatCheckbox),\n multi: true\n};\n\n/**\n * Represents the different states that require custom transitions between them.\n * @docs-private\n */\nexport const enum TransitionCheckState {\n /** The initial state of the component before any user interaction. */\n Init,\n /** The state representing the component when it's becoming checked. */\n Checked,\n /** The state representing the component when it's becoming unchecked. */\n Unchecked,\n /** The state representing the component when it's becoming indeterminate. */\n Indeterminate\n}\n\n/** Change event object emitted by MatCheckbox. */\nexport class MatCheckboxChange {\n /** The source MatCheckbox of the event. */\n source: MatCheckbox;\n /** The new `checked` value of the checkbox. */\n checked: boolean;\n}\n\n// Boilerplate for applying mixins to MatCheckbox.\n/** @docs-private */\nconst _MatCheckboxBase = mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(class {\n constructor(public _elementRef: ElementRef) {}\n}))));\n\n\n/**\n * A material design checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A MatCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n * See: https://material.io/design/components/selection-controls.html\n */\n@Component({\n selector: 'mat-checkbox',\n templateUrl: 'checkbox.html',\n styleUrls: ['checkbox.css'],\n exportAs: 'matCheckbox',\n host: {\n 'class': 'mat-checkbox',\n '[id]': 'id',\n '[attr.tabindex]': 'null',\n '[class.mat-checkbox-indeterminate]': 'indeterminate',\n '[class.mat-checkbox-checked]': 'checked',\n '[class.mat-checkbox-disabled]': 'disabled',\n '[class.mat-checkbox-label-before]': 'labelPosition == \"before\"',\n '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n },\n providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR],\n inputs: ['disableRipple', 'color', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatCheckbox extends _MatCheckboxBase implements ControlValueAccessor,\n AfterViewInit, AfterViewChecked, OnDestroy, CanColor, CanDisable, HasTabIndex, CanDisableRipple,\n FocusableOption {\n\n /**\n * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will\n * take precedence so this may be omitted.\n */\n @Input('aria-label') ariaLabel: string = '';\n\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n private _uniqueId: string = `mat-checkbox-${++nextUniqueId}`;\n\n /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */\n @Input() id: string = this._uniqueId;\n\n /** Returns the unique id for the visual hidden input. */\n get inputId(): string { return `${this.id || this._uniqueId}-input`; }\n\n /** Whether the checkbox is required. */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) { this._required = coerceBooleanProperty(value); }\n private _required: boolean;\n\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n @Input() labelPosition: 'before' | 'after' = 'after';\n\n /** Name value will be applied to the input element if present */\n @Input() name: string | null = null;\n\n /** Event emitted when the checkbox's `checked` value changes. */\n @Output() readonly change: EventEmitter<MatCheckboxChange> =\n new EventEmitter<MatCheckboxChange>();\n\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n @Output() readonly indeterminateChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The value attribute of the native input element */\n @Input() value: string;\n\n /** The native `<input type=\"checkbox\">` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n /** Reference to the ripple instance of the checkbox. */\n @ViewChild(MatRipple) ripple: MatRipple;\n\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @docs-private\n */\n _onTouched: () => any = () => {};\n\n private _currentAnimationClass: string = '';\n\n private _currentCheckState: TransitionCheckState = TransitionCheckState.Init;\n\n private _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n constructor(elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _ngZone: NgZone,\n @Attribute('tabindex') tabIndex: string,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n @Optional() @Inject(MAT_CHECKBOX_DEFAULT_OPTIONS)\n private _options?: MatCheckboxDefaultOptions) {\n super(elementRef);\n this._options = this._options || defaults;\n this.color = this.defaultColor = this._options.color || defaults.color;\n this.tabIndex = parseInt(tabIndex) || 0;\n }\n\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin) {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state change\n // (such as a form control's 'ng-touched') will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n });\n\n this._syncIndeterminate(this._indeterminate);\n }\n\n // TODO: Delete next major revision.\n ngAfterViewChecked() {}\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n /**\n * Whether the checkbox is checked.\n */\n @Input()\n get checked(): boolean { return this._checked; }\n set checked(value: boolean) {\n if (value != this.checked) {\n this._checked = value;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _checked: boolean = false;\n\n /**\n * Whether the checkbox is disabled. This fully overrides the implementation provided by\n * mixinDisabled, but the mixin is still required because mixinTabIndex requires it.\n */\n @Input()\n override get disabled() { return this._disabled; }\n override set disabled(value: any) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this.disabled) {\n this._disabled = newValue;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _disabled: boolean = false;\n\n /**\n * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n @Input()\n get indeterminate(): boolean { return this._indeterminate; }\n set indeterminate(value: boolean) {\n const changed = value != this._indeterminate;\n this._indeterminate = coerceBooleanProperty(value);\n\n if (changed) {\n if (this._indeterminate) {\n this._transitionCheckState(TransitionCheckState.Indeterminate);\n } else {\n this._transitionCheckState(\n this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n }\n this.indeterminateChange.emit(this._indeterminate);\n }\n\n this._syncIndeterminate(this._indeterminate);\n }\n private _indeterminate: boolean = false;\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n /** Method being called whenever the label text changes. */\n _onLabelTextChange() {\n // Since the event of the `cdkObserveContent` directive runs outside of the zone, the checkbox\n // component will be only marked for check, but no actual change detection runs automatically.\n // Instead of going back into the zone in order to trigger a change detection which causes\n // *all* components to be checked (if explicitly marked or not using OnPush), we only trigger\n // an explicit change detection for the checkbox view and its children.\n this._changeDetectorRef.detectChanges();\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: any) {\n this.checked = !!value;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: any) {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n _getAriaChecked(): 'true' | 'false' | 'mixed' {\n if (this.checked) {\n return 'true';\n }\n\n return this.indeterminate ? 'mixed' : 'false';\n }\n\n private _transitionCheckState(newState: TransitionCheckState) {\n let oldState = this._currentCheckState;\n let element: HTMLElement = this._elementRef.nativeElement;\n\n if (oldState === newState) {\n return;\n }\n if (this._currentAnimationClass.length > 0) {\n element.classList.remove(this._currentAnimationClass);\n }\n\n this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(\n oldState, newState);\n this._currentCheckState = newState;\n\n if (this._currentAnimationClass.length > 0) {\n element.classList.add(this._currentAnimationClass);\n\n // Remove the animation class to avoid animation when the checkbox is moved between containers\n const animationClass = this._currentAnimationClass;\n\n this._ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n element.classList.remove(animationClass);\n }, 1000);\n });\n }\n }\n\n private _emitChangeEvent() {\n const event = new MatCheckboxChange();\n event.source = this;\n event.checked = this.checked;\n\n this._controlValueAccessorChangeFn(this.checked);\n this.change.emit(event);\n\n // Assigning the value again here is redundant, but we have to do it in case it was\n // changed inside the `change` listener which will cause the input to be out of sync.\n if (this._inputElement) {\n this._inputElement.nativeElement.checked = this.checked;\n }\n }\n\n /** Toggles the `checked` state of the checkbox. */\n toggle(): void {\n this.checked = !this.checked;\n }\n\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n * Do not toggle on (change) event since IE doesn't fire change event when\n * indeterminate checkbox is clicked.\n * @param event\n */\n _onInputClick(event: Event) {\n const clickAction = this._options?.clickAction;\n\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 `checkbox` 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 // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click\n if (!this.disabled && clickAction !== 'noop') {\n // When user manually click on the checkbox, `indeterminate` is set to false.\n if (this.indeterminate && clickAction !== 'check') {\n\n Promise.resolve().then(() => {\n this._indeterminate = false;\n this.indeterminateChange.emit(this._indeterminate);\n });\n }\n\n this.toggle();\n this._transitionCheckState(\n this._checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this._emitChangeEvent();\n } else if (!this.disabled && clickAction === 'noop') {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `mat-checkbox`.\n this._inputElement.nativeElement.checked = this.checked;\n this._inputElement.nativeElement.indeterminate = this.indeterminate;\n }\n }\n\n /** Focuses the checkbox. */\n focus(origin?: FocusOrigin, options?: FocusOptions): void {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n } else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n\n _onInteractionEvent(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\n private _getAnimationClassForCheckStateTransition(\n oldState: TransitionCheckState, newState: TransitionCheckState): string {\n // Don't transition if animations are disabled.\n if (this._animationMode === 'NoopAnimations') {\n return '';\n }\n\n let animSuffix: string = '';\n\n switch (oldState) {\n case TransitionCheckState.Init:\n // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or\n // [checked] bound to it.\n if (newState === TransitionCheckState.Checked) {\n animSuffix = 'unchecked-checked';\n } else if (newState == TransitionCheckState.Indeterminate) {\n animSuffix = 'unchecked-indeterminate';\n } else {\n return '';\n }\n break;\n case TransitionCheckState.Unchecked:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'unchecked-checked' : 'unchecked-indeterminate';\n break;\n case TransitionCheckState.Checked:\n animSuffix = newState === TransitionCheckState.Unchecked ?\n 'checked-unchecked' : 'checked-indeterminate';\n break;\n case TransitionCheckState.Indeterminate:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'indeterminate-checked' : 'indeterminate-unchecked';\n break;\n }\n\n return `mat-checkbox-anim-${animSuffix}`;\n }\n\n /**\n * Syncs the indeterminate value with the checkbox DOM node.\n *\n * We sync `indeterminate` directly on the DOM node, because in Ivy the check for whether a\n * property is supported on an element boils down to `if (propName in element)`. Domino's\n * HTMLInputElement doesn't have an `indeterminate` property so Ivy will warn during\n * server-side rendering.\n */\n private _syncIndeterminate(value: boolean) {\n const nativeCheckbox = this._inputElement;\n\n if (nativeCheckbox) {\n nativeCheckbox.nativeElement.indeterminate = value;\n }\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_indeterminate: BooleanInput;\n static ngAcceptInputType_tabIndex: NumberInput;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Directive,\n forwardRef,\n Provider,\n} from '@angular/core';\nimport {\n CheckboxRequiredValidator,\n NG_VALIDATORS,\n} from '@angular/forms';\n\nexport const MAT_CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatCheckboxRequiredValidator),\n multi: true\n};\n\n/**\n * Validator for Material checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `mat-checkbox`.\n */\n@Directive({\n selector: `mat-checkbox[required][formControlName],\n mat-checkbox[required][formControl], mat-checkbox[required][ngModel]`,\n providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],\n})\nexport class MatCheckboxRequiredValidator extends CheckboxRequiredValidator {}\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 {ObserversModule} from '@angular/cdk/observers';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatCheckbox} from './checkbox';\nimport {MatCheckboxRequiredValidator} from './checkbox-required-validator';\n\n/** This module is used by both original and MDC-based checkbox implementations. */\n@NgModule({\n exports: [MatCheckboxRequiredValidator],\n declarations: [MatCheckboxRequiredValidator],\n})\nexport class _MatCheckboxRequiredValidatorModule {\n}\n\n@NgModule({\n imports: [\n MatRippleModule, MatCommonModule, ObserversModule,\n _MatCheckboxRequiredValidatorModule\n ],\n exports: [MatCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule],\n declarations: [MatCheckbox],\n})\nexport class MatCheckboxModule {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './checkbox';\nexport * from './checkbox-config';\nexport * from './checkbox-module';\nexport * from './checkbox-required-validator';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;AAkBA;MACa,4BAA4B,GACrC,IAAI,cAAc,CAA4B,8BAA8B,EAAE;IAC5E,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,oCAAoC;CAC9C,EAAE;AAEP;SACgB,oCAAoC;IAClD,OAAO;QACL,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,qBAAqB;KACnC,CAAC;AACJ;;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AAK,EAAE,IAAI;EACX;AAEF;;;;;MAUa,4BAA6B,SAAQ,yBAAyB;;;YAL1E,SAAS,SAAC;gBACT,QAAQ,EAAE;kFACsE;gBAChF,SAAS,EAAE,CAAC,+BAA+B,CAAC;aAC7C;;;ACjCD;;;;;;;AAcA;MAKa,mCAAmC;;;YAJ/C,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,4BAA4B,CAAC;gBACvC,YAAY,EAAE,CAAC,4BAA4B,CAAC;aAC7C;;MAYY,iBAAiB;;;YAR7B,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,eAAe,EAAE,eAAe,EAAE,eAAe;oBACjD,mCAAmC;iBACpC;gBACD,OAAO,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,mCAAmC,CAAC;gBAC5E,YAAY,EAAE,CAAC,WAAW,CAAC;aAC5B;;;AC7BD;;;;;;;;ACAA;;;;;;"}
package/fesm2015/core.js CHANGED
@@ -19,7 +19,7 @@ import { ENTER, SPACE, hasModifierKey } from '@angular/cdk/keycodes';
19
19
  * found in the LICENSE file at https://angular.io/license
20
20
  */
21
21
  /** Current version of Angular Material. */
22
- const VERSION$1 = new Version('12.2.0-rc.0');
22
+ const VERSION$1 = new Version('12.2.3');
23
23
 
24
24
  /**
25
25
  * @license
@@ -53,7 +53,7 @@ AnimationDurations.EXITING = '195ms';
53
53
  // i.e. avoid core to depend on the @angular/material primary entry-point
54
54
  // Can be removed once the Material primary entry-point no longer
55
55
  // re-exports all secondary entry-points
56
- const VERSION = new Version('12.2.0-rc.0');
56
+ const VERSION = new Version('12.2.3');
57
57
  /** @docs-private */
58
58
  function MATERIAL_SANITY_CHECKS_FACTORY() {
59
59
  return true;
@@ -92,13 +92,19 @@ class MatCommonModule {
92
92
  const win = this._document.defaultView || window;
93
93
  return typeof win === 'object' && win ? win : null;
94
94
  }
95
- /** Whether any sanity checks are enabled. */
96
- _checksAreEnabled() {
95
+ /** Gets whether a specific sanity check is enabled. */
96
+ _checkIsEnabled(name) {
97
97
  // TODO(crisbeto): we can't use `ngDevMode` here yet, because ViewEngine apps might not support
98
98
  // it. Since these checks can have performance implications and they aren't tree shakeable
99
99
  // in their current form, we can leave the `isDevMode` check in for now.
100
100
  // tslint:disable-next-line:ban
101
- return isDevMode() && !this._isTestEnv();
101
+ if (!isDevMode() || this._isTestEnv()) {
102
+ return false;
103
+ }
104
+ if (typeof this._sanityChecks === 'boolean') {
105
+ return this._sanityChecks;
106
+ }
107
+ return !!this._sanityChecks[name];
102
108
  }
103
109
  /** Whether the code is running in tests. */
104
110
  _isTestEnv() {
@@ -106,9 +112,7 @@ class MatCommonModule {
106
112
  return window && (window.__karma__ || window.jasmine);
107
113
  }
108
114
  _checkDoctypeIsDefined() {
109
- const isEnabled = this._checksAreEnabled() &&
110
- (this._sanityChecks === true || this._sanityChecks.doctype);
111
- if (isEnabled && !this._document.doctype) {
115
+ if (this._checkIsEnabled('doctype') && !this._document.doctype) {
112
116
  console.warn('Current document does not have a doctype. This may cause ' +
113
117
  'some Angular Material components not to behave as expected.');
114
118
  }
@@ -116,9 +120,8 @@ class MatCommonModule {
116
120
  _checkThemeIsPresent() {
117
121
  // We need to assert that the `body` is defined, because these checks run very early
118
122
  // and the `body` won't be defined if the consumer put their scripts in the `head`.
119
- const isDisabled = !this._checksAreEnabled() ||
120
- (this._sanityChecks === false || !this._sanityChecks.theme);
121
- if (isDisabled || !this._document.body || typeof getComputedStyle !== 'function') {
123
+ if (!this._checkIsEnabled('theme') || !this._document.body ||
124
+ typeof getComputedStyle !== 'function') {
122
125
  return;
123
126
  }
124
127
  const testElement = this._document.createElement('div');
@@ -137,9 +140,7 @@ class MatCommonModule {
137
140
  }
138
141
  /** Checks whether the material version matches the cdk version */
139
142
  _checkCdkVersionMatch() {
140
- const isEnabled = this._checksAreEnabled() &&
141
- (this._sanityChecks === true || this._sanityChecks.version);
142
- if (isEnabled && VERSION.full !== VERSION$2.full) {
143
+ if (this._checkIsEnabled('version') && VERSION.full !== VERSION$2.full) {
143
144
  console.warn('The Angular Material version (' + VERSION.full + ') does not match ' +
144
145
  'the Angular CDK version (' + VERSION$2.full + ').\n' +
145
146
  'Please ensure the versions of these two packages exactly match.');