@syncfusion/ej2-lists 30.2.4 → 31.1.17

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.
Files changed (89) hide show
  1. package/dist/ej2-lists.min.js +1 -1
  2. package/dist/ej2-lists.umd.min.js +1 -1
  3. package/dist/global/ej2-lists.min.js +1 -1
  4. package/dist/global/index.d.ts +1 -1
  5. package/dist/ts/common/index.d.ts +4 -0
  6. package/dist/ts/common/index.ts +4 -0
  7. package/dist/ts/common/list-base.d.ts +415 -0
  8. package/dist/ts/common/list-base.ts +1362 -0
  9. package/dist/ts/component.d.ts +4 -0
  10. package/dist/ts/component.ts +4 -0
  11. package/dist/ts/index.d.ts +6 -0
  12. package/dist/ts/index.ts +6 -0
  13. package/dist/ts/list-view/index.d.ts +6 -0
  14. package/dist/ts/list-view/index.ts +6 -0
  15. package/dist/ts/list-view/list-view-model.d.ts +324 -0
  16. package/dist/ts/list-view/list-view.d.ts +845 -0
  17. package/dist/ts/list-view/list-view.ts +2740 -0
  18. package/dist/ts/list-view/virtualization.d.ts +97 -0
  19. package/dist/ts/list-view/virtualization.ts +947 -0
  20. package/dist/ts/sortable/index.d.ts +5 -0
  21. package/dist/ts/sortable/index.ts +5 -0
  22. package/dist/ts/sortable/sortable-model.d.ts +80 -0
  23. package/dist/ts/sortable/sortable.d.ts +146 -0
  24. package/dist/ts/sortable/sortable.ts +483 -0
  25. package/package.json +56 -12
  26. package/styles/bds-lite.css +9 -0
  27. package/styles/bds.css +9 -0
  28. package/styles/bootstrap-dark-lite.css +9 -0
  29. package/styles/bootstrap-dark.css +9 -0
  30. package/styles/bootstrap-lite.css +9 -0
  31. package/styles/bootstrap.css +9 -0
  32. package/styles/bootstrap4-lite.css +9 -0
  33. package/styles/bootstrap4.css +9 -0
  34. package/styles/bootstrap5-dark-lite.css +9 -0
  35. package/styles/bootstrap5-dark.css +9 -0
  36. package/styles/bootstrap5-lite.css +9 -0
  37. package/styles/bootstrap5.3-lite.css +9 -0
  38. package/styles/bootstrap5.3.css +9 -0
  39. package/styles/bootstrap5.css +9 -0
  40. package/styles/fabric-dark-lite.css +9 -0
  41. package/styles/fabric-dark.css +9 -0
  42. package/styles/fabric-lite.css +9 -0
  43. package/styles/fabric.css +9 -0
  44. package/styles/fluent-dark-lite.css +9 -0
  45. package/styles/fluent-dark.css +9 -0
  46. package/styles/fluent-lite.css +9 -0
  47. package/styles/fluent.css +9 -0
  48. package/styles/fluent2-lite.css +9 -0
  49. package/styles/fluent2.css +9 -0
  50. package/styles/highcontrast-light-lite.css +9 -0
  51. package/styles/highcontrast-light.css +9 -0
  52. package/styles/highcontrast-lite.css +9 -0
  53. package/styles/highcontrast.css +9 -0
  54. package/styles/list-view/_layout.scss +9 -0
  55. package/styles/list-view/bds.css +9 -0
  56. package/styles/list-view/bootstrap-dark.css +9 -0
  57. package/styles/list-view/bootstrap.css +9 -0
  58. package/styles/list-view/bootstrap4.css +9 -0
  59. package/styles/list-view/bootstrap5-dark.css +9 -0
  60. package/styles/list-view/bootstrap5.3.css +9 -0
  61. package/styles/list-view/bootstrap5.css +9 -0
  62. package/styles/list-view/fabric-dark.css +9 -0
  63. package/styles/list-view/fabric.css +9 -0
  64. package/styles/list-view/fluent-dark.css +9 -0
  65. package/styles/list-view/fluent.css +9 -0
  66. package/styles/list-view/fluent2.css +9 -0
  67. package/styles/list-view/highcontrast-light.css +9 -0
  68. package/styles/list-view/highcontrast.css +9 -0
  69. package/styles/list-view/material-dark.css +9 -0
  70. package/styles/list-view/material.css +9 -0
  71. package/styles/list-view/material3-dark.css +9 -0
  72. package/styles/list-view/material3.css +9 -0
  73. package/styles/list-view/tailwind-dark.css +9 -0
  74. package/styles/list-view/tailwind.css +9 -0
  75. package/styles/list-view/tailwind3.css +9 -0
  76. package/styles/material-dark-lite.css +9 -0
  77. package/styles/material-dark.css +9 -0
  78. package/styles/material-lite.css +9 -0
  79. package/styles/material.css +9 -0
  80. package/styles/material3-dark-lite.css +9 -0
  81. package/styles/material3-dark.css +9 -0
  82. package/styles/material3-lite.css +9 -0
  83. package/styles/material3.css +9 -0
  84. package/styles/tailwind-dark-lite.css +9 -0
  85. package/styles/tailwind-dark.css +9 -0
  86. package/styles/tailwind-lite.css +9 -0
  87. package/styles/tailwind.css +9 -0
  88. package/styles/tailwind3-lite.css +9 -0
  89. package/styles/tailwind3.css +9 -0
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: ej2-lists.min.js
3
- * version : 30.2.4
3
+ * version : 31.1.17
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: ej2-lists.umd.min.js
3
- * version : 30.2.4
3
+ * version : 31.1.17
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: ej2-lists.min.js
3
- * version : 30.2.4
3
+ * version : 31.1.17
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 30.2.4
3
+ * version : 31.1.17
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Listview Component
3
+ */
4
+ export * from './list-base';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Listview Component
3
+ */
4
+ export * from './list-base';
@@ -0,0 +1,415 @@
1
+ import { Query } from '@syncfusion/ej2-data';
2
+ export declare let cssClass: ClassList;
3
+ /**
4
+ * An interface that holds item class list
5
+ */
6
+ export interface ClassList {
7
+ li: string;
8
+ ul: string;
9
+ group: string;
10
+ icon: string;
11
+ text: string;
12
+ check: string;
13
+ checked: string;
14
+ selected: string;
15
+ expanded: string;
16
+ textContent: string;
17
+ hasChild: string;
18
+ level: string;
19
+ url: string;
20
+ collapsible: string;
21
+ disabled: string;
22
+ image: string;
23
+ iconWrapper: string;
24
+ anchorWrap: string;
25
+ navigable: string;
26
+ }
27
+ /**
28
+ * Sorting Order
29
+ */
30
+ export declare type SortOrder = 'None' | 'Ascending' | 'Descending';
31
+ /**
32
+ * Base List Generator
33
+ */
34
+ export declare namespace ListBase {
35
+ /**
36
+ *
37
+ * Default mapped fields.
38
+ */
39
+ const defaultMappedFields: FieldsMapping;
40
+ /**
41
+ * Function helps to created and return the UL Li element based on your data.
42
+ *
43
+ * @param {createElementParams} createElement - Specifies an array of JSON data.
44
+ *
45
+ * @param {{Object}[]} dataSource - Specifies an array of JSON data.
46
+ *
47
+ * @param {ListBaseOptions} [options] - Specifies the list options that need to provide.
48
+ *
49
+ * @param {boolean} [isSingleLevel] - Specifies the list options that need to provide.
50
+ *
51
+ * @param {any} [componentInstance] - Specifies the list options that need to provide.
52
+ *
53
+ * @returns {createElement} createListFromJson - Specifies the list options that need to provide.
54
+ */
55
+ function createList(createElement: createElementParams, dataSource: {
56
+ [key: string]: Object;
57
+ }[] | string[] | number[], options?: ListBaseOptions, isSingleLevel?: boolean, componentInstance?: any): HTMLElement;
58
+ /**
59
+ * Function helps to created an element list based on string array input .
60
+ *
61
+ * @param {createElementParams} createElement - Specifies an array of JSON data.
62
+ *
63
+ * @param {{Object}[]} dataSource - Specifies an array of JSON data.
64
+ *
65
+ * @param {boolean} [isSingleLevel] - Specifies the list options that need to provide.
66
+ *
67
+ * @param {ListBaseOptions} [options] - Specifies the list options that need to provide.
68
+ *
69
+ * @param {any} [componentInstance] - Specifies the list options that need to provide.
70
+ *
71
+ * @returns {createElement} generateUL - returns the list options that need to provide.
72
+ */
73
+ function createListFromArray(createElement: createElementParams, dataSource: string[] | number[], isSingleLevel?: boolean, options?: ListBaseOptions, componentInstance?: any): HTMLElement;
74
+ /**
75
+ * Function helps to created an element list based on string array input .
76
+ *
77
+ * @param {createElementParams} createElement - Specifies an array of JSON data.
78
+ *
79
+ * @param {{Object}[]} dataSource - Specifies an array of JSON data.
80
+ *
81
+ * @param {boolean} [isSingleLevel] - Specifies the list options that need to provide.
82
+ *
83
+ * @param {ListBaseOptions} [options] - Specifies the list options that need to provide.
84
+ *
85
+ * @param {any} [componentInstance] - Specifies the list options that need to provide.
86
+ *
87
+ * @returns {HTMLElement[]} subChild - returns the list options that need to provide.
88
+ */
89
+ function createListItemFromArray(createElement: createElementParams, dataSource: string[] | number[], isSingleLevel?: boolean, options?: ListBaseOptions, componentInstance?: any): HTMLElement[];
90
+ /**
91
+ * Function helps to created an element list based on array of JSON input .
92
+ *
93
+ * @param {createElementParams} createElement - Specifies an array of JSON data.
94
+ *
95
+ * @param {{Object}[]} dataSource - Specifies an array of JSON data.
96
+ *
97
+ * @param {ListBaseOptions} [options] - Specifies the list options that need to provide.
98
+ *
99
+ * @param {number} [level] - Specifies the list options that need to provide.
100
+ *
101
+ * @param {boolean} [isSingleLevel] - Specifies the list options that need to provide.
102
+ *
103
+ * @param {any} [componentInstance] - Specifies the list options that need to provide.
104
+ *
105
+ * @returns {HTMLElement[]} child - returns the list options that need to provide.
106
+ */
107
+ function createListItemFromJson(createElement: createElementParams, dataSource: {
108
+ [key: string]: Object;
109
+ }[], options?: ListBaseOptions, level?: number, isSingleLevel?: boolean, componentInstance?: any): HTMLElement[];
110
+ /**
111
+ * Function helps to created an element list based on array of JSON input .
112
+ *
113
+ * @param {createElementParams} createElement - Specifies an array of JSON data.
114
+ *
115
+ * @param {{Object}[]} dataSource - Specifies an array of JSON data.
116
+ *
117
+ * @param {ListBaseOptions} [options] - Specifies the list options that need to provide.
118
+ *
119
+ * @param {number} [level] - Specifies the list options that need to provide.
120
+ *
121
+ * @param {boolean} [isSingleLevel] - Specifies the list options that need to provide.
122
+ *
123
+ * @param {any} [componentInstance] - Specifies the list options that need to provide.
124
+ *
125
+ * @returns {createElement} generateUL - Specifies the list options that need to provide.
126
+ */
127
+ function createListFromJson(createElement: createElementParams, dataSource: {
128
+ [key: string]: Object;
129
+ }[], options?: ListBaseOptions, level?: number, isSingleLevel?: boolean, componentInstance?: any): HTMLElement;
130
+ /**
131
+ * Return the next or previous visible element.
132
+ *
133
+ * @param {Element[]|NodeList} elementArray - An element array to find next or previous element.
134
+ * @param {Element} element - An element to find next or previous after this element.
135
+ * @param {boolean} [isPrevious] - Specify when the need get previous element from array.
136
+ * @returns {Element|undefined} The next or previous visible element, or undefined if the element array is empty.
137
+ */
138
+ function getSiblingLI(elementArray: Element[] | NodeList, element: Element, isPrevious?: boolean): Element;
139
+ /**
140
+ * Return the index of the li element
141
+ *
142
+ * @param {Element} item - An element to find next or previous after this element.
143
+ * @param {Element[]} elementArray - An element array to find index of given li.
144
+ * @returns {number} - The index of the item in the element array, or undefined if either parameter is false.
145
+ */
146
+ function indexOf(item: Element, elementArray: Element[] | NodeList): number;
147
+ /**
148
+ * Returns the grouped data from given dataSource.
149
+ *
150
+ * @param {{Object}[]} dataSource - The JSON data which is necessary to process.
151
+ * @param {FieldsMapping} fields - Fields that are mapped from the data source.
152
+ * @param {SortOrder} [sortOrder='None'] - Specifies final result sort order. Defaults to 'None'.
153
+ * @returns {Object[]} - The grouped data.
154
+ */
155
+ function groupDataSource(dataSource: {
156
+ [key: string]: Object;
157
+ }[], fields: FieldsMapping, sortOrder?: SortOrder): {
158
+ [key: string]: Object;
159
+ }[];
160
+ /**
161
+ * Returns a sorted query object.
162
+ *
163
+ * @param {SortOrder} sortOrder - Specifies that sort order.
164
+ * @param {string} sortBy - Specifies sortBy fields.
165
+ * @param {Query} query - Pass if any existing query.
166
+ * @returns {Query} - The updated query object with sorting applied.
167
+ */
168
+ function addSorting(sortOrder: SortOrder, sortBy: string, query?: Query): Query;
169
+ /**
170
+ * Return an array of JSON Data that processed based on queries.
171
+ *
172
+ * @param {{Object}[]} dataSource - Specifies local JSON data source.
173
+ *
174
+ * @param {Query} query - Specifies query that need to process.
175
+ *
176
+ * @returns {Object[]} - An array of objects representing the retrieved data.
177
+ */
178
+ function getDataSource(dataSource: {
179
+ [key: string]: Object;
180
+ }[], query: Query): {
181
+ [key: string]: Object;
182
+ }[];
183
+ /**
184
+ * Created JSON data based the UL and LI element
185
+ *
186
+ * @param {HTMLElement|Element} element - UL element that need to convert as a JSON
187
+ * @param {ListBaseOptions} [options] - Specifies ListBase option for fields.
188
+ * @returns {Object[]} - An array of objects representing the JSON data.
189
+ */
190
+ function createJsonFromElement(element: HTMLElement | Element, options?: ListBaseOptions): {
191
+ [key: string]: Object;
192
+ }[];
193
+ /**
194
+ * Created UL element from content template.
195
+ *
196
+ * @param {createElementParams} createElement - Specifies an array of JSON data.
197
+ * @param {string} template - that need to convert and generate li element.
198
+ * @param {{Object}[]} dataSource - Specifies local JSON data source.
199
+ * @param {FieldsMapping} [fields] - Specifies fields for mapping the dataSource.
200
+ * @param {ListBaseOptions} [options] - Specifies ListBase option for fields.
201
+ * @param {any} [componentInstance] - Specifies component instance.
202
+ * @returns {HTMLElement} - The generated LI element.
203
+ */
204
+ function renderContentTemplate(createElement: createElementParams, template: string | Function, dataSource: {
205
+ [key: string]: Object;
206
+ }[] | string[] | number[], fields?: FieldsMapping, options?: ListBaseOptions, componentInstance?: any): HTMLElement;
207
+ /**
208
+ * Created header items from group template.
209
+ *
210
+ * @param {string | Function} groupTemplate - that need to convert and generate li element.
211
+ *
212
+ * @param {{Object}[]} groupDataSource - Specifies local JSON data source.
213
+ *
214
+ * @param {FieldsMapping} fields - Specifies fields for mapping the dataSource.
215
+ *
216
+ * @param {Element[]} headerItems - Specifies ListBase header items.
217
+ *
218
+ * @param {ListBaseOptions} [options] - Optional ListBase options.
219
+ *
220
+ * @param {*} [componentInstance] - Optional component instance.
221
+ *
222
+ * @returns {Element[]} - An array of header elements with the rendered group template content.
223
+ */
224
+ function renderGroupTemplate(groupTemplate: string | Function, groupDataSource: {
225
+ [key: string]: Object;
226
+ }[], fields: FieldsMapping, headerItems: Element[], options?: ListBaseOptions, componentInstance?: any): Element[];
227
+ /**
228
+ * Generates a random hexadecimal ID string.
229
+ *
230
+ * @returns {string} - The generated ID string.
231
+ */
232
+ function generateId(): string;
233
+ /**
234
+ * Returns UL element based on the given LI element.
235
+ *
236
+ * @param {Function} createElement - Function for creating elements.
237
+ *
238
+ * @param {HTMLElement[]} liElement - Specifies array of LI element.
239
+ *
240
+ * @param {string} [className] - Specifies class name that need to be added in UL element.
241
+ *
242
+ * @param {ListBaseOptions} [options] - Specifies ListBase options.
243
+ *
244
+ * @returns {HTMLElement} - The created UL element.
245
+ */
246
+ function generateUL(createElement: createElementParams, liElement: HTMLElement[], className?: string, options?: ListBaseOptions): HTMLElement;
247
+ /**
248
+ * Returns LI element with additional DIV tag based on the given LI element.
249
+ *
250
+ * @param {Function} createElement - Function for creating elements.
251
+ *
252
+ * @param {liElement} liElement - Specifies LI element.
253
+ *
254
+ * @param {string} [className] - Specifies class name that need to be added in created DIV element.
255
+ *
256
+ * @param {ListBaseOptions} [options] - Specifies ListBase options.
257
+ *
258
+ * @returns {HTMLElement} - The modified LI element.
259
+ */
260
+ function generateIcon(createElement: createElementParams, liElement: HTMLElement, className?: string, options?: ListBaseOptions): HTMLElement;
261
+ }
262
+ export declare type createElementParams = (tag: string, prop?: {
263
+ id?: string;
264
+ className?: string;
265
+ innerHTML?: string;
266
+ styles?: string;
267
+ attrs?: {
268
+ [key: string]: string;
269
+ };
270
+ }) => HTMLElement;
271
+ /**
272
+ * An interface that holds the field mappings
273
+ */
274
+ export interface FieldsMapping {
275
+ id?: string;
276
+ text?: string;
277
+ value?: string;
278
+ isChecked?: string;
279
+ isVisible?: string;
280
+ url?: string;
281
+ enabled?: string;
282
+ groupBy?: string;
283
+ expanded?: string;
284
+ selected?: string;
285
+ iconCss?: string;
286
+ child?: string;
287
+ tooltip?: string;
288
+ hasChildren?: string;
289
+ htmlAttributes?: string;
290
+ urlAttributes?: string;
291
+ imageUrl?: string;
292
+ imageAttributes?: string;
293
+ sortBy?: string;
294
+ }
295
+ /**
296
+ * An enum type that denotes the Expand Icon Position. Available options are as follows Right, Left;
297
+ */
298
+ export declare type Position = 'Right' | 'Left';
299
+ /**
300
+ * An interface that holds item aria attributes mapping
301
+ */
302
+ export interface AriaAttributesMapping {
303
+ level?: number;
304
+ listRole?: string;
305
+ itemRole?: string;
306
+ groupItemRole?: string;
307
+ itemText?: string;
308
+ wrapperRole?: string;
309
+ }
310
+ /**
311
+ * Basic ListBase Options
312
+ */
313
+ export interface ListBaseOptions {
314
+ /**
315
+ * Specifies that fields that mapped in dataSource
316
+ */
317
+ fields?: FieldsMapping;
318
+ /**
319
+ * Specifies the aria attributes
320
+ */
321
+ ariaAttributes?: AriaAttributesMapping;
322
+ /**
323
+ * Specifies to show checkBox
324
+ */
325
+ showCheckBox?: boolean;
326
+ /**
327
+ * Specifies to show icon
328
+ */
329
+ showIcon?: boolean;
330
+ /**
331
+ * Specifies to show collapsible icon
332
+ */
333
+ expandCollapse?: boolean;
334
+ /**
335
+ * Specifies when need to add additional UL list class
336
+ */
337
+ listClass?: string;
338
+ /**
339
+ * Specifies when need to add additional LI item class
340
+ */
341
+ itemClass?: string;
342
+ /**
343
+ * Enables when need process depth child processing.
344
+ */
345
+ processSubChild?: boolean;
346
+ /**
347
+ * Specifies the sort order
348
+ */
349
+ sortOrder?: SortOrder;
350
+ /**
351
+ * Specifies the item template
352
+ */
353
+ template?: string | Function;
354
+ /**
355
+ * Specifies the group header template
356
+ */
357
+ groupTemplate?: string | Function;
358
+ /**
359
+ * Specifies the ListView header template
360
+ */
361
+ headerTemplate?: string | Function;
362
+ /**
363
+ * Specifies the callback function that triggered before each list creation
364
+ */
365
+ itemCreating?: Function;
366
+ /**
367
+ * Specifies the callback function that triggered after each list creation
368
+ */
369
+ itemCreated?: Function;
370
+ /**
371
+ * Specifies the customizable expand icon class
372
+ */
373
+ expandIconClass?: string;
374
+ /**
375
+ * Specifies the customized class name based on their module name
376
+ */
377
+ moduleName?: string;
378
+ /**
379
+ * Specifies the expand/collapse icon position
380
+ */
381
+ expandIconPosition?: Position;
382
+ /**
383
+ * Specifies the template ID
384
+ */
385
+ templateID?: string;
386
+ /**
387
+ * Specifies the groupTemplate ID
388
+ */
389
+ groupTemplateID?: string;
390
+ /**
391
+ * Force template compiler to compile as string template
392
+ */
393
+ isStringTemplate?: string;
394
+ /**
395
+ * Defines whether to allow the cross scripting site or not.
396
+ */
397
+ enableHtmlSanitizer?: boolean;
398
+ /**
399
+ * If set true to this property then the entire list will be navigate-able instead of text element
400
+ */
401
+ itemNavigable?: boolean;
402
+ }
403
+ /**
404
+ * Used to get dataSource item from complex data using fields.
405
+ *
406
+ * @param {Object} dataItem - Specifies an JSON or String data.
407
+ *
408
+ * @param {FieldsMapping} fields - Fields that are mapped from the dataSource.
409
+ * @returns {Object|string|number} - The retrieved field values.
410
+ */
411
+ export declare function getFieldValues(dataItem: {
412
+ [key: string]: Object;
413
+ } | string | number, fields: FieldsMapping): {
414
+ [key: string]: Object;
415
+ } | string | number;