@syncfusion/ej2-dropdowns 20.3.49 → 20.3.56
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/.eslintrc.json +244 -0
- package/CHANGELOG.md +16 -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 +58 -14
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +60 -14
- 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 +12 -12
- package/src/drop-down-list/drop-down-list.js +3 -0
- package/src/drop-down-tree/drop-down-tree.js +3 -3
- package/src/list-box/list-box.js +7 -1
- package/src/mention/mention.d.ts +2 -0
- package/src/mention/mention.js +44 -10
- package/src/multi-select/multi-select.js +3 -0
- package/styles/bootstrap5-dark.css +4 -1
- package/styles/bootstrap5.css +4 -1
- package/styles/drop-down-base/_fabric-definition.scss +1 -1
- package/styles/drop-down-base/fabric.css +1 -1
- package/styles/drop-down-tree/_layout.scss +9 -1
- package/styles/drop-down-tree/bootstrap5-dark.css +4 -1
- package/styles/drop-down-tree/bootstrap5.css +4 -1
- package/styles/fabric.css +1 -1
- package/tslint.json +111 -0
|
@@ -3539,6 +3539,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3539
3539
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
3540
3540
|
updatedCssClassValues = (this.cssClass.replace(/\s+/g, ' ')).trim();
|
|
3541
3541
|
}
|
|
3542
|
+
if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
|
|
3543
|
+
this.enabled = false;
|
|
3544
|
+
}
|
|
3542
3545
|
this.inputWrapper = Input.createInput({
|
|
3543
3546
|
element: this.inputElement,
|
|
3544
3547
|
buttons: this.isPopupButton() ? [dropDownListClasses.icon] : null,
|
|
@@ -4586,7 +4589,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
4586
4589
|
this.updateDataAttribute();
|
|
4587
4590
|
this.setHTMLAttributes();
|
|
4588
4591
|
this.setAttributes();
|
|
4589
|
-
this.popupDiv = this.createElement('div', { className: CONTENT
|
|
4592
|
+
this.popupDiv = this.createElement('div', { className: CONTENT });
|
|
4590
4593
|
this.popupDiv.classList.add(DROPDOWN);
|
|
4591
4594
|
this.tree = this.createElement('div', { id: this.element.id + '_tree' });
|
|
4592
4595
|
this.popupDiv.appendChild(this.tree);
|
|
@@ -5928,14 +5931,14 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
5928
5931
|
var isFooter = closest(target, '.' + FOOTER);
|
|
5929
5932
|
var isScroller = target.classList.contains(DROPDOWN) ? true :
|
|
5930
5933
|
(matches(target, '.e-ddt .e-popup') || matches(target, '.e-ddt .e-treeview'));
|
|
5931
|
-
if ((this.isPopupOpen && (this.inputWrapper.contains(target) || isTree ||
|
|
5934
|
+
if ((this.isPopupOpen && (this.inputWrapper.contains(target) || isTree || isScroller || isHeader || isFooter)) ||
|
|
5932
5935
|
((this.allowMultiSelection || this.showCheckBox) && (this.isPopupOpen && target.classList.contains(CHIP_CLOSE) ||
|
|
5933
5936
|
(this.isPopupOpen && (target.classList.contains(CHECKALLPARENT) || target.classList.contains(ALLTEXT)
|
|
5934
5937
|
|| target.classList.contains(CHECKBOXFRAME)))))) {
|
|
5935
5938
|
this.isDocumentClick = false;
|
|
5936
5939
|
e.preventDefault();
|
|
5937
5940
|
}
|
|
5938
|
-
else if (!this.inputWrapper.contains(target) && this.inputFocus) {
|
|
5941
|
+
else if (!this.inputWrapper.contains(target) && this.inputFocus && !isFilter) {
|
|
5939
5942
|
this.focusOut(e);
|
|
5940
5943
|
}
|
|
5941
5944
|
};
|
|
@@ -12725,6 +12728,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12725
12728
|
if (this.mode !== 'CheckBox') {
|
|
12726
12729
|
this.hideOverAllClear();
|
|
12727
12730
|
}
|
|
12731
|
+
if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
|
|
12732
|
+
this.enabled = false;
|
|
12733
|
+
}
|
|
12728
12734
|
this.wireEvent();
|
|
12729
12735
|
this.enable(this.enabled);
|
|
12730
12736
|
this.enableRTL(this.enableRtl);
|
|
@@ -15205,7 +15211,13 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
15205
15211
|
}
|
|
15206
15212
|
}
|
|
15207
15213
|
}
|
|
15208
|
-
var elems
|
|
15214
|
+
var elems;
|
|
15215
|
+
if (this.isAngular) {
|
|
15216
|
+
elems = Array.prototype.slice.call(this.element.getElementsByClassName('e-list-parent')[0].querySelectorAll('.e-grabbed'));
|
|
15217
|
+
}
|
|
15218
|
+
else {
|
|
15219
|
+
elems = Array.prototype.slice.call(this.element.nextElementSibling.querySelectorAll('.e-grabbed'));
|
|
15220
|
+
}
|
|
15209
15221
|
return elems;
|
|
15210
15222
|
};
|
|
15211
15223
|
ListBox.prototype.getDragArgs = function (args, isDragEnd) {
|
|
@@ -16065,7 +16077,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
16065
16077
|
if (!isNullOrUndefined(this.spinnerElement)) {
|
|
16066
16078
|
hideSpinner(this.spinnerElement);
|
|
16067
16079
|
}
|
|
16068
|
-
if (!isNullOrUndefined(this.spinnerTemplate)) {
|
|
16080
|
+
if (!isNullOrUndefined(this.spinnerTemplate) && !isNullOrUndefined(this.spinnerTemplateElement)) {
|
|
16069
16081
|
detach(this.spinnerTemplateElement);
|
|
16070
16082
|
}
|
|
16071
16083
|
};
|
|
@@ -16086,7 +16098,6 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
16086
16098
|
}
|
|
16087
16099
|
if (!isNullOrUndefined(this.spinnerTemplate)) {
|
|
16088
16100
|
this.setSpinnerTemplate();
|
|
16089
|
-
this.popupObj.element.appendChild(this.spinnerTemplateElement);
|
|
16090
16101
|
}
|
|
16091
16102
|
}
|
|
16092
16103
|
};
|
|
@@ -16879,6 +16890,24 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
16879
16890
|
};
|
|
16880
16891
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16881
16892
|
Mention.prototype.setValue = function (e) {
|
|
16893
|
+
if (!this.isReact) {
|
|
16894
|
+
if (!isNullOrUndefined(this.displayTemplate)) {
|
|
16895
|
+
this.setDisplayTemplate();
|
|
16896
|
+
}
|
|
16897
|
+
this.updateMentionValue(e);
|
|
16898
|
+
return true;
|
|
16899
|
+
}
|
|
16900
|
+
else {
|
|
16901
|
+
if (!isNullOrUndefined(this.displayTemplate)) {
|
|
16902
|
+
this.setDisplayTemplate(e);
|
|
16903
|
+
}
|
|
16904
|
+
else {
|
|
16905
|
+
this.updateMentionValue(e);
|
|
16906
|
+
}
|
|
16907
|
+
return true;
|
|
16908
|
+
}
|
|
16909
|
+
};
|
|
16910
|
+
Mention.prototype.updateMentionValue = function (e) {
|
|
16882
16911
|
var dataItem = this.getItemData();
|
|
16883
16912
|
var textSuffix;
|
|
16884
16913
|
var value;
|
|
@@ -16904,7 +16933,6 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
16904
16933
|
this.hidePopup();
|
|
16905
16934
|
}
|
|
16906
16935
|
this.onChangeEvent(e);
|
|
16907
|
-
return true;
|
|
16908
16936
|
}
|
|
16909
16937
|
else {
|
|
16910
16938
|
endPos = this.getTriggerCharPosition() + this.mentionChar.length;
|
|
@@ -16936,13 +16964,12 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
16936
16964
|
this.hidePopup();
|
|
16937
16965
|
}
|
|
16938
16966
|
this.onChangeEvent(e);
|
|
16939
|
-
return true;
|
|
16940
16967
|
}
|
|
16941
16968
|
};
|
|
16942
16969
|
Mention.prototype.mentionVal = function (value) {
|
|
16943
16970
|
var showChar = this.showMentionChar ? this.mentionChar : '';
|
|
16944
|
-
if (!isNullOrUndefined(this.displayTemplate)) {
|
|
16945
|
-
value = this.
|
|
16971
|
+
if (!isNullOrUndefined(this.displayTemplate) && !isNullOrUndefined(this.displayTempElement)) {
|
|
16972
|
+
value = this.displayTempElement.innerHTML;
|
|
16946
16973
|
}
|
|
16947
16974
|
if (this.isContentEditable(this.inputElement)) {
|
|
16948
16975
|
return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
|
|
@@ -16951,7 +16978,8 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
16951
16978
|
return showChar + value;
|
|
16952
16979
|
}
|
|
16953
16980
|
};
|
|
16954
|
-
Mention.prototype.setDisplayTemplate = function () {
|
|
16981
|
+
Mention.prototype.setDisplayTemplate = function (e) {
|
|
16982
|
+
var _this = this;
|
|
16955
16983
|
var compiledString;
|
|
16956
16984
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16957
16985
|
if (this.isReact) {
|
|
@@ -16976,10 +17004,20 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
16976
17004
|
this.displayTempElement.appendChild(displayCompTemp[i]);
|
|
16977
17005
|
}
|
|
16978
17006
|
}
|
|
16979
|
-
this.
|
|
16980
|
-
|
|
17007
|
+
if (!this.isReact) {
|
|
17008
|
+
this.renderTemplates();
|
|
17009
|
+
}
|
|
17010
|
+
else {
|
|
17011
|
+
this.renderTemplates(function () {
|
|
17012
|
+
_this.updateMentionValue(e);
|
|
17013
|
+
});
|
|
17014
|
+
}
|
|
17015
|
+
};
|
|
17016
|
+
Mention.prototype.renderTemplates = function (callBack) {
|
|
17017
|
+
this.renderReactTemplates(callBack);
|
|
16981
17018
|
};
|
|
16982
17019
|
Mention.prototype.setSpinnerTemplate = function () {
|
|
17020
|
+
var _this = this;
|
|
16983
17021
|
var compiledString;
|
|
16984
17022
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16985
17023
|
if (this.isReact) {
|
|
@@ -17004,7 +17042,15 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
17004
17042
|
this.spinnerTemplateElement.appendChild(spinnerCompTemp[i]);
|
|
17005
17043
|
}
|
|
17006
17044
|
}
|
|
17007
|
-
this.
|
|
17045
|
+
if (!this.isReact) {
|
|
17046
|
+
this.renderTemplates();
|
|
17047
|
+
this.popupObj.element.appendChild(this.spinnerTemplateElement);
|
|
17048
|
+
}
|
|
17049
|
+
else {
|
|
17050
|
+
this.renderTemplates(function () {
|
|
17051
|
+
_this.popupObj.element.appendChild(_this.spinnerTemplateElement);
|
|
17052
|
+
});
|
|
17053
|
+
}
|
|
17008
17054
|
};
|
|
17009
17055
|
Mention.prototype.onChangeEvent = function (eve) {
|
|
17010
17056
|
this.isSelected = false;
|