@syncfusion/ej2-dropdowns 18.1.57 → 18.2.44-4569
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 +244 -0
- package/CHANGELOG.md +1524 -1514
- package/README.md +118 -118
- package/dist/ej2-dropdowns.umd.min.js +1 -10
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +198 -126
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +290 -217
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +1 -10
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/dist/ts/auto-complete/auto-complete.ts +527 -0
- package/dist/ts/combo-box/combo-box.ts +957 -0
- package/dist/ts/common/highlight-search.ts +47 -0
- package/dist/ts/common/incremental-search.ts +81 -0
- package/dist/ts/drop-down-base/drop-down-base.ts +1572 -0
- package/dist/ts/drop-down-list/drop-down-list.ts +2993 -0
- package/dist/ts/drop-down-tree/drop-down-tree.ts +3066 -0
- package/dist/ts/list-box/list-box.ts +2317 -0
- package/dist/ts/multi-select/checkbox-selection.ts +528 -0
- package/dist/ts/multi-select/float-label.ts +155 -0
- package/dist/ts/multi-select/interface.ts +66 -0
- package/dist/ts/multi-select/multi-select.ts +4216 -0
- package/helpers/e2e/index.js +3 -3
- package/license +2 -2
- package/package.json +77 -77
- package/src/auto-complete/auto-complete-model.d.ts +179 -179
- package/src/auto-complete/auto-complete.d.ts +12 -12
- package/src/auto-complete/auto-complete.js +21 -21
- package/src/combo-box/combo-box-model.d.ts +212 -212
- package/src/combo-box/combo-box.d.ts +27 -27
- package/src/combo-box/combo-box.js +29 -29
- package/src/common/incremental-search.d.ts +1 -1
- package/src/common/incremental-search.js +4 -2
- package/src/drop-down-base/drop-down-base-model.d.ts +191 -191
- package/src/drop-down-base/drop-down-base.d.ts +17 -17
- package/src/drop-down-base/drop-down-base.js +20 -20
- package/src/drop-down-list/drop-down-list-model.d.ts +222 -222
- package/src/drop-down-list/drop-down-list.d.ts +3 -2
- package/src/drop-down-list/drop-down-list.js +43 -30
- package/src/drop-down-tree/drop-down-tree-model.d.ts +344 -344
- package/src/drop-down-tree/drop-down-tree.js +32 -26
- package/src/list-box/index.d.ts +1 -0
- package/src/list-box/index.js +1 -0
- package/src/list-box/list-box-model.d.ts +156 -156
- package/src/list-box/list-box.d.ts +2 -2
- package/src/list-box/list-box.js +57 -59
- package/src/multi-select/index.d.ts +1 -0
- package/src/multi-select/index.js +1 -0
- package/src/multi-select/multi-select-model.d.ts +452 -452
- package/src/multi-select/multi-select.d.ts +2 -0
- package/src/multi-select/multi-select.js +98 -43
- package/styles/_all.scss +3 -3
- package/styles/auto-complete/_bootstrap-dark-definition.scss +3 -3
- package/styles/auto-complete/_bootstrap4-definition.scss +11 -11
- package/styles/auto-complete/_fabric-dark-definition.scss +2 -2
- package/styles/auto-complete/_highcontrast-light-definition.scss +2 -2
- package/styles/auto-complete/_material-dark-definition.scss +2 -2
- package/styles/bootstrap-dark.css +67 -61
- package/styles/bootstrap.css +69 -63
- package/styles/bootstrap4.css +81 -61
- package/styles/combo-box/_bootstrap-dark-definition.scss +2 -2
- package/styles/combo-box/_bootstrap4-definition.scss +11 -11
- package/styles/combo-box/_fabric-dark-definition.scss +2 -2
- package/styles/combo-box/_highcontrast-light-definition.scss +3 -3
- package/styles/combo-box/_material-dark-definition.scss +2 -2
- package/styles/drop-down-base/_all.scss +2 -2
- package/styles/drop-down-base/_bootstrap-dark-definition.scss +64 -64
- package/styles/drop-down-base/_bootstrap-definition.scss +64 -64
- package/styles/drop-down-base/_bootstrap4-definition.scss +78 -78
- package/styles/drop-down-base/_definition.scss +23 -23
- package/styles/drop-down-base/_fabric-dark-definition.scss +68 -68
- package/styles/drop-down-base/_fabric-definition.scss +66 -66
- package/styles/drop-down-base/_highcontrast-definition.scss +82 -82
- package/styles/drop-down-base/_highcontrast-light-definition.scss +81 -81
- package/styles/drop-down-base/_layout.scss +108 -108
- package/styles/drop-down-base/_material-dark-definition.scss +67 -67
- package/styles/drop-down-base/_material-definition.scss +65 -65
- package/styles/drop-down-base/_theme.scss +242 -242
- package/styles/drop-down-list/_all.scss +2 -2
- package/styles/drop-down-list/_bootstrap-dark-definition.scss +157 -157
- package/styles/drop-down-list/_bootstrap-definition.scss +156 -156
- package/styles/drop-down-list/_bootstrap4-definition.scss +184 -184
- package/styles/drop-down-list/_fabric-dark-definition.scss +127 -127
- package/styles/drop-down-list/_fabric-definition.scss +122 -122
- package/styles/drop-down-list/_highcontrast-definition.scss +131 -131
- package/styles/drop-down-list/_highcontrast-light-definition.scss +133 -133
- package/styles/drop-down-list/_layout.scss +218 -218
- package/styles/drop-down-list/_material-dark-definition.scss +143 -143
- package/styles/drop-down-list/_material-definition.scss +166 -166
- package/styles/drop-down-list/_theme.scss +10 -10
- package/styles/drop-down-list/icons/_bootstrap-dark.scss +14 -14
- package/styles/drop-down-list/icons/_bootstrap.scss +14 -14
- package/styles/drop-down-list/icons/_bootstrap4.scss +14 -14
- package/styles/drop-down-list/icons/_fabric-dark.scss +14 -14
- package/styles/drop-down-list/icons/_fabric.scss +14 -14
- package/styles/drop-down-list/icons/_highcontrast-light.scss +14 -14
- package/styles/drop-down-list/icons/_highcontrast.scss +14 -14
- package/styles/drop-down-list/icons/_material-dark.scss +14 -14
- package/styles/drop-down-list/icons/_material.scss +14 -14
- package/styles/drop-down-list/material.css +9 -0
- package/styles/drop-down-tree/_all.scss +2 -2
- package/styles/drop-down-tree/_bootstrap-dark-definition.scss +62 -49
- package/styles/drop-down-tree/_bootstrap-definition.scss +62 -49
- package/styles/drop-down-tree/_bootstrap4-definition.scss +63 -50
- package/styles/drop-down-tree/_fabric-dark-definition.scss +63 -49
- package/styles/drop-down-tree/_fabric-definition.scss +63 -49
- package/styles/drop-down-tree/_highcontrast-definition.scss +63 -49
- package/styles/drop-down-tree/_highcontrast-light-definition.scss +63 -49
- package/styles/drop-down-tree/_layout.scss +437 -398
- package/styles/drop-down-tree/_material-dark-definition.scss +61 -54
- package/styles/drop-down-tree/_material-definition.scss +61 -54
- package/styles/drop-down-tree/_theme.scss +68 -63
- package/styles/drop-down-tree/bootstrap-dark.css +67 -61
- package/styles/drop-down-tree/bootstrap.css +69 -63
- package/styles/drop-down-tree/bootstrap4.css +81 -61
- package/styles/drop-down-tree/fabric-dark.css +71 -63
- package/styles/drop-down-tree/fabric.css +71 -63
- package/styles/drop-down-tree/highcontrast-light.css +71 -63
- package/styles/drop-down-tree/highcontrast.css +75 -63
- package/styles/drop-down-tree/icons/_bootstrap-dark.scss +11 -11
- package/styles/drop-down-tree/icons/_bootstrap.scss +11 -11
- package/styles/drop-down-tree/icons/_bootstrap4.scss +11 -11
- package/styles/drop-down-tree/icons/_fabric-dark.scss +11 -11
- package/styles/drop-down-tree/icons/_fabric.scss +11 -11
- package/styles/drop-down-tree/icons/_highcontrast-light.scss +11 -11
- package/styles/drop-down-tree/icons/_highcontrast.scss +11 -11
- package/styles/drop-down-tree/icons/_material-dark.scss +11 -11
- package/styles/drop-down-tree/icons/_material.scss +11 -11
- package/styles/drop-down-tree/material-dark.css +76 -85
- package/styles/drop-down-tree/material.css +93 -85
- package/styles/fabric-dark.css +71 -63
- package/styles/fabric.css +71 -63
- package/styles/highcontrast-light.css +71 -63
- package/styles/highcontrast.css +75 -63
- package/styles/list-box/_all.scss +2 -2
- package/styles/list-box/_bootstrap-dark-definition.scss +118 -118
- package/styles/list-box/_bootstrap-definition.scss +112 -112
- package/styles/list-box/_bootstrap4-definition.scss +118 -118
- package/styles/list-box/_fabric-dark-definition.scss +118 -118
- package/styles/list-box/_fabric-definition.scss +112 -112
- package/styles/list-box/_highcontrast-definition.scss +112 -112
- package/styles/list-box/_highcontrast-light-definition.scss +118 -118
- package/styles/list-box/_layout.scss +458 -458
- package/styles/list-box/_material-dark-definition.scss +118 -118
- package/styles/list-box/_material-definition.scss +112 -112
- package/styles/list-box/_theme.scss +273 -273
- package/styles/list-box/icons/_bootstrap-dark.scss +25 -25
- package/styles/list-box/icons/_bootstrap.scss +25 -25
- package/styles/list-box/icons/_bootstrap4.scss +25 -25
- package/styles/list-box/icons/_fabric-dark.scss +25 -25
- package/styles/list-box/icons/_fabric.scss +25 -25
- package/styles/list-box/icons/_highcontrast-light.scss +25 -25
- package/styles/list-box/icons/_highcontrast.scss +25 -25
- package/styles/list-box/icons/_material-dark.scss +25 -25
- package/styles/list-box/icons/_material.scss +25 -25
- package/styles/list-box/material-dark.css +4 -4
- package/styles/list-box/material.css +4 -4
- package/styles/material-dark.css +80 -89
- package/styles/material.css +115 -89
- package/styles/multi-select/_all.scss +2 -2
- package/styles/multi-select/_bootstrap-dark-definition.scss +171 -171
- package/styles/multi-select/_bootstrap-definition.scss +166 -166
- package/styles/multi-select/_bootstrap4-definition.scss +233 -233
- package/styles/multi-select/_fabric-dark-definition.scss +170 -170
- package/styles/multi-select/_fabric-definition.scss +167 -167
- package/styles/multi-select/_highcontrast-definition.scss +257 -257
- package/styles/multi-select/_highcontrast-light-definition.scss +258 -258
- package/styles/multi-select/_layout.scss +1153 -1153
- package/styles/multi-select/_material-dark-definition.scss +186 -186
- package/styles/multi-select/_material-definition.scss +191 -191
- package/styles/multi-select/_theme.scss +384 -384
- package/styles/multi-select/icons/_bootstrap-dark.scss +26 -26
- package/styles/multi-select/icons/_bootstrap.scss +26 -26
- package/styles/multi-select/icons/_bootstrap4.scss +37 -37
- package/styles/multi-select/icons/_fabric-dark.scss +26 -26
- package/styles/multi-select/icons/_fabric.scss +26 -26
- package/styles/multi-select/icons/_highcontrast-light.scss +26 -26
- package/styles/multi-select/icons/_highcontrast.scss +26 -26
- package/styles/multi-select/icons/_material-dark.scss +26 -26
- package/styles/multi-select/icons/_material.scss +324 -324
- package/styles/multi-select/material.css +9 -0
|
@@ -13,6 +13,7 @@ let queryString = '';
|
|
|
13
13
|
let prevString = '';
|
|
14
14
|
let matches$1 = [];
|
|
15
15
|
let activeClass = 'e-active';
|
|
16
|
+
let prevElementId = '';
|
|
16
17
|
/**
|
|
17
18
|
* Search and focus the list item based on key code matches with list text content
|
|
18
19
|
* @param { number } keyCode - Specifies the key code which pressed on keyboard events.
|
|
@@ -21,12 +22,12 @@ let activeClass = 'e-active';
|
|
|
21
22
|
* after selected item otherwise it will do from initial.
|
|
22
23
|
* @param { boolean } ignoreCase - Specifies the case consideration when search has done.
|
|
23
24
|
*/
|
|
24
|
-
function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, isBlazor$$1) {
|
|
25
|
+
function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId, isBlazor$$1) {
|
|
25
26
|
queryString += String.fromCharCode(keyCode);
|
|
26
27
|
setTimeout(() => { queryString = ''; }, 1000);
|
|
27
28
|
let index;
|
|
28
29
|
queryString = ignoreCase ? queryString.toLowerCase() : queryString;
|
|
29
|
-
if (prevString === queryString) {
|
|
30
|
+
if (prevElementId === elementId && prevString === queryString) {
|
|
30
31
|
for (let i = 0; i < matches$1.length; i++) {
|
|
31
32
|
if (matches$1[i].classList.contains(activeClass)) {
|
|
32
33
|
index = i;
|
|
@@ -62,6 +63,7 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, isBlazor$$
|
|
|
62
63
|
i++;
|
|
63
64
|
} while (i !== selectedIndex);
|
|
64
65
|
prevString = queryString;
|
|
66
|
+
prevElementId = elementId;
|
|
65
67
|
return matches$1[0];
|
|
66
68
|
}
|
|
67
69
|
}
|
|
@@ -138,12 +140,12 @@ function revertHighlightSearch(content) {
|
|
|
138
140
|
* Common source
|
|
139
141
|
*/
|
|
140
142
|
|
|
141
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
142
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
143
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
144
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
145
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
146
|
-
};
|
|
143
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
144
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
145
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
146
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
147
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
148
|
+
};
|
|
147
149
|
class FieldSettings extends ChildProperty {
|
|
148
150
|
}
|
|
149
151
|
__decorate([
|
|
@@ -1307,12 +1309,12 @@ DropDownBase = __decorate([
|
|
|
1307
1309
|
* export all modules from current location
|
|
1308
1310
|
*/
|
|
1309
1311
|
|
|
1310
|
-
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1311
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1312
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1313
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1314
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1315
|
-
};
|
|
1312
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1313
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1314
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1315
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1316
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1317
|
+
};
|
|
1316
1318
|
/// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
|
|
1317
1319
|
/* tslint:disable */
|
|
1318
1320
|
// don't use space in classnames
|
|
@@ -1869,7 +1871,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
1869
1871
|
;
|
|
1870
1872
|
removeHover() {
|
|
1871
1873
|
if (this.list) {
|
|
1872
|
-
let hoveredItem = this.
|
|
1874
|
+
let hoveredItem = (this.isServerBlazor && this.popupObj && this.popupObj.element) ?
|
|
1875
|
+
this.popupObj.element.querySelectorAll('.' + dropDownBaseClasses.hover) :
|
|
1876
|
+
this.list.querySelectorAll('.' + dropDownBaseClasses.hover);
|
|
1873
1877
|
if (hoveredItem && hoveredItem.length) {
|
|
1874
1878
|
removeClass(hoveredItem, dropDownBaseClasses.hover);
|
|
1875
1879
|
}
|
|
@@ -1882,7 +1886,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
1882
1886
|
;
|
|
1883
1887
|
incrementalSearch(e) {
|
|
1884
1888
|
if (this.liCollections.length > 0) {
|
|
1885
|
-
let li = incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.isServerBlazor);
|
|
1889
|
+
let li = incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.element.id, this.isServerBlazor);
|
|
1886
1890
|
if (!isNullOrUndefined(li)) {
|
|
1887
1891
|
this.setSelection(li, e);
|
|
1888
1892
|
this.setScrollPosition();
|
|
@@ -3046,7 +3050,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3046
3050
|
updateServerPopup(popupEle) {
|
|
3047
3051
|
if (this.isServerBlazor) {
|
|
3048
3052
|
if (popupEle && popupEle.querySelector('li')) {
|
|
3049
|
-
removeClass([
|
|
3053
|
+
removeClass([popupEle.querySelector('.e-content')], ['e-nodata']);
|
|
3050
3054
|
}
|
|
3051
3055
|
this.initial = false;
|
|
3052
3056
|
popupEle.removeAttribute('style');
|
|
@@ -3074,7 +3078,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3074
3078
|
this.isDocumentClick = false;
|
|
3075
3079
|
this.destroyPopup();
|
|
3076
3080
|
let formElement = closest(this.inputElement, 'form');
|
|
3077
|
-
if (this.isFiltering() &&
|
|
3081
|
+
if (this.isFiltering() && this.actionCompleteData.list && this.actionCompleteData.list[0]) {
|
|
3078
3082
|
this.isActive = true;
|
|
3079
3083
|
this.onActionComplete(this.actionCompleteData.ulElement, this.actionCompleteData.list, null, true);
|
|
3080
3084
|
}
|
|
@@ -3528,6 +3532,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3528
3532
|
if (this.getModuleName() !== 'autocomplete' && this.allowFiltering && (isChangeValue || isChangeText)) {
|
|
3529
3533
|
this.itemData = null;
|
|
3530
3534
|
}
|
|
3535
|
+
if (this.allowFiltering && newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource))) {
|
|
3536
|
+
this.actionCompleteData = { ulElement: null, list: null, isUpdated: false };
|
|
3537
|
+
}
|
|
3531
3538
|
}
|
|
3532
3539
|
updateDataSource(props) {
|
|
3533
3540
|
if (this.inputElement.value !== '' || (!isNullOrUndefined(props) && (isNullOrUndefined(props.dataSource)
|
|
@@ -3614,7 +3621,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3614
3621
|
this.getModuleName() === 'autocomplete' && this.listData.length > 100) {
|
|
3615
3622
|
this.setSelectionData(newProp.text, oldProp.text, 'text');
|
|
3616
3623
|
}
|
|
3617
|
-
else {
|
|
3624
|
+
else if (!this.isServerBlazor) {
|
|
3618
3625
|
this.setOldText(oldProp.text);
|
|
3619
3626
|
}
|
|
3620
3627
|
}
|
|
@@ -3640,7 +3647,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3640
3647
|
this.getModuleName() === 'autocomplete' && this.listData.length > 100) {
|
|
3641
3648
|
this.setSelectionData(newProp.value, oldProp.value, 'value');
|
|
3642
3649
|
}
|
|
3643
|
-
else {
|
|
3650
|
+
else if (!this.isServerBlazor) {
|
|
3644
3651
|
this.setOldValue(oldProp.value);
|
|
3645
3652
|
}
|
|
3646
3653
|
}
|
|
@@ -3658,14 +3665,14 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3658
3665
|
}
|
|
3659
3666
|
this.renderList();
|
|
3660
3667
|
}
|
|
3661
|
-
if (!this.initRemoteRender) {
|
|
3668
|
+
if (!this.initRemoteRender && this.liCollections) {
|
|
3662
3669
|
let element = this.liCollections[newProp.index];
|
|
3663
3670
|
if (!this.checkValidLi(element)) {
|
|
3664
3671
|
if (this.liCollections && this.liCollections.length === 100 &&
|
|
3665
3672
|
this.getModuleName() === 'autocomplete' && this.listData.length > 100) {
|
|
3666
3673
|
this.setSelectionData(newProp.index, oldProp.index, 'index');
|
|
3667
3674
|
}
|
|
3668
|
-
else {
|
|
3675
|
+
else if (!this.isServerBlazor) {
|
|
3669
3676
|
this.index = oldProp.index;
|
|
3670
3677
|
}
|
|
3671
3678
|
}
|
|
@@ -3788,7 +3795,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3788
3795
|
if (!this.isServerBlazor) {
|
|
3789
3796
|
this.invokeRenderPopup();
|
|
3790
3797
|
}
|
|
3791
|
-
|
|
3798
|
+
let popupHolderEle = !this.isFiltering() || document.querySelector('#' + this.element.id + '_popup_holder');
|
|
3799
|
+
let isDropdownComp = this.getModuleName() === 'dropdownlist' || !this.isFiltering();
|
|
3800
|
+
if (this.isServerBlazor && popupHolderEle && !isNullOrUndefined(this.list) && isDropdownComp) {
|
|
3792
3801
|
this.invokeRenderPopup();
|
|
3793
3802
|
}
|
|
3794
3803
|
}
|
|
@@ -3859,6 +3868,11 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3859
3868
|
updateclientItemData(data) {
|
|
3860
3869
|
this.listData = data;
|
|
3861
3870
|
}
|
|
3871
|
+
initValueItemData(selectData) {
|
|
3872
|
+
this.itemData = selectData;
|
|
3873
|
+
this.previousValue = this.value;
|
|
3874
|
+
this.initial = false;
|
|
3875
|
+
}
|
|
3862
3876
|
serverUpdateListElement(data, popupEle) {
|
|
3863
3877
|
this.listData = data;
|
|
3864
3878
|
if (this.ulElement) {
|
|
@@ -3892,8 +3906,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3892
3906
|
}
|
|
3893
3907
|
this.closePopup();
|
|
3894
3908
|
let dataItem = this.getItemData();
|
|
3909
|
+
let isSelectVal = this.isServerBlazor ? !isNullOrUndefined(this.value) : !isNullOrUndefined(this.selectedLI);
|
|
3895
3910
|
if (this.inputElement.value.trim() === '' && !this.isInteracted && (this.isSelectCustom ||
|
|
3896
|
-
|
|
3911
|
+
isSelectVal && this.inputElement.value !== dataItem.text)) {
|
|
3897
3912
|
this.isSelectCustom = false;
|
|
3898
3913
|
this.clearAll(e);
|
|
3899
3914
|
}
|
|
@@ -4093,12 +4108,12 @@ DropDownList = __decorate$1([
|
|
|
4093
4108
|
* export all modules from current location
|
|
4094
4109
|
*/
|
|
4095
4110
|
|
|
4096
|
-
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
4097
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4098
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4099
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4100
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4101
|
-
};
|
|
4111
|
+
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
4112
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4113
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4114
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4115
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4116
|
+
};
|
|
4102
4117
|
const RTL = 'e-rtl';
|
|
4103
4118
|
const DROPDOWNTREE = 'e-ddt';
|
|
4104
4119
|
const HIDDENELEMENT = 'e-ddt-hidden';
|
|
@@ -5293,6 +5308,10 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
5293
5308
|
this.changeState(wrap, 'check');
|
|
5294
5309
|
this.checkSelectAll = false;
|
|
5295
5310
|
}
|
|
5311
|
+
if (this.allowFiltering) {
|
|
5312
|
+
removeClass([this.inputWrapper], [INPUTFOCUS]);
|
|
5313
|
+
this.filterObj.element.focus();
|
|
5314
|
+
}
|
|
5296
5315
|
let eventArgs = { popup: this.popupObj };
|
|
5297
5316
|
this.trigger('open', eventArgs);
|
|
5298
5317
|
}
|
|
@@ -5392,18 +5411,17 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
5392
5411
|
let target = e.target;
|
|
5393
5412
|
let isTree = closest(target, '.' + PARENTITEM);
|
|
5394
5413
|
let isFilter = closest(target, '.' + FILTERWRAP);
|
|
5395
|
-
|
|
5414
|
+
let isScroller = target.classList.contains(DROPDOWN) ? true :
|
|
5415
|
+
(matches(target, '.e-ddt .e-popup') || matches(target, '.e-ddt .e-treeview'));
|
|
5416
|
+
if ((this.isPopupOpen && (this.inputWrapper.contains(target) || isTree || isFilter || isScroller)) ||
|
|
5396
5417
|
((this.allowMultiSelection || this.showCheckBox) && (this.isPopupOpen && target.classList.contains(CHIP_CLOSE) ||
|
|
5397
5418
|
(this.isPopupOpen && (target.classList.contains(CHECKALLPARENT) || target.classList.contains(ALLTEXT)
|
|
5398
5419
|
|| target.classList.contains(CHECKBOXFRAME)))))) {
|
|
5399
5420
|
this.isDocumentClick = false;
|
|
5421
|
+
e.preventDefault();
|
|
5400
5422
|
}
|
|
5401
|
-
else if (!this.inputWrapper.contains(target)) {
|
|
5402
|
-
|
|
5403
|
-
(matches(target, '.e-ddt .e-popup') || matches(target, '.e-ddt .e-treeview'));
|
|
5404
|
-
if (!isScroller && this.inputFocus) {
|
|
5405
|
-
this.focusOut(e);
|
|
5406
|
-
}
|
|
5423
|
+
else if (!this.inputWrapper.contains(target) && this.inputFocus) {
|
|
5424
|
+
this.focusOut(e);
|
|
5407
5425
|
}
|
|
5408
5426
|
}
|
|
5409
5427
|
onActionFailure(e) {
|
|
@@ -6493,6 +6511,9 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
6493
6511
|
this.popupObj.hide();
|
|
6494
6512
|
if (this.inputFocus) {
|
|
6495
6513
|
this.inputWrapper.focus();
|
|
6514
|
+
if (this.allowFiltering) {
|
|
6515
|
+
addClass([this.inputWrapper], [INPUTFOCUS]);
|
|
6516
|
+
}
|
|
6496
6517
|
}
|
|
6497
6518
|
this.trigger('close', eventArgs);
|
|
6498
6519
|
}
|
|
@@ -6678,12 +6699,12 @@ DropDownTree = __decorate$2([
|
|
|
6678
6699
|
* export all modules from current location
|
|
6679
6700
|
*/
|
|
6680
6701
|
|
|
6681
|
-
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
6682
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
6683
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
6684
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6685
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6686
|
-
};
|
|
6702
|
+
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
6703
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
6704
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
6705
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6706
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6707
|
+
};
|
|
6687
6708
|
/// <reference path='../drop-down-list/drop-down-list-model.d.ts'/>
|
|
6688
6709
|
/* tslint:disable */
|
|
6689
6710
|
/* tslint:enable */
|
|
@@ -7476,12 +7497,12 @@ ComboBox = __decorate$3([
|
|
|
7476
7497
|
* export all modules from current location
|
|
7477
7498
|
*/
|
|
7478
7499
|
|
|
7479
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
7480
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7481
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7482
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7483
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7484
|
-
};
|
|
7500
|
+
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
7501
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7502
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7503
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7504
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7505
|
+
};
|
|
7485
7506
|
/// <reference path='../combo-box/combo-box-model.d.ts'/>
|
|
7486
7507
|
/* tslint:disable */
|
|
7487
7508
|
/* tslint:enable */
|
|
@@ -7994,12 +8015,12 @@ function floatLabelBlur(overAllWrapper, componentWrapper, value, floatLabelType,
|
|
|
7994
8015
|
}
|
|
7995
8016
|
}
|
|
7996
8017
|
|
|
7997
|
-
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
7998
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7999
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8000
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8001
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8002
|
-
};
|
|
8018
|
+
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
8019
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8020
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8021
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8022
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8023
|
+
};
|
|
8003
8024
|
/// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
|
|
8004
8025
|
/* tslint:disable */
|
|
8005
8026
|
/* tslint:enable */
|
|
@@ -8380,6 +8401,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
8380
8401
|
else {
|
|
8381
8402
|
this.updateActionList(ulElement, list, e);
|
|
8382
8403
|
}
|
|
8404
|
+
if (isBlazor() && this.isServerRendered && this.allowFiltering && this.mode === 'CheckBox') {
|
|
8405
|
+
this.removeFocus();
|
|
8406
|
+
}
|
|
8383
8407
|
if (isBlazor() && this.isServerRendered && this.isDynamicDataChange && this.value && this.value.length > 0) {
|
|
8384
8408
|
this.updateVal(this.value, null, 'value');
|
|
8385
8409
|
this.addValidInputClass();
|
|
@@ -8395,7 +8419,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
8395
8419
|
this.mainData = list;
|
|
8396
8420
|
this.mainListCollection = this.liCollections;
|
|
8397
8421
|
}
|
|
8398
|
-
else if (
|
|
8422
|
+
else if (isNullOrUndefined(this.mainData) || this.mainData.length === 0) {
|
|
8399
8423
|
this.mainData = list;
|
|
8400
8424
|
}
|
|
8401
8425
|
if ((this.remoteCustomValue || list.length <= 0) && this.allowCustomValue && this.inputFocus && this.allowFiltering) {
|
|
@@ -8739,8 +8763,16 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
8739
8763
|
if (this.mode !== 'CheckBox') {
|
|
8740
8764
|
this.inputElement.focus();
|
|
8741
8765
|
}
|
|
8766
|
+
else if ((this.floatLabelType === 'Auto' &&
|
|
8767
|
+
((this.overAllWrapper.classList.contains('e-outline')) || (this.overAllWrapper.classList.contains('e-filled'))))) {
|
|
8768
|
+
addClass([this.overAllWrapper], 'e-valid-input');
|
|
8769
|
+
}
|
|
8742
8770
|
return;
|
|
8743
8771
|
}
|
|
8772
|
+
if (this.floatLabelType === 'Auto' && (this.overAllWrapper.classList.contains('e-outline')) && this.mode === 'CheckBox' &&
|
|
8773
|
+
((isNullOrUndefined(this.value)) || this.value.length === 0)) {
|
|
8774
|
+
removeClass([this.overAllWrapper], 'e-valid-input');
|
|
8775
|
+
}
|
|
8744
8776
|
if (this.mode === 'CheckBox' && Browser.isIE && !isNullOrUndefined(eve) && !isDocClickFromCheck) {
|
|
8745
8777
|
this.inputFocus = false;
|
|
8746
8778
|
this.overAllWrapper.classList.remove(FOCUS);
|
|
@@ -8791,6 +8823,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
8791
8823
|
parseInt(window.getComputedStyle(this.dropIcon).marginRight, 10);
|
|
8792
8824
|
this.setPlaceholderSize(downIconWidth);
|
|
8793
8825
|
}
|
|
8826
|
+
else {
|
|
8827
|
+
if (!isNullOrUndefined(this.dropIcon)) {
|
|
8828
|
+
this.setPlaceholderSize(this.showDropDownIcon ? this.dropIcon.offsetWidth : 0);
|
|
8829
|
+
}
|
|
8830
|
+
}
|
|
8794
8831
|
}
|
|
8795
8832
|
setPlaceholderSize(downIconWidth) {
|
|
8796
8833
|
if (isNullOrUndefined(this.value) || this.value.length === 0) {
|
|
@@ -9903,16 +9940,16 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
9903
9940
|
if (this.itemTemplate && (isBlazor() && this.isServerRendered)) {
|
|
9904
9941
|
setTimeout(() => { this.mainList = this.ulElement; }, 0);
|
|
9905
9942
|
}
|
|
9906
|
-
else
|
|
9907
|
-
|
|
9908
|
-
|
|
9909
|
-
}
|
|
9943
|
+
else if (!(this.mode !== 'CheckBox' && (this.allowFiltering || this.allowCustomValue) &&
|
|
9944
|
+
this.targetElement().trim() !== '')) {
|
|
9945
|
+
this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
|
|
9910
9946
|
}
|
|
9911
9947
|
}
|
|
9912
9948
|
this.isFirstClick = true;
|
|
9913
9949
|
}
|
|
9914
9950
|
this.popupObj.wireScrollEvents();
|
|
9915
|
-
if (!(this.mode !== 'CheckBox' && this.allowFiltering
|
|
9951
|
+
if (!(this.mode !== 'CheckBox' && (this.allowFiltering || this.allowCustomValue) &&
|
|
9952
|
+
this.targetElement().trim() !== '')) {
|
|
9916
9953
|
this.loadTemplate();
|
|
9917
9954
|
}
|
|
9918
9955
|
this.setScrollPosition();
|
|
@@ -10304,7 +10341,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
10304
10341
|
updateActionCompleteData(li, item) {
|
|
10305
10342
|
if (this.value && this.value.indexOf(li.getAttribute('data-value')) > -1) {
|
|
10306
10343
|
this.mainList = this.ulElement;
|
|
10307
|
-
|
|
10344
|
+
if (this.hideSelectedItem) {
|
|
10345
|
+
addClass([li], HIDE_LIST);
|
|
10346
|
+
}
|
|
10308
10347
|
}
|
|
10309
10348
|
}
|
|
10310
10349
|
updateAddItemList(list, itemCount) {
|
|
@@ -10821,7 +10860,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
10821
10860
|
let textArr = this.viewWrapper.innerHTML.split(this.delimiterChar);
|
|
10822
10861
|
textArr.pop();
|
|
10823
10862
|
this.viewWrapper.innerHTML = textArr.join(this.delimiterChar);
|
|
10824
|
-
|
|
10863
|
+
if (this.viewWrapper.innerHTML === '') {
|
|
10864
|
+
remaining++;
|
|
10865
|
+
}
|
|
10825
10866
|
wrapperleng = this.viewWrapper.offsetWidth;
|
|
10826
10867
|
}
|
|
10827
10868
|
break;
|
|
@@ -10937,7 +10978,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
10937
10978
|
'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' :
|
|
10938
10979
|
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)');
|
|
10939
10980
|
if (this.value && this.value.length && this.isPopupOpen() && event && event.target
|
|
10940
|
-
&& closest(event.target, '.e-close-hooker')) {
|
|
10981
|
+
&& closest(event.target, '.e-close-hooker') && this.allowFiltering) {
|
|
10941
10982
|
li = this.mainList.querySelectorAll(state ?
|
|
10942
10983
|
'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' :
|
|
10943
10984
|
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)');
|
|
@@ -11227,28 +11268,62 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11227
11268
|
}
|
|
11228
11269
|
this.renderPopup();
|
|
11229
11270
|
}
|
|
11271
|
+
presentItemValue(ulElement) {
|
|
11272
|
+
let valuecheck = [];
|
|
11273
|
+
for (let i = 0; i < this.value.length; i++) {
|
|
11274
|
+
let checkEle = this.findListElement(((this.allowFiltering && !isNullOrUndefined(this.mainList)) ? this.mainList : ulElement), 'li', 'data-value', this.value[i]);
|
|
11275
|
+
if (!checkEle) {
|
|
11276
|
+
valuecheck.push(this.value[i]);
|
|
11277
|
+
}
|
|
11278
|
+
}
|
|
11279
|
+
return valuecheck;
|
|
11280
|
+
}
|
|
11281
|
+
;
|
|
11282
|
+
addNonPresentItems(valuecheck, ulElement, list, event) {
|
|
11283
|
+
this.showSpinner();
|
|
11284
|
+
this.dataSource.executeQuery(this.getForQuery(valuecheck)).then((e) => {
|
|
11285
|
+
this.hideSpinner();
|
|
11286
|
+
this.addItem(e.result, list.length);
|
|
11287
|
+
this.updateActionList(ulElement, list, event);
|
|
11288
|
+
});
|
|
11289
|
+
}
|
|
11290
|
+
;
|
|
11230
11291
|
updateVal(newProp, oldProp, prop) {
|
|
11231
11292
|
if (!this.list) {
|
|
11232
11293
|
this.onLoadSelect();
|
|
11233
11294
|
}
|
|
11234
|
-
else
|
|
11235
|
-
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
}
|
|
11239
|
-
if (isNullOrUndefined(this.value) || this.value.length === 0) {
|
|
11240
|
-
this.tempValues = oldProp;
|
|
11295
|
+
else {
|
|
11296
|
+
let valuecheck = [];
|
|
11297
|
+
if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
|
|
11298
|
+
valuecheck = this.presentItemValue(this.ulElement);
|
|
11241
11299
|
}
|
|
11242
|
-
this.
|
|
11243
|
-
|
|
11244
|
-
this.
|
|
11300
|
+
if (prop == 'value' && valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
|
|
11301
|
+
&& this.listData != null) {
|
|
11302
|
+
this.mainData = null;
|
|
11303
|
+
this.setDynValue = true;
|
|
11304
|
+
this.addNonPresentItems(valuecheck, this.ulElement, this.listData);
|
|
11245
11305
|
}
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
|
|
11306
|
+
else {
|
|
11307
|
+
if (prop === 'text') {
|
|
11308
|
+
this.initialTextUpdate();
|
|
11309
|
+
newProp = this.value;
|
|
11310
|
+
}
|
|
11311
|
+
if (isNullOrUndefined(this.value) || this.value.length === 0) {
|
|
11312
|
+
this.tempValues = oldProp;
|
|
11313
|
+
}
|
|
11314
|
+
this.initialValueUpdate();
|
|
11315
|
+
if (this.mode !== 'Box' && !this.inputFocus) {
|
|
11316
|
+
this.updateDelimView();
|
|
11317
|
+
}
|
|
11318
|
+
if (!this.inputFocus) {
|
|
11319
|
+
this.refreshInputHight();
|
|
11320
|
+
}
|
|
11321
|
+
this.refreshPlaceHolder();
|
|
11322
|
+
if (this.mode !== 'CheckBox' && this.changeOnBlur) {
|
|
11323
|
+
this.updateValueState(null, newProp, oldProp);
|
|
11324
|
+
}
|
|
11325
|
+
this.checkPlaceholderSize();
|
|
11250
11326
|
}
|
|
11251
|
-
this.checkPlaceholderSize();
|
|
11252
11327
|
}
|
|
11253
11328
|
if (!this.changeOnBlur) {
|
|
11254
11329
|
this.updateValueState(null, newProp, oldProp);
|
|
@@ -12273,12 +12348,12 @@ class CheckBoxSelection {
|
|
|
12273
12348
|
* export all modules from current location
|
|
12274
12349
|
*/
|
|
12275
12350
|
|
|
12276
|
-
var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
12277
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12278
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
12279
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
12280
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12281
|
-
};
|
|
12351
|
+
var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
12352
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12353
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
12354
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
12355
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12356
|
+
};
|
|
12282
12357
|
var ListBox_1;
|
|
12283
12358
|
/// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
|
|
12284
12359
|
const ITEMTEMPLATE_PROPERTY$1 = 'ItemTemplate';
|
|
@@ -12337,6 +12412,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
12337
12412
|
constructor(options, element) {
|
|
12338
12413
|
super(options, element);
|
|
12339
12414
|
this.isValidKey = false;
|
|
12415
|
+
this.keyDownStatus = false;
|
|
12340
12416
|
}
|
|
12341
12417
|
/**
|
|
12342
12418
|
* Adds a new item to the popup list. By default, new item appends to the list as the last item,
|
|
@@ -12380,12 +12456,12 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
12380
12456
|
}
|
|
12381
12457
|
updateBlazorListData(data, isDataSource) {
|
|
12382
12458
|
if (isDataSource) {
|
|
12459
|
+
this.liCollections = this.list.querySelectorAll('.' + cssClass.li);
|
|
12383
12460
|
this.mainList = this.ulElement = this.list.querySelector('ul');
|
|
12384
12461
|
}
|
|
12385
|
-
|
|
12462
|
+
if (!isNullOrUndefined(data)) {
|
|
12386
12463
|
this.sortedData = this.jsonData = this.listData = data;
|
|
12387
12464
|
}
|
|
12388
|
-
this.initDraggable();
|
|
12389
12465
|
}
|
|
12390
12466
|
initWrapper() {
|
|
12391
12467
|
let hiddenSelect = this.createElement('select', { className: 'e-hidden-select', attrs: { 'multiple': '' } });
|
|
@@ -12429,9 +12505,6 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
12429
12505
|
}
|
|
12430
12506
|
}
|
|
12431
12507
|
initDraggable() {
|
|
12432
|
-
if (this.ulElement) {
|
|
12433
|
-
this.ulElement.id = this.element.id + '_parent';
|
|
12434
|
-
}
|
|
12435
12508
|
if (this.allowDragAndDrop) {
|
|
12436
12509
|
new Sortable(this.ulElement, {
|
|
12437
12510
|
scope: this.scope,
|
|
@@ -12567,7 +12640,13 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
12567
12640
|
}
|
|
12568
12641
|
}
|
|
12569
12642
|
onInput() {
|
|
12570
|
-
this.
|
|
12643
|
+
if (this.keyDownStatus) {
|
|
12644
|
+
this.isValidKey = true;
|
|
12645
|
+
}
|
|
12646
|
+
else {
|
|
12647
|
+
this.isValidKey = false;
|
|
12648
|
+
}
|
|
12649
|
+
this.keyDownStatus = false;
|
|
12571
12650
|
this.refreshClearIcon();
|
|
12572
12651
|
}
|
|
12573
12652
|
clearText() {
|
|
@@ -12585,21 +12664,12 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
12585
12664
|
}
|
|
12586
12665
|
onActionComplete(ulElement, list, e) {
|
|
12587
12666
|
let searchEle;
|
|
12588
|
-
if (this.allowFiltering
|
|
12589
|
-
|
|
12590
|
-
searchEle = this.list.getElementsByClassName('e-filter-parent')[0];
|
|
12591
|
-
}
|
|
12592
|
-
else {
|
|
12593
|
-
searchEle = this.list.getElementsByClassName('e-filter-parent')[0].cloneNode(true);
|
|
12594
|
-
}
|
|
12667
|
+
if (this.allowFiltering) {
|
|
12668
|
+
searchEle = this.list.getElementsByClassName('e-filter-parent')[0];
|
|
12595
12669
|
}
|
|
12596
12670
|
super.onActionComplete(ulElement, list, e);
|
|
12597
12671
|
if (this.allowFiltering && !isNullOrUndefined(searchEle)) {
|
|
12598
12672
|
this.list.insertBefore(searchEle, this.list.firstElementChild);
|
|
12599
|
-
if (!isBlazor() && !this.isServerRendered) {
|
|
12600
|
-
this.filterParent = this.list.getElementsByClassName('e-filter-parent')[0];
|
|
12601
|
-
this.filterWireEvents(searchEle);
|
|
12602
|
-
}
|
|
12603
12673
|
}
|
|
12604
12674
|
this.initWrapper();
|
|
12605
12675
|
this.setSelection();
|
|
@@ -12619,11 +12689,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
12619
12689
|
}
|
|
12620
12690
|
else {
|
|
12621
12691
|
if (this.allowFiltering) {
|
|
12622
|
-
|
|
12623
|
-
let txtLength = this.filterInput.value.length;
|
|
12624
|
-
filterElem.selectionStart = txtLength;
|
|
12625
|
-
filterElem.selectionEnd = txtLength;
|
|
12626
|
-
filterElem.focus();
|
|
12692
|
+
this.list.getElementsByClassName('e-input-filter')[0].focus();
|
|
12627
12693
|
}
|
|
12628
12694
|
}
|
|
12629
12695
|
this.initLoad = false;
|
|
@@ -12931,6 +12997,8 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
12931
12997
|
let dupData = [];
|
|
12932
12998
|
let itemIdx;
|
|
12933
12999
|
extend(dupData, [], this.listData);
|
|
13000
|
+
let removeIdxes = [];
|
|
13001
|
+
let removeLiIdxes = [];
|
|
12934
13002
|
for (let j = 0; j < items.length; j++) {
|
|
12935
13003
|
if (items[j] instanceof Object) {
|
|
12936
13004
|
dataValue = getValue(fields.value, items[j]);
|
|
@@ -12948,11 +13016,17 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
12948
13016
|
if (objValue === dataValue) {
|
|
12949
13017
|
itemIdx = this.getIndexByValue(dataValue);
|
|
12950
13018
|
liCollections.push(liElement[itemIdx]);
|
|
12951
|
-
|
|
12952
|
-
|
|
13019
|
+
removeIdxes.push(i);
|
|
13020
|
+
removeLiIdxes.push(itemIdx);
|
|
12953
13021
|
}
|
|
12954
13022
|
}
|
|
12955
13023
|
}
|
|
13024
|
+
for (let k = removeIdxes.length - 1; k > 0; k--) {
|
|
13025
|
+
this.listData.splice(removeIdxes[k], 1);
|
|
13026
|
+
}
|
|
13027
|
+
for (let k = removeLiIdxes.length - 1; k > 0; k--) {
|
|
13028
|
+
this.liCollections.splice(removeLiIdxes[k], 1);
|
|
13029
|
+
}
|
|
12956
13030
|
}
|
|
12957
13031
|
else {
|
|
12958
13032
|
itemIndex = itemIndex ? itemIndex : 0;
|
|
@@ -12963,6 +13037,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
12963
13037
|
for (let i = 0; i < liCollections.length; i++) {
|
|
12964
13038
|
this.ulElement.removeChild(liCollections[i]);
|
|
12965
13039
|
}
|
|
13040
|
+
if (this.listData.length === 0) {
|
|
13041
|
+
this.l10nUpdate();
|
|
13042
|
+
}
|
|
12966
13043
|
}
|
|
12967
13044
|
/**
|
|
12968
13045
|
* Gets the array of data Object that matches the given array of values.
|
|
@@ -13158,7 +13235,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
13158
13235
|
EventHandler.remove(this.list, 'click', this.clickHandler);
|
|
13159
13236
|
EventHandler.remove(wrapper, 'keydown', this.keyDownHandler);
|
|
13160
13237
|
EventHandler.remove(wrapper, 'focusout', this.focusOutHandler);
|
|
13161
|
-
if (this.allowFiltering
|
|
13238
|
+
if (this.allowFiltering) {
|
|
13162
13239
|
EventHandler.remove(this.clearFilterIconElem, 'click', this.clearText);
|
|
13163
13240
|
}
|
|
13164
13241
|
if (this.toolbarSettings.items.length) {
|
|
@@ -13220,6 +13297,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
13220
13297
|
className: listBoxClasses.filterInput
|
|
13221
13298
|
});
|
|
13222
13299
|
this.element.parentNode.insertBefore(this.filterInput, this.element);
|
|
13300
|
+
if (Browser.isDevice) {
|
|
13301
|
+
|
|
13302
|
+
}
|
|
13223
13303
|
filterInputObj = Input.createInput({
|
|
13224
13304
|
element: this.filterInput,
|
|
13225
13305
|
buttons: [listBoxClasses.filterBarClearIcon],
|
|
@@ -13242,24 +13322,16 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
13242
13322
|
addClass([this.list], 'e-filter-list');
|
|
13243
13323
|
}
|
|
13244
13324
|
this.inputString = this.filterInput.value;
|
|
13245
|
-
this.
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
}
|
|
13249
|
-
filterWireEvents(filterElem) {
|
|
13250
|
-
if (filterElem) {
|
|
13251
|
-
this.filterInput = filterElem.querySelector('.e-input-filter');
|
|
13252
|
-
}
|
|
13253
|
-
this.clearFilterIconElem = this.filterInput.parentElement.querySelector('.' + listBoxClasses.clearIcon);
|
|
13254
|
-
if (this.clearFilterIconElem) {
|
|
13255
|
-
EventHandler.add(this.clearFilterIconElem, 'click', this.clearText, this);
|
|
13256
|
-
if (!filterElem) {
|
|
13325
|
+
this.clearFilterIconElem = this.filterInput.parentElement.querySelector('.' + listBoxClasses.clearIcon);
|
|
13326
|
+
if (this.clearFilterIconElem) {
|
|
13327
|
+
EventHandler.add(this.clearFilterIconElem, 'click', this.clearText, this);
|
|
13257
13328
|
this.clearFilterIconElem.style.visibility = 'hidden';
|
|
13258
13329
|
}
|
|
13330
|
+
EventHandler.add(this.filterInput, 'input', this.onInput, this);
|
|
13331
|
+
EventHandler.add(this.filterInput, 'keyup', this.KeyUp, this);
|
|
13332
|
+
EventHandler.add(this.filterInput, 'keydown', this.onKeyDown, this);
|
|
13333
|
+
return filterInputObj;
|
|
13259
13334
|
}
|
|
13260
|
-
EventHandler.add(this.filterInput, 'input', this.onInput, this);
|
|
13261
|
-
EventHandler.add(this.filterInput, 'keyup', this.KeyUp, this);
|
|
13262
|
-
EventHandler.add(this.filterInput, 'keydown', this.onKeyDown, this);
|
|
13263
13335
|
}
|
|
13264
13336
|
selectHandler(e, isKey) {
|
|
13265
13337
|
let isSelect = true;
|
|
@@ -14345,5 +14417,5 @@ const listBoxClasses = {
|
|
|
14345
14417
|
* export all modules from current location
|
|
14346
14418
|
*/
|
|
14347
14419
|
|
|
14348
|
-
export { incrementalSearch, Search, highlightSearch, revertHighlightSearch, FieldSettings, dropDownBaseClasses, DropDownBase, dropDownListClasses, DropDownList, Fields, TreeSettings, DropDownTree, ComboBox, AutoComplete, MultiSelect, CheckBoxSelection, SelectionSettings, ToolbarSettings, ListBox };
|
|
14420
|
+
export { incrementalSearch, Search, highlightSearch, revertHighlightSearch, FieldSettings, dropDownBaseClasses, DropDownBase, dropDownListClasses, DropDownList, Fields, TreeSettings, DropDownTree, ComboBox, AutoComplete, MultiSelect, CheckBoxSelection, createFloatLabel, updateFloatLabelState, removeFloating, setPlaceHolder, floatLabelFocus, floatLabelBlur, SelectionSettings, ToolbarSettings, ListBox };
|
|
14349
14421
|
//# sourceMappingURL=ej2-dropdowns.es2015.js.map
|