@rr0/cms
Version:
RR0 Content Management System (CMS)
20 lines (19 loc) • 1.39 kB
TypeScript
import { HtmlRR0Context } from "../RR0Context.js";
import { DirectoryStep, FileWriteConfig, OutputFunc } from "ssg-api";
import { PeopleHtmlRenderer } from "./PeopleHtmlRenderer.js";
import { CountryCode, Occupation, People, PeopleService } from "@rr0/data";
export type PeopleFilter = (p: People) => boolean;
export declare function peopleOccupationFilter(filterOccupations: Occupation[]): PeopleFilter;
/**
* Scan directories for people information, then populates a template with collected data.
*/
export declare class PeopleDirectoryStep extends DirectoryStep {
protected outputFunc: OutputFunc;
protected service: PeopleService;
protected renderer: PeopleHtmlRenderer;
protected filter: PeopleFilter;
constructor(name: string, rootDirs: string[], excludedDirs: string[], templateFileName: string, outputFunc: OutputFunc, config: FileWriteConfig, service: PeopleService, renderer: PeopleHtmlRenderer, filter?: PeopleFilter);
protected processDirs(context: HtmlRR0Context, dirNames: string[]): Promise<void>;
protected toList(context: HtmlRR0Context, peopleList: People[], pseudoPeopleList: People[], allCountries: Set<CountryCode>, occupations: Set<Occupation>): HTMLUListElement;
protected toListItem(context: HtmlRR0Context, people: People, pseudoPeopleList: People[], allCountries: Set<CountryCode>, occupations: Set<Occupation>): HTMLLIElement;
}