@syncfusion/ej2-dropdowns 23.1.41 → 23.1.43
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 +29 -2
- 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 +90 -14
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +93 -17
- 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 +10 -10
- package/src/drop-down-base/drop-down-base.d.ts +7 -0
- package/src/drop-down-base/drop-down-base.js +17 -0
- package/src/drop-down-list/drop-down-list.js +35 -5
- package/src/drop-down-tree/drop-down-tree.js +3 -3
- package/src/mention/mention.d.ts +1 -0
- package/src/mention/mention.js +38 -9
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 23.1.
|
|
3
|
+
* version : 23.1.43
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. 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,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-dropdowns@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-dropdowns@23.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@23.1.42",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-zIcpy7MW0/0bWHAlONB5C1zLNPKnSarxhdyTP4X7jLWV7WnkYkw4WNUhUAhKsa6X2eaUkWJC7aAMig8KszW1pA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"/@syncfusion/ej2-spreadsheet",
|
|
35
35
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
36
36
|
],
|
|
37
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-23.1.
|
|
38
|
-
"_shasum": "
|
|
37
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-23.1.42.tgz",
|
|
38
|
+
"_shasum": "f9fada200700c5a3ac61d77380fd9cfc4d4cb7a8",
|
|
39
39
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
40
40
|
"_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
|
|
41
41
|
"author": {
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"bundleDependencies": false,
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@syncfusion/ej2-base": "~23.1.41",
|
|
47
|
-
"@syncfusion/ej2-data": "~23.1.
|
|
48
|
-
"@syncfusion/ej2-inputs": "~23.1.
|
|
49
|
-
"@syncfusion/ej2-lists": "~23.1.
|
|
50
|
-
"@syncfusion/ej2-navigations": "~23.1.
|
|
47
|
+
"@syncfusion/ej2-data": "~23.1.43",
|
|
48
|
+
"@syncfusion/ej2-inputs": "~23.1.43",
|
|
49
|
+
"@syncfusion/ej2-lists": "~23.1.43",
|
|
50
|
+
"@syncfusion/ej2-navigations": "~23.1.43",
|
|
51
51
|
"@syncfusion/ej2-notifications": "~23.1.40",
|
|
52
|
-
"@syncfusion/ej2-popups": "~23.1.
|
|
52
|
+
"@syncfusion/ej2-popups": "~23.1.43"
|
|
53
53
|
},
|
|
54
54
|
"deprecated": false,
|
|
55
55
|
"description": "Essential JS 2 DropDown Components",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"module": "./index.js",
|
|
75
75
|
"name": "@syncfusion/ej2-dropdowns",
|
|
76
76
|
"typings": "index.d.ts",
|
|
77
|
-
"version": "23.1.
|
|
77
|
+
"version": "23.1.43",
|
|
78
78
|
"sideEffects": false,
|
|
79
79
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
80
80
|
}
|
|
@@ -554,6 +554,13 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
|
|
|
554
554
|
};
|
|
555
555
|
protected setFixedHeader(): void;
|
|
556
556
|
private getSortedDataSource;
|
|
557
|
+
/**
|
|
558
|
+
* Return the index of item which matched with given value in data source
|
|
559
|
+
*
|
|
560
|
+
* @param {string | number | boolean} value - Specifies given value.
|
|
561
|
+
* @returns {number} Returns the index of the item.
|
|
562
|
+
*/
|
|
563
|
+
protected getIndexByValueFilter(value: string | number | boolean): number;
|
|
557
564
|
/**
|
|
558
565
|
* Return the index of item which matched with given value in data source
|
|
559
566
|
*
|
|
@@ -939,6 +939,23 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
939
939
|
}
|
|
940
940
|
return dataSource;
|
|
941
941
|
};
|
|
942
|
+
/**
|
|
943
|
+
* Return the index of item which matched with given value in data source
|
|
944
|
+
*
|
|
945
|
+
* @param {string | number | boolean} value - Specifies given value.
|
|
946
|
+
* @returns {number} Returns the index of the item.
|
|
947
|
+
*/
|
|
948
|
+
DropDownBase.prototype.getIndexByValueFilter = function (value) {
|
|
949
|
+
var index;
|
|
950
|
+
var listItems = this.renderItems(this.selectData, this.fields);
|
|
951
|
+
for (var i = 0; i < listItems.children.length; i++) {
|
|
952
|
+
if (!isNullOrUndefined(value) && listItems.children[i].getAttribute('data-value') === value.toString()) {
|
|
953
|
+
index = i;
|
|
954
|
+
break;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
return index;
|
|
958
|
+
};
|
|
942
959
|
/**
|
|
943
960
|
* Return the index of item which matched with given value in data source
|
|
944
961
|
*
|
|
@@ -805,6 +805,13 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
805
805
|
}
|
|
806
806
|
};
|
|
807
807
|
DropDownList.prototype.updateUpDownAction = function (e, isVirtualKeyAction) {
|
|
808
|
+
if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
|
|
809
|
+
var value_1 = this.getItemData().value;
|
|
810
|
+
var filterIndex = this.getIndexByValue(value_1);
|
|
811
|
+
if (!isNullOrUndefined(filterIndex)) {
|
|
812
|
+
this.activeIndex = filterIndex;
|
|
813
|
+
}
|
|
814
|
+
}
|
|
808
815
|
var focusEle = this.list.querySelector('.' + dropDownListClasses.focus);
|
|
809
816
|
if (this.isSelectFocusItem(focusEle) && !isVirtualKeyAction) {
|
|
810
817
|
this.setSelection(focusEle, e);
|
|
@@ -849,6 +856,13 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
849
856
|
this.setSelection(nextItem, e);
|
|
850
857
|
}
|
|
851
858
|
}
|
|
859
|
+
if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
|
|
860
|
+
var value_2 = this.getItemData().value;
|
|
861
|
+
var filterIndex = this.getIndexByValueFilter(value_2);
|
|
862
|
+
if (!isNullOrUndefined(filterIndex)) {
|
|
863
|
+
this.activeIndex = filterIndex;
|
|
864
|
+
}
|
|
865
|
+
}
|
|
852
866
|
e.preventDefault();
|
|
853
867
|
};
|
|
854
868
|
DropDownList.prototype.updateHomeEndAction = function (e, isVirtualKeyAction) {
|
|
@@ -1150,7 +1164,18 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1150
1164
|
if (isNullOrUndefined(value)) {
|
|
1151
1165
|
value = 'null';
|
|
1152
1166
|
}
|
|
1153
|
-
this.
|
|
1167
|
+
if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
|
|
1168
|
+
var filterIndex = this.getIndexByValueFilter(value);
|
|
1169
|
+
if (!isNullOrUndefined(filterIndex)) {
|
|
1170
|
+
this.activeIndex = filterIndex;
|
|
1171
|
+
}
|
|
1172
|
+
else {
|
|
1173
|
+
this.activeIndex = this.getIndexByValue(value);
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
else {
|
|
1177
|
+
this.activeIndex = this.getIndexByValue(value);
|
|
1178
|
+
}
|
|
1154
1179
|
};
|
|
1155
1180
|
DropDownList.prototype.activeItem = function (li) {
|
|
1156
1181
|
if (this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.selected)) {
|
|
@@ -1176,6 +1201,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1176
1201
|
detach(this.valueTempElement);
|
|
1177
1202
|
this.inputElement.style.display = 'block';
|
|
1178
1203
|
}
|
|
1204
|
+
if (!isNullOrUndefined(dataItem.value) && !this.enableVirtualization && this.allowFiltering) {
|
|
1205
|
+
this.activeIndex = this.getIndexByValueFilter(dataItem.value);
|
|
1206
|
+
}
|
|
1179
1207
|
var clearIcon = dropDownListClasses.clearIcon;
|
|
1180
1208
|
var isFilterElement = this.isFiltering() && this.filterInput && (this.getModuleName() === 'combobox');
|
|
1181
1209
|
var clearElement = isFilterElement && this.filterInput.parentElement.querySelector('.' + clearIcon);
|
|
@@ -1950,10 +1978,10 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1950
1978
|
DropDownList.prototype.addNewItem = function (listData, newElement) {
|
|
1951
1979
|
var _this = this;
|
|
1952
1980
|
if (!isNullOrUndefined(this.itemData) && !isNullOrUndefined(newElement)) {
|
|
1953
|
-
var
|
|
1981
|
+
var value_3 = this.getItemData().value;
|
|
1954
1982
|
var isExist = listData.some(function (data) {
|
|
1955
|
-
return (((typeof data === 'string' || typeof data === 'number') && data ===
|
|
1956
|
-
(getValue(_this.fields.value, data) ===
|
|
1983
|
+
return (((typeof data === 'string' || typeof data === 'number') && data === value_3) ||
|
|
1984
|
+
(getValue(_this.fields.value, data) === value_3));
|
|
1957
1985
|
});
|
|
1958
1986
|
if (!isExist) {
|
|
1959
1987
|
this.addItem(this.itemData);
|
|
@@ -2668,7 +2696,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2668
2696
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2669
2697
|
this.list.getElementsByClassName('e-virtual-ddl')[0].style = this.GetVirtualTrackHeight();
|
|
2670
2698
|
}
|
|
2671
|
-
this.
|
|
2699
|
+
if (this.getModuleName() !== 'autocomplete' && this.totalItemCount != 0 && this.totalItemCount > (this.itemCount * 2)) {
|
|
2700
|
+
this.getSkeletonCount();
|
|
2701
|
+
}
|
|
2672
2702
|
this.UpdateSkeleton();
|
|
2673
2703
|
this.listData = currentData;
|
|
2674
2704
|
this.updateActionCompleteDataValues(ulElement, currentData);
|
|
@@ -1971,12 +1971,12 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1971
1971
|
var nodes = this.treeObj.element.querySelectorAll('li');
|
|
1972
1972
|
var checkedNodes = this.treeObj.element.querySelectorAll('li .e-checkbox-wrapper[aria-checked=true]');
|
|
1973
1973
|
var wrap = closest(this.checkBoxElement, '.' + CHECKBOXWRAP);
|
|
1974
|
-
if (wrap && args.action === 'uncheck' && (args.isInteracted || checkedNodes.length === 0 || args.data[0].isChecked
|
|
1974
|
+
if (wrap && args.action === 'uncheck' && (args.isInteracted || checkedNodes.length === 0 || (!isNOU(args.data[0]) && args.data[0].isChecked === 'false'))) {
|
|
1975
1975
|
this.isReverseUpdate = true;
|
|
1976
1976
|
this.changeState(wrap, 'uncheck');
|
|
1977
1977
|
this.isReverseUpdate = false;
|
|
1978
1978
|
}
|
|
1979
|
-
else if (wrap && args.action === 'check' && checkedNodes.length === nodes.length && (args.isInteracted || this.isCheckAllCalled || args.data[0].isChecked
|
|
1979
|
+
else if (wrap && args.action === 'check' && checkedNodes.length === nodes.length && (args.isInteracted || this.isCheckAllCalled || (!isNOU(args.data[0]) && args.data[0].isChecked === 'true'))) {
|
|
1980
1980
|
this.isReverseUpdate = true;
|
|
1981
1981
|
this.isCheckAllCalled = false;
|
|
1982
1982
|
this.changeState(wrap, 'check');
|
|
@@ -2941,7 +2941,6 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
2941
2941
|
this.clearTemplate();
|
|
2942
2942
|
this.unWireEvents();
|
|
2943
2943
|
this.setCssClass(null, this.cssClass);
|
|
2944
|
-
this.setProperties({ value: [] }, true);
|
|
2945
2944
|
this.setProperties({ text: null }, true);
|
|
2946
2945
|
this.treeObj.destroy();
|
|
2947
2946
|
this.destroyFilter();
|
|
@@ -2984,6 +2983,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
2984
2983
|
this.overFlowWrapper = null;
|
|
2985
2984
|
this.keyboardModule = null;
|
|
2986
2985
|
_super.prototype.destroy.call(this);
|
|
2986
|
+
this.setProperties({ value: [] }, true);
|
|
2987
2987
|
};
|
|
2988
2988
|
DropDownTree.prototype.destroyFilter = function () {
|
|
2989
2989
|
if (this.filterObj) {
|
package/src/mention/mention.d.ts
CHANGED
package/src/mention/mention.js
CHANGED
|
@@ -693,6 +693,8 @@ var Mention = /** @class */ (function (_super) {
|
|
|
693
693
|
_this.initializePopup(popupEle_1, offsetValue, left);
|
|
694
694
|
_this.checkCollision(popupEle_1);
|
|
695
695
|
popupEle_1.style.visibility = 'visible';
|
|
696
|
+
var popupLeft_1 = popupEle_1.parentElement.offsetWidth - popupEle_1.offsetWidth;
|
|
697
|
+
var popupHeight_1 = popupEle_1.offsetHeight;
|
|
696
698
|
addClass([popupEle_1], ['e-mention', 'e-popup', 'e-popup-close']);
|
|
697
699
|
if (!isNullOrUndefined(_this.list)) {
|
|
698
700
|
_this.unWireListEvents();
|
|
@@ -721,9 +723,23 @@ var Mention = /** @class */ (function (_super) {
|
|
|
721
723
|
popupEle_1.style.cssText = 'top: '.concat(coordinates_1.top.toString(), 'px;\n left: ').concat(coordinates_1.left.toString(), 'px;\nposition: absolute;\n display: block;');
|
|
722
724
|
}
|
|
723
725
|
else {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
+
if (_this.collision.length > 0 && _this.collision.indexOf('right') > -1 && _this.collision.indexOf('bottom') === -1) {
|
|
727
|
+
popupEle_1.style.cssText = 'top: '.concat(coordinates_1.top.toString(), 'px;\n left: ').concat(popupLeft_1.toString(), 'px;\nposition: absolute;\n display: block;');
|
|
728
|
+
}
|
|
729
|
+
else if (_this.collision && _this.collision.length > 0 && _this.collision.indexOf('bottom') > -1 && _this.collision.indexOf('right') === -1) {
|
|
730
|
+
popupEle_1.style.left = formatUnit(coordinates_1.left);
|
|
731
|
+
popupEle_1.style.top = formatUnit(coordinates_1.top - parseInt(popupHeight_1.toString()));
|
|
732
|
+
}
|
|
733
|
+
else if (_this.collision && _this.collision.length > 0 && _this.collision.indexOf('bottom') > -1 && _this.collision.indexOf('right') > -1) {
|
|
734
|
+
popupEle_1.style.left = formatUnit(popupLeft_1);
|
|
735
|
+
popupEle_1.style.top = formatUnit(coordinates_1.top - parseInt(popupHeight_1.toString()));
|
|
736
|
+
}
|
|
737
|
+
else {
|
|
738
|
+
popupEle_1.style.left = formatUnit(coordinates_1.left);
|
|
739
|
+
popupEle_1.style.top = formatUnit(coordinates_1.top - parseInt(_this.popupHeight.toString()));
|
|
740
|
+
}
|
|
726
741
|
_this.isCollided = false;
|
|
742
|
+
_this.collision = [];
|
|
727
743
|
}
|
|
728
744
|
popupEle_1.style.width = _this.popupWidth !== '100%' && !isNullOrUndefined(_this.popupWidth) ? formatUnit(_this.popupWidth) : 'auto';
|
|
729
745
|
_this.setHeight(popupEle_1);
|
|
@@ -752,8 +768,8 @@ var Mention = /** @class */ (function (_super) {
|
|
|
752
768
|
Mention.prototype.checkCollision = function (popupEle) {
|
|
753
769
|
if (!Browser.isDevice || (Browser.isDevice && !(this.getModuleName() === 'mention'))) {
|
|
754
770
|
var coordinates = this.getCoordinates(this.inputElement, this.getTriggerCharPosition());
|
|
755
|
-
|
|
756
|
-
if (collision.length > 0) {
|
|
771
|
+
this.collision = isCollide(popupEle, null, coordinates.left, coordinates.top);
|
|
772
|
+
if (this.collision.length > 0) {
|
|
757
773
|
popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + 'px';
|
|
758
774
|
this.isCollided = true;
|
|
759
775
|
}
|
|
@@ -888,10 +904,18 @@ var Mention = /** @class */ (function (_super) {
|
|
|
888
904
|
document.body.removeChild(div);
|
|
889
905
|
}
|
|
890
906
|
else {
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
907
|
+
if (this.collision && this.collision.length > 0 && this.collision.indexOf('right') > -1 && this.collision.indexOf('bottom') === -1) {
|
|
908
|
+
coordinates = {
|
|
909
|
+
top: rect.top + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10),
|
|
910
|
+
left: rect.left + windowLeft + width
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
else {
|
|
914
|
+
coordinates = {
|
|
915
|
+
top: rect.top + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10) - (this.isCollided ? 10 : 0),
|
|
916
|
+
left: rect.left + windowLeft + width
|
|
917
|
+
};
|
|
918
|
+
}
|
|
895
919
|
}
|
|
896
920
|
return coordinates;
|
|
897
921
|
};
|
|
@@ -1195,7 +1219,12 @@ var Mention = /** @class */ (function (_super) {
|
|
|
1195
1219
|
value = this.displayTempElement.innerHTML;
|
|
1196
1220
|
}
|
|
1197
1221
|
if (this.isContentEditable(this.inputElement)) {
|
|
1198
|
-
|
|
1222
|
+
if (Browser.isAndroid) {
|
|
1223
|
+
return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
|
|
1224
|
+
}
|
|
1225
|
+
else {
|
|
1226
|
+
return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
|
|
1227
|
+
}
|
|
1199
1228
|
}
|
|
1200
1229
|
else {
|
|
1201
1230
|
return showChar + value;
|