@syncfusion/ej2-dropdowns 22.2.5 → 22.2.8
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 +20 -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 +4 -14
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +20 -30
- 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 +9 -9
- package/src/drop-down-list/drop-down-list.js +18 -21
- package/src/multi-select/multi-select.js +2 -9
- package/.eslintrc.json +0 -260
- package/tslint.json +0 -111
|
@@ -3213,20 +3213,20 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3213
3213
|
var args = { cancel: false };
|
|
3214
3214
|
this.trigger('beforeOpen', args, function (args) {
|
|
3215
3215
|
if (!args.cancel) {
|
|
3216
|
-
var
|
|
3216
|
+
var popupEle = _this.createElement('div', {
|
|
3217
3217
|
id: _this.element.id + '_popup', className: 'e-ddl e-popup ' + (_this.cssClass !== null ? _this.cssClass : '')
|
|
3218
3218
|
});
|
|
3219
|
-
var searchBox = _this.setSearchBox(
|
|
3219
|
+
var searchBox = _this.setSearchBox(popupEle);
|
|
3220
3220
|
_this.listHeight = formatUnit(_this.popupHeight);
|
|
3221
3221
|
if (_this.headerTemplate) {
|
|
3222
|
-
_this.setHeaderTemplate(
|
|
3222
|
+
_this.setHeaderTemplate(popupEle);
|
|
3223
3223
|
}
|
|
3224
|
-
append([_this.list],
|
|
3224
|
+
append([_this.list], popupEle);
|
|
3225
3225
|
if (_this.footerTemplate) {
|
|
3226
|
-
_this.setFooterTemplate(
|
|
3226
|
+
_this.setFooterTemplate(popupEle);
|
|
3227
3227
|
}
|
|
3228
|
-
document.body.appendChild(
|
|
3229
|
-
|
|
3228
|
+
document.body.appendChild(popupEle);
|
|
3229
|
+
popupEle.style.visibility = 'hidden';
|
|
3230
3230
|
if (_this.popupHeight !== 'auto') {
|
|
3231
3231
|
_this.searchBoxHeight = 0;
|
|
3232
3232
|
if (!isNullOrUndefined(searchBox.container)) {
|
|
@@ -3234,20 +3234,20 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3234
3234
|
_this.listHeight = (parseInt(_this.listHeight, 10) - (_this.searchBoxHeight)).toString() + 'px';
|
|
3235
3235
|
}
|
|
3236
3236
|
if (_this.headerTemplate) {
|
|
3237
|
-
_this.header = _this.header ? _this.header :
|
|
3237
|
+
_this.header = _this.header ? _this.header : popupEle.querySelector('.e-ddl-header');
|
|
3238
3238
|
var height = Math.round(_this.header.getBoundingClientRect().height);
|
|
3239
3239
|
_this.listHeight = (parseInt(_this.listHeight, 10) - (height + _this.searchBoxHeight)).toString() + 'px';
|
|
3240
3240
|
}
|
|
3241
3241
|
if (_this.footerTemplate) {
|
|
3242
|
-
_this.footer = _this.footer ? _this.footer :
|
|
3242
|
+
_this.footer = _this.footer ? _this.footer : popupEle.querySelector('.e-ddl-footer');
|
|
3243
3243
|
var height = Math.round(_this.footer.getBoundingClientRect().height);
|
|
3244
3244
|
_this.listHeight = (parseInt(_this.listHeight, 10) - (height + _this.searchBoxHeight)).toString() + 'px';
|
|
3245
3245
|
}
|
|
3246
3246
|
_this.list.style.maxHeight = (parseInt(_this.listHeight, 10) - 2).toString() + 'px'; // due to box-sizing property
|
|
3247
|
-
|
|
3247
|
+
popupEle.style.maxHeight = formatUnit(_this.popupHeight);
|
|
3248
3248
|
}
|
|
3249
3249
|
else {
|
|
3250
|
-
|
|
3250
|
+
popupEle.style.height = 'auto';
|
|
3251
3251
|
}
|
|
3252
3252
|
var offsetValue = 0;
|
|
3253
3253
|
var left = void 0;
|
|
@@ -3259,7 +3259,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3259
3259
|
}
|
|
3260
3260
|
if (Browser.isDevice && (!_this.allowFiltering && (_this.getModuleName() === 'dropdownlist' ||
|
|
3261
3261
|
(_this.isDropDownClick && _this.getModuleName() === 'combobox')))) {
|
|
3262
|
-
offsetValue = _this.getOffsetValue(
|
|
3262
|
+
offsetValue = _this.getOffsetValue(popupEle);
|
|
3263
3263
|
var firstItem = _this.isEmptyList() ? _this.list : _this.liCollections[0];
|
|
3264
3264
|
if (!isNullOrUndefined(_this.inputElement)) {
|
|
3265
3265
|
left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) -
|
|
@@ -3268,9 +3268,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3268
3268
|
}
|
|
3269
3269
|
}
|
|
3270
3270
|
_this.getFocusElement();
|
|
3271
|
-
_this.createPopup(
|
|
3272
|
-
_this.checkCollision(
|
|
3273
|
-
var popupLeft_1 = _this.enableRtl ? parseFloat(popupEle_1.style.left) - (_this.ulElement.parentElement.offsetWidth - _this.inputWrapper.container.offsetWidth) : 0;
|
|
3271
|
+
_this.createPopup(popupEle, offsetValue, left);
|
|
3272
|
+
_this.checkCollision(popupEle);
|
|
3274
3273
|
if (Browser.isDevice) {
|
|
3275
3274
|
_this.popupObj.element.classList.add(dropDownListClasses.device);
|
|
3276
3275
|
if (_this.getModuleName() === 'dropdownlist' || (_this.getModuleName() === 'combobox'
|
|
@@ -3290,8 +3289,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3290
3289
|
EventHandler.add(_this.clearIconElement, 'click', _this.clearText, _this);
|
|
3291
3290
|
}
|
|
3292
3291
|
}
|
|
3293
|
-
|
|
3294
|
-
addClass([
|
|
3292
|
+
popupEle.style.visibility = 'visible';
|
|
3293
|
+
addClass([popupEle], 'e-popup-close');
|
|
3295
3294
|
var scrollParentElements = _this.popupObj.getScrollableParent(_this.inputWrapper.container);
|
|
3296
3295
|
for (var _i = 0, scrollParentElements_1 = scrollParentElements; _i < scrollParentElements_1.length; _i++) {
|
|
3297
3296
|
var element = scrollParentElements_1[_i];
|
|
@@ -3324,9 +3323,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3324
3323
|
_this.beforePopupOpen = false;
|
|
3325
3324
|
_this.destroyPopup();
|
|
3326
3325
|
}
|
|
3327
|
-
if (_this.enableRtl && popupLeft_1 > 0) {
|
|
3328
|
-
popupEle_1.style.left = popupLeft_1 + "px";
|
|
3329
|
-
}
|
|
3330
3326
|
});
|
|
3331
3327
|
}
|
|
3332
3328
|
else {
|
|
@@ -3354,7 +3350,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3354
3350
|
this.popupObj = new Popup(element, {
|
|
3355
3351
|
width: this.setWidth(), targetType: 'relative',
|
|
3356
3352
|
relateTo: this.inputWrapper.container, collision: { X: 'flip', Y: 'flip' }, offsetY: offsetValue,
|
|
3357
|
-
enableRtl: this.enableRtl, offsetX: left,
|
|
3353
|
+
enableRtl: this.enableRtl, offsetX: left,
|
|
3354
|
+
position: this.enableRtl ? { X: 'right', Y: 'bottom' } : { X: 'left', Y: 'bottom' },
|
|
3358
3355
|
zIndex: this.zIndex,
|
|
3359
3356
|
close: function () {
|
|
3360
3357
|
if (!_this.isDocumentClick) {
|
|
@@ -9410,9 +9407,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9410
9407
|
if (_this.isFirstClick) {
|
|
9411
9408
|
_this.loadTemplate();
|
|
9412
9409
|
}
|
|
9413
|
-
if (_this.enableRtl) {
|
|
9414
|
-
_this.popupWrapper.style.visibility = 'hidden';
|
|
9415
|
-
}
|
|
9416
9410
|
}
|
|
9417
9411
|
});
|
|
9418
9412
|
};
|
|
@@ -11265,7 +11259,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11265
11259
|
this.list.style.maxHeight = formatUnit(this.popupHeight);
|
|
11266
11260
|
}
|
|
11267
11261
|
this.popupObj = new Popup(this.popupWrapper, {
|
|
11268
|
-
width: this.calcPopupWidth(), targetType: 'relative',
|
|
11262
|
+
width: this.calcPopupWidth(), targetType: 'relative',
|
|
11263
|
+
position: this.enableRtl ? { X: 'right', Y: 'bottom' } : { X: 'left', Y: 'bottom' },
|
|
11269
11264
|
relateTo: this.overAllWrapper, collision: { X: 'flip', Y: 'flip' }, offsetY: 1,
|
|
11270
11265
|
enableRtl: this.enableRtl, zIndex: this.zIndex,
|
|
11271
11266
|
close: function () {
|
|
@@ -11281,11 +11276,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11281
11276
|
},
|
|
11282
11277
|
open: function () {
|
|
11283
11278
|
_this.popupObj.resolveCollision();
|
|
11284
|
-
if (_this.enableRtl) {
|
|
11285
|
-
var popupLeft = parseFloat(_this.popupWrapper.style.left) - (_this.popupWrapper.offsetWidth - _this.overAllWrapper.offsetWidth);
|
|
11286
|
-
_this.popupWrapper.style.left = popupLeft > 0 ? popupLeft + "px" : _this.popupWrapper.style.left;
|
|
11287
|
-
_this.popupWrapper.style.visibility = 'hidden';
|
|
11288
|
-
}
|
|
11289
11279
|
if (!_this.isFirstClick) {
|
|
11290
11280
|
var ulElement = _this.list.querySelector('ul');
|
|
11291
11281
|
if (ulElement) {
|