@syncfusion/ej2-dropdowns 31.1.18 → 31.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/dist/ej2-dropdowns.min.js +3 -3
- package/dist/ej2-dropdowns.umd.min.js +3 -3
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +94 -20
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +121 -46
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +3 -3
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +5 -5
- package/src/combo-box/combo-box.js +7 -2
- package/src/drop-down-base/drop-down-base.js +10 -3
- package/src/drop-down-list/drop-down-list.js +49 -35
- package/src/drop-down-tree/drop-down-tree.js +11 -1
- package/src/mention/mention.js +5 -2
- package/src/multi-select/multi-select.d.ts +2 -0
- package/src/multi-select/multi-select.js +39 -3
- package/styles/auto-complete/bootstrap4.css +8 -0
- package/styles/bds-lite.css +0 -1
- package/styles/bds.css +0 -1
- package/styles/bootstrap-dark-lite.css +0 -1
- package/styles/bootstrap-dark.css +0 -1
- package/styles/bootstrap-lite.css +0 -1
- package/styles/bootstrap.css +0 -1
- package/styles/bootstrap4-lite.css +9 -1
- package/styles/bootstrap4.css +15 -7
- package/styles/bootstrap5-dark-lite.css +0 -1
- package/styles/bootstrap5-dark.css +0 -1
- package/styles/bootstrap5-lite.css +0 -1
- package/styles/bootstrap5.3-lite.css +2 -1
- package/styles/bootstrap5.3.css +5 -4
- package/styles/bootstrap5.css +0 -1
- package/styles/combo-box/bootstrap4.css +8 -0
- package/styles/drop-down-base/_fluent2-definition.scss +2 -2
- package/styles/drop-down-base/fluent2.css +4 -4
- package/styles/drop-down-list/_bootstrap4-definition.scss +8 -0
- package/styles/drop-down-list/bootstrap4.css +8 -0
- package/styles/drop-down-tree/_bigger.scss +8 -2
- package/styles/drop-down-tree/_layout.scss +12 -0
- package/styles/drop-down-tree/bds.css +0 -1
- package/styles/drop-down-tree/bootstrap-dark.css +0 -1
- package/styles/drop-down-tree/bootstrap.css +0 -1
- package/styles/drop-down-tree/bootstrap4.css +0 -1
- package/styles/drop-down-tree/bootstrap5-dark.css +0 -1
- package/styles/drop-down-tree/bootstrap5.3.css +1 -2
- package/styles/drop-down-tree/bootstrap5.css +0 -1
- package/styles/drop-down-tree/fabric-dark.css +0 -1
- package/styles/drop-down-tree/fabric.css +0 -1
- package/styles/drop-down-tree/fluent-dark.css +0 -1
- package/styles/drop-down-tree/fluent.css +0 -1
- package/styles/drop-down-tree/fluent2.css +5 -1
- package/styles/drop-down-tree/highcontrast-light.css +0 -1
- package/styles/drop-down-tree/highcontrast.css +0 -1
- package/styles/drop-down-tree/tailwind-dark.css +0 -1
- package/styles/drop-down-tree/tailwind.css +0 -1
- package/styles/drop-down-tree/tailwind3.css +0 -1
- package/styles/fabric-dark-lite.css +0 -1
- package/styles/fabric-dark.css +0 -1
- package/styles/fabric-lite.css +0 -1
- package/styles/fabric.css +0 -1
- package/styles/fluent-dark-lite.css +0 -1
- package/styles/fluent-dark.css +3 -4
- package/styles/fluent-lite.css +0 -1
- package/styles/fluent.css +3 -4
- package/styles/fluent2-lite.css +8 -2
- package/styles/fluent2.css +13 -7
- package/styles/highcontrast-light-lite.css +0 -1
- package/styles/highcontrast-light.css +0 -2
- package/styles/highcontrast-lite.css +1 -1
- package/styles/highcontrast.css +3 -4
- package/styles/material.css +2 -2
- package/styles/multi-select/_bigger.scss +6 -6
- package/styles/multi-select/_bootstrap4-definition.scss +1 -1
- package/styles/multi-select/_bootstrap5.3-definition.scss +1 -1
- package/styles/multi-select/_fluent-definition.scss +1 -1
- package/styles/multi-select/_fluent2-definition.scss +1 -1
- package/styles/multi-select/_highcontrast-definition.scss +1 -1
- package/styles/multi-select/_material-definition.scss +1 -1
- package/styles/multi-select/_tailwind-definition.scss +2 -2
- package/styles/multi-select/_tailwind3-definition.scss +1 -1
- package/styles/multi-select/bootstrap4.css +7 -6
- package/styles/multi-select/bootstrap5.3.css +4 -2
- package/styles/multi-select/fluent-dark.css +3 -3
- package/styles/multi-select/fluent.css +3 -3
- package/styles/multi-select/fluent2.css +4 -2
- package/styles/multi-select/highcontrast-light.css +0 -1
- package/styles/multi-select/highcontrast.css +3 -3
- package/styles/multi-select/icons/_bootstrap4.scss +1 -0
- package/styles/multi-select/icons/_bootstrap5.3.scss +2 -0
- package/styles/multi-select/icons/_fluent2.scss +2 -0
- package/styles/multi-select/icons/_highcontrast.scss +1 -0
- package/styles/multi-select/icons/_tailwind3.scss +2 -0
- package/styles/multi-select/material.css +2 -2
- package/styles/multi-select/tailwind-dark.css +5 -5
- package/styles/multi-select/tailwind.css +5 -5
- package/styles/multi-select/tailwind3.css +4 -2
- package/styles/tailwind-dark-lite.css +1 -2
- package/styles/tailwind-dark.css +5 -6
- package/styles/tailwind-lite.css +1 -2
- package/styles/tailwind.css +5 -6
- package/styles/tailwind3-lite.css +2 -1
- package/styles/tailwind3.css +4 -3
|
@@ -1065,7 +1065,14 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1065
1065
|
var item = dataSource_1[_i];
|
|
1066
1066
|
if (!isNullOrUndefined(item)) {
|
|
1067
1067
|
if (ignoreAccent) {
|
|
1068
|
-
|
|
1068
|
+
if (ignoreCase) {
|
|
1069
|
+
if (this.checkIgnoreCase(String(item), text)) {
|
|
1070
|
+
value = this.checkingAccent(String(item), text, ignoreCase);
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
else {
|
|
1074
|
+
value = this.checkingAccent(String(item), text, ignoreCase);
|
|
1075
|
+
}
|
|
1069
1076
|
}
|
|
1070
1077
|
else {
|
|
1071
1078
|
if (ignoreCase) {
|
|
@@ -1537,9 +1544,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1537
1544
|
for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
|
|
1538
1545
|
var option = options_1[_i];
|
|
1539
1546
|
var json = {};
|
|
1540
|
-
json[fields.text] = option.
|
|
1547
|
+
json[fields.text] = option.innerHTML;
|
|
1541
1548
|
json[fields.value] = !isNullOrUndefined(option.getAttribute(fields.value)) ?
|
|
1542
|
-
option.getAttribute(fields.value) : option.
|
|
1549
|
+
option.getAttribute(fields.value) : option.innerHTML;
|
|
1543
1550
|
if (!isNullOrUndefined(category)) {
|
|
1544
1551
|
json[fields.groupBy] = category;
|
|
1545
1552
|
}
|
|
@@ -3317,10 +3324,10 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3317
3324
|
DropDownList.prototype.floatLabelChange = function () {
|
|
3318
3325
|
if (this.getModuleName() === 'dropdownlist' && this.floatLabelType === 'Auto') {
|
|
3319
3326
|
var floatElement = this.inputWrapper.container.querySelector('.e-float-text');
|
|
3320
|
-
if (this.inputElement.value !== '' || this.isInteracted) {
|
|
3327
|
+
if (floatElement && this.inputElement.value !== '' || this.isInteracted) {
|
|
3321
3328
|
classList(floatElement, ['e-label-top'], ['e-label-bottom']);
|
|
3322
3329
|
}
|
|
3323
|
-
else {
|
|
3330
|
+
else if (floatElement) {
|
|
3324
3331
|
classList(floatElement, ['e-label-bottom'], ['e-label-top']);
|
|
3325
3332
|
}
|
|
3326
3333
|
}
|
|
@@ -5701,8 +5708,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5701
5708
|
this.removeFocus();
|
|
5702
5709
|
if (this.allowFiltering && this.actionCompleteData && this.actionCompleteData.ulElement &&
|
|
5703
5710
|
this.dataSource instanceof DataManager) {
|
|
5704
|
-
var focus_1 = this.actionCompleteData.ulElement.
|
|
5705
|
-
if (focus_1) {
|
|
5711
|
+
var focus_1 = this.actionCompleteData.ulElement.querySelectorAll('.' + dropDownListClasses.focus);
|
|
5712
|
+
if (focus_1 && focus_1.length) {
|
|
5706
5713
|
removeClass(focus_1, dropDownListClasses.focus);
|
|
5707
5714
|
}
|
|
5708
5715
|
}
|
|
@@ -5735,29 +5742,29 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5735
5742
|
this.trigger('beforeOpen', args, function (args) {
|
|
5736
5743
|
var initialPopupHeight;
|
|
5737
5744
|
if (!args.cancel) {
|
|
5738
|
-
var
|
|
5745
|
+
var popupEle_1 = _this.createElement('div', {
|
|
5739
5746
|
id: _this.element.id + '_popup', className: 'e-ddl e-popup ' + (_this.cssClass !== null ? _this.cssClass : '')
|
|
5740
5747
|
});
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
var searchBox = _this.setSearchBox(
|
|
5748
|
+
popupEle_1.setAttribute('aria-label', _this.element.id);
|
|
5749
|
+
popupEle_1.setAttribute('role', 'dialog');
|
|
5750
|
+
var searchBox = _this.setSearchBox(popupEle_1);
|
|
5744
5751
|
_this.listContainerHeight = _this.allowFiltering && _this.getModuleName() === 'dropdownlist' && Browser.isDevice && _this.isDeviceFullScreen ?
|
|
5745
5752
|
formatUnit(Math.round(window.outerHeight).toString() + 'px') : formatUnit(_this.popupHeight);
|
|
5746
5753
|
if (_this.headerTemplate) {
|
|
5747
|
-
_this.setHeaderTemplate(
|
|
5754
|
+
_this.setHeaderTemplate(popupEle_1);
|
|
5748
5755
|
_this.isUpdateHeaderHeight = _this.header.offsetHeight !== 0;
|
|
5749
5756
|
}
|
|
5750
|
-
append([_this.list],
|
|
5757
|
+
append([_this.list], popupEle_1);
|
|
5751
5758
|
if (_this.footerTemplate) {
|
|
5752
|
-
_this.setFooterTemplate(
|
|
5759
|
+
_this.setFooterTemplate(popupEle_1);
|
|
5753
5760
|
_this.isUpdateFooterHeight = _this.footer.offsetHeight !== 0;
|
|
5754
5761
|
}
|
|
5755
|
-
document.body.appendChild(
|
|
5756
|
-
|
|
5757
|
-
initialPopupHeight =
|
|
5762
|
+
document.body.appendChild(popupEle_1);
|
|
5763
|
+
popupEle_1.style.top = '0px';
|
|
5764
|
+
initialPopupHeight = popupEle_1.clientHeight;
|
|
5758
5765
|
if (_this.enableVirtualization && (_this.itemTemplate || _this.isAngular)) {
|
|
5759
|
-
var listitems =
|
|
5760
|
-
var virtualListitems =
|
|
5766
|
+
var listitems = popupEle_1.querySelectorAll('li.e-list-item:not(.e-virtual-list)');
|
|
5767
|
+
var virtualListitems = popupEle_1.querySelectorAll('li.e-virtual-list');
|
|
5761
5768
|
var listitemsHeight = listitems && listitems.length > 0 ?
|
|
5762
5769
|
Math.ceil(listitems[0].getBoundingClientRect().height) +
|
|
5763
5770
|
parseInt(window.getComputedStyle(listitems[0]).marginBottom, 10) : 0;
|
|
@@ -5795,14 +5802,14 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5795
5802
|
className: 'e-virtual-ddl'
|
|
5796
5803
|
});
|
|
5797
5804
|
virtualElement.style.cssText = _this.GetVirtualTrackHeight();
|
|
5798
|
-
|
|
5805
|
+
popupEle_1.querySelector('.e-dropdownbase').appendChild(virtualElement);
|
|
5799
5806
|
}
|
|
5800
5807
|
else {
|
|
5801
5808
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5802
5809
|
_this.list.getElementsByClassName('e-virtual-ddl')[0].style = _this.GetVirtualTrackHeight();
|
|
5803
5810
|
}
|
|
5804
5811
|
}
|
|
5805
|
-
|
|
5812
|
+
popupEle_1.style.visibility = 'hidden';
|
|
5806
5813
|
if (_this.popupHeight !== 'auto') {
|
|
5807
5814
|
_this.searchBoxHeight = 0;
|
|
5808
5815
|
if (!isNullOrUndefined(searchBox.container) &&
|
|
@@ -5811,22 +5818,22 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5811
5818
|
_this.listContainerHeight = (parseInt(_this.listContainerHeight, 10) - (_this.searchBoxHeight)).toString() + 'px';
|
|
5812
5819
|
}
|
|
5813
5820
|
if (_this.headerTemplate) {
|
|
5814
|
-
_this.header = _this.header ? _this.header :
|
|
5821
|
+
_this.header = _this.header ? _this.header : popupEle_1.querySelector('.e-ddl-header');
|
|
5815
5822
|
var height = Math.round(_this.header.getBoundingClientRect().height);
|
|
5816
5823
|
_this.listContainerHeight = (parseInt(_this.listContainerHeight, 10) -
|
|
5817
5824
|
(height + _this.searchBoxHeight)).toString() + 'px';
|
|
5818
5825
|
}
|
|
5819
5826
|
if (_this.footerTemplate) {
|
|
5820
|
-
_this.footer = _this.footer ? _this.footer :
|
|
5827
|
+
_this.footer = _this.footer ? _this.footer : popupEle_1.querySelector('.e-ddl-footer');
|
|
5821
5828
|
var height = Math.round(_this.footer.getBoundingClientRect().height);
|
|
5822
5829
|
_this.listContainerHeight = (parseInt(_this.listContainerHeight, 10) -
|
|
5823
5830
|
(height + _this.searchBoxHeight)).toString() + 'px';
|
|
5824
5831
|
}
|
|
5825
5832
|
_this.list.style.maxHeight = (parseInt(_this.listContainerHeight, 10) - 2).toString() + 'px'; // due to box-sizing property
|
|
5826
|
-
|
|
5833
|
+
popupEle_1.style.maxHeight = formatUnit(_this.popupHeight);
|
|
5827
5834
|
}
|
|
5828
5835
|
else {
|
|
5829
|
-
|
|
5836
|
+
popupEle_1.style.height = 'auto';
|
|
5830
5837
|
}
|
|
5831
5838
|
var offsetValue = 0;
|
|
5832
5839
|
var left = void 0;
|
|
@@ -5842,7 +5849,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5842
5849
|
}
|
|
5843
5850
|
if (Browser.isDevice && _this.isDeviceFullScreen && (!_this.allowFiltering && (_this.getModuleName() === 'dropdownlist' ||
|
|
5844
5851
|
(_this.isDropDownClick && _this.getModuleName() === 'combobox')))) {
|
|
5845
|
-
offsetValue = _this.getOffsetValue(
|
|
5852
|
+
offsetValue = _this.getOffsetValue(popupEle_1);
|
|
5846
5853
|
var firstItem = _this.isEmptyList() ? _this.list : _this.liCollections[0];
|
|
5847
5854
|
if (!isNullOrUndefined(_this.inputElement)) {
|
|
5848
5855
|
left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) -
|
|
@@ -5850,10 +5857,10 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5850
5857
|
parseInt(getComputedStyle(_this.inputElement.parentElement).borderLeftWidth, 10));
|
|
5851
5858
|
}
|
|
5852
5859
|
}
|
|
5853
|
-
_this.createPopup(
|
|
5860
|
+
_this.createPopup(popupEle_1, offsetValue, left);
|
|
5854
5861
|
_this.popupContentElement = _this.popupObj.element.querySelector('.e-content');
|
|
5855
5862
|
_this.getFocusElement();
|
|
5856
|
-
_this.checkCollision(
|
|
5863
|
+
_this.checkCollision(popupEle_1);
|
|
5857
5864
|
if (Browser.isDevice) {
|
|
5858
5865
|
if ((parseInt(_this.popupWidth.toString(), 10) > window.outerWidth) &&
|
|
5859
5866
|
!(_this.getModuleName() === 'dropdownlist' && _this.allowFiltering)) {
|
|
@@ -5877,8 +5884,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5877
5884
|
EventHandler.add(_this.clearIconElement, 'click', _this.clearText, _this);
|
|
5878
5885
|
}
|
|
5879
5886
|
}
|
|
5880
|
-
|
|
5881
|
-
addClass([
|
|
5887
|
+
popupEle_1.style.visibility = 'visible';
|
|
5888
|
+
addClass([popupEle_1], 'e-popup-close');
|
|
5882
5889
|
var scrollParentElements = _this.popupObj.getScrollableParent(_this.inputWrapper.container);
|
|
5883
5890
|
for (var _i = 0, scrollParentElements_1 = scrollParentElements; _i < scrollParentElements_1.length; _i++) {
|
|
5884
5891
|
var element = scrollParentElements_1[_i];
|
|
@@ -5898,7 +5905,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5898
5905
|
setTimeout(function () {
|
|
5899
5906
|
if (_this.value || _this.list.querySelector('.e-active')) {
|
|
5900
5907
|
_this.updateSelectionList();
|
|
5901
|
-
if (_this.
|
|
5908
|
+
if (_this.viewPortInfo && _this.viewPortInfo.offsets.top) {
|
|
5902
5909
|
_this.list.scrollTop = _this.viewPortInfo.offsets.top;
|
|
5903
5910
|
}
|
|
5904
5911
|
else {
|
|
@@ -5958,7 +5965,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5958
5965
|
}
|
|
5959
5966
|
});
|
|
5960
5967
|
if (_this.allowResize && (_this.getModuleName() !== 'dropdownlist' || !(Browser.isDevice && _this.isDeviceFullScreen && _this.allowFiltering))) {
|
|
5961
|
-
var
|
|
5968
|
+
var resizePaddingBottom_1 = 16;
|
|
5962
5969
|
// Create the resizer div
|
|
5963
5970
|
_this.resizer = _this.createElement('div', {
|
|
5964
5971
|
id: _this.element.id + '_resize-popup',
|
|
@@ -5970,9 +5977,25 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5970
5977
|
if (_this.popupHeight.toString().toLowerCase() !== 'auto' && initialPopupHeight >= (parseInt(_this.popupHeight.toString(), 10) - 2)) {
|
|
5971
5978
|
_this.list.parentElement.style.height = '100%';
|
|
5972
5979
|
}
|
|
5973
|
-
_this.list.parentElement.style.paddingBottom = (_this.getModuleName() === 'dropdownlist' && _this.allowFiltering && _this.searchBoxHeight) ? (_this.searchBoxHeight +
|
|
5974
|
-
if (_this.
|
|
5975
|
-
|
|
5980
|
+
_this.list.parentElement.style.paddingBottom = (_this.getModuleName() === 'dropdownlist' && _this.allowFiltering && _this.searchBoxHeight) ? (_this.searchBoxHeight + resizePaddingBottom_1).toString() + 'px' : resizePaddingBottom_1.toString() + 'px';
|
|
5981
|
+
if (_this.isReact && _this.footer) {
|
|
5982
|
+
var listMaxHeight_1 = _this.list.style.maxHeight;
|
|
5983
|
+
var listParentElementMaxHeight_1 = _this.list.parentElement.style.maxHeight;
|
|
5984
|
+
var containerHeight_1 = _this.listContainerHeight;
|
|
5985
|
+
setTimeout(function () {
|
|
5986
|
+
_this.footer = _this.footer ? _this.footer : popupEle_1.querySelector('.e-ddl-footer');
|
|
5987
|
+
var height = Math.round(_this.footer.getBoundingClientRect().height);
|
|
5988
|
+
if (height > 0) {
|
|
5989
|
+
containerHeight_1 = (parseInt(containerHeight_1, 10) - height).toString() + 'px';
|
|
5990
|
+
listMaxHeight_1 = (parseInt(containerHeight_1, 10) - 2).toString() + 'px';
|
|
5991
|
+
_this.list.parentElement.style.paddingBottom = ((parseInt(listParentElementMaxHeight_1, 10) - parseInt(listMaxHeight_1, 10)) + resizePaddingBottom_1).toString() + 'px';
|
|
5992
|
+
}
|
|
5993
|
+
}, 1);
|
|
5994
|
+
}
|
|
5995
|
+
else {
|
|
5996
|
+
if (_this.header || _this.footer || _this.itemTemplate) {
|
|
5997
|
+
_this.list.parentElement.style.paddingBottom = ((parseInt(_this.list.parentElement.style.maxHeight, 10) - parseInt(_this.list.style.maxHeight, 10)) + resizePaddingBottom_1).toString() + 'px';
|
|
5998
|
+
}
|
|
5976
5999
|
}
|
|
5977
6000
|
_this.list.parentElement.appendChild(_this.resizer);
|
|
5978
6001
|
//hold the popup resize
|
|
@@ -6481,9 +6504,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6481
6504
|
}
|
|
6482
6505
|
var dataSourceCount;
|
|
6483
6506
|
if (this.dataSource instanceof DataManager) {
|
|
6484
|
-
|
|
6485
|
-
dataSourceCount = this.virtualGroupDataSource && this.virtualGroupDataSource.length ?
|
|
6486
|
-
this.virtualGroupDataSource.length : 0;
|
|
6507
|
+
dataSourceCount = this.remoteDataCount;
|
|
6487
6508
|
}
|
|
6488
6509
|
else {
|
|
6489
6510
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -8860,8 +8881,14 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8860
8881
|
return remainElement;
|
|
8861
8882
|
};
|
|
8862
8883
|
DropDownTree.prototype.getOverflowVal = function (index) {
|
|
8884
|
+
var textSelected;
|
|
8863
8885
|
var selectedData = this.getSelectedData(this.value[parseInt(index.toString(), 10)]);
|
|
8864
|
-
|
|
8886
|
+
var node = this.treeObj.getNode(this.value[index]);
|
|
8887
|
+
textSelected = getValue(this.treeSettings.loadOnDemand ? this.fields.text : 'text', selectedData);
|
|
8888
|
+
if (isNullOrUndefined(textSelected) && !isNullOrUndefined(node.text)) {
|
|
8889
|
+
textSelected = node.text.toString();
|
|
8890
|
+
}
|
|
8891
|
+
return textSelected;
|
|
8865
8892
|
};
|
|
8866
8893
|
DropDownTree.prototype.updateDelimMode = function () {
|
|
8867
8894
|
if (this.mode !== 'Box') {
|
|
@@ -10218,7 +10245,11 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
10218
10245
|
var compiledString = this.initializeValueTemplate();
|
|
10219
10246
|
for (var i = 0, len = this.value.length; i < len; i++) {
|
|
10220
10247
|
selectedData = this.getSelectedData(this.value[i]);
|
|
10248
|
+
var node = this.treeObj.getNode(this.value[i]);
|
|
10221
10249
|
text = getValue(this.treeSettings.loadOnDemand ? this.fields.text : 'text', selectedData);
|
|
10250
|
+
if (isNullOrUndefined(text) && !isNullOrUndefined(node.text)) {
|
|
10251
|
+
text = node.text.toString();
|
|
10252
|
+
}
|
|
10222
10253
|
this.selectedText.push(text);
|
|
10223
10254
|
temp = this.selectedText[this.selectedText.length - 1];
|
|
10224
10255
|
if (this.selectedText.length > 1) {
|
|
@@ -11496,6 +11527,11 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
11496
11527
|
_this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
|
|
11497
11528
|
}
|
|
11498
11529
|
}
|
|
11530
|
+
else if (_this.allowCustom) {
|
|
11531
|
+
_this.valueMuteChange(_this.value);
|
|
11532
|
+
_this.setHiddenValue();
|
|
11533
|
+
Input.setValue(_this.text, _this.inputElement, _this.floatLabelType, _this.showClearButton);
|
|
11534
|
+
}
|
|
11499
11535
|
else {
|
|
11500
11536
|
_this.valueMuteChange(null);
|
|
11501
11537
|
}
|
|
@@ -11524,7 +11560,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
11524
11560
|
this.setSelection(li, null);
|
|
11525
11561
|
}
|
|
11526
11562
|
else if ((!this.enableVirtualization && this.allowCustom) ||
|
|
11527
|
-
(this.allowCustom && this.enableVirtualization && !doesItemExist)) {
|
|
11563
|
+
(this.allowCustom && this.enableVirtualization && !doesItemExist && !(this.dataSource instanceof DataManager))) {
|
|
11528
11564
|
this.valueMuteChange(this.value);
|
|
11529
11565
|
}
|
|
11530
11566
|
else if (!this.enableVirtualization || (this.enableVirtualization && !(this.dataSource instanceof DataManager)
|
|
@@ -11909,7 +11945,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
11909
11945
|
}
|
|
11910
11946
|
};
|
|
11911
11947
|
ComboBox.prototype.getValueByText = function (text) {
|
|
11912
|
-
return _super.prototype.getValueByText.call(this, text,
|
|
11948
|
+
return _super.prototype.getValueByText.call(this, text, this.ignoreCase, this.ignoreAccent);
|
|
11913
11949
|
};
|
|
11914
11950
|
ComboBox.prototype.unWireEvent = function () {
|
|
11915
11951
|
if (this.getModuleName() === 'combobox') {
|
|
@@ -14198,6 +14234,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14198
14234
|
this.removeFocus();
|
|
14199
14235
|
}
|
|
14200
14236
|
};
|
|
14237
|
+
MultiSelect.prototype.secureRandom = function () {
|
|
14238
|
+
var array = new Uint32Array(1);
|
|
14239
|
+
window.crypto.getRandomValues(array);
|
|
14240
|
+
return array[0] / (0xFFFFFFFF + 1);
|
|
14241
|
+
};
|
|
14201
14242
|
MultiSelect.prototype.checkForCustomValue = function (query, fields) {
|
|
14202
14243
|
var dataChecks = !this.getValueByText(this.inputElement.value, this.ignoreCase);
|
|
14203
14244
|
var field = fields ? fields : this.fields;
|
|
@@ -14211,7 +14252,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14211
14252
|
setValue(field.text, value, dataItem_1);
|
|
14212
14253
|
if (typeof getValue((this.fields.value ? this.fields.value : 'value'), customData)
|
|
14213
14254
|
=== 'number' && this.fields.value !== this.fields.text) {
|
|
14214
|
-
setValue(field.value,
|
|
14255
|
+
setValue(field.value, this.secureRandom(), dataItem_1);
|
|
14215
14256
|
}
|
|
14216
14257
|
else {
|
|
14217
14258
|
setValue(field.value, value, dataItem_1);
|
|
@@ -14332,6 +14373,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14332
14373
|
e.preventDefault();
|
|
14333
14374
|
}
|
|
14334
14375
|
this.checkAndScrollParent();
|
|
14376
|
+
if (this.maximumSelectionLength === 0) {
|
|
14377
|
+
this.checkMaxSelection();
|
|
14378
|
+
}
|
|
14335
14379
|
};
|
|
14336
14380
|
MultiSelect.prototype.checkAndScrollParent = function () {
|
|
14337
14381
|
var scrollElement = this.overAllWrapper ? this.overAllWrapper.parentElement : null;
|
|
@@ -15939,8 +15983,21 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15939
15983
|
this.updateChipStatus();
|
|
15940
15984
|
this.checkMaxSelection();
|
|
15941
15985
|
};
|
|
15986
|
+
MultiSelect.prototype.updateListItemsState = function (list) {
|
|
15987
|
+
var activeItems = list.querySelectorAll('li.' + dropDownBaseClasses.li + '.e-active');
|
|
15988
|
+
removeClass(activeItems, 'e-disable');
|
|
15989
|
+
var inactiveItems = list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-active)');
|
|
15990
|
+
addClass(inactiveItems, 'e-disable');
|
|
15991
|
+
};
|
|
15942
15992
|
MultiSelect.prototype.checkMaxSelection = function () {
|
|
15943
15993
|
var limit = this.value && this.value.length ? this.value.length : 0;
|
|
15994
|
+
if (this.maximumSelectionLength === 0) {
|
|
15995
|
+
this.updateListItemsState(this.list);
|
|
15996
|
+
if (this.mainList) {
|
|
15997
|
+
this.updateListItemsState(this.mainList);
|
|
15998
|
+
}
|
|
15999
|
+
return;
|
|
16000
|
+
}
|
|
15944
16001
|
if (limit === this.maximumSelectionLength) {
|
|
15945
16002
|
var activeItems = this.list.querySelectorAll('li.'
|
|
15946
16003
|
+ dropDownBaseClasses.li + '.e-active');
|
|
@@ -19126,6 +19183,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19126
19183
|
this.renderComplete();
|
|
19127
19184
|
};
|
|
19128
19185
|
MultiSelect.prototype.setResize = function () {
|
|
19186
|
+
var _this = this;
|
|
19129
19187
|
var resizePaddingBottom = 16;
|
|
19130
19188
|
if (this.list && this.list.parentElement && isNullOrUndefined(this.list.parentElement.querySelector('.e-resizer-right.e-icons'))) {
|
|
19131
19189
|
this.resizer = this.createElement('div', {
|
|
@@ -19143,8 +19201,22 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19143
19201
|
this.list.parentElement.style.height = '100%';
|
|
19144
19202
|
}
|
|
19145
19203
|
this.list.parentElement.style.boxSizing = 'border-box'; // Ensures padding doesn't affect element size
|
|
19146
|
-
var
|
|
19147
|
-
this.
|
|
19204
|
+
var paddingBottom_1 = this.mode === 'CheckBox' && this.searchBoxHeight ? this.searchBoxHeight + resizePaddingBottom + (this.showSelectAll ? this.storedSelectAllHeight : 0) : resizePaddingBottom;
|
|
19205
|
+
if (this.footer) {
|
|
19206
|
+
var listMaxHeight_1 = this.list.style.maxHeight;
|
|
19207
|
+
var listParentElementMaxHeight_1 = this.list.parentElement.style.maxHeight;
|
|
19208
|
+
setTimeout(function () {
|
|
19209
|
+
var height = Math.round(_this.footer.getBoundingClientRect().height);
|
|
19210
|
+
var containerHeight = (parseInt(listParentElementMaxHeight_1, 10) - height).toString() + 'px';
|
|
19211
|
+
listMaxHeight_1 = (parseInt(containerHeight, 10) - 2).toString() + 'px';
|
|
19212
|
+
if (height > 0) {
|
|
19213
|
+
_this.list.parentElement.style.paddingBottom = ((parseInt(listParentElementMaxHeight_1, 10) - parseInt(listMaxHeight_1, 10)) + paddingBottom_1).toString() + 'px';
|
|
19214
|
+
}
|
|
19215
|
+
}, 1);
|
|
19216
|
+
}
|
|
19217
|
+
else {
|
|
19218
|
+
this.list.parentElement.style.paddingBottom = paddingBottom_1 + "px";
|
|
19219
|
+
}
|
|
19148
19220
|
this.list.parentElement.appendChild(this.resizer);
|
|
19149
19221
|
this.list.parentElement.style.width = this.resizeWidth + 'px';
|
|
19150
19222
|
this.list.parentElement.style.height = this.resizeHeight + 'px';
|
|
@@ -23439,7 +23511,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
23439
23511
|
}
|
|
23440
23512
|
if (this.isContentEditable(this.inputElement)) {
|
|
23441
23513
|
this.range = this.getCurrentRange();
|
|
23442
|
-
|
|
23514
|
+
if (this.range) {
|
|
23515
|
+
rangetextContent = this.range.startContainer.textContent.split('');
|
|
23516
|
+
}
|
|
23443
23517
|
}
|
|
23444
23518
|
var currentRange = this.getTextRange();
|
|
23445
23519
|
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
@@ -23554,7 +23628,8 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
23554
23628
|
return isMatched;
|
|
23555
23629
|
};
|
|
23556
23630
|
Mention.prototype.getCurrentRange = function () {
|
|
23557
|
-
this.range = this.inputElement.ownerDocument.getSelection().
|
|
23631
|
+
this.range = this.inputElement.ownerDocument.getSelection().rangeCount > 0 &&
|
|
23632
|
+
this.inputElement.ownerDocument.getSelection().getRangeAt(0);
|
|
23558
23633
|
return this.range;
|
|
23559
23634
|
};
|
|
23560
23635
|
Mention.prototype.performFiltering = function (e) {
|