import { HoistService, InitContext } from '@xh/hoist/core'; /** * Service to display an application changelog (aka release notes) to end users, if so configured. * * Changelog entries are maintained in a CHANGELOG.md file within the project root, formatted as * per https://keepachangelog.com. Requires hoist-dev-utils v5.7+ to parse the markdown source * into JSON and make available via the special `@xh/app-changelog.json` import above. * * If a changelog is available, the top-level app menu will include an item to view the log in a * dialog. If a string pref is defined with key `xhLastReadChangelog`, this service will track the * most recent version viewed by the user, and the app will render a "What's new?" button in the * top appBar to alert the user. These app-level UI elements are currently desktop-only, can all be * independently disabled, and only appear when this service is enabled. * * Several additional options can be controlled via soft-config - see below. * * @see XH.showChangelog * @see whatsNewButton */ export declare class ChangelogService extends HoistService { xhImpl: boolean; static instance: ChangelogService; readonly SVC_CONFIG_KEY: string; readonly LAST_READ_PREF_KEY: string; /** * The complete changelog object, as produced by the app build or defined * in soft-config, or an empty placeholder if neither source is enabled/available. */ changelog: object; /** * Parsed and cleaned versions, if any, with any versions or * nested categories marked for exclusion via config already omitted. */ versions: ChangelogVersion[]; /** * True if an entry exists for the current app version which the user has * yet to view (and the required user preference has been created). */ currentVersionIsUnread: boolean; get enabled(): boolean; get latestAvailableVersion(): string; get latestNonEmptyVersion(): string; constructor(); initAsync(ctx: InitContext): Promise; markLatestAsRead(): void; private get config(); private parseVersions; private includeVersion; private includeCategory; private updateUnreadStatus; } export interface ChangelogVersion { version: string; title: string; isCurrentVersion: boolean; categories: ChangelogCategory[]; } export interface ChangelogCategory { title: string; items: string[]; }