@syncfusion/ej2-lists 29.2.4 → 30.1.37
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 +1 -1
- package/dist/ej2-lists.umd.min.js +1 -1
- package/dist/global/ej2-lists.min.js +1 -1
- package/dist/global/index.d.ts +1 -1
- package/dist/ts/common/index.d.ts +4 -0
- package/dist/ts/common/index.ts +4 -0
- package/dist/ts/common/list-base.d.ts +415 -0
- package/dist/ts/common/list-base.ts +1362 -0
- package/dist/ts/component.d.ts +4 -0
- package/dist/ts/component.ts +4 -0
- package/dist/ts/index.d.ts +6 -0
- package/dist/ts/index.ts +6 -0
- package/dist/ts/list-view/index.d.ts +6 -0
- package/dist/ts/list-view/index.ts +6 -0
- package/dist/ts/list-view/list-view-model.d.ts +324 -0
- package/dist/ts/list-view/list-view.d.ts +844 -0
- package/dist/ts/list-view/list-view.ts +2732 -0
- package/dist/ts/list-view/virtualization.d.ts +97 -0
- package/dist/ts/list-view/virtualization.ts +947 -0
- package/dist/ts/sortable/index.d.ts +5 -0
- package/dist/ts/sortable/index.ts +5 -0
- package/dist/ts/sortable/sortable-model.d.ts +80 -0
- package/dist/ts/sortable/sortable.d.ts +146 -0
- package/dist/ts/sortable/sortable.ts +483 -0
- package/package.json +10 -11
- package/styles/bds-lite.css +7 -0
- package/styles/bds.css +7 -0
- package/styles/bootstrap-dark-lite.css +7 -0
- package/styles/bootstrap-dark.css +7 -0
- package/styles/bootstrap-lite.css +7 -0
- package/styles/bootstrap.css +7 -0
- package/styles/bootstrap4-lite.css +7 -0
- package/styles/bootstrap4.css +7 -0
- package/styles/bootstrap5-dark-lite.css +7 -0
- package/styles/bootstrap5-dark.css +7 -0
- package/styles/bootstrap5-lite.css +7 -0
- package/styles/bootstrap5.3-lite.css +7 -4
- package/styles/bootstrap5.3.css +7 -4
- package/styles/bootstrap5.css +7 -0
- package/styles/fabric-dark-lite.css +7 -0
- package/styles/fabric-dark.css +7 -0
- package/styles/fabric-lite.css +7 -0
- package/styles/fabric.css +7 -0
- package/styles/fluent-dark-lite.css +7 -0
- package/styles/fluent-dark.css +7 -0
- package/styles/fluent-lite.css +7 -0
- package/styles/fluent.css +7 -0
- package/styles/fluent2-lite.css +7 -0
- package/styles/fluent2.css +7 -0
- package/styles/highcontrast-light-lite.css +7 -0
- package/styles/highcontrast-light.css +7 -0
- package/styles/highcontrast-lite.css +7 -0
- package/styles/highcontrast.css +7 -0
- package/styles/list-view/_layout.scss +8 -0
- package/styles/list-view/_theme.scss +1 -1
- package/styles/list-view/bds.css +7 -0
- package/styles/list-view/bootstrap-dark.css +7 -0
- package/styles/list-view/bootstrap.css +7 -0
- package/styles/list-view/bootstrap4.css +7 -0
- package/styles/list-view/bootstrap5-dark.css +7 -0
- package/styles/list-view/bootstrap5.3.css +7 -4
- package/styles/list-view/bootstrap5.css +7 -0
- package/styles/list-view/fabric-dark.css +7 -0
- package/styles/list-view/fabric.css +7 -0
- package/styles/list-view/fluent-dark.css +7 -0
- package/styles/list-view/fluent.css +7 -0
- package/styles/list-view/fluent2.css +7 -0
- package/styles/list-view/highcontrast-light.css +7 -0
- package/styles/list-view/highcontrast.css +7 -0
- package/styles/list-view/material-dark.css +7 -0
- package/styles/list-view/material.css +7 -0
- package/styles/list-view/material3-dark.css +7 -0
- package/styles/list-view/material3.css +7 -0
- package/styles/list-view/tailwind-dark.css +7 -0
- package/styles/list-view/tailwind.css +7 -0
- package/styles/list-view/tailwind3.css +7 -0
- package/styles/material-dark-lite.css +7 -0
- package/styles/material-dark.css +7 -0
- package/styles/material-lite.css +7 -0
- package/styles/material.css +7 -0
- package/styles/material3-dark-lite.css +7 -0
- package/styles/material3-dark.css +7 -0
- package/styles/material3-lite.css +7 -0
- package/styles/material3.css +7 -0
- package/styles/tailwind-dark-lite.css +7 -0
- package/styles/tailwind-dark.css +7 -0
- package/styles/tailwind-lite.css +7 -0
- package/styles/tailwind.css +7 -0
- package/styles/tailwind3-lite.css +7 -0
- package/styles/tailwind3.css +7 -0
package/dist/ts/index.ts
ADDED
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { Virtualization } from './virtualization';import { merge, formatUnit, isNullOrUndefined, append, detach, ModuleDeclaration, extend } from '@syncfusion/ej2-base';import { attributes, addClass, removeClass, prepend, closest, remove } from '@syncfusion/ej2-base';import { Component, EventHandler, BaseEventArgs, Property, Complex, Event } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, ChildProperty } from '@syncfusion/ej2-base';import { KeyboardEventArgs, EmitType, compile, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { Animation, AnimationOptions, Effect, rippleEffect, Touch, SwipeEventArgs, animationMode } from '@syncfusion/ej2-base';import { DataManager, Query } from '@syncfusion/ej2-data';import { createCheckBox } from '@syncfusion/ej2-buttons';import { ListBase, ListBaseOptions, SortOrder, getFieldValues, FieldsMapping } from '../common/list-base';
|
|
2
|
+
import {AnimationSettings,checkBoxPosition,SelectEventArgs,ScrolledEventArgs} from "./list-view";
|
|
3
|
+
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Interface for a class FieldSettings
|
|
7
|
+
*/
|
|
8
|
+
export interface FieldSettingsModel {
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Specifies the id field mapped in dataSource.
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The `text` property is used to map the text value from the data source for each list item.
|
|
17
|
+
*/
|
|
18
|
+
text?: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The `isChecked` property is used to check whether the list items are in checked state or not.
|
|
22
|
+
*/
|
|
23
|
+
isChecked?: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The `isVisible` property is used to check whether the list items are in visible state or not.
|
|
27
|
+
*/
|
|
28
|
+
isVisible?: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Specifies the enabled state of the ListView component.
|
|
32
|
+
* And, we can disable the component using this property by setting its value as false.
|
|
33
|
+
*/
|
|
34
|
+
enabled?: string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The `iconCss` is used to customize the icon to the list items dynamically.
|
|
38
|
+
* We can add a specific image to the icons using `iconCss` property.
|
|
39
|
+
*/
|
|
40
|
+
iconCss?: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The `child` property is used for nested navigation of listed items.
|
|
44
|
+
*/
|
|
45
|
+
child?: string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The `tooltip` is used to display the information about the target element while hovering on list items.
|
|
49
|
+
*/
|
|
50
|
+
tooltip?: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The `groupBy` property is used to wraps the ListView elements into a group.
|
|
54
|
+
*/
|
|
55
|
+
groupBy?: string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The `sortBy` property used to enable the sorting of list items to be ascending or descending order.
|
|
59
|
+
*/
|
|
60
|
+
sortBy?: string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The `htmlAttributes` allows additional attributes such as id, class, etc., and
|
|
64
|
+
* accepts n number of attributes in a key-value pair format.
|
|
65
|
+
*/
|
|
66
|
+
htmlAttributes?: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Specifies the `tableName` used to fetch data from a specific table in the server.
|
|
70
|
+
*/
|
|
71
|
+
tableName?: string;
|
|
72
|
+
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Interface for a class ListView
|
|
77
|
+
*/
|
|
78
|
+
export interface ListViewModel extends ComponentModel{
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The `cssClass` property is used to add a user-preferred class name in the root element of the ListView,
|
|
82
|
+
* using which we can customize the component (both CSS and functionality customization)
|
|
83
|
+
*
|
|
84
|
+
* {% codeBlock src='listview/cssClass/index.md' %}{% endcodeBlock %}
|
|
85
|
+
*
|
|
86
|
+
* @default ''
|
|
87
|
+
*/
|
|
88
|
+
cssClass?: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* If `enableVirtualization` set to true, which will increase the ListView performance, while loading a large amount of data.
|
|
92
|
+
*
|
|
93
|
+
* {% codeBlock src='listview/enableVirtualization/index.md' %}{% endcodeBlock %}
|
|
94
|
+
*
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
enableVirtualization?: boolean;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The `htmlAttributes` allows additional attributes such as id, class, etc., and
|
|
101
|
+
* accepts n number of attributes in a key-value pair format.
|
|
102
|
+
*
|
|
103
|
+
* {% codeBlock src='listview/htmlAttributes/index.md' %}{% endcodeBlock %}
|
|
104
|
+
*
|
|
105
|
+
* @default {}
|
|
106
|
+
*/
|
|
107
|
+
htmlAttributes?: { [key: string]: string; };
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* If `enable` set to true, the list items are enabled.
|
|
111
|
+
* And, we can disable the component using this property by setting its value as false.
|
|
112
|
+
*
|
|
113
|
+
* {% codeBlock src='listview/enable/index.md' %}{% endcodeBlock %}
|
|
114
|
+
*
|
|
115
|
+
* @default true
|
|
116
|
+
*/
|
|
117
|
+
enable?: boolean;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The `dataSource` provides the data to render the ListView component which is mapped with the fields of ListView.
|
|
121
|
+
*
|
|
122
|
+
* @isGenericType true
|
|
123
|
+
*
|
|
124
|
+
* {% codeBlock src='listview/dataSource/index.md' %}{% endcodeBlock %}
|
|
125
|
+
*
|
|
126
|
+
* @default []
|
|
127
|
+
*/
|
|
128
|
+
dataSource?: { [key: string]: Object }[] | string[] | number[] | DataManager;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The `query` is used to fetch the specific data from dataSource by using where and select keywords.
|
|
132
|
+
*
|
|
133
|
+
* {% codeBlock src='listview/query/index.md' %}{% endcodeBlock %}
|
|
134
|
+
*
|
|
135
|
+
* @default null
|
|
136
|
+
*/
|
|
137
|
+
query?: Query;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The `fields` is used to map keys from the dataSource which extracts the appropriate data from the dataSource
|
|
141
|
+
* with specified mapped with the column fields to render the ListView.
|
|
142
|
+
*
|
|
143
|
+
* {% codeBlock src='listview/fields/index.md' %}{% endcodeBlock %}
|
|
144
|
+
*
|
|
145
|
+
* @default defaultMappedFields
|
|
146
|
+
*/
|
|
147
|
+
fields?: FieldSettingsModel;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* The `animation` property provides an option to apply the different
|
|
151
|
+
* animations on the ListView component.
|
|
152
|
+
*
|
|
153
|
+
* {% codeBlock src='listview/animation/index.md' %}{% endcodeBlock %}
|
|
154
|
+
*
|
|
155
|
+
*
|
|
156
|
+
* @default { effect: 'SlideLeft', duration: 400, easing: 'ease' }
|
|
157
|
+
*/
|
|
158
|
+
animation?: AnimationSettings;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The `sortOrder` is used to sort the data source. The available type of sort orders are,
|
|
162
|
+
* * `None` - The data source is not sorting.
|
|
163
|
+
* * `Ascending` - The data source is sorting with ascending order.
|
|
164
|
+
* * `Descending` - The data source is sorting with descending order.
|
|
165
|
+
*
|
|
166
|
+
* {% codeBlock src='listview/sortOrder/index.md' %}{% endcodeBlock %}
|
|
167
|
+
*
|
|
168
|
+
* @default 'None'
|
|
169
|
+
*/
|
|
170
|
+
sortOrder?: SortOrder;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* If `showIcon` set to true, which will show or hide the icon of the list item.
|
|
174
|
+
*
|
|
175
|
+
* {% codeBlock src='listview/showIcon/index.md' %}{% endcodeBlock %}
|
|
176
|
+
*
|
|
177
|
+
* @default false
|
|
178
|
+
*/
|
|
179
|
+
showIcon?: boolean;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* If `showCheckBox` set to true, which will show or hide the checkbox.
|
|
183
|
+
*
|
|
184
|
+
* {% codeBlock src='listview/showCheckBox/index.md' %}{% endcodeBlock %}
|
|
185
|
+
*
|
|
186
|
+
*
|
|
187
|
+
* @default false
|
|
188
|
+
*/
|
|
189
|
+
showCheckBox?: boolean;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The `checkBoxPosition` is used to set the position of check box in a list item.
|
|
193
|
+
* By default, the `checkBoxPosition` is Left, which will appear before the text content in a list item.
|
|
194
|
+
*
|
|
195
|
+
* {% codeBlock src='listview/checkBoxPosition/index.md' %}{% endcodeBlock %}
|
|
196
|
+
*
|
|
197
|
+
* @default 'Left'
|
|
198
|
+
*/
|
|
199
|
+
checkBoxPosition?: checkBoxPosition;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* The `headerTitle` is used to set the title of the ListView component.
|
|
203
|
+
*
|
|
204
|
+
* {% codeBlock src='listview/headerTitle/index.md' %}{% endcodeBlock %}
|
|
205
|
+
*
|
|
206
|
+
*
|
|
207
|
+
* @default ""
|
|
208
|
+
*/
|
|
209
|
+
headerTitle?: string;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* If `showHeader` set to true, which will show or hide the header of the ListView component.
|
|
213
|
+
*
|
|
214
|
+
* {% codeBlock src='listview/showHeader/index.md' %}{% endcodeBlock %}
|
|
215
|
+
*
|
|
216
|
+
* @default false
|
|
217
|
+
*/
|
|
218
|
+
showHeader?: boolean;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Specifies whether to display or remove the untrusted HTML values in the ListView component.
|
|
222
|
+
* If 'enableHtmlSanitizer' set to true, the component will sanitize any suspected untrusted strings and scripts before rendering them.
|
|
223
|
+
*
|
|
224
|
+
* {% codeBlock src='listview/enableHtmlSanitizer/index.md' %}{% endcodeBlock %}
|
|
225
|
+
*
|
|
226
|
+
* @default true
|
|
227
|
+
*/
|
|
228
|
+
enableHtmlSanitizer?: boolean;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Defines the height of the ListView component which accepts both string and number values.
|
|
232
|
+
*
|
|
233
|
+
* {% codeBlock src='listview/height/index.md' %}{% endcodeBlock %}
|
|
234
|
+
*
|
|
235
|
+
* @default ''
|
|
236
|
+
*/
|
|
237
|
+
height?: number | string;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Defines the width of the ListView component which accepts both string and number values.
|
|
241
|
+
*
|
|
242
|
+
* {% codeBlock src='listview/width/index.md' %}{% endcodeBlock %}
|
|
243
|
+
*
|
|
244
|
+
* @default ''
|
|
245
|
+
*/
|
|
246
|
+
width?: number | string;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* The ListView component supports to customize the content of each list items with the help of `template` property.
|
|
250
|
+
*
|
|
251
|
+
* {% codeBlock src='listview/template/index.md' %}{% endcodeBlock %}
|
|
252
|
+
*
|
|
253
|
+
* @default null
|
|
254
|
+
* @angularType string | object
|
|
255
|
+
* @reactType string | function | JSX.Element
|
|
256
|
+
* @vueType string | function
|
|
257
|
+
* @aspType string
|
|
258
|
+
*/
|
|
259
|
+
template?: string | Function;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* The ListView has an option to custom design the ListView header title with the help of `headerTemplate` property.
|
|
263
|
+
*
|
|
264
|
+
* {% codeBlock src="listview/headerTemplate/index.md" %}{% endcodeBlock %}
|
|
265
|
+
*
|
|
266
|
+
* @default null
|
|
267
|
+
* @angularType string | object
|
|
268
|
+
* @reactType string | function | JSX.Element
|
|
269
|
+
* @vueType string | function
|
|
270
|
+
* @aspType string
|
|
271
|
+
*/
|
|
272
|
+
headerTemplate?: string | Function;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* The ListView has an option to custom design the group header title with the help of `groupTemplate` property.
|
|
276
|
+
*
|
|
277
|
+
* {% codeBlock src="listview/groupTemplate/index.md" %}{% endcodeBlock %}
|
|
278
|
+
*
|
|
279
|
+
* @default null
|
|
280
|
+
* @angularType string | object
|
|
281
|
+
* @reactType string | function | JSX.Element
|
|
282
|
+
* @vueType string | function
|
|
283
|
+
* @aspType string
|
|
284
|
+
*/
|
|
285
|
+
groupTemplate?: string | Function;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Triggers when we select the list item in the component.
|
|
289
|
+
*
|
|
290
|
+
* @event 'object'
|
|
291
|
+
*/
|
|
292
|
+
select?: EmitType<SelectEventArgs>;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Triggers when every ListView action starts.
|
|
296
|
+
*
|
|
297
|
+
* @event 'object'
|
|
298
|
+
*/
|
|
299
|
+
actionBegin?: EmitType<object>;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Triggers when every ListView actions completed.
|
|
303
|
+
*
|
|
304
|
+
* @event 'object'
|
|
305
|
+
*/
|
|
306
|
+
/* es-lint disable */
|
|
307
|
+
actionComplete?: EmitType<MouseEvent>;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Triggers, when the data fetch request from the remote server, fails.
|
|
311
|
+
*
|
|
312
|
+
* @event 'object'
|
|
313
|
+
*
|
|
314
|
+
*/
|
|
315
|
+
actionFailure?: EmitType<MouseEvent>;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Triggers when scrollbar of the ListView component reaches to the top or bottom.
|
|
319
|
+
*
|
|
320
|
+
* @event 'object'
|
|
321
|
+
*/
|
|
322
|
+
scroll?: EmitType<ScrolledEventArgs>;
|
|
323
|
+
|
|
324
|
+
}
|