@progress/kendo-angular-toolbar 21.1.1-develop.2 → 21.2.0-develop.10

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.
@@ -28,28 +28,27 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
31
  const utils_1 = require("../utils");
33
32
  const fs = __importStar(require("fs"));
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => {
37
+ let result = (0, utils_1.attributeValueUpdate)(templateContent, 'kendo-toolbar-button', 'showIcon', 'overflow', 'menu');
38
+ result = (0, utils_1.attributeValueUpdate)(result, 'kendo-toolbar-button', 'showIcon', 'both', 'always');
39
+ return result;
40
+ });
36
41
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showIcon', 'overflow', 'menu');
40
- updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showIcon', 'both', 'always');
41
- // Only write to file once after all transformations
42
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
42
+ if (htmlResult && htmlResult !== fileInfo.source) {
43
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
44
+ return htmlResult;
43
45
  }
44
- return;
46
+ return fileInfo.source; // Return original source if no changes
45
47
  }
48
+ // Handle TypeScript property transformations
46
49
  const j = api.jscodeshift;
47
- const rootSource = j(fileInfo.source);
48
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
49
- (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showIcon', 'overflow', 'menu');
50
- (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showIcon', 'both', 'always');
51
- });
52
- (0, utils_1.tsPropertyValueTransformer)(fileInfo.source, rootSource, j, 'DisplayMode', 'overflow', 'menu');
53
- (0, utils_1.tsPropertyValueTransformer)(fileInfo.source, rootSource, j, 'DisplayMode', 'both', 'always');
54
- return rootSource.toSource();
50
+ const rootSource = j(htmlResult || fileInfo.source);
51
+ (0, utils_1.tsPropertyValueTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-toolbar', 'DisplayMode', 'overflow', 'menu');
52
+ (0, utils_1.tsPropertyValueTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-toolbar', 'DisplayMode', 'both', 'always');
53
+ return rootSource.toSource({ quote: 'single' });
55
54
  }
@@ -28,28 +28,27 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
31
  const utils_1 = require("../utils");
33
32
  const fs = __importStar(require("fs"));
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => {
37
+ let result = (0, utils_1.attributeValueUpdate)(templateContent, 'kendo-toolbar-button', 'showText', 'overflow', 'menu');
38
+ result = (0, utils_1.attributeValueUpdate)(result, 'kendo-toolbar-button', 'showText', 'both', 'always');
39
+ return result;
40
+ });
36
41
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showText', 'overflow', 'menu');
40
- updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showText', 'both', 'always');
41
- // Only write to file once after all transformations
42
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
42
+ if (htmlResult && htmlResult !== fileInfo.source) {
43
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
44
+ return htmlResult;
43
45
  }
44
- return;
46
+ return fileInfo.source; // Return original source if no changes
45
47
  }
48
+ // Handle TypeScript property transformations
46
49
  const j = api.jscodeshift;
47
- const rootSource = j(fileInfo.source);
48
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
49
- (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showText', 'overflow', 'menu');
50
- (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showText', 'both', 'always');
51
- });
52
- (0, utils_1.tsPropertyValueTransformer)(fileInfo.source, rootSource, j, 'DisplayMode', 'overflow', 'menu');
53
- (0, utils_1.tsPropertyValueTransformer)(fileInfo.source, rootSource, j, 'DisplayMode', 'both', 'always');
54
- return rootSource.toSource();
50
+ const rootSource = j(htmlResult || fileInfo.source);
51
+ (0, utils_1.tsPropertyValueTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-toolbar', 'DisplayMode', 'overflow', 'menu');
52
+ (0, utils_1.tsPropertyValueTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-toolbar', 'DisplayMode', 'both', 'always');
53
+ return rootSource.toSource({ quote: 'single' });
55
54
  }
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1763729041,
14
- version: '21.1.1-develop.2',
13
+ publishDate: 1764592910,
14
+ version: '21.2.0-develop.10',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -5,7 +5,7 @@
5
5
  /* eslint-disable no-case-declarations */
6
6
  import { Component, HostBinding, ViewChild, TemplateRef, ElementRef, QueryList, ContentChildren, Input, HostListener, Output, EventEmitter, ViewContainerRef, NgZone, Renderer2, ChangeDetectorRef } from '@angular/core';
7
7
  import { PopupService } from '@progress/kendo-angular-popup';
8
- import { guid, normalizeNumpadKeys, ResizeSensorComponent } from '@progress/kendo-angular-common';
8
+ import { guid, normalizeKeys, ResizeSensorComponent } from '@progress/kendo-angular-common';
9
9
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
10
10
  import { validatePackage } from '@progress/kendo-licensing';
11
11
  import { packageMetadata } from './package-metadata';
@@ -22,7 +22,7 @@ import { filter } from 'rxjs/operators';
22
22
  import { isDocumentAvailable } from '@progress/kendo-angular-common';
23
23
  import { caretAltLeftIcon, caretAltRightIcon, moreHorizontalIcon, moreVerticalIcon } from '@progress/kendo-svg-icons';
24
24
  import { ButtonComponent } from '@progress/kendo-angular-buttons';
25
- import { NgFor, NgIf, NgClass, NgTemplateOutlet } from '@angular/common';
25
+ import { NgClass, NgTemplateOutlet } from '@angular/common';
26
26
  import { LocalizedToolbarMessagesDirective } from './localization/localized-toolbar-messages.directive';
27
27
  import { ToolbarToolsService } from './tools/tools.service';
28
28
  import { ScrollService } from './scroll.service';
@@ -393,7 +393,7 @@ export class ToolBarComponent {
393
393
  this.zone.runOutsideAngular(() => {
394
394
  this.toolbarKeydownListener = this.renderer.listen(this.element.nativeElement, 'keydown', (ev) => {
395
395
  // on some keyboards arrow keys, PageUp/Down, and Home/End are mapped to Numpad keys
396
- const code = normalizeNumpadKeys(ev);
396
+ const code = normalizeKeys(ev);
397
397
  switch (code) {
398
398
  case Keys.ArrowLeft:
399
399
  this.zone.run(() => {
@@ -663,7 +663,7 @@ export class ToolBarComponent {
663
663
  this.zone.runOutsideAngular(() => {
664
664
  if (this.normalizedOverflow.mode === 'section') {
665
665
  this.sectionKeydownListener = this.renderer.listen(this.popupRef.popupElement, 'keydown', (ev) => {
666
- const code = normalizeNumpadKeys(ev);
666
+ const code = normalizeKeys(ev);
667
667
  switch (code) {
668
668
  case Keys.ArrowLeft:
669
669
  this.zone.run(() => {
@@ -710,7 +710,7 @@ export class ToolBarComponent {
710
710
  }
711
711
  else {
712
712
  this.overflowKeydownListener = this.renderer.listen(this.popupRef.popupElement, 'keydown', (ev) => {
713
- const code = normalizeNumpadKeys(ev);
713
+ const code = normalizeKeys(ev);
714
714
  switch (code) {
715
715
  case Keys.ArrowUp:
716
716
  this.zone.run(() => {
@@ -1033,7 +1033,7 @@ export class ToolBarComponent {
1033
1033
  return value;
1034
1034
  }
1035
1035
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolBarComponent, deps: [{ token: i1.LocalizationService }, { token: i2.PopupService }, { token: i3.RefreshService }, { token: i4.NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i5.ToolbarToolsService }, { token: i6.ScrollService }], target: i0.ɵɵFactoryTarget.Component });
1036
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ToolBarComponent, isStandalone: true, selector: "kendo-toolbar", inputs: { overflow: "overflow", resizable: "resizable", popupSettings: "popupSettings", fillMode: "fillMode", tabindex: "tabindex", size: "size", tabIndex: "tabIndex", showIcon: "showIcon", showText: "showText" }, outputs: { open: "open", close: "close" }, host: { listeners: { "focus": "onFocus($event)", "focusout": "onFocusOut($event)" }, properties: { "class.k-toolbar": "this.hostClass", "class.k-toolbar-scrollable": "this.scrollableClass", "class.k-toolbar-section": "this.sectionClass", "attr.role": "this.role", "attr.dir": "this.getDir", "class.k-toolbar-resizable": "this.resizableClass" } }, providers: [
1036
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ToolBarComponent, isStandalone: true, selector: "kendo-toolbar", inputs: { overflow: "overflow", resizable: "resizable", popupSettings: "popupSettings", fillMode: "fillMode", tabindex: "tabindex", size: "size", tabIndex: "tabIndex", showIcon: "showIcon", showText: "showText" }, outputs: { open: "open", close: "close" }, host: { listeners: { "focus": "onFocus($event)", "focusout": "onFocusOut($event)" }, properties: { "class.k-toolbar": "this.hostClass", "class.k-toolbar-scrollable": "this.scrollableClass", "class.k-toolbar-section": "this.sectionClass", "attr.role": "this.role", "attr.dir": "this.getDir", "class.k-toolbar-resizable": "this.resizableClass" } }, providers: [
1037
1037
  RefreshService,
1038
1038
  NavigationService,
1039
1039
  LocalizationService,
@@ -1055,21 +1055,24 @@ export class ToolBarComponent {
1055
1055
  nextToolButton="Scroll right"
1056
1056
  >
1057
1057
  </ng-container>
1058
- <ng-container *ngIf="showScrollButtons && (hasScrollButtons.position === 'split' || hasScrollButtons.position === 'start')">
1059
- <span *ngIf="hasScrollButtons.position === 'split'" #prevScrollButton
1060
- kendoToolbarScrollableButton
1061
- [prev]="true"
1062
- [overflow]="normalizedOverflow"
1063
- [title]="getScrollButtonTitle('prev')"
1064
- class="k-toolbar-prev k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
1065
- [ngClass]="{
1066
- 'k-button-sm': size === 'small',
1067
- 'k-button-md': size === 'medium' || !size,
1068
- 'k-button-lg': size === 'large'
1069
- }"
1070
- (onClick)="scrollTools($event)">
1071
- </span>
1072
- <div class="k-button-group k-button-group-solid" *ngIf="hasScrollButtons.position === 'start'" #startButtonGroup>
1058
+ @if (showScrollButtons && (hasScrollButtons.position === 'split' || hasScrollButtons.position === 'start')) {
1059
+ @if (hasScrollButtons.position === 'split') {
1060
+ <span #prevScrollButton
1061
+ kendoToolbarScrollableButton
1062
+ [prev]="true"
1063
+ [overflow]="normalizedOverflow"
1064
+ [title]="getScrollButtonTitle('prev')"
1065
+ class="k-toolbar-prev k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
1066
+ [ngClass]="{
1067
+ 'k-button-sm': size === 'small',
1068
+ 'k-button-md': size === 'medium' || !size,
1069
+ 'k-button-lg': size === 'large'
1070
+ }"
1071
+ (onClick)="scrollTools($event)">
1072
+ </span>
1073
+ }
1074
+ @if (hasScrollButtons.position === 'start') {
1075
+ <div class="k-button-group k-button-group-solid" #startButtonGroup>
1073
1076
  <span #prevScrollButton
1074
1077
  kendoToolbarScrollableButton
1075
1078
  [prev]="true"
@@ -1097,10 +1100,13 @@ export class ToolBarComponent {
1097
1100
  (onClick)="scrollTools($event)">
1098
1101
  </span>
1099
1102
  </div>
1103
+ }
1100
1104
  <div class="k-toolbar-separator k-toolbar-button-separator k-separator" #scrollSeparator></div>
1101
- </ng-container>
1102
- <div class="k-toolbar-items k-toolbar-items-scroll" tabindex="-1" *ngIf="isScrollMode; else noScroll" #scrollContainer>
1103
- <ng-container *ngFor="let tool of allTools; let index = index"
1105
+ }
1106
+ @if (isScrollMode) {
1107
+ <div class="k-toolbar-items k-toolbar-items-scroll" tabindex="-1" #scrollContainer>
1108
+ @for (tool of allTools; track tool; let index = $index) {
1109
+ <ng-container
1104
1110
  kendoToolbarRenderer
1105
1111
  [tool]="tool"
1106
1112
  location="toolbar"
@@ -1113,9 +1119,11 @@ export class ToolBarComponent {
1113
1119
  </div>
1114
1120
  </ng-template>
1115
1121
  </ng-container>
1122
+ }
1116
1123
  </div>
1117
- <ng-template #noScroll>
1118
- <ng-container *ngFor="let tool of allTools; let index = index"
1124
+ } @else {
1125
+ @for (tool of allTools; track tool; let index = $index) {
1126
+ <ng-container
1119
1127
  kendoToolbarRenderer
1120
1128
  [tool]="tool"
1121
1129
  location="toolbar"
@@ -1128,9 +1136,13 @@ export class ToolBarComponent {
1128
1136
  </div>
1129
1137
  </ng-template>
1130
1138
  </ng-container>
1131
- </ng-template>
1132
- <div class="k-toolbar-separator k-toolbar-button-separator k-separator" *ngIf="showOverflowSeparator"></div>
1133
- <button
1139
+ }
1140
+ }
1141
+ @if (showOverflowSeparator) {
1142
+ <div class="k-toolbar-separator k-toolbar-button-separator k-separator"></div>
1143
+ }
1144
+ @if (showMenu) {
1145
+ <button
1134
1146
  kendoButton
1135
1147
  fillMode="flat"
1136
1148
  #overflowButton
@@ -1143,7 +1155,6 @@ export class ToolBarComponent {
1143
1155
  [attr.aria-expanded]="popupOpen"
1144
1156
  [id]="overflowBtnId"
1145
1157
  [attr.aria-haspopup]="normalizedOverflow.mode === 'section' ? null : 'menu'"
1146
- *ngIf="showMenu"
1147
1158
  [style.visibility]="'hidden'"
1148
1159
  [style.position]="'relative'"
1149
1160
  class="k-toolbar-overflow-button"
@@ -1151,9 +1162,11 @@ export class ToolBarComponent {
1151
1162
  (click)="showPopup()"
1152
1163
  >
1153
1164
  </button>
1154
- <ng-container *ngIf="showScrollButtons && (hasScrollButtons.position === 'split' || hasScrollButtons.position === 'end')">
1165
+ }
1166
+ @if (showScrollButtons && (hasScrollButtons.position === 'split' || hasScrollButtons.position === 'end')) {
1155
1167
  <div class="k-toolbar-separator k-toolbar-button-separator k-separator" #scrollSeparator></div>
1156
- <span *ngIf="hasScrollButtons.position === 'split'" #nextScrollButton
1168
+ @if (hasScrollButtons.position === 'split') {
1169
+ <span #nextScrollButton
1157
1170
  kendoToolbarScrollableButton
1158
1171
  [prev]="false"
1159
1172
  [overflow]="normalizedOverflow"
@@ -1166,7 +1179,9 @@ export class ToolBarComponent {
1166
1179
  }"
1167
1180
  (onClick)="scrollTools($event)">
1168
1181
  </span>
1169
- <div class="k-button-group k-button-group-solid" *ngIf="hasScrollButtons.position === 'end'" #endButtonGroup>
1182
+ }
1183
+ @if (hasScrollButtons.position === 'end') {
1184
+ <div class="k-button-group k-button-group-solid" #endButtonGroup>
1170
1185
  <span #prevScrollButton
1171
1186
  kendoToolbarScrollableButton
1172
1187
  [prev]="true"
@@ -1194,7 +1209,8 @@ export class ToolBarComponent {
1194
1209
  (onClick)="scrollTools($event)">
1195
1210
  </span>
1196
1211
  </div>
1197
- </ng-container>
1212
+ }
1213
+ }
1198
1214
  <ng-template #popupTemplate>
1199
1215
  <div
1200
1216
  class="k-menu-group k-menu-group-md"
@@ -1202,21 +1218,22 @@ export class ToolBarComponent {
1202
1218
  [id]="popupId"
1203
1219
  [attr.dir]="direction === 'rtl' ? 'rtl' : null"
1204
1220
  [attr.aria-labelledby]="overflowBtnId">
1205
- <ng-container *ngFor="let tool of overflowTools; let index = index">
1206
- <ng-template
1207
- *ngIf="tool.popupTemplate"
1208
- kendoToolbarRenderer
1209
- [tool]="tool"
1210
- location="overflow"
1211
- [resizable]="resizable"
1212
- (rendererClick)="onRendererClick($event)"
1213
- [ngTemplateOutlet]="tool.isBuiltInTool ? tool.popupTemplate : popupWrapper"></ng-template>
1221
+ @for (tool of overflowTools; track tool; let index = $index) {
1222
+ @if (tool.popupTemplate) {
1223
+ <ng-template
1224
+ kendoToolbarRenderer
1225
+ [tool]="tool"
1226
+ location="overflow"
1227
+ [resizable]="resizable"
1228
+ (rendererClick)="onRendererClick($event)"
1229
+ [ngTemplateOutlet]="tool.isBuiltInTool ? tool.popupTemplate : popupWrapper"></ng-template>
1230
+ }
1214
1231
  <ng-template #popupWrapper>
1215
1232
  <div role="menuitem" tabindex="-1" class="k-item k-menu-item">
1216
1233
  <ng-container [ngTemplateOutlet]="tool.popupTemplate"></ng-container>
1217
1234
  </div>
1218
1235
  </ng-template>
1219
- </ng-container>
1236
+ }
1220
1237
  </div>
1221
1238
  </ng-template>
1222
1239
  <ng-template #popupSectionTemplate>
@@ -1226,22 +1243,26 @@ export class ToolBarComponent {
1226
1243
  [id]="popupId"
1227
1244
  [attr.dir]="direction === 'rtl' ? 'rtl' : null"
1228
1245
  [attr.aria-labelledby]="overflowBtnId">
1229
- <ng-container *ngFor="let tool of overflowTools; let index = index"
1230
- kendoToolbarRenderer
1231
- [tool]="tool"
1232
- location="section"
1233
- [resizable]="resizable"
1234
- (rendererClick)="onRendererClick($event)"
1235
- [ngTemplateOutlet]="tool.isBuiltInTool ? tool.sectionTemplate : wrapper">
1236
- <ng-template #wrapper>
1237
- <ng-container [ngTemplateOutlet]="tool.sectionTemplate"></ng-container>
1238
- </ng-template>
1239
- </ng-container>
1246
+ @for (tool of overflowTools; track tool; let index = $index) {
1247
+ <ng-container
1248
+ kendoToolbarRenderer
1249
+ [tool]="tool"
1250
+ location="section"
1251
+ [resizable]="resizable"
1252
+ (rendererClick)="onRendererClick($event)"
1253
+ [ngTemplateOutlet]="tool.isBuiltInTool ? tool.sectionTemplate : wrapper">
1254
+ <ng-template #wrapper>
1255
+ <ng-container [ngTemplateOutlet]="tool.sectionTemplate"></ng-container>
1256
+ </ng-template>
1257
+ </ng-container>
1258
+ }
1240
1259
  </span>
1241
1260
  </ng-template>
1242
1261
  <ng-container #container></ng-container>
1243
- <kendo-resize-sensor *ngIf="overflowEnabled" #resizeSensor></kendo-resize-sensor>
1244
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: LocalizedToolbarMessagesDirective, selector: "[kendoToolbarLocalizedMessages]" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: ToolBarRendererComponent, selector: "[kendoToolbarRenderer]", inputs: ["tool", "location", "resizable"], outputs: ["rendererClick"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: ToolbarScrollableButtonComponent, selector: "[kendoToolbarScrollableButton]", inputs: ["prev", "overflow"], outputs: ["onClick"] }] });
1262
+ @if (overflowEnabled) {
1263
+ <kendo-resize-sensor #resizeSensor></kendo-resize-sensor>
1264
+ }
1265
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: LocalizedToolbarMessagesDirective, selector: "[kendoToolbarLocalizedMessages]" }, { kind: "directive", type: ToolBarRendererComponent, selector: "[kendoToolbarRenderer]", inputs: ["tool", "location", "resizable"], outputs: ["rendererClick"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: ToolbarScrollableButtonComponent, selector: "[kendoToolbarScrollableButton]", inputs: ["prev", "overflow"], outputs: ["onClick"] }] });
1245
1266
  }
1246
1267
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolBarComponent, decorators: [{
1247
1268
  type: Component,
@@ -1271,21 +1292,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
1271
1292
  nextToolButton="Scroll right"
1272
1293
  >
1273
1294
  </ng-container>
1274
- <ng-container *ngIf="showScrollButtons && (hasScrollButtons.position === 'split' || hasScrollButtons.position === 'start')">
1275
- <span *ngIf="hasScrollButtons.position === 'split'" #prevScrollButton
1276
- kendoToolbarScrollableButton
1277
- [prev]="true"
1278
- [overflow]="normalizedOverflow"
1279
- [title]="getScrollButtonTitle('prev')"
1280
- class="k-toolbar-prev k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
1281
- [ngClass]="{
1282
- 'k-button-sm': size === 'small',
1283
- 'k-button-md': size === 'medium' || !size,
1284
- 'k-button-lg': size === 'large'
1285
- }"
1286
- (onClick)="scrollTools($event)">
1287
- </span>
1288
- <div class="k-button-group k-button-group-solid" *ngIf="hasScrollButtons.position === 'start'" #startButtonGroup>
1295
+ @if (showScrollButtons && (hasScrollButtons.position === 'split' || hasScrollButtons.position === 'start')) {
1296
+ @if (hasScrollButtons.position === 'split') {
1297
+ <span #prevScrollButton
1298
+ kendoToolbarScrollableButton
1299
+ [prev]="true"
1300
+ [overflow]="normalizedOverflow"
1301
+ [title]="getScrollButtonTitle('prev')"
1302
+ class="k-toolbar-prev k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
1303
+ [ngClass]="{
1304
+ 'k-button-sm': size === 'small',
1305
+ 'k-button-md': size === 'medium' || !size,
1306
+ 'k-button-lg': size === 'large'
1307
+ }"
1308
+ (onClick)="scrollTools($event)">
1309
+ </span>
1310
+ }
1311
+ @if (hasScrollButtons.position === 'start') {
1312
+ <div class="k-button-group k-button-group-solid" #startButtonGroup>
1289
1313
  <span #prevScrollButton
1290
1314
  kendoToolbarScrollableButton
1291
1315
  [prev]="true"
@@ -1313,10 +1337,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
1313
1337
  (onClick)="scrollTools($event)">
1314
1338
  </span>
1315
1339
  </div>
1340
+ }
1316
1341
  <div class="k-toolbar-separator k-toolbar-button-separator k-separator" #scrollSeparator></div>
1317
- </ng-container>
1318
- <div class="k-toolbar-items k-toolbar-items-scroll" tabindex="-1" *ngIf="isScrollMode; else noScroll" #scrollContainer>
1319
- <ng-container *ngFor="let tool of allTools; let index = index"
1342
+ }
1343
+ @if (isScrollMode) {
1344
+ <div class="k-toolbar-items k-toolbar-items-scroll" tabindex="-1" #scrollContainer>
1345
+ @for (tool of allTools; track tool; let index = $index) {
1346
+ <ng-container
1320
1347
  kendoToolbarRenderer
1321
1348
  [tool]="tool"
1322
1349
  location="toolbar"
@@ -1329,9 +1356,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
1329
1356
  </div>
1330
1357
  </ng-template>
1331
1358
  </ng-container>
1359
+ }
1332
1360
  </div>
1333
- <ng-template #noScroll>
1334
- <ng-container *ngFor="let tool of allTools; let index = index"
1361
+ } @else {
1362
+ @for (tool of allTools; track tool; let index = $index) {
1363
+ <ng-container
1335
1364
  kendoToolbarRenderer
1336
1365
  [tool]="tool"
1337
1366
  location="toolbar"
@@ -1344,9 +1373,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
1344
1373
  </div>
1345
1374
  </ng-template>
1346
1375
  </ng-container>
1347
- </ng-template>
1348
- <div class="k-toolbar-separator k-toolbar-button-separator k-separator" *ngIf="showOverflowSeparator"></div>
1349
- <button
1376
+ }
1377
+ }
1378
+ @if (showOverflowSeparator) {
1379
+ <div class="k-toolbar-separator k-toolbar-button-separator k-separator"></div>
1380
+ }
1381
+ @if (showMenu) {
1382
+ <button
1350
1383
  kendoButton
1351
1384
  fillMode="flat"
1352
1385
  #overflowButton
@@ -1359,7 +1392,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
1359
1392
  [attr.aria-expanded]="popupOpen"
1360
1393
  [id]="overflowBtnId"
1361
1394
  [attr.aria-haspopup]="normalizedOverflow.mode === 'section' ? null : 'menu'"
1362
- *ngIf="showMenu"
1363
1395
  [style.visibility]="'hidden'"
1364
1396
  [style.position]="'relative'"
1365
1397
  class="k-toolbar-overflow-button"
@@ -1367,9 +1399,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
1367
1399
  (click)="showPopup()"
1368
1400
  >
1369
1401
  </button>
1370
- <ng-container *ngIf="showScrollButtons && (hasScrollButtons.position === 'split' || hasScrollButtons.position === 'end')">
1402
+ }
1403
+ @if (showScrollButtons && (hasScrollButtons.position === 'split' || hasScrollButtons.position === 'end')) {
1371
1404
  <div class="k-toolbar-separator k-toolbar-button-separator k-separator" #scrollSeparator></div>
1372
- <span *ngIf="hasScrollButtons.position === 'split'" #nextScrollButton
1405
+ @if (hasScrollButtons.position === 'split') {
1406
+ <span #nextScrollButton
1373
1407
  kendoToolbarScrollableButton
1374
1408
  [prev]="false"
1375
1409
  [overflow]="normalizedOverflow"
@@ -1382,7 +1416,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
1382
1416
  }"
1383
1417
  (onClick)="scrollTools($event)">
1384
1418
  </span>
1385
- <div class="k-button-group k-button-group-solid" *ngIf="hasScrollButtons.position === 'end'" #endButtonGroup>
1419
+ }
1420
+ @if (hasScrollButtons.position === 'end') {
1421
+ <div class="k-button-group k-button-group-solid" #endButtonGroup>
1386
1422
  <span #prevScrollButton
1387
1423
  kendoToolbarScrollableButton
1388
1424
  [prev]="true"
@@ -1410,7 +1446,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
1410
1446
  (onClick)="scrollTools($event)">
1411
1447
  </span>
1412
1448
  </div>
1413
- </ng-container>
1449
+ }
1450
+ }
1414
1451
  <ng-template #popupTemplate>
1415
1452
  <div
1416
1453
  class="k-menu-group k-menu-group-md"
@@ -1418,21 +1455,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
1418
1455
  [id]="popupId"
1419
1456
  [attr.dir]="direction === 'rtl' ? 'rtl' : null"
1420
1457
  [attr.aria-labelledby]="overflowBtnId">
1421
- <ng-container *ngFor="let tool of overflowTools; let index = index">
1422
- <ng-template
1423
- *ngIf="tool.popupTemplate"
1424
- kendoToolbarRenderer
1425
- [tool]="tool"
1426
- location="overflow"
1427
- [resizable]="resizable"
1428
- (rendererClick)="onRendererClick($event)"
1429
- [ngTemplateOutlet]="tool.isBuiltInTool ? tool.popupTemplate : popupWrapper"></ng-template>
1458
+ @for (tool of overflowTools; track tool; let index = $index) {
1459
+ @if (tool.popupTemplate) {
1460
+ <ng-template
1461
+ kendoToolbarRenderer
1462
+ [tool]="tool"
1463
+ location="overflow"
1464
+ [resizable]="resizable"
1465
+ (rendererClick)="onRendererClick($event)"
1466
+ [ngTemplateOutlet]="tool.isBuiltInTool ? tool.popupTemplate : popupWrapper"></ng-template>
1467
+ }
1430
1468
  <ng-template #popupWrapper>
1431
1469
  <div role="menuitem" tabindex="-1" class="k-item k-menu-item">
1432
1470
  <ng-container [ngTemplateOutlet]="tool.popupTemplate"></ng-container>
1433
1471
  </div>
1434
1472
  </ng-template>
1435
- </ng-container>
1473
+ }
1436
1474
  </div>
1437
1475
  </ng-template>
1438
1476
  <ng-template #popupSectionTemplate>
@@ -1442,24 +1480,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
1442
1480
  [id]="popupId"
1443
1481
  [attr.dir]="direction === 'rtl' ? 'rtl' : null"
1444
1482
  [attr.aria-labelledby]="overflowBtnId">
1445
- <ng-container *ngFor="let tool of overflowTools; let index = index"
1446
- kendoToolbarRenderer
1447
- [tool]="tool"
1448
- location="section"
1449
- [resizable]="resizable"
1450
- (rendererClick)="onRendererClick($event)"
1451
- [ngTemplateOutlet]="tool.isBuiltInTool ? tool.sectionTemplate : wrapper">
1452
- <ng-template #wrapper>
1453
- <ng-container [ngTemplateOutlet]="tool.sectionTemplate"></ng-container>
1454
- </ng-template>
1455
- </ng-container>
1483
+ @for (tool of overflowTools; track tool; let index = $index) {
1484
+ <ng-container
1485
+ kendoToolbarRenderer
1486
+ [tool]="tool"
1487
+ location="section"
1488
+ [resizable]="resizable"
1489
+ (rendererClick)="onRendererClick($event)"
1490
+ [ngTemplateOutlet]="tool.isBuiltInTool ? tool.sectionTemplate : wrapper">
1491
+ <ng-template #wrapper>
1492
+ <ng-container [ngTemplateOutlet]="tool.sectionTemplate"></ng-container>
1493
+ </ng-template>
1494
+ </ng-container>
1495
+ }
1456
1496
  </span>
1457
1497
  </ng-template>
1458
1498
  <ng-container #container></ng-container>
1459
- <kendo-resize-sensor *ngIf="overflowEnabled" #resizeSensor></kendo-resize-sensor>
1499
+ @if (overflowEnabled) {
1500
+ <kendo-resize-sensor #resizeSensor></kendo-resize-sensor>
1501
+ }
1460
1502
  `,
1461
1503
  standalone: true,
1462
- imports: [NgTemplateOutlet, LocalizedToolbarMessagesDirective, NgFor, ToolBarRendererComponent, NgIf, ButtonComponent, NgClass, ResizeSensorComponent, ToolbarScrollableButtonComponent]
1504
+ imports: [NgTemplateOutlet, LocalizedToolbarMessagesDirective, ToolBarRendererComponent, ButtonComponent, NgClass, ResizeSensorComponent, ToolbarScrollableButtonComponent]
1463
1505
  }]
1464
1506
  }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.PopupService }, { type: i3.RefreshService }, { type: i4.NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i5.ToolbarToolsService }, { type: i6.ScrollService }], propDecorators: { overflow: [{
1465
1507
  type: Input