@syncfusion/ej2-dropdowns 27.2.5 → 28.1.35
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/README.md +2 -2
- 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 +511 -40
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +510 -38
- 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 +13 -13
- package/src/auto-complete/auto-complete.js +5 -2
- package/src/combo-box/combo-box.js +2 -1
- package/src/common/incremental-search.d.ts +1 -1
- package/src/common/incremental-search.js +5 -1
- package/src/common/virtual-scroll.js +2 -1
- package/src/drop-down-base/drop-down-base.js +14 -2
- package/src/drop-down-list/drop-down-list-model.d.ts +31 -0
- package/src/drop-down-list/drop-down-list.d.ts +45 -1
- package/src/drop-down-list/drop-down-list.js +213 -13
- package/src/drop-down-tree/drop-down-tree.d.ts +1 -0
- package/src/drop-down-tree/drop-down-tree.js +4 -3
- package/src/list-box/list-box.d.ts +4 -0
- package/src/list-box/list-box.js +9 -4
- package/src/mention/mention.js +6 -1
- package/src/multi-select/multi-select-model.d.ts +31 -0
- package/src/multi-select/multi-select.d.ts +45 -0
- package/src/multi-select/multi-select.js +250 -10
- package/styles/auto-complete/_tailwind3-definition.scss +2 -0
- package/styles/auto-complete/bds.css +75 -0
- package/styles/auto-complete/bds.scss +4 -0
- package/styles/auto-complete/highcontrast.css +1 -1
- package/styles/auto-complete/tailwind3.css +101 -0
- package/styles/auto-complete/tailwind3.scss +4 -0
- package/styles/bds-lite.css +3013 -0
- package/styles/bds-lite.scss +28 -0
- package/styles/bds.css +3855 -0
- package/styles/bds.scss +33 -0
- package/styles/bootstrap-dark-lite.css +41 -2
- package/styles/bootstrap-dark.css +41 -2
- package/styles/bootstrap-lite.css +30 -1
- package/styles/bootstrap.css +30 -1
- package/styles/bootstrap4-lite.css +30 -0
- package/styles/bootstrap4.css +30 -0
- package/styles/bootstrap5-dark-lite.css +31 -0
- package/styles/bootstrap5-dark.css +31 -0
- package/styles/bootstrap5-lite.css +31 -0
- package/styles/bootstrap5.3-lite.css +31 -3
- package/styles/bootstrap5.3.css +31 -3
- package/styles/bootstrap5.css +31 -0
- package/styles/combo-box/_tailwind3-definition.scss +2 -0
- package/styles/combo-box/bds.css +75 -0
- package/styles/combo-box/bds.scss +4 -0
- package/styles/combo-box/highcontrast.css +1 -1
- package/styles/combo-box/tailwind3.css +101 -0
- package/styles/combo-box/tailwind3.scss +4 -0
- package/styles/drop-down-base/_bigger.scss +3 -0
- package/styles/drop-down-base/_layout.scss +7 -0
- package/styles/drop-down-base/_tailwind3-definition.scss +98 -0
- package/styles/drop-down-base/bds.css +496 -0
- package/styles/drop-down-base/bds.scss +4 -0
- package/styles/drop-down-base/bootstrap-dark.css +4 -0
- package/styles/drop-down-base/bootstrap.css +4 -0
- package/styles/drop-down-base/bootstrap4.css +4 -0
- package/styles/drop-down-base/bootstrap5-dark.css +4 -0
- package/styles/drop-down-base/bootstrap5.3.css +4 -0
- package/styles/drop-down-base/bootstrap5.css +4 -0
- package/styles/drop-down-base/fabric-dark.css +4 -0
- package/styles/drop-down-base/fabric.css +4 -0
- package/styles/drop-down-base/fluent-dark.css +4 -0
- package/styles/drop-down-base/fluent.css +4 -0
- package/styles/drop-down-base/fluent2.css +9 -5
- package/styles/drop-down-base/highcontrast-light.css +4 -0
- package/styles/drop-down-base/highcontrast.css +4 -0
- package/styles/drop-down-base/material-dark.css +4 -0
- package/styles/drop-down-base/material.css +4 -0
- package/styles/drop-down-base/material3-dark.css +4 -0
- package/styles/drop-down-base/material3.css +4 -0
- package/styles/drop-down-base/tailwind-dark.css +4 -0
- package/styles/drop-down-base/tailwind.css +4 -0
- package/styles/drop-down-base/tailwind3.css +392 -0
- package/styles/drop-down-base/tailwind3.scss +4 -0
- package/styles/drop-down-list/_highcontrast-definition.scss +1 -1
- package/styles/drop-down-list/_layout.scss +18 -2
- package/styles/drop-down-list/_tailwind3-definition.scss +135 -0
- package/styles/drop-down-list/_theme.scss +3 -1
- package/styles/drop-down-list/bds.css +609 -0
- package/styles/drop-down-list/bds.scss +10 -0
- package/styles/drop-down-list/bootstrap-dark.css +18 -1
- package/styles/drop-down-list/bootstrap.css +13 -1
- package/styles/drop-down-list/bootstrap4.css +13 -0
- package/styles/drop-down-list/bootstrap5-dark.css +13 -0
- package/styles/drop-down-list/bootstrap5.3.css +13 -0
- package/styles/drop-down-list/bootstrap5.css +13 -0
- package/styles/drop-down-list/fabric-dark.css +18 -1
- package/styles/drop-down-list/fabric.css +13 -1
- package/styles/drop-down-list/fluent-dark.css +13 -1
- package/styles/drop-down-list/fluent.css +13 -1
- package/styles/drop-down-list/fluent2.css +13 -1
- package/styles/drop-down-list/highcontrast-light.css +9 -1
- package/styles/drop-down-list/highcontrast.css +19 -1
- package/styles/drop-down-list/icons/_bootstrap-dark.scss +4 -0
- package/styles/drop-down-list/icons/_bootstrap.scss +4 -0
- package/styles/drop-down-list/icons/_bootstrap4.scss +4 -0
- package/styles/drop-down-list/icons/_bootstrap5.3.scss +4 -0
- package/styles/drop-down-list/icons/_bootstrap5.scss +4 -0
- package/styles/drop-down-list/icons/_fabric-dark.scss +4 -0
- package/styles/drop-down-list/icons/_fabric.scss +4 -0
- package/styles/drop-down-list/icons/_fluent.scss +4 -0
- package/styles/drop-down-list/icons/_fluent2.scss +4 -0
- package/styles/drop-down-list/icons/_highcontrast.scss +4 -0
- package/styles/drop-down-list/icons/_material-dark.scss +4 -0
- package/styles/drop-down-list/icons/_material.scss +4 -0
- package/styles/drop-down-list/icons/_material3.scss +4 -0
- package/styles/drop-down-list/icons/_tailwind.scss +4 -0
- package/styles/drop-down-list/icons/_tailwind3.scss +14 -0
- package/styles/drop-down-list/material-dark.css +18 -1
- package/styles/drop-down-list/material.css +13 -1
- package/styles/drop-down-list/material3-dark.css +13 -1
- package/styles/drop-down-list/material3.css +13 -1
- package/styles/drop-down-list/tailwind-dark.css +13 -1
- package/styles/drop-down-list/tailwind.css +13 -1
- package/styles/drop-down-list/tailwind3.css +456 -0
- package/styles/drop-down-list/tailwind3.scss +10 -0
- package/styles/drop-down-tree/_bigger.scss +41 -7
- package/styles/drop-down-tree/_layout.scss +34 -10
- package/styles/drop-down-tree/_tailwind3-definition.scss +67 -0
- package/styles/drop-down-tree/_theme.scss +3 -3
- package/styles/drop-down-tree/bds.css +712 -0
- package/styles/drop-down-tree/bds.scss +10 -0
- package/styles/drop-down-tree/bootstrap5.3.css +0 -3
- package/styles/drop-down-tree/icons/_tailwind3.scss +11 -0
- package/styles/drop-down-tree/tailwind3.css +512 -0
- package/styles/drop-down-tree/tailwind3.scss +10 -0
- package/styles/fabric-dark-lite.css +40 -1
- package/styles/fabric-dark.css +40 -1
- package/styles/fabric-lite.css +30 -1
- package/styles/fabric.css +30 -1
- package/styles/fluent-dark-lite.css +31 -1
- package/styles/fluent-dark.css +31 -1
- package/styles/fluent-lite.css +31 -1
- package/styles/fluent.css +31 -1
- package/styles/fluent2-lite.css +45 -12
- package/styles/fluent2.css +45 -12
- package/styles/highcontrast-light-lite.css +22 -1
- package/styles/highcontrast-light.css +22 -1
- package/styles/highcontrast-lite.css +41 -1
- package/styles/highcontrast.css +41 -1
- package/styles/list-box/_bigger.scss +18 -1
- package/styles/list-box/_layout.scss +29 -3
- package/styles/list-box/_tailwind3-definition.scss +123 -0
- package/styles/list-box/_theme.scss +11 -0
- package/styles/list-box/bds.css +971 -0
- package/styles/list-box/bds.scss +6 -0
- package/styles/list-box/fluent2.css +1 -1
- package/styles/list-box/icons/_tailwind3.scss +25 -0
- package/styles/list-box/tailwind3.css +991 -0
- package/styles/list-box/tailwind3.scss +6 -0
- package/styles/material-dark-lite.css +40 -1
- package/styles/material-dark.css +40 -1
- package/styles/material-lite.css +30 -1
- package/styles/material.css +30 -1
- package/styles/material3-dark-lite.css +32 -5
- package/styles/material3-dark.css +32 -5
- package/styles/material3-lite.css +32 -5
- package/styles/material3.css +32 -5
- package/styles/mention/_tailwind3-definition.scss +1 -0
- package/styles/mention/bds.css +78 -0
- package/styles/mention/bds.scss +6 -0
- package/styles/mention/tailwind3.css +67 -0
- package/styles/mention/tailwind3.scss +6 -0
- package/styles/multi-select/_bigger.scss +2 -2
- package/styles/multi-select/_bootstrap-dark-definition.scss +1 -1
- package/styles/multi-select/_layout.scss +28 -5
- package/styles/multi-select/_material3-definition.scss +1 -1
- package/styles/multi-select/_tailwind3-definition.scss +227 -0
- package/styles/multi-select/_theme.scss +1 -1
- package/styles/multi-select/bds.css +1575 -0
- package/styles/multi-select/bds.scss +10 -0
- package/styles/multi-select/bootstrap-dark.css +19 -1
- package/styles/multi-select/bootstrap.css +13 -0
- package/styles/multi-select/bootstrap4.css +13 -0
- package/styles/multi-select/bootstrap5-dark.css +14 -0
- package/styles/multi-select/bootstrap5.3.css +14 -0
- package/styles/multi-select/bootstrap5.css +14 -0
- package/styles/multi-select/fabric-dark.css +18 -0
- package/styles/multi-select/fabric.css +13 -0
- package/styles/multi-select/fluent-dark.css +14 -0
- package/styles/multi-select/fluent.css +14 -0
- package/styles/multi-select/fluent2.css +22 -5
- package/styles/multi-select/highcontrast-light.css +9 -0
- package/styles/multi-select/highcontrast.css +18 -0
- package/styles/multi-select/icons/_bootstrap-dark.scss +4 -0
- package/styles/multi-select/icons/_bootstrap.scss +4 -0
- package/styles/multi-select/icons/_bootstrap4.scss +4 -0
- package/styles/multi-select/icons/_bootstrap5.3.scss +4 -0
- package/styles/multi-select/icons/_bootstrap5.scss +4 -0
- package/styles/multi-select/icons/_fabric-dark.scss +4 -0
- package/styles/multi-select/icons/_fabric.scss +4 -0
- package/styles/multi-select/icons/_fluent.scss +4 -0
- package/styles/multi-select/icons/_fluent2.scss +4 -0
- package/styles/multi-select/icons/_highcontrast.scss +4 -0
- package/styles/multi-select/icons/_material-dark.scss +4 -0
- package/styles/multi-select/icons/_material.scss +4 -0
- package/styles/multi-select/icons/_material3.scss +4 -0
- package/styles/multi-select/icons/_tailwind.scss +4 -0
- package/styles/multi-select/icons/_tailwind3.scss +26 -0
- package/styles/multi-select/material-dark.css +18 -0
- package/styles/multi-select/material.css +13 -0
- package/styles/multi-select/material3-dark.css +15 -4
- package/styles/multi-select/material3.css +15 -4
- package/styles/multi-select/tailwind-dark.css +13 -0
- package/styles/multi-select/tailwind.css +13 -0
- package/styles/multi-select/tailwind3.css +1398 -0
- package/styles/multi-select/tailwind3.scss +10 -0
- package/styles/tailwind-dark-lite.css +30 -1
- package/styles/tailwind-dark.css +30 -1
- package/styles/tailwind-lite.css +30 -1
- package/styles/tailwind.css +30 -1
- package/styles/tailwind3-lite.css +2890 -0
- package/styles/tailwind3-lite.scss +28 -0
- package/styles/tailwind3.css +3551 -0
- package/styles/tailwind3.scss +33 -0
|
@@ -48,6 +48,7 @@ export var dropDownListClasses = {
|
|
|
48
48
|
backIcon: 'e-input-group-icon e-back-icon e-icons',
|
|
49
49
|
filterBarClearIcon: 'e-input-group-icon e-clear-icon e-icons',
|
|
50
50
|
filterInput: 'e-input-filter',
|
|
51
|
+
resizeIcon: 'e-resizer-right e-icons',
|
|
51
52
|
filterParent: 'e-filter-parent',
|
|
52
53
|
mobileFilter: 'e-ddl-device-filter',
|
|
53
54
|
footer: 'e-ddl-footer',
|
|
@@ -90,6 +91,8 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
90
91
|
_this.isTouched = false;
|
|
91
92
|
_this.isFocused = false;
|
|
92
93
|
_this.autoFill = false;
|
|
94
|
+
_this.isUpdateHeaderHeight = false;
|
|
95
|
+
_this.isUpdateFooterHeight = false;
|
|
93
96
|
return _this;
|
|
94
97
|
}
|
|
95
98
|
/**
|
|
@@ -232,6 +235,10 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
232
235
|
(this.allowObjectBinding && this.previousValue &&
|
|
233
236
|
this.isObjectInArray(this.previousValue, [this.allowCustom ? this.value ? this.value : dataItem :
|
|
234
237
|
dataItem.value ? this.getDataByValue(dataItem.value) : dataItem]))) {
|
|
238
|
+
this.checkAndResetCache();
|
|
239
|
+
if (this.enableVirtualization && this.list) {
|
|
240
|
+
this.updateInitialData();
|
|
241
|
+
}
|
|
235
242
|
return;
|
|
236
243
|
}
|
|
237
244
|
this.onChangeEvent(e);
|
|
@@ -548,6 +555,22 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
548
555
|
this.updateIconState();
|
|
549
556
|
this.isFocused = true;
|
|
550
557
|
};
|
|
558
|
+
DropDownList.prototype.resizingWireEvent = function () {
|
|
559
|
+
// Mouse events
|
|
560
|
+
EventHandler.add(document, 'mousemove', this.resizePopup, this);
|
|
561
|
+
EventHandler.add(document, 'mouseup', this.stopResizing, this);
|
|
562
|
+
// Touch events
|
|
563
|
+
EventHandler.add(document, 'touchmove', this.resizePopup, this);
|
|
564
|
+
EventHandler.add(document, 'touchend', this.stopResizing, this);
|
|
565
|
+
};
|
|
566
|
+
DropDownList.prototype.resizingUnWireEvent = function () {
|
|
567
|
+
// Mouse events
|
|
568
|
+
EventHandler.remove(document, 'mousemove', this.resizePopup);
|
|
569
|
+
EventHandler.remove(document, 'mouseup', this.stopResizing);
|
|
570
|
+
// Touch events
|
|
571
|
+
EventHandler.remove(document, 'touchmove', this.resizePopup);
|
|
572
|
+
EventHandler.remove(document, 'touchend', this.stopResizing);
|
|
573
|
+
};
|
|
551
574
|
DropDownList.prototype.resetValueHandler = function (e) {
|
|
552
575
|
var formElement = closest(this.inputElement, 'form');
|
|
553
576
|
if (formElement && e.target === formElement) {
|
|
@@ -642,6 +665,68 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
642
665
|
this.incrementalSearch(e);
|
|
643
666
|
}
|
|
644
667
|
};
|
|
668
|
+
DropDownList.prototype.startResizing = function (event) {
|
|
669
|
+
this.isResizing = true;
|
|
670
|
+
this.trigger('resizeStart', event);
|
|
671
|
+
// Get initial touch or mouse coordinates
|
|
672
|
+
var clientX = (event instanceof MouseEvent) ? event.clientX : event.touches[0].clientX;
|
|
673
|
+
var clientY = (event instanceof MouseEvent) ? event.clientY : event.touches[0].clientY;
|
|
674
|
+
// Store the initial dimensions of the popup
|
|
675
|
+
if (this.list && this.list.parentElement) {
|
|
676
|
+
this.originalWidth = this.list.parentElement.offsetWidth;
|
|
677
|
+
this.originalHeight = this.list.parentElement.offsetHeight;
|
|
678
|
+
this.originalMouseX = clientX;
|
|
679
|
+
this.originalMouseY = clientY;
|
|
680
|
+
}
|
|
681
|
+
// Wire up events for resizing
|
|
682
|
+
this.resizingWireEvent();
|
|
683
|
+
if (event) {
|
|
684
|
+
event.preventDefault(); // Prevent selection behavior if event exists
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
DropDownList.prototype.resizePopup = function (event) {
|
|
688
|
+
if (!this.isResizing) {
|
|
689
|
+
return;
|
|
690
|
+
}
|
|
691
|
+
this.trigger('resizing', event);
|
|
692
|
+
// Get the current touch or mouse position
|
|
693
|
+
var clientX = (event instanceof MouseEvent) ? event.clientX : event.touches[0].clientX;
|
|
694
|
+
var clientY = (event instanceof MouseEvent) ? event.clientY : event.touches[0].clientY;
|
|
695
|
+
// Calculate the new width and height based on drag
|
|
696
|
+
var dx = clientX - this.originalMouseX;
|
|
697
|
+
var dy = clientY - this.originalMouseY;
|
|
698
|
+
if (this.list && this.list.parentElement) {
|
|
699
|
+
// Minimum width and height (100px)
|
|
700
|
+
var minWidth = parseInt(window.getComputedStyle(this.list.parentElement).minWidth, 10);
|
|
701
|
+
var minHeight = parseInt(window.getComputedStyle(this.list.parentElement).minHeight, 10);
|
|
702
|
+
minWidth = minWidth || 100;
|
|
703
|
+
minHeight = minHeight || 120;
|
|
704
|
+
// Ensure the new width and height are not less than the minimum
|
|
705
|
+
this.resizeWidth = Math.max(this.originalWidth + dx, minWidth);
|
|
706
|
+
this.resizeHeight = Math.max(this.originalHeight + dy, minHeight);
|
|
707
|
+
this.list.parentElement.style.width = this.resizeWidth + "px";
|
|
708
|
+
this.list.parentElement.style.height = this.resizeHeight + "px";
|
|
709
|
+
this.list.parentElement.style.maxHeight = this.resizeHeight + "px";
|
|
710
|
+
this.list.style.maxHeight = this.resizeHeight + "px";
|
|
711
|
+
if (this.fixedHeaderElement && this.ulElement) {
|
|
712
|
+
this.fixedHeaderElement.style.width = this.ulElement.offsetWidth + "px";
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
if (event) {
|
|
716
|
+
event.preventDefault(); // Prevent selection behavior if event exists
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
DropDownList.prototype.stopResizing = function (event) {
|
|
720
|
+
if (this.isResizing) {
|
|
721
|
+
this.isResizing = false;
|
|
722
|
+
this.trigger('resizeStop', event);
|
|
723
|
+
// Unwire the resize event listeners
|
|
724
|
+
this.resizingUnWireEvent();
|
|
725
|
+
}
|
|
726
|
+
if (event) {
|
|
727
|
+
event.preventDefault(); // Prevent selection behavior if event exists
|
|
728
|
+
}
|
|
729
|
+
};
|
|
645
730
|
DropDownList.prototype.onMouseClick = function (e) {
|
|
646
731
|
var target = e.target;
|
|
647
732
|
this.keyboardEvent = null;
|
|
@@ -1113,6 +1198,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1113
1198
|
}
|
|
1114
1199
|
return;
|
|
1115
1200
|
}
|
|
1201
|
+
if (!this.enableVirtualization && this.liCollections[findLi] && this.liCollections[findLi].classList.contains('e-disabled')) {
|
|
1202
|
+
return;
|
|
1203
|
+
}
|
|
1116
1204
|
this.setSelection(this.liCollections[findLi], e);
|
|
1117
1205
|
}
|
|
1118
1206
|
};
|
|
@@ -1208,6 +1296,19 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1208
1296
|
};
|
|
1209
1297
|
DropDownList.prototype.pageUpSelection = function (steps, event, isVirtualKeyAction) {
|
|
1210
1298
|
var previousItem = steps >= 0 ? this.liCollections[steps + 1] : this.liCollections[0];
|
|
1299
|
+
if (!this.enableVirtualization && previousItem && previousItem.classList.contains('e-disabled')) {
|
|
1300
|
+
var validIndex = steps >= 0 ? steps + 1 : 0;
|
|
1301
|
+
while (validIndex < this.liCollections.length) {
|
|
1302
|
+
previousItem = this.liCollections[validIndex];
|
|
1303
|
+
if (previousItem && !previousItem.classList.contains('e-disabled')) {
|
|
1304
|
+
break;
|
|
1305
|
+
}
|
|
1306
|
+
validIndex--;
|
|
1307
|
+
if (validIndex < 0) {
|
|
1308
|
+
return;
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1211
1312
|
if ((this.enableVirtualization && this.activeIndex == null)) {
|
|
1212
1313
|
previousItem = (this.liCollections.length >= steps && steps >= 0) ?
|
|
1213
1314
|
this.liCollections[steps + this.skeletonCount + 1] : this.liCollections[0];
|
|
@@ -1240,6 +1341,15 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1240
1341
|
DropDownList.prototype.pageDownSelection = function (steps, event, isVirtualKeyAction) {
|
|
1241
1342
|
var list = this.getItems();
|
|
1242
1343
|
var previousItem = steps <= list.length ? this.liCollections[steps - 1] : this.liCollections[list.length - 1];
|
|
1344
|
+
if (!this.enableVirtualization && previousItem && previousItem.classList.contains('e-disabled')) {
|
|
1345
|
+
while (steps >= 0 && steps < this.liCollections.length) {
|
|
1346
|
+
previousItem = steps <= list.length ? this.liCollections[steps - 1] : this.liCollections[list.length - 1];
|
|
1347
|
+
if (previousItem && !previousItem.classList.contains('e-disabled')) {
|
|
1348
|
+
break;
|
|
1349
|
+
}
|
|
1350
|
+
steps++;
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1243
1353
|
if (this.enableVirtualization && this.skeletonCount > 0) {
|
|
1244
1354
|
steps = this.getModuleName() === 'dropdownlist' && this.allowFiltering ? steps + 1 : steps;
|
|
1245
1355
|
previousItem = steps < list.length ? this.liCollections[steps] : this.liCollections[list.length - 1];
|
|
@@ -1806,6 +1916,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1806
1916
|
if (this.isFiltering() && this.getModuleName() === 'combobox' && isNullOrUndefined(this.list)) {
|
|
1807
1917
|
this.getInitialData = true;
|
|
1808
1918
|
this.renderList();
|
|
1919
|
+
if (!this.isSecondClick && !this.isDropDownClick) {
|
|
1920
|
+
this.executeCloneElements();
|
|
1921
|
+
}
|
|
1809
1922
|
}
|
|
1810
1923
|
this.typedString = this.filterInput.value;
|
|
1811
1924
|
this.preventAutoFill = false;
|
|
@@ -2018,7 +2131,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2018
2131
|
var virualElement = this.createElement('div', {
|
|
2019
2132
|
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
2020
2133
|
});
|
|
2021
|
-
|
|
2134
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
2022
2135
|
}
|
|
2023
2136
|
}
|
|
2024
2137
|
}
|
|
@@ -2057,7 +2170,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2057
2170
|
var virualElement = this.createElement('div', {
|
|
2058
2171
|
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
2059
2172
|
});
|
|
2060
|
-
|
|
2173
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
2061
2174
|
}
|
|
2062
2175
|
}
|
|
2063
2176
|
}
|
|
@@ -2065,6 +2178,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2065
2178
|
this.getFilteringSkeletonCount();
|
|
2066
2179
|
}
|
|
2067
2180
|
this.renderReactTemplates();
|
|
2181
|
+
if (this.filterInput && this.filterInput.value === '' && this.getModuleName() === 'combobox') {
|
|
2182
|
+
this.executeCloneElements();
|
|
2183
|
+
}
|
|
2068
2184
|
}
|
|
2069
2185
|
};
|
|
2070
2186
|
DropDownList.prototype.setSearchBox = function (popupElement) {
|
|
@@ -2416,7 +2532,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2416
2532
|
};
|
|
2417
2533
|
DropDownList.prototype.updateSelectionList = function () {
|
|
2418
2534
|
var selectedItem = this.list && this.list.querySelector('.' + 'e-active');
|
|
2419
|
-
if (!selectedItem && !isNullOrUndefined(this.value)) {
|
|
2535
|
+
if (!selectedItem && !isNullOrUndefined(this.value) && this.getModuleName() !== 'autocomplete') {
|
|
2420
2536
|
var value = this.allowObjectBinding ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
|
|
2421
2537
|
var findEle = this.findListElement(this.list, 'li', 'data-value', value);
|
|
2422
2538
|
if (findEle) {
|
|
@@ -2449,10 +2565,12 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2449
2565
|
formatUnit(Math.round(window.outerHeight).toString() + 'px') : formatUnit(_this.popupHeight);
|
|
2450
2566
|
if (_this.headerTemplate) {
|
|
2451
2567
|
_this.setHeaderTemplate(popupEle);
|
|
2568
|
+
_this.isUpdateHeaderHeight = _this.header.offsetHeight !== 0;
|
|
2452
2569
|
}
|
|
2453
2570
|
append([_this.list], popupEle);
|
|
2454
2571
|
if (_this.footerTemplate) {
|
|
2455
2572
|
_this.setFooterTemplate(popupEle);
|
|
2573
|
+
_this.isUpdateFooterHeight = _this.footer.offsetHeight !== 0;
|
|
2456
2574
|
}
|
|
2457
2575
|
document.body.appendChild(popupEle);
|
|
2458
2576
|
popupEle.style.top = '0px';
|
|
@@ -2617,12 +2735,57 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2617
2735
|
if (!isNullOrUndefined(_this.popupObj)) {
|
|
2618
2736
|
_this.popupObj.show(new Animation(eventArgs.animation), (_this.zIndex === 1000) ? _this.element : null);
|
|
2619
2737
|
}
|
|
2738
|
+
if (_this.isReact) {
|
|
2739
|
+
setTimeout(function () {
|
|
2740
|
+
if (_this.popupHeight && _this.list && _this.popupHeight !== 'auto' && !(_this.getModuleName() === 'dropdownlist' && _this.allowFiltering)) {
|
|
2741
|
+
var popupHeightValue = typeof _this.popupHeight === 'string' ? parseInt(_this.popupHeight, 10) : _this.popupHeight;
|
|
2742
|
+
if (!_this.isUpdateHeaderHeight && _this.headerTemplate && _this.header) {
|
|
2743
|
+
var listHeight = _this.list.style.maxHeight === '' ? popupHeightValue : parseInt(_this.list.style.maxHeight, 10);
|
|
2744
|
+
_this.list.style.maxHeight = (listHeight - _this.header.offsetHeight).toString() + 'px';
|
|
2745
|
+
_this.isUpdateHeaderHeight = true;
|
|
2746
|
+
}
|
|
2747
|
+
if (!_this.isUpdateFooterHeight && _this.footerTemplate && _this.footer) {
|
|
2748
|
+
var listHeight = _this.list.style.maxHeight === '' ? popupHeightValue : parseInt(_this.list.style.maxHeight, 10);
|
|
2749
|
+
_this.list.style.maxHeight = (listHeight - _this.footer.offsetHeight).toString() + 'px';
|
|
2750
|
+
_this.isUpdateFooterHeight = true;
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2753
|
+
}, 15);
|
|
2754
|
+
}
|
|
2620
2755
|
}
|
|
2621
2756
|
else {
|
|
2622
2757
|
_this.beforePopupOpen = false;
|
|
2623
2758
|
_this.destroyPopup();
|
|
2624
2759
|
}
|
|
2625
2760
|
});
|
|
2761
|
+
if (_this.allowResize) {
|
|
2762
|
+
var resizePaddingBottom = 16;
|
|
2763
|
+
// Create the resizer div
|
|
2764
|
+
_this.resizer = _this.createElement('div', {
|
|
2765
|
+
id: _this.element.id + '_resize-popup',
|
|
2766
|
+
className: dropDownListClasses.resizeIcon // Adding class for styling
|
|
2767
|
+
});
|
|
2768
|
+
// Add the resizer div to the popup
|
|
2769
|
+
if (_this.list && _this.list.parentElement) {
|
|
2770
|
+
_this.list.parentElement.classList.add('e-resize');
|
|
2771
|
+
if (_this.popupHeight.toString().toLowerCase() !== 'auto') {
|
|
2772
|
+
_this.list.parentElement.style.height = '100%';
|
|
2773
|
+
}
|
|
2774
|
+
_this.list.parentElement.style.paddingBottom = (_this.getModuleName() === 'dropdownlist' && _this.allowFiltering && _this.searchBoxHeight) ? (_this.searchBoxHeight + resizePaddingBottom).toString() + 'px' : resizePaddingBottom.toString() + 'px';
|
|
2775
|
+
if (_this.header || _this.footer || _this.itemTemplate) {
|
|
2776
|
+
_this.list.parentElement.style.paddingBottom = ((parseInt(_this.list.parentElement.style.maxHeight, 10) - parseInt(_this.list.style.maxHeight, 10)) + resizePaddingBottom).toString() + 'px';
|
|
2777
|
+
}
|
|
2778
|
+
_this.list.parentElement.appendChild(_this.resizer);
|
|
2779
|
+
//hold the popup resize
|
|
2780
|
+
_this.list.parentElement.style.width = _this.resizeWidth + "px";
|
|
2781
|
+
_this.list.parentElement.style.height = _this.resizeHeight + "px";
|
|
2782
|
+
_this.list.parentElement.style.maxHeight = _this.resizeHeight + "px";
|
|
2783
|
+
_this.list.style.maxHeight = _this.resizeHeight + "px";
|
|
2784
|
+
}
|
|
2785
|
+
// Attach mouse and touch events to the resizer
|
|
2786
|
+
EventHandler.add(_this.resizer, 'mousedown', _this.startResizing, _this);
|
|
2787
|
+
EventHandler.add(_this.resizer, 'touchstart', _this.startResizing, _this);
|
|
2788
|
+
}
|
|
2626
2789
|
}
|
|
2627
2790
|
else {
|
|
2628
2791
|
_this.beforePopupOpen = false;
|
|
@@ -2861,7 +3024,8 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2861
3024
|
}
|
|
2862
3025
|
else {
|
|
2863
3026
|
this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ?
|
|
2864
|
-
this.virtualListInfo.startIndex * this.listItemHeight
|
|
3027
|
+
isInitial && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight +
|
|
3028
|
+
(this.listItemHeight * 2) : this.virtualListInfo.startIndex * this.listItemHeight : 0;
|
|
2865
3029
|
}
|
|
2866
3030
|
isScrollerCHanged = this.isKeyBoardAction;
|
|
2867
3031
|
isScrollTopChanged = true;
|
|
@@ -3011,15 +3175,6 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3011
3175
|
this.keyboardEvent = null;
|
|
3012
3176
|
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
3013
3177
|
this.isActive = false;
|
|
3014
|
-
if (this.getModuleName() === 'dropdownlist') {
|
|
3015
|
-
Input.destroy({
|
|
3016
|
-
element: this.filterInput,
|
|
3017
|
-
floatLabelType: this.floatLabelType,
|
|
3018
|
-
properties: { placeholder: this.filterBarPlaceholder },
|
|
3019
|
-
buttons: this.clearIconElement
|
|
3020
|
-
}, this.clearIconElement);
|
|
3021
|
-
}
|
|
3022
|
-
this.filterInputObj = null;
|
|
3023
3178
|
this.isDropDownClick = false;
|
|
3024
3179
|
this.preventAutoFill = false;
|
|
3025
3180
|
var scrollableParentElements = this.popupObj.getScrollableParent(this.inputWrapper.container);
|
|
@@ -3092,6 +3247,15 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3092
3247
|
var popupInstance = this.popupObj;
|
|
3093
3248
|
var eventArgs = { popup: popupInstance, cancel: false, animation: animModel, event: e || null };
|
|
3094
3249
|
this.trigger('close', eventArgs, function (eventArgs) {
|
|
3250
|
+
if (_this.getModuleName() === 'dropdownlist') {
|
|
3251
|
+
Input.destroy({
|
|
3252
|
+
element: _this.filterInput,
|
|
3253
|
+
floatLabelType: _this.floatLabelType,
|
|
3254
|
+
properties: { placeholder: _this.filterBarPlaceholder },
|
|
3255
|
+
buttons: _this.clearIconElement
|
|
3256
|
+
}, _this.clearIconElement);
|
|
3257
|
+
}
|
|
3258
|
+
_this.filterInputObj = null;
|
|
3095
3259
|
if (!isNullOrUndefined(_this.popupObj) &&
|
|
3096
3260
|
!isNullOrUndefined(_this.popupObj.element.querySelector('.e-fixed-head'))) {
|
|
3097
3261
|
var fixedHeader = _this.popupObj.element.querySelector('.e-fixed-head');
|
|
@@ -3162,6 +3326,12 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3162
3326
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3163
3327
|
this.list.getElementsByClassName('e-virtual-ddl')[0].style = this.GetVirtualTrackHeight();
|
|
3164
3328
|
}
|
|
3329
|
+
else if (!this.list.querySelector('.e-virtual-ddl')) {
|
|
3330
|
+
var virualElement = this.createElement('div', {
|
|
3331
|
+
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
3332
|
+
});
|
|
3333
|
+
this.list.parentElement.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
3334
|
+
}
|
|
3165
3335
|
if (this.getModuleName() !== 'autocomplete' && this.totalItemCount !== 0 && this.totalItemCount > (this.itemCount * 2)) {
|
|
3166
3336
|
this.getSkeletonCount();
|
|
3167
3337
|
}
|
|
@@ -3180,6 +3350,10 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3180
3350
|
this.isFilterFocus = false;
|
|
3181
3351
|
this.inputElement.removeAttribute('aria-controls');
|
|
3182
3352
|
if (this.popupObj) {
|
|
3353
|
+
if (this.resizer) {
|
|
3354
|
+
EventHandler.remove(this.resizer, 'mousedown', this.startResizing);
|
|
3355
|
+
EventHandler.remove(this.resizer, 'touchstart', this.startResizing);
|
|
3356
|
+
}
|
|
3183
3357
|
this.popupObj.destroy();
|
|
3184
3358
|
detach(this.popupObj.element);
|
|
3185
3359
|
}
|
|
@@ -3899,6 +4073,20 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3899
4073
|
isOpen: true
|
|
3900
4074
|
});
|
|
3901
4075
|
}
|
|
4076
|
+
if (!this.isSecondClick && !this.isDropDownClick) {
|
|
4077
|
+
this.executeCloneElements();
|
|
4078
|
+
}
|
|
4079
|
+
};
|
|
4080
|
+
DropDownList.prototype.executeCloneElements = function () {
|
|
4081
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
4082
|
+
var proxy = this;
|
|
4083
|
+
var duration = (this.element.tagName === this.getNgDirective() && this.itemTemplate) ? 500 : 100;
|
|
4084
|
+
if (this.isReact && this.isFiltering() && this.itemTemplate != null) {
|
|
4085
|
+
setTimeout(function () {
|
|
4086
|
+
proxy.cloneElements();
|
|
4087
|
+
proxy.isSecondClick = true;
|
|
4088
|
+
}, duration);
|
|
4089
|
+
}
|
|
3902
4090
|
};
|
|
3903
4091
|
DropDownList.prototype.invokeRenderPopup = function (e) {
|
|
3904
4092
|
if (Browser.isDevice && this.isFilterLayout()) {
|
|
@@ -4235,6 +4423,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
4235
4423
|
__decorate([
|
|
4236
4424
|
Property(false)
|
|
4237
4425
|
], DropDownList.prototype, "enableVirtualization", void 0);
|
|
4426
|
+
__decorate([
|
|
4427
|
+
Property(false)
|
|
4428
|
+
], DropDownList.prototype, "allowResize", void 0);
|
|
4238
4429
|
__decorate([
|
|
4239
4430
|
Property(null)
|
|
4240
4431
|
], DropDownList.prototype, "text", void 0);
|
|
@@ -4274,6 +4465,15 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
4274
4465
|
__decorate([
|
|
4275
4466
|
Event()
|
|
4276
4467
|
], DropDownList.prototype, "focus", void 0);
|
|
4468
|
+
__decorate([
|
|
4469
|
+
Event()
|
|
4470
|
+
], DropDownList.prototype, "resizeStop", void 0);
|
|
4471
|
+
__decorate([
|
|
4472
|
+
Event()
|
|
4473
|
+
], DropDownList.prototype, "resizing", void 0);
|
|
4474
|
+
__decorate([
|
|
4475
|
+
Event()
|
|
4476
|
+
], DropDownList.prototype, "resizeStart", void 0);
|
|
4277
4477
|
DropDownList = __decorate([
|
|
4278
4478
|
NotifyPropertyChanges
|
|
4279
4479
|
], DropDownList);
|
|
@@ -332,6 +332,7 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
|
|
|
332
332
|
private nestedTableUpdate;
|
|
333
333
|
private clearIconWidth;
|
|
334
334
|
private isClicked;
|
|
335
|
+
private documentClickContext;
|
|
335
336
|
private isCheckAllCalled;
|
|
336
337
|
private isFromFilterChange;
|
|
337
338
|
private valueTemplateContainer;
|
|
@@ -171,6 +171,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
171
171
|
_this.selectedData = [];
|
|
172
172
|
_this.filterDelayTime = 300;
|
|
173
173
|
_this.isClicked = false;
|
|
174
|
+
_this.documentClickContext = _this.onDocumentClick.bind(_this);
|
|
174
175
|
// Specifies if the checkAll method has been called
|
|
175
176
|
_this.isCheckAllCalled = false;
|
|
176
177
|
_this.isFromFilterChange = false;
|
|
@@ -690,7 +691,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
690
691
|
if (this.showSelectAll && this.checkAllParent) {
|
|
691
692
|
EventHandler.remove(this.checkAllParent, 'mouseup', this.clickHandler);
|
|
692
693
|
}
|
|
693
|
-
|
|
694
|
+
document.removeEventListener('mousedown', this.documentClickContext);
|
|
694
695
|
};
|
|
695
696
|
/* Trigger when the dropdown is clicked */
|
|
696
697
|
DropDownTree.prototype.dropDownClick = function (e) {
|
|
@@ -1735,7 +1736,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1735
1736
|
if (_this.treeObj.checkedNodes.length > 0 && !_this.isFilterRestore) {
|
|
1736
1737
|
var nodes = _this.treeObj.element.querySelectorAll('li');
|
|
1737
1738
|
var checkedNodes = _this.treeObj.element.querySelectorAll('li[aria-checked=true]');
|
|
1738
|
-
if ((checkedNodes.length === nodes.length
|
|
1739
|
+
if ((checkedNodes.length === nodes.length) && _this.checkBoxElement) {
|
|
1739
1740
|
var wrap = closest(_this.checkBoxElement, '.' + CHECKBOXWRAP);
|
|
1740
1741
|
_this.changeState(wrap, 'check');
|
|
1741
1742
|
_this.checkSelectAll = false;
|
|
@@ -1798,7 +1799,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1798
1799
|
_this.isPopupOpen = false;
|
|
1799
1800
|
},
|
|
1800
1801
|
open: function () {
|
|
1801
|
-
|
|
1802
|
+
document.addEventListener('mousedown', _this.documentClickContext);
|
|
1802
1803
|
_this.isPopupOpen = true;
|
|
1803
1804
|
},
|
|
1804
1805
|
targetExitViewport: function () {
|
|
@@ -698,6 +698,10 @@ export interface DragEventArgs {
|
|
|
698
698
|
* Specifies the event.
|
|
699
699
|
*/
|
|
700
700
|
event: Event;
|
|
701
|
+
/**
|
|
702
|
+
* Illustrates whether the current action needs to be prevented or not.
|
|
703
|
+
*/
|
|
704
|
+
cancel?: boolean;
|
|
701
705
|
}
|
|
702
706
|
/**
|
|
703
707
|
* Interface for change event args.
|
package/src/list-box/list-box.js
CHANGED
|
@@ -205,7 +205,7 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
205
205
|
new Sortable(this.ulElement, {
|
|
206
206
|
scope: this.scope,
|
|
207
207
|
itemClass: 'e-list-item',
|
|
208
|
-
|
|
208
|
+
beforeDragStart: this.triggerDragStart.bind(this),
|
|
209
209
|
drag: this.triggerDrag.bind(this),
|
|
210
210
|
beforeDrop: this.beforeDragEnd.bind(this),
|
|
211
211
|
drop: this.dragEnd.bind(this),
|
|
@@ -455,11 +455,11 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
455
455
|
ListBox.prototype.triggerDragStart = function (args) {
|
|
456
456
|
var _this = this;
|
|
457
457
|
var badge;
|
|
458
|
-
|
|
458
|
+
var extendedArgs = extend(this.getDragArgs(args), { dragSelected: true }, { cancel: false });
|
|
459
459
|
if (Browser.isIos) {
|
|
460
460
|
this.list.style.overflow = 'hidden';
|
|
461
461
|
}
|
|
462
|
-
this.trigger('dragStart',
|
|
462
|
+
this.trigger('dragStart', extendedArgs, function (dragEventArgs) {
|
|
463
463
|
_this.allowDragAll = dragEventArgs.dragSelected;
|
|
464
464
|
if (!_this.allowDragAll) {
|
|
465
465
|
badge = _this.ulElement.getElementsByClassName('e-list-badge')[0];
|
|
@@ -467,6 +467,9 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
467
467
|
detach(badge);
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
+
if (dragEventArgs.cancel) {
|
|
471
|
+
args.cancel = true;
|
|
472
|
+
}
|
|
470
473
|
});
|
|
471
474
|
};
|
|
472
475
|
ListBox.prototype.triggerDrag = function (args) {
|
|
@@ -697,7 +700,9 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
697
700
|
listObj.liCollections = liColl;
|
|
698
701
|
listObj.jsonData = extend([], [], jsonData, false);
|
|
699
702
|
listObj.listData = extend([], [], listData, false);
|
|
700
|
-
listObj.
|
|
703
|
+
if (listObj.sortOrder === 'None') {
|
|
704
|
+
listObj.sortedData = extend([], [], sortedData, false);
|
|
705
|
+
}
|
|
701
706
|
if (this.listData.length === 0) {
|
|
702
707
|
this.l10nUpdate();
|
|
703
708
|
}
|
package/src/mention/mention.js
CHANGED
|
@@ -385,6 +385,9 @@ var Mention = /** @class */ (function (_super) {
|
|
|
385
385
|
this.hidePopup();
|
|
386
386
|
this.lineBreak = true;
|
|
387
387
|
}
|
|
388
|
+
else if ((e.key === 'Backspace' || e.key === 'Delete') && this.range && this.range.startOffset !== this.range.endOffset) {
|
|
389
|
+
this.range.deleteContents();
|
|
390
|
+
}
|
|
388
391
|
return;
|
|
389
392
|
}
|
|
390
393
|
if (lastWordRange.includes(this.mentionChar)) {
|
|
@@ -1162,7 +1165,9 @@ var Mention = /** @class */ (function (_super) {
|
|
|
1162
1165
|
};
|
|
1163
1166
|
Mention.prototype.scrollTop = function () {
|
|
1164
1167
|
if (!isNullOrUndefined(this.selectedLI)) {
|
|
1165
|
-
var nextOffset = this.
|
|
1168
|
+
var nextOffset = !isNullOrUndefined(this.fields.groupBy) && !isNullOrUndefined(this.fixedHeaderElement) ?
|
|
1169
|
+
this.selectedLI.offsetTop - (this.list.scrollTop + this.fixedHeaderElement.offsetHeight) :
|
|
1170
|
+
this.selectedLI.offsetTop - this.list.scrollTop;
|
|
1166
1171
|
nextOffset = this.fields.groupBy && nextOffset;
|
|
1167
1172
|
var boxRange = (this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop);
|
|
1168
1173
|
if (this.activeIndex === 0) {
|
|
@@ -344,6 +344,15 @@ export interface MultiSelectModel extends DropDownBaseModel{
|
|
|
344
344
|
*/
|
|
345
345
|
readonly?: boolean;
|
|
346
346
|
|
|
347
|
+
/**
|
|
348
|
+
* Gets or sets a value that indicates whether the Multiselect popup can be resized.
|
|
349
|
+
* When set to `true`, a resize handle appears in the bottom-right corner of the popup,
|
|
350
|
+
* allowing the user to resize the width and height of the popup.
|
|
351
|
+
*
|
|
352
|
+
* @default false
|
|
353
|
+
*/
|
|
354
|
+
allowResize?: boolean;
|
|
355
|
+
|
|
347
356
|
/**
|
|
348
357
|
* Selects the list item which maps the data `text` field in the component.
|
|
349
358
|
*
|
|
@@ -559,6 +568,28 @@ export interface MultiSelectModel extends DropDownBaseModel{
|
|
|
559
568
|
*/
|
|
560
569
|
chipSelection?: EmitType<Object>;
|
|
561
570
|
|
|
571
|
+
/**
|
|
572
|
+
* Triggers when the user finishes resizing the Multiselect popup.
|
|
573
|
+
*
|
|
574
|
+
* @event resizeStop
|
|
575
|
+
*/
|
|
576
|
+
resizeStop?: EmitType<Object>;
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Triggers continuously while the Multiselect popup is being resized by the user.
|
|
580
|
+
* This event provides live updates on the width and height of the popup.
|
|
581
|
+
*
|
|
582
|
+
* @event resizing
|
|
583
|
+
*/
|
|
584
|
+
resizing?: EmitType<Object>;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Triggers when the user starts resizing the Multiselect popup.
|
|
588
|
+
*
|
|
589
|
+
* @event resizeStart
|
|
590
|
+
*/
|
|
591
|
+
resizeStart?: EmitType<Object>;
|
|
592
|
+
|
|
562
593
|
/**
|
|
563
594
|
* Triggers event,when user types a text in search box.
|
|
564
595
|
* > For more details about filtering, refer to [`Filtering`](../../multi-select/filtering) documentation.
|
|
@@ -56,8 +56,20 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
56
56
|
private isClearAllItem;
|
|
57
57
|
private previousFocusItem;
|
|
58
58
|
private isRemoveSelection;
|
|
59
|
+
private resizer;
|
|
60
|
+
private storedSelectAllHeight;
|
|
61
|
+
private isResizing;
|
|
62
|
+
private originalHeight;
|
|
63
|
+
private originalWidth;
|
|
64
|
+
private originalMouseX;
|
|
65
|
+
private originalMouseY;
|
|
66
|
+
private resizeHeight;
|
|
67
|
+
private resizeWidth;
|
|
59
68
|
private currentRemoveValue;
|
|
60
69
|
private selectedListData;
|
|
70
|
+
private isClearAllAction;
|
|
71
|
+
private isUpdateHeaderHeight;
|
|
72
|
+
private isUpdateFooterHeight;
|
|
61
73
|
/**
|
|
62
74
|
* The `fields` property maps the columns of the data table and binds the data to the component.
|
|
63
75
|
* * text - Maps the text column from data table for each list item.
|
|
@@ -365,6 +377,14 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
365
377
|
* @default false
|
|
366
378
|
*/
|
|
367
379
|
readonly: boolean;
|
|
380
|
+
/**
|
|
381
|
+
* Gets or sets a value that indicates whether the Multiselect popup can be resized.
|
|
382
|
+
* When set to `true`, a resize handle appears in the bottom-right corner of the popup,
|
|
383
|
+
* allowing the user to resize the width and height of the popup.
|
|
384
|
+
*
|
|
385
|
+
* @default false
|
|
386
|
+
*/
|
|
387
|
+
allowResize: boolean;
|
|
368
388
|
/**
|
|
369
389
|
* Selects the list item which maps the data `text` field in the component.
|
|
370
390
|
*
|
|
@@ -553,6 +573,25 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
553
573
|
* @event chipSelection
|
|
554
574
|
*/
|
|
555
575
|
chipSelection: EmitType<Object>;
|
|
576
|
+
/**
|
|
577
|
+
* Triggers when the user finishes resizing the Multiselect popup.
|
|
578
|
+
*
|
|
579
|
+
* @event resizeStop
|
|
580
|
+
*/
|
|
581
|
+
resizeStop: EmitType<Object>;
|
|
582
|
+
/**
|
|
583
|
+
* Triggers continuously while the Multiselect popup is being resized by the user.
|
|
584
|
+
* This event provides live updates on the width and height of the popup.
|
|
585
|
+
*
|
|
586
|
+
* @event resizing
|
|
587
|
+
*/
|
|
588
|
+
resizing: EmitType<Object>;
|
|
589
|
+
/**
|
|
590
|
+
* Triggers when the user starts resizing the Multiselect popup.
|
|
591
|
+
*
|
|
592
|
+
* @event resizeStart
|
|
593
|
+
*/
|
|
594
|
+
resizeStart: EmitType<Object>;
|
|
556
595
|
/**
|
|
557
596
|
* Triggers event,when user types a text in search box.
|
|
558
597
|
* > For more details about filtering, refer to [`Filtering`](../../multi-select/filtering) documentation.
|
|
@@ -831,6 +870,8 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
831
870
|
private updateRemainingText;
|
|
832
871
|
private getOverflowVal;
|
|
833
872
|
private unWireEvent;
|
|
873
|
+
protected resizingWireEvent(): void;
|
|
874
|
+
protected resizingUnWireEvent(): void;
|
|
834
875
|
private selectAllItem;
|
|
835
876
|
protected virtualSelectionAll(state: boolean, li: NodeListOf<HTMLElement> | HTMLElement[], event: MouseEvent | KeyboardEventArgs): void;
|
|
836
877
|
private updateValue;
|
|
@@ -918,6 +959,10 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
918
959
|
* @returns {void}
|
|
919
960
|
*/
|
|
920
961
|
render(): void;
|
|
962
|
+
protected setResize(): void;
|
|
963
|
+
protected startResizing(event: MouseEvent | TouchEvent): void;
|
|
964
|
+
protected resizePopup(event?: MouseEvent | TouchEvent): void;
|
|
965
|
+
protected stopResizing(event: MouseEvent | TouchEvent): void;
|
|
921
966
|
private getListHeight;
|
|
922
967
|
/**
|
|
923
968
|
* Removes disabled values from the given array.
|