@progress/kendo-angular-dropdowns 14.4.0-develop.9 → 15.0.0-develop.2

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.
@@ -18,7 +18,7 @@ import { NavigationService } from '../common/navigation/navigation.service';
18
18
  import { DisabledItemsService } from '../common/disabled-items/disabled-items.service';
19
19
  import { merge, of, Subject, Subscription } from 'rxjs';
20
20
  import { catchError, filter, map, partition, tap, throttleTime } from 'rxjs/operators';
21
- import { isChanged, isDocumentAvailable, KendoInput, hasObservers, anyChanged } from '@progress/kendo-angular-common';
21
+ import { isChanged, isDocumentAvailable, KendoInput, hasObservers, anyChanged, SuffixTemplateDirective, PrefixTemplateDirective } from '@progress/kendo-angular-common';
22
22
  import { isPresent, guid, getter, isEmptyString, isUntouched, inDropDown, getSizeClass, getRoundedClass, getFillModeClass, isTruthy, windowSize, setListBoxAriaLabelLebBy, setActionSheetTitle, updateActionSheetAdaptiveAppearance, animationDuration } from '../common/util';
23
23
  import { NavigationAction } from '../common/navigation/navigation-action';
24
24
  import { Keys } from '@progress/kendo-angular-common';
@@ -41,14 +41,15 @@ import * as i3 from "../common/selection/selection.service";
41
41
  import * as i4 from "../common/navigation/navigation.service";
42
42
  import * as i5 from "../common/disabled-items/disabled-items.service";
43
43
  import * as i6 from "../common/data.service";
44
- import * as i7 from "../common/searchbar.component";
45
- import * as i8 from "@progress/kendo-angular-icons";
46
- import * as i9 from "@progress/kendo-angular-common";
44
+ import * as i7 from "@progress/kendo-angular-common";
45
+ import * as i8 from "../common/searchbar.component";
46
+ import * as i9 from "@progress/kendo-angular-icons";
47
47
  import * as i10 from "../common/action-sheet.component";
48
48
  import * as i11 from "../common/list.component";
49
49
  import * as i12 from "../common/localization/localized-messages.directive";
50
- import * as i13 from "@angular/common";
51
- import * as i14 from "../common/templates/template-context.directive";
50
+ import * as i13 from "../common/shared-events.directive";
51
+ import * as i14 from "@angular/common";
52
+ import * as i15 from "../common/templates/template-context.directive";
52
53
  /**
53
54
  * @hidden
54
55
  */
@@ -78,7 +79,7 @@ const DEFAULT_FILL_MODE = 'solid';
78
79
  * ```
79
80
  */
80
81
  export class ComboBoxComponent {
81
- constructor(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, cdr, renderer, touchEnabled, injector) {
82
+ constructor(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, cdr, renderer, touchEnabled, injector, hostElement) {
82
83
  this.wrapper = wrapper;
83
84
  this.localization = localization;
84
85
  this.popupService = popupService;
@@ -91,6 +92,7 @@ export class ComboBoxComponent {
91
92
  this.renderer = renderer;
92
93
  this.touchEnabled = touchEnabled;
93
94
  this.injector = injector;
95
+ this.hostElement = hostElement;
94
96
  /**
95
97
  * @hidden
96
98
  */
@@ -252,6 +254,14 @@ export class ComboBoxComponent {
252
254
  * Fires each time the ComboBox gets blurred.
253
255
  */
254
256
  this.onBlur = new EventEmitter();
257
+ /**
258
+ * Fires each time the user focuses the `input` element.
259
+ */
260
+ this.inputFocus = new EventEmitter();
261
+ /**
262
+ * Fires each time the `input` element gets blurred.
263
+ */
264
+ this.inputBlur = new EventEmitter();
255
265
  this.widgetClasses = true;
256
266
  this._isFocused = false;
257
267
  /**
@@ -1149,6 +1159,17 @@ export class ComboBoxComponent {
1149
1159
  }
1150
1160
  }
1151
1161
  }
1162
+ /**
1163
+ * @hidden
1164
+ */
1165
+ handleFocus() {
1166
+ this.zone.run(() => {
1167
+ if (!this.isFocused && hasObservers(this.onFocus)) {
1168
+ this.onFocus.emit();
1169
+ }
1170
+ this.isFocused = true;
1171
+ });
1172
+ }
1152
1173
  /**
1153
1174
  * @hidden
1154
1175
  */
@@ -1161,6 +1182,42 @@ export class ComboBoxComponent {
1161
1182
  const currentText = this.searchbar.value;
1162
1183
  const textHasChanged = currentText !== (getter(this.dataItem, this.textField) || '');
1163
1184
  const valueHasChanged = unresolvedSelection || textHasChanged;
1185
+ const runInZone = valueHasChanged ||
1186
+ hasObservers(this.onBlur) ||
1187
+ hasObservers(this.close) ||
1188
+ isUntouched(this.wrapper.nativeElement);
1189
+ if (runInZone) {
1190
+ this.zone.run(() => {
1191
+ if (valueHasChanged) {
1192
+ const lowerCaseMatch = isPresent(this.focusedItemText) && this.focusedItemText.toLowerCase() === currentText.toLowerCase();
1193
+ if (lowerCaseMatch || unresolvedSelection) {
1194
+ this.selectionService.change(this.selectionService.focused);
1195
+ }
1196
+ else {
1197
+ this.change(currentText, true);
1198
+ }
1199
+ }
1200
+ this.onBlur.emit();
1201
+ this.onTouchedCallback();
1202
+ this.togglePopup(false);
1203
+ });
1204
+ }
1205
+ else {
1206
+ this.togglePopup(false);
1207
+ }
1208
+ }
1209
+ }
1210
+ /**
1211
+ * @hidden
1212
+ */
1213
+ handleInputBlur() {
1214
+ if (!this.isActionSheetExpanded) {
1215
+ this._filtering = false;
1216
+ this.searchbar.input.nativeElement.scrollLeft = 0; // Firefox doesn't auto-scroll to the left on blur like other browsers
1217
+ const unresolvedSelection = getter(this.dataItem, this.valueField) !== getter(this.value, this.valueField);
1218
+ const currentText = this.searchbar.value;
1219
+ const textHasChanged = currentText !== (getter(this.dataItem, this.textField) || '');
1220
+ const valueHasChanged = unresolvedSelection || textHasChanged;
1164
1221
  const runInZone = valueHasChanged ||
1165
1222
  hasObservers(this.onBlur) ||
1166
1223
  hasObservers(this.close) ||
@@ -1177,7 +1234,7 @@ export class ComboBoxComponent {
1177
1234
  this.change(currentText, true);
1178
1235
  }
1179
1236
  }
1180
- this.onBlur.emit();
1237
+ this.inputBlur.emit();
1181
1238
  this.onTouchedCallback();
1182
1239
  this.togglePopup(false);
1183
1240
  });
@@ -1228,10 +1285,10 @@ export class ComboBoxComponent {
1228
1285
  /**
1229
1286
  * @hidden
1230
1287
  */
1231
- handleFocus() {
1232
- this.isFocused = true;
1233
- if (hasObservers(this.onFocus)) {
1234
- this.zone.run(() => this.onFocus.emit());
1288
+ handleInputFocus() {
1289
+ this.handleFocus();
1290
+ if (hasObservers(this.inputFocus)) {
1291
+ this.zone.run(() => this.inputFocus.emit());
1235
1292
  }
1236
1293
  }
1237
1294
  /**
@@ -1263,6 +1320,7 @@ export class ComboBoxComponent {
1263
1320
  selectClick() {
1264
1321
  if (!this.touchEnabled) {
1265
1322
  this.searchbar.focus();
1323
+ this.isFocused = true;
1266
1324
  }
1267
1325
  if (!this.isOpen) {
1268
1326
  this.restoreItemFocus();
@@ -1464,8 +1522,8 @@ export class ComboBoxComponent {
1464
1522
  this.actionSheetSearchBar.focus();
1465
1523
  }
1466
1524
  }
1467
- ComboBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.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: TOUCH_ENABLED, optional: true }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
1468
- ComboBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ComboBoxComponent, selector: "kendo-combobox", inputs: { icon: "icon", svgIcon: "svgIcon", 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" }, host: { properties: { "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: [
1525
+ ComboBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.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: TOUCH_ENABLED, optional: true }, { token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1526
+ ComboBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ComboBoxComponent, selector: "kendo-combobox", inputs: { icon: "icon", svgIcon: "svgIcon", 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" }, host: { properties: { "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: [
1469
1527
  COMBOBOX_VALUE_ACCESSOR,
1470
1528
  DataService,
1471
1529
  SelectionService,
@@ -1482,7 +1540,7 @@ ComboBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
1482
1540
  {
1483
1541
  provide: KendoInput, useExisting: forwardRef(() => ComboBoxComponent)
1484
1542
  }
1485
- ], 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 }], 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"], usesOnChanges: true, ngImport: i0, template: `
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"], usesOnChanges: true, ngImport: i0, template: `
1486
1544
  <ng-container kendoComboBoxLocalizedMessages
1487
1545
  i18n-noDataText="kendo.combobox.noDataText|The text displayed in the popup when there are no items"
1488
1546
  noDataText="NO DATA FOUND"
@@ -1497,64 +1555,84 @@ ComboBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
1497
1555
  popupLabel="Options list"
1498
1556
  >
1499
1557
  </ng-container>
1500
- <kendo-searchbar #searchbar
1501
- [role]="'combobox'"
1502
- [ariaExpanded]="isOpen"
1503
- [ariaControls]="ariaControls"
1504
- [id]="focusableId"
1505
- [isLoading]="loading"
1506
- [isSuggestable]="suggest"
1507
- [isFilterable]="filterable"
1508
- [activeDescendant]="activeDescendant"
1509
- [userInput]="text"
1510
- [suggestedText]="getSuggestion()"
1511
- [disabled]="disabled"
1512
- [readonly]="readonly || isAdaptive"
1513
- [tabIndex]="tabIndex"
1514
- [placeholder]="placeholder"
1515
- (onNavigate)="handleNavigate($event)"
1516
- (valueChange)="searchBarChange($event)"
1517
- (onBlur)="handleBlur()"
1558
+
1559
+ <ng-container
1560
+ kendoDropDownSharedEvents
1561
+ [hostElement]="hostElement"
1562
+ [(isFocused)]="isFocused"
1563
+ (handleBlur)="handleBlur()"
1518
1564
  (onFocus)="handleFocus()"
1519
- (click)="handleClick()"
1520
- ></kendo-searchbar>
1521
- <span
1522
- *ngIf="clearButton && !loading && !disabled && !readonly && text?.length"
1523
- class="k-clear-value"
1524
- [style.visibility]="clearButtonVisiblity"
1525
- aria-hidden="true"
1526
- [attr.title]="messageFor('clearTitle')"
1527
- (click)="clearValue($event)"
1528
- [kendoEventsOutsideAngular]="{
1529
- mousedown: preventEventDefault
1530
- }"
1531
1565
  >
1532
- <kendo-icon-wrapper
1533
- name="x"
1534
- [svgIcon]="xIcon"
1566
+ <span *ngIf="prefixTemplate" class="k-input-prefix k-input-prefix-horizontal">
1567
+ <ng-template [ngTemplateOutlet]="prefixTemplate?.templateRef">
1568
+ </ng-template>
1569
+ </span>
1570
+ <kendo-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-separator>
1571
+ <kendo-searchbar #searchbar
1572
+ [role]="'combobox'"
1573
+ [ariaExpanded]="isOpen"
1574
+ [ariaControls]="ariaControls"
1575
+ [id]="focusableId"
1576
+ [isLoading]="loading"
1577
+ [isSuggestable]="suggest"
1578
+ [isFilterable]="filterable"
1579
+ [activeDescendant]="activeDescendant"
1580
+ [userInput]="text"
1581
+ [suggestedText]="getSuggestion()"
1582
+ [disabled]="disabled"
1583
+ [readonly]="readonly || isAdaptive"
1584
+ [tabIndex]="tabIndex"
1585
+ [placeholder]="placeholder"
1586
+ (onNavigate)="handleNavigate($event)"
1587
+ (valueChange)="searchBarChange($event)"
1588
+ (onBlur)="handleInputBlur()"
1589
+ (onFocus)="handleInputFocus()"
1590
+ (click)="handleClick()"
1591
+ ></kendo-searchbar>
1592
+ <span
1593
+ *ngIf="clearButton && !loading && !disabled && !readonly && text?.length"
1594
+ class="k-clear-value"
1595
+ [style.visibility]="clearButtonVisiblity"
1596
+ aria-hidden="true"
1597
+ [attr.title]="messageFor('clearTitle')"
1598
+ (click)="clearValue($event)"
1599
+ [kendoEventsOutsideAngular]="{
1600
+ mousedown: preventEventDefault
1601
+ }"
1535
1602
  >
1536
- </kendo-icon-wrapper>
1537
- </span>
1538
- <span *ngIf="loading" class="k-i-loading k-input-loading-icon k-icon"></span>
1539
- <button
1540
- #select
1541
- tabindex="-1"
1542
- unselectable="on"
1543
- type="button"
1544
- class="k-input-button k-button k-icon-button"
1545
- [ngClass]="selectButtonClasses"
1546
- [attr.aria-label]="messageFor('selectButtonText')"
1547
- [kendoEventsOutsideAngular]="{
1548
- mousedown: preventEventDefault
1549
- }"
1550
- >
1551
- <kendo-icon-wrapper
1552
- [name]="icon || 'caret-alt-down'"
1553
- innerCssClass="k-button-icon"
1554
- [svgIcon]="svgIcon || caretAltDownIcon"
1603
+ <kendo-icon-wrapper
1604
+ name="x"
1605
+ [svgIcon]="xIcon"
1606
+ >
1607
+ </kendo-icon-wrapper>
1608
+ </span>
1609
+ <span *ngIf="loading" class="k-i-loading k-input-loading-icon k-icon"></span>
1610
+ <kendo-separator *ngIf="suffixTemplate && suffixTemplate.showSeparator"></kendo-separator>
1611
+ <span *ngIf="suffixTemplate" class="k-input-suffix k-input-suffix-horizontal">
1612
+ <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
1613
+ </ng-template>
1614
+ </span>
1615
+ <button
1616
+ #select
1617
+ tabindex="-1"
1618
+ unselectable="on"
1619
+ type="button"
1620
+ class="k-input-button k-button k-icon-button"
1621
+ [ngClass]="selectButtonClasses"
1622
+ [attr.aria-label]="messageFor('selectButtonText')"
1623
+ [kendoEventsOutsideAngular]="{
1624
+ mousedown: preventEventDefault
1625
+ }"
1555
1626
  >
1556
- </kendo-icon-wrapper>
1557
- </button>
1627
+ <kendo-icon-wrapper
1628
+ [name]="icon || 'caret-alt-down'"
1629
+ innerCssClass="k-button-icon"
1630
+ [svgIcon]="svgIcon || caretAltDownIcon"
1631
+ >
1632
+ </kendo-icon-wrapper>
1633
+ </button>
1634
+ </ng-container>
1635
+
1558
1636
  <ng-template #popupTemplate>
1559
1637
  <ng-container *ngTemplateOutlet="sharedPopupActionSheetTemplate"></ng-container>
1560
1638
  </ng-template>
@@ -1619,7 +1697,7 @@ ComboBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
1619
1697
  }">
1620
1698
  </ng-template>
1621
1699
  </ng-template>
1622
- `, isInline: true, components: [{ type: i7.SearchBarComponent, selector: "kendo-searchbar", inputs: ["id", "tagListId", "activeDescendant", "disabled", "readonly", "tabIndex", "role", "isLoading", "ariaControls", "ariaExpanded", "isSuggestable", "isFilterable", "userInput", "suggestedText", "placeholder"], outputs: ["valueChange", "onBlur", "onFocus", "onClick", "onNavigate"] }, { type: i8.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i9.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i10.ResponsiveRendererComponent, selector: "responsive-renderer", inputs: ["title", "showActionButtons", "subtitle", "size", "showTextInput", "sharedPopupActionSheetTemplate", "isActionSheetExpanded", "text", "placeholder"], outputs: ["closePopup", "textInputChange", "navigate", "onExpand", "onCollapse", "onApply", "onCancel"] }, { type: i11.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"] }], directives: [{ type: i12.LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { type: i13.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i13.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i13.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i14.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }] });
1700
+ `, isInline: true, components: [{ type: i7.SeparatorComponent, selector: "kendo-separator", inputs: ["orientation"] }, { type: i8.SearchBarComponent, selector: "kendo-searchbar", inputs: ["id", "tagListId", "activeDescendant", "disabled", "readonly", "tabIndex", "role", "isLoading", "ariaControls", "ariaExpanded", "isSuggestable", "isFilterable", "userInput", "suggestedText", "placeholder"], outputs: ["valueChange", "onBlur", "onFocus", "onClick", "onNavigate"] }, { type: i9.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i7.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i10.ResponsiveRendererComponent, selector: "responsive-renderer", inputs: ["title", "showActionButtons", "subtitle", "size", "showTextInput", "sharedPopupActionSheetTemplate", "isActionSheetExpanded", "text", "placeholder"], outputs: ["closePopup", "textInputChange", "navigate", "onExpand", "onCollapse", "onApply", "onCancel"] }, { type: i11.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"] }], directives: [{ type: i12.LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { type: i13.SharedDropDownEventsDirective, selector: "[kendoDropDownSharedEvents]", inputs: ["hostElement", "clearButtonClicked", "isFocused"], outputs: ["isFocusedChange", "onFocus", "handleBlur"] }, { type: i14.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i14.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i7.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i14.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i15.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }] });
1623
1701
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ComboBoxComponent, decorators: [{
1624
1702
  type: Component,
1625
1703
  args: [{
@@ -1658,64 +1736,84 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
1658
1736
  popupLabel="Options list"
1659
1737
  >
1660
1738
  </ng-container>
1661
- <kendo-searchbar #searchbar
1662
- [role]="'combobox'"
1663
- [ariaExpanded]="isOpen"
1664
- [ariaControls]="ariaControls"
1665
- [id]="focusableId"
1666
- [isLoading]="loading"
1667
- [isSuggestable]="suggest"
1668
- [isFilterable]="filterable"
1669
- [activeDescendant]="activeDescendant"
1670
- [userInput]="text"
1671
- [suggestedText]="getSuggestion()"
1672
- [disabled]="disabled"
1673
- [readonly]="readonly || isAdaptive"
1674
- [tabIndex]="tabIndex"
1675
- [placeholder]="placeholder"
1676
- (onNavigate)="handleNavigate($event)"
1677
- (valueChange)="searchBarChange($event)"
1678
- (onBlur)="handleBlur()"
1739
+
1740
+ <ng-container
1741
+ kendoDropDownSharedEvents
1742
+ [hostElement]="hostElement"
1743
+ [(isFocused)]="isFocused"
1744
+ (handleBlur)="handleBlur()"
1679
1745
  (onFocus)="handleFocus()"
1680
- (click)="handleClick()"
1681
- ></kendo-searchbar>
1682
- <span
1683
- *ngIf="clearButton && !loading && !disabled && !readonly && text?.length"
1684
- class="k-clear-value"
1685
- [style.visibility]="clearButtonVisiblity"
1686
- aria-hidden="true"
1687
- [attr.title]="messageFor('clearTitle')"
1688
- (click)="clearValue($event)"
1689
- [kendoEventsOutsideAngular]="{
1690
- mousedown: preventEventDefault
1691
- }"
1692
1746
  >
1693
- <kendo-icon-wrapper
1694
- name="x"
1695
- [svgIcon]="xIcon"
1747
+ <span *ngIf="prefixTemplate" class="k-input-prefix k-input-prefix-horizontal">
1748
+ <ng-template [ngTemplateOutlet]="prefixTemplate?.templateRef">
1749
+ </ng-template>
1750
+ </span>
1751
+ <kendo-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-separator>
1752
+ <kendo-searchbar #searchbar
1753
+ [role]="'combobox'"
1754
+ [ariaExpanded]="isOpen"
1755
+ [ariaControls]="ariaControls"
1756
+ [id]="focusableId"
1757
+ [isLoading]="loading"
1758
+ [isSuggestable]="suggest"
1759
+ [isFilterable]="filterable"
1760
+ [activeDescendant]="activeDescendant"
1761
+ [userInput]="text"
1762
+ [suggestedText]="getSuggestion()"
1763
+ [disabled]="disabled"
1764
+ [readonly]="readonly || isAdaptive"
1765
+ [tabIndex]="tabIndex"
1766
+ [placeholder]="placeholder"
1767
+ (onNavigate)="handleNavigate($event)"
1768
+ (valueChange)="searchBarChange($event)"
1769
+ (onBlur)="handleInputBlur()"
1770
+ (onFocus)="handleInputFocus()"
1771
+ (click)="handleClick()"
1772
+ ></kendo-searchbar>
1773
+ <span
1774
+ *ngIf="clearButton && !loading && !disabled && !readonly && text?.length"
1775
+ class="k-clear-value"
1776
+ [style.visibility]="clearButtonVisiblity"
1777
+ aria-hidden="true"
1778
+ [attr.title]="messageFor('clearTitle')"
1779
+ (click)="clearValue($event)"
1780
+ [kendoEventsOutsideAngular]="{
1781
+ mousedown: preventEventDefault
1782
+ }"
1696
1783
  >
1697
- </kendo-icon-wrapper>
1698
- </span>
1699
- <span *ngIf="loading" class="k-i-loading k-input-loading-icon k-icon"></span>
1700
- <button
1701
- #select
1702
- tabindex="-1"
1703
- unselectable="on"
1704
- type="button"
1705
- class="k-input-button k-button k-icon-button"
1706
- [ngClass]="selectButtonClasses"
1707
- [attr.aria-label]="messageFor('selectButtonText')"
1708
- [kendoEventsOutsideAngular]="{
1709
- mousedown: preventEventDefault
1710
- }"
1711
- >
1712
- <kendo-icon-wrapper
1713
- [name]="icon || 'caret-alt-down'"
1714
- innerCssClass="k-button-icon"
1715
- [svgIcon]="svgIcon || caretAltDownIcon"
1784
+ <kendo-icon-wrapper
1785
+ name="x"
1786
+ [svgIcon]="xIcon"
1787
+ >
1788
+ </kendo-icon-wrapper>
1789
+ </span>
1790
+ <span *ngIf="loading" class="k-i-loading k-input-loading-icon k-icon"></span>
1791
+ <kendo-separator *ngIf="suffixTemplate && suffixTemplate.showSeparator"></kendo-separator>
1792
+ <span *ngIf="suffixTemplate" class="k-input-suffix k-input-suffix-horizontal">
1793
+ <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
1794
+ </ng-template>
1795
+ </span>
1796
+ <button
1797
+ #select
1798
+ tabindex="-1"
1799
+ unselectable="on"
1800
+ type="button"
1801
+ class="k-input-button k-button k-icon-button"
1802
+ [ngClass]="selectButtonClasses"
1803
+ [attr.aria-label]="messageFor('selectButtonText')"
1804
+ [kendoEventsOutsideAngular]="{
1805
+ mousedown: preventEventDefault
1806
+ }"
1716
1807
  >
1717
- </kendo-icon-wrapper>
1718
- </button>
1808
+ <kendo-icon-wrapper
1809
+ [name]="icon || 'caret-alt-down'"
1810
+ innerCssClass="k-button-icon"
1811
+ [svgIcon]="svgIcon || caretAltDownIcon"
1812
+ >
1813
+ </kendo-icon-wrapper>
1814
+ </button>
1815
+ </ng-container>
1816
+
1719
1817
  <ng-template #popupTemplate>
1720
1818
  <ng-container *ngTemplateOutlet="sharedPopupActionSheetTemplate"></ng-container>
1721
1819
  </ng-template>
@@ -1787,7 +1885,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
1787
1885
  }, {
1788
1886
  type: Inject,
1789
1887
  args: [TOUCH_ENABLED]
1790
- }] }, { type: i0.Injector }]; }, propDecorators: { icon: [{
1888
+ }] }, { type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { icon: [{
1791
1889
  type: Input
1792
1890
  }], svgIcon: [{
1793
1891
  type: Input
@@ -1871,6 +1969,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
1871
1969
  }], onBlur: [{
1872
1970
  type: Output,
1873
1971
  args: ['blur']
1972
+ }], inputFocus: [{
1973
+ type: Output
1974
+ }], inputBlur: [{
1975
+ type: Output
1874
1976
  }], template: [{
1875
1977
  type: ContentChild,
1876
1978
  args: [ItemTemplateDirective, { static: false }]
@@ -1889,6 +1991,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
1889
1991
  }], fixedGroupTemplate: [{
1890
1992
  type: ContentChild,
1891
1993
  args: [FixedGroupTemplateDirective, { static: false }]
1994
+ }], suffixTemplate: [{
1995
+ type: ContentChild,
1996
+ args: [SuffixTemplateDirective]
1997
+ }], prefixTemplate: [{
1998
+ type: ContentChild,
1999
+ args: [PrefixTemplateDirective]
1892
2000
  }], container: [{
1893
2001
  type: ViewChild,
1894
2002
  args: ['container', { read: ViewContainerRef, static: true }]
@@ -12,6 +12,8 @@ import { SharedDirectivesModule } from '../common/shared-directives.module';
12
12
  import { TOUCH_ENABLED } from '../common/constants/touch-enabled';
13
13
  import { ColumnHeaderTemplateDirective } from './combobox-column/column-header-template.directive';
14
14
  import { ColumnCellTemplateDirective } from './combobox-column/column-cell-template.directive';
15
+ import { AdornmentsModule } from '@progress/kendo-angular-common';
16
+ import { SharedEventsModule } from '../common/shared-events.module';
15
17
  import * as i0 from "@angular/core";
16
18
  const COMBOBOX_DIRECTIVES = [
17
19
  ComboBoxComponent,
@@ -41,18 +43,18 @@ ComboBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
41
43
  MultiColumnComboBoxComponent,
42
44
  ComboBoxColumnComponent,
43
45
  ColumnHeaderTemplateDirective,
44
- ColumnCellTemplateDirective], imports: [SharedModule], exports: [ComboBoxComponent,
46
+ ColumnCellTemplateDirective], imports: [SharedModule, AdornmentsModule, SharedEventsModule], exports: [ComboBoxComponent,
45
47
  MultiColumnComboBoxComponent,
46
48
  ComboBoxColumnComponent,
47
49
  ColumnHeaderTemplateDirective,
48
- ColumnCellTemplateDirective, SharedDirectivesModule] });
49
- ComboBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ComboBoxModule, providers: [{ provide: TOUCH_ENABLED, useValue: touchEnabled }], imports: [[SharedModule], SharedDirectivesModule] });
50
+ ColumnCellTemplateDirective, SharedDirectivesModule, AdornmentsModule] });
51
+ ComboBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ComboBoxModule, providers: [{ provide: TOUCH_ENABLED, useValue: touchEnabled }], imports: [[SharedModule, AdornmentsModule, SharedEventsModule], SharedDirectivesModule, AdornmentsModule] });
50
52
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ComboBoxModule, decorators: [{
51
53
  type: NgModule,
52
54
  args: [{
53
55
  declarations: [COMBOBOX_DIRECTIVES],
54
- exports: [COMBOBOX_DIRECTIVES, SharedDirectivesModule],
55
- imports: [SharedModule],
56
+ exports: [COMBOBOX_DIRECTIVES, SharedDirectivesModule, AdornmentsModule],
57
+ imports: [SharedModule, AdornmentsModule, SharedEventsModule],
56
58
  providers: [{ provide: TOUCH_ENABLED, useValue: touchEnabled }]
57
59
  }]
58
60
  }] });