@syncfusion/ej2-dropdowns 20.3.58 → 20.3.59

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 : 20.3.58
3
+ * version : 20.3.59
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. 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@20.3.56",
3
+ "_id": "@syncfusion/ej2-dropdowns@20.3.58",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Hr6+gHo6gtVnaUWqIisrp1vcV5e8+Tx3Ff5DzpY7RErX8BEjZsNf5YQM7Gcq4pOB17AfhyH+lfIehfdqKv55rw==",
5
+ "_integrity": "sha512-pwXw+I7D7g8FQSCdAPVJf3V9W+h0qIXytD3FKQHi7qQYrxdRhDIHH/CGEHQ7sxYgpNKJElYQjlpMrKoPZLIo9g==",
6
6
  "_location": "/@syncfusion/ej2-dropdowns",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -33,8 +33,8 @@
33
33
  "/@syncfusion/ej2-spreadsheet",
34
34
  "/@syncfusion/ej2-vue-dropdowns"
35
35
  ],
36
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.3.56.tgz",
37
- "_shasum": "3d9eaac2b6206eca2d22474fc3ed667d0a66cf0f",
36
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.3.58.tgz",
37
+ "_shasum": "a74ca36401f4774bd62c42f7c345de22e3e05e41",
38
38
  "_spec": "@syncfusion/ej2-dropdowns@*",
39
39
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
40
40
  "author": {
@@ -47,7 +47,7 @@
47
47
  "@syncfusion/ej2-inputs": "~20.3.57",
48
48
  "@syncfusion/ej2-lists": "~20.3.56",
49
49
  "@syncfusion/ej2-navigations": "~20.3.58",
50
- "@syncfusion/ej2-popups": "~20.3.58"
50
+ "@syncfusion/ej2-popups": "~20.3.59"
51
51
  },
52
52
  "deprecated": false,
53
53
  "description": "Essential JS 2 DropDown Components",
@@ -72,6 +72,6 @@
72
72
  "module": "./index.js",
73
73
  "name": "@syncfusion/ej2-dropdowns",
74
74
  "typings": "index.d.ts",
75
- "version": "20.3.58",
75
+ "version": "20.3.59",
76
76
  "sideEffects": false
77
77
  }
@@ -275,7 +275,7 @@ var ComboBox = /** @class */ (function (_super) {
275
275
  this.itemData = this.getDataByValue(this.value);
276
276
  var dataItem = this.getItemData();
277
277
  if (!(this.allowCustom && isNullOrUndefined(dataItem.value) && isNullOrUndefined(dataItem.text))) {
278
- this.setProperties({ 'value': dataItem.value, 'text': dataItem.text }, !this.allowCustom);
278
+ this.setProperties({ 'value': dataItem.value }, !this.allowCustom);
279
279
  }
280
280
  };
281
281
  /**
@@ -705,18 +705,20 @@ var DropDownBase = /** @class */ (function (_super) {
705
705
  return extend({}, options, fields, true);
706
706
  };
707
707
  DropDownBase.prototype.setFloatingHeader = function (e) {
708
- if (isNullOrUndefined(this.fixedHeaderElement)) {
709
- this.fixedHeaderElement = this.createElement('div', { className: dropDownBaseClasses.fixedHead });
710
- if (!this.list.querySelector('li').classList.contains(dropDownBaseClasses.group)) {
711
- this.fixedHeaderElement.style.display = 'none';
708
+ if (!isNullOrUndefined(this.list) && !this.list.classList.contains(dropDownBaseClasses.noData)) {
709
+ if (isNullOrUndefined(this.fixedHeaderElement)) {
710
+ this.fixedHeaderElement = this.createElement('div', { className: dropDownBaseClasses.fixedHead });
711
+ if (!this.list.querySelector('li').classList.contains(dropDownBaseClasses.group)) {
712
+ this.fixedHeaderElement.style.display = 'none';
713
+ }
714
+ prepend([this.fixedHeaderElement], this.list);
715
+ this.setFixedHeader();
712
716
  }
713
- prepend([this.fixedHeaderElement], this.list);
714
- this.setFixedHeader();
715
- }
716
- if (!isNullOrUndefined(this.fixedHeaderElement) && this.fixedHeaderElement.style.zIndex === '0') {
717
- this.setFixedHeader();
717
+ if (!isNullOrUndefined(this.fixedHeaderElement) && this.fixedHeaderElement.style.zIndex === '0') {
718
+ this.setFixedHeader();
719
+ }
720
+ this.scrollStop(e);
718
721
  }
719
- this.scrollStop(e);
720
722
  };
721
723
  DropDownBase.prototype.scrollStop = function (e) {
722
724
  var target = !isNullOrUndefined(e) ? e.target : this.list;
@@ -1139,12 +1139,12 @@ var ListBox = /** @class */ (function (_super) {
1139
1139
  if (li && li.parentElement) {
1140
1140
  currSelIdx = [].slice.call(li.parentElement.children).indexOf(li);
1141
1141
  if (!this.selectionSettings.showCheckbox) {
1142
- if ((e.ctrlKey || Browser.isDevice) && this.isSelected(li)) {
1142
+ if ((e.ctrlKey || e.metaKey || Browser.isDevice) && this.isSelected(li)) {
1143
1143
  li.classList.remove(cssClass.selected);
1144
1144
  li.removeAttribute('aria-selected');
1145
1145
  isSelect = false;
1146
1146
  }
1147
- else if (!(this.selectionSettings.mode === 'Multiple' && (e.ctrlKey || Browser.isDevice))) {
1147
+ else if (!(this.selectionSettings.mode === 'Multiple' && (e.ctrlKey || e.metaKey || Browser.isDevice))) {
1148
1148
  this.getSelectedItems().forEach(function (ele) {
1149
1149
  ele.removeAttribute('aria-selected');
1150
1150
  });
@@ -1616,12 +1616,21 @@ var ListBox = /** @class */ (function (_super) {
1616
1616
  }
1617
1617
  return listObj;
1618
1618
  };
1619
- ListBox.prototype.getGrabbedItems = function () {
1619
+ ListBox.prototype.getGrabbedItems = function (args) {
1620
+ var grabbItems = false;
1620
1621
  for (var i = 0; i < this.value.length; i++) {
1621
- var liColl = this.list.querySelectorAll('[aria-selected="true"]');
1622
- for (var j = 0; j < liColl.length; j++) {
1623
- if (this.value[i] === liColl[j].textContent) {
1624
- liColl[j].classList.add('e-grabbed');
1622
+ if (this.value[i] === this.getFormattedValue(args.target.getAttribute('data-value'))) {
1623
+ grabbItems = true;
1624
+ break;
1625
+ }
1626
+ }
1627
+ if (grabbItems) {
1628
+ for (var i = 0; i < this.value.length; i++) {
1629
+ var liColl = this.list.querySelectorAll('[aria-selected="true"]');
1630
+ for (var j = 0; j < liColl.length; j++) {
1631
+ if (this.value[i] === this.getFormattedValue(liColl[j].getAttribute('data-value'))) {
1632
+ liColl[j].classList.add('e-grabbed');
1633
+ }
1625
1634
  }
1626
1635
  }
1627
1636
  }
@@ -1635,7 +1644,7 @@ var ListBox = /** @class */ (function (_super) {
1635
1644
  return elems;
1636
1645
  };
1637
1646
  ListBox.prototype.getDragArgs = function (args, isDragEnd) {
1638
- var elems = this.getGrabbedItems();
1647
+ var elems = this.getGrabbedItems(args);
1639
1648
  if (elems.length) {
1640
1649
  if (isDragEnd) {
1641
1650
  elems.push(args.target);