@syncfusion/ej2-dropdowns 29.1.33 → 29.1.38
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 +49 -20
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +49 -20
- 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 +10 -10
- package/src/combo-box/combo-box.js +7 -2
- package/src/drop-down-base/drop-down-base.js +3 -6
- package/src/drop-down-list/drop-down-list.js +3 -0
- package/src/drop-down-tree/drop-down-tree.js +3 -1
- package/src/list-box/list-box.js +8 -2
- package/src/multi-select/multi-select.d.ts +1 -0
- package/src/multi-select/multi-select.js +25 -9
|
@@ -1975,12 +1975,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1975
1975
|
if (this.sortOrder !== 'None') {
|
|
1976
1976
|
dataSource = this.getSortedDataSource(dataSource);
|
|
1977
1977
|
}
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
else {
|
|
1982
|
-
dataSource = ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder);
|
|
1983
|
-
}
|
|
1978
|
+
var fieldSet = fields.properties ||
|
|
1979
|
+
fields;
|
|
1980
|
+
dataSource = ListBase.groupDataSource(dataSource, fieldSet, this.sortOrder);
|
|
1984
1981
|
}
|
|
1985
1982
|
addClass([this.list], dropDownBaseClasses.grouping);
|
|
1986
1983
|
}
|
|
@@ -4495,6 +4492,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4495
4492
|
if ((this.value === dataItem.value && this.text !== dataItem.text) ||
|
|
4496
4493
|
(this.value !== dataItem.value && this.text === dataItem.text)) {
|
|
4497
4494
|
this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
|
|
4495
|
+
if (isNullOrUndefined(li)) {
|
|
4496
|
+
this.previousValue = this.value;
|
|
4497
|
+
}
|
|
4498
4498
|
}
|
|
4499
4499
|
}
|
|
4500
4500
|
}
|
|
@@ -8999,6 +8999,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8999
8999
|
this.trigger('beforeOpen', args, function (args) {
|
|
9000
9000
|
if (!args.cancel) {
|
|
9001
9001
|
addClass([_this.inputWrapper], [ICONANIMATION]);
|
|
9002
|
+
if (_this.isReact && _this.isFilterRestore) {
|
|
9003
|
+
_this.treeObj.refresh();
|
|
9004
|
+
}
|
|
9002
9005
|
if (_this.isFirstRender) {
|
|
9003
9006
|
_this.popupEle = _this.createElement('div', {
|
|
9004
9007
|
id: _this.element.id + '_options', className: POPUP_CLASS + ' ' + (_this.cssClass != null ? _this.cssClass : '')
|
|
@@ -9011,7 +9014,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9011
9014
|
else {
|
|
9012
9015
|
_this.popupEle = _this.popupObj.element;
|
|
9013
9016
|
if (_this.isReact && _this.isFilterRestore) {
|
|
9014
|
-
_this.treeObj.refresh();
|
|
9015
9017
|
_this.isFilteredData = true;
|
|
9016
9018
|
_this.popupEle.removeChild(_this.filterContainer);
|
|
9017
9019
|
}
|
|
@@ -11022,7 +11024,8 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
11022
11024
|
ComboBox.prototype.onBlurHandler = function (e) {
|
|
11023
11025
|
var inputValue = this.inputElement && this.inputElement.value === '' ?
|
|
11024
11026
|
null : this.inputElement && this.inputElement.value;
|
|
11025
|
-
|
|
11027
|
+
var text = !isNullOrUndefined(this.text) ? this.text.replace(/\r\n|\n|\r/g, '') : this.text;
|
|
11028
|
+
if (!isNullOrUndefined(this.listData) && !isNullOrUndefined(inputValue) && inputValue !== text) {
|
|
11026
11029
|
this.customValue(e);
|
|
11027
11030
|
}
|
|
11028
11031
|
_super.prototype.onBlurHandler.call(this, e);
|
|
@@ -11147,6 +11150,9 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
11147
11150
|
if ((this.value === dataItem.value && this.text !== dataItem.text)
|
|
11148
11151
|
|| (this.value !== dataItem.value && this.text === dataItem.text)) {
|
|
11149
11152
|
this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
|
|
11153
|
+
if (isNullOrUndefined(li)) {
|
|
11154
|
+
this.previousValue = this.value;
|
|
11155
|
+
}
|
|
11150
11156
|
}
|
|
11151
11157
|
}
|
|
11152
11158
|
}
|
|
@@ -11828,8 +11834,9 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
11828
11834
|
this.removeFillSelection();
|
|
11829
11835
|
}
|
|
11830
11836
|
var dataItem = this.isSelectCustom ? { text: '' } : this.getItemData();
|
|
11837
|
+
var text = !isNullOrUndefined(dataItem.text) ? dataItem.text.replace(/\r\n|\n|\r/g, '') : dataItem.text;
|
|
11831
11838
|
var selected = !isNullOrUndefined(this.list) ? this.list.querySelector('.' + dropDownListClasses.selected) : null;
|
|
11832
|
-
if (this.inputElement &&
|
|
11839
|
+
if (this.inputElement && text === this.inputElement.value && !isNullOrUndefined(selected)) {
|
|
11833
11840
|
if (this.isSelected) {
|
|
11834
11841
|
this.onChangeEvent(e);
|
|
11835
11842
|
this.isSelectCustom = false;
|
|
@@ -13392,7 +13399,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13392
13399
|
if (!this.enableVirtualization || (this.enableVirtualization && (!(this.dataSource instanceof DataManager)))) {
|
|
13393
13400
|
this.initialValueUpdate();
|
|
13394
13401
|
}
|
|
13395
|
-
else {
|
|
13402
|
+
else if (!this.isRemoveSelection) {
|
|
13396
13403
|
this.initialValueUpdate(this.listData, true);
|
|
13397
13404
|
}
|
|
13398
13405
|
this.initialUpdate();
|
|
@@ -13522,11 +13529,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13522
13529
|
}
|
|
13523
13530
|
if ((!this.enableVirtualization && ((searchCount === searchActiveCount || searchActiveCount === this.maximumSelectionLength)
|
|
13524
13531
|
&& (this.mode === 'CheckBox' && this.showSelectAll))) || (this.enableVirtualization && this.mode === 'CheckBox' &&
|
|
13525
|
-
this.showSelectAll && this.
|
|
13532
|
+
this.showSelectAll && this.value && this.value.length === this.totalItemCount)) {
|
|
13526
13533
|
this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'check' });
|
|
13527
13534
|
}
|
|
13528
|
-
else if ((searchCount !== searchActiveCount) && (this.mode === 'CheckBox' && this.showSelectAll)
|
|
13529
|
-
((!this.enableVirtualization) || (this.enableVirtualization && !this.virtualSelectAll))) {
|
|
13535
|
+
else if ((searchCount !== searchActiveCount) && (this.mode === 'CheckBox' && this.showSelectAll)) {
|
|
13530
13536
|
this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'uncheck' });
|
|
13531
13537
|
}
|
|
13532
13538
|
if (this.enableGroupCheckBox && this.fields.groupBy && !this.enableSelectionOrder) {
|
|
@@ -13940,6 +13946,17 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13940
13946
|
if (!(this.targetElement() && this.targetElement() !== '')) {
|
|
13941
13947
|
e.preventDefault();
|
|
13942
13948
|
}
|
|
13949
|
+
this.checkAndScrollParent();
|
|
13950
|
+
};
|
|
13951
|
+
MultiSelect.prototype.checkAndScrollParent = function () {
|
|
13952
|
+
var parentElement = this.overAllWrapper ? this.overAllWrapper.parentElement : null;
|
|
13953
|
+
if (parentElement) {
|
|
13954
|
+
var wrapperHeight = parseFloat(getComputedStyle(this.overAllWrapper).height);
|
|
13955
|
+
var parentMaxHeight = parseFloat(getComputedStyle(parentElement).maxHeight);
|
|
13956
|
+
if (!isNaN(parentMaxHeight) && wrapperHeight > parentMaxHeight) {
|
|
13957
|
+
parentElement.scrollTop = parentElement.scrollHeight;
|
|
13958
|
+
}
|
|
13959
|
+
}
|
|
13943
13960
|
};
|
|
13944
13961
|
MultiSelect.prototype.enable = function (state) {
|
|
13945
13962
|
if (state) {
|
|
@@ -16698,6 +16715,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16698
16715
|
else {
|
|
16699
16716
|
this.removeValue(value, e, length);
|
|
16700
16717
|
}
|
|
16718
|
+
this.checkAndScrollParent();
|
|
16701
16719
|
};
|
|
16702
16720
|
MultiSelect.prototype.updateListSelectEventCallback = function (value, li, e, currentText) {
|
|
16703
16721
|
var _this = this;
|
|
@@ -17279,7 +17297,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17279
17297
|
this.updateWrapperText(this.viewWrapper, data);
|
|
17280
17298
|
}
|
|
17281
17299
|
wrapperleng = this.viewWrapper.offsetWidth +
|
|
17282
|
-
parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10)
|
|
17300
|
+
parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10) +
|
|
17301
|
+
parseInt(window.getComputedStyle(this.viewWrapper).paddingLeft, 10);
|
|
17283
17302
|
overAllContainer = this.componentWrapper.offsetWidth -
|
|
17284
17303
|
parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) -
|
|
17285
17304
|
parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
|
|
@@ -17291,14 +17310,16 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17291
17310
|
this.updateWrapperText(this.viewWrapper, temp);
|
|
17292
17311
|
remaining = this.value.length - index;
|
|
17293
17312
|
wrapperleng = this.viewWrapper.offsetWidth +
|
|
17294
|
-
parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10)
|
|
17313
|
+
parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10) +
|
|
17314
|
+
parseInt(window.getComputedStyle(this.viewWrapper).paddingLeft, 10);
|
|
17295
17315
|
while (((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) > overAllContainer) && wrapperleng !== 0
|
|
17296
17316
|
&& this.viewWrapper.innerHTML !== '') {
|
|
17297
17317
|
var textArr = [];
|
|
17298
17318
|
this.viewWrapper.innerHTML = textArr.join(this.delimiterChar);
|
|
17299
17319
|
remaining = this.value.length;
|
|
17300
17320
|
wrapperleng = this.viewWrapper.offsetWidth +
|
|
17301
|
-
parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10)
|
|
17321
|
+
parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10) +
|
|
17322
|
+
parseInt(window.getComputedStyle(this.viewWrapper).paddingLeft, 10);
|
|
17302
17323
|
}
|
|
17303
17324
|
break;
|
|
17304
17325
|
}
|
|
@@ -17328,13 +17349,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17328
17349
|
};
|
|
17329
17350
|
MultiSelect.prototype.checkClearIconWidth = function () {
|
|
17330
17351
|
if (this.showClearButton) {
|
|
17331
|
-
this.clearIconWidth = this.overAllClear.
|
|
17352
|
+
this.clearIconWidth = parseInt(window.getComputedStyle(this.overAllClear).width, 10);
|
|
17332
17353
|
}
|
|
17333
17354
|
};
|
|
17334
17355
|
MultiSelect.prototype.updateRemainWidth = function (viewWrapper, totalWidth) {
|
|
17335
17356
|
if (viewWrapper.classList.contains(TOTAL_COUNT_WRAPPER$1) && totalWidth < (viewWrapper.offsetWidth +
|
|
17336
17357
|
parseInt(window.getComputedStyle(viewWrapper).paddingLeft, 10)
|
|
17337
|
-
+ parseInt(window.getComputedStyle(viewWrapper).
|
|
17358
|
+
+ parseInt(window.getComputedStyle(viewWrapper).paddingRight, 10))) {
|
|
17338
17359
|
viewWrapper.style.width = totalWidth + 'px';
|
|
17339
17360
|
}
|
|
17340
17361
|
};
|
|
@@ -17594,6 +17615,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17594
17615
|
li[index - 1].classList.remove('e-item-focus');
|
|
17595
17616
|
}
|
|
17596
17617
|
}
|
|
17618
|
+
_this.checkSelectAll();
|
|
17597
17619
|
}, 0);
|
|
17598
17620
|
}
|
|
17599
17621
|
}
|
|
@@ -17620,6 +17642,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17620
17642
|
});
|
|
17621
17643
|
}
|
|
17622
17644
|
}
|
|
17645
|
+
this.checkSelectAll();
|
|
17623
17646
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17624
17647
|
var virtualTrackElement = this.list.getElementsByClassName('e-virtual-ddl')[0];
|
|
17625
17648
|
if (virtualTrackElement) {
|
|
@@ -22024,8 +22047,14 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
22024
22047
|
text = value;
|
|
22025
22048
|
}
|
|
22026
22049
|
if (typeof (text) === 'string') {
|
|
22027
|
-
|
|
22028
|
-
|
|
22050
|
+
if (text.indexOf('\n') !== -1) {
|
|
22051
|
+
var txt = CSS.escape(text);
|
|
22052
|
+
li = _this.list.querySelector('[data-value="' + txt + '"]');
|
|
22053
|
+
}
|
|
22054
|
+
else {
|
|
22055
|
+
text = text.split('\\').join('\\\\');
|
|
22056
|
+
li = _this.list.querySelector('[data-value="' + text.replace(/"/g, '\\"') + '"]');
|
|
22057
|
+
}
|
|
22029
22058
|
}
|
|
22030
22059
|
else {
|
|
22031
22060
|
li = _this.list.querySelector('[data-value="' + text + '"]');
|