@syncfusion/ej2-dropdowns 19.4.48 → 19.4.54
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 +20 -0
- package/README.md +1 -1
- 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 +82 -35
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +160 -107
- 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 +11 -11
- package/src/combo-box/combo-box.js +4 -1
- package/src/drop-down-base/drop-down-base.js +18 -6
- package/src/drop-down-list/drop-down-list.js +106 -71
- package/src/drop-down-tree/drop-down-tree.js +6 -14
- package/src/list-box/list-box.js +4 -3
- package/src/multi-select/multi-select.js +19 -9
- package/styles/bootstrap-dark.css +10 -1
- package/styles/bootstrap.css +10 -1
- package/styles/bootstrap4.css +10 -1
- package/styles/bootstrap5-dark.css +10 -1
- package/styles/bootstrap5.css +10 -1
- package/styles/fabric-dark.css +10 -1
- package/styles/fabric.css +10 -1
- package/styles/highcontrast-light.css +10 -1
- package/styles/highcontrast.css +10 -1
- package/styles/material-dark.css +10 -1
- package/styles/material.css +10 -1
- package/styles/multi-select/_layout.scss +10 -1
- package/styles/multi-select/bootstrap-dark.css +10 -1
- package/styles/multi-select/bootstrap.css +10 -1
- package/styles/multi-select/bootstrap4.css +10 -1
- package/styles/multi-select/bootstrap5-dark.css +10 -1
- package/styles/multi-select/bootstrap5.css +10 -1
- package/styles/multi-select/fabric-dark.css +10 -1
- package/styles/multi-select/fabric.css +10 -1
- package/styles/multi-select/highcontrast-light.css +10 -1
- package/styles/multi-select/highcontrast.css +10 -1
- package/styles/multi-select/material-dark.css +10 -1
- package/styles/multi-select/material.css +10 -1
- package/styles/multi-select/tailwind-dark.css +10 -1
- package/styles/multi-select/tailwind.css +10 -1
- package/styles/tailwind-dark.css +10 -1
- package/styles/tailwind.css +10 -1
|
@@ -234,6 +234,7 @@ var HEADERTEMPLATE_PROPERTY = 'HeaderTemplate';
|
|
|
234
234
|
var FOOTERTEMPLATE_PROPERTY = 'FooterTemplate';
|
|
235
235
|
var NORECORDSTEMPLATE_PROPERTY = 'NoRecordsTemplate';
|
|
236
236
|
var ACTIONFAILURETEMPLATE_PROPERTY = 'ActionFailureTemplate';
|
|
237
|
+
var HIDE_GROUPLIST = 'e-hide-group-header';
|
|
237
238
|
/**
|
|
238
239
|
* DropDownBase component will generate the list items based on given data and act as base class to drop-down related components
|
|
239
240
|
*/
|
|
@@ -660,7 +661,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
660
661
|
}
|
|
661
662
|
_this.bindChildItems(localDataArgs.result, ulElement, fields);
|
|
662
663
|
setTimeout(function () {
|
|
663
|
-
if (_this.getModuleName() === 'multiselect' && _this.itemTemplate != null && (ulElement.childElementCount > 0 && ulElement.children[0].childElementCount > 0)) {
|
|
664
|
+
if (_this.getModuleName() === 'multiselect' && _this.itemTemplate != null && (ulElement.childElementCount > 0 && (ulElement.children[0].childElementCount > 0 || (_this.fields.groupBy && ulElement.children[1] && ulElement.children[1].childElementCount > 0)))) {
|
|
664
665
|
_this.updateDataList();
|
|
665
666
|
}
|
|
666
667
|
});
|
|
@@ -747,12 +748,23 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
747
748
|
if (this.isReact) {
|
|
748
749
|
this.clearTemplate(['itemTemplate', 'groupTemplate', 'actionFailureTemplate', 'noRecordsTemplate']);
|
|
749
750
|
}
|
|
750
|
-
this.list.innerHTML = '';
|
|
751
751
|
this.fixedHeaderElement = isNullOrUndefined(this.fixedHeaderElement) ? this.fixedHeaderElement : null;
|
|
752
|
-
this.
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
752
|
+
if (this.getModuleName() === 'multiselect' && this.properties.allowCustomValue && this.fields.groupBy) {
|
|
753
|
+
for (var i = 0; i < ulElement.childElementCount; i++) {
|
|
754
|
+
if (ulElement.children[i].classList.contains('e-list-group-item')) {
|
|
755
|
+
if (isNullOrUndefined(ulElement.children[i].innerHTML) || ulElement.children[i].innerHTML == "") {
|
|
756
|
+
addClass([ulElement.children[i]], HIDE_GROUPLIST);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
if (!isNullOrUndefined(this.list)) {
|
|
762
|
+
this.list.innerHTML = '';
|
|
763
|
+
this.list.appendChild(ulElement);
|
|
764
|
+
this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
|
|
765
|
+
this.ulElement = this.list.querySelector('ul');
|
|
766
|
+
this.postRender(this.list, list, this.bindEvent);
|
|
767
|
+
}
|
|
756
768
|
};
|
|
757
769
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
758
770
|
DropDownBase.prototype.postRender = function (listElement, list, bindEvent) {
|
|
@@ -3682,160 +3694,195 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3682
3694
|
* @returns {void}
|
|
3683
3695
|
*/
|
|
3684
3696
|
DropDownList.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
3697
|
+
var _this = this;
|
|
3685
3698
|
if (this.getModuleName() === 'dropdownlist') {
|
|
3686
3699
|
this.checkData(newProp);
|
|
3687
3700
|
this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);
|
|
3688
3701
|
}
|
|
3689
|
-
|
|
3690
|
-
var prop = _a[_i];
|
|
3702
|
+
var _loop_1 = function (prop) {
|
|
3691
3703
|
switch (prop) {
|
|
3692
3704
|
case 'query':
|
|
3693
3705
|
case 'dataSource': break;
|
|
3694
3706
|
case 'htmlAttributes':
|
|
3695
|
-
|
|
3707
|
+
this_1.setHTMLAttributes();
|
|
3696
3708
|
break;
|
|
3697
3709
|
case 'width':
|
|
3698
|
-
|
|
3710
|
+
this_1.setEleWidth(newProp.width);
|
|
3699
3711
|
break;
|
|
3700
3712
|
case 'placeholder':
|
|
3701
|
-
Input.setPlaceholder(newProp.placeholder,
|
|
3713
|
+
Input.setPlaceholder(newProp.placeholder, this_1.inputElement);
|
|
3702
3714
|
break;
|
|
3703
3715
|
case 'filterBarPlaceholder':
|
|
3704
|
-
if (
|
|
3705
|
-
Input.setPlaceholder(newProp.filterBarPlaceholder,
|
|
3716
|
+
if (this_1.filterInput) {
|
|
3717
|
+
Input.setPlaceholder(newProp.filterBarPlaceholder, this_1.filterInput);
|
|
3706
3718
|
}
|
|
3707
3719
|
break;
|
|
3708
3720
|
case 'readonly':
|
|
3709
|
-
if (
|
|
3710
|
-
Input.setReadonly(newProp.readonly,
|
|
3721
|
+
if (this_1.getModuleName() !== 'dropdownlist') {
|
|
3722
|
+
Input.setReadonly(newProp.readonly, this_1.inputElement);
|
|
3711
3723
|
}
|
|
3712
|
-
|
|
3724
|
+
this_1.setReadOnly();
|
|
3713
3725
|
break;
|
|
3714
3726
|
case 'cssClass':
|
|
3715
|
-
|
|
3727
|
+
this_1.setCssClass(newProp.cssClass, oldProp.cssClass);
|
|
3716
3728
|
break;
|
|
3717
3729
|
case 'enableRtl':
|
|
3718
|
-
|
|
3730
|
+
this_1.setEnableRtl();
|
|
3719
3731
|
break;
|
|
3720
3732
|
case 'enabled':
|
|
3721
|
-
|
|
3733
|
+
this_1.setEnable();
|
|
3722
3734
|
break;
|
|
3723
3735
|
case 'text':
|
|
3724
3736
|
if (newProp.text === null) {
|
|
3725
|
-
|
|
3737
|
+
this_1.clearAll();
|
|
3726
3738
|
break;
|
|
3727
3739
|
}
|
|
3728
|
-
if (!
|
|
3729
|
-
if (
|
|
3730
|
-
|
|
3740
|
+
if (!this_1.list) {
|
|
3741
|
+
if (this_1.dataSource instanceof DataManager) {
|
|
3742
|
+
this_1.initRemoteRender = true;
|
|
3731
3743
|
}
|
|
3732
|
-
|
|
3733
|
-
}
|
|
3734
|
-
if (!
|
|
3735
|
-
var li =
|
|
3736
|
-
if (!
|
|
3737
|
-
if (
|
|
3738
|
-
|
|
3739
|
-
|
|
3744
|
+
this_1.renderList();
|
|
3745
|
+
}
|
|
3746
|
+
if (!this_1.initRemoteRender) {
|
|
3747
|
+
var li = this_1.getElementByText(newProp.text);
|
|
3748
|
+
if (!this_1.checkValidLi(li)) {
|
|
3749
|
+
if (this_1.liCollections && this_1.liCollections.length === 100 &&
|
|
3750
|
+
this_1.getModuleName() === 'autocomplete' && this_1.listData.length > 100) {
|
|
3751
|
+
this_1.setSelectionData(newProp.text, oldProp.text, 'text');
|
|
3752
|
+
}
|
|
3753
|
+
else if (newProp.text && this_1.dataSource instanceof DataManager) {
|
|
3754
|
+
var listLength_1 = this_1.getItems().length;
|
|
3755
|
+
var checkField = isNullOrUndefined(this_1.fields.text) ? this_1.fields.value : this_1.fields.text;
|
|
3756
|
+
this_1.typedString = '';
|
|
3757
|
+
this_1.dataSource.executeQuery(this_1.getQuery(this_1.query).where(new Predicate(checkField, 'equal', newProp.text)))
|
|
3758
|
+
.then(function (e) {
|
|
3759
|
+
if (e.result.length > 0) {
|
|
3760
|
+
_this.addItem(e.result, listLength_1);
|
|
3761
|
+
_this.updateValues();
|
|
3762
|
+
}
|
|
3763
|
+
else {
|
|
3764
|
+
_this.setOldText(oldProp.text);
|
|
3765
|
+
}
|
|
3766
|
+
});
|
|
3740
3767
|
}
|
|
3741
3768
|
else {
|
|
3742
|
-
|
|
3769
|
+
this_1.setOldText(oldProp.text);
|
|
3743
3770
|
}
|
|
3744
3771
|
}
|
|
3745
|
-
|
|
3772
|
+
this_1.updateInputFields();
|
|
3746
3773
|
}
|
|
3747
3774
|
break;
|
|
3748
3775
|
case 'value':
|
|
3749
3776
|
if (newProp.value === null) {
|
|
3750
|
-
|
|
3777
|
+
this_1.clearAll();
|
|
3751
3778
|
break;
|
|
3752
3779
|
}
|
|
3753
|
-
|
|
3754
|
-
if (!
|
|
3755
|
-
if (
|
|
3756
|
-
|
|
3780
|
+
this_1.notify('beforeValueChange', { newProp: newProp }); // gird component value type change
|
|
3781
|
+
if (!this_1.list) {
|
|
3782
|
+
if (this_1.dataSource instanceof DataManager) {
|
|
3783
|
+
this_1.initRemoteRender = true;
|
|
3757
3784
|
}
|
|
3758
|
-
|
|
3759
|
-
}
|
|
3760
|
-
if (!
|
|
3761
|
-
var item =
|
|
3762
|
-
if (!
|
|
3763
|
-
if (
|
|
3764
|
-
|
|
3765
|
-
|
|
3785
|
+
this_1.renderList();
|
|
3786
|
+
}
|
|
3787
|
+
if (!this_1.initRemoteRender) {
|
|
3788
|
+
var item = this_1.getElementByValue(newProp.value);
|
|
3789
|
+
if (!this_1.checkValidLi(item)) {
|
|
3790
|
+
if (this_1.liCollections && this_1.liCollections.length === 100 &&
|
|
3791
|
+
this_1.getModuleName() === 'autocomplete' && this_1.listData.length > 100) {
|
|
3792
|
+
this_1.setSelectionData(newProp.value, oldProp.value, 'value');
|
|
3793
|
+
}
|
|
3794
|
+
else if (newProp.value && this_1.dataSource instanceof DataManager) {
|
|
3795
|
+
var listLength_2 = this_1.getItems().length;
|
|
3796
|
+
var checkField = isNullOrUndefined(this_1.fields.value) ? this_1.fields.text : this_1.fields.value;
|
|
3797
|
+
this_1.typedString = '';
|
|
3798
|
+
this_1.dataSource.executeQuery(this_1.getQuery(this_1.query).where(new Predicate(checkField, 'equal', newProp.value)))
|
|
3799
|
+
.then(function (e) {
|
|
3800
|
+
if (e.result.length > 0) {
|
|
3801
|
+
_this.addItem(e.result, listLength_2);
|
|
3802
|
+
_this.updateValues();
|
|
3803
|
+
}
|
|
3804
|
+
else {
|
|
3805
|
+
_this.setOldValue(oldProp.value);
|
|
3806
|
+
}
|
|
3807
|
+
});
|
|
3766
3808
|
}
|
|
3767
3809
|
else {
|
|
3768
|
-
|
|
3810
|
+
this_1.setOldValue(oldProp.value);
|
|
3769
3811
|
}
|
|
3770
3812
|
}
|
|
3771
|
-
|
|
3772
|
-
|
|
3813
|
+
this_1.updateInputFields();
|
|
3814
|
+
this_1.preventChange = this_1.isAngular && this_1.preventChange ? !this_1.preventChange : this_1.preventChange;
|
|
3773
3815
|
}
|
|
3774
3816
|
break;
|
|
3775
3817
|
case 'index':
|
|
3776
3818
|
if (newProp.index === null) {
|
|
3777
|
-
|
|
3819
|
+
this_1.clearAll();
|
|
3778
3820
|
break;
|
|
3779
3821
|
}
|
|
3780
|
-
if (!
|
|
3781
|
-
if (
|
|
3782
|
-
|
|
3822
|
+
if (!this_1.list) {
|
|
3823
|
+
if (this_1.dataSource instanceof DataManager) {
|
|
3824
|
+
this_1.initRemoteRender = true;
|
|
3783
3825
|
}
|
|
3784
|
-
|
|
3785
|
-
}
|
|
3786
|
-
if (!
|
|
3787
|
-
var element =
|
|
3788
|
-
if (!
|
|
3789
|
-
if (
|
|
3790
|
-
|
|
3791
|
-
|
|
3826
|
+
this_1.renderList();
|
|
3827
|
+
}
|
|
3828
|
+
if (!this_1.initRemoteRender && this_1.liCollections) {
|
|
3829
|
+
var element = this_1.liCollections[newProp.index];
|
|
3830
|
+
if (!this_1.checkValidLi(element)) {
|
|
3831
|
+
if (this_1.liCollections && this_1.liCollections.length === 100 &&
|
|
3832
|
+
this_1.getModuleName() === 'autocomplete' && this_1.listData.length > 100) {
|
|
3833
|
+
this_1.setSelectionData(newProp.index, oldProp.index, 'index');
|
|
3792
3834
|
}
|
|
3793
3835
|
else {
|
|
3794
|
-
|
|
3836
|
+
this_1.index = oldProp.index;
|
|
3795
3837
|
}
|
|
3796
3838
|
}
|
|
3797
|
-
|
|
3839
|
+
this_1.updateInputFields();
|
|
3798
3840
|
}
|
|
3799
3841
|
break;
|
|
3800
3842
|
case 'footerTemplate':
|
|
3801
|
-
if (
|
|
3802
|
-
|
|
3843
|
+
if (this_1.popupObj) {
|
|
3844
|
+
this_1.setFooterTemplate(this_1.popupObj.element);
|
|
3803
3845
|
}
|
|
3804
3846
|
break;
|
|
3805
3847
|
case 'headerTemplate':
|
|
3806
|
-
if (
|
|
3807
|
-
|
|
3848
|
+
if (this_1.popupObj) {
|
|
3849
|
+
this_1.setHeaderTemplate(this_1.popupObj.element);
|
|
3808
3850
|
}
|
|
3809
3851
|
break;
|
|
3810
3852
|
case 'valueTemplate':
|
|
3811
|
-
if (!isNullOrUndefined(
|
|
3812
|
-
|
|
3853
|
+
if (!isNullOrUndefined(this_1.itemData) && this_1.valueTemplate != null) {
|
|
3854
|
+
this_1.setValueTemplate();
|
|
3813
3855
|
}
|
|
3814
3856
|
break;
|
|
3815
3857
|
case 'allowFiltering':
|
|
3816
|
-
if (
|
|
3817
|
-
|
|
3818
|
-
list:
|
|
3819
|
-
|
|
3820
|
-
|
|
3858
|
+
if (this_1.allowFiltering) {
|
|
3859
|
+
this_1.actionCompleteData = { ulElement: this_1.ulElement,
|
|
3860
|
+
list: this_1.listData, isUpdated: true };
|
|
3861
|
+
this_1.actionData = this_1.actionCompleteData;
|
|
3862
|
+
this_1.updateSelectElementData(this_1.allowFiltering);
|
|
3821
3863
|
}
|
|
3822
3864
|
break;
|
|
3823
3865
|
case 'floatLabelType':
|
|
3824
|
-
Input.removeFloating(
|
|
3825
|
-
Input.addFloating(
|
|
3866
|
+
Input.removeFloating(this_1.inputWrapper);
|
|
3867
|
+
Input.addFloating(this_1.inputElement, newProp.floatLabelType, this_1.placeholder, this_1.createElement);
|
|
3826
3868
|
break;
|
|
3827
3869
|
case 'showClearButton':
|
|
3828
|
-
Input.setClearButton(newProp.showClearButton,
|
|
3829
|
-
|
|
3870
|
+
Input.setClearButton(newProp.showClearButton, this_1.inputElement, this_1.inputWrapper, null, this_1.createElement);
|
|
3871
|
+
this_1.bindClearEvent();
|
|
3830
3872
|
break;
|
|
3831
3873
|
default:
|
|
3832
3874
|
{
|
|
3833
3875
|
// eslint-disable-next-line max-len
|
|
3834
|
-
var ddlProps =
|
|
3835
|
-
_super.prototype.onPropertyChanged.call(
|
|
3876
|
+
var ddlProps = this_1.getPropObject(prop, newProp, oldProp);
|
|
3877
|
+
_super.prototype.onPropertyChanged.call(this_1, ddlProps.newProperty, ddlProps.oldProperty);
|
|
3836
3878
|
}
|
|
3837
3879
|
break;
|
|
3838
3880
|
}
|
|
3881
|
+
};
|
|
3882
|
+
var this_1 = this;
|
|
3883
|
+
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
3884
|
+
var prop = _a[_i];
|
|
3885
|
+
_loop_1(prop);
|
|
3839
3886
|
}
|
|
3840
3887
|
};
|
|
3841
3888
|
DropDownList.prototype.checkValidLi = function (element) {
|
|
@@ -5074,13 +5121,10 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
5074
5121
|
var l10nLocale = { overflowCountTemplate: '+${count} more..', totalCountTemplate: '${count} selected' };
|
|
5075
5122
|
this.l10n = new L10n(this.getLocaleName(), l10nLocale, this.locale);
|
|
5076
5123
|
var remainContent = this.l10n.getConstant('overflowCountTemplate');
|
|
5124
|
+
var totalContent = this.l10n.getConstant('totalCountTemplate');
|
|
5077
5125
|
var remainElement = this.createElement('span', { className: REMAIN_WRAPPER });
|
|
5078
|
-
// eslint-disable-next-line
|
|
5079
|
-
var compiledString = compile(remainContent);
|
|
5080
|
-
// eslint-disable-next-line
|
|
5081
|
-
var totalCompiledString = compile(this.l10n.getConstant('totalCountTemplate'));
|
|
5082
|
-
remainElement.appendChild(compiledString({ 'count': this.value.length }, this, 'overflowCountTemplate', null, !this.isStringTemplate)[0]);
|
|
5083
5126
|
this.overFlowWrapper.appendChild(remainElement);
|
|
5127
|
+
remainElement.innerText = remainContent.replace('${count}', this.value.length.toString());
|
|
5084
5128
|
var remainSize = remainElement.offsetWidth;
|
|
5085
5129
|
remove(remainElement);
|
|
5086
5130
|
if (this.showDropDownIcon) {
|
|
@@ -5162,7 +5206,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
5162
5206
|
}
|
|
5163
5207
|
}
|
|
5164
5208
|
if (remaining > 0) {
|
|
5165
|
-
this.overFlowWrapper.appendChild(this.updateRemainTemplate(remainElement, remaining,
|
|
5209
|
+
this.overFlowWrapper.appendChild(this.updateRemainTemplate(remainElement, remaining, remainContent, totalContent));
|
|
5166
5210
|
}
|
|
5167
5211
|
if (this.mode === 'Box' && !this.overFlowWrapper.classList.contains(TOTAL_COUNT_WRAPPER)) {
|
|
5168
5212
|
addClass([remainElement], REMAIN_COUNT);
|
|
@@ -5174,19 +5218,14 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
5174
5218
|
}
|
|
5175
5219
|
this.updateDelimMode();
|
|
5176
5220
|
};
|
|
5177
|
-
DropDownTree.prototype.updateRemainTemplate = function (remainElement, remaining,
|
|
5178
|
-
// eslint-disable-next-line
|
|
5179
|
-
compiledString,
|
|
5180
|
-
// eslint-disable-next-line
|
|
5181
|
-
totalCompiledString) {
|
|
5221
|
+
DropDownTree.prototype.updateRemainTemplate = function (remainElement, remaining, remainContent, totalContent) {
|
|
5182
5222
|
if (this.overFlowWrapper.firstChild && this.overFlowWrapper.firstChild.nodeType === 3 &&
|
|
5183
5223
|
this.overFlowWrapper.firstChild.nodeValue === '') {
|
|
5184
5224
|
this.overFlowWrapper.removeChild(this.overFlowWrapper.firstChild);
|
|
5185
5225
|
}
|
|
5186
5226
|
remainElement.innerHTML = '';
|
|
5187
|
-
remainElement.
|
|
5188
|
-
|
|
5189
|
-
totalCompiledString({ 'count': remaining }, this, 'totalCountTemplate', null, !this.isStringTemplate)[0]);
|
|
5227
|
+
remainElement.innerText = (this.overFlowWrapper.firstChild && (this.overFlowWrapper.firstChild.nodeType === 3 || this.mode === 'Box')) ?
|
|
5228
|
+
remainContent.replace('${count}', remaining.toString()) : totalContent.replace('${count}', remaining.toString());
|
|
5190
5229
|
if (this.overFlowWrapper.firstChild && (this.overFlowWrapper.firstChild.nodeType === 3 || this.mode === 'Box')) {
|
|
5191
5230
|
removeClass([this.overFlowWrapper], TOTAL_COUNT_WRAPPER);
|
|
5192
5231
|
}
|
|
@@ -7547,12 +7586,15 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
7547
7586
|
};
|
|
7548
7587
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7549
7588
|
ComboBox.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {
|
|
7589
|
+
var _this = this;
|
|
7550
7590
|
_super.prototype.onActionComplete.call(this, ulElement, list, e);
|
|
7551
7591
|
if (this.isSelectCustom) {
|
|
7552
7592
|
this.removeSelection();
|
|
7553
7593
|
}
|
|
7554
7594
|
if (!this.preventAutoFill && this.getModuleName() === 'combobox' && this.isTyped) {
|
|
7555
|
-
|
|
7595
|
+
setTimeout(function () {
|
|
7596
|
+
_this.inlineSearch();
|
|
7597
|
+
});
|
|
7556
7598
|
}
|
|
7557
7599
|
};
|
|
7558
7600
|
ComboBox.prototype.getFocusElement = function () {
|
|
@@ -9058,7 +9100,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9058
9100
|
return ariaAttributes;
|
|
9059
9101
|
};
|
|
9060
9102
|
MultiSelect.prototype.updateListARIA = function () {
|
|
9061
|
-
|
|
9103
|
+
if (!isNullOrUndefined(this.ulElement)) {
|
|
9104
|
+
attributes(this.ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
|
|
9105
|
+
}
|
|
9062
9106
|
var disableStatus = (this.inputElement.disabled) ? true : false;
|
|
9063
9107
|
attributes(this.inputElement, this.getAriaAttributes());
|
|
9064
9108
|
if (disableStatus) {
|
|
@@ -9218,7 +9262,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9218
9262
|
addClass([listEle[0]], dropDownBaseClasses.focus);
|
|
9219
9263
|
}
|
|
9220
9264
|
else {
|
|
9221
|
-
this.ulElement = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
|
|
9265
|
+
//EJ2-57588 - for this task, we prevent the ul element cloning ( this.ulElement = this.ulElement.cloneNode ? <HTMLElement>this.ulElement.cloneNode(true) : this.ulElement;)
|
|
9222
9266
|
if (!(this.list && this.list.querySelectorAll('.' + dropDownBaseClasses.li).length > 0)) {
|
|
9223
9267
|
this.l10nUpdate();
|
|
9224
9268
|
addClass([this.list], dropDownBaseClasses.noData);
|
|
@@ -11192,8 +11236,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11192
11236
|
}
|
|
11193
11237
|
};
|
|
11194
11238
|
MultiSelect.prototype.updateDataList = function () {
|
|
11195
|
-
if (this.mainList && this.ulElement
|
|
11196
|
-
|
|
11239
|
+
if (this.mainList && this.ulElement) {
|
|
11240
|
+
var isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
|
|
11241
|
+
var isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
|
|
11242
|
+
var isAngularTemplateUpdate = this.itemTemplate && this.ulElement.childElementCount > 0 && (this.ulElement.children[0].childElementCount > 0 || (this.fields.groupBy && this.ulElement.children[1] && this.ulElement.children[1].childElementCount > 0));
|
|
11243
|
+
if (isDynamicGroupItemUpdate || isReactTemplateUpdate || isAngularTemplateUpdate) {
|
|
11244
|
+
this.mainList = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
|
|
11245
|
+
}
|
|
11197
11246
|
}
|
|
11198
11247
|
};
|
|
11199
11248
|
MultiSelect.prototype.isValidLI = function (li) {
|
|
@@ -11542,11 +11591,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11542
11591
|
}
|
|
11543
11592
|
};
|
|
11544
11593
|
MultiSelect.prototype.wireListEvents = function () {
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11594
|
+
if (!isNullOrUndefined(this.list)) {
|
|
11595
|
+
EventHandler.add(document, 'mousedown', this.onDocumentClick, this);
|
|
11596
|
+
EventHandler.add(this.list, 'mousedown', this.onListMouseDown, this);
|
|
11597
|
+
EventHandler.add(this.list, 'mouseup', this.onMouseClick, this);
|
|
11598
|
+
EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);
|
|
11599
|
+
EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);
|
|
11600
|
+
}
|
|
11550
11601
|
};
|
|
11551
11602
|
MultiSelect.prototype.unwireListEvents = function () {
|
|
11552
11603
|
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
@@ -12676,6 +12727,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12676
12727
|
this.mainData = null;
|
|
12677
12728
|
this.filterParent = null;
|
|
12678
12729
|
this.ulElement = null;
|
|
12730
|
+
this.mainListCollection = null;
|
|
12679
12731
|
_super.prototype.destroy.call(this);
|
|
12680
12732
|
var temp = ['readonly', 'aria-disabled', 'aria-placeholder', 'placeholder'];
|
|
12681
12733
|
var length = temp.length;
|
|
@@ -14129,9 +14181,10 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
14129
14181
|
}
|
|
14130
14182
|
if (objValue === dataValue) {
|
|
14131
14183
|
itemIdx = this.getIndexByValue(dataValue);
|
|
14132
|
-
|
|
14133
|
-
|
|
14134
|
-
|
|
14184
|
+
var idx = itemIdx === i ? itemIdx : i;
|
|
14185
|
+
liCollections.push(liElement[idx]);
|
|
14186
|
+
removeIdxes.push(idx);
|
|
14187
|
+
removeLiIdxes.push(idx);
|
|
14135
14188
|
}
|
|
14136
14189
|
}
|
|
14137
14190
|
}
|