@progress/kendo-angular-layout 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.
- package/codemods/utils.js +805 -394
- package/codemods/v19/tabstrip-mousescrollspeed.js +11 -15
- package/esm2022/avatar/avatar.component.mjs +63 -59
- package/esm2022/card/card-actions.component.mjs +51 -41
- package/esm2022/drawer/drawer-container.component.mjs +10 -8
- package/esm2022/drawer/drawer.component.mjs +69 -55
- package/esm2022/drawer/item.component.mjs +79 -69
- package/esm2022/drawer/list.component.mjs +30 -27
- package/esm2022/expansionpanel/expansionpanel.component.mjs +75 -65
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/panelbar/panelbar-item.component.mjs +169 -135
- package/esm2022/panelbar/panelbar.component.mjs +58 -47
- package/esm2022/splitter/splitter-bar.component.mjs +34 -27
- package/esm2022/splitter/splitter-pane.component.mjs +16 -10
- package/esm2022/splitter/splitter.component.mjs +29 -31
- package/esm2022/stepper/list.component.mjs +33 -33
- package/esm2022/stepper/step.component.mjs +141 -111
- package/esm2022/stepper/stepper.component.mjs +59 -55
- package/esm2022/stepper/stepper.service.mjs +2 -2
- package/esm2022/tabstrip/rendering/tab.component.mjs +49 -39
- package/esm2022/tabstrip/tabstrip.component.mjs +251 -233
- package/esm2022/tabstrip/tabstrip.service.mjs +2 -2
- package/esm2022/tabstrip/util.mjs +1 -1
- package/esm2022/tilelayout/keyboard-navigation.service.mjs +2 -2
- package/esm2022/tilelayout/tilelayout-item.component.mjs +28 -23
- package/esm2022/tilelayout/tilelayout.component.mjs +24 -21
- package/esm2022/timeline/models/events-order.mjs +5 -0
- package/esm2022/timeline/timeline-card.component.mjs +185 -151
- package/esm2022/timeline/timeline-horizontal.component.mjs +200 -192
- package/esm2022/timeline/timeline-vertical.component.mjs +79 -67
- package/esm2022/timeline/timeline.component.mjs +61 -34
- package/fesm2022/progress-kendo-angular-layout.mjs +1781 -1514
- package/index.d.ts +1 -0
- package/package.json +10 -11
- package/timeline/models/events-order.d.ts +10 -0
- package/timeline/timeline.component.d.ts +12 -1
- package/codemods/template-transformer/index.js +0 -93
|
@@ -20,7 +20,7 @@ import { TabStripScrollableButtonComponent } from './scrollable-button.component
|
|
|
20
20
|
import { take } from 'rxjs/operators';
|
|
21
21
|
import { guid, isDocumentAvailable, shouldShowValidationUI, getLicenseMessage, WatermarkOverlayComponent, ResizeSensorComponent } from '@progress/kendo-angular-common';
|
|
22
22
|
import { TabComponent } from './rendering/tab.component';
|
|
23
|
-
import {
|
|
23
|
+
import { NgTemplateOutlet, NgClass, NgStyle } from '@angular/common';
|
|
24
24
|
import { LocalizedTabStripMessagesDirective } from './localization/localized-messages.directive';
|
|
25
25
|
import * as i0 from "@angular/core";
|
|
26
26
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
@@ -506,7 +506,7 @@ export class TabStripComponent {
|
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
508
|
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 });
|
|
509
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
509
|
+
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: [
|
|
510
510
|
TabStripService,
|
|
511
511
|
ScrollService,
|
|
512
512
|
LocalizationService,
|
|
@@ -516,67 +516,69 @@ export class TabStripComponent {
|
|
|
516
516
|
}
|
|
517
517
|
], 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: `
|
|
518
518
|
<ng-container kendoTabStripLocalizedMessages
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
</ng-container>
|
|
529
|
-
<ng-container *ngIf="!tabsAtBottom">
|
|
530
|
-
<ng-container *ngTemplateOutlet="heading"></ng-container>
|
|
531
|
-
<ng-container *ngIf="showContentArea">
|
|
532
|
-
<ng-container *ngTemplateOutlet="content"></ng-container>
|
|
533
|
-
</ng-container>
|
|
534
|
-
</ng-container>
|
|
535
|
-
|
|
536
|
-
<ng-container *ngIf="tabsAtBottom">
|
|
537
|
-
<ng-container *ngIf="showContentArea">
|
|
538
|
-
<ng-container *ngTemplateOutlet="content"></ng-container>
|
|
539
|
-
</ng-container>
|
|
540
|
-
<ng-container *ngTemplateOutlet="heading"></ng-container>
|
|
519
|
+
i18n-closeTitle="kendo.tabstrip.closeTitle|The title for the **Close** button in the TabStrip tab."
|
|
520
|
+
closeTitle="Close"
|
|
521
|
+
|
|
522
|
+
i18n-previousTabButton="kendo.tabstrip.previousTabButton|The title for the **Previous Tab** button when the Tabstrip is scrollable."
|
|
523
|
+
previousTabButton="Previous Tab"
|
|
524
|
+
|
|
525
|
+
i18n-nextTabButton="kendo.tabstrip.nextTabButton|The title for the **Next Tab** button when the Tabstrip is scrollable."
|
|
526
|
+
nextTabButton="Next Tab"
|
|
527
|
+
>
|
|
541
528
|
</ng-container>
|
|
529
|
+
@if (!tabsAtBottom) {
|
|
530
|
+
<ng-container *ngTemplateOutlet="heading"></ng-container>
|
|
531
|
+
@if (showContentArea) {
|
|
532
|
+
<ng-container *ngTemplateOutlet="content"></ng-container>
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
@if (tabsAtBottom) {
|
|
537
|
+
@if (showContentArea) {
|
|
538
|
+
<ng-container *ngTemplateOutlet="content"></ng-container>
|
|
539
|
+
}
|
|
540
|
+
<ng-container *ngTemplateOutlet="heading"></ng-container>
|
|
541
|
+
}
|
|
542
542
|
<ng-template #heading>
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
543
|
+
<div class="k-tabstrip-items-wrapper" [class.k-tabstrip-items-wrapper-scroll]="mouseScrollEnabled" [ngClass]="itemsWrapperClass">
|
|
544
|
+
@if (hasScrollButtons.visible && hasScrollButtons.position !== 'end') {
|
|
545
|
+
<span
|
|
546
|
+
role="button"
|
|
547
|
+
#prevScrollButton
|
|
548
|
+
kendoTabStripScrollableButton
|
|
549
|
+
[scrollable]="scrollable"
|
|
550
|
+
[tabPosition]="tabPosition"
|
|
551
|
+
[prev]="true"
|
|
552
|
+
[title]="localization.get('previousTabButton')"
|
|
553
|
+
(tabScroll)="tabScroll.emit($event)"
|
|
554
|
+
class="k-icon-button k-button k-button-flat k-button-flat-base"
|
|
555
555
|
[ngClass]="{
|
|
556
556
|
'k-button-sm': size === 'small',
|
|
557
557
|
'k-button-md': size === 'medium' || !size,
|
|
558
558
|
'k-button-lg': size === 'large'
|
|
559
559
|
}"
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
560
|
+
(onClick)="onScrollButtonClick($event)"></span>
|
|
561
|
+
}
|
|
562
|
+
@if (hasScrollButtons.visible && hasScrollButtons.position === 'start') {
|
|
563
|
+
<span
|
|
564
|
+
role="button"
|
|
565
|
+
#nextScrollButton
|
|
566
|
+
kendoTabStripScrollableButton
|
|
567
|
+
[scrollable]="scrollable"
|
|
568
|
+
[tabPosition]="tabPosition"
|
|
569
|
+
[prev]="false"
|
|
570
|
+
[title]="localization.get('nextTabButton')"
|
|
571
|
+
(tabScroll)="tabScroll.emit($event)"
|
|
572
|
+
class="k-icon-button k-button k-button-flat k-button-flat-base"
|
|
572
573
|
[ngClass]="{
|
|
573
574
|
'k-button-sm': size === 'small',
|
|
574
575
|
'k-button-md': size === 'medium' || !size,
|
|
575
576
|
'k-button-lg': size === 'large'
|
|
576
577
|
}"
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
578
|
+
(onClick)="onScrollButtonClick($event)"></span>
|
|
579
|
+
}
|
|
580
|
+
<ul role="tablist" #tablist
|
|
581
|
+
class="k-reset k-tabstrip-items"
|
|
580
582
|
[ngClass]="{
|
|
581
583
|
'k-tabstrip-items-start': tabAlignment === 'start',
|
|
582
584
|
'k-tabstrip-items-center': tabAlignment === 'center',
|
|
@@ -585,86 +587,93 @@ export class TabStripComponent {
|
|
|
585
587
|
'k-tabstrip-items-justify': tabAlignment === 'justify',
|
|
586
588
|
'k-tabstrip-items-scroll': mouseScrollEnabled
|
|
587
589
|
}"
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
590
|
+
[attr.aria-orientation]="tabPosition === 'left' || tabPosition === 'right' ? 'vertical' : 'horizontal'"
|
|
591
|
+
>
|
|
592
|
+
@for (tab of tabs; track tab; let i = $index) {
|
|
593
|
+
<li
|
|
594
|
+
#tabHeaderContainer
|
|
595
|
+
kendoTabStripTab
|
|
596
|
+
[class.k-first]="i === 0"
|
|
597
|
+
[class.k-last]="i === tabs.length - 1"
|
|
598
|
+
[ngClass]="tab.cssClass"
|
|
599
|
+
[ngStyle]="tab.cssStyle"
|
|
600
|
+
[tab]="tab"
|
|
601
|
+
[index]="i"
|
|
602
|
+
role="tab"
|
|
603
|
+
[tabStripClosable]="closable"
|
|
604
|
+
[tabStripCloseIcon]="closeIcon"
|
|
605
|
+
[customTabstripCloseIcon]="closeIconClass"
|
|
606
|
+
[closeSVGIcon]="closeSVGIcon"
|
|
607
|
+
(tabClose)="tabClose.emit($event)"
|
|
608
|
+
(click)="onTabClick($event, i)"
|
|
609
|
+
[id]="getTabId(i)"
|
|
610
|
+
[attr.aria-controls]="(showContentArea && tab.selected) ? getTabPanelId(i) : undefined"></li>
|
|
611
|
+
}
|
|
612
|
+
</ul>
|
|
613
|
+
@if (hasScrollButtons.visible && hasScrollButtons.position === 'end') {
|
|
614
|
+
<span
|
|
615
|
+
role="button"
|
|
616
|
+
#prevScrollButton
|
|
617
|
+
kendoTabStripScrollableButton
|
|
618
|
+
[scrollable]="scrollable"
|
|
619
|
+
[tabPosition]="tabPosition"
|
|
620
|
+
[prev]="true"
|
|
621
|
+
[title]="localization.get('previousTabButton')"
|
|
622
|
+
(tabScroll)="tabScroll.emit($event)"
|
|
623
|
+
class="k-icon-button k-button k-button-flat k-button-flat-base"
|
|
622
624
|
[ngClass]="{
|
|
623
625
|
'k-button-sm': size === 'small',
|
|
624
626
|
'k-button-md': size === 'medium' || !size,
|
|
625
627
|
'k-button-lg': size === 'large'
|
|
626
628
|
}"
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
629
|
+
(onClick)="onScrollButtonClick($event)"></span>
|
|
630
|
+
}
|
|
631
|
+
@if (hasScrollButtons.visible && hasScrollButtons.position !== 'start') {
|
|
632
|
+
<span
|
|
633
|
+
role="button"
|
|
634
|
+
#nextScrollButton
|
|
635
|
+
kendoTabStripScrollableButton
|
|
636
|
+
[scrollable]="scrollable"
|
|
637
|
+
[tabPosition]="tabPosition"
|
|
638
|
+
[prev]="false"
|
|
639
|
+
[title]="localization.get('nextTabButton')"
|
|
640
|
+
(tabScroll)="tabScroll.emit($event)"
|
|
641
|
+
class="k-icon-button k-button k-button-flat k-button-flat-base"
|
|
639
642
|
[ngClass]="{
|
|
640
643
|
'k-button-sm': size === 'small',
|
|
641
644
|
'k-button-md': size === 'medium' || !size,
|
|
642
645
|
'k-button-lg': size === 'large'
|
|
643
646
|
}"
|
|
644
|
-
|
|
645
|
-
|
|
647
|
+
(onClick)="onScrollButtonClick($event)"></span>
|
|
648
|
+
}
|
|
649
|
+
</div>
|
|
646
650
|
</ng-template>
|
|
647
651
|
<ng-template #content>
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
652
|
+
@for (tab of tabs; track tab; let i = $index) {
|
|
653
|
+
@if (tab.selected || keepTabContent) {
|
|
654
|
+
<div
|
|
655
|
+
[@state]="tab.selected && animate ? 'active' : 'inactive'"
|
|
656
|
+
[ngClass]="!this.keepTabContent || tab.selected ? 'k-tabstrip-content k-active' : 'k-tabstrip-content'"
|
|
657
|
+
[tabIndex]="0"
|
|
658
|
+
role="tabpanel"
|
|
659
|
+
[id]="getTabPanelId(i)"
|
|
660
|
+
[attr.aria-hidden]="!tab.selected"
|
|
661
|
+
[attr.aria-labelledby]="getTabId(i)"
|
|
662
|
+
[attr.aria-disabled]="tab.disabled"
|
|
659
663
|
>
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
+
<ng-template [ngTemplateOutlet]="tab.tabContent?.templateRef">
|
|
665
|
+
</ng-template>
|
|
666
|
+
</div>
|
|
667
|
+
}
|
|
668
|
+
}
|
|
664
669
|
</ng-template>
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
670
|
+
@if (isScrollable) {
|
|
671
|
+
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
672
|
+
}
|
|
673
|
+
@if (showLicenseWatermark) {
|
|
674
|
+
<div kendoWatermarkOverlay [licenseMessage]="licenseMessage"></div>
|
|
675
|
+
}
|
|
676
|
+
`, 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: [
|
|
668
677
|
trigger('state', [
|
|
669
678
|
state('active', style({ opacity: 1 })),
|
|
670
679
|
transition('* => active', [
|
|
@@ -699,67 +708,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
699
708
|
selector: 'kendo-tabstrip',
|
|
700
709
|
template: `
|
|
701
710
|
<ng-container kendoTabStripLocalizedMessages
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
</ng-container>
|
|
712
|
-
<ng-container *ngIf="!tabsAtBottom">
|
|
713
|
-
<ng-container *ngTemplateOutlet="heading"></ng-container>
|
|
714
|
-
<ng-container *ngIf="showContentArea">
|
|
715
|
-
<ng-container *ngTemplateOutlet="content"></ng-container>
|
|
716
|
-
</ng-container>
|
|
717
|
-
</ng-container>
|
|
718
|
-
|
|
719
|
-
<ng-container *ngIf="tabsAtBottom">
|
|
720
|
-
<ng-container *ngIf="showContentArea">
|
|
721
|
-
<ng-container *ngTemplateOutlet="content"></ng-container>
|
|
722
|
-
</ng-container>
|
|
723
|
-
<ng-container *ngTemplateOutlet="heading"></ng-container>
|
|
711
|
+
i18n-closeTitle="kendo.tabstrip.closeTitle|The title for the **Close** button in the TabStrip tab."
|
|
712
|
+
closeTitle="Close"
|
|
713
|
+
|
|
714
|
+
i18n-previousTabButton="kendo.tabstrip.previousTabButton|The title for the **Previous Tab** button when the Tabstrip is scrollable."
|
|
715
|
+
previousTabButton="Previous Tab"
|
|
716
|
+
|
|
717
|
+
i18n-nextTabButton="kendo.tabstrip.nextTabButton|The title for the **Next Tab** button when the Tabstrip is scrollable."
|
|
718
|
+
nextTabButton="Next Tab"
|
|
719
|
+
>
|
|
724
720
|
</ng-container>
|
|
721
|
+
@if (!tabsAtBottom) {
|
|
722
|
+
<ng-container *ngTemplateOutlet="heading"></ng-container>
|
|
723
|
+
@if (showContentArea) {
|
|
724
|
+
<ng-container *ngTemplateOutlet="content"></ng-container>
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
@if (tabsAtBottom) {
|
|
729
|
+
@if (showContentArea) {
|
|
730
|
+
<ng-container *ngTemplateOutlet="content"></ng-container>
|
|
731
|
+
}
|
|
732
|
+
<ng-container *ngTemplateOutlet="heading"></ng-container>
|
|
733
|
+
}
|
|
725
734
|
<ng-template #heading>
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
735
|
+
<div class="k-tabstrip-items-wrapper" [class.k-tabstrip-items-wrapper-scroll]="mouseScrollEnabled" [ngClass]="itemsWrapperClass">
|
|
736
|
+
@if (hasScrollButtons.visible && hasScrollButtons.position !== 'end') {
|
|
737
|
+
<span
|
|
738
|
+
role="button"
|
|
739
|
+
#prevScrollButton
|
|
740
|
+
kendoTabStripScrollableButton
|
|
741
|
+
[scrollable]="scrollable"
|
|
742
|
+
[tabPosition]="tabPosition"
|
|
743
|
+
[prev]="true"
|
|
744
|
+
[title]="localization.get('previousTabButton')"
|
|
745
|
+
(tabScroll)="tabScroll.emit($event)"
|
|
746
|
+
class="k-icon-button k-button k-button-flat k-button-flat-base"
|
|
738
747
|
[ngClass]="{
|
|
739
748
|
'k-button-sm': size === 'small',
|
|
740
749
|
'k-button-md': size === 'medium' || !size,
|
|
741
750
|
'k-button-lg': size === 'large'
|
|
742
751
|
}"
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
752
|
+
(onClick)="onScrollButtonClick($event)"></span>
|
|
753
|
+
}
|
|
754
|
+
@if (hasScrollButtons.visible && hasScrollButtons.position === 'start') {
|
|
755
|
+
<span
|
|
756
|
+
role="button"
|
|
757
|
+
#nextScrollButton
|
|
758
|
+
kendoTabStripScrollableButton
|
|
759
|
+
[scrollable]="scrollable"
|
|
760
|
+
[tabPosition]="tabPosition"
|
|
761
|
+
[prev]="false"
|
|
762
|
+
[title]="localization.get('nextTabButton')"
|
|
763
|
+
(tabScroll)="tabScroll.emit($event)"
|
|
764
|
+
class="k-icon-button k-button k-button-flat k-button-flat-base"
|
|
755
765
|
[ngClass]="{
|
|
756
766
|
'k-button-sm': size === 'small',
|
|
757
767
|
'k-button-md': size === 'medium' || !size,
|
|
758
768
|
'k-button-lg': size === 'large'
|
|
759
769
|
}"
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
770
|
+
(onClick)="onScrollButtonClick($event)"></span>
|
|
771
|
+
}
|
|
772
|
+
<ul role="tablist" #tablist
|
|
773
|
+
class="k-reset k-tabstrip-items"
|
|
763
774
|
[ngClass]="{
|
|
764
775
|
'k-tabstrip-items-start': tabAlignment === 'start',
|
|
765
776
|
'k-tabstrip-items-center': tabAlignment === 'center',
|
|
@@ -768,88 +779,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
768
779
|
'k-tabstrip-items-justify': tabAlignment === 'justify',
|
|
769
780
|
'k-tabstrip-items-scroll': mouseScrollEnabled
|
|
770
781
|
}"
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
782
|
+
[attr.aria-orientation]="tabPosition === 'left' || tabPosition === 'right' ? 'vertical' : 'horizontal'"
|
|
783
|
+
>
|
|
784
|
+
@for (tab of tabs; track tab; let i = $index) {
|
|
785
|
+
<li
|
|
786
|
+
#tabHeaderContainer
|
|
787
|
+
kendoTabStripTab
|
|
788
|
+
[class.k-first]="i === 0"
|
|
789
|
+
[class.k-last]="i === tabs.length - 1"
|
|
790
|
+
[ngClass]="tab.cssClass"
|
|
791
|
+
[ngStyle]="tab.cssStyle"
|
|
792
|
+
[tab]="tab"
|
|
793
|
+
[index]="i"
|
|
794
|
+
role="tab"
|
|
795
|
+
[tabStripClosable]="closable"
|
|
796
|
+
[tabStripCloseIcon]="closeIcon"
|
|
797
|
+
[customTabstripCloseIcon]="closeIconClass"
|
|
798
|
+
[closeSVGIcon]="closeSVGIcon"
|
|
799
|
+
(tabClose)="tabClose.emit($event)"
|
|
800
|
+
(click)="onTabClick($event, i)"
|
|
801
|
+
[id]="getTabId(i)"
|
|
802
|
+
[attr.aria-controls]="(showContentArea && tab.selected) ? getTabPanelId(i) : undefined"></li>
|
|
803
|
+
}
|
|
804
|
+
</ul>
|
|
805
|
+
@if (hasScrollButtons.visible && hasScrollButtons.position === 'end') {
|
|
806
|
+
<span
|
|
807
|
+
role="button"
|
|
808
|
+
#prevScrollButton
|
|
809
|
+
kendoTabStripScrollableButton
|
|
810
|
+
[scrollable]="scrollable"
|
|
811
|
+
[tabPosition]="tabPosition"
|
|
812
|
+
[prev]="true"
|
|
813
|
+
[title]="localization.get('previousTabButton')"
|
|
814
|
+
(tabScroll)="tabScroll.emit($event)"
|
|
815
|
+
class="k-icon-button k-button k-button-flat k-button-flat-base"
|
|
805
816
|
[ngClass]="{
|
|
806
817
|
'k-button-sm': size === 'small',
|
|
807
818
|
'k-button-md': size === 'medium' || !size,
|
|
808
819
|
'k-button-lg': size === 'large'
|
|
809
820
|
}"
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
821
|
+
(onClick)="onScrollButtonClick($event)"></span>
|
|
822
|
+
}
|
|
823
|
+
@if (hasScrollButtons.visible && hasScrollButtons.position !== 'start') {
|
|
824
|
+
<span
|
|
825
|
+
role="button"
|
|
826
|
+
#nextScrollButton
|
|
827
|
+
kendoTabStripScrollableButton
|
|
828
|
+
[scrollable]="scrollable"
|
|
829
|
+
[tabPosition]="tabPosition"
|
|
830
|
+
[prev]="false"
|
|
831
|
+
[title]="localization.get('nextTabButton')"
|
|
832
|
+
(tabScroll)="tabScroll.emit($event)"
|
|
833
|
+
class="k-icon-button k-button k-button-flat k-button-flat-base"
|
|
822
834
|
[ngClass]="{
|
|
823
835
|
'k-button-sm': size === 'small',
|
|
824
836
|
'k-button-md': size === 'medium' || !size,
|
|
825
837
|
'k-button-lg': size === 'large'
|
|
826
838
|
}"
|
|
827
|
-
|
|
828
|
-
|
|
839
|
+
(onClick)="onScrollButtonClick($event)"></span>
|
|
840
|
+
}
|
|
841
|
+
</div>
|
|
829
842
|
</ng-template>
|
|
830
843
|
<ng-template #content>
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
844
|
+
@for (tab of tabs; track tab; let i = $index) {
|
|
845
|
+
@if (tab.selected || keepTabContent) {
|
|
846
|
+
<div
|
|
847
|
+
[@state]="tab.selected && animate ? 'active' : 'inactive'"
|
|
848
|
+
[ngClass]="!this.keepTabContent || tab.selected ? 'k-tabstrip-content k-active' : 'k-tabstrip-content'"
|
|
849
|
+
[tabIndex]="0"
|
|
850
|
+
role="tabpanel"
|
|
851
|
+
[id]="getTabPanelId(i)"
|
|
852
|
+
[attr.aria-hidden]="!tab.selected"
|
|
853
|
+
[attr.aria-labelledby]="getTabId(i)"
|
|
854
|
+
[attr.aria-disabled]="tab.disabled"
|
|
842
855
|
>
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
856
|
+
<ng-template [ngTemplateOutlet]="tab.tabContent?.templateRef">
|
|
857
|
+
</ng-template>
|
|
858
|
+
</div>
|
|
859
|
+
}
|
|
860
|
+
}
|
|
847
861
|
</ng-template>
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
862
|
+
@if (isScrollable) {
|
|
863
|
+
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
864
|
+
}
|
|
865
|
+
@if (showLicenseWatermark) {
|
|
866
|
+
<div kendoWatermarkOverlay [licenseMessage]="licenseMessage"></div>
|
|
867
|
+
}
|
|
868
|
+
`,
|
|
851
869
|
standalone: true,
|
|
852
|
-
imports: [LocalizedTabStripMessagesDirective,
|
|
870
|
+
imports: [LocalizedTabStripMessagesDirective, NgTemplateOutlet, NgClass, TabStripScrollableButtonComponent, TabComponent, NgStyle, ResizeSensorComponent, WatermarkOverlayComponent]
|
|
853
871
|
}]
|
|
854
872
|
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i2.TabStripService }, { type: i3.ScrollService }, { type: i0.NgZone }], propDecorators: { height: [{
|
|
855
873
|
type: Input
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Injectable, NgZone } from '@angular/core';
|
|
6
6
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
-
import { Keys,
|
|
7
|
+
import { Keys, normalizeKeys } from '@progress/kendo-angular-common';
|
|
8
8
|
import { isArrowKey, isHorizontalArrowKey, isNavigationKey, isVerticalArrowKey } from '../common/util';
|
|
9
9
|
import { SelectEvent } from './events';
|
|
10
10
|
import { isTabClosable, getActiveTab, isTabElement, isTablistHorizontal, getTabByIndex, getTabHeaderByIndex, resetTabSelection } from './util';
|
|
@@ -26,7 +26,7 @@ export class TabStripService {
|
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
// on some keyboards arrow keys, PageUp/Down, and Home/End are mapped to Numpad keys
|
|
29
|
-
const code =
|
|
29
|
+
const code = normalizeKeys(event);
|
|
30
30
|
if (this.shouldHandleKey(code)) {
|
|
31
31
|
event.preventDefault();
|
|
32
32
|
}
|
|
@@ -10,7 +10,7 @@ import { isPresent } from "../common/util";
|
|
|
10
10
|
*/
|
|
11
11
|
export const isTabElement = (target) => {
|
|
12
12
|
const targetId = target.getAttribute('id');
|
|
13
|
-
if (isPresent(targetId) || targetId
|
|
13
|
+
if (isPresent(targetId) || targetId?.indexOf('k-tabstrip-tab-') >= 0) {
|
|
14
14
|
return true;
|
|
15
15
|
}
|
|
16
16
|
return false;
|