@syncfusion/ej2-dropdowns 20.4.51 → 20.4.53
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/CHANGELOG.md +12 -0
- 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 +18 -11
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +18 -11
- 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/drop-down-list/drop-down-list.d.ts +1 -0
- package/src/drop-down-list/drop-down-list.js +3 -2
- package/src/drop-down-tree/drop-down-tree.js +7 -4
- package/src/mention/mention.js +6 -4
- package/src/multi-select/multi-select.js +1 -0
- package/GitLeaksReport.json +0 -1
- package/gitleaks-ci/gitleaks +0 -0
- package/gitleaks-ci.tar.gz +0 -0
|
@@ -95,7 +95,7 @@ function Search(inputVal, items, searchType, ignoreCase, dataSource, fields, typ
|
|
|
95
95
|
let fieldValue = fields.text.split('.');
|
|
96
96
|
dataSource.filter(function (data) {
|
|
97
97
|
Array.prototype.slice.call(fieldValue).forEach(function (value) {
|
|
98
|
-
if (type === 'object' && checkField.textContent.toString().indexOf(data[value]) !== -1 && checkField.getAttribute('data-value') === data[fields.value] || type === 'string' && checkField.textContent.toString().indexOf(data) !== -1) {
|
|
98
|
+
if (type === 'object' && checkField.textContent.toString().indexOf(data[value]) !== -1 && checkField.getAttribute('data-value') === data[fields.value].toString() || type === 'string' && checkField.textContent.toString().indexOf(data) !== -1) {
|
|
99
99
|
filterValue = type === 'object' ? data[value] : data;
|
|
100
100
|
}
|
|
101
101
|
});
|
|
@@ -3241,6 +3241,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3241
3241
|
}
|
|
3242
3242
|
},
|
|
3243
3243
|
open: () => {
|
|
3244
|
+
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
3244
3245
|
EventHandler.add(document, 'mousedown', this.onDocumentClick, this);
|
|
3245
3246
|
this.isPopupOpen = true;
|
|
3246
3247
|
const actionList = this.actionCompleteData && this.actionCompleteData.ulElement &&
|
|
@@ -3419,10 +3420,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3419
3420
|
}
|
|
3420
3421
|
closePopup(delay, e) {
|
|
3421
3422
|
this.isTyped = false;
|
|
3422
|
-
if (!(this.popupObj && document.body.contains(this.popupObj.element) && this.beforePopupOpen)) {
|
|
3423
|
+
if (!(this.popupObj && document.body.contains(this.popupObj.element) && (this.beforePopupOpen || this.isEventCancel))) {
|
|
3423
3424
|
return;
|
|
3424
3425
|
}
|
|
3425
|
-
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
3426
3426
|
this.isActive = false;
|
|
3427
3427
|
this.filterInputObj = null;
|
|
3428
3428
|
this.isDropDownClick = false;
|
|
@@ -3471,6 +3471,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3471
3471
|
const popupInstance = this.popupObj;
|
|
3472
3472
|
const eventArgs = { popup: popupInstance, cancel: false, animation: animModel, event: e || null };
|
|
3473
3473
|
this.trigger('close', eventArgs, (eventArgs) => {
|
|
3474
|
+
this.isEventCancel = eventArgs.cancel;
|
|
3474
3475
|
if (!isNullOrUndefined(this.popupObj) &&
|
|
3475
3476
|
!isNullOrUndefined(this.popupObj.element.querySelector('.e-fixed-head'))) {
|
|
3476
3477
|
const fixedHeader = this.popupObj.element.querySelector('.e-fixed-head');
|
|
@@ -5134,7 +5135,9 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
5134
5135
|
this.clickHandler(e);
|
|
5135
5136
|
break;
|
|
5136
5137
|
case 'moveDown':
|
|
5137
|
-
this.treeObj.element.
|
|
5138
|
+
let focusedElement = this.treeObj.element.querySelector('li');
|
|
5139
|
+
focusedElement.focus();
|
|
5140
|
+
addClass([focusedElement], ['e-hover', 'e-node-focus']);
|
|
5138
5141
|
}
|
|
5139
5142
|
}
|
|
5140
5143
|
});
|
|
@@ -5807,7 +5810,9 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
5807
5810
|
this.popupObj.refreshPosition();
|
|
5808
5811
|
if (!(this.showCheckBox && this.showSelectAll) && (!this.popupDiv.classList.contains(NODATA)
|
|
5809
5812
|
&& this.treeItems.length > 0)) {
|
|
5810
|
-
this.treeObj.element.
|
|
5813
|
+
let focusedElement = this.treeObj.element.querySelector('li');
|
|
5814
|
+
focusedElement.focus();
|
|
5815
|
+
addClass([focusedElement], ['e-hover', 'e-node-focus']);
|
|
5811
5816
|
}
|
|
5812
5817
|
if (this.checkSelectAll && this.checkBoxElement) {
|
|
5813
5818
|
const wrap = closest(this.checkBoxElement, '.' + CHECKBOXWRAP);
|
|
@@ -6729,8 +6734,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
6729
6734
|
setValue('selectedNodes', [], this.treeObj);
|
|
6730
6735
|
this.hiddenElement.innerHTML = '';
|
|
6731
6736
|
if (this.showCheckBox) {
|
|
6732
|
-
this.treeObj.
|
|
6733
|
-
this.treeObj.dataBind();
|
|
6737
|
+
this.treeObj.uncheckAll();
|
|
6734
6738
|
this.setMultiSelect();
|
|
6735
6739
|
this.clearCheckAll();
|
|
6736
6740
|
}
|
|
@@ -12654,6 +12658,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12654
12658
|
render() {
|
|
12655
12659
|
this.setDynValue = this.initStatus = false;
|
|
12656
12660
|
this.isSelectAll = false;
|
|
12661
|
+
this.selectAllEventEle = [];
|
|
12657
12662
|
this.searchWrapper = this.createElement('span', { className: SEARCHBOX_WRAPPER + ' ' + ((this.mode === 'Box') ? BOX_ELEMENT : '') });
|
|
12658
12663
|
this.viewWrapper = this.createElement('span', { className: DELIMITER_VIEW + ' ' + DELIMITER_WRAPPER, styles: 'display:none;' });
|
|
12659
12664
|
this.overAllClear = this.createElement('span', {
|
|
@@ -16570,6 +16575,7 @@ let Mention = class Mention extends DropDownBase {
|
|
|
16570
16575
|
}
|
|
16571
16576
|
else {
|
|
16572
16577
|
popupEle.style.left = formatUnit(coordinates.left);
|
|
16578
|
+
popupEle.style.top = formatUnit(coordinates.top - parseInt(this.popupHeight.toString()));
|
|
16573
16579
|
this.isCollided = false;
|
|
16574
16580
|
}
|
|
16575
16581
|
popupEle.style.width = this.popupWidth !== '100%' && !isNullOrUndefined(this.popupWidth) ? formatUnit(this.popupWidth) : 'auto';
|
|
@@ -16598,7 +16604,8 @@ let Mention = class Mention extends DropDownBase {
|
|
|
16598
16604
|
}
|
|
16599
16605
|
checkCollision(popupEle) {
|
|
16600
16606
|
if (!Browser.isDevice || (Browser.isDevice && !(this.getModuleName() === 'mention'))) {
|
|
16601
|
-
|
|
16607
|
+
let coordinates = this.getCoordinates(this.inputElement, this.getTriggerCharPosition());
|
|
16608
|
+
const collision = isCollide(popupEle, null, coordinates.left, coordinates.top);
|
|
16602
16609
|
if (collision.length > 0) {
|
|
16603
16610
|
popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + 'px';
|
|
16604
16611
|
this.isCollided = true;
|
|
@@ -16622,7 +16629,7 @@ let Mention = class Mention extends DropDownBase {
|
|
|
16622
16629
|
this.popupObj = new Popup(element, {
|
|
16623
16630
|
width: this.setWidth(), targetType: 'relative',
|
|
16624
16631
|
relateTo: this.inputElement, collision: { X: 'flip', Y: 'flip' }, offsetY: offsetValue,
|
|
16625
|
-
enableRtl: this.enableRtl, offsetX: left, position: { X: '
|
|
16632
|
+
enableRtl: this.enableRtl, offsetX: left, position: { X: 'left', Y: 'bottom' }, actionOnScroll: 'hide',
|
|
16626
16633
|
zIndex: this.zIndex,
|
|
16627
16634
|
close: () => {
|
|
16628
16635
|
this.destroyPopup();
|
|
@@ -16704,14 +16711,14 @@ let Mention = class Mention extends DropDownBase {
|
|
|
16704
16711
|
if (!this.isContentEditable(this.inputElement)) {
|
|
16705
16712
|
coordinates = {
|
|
16706
16713
|
top: rect.top + windowTop + span.offsetTop + parseInt(computed.borderTopWidth, 10) +
|
|
16707
|
-
parseInt(computed.fontSize, 10) + 3 - element.scrollTop,
|
|
16714
|
+
parseInt(computed.fontSize, 10) + 3 - element.scrollTop - (this.isCollided ? 10 : 0),
|
|
16708
16715
|
left: rect.left + windowLeft + span.offsetLeft + parseInt(computed.borderLeftWidth, 10)
|
|
16709
16716
|
};
|
|
16710
16717
|
document.body.removeChild(div);
|
|
16711
16718
|
}
|
|
16712
16719
|
else {
|
|
16713
16720
|
coordinates = {
|
|
16714
|
-
top: rect.top + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10),
|
|
16721
|
+
top: rect.top + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10) - (this.isCollided ? 10 : 0),
|
|
16715
16722
|
left: rect.left + windowLeft
|
|
16716
16723
|
};
|
|
16717
16724
|
}
|