@syncfusion/ej2-dropdowns 27.2.5 → 28.1.35
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/README.md +2 -2
- package/dist/ej2-dropdowns.min.js +3 -3
- package/dist/ej2-dropdowns.umd.min.js +3 -3
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +511 -40
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +510 -38
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +3 -3
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +13 -13
- package/src/auto-complete/auto-complete.js +5 -2
- package/src/combo-box/combo-box.js +2 -1
- package/src/common/incremental-search.d.ts +1 -1
- package/src/common/incremental-search.js +5 -1
- package/src/common/virtual-scroll.js +2 -1
- package/src/drop-down-base/drop-down-base.js +14 -2
- package/src/drop-down-list/drop-down-list-model.d.ts +31 -0
- package/src/drop-down-list/drop-down-list.d.ts +45 -1
- package/src/drop-down-list/drop-down-list.js +213 -13
- package/src/drop-down-tree/drop-down-tree.d.ts +1 -0
- package/src/drop-down-tree/drop-down-tree.js +4 -3
- package/src/list-box/list-box.d.ts +4 -0
- package/src/list-box/list-box.js +9 -4
- package/src/mention/mention.js +6 -1
- package/src/multi-select/multi-select-model.d.ts +31 -0
- package/src/multi-select/multi-select.d.ts +45 -0
- package/src/multi-select/multi-select.js +250 -10
- package/styles/auto-complete/_tailwind3-definition.scss +2 -0
- package/styles/auto-complete/bds.css +75 -0
- package/styles/auto-complete/bds.scss +4 -0
- package/styles/auto-complete/highcontrast.css +1 -1
- package/styles/auto-complete/tailwind3.css +101 -0
- package/styles/auto-complete/tailwind3.scss +4 -0
- package/styles/bds-lite.css +3013 -0
- package/styles/bds-lite.scss +28 -0
- package/styles/bds.css +3855 -0
- package/styles/bds.scss +33 -0
- package/styles/bootstrap-dark-lite.css +41 -2
- package/styles/bootstrap-dark.css +41 -2
- package/styles/bootstrap-lite.css +30 -1
- package/styles/bootstrap.css +30 -1
- package/styles/bootstrap4-lite.css +30 -0
- package/styles/bootstrap4.css +30 -0
- package/styles/bootstrap5-dark-lite.css +31 -0
- package/styles/bootstrap5-dark.css +31 -0
- package/styles/bootstrap5-lite.css +31 -0
- package/styles/bootstrap5.3-lite.css +31 -3
- package/styles/bootstrap5.3.css +31 -3
- package/styles/bootstrap5.css +31 -0
- package/styles/combo-box/_tailwind3-definition.scss +2 -0
- package/styles/combo-box/bds.css +75 -0
- package/styles/combo-box/bds.scss +4 -0
- package/styles/combo-box/highcontrast.css +1 -1
- package/styles/combo-box/tailwind3.css +101 -0
- package/styles/combo-box/tailwind3.scss +4 -0
- package/styles/drop-down-base/_bigger.scss +3 -0
- package/styles/drop-down-base/_layout.scss +7 -0
- package/styles/drop-down-base/_tailwind3-definition.scss +98 -0
- package/styles/drop-down-base/bds.css +496 -0
- package/styles/drop-down-base/bds.scss +4 -0
- package/styles/drop-down-base/bootstrap-dark.css +4 -0
- package/styles/drop-down-base/bootstrap.css +4 -0
- package/styles/drop-down-base/bootstrap4.css +4 -0
- package/styles/drop-down-base/bootstrap5-dark.css +4 -0
- package/styles/drop-down-base/bootstrap5.3.css +4 -0
- package/styles/drop-down-base/bootstrap5.css +4 -0
- package/styles/drop-down-base/fabric-dark.css +4 -0
- package/styles/drop-down-base/fabric.css +4 -0
- package/styles/drop-down-base/fluent-dark.css +4 -0
- package/styles/drop-down-base/fluent.css +4 -0
- package/styles/drop-down-base/fluent2.css +9 -5
- package/styles/drop-down-base/highcontrast-light.css +4 -0
- package/styles/drop-down-base/highcontrast.css +4 -0
- package/styles/drop-down-base/material-dark.css +4 -0
- package/styles/drop-down-base/material.css +4 -0
- package/styles/drop-down-base/material3-dark.css +4 -0
- package/styles/drop-down-base/material3.css +4 -0
- package/styles/drop-down-base/tailwind-dark.css +4 -0
- package/styles/drop-down-base/tailwind.css +4 -0
- package/styles/drop-down-base/tailwind3.css +392 -0
- package/styles/drop-down-base/tailwind3.scss +4 -0
- package/styles/drop-down-list/_highcontrast-definition.scss +1 -1
- package/styles/drop-down-list/_layout.scss +18 -2
- package/styles/drop-down-list/_tailwind3-definition.scss +135 -0
- package/styles/drop-down-list/_theme.scss +3 -1
- package/styles/drop-down-list/bds.css +609 -0
- package/styles/drop-down-list/bds.scss +10 -0
- package/styles/drop-down-list/bootstrap-dark.css +18 -1
- package/styles/drop-down-list/bootstrap.css +13 -1
- package/styles/drop-down-list/bootstrap4.css +13 -0
- package/styles/drop-down-list/bootstrap5-dark.css +13 -0
- package/styles/drop-down-list/bootstrap5.3.css +13 -0
- package/styles/drop-down-list/bootstrap5.css +13 -0
- package/styles/drop-down-list/fabric-dark.css +18 -1
- package/styles/drop-down-list/fabric.css +13 -1
- package/styles/drop-down-list/fluent-dark.css +13 -1
- package/styles/drop-down-list/fluent.css +13 -1
- package/styles/drop-down-list/fluent2.css +13 -1
- package/styles/drop-down-list/highcontrast-light.css +9 -1
- package/styles/drop-down-list/highcontrast.css +19 -1
- package/styles/drop-down-list/icons/_bootstrap-dark.scss +4 -0
- package/styles/drop-down-list/icons/_bootstrap.scss +4 -0
- package/styles/drop-down-list/icons/_bootstrap4.scss +4 -0
- package/styles/drop-down-list/icons/_bootstrap5.3.scss +4 -0
- package/styles/drop-down-list/icons/_bootstrap5.scss +4 -0
- package/styles/drop-down-list/icons/_fabric-dark.scss +4 -0
- package/styles/drop-down-list/icons/_fabric.scss +4 -0
- package/styles/drop-down-list/icons/_fluent.scss +4 -0
- package/styles/drop-down-list/icons/_fluent2.scss +4 -0
- package/styles/drop-down-list/icons/_highcontrast.scss +4 -0
- package/styles/drop-down-list/icons/_material-dark.scss +4 -0
- package/styles/drop-down-list/icons/_material.scss +4 -0
- package/styles/drop-down-list/icons/_material3.scss +4 -0
- package/styles/drop-down-list/icons/_tailwind.scss +4 -0
- package/styles/drop-down-list/icons/_tailwind3.scss +14 -0
- package/styles/drop-down-list/material-dark.css +18 -1
- package/styles/drop-down-list/material.css +13 -1
- package/styles/drop-down-list/material3-dark.css +13 -1
- package/styles/drop-down-list/material3.css +13 -1
- package/styles/drop-down-list/tailwind-dark.css +13 -1
- package/styles/drop-down-list/tailwind.css +13 -1
- package/styles/drop-down-list/tailwind3.css +456 -0
- package/styles/drop-down-list/tailwind3.scss +10 -0
- package/styles/drop-down-tree/_bigger.scss +41 -7
- package/styles/drop-down-tree/_layout.scss +34 -10
- package/styles/drop-down-tree/_tailwind3-definition.scss +67 -0
- package/styles/drop-down-tree/_theme.scss +3 -3
- package/styles/drop-down-tree/bds.css +712 -0
- package/styles/drop-down-tree/bds.scss +10 -0
- package/styles/drop-down-tree/bootstrap5.3.css +0 -3
- package/styles/drop-down-tree/icons/_tailwind3.scss +11 -0
- package/styles/drop-down-tree/tailwind3.css +512 -0
- package/styles/drop-down-tree/tailwind3.scss +10 -0
- package/styles/fabric-dark-lite.css +40 -1
- package/styles/fabric-dark.css +40 -1
- package/styles/fabric-lite.css +30 -1
- package/styles/fabric.css +30 -1
- package/styles/fluent-dark-lite.css +31 -1
- package/styles/fluent-dark.css +31 -1
- package/styles/fluent-lite.css +31 -1
- package/styles/fluent.css +31 -1
- package/styles/fluent2-lite.css +45 -12
- package/styles/fluent2.css +45 -12
- package/styles/highcontrast-light-lite.css +22 -1
- package/styles/highcontrast-light.css +22 -1
- package/styles/highcontrast-lite.css +41 -1
- package/styles/highcontrast.css +41 -1
- package/styles/list-box/_bigger.scss +18 -1
- package/styles/list-box/_layout.scss +29 -3
- package/styles/list-box/_tailwind3-definition.scss +123 -0
- package/styles/list-box/_theme.scss +11 -0
- package/styles/list-box/bds.css +971 -0
- package/styles/list-box/bds.scss +6 -0
- package/styles/list-box/fluent2.css +1 -1
- package/styles/list-box/icons/_tailwind3.scss +25 -0
- package/styles/list-box/tailwind3.css +991 -0
- package/styles/list-box/tailwind3.scss +6 -0
- package/styles/material-dark-lite.css +40 -1
- package/styles/material-dark.css +40 -1
- package/styles/material-lite.css +30 -1
- package/styles/material.css +30 -1
- package/styles/material3-dark-lite.css +32 -5
- package/styles/material3-dark.css +32 -5
- package/styles/material3-lite.css +32 -5
- package/styles/material3.css +32 -5
- package/styles/mention/_tailwind3-definition.scss +1 -0
- package/styles/mention/bds.css +78 -0
- package/styles/mention/bds.scss +6 -0
- package/styles/mention/tailwind3.css +67 -0
- package/styles/mention/tailwind3.scss +6 -0
- package/styles/multi-select/_bigger.scss +2 -2
- package/styles/multi-select/_bootstrap-dark-definition.scss +1 -1
- package/styles/multi-select/_layout.scss +28 -5
- package/styles/multi-select/_material3-definition.scss +1 -1
- package/styles/multi-select/_tailwind3-definition.scss +227 -0
- package/styles/multi-select/_theme.scss +1 -1
- package/styles/multi-select/bds.css +1575 -0
- package/styles/multi-select/bds.scss +10 -0
- package/styles/multi-select/bootstrap-dark.css +19 -1
- package/styles/multi-select/bootstrap.css +13 -0
- package/styles/multi-select/bootstrap4.css +13 -0
- package/styles/multi-select/bootstrap5-dark.css +14 -0
- package/styles/multi-select/bootstrap5.3.css +14 -0
- package/styles/multi-select/bootstrap5.css +14 -0
- package/styles/multi-select/fabric-dark.css +18 -0
- package/styles/multi-select/fabric.css +13 -0
- package/styles/multi-select/fluent-dark.css +14 -0
- package/styles/multi-select/fluent.css +14 -0
- package/styles/multi-select/fluent2.css +22 -5
- package/styles/multi-select/highcontrast-light.css +9 -0
- package/styles/multi-select/highcontrast.css +18 -0
- package/styles/multi-select/icons/_bootstrap-dark.scss +4 -0
- package/styles/multi-select/icons/_bootstrap.scss +4 -0
- package/styles/multi-select/icons/_bootstrap4.scss +4 -0
- package/styles/multi-select/icons/_bootstrap5.3.scss +4 -0
- package/styles/multi-select/icons/_bootstrap5.scss +4 -0
- package/styles/multi-select/icons/_fabric-dark.scss +4 -0
- package/styles/multi-select/icons/_fabric.scss +4 -0
- package/styles/multi-select/icons/_fluent.scss +4 -0
- package/styles/multi-select/icons/_fluent2.scss +4 -0
- package/styles/multi-select/icons/_highcontrast.scss +4 -0
- package/styles/multi-select/icons/_material-dark.scss +4 -0
- package/styles/multi-select/icons/_material.scss +4 -0
- package/styles/multi-select/icons/_material3.scss +4 -0
- package/styles/multi-select/icons/_tailwind.scss +4 -0
- package/styles/multi-select/icons/_tailwind3.scss +26 -0
- package/styles/multi-select/material-dark.css +18 -0
- package/styles/multi-select/material.css +13 -0
- package/styles/multi-select/material3-dark.css +15 -4
- package/styles/multi-select/material3.css +15 -4
- package/styles/multi-select/tailwind-dark.css +13 -0
- package/styles/multi-select/tailwind.css +13 -0
- package/styles/multi-select/tailwind3.css +1398 -0
- package/styles/multi-select/tailwind3.scss +10 -0
- package/styles/tailwind-dark-lite.css +30 -1
- package/styles/tailwind-dark.css +30 -1
- package/styles/tailwind-lite.css +30 -1
- package/styles/tailwind.css +30 -1
- package/styles/tailwind3-lite.css +2890 -0
- package/styles/tailwind3-lite.scss +28 -0
- package/styles/tailwind3.css +3551 -0
- package/styles/tailwind3.scss +33 -0
|
@@ -132,7 +132,7 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
|
|
|
132
132
|
* @param {string} [type] - Specifies the type.
|
|
133
133
|
* @returns {{ item: Element | null, index: number | null }} Returns the search matched items.
|
|
134
134
|
*/
|
|
135
|
-
function Search(inputVal, items, searchType, ignoreCase, dataSource, fields, type) {
|
|
135
|
+
function Search(inputVal, items, searchType, ignoreCase, dataSource, fields, type, ignoreAccent) {
|
|
136
136
|
const listItems = items;
|
|
137
137
|
ignoreCase = ignoreCase !== undefined && ignoreCase !== null ? ignoreCase : true;
|
|
138
138
|
const itemData = { item: null, index: null };
|
|
@@ -156,8 +156,12 @@ function Search(inputVal, items, searchType, ignoreCase, dataSource, fields, typ
|
|
|
156
156
|
});
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
|
|
159
|
+
let text = dataSource && filterValue ? (ignoreCase ? filterValue.toString().toLocaleLowerCase() : filterValue).replace(/^\s+|\s+$/g, '') : (ignoreCase ? item.textContent.toLocaleLowerCase() : item.textContent).replace(/^\s+|\s+$/g, '');
|
|
160
160
|
/* eslint-disable security/detect-non-literal-regexp */
|
|
161
|
+
if (ignoreAccent && text && queryStr) {
|
|
162
|
+
text = text.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
|
163
|
+
queryStr = queryStr.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
|
164
|
+
}
|
|
161
165
|
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))) {
|
|
162
166
|
itemData.item = item;
|
|
163
167
|
itemData.index = i;
|
|
@@ -689,7 +693,8 @@ class VirtualScroll {
|
|
|
689
693
|
direction: direction, sentinelInfo: info, offsets: e,
|
|
690
694
|
startIndex: this.parent.previousStartIndex, endIndex: this.parent.previousEndIndex
|
|
691
695
|
};
|
|
692
|
-
const vHeight = this.parent.popupContentElement
|
|
696
|
+
const vHeight = this.parent.popupContentElement ?
|
|
697
|
+
this.parent.popupContentElement.getBoundingClientRect().height : 0;
|
|
693
698
|
//Row Start and End Index calculation
|
|
694
699
|
const rowHeight = this.parent.listItemHeight;
|
|
695
700
|
const exactTopIndex = e.top / rowHeight;
|
|
@@ -1775,10 +1780,16 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1775
1780
|
}
|
|
1776
1781
|
}
|
|
1777
1782
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
1778
|
-
|
|
1783
|
+
let focusItem = this.fields.disabled ? listElement.querySelector('.' + dropDownBaseClasses.li + ':not(.e-disabled') : listElement.querySelector('.' + dropDownBaseClasses.li);
|
|
1779
1784
|
const selectedItem = listElement.querySelector('.' + dropDownBaseClasses.selected);
|
|
1780
1785
|
if (focusItem && !selectedItem) {
|
|
1781
|
-
|
|
1786
|
+
if (this.isVirtualizationEnabled && this.viewPortInfo.startIndex !== 0) {
|
|
1787
|
+
const elements = this.ulElement.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
|
|
1788
|
+
focusItem = elements && elements.length > 0 ? elements[2] : focusItem;
|
|
1789
|
+
}
|
|
1790
|
+
if (focusItem) {
|
|
1791
|
+
focusItem.classList.add(dropDownBaseClasses.focus);
|
|
1792
|
+
}
|
|
1782
1793
|
}
|
|
1783
1794
|
if (list.length <= 0) {
|
|
1784
1795
|
this.l10nUpdate();
|
|
@@ -1994,6 +2005,12 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1994
2005
|
new DataManager(dataSource).executeLocal(new Query().take(100))
|
|
1995
2006
|
: dataSource;
|
|
1996
2007
|
ulElement = this.templateListItem((this.getModuleName() === 'autocomplete') ? spliceData : dataSource, fields);
|
|
2008
|
+
if (this.isIncrementalRequest) {
|
|
2009
|
+
this.incrementalLiCollections = ulElement.querySelectorAll('.' + dropDownBaseClasses.li);
|
|
2010
|
+
this.incrementalUlElement = ulElement;
|
|
2011
|
+
this.incrementalListData = listData;
|
|
2012
|
+
return ulElement;
|
|
2013
|
+
}
|
|
1997
2014
|
if (this.isVirtualizationEnabled) {
|
|
1998
2015
|
const oldUlElement = this.list.querySelector('.e-list-parent');
|
|
1999
2016
|
const virtualUlElement = this.list.querySelector('.e-virtual-ddl-content');
|
|
@@ -2281,7 +2298,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
2281
2298
|
updateData.dataSource = this.dataSource;
|
|
2282
2299
|
}
|
|
2283
2300
|
if (this.getModuleName() === 'listbox') {
|
|
2284
|
-
if (!this.isReact || (this.isReact && !isNullOrUndefined(newProp.dataSource))) {
|
|
2301
|
+
if (!this.isReact || (this.isReact && (!isNullOrUndefined(newProp.dataSource) || !isNullOrUndefined(newProp.sortOrder)))) {
|
|
2285
2302
|
this.updateDataSource(updateData, oldProp);
|
|
2286
2303
|
}
|
|
2287
2304
|
}
|
|
@@ -2757,6 +2774,7 @@ const dropDownListClasses = {
|
|
|
2757
2774
|
backIcon: 'e-input-group-icon e-back-icon e-icons',
|
|
2758
2775
|
filterBarClearIcon: 'e-input-group-icon e-clear-icon e-icons',
|
|
2759
2776
|
filterInput: 'e-input-filter',
|
|
2777
|
+
resizeIcon: 'e-resizer-right e-icons',
|
|
2760
2778
|
filterParent: 'e-filter-parent',
|
|
2761
2779
|
mobileFilter: 'e-ddl-device-filter',
|
|
2762
2780
|
footer: 'e-ddl-footer',
|
|
@@ -2798,6 +2816,8 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
2798
2816
|
this.isTouched = false;
|
|
2799
2817
|
this.isFocused = false;
|
|
2800
2818
|
this.autoFill = false;
|
|
2819
|
+
this.isUpdateHeaderHeight = false;
|
|
2820
|
+
this.isUpdateFooterHeight = false;
|
|
2801
2821
|
}
|
|
2802
2822
|
/**
|
|
2803
2823
|
* Initialize the event handler.
|
|
@@ -2939,6 +2959,10 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
2939
2959
|
(this.allowObjectBinding && this.previousValue &&
|
|
2940
2960
|
this.isObjectInArray(this.previousValue, [this.allowCustom ? this.value ? this.value : dataItem :
|
|
2941
2961
|
dataItem.value ? this.getDataByValue(dataItem.value) : dataItem]))) {
|
|
2962
|
+
this.checkAndResetCache();
|
|
2963
|
+
if (this.enableVirtualization && this.list) {
|
|
2964
|
+
this.updateInitialData();
|
|
2965
|
+
}
|
|
2942
2966
|
return;
|
|
2943
2967
|
}
|
|
2944
2968
|
this.onChangeEvent(e);
|
|
@@ -3253,6 +3277,22 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3253
3277
|
this.updateIconState();
|
|
3254
3278
|
this.isFocused = true;
|
|
3255
3279
|
}
|
|
3280
|
+
resizingWireEvent() {
|
|
3281
|
+
// Mouse events
|
|
3282
|
+
EventHandler.add(document, 'mousemove', this.resizePopup, this);
|
|
3283
|
+
EventHandler.add(document, 'mouseup', this.stopResizing, this);
|
|
3284
|
+
// Touch events
|
|
3285
|
+
EventHandler.add(document, 'touchmove', this.resizePopup, this);
|
|
3286
|
+
EventHandler.add(document, 'touchend', this.stopResizing, this);
|
|
3287
|
+
}
|
|
3288
|
+
resizingUnWireEvent() {
|
|
3289
|
+
// Mouse events
|
|
3290
|
+
EventHandler.remove(document, 'mousemove', this.resizePopup);
|
|
3291
|
+
EventHandler.remove(document, 'mouseup', this.stopResizing);
|
|
3292
|
+
// Touch events
|
|
3293
|
+
EventHandler.remove(document, 'touchmove', this.resizePopup);
|
|
3294
|
+
EventHandler.remove(document, 'touchend', this.stopResizing);
|
|
3295
|
+
}
|
|
3256
3296
|
resetValueHandler(e) {
|
|
3257
3297
|
const formElement = closest(this.inputElement, 'form');
|
|
3258
3298
|
if (formElement && e.target === formElement) {
|
|
@@ -3347,6 +3387,68 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3347
3387
|
this.incrementalSearch(e);
|
|
3348
3388
|
}
|
|
3349
3389
|
}
|
|
3390
|
+
startResizing(event) {
|
|
3391
|
+
this.isResizing = true;
|
|
3392
|
+
this.trigger('resizeStart', event);
|
|
3393
|
+
// Get initial touch or mouse coordinates
|
|
3394
|
+
const clientX = (event instanceof MouseEvent) ? event.clientX : event.touches[0].clientX;
|
|
3395
|
+
const clientY = (event instanceof MouseEvent) ? event.clientY : event.touches[0].clientY;
|
|
3396
|
+
// Store the initial dimensions of the popup
|
|
3397
|
+
if (this.list && this.list.parentElement) {
|
|
3398
|
+
this.originalWidth = this.list.parentElement.offsetWidth;
|
|
3399
|
+
this.originalHeight = this.list.parentElement.offsetHeight;
|
|
3400
|
+
this.originalMouseX = clientX;
|
|
3401
|
+
this.originalMouseY = clientY;
|
|
3402
|
+
}
|
|
3403
|
+
// Wire up events for resizing
|
|
3404
|
+
this.resizingWireEvent();
|
|
3405
|
+
if (event) {
|
|
3406
|
+
event.preventDefault(); // Prevent selection behavior if event exists
|
|
3407
|
+
}
|
|
3408
|
+
}
|
|
3409
|
+
resizePopup(event) {
|
|
3410
|
+
if (!this.isResizing) {
|
|
3411
|
+
return;
|
|
3412
|
+
}
|
|
3413
|
+
this.trigger('resizing', event);
|
|
3414
|
+
// Get the current touch or mouse position
|
|
3415
|
+
const clientX = (event instanceof MouseEvent) ? event.clientX : event.touches[0].clientX;
|
|
3416
|
+
const clientY = (event instanceof MouseEvent) ? event.clientY : event.touches[0].clientY;
|
|
3417
|
+
// Calculate the new width and height based on drag
|
|
3418
|
+
const dx = clientX - this.originalMouseX;
|
|
3419
|
+
const dy = clientY - this.originalMouseY;
|
|
3420
|
+
if (this.list && this.list.parentElement) {
|
|
3421
|
+
// Minimum width and height (100px)
|
|
3422
|
+
let minWidth = parseInt(window.getComputedStyle(this.list.parentElement).minWidth, 10);
|
|
3423
|
+
let minHeight = parseInt(window.getComputedStyle(this.list.parentElement).minHeight, 10);
|
|
3424
|
+
minWidth = minWidth || 100;
|
|
3425
|
+
minHeight = minHeight || 120;
|
|
3426
|
+
// Ensure the new width and height are not less than the minimum
|
|
3427
|
+
this.resizeWidth = Math.max(this.originalWidth + dx, minWidth);
|
|
3428
|
+
this.resizeHeight = Math.max(this.originalHeight + dy, minHeight);
|
|
3429
|
+
this.list.parentElement.style.width = `${this.resizeWidth}px`;
|
|
3430
|
+
this.list.parentElement.style.height = `${this.resizeHeight}px`;
|
|
3431
|
+
this.list.parentElement.style.maxHeight = `${this.resizeHeight}px`;
|
|
3432
|
+
this.list.style.maxHeight = `${this.resizeHeight}px`;
|
|
3433
|
+
if (this.fixedHeaderElement && this.ulElement) {
|
|
3434
|
+
this.fixedHeaderElement.style.width = `${this.ulElement.offsetWidth}px`;
|
|
3435
|
+
}
|
|
3436
|
+
}
|
|
3437
|
+
if (event) {
|
|
3438
|
+
event.preventDefault(); // Prevent selection behavior if event exists
|
|
3439
|
+
}
|
|
3440
|
+
}
|
|
3441
|
+
stopResizing(event) {
|
|
3442
|
+
if (this.isResizing) {
|
|
3443
|
+
this.isResizing = false;
|
|
3444
|
+
this.trigger('resizeStop', event);
|
|
3445
|
+
// Unwire the resize event listeners
|
|
3446
|
+
this.resizingUnWireEvent();
|
|
3447
|
+
}
|
|
3448
|
+
if (event) {
|
|
3449
|
+
event.preventDefault(); // Prevent selection behavior if event exists
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3350
3452
|
onMouseClick(e) {
|
|
3351
3453
|
const target = e.target;
|
|
3352
3454
|
this.keyboardEvent = null;
|
|
@@ -3818,6 +3920,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3818
3920
|
}
|
|
3819
3921
|
return;
|
|
3820
3922
|
}
|
|
3923
|
+
if (!this.enableVirtualization && this.liCollections[findLi] && this.liCollections[findLi].classList.contains('e-disabled')) {
|
|
3924
|
+
return;
|
|
3925
|
+
}
|
|
3821
3926
|
this.setSelection(this.liCollections[findLi], e);
|
|
3822
3927
|
}
|
|
3823
3928
|
}
|
|
@@ -3913,6 +4018,19 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3913
4018
|
}
|
|
3914
4019
|
pageUpSelection(steps, event, isVirtualKeyAction) {
|
|
3915
4020
|
let previousItem = steps >= 0 ? this.liCollections[steps + 1] : this.liCollections[0];
|
|
4021
|
+
if (!this.enableVirtualization && previousItem && previousItem.classList.contains('e-disabled')) {
|
|
4022
|
+
let validIndex = steps >= 0 ? steps + 1 : 0;
|
|
4023
|
+
while (validIndex < this.liCollections.length) {
|
|
4024
|
+
previousItem = this.liCollections[validIndex];
|
|
4025
|
+
if (previousItem && !previousItem.classList.contains('e-disabled')) {
|
|
4026
|
+
break;
|
|
4027
|
+
}
|
|
4028
|
+
validIndex--;
|
|
4029
|
+
if (validIndex < 0) {
|
|
4030
|
+
return;
|
|
4031
|
+
}
|
|
4032
|
+
}
|
|
4033
|
+
}
|
|
3916
4034
|
if ((this.enableVirtualization && this.activeIndex == null)) {
|
|
3917
4035
|
previousItem = (this.liCollections.length >= steps && steps >= 0) ?
|
|
3918
4036
|
this.liCollections[steps + this.skeletonCount + 1] : this.liCollections[0];
|
|
@@ -3945,6 +4063,15 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3945
4063
|
pageDownSelection(steps, event, isVirtualKeyAction) {
|
|
3946
4064
|
const list = this.getItems();
|
|
3947
4065
|
let previousItem = steps <= list.length ? this.liCollections[steps - 1] : this.liCollections[list.length - 1];
|
|
4066
|
+
if (!this.enableVirtualization && previousItem && previousItem.classList.contains('e-disabled')) {
|
|
4067
|
+
while (steps >= 0 && steps < this.liCollections.length) {
|
|
4068
|
+
previousItem = steps <= list.length ? this.liCollections[steps - 1] : this.liCollections[list.length - 1];
|
|
4069
|
+
if (previousItem && !previousItem.classList.contains('e-disabled')) {
|
|
4070
|
+
break;
|
|
4071
|
+
}
|
|
4072
|
+
steps++;
|
|
4073
|
+
}
|
|
4074
|
+
}
|
|
3948
4075
|
if (this.enableVirtualization && this.skeletonCount > 0) {
|
|
3949
4076
|
steps = this.getModuleName() === 'dropdownlist' && this.allowFiltering ? steps + 1 : steps;
|
|
3950
4077
|
previousItem = steps < list.length ? this.liCollections[steps] : this.liCollections[list.length - 1];
|
|
@@ -4507,6 +4634,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4507
4634
|
if (this.isFiltering() && this.getModuleName() === 'combobox' && isNullOrUndefined(this.list)) {
|
|
4508
4635
|
this.getInitialData = true;
|
|
4509
4636
|
this.renderList();
|
|
4637
|
+
if (!this.isSecondClick && !this.isDropDownClick) {
|
|
4638
|
+
this.executeCloneElements();
|
|
4639
|
+
}
|
|
4510
4640
|
}
|
|
4511
4641
|
this.typedString = this.filterInput.value;
|
|
4512
4642
|
this.preventAutoFill = false;
|
|
@@ -4717,7 +4847,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4717
4847
|
const virualElement = this.createElement('div', {
|
|
4718
4848
|
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
4719
4849
|
});
|
|
4720
|
-
|
|
4850
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
4721
4851
|
}
|
|
4722
4852
|
}
|
|
4723
4853
|
}
|
|
@@ -4756,7 +4886,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4756
4886
|
const virualElement = this.createElement('div', {
|
|
4757
4887
|
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
4758
4888
|
});
|
|
4759
|
-
|
|
4889
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
4760
4890
|
}
|
|
4761
4891
|
}
|
|
4762
4892
|
}
|
|
@@ -4764,6 +4894,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4764
4894
|
this.getFilteringSkeletonCount();
|
|
4765
4895
|
}
|
|
4766
4896
|
this.renderReactTemplates();
|
|
4897
|
+
if (this.filterInput && this.filterInput.value === '' && this.getModuleName() === 'combobox') {
|
|
4898
|
+
this.executeCloneElements();
|
|
4899
|
+
}
|
|
4767
4900
|
}
|
|
4768
4901
|
}
|
|
4769
4902
|
setSearchBox(popupElement) {
|
|
@@ -5107,7 +5240,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5107
5240
|
}
|
|
5108
5241
|
updateSelectionList() {
|
|
5109
5242
|
const selectedItem = this.list && this.list.querySelector('.' + 'e-active');
|
|
5110
|
-
if (!selectedItem && !isNullOrUndefined(this.value)) {
|
|
5243
|
+
if (!selectedItem && !isNullOrUndefined(this.value) && this.getModuleName() !== 'autocomplete') {
|
|
5111
5244
|
const value = this.allowObjectBinding ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
|
|
5112
5245
|
const findEle = this.findListElement(this.list, 'li', 'data-value', value);
|
|
5113
5246
|
if (findEle) {
|
|
@@ -5139,10 +5272,12 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5139
5272
|
formatUnit(Math.round(window.outerHeight).toString() + 'px') : formatUnit(this.popupHeight);
|
|
5140
5273
|
if (this.headerTemplate) {
|
|
5141
5274
|
this.setHeaderTemplate(popupEle);
|
|
5275
|
+
this.isUpdateHeaderHeight = this.header.offsetHeight !== 0;
|
|
5142
5276
|
}
|
|
5143
5277
|
append([this.list], popupEle);
|
|
5144
5278
|
if (this.footerTemplate) {
|
|
5145
5279
|
this.setFooterTemplate(popupEle);
|
|
5280
|
+
this.isUpdateFooterHeight = this.footer.offsetHeight !== 0;
|
|
5146
5281
|
}
|
|
5147
5282
|
document.body.appendChild(popupEle);
|
|
5148
5283
|
popupEle.style.top = '0px';
|
|
@@ -5306,12 +5441,57 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5306
5441
|
if (!isNullOrUndefined(this.popupObj)) {
|
|
5307
5442
|
this.popupObj.show(new Animation(eventArgs.animation), (this.zIndex === 1000) ? this.element : null);
|
|
5308
5443
|
}
|
|
5444
|
+
if (this.isReact) {
|
|
5445
|
+
setTimeout(() => {
|
|
5446
|
+
if (this.popupHeight && this.list && this.popupHeight !== 'auto' && !(this.getModuleName() === 'dropdownlist' && this.allowFiltering)) {
|
|
5447
|
+
const popupHeightValue = typeof this.popupHeight === 'string' ? parseInt(this.popupHeight, 10) : this.popupHeight;
|
|
5448
|
+
if (!this.isUpdateHeaderHeight && this.headerTemplate && this.header) {
|
|
5449
|
+
const listHeight = this.list.style.maxHeight === '' ? popupHeightValue : parseInt(this.list.style.maxHeight, 10);
|
|
5450
|
+
this.list.style.maxHeight = (listHeight - this.header.offsetHeight).toString() + 'px';
|
|
5451
|
+
this.isUpdateHeaderHeight = true;
|
|
5452
|
+
}
|
|
5453
|
+
if (!this.isUpdateFooterHeight && this.footerTemplate && this.footer) {
|
|
5454
|
+
const listHeight = this.list.style.maxHeight === '' ? popupHeightValue : parseInt(this.list.style.maxHeight, 10);
|
|
5455
|
+
this.list.style.maxHeight = (listHeight - this.footer.offsetHeight).toString() + 'px';
|
|
5456
|
+
this.isUpdateFooterHeight = true;
|
|
5457
|
+
}
|
|
5458
|
+
}
|
|
5459
|
+
}, 15);
|
|
5460
|
+
}
|
|
5309
5461
|
}
|
|
5310
5462
|
else {
|
|
5311
5463
|
this.beforePopupOpen = false;
|
|
5312
5464
|
this.destroyPopup();
|
|
5313
5465
|
}
|
|
5314
5466
|
});
|
|
5467
|
+
if (this.allowResize) {
|
|
5468
|
+
const resizePaddingBottom = 16;
|
|
5469
|
+
// Create the resizer div
|
|
5470
|
+
this.resizer = this.createElement('div', {
|
|
5471
|
+
id: this.element.id + '_resize-popup',
|
|
5472
|
+
className: dropDownListClasses.resizeIcon // Adding class for styling
|
|
5473
|
+
});
|
|
5474
|
+
// Add the resizer div to the popup
|
|
5475
|
+
if (this.list && this.list.parentElement) {
|
|
5476
|
+
this.list.parentElement.classList.add('e-resize');
|
|
5477
|
+
if (this.popupHeight.toString().toLowerCase() !== 'auto') {
|
|
5478
|
+
this.list.parentElement.style.height = '100%';
|
|
5479
|
+
}
|
|
5480
|
+
this.list.parentElement.style.paddingBottom = (this.getModuleName() === 'dropdownlist' && this.allowFiltering && this.searchBoxHeight) ? (this.searchBoxHeight + resizePaddingBottom).toString() + 'px' : resizePaddingBottom.toString() + 'px';
|
|
5481
|
+
if (this.header || this.footer || this.itemTemplate) {
|
|
5482
|
+
this.list.parentElement.style.paddingBottom = ((parseInt(this.list.parentElement.style.maxHeight, 10) - parseInt(this.list.style.maxHeight, 10)) + resizePaddingBottom).toString() + 'px';
|
|
5483
|
+
}
|
|
5484
|
+
this.list.parentElement.appendChild(this.resizer);
|
|
5485
|
+
//hold the popup resize
|
|
5486
|
+
this.list.parentElement.style.width = `${this.resizeWidth}px`;
|
|
5487
|
+
this.list.parentElement.style.height = `${this.resizeHeight}px`;
|
|
5488
|
+
this.list.parentElement.style.maxHeight = `${this.resizeHeight}px`;
|
|
5489
|
+
this.list.style.maxHeight = `${this.resizeHeight}px`;
|
|
5490
|
+
}
|
|
5491
|
+
// Attach mouse and touch events to the resizer
|
|
5492
|
+
EventHandler.add(this.resizer, 'mousedown', this.startResizing, this);
|
|
5493
|
+
EventHandler.add(this.resizer, 'touchstart', this.startResizing, this);
|
|
5494
|
+
}
|
|
5315
5495
|
}
|
|
5316
5496
|
else {
|
|
5317
5497
|
this.beforePopupOpen = false;
|
|
@@ -5545,7 +5725,8 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5545
5725
|
}
|
|
5546
5726
|
else {
|
|
5547
5727
|
this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ?
|
|
5548
|
-
this.virtualListInfo.startIndex * this.listItemHeight
|
|
5728
|
+
isInitial && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight +
|
|
5729
|
+
(this.listItemHeight * 2) : this.virtualListInfo.startIndex * this.listItemHeight : 0;
|
|
5549
5730
|
}
|
|
5550
5731
|
isScrollerCHanged = this.isKeyBoardAction;
|
|
5551
5732
|
}
|
|
@@ -5692,15 +5873,6 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5692
5873
|
this.keyboardEvent = null;
|
|
5693
5874
|
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
5694
5875
|
this.isActive = false;
|
|
5695
|
-
if (this.getModuleName() === 'dropdownlist') {
|
|
5696
|
-
Input.destroy({
|
|
5697
|
-
element: this.filterInput,
|
|
5698
|
-
floatLabelType: this.floatLabelType,
|
|
5699
|
-
properties: { placeholder: this.filterBarPlaceholder },
|
|
5700
|
-
buttons: this.clearIconElement
|
|
5701
|
-
}, this.clearIconElement);
|
|
5702
|
-
}
|
|
5703
|
-
this.filterInputObj = null;
|
|
5704
5876
|
this.isDropDownClick = false;
|
|
5705
5877
|
this.preventAutoFill = false;
|
|
5706
5878
|
const scrollableParentElements = this.popupObj.getScrollableParent(this.inputWrapper.container);
|
|
@@ -5772,6 +5944,15 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5772
5944
|
const popupInstance = this.popupObj;
|
|
5773
5945
|
const eventArgs = { popup: popupInstance, cancel: false, animation: animModel, event: e || null };
|
|
5774
5946
|
this.trigger('close', eventArgs, (eventArgs) => {
|
|
5947
|
+
if (this.getModuleName() === 'dropdownlist') {
|
|
5948
|
+
Input.destroy({
|
|
5949
|
+
element: this.filterInput,
|
|
5950
|
+
floatLabelType: this.floatLabelType,
|
|
5951
|
+
properties: { placeholder: this.filterBarPlaceholder },
|
|
5952
|
+
buttons: this.clearIconElement
|
|
5953
|
+
}, this.clearIconElement);
|
|
5954
|
+
}
|
|
5955
|
+
this.filterInputObj = null;
|
|
5775
5956
|
if (!isNullOrUndefined(this.popupObj) &&
|
|
5776
5957
|
!isNullOrUndefined(this.popupObj.element.querySelector('.e-fixed-head'))) {
|
|
5777
5958
|
const fixedHeader = this.popupObj.element.querySelector('.e-fixed-head');
|
|
@@ -5842,6 +6023,12 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5842
6023
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5843
6024
|
this.list.getElementsByClassName('e-virtual-ddl')[0].style = this.GetVirtualTrackHeight();
|
|
5844
6025
|
}
|
|
6026
|
+
else if (!this.list.querySelector('.e-virtual-ddl')) {
|
|
6027
|
+
const virualElement = this.createElement('div', {
|
|
6028
|
+
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
6029
|
+
});
|
|
6030
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
6031
|
+
}
|
|
5845
6032
|
if (this.getModuleName() !== 'autocomplete' && this.totalItemCount !== 0 && this.totalItemCount > (this.itemCount * 2)) {
|
|
5846
6033
|
this.getSkeletonCount();
|
|
5847
6034
|
}
|
|
@@ -5860,6 +6047,10 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5860
6047
|
this.isFilterFocus = false;
|
|
5861
6048
|
this.inputElement.removeAttribute('aria-controls');
|
|
5862
6049
|
if (this.popupObj) {
|
|
6050
|
+
if (this.resizer) {
|
|
6051
|
+
EventHandler.remove(this.resizer, 'mousedown', this.startResizing);
|
|
6052
|
+
EventHandler.remove(this.resizer, 'touchstart', this.startResizing);
|
|
6053
|
+
}
|
|
5863
6054
|
this.popupObj.destroy();
|
|
5864
6055
|
detach(this.popupObj.element);
|
|
5865
6056
|
}
|
|
@@ -6570,6 +6761,20 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6570
6761
|
isOpen: true
|
|
6571
6762
|
});
|
|
6572
6763
|
}
|
|
6764
|
+
if (!this.isSecondClick && !this.isDropDownClick) {
|
|
6765
|
+
this.executeCloneElements();
|
|
6766
|
+
}
|
|
6767
|
+
}
|
|
6768
|
+
executeCloneElements() {
|
|
6769
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
6770
|
+
const proxy = this;
|
|
6771
|
+
const duration = (this.element.tagName === this.getNgDirective() && this.itemTemplate) ? 500 : 100;
|
|
6772
|
+
if (this.isReact && this.isFiltering() && this.itemTemplate != null) {
|
|
6773
|
+
setTimeout(() => {
|
|
6774
|
+
proxy.cloneElements();
|
|
6775
|
+
proxy.isSecondClick = true;
|
|
6776
|
+
}, duration);
|
|
6777
|
+
}
|
|
6573
6778
|
}
|
|
6574
6779
|
invokeRenderPopup(e) {
|
|
6575
6780
|
if (Browser.isDevice && this.isFilterLayout()) {
|
|
@@ -6907,6 +7112,9 @@ __decorate$1([
|
|
|
6907
7112
|
__decorate$1([
|
|
6908
7113
|
Property(false)
|
|
6909
7114
|
], DropDownList.prototype, "enableVirtualization", void 0);
|
|
7115
|
+
__decorate$1([
|
|
7116
|
+
Property(false)
|
|
7117
|
+
], DropDownList.prototype, "allowResize", void 0);
|
|
6910
7118
|
__decorate$1([
|
|
6911
7119
|
Property(null)
|
|
6912
7120
|
], DropDownList.prototype, "text", void 0);
|
|
@@ -6946,6 +7154,15 @@ __decorate$1([
|
|
|
6946
7154
|
__decorate$1([
|
|
6947
7155
|
Event()
|
|
6948
7156
|
], DropDownList.prototype, "focus", void 0);
|
|
7157
|
+
__decorate$1([
|
|
7158
|
+
Event()
|
|
7159
|
+
], DropDownList.prototype, "resizeStop", void 0);
|
|
7160
|
+
__decorate$1([
|
|
7161
|
+
Event()
|
|
7162
|
+
], DropDownList.prototype, "resizing", void 0);
|
|
7163
|
+
__decorate$1([
|
|
7164
|
+
Event()
|
|
7165
|
+
], DropDownList.prototype, "resizeStart", void 0);
|
|
6949
7166
|
DropDownList = __decorate$1([
|
|
6950
7167
|
NotifyPropertyChanges
|
|
6951
7168
|
], DropDownList);
|
|
@@ -7087,6 +7304,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
7087
7304
|
this.selectedData = [];
|
|
7088
7305
|
this.filterDelayTime = 300;
|
|
7089
7306
|
this.isClicked = false;
|
|
7307
|
+
this.documentClickContext = this.onDocumentClick.bind(this);
|
|
7090
7308
|
// Specifies if the checkAll method has been called
|
|
7091
7309
|
this.isCheckAllCalled = false;
|
|
7092
7310
|
this.isFromFilterChange = false;
|
|
@@ -7597,7 +7815,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
7597
7815
|
if (this.showSelectAll && this.checkAllParent) {
|
|
7598
7816
|
EventHandler.remove(this.checkAllParent, 'mouseup', this.clickHandler);
|
|
7599
7817
|
}
|
|
7600
|
-
|
|
7818
|
+
document.removeEventListener('mousedown', this.documentClickContext);
|
|
7601
7819
|
}
|
|
7602
7820
|
/* Trigger when the dropdown is clicked */
|
|
7603
7821
|
dropDownClick(e) {
|
|
@@ -8611,7 +8829,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8611
8829
|
if (this.treeObj.checkedNodes.length > 0 && !this.isFilterRestore) {
|
|
8612
8830
|
const nodes = this.treeObj.element.querySelectorAll('li');
|
|
8613
8831
|
const checkedNodes = this.treeObj.element.querySelectorAll('li[aria-checked=true]');
|
|
8614
|
-
if ((checkedNodes.length === nodes.length
|
|
8832
|
+
if ((checkedNodes.length === nodes.length) && this.checkBoxElement) {
|
|
8615
8833
|
const wrap = closest(this.checkBoxElement, '.' + CHECKBOXWRAP);
|
|
8616
8834
|
this.changeState(wrap, 'check');
|
|
8617
8835
|
this.checkSelectAll = false;
|
|
@@ -8673,7 +8891,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8673
8891
|
this.isPopupOpen = false;
|
|
8674
8892
|
},
|
|
8675
8893
|
open: () => {
|
|
8676
|
-
|
|
8894
|
+
document.addEventListener('mousedown', this.documentClickContext);
|
|
8677
8895
|
this.isPopupOpen = true;
|
|
8678
8896
|
},
|
|
8679
8897
|
targetExitViewport: () => {
|
|
@@ -10715,7 +10933,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
10715
10933
|
const inputValue = this.inputElement.value;
|
|
10716
10934
|
const dataSource = this.sortedData;
|
|
10717
10935
|
const type = this.typeOfData(dataSource).typeof;
|
|
10718
|
-
let activeItem = Search(inputValue, this.liCollections, this.filterType, true, dataSource, this.fields, type);
|
|
10936
|
+
let activeItem = Search(inputValue, this.liCollections, this.filterType, true, dataSource, this.fields, type, this.ignoreAccent);
|
|
10719
10937
|
if (this.enableVirtualization && inputValue !== '' && this.getModuleName() !== 'autocomplete' && this.isTyped && !this.allowFiltering) {
|
|
10720
10938
|
let updatingincrementalindex = false;
|
|
10721
10939
|
const isEndIndexValid = this.viewPortInfo.endIndex >= this.incrementalEndIndex &&
|
|
@@ -10942,6 +11160,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
10942
11160
|
super.clearAll(e);
|
|
10943
11161
|
}
|
|
10944
11162
|
if (this.isFiltering() && !isNullOrUndefined(e) && e.target === this.inputWrapper.clearButton) {
|
|
11163
|
+
this.typedString = this.filterInput.value;
|
|
10945
11164
|
this.searchLists(e);
|
|
10946
11165
|
}
|
|
10947
11166
|
}
|
|
@@ -11671,11 +11890,11 @@ let AutoComplete = class AutoComplete extends ComboBox {
|
|
|
11671
11890
|
});
|
|
11672
11891
|
this.list.appendChild(virtualElement).appendChild(this.list.querySelector('.e-list-parent'));
|
|
11673
11892
|
}
|
|
11674
|
-
if (!this.list.querySelector('.e-virtual-ddl') &&
|
|
11893
|
+
if (!this.list.querySelector('.e-virtual-ddl') && this.list.parentElement) {
|
|
11675
11894
|
const virtualElement = this.createElement('div', {
|
|
11676
11895
|
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
11677
11896
|
});
|
|
11678
|
-
|
|
11897
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virtualElement);
|
|
11679
11898
|
}
|
|
11680
11899
|
}
|
|
11681
11900
|
if ((this.getModuleName() === 'autocomplete' && !(this.dataSource instanceof DataManager)) || (this.getModuleName() === 'autocomplete' && (this.dataSource instanceof DataManager) && this.totalItemCount !== 0)) {
|
|
@@ -11710,6 +11929,9 @@ let AutoComplete = class AutoComplete extends ComboBox {
|
|
|
11710
11929
|
if (!isNullOrUndefined(item)) {
|
|
11711
11930
|
removeClass([item], dropDownListClasses.focus);
|
|
11712
11931
|
}
|
|
11932
|
+
if (!isNullOrUndefined(this.itemData) && !this.enableVirtualization) {
|
|
11933
|
+
this.focusIndexItem();
|
|
11934
|
+
}
|
|
11713
11935
|
this.postBackAction();
|
|
11714
11936
|
}
|
|
11715
11937
|
postBackAction() {
|
|
@@ -12202,6 +12424,7 @@ const BOX_ELEMENT = 'e-multiselect-box';
|
|
|
12202
12424
|
const FILTERPARENT = 'e-filter-parent';
|
|
12203
12425
|
const CUSTOM_WIDTH = 'e-search-custom-width';
|
|
12204
12426
|
const FILTERINPUT = 'e-input-filter';
|
|
12427
|
+
const RESIZE_ICON = 'e-resizer-right e-icons';
|
|
12205
12428
|
/**
|
|
12206
12429
|
* The Multiselect allows the user to pick a more than one value from list of predefined values.
|
|
12207
12430
|
* ```html
|
|
@@ -12232,6 +12455,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12232
12455
|
super(option, element);
|
|
12233
12456
|
this.clearIconWidth = 0;
|
|
12234
12457
|
this.previousFilterText = '';
|
|
12458
|
+
this.storedSelectAllHeight = 0;
|
|
12459
|
+
this.isUpdateHeaderHeight = false;
|
|
12460
|
+
this.isUpdateFooterHeight = false;
|
|
12235
12461
|
this.isValidKey = false;
|
|
12236
12462
|
this.selectAllEventData = [];
|
|
12237
12463
|
this.selectAllEventEle = [];
|
|
@@ -12379,7 +12605,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12379
12605
|
const eventArgs = { popup: this.popupObj, event: e, cancel: false, animation: animModel };
|
|
12380
12606
|
this.trigger('open', eventArgs, (eventArgs) => {
|
|
12381
12607
|
if (!eventArgs.cancel) {
|
|
12382
|
-
this.focusAtFirstListItem();
|
|
12608
|
+
this.focusAtFirstListItem(true);
|
|
12383
12609
|
if (this.popupObj) {
|
|
12384
12610
|
document.body.appendChild(this.popupObj.element);
|
|
12385
12611
|
}
|
|
@@ -12394,6 +12620,23 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12394
12620
|
if (this.popupObj) {
|
|
12395
12621
|
this.popupObj.show(eventArgs.animation, (this.zIndex === 1000) ? this.element : null);
|
|
12396
12622
|
}
|
|
12623
|
+
if (this.isReact) {
|
|
12624
|
+
setTimeout(() => {
|
|
12625
|
+
if (this.popupHeight && this.list && this.popupHeight !== 'auto') {
|
|
12626
|
+
const popupHeightValue = typeof this.popupHeight === 'string' ? parseInt(this.popupHeight, 10) : this.popupHeight;
|
|
12627
|
+
if (!this.isUpdateHeaderHeight && this.headerTemplate && this.header) {
|
|
12628
|
+
const listHeight = this.list.style.maxHeight === '' ? popupHeightValue : parseInt(this.list.style.maxHeight, 10);
|
|
12629
|
+
this.list.style.maxHeight = (listHeight - this.header.offsetHeight).toString() + 'px';
|
|
12630
|
+
this.isUpdateHeaderHeight = true;
|
|
12631
|
+
}
|
|
12632
|
+
if (!this.isUpdateFooterHeight && this.footerTemplate && this.footer) {
|
|
12633
|
+
const listHeight = this.list.style.maxHeight === '' ? popupHeightValue : parseInt(this.list.style.maxHeight, 10);
|
|
12634
|
+
this.list.style.maxHeight = (listHeight - this.footer.offsetHeight).toString() + 'px';
|
|
12635
|
+
this.isUpdateFooterHeight = true;
|
|
12636
|
+
}
|
|
12637
|
+
}
|
|
12638
|
+
}, 15);
|
|
12639
|
+
}
|
|
12397
12640
|
attributes(this.inputElement, {
|
|
12398
12641
|
'aria-expanded': 'true', 'aria-owns': this.element.id + '_popup', 'aria-controls': this.element.id
|
|
12399
12642
|
});
|
|
@@ -12470,16 +12713,16 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12470
12713
|
: this.value[this.value.length - 1];
|
|
12471
12714
|
const valueEle = this.findListElement((this.hideSelectedItem ? this.ulElement : this.list), 'li', 'data-value', value);
|
|
12472
12715
|
if (!isNullOrUndefined(valueEle)) {
|
|
12473
|
-
this.scrollBottom(valueEle);
|
|
12716
|
+
this.scrollBottom(valueEle, undefined, false, null, true);
|
|
12474
12717
|
}
|
|
12475
12718
|
}
|
|
12476
12719
|
if (this.enableVirtualization) {
|
|
12477
12720
|
const focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
|
|
12478
12721
|
this.isKeyBoardAction = false;
|
|
12479
|
-
this.scrollBottom(focusedItem);
|
|
12722
|
+
this.scrollBottom(focusedItem, undefined, false, null, true);
|
|
12480
12723
|
}
|
|
12481
12724
|
}
|
|
12482
|
-
focusAtFirstListItem() {
|
|
12725
|
+
focusAtFirstListItem(isOpen) {
|
|
12483
12726
|
if (this.ulElement && this.ulElement.querySelector('li.'
|
|
12484
12727
|
+ dropDownBaseClasses.li)) {
|
|
12485
12728
|
let element;
|
|
@@ -12492,10 +12735,18 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12492
12735
|
if (this.fields.disabled) {
|
|
12493
12736
|
element = this.ulElement.querySelector('li.'
|
|
12494
12737
|
+ dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)' + ':not(.' + DISABLED$1 + ')');
|
|
12738
|
+
if (isOpen && this.viewPortInfo && this.viewPortInfo.startIndex !== 0) {
|
|
12739
|
+
const elements = this.ulElement.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
|
|
12740
|
+
element = elements && elements.length > 0 ? elements[2] : element;
|
|
12741
|
+
}
|
|
12495
12742
|
}
|
|
12496
12743
|
else {
|
|
12497
12744
|
element = this.ulElement.querySelector('li.'
|
|
12498
12745
|
+ dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
|
|
12746
|
+
if (isOpen && this.viewPortInfo && this.viewPortInfo.startIndex !== 0) {
|
|
12747
|
+
const elements = this.ulElement.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
|
|
12748
|
+
element = elements && elements.length > 0 ? elements[2] : element;
|
|
12749
|
+
}
|
|
12499
12750
|
}
|
|
12500
12751
|
}
|
|
12501
12752
|
else {
|
|
@@ -12792,7 +13043,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12792
13043
|
if (this.hideSelectedItem && element.classList.contains(dropDownBaseClasses.focus)) {
|
|
12793
13044
|
removeClass([element], dropDownBaseClasses.focus);
|
|
12794
13045
|
const listEle = element.parentElement.querySelectorAll('.' +
|
|
12795
|
-
dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')');
|
|
13046
|
+
dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.' + DISABLED$1 + ')');
|
|
12796
13047
|
if (listEle.length > 0) {
|
|
12797
13048
|
addClass([listEle[0]], dropDownBaseClasses.focus);
|
|
12798
13049
|
this.updateAriaActiveDescendant();
|
|
@@ -12961,7 +13212,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12961
13212
|
if (!(this.dataSource instanceof DataManager) && dataType === 'string' || dataType === 'number') {
|
|
12962
13213
|
filterQuery.where('', this.filterType, this.targetElement(), this.ignoreCase, this.ignoreAccent);
|
|
12963
13214
|
}
|
|
12964
|
-
else if ((this.enableVirtualization && this.targetElement() !== '') || !this.enableVirtualization) {
|
|
13215
|
+
else if ((this.enableVirtualization && this.targetElement() !== '' && !this.isClearAllAction) || !this.enableVirtualization) {
|
|
12965
13216
|
const fields = this.fields;
|
|
12966
13217
|
filterQuery.where(!isNullOrUndefined(fields.text) ? fields.text : '', this.filterType, this.targetElement(), this.ignoreCase, this.ignoreAccent);
|
|
12967
13218
|
}
|
|
@@ -12969,6 +13220,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12969
13220
|
if (this.enableVirtualization && (this.viewPortInfo.endIndex !== 0) && !this.virtualSelectAll) {
|
|
12970
13221
|
return this.virtualFilterQuery(filterQuery);
|
|
12971
13222
|
}
|
|
13223
|
+
if (this.virtualSelectAll) {
|
|
13224
|
+
return query ? query.take(this.maximumSelectionLength).requiresCount() : this.query ?
|
|
13225
|
+
this.query.take(this.maximumSelectionLength).requiresCount() :
|
|
13226
|
+
new Query().take(this.maximumSelectionLength).requiresCount();
|
|
13227
|
+
}
|
|
12972
13228
|
return filterQuery;
|
|
12973
13229
|
}
|
|
12974
13230
|
else {
|
|
@@ -13154,6 +13410,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13154
13410
|
this.getFilteringSkeletonCount();
|
|
13155
13411
|
}
|
|
13156
13412
|
this.refreshPopup();
|
|
13413
|
+
if (this.allowResize) {
|
|
13414
|
+
this.setResize();
|
|
13415
|
+
}
|
|
13157
13416
|
if (this.mode === 'CheckBox') {
|
|
13158
13417
|
this.removeFocus();
|
|
13159
13418
|
}
|
|
@@ -13487,6 +13746,15 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13487
13746
|
':not(.' + HIDE_LIST + ')' +
|
|
13488
13747
|
':not(.e-reorder-hide)');
|
|
13489
13748
|
let previousItem = steps >= 0 ? collection[steps + 1] : collection[0];
|
|
13749
|
+
if (this.fields.disabled && previousItem && !this.enableVirtualization) {
|
|
13750
|
+
while (previousItem && (previousItem.classList.contains('e-disabled') || previousItem.classList.contains(HIDE_LIST) ||
|
|
13751
|
+
previousItem.classList.contains('.e-reorder-hide') || previousItem.classList.contains('e-list-group-item'))) {
|
|
13752
|
+
previousItem = previousItem.previousElementSibling;
|
|
13753
|
+
}
|
|
13754
|
+
if (!previousItem) {
|
|
13755
|
+
return;
|
|
13756
|
+
}
|
|
13757
|
+
}
|
|
13490
13758
|
if (this.enableVirtualization && isVirtualKeyAction) {
|
|
13491
13759
|
previousItem = (this.liCollections.length >= steps && steps >= 0)
|
|
13492
13760
|
? this.liCollections[steps]
|
|
@@ -13518,6 +13786,15 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13518
13786
|
const collection = this.list.querySelectorAll('li.'
|
|
13519
13787
|
+ dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
|
|
13520
13788
|
let previousItem = steps <= collection.length ? collection[steps - 1] : collection[collection.length - 1];
|
|
13789
|
+
if (this.fields.disabled && previousItem && !this.enableVirtualization) {
|
|
13790
|
+
while (previousItem && (previousItem.classList.contains('e-disabled') || previousItem.classList.contains(HIDE_LIST) ||
|
|
13791
|
+
previousItem.classList.contains('.e-reorder-hide') || previousItem.classList.contains('e-list-group-item'))) {
|
|
13792
|
+
previousItem = previousItem.nextElementSibling;
|
|
13793
|
+
}
|
|
13794
|
+
if (!previousItem) {
|
|
13795
|
+
return;
|
|
13796
|
+
}
|
|
13797
|
+
}
|
|
13521
13798
|
if (this.enableVirtualization && this.skeletonCount > 0) {
|
|
13522
13799
|
previousItem = steps < list.length ? this.liCollections[steps] : this.liCollections[list.length - 1];
|
|
13523
13800
|
}
|
|
@@ -13568,6 +13845,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13568
13845
|
if (this.isPopupOpen()) {
|
|
13569
13846
|
this.refreshPopup();
|
|
13570
13847
|
}
|
|
13848
|
+
if (this.allowResize) {
|
|
13849
|
+
this.setResize();
|
|
13850
|
+
}
|
|
13571
13851
|
setTimeout(() => {
|
|
13572
13852
|
this.calculateWidth();
|
|
13573
13853
|
}, 150);
|
|
@@ -13804,6 +14084,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13804
14084
|
if (this.mode === 'CheckBox') {
|
|
13805
14085
|
this.inputElement.focus();
|
|
13806
14086
|
}
|
|
14087
|
+
this.isKeyBoardAction = false;
|
|
13807
14088
|
return;
|
|
13808
14089
|
case 13:
|
|
13809
14090
|
e.preventDefault();
|
|
@@ -13812,10 +14093,12 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13812
14093
|
this.selectByKey(e);
|
|
13813
14094
|
}
|
|
13814
14095
|
this.checkPlaceholderSize();
|
|
14096
|
+
this.isKeyBoardAction = false;
|
|
13815
14097
|
return;
|
|
13816
14098
|
case 32:
|
|
13817
14099
|
this.isKeyBoardAction = true;
|
|
13818
14100
|
this.spaceKeySelection(e);
|
|
14101
|
+
this.isKeyBoardAction = false;
|
|
13819
14102
|
return;
|
|
13820
14103
|
case 9:
|
|
13821
14104
|
e.preventDefault();
|
|
@@ -13857,6 +14140,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13857
14140
|
if (!(this.mode === 'CheckBox' && this.showSelectAll)) {
|
|
13858
14141
|
this.refreshPopup();
|
|
13859
14142
|
}
|
|
14143
|
+
if (this.allowResize) {
|
|
14144
|
+
this.setResize();
|
|
14145
|
+
}
|
|
13860
14146
|
this.isKeyBoardAction = false;
|
|
13861
14147
|
}
|
|
13862
14148
|
arrowDown(e, isVirtualKeyAction) {
|
|
@@ -13981,7 +14267,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13981
14267
|
}
|
|
13982
14268
|
this.makeTextBoxEmpty();
|
|
13983
14269
|
}
|
|
13984
|
-
scrollBottom(selectedLI, activeIndex, isInitialSelection = false, keyCode = null) {
|
|
14270
|
+
scrollBottom(selectedLI, activeIndex, isInitialSelection = false, keyCode = null, isInitial = false) {
|
|
13985
14271
|
if ((!isNullOrUndefined(selectedLI) && selectedLI.classList.contains('e-virtual-list')) ||
|
|
13986
14272
|
(this.enableVirtualization && isNullOrUndefined(selectedLI))) {
|
|
13987
14273
|
selectedLI = this.liCollections[this.skeletonCount];
|
|
@@ -14035,8 +14321,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
14035
14321
|
}
|
|
14036
14322
|
}
|
|
14037
14323
|
else {
|
|
14038
|
-
this.list.scrollTop = this.virtualListInfo &&
|
|
14039
|
-
this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight
|
|
14324
|
+
this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ?
|
|
14325
|
+
isInitial && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight +
|
|
14326
|
+
(this.listItemHeight * 2) : this.virtualListInfo.startIndex * this.listItemHeight : 0;
|
|
14040
14327
|
}
|
|
14041
14328
|
isScrollerCHanged = this.isKeyBoardAction;
|
|
14042
14329
|
}
|
|
@@ -14237,6 +14524,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
14237
14524
|
this.getDataByValue(this.getFormattedValue(selectedElem.getAttribute('data-value'))) :
|
|
14238
14525
|
selectedElem.getAttribute('data-value');
|
|
14239
14526
|
this.removeValue(currentChip, e);
|
|
14527
|
+
this.updateDelimeter(this.delimiterChar, e);
|
|
14240
14528
|
this.makeTextBoxEmpty();
|
|
14241
14529
|
}
|
|
14242
14530
|
if (this.closePopupOnSelect) {
|
|
@@ -14359,7 +14647,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
14359
14647
|
return;
|
|
14360
14648
|
}
|
|
14361
14649
|
const index = this.getIndexByValue(focusedLi.getAttribute('data-value'));
|
|
14362
|
-
if (index === 0
|
|
14650
|
+
if (index === 0) {
|
|
14363
14651
|
position = 1;
|
|
14364
14652
|
}
|
|
14365
14653
|
if (index === (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem)').length - 1)) {
|
|
@@ -15005,6 +15293,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15005
15293
|
if (this.headerTemplate) {
|
|
15006
15294
|
this.setHeaderTemplate();
|
|
15007
15295
|
overAllHeight -= this.header.offsetHeight;
|
|
15296
|
+
this.isUpdateHeaderHeight = this.header.offsetHeight !== 0;
|
|
15008
15297
|
}
|
|
15009
15298
|
append([this.list], this.popupWrapper);
|
|
15010
15299
|
if (!this.list.classList.contains(dropDownBaseClasses.noData) && this.getItems()[1]) {
|
|
@@ -15042,6 +15331,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15042
15331
|
if (this.footerTemplate) {
|
|
15043
15332
|
this.setFooterTemplate();
|
|
15044
15333
|
overAllHeight -= this.footer.offsetHeight;
|
|
15334
|
+
this.isUpdateFooterHeight = this.footer.offsetHeight !== 0;
|
|
15045
15335
|
}
|
|
15046
15336
|
if (this.mode === 'CheckBox' && this.showSelectAll) {
|
|
15047
15337
|
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
@@ -15159,6 +15449,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15159
15449
|
if (this.mode === 'CheckBox' && Browser.isDevice && this.allowFiltering && this.isDeviceFullScreen) {
|
|
15160
15450
|
this.notify('deviceSearchBox', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
15161
15451
|
}
|
|
15452
|
+
if (this.allowResize) {
|
|
15453
|
+
this.setResize();
|
|
15454
|
+
}
|
|
15162
15455
|
this.popupObj.close();
|
|
15163
15456
|
this.popupWrapper.style.visibility = '';
|
|
15164
15457
|
}
|
|
@@ -15282,6 +15575,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15282
15575
|
if (this.enabled && !this.readonly) {
|
|
15283
15576
|
let temp;
|
|
15284
15577
|
this.setDynValue = false;
|
|
15578
|
+
this.isClearAllAction = true;
|
|
15285
15579
|
if (this.value && this.value.length > 0) {
|
|
15286
15580
|
if (this.allowFiltering) {
|
|
15287
15581
|
this.refreshListItems(null);
|
|
@@ -15328,6 +15622,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15328
15622
|
this.previousStartIndex = 0;
|
|
15329
15623
|
this.previousEndIndex = 0;
|
|
15330
15624
|
}
|
|
15625
|
+
this.isClearAllAction = false;
|
|
15331
15626
|
}
|
|
15332
15627
|
this.isClearAllItem = true;
|
|
15333
15628
|
EventHandler.add(document, 'mouseup', this.preventSelection, this);
|
|
@@ -15358,6 +15653,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15358
15653
|
if (this.isPopupOpen()) {
|
|
15359
15654
|
this.refreshPopup();
|
|
15360
15655
|
}
|
|
15656
|
+
if (this.allowResize) {
|
|
15657
|
+
this.setResize();
|
|
15658
|
+
}
|
|
15361
15659
|
if (!this.inputFocus) {
|
|
15362
15660
|
if (this.changeOnBlur) {
|
|
15363
15661
|
this.updateValueState(e, this.value, tempValues);
|
|
@@ -16160,6 +16458,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
16160
16458
|
}
|
|
16161
16459
|
this.checkSelectAll();
|
|
16162
16460
|
this.refreshPopup();
|
|
16461
|
+
if (this.allowResize) {
|
|
16462
|
+
this.setResize();
|
|
16463
|
+
}
|
|
16163
16464
|
if (this.hideSelectedItem) {
|
|
16164
16465
|
this.focusAtFirstListItem();
|
|
16165
16466
|
}
|
|
@@ -16674,6 +16975,22 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
16674
16975
|
EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
|
|
16675
16976
|
}
|
|
16676
16977
|
}
|
|
16978
|
+
resizingWireEvent() {
|
|
16979
|
+
// Mouse events
|
|
16980
|
+
EventHandler.add(document, 'mousemove', this.resizePopup, this);
|
|
16981
|
+
EventHandler.add(document, 'mouseup', this.stopResizing, this);
|
|
16982
|
+
// Touch events
|
|
16983
|
+
EventHandler.add(document, 'touchmove', this.resizePopup, this);
|
|
16984
|
+
EventHandler.add(document, 'touchend', this.stopResizing, this);
|
|
16985
|
+
}
|
|
16986
|
+
resizingUnWireEvent() {
|
|
16987
|
+
// Mouse events
|
|
16988
|
+
EventHandler.remove(document, 'mousemove', this.resizePopup);
|
|
16989
|
+
EventHandler.remove(document, 'mouseup', this.stopResizing);
|
|
16990
|
+
// Touch events
|
|
16991
|
+
EventHandler.remove(document, 'touchmove', this.resizePopup);
|
|
16992
|
+
EventHandler.remove(document, 'touchend', this.stopResizing);
|
|
16993
|
+
}
|
|
16677
16994
|
selectAllItem(state, event, list) {
|
|
16678
16995
|
let li;
|
|
16679
16996
|
if (!isNullOrUndefined(this.list)) {
|
|
@@ -17195,6 +17512,20 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
17195
17512
|
this.enableRTL(newProp.enableRtl);
|
|
17196
17513
|
super.onPropertyChanged(newProp, oldProp);
|
|
17197
17514
|
break;
|
|
17515
|
+
case 'allowResize':
|
|
17516
|
+
this.allowResize = newProp.allowResize;
|
|
17517
|
+
if (!this.allowResize && this.popupObj) {
|
|
17518
|
+
const overAllHeight = parseInt(this.popupHeight, 10);
|
|
17519
|
+
if (this.popupHeight !== 'auto') {
|
|
17520
|
+
this.list.style.maxHeight = formatUnit(overAllHeight);
|
|
17521
|
+
this.popupWrapper.style.height = formatUnit(this.popupHeight);
|
|
17522
|
+
this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight);
|
|
17523
|
+
}
|
|
17524
|
+
else {
|
|
17525
|
+
this.list.style.maxHeight = formatUnit(this.popupHeight);
|
|
17526
|
+
}
|
|
17527
|
+
}
|
|
17528
|
+
break;
|
|
17198
17529
|
case 'readonly':
|
|
17199
17530
|
this.updateReadonly(newProp.readonly);
|
|
17200
17531
|
this.hidePopup();
|
|
@@ -17437,6 +17768,24 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
17437
17768
|
if (this.mode === 'CheckBox' && this.showSelectAll) {
|
|
17438
17769
|
EventHandler.remove(this.popupObj.element, 'click', this.clickHandler);
|
|
17439
17770
|
}
|
|
17771
|
+
if (this.list && this.list.parentElement && this.allowResize) {
|
|
17772
|
+
if (this.resizer && this.list.parentElement.contains(this.resizer)) {
|
|
17773
|
+
this.list.parentElement.removeChild(this.resizer);
|
|
17774
|
+
}
|
|
17775
|
+
if (this.list.parentElement.classList.contains('e-resize')) {
|
|
17776
|
+
this.list.parentElement.classList.remove('e-resize');
|
|
17777
|
+
}
|
|
17778
|
+
this.list.parentElement.style.boxSizing = '';
|
|
17779
|
+
this.list.parentElement.style.paddingBottom = '';
|
|
17780
|
+
const overAllHeight = parseInt(this.popupHeight, 10);
|
|
17781
|
+
this.list.style.maxHeight = formatUnit(overAllHeight);
|
|
17782
|
+
this.list.parentElement.style.height = formatUnit(this.popupHeight);
|
|
17783
|
+
this.list.parentElement.style.maxHeight = formatUnit(this.popupHeight);
|
|
17784
|
+
}
|
|
17785
|
+
if (this.resizer) {
|
|
17786
|
+
EventHandler.remove(this.resizer, 'mousedown', this.startResizing);
|
|
17787
|
+
this.resizer.remove();
|
|
17788
|
+
}
|
|
17440
17789
|
if (this.enableVirtualization && this.mode === 'CheckBox' && this.value && this.value.length > 0 &&
|
|
17441
17790
|
this.enableSelectionOrder) {
|
|
17442
17791
|
this.viewPortInfo.startIndex = this.virtualItemStartIndex = 0;
|
|
@@ -17552,6 +17901,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
17552
17901
|
}
|
|
17553
17902
|
}
|
|
17554
17903
|
}
|
|
17904
|
+
if (this.allowResize) {
|
|
17905
|
+
this.setResize();
|
|
17906
|
+
}
|
|
17555
17907
|
this.preventSetCurrentData = true;
|
|
17556
17908
|
}
|
|
17557
17909
|
});
|
|
@@ -17736,6 +18088,102 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
17736
18088
|
}
|
|
17737
18089
|
this.renderComplete();
|
|
17738
18090
|
}
|
|
18091
|
+
setResize() {
|
|
18092
|
+
const resizePaddingBottom = 16;
|
|
18093
|
+
if (this.list && this.list.parentElement && isNullOrUndefined(this.list.parentElement.querySelector('.e-resizer-right.e-icons'))) {
|
|
18094
|
+
this.resizer = this.createElement('div', {
|
|
18095
|
+
id: this.element.id + '_resize-popup',
|
|
18096
|
+
className: RESIZE_ICON
|
|
18097
|
+
});
|
|
18098
|
+
}
|
|
18099
|
+
if (this.mode === 'CheckBox' && this.showSelectAll && this.selectAllHeight && this.selectAllHeight !== 0) {
|
|
18100
|
+
this.storedSelectAllHeight = this.selectAllHeight;
|
|
18101
|
+
}
|
|
18102
|
+
if (this.list && this.list.parentElement) {
|
|
18103
|
+
this.list.parentElement.classList.add('e-resize');
|
|
18104
|
+
if (this.popupHeight.toString().toLowerCase() !== 'auto') {
|
|
18105
|
+
this.list.parentElement.style.height = '100%';
|
|
18106
|
+
}
|
|
18107
|
+
this.list.parentElement.style.boxSizing = 'border-box'; // Ensures padding doesn't affect element size
|
|
18108
|
+
const paddingBottom = this.mode === 'CheckBox' && this.searchBoxHeight ? this.searchBoxHeight + resizePaddingBottom + (this.showSelectAll ? this.storedSelectAllHeight : 0) : resizePaddingBottom;
|
|
18109
|
+
this.list.parentElement.style.paddingBottom = `${paddingBottom}px`;
|
|
18110
|
+
this.list.parentElement.appendChild(this.resizer);
|
|
18111
|
+
this.list.parentElement.style.width = this.resizeWidth + 'px';
|
|
18112
|
+
this.list.parentElement.style.height = this.resizeHeight + 'px';
|
|
18113
|
+
this.list.parentElement.style.maxHeight = this.resizeHeight + 'px';
|
|
18114
|
+
this.list.style.maxHeight = `${this.resizeHeight}px`;
|
|
18115
|
+
}
|
|
18116
|
+
if (this.resizer) {
|
|
18117
|
+
EventHandler.add(this.resizer, 'mousedown', this.startResizing, this);
|
|
18118
|
+
EventHandler.add(this.resizer, 'touchstart', this.startResizing, this);
|
|
18119
|
+
}
|
|
18120
|
+
}
|
|
18121
|
+
startResizing(event) {
|
|
18122
|
+
this.isResizing = true;
|
|
18123
|
+
this.trigger('resizeStart', event);
|
|
18124
|
+
// Get initial touch or mouse coordinates
|
|
18125
|
+
const clientX = (event instanceof MouseEvent) ? event.clientX : event.touches[0].clientX;
|
|
18126
|
+
const clientY = (event instanceof MouseEvent) ? event.clientY : event.touches[0].clientY;
|
|
18127
|
+
if (this.list && this.list.parentElement) {
|
|
18128
|
+
this.originalWidth = this.list.parentElement.offsetWidth;
|
|
18129
|
+
this.originalHeight = this.list.parentElement.offsetHeight;
|
|
18130
|
+
this.originalMouseX = clientX;
|
|
18131
|
+
this.originalMouseY = clientY;
|
|
18132
|
+
}
|
|
18133
|
+
this.resizingWireEvent();
|
|
18134
|
+
// Prevent default behavior like text selection
|
|
18135
|
+
if (event) {
|
|
18136
|
+
event.preventDefault();
|
|
18137
|
+
}
|
|
18138
|
+
}
|
|
18139
|
+
resizePopup(event) {
|
|
18140
|
+
if (!this.isResizing) {
|
|
18141
|
+
return;
|
|
18142
|
+
}
|
|
18143
|
+
this.trigger('resizing', event);
|
|
18144
|
+
// Get the current touch or mouse position
|
|
18145
|
+
const clientX = (event instanceof MouseEvent) ? event.clientX : event.touches[0].clientX;
|
|
18146
|
+
const clientY = (event instanceof MouseEvent) ? event.clientY : event.touches[0].clientY;
|
|
18147
|
+
// Calculate the new width and height based on drag
|
|
18148
|
+
const dx = clientX - this.originalMouseX;
|
|
18149
|
+
const dy = clientY - this.originalMouseY;
|
|
18150
|
+
// Set minimum width and height (100px)
|
|
18151
|
+
const minWidth = 100;
|
|
18152
|
+
const minHeight = 130;
|
|
18153
|
+
// Ensure the new width and height are not smaller than the minimum
|
|
18154
|
+
this.resizeWidth = Math.max(this.originalWidth + dx, minWidth);
|
|
18155
|
+
this.resizeHeight = Math.max(this.originalHeight + dy, minHeight);
|
|
18156
|
+
if (this.list && this.list.parentElement) {
|
|
18157
|
+
// Set minimum width and height (100px)
|
|
18158
|
+
let minWidth = parseInt(window.getComputedStyle(this.list.parentElement).minWidth, 10);
|
|
18159
|
+
let minHeight = parseInt(window.getComputedStyle(this.list.parentElement).minHeight, 10);
|
|
18160
|
+
minWidth = minWidth || 100;
|
|
18161
|
+
minHeight = minHeight || 120;
|
|
18162
|
+
// Ensure the new width and height are not smaller than the minimum
|
|
18163
|
+
this.resizeWidth = Math.max(this.originalWidth + dx, minWidth);
|
|
18164
|
+
this.resizeHeight = Math.max(this.originalHeight + dy, minHeight);
|
|
18165
|
+
this.list.parentElement.style.width = `${this.resizeWidth}px`;
|
|
18166
|
+
this.list.parentElement.style.height = `${this.resizeHeight}px`;
|
|
18167
|
+
this.list.parentElement.style.maxHeight = `${this.resizeHeight}px`;
|
|
18168
|
+
this.list.style.maxHeight = `${this.resizeHeight}px`;
|
|
18169
|
+
if (this.fixedHeaderElement && this.ulElement) {
|
|
18170
|
+
this.fixedHeaderElement.style.width = `${this.ulElement.offsetWidth}px`;
|
|
18171
|
+
}
|
|
18172
|
+
}
|
|
18173
|
+
if (event) {
|
|
18174
|
+
event.preventDefault();
|
|
18175
|
+
}
|
|
18176
|
+
}
|
|
18177
|
+
stopResizing(event) {
|
|
18178
|
+
if (this.isResizing) {
|
|
18179
|
+
this.isResizing = false;
|
|
18180
|
+
this.trigger('resizeStop', event);
|
|
18181
|
+
this.resizingUnWireEvent();
|
|
18182
|
+
}
|
|
18183
|
+
if (event) {
|
|
18184
|
+
event.preventDefault();
|
|
18185
|
+
}
|
|
18186
|
+
}
|
|
17739
18187
|
getListHeight() {
|
|
17740
18188
|
const listParent = this.createElement('div', {
|
|
17741
18189
|
className: 'e-dropdownbase'
|
|
@@ -18121,6 +18569,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
18121
18569
|
this.inputElement = null;
|
|
18122
18570
|
this.delimiterWrapper = null;
|
|
18123
18571
|
this.liCollections = null;
|
|
18572
|
+
this.popupContentElement = null;
|
|
18124
18573
|
this.header = null;
|
|
18125
18574
|
this.mainList = null;
|
|
18126
18575
|
this.mainListCollection = null;
|
|
@@ -18231,6 +18680,9 @@ __decorate$5([
|
|
|
18231
18680
|
__decorate$5([
|
|
18232
18681
|
Property(false)
|
|
18233
18682
|
], MultiSelect.prototype, "readonly", void 0);
|
|
18683
|
+
__decorate$5([
|
|
18684
|
+
Property(false)
|
|
18685
|
+
], MultiSelect.prototype, "allowResize", void 0);
|
|
18234
18686
|
__decorate$5([
|
|
18235
18687
|
Property(null)
|
|
18236
18688
|
], MultiSelect.prototype, "text", void 0);
|
|
@@ -18312,6 +18764,15 @@ __decorate$5([
|
|
|
18312
18764
|
__decorate$5([
|
|
18313
18765
|
Event()
|
|
18314
18766
|
], MultiSelect.prototype, "chipSelection", void 0);
|
|
18767
|
+
__decorate$5([
|
|
18768
|
+
Event()
|
|
18769
|
+
], MultiSelect.prototype, "resizeStop", void 0);
|
|
18770
|
+
__decorate$5([
|
|
18771
|
+
Event()
|
|
18772
|
+
], MultiSelect.prototype, "resizing", void 0);
|
|
18773
|
+
__decorate$5([
|
|
18774
|
+
Event()
|
|
18775
|
+
], MultiSelect.prototype, "resizeStart", void 0);
|
|
18315
18776
|
__decorate$5([
|
|
18316
18777
|
Event()
|
|
18317
18778
|
], MultiSelect.prototype, "filtering", void 0);
|
|
@@ -19029,7 +19490,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
19029
19490
|
new Sortable(this.ulElement, {
|
|
19030
19491
|
scope: this.scope,
|
|
19031
19492
|
itemClass: 'e-list-item',
|
|
19032
|
-
|
|
19493
|
+
beforeDragStart: this.triggerDragStart.bind(this),
|
|
19033
19494
|
drag: this.triggerDrag.bind(this),
|
|
19034
19495
|
beforeDrop: this.beforeDragEnd.bind(this),
|
|
19035
19496
|
drop: this.dragEnd.bind(this),
|
|
@@ -19277,11 +19738,11 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
19277
19738
|
}
|
|
19278
19739
|
triggerDragStart(args) {
|
|
19279
19740
|
let badge;
|
|
19280
|
-
|
|
19741
|
+
const extendedArgs = extend(this.getDragArgs(args), { dragSelected: true }, { cancel: false });
|
|
19281
19742
|
if (Browser.isIos) {
|
|
19282
19743
|
this.list.style.overflow = 'hidden';
|
|
19283
19744
|
}
|
|
19284
|
-
this.trigger('dragStart',
|
|
19745
|
+
this.trigger('dragStart', extendedArgs, (dragEventArgs) => {
|
|
19285
19746
|
this.allowDragAll = dragEventArgs.dragSelected;
|
|
19286
19747
|
if (!this.allowDragAll) {
|
|
19287
19748
|
badge = this.ulElement.getElementsByClassName('e-list-badge')[0];
|
|
@@ -19289,6 +19750,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
19289
19750
|
detach(badge);
|
|
19290
19751
|
}
|
|
19291
19752
|
}
|
|
19753
|
+
if (dragEventArgs.cancel) {
|
|
19754
|
+
args.cancel = true;
|
|
19755
|
+
}
|
|
19292
19756
|
});
|
|
19293
19757
|
}
|
|
19294
19758
|
triggerDrag(args) {
|
|
@@ -19517,7 +19981,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
19517
19981
|
listObj.liCollections = liColl;
|
|
19518
19982
|
listObj.jsonData = extend([], [], jsonData, false);
|
|
19519
19983
|
listObj.listData = extend([], [], listData, false);
|
|
19520
|
-
listObj.
|
|
19984
|
+
if (listObj.sortOrder === 'None') {
|
|
19985
|
+
listObj.sortedData = extend([], [], sortedData, false);
|
|
19986
|
+
}
|
|
19521
19987
|
if (this.listData.length === 0) {
|
|
19522
19988
|
this.l10nUpdate();
|
|
19523
19989
|
}
|
|
@@ -21822,6 +22288,9 @@ let Mention = class Mention extends DropDownBase {
|
|
|
21822
22288
|
this.hidePopup();
|
|
21823
22289
|
this.lineBreak = true;
|
|
21824
22290
|
}
|
|
22291
|
+
else if ((e.key === 'Backspace' || e.key === 'Delete') && this.range && this.range.startOffset !== this.range.endOffset) {
|
|
22292
|
+
this.range.deleteContents();
|
|
22293
|
+
}
|
|
21825
22294
|
return;
|
|
21826
22295
|
}
|
|
21827
22296
|
if (lastWordRange.includes(this.mentionChar)) {
|
|
@@ -22593,7 +23062,9 @@ let Mention = class Mention extends DropDownBase {
|
|
|
22593
23062
|
}
|
|
22594
23063
|
scrollTop() {
|
|
22595
23064
|
if (!isNullOrUndefined(this.selectedLI)) {
|
|
22596
|
-
let nextOffset = this.
|
|
23065
|
+
let nextOffset = !isNullOrUndefined(this.fields.groupBy) && !isNullOrUndefined(this.fixedHeaderElement) ?
|
|
23066
|
+
this.selectedLI.offsetTop - (this.list.scrollTop + this.fixedHeaderElement.offsetHeight) :
|
|
23067
|
+
this.selectedLI.offsetTop - this.list.scrollTop;
|
|
22597
23068
|
nextOffset = this.fields.groupBy && nextOffset;
|
|
22598
23069
|
const boxRange = (this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop);
|
|
22599
23070
|
if (this.activeIndex === 0) {
|