@syncfusion/ej2-dropdowns 29.1.41 → 29.2.5
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 +275 -128
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +283 -132
- 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 +12 -12
- package/src/auto-complete/auto-complete.d.ts +1 -0
- package/src/auto-complete/auto-complete.js +9 -1
- package/src/combo-box/combo-box-model.d.ts +1 -9
- package/src/combo-box/combo-box.d.ts +0 -7
- package/src/combo-box/combo-box.js +22 -17
- package/src/common/virtual-scroll.js +8 -3
- package/src/drop-down-base/drop-down-base.d.ts +5 -1
- package/src/drop-down-base/drop-down-base.js +71 -10
- package/src/drop-down-list/drop-down-list-model.d.ts +7 -0
- package/src/drop-down-list/drop-down-list.d.ts +7 -0
- package/src/drop-down-list/drop-down-list.js +42 -24
- package/src/drop-down-tree/drop-down-tree.d.ts +1 -0
- package/src/drop-down-tree/drop-down-tree.js +14 -11
- package/src/mention/mention-model.d.ts +7 -0
- package/src/mention/mention.d.ts +8 -0
- package/src/mention/mention.js +29 -16
- package/src/multi-select/multi-select-model.d.ts +7 -0
- package/src/multi-select/multi-select.d.ts +9 -0
- package/src/multi-select/multi-select.js +88 -50
- package/styles/bds-lite.css +1 -1
- package/styles/bds.css +1 -1
- package/styles/multi-select/_bds-definition.scss +1 -0
- package/styles/multi-select/_layout.scss +6 -1
- package/styles/multi-select/_tailwind-definition.scss +1 -0
- package/styles/multi-select/bds.css +1 -1
- package/styles/multi-select/tailwind-dark.css +1 -1
- package/styles/multi-select/tailwind.css +1 -1
- package/styles/tailwind-dark-lite.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind-lite.css +1 -1
- package/styles/tailwind.css +1 -1
|
@@ -545,6 +545,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
545
545
|
query = query.skip(this.parent.viewPortInfo.startIndex);
|
|
546
546
|
}
|
|
547
547
|
this.parent.setCurrentView = false;
|
|
548
|
+
this.parent.isPreventScrollAction = true;
|
|
548
549
|
this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
|
|
549
550
|
isResetListCalled = true;
|
|
550
551
|
break;
|
|
@@ -592,6 +593,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
592
593
|
}
|
|
593
594
|
}
|
|
594
595
|
this.parent.renderItems(currentData, this.parent.fields, this.component === 'multiselect' && this.parent.mode === 'CheckBox');
|
|
596
|
+
this.parent.updateSelectionList();
|
|
595
597
|
}
|
|
596
598
|
if (this.component === 'multiselect') {
|
|
597
599
|
this.parent.updatevirtualizationList();
|
|
@@ -603,7 +605,8 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
603
605
|
(this.parent.totalItemCount <= this.parent.itemCount))) ? 0 : this.parent.skeletonCount;
|
|
604
606
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
605
607
|
var virtualTrackElement = this.parent.list.getElementsByClassName('e-virtual-ddl')[0];
|
|
606
|
-
|
|
608
|
+
var preventAction = this.component !== 'multiselect' || (this.component === 'multiselect' && ((!(this.parent.dataSource instanceof DataManager))) || (this.parent.dataSource instanceof DataManager && !isResetListCalled));
|
|
609
|
+
if (virtualTrackElement && preventAction) {
|
|
607
610
|
virtualTrackElement.style = this.parent.GetVirtualTrackHeight();
|
|
608
611
|
}
|
|
609
612
|
else if (!virtualTrackElement && this.parent.skeletonCount > 0 && this.parent.popupWrapper) {
|
|
@@ -612,11 +615,13 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
612
615
|
});
|
|
613
616
|
this.parent.popupWrapper.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
614
617
|
}
|
|
615
|
-
this.parent.
|
|
618
|
+
if (this.component !== 'multiselect' || (this.component === 'multiselect' && ((!(this.parent.dataSource instanceof DataManager))) || (this.parent.dataSource instanceof DataManager && (!isResetListCalled || this.parent.viewPortInfo.startIndex === 0)))) {
|
|
619
|
+
this.parent.UpdateSkeleton();
|
|
620
|
+
}
|
|
616
621
|
this.parent.liCollections = this.parent.list.querySelectorAll('.e-list-item');
|
|
617
622
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
618
623
|
var virtualContentElement = this.parent.list.getElementsByClassName('e-virtual-ddl-content')[0];
|
|
619
|
-
if (virtualContentElement) {
|
|
624
|
+
if (virtualContentElement && preventAction) {
|
|
620
625
|
(virtualContentElement).style = this.parent.getTransformValues();
|
|
621
626
|
}
|
|
622
627
|
if (this.parent.fields.groupBy) {
|
|
@@ -989,6 +994,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
989
994
|
_this.isDynamicData = false;
|
|
990
995
|
_this.isPrimitiveData = false;
|
|
991
996
|
_this.isCustomFiltering = false;
|
|
997
|
+
_this.debounceTimer = null;
|
|
992
998
|
_this.virtualListInfo = {
|
|
993
999
|
currentPageNumber: null,
|
|
994
1000
|
direction: null,
|
|
@@ -1350,6 +1356,29 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1350
1356
|
isContainSkeleton.firstChild.insertBefore(liElement, isContainSkeleton.firstChild.children[0]);
|
|
1351
1357
|
}
|
|
1352
1358
|
}
|
|
1359
|
+
if (this.getModuleName() === 'multiselect') {
|
|
1360
|
+
for (var i = 0; i < totalSkeletonCount && this.totalItemCount !== this.viewPortInfo.endIndex; i++) {
|
|
1361
|
+
var liElement = this.createElement('li', { className: dropDownBaseClasses.virtualList + " e-virtual-list-end", styles: 'overflow: inherit' });
|
|
1362
|
+
if (this.isVirtualizationEnabled && this.itemTemplate) {
|
|
1363
|
+
liElement.style.height = (this.listItemHeight - parseInt(window.getComputedStyle(this.getItems()[1]).marginBottom, 10)) + 'px';
|
|
1364
|
+
}
|
|
1365
|
+
var skeleton = new Skeleton({
|
|
1366
|
+
shape: 'Text',
|
|
1367
|
+
height: '10px',
|
|
1368
|
+
width: '95%',
|
|
1369
|
+
cssClass: 'e-skeleton-text-end'
|
|
1370
|
+
});
|
|
1371
|
+
skeleton.appendTo(this.createElement('div'));
|
|
1372
|
+
liElement.appendChild(skeleton.element);
|
|
1373
|
+
if (isContainSkeleton.firstChild) {
|
|
1374
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1375
|
+
isContainSkeleton.firstChild.appendChild(liElement);
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
if (this.totalItemCount === this.viewPortInfo.endIndex) {
|
|
1379
|
+
isContainSkeleton.querySelectorAll('.e-virtual-list-end').forEach(function (el) { return el.remove(); });
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1353
1382
|
}
|
|
1354
1383
|
};
|
|
1355
1384
|
DropDownBase.prototype.getLocaleName = function () {
|
|
@@ -1630,7 +1659,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1630
1659
|
_this.preventPopupOpen = false;
|
|
1631
1660
|
return;
|
|
1632
1661
|
}
|
|
1662
|
+
var isSetCurrentcall = false;
|
|
1633
1663
|
if (_this.isVirtualizationEnabled && _this.setCurrentView) {
|
|
1664
|
+
isSetCurrentcall = true;
|
|
1634
1665
|
_this.notify('setCurrentViewDataAsync', {
|
|
1635
1666
|
module: 'VirtualScroll'
|
|
1636
1667
|
});
|
|
@@ -1638,7 +1669,8 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1638
1669
|
if (_this.keyboardEvent != null) {
|
|
1639
1670
|
_this.handleVirtualKeyboardActions(_this.keyboardEvent, _this.pageCount);
|
|
1640
1671
|
}
|
|
1641
|
-
|
|
1672
|
+
var preventSkeleton = _this.getModuleName() !== 'multiselect' || (_this.getModuleName() === 'multiselect' && (!(_this.dataSource instanceof DataManager) || (_this.dataSource instanceof DataManager && !isSetCurrentcall)));
|
|
1673
|
+
if (_this.isVirtualizationEnabled && preventSkeleton) {
|
|
1642
1674
|
_this.getFilteringSkeletonCount();
|
|
1643
1675
|
_this.updatePopupPosition();
|
|
1644
1676
|
}
|
|
@@ -1840,6 +1872,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1840
1872
|
};
|
|
1841
1873
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1842
1874
|
DropDownBase.prototype.onActionComplete = function (ulElement, list, e) {
|
|
1875
|
+
var _this = this;
|
|
1843
1876
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
1844
1877
|
this.listData = list;
|
|
1845
1878
|
if (this.isVirtualizationEnabled && !this.isCustomDataUpdated && !this.virtualSelectAll) {
|
|
@@ -1869,6 +1902,13 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1869
1902
|
}
|
|
1870
1903
|
}
|
|
1871
1904
|
}
|
|
1905
|
+
if (this.getModuleName() === 'multiselect' && this.isAngular && this.ngEle) {
|
|
1906
|
+
var popupHolder = this.list;
|
|
1907
|
+
if (popupHolder) {
|
|
1908
|
+
var prevHeight = popupHolder.offsetHeight + 'px';
|
|
1909
|
+
popupHolder.style.height = prevHeight;
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1872
1912
|
if (!isNullOrUndefined(this.list)) {
|
|
1873
1913
|
if (!this.isVirtualizationEnabled) {
|
|
1874
1914
|
this.list.innerHTML = '';
|
|
@@ -1878,15 +1918,26 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1878
1918
|
this.postRender(this.list, list, this.bindEvent);
|
|
1879
1919
|
}
|
|
1880
1920
|
}
|
|
1921
|
+
if (this.getModuleName() === 'multiselect' && this.isAngular && this.ngEle) {
|
|
1922
|
+
var popupHolder_1 = this.list;
|
|
1923
|
+
if (popupHolder_1) {
|
|
1924
|
+
setTimeout(function () {
|
|
1925
|
+
popupHolder_1.style.height = '';
|
|
1926
|
+
_this.refreshPopup();
|
|
1927
|
+
}, 0);
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1881
1930
|
};
|
|
1882
1931
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1883
1932
|
DropDownBase.prototype.postRender = function (listElement, list, bindEvent) {
|
|
1884
1933
|
if (this.fields.disabled) {
|
|
1885
1934
|
var liCollections = listElement.querySelectorAll('.' + dropDownBaseClasses.li);
|
|
1935
|
+
var data = this.sortOrder !== 'None' ? !isNullOrUndefined(this.fields.groupBy) ?
|
|
1936
|
+
this.sortedData.filter(function (item) { return !('isHeader' in item) || item.isHeader !== true; }) : this.sortedData : this.listData;
|
|
1886
1937
|
for (var index = 0; index < liCollections.length; index++) {
|
|
1887
|
-
if (JSON.parse(JSON.stringify(
|
|
1938
|
+
if (JSON.parse(JSON.stringify(data[index]))[this.fields.disabled]) {
|
|
1888
1939
|
if (!isNullOrUndefined(this.fields.groupBy)) {
|
|
1889
|
-
var item =
|
|
1940
|
+
var item = data[index];
|
|
1890
1941
|
var value = getValue((this.fields.value ? this.fields.value : 'value'), item);
|
|
1891
1942
|
var li = listElement.querySelector('li[data-value="' + value + '"]');
|
|
1892
1943
|
if (!isNullOrUndefined(li)) {
|
|
@@ -1928,6 +1979,18 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1928
1979
|
DropDownBase.prototype.getQuery = function (query) {
|
|
1929
1980
|
return query ? query : this.query ? this.query : new Query();
|
|
1930
1981
|
};
|
|
1982
|
+
DropDownBase.prototype.performFiltering = function (e) {
|
|
1983
|
+
// this is for component wise
|
|
1984
|
+
};
|
|
1985
|
+
DropDownBase.prototype.debouncedFiltering = function (e, debounceDelay) {
|
|
1986
|
+
var _this = this;
|
|
1987
|
+
if (this.debounceTimer !== null) {
|
|
1988
|
+
clearTimeout(this.debounceTimer);
|
|
1989
|
+
}
|
|
1990
|
+
this.debounceTimer = setTimeout(function () {
|
|
1991
|
+
_this.performFiltering(e);
|
|
1992
|
+
}, debounceDelay);
|
|
1993
|
+
};
|
|
1931
1994
|
DropDownBase.prototype.updateVirtualizationProperties = function (itemCount, filtering, isCheckbox) {
|
|
1932
1995
|
this.isVirtualizationEnabled = true;
|
|
1933
1996
|
this.virtualizedItemsCount = itemCount;
|
|
@@ -2101,9 +2164,10 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2101
2164
|
* @param {object[]} listData - Specifies the list of array of data.
|
|
2102
2165
|
* @param {FieldSettingsModel} fields - Maps the columns of the data table and binds the data to the component.
|
|
2103
2166
|
* @param {boolean} isCheckBoxUpdate - Specifies whether the list item is updated with checkbox.
|
|
2167
|
+
* @param {boolean} isClearAll - Specifies whether the current action is clearAll.
|
|
2104
2168
|
* @returns {HTMLElement} Return the list items.
|
|
2105
2169
|
*/
|
|
2106
|
-
DropDownBase.prototype.renderItems = function (listData, fields, isCheckBoxUpdate) {
|
|
2170
|
+
DropDownBase.prototype.renderItems = function (listData, fields, isCheckBoxUpdate, isClearAll) {
|
|
2107
2171
|
var ulElement;
|
|
2108
2172
|
if (this.itemTemplate && listData) {
|
|
2109
2173
|
if (this.getModuleName() === 'multiselect' && this.virtualSelectAll) {
|
|
@@ -2157,7 +2221,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2157
2221
|
}
|
|
2158
2222
|
}
|
|
2159
2223
|
else {
|
|
2160
|
-
if (this.getModuleName() === 'multiselect' && this.virtualSelectAll) {
|
|
2224
|
+
if (this.getModuleName() === 'multiselect' && (this.virtualSelectAll && !isClearAll)) {
|
|
2161
2225
|
this.virtualSelectAllData = listData;
|
|
2162
2226
|
listData = listData.slice(this.virtualItemStartIndex, this.virtualItemEndIndex);
|
|
2163
2227
|
}
|
|
@@ -2176,11 +2240,13 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2176
2240
|
oldUlElement = this.list.querySelector('.e-list-parent' + '.e-reorder');
|
|
2177
2241
|
}
|
|
2178
2242
|
if ((listData.length >= this.virtualizedItemsCount && oldUlElement && virtualUlElement) || (oldUlElement && virtualUlElement && this.isAllowFiltering) || (oldUlElement && virtualUlElement && (this.getModuleName() === 'autocomplete' || this.getModuleName() === 'multiselect')) || isRemovedUlelement) {
|
|
2179
|
-
if (!this.
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2243
|
+
if (this.getModuleName() !== 'multiselect' || (this.getModuleName() === 'multiselect' && (!(this.dataSource instanceof DataManager) || (this.dataSource instanceof DataManager && !this.setCurrentView)))) {
|
|
2244
|
+
if (!this.appendUncheckList) {
|
|
2245
|
+
virtualUlElement.replaceChild(ulElement, oldUlElement);
|
|
2246
|
+
}
|
|
2247
|
+
else {
|
|
2248
|
+
virtualUlElement.appendChild(ulElement);
|
|
2249
|
+
}
|
|
2184
2250
|
}
|
|
2185
2251
|
this.updateListElements(listData);
|
|
2186
2252
|
}
|
|
@@ -4346,7 +4412,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4346
4412
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
4347
4413
|
var proxy_1 = this;
|
|
4348
4414
|
// eslint-disable-next-line max-len
|
|
4349
|
-
var duration = (this.
|
|
4415
|
+
var duration = ((this.dataSource instanceof DataManager) && this.groupTemplate) ? 700 :
|
|
4416
|
+
(this.element.tagName === this.getNgDirective() && this.itemTemplate) ? 500 : 100;
|
|
4350
4417
|
if (!this.isSecondClick) {
|
|
4351
4418
|
setTimeout(function () {
|
|
4352
4419
|
proxy_1.cloneElements();
|
|
@@ -4949,8 +5016,31 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4949
5016
|
var input = this.inputElement;
|
|
4950
5017
|
return { start: Math.abs(input.selectionStart), end: Math.abs(input.selectionEnd) };
|
|
4951
5018
|
};
|
|
4952
|
-
DropDownList.prototype.
|
|
5019
|
+
DropDownList.prototype.performFiltering = function (e) {
|
|
4953
5020
|
var _this = this;
|
|
5021
|
+
this.checkAndResetCache();
|
|
5022
|
+
this.isRequesting = false;
|
|
5023
|
+
var eventArgs = {
|
|
5024
|
+
preventDefaultAction: false,
|
|
5025
|
+
text: this.filterInput.value,
|
|
5026
|
+
updateData: function (dataSource, query, fields) {
|
|
5027
|
+
if (eventArgs.cancel) {
|
|
5028
|
+
return;
|
|
5029
|
+
}
|
|
5030
|
+
_this.isCustomFilter = true;
|
|
5031
|
+
_this.customFilterQuery = query ? query.clone() : query;
|
|
5032
|
+
_this.filteringAction(dataSource, query, fields);
|
|
5033
|
+
},
|
|
5034
|
+
baseEventArgs: e,
|
|
5035
|
+
cancel: false
|
|
5036
|
+
};
|
|
5037
|
+
this.trigger('filtering', eventArgs, function (eventArgs) {
|
|
5038
|
+
if (!eventArgs.cancel && !_this.isCustomFilter && !eventArgs.preventDefaultAction) {
|
|
5039
|
+
_this.filteringAction(_this.dataSource, null, _this.fields);
|
|
5040
|
+
}
|
|
5041
|
+
});
|
|
5042
|
+
};
|
|
5043
|
+
DropDownList.prototype.searchLists = function (e) {
|
|
4954
5044
|
this.isTyped = true;
|
|
4955
5045
|
this.activeIndex = null;
|
|
4956
5046
|
this.isListSearched = true;
|
|
@@ -4960,27 +5050,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4960
5050
|
}
|
|
4961
5051
|
this.isDataFetched = false;
|
|
4962
5052
|
if (this.isFiltering()) {
|
|
4963
|
-
this.
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
if (eventArgs_1.cancel) {
|
|
4970
|
-
return;
|
|
4971
|
-
}
|
|
4972
|
-
_this.isCustomFilter = true;
|
|
4973
|
-
_this.customFilterQuery = query ? query.clone() : query;
|
|
4974
|
-
_this.filteringAction(dataSource, query, fields);
|
|
4975
|
-
},
|
|
4976
|
-
baseEventArgs: e,
|
|
4977
|
-
cancel: false
|
|
4978
|
-
};
|
|
4979
|
-
this.trigger('filtering', eventArgs_1, function (eventArgs) {
|
|
4980
|
-
if (!eventArgs.cancel && !_this.isCustomFilter && !eventArgs.preventDefaultAction) {
|
|
4981
|
-
_this.filteringAction(_this.dataSource, null, _this.fields);
|
|
4982
|
-
}
|
|
4983
|
-
});
|
|
5053
|
+
if (this.typedString !== '' && this.debounceDelay > 0) {
|
|
5054
|
+
this.debouncedFiltering(e, this.debounceDelay);
|
|
5055
|
+
}
|
|
5056
|
+
else {
|
|
5057
|
+
this.performFiltering(e);
|
|
5058
|
+
}
|
|
4984
5059
|
}
|
|
4985
5060
|
};
|
|
4986
5061
|
/**
|
|
@@ -5250,7 +5325,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5250
5325
|
this.dataSource.executeQuery(this.getQuery(this.query).where(new Predicate(checkField_1, 'equal', value_1)))
|
|
5251
5326
|
.then(function (e) {
|
|
5252
5327
|
if (e.result.length > 0) {
|
|
5253
|
-
_this.
|
|
5328
|
+
if (!_this.enableVirtualization) {
|
|
5329
|
+
_this.addItem(e.result, list.length);
|
|
5330
|
+
}
|
|
5254
5331
|
_this.updateValues();
|
|
5255
5332
|
}
|
|
5256
5333
|
else {
|
|
@@ -6946,6 +7023,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6946
7023
|
if (!this.enabled) {
|
|
6947
7024
|
return;
|
|
6948
7025
|
}
|
|
7026
|
+
if (this.getModuleName() === 'dropdownlist' && this.beforePopupOpen && !this.isPopupOpen) {
|
|
7027
|
+
this.beforePopupOpen = false;
|
|
7028
|
+
}
|
|
6949
7029
|
this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
|
|
6950
7030
|
if (this.isReact && this.getModuleName() === 'combobox' && this.itemTemplate && this.isCustomFilter && this.isAddNewItemTemplate) {
|
|
6951
7031
|
this.renderList();
|
|
@@ -7214,6 +7294,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7214
7294
|
this.inputElement.classList.remove('e-input');
|
|
7215
7295
|
Input.setValue('', this.inputElement, this.floatLabelType, this.showClearButton);
|
|
7216
7296
|
}
|
|
7297
|
+
this.element.removeAttribute('tabindex');
|
|
7217
7298
|
this.element.style.display = 'block';
|
|
7218
7299
|
if (this.inputWrapper.container && this.inputWrapper.container.parentElement) {
|
|
7219
7300
|
if (this.inputWrapper.container.parentElement.tagName === this.getNgDirective()) {
|
|
@@ -7333,6 +7414,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7333
7414
|
__decorate$1([
|
|
7334
7415
|
Property(false)
|
|
7335
7416
|
], DropDownList.prototype, "allowFiltering", void 0);
|
|
7417
|
+
__decorate$1([
|
|
7418
|
+
Property(300)
|
|
7419
|
+
], DropDownList.prototype, "debounceDelay", void 0);
|
|
7336
7420
|
__decorate$1([
|
|
7337
7421
|
Property(true)
|
|
7338
7422
|
], DropDownList.prototype, "isDeviceFullScreen", void 0);
|
|
@@ -8036,6 +8120,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8036
8120
|
};
|
|
8037
8121
|
/* To wire events for the dropdown tree */
|
|
8038
8122
|
DropDownTree.prototype.wireEvents = function () {
|
|
8123
|
+
if (Browser.isIos) {
|
|
8124
|
+
EventHandler.add(this.inputWrapper, 'touchstart', this.handleIosTouch, this);
|
|
8125
|
+
}
|
|
8039
8126
|
EventHandler.add(this.inputWrapper, 'mouseup', this.dropDownClick, this);
|
|
8040
8127
|
EventHandler.add(this.inputWrapper, 'focus', this.focusIn, this);
|
|
8041
8128
|
EventHandler.add(this.inputWrapper, 'blur', this.focusOut, this);
|
|
@@ -8069,6 +8156,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8069
8156
|
};
|
|
8070
8157
|
/* To unwire events for the dropdown tree */
|
|
8071
8158
|
DropDownTree.prototype.unWireEvents = function () {
|
|
8159
|
+
if (Browser.isIos) {
|
|
8160
|
+
EventHandler.remove(this.inputWrapper, 'touchstart', this.handleIosTouch);
|
|
8161
|
+
}
|
|
8072
8162
|
EventHandler.remove(this.inputWrapper, 'mouseup', this.dropDownClick);
|
|
8073
8163
|
EventHandler.remove(this.inputWrapper, 'focus', this.focusIn);
|
|
8074
8164
|
EventHandler.remove(this.inputWrapper, 'blur', this.focusOut);
|
|
@@ -8086,6 +8176,11 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8086
8176
|
}
|
|
8087
8177
|
document.removeEventListener('mousedown', this.documentClickContext);
|
|
8088
8178
|
};
|
|
8179
|
+
/* Handles touch events specifically for iOS devices */
|
|
8180
|
+
DropDownTree.prototype.handleIosTouch = function (e) {
|
|
8181
|
+
e.preventDefault();
|
|
8182
|
+
this.dropDownClick(e);
|
|
8183
|
+
};
|
|
8089
8184
|
/* Trigger when the dropdown is clicked */
|
|
8090
8185
|
DropDownTree.prototype.dropDownClick = function (e) {
|
|
8091
8186
|
if (!this.enabled || this.readonly) {
|
|
@@ -9009,7 +9104,8 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9009
9104
|
loadOnDemand: this.treeSettings.loadOnDemand,
|
|
9010
9105
|
nodeSelecting: this.onBeforeSelect.bind(this),
|
|
9011
9106
|
nodeTemplate: this.itemTemplate,
|
|
9012
|
-
checkDisabledChildren: this.treeSettings.checkDisabledChildren
|
|
9107
|
+
checkDisabledChildren: this.treeSettings.checkDisabledChildren,
|
|
9108
|
+
checkOnClick: true
|
|
9013
9109
|
});
|
|
9014
9110
|
this.treeObj.root = this.root ? this.root : this;
|
|
9015
9111
|
this.treeObj.appendTo(this.tree);
|
|
@@ -9090,7 +9186,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9090
9186
|
_this.popupObj.refreshPosition();
|
|
9091
9187
|
if (!(_this.showSelectAll || _this.allowFiltering) && (!_this.popupDiv.classList.contains(NODATA)
|
|
9092
9188
|
&& _this.treeItems.length > 0)) {
|
|
9093
|
-
var focusedElement = _this.value != null && _this.text != null ? _this.treeObj.element.querySelector('[data-uid="' + _this.value[
|
|
9189
|
+
var focusedElement = _this.value != null && _this.text != null ? _this.treeObj.element.querySelector('[data-uid="' + _this.value[_this.value.length - 1] + '"]') : null;
|
|
9094
9190
|
if (focusedElement) {
|
|
9095
9191
|
_this.treeObj.element.querySelector('li').setAttribute('tabindex', '-1');
|
|
9096
9192
|
focusedElement.setAttribute('tabindex', '0');
|
|
@@ -9537,15 +9633,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9537
9633
|
}
|
|
9538
9634
|
var target = args.event.target;
|
|
9539
9635
|
if ((target.classList.contains('e-fullrow') || target.classList.contains('e-list-text')) && this.showCheckBox) {
|
|
9540
|
-
this.isClicked = true;
|
|
9541
|
-
var getNodeDetails = this.treeObj.getNode(args.node);
|
|
9542
|
-
if (getNodeDetails.isChecked === 'true') {
|
|
9543
|
-
this.treeObj.uncheckAll([args.node]);
|
|
9544
|
-
}
|
|
9545
|
-
else {
|
|
9546
|
-
this.treeObj.checkAll([args.node]);
|
|
9547
|
-
}
|
|
9548
|
-
this.isClicked = false;
|
|
9549
9636
|
this.setMultiSelect();
|
|
9550
9637
|
this.ensurePlaceHolder();
|
|
9551
9638
|
}
|
|
@@ -11135,6 +11222,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
11135
11222
|
}
|
|
11136
11223
|
};
|
|
11137
11224
|
ComboBox.prototype.updateValues = function () {
|
|
11225
|
+
var _this = this;
|
|
11138
11226
|
if (this.fields.disabled) {
|
|
11139
11227
|
if (this.value != null) {
|
|
11140
11228
|
this.value = !this.isDisableItemValue(this.value) ? this.value : null;
|
|
@@ -11155,19 +11243,22 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
11155
11243
|
var fields = (this.fields.value) ? this.fields.value : '';
|
|
11156
11244
|
var currentValue_1 = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
|
|
11157
11245
|
if (this.dataSource instanceof DataManager) {
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11246
|
+
this.dataSource.executeQuery(new Query().where(new Predicate(fields, 'equal', currentValue_1)))
|
|
11247
|
+
.then(function (e) {
|
|
11248
|
+
if (e.result.length > 0) {
|
|
11249
|
+
_this.itemData = e.result[0];
|
|
11250
|
+
var dataItem = _this.getItemData();
|
|
11251
|
+
var value = _this.allowObjectBinding ?
|
|
11252
|
+
_this.getDataByValue(dataItem.value) : dataItem.value;
|
|
11253
|
+
if ((_this.value === dataItem.value && _this.text !== dataItem.text) ||
|
|
11254
|
+
(_this.value !== dataItem.value && _this.text === dataItem.text)) {
|
|
11255
|
+
_this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
|
|
11256
|
+
}
|
|
11169
11257
|
}
|
|
11170
|
-
|
|
11258
|
+
else {
|
|
11259
|
+
_this.valueMuteChange(null);
|
|
11260
|
+
}
|
|
11261
|
+
});
|
|
11171
11262
|
}
|
|
11172
11263
|
else {
|
|
11173
11264
|
var getItem = new DataManager(this.dataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', currentValue_1)));
|
|
@@ -11195,7 +11286,8 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
11195
11286
|
(this.allowCustom && this.enableVirtualization && !doesItemExist)) {
|
|
11196
11287
|
this.valueMuteChange(this.value);
|
|
11197
11288
|
}
|
|
11198
|
-
else if (!this.enableVirtualization || (this.enableVirtualization && !
|
|
11289
|
+
else if (!this.enableVirtualization || (this.enableVirtualization && !(this.dataSource instanceof DataManager)
|
|
11290
|
+
&& !doesItemExist)) {
|
|
11199
11291
|
this.valueMuteChange(null);
|
|
11200
11292
|
}
|
|
11201
11293
|
}
|
|
@@ -11359,7 +11451,10 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
11359
11451
|
}
|
|
11360
11452
|
}
|
|
11361
11453
|
var activeElement = activeItem.item;
|
|
11362
|
-
|
|
11454
|
+
var dataItem_1 = this.getItemData();
|
|
11455
|
+
if ((!isNullOrUndefined(activeElement) && !this.enableVirtualization) || (this.enableVirtualization &&
|
|
11456
|
+
this.isTyped && isNullOrUndefined(dataItem_1) && isNullOrUndefined(dataItem_1.value) &&
|
|
11457
|
+
dataItem_1.value.toString() === activeElement.getAttribute('data-value').toString())) {
|
|
11363
11458
|
var count = this.getIndexByValue(activeElement.getAttribute('data-value')) - 1;
|
|
11364
11459
|
var height = parseInt(getComputedStyle(this.liCollections[0], null).getPropertyValue('height'), 10);
|
|
11365
11460
|
if (!isNaN(height) && this.getModuleName() !== 'autocomplete') {
|
|
@@ -11984,9 +12079,6 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
11984
12079
|
__decorate$3([
|
|
11985
12080
|
Property(true)
|
|
11986
12081
|
], ComboBox.prototype, "showClearButton", void 0);
|
|
11987
|
-
__decorate$3([
|
|
11988
|
-
Property(false)
|
|
11989
|
-
], ComboBox.prototype, "enableRtl", void 0);
|
|
11990
12082
|
__decorate$3([
|
|
11991
12083
|
Event()
|
|
11992
12084
|
], ComboBox.prototype, "customValueSpecifier", void 0);
|
|
@@ -12194,7 +12286,6 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
|
|
|
12194
12286
|
return filterQuery;
|
|
12195
12287
|
};
|
|
12196
12288
|
AutoComplete.prototype.searchLists = function (e) {
|
|
12197
|
-
var _this_1 = this;
|
|
12198
12289
|
this.isTyped = true;
|
|
12199
12290
|
this.isDataFetched = this.isSelectCustom = false;
|
|
12200
12291
|
this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
|
|
@@ -12212,6 +12303,15 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
|
|
|
12212
12303
|
this.isSelected = false;
|
|
12213
12304
|
this.activeIndex = null;
|
|
12214
12305
|
this.isRequesting = false;
|
|
12306
|
+
if (this.queryString !== '' && this.debounceDelay > 0) {
|
|
12307
|
+
this.debouncedFiltering(e, this.debounceDelay);
|
|
12308
|
+
}
|
|
12309
|
+
else {
|
|
12310
|
+
this.performFiltering(e);
|
|
12311
|
+
}
|
|
12312
|
+
};
|
|
12313
|
+
AutoComplete.prototype.performFiltering = function (e) {
|
|
12314
|
+
var _this_1 = this;
|
|
12215
12315
|
var eventArgs = {
|
|
12216
12316
|
preventDefaultAction: false,
|
|
12217
12317
|
text: this.filterInput.value,
|
|
@@ -13363,7 +13463,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13363
13463
|
valuecheck = this.presentItemValue(this.ulElement);
|
|
13364
13464
|
}
|
|
13365
13465
|
if (valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
|
|
13366
|
-
&& this.listData != null) {
|
|
13466
|
+
&& this.listData != null && !(valuecheck.length === 1 && valuecheck[0] == null)) {
|
|
13367
13467
|
this.isaddNonPresentItems = true;
|
|
13368
13468
|
this.addNonPresentItems(valuecheck, this.ulElement, this.listData);
|
|
13369
13469
|
this.isaddNonPresentItems = false;
|
|
@@ -13982,13 +14082,18 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13982
14082
|
this.checkAndScrollParent();
|
|
13983
14083
|
};
|
|
13984
14084
|
MultiSelect.prototype.checkAndScrollParent = function () {
|
|
13985
|
-
var
|
|
13986
|
-
|
|
13987
|
-
var
|
|
13988
|
-
var
|
|
13989
|
-
if (!isNaN(
|
|
13990
|
-
|
|
14085
|
+
var scrollElement = this.overAllWrapper ? this.overAllWrapper.parentElement : null;
|
|
14086
|
+
while (scrollElement) {
|
|
14087
|
+
var scrollElementStyle = getComputedStyle(scrollElement);
|
|
14088
|
+
var scrollElmentHeight = parseFloat(scrollElementStyle.maxHeight) || parseFloat(scrollElementStyle.height);
|
|
14089
|
+
if (!isNaN(scrollElmentHeight)) {
|
|
14090
|
+
var overflowY = scrollElementStyle.overflowY;
|
|
14091
|
+
if (overflowY === 'auto' || overflowY === 'scroll') {
|
|
14092
|
+
scrollElement.scrollTop = scrollElement.scrollHeight;
|
|
14093
|
+
return;
|
|
14094
|
+
}
|
|
13991
14095
|
}
|
|
14096
|
+
scrollElement = scrollElement.parentElement;
|
|
13992
14097
|
}
|
|
13993
14098
|
};
|
|
13994
14099
|
MultiSelect.prototype.enable = function (state) {
|
|
@@ -14238,7 +14343,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14238
14343
|
MultiSelect.prototype.pageDownSelection = function (steps, isVirtualKeyAction) {
|
|
14239
14344
|
var list = this.getItems();
|
|
14240
14345
|
var collection = this.list.querySelectorAll('li.'
|
|
14241
|
-
+ dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
|
|
14346
|
+
+ dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)' + ':not(.e-virtual-list-end)');
|
|
14242
14347
|
var previousItem = steps <= collection.length ? collection[steps - 1] : collection[collection.length - 1];
|
|
14243
14348
|
if (this.fields.disabled && previousItem && !this.enableVirtualization) {
|
|
14244
14349
|
while (previousItem && (previousItem.classList.contains('e-disabled') || previousItem.classList.contains(HIDE_LIST) ||
|
|
@@ -14255,6 +14360,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14255
14360
|
if (this.enableVirtualization && isVirtualKeyAction) {
|
|
14256
14361
|
previousItem = steps <= list.length ? this.liCollections[steps] : this.liCollections[list.length - 1];
|
|
14257
14362
|
}
|
|
14363
|
+
if (this.enableVirtualization && previousItem && previousItem.classList.contains('e-virtual-list-end')) {
|
|
14364
|
+
previousItem = collection[collection.length - 1];
|
|
14365
|
+
}
|
|
14258
14366
|
this.isKeyBoardAction = true;
|
|
14259
14367
|
this.addListFocus(previousItem);
|
|
14260
14368
|
this.previousFocusItem = previousItem;
|
|
@@ -14739,9 +14847,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14739
14847
|
var selectedListMargin = selectedLI && !isNaN(parseInt(window.getComputedStyle(selectedLI).marginBottom, 10)) ?
|
|
14740
14848
|
parseInt(window.getComputedStyle(selectedLI).marginBottom, 10) : 0;
|
|
14741
14849
|
this.isUpwardScrolling = false;
|
|
14742
|
-
var virtualListCount = this.list.querySelectorAll('.e-virtual-list').length;
|
|
14743
|
-
var
|
|
14744
|
-
|
|
14850
|
+
var virtualListCount = this.list.querySelectorAll('.e-virtual-list:not(.e-virtual-list-end)').length;
|
|
14851
|
+
var liItems = this.list.querySelectorAll('li:not(.e-virtual-list-end)');
|
|
14852
|
+
var lastElementValue = liItems && liItems.length > 0 && liItems[liItems.length - 1] ?
|
|
14853
|
+
liItems[liItems.length - 1].getAttribute('data-value') : null;
|
|
14745
14854
|
var selectedLiOffsetTop = this.virtualListInfo && this.virtualListInfo.startIndex ?
|
|
14746
14855
|
selectedLI.offsetTop + (this.virtualListInfo.startIndex * (selectedLI.offsetHeight + selectedListMargin))
|
|
14747
14856
|
: selectedLI.offsetTop;
|
|
@@ -14795,7 +14904,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14795
14904
|
};
|
|
14796
14905
|
MultiSelect.prototype.scrollTop = function (selectedLI, activeIndex, keyCode) {
|
|
14797
14906
|
if (keyCode === void 0) { keyCode = null; }
|
|
14798
|
-
var virtualListCount = this.list.querySelectorAll('.e-virtual-list').length;
|
|
14907
|
+
var virtualListCount = this.list.querySelectorAll('.e-virtual-list:not(.e-virtual-list-end)').length;
|
|
14799
14908
|
var selectedListMargin = selectedLI && !isNaN(parseInt(window.getComputedStyle(selectedLI).marginBottom, 10)) ?
|
|
14800
14909
|
parseInt(window.getComputedStyle(selectedLI).marginBottom, 10) : 0;
|
|
14801
14910
|
var selectedLiOffsetTop = (this.virtualListInfo && this.virtualListInfo.startIndex) ?
|
|
@@ -15024,11 +15133,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15024
15133
|
if (this.list) {
|
|
15025
15134
|
var elements = this.list.querySelectorAll('li.'
|
|
15026
15135
|
+ dropDownBaseClasses.li
|
|
15027
|
-
+ ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
|
|
15136
|
+
+ ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)' + ':not(.e-virtual-list-end)');
|
|
15028
15137
|
if (this.mode === 'CheckBox' && this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy)) {
|
|
15029
15138
|
elements = this.list.querySelectorAll('li.'
|
|
15030
15139
|
+ dropDownBaseClasses.li + ',li.' + dropDownBaseClasses.group
|
|
15031
|
-
+ ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
|
|
15140
|
+
+ ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)' + ':not(.e-virtual-list-end)');
|
|
15032
15141
|
}
|
|
15033
15142
|
var selectedElem = this.list.querySelector('li.' + dropDownBaseClasses.focus);
|
|
15034
15143
|
if (this.enableVirtualization && isVirtualKeyAction && !isNullOrUndefined(this.currentFocuedListElement)) {
|
|
@@ -15727,7 +15836,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15727
15836
|
var inputWidth = (this.componentWrapper.offsetWidth) * parseFloat(width) / 100;
|
|
15728
15837
|
width = inputWidth.toString() + 'px';
|
|
15729
15838
|
}
|
|
15730
|
-
return width;
|
|
15839
|
+
return (this.allowResize && this.resizeWidth) ? this.resizeWidth + 'px' : width;
|
|
15731
15840
|
};
|
|
15732
15841
|
MultiSelect.prototype.mouseIn = function () {
|
|
15733
15842
|
if (this.enabled && !this.readonly) {
|
|
@@ -16002,7 +16111,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16002
16111
|
MultiSelect.prototype.updateInitialData = function () {
|
|
16003
16112
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16004
16113
|
var currentData = this.selectData;
|
|
16005
|
-
var ulElement = this.renderItems(currentData, this.fields);
|
|
16114
|
+
var ulElement = this.renderItems(currentData, this.fields, false, this.isClearAllAction);
|
|
16006
16115
|
this.list.scrollTop = 0;
|
|
16007
16116
|
this.virtualListInfo = {
|
|
16008
16117
|
currentPageNumber: null,
|
|
@@ -16223,8 +16332,40 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16223
16332
|
_this.search(event);
|
|
16224
16333
|
});
|
|
16225
16334
|
};
|
|
16226
|
-
MultiSelect.prototype.
|
|
16335
|
+
MultiSelect.prototype.performFiltering = function (e) {
|
|
16227
16336
|
var _this = this;
|
|
16337
|
+
var eventArgs = {
|
|
16338
|
+
preventDefaultAction: false,
|
|
16339
|
+
text: this.targetElement(),
|
|
16340
|
+
updateData: function (dataSource, query, fields) {
|
|
16341
|
+
if (eventArgs.cancel) {
|
|
16342
|
+
return;
|
|
16343
|
+
}
|
|
16344
|
+
_this.isFiltered = true;
|
|
16345
|
+
_this.customFilterQuery = query;
|
|
16346
|
+
_this.remoteFilterAction = true;
|
|
16347
|
+
_this.isCustomFiltering = true;
|
|
16348
|
+
_this.dataUpdater(dataSource, query, fields);
|
|
16349
|
+
},
|
|
16350
|
+
event: e,
|
|
16351
|
+
cancel: false
|
|
16352
|
+
};
|
|
16353
|
+
this.trigger('filtering', eventArgs, function (eventArgs) {
|
|
16354
|
+
_this.isFilterPrevented = eventArgs.cancel;
|
|
16355
|
+
if (!eventArgs.cancel) {
|
|
16356
|
+
if (!_this.isFiltered && !eventArgs.preventDefaultAction) {
|
|
16357
|
+
_this.filterAction = true;
|
|
16358
|
+
_this.isFilteringAction = true;
|
|
16359
|
+
if (_this.dataSource instanceof DataManager && _this.allowCustomValue) {
|
|
16360
|
+
_this.isCustomRendered = false;
|
|
16361
|
+
}
|
|
16362
|
+
_this.dataUpdater(_this.dataSource, null, _this.fields);
|
|
16363
|
+
_this.isFilteringAction = false;
|
|
16364
|
+
}
|
|
16365
|
+
}
|
|
16366
|
+
});
|
|
16367
|
+
};
|
|
16368
|
+
MultiSelect.prototype.search = function (e) {
|
|
16228
16369
|
this.preventSetCurrentData = false;
|
|
16229
16370
|
this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
|
|
16230
16371
|
if (!isNullOrUndefined(e)) {
|
|
@@ -16245,36 +16386,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16245
16386
|
}
|
|
16246
16387
|
this.checkAndResetCache();
|
|
16247
16388
|
this.isRequesting = false;
|
|
16248
|
-
|
|
16249
|
-
|
|
16250
|
-
|
|
16251
|
-
|
|
16252
|
-
|
|
16253
|
-
|
|
16254
|
-
}
|
|
16255
|
-
_this.isFiltered = true;
|
|
16256
|
-
_this.customFilterQuery = query;
|
|
16257
|
-
_this.remoteFilterAction = true;
|
|
16258
|
-
_this.isCustomFiltering = true;
|
|
16259
|
-
_this.dataUpdater(dataSource, query, fields);
|
|
16260
|
-
},
|
|
16261
|
-
event: e,
|
|
16262
|
-
cancel: false
|
|
16263
|
-
};
|
|
16264
|
-
this.trigger('filtering', eventArgs_1, function (eventArgs) {
|
|
16265
|
-
_this.isFilterPrevented = eventArgs.cancel;
|
|
16266
|
-
if (!eventArgs.cancel) {
|
|
16267
|
-
if (!_this.isFiltered && !eventArgs.preventDefaultAction) {
|
|
16268
|
-
_this.filterAction = true;
|
|
16269
|
-
_this.isFilteringAction = true;
|
|
16270
|
-
if (_this.dataSource instanceof DataManager && _this.allowCustomValue) {
|
|
16271
|
-
_this.isCustomRendered = false;
|
|
16272
|
-
}
|
|
16273
|
-
_this.dataUpdater(_this.dataSource, null, _this.fields);
|
|
16274
|
-
_this.isFilteringAction = false;
|
|
16275
|
-
}
|
|
16276
|
-
}
|
|
16277
|
-
});
|
|
16389
|
+
if (this.targetElement() !== '' && this.debounceDelay > 0) {
|
|
16390
|
+
this.debouncedFiltering(e, this.debounceDelay);
|
|
16391
|
+
}
|
|
16392
|
+
else {
|
|
16393
|
+
this.performFiltering(e);
|
|
16394
|
+
}
|
|
16278
16395
|
}
|
|
16279
16396
|
else if (this.allowCustomValue) {
|
|
16280
16397
|
var query = new Query();
|
|
@@ -17388,7 +17505,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17388
17505
|
};
|
|
17389
17506
|
MultiSelect.prototype.checkClearIconWidth = function () {
|
|
17390
17507
|
if (this.showClearButton) {
|
|
17391
|
-
this.clearIconWidth = parseInt(window.getComputedStyle(this.overAllClear).width, 10);
|
|
17508
|
+
this.clearIconWidth = parseInt(window.getComputedStyle(this.overAllClear).width, 10) || this.overAllClear.offsetWidth;
|
|
17392
17509
|
}
|
|
17393
17510
|
};
|
|
17394
17511
|
MultiSelect.prototype.updateRemainWidth = function (viewWrapper, totalWidth) {
|
|
@@ -18307,7 +18424,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18307
18424
|
_this.list.parentElement.style.paddingBottom = '';
|
|
18308
18425
|
var overAllHeight = parseInt(_this.popupHeight, 10);
|
|
18309
18426
|
_this.list.style.maxHeight = formatUnit(overAllHeight);
|
|
18310
|
-
_this.
|
|
18427
|
+
if (_this.popupHeight.toString().toLowerCase() !== 'auto' && _this.initialPopupHeight >= (parseInt(_this.popupHeight.toString(), 10) - 2)) {
|
|
18428
|
+
_this.list.parentElement.style.height = formatUnit(_this.popupHeight);
|
|
18429
|
+
}
|
|
18311
18430
|
_this.list.parentElement.style.maxHeight = formatUnit(_this.popupHeight);
|
|
18312
18431
|
}
|
|
18313
18432
|
if (_this.resizer) {
|
|
@@ -18635,7 +18754,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18635
18754
|
}
|
|
18636
18755
|
if (this.list && this.list.parentElement) {
|
|
18637
18756
|
this.list.parentElement.classList.add('e-resize');
|
|
18638
|
-
|
|
18757
|
+
this.initialPopupHeight = this.list.parentElement.clientHeight;
|
|
18758
|
+
if (this.popupHeight.toString().toLowerCase() !== 'auto' && this.initialPopupHeight >= (parseInt(this.popupHeight.toString(), 10) - 2)) {
|
|
18639
18759
|
this.list.parentElement.style.height = '100%';
|
|
18640
18760
|
}
|
|
18641
18761
|
this.list.parentElement.style.boxSizing = 'border-box'; // Ensures padding doesn't affect element size
|
|
@@ -18646,6 +18766,18 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18646
18766
|
this.list.parentElement.style.height = this.resizeHeight + 'px';
|
|
18647
18767
|
this.list.parentElement.style.maxHeight = this.resizeHeight + 'px';
|
|
18648
18768
|
this.list.style.maxHeight = this.resizeHeight + "px";
|
|
18769
|
+
if (this.headerTemplate) {
|
|
18770
|
+
var headerElem = this.list.parentElement.querySelector('.e-ddl-header');
|
|
18771
|
+
if (headerElem && headerElem.offsetHeight) {
|
|
18772
|
+
this.headerTemplateHeight = headerElem.offsetHeight;
|
|
18773
|
+
}
|
|
18774
|
+
if (this.resizeHeight) {
|
|
18775
|
+
this.list.style.maxHeight = this.resizeHeight - this.headerTemplateHeight - 16 + "px";
|
|
18776
|
+
}
|
|
18777
|
+
else {
|
|
18778
|
+
this.list.style.maxHeight = parseInt(this.list.style.maxHeight, 10) - 16 + "px";
|
|
18779
|
+
}
|
|
18780
|
+
}
|
|
18649
18781
|
}
|
|
18650
18782
|
if (this.resizer) {
|
|
18651
18783
|
EventHandler.add(this.resizer, 'mousedown', this.startResizing, this);
|
|
@@ -18700,6 +18832,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18700
18832
|
this.list.parentElement.style.height = this.resizeHeight + "px";
|
|
18701
18833
|
this.list.parentElement.style.maxHeight = this.resizeHeight + "px";
|
|
18702
18834
|
this.list.style.maxHeight = this.resizeHeight + "px";
|
|
18835
|
+
if (this.headerTemplate) {
|
|
18836
|
+
this.list.style.maxHeight = this.resizeHeight - this.headerTemplateHeight - 16 + "px";
|
|
18837
|
+
}
|
|
18703
18838
|
if (this.fixedHeaderElement && this.ulElement) {
|
|
18704
18839
|
this.fixedHeaderElement.style.width = this.ulElement.offsetWidth + "px";
|
|
18705
18840
|
}
|
|
@@ -19199,6 +19334,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19199
19334
|
__decorate$5([
|
|
19200
19335
|
Property(null)
|
|
19201
19336
|
], MultiSelect.prototype, "allowFiltering", void 0);
|
|
19337
|
+
__decorate$5([
|
|
19338
|
+
Property(300)
|
|
19339
|
+
], MultiSelect.prototype, "debounceDelay", void 0);
|
|
19202
19340
|
__decorate$5([
|
|
19203
19341
|
Property(true)
|
|
19204
19342
|
], MultiSelect.prototype, "isDeviceFullScreen", void 0);
|
|
@@ -22575,7 +22713,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
22575
22713
|
* @private
|
|
22576
22714
|
*/
|
|
22577
22715
|
function Mention(options, element) {
|
|
22578
|
-
|
|
22716
|
+
var _this = _super.call(this, options, element) || this;
|
|
22717
|
+
_this.debounceTimer = null;
|
|
22718
|
+
return _this;
|
|
22579
22719
|
}
|
|
22580
22720
|
/**
|
|
22581
22721
|
* When property value changes happened, then onPropertyChanged method will execute the respective changes in this component.
|
|
@@ -23010,22 +23150,8 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
23010
23150
|
this.range = this.inputElement.ownerDocument.getSelection().getRangeAt(0);
|
|
23011
23151
|
return this.range;
|
|
23012
23152
|
};
|
|
23013
|
-
Mention.prototype.
|
|
23153
|
+
Mention.prototype.performFiltering = function (e) {
|
|
23014
23154
|
var _this = this;
|
|
23015
|
-
this.isDataFetched = false;
|
|
23016
|
-
if (isNullOrUndefined(this.list)) {
|
|
23017
|
-
_super.prototype.render.call(this);
|
|
23018
|
-
this.unWireListEvents();
|
|
23019
|
-
this.wireListEvents();
|
|
23020
|
-
}
|
|
23021
|
-
if (e.type !== 'mousedown' && (e.keyCode === 40 || e.keyCode === 38)) {
|
|
23022
|
-
this.queryString = this.queryString === '' ? null : this.queryString;
|
|
23023
|
-
this.beforePopupOpen = true;
|
|
23024
|
-
this.resetList(this.dataSource, this.fields);
|
|
23025
|
-
return;
|
|
23026
|
-
}
|
|
23027
|
-
this.isSelected = false;
|
|
23028
|
-
this.activeIndex = null;
|
|
23029
23155
|
var eventArgs = {
|
|
23030
23156
|
preventDefaultAction: false,
|
|
23031
23157
|
text: this.queryString,
|
|
@@ -23044,6 +23170,28 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
23044
23170
|
}
|
|
23045
23171
|
});
|
|
23046
23172
|
};
|
|
23173
|
+
Mention.prototype.searchLists = function (e) {
|
|
23174
|
+
this.isDataFetched = false;
|
|
23175
|
+
if (isNullOrUndefined(this.list)) {
|
|
23176
|
+
_super.prototype.render.call(this);
|
|
23177
|
+
this.unWireListEvents();
|
|
23178
|
+
this.wireListEvents();
|
|
23179
|
+
}
|
|
23180
|
+
if (e.type !== 'mousedown' && (e.keyCode === 40 || e.keyCode === 38)) {
|
|
23181
|
+
this.queryString = this.queryString === '' ? null : this.queryString;
|
|
23182
|
+
this.beforePopupOpen = true;
|
|
23183
|
+
this.resetList(this.dataSource, this.fields);
|
|
23184
|
+
return;
|
|
23185
|
+
}
|
|
23186
|
+
this.isSelected = false;
|
|
23187
|
+
this.activeIndex = null;
|
|
23188
|
+
if (this.queryString !== '' && this.debounceDelay > 0) {
|
|
23189
|
+
this.debouncedFiltering(e, this.debounceDelay);
|
|
23190
|
+
}
|
|
23191
|
+
else {
|
|
23192
|
+
this.performFiltering(e);
|
|
23193
|
+
}
|
|
23194
|
+
};
|
|
23047
23195
|
Mention.prototype.filterAction = function (dataSource, query, fields) {
|
|
23048
23196
|
this.beforePopupOpen = true;
|
|
23049
23197
|
if (this.queryString.length >= this.minLength) {
|
|
@@ -24241,6 +24389,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
24241
24389
|
__decorate$7([
|
|
24242
24390
|
Property('300px')
|
|
24243
24391
|
], Mention.prototype, "popupHeight", void 0);
|
|
24392
|
+
__decorate$7([
|
|
24393
|
+
Property(300)
|
|
24394
|
+
], Mention.prototype, "debounceDelay", void 0);
|
|
24244
24395
|
__decorate$7([
|
|
24245
24396
|
Property(null)
|
|
24246
24397
|
], Mention.prototype, "displayTemplate", void 0);
|