@syncfusion/ej2-dropdowns 33.1.49 → 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 -8
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +61 -8
- 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 +8 -8
- package/src/drop-down-tree/drop-down-tree.js +6 -6
- 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
|
@@ -8755,9 +8755,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8755
8755
|
if (formElement) {
|
|
8756
8756
|
EventHandler.add(formElement, 'reset', this.resetValueHandler, this);
|
|
8757
8757
|
}
|
|
8758
|
-
if (this.keyboardModule && typeof this.keyboardModule.destroy === 'function') {
|
|
8759
|
-
this.keyboardModule.destroy();
|
|
8760
|
-
}
|
|
8761
8758
|
this.keyboardModule = new KeyboardEvents(this.inputWrapper, {
|
|
8762
8759
|
keyAction: this.keyActionHandler.bind(this),
|
|
8763
8760
|
keyConfigs: this.keyConfigs,
|
|
@@ -8765,9 +8762,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8765
8762
|
});
|
|
8766
8763
|
};
|
|
8767
8764
|
DropDownTree.prototype.wireTreeEvents = function () {
|
|
8768
|
-
if (this.keyboardModule && typeof this.keyboardModule.destroy === 'function') {
|
|
8769
|
-
this.keyboardModule.destroy();
|
|
8770
|
-
}
|
|
8771
8765
|
this.keyboardModule = new KeyboardEvents(this.tree, {
|
|
8772
8766
|
keyAction: this.treeAction.bind(this),
|
|
8773
8767
|
keyConfigs: this.keyConfigs,
|
|
@@ -10012,6 +10006,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
10012
10006
|
removeClass([this.popupDiv], NODATA);
|
|
10013
10007
|
this.hideCheckAll(false);
|
|
10014
10008
|
}
|
|
10009
|
+
else {
|
|
10010
|
+
this.hideCheckAll(this.treeItems.length <= 1);
|
|
10011
|
+
}
|
|
10015
10012
|
if (!this.isFilteredData) {
|
|
10016
10013
|
this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
|
|
10017
10014
|
}
|
|
@@ -11426,6 +11423,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
11426
11423
|
EventHandler.remove(element, 'mouseup', this.removeChip);
|
|
11427
11424
|
}
|
|
11428
11425
|
}
|
|
11426
|
+
if (this.keyboardModule) {
|
|
11427
|
+
this.keyboardModule.destroy();
|
|
11428
|
+
}
|
|
11429
11429
|
this.chipWrapper = null;
|
|
11430
11430
|
this.chipCollection = null;
|
|
11431
11431
|
this.checkAllParent = null;
|
|
@@ -20074,7 +20074,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
20074
20074
|
});
|
|
20075
20075
|
}
|
|
20076
20076
|
else {
|
|
20077
|
-
listItems_3 =
|
|
20077
|
+
listItems_3 = this.executeLocalForLargeSelection(this.dataSource, this.value, {
|
|
20078
|
+
fields: this.fields,
|
|
20079
|
+
allowObjectBinding: this.allowObjectBinding,
|
|
20080
|
+
isPrimitiveData: this.isPrimitiveData
|
|
20081
|
+
});
|
|
20078
20082
|
}
|
|
20079
20083
|
}
|
|
20080
20084
|
if (!(this.dataSource instanceof DataManager)) {
|
|
@@ -20103,6 +20107,55 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
20103
20107
|
this.element.setAttribute('data-initial-value', this.text);
|
|
20104
20108
|
}
|
|
20105
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
|
+
};
|
|
20106
20159
|
MultiSelect.prototype.checkAutoFocus = function () {
|
|
20107
20160
|
if (this.element.hasAttribute('autofocus')) {
|
|
20108
20161
|
this.inputElement.focus();
|
|
@@ -24364,7 +24417,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
24364
24417
|
}
|
|
24365
24418
|
else if (this.allowSpaces && this.queryString !== '' && currentRange && currentRange.trim() !== '' && currentRange.replace('\u00a0', ' ').lastIndexOf(' ') < currentRange.length - 1 &&
|
|
24366
24419
|
e.keyCode !== 38 && e.keyCode !== 40 && e.keyCode !== 8 && (this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0) ||
|
|
24367
|
-
(this.liCollections && this.liCollections.length > 0))) {
|
|
24420
|
+
((this.liCollections && this.liCollections.length > 0) || (this.isPopupOpen && this.list && this.list.classList.contains('e-nodata'))))) {
|
|
24368
24421
|
this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace('\u00a0', ' ');
|
|
24369
24422
|
this.searchLists(e);
|
|
24370
24423
|
}
|