@syncfusion/ej2-dropdowns 23.2.7 → 24.1.41-566987
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 +2040 -2150
- package/{README.md → ReadMe.md} +217 -217
- 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 +710 -172
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +871 -332
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/helpers/e2e/autocomplete.js +13 -13
- package/helpers/e2e/combobox.js +13 -13
- package/helpers/e2e/dropdownlist.js +13 -13
- package/helpers/e2e/index.js +3 -3
- package/helpers/e2e/listboxHelper.js +13 -13
- package/helpers/e2e/multiselect.js +13 -13
- package/license +2 -2
- package/package.json +80 -80
- package/src/auto-complete/auto-complete-model.d.ts +188 -188
- package/src/auto-complete/auto-complete.d.ts +12 -12
- package/src/auto-complete/auto-complete.js +30 -25
- package/src/combo-box/combo-box-model.d.ts +224 -224
- package/src/combo-box/combo-box.d.ts +27 -27
- package/src/combo-box/combo-box.js +103 -31
- package/src/common/incremental-search.d.ts +1 -1
- package/src/common/incremental-search.js +50 -7
- package/src/common/interface.d.ts +2 -0
- package/src/common/virtual-scroll.js +68 -47
- package/src/drop-down-base/drop-down-base-model.d.ts +200 -200
- package/src/drop-down-base/drop-down-base.d.ts +38 -18
- package/src/drop-down-base/drop-down-base.js +174 -60
- package/src/drop-down-list/drop-down-list-model.d.ts +202 -202
- package/src/drop-down-list/drop-down-list.d.ts +14 -7
- package/src/drop-down-list/drop-down-list.js +325 -61
- package/src/drop-down-tree/drop-down-tree-model.d.ts +468 -468
- package/src/drop-down-tree/drop-down-tree.js +43 -39
- package/src/list-box/list-box-model.d.ts +193 -193
- package/src/list-box/list-box.d.ts +2 -2
- package/src/list-box/list-box.js +27 -20
- package/src/mention/mention-model.d.ts +261 -261
- package/src/mention/mention.js +24 -20
- package/src/multi-select/checkbox-selection.js +4 -1
- package/src/multi-select/multi-select-model.d.ts +512 -512
- package/src/multi-select/multi-select.js +23 -21
- package/styles/auto-complete/_all.scss +1 -1
- package/styles/auto-complete/_bds-definition.scss +2 -0
- package/styles/auto-complete/_bootstrap-dark-definition.scss +3 -3
- package/styles/auto-complete/_bootstrap-definition.scss +2 -2
- package/styles/auto-complete/_bootstrap4-definition.scss +11 -11
- package/styles/auto-complete/_bootstrap5-definition.scss +2 -2
- package/styles/auto-complete/_fabric-dark-definition.scss +2 -2
- package/styles/auto-complete/_fabric-definition.scss +2 -2
- package/styles/auto-complete/_fluent-definition.scss +2 -2
- package/styles/auto-complete/_fusionnew-definition.scss +2 -2
- package/styles/auto-complete/_highcontrast-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/auto-complete/_material-definition.scss +2 -2
- package/styles/auto-complete/_material3-definition.scss +2 -2
- package/styles/auto-complete/_tailwind-definition.scss +2 -2
- package/styles/auto-complete/material3-dark.scss +1 -1
- package/styles/auto-complete/material3.scss +1 -1
- package/styles/bootstrap-dark.css +16 -9
- package/styles/bootstrap.css +16 -9
- package/styles/bootstrap4.css +11 -9
- package/styles/bootstrap5-dark.css +11 -9
- package/styles/bootstrap5.css +11 -9
- package/styles/combo-box/_all.scss +1 -1
- package/styles/combo-box/_bds-definition.scss +2 -0
- package/styles/combo-box/_bootstrap-dark-definition.scss +2 -2
- package/styles/combo-box/_bootstrap-definition.scss +2 -2
- package/styles/combo-box/_bootstrap4-definition.scss +11 -11
- package/styles/combo-box/_bootstrap5-definition.scss +2 -2
- package/styles/combo-box/_fabric-dark-definition.scss +2 -2
- package/styles/combo-box/_fabric-definition.scss +2 -2
- package/styles/combo-box/_fluent-definition.scss +2 -2
- package/styles/combo-box/_fusionnew-definition.scss +2 -2
- package/styles/combo-box/_highcontrast-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/combo-box/_material-definition.scss +2 -2
- package/styles/combo-box/_material3-definition.scss +2 -2
- package/styles/combo-box/_tailwind-definition.scss +2 -2
- package/styles/combo-box/material3-dark.scss +1 -1
- package/styles/combo-box/material3.scss +1 -1
- package/styles/drop-down-base/_all.scss +2 -2
- package/styles/drop-down-base/_bds-definition.scss +134 -0
- package/styles/drop-down-base/_bootstrap-dark-definition.scss +83 -83
- package/styles/drop-down-base/_bootstrap-definition.scss +83 -83
- package/styles/drop-down-base/_bootstrap4-definition.scss +90 -90
- package/styles/drop-down-base/_bootstrap5-definition.scss +117 -117
- package/styles/drop-down-base/_definition.scss +23 -23
- package/styles/drop-down-base/_fabric-dark-definition.scss +86 -86
- package/styles/drop-down-base/_fabric-definition.scss +84 -84
- package/styles/drop-down-base/_fluent-definition.scss +121 -121
- package/styles/drop-down-base/_fusionnew-definition.scss +117 -117
- package/styles/drop-down-base/_highcontrast-definition.scss +105 -105
- package/styles/drop-down-base/_highcontrast-light-definition.scss +105 -105
- package/styles/drop-down-base/_layout.scss +187 -195
- package/styles/drop-down-base/_material-dark-definition.scss +86 -86
- package/styles/drop-down-base/_material-definition.scss +85 -85
- package/styles/drop-down-base/_material3-definition.scss +87 -87
- package/styles/drop-down-base/_tailwind-definition.scss +129 -129
- package/styles/drop-down-base/_theme.scss +391 -391
- package/styles/drop-down-base/bootstrap-dark.css +0 -8
- package/styles/drop-down-base/bootstrap.css +0 -8
- package/styles/drop-down-base/bootstrap4.css +0 -8
- package/styles/drop-down-base/bootstrap5-dark.css +0 -8
- package/styles/drop-down-base/bootstrap5.css +0 -8
- package/styles/drop-down-base/fabric-dark.css +0 -8
- package/styles/drop-down-base/fabric.css +0 -8
- package/styles/drop-down-base/fluent-dark.css +0 -8
- package/styles/drop-down-base/fluent.css +0 -8
- package/styles/drop-down-base/highcontrast-light.css +0 -8
- package/styles/drop-down-base/highcontrast.css +0 -8
- package/styles/drop-down-base/material-dark.css +0 -8
- package/styles/drop-down-base/material.css +0 -8
- package/styles/drop-down-base/material3-dark.css +0 -8
- package/styles/drop-down-base/material3-dark.scss +1 -1
- package/styles/drop-down-base/material3.css +0 -8
- package/styles/drop-down-base/material3.scss +1 -1
- package/styles/drop-down-base/tailwind-dark.css +0 -8
- package/styles/drop-down-base/tailwind.css +0 -8
- package/styles/drop-down-list/_all.scss +3 -3
- package/styles/drop-down-list/_bds-definition.scss +134 -0
- 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 +202 -202
- package/styles/drop-down-list/_bootstrap5-definition.scss +201 -201
- package/styles/drop-down-list/_fabric-dark-definition.scss +128 -128
- package/styles/drop-down-list/_fabric-definition.scss +124 -124
- package/styles/drop-down-list/_fluent-definition.scss +185 -185
- package/styles/drop-down-list/_fusionnew-definition.scss +201 -201
- package/styles/drop-down-list/_highcontrast-definition.scss +142 -142
- package/styles/drop-down-list/_highcontrast-light-definition.scss +144 -144
- package/styles/drop-down-list/_layout.scss +315 -310
- package/styles/drop-down-list/_material-dark-definition.scss +143 -143
- package/styles/drop-down-list/_material-definition.scss +167 -167
- package/styles/drop-down-list/_material3-definition.scss +180 -180
- package/styles/drop-down-list/_tailwind-definition.scss +134 -134
- package/styles/drop-down-list/_theme.scss +10 -10
- package/styles/drop-down-list/bootstrap-dark.css +5 -0
- package/styles/drop-down-list/bootstrap.css +5 -0
- package/styles/drop-down-list/bootstrap4.css +5 -0
- package/styles/drop-down-list/bootstrap5-dark.css +5 -0
- package/styles/drop-down-list/bootstrap5.css +5 -0
- package/styles/drop-down-list/fabric-dark.css +5 -0
- package/styles/drop-down-list/fabric.css +5 -0
- package/styles/drop-down-list/fluent-dark.css +5 -0
- package/styles/drop-down-list/fluent.css +5 -0
- package/styles/drop-down-list/highcontrast-light.css +5 -0
- package/styles/drop-down-list/highcontrast.css +5 -0
- package/styles/drop-down-list/icons/_bds.scss +14 -0
- 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/_bootstrap5.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/_fluent.scss +14 -14
- package/styles/drop-down-list/icons/_fusionnew.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/icons/_material3.scss +14 -14
- package/styles/drop-down-list/icons/_tailwind.scss +14 -14
- package/styles/drop-down-list/material-dark.css +5 -0
- package/styles/drop-down-list/material.css +5 -0
- package/styles/drop-down-list/material3-dark.css +5 -0
- package/styles/drop-down-list/material3-dark.scss +1 -1
- package/styles/drop-down-list/material3.css +5 -0
- package/styles/drop-down-list/material3.scss +1 -1
- package/styles/drop-down-list/tailwind-dark.css +5 -0
- package/styles/drop-down-list/tailwind.css +5 -0
- package/styles/drop-down-tree/_all.scss +2 -2
- package/styles/drop-down-tree/_bds-definition.scss +61 -0
- package/styles/drop-down-tree/_bootstrap-dark-definition.scss +71 -71
- package/styles/drop-down-tree/_bootstrap-definition.scss +70 -70
- package/styles/drop-down-tree/_bootstrap4-definition.scss +71 -71
- package/styles/drop-down-tree/_bootstrap5-definition.scss +59 -59
- package/styles/drop-down-tree/_fabric-dark-definition.scss +71 -71
- package/styles/drop-down-tree/_fabric-definition.scss +71 -71
- package/styles/drop-down-tree/_fluent-definition.scss +65 -65
- package/styles/drop-down-tree/_fusionnew-definition.scss +59 -59
- package/styles/drop-down-tree/_highcontrast-definition.scss +71 -71
- package/styles/drop-down-tree/_highcontrast-light-definition.scss +71 -71
- package/styles/drop-down-tree/_layout.scss +1423 -1412
- package/styles/drop-down-tree/_material-dark-definition.scss +72 -72
- package/styles/drop-down-tree/_material-definition.scss +72 -72
- package/styles/drop-down-tree/_material3-definition.scss +76 -76
- package/styles/drop-down-tree/_tailwind-definition.scss +61 -61
- package/styles/drop-down-tree/_theme.scss +132 -132
- package/styles/drop-down-tree/bootstrap-dark.css +4 -0
- package/styles/drop-down-tree/bootstrap.css +4 -0
- package/styles/drop-down-tree/bootstrap4.css +4 -0
- package/styles/drop-down-tree/bootstrap5-dark.css +4 -0
- package/styles/drop-down-tree/bootstrap5.css +4 -0
- package/styles/drop-down-tree/fabric-dark.css +4 -0
- package/styles/drop-down-tree/fabric.css +4 -0
- package/styles/drop-down-tree/fluent-dark.css +6 -0
- package/styles/drop-down-tree/fluent.css +6 -0
- package/styles/drop-down-tree/highcontrast-light.css +4 -0
- package/styles/drop-down-tree/highcontrast.css +4 -0
- package/styles/drop-down-tree/icons/_bds.scss +11 -0
- 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/_bootstrap5.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/_fluent.scss +11 -11
- package/styles/drop-down-tree/icons/_fusionnew.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/icons/_material3.scss +11 -11
- package/styles/drop-down-tree/icons/_tailwind-dark.scss +11 -11
- package/styles/drop-down-tree/icons/_tailwind.scss +11 -11
- package/styles/drop-down-tree/material-dark.css +4 -0
- package/styles/drop-down-tree/material.css +4 -0
- package/styles/drop-down-tree/material3-dark.css +4 -0
- package/styles/drop-down-tree/material3-dark.scss +1 -1
- package/styles/drop-down-tree/material3.css +4 -0
- package/styles/drop-down-tree/material3.scss +1 -1
- package/styles/drop-down-tree/tailwind-dark.css +4 -0
- package/styles/drop-down-tree/tailwind.css +4 -0
- package/styles/fabric-dark.css +12 -9
- package/styles/fabric.css +12 -9
- package/styles/fluent-dark.css +18 -9
- package/styles/fluent.css +18 -9
- package/styles/highcontrast-light.css +12 -9
- package/styles/highcontrast.css +12 -9
- package/styles/list-box/_all.scss +2 -2
- package/styles/list-box/_bds-definition.scss +136 -0
- package/styles/list-box/_bootstrap-dark-definition.scss +126 -126
- package/styles/list-box/_bootstrap-definition.scss +119 -119
- package/styles/list-box/_bootstrap4-definition.scss +124 -124
- package/styles/list-box/_bootstrap5-definition.scss +120 -120
- package/styles/list-box/_fabric-dark-definition.scss +126 -126
- package/styles/list-box/_fabric-definition.scss +119 -119
- package/styles/list-box/_fluent-definition.scss +120 -120
- package/styles/list-box/_fusionnew-definition.scss +111 -111
- package/styles/list-box/_highcontrast-definition.scss +119 -119
- package/styles/list-box/_highcontrast-light-definition.scss +126 -126
- package/styles/list-box/_layout.scss +542 -542
- package/styles/list-box/_material-dark-definition.scss +126 -126
- package/styles/list-box/_material-definition.scss +119 -119
- package/styles/list-box/_material3-definition.scss +119 -119
- package/styles/list-box/_tailwind-definition.scss +119 -119
- package/styles/list-box/_theme.scss +382 -382
- package/styles/list-box/icons/_bds.scss +25 -0
- 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/_bootstrap5.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/_fluent.scss +25 -25
- package/styles/list-box/icons/_fusionnew.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/icons/_material3.scss +25 -25
- package/styles/list-box/icons/_tailwind-dark.scss +25 -25
- package/styles/list-box/icons/_tailwind.scss +25 -25
- package/styles/list-box/material3-dark.scss +1 -1
- package/styles/list-box/material3.scss +1 -1
- package/styles/material-dark.css +11 -9
- package/styles/material.css +11 -9
- package/styles/material3-dark.css +11 -9
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +11 -9
- package/styles/material3.scss +1 -1
- package/styles/mention/_all.scss +1 -1
- package/styles/mention/_bds-definition.scss +1 -0
- package/styles/mention/_bootstrap-dark-definition.scss +3 -3
- package/styles/mention/_bootstrap-definition.scss +3 -3
- package/styles/mention/_bootstrap4-definition.scss +3 -3
- package/styles/mention/_bootstrap5-definition.scss +1 -1
- package/styles/mention/_fabric-dark-definition.scss +2 -2
- package/styles/mention/_fabric-definition.scss +3 -3
- package/styles/mention/_fluent-definition.scss +1 -1
- package/styles/mention/_fusionnew-definition.scss +1 -1
- package/styles/mention/_highcontrast-definition.scss +3 -3
- package/styles/mention/_highcontrast-light-definition.scss +3 -3
- package/styles/mention/_layout.scss +6 -6
- package/styles/mention/_material-dark-definition.scss +3 -3
- package/styles/mention/_material-definition.scss +3 -3
- package/styles/mention/_material3-definition.scss +1 -1
- package/styles/mention/_tailwind-definition.scss +1 -1
- package/styles/mention/material3-dark.scss +1 -1
- package/styles/mention/material3.scss +1 -1
- package/styles/multi-select/_all.scss +2 -2
- package/styles/multi-select/_bds-definition.scss +235 -0
- package/styles/multi-select/_bootstrap-dark-definition.scss +207 -203
- package/styles/multi-select/_bootstrap-definition.scss +196 -192
- package/styles/multi-select/_bootstrap4-definition.scss +278 -278
- package/styles/multi-select/_bootstrap5-definition.scss +230 -230
- package/styles/multi-select/_fabric-dark-definition.scss +192 -192
- package/styles/multi-select/_fabric-definition.scss +183 -183
- package/styles/multi-select/_fluent-definition.scss +246 -241
- package/styles/multi-select/_fusionnew-definition.scss +227 -227
- package/styles/multi-select/_highcontrast-definition.scss +303 -303
- package/styles/multi-select/_highcontrast-light-definition.scss +297 -297
- package/styles/multi-select/_layout.scss +2206 -2199
- package/styles/multi-select/_material-dark-definition.scss +230 -230
- package/styles/multi-select/_material-definition.scss +223 -223
- package/styles/multi-select/_material3-definition.scss +246 -246
- package/styles/multi-select/_tailwind-definition.scss +235 -235
- package/styles/multi-select/_theme.scss +586 -586
- package/styles/multi-select/bootstrap-dark.css +7 -1
- package/styles/multi-select/bootstrap.css +7 -1
- package/styles/multi-select/bootstrap4.css +2 -1
- package/styles/multi-select/bootstrap5-dark.css +2 -1
- package/styles/multi-select/bootstrap5.css +2 -1
- package/styles/multi-select/fabric-dark.css +3 -1
- package/styles/multi-select/fabric.css +3 -1
- package/styles/multi-select/fluent-dark.css +7 -1
- package/styles/multi-select/fluent.css +7 -1
- package/styles/multi-select/highcontrast-light.css +3 -1
- package/styles/multi-select/highcontrast.css +3 -1
- package/styles/multi-select/icons/_bds.scss +26 -0
- 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/_bootstrap5.scss +26 -26
- package/styles/multi-select/icons/_fabric-dark.scss +26 -26
- package/styles/multi-select/icons/_fabric.scss +26 -26
- package/styles/multi-select/icons/_fluent.scss +55 -55
- package/styles/multi-select/icons/_fusionnew.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 +693 -693
- package/styles/multi-select/icons/_material.scss +693 -693
- package/styles/multi-select/icons/_material3.scss +692 -692
- package/styles/multi-select/icons/_tailwind.scss +26 -26
- package/styles/multi-select/material-dark.css +2 -1
- package/styles/multi-select/material.css +2 -1
- package/styles/multi-select/material3-dark.css +2 -1
- package/styles/multi-select/material3-dark.scss +1 -1
- package/styles/multi-select/material3.css +2 -1
- package/styles/multi-select/material3.scss +1 -1
- package/styles/multi-select/tailwind-dark.css +2 -1
- package/styles/multi-select/tailwind.css +2 -1
- package/styles/tailwind-dark.css +11 -9
- package/styles/tailwind.css +11 -9
- package/.eslintrc.json +0 -260
- package/dist/ej2-dropdowns.min.js +0 -10
- package/dist/global/ej2-dropdowns.min.js +0 -11
- package/dist/global/ej2-dropdowns.min.js.map +0 -1
- package/dist/global/index.d.ts +0 -14
- package/tslint.json +0 -111
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
-
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;
|
|
18
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
-
};
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
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;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
20
|
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
21
21
|
/// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
|
|
22
22
|
import { EventHandler, Property, Event, compile, KeyboardEvents, append, select } from '@syncfusion/ej2-base';
|
|
@@ -91,7 +91,6 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
91
91
|
_this.isListSearched = false;
|
|
92
92
|
_this.preventChange = false;
|
|
93
93
|
_this.isAngular = false;
|
|
94
|
-
_this.itemCount = 10;
|
|
95
94
|
_this.virtualListHeight = 0;
|
|
96
95
|
_this.isVirtualScrolling = false;
|
|
97
96
|
_this.isPreventScrollAction = false;
|
|
@@ -106,6 +105,10 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
106
105
|
_this.pageCount = 0;
|
|
107
106
|
_this.isPreventKeyAction = false;
|
|
108
107
|
_this.generatedDataObject = {};
|
|
108
|
+
_this.incrementalQueryString = '';
|
|
109
|
+
_this.incrementalEndIndex = 0;
|
|
110
|
+
_this.incrementalStartIndex = 0;
|
|
111
|
+
_this.incrementalPreQueryString = '';
|
|
109
112
|
_this.isTouched = false;
|
|
110
113
|
_this.virtualListInfo = {
|
|
111
114
|
currentPageNumber: null,
|
|
@@ -215,8 +218,10 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
215
218
|
};
|
|
216
219
|
DropDownList.prototype.renderList = function (e, isEmptyData) {
|
|
217
220
|
_super.prototype.render.call(this, e, isEmptyData);
|
|
218
|
-
|
|
219
|
-
|
|
221
|
+
if (!(this.dataSource instanceof DataManager)) {
|
|
222
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
223
|
+
this.totalItemCount = this.dataSource && this.dataSource.length ? this.dataSource.length : 0;
|
|
224
|
+
}
|
|
220
225
|
this.unWireListEvents();
|
|
221
226
|
this.wireListEvents();
|
|
222
227
|
};
|
|
@@ -680,12 +685,136 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
680
685
|
DropDownList.prototype.isValidLI = function (li) {
|
|
681
686
|
return (li && li.hasAttribute('role') && li.getAttribute('role') === 'option');
|
|
682
687
|
};
|
|
688
|
+
DropDownList.prototype.updateIncrementalInfo = function (startIndex, endIndex) {
|
|
689
|
+
this.viewPortInfo.startIndex = startIndex;
|
|
690
|
+
this.viewPortInfo.endIndex = endIndex;
|
|
691
|
+
this.updateVirtualItemIndex();
|
|
692
|
+
this.isIncrementalRequest = true;
|
|
693
|
+
this.resetList(this.dataSource, this.fields, this.query);
|
|
694
|
+
this.isIncrementalRequest = false;
|
|
695
|
+
};
|
|
696
|
+
DropDownList.prototype.updateIncrementalView = function (startIndex, endIndex) {
|
|
697
|
+
this.viewPortInfo.startIndex = startIndex;
|
|
698
|
+
this.viewPortInfo.endIndex = endIndex;
|
|
699
|
+
this.updateVirtualItemIndex();
|
|
700
|
+
this.resetList(this.dataSource, this.fields, this.query);
|
|
701
|
+
this.UpdateSkeleton();
|
|
702
|
+
this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
|
|
703
|
+
this.ulElement = this.list.querySelector('ul');
|
|
704
|
+
};
|
|
705
|
+
DropDownList.prototype.updateIncrementalItemIndex = function (startIndex, endIndex) {
|
|
706
|
+
this.incrementalStartIndex = startIndex;
|
|
707
|
+
this.incrementalEndIndex = endIndex;
|
|
708
|
+
};
|
|
683
709
|
DropDownList.prototype.incrementalSearch = function (e) {
|
|
684
710
|
if (this.liCollections.length > 0) {
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
this.
|
|
711
|
+
if (this.enableVirtualization) {
|
|
712
|
+
var updatingincrementalindex = false;
|
|
713
|
+
var queryStringUpdated = false;
|
|
714
|
+
var activeElement = this.ulElement.getElementsByClassName('e-active')[0];
|
|
715
|
+
var currentValue = activeElement ? activeElement.textContent : null;
|
|
716
|
+
if (this.incrementalQueryString == '') {
|
|
717
|
+
this.incrementalQueryString = String.fromCharCode(e.charCode);
|
|
718
|
+
this.incrementalPreQueryString = this.incrementalQueryString;
|
|
719
|
+
}
|
|
720
|
+
else if (String.fromCharCode(e.charCode).toLocaleLowerCase() == this.incrementalPreQueryString.toLocaleLowerCase()) {
|
|
721
|
+
queryStringUpdated = true;
|
|
722
|
+
}
|
|
723
|
+
else {
|
|
724
|
+
this.incrementalQueryString = String.fromCharCode(e.charCode);
|
|
725
|
+
}
|
|
726
|
+
if ((this.viewPortInfo.endIndex >= this.incrementalEndIndex && this.incrementalEndIndex <= this.totalItemCount) || this.incrementalEndIndex == 0) {
|
|
727
|
+
updatingincrementalindex = true;
|
|
728
|
+
this.incrementalStartIndex = this.incrementalEndIndex;
|
|
729
|
+
if (this.incrementalEndIndex == 0) {
|
|
730
|
+
this.incrementalEndIndex = 100 > this.totalItemCount ? this.totalItemCount : 100;
|
|
731
|
+
}
|
|
732
|
+
else {
|
|
733
|
+
this.incrementalEndIndex = this.incrementalEndIndex + 100 > this.totalItemCount ? this.totalItemCount : this.incrementalEndIndex + 100;
|
|
734
|
+
}
|
|
735
|
+
this.updateIncrementalInfo(this.incrementalStartIndex, this.incrementalEndIndex);
|
|
736
|
+
updatingincrementalindex = true;
|
|
737
|
+
}
|
|
738
|
+
if (this.viewPortInfo.startIndex !== 0 || updatingincrementalindex) {
|
|
739
|
+
this.updateIncrementalView(0, this.itemCount);
|
|
740
|
+
}
|
|
741
|
+
var li = incrementalSearch(e.charCode, this.incrementalLiCollections, this.activeIndex, true, this.element.id, queryStringUpdated, currentValue, true);
|
|
742
|
+
while (isNullOrUndefined(li) && this.incrementalEndIndex < this.totalItemCount) {
|
|
743
|
+
this.updateIncrementalItemIndex(this.incrementalEndIndex, this.incrementalEndIndex + 100 > this.totalItemCount ? this.totalItemCount : this.incrementalEndIndex + 100);
|
|
744
|
+
this.updateIncrementalInfo(this.incrementalStartIndex, this.incrementalEndIndex);
|
|
745
|
+
updatingincrementalindex = true;
|
|
746
|
+
if (this.viewPortInfo.startIndex !== 0 || updatingincrementalindex) {
|
|
747
|
+
this.updateIncrementalView(0, this.itemCount);
|
|
748
|
+
}
|
|
749
|
+
li = incrementalSearch(e.charCode, this.incrementalLiCollections, 0, true, this.element.id, queryStringUpdated, currentValue, true, true);
|
|
750
|
+
if (!isNullOrUndefined(li)) {
|
|
751
|
+
break;
|
|
752
|
+
}
|
|
753
|
+
if (isNullOrUndefined(li) && this.incrementalEndIndex >= this.totalItemCount) {
|
|
754
|
+
this.updateIncrementalItemIndex(0, 100 > this.totalItemCount ? this.totalItemCount : 100);
|
|
755
|
+
break;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
if (isNullOrUndefined(li) && this.incrementalEndIndex >= this.totalItemCount) {
|
|
759
|
+
this.updateIncrementalItemIndex(0, 100 > this.totalItemCount ? this.totalItemCount : 100);
|
|
760
|
+
this.updateIncrementalInfo(this.incrementalStartIndex, this.incrementalEndIndex);
|
|
761
|
+
updatingincrementalindex = true;
|
|
762
|
+
if (this.viewPortInfo.startIndex !== 0 || updatingincrementalindex) {
|
|
763
|
+
this.updateIncrementalView(0, this.itemCount);
|
|
764
|
+
}
|
|
765
|
+
li = incrementalSearch(e.charCode, this.incrementalLiCollections, 0, true, this.element.id, queryStringUpdated, currentValue, true, true);
|
|
766
|
+
}
|
|
767
|
+
var index = li && this.getIndexByValue(li.getAttribute('data-value'));
|
|
768
|
+
if (!index) {
|
|
769
|
+
for (var i = 0; i < this.incrementalLiCollections.length; i++) {
|
|
770
|
+
if (!isNullOrUndefined(li) && !isNullOrUndefined(li.getAttribute('data-value')) && this.incrementalLiCollections[i].getAttribute('data-value') === li.getAttribute('data-value').toString()) {
|
|
771
|
+
index = i;
|
|
772
|
+
index = this.incrementalStartIndex + index;
|
|
773
|
+
break;
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
else {
|
|
778
|
+
index = index - this.skeletonCount;
|
|
779
|
+
}
|
|
780
|
+
if (index) {
|
|
781
|
+
if ((!(this.viewPortInfo.startIndex >= index)) || (!(index >= this.viewPortInfo.endIndex))) {
|
|
782
|
+
var startIndex = index - ((this.itemCount / 2) - 2) > 0 ? index - ((this.itemCount / 2) - 2) : 0;
|
|
783
|
+
var endIndex = this.viewPortInfo.startIndex + this.itemCount > this.totalItemCount ? this.totalItemCount : this.viewPortInfo.startIndex + this.itemCount;
|
|
784
|
+
this.updateIncrementalView(startIndex, endIndex);
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
if (!isNullOrUndefined(li)) {
|
|
788
|
+
var index_1 = this.getIndexByValue(li.getAttribute('data-value')) - this.skeletonCount;
|
|
789
|
+
if (index_1 > this.itemCount / 2) {
|
|
790
|
+
var startIndex = this.viewPortInfo.startIndex + ((this.itemCount / 2) - 2) < this.totalItemCount ? this.viewPortInfo.startIndex + ((this.itemCount / 2) - 2) : this.totalItemCount;
|
|
791
|
+
var endIndex = this.viewPortInfo.startIndex + this.itemCount > this.totalItemCount ? this.totalItemCount : this.viewPortInfo.startIndex + this.itemCount;
|
|
792
|
+
this.updateIncrementalView(startIndex, endIndex);
|
|
793
|
+
}
|
|
794
|
+
li = this.getElementByValue(li.getAttribute('data-value'));
|
|
795
|
+
this.setSelection(li, e);
|
|
796
|
+
this.setScrollPosition();
|
|
797
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
798
|
+
this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();
|
|
799
|
+
if (this.enableVirtualization && !this.fields.groupBy) {
|
|
800
|
+
var selectedLiOffsetTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.selectedLI.offsetTop + (this.virtualListInfo.startIndex * this.selectedLI.offsetHeight) : this.selectedLI.offsetTop;
|
|
801
|
+
this.list.scrollTop = selectedLiOffsetTop - (this.list.querySelectorAll('.e-virtual-list').length * this.selectedLI.offsetHeight);
|
|
802
|
+
}
|
|
803
|
+
this.incrementalPreQueryString = this.incrementalQueryString;
|
|
804
|
+
}
|
|
805
|
+
else {
|
|
806
|
+
this.updateIncrementalView(0, this.itemCount);
|
|
807
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
808
|
+
this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();
|
|
809
|
+
this.list.scrollTop = 0;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
else {
|
|
813
|
+
var li = incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.element.id);
|
|
814
|
+
if (!isNullOrUndefined(li)) {
|
|
815
|
+
this.setSelection(li, e);
|
|
816
|
+
this.setScrollPosition();
|
|
817
|
+
}
|
|
689
818
|
}
|
|
690
819
|
}
|
|
691
820
|
};
|
|
@@ -741,6 +870,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
741
870
|
if (isNullOrUndefined(this.list) && !this.isRequested && !isTabAction && e.action !== 'escape') {
|
|
742
871
|
this.searchKeyEvent = e;
|
|
743
872
|
this.renderList(e);
|
|
873
|
+
this.UpdateSkeleton();
|
|
874
|
+
this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
|
|
875
|
+
this.ulElement = this.list.querySelector('ul');
|
|
744
876
|
}
|
|
745
877
|
if (isNullOrUndefined(this.list) || (!isNullOrUndefined(this.liCollections) &&
|
|
746
878
|
isNavigation && this.liCollections.length === 0) || this.isRequested) {
|
|
@@ -818,7 +950,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
818
950
|
var focusEle = this.list.querySelector('.' + dropDownListClasses.focus);
|
|
819
951
|
if (this.isSelectFocusItem(focusEle) && !isVirtualKeyAction) {
|
|
820
952
|
this.setSelection(focusEle, e);
|
|
821
|
-
if (this.enableVirtualization) {
|
|
953
|
+
if (this.enableVirtualization && !this.fields.groupBy && this.getModuleName() !== 'combobox') {
|
|
822
954
|
var selectedLiOffsetTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.selectedLI.offsetTop + (this.virtualListInfo.startIndex * this.selectedLI.offsetHeight) : this.selectedLI.offsetTop;
|
|
823
955
|
this.list.scrollTop = selectedLiOffsetTop - (this.list.querySelectorAll('.e-virtual-list').length * this.selectedLI.offsetHeight);
|
|
824
956
|
}
|
|
@@ -846,7 +978,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
846
978
|
}
|
|
847
979
|
else {
|
|
848
980
|
if (this.getModuleName() === 'autocomplete') {
|
|
849
|
-
var value = this.selectedLI.
|
|
981
|
+
var value = this.getFormattedValue(this.selectedLI.getAttribute('data-value'));
|
|
850
982
|
nextItem = this.getElementByValue(value);
|
|
851
983
|
}
|
|
852
984
|
else {
|
|
@@ -858,26 +990,75 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
858
990
|
if (!isNullOrUndefined(nextItem)) {
|
|
859
991
|
this.setSelection(nextItem, e);
|
|
860
992
|
}
|
|
993
|
+
else if (this.enableVirtualization && !this.isPopupOpen && this.getModuleName() !== 'autocomplete' && ((this.viewPortInfo.endIndex !== this.totalItemCount && e.action === 'down') || (this.viewPortInfo.startIndex !== 0 && e.action === 'up'))) {
|
|
994
|
+
if (e.action === 'down') {
|
|
995
|
+
this.viewPortInfo.startIndex = (this.viewPortInfo.startIndex + this.itemCount) < (this.totalItemCount - this.itemCount) ? this.viewPortInfo.startIndex + this.itemCount : this.totalItemCount - this.itemCount;
|
|
996
|
+
this.viewPortInfo.endIndex = this.viewPortInfo.startIndex + this.itemCount;
|
|
997
|
+
this.updateVirtualItemIndex();
|
|
998
|
+
this.isCustomFilter = this.getModuleName() === 'combobox' ? true : this.isCustomFilter;
|
|
999
|
+
this.resetList(this.dataSource, this.fields, this.query);
|
|
1000
|
+
this.isCustomFilter = this.getModuleName() === 'combobox' ? false : this.isCustomFilter;
|
|
1001
|
+
var value_2 = this.liCollections[0].getAttribute('data-value') !== "null" ? this.getFormattedValue(this.liCollections[0].getAttribute('data-value')) : null;
|
|
1002
|
+
var selectedData = this.getDataByValue(value_2);
|
|
1003
|
+
if (selectedData) {
|
|
1004
|
+
this.itemData = selectedData;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
else if (e.action === 'up') {
|
|
1008
|
+
this.viewPortInfo.startIndex = (this.viewPortInfo.startIndex - this.itemCount) > 0 ? this.viewPortInfo.startIndex - this.itemCount : 0;
|
|
1009
|
+
this.viewPortInfo.endIndex = this.viewPortInfo.startIndex + this.itemCount;
|
|
1010
|
+
this.updateVirtualItemIndex();
|
|
1011
|
+
this.isCustomFilter = this.getModuleName() === 'combobox' ? true : this.isCustomFilter;
|
|
1012
|
+
this.resetList(this.dataSource, this.fields, this.query);
|
|
1013
|
+
this.isCustomFilter = this.getModuleName() === 'combobox' ? false : this.isCustomFilter;
|
|
1014
|
+
var value_3 = this.liCollections[this.liCollections.length - 1].getAttribute('data-value') !== "null" ? this.getFormattedValue(this.liCollections[this.liCollections.length - 1].getAttribute('data-value')) : null;
|
|
1015
|
+
var selectedData = this.getDataByValue(value_3);
|
|
1016
|
+
if (selectedData) {
|
|
1017
|
+
this.itemData = selectedData;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
this.UpdateSkeleton();
|
|
1021
|
+
this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
|
|
1022
|
+
this.ulElement = this.list.querySelector('ul');
|
|
1023
|
+
this.handleVirtualKeyboardActions(e, this.pageCount);
|
|
1024
|
+
}
|
|
861
1025
|
}
|
|
862
1026
|
if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
|
|
863
|
-
var
|
|
864
|
-
var filterIndex = this.getIndexByValueFilter(
|
|
1027
|
+
var value_4 = this.getItemData().value;
|
|
1028
|
+
var filterIndex = this.getIndexByValueFilter(value_4);
|
|
865
1029
|
if (!isNullOrUndefined(filterIndex)) {
|
|
866
1030
|
this.activeIndex = filterIndex;
|
|
867
1031
|
}
|
|
868
1032
|
}
|
|
869
1033
|
e.preventDefault();
|
|
870
1034
|
};
|
|
1035
|
+
DropDownList.prototype.updateVirtualItemIndex = function () {
|
|
1036
|
+
this.virtualItemStartIndex = this.viewPortInfo.startIndex;
|
|
1037
|
+
this.virtualItemEndIndex = this.viewPortInfo.endIndex;
|
|
1038
|
+
this.virtualListInfo = this.viewPortInfo;
|
|
1039
|
+
};
|
|
871
1040
|
DropDownList.prototype.updateHomeEndAction = function (e, isVirtualKeyAction) {
|
|
872
1041
|
if (this.getModuleName() === 'dropdownlist') {
|
|
873
1042
|
var findLi = 0;
|
|
874
1043
|
if (e.action === 'home') {
|
|
875
1044
|
findLi = 0;
|
|
876
|
-
if (this.enableVirtualization) {
|
|
1045
|
+
if (this.enableVirtualization && this.isPopupOpen) {
|
|
877
1046
|
findLi = this.skeletonCount;
|
|
878
1047
|
}
|
|
1048
|
+
else if (this.enableVirtualization && !this.isPopupOpen && this.viewPortInfo.startIndex !== 0) {
|
|
1049
|
+
this.viewPortInfo.startIndex = 0;
|
|
1050
|
+
this.viewPortInfo.endIndex = this.itemCount;
|
|
1051
|
+
this.updateVirtualItemIndex();
|
|
1052
|
+
this.resetList(this.dataSource, this.fields, this.query);
|
|
1053
|
+
}
|
|
879
1054
|
}
|
|
880
1055
|
else {
|
|
1056
|
+
if (this.enableVirtualization && !this.isPopupOpen && this.viewPortInfo.endIndex !== this.totalItemCount) {
|
|
1057
|
+
this.viewPortInfo.startIndex = this.totalItemCount - this.itemCount;
|
|
1058
|
+
this.viewPortInfo.endIndex = this.totalItemCount;
|
|
1059
|
+
this.updateVirtualItemIndex();
|
|
1060
|
+
this.resetList(this.dataSource, this.fields, this.query);
|
|
1061
|
+
}
|
|
881
1062
|
findLi = this.getItems().length - 1;
|
|
882
1063
|
}
|
|
883
1064
|
e.preventDefault();
|
|
@@ -973,12 +1154,6 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
973
1154
|
DropDownList.prototype.isSelectFocusItem = function (element) {
|
|
974
1155
|
return !isNullOrUndefined(element);
|
|
975
1156
|
};
|
|
976
|
-
DropDownList.prototype.getPageCount = function (returnExactCount) {
|
|
977
|
-
var liHeight = this.list.classList.contains(dropDownBaseClasses.noData) ? null :
|
|
978
|
-
getComputedStyle(this.getItems()[0], null).getPropertyValue('height');
|
|
979
|
-
var pageCount = Math.round(this.list.getBoundingClientRect().height / parseInt(liHeight, 10));
|
|
980
|
-
return returnExactCount ? pageCount : Math.round(pageCount);
|
|
981
|
-
};
|
|
982
1157
|
DropDownList.prototype.pageUpSelection = function (steps, event, isVirtualKeyAction) {
|
|
983
1158
|
var previousItem = steps >= 0 ? this.liCollections[steps + 1] : this.liCollections[0];
|
|
984
1159
|
if ((this.enableVirtualization && this.activeIndex == null) || isVirtualKeyAction) {
|
|
@@ -1241,7 +1416,10 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1241
1416
|
.then(function (e) {
|
|
1242
1417
|
if (e.result.length > 0) {
|
|
1243
1418
|
_this.itemData = e.result[0];
|
|
1244
|
-
|
|
1419
|
+
var dataItem = _this.getItemData();
|
|
1420
|
+
if ((_this.value === dataItem.value && _this.text !== dataItem.text) || (_this.value !== dataItem.value && _this.text === dataItem.text)) {
|
|
1421
|
+
_this.setProperties({ 'text': dataItem.text, 'value': dataItem.value });
|
|
1422
|
+
}
|
|
1245
1423
|
}
|
|
1246
1424
|
});
|
|
1247
1425
|
}
|
|
@@ -1249,7 +1427,10 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1249
1427
|
var getItem = new DataManager(this.dataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', this.value)));
|
|
1250
1428
|
if (getItem && getItem.length > 0) {
|
|
1251
1429
|
this.itemData = getItem[0];
|
|
1252
|
-
|
|
1430
|
+
var dataItem = this.getItemData();
|
|
1431
|
+
if ((this.value === dataItem.value && this.text !== dataItem.text) || (this.value !== dataItem.value && this.text === dataItem.text)) {
|
|
1432
|
+
this.setProperties({ 'text': dataItem.text, 'value': dataItem.value });
|
|
1433
|
+
}
|
|
1253
1434
|
}
|
|
1254
1435
|
}
|
|
1255
1436
|
}
|
|
@@ -1511,7 +1692,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1511
1692
|
this.typedString = this.filterInput.value;
|
|
1512
1693
|
this.preventAutoFill = false;
|
|
1513
1694
|
this.searchLists(e);
|
|
1514
|
-
if (this.enableVirtualization) {
|
|
1695
|
+
if ((this.enableVirtualization && this.getModuleName() !== 'autocomplete') || (this.getModuleName() === 'autocomplete' && !(this.dataSource instanceof DataManager)) || (this.getModuleName() === 'autocomplete' && (this.dataSource instanceof DataManager) && this.totalItemCount != 0)) {
|
|
1515
1696
|
this.getFilteringSkeletonCount();
|
|
1516
1697
|
}
|
|
1517
1698
|
break;
|
|
@@ -1526,19 +1707,28 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1526
1707
|
var currentSkeletonCount = this.skeletonCount;
|
|
1527
1708
|
this.getSkeletonCount(true);
|
|
1528
1709
|
this.skeletonCount = this.dataCount > this.itemCount * 2 ? this.skeletonCount : difference > this.skeletonCount ? this.skeletonCount : difference > 0 ? difference : 0;
|
|
1710
|
+
var skeletonUpdated = true;
|
|
1711
|
+
if (this.getModuleName() === 'autocomplete' && (this.totalItemCount != 0 && this.totalItemCount < (this.itemCount * 2))) {
|
|
1712
|
+
this.skeletonCount = 0;
|
|
1713
|
+
skeletonUpdated = false;
|
|
1714
|
+
}
|
|
1529
1715
|
if (!this.list.classList.contains(dropDownBaseClasses.noData)) {
|
|
1530
1716
|
var isSkeletonCountChange = currentSkeletonCount !== this.skeletonCount;
|
|
1531
|
-
if (currentSkeletonCount !== this.skeletonCount) {
|
|
1717
|
+
if (currentSkeletonCount !== this.skeletonCount && skeletonUpdated) {
|
|
1532
1718
|
this.UpdateSkeleton(true, Math.abs(currentSkeletonCount - this.skeletonCount));
|
|
1533
1719
|
}
|
|
1534
1720
|
else {
|
|
1535
1721
|
this.UpdateSkeleton();
|
|
1536
1722
|
}
|
|
1537
1723
|
this.liCollections = this.list.querySelectorAll('.e-list-item');
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1724
|
+
if ((this.list.getElementsByClassName('e-virtual-ddl').length > 0)) {
|
|
1725
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1726
|
+
this.list.getElementsByClassName('e-virtual-ddl')[0].style = this.GetVirtualTrackHeight();
|
|
1727
|
+
}
|
|
1728
|
+
if (this.list.getElementsByClassName('e-virtual-ddl-content').length > 0) {
|
|
1729
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1730
|
+
this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();
|
|
1731
|
+
}
|
|
1542
1732
|
}
|
|
1543
1733
|
};
|
|
1544
1734
|
DropDownList.prototype.getSkeletonCount = function (retainSkeleton) {
|
|
@@ -1591,12 +1781,26 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1591
1781
|
else {
|
|
1592
1782
|
filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query();
|
|
1593
1783
|
}
|
|
1594
|
-
if (this.enableVirtualization && (this.viewPortInfo.endIndex != 0)) {
|
|
1784
|
+
if (this.enableVirtualization && (this.viewPortInfo.endIndex != 0) && (!(this.dataSource instanceof DataManager) || (this.dataSource instanceof DataManager && this.virtualGroupDataSource))) {
|
|
1595
1785
|
var takeValue = this.getTakeValue();
|
|
1596
|
-
|
|
1786
|
+
var alreadySkipAdded = false;
|
|
1787
|
+
if (filterQuery) {
|
|
1788
|
+
for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
|
|
1789
|
+
if (filterQuery.queries[queryElements].fn === 'onSkip') {
|
|
1790
|
+
alreadySkipAdded = true;
|
|
1791
|
+
break;
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
if (this.allowFiltering || !this.isPopupOpen || !alreadySkipAdded) {
|
|
1597
1796
|
filterQuery.skip(this.virtualItemStartIndex);
|
|
1598
1797
|
}
|
|
1599
|
-
|
|
1798
|
+
if (this.isIncrementalRequest) {
|
|
1799
|
+
filterQuery.take(this.incrementalEndIndex);
|
|
1800
|
+
}
|
|
1801
|
+
else {
|
|
1802
|
+
filterQuery.take(takeValue);
|
|
1803
|
+
}
|
|
1600
1804
|
filterQuery.requiresCount();
|
|
1601
1805
|
}
|
|
1602
1806
|
return filterQuery;
|
|
@@ -1644,7 +1848,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1644
1848
|
* @param {Query} query - Specify the query to filter the data.
|
|
1645
1849
|
* @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
|
|
1646
1850
|
* @returns {void}
|
|
1647
|
-
|
|
1851
|
+
* @deprecated
|
|
1648
1852
|
*/
|
|
1649
1853
|
DropDownList.prototype.filter = function (dataSource, query, fields) {
|
|
1650
1854
|
this.isCustomFilter = true;
|
|
@@ -1840,7 +2044,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1840
2044
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1841
2045
|
DropDownList.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {
|
|
1842
2046
|
var _this = this;
|
|
1843
|
-
if (this.dataSource instanceof DataManager && !isNullOrUndefined(e)) {
|
|
2047
|
+
if (this.dataSource instanceof DataManager && !isNullOrUndefined(e) && !this.virtualGroupDataSource) {
|
|
1844
2048
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1845
2049
|
this.totalItemCount = e.count;
|
|
1846
2050
|
}
|
|
@@ -1867,7 +2071,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1867
2071
|
this.list.scrollTop = 0;
|
|
1868
2072
|
}
|
|
1869
2073
|
if (!isNullOrUndefined(ulElement)) {
|
|
1870
|
-
attributes(ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
|
|
2074
|
+
attributes(ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false', 'aria-label': 'listbox' });
|
|
1871
2075
|
}
|
|
1872
2076
|
if (this.initRemoteRender) {
|
|
1873
2077
|
this.initial = true;
|
|
@@ -1993,10 +2197,10 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1993
2197
|
DropDownList.prototype.addNewItem = function (listData, newElement) {
|
|
1994
2198
|
var _this = this;
|
|
1995
2199
|
if (!isNullOrUndefined(this.itemData) && !isNullOrUndefined(newElement)) {
|
|
1996
|
-
var
|
|
2200
|
+
var value_5 = this.getItemData().value;
|
|
1997
2201
|
var isExist = listData.some(function (data) {
|
|
1998
|
-
return (((typeof data === 'string' || typeof data === 'number') && data ===
|
|
1999
|
-
(getValue(_this.fields.value, data) ===
|
|
2202
|
+
return (((typeof data === 'string' || typeof data === 'number') && data === value_5) ||
|
|
2203
|
+
(getValue(_this.fields.value, data) === value_5));
|
|
2000
2204
|
});
|
|
2001
2205
|
if (!isExist) {
|
|
2002
2206
|
this.addItem(this.itemData);
|
|
@@ -2087,6 +2291,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2087
2291
|
DropDownList.prototype.GetVirtualTrackHeight = function () {
|
|
2088
2292
|
var height = this.totalItemCount === this.viewPortInfo.endIndex ? this.totalItemCount * this.listItemHeight - this.itemCount * this.listItemHeight : this.totalItemCount * this.listItemHeight;
|
|
2089
2293
|
var heightDimension = "height: " + (height - this.itemCount * this.listItemHeight) + "px;";
|
|
2294
|
+
if (this.getModuleName() === 'autocomplete' && this.skeletonCount === 0) {
|
|
2295
|
+
return "height: 0px;";
|
|
2296
|
+
}
|
|
2090
2297
|
return heightDimension;
|
|
2091
2298
|
};
|
|
2092
2299
|
DropDownList.prototype.renderPopup = function (e) {
|
|
@@ -2101,6 +2308,8 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2101
2308
|
var popupEle = _this.createElement('div', {
|
|
2102
2309
|
id: _this.element.id + '_popup', className: 'e-ddl e-popup ' + (_this.cssClass !== null ? _this.cssClass : '')
|
|
2103
2310
|
});
|
|
2311
|
+
popupEle.setAttribute('aria-label', _this.element.id);
|
|
2312
|
+
popupEle.setAttribute('role', 'dialog');
|
|
2104
2313
|
var searchBox = _this.setSearchBox(popupEle);
|
|
2105
2314
|
_this.listHeight = formatUnit(_this.popupHeight);
|
|
2106
2315
|
if (_this.headerTemplate) {
|
|
@@ -2185,9 +2394,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2185
2394
|
parseInt(getComputedStyle(_this.inputElement.parentElement).borderLeftWidth, 10));
|
|
2186
2395
|
}
|
|
2187
2396
|
}
|
|
2188
|
-
_this.getFocusElement();
|
|
2189
2397
|
_this.createPopup(popupEle, offsetValue, left);
|
|
2190
2398
|
_this.popupContentElement = _this.popupObj.element.querySelector('.e-content');
|
|
2399
|
+
_this.getFocusElement();
|
|
2191
2400
|
_this.checkCollision(popupEle);
|
|
2192
2401
|
if (Browser.isDevice) {
|
|
2193
2402
|
_this.popupObj.element.classList.add(dropDownListClasses.device);
|
|
@@ -2227,7 +2436,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2227
2436
|
enable: _this.enableVirtualization,
|
|
2228
2437
|
});
|
|
2229
2438
|
setTimeout(function () {
|
|
2230
|
-
if (_this.value) {
|
|
2439
|
+
if (_this.value || _this.list.querySelector('.e-active')) {
|
|
2231
2440
|
_this.updateSelectionList();
|
|
2232
2441
|
if (_this.selectedValueInfo && _this.viewPortInfo && _this.viewPortInfo.offsets.top) {
|
|
2233
2442
|
_this.list.scrollTop = _this.viewPortInfo.offsets.top;
|
|
@@ -2238,8 +2447,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2238
2447
|
}
|
|
2239
2448
|
}, 5);
|
|
2240
2449
|
}
|
|
2241
|
-
attributes(_this.targetElement(), { 'aria-expanded': 'true', 'aria-owns': _this.element.id + '
|
|
2450
|
+
attributes(_this.targetElement(), { 'aria-expanded': 'true', 'aria-owns': _this.element.id + '_popup', 'aria-controls': _this.element.id });
|
|
2242
2451
|
_this.inputElement.setAttribute('aria-expanded', 'true');
|
|
2452
|
+
_this.inputElement.setAttribute('aria-controls', _this.element.id);
|
|
2243
2453
|
var inputParent = _this.isFiltering() ? _this.filterInput.parentElement : _this.inputWrapper.container;
|
|
2244
2454
|
addClass([inputParent], [dropDownListClasses.inputFocus]);
|
|
2245
2455
|
var animModel = { name: 'FadeIn', duration: 100 };
|
|
@@ -2304,7 +2514,12 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2304
2514
|
_this.destroyPopup();
|
|
2305
2515
|
if (_this.isFiltering() && _this.actionCompleteData.list && _this.actionCompleteData.list[0]) {
|
|
2306
2516
|
_this.isActive = true;
|
|
2307
|
-
|
|
2517
|
+
if (_this.enableVirtualization) {
|
|
2518
|
+
_this.onActionComplete(_this.ulElement, _this.listData, null, true);
|
|
2519
|
+
}
|
|
2520
|
+
else {
|
|
2521
|
+
_this.onActionComplete(_this.actionCompleteData.ulElement, _this.actionCompleteData.list, null, true);
|
|
2522
|
+
}
|
|
2308
2523
|
}
|
|
2309
2524
|
},
|
|
2310
2525
|
open: function () {
|
|
@@ -2411,6 +2626,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2411
2626
|
return width;
|
|
2412
2627
|
};
|
|
2413
2628
|
DropDownList.prototype.scrollBottom = function (isInitial, isInitialSelection, keyAction) {
|
|
2629
|
+
var _this = this;
|
|
2414
2630
|
if (isInitialSelection === void 0) { isInitialSelection = false; }
|
|
2415
2631
|
if (keyAction === void 0) { keyAction = null; }
|
|
2416
2632
|
if (isNullOrUndefined(this.selectedLI) && this.enableVirtualization) {
|
|
@@ -2476,6 +2692,11 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2476
2692
|
isScrollTopChanged = true;
|
|
2477
2693
|
}
|
|
2478
2694
|
this.isKeyBoardAction = isScrollerCHanged;
|
|
2695
|
+
if (this.enableVirtualization && this.fields.groupBy && this.fixedHeaderElement && (keyAction == "down")) {
|
|
2696
|
+
setTimeout(function () {
|
|
2697
|
+
_this.scrollStop(null, true);
|
|
2698
|
+
}, 100);
|
|
2699
|
+
}
|
|
2479
2700
|
}
|
|
2480
2701
|
};
|
|
2481
2702
|
DropDownList.prototype.scrollTop = function (keyAction) {
|
|
@@ -2681,7 +2902,15 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2681
2902
|
if (this.isReact && this.isFiltering() && this.itemTemplate != null) {
|
|
2682
2903
|
this.actionCompleteData.ulElement = this.ulElement.cloneNode(true);
|
|
2683
2904
|
}
|
|
2684
|
-
var dataSourceCount
|
|
2905
|
+
var dataSourceCount;
|
|
2906
|
+
if (this.dataSource instanceof DataManager) {
|
|
2907
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2908
|
+
dataSourceCount = this.virtualGroupDataSource && this.virtualGroupDataSource.length ? this.virtualGroupDataSource.length : 0;
|
|
2909
|
+
}
|
|
2910
|
+
else {
|
|
2911
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2912
|
+
dataSourceCount = this.dataSource && this.dataSource.length ? this.dataSource.length : 0;
|
|
2913
|
+
}
|
|
2685
2914
|
if (this.enableVirtualization && this.isFiltering() && this.value != null && isFilterValue && this.totalItemCount !== dataSourceCount) {
|
|
2686
2915
|
this.updateInitialData();
|
|
2687
2916
|
this.checkAndResetCache();
|
|
@@ -2704,8 +2933,14 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2704
2933
|
}
|
|
2705
2934
|
this.previousStartIndex = 0;
|
|
2706
2935
|
this.previousEndIndex = 0;
|
|
2707
|
-
|
|
2708
|
-
|
|
2936
|
+
if (this.dataSource instanceof DataManager) {
|
|
2937
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2938
|
+
this.totalItemCount = this.dataCount = this.virtualGroupDataSource && this.virtualGroupDataSource.length ? this.virtualGroupDataSource.length : 0;
|
|
2939
|
+
}
|
|
2940
|
+
else {
|
|
2941
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2942
|
+
this.totalItemCount = this.dataCount = this.dataSource && this.dataSource.length ? this.dataSource.length : 0;
|
|
2943
|
+
}
|
|
2709
2944
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2710
2945
|
if (this.list.getElementsByClassName('e-virtual-ddl')[0]) {
|
|
2711
2946
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2815,6 +3050,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2815
3050
|
}
|
|
2816
3051
|
else if (this.getModuleName() === 'dropdownlist') {
|
|
2817
3052
|
attributes(this.targetElement(), { 'aria-label': this.getModuleName() });
|
|
3053
|
+
this.inputElement.setAttribute('aria-label', this.getModuleName());
|
|
3054
|
+
this.inputElement.setAttribute('aria-expanded', 'false');
|
|
3055
|
+
this.inputElement.setAttribute('aria-controls', this.element.id + '_popups');
|
|
2818
3056
|
}
|
|
2819
3057
|
attributes(this.targetElement(), this.getAriaAttributes());
|
|
2820
3058
|
this.updateDataAttribute(this.htmlAttributes);
|
|
@@ -3080,6 +3318,14 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3080
3318
|
this_1.clearAll();
|
|
3081
3319
|
break;
|
|
3082
3320
|
}
|
|
3321
|
+
if (this_1.enableVirtualization) {
|
|
3322
|
+
this_1.updateValues();
|
|
3323
|
+
this_1.updateInputFields();
|
|
3324
|
+
this_1.notify("setCurrentViewDataAsync", {
|
|
3325
|
+
module: "VirtualScroll",
|
|
3326
|
+
});
|
|
3327
|
+
break;
|
|
3328
|
+
}
|
|
3083
3329
|
if (!this_1.list) {
|
|
3084
3330
|
if (this_1.dataSource instanceof DataManager) {
|
|
3085
3331
|
this_1.initRemoteRender = true;
|
|
@@ -3123,6 +3369,15 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3123
3369
|
this_1.clearAll();
|
|
3124
3370
|
break;
|
|
3125
3371
|
}
|
|
3372
|
+
if (this_1.enableVirtualization) {
|
|
3373
|
+
this_1.updateValues();
|
|
3374
|
+
this_1.updateInputFields();
|
|
3375
|
+
this_1.notify("setCurrentViewDataAsync", {
|
|
3376
|
+
module: "VirtualScroll",
|
|
3377
|
+
});
|
|
3378
|
+
this_1.preventChange = this_1.isAngular && this_1.preventChange ? !this_1.preventChange : this_1.preventChange;
|
|
3379
|
+
break;
|
|
3380
|
+
}
|
|
3126
3381
|
this_1.notify('beforeValueChange', { newProp: newProp }); // gird component value type change
|
|
3127
3382
|
if (!this_1.list) {
|
|
3128
3383
|
if (this_1.dataSource instanceof DataManager) {
|
|
@@ -3272,6 +3527,12 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3272
3527
|
}
|
|
3273
3528
|
};
|
|
3274
3529
|
};
|
|
3530
|
+
DropDownList.prototype.updatePopupState = function () {
|
|
3531
|
+
if (this.beforePopupOpen) {
|
|
3532
|
+
this.beforePopupOpen = false;
|
|
3533
|
+
this.showPopup();
|
|
3534
|
+
}
|
|
3535
|
+
};
|
|
3275
3536
|
DropDownList.prototype.setReadOnly = function () {
|
|
3276
3537
|
if (this.readonly) {
|
|
3277
3538
|
addClass([this.inputWrapper.container], ['e-readonly']);
|
|
@@ -3404,6 +3665,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3404
3665
|
this.closePopup(0, e);
|
|
3405
3666
|
var dataItem = this.getItemData();
|
|
3406
3667
|
var isSelectVal = !isNullOrUndefined(this.selectedLI);
|
|
3668
|
+
if (isSelectVal && this.enableVirtualization && this.selectedLI.classList) {
|
|
3669
|
+
isSelectVal = this.selectedLI.classList.contains('e-active');
|
|
3670
|
+
}
|
|
3407
3671
|
if (this.inputElement && this.inputElement.value.trim() === '' && !this.isInteracted && (this.isSelectCustom ||
|
|
3408
3672
|
isSelectVal && this.inputElement.value !== dataItem.text)) {
|
|
3409
3673
|
this.isSelectCustom = false;
|