@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.
- package/CHANGELOG.md +2 -0
- package/GitLeaksReport.json +1 -0
- package/dist/ej2-dropdowns.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +31 -11
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +32 -11
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +2 -2
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/gitleaks-ci/gitleaks +0 -0
- package/gitleaks-ci.tar.gz +0 -0
- package/package.json +10 -10
- package/src/drop-down-list/drop-down-list.js +5 -2
- package/src/mention/mention.js +1 -1
- package/src/multi-select/multi-select.d.ts +1 -0
- package/src/multi-select/multi-select.js +26 -8
|
@@ -1701,7 +1701,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
1701
1701
|
}
|
|
1702
1702
|
else {
|
|
1703
1703
|
if (this.allowFiltering && this.getModuleName() !== 'autocomplete'
|
|
1704
|
-
&& !isNullOrUndefined(this.actionCompleteData.ulElement) && !isNullOrUndefined(this.actionCompleteData.list)) {
|
|
1704
|
+
&& !isNullOrUndefined(this.actionCompleteData.ulElement) && !isNullOrUndefined(this.actionCompleteData.list) && this.actionCompleteData.list.length > 0) {
|
|
1705
1705
|
this.onActionComplete(this.actionCompleteData.ulElement.cloneNode(true), this.actionCompleteData.list);
|
|
1706
1706
|
}
|
|
1707
1707
|
this.resetFocusElement();
|
|
@@ -2130,7 +2130,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2130
2130
|
}
|
|
2131
2131
|
if (!this.readonly) {
|
|
2132
2132
|
var isTabAction = e.action === 'tab' || e.action === 'close';
|
|
2133
|
-
if (this.list
|
|
2133
|
+
if (isNullOrUndefined(this.list) && !this.isRequested && !isTabAction && e.action !== 'escape') {
|
|
2134
2134
|
this.searchKeyEvent = e;
|
|
2135
2135
|
this.renderList(e);
|
|
2136
2136
|
}
|
|
@@ -2441,6 +2441,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2441
2441
|
};
|
|
2442
2442
|
DropDownList.prototype.selectEventCallback = function (li, e, preventSelect, selectedData, value) {
|
|
2443
2443
|
this.previousItemData = (!isNullOrUndefined(this.itemData)) ? this.itemData : null;
|
|
2444
|
+
if (this.itemData != selectedData) {
|
|
2445
|
+
this.previousValue = (!isNullOrUndefined(this.itemData)) ? typeof this.itemData == "object" ? this.checkFieldValue(this.itemData, this.fields.value.split('.')) : this.itemData : null;
|
|
2446
|
+
}
|
|
2444
2447
|
this.item = li;
|
|
2445
2448
|
this.itemData = selectedData;
|
|
2446
2449
|
var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
|
|
@@ -9886,11 +9889,25 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9886
9889
|
}
|
|
9887
9890
|
this.checkPlaceholderSize();
|
|
9888
9891
|
Input.createSpanElement(this.overAllWrapper, this.createElement);
|
|
9889
|
-
|
|
9892
|
+
this.calculateWidth();
|
|
9890
9893
|
if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
|
|
9891
9894
|
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
|
|
9892
9895
|
}
|
|
9893
9896
|
};
|
|
9897
|
+
MultiSelect.prototype.calculateWidth = function () {
|
|
9898
|
+
var elementWidth;
|
|
9899
|
+
if (this.overAllWrapper) {
|
|
9900
|
+
if (!this.showDropDownIcon || this.overAllWrapper.querySelector('.' + 'e-label-top')) {
|
|
9901
|
+
elementWidth = this.overAllWrapper.clientWidth - 2 * (parseInt(getComputedStyle(this.inputElement).paddingRight));
|
|
9902
|
+
}
|
|
9903
|
+
else {
|
|
9904
|
+
var downIconWidth = this.dropIcon.offsetWidth +
|
|
9905
|
+
parseInt(getComputedStyle(this.dropIcon).marginRight);
|
|
9906
|
+
elementWidth = this.overAllWrapper.clientWidth - (downIconWidth + 2 * (parseInt(getComputedStyle(this.inputElement).paddingRight)));
|
|
9907
|
+
}
|
|
9908
|
+
Input.calculateWidth(elementWidth, this.overAllWrapper, this.getModuleName());
|
|
9909
|
+
}
|
|
9910
|
+
};
|
|
9894
9911
|
MultiSelect.prototype.checkPlaceholderSize = function () {
|
|
9895
9912
|
if (this.showDropDownIcon) {
|
|
9896
9913
|
var downIconWidth = this.dropIcon.offsetWidth +
|
|
@@ -9997,6 +10014,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9997
10014
|
+ ':not(.' + HIDE_LIST + ')') : [];
|
|
9998
10015
|
};
|
|
9999
10016
|
MultiSelect.prototype.focusInHandler = function (e) {
|
|
10017
|
+
var _this = this;
|
|
10000
10018
|
if (this.enabled) {
|
|
10001
10019
|
this.showOverAllClear();
|
|
10002
10020
|
this.inputFocus = true;
|
|
@@ -10027,7 +10045,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
10027
10045
|
if (this.isPopupOpen()) {
|
|
10028
10046
|
this.refreshPopup();
|
|
10029
10047
|
}
|
|
10030
|
-
|
|
10048
|
+
setTimeout(function () {
|
|
10049
|
+
_this.calculateWidth();
|
|
10050
|
+
}, 150);
|
|
10031
10051
|
return true;
|
|
10032
10052
|
}
|
|
10033
10053
|
else {
|
|
@@ -12031,7 +12051,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12031
12051
|
overAllContainer = this.componentWrapper.offsetWidth -
|
|
12032
12052
|
parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) -
|
|
12033
12053
|
parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
|
|
12034
|
-
if ((wrapperleng + downIconWidth + this.clearIconWidth)
|
|
12054
|
+
if ((wrapperleng + downIconWidth + this.clearIconWidth) >= overAllContainer) {
|
|
12035
12055
|
if (tempData !== undefined && tempData !== '') {
|
|
12036
12056
|
temp = tempData;
|
|
12037
12057
|
index = tempIndex + 1;
|
|
@@ -12040,7 +12060,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12040
12060
|
remaining = this.value.length - index;
|
|
12041
12061
|
wrapperleng = this.viewWrapper.offsetWidth +
|
|
12042
12062
|
parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
|
|
12043
|
-
while (((wrapperleng + remainSize + downIconWidth + this.clearIconWidth)
|
|
12063
|
+
while (((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) >= overAllContainer) && wrapperleng !== 0
|
|
12044
12064
|
&& this.viewWrapper.innerHTML !== '') {
|
|
12045
12065
|
var textArr = [];
|
|
12046
12066
|
this.viewWrapper.innerHTML = textArr.join(this.delimiterChar);
|
|
@@ -12050,7 +12070,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12050
12070
|
}
|
|
12051
12071
|
break;
|
|
12052
12072
|
}
|
|
12053
|
-
else if ((wrapperleng + remainSize + downIconWidth + this.clearIconWidth)
|
|
12073
|
+
else if ((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) < overAllContainer) {
|
|
12054
12074
|
tempData = data;
|
|
12055
12075
|
tempIndex = index;
|
|
12056
12076
|
}
|
|
@@ -12243,6 +12263,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12243
12263
|
else {
|
|
12244
12264
|
this.updateValue(event, li, state);
|
|
12245
12265
|
}
|
|
12266
|
+
this.addValidInputClass();
|
|
12246
12267
|
};
|
|
12247
12268
|
MultiSelect.prototype.updateValue = function (event, li, state) {
|
|
12248
12269
|
var _this = this;
|
|
@@ -12533,7 +12554,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12533
12554
|
case 'cssClass':
|
|
12534
12555
|
this.updateOldPropCssClass(oldProp.cssClass);
|
|
12535
12556
|
this.updateCssClass();
|
|
12536
|
-
|
|
12557
|
+
this.calculateWidth();
|
|
12537
12558
|
break;
|
|
12538
12559
|
case 'enableRtl':
|
|
12539
12560
|
this.enableRTL(newProp.enableRtl);
|
|
@@ -12561,7 +12582,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12561
12582
|
this.setFloatLabelType();
|
|
12562
12583
|
this.addValidInputClass();
|
|
12563
12584
|
Input.createSpanElement(this.overAllWrapper, this.createElement);
|
|
12564
|
-
|
|
12585
|
+
this.calculateWidth();
|
|
12565
12586
|
if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
|
|
12566
12587
|
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
|
|
12567
12588
|
}
|
|
@@ -12911,7 +12932,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12911
12932
|
this.element.setAttribute('data-val', 'false');
|
|
12912
12933
|
}
|
|
12913
12934
|
Input.createSpanElement(this.overAllWrapper, this.createElement);
|
|
12914
|
-
|
|
12935
|
+
this.calculateWidth();
|
|
12915
12936
|
if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
|
|
12916
12937
|
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
|
|
12917
12938
|
}
|
|
@@ -16762,7 +16783,6 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
16762
16783
|
}
|
|
16763
16784
|
if (!isNullOrUndefined(_this.target)) {
|
|
16764
16785
|
popupEle_1.id = _this.inputElement.id + '_popup';
|
|
16765
|
-
addClass([popupEle_1], ['e-mention', 'e-popup', 'e-popup-close']);
|
|
16766
16786
|
}
|
|
16767
16787
|
_this.listHeight = formatUnit(_this.popupHeight);
|
|
16768
16788
|
if (!isNullOrUndefined(_this.list.querySelector('li')) && !_this.initRemoteRender) {
|
|
@@ -16786,6 +16806,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
16786
16806
|
_this.initializePopup(popupEle_1, offsetValue, left);
|
|
16787
16807
|
_this.checkCollision(popupEle_1);
|
|
16788
16808
|
popupEle_1.style.visibility = 'visible';
|
|
16809
|
+
addClass([popupEle_1], ['e-mention', 'e-popup', 'e-popup-close']);
|
|
16789
16810
|
if (!isNullOrUndefined(_this.list)) {
|
|
16790
16811
|
_this.unWireListEvents();
|
|
16791
16812
|
_this.wireListEvents();
|