@syncfusion/ej2-dropdowns 30.1.37 → 30.1.40
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/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 +59 -14
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +59 -14
- 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/package.json +6 -6
- package/src/combo-box/combo-box.js +1 -1
- package/src/common/incremental-search.js +1 -1
- package/src/drop-down-list/drop-down-list.d.ts +1 -0
- package/src/drop-down-list/drop-down-list.js +19 -3
- package/src/drop-down-tree/drop-down-tree-model.d.ts +1 -1
- package/src/drop-down-tree/drop-down-tree.d.ts +1 -0
- package/src/drop-down-tree/drop-down-tree.js +9 -1
- package/src/list-box/list-box.js +6 -1
- package/src/multi-select/multi-select.js +24 -8
- package/styles/bootstrap5-dark-lite.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5-lite.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/drop-down-tree/_bootstrap5-definition.scss +1 -1
- package/styles/drop-down-tree/_material3-definition.scss +2 -2
- package/styles/drop-down-tree/bootstrap5-dark.css +1 -1
- package/styles/drop-down-tree/bootstrap5.css +1 -1
- package/styles/drop-down-tree/material3-dark.css +4 -4
- package/styles/drop-down-tree/material3.css +4 -4
- package/styles/material3-dark-lite.css +3 -3
- package/styles/material3-dark.css +4 -4
- package/styles/material3-lite.css +3 -3
- package/styles/material3.css +4 -4
|
@@ -136,7 +136,7 @@ function Search(inputVal, items, searchType, ignoreCase, dataSource, fields, typ
|
|
|
136
136
|
var listItems = items;
|
|
137
137
|
ignoreCase = ignoreCase !== undefined && ignoreCase !== null ? ignoreCase : true;
|
|
138
138
|
var itemData = { item: null, index: null };
|
|
139
|
-
if (inputVal && inputVal.length) {
|
|
139
|
+
if (inputVal && inputVal.length && items) {
|
|
140
140
|
var strLength = inputVal.length;
|
|
141
141
|
var queryStr = ignoreCase ? inputVal.toLocaleLowerCase() : inputVal;
|
|
142
142
|
queryStr = escapeCharRegExp(queryStr);
|
|
@@ -3064,6 +3064,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3064
3064
|
DropDownList.prototype.initializeData = function () {
|
|
3065
3065
|
this.isPopupOpen = false;
|
|
3066
3066
|
this.isDocumentClick = false;
|
|
3067
|
+
this.isPopupRender = false;
|
|
3067
3068
|
this.isInteracted = false;
|
|
3068
3069
|
this.isFilterFocus = false;
|
|
3069
3070
|
this.beforePopupOpen = false;
|
|
@@ -4396,7 +4397,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4396
4397
|
e.preventDefault();
|
|
4397
4398
|
}
|
|
4398
4399
|
if (!this.readonly) {
|
|
4399
|
-
if (this.isPopupOpen)
|
|
4400
|
+
if (this.isPopupOpen || (this.popupObj && document.body.contains(this.popupObj.element) &&
|
|
4401
|
+
this.beforePopupOpen && this.isPopupRender)) {
|
|
4400
4402
|
this.hidePopup(e);
|
|
4401
4403
|
if (this.isFilterLayout()) {
|
|
4402
4404
|
this.focusDropDown(e);
|
|
@@ -5563,8 +5565,19 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5563
5565
|
initialPopupHeight = popupEle.clientHeight;
|
|
5564
5566
|
if (_this.enableVirtualization && (_this.itemTemplate || _this.isAngular)) {
|
|
5565
5567
|
var listitems = popupEle.querySelectorAll('li.e-list-item:not(.e-virtual-list)');
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
+
var virtualListitems = popupEle.querySelectorAll('li.e-virtual-list');
|
|
5569
|
+
var listitemsHeight = listitems && listitems.length > 0 ?
|
|
5570
|
+
Math.ceil(listitems[0].getBoundingClientRect().height) +
|
|
5571
|
+
parseInt(window.getComputedStyle(listitems[0]).marginBottom, 10) : 0;
|
|
5572
|
+
var VirtualLiHeight = virtualListitems && virtualListitems.length > 0 ?
|
|
5573
|
+
Math.ceil(virtualListitems[0].getBoundingClientRect().height) +
|
|
5574
|
+
parseInt(window.getComputedStyle(virtualListitems[0]).marginBottom, 10) : 0;
|
|
5575
|
+
if (listitemsHeight !== VirtualLiHeight && virtualListitems && virtualListitems.length > 0) {
|
|
5576
|
+
virtualListitems.forEach(function (item) {
|
|
5577
|
+
item.parentNode.removeChild(item);
|
|
5578
|
+
});
|
|
5579
|
+
}
|
|
5580
|
+
_this.listItemHeight = listitemsHeight;
|
|
5568
5581
|
}
|
|
5569
5582
|
if (_this.enableVirtualization && !_this.list.classList.contains(dropDownBaseClasses.noData)) {
|
|
5570
5583
|
_this.getSkeletonCount();
|
|
@@ -5727,6 +5740,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5727
5740
|
}
|
|
5728
5741
|
if (!isNullOrUndefined(_this.popupObj)) {
|
|
5729
5742
|
_this.popupObj.show(new Animation(eventArgs.animation), (_this.zIndex === 1000) ? _this.element : null);
|
|
5743
|
+
_this.isPopupRender = true;
|
|
5730
5744
|
}
|
|
5731
5745
|
if (_this.isReact) {
|
|
5732
5746
|
setTimeout(function () {
|
|
@@ -6262,6 +6276,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6262
6276
|
_this.rippleFun();
|
|
6263
6277
|
}
|
|
6264
6278
|
if (_this.isPopupOpen) {
|
|
6279
|
+
_this.isPopupRender = false;
|
|
6265
6280
|
_this.popupObj.hide(new Animation(eventArgs.animation));
|
|
6266
6281
|
}
|
|
6267
6282
|
else {
|
|
@@ -7279,6 +7294,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7279
7294
|
}
|
|
7280
7295
|
this.hidePopup();
|
|
7281
7296
|
if (this.popupObj) {
|
|
7297
|
+
this.isPopupRender = false;
|
|
7282
7298
|
this.popupObj.hide();
|
|
7283
7299
|
}
|
|
7284
7300
|
this.unWireEvent();
|
|
@@ -9194,6 +9210,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9194
9210
|
removeClass([_this.popupEle], DDTHIDEICON);
|
|
9195
9211
|
_this.updatePopupHeight();
|
|
9196
9212
|
_this.popupObj.refreshPosition();
|
|
9213
|
+
_this.checkCollision(_this.popupEle);
|
|
9197
9214
|
if (!(_this.showSelectAll || _this.allowFiltering) && (!_this.popupDiv.classList.contains(NODATA)
|
|
9198
9215
|
&& _this.treeItems.length > 0)) {
|
|
9199
9216
|
var focusedElement = _this.value != null && _this.text != null ? _this.treeObj.element.querySelector('[data-uid="' + _this.value[_this.value.length - 1] + '"]') : null;
|
|
@@ -9237,6 +9254,13 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9237
9254
|
}
|
|
9238
9255
|
});
|
|
9239
9256
|
};
|
|
9257
|
+
DropDownTree.prototype.checkCollision = function (popupEle) {
|
|
9258
|
+
var collision = isCollide(popupEle);
|
|
9259
|
+
if (collision.length > 0) {
|
|
9260
|
+
popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + 'px';
|
|
9261
|
+
}
|
|
9262
|
+
this.popupObj.resolveCollision();
|
|
9263
|
+
};
|
|
9240
9264
|
DropDownTree.prototype.removeFocus = function (focusedElement, oldFocusedElement) {
|
|
9241
9265
|
if (oldFocusedElement && oldFocusedElement !== focusedElement) {
|
|
9242
9266
|
oldFocusedElement.setAttribute('tabindex', '-1');
|
|
@@ -11970,7 +11994,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
11970
11994
|
this.removeFillSelection();
|
|
11971
11995
|
}
|
|
11972
11996
|
var dataItem = this.isSelectCustom ? { text: '' } : this.getItemData();
|
|
11973
|
-
var text = !isNullOrUndefined(dataItem.text) ? dataItem.text.replace(/\r\n|\n|\r/g, '') : dataItem.text;
|
|
11997
|
+
var text = !isNullOrUndefined(dataItem.text) ? dataItem.text.toString().replace(/\r\n|\n|\r/g, '') : dataItem.text;
|
|
11974
11998
|
var selected = !isNullOrUndefined(this.list) ? this.list.querySelector('.' + dropDownListClasses.selected) : null;
|
|
11975
11999
|
if (this.inputElement && text === this.inputElement.value && !isNullOrUndefined(selected)) {
|
|
11976
12000
|
if (this.isSelected) {
|
|
@@ -13538,11 +13562,16 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13538
13562
|
if (!isNullOrUndefined(this.text) && (isNullOrUndefined(this.value) || this.value.length === 0)) {
|
|
13539
13563
|
this.initialTextUpdate();
|
|
13540
13564
|
}
|
|
13541
|
-
if (!this.enableVirtualization
|
|
13542
|
-
this.
|
|
13565
|
+
if (!this.enableVirtualization) {
|
|
13566
|
+
if (!this.isRemoveSelection) {
|
|
13567
|
+
this.initialValueUpdate(this.listData, true);
|
|
13568
|
+
}
|
|
13569
|
+
else {
|
|
13570
|
+
this.initialValueUpdate();
|
|
13571
|
+
}
|
|
13543
13572
|
}
|
|
13544
|
-
else if (!this.
|
|
13545
|
-
this.initialValueUpdate(
|
|
13573
|
+
else if (!(this.dataSource instanceof DataManager)) {
|
|
13574
|
+
this.initialValueUpdate();
|
|
13546
13575
|
}
|
|
13547
13576
|
this.initialUpdate();
|
|
13548
13577
|
this.refreshPlaceHolder();
|
|
@@ -14028,6 +14057,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14028
14057
|
tempData[0] = (typeof customData === 'boolean') ?
|
|
14029
14058
|
(tempData[0] === 'true' ? true : (tempData[0] === 'false' ? false : tempData[0])) : tempData[0];
|
|
14030
14059
|
this.resetList(tempData, field);
|
|
14060
|
+
this.focusAtLastListItem(value);
|
|
14031
14061
|
}
|
|
14032
14062
|
}
|
|
14033
14063
|
else if (this.listData && this.mainData && !dataChecks && this.allowCustomValue) {
|
|
@@ -15396,6 +15426,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15396
15426
|
}
|
|
15397
15427
|
else {
|
|
15398
15428
|
this.setFloatLabelType();
|
|
15429
|
+
Input.createSpanElement(this.overAllWrapper, this.createElement);
|
|
15399
15430
|
}
|
|
15400
15431
|
this.expandTextbox();
|
|
15401
15432
|
};
|
|
@@ -15701,7 +15732,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15701
15732
|
MultiSelect.prototype.dispatchSelect = function (value, eve, element, isNotTrigger, length, dataValue, text) {
|
|
15702
15733
|
var _this = this;
|
|
15703
15734
|
var list = this.listData;
|
|
15704
|
-
if (this.initStatus && !isNotTrigger) {
|
|
15735
|
+
if (this.initStatus && !isNotTrigger && (!this.allowObjectBinding || (this.allowObjectBinding && value))) {
|
|
15705
15736
|
value = this.allowObjectBinding ? getValue(((this.fields.value) ? this.fields.value : ''), value) : value;
|
|
15706
15737
|
var val_2 = dataValue ? dataValue : this.getDataByValue(value);
|
|
15707
15738
|
var eventArgs = {
|
|
@@ -16610,7 +16641,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16610
16641
|
else {
|
|
16611
16642
|
if (this_1.listData) {
|
|
16612
16643
|
if (this_1.enableVirtualization) {
|
|
16613
|
-
if (delim && !this_1.isDynamicRemoteVirtualData) {
|
|
16644
|
+
if (delim && !this_1.isDynamicRemoteVirtualData && !isInitialVirtualData) {
|
|
16614
16645
|
data = this_1.delimiterWrapper && this_1.delimiterWrapper.innerHTML === '' ? data :
|
|
16615
16646
|
this_1.delimiterWrapper.innerHTML;
|
|
16616
16647
|
}
|
|
@@ -16622,7 +16653,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16622
16653
|
text = this_1.text.split(delimiterChar);
|
|
16623
16654
|
}
|
|
16624
16655
|
else {
|
|
16625
|
-
temp = isInitialVirtualData && delim ? this_1.text : this_1.getTextByValue(value);
|
|
16656
|
+
temp = isInitialVirtualData && delim ? this_1.text.replace(/,/g, delimiterChar + ' ') : this_1.getTextByValue(value);
|
|
16626
16657
|
var textValues = this_1.isDynamicRemoteVirtualData && value != null && value !== '' && !isInitialVirtualData ?
|
|
16627
16658
|
this_1.getTextByValue(value) : isInitialVirtualData ? this_1.text : (this_1.text && this_1.text !== '' ? this_1.text + this_1.delimiterChar + temp : temp);
|
|
16628
16659
|
data += temp + delimiterChar + ' ';
|
|
@@ -16786,6 +16817,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16786
16817
|
text = this.getTextByValue(value);
|
|
16787
16818
|
isCustomData = true;
|
|
16788
16819
|
}
|
|
16820
|
+
else if ((isNullOrUndefined(text) && !this.allowCustomValue) &&
|
|
16821
|
+
((!(this.dataSource instanceof DataManager)) ||
|
|
16822
|
+
(this.dataSource instanceof DataManager && isInitialVirtualData))) {
|
|
16823
|
+
this.value.splice(index, 1);
|
|
16824
|
+
index -= 1;
|
|
16825
|
+
}
|
|
16789
16826
|
}
|
|
16790
16827
|
else {
|
|
16791
16828
|
text = this.getTextByValue(value);
|
|
@@ -18380,6 +18417,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18380
18417
|
this.isaddNonPresentItems = false;
|
|
18381
18418
|
}
|
|
18382
18419
|
else {
|
|
18420
|
+
this.selectedListData = [];
|
|
18383
18421
|
if (prop === 'text') {
|
|
18384
18422
|
this.initialTextUpdate();
|
|
18385
18423
|
newProp = this.value;
|
|
@@ -18423,7 +18461,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18423
18461
|
setTimeout(function () {
|
|
18424
18462
|
_this.initialValueUpdate(listItems_2, true);
|
|
18425
18463
|
_this.isDynamicRemoteVirtualData = false;
|
|
18426
|
-
_this.
|
|
18464
|
+
if (!_this.inputFocus || (_this.inputFocus && _this.mode !== 'Default')) {
|
|
18465
|
+
_this.initialUpdate();
|
|
18466
|
+
}
|
|
18427
18467
|
}, 100);
|
|
18428
18468
|
}
|
|
18429
18469
|
});
|
|
@@ -20275,6 +20315,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
20275
20315
|
this.unSelectAllText = l10nSelect.getConstant('unSelectAllText');
|
|
20276
20316
|
this.popupWrapper = this.list;
|
|
20277
20317
|
this.checkBoxSelectionModule.checkAllParent = null;
|
|
20318
|
+
if (this.filterParent) {
|
|
20319
|
+
this.filterParent = null;
|
|
20320
|
+
}
|
|
20278
20321
|
this.notify('selectAll', {});
|
|
20279
20322
|
}
|
|
20280
20323
|
};
|
|
@@ -20345,6 +20388,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
20345
20388
|
this.tBListBox = getComponent(document.getElementById(scope), this.getModuleName());
|
|
20346
20389
|
this.tBListBox.updateToolBarState();
|
|
20347
20390
|
}
|
|
20391
|
+
else if (this.refreshing) {
|
|
20392
|
+
this.updateToolBarState();
|
|
20393
|
+
}
|
|
20348
20394
|
};
|
|
20349
20395
|
ListBox.prototype.createButtons = function (toolElem) {
|
|
20350
20396
|
var _this = this;
|
|
@@ -21370,7 +21416,6 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
21370
21416
|
}
|
|
21371
21417
|
this.inputString = this.filterInput.value;
|
|
21372
21418
|
this.filterWireEvents();
|
|
21373
|
-
this.ulElement.style.setProperty('height', 'calc(100% - ' + (this.filterParent.offsetHeight) + 'px)', 'important');
|
|
21374
21419
|
return filterInputObj;
|
|
21375
21420
|
}
|
|
21376
21421
|
};
|