@syncfusion/ej2-dropdowns 20.1.60 → 20.2.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/CHANGELOG.md +2 -62
- 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 +110 -104
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +73 -67
- 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/helpers/e2e/autocomplete.js +59 -43
- package/helpers/e2e/combobox.js +62 -46
- package/helpers/e2e/dropdownlist.js +71 -55
- package/helpers/e2e/index.js +11 -9
- package/helpers/e2e/listboxHelper.js +55 -38
- package/helpers/e2e/multiselect.js +104 -88
- package/package.json +11 -11
- package/src/common/incremental-search.js +1 -1
- package/src/drop-down-base/drop-down-base-model.d.ts +1 -1
- package/src/drop-down-base/drop-down-base.d.ts +5 -1
- package/src/drop-down-base/drop-down-base.js +3 -5
- package/src/drop-down-list/drop-down-list.js +13 -15
- package/src/drop-down-tree/drop-down-tree-model.d.ts +2 -2
- package/src/drop-down-tree/drop-down-tree.js +5 -5
- package/src/list-box/list-box.d.ts +1 -0
- package/src/list-box/list-box.js +22 -13
- package/src/multi-select/multi-select-model.d.ts +1 -1
- package/src/multi-select/multi-select.d.ts +2 -1
- package/src/multi-select/multi-select.js +29 -28
- package/styles/auto-complete/_fusionnew-definition.scss +2 -0
- package/styles/auto-complete/_material3-definition.scss +2 -0
- package/styles/bootstrap-dark.css +59 -11
- package/styles/bootstrap.css +59 -11
- package/styles/bootstrap4.css +59 -11
- package/styles/bootstrap5-dark.css +60 -12
- package/styles/bootstrap5.css +60 -12
- package/styles/combo-box/_fusionnew-definition.scss +2 -0
- package/styles/combo-box/_material3-definition.scss +2 -0
- package/styles/drop-down-base/_fusionnew-definition.scss +111 -0
- package/styles/drop-down-base/_material3-definition.scss +111 -0
- package/styles/drop-down-list/_fusionnew-definition.scss +201 -0
- package/styles/drop-down-list/_material3-definition.scss +201 -0
- package/styles/drop-down-list/icons/_fusionnew.scss +14 -0
- package/styles/drop-down-list/icons/_material3.scss +14 -0
- package/styles/drop-down-tree/_fusionnew-definition.scss +60 -0
- package/styles/drop-down-tree/_material3-definition.scss +60 -0
- package/styles/drop-down-tree/icons/_fusionnew.scss +11 -0
- package/styles/drop-down-tree/icons/_material3.scss +11 -0
- package/styles/fabric-dark.css +59 -11
- package/styles/fabric.css +59 -11
- package/styles/fluent-dark.css +63 -15
- package/styles/fluent.css +60 -12
- package/styles/highcontrast-light.css +59 -11
- package/styles/highcontrast.css +59 -11
- package/styles/list-box/_bootstrap-dark-definition.scss +5 -1
- package/styles/list-box/_bootstrap-definition.scss +5 -1
- package/styles/list-box/_bootstrap4-definition.scss +5 -1
- package/styles/list-box/_bootstrap5-definition.scss +7 -2
- package/styles/list-box/_fabric-dark-definition.scss +5 -1
- package/styles/list-box/_fabric-definition.scss +5 -1
- package/styles/list-box/_fluent-definition.scss +7 -2
- package/styles/list-box/_fusionnew-definition.scss +113 -0
- package/styles/list-box/_highcontrast-definition.scss +5 -1
- package/styles/list-box/_highcontrast-light-definition.scss +5 -1
- package/styles/list-box/_layout.scss +36 -1
- package/styles/list-box/_material-dark-definition.scss +6 -2
- package/styles/list-box/_material-definition.scss +6 -2
- package/styles/list-box/_material3-definition.scss +119 -0
- package/styles/list-box/_tailwind-definition.scss +6 -2
- package/styles/list-box/_theme.scss +40 -8
- package/styles/list-box/bootstrap-dark.css +49 -11
- package/styles/list-box/bootstrap.css +59 -11
- package/styles/list-box/bootstrap4.css +59 -11
- package/styles/list-box/bootstrap5-dark.css +60 -12
- package/styles/list-box/bootstrap5.css +60 -12
- package/styles/list-box/fabric-dark.css +49 -11
- package/styles/list-box/fabric.css +59 -11
- package/styles/list-box/fluent-dark.css +63 -15
- package/styles/list-box/fluent.css +60 -12
- package/styles/list-box/highcontrast-light.css +49 -11
- package/styles/list-box/highcontrast.css +59 -11
- package/styles/list-box/icons/_fusionnew.scss +25 -0
- package/styles/list-box/icons/_material3.scss +25 -0
- package/styles/list-box/material-dark.css +50 -12
- package/styles/list-box/material.css +60 -12
- package/styles/list-box/tailwind-dark.css +60 -12
- package/styles/list-box/tailwind.css +60 -12
- package/styles/material-dark.css +60 -12
- package/styles/material.css +60 -12
- package/styles/multi-select/_fusionnew-definition.scss +219 -0
- package/styles/multi-select/_material3-definition.scss +219 -0
- package/styles/multi-select/icons/_fusionnew.scss +27 -0
- package/styles/multi-select/icons/_material3.scss +27 -0
- package/styles/tailwind-dark.css +60 -12
- package/styles/tailwind.css +60 -12
|
@@ -92,7 +92,7 @@ function Search(inputVal, items, searchType, ignoreCase) {
|
|
|
92
92
|
for (var i = 0, itemsData = listItems; i < itemsData.length; i++) {
|
|
93
93
|
var item = itemsData[i];
|
|
94
94
|
var text = (ignoreCase ? item.textContent.toLocaleLowerCase() : item.textContent).replace(/^\s+|\s+$/g, '');
|
|
95
|
-
if ((searchType === 'Equal' && text === queryStr) || (searchType === 'StartsWith' && text.substr(0, strLength) === queryStr) || (searchType === 'EndsWith' && text.substr(text.length - queryStr.length) === queryStr) || (searchType === 'Contains' && new RegExp(queryStr,
|
|
95
|
+
if ((searchType === 'Equal' && text === queryStr) || (searchType === 'StartsWith' && text.substr(0, strLength) === queryStr) || (searchType === 'EndsWith' && text.substr(text.length - queryStr.length) === queryStr) || (searchType === 'Contains' && new RegExp(queryStr, "g").test(text))) {
|
|
96
96
|
itemData.item = item;
|
|
97
97
|
itemData.index = i;
|
|
98
98
|
return { item: item, index: i };
|
|
@@ -330,8 +330,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
330
330
|
compareValue_1 = value;
|
|
331
331
|
dataSource.filter(function (item) {
|
|
332
332
|
var itemValue = getValue(fields.value, item);
|
|
333
|
-
if (!isNullOrUndefined(itemValue) && !isNullOrUndefined(value)
|
|
334
|
-
&& itemValue.toString() === compareValue_1.toString()) {
|
|
333
|
+
if (!isNullOrUndefined(itemValue) && !isNullOrUndefined(value) && itemValue.toString() === compareValue_1.toString()) {
|
|
335
334
|
value = getValue(fields.text, item);
|
|
336
335
|
}
|
|
337
336
|
});
|
|
@@ -757,7 +756,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
757
756
|
if (this.getModuleName() === 'multiselect' && this.properties.allowCustomValue && this.fields.groupBy) {
|
|
758
757
|
for (var i = 0; i < ulElement.childElementCount; i++) {
|
|
759
758
|
if (ulElement.children[i].classList.contains('e-list-group-item')) {
|
|
760
|
-
if (isNullOrUndefined(ulElement.children[i].innerHTML) || ulElement.children[i].innerHTML
|
|
759
|
+
if (isNullOrUndefined(ulElement.children[i].innerHTML) || ulElement.children[i].innerHTML == "") {
|
|
761
760
|
addClass([ulElement.children[i]], HIDE_GROUPLIST);
|
|
762
761
|
}
|
|
763
762
|
}
|
|
@@ -1244,8 +1243,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1244
1243
|
}
|
|
1245
1244
|
if (this.itemTemplate && !isHeader) {
|
|
1246
1245
|
var itemCheck = this.templateCompiler(this.itemTemplate);
|
|
1247
|
-
var compiledString = itemCheck ?
|
|
1248
|
-
compile(select(this.itemTemplate, document).innerHTML.trim()) : compile(this.itemTemplate);
|
|
1246
|
+
var compiledString = itemCheck ? compile(select(this.itemTemplate, document).innerHTML.trim()) : compile(this.itemTemplate);
|
|
1249
1247
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1250
1248
|
var addItemTemplate = compiledString(item, this, 'itemTemplate', this.itemTemplateId, this.isStringTemplate, null, li);
|
|
1251
1249
|
if (addItemTemplate) {
|
|
@@ -1749,7 +1747,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
1749
1747
|
return {
|
|
1750
1748
|
'aria-disabled': 'false',
|
|
1751
1749
|
'aria-owns': this.element.id + '_options',
|
|
1752
|
-
'role': '
|
|
1750
|
+
'role': 'combobox',
|
|
1753
1751
|
'aria-haspopup': 'true',
|
|
1754
1752
|
'aria-expanded': 'false',
|
|
1755
1753
|
'aria-activedescendant': 'null',
|
|
@@ -2015,7 +2013,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2015
2013
|
}
|
|
2016
2014
|
else {
|
|
2017
2015
|
var delay = 100;
|
|
2018
|
-
this.closePopup(delay);
|
|
2016
|
+
this.closePopup(delay, e);
|
|
2019
2017
|
}
|
|
2020
2018
|
};
|
|
2021
2019
|
DropDownList.prototype.onMouseOver = function (e) {
|
|
@@ -2239,7 +2237,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2239
2237
|
this.isSelectCustom = false;
|
|
2240
2238
|
this.onChangeEvent(e);
|
|
2241
2239
|
}
|
|
2242
|
-
this.hidePopup();
|
|
2240
|
+
this.hidePopup(e);
|
|
2243
2241
|
this.focusDropDown(e);
|
|
2244
2242
|
}
|
|
2245
2243
|
else {
|
|
@@ -2474,11 +2472,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2474
2472
|
if (this.setValue(e)) {
|
|
2475
2473
|
return;
|
|
2476
2474
|
}
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
attributes(this.filterInput, { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
|
|
2481
|
-
}
|
|
2475
|
+
attributes(this.targetElement(), { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
|
|
2476
|
+
if (this.isFilterLayout() && this.filterInput) {
|
|
2477
|
+
attributes(this.filterInput, { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
|
|
2482
2478
|
}
|
|
2483
2479
|
if ((!this.isPopupOpen && !isNullOrUndefined(li)) || (this.isPopupOpen && !isNullOrUndefined(e) &&
|
|
2484
2480
|
(e.type !== 'keydown' || e.type === 'keydown' && e.action === 'enter'))) {
|
|
@@ -2963,7 +2959,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2963
2959
|
this.initial = true;
|
|
2964
2960
|
this.activeIndex = this.index;
|
|
2965
2961
|
this.initRemoteRender = false;
|
|
2966
|
-
this.initial = false;
|
|
2967
2962
|
if (this.value && this.dataSource instanceof DataManager) {
|
|
2968
2963
|
var checkField_1 = isNullOrUndefined(this.fields.value) ? this.fields.text : this.fields.value;
|
|
2969
2964
|
var checkVal = list.some(function (x) { return x[checkField_1] === _this.value; });
|
|
@@ -2986,6 +2981,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2986
2981
|
else {
|
|
2987
2982
|
this.updateValues();
|
|
2988
2983
|
}
|
|
2984
|
+
this.initial = false;
|
|
2989
2985
|
}
|
|
2990
2986
|
if (this.getModuleName() !== 'autocomplete' && this.isFiltering() && !this.isTyped) {
|
|
2991
2987
|
if (!this.actionCompleteData.isUpdated || ((!this.isCustomFilter
|
|
@@ -3414,7 +3410,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3414
3410
|
}
|
|
3415
3411
|
}
|
|
3416
3412
|
};
|
|
3417
|
-
DropDownList.prototype.closePopup = function (delay) {
|
|
3413
|
+
DropDownList.prototype.closePopup = function (delay, e) {
|
|
3418
3414
|
var _this = this;
|
|
3419
3415
|
this.isTyped = false;
|
|
3420
3416
|
if (!(this.popupObj && document.body.contains(this.popupObj.element) && this.beforePopupOpen)) {
|
|
@@ -3452,7 +3448,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3452
3448
|
EventHandler.remove(this.filterInput, 'paste', this.pasteHandler);
|
|
3453
3449
|
this.filterInput = null;
|
|
3454
3450
|
}
|
|
3455
|
-
attributes(this.targetElement(), { 'aria-expanded': 'false'
|
|
3451
|
+
attributes(this.targetElement(), { 'aria-expanded': 'false' });
|
|
3456
3452
|
this.inputWrapper.container.classList.remove(dropDownListClasses.iconAnimation);
|
|
3457
3453
|
if (this.isFiltering()) {
|
|
3458
3454
|
this.actionCompleteData.isUpdated = false;
|
|
@@ -3464,7 +3460,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3464
3460
|
delay: delay ? delay : 0
|
|
3465
3461
|
};
|
|
3466
3462
|
var popupInstance = this.popupObj;
|
|
3467
|
-
var eventArgs = { popup: popupInstance, cancel: false, animation: animModel };
|
|
3463
|
+
var eventArgs = { popup: popupInstance, cancel: false, animation: animModel, event: e || null };
|
|
3468
3464
|
this.trigger('close', eventArgs, function (eventArgs) {
|
|
3469
3465
|
if (!isNullOrUndefined(_this.popupObj) &&
|
|
3470
3466
|
!isNullOrUndefined(_this.popupObj.element.querySelector('.e-fixed-head'))) {
|
|
@@ -3685,7 +3681,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3685
3681
|
|| (!(props.dataSource instanceof DataManager) && props.dataSource.length === 0)))) {
|
|
3686
3682
|
this.clearAll(null, props);
|
|
3687
3683
|
}
|
|
3688
|
-
if ((this.fields.groupBy && props.fields) && !this.isGroupChecking) {
|
|
3684
|
+
if ((this.fields.groupBy && props.fields) && !this.isGroupChecking && this.list) {
|
|
3689
3685
|
EventHandler.remove(this.list, 'scroll', this.setFloatingHeader);
|
|
3690
3686
|
EventHandler.add(this.list, 'scroll', this.setFloatingHeader, this);
|
|
3691
3687
|
}
|
|
@@ -3977,7 +3973,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3977
3973
|
if (!this.enabled) {
|
|
3978
3974
|
return;
|
|
3979
3975
|
}
|
|
3980
|
-
if (this.isFiltering() && this.dataSource instanceof DataManager && (this.actionData.list
|
|
3976
|
+
if (this.isFiltering() && this.dataSource instanceof DataManager && (this.actionData.list != this.actionCompleteData.list) &&
|
|
3981
3977
|
this.actionData.list && this.actionData.ulElement) {
|
|
3982
3978
|
this.actionCompleteData = this.actionData;
|
|
3983
3979
|
this.onActionComplete(this.actionCompleteData.ulElement, this.actionCompleteData.list, null, true);
|
|
@@ -4039,7 +4035,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4039
4035
|
this.resetSelection();
|
|
4040
4036
|
}
|
|
4041
4037
|
}
|
|
4042
|
-
this.closePopup();
|
|
4038
|
+
this.closePopup(0, e);
|
|
4043
4039
|
var dataItem = this.getItemData();
|
|
4044
4040
|
var isSelectVal = !isNullOrUndefined(this.selectedLI);
|
|
4045
4041
|
if (this.inputElement && this.inputElement.value.trim() === '' && !this.isInteracted && (this.isSelectCustom ||
|
|
@@ -6521,7 +6517,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
6521
6517
|
addClass([this.inputWrapper], SHOW_CHIP);
|
|
6522
6518
|
}
|
|
6523
6519
|
var chip = this.createElement('span', {
|
|
6524
|
-
className: CHIP
|
|
6520
|
+
className: CHIP,
|
|
6525
6521
|
});
|
|
6526
6522
|
if (!this.inputEle.classList.contains(CHIP_INPUT)) {
|
|
6527
6523
|
addClass([this.inputEle], CHIP_INPUT);
|
|
@@ -6657,7 +6653,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
6657
6653
|
this.ensurePlaceHolder();
|
|
6658
6654
|
};
|
|
6659
6655
|
DropDownTree.prototype.resetValue = function (isDynamicChange) {
|
|
6660
|
-
if (this.value
|
|
6656
|
+
if (this.value == [] && this.text == null) {
|
|
6661
6657
|
return;
|
|
6662
6658
|
}
|
|
6663
6659
|
Input.setValue(null, this.inputEle, this.floatLabelType);
|
|
@@ -7039,10 +7035,10 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7039
7035
|
this.updateTreeSettings(newProp);
|
|
7040
7036
|
break;
|
|
7041
7037
|
case 'customTemplate':
|
|
7042
|
-
if (this.mode !==
|
|
7038
|
+
if (this.mode !== "Custom") {
|
|
7043
7039
|
return;
|
|
7044
7040
|
}
|
|
7045
|
-
this.chipCollection.innerHTML =
|
|
7041
|
+
this.chipCollection.innerHTML = "";
|
|
7046
7042
|
this.setTagValues();
|
|
7047
7043
|
break;
|
|
7048
7044
|
case 'sortOrder':
|
|
@@ -7259,7 +7255,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7259
7255
|
Property('')
|
|
7260
7256
|
], DropDownTree.prototype, "cssClass", void 0);
|
|
7261
7257
|
__decorate$2([
|
|
7262
|
-
Property(
|
|
7258
|
+
Property("${value.length} item(s) selected")
|
|
7263
7259
|
], DropDownTree.prototype, "customTemplate", void 0);
|
|
7264
7260
|
__decorate$2([
|
|
7265
7261
|
Property(',')
|
|
@@ -8900,6 +8896,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
8900
8896
|
function MultiSelect(option, element) {
|
|
8901
8897
|
var _this = _super.call(this, option, element) || this;
|
|
8902
8898
|
_this.clearIconWidth = 0;
|
|
8899
|
+
_this.previousFilterText = '';
|
|
8903
8900
|
_this.isValidKey = false;
|
|
8904
8901
|
_this.selectAllEventData = [];
|
|
8905
8902
|
_this.selectAllEventEle = [];
|
|
@@ -8975,7 +8972,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
8975
8972
|
else if (containerAttr.indexOf(htmlAttr) > -1) {
|
|
8976
8973
|
this.overAllWrapper.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
|
|
8977
8974
|
}
|
|
8978
|
-
else {
|
|
8975
|
+
else if (htmlAttr !== 'size') {
|
|
8979
8976
|
this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
|
|
8980
8977
|
}
|
|
8981
8978
|
break;
|
|
@@ -9397,7 +9394,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9397
9394
|
this.showPopup();
|
|
9398
9395
|
}
|
|
9399
9396
|
else {
|
|
9400
|
-
this.hidePopup();
|
|
9397
|
+
this.hidePopup(e);
|
|
9401
9398
|
}
|
|
9402
9399
|
}
|
|
9403
9400
|
else if (!this.openOnClick && this.mode === 'CheckBox' && !this.isPopupOpen()) {
|
|
@@ -9466,7 +9463,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9466
9463
|
var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
|
|
9467
9464
|
if (this.backCommand) {
|
|
9468
9465
|
this.remoteCustomValue = false;
|
|
9469
|
-
if (this.allowCustomValue && list.querySelectorAll('li').length
|
|
9466
|
+
if (this.allowCustomValue && list.querySelectorAll('li').length == 0 && this.mainData.length > 0) {
|
|
9470
9467
|
this.mainData = [];
|
|
9471
9468
|
}
|
|
9472
9469
|
this.onActionComplete(list, this.mainData);
|
|
@@ -9557,7 +9554,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9557
9554
|
this.showPopup();
|
|
9558
9555
|
}
|
|
9559
9556
|
else {
|
|
9560
|
-
this.hidePopup();
|
|
9557
|
+
this.hidePopup(e);
|
|
9561
9558
|
if (this.mode === 'CheckBox') {
|
|
9562
9559
|
this.showOverAllClear();
|
|
9563
9560
|
this.inputFocus = true;
|
|
@@ -9635,6 +9632,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9635
9632
|
}
|
|
9636
9633
|
}
|
|
9637
9634
|
}
|
|
9635
|
+
this.updateDataList();
|
|
9638
9636
|
this.refreshListItems(null);
|
|
9639
9637
|
if (this.mode !== 'Box' && this.mode !== 'CheckBox') {
|
|
9640
9638
|
this.updateDelimView();
|
|
@@ -9645,7 +9643,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9645
9643
|
}
|
|
9646
9644
|
this.overAllClear.style.display = 'none';
|
|
9647
9645
|
if (this.isPopupOpen()) {
|
|
9648
|
-
this.hidePopup();
|
|
9646
|
+
this.hidePopup(eve);
|
|
9649
9647
|
}
|
|
9650
9648
|
this.makeTextBoxEmpty();
|
|
9651
9649
|
this.trigger('blur');
|
|
@@ -9839,7 +9837,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9839
9837
|
MultiSelect.prototype.popupKeyActions = function (e) {
|
|
9840
9838
|
switch (e.keyCode) {
|
|
9841
9839
|
case 38:
|
|
9842
|
-
this.hidePopup();
|
|
9840
|
+
this.hidePopup(e);
|
|
9843
9841
|
if (this.mode === 'CheckBox') {
|
|
9844
9842
|
this.inputElement.focus();
|
|
9845
9843
|
}
|
|
@@ -9861,7 +9859,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9861
9859
|
var filterInput = this.popupWrapper.querySelector('.' + FILTERINPUT);
|
|
9862
9860
|
filterInput && filterInput.setAttribute('aria-activedescendant', focusedItem.id);
|
|
9863
9861
|
}
|
|
9864
|
-
else if (this.mode
|
|
9862
|
+
else if (this.mode == "CheckBox") {
|
|
9865
9863
|
this.overAllWrapper.setAttribute('aria-activedescendant', focusedItem.id);
|
|
9866
9864
|
}
|
|
9867
9865
|
}
|
|
@@ -9921,7 +9919,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9921
9919
|
break;
|
|
9922
9920
|
case 27:
|
|
9923
9921
|
e.preventDefault();
|
|
9924
|
-
this.hidePopup();
|
|
9922
|
+
this.hidePopup(e);
|
|
9925
9923
|
if (this.mode === 'CheckBox') {
|
|
9926
9924
|
this.inputElement.focus();
|
|
9927
9925
|
}
|
|
@@ -9938,7 +9936,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9938
9936
|
return;
|
|
9939
9937
|
case 9:
|
|
9940
9938
|
e.preventDefault();
|
|
9941
|
-
this.hidePopup();
|
|
9939
|
+
this.hidePopup(e);
|
|
9942
9940
|
this.inputElement.focus();
|
|
9943
9941
|
this.overAllWrapper.classList.add(FOCUS);
|
|
9944
9942
|
}
|
|
@@ -9966,6 +9964,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9966
9964
|
this.keyNavigation(e);
|
|
9967
9965
|
}
|
|
9968
9966
|
if (this.mode === 'CheckBox' && this.enableSelectionOrder) {
|
|
9967
|
+
if (this.allowFiltering) {
|
|
9968
|
+
this.previousFilterText = this.targetElement();
|
|
9969
|
+
}
|
|
9969
9970
|
this.checkBackCommand(e);
|
|
9970
9971
|
}
|
|
9971
9972
|
this.expandTextbox();
|
|
@@ -10008,14 +10009,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
10008
10009
|
if (!document.activeElement.classList.contains(FILTERINPUT)) {
|
|
10009
10010
|
e.preventDefault();
|
|
10010
10011
|
this.keyAction = true;
|
|
10011
|
-
this.list.focus();
|
|
10012
10012
|
}
|
|
10013
10013
|
this.selectByKey(e);
|
|
10014
10014
|
}
|
|
10015
10015
|
this.checkPlaceholderSize();
|
|
10016
10016
|
};
|
|
10017
10017
|
MultiSelect.prototype.checkBackCommand = function (e) {
|
|
10018
|
-
if (e.keyCode === 8 && this.targetElement() === '') {
|
|
10018
|
+
if (e.keyCode === 8 && this.allowFiltering ? this.targetElement() !== this.previousFilterText : this.targetElement() === '') {
|
|
10019
10019
|
this.backCommand = false;
|
|
10020
10020
|
}
|
|
10021
10021
|
else {
|
|
@@ -10161,7 +10161,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
10161
10161
|
}
|
|
10162
10162
|
this.refreshSelection();
|
|
10163
10163
|
if (this.closePopupOnSelect) {
|
|
10164
|
-
this.hidePopup();
|
|
10164
|
+
this.hidePopup(e);
|
|
10165
10165
|
}
|
|
10166
10166
|
}
|
|
10167
10167
|
this.refreshPlaceHolder();
|
|
@@ -10193,7 +10193,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
10193
10193
|
this.makeTextBoxEmpty();
|
|
10194
10194
|
}
|
|
10195
10195
|
if (this.closePopupOnSelect) {
|
|
10196
|
-
this.hidePopup();
|
|
10196
|
+
this.hidePopup(e);
|
|
10197
10197
|
}
|
|
10198
10198
|
this.checkPlaceholderSize();
|
|
10199
10199
|
};
|
|
@@ -10313,7 +10313,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
10313
10313
|
value = customVal;
|
|
10314
10314
|
}
|
|
10315
10315
|
if (this.isPopupOpen() && this.mode !== 'CheckBox') {
|
|
10316
|
-
this.hidePopup();
|
|
10316
|
+
this.hidePopup(e);
|
|
10317
10317
|
}
|
|
10318
10318
|
if (!this.inputFocus) {
|
|
10319
10319
|
this.inputElement.focus();
|
|
@@ -10427,7 +10427,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
10427
10427
|
});
|
|
10428
10428
|
_this.invokeCheckboxSelection(element_1, eve, isClearAll);
|
|
10429
10429
|
}
|
|
10430
|
-
if (_this.hideSelectedItem && _this.fields.groupBy) {
|
|
10430
|
+
if (_this.hideSelectedItem && _this.fields.groupBy && element_1) {
|
|
10431
10431
|
_this.hideGroupItem(value);
|
|
10432
10432
|
}
|
|
10433
10433
|
if (_this.hideSelectedItem && _this.fixedHeaderElement && _this.fields.groupBy && _this.mode !== 'CheckBox' &&
|
|
@@ -11271,15 +11271,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11271
11271
|
}
|
|
11272
11272
|
};
|
|
11273
11273
|
MultiSelect.prototype.updateDataList = function () {
|
|
11274
|
-
if (this.mainList && this.ulElement) {
|
|
11274
|
+
if (this.mainList && this.ulElement && !(this.isFiltered || this.filterAction)) {
|
|
11275
11275
|
var isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
|
|
11276
|
-
var isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 &&
|
|
11277
|
-
|
|
11278
|
-
(this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
|
|
11279
|
-
var isAngularTemplateUpdate = this.itemTemplate && this.ulElement.childElementCount > 0
|
|
11280
|
-
&& !(this.ulElement.childElementCount < this.mainList.childElementCount)
|
|
11281
|
-
&& (this.ulElement.children[0].childElementCount > 0
|
|
11282
|
-
|| (this.fields.groupBy && this.ulElement.children[1] && this.ulElement.children[1].childElementCount > 0));
|
|
11276
|
+
var isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
|
|
11277
|
+
var isAngularTemplateUpdate = this.itemTemplate && this.ulElement.childElementCount > 0 && !(this.ulElement.childElementCount < this.mainList.childElementCount) && (this.ulElement.children[0].childElementCount > 0 || (this.fields.groupBy && this.ulElement.children[1] && this.ulElement.children[1].childElementCount > 0));
|
|
11283
11278
|
if (isDynamicGroupItemUpdate || isReactTemplateUpdate || isAngularTemplateUpdate) {
|
|
11284
11279
|
//EJ2-57748 - for this task, we prevent the ul element cloning ( this.mainList = this.ulElement.cloneNode ? <HTMLElement>this.ulElement.cloneNode(true) : this.ulElement;)
|
|
11285
11280
|
this.mainList = this.ulElement;
|
|
@@ -11498,7 +11493,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11498
11493
|
this.focusAtFirstListItem();
|
|
11499
11494
|
}
|
|
11500
11495
|
if (this.closePopupOnSelect) {
|
|
11501
|
-
this.hidePopup();
|
|
11496
|
+
this.hidePopup(e);
|
|
11502
11497
|
}
|
|
11503
11498
|
else {
|
|
11504
11499
|
e.preventDefault();
|
|
@@ -12351,6 +12346,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12351
12346
|
}
|
|
12352
12347
|
return valuecheck;
|
|
12353
12348
|
};
|
|
12349
|
+
|
|
12354
12350
|
MultiSelect.prototype.addNonPresentItems = function (valuecheck, ulElement, list, event) {
|
|
12355
12351
|
var _this = this;
|
|
12356
12352
|
this.dataSource.executeQuery(this.getForQuery(valuecheck)).then(function (e) {
|
|
@@ -12358,6 +12354,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12358
12354
|
_this.updateActionList(ulElement, list, event);
|
|
12359
12355
|
});
|
|
12360
12356
|
};
|
|
12357
|
+
|
|
12361
12358
|
MultiSelect.prototype.updateVal = function (newProp, oldProp, prop) {
|
|
12362
12359
|
if (!this.list) {
|
|
12363
12360
|
this.onLoadSelect();
|
|
@@ -12370,7 +12367,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12370
12367
|
if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
|
|
12371
12368
|
valuecheck = this.presentItemValue(this.ulElement);
|
|
12372
12369
|
}
|
|
12373
|
-
if (prop
|
|
12370
|
+
if (prop == 'value' && valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
|
|
12374
12371
|
&& this.listData != null) {
|
|
12375
12372
|
this.mainData = null;
|
|
12376
12373
|
this.setDynValue = true;
|
|
@@ -12424,7 +12421,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12424
12421
|
*
|
|
12425
12422
|
* @returns {void}
|
|
12426
12423
|
*/
|
|
12427
|
-
MultiSelect.prototype.hidePopup = function () {
|
|
12424
|
+
MultiSelect.prototype.hidePopup = function (e) {
|
|
12428
12425
|
var _this = this;
|
|
12429
12426
|
var delay = 100;
|
|
12430
12427
|
if (this.isPopupOpen()) {
|
|
@@ -12433,7 +12430,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12433
12430
|
duration: 100,
|
|
12434
12431
|
delay: delay ? delay : 0
|
|
12435
12432
|
};
|
|
12436
|
-
var eventArgs = { popup: this.popupObj, cancel: false, animation: animModel };
|
|
12433
|
+
var eventArgs = { popup: this.popupObj, cancel: false, animation: animModel, event: e || null };
|
|
12437
12434
|
this.trigger('close', eventArgs, function (eventArgs) {
|
|
12438
12435
|
if (!eventArgs.cancel) {
|
|
12439
12436
|
if (_this.fields.groupBy && _this.mode !== 'CheckBox' && _this.fixedHeaderElement) {
|
|
@@ -12481,7 +12478,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12481
12478
|
var mainLiLength = _this.ulElement.querySelectorAll('li.' + 'e-list-item').length;
|
|
12482
12479
|
var liLength = _this.ulElement.querySelectorAll('li.'
|
|
12483
12480
|
+ dropDownBaseClasses.li + '.' + HIDE_LIST).length;
|
|
12484
|
-
if (mainLiLength > 0 && (mainLiLength === liLength) && (liLength === _this.mainData.length)) {
|
|
12481
|
+
if (mainLiLength > 0 && (mainLiLength === liLength) && (liLength === _this.mainData.length) && !(_this.targetElement() !== '' && _this.allowCustomValue)) {
|
|
12485
12482
|
_this.beforePopupOpen = false;
|
|
12486
12483
|
return;
|
|
12487
12484
|
}
|
|
@@ -13612,6 +13609,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13612
13609
|
};
|
|
13613
13610
|
ListBox.prototype.initWrapper = function () {
|
|
13614
13611
|
var hiddenSelect = this.createElement('select', { className: 'e-hidden-select', attrs: { 'multiple': '' } });
|
|
13612
|
+
hiddenSelect.style.visibility = 'hidden';
|
|
13615
13613
|
this.list.classList.add('e-listbox-wrapper');
|
|
13616
13614
|
if (this.itemTemplate) {
|
|
13617
13615
|
this.list.classList.add('e-list-template');
|
|
@@ -13904,10 +13902,10 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13904
13902
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13905
13903
|
var event = args.event;
|
|
13906
13904
|
var wrapper;
|
|
13907
|
-
if (args.target && (args.target.classList.contains(
|
|
13908
|
-
|| args.target.classList.contains(
|
|
13909
|
-
if (args.target.classList.contains(
|
|
13910
|
-
|| args.target.classList.contains(
|
|
13905
|
+
if (args.target && (args.target.classList.contains("e-listbox-wrapper") || args.target.classList.contains("e-list-item")
|
|
13906
|
+
|| args.target.classList.contains("e-filter-parent") || args.target.classList.contains("e-input-group"))) {
|
|
13907
|
+
if (args.target.classList.contains("e-list-item") || args.target.classList.contains("e-filter-parent")
|
|
13908
|
+
|| args.target.classList.contains("e-input-group")) {
|
|
13911
13909
|
wrapper = args.target.closest('.e-listbox-wrapper');
|
|
13912
13910
|
}
|
|
13913
13911
|
else {
|
|
@@ -13940,12 +13938,12 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13940
13938
|
}
|
|
13941
13939
|
};
|
|
13942
13940
|
ListBox.prototype.beforeDragEnd = function (args) {
|
|
13943
|
-
|
|
13944
|
-
if (this.value.indexOf(dragValue) > -1) {
|
|
13941
|
+
this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
|
|
13942
|
+
if (this.value.indexOf(this.dragValue) > -1) {
|
|
13945
13943
|
args.items = this.getDataByValues(this.value);
|
|
13946
13944
|
}
|
|
13947
13945
|
else {
|
|
13948
|
-
args.items = this.getDataByValues([dragValue]);
|
|
13946
|
+
args.items = this.getDataByValues([this.dragValue]);
|
|
13949
13947
|
}
|
|
13950
13948
|
this.trigger('beforeDrop', args);
|
|
13951
13949
|
};
|
|
@@ -13962,8 +13960,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13962
13960
|
var getArgs = this.getDragArgs({ target: args.droppedElement }, true);
|
|
13963
13961
|
var sourceArgs = { previousData: this.dataSource };
|
|
13964
13962
|
var destArgs = { previousData: listObj.dataSource };
|
|
13965
|
-
var dragArgs = extend({}, getArgs, { target: args.target, source: { previousData: this.dataSource },
|
|
13966
|
-
previousIndex: args.previousIndex, currentIndex: args.currentIndex });
|
|
13963
|
+
var dragArgs = extend({}, getArgs, { target: args.target, source: { previousData: this.dataSource }, previousIndex: args.previousIndex, currentIndex: args.currentIndex });
|
|
13967
13964
|
if (listObj !== this) {
|
|
13968
13965
|
var sourceArgs1 = extend(sourceArgs, { currentData: this.listData });
|
|
13969
13966
|
dragArgs = extend(dragArgs, { source: sourceArgs1, destination: destArgs });
|
|
@@ -14094,7 +14091,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
14094
14091
|
};
|
|
14095
14092
|
ListBox.prototype.updateListItems = function (sourceElem, destElem) {
|
|
14096
14093
|
var i = 0;
|
|
14097
|
-
destElem.innerHTML =
|
|
14094
|
+
destElem.innerHTML = "";
|
|
14098
14095
|
while (i < sourceElem.childNodes.length) {
|
|
14099
14096
|
destElem.appendChild(sourceElem.childNodes[i]);
|
|
14100
14097
|
}
|
|
@@ -15078,6 +15075,15 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
15078
15075
|
return listObj;
|
|
15079
15076
|
};
|
|
15080
15077
|
ListBox.prototype.getGrabbedItems = function () {
|
|
15078
|
+
for (var i = 0; i < this.value.length; i++) {
|
|
15079
|
+
if (this.value[i] === this.dragValue) {
|
|
15080
|
+
var liColl = this.list.querySelectorAll('[aria-selected="true"]');
|
|
15081
|
+
for (var i_1 = 0; i_1 < liColl.length; i_1++) {
|
|
15082
|
+
liColl[i_1].classList.add('e-grabbed');
|
|
15083
|
+
}
|
|
15084
|
+
break;
|
|
15085
|
+
}
|
|
15086
|
+
}
|
|
15081
15087
|
var elems = Array.prototype.slice.call(this.element.querySelectorAll('.e-grabbed'));
|
|
15082
15088
|
return elems;
|
|
15083
15089
|
};
|
|
@@ -15134,7 +15140,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
15134
15140
|
}
|
|
15135
15141
|
}
|
|
15136
15142
|
}
|
|
15137
|
-
else if (e.keyCode !== 37 && e.keyCode !== 39 && e.code !==
|
|
15143
|
+
else if (e.keyCode !== 37 && e.keyCode !== 39 && e.code !== "KeyA") {
|
|
15138
15144
|
this.upDownKeyHandler(e);
|
|
15139
15145
|
}
|
|
15140
15146
|
}
|
|
@@ -15178,8 +15184,8 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
15178
15184
|
}
|
|
15179
15185
|
if (this.selectionSettings.showCheckbox && e.ctrlKey && e.shiftKey && (e.keyCode === 36 || e.keyCode === 35)) {
|
|
15180
15186
|
var selectedidx = Array.prototype.indexOf.call(ul.children, fli);
|
|
15181
|
-
var sidx = e.code ===
|
|
15182
|
-
var eidx = e.code ===
|
|
15187
|
+
var sidx = e.code === "Home" ? 0 : selectedidx;
|
|
15188
|
+
var eidx = e.code === "Home" ? selectedidx : ul.children.length - 1;
|
|
15183
15189
|
for (var i = sidx; i <= eidx; i++) {
|
|
15184
15190
|
var item = ul.children[i];
|
|
15185
15191
|
this.notify('updatelist', { li: item, e: {
|