@syncfusion/ej2-dropdowns 32.1.21 → 32.1.23
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 +35 -18
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +36 -18
- 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 +6 -6
- package/src/drop-down-base/drop-down-base.js +1 -1
- package/src/mention/mention.js +33 -13
- package/src/multi-select/checkbox-selection.js +2 -4
|
@@ -1734,7 +1734,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1734
1734
|
var newQuery = _this.getQuery(eventArgs.query);
|
|
1735
1735
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1736
1736
|
if (_this.isVirtualizationEnabled && (listItems.count !== 0 &&
|
|
1737
|
-
listItems.count < (_this.itemCount * 2))
|
|
1737
|
+
listItems.count < (_this.itemCount * 2))) {
|
|
1738
1738
|
if (newQuery) {
|
|
1739
1739
|
for (var queryElements = 0; queryElements < newQuery.queries.length; queryElements++) {
|
|
1740
1740
|
if (_this.getModuleName() === 'multiselect' && _this.isCheckBoxSelection && (newQuery.queries[queryElements].e && (newQuery.queries[queryElements].e.operator === 'notequal' ||
|
|
@@ -20408,13 +20408,11 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
|
|
|
20408
20408
|
prepend([this.parent.filterParent], args.popupElement);
|
|
20409
20409
|
attributes(this.filterInput, {
|
|
20410
20410
|
'aria-disabled': 'false',
|
|
20411
|
-
'role': '
|
|
20411
|
+
'role': 'searchbox',
|
|
20412
20412
|
'autocomplete': 'off',
|
|
20413
20413
|
'autocapitalize': 'off',
|
|
20414
20414
|
'spellcheck': 'false',
|
|
20415
|
-
'aria-label': 'multiselect'
|
|
20416
|
-
'aria-expanded': 'true',
|
|
20417
|
-
'aria-controls': args.popupElement.id
|
|
20415
|
+
'aria-label': 'multiselect'
|
|
20418
20416
|
});
|
|
20419
20417
|
this.clearIconElement = this.filterInput.parentElement.querySelector('.' + clearIcon);
|
|
20420
20418
|
if (!Browser.isDevice && this.clearIconElement) {
|
|
@@ -23744,6 +23742,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
23744
23742
|
}
|
|
23745
23743
|
};
|
|
23746
23744
|
Mention.prototype.onKeyUp = function (e) {
|
|
23745
|
+
var _this = this;
|
|
23747
23746
|
var rangetextContent;
|
|
23748
23747
|
if (this.isUpDownKey && this.isPopupOpen && e.keyCode === 229) {
|
|
23749
23748
|
this.isUpDownKey = false;
|
|
@@ -23795,13 +23794,33 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
23795
23794
|
this.hidePopup();
|
|
23796
23795
|
return;
|
|
23797
23796
|
}
|
|
23797
|
+
var prevSiblingIsChip = (function () {
|
|
23798
|
+
if (!_this.isContentEditable(_this.inputElement) || !_this.range || !_this.range.startContainer) {
|
|
23799
|
+
return false;
|
|
23800
|
+
}
|
|
23801
|
+
var startContainer = _this.range.startContainer;
|
|
23802
|
+
var textNode = startContainer.nodeType === Node.TEXT_NODE ? startContainer : (function () {
|
|
23803
|
+
var idx = Math.min(_this.range.startOffset, startContainer.childNodes.length - 1);
|
|
23804
|
+
var child = startContainer.childNodes[idx] || startContainer.firstChild;
|
|
23805
|
+
return child && child.nodeType === Node.TEXT_NODE ? child : null;
|
|
23806
|
+
})();
|
|
23807
|
+
if (!textNode) {
|
|
23808
|
+
return false;
|
|
23809
|
+
}
|
|
23810
|
+
var firstChar = (textNode.data || '').replace(/\u200B/g, '').replace(/\u00A0/g, ' ').charAt(0);
|
|
23811
|
+
var previousSibling = textNode.previousSibling;
|
|
23812
|
+
while (previousSibling && ((previousSibling.nodeType === Node.TEXT_NODE && !(previousSibling.data || '').trim()) || (previousSibling.tagName === 'BR'))) {
|
|
23813
|
+
previousSibling = previousSibling.previousSibling;
|
|
23814
|
+
}
|
|
23815
|
+
return firstChar === _this.mentionChar && !!(previousSibling && previousSibling.classList && previousSibling.classList.contains('e-mention-chip'));
|
|
23816
|
+
})();
|
|
23798
23817
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23799
23818
|
if (((!currentRange || !lastWordRange) || (!lastWordRange.includes(this.mentionChar) && !this.requireLeadingSpace && !this.allowSpaces)) || e.code === 'Enter' || e.keyCode === 27 ||
|
|
23800
23819
|
(lastWordRange.match(Regex) && lastWordRange.match(Regex).length > 1) ||
|
|
23801
23820
|
(this.isContentEditable(this.inputElement) && this.range.startContainer &&
|
|
23802
23821
|
this.range.startContainer.previousElementSibling && this.range.startContainer.previousElementSibling.tagName !== 'BR' && this.range.startContainer.textContent.split('').length > 0 &&
|
|
23803
23822
|
(rangetextContent.length === 1 || rangetextContent[rangetextContent.length - 2].indexOf('') === -1 ||
|
|
23804
|
-
this.range.startContainer.nodeType === 1))) {
|
|
23823
|
+
this.range.startContainer.nodeType === 1)) && !prevSiblingIsChip) {
|
|
23805
23824
|
if (isValid && this.isPopupOpen && this.allowSpaces && currentRange && currentRange.trim() !== '' && charRegex.test(currentRange) && currentRange.indexOf(this.mentionChar) !== -1
|
|
23806
23825
|
&& !this.isMatchedText() && this.list && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' && e.code !== 'Enter') {
|
|
23807
23826
|
this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace('\u00a0', ' ');
|
|
@@ -24287,15 +24306,13 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
24287
24306
|
}
|
|
24288
24307
|
};
|
|
24289
24308
|
Mention.prototype.checkCollision = function (popupEle) {
|
|
24290
|
-
|
|
24291
|
-
|
|
24292
|
-
|
|
24293
|
-
|
|
24294
|
-
|
|
24295
|
-
this.isCollided = true;
|
|
24296
|
-
}
|
|
24297
|
-
this.popupObj.resolveCollision();
|
|
24309
|
+
var coordinates = this.getCoordinates(this.inputElement, this.getTriggerCharPosition());
|
|
24310
|
+
this.collision = isCollide(popupEle, null, coordinates.left, coordinates.top);
|
|
24311
|
+
if (this.collision.length > 0) {
|
|
24312
|
+
popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + 'px';
|
|
24313
|
+
this.isCollided = true;
|
|
24298
24314
|
}
|
|
24315
|
+
this.popupObj.resolveCollision();
|
|
24299
24316
|
};
|
|
24300
24317
|
Mention.prototype.getTriggerCharPosition = function () {
|
|
24301
24318
|
var mostRecentTriggerCharPos;
|
|
@@ -24345,7 +24362,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
24345
24362
|
this.popupObj.element.removeAttribute('style');
|
|
24346
24363
|
this.popupObj.element.removeAttribute('aria-disabled');
|
|
24347
24364
|
}
|
|
24348
|
-
if (this.list.classList.contains('e-nodata')) {
|
|
24365
|
+
if (this.list && this.list.classList.contains('e-nodata')) {
|
|
24349
24366
|
this.list = null;
|
|
24350
24367
|
}
|
|
24351
24368
|
};
|
|
@@ -24781,14 +24798,15 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
24781
24798
|
value = this.displayTempElement.innerHTML;
|
|
24782
24799
|
}
|
|
24783
24800
|
if (this.isContentEditable(this.inputElement)) {
|
|
24801
|
+
var defaultSuffix = this.isRTE ? '​' : '';
|
|
24784
24802
|
if (Browser.isAndroid) {
|
|
24785
|
-
return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText :
|
|
24803
|
+
return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : defaultSuffix);
|
|
24786
24804
|
}
|
|
24787
24805
|
else if (Browser.info.name === 'mozilla') {
|
|
24788
|
-
return '<span><span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span></span>'.concat(typeof this.suffixText === 'string' ? this.suffixText :
|
|
24806
|
+
return '<span><span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span></span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : defaultSuffix);
|
|
24789
24807
|
}
|
|
24790
24808
|
else {
|
|
24791
|
-
return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText :
|
|
24809
|
+
return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : defaultSuffix);
|
|
24792
24810
|
}
|
|
24793
24811
|
}
|
|
24794
24812
|
else {
|