@progress/kendo-angular-dropdowns 21.4.1 → 22.0.0-develop.1

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 (84) hide show
  1. package/common/localization/messages.d.ts +1 -1
  2. package/dropdowntrees/checked-state/base-check.directive.d.ts +1 -1
  3. package/fesm2022/progress-kendo-angular-dropdowns.mjs +173 -173
  4. package/package.json +14 -22
  5. package/schematics/ngAdd/index.js +2 -2
  6. package/esm2022/autocomplete/autocomplete.component.mjs +0 -1687
  7. package/esm2022/autocomplete/autocomplete.module.mjs +0 -70
  8. package/esm2022/comboboxes/combobox-column/column-cell-template.directive.mjs +0 -42
  9. package/esm2022/comboboxes/combobox-column/column-header-template.directive.mjs +0 -40
  10. package/esm2022/comboboxes/combobox-column/combobox-column.component.mjs +0 -116
  11. package/esm2022/comboboxes/combobox-column/util.mjs +0 -60
  12. package/esm2022/comboboxes/combobox.component.mjs +0 -2149
  13. package/esm2022/comboboxes/combobox.module.mjs +0 -77
  14. package/esm2022/comboboxes/multicolumncombobox.component.mjs +0 -883
  15. package/esm2022/common/adaptive-renderer.component.mjs +0 -253
  16. package/esm2022/common/constants/error-messages.mjs +0 -61
  17. package/esm2022/common/data.service.mjs +0 -250
  18. package/esm2022/common/disabled-items/disabled-items.service.mjs +0 -47
  19. package/esm2022/common/disabled-items/item-disabled.mjs +0 -5
  20. package/esm2022/common/filter-input.directive.mjs +0 -39
  21. package/esm2022/common/filtering/filter-settings.mjs +0 -5
  22. package/esm2022/common/filtering/filter.directive.mjs +0 -136
  23. package/esm2022/common/filtering/filterable-component.mjs +0 -34
  24. package/esm2022/common/list-item.directive.mjs +0 -25
  25. package/esm2022/common/list.component.mjs +0 -968
  26. package/esm2022/common/localization/custom-messages.component.mjs +0 -96
  27. package/esm2022/common/localization/localized-messages.directive.mjs +0 -47
  28. package/esm2022/common/localization/messages.mjs +0 -77
  29. package/esm2022/common/models/checkboxes-settings.mjs +0 -15
  30. package/esm2022/common/models/direction.mjs +0 -5
  31. package/esm2022/common/models/fillmode.mjs +0 -5
  32. package/esm2022/common/models/list-type.mjs +0 -5
  33. package/esm2022/common/models/page-change-event.mjs +0 -5
  34. package/esm2022/common/models/popup-settings.mjs +0 -5
  35. package/esm2022/common/models/preventable-event.mjs +0 -25
  36. package/esm2022/common/models/remove-tag-event.mjs +0 -23
  37. package/esm2022/common/models/rounded.mjs +0 -5
  38. package/esm2022/common/models/size.mjs +0 -5
  39. package/esm2022/common/models/virtualization-settings.mjs +0 -24
  40. package/esm2022/common/navigation/navigation-action.mjs +0 -32
  41. package/esm2022/common/navigation/navigation.service.mjs +0 -188
  42. package/esm2022/common/searchbar.component.mjs +0 -386
  43. package/esm2022/common/selection/selectable.directive.mjs +0 -83
  44. package/esm2022/common/selection/selection.service.mjs +0 -166
  45. package/esm2022/common/shared-events.directive.mjs +0 -99
  46. package/esm2022/common/taglist.component.mjs +0 -295
  47. package/esm2022/common/templates/custom-item-template.directive.mjs +0 -48
  48. package/esm2022/common/templates/fixed-group-template.directive.mjs +0 -55
  49. package/esm2022/common/templates/footer-template.directive.mjs +0 -49
  50. package/esm2022/common/templates/group-tag-template.directive.mjs +0 -47
  51. package/esm2022/common/templates/group-template.directive.mjs +0 -55
  52. package/esm2022/common/templates/header-template.directive.mjs +0 -49
  53. package/esm2022/common/templates/item-template.directive.mjs +0 -48
  54. package/esm2022/common/templates/no-data-template.directive.mjs +0 -49
  55. package/esm2022/common/templates/tag-template.directive.mjs +0 -46
  56. package/esm2022/common/templates/value-template.directive.mjs +0 -50
  57. package/esm2022/common/util.mjs +0 -376
  58. package/esm2022/directives.mjs +0 -172
  59. package/esm2022/dropdownlist/dropdownlist.component.mjs +0 -1999
  60. package/esm2022/dropdownlist/dropdownlist.module.mjs +0 -79
  61. package/esm2022/dropdowns.module.mjs +0 -76
  62. package/esm2022/dropdowntrees/checked-state/base-check.directive.mjs +0 -76
  63. package/esm2022/dropdowntrees/checked-state/check-all.directive.mjs +0 -170
  64. package/esm2022/dropdowntrees/checked-state/check.directive.mjs +0 -168
  65. package/esm2022/dropdowntrees/checked-state/checkable-settings.mjs +0 -5
  66. package/esm2022/dropdowntrees/checked-state/checked-item.mjs +0 -5
  67. package/esm2022/dropdowntrees/data-binding/dropdowntree/flat-binding.directive.mjs +0 -69
  68. package/esm2022/dropdowntrees/data-binding/dropdowntree/hierarchy-binding.directive.mjs +0 -62
  69. package/esm2022/dropdowntrees/data-binding/multiselecttree/flat-binding.directive.mjs +0 -69
  70. package/esm2022/dropdowntrees/data-binding/multiselecttree/hierarchy-binding.directive.mjs +0 -62
  71. package/esm2022/dropdowntrees/dropdowntree.component.mjs +0 -1967
  72. package/esm2022/dropdowntrees/dropdowntrees.module.mjs +0 -79
  73. package/esm2022/dropdowntrees/expanded-state/expand.directive.mjs +0 -49
  74. package/esm2022/dropdowntrees/lookup/lookup.mjs +0 -5
  75. package/esm2022/dropdowntrees/lookup/lookup.service.mjs +0 -82
  76. package/esm2022/dropdowntrees/multiselecttree.component.mjs +0 -2359
  77. package/esm2022/dropdowntrees/summary-tag/summary-tag.directive.mjs +0 -70
  78. package/esm2022/dropdowntrees/templates/node-template.directive.mjs +0 -31
  79. package/esm2022/index.mjs +0 -55
  80. package/esm2022/multiselect/multiselect.component.mjs +0 -2380
  81. package/esm2022/multiselect/multiselect.module.mjs +0 -79
  82. package/esm2022/multiselect/summary-tag.directive.mjs +0 -68
  83. package/esm2022/package-metadata.mjs +0 -16
  84. package/esm2022/progress-kendo-angular-dropdowns.mjs +0 -8
@@ -1,1687 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Component, Renderer2, forwardRef, ElementRef, Input, Output, EventEmitter, ContentChild, ViewChild, ViewContainerRef, TemplateRef, HostBinding, isDevMode, ChangeDetectorRef, NgZone, Injector } from '@angular/core';
6
- import { isDocumentAvailable, KendoInput, hasObservers, SuffixTemplateDirective, PrefixTemplateDirective, isControlRequired, SeparatorComponent, ResizeSensorComponent, TemplateContextDirective, guid, normalizeKeys, parseCSSClassNames } from '@progress/kendo-angular-common';
7
- import { AdaptiveService } from '@progress/kendo-angular-utils';
8
- import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
9
- import { validatePackage } from '@progress/kendo-licensing';
10
- import { packageMetadata } from '../package-metadata';
11
- import { SearchBarComponent } from '../common/searchbar.component';
12
- import { ItemTemplateDirective } from '../common/templates/item-template.directive';
13
- import { HeaderTemplateDirective } from '../common/templates/header-template.directive';
14
- import { FooterTemplateDirective } from '../common/templates/footer-template.directive';
15
- import { GroupTemplateDirective } from '../common/templates/group-template.directive';
16
- import { FixedGroupTemplateDirective } from '../common/templates/fixed-group-template.directive';
17
- import { SelectionService } from '../common/selection/selection.service';
18
- import { NavigationService } from '../common/navigation/navigation.service';
19
- import { DisabledItemsService } from '../common/disabled-items/disabled-items.service';
20
- import { Subject, Subscription, merge } from 'rxjs';
21
- import { isPresent, getter, isUntouched, noop, inDropDown, getSizeClass, getRoundedClass, getFillModeClass, isTruthy, setListBoxAriaLabelledBy, setActionSheetTitle, animationDuration } from '../common/util';
22
- import { NavigationAction } from '../common/navigation/navigation-action';
23
- import { NoDataTemplateDirective } from '../common/templates/no-data-template.directive';
24
- import { PreventableEvent } from '../common/models/preventable-event';
25
- import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
26
- import { PopupService } from '@progress/kendo-angular-popup';
27
- import { FilterableComponent } from '../common/filtering/filterable-component';
28
- import { DataService } from '../common/data.service';
29
- import { ListComponent } from '../common/list.component';
30
- import { normalizeVirtualizationSettings } from '../common/models/virtualization-settings';
31
- import { xIcon } from '@progress/kendo-svg-icons';
32
- import { AdaptiveRendererComponent } from '../common/adaptive-renderer.component';
33
- import { NgTemplateOutlet } from '@angular/common';
34
- import { SharedDropDownEventsDirective } from '../common/shared-events.directive';
35
- import { LocalizedMessagesDirective } from '../common/localization/localized-messages.directive';
36
- import { IconWrapperComponent } from '@progress/kendo-angular-icons';
37
- import { touchEnabled } from '@progress/kendo-common';
38
- import * as i0 from "@angular/core";
39
- import * as i1 from "@progress/kendo-angular-l10n";
40
- import * as i2 from "../common/data.service";
41
- import * as i3 from "@progress/kendo-angular-popup";
42
- import * as i4 from "../common/selection/selection.service";
43
- import * as i5 from "../common/navigation/navigation.service";
44
- import * as i6 from "../common/disabled-items/disabled-items.service";
45
- import * as i7 from "@progress/kendo-angular-utils";
46
- const NO_VALUE = "";
47
- const DEFAULT_SIZE = 'medium';
48
- const DEFAULT_ROUNDED = 'medium';
49
- const DEFAULT_FILL_MODE = 'solid';
50
- /**
51
- * @hidden
52
- */
53
- export const AUTOCOMPLETE_VALUE_ACCESSOR = {
54
- multi: true,
55
- provide: NG_VALUE_ACCESSOR,
56
- useExisting: forwardRef(() => AutoCompleteComponent)
57
- };
58
- /**
59
- * Represents the [Kendo UI AutoComplete component for Angular]({% slug overview_autocomplete %}).
60
- *
61
- * @example
62
- * ```html
63
- * <kendo-autocomplete
64
- * [data]="['Item1', 'Item2', 'Item3']"
65
- * placeholder="placeholder">
66
- * </kendo-autocomplete>
67
- * ```
68
- *
69
- * @remarks
70
- * Supported children components are: {@link CustomMessagesComponent}.
71
- */
72
- export class AutoCompleteComponent {
73
- localization;
74
- dataService;
75
- popupService;
76
- selectionService;
77
- navigationService;
78
- disabledItemsService;
79
- _zone;
80
- cdr;
81
- renderer;
82
- hostElement;
83
- injector;
84
- adaptiveService;
85
- /**
86
- * @hidden
87
- */
88
- animationDuration = animationDuration;
89
- /**
90
- * @hidden
91
- */
92
- xIcon = xIcon;
93
- /**
94
- * @hidden
95
- */
96
- adaptiveRendererComponent;
97
- /**
98
- * @hidden
99
- */
100
- get actionSheet() {
101
- return this.adaptiveRendererComponent?.actionSheet;
102
- }
103
- /**
104
- * @hidden
105
- */
106
- get actionSheetSearchBar() {
107
- return this.adaptiveRendererComponent?.actionSheetSearchBar;
108
- }
109
- get width() {
110
- let wrapperOffsetWidth = 0;
111
- if (isDocumentAvailable()) {
112
- wrapperOffsetWidth = this.wrapper.offsetWidth;
113
- }
114
- const width = this.popupSettings.width || wrapperOffsetWidth;
115
- const minWidth = isNaN(wrapperOffsetWidth) ? wrapperOffsetWidth : `${wrapperOffsetWidth}px`;
116
- const maxWidth = isNaN(width) ? width : `${width}px`;
117
- return { min: minWidth, max: maxWidth };
118
- }
119
- get height() {
120
- const popupHeight = this.popupSettings.height;
121
- return isPresent(popupHeight) ? `${popupHeight}px` : 'auto';
122
- }
123
- get listContainerClasses() {
124
- const containerClasses = ['k-list-container', 'k-autocomplete-popup'];
125
- if (!this.popupSettings.popupClass) {
126
- return containerClasses;
127
- }
128
- const parsedPopupClasses = parseCSSClassNames(this.popupSettings.popupClass);
129
- if (parsedPopupClasses?.length) {
130
- containerClasses.push(...parsedPopupClasses);
131
- }
132
- return containerClasses;
133
- }
134
- get suggestion() {
135
- if (!this.text || !this.suggestedText) {
136
- this.suggestedText = undefined;
137
- return;
138
- }
139
- const hasMatch = this.suggestedText.toLowerCase().startsWith(this.text.toLowerCase());
140
- const shouldSuggest = this.suggest && !this.backspacePressed;
141
- if (shouldSuggest && hasMatch) {
142
- return this.suggestedText;
143
- }
144
- }
145
- get appendTo() {
146
- const { appendTo } = this.popupSettings;
147
- if (!appendTo || appendTo === 'root') {
148
- return undefined;
149
- }
150
- return appendTo === 'component' ? this.container : appendTo;
151
- }
152
- /**
153
- * @hidden
154
- */
155
- get clearButtonVisibility() {
156
- if (touchEnabled) {
157
- return 'visible';
158
- }
159
- }
160
- /**
161
- * @hidden
162
- */
163
- get ariaControls() {
164
- return this.isOpen ? this.listBoxId : undefined;
165
- }
166
- /**
167
- * @hidden
168
- */
169
- get isControlRequired() {
170
- return isControlRequired(this.formControl);
171
- }
172
- /**
173
- * @hidden
174
- */
175
- dataItem;
176
- /**
177
- * Toggles the visibility of the popup or actionSheet.
178
- * If you use the `toggle` method to open or close the popup or actionSheet, the `open` and `close` events will not be fired.
179
- *
180
- * @param open - The state of the popup.
181
- */
182
- toggle(open) {
183
- Promise.resolve(null).then(() => {
184
- const shouldOpen = isPresent(open) ? open : !this._open;
185
- this._toggle(shouldOpen);
186
- });
187
- }
188
- /**
189
- * Returns the current open state. Returns `true` if the popup or actionSheet is open.
190
- */
191
- get isOpen() {
192
- return isTruthy(this._open || this.isActionSheetExpanded);
193
- }
194
- /**
195
- * @hidden
196
- */
197
- handleClick() {
198
- this.windowSize = this.adaptiveService.size;
199
- if (this.isAdaptive) {
200
- this.togglePopup(true);
201
- }
202
- }
203
- /**
204
- * @hidden
205
- */
206
- togglePopup(open) {
207
- const isDisabled = this.disabled || this.readonly;
208
- const sameState = this.isOpen === open;
209
- if (isDisabled || sameState) {
210
- return;
211
- }
212
- const isDefaultPrevented = this.triggerPopupEvents(open);
213
- if (!isDefaultPrevented) {
214
- this._toggle(open);
215
- }
216
- }
217
- get activeDescendant() {
218
- if (!this.isOpen || !isPresent(this.selectionService.focused) || this.selectionService.focused === -1) {
219
- return null;
220
- }
221
- return this.optionPrefix + "-" + this.selectionService.focused;
222
- }
223
- /**
224
- * Defines whether the first match from the suggestions list will be automatically focused.
225
- * By default, `highlightFirst` is set to `true`.
226
- *
227
- * @default true
228
- */
229
- highlightFirst = true;
230
- /**
231
- * Shows or hides the current group sticky header when using grouped data.
232
- * By default, the sticky header is displayed ([see example]({% slug grouping_autocomplete %}#toc-sticky-header)).
233
- *
234
- * @default true
235
- */
236
- showStickyHeader = true;
237
- /**
238
- * @hidden
239
- */
240
- focusableId = `k-${guid()}`;
241
- /**
242
- * Sets the data of the AutoComplete.
243
- *
244
- * > The data has to be provided in an array-like list.
245
- */
246
- set data(data) {
247
- this.dataService.data = data || [];
248
- if (this.virtual) {
249
- this.virtual.skip = 0;
250
- }
251
- if (this.filterable) {
252
- this.selectionService.focused = this.isOpen && this.data.length && this.highlightFirst ? this.firstFocusableIndex(0) : -1;
253
- }
254
- if (this.suggest && this.dataService.itemsCount > 0) {
255
- this.suggestedText = getter(this.dataService.itemAt(0), this.valueField);
256
- }
257
- }
258
- get data() {
259
- const virtual = this.virtual;
260
- if (virtual) {
261
- const start = virtual.skip || 0;
262
- const end = start + virtual.pageSize;
263
- // Use length instead of itemsCount because of the grouping.
264
- virtual.total = this.dataService.data.length;
265
- return this.dataService.data.slice(start, end);
266
- }
267
- return this.dataService.data;
268
- }
269
- /**
270
- * Sets the value of the AutoComplete.
271
- */
272
- set value(newValue) {
273
- this.verifySettings(newValue);
274
- this._value = newValue || NO_VALUE;
275
- this.text = this.value;
276
- this.cdr.markForCheck();
277
- }
278
- get value() {
279
- return this._value || NO_VALUE;
280
- }
281
- /**
282
- * Specifies the `string` property of the data item that represents the item value.
283
- * If the data contains only primitive values, do not define it.
284
- *
285
- * > The `valueField` property can be set to point to a nested property value - e.g. `category.name`.
286
- */
287
- valueField;
288
- /**
289
- * Sets the placeholder of the AutoComplete.
290
- *
291
- * @default ""
292
- */
293
- placeholder = "";
294
- /**
295
- * Enables or disables the adaptive mode. By default, the adaptive rendering is disabled.
296
- *
297
- * @default 'none'
298
- */
299
- adaptiveMode = 'none';
300
- /**
301
- * Sets the title of the ActionSheet that renders instead of the Popup when using small screen devices.
302
- * By default, the ActionSheet title uses the text provided for the label of the AutoComplete.
303
- *
304
- * @default ''
305
- */
306
- adaptiveTitle = '';
307
- /**
308
- * Sets the subtitle of the ActionSheet that renders instead of the Popup when using small screen devices.
309
- * By default, the ActionSheet does not render a subtitle.
310
- */
311
- adaptiveSubtitle;
312
- /**
313
- * @hidden
314
- */
315
- get isAdaptiveModeEnabled() {
316
- return this.adaptiveMode === 'auto';
317
- }
318
- /**
319
- * Configures the popup of the AutoComplete.
320
- *
321
- * The available options are:
322
- * - `animate: Boolean`&mdash;Controls the popup animation. By default, the open and close animations are enabled.
323
- * - `width: Number | String`&mdash;Sets the width of the popup container. By default, the width of the host element is used. If set to `auto`, the component automatically adjusts the width of the popup and no item labels are wrapped. The `auto` mode is not supported when virtual scrolling is enabled.
324
- * - `height: Number`&mdash;Sets the height of the popup container.
325
- * - `popupClass: String`&mdash;Specifies a list of CSS classes that are used to style the popup.
326
- * - `appendTo: "root" | "component" | ViewContainerRef`&mdash;Specifies the component to which the popup will be appended.
327
- */
328
- set popupSettings(settings) {
329
- this._popupSettings = Object.assign({ animate: true }, settings);
330
- }
331
- get popupSettings() {
332
- return this._popupSettings;
333
- }
334
- /**
335
- * Sets the height of the options list in the popup. By default, `listHeight` is 200px.
336
- *
337
- * > The `listHeight` property affects only the list of options and not the whole popup container.
338
- * > To set the height of the popup container, use `popupSettings.height`.
339
- *
340
- * When using `adaptiveMode` and the screen size is `small` or `medium`, the `listHeight` property is set to null.
341
- * @default 200
342
- */
343
- set listHeight(_listHeight) {
344
- this._listHeight = _listHeight;
345
- }
346
- get listHeight() {
347
- if (this.isAdaptive) {
348
- return;
349
- }
350
- return this._listHeight;
351
- }
352
- _listHeight = 200;
353
- /**
354
- * Sets and gets the loading state of the AutoComplete.
355
- *
356
- * @default false
357
- */
358
- loading;
359
- /**
360
- * @hidden
361
- *
362
- * If set to `true`, renders a button on hovering over the component.
363
- * Clicking this button resets the value of the component to `undefined` and triggers the `change` event.
364
- *
365
- * @default true
366
- */
367
- clearButton = true;
368
- /**
369
- * Enables the auto-completion of the text based on the first data item.
370
- *
371
- * @default false
372
- */
373
- suggest;
374
- /**
375
- * Sets the disabled state of the component. To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_autocomplete#toc-managing-the-autocomplete-disabled-state-in-reactive-forms).
376
- *
377
- * @default false
378
- */
379
- disabled = false;
380
- /**
381
- * Defines a Boolean function that is executed for each data item in the component
382
- * ([see examples]({% slug disableditems_autocomplete %})).
383
- * Determines whether the item will be disabled.
384
- */
385
- set itemDisabled(fn) {
386
- if (typeof fn !== 'function') {
387
- throw new Error(`itemDisabled must be a function, but received ${JSON.stringify(fn)}.`);
388
- }
389
- this.disabledItemsService.itemDisabled = fn;
390
- }
391
- /**
392
- * Sets the read-only state of the component.
393
- *
394
- * @default false
395
- */
396
- readonly = false;
397
- /**
398
- * Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
399
- *
400
- * @default 0
401
- */
402
- tabindex = 0;
403
- /**
404
- * @hidden
405
- */
406
- set tabIndex(tabIndex) {
407
- this.tabindex = tabIndex;
408
- }
409
- get tabIndex() {
410
- return this.tabindex;
411
- }
412
- /**
413
- * Enables the [filtering]({% slug filtering_autocomplete %}) functionality.
414
- * If set to `true`, the component emits the `filterChange` event.
415
- *
416
- * @default false
417
- */
418
- filterable = false;
419
- /**
420
- * Enables the [virtualization]({% slug virtualization_autocomplete %}) functionality.
421
- *
422
- * @default false
423
- */
424
- set virtual(settings) {
425
- this._virtualSettings = normalizeVirtualizationSettings(settings);
426
- }
427
- get virtual() {
428
- return this._virtualSettings;
429
- }
430
- /**
431
- * Sets the size of the component.
432
- *
433
- * @default 'medium'
434
- */
435
- set size(size) {
436
- const newSize = size ? size : DEFAULT_SIZE;
437
- this.renderer.removeClass(this.wrapper, getSizeClass('input', this.size));
438
- if (size !== 'none') {
439
- this.renderer.addClass(this.wrapper, getSizeClass('input', newSize));
440
- }
441
- this._size = newSize;
442
- }
443
- get size() {
444
- return this._size;
445
- }
446
- /**
447
- * Sets the border radius of the component.
448
- *
449
- * @default 'medium'
450
- */
451
- set rounded(rounded) {
452
- const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
453
- this.renderer.removeClass(this.wrapper, getRoundedClass(this.rounded));
454
- if (rounded !== 'none') {
455
- this.renderer.addClass(this.wrapper, getRoundedClass(newRounded));
456
- }
457
- this._rounded = newRounded;
458
- }
459
- get rounded() {
460
- return this._rounded;
461
- }
462
- /**
463
- * Sets the fillMode of the component.
464
- *
465
- * @default 'solid'
466
- */
467
- set fillMode(fillMode) {
468
- const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE;
469
- this.renderer.removeClass(this.wrapper, getFillModeClass('input', this.fillMode));
470
- if (fillMode !== 'none') {
471
- this.renderer.addClass(this.wrapper, getFillModeClass('input', newFillMode));
472
- }
473
- this._fillMode = newFillMode;
474
- }
475
- get fillMode() {
476
- return this._fillMode;
477
- }
478
- /**
479
- * Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.
480
- */
481
- inputAttributes;
482
- /**
483
- * Fires each time the value changes&mdash;
484
- * when the component is blurred or the value is cleared through the **Clear** button
485
- * ([see example](slug:events_autocomplete)).
486
- * When the value of the component is programmatically changed to `ngModel` or `formControl`
487
- * through its API or form binding, the `valueChange` event is not triggered because it
488
- * might cause a mix-up with the built-in `valueChange` mechanisms of the `ngModel` or `formControl` bindings.
489
- */
490
- valueChange = new EventEmitter();
491
- /**
492
- * Fires each time the user types in the input field.
493
- * You can filter the source based on the passed filtration value
494
- * ([see example](slug:events_autocomplete)).
495
- */
496
- filterChange = new EventEmitter();
497
- /**
498
- * Fires each time the popup is about to open.
499
- * This event is preventable. If you cancel it, the popup remains closed.
500
- */
501
- open = new EventEmitter();
502
- /**
503
- * Fires after the popup opens.
504
- */
505
- opened = new EventEmitter();
506
- /**
507
- * Fires each time the popup is about to close.
508
- * This event is preventable. If you cancel it, the popup remains open.
509
- */
510
- close = new EventEmitter();
511
- /**
512
- * Fires after the popup closes.
513
- */
514
- closed = new EventEmitter();
515
- /**
516
- * Fires each time the user focuses the AutoComplete.
517
- */
518
- onFocus = new EventEmitter();
519
- /**
520
- * Fires each time the AutoComplete gets blurred.
521
- */
522
- onBlur = new EventEmitter();
523
- /**
524
- * Fires each time the user focuses the `input` element.
525
- */
526
- inputFocus = new EventEmitter();
527
- /**
528
- * Fires each time the `input` element gets blurred.
529
- */
530
- inputBlur = new EventEmitter();
531
- template;
532
- headerTemplate;
533
- footerTemplate;
534
- noDataTemplate;
535
- groupTemplate;
536
- fixedGroupTemplate;
537
- /**
538
- * @hidden
539
- */
540
- suffixTemplate;
541
- /**
542
- * @hidden
543
- */
544
- prefixTemplate;
545
- container;
546
- popupTemplate;
547
- searchbar;
548
- optionsList;
549
- widgetClasses = true;
550
- get isFocused() {
551
- return this._isFocused;
552
- }
553
- set isFocused(isFocused) {
554
- this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper, "k-focus");
555
- this._isFocused = isFocused;
556
- }
557
- get isDisabled() {
558
- return this.disabled;
559
- }
560
- get isLoading() {
561
- return this.loading;
562
- }
563
- get dir() {
564
- return this.direction;
565
- }
566
- text;
567
- listBoxId = `k-${guid()}`;
568
- optionPrefix = `k-${guid()}`;
569
- popupRef;
570
- /**
571
- * @hidden
572
- */
573
- windowSize = 'large';
574
- /**
575
- * @hidden
576
- */
577
- get isActionSheetExpanded() {
578
- return this.actionSheet?.expanded;
579
- }
580
- /**
581
- * @hidden
582
- */
583
- get isAdaptive() {
584
- return this.isAdaptiveModeEnabled && this.windowSize !== 'large';
585
- }
586
- /**
587
- * @hidden
588
- */
589
- get formControl() {
590
- const ngControl = this.injector.get(NgControl, null);
591
- return ngControl?.control || null;
592
- }
593
- onChangeCallback = noop;
594
- onTouchedCallback = noop;
595
- constructor(localization, dataService, popupService, selectionService, navigationService, disabledItemsService, _zone, cdr, renderer, hostElement, injector, adaptiveService) {
596
- this.localization = localization;
597
- this.dataService = dataService;
598
- this.popupService = popupService;
599
- this.selectionService = selectionService;
600
- this.navigationService = navigationService;
601
- this.disabledItemsService = disabledItemsService;
602
- this._zone = _zone;
603
- this.cdr = cdr;
604
- this.renderer = renderer;
605
- this.hostElement = hostElement;
606
- this.injector = injector;
607
- this.adaptiveService = adaptiveService;
608
- validatePackage(packageMetadata);
609
- this.direction = localization.rtl ? 'rtl' : 'ltr';
610
- this.wrapper = this.hostElement.nativeElement;
611
- this.data = [];
612
- this.subscribeEvents();
613
- this.subscribeTouchEvents();
614
- this.selectionService.resetSelection([-1]);
615
- }
616
- ngOnInit() {
617
- this.renderer.removeAttribute(this.wrapper, "tabindex");
618
- this.subs.add(this.localization
619
- .changes
620
- .subscribe(({ rtl }) => {
621
- this.direction = rtl ? 'rtl' : 'ltr';
622
- this.cdr.detectChanges();
623
- }));
624
- this.setComponentClasses();
625
- }
626
- ngAfterViewInit() {
627
- this.windowSize = this.adaptiveService.size;
628
- this.cdr.detectChanges();
629
- }
630
- ngOnDestroy() {
631
- this.destroyPopup();
632
- this.subs.unsubscribe();
633
- if (this.touchstartDisposeHandler) {
634
- this.touchstartDisposeHandler();
635
- }
636
- }
637
- ngOnChanges(changes) {
638
- const virtual = this.virtual;
639
- const requestInitialData = virtual && changes['data'] && changes['data'].isFirstChange();
640
- if (requestInitialData) {
641
- this.pageChange({ skip: 0, take: virtual.pageSize });
642
- }
643
- }
644
- /**
645
- * Resets the value of the AutoComplete.
646
- * If you use the `reset` method to clear the value of the component,
647
- * the model will not update automatically and the `valueChange` event will not be fired.
648
- */
649
- reset() {
650
- this.value = NO_VALUE;
651
- }
652
- /**
653
- * @hidden
654
- */
655
- messageFor(key) {
656
- return this.localization.get(key);
657
- }
658
- /**
659
- * @hidden
660
- */
661
- clearValue(event) {
662
- event.stopImmediatePropagation();
663
- this.focus();
664
- this.change(NO_VALUE);
665
- if (this.filterable) {
666
- this.filterChange.emit('');
667
- }
668
- this.selectionService.resetSelection([]);
669
- }
670
- /**
671
- * @hidden
672
- */
673
- writeValue(value) {
674
- this.value = value;
675
- }
676
- /**
677
- * @hidden
678
- */
679
- registerOnChange(fn) {
680
- this.onChangeCallback = fn;
681
- }
682
- /**
683
- * @hidden
684
- */
685
- registerOnTouched(fn) {
686
- this.onTouchedCallback = fn;
687
- }
688
- /**
689
- * @hidden
690
- */
691
- setDisabledState(isDisabled) {
692
- this.cdr.markForCheck();
693
- this.disabled = isDisabled;
694
- }
695
- /**
696
- * Focuses a specific item of the AutoComplete based on a provided index.
697
- * If null or invalid index is provided the focus will be removed.
698
- */
699
- focusItemAt(index) {
700
- const isInRange = index >= 0 && index < this.data.length;
701
- if (isPresent(index) && isInRange && !this.disabledItemsService.isIndexDisabled(index)) {
702
- this.selectionService.focus(index);
703
- }
704
- else {
705
- this.selectionService.focus(-1);
706
- }
707
- }
708
- /**
709
- * Focuses the AutoComplete.
710
- */
711
- focus() {
712
- if (!this.disabled) {
713
- this.searchbar.focus();
714
- }
715
- }
716
- /**
717
- * Blurs the AutoComplete.
718
- */
719
- blur() {
720
- if (!this.disabled) {
721
- this.searchbar.blur();
722
- }
723
- }
724
- /**
725
- * @hidden
726
- */
727
- onResize() {
728
- const currentWindowSize = this.adaptiveService.size;
729
- if (this.isAdaptiveModeEnabled && this.windowSize !== currentWindowSize) {
730
- if (this.isOpen) {
731
- this.togglePopup(false);
732
- }
733
- this.windowSize = currentWindowSize;
734
- this.cdr.detectChanges();
735
- }
736
- if (this._open && !this.isActionSheetExpanded) {
737
- const popupWrapper = this.popupRef.popupElement;
738
- const { min, max } = this.width;
739
- popupWrapper.style.minWidth = min;
740
- popupWrapper.style.width = max;
741
- }
742
- }
743
- emitChange(value) {
744
- this.onChangeCallback(value);
745
- this.valueChange.emit(value);
746
- }
747
- verifySettings(newValue) {
748
- if (!isDevMode()) {
749
- return;
750
- }
751
- if (isPresent(newValue) && typeof newValue !== "string") {
752
- throw new Error("Expected value of type string. See https://www.telerik.com/kendo-angular-ui/components/dropdowns/autocomplete/value-binding/");
753
- }
754
- }
755
- search(text, startFrom = 0) {
756
- const index = this.findIndex(text, startFrom);
757
- if (this.disabledItemsService.isIndexDisabled(index)) {
758
- if (index + 1 < this.dataService.itemsCount) {
759
- this.search(text, index + 1);
760
- }
761
- else {
762
- this.selectionService.focus(-1);
763
- }
764
- }
765
- else {
766
- this.selectionService.focus(index);
767
- if (this.suggest) {
768
- this.suggestedText = getter(this.dataService.itemAt(index), this.valueField);
769
- }
770
- }
771
- }
772
- navigate(index) {
773
- if (!this.isOpen) {
774
- return;
775
- }
776
- this.selectionService.focus(index);
777
- }
778
- /**
779
- * @hidden
780
- */
781
- handleNavigate(event) {
782
- const focused = isNaN(this.selectionService.focused) ? this.firstFocusableIndex(0) : this.selectionService.focused;
783
- if (this.disabled || this.readonly || isNaN(focused)) {
784
- return;
785
- }
786
- const action = this.navigationService.process({
787
- current: focused,
788
- max: this.dataService.itemsCount - 1,
789
- min: 0,
790
- originalEvent: event
791
- });
792
- if (action !== NavigationAction.Undefined &&
793
- action !== NavigationAction.Backspace &&
794
- action !== NavigationAction.Delete &&
795
- action !== NavigationAction.Home &&
796
- action !== NavigationAction.End &&
797
- action !== NavigationAction.Left &&
798
- action !== NavigationAction.Right &&
799
- action !== NavigationAction.PageDown &&
800
- action !== NavigationAction.PageUp &&
801
- ((action === NavigationAction.Enter && this.isOpen) || action !== NavigationAction.Enter)) {
802
- event.preventDefault();
803
- }
804
- if (action === NavigationAction.Tab && this.isActionSheetExpanded) {
805
- event.stopImmediatePropagation();
806
- this.togglePopup(false);
807
- }
808
- }
809
- handleEnter(event) {
810
- const focused = this.selectionService.focused;
811
- let value;
812
- if (this.isOpen) {
813
- event.originalEvent.preventDefault();
814
- }
815
- if (focused >= 0) {
816
- value = getter(this.dataService.itemAt(focused), this.valueField);
817
- }
818
- else {
819
- const match = this.suggest && this.suggestedText && this.data.length &&
820
- getter(this.dataService.itemAt(0), this.valueField).toLowerCase() === this.searchbar.value.toLowerCase();
821
- if (this.isOpen && match) {
822
- value = this.suggestedText;
823
- }
824
- else {
825
- value = this.searchbar.value;
826
- }
827
- }
828
- if (this.isActionSheetExpanded && focused >= 0) {
829
- this.togglePopup(false);
830
- }
831
- this.change(value);
832
- }
833
- handleEscape() {
834
- if (this.isOpen) {
835
- this.togglePopup(false);
836
- }
837
- else {
838
- this.value = '';
839
- }
840
- this.selectionService.focused = -1;
841
- this.suggestedText = null;
842
- }
843
- /**
844
- * @hidden
845
- */
846
- searchBarChange(text) {
847
- const currentTextLength = isPresent(this.text) ? this.text.length : 0;
848
- this.backspacePressed = Boolean(text.length < currentTextLength);
849
- this.text = text;
850
- this.togglePopup(text.length > 0);
851
- if (!this.highlightFirst) {
852
- this.selectionService.focused = -1;
853
- }
854
- if (this.filterable) {
855
- this.filterChange.emit(text);
856
- }
857
- else if (this.highlightFirst) {
858
- this.search(text);
859
- }
860
- }
861
- /**
862
- * @hidden
863
- */
864
- handleInputFocus() {
865
- this.handleFocus();
866
- if (hasObservers(this.inputFocus)) {
867
- this._zone.run(() => {
868
- this.inputFocus.emit();
869
- });
870
- }
871
- }
872
- /**
873
- * @hidden
874
- */
875
- handleFocus() {
876
- this._zone.run(() => {
877
- if (!this.isFocused && hasObservers(this.onFocus)) {
878
- this.onFocus.emit();
879
- }
880
- this.isFocused = true;
881
- });
882
- }
883
- /**
884
- * @hidden
885
- */
886
- handleBlur() {
887
- if (!this.isActionSheetExpanded) {
888
- this.blurComponent();
889
- }
890
- }
891
- /**
892
- * @hidden
893
- */
894
- handleInputBlur() {
895
- if (!this.isActionSheetExpanded) {
896
- const focused = this.filterable ? this.selectionService.focused : -1;
897
- this.searchbar.input.nativeElement.scrollLeft = 0; // Firefox doesn't auto-scroll to the left on blur like other browsers
898
- let dataItem;
899
- let text;
900
- if (focused !== -1) {
901
- dataItem = this.dataService.itemAt(focused);
902
- text = getter(dataItem, this.valueField) || "";
903
- }
904
- else {
905
- text = this.searchbar.value;
906
- }
907
- const exactMatch = text === this.searchbar.value;
908
- const insensitiveMatch = text.toLowerCase() === this.searchbar.value.toLowerCase();
909
- if (!exactMatch && insensitiveMatch) {
910
- this.selectionService.resetSelection([]);
911
- }
912
- const valueHasChanged = this.value !== this.text;
913
- const runInZone = hasObservers(this.inputBlur) ||
914
- hasObservers(this.close) ||
915
- isUntouched(this.wrapper) ||
916
- valueHasChanged ||
917
- this.formControl?.updateOn === 'blur';
918
- if (runInZone) {
919
- this._zone.run(() => {
920
- if (valueHasChanged) {
921
- this.change(this.searchbar.value);
922
- }
923
- this.inputBlur.emit();
924
- this.onTouchedCallback();
925
- this.togglePopup(false);
926
- });
927
- }
928
- else {
929
- this.togglePopup(false);
930
- }
931
- }
932
- }
933
- /**
934
- * @hidden
935
- */
936
- pageChange(event) {
937
- const virtual = this.virtual;
938
- virtual.skip = event.skip;
939
- }
940
- /**
941
- * @hidden
942
- */
943
- closeActionSheet() {
944
- this.blurComponent();
945
- this.closed.emit();
946
- }
947
- change(value) {
948
- this.togglePopup(false);
949
- this.valueChangeSubject.next(value);
950
- }
951
- popupMouseDownHandler = (event) => event.preventDefault();
952
- _popupSettings = { animate: true };
953
- _virtualSettings;
954
- _open = false;
955
- _value = "";
956
- suggestedText;
957
- backspacePressed;
958
- subs = new Subscription();
959
- valueChangeSubject = new Subject();
960
- touchstartDisposeHandler;
961
- wrapper;
962
- _isFocused = false;
963
- direction;
964
- _size = 'medium';
965
- _rounded = 'medium';
966
- _fillMode = 'solid';
967
- subscribeEvents() {
968
- if (!isDocumentAvailable()) {
969
- return;
970
- }
971
- this.subs.add(this.valueChangeSubject
972
- .subscribe(value => {
973
- const hasChange = this.value !== value;
974
- if (this.isOpen) {
975
- const index = this.findIndex(value);
976
- this.selectionService.focused = index;
977
- }
978
- this.value = value;
979
- this.text = value;
980
- // emit change after assigning `this.value` => allows the user to modify the component value on `valueChange`
981
- if (hasChange) {
982
- this.emitChange(value);
983
- }
984
- }));
985
- this.subs.add(this.selectionService.onChange.subscribe(this.handleItemChange.bind(this)));
986
- this.subs.add(this.selectionService.onFocus.subscribe(this.handleItemFocus.bind(this)));
987
- this.subs.add(merge(this.navigationService.up, this.navigationService.down).subscribe((event) => this.navigate(event.index)));
988
- this.subs.add(this.navigationService.close.subscribe(() => this.togglePopup(false)));
989
- this.subs.add(this.navigationService.open.subscribe(() => this.togglePopup(true)));
990
- this.subs.add(this.navigationService.enter.subscribe(this.handleEnter.bind(this)));
991
- this.subs.add(this.navigationService.esc.subscribe(this.handleEscape.bind(this)));
992
- this.subs.add(merge(this.navigationService.pagedown, this.navigationService.pageup).subscribe((event) => {
993
- if (this.isOpen) {
994
- event.originalEvent.preventDefault();
995
- const code = normalizeKeys(event.originalEvent);
996
- this.optionsList.scrollWithOnePage(NavigationAction[code]);
997
- }
998
- }));
999
- }
1000
- findIndex(value, startFrom = 0) {
1001
- let index;
1002
- if (value && value.length && this.dataService.itemsCount) {
1003
- index = this.dataService.findIndex(this.findIndexPredicate(value), startFrom);
1004
- }
1005
- else {
1006
- index = -1;
1007
- }
1008
- return index;
1009
- }
1010
- subscribeTouchEvents() {
1011
- if (!isDocumentAvailable() || !touchEnabled) {
1012
- return;
1013
- }
1014
- this._zone.runOutsideAngular(() =>
1015
- // Roll up AutoComplete on iOS when tapped outside
1016
- this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
1017
- const target = e.target;
1018
- if (this.isFocused && !inDropDown(this.hostElement, target, this.popupRef)) {
1019
- this._zone.run(() => this.blur());
1020
- }
1021
- }));
1022
- }
1023
- handleItemChange(event) {
1024
- const index = event.indices.length ? event.indices[0] : undefined;
1025
- this.selectionService.resetSelection([-1]);
1026
- if (!isPresent(index)) {
1027
- return;
1028
- }
1029
- const text = getter(this.dataService.itemAt(index), this.valueField);
1030
- this.change(text);
1031
- }
1032
- handleItemFocus(_event) {
1033
- const focused = this.selectionService.focused;
1034
- const shouldSuggest = Boolean(this.suggest && this.data && this.data.length && focused >= 0);
1035
- if (shouldSuggest) {
1036
- this.suggestedText = getter(this.dataService.itemAt(focused), this.valueField);
1037
- }
1038
- }
1039
- createPopup() {
1040
- if (this.virtual) {
1041
- this.virtual.skip = 0;
1042
- }
1043
- this.windowSize = this.adaptiveService.size;
1044
- if (this.isAdaptive) {
1045
- this.openActionSheet();
1046
- return;
1047
- }
1048
- const horizontalAlign = this.direction === "rtl" ? "right" : "left";
1049
- const anchorPosition = { horizontal: horizontalAlign, vertical: "bottom" };
1050
- const popupPosition = { horizontal: horizontalAlign, vertical: "top" };
1051
- const appendToComponent = typeof this.popupSettings.appendTo === 'string' && this.popupSettings.appendTo === 'component';
1052
- this.popupRef = this.popupService.open({
1053
- anchor: this.wrapper,
1054
- animate: this.popupSettings.animate,
1055
- appendTo: this.appendTo,
1056
- content: this.popupTemplate,
1057
- popupClass: this.listContainerClasses,
1058
- positionMode: appendToComponent ? 'fixed' : 'absolute',
1059
- popupAlign: popupPosition,
1060
- anchorAlign: anchorPosition
1061
- });
1062
- const popupWrapper = this.popupRef.popupElement;
1063
- const { min, max } = this.width;
1064
- popupWrapper.addEventListener('mousedown', this.popupMouseDownHandler);
1065
- popupWrapper.style.minWidth = min;
1066
- popupWrapper.style.width = max;
1067
- popupWrapper.style.height = this.height;
1068
- popupWrapper.setAttribute('dir', this.direction);
1069
- if (!this.appendTo) {
1070
- this.renderer.setAttribute(popupWrapper, 'role', 'region');
1071
- this.renderer.setAttribute(popupWrapper, 'aria-label', this.messageFor('popupLabel'));
1072
- }
1073
- this.subs.add(this.popupRef.popupOpen.subscribe(() => {
1074
- this.cdr.detectChanges();
1075
- if (!this.dataService.grouped) {
1076
- setListBoxAriaLabelledBy(this.optionsList, this.searchbar.input, this.renderer);
1077
- }
1078
- this.optionsList.scrollToItem(this.selectionService.focused);
1079
- this.selectionService.focus(this.selectionService.focused);
1080
- this.opened.emit();
1081
- }));
1082
- this.subs.add(this.popupRef.popupClose.subscribe(() => {
1083
- this.closed.emit();
1084
- }));
1085
- this.subs.add(this.popupRef.popupAnchorViewportLeave.subscribe(() => this.togglePopup(false)));
1086
- }
1087
- destroyPopup() {
1088
- if (this.popupRef) {
1089
- this.popupRef.popupElement
1090
- .removeEventListener('mousedown', this.popupMouseDownHandler);
1091
- this.popupRef.close();
1092
- this.popupRef = null;
1093
- }
1094
- }
1095
- _toggle(open) {
1096
- this._open = open;
1097
- this.destroyPopup();
1098
- if (this.isActionSheetExpanded) {
1099
- this.actionSheet.toggle(false);
1100
- this.focus();
1101
- }
1102
- if (this._open) {
1103
- this.createPopup();
1104
- }
1105
- }
1106
- triggerPopupEvents(open) {
1107
- const eventArgs = new PreventableEvent();
1108
- if (open) {
1109
- this.open.emit(eventArgs);
1110
- }
1111
- else {
1112
- this.close.emit(eventArgs);
1113
- }
1114
- return eventArgs.isDefaultPrevented();
1115
- }
1116
- firstFocusableIndex(index) {
1117
- const maxIndex = this.data.length - 1;
1118
- if (this.disabledItemsService.isIndexDisabled(index)) {
1119
- return (index < maxIndex) ? this.firstFocusableIndex(index + 1) : undefined;
1120
- }
1121
- else {
1122
- return index;
1123
- }
1124
- }
1125
- findIndexPredicate(text) {
1126
- if (this.dataService.grouped) {
1127
- return (item) => {
1128
- let itemText = getter(item.value, this.valueField);
1129
- itemText = !isPresent(itemText) ? "" : itemText.toString().toLowerCase();
1130
- return itemText.startsWith(text.toLowerCase());
1131
- };
1132
- }
1133
- else {
1134
- return (item) => {
1135
- let itemText = getter(item, this.valueField);
1136
- itemText = !isPresent(itemText) ? "" : itemText.toString().toLowerCase();
1137
- return itemText.startsWith(text.toLowerCase());
1138
- };
1139
- }
1140
- }
1141
- setComponentClasses() {
1142
- if (this.size !== 'none') {
1143
- this.renderer.addClass(this.wrapper, getSizeClass('input', this.size));
1144
- }
1145
- if (this.rounded !== 'none') {
1146
- this.renderer.addClass(this.wrapper, getRoundedClass(this.rounded));
1147
- }
1148
- if (this.fillMode !== 'none') {
1149
- this.renderer.addClass(this.wrapper, getFillModeClass('input', this.fillMode));
1150
- }
1151
- }
1152
- openActionSheet() {
1153
- this.actionSheet.toggle(true);
1154
- this.cdr.detectChanges();
1155
- if (!this.dataService.grouped) {
1156
- setListBoxAriaLabelledBy(this.optionsList, this.searchbar.input, this.renderer);
1157
- }
1158
- this.adaptiveTitle = setActionSheetTitle(this.searchbar.input, this.adaptiveTitle);
1159
- this.cdr.detectChanges();
1160
- this.opened.emit();
1161
- this.optionsList.scrollToItem(this.selectionService.focused);
1162
- this.selectionService.focus(this.selectionService.focused);
1163
- this.actionSheetSearchBar.focus();
1164
- }
1165
- blurComponent() {
1166
- this.isFocused = false;
1167
- const valueHasChanged = this.value !== this.text;
1168
- const runInZone = hasObservers(this.onBlur) ||
1169
- hasObservers(this.close) ||
1170
- isUntouched(this.wrapper) ||
1171
- valueHasChanged;
1172
- if (runInZone) {
1173
- this._zone.run(() => {
1174
- if (valueHasChanged) {
1175
- this.change(this.searchbar.value);
1176
- }
1177
- this.onBlur.emit();
1178
- this.onTouchedCallback();
1179
- this.togglePopup(false);
1180
- });
1181
- }
1182
- else {
1183
- this.togglePopup(false);
1184
- }
1185
- }
1186
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AutoCompleteComponent, deps: [{ token: i1.LocalizationService }, { token: i2.DataService }, { token: i3.PopupService }, { token: i4.SelectionService }, { token: i5.NavigationService }, { token: i6.DisabledItemsService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.Injector }, { token: i7.AdaptiveService }], target: i0.ɵɵFactoryTarget.Component });
1187
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: AutoCompleteComponent, isStandalone: true, selector: "kendo-autocomplete", inputs: { highlightFirst: "highlightFirst", showStickyHeader: "showStickyHeader", focusableId: "focusableId", data: "data", value: "value", valueField: "valueField", placeholder: "placeholder", adaptiveMode: "adaptiveMode", adaptiveTitle: "adaptiveTitle", adaptiveSubtitle: "adaptiveSubtitle", popupSettings: "popupSettings", listHeight: "listHeight", loading: "loading", clearButton: "clearButton", suggest: "suggest", disabled: "disabled", itemDisabled: "itemDisabled", readonly: "readonly", tabindex: "tabindex", tabIndex: "tabIndex", filterable: "filterable", virtual: "virtual", size: "size", rounded: "rounded", fillMode: "fillMode", inputAttributes: "inputAttributes" }, outputs: { valueChange: "valueChange", filterChange: "filterChange", open: "open", opened: "opened", close: "close", closed: "closed", onFocus: "focus", onBlur: "blur", inputFocus: "inputFocus", inputBlur: "inputBlur" }, host: { properties: { "class.k-readonly": "this.readonly", "class.k-autocomplete": "this.widgetClasses", "class.k-input": "this.widgetClasses", "class.k-disabled": "this.isDisabled", "class.k-loading": "this.isLoading", "attr.dir": "this.dir" } }, providers: [
1188
- AUTOCOMPLETE_VALUE_ACCESSOR,
1189
- DataService,
1190
- SelectionService,
1191
- NavigationService,
1192
- DisabledItemsService,
1193
- LocalizationService,
1194
- {
1195
- provide: L10N_PREFIX,
1196
- useValue: 'kendo.autocomplete'
1197
- },
1198
- {
1199
- provide: FilterableComponent,
1200
- useExisting: forwardRef(() => AutoCompleteComponent)
1201
- },
1202
- {
1203
- provide: KendoInput,
1204
- useExisting: forwardRef(() => AutoCompleteComponent)
1205
- }
1206
- ], 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: "adaptiveRendererComponent", first: true, predicate: AdaptiveRendererComponent, 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 }], exportAs: ["kendoAutoComplete"], usesOnChanges: true, ngImport: i0, template: `
1207
- <ng-container kendoAutoCompleteLocalizedMessages
1208
- i18n-noDataText="kendo.autocomplete.noDataText|The text displayed in the popup when there are no items"
1209
- noDataText="NO DATA FOUND"
1210
-
1211
- i18n-clearTitle="kendo.autocomplete.clearTitle|The title of the clear button"
1212
- clearTitle="clear"
1213
-
1214
- i18n-popupLabel="kendo.autocomplete.popupLabel|The label of the popup element that contains the list of options when its role is 'region'"
1215
- popupLabel="Options list"
1216
-
1217
- i18n-adaptiveCloseButtonTitle="kendo.autocomplete.adaptiveCloseButtonTitle|The title of the Close button of the ActionSheet that is rendered instead of the Popup when using small screen devices in adaptive mode"
1218
- adaptiveCloseButtonTitle="Close"
1219
- >
1220
- </ng-container>
1221
-
1222
- <ng-container
1223
- kendoDropDownSharedEvents
1224
- [hostElement]="hostElement"
1225
- [(isFocused)]="isFocused"
1226
- (handleBlur)="handleBlur()"
1227
- (onFocus)="handleFocus()"
1228
- >
1229
- @if (prefixTemplate) {
1230
- <span class="k-input-prefix k-input-prefix-horizontal">
1231
- <ng-template [ngTemplateOutlet]="prefixTemplate?.templateRef">
1232
- </ng-template>
1233
- </span>
1234
- }
1235
- @if (prefixTemplate && prefixTemplate.showSeparator) {
1236
- <kendo-separator></kendo-separator>
1237
- }
1238
- <input
1239
- kendoSearchbar
1240
- [ariaExpanded]="isOpen"
1241
- [isSuggestable]="suggest"
1242
- [isFilterable]="filterable"
1243
- [isLoading]="isLoading"
1244
- [ariaControls]="ariaControls"
1245
- [id]="focusableId"
1246
- [activeDescendant]="activeDescendant"
1247
- [userInput]="text"
1248
- [suggestedText]="suggestion"
1249
- [disabled]="disabled"
1250
- [readonly]="readonly || this.isAdaptive"
1251
- [tabIndex]="tabIndex"
1252
- [isRequired]="isControlRequired"
1253
- [placeholder]="placeholder"
1254
- [inputAttributes]="inputAttributes"
1255
- (onNavigate)="handleNavigate($event)"
1256
- (valueChange)="searchBarChange($event)"
1257
- (onBlur)="handleInputBlur()"
1258
- (onFocus)="handleInputFocus()"
1259
- (click)="handleClick()"
1260
- />
1261
- @if (!loading && !readonly && (clearButton && text?.length)) {
1262
- <span
1263
- class="k-clear-value"
1264
- [style.visibility]="clearButtonVisibility"
1265
- [attr.title]="messageFor('clearTitle')"
1266
- role="button"
1267
- tabindex="-1"
1268
- (click)="clearValue($event)"
1269
- (mousedown)="$event.preventDefault()"
1270
- >
1271
- <kendo-icon-wrapper
1272
- name="x"
1273
- [svgIcon]="xIcon"
1274
- >
1275
- </kendo-icon-wrapper>
1276
- </span>
1277
- }
1278
- @if (loading) {
1279
- <span class="k-icon k-i-loading k-input-loading-icon"></span>
1280
- }
1281
- @if (suffixTemplate && suffixTemplate.showSeparator) {
1282
- <kendo-separator></kendo-separator>
1283
- }
1284
- @if (suffixTemplate) {
1285
- <span class="k-input-suffix k-input-suffix-horizontal">
1286
- <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
1287
- </ng-template>
1288
- </span>
1289
- }
1290
- </ng-container>
1291
-
1292
- <ng-template #popupTemplate>
1293
- <ng-container *ngTemplateOutlet="sharedPopupActionSheetTemplate"></ng-container>
1294
- </ng-template>
1295
- <ng-container #container></ng-container>
1296
- @if (isOpen || isAdaptiveModeEnabled) {
1297
- <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
1298
- }
1299
-
1300
- <kendo-adaptive-renderer
1301
- [sharedPopupActionSheetTemplate]="sharedPopupActionSheetTemplate"
1302
- [title]="adaptiveTitle"
1303
- [showTextInput]="true"
1304
- [subtitle]="adaptiveSubtitle"
1305
- (closePopup)="closeActionSheet()"
1306
- (textInputChange)="searchBarChange($event)"
1307
- (navigate)="handleNavigate($event)"
1308
- [placeholder]="placeholder"
1309
- [searchBarValue]="text">
1310
- </kendo-adaptive-renderer>
1311
-
1312
- <ng-template #sharedPopupActionSheetTemplate>
1313
- <!--header template-->
1314
- @if (headerTemplate) {
1315
- <ng-template
1316
- [templateContext]="{
1317
- templateRef: headerTemplate.templateRef
1318
- }">
1319
- </ng-template>
1320
- }
1321
- <!--list-->
1322
- <kendo-list
1323
- #optionsList
1324
- [size]="isAdaptive ? 'large' : size"
1325
- [rounded]="rounded"
1326
- [id]="listBoxId"
1327
- [optionPrefix]="optionPrefix"
1328
- [data]="data"
1329
- [textField]="valueField"
1330
- [valueField]="valueField"
1331
- [template]="template"
1332
- [groupTemplate]="groupTemplate"
1333
- [fixedGroupTemplate]="fixedGroupTemplate"
1334
- [height]="listHeight"
1335
- [show]="isOpen"
1336
- [virtual]="virtual"
1337
- [showStickyHeader]="showStickyHeader"
1338
- (pageChange)="pageChange($event)"
1339
- >
1340
- </kendo-list>
1341
- <!--no-data template-->
1342
- @if (data.length === 0) {
1343
- <div class="k-no-data">
1344
- @if (noDataTemplate) {
1345
- <ng-template
1346
- [templateContext]="{
1347
- templateRef: noDataTemplate?.templateRef
1348
- }">
1349
- </ng-template>
1350
- }
1351
- @if (!noDataTemplate) {
1352
- <div>{{ messageFor('noDataText') }}</div>
1353
- }
1354
- </div>
1355
- }
1356
- <!--footer template-->
1357
- @if (footerTemplate) {
1358
- <ng-template
1359
- [templateContext]="{
1360
- templateRef: footerTemplate.templateRef
1361
- }">
1362
- </ng-template>
1363
- }
1364
- </ng-template>
1365
- `, 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: 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: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: AdaptiveRendererComponent, selector: "kendo-adaptive-renderer", inputs: ["title", "subtitle", "showTextInput", "sharedPopupActionSheetTemplate", "text", "placeholder", "searchBarValue", "filterable"], outputs: ["closePopup", "textInputChange", "navigate", "onExpand"] }, { 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", "rowWidth", "customItemTemplate", "text", "allowCustom", "defaultItem", "data", "size", "rounded"], outputs: ["onClick", "pageChange", "listResize", "popupListScroll"] }] });
1366
- }
1367
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AutoCompleteComponent, decorators: [{
1368
- type: Component,
1369
- args: [{
1370
- exportAs: 'kendoAutoComplete',
1371
- providers: [
1372
- AUTOCOMPLETE_VALUE_ACCESSOR,
1373
- DataService,
1374
- SelectionService,
1375
- NavigationService,
1376
- DisabledItemsService,
1377
- LocalizationService,
1378
- {
1379
- provide: L10N_PREFIX,
1380
- useValue: 'kendo.autocomplete'
1381
- },
1382
- {
1383
- provide: FilterableComponent,
1384
- useExisting: forwardRef(() => AutoCompleteComponent)
1385
- },
1386
- {
1387
- provide: KendoInput,
1388
- useExisting: forwardRef(() => AutoCompleteComponent)
1389
- }
1390
- ],
1391
- selector: 'kendo-autocomplete',
1392
- template: `
1393
- <ng-container kendoAutoCompleteLocalizedMessages
1394
- i18n-noDataText="kendo.autocomplete.noDataText|The text displayed in the popup when there are no items"
1395
- noDataText="NO DATA FOUND"
1396
-
1397
- i18n-clearTitle="kendo.autocomplete.clearTitle|The title of the clear button"
1398
- clearTitle="clear"
1399
-
1400
- i18n-popupLabel="kendo.autocomplete.popupLabel|The label of the popup element that contains the list of options when its role is 'region'"
1401
- popupLabel="Options list"
1402
-
1403
- i18n-adaptiveCloseButtonTitle="kendo.autocomplete.adaptiveCloseButtonTitle|The title of the Close button of the ActionSheet that is rendered instead of the Popup when using small screen devices in adaptive mode"
1404
- adaptiveCloseButtonTitle="Close"
1405
- >
1406
- </ng-container>
1407
-
1408
- <ng-container
1409
- kendoDropDownSharedEvents
1410
- [hostElement]="hostElement"
1411
- [(isFocused)]="isFocused"
1412
- (handleBlur)="handleBlur()"
1413
- (onFocus)="handleFocus()"
1414
- >
1415
- @if (prefixTemplate) {
1416
- <span class="k-input-prefix k-input-prefix-horizontal">
1417
- <ng-template [ngTemplateOutlet]="prefixTemplate?.templateRef">
1418
- </ng-template>
1419
- </span>
1420
- }
1421
- @if (prefixTemplate && prefixTemplate.showSeparator) {
1422
- <kendo-separator></kendo-separator>
1423
- }
1424
- <input
1425
- kendoSearchbar
1426
- [ariaExpanded]="isOpen"
1427
- [isSuggestable]="suggest"
1428
- [isFilterable]="filterable"
1429
- [isLoading]="isLoading"
1430
- [ariaControls]="ariaControls"
1431
- [id]="focusableId"
1432
- [activeDescendant]="activeDescendant"
1433
- [userInput]="text"
1434
- [suggestedText]="suggestion"
1435
- [disabled]="disabled"
1436
- [readonly]="readonly || this.isAdaptive"
1437
- [tabIndex]="tabIndex"
1438
- [isRequired]="isControlRequired"
1439
- [placeholder]="placeholder"
1440
- [inputAttributes]="inputAttributes"
1441
- (onNavigate)="handleNavigate($event)"
1442
- (valueChange)="searchBarChange($event)"
1443
- (onBlur)="handleInputBlur()"
1444
- (onFocus)="handleInputFocus()"
1445
- (click)="handleClick()"
1446
- />
1447
- @if (!loading && !readonly && (clearButton && text?.length)) {
1448
- <span
1449
- class="k-clear-value"
1450
- [style.visibility]="clearButtonVisibility"
1451
- [attr.title]="messageFor('clearTitle')"
1452
- role="button"
1453
- tabindex="-1"
1454
- (click)="clearValue($event)"
1455
- (mousedown)="$event.preventDefault()"
1456
- >
1457
- <kendo-icon-wrapper
1458
- name="x"
1459
- [svgIcon]="xIcon"
1460
- >
1461
- </kendo-icon-wrapper>
1462
- </span>
1463
- }
1464
- @if (loading) {
1465
- <span class="k-icon k-i-loading k-input-loading-icon"></span>
1466
- }
1467
- @if (suffixTemplate && suffixTemplate.showSeparator) {
1468
- <kendo-separator></kendo-separator>
1469
- }
1470
- @if (suffixTemplate) {
1471
- <span class="k-input-suffix k-input-suffix-horizontal">
1472
- <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
1473
- </ng-template>
1474
- </span>
1475
- }
1476
- </ng-container>
1477
-
1478
- <ng-template #popupTemplate>
1479
- <ng-container *ngTemplateOutlet="sharedPopupActionSheetTemplate"></ng-container>
1480
- </ng-template>
1481
- <ng-container #container></ng-container>
1482
- @if (isOpen || isAdaptiveModeEnabled) {
1483
- <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
1484
- }
1485
-
1486
- <kendo-adaptive-renderer
1487
- [sharedPopupActionSheetTemplate]="sharedPopupActionSheetTemplate"
1488
- [title]="adaptiveTitle"
1489
- [showTextInput]="true"
1490
- [subtitle]="adaptiveSubtitle"
1491
- (closePopup)="closeActionSheet()"
1492
- (textInputChange)="searchBarChange($event)"
1493
- (navigate)="handleNavigate($event)"
1494
- [placeholder]="placeholder"
1495
- [searchBarValue]="text">
1496
- </kendo-adaptive-renderer>
1497
-
1498
- <ng-template #sharedPopupActionSheetTemplate>
1499
- <!--header template-->
1500
- @if (headerTemplate) {
1501
- <ng-template
1502
- [templateContext]="{
1503
- templateRef: headerTemplate.templateRef
1504
- }">
1505
- </ng-template>
1506
- }
1507
- <!--list-->
1508
- <kendo-list
1509
- #optionsList
1510
- [size]="isAdaptive ? 'large' : size"
1511
- [rounded]="rounded"
1512
- [id]="listBoxId"
1513
- [optionPrefix]="optionPrefix"
1514
- [data]="data"
1515
- [textField]="valueField"
1516
- [valueField]="valueField"
1517
- [template]="template"
1518
- [groupTemplate]="groupTemplate"
1519
- [fixedGroupTemplate]="fixedGroupTemplate"
1520
- [height]="listHeight"
1521
- [show]="isOpen"
1522
- [virtual]="virtual"
1523
- [showStickyHeader]="showStickyHeader"
1524
- (pageChange)="pageChange($event)"
1525
- >
1526
- </kendo-list>
1527
- <!--no-data template-->
1528
- @if (data.length === 0) {
1529
- <div class="k-no-data">
1530
- @if (noDataTemplate) {
1531
- <ng-template
1532
- [templateContext]="{
1533
- templateRef: noDataTemplate?.templateRef
1534
- }">
1535
- </ng-template>
1536
- }
1537
- @if (!noDataTemplate) {
1538
- <div>{{ messageFor('noDataText') }}</div>
1539
- }
1540
- </div>
1541
- }
1542
- <!--footer template-->
1543
- @if (footerTemplate) {
1544
- <ng-template
1545
- [templateContext]="{
1546
- templateRef: footerTemplate.templateRef
1547
- }">
1548
- </ng-template>
1549
- }
1550
- </ng-template>
1551
- `,
1552
- standalone: true,
1553
- imports: [LocalizedMessagesDirective, SharedDropDownEventsDirective, NgTemplateOutlet, SeparatorComponent, SearchBarComponent, IconWrapperComponent, ResizeSensorComponent, AdaptiveRendererComponent, TemplateContextDirective, ListComponent]
1554
- }]
1555
- }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.DataService }, { type: i3.PopupService }, { type: i4.SelectionService }, { type: i5.NavigationService }, { type: i6.DisabledItemsService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.Injector }, { type: i7.AdaptiveService }], propDecorators: { adaptiveRendererComponent: [{
1556
- type: ViewChild,
1557
- args: [AdaptiveRendererComponent]
1558
- }], highlightFirst: [{
1559
- type: Input
1560
- }], showStickyHeader: [{
1561
- type: Input
1562
- }], focusableId: [{
1563
- type: Input
1564
- }], data: [{
1565
- type: Input
1566
- }], value: [{
1567
- type: Input
1568
- }], valueField: [{
1569
- type: Input
1570
- }], placeholder: [{
1571
- type: Input
1572
- }], adaptiveMode: [{
1573
- type: Input
1574
- }], adaptiveTitle: [{
1575
- type: Input
1576
- }], adaptiveSubtitle: [{
1577
- type: Input
1578
- }], popupSettings: [{
1579
- type: Input
1580
- }], listHeight: [{
1581
- type: Input
1582
- }], loading: [{
1583
- type: Input
1584
- }], clearButton: [{
1585
- type: Input
1586
- }], suggest: [{
1587
- type: Input
1588
- }], disabled: [{
1589
- type: Input
1590
- }], itemDisabled: [{
1591
- type: Input
1592
- }], readonly: [{
1593
- type: Input
1594
- }, {
1595
- type: HostBinding,
1596
- args: ['class.k-readonly']
1597
- }], tabindex: [{
1598
- type: Input
1599
- }], tabIndex: [{
1600
- type: Input,
1601
- args: ["tabIndex"]
1602
- }], filterable: [{
1603
- type: Input
1604
- }], virtual: [{
1605
- type: Input
1606
- }], size: [{
1607
- type: Input
1608
- }], rounded: [{
1609
- type: Input
1610
- }], fillMode: [{
1611
- type: Input
1612
- }], inputAttributes: [{
1613
- type: Input
1614
- }], valueChange: [{
1615
- type: Output
1616
- }], filterChange: [{
1617
- type: Output
1618
- }], open: [{
1619
- type: Output
1620
- }], opened: [{
1621
- type: Output
1622
- }], close: [{
1623
- type: Output
1624
- }], closed: [{
1625
- type: Output
1626
- }], onFocus: [{
1627
- type: Output,
1628
- args: ['focus']
1629
- }], onBlur: [{
1630
- type: Output,
1631
- args: ['blur']
1632
- }], inputFocus: [{
1633
- type: Output
1634
- }], inputBlur: [{
1635
- type: Output
1636
- }], template: [{
1637
- type: ContentChild,
1638
- args: [ItemTemplateDirective, { static: false }]
1639
- }], headerTemplate: [{
1640
- type: ContentChild,
1641
- args: [HeaderTemplateDirective, { static: false }]
1642
- }], footerTemplate: [{
1643
- type: ContentChild,
1644
- args: [FooterTemplateDirective, { static: false }]
1645
- }], noDataTemplate: [{
1646
- type: ContentChild,
1647
- args: [NoDataTemplateDirective, { static: false }]
1648
- }], groupTemplate: [{
1649
- type: ContentChild,
1650
- args: [GroupTemplateDirective, { static: false }]
1651
- }], fixedGroupTemplate: [{
1652
- type: ContentChild,
1653
- args: [FixedGroupTemplateDirective, { static: false }]
1654
- }], suffixTemplate: [{
1655
- type: ContentChild,
1656
- args: [SuffixTemplateDirective]
1657
- }], prefixTemplate: [{
1658
- type: ContentChild,
1659
- args: [PrefixTemplateDirective]
1660
- }], container: [{
1661
- type: ViewChild,
1662
- args: ['container', { read: ViewContainerRef, static: true }]
1663
- }], popupTemplate: [{
1664
- type: ViewChild,
1665
- args: ['popupTemplate', { static: true }]
1666
- }], searchbar: [{
1667
- type: ViewChild,
1668
- args: [SearchBarComponent, { static: true }]
1669
- }], optionsList: [{
1670
- type: ViewChild,
1671
- args: ['optionsList', { static: false }]
1672
- }], widgetClasses: [{
1673
- type: HostBinding,
1674
- args: ['class.k-autocomplete']
1675
- }, {
1676
- type: HostBinding,
1677
- args: ['class.k-input']
1678
- }], isDisabled: [{
1679
- type: HostBinding,
1680
- args: ['class.k-disabled']
1681
- }], isLoading: [{
1682
- type: HostBinding,
1683
- args: ['class.k-loading']
1684
- }], dir: [{
1685
- type: HostBinding,
1686
- args: ['attr.dir']
1687
- }] } });