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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/avatar/l10n/messages.d.ts +1 -1
  2. package/fesm2022/progress-kendo-angular-layout.mjs +290 -290
  3. package/package.json +12 -20
  4. package/stepper/localization/messages.d.ts +1 -1
  5. package/tabstrip/localization/messages.d.ts +1 -1
  6. package/timeline/localization/messages.d.ts +1 -1
  7. package/esm2022/avatar/avatar.component.mjs +0 -406
  8. package/esm2022/avatar/l10n/custom-messages.component.mjs +0 -53
  9. package/esm2022/avatar/l10n/localized-messages.directive.mjs +0 -40
  10. package/esm2022/avatar/l10n/messages.mjs +0 -27
  11. package/esm2022/avatar/models/fill.mjs +0 -5
  12. package/esm2022/avatar/models/models.mjs +0 -9
  13. package/esm2022/avatar/models/rounded.mjs +0 -5
  14. package/esm2022/avatar/models/shape.mjs +0 -5
  15. package/esm2022/avatar/models/size.mjs +0 -5
  16. package/esm2022/avatar/models/theme-color.mjs +0 -5
  17. package/esm2022/avatar.module.mjs +0 -38
  18. package/esm2022/card/card-actions.component.mjs +0 -177
  19. package/esm2022/card/card-body.component.mjs +0 -37
  20. package/esm2022/card/card-footer.component.mjs +0 -37
  21. package/esm2022/card/card-header.component.mjs +0 -38
  22. package/esm2022/card/card.component.mjs +0 -118
  23. package/esm2022/card/directives/card-media.directive.mjs +0 -33
  24. package/esm2022/card/directives/card-separator.directive.mjs +0 -61
  25. package/esm2022/card/directives/card-subtitle.directive.mjs +0 -31
  26. package/esm2022/card/directives/card-title.directive.mjs +0 -31
  27. package/esm2022/card/models/actions-layout.mjs +0 -5
  28. package/esm2022/card/models/card-action.mjs +0 -21
  29. package/esm2022/card.module.mjs +0 -45
  30. package/esm2022/common/direction.mjs +0 -5
  31. package/esm2022/common/dom-queries.mjs +0 -47
  32. package/esm2022/common/orientation.mjs +0 -5
  33. package/esm2022/common/preventable-event.mjs +0 -31
  34. package/esm2022/common/styling-classes.mjs +0 -5
  35. package/esm2022/common/util.mjs +0 -85
  36. package/esm2022/directives.mjs +0 -174
  37. package/esm2022/drawer/animations.mjs +0 -146
  38. package/esm2022/drawer/drawer-container.component.mjs +0 -135
  39. package/esm2022/drawer/drawer-content.component.mjs +0 -39
  40. package/esm2022/drawer/drawer.component.mjs +0 -471
  41. package/esm2022/drawer/drawer.service.mjs +0 -105
  42. package/esm2022/drawer/events/drawer-list-select.event.mjs +0 -29
  43. package/esm2022/drawer/events/select-event.mjs +0 -33
  44. package/esm2022/drawer/item.component.mjs +0 -210
  45. package/esm2022/drawer/list.component.mjs +0 -165
  46. package/esm2022/drawer/models/constants.mjs +0 -8
  47. package/esm2022/drawer/models/drawer-animation.interface.mjs +0 -5
  48. package/esm2022/drawer/models/drawer-item-expand.interface.mjs +0 -5
  49. package/esm2022/drawer/models/drawer-item.interface.mjs +0 -5
  50. package/esm2022/drawer/models/drawer-view-item.interface.mjs +0 -5
  51. package/esm2022/drawer/models/mode.mjs +0 -5
  52. package/esm2022/drawer/models/position.mjs +0 -5
  53. package/esm2022/drawer/template-directives/drawer-template.directive.mjs +0 -43
  54. package/esm2022/drawer/template-directives/footer-template.directive.mjs +0 -36
  55. package/esm2022/drawer/template-directives/header-template.directive.mjs +0 -36
  56. package/esm2022/drawer/template-directives/item-template.directive.mjs +0 -44
  57. package/esm2022/drawer/template-directives.mjs +0 -8
  58. package/esm2022/drawer/types.mjs +0 -5
  59. package/esm2022/drawer/util.mjs +0 -16
  60. package/esm2022/drawer.module.mjs +0 -43
  61. package/esm2022/expansionpanel/animations.mjs +0 -23
  62. package/esm2022/expansionpanel/events/action-event.mjs +0 -21
  63. package/esm2022/expansionpanel/expansionpanel-title.directive.mjs +0 -38
  64. package/esm2022/expansionpanel/expansionpanel.component.mjs +0 -515
  65. package/esm2022/expansionpanel.module.mjs +0 -38
  66. package/esm2022/gridlayout.module.mjs +0 -38
  67. package/esm2022/index.mjs +0 -89
  68. package/esm2022/layout.module.mjs +0 -89
  69. package/esm2022/layouts/grid-layout.component.mjs +0 -179
  70. package/esm2022/layouts/gridlayout-item.component.mjs +0 -82
  71. package/esm2022/layouts/models/gridlayout-gap-settings.mjs +0 -5
  72. package/esm2022/layouts/models/gridlayout-row-col-size.mjs +0 -5
  73. package/esm2022/layouts/models/layout-align-settings.mjs +0 -5
  74. package/esm2022/layouts/models/layout-horizontal-align.mjs +0 -5
  75. package/esm2022/layouts/models/layout-vertical-align.mjs +0 -5
  76. package/esm2022/layouts/models.mjs +0 -10
  77. package/esm2022/layouts/stack-layout.component.mjs +0 -161
  78. package/esm2022/layouts/util.mjs +0 -101
  79. package/esm2022/package-metadata.mjs +0 -16
  80. package/esm2022/panelbar/events/collapse-event.mjs +0 -14
  81. package/esm2022/panelbar/events/expand-event.mjs +0 -14
  82. package/esm2022/panelbar/events/item-click-event.mjs +0 -17
  83. package/esm2022/panelbar/events/select-event.mjs +0 -14
  84. package/esm2022/panelbar/events/state-change-event.mjs +0 -13
  85. package/esm2022/panelbar/events.mjs +0 -9
  86. package/esm2022/panelbar/panelbar-content.directive.mjs +0 -36
  87. package/esm2022/panelbar/panelbar-expand-mode.mjs +0 -29
  88. package/esm2022/panelbar/panelbar-item-model.mjs +0 -5
  89. package/esm2022/panelbar/panelbar-item-template.directive.mjs +0 -37
  90. package/esm2022/panelbar/panelbar-item-title.directive.mjs +0 -42
  91. package/esm2022/panelbar/panelbar-item.component.mjs +0 -722
  92. package/esm2022/panelbar/panelbar.component.mjs +0 -705
  93. package/esm2022/panelbar/panelbar.service.mjs +0 -53
  94. package/esm2022/panelbar.module.mjs +0 -41
  95. package/esm2022/progress-kendo-angular-layout.mjs +0 -8
  96. package/esm2022/splitter/splitter-bar.component.mjs +0 -338
  97. package/esm2022/splitter/splitter-pane.component.mjs +0 -324
  98. package/esm2022/splitter/splitter.component.mjs +0 -301
  99. package/esm2022/splitter/splitter.service.mjs +0 -205
  100. package/esm2022/splitter/util.mjs +0 -34
  101. package/esm2022/splitter.module.mjs +0 -38
  102. package/esm2022/stacklayout.module.mjs +0 -37
  103. package/esm2022/stepper/events/activate-event.mjs +0 -33
  104. package/esm2022/stepper/list.component.mjs +0 -185
  105. package/esm2022/stepper/localization/custom-messages.component.mjs +0 -52
  106. package/esm2022/stepper/localization/localized-messages.directive.mjs +0 -41
  107. package/esm2022/stepper/localization/messages.mjs +0 -27
  108. package/esm2022/stepper/models/constants.mjs +0 -8
  109. package/esm2022/stepper/models/orientation.mjs +0 -5
  110. package/esm2022/stepper/models/step-predicate.mjs +0 -5
  111. package/esm2022/stepper/models/step-type.mjs +0 -5
  112. package/esm2022/stepper/models/stepper-step.interface.mjs +0 -5
  113. package/esm2022/stepper/step.component.mjs +0 -396
  114. package/esm2022/stepper/stepper.component.mjs +0 -423
  115. package/esm2022/stepper/stepper.service.mjs +0 -186
  116. package/esm2022/stepper/template-directives/indicator-template.directive.mjs +0 -37
  117. package/esm2022/stepper/template-directives/label-template.directive.mjs +0 -37
  118. package/esm2022/stepper/template-directives/step-template.directive.mjs +0 -39
  119. package/esm2022/stepper/template-directives.mjs +0 -7
  120. package/esm2022/stepper/types.mjs +0 -5
  121. package/esm2022/stepper.module.mjs +0 -41
  122. package/esm2022/tabstrip/constants.mjs +0 -29
  123. package/esm2022/tabstrip/directives/tab-content.directive.mjs +0 -39
  124. package/esm2022/tabstrip/directives/tab-title.directive.mjs +0 -37
  125. package/esm2022/tabstrip/directives/tab.directive.mjs +0 -24
  126. package/esm2022/tabstrip/events/select-event.mjs +0 -25
  127. package/esm2022/tabstrip/events/tabclose-event.mjs +0 -23
  128. package/esm2022/tabstrip/events/tabscroll-event.mjs +0 -23
  129. package/esm2022/tabstrip/events.mjs +0 -7
  130. package/esm2022/tabstrip/localization/custom-messages.component.mjs +0 -53
  131. package/esm2022/tabstrip/localization/localized-messages.directive.mjs +0 -39
  132. package/esm2022/tabstrip/localization/messages.mjs +0 -39
  133. package/esm2022/tabstrip/models/button-state-change.mjs +0 -5
  134. package/esm2022/tabstrip/models/scroll-button-type.mjs +0 -5
  135. package/esm2022/tabstrip/models/scroll-buttons-visibility.mjs +0 -5
  136. package/esm2022/tabstrip/models/scrollable-settings.mjs +0 -23
  137. package/esm2022/tabstrip/models/size.mjs +0 -5
  138. package/esm2022/tabstrip/models/tab-alignment.mjs +0 -5
  139. package/esm2022/tabstrip/models/tab-position.mjs +0 -5
  140. package/esm2022/tabstrip/models/tabstrip-tab.component.mjs +0 -130
  141. package/esm2022/tabstrip/rendering/tab.component.mjs +0 -182
  142. package/esm2022/tabstrip/scrollable-button.component.mjs +0 -182
  143. package/esm2022/tabstrip/tabstrip-scroll.service.mjs +0 -176
  144. package/esm2022/tabstrip/tabstrip.component.mjs +0 -954
  145. package/esm2022/tabstrip/tabstrip.service.mjs +0 -155
  146. package/esm2022/tabstrip/util.mjs +0 -120
  147. package/esm2022/tabstrip.module.mjs +0 -41
  148. package/esm2022/tilelayout/constants.mjs +0 -70
  149. package/esm2022/tilelayout/dragging-service.mjs +0 -421
  150. package/esm2022/tilelayout/keyboard-navigation.service.mjs +0 -189
  151. package/esm2022/tilelayout/models/dragging-config.interface.mjs +0 -5
  152. package/esm2022/tilelayout/models/flowmode.type.mjs +0 -5
  153. package/esm2022/tilelayout/models/gap.interface.mjs +0 -5
  154. package/esm2022/tilelayout/models/navigation.interface.mjs +0 -5
  155. package/esm2022/tilelayout/reorder-event.mjs +0 -43
  156. package/esm2022/tilelayout/resize-event.mjs +0 -37
  157. package/esm2022/tilelayout/tilelayout-item-body.component.mjs +0 -45
  158. package/esm2022/tilelayout/tilelayout-item-header.component.mjs +0 -43
  159. package/esm2022/tilelayout/tilelayout-item.component.mjs +0 -322
  160. package/esm2022/tilelayout/tilelayout-resize-handle.directive.mjs +0 -61
  161. package/esm2022/tilelayout/tilelayout.component.mjs +0 -388
  162. package/esm2022/tilelayout/util.mjs +0 -138
  163. package/esm2022/tilelayout.module.mjs +0 -40
  164. package/esm2022/timeline/events/navigation-direction.mjs +0 -5
  165. package/esm2022/timeline/localization/custom-messages.component.mjs +0 -43
  166. package/esm2022/timeline/localization/localized-messages.directive.mjs +0 -39
  167. package/esm2022/timeline/localization/messages.mjs +0 -33
  168. package/esm2022/timeline/models/anchor-target.mjs +0 -5
  169. package/esm2022/timeline/models/default-model-fields.mjs +0 -16
  170. package/esm2022/timeline/models/events-order.mjs +0 -5
  171. package/esm2022/timeline/models/model-fields.mjs +0 -5
  172. package/esm2022/timeline/models/timeline-event.mjs +0 -5
  173. package/esm2022/timeline/templates/timeline-card-actions.directive.mjs +0 -40
  174. package/esm2022/timeline/templates/timeline-card-body.directive.mjs +0 -40
  175. package/esm2022/timeline/templates/timeline-card-header.directive.mjs +0 -41
  176. package/esm2022/timeline/timeline-card.component.mjs +0 -451
  177. package/esm2022/timeline/timeline-horizontal.component.mjs +0 -781
  178. package/esm2022/timeline/timeline-vertical.component.mjs +0 -203
  179. package/esm2022/timeline/timeline.component.mjs +0 -491
  180. package/esm2022/timeline/timeline.service.mjs +0 -32
  181. package/esm2022/timeline/util.mjs +0 -26
  182. package/esm2022/timeline.module.mjs +0 -41
@@ -1,954 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Component, ContentChildren, ElementRef, EventEmitter, HostBinding, Input, Output, QueryList, ViewChild, ViewChildren, Renderer2, NgZone, isDevMode } from '@angular/core';
6
- import { animate, state, style, transition, trigger } from '@angular/animations';
7
- import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
8
- import { validatePackage } from '@progress/kendo-licensing';
9
- import { packageMetadata } from '../package-metadata';
10
- import { hasClass } from './../common/dom-queries';
11
- import { TabStripTabComponent } from './models/tabstrip-tab.component';
12
- import { TabStripService } from './tabstrip.service';
13
- import { ScrollService } from './tabstrip-scroll.service';
14
- import { Subscription } from 'rxjs';
15
- import { isFocusable } from '../common/dom-queries';
16
- import { getTabByIndex, isTablistHorizontal, tabStripHasScrollButtons, mouseScrollEnabled, resetTabFocus, getId } from './util';
17
- import { normalizeScrollableSettings } from './models/scrollable-settings';
18
- import { TabScrollEvent } from './events/tabscroll-event';
19
- import { TabStripScrollableButtonComponent } from './scrollable-button.component';
20
- import { take } from 'rxjs/operators';
21
- import { guid, isDocumentAvailable, shouldShowValidationUI, getLicenseMessage, WatermarkOverlayComponent, ResizeSensorComponent } from '@progress/kendo-angular-common';
22
- import { TabComponent } from './rendering/tab.component';
23
- import { NgTemplateOutlet, NgClass, NgStyle } from '@angular/common';
24
- import { LocalizedTabStripMessagesDirective } from './localization/localized-messages.directive';
25
- import * as i0 from "@angular/core";
26
- import * as i1 from "@progress/kendo-angular-l10n";
27
- import * as i2 from "./tabstrip.service";
28
- import * as i3 from "./tabstrip-scroll.service";
29
- /**
30
- * Represents the [Kendo UI TabStrip component for Angular]({% slug overview_tabstrip %}).
31
- *
32
- * @example
33
- * ```html
34
- * <kendo-tabstrip>
35
- * <kendo-tabstrip-tab [title]="'First Tab'">
36
- * <ng-template kendoTabContent>
37
- * <p>Content of the first tab.</p>
38
- * </ng-template>
39
- * </kendo-tabstrip-tab>
40
- * <kendo-tabstrip-tab [title]="'Second Tab'">
41
- * <ng-template kendoTabContent>
42
- * <p>Content of the second tab.</p>
43
- * </ng-template>
44
- * </kendo-tabstrip-tab>
45
- * </kendo-tabstrip>
46
- * ```
47
- * @remarks
48
- * Supported children components are: {@link TabStripCustomMessagesComponent}, {@link TabStripTabComponent}.
49
- */
50
- export class TabStripComponent {
51
- localization;
52
- renderer;
53
- wrapper;
54
- tabstripService;
55
- scrollService;
56
- ngZone;
57
- /**
58
- * Sets the height of the TabStrip.
59
- * Accepts a CSS size value, such as `100px`, `50%`, or `auto`.
60
- */
61
- set height(value) {
62
- this._height = value;
63
- this.renderer.setStyle(this.wrapper.nativeElement, 'height', value);
64
- }
65
- get height() {
66
- return this._height;
67
- }
68
- /**
69
- * Sets whether the TabStrip should animate when switching tabs.
70
- *
71
- * @default true
72
- */
73
- animate = true;
74
- /**
75
- * Sets the alignment of the tabs.
76
- *
77
- * @default 'start'
78
- */
79
- tabAlignment = 'start';
80
- /**
81
- * Sets the position of the tabs.
82
- *
83
- * @default 'top'
84
- */
85
- tabPosition = 'top';
86
- /**
87
- * Controls how the TabStrip renders tab content.
88
- *
89
- * The available options are:
90
- *
91
- * * `true`&mdash;Renders all tabs' content and persists them in the DOM.
92
- * * `false`&mdash;Removes inactive tabs' content from the DOM.
93
- * * `"loadOnDemand"`&mdash;Loads tabs' content only when activated for the first time. Inactive tabs' content is not rendered until the tab is activated.
94
- *
95
- * For more information, refer to the [Rendering Modes](slug:rendering_tabstrip) article.
96
- *
97
- * @default false
98
- */
99
- keepTabContent = false;
100
- /**
101
- * When set to `true`, renders a close button inside each tab.
102
- *
103
- * @default false
104
- */
105
- closable = false;
106
- /**
107
- * Enables scrolling of the tab list.
108
- * When set to `true` and the total size of all tabs exceeds the size of the TabStrip container, scroll buttons appear on each end of the tab list.
109
- *
110
- * @default false
111
- */
112
- set scrollable(value) {
113
- this._scrollableSettings = normalizeScrollableSettings(value);
114
- if (this.tablist) {
115
- this.toggleScrollButtons(this.scrollService.tabsOverflow);
116
- if (this.isScrollable && this.mouseScrollEnabled) {
117
- this.attachTablistScrollHandler(this.tablist.nativeElement);
118
- }
119
- }
120
- }
121
- get scrollable() {
122
- return this._scrollableSettings;
123
- }
124
- /**
125
- * Sets the size of the TabStrip.
126
- * [See example](slug:api_layout_tabstripcomponent#toc-size).
127
- * @default 'medium'
128
- */
129
- set size(value) {
130
- switch (value) {
131
- case 'small':
132
- this.renderer.removeClass(this.wrapper.nativeElement, 'k-tabstrip-md');
133
- this.renderer.removeClass(this.wrapper.nativeElement, 'k-tabstrip-lg');
134
- this.renderer.addClass(this.wrapper.nativeElement, 'k-tabstrip-sm');
135
- break;
136
- case 'medium':
137
- this.renderer.removeClass(this.wrapper.nativeElement, 'k-tabstrip-sm');
138
- this.renderer.removeClass(this.wrapper.nativeElement, 'k-tabstrip-lg');
139
- this.renderer.addClass(this.wrapper.nativeElement, 'k-tabstrip-md');
140
- break;
141
- case 'large':
142
- this.renderer.removeClass(this.wrapper.nativeElement, 'k-tabstrip-md');
143
- this.renderer.removeClass(this.wrapper.nativeElement, 'k-tabstrip-sm');
144
- this.renderer.addClass(this.wrapper.nativeElement, 'k-tabstrip-lg');
145
- break;
146
- case 'none':
147
- this.renderer.removeClass(this.wrapper.nativeElement, 'k-tabstrip-md');
148
- this.renderer.removeClass(this.wrapper.nativeElement, 'k-tabstrip-lg');
149
- this.renderer.removeClass(this.wrapper.nativeElement, 'k-tabstrip-sm');
150
- }
151
- this._size = value;
152
- this.ngZone.onStable.pipe(take(1)).subscribe(() => this.onResize());
153
- }
154
- get size() {
155
- return this._size;
156
- }
157
- /**
158
- * Defines the name of an existing font icon in the Kendo UI theme for the close icon.
159
- * @default 'x'
160
- */
161
- closeIcon = 'x';
162
- /**
163
- * Defines a custom CSS class, or multiple classes separated by spaces, applied to the close button.
164
- */
165
- closeIconClass;
166
- /**
167
- * Defines an SVGIcon to render for the close icon.
168
- * The input accepts either an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
169
- */
170
- set closeSVGIcon(icon) {
171
- if (isDevMode() && icon && this.closeIcon && this.closeIcon !== 'x') {
172
- throw new Error('Setting both closeIcon and svgIcon options at the same time is not supported.');
173
- }
174
- this._closeSVGIcon = icon;
175
- }
176
- get closeSVGIcon() {
177
- return this._closeSVGIcon;
178
- }
179
- /**
180
- * If set to `false`, the content area is hidden, but the tab headers are still visible.
181
- *
182
- * @default true
183
- */
184
- showContentArea = true;
185
- /**
186
- * Fires each time a tab is selected.
187
- * The event data contains the index of the selected tab and its title.
188
- */
189
- tabSelect = new EventEmitter();
190
- /**
191
- * Fires each time a tab is closed.
192
- * The event data contains the index of the closed tab and its instance.
193
- */
194
- tabClose = new EventEmitter();
195
- /**
196
- * Fires when the tab list is scrolled.
197
- * The event is preventable.
198
- */
199
- tabScroll = new EventEmitter();
200
- hostClasses = true;
201
- get tabsAtTop() {
202
- return this.tabPosition === 'top';
203
- }
204
- get tabsAtRight() {
205
- return this.tabPosition === 'right';
206
- }
207
- get tabsAtBottom() {
208
- return this.tabPosition === 'bottom';
209
- }
210
- get tabsAtLeft() {
211
- return this.tabPosition === 'left';
212
- }
213
- get dir() {
214
- return this.localization.rtl ? 'rtl' : 'ltr';
215
- }
216
- get tabStripScrollable() {
217
- return this._scrollableSettings.enabled;
218
- }
219
- get tabStripScrollableOverlay() {
220
- return this._scrollableSettings.enabled && !this.hasScrollButtons.visible;
221
- }
222
- /**
223
- * A query list of all declared tabs.
224
- */
225
- tabs = new QueryList();
226
- /**
227
- * @hidden
228
- */
229
- tablist;
230
- /**
231
- * @hidden
232
- */
233
- tabHeaderContainers;
234
- /**
235
- * @hidden
236
- */
237
- prevScrollButton;
238
- /**
239
- * @hidden
240
- */
241
- nextScrollButton;
242
- /**
243
- * @hidden
244
- */
245
- localizationChangeSubscription;
246
- /**
247
- * @hidden
248
- */
249
- showLicenseWatermark = false;
250
- /**
251
- * @hidden
252
- */
253
- licenseMessage;
254
- _height;
255
- _scrollableSettings = normalizeScrollableSettings(false);
256
- subscriptions = new Subscription();
257
- subscriptionsArePresent = false;
258
- _closeSVGIcon;
259
- tabStripId = guid();
260
- tabsChangesSub;
261
- activeStateChangeSub;
262
- _size = 'medium';
263
- constructor(localization, renderer, wrapper, tabstripService, scrollService, ngZone) {
264
- this.localization = localization;
265
- this.renderer = renderer;
266
- this.wrapper = wrapper;
267
- this.tabstripService = tabstripService;
268
- this.scrollService = scrollService;
269
- this.ngZone = ngZone;
270
- const isValid = validatePackage(packageMetadata);
271
- this.licenseMessage = getLicenseMessage(packageMetadata);
272
- this.showLicenseWatermark = shouldShowValidationUI(isValid);
273
- this.tabstripService.owner = this;
274
- this.scrollService.owner = this;
275
- this.subscriptions.add(this.scrollService.scrollButtonActiveStateChange.subscribe((activeButtonSettings) => {
276
- if (this.hasScrollButtons.visible) {
277
- const action = activeButtonSettings.active ? 'remove' : 'add';
278
- this.renderer[`${action}Class`](this[`${activeButtonSettings.buttonType}ScrollButton`].host.nativeElement, 'k-disabled');
279
- }
280
- }));
281
- }
282
- ngAfterViewInit() {
283
- if (!isDocumentAvailable()) {
284
- return;
285
- }
286
- this.ngZone.runOutsideAngular(() => {
287
- if (this.scrollService.tabsOverflow) {
288
- this.toggleScrollButtons(true);
289
- }
290
- else {
291
- this.toggleScrollButtons(false);
292
- }
293
- setTimeout(() => {
294
- this.scrollToSelectedTab();
295
- });
296
- });
297
- this.initDomEvents();
298
- this.tabsChangesSub = this.tabs.changes.subscribe(() => {
299
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
300
- this.toggleScrollButtons(this.scrollService.tabsOverflow);
301
- this.scrollService.toggleScrollButtonsState();
302
- });
303
- });
304
- this.isScrollable && !this.hasScrollButtons.visible && this.setScrollableOverlayClasses();
305
- }
306
- ngOnChanges(changes) {
307
- if (!isDocumentAvailable()) {
308
- return;
309
- }
310
- const positionChange = changes['tabPosition'];
311
- if (positionChange) {
312
- const tabsAtBottomChanged = positionChange.previousValue === 'bottom' || positionChange.currentValue === 'bottom';
313
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
314
- if (tabsAtBottomChanged) {
315
- if (this.subscriptionsArePresent) {
316
- this.subscriptions.unsubscribe();
317
- this.subscriptions = new Subscription();
318
- this.subscriptionsArePresent = false;
319
- this.activeStateChangeSub = this.scrollService.scrollButtonActiveStateChange.subscribe((activeButtonSettings) => {
320
- if (this.hasScrollButtons.visible) {
321
- const action = activeButtonSettings.active ? 'remove' : 'add';
322
- this.renderer[`${action}Class`](this[`${activeButtonSettings.buttonType}ScrollButton`].host.nativeElement, 'k-disabled');
323
- }
324
- });
325
- }
326
- this.initDomEvents();
327
- }
328
- this.scrollService.restoreScrollPosition();
329
- });
330
- }
331
- }
332
- ngOnDestroy() {
333
- if (this.subscriptions) {
334
- this.subscriptions.unsubscribe();
335
- }
336
- if (this.tabsChangesSub) {
337
- this.tabsChangesSub.unsubscribe();
338
- }
339
- if (this.activeStateChangeSub) {
340
- this.activeStateChangeSub.unsubscribe();
341
- }
342
- }
343
- /**
344
- * @hidden
345
- */
346
- get isScrollable() {
347
- return this._scrollableSettings.enabled;
348
- }
349
- /**
350
- * @hidden
351
- */
352
- get hasScrollButtons() {
353
- return tabStripHasScrollButtons(this._scrollableSettings);
354
- }
355
- /**
356
- * @hidden
357
- */
358
- get mouseScrollEnabled() {
359
- return mouseScrollEnabled(this._scrollableSettings);
360
- }
361
- /**
362
- * @hidden
363
- */
364
- get itemsWrapperClass() {
365
- return isTablistHorizontal(this.tabPosition) ? 'k-hstack' : 'k-vstack';
366
- }
367
- /**
368
- * Allows you to programmatically select a tab by its index.
369
- * If the tab is disabled, it will not be selected. The `tabSelect` event will not be fired.
370
- * @param {number} index The index of the tab that will be selected.
371
- */
372
- selectTab(index) {
373
- const tab = getTabByIndex(this.tabs, index);
374
- if (!tab || tab.disabled) {
375
- return;
376
- }
377
- this.tabstripService.selectTab(tab, index);
378
- this.scrollToSelectedTab();
379
- }
380
- /**
381
- * @hidden
382
- */
383
- getTabId(idx) {
384
- return getId('k-tabstrip-tab', this.tabStripId, idx);
385
- }
386
- /**
387
- * @hidden
388
- */
389
- getTabPanelId(idx) {
390
- return getId('k-tabstrip-tabpanel', this.tabStripId, idx);
391
- }
392
- /**
393
- * @hidden
394
- */
395
- onTabClick(originalEvent, tabIndex) {
396
- if (isFocusable(originalEvent.target)) {
397
- return;
398
- }
399
- const targetElement = originalEvent.target;
400
- const isTargetCloseButton = hasClass(targetElement, 'k-remove-tab') || hasClass(targetElement.parentElement, 'k-remove-tab');
401
- if (isTargetCloseButton) {
402
- return;
403
- }
404
- const tab = getTabByIndex(this.tabs, tabIndex);
405
- this.tabstripService.onTabSelect(tab, tabIndex);
406
- this.scrollToSelectedTab();
407
- }
408
- /**
409
- * @hidden
410
- */
411
- onResize() {
412
- if (this.scrollService.tabsOverflow) {
413
- this.toggleScrollButtons(true);
414
- }
415
- else {
416
- this.toggleScrollButtons(false);
417
- }
418
- this.ngZone.runOutsideAngular(() => {
419
- this.scrollService.toggleScrollButtonsState();
420
- });
421
- }
422
- /**
423
- * @hidden
424
- */
425
- scrollToSelectedTab() {
426
- if (this._scrollableSettings.enabled) {
427
- this.scrollService.scrollToSelectedTab();
428
- }
429
- }
430
- /**
431
- * @hidden
432
- */
433
- onScrollButtonClick(buttonType) {
434
- this.scrollService.scrollTabs(buttonType);
435
- }
436
- initDomEvents() {
437
- if (!this.wrapper || this.subscriptionsArePresent) {
438
- return;
439
- }
440
- const tablist = this.tablist.nativeElement;
441
- this.ngZone.runOutsideAngular(() => {
442
- this.subscriptions.add(this.renderer.listen(tablist, 'keydown', (ev) => {
443
- this.tabstripService.onKeyDown(ev);
444
- }));
445
- });
446
- this.subscriptions.add(this.renderer.listen(tablist, 'focusout', () => {
447
- resetTabFocus(this.tabs);
448
- }));
449
- if (this.isScrollable && this.mouseScrollEnabled) {
450
- this.attachTablistScrollHandler(tablist);
451
- }
452
- this.subscriptionsArePresent = true;
453
- }
454
- toggleScrollButtons(tabsOverflow) {
455
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
456
- const scrollButtonsSetting = this._scrollableSettings.scrollButtons;
457
- const scrollButtonsArePresent = this.prevScrollButton && this.nextScrollButton;
458
- const shouldShowButtons = scrollButtonsArePresent && tabsOverflow;
459
- const shouldHideButtons = scrollButtonsArePresent &&
460
- !tabsOverflow &&
461
- scrollButtonsSetting !== 'visible';
462
- const alwaysVisible = scrollButtonsSetting === 'visible';
463
- if (shouldHideButtons) {
464
- this.prevScrollButton.toggle(false);
465
- this.nextScrollButton.toggle(false);
466
- }
467
- else if (shouldShowButtons || alwaysVisible) {
468
- this.prevScrollButton.toggle(true);
469
- this.nextScrollButton.toggle(true);
470
- }
471
- if (scrollButtonsArePresent) {
472
- this.ngZone.runOutsideAngular(() => {
473
- this.scrollService.toggleScrollButtonsState();
474
- });
475
- }
476
- });
477
- }
478
- attachTablistScrollHandler(tablist) {
479
- this.ngZone.runOutsideAngular(() => {
480
- this.subscriptions.add(this.renderer.listen(tablist, 'scroll', (e) => {
481
- const scrollEvent = new TabScrollEvent({
482
- originalEvent: e
483
- });
484
- this.tabScroll.emit(scrollEvent);
485
- const isTabStripScrollEventPrevented = scrollEvent.isDefaultPrevented();
486
- if (isTabStripScrollEventPrevented || !this.scrollService.tabsOverflow) {
487
- return;
488
- }
489
- if (!this.hasScrollButtons.visible) {
490
- this.setScrollableOverlayClasses();
491
- }
492
- this.scrollService.onScroll(e);
493
- }));
494
- });
495
- }
496
- setScrollableOverlayClasses() {
497
- const wrapper = this.wrapper.nativeElement;
498
- const container = this.tablist?.nativeElement;
499
- if (!container) {
500
- return;
501
- }
502
- const scrollOffset = isTablistHorizontal(this.tabPosition) ? container.scrollLeft : container.scrollTop;
503
- if (scrollOffset === 0) {
504
- this.renderer.removeClass(wrapper, 'k-tabstrip-scrollable-end');
505
- this.renderer.addClass(wrapper, 'k-tabstrip-scrollable-start');
506
- }
507
- else if (scrollOffset > 0 && scrollOffset < this.scrollService.tablistOverflowSize) {
508
- this.renderer.removeClass(wrapper, 'k-tabstrip-scrollable-end');
509
- this.renderer.removeClass(wrapper, 'k-tabstrip-scrollable-start');
510
- }
511
- else {
512
- this.renderer.removeClass(wrapper, 'k-tabstrip-scrollable-start');
513
- this.renderer.addClass(wrapper, 'k-tabstrip-scrollable-end');
514
- }
515
- }
516
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TabStripComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i2.TabStripService }, { token: i3.ScrollService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
517
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TabStripComponent, isStandalone: true, selector: "kendo-tabstrip", inputs: { height: "height", animate: "animate", tabAlignment: "tabAlignment", tabPosition: "tabPosition", keepTabContent: "keepTabContent", closable: "closable", scrollable: "scrollable", size: "size", closeIcon: "closeIcon", closeIconClass: "closeIconClass", closeSVGIcon: "closeSVGIcon", showContentArea: "showContentArea" }, outputs: { tabSelect: "tabSelect", tabClose: "tabClose", tabScroll: "tabScroll" }, host: { properties: { "class.k-tabstrip": "this.hostClasses", "class.k-tabstrip-md": "this.hostClasses", "class.k-tabstrip-top": "this.tabsAtTop", "class.k-tabstrip-right": "this.tabsAtRight", "class.k-tabstrip-bottom": "this.tabsAtBottom", "class.k-tabstrip-left": "this.tabsAtLeft", "attr.dir": "this.dir", "class.k-tabstrip-scrollable": "this.tabStripScrollable", "class.k-tabstrip-scrollable-overlay": "this.tabStripScrollableOverlay" } }, providers: [
518
- TabStripService,
519
- ScrollService,
520
- LocalizationService,
521
- {
522
- provide: L10N_PREFIX,
523
- useValue: 'kendo.tabstrip'
524
- }
525
- ], queries: [{ propertyName: "tabs", predicate: TabStripTabComponent }], viewQueries: [{ propertyName: "tablist", first: true, predicate: ["tablist"], descendants: true }, { propertyName: "prevScrollButton", first: true, predicate: ["prevScrollButton"], descendants: true }, { propertyName: "nextScrollButton", first: true, predicate: ["nextScrollButton"], descendants: true }, { propertyName: "tabHeaderContainers", predicate: ["tabHeaderContainer"], descendants: true, read: ElementRef }], exportAs: ["kendoTabStrip"], usesOnChanges: true, ngImport: i0, template: `
526
- <ng-container kendoTabStripLocalizedMessages
527
- i18n-closeTitle="kendo.tabstrip.closeTitle|The title for the **Close** button in the TabStrip tab."
528
- closeTitle="Close"
529
-
530
- i18n-previousTabButton="kendo.tabstrip.previousTabButton|The title for the **Previous Tab** button when the Tabstrip is scrollable."
531
- previousTabButton="Previous Tab"
532
-
533
- i18n-nextTabButton="kendo.tabstrip.nextTabButton|The title for the **Next Tab** button when the Tabstrip is scrollable."
534
- nextTabButton="Next Tab"
535
- >
536
- </ng-container>
537
- @if (!tabsAtBottom) {
538
- <ng-container *ngTemplateOutlet="heading"></ng-container>
539
- @if (showContentArea) {
540
- <ng-container *ngTemplateOutlet="content"></ng-container>
541
- }
542
- }
543
-
544
- @if (tabsAtBottom) {
545
- @if (showContentArea) {
546
- <ng-container *ngTemplateOutlet="content"></ng-container>
547
- }
548
- <ng-container *ngTemplateOutlet="heading"></ng-container>
549
- }
550
- <ng-template #heading>
551
- <div class="k-tabstrip-items-wrapper" [class.k-tabstrip-items-wrapper-scroll]="mouseScrollEnabled" [ngClass]="itemsWrapperClass">
552
- @if (hasScrollButtons.visible && hasScrollButtons.position !== 'end') {
553
- <span
554
- role="button"
555
- #prevScrollButton
556
- kendoTabStripScrollableButton
557
- [scrollable]="scrollable"
558
- [tabPosition]="tabPosition"
559
- [prev]="true"
560
- [title]="localization.get('previousTabButton')"
561
- (tabScroll)="tabScroll.emit($event)"
562
- class="k-icon-button k-button k-button-flat k-button-flat-base"
563
- [ngClass]="{
564
- 'k-button-sm': size === 'small',
565
- 'k-button-md': size === 'medium' || !size,
566
- 'k-button-lg': size === 'large'
567
- }"
568
- (onClick)="onScrollButtonClick($event)"></span>
569
- }
570
- @if (hasScrollButtons.visible && hasScrollButtons.position === 'start') {
571
- <span
572
- role="button"
573
- #nextScrollButton
574
- kendoTabStripScrollableButton
575
- [scrollable]="scrollable"
576
- [tabPosition]="tabPosition"
577
- [prev]="false"
578
- [title]="localization.get('nextTabButton')"
579
- (tabScroll)="tabScroll.emit($event)"
580
- class="k-icon-button k-button k-button-flat k-button-flat-base"
581
- [ngClass]="{
582
- 'k-button-sm': size === 'small',
583
- 'k-button-md': size === 'medium' || !size,
584
- 'k-button-lg': size === 'large'
585
- }"
586
- (onClick)="onScrollButtonClick($event)"></span>
587
- }
588
- <ul role="tablist" #tablist
589
- class="k-reset k-tabstrip-items"
590
- [ngClass]="{
591
- 'k-tabstrip-items-start': tabAlignment === 'start',
592
- 'k-tabstrip-items-center': tabAlignment === 'center',
593
- 'k-tabstrip-items-end': tabAlignment === 'end',
594
- 'k-tabstrip-items-stretched': tabAlignment === 'stretched',
595
- 'k-tabstrip-items-justify': tabAlignment === 'justify',
596
- 'k-tabstrip-items-scroll': mouseScrollEnabled
597
- }"
598
- [attr.aria-orientation]="tabPosition === 'left' || tabPosition === 'right' ? 'vertical' : 'horizontal'"
599
- >
600
- @for (tab of tabs; track tab; let i = $index) {
601
- <li
602
- #tabHeaderContainer
603
- kendoTabStripTab
604
- [class.k-first]="i === 0"
605
- [class.k-last]="i === tabs.length - 1"
606
- [ngClass]="tab.cssClass"
607
- [ngStyle]="tab.cssStyle"
608
- [tab]="tab"
609
- [index]="i"
610
- role="tab"
611
- [tabStripClosable]="closable"
612
- [tabStripCloseIcon]="closeIcon"
613
- [customTabstripCloseIcon]="closeIconClass"
614
- [closeSVGIcon]="closeSVGIcon"
615
- (tabClose)="tabClose.emit($event)"
616
- (click)="onTabClick($event, i)"
617
- [id]="getTabId(i)"
618
- [attr.aria-controls]="(showContentArea && tab.selected) ? getTabPanelId(i) : undefined"></li>
619
- }
620
- </ul>
621
- @if (hasScrollButtons.visible && hasScrollButtons.position === 'end') {
622
- <span
623
- role="button"
624
- #prevScrollButton
625
- kendoTabStripScrollableButton
626
- [scrollable]="scrollable"
627
- [tabPosition]="tabPosition"
628
- [prev]="true"
629
- [title]="localization.get('previousTabButton')"
630
- (tabScroll)="tabScroll.emit($event)"
631
- class="k-icon-button k-button k-button-flat k-button-flat-base"
632
- [ngClass]="{
633
- 'k-button-sm': size === 'small',
634
- 'k-button-md': size === 'medium' || !size,
635
- 'k-button-lg': size === 'large'
636
- }"
637
- (onClick)="onScrollButtonClick($event)"></span>
638
- }
639
- @if (hasScrollButtons.visible && hasScrollButtons.position !== 'start') {
640
- <span
641
- role="button"
642
- #nextScrollButton
643
- kendoTabStripScrollableButton
644
- [scrollable]="scrollable"
645
- [tabPosition]="tabPosition"
646
- [prev]="false"
647
- [title]="localization.get('nextTabButton')"
648
- (tabScroll)="tabScroll.emit($event)"
649
- class="k-icon-button k-button k-button-flat k-button-flat-base"
650
- [ngClass]="{
651
- 'k-button-sm': size === 'small',
652
- 'k-button-md': size === 'medium' || !size,
653
- 'k-button-lg': size === 'large'
654
- }"
655
- (onClick)="onScrollButtonClick($event)"></span>
656
- }
657
- </div>
658
- </ng-template>
659
- <ng-template #content>
660
- @for (tab of tabs; track tab; let i = $index) {
661
- @if (tab.selected || keepTabContent !== false) {
662
- @defer (when tab.selected || keepTabContent === true; prefetch on idle) {
663
- <div
664
- [@state]="tab.selected && animate ? 'active' : 'inactive'"
665
- [ngClass]="!this.keepTabContent || tab.selected ? 'k-tabstrip-content k-active' : 'k-tabstrip-content'"
666
- [tabIndex]="0"
667
- role="tabpanel"
668
- [id]="getTabPanelId(i)"
669
- [attr.aria-hidden]="!tab.selected"
670
- [attr.aria-labelledby]="getTabId(i)"
671
- [attr.aria-disabled]="tab.disabled"
672
- >
673
- <ng-template [ngTemplateOutlet]="tab.tabContent?.templateRef"></ng-template>
674
- </div>
675
- }
676
- }
677
- }
678
- </ng-template>
679
- @if (isScrollable) {
680
- <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
681
- }
682
- @if (showLicenseWatermark) {
683
- <div kendoWatermarkOverlay [licenseMessage]="licenseMessage"></div>
684
- }
685
- `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedTabStripMessagesDirective, selector: "[kendoTabStripLocalizedMessages]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: TabStripScrollableButtonComponent, selector: "[kendoTabStripScrollableButton]", inputs: ["prev", "tabPosition", "scrollable"], outputs: ["tabScroll", "onClick"] }, { kind: "component", type: TabComponent, selector: "[kendoTabStripTab]", inputs: ["tab", "index", "tabStripClosable", "tabStripCloseIcon", "customTabstripCloseIcon", "closeSVGIcon"], outputs: ["tabClose"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]", inputs: ["licenseMessage"] }], animations: [
686
- trigger('state', [
687
- state('active', style({ opacity: 1 })),
688
- transition('* => active', [
689
- style({ opacity: 0 }),
690
- animate('400ms ease-in')
691
- ])
692
- ])
693
- ], deferBlockDependencies: [() => [NgTemplateOutlet, NgClass]] });
694
- }
695
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TabStripComponent, decorators: [{
696
- type: Component,
697
- args: [{
698
- animations: [
699
- trigger('state', [
700
- state('active', style({ opacity: 1 })),
701
- transition('* => active', [
702
- style({ opacity: 0 }),
703
- animate('400ms ease-in')
704
- ])
705
- ])
706
- ],
707
- providers: [
708
- TabStripService,
709
- ScrollService,
710
- LocalizationService,
711
- {
712
- provide: L10N_PREFIX,
713
- useValue: 'kendo.tabstrip'
714
- }
715
- ],
716
- exportAs: 'kendoTabStrip',
717
- selector: 'kendo-tabstrip',
718
- template: `
719
- <ng-container kendoTabStripLocalizedMessages
720
- i18n-closeTitle="kendo.tabstrip.closeTitle|The title for the **Close** button in the TabStrip tab."
721
- closeTitle="Close"
722
-
723
- i18n-previousTabButton="kendo.tabstrip.previousTabButton|The title for the **Previous Tab** button when the Tabstrip is scrollable."
724
- previousTabButton="Previous Tab"
725
-
726
- i18n-nextTabButton="kendo.tabstrip.nextTabButton|The title for the **Next Tab** button when the Tabstrip is scrollable."
727
- nextTabButton="Next Tab"
728
- >
729
- </ng-container>
730
- @if (!tabsAtBottom) {
731
- <ng-container *ngTemplateOutlet="heading"></ng-container>
732
- @if (showContentArea) {
733
- <ng-container *ngTemplateOutlet="content"></ng-container>
734
- }
735
- }
736
-
737
- @if (tabsAtBottom) {
738
- @if (showContentArea) {
739
- <ng-container *ngTemplateOutlet="content"></ng-container>
740
- }
741
- <ng-container *ngTemplateOutlet="heading"></ng-container>
742
- }
743
- <ng-template #heading>
744
- <div class="k-tabstrip-items-wrapper" [class.k-tabstrip-items-wrapper-scroll]="mouseScrollEnabled" [ngClass]="itemsWrapperClass">
745
- @if (hasScrollButtons.visible && hasScrollButtons.position !== 'end') {
746
- <span
747
- role="button"
748
- #prevScrollButton
749
- kendoTabStripScrollableButton
750
- [scrollable]="scrollable"
751
- [tabPosition]="tabPosition"
752
- [prev]="true"
753
- [title]="localization.get('previousTabButton')"
754
- (tabScroll)="tabScroll.emit($event)"
755
- class="k-icon-button k-button k-button-flat k-button-flat-base"
756
- [ngClass]="{
757
- 'k-button-sm': size === 'small',
758
- 'k-button-md': size === 'medium' || !size,
759
- 'k-button-lg': size === 'large'
760
- }"
761
- (onClick)="onScrollButtonClick($event)"></span>
762
- }
763
- @if (hasScrollButtons.visible && hasScrollButtons.position === 'start') {
764
- <span
765
- role="button"
766
- #nextScrollButton
767
- kendoTabStripScrollableButton
768
- [scrollable]="scrollable"
769
- [tabPosition]="tabPosition"
770
- [prev]="false"
771
- [title]="localization.get('nextTabButton')"
772
- (tabScroll)="tabScroll.emit($event)"
773
- class="k-icon-button k-button k-button-flat k-button-flat-base"
774
- [ngClass]="{
775
- 'k-button-sm': size === 'small',
776
- 'k-button-md': size === 'medium' || !size,
777
- 'k-button-lg': size === 'large'
778
- }"
779
- (onClick)="onScrollButtonClick($event)"></span>
780
- }
781
- <ul role="tablist" #tablist
782
- class="k-reset k-tabstrip-items"
783
- [ngClass]="{
784
- 'k-tabstrip-items-start': tabAlignment === 'start',
785
- 'k-tabstrip-items-center': tabAlignment === 'center',
786
- 'k-tabstrip-items-end': tabAlignment === 'end',
787
- 'k-tabstrip-items-stretched': tabAlignment === 'stretched',
788
- 'k-tabstrip-items-justify': tabAlignment === 'justify',
789
- 'k-tabstrip-items-scroll': mouseScrollEnabled
790
- }"
791
- [attr.aria-orientation]="tabPosition === 'left' || tabPosition === 'right' ? 'vertical' : 'horizontal'"
792
- >
793
- @for (tab of tabs; track tab; let i = $index) {
794
- <li
795
- #tabHeaderContainer
796
- kendoTabStripTab
797
- [class.k-first]="i === 0"
798
- [class.k-last]="i === tabs.length - 1"
799
- [ngClass]="tab.cssClass"
800
- [ngStyle]="tab.cssStyle"
801
- [tab]="tab"
802
- [index]="i"
803
- role="tab"
804
- [tabStripClosable]="closable"
805
- [tabStripCloseIcon]="closeIcon"
806
- [customTabstripCloseIcon]="closeIconClass"
807
- [closeSVGIcon]="closeSVGIcon"
808
- (tabClose)="tabClose.emit($event)"
809
- (click)="onTabClick($event, i)"
810
- [id]="getTabId(i)"
811
- [attr.aria-controls]="(showContentArea && tab.selected) ? getTabPanelId(i) : undefined"></li>
812
- }
813
- </ul>
814
- @if (hasScrollButtons.visible && hasScrollButtons.position === 'end') {
815
- <span
816
- role="button"
817
- #prevScrollButton
818
- kendoTabStripScrollableButton
819
- [scrollable]="scrollable"
820
- [tabPosition]="tabPosition"
821
- [prev]="true"
822
- [title]="localization.get('previousTabButton')"
823
- (tabScroll)="tabScroll.emit($event)"
824
- class="k-icon-button k-button k-button-flat k-button-flat-base"
825
- [ngClass]="{
826
- 'k-button-sm': size === 'small',
827
- 'k-button-md': size === 'medium' || !size,
828
- 'k-button-lg': size === 'large'
829
- }"
830
- (onClick)="onScrollButtonClick($event)"></span>
831
- }
832
- @if (hasScrollButtons.visible && hasScrollButtons.position !== 'start') {
833
- <span
834
- role="button"
835
- #nextScrollButton
836
- kendoTabStripScrollableButton
837
- [scrollable]="scrollable"
838
- [tabPosition]="tabPosition"
839
- [prev]="false"
840
- [title]="localization.get('nextTabButton')"
841
- (tabScroll)="tabScroll.emit($event)"
842
- class="k-icon-button k-button k-button-flat k-button-flat-base"
843
- [ngClass]="{
844
- 'k-button-sm': size === 'small',
845
- 'k-button-md': size === 'medium' || !size,
846
- 'k-button-lg': size === 'large'
847
- }"
848
- (onClick)="onScrollButtonClick($event)"></span>
849
- }
850
- </div>
851
- </ng-template>
852
- <ng-template #content>
853
- @for (tab of tabs; track tab; let i = $index) {
854
- @if (tab.selected || keepTabContent !== false) {
855
- @defer (when tab.selected || keepTabContent === true; prefetch on idle) {
856
- <div
857
- [@state]="tab.selected && animate ? 'active' : 'inactive'"
858
- [ngClass]="!this.keepTabContent || tab.selected ? 'k-tabstrip-content k-active' : 'k-tabstrip-content'"
859
- [tabIndex]="0"
860
- role="tabpanel"
861
- [id]="getTabPanelId(i)"
862
- [attr.aria-hidden]="!tab.selected"
863
- [attr.aria-labelledby]="getTabId(i)"
864
- [attr.aria-disabled]="tab.disabled"
865
- >
866
- <ng-template [ngTemplateOutlet]="tab.tabContent?.templateRef"></ng-template>
867
- </div>
868
- }
869
- }
870
- }
871
- </ng-template>
872
- @if (isScrollable) {
873
- <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
874
- }
875
- @if (showLicenseWatermark) {
876
- <div kendoWatermarkOverlay [licenseMessage]="licenseMessage"></div>
877
- }
878
- `,
879
- standalone: true,
880
- imports: [LocalizedTabStripMessagesDirective, NgTemplateOutlet, NgClass, TabStripScrollableButtonComponent, TabComponent, NgStyle, ResizeSensorComponent, WatermarkOverlayComponent]
881
- }]
882
- }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i2.TabStripService }, { type: i3.ScrollService }, { type: i0.NgZone }], propDecorators: { height: [{
883
- type: Input
884
- }], animate: [{
885
- type: Input
886
- }], tabAlignment: [{
887
- type: Input
888
- }], tabPosition: [{
889
- type: Input
890
- }], keepTabContent: [{
891
- type: Input
892
- }], closable: [{
893
- type: Input
894
- }], scrollable: [{
895
- type: Input
896
- }], size: [{
897
- type: Input
898
- }], closeIcon: [{
899
- type: Input
900
- }], closeIconClass: [{
901
- type: Input
902
- }], closeSVGIcon: [{
903
- type: Input
904
- }], showContentArea: [{
905
- type: Input
906
- }], tabSelect: [{
907
- type: Output
908
- }], tabClose: [{
909
- type: Output
910
- }], tabScroll: [{
911
- type: Output
912
- }], hostClasses: [{
913
- type: HostBinding,
914
- args: ['class.k-tabstrip']
915
- }, {
916
- type: HostBinding,
917
- args: ['class.k-tabstrip-md']
918
- }], tabsAtTop: [{
919
- type: HostBinding,
920
- args: ['class.k-tabstrip-top']
921
- }], tabsAtRight: [{
922
- type: HostBinding,
923
- args: ['class.k-tabstrip-right']
924
- }], tabsAtBottom: [{
925
- type: HostBinding,
926
- args: ['class.k-tabstrip-bottom']
927
- }], tabsAtLeft: [{
928
- type: HostBinding,
929
- args: ['class.k-tabstrip-left']
930
- }], dir: [{
931
- type: HostBinding,
932
- args: ['attr.dir']
933
- }], tabStripScrollable: [{
934
- type: HostBinding,
935
- args: ['class.k-tabstrip-scrollable']
936
- }], tabStripScrollableOverlay: [{
937
- type: HostBinding,
938
- args: ['class.k-tabstrip-scrollable-overlay']
939
- }], tabs: [{
940
- type: ContentChildren,
941
- args: [TabStripTabComponent]
942
- }], tablist: [{
943
- type: ViewChild,
944
- args: ['tablist']
945
- }], tabHeaderContainers: [{
946
- type: ViewChildren,
947
- args: ['tabHeaderContainer', { read: ElementRef }]
948
- }], prevScrollButton: [{
949
- type: ViewChild,
950
- args: ['prevScrollButton']
951
- }], nextScrollButton: [{
952
- type: ViewChild,
953
- args: ['nextScrollButton']
954
- }] } });