///
import { DropDownBase, FilteringEventArgs, SelectEventArgs } from '../drop-down-base/drop-down-base';
import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';
import { ChildProperty, BaseEventArgs } from '@syncfusion/ej2-base';
import { ModuleDeclaration, EmitType } from '@syncfusion/ej2-base';
import { SortOrder } from '@syncfusion/ej2-lists';
import { SelectionSettingsModel, ListBoxModel, ToolbarSettingsModel } from './list-box-model';
import { DataManager, Query } from '@syncfusion/ej2-data';
/**
* Defines the selection mode in ListBox component.
* ```props
* Multiple :- Specifies that the ListBox should allow multiple item selection.
* Single :- Specifies that the ListBox should allow single item selection.
* ```
*/
export declare type SelectionMode = 'Multiple' | 'Single';
/**
* Defines the position of the toolbar in ListBox component.
* ```props
* Left :- Specifies that the toolbar should be positioned to the left of the ListBox.
* Right :- Specifies that the toolbar should be positioned to the right of the ListBox.
* ```
*/
export declare type ToolBarPosition = 'Left' | 'Right';
/**
* Defines the position of the checkbox in ListBox component.
* ```props
* Left :- Specifies that the checkbox should be positioned to the left of the ListBox.
* Right :- Specifies that the checkbox should be positioned to the right of the ListBox.
* ```
*/
export declare type CheckBoxPosition = 'Left' | 'Right';
declare type obj = {
[key: string]: object;
};
/**
* Defines the Selection settings of List Box.
*/
export declare class SelectionSettings extends ChildProperty {
/**
* Specifies the selection modes. The possible values are
* * `Single`: Allows you to select a single item in the ListBox.
* * `Multiple`: Allows you to select more than one item in the ListBox.
*
* @default 'Multiple'
*/
mode: SelectionMode;
/**
* If 'showCheckbox' is set to true, then 'checkbox' will be visualized in the list item.
*
* @default false
*/
showCheckbox: boolean;
/**
* Allows you to either show or hide the selectAll option on the component.
*
* @default false
*/
showSelectAll: boolean;
/**
* Set the position of the checkbox.
*
* @default 'Left'
*/
checkboxPosition: CheckBoxPosition;
}
/**
* Defines the toolbar settings of List Box.
*/
export declare class ToolbarSettings extends ChildProperty {
/**
* Specifies the list of tools for dual ListBox.
* The predefined tools are 'moveUp', 'moveDown', 'moveTo', 'moveFrom', 'moveAllTo', and 'moveAllFrom'.
*
* @default []
*/
items: string[];
/**
* Positions the toolbar before/after the ListBox.
* The possible values are:
* * Left: The toolbar will be positioned to the left of the ListBox.
* * Right: The toolbar will be positioned to the right of the ListBox.
*
* @default 'Right'
*/
position: ToolBarPosition;
}
/**
* The ListBox is a graphical user interface component used to display a list of items.
* Users can select one or more items in the list using a checkbox or by keyboard selection.
* It supports sorting, grouping, reordering and drag and drop of items.
* ```html
*
* ```
* ```typescript
*
* ```
*/
export declare class ListBox extends DropDownBase {
private prevSelIdx;
private listCurrentOptions;
private allowDragAll;
private checkBoxSelectionModule;
private tBListBox;
private initLoad;
private spinner;
private initialSelectedOptions;
private showSelectAll;
private selectAllText;
private unSelectAllText;
private popupWrapper;
private targetInputElement;
private isValidKey;
private isBackSpace;
private isFiltered;
private clearFilterIconElem;
private remoteFilterAction;
private mainList;
private remoteCustomValue;
private filterParent;
protected inputString: string;
protected filterInput: HTMLInputElement;
protected isCustomFiltering: boolean;
private jsonData;
private toolbarAction;
private isDataSourceUpdate;
private dragValue;
private customDraggedItem;
private timer;
private inputFormName;
private selectedListItemCount;
private boundResizeHandler;
/**
* Sets the CSS classes to root element of this component, which helps to customize the
* complete styles.
*
* @default ''
*/
cssClass: string;
/**
* Sets the specified item to the selected state or gets the selected item in the ListBox.
*
* @default []
* @aspType object
* @isGenericType true
*/
value: string[] | number[] | boolean[];
/**
* Sets the height of the ListBox component.
*
* @default ''
*/
height: number | string;
/**
* Specifies a value that indicates whether the component is enabled or not.
*
* @default true
*/
enabled: boolean;
/**
* Enable or disable persisting component's state between page reloads.
* If enabled, following list of states will be persisted.
* 1. value
*
* @default false
*/
enablePersistence: boolean;
/**
* If 'allowDragAndDrop' is set to true, then you can perform drag and drop of the list item.
* ListBox contains same 'scope' property enables drag and drop between multiple ListBox.
*
* @default false
*/
allowDragAndDrop: boolean;
/**
* Sets limitation to the value selection.
* based on the limitation, list selection will be prevented.
*
* @default 1000
*/
maximumSelectionLength: number;
/**
* To enable the filtering option in this component.
* Filter action performs when type in search box and collect the matched item through `filtering` event.
* If searching character does not match, `noRecordsTemplate` property value will be shown.
*
* @default false
*/
allowFiltering: boolean;
/**
* Defines the scope value to group sets of draggable and droppable ListBox.
* A draggable with the same scope value will be accepted by the droppable.
*
* @default ''
*/
scope: string;
/**
* When set to ‘false’, consider the `case-sensitive` on performing the search to find suggestions.
* By default consider the casing.
*
* @default true
* @private
*/
ignoreCase: boolean;
/**
* Accepts the value to be displayed as a watermark text on the filter bar.
*
* @default null
*/
filterBarPlaceholder: string;
/**
* Specifies the `sortOrder` to sort the data source. The available type of sort orders are
* * `None` - The data source is not sorting.
* * `Ascending` - The data source is sorting with ascending order.
* * `Descending` - The data source is sorting with descending order.
*
* @default null
* @asptype object
* @aspjsonconverterignore
*/
sortOrder: SortOrder;
/**
* Triggers while rendering each list item.
*
* @event beforeItemRender
* @blazorProperty 'OnItemRender'
*/
beforeItemRender: EmitType;
/**
* Triggers on typing a character in the component.
*
* @event filtering
* @blazorProperty 'ItemSelected'
*/
filtering: EmitType;
/**
* Triggers when an item in the popup is selected by the user either with mouse/tap or with keyboard navigation.
*
* @event select
* @private
*/
select: EmitType;
/**
* Adds a new item to the popup list. By default, new item appends to the list as the last item,
* but you can insert based on the index parameter.
*
* @param { Object[] } items - Specifies an array of JSON data or a JSON data.
* @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.
* @returns {void}.
* @private
*/
addItem(items: {
[key: string]: Object;
}[] | {
[key: string]: Object;
} | string | boolean | number | string[] | boolean[] | number[], itemIndex?: number): void;
/**
* Triggers while select / unselect the list item.
*
* @event change
* @blazorProperty 'ValueChange'
*/
change: EmitType;
/**
* Triggers before dropping the list item on another list item.
*
* @event beforeDrop
* @blazorProperty 'OnDrop'
*/
beforeDrop: EmitType;
/**
* Triggers after dragging the list item.
*
* @event dragStart
* @blazorProperty 'DragStart'
*/
dragStart: EmitType;
/**
* Triggers while dragging the list item.
*
* @event drag
* @blazorProperty 'Dragging'
*/
drag: EmitType;
/**
* Triggers before dropping the list item on another list item.
*
* @event drop
* @blazorProperty 'Dropped'
*/
drop: EmitType;
/**
* Triggers when data source is populated in the list.
*
* @event dataBound
*/
dataBound: EmitType