@syncfusion/ej2-dropdowns 20.3.58 → 20.3.60
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/CHANGELOG.md +16 -0
- package/dist/ej2-dropdowns.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +72 -45
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +79 -47
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +2 -2
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/auto-complete/auto-complete-model.d.ts +1 -0
- package/src/auto-complete/auto-complete.d.ts +4 -3
- package/src/auto-complete/auto-complete.js +6 -4
- package/src/combo-box/combo-box.d.ts +4 -4
- package/src/combo-box/combo-box.js +12 -8
- package/src/common/incremental-search.d.ts +3 -4
- package/src/common/incremental-search.js +22 -7
- package/src/drop-down-base/drop-down-base.d.ts +1 -1
- package/src/drop-down-base/drop-down-base.js +13 -11
- package/src/drop-down-list/drop-down-list.d.ts +3 -3
- package/src/drop-down-list/drop-down-list.js +5 -5
- package/src/list-box/list-box.js +17 -8
- package/src/multi-select/multi-select.d.ts +4 -4
- package/src/multi-select/multi-select.js +4 -4
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.3.
|
|
3
|
+
* version : 20.3.60
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-dropdowns@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-dropdowns@20.3.
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@20.3.59",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-3KOrC1GdJj32XxkzIJxQd8zP9Dbp7L/0/AWOUu3LZF+4B+6Xther2bXQ6t1Gt4nstmFHbiXDrrTVE8YJbsYKUA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"/@syncfusion/ej2-spreadsheet",
|
|
34
34
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
35
35
|
],
|
|
36
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.3.
|
|
37
|
-
"_shasum": "
|
|
36
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.3.59.tgz",
|
|
37
|
+
"_shasum": "9a67584709f1877eda262c63bf59a2c61d33f8de",
|
|
38
38
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
39
39
|
"_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
|
|
40
40
|
"author": {
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"bundleDependencies": false,
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@syncfusion/ej2-base": "~20.3.56",
|
|
46
|
-
"@syncfusion/ej2-data": "~20.3.
|
|
46
|
+
"@syncfusion/ej2-data": "~20.3.60",
|
|
47
47
|
"@syncfusion/ej2-inputs": "~20.3.57",
|
|
48
48
|
"@syncfusion/ej2-lists": "~20.3.56",
|
|
49
|
-
"@syncfusion/ej2-navigations": "~20.3.
|
|
50
|
-
"@syncfusion/ej2-popups": "~20.3.
|
|
49
|
+
"@syncfusion/ej2-navigations": "~20.3.60",
|
|
50
|
+
"@syncfusion/ej2-popups": "~20.3.60"
|
|
51
51
|
},
|
|
52
52
|
"deprecated": false,
|
|
53
53
|
"description": "Essential JS 2 DropDown Components",
|
|
@@ -72,6 +72,6 @@
|
|
|
72
72
|
"module": "./index.js",
|
|
73
73
|
"name": "@syncfusion/ej2-dropdowns",
|
|
74
74
|
"typings": "index.d.ts",
|
|
75
|
-
"version": "20.3.
|
|
75
|
+
"version": "20.3.60",
|
|
76
76
|
"sideEffects": false
|
|
77
77
|
}
|
|
@@ -14,6 +14,7 @@ export interface AutoCompleteModel extends ComboBoxModel{
|
|
|
14
14
|
* * groupBy - Group the list items with it's related items by mapping groupBy field
|
|
15
15
|
*
|
|
16
16
|
* {% codeBlock src='autocomplete/fields/index.md' %}{% endcodeBlock %}
|
|
17
|
+
*
|
|
17
18
|
* > For more details about the field mapping refer to [`Data binding`](../../auto-complete/data-binding) documentation.
|
|
18
19
|
*
|
|
19
20
|
* @default { value: null, iconCss: null, groupBy: null}
|
|
@@ -29,6 +29,7 @@ export declare class AutoComplete extends ComboBox {
|
|
|
29
29
|
* * groupBy - Group the list items with it's related items by mapping groupBy field
|
|
30
30
|
*
|
|
31
31
|
* {% codeBlock src='autocomplete/fields/index.md' %}{% endcodeBlock %}
|
|
32
|
+
*
|
|
32
33
|
* > For more details about the field mapping refer to [`Data binding`](../../auto-complete/data-binding) documentation.
|
|
33
34
|
*
|
|
34
35
|
* @default { value: null, iconCss: null, groupBy: null}
|
|
@@ -216,9 +217,9 @@ export declare class AutoComplete extends ComboBox {
|
|
|
216
217
|
/**
|
|
217
218
|
* To filter the data from given data source by using query
|
|
218
219
|
*
|
|
219
|
-
* @param
|
|
220
|
-
* @param
|
|
221
|
-
* @param
|
|
220
|
+
* @param {Object[] | DataManager } dataSource - Set the data source to filter.
|
|
221
|
+
* @param {Query} query - Specify the query to filter the data.
|
|
222
|
+
* @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
|
|
222
223
|
* @returns {void}
|
|
223
224
|
|
|
224
225
|
*/
|
|
@@ -140,9 +140,9 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
140
140
|
/**
|
|
141
141
|
* To filter the data from given data source by using query
|
|
142
142
|
*
|
|
143
|
-
* @param
|
|
144
|
-
* @param
|
|
145
|
-
* @param
|
|
143
|
+
* @param {Object[] | DataManager } dataSource - Set the data source to filter.
|
|
144
|
+
* @param {Query} query - Specify the query to filter the data.
|
|
145
|
+
* @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
|
|
146
146
|
* @returns {void}
|
|
147
147
|
|
|
148
148
|
*/
|
|
@@ -182,7 +182,9 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
182
182
|
AutoComplete.prototype.postBackAction = function () {
|
|
183
183
|
if (this.autofill && !isNullOrUndefined(this.liCollections[0]) && this.searchList) {
|
|
184
184
|
var items = [this.liCollections[0]];
|
|
185
|
-
var
|
|
185
|
+
var dataSource = this.listData;
|
|
186
|
+
var type = this.typeOfData(dataSource).typeof;
|
|
187
|
+
var searchItem = Search(this.inputElement.value, items, 'StartsWith', this.ignoreCase, dataSource, this.fields, type);
|
|
186
188
|
this.searchList = false;
|
|
187
189
|
if (!isNullOrUndefined(searchItem.item)) {
|
|
188
190
|
_super.prototype.setAutoFill.call(this, this.liCollections[0], true);
|
|
@@ -318,7 +318,7 @@ export declare class ComboBox extends DropDownList {
|
|
|
318
318
|
* Adds a new item to the combobox popup list. By default, new item appends to the list as the last item,
|
|
319
319
|
* but you can insert based on the index parameter.
|
|
320
320
|
*
|
|
321
|
-
* @param
|
|
321
|
+
* @param { Object[] } items - Specifies an array of JSON data or a JSON data.
|
|
322
322
|
* @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.
|
|
323
323
|
* @returns {void}
|
|
324
324
|
|
|
@@ -331,9 +331,9 @@ export declare class ComboBox extends DropDownList {
|
|
|
331
331
|
/**
|
|
332
332
|
* To filter the data from given data source by using query
|
|
333
333
|
*
|
|
334
|
-
* @param
|
|
335
|
-
* @param
|
|
336
|
-
* @param
|
|
334
|
+
* @param {Object[] | DataManager } dataSource - Set the data source to filter.
|
|
335
|
+
* @param {Query} query - Specify the query to filter the data.
|
|
336
|
+
* @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
|
|
337
337
|
* @returns {void}
|
|
338
338
|
|
|
339
339
|
*/
|
|
@@ -234,7 +234,9 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
234
234
|
if ((Browser.isDevice && !this.isDropDownClick || !Browser.isDevice) &&
|
|
235
235
|
!isNullOrUndefined(this.liCollections) && this.liCollections.length > 0) {
|
|
236
236
|
var inputValue = this.inputElement.value;
|
|
237
|
-
var
|
|
237
|
+
var dataSource = this.sortedData;
|
|
238
|
+
var type = this.typeOfData(dataSource).typeof;
|
|
239
|
+
var activeItem = Search(inputValue, this.liCollections, this.filterType, true, dataSource, this.fields, type);
|
|
238
240
|
var activeElement = activeItem.item;
|
|
239
241
|
if (!isNullOrUndefined(activeElement)) {
|
|
240
242
|
var count = this.getIndexByValue(activeElement.getAttribute('data-value')) - 1;
|
|
@@ -275,7 +277,7 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
275
277
|
this.itemData = this.getDataByValue(this.value);
|
|
276
278
|
var dataItem = this.getItemData();
|
|
277
279
|
if (!(this.allowCustom && isNullOrUndefined(dataItem.value) && isNullOrUndefined(dataItem.text))) {
|
|
278
|
-
this.setProperties({ 'value': dataItem.value
|
|
280
|
+
this.setProperties({ 'value': dataItem.value }, !this.allowCustom);
|
|
279
281
|
}
|
|
280
282
|
};
|
|
281
283
|
/**
|
|
@@ -635,7 +637,7 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
635
637
|
* Adds a new item to the combobox popup list. By default, new item appends to the list as the last item,
|
|
636
638
|
* but you can insert based on the index parameter.
|
|
637
639
|
*
|
|
638
|
-
* @param
|
|
640
|
+
* @param { Object[] } items - Specifies an array of JSON data or a JSON data.
|
|
639
641
|
* @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.
|
|
640
642
|
* @returns {void}
|
|
641
643
|
|
|
@@ -646,9 +648,9 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
646
648
|
/**
|
|
647
649
|
* To filter the data from given data source by using query
|
|
648
650
|
*
|
|
649
|
-
* @param
|
|
650
|
-
* @param
|
|
651
|
-
* @param
|
|
651
|
+
* @param {Object[] | DataManager } dataSource - Set the data source to filter.
|
|
652
|
+
* @param {Query} query - Specify the query to filter the data.
|
|
653
|
+
* @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
|
|
652
654
|
* @returns {void}
|
|
653
655
|
|
|
654
656
|
*/
|
|
@@ -695,10 +697,12 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
695
697
|
return;
|
|
696
698
|
}
|
|
697
699
|
if (this.getModuleName() === 'combobox' && this.inputElement.value.trim() !== '') {
|
|
698
|
-
var
|
|
700
|
+
var dataSource = this.sortedData;
|
|
701
|
+
var type = this.typeOfData(dataSource).typeof;
|
|
702
|
+
var searchItem = Search(this.inputElement.value, this.liCollections, 'Equal', true, dataSource, this.fields, type);
|
|
699
703
|
this.selectedLI = searchItem.item;
|
|
700
704
|
if (isNullOrUndefined(searchItem.index)) {
|
|
701
|
-
searchItem.index = Search(this.inputElement.value, this.liCollections, 'StartsWith', true).index;
|
|
705
|
+
searchItem.index = Search(this.inputElement.value, this.liCollections, 'StartsWith', true, dataSource, this.fields, type).index;
|
|
702
706
|
}
|
|
703
707
|
this.activeIndex = searchItem.index;
|
|
704
708
|
if (!isNullOrUndefined(this.selectedLI)) {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IncrementalSearch module file
|
|
3
|
-
*/
|
|
4
1
|
export declare type SearchType = 'StartsWith' | 'Equal' | 'EndsWith' | 'Contains';
|
|
5
2
|
/**
|
|
6
3
|
* Search and focus the list item based on key code matches with list text content
|
|
@@ -23,7 +20,9 @@ export declare function incrementalSearch(keyCode: number, items: HTMLElement[],
|
|
|
23
20
|
* @param {boolean} ignoreCase - Specifies the case sensitive option for search operation.
|
|
24
21
|
* @returns {Element | number} Returns the search matched items.
|
|
25
22
|
*/
|
|
26
|
-
export declare function Search(inputVal: string, items: HTMLElement[], searchType: SearchType, ignoreCase?: boolean
|
|
23
|
+
export declare function Search(inputVal: string, items: HTMLElement[], searchType: SearchType, ignoreCase?: boolean, dataSource?: string[] | number[] | boolean[] | {
|
|
24
|
+
[key: string]: Object;
|
|
25
|
+
}[], fields?: any, type?: string): {
|
|
27
26
|
[key: string]: Element | number;
|
|
28
27
|
};
|
|
29
28
|
export declare function escapeCharRegExp(value: string): string;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IncrementalSearch module file
|
|
3
|
-
*/
|
|
4
1
|
var queryString = '';
|
|
5
2
|
var prevString = '';
|
|
6
3
|
var matches = [];
|
|
@@ -73,7 +70,7 @@ export function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, ele
|
|
|
73
70
|
* @param {boolean} ignoreCase - Specifies the case sensitive option for search operation.
|
|
74
71
|
* @returns {Element | number} Returns the search matched items.
|
|
75
72
|
*/
|
|
76
|
-
export function Search(inputVal, items, searchType, ignoreCase) {
|
|
73
|
+
export function Search(inputVal, items, searchType, ignoreCase, dataSource, fields, type) {
|
|
77
74
|
var listItems = items;
|
|
78
75
|
ignoreCase = ignoreCase !== undefined && ignoreCase !== null ? ignoreCase : true;
|
|
79
76
|
var itemData = { item: null, index: null };
|
|
@@ -81,14 +78,32 @@ export function Search(inputVal, items, searchType, ignoreCase) {
|
|
|
81
78
|
var strLength = inputVal.length;
|
|
82
79
|
var queryStr = ignoreCase ? inputVal.toLocaleLowerCase() : inputVal;
|
|
83
80
|
queryStr = escapeCharRegExp(queryStr);
|
|
84
|
-
|
|
81
|
+
var _loop_1 = function (i, itemsData) {
|
|
85
82
|
var item = itemsData[i];
|
|
86
|
-
var text =
|
|
83
|
+
var text = void 0;
|
|
84
|
+
var filterValue;
|
|
85
|
+
if (items && dataSource) {
|
|
86
|
+
var checkField_1 = item;
|
|
87
|
+
var fieldValue_1 = fields.text.split('.');
|
|
88
|
+
dataSource.filter(function (data) {
|
|
89
|
+
Array.prototype.slice.call(fieldValue_1).forEach(function (value) {
|
|
90
|
+
if (type === 'object' && checkField_1.textContent.toString().indexOf(data[value]) !== -1 && checkField_1.getAttribute('data-value') === data[fields.value] || type === 'string' && checkField_1.textContent.toString().indexOf(data) !== -1) {
|
|
91
|
+
filterValue = type === 'object' ? data[value] : data;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
text = dataSource && filterValue ? (ignoreCase ? filterValue.toLocaleLowerCase() : filterValue).replace(/^\s+|\s+$/g, '') : (ignoreCase ? item.textContent.toLocaleLowerCase() : item.textContent).replace(/^\s+|\s+$/g, '');
|
|
87
97
|
if ((searchType === 'Equal' && text === queryStr) || (searchType === 'StartsWith' && text.substr(0, strLength) === queryStr) || (searchType === 'EndsWith' && text.substr(text.length - queryStr.length) === queryStr) || (searchType === 'Contains' && new RegExp(queryStr, "g").test(text))) {
|
|
88
98
|
itemData.item = item;
|
|
89
99
|
itemData.index = i;
|
|
90
|
-
return { item: item, index: i };
|
|
100
|
+
return { value: { item: item, index: i } };
|
|
91
101
|
}
|
|
102
|
+
};
|
|
103
|
+
for (var i = 0, itemsData = listItems; i < itemsData.length; i++) {
|
|
104
|
+
var state_1 = _loop_1(i, itemsData);
|
|
105
|
+
if (typeof state_1 === "object")
|
|
106
|
+
return state_1.value;
|
|
92
107
|
}
|
|
93
108
|
return itemData;
|
|
94
109
|
}
|
|
@@ -637,7 +637,7 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
|
|
|
637
637
|
* Adds a new item to the popup list. By default, new item appends to the list as the last item,
|
|
638
638
|
* but you can insert based on the index parameter.
|
|
639
639
|
*
|
|
640
|
-
* @param
|
|
640
|
+
* @param { Object[] } items - Specifies an array of JSON data or a JSON data.
|
|
641
641
|
* @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.
|
|
642
642
|
* @returns {void}
|
|
643
643
|
|
|
@@ -705,18 +705,20 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
705
705
|
return extend({}, options, fields, true);
|
|
706
706
|
};
|
|
707
707
|
DropDownBase.prototype.setFloatingHeader = function (e) {
|
|
708
|
-
if (isNullOrUndefined(this.
|
|
709
|
-
this.fixedHeaderElement
|
|
710
|
-
|
|
711
|
-
this.
|
|
708
|
+
if (!isNullOrUndefined(this.list) && !this.list.classList.contains(dropDownBaseClasses.noData)) {
|
|
709
|
+
if (isNullOrUndefined(this.fixedHeaderElement)) {
|
|
710
|
+
this.fixedHeaderElement = this.createElement('div', { className: dropDownBaseClasses.fixedHead });
|
|
711
|
+
if (!this.list.querySelector('li').classList.contains(dropDownBaseClasses.group)) {
|
|
712
|
+
this.fixedHeaderElement.style.display = 'none';
|
|
713
|
+
}
|
|
714
|
+
prepend([this.fixedHeaderElement], this.list);
|
|
715
|
+
this.setFixedHeader();
|
|
712
716
|
}
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
this.setFixedHeader();
|
|
717
|
+
if (!isNullOrUndefined(this.fixedHeaderElement) && this.fixedHeaderElement.style.zIndex === '0') {
|
|
718
|
+
this.setFixedHeader();
|
|
719
|
+
}
|
|
720
|
+
this.scrollStop(e);
|
|
718
721
|
}
|
|
719
|
-
this.scrollStop(e);
|
|
720
722
|
};
|
|
721
723
|
DropDownBase.prototype.scrollStop = function (e) {
|
|
722
724
|
var target = !isNullOrUndefined(e) ? e.target : this.list;
|
|
@@ -1039,7 +1041,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1039
1041
|
* Adds a new item to the popup list. By default, new item appends to the list as the last item,
|
|
1040
1042
|
* but you can insert based on the index parameter.
|
|
1041
1043
|
*
|
|
1042
|
-
* @param
|
|
1044
|
+
* @param { Object[] } items - Specifies an array of JSON data or a JSON data.
|
|
1043
1045
|
* @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.
|
|
1044
1046
|
* @returns {void}
|
|
1045
1047
|
|
|
@@ -453,9 +453,9 @@ export declare class DropDownList extends DropDownBase implements IInput {
|
|
|
453
453
|
/**
|
|
454
454
|
* To filter the data from given data source by using query
|
|
455
455
|
*
|
|
456
|
-
* @param
|
|
457
|
-
* @param
|
|
458
|
-
* @param
|
|
456
|
+
* @param {Object[] | DataManager } dataSource - Set the data source to filter.
|
|
457
|
+
* @param {Query} query - Specify the query to filter the data.
|
|
458
|
+
* @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
|
|
459
459
|
* @returns {void}
|
|
460
460
|
|
|
461
461
|
*/
|
|
@@ -1022,10 +1022,10 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1022
1022
|
attributes(this.targetElement(), { 'aria-describedby': this.inputElement.id != '' ? this.inputElement.id : this.element.id });
|
|
1023
1023
|
this.targetElement().removeAttribute('aria-live');
|
|
1024
1024
|
}
|
|
1025
|
-
if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-item-focus')[0])) {
|
|
1025
|
+
if (this.isPopupOpen && !isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-item-focus')[0])) {
|
|
1026
1026
|
attributes(this.targetElement(), { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-item-focus')[0].id });
|
|
1027
1027
|
}
|
|
1028
|
-
else if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-active')[0])) {
|
|
1028
|
+
else if (this.isPopupOpen && !isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-active')[0])) {
|
|
1029
1029
|
attributes(this.targetElement(), { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-active')[0].id });
|
|
1030
1030
|
}
|
|
1031
1031
|
};
|
|
@@ -1345,9 +1345,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1345
1345
|
/**
|
|
1346
1346
|
* To filter the data from given data source by using query
|
|
1347
1347
|
*
|
|
1348
|
-
* @param
|
|
1349
|
-
* @param
|
|
1350
|
-
* @param
|
|
1348
|
+
* @param {Object[] | DataManager } dataSource - Set the data source to filter.
|
|
1349
|
+
* @param {Query} query - Specify the query to filter the data.
|
|
1350
|
+
* @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
|
|
1351
1351
|
* @returns {void}
|
|
1352
1352
|
|
|
1353
1353
|
*/
|
package/src/list-box/list-box.js
CHANGED
|
@@ -1139,12 +1139,12 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
1139
1139
|
if (li && li.parentElement) {
|
|
1140
1140
|
currSelIdx = [].slice.call(li.parentElement.children).indexOf(li);
|
|
1141
1141
|
if (!this.selectionSettings.showCheckbox) {
|
|
1142
|
-
if ((e.ctrlKey || Browser.isDevice) && this.isSelected(li)) {
|
|
1142
|
+
if ((e.ctrlKey || e.metaKey || Browser.isDevice) && this.isSelected(li)) {
|
|
1143
1143
|
li.classList.remove(cssClass.selected);
|
|
1144
1144
|
li.removeAttribute('aria-selected');
|
|
1145
1145
|
isSelect = false;
|
|
1146
1146
|
}
|
|
1147
|
-
else if (!(this.selectionSettings.mode === 'Multiple' && (e.ctrlKey || Browser.isDevice))) {
|
|
1147
|
+
else if (!(this.selectionSettings.mode === 'Multiple' && (e.ctrlKey || e.metaKey || Browser.isDevice))) {
|
|
1148
1148
|
this.getSelectedItems().forEach(function (ele) {
|
|
1149
1149
|
ele.removeAttribute('aria-selected');
|
|
1150
1150
|
});
|
|
@@ -1616,12 +1616,21 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
1616
1616
|
}
|
|
1617
1617
|
return listObj;
|
|
1618
1618
|
};
|
|
1619
|
-
ListBox.prototype.getGrabbedItems = function () {
|
|
1619
|
+
ListBox.prototype.getGrabbedItems = function (args) {
|
|
1620
|
+
var grabbItems = false;
|
|
1620
1621
|
for (var i = 0; i < this.value.length; i++) {
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1622
|
+
if (this.value[i] === this.getFormattedValue(args.target.getAttribute('data-value'))) {
|
|
1623
|
+
grabbItems = true;
|
|
1624
|
+
break;
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
if (grabbItems) {
|
|
1628
|
+
for (var i = 0; i < this.value.length; i++) {
|
|
1629
|
+
var liColl = this.list.querySelectorAll('[aria-selected="true"]');
|
|
1630
|
+
for (var j = 0; j < liColl.length; j++) {
|
|
1631
|
+
if (this.value[i] === this.getFormattedValue(liColl[j].getAttribute('data-value'))) {
|
|
1632
|
+
liColl[j].classList.add('e-grabbed');
|
|
1633
|
+
}
|
|
1625
1634
|
}
|
|
1626
1635
|
}
|
|
1627
1636
|
}
|
|
@@ -1635,7 +1644,7 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
1635
1644
|
return elems;
|
|
1636
1645
|
};
|
|
1637
1646
|
ListBox.prototype.getDragArgs = function (args, isDragEnd) {
|
|
1638
|
-
var elems = this.getGrabbedItems();
|
|
1647
|
+
var elems = this.getGrabbedItems(args);
|
|
1639
1648
|
if (elems.length) {
|
|
1640
1649
|
if (isDragEnd) {
|
|
1641
1650
|
elems.push(args.target);
|
|
@@ -611,9 +611,9 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
611
611
|
/**
|
|
612
612
|
* To filter the multiselect data from given data source by using query
|
|
613
613
|
*
|
|
614
|
-
* @param
|
|
615
|
-
* @param
|
|
616
|
-
* @param
|
|
614
|
+
* @param {Object[] | DataManager } dataSource - Set the data source to filter.
|
|
615
|
+
* @param {Query} query - Specify the query to filter the data.
|
|
616
|
+
* @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
|
|
617
617
|
* @returns {void}
|
|
618
618
|
*/
|
|
619
619
|
filter(dataSource: {
|
|
@@ -805,7 +805,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
805
805
|
* Adds a new item to the multiselect popup list. By default, new item appends to the list as the last item,
|
|
806
806
|
* but you can insert based on the index parameter.
|
|
807
807
|
*
|
|
808
|
-
* @param
|
|
808
|
+
* @param { Object[] } items - Specifies an array of JSON data or a JSON data.
|
|
809
809
|
* @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.
|
|
810
810
|
* @returns {void}
|
|
811
811
|
*/
|
|
@@ -637,9 +637,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
637
637
|
/**
|
|
638
638
|
* To filter the multiselect data from given data source by using query
|
|
639
639
|
*
|
|
640
|
-
* @param
|
|
641
|
-
* @param
|
|
642
|
-
* @param
|
|
640
|
+
* @param {Object[] | DataManager } dataSource - Set the data source to filter.
|
|
641
|
+
* @param {Query} query - Specify the query to filter the data.
|
|
642
|
+
* @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
|
|
643
643
|
* @returns {void}
|
|
644
644
|
*/
|
|
645
645
|
MultiSelect.prototype.filter = function (dataSource, query, fields) {
|
|
@@ -3647,7 +3647,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3647
3647
|
* Adds a new item to the multiselect popup list. By default, new item appends to the list as the last item,
|
|
3648
3648
|
* but you can insert based on the index parameter.
|
|
3649
3649
|
*
|
|
3650
|
-
* @param
|
|
3650
|
+
* @param { Object[] } items - Specifies an array of JSON data or a JSON data.
|
|
3651
3651
|
* @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.
|
|
3652
3652
|
* @returns {void}
|
|
3653
3653
|
*/
|