@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
|
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];
|
|
@@ -4617,6 +4744,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4617
4744
|
if (this.isFiltering() && this.getModuleName() === 'combobox' && isNullOrUndefined(this.list)) {
|
|
4618
4745
|
this.getInitialData = true;
|
|
4619
4746
|
this.renderList();
|
|
4747
|
+
if (!this.isSecondClick && !this.isDropDownClick) {
|
|
4748
|
+
this.executeCloneElements();
|
|
4749
|
+
}
|
|
4620
4750
|
}
|
|
4621
4751
|
this.typedString = this.filterInput.value;
|
|
4622
4752
|
this.preventAutoFill = false;
|
|
@@ -4829,7 +4959,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4829
4959
|
var virualElement = this.createElement('div', {
|
|
4830
4960
|
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
4831
4961
|
});
|
|
4832
|
-
|
|
4962
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
4833
4963
|
}
|
|
4834
4964
|
}
|
|
4835
4965
|
}
|
|
@@ -4868,7 +4998,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4868
4998
|
var virualElement = this.createElement('div', {
|
|
4869
4999
|
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
4870
5000
|
});
|
|
4871
|
-
|
|
5001
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
4872
5002
|
}
|
|
4873
5003
|
}
|
|
4874
5004
|
}
|
|
@@ -4876,6 +5006,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4876
5006
|
this.getFilteringSkeletonCount();
|
|
4877
5007
|
}
|
|
4878
5008
|
this.renderReactTemplates();
|
|
5009
|
+
if (this.filterInput && this.filterInput.value === '' && this.getModuleName() === 'combobox') {
|
|
5010
|
+
this.executeCloneElements();
|
|
5011
|
+
}
|
|
4879
5012
|
}
|
|
4880
5013
|
};
|
|
4881
5014
|
DropDownList.prototype.setSearchBox = function (popupElement) {
|
|
@@ -5227,7 +5360,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5227
5360
|
};
|
|
5228
5361
|
DropDownList.prototype.updateSelectionList = function () {
|
|
5229
5362
|
var selectedItem = this.list && this.list.querySelector('.' + 'e-active');
|
|
5230
|
-
if (!selectedItem && !isNullOrUndefined(this.value)) {
|
|
5363
|
+
if (!selectedItem && !isNullOrUndefined(this.value) && this.getModuleName() !== 'autocomplete') {
|
|
5231
5364
|
var value = this.allowObjectBinding ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
|
|
5232
5365
|
var findEle = this.findListElement(this.list, 'li', 'data-value', value);
|
|
5233
5366
|
if (findEle) {
|
|
@@ -5260,10 +5393,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5260
5393
|
formatUnit(Math.round(window.outerHeight).toString() + 'px') : formatUnit(_this.popupHeight);
|
|
5261
5394
|
if (_this.headerTemplate) {
|
|
5262
5395
|
_this.setHeaderTemplate(popupEle);
|
|
5396
|
+
_this.isUpdateHeaderHeight = _this.header.offsetHeight !== 0;
|
|
5263
5397
|
}
|
|
5264
5398
|
append([_this.list], popupEle);
|
|
5265
5399
|
if (_this.footerTemplate) {
|
|
5266
5400
|
_this.setFooterTemplate(popupEle);
|
|
5401
|
+
_this.isUpdateFooterHeight = _this.footer.offsetHeight !== 0;
|
|
5267
5402
|
}
|
|
5268
5403
|
document.body.appendChild(popupEle);
|
|
5269
5404
|
popupEle.style.top = '0px';
|
|
@@ -5428,12 +5563,57 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5428
5563
|
if (!isNullOrUndefined(_this.popupObj)) {
|
|
5429
5564
|
_this.popupObj.show(new Animation(eventArgs.animation), (_this.zIndex === 1000) ? _this.element : null);
|
|
5430
5565
|
}
|
|
5566
|
+
if (_this.isReact) {
|
|
5567
|
+
setTimeout(function () {
|
|
5568
|
+
if (_this.popupHeight && _this.list && _this.popupHeight !== 'auto' && !(_this.getModuleName() === 'dropdownlist' && _this.allowFiltering)) {
|
|
5569
|
+
var popupHeightValue = typeof _this.popupHeight === 'string' ? parseInt(_this.popupHeight, 10) : _this.popupHeight;
|
|
5570
|
+
if (!_this.isUpdateHeaderHeight && _this.headerTemplate && _this.header) {
|
|
5571
|
+
var listHeight = _this.list.style.maxHeight === '' ? popupHeightValue : parseInt(_this.list.style.maxHeight, 10);
|
|
5572
|
+
_this.list.style.maxHeight = (listHeight - _this.header.offsetHeight).toString() + 'px';
|
|
5573
|
+
_this.isUpdateHeaderHeight = true;
|
|
5574
|
+
}
|
|
5575
|
+
if (!_this.isUpdateFooterHeight && _this.footerTemplate && _this.footer) {
|
|
5576
|
+
var listHeight = _this.list.style.maxHeight === '' ? popupHeightValue : parseInt(_this.list.style.maxHeight, 10);
|
|
5577
|
+
_this.list.style.maxHeight = (listHeight - _this.footer.offsetHeight).toString() + 'px';
|
|
5578
|
+
_this.isUpdateFooterHeight = true;
|
|
5579
|
+
}
|
|
5580
|
+
}
|
|
5581
|
+
}, 15);
|
|
5582
|
+
}
|
|
5431
5583
|
}
|
|
5432
5584
|
else {
|
|
5433
5585
|
_this.beforePopupOpen = false;
|
|
5434
5586
|
_this.destroyPopup();
|
|
5435
5587
|
}
|
|
5436
5588
|
});
|
|
5589
|
+
if (_this.allowResize) {
|
|
5590
|
+
var resizePaddingBottom = 16;
|
|
5591
|
+
// Create the resizer div
|
|
5592
|
+
_this.resizer = _this.createElement('div', {
|
|
5593
|
+
id: _this.element.id + '_resize-popup',
|
|
5594
|
+
className: dropDownListClasses.resizeIcon // Adding class for styling
|
|
5595
|
+
});
|
|
5596
|
+
// Add the resizer div to the popup
|
|
5597
|
+
if (_this.list && _this.list.parentElement) {
|
|
5598
|
+
_this.list.parentElement.classList.add('e-resize');
|
|
5599
|
+
if (_this.popupHeight.toString().toLowerCase() !== 'auto') {
|
|
5600
|
+
_this.list.parentElement.style.height = '100%';
|
|
5601
|
+
}
|
|
5602
|
+
_this.list.parentElement.style.paddingBottom = (_this.getModuleName() === 'dropdownlist' && _this.allowFiltering && _this.searchBoxHeight) ? (_this.searchBoxHeight + resizePaddingBottom).toString() + 'px' : resizePaddingBottom.toString() + 'px';
|
|
5603
|
+
if (_this.header || _this.footer || _this.itemTemplate) {
|
|
5604
|
+
_this.list.parentElement.style.paddingBottom = ((parseInt(_this.list.parentElement.style.maxHeight, 10) - parseInt(_this.list.style.maxHeight, 10)) + resizePaddingBottom).toString() + 'px';
|
|
5605
|
+
}
|
|
5606
|
+
_this.list.parentElement.appendChild(_this.resizer);
|
|
5607
|
+
//hold the popup resize
|
|
5608
|
+
_this.list.parentElement.style.width = _this.resizeWidth + "px";
|
|
5609
|
+
_this.list.parentElement.style.height = _this.resizeHeight + "px";
|
|
5610
|
+
_this.list.parentElement.style.maxHeight = _this.resizeHeight + "px";
|
|
5611
|
+
_this.list.style.maxHeight = _this.resizeHeight + "px";
|
|
5612
|
+
}
|
|
5613
|
+
// Attach mouse and touch events to the resizer
|
|
5614
|
+
EventHandler.add(_this.resizer, 'mousedown', _this.startResizing, _this);
|
|
5615
|
+
EventHandler.add(_this.resizer, 'touchstart', _this.startResizing, _this);
|
|
5616
|
+
}
|
|
5437
5617
|
}
|
|
5438
5618
|
else {
|
|
5439
5619
|
_this.beforePopupOpen = false;
|
|
@@ -5671,7 +5851,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5671
5851
|
}
|
|
5672
5852
|
else {
|
|
5673
5853
|
this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ?
|
|
5674
|
-
this.virtualListInfo.startIndex * this.listItemHeight
|
|
5854
|
+
isInitial && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight +
|
|
5855
|
+
(this.listItemHeight * 2) : this.virtualListInfo.startIndex * this.listItemHeight : 0;
|
|
5675
5856
|
}
|
|
5676
5857
|
isScrollerCHanged = this.isKeyBoardAction;
|
|
5677
5858
|
}
|
|
@@ -5820,15 +6001,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5820
6001
|
this.keyboardEvent = null;
|
|
5821
6002
|
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
5822
6003
|
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
6004
|
this.isDropDownClick = false;
|
|
5833
6005
|
this.preventAutoFill = false;
|
|
5834
6006
|
var scrollableParentElements = this.popupObj.getScrollableParent(this.inputWrapper.container);
|
|
@@ -5901,6 +6073,15 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5901
6073
|
var popupInstance = this.popupObj;
|
|
5902
6074
|
var eventArgs = { popup: popupInstance, cancel: false, animation: animModel, event: e || null };
|
|
5903
6075
|
this.trigger('close', eventArgs, function (eventArgs) {
|
|
6076
|
+
if (_this.getModuleName() === 'dropdownlist') {
|
|
6077
|
+
Input.destroy({
|
|
6078
|
+
element: _this.filterInput,
|
|
6079
|
+
floatLabelType: _this.floatLabelType,
|
|
6080
|
+
properties: { placeholder: _this.filterBarPlaceholder },
|
|
6081
|
+
buttons: _this.clearIconElement
|
|
6082
|
+
}, _this.clearIconElement);
|
|
6083
|
+
}
|
|
6084
|
+
_this.filterInputObj = null;
|
|
5904
6085
|
if (!isNullOrUndefined(_this.popupObj) &&
|
|
5905
6086
|
!isNullOrUndefined(_this.popupObj.element.querySelector('.e-fixed-head'))) {
|
|
5906
6087
|
var fixedHeader = _this.popupObj.element.querySelector('.e-fixed-head');
|
|
@@ -5971,6 +6152,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5971
6152
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5972
6153
|
this.list.getElementsByClassName('e-virtual-ddl')[0].style = this.GetVirtualTrackHeight();
|
|
5973
6154
|
}
|
|
6155
|
+
else if (!this.list.querySelector('.e-virtual-ddl')) {
|
|
6156
|
+
var virualElement = this.createElement('div', {
|
|
6157
|
+
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
6158
|
+
});
|
|
6159
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
6160
|
+
}
|
|
5974
6161
|
if (this.getModuleName() !== 'autocomplete' && this.totalItemCount !== 0 && this.totalItemCount > (this.itemCount * 2)) {
|
|
5975
6162
|
this.getSkeletonCount();
|
|
5976
6163
|
}
|
|
@@ -5989,6 +6176,10 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5989
6176
|
this.isFilterFocus = false;
|
|
5990
6177
|
this.inputElement.removeAttribute('aria-controls');
|
|
5991
6178
|
if (this.popupObj) {
|
|
6179
|
+
if (this.resizer) {
|
|
6180
|
+
EventHandler.remove(this.resizer, 'mousedown', this.startResizing);
|
|
6181
|
+
EventHandler.remove(this.resizer, 'touchstart', this.startResizing);
|
|
6182
|
+
}
|
|
5992
6183
|
this.popupObj.destroy();
|
|
5993
6184
|
detach(this.popupObj.element);
|
|
5994
6185
|
}
|
|
@@ -6708,6 +6899,20 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6708
6899
|
isOpen: true
|
|
6709
6900
|
});
|
|
6710
6901
|
}
|
|
6902
|
+
if (!this.isSecondClick && !this.isDropDownClick) {
|
|
6903
|
+
this.executeCloneElements();
|
|
6904
|
+
}
|
|
6905
|
+
};
|
|
6906
|
+
DropDownList.prototype.executeCloneElements = function () {
|
|
6907
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
6908
|
+
var proxy = this;
|
|
6909
|
+
var duration = (this.element.tagName === this.getNgDirective() && this.itemTemplate) ? 500 : 100;
|
|
6910
|
+
if (this.isReact && this.isFiltering() && this.itemTemplate != null) {
|
|
6911
|
+
setTimeout(function () {
|
|
6912
|
+
proxy.cloneElements();
|
|
6913
|
+
proxy.isSecondClick = true;
|
|
6914
|
+
}, duration);
|
|
6915
|
+
}
|
|
6711
6916
|
};
|
|
6712
6917
|
DropDownList.prototype.invokeRenderPopup = function (e) {
|
|
6713
6918
|
if (Browser.isDevice && this.isFilterLayout()) {
|
|
@@ -7044,6 +7249,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7044
7249
|
__decorate$1([
|
|
7045
7250
|
Property(false)
|
|
7046
7251
|
], DropDownList.prototype, "enableVirtualization", void 0);
|
|
7252
|
+
__decorate$1([
|
|
7253
|
+
Property(false)
|
|
7254
|
+
], DropDownList.prototype, "allowResize", void 0);
|
|
7047
7255
|
__decorate$1([
|
|
7048
7256
|
Property(null)
|
|
7049
7257
|
], DropDownList.prototype, "text", void 0);
|
|
@@ -7083,6 +7291,15 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7083
7291
|
__decorate$1([
|
|
7084
7292
|
Event()
|
|
7085
7293
|
], DropDownList.prototype, "focus", void 0);
|
|
7294
|
+
__decorate$1([
|
|
7295
|
+
Event()
|
|
7296
|
+
], DropDownList.prototype, "resizeStop", void 0);
|
|
7297
|
+
__decorate$1([
|
|
7298
|
+
Event()
|
|
7299
|
+
], DropDownList.prototype, "resizing", void 0);
|
|
7300
|
+
__decorate$1([
|
|
7301
|
+
Event()
|
|
7302
|
+
], DropDownList.prototype, "resizeStart", void 0);
|
|
7086
7303
|
DropDownList = __decorate$1([
|
|
7087
7304
|
NotifyPropertyChanges
|
|
7088
7305
|
], DropDownList);
|
|
@@ -7250,6 +7467,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7250
7467
|
_this.selectedData = [];
|
|
7251
7468
|
_this.filterDelayTime = 300;
|
|
7252
7469
|
_this.isClicked = false;
|
|
7470
|
+
_this.documentClickContext = _this.onDocumentClick.bind(_this);
|
|
7253
7471
|
// Specifies if the checkAll method has been called
|
|
7254
7472
|
_this.isCheckAllCalled = false;
|
|
7255
7473
|
_this.isFromFilterChange = false;
|
|
@@ -7769,7 +7987,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7769
7987
|
if (this.showSelectAll && this.checkAllParent) {
|
|
7770
7988
|
EventHandler.remove(this.checkAllParent, 'mouseup', this.clickHandler);
|
|
7771
7989
|
}
|
|
7772
|
-
|
|
7990
|
+
document.removeEventListener('mousedown', this.documentClickContext);
|
|
7773
7991
|
};
|
|
7774
7992
|
/* Trigger when the dropdown is clicked */
|
|
7775
7993
|
DropDownTree.prototype.dropDownClick = function (e) {
|
|
@@ -8796,7 +9014,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8796
9014
|
if (_this.treeObj.checkedNodes.length > 0 && !_this.isFilterRestore) {
|
|
8797
9015
|
var nodes = _this.treeObj.element.querySelectorAll('li');
|
|
8798
9016
|
var checkedNodes = _this.treeObj.element.querySelectorAll('li[aria-checked=true]');
|
|
8799
|
-
if ((checkedNodes.length === nodes.length
|
|
9017
|
+
if ((checkedNodes.length === nodes.length) && _this.checkBoxElement) {
|
|
8800
9018
|
var wrap = closest(_this.checkBoxElement, '.' + CHECKBOXWRAP);
|
|
8801
9019
|
_this.changeState(wrap, 'check');
|
|
8802
9020
|
_this.checkSelectAll = false;
|
|
@@ -8859,7 +9077,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8859
9077
|
_this.isPopupOpen = false;
|
|
8860
9078
|
},
|
|
8861
9079
|
open: function () {
|
|
8862
|
-
|
|
9080
|
+
document.addEventListener('mousedown', _this.documentClickContext);
|
|
8863
9081
|
_this.isPopupOpen = true;
|
|
8864
9082
|
},
|
|
8865
9083
|
targetExitViewport: function () {
|
|
@@ -10925,7 +11143,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
10925
11143
|
var inputValue = this.inputElement.value;
|
|
10926
11144
|
var dataSource = this.sortedData;
|
|
10927
11145
|
var type = this.typeOfData(dataSource).typeof;
|
|
10928
|
-
var activeItem = Search(inputValue, this.liCollections, this.filterType, true, dataSource, this.fields, type);
|
|
11146
|
+
var activeItem = Search(inputValue, this.liCollections, this.filterType, true, dataSource, this.fields, type, this.ignoreAccent);
|
|
10929
11147
|
if (this.enableVirtualization && inputValue !== '' && this.getModuleName() !== 'autocomplete' && this.isTyped && !this.allowFiltering) {
|
|
10930
11148
|
var updatingincrementalindex = false;
|
|
10931
11149
|
var isEndIndexValid = this.viewPortInfo.endIndex >= this.incrementalEndIndex &&
|
|
@@ -11152,6 +11370,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
11152
11370
|
_super.prototype.clearAll.call(this, e);
|
|
11153
11371
|
}
|
|
11154
11372
|
if (this.isFiltering() && !isNullOrUndefined(e) && e.target === this.inputWrapper.clearButton) {
|
|
11373
|
+
this.typedString = this.filterInput.value;
|
|
11155
11374
|
this.searchLists(e);
|
|
11156
11375
|
}
|
|
11157
11376
|
};
|
|
@@ -11902,11 +12121,11 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
|
|
|
11902
12121
|
});
|
|
11903
12122
|
this.list.appendChild(virtualElement).appendChild(this.list.querySelector('.e-list-parent'));
|
|
11904
12123
|
}
|
|
11905
|
-
if (!this.list.querySelector('.e-virtual-ddl') &&
|
|
12124
|
+
if (!this.list.querySelector('.e-virtual-ddl') && this.list.parentElement) {
|
|
11906
12125
|
var virtualElement = this.createElement('div', {
|
|
11907
12126
|
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
11908
12127
|
});
|
|
11909
|
-
|
|
12128
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virtualElement);
|
|
11910
12129
|
}
|
|
11911
12130
|
}
|
|
11912
12131
|
if ((this.getModuleName() === 'autocomplete' && !(this.dataSource instanceof DataManager)) || (this.getModuleName() === 'autocomplete' && (this.dataSource instanceof DataManager) && this.totalItemCount !== 0)) {
|
|
@@ -11941,6 +12160,9 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
|
|
|
11941
12160
|
if (!isNullOrUndefined(item)) {
|
|
11942
12161
|
removeClass([item], dropDownListClasses.focus);
|
|
11943
12162
|
}
|
|
12163
|
+
if (!isNullOrUndefined(this.itemData) && !this.enableVirtualization) {
|
|
12164
|
+
this.focusIndexItem();
|
|
12165
|
+
}
|
|
11944
12166
|
this.postBackAction();
|
|
11945
12167
|
};
|
|
11946
12168
|
AutoComplete.prototype.postBackAction = function () {
|
|
@@ -12449,6 +12671,7 @@ var BOX_ELEMENT = 'e-multiselect-box';
|
|
|
12449
12671
|
var FILTERPARENT = 'e-filter-parent';
|
|
12450
12672
|
var CUSTOM_WIDTH = 'e-search-custom-width';
|
|
12451
12673
|
var FILTERINPUT = 'e-input-filter';
|
|
12674
|
+
var RESIZE_ICON = 'e-resizer-right e-icons';
|
|
12452
12675
|
/**
|
|
12453
12676
|
* The Multiselect allows the user to pick a more than one value from list of predefined values.
|
|
12454
12677
|
* ```html
|
|
@@ -12480,6 +12703,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12480
12703
|
var _this = _super.call(this, option, element) || this;
|
|
12481
12704
|
_this.clearIconWidth = 0;
|
|
12482
12705
|
_this.previousFilterText = '';
|
|
12706
|
+
_this.storedSelectAllHeight = 0;
|
|
12707
|
+
_this.isUpdateHeaderHeight = false;
|
|
12708
|
+
_this.isUpdateFooterHeight = false;
|
|
12483
12709
|
_this.isValidKey = false;
|
|
12484
12710
|
_this.selectAllEventData = [];
|
|
12485
12711
|
_this.selectAllEventEle = [];
|
|
@@ -12630,7 +12856,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12630
12856
|
var eventArgs = { popup: this.popupObj, event: e, cancel: false, animation: animModel };
|
|
12631
12857
|
this.trigger('open', eventArgs, function (eventArgs) {
|
|
12632
12858
|
if (!eventArgs.cancel) {
|
|
12633
|
-
_this.focusAtFirstListItem();
|
|
12859
|
+
_this.focusAtFirstListItem(true);
|
|
12634
12860
|
if (_this.popupObj) {
|
|
12635
12861
|
document.body.appendChild(_this.popupObj.element);
|
|
12636
12862
|
}
|
|
@@ -12645,6 +12871,23 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12645
12871
|
if (_this.popupObj) {
|
|
12646
12872
|
_this.popupObj.show(eventArgs.animation, (_this.zIndex === 1000) ? _this.element : null);
|
|
12647
12873
|
}
|
|
12874
|
+
if (_this.isReact) {
|
|
12875
|
+
setTimeout(function () {
|
|
12876
|
+
if (_this.popupHeight && _this.list && _this.popupHeight !== 'auto') {
|
|
12877
|
+
var popupHeightValue = typeof _this.popupHeight === 'string' ? parseInt(_this.popupHeight, 10) : _this.popupHeight;
|
|
12878
|
+
if (!_this.isUpdateHeaderHeight && _this.headerTemplate && _this.header) {
|
|
12879
|
+
var listHeight = _this.list.style.maxHeight === '' ? popupHeightValue : parseInt(_this.list.style.maxHeight, 10);
|
|
12880
|
+
_this.list.style.maxHeight = (listHeight - _this.header.offsetHeight).toString() + 'px';
|
|
12881
|
+
_this.isUpdateHeaderHeight = true;
|
|
12882
|
+
}
|
|
12883
|
+
if (!_this.isUpdateFooterHeight && _this.footerTemplate && _this.footer) {
|
|
12884
|
+
var listHeight = _this.list.style.maxHeight === '' ? popupHeightValue : parseInt(_this.list.style.maxHeight, 10);
|
|
12885
|
+
_this.list.style.maxHeight = (listHeight - _this.footer.offsetHeight).toString() + 'px';
|
|
12886
|
+
_this.isUpdateFooterHeight = true;
|
|
12887
|
+
}
|
|
12888
|
+
}
|
|
12889
|
+
}, 15);
|
|
12890
|
+
}
|
|
12648
12891
|
attributes(_this.inputElement, {
|
|
12649
12892
|
'aria-expanded': 'true', 'aria-owns': _this.element.id + '_popup', 'aria-controls': _this.element.id
|
|
12650
12893
|
});
|
|
@@ -12721,16 +12964,16 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12721
12964
|
: this.value[this.value.length - 1];
|
|
12722
12965
|
var valueEle = this.findListElement((this.hideSelectedItem ? this.ulElement : this.list), 'li', 'data-value', value);
|
|
12723
12966
|
if (!isNullOrUndefined(valueEle)) {
|
|
12724
|
-
this.scrollBottom(valueEle);
|
|
12967
|
+
this.scrollBottom(valueEle, undefined, false, null, true);
|
|
12725
12968
|
}
|
|
12726
12969
|
}
|
|
12727
12970
|
if (this.enableVirtualization) {
|
|
12728
12971
|
var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
|
|
12729
12972
|
this.isKeyBoardAction = false;
|
|
12730
|
-
this.scrollBottom(focusedItem);
|
|
12973
|
+
this.scrollBottom(focusedItem, undefined, false, null, true);
|
|
12731
12974
|
}
|
|
12732
12975
|
};
|
|
12733
|
-
MultiSelect.prototype.focusAtFirstListItem = function () {
|
|
12976
|
+
MultiSelect.prototype.focusAtFirstListItem = function (isOpen) {
|
|
12734
12977
|
if (this.ulElement && this.ulElement.querySelector('li.'
|
|
12735
12978
|
+ dropDownBaseClasses.li)) {
|
|
12736
12979
|
var element = void 0;
|
|
@@ -12743,10 +12986,18 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12743
12986
|
if (this.fields.disabled) {
|
|
12744
12987
|
element = this.ulElement.querySelector('li.'
|
|
12745
12988
|
+ dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)' + ':not(.' + DISABLED$1 + ')');
|
|
12989
|
+
if (isOpen && this.viewPortInfo && this.viewPortInfo.startIndex !== 0) {
|
|
12990
|
+
var elements = this.ulElement.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
|
|
12991
|
+
element = elements && elements.length > 0 ? elements[2] : element;
|
|
12992
|
+
}
|
|
12746
12993
|
}
|
|
12747
12994
|
else {
|
|
12748
12995
|
element = this.ulElement.querySelector('li.'
|
|
12749
12996
|
+ dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
|
|
12997
|
+
if (isOpen && this.viewPortInfo && this.viewPortInfo.startIndex !== 0) {
|
|
12998
|
+
var elements = this.ulElement.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
|
|
12999
|
+
element = elements && elements.length > 0 ? elements[2] : element;
|
|
13000
|
+
}
|
|
12750
13001
|
}
|
|
12751
13002
|
}
|
|
12752
13003
|
else {
|
|
@@ -13043,7 +13294,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13043
13294
|
if (this.hideSelectedItem && element.classList.contains(dropDownBaseClasses.focus)) {
|
|
13044
13295
|
removeClass([element], dropDownBaseClasses.focus);
|
|
13045
13296
|
var listEle = element.parentElement.querySelectorAll('.' +
|
|
13046
|
-
dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')');
|
|
13297
|
+
dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.' + DISABLED$1 + ')');
|
|
13047
13298
|
if (listEle.length > 0) {
|
|
13048
13299
|
addClass([listEle[0]], dropDownBaseClasses.focus);
|
|
13049
13300
|
this.updateAriaActiveDescendant();
|
|
@@ -13212,7 +13463,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13212
13463
|
if (!(this.dataSource instanceof DataManager) && dataType === 'string' || dataType === 'number') {
|
|
13213
13464
|
filterQuery.where('', this.filterType, this.targetElement(), this.ignoreCase, this.ignoreAccent);
|
|
13214
13465
|
}
|
|
13215
|
-
else if ((this.enableVirtualization && this.targetElement() !== '') || !this.enableVirtualization) {
|
|
13466
|
+
else if ((this.enableVirtualization && this.targetElement() !== '' && !this.isClearAllAction) || !this.enableVirtualization) {
|
|
13216
13467
|
var fields = this.fields;
|
|
13217
13468
|
filterQuery.where(!isNullOrUndefined(fields.text) ? fields.text : '', this.filterType, this.targetElement(), this.ignoreCase, this.ignoreAccent);
|
|
13218
13469
|
}
|
|
@@ -13220,6 +13471,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13220
13471
|
if (this.enableVirtualization && (this.viewPortInfo.endIndex !== 0) && !this.virtualSelectAll) {
|
|
13221
13472
|
return this.virtualFilterQuery(filterQuery);
|
|
13222
13473
|
}
|
|
13474
|
+
if (this.virtualSelectAll) {
|
|
13475
|
+
return query ? query.take(this.maximumSelectionLength).requiresCount() : this.query ?
|
|
13476
|
+
this.query.take(this.maximumSelectionLength).requiresCount() :
|
|
13477
|
+
new Query().take(this.maximumSelectionLength).requiresCount();
|
|
13478
|
+
}
|
|
13223
13479
|
return filterQuery;
|
|
13224
13480
|
}
|
|
13225
13481
|
else {
|
|
@@ -13405,6 +13661,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13405
13661
|
this.getFilteringSkeletonCount();
|
|
13406
13662
|
}
|
|
13407
13663
|
this.refreshPopup();
|
|
13664
|
+
if (this.allowResize) {
|
|
13665
|
+
this.setResize();
|
|
13666
|
+
}
|
|
13408
13667
|
if (this.mode === 'CheckBox') {
|
|
13409
13668
|
this.removeFocus();
|
|
13410
13669
|
}
|
|
@@ -13738,6 +13997,15 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13738
13997
|
':not(.' + HIDE_LIST + ')' +
|
|
13739
13998
|
':not(.e-reorder-hide)');
|
|
13740
13999
|
var previousItem = steps >= 0 ? collection[steps + 1] : collection[0];
|
|
14000
|
+
if (this.fields.disabled && previousItem && !this.enableVirtualization) {
|
|
14001
|
+
while (previousItem && (previousItem.classList.contains('e-disabled') || previousItem.classList.contains(HIDE_LIST) ||
|
|
14002
|
+
previousItem.classList.contains('.e-reorder-hide') || previousItem.classList.contains('e-list-group-item'))) {
|
|
14003
|
+
previousItem = previousItem.previousElementSibling;
|
|
14004
|
+
}
|
|
14005
|
+
if (!previousItem) {
|
|
14006
|
+
return;
|
|
14007
|
+
}
|
|
14008
|
+
}
|
|
13741
14009
|
if (this.enableVirtualization && isVirtualKeyAction) {
|
|
13742
14010
|
previousItem = (this.liCollections.length >= steps && steps >= 0)
|
|
13743
14011
|
? this.liCollections[steps]
|
|
@@ -13769,6 +14037,15 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13769
14037
|
var collection = this.list.querySelectorAll('li.'
|
|
13770
14038
|
+ dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
|
|
13771
14039
|
var previousItem = steps <= collection.length ? collection[steps - 1] : collection[collection.length - 1];
|
|
14040
|
+
if (this.fields.disabled && previousItem && !this.enableVirtualization) {
|
|
14041
|
+
while (previousItem && (previousItem.classList.contains('e-disabled') || previousItem.classList.contains(HIDE_LIST) ||
|
|
14042
|
+
previousItem.classList.contains('.e-reorder-hide') || previousItem.classList.contains('e-list-group-item'))) {
|
|
14043
|
+
previousItem = previousItem.nextElementSibling;
|
|
14044
|
+
}
|
|
14045
|
+
if (!previousItem) {
|
|
14046
|
+
return;
|
|
14047
|
+
}
|
|
14048
|
+
}
|
|
13772
14049
|
if (this.enableVirtualization && this.skeletonCount > 0) {
|
|
13773
14050
|
previousItem = steps < list.length ? this.liCollections[steps] : this.liCollections[list.length - 1];
|
|
13774
14051
|
}
|
|
@@ -13820,6 +14097,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13820
14097
|
if (this.isPopupOpen()) {
|
|
13821
14098
|
this.refreshPopup();
|
|
13822
14099
|
}
|
|
14100
|
+
if (this.allowResize) {
|
|
14101
|
+
this.setResize();
|
|
14102
|
+
}
|
|
13823
14103
|
setTimeout(function () {
|
|
13824
14104
|
_this.calculateWidth();
|
|
13825
14105
|
}, 150);
|
|
@@ -14056,6 +14336,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14056
14336
|
if (this.mode === 'CheckBox') {
|
|
14057
14337
|
this.inputElement.focus();
|
|
14058
14338
|
}
|
|
14339
|
+
this.isKeyBoardAction = false;
|
|
14059
14340
|
return;
|
|
14060
14341
|
case 13:
|
|
14061
14342
|
e.preventDefault();
|
|
@@ -14064,10 +14345,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14064
14345
|
this.selectByKey(e);
|
|
14065
14346
|
}
|
|
14066
14347
|
this.checkPlaceholderSize();
|
|
14348
|
+
this.isKeyBoardAction = false;
|
|
14067
14349
|
return;
|
|
14068
14350
|
case 32:
|
|
14069
14351
|
this.isKeyBoardAction = true;
|
|
14070
14352
|
this.spaceKeySelection(e);
|
|
14353
|
+
this.isKeyBoardAction = false;
|
|
14071
14354
|
return;
|
|
14072
14355
|
case 9:
|
|
14073
14356
|
e.preventDefault();
|
|
@@ -14109,6 +14392,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14109
14392
|
if (!(this.mode === 'CheckBox' && this.showSelectAll)) {
|
|
14110
14393
|
this.refreshPopup();
|
|
14111
14394
|
}
|
|
14395
|
+
if (this.allowResize) {
|
|
14396
|
+
this.setResize();
|
|
14397
|
+
}
|
|
14112
14398
|
this.isKeyBoardAction = false;
|
|
14113
14399
|
};
|
|
14114
14400
|
MultiSelect.prototype.arrowDown = function (e, isVirtualKeyAction) {
|
|
@@ -14233,9 +14519,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14233
14519
|
}
|
|
14234
14520
|
this.makeTextBoxEmpty();
|
|
14235
14521
|
};
|
|
14236
|
-
MultiSelect.prototype.scrollBottom = function (selectedLI, activeIndex, isInitialSelection, keyCode) {
|
|
14522
|
+
MultiSelect.prototype.scrollBottom = function (selectedLI, activeIndex, isInitialSelection, keyCode, isInitial) {
|
|
14237
14523
|
if (isInitialSelection === void 0) { isInitialSelection = false; }
|
|
14238
14524
|
if (keyCode === void 0) { keyCode = null; }
|
|
14525
|
+
if (isInitial === void 0) { isInitial = false; }
|
|
14239
14526
|
if ((!isNullOrUndefined(selectedLI) && selectedLI.classList.contains('e-virtual-list')) ||
|
|
14240
14527
|
(this.enableVirtualization && isNullOrUndefined(selectedLI))) {
|
|
14241
14528
|
selectedLI = this.liCollections[this.skeletonCount];
|
|
@@ -14289,8 +14576,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14289
14576
|
}
|
|
14290
14577
|
}
|
|
14291
14578
|
else {
|
|
14292
|
-
this.list.scrollTop = this.virtualListInfo &&
|
|
14293
|
-
this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight
|
|
14579
|
+
this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ?
|
|
14580
|
+
isInitial && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight +
|
|
14581
|
+
(this.listItemHeight * 2) : this.virtualListInfo.startIndex * this.listItemHeight : 0;
|
|
14294
14582
|
}
|
|
14295
14583
|
isScrollerCHanged = this.isKeyBoardAction;
|
|
14296
14584
|
}
|
|
@@ -14492,6 +14780,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14492
14780
|
this.getDataByValue(this.getFormattedValue(selectedElem.getAttribute('data-value'))) :
|
|
14493
14781
|
selectedElem.getAttribute('data-value');
|
|
14494
14782
|
this.removeValue(currentChip, e);
|
|
14783
|
+
this.updateDelimeter(this.delimiterChar, e);
|
|
14495
14784
|
this.makeTextBoxEmpty();
|
|
14496
14785
|
}
|
|
14497
14786
|
if (this.closePopupOnSelect) {
|
|
@@ -14614,7 +14903,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14614
14903
|
return;
|
|
14615
14904
|
}
|
|
14616
14905
|
var index = this.getIndexByValue(focusedLi.getAttribute('data-value'));
|
|
14617
|
-
if (index === 0
|
|
14906
|
+
if (index === 0) {
|
|
14618
14907
|
position = 1;
|
|
14619
14908
|
}
|
|
14620
14909
|
if (index === (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem)').length - 1)) {
|
|
@@ -15270,6 +15559,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15270
15559
|
if (this.headerTemplate) {
|
|
15271
15560
|
this.setHeaderTemplate();
|
|
15272
15561
|
overAllHeight -= this.header.offsetHeight;
|
|
15562
|
+
this.isUpdateHeaderHeight = this.header.offsetHeight !== 0;
|
|
15273
15563
|
}
|
|
15274
15564
|
append([this.list], this.popupWrapper);
|
|
15275
15565
|
if (!this.list.classList.contains(dropDownBaseClasses.noData) && this.getItems()[1]) {
|
|
@@ -15307,6 +15597,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15307
15597
|
if (this.footerTemplate) {
|
|
15308
15598
|
this.setFooterTemplate();
|
|
15309
15599
|
overAllHeight -= this.footer.offsetHeight;
|
|
15600
|
+
this.isUpdateFooterHeight = this.footer.offsetHeight !== 0;
|
|
15310
15601
|
}
|
|
15311
15602
|
if (this.mode === 'CheckBox' && this.showSelectAll) {
|
|
15312
15603
|
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
@@ -15424,6 +15715,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15424
15715
|
if (this.mode === 'CheckBox' && Browser.isDevice && this.allowFiltering && this.isDeviceFullScreen) {
|
|
15425
15716
|
this.notify('deviceSearchBox', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
15426
15717
|
}
|
|
15718
|
+
if (this.allowResize) {
|
|
15719
|
+
this.setResize();
|
|
15720
|
+
}
|
|
15427
15721
|
this.popupObj.close();
|
|
15428
15722
|
this.popupWrapper.style.visibility = '';
|
|
15429
15723
|
}
|
|
@@ -15547,6 +15841,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15547
15841
|
if (this.enabled && !this.readonly) {
|
|
15548
15842
|
var temp = void 0;
|
|
15549
15843
|
this.setDynValue = false;
|
|
15844
|
+
this.isClearAllAction = true;
|
|
15550
15845
|
if (this.value && this.value.length > 0) {
|
|
15551
15846
|
if (this.allowFiltering) {
|
|
15552
15847
|
this.refreshListItems(null);
|
|
@@ -15593,6 +15888,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15593
15888
|
this.previousStartIndex = 0;
|
|
15594
15889
|
this.previousEndIndex = 0;
|
|
15595
15890
|
}
|
|
15891
|
+
this.isClearAllAction = false;
|
|
15596
15892
|
}
|
|
15597
15893
|
this.isClearAllItem = true;
|
|
15598
15894
|
EventHandler.add(document, 'mouseup', this.preventSelection, this);
|
|
@@ -15623,6 +15919,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15623
15919
|
if (this.isPopupOpen()) {
|
|
15624
15920
|
this.refreshPopup();
|
|
15625
15921
|
}
|
|
15922
|
+
if (this.allowResize) {
|
|
15923
|
+
this.setResize();
|
|
15924
|
+
}
|
|
15626
15925
|
if (!this.inputFocus) {
|
|
15627
15926
|
if (this.changeOnBlur) {
|
|
15628
15927
|
this.updateValueState(e, this.value, tempValues);
|
|
@@ -16437,6 +16736,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16437
16736
|
}
|
|
16438
16737
|
this.checkSelectAll();
|
|
16439
16738
|
this.refreshPopup();
|
|
16739
|
+
if (this.allowResize) {
|
|
16740
|
+
this.setResize();
|
|
16741
|
+
}
|
|
16440
16742
|
if (this.hideSelectedItem) {
|
|
16441
16743
|
this.focusAtFirstListItem();
|
|
16442
16744
|
}
|
|
@@ -16951,6 +17253,22 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16951
17253
|
EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
|
|
16952
17254
|
}
|
|
16953
17255
|
};
|
|
17256
|
+
MultiSelect.prototype.resizingWireEvent = function () {
|
|
17257
|
+
// Mouse events
|
|
17258
|
+
EventHandler.add(document, 'mousemove', this.resizePopup, this);
|
|
17259
|
+
EventHandler.add(document, 'mouseup', this.stopResizing, this);
|
|
17260
|
+
// Touch events
|
|
17261
|
+
EventHandler.add(document, 'touchmove', this.resizePopup, this);
|
|
17262
|
+
EventHandler.add(document, 'touchend', this.stopResizing, this);
|
|
17263
|
+
};
|
|
17264
|
+
MultiSelect.prototype.resizingUnWireEvent = function () {
|
|
17265
|
+
// Mouse events
|
|
17266
|
+
EventHandler.remove(document, 'mousemove', this.resizePopup);
|
|
17267
|
+
EventHandler.remove(document, 'mouseup', this.stopResizing);
|
|
17268
|
+
// Touch events
|
|
17269
|
+
EventHandler.remove(document, 'touchmove', this.resizePopup);
|
|
17270
|
+
EventHandler.remove(document, 'touchend', this.stopResizing);
|
|
17271
|
+
};
|
|
16954
17272
|
MultiSelect.prototype.selectAllItem = function (state, event, list) {
|
|
16955
17273
|
var li;
|
|
16956
17274
|
if (!isNullOrUndefined(this.list)) {
|
|
@@ -17477,6 +17795,20 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17477
17795
|
this.enableRTL(newProp.enableRtl);
|
|
17478
17796
|
_super.prototype.onPropertyChanged.call(this, newProp, oldProp);
|
|
17479
17797
|
break;
|
|
17798
|
+
case 'allowResize':
|
|
17799
|
+
this.allowResize = newProp.allowResize;
|
|
17800
|
+
if (!this.allowResize && this.popupObj) {
|
|
17801
|
+
var overAllHeight = parseInt(this.popupHeight, 10);
|
|
17802
|
+
if (this.popupHeight !== 'auto') {
|
|
17803
|
+
this.list.style.maxHeight = formatUnit(overAllHeight);
|
|
17804
|
+
this.popupWrapper.style.height = formatUnit(this.popupHeight);
|
|
17805
|
+
this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight);
|
|
17806
|
+
}
|
|
17807
|
+
else {
|
|
17808
|
+
this.list.style.maxHeight = formatUnit(this.popupHeight);
|
|
17809
|
+
}
|
|
17810
|
+
}
|
|
17811
|
+
break;
|
|
17480
17812
|
case 'readonly':
|
|
17481
17813
|
this.updateReadonly(newProp.readonly);
|
|
17482
17814
|
this.hidePopup();
|
|
@@ -17721,6 +18053,24 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17721
18053
|
if (_this.mode === 'CheckBox' && _this.showSelectAll) {
|
|
17722
18054
|
EventHandler.remove(_this.popupObj.element, 'click', _this.clickHandler);
|
|
17723
18055
|
}
|
|
18056
|
+
if (_this.list && _this.list.parentElement && _this.allowResize) {
|
|
18057
|
+
if (_this.resizer && _this.list.parentElement.contains(_this.resizer)) {
|
|
18058
|
+
_this.list.parentElement.removeChild(_this.resizer);
|
|
18059
|
+
}
|
|
18060
|
+
if (_this.list.parentElement.classList.contains('e-resize')) {
|
|
18061
|
+
_this.list.parentElement.classList.remove('e-resize');
|
|
18062
|
+
}
|
|
18063
|
+
_this.list.parentElement.style.boxSizing = '';
|
|
18064
|
+
_this.list.parentElement.style.paddingBottom = '';
|
|
18065
|
+
var overAllHeight = parseInt(_this.popupHeight, 10);
|
|
18066
|
+
_this.list.style.maxHeight = formatUnit(overAllHeight);
|
|
18067
|
+
_this.list.parentElement.style.height = formatUnit(_this.popupHeight);
|
|
18068
|
+
_this.list.parentElement.style.maxHeight = formatUnit(_this.popupHeight);
|
|
18069
|
+
}
|
|
18070
|
+
if (_this.resizer) {
|
|
18071
|
+
EventHandler.remove(_this.resizer, 'mousedown', _this.startResizing);
|
|
18072
|
+
_this.resizer.remove();
|
|
18073
|
+
}
|
|
17724
18074
|
if (_this.enableVirtualization && _this.mode === 'CheckBox' && _this.value && _this.value.length > 0 &&
|
|
17725
18075
|
_this.enableSelectionOrder) {
|
|
17726
18076
|
_this.viewPortInfo.startIndex = _this.virtualItemStartIndex = 0;
|
|
@@ -17838,6 +18188,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17838
18188
|
}
|
|
17839
18189
|
}
|
|
17840
18190
|
}
|
|
18191
|
+
if (_this.allowResize) {
|
|
18192
|
+
_this.setResize();
|
|
18193
|
+
}
|
|
17841
18194
|
_this.preventSetCurrentData = true;
|
|
17842
18195
|
}
|
|
17843
18196
|
});
|
|
@@ -18023,6 +18376,102 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18023
18376
|
}
|
|
18024
18377
|
this.renderComplete();
|
|
18025
18378
|
};
|
|
18379
|
+
MultiSelect.prototype.setResize = function () {
|
|
18380
|
+
var resizePaddingBottom = 16;
|
|
18381
|
+
if (this.list && this.list.parentElement && isNullOrUndefined(this.list.parentElement.querySelector('.e-resizer-right.e-icons'))) {
|
|
18382
|
+
this.resizer = this.createElement('div', {
|
|
18383
|
+
id: this.element.id + '_resize-popup',
|
|
18384
|
+
className: RESIZE_ICON
|
|
18385
|
+
});
|
|
18386
|
+
}
|
|
18387
|
+
if (this.mode === 'CheckBox' && this.showSelectAll && this.selectAllHeight && this.selectAllHeight !== 0) {
|
|
18388
|
+
this.storedSelectAllHeight = this.selectAllHeight;
|
|
18389
|
+
}
|
|
18390
|
+
if (this.list && this.list.parentElement) {
|
|
18391
|
+
this.list.parentElement.classList.add('e-resize');
|
|
18392
|
+
if (this.popupHeight.toString().toLowerCase() !== 'auto') {
|
|
18393
|
+
this.list.parentElement.style.height = '100%';
|
|
18394
|
+
}
|
|
18395
|
+
this.list.parentElement.style.boxSizing = 'border-box'; // Ensures padding doesn't affect element size
|
|
18396
|
+
var paddingBottom = this.mode === 'CheckBox' && this.searchBoxHeight ? this.searchBoxHeight + resizePaddingBottom + (this.showSelectAll ? this.storedSelectAllHeight : 0) : resizePaddingBottom;
|
|
18397
|
+
this.list.parentElement.style.paddingBottom = paddingBottom + "px";
|
|
18398
|
+
this.list.parentElement.appendChild(this.resizer);
|
|
18399
|
+
this.list.parentElement.style.width = this.resizeWidth + 'px';
|
|
18400
|
+
this.list.parentElement.style.height = this.resizeHeight + 'px';
|
|
18401
|
+
this.list.parentElement.style.maxHeight = this.resizeHeight + 'px';
|
|
18402
|
+
this.list.style.maxHeight = this.resizeHeight + "px";
|
|
18403
|
+
}
|
|
18404
|
+
if (this.resizer) {
|
|
18405
|
+
EventHandler.add(this.resizer, 'mousedown', this.startResizing, this);
|
|
18406
|
+
EventHandler.add(this.resizer, 'touchstart', this.startResizing, this);
|
|
18407
|
+
}
|
|
18408
|
+
};
|
|
18409
|
+
MultiSelect.prototype.startResizing = function (event) {
|
|
18410
|
+
this.isResizing = true;
|
|
18411
|
+
this.trigger('resizeStart', event);
|
|
18412
|
+
// Get initial touch or mouse coordinates
|
|
18413
|
+
var clientX = (event instanceof MouseEvent) ? event.clientX : event.touches[0].clientX;
|
|
18414
|
+
var clientY = (event instanceof MouseEvent) ? event.clientY : event.touches[0].clientY;
|
|
18415
|
+
if (this.list && this.list.parentElement) {
|
|
18416
|
+
this.originalWidth = this.list.parentElement.offsetWidth;
|
|
18417
|
+
this.originalHeight = this.list.parentElement.offsetHeight;
|
|
18418
|
+
this.originalMouseX = clientX;
|
|
18419
|
+
this.originalMouseY = clientY;
|
|
18420
|
+
}
|
|
18421
|
+
this.resizingWireEvent();
|
|
18422
|
+
// Prevent default behavior like text selection
|
|
18423
|
+
if (event) {
|
|
18424
|
+
event.preventDefault();
|
|
18425
|
+
}
|
|
18426
|
+
};
|
|
18427
|
+
MultiSelect.prototype.resizePopup = function (event) {
|
|
18428
|
+
if (!this.isResizing) {
|
|
18429
|
+
return;
|
|
18430
|
+
}
|
|
18431
|
+
this.trigger('resizing', event);
|
|
18432
|
+
// Get the current touch or mouse position
|
|
18433
|
+
var clientX = (event instanceof MouseEvent) ? event.clientX : event.touches[0].clientX;
|
|
18434
|
+
var clientY = (event instanceof MouseEvent) ? event.clientY : event.touches[0].clientY;
|
|
18435
|
+
// Calculate the new width and height based on drag
|
|
18436
|
+
var dx = clientX - this.originalMouseX;
|
|
18437
|
+
var dy = clientY - this.originalMouseY;
|
|
18438
|
+
// Set minimum width and height (100px)
|
|
18439
|
+
var minWidth = 100;
|
|
18440
|
+
var minHeight = 130;
|
|
18441
|
+
// Ensure the new width and height are not smaller than the minimum
|
|
18442
|
+
this.resizeWidth = Math.max(this.originalWidth + dx, minWidth);
|
|
18443
|
+
this.resizeHeight = Math.max(this.originalHeight + dy, minHeight);
|
|
18444
|
+
if (this.list && this.list.parentElement) {
|
|
18445
|
+
// Set minimum width and height (100px)
|
|
18446
|
+
var minWidth_1 = parseInt(window.getComputedStyle(this.list.parentElement).minWidth, 10);
|
|
18447
|
+
var minHeight_1 = parseInt(window.getComputedStyle(this.list.parentElement).minHeight, 10);
|
|
18448
|
+
minWidth_1 = minWidth_1 || 100;
|
|
18449
|
+
minHeight_1 = minHeight_1 || 120;
|
|
18450
|
+
// Ensure the new width and height are not smaller than the minimum
|
|
18451
|
+
this.resizeWidth = Math.max(this.originalWidth + dx, minWidth_1);
|
|
18452
|
+
this.resizeHeight = Math.max(this.originalHeight + dy, minHeight_1);
|
|
18453
|
+
this.list.parentElement.style.width = this.resizeWidth + "px";
|
|
18454
|
+
this.list.parentElement.style.height = this.resizeHeight + "px";
|
|
18455
|
+
this.list.parentElement.style.maxHeight = this.resizeHeight + "px";
|
|
18456
|
+
this.list.style.maxHeight = this.resizeHeight + "px";
|
|
18457
|
+
if (this.fixedHeaderElement && this.ulElement) {
|
|
18458
|
+
this.fixedHeaderElement.style.width = this.ulElement.offsetWidth + "px";
|
|
18459
|
+
}
|
|
18460
|
+
}
|
|
18461
|
+
if (event) {
|
|
18462
|
+
event.preventDefault();
|
|
18463
|
+
}
|
|
18464
|
+
};
|
|
18465
|
+
MultiSelect.prototype.stopResizing = function (event) {
|
|
18466
|
+
if (this.isResizing) {
|
|
18467
|
+
this.isResizing = false;
|
|
18468
|
+
this.trigger('resizeStop', event);
|
|
18469
|
+
this.resizingUnWireEvent();
|
|
18470
|
+
}
|
|
18471
|
+
if (event) {
|
|
18472
|
+
event.preventDefault();
|
|
18473
|
+
}
|
|
18474
|
+
};
|
|
18026
18475
|
MultiSelect.prototype.getListHeight = function () {
|
|
18027
18476
|
var listParent = this.createElement('div', {
|
|
18028
18477
|
className: 'e-dropdownbase'
|
|
@@ -18410,6 +18859,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18410
18859
|
this.inputElement = null;
|
|
18411
18860
|
this.delimiterWrapper = null;
|
|
18412
18861
|
this.liCollections = null;
|
|
18862
|
+
this.popupContentElement = null;
|
|
18413
18863
|
this.header = null;
|
|
18414
18864
|
this.mainList = null;
|
|
18415
18865
|
this.mainListCollection = null;
|
|
@@ -18519,6 +18969,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18519
18969
|
__decorate$5([
|
|
18520
18970
|
Property(false)
|
|
18521
18971
|
], MultiSelect.prototype, "readonly", void 0);
|
|
18972
|
+
__decorate$5([
|
|
18973
|
+
Property(false)
|
|
18974
|
+
], MultiSelect.prototype, "allowResize", void 0);
|
|
18522
18975
|
__decorate$5([
|
|
18523
18976
|
Property(null)
|
|
18524
18977
|
], MultiSelect.prototype, "text", void 0);
|
|
@@ -18600,6 +19053,15 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18600
19053
|
__decorate$5([
|
|
18601
19054
|
Event()
|
|
18602
19055
|
], MultiSelect.prototype, "chipSelection", void 0);
|
|
19056
|
+
__decorate$5([
|
|
19057
|
+
Event()
|
|
19058
|
+
], MultiSelect.prototype, "resizeStop", void 0);
|
|
19059
|
+
__decorate$5([
|
|
19060
|
+
Event()
|
|
19061
|
+
], MultiSelect.prototype, "resizing", void 0);
|
|
19062
|
+
__decorate$5([
|
|
19063
|
+
Event()
|
|
19064
|
+
], MultiSelect.prototype, "resizeStart", void 0);
|
|
18603
19065
|
__decorate$5([
|
|
18604
19066
|
Event()
|
|
18605
19067
|
], MultiSelect.prototype, "filtering", void 0);
|
|
@@ -19348,7 +19810,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19348
19810
|
new Sortable(this.ulElement, {
|
|
19349
19811
|
scope: this.scope,
|
|
19350
19812
|
itemClass: 'e-list-item',
|
|
19351
|
-
|
|
19813
|
+
beforeDragStart: this.triggerDragStart.bind(this),
|
|
19352
19814
|
drag: this.triggerDrag.bind(this),
|
|
19353
19815
|
beforeDrop: this.beforeDragEnd.bind(this),
|
|
19354
19816
|
drop: this.dragEnd.bind(this),
|
|
@@ -19598,11 +20060,11 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19598
20060
|
ListBox.prototype.triggerDragStart = function (args) {
|
|
19599
20061
|
var _this = this;
|
|
19600
20062
|
var badge;
|
|
19601
|
-
|
|
20063
|
+
var extendedArgs = extend(this.getDragArgs(args), { dragSelected: true }, { cancel: false });
|
|
19602
20064
|
if (Browser.isIos) {
|
|
19603
20065
|
this.list.style.overflow = 'hidden';
|
|
19604
20066
|
}
|
|
19605
|
-
this.trigger('dragStart',
|
|
20067
|
+
this.trigger('dragStart', extendedArgs, function (dragEventArgs) {
|
|
19606
20068
|
_this.allowDragAll = dragEventArgs.dragSelected;
|
|
19607
20069
|
if (!_this.allowDragAll) {
|
|
19608
20070
|
badge = _this.ulElement.getElementsByClassName('e-list-badge')[0];
|
|
@@ -19610,6 +20072,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19610
20072
|
detach(badge);
|
|
19611
20073
|
}
|
|
19612
20074
|
}
|
|
20075
|
+
if (dragEventArgs.cancel) {
|
|
20076
|
+
args.cancel = true;
|
|
20077
|
+
}
|
|
19613
20078
|
});
|
|
19614
20079
|
};
|
|
19615
20080
|
ListBox.prototype.triggerDrag = function (args) {
|
|
@@ -19840,7 +20305,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19840
20305
|
listObj.liCollections = liColl;
|
|
19841
20306
|
listObj.jsonData = extend([], [], jsonData, false);
|
|
19842
20307
|
listObj.listData = extend([], [], listData, false);
|
|
19843
|
-
listObj.
|
|
20308
|
+
if (listObj.sortOrder === 'None') {
|
|
20309
|
+
listObj.sortedData = extend([], [], sortedData, false);
|
|
20310
|
+
}
|
|
19844
20311
|
if (this.listData.length === 0) {
|
|
19845
20312
|
this.l10nUpdate();
|
|
19846
20313
|
}
|
|
@@ -22196,6 +22663,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
22196
22663
|
this.hidePopup();
|
|
22197
22664
|
this.lineBreak = true;
|
|
22198
22665
|
}
|
|
22666
|
+
else if ((e.key === 'Backspace' || e.key === 'Delete') && this.range && this.range.startOffset !== this.range.endOffset) {
|
|
22667
|
+
this.range.deleteContents();
|
|
22668
|
+
}
|
|
22199
22669
|
return;
|
|
22200
22670
|
}
|
|
22201
22671
|
if (lastWordRange.includes(this.mentionChar)) {
|
|
@@ -22973,7 +23443,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
22973
23443
|
};
|
|
22974
23444
|
Mention.prototype.scrollTop = function () {
|
|
22975
23445
|
if (!isNullOrUndefined(this.selectedLI)) {
|
|
22976
|
-
var nextOffset = this.
|
|
23446
|
+
var nextOffset = !isNullOrUndefined(this.fields.groupBy) && !isNullOrUndefined(this.fixedHeaderElement) ?
|
|
23447
|
+
this.selectedLI.offsetTop - (this.list.scrollTop + this.fixedHeaderElement.offsetHeight) :
|
|
23448
|
+
this.selectedLI.offsetTop - this.list.scrollTop;
|
|
22977
23449
|
nextOffset = this.fields.groupBy && nextOffset;
|
|
22978
23450
|
var boxRange = (this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop);
|
|
22979
23451
|
if (this.activeIndex === 0) {
|