/** * Translatable strings used by the components' built-in texts (aria-labels, * placeholders, screen-reader instructions, report templates). * * Every string can be overridden app-wide via `setOptions({ localize: {...} })` * (or the Vue plugin's `config` option). Component props always win over the * configured values, so per-instance overrides keep working. * * Strings containing `{tokens}` are templates — interpolate them with * {@link formatMessage}. */ export interface CuiLocalization { /** Strings shared by several components. */ common: { loading: string; search: string; searchPlaceholder: string; ok: string; cancel: string; accept: string; reject: string; clear: string; close: string; today: string; /** aria-label of the `*` required marker on form fields. */ required: string; /** aria-label of the lock icon on readonly form fields. */ readonly: string; emptyMessage: string; emptyFilterMessage: string; }; activeFilters: { /** Accessible name of the group wrapping the filter chips. */ label: string; /** Template — `{filter}` is the chip's label. */ remove: string; clearAll: string; /** Announced after a chip is removed. Template — `{filter}` is its label. */ removed: string; /** Announced after every chip is removed at once. */ cleared: string; }; app: { skipToContent: string; accessibilityToolbar: string; }; avatar: { alt: string; }; backButton: { label: string; }; breadcrumbs: { label: string; }; buttonDropdown: { open: string; }; dashboard: { editWidget: string; removeWidget: string; }; dataTable: { search: string; /** Template — `{column}` is the column header. */ filterColumn: string; columns: string; toggleColumns: string; selectRow: string; unselectRow: string; }; datePicker: { instructions: string; toggleCalendar: string; weekHeader: string; prevMonth: string; nextMonth: string; prevYear: string; nextYear: string; prevDecade: string; nextDecade: string; hours: string; minutes: string; }; drawer: { close: string; }; fileUpload: { uploadComplete: string; }; header: { breadcrumbLabel: string; searchPlaceholder: string; avatarAlt: string; login: string; }; loaderHugeLoadtimes: { label: string; }; loadingBar: { label: string; ariaLabel: string; }; mainMenu: { collapse: string; hide: string; search: string; filterPlaceholder: string; label: string; mobileLabel: string; }; paginator: { label: string; firstPage: string; prevPage: string; nextPage: string; lastPage: string; /** Template — `{page}` is the 1-based page number. */ page: string; rowsPerPage: string; /** Trailing text of the rows-per-page option, e.g. "5 per page". */ perPage: string; noEntries: string; /** Template — `{first}`, `{last}` and `{total}` describe the visible rows. */ report: string; /** Template — `{page}` and `{pageCount}`. */ pageReport: string; }; searchBar: { placeholder: string; }; } export interface Config { /** * BCP-47 locale used for all Intl-based formatting (date patterns, * month/weekday names, number formatting). Components with a `locale` prop * fall back to this value. */ locale: string; /** * Date input/display pattern using `DD`, `MM` and `YYYY` tokens * (e.g. "DD.MM.YYYY"). When undefined, the pattern is derived from `locale`. */ dateFormat?: string; /** First day of the week: 0 = Sunday, 1 = Monday, … 6 = Saturday. */ firstDayOfWeek: number; /** Translatable component strings. */ localize: CuiLocalization; CuiSchedule: { snapToClosestInterval: number; displayWeekNumbers: boolean; hourHeight: number; startHour: number; endHour: number; maxHeight: number | undefined; getFreeDropTimes: () => any[]; type: string; }; } /** Recursive partial of {@link Config} accepted by {@link setOptions}. */ export type CuiConfigOptions = { [K in keyof Config]?: Config[K] extends (...args: any[]) => any ? Config[K] : Config[K] extends object ? DeepPartialObject : Config[K]; }; type DeepPartialObject = { [K in keyof T]?: T[K] extends (...args: any[]) => any ? T[K] : T[K] extends object ? DeepPartialObject : T[K]; }; declare let config: Config; export { config as default }; type Listener = () => void; /** Current configuration snapshot. Replaced (not mutated) on every {@link setOptions}. */ export declare const getConfig: () => Config; /** * Deep-merges the given options into the current configuration and notifies * subscribers. Arrays and functions are replaced, objects are merged. */ export declare const setOptions: (options: CuiConfigOptions) => void; /** * Subscribes to configuration changes (used by the frameworks' `useCuiConfig` * adapters). Returns an unsubscribe function. */ export declare const subscribe: (listener: Listener) => (() => void); /** * The effective date pattern: the configured `dateFormat` when set, otherwise * derived from the configured locale (e.g. "MM/DD/YYYY" for en-US). */ export declare const resolveDateFormat: (cfg?: Config) => string; /** * Interpolates `{token}` placeholders in a localization template. * @example formatMessage("Page {page} of {pageCount}", { page: 2, pageCount: 9 }) */ export declare const formatMessage: (template: string, values: Record) => string;