@rr0/cms 0.1.14 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BaseReplaceCommand.d.ts +2 -2
- package/dist/DefaultContentVisitor.d.ts +11 -11
- package/dist/DescriptionReplaceCommand.d.ts +3 -3
- package/dist/ImageCommand.d.ts +3 -3
- package/dist/MetaLinkReplaceCommand.d.ts +3 -3
- package/dist/OpenGraphCommand.d.ts +6 -6
- package/dist/OpenGraphCommand.js +1 -1
- package/dist/RR0ContentStep.d.ts +11 -11
- package/dist/RR0ContentStep.js +2 -2
- package/dist/{RR0SsgContext.d.ts → RR0Context.d.ts} +8 -8
- package/dist/{RR0SsgContext.js → RR0Context.js} +4 -4
- package/dist/anchor/AnchorHandler.d.ts +2 -2
- package/dist/anchor/AnchorReplaceCommand.d.ts +2 -2
- package/dist/anchor/AnchorReplacer.d.ts +3 -3
- package/dist/anchor/CaseAnchorHandler.d.ts +2 -2
- package/dist/anchor/CaseAnchorHandler.js +2 -2
- package/dist/anchor/DataAnchorHandler.d.ts +6 -6
- package/dist/book/BookContentVisitor.d.ts +2 -2
- package/dist/book/BookDirectoryStep.d.ts +5 -5
- package/dist/book/BookService.d.ts +3 -1
- package/dist/book/BookService.js +4 -4
- package/dist/book/Chapters.d.ts +3 -3
- package/dist/book/Chapters.js +2 -2
- package/dist/build.js +27 -8
- package/dist/data/AbstractDataFactory.d.ts +3 -2
- package/dist/data/AbstractDataFactory.js +1 -1
- package/dist/data/AbstractDataService.d.ts +2 -3
- package/dist/data/AbstractDataService.js +2 -8
- package/dist/data/RR0Data.d.ts +4 -3
- package/dist/data/TypedDataFactory.d.ts +3 -2
- package/dist/data/TypedDataFactory.js +4 -0
- package/dist/data/index.d.ts +1 -1
- package/dist/data/index.js +1 -1
- package/dist/index/IndexedReplacer.d.ts +4 -4
- package/dist/index/IndexedReplacerFactory.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lang/LanguageReplaceCommand.d.ts +3 -3
- package/dist/lang/RR0Messages.d.ts +1 -1
- package/dist/lang/RR0Messages_en.d.ts +1 -1
- package/dist/lang/RR0Messages_en.js +1 -1
- package/dist/lang/RR0Messages_fr.d.ts +1 -1
- package/dist/lang/RR0Messages_fr.js +1 -1
- package/dist/note/NoteFileCounter.d.ts +2 -2
- package/dist/note/NoteRenderer.d.ts +2 -2
- package/dist/note/NoteReplacer.d.ts +2 -2
- package/dist/note/NoteReplacerFactory.d.ts +2 -2
- package/dist/org/OrgMessages.d.ts +2 -2
- package/dist/org/Organization.d.ts +3 -3
- package/dist/org/Organization.js +3 -3
- package/dist/org/OrganizationMessages.d.ts +3 -3
- package/dist/org/OrganizationService.d.ts +4 -3
- package/dist/org/OrganizationService.js +10 -9
- package/dist/org/au/region/vic/index.d.ts +1 -1
- package/dist/org/au/region/vic/index.js +1 -1
- package/dist/org/br/region/cw/CentralWest.js +1 -1
- package/dist/org/br/region/se/SouthEast.js +1 -1
- package/dist/org/country/region/department/city/CityService.d.ts +2 -2
- package/dist/org/country/region/department/city/CityService.js +2 -1
- package/dist/org/eu/fr/cnes/geipan/geipan/GeipanCaseSummary.d.ts +1 -1
- package/dist/org/eu/fr/cnes/geipan/geipan/GeipanCaseSummaryRR0Mapper.d.ts +4 -4
- package/dist/org/eu/fr/cnes/geipan/geipan/GeipanCaseSummaryRR0Mapper.js +1 -1
- package/dist/org/eu/fr/cnes/geipan/geipan/GeipanCaseToSummaryMapper.d.ts +3 -3
- package/dist/org/eu/fr/cnes/geipan/geipan/GeipanCaseToSummaryMapper.js +1 -1
- package/dist/org/eu/fr/cnes/geipan/geipan/GeipanDatasource.d.ts +3 -3
- package/dist/org/eu/fr/cnes/geipan/geipan/GeipanFileDatasource.d.ts +3 -3
- package/dist/org/eu/fr/cnes/geipan/geipan/GeipanHttpDatasource.d.ts +6 -5
- package/dist/org/eu/fr/cnes/geipan/geipan/GeipanSummaryToCaseMapper.d.ts +3 -3
- package/dist/org/eu/fr/cnes/geipan/geipan/GeipanTestCases.js +1 -1
- package/dist/org/eu/fr/cnes/geipan/geipan/GeipanTestimonial.d.ts +1 -1
- package/dist/org/us/region/fl/Florida.js +1 -1
- package/dist/org/us/region/hi/Hawaii.js +1 -1
- package/dist/org/us/region/in/Indiana.js +1 -1
- package/dist/org/us/region/va/Virginia.js +1 -1
- package/dist/org/us/region/wa/Washington.js +1 -1
- package/dist/org/us/region/wv/WestVirginia.js +1 -1
- package/dist/people/PeopleDirectoryStep.d.ts +4 -4
- package/dist/people/PeopleReplacer.d.ts +3 -3
- package/dist/people/PeopleReplacerFactory.d.ts +2 -2
- package/dist/people/PeopleService.d.ts +3 -4
- package/dist/people/PeopleService.js +3 -14
- package/dist/people/author/AuthorReplaceCommand.d.ts +2 -2
- package/dist/people/witness/WitnessReplacer.d.ts +2 -2
- package/dist/people/witness/WitnessReplacerFactory.d.ts +2 -2
- package/dist/place/GooglePlaceService.d.ts +1 -1
- package/dist/place/GooglePlaceService.js +1 -1
- package/dist/place/Place.d.ts +1 -1
- package/dist/place/Place.js +1 -1
- package/dist/place/PlaceService.d.ts +1 -1
- package/dist/place/PlaceService.js +1 -1
- package/dist/place/index.d.ts +0 -4
- package/dist/place/index.js +0 -4
- package/dist/science/crypto/ufo/enquete/dossier/CaseDirectoryStep.d.ts +5 -5
- package/dist/science/crypto/ufo/enquete/dossier/CaseDirectoryStep.js +1 -1
- package/dist/science/crypto/ufo/enquete/dossier/CaseService.d.ts +3 -3
- package/dist/science/crypto/ufo/enquete/dossier/CaseService.js +2 -2
- package/dist/search/SearchVisitor.d.ts +5 -5
- package/dist/source/Source.d.ts +1 -1
- package/dist/source/SourceFactory.d.ts +4 -4
- package/dist/source/SourceFactory.js +3 -2
- package/dist/source/SourceFileCounter.d.ts +2 -2
- package/dist/source/SourceRegistry.d.ts +2 -2
- package/dist/source/SourceRenderer.d.ts +3 -3
- package/dist/source/SourceRenderer.js +2 -2
- package/dist/source/SourceReplacer.d.ts +3 -3
- package/dist/source/SourceReplacerFactory.d.ts +2 -2
- package/dist/tech/info/soft/proj/impl/lang/CodeReplacer.d.ts +3 -3
- package/dist/tech/info/soft/proj/impl/lang/CodeReplacerFactory.d.ts +2 -2
- package/dist/time/CaseSummaryRenderer.d.ts +1 -1
- package/dist/time/EventRenderer.d.ts +7 -7
- package/dist/time/EventReplacerFactory.d.ts +4 -4
- package/dist/time/SsiTitleReplaceCommand.d.ts +2 -2
- package/dist/time/Time.d.ts +5 -3
- package/dist/time/Time.js +31 -5
- package/dist/time/TimeLinkDefaultHandler.d.ts +10 -9
- package/dist/time/TimeLinkDefaultHandler.js +8 -12
- package/dist/time/TimeService.d.ts +16 -7
- package/dist/time/TimeService.js +16 -22
- package/dist/time/TimeTestUtil.d.ts +16 -0
- package/dist/time/TimeTestUtil.js +29 -0
- package/dist/time/TimeUrlBuilder.d.ts +7 -3
- package/dist/time/TimeUrlBuilder.js +7 -4
- package/dist/time/datasource/AbstractDatasource.d.ts +6 -6
- package/dist/time/datasource/ChronologyReplacer.d.ts +6 -6
- package/dist/time/datasource/ChronologyReplacerFactory.d.ts +2 -2
- package/dist/time/datasource/ChronologyReplacerFactory.js +1 -1
- package/dist/time/datasource/ContextFilter.d.ts +3 -3
- package/dist/time/datasource/CsvFileSource.d.ts +2 -2
- package/dist/time/datasource/CsvMapper.d.ts +5 -5
- package/dist/time/datasource/CsvMapper.js +1 -1
- package/dist/time/datasource/Datasource.d.ts +2 -2
- package/dist/time/datasource/DatasourceTestCase.d.ts +8 -8
- package/dist/time/datasource/DatasourceTestCase.js +18 -16
- package/dist/time/datasource/FileDatasource.d.ts +2 -2
- package/dist/time/datasource/JsonMapper.d.ts +4 -4
- package/dist/time/datasource/TimeContextFilter.d.ts +3 -3
- package/dist/time/datasource/acufo/AcufoCase.d.ts +1 -1
- package/dist/time/datasource/acufo/AcufoDatasource.d.ts +3 -3
- package/dist/time/datasource/baseovnifrance/BaseOvniFranceCaseSummary.d.ts +1 -1
- package/dist/time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryMapper.d.ts +3 -3
- package/dist/time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryMapper.js +1 -1
- package/dist/time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.d.ts +3 -3
- package/dist/time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.js +1 -1
- package/dist/time/datasource/baseovnifrance/BaseOvniFranceDatasource.d.ts +2 -2
- package/dist/time/datasource/baseovnifrance/BaseOvniFranceHttpDatasource.d.ts +6 -6
- package/dist/time/datasource/baseovnifrance/BaseOvniFranceTestCases.js +1 -1
- package/dist/time/datasource/fufora/FuforaCaseSummary.d.ts +1 -1
- package/dist/time/datasource/fufora/FuforaCaseSummaryRR0Mapper.d.ts +3 -3
- package/dist/time/datasource/fufora/FuforaCaseSummaryRR0Mapper.js +1 -1
- package/dist/time/datasource/fufora/FuforaDatasource.d.ts +2 -2
- package/dist/time/datasource/fufora/FuforaHttpDatasource.d.ts +5 -5
- package/dist/time/datasource/fufora/FuforaTestCases.js +1 -1
- package/dist/time/datasource/nuforc/NuforcCaseSummary.d.ts +1 -1
- package/dist/time/datasource/nuforc/NuforcDatasource.d.ts +2 -2
- package/dist/time/datasource/nuforc/NuforcHttpDatasource.d.ts +6 -6
- package/dist/time/datasource/nuforc/NuforcRR0Mapper.d.ts +3 -3
- package/dist/time/datasource/nuforc/NuforcRR0Mapper.js +1 -1
- package/dist/time/datasource/nuforc/NuforcTestCases.js +1 -1
- package/dist/time/datasource/rr0/NamedPlace.d.ts +7 -0
- package/dist/time/datasource/rr0/RR0CaseMapping.d.ts +2 -2
- package/dist/time/datasource/rr0/RR0CaseSummary.d.ts +0 -7
- package/dist/time/datasource/rr0/RR0CaseSummaryMapper.d.ts +3 -3
- package/dist/time/datasource/rr0/RR0FileDatasource.d.ts +5 -5
- package/dist/time/datasource/rr0/RR0HttpDatasource.d.ts +10 -9
- package/dist/time/datasource/rr0/RR0HttpDatasource.js +3 -32
- package/dist/time/datasource/rr0/RR0TestCases.js +1 -1
- package/dist/time/datasource/rr0/index.d.ts +1 -0
- package/dist/time/datasource/rr0/index.js +1 -0
- package/dist/time/datasource/sceau/SceauCaseSummaryRR0Mapper.d.ts +3 -3
- package/dist/time/datasource/sceau/SceauCaseSummaryRR0Mapper.js +1 -1
- package/dist/time/datasource/sceau/SceauDatasource.d.ts +4 -4
- package/dist/time/datasource/sceau/SceauDatasource.js +1 -1
- package/dist/time/datasource/sceau/SceauHttpDatasource.d.ts +5 -5
- package/dist/time/datasource/ufo-search/UfoSearchCase.d.ts +1 -1
- package/dist/time/datasource/ufo-search/UfoSearchCaseRR0Mapper.d.ts +4 -4
- package/dist/time/datasource/ufo-search/UfoSearchCaseRR0Mapper.js +10 -10
- package/dist/time/datasource/ufo-search/UfoSearchDatasource.d.ts +2 -2
- package/dist/time/datasource/ufo-search/UfoSearchFileDatasource.d.ts +3 -3
- package/dist/time/datasource/ufo-search/UfoSearchFileDatasource.js +1 -1
- package/dist/time/datasource/ufo-search/UfoSearchHttpDatasource.d.ts +4 -4
- package/dist/time/datasource/ufo-search/UfoSearchTestCases.js +1 -1
- package/dist/time/datasource/urecat/UrecatCase.d.ts +1 -1
- package/dist/time/datasource/urecat/UrecatHttpDatasource.d.ts +5 -5
- package/dist/time/datasource/urecat/UrecatHttpDatasource.js +1 -1
- package/dist/time/datasource/urecat/UrecatRR0Mapper.d.ts +3 -3
- package/dist/time/datasource/urecat/UrecatRR0Mapper.js +1 -1
- package/dist/time/datasource/urecat/UrecatTestCases.js +1 -1
- package/dist/time/html/TimeElementFactory.d.ts +15 -0
- package/dist/time/{TimeElementFactory.js → html/TimeElementFactory.js} +16 -22
- package/dist/time/html/TimeRenderer.d.ts +18 -0
- package/dist/time/html/TimeRenderer.js +46 -0
- package/dist/time/html/TimeReplacer.d.ts +12 -0
- package/dist/time/{TimeReplacer.js → html/TimeReplacer.js} +0 -3
- package/dist/time/{TimeReplacerFactory.d.ts → html/TimeReplacerFactory.d.ts} +2 -2
- package/dist/time/{TimeReplacerFactory.js → html/TimeReplacerFactory.js} +1 -1
- package/dist/time/html/index.d.ts +4 -0
- package/dist/time/html/index.js +4 -0
- package/dist/time/index.d.ts +3 -8
- package/dist/time/index.js +3 -8
- package/dist/time/{RelativeTimeTextBuilder.d.ts → text/RelativeTimeTextBuilder.d.ts} +2 -2
- package/dist/time/text/RelativeTimeTextBuilder.js +165 -0
- package/dist/time/{TimeTextBuilder.d.ts → text/TimeTextBuilder.d.ts} +2 -2
- package/dist/time/{TimeTextBuilder.js → text/TimeTextBuilder.js} +1 -1
- package/dist/time/text/index.d.ts +2 -0
- package/dist/time/text/index.js +2 -0
- package/dist/value/UnitReplaceCommand.d.ts +2 -2
- package/package.json +12 -11
- package/tsconfig.json +2 -1
- package/dist/place/PlaceLocation.d.ts +0 -26
- package/dist/place/PlaceLocation.js +0 -48
- package/dist/place/PlaceMessages.d.ts +0 -5
- package/dist/place/PlaceMessages_en.d.ts +0 -2
- package/dist/place/PlaceMessages_en.js +0 -4
- package/dist/place/PlaceMessages_fr.d.ts +0 -2
- package/dist/place/PlaceMessages_fr.js +0 -4
- package/dist/time/RelativeTimeTextBuilder.js +0 -166
- package/dist/time/TimeContext.d.ts +0 -59
- package/dist/time/TimeContext.js +0 -267
- package/dist/time/TimeElementFactory.d.ts +0 -15
- package/dist/time/TimeRenderer.d.ts +0 -19
- package/dist/time/TimeRenderer.js +0 -63
- package/dist/time/TimeReplacer.d.ts +0 -24
- /package/dist/{place/PlaceMessages.js → time/datasource/rr0/NamedPlace.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Occupation } from "./Occupation.js";
|
|
2
2
|
import { People } from "./People.js";
|
|
3
|
-
import {
|
|
3
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
4
4
|
import { DirectoryStep, OutputFunc, SsgConfig } from "ssg-api";
|
|
5
5
|
import { PeopleService } from "./PeopleService.js";
|
|
6
6
|
import { CountryCode } from "../org/country/CountryCode.js";
|
|
@@ -14,7 +14,7 @@ export declare class PeopleDirectoryStep extends DirectoryStep {
|
|
|
14
14
|
protected service: PeopleService;
|
|
15
15
|
protected filter: PeopleFilter;
|
|
16
16
|
constructor(name: string, rootDirs: string[], excludedDirs: string[], templateFileName: string, outputFunc: OutputFunc, config: SsgConfig, service: PeopleService, filter?: PeopleFilter);
|
|
17
|
-
protected processDirs(context:
|
|
18
|
-
protected toList(context:
|
|
19
|
-
protected toListItem(context:
|
|
17
|
+
protected processDirs(context: HtmlRR0Context, dirNames: string[]): Promise<void>;
|
|
18
|
+
protected toList(context: HtmlRR0Context, peopleList: People[], pseudoPeopleList: People[], allCountries: Set<CountryCode>, occupations: Set<Occupation>): HTMLUListElement;
|
|
19
|
+
protected toListItem(context: HtmlRR0Context, people: People, pseudoPeopleList: People[], allCountries: Set<CountryCode>, occupations: Set<Occupation>): HTMLLIElement;
|
|
20
20
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PeopleService } from "./PeopleService.js";
|
|
2
2
|
import { DomReplacement } from "../time/DomReplacement.js";
|
|
3
|
-
import {
|
|
4
|
-
export declare class PeopleReplacer implements DomReplacement<
|
|
3
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
4
|
+
export declare class PeopleReplacer implements DomReplacement<HtmlRR0Context> {
|
|
5
5
|
protected service: PeopleService;
|
|
6
6
|
constructor(service: PeopleService);
|
|
7
|
-
replacement(context:
|
|
7
|
+
replacement(context: HtmlRR0Context, element: HTMLElement): Promise<HTMLElement>;
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PeopleReplacer } from "./PeopleReplacer.js";
|
|
2
2
|
import { DomReplacer, ReplacerFactory } from "ssg-api";
|
|
3
3
|
import { PeopleService } from "./PeopleService.js";
|
|
4
|
-
import {
|
|
4
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
5
5
|
/**
|
|
6
6
|
* Creates replacers for people HTML in a given context.
|
|
7
7
|
*/
|
|
@@ -9,6 +9,6 @@ export declare class PeopleReplacerFactory implements ReplacerFactory<DomReplace
|
|
|
9
9
|
protected service: PeopleService;
|
|
10
10
|
protected singleton?: PeopleReplacer;
|
|
11
11
|
constructor(service: PeopleService);
|
|
12
|
-
create(context:
|
|
12
|
+
create(context: HtmlRR0Context): Promise<DomReplacer>;
|
|
13
13
|
protected getInstance(): Promise<PeopleReplacer>;
|
|
14
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { People } from "./People.js";
|
|
2
|
-
import {
|
|
2
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
3
3
|
import { AbstractDataService, AllDataService } from "../data/index.js";
|
|
4
4
|
import { CountryCode } from "../org/index.js";
|
|
5
5
|
import { Occupation } from "./Occupation.js";
|
|
@@ -7,11 +7,10 @@ import { PeopleFactory } from "./PeopleFactory.js";
|
|
|
7
7
|
export declare class PeopleService extends AbstractDataService<People> {
|
|
8
8
|
protected peopleFactory: PeopleFactory;
|
|
9
9
|
readonly cache: Map<string, People>;
|
|
10
|
-
constructor(dataService: AllDataService, peopleFactory: PeopleFactory);
|
|
11
|
-
getFiles(): Promise<string[]>;
|
|
10
|
+
constructor(dataService: AllDataService, peopleFactory: PeopleFactory, files: string[]);
|
|
12
11
|
createFromFullName(fullName: string): People;
|
|
13
12
|
getAll(): Promise<People[]>;
|
|
14
13
|
getFromDirs(dirNames: string[]): Promise<People[]>;
|
|
15
14
|
getFromDir(dirName: string): Promise<People[]>;
|
|
16
|
-
getLink(context:
|
|
15
|
+
getLink(context: HtmlRR0Context, people: People, pseudoPeopleList: People[], allCountries: Set<CountryCode>, occupations: Set<Occupation>, filterOccupations?: Occupation[], content?: string): HTMLElement;
|
|
17
16
|
}
|
|
@@ -3,22 +3,12 @@ import path from "path";
|
|
|
3
3
|
import { AbstractDataFactory, AbstractDataService } from "../data/index.js";
|
|
4
4
|
import { Time } from "../time/Time.js";
|
|
5
5
|
import { Gender } from "@rr0/common";
|
|
6
|
-
import { RR0FileUtil } from "../util/index.js";
|
|
7
|
-
import { glob } from "glob";
|
|
8
6
|
export class PeopleService extends AbstractDataService {
|
|
9
|
-
constructor(dataService, peopleFactory) {
|
|
10
|
-
super(dataService, peopleFactory);
|
|
7
|
+
constructor(dataService, peopleFactory, files) {
|
|
8
|
+
super(dataService, peopleFactory, files);
|
|
11
9
|
this.peopleFactory = peopleFactory;
|
|
12
10
|
this.cache = new Map();
|
|
13
11
|
}
|
|
14
|
-
async getFiles() {
|
|
15
|
-
if (!this.files) {
|
|
16
|
-
const peopleDirs = await glob("people/?/*/");
|
|
17
|
-
const dirsWithPeople = RR0FileUtil.findDirectoriesContaining("people*.json", "out");
|
|
18
|
-
this.files = Array.from(new Set(peopleDirs.concat(dirsWithPeople)));
|
|
19
|
-
}
|
|
20
|
-
return this.files;
|
|
21
|
-
}
|
|
22
12
|
createFromFullName(fullName) {
|
|
23
13
|
var _a;
|
|
24
14
|
let lastName;
|
|
@@ -55,8 +45,7 @@ export class PeopleService extends AbstractDataService {
|
|
|
55
45
|
return created;
|
|
56
46
|
}
|
|
57
47
|
async getAll() {
|
|
58
|
-
|
|
59
|
-
return this.getFromDirs(dirNames);
|
|
48
|
+
return this.getFromDirs(this.files);
|
|
60
49
|
}
|
|
61
50
|
async getFromDirs(dirNames) {
|
|
62
51
|
let peopleList = [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RegexReplacer, SsiEchoVarReplaceCommand } from "ssg-api";
|
|
2
|
-
import {
|
|
2
|
+
import { HtmlRR0Context } from "../../RR0Context.js";
|
|
3
3
|
import { TimeService } from "../../time/TimeService.js";
|
|
4
4
|
/**
|
|
5
5
|
* Replaces "<!--#echo var="author" -->" and "<!--#echo var="copyright" -->"
|
|
@@ -8,5 +8,5 @@ import { TimeService } from "../../time/TimeService.js";
|
|
|
8
8
|
export declare class AuthorReplaceCommand extends SsiEchoVarReplaceCommand {
|
|
9
9
|
protected timeService: TimeService;
|
|
10
10
|
constructor(timeService: TimeService);
|
|
11
|
-
protected createReplacer(context:
|
|
11
|
+
protected createReplacer(context: HtmlRR0Context): Promise<RegexReplacer>;
|
|
12
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HtmlRR0Context } from "../../RR0Context.js";
|
|
2
2
|
export declare class WitnessReplacer {
|
|
3
3
|
protected now: Date;
|
|
4
4
|
private max;
|
|
@@ -8,5 +8,5 @@ export declare class WitnessReplacer {
|
|
|
8
8
|
* @param witnessName The actual name of the witness (even if to be anonymized)
|
|
9
9
|
* @param witnessId The unique id (a number typically) to identify the witness in this case.
|
|
10
10
|
*/
|
|
11
|
-
replacement(context:
|
|
11
|
+
replacement(context: HtmlRR0Context, witnessName: string, witnessId?: string): HTMLElement;
|
|
12
12
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { DomReplacer, ReplacerFactory } from "ssg-api";
|
|
2
2
|
import { WitnessReplacer } from "./WitnessReplacer.js";
|
|
3
|
-
import {
|
|
3
|
+
import { HtmlRR0Context } from "../../RR0Context.js";
|
|
4
4
|
/**
|
|
5
5
|
* Creates replacers for redacted HTML in a given context.
|
|
6
6
|
*/
|
|
7
7
|
export declare class WitnessReplacerFactory implements ReplacerFactory<DomReplacer> {
|
|
8
8
|
protected readonly singleton: WitnessReplacer;
|
|
9
|
-
create(context:
|
|
9
|
+
create(context: HtmlRR0Context): Promise<DomReplacer>;
|
|
10
10
|
protected getInstance(): Promise<WitnessReplacer>;
|
|
11
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Elevation } from "./Place.js";
|
|
2
2
|
import { PlaceService } from "./PlaceService.js";
|
|
3
|
-
import { PlaceLocation } from "
|
|
3
|
+
import { PlaceLocation } from "@rr0/place";
|
|
4
4
|
export declare class GooglePlaceService extends PlaceService {
|
|
5
5
|
protected apiKey: string;
|
|
6
6
|
private readonly client;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client, Status } from "@googlemaps/google-maps-services-js";
|
|
2
2
|
import { PlaceService } from "./PlaceService.js";
|
|
3
|
-
import { PlaceLocation } from "
|
|
3
|
+
import { PlaceLocation } from "@rr0/place";
|
|
4
4
|
export class GooglePlaceService extends PlaceService {
|
|
5
5
|
constructor(rootDir, apiKey) {
|
|
6
6
|
super(rootDir);
|
package/dist/place/Place.d.ts
CHANGED
package/dist/place/Place.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Place } from "./Place.js";
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import { FileUtil } from "ssg-api";
|
|
4
|
-
import { PlaceLocation } from "
|
|
4
|
+
import { PlaceLocation } from "@rr0/place";
|
|
5
5
|
export class PlaceService {
|
|
6
6
|
constructor(rootDir) {
|
|
7
7
|
this.rootDir = rootDir;
|
package/dist/place/index.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
export * from "./GooglePlaceService.js";
|
|
2
2
|
export * from "./Place.js";
|
|
3
|
-
export * from "./PlaceLocation.js";
|
|
4
|
-
export * from "./PlaceMessages.js";
|
|
5
|
-
export * from "./PlaceMessages_en.js";
|
|
6
|
-
export * from "./PlaceMessages_fr.js";
|
|
7
3
|
export * from "./PlaceReplacer.js";
|
|
8
4
|
export * from "./PlaceReplacerFactory.js";
|
|
9
5
|
export * from "./PlaceService.js";
|
package/dist/place/index.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
export * from "./GooglePlaceService.js";
|
|
2
2
|
export * from "./Place.js";
|
|
3
|
-
export * from "./PlaceLocation.js";
|
|
4
|
-
export * from "./PlaceMessages.js";
|
|
5
|
-
export * from "./PlaceMessages_en.js";
|
|
6
|
-
export * from "./PlaceMessages_fr.js";
|
|
7
3
|
export * from "./PlaceReplacer.js";
|
|
8
4
|
export * from "./PlaceReplacerFactory.js";
|
|
9
5
|
export * from "./PlaceService.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DirectoryStep, OutputFunc, SsgConfig } from "ssg-api";
|
|
2
|
-
import {
|
|
2
|
+
import { HtmlRR0Context, RR0Context } from "../../../../../RR0Context.js";
|
|
3
3
|
import { RR0Case } from "./RR0Case.js";
|
|
4
4
|
import { CaseService } from "./CaseService.js";
|
|
5
5
|
/**
|
|
@@ -25,20 +25,20 @@ export declare class CaseDirectoryStep extends DirectoryStep {
|
|
|
25
25
|
* @param context
|
|
26
26
|
* @param cases
|
|
27
27
|
*/
|
|
28
|
-
protected toList(context:
|
|
28
|
+
protected toList(context: HtmlRR0Context, cases: RR0Case[]): HTMLUListElement;
|
|
29
29
|
/**
|
|
30
30
|
* Convert a Case object to an HTML list item.
|
|
31
31
|
*
|
|
32
32
|
* @param context
|
|
33
33
|
* @param dirCase
|
|
34
34
|
*/
|
|
35
|
-
protected toListItem(context:
|
|
36
|
-
protected processDirs(context:
|
|
35
|
+
protected toListItem(context: HtmlRR0Context, dirCase: RR0Case): HTMLLIElement;
|
|
36
|
+
protected processDirs(context: HtmlRR0Context, dirNames: string[]): Promise<void>;
|
|
37
37
|
/**
|
|
38
38
|
* Read case JSON files contents and instantiate them as Case objects.
|
|
39
39
|
*
|
|
40
40
|
* @param context
|
|
41
41
|
* @param dirNames The directories to look for case.json files.
|
|
42
42
|
*/
|
|
43
|
-
protected scan(context:
|
|
43
|
+
protected scan(context: RR0Context, dirNames: string[]): Promise<RR0Case[]>;
|
|
44
44
|
}
|
|
@@ -19,7 +19,7 @@ export class CaseDirectoryStep extends DirectoryStep {
|
|
|
19
19
|
this.outputFunc = outputFunc;
|
|
20
20
|
}
|
|
21
21
|
static async create(outputFunc, config, caseService) {
|
|
22
|
-
const rootDirs =
|
|
22
|
+
const rootDirs = caseService.files;
|
|
23
23
|
return new CaseDirectoryStep(caseService, rootDirs, ["science/crypto/ufo/enquete/dossier/canular"], "science/crypto/ufo/enquete/dossier/index.html", outputFunc, config);
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AbstractDataService, AllDataService } from "../../../../../data/index.js";
|
|
2
2
|
import { RR0Case } from "./RR0Case.js";
|
|
3
|
-
import {
|
|
3
|
+
import { HtmlRR0Context } from "../../../../../RR0Context.js";
|
|
4
4
|
import { TimeElementFactory } from "../../../../../time/index.js";
|
|
5
5
|
import { CaseFactory } from "./CaseFactory.js";
|
|
6
6
|
export declare class CaseService extends AbstractDataService<RR0Case> {
|
|
7
7
|
protected readonly timeElementFactory: TimeElementFactory;
|
|
8
|
-
constructor(dataService: AllDataService, factory: CaseFactory, timeElementFactory: TimeElementFactory);
|
|
9
|
-
getLink(context:
|
|
8
|
+
constructor(dataService: AllDataService, factory: CaseFactory, timeElementFactory: TimeElementFactory, files: string[]);
|
|
9
|
+
getLink(context: HtmlRR0Context, aCase: RR0Case): HTMLElement;
|
|
10
10
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import { AbstractDataService } from "../../../../../data/index.js";
|
|
3
3
|
export class CaseService extends AbstractDataService {
|
|
4
|
-
constructor(dataService, factory, timeElementFactory) {
|
|
5
|
-
super(dataService, factory);
|
|
4
|
+
constructor(dataService, factory, timeElementFactory, files) {
|
|
5
|
+
super(dataService, factory, files);
|
|
6
6
|
this.timeElementFactory = timeElementFactory;
|
|
7
7
|
}
|
|
8
8
|
getLink(context, aCase) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HtmlFileContents } from "ssg-api";
|
|
2
|
-
import {
|
|
2
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
3
3
|
import fs from "fs";
|
|
4
|
-
import { TimeTextBuilder } from "../time/TimeTextBuilder.js";
|
|
4
|
+
import { TimeTextBuilder } from "../time/text/TimeTextBuilder.js";
|
|
5
5
|
import { FileVisitor } from "../RR0ContentStep.js";
|
|
6
6
|
export type PageInfo = {
|
|
7
7
|
title: string;
|
|
@@ -34,11 +34,11 @@ export declare class SearchVisitor implements FileVisitor {
|
|
|
34
34
|
protected readonly contentStream: fs.WriteStream | undefined;
|
|
35
35
|
constructor(config: SearchCommandConfig, timeTextBuilder: TimeTextBuilder);
|
|
36
36
|
contentStepEnd(): Promise<void>;
|
|
37
|
-
visit(context:
|
|
37
|
+
visit(context: HtmlRR0Context): Promise<void>;
|
|
38
38
|
protected handleAlreadyIndexed(title: string, url: string, titleIndexed: PageInfo): void;
|
|
39
39
|
protected getContents(doc: Document): string;
|
|
40
|
-
protected indexContent(context:
|
|
41
|
-
protected indexWords(context:
|
|
40
|
+
protected indexContent(context: HtmlRR0Context, outputFile: HtmlFileContents): void;
|
|
41
|
+
protected indexWords(context: HtmlRR0Context, outputFile: HtmlFileContents): void;
|
|
42
42
|
protected removeTags(div: HTMLDivElement, selector: string): void;
|
|
43
43
|
}
|
|
44
44
|
export {};
|
package/dist/source/Source.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
2
2
|
import { Source } from "./Source.js";
|
|
3
3
|
import { AllDataService } from "../data/AllDataService.js";
|
|
4
4
|
import { HttpSource } from "../time/datasource/HttpSource.js";
|
|
@@ -17,20 +17,20 @@ export declare class SourceFactory {
|
|
|
17
17
|
* @param context
|
|
18
18
|
* @param href The anchor's URL string.
|
|
19
19
|
*/
|
|
20
|
-
create(context:
|
|
20
|
+
create(context: HtmlRR0Context, href: string): Promise<Source>;
|
|
21
21
|
/**
|
|
22
22
|
* Create a Source object from a link referencing an internal page of the site.
|
|
23
23
|
*
|
|
24
24
|
* @param context
|
|
25
25
|
* @param href
|
|
26
26
|
*/
|
|
27
|
-
createInternal(context:
|
|
27
|
+
createInternal(context: HtmlRR0Context, href: string): Promise<Source>;
|
|
28
28
|
/**
|
|
29
29
|
* Create a Source object from a link referencing a page outside the site.
|
|
30
30
|
*
|
|
31
31
|
* @param context
|
|
32
32
|
* @param href
|
|
33
33
|
*/
|
|
34
|
-
createExternal(context:
|
|
34
|
+
createExternal(context: HtmlRR0Context, href: string): Promise<Source>;
|
|
35
35
|
fromPage(href: string, hash?: string): Promise<Source>;
|
|
36
36
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import path from "path";
|
|
2
|
-
import { TimeContext } from "
|
|
2
|
+
import { TimeContext } from "@rr0/time";
|
|
3
3
|
import { FileContents } from "ssg-api";
|
|
4
4
|
import { JSDOM } from "jsdom";
|
|
5
|
+
import { Time } from "../time";
|
|
5
6
|
/**
|
|
6
7
|
* Create Source objects.
|
|
7
8
|
*/
|
|
@@ -64,7 +65,7 @@ export class SourceFactory {
|
|
|
64
65
|
}
|
|
65
66
|
const publication = source.publication;
|
|
66
67
|
if (publication && !publication.time) {
|
|
67
|
-
publication.time =
|
|
68
|
+
publication.time = Time.contextFromFileName(context, href);
|
|
68
69
|
}
|
|
69
70
|
if (hash) {
|
|
70
71
|
source.index = hash;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PerFileCounter } from "../PerFileCounter.js";
|
|
2
|
-
import {
|
|
2
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
3
3
|
/**
|
|
4
4
|
* Count sources per file.
|
|
5
5
|
*/
|
|
6
|
-
export declare class SourceFileCounter extends PerFileCounter<
|
|
6
|
+
export declare class SourceFileCounter extends PerFileCounter<HtmlRR0Context> {
|
|
7
7
|
get value(): string;
|
|
8
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
2
2
|
import { Source } from "./Source.js";
|
|
3
3
|
import { AllDataService } from "../data/index.js";
|
|
4
4
|
import { HttpSource } from "../time/index.js";
|
|
@@ -15,7 +15,7 @@ export declare class SourceRegistry extends SourceFactory {
|
|
|
15
15
|
* @param context
|
|
16
16
|
* @param href The anchor's URL string.
|
|
17
17
|
*/
|
|
18
|
-
createExternal(context:
|
|
18
|
+
createExternal(context: HtmlRR0Context, href: string): Promise<Source>;
|
|
19
19
|
protected get(href: string): Promise<Source>;
|
|
20
20
|
protected register(href: string, source: Source): Promise<void>;
|
|
21
21
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
2
2
|
import { Source } from "./Source.js";
|
|
3
3
|
import { TimeTextBuilder } from "../time/index.js";
|
|
4
4
|
/**
|
|
@@ -7,6 +7,6 @@ import { TimeTextBuilder } from "../time/index.js";
|
|
|
7
7
|
export declare class SourceRenderer {
|
|
8
8
|
readonly timeTextBuilder: TimeTextBuilder;
|
|
9
9
|
constructor(timeTextBuilder: TimeTextBuilder);
|
|
10
|
-
render(context:
|
|
11
|
-
renderContent(context:
|
|
10
|
+
render(context: HtmlRR0Context, source: Source): HTMLElement;
|
|
11
|
+
renderContent(context: HtmlRR0Context, source: Source, container: HTMLElement): void;
|
|
12
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TimeContext } from "
|
|
1
|
+
import { TimeContext } from "@rr0/time";
|
|
2
2
|
/**
|
|
3
3
|
* Render a case summary for a RR0 web page.
|
|
4
4
|
*/
|
|
@@ -59,7 +59,7 @@ export class SourceRenderer {
|
|
|
59
59
|
else {
|
|
60
60
|
sourceContext.time.updateFromStr(timeValue);
|
|
61
61
|
}
|
|
62
|
-
pubItems.push(this.timeTextBuilder.build(sourceContext));
|
|
62
|
+
pubItems.push(this.timeTextBuilder.build(sourceContext, true));
|
|
63
63
|
}
|
|
64
64
|
if (source.index) {
|
|
65
65
|
pubItems.push(source.index.toString());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SourceRenderer } from "./SourceRenderer.js";
|
|
2
|
-
import {
|
|
2
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
3
3
|
import { SourceFactory } from "./SourceFactory.js";
|
|
4
4
|
import { ReferenceGenerator } from "../ReferenceGenerator.js";
|
|
5
5
|
/**
|
|
@@ -12,6 +12,6 @@ export declare class SourceReplacer {
|
|
|
12
12
|
protected readonly factory: SourceFactory;
|
|
13
13
|
protected counter: ReferenceGenerator<any>;
|
|
14
14
|
constructor(renderer: SourceRenderer, factory: SourceFactory, counter: ReferenceGenerator<any>);
|
|
15
|
-
replacement(context:
|
|
16
|
-
protected content(context:
|
|
15
|
+
replacement(context: HtmlRR0Context, original: HTMLElement): Promise<HTMLElement>;
|
|
16
|
+
protected content(context: HtmlRR0Context, original: HTMLElement, container: HTMLElement): Promise<void>;
|
|
17
17
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DomReplacer, ReplacerFactory } from "ssg-api";
|
|
2
|
-
import {
|
|
2
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
3
3
|
import { SourceReplacer } from "./SourceReplacer.js";
|
|
4
4
|
/**
|
|
5
5
|
* Creates replacers for sources HTML in a given context.
|
|
@@ -7,5 +7,5 @@ import { SourceReplacer } from "./SourceReplacer.js";
|
|
|
7
7
|
export declare class SourceReplacerFactory implements ReplacerFactory<DomReplacer> {
|
|
8
8
|
protected replacer: SourceReplacer;
|
|
9
9
|
constructor(replacer: SourceReplacer);
|
|
10
|
-
create(context:
|
|
10
|
+
create(context: HtmlRR0Context): Promise<DomReplacer>;
|
|
11
11
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DomReplacement } from "../../../../../../time/DomReplacement.js";
|
|
2
|
-
import {
|
|
2
|
+
import { HtmlRR0Context } from "../../../../../../RR0Context.js";
|
|
3
3
|
import { CodeParser } from "./CodeParser.js";
|
|
4
|
-
export declare class CodeReplacer implements DomReplacement<
|
|
4
|
+
export declare class CodeReplacer implements DomReplacement<HtmlRR0Context> {
|
|
5
5
|
protected parsers: CodeParser[];
|
|
6
6
|
constructor(parsers: CodeParser[]);
|
|
7
|
-
replacement(context:
|
|
7
|
+
replacement(context: HtmlRR0Context, codeElement: HTMLElement): Promise<HTMLElement>;
|
|
8
8
|
protected removeIndent(lines: string[]): void;
|
|
9
9
|
protected trimEnd(lines: string[]): void;
|
|
10
10
|
protected parse(lines: string[]): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CodeReplacer } from "./CodeReplacer.js";
|
|
2
2
|
import { DomReplacer, ReplacerFactory } from "ssg-api";
|
|
3
|
-
import {
|
|
3
|
+
import { HtmlRR0Context } from "../../../../../../RR0Context.js";
|
|
4
4
|
export declare class CodeReplacerFactory implements ReplacerFactory<DomReplacer> {
|
|
5
5
|
protected readonly replacer: CodeReplacer;
|
|
6
6
|
/**
|
|
@@ -8,5 +8,5 @@ export declare class CodeReplacerFactory implements ReplacerFactory<DomReplacer>
|
|
|
8
8
|
*
|
|
9
9
|
* @param context
|
|
10
10
|
*/
|
|
11
|
-
create(context:
|
|
11
|
+
create(context: HtmlRR0Context): Promise<DomReplacer>;
|
|
12
12
|
}
|
|
@@ -2,7 +2,7 @@ import { RR0CaseSummary } from "./datasource/index.js";
|
|
|
2
2
|
import { EventRenderer } from "./EventRenderer.js";
|
|
3
3
|
import { SourceFactory, SourceRenderer } from "../source/index.js";
|
|
4
4
|
import { NoteRenderer } from "../note/index.js";
|
|
5
|
-
import { TimeElementFactory } from "./TimeElementFactory.js";
|
|
5
|
+
import { TimeElementFactory } from "./html/TimeElementFactory.js";
|
|
6
6
|
/**
|
|
7
7
|
* Render a case summary as HTML.
|
|
8
8
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
2
2
|
import { RR0Data } from "../data/index.js";
|
|
3
3
|
import { Source, SourceFactory, SourceRenderer } from "../source/index.js";
|
|
4
4
|
import { NoteRenderer } from "../note/index.js";
|
|
5
5
|
import { NamedPlace } from "./datasource/index.js";
|
|
6
|
-
import { TimeElementFactory } from "./TimeElementFactory.js";
|
|
6
|
+
import { TimeElementFactory } from "./html/TimeElementFactory.js";
|
|
7
7
|
import { RR0Event } from "../event/index.js";
|
|
8
8
|
/**
|
|
9
9
|
* Render a case summary as HTML.
|
|
@@ -14,9 +14,9 @@ export declare class EventRenderer<E extends RR0Event> {
|
|
|
14
14
|
readonly sourceRenderer: SourceRenderer;
|
|
15
15
|
protected timeElementFactory: TimeElementFactory;
|
|
16
16
|
constructor(noteRenderer: NoteRenderer, sourceFactory: SourceFactory, sourceRenderer: SourceRenderer, timeElementFactory: TimeElementFactory);
|
|
17
|
-
placeElement(context:
|
|
18
|
-
renderEnd(context:
|
|
19
|
-
render(context:
|
|
20
|
-
renderNotes(context:
|
|
21
|
-
renderSources(context:
|
|
17
|
+
placeElement(context: HtmlRR0Context, namedPlace: NamedPlace): HTMLSpanElement;
|
|
18
|
+
renderEnd(context: HtmlRR0Context, event: RR0Data, container: HTMLElement): Promise<void>;
|
|
19
|
+
render(context: HtmlRR0Context, event: E, container: HTMLElement): Promise<void>;
|
|
20
|
+
renderNotes(context: HtmlRR0Context, notes: string[], container: HTMLElement): Promise<void>;
|
|
21
|
+
renderSources(context: HtmlRR0Context, sources: Source[], container: HTMLElement): Promise<void>;
|
|
22
22
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DomReplacer, ReplacerFactory } from "ssg-api";
|
|
2
|
-
import {
|
|
2
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
3
3
|
import { AllDataService } from "../data/index.js";
|
|
4
4
|
import { EventRenderer } from "./EventRenderer.js";
|
|
5
5
|
import { RR0Event } from "../event/index.js";
|
|
@@ -7,8 +7,8 @@ export declare class EventReplacer<D extends RR0Event> {
|
|
|
7
7
|
protected renderer: EventRenderer<D>;
|
|
8
8
|
protected dataService: AllDataService;
|
|
9
9
|
constructor(renderer: EventRenderer<D>, dataService: AllDataService);
|
|
10
|
-
replacement(context:
|
|
11
|
-
protected sourceFromFile(context:
|
|
10
|
+
replacement(context: HtmlRR0Context, original: HTMLElement): Promise<HTMLElement>;
|
|
11
|
+
protected sourceFromFile(context: HtmlRR0Context, container: HTMLElement, href: string): Promise<void>;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Creates replacers for sources HTML in a given context.
|
|
@@ -16,5 +16,5 @@ export declare class EventReplacer<D extends RR0Event> {
|
|
|
16
16
|
export declare class EventReplacerFactory<D extends RR0Event> implements ReplacerFactory<DomReplacer> {
|
|
17
17
|
protected replacer: EventReplacer<D>;
|
|
18
18
|
constructor(replacer: EventReplacer<D>);
|
|
19
|
-
create(context:
|
|
19
|
+
create(context: HtmlRR0Context): Promise<DomReplacer>;
|
|
20
20
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RegexReplacer, SsiEchoVarReplaceCommand, StringContextHandler } from "ssg-api";
|
|
2
|
-
import {
|
|
2
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
3
3
|
/**
|
|
4
4
|
* Replaces the SSI expression "<!--#echo var="title" -->" by the page's <title> content,
|
|
5
5
|
* with a link if there's a <meta name="url"> content.
|
|
@@ -7,5 +7,5 @@ import { HtmlRR0SsgContext } from "../RR0SsgContext.js";
|
|
|
7
7
|
export declare class SsiTitleReplaceCommand extends SsiEchoVarReplaceCommand {
|
|
8
8
|
protected defaultHandlers: StringContextHandler[];
|
|
9
9
|
constructor(defaultHandlers?: StringContextHandler[]);
|
|
10
|
-
protected createReplacer(context:
|
|
10
|
+
protected createReplacer(context: HtmlRR0Context): Promise<RegexReplacer>;
|
|
11
11
|
}
|
package/dist/time/Time.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { TimeTextBuilder } from "./TimeTextBuilder.js";
|
|
2
|
-
import {
|
|
1
|
+
import { TimeTextBuilder } from "./text/TimeTextBuilder.js";
|
|
2
|
+
import { TimeContext } from "@rr0/time";
|
|
3
|
+
import { HtmlRR0Context } from "../RR0Context.js";
|
|
3
4
|
export declare class Time {
|
|
4
5
|
static readonly timePathRegex: RegExp;
|
|
5
6
|
/**
|
|
@@ -11,5 +12,6 @@ export declare class Time {
|
|
|
11
12
|
*/
|
|
12
13
|
static dateFromIso(isoDate: string): Date;
|
|
13
14
|
static parseFileName(fileName: string): RegExpExecArray | null;
|
|
14
|
-
static titleFromFile(context:
|
|
15
|
+
static titleFromFile(context: HtmlRR0Context, fileName: string, timeTextBuilder: TimeTextBuilder): string | undefined;
|
|
16
|
+
static contextFromFileName(context: HtmlRR0Context, fileName?: string): TimeContext | undefined;
|
|
15
17
|
}
|