@syncfusion/ej2-dropdowns 29.2.11 → 30.1.37
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/.eslintrc.json +2 -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 +37 -32
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +39 -35
- 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/license +1 -1
- package/package.json +8 -8
- package/src/auto-complete/auto-complete.d.ts +1 -1
- package/src/auto-complete/auto-complete.js +22 -22
- package/src/drop-down-list/drop-down-list.js +2 -1
- package/src/drop-down-tree/drop-down-tree.js +1 -1
- package/src/mention/mention.d.ts +0 -1
- package/src/mention/mention.js +13 -10
- package/src/multi-select/multi-select.js +1 -1
|
@@ -5279,6 +5279,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5279
5279
|
}
|
|
5280
5280
|
this.getInitialData = false;
|
|
5281
5281
|
this.isReactTemplateUpdate = true;
|
|
5282
|
+
this.typedString = this.filterInput.value;
|
|
5282
5283
|
this.searchLists(this.filterArgs);
|
|
5283
5284
|
return;
|
|
5284
5285
|
}
|
|
@@ -5560,7 +5561,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5560
5561
|
document.body.appendChild(popupEle);
|
|
5561
5562
|
popupEle.style.top = '0px';
|
|
5562
5563
|
initialPopupHeight = popupEle.clientHeight;
|
|
5563
|
-
if (_this.enableVirtualization && _this.itemTemplate) {
|
|
5564
|
+
if (_this.enableVirtualization && (_this.itemTemplate || _this.isAngular)) {
|
|
5564
5565
|
var listitems = popupEle.querySelectorAll('li.e-list-item:not(.e-virtual-list)');
|
|
5565
5566
|
_this.listItemHeight = listitems.length > 0 ? Math.ceil(listitems[0].getBoundingClientRect().height) +
|
|
5566
5567
|
parseInt(window.getComputedStyle(listitems[0]).marginBottom, 10) : 0;
|
|
@@ -8202,7 +8203,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8202
8203
|
if (this.isPopupOpen) {
|
|
8203
8204
|
this.hidePopup();
|
|
8204
8205
|
}
|
|
8205
|
-
else {
|
|
8206
|
+
else if (!(e instanceof TouchEvent) && e.button !== 2) {
|
|
8206
8207
|
this.focusIn(e);
|
|
8207
8208
|
this.renderPopup();
|
|
8208
8209
|
}
|
|
@@ -12294,6 +12295,28 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
|
|
|
12294
12295
|
}
|
|
12295
12296
|
return filterQuery;
|
|
12296
12297
|
};
|
|
12298
|
+
AutoComplete.prototype.performFiltering = function (e) {
|
|
12299
|
+
var _this_1 = this;
|
|
12300
|
+
var eventArgs = {
|
|
12301
|
+
preventDefaultAction: false,
|
|
12302
|
+
text: this.filterInput ? this.filterInput.value : null,
|
|
12303
|
+
updateData: function (dataSource, query, fields) {
|
|
12304
|
+
if (eventArgs.cancel) {
|
|
12305
|
+
return;
|
|
12306
|
+
}
|
|
12307
|
+
_this_1.isFiltered = true;
|
|
12308
|
+
_this_1.customFilterQuery = query;
|
|
12309
|
+
_this_1.filterAction(dataSource, query, fields);
|
|
12310
|
+
},
|
|
12311
|
+
cancel: false
|
|
12312
|
+
};
|
|
12313
|
+
this.trigger('filtering', eventArgs, function (eventArgs) {
|
|
12314
|
+
if (!eventArgs.cancel && !_this_1.isFiltered && !eventArgs.preventDefaultAction) {
|
|
12315
|
+
_this_1.searchList = true;
|
|
12316
|
+
_this_1.filterAction(_this_1.dataSource, null, _this_1.fields, e);
|
|
12317
|
+
}
|
|
12318
|
+
});
|
|
12319
|
+
};
|
|
12297
12320
|
AutoComplete.prototype.searchLists = function (e) {
|
|
12298
12321
|
this.isTyped = true;
|
|
12299
12322
|
this.isDataFetched = this.isSelectCustom = false;
|
|
@@ -12319,28 +12342,6 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
|
|
|
12319
12342
|
this.performFiltering(e);
|
|
12320
12343
|
}
|
|
12321
12344
|
};
|
|
12322
|
-
AutoComplete.prototype.performFiltering = function (e) {
|
|
12323
|
-
var _this_1 = this;
|
|
12324
|
-
var eventArgs = {
|
|
12325
|
-
preventDefaultAction: false,
|
|
12326
|
-
text: this.filterInput.value,
|
|
12327
|
-
updateData: function (dataSource, query, fields) {
|
|
12328
|
-
if (eventArgs.cancel) {
|
|
12329
|
-
return;
|
|
12330
|
-
}
|
|
12331
|
-
_this_1.isFiltered = true;
|
|
12332
|
-
_this_1.customFilterQuery = query;
|
|
12333
|
-
_this_1.filterAction(dataSource, query, fields);
|
|
12334
|
-
},
|
|
12335
|
-
cancel: false
|
|
12336
|
-
};
|
|
12337
|
-
this.trigger('filtering', eventArgs, function (eventArgs) {
|
|
12338
|
-
if (!eventArgs.cancel && !_this_1.isFiltered && !eventArgs.preventDefaultAction) {
|
|
12339
|
-
_this_1.searchList = true;
|
|
12340
|
-
_this_1.filterAction(_this_1.dataSource, null, _this_1.fields, e);
|
|
12341
|
-
}
|
|
12342
|
-
});
|
|
12343
|
-
};
|
|
12344
12345
|
/**
|
|
12345
12346
|
* To filter the data from given data source by using query
|
|
12346
12347
|
*
|
|
@@ -13372,7 +13373,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13372
13373
|
if (this.mode === 'CheckBox' && this.allowFiltering) {
|
|
13373
13374
|
this.notify('targetElement', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
13374
13375
|
}
|
|
13375
|
-
return this.targetInputElement.value;
|
|
13376
|
+
return this.targetInputElement ? this.targetInputElement.value : null;
|
|
13376
13377
|
};
|
|
13377
13378
|
MultiSelect.prototype.getForQuery = function (valuecheck, isCheckbox) {
|
|
13378
13379
|
var predicate;
|
|
@@ -22802,9 +22803,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
22802
22803
|
* @private
|
|
22803
22804
|
*/
|
|
22804
22805
|
function Mention(options, element) {
|
|
22805
|
-
|
|
22806
|
-
_this.debounceTimer = null;
|
|
22807
|
-
return _this;
|
|
22806
|
+
return _super.call(this, options, element) || this;
|
|
22808
22807
|
}
|
|
22809
22808
|
/**
|
|
22810
22809
|
* When property value changes happened, then onPropertyChanged method will execute the respective changes in this component.
|
|
@@ -23134,12 +23133,16 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
23134
23133
|
var isValid = currentRange && mentionRegex.test(currentRange) ? false : true;
|
|
23135
23134
|
var lastWordRange = this.getLastLetter(currentRange);
|
|
23136
23135
|
var previousChar = currentRange ? currentRange.charAt(Math.max(0, currentRange.indexOf(this.mentionChar) - 1)) : '';
|
|
23137
|
-
if (
|
|
23138
|
-
|
|
23139
|
-
|
|
23140
|
-
|
|
23141
|
-
|
|
23142
|
-
|
|
23136
|
+
if (!this.allowSpaces) {
|
|
23137
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23138
|
+
if (isValid && currentRange && currentRange.includes(this.mentionChar) && currentRange.split(this.mentionChar).pop() !== ''
|
|
23139
|
+
&& (!this.requireLeadingSpace || (this.requireLeadingSpace && (previousChar === ' ' || currentRange.indexOf(this.mentionChar) === 0)))) {
|
|
23140
|
+
lastWordRange = this.mentionChar + currentRange.split(this.mentionChar).pop();
|
|
23141
|
+
}
|
|
23142
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23143
|
+
if (!this.requireLeadingSpace && lastWordRange && lastWordRange.includes(this.mentionChar)) {
|
|
23144
|
+
lastWordRange = this.mentionChar + lastWordRange.split(this.mentionChar).pop();
|
|
23145
|
+
}
|
|
23143
23146
|
}
|
|
23144
23147
|
var lastTwoLetters = this.mentionChar.toString() + this.mentionChar.toString();
|
|
23145
23148
|
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
@@ -23152,7 +23155,8 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
23152
23155
|
this.hidePopup();
|
|
23153
23156
|
return;
|
|
23154
23157
|
}
|
|
23155
|
-
|
|
23158
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23159
|
+
if (((!currentRange || !lastWordRange) || (!lastWordRange.includes(this.mentionChar) && !this.requireLeadingSpace && !this.allowSpaces)) || e.code === 'Enter' || e.keyCode === 27 ||
|
|
23156
23160
|
(lastWordRange.match(Regex) && lastWordRange.match(Regex).length > 1) ||
|
|
23157
23161
|
(this.isContentEditable(this.inputElement) && this.range.startContainer &&
|
|
23158
23162
|
this.range.startContainer.previousElementSibling && this.range.startContainer.previousElementSibling.tagName !== 'BR' && this.range.startContainer.textContent.split('').length > 0 &&
|