Skip to main content
cngx-src documentation

CngxTimelineLabels

Interface

projects/common/timeline/timeline-config.ts

Import#

import { CngxTimelineLabels } from '@cngx/common/timeline'

Description#

Every user-visible string the timeline can render without a consumer slot, plus the group-header formatter.

Library defaults are English. Localise by passing withTimelineLabels to provideTimelineConfig once at bootstrap - the timeline itself hardcodes nothing, so a missing translation shows up as English text rather than as a blank surface.

Each of these is a fallback: the matching template slot (*cngxTimelineError, *cngxTimelineEmpty, ...) wins whenever it is present.

Index#

Instance Properties#

emptyFallback#string
ReadonlyOptional

Body text for the empty surface when no *cngxTimelineEmpty slot is bound. Default 'No events yet.'

errorFallback#string
ReadonlyOptional

Body text for the error surface when no *cngxTimelineError slot is bound. Default 'Could not load the timeline.'

groupLabel#function
ReadonlyOptional

Formats a group's header when no *cngxTimelineDateHeader slot is bound. Receives the whole group so a consumer can fold the item count into the header. Defaults to the group's start date in the browser locale - a date, unlike the strings above, has no sensible English-only default.

itemBusy#string
ReadonlyOptional

Screen-reader text for a single item whose own [state] is pending. Paired with aria-busy on that item. Default 'Updating'.

itemErrorFallback#string
ReadonlyOptional

Inline error text for a single item whose own [state] failed, used when the consumer renders no per-item error content. Default 'Could not load this event.'

loading#string
ReadonlyOptional

Accessible name for the loading body, so the skeleton is announced as something other than silence. Default 'Loading timeline'.

refreshing#string
ReadonlyOptional

Text for the refreshing tail appended below the list while a background reload is in flight. Default 'Updating…'. Superseded by *cngxTimelineLoadingTail.

retry#string
ReadonlyOptional

Label on the built-in retry control rendered in the error surface. Default 'Retry'. Superseded by *cngxTimelineRetryButton.

ReadonlyOptional

Screen-reader wording for each process status. The marker paints the status visually and the dot is aria-hidden, so this map is the only channel that carries it to assistive tech - leaving a key blank silences that status rather than merely restyling it.

Defaults: Completed / In progress / Upcoming / Rejected. Partial - withTimelineLabels merges it key by key, so renaming one status leaves the other three at their defaults.

timelineRegion#string
ReadonlyOptional

Accessible name for the timeline list itself, read when focus or a screen-reader cursor enters the region. Default 'Timeline'. A per-instance [aria-label] / [aria-labelledby] wins.