@syncfusion/ej2-dropdowns 18.1.57 → 18.2.44-4569

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/.eslintrc.json +244 -0
  2. package/CHANGELOG.md +1524 -1514
  3. package/README.md +118 -118
  4. package/dist/ej2-dropdowns.umd.min.js +1 -10
  5. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-dropdowns.es2015.js +198 -126
  7. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  8. package/dist/es6/ej2-dropdowns.es5.js +290 -217
  9. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  10. package/dist/global/ej2-dropdowns.min.js +1 -10
  11. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  12. package/dist/global/index.d.ts +0 -9
  13. package/dist/ts/auto-complete/auto-complete.ts +527 -0
  14. package/dist/ts/combo-box/combo-box.ts +957 -0
  15. package/dist/ts/common/highlight-search.ts +47 -0
  16. package/dist/ts/common/incremental-search.ts +81 -0
  17. package/dist/ts/drop-down-base/drop-down-base.ts +1572 -0
  18. package/dist/ts/drop-down-list/drop-down-list.ts +2993 -0
  19. package/dist/ts/drop-down-tree/drop-down-tree.ts +3066 -0
  20. package/dist/ts/list-box/list-box.ts +2317 -0
  21. package/dist/ts/multi-select/checkbox-selection.ts +528 -0
  22. package/dist/ts/multi-select/float-label.ts +155 -0
  23. package/dist/ts/multi-select/interface.ts +66 -0
  24. package/dist/ts/multi-select/multi-select.ts +4216 -0
  25. package/helpers/e2e/index.js +3 -3
  26. package/license +2 -2
  27. package/package.json +77 -77
  28. package/src/auto-complete/auto-complete-model.d.ts +179 -179
  29. package/src/auto-complete/auto-complete.d.ts +12 -12
  30. package/src/auto-complete/auto-complete.js +21 -21
  31. package/src/combo-box/combo-box-model.d.ts +212 -212
  32. package/src/combo-box/combo-box.d.ts +27 -27
  33. package/src/combo-box/combo-box.js +29 -29
  34. package/src/common/incremental-search.d.ts +1 -1
  35. package/src/common/incremental-search.js +4 -2
  36. package/src/drop-down-base/drop-down-base-model.d.ts +191 -191
  37. package/src/drop-down-base/drop-down-base.d.ts +17 -17
  38. package/src/drop-down-base/drop-down-base.js +20 -20
  39. package/src/drop-down-list/drop-down-list-model.d.ts +222 -222
  40. package/src/drop-down-list/drop-down-list.d.ts +3 -2
  41. package/src/drop-down-list/drop-down-list.js +43 -30
  42. package/src/drop-down-tree/drop-down-tree-model.d.ts +344 -344
  43. package/src/drop-down-tree/drop-down-tree.js +32 -26
  44. package/src/list-box/index.d.ts +1 -0
  45. package/src/list-box/index.js +1 -0
  46. package/src/list-box/list-box-model.d.ts +156 -156
  47. package/src/list-box/list-box.d.ts +2 -2
  48. package/src/list-box/list-box.js +57 -59
  49. package/src/multi-select/index.d.ts +1 -0
  50. package/src/multi-select/index.js +1 -0
  51. package/src/multi-select/multi-select-model.d.ts +452 -452
  52. package/src/multi-select/multi-select.d.ts +2 -0
  53. package/src/multi-select/multi-select.js +98 -43
  54. package/styles/_all.scss +3 -3
  55. package/styles/auto-complete/_bootstrap-dark-definition.scss +3 -3
  56. package/styles/auto-complete/_bootstrap4-definition.scss +11 -11
  57. package/styles/auto-complete/_fabric-dark-definition.scss +2 -2
  58. package/styles/auto-complete/_highcontrast-light-definition.scss +2 -2
  59. package/styles/auto-complete/_material-dark-definition.scss +2 -2
  60. package/styles/bootstrap-dark.css +67 -61
  61. package/styles/bootstrap.css +69 -63
  62. package/styles/bootstrap4.css +81 -61
  63. package/styles/combo-box/_bootstrap-dark-definition.scss +2 -2
  64. package/styles/combo-box/_bootstrap4-definition.scss +11 -11
  65. package/styles/combo-box/_fabric-dark-definition.scss +2 -2
  66. package/styles/combo-box/_highcontrast-light-definition.scss +3 -3
  67. package/styles/combo-box/_material-dark-definition.scss +2 -2
  68. package/styles/drop-down-base/_all.scss +2 -2
  69. package/styles/drop-down-base/_bootstrap-dark-definition.scss +64 -64
  70. package/styles/drop-down-base/_bootstrap-definition.scss +64 -64
  71. package/styles/drop-down-base/_bootstrap4-definition.scss +78 -78
  72. package/styles/drop-down-base/_definition.scss +23 -23
  73. package/styles/drop-down-base/_fabric-dark-definition.scss +68 -68
  74. package/styles/drop-down-base/_fabric-definition.scss +66 -66
  75. package/styles/drop-down-base/_highcontrast-definition.scss +82 -82
  76. package/styles/drop-down-base/_highcontrast-light-definition.scss +81 -81
  77. package/styles/drop-down-base/_layout.scss +108 -108
  78. package/styles/drop-down-base/_material-dark-definition.scss +67 -67
  79. package/styles/drop-down-base/_material-definition.scss +65 -65
  80. package/styles/drop-down-base/_theme.scss +242 -242
  81. package/styles/drop-down-list/_all.scss +2 -2
  82. package/styles/drop-down-list/_bootstrap-dark-definition.scss +157 -157
  83. package/styles/drop-down-list/_bootstrap-definition.scss +156 -156
  84. package/styles/drop-down-list/_bootstrap4-definition.scss +184 -184
  85. package/styles/drop-down-list/_fabric-dark-definition.scss +127 -127
  86. package/styles/drop-down-list/_fabric-definition.scss +122 -122
  87. package/styles/drop-down-list/_highcontrast-definition.scss +131 -131
  88. package/styles/drop-down-list/_highcontrast-light-definition.scss +133 -133
  89. package/styles/drop-down-list/_layout.scss +218 -218
  90. package/styles/drop-down-list/_material-dark-definition.scss +143 -143
  91. package/styles/drop-down-list/_material-definition.scss +166 -166
  92. package/styles/drop-down-list/_theme.scss +10 -10
  93. package/styles/drop-down-list/icons/_bootstrap-dark.scss +14 -14
  94. package/styles/drop-down-list/icons/_bootstrap.scss +14 -14
  95. package/styles/drop-down-list/icons/_bootstrap4.scss +14 -14
  96. package/styles/drop-down-list/icons/_fabric-dark.scss +14 -14
  97. package/styles/drop-down-list/icons/_fabric.scss +14 -14
  98. package/styles/drop-down-list/icons/_highcontrast-light.scss +14 -14
  99. package/styles/drop-down-list/icons/_highcontrast.scss +14 -14
  100. package/styles/drop-down-list/icons/_material-dark.scss +14 -14
  101. package/styles/drop-down-list/icons/_material.scss +14 -14
  102. package/styles/drop-down-list/material.css +9 -0
  103. package/styles/drop-down-tree/_all.scss +2 -2
  104. package/styles/drop-down-tree/_bootstrap-dark-definition.scss +62 -49
  105. package/styles/drop-down-tree/_bootstrap-definition.scss +62 -49
  106. package/styles/drop-down-tree/_bootstrap4-definition.scss +63 -50
  107. package/styles/drop-down-tree/_fabric-dark-definition.scss +63 -49
  108. package/styles/drop-down-tree/_fabric-definition.scss +63 -49
  109. package/styles/drop-down-tree/_highcontrast-definition.scss +63 -49
  110. package/styles/drop-down-tree/_highcontrast-light-definition.scss +63 -49
  111. package/styles/drop-down-tree/_layout.scss +437 -398
  112. package/styles/drop-down-tree/_material-dark-definition.scss +61 -54
  113. package/styles/drop-down-tree/_material-definition.scss +61 -54
  114. package/styles/drop-down-tree/_theme.scss +68 -63
  115. package/styles/drop-down-tree/bootstrap-dark.css +67 -61
  116. package/styles/drop-down-tree/bootstrap.css +69 -63
  117. package/styles/drop-down-tree/bootstrap4.css +81 -61
  118. package/styles/drop-down-tree/fabric-dark.css +71 -63
  119. package/styles/drop-down-tree/fabric.css +71 -63
  120. package/styles/drop-down-tree/highcontrast-light.css +71 -63
  121. package/styles/drop-down-tree/highcontrast.css +75 -63
  122. package/styles/drop-down-tree/icons/_bootstrap-dark.scss +11 -11
  123. package/styles/drop-down-tree/icons/_bootstrap.scss +11 -11
  124. package/styles/drop-down-tree/icons/_bootstrap4.scss +11 -11
  125. package/styles/drop-down-tree/icons/_fabric-dark.scss +11 -11
  126. package/styles/drop-down-tree/icons/_fabric.scss +11 -11
  127. package/styles/drop-down-tree/icons/_highcontrast-light.scss +11 -11
  128. package/styles/drop-down-tree/icons/_highcontrast.scss +11 -11
  129. package/styles/drop-down-tree/icons/_material-dark.scss +11 -11
  130. package/styles/drop-down-tree/icons/_material.scss +11 -11
  131. package/styles/drop-down-tree/material-dark.css +76 -85
  132. package/styles/drop-down-tree/material.css +93 -85
  133. package/styles/fabric-dark.css +71 -63
  134. package/styles/fabric.css +71 -63
  135. package/styles/highcontrast-light.css +71 -63
  136. package/styles/highcontrast.css +75 -63
  137. package/styles/list-box/_all.scss +2 -2
  138. package/styles/list-box/_bootstrap-dark-definition.scss +118 -118
  139. package/styles/list-box/_bootstrap-definition.scss +112 -112
  140. package/styles/list-box/_bootstrap4-definition.scss +118 -118
  141. package/styles/list-box/_fabric-dark-definition.scss +118 -118
  142. package/styles/list-box/_fabric-definition.scss +112 -112
  143. package/styles/list-box/_highcontrast-definition.scss +112 -112
  144. package/styles/list-box/_highcontrast-light-definition.scss +118 -118
  145. package/styles/list-box/_layout.scss +458 -458
  146. package/styles/list-box/_material-dark-definition.scss +118 -118
  147. package/styles/list-box/_material-definition.scss +112 -112
  148. package/styles/list-box/_theme.scss +273 -273
  149. package/styles/list-box/icons/_bootstrap-dark.scss +25 -25
  150. package/styles/list-box/icons/_bootstrap.scss +25 -25
  151. package/styles/list-box/icons/_bootstrap4.scss +25 -25
  152. package/styles/list-box/icons/_fabric-dark.scss +25 -25
  153. package/styles/list-box/icons/_fabric.scss +25 -25
  154. package/styles/list-box/icons/_highcontrast-light.scss +25 -25
  155. package/styles/list-box/icons/_highcontrast.scss +25 -25
  156. package/styles/list-box/icons/_material-dark.scss +25 -25
  157. package/styles/list-box/icons/_material.scss +25 -25
  158. package/styles/list-box/material-dark.css +4 -4
  159. package/styles/list-box/material.css +4 -4
  160. package/styles/material-dark.css +80 -89
  161. package/styles/material.css +115 -89
  162. package/styles/multi-select/_all.scss +2 -2
  163. package/styles/multi-select/_bootstrap-dark-definition.scss +171 -171
  164. package/styles/multi-select/_bootstrap-definition.scss +166 -166
  165. package/styles/multi-select/_bootstrap4-definition.scss +233 -233
  166. package/styles/multi-select/_fabric-dark-definition.scss +170 -170
  167. package/styles/multi-select/_fabric-definition.scss +167 -167
  168. package/styles/multi-select/_highcontrast-definition.scss +257 -257
  169. package/styles/multi-select/_highcontrast-light-definition.scss +258 -258
  170. package/styles/multi-select/_layout.scss +1153 -1153
  171. package/styles/multi-select/_material-dark-definition.scss +186 -186
  172. package/styles/multi-select/_material-definition.scss +191 -191
  173. package/styles/multi-select/_theme.scss +384 -384
  174. package/styles/multi-select/icons/_bootstrap-dark.scss +26 -26
  175. package/styles/multi-select/icons/_bootstrap.scss +26 -26
  176. package/styles/multi-select/icons/_bootstrap4.scss +37 -37
  177. package/styles/multi-select/icons/_fabric-dark.scss +26 -26
  178. package/styles/multi-select/icons/_fabric.scss +26 -26
  179. package/styles/multi-select/icons/_highcontrast-light.scss +26 -26
  180. package/styles/multi-select/icons/_highcontrast.scss +26 -26
  181. package/styles/multi-select/icons/_material-dark.scss +26 -26
  182. package/styles/multi-select/icons/_material.scss +324 -324
  183. package/styles/multi-select/material.css +9 -0
@@ -1,4 +1,4 @@
1
- import { EventHandler, Property, Event, compile, EmitType, KeyboardEvents, append } from '@syncfusion/ej2-base';import { attributes, isNullOrUndefined, getUniqueID, formatUnit, isUndefined, getValue } from '@syncfusion/ej2-base';import { Animation, AnimationModel, Browser, KeyboardEventArgs, NotifyPropertyChanges } from '@syncfusion/ej2-base';import { addClass, removeClass, closest, prepend, detach, classList, isBlazor } from '@syncfusion/ej2-base';import { Popup, isCollide, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { IInput, Input, InputObject, FloatLabelType } from '@syncfusion/ej2-inputs';import { incrementalSearch } from '../common/incremental-search';import { DropDownBase, dropDownBaseClasses, SelectEventArgs, FilteringEventArgs, PopupEventArgs } from '../drop-down-base/drop-down-base';import { FocusEventArgs, ResultData, BeforeOpenEventArgs } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { DataManager, Query, Predicate } from '@syncfusion/ej2-data';import { SortOrder } from '@syncfusion/ej2-lists';
1
+ import { EventHandler, Property, Event, compile, EmitType, KeyboardEvents, append } from '@syncfusion/ej2-base';
2
2
  import {ChangeEventArgs} from "./drop-down-list";
3
3
  import {DropDownBaseModel} from "../drop-down-base/drop-down-base-model";
4
4
 
@@ -8,226 +8,226 @@ import {DropDownBaseModel} from "../drop-down-base/drop-down-base-model";
8
8
  export interface DropDownListModel extends DropDownBaseModel{
9
9
 
10
10
  /**
11
- * Sets CSS classes to the root element of the component that allows customization of appearance.
12
- * @default null
13
- */
14
- cssClass?: string;
15
-
16
- /**
17
- * Specifies the width of the component. By default, the component width sets based on the width of
18
- * its parent container. You can also set the width in pixel values.
19
- * @default '100%'
20
- * @aspType string
21
- * @blazorType string
22
- */
23
- width?: string | number;
24
-
25
- /**
26
- * Specifies the height of the popup list.
27
- * > For more details about the popup configuration refer to
28
- * [`Popup Configuration`](../../drop-down-list/getting-started#configure-the-popup-list) documentation.
29
- * @default '300px'
30
- * @aspType string
31
- * @blazorType string
32
- */
33
- popupHeight?: string | number;
34
-
35
- /**
36
- * Specifies the width of the popup list. By default, the popup width sets based on the width of
37
- * the component.
38
- * > For more details about the popup configuration refer to
39
- * [`Popup Configuration`](../../drop-down-list/getting-started#configure-the-popup-list) documentation.
40
- * @default '100%'
41
- * @aspType string
42
- * @blazorType string
43
- */
44
- popupWidth?: string | number;
45
-
46
- /**
47
- * Specifies a short hint that describes the expected value of the DropDownList component.
48
- * @default null
49
- */
50
- placeholder?: string;
51
-
52
- /**
53
- * Accepts the value to be displayed as a watermark text on the filter bar.
54
- * @default null
55
- */
56
- filterBarPlaceholder?: string;
57
-
58
- /**
59
- * Allows additional HTML attributes such as title, name, etc., and
60
- * accepts n number of attributes in a key-value pair format.
61
- *
62
- * {% codeBlock src='dropdownlist/htmlAttributes/index.md' %}{% endcodeBlock %}
63
- *
64
- * @default {}
65
- */
66
- htmlAttributes?: { [key: string]: string; };
67
-
68
- /**
69
- * Accepts the external `Query`
70
- * that execute along with data processing.
71
- *
72
- * {% codeBlock src='dropdownlist/query/index.md' %}{% endcodeBlock %}
73
- *
74
- * @default null
75
-
76
- */
77
- query?: Query;
78
-
79
- /**
80
- * Accepts the template design and assigns it to the selected list item in the input element of the component.
81
- * For more details about the available template options refer to
82
- * [`Template`](../../drop-down-list/templates) documentation.
83
- *
84
- * We have built-in `template engine`
85
- * which provides options to compile template string into a executable function.
86
- * For EX: We have expression evolution as like ES6 expression string literals.
87
- * @default null
88
- */
89
- valueTemplate?: string;
90
-
91
- /**
92
- * Accepts the template design and assigns it to the header container of the popup list.
93
- * > For more details about the available template options refer to [`Template`](../../drop-down-list/templates) documentation.
94
- * @default null
95
- */
96
- headerTemplate?: string;
97
-
98
- /**
99
- * Accepts the template design and assigns it to the footer container of the popup list.
100
- * > For more details about the available template options refer to [`Template`](../../drop-down-list/templates) documentation.
101
- * @default null
102
- */
103
- footerTemplate?: string;
104
-
105
- /**
106
- * When allowFiltering is set to true, show the filter bar (search box) of the component.
107
- * The filter action retrieves matched items through the `filtering` event based on
108
- * the characters typed in the search TextBox.
109
- *
110
- * If no match is found, the value of the `noRecordsTemplate` property will be displayed.
111
- * > For more details about the filtering refer to [`Filtering`](../../drop-down-list/filtering) documentation.
112
- *
113
- * {% codeBlock src="dropdownlist/allow-filtering-api/index.ts" %}{% endcodeBlock %}
114
- *
115
- * {% codeBlock src="dropdownlist/allow-filtering-api/index.html" %}{% endcodeBlock %}
116
- * @default false
117
- */
118
- allowFiltering?: boolean;
119
-
120
- /**
121
- * When set to true, the user interactions on the component are disabled.
122
- * @default false
123
- */
124
- readonly?: boolean;
125
-
126
- /**
127
- * Gets or sets the display text of the selected item in the component.
128
- * @default null
129
- */
130
- text?: string;
131
-
132
- /**
133
- * Gets or sets the value of the selected item in the component.
134
- * @default null
135
- * @isGenericType true
136
- */
137
- value?: number | string | boolean;
138
-
139
- /**
140
- * Gets or sets the index of the selected item in the component.
141
- *
142
- * {% codeBlock src="dropdownlist/index-api/index.ts" %}{% endcodeBlock %}
143
- *
144
- * {% codeBlock src="dropdownlist/index-api/index.html" %}{% endcodeBlock %}
145
- *
146
- * @default null
147
- * @blazorType int
148
- * @isBlazorNullableType true
149
- * @blazorDefaultValue
150
- */
151
- index?: number;
152
-
153
- /**
154
- * Specifies whether to display the floating label above the input element.
155
- * Possible values are:
156
- * * Never: The label will never float in the input when the placeholder is available.
157
- * * Always: The floating label will always float above the input.
158
- * * Auto: The floating label will float above the input after focusing or entering a value in the input.
159
- *
160
- * {% codeBlock src="dropdownlist/float-label-type-api/index.ts" %}{% endcodeBlock %}
161
- *
162
- * {% codeBlock src="dropdownlist/float-label-type-api/index.html" %}{% endcodeBlock %}
163
- *
164
- * @default Syncfusion.EJ2.Inputs.FloatLabelType.Never
165
- * @aspType Syncfusion.EJ2.Inputs.FloatLabelType
166
- * @isEnumeration true
167
- * @blazorType Syncfusion.Blazor.Inputs.FloatLabelType
168
- */
169
- floatLabelType?: FloatLabelType;
170
-
171
- /**
172
- * Specifies whether to show or hide the clear button.
173
- * When the clear button is clicked, `value`, `text`, and `index` properties are reset to null.
174
- * @default false
175
- * @blazorOverrideType virtual
176
- */
177
- showClearButton?: boolean;
178
-
179
- /**
180
- * Triggers on typing a character in the filter bar when the
181
- * [`allowFiltering`](./#allowfiltering)
182
- * is enabled.
183
- * > For more details about the filtering refer to [`Filtering`](../../drop-down-list/filtering) documentation.
184
- *
185
- * @event
186
- * @blazorProperty 'Filtering'
187
- */
188
- filtering?: EmitType<FilteringEventArgs>;
189
-
190
- /**
191
- * Triggers when an item in a popup is selected or when the model value is changed by user.
192
- * Use change event to
193
- * [`Configure the Cascading DropDownList`](../../drop-down-list/how-to/cascading)
194
- * @event
195
- * @blazorProperty 'ValueChange'
196
- */
197
- change?: EmitType<ChangeEventArgs>;
198
-
199
- /**
200
- * Triggers when the popup before opens.
201
- * @event
202
- * @blazorProperty 'OnOpen'
203
- * @blazorType BeforeOpenEventArgs
204
- */
205
- beforeOpen?: EmitType<Object>;
206
-
207
- /**
208
- * Triggers when the popup opens.
209
- * @event
210
- * @blazorProperty 'Opened'
211
- */
212
- open?: EmitType<PopupEventArgs>;
213
-
214
- /**
215
- * Triggers when the popup is closed.
216
- * @event
217
- * @blazorProperty 'OnClose'
218
- */
219
- close?: EmitType<PopupEventArgs>;
220
-
221
- /**
222
- * Triggers when focus moves out from the component.
223
- * @event
224
- */
225
- blur?: EmitType<Object>;
226
-
227
- /**
228
- * Triggers when the component is focused.
229
- * @event
230
- */
231
- focus?: EmitType<Object>;
11
+ * Sets CSS classes to the root element of the component that allows customization of appearance.
12
+ * @default null
13
+ */
14
+ cssClass?: string;
15
+
16
+ /**
17
+ * Specifies the width of the component. By default, the component width sets based on the width of
18
+ * its parent container. You can also set the width in pixel values.
19
+ * @default '100%'
20
+ * @aspType string
21
+ * @blazorType string
22
+ */
23
+ width?: string | number;
24
+
25
+ /**
26
+ * Specifies the height of the popup list.
27
+ * > For more details about the popup configuration refer to
28
+ * [`Popup Configuration`](../../drop-down-list/getting-started#configure-the-popup-list) documentation.
29
+ * @default '300px'
30
+ * @aspType string
31
+ * @blazorType string
32
+ */
33
+ popupHeight?: string | number;
34
+
35
+ /**
36
+ * Specifies the width of the popup list. By default, the popup width sets based on the width of
37
+ * the component.
38
+ * > For more details about the popup configuration refer to
39
+ * [`Popup Configuration`](../../drop-down-list/getting-started#configure-the-popup-list) documentation.
40
+ * @default '100%'
41
+ * @aspType string
42
+ * @blazorType string
43
+ */
44
+ popupWidth?: string | number;
45
+
46
+ /**
47
+ * Specifies a short hint that describes the expected value of the DropDownList component.
48
+ * @default null
49
+ */
50
+ placeholder?: string;
51
+
52
+ /**
53
+ * Accepts the value to be displayed as a watermark text on the filter bar.
54
+ * @default null
55
+ */
56
+ filterBarPlaceholder?: string;
57
+
58
+ /**
59
+ * Allows additional HTML attributes such as title, name, etc., and
60
+ * accepts n number of attributes in a key-value pair format.
61
+ *
62
+ * {% codeBlock src='dropdownlist/htmlAttributes/index.md' %}{% endcodeBlock %}
63
+ *
64
+ * @default {}
65
+ */
66
+ htmlAttributes?: { [key: string]: string; };
67
+
68
+ /**
69
+ * Accepts the external `Query`
70
+ * that execute along with data processing.
71
+ *
72
+ * {% codeBlock src='dropdownlist/query/index.md' %}{% endcodeBlock %}
73
+ *
74
+ * @default null
75
+ * @deprecated
76
+ */
77
+ query?: Query;
78
+
79
+ /**
80
+ * Accepts the template design and assigns it to the selected list item in the input element of the component.
81
+ * For more details about the available template options refer to
82
+ * [`Template`](../../drop-down-list/templates) documentation.
83
+ *
84
+ * We have built-in `template engine`
85
+ * which provides options to compile template string into a executable function.
86
+ * For EX: We have expression evolution as like ES6 expression string literals.
87
+ * @default null
88
+ */
89
+ valueTemplate?: string;
90
+
91
+ /**
92
+ * Accepts the template design and assigns it to the header container of the popup list.
93
+ * > For more details about the available template options refer to [`Template`](../../drop-down-list/templates) documentation.
94
+ * @default null
95
+ */
96
+ headerTemplate?: string;
97
+
98
+ /**
99
+ * Accepts the template design and assigns it to the footer container of the popup list.
100
+ * > For more details about the available template options refer to [`Template`](../../drop-down-list/templates) documentation.
101
+ * @default null
102
+ */
103
+ footerTemplate?: string;
104
+
105
+ /**
106
+ * When allowFiltering is set to true, show the filter bar (search box) of the component.
107
+ * The filter action retrieves matched items through the `filtering` event based on
108
+ * the characters typed in the search TextBox.
109
+ *
110
+ * If no match is found, the value of the `noRecordsTemplate` property will be displayed.
111
+ * > For more details about the filtering refer to [`Filtering`](../../drop-down-list/filtering) documentation.
112
+ *
113
+ * {% codeBlock src="dropdownlist/allow-filtering-api/index.ts" %}{% endcodeBlock %}
114
+ *
115
+ * {% codeBlock src="dropdownlist/allow-filtering-api/index.html" %}{% endcodeBlock %}
116
+ * @default false
117
+ */
118
+ allowFiltering?: boolean;
119
+
120
+ /**
121
+ * When set to true, the user interactions on the component are disabled.
122
+ * @default false
123
+ */
124
+ readonly?: boolean;
125
+
126
+ /**
127
+ * Gets or sets the display text of the selected item in the component.
128
+ * @default null
129
+ */
130
+ text?: string;
131
+
132
+ /**
133
+ * Gets or sets the value of the selected item in the component.
134
+ * @default null
135
+ * @isGenericType true
136
+ */
137
+ value?: number | string | boolean;
138
+
139
+ /**
140
+ * Gets or sets the index of the selected item in the component.
141
+ *
142
+ * {% codeBlock src="dropdownlist/index-api/index.ts" %}{% endcodeBlock %}
143
+ *
144
+ * {% codeBlock src="dropdownlist/index-api/index.html" %}{% endcodeBlock %}
145
+ *
146
+ * @default null
147
+ * @blazorType int
148
+ * @isBlazorNullableType true
149
+ * @blazorDefaultValue
150
+ */
151
+ index?: number;
152
+
153
+ /**
154
+ * Specifies whether to display the floating label above the input element.
155
+ * Possible values are:
156
+ * * Never: The label will never float in the input when the placeholder is available.
157
+ * * Always: The floating label will always float above the input.
158
+ * * Auto: The floating label will float above the input after focusing or entering a value in the input.
159
+ *
160
+ * {% codeBlock src="dropdownlist/float-label-type-api/index.ts" %}{% endcodeBlock %}
161
+ *
162
+ * {% codeBlock src="dropdownlist/float-label-type-api/index.html" %}{% endcodeBlock %}
163
+ *
164
+ * @default Syncfusion.EJ2.Inputs.FloatLabelType.Never
165
+ * @aspType Syncfusion.EJ2.Inputs.FloatLabelType
166
+ * @isEnumeration true
167
+ * @blazorType Syncfusion.Blazor.Inputs.FloatLabelType
168
+ */
169
+ floatLabelType?: FloatLabelType;
170
+
171
+ /**
172
+ * Specifies whether to show or hide the clear button.
173
+ * When the clear button is clicked, `value`, `text`, and `index` properties are reset to null.
174
+ * @default false
175
+ * @blazorOverrideType virtual
176
+ */
177
+ showClearButton?: boolean;
178
+
179
+ /**
180
+ * Triggers on typing a character in the filter bar when the
181
+ * [`allowFiltering`](./#allowfiltering)
182
+ * is enabled.
183
+ * > For more details about the filtering refer to [`Filtering`](../../drop-down-list/filtering) documentation.
184
+ *
185
+ * @event
186
+ * @blazorProperty 'Filtering'
187
+ */
188
+ filtering?: EmitType<FilteringEventArgs>;
189
+
190
+ /**
191
+ * Triggers when an item in a popup is selected or when the model value is changed by user.
192
+ * Use change event to
193
+ * [`Configure the Cascading DropDownList`](../../drop-down-list/how-to/cascading)
194
+ * @event
195
+ * @blazorProperty 'ValueChange'
196
+ */
197
+ change?: EmitType<ChangeEventArgs>;
198
+
199
+ /**
200
+ * Triggers when the popup before opens.
201
+ * @event
202
+ * @blazorProperty 'OnOpen'
203
+ * @blazorType BeforeOpenEventArgs
204
+ */
205
+ beforeOpen?: EmitType<Object>;
206
+
207
+ /**
208
+ * Triggers when the popup opens.
209
+ * @event
210
+ * @blazorProperty 'Opened'
211
+ */
212
+ open?: EmitType<PopupEventArgs>;
213
+
214
+ /**
215
+ * Triggers when the popup is closed.
216
+ * @event
217
+ * @blazorProperty 'OnClose'
218
+ */
219
+ close?: EmitType<PopupEventArgs>;
220
+
221
+ /**
222
+ * Triggers when focus moves out from the component.
223
+ * @event
224
+ */
225
+ blur?: EmitType<Object>;
226
+
227
+ /**
228
+ * Triggers when the component is focused.
229
+ * @event
230
+ */
231
+ focus?: EmitType<Object>;
232
232
 
233
233
  }
@@ -159,7 +159,7 @@ export declare class DropDownList extends DropDownBase implements IInput {
159
159
  * {% codeBlock src='dropdownlist/query/index.md' %}{% endcodeBlock %}
160
160
  *
161
161
  * @default null
162
-
162
+ * @deprecated
163
163
  */
164
164
  query: Query;
165
165
  /**
@@ -424,7 +424,7 @@ export declare class DropDownList extends DropDownBase implements IInput {
424
424
  * @param {Query} query - Specify the query to filter the data.
425
425
  * @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
426
426
  * @return {void}.
427
-
427
+ * @deprecated
428
428
  */
429
429
  filter(dataSource: {
430
430
  [key: string]: Object;
@@ -506,6 +506,7 @@ export declare class DropDownList extends DropDownBase implements IInput {
506
506
  private clientRenderPopup;
507
507
  protected renderHightSearch(): void;
508
508
  private updateclientItemData;
509
+ private initValueItemData;
509
510
  private serverUpdateListElement;
510
511
  /**
511
512
  * Hides the popup if it is in an open state.
@@ -1,22 +1,22 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- }
8
- return function (d, b) {
9
- extendStatics(d, b);
10
- function __() { this.constructor = d; }
11
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
- };
13
- })();
14
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
- return c > 3 && r && Object.defineProperty(target, key, r), r;
19
- };
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ };
20
20
  /// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
21
21
  import { EventHandler, Property, Event, compile, KeyboardEvents, append } from '@syncfusion/ej2-base';
22
22
  import { attributes, isNullOrUndefined, getUniqueID, formatUnit, isUndefined, getValue } from '@syncfusion/ej2-base';
@@ -586,7 +586,9 @@ var DropDownList = /** @class */ (function (_super) {
586
586
  ;
587
587
  DropDownList.prototype.removeHover = function () {
588
588
  if (this.list) {
589
- var hoveredItem = this.list.querySelectorAll('.' + dropDownBaseClasses.hover);
589
+ var hoveredItem = (this.isServerBlazor && this.popupObj && this.popupObj.element) ?
590
+ this.popupObj.element.querySelectorAll('.' + dropDownBaseClasses.hover) :
591
+ this.list.querySelectorAll('.' + dropDownBaseClasses.hover);
590
592
  if (hoveredItem && hoveredItem.length) {
591
593
  removeClass(hoveredItem, dropDownBaseClasses.hover);
592
594
  }
@@ -599,7 +601,7 @@ var DropDownList = /** @class */ (function (_super) {
599
601
  ;
600
602
  DropDownList.prototype.incrementalSearch = function (e) {
601
603
  if (this.liCollections.length > 0) {
602
- var li = incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.isServerBlazor);
604
+ var li = incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.element.id, this.isServerBlazor);
603
605
  if (!isNullOrUndefined(li)) {
604
606
  this.setSelection(li, e);
605
607
  this.setScrollPosition();
@@ -1376,7 +1378,7 @@ var DropDownList = /** @class */ (function (_super) {
1376
1378
  * @param {Query} query - Specify the query to filter the data.
1377
1379
  * @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
1378
1380
  * @return {void}.
1379
-
1381
+ * @deprecated
1380
1382
  */
1381
1383
  DropDownList.prototype.filter = function (dataSource, query, fields) {
1382
1384
  this.isCustomFilter = true;
@@ -1772,7 +1774,7 @@ var DropDownList = /** @class */ (function (_super) {
1772
1774
  DropDownList.prototype.updateServerPopup = function (popupEle) {
1773
1775
  if (this.isServerBlazor) {
1774
1776
  if (popupEle && popupEle.querySelector('li')) {
1775
- removeClass([this.list], ['e-nodata']);
1777
+ removeClass([popupEle.querySelector('.e-content')], ['e-nodata']);
1776
1778
  }
1777
1779
  this.initial = false;
1778
1780
  popupEle.removeAttribute('style');
@@ -1801,7 +1803,7 @@ var DropDownList = /** @class */ (function (_super) {
1801
1803
  _this.isDocumentClick = false;
1802
1804
  _this.destroyPopup();
1803
1805
  var formElement = closest(_this.inputElement, 'form');
1804
- if (_this.isFiltering() && formElement && _this.actionCompleteData.list && _this.actionCompleteData.list[0]) {
1806
+ if (_this.isFiltering() && _this.actionCompleteData.list && _this.actionCompleteData.list[0]) {
1805
1807
  _this.isActive = true;
1806
1808
  _this.onActionComplete(_this.actionCompleteData.ulElement, _this.actionCompleteData.list, null, true);
1807
1809
  }
@@ -2259,6 +2261,9 @@ var DropDownList = /** @class */ (function (_super) {
2259
2261
  if (this.getModuleName() !== 'autocomplete' && this.allowFiltering && (isChangeValue || isChangeText)) {
2260
2262
  this.itemData = null;
2261
2263
  }
2264
+ if (this.allowFiltering && newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource))) {
2265
+ this.actionCompleteData = { ulElement: null, list: null, isUpdated: false };
2266
+ }
2262
2267
  };
2263
2268
  DropDownList.prototype.updateDataSource = function (props) {
2264
2269
  if (this.inputElement.value !== '' || (!isNullOrUndefined(props) && (isNullOrUndefined(props.dataSource)
@@ -2346,7 +2351,7 @@ var DropDownList = /** @class */ (function (_super) {
2346
2351
  this.getModuleName() === 'autocomplete' && this.listData.length > 100) {
2347
2352
  this.setSelectionData(newProp.text, oldProp.text, 'text');
2348
2353
  }
2349
- else {
2354
+ else if (!this.isServerBlazor) {
2350
2355
  this.setOldText(oldProp.text);
2351
2356
  }
2352
2357
  }
@@ -2372,7 +2377,7 @@ var DropDownList = /** @class */ (function (_super) {
2372
2377
  this.getModuleName() === 'autocomplete' && this.listData.length > 100) {
2373
2378
  this.setSelectionData(newProp.value, oldProp.value, 'value');
2374
2379
  }
2375
- else {
2380
+ else if (!this.isServerBlazor) {
2376
2381
  this.setOldValue(oldProp.value);
2377
2382
  }
2378
2383
  }
@@ -2390,14 +2395,14 @@ var DropDownList = /** @class */ (function (_super) {
2390
2395
  }
2391
2396
  this.renderList();
2392
2397
  }
2393
- if (!this.initRemoteRender) {
2398
+ if (!this.initRemoteRender && this.liCollections) {
2394
2399
  var element = this.liCollections[newProp.index];
2395
2400
  if (!this.checkValidLi(element)) {
2396
2401
  if (this.liCollections && this.liCollections.length === 100 &&
2397
2402
  this.getModuleName() === 'autocomplete' && this.listData.length > 100) {
2398
2403
  this.setSelectionData(newProp.index, oldProp.index, 'index');
2399
2404
  }
2400
- else {
2405
+ else if (!this.isServerBlazor) {
2401
2406
  this.index = oldProp.index;
2402
2407
  }
2403
2408
  }
@@ -2521,7 +2526,9 @@ var DropDownList = /** @class */ (function (_super) {
2521
2526
  if (!this.isServerBlazor) {
2522
2527
  this.invokeRenderPopup();
2523
2528
  }
2524
- if (this.isServerBlazor && !isNullOrUndefined(this.list) && (this.getModuleName() === 'dropdownlist' || !this.isFiltering())) {
2529
+ var popupHolderEle = !this.isFiltering() || document.querySelector('#' + this.element.id + '_popup_holder');
2530
+ var isDropdownComp = this.getModuleName() === 'dropdownlist' || !this.isFiltering();
2531
+ if (this.isServerBlazor && popupHolderEle && !isNullOrUndefined(this.list) && isDropdownComp) {
2525
2532
  this.invokeRenderPopup();
2526
2533
  }
2527
2534
  };
@@ -2592,6 +2599,11 @@ var DropDownList = /** @class */ (function (_super) {
2592
2599
  DropDownList.prototype.updateclientItemData = function (data) {
2593
2600
  this.listData = data;
2594
2601
  };
2602
+ DropDownList.prototype.initValueItemData = function (selectData) {
2603
+ this.itemData = selectData;
2604
+ this.previousValue = this.value;
2605
+ this.initial = false;
2606
+ };
2595
2607
  DropDownList.prototype.serverUpdateListElement = function (data, popupEle) {
2596
2608
  this.listData = data;
2597
2609
  if (this.ulElement) {
@@ -2625,8 +2637,9 @@ var DropDownList = /** @class */ (function (_super) {
2625
2637
  }
2626
2638
  this.closePopup();
2627
2639
  var dataItem = this.getItemData();
2640
+ var isSelectVal = this.isServerBlazor ? !isNullOrUndefined(this.value) : !isNullOrUndefined(this.selectedLI);
2628
2641
  if (this.inputElement.value.trim() === '' && !this.isInteracted && (this.isSelectCustom ||
2629
- !isNullOrUndefined(this.selectedLI) && this.inputElement.value !== dataItem.text)) {
2642
+ isSelectVal && this.inputElement.value !== dataItem.text)) {
2630
2643
  this.isSelectCustom = false;
2631
2644
  this.clearAll(e);
2632
2645
  }