@cngx/common 0.1.0-rc.7 → 0.1.0-rc.8
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/card/README.md +2 -1
- package/data/README.md +10 -1
- package/dialog/README.md +23 -1
- package/fesm2022/cngx-common-a11y.mjs +125 -111
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-audio.mjs +47 -5
- package/fesm2022/cngx-common-audio.mjs.map +1 -1
- package/fesm2022/cngx-common-card.mjs +300 -46
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +1176 -453
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-command.mjs +37 -10
- package/fesm2022/cngx-common-command.mjs.map +1 -1
- package/fesm2022/cngx-common-data.mjs +1318 -469
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +151 -14
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +340 -73
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +1744 -952
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +841 -114
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-popover.mjs +350 -60
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +727 -317
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +1601 -1243
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common-timeline.mjs +137 -53
- package/fesm2022/cngx-common-timeline.mjs.map +1 -1
- package/fesm2022/cngx-common.mjs +1 -1
- package/interactive/README.md +15 -4
- package/layout/README.md +21 -1
- package/package.json +3 -3
- package/popover/README.md +18 -2
- package/stepper/README.md +6 -4
- package/theming/components/cngx-accordion.css +1 -1
- package/theming/components/cngx-backdrop.css +12 -0
- package/theming/components/cngx-button-toggle.css +29 -3
- package/theming/components/cngx-data-grid.css +168 -1
- package/theming/components/cngx-dialog.css +13 -0
- package/theming/components/cngx-listbox.css +21 -12
- package/theming/components/cngx-menu.css +56 -16
- package/theming/components/cngx-popover.css +24 -0
- package/theming/components/cngx-recycler-placeholder.css +196 -0
- package/theming/components/cngx-ripple.css +1 -1
- package/theming/components/cngx-slider.css +32 -1
- package/theming/components/cngx-tooltip.css +12 -0
- package/timeline/README.md +155 -0
- package/types/cngx-common-a11y.d.ts +42 -18
- package/types/cngx-common-card.d.ts +201 -17
- package/types/cngx-common-chart.d.ts +343 -47
- package/types/cngx-common-command.d.ts +31 -8
- package/types/cngx-common-data.d.ts +581 -68
- package/types/cngx-common-dialog.d.ts +158 -3
- package/types/cngx-common-display.d.ts +356 -142
- package/types/cngx-common-interactive.d.ts +859 -210
- package/types/cngx-common-layout.d.ts +567 -28
- package/types/cngx-common-popover.d.ts +262 -39
- package/types/cngx-common-stepper.d.ts +366 -116
- package/types/cngx-common-tabs.d.ts +214 -50
- package/types/cngx-common-timeline.d.ts +82 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cngx-common-timeline.mjs","sources":["../../../projects/common/timeline/grouping.ts","../../../projects/common/timeline/marker.component.ts","../../../projects/common/timeline/connector.component.ts","../../../projects/common/timeline/marker-host.token.ts","../../../projects/common/timeline/timeline-config.ts","../../../projects/common/timeline/timeline-item.component.ts","../../../projects/common/timeline/template-slots.ts","../../../projects/common/timeline/public-api.ts","../../../projects/common/timeline/cngx-common-timeline.ts"],"sourcesContent":["import { InjectionToken, linkedSignal, type Signal } from '@angular/core';\n\n/**\n * One rendered band of a timeline - a calendar bucket plus the items that\n * fall into it, already sorted.\n *\n * The group carries no label: formatting a date is a locale concern that\n * belongs to the `*cngxTimelineDateHeader` slot (or the config's\n * `groupLabel` fallback), not to the presenter. `key` is stable and\n * collision-free across the built-in groupers, so it doubles as the\n * `@for` track expression and as the `aria-labelledby` id seed.\n *\n * @category common/timeline\n */\nexport interface TimelineGroup<T> {\n /** Stable bucket identity, e.g. `2026-07-27` for `day`. */\n readonly key: string;\n /**\n * Local start-of-bucket instant - midnight for `day`, the Monday for\n * `week`, the first of the month for `month`. For `'none'` it is the\n * date of the first item in sort order.\n */\n readonly start: Date;\n /** Items in this bucket, in the resolved sort direction. */\n readonly items: readonly T[];\n}\n\n/**\n * What a {@link TimelineGroupingFn} returns for a single item: the bucket\n * it belongs to, and the instant that bucket starts at.\n *\n * @category common/timeline\n */\nexport interface TimelineGroupKey {\n readonly key: string;\n readonly start: Date;\n}\n\n/**\n * Escape hatch for consumer-defined bucketing - UTC days, fiscal quarters,\n * sprint windows, \"today / this week / earlier\". Receives the coerced date\n * and the item it came from, so a grouper may key off payload fields\n * (tenant, channel) as well as time.\n *\n * Called once per item per recomputation; keep it pure and cheap.\n *\n * @category common/timeline\n */\nexport type TimelineGroupingFn<T> = (date: Date, item: T) => TimelineGroupKey;\n\n/**\n * Built-in bucketing modes plus the {@link TimelineGroupingFn} escape\n * hatch. The three calendar modes read **local** date fields, so they stay\n * correct across DST transitions where a day is 23 or 25 hours long -\n * epoch division would silently split or merge those days.\n *\n * `'none'` collapses everything into one synthetic group, which is how the\n * organism renders an ungrouped `role=\"list\"` without a second code path.\n *\n * @category common/timeline\n */\nexport type TimelineGroupBy<T> = 'day' | 'week' | 'month' | 'none' | TimelineGroupingFn<T>;\n\n/**\n * Sort direction for the whole timeline. `'desc'` (default) is\n * newest-first, the activity-feed convention; `'asc'` is oldest-first,\n * which reads better for narrative histories.\n *\n * @category common/timeline\n */\nexport type TimelineDirection = 'asc' | 'desc';\n\n/**\n * Pulls the timestamp out of a consumer item. Anything the `Date`\n * constructor accepts works, so ISO strings straight off an API response\n * need no pre-mapping.\n *\n * @category common/timeline\n */\nexport type TimelineDateAccessor<T> = (item: T) => Date | string | number;\n\n/**\n * Inputs to {@link createTimelineGrouping}. Every reactive knob is a\n * zero-arg accessor, so a `Signal` (or an `input()`) can be passed\n * directly and a constant is just `() => 'day'`.\n *\n * @category common/timeline\n */\nexport interface TimelineGroupingOptions<T> {\n /** Source list. Read inside the `groups` computation, so it is tracked. */\n readonly items: () => readonly T[];\n /**\n * Timestamp accessor. Not a signal itself, but it is called inside the\n * `groups` computation, so a caller that closes over one - as the organism\n * does over its `[dateAccessor]` input - has those reads tracked like any\n * other and re-groups when the accessor is rebound.\n */\n readonly dateAccessor: TimelineDateAccessor<T>;\n /** Bucketing mode. Defaults to `'day'`. */\n readonly groupBy?: () => TimelineGroupBy<T>;\n /** Sort direction. Defaults to `'desc'`. */\n readonly direction?: () => TimelineDirection;\n}\n\n/**\n * What {@link createTimelineGrouping} hands back. An object rather than a\n * bare `Signal` because the v2 live cursor extends this surface - callers\n * written against v1 keep compiling.\n *\n * @category common/timeline\n */\nexport interface TimelineGrouping<T> {\n readonly groups: Signal<readonly TimelineGroup<T>[]>;\n}\n\ninterface Bucket<T> {\n readonly start: Date;\n readonly items: T[];\n}\n\nfunction pad2(value: number): string {\n return value < 10 ? `0${value}` : `${value}`;\n}\n\nfunction groupByDay(date: Date): TimelineGroupKey {\n const year = date.getFullYear();\n const month = date.getMonth();\n const day = date.getDate();\n return {\n key: `${year}-${pad2(month + 1)}-${pad2(day)}`,\n start: new Date(year, month, day),\n };\n}\n\nfunction groupByWeek(date: Date): TimelineGroupKey {\n // ISO weeks start on Monday; `getDay()` starts on Sunday.\n const offset = (date.getDay() + 6) % 7;\n const start = new Date(date.getFullYear(), date.getMonth(), date.getDate() - offset);\n return {\n key: `W${start.getFullYear()}-${pad2(start.getMonth() + 1)}-${pad2(start.getDate())}`,\n start,\n };\n}\n\nfunction groupByMonth(date: Date): TimelineGroupKey {\n const year = date.getFullYear();\n const month = date.getMonth();\n return { key: `${year}-${pad2(month + 1)}`, start: new Date(year, month, 1) };\n}\n\nfunction groupByNone(date: Date): TimelineGroupKey {\n return { key: 'all', start: date };\n}\n\nfunction resolveGrouper<T>(mode: TimelineGroupBy<T>): TimelineGroupingFn<T> {\n if (typeof mode === 'function') {\n return mode;\n }\n switch (mode) {\n case 'week':\n return groupByWeek;\n case 'month':\n return groupByMonth;\n case 'none':\n return groupByNone;\n default:\n return groupByDay;\n }\n}\n\nfunction toDate(value: Date | string | number): Date {\n return value instanceof Date ? value : new Date(value);\n}\n\nfunction sameItems<T>(previous: readonly T[], next: readonly T[]): boolean {\n return previous.length === next.length && previous.every((item, i) => item === next[i]);\n}\n\nfunction groupsEqual<T>(a: readonly TimelineGroup<T>[], b: readonly TimelineGroup<T>[]): boolean {\n return a.length === b.length && a.every((group, index) => group === b[index]);\n}\n\n/**\n * Derives grouped, sorted timeline bands from a flat item list.\n *\n * Pure derivation: bands come out of one `linkedSignal` over the `items`\n * accessor. Nothing is synced, nothing is written back, and the presenter\n * never mutates its input array. The previous bands are read through the\n * `computation` callback rather than a closure cache, so the result depends\n * on the inputs and the prior value alone - never on how many times it ran.\n *\n * Three properties make it usable as the organism's only data path:\n *\n * - **Defensive sort.** Consumer data does not have to arrive sorted. The\n * presenter sorts by the accessor date on every run using a stable sort,\n * so items sharing a timestamp keep their input order in both\n * directions.\n * - **Local-calendar bucketing.** `day` / `week` / `month` read local date\n * fields rather than dividing the epoch, which is what keeps 23-hour and\n * 25-hour DST days intact. Consumers who want UTC (or any other rule)\n * pass a {@link TimelineGroupingFn}.\n * - **Append-stability.** Groups whose items are *the same objects* hand\n * back the same band reference, and the signal carries a structural\n * `equal`. Reuse is deliberately keyed on reference identity rather than\n * on an id: a refetch returns new objects at the same ids, and reusing\n * there would pin the band to a stale payload. Appending therefore leaves\n * every other band's\n * `@for` block untouched instead of re-rendering the whole timeline.\n *\n * Reach for the DI token {@link CNGX_TIMELINE_GROUPING_FACTORY} rather\n * than this function directly when the caller is a component - that is\n * what makes the bucketing swappable per app or per component.\n *\n * ```ts\n * const grouping = createTimelineGrouping({\n * items: this.events,\n * dateAccessor: (event) => event.occurredAt,\n * groupBy: this.groupBy,\n * });\n * ```\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/grouping.ts\n * @since 0.1.0\n */\nexport function createTimelineGrouping<T>(\n options: TimelineGroupingOptions<T>,\n): TimelineGrouping<T> {\n const { items, dateAccessor, groupBy, direction } = options;\n\n // `linkedSignal` rather than `computed`: append-stability needs the\n // previous bands to hand their references back, and this is the sanctioned\n // way to read them. A closure cache mutated inside a `computed` would make\n // the computation impure - its output would depend on how many times it had\n // run, not only on its inputs.\n const groups = linkedSignal<readonly TimelineGroup<T>[], readonly TimelineGroup<T>[]>({\n source: () => {\n const source = items();\n const grouper = resolveGrouper(groupBy?.() ?? 'day');\n const sign = (direction?.() ?? 'desc') === 'asc' ? 1 : -1;\n\n const dated = source.map((item) => ({ item, date: toDate(dateAccessor(item)) }));\n dated.sort((a, b) => sign * (a.date.getTime() - b.date.getTime()));\n\n // Map preserves insertion order, so buckets come out already sorted.\n const buckets = new Map<string, Bucket<T>>();\n for (const entry of dated) {\n const { key, start } = grouper(entry.date, entry.item);\n const bucket = buckets.get(key);\n if (bucket) {\n bucket.items.push(entry.item);\n } else {\n buckets.set(key, { start, items: [entry.item] });\n }\n }\n\n return Array.from(buckets, ([key, bucket]) => ({\n key,\n start: bucket.start,\n items: bucket.items as readonly T[],\n }));\n },\n computation: (fresh, previous) => {\n const previousByKey = new Map((previous?.value ?? []).map((group) => [group.key, group]));\n return fresh.map((group) => {\n const prior = previousByKey.get(group.key);\n // Reference identity only. Matching ids are NOT enough: a refetch\n // returns fresh objects at the same ids with changed content, and\n // handing back the prior band there would render the old payload\n // forever. Reference equality is the only signal that says \"these\n // are literally the same items\", which is what reuse requires.\n const reusable =\n prior?.start.getTime() === group.start.getTime() &&\n sameItems(prior.items, group.items);\n return reusable ? prior : group;\n });\n },\n equal: groupsEqual,\n });\n\n return { groups };\n}\n\n/**\n * Signature of {@link createTimelineGrouping}, carried as a named type so\n * a DI override matches it exactly.\n *\n * @category common/timeline\n */\nexport type CngxTimelineGroupingFactory = <T>(\n options: TimelineGroupingOptions<T>,\n) => TimelineGrouping<T>;\n\n/**\n * Resolves the presenter `<cngx-timeline>` builds its bands with.\n * Defaults to {@link createTimelineGrouping}.\n *\n * Override app-wide via\n * `providers: [{ provide: CNGX_TIMELINE_GROUPING_FACTORY, useValue: myFactory }]`\n * to change bucketing everywhere (fiscal calendars, \"today / earlier\"\n * relative bands, server-supplied grouping), or per component via\n * `viewProviders` for a one-off. An override wraps rather than replaces\n * in most cases - call `createTimelineGrouping` inside your factory and\n * post-process its `groups`.\n *\n * Same shape as `CNGX_SELECTION_CONTROLLER_FACTORY`: the internals of a\n * component are swappable without forking the component.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/grouping.ts\n * @relatedTo createTimelineGrouping\n * @since 0.1.0\n */\nexport const CNGX_TIMELINE_GROUPING_FACTORY = new InjectionToken<CngxTimelineGroupingFactory>(\n 'CngxTimelineGroupingFactory',\n {\n providedIn: 'root',\n factory: () => createTimelineGrouping,\n },\n);\n","import { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\nimport { coerceBooleanProperty } from '@cngx/core/utils';\n\n/**\n * Process vocabulary shared by the timeline marker, the connector and\n * `CngxTimelineItem`.\n *\n * Deliberately narrow: it describes where an event sits in a history, not\n * what the user may do about it. A timeline that needed `disabled`,\n * `editable` or `current` would be a stepper, and steppers live in\n * `@cngx/common/stepper` with their own flow logic.\n *\n * @category common/timeline\n */\nexport type TimelineStatus = 'done' | 'active' | 'upcoming' | 'rejected';\n\n/**\n * The dot on the timeline rail - a status-coloured slot host for whatever\n * the consumer projects into it (nothing, a glyph, an icon, an avatar).\n *\n * Purely decorative and marked `aria-hidden`: the status it paints is\n * already carried semantically by the owning `CngxTimelineItem`, and\n * announcing it twice is worse than not announcing it here at all. That\n * also means colour is never this atom's only signal - the item's ARIA is.\n *\n * Usable standalone. It ships its own token SET rules, so a marker\n * dropped into a hand-rolled layout renders at the right size and tracks\n * `[data-density]` with no timeline organism above it.\n *\n * ### Bare dot\n * ```html\n * <cngx-timeline-marker status=\"done\" />\n * ```\n *\n * ### With a projected glyph\n * ```html\n * <cngx-timeline-marker status=\"rejected\">!</cngx-timeline-marker>\n * ```\n *\n * ### Pending\n * ```html\n * <cngx-timeline-marker status=\"active\" busy />\n * ```\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/marker.component.ts\n * @relatedTo CngxTimelineConnector\n * @since 0.1.0\n */\n@Component({\n selector: 'cngx-timeline-marker',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'cngx-timeline-marker',\n 'aria-hidden': 'true',\n '[attr.data-status]': 'status()',\n '[class.cngx-timeline-marker--busy]': 'busy()',\n },\n template: `<ng-content />`,\n styleUrls: ['./timeline-tokens.css', './marker.component.css'],\n})\nexport class CngxTimelineMarker {\n /**\n * Where the event sits in the history. Drives the dot colour and, for\n * `upcoming`, its hollow fill. Left unset the marker paints in the\n * neutral rail colour.\n */\n readonly status = input<TimelineStatus | undefined>(undefined);\n\n /**\n * Whether the marker pulses to signal work in flight - typically bound\n * from an item's own `[state]` being `pending`.\n *\n * The pulse is a `box-shadow` animation rather than a `transform` or a\n * size change: the marker sits in a grid track the rail is aligned to,\n * so anything that altered its box would drag the rail with it every\n * frame. Suppressed under `prefers-reduced-motion`.\n */\n readonly busy = input(false, { transform: coerceBooleanProperty });\n}\n","import { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\n\nimport type { TimelineStatus } from './marker.component';\n\n/**\n * Where a connector segment sits in its run, which decides which ends get\n * clipped back to the adjacent marker's centre.\n *\n * `'only'` renders nothing at all - a single-item timeline has no rail to\n * draw.\n *\n * @category common/timeline\n */\nexport type TimelineConnectorPosition = 'middle' | 'first' | 'last' | 'only';\n\n/**\n * The rail segment between two markers.\n *\n * Decorative and `aria-hidden`: it repeats a sequence the DOM order\n * already carries, so announcing it would only add noise. It is\n * status-capable all the same, because the *visual* run of a history is\n * where a rejected step or a not-yet-reached tail reads fastest - a\n * dashed segment for `upcoming` and a danger-toned one for `rejected`,\n * so the distinction survives without colour.\n *\n * Drawn with `border-inline-start` and clipped with block-direction\n * margins - logical properties throughout, so the rail lands on the\n * correct side under `dir=\"rtl\"` with no override.\n *\n * ### Between two items\n * ```html\n * <cngx-timeline-connector status=\"done\" />\n * ```\n *\n * ### Last item in the run\n * ```html\n * <cngx-timeline-connector position=\"last\" />\n * ```\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/connector.component.ts\n * @relatedTo CngxTimelineMarker\n * @since 0.1.0\n */\n@Component({\n selector: 'cngx-timeline-connector',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'cngx-timeline-connector',\n 'aria-hidden': 'true',\n '[attr.data-status]': 'status()',\n '[attr.data-position]': 'position()',\n },\n template: '',\n styleUrls: ['./timeline-tokens.css', './connector.component.css'],\n})\nexport class CngxTimelineConnector {\n /**\n * Status of the segment. `upcoming` renders dashed, `rejected` in the\n * danger tone, `done` and `active` solid in their own tones. Left unset\n * the rail paints in the neutral border colour.\n */\n readonly status = input<TimelineStatus | undefined>(undefined);\n\n /**\n * Position in the run. `'first'` clips the head back to the marker\n * centre, `'last'` clips the tail, `'only'` hides the segment\n * entirely. Defaults to `'middle'` - a full-height segment.\n */\n readonly position = input<TimelineConnectorPosition>('middle');\n}\n","import { InjectionToken, type Signal, type TemplateRef } from '@angular/core';\n\nimport type { CngxTimelineMarkerContext } from './template-slots';\n\n/**\n * The contract a timeline exposes to the rows beneath it, so an app-wide\n * marker template can reach a dot the organism does not itself render.\n *\n * `<cngx-timeline>` is data-driven in v1: the consumer owns the whole row\n * template and writes `<cngx-timeline-item>` themselves, which means the\n * organism has no handle on the marker inside it. Passing the resolved\n * template through DI is what closes that gap without the row having to\n * thread it down by hand.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineMarkerHost {\n /** Resolved `*cngxTimelineMarkerTpl`, already through the config cascade. */\n readonly markerTpl: Signal<TemplateRef<CngxTimelineMarkerContext<unknown>> | null>;\n}\n\n/**\n * DI token for {@link CngxTimelineMarkerHost}. Provided by `<cngx-timeline>`;\n * injected optionally by `CngxTimelineItem`, which falls back to its own\n * `[cngxTimelineMarkerContent]` projection when no timeline is above it.\n *\n * A token rather than an injected parent class: the row must stay usable\n * standalone, and a concrete parent type would make the two mutually\n * dependent and block the decompose schematic.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/marker-host.token.ts\n * @relatedTo CngxTimelineMarkerTpl, CngxTimelineItem\n * @since 0.1.0\n */\nexport const CNGX_TIMELINE_MARKER_HOST = new InjectionToken<CngxTimelineMarkerHost>(\n 'CngxTimelineMarkerHost',\n);\n","import {\n type EnvironmentProviders,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n Optional,\n type Provider,\n SkipSelf,\n type TemplateRef,\n} from '@angular/core';\n\nimport type { TimelineGroup } from './grouping';\nimport type { TimelineStatus } from './marker.component';\nimport type {\n CngxTimelineDateHeaderContext,\n CngxTimelineEmptyContext,\n CngxTimelineErrorContext,\n CngxTimelineItemContext,\n CngxTimelineMarkerContext,\n CngxTimelineRetryButtonContext,\n} from './template-slots';\n\n/**\n * Every user-visible string the timeline can render without a consumer\n * slot, plus the group-header formatter.\n *\n * Library defaults are English. Localise by passing\n * {@link withTimelineLabels} to {@link provideTimelineConfig} once at\n * bootstrap - the timeline itself hardcodes nothing, so a missing\n * translation shows up as English text rather than as a blank surface.\n *\n * Each of these is a *fallback*: the matching template slot\n * (`*cngxTimelineError`, `*cngxTimelineEmpty`, ...) wins whenever it is\n * present.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineLabels {\n /**\n * Accessible name for the timeline list itself, read when focus or a\n * screen-reader cursor enters the region. Default `'Timeline'`. A\n * per-instance `[aria-label]` / `[aria-labelledby]` wins.\n */\n readonly timelineRegion?: string;\n /**\n * Label on the built-in retry control rendered in the error surface.\n * Default `'Retry'`. Superseded by `*cngxTimelineRetryButton`.\n */\n readonly retry?: string;\n /**\n * Body text for the error surface when no `*cngxTimelineError` slot is\n * bound. Default `'Could not load the timeline.'`\n */\n readonly errorFallback?: string;\n /**\n * Body text for the empty surface when no `*cngxTimelineEmpty` slot is\n * bound. Default `'No events yet.'`\n */\n readonly emptyFallback?: string;\n /**\n * Accessible name for the loading body, so the skeleton is announced\n * as something other than silence. Default `'Loading timeline'`.\n */\n readonly loading?: string;\n /**\n * Text for the refreshing tail appended below the list while a\n * background reload is in flight. Default `'Updating…'`. Superseded by\n * `*cngxTimelineLoadingTail`.\n */\n readonly refreshing?: string;\n /**\n * Screen-reader text for a single item whose own `[state]` is pending.\n * Paired with `aria-busy` on that item. Default `'Updating'`.\n */\n readonly itemBusy?: string;\n /**\n * Inline error text for a single item whose own `[state]` failed, used\n * when the consumer renders no per-item error content. Default\n * `'Could not load this event.'`\n */\n readonly itemErrorFallback?: string;\n /**\n * Screen-reader wording for each process status. The marker paints the\n * status visually and the dot is `aria-hidden`, so this map is the only\n * channel that carries it to assistive tech - leaving a key blank\n * silences that status rather than merely restyling it.\n *\n * Defaults: `Completed` / `In progress` / `Upcoming` / `Rejected`.\n * Partial - {@link withTimelineLabels} merges it key by key, so\n * renaming one status leaves the other three at their defaults.\n */\n readonly status?: Readonly<Partial<Record<TimelineStatus, string>>>;\n /**\n * Formats a group's header when no `*cngxTimelineDateHeader` slot is\n * bound. Receives the whole group so a consumer can fold the item\n * count into the header. Defaults to the group's start date in the\n * browser locale - a date, unlike the strings above, has no sensible\n * English-only default.\n */\n readonly groupLabel?: (group: TimelineGroup<unknown>) => string;\n}\n\n/**\n * App-wide template defaults for the timeline's slot regions - the middle\n * tier of the family-standard 3-stage cascade\n * (per-instance directive > this field > built-in markup).\n *\n * Set them with {@link withTimelineTemplates}. Keys are typed against\n * `unknown` items because the config is app-wide while the slots are\n * generic; a `TemplateRef` for a concrete item type assigns in fine.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineTemplates {\n /** Default row template (`*cngxTimelineItem`). */\n readonly item?: TemplateRef<CngxTimelineItemContext<unknown>>;\n /** Default per-group date header (`*cngxTimelineDateHeader`). */\n readonly dateHeader?: TemplateRef<CngxTimelineDateHeaderContext<unknown>>;\n /** Default marker content (`*cngxTimelineMarkerTpl`). */\n readonly marker?: TemplateRef<CngxTimelineMarkerContext<unknown>>;\n /** Default empty surface (`*cngxTimelineEmpty`). */\n readonly empty?: TemplateRef<CngxTimelineEmptyContext>;\n /** Default error surface (`*cngxTimelineError`). */\n readonly error?: TemplateRef<CngxTimelineErrorContext>;\n /** Default retry control (`*cngxTimelineRetryButton`). */\n readonly retryButton?: TemplateRef<CngxTimelineRetryButtonContext>;\n /** Default refreshing tail (`*cngxTimelineLoadingTail`). */\n readonly loadingTail?: TemplateRef<void>;\n /** Default placeholder row for the first-load body (`*cngxTimelineSkeleton`). */\n readonly skeleton?: TemplateRef<void>;\n}\n\n/**\n * Timeline config surface. Resolution priority: \\\n * per-instance Input → `provideTimelineConfigAt` (viewProviders) →\n * `provideTimelineConfig` (root) → library default.\n *\n * Deliberately small: the timeline has no behavioural switches to\n * configure, so this carries text and templates only. Bucketing is\n * swapped through {@link CNGX_TIMELINE_GROUPING_FACTORY} instead, and\n * everything visual through the slot directives.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineConfig {\n readonly labels?: CngxTimelineLabels;\n readonly templates?: CngxTimelineTemplates;\n}\n\nconst TIMELINE_CONFIG_DEFAULTS: Required<CngxTimelineConfig> = {\n labels: {\n timelineRegion: 'Timeline',\n retry: 'Retry',\n errorFallback: 'Could not load the timeline.',\n emptyFallback: 'No events yet.',\n loading: 'Loading timeline',\n refreshing: 'Updating…',\n itemBusy: 'Updating',\n itemErrorFallback: 'Could not load this event.',\n status: {\n done: 'Completed',\n active: 'In progress',\n upcoming: 'Upcoming',\n rejected: 'Rejected',\n },\n groupLabel: (group) => group.start.toLocaleDateString(),\n },\n templates: {},\n};\n\n/**\n * DI token for the resolved timeline config. \\\n * `providedIn: 'root'` with the library defaults; override via\n * {@link provideTimelineConfig} (root) or {@link provideTimelineConfigAt}\n * (component scope).\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/timeline-config.ts\n * @relatedTo provideTimelineConfig\n * @relatedTo withTimelineLabels\n * @since 0.1.0\n */\nexport const CNGX_TIMELINE_CONFIG = new InjectionToken<CngxTimelineConfig>('CngxTimelineConfig', {\n providedIn: 'root',\n factory: () => TIMELINE_CONFIG_DEFAULTS,\n});\n\n/**\n * Signature of every `with*` timeline config builder - a pure\n * config-to-config mutator, folded left over the library defaults.\n *\n * @category common/timeline\n */\nexport type CngxTimelineConfigFeature = (config: CngxTimelineConfig) => CngxTimelineConfig;\n\n/**\n * Merge label overrides into the cascade. Keys left out keep their\n * English library default, so a consumer translates what they need and\n * nothing more.\n *\n * ```ts\n * provideTimelineConfig(\n * withTimelineLabels({\n * retry: 'Erneut versuchen',\n * emptyFallback: 'Noch keine Ereignisse.',\n * groupLabel: (group) => group.start.toLocaleDateString('de-AT'),\n * }),\n * )\n * ```\n *\n * @category common/timeline\n */\nexport function withTimelineLabels(labels: CngxTimelineLabels): CngxTimelineConfigFeature {\n return (config) => ({\n ...config,\n labels: {\n ...config.labels,\n ...labels,\n // One level deeper than the rest: `status` is a map, and a shallow\n // spread would let a consumer who renames one status silently\n // silence the other three.\n status: { ...config.labels?.status, ...labels.status },\n },\n });\n}\n\n/**\n * Merge app-wide slot template defaults into the cascade. Keys left out\n * keep whatever an earlier feature set, and a per-instance slot directive\n * still wins over anything set here.\n *\n * One bag rather than a `with*Template` builder per slot, matching how the\n * select family carries its own slot defaults - the timeline has eight\n * slots and near-identical builders would only add surface.\n *\n * ```ts\n * readonly emptyTpl = viewChild.required<TemplateRef<CngxTimelineEmptyContext>>('emptyTpl', {\n * read: TemplateRef,\n * });\n *\n * providers: [provideTimelineConfig(withTimelineTemplates({ empty: this.emptyTpl() }))]\n * ```\n *\n * @category common/timeline\n */\nexport function withTimelineTemplates(\n templates: CngxTimelineTemplates,\n): CngxTimelineConfigFeature {\n return (config) => ({ ...config, templates: { ...config.templates, ...templates } });\n}\n\nfunction applyFeatures(\n base: CngxTimelineConfig,\n features: readonly CngxTimelineConfigFeature[],\n): CngxTimelineConfig {\n return features.reduce<CngxTimelineConfig>((config, feature) => feature(config), base);\n}\n\n/**\n * Root-level provider. Apply once in `bootstrapApplication` /\n * `appConfig.providers`.\n *\n * @category common/timeline\n */\nexport function provideTimelineConfig(\n ...features: readonly CngxTimelineConfigFeature[]\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: CNGX_TIMELINE_CONFIG,\n useValue: applyFeatures(TIMELINE_CONFIG_DEFAULTS, features),\n },\n ]);\n}\n\n/**\n * Component-scoped override. Returns `Provider[]` rather than\n * {@link EnvironmentProviders} because `viewProviders` rejects opaque\n * environment providers.\n *\n * Features merge onto the parent config - an enclosing scope, or the root\n * provider, or the library defaults when neither is present - so a region\n * can re-phrase one label without resetting every other one the app set.\n *\n * ```ts\n * @Component({\n * viewProviders: [...provideTimelineConfigAt(withTimelineLabels({ retry: 'Again' }))],\n * })\n * ```\n *\n * @category common/timeline\n */\nexport function provideTimelineConfigAt(\n ...features: readonly CngxTimelineConfigFeature[]\n): Provider[] {\n return [\n {\n provide: CNGX_TIMELINE_CONFIG,\n useFactory: (parent: CngxTimelineConfig | null) =>\n applyFeatures(parent ?? TIMELINE_CONFIG_DEFAULTS, features),\n deps: [[new SkipSelf(), new Optional(), CNGX_TIMELINE_CONFIG]],\n },\n ];\n}\n\n/**\n * Read the resolved timeline config. Runs in an injection context.\n *\n * @category common/timeline\n */\nexport function injectTimelineConfig(): CngxTimelineConfig {\n return inject(CNGX_TIMELINE_CONFIG);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n Directive,\n ElementRef,\n inject,\n input,\n isDevMode,\n ViewEncapsulation,\n} from '@angular/core';\nimport { type CngxAsyncState } from '@cngx/core/utils';\n\nimport { CngxTimelineConnector, type TimelineConnectorPosition } from './connector.component';\nimport { CNGX_TIMELINE_MARKER_HOST } from './marker-host.token';\nimport { CngxTimelineMarker, type TimelineStatus } from './marker.component';\nimport { injectTimelineConfig } from './timeline-config';\n\n/**\n * Marks the element that holds an item's timestamp, so the item can place\n * it in the raster the active mode calls for - above the body in\n * `narrative`, trailing it in `activity`.\n *\n * Pair it with `<cngx-time>` from `@cngx/common/display` for relative\n * formatting; the timeline neither formats nor ticks.\n *\n * @category common/timeline\n */\n@Directive({\n selector: '[cngxTimelineTime]',\n standalone: true,\n host: { class: 'cngx-timeline-item__time' },\n})\nexport class CngxTimelineTime {}\n\n/**\n * Marks content that belongs on the far side of the rail from the row's\n * body - the year label opposite a card, the timestamp across a centred\n * rail.\n *\n * Per-row content, so it is a projection slot rather than a timeline-wide\n * template: the row template already owns it, and the config cascade is\n * for surfaces the whole timeline shares.\n *\n * The extra grid track only exists for rows that actually project into it\n * (`:has(> [cngxTimelineOpposite])`), so markup that predates this slot\n * keeps its raster to the pixel. Placement follows the row: opposite content\n * sits across the rail from the body under `start`, `end` and `alternate`\n * alike.\n *\n * ```html\n * <cngx-timeline-item status=\"done\">\n * <span cngxTimelineOpposite>2019</span>\n * <p>Founded</p>\n * </cngx-timeline-item>\n * ```\n *\n * **Keep the content non-interactive.** The slot projects ahead of the body,\n * so it is read first in every layout. For a year or a short label that is\n * the right reading order whichever side the rail is on. A link or a button\n * would take focus before the row it belongs to, and no placement of the\n * grid can fix that, because the paint follows `[data-row-side]` while the\n * DOM order does not.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/timeline-item.component.ts\n * @relatedTo CngxTimelineItem, CngxTimelineTime\n * @since 0.1.0\n */\n@Directive({\n selector: '[cngxTimelineOpposite]',\n standalone: true,\n host: { class: 'cngx-timeline-item__opposite' },\n})\nexport class CngxTimelineOpposite {}\n\n/**\n * Marks content to render inside this row's marker dot - a glyph, an icon,\n * an avatar.\n *\n * The per-row counterpart to the timeline-wide `*cngxTimelineMarkerTpl`, and\n * the only route when the row stands on its own. It also *wins* over that\n * template when both are present: most-local-wins, the same direction as\n * every other slot in the family, so one row can carry a different glyph\n * without the timeline's default being torn out for the rest.\n *\n * Whatever renders here is inside an `aria-hidden` element - decoration only.\n *\n * @category common/timeline\n */\n@Directive({\n selector: '[cngxTimelineMarkerContent]',\n standalone: true,\n})\nexport class CngxTimelineMarkerContent {}\n\n/**\n * Marks the element that holds an item's body. Optional - anything\n * projected without a slot directive lands in the body too. Reach for it\n * when the item also projects a timestamp and the source order would\n * otherwise be ambiguous.\n *\n * @category common/timeline\n */\n@Directive({\n selector: '[cngxTimelineContent]',\n standalone: true,\n host: { class: 'cngx-timeline-item__content' },\n})\nexport class CngxTimelineContent {}\n\n/**\n * @internal Enough of the tabbable surface to catch the mistake this warns\n * about. Not a general focus-order utility - `[tabindex]` matches a negative\n * value too, which is deliberately over-eager for a dev-only check.\n */\nconst FOCUSABLE =\n 'a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]';\n\n/**\n * One event on the timeline: a marker, the rail segment below it, an\n * optional timestamp, and the projected body.\n *\n * A terminal composable unit, not a fragment of the organism. It ships\n * its own token SET rules and defaults to the `narrative` raster, so\n * dropping one into a hand-rolled layout renders a complete, density-\n * correct item with no `<cngx-timeline>` above it. Inside the organism it\n * inherits `[data-mode]` and re-rasters itself.\n *\n * **Two independent state channels.** `status` is where the event sits in\n * a history (`done` / `active` / `upcoming` / `rejected`) - editorial, set\n * by the consumer. `state` is whether *this row's own* data is currently\n * loading or failed. They compose: a `done` item whose `state` errored\n * paints as rejected and announces the failure, without losing the\n * editorial status once the retry succeeds.\n *\n * **What it announces.** The marker and rail are `aria-hidden`, so colour is\n * never the only channel - the status reaches assistive tech through a\n * screen-reader-only line fed from `CNGX_TIMELINE_CONFIG.labels.status`, and\n * a failed row through a visible inline error. Both are read as the row's own\n * content, in DOM order, rather than through `aria-describedby`: the host is\n * a plain element with no role, so a description pointed at its own\n * descendants would resolve nowhere and duplicate the text for anyone\n * browsing it. Neither element is rendered while it has nothing to say.\n *\n * ### Standalone\n * ```html\n * <cngx-timeline-item status=\"done\">\n * <cngx-time cngxTimelineTime [date]=\"event.at\" />\n * <p>Deployment finished</p>\n * </cngx-timeline-item>\n * ```\n *\n * ### With its own async state\n * ```html\n * <cngx-timeline-item [state]=\"rowState\" position=\"last\">\n * <p>{{ rowState.data()?.summary }}</p>\n * </cngx-timeline-item>\n * ```\n *\n * @category common/timeline\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/timeline-item.component.ts\n * @relatedTo CngxTimelineMarker, CngxTimelineConnector, CNGX_TIMELINE_CONFIG\n * <example-url>http://localhost:4200/#/ui/timeline/basics/standalone-atoms</example-url>\n * <example-url>http://localhost:4200/#/ui/timeline/basics/custom-date-header-and-marker</example-url>\n * <example-url>http://localhost:4200/#/ui/timeline/basics/marker-precedence</example-url>\n * <example-url>http://localhost:4200/#/ui/timeline/layout/media-markers</example-url>\n * <example-url>http://localhost:4200/#/ui/timeline/layout/placement-end</example-url>\n * @since 0.1.0\n */\n@Component({\n selector: 'cngx-timeline-item',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxTimelineMarker, CngxTimelineConnector, NgTemplateOutlet],\n host: {\n class: 'cngx-timeline-item',\n '[attr.data-status]': 'status()',\n '[attr.data-failed]': 'failed() ? \"\" : null',\n '[attr.aria-busy]': 'ariaBusy()',\n },\n template: `\n <cngx-timeline-marker [status]=\"markerStatus()\" [busy]=\"busy()\">\n @if (markerTpl(); as tpl) {\n <ng-container\n *ngTemplateOutlet=\"tpl; context: { $implicit: item(), status: markerStatus() }\"\n />\n } @else {\n <ng-content select=\"[cngxTimelineMarkerContent]\" />\n }\n </cngx-timeline-marker>\n <cngx-timeline-connector [status]=\"markerStatus()\" [position]=\"position()\" />\n <ng-content select=\"[cngxTimelineOpposite]\" />\n <ng-content select=\"[cngxTimelineTime]\" />\n <div class=\"cngx-timeline-item__body\">\n <ng-content select=\"[cngxTimelineContent]\" />\n <ng-content />\n @if (errorText(); as text) {\n <p class=\"cngx-timeline-item__error\">{{ text }}</p>\n }\n </div>\n @if (statusText(); as text) {\n <span class=\"cngx-timeline-item__sr\">{{ text }}</span>\n }\n `,\n styleUrls: ['./timeline-tokens.css', './timeline-item.component.css'],\n})\nexport class CngxTimelineItem {\n private readonly config = injectTimelineConfig();\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Where the event sits in the history. Drives the marker and rail\n * colours and the screen-reader status line. Purely editorial - it\n * carries no flow logic, because a timeline is a record and a guided\n * process is a stepper.\n */\n readonly status = input<TimelineStatus | undefined>(undefined);\n\n /**\n * This row's own async state, for a body that loads, mutates or fails\n * independently of the list around it.\n *\n * Optional by construction and tolerant of a bare `state` attribute\n * (the empty string coerces to `undefined`), so the item never forces a\n * binding a consumer may not have.\n */\n readonly state = input<\n CngxAsyncState<unknown> | undefined,\n CngxAsyncState<unknown> | '' | undefined\n >(undefined, { transform: (value) => (typeof value === 'string' ? undefined : value) });\n\n /**\n * Position in the run, forwarded to the rail. `'last'` and `'only'`\n * stop the rail at this item so the timeline does not trail off into\n * empty space. The organism sets it; standalone items default to\n * `'middle'`.\n */\n readonly position = input<TimelineConnectorPosition>('middle');\n\n /**\n * The event this row stands for. Only ever read as the `$implicit` of an\n * app-wide `*cngxTimelineMarkerTpl`, so bind it when the app sets one and\n * that template needs the payload; leave it off otherwise.\n */\n readonly item = input<unknown>(undefined);\n\n /**\n * @internal The timeline-wide marker template, when a `<cngx-timeline>` is\n * above this row. Absent standalone.\n */\n private readonly hostMarkerTpl =\n inject(CNGX_TIMELINE_MARKER_HOST, { optional: true })?.markerTpl ?? (() => null);\n\n /** @internal Set when this row projects its own marker content. */\n private readonly ownMarker = contentChild(CngxTimelineMarkerContent);\n\n /**\n * @internal The timeline-wide template is the *default*, so a row that\n * projects its own marker content overrides it - most-local-wins, the\n * same direction as every other slot in the family. Resolving to `null`\n * rather than branching on `<ng-content>` keeps the projection static:\n * content lands in the DOM once and renders whatever it was given.\n */\n protected readonly markerTpl = computed(() => (this.ownMarker() ? null : this.hostMarkerTpl()));\n\n /** @internal Work in flight on this row's own state. */\n protected readonly busy = computed(() => {\n const status = this.state()?.status();\n return status === 'loading' || status === 'pending';\n });\n\n /** @internal This row's own state failed. */\n protected readonly failed = computed(() => this.state()?.status() === 'error');\n\n /** @internal `aria-busy` reflects the row's own work, not the list's. */\n protected readonly ariaBusy = computed(() => (this.busy() ? 'true' : null));\n\n /**\n * @internal A failed row paints as rejected regardless of its editorial\n * status - a failure is the more urgent fact, and `status` is left\n * untouched so the row returns to its own colour once a retry lands.\n */\n protected readonly markerStatus = computed<TimelineStatus | undefined>(() =>\n this.failed() ? 'rejected' : this.status(),\n );\n\n /**\n * @internal Busy outranks everything: a row still loading has nothing\n * settled to report. Otherwise this reads `markerStatus`, not `status`,\n * so the announcement can never contradict the paint - a failed row\n * announces the `rejected` it shows, not the editorial status it kept.\n */\n protected readonly statusText = computed(() => {\n const labels = this.config.labels;\n if (this.busy()) {\n return labels?.itemBusy ?? '';\n }\n const status = this.markerStatus();\n return status ? (labels?.status?.[status] ?? '') : '';\n });\n\n /** @internal Visible inline error, blank unless this row failed. */\n protected readonly errorText = computed(() =>\n this.failed() ? (this.config.labels?.itemErrorFallback ?? '') : '',\n );\n\n constructor() {\n if (isDevMode()) {\n // afterNextRender, not an effect: this is a one-shot authoring check\n // on projected content, and the reactive graph has no business\n // carrying it. Runs once per row, after its content exists.\n afterNextRender(() => {\n const opposite = this.host.nativeElement.querySelector(':scope > [cngxTimelineOpposite]');\n if (opposite?.querySelector(FOCUSABLE)) {\n console.warn(\n '[cngx-timeline-item] focusable content inside [cngxTimelineOpposite]. ' +\n 'The slot projects ahead of the row body, so under placement=\"end\" or ' +\n '\"alternate\" it takes focus before the row it belongs to while painting ' +\n 'on the far side of the rail. Keep opposite content non-interactive and ' +\n 'put controls in the body.',\n this.host.nativeElement,\n );\n }\n });\n }\n }\n}\n","import { Directive, inject, input, TemplateRef } from '@angular/core';\nimport type { EmptyReason } from '@cngx/common/card';\n\nimport type { TimelineGroup } from './grouping';\nimport type { TimelineStatus } from './marker.component';\n\n/**\n * Context for `*cngxTimelineItem` - the item itself plus where it sits.\n *\n * `first` and `last` are positions **within the group**, not within the\n * whole timeline, because that is what a consumer needs to decide whether\n * to draw a trailing rail.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineItemContext<T> {\n readonly $implicit: T;\n /** Index within the group. */\n readonly index: number;\n /** First item of its group. */\n readonly first: boolean;\n /** Last item of its group. */\n readonly last: boolean;\n /** The group this item was bucketed into. */\n readonly group: TimelineGroup<T>;\n}\n\n/**\n * The row template. The one slot with no built-in fallback: only the\n * consumer knows what an event of theirs looks like.\n *\n * Bind the same array the timeline gets and the `let-` variables come out\n * typed - `[cngxTimelineItem]` exists to pin `T`, nothing more:\n *\n * ```html\n * <cngx-timeline [items]=\"events()\" [dateAccessor]=\"at\">\n * <ng-template [cngxTimelineItem]=\"events()\" let-event let-last=\"last\">\n * <cngx-timeline-item [position]=\"last ? 'last' : 'middle'\">\n * <cngx-time cngxTimelineTime [date]=\"event.at\" />\n * <p>{{ event.summary }}</p>\n * </cngx-timeline-item>\n * </ng-template>\n * </cngx-timeline>\n * ```\n *\n * Named `CngxTimelineItemTpl` so it does not collide with the\n * `CngxTimelineItem` component; the selector stays `cngxTimelineItem`,\n * which is what consumers write.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineItem, CngxTimelineDateHeader\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineItem]',\n standalone: true,\n exportAs: 'cngxTimelineItem',\n})\nexport class CngxTimelineItemTpl<T = unknown> {\n /**\n * Type carrier, never read at runtime. Angular cannot infer a structural\n * directive's context generic from a sibling input on the host component,\n * so `T` has to be pinned on the directive itself; binding the same array\n * the timeline renders does that, and `ngTemplateContextGuard` below then\n * types every `let-` variable. This is `NgForOf`'s `ngForOf` mechanism,\n * not a cngx invention.\n *\n * Optional, and tolerant of the bare `cngxTimelineItem` attribute every\n * v1 consumer writes: an unbound attribute binds the empty string, which\n * `strictTemplates` would otherwise reject against an array type. The\n * empty string coerces to `undefined` and `T` falls back to `unknown` -\n * the Bridge-Input shape the library uses wherever an attribute doubles\n * as an opt-in.\n *\n * Nothing enforces that the array bound here is the array bound to\n * `[items]`; a mismatch only mistypes the `let-` variables, which the\n * template type-checker then rejects at the use site.\n */\n readonly cngxTimelineItem = input<readonly T[] | undefined, readonly T[] | '' | undefined>(\n undefined,\n { transform: (value) => (typeof value === 'string' ? undefined : value) },\n );\n\n readonly templateRef = inject<TemplateRef<CngxTimelineItemContext<T>>>(TemplateRef);\n\n static ngTemplateContextGuard<T>(\n _dir: CngxTimelineItemTpl<T>,\n ctx: unknown,\n ): ctx is CngxTimelineItemContext<T> {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineDateHeader` - the whole group, so a header can\n * show its item count alongside the date.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineDateHeaderContext<T> {\n readonly $implicit: TimelineGroup<T>;\n}\n\n/**\n * The per-group header. Falls back to\n * `CNGX_TIMELINE_CONFIG.labels.groupLabel`, which formats the group's\n * start date in the browser locale.\n *\n * The element this renders into is what the group's `aria-labelledby`\n * points at, so a header that renders nothing leaves the group unnamed.\n *\n * ```html\n * <ng-template [cngxTimelineDateHeader]=\"events()\" let-group>\n * <h3>{{ format(group.start) }} ({{ group.items.length }})</h3>\n * </ng-template>\n * ```\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineItemTpl\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineDateHeader]',\n standalone: true,\n exportAs: 'cngxTimelineDateHeader',\n})\nexport class CngxTimelineDateHeader<T = unknown> {\n /**\n * Type carrier for the group's item type, never read at runtime. Bind the\n * same array the timeline gets and `let-group` types as\n * `TimelineGroup<T>`. See {@link CngxTimelineItemTpl.cngxTimelineItem}.\n */\n readonly cngxTimelineDateHeader = input<readonly T[] | undefined, readonly T[] | '' | undefined>(\n undefined,\n { transform: (value) => (typeof value === 'string' ? undefined : value) },\n );\n\n readonly templateRef = inject<TemplateRef<CngxTimelineDateHeaderContext<T>>>(TemplateRef);\n\n static ngTemplateContextGuard<T>(\n _dir: CngxTimelineDateHeader<T>,\n ctx: unknown,\n ): ctx is CngxTimelineDateHeaderContext<T> {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineMarkerTpl` - the item and the status the\n * organism resolved for it.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineMarkerContext<T> {\n readonly $implicit: T;\n readonly status: TimelineStatus | undefined;\n}\n\n/**\n * What goes inside the marker dot - an icon, an avatar, a type glyph.\n * Falls back to a bare coloured dot.\n *\n * Applies to every row. A single row overrides it by projecting its own\n * `[cngxTimelineMarkerContent]`, which wins over this template.\n *\n * Whatever renders here is inside an `aria-hidden` element, so it must\n * not be the only carrier of anything: the status reaches assistive tech\n * through `CNGX_TIMELINE_CONFIG.labels.status`.\n *\n * Keeps `Tpl` in class *and* selector to stay clear of\n * `CngxTimelineMarker`, the component it renders into.\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineMarker\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineMarkerTpl]',\n standalone: true,\n exportAs: 'cngxTimelineMarkerTpl',\n})\nexport class CngxTimelineMarkerTpl<T = unknown> {\n /**\n * Type carrier for the item type, never read at runtime. Bind the same\n * array the timeline gets and `let-event` types as `T`. See\n * {@link CngxTimelineItemTpl.cngxTimelineItem}.\n */\n readonly cngxTimelineMarkerTpl = input<readonly T[] | undefined, readonly T[] | '' | undefined>(\n undefined,\n { transform: (value) => (typeof value === 'string' ? undefined : value) },\n );\n\n readonly templateRef = inject<TemplateRef<CngxTimelineMarkerContext<T>>>(TemplateRef);\n\n static ngTemplateContextGuard<T>(\n _dir: CngxTimelineMarkerTpl<T>,\n ctx: unknown,\n ): ctx is CngxTimelineMarkerContext<T> {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineEmpty` - why the timeline is empty.\n *\n * The distinction is the point: \"nothing has happened yet\" and \"your\n * filter matched nothing\" call for different copy and different actions.\n * Vocabulary shared with `CngxCardGrid` so an app writes one empty-state\n * component and reuses it.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineEmptyContext {\n readonly $implicit: EmptyReason;\n}\n\n/**\n * The empty surface. Falls back to\n * `CNGX_TIMELINE_CONFIG.labels.emptyFallback`.\n *\n * ```html\n * <ng-template cngxTimelineEmpty let-reason>\n * @if (reason === 'no-results') { <p>No events match this filter.</p> }\n * @else { <p>Nothing has happened yet.</p> }\n * </ng-template>\n * ```\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineError\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineEmpty]',\n standalone: true,\n exportAs: 'cngxTimelineEmpty',\n})\nexport class CngxTimelineEmpty {\n readonly templateRef = inject<TemplateRef<CngxTimelineEmptyContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _dir: CngxTimelineEmpty,\n ctx: unknown,\n ): ctx is CngxTimelineEmptyContext {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineError` - the raw error plus the retry the\n * organism owns.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineErrorContext {\n readonly $implicit: unknown;\n /** Re-drives the consumer's source; emits the organism's `retry` output. */\n readonly retry: () => void;\n}\n\n/**\n * The whole error surface, replacing message and retry control together.\n * Reach for `*cngxTimelineRetryButton` instead when only the button needs\n * restyling. Falls back to\n * `CNGX_TIMELINE_CONFIG.labels.errorFallback` plus a plain retry button.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineRetryButton, CngxTimelineEmpty\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineError]',\n standalone: true,\n exportAs: 'cngxTimelineError',\n})\nexport class CngxTimelineError {\n readonly templateRef = inject<TemplateRef<CngxTimelineErrorContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _dir: CngxTimelineError,\n ctx: unknown,\n ): ctx is CngxTimelineErrorContext {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineRetryButton` - the retry callback.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineRetryButtonContext {\n readonly $implicit: () => void;\n}\n\n/**\n * Just the retry control inside the default error surface, for apps that\n * want their own button component without rewriting the error copy.\n *\n * Whatever renders here has to be operable: the library ships no button\n * component, so a consumer template is responsible for its own `type`,\n * accessible name and click wiring.\n *\n * ```html\n * <ng-template cngxTimelineRetryButton let-retry>\n * <button type=\"button\" (click)=\"retry()\">Try again</button>\n * </ng-template>\n * ```\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineError\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineRetryButton]',\n standalone: true,\n exportAs: 'cngxTimelineRetryButton',\n})\nexport class CngxTimelineRetryButton {\n readonly templateRef = inject<TemplateRef<CngxTimelineRetryButtonContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _dir: CngxTimelineRetryButton,\n ctx: unknown,\n ): ctx is CngxTimelineRetryButtonContext {\n return true;\n }\n}\n\n/**\n * The tail appended below the list while a background refresh runs, with\n * the already-loaded items still on screen. Falls back to\n * `CNGX_TIMELINE_CONFIG.labels.refreshing`.\n *\n * Contextless on purpose - a refresh has nothing to say beyond the fact\n * that it is happening.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineError\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineLoadingTail]',\n standalone: true,\n exportAs: 'cngxTimelineLoadingTail',\n})\nexport class CngxTimelineLoadingTail {\n readonly templateRef = inject<TemplateRef<void>>(TemplateRef);\n}\n\n/**\n * One placeholder row in the first-load body, replacing the built-in\n * marker-rail-and-two-bars shape. Rendered `[skeletonRowCount]` times.\n *\n * Contextless, and deliberately so: a placeholder stands in for a row whose\n * data has not arrived, so there is nothing to hand it. Bind this when the\n * real rows are taller or busier than the default shape and the swap to\n * content would otherwise reflow the page.\n *\n * Whatever renders here sits inside an `aria-hidden` wrapper - the load is\n * announced through the timeline's live region, not through the placeholder.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineLoadingTail\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineSkeleton]',\n standalone: true,\n exportAs: 'cngxTimelineSkeleton',\n})\nexport class CngxTimelineSkeleton {\n readonly templateRef = inject<TemplateRef<void>>(TemplateRef);\n}\n","/**\n * @module @cngx/common/timeline\n */\nexport {\n CNGX_TIMELINE_GROUPING_FACTORY,\n createTimelineGrouping,\n type CngxTimelineGroupingFactory,\n type TimelineDateAccessor,\n type TimelineDirection,\n type TimelineGroup,\n type TimelineGroupBy,\n type TimelineGroupingFn,\n type TimelineGroupingOptions,\n type TimelineGroupKey,\n type TimelineGrouping,\n} from './grouping';\nexport { CngxTimelineMarker, type TimelineStatus } from './marker.component';\nexport {\n CngxTimelineConnector,\n type TimelineConnectorPosition,\n} from './connector.component';\nexport {\n CngxTimelineContent,\n CngxTimelineItem,\n CngxTimelineMarkerContent,\n CngxTimelineOpposite,\n CngxTimelineTime,\n} from './timeline-item.component';\nexport {\n CNGX_TIMELINE_MARKER_HOST,\n type CngxTimelineMarkerHost,\n} from './marker-host.token';\nexport {\n CngxTimelineDateHeader,\n CngxTimelineEmpty,\n CngxTimelineError,\n CngxTimelineItemTpl,\n CngxTimelineLoadingTail,\n CngxTimelineMarkerTpl,\n CngxTimelineRetryButton,\n CngxTimelineSkeleton,\n type CngxTimelineDateHeaderContext,\n type CngxTimelineEmptyContext,\n type CngxTimelineErrorContext,\n type CngxTimelineItemContext,\n type CngxTimelineMarkerContext,\n type CngxTimelineRetryButtonContext,\n} from './template-slots';\nexport {\n CNGX_TIMELINE_CONFIG,\n injectTimelineConfig,\n provideTimelineConfig,\n provideTimelineConfigAt,\n withTimelineLabels,\n withTimelineTemplates,\n type CngxTimelineConfig,\n type CngxTimelineConfigFeature,\n type CngxTimelineLabels,\n type CngxTimelineTemplates,\n} from './timeline-config';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAwHA,SAAS,IAAI,CAAC,KAAa,EAAA;AACzB,IAAA,OAAO,KAAK,GAAG,EAAE,GAAG,CAAA,CAAA,EAAI,KAAK,CAAA,CAAE,GAAG,CAAA,EAAG,KAAK,EAAE;AAC9C;AAEA,SAAS,UAAU,CAAC,IAAU,EAAA;AAC5B,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE;AAC/B,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE;AAC7B,IAAA,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE;IAC1B,OAAO;AACL,QAAA,GAAG,EAAE,CAAA,EAAG,IAAI,CAAA,CAAA,EAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAA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
1
|
+
{"version":3,"file":"cngx-common-timeline.mjs","sources":["../../../projects/common/timeline/grouping.ts","../../../projects/common/timeline/marker.component.ts","../../../projects/common/timeline/connector.component.ts","../../../projects/common/timeline/marker-host.token.ts","../../../projects/common/timeline/i18n/timeline-language-section.ts","../../../projects/common/timeline/timeline-config.ts","../../../projects/common/timeline/timeline-item.component.ts","../../../projects/common/timeline/template-slots.ts","../../../projects/common/timeline/public-api.ts","../../../projects/common/timeline/cngx-common-timeline.ts"],"sourcesContent":["import { InjectionToken, linkedSignal, type Signal } from '@angular/core';\nimport { memoize } from '@cngx/core/utils';\n\n/**\n * One rendered band of a timeline - a calendar bucket plus the items that\n * fall into it, already sorted.\n *\n * The group carries no label: formatting a date is a locale concern that\n * belongs to the `*cngxTimelineDateHeader` slot (or the config's\n * `groupLabel` fallback), not to the presenter. `key` is stable and\n * collision-free across the built-in groupers, so it doubles as the\n * `@for` track expression and as the `aria-labelledby` id seed.\n *\n * @category common/timeline\n */\nexport interface TimelineGroup<T> {\n /** Stable bucket identity, e.g. `2026-07-27` for `day`. */\n readonly key: string;\n /**\n * Local start-of-bucket instant - midnight for `day`, the Monday for\n * `week`, the first of the month for `month`. For `'none'` it is the\n * date of the first item in sort order.\n */\n readonly start: Date;\n /** Items in this bucket, in the resolved sort direction. */\n readonly items: readonly T[];\n}\n\n/**\n * What a {@link TimelineGroupingFn} returns for a single item: the bucket\n * it belongs to, and the instant that bucket starts at.\n *\n * @category common/timeline\n */\nexport interface TimelineGroupKey {\n readonly key: string;\n readonly start: Date;\n}\n\n/**\n * Escape hatch for consumer-defined bucketing - UTC days, fiscal quarters,\n * sprint windows, \"today / this week / earlier\". Receives the coerced date\n * and the item it came from, so a grouper may key off payload fields\n * (tenant, channel) as well as time.\n *\n * Called once per item per recomputation; keep it pure and cheap.\n *\n * @category common/timeline\n */\nexport type TimelineGroupingFn<T> = (date: Date, item: T) => TimelineGroupKey;\n\n/**\n * Built-in bucketing modes plus the {@link TimelineGroupingFn} escape\n * hatch. The three calendar modes read **local** date fields, so they stay\n * correct across DST transitions where a day is 23 or 25 hours long -\n * epoch division would silently split or merge those days.\n *\n * `'none'` collapses everything into one synthetic group, which is how the\n * organism renders an ungrouped `role=\"list\"` without a second code path.\n *\n * @category common/timeline\n */\nexport type TimelineGroupBy<T> = 'day' | 'week' | 'month' | 'none' | TimelineGroupingFn<T>;\n\n/**\n * Sort direction for the whole timeline. `'desc'` (default) is\n * newest-first, the activity-feed convention; `'asc'` is oldest-first,\n * which reads better for narrative histories.\n *\n * @category common/timeline\n */\nexport type TimelineDirection = 'asc' | 'desc';\n\n/**\n * Pulls the timestamp out of a consumer item. Anything the `Date`\n * constructor accepts works, so ISO strings straight off an API response\n * need no pre-mapping.\n *\n * @category common/timeline\n */\nexport type TimelineDateAccessor<T> = (item: T) => Date | string | number;\n\n/**\n * Inputs to {@link createTimelineGrouping}. Every reactive knob is a\n * zero-arg accessor, so a `Signal` (or an `input()`) can be passed\n * directly and a constant is just `() => 'day'`.\n *\n * @category common/timeline\n */\nexport interface TimelineGroupingOptions<T> {\n /** Source list. Read inside the `groups` computation, so it is tracked. */\n readonly items: () => readonly T[];\n /**\n * Timestamp accessor. Not a signal itself, but it is called inside the\n * `groups` computation, so a caller that closes over one - as the organism\n * does over its `[dateAccessor]` input - has those reads tracked like any\n * other and re-groups when the accessor is rebound.\n */\n readonly dateAccessor: TimelineDateAccessor<T>;\n /** Bucketing mode. Defaults to `'day'`. */\n readonly groupBy?: () => TimelineGroupBy<T>;\n /** Sort direction. Defaults to `'desc'`. */\n readonly direction?: () => TimelineDirection;\n /**\n * BCP 47 locale whose first day of the week starts a `'week'` bucket\n * (`Intl.Locale` week info: Sunday in `en-US`, Monday in `de`). Unset, or\n * where the runtime has no week info, weeks start on Monday (ISO 8601).\n */\n readonly locale?: () => string;\n}\n\n/**\n * What {@link createTimelineGrouping} hands back. An object rather than a\n * bare `Signal` because the v2 live cursor extends this surface - callers\n * written against v1 keep compiling.\n *\n * @category common/timeline\n */\nexport interface TimelineGrouping<T> {\n readonly groups: Signal<readonly TimelineGroup<T>[]>;\n}\n\ninterface Bucket<T> {\n readonly start: Date;\n readonly items: T[];\n}\n\nfunction pad2(value: number): string {\n return value < 10 ? `0${value}` : `${value}`;\n}\n\nfunction groupByDay(date: Date): TimelineGroupKey {\n const year = date.getFullYear();\n const month = date.getMonth();\n const day = date.getDate();\n return {\n key: `${year}-${pad2(month + 1)}-${pad2(day)}`,\n start: new Date(year, month, day),\n };\n}\n\ninterface WeekInfoLocale {\n readonly getWeekInfo?: () => { readonly firstDay?: number };\n readonly weekInfo?: { readonly firstDay?: number };\n}\n\nconst ISO_FIRST_DAY = 1;\n\n/**\n * First day of the week for a locale, `1` (Monday) to `7` (Sunday); ISO\n * Monday without week info.\n */\nconst firstDayOfWeek = memoize(\n (locale: string): number => {\n let intlLocale: WeekInfoLocale;\n try {\n intlLocale = new Intl.Locale(locale) as unknown as WeekInfoLocale;\n } catch {\n return ISO_FIRST_DAY;\n }\n return (intlLocale.getWeekInfo?.() ?? intlLocale.weekInfo)?.firstDay ?? ISO_FIRST_DAY;\n },\n { cacheLimit: 32 },\n);\n\nfunction groupByWeek(date: Date, firstDay: number): TimelineGroupKey {\n // `firstDay` counts Monday as 1 and Sunday as 7; `getDay()` counts Sunday as 0.\n const offset = (date.getDay() - (firstDay % 7) + 7) % 7;\n const start = new Date(date.getFullYear(), date.getMonth(), date.getDate() - offset);\n return {\n key: `W${start.getFullYear()}-${pad2(start.getMonth() + 1)}-${pad2(start.getDate())}`,\n start,\n };\n}\n\nfunction groupByMonth(date: Date): TimelineGroupKey {\n const year = date.getFullYear();\n const month = date.getMonth();\n return { key: `${year}-${pad2(month + 1)}`, start: new Date(year, month, 1) };\n}\n\nfunction groupByNone(date: Date): TimelineGroupKey {\n return { key: 'all', start: date };\n}\n\nfunction resolveGrouper<T>(mode: TimelineGroupBy<T>, firstDay: number): TimelineGroupingFn<T> {\n if (typeof mode === 'function') {\n return mode;\n }\n switch (mode) {\n case 'week':\n return (date) => groupByWeek(date, firstDay);\n case 'month':\n return groupByMonth;\n case 'none':\n return groupByNone;\n default:\n return groupByDay;\n }\n}\n\nfunction toDate(value: Date | string | number): Date {\n return value instanceof Date ? value : new Date(value);\n}\n\nfunction sameItems<T>(previous: readonly T[], next: readonly T[]): boolean {\n return previous.length === next.length && previous.every((item, i) => item === next[i]);\n}\n\nfunction groupsEqual<T>(a: readonly TimelineGroup<T>[], b: readonly TimelineGroup<T>[]): boolean {\n return a.length === b.length && a.every((group, index) => group === b[index]);\n}\n\n/**\n * Derives grouped, sorted timeline bands from a flat item list.\n *\n * Pure derivation: bands come out of one `linkedSignal` over the `items`\n * accessor. Nothing is synced, nothing is written back, and the presenter\n * never mutates its input array. The previous bands are read through the\n * `computation` callback rather than a closure cache, so the result depends\n * on the inputs and the prior value alone - never on how many times it ran.\n *\n * Three properties make it usable as the organism's only data path:\n *\n * - **Defensive sort.** Consumer data does not have to arrive sorted. The\n * presenter sorts by the accessor date on every run using a stable sort,\n * so items sharing a timestamp keep their input order in both\n * directions.\n * - **Local-calendar bucketing.** `day` / `week` / `month` read local date\n * fields rather than dividing the epoch, which is what keeps 23-hour and\n * 25-hour DST days intact. Consumers who want UTC (or any other rule)\n * pass a {@link TimelineGroupingFn}.\n * - **Append-stability.** Groups whose items are *the same objects* hand\n * back the same band reference, and the signal carries a structural\n * `equal`. Reuse is deliberately keyed on reference identity rather than\n * on an id: a refetch returns new objects at the same ids, and reusing\n * there would pin the band to a stale payload. Appending therefore leaves\n * every other band's\n * `@for` block untouched instead of re-rendering the whole timeline.\n *\n * Reach for the DI token {@link CNGX_TIMELINE_GROUPING_FACTORY} rather\n * than this function directly when the caller is a component - that is\n * what makes the bucketing swappable per app or per component.\n *\n * ```ts\n * const grouping = createTimelineGrouping({\n * items: this.events,\n * dateAccessor: (event) => event.occurredAt,\n * groupBy: this.groupBy,\n * });\n * ```\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/grouping.ts\n * @since 0.1.0\n */\nexport function createTimelineGrouping<T>(\n options: TimelineGroupingOptions<T>,\n): TimelineGrouping<T> {\n const { items, dateAccessor, groupBy, direction, locale } = options;\n\n // Dev-only diagnostic; once per grouping instance so a recompute over the\n // same bad data does not spam the console.\n let warnedInvalidDate = false;\n\n // `linkedSignal` rather than `computed`: append-stability needs the\n // previous bands to hand their references back, and this is the sanctioned\n // way to read them. A closure cache mutated inside a `computed` would make\n // the computation impure - its output would depend on how many times it had\n // run, not only on its inputs.\n const groups = linkedSignal<readonly TimelineGroup<T>[], readonly TimelineGroup<T>[]>({\n source: () => {\n const source = items();\n const firstDay = locale ? firstDayOfWeek(locale()) : ISO_FIRST_DAY;\n const grouper = resolveGrouper(groupBy?.() ?? 'day', firstDay);\n const sign = (direction?.() ?? 'desc') === 'asc' ? 1 : -1;\n\n const dated = source.map((item) => ({ item, date: toDate(dateAccessor(item)) }));\n\n // An unparsable value does not throw - NaN dates all bucket under one\n // band whose header renders \"Invalid Date\". Surface the mistake in dev\n // instead of leaving that header as the only clue.\n if (\n typeof ngDevMode !== 'undefined' &&\n ngDevMode &&\n !warnedInvalidDate &&\n dated.some((entry) => Number.isNaN(entry.date.getTime()))\n ) {\n warnedInvalidDate = true;\n console.warn(\n 'createTimelineGrouping: dateAccessor produced an invalid date for at least one ' +\n 'item. Those items cluster into a single band whose header renders ' +\n '\"Invalid Date\" - check the accessor and the raw values it reads.',\n );\n }\n\n dated.sort((a, b) => sign * (a.date.getTime() - b.date.getTime()));\n\n // Map preserves insertion order, so buckets come out already sorted.\n const buckets = new Map<string, Bucket<T>>();\n for (const entry of dated) {\n const { key, start } = grouper(entry.date, entry.item);\n const bucket = buckets.get(key);\n if (bucket) {\n bucket.items.push(entry.item);\n } else {\n buckets.set(key, { start, items: [entry.item] });\n }\n }\n\n return Array.from(buckets, ([key, bucket]) => ({\n key,\n start: bucket.start,\n items: bucket.items as readonly T[],\n }));\n },\n computation: (fresh, previous) => {\n const previousByKey = new Map((previous?.value ?? []).map((group) => [group.key, group]));\n return fresh.map((group) => {\n const prior = previousByKey.get(group.key);\n // Reference identity only. Matching ids are NOT enough: a refetch\n // returns fresh objects at the same ids with changed content, and\n // handing back the prior band there would render the old payload\n // forever. Reference equality is the only signal that says \"these\n // are literally the same items\", which is what reuse requires.\n const reusable =\n prior?.start.getTime() === group.start.getTime() &&\n sameItems(prior.items, group.items);\n return reusable ? prior : group;\n });\n },\n equal: groupsEqual,\n });\n\n return { groups };\n}\n\n/**\n * Signature of {@link createTimelineGrouping}, carried as a named type so\n * a DI override matches it exactly.\n *\n * @category common/timeline\n */\nexport type CngxTimelineGroupingFactory = <T>(\n options: TimelineGroupingOptions<T>,\n) => TimelineGrouping<T>;\n\n/**\n * Resolves the presenter `<cngx-timeline>` builds its bands with.\n * Defaults to {@link createTimelineGrouping}.\n *\n * Override app-wide via\n * `providers: [{ provide: CNGX_TIMELINE_GROUPING_FACTORY, useValue: myFactory }]`\n * to change bucketing everywhere (fiscal calendars, \"today / earlier\"\n * relative bands, server-supplied grouping), or per component via\n * `viewProviders` for a one-off. An override wraps rather than replaces\n * in most cases - call `createTimelineGrouping` inside your factory and\n * post-process its `groups`.\n *\n * Same shape as `CNGX_SELECTION_CONTROLLER_FACTORY`: the internals of a\n * component are swappable without forking the component.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/grouping.ts\n * @relatedTo createTimelineGrouping\n * @since 0.1.0\n */\nexport const CNGX_TIMELINE_GROUPING_FACTORY = new InjectionToken<CngxTimelineGroupingFactory>(\n 'CngxTimelineGroupingFactory',\n {\n providedIn: 'root',\n factory: () => createTimelineGrouping,\n },\n);\n","import { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\nimport { coerceBooleanProperty } from '@cngx/core/utils';\n\n/**\n * Process vocabulary shared by the timeline marker, the connector and\n * `CngxTimelineItem`.\n *\n * Deliberately narrow: it describes where an event sits in a history, not\n * what the user may do about it. A timeline that needed `disabled`,\n * `editable` or `current` would be a stepper, and steppers live in\n * `@cngx/common/stepper` with their own flow logic.\n *\n * @category common/timeline\n */\nexport type TimelineStatus = 'done' | 'active' | 'upcoming' | 'rejected';\n\n/**\n * The dot on the timeline rail - a status-coloured slot host for whatever\n * the consumer projects into it (nothing, a glyph, an icon, an avatar).\n *\n * Purely decorative and marked `aria-hidden`: the status it paints is\n * already carried semantically by the owning `CngxTimelineItem`, and\n * announcing it twice is worse than not announcing it here at all. That\n * also means colour is never this atom's only signal - the item's ARIA is.\n *\n * Usable standalone. It ships its own token SET rules, so a marker\n * dropped into a hand-rolled layout renders at the right size and tracks\n * `[data-density]` with no timeline organism above it.\n *\n * ### Bare dot\n * ```html\n * <cngx-timeline-marker status=\"done\" />\n * ```\n *\n * ### With a projected glyph\n * ```html\n * <cngx-timeline-marker status=\"rejected\">!</cngx-timeline-marker>\n * ```\n *\n * ### Pending\n * ```html\n * <cngx-timeline-marker status=\"active\" busy />\n * ```\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/marker.component.ts\n * @relatedTo CngxTimelineConnector\n * @since 0.1.0\n */\n@Component({\n selector: 'cngx-timeline-marker',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'cngx-timeline-marker',\n 'aria-hidden': 'true',\n '[attr.data-status]': 'status()',\n '[class.cngx-timeline-marker--busy]': 'busy()',\n },\n template: `<ng-content />`,\n styleUrls: ['./timeline-tokens.css', './marker.component.css'],\n})\nexport class CngxTimelineMarker {\n /**\n * Where the event sits in the history. Drives the dot colour and, for\n * `upcoming`, its hollow fill. Left unset the marker paints in the\n * neutral rail colour.\n */\n readonly status = input<TimelineStatus | undefined>(undefined);\n\n /**\n * Whether the marker pulses to signal work in flight - typically bound\n * from an item's own `[state]` being `pending`.\n *\n * The pulse is a `box-shadow` animation rather than a `transform` or a\n * size change: the marker sits in a grid track the rail is aligned to,\n * so anything that altered its box would drag the rail with it every\n * frame. Suppressed under `prefers-reduced-motion`.\n */\n readonly busy = input(false, { transform: coerceBooleanProperty });\n}\n","import { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\n\nimport type { TimelineStatus } from './marker.component';\n\n/**\n * Where a connector segment sits in its run, which decides which ends get\n * clipped back to the adjacent marker's centre.\n *\n * `'only'` renders nothing at all - a single-item timeline has no rail to\n * draw.\n *\n * @category common/timeline\n */\nexport type TimelineConnectorPosition = 'middle' | 'first' | 'last' | 'only';\n\n/**\n * The rail segment between two markers.\n *\n * Decorative and `aria-hidden`: it repeats a sequence the DOM order\n * already carries, so announcing it would only add noise. It is\n * status-capable all the same, because the *visual* run of a history is\n * where a rejected step or a not-yet-reached tail reads fastest - a\n * dashed segment for `upcoming` and a danger-toned one for `rejected`,\n * so the distinction survives without colour.\n *\n * Drawn with `border-inline-start` and clipped with block-direction\n * margins - logical properties throughout, so the rail lands on the\n * correct side under `dir=\"rtl\"` with no override.\n *\n * ### Between two items\n * ```html\n * <cngx-timeline-connector status=\"done\" />\n * ```\n *\n * ### Last item in the run\n * ```html\n * <cngx-timeline-connector position=\"last\" />\n * ```\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/connector.component.ts\n * @relatedTo CngxTimelineMarker\n * @since 0.1.0\n */\n@Component({\n selector: 'cngx-timeline-connector',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'cngx-timeline-connector',\n 'aria-hidden': 'true',\n '[attr.data-status]': 'status()',\n '[attr.data-position]': 'position()',\n },\n template: '',\n styleUrls: ['./timeline-tokens.css', './connector.component.css'],\n})\nexport class CngxTimelineConnector {\n /**\n * Status of the segment. `upcoming` renders dashed, `rejected` in the\n * danger tone, `done` and `active` solid in their own tones. Left unset\n * the rail paints in the neutral border colour.\n */\n readonly status = input<TimelineStatus | undefined>(undefined);\n\n /**\n * Position in the run. `'first'` clips the head back to the marker\n * centre, `'last'` clips the tail, `'only'` hides the segment\n * entirely. Defaults to `'middle'` - a full-height segment.\n */\n readonly position = input<TimelineConnectorPosition>('middle');\n}\n","import { InjectionToken, type Signal, type TemplateRef } from '@angular/core';\n\nimport type { CngxTimelineMarkerContext } from './template-slots';\n\n/**\n * The contract a timeline exposes to the rows beneath it, so an app-wide\n * marker template can reach a dot the organism does not itself render.\n *\n * `<cngx-timeline>` is data-driven in v1: the consumer owns the whole row\n * template and writes `<cngx-timeline-item>` themselves, which means the\n * organism has no handle on the marker inside it. Passing the resolved\n * template through DI is what closes that gap without the row having to\n * thread it down by hand.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineMarkerHost {\n /** Resolved `*cngxTimelineMarkerTpl`, already through the config cascade. */\n readonly markerTpl: Signal<TemplateRef<CngxTimelineMarkerContext<unknown>> | null>;\n}\n\n/**\n * DI token for {@link CngxTimelineMarkerHost}. Provided by `<cngx-timeline>`;\n * injected optionally by `CngxTimelineItem`, which falls back to its own\n * `[cngxTimelineMarkerContent]` projection when no timeline is above it.\n *\n * A token rather than an injected parent class: the row must stay usable\n * standalone, and a concrete parent type would make the two mutually\n * dependent and block the decompose schematic.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/marker-host.token.ts\n * @relatedTo CngxTimelineMarkerTpl, CngxTimelineItem\n * @since 0.1.0\n */\nexport const CNGX_TIMELINE_MARKER_HOST = new InjectionToken<CngxTimelineMarkerHost>(\n 'CngxTimelineMarkerHost',\n);\n","import type { CngxMessage } from '@cngx/core/i18n';\n\n/**\n * The timeline section of a {@link CngxLanguagePack}: every string the\n * timeline renders without a consumer slot. It feeds the `labels` of\n * `CNGX_TIMELINE_CONFIG`.\n *\n * @category common/timeline\n * @since 0.1.0\n * @relatedTo CNGX_TIMELINE_CONFIG, withTimelineLabels\n */\nexport interface CngxTimelineLanguageSection {\n /** Accessible name of the timeline list. */\n readonly timelineRegion: string;\n /** Label of the built-in retry control. */\n readonly retry: string;\n /** Body of the error surface. */\n readonly errorFallback: string;\n /** Body of the empty surface. */\n readonly emptyFallback: string;\n /** Accessible name of the loading body. */\n readonly loading: string;\n /** Refreshing tail below the list. */\n readonly refreshing: string;\n /** Screen-reader text of a pending item. */\n readonly itemBusy: string;\n /** Inline error text of a failed item. */\n readonly itemErrorFallback: string;\n /** Screen-reader wording per process status. */\n readonly status: {\n readonly done: string;\n readonly active: string;\n readonly upcoming: string;\n readonly rejected: string;\n };\n /** `{date}`: a group header, `{date}` being the group's start date in the app locale. */\n readonly groupHeader: CngxMessage;\n}\n\n/**\n * The English timeline section: the single source of the timeline's English\n * copy. `CNGX_TIMELINE_CONFIG` defaults its `labels` to it.\n *\n * @category common/timeline\n * @since 0.1.0\n * @relatedTo CNGX_TIMELINE_CONFIG\n */\nexport const CNGX_TIMELINE_LANGUAGE_EN: CngxTimelineLanguageSection = {\n timelineRegion: 'Timeline',\n retry: 'Retry',\n errorFallback: 'Could not load the timeline.',\n emptyFallback: 'No events yet',\n loading: 'Loading timeline',\n refreshing: 'Updating…',\n itemBusy: 'Updating',\n itemErrorFallback: 'Could not load this event.',\n status: {\n done: 'Completed',\n active: 'In progress',\n upcoming: 'Upcoming',\n rejected: 'Rejected',\n },\n groupHeader: '{date}',\n};\n\ndeclare module '@cngx/core/i18n' {\n interface CngxLanguagePack {\n readonly timeline: CngxTimelineLanguageSection;\n }\n}\n","import {\n computed,\n type EnvironmentProviders,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n Optional,\n type Provider,\n type Signal,\n SkipSelf,\n type TemplateRef,\n} from '@angular/core';\nimport { createNestedLanguageSection, formatMessage } from '@cngx/core/i18n';\nimport { createNestedOverrideMerge, dateTimeFormatterFor } from '@cngx/core/utils';\n\nimport {\n CNGX_TIMELINE_LANGUAGE_EN,\n type CngxTimelineLanguageSection,\n} from './i18n/timeline-language-section';\n\nimport type { TimelineGroup } from './grouping';\nimport type { TimelineStatus } from './marker.component';\nimport type {\n CngxTimelineDateHeaderContext,\n CngxTimelineEmptyContext,\n CngxTimelineErrorContext,\n CngxTimelineItemContext,\n CngxTimelineMarkerContext,\n CngxTimelineRetryButtonContext,\n} from './template-slots';\n\n/**\n * Every user-visible string the timeline can render without a consumer\n * slot, plus the group-header formatter.\n *\n * Library defaults are English. Localise by passing\n * {@link withTimelineLabels} to {@link provideTimelineConfig} once at\n * bootstrap - the timeline itself hardcodes nothing, so a missing\n * translation shows up as English text rather than as a blank surface.\n *\n * Each of these is a *fallback*: the matching template slot\n * (`*cngxTimelineError`, `*cngxTimelineEmpty`, ...) wins whenever it is\n * present.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineLabels {\n /**\n * Accessible name for the timeline list itself, read when focus or a\n * screen-reader cursor enters the region. Default `'Timeline'`. A\n * per-instance `[aria-label]` / `[aria-labelledby]` wins.\n */\n readonly timelineRegion?: string;\n /**\n * Label on the built-in retry control rendered in the error surface.\n * Default `'Retry'`. Superseded by `*cngxTimelineRetryButton`.\n */\n readonly retry?: string;\n /**\n * Body text for the error surface when no `*cngxTimelineError` slot is\n * bound. Default `'Could not load the timeline.'`\n */\n readonly errorFallback?: string;\n /**\n * Body text for the empty surface when no `*cngxTimelineEmpty` slot is\n * bound. Default `'No events yet'`\n */\n readonly emptyFallback?: string;\n /**\n * Accessible name for the loading body, so the skeleton is announced\n * as something other than silence. Default `'Loading timeline'`.\n */\n readonly loading?: string;\n /**\n * Text for the refreshing tail appended below the list while a\n * background reload is in flight. Default `'Updating…'`. Superseded by\n * `*cngxTimelineLoadingTail`.\n */\n readonly refreshing?: string;\n /**\n * Screen-reader text for a single item whose own `[state]` is pending.\n * Paired with `aria-busy` on that item. Default `'Updating'`.\n */\n readonly itemBusy?: string;\n /**\n * Inline error text for a single item whose own `[state]` failed, used\n * when the consumer renders no per-item error content. Default\n * `'Could not load this event.'`\n */\n readonly itemErrorFallback?: string;\n /**\n * Screen-reader wording for each process status. The marker paints the\n * status visually and the dot is `aria-hidden`, so this map is the only\n * channel that carries it to assistive tech - leaving a key blank\n * silences that status rather than merely restyling it.\n *\n * Defaults: `Completed` / `In progress` / `Upcoming` / `Rejected`.\n * Partial - {@link withTimelineLabels} merges it key by key, so\n * renaming one status leaves the other three at their defaults.\n */\n readonly status?: Readonly<Partial<Record<TimelineStatus, string>>>;\n /**\n * Formats a group's header when no `*cngxTimelineDateHeader` slot is\n * bound. Receives the whole group so a consumer can fold the item\n * count into the header. The second argument is the app locale\n * (`CNGX_LOCALE`, falling back to the nearest `LOCALE_ID`), read live,\n * so a formatter that uses it follows a locale switch. Defaults to the\n * group's start date as a numeric date in that locale, placed by the\n * `groupHeader` message of the timeline language section.\n */\n readonly groupLabel?: (group: TimelineGroup<unknown>, locale: string) => string;\n}\n\n/**\n * App-wide template defaults for the timeline's slot regions - the middle\n * tier of the family-standard 3-stage cascade\n * (per-instance directive > this field > built-in markup).\n *\n * Set them with {@link withTimelineTemplates}. Keys are typed against\n * `unknown` items because the config is app-wide while the slots are\n * generic; a `TemplateRef` for a concrete item type assigns in fine.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineTemplates {\n /** Default row template (`*cngxTimelineItem`). */\n readonly item?: TemplateRef<CngxTimelineItemContext<unknown>>;\n /** Default per-group date header (`*cngxTimelineDateHeader`). */\n readonly dateHeader?: TemplateRef<CngxTimelineDateHeaderContext<unknown>>;\n /** Default marker content (`*cngxTimelineMarkerTpl`). */\n readonly marker?: TemplateRef<CngxTimelineMarkerContext<unknown>>;\n /** Default empty surface (`*cngxTimelineEmpty`). */\n readonly empty?: TemplateRef<CngxTimelineEmptyContext>;\n /** Default error surface (`*cngxTimelineError`). */\n readonly error?: TemplateRef<CngxTimelineErrorContext>;\n /** Default retry control (`*cngxTimelineRetryButton`). */\n readonly retryButton?: TemplateRef<CngxTimelineRetryButtonContext>;\n /** Default refreshing tail (`*cngxTimelineLoadingTail`). */\n readonly loadingTail?: TemplateRef<void>;\n /** Default placeholder row for the first-load body (`*cngxTimelineSkeleton`). */\n readonly skeleton?: TemplateRef<void>;\n}\n\n/**\n * Timeline config surface. Resolution priority: \\\n * per-instance Input → `provideTimelineConfigAt` (viewProviders) →\n * `provideTimelineConfig` (root) → library default.\n *\n * Deliberately small: the timeline has no behavioural switches to\n * configure, so this carries text and templates only. Bucketing is\n * swapped through {@link CNGX_TIMELINE_GROUPING_FACTORY} instead, and\n * everything visual through the slot directives.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineConfig {\n /**\n * A plain bundle or a `Signal` of one; once {@link withTimelineLabels} ran\n * it holds a `Signal`, so the copy follows a runtime language switch. Read\n * it through `coerceSignal` from `@cngx/core/utils`.\n */\n readonly labels?: CngxTimelineLabels | Signal<CngxTimelineLabels>;\n readonly templates?: CngxTimelineTemplates;\n}\n\nconst DATE_FORMAT: Intl.DateTimeFormatOptions = {};\n\n/** @internal Turns a timeline section into the config labels. */\nfunction timelineLabelsFrom(section: CngxTimelineLanguageSection): CngxTimelineLabels {\n return {\n timelineRegion: section.timelineRegion,\n retry: section.retry,\n errorFallback: section.errorFallback,\n emptyFallback: section.emptyFallback,\n loading: section.loading,\n refreshing: section.refreshing,\n itemBusy: section.itemBusy,\n itemErrorFallback: section.itemErrorFallback,\n status: section.status,\n groupLabel: (group, locale) =>\n formatMessage(\n section.groupHeader,\n { date: dateTimeFormatterFor(locale, DATE_FORMAT).format(group.start) },\n locale,\n ),\n };\n}\n\nconst LABELS_BY_SECTION = new WeakMap<CngxTimelineLanguageSection, CngxTimelineLabels>();\n\n/**\n * @internal The labels of one section object, built once: an equal section\n * yields the identical labels, so readers compare by reference. The locale\n * reaches `groupLabel` as its argument, so the labels do not depend on it.\n */\nfunction labelsOf(section: CngxTimelineLanguageSection): CngxTimelineLabels {\n let labels = LABELS_BY_SECTION.get(section);\n if (!labels) {\n labels = timelineLabelsFrom(section);\n LABELS_BY_SECTION.set(section, labels);\n }\n return labels;\n}\n\nconst TIMELINE_CONFIG_DEFAULTS: Required<CngxTimelineConfig> = {\n labels: timelineLabelsFrom(CNGX_TIMELINE_LANGUAGE_EN),\n templates: {},\n};\n\n/** @internal The timeline section of the active pack over the English section. */\nconst injectTimelineSection = createNestedLanguageSection(\n 'timeline',\n CNGX_TIMELINE_LANGUAGE_EN,\n 'status',\n);\n\n/**\n * @internal The defaults with `labels` read from the timeline section of the\n * active language pack. Runs in an injection context.\n */\nfunction timelineConfigDefaultsFromPack(): CngxTimelineConfig {\n const section = injectTimelineSection();\n return { ...TIMELINE_CONFIG_DEFAULTS, labels: computed(() => labelsOf(section())) };\n}\n\n/**\n * DI token for the resolved timeline config. \\\n * `providedIn: 'root'` with the library defaults, `labels` read from the\n * timeline section of the active language pack; override via\n * {@link provideTimelineConfig} (root) or {@link provideTimelineConfigAt}\n * (component scope).\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/timeline-config.ts\n * @relatedTo provideTimelineConfig\n * @relatedTo withTimelineLabels\n * @since 0.1.0\n */\nexport const CNGX_TIMELINE_CONFIG = new InjectionToken<CngxTimelineConfig>('CngxTimelineConfig', {\n providedIn: 'root',\n factory: timelineConfigDefaultsFromPack,\n});\n\n/**\n * Signature of every `with*` timeline config builder - a pure\n * config-to-config mutator, folded left over the library defaults.\n *\n * @category common/timeline\n */\nexport type CngxTimelineConfigFeature = (config: CngxTimelineConfig) => CngxTimelineConfig;\n\n/**\n * @internal Shared empty bundle for a config without `labels`. One identity,\n * so every `coerceSignal` over it resolves to the same cached source.\n */\nexport const TIMELINE_NO_LABELS: CngxTimelineLabels = {};\n\n/**\n * Merge label overrides into the cascade. Keys left out keep the language\n * pack's copy, or the English library default, so a consumer translates\n * what they need and nothing more. Pass a `Signal` to switch the language at runtime.\n *\n * ```ts\n * provideTimelineConfig(\n * withTimelineLabels({\n * retry: 'Erneut versuchen',\n * emptyFallback: 'Noch keine Ereignisse.',\n * groupLabel: (group, locale) => group.start.toLocaleDateString(locale, { dateStyle: 'medium' }),\n * }),\n * )\n * ```\n *\n * @category common/timeline\n */\nexport function withTimelineLabels(\n labels: CngxTimelineLabels | Signal<CngxTimelineLabels>,\n): CngxTimelineConfigFeature {\n return (config) => ({\n ...config,\n // One level deeper than the rest: `status` is a map, and a shallow\n // spread would let a consumer who renames one status silently\n // silence the other three.\n labels: createNestedOverrideMerge<CngxTimelineLabels, 'status'>(\n config.labels ?? TIMELINE_NO_LABELS,\n labels,\n 'status',\n ),\n });\n}\n\n/**\n * Merge app-wide slot template defaults into the cascade. Keys left out\n * keep whatever an earlier feature set, and a per-instance slot directive\n * still wins over anything set here.\n *\n * One bag rather than a `with*Template` builder per slot, matching how the\n * select family carries its own slot defaults - the timeline has eight\n * slots and near-identical builders would only add surface.\n *\n * ```ts\n * readonly emptyTpl = viewChild.required<TemplateRef<CngxTimelineEmptyContext>>('emptyTpl', {\n * read: TemplateRef,\n * });\n *\n * providers: [provideTimelineConfig(withTimelineTemplates({ empty: this.emptyTpl() }))]\n * ```\n *\n * @category common/timeline\n */\nexport function withTimelineTemplates(templates: CngxTimelineTemplates): CngxTimelineConfigFeature {\n return (config) => ({ ...config, templates: { ...config.templates, ...templates } });\n}\n\nfunction applyFeatures(\n base: CngxTimelineConfig,\n features: readonly CngxTimelineConfigFeature[],\n): CngxTimelineConfig {\n return features.reduce<CngxTimelineConfig>((config, feature) => feature(config), base);\n}\n\n/**\n * Root-level provider. Apply once in `bootstrapApplication` /\n * `appConfig.providers`.\n *\n * @category common/timeline\n */\nexport function provideTimelineConfig(\n ...features: readonly CngxTimelineConfigFeature[]\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: CNGX_TIMELINE_CONFIG,\n useFactory: () => applyFeatures(timelineConfigDefaultsFromPack(), features),\n },\n ]);\n}\n\n/**\n * Component-scoped override. Returns `Provider[]` rather than\n * {@link EnvironmentProviders} because `viewProviders` rejects opaque\n * environment providers.\n *\n * Features merge onto the parent config - an enclosing scope, or the root\n * provider, or the library defaults when neither is present - so a region\n * can re-phrase one label without resetting every other one the app set.\n *\n * ```ts\n * @Component({\n * viewProviders: [...provideTimelineConfigAt(withTimelineLabels({ retry: 'Again' }))],\n * })\n * ```\n *\n * @category common/timeline\n */\nexport function provideTimelineConfigAt(\n ...features: readonly CngxTimelineConfigFeature[]\n): Provider[] {\n return [\n {\n provide: CNGX_TIMELINE_CONFIG,\n useFactory: (parent: CngxTimelineConfig | null) =>\n applyFeatures(parent ?? timelineConfigDefaultsFromPack(), features),\n deps: [[new SkipSelf(), new Optional(), CNGX_TIMELINE_CONFIG]],\n },\n ];\n}\n\n/**\n * Read the resolved timeline config. Runs in an injection context.\n *\n * @category common/timeline\n */\nexport function injectTimelineConfig(): CngxTimelineConfig {\n return inject(CNGX_TIMELINE_CONFIG);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n Directive,\n ElementRef,\n inject,\n input,\n isDevMode,\n ViewEncapsulation,\n} from '@angular/core';\nimport { coerceSignal, type CngxAsyncState } from '@cngx/core/utils';\n\nimport { CngxTimelineConnector, type TimelineConnectorPosition } from './connector.component';\nimport { CNGX_TIMELINE_MARKER_HOST } from './marker-host.token';\nimport { CngxTimelineMarker, type TimelineStatus } from './marker.component';\nimport { injectTimelineConfig, TIMELINE_NO_LABELS, type CngxTimelineLabels } from './timeline-config';\n\n/**\n * Marks the element that holds an item's timestamp, so the item can place\n * it in the raster the active mode calls for - above the body in\n * `narrative`, trailing it in `activity`.\n *\n * Pair it with `<cngx-time>` from `@cngx/common/display` for relative\n * formatting; the timeline neither formats nor ticks.\n *\n * @category common/timeline\n */\n@Directive({\n selector: '[cngxTimelineTime]',\n standalone: true,\n host: { class: 'cngx-timeline-item__time' },\n})\nexport class CngxTimelineTime {}\n\n/**\n * Marks content that belongs on the far side of the rail from the row's\n * body - the year label opposite a card, the timestamp across a centred\n * rail.\n *\n * Per-row content, so it is a projection slot rather than a timeline-wide\n * template: the row template already owns it, and the config cascade is\n * for surfaces the whole timeline shares.\n *\n * The extra grid track only exists for rows that actually project into it\n * (`:has(> [cngxTimelineOpposite])`), so markup that predates this slot\n * keeps its raster to the pixel. Placement follows the row: opposite content\n * sits across the rail from the body under `start`, `end` and `alternate`\n * alike.\n *\n * ```html\n * <cngx-timeline-item status=\"done\">\n * <span cngxTimelineOpposite>2019</span>\n * <p>Founded</p>\n * </cngx-timeline-item>\n * ```\n *\n * **Keep the content non-interactive.** The slot projects ahead of the body,\n * so it is read first in every layout. For a year or a short label that is\n * the right reading order whichever side the rail is on. A link or a button\n * would take focus before the row it belongs to, and no placement of the\n * grid can fix that, because the paint follows `[data-row-side]` while the\n * DOM order does not.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/timeline-item.component.ts\n * @relatedTo CngxTimelineItem, CngxTimelineTime\n * @since 0.1.0\n */\n@Directive({\n selector: '[cngxTimelineOpposite]',\n standalone: true,\n host: { class: 'cngx-timeline-item__opposite' },\n})\nexport class CngxTimelineOpposite {}\n\n/**\n * Marks content to render inside this row's marker dot - a glyph, an icon,\n * an avatar.\n *\n * The per-row counterpart to the timeline-wide `*cngxTimelineMarkerTpl`, and\n * the only route when the row stands on its own. It also *wins* over that\n * template when both are present: most-local-wins, the same direction as\n * every other slot in the family, so one row can carry a different glyph\n * without the timeline's default being torn out for the rest.\n *\n * Whatever renders here is inside an `aria-hidden` element - decoration only.\n *\n * @category common/timeline\n */\n@Directive({\n selector: '[cngxTimelineMarkerContent]',\n standalone: true,\n})\nexport class CngxTimelineMarkerContent {}\n\n/**\n * Marks the element that holds an item's body. Optional - anything\n * projected without a slot directive lands in the body too. Reach for it\n * when the item also projects a timestamp and the source order would\n * otherwise be ambiguous.\n *\n * @category common/timeline\n */\n@Directive({\n selector: '[cngxTimelineContent]',\n standalone: true,\n host: { class: 'cngx-timeline-item__content' },\n})\nexport class CngxTimelineContent {}\n\n/**\n * @internal Enough of the tabbable surface to catch the mistake this warns\n * about. Not a general focus-order utility - `[tabindex]` matches a negative\n * value too, which is deliberately over-eager for a dev-only check.\n */\nconst FOCUSABLE =\n 'a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]';\n\n/**\n * One event on the timeline: a marker, the rail segment below it, an\n * optional timestamp, and the projected body.\n *\n * A terminal composable unit, not a fragment of the organism. It ships\n * its own token SET rules and defaults to the `narrative` raster, so\n * dropping one into a hand-rolled layout renders a complete, density-\n * correct item with no `<cngx-timeline>` above it. Inside the organism it\n * inherits `[data-mode]` and re-rasters itself.\n *\n * **Two independent state channels.** `status` is where the event sits in\n * a history (`done` / `active` / `upcoming` / `rejected`) - editorial, set\n * by the consumer. `state` is whether *this row's own* data is currently\n * loading or failed. They compose: a `done` item whose `state` errored\n * paints as rejected and announces the failure, without losing the\n * editorial status once the retry succeeds.\n *\n * **What it announces.** The marker and rail are `aria-hidden`, so colour is\n * never the only channel - the status reaches assistive tech through a\n * screen-reader-only line fed from `CNGX_TIMELINE_CONFIG.labels.status`, and\n * a failed row through a visible inline error. Both are read as the row's own\n * content, in DOM order, rather than through `aria-describedby`: the host is\n * a plain element with no role, so a description pointed at its own\n * descendants would resolve nowhere and duplicate the text for anyone\n * browsing it. Neither element is rendered while it has nothing to say.\n *\n * ### Standalone\n * ```html\n * <cngx-timeline-item status=\"done\">\n * <cngx-time cngxTimelineTime [date]=\"event.at\" />\n * <p>Deployment finished</p>\n * </cngx-timeline-item>\n * ```\n *\n * ### With its own async state\n * ```html\n * <cngx-timeline-item [state]=\"rowState\" position=\"last\">\n * <p>{{ rowState.data()?.summary }}</p>\n * </cngx-timeline-item>\n * ```\n *\n * @category common/timeline\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/timeline-item.component.ts\n * @relatedTo CngxTimelineMarker, CngxTimelineConnector, CNGX_TIMELINE_CONFIG\n * <example-url>http://localhost:4200/#/ui/timeline/basics/standalone-atoms</example-url>\n * <example-url>http://localhost:4200/#/ui/timeline/basics/custom-date-header-and-marker</example-url>\n * <example-url>http://localhost:4200/#/ui/timeline/basics/marker-precedence</example-url>\n * <example-url>http://localhost:4200/#/ui/timeline/layout/media-markers</example-url>\n * <example-url>http://localhost:4200/#/ui/timeline/layout/placement-end</example-url>\n * @since 0.1.0\n */\n@Component({\n selector: 'cngx-timeline-item',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxTimelineMarker, CngxTimelineConnector, NgTemplateOutlet],\n host: {\n class: 'cngx-timeline-item',\n '[attr.data-status]': 'status()',\n '[attr.data-failed]': 'failed() ? \"\" : null',\n '[attr.aria-busy]': 'ariaBusy()',\n },\n template: `\n <cngx-timeline-marker [status]=\"markerStatus()\" [busy]=\"busy()\">\n @if (markerTpl(); as tpl) {\n <ng-container\n *ngTemplateOutlet=\"tpl; context: { $implicit: item(), status: markerStatus() }\"\n />\n } @else {\n <ng-content select=\"[cngxTimelineMarkerContent]\" />\n }\n </cngx-timeline-marker>\n <cngx-timeline-connector [status]=\"markerStatus()\" [position]=\"position()\" />\n <ng-content select=\"[cngxTimelineOpposite]\" />\n <ng-content select=\"[cngxTimelineTime]\" />\n <div class=\"cngx-timeline-item__body\">\n <ng-content select=\"[cngxTimelineContent]\" />\n <ng-content />\n @if (errorText(); as text) {\n <p class=\"cngx-timeline-item__error\">{{ text }}</p>\n }\n </div>\n @if (statusText(); as text) {\n <span class=\"cngx-timeline-item__sr\">{{ text }}</span>\n }\n `,\n styleUrls: ['./timeline-tokens.css', './timeline-item.component.css'],\n})\nexport class CngxTimelineItem {\n private readonly labels = coerceSignal<CngxTimelineLabels>(\n injectTimelineConfig().labels ?? TIMELINE_NO_LABELS,\n );\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Where the event sits in the history. Drives the marker and rail\n * colours and the screen-reader status line. Purely editorial - it\n * carries no flow logic, because a timeline is a record and a guided\n * process is a stepper.\n */\n readonly status = input<TimelineStatus | undefined>(undefined);\n\n /**\n * This row's own async state, for a body that loads, mutates or fails\n * independently of the list around it.\n *\n * Optional by construction and tolerant of a bare `state` attribute\n * (the empty string coerces to `undefined`), so the item never forces a\n * binding a consumer may not have.\n */\n readonly state = input<\n CngxAsyncState<unknown> | undefined,\n CngxAsyncState<unknown> | '' | undefined\n >(undefined, { transform: (value) => (typeof value === 'string' ? undefined : value) });\n\n /**\n * Position in the run, forwarded to the rail. `'last'` and `'only'`\n * stop the rail at this item so the timeline does not trail off into\n * empty space. The organism sets it; standalone items default to\n * `'middle'`.\n */\n readonly position = input<TimelineConnectorPosition>('middle');\n\n /**\n * The event this row stands for. Only ever read as the `$implicit` of an\n * app-wide `*cngxTimelineMarkerTpl`, so bind it when the app sets one and\n * that template needs the payload; leave it off otherwise.\n */\n readonly item = input<unknown>(undefined);\n\n /**\n * @internal The timeline-wide marker template, when a `<cngx-timeline>` is\n * above this row. Absent standalone.\n */\n private readonly hostMarkerTpl =\n inject(CNGX_TIMELINE_MARKER_HOST, { optional: true })?.markerTpl ?? (() => null);\n\n /** @internal Set when this row projects its own marker content. */\n private readonly ownMarker = contentChild(CngxTimelineMarkerContent);\n\n /**\n * @internal The timeline-wide template is the *default*, so a row that\n * projects its own marker content overrides it - most-local-wins, the\n * same direction as every other slot in the family. Resolving to `null`\n * rather than branching on `<ng-content>` keeps the projection static:\n * content lands in the DOM once and renders whatever it was given.\n */\n protected readonly markerTpl = computed(() => (this.ownMarker() ? null : this.hostMarkerTpl()));\n\n /** @internal Work in flight on this row's own state. */\n protected readonly busy = computed(() => {\n const status = this.state()?.status();\n return status === 'loading' || status === 'pending';\n });\n\n /** @internal This row's own state failed. */\n protected readonly failed = computed(() => this.state()?.status() === 'error');\n\n /** @internal `aria-busy` reflects the row's own work, not the list's. */\n protected readonly ariaBusy = computed(() => (this.busy() ? 'true' : null));\n\n /**\n * @internal A failed row paints as rejected regardless of its editorial\n * status - a failure is the more urgent fact, and `status` is left\n * untouched so the row returns to its own colour once a retry lands.\n */\n protected readonly markerStatus = computed<TimelineStatus | undefined>(() =>\n this.failed() ? 'rejected' : this.status(),\n );\n\n /**\n * @internal Busy outranks everything: a row still loading has nothing\n * settled to report. Otherwise this reads `markerStatus`, not `status`,\n * so the announcement can never contradict the paint - a failed row\n * announces the `rejected` it shows, not the editorial status it kept.\n */\n protected readonly statusText = computed(() => {\n const labels = this.labels();\n if (this.busy()) {\n return labels.itemBusy ?? '';\n }\n const status = this.markerStatus();\n return status ? (labels.status?.[status] ?? '') : '';\n });\n\n /** @internal Visible inline error, blank unless this row failed. */\n protected readonly errorText = computed(() =>\n this.failed() ? (this.labels().itemErrorFallback ?? '') : '',\n );\n\n constructor() {\n if (isDevMode()) {\n // afterNextRender, not an effect: this is a one-shot authoring check\n // on projected content, and the reactive graph has no business\n // carrying it. Runs once per row, after its content exists.\n afterNextRender(() => {\n const opposite = this.host.nativeElement.querySelector(':scope > [cngxTimelineOpposite]');\n if (opposite?.querySelector(FOCUSABLE)) {\n console.warn(\n '[cngx-timeline-item] focusable content inside [cngxTimelineOpposite]. ' +\n 'The slot projects ahead of the row body, so under placement=\"end\" or ' +\n '\"alternate\" it takes focus before the row it belongs to while painting ' +\n 'on the far side of the rail. Keep opposite content non-interactive and ' +\n 'put controls in the body.',\n this.host.nativeElement,\n );\n }\n });\n }\n }\n}\n","import { Directive, inject, input, TemplateRef } from '@angular/core';\nimport type { EmptyReason } from '@cngx/common/card';\n\nimport type { TimelineGroup } from './grouping';\nimport type { TimelineStatus } from './marker.component';\n\n/**\n * Context for `*cngxTimelineItem` - the item itself plus where it sits.\n *\n * `first` and `last` are positions **within the group**, not within the\n * whole timeline, because that is what a consumer needs to decide whether\n * to draw a trailing rail.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineItemContext<T> {\n readonly $implicit: T;\n /** Index within the group. */\n readonly index: number;\n /** First item of its group. */\n readonly first: boolean;\n /** Last item of its group. */\n readonly last: boolean;\n /** The group this item was bucketed into. */\n readonly group: TimelineGroup<T>;\n}\n\n/**\n * The row template. The one slot with no built-in fallback: only the\n * consumer knows what an event of theirs looks like.\n *\n * Bind the same array the timeline gets and the `let-` variables come out\n * typed - `[cngxTimelineItem]` exists to pin `T`, nothing more:\n *\n * ```html\n * <cngx-timeline [items]=\"events()\" [dateAccessor]=\"at\">\n * <ng-template [cngxTimelineItem]=\"events()\" let-event let-last=\"last\">\n * <cngx-timeline-item [position]=\"last ? 'last' : 'middle'\">\n * <cngx-time cngxTimelineTime [date]=\"event.at\" />\n * <p>{{ event.summary }}</p>\n * </cngx-timeline-item>\n * </ng-template>\n * </cngx-timeline>\n * ```\n *\n * Named `CngxTimelineItemTpl` so it does not collide with the\n * `CngxTimelineItem` component; the selector stays `cngxTimelineItem`,\n * which is what consumers write.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineItem, CngxTimelineDateHeader\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineItem]',\n standalone: true,\n exportAs: 'cngxTimelineItem',\n})\nexport class CngxTimelineItemTpl<T = unknown> {\n /**\n * Type carrier, never read at runtime. Angular cannot infer a structural\n * directive's context generic from a sibling input on the host component,\n * so `T` has to be pinned on the directive itself; binding the same array\n * the timeline renders does that, and `ngTemplateContextGuard` below then\n * types every `let-` variable. This is `NgForOf`'s `ngForOf` mechanism,\n * not a cngx invention.\n *\n * Optional, and tolerant of the bare `cngxTimelineItem` attribute every\n * v1 consumer writes: an unbound attribute binds the empty string, which\n * `strictTemplates` would otherwise reject against an array type. The\n * empty string coerces to `undefined` and `T` falls back to `unknown` -\n * the Bridge-Input shape the library uses wherever an attribute doubles\n * as an opt-in.\n *\n * Nothing enforces that the array bound here is the array bound to\n * `[items]`; a mismatch only mistypes the `let-` variables, which the\n * template type-checker then rejects at the use site.\n */\n readonly cngxTimelineItem = input<readonly T[] | undefined, readonly T[] | '' | undefined>(\n undefined,\n { transform: (value) => (typeof value === 'string' ? undefined : value) },\n );\n\n readonly templateRef = inject<TemplateRef<CngxTimelineItemContext<T>>>(TemplateRef);\n\n static ngTemplateContextGuard<T>(\n _dir: CngxTimelineItemTpl<T>,\n ctx: unknown,\n ): ctx is CngxTimelineItemContext<T> {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineDateHeader` - the whole group, so a header can\n * show its item count alongside the date.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineDateHeaderContext<T> {\n readonly $implicit: TimelineGroup<T>;\n}\n\n/**\n * The per-group header. Falls back to\n * `CNGX_TIMELINE_CONFIG.labels.groupLabel`, which formats the group's\n * start date in the app locale.\n *\n * The element this renders into is what the group's `aria-labelledby`\n * points at, so a header that renders nothing leaves the group unnamed.\n *\n * ```html\n * <ng-template [cngxTimelineDateHeader]=\"events()\" let-group>\n * <h3>{{ format(group.start) }} ({{ group.items.length }})</h3>\n * </ng-template>\n * ```\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineItemTpl\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineDateHeader]',\n standalone: true,\n exportAs: 'cngxTimelineDateHeader',\n})\nexport class CngxTimelineDateHeader<T = unknown> {\n /**\n * Type carrier for the group's item type, never read at runtime. Bind the\n * same array the timeline gets and `let-group` types as\n * `TimelineGroup<T>`. See {@link CngxTimelineItemTpl.cngxTimelineItem}.\n */\n readonly cngxTimelineDateHeader = input<readonly T[] | undefined, readonly T[] | '' | undefined>(\n undefined,\n { transform: (value) => (typeof value === 'string' ? undefined : value) },\n );\n\n readonly templateRef = inject<TemplateRef<CngxTimelineDateHeaderContext<T>>>(TemplateRef);\n\n static ngTemplateContextGuard<T>(\n _dir: CngxTimelineDateHeader<T>,\n ctx: unknown,\n ): ctx is CngxTimelineDateHeaderContext<T> {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineMarkerTpl` - the item and the status the\n * organism resolved for it.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineMarkerContext<T> {\n readonly $implicit: T;\n readonly status: TimelineStatus | undefined;\n}\n\n/**\n * What goes inside the marker dot - an icon, an avatar, a type glyph.\n * Falls back to a bare coloured dot.\n *\n * Applies to every row. A single row overrides it by projecting its own\n * `[cngxTimelineMarkerContent]`, which wins over this template.\n *\n * Whatever renders here is inside an `aria-hidden` element, so it must\n * not be the only carrier of anything: the status reaches assistive tech\n * through `CNGX_TIMELINE_CONFIG.labels.status`.\n *\n * Keeps `Tpl` in class *and* selector to stay clear of\n * `CngxTimelineMarker`, the component it renders into.\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineMarker\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineMarkerTpl]',\n standalone: true,\n exportAs: 'cngxTimelineMarkerTpl',\n})\nexport class CngxTimelineMarkerTpl<T = unknown> {\n /**\n * Type carrier for the item type, never read at runtime. Bind the same\n * array the timeline gets and `let-event` types as `T`. See\n * {@link CngxTimelineItemTpl.cngxTimelineItem}.\n */\n readonly cngxTimelineMarkerTpl = input<readonly T[] | undefined, readonly T[] | '' | undefined>(\n undefined,\n { transform: (value) => (typeof value === 'string' ? undefined : value) },\n );\n\n readonly templateRef = inject<TemplateRef<CngxTimelineMarkerContext<T>>>(TemplateRef);\n\n static ngTemplateContextGuard<T>(\n _dir: CngxTimelineMarkerTpl<T>,\n ctx: unknown,\n ): ctx is CngxTimelineMarkerContext<T> {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineEmpty` - why the timeline is empty.\n *\n * The distinction is the point: \"nothing has happened yet\" and \"your\n * filter matched nothing\" call for different copy and different actions.\n * Vocabulary shared with `CngxCardGrid` so an app writes one empty-state\n * component and reuses it.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineEmptyContext {\n readonly $implicit: EmptyReason;\n}\n\n/**\n * The empty surface. Falls back to\n * `CNGX_TIMELINE_CONFIG.labels.emptyFallback`.\n *\n * ```html\n * <ng-template cngxTimelineEmpty let-reason>\n * @if (reason === 'no-results') { <p>No events match this filter.</p> }\n * @else { <p>Nothing has happened yet.</p> }\n * </ng-template>\n * ```\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineError\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineEmpty]',\n standalone: true,\n exportAs: 'cngxTimelineEmpty',\n})\nexport class CngxTimelineEmpty {\n readonly templateRef = inject<TemplateRef<CngxTimelineEmptyContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _dir: CngxTimelineEmpty,\n ctx: unknown,\n ): ctx is CngxTimelineEmptyContext {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineError` - the raw error plus the retry the\n * organism owns.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineErrorContext {\n readonly $implicit: unknown;\n /** Re-drives the consumer's source; emits the organism's `retry` output. */\n readonly retry: () => void;\n}\n\n/**\n * The whole error surface, replacing message and retry control together.\n * Reach for `*cngxTimelineRetryButton` instead when only the button needs\n * restyling. Falls back to\n * `CNGX_TIMELINE_CONFIG.labels.errorFallback` plus a plain retry button.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineRetryButton, CngxTimelineEmpty\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineError]',\n standalone: true,\n exportAs: 'cngxTimelineError',\n})\nexport class CngxTimelineError {\n readonly templateRef = inject<TemplateRef<CngxTimelineErrorContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _dir: CngxTimelineError,\n ctx: unknown,\n ): ctx is CngxTimelineErrorContext {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineRetryButton` - the retry callback.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineRetryButtonContext {\n readonly $implicit: () => void;\n}\n\n/**\n * Just the retry control inside the default error surface, for apps that\n * want their own button component without rewriting the error copy.\n *\n * Whatever renders here has to be operable: the library ships no button\n * component, so a consumer template is responsible for its own `type`,\n * accessible name and click wiring.\n *\n * ```html\n * <ng-template cngxTimelineRetryButton let-retry>\n * <button type=\"button\" (click)=\"retry()\">Try again</button>\n * </ng-template>\n * ```\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineError\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineRetryButton]',\n standalone: true,\n exportAs: 'cngxTimelineRetryButton',\n})\nexport class CngxTimelineRetryButton {\n readonly templateRef = inject<TemplateRef<CngxTimelineRetryButtonContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _dir: CngxTimelineRetryButton,\n ctx: unknown,\n ): ctx is CngxTimelineRetryButtonContext {\n return true;\n }\n}\n\n/**\n * The tail appended below the list while a background refresh runs, with\n * the already-loaded items still on screen. Falls back to\n * `CNGX_TIMELINE_CONFIG.labels.refreshing`.\n *\n * Contextless on purpose - a refresh has nothing to say beyond the fact\n * that it is happening.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineError\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineLoadingTail]',\n standalone: true,\n exportAs: 'cngxTimelineLoadingTail',\n})\nexport class CngxTimelineLoadingTail {\n readonly templateRef = inject<TemplateRef<void>>(TemplateRef);\n}\n\n/**\n * One placeholder row in the first-load body, replacing the built-in\n * marker-rail-and-two-bars shape. Rendered `[skeletonRowCount]` times.\n *\n * Contextless, and deliberately so: a placeholder stands in for a row whose\n * data has not arrived, so there is nothing to hand it. Bind this when the\n * real rows are taller or busier than the default shape and the swap to\n * content would otherwise reflow the page.\n *\n * Whatever renders here sits inside an `aria-hidden` wrapper - the load is\n * announced through the timeline's live region, not through the placeholder.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineLoadingTail\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineSkeleton]',\n standalone: true,\n exportAs: 'cngxTimelineSkeleton',\n})\nexport class CngxTimelineSkeleton {\n readonly templateRef = inject<TemplateRef<void>>(TemplateRef);\n}\n","/**\n * @module @cngx/common/timeline\n */\nexport {\n CNGX_TIMELINE_GROUPING_FACTORY,\n createTimelineGrouping,\n type CngxTimelineGroupingFactory,\n type TimelineDateAccessor,\n type TimelineDirection,\n type TimelineGroup,\n type TimelineGroupBy,\n type TimelineGroupingFn,\n type TimelineGroupingOptions,\n type TimelineGroupKey,\n type TimelineGrouping,\n} from './grouping';\nexport { CngxTimelineMarker, type TimelineStatus } from './marker.component';\nexport {\n CngxTimelineConnector,\n type TimelineConnectorPosition,\n} from './connector.component';\nexport {\n CngxTimelineContent,\n CngxTimelineItem,\n CngxTimelineMarkerContent,\n CngxTimelineOpposite,\n CngxTimelineTime,\n} from './timeline-item.component';\nexport {\n CNGX_TIMELINE_MARKER_HOST,\n type CngxTimelineMarkerHost,\n} from './marker-host.token';\nexport {\n CngxTimelineDateHeader,\n CngxTimelineEmpty,\n CngxTimelineError,\n CngxTimelineItemTpl,\n CngxTimelineLoadingTail,\n CngxTimelineMarkerTpl,\n CngxTimelineRetryButton,\n CngxTimelineSkeleton,\n type CngxTimelineDateHeaderContext,\n type CngxTimelineEmptyContext,\n type CngxTimelineErrorContext,\n type CngxTimelineItemContext,\n type CngxTimelineMarkerContext,\n type CngxTimelineRetryButtonContext,\n} from './template-slots';\nexport {\n CNGX_TIMELINE_CONFIG,\n injectTimelineConfig,\n provideTimelineConfig,\n provideTimelineConfigAt,\n withTimelineLabels,\n withTimelineTemplates,\n type CngxTimelineConfig,\n type CngxTimelineConfigFeature,\n type CngxTimelineLabels,\n type CngxTimelineTemplates,\n} from './timeline-config';\nexport {\n CNGX_TIMELINE_LANGUAGE_EN,\n type CngxTimelineLanguageSection,\n} from './i18n/timeline-language-section';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AA+HA,SAAS,IAAI,CAAC,KAAa,EAAA;AACzB,IAAA,OAAO,KAAK,GAAG,EAAE,GAAG,CAAA,CAAA,EAAI,KAAK,CAAA,CAAE,GAAG,CAAA,EAAG,KAAK,EAAE;AAC9C;AAEA,SAAS,UAAU,CAAC,IAAU,EAAA;AAC5B,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE;AAC/B,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE;AAC7B,IAAA,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE;IAC1B,OAAO;AACL,QAAA,GAAG,EAAE,CAAA,EAAG,IAAI,CAAA,CAAA,EAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA,CAAA,EAAI,IAAI,CAAC,GAAG,CAAC,CAAA,CAAE;QAC9C,KAAK,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC;KAClC;AACH;AAOA,MAAM,aAAa,GAAG,CAAC;AAEvB;;;AAGG;AACH,MAAM,cAAc,GAAG,OAAO,CAC5B,CAAC,MAAc,KAAY;AACzB,IAAA,IAAI,UAA0B;AAC9B,IAAA,IAAI;QACF,UAAU,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAA8B;IACnE;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,aAAa;IACtB;AACA,IAAA,OAAO,CAAC,UAAU,CAAC,WAAW,IAAI,IAAI,UAAU,CAAC,QAAQ,GAAG,QAAQ,IAAI,aAAa;AACvF,CAAC,EACD,EAAE,UAAU,EAAE,EAAE,EAAE,CACnB;AAED,SAAS,WAAW,CAAC,IAAU,EAAE,QAAgB,EAAA;;AAE/C,IAAA,MAAM,MAAM,GAAG,CAAC,I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AM,CAAoB,WAAW,CAAC;uGADlD,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mCAAA,EAAA,QAAA,EAAA,CAAA,sBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mCAAmC;AAC7C,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,sBAAsB;AACjC,iBAAA;;;AC5XD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/fesm2022/cngx-common.mjs
CHANGED
|
@@ -8,7 +8,7 @@ export * from '@cngx/common/popover';
|
|
|
8
8
|
import { makeVersion } from '@cngx/utils';
|
|
9
9
|
|
|
10
10
|
/** @internal - replaced at publish time, not part of consumer API. */
|
|
11
|
-
const VERSION = makeVersion('0.1.0-rc.
|
|
11
|
+
const VERSION = makeVersion('0.1.0-rc.8');
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Public API Surface of @cngx/common
|
package/interactive/README.md
CHANGED
|
@@ -102,13 +102,14 @@ Supports `mod` as a platform-aware modifier (`Meta` on macOS, `Ctrl` elsewhere).
|
|
|
102
102
|
- `preventDefault()` is called on matching events.
|
|
103
103
|
- Combo string is memoised - re-parsed only when the input changes.
|
|
104
104
|
|
|
105
|
-
##
|
|
105
|
+
## createRetry
|
|
106
106
|
|
|
107
107
|
Wraps an `AsyncAction` with automatic retry logic. Returns `[action, retryState]`.
|
|
108
108
|
The wrapped action retries on failure with configurable delay and backoff.
|
|
109
|
+
The former `withRetry` name is a deprecated alias and is removed at the v1.0 cut.
|
|
109
110
|
|
|
110
111
|
```typescript
|
|
111
|
-
const [saveWithRetry, retryState] =
|
|
112
|
+
const [saveWithRetry, retryState] = createRetry(
|
|
112
113
|
() => this.http.post('/api/save', data),
|
|
113
114
|
{ maxAttempts: 3, delay: 1000, backoff: 'exponential' }
|
|
114
115
|
);
|
|
@@ -159,14 +160,15 @@ const [saveWithRetry, retryState] = withRetry(
|
|
|
159
160
|
|
|
160
161
|
`reset()` clears all state back to `'idle'`.
|
|
161
162
|
|
|
162
|
-
##
|
|
163
|
+
## createOptimistic
|
|
163
164
|
|
|
164
165
|
Creates an optimistic update function for a signal. Sets the value immediately,
|
|
165
166
|
then confirms via an async action. On failure, rolls back to the last confirmed value.
|
|
167
|
+
The former `optimistic` name is a deprecated alias and is removed at the v1.0 cut.
|
|
166
168
|
|
|
167
169
|
```typescript
|
|
168
170
|
readonly name = signal('Alice');
|
|
169
|
-
readonly [updateName, nameState] =
|
|
171
|
+
readonly [updateName, nameState] = createOptimistic(
|
|
170
172
|
this.name,
|
|
171
173
|
(value) => this.http.put('/api/name', { name: value })
|
|
172
174
|
);
|
|
@@ -305,6 +307,15 @@ forking. The strategy is a pure `(total, maxVisible) => ReadonlySet<number>`.
|
|
|
305
307
|
})
|
|
306
308
|
```
|
|
307
309
|
|
|
310
|
+
## Async-state discovery in groups
|
|
311
|
+
|
|
312
|
+
The six group components (`CngxCheckboxGroup`, `CngxRadioGroup`, `CngxChipGroup`,
|
|
313
|
+
`CngxMultiChipGroup`, `CngxButtonToggleGroup`, `CngxButtonMultiToggleGroup`) resolve
|
|
314
|
+
their async state from the `[state]` input first and fall back to the nearest
|
|
315
|
+
`CNGX_STATEFUL` producer in the injector tree. A group nested inside any producer
|
|
316
|
+
inherits its busy signalling silently - no wiring needed. Bind `[state]` explicitly
|
|
317
|
+
to override the discovered producer.
|
|
318
|
+
|
|
308
319
|
## Other Exports
|
|
309
320
|
|
|
310
321
|
`CngxClickOutside`, `CngxDisclosure`, `CngxNavLink`, `CngxNavLabel`, `CngxNavBadge`,
|
package/layout/README.md
CHANGED
|
@@ -65,6 +65,25 @@ Communicates when a `position: sticky` element becomes stuck. Does NOT apply sti
|
|
|
65
65
|
- Sentinel and observer are created in `afterNextRender`, cleaned up via `DestroyRef`.
|
|
66
66
|
- Sticky header itself remains visible to screen readers (`aria-hidden` is not set on host).
|
|
67
67
|
|
|
68
|
+
## CngxScrollEdges
|
|
69
|
+
|
|
70
|
+
Reports which edges of a scrollport still hide content as four signals (`canScrollBlockStart` / `BlockEnd` / `InlineStart` / `InlineEnd`) and reflects them as logical host attributes (`data-scroll-block-start` and siblings), present only while true. Paints nothing; key edge shadows or fades on the attributes in your CSS.
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<div class="sheet" cngxScrollEdges>...</div>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```css
|
|
77
|
+
.sheet[data-scroll-block-end] { box-shadow: inset 0 -8px 8px -8px rgb(0 0 0 / 0.3); }
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Notes
|
|
81
|
+
|
|
82
|
+
- One read per animation frame, triggered by scroll, resize of the scrollport or a direct child, and child-list mutations. 1px tolerance.
|
|
83
|
+
- RTL-safe without a direction lookup; inline start is the right edge under `dir="rtl"`.
|
|
84
|
+
- Purely visual: no announcement, the hidden content stays in the DOM.
|
|
85
|
+
- The atom paints nothing: the `data-scroll-*` attributes (present only while true) are the public, stable contract. Common cues keyed on them: a shadow (elevate-on-scroll), a hairline that appears, or a tonal surface change. Forced colors strips `box-shadow`, so prefer a border there. Recipes in [scroll/README.md](scroll/README.md#cngxscrolledges).
|
|
86
|
+
|
|
68
87
|
## CngxScrollSpy
|
|
69
88
|
|
|
70
89
|
Tracks which section is currently most visible in the viewport. Observes a list of elements by their IDs using `IntersectionObserver` with fine-grained thresholds (10% steps). Reports the one with the highest ratio above the minimum threshold.
|
|
@@ -152,4 +171,5 @@ injectQueryParamSync(this.tab, {
|
|
|
152
171
|
## Other Exports
|
|
153
172
|
|
|
154
173
|
`CngxIntersectionObserver`, `CngxResizeObserver`, `CngxScrollLock`, `CngxBackdrop`,
|
|
155
|
-
`CngxMediaQuery`, `injectMediaQuery`, `CngxDrawer`, `CngxDrawerPanel`, `CngxDrawerContent`,
|
|
174
|
+
`CngxMediaQuery`, `injectMediaQuery`, `CngxDrawer`, `CngxDrawerPanel`, `CngxDrawerContent`,
|
|
175
|
+
`CngxInfiniteScroll`, `CngxHighlight`, `CngxExpandableText`, `CngxExpandableToggle`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cngx/common",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.8",
|
|
4
4
|
"description": "Atoms and molecules (a11y, interactive, layout, dialog, popover, display) for the CNGX Angular component library.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cngx",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"directory": "projects/common"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@cngx/utils": "0.1.0-rc.
|
|
27
|
-
"@cngx/core": "0.1.0-rc.
|
|
26
|
+
"@cngx/utils": "0.1.0-rc.8",
|
|
27
|
+
"@cngx/core": "0.1.0-rc.8",
|
|
28
28
|
"@angular/cdk": "^21.2.0",
|
|
29
29
|
"@angular/common": "^21.2.0",
|
|
30
30
|
"@angular/core": "^21.2.0",
|
package/popover/README.md
CHANGED
|
@@ -12,6 +12,7 @@ Signal-driven popover, tooltip, and popover panel components built on the native
|
|
|
12
12
|
- WCAG 1.4.13 compliant tooltips (dismissable, hoverable, persistent)
|
|
13
13
|
- Material theme SCSS with M3 tokens
|
|
14
14
|
- Exclusive mode (one popover at a time by default)
|
|
15
|
+
- Dismissal defaults: `mode` is `'manual'` (you control open/close; `'auto'` enables native light-dismiss), `[closeOnEscape]` is `true`, and `[closeOnOutsideClick]` (outside-pointer dismiss) is `false` - opt in when you want click-away to close
|
|
15
16
|
|
|
16
17
|
## Quick Start
|
|
17
18
|
|
|
@@ -45,6 +46,19 @@ import {
|
|
|
45
46
|
</div>
|
|
46
47
|
```
|
|
47
48
|
|
|
49
|
+
### Anchoring to another element
|
|
50
|
+
|
|
51
|
+
When the focusable trigger is not the visible box the panel should hang under (an input inside a bordered field row), put `[cngxPopoverAnchor]` on the box. The trigger keeps `aria-expanded`, `aria-controls` and `aria-haspopup` but yields its `anchor-name`; CSS Anchor Positioning and the Floating UI fallback both measure the anchor.
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<div class="field" [cngxPopoverAnchor]="pop">
|
|
55
|
+
<input [cngxPopoverTrigger]="pop" (focus)="pop.show()" aria-label="City" />
|
|
56
|
+
</div>
|
|
57
|
+
<div cngxPopover #pop="cngxPopover" placement="bottom-start">...</div>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The explicit anchor wins over the trigger. When the anchor unmounts, the trigger becomes the anchor again. Pointerdowns on the trigger still count as inside for `[closeOnOutsideClick]`.
|
|
61
|
+
|
|
48
62
|
### Controlled Popover
|
|
49
63
|
|
|
50
64
|
```html
|
|
@@ -180,13 +194,15 @@ npm install @floating-ui/dom
|
|
|
180
194
|
```
|
|
181
195
|
|
|
182
196
|
```typescript
|
|
183
|
-
import { computePosition, flip,
|
|
197
|
+
import { computePosition, flip, shift } from '@floating-ui/dom';
|
|
184
198
|
import { provideFloatingFallback } from '@cngx/common/popover';
|
|
185
199
|
|
|
186
200
|
providers: [
|
|
187
|
-
provideFloatingFallback(computePosition, [
|
|
201
|
+
provideFloatingFallback(computePosition, [flip(), shift()]),
|
|
188
202
|
]
|
|
189
203
|
```
|
|
190
204
|
|
|
205
|
+
Leave `offset()` out: the popover prepends its own offset middleware from its `offset` input, so a second one doubles the gap.
|
|
206
|
+
|
|
191
207
|
The library never imports `@floating-ui/dom` directly. When not provided, positioning falls back to browser defaults. Zero bundle impact for modern browsers.
|
|
192
208
|
|