@syncfusion/ej2-dropdowns 22.2.5 → 22.2.9
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 +30 -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 +66 -64
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +82 -80
- 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 +10 -10
- package/src/combo-box/combo-box.js +2 -1
- package/src/drop-down-base/drop-down-base.d.ts +1 -0
- package/src/drop-down-base/drop-down-base.js +54 -47
- package/src/drop-down-list/drop-down-list.js +24 -23
- package/src/multi-select/multi-select.js +2 -9
- package/.eslintrc.json +0 -260
- package/tslint.json +0 -111
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 22.2.
|
|
3
|
+
* version : 22.2.9
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-dropdowns@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-dropdowns@22.
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@22.2.8",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-hqHfCzh6fnrcpqCTPy9dL3EjdIuqsaklD4YP+rBRcqQNi4CWDJCZYzxXNPXl7lNyMKFFz6Sjrr8eoF6DHOsQxA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"/@syncfusion/ej2-spreadsheet",
|
|
35
35
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
36
36
|
],
|
|
37
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-22.
|
|
38
|
-
"_shasum": "
|
|
37
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-22.2.8.tgz",
|
|
38
|
+
"_shasum": "b6f13090710d0c2c6b0d7d9de58fb019c52c0b46",
|
|
39
39
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
40
40
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
41
41
|
"author": {
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
},
|
|
44
44
|
"bundleDependencies": false,
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@syncfusion/ej2-base": "~22.2.
|
|
46
|
+
"@syncfusion/ej2-base": "~22.2.9",
|
|
47
47
|
"@syncfusion/ej2-data": "~22.2.5",
|
|
48
|
-
"@syncfusion/ej2-inputs": "~22.2.
|
|
49
|
-
"@syncfusion/ej2-lists": "~22.2.
|
|
50
|
-
"@syncfusion/ej2-navigations": "~22.2.
|
|
51
|
-
"@syncfusion/ej2-popups": "~22.2.
|
|
48
|
+
"@syncfusion/ej2-inputs": "~22.2.9",
|
|
49
|
+
"@syncfusion/ej2-lists": "~22.2.9",
|
|
50
|
+
"@syncfusion/ej2-navigations": "~22.2.8",
|
|
51
|
+
"@syncfusion/ej2-popups": "~22.2.9"
|
|
52
52
|
},
|
|
53
53
|
"deprecated": false,
|
|
54
54
|
"description": "Essential JS 2 DropDown Components",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"module": "./index.js",
|
|
74
74
|
"name": "@syncfusion/ej2-dropdowns",
|
|
75
75
|
"typings": "index.d.ts",
|
|
76
|
-
"version": "22.2.
|
|
76
|
+
"version": "22.2.9",
|
|
77
77
|
"sideEffects": false,
|
|
78
78
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
79
79
|
}
|
|
@@ -210,7 +210,8 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
210
210
|
};
|
|
211
211
|
ComboBox.prototype.setSearchBox = function () {
|
|
212
212
|
this.filterInput = this.inputElement;
|
|
213
|
-
|
|
213
|
+
var searchBoxContainer = (this.isFiltering() || (this.isReact && this.getModuleName() === 'combobox')) ? this.inputWrapper : inputObject;
|
|
214
|
+
return searchBoxContainer;
|
|
214
215
|
};
|
|
215
216
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
216
217
|
ComboBox.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {
|
|
@@ -217,6 +217,7 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
|
|
|
217
217
|
protected isDynamicDataChange: boolean;
|
|
218
218
|
protected addedNewItem: boolean;
|
|
219
219
|
protected isAddNewItemTemplate: boolean;
|
|
220
|
+
private isRequesting;
|
|
220
221
|
/**
|
|
221
222
|
* The `fields` property maps the columns of the data table and binds the data to the component.
|
|
222
223
|
* * text - Maps the text column from data table for each list item.
|
|
@@ -90,6 +90,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
90
90
|
_this.isDynamicDataChange = false;
|
|
91
91
|
_this.addedNewItem = false;
|
|
92
92
|
_this.isAddNewItemTemplate = false;
|
|
93
|
+
_this.isRequesting = false;
|
|
93
94
|
return _this;
|
|
94
95
|
}
|
|
95
96
|
DropDownBase.prototype.getPropObject = function (prop, newProp, oldProp) {
|
|
@@ -473,61 +474,67 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
473
474
|
this.isActive = true;
|
|
474
475
|
var eventArgs = { cancel: false, data: dataSource, query: query };
|
|
475
476
|
this.isPreventChange = this.isAngular && this.preventChange ? true : this.isPreventChange;
|
|
476
|
-
this.
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
_this.
|
|
481
|
-
if (
|
|
482
|
-
_this.
|
|
483
|
-
|
|
477
|
+
if (!this.isRequesting) {
|
|
478
|
+
this.trigger('actionBegin', eventArgs, function (eventArgs) {
|
|
479
|
+
if (!eventArgs.cancel) {
|
|
480
|
+
_this.isRequesting = true;
|
|
481
|
+
_this.showSpinner();
|
|
482
|
+
if (dataSource instanceof DataManager) {
|
|
483
|
+
_this.isRequested = true;
|
|
484
|
+
if (_this.isDataFetched) {
|
|
485
|
+
_this.emptyDataRequest(fields);
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
eventArgs.data.executeQuery(_this.getQuery(eventArgs.query)).then(function (e) {
|
|
489
|
+
_this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
|
|
490
|
+
_this.trigger('actionComplete', e, function (e) {
|
|
491
|
+
if (!e.cancel) {
|
|
492
|
+
_this.isRequesting = false;
|
|
493
|
+
var listItems = e.result;
|
|
494
|
+
if (listItems.length === 0) {
|
|
495
|
+
_this.isDataFetched = true;
|
|
496
|
+
}
|
|
497
|
+
ulElement = _this.renderItems(listItems, fields);
|
|
498
|
+
_this.onActionComplete(ulElement, listItems, e);
|
|
499
|
+
if (_this.groupTemplate) {
|
|
500
|
+
_this.renderGroupTemplate(ulElement);
|
|
501
|
+
}
|
|
502
|
+
_this.isRequested = false;
|
|
503
|
+
_this.bindChildItems(listItems, ulElement, fields, e);
|
|
504
|
+
}
|
|
505
|
+
});
|
|
506
|
+
}).catch(function (e) {
|
|
507
|
+
_this.isRequested = false;
|
|
508
|
+
_this.isRequesting = false;
|
|
509
|
+
_this.onActionFailure(e);
|
|
510
|
+
_this.hideSpinner();
|
|
511
|
+
});
|
|
484
512
|
}
|
|
485
|
-
|
|
513
|
+
else {
|
|
514
|
+
var dataManager = new DataManager(eventArgs.data);
|
|
515
|
+
var listItems = (_this.getQuery(eventArgs.query)).executeLocal(dataManager);
|
|
516
|
+
var localDataArgs = { cancel: false, result: listItems };
|
|
486
517
|
_this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
|
|
487
|
-
_this.trigger('actionComplete',
|
|
488
|
-
if (!
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
}
|
|
493
|
-
ulElement = _this.renderItems(listItems, fields);
|
|
494
|
-
_this.onActionComplete(ulElement, listItems, e);
|
|
518
|
+
_this.trigger('actionComplete', localDataArgs, function (localDataArgs) {
|
|
519
|
+
if (!localDataArgs.cancel) {
|
|
520
|
+
_this.isRequesting = false;
|
|
521
|
+
ulElement = _this.renderItems(localDataArgs.result, fields);
|
|
522
|
+
_this.onActionComplete(ulElement, localDataArgs.result, event);
|
|
495
523
|
if (_this.groupTemplate) {
|
|
496
524
|
_this.renderGroupTemplate(ulElement);
|
|
497
525
|
}
|
|
498
|
-
_this.
|
|
499
|
-
|
|
526
|
+
_this.bindChildItems(localDataArgs.result, ulElement, fields);
|
|
527
|
+
setTimeout(function () {
|
|
528
|
+
if (_this.getModuleName() === 'multiselect' && _this.itemTemplate != null && (ulElement.childElementCount > 0 && (ulElement.children[0].childElementCount > 0 || (_this.fields.groupBy && ulElement.children[1] && ulElement.children[1].childElementCount > 0)))) {
|
|
529
|
+
_this.updateDataList();
|
|
530
|
+
}
|
|
531
|
+
});
|
|
500
532
|
}
|
|
501
533
|
});
|
|
502
|
-
}
|
|
503
|
-
_this.isRequested = false;
|
|
504
|
-
_this.onActionFailure(e);
|
|
505
|
-
_this.hideSpinner();
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
else {
|
|
509
|
-
var dataManager = new DataManager(eventArgs.data);
|
|
510
|
-
var listItems = (_this.getQuery(eventArgs.query)).executeLocal(dataManager);
|
|
511
|
-
var localDataArgs = { cancel: false, result: listItems };
|
|
512
|
-
_this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
|
|
513
|
-
_this.trigger('actionComplete', localDataArgs, function (localDataArgs) {
|
|
514
|
-
if (!localDataArgs.cancel) {
|
|
515
|
-
ulElement = _this.renderItems(localDataArgs.result, fields);
|
|
516
|
-
_this.onActionComplete(ulElement, localDataArgs.result, event);
|
|
517
|
-
if (_this.groupTemplate) {
|
|
518
|
-
_this.renderGroupTemplate(ulElement);
|
|
519
|
-
}
|
|
520
|
-
_this.bindChildItems(localDataArgs.result, ulElement, fields);
|
|
521
|
-
setTimeout(function () {
|
|
522
|
-
if (_this.getModuleName() === 'multiselect' && _this.itemTemplate != null && (ulElement.childElementCount > 0 && (ulElement.children[0].childElementCount > 0 || (_this.fields.groupBy && ulElement.children[1] && ulElement.children[1].childElementCount > 0)))) {
|
|
523
|
-
_this.updateDataList();
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
});
|
|
534
|
+
}
|
|
528
535
|
}
|
|
529
|
-
}
|
|
530
|
-
}
|
|
536
|
+
});
|
|
537
|
+
}
|
|
531
538
|
};
|
|
532
539
|
DropDownBase.prototype.bindChildItems = function (listItems, ulElement, fields, e) {
|
|
533
540
|
var _this = this;
|
|
@@ -1513,7 +1513,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1513
1513
|
this.isNotSearchList = false;
|
|
1514
1514
|
return;
|
|
1515
1515
|
}
|
|
1516
|
-
if (this.isActive) {
|
|
1516
|
+
if (this.isActive || !isNullOrUndefined(ulElement)) {
|
|
1517
1517
|
var selectedItem = this.selectedLI ? this.selectedLI.cloneNode(true) : null;
|
|
1518
1518
|
_super.prototype.onActionComplete.call(this, ulElement, list, e);
|
|
1519
1519
|
this.updateSelectElementData(this.allowFiltering);
|
|
@@ -1677,20 +1677,20 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1677
1677
|
var args = { cancel: false };
|
|
1678
1678
|
this.trigger('beforeOpen', args, function (args) {
|
|
1679
1679
|
if (!args.cancel) {
|
|
1680
|
-
var
|
|
1680
|
+
var popupEle = _this.createElement('div', {
|
|
1681
1681
|
id: _this.element.id + '_popup', className: 'e-ddl e-popup ' + (_this.cssClass !== null ? _this.cssClass : '')
|
|
1682
1682
|
});
|
|
1683
|
-
var searchBox = _this.setSearchBox(
|
|
1683
|
+
var searchBox = _this.setSearchBox(popupEle);
|
|
1684
1684
|
_this.listHeight = formatUnit(_this.popupHeight);
|
|
1685
1685
|
if (_this.headerTemplate) {
|
|
1686
|
-
_this.setHeaderTemplate(
|
|
1686
|
+
_this.setHeaderTemplate(popupEle);
|
|
1687
1687
|
}
|
|
1688
|
-
append([_this.list],
|
|
1688
|
+
append([_this.list], popupEle);
|
|
1689
1689
|
if (_this.footerTemplate) {
|
|
1690
|
-
_this.setFooterTemplate(
|
|
1690
|
+
_this.setFooterTemplate(popupEle);
|
|
1691
1691
|
}
|
|
1692
|
-
document.body.appendChild(
|
|
1693
|
-
|
|
1692
|
+
document.body.appendChild(popupEle);
|
|
1693
|
+
popupEle.style.visibility = 'hidden';
|
|
1694
1694
|
if (_this.popupHeight !== 'auto') {
|
|
1695
1695
|
_this.searchBoxHeight = 0;
|
|
1696
1696
|
if (!isNullOrUndefined(searchBox.container)) {
|
|
@@ -1698,20 +1698,20 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1698
1698
|
_this.listHeight = (parseInt(_this.listHeight, 10) - (_this.searchBoxHeight)).toString() + 'px';
|
|
1699
1699
|
}
|
|
1700
1700
|
if (_this.headerTemplate) {
|
|
1701
|
-
_this.header = _this.header ? _this.header :
|
|
1701
|
+
_this.header = _this.header ? _this.header : popupEle.querySelector('.e-ddl-header');
|
|
1702
1702
|
var height = Math.round(_this.header.getBoundingClientRect().height);
|
|
1703
1703
|
_this.listHeight = (parseInt(_this.listHeight, 10) - (height + _this.searchBoxHeight)).toString() + 'px';
|
|
1704
1704
|
}
|
|
1705
1705
|
if (_this.footerTemplate) {
|
|
1706
|
-
_this.footer = _this.footer ? _this.footer :
|
|
1706
|
+
_this.footer = _this.footer ? _this.footer : popupEle.querySelector('.e-ddl-footer');
|
|
1707
1707
|
var height = Math.round(_this.footer.getBoundingClientRect().height);
|
|
1708
1708
|
_this.listHeight = (parseInt(_this.listHeight, 10) - (height + _this.searchBoxHeight)).toString() + 'px';
|
|
1709
1709
|
}
|
|
1710
1710
|
_this.list.style.maxHeight = (parseInt(_this.listHeight, 10) - 2).toString() + 'px'; // due to box-sizing property
|
|
1711
|
-
|
|
1711
|
+
popupEle.style.maxHeight = formatUnit(_this.popupHeight);
|
|
1712
1712
|
}
|
|
1713
1713
|
else {
|
|
1714
|
-
|
|
1714
|
+
popupEle.style.height = 'auto';
|
|
1715
1715
|
}
|
|
1716
1716
|
var offsetValue = 0;
|
|
1717
1717
|
var left = void 0;
|
|
@@ -1723,7 +1723,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1723
1723
|
}
|
|
1724
1724
|
if (Browser.isDevice && (!_this.allowFiltering && (_this.getModuleName() === 'dropdownlist' ||
|
|
1725
1725
|
(_this.isDropDownClick && _this.getModuleName() === 'combobox')))) {
|
|
1726
|
-
offsetValue = _this.getOffsetValue(
|
|
1726
|
+
offsetValue = _this.getOffsetValue(popupEle);
|
|
1727
1727
|
var firstItem = _this.isEmptyList() ? _this.list : _this.liCollections[0];
|
|
1728
1728
|
if (!isNullOrUndefined(_this.inputElement)) {
|
|
1729
1729
|
left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) -
|
|
@@ -1732,9 +1732,8 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
1734
|
_this.getFocusElement();
|
|
1735
|
-
_this.createPopup(
|
|
1736
|
-
_this.checkCollision(
|
|
1737
|
-
var popupLeft_1 = _this.enableRtl ? parseFloat(popupEle_1.style.left) - (_this.ulElement.parentElement.offsetWidth - _this.inputWrapper.container.offsetWidth) : 0;
|
|
1735
|
+
_this.createPopup(popupEle, offsetValue, left);
|
|
1736
|
+
_this.checkCollision(popupEle);
|
|
1738
1737
|
if (Browser.isDevice) {
|
|
1739
1738
|
_this.popupObj.element.classList.add(dropDownListClasses.device);
|
|
1740
1739
|
if (_this.getModuleName() === 'dropdownlist' || (_this.getModuleName() === 'combobox'
|
|
@@ -1754,8 +1753,8 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1754
1753
|
EventHandler.add(_this.clearIconElement, 'click', _this.clearText, _this);
|
|
1755
1754
|
}
|
|
1756
1755
|
}
|
|
1757
|
-
|
|
1758
|
-
addClass([
|
|
1756
|
+
popupEle.style.visibility = 'visible';
|
|
1757
|
+
addClass([popupEle], 'e-popup-close');
|
|
1759
1758
|
var scrollParentElements = _this.popupObj.getScrollableParent(_this.inputWrapper.container);
|
|
1760
1759
|
for (var _i = 0, scrollParentElements_1 = scrollParentElements; _i < scrollParentElements_1.length; _i++) {
|
|
1761
1760
|
var element = scrollParentElements_1[_i];
|
|
@@ -1788,9 +1787,6 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1788
1787
|
_this.beforePopupOpen = false;
|
|
1789
1788
|
_this.destroyPopup();
|
|
1790
1789
|
}
|
|
1791
|
-
if (_this.enableRtl && popupLeft_1 > 0) {
|
|
1792
|
-
popupEle_1.style.left = popupLeft_1 + "px";
|
|
1793
|
-
}
|
|
1794
1790
|
});
|
|
1795
1791
|
}
|
|
1796
1792
|
else {
|
|
@@ -1818,7 +1814,8 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1818
1814
|
this.popupObj = new Popup(element, {
|
|
1819
1815
|
width: this.setWidth(), targetType: 'relative',
|
|
1820
1816
|
relateTo: this.inputWrapper.container, collision: { X: 'flip', Y: 'flip' }, offsetY: offsetValue,
|
|
1821
|
-
enableRtl: this.enableRtl, offsetX: left,
|
|
1817
|
+
enableRtl: this.enableRtl, offsetX: left,
|
|
1818
|
+
position: this.enableRtl ? { X: 'right', Y: 'bottom' } : { X: 'left', Y: 'bottom' },
|
|
1822
1819
|
zIndex: this.zIndex,
|
|
1823
1820
|
close: function () {
|
|
1824
1821
|
if (!_this.isDocumentClick) {
|
|
@@ -2229,7 +2226,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2229
2226
|
DropDownList.prototype.setFooterTemplate = function (popupEle) {
|
|
2230
2227
|
var compiledString;
|
|
2231
2228
|
if (this.footer) {
|
|
2232
|
-
if (this.isReact) {
|
|
2229
|
+
if (this.isReact && typeof this.footerTemplate === 'function') {
|
|
2233
2230
|
this.clearTemplate(['footerTemplate']);
|
|
2234
2231
|
}
|
|
2235
2232
|
else {
|
|
@@ -2315,6 +2312,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2315
2312
|
if (this.allowFiltering && newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource))) {
|
|
2316
2313
|
this.actionCompleteData = { ulElement: null, list: null, isUpdated: false };
|
|
2317
2314
|
this.actionData = this.actionCompleteData;
|
|
2315
|
+
this.itemData = null;
|
|
2318
2316
|
}
|
|
2319
2317
|
else if (this.allowFiltering && newProp.query && !isNullOrUndefined(Object.keys(newProp.query))) {
|
|
2320
2318
|
this.actionCompleteData = this.getModuleName() === 'combobox' ?
|
|
@@ -2822,6 +2820,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2822
2820
|
if (this.inputElement && !isNullOrUndefined(this.inputElement.onchange)) {
|
|
2823
2821
|
this.inputElement.onchange = null;
|
|
2824
2822
|
}
|
|
2823
|
+
if (this.isAngular) {
|
|
2824
|
+
this.inputElement = null;
|
|
2825
|
+
}
|
|
2825
2826
|
_super.prototype.destroy.call(this);
|
|
2826
2827
|
};
|
|
2827
2828
|
/* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
|
|
@@ -264,9 +264,6 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
264
264
|
if (_this.isFirstClick) {
|
|
265
265
|
_this.loadTemplate();
|
|
266
266
|
}
|
|
267
|
-
if (_this.enableRtl) {
|
|
268
|
-
_this.popupWrapper.style.visibility = 'hidden';
|
|
269
|
-
}
|
|
270
267
|
}
|
|
271
268
|
});
|
|
272
269
|
};
|
|
@@ -2119,7 +2116,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2119
2116
|
this.list.style.maxHeight = formatUnit(this.popupHeight);
|
|
2120
2117
|
}
|
|
2121
2118
|
this.popupObj = new Popup(this.popupWrapper, {
|
|
2122
|
-
width: this.calcPopupWidth(), targetType: 'relative',
|
|
2119
|
+
width: this.calcPopupWidth(), targetType: 'relative',
|
|
2120
|
+
position: this.enableRtl ? { X: 'right', Y: 'bottom' } : { X: 'left', Y: 'bottom' },
|
|
2123
2121
|
relateTo: this.overAllWrapper, collision: { X: 'flip', Y: 'flip' }, offsetY: 1,
|
|
2124
2122
|
enableRtl: this.enableRtl, zIndex: this.zIndex,
|
|
2125
2123
|
close: function () {
|
|
@@ -2135,11 +2133,6 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2135
2133
|
},
|
|
2136
2134
|
open: function () {
|
|
2137
2135
|
_this.popupObj.resolveCollision();
|
|
2138
|
-
if (_this.enableRtl) {
|
|
2139
|
-
var popupLeft = parseFloat(_this.popupWrapper.style.left) - (_this.popupWrapper.offsetWidth - _this.overAllWrapper.offsetWidth);
|
|
2140
|
-
_this.popupWrapper.style.left = popupLeft > 0 ? popupLeft + "px" : _this.popupWrapper.style.left;
|
|
2141
|
-
_this.popupWrapper.style.visibility = 'hidden';
|
|
2142
|
-
}
|
|
2143
2136
|
if (!_this.isFirstClick) {
|
|
2144
2137
|
var ulElement = _this.list.querySelector('ul');
|
|
2145
2138
|
if (ulElement) {
|
package/.eslintrc.json
DELETED
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"browser": true,
|
|
4
|
-
"es2021": true
|
|
5
|
-
},
|
|
6
|
-
"extends": [
|
|
7
|
-
"eslint:recommended",
|
|
8
|
-
"plugin:@typescript-eslint/recommended",
|
|
9
|
-
"plugin:jsdoc/recommended",
|
|
10
|
-
"plugin:security/recommended"
|
|
11
|
-
],
|
|
12
|
-
"parser": "@typescript-eslint/parser",
|
|
13
|
-
"parserOptions": {
|
|
14
|
-
"ecmaFeatures": { "js": true },
|
|
15
|
-
"ecmaVersion": 2018,
|
|
16
|
-
"project": "./tsconfig.json",
|
|
17
|
-
"sourceType": "module"
|
|
18
|
-
},
|
|
19
|
-
"plugins": [
|
|
20
|
-
"@typescript-eslint",
|
|
21
|
-
"@typescript-eslint/tslint",
|
|
22
|
-
"eslint-plugin-security",
|
|
23
|
-
"jsdoc"
|
|
24
|
-
],
|
|
25
|
-
"rules": {
|
|
26
|
-
"use-isnan": "error",
|
|
27
|
-
"security/detect-unsafe-regex":"error",
|
|
28
|
-
"security/detect-buffer-noassert":"error",
|
|
29
|
-
"security/detect-child-process":"error",
|
|
30
|
-
"security/detect-disable-mustache-escape":"error",
|
|
31
|
-
"security/detect-eval-with-expression":"error",
|
|
32
|
-
"security/detect-no-csrf-before-method-override":"error",
|
|
33
|
-
"security/detect-non-literal-fs-filename":"error",
|
|
34
|
-
"security/detect-non-literal-regexp":"error",
|
|
35
|
-
"security/detect-non-literal-require":"error",
|
|
36
|
-
"security/detect-object-injection":"error",
|
|
37
|
-
"security/detect-possible-timing-attacks":"error",
|
|
38
|
-
"security/detect-pseudoRandomBytes":"error",
|
|
39
|
-
"security/detect-new-buffer":"error",
|
|
40
|
-
"security/detect-bidi-characters":"error",
|
|
41
|
-
"@typescript-eslint/no-inferrable-types": "off",
|
|
42
|
-
"@typescript-eslint/ban-types": ["warn", {
|
|
43
|
-
"types": {
|
|
44
|
-
"Object": false,
|
|
45
|
-
"object": false,
|
|
46
|
-
"{}": false,
|
|
47
|
-
"Function": false
|
|
48
|
-
}
|
|
49
|
-
}],
|
|
50
|
-
"jsdoc/check-tag-names": 0,
|
|
51
|
-
"@typescript-eslint/tslint/config": [
|
|
52
|
-
"error",
|
|
53
|
-
{
|
|
54
|
-
"rules": {
|
|
55
|
-
"ban": true,
|
|
56
|
-
"chai-vague-errors": true,
|
|
57
|
-
"max-func-body-length": [
|
|
58
|
-
true,
|
|
59
|
-
120,
|
|
60
|
-
{
|
|
61
|
-
"ignore-parameters-to-function-regex": "describe"
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
"missing-jsdoc": true,
|
|
65
|
-
"no-backbone-get-set-outside-model": false,
|
|
66
|
-
"no-cookies": false,
|
|
67
|
-
"no-delete-expression": false,
|
|
68
|
-
"no-disable-auto-sanitization": true,
|
|
69
|
-
"no-duplicate-case": true,
|
|
70
|
-
"no-duplicate-parameter-names": true,
|
|
71
|
-
"no-empty-interfaces": false,
|
|
72
|
-
"no-exec-script": true,
|
|
73
|
-
"no-function-expression": false,
|
|
74
|
-
"no-multiple-var-decl": false,
|
|
75
|
-
"no-string-based-set-immediate": false,
|
|
76
|
-
"no-string-based-set-interval": false,
|
|
77
|
-
"no-unnecessary-bind": false,
|
|
78
|
-
"no-unused-imports": true,
|
|
79
|
-
"no-with-statement": false,
|
|
80
|
-
"prefer-array-literal": false,
|
|
81
|
-
"typedef": [
|
|
82
|
-
true,
|
|
83
|
-
"call-signature",
|
|
84
|
-
"parameter",
|
|
85
|
-
"property-declaration",
|
|
86
|
-
"variable-declaration",
|
|
87
|
-
"arrow-parameter",
|
|
88
|
-
"member-variable-declaration"
|
|
89
|
-
],
|
|
90
|
-
"use-named-parameter": false,
|
|
91
|
-
"valid-typeof": true,
|
|
92
|
-
"whitespace": [
|
|
93
|
-
true,
|
|
94
|
-
"check-branch",
|
|
95
|
-
"check-decl",
|
|
96
|
-
"check-operator",
|
|
97
|
-
"check-separator",
|
|
98
|
-
"check-type"
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
],
|
|
103
|
-
"no-control-regex": "error",
|
|
104
|
-
"no-constant-condition": "error",
|
|
105
|
-
"no-invalid-regexp": "error",
|
|
106
|
-
"curly": "error",
|
|
107
|
-
"eol-last": [
|
|
108
|
-
"error",
|
|
109
|
-
"always"
|
|
110
|
-
],
|
|
111
|
-
"guard-for-in": "error",
|
|
112
|
-
"no-labels": "error",
|
|
113
|
-
"max-len": [
|
|
114
|
-
"error",
|
|
115
|
-
{
|
|
116
|
-
"code": 140,
|
|
117
|
-
"tabWidth": 4,
|
|
118
|
-
"ignoreComments": true,
|
|
119
|
-
"ignoreStrings": true,
|
|
120
|
-
"ignoreTemplateLiterals": true,
|
|
121
|
-
"ignoreRegExpLiterals": true
|
|
122
|
-
}
|
|
123
|
-
],
|
|
124
|
-
"no-console": [
|
|
125
|
-
"error",
|
|
126
|
-
{
|
|
127
|
-
"allow": [
|
|
128
|
-
"warn",
|
|
129
|
-
"dir",
|
|
130
|
-
"timeLog",
|
|
131
|
-
"assert",
|
|
132
|
-
"clear",
|
|
133
|
-
"count",
|
|
134
|
-
"countReset",
|
|
135
|
-
"group",
|
|
136
|
-
"groupEnd",
|
|
137
|
-
"table",
|
|
138
|
-
"dirxml",
|
|
139
|
-
"error",
|
|
140
|
-
"groupCollapsed",
|
|
141
|
-
"Console",
|
|
142
|
-
"profile",
|
|
143
|
-
"profileEnd",
|
|
144
|
-
"timeStamp",
|
|
145
|
-
"context"
|
|
146
|
-
]
|
|
147
|
-
}
|
|
148
|
-
],
|
|
149
|
-
"no-redeclare": [
|
|
150
|
-
"error",
|
|
151
|
-
{
|
|
152
|
-
"builtinGlobals": true
|
|
153
|
-
}
|
|
154
|
-
],
|
|
155
|
-
"@typescript-eslint/no-parameter-properties": "error",
|
|
156
|
-
"@typescript-eslint/indent": [
|
|
157
|
-
"error",
|
|
158
|
-
4,
|
|
159
|
-
{
|
|
160
|
-
"CallExpression": {
|
|
161
|
-
"arguments": "first"
|
|
162
|
-
},
|
|
163
|
-
"FunctionDeclaration": {
|
|
164
|
-
"parameters": "first"
|
|
165
|
-
},
|
|
166
|
-
"FunctionExpression": {
|
|
167
|
-
"parameters": "first"
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
"no-debugger": "error",
|
|
172
|
-
"no-eval": "error",
|
|
173
|
-
"no-extra-semi": "error",
|
|
174
|
-
"no-throw-literal": "error",
|
|
175
|
-
"no-fallthrough": "error",
|
|
176
|
-
"comma-dangle": [
|
|
177
|
-
"error",
|
|
178
|
-
"never"
|
|
179
|
-
],
|
|
180
|
-
"no-trailing-spaces": "error",
|
|
181
|
-
"@typescript-eslint/no-unused-expressions": "error",
|
|
182
|
-
"@typescript-eslint/no-var-requires": "error",
|
|
183
|
-
"one-var": [
|
|
184
|
-
"error",
|
|
185
|
-
"never"
|
|
186
|
-
],
|
|
187
|
-
"@typescript-eslint/no-explicit-any": "error",
|
|
188
|
-
"no-cond-assign": [
|
|
189
|
-
"error",
|
|
190
|
-
"always"
|
|
191
|
-
],
|
|
192
|
-
"@typescript-eslint/consistent-type-assertions": "off",
|
|
193
|
-
"jsdoc/check-alignment": "error",
|
|
194
|
-
"no-empty": "error",
|
|
195
|
-
"quotes": [
|
|
196
|
-
"error",
|
|
197
|
-
"single"
|
|
198
|
-
],
|
|
199
|
-
"semi": [
|
|
200
|
-
"error",
|
|
201
|
-
"always"
|
|
202
|
-
],
|
|
203
|
-
"eqeqeq": [
|
|
204
|
-
"error",
|
|
205
|
-
"smart"
|
|
206
|
-
],
|
|
207
|
-
"valid-typeof": [
|
|
208
|
-
"error",
|
|
209
|
-
{
|
|
210
|
-
"requireStringLiterals": true
|
|
211
|
-
}
|
|
212
|
-
],
|
|
213
|
-
"camelcase": [
|
|
214
|
-
"error",
|
|
215
|
-
{
|
|
216
|
-
"properties": "always",
|
|
217
|
-
"ignoreDestructuring": true,
|
|
218
|
-
"ignoreImports": true
|
|
219
|
-
}
|
|
220
|
-
],
|
|
221
|
-
"no-irregular-whitespace": [
|
|
222
|
-
"error",
|
|
223
|
-
{
|
|
224
|
-
"skipStrings": true,
|
|
225
|
-
"skipComments": true,
|
|
226
|
-
"skipRegExps": true,
|
|
227
|
-
"skipTemplates": true
|
|
228
|
-
}
|
|
229
|
-
],
|
|
230
|
-
"valid-jsdoc": [
|
|
231
|
-
"error",
|
|
232
|
-
{
|
|
233
|
-
"prefer": {
|
|
234
|
-
"arg": "param",
|
|
235
|
-
"argument": "param",
|
|
236
|
-
"class": "constructor",
|
|
237
|
-
"return": "returns",
|
|
238
|
-
"virtual": "abstract"
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
],
|
|
242
|
-
"no-var": "error",
|
|
243
|
-
"radix": "error"
|
|
244
|
-
},
|
|
245
|
-
"reportUnusedDisableDirectives": true,
|
|
246
|
-
"overrides": [
|
|
247
|
-
{
|
|
248
|
-
"files": [
|
|
249
|
-
"node_modules",
|
|
250
|
-
"dist",
|
|
251
|
-
"public",
|
|
252
|
-
"coverage",
|
|
253
|
-
"test-report"
|
|
254
|
-
],
|
|
255
|
-
"rules": {
|
|
256
|
-
"no-unused-expressions": "off"
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
]
|
|
260
|
-
}
|