You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
9.1 KiB

{"version":3,"file":"checkbox.d.ts","sources":["checkbox.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA","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 { FocusableOption, FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { AfterViewChecked, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy, AfterViewInit } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { CanColor, CanDisable, CanDisableRipple, HasTabIndex, MatRipple } from '@angular/material/core';\nimport { MatCheckboxDefaultOptions } from './checkbox-config';\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 declare const MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR: any;\n/**\n * Represents the different states that require custom transitions between them.\n * @docs-private\n */\nexport declare const enum TransitionCheckState {\n /** The initial state of the component before any user interaction. */\n Init = 0,\n /** The state representing the component when it's becoming checked. */\n Checked = 1,\n /** The state representing the component when it's becoming unchecked. */\n Unchecked = 2,\n /** The state representing the component when it's becoming indeterminate. */\n Indeterminate = 3\n}\n/** Change event object emitted by MatCheckbox. */\nexport declare 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/** @docs-private */\ndeclare const _MatCheckboxBase: import(\"@angular/material/core/common-behaviors/constructor\").Constructor<HasTabIndex> & import(\"@angular/material/core/common-behaviors/constructor\").AbstractConstructor<HasTabIndex> & import(\"@angular/material/core/common-behaviors/constructor\").Constructor<CanColor> & import(\"@angular/material/core/common-behaviors/constructor\").AbstractConstructor<CanColor> & import(\"@angular/material/core/common-behaviors/constructor\").Constructor<CanDisableRipple> & import(\"@angular/material/core/common-behaviors/constructor\").AbstractConstructor<CanDisableRipple> & import(\"@angular/material/core/common-behaviors/constructor\").Constructor<CanDisable> & import(\"@angular/material/core/common-behaviors/constructor\").AbstractConstructor<CanDisable> & {\n new (_elementRef: ElementRef): {\n _elementRef: ElementRef;\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 */\nexport declare class MatCheckbox extends _MatCheckboxBase implements ControlValueAccessor, AfterViewInit, AfterViewChecked, OnDestroy, CanColor, CanDisable, HasTabIndex, CanDisableRipple, FocusableOption {\n private _changeDetectorRef;\n private _focusMonitor;\n private _ngZone;\n _animationMode?: string | undefined;\n private _options?;\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 ariaLabel: string;\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n ariaLabelledby: string | null;\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n ariaDescribedby: string;\n private _uniqueId;\n /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */\n id: string;\n /** Returns the unique id for the visual hidden input. */\n get inputId(): string;\n /** Whether the checkbox is required. */\n get required(): boolean;\n set required(value: boolean);\n private _required;\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n labelPosition: 'before' | 'after';\n /** Name value will be applied to the input element if present */\n name: string | null;\n /** Event emitted when the checkbox's `checked` value changes. */\n readonly change: EventEmitter<MatCheckboxChange>;\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n readonly indeterminateChange: EventEmitter<boolean>;\n /** The value attribute of the native input element */\n value: string;\n /** The native `<input type=\"checkbox\">` element */\n _inputElement: ElementRef<HTMLInputElement>;\n /** Reference to the ripple instance of the checkbox. */\n ripple: MatRipple;\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @docs-private\n */\n _onTouched: () => any;\n private _currentAnimationClass;\n private _currentCheckState;\n private _controlValueAccessorChangeFn;\n constructor(elementRef: ElementRef<HTMLElement>, _changeDetectorRef: ChangeDetectorRef, _focusMonitor: FocusMonitor, _ngZone: NgZone, tabIndex: string, _animationMode?: string | undefined, _options?: MatCheckboxDefaultOptions | undefined);\n ngAfterViewInit(): void;\n ngAfterViewChecked(): void;\n ngOnDestroy(): void;\n /**\n * Whether the checkbox is checked.\n */\n get checked(): boolean;\n set checked(value: boolean);\n private _checked;\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 get disabled(): any;\n set disabled(value: any);\n private _disabled;\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 get indeterminate(): boolean;\n set indeterminate(value: boolean);\n private _indeterminate;\n _isRippleDisabled(): any;\n /** Method being called whenever the label text changes. */\n _onLabelTextChange(): void;\n writeValue(value: any): void;\n registerOnChange(fn: (value: any) => void): void;\n registerOnTouched(fn: any): void;\n setDisabledState(isDisabled: boolean): void;\n _getAriaChecked(): 'true' | 'false' | 'mixed';\n private _transitionCheckState;\n private _emitChangeEvent;\n /** Toggles the `checked` state of the checkbox. */\n toggle(): void;\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): void;\n /** Focuses the checkbox. */\n focus(origin?: FocusOrigin, options?: FocusOptions): void;\n _onInteractionEvent(event: Event): void;\n private _getAnimationClassForCheckStateTransition;\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;\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}\nexport {};\n"]}