@syncfusion/ej2-dropdowns 24.2.7 → 24.2.9
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 +112 -49
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +113 -49
- 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 +9 -9
- package/src/combo-box/combo-box-model.d.ts +1 -1
- package/src/combo-box/combo-box.js +29 -2
- package/src/drop-down-base/drop-down-base.d.ts +1 -0
- package/src/drop-down-base/drop-down-base.js +1 -1
- package/src/drop-down-list/drop-down-list.d.ts +0 -1
- package/src/drop-down-list/drop-down-list.js +33 -24
- package/src/mention/mention-model.d.ts +1 -1
- package/src/mention/mention.d.ts +1 -1
- package/src/mention/mention.js +52 -23
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/drop-down-list/_layout.scss +1 -1
- package/styles/drop-down-list/bootstrap-dark.css +1 -1
- package/styles/drop-down-list/bootstrap.css +1 -1
- package/styles/drop-down-list/bootstrap4.css +1 -1
- package/styles/drop-down-list/bootstrap5-dark.css +1 -1
- package/styles/drop-down-list/bootstrap5.css +1 -1
- package/styles/drop-down-list/fabric-dark.css +1 -1
- package/styles/drop-down-list/fabric.css +1 -1
- package/styles/drop-down-list/fluent-dark.css +1 -1
- package/styles/drop-down-list/fluent.css +1 -1
- package/styles/drop-down-list/highcontrast-light.css +1 -1
- package/styles/drop-down-list/highcontrast.css +1 -1
- package/styles/drop-down-list/material-dark.css +1 -1
- package/styles/drop-down-list/material.css +1 -1
- package/styles/drop-down-list/material3-dark.css +1 -1
- package/styles/drop-down-list/material3.css +1 -1
- package/styles/drop-down-list/tailwind-dark.css +1 -1
- package/styles/drop-down-list/tailwind.css +1 -1
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/fluent-dark.css +1 -1
- package/styles/fluent.css +1 -1
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material.css +1 -1
- package/styles/material3-dark.css +1 -1
- package/styles/material3.css +1 -1
- package/styles/tailwind-dark.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 : 24.2.
|
|
3
|
+
* version : 24.2.9
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. 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@24.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@24.2.8",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-1A5QIAOOlqg4IJjwTgMqNV6xiPutc4FoqN7uskqXelOBGeTgCx4jEpZhh+X9dDCxKXV2iPNOEw2CSFyKTIc2Iw==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"/@syncfusion/ej2-spreadsheet",
|
|
35
35
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
36
36
|
],
|
|
37
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-24.2.
|
|
38
|
-
"_shasum": "
|
|
37
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-24.2.8.tgz",
|
|
38
|
+
"_shasum": "7f4577968b80659bca4fea10937d125be58ad1a3",
|
|
39
39
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
40
40
|
"_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
|
|
41
41
|
"author": {
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@syncfusion/ej2-base": "~24.2.7",
|
|
47
47
|
"@syncfusion/ej2-data": "~24.2.3",
|
|
48
|
-
"@syncfusion/ej2-inputs": "~24.2.
|
|
49
|
-
"@syncfusion/ej2-lists": "~24.2.
|
|
50
|
-
"@syncfusion/ej2-navigations": "~24.2.
|
|
48
|
+
"@syncfusion/ej2-inputs": "~24.2.9",
|
|
49
|
+
"@syncfusion/ej2-lists": "~24.2.8",
|
|
50
|
+
"@syncfusion/ej2-navigations": "~24.2.8",
|
|
51
51
|
"@syncfusion/ej2-notifications": "~24.2.4",
|
|
52
|
-
"@syncfusion/ej2-popups": "~24.2.
|
|
52
|
+
"@syncfusion/ej2-popups": "~24.2.9"
|
|
53
53
|
},
|
|
54
54
|
"deprecated": false,
|
|
55
55
|
"description": "Essential JS 2 DropDown Components",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"module": "./index.js",
|
|
75
75
|
"name": "@syncfusion/ej2-dropdowns",
|
|
76
76
|
"typings": "index.d.ts",
|
|
77
|
-
"version": "24.2.
|
|
77
|
+
"version": "24.2.9",
|
|
78
78
|
"sideEffects": false,
|
|
79
79
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
80
80
|
}
|
|
@@ -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, 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 } 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
|
|
|
@@ -25,6 +25,7 @@ import { DropDownList, dropDownListClasses } from '../drop-down-list/drop-down-l
|
|
|
25
25
|
import { Search } from '../common/incremental-search';
|
|
26
26
|
import { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';
|
|
27
27
|
import { Input } from '@syncfusion/ej2-inputs';
|
|
28
|
+
import { DataManager, Predicate, Query } from '@syncfusion/ej2-data';
|
|
28
29
|
var SPINNER_CLASS = 'e-atc-spinner-icon';
|
|
29
30
|
dropDownListClasses.root = 'e-combobox';
|
|
30
31
|
var inputObject = {
|
|
@@ -141,13 +142,39 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
141
142
|
ComboBox.prototype.updateValues = function () {
|
|
142
143
|
if (!isNullOrUndefined(this.value)) {
|
|
143
144
|
var li = this.getElementByValue(this.value);
|
|
145
|
+
var isExistItem = !isNullOrUndefined(li) ? true : false;
|
|
146
|
+
if (this.enableVirtualization && this.value) {
|
|
147
|
+
var fields = (this.fields.value) ? this.fields.value : '';
|
|
148
|
+
if (this.dataSource instanceof DataManager && this.virtualGroupDataSource) {
|
|
149
|
+
var getItem = new DataManager(this.virtualGroupDataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', this.value)));
|
|
150
|
+
if (getItem && getItem.length > 0) {
|
|
151
|
+
this.itemData = getItem[0];
|
|
152
|
+
isExistItem = true;
|
|
153
|
+
var dataItem = this.getItemData();
|
|
154
|
+
if ((this.value === dataItem.value && this.text !== dataItem.text) || (this.value !== dataItem.value && this.text === dataItem.text)) {
|
|
155
|
+
this.setProperties({ 'text': dataItem.text, 'value': dataItem.value });
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
var getItem = new DataManager(this.dataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', this.value)));
|
|
161
|
+
if (getItem && getItem.length > 0) {
|
|
162
|
+
this.itemData = getItem[0];
|
|
163
|
+
isExistItem = true;
|
|
164
|
+
var dataItem = this.getItemData();
|
|
165
|
+
if ((this.value === dataItem.value && this.text !== dataItem.text) || (this.value !== dataItem.value && this.text === dataItem.text)) {
|
|
166
|
+
this.setProperties({ 'text': dataItem.text, 'value': dataItem.value });
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
144
171
|
if (li) {
|
|
145
172
|
this.setSelection(li, null);
|
|
146
173
|
}
|
|
147
|
-
else if (this.allowCustom) {
|
|
174
|
+
else if ((!this.enableVirtualization && this.allowCustom) || (this.allowCustom && this.enableVirtualization && !isExistItem)) {
|
|
148
175
|
this.valueMuteChange(this.value);
|
|
149
176
|
}
|
|
150
|
-
else {
|
|
177
|
+
else if (!this.enableVirtualization || (this.enableVirtualization && !isExistItem)) {
|
|
151
178
|
this.valueMuteChange(null);
|
|
152
179
|
}
|
|
153
180
|
}
|
|
@@ -234,6 +234,7 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
|
|
|
234
234
|
}[] | DataManager | string[] | number[] | boolean[];
|
|
235
235
|
protected isIncrementalRequest: boolean;
|
|
236
236
|
protected itemCount: number;
|
|
237
|
+
protected initialRemoteRender: boolean;
|
|
237
238
|
/**
|
|
238
239
|
|
|
239
240
|
/**
|
|
@@ -506,7 +506,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
506
506
|
_this.trigger('actionComplete', e, function (e) {
|
|
507
507
|
if (!_this.virtualGroupDataSource && _this.isVirtualizationEnabled) {
|
|
508
508
|
_this.isRemoteDataUpdated = true;
|
|
509
|
-
if ((_this.getModuleName() === 'combobox' && _this.isAllowFiltering && _this.isVirtualizationEnabled && e.result)) {
|
|
509
|
+
if ((_this.getModuleName() === 'combobox' && !_this.initialRemoteRender && _this.isAllowFiltering && _this.isVirtualizationEnabled && e.result)) {
|
|
510
510
|
e.result = e.result.result;
|
|
511
511
|
}
|
|
512
512
|
if (e.result.length > 0) {
|
|
@@ -69,7 +69,6 @@ export declare class DropDownList extends DropDownBase implements IInput {
|
|
|
69
69
|
private isFilterFocus;
|
|
70
70
|
protected beforePopupOpen: boolean;
|
|
71
71
|
protected initial: boolean;
|
|
72
|
-
private initRemoteRender;
|
|
73
72
|
private searchBoxHeight;
|
|
74
73
|
private popupObj;
|
|
75
74
|
private popupContentElement;
|
|
@@ -160,7 +160,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
160
160
|
this.isFilterFocus = false;
|
|
161
161
|
this.beforePopupOpen = false;
|
|
162
162
|
this.initial = true;
|
|
163
|
-
this.
|
|
163
|
+
this.initialRemoteRender = false;
|
|
164
164
|
this.isNotSearchList = false;
|
|
165
165
|
this.isTyped = false;
|
|
166
166
|
this.isSelected = false;
|
|
@@ -451,7 +451,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
451
451
|
this.viewPortInfo.endIndex = this.virtualItemEndIndex = this.itemCount;
|
|
452
452
|
this.renderList();
|
|
453
453
|
if (this.dataSource instanceof DataManager) {
|
|
454
|
-
this.
|
|
454
|
+
this.initialRemoteRender = true;
|
|
455
455
|
}
|
|
456
456
|
else {
|
|
457
457
|
this.updateValues();
|
|
@@ -1430,7 +1430,6 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1430
1430
|
}
|
|
1431
1431
|
};
|
|
1432
1432
|
DropDownList.prototype.setSelection = function (li, e) {
|
|
1433
|
-
var _this = this;
|
|
1434
1433
|
if (this.isValidLI(li) && (!li.classList.contains(dropDownBaseClasses.selected) || (this.isPopupOpen && this.isSelected
|
|
1435
1434
|
&& li.classList.contains(dropDownBaseClasses.selected)))) {
|
|
1436
1435
|
this.updateSelectedItem(li, e, false, true);
|
|
@@ -1439,17 +1438,15 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1439
1438
|
this.setSelectOptions(li, e);
|
|
1440
1439
|
if (this.enableVirtualization) {
|
|
1441
1440
|
var fields = (this.fields.value) ? this.fields.value : '';
|
|
1442
|
-
if (this.dataSource instanceof DataManager) {
|
|
1443
|
-
this.
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
_this.setProperties({ 'text': dataItem.text, 'value': dataItem.value });
|
|
1450
|
-
}
|
|
1441
|
+
if (this.dataSource instanceof DataManager && this.virtualGroupDataSource) {
|
|
1442
|
+
var getItem = new DataManager(this.virtualGroupDataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', this.value)));
|
|
1443
|
+
if (getItem && getItem.length > 0) {
|
|
1444
|
+
this.itemData = getItem[0];
|
|
1445
|
+
var dataItem = this.getItemData();
|
|
1446
|
+
if ((this.value === dataItem.value && this.text !== dataItem.text) || (this.value !== dataItem.value && this.text === dataItem.text)) {
|
|
1447
|
+
this.setProperties({ 'text': dataItem.text, 'value': dataItem.value });
|
|
1451
1448
|
}
|
|
1452
|
-
}
|
|
1449
|
+
}
|
|
1453
1450
|
}
|
|
1454
1451
|
else {
|
|
1455
1452
|
var getItem = new DataManager(this.dataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', this.value)));
|
|
@@ -2106,10 +2103,10 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2106
2103
|
if (!isNullOrUndefined(ulElement)) {
|
|
2107
2104
|
attributes(ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false', 'aria-label': 'listbox' });
|
|
2108
2105
|
}
|
|
2109
|
-
if (this.
|
|
2106
|
+
if (this.initialRemoteRender) {
|
|
2110
2107
|
this.initial = true;
|
|
2111
2108
|
this.activeIndex = this.index;
|
|
2112
|
-
this.
|
|
2109
|
+
this.initialRemoteRender = false;
|
|
2113
2110
|
if (this.value && this.dataSource instanceof DataManager) {
|
|
2114
2111
|
var checkField_1 = isNullOrUndefined(this.fields.value) ? this.fields.text : this.fields.value;
|
|
2115
2112
|
var fieldValue_1 = this.fields.value.split('.');
|
|
@@ -2117,6 +2114,12 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2117
2114
|
return isNullOrUndefined(x[checkField_1]) && fieldValue_1.length > 1 ?
|
|
2118
2115
|
_this.checkFieldValue(x, fieldValue_1) === _this.value : x[checkField_1] === _this.value;
|
|
2119
2116
|
});
|
|
2117
|
+
if (this.enableVirtualization && this.virtualGroupDataSource) {
|
|
2118
|
+
checkVal = this.virtualGroupDataSource.some(function (x) {
|
|
2119
|
+
return isNullOrUndefined(x[checkField_1]) && fieldValue_1.length > 1 ?
|
|
2120
|
+
_this.checkFieldValue(x, fieldValue_1) === _this.value : x[checkField_1] === _this.value;
|
|
2121
|
+
});
|
|
2122
|
+
}
|
|
2120
2123
|
if (!checkVal) {
|
|
2121
2124
|
this.dataSource.executeQuery(this.getQuery(this.query).where(new Predicate(checkField_1, 'equal', this.value)))
|
|
2122
2125
|
.then(function (e) {
|
|
@@ -2433,6 +2436,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2433
2436
|
_this.getFocusElement();
|
|
2434
2437
|
_this.checkCollision(popupEle);
|
|
2435
2438
|
if (Browser.isDevice) {
|
|
2439
|
+
if ((parseInt(_this.popupWidth.toString(), 10) > window.outerWidth) && !(_this.getModuleName() === 'dropdownlist' && _this.allowFiltering)) {
|
|
2440
|
+
_this.popupObj.element.classList.add('e-wide-popup');
|
|
2441
|
+
}
|
|
2436
2442
|
_this.popupObj.element.classList.add(dropDownListClasses.device);
|
|
2437
2443
|
if (_this.getModuleName() === 'dropdownlist' || (_this.getModuleName() === 'combobox'
|
|
2438
2444
|
&& !_this.allowFiltering && _this.isDropDownClick)) {
|
|
@@ -2948,8 +2954,8 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2948
2954
|
}
|
|
2949
2955
|
}
|
|
2950
2956
|
});
|
|
2951
|
-
if (
|
|
2952
|
-
this.
|
|
2957
|
+
if (Browser.isDevice && !eventArgs.cancel && this.popupObj.element.classList.contains('e-wide-popup')) {
|
|
2958
|
+
this.popupObj.element.classList.remove('e-wide-popup');
|
|
2953
2959
|
}
|
|
2954
2960
|
var dataSourceCount;
|
|
2955
2961
|
if (this.dataSource instanceof DataManager) {
|
|
@@ -3377,11 +3383,11 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3377
3383
|
}
|
|
3378
3384
|
if (!this_1.list) {
|
|
3379
3385
|
if (this_1.dataSource instanceof DataManager) {
|
|
3380
|
-
this_1.
|
|
3386
|
+
this_1.initialRemoteRender = true;
|
|
3381
3387
|
}
|
|
3382
3388
|
this_1.renderList();
|
|
3383
3389
|
}
|
|
3384
|
-
if (!this_1.
|
|
3390
|
+
if (!this_1.initialRemoteRender) {
|
|
3385
3391
|
var li = this_1.getElementByText(newProp.text);
|
|
3386
3392
|
if (!this_1.checkValidLi(li)) {
|
|
3387
3393
|
if (this_1.liCollections && this_1.liCollections.length === 100 &&
|
|
@@ -3430,11 +3436,11 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3430
3436
|
this_1.notify('beforeValueChange', { newProp: newProp }); // gird component value type change
|
|
3431
3437
|
if (!this_1.list) {
|
|
3432
3438
|
if (this_1.dataSource instanceof DataManager) {
|
|
3433
|
-
this_1.
|
|
3439
|
+
this_1.initialRemoteRender = true;
|
|
3434
3440
|
}
|
|
3435
3441
|
this_1.renderList();
|
|
3436
3442
|
}
|
|
3437
|
-
if (!this_1.
|
|
3443
|
+
if (!this_1.initialRemoteRender) {
|
|
3438
3444
|
var item = this_1.getElementByValue(newProp.value);
|
|
3439
3445
|
if (!this_1.checkValidLi(item)) {
|
|
3440
3446
|
if (this_1.liCollections && this_1.liCollections.length === 100 &&
|
|
@@ -3474,11 +3480,11 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3474
3480
|
}
|
|
3475
3481
|
if (!this_1.list) {
|
|
3476
3482
|
if (this_1.dataSource instanceof DataManager) {
|
|
3477
|
-
this_1.
|
|
3483
|
+
this_1.initialRemoteRender = true;
|
|
3478
3484
|
}
|
|
3479
3485
|
this_1.renderList();
|
|
3480
3486
|
}
|
|
3481
|
-
if (!this_1.
|
|
3487
|
+
if (!this_1.initialRemoteRender && this_1.liCollections) {
|
|
3482
3488
|
var element = this_1.liCollections[newProp.index];
|
|
3483
3489
|
if (!this_1.checkValidLi(element)) {
|
|
3484
3490
|
if (this_1.liCollections && this_1.liCollections.length === 100 &&
|
|
@@ -3645,6 +3651,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3645
3651
|
}
|
|
3646
3652
|
else if (isNullOrUndefined(this.list) || !isUndefined(this.list) && (this.list.classList.contains(dropDownBaseClasses.noData) ||
|
|
3647
3653
|
this.list.querySelectorAll('.' + dropDownBaseClasses.li).length <= 0)) {
|
|
3654
|
+
if (this.isReact && this.isFiltering() && this.itemTemplate != null) {
|
|
3655
|
+
this.isSecondClick = false;
|
|
3656
|
+
}
|
|
3648
3657
|
this.renderList(e);
|
|
3649
3658
|
}
|
|
3650
3659
|
if (this.enableVirtualization && this.listData && this.listData.length) {
|
|
@@ -3851,7 +3860,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3851
3860
|
DropDownList.prototype.getItems = function () {
|
|
3852
3861
|
if (!this.list) {
|
|
3853
3862
|
if (this.dataSource instanceof DataManager) {
|
|
3854
|
-
this.
|
|
3863
|
+
this.initialRemoteRender = true;
|
|
3855
3864
|
}
|
|
3856
3865
|
this.renderList();
|
|
3857
3866
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { compile, Property, EventHandler, Animation, AnimationModel, KeyboardEventArgs, formatUnit, append, attributes } from '@syncfusion/ej2-base';import { isNullOrUndefined, detach, Event, EmitType, Complex, addClass, removeClass, closest, isUndefined, getValue, NotifyPropertyChanges, Browser } from '@syncfusion/ej2-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { FieldSettings, FilteringEventArgs, FilterType } from '../drop-down-base/drop-down-base';import { DropDownBase, PopupEventArgs, SelectEventArgs, BeforeOpenEventArgs, dropDownBaseClasses } from '../drop-down-base/drop-down-base';import { DataManager, Query } from '@syncfusion/ej2-data';import { SortOrder } from '@syncfusion/ej2-lists';import { Popup, isCollide, createSpinner, showSpinner, hideSpinner, getZindexPartial } from '@syncfusion/ej2-popups';import { highlightSearch, revertHighlightSearch } from '../common/highlight-search';
|
|
2
2
|
import {MentionChangeEventArgs} from "./mention";
|
|
3
3
|
|
|
4
4
|
/**
|
package/src/mention/mention.d.ts
CHANGED
|
@@ -41,7 +41,6 @@ export declare class Mention extends DropDownBase {
|
|
|
41
41
|
private previousSelectedLI;
|
|
42
42
|
private previousItemData;
|
|
43
43
|
private activeIndex;
|
|
44
|
-
private keyConfigure;
|
|
45
44
|
private isFiltered;
|
|
46
45
|
private beforePopupOpen;
|
|
47
46
|
private listHeight;
|
|
@@ -357,6 +356,7 @@ export declare class Mention extends DropDownBase {
|
|
|
357
356
|
* @returns {void}
|
|
358
357
|
*/
|
|
359
358
|
private showWaitingSpinner;
|
|
359
|
+
private keyDownHandler;
|
|
360
360
|
private keyActionHandler;
|
|
361
361
|
private updateUpDownAction;
|
|
362
362
|
private isSelectFocusItem;
|
package/src/mention/mention.js
CHANGED
|
@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
17
17
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
18
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
19
|
};
|
|
20
|
-
import {
|
|
20
|
+
import { compile, Property, EventHandler, Animation, formatUnit, append, attributes } from '@syncfusion/ej2-base';
|
|
21
21
|
import { isNullOrUndefined, detach, Event, Complex, addClass, removeClass, closest, isUndefined, getValue, NotifyPropertyChanges, Browser } from '@syncfusion/ej2-base';
|
|
22
22
|
import { FieldSettings } from '../drop-down-base/drop-down-base';
|
|
23
23
|
import { DropDownBase, dropDownBaseClasses } from '../drop-down-base/drop-down-base';
|
|
@@ -103,21 +103,6 @@ var Mention = /** @class */ (function (_super) {
|
|
|
103
103
|
this.isPopupOpen = false;
|
|
104
104
|
this.isCollided = false;
|
|
105
105
|
this.lineBreak = false;
|
|
106
|
-
this.keyConfigure = {
|
|
107
|
-
tab: 'tab',
|
|
108
|
-
enter: '13',
|
|
109
|
-
escape: '27',
|
|
110
|
-
end: '35',
|
|
111
|
-
home: '36',
|
|
112
|
-
down: '40',
|
|
113
|
-
up: '38',
|
|
114
|
-
pageUp: '33',
|
|
115
|
-
pageDown: '34',
|
|
116
|
-
open: 'alt+40',
|
|
117
|
-
close: 'shift+tab',
|
|
118
|
-
hide: 'alt+38',
|
|
119
|
-
space: '32'
|
|
120
|
-
};
|
|
121
106
|
};
|
|
122
107
|
/**
|
|
123
108
|
* Execute before render the list items
|
|
@@ -163,9 +148,7 @@ var Mention = /** @class */ (function (_super) {
|
|
|
163
148
|
};
|
|
164
149
|
Mention.prototype.bindCommonEvent = function () {
|
|
165
150
|
if (!Browser.isDevice) {
|
|
166
|
-
this.
|
|
167
|
-
keyAction: this.keyActionHandler.bind(this), keyConfigs: this.keyConfigure, eventName: 'keydown'
|
|
168
|
-
});
|
|
151
|
+
this.inputElement.addEventListener('keydown', this.keyDownHandler.bind(this), true);
|
|
169
152
|
}
|
|
170
153
|
};
|
|
171
154
|
/**
|
|
@@ -217,6 +200,47 @@ var Mention = /** @class */ (function (_super) {
|
|
|
217
200
|
}
|
|
218
201
|
}
|
|
219
202
|
};
|
|
203
|
+
Mention.prototype.keyDownHandler = function (e) {
|
|
204
|
+
var isKeyAction = true;
|
|
205
|
+
switch (e.keyCode) {
|
|
206
|
+
case 38:
|
|
207
|
+
e.action = e.altKey ? 'hide' : 'up';
|
|
208
|
+
break;
|
|
209
|
+
case 40:
|
|
210
|
+
e.action = e.altKey ? 'open' : 'down';
|
|
211
|
+
break;
|
|
212
|
+
case 33:
|
|
213
|
+
e.action = 'pageUp';
|
|
214
|
+
break;
|
|
215
|
+
case 34:
|
|
216
|
+
e.action = 'pageDown';
|
|
217
|
+
break;
|
|
218
|
+
case 36:
|
|
219
|
+
e.action = 'home';
|
|
220
|
+
break;
|
|
221
|
+
case 35:
|
|
222
|
+
e.action = 'end';
|
|
223
|
+
break;
|
|
224
|
+
case 9:
|
|
225
|
+
e.action = e.shiftKey ? 'close' : 'tab';
|
|
226
|
+
break;
|
|
227
|
+
case 27:
|
|
228
|
+
e.action = 'escape';
|
|
229
|
+
break;
|
|
230
|
+
case 32:
|
|
231
|
+
e.action = 'space';
|
|
232
|
+
break;
|
|
233
|
+
case 13:
|
|
234
|
+
e.action = 'enter';
|
|
235
|
+
break;
|
|
236
|
+
default:
|
|
237
|
+
isKeyAction = false;
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
if (isKeyAction) {
|
|
241
|
+
this.keyActionHandler(e);
|
|
242
|
+
}
|
|
243
|
+
};
|
|
220
244
|
Mention.prototype.keyActionHandler = function (e) {
|
|
221
245
|
var isNavigation = (e.action === 'down' || e.action === 'up' || e.action === 'pageUp' || e.action === 'pageDown'
|
|
222
246
|
|| e.action === 'home' || e.action === 'end');
|
|
@@ -295,7 +319,7 @@ var Mention = /** @class */ (function (_super) {
|
|
|
295
319
|
};
|
|
296
320
|
Mention.prototype.unBindCommonEvent = function () {
|
|
297
321
|
if (!Browser.isDevice) {
|
|
298
|
-
this.
|
|
322
|
+
this.inputElement.removeEventListener('keydown', this.keyDownHandler.bind(this), true);
|
|
299
323
|
}
|
|
300
324
|
};
|
|
301
325
|
Mention.prototype.onKeyUp = function (e) {
|
|
@@ -332,7 +356,7 @@ var Mention = /** @class */ (function (_super) {
|
|
|
332
356
|
this.range.startContainer.previousElementSibling && this.range.startContainer.previousElementSibling.tagName !== 'BR' && this.range.startContainer.textContent.split('').length > 0 &&
|
|
333
357
|
(rangetextContent.length === 1 || rangetextContent[rangetextContent.length - 2].indexOf('') === -1 ||
|
|
334
358
|
this.range.startContainer.nodeType === 1))) {
|
|
335
|
-
if (this.allowSpaces && currentRange && currentRange.trim() !== '' && charRegex.test(currentRange) && currentRange.indexOf(this.mentionChar) !== -1
|
|
359
|
+
if (this.isPopupOpen && this.allowSpaces && currentRange && currentRange.trim() !== '' && charRegex.test(currentRange) && currentRange.indexOf(this.mentionChar) !== -1
|
|
336
360
|
&& !this.isMatchedText() && (currentRange.length > 1 && currentRange.replace(/\u00A0/g, ' ').charAt(currentRange.length - 2) !== ' ') &&
|
|
337
361
|
(this.list && this.list.querySelectorAll('ul').length > 0)) {
|
|
338
362
|
this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace('\u00a0', ' ');
|
|
@@ -840,6 +864,9 @@ var Mention = /** @class */ (function (_super) {
|
|
|
840
864
|
this.popupObj.element.removeAttribute('style');
|
|
841
865
|
this.popupObj.element.removeAttribute('aria-disabled');
|
|
842
866
|
}
|
|
867
|
+
if (this.list.classList.contains('e-nodata')) {
|
|
868
|
+
this.list = null;
|
|
869
|
+
}
|
|
843
870
|
};
|
|
844
871
|
Mention.prototype.onDocumentClick = function (e) {
|
|
845
872
|
var target = e.target;
|
|
@@ -950,6 +977,7 @@ var Mention = /** @class */ (function (_super) {
|
|
|
950
977
|
return coordinates;
|
|
951
978
|
};
|
|
952
979
|
Mention.prototype.initValue = function () {
|
|
980
|
+
this.isDataFetched = false;
|
|
953
981
|
this.renderList();
|
|
954
982
|
if (this.dataSource instanceof DataManager) {
|
|
955
983
|
this.initRemoteRender = true;
|
|
@@ -975,7 +1003,7 @@ var Mention = /** @class */ (function (_super) {
|
|
|
975
1003
|
* @returns {void}
|
|
976
1004
|
*/
|
|
977
1005
|
Mention.prototype.wireListEvents = function () {
|
|
978
|
-
EventHandler.add(this.list, '
|
|
1006
|
+
EventHandler.add(this.list, 'mousedown', this.onMouseClick, this);
|
|
979
1007
|
EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);
|
|
980
1008
|
EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);
|
|
981
1009
|
};
|
|
@@ -985,7 +1013,7 @@ var Mention = /** @class */ (function (_super) {
|
|
|
985
1013
|
* @returns {void}
|
|
986
1014
|
*/
|
|
987
1015
|
Mention.prototype.unWireListEvents = function () {
|
|
988
|
-
EventHandler.remove(this.list, '
|
|
1016
|
+
EventHandler.remove(this.list, 'mousedown', this.onMouseClick);
|
|
989
1017
|
EventHandler.remove(this.list, 'mouseover', this.onMouseOver);
|
|
990
1018
|
EventHandler.remove(this.list, 'mouseout', this.onMouseLeave);
|
|
991
1019
|
};
|
|
@@ -1000,6 +1028,7 @@ var Mention = /** @class */ (function (_super) {
|
|
|
1000
1028
|
var delay = 100;
|
|
1001
1029
|
this.closePopup(delay, e);
|
|
1002
1030
|
this.inputElement.focus();
|
|
1031
|
+
e.preventDefault();
|
|
1003
1032
|
};
|
|
1004
1033
|
Mention.prototype.updateSelectedItem = function (li, e, preventSelect, isSelection) {
|
|
1005
1034
|
var _this = this;
|
package/styles/bootstrap.css
CHANGED
package/styles/bootstrap4.css
CHANGED
package/styles/bootstrap5.css
CHANGED