@treeviz/gedcom-parser 2.0.0 → 2.0.1

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.
@@ -1,2 +1,2 @@
1
- export { a as Common, b as CommonDate, c as CommonName, d as CommonNote, h as CustomTags, E as Existed, F as Fam, j as FamType, k as Families, l as FamilySearchMatch, m as FamilySearchSource, G as GedCom, p as GedComType, q as GenealogyMember, s as GenerationIndiType, t as GenerationSpouseType, a8 as Indi, a9 as IndiGenealogy, aa as IndiGenealogyGenerations, ab as IndiGenealogyResult, ad as IndiMarker, ae as IndiTree, af as IndiType, ag as Individuals, ak as List, am as MemberMain, an as MemberSide, ar as NonNullIndiGenealogyResult, at as Obje, av as ObjeType, aw as Objects, aB as Path, aC as PathItem, aH as ProfilePicture, aI as ProxyOriginal, aJ as Queue, aK as QueueItem, aN as ReducedPath, aP as Repo, aR as RepoType, aS as Repositories, aV as Sour, aX as SourType, aY as Sources, a_ as Subm, b0 as SubmType, b1 as Submitters, b4 as TreeMember, b6 as createCommon, b7 as createCommonDate, b8 as createCommonName, b9 as createCommonNote, ba as createFam, bb as createGedCom, bc as createIndi, bd as createObje, be as createProxy, bf as createRepo, bg as createSour, bh as createSubm, bn as getListTag, bp as getValidKey, bq as getValidKeys, br as getValidTag, bs as idGetter, bu as isCommonDate, bv as isGedcomString, bw as isId, by as isOnlyMainProp, bA as isValidKey, bB as mergeGedcoms, bF as validateGedcomContent } from '../index-CzYZg44D.js';
1
+ export { a as Common, b as CommonDate, c as CommonName, d as CommonNote, h as CustomTags, E as Existed, F as Fam, j as FamType, k as Families, l as FamilySearchMatch, m as FamilySearchSource, G as GedCom, p as GedComType, q as GenealogyMember, s as GenerationIndiType, t as GenerationSpouseType, a8 as Indi, a9 as IndiGenealogy, aa as IndiGenealogyGenerations, ab as IndiGenealogyResult, ad as IndiMarker, ae as IndiTree, af as IndiType, ag as Individuals, ak as List, am as MemberMain, an as MemberSide, ar as NonNullIndiGenealogyResult, at as Obje, av as ObjeType, aw as Objects, aB as Path, aC as PathItem, aH as ProfilePicture, aI as ProxyOriginal, aJ as Queue, aK as QueueItem, aN as ReducedPath, aP as Repo, aR as RepoType, aS as Repositories, aV as Sour, aX as SourType, aY as Sources, a_ as Subm, b0 as SubmType, b1 as Submitters, b4 as TreeMember, b6 as createCommon, b7 as createCommonDate, b8 as createCommonName, b9 as createCommonNote, ba as createFam, bb as createGedCom, bc as createIndi, bd as createObje, be as createProxy, bf as createRepo, bg as createSour, bh as createSubm, bn as getListTag, bp as getValidKey, bq as getValidKeys, br as getValidTag, bs as idGetter, bu as isCommonDate, bv as isGedcomString, bw as isId, by as isOnlyMainProp, bA as isValidKey, bB as mergeGedcoms, bF as validateGedcomContent } from '../index-B3Po1Kaw.js';
2
2
  import 'date-fns';
@@ -4645,7 +4645,7 @@ var Indi = class extends Common {
4645
4645
  title,
4646
4646
  url,
4647
4647
  contentType: type,
4648
- downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName().replaceAll(" ", "-") || ""}_${(title || key.replaceAll("@", "").toString()).replaceAll(" ", "-")}`
4648
+ downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName()?.replaceAll(" ", "-") || ""}_${(title || key.replaceAll("@", "").toString()).replaceAll(" ", "-")}`
4649
4649
  };
4650
4650
  }
4651
4651
  })
@@ -4674,7 +4674,7 @@ var Indi = class extends Common {
4674
4674
  const deathObj = this.get("DEAT.OBJE")?.toList().copy();
4675
4675
  objeList?.merge(birthObj).merge(deathObj);
4676
4676
  (this.get("FAMS")?.toValueList().values() ?? []).concat(this.get("FAMC")?.toValueList().values() ?? []).forEach((fam) => {
4677
- objeList.merge(fam?.get("MARR.OBJE"));
4677
+ objeList?.merge(fam?.get("MARR.OBJE"));
4678
4678
  });
4679
4679
  objeList?.forEach((o, index) => {
4680
4680
  if (!o) {
@@ -4700,7 +4700,7 @@ var Indi = class extends Common {
4700
4700
  title,
4701
4701
  url,
4702
4702
  contentType: type,
4703
- downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName().replaceAll(" ", "-") || ""}_${(title || key.replaceAll("@", "").toString()).replaceAll(" ", "-")}`
4703
+ downloadName: `${this.id.replaceAll("@", "")}_${this.toNaturalName()?.replaceAll(" ", "-") || ""}_${(title || key.replaceAll("@", "").toString()).replaceAll(" ", "-")}`
4704
4704
  };
4705
4705
  }
4706
4706
  });
@@ -4798,14 +4798,11 @@ var Indi = class extends Common {
4798
4798
  const sourList = this.get("SOUR")?.toList().copy();
4799
4799
  sourList?.forEach((sour) => {
4800
4800
  const sourObje = sour?.get("OBJE")?.toList();
4801
- objeList.merge(sourObje);
4801
+ objeList?.merge(sourObje);
4802
4802
  });
4803
- if (!objeList || objeList.length === 0) {
4804
- return void 0;
4805
- }
4806
4803
  const rfn = this.get("RFN")?.toValue();
4807
4804
  const geniId = rfn?.replace(/^geni:/, "") || "unknown";
4808
- objeList.forEach((obje, index) => {
4805
+ objeList?.forEach((obje, index) => {
4809
4806
  if (!obje) {
4810
4807
  return;
4811
4808
  }
@@ -4844,7 +4841,7 @@ var Indi = class extends Common {
4844
4841
  return list;
4845
4842
  }
4846
4843
  const rfn = this.get("RFN")?.toValue();
4847
- const treeId = rfn || "universal";
4844
+ const treeId = this.getUniversalTreeId() || rfn || "universal";
4848
4845
  objeList.forEach((obje, index) => {
4849
4846
  if (!obje) {
4850
4847
  return;
@@ -6254,7 +6251,7 @@ var createIndi = (gedcom, id, main, parent) => {
6254
6251
 
6255
6252
  // package.json
6256
6253
  var package_default = {
6257
- version: "2.0.0"};
6254
+ version: "2.0.1"};
6258
6255
 
6259
6256
  // src/utils/get-product-details.ts
6260
6257
  var getVersion = () => package_default.version;