@syncfusion/ej2-dropdowns 24.1.41 → 24.1.43

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/ej2-dropdowns.min.js +2 -2
  3. package/dist/ej2-dropdowns.umd.min.js +2 -2
  4. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-dropdowns.es2015.js +38 -2
  6. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  7. package/dist/es6/ej2-dropdowns.es5.js +38 -2
  8. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  9. package/dist/global/ej2-dropdowns.min.js +2 -2
  10. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +6 -6
  13. package/src/auto-complete/auto-complete.js +1 -1
  14. package/src/drop-down-list/drop-down-list.js +27 -0
  15. package/src/list-box/list-box.d.ts +1 -0
  16. package/src/list-box/list-box.js +4 -0
  17. package/src/mention/mention.js +6 -1
  18. package/styles/bootstrap-dark.css +0 -3
  19. package/styles/bootstrap.css +0 -3
  20. package/styles/bootstrap4.css +0 -3
  21. package/styles/bootstrap5-dark.css +0 -3
  22. package/styles/bootstrap5.css +0 -3
  23. package/styles/drop-down-base/_layout.scss +0 -3
  24. package/styles/drop-down-base/bootstrap-dark.css +0 -3
  25. package/styles/drop-down-base/bootstrap.css +0 -3
  26. package/styles/drop-down-base/bootstrap4.css +0 -3
  27. package/styles/drop-down-base/bootstrap5-dark.css +0 -3
  28. package/styles/drop-down-base/bootstrap5.css +0 -3
  29. package/styles/drop-down-base/fabric-dark.css +0 -3
  30. package/styles/drop-down-base/fabric.css +0 -3
  31. package/styles/drop-down-base/fluent-dark.css +0 -3
  32. package/styles/drop-down-base/fluent.css +0 -3
  33. package/styles/drop-down-base/highcontrast-light.css +0 -3
  34. package/styles/drop-down-base/highcontrast.css +0 -3
  35. package/styles/drop-down-base/material-dark.css +0 -3
  36. package/styles/drop-down-base/material.css +0 -3
  37. package/styles/drop-down-base/material3-dark.css +0 -3
  38. package/styles/drop-down-base/material3.css +0 -3
  39. package/styles/drop-down-base/tailwind-dark.css +0 -3
  40. package/styles/drop-down-base/tailwind.css +0 -3
  41. package/styles/fabric-dark.css +0 -3
  42. package/styles/fabric.css +0 -3
  43. package/styles/fluent-dark.css +0 -3
  44. package/styles/fluent.css +0 -3
  45. package/styles/highcontrast-light.css +0 -3
  46. package/styles/highcontrast.css +0 -3
  47. package/styles/material-dark.css +0 -3
  48. package/styles/material.css +0 -3
  49. package/styles/material3-dark.css +0 -3
  50. package/styles/material3.css +0 -3
  51. package/styles/tailwind-dark.css +0 -3
  52. package/styles/tailwind.css +0 -3
@@ -3125,6 +3125,14 @@ let DropDownList = class DropDownList extends DropDownBase {
3125
3125
  this.activeIndex = filterIndex;
3126
3126
  }
3127
3127
  }
3128
+ if (this.allowFiltering && this.getModuleName() === 'dropdownlist') {
3129
+ if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-item-focus')[0])) {
3130
+ attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-item-focus')[0].id });
3131
+ }
3132
+ else if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-active')[0])) {
3133
+ attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-active')[0].id });
3134
+ }
3135
+ }
3128
3136
  e.preventDefault();
3129
3137
  }
3130
3138
  updateVirtualItemIndex() {
@@ -3258,6 +3266,14 @@ let DropDownList = class DropDownList extends DropDownBase {
3258
3266
  previousItem = this.liCollections[this.skeletonCount];
3259
3267
  }
3260
3268
  this.PageUpDownSelection(previousItem, event);
3269
+ if (this.allowFiltering && this.getModuleName() === 'dropdownlist') {
3270
+ if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-item-focus')[0])) {
3271
+ attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-item-focus')[0].id });
3272
+ }
3273
+ else if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-active')[0])) {
3274
+ attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-active')[0].id });
3275
+ }
3276
+ }
3261
3277
  }
3262
3278
  PageUpDownSelection(previousItem, event) {
3263
3279
  if (this.enableVirtualization) {
@@ -3276,6 +3292,14 @@ let DropDownList = class DropDownList extends DropDownBase {
3276
3292
  previousItem = steps <= list.length ? this.liCollections[steps + this.skeletonCount - 1] : this.liCollections[list.length - 1];
3277
3293
  }
3278
3294
  this.PageUpDownSelection(previousItem, event);
3295
+ if (this.allowFiltering && this.getModuleName() === 'dropdownlist') {
3296
+ if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-item-focus')[0])) {
3297
+ attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-item-focus')[0].id });
3298
+ }
3299
+ else if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-active')[0])) {
3300
+ attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-active')[0].id });
3301
+ }
3302
+ }
3279
3303
  }
3280
3304
  unWireEvent() {
3281
3305
  if (!isNullOrUndefined(this.inputWrapper)) {
@@ -4924,6 +4948,9 @@ let DropDownList = class DropDownList extends DropDownBase {
4924
4948
  EventHandler.remove(this.filterInput, 'blur', this.onBlurHandler);
4925
4949
  EventHandler.remove(this.filterInput, 'paste', this.pasteHandler);
4926
4950
  }
4951
+ if (this.allowFiltering && this.getModuleName() === 'dropdownlist') {
4952
+ this.filterInput.removeAttribute('aria-activedescendant');
4953
+ }
4927
4954
  this.filterInput = null;
4928
4955
  }
4929
4956
  attributes(this.targetElement(), { 'aria-expanded': 'false' });
@@ -10364,7 +10391,7 @@ let AutoComplete = class AutoComplete extends ComboBox {
10364
10391
  super.renderPopup(e);
10365
10392
  }
10366
10393
  isEditTextBox() {
10367
- return true && this.inputElement.value.trim() !== '';
10394
+ return false;
10368
10395
  }
10369
10396
  isPopupButton() {
10370
10397
  return this.showPopupButton;
@@ -15667,6 +15694,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
15667
15694
  this.initLoad = true;
15668
15695
  this.isCustomFiltering = false;
15669
15696
  this.initialSelectedOptions = this.value;
15697
+ this.inputFormName = this.element.getAttribute('name');
15670
15698
  super.render();
15671
15699
  this.setEnabled();
15672
15700
  this.renderComplete();
@@ -15813,6 +15841,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
15813
15841
  });
15814
15842
  }
15815
15843
  validationAttribute(input, hiddenSelect) {
15844
+ if (this.inputFormName) {
15845
+ input.setAttribute('name', this.inputFormName);
15846
+ }
15816
15847
  super.validationAttribute(input, hiddenSelect);
15817
15848
  hiddenSelect.required = input.required;
15818
15849
  input.required = false;
@@ -18267,12 +18298,17 @@ let Mention = class Mention extends DropDownBase {
18267
18298
  }
18268
18299
  let currentRange = this.getTextRange();
18269
18300
  const lastWordRange = this.getLastLetter(currentRange);
18301
+ const lastTwoLetters = this.mentionChar.toString() + this.mentionChar.toString();
18270
18302
  // eslint-disable-next-line security/detect-non-literal-regexp
18271
18303
  const Regex = new RegExp(this.mentionChar.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'g');
18272
18304
  const charRegex = new RegExp('[a-zA-Z]', 'g');
18273
18305
  if (e.key === 'Shift' || e.keyCode === 37 || e.keyCode === 39) {
18274
18306
  return;
18275
18307
  }
18308
+ if (this.beforePopupOpen && this.isPopupOpen && lastWordRange == lastTwoLetters) {
18309
+ this.hidePopup();
18310
+ return;
18311
+ }
18276
18312
  if ((!currentRange || !lastWordRange) || e.code === 'Enter' || e.keyCode === 27 ||
18277
18313
  (lastWordRange.match(Regex) && lastWordRange.match(Regex).length > 1) ||
18278
18314
  (this.isContentEditable(this.inputElement) && this.range.startContainer &&
@@ -18413,7 +18449,7 @@ let Mention = class Mention extends DropDownBase {
18413
18449
  this.selectEventCallback(focusItem, this.getDataByValue(value), value, true);
18414
18450
  }
18415
18451
  if (this.beforePopupOpen && this.isPopupOpen) {
18416
- if (this.initRemoteRender && !isNullOrUndefined(this.popupObj.element)) {
18452
+ if (!isNullOrUndefined(this.popupObj.element)) {
18417
18453
  this.popupObj.element.remove();
18418
18454
  }
18419
18455
  this.renderPopup();