@syncfusion/ej2-dropdowns 19.3.47 → 19.3.48
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 +8 -0
- 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 +14 -22
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +14 -22
- 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 +7 -7
- package/src/drop-down-tree/drop-down-tree.js +3 -4
- package/src/multi-select/multi-select.js +11 -18
|
@@ -4804,7 +4804,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
4804
4804
|
this.trigger('blur');
|
|
4805
4805
|
};
|
|
4806
4806
|
DropDownTree.prototype.updateView = function () {
|
|
4807
|
-
if ((!this.showCheckBox && !this.allowMultiSelection) || this.mode === 'Custom') {
|
|
4807
|
+
if ((!this.showCheckBox && !this.allowMultiSelection) || this.mode === 'Custom' || this.inputFocus) {
|
|
4808
4808
|
return;
|
|
4809
4809
|
}
|
|
4810
4810
|
if (this.mode !== 'Box') {
|
|
@@ -5246,10 +5246,10 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
5246
5246
|
this.inputWrapper.insertBefore(this.chipWrapper, this.hiddenElement);
|
|
5247
5247
|
addClass([this.inputWrapper], SHOW_CHIP);
|
|
5248
5248
|
var isValid = this.getValidMode();
|
|
5249
|
-
if (isValid && this.value !== null) {
|
|
5249
|
+
if (isValid && this.value !== null && (this.value && this.value.length !== 0)) {
|
|
5250
5250
|
addClass([this.inputEle], CHIP_INPUT);
|
|
5251
5251
|
}
|
|
5252
|
-
else if (this.value === null) {
|
|
5252
|
+
else if (this.value === null || (this.value && this.value.length === 0)) {
|
|
5253
5253
|
addClass([this.chipWrapper], HIDEICON);
|
|
5254
5254
|
}
|
|
5255
5255
|
}
|
|
@@ -5523,7 +5523,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
5523
5523
|
else {
|
|
5524
5524
|
if (this.showCheckBox) {
|
|
5525
5525
|
this.treeObj.checkedNodes = this.value.slice();
|
|
5526
|
-
setValue('selectedNodes', [], this.treeObj);
|
|
5527
5526
|
this.treeObj.dataBind();
|
|
5528
5527
|
this.setMultiSelect();
|
|
5529
5528
|
}
|
|
@@ -11618,16 +11617,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11618
11617
|
l10n = new L10n('dropdowns', l10nLocale, this.locale);
|
|
11619
11618
|
}
|
|
11620
11619
|
var remainContent = l10n.getConstant('overflowCountTemplate');
|
|
11620
|
+
var totalContent = l10n.getConstant('totalCountTemplate');
|
|
11621
11621
|
var raminElement = this.createElement('span', {
|
|
11622
11622
|
className: REMAIN_WRAPPER$1
|
|
11623
11623
|
});
|
|
11624
|
-
var
|
|
11625
|
-
|
|
11626
|
-
// eslint-disable-next-line
|
|
11627
|
-
var remainCompildTemp = compiledString({ 'count': this.value.length }, this, 'overflowCountTemplate', null, !this.isStringTemplate, null, raminElement);
|
|
11628
|
-
if (remainCompildTemp && remainCompildTemp.length > 0) {
|
|
11629
|
-
raminElement.appendChild(remainCompildTemp[0]);
|
|
11630
|
-
}
|
|
11624
|
+
var remainCompildTemp = remainContent.replace('${count}', this.value.length.toString());
|
|
11625
|
+
raminElement.innerText = remainCompildTemp;
|
|
11631
11626
|
this.viewWrapper.appendChild(raminElement);
|
|
11632
11627
|
this.renderReactTemplates();
|
|
11633
11628
|
var remainSize = raminElement.offsetWidth;
|
|
@@ -11679,9 +11674,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11679
11674
|
}
|
|
11680
11675
|
if (remaining > 0) {
|
|
11681
11676
|
var totalWidth = overAllContainer - downIconWidth - this.clearIconWidth;
|
|
11682
|
-
this.viewWrapper.appendChild(this.updateRemainTemplate(raminElement, this.viewWrapper, remaining,
|
|
11677
|
+
this.viewWrapper.appendChild(this.updateRemainTemplate(raminElement, this.viewWrapper, remaining, remainContent, totalContent, totalWidth));
|
|
11683
11678
|
this.updateRemainWidth(this.viewWrapper, totalWidth);
|
|
11684
|
-
this.updateRemainingText(raminElement, downIconWidth, remaining,
|
|
11679
|
+
this.updateRemainingText(raminElement, downIconWidth, remaining, remainContent, totalContent);
|
|
11685
11680
|
}
|
|
11686
11681
|
}
|
|
11687
11682
|
else {
|
|
@@ -11701,17 +11696,14 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11701
11696
|
viewWrapper.style.width = totalWidth + 'px';
|
|
11702
11697
|
}
|
|
11703
11698
|
};
|
|
11704
|
-
MultiSelect.prototype.updateRemainTemplate = function (raminElement, viewWrapper, remaining,
|
|
11699
|
+
MultiSelect.prototype.updateRemainTemplate = function (raminElement, viewWrapper, remaining, remainContent, totalContent, totalWidth) {
|
|
11705
11700
|
if (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3 && viewWrapper.firstChild.nodeValue === '') {
|
|
11706
11701
|
viewWrapper.removeChild(viewWrapper.firstChild);
|
|
11707
11702
|
}
|
|
11708
11703
|
raminElement.innerHTML = '';
|
|
11709
|
-
|
|
11710
|
-
var
|
|
11711
|
-
|
|
11712
|
-
var totalTemp = totalCompiledString({ 'count': remaining }, this, 'totalCountTemplate', null, !this.isStringTemplate, null, raminElement);
|
|
11713
|
-
raminElement.appendChild((viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) ?
|
|
11714
|
-
remainTemp && remainTemp[0] : totalTemp && totalTemp[0]);
|
|
11704
|
+
var remainTemp = remainContent.replace('${count}', remaining.toString());
|
|
11705
|
+
var totalTemp = totalContent.replace('${count}', remaining.toString());
|
|
11706
|
+
raminElement.innerText = (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) ? remainTemp : totalTemp;
|
|
11715
11707
|
if (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) {
|
|
11716
11708
|
viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER$1);
|
|
11717
11709
|
}
|
|
@@ -11721,7 +11713,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11721
11713
|
}
|
|
11722
11714
|
return raminElement;
|
|
11723
11715
|
};
|
|
11724
|
-
MultiSelect.prototype.updateRemainingText = function (raminElement, downIconWidth, remaining,
|
|
11716
|
+
MultiSelect.prototype.updateRemainingText = function (raminElement, downIconWidth, remaining, remainContent, totalContent) {
|
|
11725
11717
|
var overAllContainer = this.componentWrapper.offsetWidth -
|
|
11726
11718
|
parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) -
|
|
11727
11719
|
parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
|
|
@@ -11740,7 +11732,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11740
11732
|
wrapperleng = this.viewWrapper.offsetWidth;
|
|
11741
11733
|
}
|
|
11742
11734
|
var totalWidth = overAllContainer - downIconWidth;
|
|
11743
|
-
this.updateRemainTemplate(raminElement, this.viewWrapper, remaining,
|
|
11735
|
+
this.updateRemainTemplate(raminElement, this.viewWrapper, remaining, remainContent, totalContent, totalWidth);
|
|
11744
11736
|
}
|
|
11745
11737
|
};
|
|
11746
11738
|
MultiSelect.prototype.getOverflowVal = function (index) {
|