@progress/kendo-angular-layout 21.4.1-develop.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.
- package/avatar/l10n/messages.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-layout.mjs +290 -290
- package/package.json +12 -20
- package/stepper/localization/messages.d.ts +1 -1
- package/tabstrip/localization/messages.d.ts +1 -1
- package/timeline/localization/messages.d.ts +1 -1
- package/esm2022/avatar/avatar.component.mjs +0 -406
- package/esm2022/avatar/l10n/custom-messages.component.mjs +0 -53
- package/esm2022/avatar/l10n/localized-messages.directive.mjs +0 -40
- package/esm2022/avatar/l10n/messages.mjs +0 -27
- package/esm2022/avatar/models/fill.mjs +0 -5
- package/esm2022/avatar/models/models.mjs +0 -9
- package/esm2022/avatar/models/rounded.mjs +0 -5
- package/esm2022/avatar/models/shape.mjs +0 -5
- package/esm2022/avatar/models/size.mjs +0 -5
- package/esm2022/avatar/models/theme-color.mjs +0 -5
- package/esm2022/avatar.module.mjs +0 -38
- package/esm2022/card/card-actions.component.mjs +0 -177
- package/esm2022/card/card-body.component.mjs +0 -37
- package/esm2022/card/card-footer.component.mjs +0 -37
- package/esm2022/card/card-header.component.mjs +0 -38
- package/esm2022/card/card.component.mjs +0 -118
- package/esm2022/card/directives/card-media.directive.mjs +0 -33
- package/esm2022/card/directives/card-separator.directive.mjs +0 -61
- package/esm2022/card/directives/card-subtitle.directive.mjs +0 -31
- package/esm2022/card/directives/card-title.directive.mjs +0 -31
- package/esm2022/card/models/actions-layout.mjs +0 -5
- package/esm2022/card/models/card-action.mjs +0 -21
- package/esm2022/card.module.mjs +0 -45
- package/esm2022/common/direction.mjs +0 -5
- package/esm2022/common/dom-queries.mjs +0 -47
- package/esm2022/common/orientation.mjs +0 -5
- package/esm2022/common/preventable-event.mjs +0 -31
- package/esm2022/common/styling-classes.mjs +0 -5
- package/esm2022/common/util.mjs +0 -85
- package/esm2022/directives.mjs +0 -174
- package/esm2022/drawer/animations.mjs +0 -146
- package/esm2022/drawer/drawer-container.component.mjs +0 -135
- package/esm2022/drawer/drawer-content.component.mjs +0 -39
- package/esm2022/drawer/drawer.component.mjs +0 -471
- package/esm2022/drawer/drawer.service.mjs +0 -105
- package/esm2022/drawer/events/drawer-list-select.event.mjs +0 -29
- package/esm2022/drawer/events/select-event.mjs +0 -33
- package/esm2022/drawer/item.component.mjs +0 -210
- package/esm2022/drawer/list.component.mjs +0 -165
- package/esm2022/drawer/models/constants.mjs +0 -8
- package/esm2022/drawer/models/drawer-animation.interface.mjs +0 -5
- package/esm2022/drawer/models/drawer-item-expand.interface.mjs +0 -5
- package/esm2022/drawer/models/drawer-item.interface.mjs +0 -5
- package/esm2022/drawer/models/drawer-view-item.interface.mjs +0 -5
- package/esm2022/drawer/models/mode.mjs +0 -5
- package/esm2022/drawer/models/position.mjs +0 -5
- package/esm2022/drawer/template-directives/drawer-template.directive.mjs +0 -43
- package/esm2022/drawer/template-directives/footer-template.directive.mjs +0 -36
- package/esm2022/drawer/template-directives/header-template.directive.mjs +0 -36
- package/esm2022/drawer/template-directives/item-template.directive.mjs +0 -44
- package/esm2022/drawer/template-directives.mjs +0 -8
- package/esm2022/drawer/types.mjs +0 -5
- package/esm2022/drawer/util.mjs +0 -16
- package/esm2022/drawer.module.mjs +0 -43
- package/esm2022/expansionpanel/animations.mjs +0 -23
- package/esm2022/expansionpanel/events/action-event.mjs +0 -21
- package/esm2022/expansionpanel/expansionpanel-title.directive.mjs +0 -38
- package/esm2022/expansionpanel/expansionpanel.component.mjs +0 -515
- package/esm2022/expansionpanel.module.mjs +0 -38
- package/esm2022/gridlayout.module.mjs +0 -38
- package/esm2022/index.mjs +0 -89
- package/esm2022/layout.module.mjs +0 -89
- package/esm2022/layouts/grid-layout.component.mjs +0 -179
- package/esm2022/layouts/gridlayout-item.component.mjs +0 -82
- package/esm2022/layouts/models/gridlayout-gap-settings.mjs +0 -5
- package/esm2022/layouts/models/gridlayout-row-col-size.mjs +0 -5
- package/esm2022/layouts/models/layout-align-settings.mjs +0 -5
- package/esm2022/layouts/models/layout-horizontal-align.mjs +0 -5
- package/esm2022/layouts/models/layout-vertical-align.mjs +0 -5
- package/esm2022/layouts/models.mjs +0 -10
- package/esm2022/layouts/stack-layout.component.mjs +0 -161
- package/esm2022/layouts/util.mjs +0 -101
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/panelbar/events/collapse-event.mjs +0 -14
- package/esm2022/panelbar/events/expand-event.mjs +0 -14
- package/esm2022/panelbar/events/item-click-event.mjs +0 -17
- package/esm2022/panelbar/events/select-event.mjs +0 -14
- package/esm2022/panelbar/events/state-change-event.mjs +0 -13
- package/esm2022/panelbar/events.mjs +0 -9
- package/esm2022/panelbar/panelbar-content.directive.mjs +0 -36
- package/esm2022/panelbar/panelbar-expand-mode.mjs +0 -29
- package/esm2022/panelbar/panelbar-item-model.mjs +0 -5
- package/esm2022/panelbar/panelbar-item-template.directive.mjs +0 -37
- package/esm2022/panelbar/panelbar-item-title.directive.mjs +0 -42
- package/esm2022/panelbar/panelbar-item.component.mjs +0 -722
- package/esm2022/panelbar/panelbar.component.mjs +0 -705
- package/esm2022/panelbar/panelbar.service.mjs +0 -53
- package/esm2022/panelbar.module.mjs +0 -41
- package/esm2022/progress-kendo-angular-layout.mjs +0 -8
- package/esm2022/splitter/splitter-bar.component.mjs +0 -338
- package/esm2022/splitter/splitter-pane.component.mjs +0 -324
- package/esm2022/splitter/splitter.component.mjs +0 -301
- package/esm2022/splitter/splitter.service.mjs +0 -205
- package/esm2022/splitter/util.mjs +0 -34
- package/esm2022/splitter.module.mjs +0 -38
- package/esm2022/stacklayout.module.mjs +0 -37
- package/esm2022/stepper/events/activate-event.mjs +0 -33
- package/esm2022/stepper/list.component.mjs +0 -185
- package/esm2022/stepper/localization/custom-messages.component.mjs +0 -52
- package/esm2022/stepper/localization/localized-messages.directive.mjs +0 -41
- package/esm2022/stepper/localization/messages.mjs +0 -27
- package/esm2022/stepper/models/constants.mjs +0 -8
- package/esm2022/stepper/models/orientation.mjs +0 -5
- package/esm2022/stepper/models/step-predicate.mjs +0 -5
- package/esm2022/stepper/models/step-type.mjs +0 -5
- package/esm2022/stepper/models/stepper-step.interface.mjs +0 -5
- package/esm2022/stepper/step.component.mjs +0 -396
- package/esm2022/stepper/stepper.component.mjs +0 -423
- package/esm2022/stepper/stepper.service.mjs +0 -186
- package/esm2022/stepper/template-directives/indicator-template.directive.mjs +0 -37
- package/esm2022/stepper/template-directives/label-template.directive.mjs +0 -37
- package/esm2022/stepper/template-directives/step-template.directive.mjs +0 -39
- package/esm2022/stepper/template-directives.mjs +0 -7
- package/esm2022/stepper/types.mjs +0 -5
- package/esm2022/stepper.module.mjs +0 -41
- package/esm2022/tabstrip/constants.mjs +0 -29
- package/esm2022/tabstrip/directives/tab-content.directive.mjs +0 -39
- package/esm2022/tabstrip/directives/tab-title.directive.mjs +0 -37
- package/esm2022/tabstrip/directives/tab.directive.mjs +0 -24
- package/esm2022/tabstrip/events/select-event.mjs +0 -25
- package/esm2022/tabstrip/events/tabclose-event.mjs +0 -23
- package/esm2022/tabstrip/events/tabscroll-event.mjs +0 -23
- package/esm2022/tabstrip/events.mjs +0 -7
- package/esm2022/tabstrip/localization/custom-messages.component.mjs +0 -53
- package/esm2022/tabstrip/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/tabstrip/localization/messages.mjs +0 -39
- package/esm2022/tabstrip/models/button-state-change.mjs +0 -5
- package/esm2022/tabstrip/models/scroll-button-type.mjs +0 -5
- package/esm2022/tabstrip/models/scroll-buttons-visibility.mjs +0 -5
- package/esm2022/tabstrip/models/scrollable-settings.mjs +0 -23
- package/esm2022/tabstrip/models/size.mjs +0 -5
- package/esm2022/tabstrip/models/tab-alignment.mjs +0 -5
- package/esm2022/tabstrip/models/tab-position.mjs +0 -5
- package/esm2022/tabstrip/models/tabstrip-tab.component.mjs +0 -130
- package/esm2022/tabstrip/rendering/tab.component.mjs +0 -182
- package/esm2022/tabstrip/scrollable-button.component.mjs +0 -182
- package/esm2022/tabstrip/tabstrip-scroll.service.mjs +0 -176
- package/esm2022/tabstrip/tabstrip.component.mjs +0 -954
- package/esm2022/tabstrip/tabstrip.service.mjs +0 -155
- package/esm2022/tabstrip/util.mjs +0 -120
- package/esm2022/tabstrip.module.mjs +0 -41
- package/esm2022/tilelayout/constants.mjs +0 -70
- package/esm2022/tilelayout/dragging-service.mjs +0 -421
- package/esm2022/tilelayout/keyboard-navigation.service.mjs +0 -189
- package/esm2022/tilelayout/models/dragging-config.interface.mjs +0 -5
- package/esm2022/tilelayout/models/flowmode.type.mjs +0 -5
- package/esm2022/tilelayout/models/gap.interface.mjs +0 -5
- package/esm2022/tilelayout/models/navigation.interface.mjs +0 -5
- package/esm2022/tilelayout/reorder-event.mjs +0 -43
- package/esm2022/tilelayout/resize-event.mjs +0 -37
- package/esm2022/tilelayout/tilelayout-item-body.component.mjs +0 -45
- package/esm2022/tilelayout/tilelayout-item-header.component.mjs +0 -43
- package/esm2022/tilelayout/tilelayout-item.component.mjs +0 -322
- package/esm2022/tilelayout/tilelayout-resize-handle.directive.mjs +0 -61
- package/esm2022/tilelayout/tilelayout.component.mjs +0 -388
- package/esm2022/tilelayout/util.mjs +0 -138
- package/esm2022/tilelayout.module.mjs +0 -40
- package/esm2022/timeline/events/navigation-direction.mjs +0 -5
- package/esm2022/timeline/localization/custom-messages.component.mjs +0 -43
- package/esm2022/timeline/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/timeline/localization/messages.mjs +0 -33
- package/esm2022/timeline/models/anchor-target.mjs +0 -5
- package/esm2022/timeline/models/default-model-fields.mjs +0 -16
- package/esm2022/timeline/models/events-order.mjs +0 -5
- package/esm2022/timeline/models/model-fields.mjs +0 -5
- package/esm2022/timeline/models/timeline-event.mjs +0 -5
- package/esm2022/timeline/templates/timeline-card-actions.directive.mjs +0 -40
- package/esm2022/timeline/templates/timeline-card-body.directive.mjs +0 -40
- package/esm2022/timeline/templates/timeline-card-header.directive.mjs +0 -41
- package/esm2022/timeline/timeline-card.component.mjs +0 -451
- package/esm2022/timeline/timeline-horizontal.component.mjs +0 -781
- package/esm2022/timeline/timeline-vertical.component.mjs +0 -203
- package/esm2022/timeline/timeline.component.mjs +0 -491
- package/esm2022/timeline/timeline.service.mjs +0 -32
- package/esm2022/timeline/util.mjs +0 -26
- package/esm2022/timeline.module.mjs +0 -41
|
@@ -1,781 +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 { ChangeDetectorRef, Component, ElementRef, Input, NgZone, QueryList, Renderer2, ViewChild, ViewChildren, } from '@angular/core';
|
|
6
|
-
import { caretAltLeftIcon, caretAltRightIcon } from '@progress/kendo-svg-icons';
|
|
7
|
-
import { Subscription } from 'rxjs';
|
|
8
|
-
import { TimelineCardComponent } from './timeline-card.component';
|
|
9
|
-
import { Keys, ResizeSensorComponent, guid, isChanged, isDocumentAvailable, isPresent, normalizeKeys } from '@progress/kendo-angular-common';
|
|
10
|
-
import { animate, state, style, transition, trigger } from '@angular/animations';
|
|
11
|
-
import { TimelineService } from './timeline.service';
|
|
12
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
13
|
-
import { TimelineCardBodyTemplateDirective } from './templates/timeline-card-body.directive';
|
|
14
|
-
import { TimelineCardHeaderTemplateDirective } from './templates/timeline-card-header.directive';
|
|
15
|
-
import { TimelineCardActionsTemplateDirective } from './templates/timeline-card-actions.directive';
|
|
16
|
-
import { DatePipe } from '@progress/kendo-angular-intl';
|
|
17
|
-
import { NgStyle } from '@angular/common';
|
|
18
|
-
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
|
19
|
-
import * as i0 from "@angular/core";
|
|
20
|
-
import * as i1 from "./timeline.service";
|
|
21
|
-
import * as i2 from "@progress/kendo-angular-l10n";
|
|
22
|
-
const DEFAULT_TAB_WIDTH = 200;
|
|
23
|
-
const SPACE_BETWEEN_TABS = 25;
|
|
24
|
-
const TRANSITION_EVENTS_COUNT = 3;
|
|
25
|
-
/**
|
|
26
|
-
* @hidden
|
|
27
|
-
*/
|
|
28
|
-
export class TimelineHorizontalComponent {
|
|
29
|
-
cdr;
|
|
30
|
-
_zone;
|
|
31
|
-
renderer;
|
|
32
|
-
timelineService;
|
|
33
|
-
localization;
|
|
34
|
-
events = [];
|
|
35
|
-
alterMode;
|
|
36
|
-
collapsibleEvents;
|
|
37
|
-
navigable;
|
|
38
|
-
showDateLabels;
|
|
39
|
-
animationDuration;
|
|
40
|
-
eventHeight;
|
|
41
|
-
dateFormat;
|
|
42
|
-
headerTemplate;
|
|
43
|
-
bodyTemplate;
|
|
44
|
-
actionsTemplate;
|
|
45
|
-
cardElementRefs;
|
|
46
|
-
circleElementRefs;
|
|
47
|
-
flagElementRefs;
|
|
48
|
-
trackElementRef;
|
|
49
|
-
scrollableTrackElementRef;
|
|
50
|
-
cardComponents;
|
|
51
|
-
get selectedEvent() {
|
|
52
|
-
return this._selectedEvent;
|
|
53
|
-
}
|
|
54
|
-
set selectedEvent(value) {
|
|
55
|
-
if (this._selectedEvent === value) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
const newSelectedIndex = this.events.findIndex(event => event === value);
|
|
59
|
-
if (newSelectedIndex === -1 && value !== null) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
this._selectedEvent = value;
|
|
63
|
-
this.selectedEventIndex = newSelectedIndex;
|
|
64
|
-
this.calloutStyle = this.calloutOffset;
|
|
65
|
-
}
|
|
66
|
-
trackWrapWidth;
|
|
67
|
-
scrollableTrackWidth;
|
|
68
|
-
cardWidth;
|
|
69
|
-
svgLeftIcon = caretAltLeftIcon;
|
|
70
|
-
svgRightIcon = caretAltRightIcon;
|
|
71
|
-
calloutStyle;
|
|
72
|
-
animationState = 'center';
|
|
73
|
-
translateValue = 0;
|
|
74
|
-
eventsInInterval = [0, 1, 2];
|
|
75
|
-
selectedCardIndex = 0;
|
|
76
|
-
selectedEventIndex;
|
|
77
|
-
tabFlex;
|
|
78
|
-
tabWidth = DEFAULT_TAB_WIDTH;
|
|
79
|
-
visibleTabsCount;
|
|
80
|
-
firstCircleInView = 0;
|
|
81
|
-
visibleEvents = [];
|
|
82
|
-
trackItems = [];
|
|
83
|
-
previousTitle = 'previous';
|
|
84
|
-
nextTitle = 'next';
|
|
85
|
-
_selectedEvent;
|
|
86
|
-
subscriptions = new Subscription();
|
|
87
|
-
constructor(cdr, _zone, renderer, timelineService, localization) {
|
|
88
|
-
this.cdr = cdr;
|
|
89
|
-
this._zone = _zone;
|
|
90
|
-
this.renderer = renderer;
|
|
91
|
-
this.timelineService = timelineService;
|
|
92
|
-
this.localization = localization;
|
|
93
|
-
}
|
|
94
|
-
ngOnInit() {
|
|
95
|
-
this.l10nChange();
|
|
96
|
-
this.subscriptions.add(this.localization.changes.subscribe(this.l10nChange.bind(this)));
|
|
97
|
-
if (this.events.length > 0) {
|
|
98
|
-
this.selectedEvent = this.events[0];
|
|
99
|
-
}
|
|
100
|
-
this.events.forEach(event => {
|
|
101
|
-
if (event.flag) {
|
|
102
|
-
this.trackItems.push({ isFlag: event.flag });
|
|
103
|
-
}
|
|
104
|
-
this.trackItems.push(event);
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
ngAfterViewInit() {
|
|
108
|
-
if (!isDocumentAvailable()) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
this.subscriptions.add(this.renderer.listen(this.trackElementRef.nativeElement, 'keydown', this.onKeyDown.bind(this)));
|
|
112
|
-
this.trackWrapWidth = this.trackElementRef.nativeElement.getBoundingClientRect().width;
|
|
113
|
-
this.scrollableTrackWidth = this.scrollableTrackElementRef.nativeElement.getBoundingClientRect().width;
|
|
114
|
-
this._zone.runOutsideAngular(() => {
|
|
115
|
-
this.onCirclesChange();
|
|
116
|
-
this.subscriptions.add(this.circleElementRefs.changes.subscribe(this.onCirclesChange.bind(this)));
|
|
117
|
-
this.subscriptions.add(this.cardElementRefs.changes.subscribe(this.onCardsChange.bind(this)));
|
|
118
|
-
});
|
|
119
|
-
if (this.events.length === 0) {
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
this.onCardsChange();
|
|
123
|
-
if (this.cardComponents.get(this.selectedCardIndex)) {
|
|
124
|
-
this.cardComponents.get(this.selectedCardIndex).calloutStyle = this.calloutOffset;
|
|
125
|
-
this.focusTrackItem(0);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
ngOnChanges(changes) {
|
|
129
|
-
if (isChanged('events', changes)) {
|
|
130
|
-
if (!this.events || this.events.length === 0) {
|
|
131
|
-
this.selectedEvent = null;
|
|
132
|
-
this.trackItems = [];
|
|
133
|
-
this.visibleEvents = [];
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
this.trackItems = [];
|
|
137
|
-
this.events.forEach(event => {
|
|
138
|
-
if (event.flag) {
|
|
139
|
-
this.trackItems.push({ isFlag: event.flag });
|
|
140
|
-
}
|
|
141
|
-
this.trackItems.push(event);
|
|
142
|
-
});
|
|
143
|
-
this.navigateToFirstInterval();
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
ngOnDestroy() {
|
|
148
|
-
this.subscriptions.unsubscribe();
|
|
149
|
-
}
|
|
150
|
-
onResize() {
|
|
151
|
-
if (!isDocumentAvailable()) {
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
if (this.trackWrapWidth === this.trackElementRef.nativeElement.getBoundingClientRect().width) {
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
this.cardWidth = this.cardComponents.get(this.selectedCardIndex).element.nativeElement.offsetWidth;
|
|
158
|
-
this.transformCards();
|
|
159
|
-
this.trackWrapWidth = this.trackElementRef.nativeElement.getBoundingClientRect().width;
|
|
160
|
-
this.scrollableTrackWidth = this.scrollableTrackElementRef.nativeElement.getBoundingClientRect().width;
|
|
161
|
-
this.changeTabsCount();
|
|
162
|
-
this._zone.run(() => {
|
|
163
|
-
this.cardComponents.get(this.selectedCardIndex).calloutStyle = this.calloutOffset;
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
onTransitionEnd() {
|
|
167
|
-
this.cardElementRefs?.forEach(card => this.renderer.removeStyle(card.nativeElement, 'transition-duration'));
|
|
168
|
-
this.cardComponents.get(this.selectedCardIndex).event = this.selectedEvent;
|
|
169
|
-
this.calloutStyle = this.calloutOffset;
|
|
170
|
-
}
|
|
171
|
-
onTrackTransitionEnd() {
|
|
172
|
-
this.calloutStyle = this.calloutOffset;
|
|
173
|
-
}
|
|
174
|
-
onSlideDone() {
|
|
175
|
-
this.calloutStyle = this.calloutOffset;
|
|
176
|
-
}
|
|
177
|
-
previous() {
|
|
178
|
-
if (this.firstCircleInView === 0) {
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
this.updateInterval(false);
|
|
182
|
-
}
|
|
183
|
-
previousClick() {
|
|
184
|
-
this.previous();
|
|
185
|
-
this.timelineService.onNavigate('previous');
|
|
186
|
-
}
|
|
187
|
-
next() {
|
|
188
|
-
if (!this.visibleTabsCount || this.firstCircleInView + this.visibleTabsCount > this.trackItems.length) {
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
this.updateInterval(true);
|
|
192
|
-
}
|
|
193
|
-
nextClick() {
|
|
194
|
-
this.next();
|
|
195
|
-
this.timelineService.onNavigate('next');
|
|
196
|
-
}
|
|
197
|
-
open(index) {
|
|
198
|
-
if (index < 0 || index >= this.events.length) {
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
if (this.visibleEvents.findIndex(event => event === this.events[index]) === -1) {
|
|
202
|
-
// determine the start and end of the interval that the event belongs to, regardless of its position in the interval
|
|
203
|
-
const trackItemIndex = this.trackItems.findIndex(event => event === this.events[index]);
|
|
204
|
-
const start = Math.floor(trackItemIndex / this.visibleTabsCount) * this.visibleTabsCount;
|
|
205
|
-
this.navigateToInterval(start, index);
|
|
206
|
-
}
|
|
207
|
-
this.selectedEvent = this.events[index];
|
|
208
|
-
this.selectedCardIndex = this.getOtherSelectedCardIndex(index > this.selectedEventIndex);
|
|
209
|
-
this.calloutStyle = this.calloutOffset;
|
|
210
|
-
this.focusTrackItem(this.selectedEventIndex);
|
|
211
|
-
this.animateCards();
|
|
212
|
-
}
|
|
213
|
-
navigateToEvent(index) {
|
|
214
|
-
const eventIndex = this.events.findIndex(event => event === this.trackItems[index]);
|
|
215
|
-
if (this.selectedEventIndex === eventIndex) {
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
this.selectedEvent = this.events[eventIndex];
|
|
219
|
-
this.selectedCardIndex = this.getOtherSelectedCardIndex(index > eventIndex);
|
|
220
|
-
this.calloutStyle = this.calloutOffset;
|
|
221
|
-
this.animateCards();
|
|
222
|
-
}
|
|
223
|
-
getOtherSelectedCardIndex(forward) {
|
|
224
|
-
// change the selected card which changes all cards' transform styles
|
|
225
|
-
if (forward) {
|
|
226
|
-
return this.selectedCardIndex === 0 ? TRANSITION_EVENTS_COUNT - 1 : this.selectedCardIndex - 1;
|
|
227
|
-
}
|
|
228
|
-
return this.selectedCardIndex === TRANSITION_EVENTS_COUNT - 1 ? 0 : this.selectedCardIndex + 1;
|
|
229
|
-
}
|
|
230
|
-
tabStyle() {
|
|
231
|
-
if (!this.tabFlex) {
|
|
232
|
-
return {};
|
|
233
|
-
}
|
|
234
|
-
return { 'flex': `1 0 ${this.tabFlex}%` };
|
|
235
|
-
}
|
|
236
|
-
getTransformation(width, position) {
|
|
237
|
-
if (position === this.selectedCardIndex - 1 || position === this.selectedCardIndex + 2) {
|
|
238
|
-
return `translate3d(${-width}px, 0, 0)`;
|
|
239
|
-
}
|
|
240
|
-
if (position === this.selectedCardIndex + 1 || position === this.selectedCardIndex - 2) {
|
|
241
|
-
return `translate3d(${width}px, 0, 0)`;
|
|
242
|
-
}
|
|
243
|
-
return `translate3d(0, 0, 0)`;
|
|
244
|
-
}
|
|
245
|
-
getState(position) {
|
|
246
|
-
if (position === this.selectedCardIndex) {
|
|
247
|
-
return 'center';
|
|
248
|
-
}
|
|
249
|
-
if (position === this.selectedCardIndex - 1 || position === this.selectedCardIndex + 2) {
|
|
250
|
-
return 'left';
|
|
251
|
-
}
|
|
252
|
-
return 'right';
|
|
253
|
-
}
|
|
254
|
-
get calloutOffset() {
|
|
255
|
-
if (!isDocumentAvailable() || (!this.circleElementRefs?.first || !this.trackElementRef || !isPresent(this.selectedEventIndex))) {
|
|
256
|
-
return {};
|
|
257
|
-
}
|
|
258
|
-
const circleCenter = this.circleElementRefs.get(this.selectedEventIndex).nativeElement.getBoundingClientRect().left +
|
|
259
|
-
this.circleElementRefs.get(this.selectedEventIndex).nativeElement.offsetWidth / 2;
|
|
260
|
-
const trackOffset = this.trackElementRef.nativeElement.getBoundingClientRect().left;
|
|
261
|
-
return { left: `${circleCenter - trackOffset}px` };
|
|
262
|
-
}
|
|
263
|
-
get isFirstRange() {
|
|
264
|
-
return this.firstCircleInView === 0;
|
|
265
|
-
}
|
|
266
|
-
get isLastRange() {
|
|
267
|
-
if (!this.circleElementRefs?.first && !this.flagElementRefs?.first) {
|
|
268
|
-
return false;
|
|
269
|
-
}
|
|
270
|
-
return this.trackItems.length === 0 ||
|
|
271
|
-
this.firstCircleInView + this.visibleTabsCount >= this.trackItems.length;
|
|
272
|
-
}
|
|
273
|
-
onCardsChange() {
|
|
274
|
-
if (this.cardElementRefs?.get(this.selectedCardIndex)) {
|
|
275
|
-
this.cardWidth = this.cardElementRefs.get(this.selectedCardIndex).nativeElement.offsetWidth;
|
|
276
|
-
this.transformCards();
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
onCirclesChange() {
|
|
280
|
-
if (!this.circleElementRefs?.first) {
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
this.circleElementRefs
|
|
284
|
-
.map(element => element.nativeElement)
|
|
285
|
-
.forEach((element, index) => {
|
|
286
|
-
this.subscriptions.add(this.renderer.listen(element, 'click', () => {
|
|
287
|
-
this.focusTrackItem(index);
|
|
288
|
-
}));
|
|
289
|
-
});
|
|
290
|
-
const width = this.circleElementRefs.first.nativeElement.getBoundingClientRect().width;
|
|
291
|
-
if (width > DEFAULT_TAB_WIDTH) {
|
|
292
|
-
this.tabWidth = this.circleElementRefs.first.nativeElement.getBoundingClientRect().width + SPACE_BETWEEN_TABS;
|
|
293
|
-
}
|
|
294
|
-
this.changeTabsCount();
|
|
295
|
-
this.visibleEvents = this.trackItems
|
|
296
|
-
.slice(this.firstCircleInView, this.firstCircleInView + this.visibleTabsCount)
|
|
297
|
-
.filter(event => !event.isFlag);
|
|
298
|
-
}
|
|
299
|
-
onKeyDown(event) {
|
|
300
|
-
if (!this.navigable) {
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
const code = normalizeKeys(event);
|
|
304
|
-
event.preventDefault();
|
|
305
|
-
if (code === Keys.Home) {
|
|
306
|
-
this.onHomeKey();
|
|
307
|
-
}
|
|
308
|
-
else if (code === Keys.End) {
|
|
309
|
-
this.onEndKey();
|
|
310
|
-
}
|
|
311
|
-
else if (code === Keys.ArrowRight) {
|
|
312
|
-
this.onArrowRightKey();
|
|
313
|
-
}
|
|
314
|
-
else if (code === Keys.ArrowLeft) {
|
|
315
|
-
this.onArrowLeftKey();
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
focusTrackItem(index) {
|
|
319
|
-
if (!isDocumentAvailable()) {
|
|
320
|
-
return;
|
|
321
|
-
}
|
|
322
|
-
if (!this.circleElementRefs || index < 0 || index >= this.circleElementRefs.length) {
|
|
323
|
-
return;
|
|
324
|
-
}
|
|
325
|
-
const selectedTrackItem = this.circleElementRefs
|
|
326
|
-
.find(element => element.nativeElement.hasAttribute('aria-selected'));
|
|
327
|
-
if (selectedTrackItem) {
|
|
328
|
-
this.removeTrackItemAttributes(selectedTrackItem);
|
|
329
|
-
this.removeCardsAttributes();
|
|
330
|
-
}
|
|
331
|
-
const newTrackItem = this.circleElementRefs.get(index).nativeElement;
|
|
332
|
-
this.setTrackItemAttributes(newTrackItem, index);
|
|
333
|
-
}
|
|
334
|
-
setTrackItemAttributes(element, index) {
|
|
335
|
-
if (!isDocumentAvailable()) {
|
|
336
|
-
return;
|
|
337
|
-
}
|
|
338
|
-
const innerCard = this.cardComponents.get(this.selectedCardIndex).element.nativeElement.querySelector('.k-card');
|
|
339
|
-
const selectedCircle = this.circleElementRefs.get(index).nativeElement;
|
|
340
|
-
this.renderer.addClass(element, 'k-focus');
|
|
341
|
-
this.renderer.setAttribute(element, 'aria-selected', 'true');
|
|
342
|
-
this.assignAriaLabel(innerCard, selectedCircle);
|
|
343
|
-
this.assignAriaDescribedBy(innerCard, selectedCircle);
|
|
344
|
-
}
|
|
345
|
-
removeTrackItemAttributes(element) {
|
|
346
|
-
this.renderer.removeClass(element.nativeElement, 'k-focus');
|
|
347
|
-
this.renderer.removeAttribute(element.nativeElement, 'aria-selected');
|
|
348
|
-
this.renderer.removeAttribute(element.nativeElement, 'id');
|
|
349
|
-
this.renderer.removeAttribute(element.nativeElement, 'aria-describedby');
|
|
350
|
-
}
|
|
351
|
-
removeCardsAttributes() {
|
|
352
|
-
this.cardElementRefs.forEach(card => {
|
|
353
|
-
this.renderer.removeAttribute(card.nativeElement.querySelector('.k-card'), 'id');
|
|
354
|
-
this.renderer.removeAttribute(card.nativeElement.querySelector('.k-card'), 'aria-label');
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
assignAriaLabel(cardElement, dateElement) {
|
|
358
|
-
const dateLabelId = `k-${guid()}`;
|
|
359
|
-
this.renderer.setAttribute(dateElement, 'id', dateLabelId);
|
|
360
|
-
this.renderer.setAttribute(cardElement, 'aria-label', dateLabelId);
|
|
361
|
-
}
|
|
362
|
-
assignAriaDescribedBy(cardElement, dateElement) {
|
|
363
|
-
const cardId = `k-${guid()}`;
|
|
364
|
-
this.renderer.setAttribute(cardElement, 'id', cardId);
|
|
365
|
-
this.renderer.setAttribute(dateElement, 'aria-describedby', cardId);
|
|
366
|
-
}
|
|
367
|
-
updateInterval(forward) {
|
|
368
|
-
let start = forward ? this.firstCircleInView + this.visibleTabsCount : this.firstCircleInView - this.visibleTabsCount;
|
|
369
|
-
if (start < 0 || start >= this.trackItems.length) {
|
|
370
|
-
start = 0;
|
|
371
|
-
}
|
|
372
|
-
this.navigateToInterval(start, 0, forward, !forward);
|
|
373
|
-
}
|
|
374
|
-
onHomeKey() {
|
|
375
|
-
if (this.selectedEvent === this.events[0]) {
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
this.navigateToFirstInterval();
|
|
379
|
-
}
|
|
380
|
-
onEndKey() {
|
|
381
|
-
if (this.selectedEvent === this.events[this.events.length - 1]) {
|
|
382
|
-
return;
|
|
383
|
-
}
|
|
384
|
-
this.navigateToLastInterval();
|
|
385
|
-
}
|
|
386
|
-
onArrowRightKey() {
|
|
387
|
-
this.navigateToOtherEvent(true);
|
|
388
|
-
}
|
|
389
|
-
onArrowLeftKey() {
|
|
390
|
-
this.navigateToOtherEvent(false);
|
|
391
|
-
}
|
|
392
|
-
navigateToFirstInterval() {
|
|
393
|
-
this.navigateToInterval(0);
|
|
394
|
-
}
|
|
395
|
-
navigateToLastInterval() {
|
|
396
|
-
const start = Math.floor((this.trackItems.length - 1) / this.visibleTabsCount) * this.visibleTabsCount;
|
|
397
|
-
this.navigateToInterval(start, this.events.length - 1);
|
|
398
|
-
}
|
|
399
|
-
navigateToOtherEvent(direction) {
|
|
400
|
-
const offset = direction ? 1 : -1;
|
|
401
|
-
const newIndex = this.selectedEventIndex + offset;
|
|
402
|
-
if (newIndex < 0 || newIndex >= this.events.length) {
|
|
403
|
-
return;
|
|
404
|
-
}
|
|
405
|
-
if (this.visibleEvents.findIndex(event => event === this.events[newIndex]) === -1) {
|
|
406
|
-
this.updateInterval(direction);
|
|
407
|
-
}
|
|
408
|
-
else {
|
|
409
|
-
this.selectedEvent = this.events[newIndex];
|
|
410
|
-
this.selectedCardIndex = this.getOtherSelectedCardIndex(direction);
|
|
411
|
-
this.focusTrackItem(this.selectedEventIndex);
|
|
412
|
-
this.animateCards();
|
|
413
|
-
this.cdr.markForCheck();
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
navigateToInterval(start, selectedIndex = 0, selectFirst = false, selectLast = false) {
|
|
417
|
-
const end = start + this.visibleTabsCount < this.trackItems.length ? start + this.visibleTabsCount : undefined;
|
|
418
|
-
const forward = this.firstCircleInView < start;
|
|
419
|
-
this.firstCircleInView = start;
|
|
420
|
-
const interval = Math.floor(start / this.visibleTabsCount);
|
|
421
|
-
this.translateValue = interval * -100;
|
|
422
|
-
this.animationState = forward ? 'right' : 'left';
|
|
423
|
-
this.visibleEvents = this.trackItems.slice(this.firstCircleInView, end).filter(event => !event.isFlag);
|
|
424
|
-
if (selectFirst) {
|
|
425
|
-
this.selectedEvent = this.visibleEvents[0];
|
|
426
|
-
}
|
|
427
|
-
else if (selectLast) {
|
|
428
|
-
this.selectedEvent = this.visibleEvents[this.visibleEvents.length - 1];
|
|
429
|
-
}
|
|
430
|
-
else {
|
|
431
|
-
this.selectedEvent = this.events[selectedIndex];
|
|
432
|
-
}
|
|
433
|
-
this.selectedCardIndex = this.getOtherSelectedCardIndex(forward);
|
|
434
|
-
this.cdr.detectChanges();
|
|
435
|
-
this.focusTrackItem(this.selectedEventIndex);
|
|
436
|
-
this.animateCards();
|
|
437
|
-
this.calloutStyle = this.calloutOffset;
|
|
438
|
-
this.cdr.markForCheck();
|
|
439
|
-
}
|
|
440
|
-
animateCards() {
|
|
441
|
-
if (this.animationDuration) {
|
|
442
|
-
this.cardComponents.get(this.selectedCardIndex).event = null;
|
|
443
|
-
}
|
|
444
|
-
this.cardElementRefs.forEach((card, index) => {
|
|
445
|
-
this.renderer.setStyle(card.nativeElement, 'transform', this.getTransformation(this.cardWidth, index));
|
|
446
|
-
this.renderer.setStyle(card.nativeElement, 'transition-duration', `${this.animationDuration || 0}ms`);
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
transformCards() {
|
|
450
|
-
this.cardElementRefs.forEach((card, index) => this.renderer.setStyle(card.nativeElement, 'transform', this.getTransformation(this.cardWidth, index)));
|
|
451
|
-
}
|
|
452
|
-
changeTabsCount() {
|
|
453
|
-
this.visibleTabsCount = Math.round(this.scrollableTrackWidth / this.tabWidth);
|
|
454
|
-
if (this.tabFlex !== 100 / this.visibleTabsCount) {
|
|
455
|
-
this.tabFlex = 100 / this.visibleTabsCount;
|
|
456
|
-
this.circleElementRefs.forEach(item => this.renderer.setStyle(item.nativeElement, 'flex', `1 0 ${this.tabFlex}%`));
|
|
457
|
-
this.flagElementRefs.forEach(item => this.renderer.setStyle(item.nativeElement, 'flex', `1 0 ${this.tabFlex}%`));
|
|
458
|
-
this.cdr.detectChanges();
|
|
459
|
-
this.visibleEvents = this.trackItems
|
|
460
|
-
.slice(this.firstCircleInView, this.firstCircleInView + this.visibleTabsCount)
|
|
461
|
-
.filter(event => !event.isFlag);
|
|
462
|
-
if (!this.visibleEvents.find(event => event === this.selectedEvent)) {
|
|
463
|
-
const trackItemIndex = this.trackItems.findIndex(event => event === this.selectedEvent);
|
|
464
|
-
this.navigateToInterval(trackItemIndex, this.selectedEventIndex);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
l10nChange() {
|
|
469
|
-
if (this.localization.get('previous')) {
|
|
470
|
-
this.previousTitle = this.localization.get('previous');
|
|
471
|
-
}
|
|
472
|
-
if (this.localization.get('next')) {
|
|
473
|
-
this.nextTitle = this.localization.get('next');
|
|
474
|
-
}
|
|
475
|
-
this.cdr.markForCheck();
|
|
476
|
-
}
|
|
477
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TimelineHorizontalComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1.TimelineService }, { token: i2.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
478
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TimelineHorizontalComponent, isStandalone: true, selector: "kendo-timeline-horizontal", inputs: { events: "events", alterMode: "alterMode", collapsibleEvents: "collapsibleEvents", navigable: "navigable", showDateLabels: "showDateLabels", animationDuration: "animationDuration", eventHeight: "eventHeight", dateFormat: "dateFormat", headerTemplate: "headerTemplate", bodyTemplate: "bodyTemplate", actionsTemplate: "actionsTemplate" }, providers: [], viewQueries: [{ propertyName: "trackElementRef", first: true, predicate: ["track"], descendants: true }, { propertyName: "scrollableTrackElementRef", first: true, predicate: ["scrollableTrack"], descendants: true }, { propertyName: "cardElementRefs", predicate: ["card"], descendants: true, read: ElementRef }, { propertyName: "circleElementRefs", predicate: ["trackCircle"], descendants: true }, { propertyName: "flagElementRefs", predicate: ["trackFlag"], descendants: true }, { propertyName: "cardComponents", predicate: TimelineCardComponent, descendants: true }], exportAs: ["kendoTimelineHorizontal"], usesOnChanges: true, ngImport: i0, template: `
|
|
479
|
-
<div class="k-timeline-track-wrap" #track>
|
|
480
|
-
<button
|
|
481
|
-
kendoButton
|
|
482
|
-
[svgIcon]="svgLeftIcon"
|
|
483
|
-
icon="caret-alt-left"
|
|
484
|
-
class="k-timeline-arrow k-timeline-arrow-left"
|
|
485
|
-
rounded="full"
|
|
486
|
-
[title]="previousTitle"
|
|
487
|
-
(click)="previousClick()"
|
|
488
|
-
[disabled]="isFirstRange"
|
|
489
|
-
tabindex="-1"
|
|
490
|
-
type="button"
|
|
491
|
-
></button>
|
|
492
|
-
<button
|
|
493
|
-
kendoButton
|
|
494
|
-
[svgIcon]="svgRightIcon"
|
|
495
|
-
icon="caret-alt-right"
|
|
496
|
-
class="k-timeline-arrow k-timeline-arrow-right"
|
|
497
|
-
rounded="full"
|
|
498
|
-
[title]="nextTitle"
|
|
499
|
-
(click)="nextClick()"
|
|
500
|
-
[disabled]="isLastRange"
|
|
501
|
-
tabindex="-1"
|
|
502
|
-
type="button"
|
|
503
|
-
></button>
|
|
504
|
-
<div class="k-timeline-track">
|
|
505
|
-
<ul class="k-timeline-scrollable-wrap"
|
|
506
|
-
#scrollableTrack
|
|
507
|
-
[attr.role]="'tablist'"
|
|
508
|
-
[attr.tabindex]="'0'"
|
|
509
|
-
[@trackSlide]="{value: animationState, params: {transformValue: this.translateValue}}"
|
|
510
|
-
(@trackSlide.done)="onSlideDone()"
|
|
511
|
-
(transitionend)="onTrackTransitionEnd()"
|
|
512
|
-
>
|
|
513
|
-
@for (event of trackItems; track event; let index = $index) {
|
|
514
|
-
@if (event.isFlag) {
|
|
515
|
-
<li
|
|
516
|
-
#trackFlag
|
|
517
|
-
class="k-timeline-flag-wrap k-timeline-track-item"
|
|
518
|
-
[attr.role]="'none'"
|
|
519
|
-
[attr.aria-hidden]="true"
|
|
520
|
-
[ngStyle]="tabStyle()"
|
|
521
|
-
>
|
|
522
|
-
<span class="k-timeline-flag">{{ event.isFlag }}</span>
|
|
523
|
-
</li>
|
|
524
|
-
}
|
|
525
|
-
@if (!event.isFlag) {
|
|
526
|
-
<li
|
|
527
|
-
#trackCircle
|
|
528
|
-
class="k-timeline-track-item"
|
|
529
|
-
[attr.role]="'tab'"
|
|
530
|
-
(click)="navigateToEvent(index)"
|
|
531
|
-
[ngStyle]="tabStyle()"
|
|
532
|
-
>
|
|
533
|
-
<div class="k-timeline-date-wrap">
|
|
534
|
-
@if (showDateLabels) {
|
|
535
|
-
<span class="k-timeline-date">
|
|
536
|
-
{{ event.date | kendoDate: dateFormat }}
|
|
537
|
-
</span>
|
|
538
|
-
}
|
|
539
|
-
</div>
|
|
540
|
-
<span class="k-timeline-circle"></span>
|
|
541
|
-
</li>
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
</ul>
|
|
545
|
-
</div>
|
|
546
|
-
</div>
|
|
547
|
-
<div class="k-timeline-events-list">
|
|
548
|
-
@if (selectedEvent) {
|
|
549
|
-
<ul
|
|
550
|
-
class="k-timeline-scrollable-wrap"
|
|
551
|
-
[@eventsSlide]="{value: animationState, params: {animationDuration: this.animationDuration || 0}}"
|
|
552
|
-
(@eventsSlide.done)="onSlideDone()"
|
|
553
|
-
[ngStyle]="{'transform-origin': 'left top'}"
|
|
554
|
-
>
|
|
555
|
-
@for (event of eventsInInterval; track event; let index = $index) {
|
|
556
|
-
<li
|
|
557
|
-
#card
|
|
558
|
-
class="k-timeline-event"
|
|
559
|
-
(transitionend)="onTransitionEnd()"
|
|
560
|
-
>
|
|
561
|
-
<kendo-timeline-card
|
|
562
|
-
[event]="selectedCardIndex === index ? selectedEvent : null"
|
|
563
|
-
[expanded]="true"
|
|
564
|
-
[collapsible]="collapsibleEvents"
|
|
565
|
-
[calloutStyle]="selectedCardIndex === index ? calloutStyle : {}"
|
|
566
|
-
[ngStyle]="{visibility: selectedCardIndex === index ? 'visible' : 'hidden' }"
|
|
567
|
-
[tabIndex]="selectedCardIndex === index ? '0' : '-1'"
|
|
568
|
-
[navigable]="navigable"
|
|
569
|
-
[index]="selectedEventIndex"
|
|
570
|
-
[headerTemplate]="headerTemplate"
|
|
571
|
-
[bodyTemplate]="bodyTemplate"
|
|
572
|
-
[actionsTemplate]="actionsTemplate"
|
|
573
|
-
[eventHeight]="eventHeight"
|
|
574
|
-
orientation="horizontal"
|
|
575
|
-
>
|
|
576
|
-
</kendo-timeline-card>
|
|
577
|
-
</li>
|
|
578
|
-
}
|
|
579
|
-
</ul>
|
|
580
|
-
}
|
|
581
|
-
<kendo-resize-sensor (resize)="onResize()" [rateLimit]="10"></kendo-resize-sensor>
|
|
582
|
-
</div>
|
|
583
|
-
`, isInline: true, dependencies: [{ 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: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TimelineCardComponent, selector: "kendo-timeline-card", inputs: ["event", "expanded", "collapsible", "reversed", "orientation", "navigable", "tabIndex", "animationDuration", "index", "eventWidth", "eventHeight", "headerTemplate", "bodyTemplate", "actionsTemplate", "calloutStyle"], exportAs: ["kendoTimelineCard"] }, { kind: "pipe", type: DatePipe, name: "kendoDate" }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], animations: [
|
|
584
|
-
trigger('trackSlide', [
|
|
585
|
-
state('left', style({
|
|
586
|
-
transform: `translateX({{transformValue}}%)`,
|
|
587
|
-
}), { params: { transformValue: '0' } }),
|
|
588
|
-
state('right', style({
|
|
589
|
-
transform: `translateX({{transformValue}}%)`,
|
|
590
|
-
}), { params: { transformValue: '0' } }),
|
|
591
|
-
state('center', style({
|
|
592
|
-
transform: `translateX(0)`,
|
|
593
|
-
}))
|
|
594
|
-
]),
|
|
595
|
-
trigger('eventsSlide', [
|
|
596
|
-
transition('* => right', [
|
|
597
|
-
animate('{{animationDuration}}ms', style({ transform: `translateX(-100%)` }))
|
|
598
|
-
], { params: { animationDuration: '400' } }),
|
|
599
|
-
transition('* => left', [
|
|
600
|
-
animate('{{animationDuration}}ms', style({ transform: `translateX(100%)` }))
|
|
601
|
-
], { params: { animationDuration: '400' } })
|
|
602
|
-
])
|
|
603
|
-
] });
|
|
604
|
-
}
|
|
605
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TimelineHorizontalComponent, decorators: [{
|
|
606
|
-
type: Component,
|
|
607
|
-
args: [{
|
|
608
|
-
animations: [
|
|
609
|
-
trigger('trackSlide', [
|
|
610
|
-
state('left', style({
|
|
611
|
-
transform: `translateX({{transformValue}}%)`,
|
|
612
|
-
}), { params: { transformValue: '0' } }),
|
|
613
|
-
state('right', style({
|
|
614
|
-
transform: `translateX({{transformValue}}%)`,
|
|
615
|
-
}), { params: { transformValue: '0' } }),
|
|
616
|
-
state('center', style({
|
|
617
|
-
transform: `translateX(0)`,
|
|
618
|
-
}))
|
|
619
|
-
]),
|
|
620
|
-
trigger('eventsSlide', [
|
|
621
|
-
transition('* => right', [
|
|
622
|
-
animate('{{animationDuration}}ms', style({ transform: `translateX(-100%)` }))
|
|
623
|
-
], { params: { animationDuration: '400' } }),
|
|
624
|
-
transition('* => left', [
|
|
625
|
-
animate('{{animationDuration}}ms', style({ transform: `translateX(100%)` }))
|
|
626
|
-
], { params: { animationDuration: '400' } })
|
|
627
|
-
])
|
|
628
|
-
],
|
|
629
|
-
providers: [],
|
|
630
|
-
exportAs: 'kendoTimelineHorizontal',
|
|
631
|
-
selector: 'kendo-timeline-horizontal',
|
|
632
|
-
template: `
|
|
633
|
-
<div class="k-timeline-track-wrap" #track>
|
|
634
|
-
<button
|
|
635
|
-
kendoButton
|
|
636
|
-
[svgIcon]="svgLeftIcon"
|
|
637
|
-
icon="caret-alt-left"
|
|
638
|
-
class="k-timeline-arrow k-timeline-arrow-left"
|
|
639
|
-
rounded="full"
|
|
640
|
-
[title]="previousTitle"
|
|
641
|
-
(click)="previousClick()"
|
|
642
|
-
[disabled]="isFirstRange"
|
|
643
|
-
tabindex="-1"
|
|
644
|
-
type="button"
|
|
645
|
-
></button>
|
|
646
|
-
<button
|
|
647
|
-
kendoButton
|
|
648
|
-
[svgIcon]="svgRightIcon"
|
|
649
|
-
icon="caret-alt-right"
|
|
650
|
-
class="k-timeline-arrow k-timeline-arrow-right"
|
|
651
|
-
rounded="full"
|
|
652
|
-
[title]="nextTitle"
|
|
653
|
-
(click)="nextClick()"
|
|
654
|
-
[disabled]="isLastRange"
|
|
655
|
-
tabindex="-1"
|
|
656
|
-
type="button"
|
|
657
|
-
></button>
|
|
658
|
-
<div class="k-timeline-track">
|
|
659
|
-
<ul class="k-timeline-scrollable-wrap"
|
|
660
|
-
#scrollableTrack
|
|
661
|
-
[attr.role]="'tablist'"
|
|
662
|
-
[attr.tabindex]="'0'"
|
|
663
|
-
[@trackSlide]="{value: animationState, params: {transformValue: this.translateValue}}"
|
|
664
|
-
(@trackSlide.done)="onSlideDone()"
|
|
665
|
-
(transitionend)="onTrackTransitionEnd()"
|
|
666
|
-
>
|
|
667
|
-
@for (event of trackItems; track event; let index = $index) {
|
|
668
|
-
@if (event.isFlag) {
|
|
669
|
-
<li
|
|
670
|
-
#trackFlag
|
|
671
|
-
class="k-timeline-flag-wrap k-timeline-track-item"
|
|
672
|
-
[attr.role]="'none'"
|
|
673
|
-
[attr.aria-hidden]="true"
|
|
674
|
-
[ngStyle]="tabStyle()"
|
|
675
|
-
>
|
|
676
|
-
<span class="k-timeline-flag">{{ event.isFlag }}</span>
|
|
677
|
-
</li>
|
|
678
|
-
}
|
|
679
|
-
@if (!event.isFlag) {
|
|
680
|
-
<li
|
|
681
|
-
#trackCircle
|
|
682
|
-
class="k-timeline-track-item"
|
|
683
|
-
[attr.role]="'tab'"
|
|
684
|
-
(click)="navigateToEvent(index)"
|
|
685
|
-
[ngStyle]="tabStyle()"
|
|
686
|
-
>
|
|
687
|
-
<div class="k-timeline-date-wrap">
|
|
688
|
-
@if (showDateLabels) {
|
|
689
|
-
<span class="k-timeline-date">
|
|
690
|
-
{{ event.date | kendoDate: dateFormat }}
|
|
691
|
-
</span>
|
|
692
|
-
}
|
|
693
|
-
</div>
|
|
694
|
-
<span class="k-timeline-circle"></span>
|
|
695
|
-
</li>
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
</ul>
|
|
699
|
-
</div>
|
|
700
|
-
</div>
|
|
701
|
-
<div class="k-timeline-events-list">
|
|
702
|
-
@if (selectedEvent) {
|
|
703
|
-
<ul
|
|
704
|
-
class="k-timeline-scrollable-wrap"
|
|
705
|
-
[@eventsSlide]="{value: animationState, params: {animationDuration: this.animationDuration || 0}}"
|
|
706
|
-
(@eventsSlide.done)="onSlideDone()"
|
|
707
|
-
[ngStyle]="{'transform-origin': 'left top'}"
|
|
708
|
-
>
|
|
709
|
-
@for (event of eventsInInterval; track event; let index = $index) {
|
|
710
|
-
<li
|
|
711
|
-
#card
|
|
712
|
-
class="k-timeline-event"
|
|
713
|
-
(transitionend)="onTransitionEnd()"
|
|
714
|
-
>
|
|
715
|
-
<kendo-timeline-card
|
|
716
|
-
[event]="selectedCardIndex === index ? selectedEvent : null"
|
|
717
|
-
[expanded]="true"
|
|
718
|
-
[collapsible]="collapsibleEvents"
|
|
719
|
-
[calloutStyle]="selectedCardIndex === index ? calloutStyle : {}"
|
|
720
|
-
[ngStyle]="{visibility: selectedCardIndex === index ? 'visible' : 'hidden' }"
|
|
721
|
-
[tabIndex]="selectedCardIndex === index ? '0' : '-1'"
|
|
722
|
-
[navigable]="navigable"
|
|
723
|
-
[index]="selectedEventIndex"
|
|
724
|
-
[headerTemplate]="headerTemplate"
|
|
725
|
-
[bodyTemplate]="bodyTemplate"
|
|
726
|
-
[actionsTemplate]="actionsTemplate"
|
|
727
|
-
[eventHeight]="eventHeight"
|
|
728
|
-
orientation="horizontal"
|
|
729
|
-
>
|
|
730
|
-
</kendo-timeline-card>
|
|
731
|
-
</li>
|
|
732
|
-
}
|
|
733
|
-
</ul>
|
|
734
|
-
}
|
|
735
|
-
<kendo-resize-sensor (resize)="onResize()" [rateLimit]="10"></kendo-resize-sensor>
|
|
736
|
-
</div>
|
|
737
|
-
`,
|
|
738
|
-
standalone: true,
|
|
739
|
-
imports: [ButtonComponent, NgStyle, TimelineCardComponent, DatePipe, ResizeSensorComponent]
|
|
740
|
-
}]
|
|
741
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i1.TimelineService }, { type: i2.LocalizationService }], propDecorators: { events: [{
|
|
742
|
-
type: Input
|
|
743
|
-
}], alterMode: [{
|
|
744
|
-
type: Input
|
|
745
|
-
}], collapsibleEvents: [{
|
|
746
|
-
type: Input
|
|
747
|
-
}], navigable: [{
|
|
748
|
-
type: Input
|
|
749
|
-
}], showDateLabels: [{
|
|
750
|
-
type: Input
|
|
751
|
-
}], animationDuration: [{
|
|
752
|
-
type: Input
|
|
753
|
-
}], eventHeight: [{
|
|
754
|
-
type: Input
|
|
755
|
-
}], dateFormat: [{
|
|
756
|
-
type: Input
|
|
757
|
-
}], headerTemplate: [{
|
|
758
|
-
type: Input
|
|
759
|
-
}], bodyTemplate: [{
|
|
760
|
-
type: Input
|
|
761
|
-
}], actionsTemplate: [{
|
|
762
|
-
type: Input
|
|
763
|
-
}], cardElementRefs: [{
|
|
764
|
-
type: ViewChildren,
|
|
765
|
-
args: ['card', { read: ElementRef }]
|
|
766
|
-
}], circleElementRefs: [{
|
|
767
|
-
type: ViewChildren,
|
|
768
|
-
args: ['trackCircle']
|
|
769
|
-
}], flagElementRefs: [{
|
|
770
|
-
type: ViewChildren,
|
|
771
|
-
args: ['trackFlag']
|
|
772
|
-
}], trackElementRef: [{
|
|
773
|
-
type: ViewChild,
|
|
774
|
-
args: ['track']
|
|
775
|
-
}], scrollableTrackElementRef: [{
|
|
776
|
-
type: ViewChild,
|
|
777
|
-
args: ['scrollableTrack']
|
|
778
|
-
}], cardComponents: [{
|
|
779
|
-
type: ViewChildren,
|
|
780
|
-
args: [TimelineCardComponent]
|
|
781
|
-
}] } });
|