@syncfusion/ej2-dropdowns 24.1.41 → 24.1.44
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 +45 -0
- package/README.md +1 -1
- 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 +58 -8
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +58 -8
- 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 +7 -7
- package/src/auto-complete/auto-complete.js +1 -1
- package/src/drop-down-list/drop-down-list.js +29 -0
- package/src/drop-down-tree/drop-down-tree.js +1 -1
- package/src/list-box/list-box.d.ts +1 -0
- package/src/list-box/list-box.js +19 -3
- package/src/mention/mention.js +8 -3
- package/styles/bootstrap-dark.css +4 -3
- package/styles/bootstrap.css +4 -3
- package/styles/bootstrap4.css +4 -3
- package/styles/bootstrap5-dark.css +4 -3
- package/styles/bootstrap5.css +4 -3
- package/styles/drop-down-base/_layout.scss +0 -3
- package/styles/drop-down-base/bootstrap-dark.css +0 -3
- package/styles/drop-down-base/bootstrap.css +0 -3
- package/styles/drop-down-base/bootstrap4.css +0 -3
- package/styles/drop-down-base/bootstrap5-dark.css +0 -3
- package/styles/drop-down-base/bootstrap5.css +0 -3
- package/styles/drop-down-base/fabric-dark.css +0 -3
- package/styles/drop-down-base/fabric.css +0 -3
- package/styles/drop-down-base/fluent-dark.css +0 -3
- package/styles/drop-down-base/fluent.css +0 -3
- package/styles/drop-down-base/highcontrast-light.css +0 -3
- package/styles/drop-down-base/highcontrast.css +0 -3
- package/styles/drop-down-base/material-dark.css +0 -3
- package/styles/drop-down-base/material.css +0 -3
- package/styles/drop-down-base/material3-dark.css +0 -3
- package/styles/drop-down-base/material3.css +0 -3
- package/styles/drop-down-base/tailwind-dark.css +0 -3
- package/styles/drop-down-base/tailwind.css +0 -3
- package/styles/drop-down-tree/_layout.scss +5 -0
- package/styles/drop-down-tree/bootstrap-dark.css +4 -0
- package/styles/drop-down-tree/bootstrap.css +4 -0
- package/styles/drop-down-tree/bootstrap4.css +4 -0
- package/styles/drop-down-tree/bootstrap5-dark.css +4 -0
- package/styles/drop-down-tree/bootstrap5.css +4 -0
- package/styles/drop-down-tree/fabric-dark.css +4 -0
- package/styles/drop-down-tree/fabric.css +4 -0
- package/styles/drop-down-tree/fluent-dark.css +4 -0
- package/styles/drop-down-tree/fluent.css +4 -0
- package/styles/drop-down-tree/highcontrast-light.css +4 -0
- package/styles/drop-down-tree/highcontrast.css +4 -0
- package/styles/drop-down-tree/material-dark.css +4 -0
- package/styles/drop-down-tree/material.css +4 -0
- package/styles/drop-down-tree/material3-dark.css +4 -0
- package/styles/drop-down-tree/material3.css +4 -0
- package/styles/drop-down-tree/tailwind-dark.css +4 -0
- package/styles/drop-down-tree/tailwind.css +4 -0
- package/styles/fabric-dark.css +4 -3
- package/styles/fabric.css +4 -3
- package/styles/fluent-dark.css +4 -3
- package/styles/fluent.css +4 -3
- package/styles/highcontrast-light.css +4 -3
- package/styles/highcontrast.css +4 -3
- package/styles/material-dark.css +4 -3
- package/styles/material.css +4 -3
- package/styles/material3-dark.css +4 -3
- package/styles/material3.css +4 -3
- package/styles/tailwind-dark.css +4 -3
- package/styles/tailwind.css +4 -3
|
@@ -3004,6 +3004,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3004
3004
|
if (this.getModuleName() === 'dropdownlist') {
|
|
3005
3005
|
if (!this.beforePopupOpen) {
|
|
3006
3006
|
this.showPopup();
|
|
3007
|
+
e.preventDefault();
|
|
3007
3008
|
}
|
|
3008
3009
|
}
|
|
3009
3010
|
break;
|
|
@@ -3125,6 +3126,14 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3125
3126
|
this.activeIndex = filterIndex;
|
|
3126
3127
|
}
|
|
3127
3128
|
}
|
|
3129
|
+
if (this.allowFiltering && this.getModuleName() === 'dropdownlist') {
|
|
3130
|
+
if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-item-focus')[0])) {
|
|
3131
|
+
attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-item-focus')[0].id });
|
|
3132
|
+
}
|
|
3133
|
+
else if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-active')[0])) {
|
|
3134
|
+
attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-active')[0].id });
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3128
3137
|
e.preventDefault();
|
|
3129
3138
|
}
|
|
3130
3139
|
updateVirtualItemIndex() {
|
|
@@ -3258,6 +3267,14 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3258
3267
|
previousItem = this.liCollections[this.skeletonCount];
|
|
3259
3268
|
}
|
|
3260
3269
|
this.PageUpDownSelection(previousItem, event);
|
|
3270
|
+
if (this.allowFiltering && this.getModuleName() === 'dropdownlist') {
|
|
3271
|
+
if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-item-focus')[0])) {
|
|
3272
|
+
attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-item-focus')[0].id });
|
|
3273
|
+
}
|
|
3274
|
+
else if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-active')[0])) {
|
|
3275
|
+
attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-active')[0].id });
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3261
3278
|
}
|
|
3262
3279
|
PageUpDownSelection(previousItem, event) {
|
|
3263
3280
|
if (this.enableVirtualization) {
|
|
@@ -3276,6 +3293,14 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3276
3293
|
previousItem = steps <= list.length ? this.liCollections[steps + this.skeletonCount - 1] : this.liCollections[list.length - 1];
|
|
3277
3294
|
}
|
|
3278
3295
|
this.PageUpDownSelection(previousItem, event);
|
|
3296
|
+
if (this.allowFiltering && this.getModuleName() === 'dropdownlist') {
|
|
3297
|
+
if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-item-focus')[0])) {
|
|
3298
|
+
attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-item-focus')[0].id });
|
|
3299
|
+
}
|
|
3300
|
+
else if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-active')[0])) {
|
|
3301
|
+
attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-active')[0].id });
|
|
3302
|
+
}
|
|
3303
|
+
}
|
|
3279
3304
|
}
|
|
3280
3305
|
unWireEvent() {
|
|
3281
3306
|
if (!isNullOrUndefined(this.inputWrapper)) {
|
|
@@ -4405,6 +4430,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4405
4430
|
this.setFooterTemplate(popupEle);
|
|
4406
4431
|
}
|
|
4407
4432
|
document.body.appendChild(popupEle);
|
|
4433
|
+
popupEle.style.top = '0px';
|
|
4408
4434
|
if (this.enableVirtualization && this.itemTemplate) {
|
|
4409
4435
|
var listitems = popupEle.querySelectorAll('li.e-list-item:not(.e-virtual-list)');
|
|
4410
4436
|
this.listItemHeight = listitems.length > 0 ? Math.ceil(listitems[0].getBoundingClientRect().height) : 0;
|
|
@@ -4924,6 +4950,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4924
4950
|
EventHandler.remove(this.filterInput, 'blur', this.onBlurHandler);
|
|
4925
4951
|
EventHandler.remove(this.filterInput, 'paste', this.pasteHandler);
|
|
4926
4952
|
}
|
|
4953
|
+
if (this.allowFiltering && this.getModuleName() === 'dropdownlist') {
|
|
4954
|
+
this.filterInput.removeAttribute('aria-activedescendant');
|
|
4955
|
+
}
|
|
4927
4956
|
this.filterInput = null;
|
|
4928
4957
|
}
|
|
4929
4958
|
attributes(this.targetElement(), { 'aria-expanded': 'false' });
|
|
@@ -8450,7 +8479,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8450
8479
|
else {
|
|
8451
8480
|
this.treeObj.uncheckAll();
|
|
8452
8481
|
}
|
|
8453
|
-
this.checkSelectAll =
|
|
8482
|
+
this.checkSelectAll = state;
|
|
8454
8483
|
}
|
|
8455
8484
|
else if (this.allowMultiSelection) {
|
|
8456
8485
|
if (!state) {
|
|
@@ -10364,7 +10393,7 @@ let AutoComplete = class AutoComplete extends ComboBox {
|
|
|
10364
10393
|
super.renderPopup(e);
|
|
10365
10394
|
}
|
|
10366
10395
|
isEditTextBox() {
|
|
10367
|
-
return
|
|
10396
|
+
return false;
|
|
10368
10397
|
}
|
|
10369
10398
|
isPopupButton() {
|
|
10370
10399
|
return this.showPopupButton;
|
|
@@ -15667,6 +15696,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
15667
15696
|
this.initLoad = true;
|
|
15668
15697
|
this.isCustomFiltering = false;
|
|
15669
15698
|
this.initialSelectedOptions = this.value;
|
|
15699
|
+
this.inputFormName = this.element.getAttribute('name');
|
|
15670
15700
|
super.render();
|
|
15671
15701
|
this.setEnabled();
|
|
15672
15702
|
this.renderComplete();
|
|
@@ -15813,6 +15843,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
15813
15843
|
});
|
|
15814
15844
|
}
|
|
15815
15845
|
validationAttribute(input, hiddenSelect) {
|
|
15846
|
+
if (this.inputFormName) {
|
|
15847
|
+
input.setAttribute('name', this.inputFormName);
|
|
15848
|
+
}
|
|
15816
15849
|
super.validationAttribute(input, hiddenSelect);
|
|
15817
15850
|
hiddenSelect.required = input.required;
|
|
15818
15851
|
input.required = false;
|
|
@@ -15888,6 +15921,8 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
15888
15921
|
}
|
|
15889
15922
|
onActionComplete(ulElement, list, e) {
|
|
15890
15923
|
let searchEle;
|
|
15924
|
+
let filterElem;
|
|
15925
|
+
let txtLength;
|
|
15891
15926
|
if (this.allowFiltering && this.list.getElementsByClassName('e-filter-parent')[0]) {
|
|
15892
15927
|
searchEle = this.list.getElementsByClassName('e-filter-parent')[0].cloneNode(true);
|
|
15893
15928
|
}
|
|
@@ -15897,6 +15932,12 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
15897
15932
|
ulElement.removeChild(noRecElem);
|
|
15898
15933
|
}
|
|
15899
15934
|
}
|
|
15935
|
+
if (this.allowFiltering) {
|
|
15936
|
+
filterElem = this.list.getElementsByClassName('e-input-filter')[0];
|
|
15937
|
+
if (filterElem) {
|
|
15938
|
+
txtLength = filterElem.selectionStart;
|
|
15939
|
+
}
|
|
15940
|
+
}
|
|
15900
15941
|
super.onActionComplete(ulElement, list, e);
|
|
15901
15942
|
if (this.allowFiltering && !isNullOrUndefined(searchEle)) {
|
|
15902
15943
|
this.list.insertBefore(searchEle, this.list.firstElementChild);
|
|
@@ -15926,8 +15967,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
15926
15967
|
this.isDataSourceUpdate = false;
|
|
15927
15968
|
}
|
|
15928
15969
|
if (this.allowFiltering) {
|
|
15929
|
-
|
|
15930
|
-
const txtLength = this.filterInput.value.length;
|
|
15970
|
+
filterElem = this.list.getElementsByClassName('e-input-filter')[0];
|
|
15931
15971
|
filterElem.selectionStart = txtLength;
|
|
15932
15972
|
filterElem.selectionEnd = txtLength;
|
|
15933
15973
|
filterElem.focus();
|
|
@@ -17295,7 +17335,8 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
17295
17335
|
e.stopPropagation();
|
|
17296
17336
|
}
|
|
17297
17337
|
keyDownHandler(e) {
|
|
17298
|
-
if ([32, 35, 36, 37, 38, 39, 40, 65].indexOf(e.keyCode) > -1 && !this.allowFiltering
|
|
17338
|
+
if ([32, 35, 36, 37, 38, 39, 40, 65].indexOf(e.keyCode) > -1 && (!this.allowFiltering ||
|
|
17339
|
+
(this.allowFiltering && e.target !== this.filterInput))) {
|
|
17299
17340
|
if (e.target && e.target.className.indexOf('e-edit-template') > -1) {
|
|
17300
17341
|
return;
|
|
17301
17342
|
}
|
|
@@ -17388,6 +17429,10 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
17388
17429
|
}
|
|
17389
17430
|
}
|
|
17390
17431
|
KeyUp(e) {
|
|
17432
|
+
if (this.allowFiltering && e.ctrlKey && e.keyCode === 65) {
|
|
17433
|
+
e.preventDefault();
|
|
17434
|
+
return;
|
|
17435
|
+
}
|
|
17391
17436
|
const char = String.fromCharCode(e.keyCode);
|
|
17392
17437
|
const isWordCharacter = char.match(/\w/);
|
|
17393
17438
|
if (!isNullOrUndefined(isWordCharacter)) {
|
|
@@ -18267,16 +18312,21 @@ let Mention = class Mention extends DropDownBase {
|
|
|
18267
18312
|
}
|
|
18268
18313
|
let currentRange = this.getTextRange();
|
|
18269
18314
|
const lastWordRange = this.getLastLetter(currentRange);
|
|
18315
|
+
const lastTwoLetters = this.mentionChar.toString() + this.mentionChar.toString();
|
|
18270
18316
|
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
18271
18317
|
const Regex = new RegExp(this.mentionChar.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'g');
|
|
18272
18318
|
const charRegex = new RegExp('[a-zA-Z]', 'g');
|
|
18273
18319
|
if (e.key === 'Shift' || e.keyCode === 37 || e.keyCode === 39) {
|
|
18274
18320
|
return;
|
|
18275
18321
|
}
|
|
18322
|
+
if (this.beforePopupOpen && this.isPopupOpen && lastWordRange == lastTwoLetters) {
|
|
18323
|
+
this.hidePopup();
|
|
18324
|
+
return;
|
|
18325
|
+
}
|
|
18276
18326
|
if ((!currentRange || !lastWordRange) || e.code === 'Enter' || e.keyCode === 27 ||
|
|
18277
18327
|
(lastWordRange.match(Regex) && lastWordRange.match(Regex).length > 1) ||
|
|
18278
18328
|
(this.isContentEditable(this.inputElement) && this.range.startContainer &&
|
|
18279
|
-
this.range.startContainer.previousElementSibling && this.range.startContainer.textContent.split('').length > 0 &&
|
|
18329
|
+
this.range.startContainer.previousElementSibling && this.range.startContainer.previousElementSibling.tagName !== 'BR' && this.range.startContainer.textContent.split('').length > 0 &&
|
|
18280
18330
|
(rangetextContent.length === 1 || rangetextContent[rangetextContent.length - 2].indexOf('') === -1 ||
|
|
18281
18331
|
this.range.startContainer.nodeType === 1))) {
|
|
18282
18332
|
if (this.allowSpaces && currentRange && currentRange.trim() !== '' && charRegex.test(currentRange) && currentRange.indexOf(this.mentionChar) !== -1
|
|
@@ -18314,7 +18364,7 @@ let Mention = class Mention extends DropDownBase {
|
|
|
18314
18364
|
if (isNullOrUndefined(this.list)) {
|
|
18315
18365
|
this.initValue();
|
|
18316
18366
|
}
|
|
18317
|
-
if (!this.isPopupOpen && e.keyCode !== 38 && e.keyCode !== 40) {
|
|
18367
|
+
if (!this.isPopupOpen && e.keyCode !== 38 && e.keyCode !== 40 && this.queryString.length >= this.minLength) {
|
|
18318
18368
|
this.didPopupOpenByTypingInitialChar = true;
|
|
18319
18369
|
this.showPopup();
|
|
18320
18370
|
if (this.initRemoteRender && this.list.querySelectorAll('li').length === 0) {
|
|
@@ -18413,7 +18463,7 @@ let Mention = class Mention extends DropDownBase {
|
|
|
18413
18463
|
this.selectEventCallback(focusItem, this.getDataByValue(value), value, true);
|
|
18414
18464
|
}
|
|
18415
18465
|
if (this.beforePopupOpen && this.isPopupOpen) {
|
|
18416
|
-
if (
|
|
18466
|
+
if (!isNullOrUndefined(this.popupObj.element)) {
|
|
18417
18467
|
this.popupObj.element.remove();
|
|
18418
18468
|
}
|
|
18419
18469
|
this.renderPopup();
|