@syncfusion/ej2-dropdowns 20.1.58 → 20.1.61

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.1.58
3
+ * version : 20.1.61
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.1.57",
3
+ "_id": "@syncfusion/ej2-dropdowns@20.1.60",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-YT/SVksfrteGQ4MLVTgCNbBfIWmkoYFYcdA92UgRv2XN2pcZOiAohaWpzAUGAWN4VNzPuxG8lvZLToqMJpfhjg==",
5
+ "_integrity": "sha512-aHTOFUFgu+ysWWEfqMJhUhe20OT8d8cSdZEGLsllLWDlBto01PBZPghN5r4VT5Z1a5csrrhpb1MPaT0BBRz2YA==",
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": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.1.57.tgz",
37
- "_shasum": "bf1f98dea47b77f896503a8901e3e3e1d0f473e2",
36
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.1.60.tgz",
37
+ "_shasum": "d9d21b8b330ff69b78eafaee6662aeabc3dd81e5",
38
38
  "_spec": "@syncfusion/ej2-dropdowns@*",
39
39
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
40
40
  "author": {
@@ -42,11 +42,11 @@
42
42
  },
43
43
  "bundleDependencies": false,
44
44
  "dependencies": {
45
- "@syncfusion/ej2-base": "~20.1.57",
45
+ "@syncfusion/ej2-base": "~20.1.61",
46
46
  "@syncfusion/ej2-data": "~20.1.55",
47
- "@syncfusion/ej2-inputs": "~20.1.58",
47
+ "@syncfusion/ej2-inputs": "~20.1.61",
48
48
  "@syncfusion/ej2-lists": "~20.1.55",
49
- "@syncfusion/ej2-navigations": "~20.1.58",
49
+ "@syncfusion/ej2-navigations": "~20.1.61",
50
50
  "@syncfusion/ej2-popups": "~20.1.58"
51
51
  },
52
52
  "deprecated": false,
@@ -72,6 +72,6 @@
72
72
  "module": "./index.js",
73
73
  "name": "@syncfusion/ej2-dropdowns",
74
74
  "typings": "index.d.ts",
75
- "version": "20.1.58",
75
+ "version": "20.1.61",
76
76
  "sideEffects": false
77
77
  }
@@ -1011,11 +1011,9 @@ var DropDownList = /** @class */ (function (_super) {
1011
1011
  if (this.setValue(e)) {
1012
1012
  return;
1013
1013
  }
1014
- if (this.isPopupOpen) {
1015
- attributes(this.targetElement(), { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
1016
- if (this.isFilterLayout() && this.filterInput) {
1017
- attributes(this.filterInput, { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
1018
- }
1014
+ attributes(this.targetElement(), { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
1015
+ if (this.isFilterLayout() && this.filterInput) {
1016
+ attributes(this.filterInput, { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
1019
1017
  }
1020
1018
  if ((!this.isPopupOpen && !isNullOrUndefined(li)) || (this.isPopupOpen && !isNullOrUndefined(e) &&
1021
1019
  (e.type !== 'keydown' || e.type === 'keydown' && e.action === 'enter'))) {
@@ -1048,13 +1046,21 @@ var DropDownList = /** @class */ (function (_super) {
1048
1046
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1049
1047
  if (this.isReact) {
1050
1048
  this.clearTemplate(['valueTemplate']);
1049
+ if (this.valueTempElement) {
1050
+ detach(this.valueTempElement);
1051
+ this.inputElement.style.display = 'block';
1052
+ this.valueTempElement = null;
1053
+ }
1051
1054
  }
1052
1055
  if (!this.valueTempElement) {
1053
1056
  this.valueTempElement = this.createElement('span', { className: dropDownListClasses.value });
1054
1057
  this.inputElement.parentElement.insertBefore(this.valueTempElement, this.inputElement);
1055
1058
  this.inputElement.style.display = 'none';
1056
1059
  }
1057
- this.valueTempElement.innerHTML = '';
1060
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1061
+ if (!this.isReact) {
1062
+ this.valueTempElement.innerHTML = '';
1063
+ }
1058
1064
  var valuecheck = this.dropdownCompiler(this.valueTemplate);
1059
1065
  if (valuecheck) {
1060
1066
  compiledString = compile(document.querySelector(this.valueTemplate).innerHTML.trim());
@@ -1981,7 +1987,7 @@ var DropDownList = /** @class */ (function (_super) {
1981
1987
  EventHandler.remove(this.filterInput, 'paste', this.pasteHandler);
1982
1988
  this.filterInput = null;
1983
1989
  }
1984
- attributes(this.targetElement(), { 'aria-expanded': 'false', 'aria-activedescendant': null });
1990
+ attributes(this.targetElement(), { 'aria-expanded': 'false' });
1985
1991
  this.inputWrapper.container.classList.remove(dropDownListClasses.iconAnimation);
1986
1992
  if (this.isFiltering()) {
1987
1993
  this.actionCompleteData.isUpdated = false;
@@ -2214,7 +2220,7 @@ var DropDownList = /** @class */ (function (_super) {
2214
2220
  || (!(props.dataSource instanceof DataManager) && props.dataSource.length === 0)))) {
2215
2221
  this.clearAll(null, props);
2216
2222
  }
2217
- if ((this.fields.groupBy && props.fields) && !this.isGroupChecking) {
2223
+ if ((this.fields.groupBy && props.fields) && !this.isGroupChecking && this.list) {
2218
2224
  EventHandler.remove(this.list, 'scroll', this.setFloatingHeader);
2219
2225
  EventHandler.add(this.list, 'scroll', this.setFloatingHeader, this);
2220
2226
  }
@@ -119,6 +119,7 @@ export declare class ListBox extends DropDownBase {
119
119
  private jsonData;
120
120
  private toolbarAction;
121
121
  private isDataSourceUpdate;
122
+ private dragValue;
122
123
  /**
123
124
  * Sets the CSS classes to root element of this component, which helps to customize the
124
125
  * complete styles.
@@ -134,6 +134,7 @@ var ListBox = /** @class */ (function (_super) {
134
134
  };
135
135
  ListBox.prototype.initWrapper = function () {
136
136
  var hiddenSelect = this.createElement('select', { className: 'e-hidden-select', attrs: { 'multiple': '' } });
137
+ hiddenSelect.style.visibility = 'hidden';
137
138
  this.list.classList.add('e-listbox-wrapper');
138
139
  if (this.itemTemplate) {
139
140
  this.list.classList.add('e-list-template');
@@ -462,12 +463,12 @@ var ListBox = /** @class */ (function (_super) {
462
463
  }
463
464
  };
464
465
  ListBox.prototype.beforeDragEnd = function (args) {
465
- var dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
466
- if (this.value.indexOf(dragValue) > -1) {
466
+ this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
467
+ if (this.value.indexOf(this.dragValue) > -1) {
467
468
  args.items = this.getDataByValues(this.value);
468
469
  }
469
470
  else {
470
- args.items = this.getDataByValues([dragValue]);
471
+ args.items = this.getDataByValues([this.dragValue]);
471
472
  }
472
473
  this.trigger('beforeDrop', args);
473
474
  };
@@ -1600,7 +1601,16 @@ var ListBox = /** @class */ (function (_super) {
1600
1601
  return listObj;
1601
1602
  };
1602
1603
  ListBox.prototype.getGrabbedItems = function () {
1603
- var elems = Array.prototype.slice.call(this.element.querySelectorAll('.e-grabbed'));
1604
+ for (var i = 0; i < this.value.length; i++) {
1605
+ if (this.value[i] === this.dragValue) {
1606
+ var liColl = this.list.querySelectorAll('[aria-selected="true"]');
1607
+ for (var i_1 = 0; i_1 < liColl.length; i_1++) {
1608
+ liColl[i_1].classList.add('e-grabbed');
1609
+ }
1610
+ break;
1611
+ }
1612
+ }
1613
+ var elems = Array.prototype.slice.call(this.element.nextElementSibling.querySelectorAll('.e-grabbed'));
1604
1614
  return elems;
1605
1615
  };
1606
1616
  ListBox.prototype.getDragArgs = function (args, isDragEnd) {
@@ -172,7 +172,7 @@ var MultiSelect = /** @class */ (function (_super) {
172
172
  else if (containerAttr.indexOf(htmlAttr) > -1) {
173
173
  this.overAllWrapper.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
174
174
  }
175
- else {
175
+ else if (htmlAttr !== 'size') {
176
176
  this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
177
177
  }
178
178
  break;
@@ -637,6 +637,9 @@ var MultiSelect = /** @class */ (function (_super) {
637
637
  };
638
638
  MultiSelect.prototype.getQuery = function (query) {
639
639
  var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query();
640
+ if (this.isFiltered) {
641
+ return filterQuery;
642
+ }
640
643
  if (this.filterAction) {
641
644
  if (this.targetElement() !== null) {
642
645
  var dataType = this.typeOfData(this.dataSource).typeof;
@@ -1202,7 +1205,6 @@ var MultiSelect = /** @class */ (function (_super) {
1202
1205
  if (!document.activeElement.classList.contains(FILTERINPUT)) {
1203
1206
  e.preventDefault();
1204
1207
  this.keyAction = true;
1205
- this.list.focus();
1206
1208
  }
1207
1209
  this.selectByKey(e);
1208
1210
  }