@syncfusion/ej2-dropdowns 29.1.38 → 29.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-dropdowns.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +54 -9
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +60 -15
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +2 -2
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/common/incremental-search.js +1 -1
- package/src/common/virtual-scroll.js +14 -6
- package/src/drop-down-base/drop-down-base.d.ts +2 -0
- package/src/drop-down-base/drop-down-base.js +27 -4
- package/src/mention/mention.js +6 -1
- package/src/multi-select/multi-select.d.ts +0 -1
- package/src/multi-select/multi-select.js +12 -3
- package/styles/bds-lite.css +5 -0
- package/styles/bds.css +5 -0
- package/styles/bootstrap-dark-lite.css +5 -0
- package/styles/bootstrap-dark.css +5 -0
- package/styles/bootstrap-lite.css +12 -0
- package/styles/bootstrap.css +12 -0
- package/styles/bootstrap4-lite.css +12 -0
- package/styles/bootstrap4.css +12 -0
- package/styles/bootstrap5-dark-lite.css +12 -0
- package/styles/bootstrap5-dark.css +12 -0
- package/styles/bootstrap5-lite.css +12 -0
- package/styles/bootstrap5.3-lite.css +12 -0
- package/styles/bootstrap5.3.css +12 -0
- package/styles/bootstrap5.css +12 -0
- package/styles/drop-down-list/_bootstrap-dark-definition.scss +1 -0
- package/styles/drop-down-list/_bootstrap-definition.scss +1 -0
- package/styles/drop-down-list/_bootstrap4-definition.scss +1 -0
- package/styles/drop-down-list/_bootstrap5-definition.scss +1 -0
- package/styles/drop-down-list/_bootstrap5.3-definition.scss +1 -0
- package/styles/drop-down-list/_fabric-dark-definition.scss +1 -0
- package/styles/drop-down-list/_fabric-definition.scss +1 -0
- package/styles/drop-down-list/_highcontrast-definition.scss +1 -0
- package/styles/drop-down-list/_highcontrast-light-definition.scss +1 -0
- package/styles/drop-down-list/_layout.scss +20 -0
- package/styles/drop-down-list/bds.css +5 -0
- package/styles/drop-down-list/bootstrap-dark.css +5 -0
- package/styles/drop-down-list/bootstrap.css +12 -0
- package/styles/drop-down-list/bootstrap4.css +12 -0
- package/styles/drop-down-list/bootstrap5-dark.css +12 -0
- package/styles/drop-down-list/bootstrap5.3.css +12 -0
- package/styles/drop-down-list/bootstrap5.css +12 -0
- package/styles/drop-down-list/fabric-dark.css +5 -0
- package/styles/drop-down-list/fabric.css +10 -0
- package/styles/drop-down-list/fluent-dark.css +5 -0
- package/styles/drop-down-list/fluent.css +5 -0
- package/styles/drop-down-list/fluent2.css +5 -0
- package/styles/drop-down-list/highcontrast-light.css +5 -0
- package/styles/drop-down-list/highcontrast.css +10 -0
- package/styles/drop-down-list/material-dark.css +5 -0
- package/styles/drop-down-list/material.css +5 -0
- package/styles/drop-down-list/material3-dark.css +5 -0
- package/styles/drop-down-list/material3.css +5 -0
- package/styles/drop-down-list/tailwind-dark.css +5 -0
- package/styles/drop-down-list/tailwind.css +5 -0
- package/styles/drop-down-list/tailwind3.css +5 -0
- package/styles/fabric-dark-lite.css +5 -0
- package/styles/fabric-dark.css +5 -0
- package/styles/fabric-lite.css +10 -0
- package/styles/fabric.css +10 -0
- package/styles/fluent-dark-lite.css +5 -0
- package/styles/fluent-dark.css +5 -0
- package/styles/fluent-lite.css +5 -0
- package/styles/fluent.css +5 -0
- package/styles/fluent2-lite.css +5 -0
- package/styles/fluent2.css +5 -0
- package/styles/highcontrast-light-lite.css +5 -0
- package/styles/highcontrast-light.css +5 -0
- package/styles/highcontrast-lite.css +10 -0
- package/styles/highcontrast.css +10 -0
- package/styles/material-dark-lite.css +5 -0
- package/styles/material-dark.css +5 -0
- package/styles/material-lite.css +14 -0
- package/styles/material.css +14 -0
- package/styles/material3-dark-lite.css +5 -0
- package/styles/material3-dark.css +5 -0
- package/styles/material3-lite.css +5 -0
- package/styles/material3.css +5 -0
- package/styles/multi-select/_material-definition.scss +9 -0
- package/styles/multi-select/material.css +9 -0
- package/styles/tailwind-dark-lite.css +5 -0
- package/styles/tailwind-dark.css +5 -0
- package/styles/tailwind-lite.css +5 -0
- package/styles/tailwind.css +5 -0
- package/styles/tailwind3-lite.css +5 -0
- package/styles/tailwind3.css +5 -0
|
@@ -149,7 +149,7 @@ function Search(inputVal, items, searchType, ignoreCase, dataSource, fields, typ
|
|
|
149
149
|
dataSource.filter(function (data) {
|
|
150
150
|
Array.prototype.slice.call(fieldValue_1).forEach(function (value) {
|
|
151
151
|
/* eslint-disable security/detect-object-injection */
|
|
152
|
-
if ((type === 'object' && !data.isHeader && checkField_1.textContent.toString().indexOf(data[value]) !== -1 && checkField_1.getAttribute('data-value') === data[fields.value].toString()) ||
|
|
152
|
+
if ((type === 'object' && !data.isHeader && checkField_1.textContent.toString().indexOf(data[value]) !== -1 && data[fields.value] != null && checkField_1.getAttribute('data-value') === data[fields.value].toString()) ||
|
|
153
153
|
(type === 'string' && checkField_1.textContent.toString().indexOf(data) !== -1)) {
|
|
154
154
|
filterValue = type === 'object' ? data[value] : data;
|
|
155
155
|
}
|
|
@@ -448,11 +448,15 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
448
448
|
if (this.parent.viewPortInfo.startIndex < this.parent.value.length) {
|
|
449
449
|
endIndex = this.parent.viewPortInfo.endIndex - this.parent.value.length;
|
|
450
450
|
if (this.parent.viewPortInfo.startIndex === 0) {
|
|
451
|
+
var oldUlElement = this.parent.list.querySelector('.e-list-parent' + ':not(.e-reorder)');
|
|
452
|
+
if (oldUlElement) {
|
|
453
|
+
this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement);
|
|
454
|
+
}
|
|
451
455
|
this.parent.updateVirtualReOrderList(true);
|
|
452
456
|
if (this.parent.value.length < this.parent.itemCount && this.parent.value.length !== this.parent.totalItemCount) {
|
|
453
|
-
var
|
|
454
|
-
if (
|
|
455
|
-
this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(
|
|
457
|
+
var oldUlElement_1 = this.parent.list.querySelector('.e-list-parent' + ':not(.e-reorder)');
|
|
458
|
+
if (oldUlElement_1) {
|
|
459
|
+
this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement_1);
|
|
456
460
|
}
|
|
457
461
|
var query = this.parent.getForQuery(this.parent.value).clone();
|
|
458
462
|
query = query.skip(0)
|
|
@@ -466,9 +470,9 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
466
470
|
isListUpdated = false;
|
|
467
471
|
}
|
|
468
472
|
else {
|
|
469
|
-
var
|
|
470
|
-
if (
|
|
471
|
-
this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(
|
|
473
|
+
var oldUlElement_2 = this.parent.list.querySelector('.e-list-parent' + ':not(.e-reorder)');
|
|
474
|
+
if (oldUlElement_2) {
|
|
475
|
+
this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement_2);
|
|
472
476
|
}
|
|
473
477
|
}
|
|
474
478
|
isListUpdated = false;
|
|
@@ -488,6 +492,10 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
488
492
|
query = query.skip(0).take(this.parent.itemCount - (this.parent.value.length - this.parent.viewPortInfo.startIndex));
|
|
489
493
|
this.parent.appendUncheckList = true;
|
|
490
494
|
this.parent.setCurrentView = false;
|
|
495
|
+
var oldUlElement = this.parent.list.querySelector('.e-list-parent' + ':not(.e-reorder)');
|
|
496
|
+
if (oldUlElement) {
|
|
497
|
+
this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement);
|
|
498
|
+
}
|
|
491
499
|
this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
|
|
492
500
|
isListUpdated = false;
|
|
493
501
|
this.parent.appendUncheckList = this.parent.dataSource instanceof DataManager ? this.parent.appendUncheckList : false;
|
|
@@ -967,6 +975,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
967
975
|
_this.skeletonCount = 32;
|
|
968
976
|
_this.isVirtualTrackHeight = false;
|
|
969
977
|
_this.virtualSelectAll = false;
|
|
978
|
+
_this.isVirtualReorder = false;
|
|
970
979
|
_this.incrementalQueryString = '';
|
|
971
980
|
_this.incrementalEndIndex = 0;
|
|
972
981
|
_this.incrementalStartIndex = 0;
|
|
@@ -1665,7 +1674,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1665
1674
|
var newQuery = _this.getQuery(eventArgs.query);
|
|
1666
1675
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1667
1676
|
if (_this.isVirtualizationEnabled && (listItems.count !== 0 &&
|
|
1668
|
-
listItems.count < (_this.itemCount * 2))) {
|
|
1677
|
+
listItems.count < (_this.itemCount * 2)) && !_this.appendUncheckList) {
|
|
1669
1678
|
if (newQuery) {
|
|
1670
1679
|
for (var queryElements = 0; queryElements < newQuery.queries.length; queryElements++) {
|
|
1671
1680
|
if (newQuery.queries[queryElements].fn === 'onTake') {
|
|
@@ -2163,7 +2172,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2163
2172
|
var oldUlElement = this.list.querySelector('.e-list-parent' + ':not(.e-reorder)');
|
|
2164
2173
|
var virtualUlElement = this.list.querySelector('.e-virtual-ddl-content');
|
|
2165
2174
|
var isRemovedUlelement = false;
|
|
2166
|
-
if (!oldUlElement && this.list.querySelector('.e-list-parent' + '.e-reorder')) {
|
|
2175
|
+
if ((!oldUlElement && this.list.querySelector('.e-list-parent' + '.e-reorder')) || (oldUlElement && this.isVirtualReorder && this.list.querySelector('.e-list-parent' + '.e-reorder'))) {
|
|
2167
2176
|
oldUlElement = this.list.querySelector('.e-list-parent' + '.e-reorder');
|
|
2168
2177
|
}
|
|
2169
2178
|
if ((listData.length >= this.virtualizedItemsCount && oldUlElement && virtualUlElement) || (oldUlElement && virtualUlElement && this.isAllowFiltering) || (oldUlElement && virtualUlElement && (this.getModuleName() === 'autocomplete' || this.getModuleName() === 'multiselect')) || isRemovedUlelement) {
|
|
@@ -2259,7 +2268,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2259
2268
|
}
|
|
2260
2269
|
setStyleAttribute(this.fixedHeaderElement, { zIndex: 10 });
|
|
2261
2270
|
var firstLi = this.ulElement.querySelector('.' + dropDownBaseClasses.group + ':not(.e-hide-listitem)');
|
|
2262
|
-
|
|
2271
|
+
if (!isNullOrUndefined(firstLi)) {
|
|
2272
|
+
this.fixedHeaderElement.innerHTML = firstLi.innerHTML;
|
|
2273
|
+
}
|
|
2263
2274
|
};
|
|
2264
2275
|
DropDownBase.prototype.getSortedDataSource = function (dataSource) {
|
|
2265
2276
|
if (dataSource && this.sortOrder !== 'None') {
|
|
@@ -2485,7 +2496,11 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2485
2496
|
var group = this.element.querySelector('select>optgroup');
|
|
2486
2497
|
if ((this.fields.groupBy || !isNullOrUndefined(group)) && !this.isGroupChecking) {
|
|
2487
2498
|
EventHandler.add(this.list, 'scroll', this.setFloatingHeader, this);
|
|
2488
|
-
|
|
2499
|
+
var elements = this.getScrollableParent();
|
|
2500
|
+
for (var i = 0; i < elements.length; i++) {
|
|
2501
|
+
var ele = elements[i];
|
|
2502
|
+
EventHandler.add(ele, 'scroll', this.updateGroupFixedHeader, this);
|
|
2503
|
+
}
|
|
2489
2504
|
}
|
|
2490
2505
|
if (this.getModuleName() === 'dropdownbase') {
|
|
2491
2506
|
if (this.element.getAttribute('tabindex')) {
|
|
@@ -2503,6 +2518,22 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2503
2518
|
this.initialize(e);
|
|
2504
2519
|
}
|
|
2505
2520
|
};
|
|
2521
|
+
DropDownBase.prototype.getScrollableParent = function () {
|
|
2522
|
+
var eleStyle = getComputedStyle(this.element);
|
|
2523
|
+
var scrollParents = [];
|
|
2524
|
+
var overflowRegex = /(auto|scroll)/;
|
|
2525
|
+
var parent = this.element.parentElement;
|
|
2526
|
+
while (parent && parent.tagName !== 'HTML') {
|
|
2527
|
+
var parentStyle = getComputedStyle(parent);
|
|
2528
|
+
if (!(eleStyle.position === 'absolute' && parentStyle.position === 'static')
|
|
2529
|
+
&& overflowRegex.test(parentStyle.overflow + parentStyle.overflowY + parentStyle.overflowX)) {
|
|
2530
|
+
scrollParents.push(parent);
|
|
2531
|
+
}
|
|
2532
|
+
parent = parent.parentElement;
|
|
2533
|
+
}
|
|
2534
|
+
scrollParents.push(document);
|
|
2535
|
+
return scrollParents;
|
|
2536
|
+
};
|
|
2506
2537
|
DropDownBase.prototype.removeScrollEvent = function () {
|
|
2507
2538
|
if (this.list) {
|
|
2508
2539
|
EventHandler.remove(this.list, 'scroll', this.setFloatingHeader);
|
|
@@ -12823,7 +12854,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12823
12854
|
_this.isBlurDispatching = false;
|
|
12824
12855
|
_this.isFilterPrevented = false;
|
|
12825
12856
|
_this.isFilteringAction = false;
|
|
12826
|
-
_this.isVirtualReorder = false;
|
|
12827
12857
|
_this.isValidKey = false;
|
|
12828
12858
|
_this.selectAllEventData = [];
|
|
12829
12859
|
_this.selectAllEventEle = [];
|
|
@@ -13677,7 +13707,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13677
13707
|
}
|
|
13678
13708
|
}
|
|
13679
13709
|
}
|
|
13680
|
-
if ((this.allowFiltering && isSkip) || !isReOrder || (!this.allowFiltering && isSkip) && !this.isVirtualReorder) {
|
|
13710
|
+
if (((this.allowFiltering && isSkip) || !isReOrder || (!this.allowFiltering && isSkip)) && !this.isVirtualReorder) {
|
|
13681
13711
|
if (!isReOrder) {
|
|
13682
13712
|
filterQuery.skip(this.viewPortInfo.startIndex);
|
|
13683
13713
|
}
|
|
@@ -13841,10 +13871,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13841
13871
|
if (this.allowObjectBinding) {
|
|
13842
13872
|
var keys = this.listData && this.listData.length > 0 ? Object.keys(this.listData[0]) : this.firstItem ?
|
|
13843
13873
|
Object.keys(this.firstItem) : Object.keys(dataItem_1);
|
|
13874
|
+
var isNumberType_1 = (typeof getValue((this.fields.value ? this.fields.value : 'value'), customData)
|
|
13875
|
+
=== 'number' && this.fields.value !== this.fields.text);
|
|
13844
13876
|
// Create an empty object with predefined keys
|
|
13845
13877
|
keys.forEach(function (key) {
|
|
13846
13878
|
emptyObject_1[key] = ((key === fields.value) || (key === fields.text)) ?
|
|
13847
|
-
getValue(fields.
|
|
13879
|
+
((key === fields.text) && isNumberType_1) ? getValue(fields.text, dataItem_1) :
|
|
13880
|
+
getValue(fields.value, dataItem_1) : null;
|
|
13848
13881
|
});
|
|
13849
13882
|
}
|
|
13850
13883
|
dataItem_1 = this.allowObjectBinding ? emptyObject_1 : dataItem_1;
|
|
@@ -14139,6 +14172,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14139
14172
|
else {
|
|
14140
14173
|
this.trigger('change', eventArgs);
|
|
14141
14174
|
}
|
|
14175
|
+
if (this.enableVirtualization && this.enableSelectionOrder && this.mode === 'CheckBox') {
|
|
14176
|
+
this.preventSetCurrentData = false;
|
|
14177
|
+
}
|
|
14142
14178
|
this.updateTempValue();
|
|
14143
14179
|
if (!this.changeOnBlur) {
|
|
14144
14180
|
this.dispatchEvent(this.hiddenElement, 'change');
|
|
@@ -14671,6 +14707,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14671
14707
|
if (this.value && this.validateValues(this.value, temp)) {
|
|
14672
14708
|
if (this.mode !== 'CheckBox') {
|
|
14673
14709
|
this.value = temp;
|
|
14710
|
+
if (this.allowFiltering || this.allowCustomValue) {
|
|
14711
|
+
this.refreshListItems(null);
|
|
14712
|
+
}
|
|
14674
14713
|
this.initialValueUpdate();
|
|
14675
14714
|
}
|
|
14676
14715
|
if (this.mode !== 'Delimiter' && this.mode !== 'CheckBox') {
|
|
@@ -17843,6 +17882,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17843
17882
|
};
|
|
17844
17883
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17845
17884
|
MultiSelect.prototype.updateDataSource = function (prop) {
|
|
17885
|
+
this.checkAndResetCache();
|
|
17846
17886
|
if (isNullOrUndefined(this.list)) {
|
|
17847
17887
|
this.renderPopup();
|
|
17848
17888
|
}
|
|
@@ -23820,7 +23860,12 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
23820
23860
|
if (lastNode) {
|
|
23821
23861
|
range = range.cloneRange();
|
|
23822
23862
|
if (this.isRTE) {
|
|
23823
|
-
|
|
23863
|
+
if (lastNode.nodeType === 3) {
|
|
23864
|
+
range.setStart(lastNode, lastNode.textContent.length);
|
|
23865
|
+
}
|
|
23866
|
+
else {
|
|
23867
|
+
range.setStartAfter(lastNode);
|
|
23868
|
+
}
|
|
23824
23869
|
}
|
|
23825
23870
|
else {
|
|
23826
23871
|
range.setStartAfter(lastNode);
|