@treeviz/gedcom-parser 2.1.27 → 2.1.28
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/gedcom.d.ts +3 -1
- package/dist/classes/gedcom.d.ts.map +1 -1
- package/dist/classes/index.js +89 -15
- package/dist/cli/index.js +89 -15
- package/dist/index.js +89 -15
- package/dist/utils/family-edit.d.ts +1 -1
- package/dist/utils/family-edit.d.ts.map +1 -1
- package/dist/utils/index.js +15 -15
- package/package.json +1 -1
package/dist/classes/gedcom.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { Objects } from "./objes";
|
|
|
19
19
|
import type { RepoType } from "./repo";
|
|
20
20
|
import type { Repositories } from "./repos";
|
|
21
21
|
import type { SourType } from "./sour";
|
|
22
|
-
import
|
|
22
|
+
import { Sources } from "./sours";
|
|
23
23
|
import type { SubmType } from "./subm";
|
|
24
24
|
import type { Submitters } from "./subms";
|
|
25
25
|
type GedcomObjectPrimitive = string | number | boolean;
|
|
@@ -197,6 +197,8 @@ export declare const validateGedcomContent: (content?: string) => {
|
|
|
197
197
|
* - Source individuals are always assigned new unique IDs to avoid conflicts
|
|
198
198
|
* - When individuals match by strategy, they are merged (data and relationships combined)
|
|
199
199
|
* - All family relationships (FAMS/FAMC) are preserved with updated ID references
|
|
200
|
+
* - Top-level OBJE / SOUR records are copied with remapped xrefs so FS (or other)
|
|
201
|
+
* `@O1@` memories do not collide with Ancestry `@O1@` media already in the tree
|
|
200
202
|
*/
|
|
201
203
|
export declare const mergeGedcoms: (targetGedcom: GedComType, sourceGedcom: GedComType, strategy?: MultiTag | "id") => GedComType;
|
|
202
204
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gedcom.d.ts","sourceRoot":"","sources":["../../src/classes/gedcom.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,OAAO,MA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,GACjC,UAAU,MAAM,KACd;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAqDlC,CAAC;AAgBF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,YAAY,GACxB,cAAc,UAAU,EACxB,cAAc,UAAU,EACxB,WAAU,QAAQ,GAAG,IAAW,KAC9B,UAqbF,CAAC"}
|
package/dist/classes/index.js
CHANGED
|
@@ -9286,7 +9286,7 @@ var ensureExtensionSchema = (gedcom, extraTags) => {
|
|
|
9286
9286
|
|
|
9287
9287
|
// package.json
|
|
9288
9288
|
var package_default = {
|
|
9289
|
-
version: "2.1.
|
|
9289
|
+
version: "2.1.28"};
|
|
9290
9290
|
|
|
9291
9291
|
// src/utils/get-product-details.ts
|
|
9292
9292
|
var getVersion = () => package_default.version;
|
|
@@ -9477,6 +9477,20 @@ var Objects = class _Objects extends List {
|
|
|
9477
9477
|
}
|
|
9478
9478
|
};
|
|
9479
9479
|
|
|
9480
|
+
// src/classes/sours.ts
|
|
9481
|
+
var Sources = class _Sources extends List {
|
|
9482
|
+
copy() {
|
|
9483
|
+
const newList = new _Sources();
|
|
9484
|
+
this.entries().forEach(([key, value]) => {
|
|
9485
|
+
newList.item(key, value);
|
|
9486
|
+
});
|
|
9487
|
+
return newList;
|
|
9488
|
+
}
|
|
9489
|
+
except(item) {
|
|
9490
|
+
return this.copy().delete(item);
|
|
9491
|
+
}
|
|
9492
|
+
};
|
|
9493
|
+
|
|
9480
9494
|
// src/classes/gedcom.ts
|
|
9481
9495
|
var isObjectPatch = (value) => {
|
|
9482
9496
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
@@ -10344,6 +10358,48 @@ var mergeGedcoms = (targetGedcom, sourceGedcom, strategy = "id") => {
|
|
|
10344
10358
|
const mergedGedcom = targetGedcom;
|
|
10345
10359
|
const idMap = /* @__PURE__ */ new Map();
|
|
10346
10360
|
const matchMap = /* @__PURE__ */ new Map();
|
|
10361
|
+
const isXref = (value) => !!value && /^@[A-Za-z0-9_]+@$/.test(value.trim());
|
|
10362
|
+
const allocateTopLevelIds = (sourceList, targetList, prefix) => {
|
|
10363
|
+
const used = /* @__PURE__ */ new Set();
|
|
10364
|
+
targetList?.forEach((_item, id) => {
|
|
10365
|
+
used.add(String(id));
|
|
10366
|
+
});
|
|
10367
|
+
idMap.forEach((mapped) => {
|
|
10368
|
+
used.add(String(mapped));
|
|
10369
|
+
});
|
|
10370
|
+
sourceList?.forEach((_item, sourceId) => {
|
|
10371
|
+
const sid = String(sourceId);
|
|
10372
|
+
if (!sid || idMap.has(sid)) {
|
|
10373
|
+
return;
|
|
10374
|
+
}
|
|
10375
|
+
let newId = sid;
|
|
10376
|
+
if (used.has(sid)) {
|
|
10377
|
+
newId = nextRecordId([...used], prefix);
|
|
10378
|
+
}
|
|
10379
|
+
used.add(newId);
|
|
10380
|
+
idMap.set(sid, newId);
|
|
10381
|
+
});
|
|
10382
|
+
};
|
|
10383
|
+
const remapIndiPointers = (clonedIndi, sourceIndi, tag) => {
|
|
10384
|
+
const sourcePointers = sourceIndi.get(tag)?.toList();
|
|
10385
|
+
if (!sourcePointers?.length) {
|
|
10386
|
+
return;
|
|
10387
|
+
}
|
|
10388
|
+
clonedIndi.remove(tag);
|
|
10389
|
+
sourcePointers.forEach((ref) => {
|
|
10390
|
+
const oldVal = String(ref?.toValue?.() ?? "").trim();
|
|
10391
|
+
if (!oldVal) {
|
|
10392
|
+
return;
|
|
10393
|
+
}
|
|
10394
|
+
const newVal = isXref(oldVal) ? idMap.get(oldVal) : oldVal;
|
|
10395
|
+
if (!newVal) {
|
|
10396
|
+
return;
|
|
10397
|
+
}
|
|
10398
|
+
const pointer = createCommon(mergedGedcom, void 0, clonedIndi);
|
|
10399
|
+
pointer.value = newVal;
|
|
10400
|
+
clonedIndi.assign(tag, pointer, true);
|
|
10401
|
+
});
|
|
10402
|
+
};
|
|
10347
10403
|
const sourceIndis = sourceGedcom.indis();
|
|
10348
10404
|
const sourceFams = sourceGedcom.fams();
|
|
10349
10405
|
const targetIndis = mergedGedcom.indis();
|
|
@@ -10430,6 +10486,8 @@ var mergeGedcoms = (targetGedcom, sourceGedcom, strategy = "id") => {
|
|
|
10430
10486
|
idMap.set(sourceFam.id, newId);
|
|
10431
10487
|
}
|
|
10432
10488
|
});
|
|
10489
|
+
allocateTopLevelIds(sourceGedcom.objes(), mergedGedcom.objes(), "O");
|
|
10490
|
+
allocateTopLevelIds(sourceGedcom.sours(), mergedGedcom.sours(), "S");
|
|
10433
10491
|
const clonedIndis = /* @__PURE__ */ new Map();
|
|
10434
10492
|
sourceIndis?.forEach((sourceIndi) => {
|
|
10435
10493
|
if (!sourceIndi.id) return;
|
|
@@ -10450,6 +10508,34 @@ var mergeGedcoms = (targetGedcom, sourceGedcom, strategy = "id") => {
|
|
|
10450
10508
|
clonedFam.setGedcom(mergedGedcom);
|
|
10451
10509
|
clonedFams.set(sourceFam.id, clonedFam);
|
|
10452
10510
|
});
|
|
10511
|
+
sourceGedcom.objes()?.forEach((sourceObje, sourceId) => {
|
|
10512
|
+
if (!sourceObje || !sourceId) return;
|
|
10513
|
+
const newId = idMap.get(sourceId);
|
|
10514
|
+
if (!newId) return;
|
|
10515
|
+
const cloned = sourceObje.clone(false);
|
|
10516
|
+
cloned.id = newId;
|
|
10517
|
+
cloned.setGedcom(mergedGedcom);
|
|
10518
|
+
const existing = mergedGedcom.objes();
|
|
10519
|
+
const list = existing ?? new Objects();
|
|
10520
|
+
if (!existing) {
|
|
10521
|
+
mergedGedcom.set("@@OBJE", list);
|
|
10522
|
+
}
|
|
10523
|
+
list.item(newId, cloned);
|
|
10524
|
+
});
|
|
10525
|
+
sourceGedcom.sours()?.forEach((sourceSour, sourceId) => {
|
|
10526
|
+
if (!sourceSour || !sourceId) return;
|
|
10527
|
+
const newId = idMap.get(sourceId);
|
|
10528
|
+
if (!newId) return;
|
|
10529
|
+
const cloned = sourceSour.clone(false);
|
|
10530
|
+
cloned.id = newId;
|
|
10531
|
+
cloned.setGedcom(mergedGedcom);
|
|
10532
|
+
const existing = mergedGedcom.sours();
|
|
10533
|
+
const list = existing ?? new Sources();
|
|
10534
|
+
if (!existing) {
|
|
10535
|
+
mergedGedcom.set("@@SOUR", list);
|
|
10536
|
+
}
|
|
10537
|
+
list.item(newId, cloned);
|
|
10538
|
+
});
|
|
10453
10539
|
clonedIndis.forEach((clonedIndi, originalId) => {
|
|
10454
10540
|
const sourceIndi = sourceIndis?.item(originalId);
|
|
10455
10541
|
if (!sourceIndi) return;
|
|
@@ -10487,6 +10573,8 @@ var mergeGedcoms = (targetGedcom, sourceGedcom, strategy = "id") => {
|
|
|
10487
10573
|
}
|
|
10488
10574
|
}
|
|
10489
10575
|
});
|
|
10576
|
+
remapIndiPointers(clonedIndi, sourceIndi, "OBJE");
|
|
10577
|
+
remapIndiPointers(clonedIndi, sourceIndi, "SOUR");
|
|
10490
10578
|
});
|
|
10491
10579
|
clonedFams.forEach((clonedFam, originalFamId) => {
|
|
10492
10580
|
const sourceFam = sourceFams?.item(originalFamId);
|
|
@@ -10597,20 +10685,6 @@ var createSour = (gedcom, id, main, parent) => {
|
|
|
10597
10685
|
);
|
|
10598
10686
|
};
|
|
10599
10687
|
|
|
10600
|
-
// src/classes/sours.ts
|
|
10601
|
-
var Sources = class _Sources extends List {
|
|
10602
|
-
copy() {
|
|
10603
|
-
const newList = new _Sources();
|
|
10604
|
-
this.entries().forEach(([key, value]) => {
|
|
10605
|
-
newList.item(key, value);
|
|
10606
|
-
});
|
|
10607
|
-
return newList;
|
|
10608
|
-
}
|
|
10609
|
-
except(item) {
|
|
10610
|
-
return this.copy().delete(item);
|
|
10611
|
-
}
|
|
10612
|
-
};
|
|
10613
|
-
|
|
10614
10688
|
// src/classes/subm.ts
|
|
10615
10689
|
var Subm = class extends Common {
|
|
10616
10690
|
};
|
package/dist/cli/index.js
CHANGED
|
@@ -9279,7 +9279,7 @@ var ensureExtensionSchema = (gedcom, extraTags) => {
|
|
|
9279
9279
|
|
|
9280
9280
|
// package.json
|
|
9281
9281
|
var package_default = {
|
|
9282
|
-
version: "2.1.
|
|
9282
|
+
version: "2.1.28"};
|
|
9283
9283
|
|
|
9284
9284
|
// src/utils/get-product-details.ts
|
|
9285
9285
|
var isDevelopment = () => {
|
|
@@ -9473,6 +9473,20 @@ var Objects = class _Objects extends List {
|
|
|
9473
9473
|
}
|
|
9474
9474
|
};
|
|
9475
9475
|
|
|
9476
|
+
// src/classes/sours.ts
|
|
9477
|
+
var Sources = class _Sources extends List {
|
|
9478
|
+
copy() {
|
|
9479
|
+
const newList = new _Sources();
|
|
9480
|
+
this.entries().forEach(([key, value]) => {
|
|
9481
|
+
newList.item(key, value);
|
|
9482
|
+
});
|
|
9483
|
+
return newList;
|
|
9484
|
+
}
|
|
9485
|
+
except(item) {
|
|
9486
|
+
return this.copy().delete(item);
|
|
9487
|
+
}
|
|
9488
|
+
};
|
|
9489
|
+
|
|
9476
9490
|
// src/classes/gedcom.ts
|
|
9477
9491
|
var isObjectPatch = (value) => {
|
|
9478
9492
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
@@ -10305,6 +10319,48 @@ var mergeGedcoms = (targetGedcom, sourceGedcom, strategy = "id") => {
|
|
|
10305
10319
|
const mergedGedcom = targetGedcom;
|
|
10306
10320
|
const idMap = /* @__PURE__ */ new Map();
|
|
10307
10321
|
const matchMap = /* @__PURE__ */ new Map();
|
|
10322
|
+
const isXref = (value) => !!value && /^@[A-Za-z0-9_]+@$/.test(value.trim());
|
|
10323
|
+
const allocateTopLevelIds = (sourceList, targetList, prefix) => {
|
|
10324
|
+
const used = /* @__PURE__ */ new Set();
|
|
10325
|
+
targetList?.forEach((_item, id) => {
|
|
10326
|
+
used.add(String(id));
|
|
10327
|
+
});
|
|
10328
|
+
idMap.forEach((mapped) => {
|
|
10329
|
+
used.add(String(mapped));
|
|
10330
|
+
});
|
|
10331
|
+
sourceList?.forEach((_item, sourceId) => {
|
|
10332
|
+
const sid = String(sourceId);
|
|
10333
|
+
if (!sid || idMap.has(sid)) {
|
|
10334
|
+
return;
|
|
10335
|
+
}
|
|
10336
|
+
let newId = sid;
|
|
10337
|
+
if (used.has(sid)) {
|
|
10338
|
+
newId = nextRecordId([...used], prefix);
|
|
10339
|
+
}
|
|
10340
|
+
used.add(newId);
|
|
10341
|
+
idMap.set(sid, newId);
|
|
10342
|
+
});
|
|
10343
|
+
};
|
|
10344
|
+
const remapIndiPointers = (clonedIndi, sourceIndi, tag) => {
|
|
10345
|
+
const sourcePointers = sourceIndi.get(tag)?.toList();
|
|
10346
|
+
if (!sourcePointers?.length) {
|
|
10347
|
+
return;
|
|
10348
|
+
}
|
|
10349
|
+
clonedIndi.remove(tag);
|
|
10350
|
+
sourcePointers.forEach((ref) => {
|
|
10351
|
+
const oldVal = String(ref?.toValue?.() ?? "").trim();
|
|
10352
|
+
if (!oldVal) {
|
|
10353
|
+
return;
|
|
10354
|
+
}
|
|
10355
|
+
const newVal = isXref(oldVal) ? idMap.get(oldVal) : oldVal;
|
|
10356
|
+
if (!newVal) {
|
|
10357
|
+
return;
|
|
10358
|
+
}
|
|
10359
|
+
const pointer = createCommon(mergedGedcom, void 0, clonedIndi);
|
|
10360
|
+
pointer.value = newVal;
|
|
10361
|
+
clonedIndi.assign(tag, pointer, true);
|
|
10362
|
+
});
|
|
10363
|
+
};
|
|
10308
10364
|
const sourceIndis = sourceGedcom.indis();
|
|
10309
10365
|
const sourceFams = sourceGedcom.fams();
|
|
10310
10366
|
const targetIndis = mergedGedcom.indis();
|
|
@@ -10391,6 +10447,8 @@ var mergeGedcoms = (targetGedcom, sourceGedcom, strategy = "id") => {
|
|
|
10391
10447
|
idMap.set(sourceFam.id, newId);
|
|
10392
10448
|
}
|
|
10393
10449
|
});
|
|
10450
|
+
allocateTopLevelIds(sourceGedcom.objes(), mergedGedcom.objes(), "O");
|
|
10451
|
+
allocateTopLevelIds(sourceGedcom.sours(), mergedGedcom.sours(), "S");
|
|
10394
10452
|
const clonedIndis = /* @__PURE__ */ new Map();
|
|
10395
10453
|
sourceIndis?.forEach((sourceIndi) => {
|
|
10396
10454
|
if (!sourceIndi.id) return;
|
|
@@ -10411,6 +10469,34 @@ var mergeGedcoms = (targetGedcom, sourceGedcom, strategy = "id") => {
|
|
|
10411
10469
|
clonedFam.setGedcom(mergedGedcom);
|
|
10412
10470
|
clonedFams.set(sourceFam.id, clonedFam);
|
|
10413
10471
|
});
|
|
10472
|
+
sourceGedcom.objes()?.forEach((sourceObje, sourceId) => {
|
|
10473
|
+
if (!sourceObje || !sourceId) return;
|
|
10474
|
+
const newId = idMap.get(sourceId);
|
|
10475
|
+
if (!newId) return;
|
|
10476
|
+
const cloned = sourceObje.clone(false);
|
|
10477
|
+
cloned.id = newId;
|
|
10478
|
+
cloned.setGedcom(mergedGedcom);
|
|
10479
|
+
const existing = mergedGedcom.objes();
|
|
10480
|
+
const list = existing ?? new Objects();
|
|
10481
|
+
if (!existing) {
|
|
10482
|
+
mergedGedcom.set("@@OBJE", list);
|
|
10483
|
+
}
|
|
10484
|
+
list.item(newId, cloned);
|
|
10485
|
+
});
|
|
10486
|
+
sourceGedcom.sours()?.forEach((sourceSour, sourceId) => {
|
|
10487
|
+
if (!sourceSour || !sourceId) return;
|
|
10488
|
+
const newId = idMap.get(sourceId);
|
|
10489
|
+
if (!newId) return;
|
|
10490
|
+
const cloned = sourceSour.clone(false);
|
|
10491
|
+
cloned.id = newId;
|
|
10492
|
+
cloned.setGedcom(mergedGedcom);
|
|
10493
|
+
const existing = mergedGedcom.sours();
|
|
10494
|
+
const list = existing ?? new Sources();
|
|
10495
|
+
if (!existing) {
|
|
10496
|
+
mergedGedcom.set("@@SOUR", list);
|
|
10497
|
+
}
|
|
10498
|
+
list.item(newId, cloned);
|
|
10499
|
+
});
|
|
10414
10500
|
clonedIndis.forEach((clonedIndi, originalId) => {
|
|
10415
10501
|
const sourceIndi = sourceIndis?.item(originalId);
|
|
10416
10502
|
if (!sourceIndi) return;
|
|
@@ -10448,6 +10534,8 @@ var mergeGedcoms = (targetGedcom, sourceGedcom, strategy = "id") => {
|
|
|
10448
10534
|
}
|
|
10449
10535
|
}
|
|
10450
10536
|
});
|
|
10537
|
+
remapIndiPointers(clonedIndi, sourceIndi, "OBJE");
|
|
10538
|
+
remapIndiPointers(clonedIndi, sourceIndi, "SOUR");
|
|
10451
10539
|
});
|
|
10452
10540
|
clonedFams.forEach((clonedFam, originalFamId) => {
|
|
10453
10541
|
const sourceFam = sourceFams?.item(originalFamId);
|
|
@@ -10540,20 +10628,6 @@ var Repositories = class _Repositories extends List {
|
|
|
10540
10628
|
}
|
|
10541
10629
|
};
|
|
10542
10630
|
|
|
10543
|
-
// src/classes/sours.ts
|
|
10544
|
-
var Sources = class _Sources extends List {
|
|
10545
|
-
copy() {
|
|
10546
|
-
const newList = new _Sources();
|
|
10547
|
-
this.entries().forEach(([key, value]) => {
|
|
10548
|
-
newList.item(key, value);
|
|
10549
|
-
});
|
|
10550
|
-
return newList;
|
|
10551
|
-
}
|
|
10552
|
-
except(item) {
|
|
10553
|
-
return this.copy().delete(item);
|
|
10554
|
-
}
|
|
10555
|
-
};
|
|
10556
|
-
|
|
10557
10631
|
// src/classes/subms.ts
|
|
10558
10632
|
var Submitters = class _Submitters extends List {
|
|
10559
10633
|
copy() {
|
package/dist/index.js
CHANGED
|
@@ -10194,7 +10194,7 @@ var collectExtensionTagsFrom = (node, into = /* @__PURE__ */ new Set()) => {
|
|
|
10194
10194
|
// package.json
|
|
10195
10195
|
var package_default = {
|
|
10196
10196
|
name: "@treeviz/gedcom-parser",
|
|
10197
|
-
version: "2.1.
|
|
10197
|
+
version: "2.1.28"};
|
|
10198
10198
|
|
|
10199
10199
|
// src/utils/get-product-details.ts
|
|
10200
10200
|
var isDevelopment = () => {
|
|
@@ -10389,6 +10389,20 @@ var Objects = class _Objects extends List {
|
|
|
10389
10389
|
}
|
|
10390
10390
|
};
|
|
10391
10391
|
|
|
10392
|
+
// src/classes/sours.ts
|
|
10393
|
+
var Sources = class _Sources extends List {
|
|
10394
|
+
copy() {
|
|
10395
|
+
const newList = new _Sources();
|
|
10396
|
+
this.entries().forEach(([key, value]) => {
|
|
10397
|
+
newList.item(key, value);
|
|
10398
|
+
});
|
|
10399
|
+
return newList;
|
|
10400
|
+
}
|
|
10401
|
+
except(item) {
|
|
10402
|
+
return this.copy().delete(item);
|
|
10403
|
+
}
|
|
10404
|
+
};
|
|
10405
|
+
|
|
10392
10406
|
// src/classes/gedcom.ts
|
|
10393
10407
|
var isObjectPatch = (value) => {
|
|
10394
10408
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
@@ -11256,6 +11270,48 @@ var mergeGedcoms = (targetGedcom, sourceGedcom, strategy = "id") => {
|
|
|
11256
11270
|
const mergedGedcom = targetGedcom;
|
|
11257
11271
|
const idMap = /* @__PURE__ */ new Map();
|
|
11258
11272
|
const matchMap = /* @__PURE__ */ new Map();
|
|
11273
|
+
const isXref = (value) => !!value && /^@[A-Za-z0-9_]+@$/.test(value.trim());
|
|
11274
|
+
const allocateTopLevelIds = (sourceList, targetList, prefix) => {
|
|
11275
|
+
const used = /* @__PURE__ */ new Set();
|
|
11276
|
+
targetList?.forEach((_item, id) => {
|
|
11277
|
+
used.add(String(id));
|
|
11278
|
+
});
|
|
11279
|
+
idMap.forEach((mapped) => {
|
|
11280
|
+
used.add(String(mapped));
|
|
11281
|
+
});
|
|
11282
|
+
sourceList?.forEach((_item, sourceId) => {
|
|
11283
|
+
const sid = String(sourceId);
|
|
11284
|
+
if (!sid || idMap.has(sid)) {
|
|
11285
|
+
return;
|
|
11286
|
+
}
|
|
11287
|
+
let newId = sid;
|
|
11288
|
+
if (used.has(sid)) {
|
|
11289
|
+
newId = nextRecordId([...used], prefix);
|
|
11290
|
+
}
|
|
11291
|
+
used.add(newId);
|
|
11292
|
+
idMap.set(sid, newId);
|
|
11293
|
+
});
|
|
11294
|
+
};
|
|
11295
|
+
const remapIndiPointers = (clonedIndi, sourceIndi, tag) => {
|
|
11296
|
+
const sourcePointers = sourceIndi.get(tag)?.toList();
|
|
11297
|
+
if (!sourcePointers?.length) {
|
|
11298
|
+
return;
|
|
11299
|
+
}
|
|
11300
|
+
clonedIndi.remove(tag);
|
|
11301
|
+
sourcePointers.forEach((ref) => {
|
|
11302
|
+
const oldVal = String(ref?.toValue?.() ?? "").trim();
|
|
11303
|
+
if (!oldVal) {
|
|
11304
|
+
return;
|
|
11305
|
+
}
|
|
11306
|
+
const newVal = isXref(oldVal) ? idMap.get(oldVal) : oldVal;
|
|
11307
|
+
if (!newVal) {
|
|
11308
|
+
return;
|
|
11309
|
+
}
|
|
11310
|
+
const pointer = createCommon(mergedGedcom, void 0, clonedIndi);
|
|
11311
|
+
pointer.value = newVal;
|
|
11312
|
+
clonedIndi.assign(tag, pointer, true);
|
|
11313
|
+
});
|
|
11314
|
+
};
|
|
11259
11315
|
const sourceIndis = sourceGedcom.indis();
|
|
11260
11316
|
const sourceFams = sourceGedcom.fams();
|
|
11261
11317
|
const targetIndis = mergedGedcom.indis();
|
|
@@ -11342,6 +11398,8 @@ var mergeGedcoms = (targetGedcom, sourceGedcom, strategy = "id") => {
|
|
|
11342
11398
|
idMap.set(sourceFam.id, newId);
|
|
11343
11399
|
}
|
|
11344
11400
|
});
|
|
11401
|
+
allocateTopLevelIds(sourceGedcom.objes(), mergedGedcom.objes(), "O");
|
|
11402
|
+
allocateTopLevelIds(sourceGedcom.sours(), mergedGedcom.sours(), "S");
|
|
11345
11403
|
const clonedIndis = /* @__PURE__ */ new Map();
|
|
11346
11404
|
sourceIndis?.forEach((sourceIndi) => {
|
|
11347
11405
|
if (!sourceIndi.id) return;
|
|
@@ -11362,6 +11420,34 @@ var mergeGedcoms = (targetGedcom, sourceGedcom, strategy = "id") => {
|
|
|
11362
11420
|
clonedFam.setGedcom(mergedGedcom);
|
|
11363
11421
|
clonedFams.set(sourceFam.id, clonedFam);
|
|
11364
11422
|
});
|
|
11423
|
+
sourceGedcom.objes()?.forEach((sourceObje, sourceId) => {
|
|
11424
|
+
if (!sourceObje || !sourceId) return;
|
|
11425
|
+
const newId = idMap.get(sourceId);
|
|
11426
|
+
if (!newId) return;
|
|
11427
|
+
const cloned = sourceObje.clone(false);
|
|
11428
|
+
cloned.id = newId;
|
|
11429
|
+
cloned.setGedcom(mergedGedcom);
|
|
11430
|
+
const existing = mergedGedcom.objes();
|
|
11431
|
+
const list = existing ?? new Objects();
|
|
11432
|
+
if (!existing) {
|
|
11433
|
+
mergedGedcom.set("@@OBJE", list);
|
|
11434
|
+
}
|
|
11435
|
+
list.item(newId, cloned);
|
|
11436
|
+
});
|
|
11437
|
+
sourceGedcom.sours()?.forEach((sourceSour, sourceId) => {
|
|
11438
|
+
if (!sourceSour || !sourceId) return;
|
|
11439
|
+
const newId = idMap.get(sourceId);
|
|
11440
|
+
if (!newId) return;
|
|
11441
|
+
const cloned = sourceSour.clone(false);
|
|
11442
|
+
cloned.id = newId;
|
|
11443
|
+
cloned.setGedcom(mergedGedcom);
|
|
11444
|
+
const existing = mergedGedcom.sours();
|
|
11445
|
+
const list = existing ?? new Sources();
|
|
11446
|
+
if (!existing) {
|
|
11447
|
+
mergedGedcom.set("@@SOUR", list);
|
|
11448
|
+
}
|
|
11449
|
+
list.item(newId, cloned);
|
|
11450
|
+
});
|
|
11365
11451
|
clonedIndis.forEach((clonedIndi, originalId) => {
|
|
11366
11452
|
const sourceIndi = sourceIndis?.item(originalId);
|
|
11367
11453
|
if (!sourceIndi) return;
|
|
@@ -11399,6 +11485,8 @@ var mergeGedcoms = (targetGedcom, sourceGedcom, strategy = "id") => {
|
|
|
11399
11485
|
}
|
|
11400
11486
|
}
|
|
11401
11487
|
});
|
|
11488
|
+
remapIndiPointers(clonedIndi, sourceIndi, "OBJE");
|
|
11489
|
+
remapIndiPointers(clonedIndi, sourceIndi, "SOUR");
|
|
11402
11490
|
});
|
|
11403
11491
|
clonedFams.forEach((clonedFam, originalFamId) => {
|
|
11404
11492
|
const sourceFam = sourceFams?.item(originalFamId);
|
|
@@ -11491,20 +11579,6 @@ var Repositories = class _Repositories extends List {
|
|
|
11491
11579
|
}
|
|
11492
11580
|
};
|
|
11493
11581
|
|
|
11494
|
-
// src/classes/sours.ts
|
|
11495
|
-
var Sources = class _Sources extends List {
|
|
11496
|
-
copy() {
|
|
11497
|
-
const newList = new _Sources();
|
|
11498
|
-
this.entries().forEach(([key, value]) => {
|
|
11499
|
-
newList.item(key, value);
|
|
11500
|
-
});
|
|
11501
|
-
return newList;
|
|
11502
|
-
}
|
|
11503
|
-
except(item) {
|
|
11504
|
-
return this.copy().delete(item);
|
|
11505
|
-
}
|
|
11506
|
-
};
|
|
11507
|
-
|
|
11508
11582
|
// src/classes/subms.ts
|
|
11509
11583
|
var Submitters = class _Submitters extends List {
|
|
11510
11584
|
copy() {
|
|
@@ -18,7 +18,7 @@ export declare const toGedcomPedigree: (value?: string | RelationType) => Pedigr
|
|
|
18
18
|
export declare const pointerIds: (tag?: Common | List) => string[];
|
|
19
19
|
export declare const firstPointerId: (tag?: Common | List) => string;
|
|
20
20
|
export declare const makePointer: (gedcom: GedComType, parent: Common, value: string, refType: "INDI" | "FAM" | "OBJE" | "SNOTE" | "NOTE") => import("..").ProxyOriginal<Common<string, import("..").IdType>>;
|
|
21
|
-
export declare const nextRecordId: (ids: Array<string | undefined>, prefix: "I" | "F" | "O" | "N") => string;
|
|
21
|
+
export declare const nextRecordId: (ids: Array<string | undefined>, prefix: "I" | "F" | "O" | "N" | "S") => string;
|
|
22
22
|
export declare const familyHasParent: (fam: FamType, indiId: IndiKey) => boolean;
|
|
23
23
|
export declare const familyHasChild: (fam: FamType, indiId: IndiKey) => boolean;
|
|
24
24
|
export declare const spouseTagFor: (indi: IndiType, fam: FamType) => "HUSB" | "WIFE";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"family-edit.d.ts","sourceRoot":"","sources":["../../src/utils/family-edit.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE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,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kCAAkC,GAC9C,MAAM,QAAQ,KACZ,oBAAoB,EAqCtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GACxC,QAAQ,UAAU,EAClB,UAAU,OAAO,EAAE,KACjB,OAAO,GAAG,SA6DZ,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAC9B,QAAQ,UAAU,EAClB,QAAQ,MAAM,EAAE,KACd,MAqBF,CAAC;AAgBF,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AAE3E;;;GAGG;AACH,eAAO,MAAM,cAAc,GAC1B,QAAQ,QAAQ,EAChB,UAAU,QAAQ,EAClB,MAAM,kBAAkB,KACtB,OA4EF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC5B,QAAQ,UAAU,EAClB,QAAQ,OAAO,KACb,OAgDF,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG;IAClD;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B,GACzC,QAAQ,QAAQ,EAChB,OAAO,QAAQ,EACf,UAAU,oCAAoC,KAC5C,OAAO,GAAG,SAAS,GAAG,SAyFxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GACtC,OAAO,QAAQ,EACf,MAAM,OAAO,KACX,MAAM,EA6CR,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -10032,7 +10032,7 @@ var collectExtensionTagsFrom = (node, into = /* @__PURE__ */ new Set()) => {
|
|
|
10032
10032
|
// package.json
|
|
10033
10033
|
var package_default = {
|
|
10034
10034
|
name: "@treeviz/gedcom-parser",
|
|
10035
|
-
version: "2.1.
|
|
10035
|
+
version: "2.1.28"};
|
|
10036
10036
|
|
|
10037
10037
|
// src/utils/get-product-details.ts
|
|
10038
10038
|
var isDevelopment = () => {
|
|
@@ -10227,6 +10227,20 @@ var Objects = class _Objects extends List {
|
|
|
10227
10227
|
}
|
|
10228
10228
|
};
|
|
10229
10229
|
|
|
10230
|
+
// src/classes/sours.ts
|
|
10231
|
+
var Sources = class _Sources extends List {
|
|
10232
|
+
copy() {
|
|
10233
|
+
const newList = new _Sources();
|
|
10234
|
+
this.entries().forEach(([key, value]) => {
|
|
10235
|
+
newList.item(key, value);
|
|
10236
|
+
});
|
|
10237
|
+
return newList;
|
|
10238
|
+
}
|
|
10239
|
+
except(item) {
|
|
10240
|
+
return this.copy().delete(item);
|
|
10241
|
+
}
|
|
10242
|
+
};
|
|
10243
|
+
|
|
10230
10244
|
// src/classes/gedcom.ts
|
|
10231
10245
|
var isObjectPatch = (value) => {
|
|
10232
10246
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
@@ -11147,20 +11161,6 @@ var Repositories = class _Repositories extends List {
|
|
|
11147
11161
|
}
|
|
11148
11162
|
};
|
|
11149
11163
|
|
|
11150
|
-
// src/classes/sours.ts
|
|
11151
|
-
var Sources = class _Sources extends List {
|
|
11152
|
-
copy() {
|
|
11153
|
-
const newList = new _Sources();
|
|
11154
|
-
this.entries().forEach(([key, value]) => {
|
|
11155
|
-
newList.item(key, value);
|
|
11156
|
-
});
|
|
11157
|
-
return newList;
|
|
11158
|
-
}
|
|
11159
|
-
except(item) {
|
|
11160
|
-
return this.copy().delete(item);
|
|
11161
|
-
}
|
|
11162
|
-
};
|
|
11163
|
-
|
|
11164
11164
|
// src/classes/subms.ts
|
|
11165
11165
|
var Submitters = class _Submitters extends List {
|
|
11166
11166
|
copy() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treeviz/gedcom-parser",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.28",
|
|
4
4
|
"description": "Lightweight, pluggable GEDCOM parser for JavaScript/TypeScript with optional caching and place matching. Zero browser dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|