@syncfusion/ej2-lists 30.1.37 → 30.1.41
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/.eslintrc.json +2 -0
- package/dist/ej2-lists.min.js +2 -2
- package/dist/ej2-lists.umd.min.js +2 -2
- package/dist/ej2-lists.umd.min.js.map +1 -1
- package/dist/es6/ej2-lists.es2015.js +8 -1
- package/dist/es6/ej2-lists.es2015.js.map +1 -1
- package/dist/es6/ej2-lists.es5.js +8 -1
- package/dist/es6/ej2-lists.es5.js.map +1 -1
- package/dist/global/ej2-lists.min.js +2 -2
- package/dist/global/ej2-lists.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -54
- package/src/list-view/list-view.d.ts +1 -0
- package/src/list-view/list-view.js +8 -1
- package/styles/bootstrap5.3-lite.css +4 -0
- package/styles/bootstrap5.3.css +4 -0
- package/styles/list-view/_theme.scss +1 -1
- package/styles/list-view/bootstrap5.3.css +4 -0
- 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 -844
- package/dist/ts/list-view/list-view.ts +0 -2732
- 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
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 30.1.
|
|
3
|
+
* version : 30.1.41
|
|
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
|
package/package.json
CHANGED
|
@@ -1,57 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"registry": true,
|
|
11
|
-
"raw": "@syncfusion/ej2-lists@*",
|
|
12
|
-
"name": "@syncfusion/ej2-lists",
|
|
13
|
-
"escapedName": "@syncfusion%2fej2-lists",
|
|
14
|
-
"scope": "@syncfusion",
|
|
15
|
-
"rawSpec": "*",
|
|
16
|
-
"saveSpec": null,
|
|
17
|
-
"fetchSpec": "*"
|
|
18
|
-
},
|
|
19
|
-
"_requiredBy": [
|
|
20
|
-
"/",
|
|
21
|
-
"/@syncfusion/ej2-angular-lists",
|
|
22
|
-
"/@syncfusion/ej2-calendars",
|
|
23
|
-
"/@syncfusion/ej2-diagrams",
|
|
24
|
-
"/@syncfusion/ej2-dropdowns",
|
|
25
|
-
"/@syncfusion/ej2-filemanager",
|
|
26
|
-
"/@syncfusion/ej2-gantt",
|
|
27
|
-
"/@syncfusion/ej2-grids",
|
|
28
|
-
"/@syncfusion/ej2-inplace-editor",
|
|
29
|
-
"/@syncfusion/ej2-navigations",
|
|
30
|
-
"/@syncfusion/ej2-pdfviewer",
|
|
31
|
-
"/@syncfusion/ej2-pivotview",
|
|
32
|
-
"/@syncfusion/ej2-react-lists",
|
|
33
|
-
"/@syncfusion/ej2-ribbon",
|
|
34
|
-
"/@syncfusion/ej2-schedule",
|
|
35
|
-
"/@syncfusion/ej2-vue-lists"
|
|
36
|
-
],
|
|
37
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-development/@syncfusion/ej2-lists/-/ej2-lists-18.24.0.tgz",
|
|
38
|
-
"_shasum": "57776970d4c77984c460eeca41530483f123de33",
|
|
39
|
-
"_spec": "@syncfusion/ej2-lists@*",
|
|
40
|
-
"_where": "D:\\SF3992\\WFH\\Nexus\\ej2-nexus-branch-switching-dev\\release",
|
|
41
|
-
"author": {
|
|
42
|
-
"name": "Syncfusion Inc."
|
|
43
|
-
},
|
|
44
|
-
"bundleDependencies": false,
|
|
2
|
+
"name": "@syncfusion/ej2-lists",
|
|
3
|
+
"version": "30.1.41",
|
|
4
|
+
"description": "The listview control allows you to select an item or multiple items from a list-like interface and represents the data in interactive hierarchical structure across different layouts or views.",
|
|
5
|
+
"author": "Syncfusion Inc.",
|
|
6
|
+
"license": "SEE LICENSE IN license",
|
|
7
|
+
"main": "./dist/ej2-lists.umd.min.js",
|
|
8
|
+
"module": "./index.js",
|
|
9
|
+
"es2015": "./dist/es6/ej2-lists.es5.js",
|
|
45
10
|
"dependencies": {
|
|
46
|
-
"@syncfusion/ej2-base": "~30.1.
|
|
11
|
+
"@syncfusion/ej2-base": "~30.1.38",
|
|
47
12
|
"@syncfusion/ej2-buttons": "~30.1.37",
|
|
48
|
-
"@syncfusion/ej2-data": "~30.1.
|
|
49
|
-
"@syncfusion/ej2-popups": "~30.1.
|
|
13
|
+
"@syncfusion/ej2-data": "~30.1.40",
|
|
14
|
+
"@syncfusion/ej2-popups": "~30.1.40"
|
|
50
15
|
},
|
|
51
|
-
"deprecated": false,
|
|
52
|
-
"description": "The listview control allows you to select an item or multiple items from a list-like interface and represents the data in interactive hierarchical structure across different layouts or views.",
|
|
53
16
|
"devDependencies": {},
|
|
54
|
-
"es2015": "./dist/es6/ej2-lists.es5.js",
|
|
55
17
|
"keywords": [
|
|
56
18
|
"ej2",
|
|
57
19
|
"Syncfusion",
|
|
@@ -77,16 +39,11 @@
|
|
|
77
39
|
"es6 list",
|
|
78
40
|
"dynamic list"
|
|
79
41
|
],
|
|
80
|
-
"license": "SEE LICENSE IN license",
|
|
81
|
-
"main": "./dist/ej2-lists.umd.min.js",
|
|
82
|
-
"module": "./index.js",
|
|
83
|
-
"name": "@syncfusion/ej2-lists",
|
|
84
42
|
"repository": {
|
|
85
43
|
"type": "git",
|
|
86
44
|
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/lists"
|
|
87
45
|
},
|
|
88
46
|
"typings": "index.d.ts",
|
|
89
|
-
"version": "30.1.37",
|
|
90
47
|
"sideEffects": false,
|
|
91
48
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
92
49
|
}
|
|
@@ -74,7 +74,8 @@ export var classNames = {
|
|
|
74
74
|
checkboxLeft: 'e-checkbox-left',
|
|
75
75
|
listviewCheckbox: 'e-listview-checkbox',
|
|
76
76
|
itemCheckList: 'e-checklist',
|
|
77
|
-
virtualElementContainer: 'e-list-virtualcontainer'
|
|
77
|
+
virtualElementContainer: 'e-list-virtualcontainer',
|
|
78
|
+
listTemplate: 'e-listview-template'
|
|
78
79
|
};
|
|
79
80
|
var LISTVIEW_TEMPLATE_PROPERTY = 'Template';
|
|
80
81
|
var LISTVIEW_GROUPTEMPLATE_PROPERTY = 'GroupTemplate';
|
|
@@ -467,6 +468,12 @@ var ListView = /** @class */ (function (_super) {
|
|
|
467
468
|
var frameElement_1 = checkboxElement.querySelector('.' + classNames.checkboxIcon);
|
|
468
469
|
args.item.classList.add(classNames.itemCheckList);
|
|
469
470
|
args.item.firstElementChild.classList.add(classNames.checkbox);
|
|
471
|
+
if (this.template && this.element) {
|
|
472
|
+
addClass([this.element], classNames.listTemplate);
|
|
473
|
+
}
|
|
474
|
+
else if (this.template === null && this.element && this.element.classList && this.element.classList.contains('e-listview-template')) {
|
|
475
|
+
removeClass([this.element], classNames.listTemplate);
|
|
476
|
+
}
|
|
470
477
|
if (typeof this.dataSource[0] !== 'string' && typeof this.dataSource[0] !== 'number') {
|
|
471
478
|
fieldData_1 = getFieldValues(args.curData, this.listBaseOption.fields);
|
|
472
479
|
if (this.enablePersistence && !isNullOrUndefined(this.selectedId)) {
|
|
@@ -355,6 +355,10 @@
|
|
|
355
355
|
text-overflow: ellipsis;
|
|
356
356
|
white-space: nowrap;
|
|
357
357
|
}
|
|
358
|
+
.e-listview.e-list-template .e-list-item.e-focused .e-list-wrapper.e-list-multi-line .e-list-item-header,
|
|
359
|
+
.e-listview.e-list-template .e-list-item.e-focused .e-list-wrapper.e-list-multi-line .e-list-content {
|
|
360
|
+
color: var(--color-sf-content-text-color-selected);
|
|
361
|
+
}
|
|
358
362
|
.e-listview.e-list-template .e-list-item.e-hover .e-list-item-header, .e-listview.e-list-template .e-list-item.e-hover .e-list-content {
|
|
359
363
|
color: var(--color-sf-content-text-color-hover);
|
|
360
364
|
}
|
package/styles/bootstrap5.3.css
CHANGED
|
@@ -355,6 +355,10 @@
|
|
|
355
355
|
text-overflow: ellipsis;
|
|
356
356
|
white-space: nowrap;
|
|
357
357
|
}
|
|
358
|
+
.e-listview.e-list-template .e-list-item.e-focused .e-list-wrapper.e-list-multi-line .e-list-item-header,
|
|
359
|
+
.e-listview.e-list-template .e-list-item.e-focused .e-list-wrapper.e-list-multi-line .e-list-content {
|
|
360
|
+
color: var(--color-sf-content-text-color-selected);
|
|
361
|
+
}
|
|
358
362
|
.e-listview.e-list-template .e-list-item.e-hover .e-list-item-header, .e-listview.e-list-template .e-list-item.e-hover .e-list-content {
|
|
359
363
|
color: var(--color-sf-content-text-color-hover);
|
|
360
364
|
}
|
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
.e-list-item {
|
|
265
265
|
&.e-focused {
|
|
266
266
|
.e-list-wrapper.e-list-multi-line {
|
|
267
|
-
@if ($skin-name == 'bootstrap5') {
|
|
267
|
+
@if ($skin-name == 'bootstrap5' or $skin-name == 'bootstrap5.3') {
|
|
268
268
|
.e-list-item-header,
|
|
269
269
|
.e-list-content {
|
|
270
270
|
color: $content-text-color-selected;
|
|
@@ -355,6 +355,10 @@
|
|
|
355
355
|
text-overflow: ellipsis;
|
|
356
356
|
white-space: nowrap;
|
|
357
357
|
}
|
|
358
|
+
.e-listview.e-list-template .e-list-item.e-focused .e-list-wrapper.e-list-multi-line .e-list-item-header,
|
|
359
|
+
.e-listview.e-list-template .e-list-item.e-focused .e-list-wrapper.e-list-multi-line .e-list-content {
|
|
360
|
+
color: var(--color-sf-content-text-color-selected);
|
|
361
|
+
}
|
|
358
362
|
.e-listview.e-list-template .e-list-item.e-hover .e-list-item-header, .e-listview.e-list-template .e-list-item.e-hover .e-list-content {
|
|
359
363
|
color: var(--color-sf-content-text-color-hover);
|
|
360
364
|
}
|
package/dist/ts/common/index.ts
DELETED
|
@@ -1,415 +0,0 @@
|
|
|
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;
|