@syncfusion/ej2-lists 31.1.17 → 31.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-lists.min.js +3 -3
- package/dist/ej2-lists.umd.min.js +3 -3
- package/dist/ej2-lists.umd.min.js.map +1 -1
- package/dist/es6/ej2-lists.es2015.js +3 -1
- package/dist/es6/ej2-lists.es2015.js.map +1 -1
- package/dist/es6/ej2-lists.es5.js +3 -1
- package/dist/es6/ej2-lists.es5.js.map +1 -1
- package/dist/global/ej2-lists.min.js +3 -3
- package/dist/global/ej2-lists.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +12 -56
- package/src/common/list-base.js +3 -1
- package/dist/ts/common/index.d.ts +0 -4
- package/dist/ts/common/index.ts +0 -4
- package/dist/ts/common/list-base.d.ts +0 -415
- package/dist/ts/common/list-base.ts +0 -1362
- package/dist/ts/component.d.ts +0 -4
- package/dist/ts/component.ts +0 -4
- package/dist/ts/index.d.ts +0 -6
- package/dist/ts/index.ts +0 -6
- package/dist/ts/list-view/index.d.ts +0 -6
- package/dist/ts/list-view/index.ts +0 -6
- package/dist/ts/list-view/list-view-model.d.ts +0 -324
- package/dist/ts/list-view/list-view.d.ts +0 -845
- package/dist/ts/list-view/list-view.ts +0 -2740
- package/dist/ts/list-view/virtualization.d.ts +0 -97
- package/dist/ts/list-view/virtualization.ts +0 -947
- package/dist/ts/sortable/index.d.ts +0 -5
- package/dist/ts/sortable/index.ts +0 -5
- package/dist/ts/sortable/sortable-model.d.ts +0 -80
- package/dist/ts/sortable/sortable.d.ts +0 -146
- package/dist/ts/sortable/sortable.ts +0 -483
|
@@ -1,845 +0,0 @@
|
|
|
1
|
-
import { Virtualization } from './virtualization';
|
|
2
|
-
import { ModuleDeclaration } from '@syncfusion/ej2-base';
|
|
3
|
-
import { Component, BaseEventArgs } from '@syncfusion/ej2-base';
|
|
4
|
-
import { INotifyPropertyChanged, ChildProperty } from '@syncfusion/ej2-base';
|
|
5
|
-
import { EmitType } from '@syncfusion/ej2-base';
|
|
6
|
-
import { DataManager, Query } from '@syncfusion/ej2-data';
|
|
7
|
-
import { ListBaseOptions, SortOrder, FieldsMapping } from '../common/list-base';
|
|
8
|
-
import { ListViewModel, FieldSettingsModel } from './list-view-model';
|
|
9
|
-
export declare const classNames: ClassNames;
|
|
10
|
-
/**
|
|
11
|
-
* An interface that holds options of fields.
|
|
12
|
-
*/
|
|
13
|
-
export interface Fields {
|
|
14
|
-
/**
|
|
15
|
-
* Specifies the id field mapped in dataSource.
|
|
16
|
-
*/
|
|
17
|
-
id?: string | number;
|
|
18
|
-
/**
|
|
19
|
-
* The `text` property is used to map the text value from the data source for each list item.
|
|
20
|
-
*/
|
|
21
|
-
text?: string | number;
|
|
22
|
-
/**
|
|
23
|
-
* It is used to map the custom field values of list item from the dataSource.
|
|
24
|
-
*/
|
|
25
|
-
[key: string]: Object | string | number | undefined;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Represents the field settings of the ListView.
|
|
29
|
-
*/
|
|
30
|
-
export declare class FieldSettings extends ChildProperty<FieldSettings> {
|
|
31
|
-
/**
|
|
32
|
-
* Specifies the id field mapped in dataSource.
|
|
33
|
-
*/
|
|
34
|
-
id: string;
|
|
35
|
-
/**
|
|
36
|
-
* The `text` property is used to map the text value from the data source for each list item.
|
|
37
|
-
*/
|
|
38
|
-
text: string;
|
|
39
|
-
/**
|
|
40
|
-
* The `isChecked` property is used to check whether the list items are in checked state or not.
|
|
41
|
-
*/
|
|
42
|
-
isChecked: string;
|
|
43
|
-
/**
|
|
44
|
-
* The `isVisible` property is used to check whether the list items are in visible state or not.
|
|
45
|
-
*/
|
|
46
|
-
isVisible: string;
|
|
47
|
-
/**
|
|
48
|
-
* Specifies the enabled state of the ListView component.
|
|
49
|
-
* And, we can disable the component using this property by setting its value as false.
|
|
50
|
-
*/
|
|
51
|
-
enabled: string;
|
|
52
|
-
/**
|
|
53
|
-
* The `iconCss` is used to customize the icon to the list items dynamically.
|
|
54
|
-
* We can add a specific image to the icons using `iconCss` property.
|
|
55
|
-
*/
|
|
56
|
-
iconCss: string;
|
|
57
|
-
/**
|
|
58
|
-
* The `child` property is used for nested navigation of listed items.
|
|
59
|
-
*/
|
|
60
|
-
child: string;
|
|
61
|
-
/**
|
|
62
|
-
* The `tooltip` is used to display the information about the target element while hovering on list items.
|
|
63
|
-
*/
|
|
64
|
-
tooltip: string;
|
|
65
|
-
/**
|
|
66
|
-
* The `groupBy` property is used to wraps the ListView elements into a group.
|
|
67
|
-
*/
|
|
68
|
-
groupBy: string;
|
|
69
|
-
/**
|
|
70
|
-
* The `sortBy` property used to enable the sorting of list items to be ascending or descending order.
|
|
71
|
-
*/
|
|
72
|
-
sortBy: string;
|
|
73
|
-
/**
|
|
74
|
-
* The `htmlAttributes` allows additional attributes such as id, class, etc., and
|
|
75
|
-
* accepts n number of attributes in a key-value pair format.
|
|
76
|
-
*/
|
|
77
|
-
htmlAttributes: string;
|
|
78
|
-
/**
|
|
79
|
-
* Specifies the `tableName` used to fetch data from a specific table in the server.
|
|
80
|
-
*/
|
|
81
|
-
tableName: string;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* An interface that holds animation settings.
|
|
85
|
-
*/
|
|
86
|
-
export interface AnimationSettings {
|
|
87
|
-
/**
|
|
88
|
-
* It is used to specify the effect which is shown in sub list transform.
|
|
89
|
-
*/
|
|
90
|
-
effect?: ListViewEffect;
|
|
91
|
-
/**
|
|
92
|
-
* It is used to specify the time duration of transform object.
|
|
93
|
-
*/
|
|
94
|
-
duration?: number;
|
|
95
|
-
/**
|
|
96
|
-
* It is used to specify the easing effect applied while transform
|
|
97
|
-
*/
|
|
98
|
-
easing?: string;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* An enum type that denotes the effects of the ListView. Available options are as follows None, SlideLeft, SlideDown, Zoom, Fade;
|
|
102
|
-
* ```props
|
|
103
|
-
* None :- No animation is applied when items are added or removed from the ListView.
|
|
104
|
-
* SlideLeft :- Items slide in from the left when added and slide out to the left when removed.
|
|
105
|
-
* SlideDown :- Items slide in from the top when added and slide out to the top when removed.
|
|
106
|
-
* Zoom :- Items zoom in or out when added or removed.
|
|
107
|
-
* Fade :- Items fade in or out when added or removed.
|
|
108
|
-
* ```
|
|
109
|
-
*/
|
|
110
|
-
export declare type ListViewEffect = 'None' | 'SlideLeft' | 'SlideDown' | 'Zoom' | 'Fade';
|
|
111
|
-
/**
|
|
112
|
-
* An enum type that denotes the position of checkbox of the ListView. Available options are as follows Left and Right;
|
|
113
|
-
* ```props
|
|
114
|
-
* Left :- The checkbox is positioned on the left side of the ListView item.
|
|
115
|
-
* Right :- The checkbox is positioned on the right side of the ListView item.
|
|
116
|
-
* ```
|
|
117
|
-
*/
|
|
118
|
-
export declare type checkBoxPosition = 'Left' | 'Right';
|
|
119
|
-
/**
|
|
120
|
-
* Represents the EJ2 ListView control.
|
|
121
|
-
* ```html
|
|
122
|
-
* <div id="listview">
|
|
123
|
-
* <ul>
|
|
124
|
-
* <li>Favorite</li>
|
|
125
|
-
* <li>Documents</li>
|
|
126
|
-
* <li>Downloads</li>
|
|
127
|
-
* </ul>
|
|
128
|
-
* </div>
|
|
129
|
-
* ```
|
|
130
|
-
* ```typescript
|
|
131
|
-
* var listviewObject = new ListView({});
|
|
132
|
-
* listviewObject.appendTo("#listview");
|
|
133
|
-
* ```
|
|
134
|
-
*/
|
|
135
|
-
export declare class ListView extends Component<HTMLElement> implements INotifyPropertyChanged {
|
|
136
|
-
private ulElement;
|
|
137
|
-
private selectedLI;
|
|
138
|
-
private onUIScrolled;
|
|
139
|
-
private curUL;
|
|
140
|
-
private curDSLevel;
|
|
141
|
-
private curViewDS;
|
|
142
|
-
private curDSJSON;
|
|
143
|
-
localData: DataSource[];
|
|
144
|
-
private liCollection;
|
|
145
|
-
private headerEle;
|
|
146
|
-
private contentContainer;
|
|
147
|
-
private touchModule;
|
|
148
|
-
private listBaseOption;
|
|
149
|
-
virtualizationModule: Virtualization;
|
|
150
|
-
private animateOptions;
|
|
151
|
-
private rippleFn;
|
|
152
|
-
private isNestedList;
|
|
153
|
-
private currentLiElements;
|
|
154
|
-
private selectedData;
|
|
155
|
-
private selectedId;
|
|
156
|
-
private isWindow;
|
|
157
|
-
private selectedItems;
|
|
158
|
-
private aniObj;
|
|
159
|
-
private LISTVIEW_TEMPLATE_ID;
|
|
160
|
-
private LISTVIEW_GROUPTEMPLATE_ID;
|
|
161
|
-
private LISTVIEW_HEADERTEMPLATE_ID;
|
|
162
|
-
private liElement;
|
|
163
|
-
private virtualCheckBox;
|
|
164
|
-
private liElementHeight;
|
|
165
|
-
private previousSelectedItems;
|
|
166
|
-
private hiddenItems;
|
|
167
|
-
private enabledItems;
|
|
168
|
-
private disabledItems;
|
|
169
|
-
private isOffline;
|
|
170
|
-
private previousScrollTop;
|
|
171
|
-
/**
|
|
172
|
-
* The `cssClass` property is used to add a user-preferred class name in the root element of the ListView,
|
|
173
|
-
* using which we can customize the component (both CSS and functionality customization)
|
|
174
|
-
*
|
|
175
|
-
* {% codeBlock src='listview/cssClass/index.md' %}{% endcodeBlock %}
|
|
176
|
-
*
|
|
177
|
-
* @default ''
|
|
178
|
-
*/
|
|
179
|
-
cssClass: string;
|
|
180
|
-
/**
|
|
181
|
-
* If `enableVirtualization` set to true, which will increase the ListView performance, while loading a large amount of data.
|
|
182
|
-
*
|
|
183
|
-
* {% codeBlock src='listview/enableVirtualization/index.md' %}{% endcodeBlock %}
|
|
184
|
-
*
|
|
185
|
-
* @default false
|
|
186
|
-
*/
|
|
187
|
-
enableVirtualization: boolean;
|
|
188
|
-
/**
|
|
189
|
-
* The `htmlAttributes` allows additional attributes such as id, class, etc., and
|
|
190
|
-
* accepts n number of attributes in a key-value pair format.
|
|
191
|
-
*
|
|
192
|
-
* {% codeBlock src='listview/htmlAttributes/index.md' %}{% endcodeBlock %}
|
|
193
|
-
*
|
|
194
|
-
* @default {}
|
|
195
|
-
*/
|
|
196
|
-
htmlAttributes: {
|
|
197
|
-
[key: string]: string;
|
|
198
|
-
};
|
|
199
|
-
/**
|
|
200
|
-
* If `enable` set to true, the list items are enabled.
|
|
201
|
-
* And, we can disable the component using this property by setting its value as false.
|
|
202
|
-
*
|
|
203
|
-
* {% codeBlock src='listview/enable/index.md' %}{% endcodeBlock %}
|
|
204
|
-
*
|
|
205
|
-
* @default true
|
|
206
|
-
*/
|
|
207
|
-
enable: boolean;
|
|
208
|
-
/**
|
|
209
|
-
* The `dataSource` provides the data to render the ListView component which is mapped with the fields of ListView.
|
|
210
|
-
*
|
|
211
|
-
* @isGenericType true
|
|
212
|
-
*
|
|
213
|
-
* {% codeBlock src='listview/dataSource/index.md' %}{% endcodeBlock %}
|
|
214
|
-
*
|
|
215
|
-
* @default []
|
|
216
|
-
*/
|
|
217
|
-
dataSource: {
|
|
218
|
-
[key: string]: Object;
|
|
219
|
-
}[] | string[] | number[] | DataManager;
|
|
220
|
-
/**
|
|
221
|
-
* The `query` is used to fetch the specific data from dataSource by using where and select keywords.
|
|
222
|
-
*
|
|
223
|
-
* {% codeBlock src='listview/query/index.md' %}{% endcodeBlock %}
|
|
224
|
-
*
|
|
225
|
-
* @default null
|
|
226
|
-
*/
|
|
227
|
-
query: Query;
|
|
228
|
-
/**
|
|
229
|
-
* The `fields` is used to map keys from the dataSource which extracts the appropriate data from the dataSource
|
|
230
|
-
* with specified mapped with the column fields to render the ListView.
|
|
231
|
-
*
|
|
232
|
-
* {% codeBlock src='listview/fields/index.md' %}{% endcodeBlock %}
|
|
233
|
-
*
|
|
234
|
-
* @default defaultMappedFields
|
|
235
|
-
*/
|
|
236
|
-
fields: FieldSettingsModel;
|
|
237
|
-
/**
|
|
238
|
-
* The `animation` property provides an option to apply the different
|
|
239
|
-
* animations on the ListView component.
|
|
240
|
-
*
|
|
241
|
-
* {% codeBlock src='listview/animation/index.md' %}{% endcodeBlock %}
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
* @default { effect: 'SlideLeft', duration: 400, easing: 'ease' }
|
|
245
|
-
*/
|
|
246
|
-
animation: AnimationSettings;
|
|
247
|
-
/**
|
|
248
|
-
* The `sortOrder` is used to sort the data source. The available type of sort orders are,
|
|
249
|
-
* * `None` - The data source is not sorting.
|
|
250
|
-
* * `Ascending` - The data source is sorting with ascending order.
|
|
251
|
-
* * `Descending` - The data source is sorting with descending order.
|
|
252
|
-
*
|
|
253
|
-
* {% codeBlock src='listview/sortOrder/index.md' %}{% endcodeBlock %}
|
|
254
|
-
*
|
|
255
|
-
* @default 'None'
|
|
256
|
-
*/
|
|
257
|
-
sortOrder: SortOrder;
|
|
258
|
-
/**
|
|
259
|
-
* If `showIcon` set to true, which will show or hide the icon of the list item.
|
|
260
|
-
*
|
|
261
|
-
* {% codeBlock src='listview/showIcon/index.md' %}{% endcodeBlock %}
|
|
262
|
-
*
|
|
263
|
-
* @default false
|
|
264
|
-
*/
|
|
265
|
-
showIcon: boolean;
|
|
266
|
-
/**
|
|
267
|
-
* If `showCheckBox` set to true, which will show or hide the checkbox.
|
|
268
|
-
*
|
|
269
|
-
* {% codeBlock src='listview/showCheckBox/index.md' %}{% endcodeBlock %}
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
* @default false
|
|
273
|
-
*/
|
|
274
|
-
showCheckBox: boolean;
|
|
275
|
-
/**
|
|
276
|
-
* The `checkBoxPosition` is used to set the position of check box in a list item.
|
|
277
|
-
* By default, the `checkBoxPosition` is Left, which will appear before the text content in a list item.
|
|
278
|
-
*
|
|
279
|
-
* {% codeBlock src='listview/checkBoxPosition/index.md' %}{% endcodeBlock %}
|
|
280
|
-
*
|
|
281
|
-
* @default 'Left'
|
|
282
|
-
*/
|
|
283
|
-
checkBoxPosition: checkBoxPosition;
|
|
284
|
-
/**
|
|
285
|
-
* The `headerTitle` is used to set the title of the ListView component.
|
|
286
|
-
*
|
|
287
|
-
* {% codeBlock src='listview/headerTitle/index.md' %}{% endcodeBlock %}
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
* @default ""
|
|
291
|
-
*/
|
|
292
|
-
headerTitle: string;
|
|
293
|
-
/**
|
|
294
|
-
* If `showHeader` set to true, which will show or hide the header of the ListView component.
|
|
295
|
-
*
|
|
296
|
-
* {% codeBlock src='listview/showHeader/index.md' %}{% endcodeBlock %}
|
|
297
|
-
*
|
|
298
|
-
* @default false
|
|
299
|
-
*/
|
|
300
|
-
showHeader: boolean;
|
|
301
|
-
/**
|
|
302
|
-
* Specifies whether to display or remove the untrusted HTML values in the ListView component.
|
|
303
|
-
* If 'enableHtmlSanitizer' set to true, the component will sanitize any suspected untrusted strings and scripts before rendering them.
|
|
304
|
-
*
|
|
305
|
-
* {% codeBlock src='listview/enableHtmlSanitizer/index.md' %}{% endcodeBlock %}
|
|
306
|
-
*
|
|
307
|
-
* @default true
|
|
308
|
-
*/
|
|
309
|
-
enableHtmlSanitizer: boolean;
|
|
310
|
-
/**
|
|
311
|
-
* Defines the height of the ListView component which accepts both string and number values.
|
|
312
|
-
*
|
|
313
|
-
* {% codeBlock src='listview/height/index.md' %}{% endcodeBlock %}
|
|
314
|
-
*
|
|
315
|
-
* @default ''
|
|
316
|
-
*/
|
|
317
|
-
height: number | string;
|
|
318
|
-
/**
|
|
319
|
-
* Defines the width of the ListView component which accepts both string and number values.
|
|
320
|
-
*
|
|
321
|
-
* {% codeBlock src='listview/width/index.md' %}{% endcodeBlock %}
|
|
322
|
-
*
|
|
323
|
-
* @default ''
|
|
324
|
-
*/
|
|
325
|
-
width: number | string;
|
|
326
|
-
/**
|
|
327
|
-
* The ListView component supports to customize the content of each list items with the help of `template` property.
|
|
328
|
-
*
|
|
329
|
-
* {% codeBlock src='listview/template/index.md' %}{% endcodeBlock %}
|
|
330
|
-
*
|
|
331
|
-
* @default null
|
|
332
|
-
* @angularType string | object
|
|
333
|
-
* @reactType string | function | JSX.Element
|
|
334
|
-
* @vueType string | function
|
|
335
|
-
* @aspType string
|
|
336
|
-
*/
|
|
337
|
-
template: string | Function;
|
|
338
|
-
/**
|
|
339
|
-
* The ListView has an option to custom design the ListView header title with the help of `headerTemplate` property.
|
|
340
|
-
*
|
|
341
|
-
* {% codeBlock src="listview/headerTemplate/index.md" %}{% endcodeBlock %}
|
|
342
|
-
*
|
|
343
|
-
* @default null
|
|
344
|
-
* @angularType string | object
|
|
345
|
-
* @reactType string | function | JSX.Element
|
|
346
|
-
* @vueType string | function
|
|
347
|
-
* @aspType string
|
|
348
|
-
*/
|
|
349
|
-
headerTemplate: string | Function;
|
|
350
|
-
/**
|
|
351
|
-
* The ListView has an option to custom design the group header title with the help of `groupTemplate` property.
|
|
352
|
-
*
|
|
353
|
-
* {% codeBlock src="listview/groupTemplate/index.md" %}{% endcodeBlock %}
|
|
354
|
-
*
|
|
355
|
-
* @default null
|
|
356
|
-
* @angularType string | object
|
|
357
|
-
* @reactType string | function | JSX.Element
|
|
358
|
-
* @vueType string | function
|
|
359
|
-
* @aspType string
|
|
360
|
-
*/
|
|
361
|
-
groupTemplate: string | Function;
|
|
362
|
-
/**
|
|
363
|
-
* Triggers when we select the list item in the component.
|
|
364
|
-
*
|
|
365
|
-
* @event 'object'
|
|
366
|
-
*/
|
|
367
|
-
select: EmitType<SelectEventArgs>;
|
|
368
|
-
/**
|
|
369
|
-
* Triggers when every ListView action starts.
|
|
370
|
-
*
|
|
371
|
-
* @event 'object'
|
|
372
|
-
*/
|
|
373
|
-
actionBegin: EmitType<object>;
|
|
374
|
-
/**
|
|
375
|
-
* Triggers when every ListView actions completed.
|
|
376
|
-
*
|
|
377
|
-
* @event 'object'
|
|
378
|
-
*/
|
|
379
|
-
actionComplete: EmitType<MouseEvent>;
|
|
380
|
-
/**
|
|
381
|
-
* Triggers, when the data fetch request from the remote server, fails.
|
|
382
|
-
*
|
|
383
|
-
* @event 'object'
|
|
384
|
-
*
|
|
385
|
-
*/
|
|
386
|
-
actionFailure: EmitType<MouseEvent>;
|
|
387
|
-
/**
|
|
388
|
-
* Triggers when scrollbar of the ListView component reaches to the top or bottom.
|
|
389
|
-
*
|
|
390
|
-
* @event 'object'
|
|
391
|
-
*/
|
|
392
|
-
scroll: EmitType<ScrolledEventArgs>;
|
|
393
|
-
/**
|
|
394
|
-
* Constructor for creating the widget
|
|
395
|
-
*
|
|
396
|
-
* @param options
|
|
397
|
-
*
|
|
398
|
-
* @param element
|
|
399
|
-
*/
|
|
400
|
-
constructor(options?: ListViewModel, element?: string | HTMLElement);
|
|
401
|
-
/**
|
|
402
|
-
* @param newProp
|
|
403
|
-
*
|
|
404
|
-
* @param oldProp
|
|
405
|
-
*
|
|
406
|
-
* @private
|
|
407
|
-
*/
|
|
408
|
-
onPropertyChanged(newProp: ListViewModel, oldProp: ListViewModel): void;
|
|
409
|
-
private setHTMLAttribute;
|
|
410
|
-
private setCSSClass;
|
|
411
|
-
private setSize;
|
|
412
|
-
private setEnable;
|
|
413
|
-
private setEnableRTL;
|
|
414
|
-
private enableElement;
|
|
415
|
-
private header;
|
|
416
|
-
private switchView;
|
|
417
|
-
protected preRender(): void;
|
|
418
|
-
private initialization;
|
|
419
|
-
private renderCheckbox;
|
|
420
|
-
private checkInternally;
|
|
421
|
-
/**
|
|
422
|
-
* Checks the specific list item by passing the unchecked fields as an argument to this method.
|
|
423
|
-
*
|
|
424
|
-
* @param {Fields | HTMLElement | Element} item - It accepts Fields or HTML list element as an argument.
|
|
425
|
-
*/
|
|
426
|
-
checkItem(item: Fields | HTMLElement | Element): void;
|
|
427
|
-
private toggleCheckBase;
|
|
428
|
-
/**
|
|
429
|
-
* Uncheck the specific list item by passing the checked fields as an argument to this method.
|
|
430
|
-
*
|
|
431
|
-
* @param {Fields | HTMLElement | Element} item - It accepts Fields or HTML list element as an argument.
|
|
432
|
-
*/
|
|
433
|
-
uncheckItem(item: Fields | HTMLElement | Element): void;
|
|
434
|
-
/**
|
|
435
|
-
* Checks all the unchecked items in the ListView.
|
|
436
|
-
*/
|
|
437
|
-
checkAllItems(): void;
|
|
438
|
-
/**
|
|
439
|
-
* Uncheck all the checked items in ListView.
|
|
440
|
-
*/
|
|
441
|
-
uncheckAllItems(): void;
|
|
442
|
-
private toggleAllCheckBase;
|
|
443
|
-
private setCheckbox;
|
|
444
|
-
/**
|
|
445
|
-
* Refresh the height of the list item only on enabling the virtualization property.
|
|
446
|
-
*/
|
|
447
|
-
refreshItemHeight(): void;
|
|
448
|
-
private handleCheckboxState;
|
|
449
|
-
targetElement: Element;
|
|
450
|
-
private clickHandler;
|
|
451
|
-
private removeElement;
|
|
452
|
-
private hoverHandler;
|
|
453
|
-
private leaveHandler;
|
|
454
|
-
private homeKeyHandler;
|
|
455
|
-
private onArrowKeyDown;
|
|
456
|
-
private arrowKeyHandler;
|
|
457
|
-
private enterKeyHandler;
|
|
458
|
-
private spaceKeyHandler;
|
|
459
|
-
private keyActionHandler;
|
|
460
|
-
private swipeActionHandler;
|
|
461
|
-
private focusout;
|
|
462
|
-
private wireEvents;
|
|
463
|
-
private unWireEvents;
|
|
464
|
-
private removeFocus;
|
|
465
|
-
private removeHover;
|
|
466
|
-
private removeSelect;
|
|
467
|
-
private isValidLI;
|
|
468
|
-
private setCheckboxLI;
|
|
469
|
-
private selectEventData;
|
|
470
|
-
private setSelectedItemData;
|
|
471
|
-
private setSelectLI;
|
|
472
|
-
private setHoverLI;
|
|
473
|
-
private getSubDS;
|
|
474
|
-
private getItemData;
|
|
475
|
-
private findItemFromDS;
|
|
476
|
-
private getQuery;
|
|
477
|
-
private setViewDataSource;
|
|
478
|
-
private isInAnimation;
|
|
479
|
-
private renderRemoteLists;
|
|
480
|
-
private triggerActionFailure;
|
|
481
|
-
private setLocalData;
|
|
482
|
-
private reRender;
|
|
483
|
-
private resetCurrentList;
|
|
484
|
-
private setAttributes;
|
|
485
|
-
private createList;
|
|
486
|
-
private renderSubList;
|
|
487
|
-
private renderIntoDom;
|
|
488
|
-
private renderList;
|
|
489
|
-
private getElementUID;
|
|
490
|
-
/**
|
|
491
|
-
* Initializes the ListView component rendering.
|
|
492
|
-
*/
|
|
493
|
-
render(): void;
|
|
494
|
-
/**
|
|
495
|
-
* It is used to destroy the ListView component.
|
|
496
|
-
*/
|
|
497
|
-
destroy(): void;
|
|
498
|
-
/**
|
|
499
|
-
* Switches back from the navigated sub list item.
|
|
500
|
-
*/
|
|
501
|
-
back(): void;
|
|
502
|
-
/**
|
|
503
|
-
* Selects the list item from the ListView by passing the elements or field object.
|
|
504
|
-
*
|
|
505
|
-
* @param {Fields | HTMLElement | Element} item - We can pass element Object or Fields as Object with ID and Text fields.
|
|
506
|
-
*/
|
|
507
|
-
selectItem(item: Fields | HTMLElement | Element): void;
|
|
508
|
-
/**
|
|
509
|
-
* This method allows for deselecting a list item within the ListView. The item to be deselected can be specified by passing the element or field object.
|
|
510
|
-
*
|
|
511
|
-
* @param {Fields | HTMLElement | Element} item - We can pass an element Object or Fields as an Object with ID and Text fields.
|
|
512
|
-
*/
|
|
513
|
-
unselectItem(item?: Fields | HTMLElement | Element): void;
|
|
514
|
-
private getLiFromObjOrElement;
|
|
515
|
-
/**
|
|
516
|
-
* Selects multiple list items from the ListView.
|
|
517
|
-
*
|
|
518
|
-
* @param {Fields[] | HTMLElement[] | Element[]} item - We can pass array of
|
|
519
|
-
* elements or array of fields Object with ID and Text fields.
|
|
520
|
-
*/
|
|
521
|
-
selectMultipleItems(item: Fields[] | HTMLElement[] | Element[]): void;
|
|
522
|
-
private getParentId;
|
|
523
|
-
private updateSelectedId;
|
|
524
|
-
/**
|
|
525
|
-
* Gets the details of the currently selected item from the list items.
|
|
526
|
-
*
|
|
527
|
-
*/
|
|
528
|
-
getSelectedItems(): SelectedItem | SelectedCollection | UISelectedItem | NestedListData;
|
|
529
|
-
/**
|
|
530
|
-
* Finds out an item details from the current list.
|
|
531
|
-
*
|
|
532
|
-
* @param {Fields | HTMLElement | Element} item - We can pass element Object or Fields as Object with ID and Text fields.
|
|
533
|
-
*/
|
|
534
|
-
findItem(item: Fields | HTMLElement | Element): SelectedItem;
|
|
535
|
-
/**
|
|
536
|
-
* Enables the disabled list items by passing the Id and text fields.
|
|
537
|
-
*
|
|
538
|
-
* @param {Fields | HTMLElement | Element} item - We can pass element Object or Fields as Object with ID and Text fields.
|
|
539
|
-
*/
|
|
540
|
-
enableItem(item: Fields | HTMLElement | Element): void;
|
|
541
|
-
/**
|
|
542
|
-
* Disables the list items by passing the Id and text fields.
|
|
543
|
-
*
|
|
544
|
-
* @param {Fields | HTMLElement | Element} item - We can pass element Object or Fields as Object with ID and Text fields.
|
|
545
|
-
*/
|
|
546
|
-
disableItem(item: Fields | HTMLElement | Element): void;
|
|
547
|
-
private setItemState;
|
|
548
|
-
/**
|
|
549
|
-
* Shows the hide list item from the ListView.
|
|
550
|
-
*
|
|
551
|
-
* @param {Fields | HTMLElement | Element} item - We can pass element Object or Fields as Object with ID and Text fields.
|
|
552
|
-
*/
|
|
553
|
-
showItem(item: Fields | HTMLElement | Element): void;
|
|
554
|
-
/**
|
|
555
|
-
* Hides an list item from the ListView.
|
|
556
|
-
*
|
|
557
|
-
* @param {Fields | HTMLElement | Element} item - We can pass element Object or Fields as Object with ID and Text fields.
|
|
558
|
-
*/
|
|
559
|
-
hideItem(item: Fields | HTMLElement | Element): void;
|
|
560
|
-
private showHideItem;
|
|
561
|
-
/**
|
|
562
|
-
* Adds the new list item(s) to the current ListView.
|
|
563
|
-
* To add a new list item(s) in the ListView, we need to pass the `data` as an array of items that need
|
|
564
|
-
* to be added and `fields` as the target item to which we need to add the given item(s) as its children.
|
|
565
|
-
* For example fields: { text: 'Name', tooltip: 'Name', id:'id'}
|
|
566
|
-
*
|
|
567
|
-
* @param {{Object}[]} data - JSON Array Data that need to add.
|
|
568
|
-
*
|
|
569
|
-
* @param {Fields} fields - Target item to add the given data as its children (can be null).
|
|
570
|
-
*
|
|
571
|
-
* @param {number} index - Indicates the index where the data to be added.
|
|
572
|
-
*/
|
|
573
|
-
addItem(data: {
|
|
574
|
-
[key: string]: Object;
|
|
575
|
-
}[], fields?: Fields, index?: number): void;
|
|
576
|
-
private addItemInternally;
|
|
577
|
-
private addItemAtIndex;
|
|
578
|
-
private addItemInNestedList;
|
|
579
|
-
private addItemIntoDom;
|
|
580
|
-
private addListItem;
|
|
581
|
-
/**
|
|
582
|
-
* Removes the list item from the data source based on a passed
|
|
583
|
-
* element like fields: { text: 'Name', tooltip: 'Name', id:'id'}
|
|
584
|
-
*
|
|
585
|
-
* @param {Fields | HTMLElement | Element} item - We can pass element Object or Fields as Object with ID and Text fields.
|
|
586
|
-
*/
|
|
587
|
-
removeItem(item: Fields | HTMLElement | Element): void;
|
|
588
|
-
private removeItemFromList;
|
|
589
|
-
private validateNestedView;
|
|
590
|
-
/**
|
|
591
|
-
* Removes multiple items from the ListView by passing the array of elements or array of field objects.
|
|
592
|
-
*
|
|
593
|
-
* @param {Fields[] | HTMLElement[] | Element[]} item - We can pass array of elements or array of field Object with ID and Text fields.
|
|
594
|
-
*/
|
|
595
|
-
removeMultipleItems(item: HTMLElement[] | Element[] | Fields[]): void;
|
|
596
|
-
private findParent;
|
|
597
|
-
protected getModuleName(): string;
|
|
598
|
-
requiredModules(): ModuleDeclaration[];
|
|
599
|
-
private onListScroll;
|
|
600
|
-
/**
|
|
601
|
-
* Get the properties to be maintained in the persisted state.
|
|
602
|
-
*/
|
|
603
|
-
protected getPersistData(): string;
|
|
604
|
-
}
|
|
605
|
-
/** @hidden */
|
|
606
|
-
export interface ClassNames {
|
|
607
|
-
root: string;
|
|
608
|
-
hover: string;
|
|
609
|
-
focused: string;
|
|
610
|
-
selected: string;
|
|
611
|
-
parentItem: string;
|
|
612
|
-
listItem: string;
|
|
613
|
-
hasChild: string;
|
|
614
|
-
view: string;
|
|
615
|
-
header: string;
|
|
616
|
-
text: string;
|
|
617
|
-
headerText: string;
|
|
618
|
-
headerTemplateText: string;
|
|
619
|
-
listItemText: string;
|
|
620
|
-
listIcon: string;
|
|
621
|
-
textContent: string;
|
|
622
|
-
groupListItem: string;
|
|
623
|
-
disable: string;
|
|
624
|
-
container: string;
|
|
625
|
-
backIcon: string;
|
|
626
|
-
backButton: string;
|
|
627
|
-
icon: string;
|
|
628
|
-
checkboxWrapper: string;
|
|
629
|
-
checkbox: string;
|
|
630
|
-
checked: string;
|
|
631
|
-
checkboxIcon: string;
|
|
632
|
-
checklist: string;
|
|
633
|
-
checkboxRight: string;
|
|
634
|
-
checkboxLeft: string;
|
|
635
|
-
listviewCheckbox: string;
|
|
636
|
-
itemCheckList: string;
|
|
637
|
-
virtualElementContainer: string;
|
|
638
|
-
listTemplate: string;
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* An interface that holds list selected item.
|
|
642
|
-
*/
|
|
643
|
-
export interface ListSelectedItem {
|
|
644
|
-
/**
|
|
645
|
-
* Specifies the selected item dataSource collection.
|
|
646
|
-
*
|
|
647
|
-
* @isGenericType true
|
|
648
|
-
*/
|
|
649
|
-
data?: object[];
|
|
650
|
-
/**
|
|
651
|
-
* Specifies the selected item text collection.
|
|
652
|
-
*/
|
|
653
|
-
text?: string[];
|
|
654
|
-
/**
|
|
655
|
-
* Specifies index of the selected element.
|
|
656
|
-
* Available only in virtualization.
|
|
657
|
-
*/
|
|
658
|
-
index?: number[];
|
|
659
|
-
/**
|
|
660
|
-
* Specifies the hierarchical parent id collection of the current view.
|
|
661
|
-
* Available only in nested list with checkbox enabled.
|
|
662
|
-
*/
|
|
663
|
-
parentId?: string[];
|
|
664
|
-
}
|
|
665
|
-
/**
|
|
666
|
-
* An enum type that denotes the ListView scroll direction when it reaches the end.
|
|
667
|
-
* ```props
|
|
668
|
-
* Top:- The scrollbar is moved upwards.
|
|
669
|
-
* Bottom:- The scrollbar is moved downwards.
|
|
670
|
-
* ```
|
|
671
|
-
*/
|
|
672
|
-
export declare type direction = 'Top' | 'Bottom';
|
|
673
|
-
/**
|
|
674
|
-
* An interface that holds selected item.
|
|
675
|
-
*/
|
|
676
|
-
export interface SelectedItem {
|
|
677
|
-
/**
|
|
678
|
-
* It denotes the selected item text.
|
|
679
|
-
*/
|
|
680
|
-
text: string;
|
|
681
|
-
/**
|
|
682
|
-
* It denotes the selected item list element.
|
|
683
|
-
*
|
|
684
|
-
*/
|
|
685
|
-
item: HTMLElement | Element;
|
|
686
|
-
/**
|
|
687
|
-
* It denotes the selected item dataSource JSON object.
|
|
688
|
-
*
|
|
689
|
-
* @isGenericType true
|
|
690
|
-
*/
|
|
691
|
-
data: {
|
|
692
|
-
[key: string]: Object;
|
|
693
|
-
} | string[] | number[];
|
|
694
|
-
}
|
|
695
|
-
/**
|
|
696
|
-
* An interface that holds selected collection.
|
|
697
|
-
*/
|
|
698
|
-
export interface SelectedCollection {
|
|
699
|
-
/**
|
|
700
|
-
* It denotes the selected item text data or collection.
|
|
701
|
-
*/
|
|
702
|
-
text: string | string[];
|
|
703
|
-
/**
|
|
704
|
-
* It denotes the selected item list element or element collection.
|
|
705
|
-
*/
|
|
706
|
-
item: HTMLElement | Element[] | NodeList;
|
|
707
|
-
/**
|
|
708
|
-
* It denotes the selected item dataSource JSON object or object collection.
|
|
709
|
-
*
|
|
710
|
-
* @isGenericType true
|
|
711
|
-
*/
|
|
712
|
-
data: {
|
|
713
|
-
[key: string]: object;
|
|
714
|
-
} | {
|
|
715
|
-
[key: string]: object;
|
|
716
|
-
}[] | string[] | number[];
|
|
717
|
-
}
|
|
718
|
-
/**
|
|
719
|
-
* An interface that holds UI selected item.
|
|
720
|
-
*/
|
|
721
|
-
export interface UISelectedItem {
|
|
722
|
-
/**
|
|
723
|
-
* It denotes the selected item text data or collection.
|
|
724
|
-
*/
|
|
725
|
-
text: string | number | string[] | number[];
|
|
726
|
-
/**
|
|
727
|
-
* It denotes the selected item list element or element collection.
|
|
728
|
-
*/
|
|
729
|
-
item?: HTMLElement | Element[] | NodeList;
|
|
730
|
-
/**
|
|
731
|
-
* It denotes the selected item dataSource JSON object or object collection.
|
|
732
|
-
*
|
|
733
|
-
* @isGenericType true
|
|
734
|
-
*/
|
|
735
|
-
data: {
|
|
736
|
-
[key: string]: object;
|
|
737
|
-
} | {
|
|
738
|
-
[key: string]: object;
|
|
739
|
-
}[] | string | number | string[] | number[];
|
|
740
|
-
/**
|
|
741
|
-
* It is used to denote the index of the selected element.
|
|
742
|
-
*/
|
|
743
|
-
index?: number | number[];
|
|
744
|
-
/**
|
|
745
|
-
* It is used to check whether the element is checked or not.
|
|
746
|
-
*/
|
|
747
|
-
isChecked?: boolean;
|
|
748
|
-
}
|
|
749
|
-
/**
|
|
750
|
-
* An interface that holds details of data and parent.
|
|
751
|
-
*/
|
|
752
|
-
export interface DataAndParent {
|
|
753
|
-
/**
|
|
754
|
-
* It denotes the selected item dataSource JSON object or object collection.
|
|
755
|
-
*
|
|
756
|
-
* @isGenericType true
|
|
757
|
-
*/
|
|
758
|
-
data: {
|
|
759
|
-
[key: string]: object;
|
|
760
|
-
} | {
|
|
761
|
-
[key: string]: object;
|
|
762
|
-
}[] | string[];
|
|
763
|
-
/**
|
|
764
|
-
* It denotes the selected item's parent id;
|
|
765
|
-
*/
|
|
766
|
-
parentId: string[];
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* An interface that holds nested list data.
|
|
770
|
-
*/
|
|
771
|
-
export interface NestedListData {
|
|
772
|
-
/**
|
|
773
|
-
* It denotes the selected item text data or collection.
|
|
774
|
-
*/
|
|
775
|
-
text: string | string[];
|
|
776
|
-
/**
|
|
777
|
-
* It denotes the selected item list element or element collection.
|
|
778
|
-
*/
|
|
779
|
-
item: HTMLElement | Element[] | NodeList;
|
|
780
|
-
/**
|
|
781
|
-
* It denotes the selected item dataSource JSON object with it's parent id.
|
|
782
|
-
*/
|
|
783
|
-
data: DataAndParent[];
|
|
784
|
-
}
|
|
785
|
-
/**
|
|
786
|
-
* An interface that holds selected event arguments
|
|
787
|
-
*/
|
|
788
|
-
export interface SelectEventArgs extends BaseEventArgs, SelectedItem {
|
|
789
|
-
/**
|
|
790
|
-
* Specifies that event has triggered by user interaction.
|
|
791
|
-
*/
|
|
792
|
-
isInteracted: boolean;
|
|
793
|
-
/**
|
|
794
|
-
* Specifies that event argument when event raised by other event.
|
|
795
|
-
*/
|
|
796
|
-
event: MouseEvent | KeyboardEvent;
|
|
797
|
-
/**
|
|
798
|
-
* It is used to denote the index of the selected element.
|
|
799
|
-
*/
|
|
800
|
-
index: number;
|
|
801
|
-
/**
|
|
802
|
-
* It is used to check whether the element is checked or not.
|
|
803
|
-
*/
|
|
804
|
-
isChecked?: boolean;
|
|
805
|
-
/**
|
|
806
|
-
* Cancels the item selection if the value is true
|
|
807
|
-
*/
|
|
808
|
-
cancel: boolean;
|
|
809
|
-
}
|
|
810
|
-
/**
|
|
811
|
-
* An interface that holds scrolled event arguments
|
|
812
|
-
*/
|
|
813
|
-
export interface ScrolledEventArgs {
|
|
814
|
-
/**
|
|
815
|
-
* Specifies the direction “Top” or “Bottom” in which the scrolling occurs.
|
|
816
|
-
*/
|
|
817
|
-
scrollDirection: direction;
|
|
818
|
-
/**
|
|
819
|
-
* Specifies the default scroll event arguments.
|
|
820
|
-
*/
|
|
821
|
-
originalEvent: Event;
|
|
822
|
-
/**
|
|
823
|
-
* Specifies the distance from the scrollbar to the top and bottom ends.
|
|
824
|
-
*/
|
|
825
|
-
distanceY: number;
|
|
826
|
-
}
|
|
827
|
-
/**
|
|
828
|
-
* An interface that holds item created event arguments
|
|
829
|
-
*/
|
|
830
|
-
export interface ItemCreatedArgs {
|
|
831
|
-
curData: {
|
|
832
|
-
[key: string]: object;
|
|
833
|
-
};
|
|
834
|
-
dataSource: {
|
|
835
|
-
[key: string]: object;
|
|
836
|
-
} | string[];
|
|
837
|
-
fields: FieldsMapping;
|
|
838
|
-
item: HTMLElement;
|
|
839
|
-
options: ListBaseOptions;
|
|
840
|
-
text: string;
|
|
841
|
-
}
|
|
842
|
-
interface DataSource {
|
|
843
|
-
[key: string]: object;
|
|
844
|
-
}
|
|
845
|
-
export {};
|