@syncfusion/ej2-dropdowns 32.1.20 → 32.1.22
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 +1 -1
- 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 +52 -19
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +54 -19
- 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 +3 -3
- package/src/common/virtual-scroll.js +4 -0
- package/src/drop-down-base/drop-down-base.js +5 -3
- package/src/mention/mention.d.ts +1 -0
- package/src/mention/mention.js +44 -15
- package/src/multi-select/multi-select.js +1 -1
- package/styles/bootstrap5.3-lite.css +1 -1
- package/styles/bootstrap5.3.css +1 -1
- package/styles/list-box/_bootstrap5.3-definition.scss +1 -1
- package/styles/list-box/bootstrap5.3.css +1 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 32.1.
|
|
3
|
+
* version : 32.1.22
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-dropdowns",
|
|
3
|
-
"version": "32.1.
|
|
3
|
+
"version": "32.1.22",
|
|
4
4
|
"description": "Essential JS 2 DropDown Components",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@syncfusion/ej2-base": "~32.1.19",
|
|
12
12
|
"@syncfusion/ej2-data": "~32.1.19",
|
|
13
|
-
"@syncfusion/ej2-inputs": "~32.1.
|
|
13
|
+
"@syncfusion/ej2-inputs": "~32.1.22",
|
|
14
14
|
"@syncfusion/ej2-lists": "~32.1.19",
|
|
15
15
|
"@syncfusion/ej2-navigations": "~32.1.19",
|
|
16
|
-
"@syncfusion/ej2-notifications": "~32.1.
|
|
16
|
+
"@syncfusion/ej2-notifications": "~32.1.22",
|
|
17
17
|
"@syncfusion/ej2-popups": "~32.1.19"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {},
|
|
@@ -262,6 +262,10 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
262
262
|
this.parent.totalItemsCount();
|
|
263
263
|
}
|
|
264
264
|
if (isListUpdated) {
|
|
265
|
+
if (this.component === 'multiselect' && this.parent.itemCount * 2 > this.parent.totalItemCount) {
|
|
266
|
+
this.parent.viewPortInfo.endIndex = endIndex = this.parent.totalItemCount;
|
|
267
|
+
this.parent.isVirtualTrackHeight = true;
|
|
268
|
+
}
|
|
265
269
|
for (var i = this.parent.viewPortInfo.startIndex; i < endIndex; i++) {
|
|
266
270
|
var index = i;
|
|
267
271
|
if (this.component === 'multiselect' && this.parent.mode === 'CheckBox') {
|
|
@@ -870,13 +870,15 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
870
870
|
var newQuery = _this.getQuery(eventArgs.query);
|
|
871
871
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
872
872
|
if (_this.isVirtualizationEnabled && (listItems.count !== 0 &&
|
|
873
|
-
listItems.count < (_this.itemCount * 2))
|
|
873
|
+
listItems.count < (_this.itemCount * 2))) {
|
|
874
874
|
if (newQuery) {
|
|
875
875
|
for (var queryElements = 0; queryElements < newQuery.queries.length; queryElements++) {
|
|
876
876
|
if (_this.getModuleName() === 'multiselect' && _this.isCheckBoxSelection && (newQuery.queries[queryElements].e && (newQuery.queries[queryElements].e.operator === 'notequal' ||
|
|
877
877
|
newQuery.queries[queryElements].e.operator === 'equal' || newQuery.queries[queryElements].e.condition === 'or' || newQuery.queries[queryElements].e.condition === 'and') && !_this.isCustomFiltering)) {
|
|
878
|
-
|
|
879
|
-
|
|
878
|
+
if (_this.totalItemCount > (_this.itemCount * 2)) {
|
|
879
|
+
isReOrder = false;
|
|
880
|
+
break;
|
|
881
|
+
}
|
|
880
882
|
}
|
|
881
883
|
if (newQuery.queries[queryElements].fn === 'onTake') {
|
|
882
884
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/src/mention/mention.d.ts
CHANGED
|
@@ -377,6 +377,7 @@ export declare class Mention extends DropDownBase {
|
|
|
377
377
|
private isSelectFocusItem;
|
|
378
378
|
private unBindCommonEvent;
|
|
379
379
|
private onKeyUp;
|
|
380
|
+
private showPopupWithDebounce;
|
|
380
381
|
private isMatchedText;
|
|
381
382
|
private getCurrentRange;
|
|
382
383
|
protected performFiltering(e: KeyboardEventArgs | MouseEvent): void;
|
package/src/mention/mention.js
CHANGED
|
@@ -348,6 +348,7 @@ var Mention = /** @class */ (function (_super) {
|
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
350
|
Mention.prototype.onKeyUp = function (e) {
|
|
351
|
+
var _this = this;
|
|
351
352
|
var rangetextContent;
|
|
352
353
|
if (this.isUpDownKey && this.isPopupOpen && e.keyCode === 229) {
|
|
353
354
|
this.isUpDownKey = false;
|
|
@@ -399,13 +400,33 @@ var Mention = /** @class */ (function (_super) {
|
|
|
399
400
|
this.hidePopup();
|
|
400
401
|
return;
|
|
401
402
|
}
|
|
403
|
+
var prevSiblingIsChip = (function () {
|
|
404
|
+
if (!_this.isContentEditable(_this.inputElement) || !_this.range || !_this.range.startContainer) {
|
|
405
|
+
return false;
|
|
406
|
+
}
|
|
407
|
+
var startContainer = _this.range.startContainer;
|
|
408
|
+
var textNode = startContainer.nodeType === Node.TEXT_NODE ? startContainer : (function () {
|
|
409
|
+
var idx = Math.min(_this.range.startOffset, startContainer.childNodes.length - 1);
|
|
410
|
+
var child = startContainer.childNodes[idx] || startContainer.firstChild;
|
|
411
|
+
return child && child.nodeType === Node.TEXT_NODE ? child : null;
|
|
412
|
+
})();
|
|
413
|
+
if (!textNode) {
|
|
414
|
+
return false;
|
|
415
|
+
}
|
|
416
|
+
var firstChar = (textNode.data || '').replace(/\u200B/g, '').replace(/\u00A0/g, ' ').charAt(0);
|
|
417
|
+
var previousSibling = textNode.previousSibling;
|
|
418
|
+
while (previousSibling && ((previousSibling.nodeType === Node.TEXT_NODE && !(previousSibling.data || '').trim()) || (previousSibling.tagName === 'BR'))) {
|
|
419
|
+
previousSibling = previousSibling.previousSibling;
|
|
420
|
+
}
|
|
421
|
+
return firstChar === _this.mentionChar && !!(previousSibling && previousSibling.classList && previousSibling.classList.contains('e-mention-chip'));
|
|
422
|
+
})();
|
|
402
423
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
403
424
|
if (((!currentRange || !lastWordRange) || (!lastWordRange.includes(this.mentionChar) && !this.requireLeadingSpace && !this.allowSpaces)) || e.code === 'Enter' || e.keyCode === 27 ||
|
|
404
425
|
(lastWordRange.match(Regex) && lastWordRange.match(Regex).length > 1) ||
|
|
405
426
|
(this.isContentEditable(this.inputElement) && this.range.startContainer &&
|
|
406
427
|
this.range.startContainer.previousElementSibling && this.range.startContainer.previousElementSibling.tagName !== 'BR' && this.range.startContainer.textContent.split('').length > 0 &&
|
|
407
428
|
(rangetextContent.length === 1 || rangetextContent[rangetextContent.length - 2].indexOf('') === -1 ||
|
|
408
|
-
this.range.startContainer.nodeType === 1))) {
|
|
429
|
+
this.range.startContainer.nodeType === 1)) && !prevSiblingIsChip) {
|
|
409
430
|
if (isValid && this.isPopupOpen && this.allowSpaces && currentRange && currentRange.trim() !== '' && charRegex.test(currentRange) && currentRange.indexOf(this.mentionChar) !== -1
|
|
410
431
|
&& !this.isMatchedText() && this.list && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' && e.code !== 'Enter') {
|
|
411
432
|
this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace('\u00a0', ' ');
|
|
@@ -430,11 +451,11 @@ var Mention = /** @class */ (function (_super) {
|
|
|
430
451
|
this.searchLists(e);
|
|
431
452
|
if (!this.isPopupOpen && this.queryString.length >= this.minLength) {
|
|
432
453
|
if (!this.isContentEditable(this.inputElement)) {
|
|
433
|
-
this.
|
|
454
|
+
this.showPopupWithDebounce();
|
|
434
455
|
}
|
|
435
456
|
else if (this.isContentEditable(this.inputElement) && this.range &&
|
|
436
457
|
this.range.startContainer !== this.inputElement && e.keyCode !== 9) {
|
|
437
|
-
this.
|
|
458
|
+
this.showPopupWithDebounce();
|
|
438
459
|
}
|
|
439
460
|
}
|
|
440
461
|
}
|
|
@@ -472,6 +493,15 @@ var Mention = /** @class */ (function (_super) {
|
|
|
472
493
|
}
|
|
473
494
|
this.isListResetted = false;
|
|
474
495
|
};
|
|
496
|
+
Mention.prototype.showPopupWithDebounce = function () {
|
|
497
|
+
var _this = this;
|
|
498
|
+
if (this.minLength > 0 && this.minLength === this.queryString.length) {
|
|
499
|
+
setTimeout(function () { _this.showPopup(); }, this.debounceDelay);
|
|
500
|
+
}
|
|
501
|
+
else {
|
|
502
|
+
this.showPopup();
|
|
503
|
+
}
|
|
504
|
+
};
|
|
475
505
|
Mention.prototype.isMatchedText = function () {
|
|
476
506
|
var isMatched = false;
|
|
477
507
|
for (var i = 0; i < (this.liCollections && this.liCollections.length); i++) {
|
|
@@ -882,15 +912,13 @@ var Mention = /** @class */ (function (_super) {
|
|
|
882
912
|
}
|
|
883
913
|
};
|
|
884
914
|
Mention.prototype.checkCollision = function (popupEle) {
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
this.isCollided = true;
|
|
891
|
-
}
|
|
892
|
-
this.popupObj.resolveCollision();
|
|
915
|
+
var coordinates = this.getCoordinates(this.inputElement, this.getTriggerCharPosition());
|
|
916
|
+
this.collision = isCollide(popupEle, null, coordinates.left, coordinates.top);
|
|
917
|
+
if (this.collision.length > 0) {
|
|
918
|
+
popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + 'px';
|
|
919
|
+
this.isCollided = true;
|
|
893
920
|
}
|
|
921
|
+
this.popupObj.resolveCollision();
|
|
894
922
|
};
|
|
895
923
|
Mention.prototype.getTriggerCharPosition = function () {
|
|
896
924
|
var mostRecentTriggerCharPos;
|
|
@@ -940,7 +968,7 @@ var Mention = /** @class */ (function (_super) {
|
|
|
940
968
|
this.popupObj.element.removeAttribute('style');
|
|
941
969
|
this.popupObj.element.removeAttribute('aria-disabled');
|
|
942
970
|
}
|
|
943
|
-
if (this.list.classList.contains('e-nodata')) {
|
|
971
|
+
if (this.list && this.list.classList.contains('e-nodata')) {
|
|
944
972
|
this.list = null;
|
|
945
973
|
}
|
|
946
974
|
};
|
|
@@ -1376,14 +1404,15 @@ var Mention = /** @class */ (function (_super) {
|
|
|
1376
1404
|
value = this.displayTempElement.innerHTML;
|
|
1377
1405
|
}
|
|
1378
1406
|
if (this.isContentEditable(this.inputElement)) {
|
|
1407
|
+
var defaultSuffix = this.isRTE ? '​' : '';
|
|
1379
1408
|
if (Browser.isAndroid) {
|
|
1380
|
-
return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText :
|
|
1409
|
+
return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : defaultSuffix);
|
|
1381
1410
|
}
|
|
1382
1411
|
else if (Browser.info.name === 'mozilla') {
|
|
1383
|
-
return '<span><span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span></span>'.concat(typeof this.suffixText === 'string' ? this.suffixText :
|
|
1412
|
+
return '<span><span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span></span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : defaultSuffix);
|
|
1384
1413
|
}
|
|
1385
1414
|
else {
|
|
1386
|
-
return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText :
|
|
1415
|
+
return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : defaultSuffix);
|
|
1387
1416
|
}
|
|
1388
1417
|
}
|
|
1389
1418
|
else {
|
|
@@ -5867,7 +5867,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
5867
5867
|
if (_this.hideSelectedItem && _this.value && Array.isArray(_this.value) && _this.value.length > 0) {
|
|
5868
5868
|
_this.totalItemsCount();
|
|
5869
5869
|
}
|
|
5870
|
-
if (!_this.preventSetCurrentData &&
|
|
5870
|
+
if (!_this.preventSetCurrentData &&
|
|
5871
5871
|
!isNullOrUndefined(_this.viewPortInfo.startIndex) &&
|
|
5872
5872
|
!isNullOrUndefined(_this.viewPortInfo.endIndex)) {
|
|
5873
5873
|
_this.notify('setCurrentViewDataAsync', {
|
|
@@ -2928,7 +2928,7 @@ ejs-listbox {
|
|
|
2928
2928
|
.e-listbox-container.e-list-template .e-list-item.e-selected .e-list-content,
|
|
2929
2929
|
.e-listboxtool-wrapper.e-list-template .e-list-item.e-selected .e-list-item-header,
|
|
2930
2930
|
.e-listboxtool-wrapper.e-list-template .e-list-item.e-selected .e-list-content {
|
|
2931
|
-
color:
|
|
2931
|
+
color: var(--color-sf-content-text-color-selected);
|
|
2932
2932
|
}
|
|
2933
2933
|
.e-listbox-wrapper.e-rtl.e-list-template .e-list-wrapper.e-list-avatar .e-avatar,
|
|
2934
2934
|
.e-listbox-container.e-rtl.e-list-template .e-list-wrapper.e-list-avatar .e-avatar,
|
package/styles/bootstrap5.3.css
CHANGED
|
@@ -3539,7 +3539,7 @@ ejs-listbox {
|
|
|
3539
3539
|
.e-listbox-container.e-list-template .e-list-item.e-selected .e-list-content,
|
|
3540
3540
|
.e-listboxtool-wrapper.e-list-template .e-list-item.e-selected .e-list-item-header,
|
|
3541
3541
|
.e-listboxtool-wrapper.e-list-template .e-list-item.e-selected .e-list-content {
|
|
3542
|
-
color:
|
|
3542
|
+
color: var(--color-sf-content-text-color-selected);
|
|
3543
3543
|
}
|
|
3544
3544
|
.e-listbox-wrapper.e-rtl.e-list-template .e-list-wrapper.e-list-avatar .e-avatar,
|
|
3545
3545
|
.e-listbox-container.e-rtl.e-list-template .e-list-wrapper.e-list-avatar .e-avatar,
|
|
@@ -102,8 +102,8 @@ $listbox-border-right-color: transparent !default;
|
|
|
102
102
|
$listbox-border-left-color: transparent !default;
|
|
103
103
|
$listbox-text-hover-color: $content-text-color !default;
|
|
104
104
|
$listbox-item-active-bg: $content-bg-color-selected !default;
|
|
105
|
-
$listbox-text-active-color: rgba($content-text-color, .87) !default;
|
|
106
105
|
$listbox-text-selected-color: $content-text-color-selected !default;
|
|
106
|
+
$listbox-text-active-color: $listbox-text-selected-color !default;
|
|
107
107
|
$listbox-header-text-color: $content-text-color-alt2 !default;
|
|
108
108
|
$listbox-header-text-disabled: $content-text-color-disabled !default;
|
|
109
109
|
$listbox-header-bg: $content-bg-color-alt2 !default;
|
|
@@ -842,7 +842,7 @@ ejs-listbox {
|
|
|
842
842
|
.e-listbox-container.e-list-template .e-list-item.e-selected .e-list-content,
|
|
843
843
|
.e-listboxtool-wrapper.e-list-template .e-list-item.e-selected .e-list-item-header,
|
|
844
844
|
.e-listboxtool-wrapper.e-list-template .e-list-item.e-selected .e-list-content {
|
|
845
|
-
color:
|
|
845
|
+
color: var(--color-sf-content-text-color-selected);
|
|
846
846
|
}
|
|
847
847
|
.e-listbox-wrapper.e-rtl.e-list-template .e-list-wrapper.e-list-avatar .e-avatar,
|
|
848
848
|
.e-listbox-container.e-rtl.e-list-template .e-list-wrapper.e-list-avatar .e-avatar,
|