forked from syncfusion/ej2-javascript-ui-controls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist-box-model.d.ts
292 lines (253 loc) · 8.12 KB
/
list-box-model.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
import { Input, InputObject } from '@syncfusion/ej2-inputs';import { DropDownBase, dropDownBaseClasses, FilteringEventArgs, SelectEventArgs } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { EventHandler, closest, removeClass, addClass, Complex, Property, ChildProperty, BaseEventArgs, L10n, setValue } from '@syncfusion/ej2-base';import { ModuleDeclaration, NotifyPropertyChanges, getComponent, EmitType, Event, extend, detach, attributes } from '@syncfusion/ej2-base';import { getUniqueID, Browser, formatUnit, isNullOrUndefined, getValue } from '@syncfusion/ej2-base';import { prepend, append } from '@syncfusion/ej2-base';import { cssClass, Sortable, moveTo, SortOrder } from '@syncfusion/ej2-lists';import { Button } from '@syncfusion/ej2-buttons';import { createSpinner, showSpinner, hideSpinner, getZindexPartial } from '@syncfusion/ej2-popups';import { DataManager, Query } from '@syncfusion/ej2-data';
import {SelectionMode,CheckBoxPosition,ToolBarPosition,BeforeItemRenderEventArgs,ListBoxChangeEventArgs,DropEventArgs,DragEventArgs} from "./list-box";
import {DropDownBaseModel} from "../drop-down-base/drop-down-base-model";
/**
* Interface for a class SelectionSettings
*/
export interface SelectionSettingsModel {
/**
* 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;
}
/**
* Interface for a class ToolbarSettings
*/
export interface ToolbarSettingsModel {
/**
* 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;
}
/**
* Interface for a class ListBox
*/
export interface ListBoxModel extends DropDownBaseModel{
/**
* 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
* @deprecated
*/
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
* @deprecated
*/
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<BeforeItemRenderEventArgs>;
/**
* Triggers on typing a character in the component.
*
* @event filtering
* @blazorProperty 'ItemSelected'
*/
filtering?: EmitType<FilteringEventArgs>;
/**
* 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<SelectEventArgs>;
/**
* Triggers while select / unselect the list item.
*
* @event change
* @blazorProperty 'ValueChange'
*/
change?: EmitType<ListBoxChangeEventArgs>;
/**
* Triggers before dropping the list item on another list item.
*
* @event beforeDrop
* @blazorProperty 'OnDrop'
*/
beforeDrop?: EmitType<DropEventArgs>;
/**
* Triggers after dragging the list item.
*
* @event dragStart
* @blazorProperty 'DragStart'
*/
dragStart?: EmitType<DragEventArgs>;
/**
* Triggers while dragging the list item.
*
* @event drag
* @blazorProperty 'Dragging'
*/
drag?: EmitType<DragEventArgs>;
/**
* Triggers before dropping the list item on another list item.
*
* @event drop
* @blazorProperty 'Dropped'
*/
drop?: EmitType<DragEventArgs>;
/**
* Triggers when data source is populated in the list.
*
* @event dataBound
*/
dataBound?: EmitType<Object>;
/**
* Accepts the template design and assigns it to the group headers present in the list.
*
* @default null
* @private
*/
groupTemplate?: string;
/**
* Accepts the template and assigns it to the list content of the ListBox component
* when the data fetch request from the remote server fails.
*
* @default 'Request Failed'
* @private
*/
actionFailureTemplate?: string;
/**
* specifies the z-index value of the component popup element.
*
* @default 1000
* @private
*/
zIndex?: number;
/**
* ignoreAccent set to true, then ignores the diacritic characters or accents when filtering.
*
* @private
*/
ignoreAccent?: boolean;
/**
* Specifies the toolbar items and its position.
*
* @default { items: [], position: 'Right' }
*/
toolbarSettings?: ToolbarSettingsModel;
/**
* Specifies the selection mode and its type.
*
* @default { mode: 'Multiple', type: 'Default' }
*/
selectionSettings?: SelectionSettingsModel;
}