gedcom-ts
Version:
TypeScript GEDCOM toolkit for browser apps: import .ged/.zip, edit typed genealogy data, and export GEDCOM or GEDZIP.
25 lines (24 loc) • 1.12 kB
TypeScript
import type { BookletPersonEntry, BookletRelationRef } from './booklet-person';
import type { BookletLocale } from './booklet-locale';
export type BookletDetailLevel = 'summary' | 'detailed';
export type { BookletRelationRef };
export interface BookletFamilyUnit {
readonly familyId: number;
readonly partners: readonly BookletRelationRef[];
readonly children: readonly BookletRelationRef[];
readonly marriageLabel: string | null;
}
export interface BookletChapter {
readonly key: string;
readonly title: string;
readonly subtitle: string;
readonly entries: readonly BookletPersonEntry[];
readonly families: readonly BookletFamilyUnit[];
}
export interface BookletTocEntry {
readonly title: string;
readonly page: number;
}
export declare function groupBookletIntoChapters(entries: readonly BookletPersonEntry[], locale?: BookletLocale): BookletChapter[];
export declare function partnerNamesLabel(partners: readonly BookletRelationRef[]): string;
export declare function childrenNamesLabel(children: readonly BookletRelationRef[], max?: number, locale?: BookletLocale): string;