UNPKG

840 BTypeScriptView Raw
1import { NgOption } from './ng-select.types';
2export type SelectionModelFactory = () => SelectionModel;
3export declare function DefaultSelectionModelFactory(): DefaultSelectionModel;
4export interface SelectionModel {
5 value: NgOption[];
6 select(item: NgOption, multiple: boolean, selectableGroupAsModel: boolean): any;
7 unselect(item: NgOption, multiple: boolean): any;
8 clear(keepDisabled: boolean): any;
9}
10export declare class DefaultSelectionModel implements SelectionModel {
11 private _selected;
12 get value(): NgOption[];
13 select(item: NgOption, multiple: boolean, groupAsModel: boolean): void;
14 unselect(item: NgOption, multiple: boolean): void;
15 clear(keepDisabled: boolean): void;
16 private _setChildrenSelectedState;
17 private _removeChildren;
18 private _removeParent;
19 private _activeChildren;
20}