@syncfusion/ej2-dropdowns 29.1.41 → 29.2.5
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-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 +275 -128
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +283 -132
- 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 +12 -12
- package/src/auto-complete/auto-complete.d.ts +1 -0
- package/src/auto-complete/auto-complete.js +9 -1
- package/src/combo-box/combo-box-model.d.ts +1 -9
- package/src/combo-box/combo-box.d.ts +0 -7
- package/src/combo-box/combo-box.js +22 -17
- package/src/common/virtual-scroll.js +8 -3
- package/src/drop-down-base/drop-down-base.d.ts +5 -1
- package/src/drop-down-base/drop-down-base.js +71 -10
- package/src/drop-down-list/drop-down-list-model.d.ts +7 -0
- package/src/drop-down-list/drop-down-list.d.ts +7 -0
- package/src/drop-down-list/drop-down-list.js +42 -24
- package/src/drop-down-tree/drop-down-tree.d.ts +1 -0
- package/src/drop-down-tree/drop-down-tree.js +14 -11
- package/src/mention/mention-model.d.ts +7 -0
- package/src/mention/mention.d.ts +8 -0
- package/src/mention/mention.js +29 -16
- package/src/multi-select/multi-select-model.d.ts +7 -0
- package/src/multi-select/multi-select.d.ts +9 -0
- package/src/multi-select/multi-select.js +88 -50
- package/styles/bds-lite.css +1 -1
- package/styles/bds.css +1 -1
- package/styles/multi-select/_bds-definition.scss +1 -0
- package/styles/multi-select/_layout.scss +6 -1
- package/styles/multi-select/_tailwind-definition.scss +1 -0
- package/styles/multi-select/bds.css +1 -1
- package/styles/multi-select/tailwind-dark.css +1 -1
- package/styles/multi-select/tailwind.css +1 -1
- package/styles/tailwind-dark-lite.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind-lite.css +1 -1
- package/styles/tailwind.css +1 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 29.
|
|
3
|
+
* version : 29.2.5
|
|
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,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-dropdowns@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-dropdowns@29.
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@29.2.4",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-2/LXQ3Z+oxZ7gXjg7Byi0b4jeKBHzYa8+17CwtLhfO2nX2RP61lASiEmN0zPvK4J4i8TrY2ZCNoJAALw0V7z/w==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"/@syncfusion/ej2-spreadsheet",
|
|
37
37
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
38
38
|
],
|
|
39
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-29.
|
|
40
|
-
"_shasum": "
|
|
39
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-29.2.4.tgz",
|
|
40
|
+
"_shasum": "4272fdd6205a2045e1a05b3f4045e5e6647853d0",
|
|
41
41
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
42
42
|
"_where": "/jenkins/workspace/elease-automation_release_29.1.1/packages/included",
|
|
43
43
|
"author": {
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
},
|
|
46
46
|
"bundleDependencies": false,
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@syncfusion/ej2-base": "~29.
|
|
49
|
-
"@syncfusion/ej2-data": "~29.
|
|
50
|
-
"@syncfusion/ej2-inputs": "~29.
|
|
51
|
-
"@syncfusion/ej2-lists": "~29.
|
|
52
|
-
"@syncfusion/ej2-navigations": "~29.
|
|
53
|
-
"@syncfusion/ej2-notifications": "~29.
|
|
54
|
-
"@syncfusion/ej2-popups": "~29.
|
|
48
|
+
"@syncfusion/ej2-base": "~29.2.4",
|
|
49
|
+
"@syncfusion/ej2-data": "~29.2.4",
|
|
50
|
+
"@syncfusion/ej2-inputs": "~29.2.5",
|
|
51
|
+
"@syncfusion/ej2-lists": "~29.2.4",
|
|
52
|
+
"@syncfusion/ej2-navigations": "~29.2.5",
|
|
53
|
+
"@syncfusion/ej2-notifications": "~29.2.4",
|
|
54
|
+
"@syncfusion/ej2-popups": "~29.2.4"
|
|
55
55
|
},
|
|
56
56
|
"deprecated": false,
|
|
57
57
|
"description": "Essential JS 2 DropDown Components",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"module": "./index.js",
|
|
77
77
|
"name": "@syncfusion/ej2-dropdowns",
|
|
78
78
|
"typings": "index.d.ts",
|
|
79
|
-
"version": "29.
|
|
79
|
+
"version": "29.2.5",
|
|
80
80
|
"sideEffects": false,
|
|
81
81
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
82
82
|
}
|
|
@@ -217,6 +217,7 @@ export declare class AutoComplete extends ComboBox {
|
|
|
217
217
|
protected getNgDirective(): string;
|
|
218
218
|
protected getQuery(query: Query): Query;
|
|
219
219
|
protected searchLists(e: KeyboardEventArgs | MouseEvent): void;
|
|
220
|
+
protected performFiltering(e: KeyboardEventArgs | MouseEvent): void;
|
|
220
221
|
/**
|
|
221
222
|
* To filter the data from given data source by using query
|
|
222
223
|
*
|
|
@@ -163,7 +163,6 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
163
163
|
return filterQuery;
|
|
164
164
|
};
|
|
165
165
|
AutoComplete.prototype.searchLists = function (e) {
|
|
166
|
-
var _this_1 = this;
|
|
167
166
|
this.isTyped = true;
|
|
168
167
|
this.isDataFetched = this.isSelectCustom = false;
|
|
169
168
|
this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
|
|
@@ -181,6 +180,15 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
181
180
|
this.isSelected = false;
|
|
182
181
|
this.activeIndex = null;
|
|
183
182
|
this.isRequesting = false;
|
|
183
|
+
if (this.queryString !== '' && this.debounceDelay > 0) {
|
|
184
|
+
this.debouncedFiltering(e, this.debounceDelay);
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
this.performFiltering(e);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
AutoComplete.prototype.performFiltering = function (e) {
|
|
191
|
+
var _this_1 = this;
|
|
184
192
|
var eventArgs = {
|
|
185
193
|
preventDefaultAction: false,
|
|
186
194
|
text: this.filterInput.value,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventHandler, Property, Event, EmitType, addClass, Browser, KeyboardEventArgs, removeClass, detach } from '@syncfusion/ej2-base';import { isNullOrUndefined, NotifyPropertyChanges, getValue, setValue } from '@syncfusion/ej2-base';import { DropDownList, dropDownListClasses } from '../drop-down-list/drop-down-list';import { FilteringEventArgs } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { Search } from '../common/incremental-search';import { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { Input, InputObject, FloatLabelType } from '@syncfusion/ej2-inputs';import { DataManager, DataOptions, Predicate, Query } from '@syncfusion/ej2-data';
|
|
1
|
+
import { EventHandler, Property, Event, EmitType, addClass, Browser, KeyboardEventArgs, removeClass, detach } from '@syncfusion/ej2-base';import { isNullOrUndefined, NotifyPropertyChanges, getValue, setValue } from '@syncfusion/ej2-base';import { DropDownList, dropDownListClasses } from '../drop-down-list/drop-down-list';import { FilteringEventArgs, ResultData } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { Search } from '../common/incremental-search';import { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { Input, InputObject, FloatLabelType } from '@syncfusion/ej2-inputs';import { DataManager, DataOptions, Predicate, Query } from '@syncfusion/ej2-data';
|
|
2
2
|
import {CustomValueSpecifierEventArgs} from "./combo-box";
|
|
3
3
|
import {DropDownListModel} from "../drop-down-list/drop-down-list-model";
|
|
4
4
|
|
|
@@ -86,14 +86,6 @@ export interface ComboBoxModel extends DropDownListModel{
|
|
|
86
86
|
*/
|
|
87
87
|
showClearButton?: boolean;
|
|
88
88
|
|
|
89
|
-
/**
|
|
90
|
-
* Enable or disable rendering component in right to left direction.
|
|
91
|
-
*
|
|
92
|
-
* @default false
|
|
93
|
-
|
|
94
|
-
*/
|
|
95
|
-
enableRtl?: boolean;
|
|
96
|
-
|
|
97
89
|
/**
|
|
98
90
|
* Triggers on set a
|
|
99
91
|
* [`custom value`](../../combo-box/getting-started#custom-values) to this component.
|
|
@@ -96,13 +96,6 @@ export declare class ComboBox extends DropDownList {
|
|
|
96
96
|
* @default true
|
|
97
97
|
*/
|
|
98
98
|
showClearButton: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Enable or disable rendering component in right to left direction.
|
|
101
|
-
*
|
|
102
|
-
* @default false
|
|
103
|
-
|
|
104
|
-
*/
|
|
105
|
-
enableRtl: boolean;
|
|
106
99
|
/**
|
|
107
100
|
* Triggers on set a
|
|
108
101
|
* [`custom value`](../../combo-box/getting-started#custom-values) to this component.
|
|
@@ -179,6 +179,7 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
179
179
|
}
|
|
180
180
|
};
|
|
181
181
|
ComboBox.prototype.updateValues = function () {
|
|
182
|
+
var _this = this;
|
|
182
183
|
if (this.fields.disabled) {
|
|
183
184
|
if (this.value != null) {
|
|
184
185
|
this.value = !this.isDisableItemValue(this.value) ? this.value : null;
|
|
@@ -199,19 +200,22 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
199
200
|
var fields = (this.fields.value) ? this.fields.value : '';
|
|
200
201
|
var currentValue_1 = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
|
|
201
202
|
if (this.dataSource instanceof DataManager) {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
203
|
+
this.dataSource.executeQuery(new Query().where(new Predicate(fields, 'equal', currentValue_1)))
|
|
204
|
+
.then(function (e) {
|
|
205
|
+
if (e.result.length > 0) {
|
|
206
|
+
_this.itemData = e.result[0];
|
|
207
|
+
var dataItem = _this.getItemData();
|
|
208
|
+
var value = _this.allowObjectBinding ?
|
|
209
|
+
_this.getDataByValue(dataItem.value) : dataItem.value;
|
|
210
|
+
if ((_this.value === dataItem.value && _this.text !== dataItem.text) ||
|
|
211
|
+
(_this.value !== dataItem.value && _this.text === dataItem.text)) {
|
|
212
|
+
_this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
|
|
213
|
+
}
|
|
213
214
|
}
|
|
214
|
-
|
|
215
|
+
else {
|
|
216
|
+
_this.valueMuteChange(null);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
215
219
|
}
|
|
216
220
|
else {
|
|
217
221
|
var getItem = new DataManager(this.dataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', currentValue_1)));
|
|
@@ -239,7 +243,8 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
239
243
|
(this.allowCustom && this.enableVirtualization && !doesItemExist)) {
|
|
240
244
|
this.valueMuteChange(this.value);
|
|
241
245
|
}
|
|
242
|
-
else if (!this.enableVirtualization || (this.enableVirtualization && !
|
|
246
|
+
else if (!this.enableVirtualization || (this.enableVirtualization && !(this.dataSource instanceof DataManager)
|
|
247
|
+
&& !doesItemExist)) {
|
|
243
248
|
this.valueMuteChange(null);
|
|
244
249
|
}
|
|
245
250
|
}
|
|
@@ -403,7 +408,10 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
403
408
|
}
|
|
404
409
|
}
|
|
405
410
|
var activeElement = activeItem.item;
|
|
406
|
-
|
|
411
|
+
var dataItem_1 = this.getItemData();
|
|
412
|
+
if ((!isNullOrUndefined(activeElement) && !this.enableVirtualization) || (this.enableVirtualization &&
|
|
413
|
+
this.isTyped && isNullOrUndefined(dataItem_1) && isNullOrUndefined(dataItem_1.value) &&
|
|
414
|
+
dataItem_1.value.toString() === activeElement.getAttribute('data-value').toString())) {
|
|
407
415
|
var count = this.getIndexByValue(activeElement.getAttribute('data-value')) - 1;
|
|
408
416
|
var height = parseInt(getComputedStyle(this.liCollections[0], null).getPropertyValue('height'), 10);
|
|
409
417
|
if (!isNaN(height) && this.getModuleName() !== 'autocomplete') {
|
|
@@ -1028,9 +1036,6 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
1028
1036
|
__decorate([
|
|
1029
1037
|
Property(true)
|
|
1030
1038
|
], ComboBox.prototype, "showClearButton", void 0);
|
|
1031
|
-
__decorate([
|
|
1032
|
-
Property(false)
|
|
1033
|
-
], ComboBox.prototype, "enableRtl", void 0);
|
|
1034
1039
|
__decorate([
|
|
1035
1040
|
Event()
|
|
1036
1041
|
], ComboBox.prototype, "customValueSpecifier", void 0);
|
|
@@ -286,6 +286,7 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
286
286
|
query = query.skip(this.parent.viewPortInfo.startIndex);
|
|
287
287
|
}
|
|
288
288
|
this.parent.setCurrentView = false;
|
|
289
|
+
this.parent.isPreventScrollAction = true;
|
|
289
290
|
this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
|
|
290
291
|
isResetListCalled = true;
|
|
291
292
|
break;
|
|
@@ -333,6 +334,7 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
333
334
|
}
|
|
334
335
|
}
|
|
335
336
|
this.parent.renderItems(currentData, this.parent.fields, this.component === 'multiselect' && this.parent.mode === 'CheckBox');
|
|
337
|
+
this.parent.updateSelectionList();
|
|
336
338
|
}
|
|
337
339
|
if (this.component === 'multiselect') {
|
|
338
340
|
this.parent.updatevirtualizationList();
|
|
@@ -344,7 +346,8 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
344
346
|
(this.parent.totalItemCount <= this.parent.itemCount))) ? 0 : this.parent.skeletonCount;
|
|
345
347
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
346
348
|
var virtualTrackElement = this.parent.list.getElementsByClassName('e-virtual-ddl')[0];
|
|
347
|
-
|
|
349
|
+
var preventAction = this.component !== 'multiselect' || (this.component === 'multiselect' && ((!(this.parent.dataSource instanceof DataManager))) || (this.parent.dataSource instanceof DataManager && !isResetListCalled));
|
|
350
|
+
if (virtualTrackElement && preventAction) {
|
|
348
351
|
virtualTrackElement.style = this.parent.GetVirtualTrackHeight();
|
|
349
352
|
}
|
|
350
353
|
else if (!virtualTrackElement && this.parent.skeletonCount > 0 && this.parent.popupWrapper) {
|
|
@@ -353,11 +356,13 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
353
356
|
});
|
|
354
357
|
this.parent.popupWrapper.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
355
358
|
}
|
|
356
|
-
this.parent.
|
|
359
|
+
if (this.component !== 'multiselect' || (this.component === 'multiselect' && ((!(this.parent.dataSource instanceof DataManager))) || (this.parent.dataSource instanceof DataManager && (!isResetListCalled || this.parent.viewPortInfo.startIndex === 0)))) {
|
|
360
|
+
this.parent.UpdateSkeleton();
|
|
361
|
+
}
|
|
357
362
|
this.parent.liCollections = this.parent.list.querySelectorAll('.e-list-item');
|
|
358
363
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
359
364
|
var virtualContentElement = this.parent.list.getElementsByClassName('e-virtual-ddl-content')[0];
|
|
360
|
-
if (virtualContentElement) {
|
|
365
|
+
if (virtualContentElement && preventAction) {
|
|
361
366
|
(virtualContentElement).style = this.parent.getTransformValues();
|
|
362
367
|
}
|
|
363
368
|
if (this.parent.fields.groupBy) {
|
|
@@ -296,6 +296,7 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
|
|
|
296
296
|
protected isDynamicData: boolean;
|
|
297
297
|
protected isPrimitiveData: boolean;
|
|
298
298
|
protected isCustomFiltering: boolean;
|
|
299
|
+
protected debounceTimer: ReturnType<typeof setTimeout> | null;
|
|
299
300
|
protected virtualListInfo: VirtualInfo;
|
|
300
301
|
protected viewPortInfo: VirtualInfo;
|
|
301
302
|
protected selectedValueInfo: VirtualInfo;
|
|
@@ -605,6 +606,8 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
|
|
|
605
606
|
* @returns {Query} Returns the query to do the data query operation.
|
|
606
607
|
*/
|
|
607
608
|
protected getQuery(query: Query): Query;
|
|
609
|
+
protected performFiltering(e: KeyboardEventArgs | MouseEvent): void;
|
|
610
|
+
protected debouncedFiltering(e: KeyboardEventArgs | MouseEvent, debounceDelay: number): void;
|
|
608
611
|
protected updateVirtualizationProperties(itemCount: number, filtering: boolean, isCheckbox?: boolean): void;
|
|
609
612
|
/**
|
|
610
613
|
* To render the template content for group header element.
|
|
@@ -638,11 +641,12 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
|
|
|
638
641
|
* @param {object[]} listData - Specifies the list of array of data.
|
|
639
642
|
* @param {FieldSettingsModel} fields - Maps the columns of the data table and binds the data to the component.
|
|
640
643
|
* @param {boolean} isCheckBoxUpdate - Specifies whether the list item is updated with checkbox.
|
|
644
|
+
* @param {boolean} isClearAll - Specifies whether the current action is clearAll.
|
|
641
645
|
* @returns {HTMLElement} Return the list items.
|
|
642
646
|
*/
|
|
643
647
|
protected renderItems(listData: {
|
|
644
648
|
[key: string]: Object;
|
|
645
|
-
}[], fields: FieldSettingsModel, isCheckBoxUpdate?: boolean): HTMLElement;
|
|
649
|
+
}[], fields: FieldSettingsModel, isCheckBoxUpdate?: boolean, isClearAll?: boolean): HTMLElement;
|
|
646
650
|
private createVirtualContent;
|
|
647
651
|
private updateListElements;
|
|
648
652
|
protected templateListItem(dataSource: {
|
|
@@ -138,6 +138,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
138
138
|
_this.isDynamicData = false;
|
|
139
139
|
_this.isPrimitiveData = false;
|
|
140
140
|
_this.isCustomFiltering = false;
|
|
141
|
+
_this.debounceTimer = null;
|
|
141
142
|
_this.virtualListInfo = {
|
|
142
143
|
currentPageNumber: null,
|
|
143
144
|
direction: null,
|
|
@@ -499,6 +500,29 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
499
500
|
isContainSkeleton.firstChild.insertBefore(liElement, isContainSkeleton.firstChild.children[0]);
|
|
500
501
|
}
|
|
501
502
|
}
|
|
503
|
+
if (this.getModuleName() === 'multiselect') {
|
|
504
|
+
for (var i = 0; i < totalSkeletonCount && this.totalItemCount !== this.viewPortInfo.endIndex; i++) {
|
|
505
|
+
var liElement = this.createElement('li', { className: dropDownBaseClasses.virtualList + " e-virtual-list-end", styles: 'overflow: inherit' });
|
|
506
|
+
if (this.isVirtualizationEnabled && this.itemTemplate) {
|
|
507
|
+
liElement.style.height = (this.listItemHeight - parseInt(window.getComputedStyle(this.getItems()[1]).marginBottom, 10)) + 'px';
|
|
508
|
+
}
|
|
509
|
+
var skeleton = new Skeleton({
|
|
510
|
+
shape: 'Text',
|
|
511
|
+
height: '10px',
|
|
512
|
+
width: '95%',
|
|
513
|
+
cssClass: 'e-skeleton-text-end'
|
|
514
|
+
});
|
|
515
|
+
skeleton.appendTo(this.createElement('div'));
|
|
516
|
+
liElement.appendChild(skeleton.element);
|
|
517
|
+
if (isContainSkeleton.firstChild) {
|
|
518
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
519
|
+
isContainSkeleton.firstChild.appendChild(liElement);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
if (this.totalItemCount === this.viewPortInfo.endIndex) {
|
|
523
|
+
isContainSkeleton.querySelectorAll('.e-virtual-list-end').forEach(function (el) { return el.remove(); });
|
|
524
|
+
}
|
|
525
|
+
}
|
|
502
526
|
}
|
|
503
527
|
};
|
|
504
528
|
DropDownBase.prototype.getLocaleName = function () {
|
|
@@ -779,7 +803,9 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
779
803
|
_this.preventPopupOpen = false;
|
|
780
804
|
return;
|
|
781
805
|
}
|
|
806
|
+
var isSetCurrentcall = false;
|
|
782
807
|
if (_this.isVirtualizationEnabled && _this.setCurrentView) {
|
|
808
|
+
isSetCurrentcall = true;
|
|
783
809
|
_this.notify('setCurrentViewDataAsync', {
|
|
784
810
|
module: 'VirtualScroll'
|
|
785
811
|
});
|
|
@@ -787,7 +813,8 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
787
813
|
if (_this.keyboardEvent != null) {
|
|
788
814
|
_this.handleVirtualKeyboardActions(_this.keyboardEvent, _this.pageCount);
|
|
789
815
|
}
|
|
790
|
-
|
|
816
|
+
var preventSkeleton = _this.getModuleName() !== 'multiselect' || (_this.getModuleName() === 'multiselect' && (!(_this.dataSource instanceof DataManager) || (_this.dataSource instanceof DataManager && !isSetCurrentcall)));
|
|
817
|
+
if (_this.isVirtualizationEnabled && preventSkeleton) {
|
|
791
818
|
_this.getFilteringSkeletonCount();
|
|
792
819
|
_this.updatePopupPosition();
|
|
793
820
|
}
|
|
@@ -989,6 +1016,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
989
1016
|
};
|
|
990
1017
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
991
1018
|
DropDownBase.prototype.onActionComplete = function (ulElement, list, e) {
|
|
1019
|
+
var _this = this;
|
|
992
1020
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
993
1021
|
this.listData = list;
|
|
994
1022
|
if (this.isVirtualizationEnabled && !this.isCustomDataUpdated && !this.virtualSelectAll) {
|
|
@@ -1018,6 +1046,13 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1018
1046
|
}
|
|
1019
1047
|
}
|
|
1020
1048
|
}
|
|
1049
|
+
if (this.getModuleName() === 'multiselect' && this.isAngular && this.ngEle) {
|
|
1050
|
+
var popupHolder = this.list;
|
|
1051
|
+
if (popupHolder) {
|
|
1052
|
+
var prevHeight = popupHolder.offsetHeight + 'px';
|
|
1053
|
+
popupHolder.style.height = prevHeight;
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1021
1056
|
if (!isNullOrUndefined(this.list)) {
|
|
1022
1057
|
if (!this.isVirtualizationEnabled) {
|
|
1023
1058
|
this.list.innerHTML = '';
|
|
@@ -1027,15 +1062,26 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1027
1062
|
this.postRender(this.list, list, this.bindEvent);
|
|
1028
1063
|
}
|
|
1029
1064
|
}
|
|
1065
|
+
if (this.getModuleName() === 'multiselect' && this.isAngular && this.ngEle) {
|
|
1066
|
+
var popupHolder_1 = this.list;
|
|
1067
|
+
if (popupHolder_1) {
|
|
1068
|
+
setTimeout(function () {
|
|
1069
|
+
popupHolder_1.style.height = '';
|
|
1070
|
+
_this.refreshPopup();
|
|
1071
|
+
}, 0);
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1030
1074
|
};
|
|
1031
1075
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1032
1076
|
DropDownBase.prototype.postRender = function (listElement, list, bindEvent) {
|
|
1033
1077
|
if (this.fields.disabled) {
|
|
1034
1078
|
var liCollections = listElement.querySelectorAll('.' + dropDownBaseClasses.li);
|
|
1079
|
+
var data = this.sortOrder !== 'None' ? !isNullOrUndefined(this.fields.groupBy) ?
|
|
1080
|
+
this.sortedData.filter(function (item) { return !('isHeader' in item) || item.isHeader !== true; }) : this.sortedData : this.listData;
|
|
1035
1081
|
for (var index = 0; index < liCollections.length; index++) {
|
|
1036
|
-
if (JSON.parse(JSON.stringify(
|
|
1082
|
+
if (JSON.parse(JSON.stringify(data[index]))[this.fields.disabled]) {
|
|
1037
1083
|
if (!isNullOrUndefined(this.fields.groupBy)) {
|
|
1038
|
-
var item =
|
|
1084
|
+
var item = data[index];
|
|
1039
1085
|
var value = getValue((this.fields.value ? this.fields.value : 'value'), item);
|
|
1040
1086
|
var li = listElement.querySelector('li[data-value="' + value + '"]');
|
|
1041
1087
|
if (!isNullOrUndefined(li)) {
|
|
@@ -1077,6 +1123,18 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1077
1123
|
DropDownBase.prototype.getQuery = function (query) {
|
|
1078
1124
|
return query ? query : this.query ? this.query : new Query();
|
|
1079
1125
|
};
|
|
1126
|
+
DropDownBase.prototype.performFiltering = function (e) {
|
|
1127
|
+
// this is for component wise
|
|
1128
|
+
};
|
|
1129
|
+
DropDownBase.prototype.debouncedFiltering = function (e, debounceDelay) {
|
|
1130
|
+
var _this = this;
|
|
1131
|
+
if (this.debounceTimer !== null) {
|
|
1132
|
+
clearTimeout(this.debounceTimer);
|
|
1133
|
+
}
|
|
1134
|
+
this.debounceTimer = setTimeout(function () {
|
|
1135
|
+
_this.performFiltering(e);
|
|
1136
|
+
}, debounceDelay);
|
|
1137
|
+
};
|
|
1080
1138
|
DropDownBase.prototype.updateVirtualizationProperties = function (itemCount, filtering, isCheckbox) {
|
|
1081
1139
|
this.isVirtualizationEnabled = true;
|
|
1082
1140
|
this.virtualizedItemsCount = itemCount;
|
|
@@ -1258,9 +1316,10 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1258
1316
|
* @param {object[]} listData - Specifies the list of array of data.
|
|
1259
1317
|
* @param {FieldSettingsModel} fields - Maps the columns of the data table and binds the data to the component.
|
|
1260
1318
|
* @param {boolean} isCheckBoxUpdate - Specifies whether the list item is updated with checkbox.
|
|
1319
|
+
* @param {boolean} isClearAll - Specifies whether the current action is clearAll.
|
|
1261
1320
|
* @returns {HTMLElement} Return the list items.
|
|
1262
1321
|
*/
|
|
1263
|
-
DropDownBase.prototype.renderItems = function (listData, fields, isCheckBoxUpdate) {
|
|
1322
|
+
DropDownBase.prototype.renderItems = function (listData, fields, isCheckBoxUpdate, isClearAll) {
|
|
1264
1323
|
var ulElement;
|
|
1265
1324
|
if (this.itemTemplate && listData) {
|
|
1266
1325
|
if (this.getModuleName() === 'multiselect' && this.virtualSelectAll) {
|
|
@@ -1314,7 +1373,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1314
1373
|
}
|
|
1315
1374
|
}
|
|
1316
1375
|
else {
|
|
1317
|
-
if (this.getModuleName() === 'multiselect' && this.virtualSelectAll) {
|
|
1376
|
+
if (this.getModuleName() === 'multiselect' && (this.virtualSelectAll && !isClearAll)) {
|
|
1318
1377
|
this.virtualSelectAllData = listData;
|
|
1319
1378
|
listData = listData.slice(this.virtualItemStartIndex, this.virtualItemEndIndex);
|
|
1320
1379
|
}
|
|
@@ -1333,11 +1392,13 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1333
1392
|
oldUlElement = this.list.querySelector('.e-list-parent' + '.e-reorder');
|
|
1334
1393
|
}
|
|
1335
1394
|
if ((listData.length >= this.virtualizedItemsCount && oldUlElement && virtualUlElement) || (oldUlElement && virtualUlElement && this.isAllowFiltering) || (oldUlElement && virtualUlElement && (this.getModuleName() === 'autocomplete' || this.getModuleName() === 'multiselect')) || isRemovedUlelement) {
|
|
1336
|
-
if (!this.
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1395
|
+
if (this.getModuleName() !== 'multiselect' || (this.getModuleName() === 'multiselect' && (!(this.dataSource instanceof DataManager) || (this.dataSource instanceof DataManager && !this.setCurrentView)))) {
|
|
1396
|
+
if (!this.appendUncheckList) {
|
|
1397
|
+
virtualUlElement.replaceChild(ulElement, oldUlElement);
|
|
1398
|
+
}
|
|
1399
|
+
else {
|
|
1400
|
+
virtualUlElement.appendChild(ulElement);
|
|
1401
|
+
}
|
|
1341
1402
|
}
|
|
1342
1403
|
this.updateListElements(listData);
|
|
1343
1404
|
}
|
|
@@ -145,6 +145,13 @@ export interface DropDownListModel extends DropDownBaseModel{
|
|
|
145
145
|
*/
|
|
146
146
|
allowFiltering?: boolean;
|
|
147
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Specifies the delay time in milliseconds for filtering operations.
|
|
150
|
+
*
|
|
151
|
+
* @default 300
|
|
152
|
+
*/
|
|
153
|
+
debounceDelay?: number;
|
|
154
|
+
|
|
148
155
|
/**
|
|
149
156
|
* Defines whether the popup opens in fullscreen mode on mobile devices when filtering is enabled. When set to false, the popup will display similarly on both mobile and desktop devices.
|
|
150
157
|
*
|
|
@@ -248,6 +248,12 @@ export declare class DropDownList extends DropDownBase implements IInput {
|
|
|
248
248
|
* @default false
|
|
249
249
|
*/
|
|
250
250
|
allowFiltering: boolean;
|
|
251
|
+
/**
|
|
252
|
+
* Specifies the delay time in milliseconds for filtering operations.
|
|
253
|
+
*
|
|
254
|
+
* @default 300
|
|
255
|
+
*/
|
|
256
|
+
debounceDelay: number;
|
|
251
257
|
/**
|
|
252
258
|
* Defines whether the popup opens in fullscreen mode on mobile devices when filtering is enabled. When set to false, the popup will display similarly on both mobile and desktop devices.
|
|
253
259
|
*
|
|
@@ -549,6 +555,7 @@ export declare class DropDownList extends DropDownBase implements IInput {
|
|
|
549
555
|
protected getSelectionPoints(): {
|
|
550
556
|
[key: string]: number;
|
|
551
557
|
};
|
|
558
|
+
protected performFiltering(e: KeyboardEventArgs | MouseEvent): void;
|
|
552
559
|
protected searchLists(e: KeyboardEventArgs | MouseEvent): void;
|
|
553
560
|
/**
|
|
554
561
|
* To filter the data from given data source by using query
|
|
@@ -1461,7 +1461,8 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1461
1461
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
1462
1462
|
var proxy_1 = this;
|
|
1463
1463
|
// eslint-disable-next-line max-len
|
|
1464
|
-
var duration = (this.
|
|
1464
|
+
var duration = ((this.dataSource instanceof DataManager) && this.groupTemplate) ? 700 :
|
|
1465
|
+
(this.element.tagName === this.getNgDirective() && this.itemTemplate) ? 500 : 100;
|
|
1465
1466
|
if (!this.isSecondClick) {
|
|
1466
1467
|
setTimeout(function () {
|
|
1467
1468
|
proxy_1.cloneElements();
|
|
@@ -2064,8 +2065,31 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2064
2065
|
var input = this.inputElement;
|
|
2065
2066
|
return { start: Math.abs(input.selectionStart), end: Math.abs(input.selectionEnd) };
|
|
2066
2067
|
};
|
|
2067
|
-
DropDownList.prototype.
|
|
2068
|
+
DropDownList.prototype.performFiltering = function (e) {
|
|
2068
2069
|
var _this = this;
|
|
2070
|
+
this.checkAndResetCache();
|
|
2071
|
+
this.isRequesting = false;
|
|
2072
|
+
var eventArgs = {
|
|
2073
|
+
preventDefaultAction: false,
|
|
2074
|
+
text: this.filterInput.value,
|
|
2075
|
+
updateData: function (dataSource, query, fields) {
|
|
2076
|
+
if (eventArgs.cancel) {
|
|
2077
|
+
return;
|
|
2078
|
+
}
|
|
2079
|
+
_this.isCustomFilter = true;
|
|
2080
|
+
_this.customFilterQuery = query ? query.clone() : query;
|
|
2081
|
+
_this.filteringAction(dataSource, query, fields);
|
|
2082
|
+
},
|
|
2083
|
+
baseEventArgs: e,
|
|
2084
|
+
cancel: false
|
|
2085
|
+
};
|
|
2086
|
+
this.trigger('filtering', eventArgs, function (eventArgs) {
|
|
2087
|
+
if (!eventArgs.cancel && !_this.isCustomFilter && !eventArgs.preventDefaultAction) {
|
|
2088
|
+
_this.filteringAction(_this.dataSource, null, _this.fields);
|
|
2089
|
+
}
|
|
2090
|
+
});
|
|
2091
|
+
};
|
|
2092
|
+
DropDownList.prototype.searchLists = function (e) {
|
|
2069
2093
|
this.isTyped = true;
|
|
2070
2094
|
this.activeIndex = null;
|
|
2071
2095
|
this.isListSearched = true;
|
|
@@ -2075,27 +2099,12 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2075
2099
|
}
|
|
2076
2100
|
this.isDataFetched = false;
|
|
2077
2101
|
if (this.isFiltering()) {
|
|
2078
|
-
this.
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
if (eventArgs_1.cancel) {
|
|
2085
|
-
return;
|
|
2086
|
-
}
|
|
2087
|
-
_this.isCustomFilter = true;
|
|
2088
|
-
_this.customFilterQuery = query ? query.clone() : query;
|
|
2089
|
-
_this.filteringAction(dataSource, query, fields);
|
|
2090
|
-
},
|
|
2091
|
-
baseEventArgs: e,
|
|
2092
|
-
cancel: false
|
|
2093
|
-
};
|
|
2094
|
-
this.trigger('filtering', eventArgs_1, function (eventArgs) {
|
|
2095
|
-
if (!eventArgs.cancel && !_this.isCustomFilter && !eventArgs.preventDefaultAction) {
|
|
2096
|
-
_this.filteringAction(_this.dataSource, null, _this.fields);
|
|
2097
|
-
}
|
|
2098
|
-
});
|
|
2102
|
+
if (this.typedString !== '' && this.debounceDelay > 0) {
|
|
2103
|
+
this.debouncedFiltering(e, this.debounceDelay);
|
|
2104
|
+
}
|
|
2105
|
+
else {
|
|
2106
|
+
this.performFiltering(e);
|
|
2107
|
+
}
|
|
2099
2108
|
}
|
|
2100
2109
|
};
|
|
2101
2110
|
/**
|
|
@@ -2365,7 +2374,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2365
2374
|
this.dataSource.executeQuery(this.getQuery(this.query).where(new Predicate(checkField_1, 'equal', value_1)))
|
|
2366
2375
|
.then(function (e) {
|
|
2367
2376
|
if (e.result.length > 0) {
|
|
2368
|
-
_this.
|
|
2377
|
+
if (!_this.enableVirtualization) {
|
|
2378
|
+
_this.addItem(e.result, list.length);
|
|
2379
|
+
}
|
|
2369
2380
|
_this.updateValues();
|
|
2370
2381
|
}
|
|
2371
2382
|
else {
|
|
@@ -4063,6 +4074,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
4063
4074
|
if (!this.enabled) {
|
|
4064
4075
|
return;
|
|
4065
4076
|
}
|
|
4077
|
+
if (this.getModuleName() === 'dropdownlist' && this.beforePopupOpen && !this.isPopupOpen) {
|
|
4078
|
+
this.beforePopupOpen = false;
|
|
4079
|
+
}
|
|
4066
4080
|
this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
|
|
4067
4081
|
if (this.isReact && this.getModuleName() === 'combobox' && this.itemTemplate && this.isCustomFilter && this.isAddNewItemTemplate) {
|
|
4068
4082
|
this.renderList();
|
|
@@ -4331,6 +4345,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
4331
4345
|
this.inputElement.classList.remove('e-input');
|
|
4332
4346
|
Input.setValue('', this.inputElement, this.floatLabelType, this.showClearButton);
|
|
4333
4347
|
}
|
|
4348
|
+
this.element.removeAttribute('tabindex');
|
|
4334
4349
|
this.element.style.display = 'block';
|
|
4335
4350
|
if (this.inputWrapper.container && this.inputWrapper.container.parentElement) {
|
|
4336
4351
|
if (this.inputWrapper.container.parentElement.tagName === this.getNgDirective()) {
|
|
@@ -4450,6 +4465,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
4450
4465
|
__decorate([
|
|
4451
4466
|
Property(false)
|
|
4452
4467
|
], DropDownList.prototype, "allowFiltering", void 0);
|
|
4468
|
+
__decorate([
|
|
4469
|
+
Property(300)
|
|
4470
|
+
], DropDownList.prototype, "debounceDelay", void 0);
|
|
4453
4471
|
__decorate([
|
|
4454
4472
|
Property(true)
|
|
4455
4473
|
], DropDownList.prototype, "isDeviceFullScreen", void 0);
|
|
@@ -778,6 +778,7 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
|
|
|
778
778
|
private wireTreeEvents;
|
|
779
779
|
private wireCheckAllWrapperEvents;
|
|
780
780
|
private unWireEvents;
|
|
781
|
+
private handleIosTouch;
|
|
781
782
|
private dropDownClick;
|
|
782
783
|
private mouseIn;
|
|
783
784
|
private onMouseLeave;
|