@syncfusion/ej2-dropdowns 27.2.5 → 28.1.33
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 +495 -37
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +494 -35
- 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 +1 -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 +44 -1
- package/src/drop-down-list/drop-down-list.js +202 -13
- 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 +30 -0
- package/styles/bootstrap5-dark.css +30 -0
- package/styles/bootstrap5-lite.css +30 -0
- package/styles/bootstrap5.3-lite.css +30 -3
- package/styles/bootstrap5.3.css +30 -3
- package/styles/bootstrap5.css +30 -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 +455 -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 +30 -1
- package/styles/fluent-dark.css +30 -1
- package/styles/fluent-lite.css +30 -1
- package/styles/fluent.css +30 -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 +27 -2
- 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 +13 -0
- package/styles/multi-select/bootstrap5.3.css +13 -0
- package/styles/multi-select/bootstrap5.css +13 -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 +13 -0
- package/styles/multi-select/fluent.css +13 -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 +2889 -0
- package/styles/tailwind3-lite.scss +28 -0
- package/styles/tailwind3.css +3550 -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
|
var listItems = items;
|
|
137
137
|
ignoreCase = ignoreCase !== undefined && ignoreCase !== null ? ignoreCase : true;
|
|
138
138
|
var itemData = { item: null, index: null };
|
|
@@ -158,6 +158,10 @@ function Search(inputVal, items, searchType, ignoreCase, dataSource, fields, typ
|
|
|
158
158
|
}
|
|
159
159
|
var 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;
|
|
@@ -746,7 +750,8 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
746
750
|
direction: direction, sentinelInfo: info, offsets: e,
|
|
747
751
|
startIndex: this.parent.previousStartIndex, endIndex: this.parent.previousEndIndex
|
|
748
752
|
};
|
|
749
|
-
var vHeight = this.parent.popupContentElement
|
|
753
|
+
var vHeight = this.parent.popupContentElement ?
|
|
754
|
+
this.parent.popupContentElement.getBoundingClientRect().height : 0;
|
|
750
755
|
//Row Start and End Index calculation
|
|
751
756
|
var rowHeight = this.parent.listItemHeight;
|
|
752
757
|
var exactTopIndex = e.top / rowHeight;
|
|
@@ -1863,7 +1868,13 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1863
1868
|
var focusItem = this.fields.disabled ? listElement.querySelector('.' + dropDownBaseClasses.li + ':not(.e-disabled') : listElement.querySelector('.' + dropDownBaseClasses.li);
|
|
1864
1869
|
var selectedItem = listElement.querySelector('.' + dropDownBaseClasses.selected);
|
|
1865
1870
|
if (focusItem && !selectedItem) {
|
|
1866
|
-
|
|
1871
|
+
if (this.isVirtualizationEnabled && this.viewPortInfo.startIndex !== 0) {
|
|
1872
|
+
var elements = this.ulElement.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
|
|
1873
|
+
focusItem = elements && elements.length > 0 ? elements[2] : focusItem;
|
|
1874
|
+
}
|
|
1875
|
+
if (focusItem) {
|
|
1876
|
+
focusItem.classList.add(dropDownBaseClasses.focus);
|
|
1877
|
+
}
|
|
1867
1878
|
}
|
|
1868
1879
|
if (list.length <= 0) {
|
|
1869
1880
|
this.l10nUpdate();
|
|
@@ -2079,6 +2090,12 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2079
2090
|
new DataManager(dataSource).executeLocal(new Query().take(100))
|
|
2080
2091
|
: dataSource;
|
|
2081
2092
|
ulElement = this.templateListItem((this.getModuleName() === 'autocomplete') ? spliceData : dataSource, fields);
|
|
2093
|
+
if (this.isIncrementalRequest) {
|
|
2094
|
+
this.incrementalLiCollections = ulElement.querySelectorAll('.' + dropDownBaseClasses.li);
|
|
2095
|
+
this.incrementalUlElement = ulElement;
|
|
2096
|
+
this.incrementalListData = listData;
|
|
2097
|
+
return ulElement;
|
|
2098
|
+
}
|
|
2082
2099
|
if (this.isVirtualizationEnabled) {
|
|
2083
2100
|
var oldUlElement = this.list.querySelector('.e-list-parent');
|
|
2084
2101
|
var virtualUlElement = this.list.querySelector('.e-virtual-ddl-content');
|
|
@@ -2366,7 +2383,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2366
2383
|
updateData.dataSource = this.dataSource;
|
|
2367
2384
|
}
|
|
2368
2385
|
if (this.getModuleName() === 'listbox') {
|
|
2369
|
-
if (!this.isReact || (this.isReact && !isNullOrUndefined(newProp.dataSource))) {
|
|
2386
|
+
if (!this.isReact || (this.isReact && (!isNullOrUndefined(newProp.dataSource) || !isNullOrUndefined(newProp.sortOrder)))) {
|
|
2370
2387
|
this.updateDataSource(updateData, oldProp);
|
|
2371
2388
|
}
|
|
2372
2389
|
}
|
|
@@ -2859,6 +2876,7 @@ var dropDownListClasses = {
|
|
|
2859
2876
|
backIcon: 'e-input-group-icon e-back-icon e-icons',
|
|
2860
2877
|
filterBarClearIcon: 'e-input-group-icon e-clear-icon e-icons',
|
|
2861
2878
|
filterInput: 'e-input-filter',
|
|
2879
|
+
resizeIcon: 'e-resizer-right e-icons',
|
|
2862
2880
|
filterParent: 'e-filter-parent',
|
|
2863
2881
|
mobileFilter: 'e-ddl-device-filter',
|
|
2864
2882
|
footer: 'e-ddl-footer',
|
|
@@ -2901,6 +2919,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2901
2919
|
_this.isTouched = false;
|
|
2902
2920
|
_this.isFocused = false;
|
|
2903
2921
|
_this.autoFill = false;
|
|
2922
|
+
_this.isUpdateHeaderHeight = false;
|
|
2923
|
+
_this.isUpdateFooterHeight = false;
|
|
2904
2924
|
return _this;
|
|
2905
2925
|
}
|
|
2906
2926
|
/**
|
|
@@ -3043,6 +3063,10 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3043
3063
|
(this.allowObjectBinding && this.previousValue &&
|
|
3044
3064
|
this.isObjectInArray(this.previousValue, [this.allowCustom ? this.value ? this.value : dataItem :
|
|
3045
3065
|
dataItem.value ? this.getDataByValue(dataItem.value) : dataItem]))) {
|
|
3066
|
+
this.checkAndResetCache();
|
|
3067
|
+
if (this.enableVirtualization && this.list) {
|
|
3068
|
+
this.updateInitialData();
|
|
3069
|
+
}
|
|
3046
3070
|
return;
|
|
3047
3071
|
}
|
|
3048
3072
|
this.onChangeEvent(e);
|
|
@@ -3359,6 +3383,22 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3359
3383
|
this.updateIconState();
|
|
3360
3384
|
this.isFocused = true;
|
|
3361
3385
|
};
|
|
3386
|
+
DropDownList.prototype.resizingWireEvent = function () {
|
|
3387
|
+
// Mouse events
|
|
3388
|
+
EventHandler.add(document, 'mousemove', this.resizePopup, this);
|
|
3389
|
+
EventHandler.add(document, 'mouseup', this.stopResizing, this);
|
|
3390
|
+
// Touch events
|
|
3391
|
+
EventHandler.add(document, 'touchmove', this.resizePopup, this);
|
|
3392
|
+
EventHandler.add(document, 'touchend', this.stopResizing, this);
|
|
3393
|
+
};
|
|
3394
|
+
DropDownList.prototype.resizingUnWireEvent = function () {
|
|
3395
|
+
// Mouse events
|
|
3396
|
+
EventHandler.remove(document, 'mousemove', this.resizePopup);
|
|
3397
|
+
EventHandler.remove(document, 'mouseup', this.stopResizing);
|
|
3398
|
+
// Touch events
|
|
3399
|
+
EventHandler.remove(document, 'touchmove', this.resizePopup);
|
|
3400
|
+
EventHandler.remove(document, 'touchend', this.stopResizing);
|
|
3401
|
+
};
|
|
3362
3402
|
DropDownList.prototype.resetValueHandler = function (e) {
|
|
3363
3403
|
var formElement = closest(this.inputElement, 'form');
|
|
3364
3404
|
if (formElement && e.target === formElement) {
|
|
@@ -3453,6 +3493,68 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3453
3493
|
this.incrementalSearch(e);
|
|
3454
3494
|
}
|
|
3455
3495
|
};
|
|
3496
|
+
DropDownList.prototype.startResizing = function (event) {
|
|
3497
|
+
this.isResizing = true;
|
|
3498
|
+
this.trigger('resizeStart', event);
|
|
3499
|
+
// Get initial touch or mouse coordinates
|
|
3500
|
+
var clientX = (event instanceof MouseEvent) ? event.clientX : event.touches[0].clientX;
|
|
3501
|
+
var clientY = (event instanceof MouseEvent) ? event.clientY : event.touches[0].clientY;
|
|
3502
|
+
// Store the initial dimensions of the popup
|
|
3503
|
+
if (this.list && this.list.parentElement) {
|
|
3504
|
+
this.originalWidth = this.list.parentElement.offsetWidth;
|
|
3505
|
+
this.originalHeight = this.list.parentElement.offsetHeight;
|
|
3506
|
+
this.originalMouseX = clientX;
|
|
3507
|
+
this.originalMouseY = clientY;
|
|
3508
|
+
}
|
|
3509
|
+
// Wire up events for resizing
|
|
3510
|
+
this.resizingWireEvent();
|
|
3511
|
+
if (event) {
|
|
3512
|
+
event.preventDefault(); // Prevent selection behavior if event exists
|
|
3513
|
+
}
|
|
3514
|
+
};
|
|
3515
|
+
DropDownList.prototype.resizePopup = function (event) {
|
|
3516
|
+
if (!this.isResizing) {
|
|
3517
|
+
return;
|
|
3518
|
+
}
|
|
3519
|
+
this.trigger('resizing', event);
|
|
3520
|
+
// Get the current touch or mouse position
|
|
3521
|
+
var clientX = (event instanceof MouseEvent) ? event.clientX : event.touches[0].clientX;
|
|
3522
|
+
var clientY = (event instanceof MouseEvent) ? event.clientY : event.touches[0].clientY;
|
|
3523
|
+
// Calculate the new width and height based on drag
|
|
3524
|
+
var dx = clientX - this.originalMouseX;
|
|
3525
|
+
var dy = clientY - this.originalMouseY;
|
|
3526
|
+
if (this.list && this.list.parentElement) {
|
|
3527
|
+
// Minimum width and height (100px)
|
|
3528
|
+
var minWidth = parseInt(window.getComputedStyle(this.list.parentElement).minWidth, 10);
|
|
3529
|
+
var minHeight = parseInt(window.getComputedStyle(this.list.parentElement).minHeight, 10);
|
|
3530
|
+
minWidth = minWidth || 100;
|
|
3531
|
+
minHeight = minHeight || 120;
|
|
3532
|
+
// Ensure the new width and height are not less than the minimum
|
|
3533
|
+
this.resizeWidth = Math.max(this.originalWidth + dx, minWidth);
|
|
3534
|
+
this.resizeHeight = Math.max(this.originalHeight + dy, minHeight);
|
|
3535
|
+
this.list.parentElement.style.width = this.resizeWidth + "px";
|
|
3536
|
+
this.list.parentElement.style.height = this.resizeHeight + "px";
|
|
3537
|
+
this.list.parentElement.style.maxHeight = this.resizeHeight + "px";
|
|
3538
|
+
this.list.style.maxHeight = this.resizeHeight + "px";
|
|
3539
|
+
if (this.fixedHeaderElement && this.ulElement) {
|
|
3540
|
+
this.fixedHeaderElement.style.width = this.ulElement.offsetWidth + "px";
|
|
3541
|
+
}
|
|
3542
|
+
}
|
|
3543
|
+
if (event) {
|
|
3544
|
+
event.preventDefault(); // Prevent selection behavior if event exists
|
|
3545
|
+
}
|
|
3546
|
+
};
|
|
3547
|
+
DropDownList.prototype.stopResizing = function (event) {
|
|
3548
|
+
if (this.isResizing) {
|
|
3549
|
+
this.isResizing = false;
|
|
3550
|
+
this.trigger('resizeStop', event);
|
|
3551
|
+
// Unwire the resize event listeners
|
|
3552
|
+
this.resizingUnWireEvent();
|
|
3553
|
+
}
|
|
3554
|
+
if (event) {
|
|
3555
|
+
event.preventDefault(); // Prevent selection behavior if event exists
|
|
3556
|
+
}
|
|
3557
|
+
};
|
|
3456
3558
|
DropDownList.prototype.onMouseClick = function (e) {
|
|
3457
3559
|
var target = e.target;
|
|
3458
3560
|
this.keyboardEvent = null;
|
|
@@ -3924,6 +4026,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3924
4026
|
}
|
|
3925
4027
|
return;
|
|
3926
4028
|
}
|
|
4029
|
+
if (!this.enableVirtualization && this.liCollections[findLi] && this.liCollections[findLi].classList.contains('e-disabled')) {
|
|
4030
|
+
return;
|
|
4031
|
+
}
|
|
3927
4032
|
this.setSelection(this.liCollections[findLi], e);
|
|
3928
4033
|
}
|
|
3929
4034
|
};
|
|
@@ -4019,6 +4124,19 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4019
4124
|
};
|
|
4020
4125
|
DropDownList.prototype.pageUpSelection = function (steps, event, isVirtualKeyAction) {
|
|
4021
4126
|
var previousItem = steps >= 0 ? this.liCollections[steps + 1] : this.liCollections[0];
|
|
4127
|
+
if (!this.enableVirtualization && previousItem && previousItem.classList.contains('e-disabled')) {
|
|
4128
|
+
var validIndex = steps >= 0 ? steps + 1 : 0;
|
|
4129
|
+
while (validIndex < this.liCollections.length) {
|
|
4130
|
+
previousItem = this.liCollections[validIndex];
|
|
4131
|
+
if (previousItem && !previousItem.classList.contains('e-disabled')) {
|
|
4132
|
+
break;
|
|
4133
|
+
}
|
|
4134
|
+
validIndex--;
|
|
4135
|
+
if (validIndex < 0) {
|
|
4136
|
+
return;
|
|
4137
|
+
}
|
|
4138
|
+
}
|
|
4139
|
+
}
|
|
4022
4140
|
if ((this.enableVirtualization && this.activeIndex == null)) {
|
|
4023
4141
|
previousItem = (this.liCollections.length >= steps && steps >= 0) ?
|
|
4024
4142
|
this.liCollections[steps + this.skeletonCount + 1] : this.liCollections[0];
|
|
@@ -4051,6 +4169,15 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4051
4169
|
DropDownList.prototype.pageDownSelection = function (steps, event, isVirtualKeyAction) {
|
|
4052
4170
|
var list = this.getItems();
|
|
4053
4171
|
var previousItem = steps <= list.length ? this.liCollections[steps - 1] : this.liCollections[list.length - 1];
|
|
4172
|
+
if (!this.enableVirtualization && previousItem && previousItem.classList.contains('e-disabled')) {
|
|
4173
|
+
while (steps >= 0 && steps < this.liCollections.length) {
|
|
4174
|
+
previousItem = steps <= list.length ? this.liCollections[steps - 1] : this.liCollections[list.length - 1];
|
|
4175
|
+
if (previousItem && !previousItem.classList.contains('e-disabled')) {
|
|
4176
|
+
break;
|
|
4177
|
+
}
|
|
4178
|
+
steps++;
|
|
4179
|
+
}
|
|
4180
|
+
}
|
|
4054
4181
|
if (this.enableVirtualization && this.skeletonCount > 0) {
|
|
4055
4182
|
steps = this.getModuleName() === 'dropdownlist' && this.allowFiltering ? steps + 1 : steps;
|
|
4056
4183
|
previousItem = steps < list.length ? this.liCollections[steps] : this.liCollections[list.length - 1];
|
|
@@ -4829,7 +4956,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4829
4956
|
var virualElement = this.createElement('div', {
|
|
4830
4957
|
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
4831
4958
|
});
|
|
4832
|
-
|
|
4959
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
4833
4960
|
}
|
|
4834
4961
|
}
|
|
4835
4962
|
}
|
|
@@ -4868,7 +4995,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4868
4995
|
var virualElement = this.createElement('div', {
|
|
4869
4996
|
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
4870
4997
|
});
|
|
4871
|
-
|
|
4998
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
4872
4999
|
}
|
|
4873
5000
|
}
|
|
4874
5001
|
}
|
|
@@ -5227,7 +5354,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5227
5354
|
};
|
|
5228
5355
|
DropDownList.prototype.updateSelectionList = function () {
|
|
5229
5356
|
var selectedItem = this.list && this.list.querySelector('.' + 'e-active');
|
|
5230
|
-
if (!selectedItem && !isNullOrUndefined(this.value)) {
|
|
5357
|
+
if (!selectedItem && !isNullOrUndefined(this.value) && this.getModuleName() !== 'autocomplete') {
|
|
5231
5358
|
var value = this.allowObjectBinding ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
|
|
5232
5359
|
var findEle = this.findListElement(this.list, 'li', 'data-value', value);
|
|
5233
5360
|
if (findEle) {
|
|
@@ -5260,10 +5387,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5260
5387
|
formatUnit(Math.round(window.outerHeight).toString() + 'px') : formatUnit(_this.popupHeight);
|
|
5261
5388
|
if (_this.headerTemplate) {
|
|
5262
5389
|
_this.setHeaderTemplate(popupEle);
|
|
5390
|
+
_this.isUpdateHeaderHeight = _this.header.offsetHeight !== 0;
|
|
5263
5391
|
}
|
|
5264
5392
|
append([_this.list], popupEle);
|
|
5265
5393
|
if (_this.footerTemplate) {
|
|
5266
5394
|
_this.setFooterTemplate(popupEle);
|
|
5395
|
+
_this.isUpdateFooterHeight = _this.footer.offsetHeight !== 0;
|
|
5267
5396
|
}
|
|
5268
5397
|
document.body.appendChild(popupEle);
|
|
5269
5398
|
popupEle.style.top = '0px';
|
|
@@ -5428,12 +5557,57 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5428
5557
|
if (!isNullOrUndefined(_this.popupObj)) {
|
|
5429
5558
|
_this.popupObj.show(new Animation(eventArgs.animation), (_this.zIndex === 1000) ? _this.element : null);
|
|
5430
5559
|
}
|
|
5560
|
+
if (_this.isReact) {
|
|
5561
|
+
setTimeout(function () {
|
|
5562
|
+
if (_this.popupHeight && _this.list && _this.popupHeight !== 'auto' && !(_this.getModuleName() === 'dropdownlist' && _this.allowFiltering)) {
|
|
5563
|
+
var popupHeightValue = typeof _this.popupHeight === 'string' ? parseInt(_this.popupHeight, 10) : _this.popupHeight;
|
|
5564
|
+
if (!_this.isUpdateHeaderHeight && _this.headerTemplate && _this.header) {
|
|
5565
|
+
var listHeight = _this.list.style.maxHeight === '' ? popupHeightValue : parseInt(_this.list.style.maxHeight, 10);
|
|
5566
|
+
_this.list.style.maxHeight = (listHeight - _this.header.offsetHeight).toString() + 'px';
|
|
5567
|
+
_this.isUpdateHeaderHeight = true;
|
|
5568
|
+
}
|
|
5569
|
+
if (!_this.isUpdateFooterHeight && _this.footerTemplate && _this.footer) {
|
|
5570
|
+
var listHeight = _this.list.style.maxHeight === '' ? popupHeightValue : parseInt(_this.list.style.maxHeight, 10);
|
|
5571
|
+
_this.list.style.maxHeight = (listHeight - _this.footer.offsetHeight).toString() + 'px';
|
|
5572
|
+
_this.isUpdateFooterHeight = true;
|
|
5573
|
+
}
|
|
5574
|
+
}
|
|
5575
|
+
}, 15);
|
|
5576
|
+
}
|
|
5431
5577
|
}
|
|
5432
5578
|
else {
|
|
5433
5579
|
_this.beforePopupOpen = false;
|
|
5434
5580
|
_this.destroyPopup();
|
|
5435
5581
|
}
|
|
5436
5582
|
});
|
|
5583
|
+
if (_this.allowResize) {
|
|
5584
|
+
var resizePaddingBottom = 16;
|
|
5585
|
+
// Create the resizer div
|
|
5586
|
+
_this.resizer = _this.createElement('div', {
|
|
5587
|
+
id: _this.element.id + '_resize-popup',
|
|
5588
|
+
className: dropDownListClasses.resizeIcon // Adding class for styling
|
|
5589
|
+
});
|
|
5590
|
+
// Add the resizer div to the popup
|
|
5591
|
+
if (_this.list && _this.list.parentElement) {
|
|
5592
|
+
_this.list.parentElement.classList.add('e-resize');
|
|
5593
|
+
if (_this.popupHeight.toString().toLowerCase() !== 'auto') {
|
|
5594
|
+
_this.list.parentElement.style.height = '100%';
|
|
5595
|
+
}
|
|
5596
|
+
_this.list.parentElement.style.paddingBottom = (_this.getModuleName() === 'dropdownlist' && _this.allowFiltering && _this.searchBoxHeight) ? (_this.searchBoxHeight + resizePaddingBottom).toString() + 'px' : resizePaddingBottom.toString() + 'px';
|
|
5597
|
+
if (_this.header || _this.footer || _this.itemTemplate) {
|
|
5598
|
+
_this.list.parentElement.style.paddingBottom = ((parseInt(_this.list.parentElement.style.maxHeight, 10) - parseInt(_this.list.style.maxHeight, 10)) + resizePaddingBottom).toString() + 'px';
|
|
5599
|
+
}
|
|
5600
|
+
_this.list.parentElement.appendChild(_this.resizer);
|
|
5601
|
+
//hold the popup resize
|
|
5602
|
+
_this.list.parentElement.style.width = _this.resizeWidth + "px";
|
|
5603
|
+
_this.list.parentElement.style.height = _this.resizeHeight + "px";
|
|
5604
|
+
_this.list.parentElement.style.maxHeight = _this.resizeHeight + "px";
|
|
5605
|
+
_this.list.style.maxHeight = _this.resizeHeight + "px";
|
|
5606
|
+
}
|
|
5607
|
+
// Attach mouse and touch events to the resizer
|
|
5608
|
+
EventHandler.add(_this.resizer, 'mousedown', _this.startResizing, _this);
|
|
5609
|
+
EventHandler.add(_this.resizer, 'touchstart', _this.startResizing, _this);
|
|
5610
|
+
}
|
|
5437
5611
|
}
|
|
5438
5612
|
else {
|
|
5439
5613
|
_this.beforePopupOpen = false;
|
|
@@ -5671,7 +5845,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5671
5845
|
}
|
|
5672
5846
|
else {
|
|
5673
5847
|
this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ?
|
|
5674
|
-
this.virtualListInfo.startIndex * this.listItemHeight
|
|
5848
|
+
isInitial && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight +
|
|
5849
|
+
(this.listItemHeight * 2) : this.virtualListInfo.startIndex * this.listItemHeight : 0;
|
|
5675
5850
|
}
|
|
5676
5851
|
isScrollerCHanged = this.isKeyBoardAction;
|
|
5677
5852
|
}
|
|
@@ -5820,15 +5995,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5820
5995
|
this.keyboardEvent = null;
|
|
5821
5996
|
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
5822
5997
|
this.isActive = false;
|
|
5823
|
-
if (this.getModuleName() === 'dropdownlist') {
|
|
5824
|
-
Input.destroy({
|
|
5825
|
-
element: this.filterInput,
|
|
5826
|
-
floatLabelType: this.floatLabelType,
|
|
5827
|
-
properties: { placeholder: this.filterBarPlaceholder },
|
|
5828
|
-
buttons: this.clearIconElement
|
|
5829
|
-
}, this.clearIconElement);
|
|
5830
|
-
}
|
|
5831
|
-
this.filterInputObj = null;
|
|
5832
5998
|
this.isDropDownClick = false;
|
|
5833
5999
|
this.preventAutoFill = false;
|
|
5834
6000
|
var scrollableParentElements = this.popupObj.getScrollableParent(this.inputWrapper.container);
|
|
@@ -5901,6 +6067,15 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5901
6067
|
var popupInstance = this.popupObj;
|
|
5902
6068
|
var eventArgs = { popup: popupInstance, cancel: false, animation: animModel, event: e || null };
|
|
5903
6069
|
this.trigger('close', eventArgs, function (eventArgs) {
|
|
6070
|
+
if (_this.getModuleName() === 'dropdownlist') {
|
|
6071
|
+
Input.destroy({
|
|
6072
|
+
element: _this.filterInput,
|
|
6073
|
+
floatLabelType: _this.floatLabelType,
|
|
6074
|
+
properties: { placeholder: _this.filterBarPlaceholder },
|
|
6075
|
+
buttons: _this.clearIconElement
|
|
6076
|
+
}, _this.clearIconElement);
|
|
6077
|
+
}
|
|
6078
|
+
_this.filterInputObj = null;
|
|
5904
6079
|
if (!isNullOrUndefined(_this.popupObj) &&
|
|
5905
6080
|
!isNullOrUndefined(_this.popupObj.element.querySelector('.e-fixed-head'))) {
|
|
5906
6081
|
var fixedHeader = _this.popupObj.element.querySelector('.e-fixed-head');
|
|
@@ -5971,6 +6146,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5971
6146
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5972
6147
|
this.list.getElementsByClassName('e-virtual-ddl')[0].style = this.GetVirtualTrackHeight();
|
|
5973
6148
|
}
|
|
6149
|
+
else if (!this.list.querySelector('.e-virtual-ddl')) {
|
|
6150
|
+
var virualElement = this.createElement('div', {
|
|
6151
|
+
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
6152
|
+
});
|
|
6153
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
6154
|
+
}
|
|
5974
6155
|
if (this.getModuleName() !== 'autocomplete' && this.totalItemCount !== 0 && this.totalItemCount > (this.itemCount * 2)) {
|
|
5975
6156
|
this.getSkeletonCount();
|
|
5976
6157
|
}
|
|
@@ -5989,6 +6170,10 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5989
6170
|
this.isFilterFocus = false;
|
|
5990
6171
|
this.inputElement.removeAttribute('aria-controls');
|
|
5991
6172
|
if (this.popupObj) {
|
|
6173
|
+
if (this.resizer) {
|
|
6174
|
+
EventHandler.remove(this.resizer, 'mousedown', this.startResizing);
|
|
6175
|
+
EventHandler.remove(this.resizer, 'touchstart', this.startResizing);
|
|
6176
|
+
}
|
|
5992
6177
|
this.popupObj.destroy();
|
|
5993
6178
|
detach(this.popupObj.element);
|
|
5994
6179
|
}
|
|
@@ -6708,6 +6893,15 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6708
6893
|
isOpen: true
|
|
6709
6894
|
});
|
|
6710
6895
|
}
|
|
6896
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
6897
|
+
var proxy = this;
|
|
6898
|
+
var duration = (this.element.tagName === this.getNgDirective() && this.itemTemplate) ? 500 : 100;
|
|
6899
|
+
if (!this.isSecondClick && this.isReact && !this.isDropDownClick && this.isFiltering() && this.itemTemplate != null) {
|
|
6900
|
+
setTimeout(function () {
|
|
6901
|
+
proxy.cloneElements();
|
|
6902
|
+
proxy.isSecondClick = true;
|
|
6903
|
+
}, duration);
|
|
6904
|
+
}
|
|
6711
6905
|
};
|
|
6712
6906
|
DropDownList.prototype.invokeRenderPopup = function (e) {
|
|
6713
6907
|
if (Browser.isDevice && this.isFilterLayout()) {
|
|
@@ -7044,6 +7238,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7044
7238
|
__decorate$1([
|
|
7045
7239
|
Property(false)
|
|
7046
7240
|
], DropDownList.prototype, "enableVirtualization", void 0);
|
|
7241
|
+
__decorate$1([
|
|
7242
|
+
Property(false)
|
|
7243
|
+
], DropDownList.prototype, "allowResize", void 0);
|
|
7047
7244
|
__decorate$1([
|
|
7048
7245
|
Property(null)
|
|
7049
7246
|
], DropDownList.prototype, "text", void 0);
|
|
@@ -7083,6 +7280,15 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7083
7280
|
__decorate$1([
|
|
7084
7281
|
Event()
|
|
7085
7282
|
], DropDownList.prototype, "focus", void 0);
|
|
7283
|
+
__decorate$1([
|
|
7284
|
+
Event()
|
|
7285
|
+
], DropDownList.prototype, "resizeStop", void 0);
|
|
7286
|
+
__decorate$1([
|
|
7287
|
+
Event()
|
|
7288
|
+
], DropDownList.prototype, "resizing", void 0);
|
|
7289
|
+
__decorate$1([
|
|
7290
|
+
Event()
|
|
7291
|
+
], DropDownList.prototype, "resizeStart", void 0);
|
|
7086
7292
|
DropDownList = __decorate$1([
|
|
7087
7293
|
NotifyPropertyChanges
|
|
7088
7294
|
], DropDownList);
|
|
@@ -10925,7 +11131,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
10925
11131
|
var inputValue = this.inputElement.value;
|
|
10926
11132
|
var dataSource = this.sortedData;
|
|
10927
11133
|
var type = this.typeOfData(dataSource).typeof;
|
|
10928
|
-
var activeItem = Search(inputValue, this.liCollections, this.filterType, true, dataSource, this.fields, type);
|
|
11134
|
+
var activeItem = Search(inputValue, this.liCollections, this.filterType, true, dataSource, this.fields, type, this.ignoreAccent);
|
|
10929
11135
|
if (this.enableVirtualization && inputValue !== '' && this.getModuleName() !== 'autocomplete' && this.isTyped && !this.allowFiltering) {
|
|
10930
11136
|
var updatingincrementalindex = false;
|
|
10931
11137
|
var isEndIndexValid = this.viewPortInfo.endIndex >= this.incrementalEndIndex &&
|
|
@@ -11902,11 +12108,11 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
|
|
|
11902
12108
|
});
|
|
11903
12109
|
this.list.appendChild(virtualElement).appendChild(this.list.querySelector('.e-list-parent'));
|
|
11904
12110
|
}
|
|
11905
|
-
if (!this.list.querySelector('.e-virtual-ddl') &&
|
|
12111
|
+
if (!this.list.querySelector('.e-virtual-ddl') && this.list.parentElement) {
|
|
11906
12112
|
var virtualElement = this.createElement('div', {
|
|
11907
12113
|
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
11908
12114
|
});
|
|
11909
|
-
|
|
12115
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virtualElement);
|
|
11910
12116
|
}
|
|
11911
12117
|
}
|
|
11912
12118
|
if ((this.getModuleName() === 'autocomplete' && !(this.dataSource instanceof DataManager)) || (this.getModuleName() === 'autocomplete' && (this.dataSource instanceof DataManager) && this.totalItemCount !== 0)) {
|
|
@@ -11941,6 +12147,9 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
|
|
|
11941
12147
|
if (!isNullOrUndefined(item)) {
|
|
11942
12148
|
removeClass([item], dropDownListClasses.focus);
|
|
11943
12149
|
}
|
|
12150
|
+
if (!isNullOrUndefined(this.itemData) && !this.enableVirtualization) {
|
|
12151
|
+
this.focusIndexItem();
|
|
12152
|
+
}
|
|
11944
12153
|
this.postBackAction();
|
|
11945
12154
|
};
|
|
11946
12155
|
AutoComplete.prototype.postBackAction = function () {
|
|
@@ -12449,6 +12658,7 @@ var BOX_ELEMENT = 'e-multiselect-box';
|
|
|
12449
12658
|
var FILTERPARENT = 'e-filter-parent';
|
|
12450
12659
|
var CUSTOM_WIDTH = 'e-search-custom-width';
|
|
12451
12660
|
var FILTERINPUT = 'e-input-filter';
|
|
12661
|
+
var RESIZE_ICON = 'e-resizer-right e-icons';
|
|
12452
12662
|
/**
|
|
12453
12663
|
* The Multiselect allows the user to pick a more than one value from list of predefined values.
|
|
12454
12664
|
* ```html
|
|
@@ -12480,6 +12690,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12480
12690
|
var _this = _super.call(this, option, element) || this;
|
|
12481
12691
|
_this.clearIconWidth = 0;
|
|
12482
12692
|
_this.previousFilterText = '';
|
|
12693
|
+
_this.storedSelectAllHeight = 0;
|
|
12694
|
+
_this.isUpdateHeaderHeight = false;
|
|
12695
|
+
_this.isUpdateFooterHeight = false;
|
|
12483
12696
|
_this.isValidKey = false;
|
|
12484
12697
|
_this.selectAllEventData = [];
|
|
12485
12698
|
_this.selectAllEventEle = [];
|
|
@@ -12630,7 +12843,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12630
12843
|
var eventArgs = { popup: this.popupObj, event: e, cancel: false, animation: animModel };
|
|
12631
12844
|
this.trigger('open', eventArgs, function (eventArgs) {
|
|
12632
12845
|
if (!eventArgs.cancel) {
|
|
12633
|
-
_this.focusAtFirstListItem();
|
|
12846
|
+
_this.focusAtFirstListItem(true);
|
|
12634
12847
|
if (_this.popupObj) {
|
|
12635
12848
|
document.body.appendChild(_this.popupObj.element);
|
|
12636
12849
|
}
|
|
@@ -12645,6 +12858,23 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12645
12858
|
if (_this.popupObj) {
|
|
12646
12859
|
_this.popupObj.show(eventArgs.animation, (_this.zIndex === 1000) ? _this.element : null);
|
|
12647
12860
|
}
|
|
12861
|
+
if (_this.isReact) {
|
|
12862
|
+
setTimeout(function () {
|
|
12863
|
+
if (_this.popupHeight && _this.list && _this.popupHeight !== 'auto') {
|
|
12864
|
+
var popupHeightValue = typeof _this.popupHeight === 'string' ? parseInt(_this.popupHeight, 10) : _this.popupHeight;
|
|
12865
|
+
if (!_this.isUpdateHeaderHeight && _this.headerTemplate && _this.header) {
|
|
12866
|
+
var listHeight = _this.list.style.maxHeight === '' ? popupHeightValue : parseInt(_this.list.style.maxHeight, 10);
|
|
12867
|
+
_this.list.style.maxHeight = (listHeight - _this.header.offsetHeight).toString() + 'px';
|
|
12868
|
+
_this.isUpdateHeaderHeight = true;
|
|
12869
|
+
}
|
|
12870
|
+
if (!_this.isUpdateFooterHeight && _this.footerTemplate && _this.footer) {
|
|
12871
|
+
var listHeight = _this.list.style.maxHeight === '' ? popupHeightValue : parseInt(_this.list.style.maxHeight, 10);
|
|
12872
|
+
_this.list.style.maxHeight = (listHeight - _this.footer.offsetHeight).toString() + 'px';
|
|
12873
|
+
_this.isUpdateFooterHeight = true;
|
|
12874
|
+
}
|
|
12875
|
+
}
|
|
12876
|
+
}, 15);
|
|
12877
|
+
}
|
|
12648
12878
|
attributes(_this.inputElement, {
|
|
12649
12879
|
'aria-expanded': 'true', 'aria-owns': _this.element.id + '_popup', 'aria-controls': _this.element.id
|
|
12650
12880
|
});
|
|
@@ -12721,16 +12951,16 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12721
12951
|
: this.value[this.value.length - 1];
|
|
12722
12952
|
var valueEle = this.findListElement((this.hideSelectedItem ? this.ulElement : this.list), 'li', 'data-value', value);
|
|
12723
12953
|
if (!isNullOrUndefined(valueEle)) {
|
|
12724
|
-
this.scrollBottom(valueEle);
|
|
12954
|
+
this.scrollBottom(valueEle, undefined, false, null, true);
|
|
12725
12955
|
}
|
|
12726
12956
|
}
|
|
12727
12957
|
if (this.enableVirtualization) {
|
|
12728
12958
|
var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
|
|
12729
12959
|
this.isKeyBoardAction = false;
|
|
12730
|
-
this.scrollBottom(focusedItem);
|
|
12960
|
+
this.scrollBottom(focusedItem, undefined, false, null, true);
|
|
12731
12961
|
}
|
|
12732
12962
|
};
|
|
12733
|
-
MultiSelect.prototype.focusAtFirstListItem = function () {
|
|
12963
|
+
MultiSelect.prototype.focusAtFirstListItem = function (isOpen) {
|
|
12734
12964
|
if (this.ulElement && this.ulElement.querySelector('li.'
|
|
12735
12965
|
+ dropDownBaseClasses.li)) {
|
|
12736
12966
|
var element = void 0;
|
|
@@ -12743,10 +12973,18 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12743
12973
|
if (this.fields.disabled) {
|
|
12744
12974
|
element = this.ulElement.querySelector('li.'
|
|
12745
12975
|
+ dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)' + ':not(.' + DISABLED$1 + ')');
|
|
12976
|
+
if (isOpen && this.viewPortInfo && this.viewPortInfo.startIndex !== 0) {
|
|
12977
|
+
var elements = this.ulElement.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
|
|
12978
|
+
element = elements && elements.length > 0 ? elements[2] : element;
|
|
12979
|
+
}
|
|
12746
12980
|
}
|
|
12747
12981
|
else {
|
|
12748
12982
|
element = this.ulElement.querySelector('li.'
|
|
12749
12983
|
+ dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
|
|
12984
|
+
if (isOpen && this.viewPortInfo && this.viewPortInfo.startIndex !== 0) {
|
|
12985
|
+
var elements = this.ulElement.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
|
|
12986
|
+
element = elements && elements.length > 0 ? elements[2] : element;
|
|
12987
|
+
}
|
|
12750
12988
|
}
|
|
12751
12989
|
}
|
|
12752
12990
|
else {
|
|
@@ -13043,7 +13281,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13043
13281
|
if (this.hideSelectedItem && element.classList.contains(dropDownBaseClasses.focus)) {
|
|
13044
13282
|
removeClass([element], dropDownBaseClasses.focus);
|
|
13045
13283
|
var listEle = element.parentElement.querySelectorAll('.' +
|
|
13046
|
-
dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')');
|
|
13284
|
+
dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.' + DISABLED$1 + ')');
|
|
13047
13285
|
if (listEle.length > 0) {
|
|
13048
13286
|
addClass([listEle[0]], dropDownBaseClasses.focus);
|
|
13049
13287
|
this.updateAriaActiveDescendant();
|
|
@@ -13212,7 +13450,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13212
13450
|
if (!(this.dataSource instanceof DataManager) && dataType === 'string' || dataType === 'number') {
|
|
13213
13451
|
filterQuery.where('', this.filterType, this.targetElement(), this.ignoreCase, this.ignoreAccent);
|
|
13214
13452
|
}
|
|
13215
|
-
else if ((this.enableVirtualization && this.targetElement() !== '') || !this.enableVirtualization) {
|
|
13453
|
+
else if ((this.enableVirtualization && this.targetElement() !== '' && !this.isClearAllAction) || !this.enableVirtualization) {
|
|
13216
13454
|
var fields = this.fields;
|
|
13217
13455
|
filterQuery.where(!isNullOrUndefined(fields.text) ? fields.text : '', this.filterType, this.targetElement(), this.ignoreCase, this.ignoreAccent);
|
|
13218
13456
|
}
|
|
@@ -13220,6 +13458,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13220
13458
|
if (this.enableVirtualization && (this.viewPortInfo.endIndex !== 0) && !this.virtualSelectAll) {
|
|
13221
13459
|
return this.virtualFilterQuery(filterQuery);
|
|
13222
13460
|
}
|
|
13461
|
+
if (this.virtualSelectAll) {
|
|
13462
|
+
return query ? query.take(this.maximumSelectionLength).requiresCount() : this.query ?
|
|
13463
|
+
this.query.take(this.maximumSelectionLength).requiresCount() :
|
|
13464
|
+
new Query().take(this.maximumSelectionLength).requiresCount();
|
|
13465
|
+
}
|
|
13223
13466
|
return filterQuery;
|
|
13224
13467
|
}
|
|
13225
13468
|
else {
|
|
@@ -13405,6 +13648,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13405
13648
|
this.getFilteringSkeletonCount();
|
|
13406
13649
|
}
|
|
13407
13650
|
this.refreshPopup();
|
|
13651
|
+
if (this.allowResize) {
|
|
13652
|
+
this.setResize();
|
|
13653
|
+
}
|
|
13408
13654
|
if (this.mode === 'CheckBox') {
|
|
13409
13655
|
this.removeFocus();
|
|
13410
13656
|
}
|
|
@@ -13738,6 +13984,15 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13738
13984
|
':not(.' + HIDE_LIST + ')' +
|
|
13739
13985
|
':not(.e-reorder-hide)');
|
|
13740
13986
|
var previousItem = steps >= 0 ? collection[steps + 1] : collection[0];
|
|
13987
|
+
if (this.fields.disabled && previousItem && !this.enableVirtualization) {
|
|
13988
|
+
while (previousItem && (previousItem.classList.contains('e-disabled') || previousItem.classList.contains(HIDE_LIST) ||
|
|
13989
|
+
previousItem.classList.contains('.e-reorder-hide') || previousItem.classList.contains('e-list-group-item'))) {
|
|
13990
|
+
previousItem = previousItem.previousElementSibling;
|
|
13991
|
+
}
|
|
13992
|
+
if (!previousItem) {
|
|
13993
|
+
return;
|
|
13994
|
+
}
|
|
13995
|
+
}
|
|
13741
13996
|
if (this.enableVirtualization && isVirtualKeyAction) {
|
|
13742
13997
|
previousItem = (this.liCollections.length >= steps && steps >= 0)
|
|
13743
13998
|
? this.liCollections[steps]
|
|
@@ -13769,6 +14024,15 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13769
14024
|
var collection = this.list.querySelectorAll('li.'
|
|
13770
14025
|
+ dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
|
|
13771
14026
|
var previousItem = steps <= collection.length ? collection[steps - 1] : collection[collection.length - 1];
|
|
14027
|
+
if (this.fields.disabled && previousItem && !this.enableVirtualization) {
|
|
14028
|
+
while (previousItem && (previousItem.classList.contains('e-disabled') || previousItem.classList.contains(HIDE_LIST) ||
|
|
14029
|
+
previousItem.classList.contains('.e-reorder-hide') || previousItem.classList.contains('e-list-group-item'))) {
|
|
14030
|
+
previousItem = previousItem.nextElementSibling;
|
|
14031
|
+
}
|
|
14032
|
+
if (!previousItem) {
|
|
14033
|
+
return;
|
|
14034
|
+
}
|
|
14035
|
+
}
|
|
13772
14036
|
if (this.enableVirtualization && this.skeletonCount > 0) {
|
|
13773
14037
|
previousItem = steps < list.length ? this.liCollections[steps] : this.liCollections[list.length - 1];
|
|
13774
14038
|
}
|
|
@@ -13820,6 +14084,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13820
14084
|
if (this.isPopupOpen()) {
|
|
13821
14085
|
this.refreshPopup();
|
|
13822
14086
|
}
|
|
14087
|
+
if (this.allowResize) {
|
|
14088
|
+
this.setResize();
|
|
14089
|
+
}
|
|
13823
14090
|
setTimeout(function () {
|
|
13824
14091
|
_this.calculateWidth();
|
|
13825
14092
|
}, 150);
|
|
@@ -14056,6 +14323,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14056
14323
|
if (this.mode === 'CheckBox') {
|
|
14057
14324
|
this.inputElement.focus();
|
|
14058
14325
|
}
|
|
14326
|
+
this.isKeyBoardAction = false;
|
|
14059
14327
|
return;
|
|
14060
14328
|
case 13:
|
|
14061
14329
|
e.preventDefault();
|
|
@@ -14064,10 +14332,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14064
14332
|
this.selectByKey(e);
|
|
14065
14333
|
}
|
|
14066
14334
|
this.checkPlaceholderSize();
|
|
14335
|
+
this.isKeyBoardAction = false;
|
|
14067
14336
|
return;
|
|
14068
14337
|
case 32:
|
|
14069
14338
|
this.isKeyBoardAction = true;
|
|
14070
14339
|
this.spaceKeySelection(e);
|
|
14340
|
+
this.isKeyBoardAction = false;
|
|
14071
14341
|
return;
|
|
14072
14342
|
case 9:
|
|
14073
14343
|
e.preventDefault();
|
|
@@ -14109,6 +14379,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14109
14379
|
if (!(this.mode === 'CheckBox' && this.showSelectAll)) {
|
|
14110
14380
|
this.refreshPopup();
|
|
14111
14381
|
}
|
|
14382
|
+
if (this.allowResize) {
|
|
14383
|
+
this.setResize();
|
|
14384
|
+
}
|
|
14112
14385
|
this.isKeyBoardAction = false;
|
|
14113
14386
|
};
|
|
14114
14387
|
MultiSelect.prototype.arrowDown = function (e, isVirtualKeyAction) {
|
|
@@ -14233,9 +14506,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14233
14506
|
}
|
|
14234
14507
|
this.makeTextBoxEmpty();
|
|
14235
14508
|
};
|
|
14236
|
-
MultiSelect.prototype.scrollBottom = function (selectedLI, activeIndex, isInitialSelection, keyCode) {
|
|
14509
|
+
MultiSelect.prototype.scrollBottom = function (selectedLI, activeIndex, isInitialSelection, keyCode, isInitial) {
|
|
14237
14510
|
if (isInitialSelection === void 0) { isInitialSelection = false; }
|
|
14238
14511
|
if (keyCode === void 0) { keyCode = null; }
|
|
14512
|
+
if (isInitial === void 0) { isInitial = false; }
|
|
14239
14513
|
if ((!isNullOrUndefined(selectedLI) && selectedLI.classList.contains('e-virtual-list')) ||
|
|
14240
14514
|
(this.enableVirtualization && isNullOrUndefined(selectedLI))) {
|
|
14241
14515
|
selectedLI = this.liCollections[this.skeletonCount];
|
|
@@ -14289,8 +14563,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14289
14563
|
}
|
|
14290
14564
|
}
|
|
14291
14565
|
else {
|
|
14292
|
-
this.list.scrollTop = this.virtualListInfo &&
|
|
14293
|
-
this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight
|
|
14566
|
+
this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ?
|
|
14567
|
+
isInitial && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight +
|
|
14568
|
+
(this.listItemHeight * 2) : this.virtualListInfo.startIndex * this.listItemHeight : 0;
|
|
14294
14569
|
}
|
|
14295
14570
|
isScrollerCHanged = this.isKeyBoardAction;
|
|
14296
14571
|
}
|
|
@@ -14492,6 +14767,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14492
14767
|
this.getDataByValue(this.getFormattedValue(selectedElem.getAttribute('data-value'))) :
|
|
14493
14768
|
selectedElem.getAttribute('data-value');
|
|
14494
14769
|
this.removeValue(currentChip, e);
|
|
14770
|
+
this.updateDelimeter(this.delimiterChar, e);
|
|
14495
14771
|
this.makeTextBoxEmpty();
|
|
14496
14772
|
}
|
|
14497
14773
|
if (this.closePopupOnSelect) {
|
|
@@ -14614,7 +14890,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14614
14890
|
return;
|
|
14615
14891
|
}
|
|
14616
14892
|
var index = this.getIndexByValue(focusedLi.getAttribute('data-value'));
|
|
14617
|
-
if (index === 0
|
|
14893
|
+
if (index === 0) {
|
|
14618
14894
|
position = 1;
|
|
14619
14895
|
}
|
|
14620
14896
|
if (index === (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem)').length - 1)) {
|
|
@@ -15270,6 +15546,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15270
15546
|
if (this.headerTemplate) {
|
|
15271
15547
|
this.setHeaderTemplate();
|
|
15272
15548
|
overAllHeight -= this.header.offsetHeight;
|
|
15549
|
+
this.isUpdateHeaderHeight = this.header.offsetHeight !== 0;
|
|
15273
15550
|
}
|
|
15274
15551
|
append([this.list], this.popupWrapper);
|
|
15275
15552
|
if (!this.list.classList.contains(dropDownBaseClasses.noData) && this.getItems()[1]) {
|
|
@@ -15307,6 +15584,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15307
15584
|
if (this.footerTemplate) {
|
|
15308
15585
|
this.setFooterTemplate();
|
|
15309
15586
|
overAllHeight -= this.footer.offsetHeight;
|
|
15587
|
+
this.isUpdateFooterHeight = this.footer.offsetHeight !== 0;
|
|
15310
15588
|
}
|
|
15311
15589
|
if (this.mode === 'CheckBox' && this.showSelectAll) {
|
|
15312
15590
|
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
@@ -15424,6 +15702,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15424
15702
|
if (this.mode === 'CheckBox' && Browser.isDevice && this.allowFiltering && this.isDeviceFullScreen) {
|
|
15425
15703
|
this.notify('deviceSearchBox', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
15426
15704
|
}
|
|
15705
|
+
if (this.allowResize) {
|
|
15706
|
+
this.setResize();
|
|
15707
|
+
}
|
|
15427
15708
|
this.popupObj.close();
|
|
15428
15709
|
this.popupWrapper.style.visibility = '';
|
|
15429
15710
|
}
|
|
@@ -15547,6 +15828,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15547
15828
|
if (this.enabled && !this.readonly) {
|
|
15548
15829
|
var temp = void 0;
|
|
15549
15830
|
this.setDynValue = false;
|
|
15831
|
+
this.isClearAllAction = true;
|
|
15550
15832
|
if (this.value && this.value.length > 0) {
|
|
15551
15833
|
if (this.allowFiltering) {
|
|
15552
15834
|
this.refreshListItems(null);
|
|
@@ -15593,6 +15875,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15593
15875
|
this.previousStartIndex = 0;
|
|
15594
15876
|
this.previousEndIndex = 0;
|
|
15595
15877
|
}
|
|
15878
|
+
this.isClearAllAction = false;
|
|
15596
15879
|
}
|
|
15597
15880
|
this.isClearAllItem = true;
|
|
15598
15881
|
EventHandler.add(document, 'mouseup', this.preventSelection, this);
|
|
@@ -15623,6 +15906,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15623
15906
|
if (this.isPopupOpen()) {
|
|
15624
15907
|
this.refreshPopup();
|
|
15625
15908
|
}
|
|
15909
|
+
if (this.allowResize) {
|
|
15910
|
+
this.setResize();
|
|
15911
|
+
}
|
|
15626
15912
|
if (!this.inputFocus) {
|
|
15627
15913
|
if (this.changeOnBlur) {
|
|
15628
15914
|
this.updateValueState(e, this.value, tempValues);
|
|
@@ -16437,6 +16723,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16437
16723
|
}
|
|
16438
16724
|
this.checkSelectAll();
|
|
16439
16725
|
this.refreshPopup();
|
|
16726
|
+
if (this.allowResize) {
|
|
16727
|
+
this.setResize();
|
|
16728
|
+
}
|
|
16440
16729
|
if (this.hideSelectedItem) {
|
|
16441
16730
|
this.focusAtFirstListItem();
|
|
16442
16731
|
}
|
|
@@ -16951,6 +17240,22 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16951
17240
|
EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
|
|
16952
17241
|
}
|
|
16953
17242
|
};
|
|
17243
|
+
MultiSelect.prototype.resizingWireEvent = function () {
|
|
17244
|
+
// Mouse events
|
|
17245
|
+
EventHandler.add(document, 'mousemove', this.resizePopup, this);
|
|
17246
|
+
EventHandler.add(document, 'mouseup', this.stopResizing, this);
|
|
17247
|
+
// Touch events
|
|
17248
|
+
EventHandler.add(document, 'touchmove', this.resizePopup, this);
|
|
17249
|
+
EventHandler.add(document, 'touchend', this.stopResizing, this);
|
|
17250
|
+
};
|
|
17251
|
+
MultiSelect.prototype.resizingUnWireEvent = function () {
|
|
17252
|
+
// Mouse events
|
|
17253
|
+
EventHandler.remove(document, 'mousemove', this.resizePopup);
|
|
17254
|
+
EventHandler.remove(document, 'mouseup', this.stopResizing);
|
|
17255
|
+
// Touch events
|
|
17256
|
+
EventHandler.remove(document, 'touchmove', this.resizePopup);
|
|
17257
|
+
EventHandler.remove(document, 'touchend', this.stopResizing);
|
|
17258
|
+
};
|
|
16954
17259
|
MultiSelect.prototype.selectAllItem = function (state, event, list) {
|
|
16955
17260
|
var li;
|
|
16956
17261
|
if (!isNullOrUndefined(this.list)) {
|
|
@@ -17477,6 +17782,20 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17477
17782
|
this.enableRTL(newProp.enableRtl);
|
|
17478
17783
|
_super.prototype.onPropertyChanged.call(this, newProp, oldProp);
|
|
17479
17784
|
break;
|
|
17785
|
+
case 'allowResize':
|
|
17786
|
+
this.allowResize = newProp.allowResize;
|
|
17787
|
+
if (!this.allowResize && this.popupObj) {
|
|
17788
|
+
var overAllHeight = parseInt(this.popupHeight, 10);
|
|
17789
|
+
if (this.popupHeight !== 'auto') {
|
|
17790
|
+
this.list.style.maxHeight = formatUnit(overAllHeight);
|
|
17791
|
+
this.popupWrapper.style.height = formatUnit(this.popupHeight);
|
|
17792
|
+
this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight);
|
|
17793
|
+
}
|
|
17794
|
+
else {
|
|
17795
|
+
this.list.style.maxHeight = formatUnit(this.popupHeight);
|
|
17796
|
+
}
|
|
17797
|
+
}
|
|
17798
|
+
break;
|
|
17480
17799
|
case 'readonly':
|
|
17481
17800
|
this.updateReadonly(newProp.readonly);
|
|
17482
17801
|
this.hidePopup();
|
|
@@ -17721,6 +18040,24 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17721
18040
|
if (_this.mode === 'CheckBox' && _this.showSelectAll) {
|
|
17722
18041
|
EventHandler.remove(_this.popupObj.element, 'click', _this.clickHandler);
|
|
17723
18042
|
}
|
|
18043
|
+
if (_this.list && _this.list.parentElement && _this.allowResize) {
|
|
18044
|
+
if (_this.resizer && _this.list.parentElement.contains(_this.resizer)) {
|
|
18045
|
+
_this.list.parentElement.removeChild(_this.resizer);
|
|
18046
|
+
}
|
|
18047
|
+
if (_this.list.parentElement.classList.contains('e-resize')) {
|
|
18048
|
+
_this.list.parentElement.classList.remove('e-resize');
|
|
18049
|
+
}
|
|
18050
|
+
_this.list.parentElement.style.boxSizing = '';
|
|
18051
|
+
_this.list.parentElement.style.paddingBottom = '';
|
|
18052
|
+
var overAllHeight = parseInt(_this.popupHeight, 10);
|
|
18053
|
+
_this.list.style.maxHeight = formatUnit(overAllHeight);
|
|
18054
|
+
_this.list.parentElement.style.height = formatUnit(_this.popupHeight);
|
|
18055
|
+
_this.list.parentElement.style.maxHeight = formatUnit(_this.popupHeight);
|
|
18056
|
+
}
|
|
18057
|
+
if (_this.resizer) {
|
|
18058
|
+
EventHandler.remove(_this.resizer, 'mousedown', _this.startResizing);
|
|
18059
|
+
_this.resizer.remove();
|
|
18060
|
+
}
|
|
17724
18061
|
if (_this.enableVirtualization && _this.mode === 'CheckBox' && _this.value && _this.value.length > 0 &&
|
|
17725
18062
|
_this.enableSelectionOrder) {
|
|
17726
18063
|
_this.viewPortInfo.startIndex = _this.virtualItemStartIndex = 0;
|
|
@@ -17838,6 +18175,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17838
18175
|
}
|
|
17839
18176
|
}
|
|
17840
18177
|
}
|
|
18178
|
+
if (_this.allowResize) {
|
|
18179
|
+
_this.setResize();
|
|
18180
|
+
}
|
|
17841
18181
|
_this.preventSetCurrentData = true;
|
|
17842
18182
|
}
|
|
17843
18183
|
});
|
|
@@ -18023,6 +18363,102 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18023
18363
|
}
|
|
18024
18364
|
this.renderComplete();
|
|
18025
18365
|
};
|
|
18366
|
+
MultiSelect.prototype.setResize = function () {
|
|
18367
|
+
var resizePaddingBottom = 16;
|
|
18368
|
+
if (this.list && this.list.parentElement && isNullOrUndefined(this.list.parentElement.querySelector('.e-resizer-right.e-icons'))) {
|
|
18369
|
+
this.resizer = this.createElement('div', {
|
|
18370
|
+
id: this.element.id + '_resize-popup',
|
|
18371
|
+
className: RESIZE_ICON
|
|
18372
|
+
});
|
|
18373
|
+
}
|
|
18374
|
+
if (this.mode === 'CheckBox' && this.showSelectAll && this.selectAllHeight && this.selectAllHeight !== 0) {
|
|
18375
|
+
this.storedSelectAllHeight = this.selectAllHeight;
|
|
18376
|
+
}
|
|
18377
|
+
if (this.list && this.list.parentElement) {
|
|
18378
|
+
this.list.parentElement.classList.add('e-resize');
|
|
18379
|
+
if (this.popupHeight.toString().toLowerCase() !== 'auto') {
|
|
18380
|
+
this.list.parentElement.style.height = '100%';
|
|
18381
|
+
}
|
|
18382
|
+
this.list.parentElement.style.boxSizing = 'border-box'; // Ensures padding doesn't affect element size
|
|
18383
|
+
var paddingBottom = this.mode === 'CheckBox' && this.searchBoxHeight ? this.searchBoxHeight + resizePaddingBottom + (this.showSelectAll ? this.storedSelectAllHeight : 0) : resizePaddingBottom;
|
|
18384
|
+
this.list.parentElement.style.paddingBottom = paddingBottom + "px";
|
|
18385
|
+
this.list.parentElement.appendChild(this.resizer);
|
|
18386
|
+
this.list.parentElement.style.width = this.resizeWidth + 'px';
|
|
18387
|
+
this.list.parentElement.style.height = this.resizeHeight + 'px';
|
|
18388
|
+
this.list.parentElement.style.maxHeight = this.resizeHeight + 'px';
|
|
18389
|
+
this.list.style.maxHeight = this.resizeHeight + "px";
|
|
18390
|
+
}
|
|
18391
|
+
if (this.resizer) {
|
|
18392
|
+
EventHandler.add(this.resizer, 'mousedown', this.startResizing, this);
|
|
18393
|
+
EventHandler.add(this.resizer, 'touchstart', this.startResizing, this);
|
|
18394
|
+
}
|
|
18395
|
+
};
|
|
18396
|
+
MultiSelect.prototype.startResizing = function (event) {
|
|
18397
|
+
this.isResizing = true;
|
|
18398
|
+
this.trigger('resizeStart', event);
|
|
18399
|
+
// Get initial touch or mouse coordinates
|
|
18400
|
+
var clientX = (event instanceof MouseEvent) ? event.clientX : event.touches[0].clientX;
|
|
18401
|
+
var clientY = (event instanceof MouseEvent) ? event.clientY : event.touches[0].clientY;
|
|
18402
|
+
if (this.list && this.list.parentElement) {
|
|
18403
|
+
this.originalWidth = this.list.parentElement.offsetWidth;
|
|
18404
|
+
this.originalHeight = this.list.parentElement.offsetHeight;
|
|
18405
|
+
this.originalMouseX = clientX;
|
|
18406
|
+
this.originalMouseY = clientY;
|
|
18407
|
+
}
|
|
18408
|
+
this.resizingWireEvent();
|
|
18409
|
+
// Prevent default behavior like text selection
|
|
18410
|
+
if (event) {
|
|
18411
|
+
event.preventDefault();
|
|
18412
|
+
}
|
|
18413
|
+
};
|
|
18414
|
+
MultiSelect.prototype.resizePopup = function (event) {
|
|
18415
|
+
if (!this.isResizing) {
|
|
18416
|
+
return;
|
|
18417
|
+
}
|
|
18418
|
+
this.trigger('resizing', event);
|
|
18419
|
+
// Get the current touch or mouse position
|
|
18420
|
+
var clientX = (event instanceof MouseEvent) ? event.clientX : event.touches[0].clientX;
|
|
18421
|
+
var clientY = (event instanceof MouseEvent) ? event.clientY : event.touches[0].clientY;
|
|
18422
|
+
// Calculate the new width and height based on drag
|
|
18423
|
+
var dx = clientX - this.originalMouseX;
|
|
18424
|
+
var dy = clientY - this.originalMouseY;
|
|
18425
|
+
// Set minimum width and height (100px)
|
|
18426
|
+
var minWidth = 100;
|
|
18427
|
+
var minHeight = 130;
|
|
18428
|
+
// Ensure the new width and height are not smaller than the minimum
|
|
18429
|
+
this.resizeWidth = Math.max(this.originalWidth + dx, minWidth);
|
|
18430
|
+
this.resizeHeight = Math.max(this.originalHeight + dy, minHeight);
|
|
18431
|
+
if (this.list && this.list.parentElement) {
|
|
18432
|
+
// Set minimum width and height (100px)
|
|
18433
|
+
var minWidth_1 = parseInt(window.getComputedStyle(this.list.parentElement).minWidth, 10);
|
|
18434
|
+
var minHeight_1 = parseInt(window.getComputedStyle(this.list.parentElement).minHeight, 10);
|
|
18435
|
+
minWidth_1 = minWidth_1 || 100;
|
|
18436
|
+
minHeight_1 = minHeight_1 || 120;
|
|
18437
|
+
// Ensure the new width and height are not smaller than the minimum
|
|
18438
|
+
this.resizeWidth = Math.max(this.originalWidth + dx, minWidth_1);
|
|
18439
|
+
this.resizeHeight = Math.max(this.originalHeight + dy, minHeight_1);
|
|
18440
|
+
this.list.parentElement.style.width = this.resizeWidth + "px";
|
|
18441
|
+
this.list.parentElement.style.height = this.resizeHeight + "px";
|
|
18442
|
+
this.list.parentElement.style.maxHeight = this.resizeHeight + "px";
|
|
18443
|
+
this.list.style.maxHeight = this.resizeHeight + "px";
|
|
18444
|
+
if (this.fixedHeaderElement && this.ulElement) {
|
|
18445
|
+
this.fixedHeaderElement.style.width = this.ulElement.offsetWidth + "px";
|
|
18446
|
+
}
|
|
18447
|
+
}
|
|
18448
|
+
if (event) {
|
|
18449
|
+
event.preventDefault();
|
|
18450
|
+
}
|
|
18451
|
+
};
|
|
18452
|
+
MultiSelect.prototype.stopResizing = function (event) {
|
|
18453
|
+
if (this.isResizing) {
|
|
18454
|
+
this.isResizing = false;
|
|
18455
|
+
this.trigger('resizeStop', event);
|
|
18456
|
+
this.resizingUnWireEvent();
|
|
18457
|
+
}
|
|
18458
|
+
if (event) {
|
|
18459
|
+
event.preventDefault();
|
|
18460
|
+
}
|
|
18461
|
+
};
|
|
18026
18462
|
MultiSelect.prototype.getListHeight = function () {
|
|
18027
18463
|
var listParent = this.createElement('div', {
|
|
18028
18464
|
className: 'e-dropdownbase'
|
|
@@ -18410,6 +18846,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18410
18846
|
this.inputElement = null;
|
|
18411
18847
|
this.delimiterWrapper = null;
|
|
18412
18848
|
this.liCollections = null;
|
|
18849
|
+
this.popupContentElement = null;
|
|
18413
18850
|
this.header = null;
|
|
18414
18851
|
this.mainList = null;
|
|
18415
18852
|
this.mainListCollection = null;
|
|
@@ -18519,6 +18956,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18519
18956
|
__decorate$5([
|
|
18520
18957
|
Property(false)
|
|
18521
18958
|
], MultiSelect.prototype, "readonly", void 0);
|
|
18959
|
+
__decorate$5([
|
|
18960
|
+
Property(false)
|
|
18961
|
+
], MultiSelect.prototype, "allowResize", void 0);
|
|
18522
18962
|
__decorate$5([
|
|
18523
18963
|
Property(null)
|
|
18524
18964
|
], MultiSelect.prototype, "text", void 0);
|
|
@@ -18600,6 +19040,15 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18600
19040
|
__decorate$5([
|
|
18601
19041
|
Event()
|
|
18602
19042
|
], MultiSelect.prototype, "chipSelection", void 0);
|
|
19043
|
+
__decorate$5([
|
|
19044
|
+
Event()
|
|
19045
|
+
], MultiSelect.prototype, "resizeStop", void 0);
|
|
19046
|
+
__decorate$5([
|
|
19047
|
+
Event()
|
|
19048
|
+
], MultiSelect.prototype, "resizing", void 0);
|
|
19049
|
+
__decorate$5([
|
|
19050
|
+
Event()
|
|
19051
|
+
], MultiSelect.prototype, "resizeStart", void 0);
|
|
18603
19052
|
__decorate$5([
|
|
18604
19053
|
Event()
|
|
18605
19054
|
], MultiSelect.prototype, "filtering", void 0);
|
|
@@ -19348,7 +19797,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19348
19797
|
new Sortable(this.ulElement, {
|
|
19349
19798
|
scope: this.scope,
|
|
19350
19799
|
itemClass: 'e-list-item',
|
|
19351
|
-
|
|
19800
|
+
beforeDragStart: this.triggerDragStart.bind(this),
|
|
19352
19801
|
drag: this.triggerDrag.bind(this),
|
|
19353
19802
|
beforeDrop: this.beforeDragEnd.bind(this),
|
|
19354
19803
|
drop: this.dragEnd.bind(this),
|
|
@@ -19598,11 +20047,11 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19598
20047
|
ListBox.prototype.triggerDragStart = function (args) {
|
|
19599
20048
|
var _this = this;
|
|
19600
20049
|
var badge;
|
|
19601
|
-
|
|
20050
|
+
var extendedArgs = extend(this.getDragArgs(args), { dragSelected: true }, { cancel: false });
|
|
19602
20051
|
if (Browser.isIos) {
|
|
19603
20052
|
this.list.style.overflow = 'hidden';
|
|
19604
20053
|
}
|
|
19605
|
-
this.trigger('dragStart',
|
|
20054
|
+
this.trigger('dragStart', extendedArgs, function (dragEventArgs) {
|
|
19606
20055
|
_this.allowDragAll = dragEventArgs.dragSelected;
|
|
19607
20056
|
if (!_this.allowDragAll) {
|
|
19608
20057
|
badge = _this.ulElement.getElementsByClassName('e-list-badge')[0];
|
|
@@ -19610,6 +20059,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19610
20059
|
detach(badge);
|
|
19611
20060
|
}
|
|
19612
20061
|
}
|
|
20062
|
+
if (dragEventArgs.cancel) {
|
|
20063
|
+
args.cancel = true;
|
|
20064
|
+
}
|
|
19613
20065
|
});
|
|
19614
20066
|
};
|
|
19615
20067
|
ListBox.prototype.triggerDrag = function (args) {
|
|
@@ -19840,7 +20292,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19840
20292
|
listObj.liCollections = liColl;
|
|
19841
20293
|
listObj.jsonData = extend([], [], jsonData, false);
|
|
19842
20294
|
listObj.listData = extend([], [], listData, false);
|
|
19843
|
-
listObj.
|
|
20295
|
+
if (listObj.sortOrder === 'None') {
|
|
20296
|
+
listObj.sortedData = extend([], [], sortedData, false);
|
|
20297
|
+
}
|
|
19844
20298
|
if (this.listData.length === 0) {
|
|
19845
20299
|
this.l10nUpdate();
|
|
19846
20300
|
}
|
|
@@ -22196,6 +22650,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
22196
22650
|
this.hidePopup();
|
|
22197
22651
|
this.lineBreak = true;
|
|
22198
22652
|
}
|
|
22653
|
+
else if ((e.key === 'Backspace' || e.key === 'Delete') && this.range && this.range.startOffset !== this.range.endOffset) {
|
|
22654
|
+
this.range.deleteContents();
|
|
22655
|
+
}
|
|
22199
22656
|
return;
|
|
22200
22657
|
}
|
|
22201
22658
|
if (lastWordRange.includes(this.mentionChar)) {
|
|
@@ -22973,7 +23430,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
22973
23430
|
};
|
|
22974
23431
|
Mention.prototype.scrollTop = function () {
|
|
22975
23432
|
if (!isNullOrUndefined(this.selectedLI)) {
|
|
22976
|
-
var nextOffset = this.
|
|
23433
|
+
var nextOffset = !isNullOrUndefined(this.fields.groupBy) && !isNullOrUndefined(this.fixedHeaderElement) ?
|
|
23434
|
+
this.selectedLI.offsetTop - (this.list.scrollTop + this.fixedHeaderElement.offsetHeight) :
|
|
23435
|
+
this.selectedLI.offsetTop - this.list.scrollTop;
|
|
22977
23436
|
nextOffset = this.fields.groupBy && nextOffset;
|
|
22978
23437
|
var boxRange = (this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop);
|
|
22979
23438
|
if (this.activeIndex === 0) {
|