@syncfusion/ej2-dropdowns 24.1.45-12082 → 24.1.46
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 +260 -0
- package/CHANGELOG.md +2107 -2101
- package/{ReadMe.md → README.md} +217 -217
- package/dist/ej2-dropdowns.min.js +10 -1
- package/dist/ej2-dropdowns.umd.min.js +10 -1
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +127 -61
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +274 -203
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +10 -1
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +9 -0
- 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 +21 -21
- 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 +29 -29
- package/src/common/virtual-scroll.js +46 -46
- package/src/drop-down-base/drop-down-base-model.d.ts +200 -200
- package/src/drop-down-base/drop-down-base.d.ts +16 -16
- package/src/drop-down-base/drop-down-base.js +20 -20
- package/src/drop-down-list/drop-down-list-model.d.ts +202 -202
- package/src/drop-down-list/drop-down-list.d.ts +4 -4
- package/src/drop-down-list/drop-down-list.js +20 -20
- package/src/drop-down-tree/drop-down-tree-model.d.ts +468 -468
- package/src/drop-down-tree/drop-down-tree.d.ts +3 -0
- package/src/drop-down-tree/drop-down-tree.js +95 -24
- 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 +19 -19
- package/src/mention/mention-model.d.ts +261 -261
- package/src/mention/mention.js +19 -19
- package/src/multi-select/multi-select-model.d.ts +512 -512
- package/src/multi-select/multi-select.js +19 -19
- package/styles/auto-complete/_all.scss +1 -1
- 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/combo-box/_all.scss +1 -1
- 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/_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 +192 -192
- 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/material3-dark.scss +1 -1
- package/styles/drop-down-base/material3.scss +1 -1
- package/styles/drop-down-list/_all.scss +3 -3
- 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 -315
- 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/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/material3-dark.scss +1 -1
- package/styles/drop-down-list/material3.scss +1 -1
- package/styles/drop-down-tree/_all.scss +2 -2
- 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 -1423
- 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/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/material3-dark.scss +1 -1
- package/styles/drop-down-tree/material3.scss +1 -1
- package/styles/list-box/_all.scss +2 -2
- 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/_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/material3-dark.scss +1 -1
- package/styles/material3.scss +1 -1
- package/styles/mention/_all.scss +1 -1
- 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/_bootstrap-dark-definition.scss +203 -203
- package/styles/multi-select/_bootstrap-definition.scss +192 -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 +241 -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 +2199 -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/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/material3-dark.scss +1 -1
- package/styles/multi-select/material3.scss +1 -1
- package/tslint.json +111 -0
- package/dist/ts/auto-complete/auto-complete.ts +0 -623
- package/dist/ts/combo-box/combo-box.ts +0 -1099
- package/dist/ts/common/highlight-search.ts +0 -57
- package/dist/ts/common/incremental-search.ts +0 -172
- package/dist/ts/common/interface.ts +0 -74
- package/dist/ts/common/virtual-scroll.ts +0 -388
- package/dist/ts/drop-down-base/drop-down-base.ts +0 -1986
- package/dist/ts/drop-down-list/drop-down-list.ts +0 -4261
- package/dist/ts/drop-down-tree/drop-down-tree.ts +0 -3747
- package/dist/ts/list-box/list-box.ts +0 -2772
- package/dist/ts/mention/mention.ts +0 -1875
- package/dist/ts/multi-select/checkbox-selection.ts +0 -550
- package/dist/ts/multi-select/float-label.ts +0 -176
- package/dist/ts/multi-select/interface.ts +0 -70
- package/dist/ts/multi-select/multi-select.ts +0 -4882
- package/styles/auto-complete/_bds-definition.scss +0 -2
- package/styles/combo-box/_bds-definition.scss +0 -2
- package/styles/drop-down-base/_bds-definition.scss +0 -129
- package/styles/drop-down-list/_bds-definition.scss +0 -134
- package/styles/drop-down-tree/_bds-definition.scss +0 -61
- package/styles/list-box/_bds-definition.scss +0 -119
- package/styles/mention/_bds-definition.scss +0 -1
- package/styles/multi-select/_bds-definition.scss +0 -235
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FloatLable Moduel
|
|
3
|
-
* Specifies whether to display the floating label above the input element.
|
|
4
|
-
*/
|
|
5
|
-
import { removeClass, addClass, detach } from '@syncfusion/ej2-base';
|
|
6
|
-
import { attributes, isNullOrUndefined, createElement, getUniqueID } from '@syncfusion/ej2-base';
|
|
7
|
-
import { FloatLabelType } from '@syncfusion/ej2-inputs';
|
|
8
|
-
|
|
9
|
-
const FLOATLINE: string = 'e-float-line';
|
|
10
|
-
const FLOATTEXT: string = 'e-float-text';
|
|
11
|
-
const LABELTOP: string = 'e-label-top';
|
|
12
|
-
const LABELBOTTOM: string = 'e-label-bottom';
|
|
13
|
-
|
|
14
|
-
/* eslint-disable valid-jsdoc */
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Function to create Float Label element.
|
|
18
|
-
*
|
|
19
|
-
* @param {HTMLDivElement} overAllWrapper - Overall wrapper of multiselect.
|
|
20
|
-
* @param {HTMLElement} searchWrapper - Search wrapper of multiselect.
|
|
21
|
-
* @param {HTMLElement} element - The given html element.
|
|
22
|
-
* @param {HTMLInputElement} inputElement - Specify the input wrapper.
|
|
23
|
-
* @param {number[] | string[] | boolean[]} value - Value of the MultiSelect.
|
|
24
|
-
* @param {FloatLabelType} floatLabelType - Specify the FloatLabel Type.
|
|
25
|
-
* @param {string} placeholder - Specify the PlaceHolder text.
|
|
26
|
-
*/
|
|
27
|
-
export function createFloatLabel(
|
|
28
|
-
overAllWrapper: HTMLDivElement,
|
|
29
|
-
searchWrapper: HTMLElement, element: HTMLElement,
|
|
30
|
-
inputElement: HTMLInputElement, value: number[] | string[] | boolean[], floatLabelType: FloatLabelType,
|
|
31
|
-
placeholder: string): void {
|
|
32
|
-
const floatLinelement: HTMLElement = createElement('span', { className: FLOATLINE });
|
|
33
|
-
const floatLabelElement: HTMLElement = createElement('label', { className: FLOATTEXT });
|
|
34
|
-
const id: string = element.getAttribute('id') ? element.getAttribute('id') : getUniqueID('ej2_multiselect');
|
|
35
|
-
element.id = id;
|
|
36
|
-
if (!isNullOrUndefined(element.id) && element.id !== '') {
|
|
37
|
-
floatLabelElement.id = 'label_' + element.id.replace(/ /g, '_');
|
|
38
|
-
attributes(inputElement, { 'aria-labelledby': floatLabelElement.id });
|
|
39
|
-
}
|
|
40
|
-
if (!isNullOrUndefined(inputElement.placeholder) && inputElement.placeholder !== '') {
|
|
41
|
-
floatLabelElement.innerText = encodePlaceholder(inputElement.placeholder);
|
|
42
|
-
inputElement.removeAttribute('placeholder');
|
|
43
|
-
}
|
|
44
|
-
floatLabelElement.innerText = encodePlaceholder(placeholder);
|
|
45
|
-
searchWrapper.appendChild(floatLinelement);
|
|
46
|
-
searchWrapper.appendChild(floatLabelElement);
|
|
47
|
-
overAllWrapper.classList.add('e-float-input');
|
|
48
|
-
updateFloatLabelState(value, floatLabelElement);
|
|
49
|
-
if (floatLabelType === 'Always') {
|
|
50
|
-
if (floatLabelElement.classList.contains(LABELBOTTOM)) {
|
|
51
|
-
removeClass([floatLabelElement], LABELBOTTOM);
|
|
52
|
-
}
|
|
53
|
-
addClass([floatLabelElement], LABELTOP);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Function to update status of the Float Label element.
|
|
59
|
-
*
|
|
60
|
-
* @param {string[] | number[] | boolean[]} value - Value of the MultiSelect.
|
|
61
|
-
* @param {HTMLElement} label - Float label element.
|
|
62
|
-
*/
|
|
63
|
-
export function updateFloatLabelState(value: string[] | number[] | boolean[], label: HTMLElement): void {
|
|
64
|
-
if (value && value.length > 0) {
|
|
65
|
-
addClass([label], LABELTOP);
|
|
66
|
-
removeClass([label], LABELBOTTOM);
|
|
67
|
-
} else {
|
|
68
|
-
removeClass([label], LABELTOP);
|
|
69
|
-
addClass([label], LABELBOTTOM);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Function to remove Float Label element.
|
|
75
|
-
*
|
|
76
|
-
* @param {HTMLDivElement} overAllWrapper - Overall wrapper of multiselect.
|
|
77
|
-
* @param {HTMLDivElement} componentWrapper - Wrapper element of multiselect.
|
|
78
|
-
* @param {HTMLElement} searchWrapper - Search wrapper of multiselect.
|
|
79
|
-
* @param {HTMLInputElement} inputElement - Specify the input wrapper.
|
|
80
|
-
* @param {number[] | string[] | boolean[]} value - Value of the MultiSelect.
|
|
81
|
-
* @param {FloatLabelType} floatLabelType - Specify the FloatLabel Type.
|
|
82
|
-
* @param {string} placeholder - Specify the PlaceHolder text.
|
|
83
|
-
*/
|
|
84
|
-
export function removeFloating(
|
|
85
|
-
overAllWrapper: HTMLDivElement,
|
|
86
|
-
componentWrapper: HTMLDivElement,
|
|
87
|
-
searchWrapper: HTMLElement,
|
|
88
|
-
inputElement: HTMLInputElement,
|
|
89
|
-
value: number[] | string[] | boolean[],
|
|
90
|
-
floatLabelType: FloatLabelType,
|
|
91
|
-
placeholder: string): void {
|
|
92
|
-
const placeholderElement: HTMLElement = componentWrapper.querySelector('.' + FLOATTEXT) as HTMLElement;
|
|
93
|
-
const floatLine: HTMLElement = componentWrapper.querySelector('.' + FLOATLINE) as HTMLElement;
|
|
94
|
-
let placeholderText: string;
|
|
95
|
-
if (!isNullOrUndefined(placeholderElement)) {
|
|
96
|
-
placeholderText = placeholderElement.innerText;
|
|
97
|
-
detach(searchWrapper.querySelector('.' + FLOATTEXT));
|
|
98
|
-
setPlaceHolder(value, inputElement, placeholderText);
|
|
99
|
-
if (!isNullOrUndefined(floatLine)) {
|
|
100
|
-
detach(searchWrapper.querySelector('.' + FLOATLINE));
|
|
101
|
-
}
|
|
102
|
-
} else {
|
|
103
|
-
placeholderText = (placeholder !== null) ? placeholder : '';
|
|
104
|
-
setPlaceHolder(value, inputElement, placeholderText);
|
|
105
|
-
}
|
|
106
|
-
overAllWrapper.classList.remove('e-float-input');
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Function to set the placeholder to the element.
|
|
111
|
-
*
|
|
112
|
-
* @param {number[] | string[] | boolean[]} value - Value of the MultiSelect.
|
|
113
|
-
* @param {HTMLInputElement} inputElement - Specify the input wrapper.
|
|
114
|
-
* @param {string} placeholder - Specify the PlaceHolder text.
|
|
115
|
-
*/
|
|
116
|
-
export function setPlaceHolder(value: number[] | string[] | boolean[], inputElement: HTMLInputElement, placeholder: string): void {
|
|
117
|
-
if (value && value.length) {
|
|
118
|
-
inputElement.placeholder = '';
|
|
119
|
-
} else {
|
|
120
|
-
inputElement.placeholder = placeholder;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Function for focusing the Float Element.
|
|
126
|
-
*
|
|
127
|
-
* @param {HTMLDivElement} overAllWrapper - Overall wrapper of multiselect.
|
|
128
|
-
* @param {HTMLDivElement} componentWrapper - Wrapper element of multiselect.
|
|
129
|
-
*/
|
|
130
|
-
export function floatLabelFocus(overAllWrapper: HTMLDivElement, componentWrapper: HTMLDivElement): void {
|
|
131
|
-
overAllWrapper.classList.add('e-input-focus');
|
|
132
|
-
const label: Element = componentWrapper.querySelector('.' + FLOATTEXT);
|
|
133
|
-
if (!isNullOrUndefined(label)) {
|
|
134
|
-
addClass([label], LABELTOP);
|
|
135
|
-
if (label.classList.contains(LABELBOTTOM)) {
|
|
136
|
-
removeClass([label], LABELBOTTOM);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
141
|
-
/**
|
|
142
|
-
* Function to focus the Float Label element.
|
|
143
|
-
*
|
|
144
|
-
* @param {HTMLDivElement} overAllWrapper - Overall wrapper of multiselect.
|
|
145
|
-
* @param {HTMLDivElement} componentWrapper - Wrapper element of multiselect.
|
|
146
|
-
* @param {number[] | string[] | boolean[]} value - Value of the MultiSelect.
|
|
147
|
-
* @param {FloatLabelType} floatLabelType - Specify the FloatLabel Type.
|
|
148
|
-
* @param {string} placeholder - Specify the PlaceHolder text.
|
|
149
|
-
*/
|
|
150
|
-
export function floatLabelBlur(
|
|
151
|
-
overAllWrapper: HTMLDivElement,
|
|
152
|
-
componentWrapper: HTMLDivElement,
|
|
153
|
-
value: number[] | string[] | boolean[],
|
|
154
|
-
floatLabelType: FloatLabelType,
|
|
155
|
-
placeholder: string): void {
|
|
156
|
-
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
157
|
-
overAllWrapper.classList.remove('e-input-focus');
|
|
158
|
-
const label: Element = componentWrapper.querySelector('.' + FLOATTEXT);
|
|
159
|
-
if (value && value.length <= 0 && floatLabelType === 'Auto' && !isNullOrUndefined(label)) {
|
|
160
|
-
if (label.classList.contains(LABELTOP)) {
|
|
161
|
-
removeClass([label], LABELTOP);
|
|
162
|
-
}
|
|
163
|
-
addClass([label], LABELBOTTOM);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
export function encodePlaceholder(placeholder: string): string {
|
|
167
|
-
let result: string = '';
|
|
168
|
-
if (!isNullOrUndefined(placeholder) && placeholder !== '') {
|
|
169
|
-
const spanElement: HTMLElement = document.createElement('span');
|
|
170
|
-
spanElement.innerHTML = '<input placeholder="' + placeholder + '"/>';
|
|
171
|
-
const hiddenInput: HTMLInputElement = (spanElement.children[0]) as HTMLInputElement;
|
|
172
|
-
result = hiddenInput.placeholder;
|
|
173
|
-
}
|
|
174
|
-
return result;
|
|
175
|
-
}
|
|
176
|
-
/* eslint-enable valid-jsdoc */
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Component, KeyboardEventArgs } from '@syncfusion/ej2-base';
|
|
2
|
-
import { Popup } from '@syncfusion/ej2-popups';
|
|
3
|
-
/**
|
|
4
|
-
* Specifies mulitselct interfaces.
|
|
5
|
-
*
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export interface IMulitSelect extends Component<HTMLElement> {
|
|
11
|
-
listCurrentOptions?: { [key: string]: Object }
|
|
12
|
-
inputElement?: HTMLInputElement
|
|
13
|
-
popupWrapper?: HTMLDivElement
|
|
14
|
-
selectAll?(state?: boolean): void
|
|
15
|
-
selectAllHeight?: number
|
|
16
|
-
searchBoxHeight?: number
|
|
17
|
-
onInput?(): void
|
|
18
|
-
filterInput?: HTMLInputElement
|
|
19
|
-
keyUp?(e?: KeyboardEventArgs): void
|
|
20
|
-
onKeyDown?(e?: KeyboardEventArgs): void
|
|
21
|
-
mainList?: HTMLElement
|
|
22
|
-
list?: HTMLElement
|
|
23
|
-
listData?: { [key: string]: Object }[]
|
|
24
|
-
targetElement?(): string
|
|
25
|
-
targetInputElement?: HTMLInputElement | string
|
|
26
|
-
selectAllText?: string
|
|
27
|
-
unSelectAllText?: string
|
|
28
|
-
popupObj?: Popup
|
|
29
|
-
onDocumentFocus?: boolean
|
|
30
|
-
selectAllItems?(status: boolean, event?: MouseEvent): void
|
|
31
|
-
hidePopup?(): void
|
|
32
|
-
refreshPopup?(): void
|
|
33
|
-
refreshListItems?(data?: string): void
|
|
34
|
-
filterBarPlaceholder?: string
|
|
35
|
-
overAllWrapper?: HTMLDivElement
|
|
36
|
-
searchWrapper?: HTMLElement
|
|
37
|
-
componentWrapper?: HTMLDivElement
|
|
38
|
-
templateList?: { [key: string]: Object }
|
|
39
|
-
itemTemplate?: string
|
|
40
|
-
headerTemplate?: string
|
|
41
|
-
mobFilter?: boolean
|
|
42
|
-
header?: HTMLElement
|
|
43
|
-
updateDelimView?(): void
|
|
44
|
-
updateValueState?(event?: KeyboardEventArgs | MouseEvent, newVal?: [string | number], oldVal?: [string | number]): void
|
|
45
|
-
tempValues?: [number | string]
|
|
46
|
-
value?: [number | string]
|
|
47
|
-
refreshInputHight?(): void
|
|
48
|
-
refreshPlaceHolder?(): void
|
|
49
|
-
ulElement?: HTMLElement
|
|
50
|
-
hiddenElement?: HTMLSelectElement
|
|
51
|
-
dispatchEvent?(element?: HTMLElement, type?: string): void
|
|
52
|
-
inputFocus?: boolean
|
|
53
|
-
enableSelectionOrder?: boolean
|
|
54
|
-
focusAtFirstListItem(): void
|
|
55
|
-
isPopupOpen(): boolean
|
|
56
|
-
showSelectAll: boolean
|
|
57
|
-
scrollFocusStatus: boolean
|
|
58
|
-
focused: boolean
|
|
59
|
-
onBlurHandler(eve?: MouseEvent, isDocClickFromCheck?: boolean): void
|
|
60
|
-
keyAction?: boolean
|
|
61
|
-
removeFocus?(): void
|
|
62
|
-
getLocaleName?(): string
|
|
63
|
-
filterParent: HTMLElement
|
|
64
|
-
enableGroupCheckBox : boolean
|
|
65
|
-
pasteHandler?(e?: KeyboardEventArgs): void
|
|
66
|
-
cssClass: string
|
|
67
|
-
isDynamicDataChange?: boolean
|
|
68
|
-
search?(e: KeyboardEventArgs): void
|
|
69
|
-
allowFiltering?: boolean
|
|
70
|
-
}
|