@syncfusion/ej2-dropdowns 23.1.44 → 23.2.5
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 +34 -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 +40 -6
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +40 -5
- 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/common/virtual-scroll.d.ts +1 -0
- package/src/common/virtual-scroll.js +13 -1
- package/src/drop-down-list/drop-down-list.js +4 -1
- package/src/list-box/list-box.d.ts +3 -0
- package/src/list-box/list-box.js +19 -2
- package/src/mention/mention.js +3 -0
- package/src/multi-select/multi-select.js +1 -1
- package/styles/bootstrap-dark.css +5 -0
- package/styles/bootstrap5-dark.css +2 -1
- package/styles/bootstrap5.css +2 -1
- package/styles/fabric-dark.css +5 -0
- package/styles/fluent-dark.css +2 -1
- package/styles/fluent.css +2 -1
- package/styles/highcontrast.css +5 -0
- package/styles/multi-select/_bootstrap-dark-definition.scss +5 -0
- package/styles/multi-select/_bootstrap5-definition.scss +2 -1
- package/styles/multi-select/_fabric-dark-definition.scss +5 -0
- package/styles/multi-select/_fluent-definition.scss +2 -1
- package/styles/multi-select/_highcontrast-definition.scss +5 -0
- package/styles/multi-select/_tailwind-definition.scss +2 -1
- package/styles/multi-select/bootstrap-dark.css +5 -0
- package/styles/multi-select/bootstrap5-dark.css +2 -1
- package/styles/multi-select/bootstrap5.css +2 -1
- package/styles/multi-select/fabric-dark.css +5 -0
- package/styles/multi-select/fluent-dark.css +2 -1
- package/styles/multi-select/fluent.css +2 -1
- package/styles/multi-select/highcontrast.css +5 -0
- package/styles/multi-select/tailwind-dark.css +2 -1
- package/styles/multi-select/tailwind.css +2 -1
- package/styles/tailwind-dark.css +2 -1
- package/styles/tailwind.css +2 -1
|
@@ -288,10 +288,22 @@ class VirtualScroll {
|
|
|
288
288
|
generateAndExecuteQueryAsync(query, virtualItemStartIndex = 0, virtualItemEndIndex = 0, isQueryGenerated = false) {
|
|
289
289
|
let dataSource = this.parent.dataSource;
|
|
290
290
|
if (!isQueryGenerated) {
|
|
291
|
-
|
|
291
|
+
if (!isNullOrUndefined(this.parent.query)) {
|
|
292
|
+
var newQuery = this.removeSkipAndTakeEvents(this.parent.query.clone());
|
|
293
|
+
query = this.getPageQuery(newQuery, virtualItemStartIndex, virtualItemEndIndex);
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
query = this.getPageQuery(query, virtualItemStartIndex, virtualItemEndIndex);
|
|
297
|
+
}
|
|
292
298
|
}
|
|
293
299
|
this.parent.resetList(dataSource, this.parent.fields, query);
|
|
294
300
|
}
|
|
301
|
+
removeSkipAndTakeEvents(query) {
|
|
302
|
+
query.queries = query.queries.filter(function (event) {
|
|
303
|
+
return event.fn !== 'onSkip' && event.fn !== 'onTake';
|
|
304
|
+
});
|
|
305
|
+
return query;
|
|
306
|
+
}
|
|
295
307
|
setCurrentViewDataAsync() {
|
|
296
308
|
// eslint-disable-next-line
|
|
297
309
|
let currentData = [];
|
|
@@ -2713,6 +2725,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
2713
2725
|
updateUpDownAction(e, isVirtualKeyAction) {
|
|
2714
2726
|
if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
|
|
2715
2727
|
let value = this.getItemData().value;
|
|
2728
|
+
if (isNullOrUndefined(value)) {
|
|
2729
|
+
value = 'null';
|
|
2730
|
+
}
|
|
2716
2731
|
let filterIndex = this.getIndexByValue(value);
|
|
2717
2732
|
if (!isNullOrUndefined(filterIndex)) {
|
|
2718
2733
|
this.activeIndex = filterIndex;
|
|
@@ -2941,7 +2956,6 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
2941
2956
|
if (this.inputWrapper.container.classList.contains(dropDownListClasses.inputFocus) || this.isPopupOpen) {
|
|
2942
2957
|
this.isDocumentClick = true;
|
|
2943
2958
|
const isActive = this.isRequested;
|
|
2944
|
-
this.isInteracted = false;
|
|
2945
2959
|
this.hidePopup(e);
|
|
2946
2960
|
if (!isActive) {
|
|
2947
2961
|
this.onFocusOut();
|
|
@@ -5274,6 +5288,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5274
5288
|
this.isSelectCustom = false;
|
|
5275
5289
|
this.clearAll(e);
|
|
5276
5290
|
}
|
|
5291
|
+
this.isInteracted = false;
|
|
5277
5292
|
}
|
|
5278
5293
|
/* eslint-disable valid-jsdoc, jsdoc/require-param */
|
|
5279
5294
|
/**
|
|
@@ -12738,7 +12753,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12738
12753
|
updateDataList() {
|
|
12739
12754
|
if (this.mainList && this.ulElement && !(this.isFiltered || this.filterAction || this.targetElement().trim())) {
|
|
12740
12755
|
let isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
|
|
12741
|
-
let isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
|
|
12756
|
+
let isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount)));
|
|
12742
12757
|
let isAngularTemplateUpdate = this.itemTemplate && this.ulElement.childElementCount > 0 && !(this.ulElement.childElementCount < this.mainList.childElementCount) && (this.ulElement.children[0].childElementCount > 0 || (this.fields.groupBy && this.ulElement.children[1] && this.ulElement.children[1].childElementCount > 0));
|
|
12743
12758
|
if (isDynamicGroupItemUpdate || isReactTemplateUpdate || isAngularTemplateUpdate) {
|
|
12744
12759
|
//EJ2-57748 - for this task, we prevent the ul element cloning ( this.mainList = this.ulElement.cloneNode ? <HTMLElement>this.ulElement.cloneNode(true) : this.ulElement;)
|
|
@@ -15416,6 +15431,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
15416
15431
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15417
15432
|
const event = args.event;
|
|
15418
15433
|
let wrapper;
|
|
15434
|
+
this.stopTimer();
|
|
15419
15435
|
if (args.target && (args.target.classList.contains('e-listbox-wrapper') || args.target.classList.contains('e-list-item')
|
|
15420
15436
|
|| args.target.classList.contains('e-filter-parent') || args.target.classList.contains('e-input-group')
|
|
15421
15437
|
|| args.target.closest('.e-list-item'))) {
|
|
@@ -15435,10 +15451,10 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
15435
15451
|
}
|
|
15436
15452
|
boundRect = scrollParent.getBoundingClientRect();
|
|
15437
15453
|
if ((boundRect.y + scrollParent.offsetHeight) - (event.clientY + scrollMoved) < 1) {
|
|
15438
|
-
|
|
15454
|
+
this.timer = window.setInterval(() => { this.setScrollDown(scrollParent, scrollHeight, true); }, 70);
|
|
15439
15455
|
}
|
|
15440
15456
|
else if ((event.clientY - scrollMoved) - boundRect.y < 1) {
|
|
15441
|
-
|
|
15457
|
+
this.timer = window.setInterval(() => { this.setScrollDown(scrollParent, scrollHeight, false); }, 70);
|
|
15442
15458
|
}
|
|
15443
15459
|
}
|
|
15444
15460
|
if (args.target === null) {
|
|
@@ -15446,7 +15462,19 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
15446
15462
|
}
|
|
15447
15463
|
this.trigger('drag', this.getDragArgs(args));
|
|
15448
15464
|
}
|
|
15465
|
+
setScrollDown(scrollElem, scrollPixel, isScrollDown) {
|
|
15466
|
+
if (isScrollDown) {
|
|
15467
|
+
scrollElem.scrollTop = scrollElem.scrollTop + scrollPixel;
|
|
15468
|
+
}
|
|
15469
|
+
else {
|
|
15470
|
+
scrollElem.scrollTop = scrollElem.scrollTop - scrollPixel;
|
|
15471
|
+
}
|
|
15472
|
+
}
|
|
15473
|
+
stopTimer() {
|
|
15474
|
+
window.clearInterval(this.timer);
|
|
15475
|
+
}
|
|
15449
15476
|
beforeDragEnd(args) {
|
|
15477
|
+
this.stopTimer();
|
|
15450
15478
|
let items = [];
|
|
15451
15479
|
this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
|
|
15452
15480
|
if (this.value.indexOf(this.dragValue) > -1) {
|
|
@@ -16873,9 +16901,12 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
16873
16901
|
this.isDataFetched = false;
|
|
16874
16902
|
const backCommand = true;
|
|
16875
16903
|
if (this.targetElement().trim() === '') {
|
|
16876
|
-
|
|
16904
|
+
let list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
|
|
16877
16905
|
if (backCommand) {
|
|
16878
16906
|
this.remoteCustomValue = false;
|
|
16907
|
+
if (this.isAngular && this.itemTemplate) {
|
|
16908
|
+
list = this.renderItems(this.listData, fields);
|
|
16909
|
+
}
|
|
16879
16910
|
this.onActionComplete(list, this.jsonData);
|
|
16880
16911
|
this.notify('reOrder', { module: 'CheckBoxSelection', enable: this.selectionSettings.showCheckbox, e: this });
|
|
16881
16912
|
}
|
|
@@ -17828,6 +17859,9 @@ let Mention = class Mention extends DropDownBase {
|
|
|
17828
17859
|
const value = this.getFormattedValue(focusItem.getAttribute('data-value'));
|
|
17829
17860
|
this.selectEventCallback(focusItem, this.getDataByValue(value), value, true);
|
|
17830
17861
|
}
|
|
17862
|
+
if (this.beforePopupOpen) {
|
|
17863
|
+
this.renderPopup();
|
|
17864
|
+
}
|
|
17831
17865
|
}
|
|
17832
17866
|
}
|
|
17833
17867
|
setDataIndex() {
|