@treeviz/gedcom-parser 1.0.3 → 1.0.5
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 +8 -4
- package/dist/classes/common.d.ts.map +1 -1
- package/dist/classes/common.js +7 -0
- package/dist/classes/date.d.ts +1 -1
- package/dist/classes/date.d.ts.map +1 -1
- package/dist/classes/date.js +1 -1
- package/dist/classes/fam.d.ts +3 -3
- package/dist/classes/fam.d.ts.map +1 -1
- package/dist/classes/fams.d.ts +3 -3
- package/dist/classes/fams.d.ts.map +1 -1
- package/dist/classes/gedcom.d.ts +35 -14
- package/dist/classes/gedcom.d.ts.map +1 -1
- package/dist/classes/gedcom.js +312 -0
- package/dist/classes/indis.d.ts +5 -4
- package/dist/classes/indis.d.ts.map +1 -1
- package/dist/classes/indis.js +1 -1
- package/dist/classes/list.d.ts +4 -4
- package/dist/classes/list.d.ts.map +1 -1
- package/dist/classes/name.d.ts +1 -1
- package/dist/classes/name.d.ts.map +1 -1
- package/dist/classes/note.d.ts +1 -1
- package/dist/classes/note.d.ts.map +1 -1
- package/dist/classes/obje.d.ts +3 -3
- package/dist/classes/obje.d.ts.map +1 -1
- package/dist/classes/objes.d.ts +2 -2
- package/dist/classes/objes.d.ts.map +1 -1
- package/dist/classes/repo.d.ts +3 -3
- package/dist/classes/repo.d.ts.map +1 -1
- package/dist/classes/repos.d.ts +2 -2
- package/dist/classes/repos.d.ts.map +1 -1
- package/dist/classes/sour.d.ts +3 -3
- package/dist/classes/sour.d.ts.map +1 -1
- package/dist/classes/sours.d.ts +2 -2
- package/dist/classes/sours.d.ts.map +1 -1
- package/dist/classes/subm.d.ts +2 -2
- package/dist/classes/subm.d.ts.map +1 -1
- package/dist/classes/subms.d.ts +2 -2
- package/dist/classes/subms.d.ts.map +1 -1
- package/dist/cli/commands/convert.d.ts +1 -1
- package/dist/cli/commands/convert.d.ts.map +1 -1
- package/dist/cli/commands/extract.d.ts +1 -1
- package/dist/cli/commands/extract.d.ts.map +1 -1
- package/dist/cli/commands/extract.js +1 -1
- package/dist/cli/commands/find.d.ts +1 -1
- package/dist/cli/commands/find.d.ts.map +1 -1
- package/dist/cli/commands/info.d.ts +1 -1
- package/dist/cli/commands/info.d.ts.map +1 -1
- package/dist/cli/commands/merge.d.ts +1 -1
- package/dist/cli/commands/merge.d.ts.map +1 -1
- package/dist/cli/commands/merge.js +40 -72
- package/dist/cli/commands/relatives.d.ts +1 -1
- package/dist/cli/commands/relatives.d.ts.map +1 -1
- package/dist/cli/commands/show.d.ts +1 -1
- package/dist/cli/commands/show.d.ts.map +1 -1
- package/dist/cli/commands/stats.d.ts +1 -1
- package/dist/cli/commands/stats.d.ts.map +1 -1
- package/dist/cli/commands/stats.js +1 -1
- package/dist/cli/commands/validate.d.ts +1 -1
- package/dist/cli/commands/validate.d.ts.map +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/constants/filters.d.ts +2 -1
- package/dist/constants/filters.d.ts.map +1 -1
- package/dist/constants/filters.js +1 -1
- package/dist/constants/orders.d.ts +2 -2
- package/dist/constants/orders.d.ts.map +1 -1
- package/dist/init.d.ts +91 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/init.js +94 -0
- package/dist/interfaces/common.d.ts +3 -3
- package/dist/interfaces/common.d.ts.map +1 -1
- package/dist/interfaces/fam.d.ts +3 -3
- package/dist/interfaces/fam.d.ts.map +1 -1
- package/dist/interfaces/fams.d.ts +4 -4
- package/dist/interfaces/fams.d.ts.map +1 -1
- package/dist/interfaces/gedcom.d.ts +14 -14
- package/dist/interfaces/gedcom.d.ts.map +1 -1
- package/dist/interfaces/indi.d.ts +6 -6
- package/dist/interfaces/indi.d.ts.map +1 -1
- package/dist/interfaces/indis.d.ts +5 -5
- package/dist/interfaces/indis.d.ts.map +1 -1
- package/dist/interfaces/list.d.ts +4 -4
- package/dist/interfaces/list.d.ts.map +1 -1
- package/dist/interfaces/obje.d.ts +2 -2
- package/dist/interfaces/obje.d.ts.map +1 -1
- package/dist/interfaces/repo.d.ts +2 -2
- package/dist/interfaces/repo.d.ts.map +1 -1
- package/dist/interfaces/sour.d.ts +2 -2
- package/dist/interfaces/sour.d.ts.map +1 -1
- package/dist/interfaces/subm.d.ts +2 -2
- package/dist/interfaces/subm.d.ts.map +1 -1
- package/dist/kinship-translator/kinship-translator.basic.d.ts +1 -1
- package/dist/kinship-translator/kinship-translator.basic.d.ts.map +1 -1
- package/dist/kinship-translator/kinship-translator.d.ts +2 -2
- package/dist/kinship-translator/kinship-translator.d.ts.map +1 -1
- package/dist/kinship-translator/patterns.hu.d.ts +2 -2
- package/dist/kinship-translator/patterns.hu.d.ts.map +1 -1
- package/dist/structures/address.d.ts +1 -1
- package/dist/structures/address.d.ts.map +1 -1
- package/dist/structures/association.d.ts +1 -1
- package/dist/structures/association.d.ts.map +1 -1
- package/dist/structures/change-date.d.ts +1 -1
- package/dist/structures/change-date.d.ts.map +1 -1
- package/dist/structures/creation-date.d.ts +1 -1
- package/dist/structures/creation-date.d.ts.map +1 -1
- package/dist/structures/date.d.ts +2 -2
- package/dist/structures/date.d.ts.map +1 -1
- package/dist/structures/family.d.ts +1 -1
- package/dist/structures/family.d.ts.map +1 -1
- package/dist/structures/gedcom.d.ts +2 -3
- package/dist/structures/gedcom.d.ts.map +1 -1
- package/dist/structures/index.d.ts +24 -24
- package/dist/structures/index.d.ts.map +1 -1
- package/dist/structures/individual-event-detail-structure.d.ts +1 -1
- package/dist/structures/individual-event-detail-structure.d.ts.map +1 -1
- package/dist/structures/individual-event-structure.d.ts +1 -1
- package/dist/structures/individual-event-structure.d.ts.map +1 -1
- package/dist/structures/individual.d.ts +3 -3
- package/dist/structures/individual.d.ts.map +1 -1
- package/dist/structures/lds-ordinance-detail.d.ts +1 -1
- package/dist/structures/lds-ordinance-detail.d.ts.map +1 -1
- package/dist/structures/lds-spouse-sealing.d.ts +1 -1
- package/dist/structures/lds-spouse-sealing.d.ts.map +1 -1
- package/dist/structures/marriage-date.d.ts +1 -1
- package/dist/structures/marriage-date.d.ts.map +1 -1
- package/dist/structures/multimedia-link.d.ts +1 -1
- package/dist/structures/multimedia-link.d.ts.map +1 -1
- package/dist/structures/non-event.d.ts +1 -1
- package/dist/structures/non-event.d.ts.map +1 -1
- package/dist/structures/note.d.ts +2 -2
- package/dist/structures/note.d.ts.map +1 -1
- package/dist/structures/personal-name-pieces.d.ts +1 -1
- package/dist/structures/personal-name-pieces.d.ts.map +1 -1
- package/dist/structures/personal-name.d.ts +1 -1
- package/dist/structures/personal-name.d.ts.map +1 -1
- package/dist/structures/place.d.ts +1 -1
- package/dist/structures/place.d.ts.map +1 -1
- package/dist/structures/repository.d.ts +1 -1
- package/dist/structures/repository.d.ts.map +1 -1
- package/dist/structures/source-citation.d.ts +1 -1
- package/dist/structures/source-citation.d.ts.map +1 -1
- package/dist/structures/source-repository-citation.d.ts +1 -1
- package/dist/structures/source-repository-citation.d.ts.map +1 -1
- package/dist/structures/source.d.ts +1 -1
- package/dist/structures/source.d.ts.map +1 -1
- package/dist/types/types.d.ts +2 -2
- package/dist/types/types.d.ts.map +1 -1
- package/dist/utils/cache.d.ts +3 -3
- package/dist/utils/cache.d.ts.map +1 -1
- package/dist/utils/date-formatter.d.ts +2 -2
- package/dist/utils/date-formatter.d.ts.map +1 -1
- package/dist/utils/get-family-with.d.ts +3 -3
- package/dist/utils/get-family-with.d.ts.map +1 -1
- package/dist/utils/name-formatter.d.ts +1 -1
- package/dist/utils/name-formatter.d.ts.map +1 -1
- package/dist/utils/parser.d.ts +1 -1
- package/dist/utils/parser.d.ts.map +1 -1
- package/dist/utils/parser.js +0 -1
- package/package.json +1 -1
package/dist/classes/common.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { ListTag } from "../types/types";
|
|
3
|
-
import { type ConvertOptions } from "../interfaces/common";
|
|
1
|
+
import type { ConvertOptions } from "../interfaces/common";
|
|
4
2
|
import type ICommon from "../interfaces/common";
|
|
5
|
-
import {
|
|
3
|
+
import type { IdType, MultiTag, ListTag } from "../types/types";
|
|
4
|
+
import type { GedComType } from "./gedcom";
|
|
6
5
|
import { List } from "./list";
|
|
7
6
|
export declare class Common<T = string, I extends IdType = IdType> implements ICommon<T, I> {
|
|
8
7
|
protected _gedcom?: GedComType;
|
|
@@ -27,6 +26,11 @@ export declare class Common<T = string, I extends IdType = IdType> implements IC
|
|
|
27
26
|
get id(): I | undefined;
|
|
28
27
|
set value(value: T | undefined);
|
|
29
28
|
get value(): T | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Set the gedcom reference for this object
|
|
31
|
+
* @param gedcom - The GedComType to set as the gedcom reference
|
|
32
|
+
*/
|
|
33
|
+
setGedcom(gedcom: GedComType): void;
|
|
30
34
|
get originalValue(): T;
|
|
31
35
|
get ref(): Common<T, I> | undefined;
|
|
32
36
|
get main(): Common<string, IdType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/classes/common.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/classes/common.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAEhD,OAAO,KAAK,EAAM,MAAM,EAAE,QAAQ,EAAW,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE7E,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAI9B,qBAAa,MAAM,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,YAAW,OAAO,CAC5E,CAAC,EACD,CAAC,CACD;IACA,SAAS,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC;IAC/B,SAAS,CAAC,M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GAAG,KAAK,CACxD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,WAEtC,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAChB,OACrB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,IAAI,MAAM,WAElD,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,QAAQ,MAAM,KAAG,MAAM,IAAI,MAE/C,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,MAAM,EAAE,KAAK,CAAC,MAqBhD,CAAC"}
|
package/dist/classes/common.js
CHANGED
|
@@ -58,6 +58,13 @@ export class Common {
|
|
|
58
58
|
get value() {
|
|
59
59
|
return this._value;
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Set the gedcom reference for this object
|
|
63
|
+
* @param gedcom - The GedComType to set as the gedcom reference
|
|
64
|
+
*/
|
|
65
|
+
setGedcom(gedcom) {
|
|
66
|
+
this._gedcom = gedcom;
|
|
67
|
+
}
|
|
61
68
|
// avoid to override
|
|
62
69
|
get originalValue() {
|
|
63
70
|
return this._value;
|
package/dist/classes/date.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { IdType, MultiTag } from "../types/types";
|
|
|
2
2
|
import type { Range } from "../utils/range";
|
|
3
3
|
import { Common } from "./common";
|
|
4
4
|
import type { ProxyOriginal } from "./common";
|
|
5
|
-
import {
|
|
5
|
+
import type { GedComType } from "./gedcom";
|
|
6
6
|
import type { List } from "./list";
|
|
7
7
|
export declare class CommonDate extends Common<string> {
|
|
8
8
|
private _date?;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/classes/date.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/classes/date.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAA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KACb,aAAa,CAAC,UAAU,CAI1B,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,QAAQ,OAAO,KAAG,KAAK,IAAI,UAOvD,CAAC"}
|
package/dist/classes/date.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { format, isValid, parse } from "date-fns";
|
|
2
|
+
import { getDateLocale } from "../factories/index.js";
|
|
2
3
|
import { ACCEPTED_DATE_FORMATS } from "../utils/date-formatter.js";
|
|
3
4
|
import { inRange } from "../utils/range.js";
|
|
4
5
|
import { Common, createCommon, createProxy } from "./common.js";
|
|
5
|
-
import { getDateLocale } from "../factories/index.js";
|
|
6
6
|
const LONG_NOTES = {
|
|
7
7
|
"Abt.": "About",
|
|
8
8
|
"Bef.": "Before",
|
package/dist/classes/fam.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type IFamilyStructure from "../structures/family";
|
|
2
|
-
import { type FamKey } from "../types/types";
|
|
3
1
|
import type IFam from "../interfaces/fam";
|
|
2
|
+
import type IFamilyStructure from "../structures/family";
|
|
3
|
+
import type { FamKey } from "../types/types";
|
|
4
4
|
import { Common } from "./common";
|
|
5
5
|
import type { ProxyOriginal } from "./common";
|
|
6
6
|
import { Families } from "./fams";
|
|
7
|
-
import {
|
|
7
|
+
import type { GedComType } from "./gedcom";
|
|
8
8
|
import { Individuals } from "./indis";
|
|
9
9
|
export declare class Fam extends Common<string, FamKey> implements IFam {
|
|
10
10
|
private getFamilyMembers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fam.d.ts","sourceRoot":"","sources":["../../src/classes/fam.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"fam.d.ts","sourceRoot":"","sources":["../../src/classes/fam.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,gBAAgB,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAW,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,MAAM,EAAe,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,qBAAa,GAAI,SAAQ,MAAM,CAAC,MAAM,EAAE,MAAM,CAAE,YAAW,IAAI;IAC9D,OAAO,CAAC,gBAAgB;IAexB,WAAW;IAIX,UAAU;IAIV,OAAO;IAIP,UAAU,IAAI,WAAW;IAIzB,MAAM;CAMN;AAED,MAAM,MAAM,OAAO,GAAG,GAAG,GAAG,gBAAgB,CAAC;AAC7C,eAAO,MAAM,SAAS,GACrB,QAAQ,UAAU,EAClB,IAAI,MAAM,EACV,OAAO,MAAM,EACb,SAAS,MAAM,KACb,aAAa,CAAC,OAAO,CAIvB,CAAC"}
|
package/dist/classes/fams.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { IFamilies } from "../interfaces/fams";
|
|
2
|
+
import type { FamKey, Filter, Order, FilterIterator, OrderIterator } from "../types/types";
|
|
3
|
+
import type { FamType } from "./fam";
|
|
4
4
|
import { Individuals } from "./indis";
|
|
5
5
|
import { List } from "./list";
|
|
6
6
|
export declare class Families extends List<FamKey, FamType> implements IFamilies {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fams.d.ts","sourceRoot":"","sources":["../../src/classes/fams.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"fams.d.ts","sourceRoot":"","sources":["../../src/classes/fams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAGzF,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,qBAAa,QAAS,SAAQ,IAAI,CAAC,MAAM,EAAE,OAAO,CAAE,YAAW,SAAS;IACvE,IAAI,IAAI,QAAQ;IAIhB,MAAM,CAAC,IAAI,EAAE,OAAO,GAAG,QAAQ;IAI/B,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,QAAQ;IAInE,IAAI,CACH,OAAO,EAAE,MAAM,GAAG,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,GAC/C,OAAO,GAAG,SAAS;IAItB,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,QAAQ;IAIjE,UAAU,IAAI,WAAW;IAYzB,WAAW,IAAI,WAAW;IAY1B,MAAM;CAGN"}
|
package/dist/classes/gedcom.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ConvertOptions } from "../interfaces/common";
|
|
2
2
|
import type IGedcom from "../interfaces/gedcom";
|
|
3
3
|
import type IGedComStructure from "../structures/gedcom";
|
|
4
|
-
import {
|
|
4
|
+
import type { IdType, IndiKey, FamKey, ObjeKey, SourKey, RepoKey, SubmKey, MultiTag } from "../types/types";
|
|
5
5
|
import { Common } from "./common";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import type { FamType } from "./fam";
|
|
7
|
+
import type { Families } from "./fams";
|
|
8
|
+
import type { IndiType } from "./indi";
|
|
9
|
+
import type { Individuals } from "./indis";
|
|
10
10
|
import { List } from "./list";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
11
|
+
import type { ObjeType } from "./obje";
|
|
12
|
+
import type { Objects } from "./objes";
|
|
13
|
+
import type { RepoType } from "./repo";
|
|
14
|
+
import type { Repositories } from "./repos";
|
|
15
|
+
import type { SourType } from "./sour";
|
|
16
|
+
import type { Sources } from "./sours";
|
|
17
|
+
import type { SubmType } from "./subm";
|
|
18
|
+
import type { Submitters } from "./subms";
|
|
19
19
|
export declare class GedCom extends Common implements IGedcom {
|
|
20
20
|
tagMembers: Record<string, {
|
|
21
21
|
tag: Common;
|
|
@@ -115,4 +115,25 @@ export declare const validateGedcomContent: (content?: string) => {
|
|
|
115
115
|
valid: boolean;
|
|
116
116
|
error?: string;
|
|
117
117
|
};
|
|
118
|
+
/**
|
|
119
|
+
* Merge two GEDCOM objects into a single result using a configurable matching strategy
|
|
120
|
+
* @param targetGedcom - The base GEDCOM (kept as the primary source)
|
|
121
|
+
* @param sourceGedcom - The GEDCOM to be merged into the target
|
|
122
|
+
* @param strategy - Matching strategy: "id" (default) to match by individual ID, or any MultiTag (e.g., "NAME", "BIRT.DATE") to match by that field's value
|
|
123
|
+
* @returns The merged GedComType with all individuals and families combined
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* // Merge by ID (individuals with same ID are considered the same person)
|
|
127
|
+
* const merged = await mergeGedcoms(target, source, "id");
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* // Merge by NAME (individuals with same name are considered the same person)
|
|
131
|
+
* const merged = await mergeGedcoms(target, source, "NAME");
|
|
132
|
+
*
|
|
133
|
+
* @remarks
|
|
134
|
+
* - Source individuals are always assigned new unique IDs to avoid conflicts
|
|
135
|
+
* - When individuals match by strategy, they are merged (data and relationships combined)
|
|
136
|
+
* - All family relationships (FAMS/FAMC) are preserved with updated ID references
|
|
137
|
+
*/
|
|
138
|
+
export declare const mergeGedcoms: (targetGedcom: GedComType, sourceGedcom: GedComType, strategy?: MultiTag | "id") => GedComType;
|
|
118
139
|
//# sourceMappingURL=gedcom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gedcom.d.ts","sourceRoot":"","sources":["../../src/classes/gedcom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"gedcom.d.ts","sourceRoot":"","sources":["../../src/classes/gedcom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAEhD,OAAO,KAAK,gBAAgB,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAEX,MAAM,EACN,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,QAAQ,EACR,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,MAAM,EAAgB,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,O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AAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAqDlC,CAAC;AAgBF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,YAAY,GACxB,cAAc,UAAU,EACxB,cAAc,UAAU,EACxB,WAAU,QAAQ,GAAG,IAAW,KAC9B,UAoVF,CAAC"}
|
package/dist/classes/gedcom.js
CHANGED
|
@@ -595,3 +595,315 @@ export const validateGedcomContent = (content) => {
|
|
|
595
595
|
// }
|
|
596
596
|
return { valid: true };
|
|
597
597
|
};
|
|
598
|
+
// Constants for merge operation
|
|
599
|
+
const MERGE_ID_INCREMENT_MULTIPLIER = 1000;
|
|
600
|
+
/**
|
|
601
|
+
* Helper function to convert a Common or List value to a string for comparison
|
|
602
|
+
*/
|
|
603
|
+
const valueToString = (value) => {
|
|
604
|
+
if (!value)
|
|
605
|
+
return "";
|
|
606
|
+
return (value.toString?.() ||
|
|
607
|
+
String(value?.toValue?.() || ""));
|
|
608
|
+
};
|
|
609
|
+
/**
|
|
610
|
+
* Merge two GEDCOM objects into a single result using a configurable matching strategy
|
|
611
|
+
* @param targetGedcom - The base GEDCOM (kept as the primary source)
|
|
612
|
+
* @param sourceGedcom - The GEDCOM to be merged into the target
|
|
613
|
+
* @param strategy - Matching strategy: "id" (default) to match by individual ID, or any MultiTag (e.g., "NAME", "BIRT.DATE") to match by that field's value
|
|
614
|
+
* @returns The merged GedComType with all individuals and families combined
|
|
615
|
+
*
|
|
616
|
+
* @example
|
|
617
|
+
* // Merge by ID (individuals with same ID are considered the same person)
|
|
618
|
+
* const merged = await mergeGedcoms(target, source, "id");
|
|
619
|
+
*
|
|
620
|
+
* @example
|
|
621
|
+
* // Merge by NAME (individuals with same name are considered the same person)
|
|
622
|
+
* const merged = await mergeGedcoms(target, source, "NAME");
|
|
623
|
+
*
|
|
624
|
+
* @remarks
|
|
625
|
+
* - Source individuals are always assigned new unique IDs to avoid conflicts
|
|
626
|
+
* - When individuals match by strategy, they are merged (data and relationships combined)
|
|
627
|
+
* - All family relationships (FAMS/FAMC) are preserved with updated ID references
|
|
628
|
+
*/
|
|
629
|
+
export const mergeGedcoms = (targetGedcom, sourceGedcom, strategy = "id") => {
|
|
630
|
+
// Work directly with the target GEDCOM (no serialization needed)
|
|
631
|
+
const mergedGedcom = targetGedcom;
|
|
632
|
+
// Track ID mapping: source ID -> new ID in merged GEDCOM
|
|
633
|
+
const idMap = new Map();
|
|
634
|
+
// Track matching: sourceIndiId -> targetIndiId (for individuals that match by strategy)
|
|
635
|
+
const matchMap = new Map();
|
|
636
|
+
// Get source individuals and families
|
|
637
|
+
const sourceIndis = sourceGedcom.indis();
|
|
638
|
+
const sourceFams = sourceGedcom.fams();
|
|
639
|
+
const targetIndis = mergedGedcom.indis();
|
|
640
|
+
const targetFams = mergedGedcom.fams();
|
|
641
|
+
// Step 1: Identify matches and create ID mappings for individuals
|
|
642
|
+
sourceIndis?.forEach((sourceIndi) => {
|
|
643
|
+
if (!sourceIndi.id)
|
|
644
|
+
return;
|
|
645
|
+
let matchedTargetIndi;
|
|
646
|
+
if (strategy === "id") {
|
|
647
|
+
// Match by ID directly - check if target has this exact ID
|
|
648
|
+
matchedTargetIndi = targetIndis?.item(sourceIndi.id);
|
|
649
|
+
}
|
|
650
|
+
else {
|
|
651
|
+
// Match by specified MultiTag value
|
|
652
|
+
const sourceValueRaw = sourceIndi.get(strategy);
|
|
653
|
+
const sourceValue = valueToString(sourceValueRaw);
|
|
654
|
+
if (sourceValue) {
|
|
655
|
+
// Find target individual with same value
|
|
656
|
+
matchedTargetIndi = targetIndis?.find((targetIndi) => {
|
|
657
|
+
const targetValueRaw = targetIndi.get(strategy);
|
|
658
|
+
const targetValue = valueToString(targetValueRaw);
|
|
659
|
+
return Boolean(targetValue && targetValue === sourceValue);
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
if (matchedTargetIndi && matchedTargetIndi.id) {
|
|
664
|
+
// Found a match - map source ID to existing target ID
|
|
665
|
+
// Note: This means source individual will merge into target individual
|
|
666
|
+
matchMap.set(sourceIndi.id, matchedTargetIndi.id);
|
|
667
|
+
idMap.set(sourceIndi.id, matchedTargetIndi.id);
|
|
668
|
+
}
|
|
669
|
+
else {
|
|
670
|
+
// No match - need to create a new unique ID
|
|
671
|
+
const baseId = sourceIndi.id;
|
|
672
|
+
let newId = baseId;
|
|
673
|
+
let counter = 1;
|
|
674
|
+
// Generate unique ID that doesn't conflict with target
|
|
675
|
+
while (targetIndis?.item(newId) || idMap.has(newId)) {
|
|
676
|
+
// Extract number from ID like @I123@ and increment
|
|
677
|
+
const numMatch = baseId.match(/\d+/);
|
|
678
|
+
const prefix = baseId.match(/^@[A-Z]+/)?.[0] || "@I";
|
|
679
|
+
const baseNum = numMatch ? parseInt(numMatch[0]) : 1;
|
|
680
|
+
newId =
|
|
681
|
+
`${prefix}${baseNum + counter * MERGE_ID_INCREMENT_MULTIPLIER}@`;
|
|
682
|
+
counter++;
|
|
683
|
+
}
|
|
684
|
+
idMap.set(sourceIndi.id, newId);
|
|
685
|
+
}
|
|
686
|
+
});
|
|
687
|
+
// Step 2: Map family IDs and match families with same members
|
|
688
|
+
const famMatchMap = new Map(); // source family ID -> target family ID
|
|
689
|
+
sourceFams?.forEach((sourceFam) => {
|
|
690
|
+
if (!sourceFam.id)
|
|
691
|
+
return;
|
|
692
|
+
// Get the member IDs for this source family
|
|
693
|
+
const sourceHusbId = sourceFam.HUSB?.value;
|
|
694
|
+
const sourceWifeId = sourceFam.WIFE?.value;
|
|
695
|
+
const sourceChildIds = sourceFam.CHIL?.toList()
|
|
696
|
+
?.map((c) => c.value)
|
|
697
|
+
.filter(Boolean) || [];
|
|
698
|
+
// Map to their final IDs (after individual matching by strategy)
|
|
699
|
+
const finalHusbId = sourceHusbId
|
|
700
|
+
? idMap.get(sourceHusbId)
|
|
701
|
+
: undefined;
|
|
702
|
+
const finalWifeId = sourceWifeId
|
|
703
|
+
? idMap.get(sourceWifeId)
|
|
704
|
+
: undefined;
|
|
705
|
+
const finalChildIds = sourceChildIds
|
|
706
|
+
.map((id) => idMap.get(id))
|
|
707
|
+
.filter(Boolean);
|
|
708
|
+
// Try to find a matching family in target that has the same members (after remapping)
|
|
709
|
+
let matchedTargetFam;
|
|
710
|
+
targetFams?.forEach((targetFam) => {
|
|
711
|
+
if (matchedTargetFam)
|
|
712
|
+
return; // Already found a match
|
|
713
|
+
const targetHusbId = targetFam.HUSB?.value;
|
|
714
|
+
const targetWifeId = targetFam.WIFE?.value;
|
|
715
|
+
const targetChildIds = targetFam.CHIL?.toList()
|
|
716
|
+
?.map((c) => c.value)
|
|
717
|
+
.filter(Boolean) || [];
|
|
718
|
+
// Check if husband matches (either both undefined or same final ID)
|
|
719
|
+
const husbMatch = (!finalHusbId && !targetHusbId) || finalHusbId === targetHusbId;
|
|
720
|
+
// Check if wife matches (either both undefined or same final ID)
|
|
721
|
+
const wifeMatch = (!finalWifeId && !targetWifeId) || finalWifeId === targetWifeId;
|
|
722
|
+
// For a family to match, both husband and wife must match
|
|
723
|
+
// (if one is undefined in both, that's also a match)
|
|
724
|
+
if (husbMatch && wifeMatch) {
|
|
725
|
+
// Also check children overlap
|
|
726
|
+
const childOverlap = finalChildIds.filter((id) => id && targetChildIds.includes(id)).length;
|
|
727
|
+
const totalUniqueChildren = new Set([
|
|
728
|
+
...finalChildIds,
|
|
729
|
+
...targetChildIds,
|
|
730
|
+
]).size;
|
|
731
|
+
// Match if:
|
|
732
|
+
// 1. Both have no children, OR
|
|
733
|
+
// 2. At least 50% of children overlap
|
|
734
|
+
if (totalUniqueChildren === 0 ||
|
|
735
|
+
childOverlap / totalUniqueChildren >= 0.5) {
|
|
736
|
+
// Additionally require at least one spouse to be present (not both empty)
|
|
737
|
+
if (finalHusbId ||
|
|
738
|
+
finalWifeId ||
|
|
739
|
+
targetHusbId ||
|
|
740
|
+
targetWifeId) {
|
|
741
|
+
matchedTargetFam = targetFam;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
if (matchedTargetFam && matchedTargetFam.id) {
|
|
747
|
+
// Found a matching family - use the target family ID
|
|
748
|
+
famMatchMap.set(sourceFam.id, matchedTargetFam.id);
|
|
749
|
+
idMap.set(sourceFam.id, matchedTargetFam.id);
|
|
750
|
+
}
|
|
751
|
+
else {
|
|
752
|
+
// No match - generate a new unique family ID
|
|
753
|
+
const baseId = sourceFam.id;
|
|
754
|
+
let newId = baseId;
|
|
755
|
+
let counter = 1;
|
|
756
|
+
// Generate unique family ID
|
|
757
|
+
while (targetFams?.item(newId) || idMap.has(newId)) {
|
|
758
|
+
const numMatch = baseId.match(/\d+/);
|
|
759
|
+
const prefix = baseId.match(/^@[A-Z]+/)?.[0] || "@F";
|
|
760
|
+
const baseNum = numMatch ? parseInt(numMatch[0]) : 1;
|
|
761
|
+
newId =
|
|
762
|
+
`${prefix}${baseNum + counter * MERGE_ID_INCREMENT_MULTIPLIER}@`;
|
|
763
|
+
counter++;
|
|
764
|
+
}
|
|
765
|
+
idMap.set(sourceFam.id, newId);
|
|
766
|
+
}
|
|
767
|
+
});
|
|
768
|
+
// Step 3: Clone and remap individuals from source
|
|
769
|
+
const clonedIndis = new Map();
|
|
770
|
+
sourceIndis?.forEach((sourceIndi) => {
|
|
771
|
+
if (!sourceIndi.id)
|
|
772
|
+
return;
|
|
773
|
+
const newId = idMap.get(sourceIndi.id);
|
|
774
|
+
if (!newId)
|
|
775
|
+
return;
|
|
776
|
+
// Clone the individual
|
|
777
|
+
const cloned = sourceIndi.clone(false);
|
|
778
|
+
cloned.id = newId;
|
|
779
|
+
cloned.setGedcom(mergedGedcom);
|
|
780
|
+
clonedIndis.set(sourceIndi.id, cloned);
|
|
781
|
+
});
|
|
782
|
+
// Step 4: Clone and remap families from source
|
|
783
|
+
const clonedFams = new Map();
|
|
784
|
+
sourceFams?.forEach((sourceFam) => {
|
|
785
|
+
if (!sourceFam.id)
|
|
786
|
+
return;
|
|
787
|
+
const newFamId = idMap.get(sourceFam.id);
|
|
788
|
+
if (!newFamId)
|
|
789
|
+
return;
|
|
790
|
+
// Clone the family
|
|
791
|
+
const clonedFam = sourceFam.clone(false);
|
|
792
|
+
clonedFam.id = newFamId;
|
|
793
|
+
clonedFam.setGedcom(mergedGedcom);
|
|
794
|
+
clonedFams.set(sourceFam.id, clonedFam);
|
|
795
|
+
});
|
|
796
|
+
// Step 5: Update FAMS and FAMC references in cloned individuals
|
|
797
|
+
clonedIndis.forEach((clonedIndi, originalId) => {
|
|
798
|
+
const sourceIndi = sourceIndis?.item(originalId);
|
|
799
|
+
if (!sourceIndi)
|
|
800
|
+
return;
|
|
801
|
+
// Clear and rebuild FAMS references with remapped IDs
|
|
802
|
+
// clonedIndi.delete("FAMS");
|
|
803
|
+
const sourceFAMS = sourceIndi.FAMS?.toList();
|
|
804
|
+
sourceFAMS?.forEach((famRef) => {
|
|
805
|
+
const oldFamId = famRef.value;
|
|
806
|
+
if (oldFamId) {
|
|
807
|
+
const newFamId = idMap.get(oldFamId);
|
|
808
|
+
if (newFamId) {
|
|
809
|
+
const newFamRef = createCommon(mergedGedcom, undefined, clonedIndi);
|
|
810
|
+
newFamRef.value = newFamId;
|
|
811
|
+
clonedIndi.assign("FAMS", newFamRef, true);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
});
|
|
815
|
+
// Clear and rebuild FAMC references with remapped IDs
|
|
816
|
+
// clonedIndi.delete("FAMC");
|
|
817
|
+
const sourceFAMC = sourceIndi.FAMC?.toList();
|
|
818
|
+
sourceFAMC?.forEach((famRef) => {
|
|
819
|
+
const oldFamId = famRef.value;
|
|
820
|
+
if (oldFamId) {
|
|
821
|
+
const newFamId = idMap.get(oldFamId);
|
|
822
|
+
if (newFamId) {
|
|
823
|
+
const newFamRef = createCommon(mergedGedcom, undefined, clonedIndi);
|
|
824
|
+
newFamRef.value = newFamId;
|
|
825
|
+
clonedIndi.assign("FAMC", newFamRef, true);
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
});
|
|
829
|
+
});
|
|
830
|
+
// Step 6: Update HUSB, WIFE, and CHIL references in cloned families
|
|
831
|
+
clonedFams.forEach((clonedFam, originalFamId) => {
|
|
832
|
+
const sourceFam = sourceFams?.item(originalFamId);
|
|
833
|
+
if (!sourceFam)
|
|
834
|
+
return;
|
|
835
|
+
// Update HUSB reference
|
|
836
|
+
const sourceHusb = sourceFam.HUSB?.value;
|
|
837
|
+
if (sourceHusb) {
|
|
838
|
+
const newHusbId = idMap.get(sourceHusb);
|
|
839
|
+
if (newHusbId) {
|
|
840
|
+
const newHusbRef = createCommon(mergedGedcom, undefined, clonedFam);
|
|
841
|
+
newHusbRef.value = newHusbId;
|
|
842
|
+
clonedFam.set("HUSB", newHusbRef);
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
// Update WIFE reference
|
|
846
|
+
const sourceWife = sourceFam.WIFE?.value;
|
|
847
|
+
if (sourceWife) {
|
|
848
|
+
const newWifeId = idMap.get(sourceWife);
|
|
849
|
+
if (newWifeId) {
|
|
850
|
+
const newWifeRef = createCommon(mergedGedcom, undefined, clonedFam);
|
|
851
|
+
newWifeRef.value = newWifeId;
|
|
852
|
+
clonedFam.set("WIFE", newWifeRef);
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
// Update CHIL references
|
|
856
|
+
// clonedFam.delete("CHIL");
|
|
857
|
+
const sourceChildren = sourceFam.CHIL?.toList();
|
|
858
|
+
sourceChildren?.forEach((childRef) => {
|
|
859
|
+
const oldChildId = childRef.value;
|
|
860
|
+
if (oldChildId) {
|
|
861
|
+
const newChildId = idMap.get(oldChildId);
|
|
862
|
+
if (newChildId) {
|
|
863
|
+
const newChildRef = createCommon(mergedGedcom, undefined, clonedFam);
|
|
864
|
+
newChildRef.value = newChildId;
|
|
865
|
+
clonedFam.assign("CHIL", newChildRef, true);
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
});
|
|
870
|
+
// Step 7: Add or merge individuals into target GEDCOM
|
|
871
|
+
clonedIndis.forEach((clonedIndi, originalId) => {
|
|
872
|
+
const matchedTargetId = matchMap.get(originalId);
|
|
873
|
+
if (matchedTargetId) {
|
|
874
|
+
// This individual matches an existing one - merge data and relationships
|
|
875
|
+
const targetIndi = mergedGedcom.indis()?.item(matchedTargetId);
|
|
876
|
+
if (targetIndi) {
|
|
877
|
+
// Merge without overriding existing data
|
|
878
|
+
targetIndi.merge(clonedIndi, false);
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
else {
|
|
882
|
+
// This is a new individual - add it to merged GEDCOM
|
|
883
|
+
if (clonedIndi.id) {
|
|
884
|
+
mergedGedcom.indis()?.item(clonedIndi.id, clonedIndi);
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
});
|
|
888
|
+
// Step 8: Add or merge families into target GEDCOM
|
|
889
|
+
clonedFams.forEach((clonedFam, originalFamId) => {
|
|
890
|
+
if (!clonedFam.id)
|
|
891
|
+
return;
|
|
892
|
+
const matchedTargetFamId = famMatchMap.get(originalFamId);
|
|
893
|
+
if (matchedTargetFamId) {
|
|
894
|
+
// This family matches an existing one - merge children and data
|
|
895
|
+
const targetFam = mergedGedcom.fams()?.item(matchedTargetFamId);
|
|
896
|
+
if (targetFam) {
|
|
897
|
+
// Merge family data without overriding
|
|
898
|
+
targetFam.merge(clonedFam, false);
|
|
899
|
+
// Note: Children from clonedFam are already added via merge above
|
|
900
|
+
// The CHIL references in clonedFam point to the correct remapped IDs
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
else {
|
|
904
|
+
// This is a new family - add it to merged GEDCOM
|
|
905
|
+
mergedGedcom.fams()?.item(clonedFam.id, clonedFam);
|
|
906
|
+
}
|
|
907
|
+
});
|
|
908
|
+
return mergedGedcom;
|
|
909
|
+
};
|
package/dist/classes/indis.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { IIndividuals } from "../interfaces/indis";
|
|
2
|
+
import type { Settings } from "../types/settings";
|
|
3
|
+
import { Range } from "../types/types";
|
|
4
|
+
import type { IndiKey, Filter, OrderIterator, NestedGroup, Order, FilterIterator, GroupIterator, Group } from "../types/types";
|
|
5
|
+
import type { IndiType } from "./indi";
|
|
5
6
|
import { List } from "./list";
|
|
6
7
|
export declare class Individuals extends List<IndiKey, IndiType> implements IIndividuals {
|
|
7
8
|
copy(): Individuals;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indis.d.ts","sourceRoot":"","sources":["../../src/classes/indis.ts"],"names":[],"mappings":"AAUA,OAAO,
|
|
1
|
+
{"version":3,"file":"indis.d.ts","sourceRoot":"","sources":["../../src/classes/indis.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAMN,KAAK,EAML,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAC,OAAO,EAAE,MAAM,EAAU,aAAa,EAAY,WAAW,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,KAAK,EAAe,MAAM,gBAAgB,CAAC;AAO7J,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,qBAAa,WACZ,SAAQ,IAAI,CAAC,OAAO,EAAE,QAAQ,CAC9B,YAAW,YAAY;IAEvB,IAAI,IAAI,WAAW;IAInB,MAAM,CAAC,IAAI,EAAE,QAAQ,GAAG,WAAW;IAInC,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,WAAW;IAIxE,IAAI,CACH,OAAO,EAAE,MAAM,GAAG,cAAc,CA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,MAAM,CAAC,EAAE,MAAM;IAYxC,cAAc,CAAC,KAAK,SAAI,EAAE,MAAM,CAAC,EAAE,MAAM;IAYzC,gBAAgB,CAAC,WAAW,CAAC,EAAE,WAAW;IAY1C,iBAAiB,CAChB,WAAW,CAAC,EAAE,WAAW,EACzB,uBAAuB,UAAQ;IAehC,WAAW;IAYX,WAAW;IAYX,UAAU;IAYV,YAAY;IAYZ,UAAU;IAYV,MAAM;IAIN,MAAM;CAGN"}
|
package/dist/classes/indis.js
CHANGED
|
@@ -2,7 +2,7 @@ import difference from "lodash-es/difference.js";
|
|
|
2
2
|
import { BIRTH_ASC, BIRTH_DESC, DEATH_ASC, DEATH_DESC, } from "../constants/orders.js";
|
|
3
3
|
import { getPlaceParserProvider } from "../factories/place-parser-provider.js";
|
|
4
4
|
import { getPlaceTranslatorProvider } from "../factories/place-translator-provider.js";
|
|
5
|
-
import { Range
|
|
5
|
+
import { Range } from "../types/types.js";
|
|
6
6
|
import { nameFormatter } from "../utils/name-formatter.js";
|
|
7
7
|
import { setNestedGroup } from "../utils/nested-group.js";
|
|
8
8
|
import { getPlaceParts } from "../utils/place-parser.js";
|
package/dist/classes/list.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { ConvertOptions } from "../interfaces/common";
|
|
2
|
+
import type { IList } from "../interfaces/list";
|
|
3
|
+
import type { IdType, Filter, FilterIterator, MultiTag, Order, OrderIterator, Group, GroupIterator } from "../types/types";
|
|
4
|
+
import type { Common } from "./common";
|
|
5
5
|
export declare class List<K extends IdType = IdType, T extends Common = Common> implements IList<K, T> {
|
|
6
6
|
private items;
|
|
7
7
|
isListable: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/classes/list.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"list.d.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";
|
|
3
3
|
import type { ProxyOriginal } from "./common";
|
|
4
|
-
import {
|
|
4
|
+
import type { GedComType } from "./gedcom";
|
|
5
5
|
export declare class CommonName extends Common<string> {
|
|
6
6
|
NPFX?: Common;
|
|
7
7
|
GIVN?: Common;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"name.d.ts","sourceRoot":"","sources":["../../src/classes/name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAA6B,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"name.d.ts","sourceRoot":"","sources":["../../src/classes/name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAA6B,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAGzC,qBAAa,UAAW,SAAQ,MAAM,CAAC,MAAM,CAAC;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;gBAGf,MAAM,CAAC,EAAE,UAAU,EACnB,EAAE,CAAC,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM;IAOhB,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAoClC;IAED,IAAI,KAAK,IAtCQ,MAAM,GAAG,SAAS,CA4ClC;IAED,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS;CAK9B;AAED,eAAO,MAAM,gBAAgB,GAC5B,SAAS,UAAU,EACnB,KAAK,MAAM,EACX,OAAO,MAAM,EACb,SAAS,MAAM,KACb,aAAa,CAAC,UAAU,CAI1B,CAAC"}
|
package/dist/classes/note.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IdType } from "../types/types";
|
|
2
2
|
import { Common } from "./common";
|
|
3
3
|
import type { ProxyOriginal } from "./common";
|
|
4
|
-
import {
|
|
4
|
+
import type { GedComType } from "./gedcom";
|
|
5
5
|
export declare class CommonNote extends Common<string> {
|
|
6
6
|
constructor(gedcom?: GedComType, id?: IdType, main?: Common, parent?: Common);
|
|
7
7
|
set value(value: string | undefined);
|