@onemrvapublic/design-system 22.0.0-develop.6 → 22.0.0-develop.7

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.
@@ -0,0 +1,195 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { CdkOverlayOrigin, ConnectedPosition } from '@angular/cdk/overlay';
3
+
4
+ /** A dated period plotted on the timeline. */
5
+ interface TimelinePeriod {
6
+ /** Stable identity; used for selection and as the row track key. */
7
+ id: string;
8
+ /** Inclusive start, interpreted in local time. Must not be after `endDate`. */
9
+ beginDate: Date;
10
+ /** Inclusive end, interpreted in local time. Must not be before `beginDate`. */
11
+ endDate: Date;
12
+ /** Legend join key; an unmatched or missing type falls back to a neutral grey. */
13
+ type?: string;
14
+ /** Text shown inside the bar (when labels are enabled) and in the tooltip. */
15
+ label?: string;
16
+ /** Tooltip detail; rendered as sanitized HTML via Angular's `[innerHTML]`. */
17
+ description?: string;
18
+ /** When true the bar is dimmed and cannot be selected or focused. */
19
+ disabled?: boolean;
20
+ }
21
+
22
+ /** A single-select filter toggle shown in the timeline header. */
23
+ interface TimelineFilterOption {
24
+ label: string;
25
+ value: string;
26
+ }
27
+ /** Maximum filter options the timeline renders; extras are ignored. */
28
+ declare const MAX_TIMELINE_FILTERS = 3;
29
+
30
+ interface TimelineBar {
31
+ class: string;
32
+ style: string;
33
+ period?: TimelinePeriod;
34
+ trackById: string;
35
+ }
36
+
37
+ /** A palette token assigned to a legend entry; resolved to a hex value via `TIMELINE_PALETTE`. */
38
+ type TimelineColor = 'data-1' | 'data-2' | 'data-3' | 'data-4' | 'data-5' | 'data-6' | 'data-7';
39
+ /** All palette tokens in display order. */
40
+ declare const TIMELINE_COLORS: readonly TimelineColor[];
41
+ /** Maps each palette token to its hex value. */
42
+ declare const TIMELINE_PALETTE: Record<TimelineColor, string>;
43
+
44
+ /** Legend entries mapping each period `type` to its label and color. */
45
+ type TimelineLegend = TimelineLegendItem[];
46
+ /** Maps a period `type` to the label and color used to render and group it. */
47
+ interface TimelineLegendItem {
48
+ /** Join key matched against `TimelinePeriod.type`. */
49
+ type: string;
50
+ /** Human-readable name shown in the legend. */
51
+ label: string;
52
+ /** Palette token applied to every period of this `type`. */
53
+ color: TimelineColor;
54
+ }
55
+
56
+ /**
57
+ * Displays dated periods on a horizontal, year-based timeline. Overlapping
58
+ * periods stack into rows and take their colour from the matching legend item.
59
+ *
60
+ * @example
61
+ * ```html
62
+ * <onemrva-timeline
63
+ * title="Career timeline"
64
+ * [periods]="periods"
65
+ * [legend]="legend"
66
+ * [filters]="filters"
67
+ * [(activeFilter)]="activeFilter"
68
+ * [(selectedPeriod)]="selected"
69
+ * emptyMessage="No periods to display"
70
+ * />
71
+ * ```
72
+ */
73
+ declare class OnemrvaTimelineComponent {
74
+ private readonly fallbackColor;
75
+ private readonly rowHeightPx;
76
+ private readonly plotPaddingPx;
77
+ private readonly axesHeightPx;
78
+ /** Optional heading shown above the visible year range. */
79
+ readonly title: _angular_core.InputSignal<string>;
80
+ /** Periods to plot on the timeline. */
81
+ readonly periods: _angular_core.InputSignal<TimelinePeriod[]>;
82
+ /** Legend entries that map a period `type` to its label and color. */
83
+ readonly legend: _angular_core.InputSignal<TimelineLegend | undefined>;
84
+ /** Size, in years, of the visible window; two-way bindable via the period dropdown. */
85
+ readonly fixedYearCount: _angular_core.ModelSignal<number>;
86
+ /** Year-window sizes offered by the period dropdown. */
87
+ readonly yearOptions: _angular_core.InputSignal<number[]>;
88
+ /** When true, the period dropdown offers a "Month" option. */
89
+ readonly showMonthPicker: _angular_core.InputSignal<boolean>;
90
+ /** Whether month numbers are shown under each year (only when the window spans at most 5 years). */
91
+ readonly showMonths: _angular_core.InputSignal<boolean>;
92
+ /** Whether period labels are rendered inside the bars. */
93
+ readonly showLabels: _angular_core.InputSignal<boolean>;
94
+ /** Whether the hover popup with period details is shown. */
95
+ readonly showTooltip: _angular_core.InputSignal<boolean>;
96
+ /** Optional max height (any CSS length) for the timeline body; rows scroll within it while the year and month axes stay pinned. Ignored when `fullSize` is true. */
97
+ readonly maxHeight: _angular_core.InputSignal<string>;
98
+ /** When true, every row is shown at once and the body never scrolls; `maxHeight` is ignored. */
99
+ readonly fullSize: _angular_core.InputSignal<boolean>;
100
+ /** Single-select filter toggles shown in the header; at most three are rendered. */
101
+ readonly filters: _angular_core.InputSignal<TimelineFilterOption[]>;
102
+ /** Message shown when no periods are provided. Nothing renders when it is empty. */
103
+ readonly emptyMessage: _angular_core.InputSignal<string>;
104
+ /** Currently selected period. Two-way bindable via `[(selectedPeriod)]`. */
105
+ readonly selectedPeriod: _angular_core.ModelSignal<TimelinePeriod | undefined>;
106
+ /** Value of the currently active filter, or `undefined` when none. Two-way bindable. */
107
+ readonly activeFilter: _angular_core.ModelSignal<string | undefined>;
108
+ /** Emits the active filter value whenever the selection changes. */
109
+ readonly filterChange: _angular_core.OutputEmitterRef<string | undefined>;
110
+ /**
111
+ * Emits the unit shown on the lower axis whenever the period view changes:
112
+ * `'months'` in the year view, or `'days'` when a single month is focused.
113
+ */
114
+ readonly axisUnitChange: _angular_core.OutputEmitterRef<"months" | "days">;
115
+ protected readonly monthsByYear: _angular_core.Signal<Map<number, {
116
+ month: number;
117
+ widthPercent: number;
118
+ }[]>>;
119
+ protected readonly tooltipInfo: _angular_core.WritableSignal<TooltipInfo>;
120
+ protected readonly tooltipId: string;
121
+ protected readonly tooltipPositions: ConnectedPosition[];
122
+ protected readonly changeRange: _angular_core.WritableSignal<number>;
123
+ protected readonly activeType: _angular_core.WritableSignal<string | undefined>;
124
+ protected readonly monthMode: _angular_core.WritableSignal<boolean>;
125
+ private readonly locale;
126
+ private readonly shortMonthFormat;
127
+ private readonly longMonthFormat;
128
+ protected readonly focusedDate: _angular_core.WritableSignal<{
129
+ year: number;
130
+ month: number;
131
+ }>;
132
+ constructor();
133
+ protected readonly scrollMaxHeight: _angular_core.Signal<string | null>;
134
+ protected readonly plotHeightPx: _angular_core.Signal<number>;
135
+ private readonly fullRange;
136
+ private readonly totalYears;
137
+ private readonly maxOffset;
138
+ private readonly offset;
139
+ protected readonly displayRange: _angular_core.Signal<{
140
+ beginYear: number;
141
+ endYear: number;
142
+ } | null>;
143
+ protected readonly canPrevious: _angular_core.Signal<boolean>;
144
+ protected readonly canNext: _angular_core.Signal<boolean>;
145
+ protected readonly monthList: _angular_core.Signal<{
146
+ value: string;
147
+ label: string;
148
+ }[]>;
149
+ protected readonly monthLabel: _angular_core.Signal<string>;
150
+ protected readonly focusedMonthValue: _angular_core.Signal<string>;
151
+ protected readonly canPreviousMonth: _angular_core.Signal<boolean>;
152
+ protected readonly canNextMonth: _angular_core.Signal<boolean>;
153
+ protected readonly years: _angular_core.Signal<number[]>;
154
+ private readonly displayWindow;
155
+ protected readonly visiblePeriods: _angular_core.Signal<TimelinePeriod[]>;
156
+ protected readonly displayedRows: _angular_core.Signal<TimelineBar[][]>;
157
+ protected readonly focusedMonthDays: _angular_core.Signal<number[]>;
158
+ protected readonly dayWidthPercent: _angular_core.Signal<number>;
159
+ protected readonly sortedLegend: _angular_core.Signal<TimelineLegendItem[]>;
160
+ protected readonly visibleFilters: _angular_core.Signal<TimelineFilterOption[]>;
161
+ protected getLegend(type?: string): TimelineLegendItem | undefined;
162
+ protected colorHex(color?: TimelineColor): string;
163
+ private colorOf;
164
+ protected periodRange(period?: TimelinePeriod): string;
165
+ protected nextYear(): void;
166
+ protected previousYear(): void;
167
+ protected onPeriodChange(value: string | number): void;
168
+ protected goToMonth(value: string): void;
169
+ protected previousMonth(): void;
170
+ protected nextMonth(): void;
171
+ protected onFilterChange(value: string | undefined): void;
172
+ protected selectPeriod(period?: TimelinePeriod): void;
173
+ protected onLegendSelect(item: TimelineLegendItem): void;
174
+ protected isActive(period?: TimelinePeriod): boolean;
175
+ protected showPeriodTooltip(period?: TimelinePeriod, origin?: CdkOverlayOrigin): void;
176
+ protected hidePeriodTooltip(): void;
177
+ protected isTooltipOpenFor(period?: TimelinePeriod): boolean;
178
+ protected ariaLabel(period?: TimelinePeriod): string | null;
179
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<OnemrvaTimelineComponent, never>;
180
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<OnemrvaTimelineComponent, "onemrva-timeline", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "periods": { "alias": "periods"; "required": false; "isSignal": true; }; "legend": { "alias": "legend"; "required": false; "isSignal": true; }; "fixedYearCount": { "alias": "fixedYearCount"; "required": false; "isSignal": true; }; "yearOptions": { "alias": "yearOptions"; "required": false; "isSignal": true; }; "showMonthPicker": { "alias": "showMonthPicker"; "required": false; "isSignal": true; }; "showMonths": { "alias": "showMonths"; "required": false; "isSignal": true; }; "showLabels": { "alias": "showLabels"; "required": false; "isSignal": true; }; "showTooltip": { "alias": "showTooltip"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "fullSize": { "alias": "fullSize"; "required": false; "isSignal": true; }; "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "selectedPeriod": { "alias": "selectedPeriod"; "required": false; "isSignal": true; }; "activeFilter": { "alias": "activeFilter"; "required": false; "isSignal": true; }; }, { "fixedYearCount": "fixedYearCountChange"; "selectedPeriod": "selectedPeriodChange"; "activeFilter": "activeFilterChange"; "filterChange": "filterChange"; "axisUnitChange": "axisUnitChange"; }, never, never, true, never>;
181
+ }
182
+ interface TooltipInfo {
183
+ visible: boolean;
184
+ period?: TimelinePeriod;
185
+ origin?: CdkOverlayOrigin;
186
+ }
187
+
188
+ declare class OnemrvaTimelineModule {
189
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<OnemrvaTimelineModule, never>;
190
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<OnemrvaTimelineModule, never, [typeof OnemrvaTimelineComponent], [typeof OnemrvaTimelineComponent]>;
191
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<OnemrvaTimelineModule>;
192
+ }
193
+
194
+ export { MAX_TIMELINE_FILTERS, OnemrvaTimelineComponent, OnemrvaTimelineModule, TIMELINE_COLORS, TIMELINE_PALETTE };
195
+ export type { TimelineColor, TimelineFilterOption, TimelineLegend, TimelineLegendItem, TimelinePeriod };
@@ -1,4 +1,4 @@
1
- declare const VERSION = "22.0.0-develop.6";
1
+ declare const VERSION = "22.0.0-develop.7";
2
2
 
3
3
  declare const ɵɵtsModuleIndicatorApiExtractorWorkaround = true;
4
4