@syncfusion/ej2-dropdowns 33.2.3 → 33.2.4
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/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 +61 -2
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +61 -2
- 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 +3 -3
- package/src/drop-down-tree/drop-down-tree.js +6 -0
- package/src/mention/mention.js +1 -1
- package/src/multi-select/multi-select.d.ts +1 -0
- package/src/multi-select/multi-select.js +54 -1
|
@@ -10006,6 +10006,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
10006
10006
|
removeClass([this.popupDiv], NODATA);
|
|
10007
10007
|
this.hideCheckAll(false);
|
|
10008
10008
|
}
|
|
10009
|
+
else {
|
|
10010
|
+
this.hideCheckAll(this.treeItems.length <= 1);
|
|
10011
|
+
}
|
|
10009
10012
|
if (!this.isFilteredData) {
|
|
10010
10013
|
this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
|
|
10011
10014
|
}
|
|
@@ -11420,6 +11423,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
11420
11423
|
EventHandler.remove(element, 'mouseup', this.removeChip);
|
|
11421
11424
|
}
|
|
11422
11425
|
}
|
|
11426
|
+
if (this.keyboardModule) {
|
|
11427
|
+
this.keyboardModule.destroy();
|
|
11428
|
+
}
|
|
11423
11429
|
this.chipWrapper = null;
|
|
11424
11430
|
this.chipCollection = null;
|
|
11425
11431
|
this.checkAllParent = null;
|
|
@@ -20068,7 +20074,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
20068
20074
|
});
|
|
20069
20075
|
}
|
|
20070
20076
|
else {
|
|
20071
|
-
listItems_3 =
|
|
20077
|
+
listItems_3 = this.executeLocalForLargeSelection(this.dataSource, this.value, {
|
|
20078
|
+
fields: this.fields,
|
|
20079
|
+
allowObjectBinding: this.allowObjectBinding,
|
|
20080
|
+
isPrimitiveData: this.isPrimitiveData
|
|
20081
|
+
});
|
|
20072
20082
|
}
|
|
20073
20083
|
}
|
|
20074
20084
|
if (!(this.dataSource instanceof DataManager)) {
|
|
@@ -20097,6 +20107,55 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
20097
20107
|
this.element.setAttribute('data-initial-value', this.text);
|
|
20098
20108
|
}
|
|
20099
20109
|
};
|
|
20110
|
+
MultiSelect.prototype.executeLocalForLargeSelection = function (dataSource, values, options) {
|
|
20111
|
+
if (!dataSource || !dataSource.length || !values || !values.length) {
|
|
20112
|
+
return [];
|
|
20113
|
+
}
|
|
20114
|
+
var fields = options.fields, allowObjectBinding = options.allowObjectBinding, isPrimitiveData = options.isPrimitiveData, _a = options.predicateChunkSize, predicateChunkSize = _a === void 0 ? 100 : _a;
|
|
20115
|
+
if (values.length === dataSource.length) {
|
|
20116
|
+
return dataSource.slice();
|
|
20117
|
+
}
|
|
20118
|
+
var field = isPrimitiveData ? '' : fields.value;
|
|
20119
|
+
var allResults = [];
|
|
20120
|
+
var predicate = null;
|
|
20121
|
+
var count = 0;
|
|
20122
|
+
var flushPredicate = function () {
|
|
20123
|
+
if (!predicate) {
|
|
20124
|
+
return;
|
|
20125
|
+
}
|
|
20126
|
+
var query = new Query().where(predicate);
|
|
20127
|
+
var result = new DataManager(dataSource).executeLocal(query);
|
|
20128
|
+
allResults.push.apply(allResults, result);
|
|
20129
|
+
predicate = null;
|
|
20130
|
+
count = 0;
|
|
20131
|
+
};
|
|
20132
|
+
for (var i = 0; i < values.length; i++) {
|
|
20133
|
+
var value = allowObjectBinding
|
|
20134
|
+
? getValue(fields.value || '', values[i])
|
|
20135
|
+
: values[i];
|
|
20136
|
+
predicate = predicate
|
|
20137
|
+
? predicate.or(field, 'equal', value)
|
|
20138
|
+
: new Predicate(field, 'equal', value);
|
|
20139
|
+
count++;
|
|
20140
|
+
if (count === predicateChunkSize) {
|
|
20141
|
+
flushPredicate();
|
|
20142
|
+
}
|
|
20143
|
+
}
|
|
20144
|
+
flushPredicate();
|
|
20145
|
+
var uniqueMap = {};
|
|
20146
|
+
var resultArray = [];
|
|
20147
|
+
for (var i = 0; i < allResults.length; i++) {
|
|
20148
|
+
var item = allResults[i];
|
|
20149
|
+
var key = isPrimitiveData
|
|
20150
|
+
? item.toString()
|
|
20151
|
+
: getValue(fields.value, item);
|
|
20152
|
+
if (!uniqueMap.hasOwnProperty(key)) {
|
|
20153
|
+
uniqueMap[key] = item;
|
|
20154
|
+
resultArray.push(item);
|
|
20155
|
+
}
|
|
20156
|
+
}
|
|
20157
|
+
return resultArray;
|
|
20158
|
+
};
|
|
20100
20159
|
MultiSelect.prototype.checkAutoFocus = function () {
|
|
20101
20160
|
if (this.element.hasAttribute('autofocus')) {
|
|
20102
20161
|
this.inputElement.focus();
|
|
@@ -24358,7 +24417,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
24358
24417
|
}
|
|
24359
24418
|
else if (this.allowSpaces && this.queryString !== '' && currentRange && currentRange.trim() !== '' && currentRange.replace('\u00a0', ' ').lastIndexOf(' ') < currentRange.length - 1 &&
|
|
24360
24419
|
e.keyCode !== 38 && e.keyCode !== 40 && e.keyCode !== 8 && (this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0) ||
|
|
24361
|
-
(this.liCollections && this.liCollections.length > 0))) {
|
|
24420
|
+
((this.liCollections && this.liCollections.length > 0) || (this.isPopupOpen && this.list && this.list.classList.contains('e-nodata'))))) {
|
|
24362
24421
|
this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace('\u00a0', ' ');
|
|
24363
24422
|
this.searchLists(e);
|
|
24364
24423
|
}
|