@syncfusion/ej2-dropdowns 27.1.58 → 27.2.2

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 27.1.58
3
+ * version : 27.2.2
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@27.1.57",
3
+ "_id": "@syncfusion/ej2-dropdowns@27.1.58",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Wlx3Rh/QcyuQsIkkadZ4XEtLLPXJt1ktioGAc/1nMFb+EmMXysRi04CRatf/qDVTor9CgmMQVre6ZJUVNJxXBg==",
5
+ "_integrity": "sha512-9SUhKFl1urV+lHSkG2uYcJeTXRJN2aUcGoaJxcCovtaLw3H2SA5l4x5tcPaEe2KzxrKMSXZlJF+RGNyV0H2BNw==",
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-27.1.57.tgz",
40
- "_shasum": "629960d9f8c025a1c569299dce79c93435241046",
39
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-27.1.58.tgz",
40
+ "_shasum": "3374dba3a9328883a060485ac5831397bacc1005",
41
41
  "_spec": "@syncfusion/ej2-dropdowns@*",
42
42
  "_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
43
43
  "author": {
@@ -45,13 +45,13 @@
45
45
  },
46
46
  "bundleDependencies": false,
47
47
  "dependencies": {
48
- "@syncfusion/ej2-base": "~27.1.55",
49
- "@syncfusion/ej2-data": "~27.1.52",
50
- "@syncfusion/ej2-inputs": "~27.1.58",
51
- "@syncfusion/ej2-lists": "~27.1.50",
52
- "@syncfusion/ej2-navigations": "~27.1.58",
53
- "@syncfusion/ej2-notifications": "~27.1.50",
54
- "@syncfusion/ej2-popups": "~27.1.58"
48
+ "@syncfusion/ej2-base": "~27.2.2",
49
+ "@syncfusion/ej2-data": "~27.2.2",
50
+ "@syncfusion/ej2-inputs": "~27.2.2",
51
+ "@syncfusion/ej2-lists": "~27.2.2",
52
+ "@syncfusion/ej2-navigations": "~27.2.2",
53
+ "@syncfusion/ej2-notifications": "~27.2.2",
54
+ "@syncfusion/ej2-popups": "~27.2.2"
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": "27.1.58",
79
+ "version": "27.2.2",
80
80
  "sideEffects": false,
81
81
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
82
82
  }
@@ -959,6 +959,11 @@ var DropDownTree = /** @class */ (function (_super) {
959
959
  _this.checkAllParent.focus();
960
960
  }
961
961
  break;
962
+ case 'tab':
963
+ if (!_this.isPopupOpen && _this.inputFocus) {
964
+ _this.onFocusOut();
965
+ }
966
+ break;
962
967
  }
963
968
  }
964
969
  });
@@ -53,6 +53,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
53
53
  private isCustomRendered;
54
54
  private isRemoteSelection;
55
55
  private isSelectAllTarget;
56
+ private isClearAllItem;
56
57
  private previousFocusItem;
57
58
  private isRemoveSelection;
58
59
  private currentRemoveValue;
@@ -754,6 +755,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
754
755
  private setFooterTemplate;
755
756
  private updateInitialData;
756
757
  private clearAll;
758
+ private preventSelection;
757
759
  private clearAllCallback;
758
760
  private windowResize;
759
761
  private resetValueHandler;
@@ -3196,6 +3196,15 @@ var MultiSelect = /** @class */ (function (_super) {
3196
3196
  this.previousEndIndex = 0;
3197
3197
  }
3198
3198
  }
3199
+ this.isClearAllItem = true;
3200
+ EventHandler.add(document, 'mouseup', this.preventSelection, this);
3201
+ };
3202
+ MultiSelect.prototype.preventSelection = function (e) {
3203
+ if (this.isClearAllItem) {
3204
+ e.stopPropagation();
3205
+ }
3206
+ this.isClearAllItem = false;
3207
+ EventHandler.remove(document, 'mouseup', this.preventSelection);
3199
3208
  };
3200
3209
  MultiSelect.prototype.clearAllCallback = function (e, isClearAll) {
3201
3210
  var tempValues = this.value ? this.value.slice() : [];
@@ -3960,127 +3969,131 @@ var MultiSelect = /** @class */ (function (_super) {
3960
3969
  };
3961
3970
  MultiSelect.prototype.onMouseClick = function (e) {
3962
3971
  var _this = this;
3963
- this.keyCode = null;
3964
- this.scrollFocusStatus = false;
3965
- this.keyboardEvent = null;
3966
- var target = e.target;
3967
- var li = closest(target, '.' + dropDownBaseClasses.li);
3968
- if (this.enableVirtualization && li && li.classList.contains('e-virtual-list')) {
3969
- return;
3970
- }
3971
- var headerLi = closest(target, '.' + dropDownBaseClasses.group);
3972
- if (headerLi && this.enableGroupCheckBox && this.mode === 'CheckBox' && this.fields.groupBy) {
3973
- target = target.classList.contains('e-list-group-item') ? target.firstElementChild.lastElementChild
3974
- : e.target;
3975
- if (target.classList.contains('e-check')) {
3976
- this.selectAllItem(false, e);
3977
- target.classList.remove('e-check');
3978
- target.classList.remove('e-stop');
3979
- closest(target, '.' + 'e-list-group-item').classList.remove('e-active');
3980
- target.setAttribute('aria-selected', 'false');
3981
- }
3982
- else {
3983
- this.selectAllItem(true, e);
3984
- target.classList.remove('e-stop');
3985
- target.classList.add('e-check');
3986
- closest(target, '.' + 'e-list-group-item').classList.add('e-active');
3987
- target.setAttribute('aria-selected', 'true');
3972
+ if (!this.isClearAllItem) {
3973
+ this.keyCode = null;
3974
+ this.scrollFocusStatus = false;
3975
+ this.keyboardEvent = null;
3976
+ var target = e.target;
3977
+ var li = closest(target, '.' + dropDownBaseClasses.li);
3978
+ if (this.enableVirtualization && li && li.classList.contains('e-virtual-list')) {
3979
+ return;
3988
3980
  }
3989
- this.refreshSelection();
3990
- this.checkSelectAll();
3991
- }
3992
- else {
3993
- if (this.isValidLI(li)) {
3994
- var limit = this.value && this.value.length ? this.value.length : 0;
3995
- if (li.classList.contains('e-active')) {
3996
- limit = limit - 1;
3981
+ var headerLi = closest(target, '.' + dropDownBaseClasses.group);
3982
+ if (headerLi && this.enableGroupCheckBox && this.mode === 'CheckBox' && this.fields.groupBy) {
3983
+ target = target.classList.contains('e-list-group-item') ? target.firstElementChild.lastElementChild
3984
+ : e.target;
3985
+ if (target.classList.contains('e-check')) {
3986
+ this.selectAllItem(false, e);
3987
+ target.classList.remove('e-check');
3988
+ target.classList.remove('e-stop');
3989
+ closest(target, '.' + 'e-list-group-item').classList.remove('e-active');
3990
+ target.setAttribute('aria-selected', 'false');
3997
3991
  }
3998
- if (limit < this.maximumSelectionLength) {
3999
- this.updateListSelection(li, e);
4000
- this.checkPlaceholderSize();
4001
- this.addListFocus(li);
4002
- if ((this.allowCustomValue || this.allowFiltering) && this.mainList && this.listData) {
4003
- if (this.mode !== 'CheckBox') {
4004
- this.focusAtLastListItem(li.getAttribute('data-value'));
4005
- this.refreshSelection();
3992
+ else {
3993
+ this.selectAllItem(true, e);
3994
+ target.classList.remove('e-stop');
3995
+ target.classList.add('e-check');
3996
+ closest(target, '.' + 'e-list-group-item').classList.add('e-active');
3997
+ target.setAttribute('aria-selected', 'true');
3998
+ }
3999
+ this.refreshSelection();
4000
+ this.checkSelectAll();
4001
+ }
4002
+ else {
4003
+ if (this.isValidLI(li)) {
4004
+ var limit = this.value && this.value.length ? this.value.length : 0;
4005
+ if (li.classList.contains('e-active')) {
4006
+ limit = limit - 1;
4007
+ }
4008
+ if (limit < this.maximumSelectionLength) {
4009
+ this.updateListSelection(li, e);
4010
+ this.checkPlaceholderSize();
4011
+ this.addListFocus(li);
4012
+ if ((this.allowCustomValue || this.allowFiltering) && this.mainList && this.listData) {
4013
+ if (this.mode !== 'CheckBox') {
4014
+ this.focusAtLastListItem(li.getAttribute('data-value'));
4015
+ this.refreshSelection();
4016
+ }
4006
4017
  }
4018
+ else {
4019
+ this.makeTextBoxEmpty();
4020
+ }
4021
+ }
4022
+ if (this.mode === 'CheckBox') {
4023
+ this.updateDelimView();
4024
+ if (this.value && this.value.length > 50) {
4025
+ setTimeout(function () {
4026
+ _this.updateDelimeter(_this.delimiterChar, e);
4027
+ }, 0);
4028
+ }
4029
+ else {
4030
+ this.updateDelimeter(this.delimiterChar, e);
4031
+ }
4032
+ this.refreshInputHight();
4007
4033
  }
4008
4034
  else {
4009
- this.makeTextBoxEmpty();
4035
+ this.updateDelimeter(this.delimiterChar, e);
4010
4036
  }
4011
- }
4012
- if (this.mode === 'CheckBox') {
4013
- this.updateDelimView();
4014
- if (this.value && this.value.length > 50) {
4015
- setTimeout(function () {
4016
- _this.updateDelimeter(_this.delimiterChar, e);
4017
- }, 0);
4037
+ this.checkSelectAll();
4038
+ this.refreshPopup();
4039
+ if (this.hideSelectedItem) {
4040
+ this.focusAtFirstListItem();
4041
+ }
4042
+ if (this.closePopupOnSelect) {
4043
+ this.hidePopup(e);
4018
4044
  }
4019
4045
  else {
4020
- this.updateDelimeter(this.delimiterChar, e);
4046
+ e.preventDefault();
4047
+ }
4048
+ var isFilterData = this.targetElement().trim() !== '' ? true : false;
4049
+ this.makeTextBoxEmpty();
4050
+ this.findGroupStart(target);
4051
+ if (this.mode !== 'CheckBox') {
4052
+ this.refreshListItems(isNullOrUndefined(li) ? null : li.textContent, isFilterData);
4021
4053
  }
4022
- this.refreshInputHight();
4023
- }
4024
- else {
4025
- this.updateDelimeter(this.delimiterChar, e);
4026
- }
4027
- this.checkSelectAll();
4028
- this.refreshPopup();
4029
- if (this.hideSelectedItem) {
4030
- this.focusAtFirstListItem();
4031
- }
4032
- if (this.closePopupOnSelect) {
4033
- this.hidePopup(e);
4034
4054
  }
4035
4055
  else {
4036
4056
  e.preventDefault();
4037
4057
  }
4038
- var isFilterData = this.targetElement().trim() !== '' ? true : false;
4039
- this.makeTextBoxEmpty();
4040
- this.findGroupStart(target);
4041
- if (this.mode !== 'CheckBox') {
4042
- this.refreshListItems(isNullOrUndefined(li) ? null : li.textContent, isFilterData);
4043
- }
4044
- }
4045
- else {
4046
- e.preventDefault();
4047
- }
4048
- if (this.enableVirtualization && this.hideSelectedItem) {
4049
- var visibleListElements = this.list.querySelectorAll('li.'
4050
- + dropDownBaseClasses.li
4051
- + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)' + ':not(.e-virtual-list)');
4052
- if (visibleListElements.length) {
4053
- var actualCount = this.virtualListHeight > 0 ? Math.floor(this.virtualListHeight / this.listItemHeight) : 0;
4054
- if (visibleListElements.length < (actualCount + 2)) {
4055
- var query = this.getForQuery(this.value).clone();
4056
- query = query.skip(this.virtualItemStartIndex);
4057
- this.resetList(this.dataSource, this.fields, query);
4058
- this.UpdateSkeleton();
4059
- this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
4060
- this.virtualItemCount = this.itemCount;
4061
- if (this.mode !== 'CheckBox') {
4062
- this.totalItemCount = this.value && this.value.length ? this.totalItemCount - this.value.length :
4063
- this.totalItemCount;
4064
- }
4065
- if (!this.list.querySelector('.e-virtual-ddl')) {
4066
- var virualElement = this.createElement('div', {
4067
- id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
4068
- });
4069
- this.popupWrapper.querySelector('.e-dropdownbase').appendChild(virualElement);
4070
- }
4071
- else {
4072
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4073
- this.list.getElementsByClassName('e-virtual-ddl')[0].style = this.GetVirtualTrackHeight();
4074
- }
4075
- if (this.list.querySelector('.e-virtual-ddl-content')) {
4076
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4077
- this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();
4058
+ if (this.enableVirtualization && this.hideSelectedItem) {
4059
+ var visibleListElements = this.list.querySelectorAll('li.'
4060
+ + dropDownBaseClasses.li
4061
+ + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)' + ':not(.e-virtual-list)');
4062
+ if (visibleListElements.length) {
4063
+ var actualCount = this.virtualListHeight > 0 ?
4064
+ Math.floor(this.virtualListHeight / this.listItemHeight) : 0;
4065
+ if (visibleListElements.length < (actualCount + 2)) {
4066
+ var query = this.getForQuery(this.value).clone();
4067
+ query = query.skip(this.virtualItemStartIndex);
4068
+ this.resetList(this.dataSource, this.fields, query);
4069
+ this.UpdateSkeleton();
4070
+ this.liCollections = this.list.querySelectorAll('.'
4071
+ + dropDownBaseClasses.li);
4072
+ this.virtualItemCount = this.itemCount;
4073
+ if (this.mode !== 'CheckBox') {
4074
+ this.totalItemCount = this.value && this.value.length ? this.totalItemCount - this.value.length :
4075
+ this.totalItemCount;
4076
+ }
4077
+ if (!this.list.querySelector('.e-virtual-ddl')) {
4078
+ var virualElement = this.createElement('div', {
4079
+ id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
4080
+ });
4081
+ this.popupWrapper.querySelector('.e-dropdownbase').appendChild(virualElement);
4082
+ }
4083
+ else {
4084
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4085
+ this.list.getElementsByClassName('e-virtual-ddl')[0].style = this.GetVirtualTrackHeight();
4086
+ }
4087
+ if (this.list.querySelector('.e-virtual-ddl-content')) {
4088
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4089
+ this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();
4090
+ }
4078
4091
  }
4079
4092
  }
4080
4093
  }
4094
+ this.refreshPlaceHolder();
4095
+ this.deselectHeader();
4081
4096
  }
4082
- this.refreshPlaceHolder();
4083
- this.deselectHeader();
4084
4097
  }
4085
4098
  };
4086
4099
  MultiSelect.prototype.findGroupStart = function (target) {