@treeviz/gedcom-parser 2.0.0 → 2.0.3
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/classes/common.d.ts +118 -0
- package/dist/classes/common.d.ts.map +1 -0
- package/dist/classes/date.d.ts +27 -0
- package/dist/classes/date.d.ts.map +1 -0
- package/dist/classes/fam.d.ts +19 -0
- package/dist/classes/fam.d.ts.map +1 -0
- package/dist/classes/fams.d.ts +16 -0
- package/dist/classes/fams.d.ts.map +1 -0
- package/dist/classes/gedcom.d.ts +148 -0
- package/dist/classes/gedcom.d.ts.map +1 -0
- package/dist/classes/index.d.ts +28 -2
- package/dist/classes/index.d.ts.map +1 -0
- package/dist/classes/index.js +7 -10
- package/dist/classes/indi.d.ts +351 -0
- package/dist/classes/indi.d.ts.map +1 -0
- package/dist/classes/indis.d.ts +55 -0
- package/dist/classes/indis.d.ts.map +1 -0
- package/dist/classes/list.d.ts +55 -0
- package/dist/classes/list.d.ts.map +1 -0
- package/dist/classes/name.d.ts +20 -0
- package/dist/classes/name.d.ts.map +1 -0
- package/dist/classes/note.d.ts +12 -0
- package/dist/classes/note.d.ts.map +1 -0
- package/dist/classes/obje.d.ts +12 -0
- package/dist/classes/obje.d.ts.map +1 -0
- package/dist/classes/objes.d.ts +8 -0
- package/dist/classes/objes.d.ts.map +1 -0
- package/dist/classes/repo.d.ts +11 -0
- package/dist/classes/repo.d.ts.map +1 -0
- package/dist/classes/repos.d.ts +8 -0
- package/dist/classes/repos.d.ts.map +1 -0
- package/dist/classes/sour.d.ts +11 -0
- package/dist/classes/sour.d.ts.map +1 -0
- package/dist/classes/sours.d.ts +8 -0
- package/dist/classes/sours.d.ts.map +1 -0
- package/dist/classes/subm.d.ts +10 -0
- package/dist/classes/subm.d.ts.map +1 -0
- package/dist/classes/subms.d.ts +8 -0
- package/dist/classes/subms.d.ts.map +1 -0
- package/dist/cli/commands/convert.d.ts +3 -0
- package/dist/cli/commands/convert.d.ts.map +1 -0
- package/dist/cli/commands/extract.d.ts +3 -0
- package/dist/cli/commands/extract.d.ts.map +1 -0
- package/dist/cli/commands/find.d.ts +28 -0
- package/dist/cli/commands/find.d.ts.map +1 -0
- package/dist/cli/commands/get.d.ts +22 -0
- package/dist/cli/commands/get.d.ts.map +1 -0
- package/dist/cli/commands/info.d.ts +3 -0
- package/dist/cli/commands/info.d.ts.map +1 -0
- package/dist/cli/commands/merge.d.ts +3 -0
- package/dist/cli/commands/merge.d.ts.map +1 -0
- package/dist/cli/commands/open.d.ts +3 -0
- package/dist/cli/commands/open.d.ts.map +1 -0
- package/dist/cli/commands/relatives.d.ts +3 -0
- package/dist/cli/commands/relatives.d.ts.map +1 -0
- package/dist/cli/commands/select.d.ts +13 -0
- package/dist/cli/commands/select.d.ts.map +1 -0
- package/dist/cli/commands/show.d.ts +9 -0
- package/dist/cli/commands/show.d.ts.map +1 -0
- package/dist/cli/commands/stats.d.ts +8 -0
- package/dist/cli/commands/stats.d.ts.map +1 -0
- package/dist/cli/commands/validate.d.ts +3 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +254 -106
- package/dist/cli/repl.d.ts +17 -0
- package/dist/cli/repl.d.ts.map +1 -0
- package/dist/cli/utils/formatters.d.ts +71 -0
- package/dist/cli/utils/formatters.d.ts.map +1 -0
- package/dist/cli/utils/helpers.d.ts +21 -0
- package/dist/cli/utils/helpers.d.ts.map +1 -0
- package/dist/constants/constants.d.ts +14 -0
- package/dist/constants/constants.d.ts.map +1 -0
- package/dist/constants/filters.d.ts +18 -0
- package/dist/constants/filters.d.ts.map +1 -0
- package/dist/constants/index.d.ts +4 -49
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +6 -9
- package/dist/constants/orders.d.ts +17 -0
- package/dist/constants/orders.d.ts.map +1 -0
- package/dist/factories/cache-factory.d.ts +30 -0
- package/dist/factories/cache-factory.d.ts.map +1 -0
- package/dist/factories/date-locale-factory.d.ts +30 -0
- package/dist/factories/date-locale-factory.d.ts.map +1 -0
- package/dist/factories/i18n-factory.d.ts +40 -0
- package/dist/factories/i18n-factory.d.ts.map +1 -0
- package/dist/factories/index.d.ts +13 -202
- package/dist/factories/index.d.ts.map +1 -0
- package/dist/factories/index.js +6 -9
- package/dist/factories/kinship-factory.d.ts +38 -0
- package/dist/factories/kinship-factory.d.ts.map +1 -0
- package/dist/factories/place-parser-provider.d.ts +32 -0
- package/dist/factories/place-parser-provider.d.ts.map +1 -0
- package/dist/factories/place-translator-provider.d.ts +32 -0
- package/dist/factories/place-translator-provider.d.ts.map +1 -0
- package/dist/index.d.ts +28 -9
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -10
- package/dist/interfaces/common.d.ts +43 -0
- package/dist/interfaces/common.d.ts.map +1 -0
- package/dist/interfaces/fam.d.ts +11 -0
- package/dist/interfaces/fam.d.ts.map +1 -0
- package/dist/interfaces/fams.d.ts +9 -0
- package/dist/interfaces/fams.d.ts.map +1 -0
- package/dist/interfaces/gedcom.d.ts +30 -0
- package/dist/interfaces/gedcom.d.ts.map +1 -0
- package/dist/interfaces/index.d.ts +12 -2
- package/dist/interfaces/index.d.ts.map +1 -0
- package/dist/interfaces/indi.d.ts +114 -0
- package/dist/interfaces/indi.d.ts.map +1 -0
- package/dist/interfaces/indis.d.ts +31 -0
- package/dist/interfaces/indis.d.ts.map +1 -0
- package/dist/interfaces/list.d.ts +52 -0
- package/dist/interfaces/list.d.ts.map +1 -0
- package/dist/interfaces/obje.d.ts +7 -0
- package/dist/interfaces/obje.d.ts.map +1 -0
- package/dist/interfaces/repo.d.ts +7 -0
- package/dist/interfaces/repo.d.ts.map +1 -0
- package/dist/interfaces/sour.d.ts +7 -0
- package/dist/interfaces/sour.d.ts.map +1 -0
- package/dist/interfaces/subm.d.ts +6 -0
- package/dist/interfaces/subm.d.ts.map +1 -0
- package/dist/kinship-translator/index.d.ts +11 -146
- package/dist/kinship-translator/index.d.ts.map +1 -0
- package/dist/kinship-translator/index.js +6 -9
- package/dist/kinship-translator/kinship-translator.basic.d.ts +30 -0
- package/dist/kinship-translator/kinship-translator.basic.d.ts.map +1 -0
- package/dist/kinship-translator/kinship-translator.d.ts +26 -0
- package/dist/kinship-translator/kinship-translator.d.ts.map +1 -0
- package/dist/kinship-translator/kinship-translator.de.d.ts +18 -0
- package/dist/kinship-translator/kinship-translator.de.d.ts.map +1 -0
- package/dist/kinship-translator/kinship-translator.en.d.ts +18 -0
- package/dist/kinship-translator/kinship-translator.en.d.ts.map +1 -0
- package/dist/kinship-translator/kinship-translator.es.d.ts +18 -0
- package/dist/kinship-translator/kinship-translator.es.d.ts.map +1 -0
- package/dist/kinship-translator/kinship-translator.fr.d.ts +18 -0
- package/dist/kinship-translator/kinship-translator.fr.d.ts.map +1 -0
- package/dist/kinship-translator/kinship-translator.hu.d.ts +19 -0
- package/dist/kinship-translator/kinship-translator.hu.d.ts.map +1 -0
- package/dist/kinship-translator/kinship-translator.interface.d.ts +19 -0
- package/dist/kinship-translator/kinship-translator.interface.d.ts.map +1 -0
- package/dist/kinship-translator/patterns.de.d.ts +2 -0
- package/dist/kinship-translator/patterns.de.d.ts.map +1 -0
- package/dist/kinship-translator/patterns.en.d.ts +2 -0
- package/dist/kinship-translator/patterns.en.d.ts.map +1 -0
- package/dist/kinship-translator/patterns.es.d.ts +2 -0
- package/dist/kinship-translator/patterns.es.d.ts.map +1 -0
- package/dist/kinship-translator/patterns.fr.d.ts +2 -0
- package/dist/kinship-translator/patterns.fr.d.ts.map +1 -0
- package/dist/kinship-translator/patterns.hu.d.ts +6 -0
- package/dist/kinship-translator/patterns.hu.d.ts.map +1 -0
- package/dist/kinship-translator/translators.d.ts +6 -0
- package/dist/kinship-translator/translators.d.ts.map +1 -0
- package/dist/kinship-translator/types.d.ts +9 -0
- package/dist/kinship-translator/types.d.ts.map +1 -0
- package/dist/structures/address.d.ts +14 -0
- package/dist/structures/address.d.ts.map +1 -0
- package/dist/structures/association.d.ts +13 -0
- package/dist/structures/association.d.ts.map +1 -0
- package/dist/structures/change-date.d.ts +8 -0
- package/dist/structures/change-date.d.ts.map +1 -0
- package/dist/structures/creation-date.d.ts +7 -0
- package/dist/structures/creation-date.d.ts.map +1 -0
- package/dist/structures/date.d.ts +9 -0
- package/dist/structures/date.d.ts.map +1 -0
- package/dist/structures/event-detail-structure.d.ts +25 -0
- package/dist/structures/event-detail-structure.d.ts.map +1 -0
- package/dist/structures/family.d.ts +34 -0
- package/dist/structures/family.d.ts.map +1 -0
- package/dist/structures/gedcom.d.ts +59 -0
- package/dist/structures/gedcom.d.ts.map +1 -0
- package/dist/structures/index.d.ts +27 -25
- package/dist/structures/index.d.ts.map +1 -0
- package/dist/structures/individual-event-detail-structure.d.ts +9 -0
- package/dist/structures/individual-event-detail-structure.d.ts.map +1 -0
- package/dist/structures/individual-event-structure.d.ts +83 -0
- package/dist/structures/individual-event-structure.d.ts.map +1 -0
- package/dist/structures/individual.d.ts +40 -0
- package/dist/structures/individual.d.ts.map +1 -0
- package/dist/structures/lds-ordinance-detail.d.ts +17 -0
- package/dist/structures/lds-ordinance-detail.d.ts.map +1 -0
- package/dist/structures/lds-spouse-sealing.d.ts +7 -0
- package/dist/structures/lds-spouse-sealing.d.ts.map +1 -0
- package/dist/structures/marriage-date.d.ts +11 -0
- package/dist/structures/marriage-date.d.ts.map +1 -0
- package/dist/structures/multimedia-link.d.ts +16 -0
- package/dist/structures/multimedia-link.d.ts.map +1 -0
- package/dist/structures/non-event.d.ts +12 -0
- package/dist/structures/non-event.d.ts.map +1 -0
- package/dist/structures/note.d.ts +16 -0
- package/dist/structures/note.d.ts.map +1 -0
- package/dist/structures/personal-name-pieces.d.ts +11 -0
- package/dist/structures/personal-name-pieces.d.ts.map +1 -0
- package/dist/structures/personal-name.d.ts +16 -0
- package/dist/structures/personal-name.d.ts.map +1 -0
- package/dist/structures/place.d.ts +20 -0
- package/dist/structures/place.d.ts.map +1 -0
- package/dist/structures/repository.d.ts +6 -0
- package/dist/structures/repository.d.ts.map +1 -0
- package/dist/structures/source-citation.d.ts +27 -0
- package/dist/structures/source-citation.d.ts.map +1 -0
- package/dist/structures/source-repository-citation.d.ts +13 -0
- package/dist/structures/source-repository-citation.d.ts.map +1 -0
- package/dist/structures/source.d.ts +28 -0
- package/dist/structures/source.d.ts.map +1 -0
- package/dist/types/ancestry-media.d.ts +65 -0
- package/dist/types/ancestry-media.d.ts.map +1 -0
- package/dist/types/index.d.ts +8 -69
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/settings.d.ts +12 -0
- package/dist/types/settings.d.ts.map +1 -0
- package/dist/types/types.d.ts +229 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/utils/cache.d.ts +26 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/common-creator.d.ts +13 -0
- package/dist/utils/common-creator.d.ts.map +1 -0
- package/dist/utils/date-formatter.d.ts +35 -0
- package/dist/utils/date-formatter.d.ts.map +1 -0
- package/dist/utils/get-all-prop.d.ts +4 -0
- package/dist/utils/get-all-prop.d.ts.map +1 -0
- package/dist/utils/get-family-with.d.ts +5 -0
- package/dist/utils/get-family-with.d.ts.map +1 -0
- package/dist/utils/get-places.d.ts +21 -0
- package/dist/utils/get-places.d.ts.map +1 -0
- package/dist/utils/get-product-details.d.ts +4 -0
- package/dist/utils/get-product-details.d.ts.map +1 -0
- package/dist/utils/get-raw-size.d.ts +2 -0
- package/dist/utils/get-raw-size.d.ts.map +1 -0
- package/dist/utils/index.d.ts +19 -19
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +7 -10
- package/dist/utils/logger.d.ts +3 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/media-utils.d.ts +13 -0
- package/dist/utils/media-utils.d.ts.map +1 -0
- package/dist/utils/name-formatter.d.ts +10 -0
- package/dist/utils/name-formatter.d.ts.map +1 -0
- package/dist/utils/nested-group.d.ts +4 -0
- package/dist/utils/nested-group.d.ts.map +1 -0
- package/dist/utils/ordinalize.d.ts +3 -0
- package/dist/utils/ordinalize.d.ts.map +1 -0
- package/dist/utils/parser.d.ts +22 -0
- package/dist/utils/parser.d.ts.map +1 -0
- package/dist/utils/place-parser.d.ts +16 -0
- package/dist/utils/place-parser.d.ts.map +1 -0
- package/dist/utils/place-translator.d.ts +6 -0
- package/dist/utils/place-translator.d.ts.map +1 -0
- package/dist/utils/place-types.d.ts +27 -0
- package/dist/utils/place-types.d.ts.map +1 -0
- package/dist/utils/range.d.ts +19 -0
- package/dist/utils/range.d.ts.map +1 -0
- package/package.json +12 -2
- package/dist/index-CzYZg44D.d.ts +0 -1705
- package/dist/place-parser-CJ3EbFmb.d.ts +0 -40
- package/dist/place-translator-Ci5rEY6p.d.ts +0 -90
package/dist/factories/index.js
CHANGED
|
@@ -3233,7 +3233,7 @@ var Indi = class extends Common {
|
|
|
3233
3233
|
title,
|
|
3234
3234
|
url,
|
|
3235
3235
|
contentType: type,
|
|
3236
|
-
downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName()
|
|
3236
|
+
downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName()?.replaceAll(" ", "-") || ""}_${(title || key.replaceAll("@", "").toString()).replaceAll(" ", "-")}`
|
|
3237
3237
|
};
|
|
3238
3238
|
}
|
|
3239
3239
|
})
|
|
@@ -3262,7 +3262,7 @@ var Indi = class extends Common {
|
|
|
3262
3262
|
const deathObj = this.get("DEAT.OBJE")?.toList().copy();
|
|
3263
3263
|
objeList?.merge(birthObj).merge(deathObj);
|
|
3264
3264
|
(this.get("FAMS")?.toValueList().values() ?? []).concat(this.get("FAMC")?.toValueList().values() ?? []).forEach((fam) => {
|
|
3265
|
-
objeList
|
|
3265
|
+
objeList?.merge(fam?.get("MARR.OBJE"));
|
|
3266
3266
|
});
|
|
3267
3267
|
objeList?.forEach((o, index) => {
|
|
3268
3268
|
if (!o) {
|
|
@@ -3288,7 +3288,7 @@ var Indi = class extends Common {
|
|
|
3288
3288
|
title,
|
|
3289
3289
|
url,
|
|
3290
3290
|
contentType: type,
|
|
3291
|
-
downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName()
|
|
3291
|
+
downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName()?.replaceAll(" ", "-") || ""}_${(title || key.replaceAll("@", "").toString()).replaceAll(" ", "-")}`
|
|
3292
3292
|
};
|
|
3293
3293
|
}
|
|
3294
3294
|
});
|
|
@@ -3386,14 +3386,11 @@ var Indi = class extends Common {
|
|
|
3386
3386
|
const sourList = this.get("SOUR")?.toList().copy();
|
|
3387
3387
|
sourList?.forEach((sour) => {
|
|
3388
3388
|
const sourObje = sour?.get("OBJE")?.toList();
|
|
3389
|
-
objeList
|
|
3389
|
+
objeList?.merge(sourObje);
|
|
3390
3390
|
});
|
|
3391
|
-
if (!objeList || objeList.length === 0) {
|
|
3392
|
-
return void 0;
|
|
3393
|
-
}
|
|
3394
3391
|
const rfn = this.get("RFN")?.toValue();
|
|
3395
3392
|
const geniId = rfn?.replace(/^geni:/, "") || "unknown";
|
|
3396
|
-
objeList
|
|
3393
|
+
objeList?.forEach((obje, index) => {
|
|
3397
3394
|
if (!obje) {
|
|
3398
3395
|
return;
|
|
3399
3396
|
}
|
|
@@ -3432,7 +3429,7 @@ var Indi = class extends Common {
|
|
|
3432
3429
|
return list;
|
|
3433
3430
|
}
|
|
3434
3431
|
const rfn = this.get("RFN")?.toValue();
|
|
3435
|
-
const treeId = rfn || "universal";
|
|
3432
|
+
const treeId = this.getUniversalTreeId() || rfn || "universal";
|
|
3436
3433
|
objeList.forEach((obje, index) => {
|
|
3437
3434
|
if (!obje) {
|
|
3438
3435
|
return;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { IndiType } from "../classes/indi";
|
|
2
|
+
import type { Language } from "../kinship-translator/types";
|
|
3
|
+
import type { IndiKey } from "../types/types";
|
|
4
|
+
/**
|
|
5
|
+
* Kinship translator class constructor type
|
|
6
|
+
*/
|
|
7
|
+
export type KinshipTranslatorConstructor = new (person1: IndiType, person2?: IndiType | IndiKey, lang?: Language, entirePath?: boolean, displayName?: "none" | "givenname" | "surname" | "all") => {
|
|
8
|
+
translate: <T extends boolean | undefined>(showMainPerson: boolean) => (T extends false | undefined ? string : Array<{
|
|
9
|
+
id?: IndiKey;
|
|
10
|
+
gen: number;
|
|
11
|
+
relative?: string;
|
|
12
|
+
absolute?: string;
|
|
13
|
+
}>) | undefined;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Set a custom kinship translator class.
|
|
17
|
+
* This allows the main project or external projects to override the kinship translation logic.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* import { setKinshipTranslatorClass } from '@treeviz/gedcom-parser/factories/kinship-factory';
|
|
22
|
+
* import MyCustomKinshipTranslator from './my-custom-kinship-translator';
|
|
23
|
+
*
|
|
24
|
+
* setKinshipTranslatorClass(MyCustomKinshipTranslator);
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const setKinshipTranslatorClass: (TranslatorClass: KinshipTranslatorConstructor) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Get the current kinship translator class.
|
|
30
|
+
* Used internally by the Indi class.
|
|
31
|
+
*/
|
|
32
|
+
export declare const getKinshipTranslatorClass: () => KinshipTranslatorConstructor;
|
|
33
|
+
/**
|
|
34
|
+
* Reset to the default built-in kinship translator.
|
|
35
|
+
* Useful for testing or when switching between projects.
|
|
36
|
+
*/
|
|
37
|
+
export declare const resetKinshipTranslatorClass: () => void;
|
|
38
|
+
//# sourceMappingURL=kinship-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinship-factory.d.ts","sourceRoot":"","sources":["../../src/factories/kinship-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,KAC1C,OAAO,EAAE,QAAQ,EACjB,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,EAC5B,IAAI,CAAC,EAAE,QAAQ,EACf,UAAU,CAAC,EAAE,OAAO,EACpB,WAAW,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,KAAK,KAClD;IACJ,SAAS,EAAE,CAAC,CAAC,SAAS,OAAO,GAAG,SAAS,EACxC,cAAc,EAAE,OAAO,KAErB,CAAC,CAAC,SAAS,KAAK,GAAG,SAAS,GAC1B,MAAM,GACN,KAAK,CAAC;QACN,EAAE,CAAC,EAAE,OAAO,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC,CAAC,GACJ,SAAS,CAAC;CACb,CAAC;AAQF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB,GACrC,iBAAiB,4BAA4B,SAG7C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,QAAO,4BAE5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,YAGvC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Place Parser Provider Factory
|
|
3
|
+
* Allows consumer applications to provide their own place parsing implementation
|
|
4
|
+
*/
|
|
5
|
+
import type { PlaceParts } from "../utils/place-parser";
|
|
6
|
+
/**
|
|
7
|
+
* Place parser function type
|
|
8
|
+
* Receives a place string or array and returns parsed place parts
|
|
9
|
+
*/
|
|
10
|
+
export type PlaceParserFunction = (place: string | (string | undefined)[]) => PlaceParts[];
|
|
11
|
+
/**
|
|
12
|
+
* Set the place parser provider
|
|
13
|
+
* @param parser - Custom place parser function
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { setPlaceParserProvider } from '@treeviz/gedcom-parser';
|
|
17
|
+
* import { getPlaceParts } from './my-place-parser';
|
|
18
|
+
*
|
|
19
|
+
* setPlaceParserProvider(getPlaceParts);
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const setPlaceParserProvider: (parser: PlaceParserFunction | undefined) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Get the current place parser provider
|
|
25
|
+
* @returns The current place parser function or undefined
|
|
26
|
+
*/
|
|
27
|
+
export declare const getPlaceParserProvider: () => PlaceParserFunction | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Reset the place parser provider to default (undefined)
|
|
30
|
+
*/
|
|
31
|
+
export declare const resetPlaceParserProvider: () => void;
|
|
32
|
+
//# sourceMappingURL=place-parser-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"place-parser-provider.d.ts","sourceRoot":"","sources":["../../src/factories/place-parser-provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,CACjC,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,KAClC,UAAU,EAAE,CAAC;AAOlB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,GAClC,QAAQ,mBAAmB,GAAG,SAAS,KACrC,IAEF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAO,mBAAmB,GAAG,SAE/D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,QAAO,IAE3C,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Place Translator Provider Factory
|
|
3
|
+
* Allows consumer applications to provide their own place translation implementation
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Place translator function type
|
|
7
|
+
* Receives place string or array and optional parameters, returns translated string
|
|
8
|
+
* Compatible with main app's placeTranslator signature
|
|
9
|
+
*/
|
|
10
|
+
export type PlaceTranslatorFunction = (place?: string | string[], level?: number, toReversed?: boolean) => string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Set the place translator provider
|
|
13
|
+
* @param translator - Custom place translator function
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { setPlaceTranslatorProvider } from '@treeviz/gedcom-parser';
|
|
17
|
+
* import { placeTranslator } from './my-place-translator';
|
|
18
|
+
*
|
|
19
|
+
* setPlaceTranslatorProvider(placeTranslator);
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const setPlaceTranslatorProvider: (translator: PlaceTranslatorFunction | undefined) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Get the current place translator provider
|
|
25
|
+
* @returns The current place translator function or undefined
|
|
26
|
+
*/
|
|
27
|
+
export declare const getPlaceTranslatorProvider: () => PlaceTranslatorFunction | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Reset the place translator provider to default (undefined)
|
|
30
|
+
*/
|
|
31
|
+
export declare const resetPlaceTranslatorProvider: () => void;
|
|
32
|
+
//# sourceMappingURL=place-translator-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"place-translator-provider.d.ts","sourceRoot":"","sources":["../../src/factories/place-translator-provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACrC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EACzB,KAAK,CAAC,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,OAAO,KAChB,MAAM,GAAG,SAAS,CAAC;AAOxB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B,GACtC,YAAY,uBAAuB,GAAG,SAAS,KAC7C,IAEF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,QACpC,uBAAuB,GACvB,SAEF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,QAAO,IAE/C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
5
|
-
export {
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
|
|
1
|
+
export * from "./utils/parser";
|
|
2
|
+
export { default } from "./utils/parser";
|
|
3
|
+
export { default as GedcomTree } from "./utils/parser";
|
|
4
|
+
export * from "./factories";
|
|
5
|
+
export type { ICacheManager } from "./utils/cache";
|
|
6
|
+
export * from "./kinship-translator";
|
|
7
|
+
export * from "./types";
|
|
8
|
+
export * from "./constants";
|
|
9
|
+
export * from "./classes";
|
|
10
|
+
export * from "./interfaces";
|
|
11
|
+
export * from "./structures";
|
|
12
|
+
export type { PrimitiveRange, Range as RangeType, SplitResult, } from "./utils/range";
|
|
13
|
+
export { fromTuple, inRange, isIntersectedRange, splitRange, parseRangeBounds, isRangeContained, extractSplitPoints, generateSplitRanges, splitOverlappingRanges, findMatchingRangeForSplitRange, extractSeparationYears, } from "./utils/range";
|
|
14
|
+
export * from "./utils/cache";
|
|
15
|
+
export * from "./utils/common-creator";
|
|
16
|
+
export * from "./utils/date-formatter";
|
|
17
|
+
export * from "./utils/get-all-prop";
|
|
18
|
+
export * from "./utils/get-family-with";
|
|
19
|
+
export * from "./utils/get-places";
|
|
20
|
+
export * from "./utils/get-product-details";
|
|
21
|
+
export { getRawSize } from "./utils/get-raw-size";
|
|
22
|
+
export * from "./utils/logger";
|
|
23
|
+
export * from "./utils/name-formatter";
|
|
24
|
+
export * from "./utils/nested-group";
|
|
25
|
+
export * from "./utils/ordinalize";
|
|
26
|
+
export * from "./utils/place-parser";
|
|
27
|
+
export * from "./utils/place-translator";
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGvD,cAAc,aAAa,CAAC;AAG5B,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnD,cAAc,sBAAsB,CAAC;AAGrC,cAAc,SAAS,CAAC;AAGxB,cAAc,aAAa,CAAC;AAG5B,cAAc,WAAW,CAAC;AAG1B,cAAc,cAAc,CAAC;AAG7B,cAAc,cAAc,CAAC;AAI7B,YAAY,EACX,cAAc,EACd,KAAK,IAAI,SAAS,EAClB,WAAW,GACX,MAAM,eAAe,CAAC;AAGvB,OAAO,EACN,SAAS,EACT,OAAO,EACP,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,8BAA8B,EAC9B,sBAAsB,GACtB,MAAM,eAAe,CAAC;AAGvB,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2325,7 +2325,7 @@ var Indi = class extends Common {
|
|
|
2325
2325
|
title,
|
|
2326
2326
|
url,
|
|
2327
2327
|
contentType: type,
|
|
2328
|
-
downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName()
|
|
2328
|
+
downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName()?.replaceAll(" ", "-") || ""}_${(title || key.replaceAll("@", "").toString()).replaceAll(" ", "-")}`
|
|
2329
2329
|
};
|
|
2330
2330
|
}
|
|
2331
2331
|
})
|
|
@@ -2354,7 +2354,7 @@ var Indi = class extends Common {
|
|
|
2354
2354
|
const deathObj = this.get("DEAT.OBJE")?.toList().copy();
|
|
2355
2355
|
objeList?.merge(birthObj).merge(deathObj);
|
|
2356
2356
|
(this.get("FAMS")?.toValueList().values() ?? []).concat(this.get("FAMC")?.toValueList().values() ?? []).forEach((fam) => {
|
|
2357
|
-
objeList
|
|
2357
|
+
objeList?.merge(fam?.get("MARR.OBJE"));
|
|
2358
2358
|
});
|
|
2359
2359
|
objeList?.forEach((o, index) => {
|
|
2360
2360
|
if (!o) {
|
|
@@ -2380,7 +2380,7 @@ var Indi = class extends Common {
|
|
|
2380
2380
|
title,
|
|
2381
2381
|
url,
|
|
2382
2382
|
contentType: type,
|
|
2383
|
-
downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName()
|
|
2383
|
+
downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName()?.replaceAll(" ", "-") || ""}_${(title || key.replaceAll("@", "").toString()).replaceAll(" ", "-")}`
|
|
2384
2384
|
};
|
|
2385
2385
|
}
|
|
2386
2386
|
});
|
|
@@ -2478,14 +2478,11 @@ var Indi = class extends Common {
|
|
|
2478
2478
|
const sourList = this.get("SOUR")?.toList().copy();
|
|
2479
2479
|
sourList?.forEach((sour) => {
|
|
2480
2480
|
const sourObje = sour?.get("OBJE")?.toList();
|
|
2481
|
-
objeList
|
|
2481
|
+
objeList?.merge(sourObje);
|
|
2482
2482
|
});
|
|
2483
|
-
if (!objeList || objeList.length === 0) {
|
|
2484
|
-
return void 0;
|
|
2485
|
-
}
|
|
2486
2483
|
const rfn = this.get("RFN")?.toValue();
|
|
2487
2484
|
const geniId = rfn?.replace(/^geni:/, "") || "unknown";
|
|
2488
|
-
objeList
|
|
2485
|
+
objeList?.forEach((obje, index) => {
|
|
2489
2486
|
if (!obje) {
|
|
2490
2487
|
return;
|
|
2491
2488
|
}
|
|
@@ -2524,7 +2521,7 @@ var Indi = class extends Common {
|
|
|
2524
2521
|
return list;
|
|
2525
2522
|
}
|
|
2526
2523
|
const rfn = this.get("RFN")?.toValue();
|
|
2527
|
-
const treeId = rfn || "universal";
|
|
2524
|
+
const treeId = this.getUniversalTreeId() || rfn || "universal";
|
|
2528
2525
|
objeList.forEach((obje, index) => {
|
|
2529
2526
|
if (!obje) {
|
|
2530
2527
|
return;
|
|
@@ -6654,7 +6651,7 @@ var Families = class _Families extends List {
|
|
|
6654
6651
|
// package.json
|
|
6655
6652
|
var package_default = {
|
|
6656
6653
|
name: "@treeviz/gedcom-parser",
|
|
6657
|
-
version: "2.0.
|
|
6654
|
+
version: "2.0.3"};
|
|
6658
6655
|
|
|
6659
6656
|
// src/utils/get-product-details.ts
|
|
6660
6657
|
var isDevelopment = () => {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Common } from "../classes/common";
|
|
2
|
+
import type { List } from "../classes/list";
|
|
3
|
+
import type { IdType, MultiTag } from "../types/types";
|
|
4
|
+
export type CommonWild = Partial<Record<`_${string}`, Common>>;
|
|
5
|
+
export interface ConvertOptions {
|
|
6
|
+
original?: boolean;
|
|
7
|
+
obje?: {
|
|
8
|
+
standardize?: boolean;
|
|
9
|
+
override?: boolean;
|
|
10
|
+
namespace?: string | number;
|
|
11
|
+
};
|
|
12
|
+
super?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface ICommon<P = string, I extends IdType = IdType> {
|
|
15
|
+
set value(value: P | undefined);
|
|
16
|
+
get value(): P | undefined;
|
|
17
|
+
isListable: boolean;
|
|
18
|
+
refType?: MultiTag;
|
|
19
|
+
id?: I;
|
|
20
|
+
removeValue: () => void;
|
|
21
|
+
set: <T extends Common | List = Common | List>(name: MultiTag, value: T) => T | undefined;
|
|
22
|
+
get: <T extends Common | List = Common | List>(name: MultiTag) => T | undefined;
|
|
23
|
+
remove: (name: MultiTag) => void;
|
|
24
|
+
getIf: <T extends Common | List = Common | List>(name: MultiTag, condition: string, name2: MultiTag) => T | undefined;
|
|
25
|
+
assign: <T extends Common | List = Common | List>(name: MultiTag, value: T) => T | undefined;
|
|
26
|
+
toString: () => string;
|
|
27
|
+
toValue: () => P | undefined;
|
|
28
|
+
exportValue: () => P | undefined;
|
|
29
|
+
toProp: (tag: MultiTag) => Common<P, I> | undefined;
|
|
30
|
+
toList: () => List;
|
|
31
|
+
toValueList: () => List;
|
|
32
|
+
toJson: (tag?: MultiTag, options?: ConvertOptions) => string;
|
|
33
|
+
toObject: (tag?: MultiTag, options?: ConvertOptions) => Record<string, string | undefined | ({
|
|
34
|
+
value?: string;
|
|
35
|
+
} & Record<string, unknown>) | Array<string | undefined | ({
|
|
36
|
+
value?: string;
|
|
37
|
+
} & Record<string, unknown>)>>;
|
|
38
|
+
toGedcomLines: (tag?: MultiTag, level?: number, options?: ConvertOptions) => string[];
|
|
39
|
+
toGedcom: (tag?: MultiTag, level?: number, options?: ConvertOptions) => string;
|
|
40
|
+
fromGedcom: (value: string) => void;
|
|
41
|
+
}
|
|
42
|
+
export default ICommon;
|
|
43
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/interfaces/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAM,gBAAgB,C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AC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Common } from "../classes/common";
|
|
2
|
+
import type { Individuals } from "../classes/indis";
|
|
3
|
+
import type { FamKey } from "../types/types";
|
|
4
|
+
interface IFam extends Common<string, FamKey> {
|
|
5
|
+
_IS_ORPHAN_FAMILY?: Common<"Y" | "N">;
|
|
6
|
+
getChildren: () => Individuals;
|
|
7
|
+
getHusband: () => Individuals;
|
|
8
|
+
getWife: () => Individuals;
|
|
9
|
+
}
|
|
10
|
+
export default IFam;
|
|
11
|
+
//# sourceMappingURL=fam.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fam.d.ts","sourceRoot":"","sources":["../../src/interfaces/fam.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAE3C,UAAU,IAAK,SAAQ,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAC5C,iBAAiB,CAAC,EAAE,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;IAEtC,WAAW,EAAE,MAAM,WAAW,CAAC;IAE/B,UAAU,EAAE,MAAM,WAAW,CAAC;IAE9B,OAAO,EAAE,MAAM,WAAW,CAAC;CAC3B;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FamType } from "../classes/fam";
|
|
2
|
+
import type { Individuals } from "../classes/indis";
|
|
3
|
+
import type { FamKey } from "../types/types";
|
|
4
|
+
import type { IList } from "./list";
|
|
5
|
+
export interface IFamilies extends IList<FamKey, FamType> {
|
|
6
|
+
getParents: () => Individuals;
|
|
7
|
+
getChildren: () => Individuals;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=fams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fams.d.ts","sourceRoot":"","sources":["../../src/interfaces/fams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,QAAQ,CAAC;AAElC,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC;IACxD,UAAU,EAAE,MAAM,WAAW,CAAC;IAE9B,WAAW,EAAE,MAAM,WAAW,CAAC;CAC/B"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Common } from "../classes/common";
|
|
2
|
+
import type { FamType } from "../classes/fam";
|
|
3
|
+
import type { Families } from "../classes/fams";
|
|
4
|
+
import type { IndiType } from "../classes/indi";
|
|
5
|
+
import type { Individuals } from "../classes/indis";
|
|
6
|
+
import type { ObjeType } from "../classes/obje";
|
|
7
|
+
import type { Objects } from "../classes/objes";
|
|
8
|
+
import type { RepoType } from "../classes/repo";
|
|
9
|
+
import type { Repositories } from "../classes/repos";
|
|
10
|
+
import type { SourType } from "../classes/sour";
|
|
11
|
+
import type { Sources } from "../classes/sours";
|
|
12
|
+
import type { SubmType } from "../classes/subm";
|
|
13
|
+
import type { Submitters } from "../classes/subms";
|
|
14
|
+
import type { FamKey, IndiKey, ObjeKey, RepoKey, SourKey, SubmKey } from "../types/types";
|
|
15
|
+
interface IGedcom extends Common {
|
|
16
|
+
indis: () => Individuals | undefined;
|
|
17
|
+
fams: () => Families | undefined;
|
|
18
|
+
objes: () => Objects | undefined;
|
|
19
|
+
sours: () => Sources | undefined;
|
|
20
|
+
repos: () => Repositories | undefined;
|
|
21
|
+
subms: () => Submitters | undefined;
|
|
22
|
+
indi: (index: number | IndiKey) => IndiType | undefined;
|
|
23
|
+
fam: (index: number | FamKey) => FamType | undefined;
|
|
24
|
+
obje: (index: number | ObjeKey) => ObjeType | undefined;
|
|
25
|
+
sour: (index: number | SourKey) => SourType | undefined;
|
|
26
|
+
repo: (index: number | RepoKey) => RepoType | undefined;
|
|
27
|
+
subm: (index: number | SubmKey) => SubmType | undefined;
|
|
28
|
+
}
|
|
29
|
+
export default IGedcom;
|
|
30
|
+
//# sourceMappingURL=gedcom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gedcom.d.ts","sourceRoot":"","sources":["../../src/interfaces/gedcom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EACX,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,MAAM,gBAAgB,CAAC;AAExB,UAAU,OAAQ,SAAQ,MAAM;IAC/B,KAAK,EAAE,MAAM,WAAW,GAAG,SAAS,CAAC;IAErC,IAAI,EAAE,MAAM,QAAQ,GAAG,SAAS,CAAC;IAEjC,KAAK,EAAE,MAAM,OAAO,GAAG,SAAS,CAAC;IAEjC,KAAK,EAAE,MAAM,OAAO,GAAG,SAAS,CAAC;IAEjC,KAAK,EAAE,MAAM,YAAY,GAAG,SAAS,CAAC;IAEtC,KAAK,EAAE,MAAM,UAAU,GAAG,SAAS,CAAC;IAEpC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,KAAK,QAAQ,GAAG,SAAS,CAAC;IAExD,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,OAAO,GAAG,SAAS,CAAC;IAErD,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,KAAK,QAAQ,GAAG,SAAS,CAAC;IAExD,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,KAAK,QAAQ,GAAG,SAAS,CAAC;IAExD,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,KAAK,QAAQ,GAAG,SAAS,CAAC;IAExD,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,KAAK,QAAQ,GAAG,SAAS,CAAC;CACxD;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
1
|
+
export type { default as ICommon } from "./common";
|
|
2
|
+
export type { default as IFam } from "./fam";
|
|
3
|
+
export type { IFamilies } from "./fams";
|
|
4
|
+
export type { default as IGedCom } from "./gedcom";
|
|
5
|
+
export type { default as IIndi, GeneratedIndiMethods } from "./indi";
|
|
6
|
+
export type { IIndividuals } from "./indis";
|
|
7
|
+
export type { IList } from "./list";
|
|
8
|
+
export type { default as IObje } from "./obje";
|
|
9
|
+
export type { default as IRepo } from "./repo";
|
|
10
|
+
export type { default as ISour } from "./sour";
|
|
11
|
+
export type { default as ISubm } from "./subm";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7C,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AACrE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,YAAY,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACpC,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { Common } from "../classes/common";
|
|
2
|
+
import type { Families } from "../classes/fams";
|
|
3
|
+
import type { IndiType } from "../classes/indi";
|
|
4
|
+
import type { Individuals } from "../classes/indis";
|
|
5
|
+
import type { List } from "../classes/list";
|
|
6
|
+
import type { IndiKey } from "../types/types";
|
|
7
|
+
export type GeneratorKey = `${"2nd" | "3rd" | `${4 | 5 | 6 | 7 | 8 | 9}th`}`;
|
|
8
|
+
export type GeneratorType = "Cousins" | "GreatGrandParents" | "GreatGrandChildren";
|
|
9
|
+
export type GeneratedIndiMethods = Record<`get${GeneratorKey}${GeneratorType}`, () => Individuals>;
|
|
10
|
+
export type MediaList = Record<string, {
|
|
11
|
+
isPrimary?: boolean;
|
|
12
|
+
key: string;
|
|
13
|
+
id: string;
|
|
14
|
+
imgId: string;
|
|
15
|
+
tree: string;
|
|
16
|
+
person: IndiKey;
|
|
17
|
+
title: string;
|
|
18
|
+
url: string;
|
|
19
|
+
contentType: string;
|
|
20
|
+
downloadName: string;
|
|
21
|
+
}>;
|
|
22
|
+
interface IIndi extends Common<string, IndiKey> {
|
|
23
|
+
getBirthDate: (showDays?: boolean, shortNote?: boolean, showNote?: boolean) => string | undefined;
|
|
24
|
+
getDeathDate: (showDays?: boolean, shortNote?: boolean, showNote?: boolean) => string | undefined;
|
|
25
|
+
getBirthPlace: () => string | undefined;
|
|
26
|
+
getDeathPlace: () => string | undefined;
|
|
27
|
+
isParentOf: (indi?: IndiKey | IndiType) => IndiKey | boolean;
|
|
28
|
+
isChildOf: (indi?: IndiKey | IndiType) => IndiKey | boolean;
|
|
29
|
+
isSiblingOf: (indi?: IndiKey | IndiType) => IndiKey | boolean;
|
|
30
|
+
isSpouseOf: (indi?: IndiKey | IndiType) => IndiKey | boolean;
|
|
31
|
+
isParentInLawOf: (indi?: IndiKey | IndiType) => IndiKey | boolean;
|
|
32
|
+
isChildInLawOf: (indi?: IndiKey | IndiType) => IndiKey | boolean;
|
|
33
|
+
isSiblingInLawOf: (indi?: IndiKey | IndiType) => IndiKey | boolean;
|
|
34
|
+
toFamilies: (list?: List) => Families;
|
|
35
|
+
getAscendants: () => Individuals;
|
|
36
|
+
getDescendants: () => Individuals;
|
|
37
|
+
getRelativesOnLevel: () => Individuals;
|
|
38
|
+
getRelativesOnDegree: () => Individuals;
|
|
39
|
+
getAllDescendants: () => Individuals;
|
|
40
|
+
getAllAscendants: () => Individuals;
|
|
41
|
+
getSiblings: () => Individuals;
|
|
42
|
+
getBrothers: () => Individuals;
|
|
43
|
+
getSisters: () => Individuals;
|
|
44
|
+
getChildren: () => Individuals;
|
|
45
|
+
getAdoptedChildren: () => Individuals;
|
|
46
|
+
getBirthChildren: () => Individuals;
|
|
47
|
+
getFosterChildren: () => Individuals;
|
|
48
|
+
getSealingChildren: () => Individuals;
|
|
49
|
+
getStepChildren: () => Individuals;
|
|
50
|
+
getSons: () => Individuals;
|
|
51
|
+
getAdoptedSons: () => Individuals;
|
|
52
|
+
getBirthSons: () => Individuals;
|
|
53
|
+
getFosterSons: () => Individuals;
|
|
54
|
+
getSealingSons: () => Individuals;
|
|
55
|
+
getStepSons: () => Individuals;
|
|
56
|
+
getDaughters: () => Individuals;
|
|
57
|
+
getAdoptedDaughters: () => Individuals;
|
|
58
|
+
getBirthDaughters: () => Individuals;
|
|
59
|
+
getFosterDaughters: () => Individuals;
|
|
60
|
+
getSealingDaughters: () => Individuals;
|
|
61
|
+
getStepDaughters: () => Individuals;
|
|
62
|
+
getParents: () => Individuals;
|
|
63
|
+
getAdoptedParents: () => Individuals;
|
|
64
|
+
getBirthParents: () => Individuals;
|
|
65
|
+
getFosterParents: () => Individuals;
|
|
66
|
+
getSealingParents: () => Individuals;
|
|
67
|
+
getStepParents: () => Individuals;
|
|
68
|
+
getFathers: () => Individuals;
|
|
69
|
+
getAdoptedFathers: () => Individuals;
|
|
70
|
+
getBirthFathers: () => Individuals;
|
|
71
|
+
getFosterFathers: () => Individuals;
|
|
72
|
+
getSealingFathers: () => Individuals;
|
|
73
|
+
getStepFathers: () => Individuals;
|
|
74
|
+
getMothers: () => Individuals;
|
|
75
|
+
getAdoptedMothers: () => Individuals;
|
|
76
|
+
getBirthMothers: () => Individuals;
|
|
77
|
+
getFosterMothers: () => Individuals;
|
|
78
|
+
getSealingMothers: () => Individuals;
|
|
79
|
+
getStepMothers: () => Individuals;
|
|
80
|
+
getSpouses: () => Individuals;
|
|
81
|
+
getCoParents: () => Individuals;
|
|
82
|
+
getWives: () => Individuals;
|
|
83
|
+
getHusbands: () => Individuals;
|
|
84
|
+
getCousins: () => Individuals;
|
|
85
|
+
getGrandParents: () => Individuals;
|
|
86
|
+
getGrandFathers: () => Individuals;
|
|
87
|
+
getGrandMothers: () => Individuals;
|
|
88
|
+
getGrandChildren: () => Individuals;
|
|
89
|
+
getGrandSons: () => Individuals;
|
|
90
|
+
getGrandDaughters: () => Individuals;
|
|
91
|
+
getGreatGrandParents: () => Individuals;
|
|
92
|
+
getGreatGrandFathers: () => Individuals;
|
|
93
|
+
getGreatGrandMothers: () => Individuals;
|
|
94
|
+
getGreatGrandChildren: () => Individuals;
|
|
95
|
+
getGreatGrandSons: () => Individuals;
|
|
96
|
+
getGreatGrandDaughters: () => Individuals;
|
|
97
|
+
getNiblings: () => Individuals;
|
|
98
|
+
getNieces: () => Individuals;
|
|
99
|
+
getNephews: () => Individuals;
|
|
100
|
+
getAuncles: () => Individuals;
|
|
101
|
+
getAunts: () => Individuals;
|
|
102
|
+
getUncles: () => Individuals;
|
|
103
|
+
getParentsInLaw: () => Individuals;
|
|
104
|
+
getFathersInLaw: () => Individuals;
|
|
105
|
+
getMothersInLaw: () => Individuals;
|
|
106
|
+
getChildrenInLaw: () => Individuals;
|
|
107
|
+
getSonsInLaw: () => Individuals;
|
|
108
|
+
getDaughtersInLaw: () => Individuals;
|
|
109
|
+
getSiblingsInLaw: () => Individuals;
|
|
110
|
+
getBrothersInLaw: () => Individuals;
|
|
111
|
+
getSistersInLaw: () => Individuals;
|
|
112
|
+
}
|
|
113
|
+
export default IIndi;
|
|
114
|
+
//# sourceMappingURL=indi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indi.d.ts","sourceRoot":"","sources":["../../src/interfaces/indi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAA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M,WAAW,CAAC;IAEpC,gBAAgB,EAAE,MAAM,WAAW,CAAC;IAEpC,eAAe,EAAE,MAAM,WAAW,CAAC;CACnC;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { IndiType } from "../classes/indi";
|
|
2
|
+
import type { Individuals } from "../classes/indis";
|
|
3
|
+
import type { List } from "../classes/list";
|
|
4
|
+
import type { FamKey, IndiKey } from "../types/types";
|
|
5
|
+
import type { IList } from "./list";
|
|
6
|
+
export interface IIndividuals extends IList<IndiKey, IndiType> {
|
|
7
|
+
toName: () => List;
|
|
8
|
+
isParentOf: (indi?: IndiKey | IndiType, every?: boolean) => IndiKey | boolean;
|
|
9
|
+
isChildOf: (indi?: IndiKey | IndiType, every?: boolean) => IndiKey | boolean;
|
|
10
|
+
isSiblingOf: (indi?: IndiKey | IndiType, every?: boolean) => IndiKey | boolean;
|
|
11
|
+
isSpouseOf: (indi?: IndiKey | IndiType, every?: boolean) => IndiKey | boolean;
|
|
12
|
+
isParentInLawOf: (indi?: IndiKey | IndiType, every?: boolean) => IndiKey | boolean;
|
|
13
|
+
isChildInLawOf: (indi?: IndiKey | IndiType, every?: boolean) => IndiKey | boolean;
|
|
14
|
+
splitByFamily: (type: "Spouses" | "Children") => {
|
|
15
|
+
items: Record<FamKey, Individuals | undefined>;
|
|
16
|
+
lengthOfFamily: number;
|
|
17
|
+
lengthOfIndividuals: number;
|
|
18
|
+
};
|
|
19
|
+
getAscendants: () => Individuals;
|
|
20
|
+
getDescendants: () => Individuals;
|
|
21
|
+
getAllAscendants: () => Individuals;
|
|
22
|
+
getAllDescendants: () => Individuals;
|
|
23
|
+
getRelativesOnLevel: () => Individuals;
|
|
24
|
+
getRelativesOnDegree: () => Individuals;
|
|
25
|
+
getSpouses: () => Individuals;
|
|
26
|
+
getCoParents: () => Individuals;
|
|
27
|
+
getSiblings: () => Individuals;
|
|
28
|
+
getChildren: () => Individuals;
|
|
29
|
+
getParents: () => Individu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