/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/material-experimental/selection/selection.ts
42 строки
1 KB
Kristiyan Kostadinov
refactor(multiple): remove standalone flag from experimental packages
17 окт 2024, 17:40
17 окт 2024, 17:40
0c0b122
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {coerceBooleanProperty} from '@angular/cdk/coercion'; import {CdkSelection, SelectionChange} from '@angular/cdk-experimental/selection'; import {Directive, Input, Output, EventEmitter} from '@angular/core'; /** * Manages the selection states of the items and provides methods to check and update the selection * states. * It must be applied to the parent element if `matSelectionToggle`, `matSelectAll`, * `matRowSelection` and `matSelectionColumn` are applied. */ @Directive({ selector: '[matSelection]', exportAs: 'matSelection', providers: [{provide: CdkSelection, useExisting: MatSelection}], }) // tslint:disable-next-line: coercion-types export class MatSelection<T> extends CdkSelection<T> { /** Whether to support multiple selection */ @Input('matSelectionMultiple') override get multiple(): boolean { return this._multiple; } override set multiple(multiple: boolean) { this._multiple = coerceBooleanProperty(multiple); } /** Emits when selection changes. */ @Output('matSelectionChange') override readonly change = new EventEmitter<SelectionChange<T>>(); } /** * Represents the change in the selection set. */ export {SelectionChange} from '@angular/cdk-experimental/selection';