@syncfusion/ej2-dropdowns 20.4.49 → 20.4.51

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.4.49
3
+ * version : 20.4.51
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
Binary file
Binary file
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-dropdowns@*",
3
- "_id": "@syncfusion/ej2-dropdowns@20.4.48",
3
+ "_id": "@syncfusion/ej2-dropdowns@20.4.50",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Khb/UF5jFyPrtARpcvEhyFB+REWjReXx8IUGQrfdowWsusMfqab06YnYhYErBYeaLS8Udg07rad2Hw+HmLqEtA==",
5
+ "_integrity": "sha512-eM9u/NMiNf0ALQnzeydR08Pyl/taKOkUh7dmZ/yhP2kitP7wzyk/liuBCYv1FkaRzSNJput982qNWviias46eA==",
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.4.48.tgz",
37
- "_shasum": "4406ad026f994da04dc09ab9c333fd5beb379d27",
36
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.4.50.tgz",
37
+ "_shasum": "7c2dd526637735fef98843e78119e324c1794b9a",
38
38
  "_spec": "@syncfusion/ej2-dropdowns@*",
39
39
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
40
40
  "author": {
@@ -42,12 +42,12 @@
42
42
  },
43
43
  "bundleDependencies": false,
44
44
  "dependencies": {
45
- "@syncfusion/ej2-base": "~20.4.48",
45
+ "@syncfusion/ej2-base": "~20.4.51",
46
46
  "@syncfusion/ej2-data": "~20.4.48",
47
- "@syncfusion/ej2-inputs": "~20.4.48",
48
- "@syncfusion/ej2-lists": "~20.4.48",
49
- "@syncfusion/ej2-navigations": "~20.4.49",
50
- "@syncfusion/ej2-popups": "~20.4.49"
47
+ "@syncfusion/ej2-inputs": "~20.4.51",
48
+ "@syncfusion/ej2-lists": "~20.4.50",
49
+ "@syncfusion/ej2-navigations": "~20.4.51",
50
+ "@syncfusion/ej2-popups": "~20.4.51"
51
51
  },
52
52
  "deprecated": false,
53
53
  "description": "Essential JS 2 DropDown Components",
@@ -72,7 +72,7 @@
72
72
  "module": "./index.js",
73
73
  "name": "@syncfusion/ej2-dropdowns",
74
74
  "typings": "index.d.ts",
75
- "version": "20.4.49",
75
+ "version": "20.4.51",
76
76
  "sideEffects": false,
77
77
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
78
78
  }
@@ -209,7 +209,7 @@ var DropDownList = /** @class */ (function (_super) {
209
209
  }
210
210
  else {
211
211
  if (this.allowFiltering && this.getModuleName() !== 'autocomplete'
212
- && !isNullOrUndefined(this.actionCompleteData.ulElement) && !isNullOrUndefined(this.actionCompleteData.list)) {
212
+ && !isNullOrUndefined(this.actionCompleteData.ulElement) && !isNullOrUndefined(this.actionCompleteData.list) && this.actionCompleteData.list.length > 0) {
213
213
  this.onActionComplete(this.actionCompleteData.ulElement.cloneNode(true), this.actionCompleteData.list);
214
214
  }
215
215
  this.resetFocusElement();
@@ -638,7 +638,7 @@ var DropDownList = /** @class */ (function (_super) {
638
638
  }
639
639
  if (!this.readonly) {
640
640
  var isTabAction = e.action === 'tab' || e.action === 'close';
641
- if (this.list === undefined && !this.isRequested && !isTabAction && e.action !== 'escape') {
641
+ if (isNullOrUndefined(this.list) && !this.isRequested && !isTabAction && e.action !== 'escape') {
642
642
  this.searchKeyEvent = e;
643
643
  this.renderList(e);
644
644
  }
@@ -949,6 +949,9 @@ var DropDownList = /** @class */ (function (_super) {
949
949
  };
950
950
  DropDownList.prototype.selectEventCallback = function (li, e, preventSelect, selectedData, value) {
951
951
  this.previousItemData = (!isNullOrUndefined(this.itemData)) ? this.itemData : null;
952
+ if (this.itemData != selectedData) {
953
+ this.previousValue = (!isNullOrUndefined(this.itemData)) ? typeof this.itemData == "object" ? this.checkFieldValue(this.itemData, this.fields.value.split('.')) : this.itemData : null;
954
+ }
952
955
  this.item = li;
953
956
  this.itemData = selectedData;
954
957
  var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
@@ -631,7 +631,6 @@ var Mention = /** @class */ (function (_super) {
631
631
  }
632
632
  if (!isNullOrUndefined(_this.target)) {
633
633
  popupEle_1.id = _this.inputElement.id + '_popup';
634
- addClass([popupEle_1], ['e-mention', 'e-popup', 'e-popup-close']);
635
634
  }
636
635
  _this.listHeight = formatUnit(_this.popupHeight);
637
636
  if (!isNullOrUndefined(_this.list.querySelector('li')) && !_this.initRemoteRender) {
@@ -655,6 +654,7 @@ var Mention = /** @class */ (function (_super) {
655
654
  _this.initializePopup(popupEle_1, offsetValue, left);
656
655
  _this.checkCollision(popupEle_1);
657
656
  popupEle_1.style.visibility = 'visible';
657
+ addClass([popupEle_1], ['e-mention', 'e-popup', 'e-popup-close']);
658
658
  if (!isNullOrUndefined(_this.list)) {
659
659
  _this.unWireListEvents();
660
660
  _this.wireListEvents();
@@ -632,6 +632,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
632
632
  private scrollFocusStatus;
633
633
  private keyDownStatus;
634
634
  private onBlurHandler;
635
+ private calculateWidth;
635
636
  private checkPlaceholderSize;
636
637
  private setPlaceholderSize;
637
638
  private refreshInputHight;
@@ -882,11 +882,25 @@ var MultiSelect = /** @class */ (function (_super) {
882
882
  }
883
883
  this.checkPlaceholderSize();
884
884
  Input.createSpanElement(this.overAllWrapper, this.createElement);
885
- Input.calculateWidth(this.inputElement, this.overAllWrapper);
885
+ this.calculateWidth();
886
886
  if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
887
887
  this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
888
888
  }
889
889
  };
890
+ MultiSelect.prototype.calculateWidth = function () {
891
+ var elementWidth;
892
+ if (this.overAllWrapper) {
893
+ if (!this.showDropDownIcon || this.overAllWrapper.querySelector('.' + 'e-label-top')) {
894
+ elementWidth = this.overAllWrapper.clientWidth - 2 * (parseInt(getComputedStyle(this.inputElement).paddingRight));
895
+ }
896
+ else {
897
+ var downIconWidth = this.dropIcon.offsetWidth +
898
+ parseInt(getComputedStyle(this.dropIcon).marginRight);
899
+ elementWidth = this.overAllWrapper.clientWidth - (downIconWidth + 2 * (parseInt(getComputedStyle(this.inputElement).paddingRight)));
900
+ }
901
+ Input.calculateWidth(elementWidth, this.overAllWrapper, this.getModuleName());
902
+ }
903
+ };
890
904
  MultiSelect.prototype.checkPlaceholderSize = function () {
891
905
  if (this.showDropDownIcon) {
892
906
  var downIconWidth = this.dropIcon.offsetWidth +
@@ -993,6 +1007,7 @@ var MultiSelect = /** @class */ (function (_super) {
993
1007
  + ':not(.' + HIDE_LIST + ')') : [];
994
1008
  };
995
1009
  MultiSelect.prototype.focusInHandler = function (e) {
1010
+ var _this = this;
996
1011
  if (this.enabled) {
997
1012
  this.showOverAllClear();
998
1013
  this.inputFocus = true;
@@ -1023,7 +1038,9 @@ var MultiSelect = /** @class */ (function (_super) {
1023
1038
  if (this.isPopupOpen()) {
1024
1039
  this.refreshPopup();
1025
1040
  }
1026
- Input.calculateWidth(this.inputElement, this.overAllWrapper);
1041
+ setTimeout(function () {
1042
+ _this.calculateWidth();
1043
+ }, 150);
1027
1044
  return true;
1028
1045
  }
1029
1046
  else {
@@ -3027,7 +3044,7 @@ var MultiSelect = /** @class */ (function (_super) {
3027
3044
  overAllContainer = this.componentWrapper.offsetWidth -
3028
3045
  parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) -
3029
3046
  parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
3030
- if ((wrapperleng + downIconWidth + this.clearIconWidth) > overAllContainer) {
3047
+ if ((wrapperleng + downIconWidth + this.clearIconWidth) >= overAllContainer) {
3031
3048
  if (tempData !== undefined && tempData !== '') {
3032
3049
  temp = tempData;
3033
3050
  index = tempIndex + 1;
@@ -3036,7 +3053,7 @@ var MultiSelect = /** @class */ (function (_super) {
3036
3053
  remaining = this.value.length - index;
3037
3054
  wrapperleng = this.viewWrapper.offsetWidth +
3038
3055
  parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
3039
- while (((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) > overAllContainer) && wrapperleng !== 0
3056
+ while (((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) >= overAllContainer) && wrapperleng !== 0
3040
3057
  && this.viewWrapper.innerHTML !== '') {
3041
3058
  var textArr = [];
3042
3059
  this.viewWrapper.innerHTML = textArr.join(this.delimiterChar);
@@ -3046,7 +3063,7 @@ var MultiSelect = /** @class */ (function (_super) {
3046
3063
  }
3047
3064
  break;
3048
3065
  }
3049
- else if ((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) <= overAllContainer) {
3066
+ else if ((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) < overAllContainer) {
3050
3067
  tempData = data;
3051
3068
  tempIndex = index;
3052
3069
  }
@@ -3239,6 +3256,7 @@ var MultiSelect = /** @class */ (function (_super) {
3239
3256
  else {
3240
3257
  this.updateValue(event, li, state);
3241
3258
  }
3259
+ this.addValidInputClass();
3242
3260
  };
3243
3261
  MultiSelect.prototype.updateValue = function (event, li, state) {
3244
3262
  var _this = this;
@@ -3529,7 +3547,7 @@ var MultiSelect = /** @class */ (function (_super) {
3529
3547
  case 'cssClass':
3530
3548
  this.updateOldPropCssClass(oldProp.cssClass);
3531
3549
  this.updateCssClass();
3532
- Input.calculateWidth(this.inputElement.parentElement.parentElement, this.overAllWrapper);
3550
+ this.calculateWidth();
3533
3551
  break;
3534
3552
  case 'enableRtl':
3535
3553
  this.enableRTL(newProp.enableRtl);
@@ -3557,7 +3575,7 @@ var MultiSelect = /** @class */ (function (_super) {
3557
3575
  this.setFloatLabelType();
3558
3576
  this.addValidInputClass();
3559
3577
  Input.createSpanElement(this.overAllWrapper, this.createElement);
3560
- Input.calculateWidth(this.inputElement.parentElement.parentElement, this.overAllWrapper);
3578
+ this.calculateWidth();
3561
3579
  if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
3562
3580
  this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
3563
3581
  }
@@ -3907,7 +3925,7 @@ var MultiSelect = /** @class */ (function (_super) {
3907
3925
  this.element.setAttribute('data-val', 'false');
3908
3926
  }
3909
3927
  Input.createSpanElement(this.overAllWrapper, this.createElement);
3910
- Input.calculateWidth(this.inputElement.parentElement.parentElement, this.overAllWrapper);
3928
+ this.calculateWidth();
3911
3929
  if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
3912
3930
  this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
3913
3931
  }