@progress/kendo-angular-dropdowns 17.0.0-develop.9 → 17.0.0

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 (129) hide show
  1. package/README.md +40 -99
  2. package/autocomplete/autocomplete.component.d.ts +1 -1
  3. package/autocomplete/autocomplete.module.d.ts +1 -1
  4. package/comboboxes/combobox-column/combobox-column.component.d.ts +1 -1
  5. package/comboboxes/combobox.component.d.ts +1 -1
  6. package/comboboxes/combobox.module.d.ts +1 -1
  7. package/common/action-sheet.component.d.ts +1 -1
  8. package/common/disabled-items/item-disabled.d.ts +1 -1
  9. package/common/filter-input.directive.d.ts +1 -1
  10. package/common/filtering/filter.directive.d.ts +1 -1
  11. package/common/list.component.d.ts +1 -1
  12. package/common/localization/messages.d.ts +1 -1
  13. package/common/models/direction.d.ts +1 -1
  14. package/common/models/fillmode.d.ts +1 -1
  15. package/common/models/list-type.d.ts +1 -1
  16. package/common/models/rounded.d.ts +1 -1
  17. package/common/models/size.d.ts +1 -1
  18. package/common/searchbar.component.d.ts +1 -1
  19. package/common/selection/selectable.directive.d.ts +1 -1
  20. package/common/shared-events.directive.d.ts +1 -1
  21. package/common/taglist.component.d.ts +2 -2
  22. package/common/util.d.ts +2 -2
  23. package/dropdownlist/dropdownlist.component.d.ts +1 -1
  24. package/dropdowns.module.d.ts +1 -1
  25. package/dropdowntrees/checked-state/base-check.directive.d.ts +1 -1
  26. package/dropdowntrees/checked-state/check-all.directive.d.ts +1 -1
  27. package/dropdowntrees/checked-state/check.directive.d.ts +1 -1
  28. package/dropdowntrees/data-binding/dropdowntree/flat-binding.directive.d.ts +1 -1
  29. package/dropdowntrees/data-binding/dropdowntree/hierarchy-binding.directive.d.ts +1 -1
  30. package/dropdowntrees/data-binding/multiselecttree/flat-binding.directive.d.ts +1 -1
  31. package/dropdowntrees/data-binding/multiselecttree/hierarchy-binding.directive.d.ts +1 -1
  32. package/dropdowntrees/dropdowntree.component.d.ts +1 -1
  33. package/dropdowntrees/expanded-state/expand.directive.d.ts +1 -1
  34. package/dropdowntrees/multiselecttree.component.d.ts +1 -1
  35. package/dropdowntrees/summary-tag/summary-tag.directive.d.ts +1 -1
  36. package/{esm2020 → esm2022}/autocomplete/autocomplete.component.mjs +235 -173
  37. package/{esm2020 → esm2022}/autocomplete/autocomplete.module.mjs +11 -11
  38. package/{esm2020 → esm2022}/comboboxes/combobox-column/column-cell-template.directive.mjs +4 -3
  39. package/{esm2020 → esm2022}/comboboxes/combobox-column/column-header-template.directive.mjs +4 -3
  40. package/esm2022/comboboxes/combobox-column/combobox-column.component.mjs +105 -0
  41. package/{esm2020 → esm2022}/comboboxes/combobox.component.mjs +326 -248
  42. package/{esm2020 → esm2022}/comboboxes/combobox.module.mjs +11 -11
  43. package/{esm2020 → esm2022}/comboboxes/multicolumncombobox.component.mjs +53 -48
  44. package/{esm2020 → esm2022}/common/action-sheet.component.mjs +26 -14
  45. package/{esm2020 → esm2022}/common/data.service.mjs +8 -7
  46. package/{esm2020 → esm2022}/common/disabled-items/disabled-items.service.mjs +6 -4
  47. package/{esm2020 → esm2022}/common/filter-input.directive.mjs +6 -3
  48. package/{esm2020 → esm2022}/common/filtering/filter.directive.mjs +20 -13
  49. package/{esm2020 → esm2022}/common/filtering/filterable-component.mjs +21 -0
  50. package/{esm2020 → esm2022}/common/list-item.directive.mjs +4 -3
  51. package/{esm2020 → esm2022}/common/list.component.mjs +72 -36
  52. package/{esm2020 → esm2022}/common/localization/custom-messages.component.mjs +9 -8
  53. package/{esm2020 → esm2022}/common/localization/localized-messages.directive.mjs +9 -8
  54. package/esm2022/common/localization/messages.mjs +65 -0
  55. package/{esm2020 → esm2022}/common/models/preventable-event.mjs +1 -3
  56. package/{esm2020 → esm2022}/common/models/remove-tag-event.mjs +4 -0
  57. package/{esm2020 → esm2022}/common/navigation/navigation.service.mjs +27 -23
  58. package/{esm2020 → esm2022}/common/searchbar.component.mjs +45 -28
  59. package/{esm2020 → esm2022}/common/selection/selectable.directive.mjs +9 -5
  60. package/{esm2020 → esm2022}/common/selection/selection.service.mjs +13 -10
  61. package/{esm2020 → esm2022}/common/shared-events.directive.mjs +13 -7
  62. package/{esm2020 → esm2022}/common/taglist.component.mjs +36 -27
  63. package/{esm2020 → esm2022}/common/templates/custom-item-template.directive.mjs +4 -3
  64. package/{esm2020 → esm2022}/common/templates/fixed-group-template.directive.mjs +4 -3
  65. package/{esm2020 → esm2022}/common/templates/footer-template.directive.mjs +4 -3
  66. package/{esm2020 → esm2022}/common/templates/group-tag-template.directive.mjs +4 -3
  67. package/{esm2020 → esm2022}/common/templates/group-template.directive.mjs +4 -3
  68. package/{esm2020 → esm2022}/common/templates/header-template.directive.mjs +4 -3
  69. package/{esm2020 → esm2022}/common/templates/item-template.directive.mjs +4 -3
  70. package/{esm2020 → esm2022}/common/templates/no-data-template.directive.mjs +4 -3
  71. package/{esm2020 → esm2022}/common/templates/tag-template.directive.mjs +4 -3
  72. package/{esm2020 → esm2022}/common/templates/value-template.directive.mjs +4 -3
  73. package/{esm2020 → esm2022}/dropdownlist/dropdownlist.component.mjs +259 -184
  74. package/{esm2020 → esm2022}/dropdownlist/dropdownlist.module.mjs +8 -8
  75. package/esm2022/dropdowns.module.mjs +87 -0
  76. package/{esm2020 → esm2022}/dropdowntrees/checked-state/base-check.directive.mjs +10 -3
  77. package/{esm2020 → esm2022}/dropdowntrees/checked-state/check-all.directive.mjs +38 -21
  78. package/{esm2020 → esm2022}/dropdowntrees/checked-state/check.directive.mjs +31 -15
  79. package/{esm2020 → esm2022}/dropdowntrees/data-binding/dropdowntree/flat-binding.directive.mjs +12 -7
  80. package/{esm2020 → esm2022}/dropdowntrees/data-binding/dropdowntree/hierarchy-binding.directive.mjs +8 -7
  81. package/{esm2020 → esm2022}/dropdowntrees/data-binding/multiselecttree/flat-binding.directive.mjs +12 -7
  82. package/{esm2020 → esm2022}/dropdowntrees/data-binding/multiselecttree/hierarchy-binding.directive.mjs +8 -7
  83. package/{esm2020 → esm2022}/dropdowntrees/dropdowntree.component.mjs +309 -232
  84. package/{esm2020 → esm2022}/dropdowntrees/dropdowntrees.module.mjs +12 -12
  85. package/{esm2020 → esm2022}/dropdowntrees/expanded-state/expand.directive.mjs +8 -7
  86. package/{esm2020 → esm2022}/dropdowntrees/lookup/lookup.service.mjs +4 -6
  87. package/{esm2020 → esm2022}/dropdowntrees/multiselecttree.component.mjs +324 -254
  88. package/{esm2020 → esm2022}/dropdowntrees/summary-tag/summary-tag.directive.mjs +8 -7
  89. package/{esm2020 → esm2022}/dropdowntrees/templates/node-template.directive.mjs +4 -3
  90. package/{esm2020 → esm2022}/index.mjs +0 -2
  91. package/{esm2020 → esm2022}/multiselect/multiselect.component.mjs +328 -254
  92. package/{esm2020 → esm2022}/multiselect/multiselect.module.mjs +11 -11
  93. package/{esm2020 → esm2022}/multiselect/summary-tag.directive.mjs +8 -7
  94. package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
  95. package/{fesm2020 → fesm2022}/progress-kendo-angular-dropdowns.mjs +2528 -1927
  96. package/index.d.ts +0 -2
  97. package/multiselect/multiselect.component.d.ts +1 -1
  98. package/multiselect/multiselect.module.d.ts +1 -1
  99. package/multiselect/summary-tag.directive.d.ts +1 -1
  100. package/package.json +18 -24
  101. package/schematics/ngAdd/index.js +3 -3
  102. package/common/shared-directives.module.d.ts +0 -37
  103. package/common/shared.module.d.ts +0 -29
  104. package/esm2020/comboboxes/combobox-column/combobox-column.component.mjs +0 -60
  105. package/esm2020/common/localization/messages.mjs +0 -33
  106. package/esm2020/common/shared-directives.module.mjs +0 -84
  107. package/esm2020/common/shared.module.mjs +0 -68
  108. package/esm2020/dropdowns.module.mjs +0 -87
  109. package/fesm2015/progress-kendo-angular-dropdowns.mjs +0 -17609
  110. /package/{esm2020 → esm2022}/comboboxes/combobox-column/util.mjs +0 -0
  111. /package/{esm2020 → esm2022}/common/constants/error-messages.mjs +0 -0
  112. /package/{esm2020 → esm2022}/common/disabled-items/item-disabled.mjs +0 -0
  113. /package/{esm2020 → esm2022}/common/filtering/filter-settings.mjs +0 -0
  114. /package/{esm2020 → esm2022}/common/models/checkboxes-settings.mjs +0 -0
  115. /package/{esm2020 → esm2022}/common/models/direction.mjs +0 -0
  116. /package/{esm2020 → esm2022}/common/models/fillmode.mjs +0 -0
  117. /package/{esm2020 → esm2022}/common/models/list-type.mjs +0 -0
  118. /package/{esm2020 → esm2022}/common/models/page-change-event.mjs +0 -0
  119. /package/{esm2020 → esm2022}/common/models/popup-settings.mjs +0 -0
  120. /package/{esm2020 → esm2022}/common/models/rounded.mjs +0 -0
  121. /package/{esm2020 → esm2022}/common/models/size.mjs +0 -0
  122. /package/{esm2020 → esm2022}/common/models/virtualization-settings.mjs +0 -0
  123. /package/{esm2020 → esm2022}/common/navigation/navigation-action.mjs +0 -0
  124. /package/{esm2020 → esm2022}/common/util.mjs +0 -0
  125. /package/{esm2020 → esm2022}/directives.mjs +0 -0
  126. /package/{esm2020 → esm2022}/dropdowntrees/checked-state/checkable-settings.mjs +0 -0
  127. /package/{esm2020 → esm2022}/dropdowntrees/checked-state/checked-item.mjs +0 -0
  128. /package/{esm2020 → esm2022}/dropdowntrees/lookup/lookup.mjs +0 -0
  129. /package/{esm2020 → esm2022}/progress-kendo-angular-dropdowns.mjs +0 -0
@@ -72,230 +72,42 @@ const DEFAULT_FILL_MODE = 'solid';
72
72
  * ```
73
73
  */
74
74
  export class ComboBoxComponent extends MultiTabStop {
75
- constructor(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, cdr, renderer, injector, hostElement) {
76
- super();
77
- this.wrapper = wrapper;
78
- this.localization = localization;
79
- this.popupService = popupService;
80
- this.selectionService = selectionService;
81
- this.navigationService = navigationService;
82
- this.disabledItemsService = disabledItemsService;
83
- this.dataService = dataService;
84
- this.zone = zone;
85
- this.cdr = cdr;
86
- this.renderer = renderer;
87
- this.injector = injector;
88
- this.hostElement = hostElement;
89
- /**
90
- * @hidden
91
- */
92
- this.animationDuration = animationDuration;
93
- /**
94
- * @hidden
95
- */
96
- this.xIcon = xIcon;
97
- /**
98
- * @hidden
99
- */
100
- this.caretAltDownIcon = caretAltDownIcon;
101
- this.selected = [];
102
- /**
103
- * Shows or hides the current group sticky header when using grouped data.
104
- * By default the sticky header is displayed ([see example]({% slug grouping_autocomplete %}#toc-sticky-header)).
105
- */
106
- this.showStickyHeader = true;
107
- /**
108
- * @hidden
109
- */
110
- this.focusableId = `k-${guid()}`;
111
- /**
112
- * Specifies whether the ComboBox allows user-defined values that are not present in the dataset
113
- * ([more information and examples]({% slug custom_values_combobox %})).
114
- * Defaults to `false`.
115
- *
116
- * The feature is not available when using adaptive mode.
117
- */
118
- this.allowCustom = false;
119
- /**
120
- * A user-defined callback which returns normalized custom values.
121
- * Typically used when the data items are different from type `string`.
122
- * @param { Any } value - The custom value defined by the user.
123
- * @returns { Any }
124
- *
125
- * @example
126
- * ```ts
127
- * import { map } from 'rxjs/operators';
128
- *
129
- * _@Component({
130
- * selector: 'my-app',
131
- * template: `
132
- * <kendo-combobox
133
- * [allowCustom]="true"
134
- * [data]="listItems"
135
- * textField="text"
136
- * valueField="value"
137
- * [valueNormalizer]="valueNormalizer"
138
- * (valueChange)="onValueChange($event)"
139
- * >
140
- * </kendo-combobox>
141
- * `
142
- * })
143
- *
144
- * class AppComponent {
145
- * public listItems: Array<{ text: string, value: number }> = [
146
- * { text: "Small", value: 1 },
147
- * { text: "Medium", value: 2 },
148
- * { text: "Large", value: 3 }
149
- * ];
150
- *
151
- * public onValueChange(value) {
152
- * console.log("valueChange : ", value);
153
- * }
154
- *
155
- * public valueNormalizer = (text$: Observable<string>) => text$.pipe(map((text: string) => {
156
- * return { ProductID: null, ProductName: text };
157
- * }));
158
- *
159
- * }
160
- * ```
161
- */
162
- this.valueNormalizer = (text) => text.pipe(map((userInput) => userInput));
163
- /**
164
- * The hint that is displayed when the component is empty.
165
- *
166
- */
167
- this.placeholder = "";
168
- /**
169
- * Enables or disables the adaptive mode. By default the adaptive rendering is disabled.
170
- */
171
- this.adaptiveMode = 'none';
172
- /**
173
- * Sets the title of the ActionSheet that is rendered instead of the Popup when using small screen devices.
174
- * By default the ActionSheet title uses the text provided for the label of the AutoComplete.
175
- */
176
- this.title = '';
177
- this._listHeight = 200;
178
- /**
179
- * Enables the auto-completion of the text based on the first data item.
180
- */
181
- this.suggest = false;
182
- /**
183
- * If set to `true`, renders a button on hovering over the component.
184
- * Clicking this button resets the value of the component to `undefined` and triggers the `change` event.
185
- */
186
- this.clearButton = true;
187
- /**
188
- * Sets the disabled state of the component. To learn how to disable the component in reactive forms, refer to the articles on [ComboBox Forms Support](slug:formssupport_combobox#toc-managing-the-combobox-disabled-state-in-reactive-forms) and [MultiColumnComboBox Forms Support](slug:formssupport_multicolumncombobox#toc-managing-the-multicolumncombobox-disabled-state-in-reactive-forms).
189
- */
190
- this.disabled = false;
191
- /**
192
- * Sets the read-only state of the component.
193
- *
194
- * @default false
195
- */
196
- this.readonly = false;
197
- /**
198
- * Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
199
- */
200
- this.tabindex = 0;
201
- /**
202
- * Enables the [filtering]({% slug filtering_combobox %}) functionality.
203
- * If set to `true`, the component emits the `filterChange` event.
204
- */
205
- this.filterable = false;
206
- /**
207
- * Fires each time the value is changed&mdash;
208
- * when the component is blurred or the value is cleared through the **Clear** button
209
- * ([see example](slug:events_combobox)).
210
- * When the value of the component is programmatically changed to `ngModel` or `formControl`
211
- * through its API or form binding, the `valueChange` event is not triggered because it
212
- * might cause a mix-up with the built-in `valueChange` mechanisms of the `ngModel` or `formControl` bindings.
213
- */
214
- this.valueChange = new EventEmitter();
215
- /**
216
- * Fires each time an item selection is changed
217
- * ([see example](slug:events_combobox)).
218
- */
219
- this.selectionChange = new EventEmitter();
220
- /**
221
- * Fires each time the user types in the input field.
222
- * You can filter the source based on the passed filtration value
223
- * ([see example](slug:events_combobox)).
224
- */
225
- this.filterChange = new EventEmitter();
226
- /**
227
- * Fires each time the popup is about to open.
228
- * This event is preventable. If you cancel it, the popup will remain closed.
229
- */
230
- this.open = new EventEmitter();
231
- /**
232
- * Fires after the popup has been opened.
233
- */
234
- this.opened = new EventEmitter();
235
- /**
236
- * Fires each time the popup is about to close.
237
- * This event is preventable. If you cancel it, the popup will remain open.
238
- */
239
- this.close = new EventEmitter();
240
- /**
241
- * Fires after the popup has been closed.
242
- */
243
- this.closed = new EventEmitter();
244
- /**
245
- * Fires each time the user focuses the ComboBox.
246
- */
247
- this.onFocus = new EventEmitter();
248
- /**
249
- * Fires each time the ComboBox gets blurred.
250
- */
251
- this.onBlur = new EventEmitter();
252
- /**
253
- * Fires each time the user focuses the `input` element.
254
- */
255
- this.inputFocus = new EventEmitter();
256
- /**
257
- * Fires each time the `input` element gets blurred.
258
- */
259
- this.inputBlur = new EventEmitter();
260
- /**
261
- * @hidden
262
- */
263
- this.escape = new EventEmitter();
264
- this.widgetClasses = true;
265
- this._isFocused = false;
266
- /**
267
- * @hidden
268
- */
269
- this.windowSize = 'large';
270
- this.listBoxId = `k-${guid()}`;
271
- this.optionPrefix = `k-${guid()}`;
272
- this.onChangeCallback = (_) => { };
273
- this.onTouchedCallback = (_) => { };
274
- /**
275
- * Used for the default virtualization settings config.
276
- */
277
- this.defaultVirtualItemHeight = 28;
278
- /**
279
- * Used for the default virtualization settings config.
280
- */
281
- this.defaultVirtualPageSize = 50;
282
- this._filtering = false;
283
- this._text = '';
284
- this.filterText = '';
285
- this._open = false;
286
- this._popupSettings = { animate: true };
287
- this.popupMouseDownHandler = (event) => event.preventDefault();
288
- this.customValueSubject = new Subject();
289
- this.valueSubject = new Subject();
290
- this.clearValueSubject = new Subject();
291
- this.subs = new Subscription();
292
- this._size = 'medium';
293
- this._rounded = 'medium';
294
- this._fillMode = 'solid';
295
- validatePackage(packageMetadata);
296
- this.direction = localization.rtl ? 'rtl' : 'ltr';
297
- this.data = [];
298
- }
75
+ wrapper;
76
+ localization;
77
+ popupService;
78
+ selectionService;
79
+ navigationService;
80
+ disabledItemsService;
81
+ dataService;
82
+ zone;
83
+ cdr;
84
+ renderer;
85
+ injector;
86
+ hostElement;
87
+ /**
88
+ * @hidden
89
+ */
90
+ icon;
91
+ /**
92
+ * @hidden
93
+ */
94
+ svgIcon;
95
+ /**
96
+ * Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.
97
+ */
98
+ inputAttributes;
99
+ /**
100
+ * @hidden
101
+ */
102
+ animationDuration = animationDuration;
103
+ /**
104
+ * @hidden
105
+ */
106
+ xIcon = xIcon;
107
+ /**
108
+ * @hidden
109
+ */
110
+ responsiveRendererComponent;
299
111
  /**
300
112
  * @hidden
301
113
  */
@@ -308,6 +120,10 @@ export class ComboBoxComponent extends MultiTabStop {
308
120
  get actionSheetSearchBar() {
309
121
  return this.responsiveRendererComponent?.actionSheetSearchBar;
310
122
  }
123
+ /**
124
+ * @hidden
125
+ */
126
+ caretAltDownIcon = caretAltDownIcon;
311
127
  set text(text) {
312
128
  this._text = isPresent(text) ? text.toString() : "";
313
129
  }
@@ -353,6 +169,25 @@ export class ComboBoxComponent extends MultiTabStop {
353
169
  }
354
170
  return appendTo === 'component' ? this.container : appendTo;
355
171
  }
172
+ dataItem;
173
+ selected = [];
174
+ /**
175
+ * Shows or hides the current group sticky header when using grouped data.
176
+ * By default the sticky header is displayed ([see example]({% slug grouping_autocomplete %}#toc-sticky-header)).
177
+ */
178
+ showStickyHeader = true;
179
+ /**
180
+ * @hidden
181
+ */
182
+ focusableId = `k-${guid()}`;
183
+ /**
184
+ * Specifies whether the ComboBox allows user-defined values that are not present in the dataset
185
+ * ([more information and examples]({% slug custom_values_combobox %})).
186
+ * Defaults to `false`.
187
+ *
188
+ * The feature is not available when using adaptive mode.
189
+ */
190
+ allowCustom = false;
356
191
  /**
357
192
  * Sets the data of the ComboBox.
358
193
  *
@@ -400,6 +235,20 @@ export class ComboBoxComponent extends MultiTabStop {
400
235
  get value() {
401
236
  return this._value;
402
237
  }
238
+ /**
239
+ * Sets the data item field that represents the item text.
240
+ * If the data contains only primitive values, do not define it.
241
+ *
242
+ * > The `textField` property can be set to point to a nested property value - e.g. `category.name`.
243
+ */
244
+ textField;
245
+ /**
246
+ * Sets the data item field that represents the item value.
247
+ * If the data contains only primitive values, do not define it.
248
+ *
249
+ * > The `valueField` property can be set to point to a nested property value - e.g. `category.id`.
250
+ */
251
+ valueField;
403
252
  /**
404
253
  * Specifies the type of the selected value.
405
254
  * If set to `true`, the selected value has to be of the primitive type
@@ -414,6 +263,64 @@ export class ComboBoxComponent extends MultiTabStop {
414
263
  }
415
264
  return this._valuePrimitive;
416
265
  }
266
+ /**
267
+ * A user-defined callback which returns normalized custom values.
268
+ * Typically used when the data items are different from type `string`.
269
+ * @param { Any } value - The custom value defined by the user.
270
+ * @returns { Any }
271
+ *
272
+ * @example
273
+ * ```ts
274
+ * import { map } from 'rxjs/operators';
275
+ *
276
+ * _@Component({
277
+ * selector: 'my-app',
278
+ * template: `
279
+ * <kendo-combobox
280
+ * [allowCustom]="true"
281
+ * [data]="listItems"
282
+ * textField="text"
283
+ * valueField="value"
284
+ * [valueNormalizer]="valueNormalizer"
285
+ * (valueChange)="onValueChange($event)"
286
+ * >
287
+ * </kendo-combobox>
288
+ * `
289
+ * })
290
+ *
291
+ * class AppComponent {
292
+ * public listItems: Array<{ text: string, value: number }> = [
293
+ * { text: "Small", value: 1 },
294
+ * { text: "Medium", value: 2 },
295
+ * { text: "Large", value: 3 }
296
+ * ];
297
+ *
298
+ * public onValueChange(value) {
299
+ * console.log("valueChange : ", value);
300
+ * }
301
+ *
302
+ * public valueNormalizer = (text$: Observable<string>) => text$.pipe(map((text: string) => {
303
+ * return { ProductID: null, ProductName: text };
304
+ * }));
305
+ *
306
+ * }
307
+ * ```
308
+ */
309
+ valueNormalizer = (text) => text.pipe(map((userInput) => userInput));
310
+ /**
311
+ * The hint that is displayed when the component is empty.
312
+ *
313
+ */
314
+ placeholder = "";
315
+ /**
316
+ * Enables or disables the adaptive mode. By default the adaptive rendering is disabled.
317
+ */
318
+ adaptiveMode = 'none';
319
+ /**
320
+ * Sets the title of the ActionSheet that is rendered instead of the Popup when using small screen devices.
321
+ * By default the ActionSheet title uses the text provided for the label of the AutoComplete.
322
+ */
323
+ title = '';
417
324
  /**
418
325
  * Sets the subtitle of the ActionSheet that is rendered instead of the Popup when using small screen devices.
419
326
  * By default the ActionSheet subtitle uses the text provided for the `placeholder` of the AutoComplete.
@@ -463,6 +370,24 @@ export class ComboBoxComponent extends MultiTabStop {
463
370
  }
464
371
  return this._listHeight;
465
372
  }
373
+ _listHeight = 200;
374
+ /**
375
+ * Sets and gets the loading state of the ComboBox.
376
+ */
377
+ loading;
378
+ /**
379
+ * Enables the auto-completion of the text based on the first data item.
380
+ */
381
+ suggest = false;
382
+ /**
383
+ * If set to `true`, renders a button on hovering over the component.
384
+ * Clicking this button resets the value of the component to `undefined` and triggers the `change` event.
385
+ */
386
+ clearButton = true;
387
+ /**
388
+ * Sets the disabled state of the component. To learn how to disable the component in reactive forms, refer to the articles on [ComboBox Forms Support](slug:formssupport_combobox#toc-managing-the-combobox-disabled-state-in-reactive-forms) and [MultiColumnComboBox Forms Support](slug:formssupport_multicolumncombobox#toc-managing-the-multicolumncombobox-disabled-state-in-reactive-forms).
389
+ */
390
+ disabled = false;
466
391
  /**
467
392
  * Defines a Boolean function that is executed for each data item in the component
468
393
  * ([see examples]({% slug disableditems_combobox %})). Determines whether the item will be disabled.
@@ -473,6 +398,16 @@ export class ComboBoxComponent extends MultiTabStop {
473
398
  }
474
399
  this.disabledItemsService.itemDisabled = fn;
475
400
  }
401
+ /**
402
+ * Sets the read-only state of the component.
403
+ *
404
+ * @default false
405
+ */
406
+ readonly = false;
407
+ /**
408
+ * Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
409
+ */
410
+ tabindex = 0;
476
411
  /**
477
412
  * @hidden
478
413
  */
@@ -482,6 +417,11 @@ export class ComboBoxComponent extends MultiTabStop {
482
417
  get tabIndex() {
483
418
  return this.tabindex;
484
419
  }
420
+ /**
421
+ * Enables the [filtering]({% slug filtering_combobox %}) functionality.
422
+ * If set to `true`, the component emits the `filterChange` event.
423
+ */
424
+ filterable = false;
485
425
  /**
486
426
  * Enables the [virtualization]({% slug virtualization_combobox %}) functionality.
487
427
  */
@@ -558,6 +498,84 @@ export class ComboBoxComponent extends MultiTabStop {
558
498
  get fillMode() {
559
499
  return this._fillMode;
560
500
  }
501
+ /**
502
+ * Fires each time the value is changed&mdash;
503
+ * when the component is blurred or the value is cleared through the **Clear** button
504
+ * ([see example](slug:events_combobox)).
505
+ * When the value of the component is programmatically changed to `ngModel` or `formControl`
506
+ * through its API or form binding, the `valueChange` event is not triggered because it
507
+ * might cause a mix-up with the built-in `valueChange` mechanisms of the `ngModel` or `formControl` bindings.
508
+ */
509
+ valueChange = new EventEmitter();
510
+ /**
511
+ * Fires each time an item selection is changed
512
+ * ([see example](slug:events_combobox)).
513
+ */
514
+ selectionChange = new EventEmitter();
515
+ /**
516
+ * Fires each time the user types in the input field.
517
+ * You can filter the source based on the passed filtration value
518
+ * ([see example](slug:events_combobox)).
519
+ */
520
+ filterChange = new EventEmitter();
521
+ /**
522
+ * Fires each time the popup is about to open.
523
+ * This event is preventable. If you cancel it, the popup will remain closed.
524
+ */
525
+ open = new EventEmitter();
526
+ /**
527
+ * Fires after the popup has been opened.
528
+ */
529
+ opened = new EventEmitter();
530
+ /**
531
+ * Fires each time the popup is about to close.
532
+ * This event is preventable. If you cancel it, the popup will remain open.
533
+ */
534
+ close = new EventEmitter();
535
+ /**
536
+ * Fires after the popup has been closed.
537
+ */
538
+ closed = new EventEmitter();
539
+ /**
540
+ * Fires each time the user focuses the ComboBox.
541
+ */
542
+ onFocus = new EventEmitter();
543
+ /**
544
+ * Fires each time the ComboBox gets blurred.
545
+ */
546
+ onBlur = new EventEmitter();
547
+ /**
548
+ * Fires each time the user focuses the `input` element.
549
+ */
550
+ inputFocus = new EventEmitter();
551
+ /**
552
+ * Fires each time the `input` element gets blurred.
553
+ */
554
+ inputBlur = new EventEmitter();
555
+ /**
556
+ * @hidden
557
+ */
558
+ escape = new EventEmitter();
559
+ template;
560
+ headerTemplate;
561
+ footerTemplate;
562
+ noDataTemplate;
563
+ groupTemplate;
564
+ fixedGroupTemplate;
565
+ /**
566
+ * @hidden
567
+ */
568
+ suffixTemplate;
569
+ /**
570
+ * @hidden
571
+ */
572
+ prefixTemplate;
573
+ container;
574
+ popupTemplate;
575
+ searchbar;
576
+ optionsList;
577
+ select;
578
+ widgetClasses = true;
561
579
  get isDisabled() {
562
580
  return this.disabled;
563
581
  }
@@ -567,6 +585,7 @@ export class ComboBoxComponent extends MultiTabStop {
567
585
  get dir() {
568
586
  return this.direction;
569
587
  }
588
+ _isFocused = false;
570
589
  get isFocused() {
571
590
  return this._isFocused;
572
591
  }
@@ -586,6 +605,10 @@ export class ComboBoxComponent extends MultiTabStop {
586
605
  const ngControl = this.injector.get(NgControl, null);
587
606
  return ngControl?.control || null;
588
607
  }
608
+ /**
609
+ * @hidden
610
+ */
611
+ windowSize = 'large';
589
612
  /**
590
613
  * @hidden
591
614
  */
@@ -598,6 +621,9 @@ export class ComboBoxComponent extends MultiTabStop {
598
621
  get isAdaptive() {
599
622
  return this.isAdaptiveModeEnabled && this.windowSize !== 'large';
600
623
  }
624
+ listBoxId = `k-${guid()}`;
625
+ optionPrefix = `k-${guid()}`;
626
+ popupRef;
601
627
  get popupWidth() {
602
628
  let wrapperOffsetWidth = 0;
603
629
  if (isDocumentAvailable()) {
@@ -612,6 +638,58 @@ export class ComboBoxComponent extends MultiTabStop {
612
638
  const popupHeight = this.popupSettings.height;
613
639
  return isPresent(popupHeight) ? `${popupHeight}px` : 'auto';
614
640
  }
641
+ onChangeCallback = (_) => { };
642
+ onTouchedCallback = (_) => { };
643
+ /**
644
+ * Used for the default virtualization settings config.
645
+ */
646
+ defaultVirtualItemHeight = 28;
647
+ /**
648
+ * Used for the default virtualization settings config.
649
+ */
650
+ defaultVirtualPageSize = 50;
651
+ valueSubscription;
652
+ _filtering = false;
653
+ _text = '';
654
+ filterText = '';
655
+ _open = false;
656
+ _value;
657
+ _valuePrimitive;
658
+ _previousDataItem;
659
+ suggestedText;
660
+ backspacePressed;
661
+ _popupSettings = { animate: true };
662
+ _virtualSettings;
663
+ _subtitle;
664
+ popupMouseDownHandler = (event) => event.preventDefault();
665
+ customValueSubject = new Subject();
666
+ valueSubject = new Subject();
667
+ clearValueSubject = new Subject();
668
+ direction;
669
+ subs = new Subscription();
670
+ touchstartDisposeHandler;
671
+ selectClickDisposeHandler;
672
+ _size = 'medium';
673
+ _rounded = 'medium';
674
+ _fillMode = 'solid';
675
+ constructor(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, cdr, renderer, injector, hostElement) {
676
+ super();
677
+ this.wrapper = wrapper;
678
+ this.localization = localization;
679
+ this.popupService = popupService;
680
+ this.selectionService = selectionService;
681
+ this.navigationService = navigationService;
682
+ this.disabledItemsService = disabledItemsService;
683
+ this.dataService = dataService;
684
+ this.zone = zone;
685
+ this.cdr = cdr;
686
+ this.renderer = renderer;
687
+ this.injector = injector;
688
+ this.hostElement = hostElement;
689
+ validatePackage(packageMetadata);
690
+ this.direction = localization.rtl ? 'rtl' : 'ltr';
691
+ this.data = [];
692
+ }
615
693
  ngOnInit() {
616
694
  this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
617
695
  this.attachStreams();
@@ -1518,29 +1596,28 @@ export class ComboBoxComponent extends MultiTabStop {
1518
1596
  this.selectionService.focus(this.selectionService.focused);
1519
1597
  this.actionSheetSearchBar.focus();
1520
1598
  }
1521
- }
1522
- ComboBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ComboBoxComponent, deps: [{ token: i0.ElementRef }, { token: i1.LocalizationService }, { token: i2.PopupService }, { token: i3.SelectionService }, { token: i4.NavigationService }, { token: i5.DisabledItemsService }, { token: i6.DataService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1523
- ComboBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ComboBoxComponent, isStandalone: true, selector: "kendo-combobox", inputs: { icon: "icon", svgIcon: "svgIcon", inputAttributes: "inputAttributes", showStickyHeader: "showStickyHeader", focusableId: "focusableId", allowCustom: "allowCustom", data: "data", value: "value", textField: "textField", valueField: "valueField", valuePrimitive: "valuePrimitive", valueNormalizer: "valueNormalizer", placeholder: "placeholder", adaptiveMode: "adaptiveMode", title: "title", subtitle: "subtitle", popupSettings: "popupSettings", listHeight: "listHeight", loading: "loading", suggest: "suggest", clearButton: "clearButton", disabled: "disabled", itemDisabled: "itemDisabled", readonly: "readonly", tabindex: "tabindex", tabIndex: "tabIndex", filterable: "filterable", virtual: "virtual", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", selectionChange: "selectionChange", filterChange: "filterChange", open: "open", opened: "opened", close: "close", closed: "closed", onFocus: "focus", onBlur: "blur", inputFocus: "inputFocus", inputBlur: "inputBlur", escape: "escape" }, host: { properties: { "class.k-readonly": "this.readonly", "class.k-combobox": "this.widgetClasses", "class.k-input": "this.widgetClasses", "class.k-disabled": "this.isDisabled", "class.k-loading": "this.isLoading", "attr.dir": "this.dir" } }, providers: [
1524
- COMBOBOX_VALUE_ACCESSOR,
1525
- DataService,
1526
- SelectionService,
1527
- NavigationService,
1528
- DisabledItemsService,
1529
- LocalizationService,
1530
- {
1531
- provide: L10N_PREFIX,
1532
- useValue: 'kendo.combobox'
1533
- },
1534
- {
1535
- provide: FilterableComponent, useExisting: forwardRef(() => ComboBoxComponent)
1536
- },
1537
- {
1538
- provide: KendoInput, useExisting: forwardRef(() => ComboBoxComponent)
1539
- },
1540
- {
1541
- provide: MultiTabStop, useExisting: forwardRef(() => ComboBoxComponent)
1542
- }
1543
- ], queries: [{ propertyName: "template", first: true, predicate: ItemTemplateDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: HeaderTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: FooterTemplateDirective, descendants: true }, { propertyName: "noDataTemplate", first: true, predicate: NoDataTemplateDirective, descendants: true }, { propertyName: "groupTemplate", first: true, predicate: GroupTemplateDirective, descendants: true }, { propertyName: "fixedGroupTemplate", first: true, predicate: FixedGroupTemplateDirective, descendants: true }, { propertyName: "suffixTemplate", first: true, predicate: SuffixTemplateDirective, descendants: true }, { propertyName: "prefixTemplate", first: true, predicate: PrefixTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "responsiveRendererComponent", first: true, predicate: ResponsiveRendererComponent, descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "searchbar", first: true, predicate: SearchBarComponent, descendants: true, static: true }, { propertyName: "optionsList", first: true, predicate: ["optionsList"], descendants: true }, { propertyName: "select", first: true, predicate: ["select"], descendants: true, static: true }], exportAs: ["kendoComboBox"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
1599
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ComboBoxComponent, deps: [{ token: i0.ElementRef }, { token: i1.LocalizationService }, { token: i2.PopupService }, { token: i3.SelectionService }, { token: i4.NavigationService }, { token: i5.DisabledItemsService }, { token: i6.DataService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1600
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ComboBoxComponent, isStandalone: true, selector: "kendo-combobox", inputs: { icon: "icon", svgIcon: "svgIcon", inputAttributes: "inputAttributes", showStickyHeader: "showStickyHeader", focusableId: "focusableId", allowCustom: "allowCustom", data: "data", value: "value", textField: "textField", valueField: "valueField", valuePrimitive: "valuePrimitive", valueNormalizer: "valueNormalizer", placeholder: "placeholder", adaptiveMode: "adaptiveMode", title: "title", subtitle: "subtitle", popupSettings: "popupSettings", listHeight: "listHeight", loading: "loading", suggest: "suggest", clearButton: "clearButton", disabled: "disabled", itemDisabled: "itemDisabled", readonly: "readonly", tabindex: "tabindex", tabIndex: "tabIndex", filterable: "filterable", virtual: "virtual", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", selectionChange: "selectionChange", filterChange: "filterChange", open: "open", opened: "opened", close: "close", closed: "closed", onFocus: "focus", onBlur: "blur", inputFocus: "inputFocus", inputBlur: "inputBlur", escape: "escape" }, host: { properties: { "class.k-readonly": "this.readonly", "class.k-combobox": "this.widgetClasses", "class.k-input": "this.widgetClasses", "class.k-disabled": "this.isDisabled", "class.k-loading": "this.isLoading", "attr.dir": "this.dir" } }, providers: [
1601
+ COMBOBOX_VALUE_ACCESSOR,
1602
+ DataService,
1603
+ SelectionService,
1604
+ NavigationService,
1605
+ DisabledItemsService,
1606
+ LocalizationService,
1607
+ {
1608
+ provide: L10N_PREFIX,
1609
+ useValue: 'kendo.combobox'
1610
+ },
1611
+ {
1612
+ provide: FilterableComponent, useExisting: forwardRef(() => ComboBoxComponent)
1613
+ },
1614
+ {
1615
+ provide: KendoInput, useExisting: forwardRef(() => ComboBoxComponent)
1616
+ },
1617
+ {
1618
+ provide: MultiTabStop, useExisting: forwardRef(() => ComboBoxComponent)
1619
+ }
1620
+ ], queries: [{ propertyName: "template", first: true, predicate: ItemTemplateDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: HeaderTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: FooterTemplateDirective, descendants: true }, { propertyName: "noDataTemplate", first: true, predicate: NoDataTemplateDirective, descendants: true }, { propertyName: "groupTemplate", first: true, predicate: GroupTemplateDirective, descendants: true }, { propertyName: "fixedGroupTemplate", first: true, predicate: FixedGroupTemplateDirective, descendants: true }, { propertyName: "suffixTemplate", first: true, predicate: SuffixTemplateDirective, descendants: true }, { propertyName: "prefixTemplate", first: true, predicate: PrefixTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "responsiveRendererComponent", first: true, predicate: ResponsiveRendererComponent, descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "searchbar", first: true, predicate: SearchBarComponent, descendants: true, static: true }, { propertyName: "optionsList", first: true, predicate: ["optionsList"], descendants: true }, { propertyName: "select", first: true, predicate: ["select"], descendants: true, static: true }], exportAs: ["kendoComboBox"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
1544
1621
  <ng-container kendoComboBoxLocalizedMessages
1545
1622
  i18n-noDataText="kendo.combobox.noDataText|The text displayed in the popup when there are no items"
1546
1623
  noDataText="NO DATA FOUND"
@@ -1701,7 +1778,8 @@ ComboBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
1701
1778
  </ng-template>
1702
1779
  </ng-template>
1703
1780
  `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { kind: "directive", type: SharedDropDownEventsDirective, selector: "[kendoDropDownSharedEvents]", inputs: ["hostElement", "clearButtonClicked", "isFocused"], outputs: ["isFocusedChange", "onFocus", "handleBlur"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SeparatorComponent, selector: "kendo-separator", inputs: ["orientation"] }, { kind: "component", type: SearchBarComponent, selector: "input[kendoSearchbar]", inputs: ["tagListId", "readonly", "disabled", "isRequired", "isSuggestable", "isFilterable", "userInput", "suggestedText", "inputAttributes", "id", "activeDescendant", "tabIndex", "isLoading", "ariaControls", "ariaExpanded", "placeholder"], outputs: ["valueChange", "onBlur", "onFocus", "onClick", "onNavigate"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: ResponsiveRendererComponent, selector: "responsive-renderer", inputs: ["title", "showActionButtons", "subtitle", "size", "showTextInput", "sharedPopupActionSheetTemplate", "isActionSheetExpanded", "text", "placeholder"], outputs: ["closePopup", "textInputChange", "navigate", "onExpand", "onCollapse", "onApply", "onCancel"] }, { kind: "directive", type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { kind: "component", type: ListComponent, selector: "kendo-list", inputs: ["selected", "focused", "textField", "valueField", "height", "template", "groupTemplate", "fixedGroupTemplate", "show", "id", "optionPrefix", "multipleSelection", "virtual", "type", "checkboxes", "ariaLive", "isMultiselect", "isActionSheetExpanded", "showStickyHeader", "data", "size", "rounded"], outputs: ["onClick", "pageChange", "listResize", "popupListScroll"] }] });
1704
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ComboBoxComponent, decorators: [{
1781
+ }
1782
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ComboBoxComponent, decorators: [{
1705
1783
  type: Component,
1706
1784
  args: [{
1707
1785
  exportAs: 'kendoComboBox',