@progress/kendo-angular-dropdowns 21.1.1-develop.2 → 21.2.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.
@@ -30,7 +30,7 @@ import { ListComponent } from '../common/list.component';
30
30
  import { normalizeVirtualizationSettings } from '../common/models/virtualization-settings';
31
31
  import { xIcon } from '@progress/kendo-svg-icons';
32
32
  import { AdaptiveRendererComponent } from '../common/adaptive-renderer.component';
33
- import { NgIf, NgTemplateOutlet } from '@angular/common';
33
+ import { NgTemplateOutlet } from '@angular/common';
34
34
  import { SharedDropDownEventsDirective } from '../common/shared-events.directive';
35
35
  import { LocalizedMessagesDirective } from '../common/localization/localized-messages.directive';
36
36
  import { IconWrapperComponent } from '@progress/kendo-angular-icons';
@@ -1180,7 +1180,7 @@ export class AutoCompleteComponent {
1180
1180
  }
1181
1181
  }
1182
1182
  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 });
1183
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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: [
1183
+ 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: [
1184
1184
  AUTOCOMPLETE_VALUE_ACCESSOR,
1185
1185
  DataService,
1186
1186
  SelectionService,
@@ -1201,143 +1201,164 @@ export class AutoCompleteComponent {
1201
1201
  }
1202
1202
  ], 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: `
1203
1203
  <ng-container kendoAutoCompleteLocalizedMessages
1204
- i18n-noDataText="kendo.autocomplete.noDataText|The text displayed in the popup when there are no items"
1205
- noDataText="NO DATA FOUND"
1206
-
1207
- i18n-clearTitle="kendo.autocomplete.clearTitle|The title of the clear button"
1208
- clearTitle="clear"
1209
-
1210
- i18n-popupLabel="kendo.autocomplete.popupLabel|The label of the popup element that contains the list of options when its role is 'region'"
1211
- popupLabel="Options list"
1212
-
1213
- 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"
1214
- adaptiveCloseButtonTitle="Close"
1215
- >
1204
+ i18n-noDataText="kendo.autocomplete.noDataText|The text displayed in the popup when there are no items"
1205
+ noDataText="NO DATA FOUND"
1206
+
1207
+ i18n-clearTitle="kendo.autocomplete.clearTitle|The title of the clear button"
1208
+ clearTitle="clear"
1209
+
1210
+ i18n-popupLabel="kendo.autocomplete.popupLabel|The label of the popup element that contains the list of options when its role is 'region'"
1211
+ popupLabel="Options list"
1212
+
1213
+ 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"
1214
+ adaptiveCloseButtonTitle="Close"
1215
+ >
1216
1216
  </ng-container>
1217
-
1217
+
1218
1218
  <ng-container
1219
- kendoDropDownSharedEvents
1220
- [hostElement]="hostElement"
1221
- [(isFocused)]="isFocused"
1222
- (handleBlur)="handleBlur()"
1223
- (onFocus)="handleFocus()"
1224
- >
1225
- <span *ngIf="prefixTemplate" class="k-input-prefix k-input-prefix-horizontal">
1226
- <ng-template [ngTemplateOutlet]="prefixTemplate?.templateRef">
1227
- </ng-template>
1219
+ kendoDropDownSharedEvents
1220
+ [hostElement]="hostElement"
1221
+ [(isFocused)]="isFocused"
1222
+ (handleBlur)="handleBlur()"
1223
+ (onFocus)="handleFocus()"
1224
+ >
1225
+ @if (prefixTemplate) {
1226
+ <span class="k-input-prefix k-input-prefix-horizontal">
1227
+ <ng-template [ngTemplateOutlet]="prefixTemplate?.templateRef">
1228
+ </ng-template>
1228
1229
  </span>
1229
- <kendo-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-separator>
1230
- <input
1231
- kendoSearchbar
1232
- [ariaExpanded]="isOpen"
1233
- [isSuggestable]="suggest"
1234
- [isFilterable]="filterable"
1235
- [isLoading]="isLoading"
1236
- [ariaControls]="ariaControls"
1237
- [id]="focusableId"
1238
- [activeDescendant]="activeDescendant"
1239
- [userInput]="text"
1240
- [suggestedText]="suggestion"
1241
- [disabled]="disabled"
1242
- [readonly]="readonly || this.isAdaptive"
1243
- [tabIndex]="tabIndex"
1244
- [isRequired]="isControlRequired"
1245
- [placeholder]="placeholder"
1246
- [inputAttributes]="inputAttributes"
1247
- (onNavigate)="handleNavigate($event)"
1248
- (valueChange)="searchBarChange($event)"
1249
- (onBlur)="handleInputBlur()"
1250
- (onFocus)="handleInputFocus()"
1251
- (click)="handleClick()"
1230
+ }
1231
+ @if (prefixTemplate && prefixTemplate.showSeparator) {
1232
+ <kendo-separator></kendo-separator>
1233
+ }
1234
+ <input
1235
+ kendoSearchbar
1236
+ [ariaExpanded]="isOpen"
1237
+ [isSuggestable]="suggest"
1238
+ [isFilterable]="filterable"
1239
+ [isLoading]="isLoading"
1240
+ [ariaControls]="ariaControls"
1241
+ [id]="focusableId"
1242
+ [activeDescendant]="activeDescendant"
1243
+ [userInput]="text"
1244
+ [suggestedText]="suggestion"
1245
+ [disabled]="disabled"
1246
+ [readonly]="readonly || this.isAdaptive"
1247
+ [tabIndex]="tabIndex"
1248
+ [isRequired]="isControlRequired"
1249
+ [placeholder]="placeholder"
1250
+ [inputAttributes]="inputAttributes"
1251
+ (onNavigate)="handleNavigate($event)"
1252
+ (valueChange)="searchBarChange($event)"
1253
+ (onBlur)="handleInputBlur()"
1254
+ (onFocus)="handleInputFocus()"
1255
+ (click)="handleClick()"
1252
1256
  />
1257
+ @if (!loading && !readonly && (clearButton && text?.length)) {
1253
1258
  <span
1254
- *ngIf="!loading && !readonly && (clearButton && text?.length)"
1255
- class="k-clear-value"
1256
- [style.visibility]="clearButtonVisibility"
1257
- [attr.title]="messageFor('clearTitle')"
1258
- role="button"
1259
- tabindex="-1"
1260
- (click)="clearValue($event)"
1261
- (mousedown)="$event.preventDefault()"
1262
- >
1263
- <kendo-icon-wrapper
1264
- name="x"
1265
- [svgIcon]="xIcon"
1259
+ class="k-clear-value"
1260
+ [style.visibility]="clearButtonVisibility"
1261
+ [attr.title]="messageFor('clearTitle')"
1262
+ role="button"
1263
+ tabindex="-1"
1264
+ (click)="clearValue($event)"
1265
+ (mousedown)="$event.preventDefault()"
1266
+ >
1267
+ <kendo-icon-wrapper
1268
+ name="x"
1269
+ [svgIcon]="xIcon"
1266
1270
  >
1267
- </kendo-icon-wrapper>
1271
+ </kendo-icon-wrapper>
1268
1272
  </span>
1269
- <span *ngIf="loading" class="k-icon k-i-loading k-input-loading-icon"></span>
1270
- <kendo-separator *ngIf="suffixTemplate && suffixTemplate.showSeparator"></kendo-separator>
1271
- <span *ngIf="suffixTemplate" class="k-input-suffix k-input-suffix-horizontal">
1272
- <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
1273
- </ng-template>
1273
+ }
1274
+ @if (loading) {
1275
+ <span class="k-icon k-i-loading k-input-loading-icon"></span>
1276
+ }
1277
+ @if (suffixTemplate && suffixTemplate.showSeparator) {
1278
+ <kendo-separator></kendo-separator>
1279
+ }
1280
+ @if (suffixTemplate) {
1281
+ <span class="k-input-suffix k-input-suffix-horizontal">
1282
+ <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
1283
+ </ng-template>
1274
1284
  </span>
1285
+ }
1275
1286
  </ng-container>
1276
-
1287
+
1277
1288
  <ng-template #popupTemplate>
1278
- <ng-container *ngTemplateOutlet="sharedPopupActionSheetTemplate"></ng-container>
1289
+ <ng-container *ngTemplateOutlet="sharedPopupActionSheetTemplate"></ng-container>
1279
1290
  </ng-template>
1280
1291
  <ng-container #container></ng-container>
1281
- <kendo-resize-sensor *ngIf="isOpen || isAdaptiveModeEnabled" (resize)="onResize()"></kendo-resize-sensor>
1282
-
1292
+ @if (isOpen || isAdaptiveModeEnabled) {
1293
+ <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
1294
+ }
1295
+
1283
1296
  <kendo-adaptive-renderer
1284
- [sharedPopupActionSheetTemplate]="sharedPopupActionSheetTemplate"
1285
- [title]="adaptiveTitle"
1286
- [showTextInput]="true"
1287
- [subtitle]="adaptiveSubtitle"
1288
- (closePopup)="closeActionSheet()"
1289
- (textInputChange)="searchBarChange($event)"
1290
- (navigate)="handleNavigate($event)"
1291
- [placeholder]="placeholder"
1292
- [searchBarValue]="text">
1297
+ [sharedPopupActionSheetTemplate]="sharedPopupActionSheetTemplate"
1298
+ [title]="adaptiveTitle"
1299
+ [showTextInput]="true"
1300
+ [subtitle]="adaptiveSubtitle"
1301
+ (closePopup)="closeActionSheet()"
1302
+ (textInputChange)="searchBarChange($event)"
1303
+ (navigate)="handleNavigate($event)"
1304
+ [placeholder]="placeholder"
1305
+ [searchBarValue]="text">
1293
1306
  </kendo-adaptive-renderer>
1294
-
1307
+
1295
1308
  <ng-template #sharedPopupActionSheetTemplate>
1296
- <!--header template-->
1297
- <ng-template *ngIf="headerTemplate"
1309
+ <!--header template-->
1310
+ @if (headerTemplate) {
1311
+ <ng-template
1298
1312
  [templateContext]="{
1299
1313
  templateRef: headerTemplate.templateRef
1300
1314
  }">
1301
1315
  </ng-template>
1302
- <!--list-->
1303
- <kendo-list
1304
- #optionsList
1305
- [size]="isAdaptive ? 'large' : size"
1306
- [rounded]="rounded"
1307
- [id]="listBoxId"
1308
- [optionPrefix]="optionPrefix"
1309
- [data]="data"
1310
- [textField]="valueField"
1311
- [valueField]="valueField"
1312
- [template]="template"
1313
- [groupTemplate]="groupTemplate"
1314
- [fixedGroupTemplate]="fixedGroupTemplate"
1315
- [height]="listHeight"
1316
- [show]="isOpen"
1317
- [virtual]="virtual"
1318
- [showStickyHeader]="showStickyHeader"
1319
- (pageChange)="pageChange($event)"
1316
+ }
1317
+ <!--list-->
1318
+ <kendo-list
1319
+ #optionsList
1320
+ [size]="isAdaptive ? 'large' : size"
1321
+ [rounded]="rounded"
1322
+ [id]="listBoxId"
1323
+ [optionPrefix]="optionPrefix"
1324
+ [data]="data"
1325
+ [textField]="valueField"
1326
+ [valueField]="valueField"
1327
+ [template]="template"
1328
+ [groupTemplate]="groupTemplate"
1329
+ [fixedGroupTemplate]="fixedGroupTemplate"
1330
+ [height]="listHeight"
1331
+ [show]="isOpen"
1332
+ [virtual]="virtual"
1333
+ [showStickyHeader]="showStickyHeader"
1334
+ (pageChange)="pageChange($event)"
1320
1335
  >
1321
- </kendo-list>
1322
- <!--no-data template-->
1323
- <div class="k-no-data" *ngIf="data.length === 0">
1324
- <ng-template [ngIf]="noDataTemplate"
1336
+ </kendo-list>
1337
+ <!--no-data template-->
1338
+ @if (data.length === 0) {
1339
+ <div class="k-no-data">
1340
+ @if (noDataTemplate) {
1341
+ <ng-template
1325
1342
  [templateContext]="{
1326
1343
  templateRef: noDataTemplate?.templateRef
1327
1344
  }">
1328
1345
  </ng-template>
1329
- <ng-template [ngIf]="!noDataTemplate">
1330
- <div>{{ messageFor('noDataText') }}</div>
1331
- </ng-template>
1346
+ }
1347
+ @if (!noDataTemplate) {
1348
+ <div>{{ messageFor('noDataText') }}</div>
1349
+ }
1332
1350
  </div>
1333
- <!--footer template-->
1334
- <ng-template *ngIf="footerTemplate"
1351
+ }
1352
+ <!--footer template-->
1353
+ @if (footerTemplate) {
1354
+ <ng-template
1335
1355
  [templateContext]="{
1336
1356
  templateRef: footerTemplate.templateRef
1337
1357
  }">
1338
1358
  </ng-template>
1359
+ }
1339
1360
  </ng-template>
1340
- `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { kind: "directive", type: SharedDropDownEventsDirective, selector: "[kendoDropDownSharedEvents]", inputs: ["hostElement", "clearButtonClicked", "isFocused"], outputs: ["isFocusedChange", "onFocus", "handleBlur"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SeparatorComponent, selector: "kendo-separator", inputs: ["orientation"] }, { kind: "component", type: SearchBarComponent, selector: "input[kendoSearchbar]", inputs: ["tagListId", "readonly", "disabled", "isRequired", "isSuggestable", "isFilterable", "userInput", "suggestedText", "inputAttributes", "id", "activeDescendant", "tabIndex", "isLoading", "ariaControls", "ariaExpanded", "placeholder"], outputs: ["valueChange", "onBlur", "onFocus", "onClick", "onNavigate"] }, { kind: "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"] }] });
1361
+ `, 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"] }] });
1341
1362
  }
1342
1363
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AutoCompleteComponent, decorators: [{
1343
1364
  type: Component,
@@ -1366,145 +1387,166 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
1366
1387
  selector: 'kendo-autocomplete',
1367
1388
  template: `
1368
1389
  <ng-container kendoAutoCompleteLocalizedMessages
1369
- i18n-noDataText="kendo.autocomplete.noDataText|The text displayed in the popup when there are no items"
1370
- noDataText="NO DATA FOUND"
1371
-
1372
- i18n-clearTitle="kendo.autocomplete.clearTitle|The title of the clear button"
1373
- clearTitle="clear"
1374
-
1375
- i18n-popupLabel="kendo.autocomplete.popupLabel|The label of the popup element that contains the list of options when its role is 'region'"
1376
- popupLabel="Options list"
1377
-
1378
- 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"
1379
- adaptiveCloseButtonTitle="Close"
1380
- >
1390
+ i18n-noDataText="kendo.autocomplete.noDataText|The text displayed in the popup when there are no items"
1391
+ noDataText="NO DATA FOUND"
1392
+
1393
+ i18n-clearTitle="kendo.autocomplete.clearTitle|The title of the clear button"
1394
+ clearTitle="clear"
1395
+
1396
+ i18n-popupLabel="kendo.autocomplete.popupLabel|The label of the popup element that contains the list of options when its role is 'region'"
1397
+ popupLabel="Options list"
1398
+
1399
+ 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"
1400
+ adaptiveCloseButtonTitle="Close"
1401
+ >
1381
1402
  </ng-container>
1382
-
1403
+
1383
1404
  <ng-container
1384
- kendoDropDownSharedEvents
1385
- [hostElement]="hostElement"
1386
- [(isFocused)]="isFocused"
1387
- (handleBlur)="handleBlur()"
1388
- (onFocus)="handleFocus()"
1389
- >
1390
- <span *ngIf="prefixTemplate" class="k-input-prefix k-input-prefix-horizontal">
1391
- <ng-template [ngTemplateOutlet]="prefixTemplate?.templateRef">
1392
- </ng-template>
1405
+ kendoDropDownSharedEvents
1406
+ [hostElement]="hostElement"
1407
+ [(isFocused)]="isFocused"
1408
+ (handleBlur)="handleBlur()"
1409
+ (onFocus)="handleFocus()"
1410
+ >
1411
+ @if (prefixTemplate) {
1412
+ <span class="k-input-prefix k-input-prefix-horizontal">
1413
+ <ng-template [ngTemplateOutlet]="prefixTemplate?.templateRef">
1414
+ </ng-template>
1393
1415
  </span>
1394
- <kendo-separator *ngIf="prefixTemplate && prefixTemplate.showSeparator"></kendo-separator>
1395
- <input
1396
- kendoSearchbar
1397
- [ariaExpanded]="isOpen"
1398
- [isSuggestable]="suggest"
1399
- [isFilterable]="filterable"
1400
- [isLoading]="isLoading"
1401
- [ariaControls]="ariaControls"
1402
- [id]="focusableId"
1403
- [activeDescendant]="activeDescendant"
1404
- [userInput]="text"
1405
- [suggestedText]="suggestion"
1406
- [disabled]="disabled"
1407
- [readonly]="readonly || this.isAdaptive"
1408
- [tabIndex]="tabIndex"
1409
- [isRequired]="isControlRequired"
1410
- [placeholder]="placeholder"
1411
- [inputAttributes]="inputAttributes"
1412
- (onNavigate)="handleNavigate($event)"
1413
- (valueChange)="searchBarChange($event)"
1414
- (onBlur)="handleInputBlur()"
1415
- (onFocus)="handleInputFocus()"
1416
- (click)="handleClick()"
1416
+ }
1417
+ @if (prefixTemplate && prefixTemplate.showSeparator) {
1418
+ <kendo-separator></kendo-separator>
1419
+ }
1420
+ <input
1421
+ kendoSearchbar
1422
+ [ariaExpanded]="isOpen"
1423
+ [isSuggestable]="suggest"
1424
+ [isFilterable]="filterable"
1425
+ [isLoading]="isLoading"
1426
+ [ariaControls]="ariaControls"
1427
+ [id]="focusableId"
1428
+ [activeDescendant]="activeDescendant"
1429
+ [userInput]="text"
1430
+ [suggestedText]="suggestion"
1431
+ [disabled]="disabled"
1432
+ [readonly]="readonly || this.isAdaptive"
1433
+ [tabIndex]="tabIndex"
1434
+ [isRequired]="isControlRequired"
1435
+ [placeholder]="placeholder"
1436
+ [inputAttributes]="inputAttributes"
1437
+ (onNavigate)="handleNavigate($event)"
1438
+ (valueChange)="searchBarChange($event)"
1439
+ (onBlur)="handleInputBlur()"
1440
+ (onFocus)="handleInputFocus()"
1441
+ (click)="handleClick()"
1417
1442
  />
1443
+ @if (!loading && !readonly && (clearButton && text?.length)) {
1418
1444
  <span
1419
- *ngIf="!loading && !readonly && (clearButton && text?.length)"
1420
- class="k-clear-value"
1421
- [style.visibility]="clearButtonVisibility"
1422
- [attr.title]="messageFor('clearTitle')"
1423
- role="button"
1424
- tabindex="-1"
1425
- (click)="clearValue($event)"
1426
- (mousedown)="$event.preventDefault()"
1427
- >
1428
- <kendo-icon-wrapper
1429
- name="x"
1430
- [svgIcon]="xIcon"
1445
+ class="k-clear-value"
1446
+ [style.visibility]="clearButtonVisibility"
1447
+ [attr.title]="messageFor('clearTitle')"
1448
+ role="button"
1449
+ tabindex="-1"
1450
+ (click)="clearValue($event)"
1451
+ (mousedown)="$event.preventDefault()"
1452
+ >
1453
+ <kendo-icon-wrapper
1454
+ name="x"
1455
+ [svgIcon]="xIcon"
1431
1456
  >
1432
- </kendo-icon-wrapper>
1457
+ </kendo-icon-wrapper>
1433
1458
  </span>
1434
- <span *ngIf="loading" class="k-icon k-i-loading k-input-loading-icon"></span>
1435
- <kendo-separator *ngIf="suffixTemplate && suffixTemplate.showSeparator"></kendo-separator>
1436
- <span *ngIf="suffixTemplate" class="k-input-suffix k-input-suffix-horizontal">
1437
- <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
1438
- </ng-template>
1459
+ }
1460
+ @if (loading) {
1461
+ <span class="k-icon k-i-loading k-input-loading-icon"></span>
1462
+ }
1463
+ @if (suffixTemplate && suffixTemplate.showSeparator) {
1464
+ <kendo-separator></kendo-separator>
1465
+ }
1466
+ @if (suffixTemplate) {
1467
+ <span class="k-input-suffix k-input-suffix-horizontal">
1468
+ <ng-template [ngTemplateOutlet]="suffixTemplate?.templateRef">
1469
+ </ng-template>
1439
1470
  </span>
1471
+ }
1440
1472
  </ng-container>
1441
-
1473
+
1442
1474
  <ng-template #popupTemplate>
1443
- <ng-container *ngTemplateOutlet="sharedPopupActionSheetTemplate"></ng-container>
1475
+ <ng-container *ngTemplateOutlet="sharedPopupActionSheetTemplate"></ng-container>
1444
1476
  </ng-template>
1445
1477
  <ng-container #container></ng-container>
1446
- <kendo-resize-sensor *ngIf="isOpen || isAdaptiveModeEnabled" (resize)="onResize()"></kendo-resize-sensor>
1447
-
1478
+ @if (isOpen || isAdaptiveModeEnabled) {
1479
+ <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
1480
+ }
1481
+
1448
1482
  <kendo-adaptive-renderer
1449
- [sharedPopupActionSheetTemplate]="sharedPopupActionSheetTemplate"
1450
- [title]="adaptiveTitle"
1451
- [showTextInput]="true"
1452
- [subtitle]="adaptiveSubtitle"
1453
- (closePopup)="closeActionSheet()"
1454
- (textInputChange)="searchBarChange($event)"
1455
- (navigate)="handleNavigate($event)"
1456
- [placeholder]="placeholder"
1457
- [searchBarValue]="text">
1483
+ [sharedPopupActionSheetTemplate]="sharedPopupActionSheetTemplate"
1484
+ [title]="adaptiveTitle"
1485
+ [showTextInput]="true"
1486
+ [subtitle]="adaptiveSubtitle"
1487
+ (closePopup)="closeActionSheet()"
1488
+ (textInputChange)="searchBarChange($event)"
1489
+ (navigate)="handleNavigate($event)"
1490
+ [placeholder]="placeholder"
1491
+ [searchBarValue]="text">
1458
1492
  </kendo-adaptive-renderer>
1459
-
1493
+
1460
1494
  <ng-template #sharedPopupActionSheetTemplate>
1461
- <!--header template-->
1462
- <ng-template *ngIf="headerTemplate"
1495
+ <!--header template-->
1496
+ @if (headerTemplate) {
1497
+ <ng-template
1463
1498
  [templateContext]="{
1464
1499
  templateRef: headerTemplate.templateRef
1465
1500
  }">
1466
1501
  </ng-template>
1467
- <!--list-->
1468
- <kendo-list
1469
- #optionsList
1470
- [size]="isAdaptive ? 'large' : size"
1471
- [rounded]="rounded"
1472
- [id]="listBoxId"
1473
- [optionPrefix]="optionPrefix"
1474
- [data]="data"
1475
- [textField]="valueField"
1476
- [valueField]="valueField"
1477
- [template]="template"
1478
- [groupTemplate]="groupTemplate"
1479
- [fixedGroupTemplate]="fixedGroupTemplate"
1480
- [height]="listHeight"
1481
- [show]="isOpen"
1482
- [virtual]="virtual"
1483
- [showStickyHeader]="showStickyHeader"
1484
- (pageChange)="pageChange($event)"
1502
+ }
1503
+ <!--list-->
1504
+ <kendo-list
1505
+ #optionsList
1506
+ [size]="isAdaptive ? 'large' : size"
1507
+ [rounded]="rounded"
1508
+ [id]="listBoxId"
1509
+ [optionPrefix]="optionPrefix"
1510
+ [data]="data"
1511
+ [textField]="valueField"
1512
+ [valueField]="valueField"
1513
+ [template]="template"
1514
+ [groupTemplate]="groupTemplate"
1515
+ [fixedGroupTemplate]="fixedGroupTemplate"
1516
+ [height]="listHeight"
1517
+ [show]="isOpen"
1518
+ [virtual]="virtual"
1519
+ [showStickyHeader]="showStickyHeader"
1520
+ (pageChange)="pageChange($event)"
1485
1521
  >
1486
- </kendo-list>
1487
- <!--no-data template-->
1488
- <div class="k-no-data" *ngIf="data.length === 0">
1489
- <ng-template [ngIf]="noDataTemplate"
1522
+ </kendo-list>
1523
+ <!--no-data template-->
1524
+ @if (data.length === 0) {
1525
+ <div class="k-no-data">
1526
+ @if (noDataTemplate) {
1527
+ <ng-template
1490
1528
  [templateContext]="{
1491
1529
  templateRef: noDataTemplate?.templateRef
1492
1530
  }">
1493
1531
  </ng-template>
1494
- <ng-template [ngIf]="!noDataTemplate">
1495
- <div>{{ messageFor('noDataText') }}</div>
1496
- </ng-template>
1532
+ }
1533
+ @if (!noDataTemplate) {
1534
+ <div>{{ messageFor('noDataText') }}</div>
1535
+ }
1497
1536
  </div>
1498
- <!--footer template-->
1499
- <ng-template *ngIf="footerTemplate"
1537
+ }
1538
+ <!--footer template-->
1539
+ @if (footerTemplate) {
1540
+ <ng-template
1500
1541
  [templateContext]="{
1501
1542
  templateRef: footerTemplate.templateRef
1502
1543
  }">
1503
1544
  </ng-template>
1545
+ }
1504
1546
  </ng-template>
1505
- `,
1547
+ `,
1506
1548
  standalone: true,
1507
- imports: [LocalizedMessagesDirective, SharedDropDownEventsDirective, NgIf, NgTemplateOutlet, SeparatorComponent, SearchBarComponent, IconWrapperComponent, ResizeSensorComponent, AdaptiveRendererComponent, TemplateContextDirective, ListComponent]
1549
+ imports: [LocalizedMessagesDirective, SharedDropDownEventsDirective, NgTemplateOutlet, SeparatorComponent, SearchBarComponent, IconWrapperComponent, ResizeSensorComponent, AdaptiveRendererComponent, TemplateContextDirective, ListComponent]
1508
1550
  }]
1509
1551
  }], 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: [{
1510
1552
  type: ViewChild,