@syncfusion/ej2-dropdowns 20.2.39 → 20.2.43-1234
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 +16 -1
- package/CHANGELOG.md +123 -2
- package/GitLeaksReport.json +1 -0
- package/{README.md → ReadMe.md} +1 -1
- package/dist/ej2-dropdowns.min.js +1 -0
- 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 +2260 -446
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +2303 -459
- 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/gitleaks-ci/gitleaks +0 -0
- package/gitleaks-ci.tar.gz +0 -0
- package/mention.d.ts +4 -0
- package/mention.js +4 -0
- package/package.json +76 -76
- package/src/auto-complete/auto-complete-model.d.ts +12 -11
- package/src/auto-complete/auto-complete.d.ts +20 -18
- package/src/auto-complete/auto-complete.js +67 -37
- package/src/combo-box/combo-box-model.d.ts +17 -17
- package/src/combo-box/combo-box.d.ts +33 -33
- package/src/combo-box/combo-box.js +33 -29
- package/src/common/incremental-search.d.ts +3 -4
- package/src/common/incremental-search.js +22 -7
- package/src/drop-down-base/drop-down-base-model.d.ts +13 -31
- package/src/drop-down-base/drop-down-base.d.ts +22 -41
- package/src/drop-down-base/drop-down-base.js +75 -59
- package/src/drop-down-list/drop-down-list-model.d.ts +19 -1
- package/src/drop-down-list/drop-down-list.d.ts +35 -11
- package/src/drop-down-list/drop-down-list.js +196 -90
- package/src/drop-down-tree/drop-down-tree-model.d.ts +16 -2
- package/src/drop-down-tree/drop-down-tree.d.ts +15 -1
- package/src/drop-down-tree/drop-down-tree.js +51 -15
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/list-box/list-box-model.d.ts +18 -0
- package/src/list-box/list-box.d.ts +22 -0
- package/src/list-box/list-box.js +86 -31
- package/src/mention/index.d.ts +5 -0
- package/src/mention/index.js +4 -0
- package/src/mention/mention-model.d.ts +285 -0
- package/src/mention/mention.d.ts +457 -0
- package/src/mention/mention.js +1465 -0
- package/src/multi-select/checkbox-selection.js +11 -12
- package/src/multi-select/float-label.js +4 -2
- package/src/multi-select/multi-select-model.d.ts +1 -1
- package/src/multi-select/multi-select.d.ts +10 -5
- package/src/multi-select/multi-select.js +313 -189
- package/styles/auto-complete/_all.scss +1 -1
- package/styles/auto-complete/_bootstrap-dark-definition.scss +1 -1
- package/styles/auto-complete/_bootstrap-definition.scss +1 -1
- package/styles/auto-complete/_bootstrap4-definition.scss +2 -2
- package/styles/auto-complete/_bootstrap5-definition.scss +1 -1
- package/styles/auto-complete/_fabric-dark-definition.scss +1 -1
- package/styles/auto-complete/_fabric-definition.scss +1 -1
- package/styles/auto-complete/_fluent-definition.scss +1 -1
- package/styles/auto-complete/_fusionnew-definition.scss +1 -1
- package/styles/auto-complete/_highcontrast-definition.scss +1 -1
- package/styles/auto-complete/_highcontrast-light-definition.scss +1 -1
- package/styles/auto-complete/_material-dark-definition.scss +1 -1
- package/styles/auto-complete/_material-definition.scss +1 -1
- package/styles/auto-complete/_material3-definition.scss +1 -1
- package/styles/auto-complete/_tailwind-definition.scss +1 -1
- package/styles/auto-complete/bootstrap-dark.css +3 -1
- package/styles/auto-complete/bootstrap.css +3 -1
- package/styles/auto-complete/bootstrap4.css +3 -1
- package/styles/auto-complete/bootstrap5-dark.css +3 -1
- package/styles/auto-complete/bootstrap5.css +3 -1
- package/styles/auto-complete/fabric-dark.css +3 -1
- package/styles/auto-complete/fabric.css +3 -1
- package/styles/auto-complete/fluent-dark.css +3 -1
- package/styles/auto-complete/fluent.css +3 -1
- package/styles/auto-complete/highcontrast-light.css +3 -1
- package/styles/auto-complete/highcontrast.css +3 -1
- package/styles/auto-complete/material-dark.css +3 -1
- package/styles/auto-complete/material.css +3 -1
- package/styles/auto-complete/tailwind-dark.css +3 -1
- package/styles/auto-complete/tailwind.css +3 -1
- package/styles/bootstrap-dark.css +121 -44
- package/styles/bootstrap-dark.scss +1 -0
- package/styles/bootstrap.css +121 -44
- package/styles/bootstrap.scss +1 -0
- package/styles/bootstrap4.css +134 -55
- package/styles/bootstrap4.scss +1 -0
- package/styles/bootstrap5-dark.css +135 -50
- package/styles/bootstrap5-dark.scss +1 -0
- package/styles/bootstrap5.css +135 -50
- package/styles/bootstrap5.scss +1 -0
- package/styles/combo-box/_all.scss +1 -1
- package/styles/combo-box/_bootstrap-dark-definition.scss +1 -1
- package/styles/combo-box/_bootstrap-definition.scss +1 -1
- package/styles/combo-box/_bootstrap4-definition.scss +2 -2
- package/styles/combo-box/_bootstrap5-definition.scss +1 -1
- package/styles/combo-box/_fabric-dark-definition.scss +1 -1
- package/styles/combo-box/_fabric-definition.scss +1 -1
- package/styles/combo-box/_fluent-definition.scss +1 -1
- package/styles/combo-box/_fusionnew-definition.scss +1 -1
- package/styles/combo-box/_highcontrast-definition.scss +1 -1
- package/styles/combo-box/_highcontrast-light-definition.scss +1 -1
- package/styles/combo-box/_material-dark-definition.scss +1 -1
- package/styles/combo-box/_material-definition.scss +1 -1
- package/styles/combo-box/_material3-definition.scss +1 -1
- package/styles/combo-box/_tailwind-definition.scss +1 -1
- package/styles/combo-box/bootstrap-dark.css +3 -1
- package/styles/combo-box/bootstrap.css +3 -1
- package/styles/combo-box/bootstrap4.css +3 -1
- package/styles/combo-box/bootstrap5-dark.css +3 -1
- package/styles/combo-box/bootstrap5.css +3 -1
- package/styles/combo-box/fabric-dark.css +3 -1
- package/styles/combo-box/fabric.css +3 -1
- package/styles/combo-box/fluent-dark.css +3 -1
- package/styles/combo-box/fluent.css +3 -1
- package/styles/combo-box/highcontrast-light.css +3 -1
- package/styles/combo-box/highcontrast.css +3 -1
- package/styles/combo-box/material-dark.css +3 -1
- package/styles/combo-box/material.css +3 -1
- package/styles/combo-box/tailwind-dark.css +3 -1
- package/styles/combo-box/tailwind.css +3 -1
- package/styles/drop-down-base/_all.scss +1 -1
- package/styles/drop-down-base/_bootstrap-dark-definition.scss +9 -2
- package/styles/drop-down-base/_bootstrap-definition.scss +7 -1
- package/styles/drop-down-base/_bootstrap4-definition.scss +7 -1
- package/styles/drop-down-base/_bootstrap5-definition.scss +9 -3
- package/styles/drop-down-base/_fabric-dark-definition.scss +7 -1
- package/styles/drop-down-base/_fabric-definition.scss +7 -1
- package/styles/drop-down-base/_fluent-definition.scss +9 -2
- package/styles/drop-down-base/_fusionnew-definition.scss +9 -3
- package/styles/drop-down-base/_highcontrast-definition.scss +17 -6
- package/styles/drop-down-base/_highcontrast-light-definition.scss +19 -7
- package/styles/drop-down-base/_layout.scss +44 -3
- package/styles/drop-down-base/_material-dark-definition.scss +8 -1
- package/styles/drop-down-base/_material-definition.scss +7 -0
- package/styles/drop-down-base/_material3-definition.scss +9 -3
- package/styles/drop-down-base/_tailwind-definition.scss +9 -3
- package/styles/drop-down-base/_theme.scss +4 -4
- package/styles/drop-down-base/bootstrap-dark.css +42 -1
- package/styles/drop-down-base/bootstrap.css +42 -1
- package/styles/drop-down-base/bootstrap4.css +42 -1
- package/styles/drop-down-base/bootstrap5-dark.css +42 -1
- package/styles/drop-down-base/bootstrap5.css +42 -1
- package/styles/drop-down-base/fabric-dark.css +42 -1
- package/styles/drop-down-base/fabric.css +42 -1
- package/styles/drop-down-base/fluent-dark.css +42 -1
- package/styles/drop-down-base/fluent.css +42 -1
- package/styles/drop-down-base/highcontrast-light.css +42 -1
- package/styles/drop-down-base/highcontrast.css +42 -1
- package/styles/drop-down-base/material-dark.css +42 -1
- package/styles/drop-down-base/material.css +42 -1
- package/styles/drop-down-base/tailwind-dark.css +42 -1
- package/styles/drop-down-base/tailwind.css +42 -1
- package/styles/drop-down-list/_all.scss +2 -1
- package/styles/drop-down-list/_bootstrap-dark-definition.scss +2 -1
- package/styles/drop-down-list/_bootstrap-definition.scss +2 -1
- package/styles/drop-down-list/_bootstrap4-definition.scss +3 -1
- package/styles/drop-down-list/_bootstrap5-definition.scss +3 -3
- package/styles/drop-down-list/_fabric-dark-definition.scss +2 -1
- package/styles/drop-down-list/_fabric-definition.scss +2 -0
- package/styles/drop-down-list/_fluent-definition.scss +2 -1
- package/styles/drop-down-list/_fusionnew-definition.scss +3 -3
- package/styles/drop-down-list/_highcontrast-definition.scss +21 -10
- package/styles/drop-down-list/_highcontrast-light-definition.scss +22 -11
- package/styles/drop-down-list/_layout.scss +11 -9
- package/styles/drop-down-list/_material-dark-definition.scss +2 -2
- package/styles/drop-down-list/_material-definition.scss +1 -0
- package/styles/drop-down-list/_material3-definition.scss +3 -3
- package/styles/drop-down-list/_tailwind-definition.scss +1 -0
- package/styles/drop-down-list/_theme.scss +3 -3
- package/styles/drop-down-list/bootstrap-dark.css +8 -0
- package/styles/drop-down-list/bootstrap.css +8 -0
- package/styles/drop-down-list/bootstrap4.css +8 -0
- package/styles/drop-down-list/bootstrap5-dark.css +9 -0
- package/styles/drop-down-list/bootstrap5.css +9 -0
- package/styles/drop-down-list/fabric-dark.css +8 -0
- package/styles/drop-down-list/fabric.css +8 -0
- package/styles/drop-down-list/fluent-dark.css +9 -0
- package/styles/drop-down-list/fluent.css +9 -0
- package/styles/drop-down-list/highcontrast-light.css +8 -0
- package/styles/drop-down-list/highcontrast.css +8 -0
- package/styles/drop-down-list/icons/_bootstrap.scss +0 -1
- package/styles/drop-down-list/icons/_fabric.scss +0 -1
- package/styles/drop-down-list/icons/_material.scss +0 -1
- package/styles/drop-down-list/material-dark.css +8 -0
- package/styles/drop-down-list/material.css +8 -0
- package/styles/drop-down-list/tailwind-dark.css +9 -0
- package/styles/drop-down-list/tailwind.css +9 -0
- package/styles/drop-down-tree/_all.scss +1 -1
- package/styles/drop-down-tree/_bootstrap-dark-definition.scss +1 -1
- package/styles/drop-down-tree/_bootstrap-definition.scss +1 -1
- package/styles/drop-down-tree/_bootstrap4-definition.scss +1 -1
- package/styles/drop-down-tree/_bootstrap5-definition.scss +2 -2
- package/styles/drop-down-tree/_fabric-dark-definition.scss +1 -1
- package/styles/drop-down-tree/_fabric-definition.scss +2 -2
- package/styles/drop-down-tree/_fluent-definition.scss +2 -2
- package/styles/drop-down-tree/_fusionnew-definition.scss +2 -2
- package/styles/drop-down-tree/_highcontrast-definition.scss +1 -1
- package/styles/drop-down-tree/_highcontrast-light-definition.scss +1 -1
- package/styles/drop-down-tree/_layout.scss +10 -3
- package/styles/drop-down-tree/_material-dark-definition.scss +2 -2
- package/styles/drop-down-tree/_material-definition.scss +2 -2
- package/styles/drop-down-tree/_material3-definition.scss +2 -2
- package/styles/drop-down-tree/_tailwind-definition.scss +2 -2
- 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 +9 -1
- package/styles/drop-down-tree/bootstrap5.css +9 -1
- 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 +5 -0
- package/styles/drop-down-tree/fluent.css +5 -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/_bootstrap.scss +0 -1
- package/styles/drop-down-tree/icons/_bootstrap4.scss +0 -1
- package/styles/drop-down-tree/icons/_fabric.scss +0 -1
- package/styles/drop-down-tree/icons/_highcontrast-light.scss +0 -1
- package/styles/drop-down-tree/icons/_highcontrast.scss +0 -1
- package/styles/drop-down-tree/icons/_material-dark.scss +0 -1
- package/styles/drop-down-tree/icons/_material.scss +0 -1
- package/styles/drop-down-tree/material-dark.css +4 -0
- package/styles/drop-down-tree/material.css +4 -0
- package/styles/drop-down-tree/tailwind-dark.css +5 -0
- package/styles/drop-down-tree/tailwind.css +5 -0
- package/styles/fabric-dark.css +129 -52
- package/styles/fabric-dark.scss +1 -0
- package/styles/fabric.css +129 -52
- package/styles/fabric.scss +1 -0
- package/styles/fluent-dark.css +129 -47
- package/styles/fluent-dark.scss +1 -0
- package/styles/fluent.css +129 -47
- package/styles/fluent.scss +1 -0
- package/styles/highcontrast-light.css +124 -44
- package/styles/highcontrast-light.scss +1 -0
- package/styles/highcontrast.css +133 -53
- package/styles/highcontrast.scss +1 -0
- package/styles/list-box/_all.scss +1 -1
- package/styles/list-box/_bootstrap-dark-definition.scss +2 -0
- package/styles/list-box/_bootstrap-definition.scss +1 -0
- package/styles/list-box/_bootstrap4-definition.scss +1 -0
- package/styles/list-box/_bootstrap5-definition.scss +3 -0
- package/styles/list-box/_fabric-dark-definition.scss +3 -1
- package/styles/list-box/_fabric-definition.scss +1 -0
- package/styles/list-box/_fluent-definition.scss +3 -0
- package/styles/list-box/_fusionnew-definition.scss +1 -0
- package/styles/list-box/_highcontrast-definition.scss +1 -0
- package/styles/list-box/_highcontrast-light-definition.scss +3 -1
- package/styles/list-box/_layout.scss +8 -17
- package/styles/list-box/_material-dark-definition.scss +2 -0
- package/styles/list-box/_material-definition.scss +1 -0
- package/styles/list-box/_material3-definition.scss +1 -0
- package/styles/list-box/_tailwind-definition.scss +3 -0
- package/styles/list-box/_theme.scss +11 -25
- package/styles/list-box/bootstrap-dark.css +12 -33
- package/styles/list-box/bootstrap.css +14 -35
- package/styles/list-box/bootstrap4.css +14 -35
- package/styles/list-box/bootstrap5-dark.css +15 -36
- package/styles/list-box/bootstrap5.css +15 -36
- package/styles/list-box/fabric-dark.css +12 -33
- package/styles/list-box/fabric.css +14 -35
- package/styles/list-box/fluent-dark.css +15 -36
- package/styles/list-box/fluent.css +15 -36
- package/styles/list-box/highcontrast-light.css +12 -33
- package/styles/list-box/highcontrast.css +14 -35
- package/styles/list-box/icons/_bootstrap-dark.scss +2 -2
- package/styles/list-box/icons/_bootstrap.scss +1 -1
- package/styles/list-box/icons/_bootstrap4.scss +1 -1
- package/styles/list-box/icons/_bootstrap5.scss +1 -1
- package/styles/list-box/icons/_fabric-dark.scss +1 -1
- package/styles/list-box/icons/_fabric.scss +1 -1
- package/styles/list-box/icons/_fluent.scss +1 -1
- package/styles/list-box/icons/_fusionnew.scss +1 -1
- package/styles/list-box/icons/_highcontrast-light.scss +1 -1
- package/styles/list-box/icons/_highcontrast.scss +1 -1
- package/styles/list-box/icons/_material-dark.scss +1 -1
- package/styles/list-box/icons/_material.scss +2 -2
- package/styles/list-box/icons/_material3.scss +1 -1
- package/styles/list-box/icons/_tailwind-dark.scss +1 -1
- package/styles/list-box/icons/_tailwind.scss +1 -1
- package/styles/list-box/material-dark.css +12 -33
- package/styles/list-box/material.css +14 -35
- package/styles/list-box/tailwind-dark.css +15 -36
- package/styles/list-box/tailwind.css +15 -36
- package/styles/material-dark.css +120 -43
- package/styles/material-dark.scss +1 -0
- package/styles/material.css +120 -43
- package/styles/material.scss +1 -0
- package/styles/mention/_all.scss +1 -0
- package/styles/mention/_bootstrap-dark-definition.scss +3 -0
- package/styles/mention/_bootstrap-definition.scss +3 -0
- package/styles/mention/_bootstrap4-definition.scss +3 -0
- package/styles/mention/_bootstrap5-dark-definition.scss +1 -0
- package/styles/mention/_bootstrap5-definition.scss +1 -0
- package/styles/mention/_fabric-dark-definition.scss +2 -0
- package/styles/mention/_fabric-definition.scss +3 -0
- package/styles/mention/_fluent-dark-definition.scss +1 -0
- package/styles/mention/_fluent-definition.scss +1 -0
- package/styles/mention/_fusionnew-definition.scss +1 -0
- package/styles/mention/_highcontrast-definition.scss +3 -0
- package/styles/mention/_highcontrast-light-definition.scss +3 -0
- package/styles/mention/_layout.scss +6 -0
- package/styles/mention/_material-dark-definition.scss +3 -0
- package/styles/mention/_material-definition.scss +3 -0
- package/styles/mention/_material3-definition.scss +1 -0
- package/styles/mention/_tailwind-dark-definition.scss +1 -0
- package/styles/mention/_tailwind-definition.scss +1 -0
- package/styles/mention/bootstrap-dark.css +29 -0
- package/styles/mention/bootstrap-dark.scss +6 -0
- package/styles/mention/bootstrap.css +29 -0
- package/styles/mention/bootstrap.scss +6 -0
- package/styles/mention/bootstrap4.css +47 -0
- package/styles/mention/bootstrap4.scss +6 -0
- package/styles/mention/bootstrap5-dark.css +58 -0
- package/styles/mention/bootstrap5-dark.scss +6 -0
- package/styles/mention/bootstrap5.css +58 -0
- package/styles/mention/bootstrap5.scss +6 -0
- package/styles/mention/fabric-dark.css +29 -0
- package/styles/mention/fabric-dark.scss +6 -0
- package/styles/mention/fabric.css +29 -0
- package/styles/mention/fabric.scss +6 -0
- package/styles/mention/fluent-dark.css +58 -0
- package/styles/mention/fluent-dark.scss +6 -0
- package/styles/mention/fluent.css +58 -0
- package/styles/mention/fluent.scss +6 -0
- package/styles/mention/highcontrast-light.css +43 -0
- package/styles/mention/highcontrast-light.scss +6 -0
- package/styles/mention/highcontrast.css +43 -0
- package/styles/mention/highcontrast.scss +6 -0
- package/styles/mention/material-dark.css +29 -0
- package/styles/mention/material-dark.scss +6 -0
- package/styles/mention/material.css +29 -0
- package/styles/mention/material.scss +6 -0
- package/styles/mention/tailwind-dark.css +68 -0
- package/styles/mention/tailwind-dark.scss +6 -0
- package/styles/mention/tailwind.css +68 -0
- package/styles/mention/tailwind.scss +6 -0
- package/styles/multi-select/_all.scss +1 -1
- package/styles/multi-select/_bootstrap-dark-definition.scss +11 -1
- package/styles/multi-select/_bootstrap-definition.scss +9 -0
- package/styles/multi-select/_bootstrap4-definition.scss +20 -9
- package/styles/multi-select/_bootstrap5-definition.scss +11 -3
- package/styles/multi-select/_fabric-dark-definition.scss +16 -7
- package/styles/multi-select/_fabric-definition.scss +15 -6
- package/styles/multi-select/_fluent-definition.scss +11 -2
- package/styles/multi-select/_fusionnew-definition.scss +10 -2
- package/styles/multi-select/_highcontrast-definition.scss +59 -29
- package/styles/multi-select/_highcontrast-light-definition.scss +55 -25
- package/styles/multi-select/_layout.scss +91 -78
- package/styles/multi-select/_material-dark-definition.scss +10 -1
- package/styles/multi-select/_material-definition.scss +8 -0
- package/styles/multi-select/_material3-definition.scss +9 -2
- package/styles/multi-select/_tailwind-definition.scss +11 -4
- package/styles/multi-select/_theme.scss +20 -21
- package/styles/multi-select/bootstrap-dark.css +34 -8
- package/styles/multi-select/bootstrap.css +34 -8
- package/styles/multi-select/bootstrap4.css +46 -19
- package/styles/multi-select/bootstrap5-dark.css +38 -11
- package/styles/multi-select/bootstrap5.css +38 -11
- package/styles/multi-select/fabric-dark.css +42 -16
- package/styles/multi-select/fabric.css +42 -16
- package/styles/multi-select/fluent-dark.css +36 -9
- package/styles/multi-select/fluent.css +36 -9
- package/styles/multi-select/highcontrast-light.css +37 -8
- package/styles/multi-select/highcontrast.css +46 -17
- package/styles/multi-select/icons/_bootstrap5.scss +0 -1
- package/styles/multi-select/icons/_fluent.scss +0 -1
- package/styles/multi-select/icons/_fusionnew.scss +0 -1
- package/styles/multi-select/icons/_material-dark.scss +53 -54
- package/styles/multi-select/icons/_material.scss +53 -54
- package/styles/multi-select/icons/_material3.scss +0 -1
- package/styles/multi-select/icons/_tailwind.scss +0 -1
- package/styles/multi-select/material-dark.css +33 -7
- package/styles/multi-select/material.css +33 -7
- package/styles/multi-select/tailwind-dark.css +38 -9
- package/styles/multi-select/tailwind.css +38 -9
- package/styles/tailwind-dark.css +132 -47
- package/styles/tailwind-dark.scss +1 -0
- package/styles/tailwind.css +132 -47
- package/styles/tailwind.scss +1 -0
|
@@ -22,6 +22,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
22
22
|
import { DropDownBase, dropDownBaseClasses } from '../drop-down-base/drop-down-base';
|
|
23
23
|
import { FieldSettings } from '../drop-down-base/drop-down-base';
|
|
24
24
|
import { Popup, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';
|
|
25
|
+
import { Input } from '@syncfusion/ej2-inputs';
|
|
25
26
|
import { attributes, setValue, SanitizeHtmlHelper, getValue } from '@syncfusion/ej2-base';
|
|
26
27
|
import { NotifyPropertyChanges, extend } from '@syncfusion/ej2-base';
|
|
27
28
|
import { EventHandler, Property, Event, compile, L10n } from '@syncfusion/ej2-base';
|
|
@@ -101,6 +102,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
101
102
|
_this.isValidKey = false;
|
|
102
103
|
_this.selectAllEventData = [];
|
|
103
104
|
_this.selectAllEventEle = [];
|
|
105
|
+
_this.resetMainList = null;
|
|
106
|
+
_this.resetFilteredData = false;
|
|
104
107
|
_this.scrollFocusStatus = false;
|
|
105
108
|
_this.keyDownStatus = false;
|
|
106
109
|
return _this;
|
|
@@ -143,7 +146,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
143
146
|
var htmlAttr = _a[_i];
|
|
144
147
|
switch (htmlAttr) {
|
|
145
148
|
case 'class': {
|
|
146
|
-
var updatedClassValue = (this.htmlAttributes[htmlAttr].replace(/\s+/g, ' ')).trim();
|
|
149
|
+
var updatedClassValue = (this.htmlAttributes["" + htmlAttr].replace(/\s+/g, ' ')).trim();
|
|
147
150
|
if (updatedClassValue !== '') {
|
|
148
151
|
addClass([this.overAllWrapper], updatedClassValue.split(' '));
|
|
149
152
|
addClass([this.popupWrapper], updatedClassValue.split(' '));
|
|
@@ -155,7 +158,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
155
158
|
break;
|
|
156
159
|
case 'placeholder':
|
|
157
160
|
if (!this.placeholder) {
|
|
158
|
-
this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
|
|
161
|
+
this.inputElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
|
|
159
162
|
this.setProperties({ placeholder: this.inputElement.placeholder }, true);
|
|
160
163
|
this.refreshPlaceHolder();
|
|
161
164
|
}
|
|
@@ -165,16 +168,16 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
165
168
|
var validateAttr = ['name', 'required', 'aria-required', 'form'];
|
|
166
169
|
var containerAttr = ['title', 'role', 'style', 'class'];
|
|
167
170
|
if (defaultAttr.indexOf(htmlAttr) > -1) {
|
|
168
|
-
this.element.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
|
|
171
|
+
this.element.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
|
|
169
172
|
}
|
|
170
173
|
else if (htmlAttr.indexOf('data') === 0 || validateAttr.indexOf(htmlAttr) > -1) {
|
|
171
|
-
this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
|
|
174
|
+
this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
|
|
172
175
|
}
|
|
173
176
|
else if (containerAttr.indexOf(htmlAttr) > -1) {
|
|
174
|
-
this.overAllWrapper.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
|
|
177
|
+
this.overAllWrapper.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
|
|
175
178
|
}
|
|
176
|
-
else if (htmlAttr !== 'size') {
|
|
177
|
-
this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
|
|
179
|
+
else if (htmlAttr !== 'size' && !isNullOrUndefined(this.inputElement)) {
|
|
180
|
+
this.inputElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
|
|
178
181
|
}
|
|
179
182
|
break;
|
|
180
183
|
}
|
|
@@ -183,11 +186,13 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
183
186
|
}
|
|
184
187
|
};
|
|
185
188
|
MultiSelect.prototype.updateReadonly = function (state) {
|
|
186
|
-
if (
|
|
187
|
-
this.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
if (!isNullOrUndefined(this.inputElement)) {
|
|
190
|
+
if (state || this.mode === 'CheckBox') {
|
|
191
|
+
this.inputElement.setAttribute('readonly', 'true');
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
this.inputElement.removeAttribute('readonly');
|
|
195
|
+
}
|
|
191
196
|
}
|
|
192
197
|
};
|
|
193
198
|
MultiSelect.prototype.updateClearButton = function (state) {
|
|
@@ -224,7 +229,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
224
229
|
}
|
|
225
230
|
}
|
|
226
231
|
};
|
|
227
|
-
MultiSelect.prototype.onPopupShown = function () {
|
|
232
|
+
MultiSelect.prototype.onPopupShown = function (e) {
|
|
228
233
|
var _this = this;
|
|
229
234
|
if (Browser.isDevice && (this.mode === 'CheckBox' && this.allowFiltering)) {
|
|
230
235
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
@@ -236,7 +241,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
236
241
|
history.pushState({}, '');
|
|
237
242
|
}
|
|
238
243
|
var animModel = { name: 'FadeIn', duration: 100 };
|
|
239
|
-
var eventArgs = { popup: this.popupObj, cancel: false, animation: animModel };
|
|
244
|
+
var eventArgs = { popup: this.popupObj, event: e, cancel: false, animation: animModel };
|
|
240
245
|
this.trigger('open', eventArgs, function (eventArgs) {
|
|
241
246
|
if (!eventArgs.cancel) {
|
|
242
247
|
_this.focusAtFirstListItem();
|
|
@@ -250,7 +255,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
250
255
|
_this.refreshPopup();
|
|
251
256
|
_this.renderReactTemplates();
|
|
252
257
|
_this.popupObj.show(eventArgs.animation, (_this.zIndex === 1000) ? _this.element : null);
|
|
253
|
-
attributes(_this.inputElement, { 'aria-expanded': 'true' });
|
|
258
|
+
attributes(_this.inputElement, { 'aria-expanded': 'true', 'aria-owns': _this.inputElement.id + '_options' });
|
|
259
|
+
_this.updateAriaActiveDescendant();
|
|
254
260
|
if (_this.isFirstClick) {
|
|
255
261
|
_this.loadTemplate();
|
|
256
262
|
}
|
|
@@ -320,11 +326,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
320
326
|
MultiSelect.prototype.getAriaAttributes = function () {
|
|
321
327
|
var ariaAttributes = {
|
|
322
328
|
'aria-disabled': 'false',
|
|
323
|
-
'
|
|
324
|
-
'role': 'listbox',
|
|
325
|
-
'aria-multiselectable': 'true',
|
|
326
|
-
'aria-activedescendant': 'null',
|
|
327
|
-
'aria-haspopup': 'true',
|
|
329
|
+
'role': 'combobox',
|
|
328
330
|
'aria-expanded': 'false'
|
|
329
331
|
};
|
|
330
332
|
return ariaAttributes;
|
|
@@ -333,8 +335,10 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
333
335
|
if (!isNullOrUndefined(this.ulElement)) {
|
|
334
336
|
attributes(this.ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
|
|
335
337
|
}
|
|
336
|
-
var disableStatus = (this.inputElement.disabled) ? true : false;
|
|
337
|
-
|
|
338
|
+
var disableStatus = !isNullOrUndefined(this.inputElement) && (this.inputElement.disabled) ? true : false;
|
|
339
|
+
if (!this.isPopupOpen() && !isNullOrUndefined(this.inputElement)) {
|
|
340
|
+
attributes(this.inputElement, this.getAriaAttributes());
|
|
341
|
+
}
|
|
338
342
|
if (disableStatus) {
|
|
339
343
|
attributes(this.inputElement, { 'aria-disabled': 'true' });
|
|
340
344
|
}
|
|
@@ -402,13 +406,23 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
402
406
|
if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
|
|
403
407
|
for (var i = 0; i < this.value.length; i++) {
|
|
404
408
|
var checkEle = this.findListElement(((this.allowFiltering && !isNullOrUndefined(this.mainList)) ? this.mainList : ulElement), 'li', 'data-value', proxy.value[i]);
|
|
405
|
-
if (!checkEle) {
|
|
409
|
+
if (!checkEle && !(this.dataSource instanceof DataManager)) {
|
|
406
410
|
this.value.splice(i, 1);
|
|
407
411
|
i -= 1;
|
|
408
412
|
}
|
|
409
413
|
}
|
|
410
414
|
}
|
|
411
|
-
|
|
415
|
+
var valuecheck = [];
|
|
416
|
+
if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
|
|
417
|
+
valuecheck = this.presentItemValue(this.ulElement);
|
|
418
|
+
}
|
|
419
|
+
if (valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
|
|
420
|
+
&& this.listData != null) {
|
|
421
|
+
this.addNonPresentItems(valuecheck, this.ulElement, this.listData);
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
this.updateActionList(ulElement, list, e);
|
|
425
|
+
}
|
|
412
426
|
if (this.dataSource instanceof DataManager && this.mode === 'CheckBox' && this.allowFiltering) {
|
|
413
427
|
this.removeFocus();
|
|
414
428
|
}
|
|
@@ -432,7 +446,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
432
446
|
this.checkForCustomValue(this.tempQuery, this.fields);
|
|
433
447
|
return;
|
|
434
448
|
}
|
|
435
|
-
if (this.value && this.value.length && ((this.mode !== 'CheckBox' && this.inputElement.value.trim() !== '') ||
|
|
449
|
+
if (this.value && this.value.length && ((this.mode !== 'CheckBox' && !isNullOrUndefined(this.inputElement) && this.inputElement.value.trim() !== '') ||
|
|
436
450
|
this.mode === 'CheckBox' || ((this.keyCode === 8 || this.keyCode === 46) && this.allowFiltering &&
|
|
437
451
|
this.allowCustomValue && this.dataSource instanceof DataManager && this.inputElement.value === ''))) {
|
|
438
452
|
this.refreshSelection();
|
|
@@ -460,7 +474,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
460
474
|
this.renderPopup();
|
|
461
475
|
if (this.beforePopupOpen) {
|
|
462
476
|
this.beforePopupOpen = false;
|
|
463
|
-
this.onPopupShown();
|
|
477
|
+
this.onPopupShown(e);
|
|
464
478
|
}
|
|
465
479
|
};
|
|
466
480
|
MultiSelect.prototype.refreshSelection = function () {
|
|
@@ -490,6 +504,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
490
504
|
dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')');
|
|
491
505
|
if (listEle.length > 0) {
|
|
492
506
|
addClass([listEle[0]], dropDownBaseClasses.focus);
|
|
507
|
+
this.updateAriaActiveDescendant();
|
|
493
508
|
}
|
|
494
509
|
else {
|
|
495
510
|
//EJ2-57588 - for this task, we prevent the ul element cloning ( this.ulElement = this.ulElement.cloneNode ? <HTMLElement>this.ulElement.cloneNode(true) : this.ulElement;)
|
|
@@ -501,8 +516,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
501
516
|
}
|
|
502
517
|
element.setAttribute('aria-selected', 'true');
|
|
503
518
|
if (this.mode === 'CheckBox' && element.classList.contains('e-active')) {
|
|
504
|
-
var ariaValue = element.
|
|
505
|
-
if (
|
|
519
|
+
var ariaValue = element.getElementsByClassName('e-check').length;
|
|
520
|
+
if (ariaValue === 0) {
|
|
506
521
|
var args = {
|
|
507
522
|
module: 'CheckBoxSelection',
|
|
508
523
|
enable: this.mode === 'CheckBox',
|
|
@@ -626,9 +641,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
626
641
|
/**
|
|
627
642
|
* To filter the multiselect data from given data source by using query
|
|
628
643
|
*
|
|
629
|
-
* @param
|
|
630
|
-
* @param
|
|
631
|
-
* @param
|
|
644
|
+
* @param {Object[] | DataManager } dataSource - Set the data source to filter.
|
|
645
|
+
* @param {Query} query - Specify the query to filter the data.
|
|
646
|
+
* @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
|
|
632
647
|
* @returns {void}
|
|
633
648
|
*/
|
|
634
649
|
MultiSelect.prototype.filter = function (dataSource, query, fields) {
|
|
@@ -716,7 +731,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
716
731
|
this.resetList(tempData, field, query);
|
|
717
732
|
}
|
|
718
733
|
else {
|
|
719
|
-
var tempData =
|
|
734
|
+
var tempData = JSON.parse(JSON.stringify(this.listData));
|
|
735
|
+
tempData.splice(0, 0, this.inputElement.value);
|
|
720
736
|
tempData[0] = (typeof customData === 'number' && !isNaN(parseFloat(tempData[0]))) ?
|
|
721
737
|
parseFloat(tempData[0]) : tempData[0];
|
|
722
738
|
tempData[0] = (typeof customData === 'boolean') ?
|
|
@@ -752,7 +768,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
752
768
|
}
|
|
753
769
|
if (!this.isPopupOpen() &&
|
|
754
770
|
(this.openOnClick || (this.showDropDownIcon && e.target && e.target.className === dropdownIcon))) {
|
|
755
|
-
this.showPopup();
|
|
771
|
+
this.showPopup(e);
|
|
756
772
|
}
|
|
757
773
|
else {
|
|
758
774
|
this.hidePopup(e);
|
|
@@ -834,6 +850,10 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
834
850
|
}
|
|
835
851
|
}
|
|
836
852
|
this.updateDataList();
|
|
853
|
+
if (this.resetMainList) {
|
|
854
|
+
this.mainList = this.resetMainList;
|
|
855
|
+
this.resetMainList = null;
|
|
856
|
+
}
|
|
837
857
|
this.refreshListItems(null);
|
|
838
858
|
if (this.mode !== 'Box' && this.mode !== 'CheckBox') {
|
|
839
859
|
this.updateDelimView();
|
|
@@ -861,6 +881,25 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
861
881
|
this.ulElement = this.mainList;
|
|
862
882
|
}
|
|
863
883
|
this.checkPlaceholderSize();
|
|
884
|
+
Input.createSpanElement(this.overAllWrapper, this.createElement);
|
|
885
|
+
this.calculateWidth();
|
|
886
|
+
if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
|
|
887
|
+
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
|
|
888
|
+
}
|
|
889
|
+
};
|
|
890
|
+
MultiSelect.prototype.calculateWidth = function () {
|
|
891
|
+
var elementWidth;
|
|
892
|
+
if (this.overAllWrapper) {
|
|
893
|
+
if (!this.showDropDownIcon || this.overAllWrapper.querySelector('.' + 'e-label-top')) {
|
|
894
|
+
elementWidth = this.overAllWrapper.clientWidth - 2 * (parseInt(getComputedStyle(this.inputElement).paddingRight));
|
|
895
|
+
}
|
|
896
|
+
else {
|
|
897
|
+
var downIconWidth = this.dropIcon.offsetWidth +
|
|
898
|
+
parseInt(getComputedStyle(this.dropIcon).marginRight);
|
|
899
|
+
elementWidth = this.overAllWrapper.clientWidth - (downIconWidth + 2 * (parseInt(getComputedStyle(this.inputElement).paddingRight)));
|
|
900
|
+
}
|
|
901
|
+
Input.calculateWidth(elementWidth, this.overAllWrapper, this.getModuleName());
|
|
902
|
+
}
|
|
864
903
|
};
|
|
865
904
|
MultiSelect.prototype.checkPlaceholderSize = function () {
|
|
866
905
|
if (this.showDropDownIcon) {
|
|
@@ -889,11 +928,13 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
889
928
|
}
|
|
890
929
|
};
|
|
891
930
|
MultiSelect.prototype.refreshInputHight = function () {
|
|
892
|
-
if (
|
|
893
|
-
this.
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
931
|
+
if (!isNullOrUndefined(this.searchWrapper)) {
|
|
932
|
+
if ((!this.value || !this.value.length) && (isNullOrUndefined(this.text) || this.text === '')) {
|
|
933
|
+
this.searchWrapper.classList.remove(ZERO_SIZE);
|
|
934
|
+
}
|
|
935
|
+
else {
|
|
936
|
+
this.searchWrapper.classList.add(ZERO_SIZE);
|
|
937
|
+
}
|
|
897
938
|
}
|
|
898
939
|
};
|
|
899
940
|
MultiSelect.prototype.validateValues = function (newValue, oldValue) {
|
|
@@ -931,6 +972,11 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
931
972
|
this.tempValues = this.value.slice();
|
|
932
973
|
}
|
|
933
974
|
};
|
|
975
|
+
MultiSelect.prototype.updateAriaActiveDescendant = function () {
|
|
976
|
+
if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-item-focus')[0])) {
|
|
977
|
+
attributes(this.inputElement, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-item-focus')[0].id });
|
|
978
|
+
}
|
|
979
|
+
};
|
|
934
980
|
MultiSelect.prototype.getPagingCount = function () {
|
|
935
981
|
var height = this.list.classList.contains(dropDownBaseClasses.noData) ? null :
|
|
936
982
|
getComputedStyle(this.getItems()[0], null).getPropertyValue('height');
|
|
@@ -961,6 +1007,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
961
1007
|
+ ':not(.' + HIDE_LIST + ')') : [];
|
|
962
1008
|
};
|
|
963
1009
|
MultiSelect.prototype.focusInHandler = function (e) {
|
|
1010
|
+
var _this = this;
|
|
964
1011
|
if (this.enabled) {
|
|
965
1012
|
this.showOverAllClear();
|
|
966
1013
|
this.inputFocus = true;
|
|
@@ -991,6 +1038,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
991
1038
|
if (this.isPopupOpen()) {
|
|
992
1039
|
this.refreshPopup();
|
|
993
1040
|
}
|
|
1041
|
+
setTimeout(function () {
|
|
1042
|
+
_this.calculateWidth();
|
|
1043
|
+
}, 150);
|
|
994
1044
|
return true;
|
|
995
1045
|
}
|
|
996
1046
|
else {
|
|
@@ -1046,7 +1096,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1046
1096
|
break;
|
|
1047
1097
|
case 40:
|
|
1048
1098
|
if (!this.isPopupOpen()) {
|
|
1049
|
-
this.showPopup();
|
|
1099
|
+
this.showPopup(e);
|
|
1050
1100
|
e.preventDefault();
|
|
1051
1101
|
}
|
|
1052
1102
|
break;
|
|
@@ -1073,6 +1123,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1073
1123
|
var element = scrollEle[(isHome) ? 0 : (scrollEle.length - 1)];
|
|
1074
1124
|
element.classList.add(dropDownBaseClasses.focus);
|
|
1075
1125
|
this.scrollBottom(element);
|
|
1126
|
+
this.updateAriaActiveDescendant();
|
|
1076
1127
|
}
|
|
1077
1128
|
};
|
|
1078
1129
|
MultiSelect.prototype.onKeyDown = function (e) {
|
|
@@ -1574,7 +1625,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1574
1625
|
};
|
|
1575
1626
|
MultiSelect.prototype.invokeCheckboxSelection = function (element, eve, isClearAll) {
|
|
1576
1627
|
this.notify('updatelist', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', li: element, e: eve });
|
|
1577
|
-
|
|
1628
|
+
this.updateAriaActiveDescendant();
|
|
1578
1629
|
if ((this.value && this.value.length !== this.mainData.length)
|
|
1579
1630
|
&& (this.mode === 'CheckBox' && this.showSelectAll && !(this.isSelectAll || isClearAll))) {
|
|
1580
1631
|
this.notify('checkSelectAll', {
|
|
@@ -1687,7 +1738,6 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1687
1738
|
HIDE_LIST :
|
|
1688
1739
|
dropDownBaseClasses.selected);
|
|
1689
1740
|
if (this.mode === 'CheckBox') {
|
|
1690
|
-
element2.firstElementChild.setAttribute('aria-checked', 'false');
|
|
1691
1741
|
removeClass([element2.firstElementChild.lastElementChild], 'e-check');
|
|
1692
1742
|
}
|
|
1693
1743
|
}
|
|
@@ -1697,7 +1747,6 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1697
1747
|
HIDE_LIST :
|
|
1698
1748
|
dropDownBaseClasses.selected);
|
|
1699
1749
|
if (this.mode === 'CheckBox') {
|
|
1700
|
-
element2.firstElementChild.setAttribute('aria-checked', 'true');
|
|
1701
1750
|
addClass([element2.firstElementChild.lastElementChild], 'e-check');
|
|
1702
1751
|
}
|
|
1703
1752
|
}
|
|
@@ -1958,109 +2007,111 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1958
2007
|
_super.prototype.render.call(this);
|
|
1959
2008
|
}
|
|
1960
2009
|
if (!this.popupObj) {
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
checkboxFilter.
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
this.
|
|
1971
|
-
|
|
1972
|
-
}
|
|
1973
|
-
append([this.list], this.popupWrapper);
|
|
1974
|
-
if (this.footerTemplate) {
|
|
1975
|
-
this.setFooterTemplate();
|
|
1976
|
-
overAllHeight -= this.footer.offsetHeight;
|
|
1977
|
-
}
|
|
1978
|
-
if (this.mode === 'CheckBox' && this.showSelectAll) {
|
|
1979
|
-
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
1980
|
-
overAllHeight -= this.selectAllHeight;
|
|
1981
|
-
}
|
|
1982
|
-
else if (this.mode === 'CheckBox' && !this.showSelectAll && (!this.headerTemplate && !this.footerTemplate)) {
|
|
1983
|
-
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
1984
|
-
overAllHeight = parseInt(this.popupHeight, 10);
|
|
1985
|
-
}
|
|
1986
|
-
else if (this.mode === 'CheckBox' && !this.showSelectAll) {
|
|
1987
|
-
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
1988
|
-
overAllHeight = parseInt(this.popupHeight, 10);
|
|
1989
|
-
if (this.headerTemplate && this.header) {
|
|
2010
|
+
if (!isNullOrUndefined(this.popupWrapper)) {
|
|
2011
|
+
document.body.appendChild(this.popupWrapper);
|
|
2012
|
+
var checkboxFilter = this.popupWrapper.querySelector('.' + FILTERPARENT);
|
|
2013
|
+
if (this.mode === 'CheckBox' && !this.allowFiltering && checkboxFilter && this.filterParent) {
|
|
2014
|
+
checkboxFilter.remove();
|
|
2015
|
+
this.filterParent = null;
|
|
2016
|
+
}
|
|
2017
|
+
var overAllHeight = parseInt(this.popupHeight, 10);
|
|
2018
|
+
this.popupWrapper.style.visibility = 'hidden';
|
|
2019
|
+
if (this.headerTemplate) {
|
|
2020
|
+
this.setHeaderTemplate();
|
|
1990
2021
|
overAllHeight -= this.header.offsetHeight;
|
|
1991
2022
|
}
|
|
1992
|
-
|
|
2023
|
+
append([this.list], this.popupWrapper);
|
|
2024
|
+
if (this.footerTemplate) {
|
|
2025
|
+
this.setFooterTemplate();
|
|
1993
2026
|
overAllHeight -= this.footer.offsetHeight;
|
|
1994
2027
|
}
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
module: 'CheckBoxSelection',
|
|
1999
|
-
enable: this.mode === 'CheckBox',
|
|
2000
|
-
popupElement: this.popupWrapper
|
|
2001
|
-
};
|
|
2002
|
-
if (this.allowFiltering) {
|
|
2003
|
-
this.notify('searchBox', args);
|
|
2004
|
-
overAllHeight -= this.searchBoxHeight;
|
|
2028
|
+
if (this.mode === 'CheckBox' && this.showSelectAll) {
|
|
2029
|
+
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
2030
|
+
overAllHeight -= this.selectAllHeight;
|
|
2005
2031
|
}
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
this.
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
this.popupObj = new Popup(this.popupWrapper, {
|
|
2016
|
-
width: this.calcPopupWidth(), targetType: 'relative', position: { X: 'left', Y: 'bottom' },
|
|
2017
|
-
relateTo: this.overAllWrapper, collision: { X: 'flip', Y: 'flip' }, offsetY: 1,
|
|
2018
|
-
enableRtl: this.enableRtl, zIndex: this.zIndex,
|
|
2019
|
-
close: function () {
|
|
2020
|
-
if (_this.popupObj.element.parentElement) {
|
|
2021
|
-
_this.popupObj.unwireScrollEvents();
|
|
2022
|
-
// For restrict the page scrolling in safari browser
|
|
2023
|
-
var checkboxFilterInput = _this.popupWrapper.querySelector('.' + FILTERINPUT);
|
|
2024
|
-
if (_this.mode === 'CheckBox' && checkboxFilterInput && document.activeElement === checkboxFilterInput) {
|
|
2025
|
-
checkboxFilterInput.blur();
|
|
2026
|
-
}
|
|
2027
|
-
detach(_this.popupObj.element);
|
|
2028
|
-
}
|
|
2029
|
-
},
|
|
2030
|
-
open: function () {
|
|
2031
|
-
_this.popupObj.resolveCollision();
|
|
2032
|
-
if (!_this.isFirstClick) {
|
|
2033
|
-
var ulElement = _this.list.querySelector('ul');
|
|
2034
|
-
if (ulElement) {
|
|
2035
|
-
if (!(_this.mode !== 'CheckBox' && (_this.allowFiltering || _this.allowCustomValue) &&
|
|
2036
|
-
_this.targetElement().trim() !== '')) {
|
|
2037
|
-
_this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
|
|
2038
|
-
}
|
|
2039
|
-
}
|
|
2040
|
-
_this.isFirstClick = true;
|
|
2032
|
+
else if (this.mode === 'CheckBox' && !this.showSelectAll && (!this.headerTemplate && !this.footerTemplate)) {
|
|
2033
|
+
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
2034
|
+
overAllHeight = parseInt(this.popupHeight, 10);
|
|
2035
|
+
}
|
|
2036
|
+
else if (this.mode === 'CheckBox' && !this.showSelectAll) {
|
|
2037
|
+
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
2038
|
+
overAllHeight = parseInt(this.popupHeight, 10);
|
|
2039
|
+
if (this.headerTemplate && this.header) {
|
|
2040
|
+
overAllHeight -= this.header.offsetHeight;
|
|
2041
2041
|
}
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
_this.targetElement().trim() !== '')) {
|
|
2045
|
-
_this.loadTemplate();
|
|
2042
|
+
if (this.footerTemplate && this.footer) {
|
|
2043
|
+
overAllHeight -= this.footer.offsetHeight;
|
|
2046
2044
|
}
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2045
|
+
}
|
|
2046
|
+
if (this.mode === 'CheckBox') {
|
|
2047
|
+
var args = {
|
|
2048
|
+
module: 'CheckBoxSelection',
|
|
2049
|
+
enable: this.mode === 'CheckBox',
|
|
2050
|
+
popupElement: this.popupWrapper
|
|
2051
|
+
};
|
|
2052
|
+
if (this.allowFiltering) {
|
|
2053
|
+
this.notify('searchBox', args);
|
|
2054
|
+
overAllHeight -= this.searchBoxHeight;
|
|
2052
2055
|
}
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
+
addClass([this.popupWrapper], 'e-checkbox');
|
|
2057
|
+
}
|
|
2058
|
+
if (this.popupHeight !== 'auto') {
|
|
2059
|
+
this.list.style.maxHeight = formatUnit(overAllHeight);
|
|
2060
|
+
this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight);
|
|
2061
|
+
}
|
|
2062
|
+
else {
|
|
2063
|
+
this.list.style.maxHeight = formatUnit(this.popupHeight);
|
|
2064
|
+
}
|
|
2065
|
+
this.popupObj = new Popup(this.popupWrapper, {
|
|
2066
|
+
width: this.calcPopupWidth(), targetType: 'relative', position: { X: 'left', Y: 'bottom' },
|
|
2067
|
+
relateTo: this.overAllWrapper, collision: { X: 'flip', Y: 'flip' }, offsetY: 1,
|
|
2068
|
+
enableRtl: this.enableRtl, zIndex: this.zIndex,
|
|
2069
|
+
close: function () {
|
|
2070
|
+
if (_this.popupObj.element.parentElement) {
|
|
2071
|
+
_this.popupObj.unwireScrollEvents();
|
|
2072
|
+
// For restrict the page scrolling in safari browser
|
|
2073
|
+
var checkboxFilterInput = _this.popupWrapper.querySelector('.' + FILTERINPUT);
|
|
2074
|
+
if (_this.mode === 'CheckBox' && checkboxFilterInput && document.activeElement === checkboxFilterInput) {
|
|
2075
|
+
checkboxFilterInput.blur();
|
|
2076
|
+
}
|
|
2077
|
+
detach(_this.popupObj.element);
|
|
2078
|
+
}
|
|
2079
|
+
},
|
|
2080
|
+
open: function () {
|
|
2081
|
+
_this.popupObj.resolveCollision();
|
|
2082
|
+
if (!_this.isFirstClick) {
|
|
2083
|
+
var ulElement = _this.list.querySelector('ul');
|
|
2084
|
+
if (ulElement) {
|
|
2085
|
+
if (!(_this.mode !== 'CheckBox' && (_this.allowFiltering || _this.allowCustomValue) &&
|
|
2086
|
+
_this.targetElement().trim() !== '')) {
|
|
2087
|
+
_this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
_this.isFirstClick = true;
|
|
2091
|
+
}
|
|
2092
|
+
_this.popupObj.wireScrollEvents();
|
|
2093
|
+
if (!(_this.mode !== 'CheckBox' && (_this.allowFiltering || _this.allowCustomValue) &&
|
|
2094
|
+
_this.targetElement().trim() !== '')) {
|
|
2095
|
+
_this.loadTemplate();
|
|
2096
|
+
}
|
|
2097
|
+
_this.setScrollPosition();
|
|
2098
|
+
if (_this.allowFiltering) {
|
|
2099
|
+
_this.notify('inputFocus', {
|
|
2100
|
+
module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox', value: 'focus'
|
|
2101
|
+
});
|
|
2102
|
+
}
|
|
2103
|
+
}, targetExitViewport: function () {
|
|
2104
|
+
if (!Browser.isDevice) {
|
|
2105
|
+
_this.hidePopup();
|
|
2106
|
+
}
|
|
2056
2107
|
}
|
|
2108
|
+
});
|
|
2109
|
+
if (this.mode === 'CheckBox' && Browser.isDevice && this.allowFiltering) {
|
|
2110
|
+
this.notify('deviceSearchBox', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
2057
2111
|
}
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
this.notify('deviceSearchBox', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
2112
|
+
this.popupObj.close();
|
|
2113
|
+
this.popupWrapper.style.visibility = '';
|
|
2061
2114
|
}
|
|
2062
|
-
this.popupObj.close();
|
|
2063
|
-
this.popupWrapper.style.visibility = '';
|
|
2064
2115
|
}
|
|
2065
2116
|
};
|
|
2066
2117
|
MultiSelect.prototype.setHeaderTemplate = function () {
|
|
@@ -2130,6 +2181,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2130
2181
|
this.removeValue(temp, e, null, true);
|
|
2131
2182
|
}
|
|
2132
2183
|
}
|
|
2184
|
+
this.selectedElementID = null;
|
|
2185
|
+
this.inputElement.removeAttribute('aria-activedescendant');
|
|
2133
2186
|
}
|
|
2134
2187
|
else {
|
|
2135
2188
|
this.clearAllCallback(e);
|
|
@@ -2233,11 +2286,12 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2233
2286
|
};
|
|
2234
2287
|
MultiSelect.prototype.search = function (e) {
|
|
2235
2288
|
var _this = this;
|
|
2289
|
+
this.resetFilteredData = true;
|
|
2236
2290
|
if (!isNullOrUndefined(e)) {
|
|
2237
2291
|
this.keyCode = e.keyCode;
|
|
2238
2292
|
}
|
|
2239
2293
|
if (!this.isPopupOpen() && this.openOnClick) {
|
|
2240
|
-
this.showPopup();
|
|
2294
|
+
this.showPopup(e);
|
|
2241
2295
|
}
|
|
2242
2296
|
this.openClick(e);
|
|
2243
2297
|
if (this.checkTextLength() && !this.allowFiltering && !isNullOrUndefined(e) && (e.keyCode !== 8)) {
|
|
@@ -2321,7 +2375,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2321
2375
|
var temp;
|
|
2322
2376
|
var tempData = this.listData;
|
|
2323
2377
|
this.listData = this.mainData;
|
|
2324
|
-
this.hiddenElement
|
|
2378
|
+
if (!isNullOrUndefined(this.hiddenElement)) {
|
|
2379
|
+
this.hiddenElement.innerHTML = '';
|
|
2380
|
+
}
|
|
2325
2381
|
if (!isNullOrUndefined(this.value)) {
|
|
2326
2382
|
for (var index = 0; !isNullOrUndefined(this.value[index]); index++) {
|
|
2327
2383
|
var listValue = this.findListElement(((!isNullOrUndefined(this.mainList)) ? this.mainList : this.ulElement), 'li', 'data-value', this.value[index]);
|
|
@@ -2339,7 +2395,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2339
2395
|
data += temp + delimiterChar + ' ';
|
|
2340
2396
|
text.push(temp);
|
|
2341
2397
|
}
|
|
2342
|
-
this.hiddenElement
|
|
2398
|
+
if (!isNullOrUndefined(this.hiddenElement)) {
|
|
2399
|
+
this.hiddenElement.innerHTML += '<option selected value ="' + this.value[index] + '">' + index + '</option>';
|
|
2400
|
+
}
|
|
2343
2401
|
}
|
|
2344
2402
|
}
|
|
2345
2403
|
this.setProperties({ text: text.toString() }, true);
|
|
@@ -2384,7 +2442,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2384
2442
|
|| this.list.querySelector('.e-ul') && this.list.querySelector('.e-ul').childElementCount === 0)) {
|
|
2385
2443
|
isEmptyData = true;
|
|
2386
2444
|
}
|
|
2387
|
-
_super.prototype.render.call(this, isEmptyData);
|
|
2445
|
+
_super.prototype.render.call(this, null, isEmptyData);
|
|
2388
2446
|
this.unwireListEvents();
|
|
2389
2447
|
this.wireListEvents();
|
|
2390
2448
|
};
|
|
@@ -2472,7 +2530,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2472
2530
|
}
|
|
2473
2531
|
};
|
|
2474
2532
|
MultiSelect.prototype.updateDataList = function () {
|
|
2475
|
-
if (this.mainList && this.ulElement && !(this.isFiltered || this.filterAction)) {
|
|
2533
|
+
if (this.mainList && this.ulElement && !(this.isFiltered || this.filterAction || this.targetElement().trim())) {
|
|
2476
2534
|
var isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
|
|
2477
2535
|
var isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
|
|
2478
2536
|
var isAngularTemplateUpdate = this.itemTemplate && this.ulElement.childElementCount > 0 && !(this.ulElement.childElementCount < this.mainList.childElementCount) && (this.ulElement.children[0].childElementCount > 0 || (this.fields.groupBy && this.ulElement.children[1] && this.ulElement.children[1].childElementCount > 0));
|
|
@@ -2551,10 +2609,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2551
2609
|
selectItems[temp1 - 1].setAttribute('aria-selected', 'false');
|
|
2552
2610
|
if (this.mode === 'CheckBox') {
|
|
2553
2611
|
if (selectedItems && (selectedItems.length > (temp1 - 1))) {
|
|
2554
|
-
selectedItems[temp1 - 1].firstElementChild.setAttribute('aria-checked', 'false');
|
|
2555
2612
|
removeClass([selectedItems[temp1 - 1].firstElementChild.lastElementChild], 'e-check');
|
|
2556
2613
|
}
|
|
2557
|
-
selectItems[temp1 - 1].firstElementChild.setAttribute('aria-checked', 'false');
|
|
2558
2614
|
removeClass([selectItems[temp1 - 1].firstElementChild.lastElementChild], 'e-check');
|
|
2559
2615
|
}
|
|
2560
2616
|
temp1--;
|
|
@@ -2595,10 +2651,12 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2595
2651
|
if (this.enabled && this.isValidLI(element)) {
|
|
2596
2652
|
this.removeFocus();
|
|
2597
2653
|
addClass([element], dropDownBaseClasses.focus);
|
|
2654
|
+
this.updateAriaActiveDescendant();
|
|
2598
2655
|
}
|
|
2599
2656
|
else {
|
|
2600
2657
|
if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)) {
|
|
2601
2658
|
addClass([element], dropDownBaseClasses.focus);
|
|
2659
|
+
this.updateAriaActiveDescendant();
|
|
2602
2660
|
}
|
|
2603
2661
|
}
|
|
2604
2662
|
};
|
|
@@ -2610,9 +2668,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2610
2668
|
addClass([element], className);
|
|
2611
2669
|
this.updateMainList(false, element.getAttribute('data-value'), mainElement);
|
|
2612
2670
|
element.setAttribute('aria-selected', 'true');
|
|
2613
|
-
if (this.mode === 'CheckBox') {
|
|
2614
|
-
var ariaCheck = element.
|
|
2615
|
-
if (ariaCheck ===
|
|
2671
|
+
if (this.mode === 'CheckBox' && element.classList.contains('e-active')) {
|
|
2672
|
+
var ariaCheck = element.getElementsByClassName('e-check').length;
|
|
2673
|
+
if (ariaCheck === 0) {
|
|
2616
2674
|
this.notify('updatelist', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', li: element, e: this });
|
|
2617
2675
|
}
|
|
2618
2676
|
}
|
|
@@ -2620,7 +2678,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2620
2678
|
if (this.chipCollectionWrapper) {
|
|
2621
2679
|
this.removeChipSelection();
|
|
2622
2680
|
}
|
|
2623
|
-
|
|
2681
|
+
this.selectedElementID = element.id;
|
|
2624
2682
|
}
|
|
2625
2683
|
};
|
|
2626
2684
|
MultiSelect.prototype.updateDelimeter = function (delimChar, e) {
|
|
@@ -2931,9 +2989,11 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2931
2989
|
if (this.chipCollectionWrapper) {
|
|
2932
2990
|
this.chipCollectionWrapper.style.display = 'none';
|
|
2933
2991
|
}
|
|
2934
|
-
this.viewWrapper
|
|
2935
|
-
|
|
2936
|
-
|
|
2992
|
+
if (!isNullOrUndefined(this.viewWrapper)) {
|
|
2993
|
+
this.viewWrapper.style.display = '';
|
|
2994
|
+
this.viewWrapper.style.width = '';
|
|
2995
|
+
this.viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER);
|
|
2996
|
+
}
|
|
2937
2997
|
if (this.value && this.value.length) {
|
|
2938
2998
|
var data = '';
|
|
2939
2999
|
var temp = void 0;
|
|
@@ -2984,7 +3044,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2984
3044
|
overAllContainer = this.componentWrapper.offsetWidth -
|
|
2985
3045
|
parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) -
|
|
2986
3046
|
parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
|
|
2987
|
-
if ((wrapperleng + downIconWidth + this.clearIconWidth)
|
|
3047
|
+
if ((wrapperleng + downIconWidth + this.clearIconWidth) >= overAllContainer) {
|
|
2988
3048
|
if (tempData !== undefined && tempData !== '') {
|
|
2989
3049
|
temp = tempData;
|
|
2990
3050
|
index = tempIndex + 1;
|
|
@@ -2993,7 +3053,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2993
3053
|
remaining = this.value.length - index;
|
|
2994
3054
|
wrapperleng = this.viewWrapper.offsetWidth +
|
|
2995
3055
|
parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
|
|
2996
|
-
while (((wrapperleng + remainSize + downIconWidth + this.clearIconWidth)
|
|
3056
|
+
while (((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) >= overAllContainer) && wrapperleng !== 0
|
|
2997
3057
|
&& this.viewWrapper.innerHTML !== '') {
|
|
2998
3058
|
var textArr = [];
|
|
2999
3059
|
this.viewWrapper.innerHTML = textArr.join(this.delimiterChar);
|
|
@@ -3003,7 +3063,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3003
3063
|
}
|
|
3004
3064
|
break;
|
|
3005
3065
|
}
|
|
3006
|
-
else if ((wrapperleng + remainSize + downIconWidth + this.clearIconWidth)
|
|
3066
|
+
else if ((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) < overAllContainer) {
|
|
3007
3067
|
tempData = data;
|
|
3008
3068
|
tempIndex = index;
|
|
3009
3069
|
}
|
|
@@ -3021,8 +3081,10 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3021
3081
|
}
|
|
3022
3082
|
}
|
|
3023
3083
|
else {
|
|
3024
|
-
this.viewWrapper
|
|
3025
|
-
|
|
3084
|
+
if (!isNullOrUndefined(this.viewWrapper)) {
|
|
3085
|
+
this.viewWrapper.innerHTML = '';
|
|
3086
|
+
this.viewWrapper.style.display = 'none';
|
|
3087
|
+
}
|
|
3026
3088
|
}
|
|
3027
3089
|
};
|
|
3028
3090
|
MultiSelect.prototype.checkClearIconWidth = function () {
|
|
@@ -3095,29 +3157,41 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3095
3157
|
return temp;
|
|
3096
3158
|
};
|
|
3097
3159
|
MultiSelect.prototype.unWireEvent = function () {
|
|
3098
|
-
|
|
3160
|
+
if (!isNullOrUndefined(this.componentWrapper)) {
|
|
3161
|
+
EventHandler.remove(this.componentWrapper, 'mousedown', this.wrapperClick);
|
|
3162
|
+
}
|
|
3099
3163
|
EventHandler.remove(window, 'resize', this.windowResize);
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3164
|
+
if (!isNullOrUndefined(this.inputElement)) {
|
|
3165
|
+
EventHandler.remove(this.inputElement, 'focus', this.focusInHandler);
|
|
3166
|
+
EventHandler.remove(this.inputElement, 'keydown', this.onKeyDown);
|
|
3167
|
+
if (this.mode !== 'CheckBox') {
|
|
3168
|
+
EventHandler.remove(this.inputElement, 'input', this.onInput);
|
|
3169
|
+
}
|
|
3170
|
+
EventHandler.remove(this.inputElement, 'keyup', this.keyUp);
|
|
3171
|
+
var formElement = closest(this.inputElement, 'form');
|
|
3172
|
+
if (formElement) {
|
|
3173
|
+
EventHandler.remove(formElement, 'reset', this.resetValueHandler);
|
|
3174
|
+
}
|
|
3175
|
+
EventHandler.remove(this.inputElement, 'blur', this.onBlurHandler);
|
|
3104
3176
|
}
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3177
|
+
if (!isNullOrUndefined(this.componentWrapper)) {
|
|
3178
|
+
EventHandler.remove(this.componentWrapper, 'mouseover', this.mouseIn);
|
|
3179
|
+
EventHandler.remove(this.componentWrapper, 'mouseout', this.mouseOut);
|
|
3180
|
+
}
|
|
3181
|
+
if (!isNullOrUndefined(this.overAllClear)) {
|
|
3182
|
+
EventHandler.remove(this.overAllClear, 'mousedown', this.clearAll);
|
|
3183
|
+
}
|
|
3184
|
+
if (!isNullOrUndefined(this.inputElement)) {
|
|
3185
|
+
EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
|
|
3109
3186
|
}
|
|
3110
|
-
EventHandler.remove(this.inputElement, 'blur', this.onBlurHandler);
|
|
3111
|
-
EventHandler.remove(this.componentWrapper, 'mouseover', this.mouseIn);
|
|
3112
|
-
EventHandler.remove(this.componentWrapper, 'mouseout', this.mouseOut);
|
|
3113
|
-
EventHandler.remove(this.overAllClear, 'mousedown', this.clearAll);
|
|
3114
|
-
EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
|
|
3115
3187
|
};
|
|
3116
3188
|
MultiSelect.prototype.selectAllItem = function (state, event, list) {
|
|
3117
3189
|
var li;
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3190
|
+
if (!isNullOrUndefined(this.list)) {
|
|
3191
|
+
li = this.list.querySelectorAll(state ?
|
|
3192
|
+
'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' :
|
|
3193
|
+
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)');
|
|
3194
|
+
}
|
|
3121
3195
|
if (this.value && this.value.length && event && event.target
|
|
3122
3196
|
&& closest(event.target, '.e-close-hooker') && this.allowFiltering) {
|
|
3123
3197
|
li = this.mainList.querySelectorAll(state ?
|
|
@@ -3167,6 +3241,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3167
3241
|
target.classList.remove('e-active');
|
|
3168
3242
|
}
|
|
3169
3243
|
target.classList.add('e-item-focus');
|
|
3244
|
+
this.updateAriaActiveDescendant();
|
|
3170
3245
|
}
|
|
3171
3246
|
this.textboxValueUpdate();
|
|
3172
3247
|
this.checkPlaceholderSize();
|
|
@@ -3181,6 +3256,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3181
3256
|
else {
|
|
3182
3257
|
this.updateValue(event, li, state);
|
|
3183
3258
|
}
|
|
3259
|
+
this.addValidInputClass();
|
|
3184
3260
|
};
|
|
3185
3261
|
MultiSelect.prototype.updateValue = function (event, li, state) {
|
|
3186
3262
|
var _this = this;
|
|
@@ -3406,6 +3482,11 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3406
3482
|
MultiSelect.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
3407
3483
|
if (newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource))
|
|
3408
3484
|
|| newProp.query && !isNullOrUndefined(Object.keys(newProp.query))) {
|
|
3485
|
+
if (this.resetFilteredData) {
|
|
3486
|
+
// The filtered data is not being reset in the component after the user focuses out.
|
|
3487
|
+
this.resetMainList = !this.resetMainList ? this.mainList : this.resetMainList;
|
|
3488
|
+
this.resetFilteredData = false;
|
|
3489
|
+
}
|
|
3409
3490
|
this.mainList = null;
|
|
3410
3491
|
this.mainData = null;
|
|
3411
3492
|
this.isFirstClick = false;
|
|
@@ -3466,6 +3547,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3466
3547
|
case 'cssClass':
|
|
3467
3548
|
this.updateOldPropCssClass(oldProp.cssClass);
|
|
3468
3549
|
this.updateCssClass();
|
|
3550
|
+
this.calculateWidth();
|
|
3469
3551
|
break;
|
|
3470
3552
|
case 'enableRtl':
|
|
3471
3553
|
this.enableRTL(newProp.enableRtl);
|
|
@@ -3492,6 +3574,11 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3492
3574
|
case 'floatLabelType':
|
|
3493
3575
|
this.setFloatLabelType();
|
|
3494
3576
|
this.addValidInputClass();
|
|
3577
|
+
Input.createSpanElement(this.overAllWrapper, this.createElement);
|
|
3578
|
+
this.calculateWidth();
|
|
3579
|
+
if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
|
|
3580
|
+
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
|
|
3581
|
+
}
|
|
3495
3582
|
break;
|
|
3496
3583
|
case 'enableSelectionOrder':
|
|
3497
3584
|
break;
|
|
@@ -3551,7 +3638,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3551
3638
|
MultiSelect.prototype.addNonPresentItems = function (valuecheck, ulElement, list, event) {
|
|
3552
3639
|
var _this = this;
|
|
3553
3640
|
this.dataSource.executeQuery(this.getForQuery(valuecheck)).then(function (e) {
|
|
3554
|
-
|
|
3641
|
+
if (e.result.length > 0) {
|
|
3642
|
+
_this.addItem(e.result, list.length);
|
|
3643
|
+
}
|
|
3555
3644
|
_this.updateActionList(ulElement, list, event);
|
|
3556
3645
|
});
|
|
3557
3646
|
};
|
|
@@ -3610,7 +3699,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3610
3699
|
* Adds a new item to the multiselect popup list. By default, new item appends to the list as the last item,
|
|
3611
3700
|
* but you can insert based on the index parameter.
|
|
3612
3701
|
*
|
|
3613
|
-
* @param
|
|
3702
|
+
* @param { Object[] } items - Specifies an array of JSON data or a JSON data.
|
|
3614
3703
|
* @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.
|
|
3615
3704
|
* @returns {void}
|
|
3616
3705
|
*/
|
|
@@ -3642,6 +3731,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3642
3731
|
_this.overAllWrapper.classList.remove(iconAnimation);
|
|
3643
3732
|
_this.popupObj.hide(new Animation(eventArgs.animation));
|
|
3644
3733
|
attributes(_this.inputElement, { 'aria-expanded': 'false' });
|
|
3734
|
+
_this.inputElement.removeAttribute('aria-owns');
|
|
3735
|
+
_this.inputElement.removeAttribute('aria-activedescendant');
|
|
3645
3736
|
if (_this.allowFiltering) {
|
|
3646
3737
|
_this.notify('inputFocus', { module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox', value: 'clear' });
|
|
3647
3738
|
}
|
|
@@ -3657,7 +3748,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3657
3748
|
*
|
|
3658
3749
|
* @returns {void}
|
|
3659
3750
|
*/
|
|
3660
|
-
MultiSelect.prototype.showPopup = function () {
|
|
3751
|
+
MultiSelect.prototype.showPopup = function (e) {
|
|
3661
3752
|
var _this = this;
|
|
3662
3753
|
if (!this.enabled) {
|
|
3663
3754
|
return;
|
|
@@ -3667,7 +3758,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3667
3758
|
if (!args.cancel) {
|
|
3668
3759
|
if (!_this.ulElement) {
|
|
3669
3760
|
_this.beforePopupOpen = true;
|
|
3670
|
-
_super.prototype.render.call(_this);
|
|
3761
|
+
_super.prototype.render.call(_this, e);
|
|
3671
3762
|
if (_this.mode === 'CheckBox' && Browser.isDevice && _this.allowFiltering) {
|
|
3672
3763
|
_this.notify('popupFullScreen', { module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox' });
|
|
3673
3764
|
}
|
|
@@ -3683,7 +3774,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3683
3774
|
_this.beforePopupOpen = false;
|
|
3684
3775
|
return;
|
|
3685
3776
|
}
|
|
3686
|
-
_this.onPopupShown();
|
|
3777
|
+
_this.onPopupShown(e);
|
|
3687
3778
|
}
|
|
3688
3779
|
});
|
|
3689
3780
|
};
|
|
@@ -3785,12 +3876,12 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3785
3876
|
spellcheck: 'false',
|
|
3786
3877
|
type: 'text',
|
|
3787
3878
|
autocomplete: 'off',
|
|
3788
|
-
tabindex: '0'
|
|
3879
|
+
tabindex: '0',
|
|
3880
|
+
role: 'combobox'
|
|
3789
3881
|
}
|
|
3790
3882
|
});
|
|
3791
3883
|
if (this.mode === 'Default' || this.mode === 'Box') {
|
|
3792
3884
|
this.inputElement.setAttribute('aria-describedby', this.chipCollectionWrapper.id);
|
|
3793
|
-
this.inputElement.setAttribute('aria-labelledby', this.chipCollectionWrapper.id);
|
|
3794
3885
|
}
|
|
3795
3886
|
if (this.element.tagName !== this.getNgDirective()) {
|
|
3796
3887
|
this.element.style.display = 'none';
|
|
@@ -3823,6 +3914,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3823
3914
|
if (this.mode !== 'CheckBox') {
|
|
3824
3915
|
this.hideOverAllClear();
|
|
3825
3916
|
}
|
|
3917
|
+
if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
|
|
3918
|
+
this.enabled = false;
|
|
3919
|
+
}
|
|
3826
3920
|
this.wireEvent();
|
|
3827
3921
|
this.enable(this.enabled);
|
|
3828
3922
|
this.enableRTL(this.enableRtl);
|
|
@@ -3830,6 +3924,11 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3830
3924
|
if (this.element.hasAttribute('data-val')) {
|
|
3831
3925
|
this.element.setAttribute('data-val', 'false');
|
|
3832
3926
|
}
|
|
3927
|
+
Input.createSpanElement(this.overAllWrapper, this.createElement);
|
|
3928
|
+
this.calculateWidth();
|
|
3929
|
+
if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
|
|
3930
|
+
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
|
|
3931
|
+
}
|
|
3833
3932
|
this.renderComplete();
|
|
3834
3933
|
};
|
|
3835
3934
|
MultiSelect.prototype.checkInitialValue = function () {
|
|
@@ -3911,11 +4010,13 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3911
4010
|
}
|
|
3912
4011
|
};
|
|
3913
4012
|
MultiSelect.prototype.addValidInputClass = function () {
|
|
3914
|
-
if (
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
4013
|
+
if (!isNullOrUndefined(this.overAllWrapper)) {
|
|
4014
|
+
if ((!isNullOrUndefined(this.value) && this.value.length) || this.floatLabelType === 'Always') {
|
|
4015
|
+
addClass([this.overAllWrapper], 'e-valid-input');
|
|
4016
|
+
}
|
|
4017
|
+
else {
|
|
4018
|
+
removeClass([this.overAllWrapper], 'e-valid-input');
|
|
4019
|
+
}
|
|
3919
4020
|
}
|
|
3920
4021
|
};
|
|
3921
4022
|
MultiSelect.prototype.dropDownIcon = function () {
|
|
@@ -3966,15 +4067,19 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3966
4067
|
this.ulElement = null;
|
|
3967
4068
|
this.mainListCollection = null;
|
|
3968
4069
|
_super.prototype.destroy.call(this);
|
|
3969
|
-
var temp = ['readonly', 'aria-disabled', '
|
|
4070
|
+
var temp = ['readonly', 'aria-disabled', 'placeholder'];
|
|
3970
4071
|
var length = temp.length;
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
4072
|
+
if (!isNullOrUndefined(this.inputElement)) {
|
|
4073
|
+
while (length > 0) {
|
|
4074
|
+
this.inputElement.removeAttribute(temp[length - 1]);
|
|
4075
|
+
length--;
|
|
4076
|
+
}
|
|
4077
|
+
}
|
|
4078
|
+
if (!isNullOrUndefined(this.element)) {
|
|
4079
|
+
this.element.removeAttribute('data-initial-value');
|
|
4080
|
+
this.element.style.display = 'block';
|
|
3974
4081
|
}
|
|
3975
|
-
this.
|
|
3976
|
-
this.element.style.display = 'block';
|
|
3977
|
-
if (this.overAllWrapper.parentElement) {
|
|
4082
|
+
if (this.overAllWrapper && this.overAllWrapper.parentElement) {
|
|
3978
4083
|
if (this.overAllWrapper.parentElement.tagName === this.getNgDirective()) {
|
|
3979
4084
|
remove(this.overAllWrapper);
|
|
3980
4085
|
}
|
|
@@ -3983,6 +4088,25 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3983
4088
|
remove(this.overAllWrapper);
|
|
3984
4089
|
}
|
|
3985
4090
|
}
|
|
4091
|
+
this.componentWrapper = null;
|
|
4092
|
+
this.overAllClear = null;
|
|
4093
|
+
this.overAllWrapper = null;
|
|
4094
|
+
this.hiddenElement = null;
|
|
4095
|
+
this.searchWrapper = null;
|
|
4096
|
+
this.viewWrapper = null;
|
|
4097
|
+
this.chipCollectionWrapper = null;
|
|
4098
|
+
this.targetInputElement = null;
|
|
4099
|
+
this.popupWrapper = null;
|
|
4100
|
+
this.inputElement = null;
|
|
4101
|
+
this.delimiterWrapper = null;
|
|
4102
|
+
this.popupObj = null;
|
|
4103
|
+
this.popupWrapper = null;
|
|
4104
|
+
this.liCollections = null;
|
|
4105
|
+
this.header = null;
|
|
4106
|
+
this.mainList = null;
|
|
4107
|
+
this.mainListCollection = null;
|
|
4108
|
+
this.footer = null;
|
|
4109
|
+
this.selectAllEventEle = null;
|
|
3986
4110
|
};
|
|
3987
4111
|
__decorate([
|
|
3988
4112
|
Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)
|