@treeviz/gedcom-parser 1.0.13 → 1.0.15
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/index.d.ts +2 -28
- package/dist/classes/index.js +6713 -21
- package/dist/classes/index.js.map +1 -0
- package/dist/cli/index.d.ts +0 -2
- package/dist/cli/index.js +7826 -24
- package/dist/cli/index.js.map +1 -0
- package/dist/constants/index.d.ts +49 -4
- package/dist/constants/index.js +5797 -4
- package/dist/constants/index.js.map +1 -0
- package/dist/factories/index.d.ts +202 -13
- package/dist/factories/index.js +5782 -8
- package/dist/factories/index.js.map +1 -0
- package/dist/index-BvW-KWJP.d.ts +1654 -0
- package/dist/index.d.ts +9 -28
- package/dist/index.js +7380 -35
- package/dist/index.js.map +1 -0
- package/dist/interfaces/index.d.ts +2 -12
- package/dist/interfaces/index.js +3 -1
- package/dist/interfaces/index.js.map +1 -0
- package/dist/kinship-translator/index.d.ts +146 -11
- package/dist/kinship-translator/index.js +5727 -9
- package/dist/kinship-translator/index.js.map +1 -0
- package/dist/place-parser-RlXCXZ8F.d.ts +37 -0
- package/dist/structures/index.d.ts +25 -27
- package/dist/structures/index.js +3 -1
- package/dist/structures/index.js.map +1 -0
- package/dist/types/index.d.ts +69 -8
- package/dist/types/index.js +31 -6
- package/dist/types/index.js.map +1 -0
- package/dist/utils/index.d.ts +91 -18
- package/dist/utils/index.js +6953 -17
- package/dist/utils/index.js.map +1 -0
- package/package.json +4 -3
- package/dist/classes/common.d.ts +0 -91
- package/dist/classes/common.d.ts.map +0 -1
- package/dist/classes/common.js +0 -488
- package/dist/classes/date.d.ts +0 -27
- package/dist/classes/date.d.ts.map +0 -1
- package/dist/classes/date.js +0 -178
- package/dist/classes/fam.d.ts +0 -19
- package/dist/classes/fam.d.ts.map +0 -1
- package/dist/classes/fam.js +0 -38
- package/dist/classes/fams.d.ts +0 -16
- package/dist/classes/fams.d.ts.map +0 -1
- package/dist/classes/fams.js +0 -41
- package/dist/classes/gedcom.d.ts +0 -139
- package/dist/classes/gedcom.d.ts.map +0 -1
- package/dist/classes/gedcom.js +0 -910
- package/dist/classes/index.d.ts.map +0 -1
- package/dist/classes/indi.d.ts +0 -323
- package/dist/classes/indi.d.ts.map +0 -1
- package/dist/classes/indi.js +0 -2131
- package/dist/classes/indis.d.ts +0 -55
- package/dist/classes/indis.d.ts.map +0 -1
- package/dist/classes/indis.js +0 -457
- package/dist/classes/list.d.ts +0 -55
- package/dist/classes/list.d.ts.map +0 -1
- package/dist/classes/list.js +0 -440
- package/dist/classes/name.d.ts +0 -20
- package/dist/classes/name.d.ts.map +0 -1
- package/dist/classes/name.js +0 -48
- package/dist/classes/note.d.ts +0 -12
- package/dist/classes/note.d.ts.map +0 -1
- package/dist/classes/note.js +0 -46
- package/dist/classes/obje.d.ts +0 -12
- package/dist/classes/obje.d.ts.map +0 -1
- package/dist/classes/obje.js +0 -81
- package/dist/classes/objes.d.ts +0 -8
- package/dist/classes/objes.d.ts.map +0 -1
- package/dist/classes/objes.js +0 -13
- package/dist/classes/repo.d.ts +0 -11
- package/dist/classes/repo.d.ts.map +0 -1
- package/dist/classes/repo.js +0 -6
- package/dist/classes/repos.d.ts +0 -8
- package/dist/classes/repos.d.ts.map +0 -1
- package/dist/classes/repos.js +0 -13
- package/dist/classes/sour.d.ts +0 -11
- package/dist/classes/sour.d.ts.map +0 -1
- package/dist/classes/sour.js +0 -6
- package/dist/classes/sours.d.ts +0 -8
- package/dist/classes/sours.d.ts.map +0 -1
- package/dist/classes/sours.js +0 -13
- package/dist/classes/subm.d.ts +0 -10
- package/dist/classes/subm.d.ts.map +0 -1
- package/dist/classes/subm.js +0 -6
- package/dist/classes/subms.d.ts +0 -8
- package/dist/classes/subms.d.ts.map +0 -1
- package/dist/classes/subms.js +0 -13
- package/dist/cli/commands/convert.d.ts +0 -3
- package/dist/cli/commands/convert.d.ts.map +0 -1
- package/dist/cli/commands/convert.js +0 -83
- package/dist/cli/commands/extract.d.ts +0 -3
- package/dist/cli/commands/extract.d.ts.map +0 -1
- package/dist/cli/commands/extract.js +0 -85
- package/dist/cli/commands/find.d.ts +0 -3
- package/dist/cli/commands/find.d.ts.map +0 -1
- package/dist/cli/commands/find.js +0 -97
- package/dist/cli/commands/info.d.ts +0 -3
- package/dist/cli/commands/info.d.ts.map +0 -1
- package/dist/cli/commands/info.js +0 -80
- package/dist/cli/commands/merge.d.ts +0 -3
- package/dist/cli/commands/merge.d.ts.map +0 -1
- package/dist/cli/commands/merge.js +0 -61
- package/dist/cli/commands/relatives.d.ts +0 -3
- package/dist/cli/commands/relatives.d.ts.map +0 -1
- package/dist/cli/commands/relatives.js +0 -107
- package/dist/cli/commands/show.d.ts +0 -3
- package/dist/cli/commands/show.d.ts.map +0 -1
- package/dist/cli/commands/show.js +0 -176
- package/dist/cli/commands/stats.d.ts +0 -3
- package/dist/cli/commands/stats.d.ts.map +0 -1
- package/dist/cli/commands/stats.js +0 -59
- package/dist/cli/commands/validate.d.ts +0 -3
- package/dist/cli/commands/validate.d.ts.map +0 -1
- package/dist/cli/commands/validate.js +0 -148
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/utils/formatters.d.ts +0 -69
- package/dist/cli/utils/formatters.d.ts.map +0 -1
- package/dist/cli/utils/formatters.js +0 -125
- package/dist/cli/utils/helpers.d.ts +0 -21
- package/dist/cli/utils/helpers.d.ts.map +0 -1
- package/dist/cli/utils/helpers.js +0 -58
- package/dist/constants/constants.d.ts +0 -14
- package/dist/constants/constants.d.ts.map +0 -1
- package/dist/constants/constants.js +0 -13
- package/dist/constants/filters.d.ts +0 -18
- package/dist/constants/filters.d.ts.map +0 -1
- package/dist/constants/filters.js +0 -44
- package/dist/constants/index.d.ts.map +0 -1
- package/dist/constants/orders.d.ts +0 -17
- package/dist/constants/orders.d.ts.map +0 -1
- package/dist/constants/orders.js +0 -240
- package/dist/factories/cache-factory.d.ts +0 -30
- package/dist/factories/cache-factory.d.ts.map +0 -1
- package/dist/factories/cache-factory.js +0 -43
- package/dist/factories/date-locale-factory.d.ts +0 -30
- package/dist/factories/date-locale-factory.d.ts.map +0 -1
- package/dist/factories/date-locale-factory.js +0 -34
- package/dist/factories/i18n-factory.d.ts +0 -40
- package/dist/factories/i18n-factory.d.ts.map +0 -1
- package/dist/factories/i18n-factory.js +0 -44
- package/dist/factories/index.d.ts.map +0 -1
- package/dist/factories/kinship-factory.d.ts +0 -38
- package/dist/factories/kinship-factory.d.ts.map +0 -1
- package/dist/factories/kinship-factory.js +0 -35
- package/dist/factories/place-parser-provider.d.ts +0 -32
- package/dist/factories/place-parser-provider.d.ts.map +0 -1
- package/dist/factories/place-parser-provider.js +0 -35
- package/dist/factories/place-translator-provider.d.ts +0 -32
- package/dist/factories/place-translator-provider.d.ts.map +0 -1
- package/dist/factories/place-translator-provider.js +0 -35
- package/dist/index.d.ts.map +0 -1
- package/dist/interfaces/common.d.ts +0 -43
- package/dist/interfaces/common.d.ts.map +0 -1
- package/dist/interfaces/common.js +0 -1
- package/dist/interfaces/fam.d.ts +0 -11
- package/dist/interfaces/fam.d.ts.map +0 -1
- package/dist/interfaces/fam.js +0 -1
- package/dist/interfaces/fams.d.ts +0 -9
- package/dist/interfaces/fams.d.ts.map +0 -1
- package/dist/interfaces/fams.js +0 -1
- package/dist/interfaces/gedcom.d.ts +0 -30
- package/dist/interfaces/gedcom.d.ts.map +0 -1
- package/dist/interfaces/gedcom.js +0 -1
- package/dist/interfaces/index.d.ts.map +0 -1
- package/dist/interfaces/indi.d.ts +0 -113
- package/dist/interfaces/indi.d.ts.map +0 -1
- package/dist/interfaces/indi.js +0 -1
- package/dist/interfaces/indis.d.ts +0 -31
- package/dist/interfaces/indis.d.ts.map +0 -1
- package/dist/interfaces/indis.js +0 -1
- package/dist/interfaces/list.d.ts +0 -52
- package/dist/interfaces/list.d.ts.map +0 -1
- package/dist/interfaces/list.js +0 -1
- package/dist/interfaces/obje.d.ts +0 -7
- package/dist/interfaces/obje.d.ts.map +0 -1
- package/dist/interfaces/obje.js +0 -1
- package/dist/interfaces/repo.d.ts +0 -7
- package/dist/interfaces/repo.d.ts.map +0 -1
- package/dist/interfaces/repo.js +0 -1
- package/dist/interfaces/sour.d.ts +0 -7
- package/dist/interfaces/sour.d.ts.map +0 -1
- package/dist/interfaces/sour.js +0 -1
- package/dist/interfaces/subm.d.ts +0 -6
- package/dist/interfaces/subm.d.ts.map +0 -1
- package/dist/interfaces/subm.js +0 -1
- package/dist/kinship-translator/index.d.ts.map +0 -1
- package/dist/kinship-translator/kinship-translator.basic.d.ts +0 -30
- package/dist/kinship-translator/kinship-translator.basic.d.ts.map +0 -1
- package/dist/kinship-translator/kinship-translator.basic.js +0 -74
- package/dist/kinship-translator/kinship-translator.d.ts +0 -26
- package/dist/kinship-translator/kinship-translator.d.ts.map +0 -1
- package/dist/kinship-translator/kinship-translator.de.d.ts +0 -18
- package/dist/kinship-translator/kinship-translator.de.d.ts.map +0 -1
- package/dist/kinship-translator/kinship-translator.de.js +0 -180
- package/dist/kinship-translator/kinship-translator.en.d.ts +0 -18
- package/dist/kinship-translator/kinship-translator.en.d.ts.map +0 -1
- package/dist/kinship-translator/kinship-translator.en.js +0 -182
- package/dist/kinship-translator/kinship-translator.es.d.ts +0 -18
- package/dist/kinship-translator/kinship-translator.es.d.ts.map +0 -1
- package/dist/kinship-translator/kinship-translator.es.js +0 -181
- package/dist/kinship-translator/kinship-translator.fr.d.ts +0 -18
- package/dist/kinship-translator/kinship-translator.fr.d.ts.map +0 -1
- package/dist/kinship-translator/kinship-translator.fr.js +0 -181
- package/dist/kinship-translator/kinship-translator.hu.d.ts +0 -19
- package/dist/kinship-translator/kinship-translator.hu.d.ts.map +0 -1
- package/dist/kinship-translator/kinship-translator.hu.js +0 -226
- package/dist/kinship-translator/kinship-translator.interface.d.ts +0 -19
- package/dist/kinship-translator/kinship-translator.interface.d.ts.map +0 -1
- package/dist/kinship-translator/kinship-translator.interface.js +0 -1
- package/dist/kinship-translator/kinship-translator.js +0 -103
- package/dist/kinship-translator/patterns.de.d.ts +0 -2
- package/dist/kinship-translator/patterns.de.d.ts.map +0 -1
- package/dist/kinship-translator/patterns.de.js +0 -14
- package/dist/kinship-translator/patterns.en.d.ts +0 -2
- package/dist/kinship-translator/patterns.en.d.ts.map +0 -1
- package/dist/kinship-translator/patterns.en.js +0 -14
- package/dist/kinship-translator/patterns.es.d.ts +0 -2
- package/dist/kinship-translator/patterns.es.d.ts.map +0 -1
- package/dist/kinship-translator/patterns.es.js +0 -14
- package/dist/kinship-translator/patterns.fr.d.ts +0 -2
- package/dist/kinship-translator/patterns.fr.d.ts.map +0 -1
- package/dist/kinship-translator/patterns.fr.js +0 -14
- package/dist/kinship-translator/patterns.hu.d.ts +0 -6
- package/dist/kinship-translator/patterns.hu.d.ts.map +0 -1
- package/dist/kinship-translator/patterns.hu.js +0 -97
- package/dist/kinship-translator/translators.d.ts +0 -6
- package/dist/kinship-translator/translators.d.ts.map +0 -1
- package/dist/kinship-translator/translators.js +0 -5
- package/dist/kinship-translator/types.d.ts +0 -9
- package/dist/kinship-translator/types.d.ts.map +0 -1
- package/dist/kinship-translator/types.js +0 -1
- package/dist/structures/address.d.ts +0 -14
- package/dist/structures/address.d.ts.map +0 -1
- package/dist/structures/address.js +0 -1
- package/dist/structures/association.d.ts +0 -13
- package/dist/structures/association.d.ts.map +0 -1
- package/dist/structures/association.js +0 -1
- package/dist/structures/change-date.d.ts +0 -8
- package/dist/structures/change-date.d.ts.map +0 -1
- package/dist/structures/change-date.js +0 -1
- package/dist/structures/creation-date.d.ts +0 -7
- package/dist/structures/creation-date.d.ts.map +0 -1
- package/dist/structures/creation-date.js +0 -1
- package/dist/structures/date.d.ts +0 -9
- package/dist/structures/date.d.ts.map +0 -1
- package/dist/structures/date.js +0 -1
- package/dist/structures/event-detail-structure.d.ts +0 -25
- package/dist/structures/event-detail-structure.d.ts.map +0 -1
- package/dist/structures/event-detail-structure.js +0 -1
- package/dist/structures/family.d.ts +0 -34
- package/dist/structures/family.d.ts.map +0 -1
- package/dist/structures/family.js +0 -1
- package/dist/structures/gedcom.d.ts +0 -59
- package/dist/structures/gedcom.d.ts.map +0 -1
- package/dist/structures/gedcom.js +0 -1
- package/dist/structures/index.d.ts.map +0 -1
- package/dist/structures/individual-event-detail-structure.d.ts +0 -9
- package/dist/structures/individual-event-detail-structure.d.ts.map +0 -1
- package/dist/structures/individual-event-detail-structure.js +0 -1
- package/dist/structures/individual-event-structure.d.ts +0 -83
- package/dist/structures/individual-event-structure.d.ts.map +0 -1
- package/dist/structures/individual-event-structure.js +0 -1
- package/dist/structures/individual.d.ts +0 -40
- package/dist/structures/individual.d.ts.map +0 -1
- package/dist/structures/individual.js +0 -1
- package/dist/structures/lds-ordinance-detail.d.ts +0 -17
- package/dist/structures/lds-ordinance-detail.d.ts.map +0 -1
- package/dist/structures/lds-ordinance-detail.js +0 -1
- package/dist/structures/lds-spouse-sealing.d.ts +0 -7
- package/dist/structures/lds-spouse-sealing.d.ts.map +0 -1
- package/dist/structures/lds-spouse-sealing.js +0 -1
- package/dist/structures/marriage-date.d.ts +0 -11
- package/dist/structures/marriage-date.d.ts.map +0 -1
- package/dist/structures/marriage-date.js +0 -1
- package/dist/structures/multimedia-link.d.ts +0 -16
- package/dist/structures/multimedia-link.d.ts.map +0 -1
- package/dist/structures/multimedia-link.js +0 -1
- package/dist/structures/non-event.d.ts +0 -12
- package/dist/structures/non-event.d.ts.map +0 -1
- package/dist/structures/non-event.js +0 -1
- package/dist/structures/note.d.ts +0 -16
- package/dist/structures/note.d.ts.map +0 -1
- package/dist/structures/note.js +0 -1
- package/dist/structures/personal-name-pieces.d.ts +0 -11
- package/dist/structures/personal-name-pieces.d.ts.map +0 -1
- package/dist/structures/personal-name-pieces.js +0 -1
- package/dist/structures/personal-name.d.ts +0 -16
- package/dist/structures/personal-name.d.ts.map +0 -1
- package/dist/structures/personal-name.js +0 -1
- package/dist/structures/place.d.ts +0 -20
- package/dist/structures/place.d.ts.map +0 -1
- package/dist/structures/place.js +0 -1
- package/dist/structures/repository.d.ts +0 -6
- package/dist/structures/repository.d.ts.map +0 -1
- package/dist/structures/repository.js +0 -1
- package/dist/structures/source-citation.d.ts +0 -27
- package/dist/structures/source-citation.d.ts.map +0 -1
- package/dist/structures/source-citation.js +0 -1
- package/dist/structures/source-repository-citation.d.ts +0 -13
- package/dist/structures/source-repository-citation.d.ts.map +0 -1
- package/dist/structures/source-repository-citation.js +0 -1
- package/dist/structures/source.d.ts +0 -28
- package/dist/structures/source.d.ts.map +0 -1
- package/dist/structures/source.js +0 -1
- package/dist/types/ancestry-media.d.ts +0 -65
- package/dist/types/ancestry-media.d.ts.map +0 -1
- package/dist/types/ancestry-media.js +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/settings.d.ts +0 -12
- package/dist/types/settings.d.ts.map +0 -1
- package/dist/types/settings.js +0 -1
- package/dist/types/types.d.ts +0 -225
- package/dist/types/types.d.ts.map +0 -1
- package/dist/types/types.js +0 -26
- package/dist/utils/cache.d.ts +0 -22
- package/dist/utils/cache.d.ts.map +0 -1
- package/dist/utils/cache.js +0 -57
- package/dist/utils/common-creator.d.ts +0 -13
- package/dist/utils/common-creator.d.ts.map +0 -1
- package/dist/utils/common-creator.js +0 -72
- package/dist/utils/date-formatter.d.ts +0 -35
- package/dist/utils/date-formatter.d.ts.map +0 -1
- package/dist/utils/date-formatter.js +0 -207
- package/dist/utils/get-all-prop.d.ts +0 -4
- package/dist/utils/get-all-prop.d.ts.map +0 -1
- package/dist/utils/get-all-prop.js +0 -5
- package/dist/utils/get-family-with.d.ts +0 -5
- package/dist/utils/get-family-with.d.ts.map +0 -1
- package/dist/utils/get-family-with.js +0 -11
- package/dist/utils/get-places.d.ts +0 -21
- package/dist/utils/get-places.d.ts.map +0 -1
- package/dist/utils/get-places.js +0 -77
- package/dist/utils/get-product-details.d.ts +0 -4
- package/dist/utils/get-product-details.d.ts.map +0 -1
- package/dist/utils/get-product-details.js +0 -6
- package/dist/utils/get-raw-size.d.ts +0 -2
- package/dist/utils/get-raw-size.d.ts.map +0 -1
- package/dist/utils/get-raw-size.js +0 -3
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/logger.d.ts +0 -3
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -11
- package/dist/utils/name-formatter.d.ts +0 -10
- package/dist/utils/name-formatter.d.ts.map +0 -1
- package/dist/utils/name-formatter.js +0 -45
- package/dist/utils/nested-group.d.ts +0 -4
- package/dist/utils/nested-group.d.ts.map +0 -1
- package/dist/utils/nested-group.js +0 -34
- package/dist/utils/ordinalize.d.ts +0 -3
- package/dist/utils/ordinalize.d.ts.map +0 -1
- package/dist/utils/ordinalize.js +0 -104
- package/dist/utils/parser.d.ts +0 -17
- package/dist/utils/parser.d.ts.map +0 -1
- package/dist/utils/parser.js +0 -321
- package/dist/utils/place-parser.d.ts +0 -16
- package/dist/utils/place-parser.d.ts.map +0 -1
- package/dist/utils/place-parser.js +0 -46
- package/dist/utils/place-translator.d.ts +0 -6
- package/dist/utils/place-translator.d.ts.map +0 -1
- package/dist/utils/place-translator.js +0 -8
- package/dist/utils/place-types.d.ts +0 -27
- package/dist/utils/place-types.d.ts.map +0 -1
- package/dist/utils/place-types.js +0 -14
- package/dist/utils/range.d.ts +0 -19
- package/dist/utils/range.d.ts.map +0 -1
- package/dist/utils/range.js +0 -265
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { nameFormatter } from "../utils/name-formatter.js";
|
|
2
|
-
import { hungarianOrdinalize } from "../utils/ordinalize.js";
|
|
3
|
-
import KinshipTranslatorBasic from "./kinship-translator.basic.js";
|
|
4
|
-
import { InLawsHu, casesHu, parentRelationsHu } from "./patterns.hu.js";
|
|
5
|
-
export default class KinshipTranslatorHU extends KinshipTranslatorBasic {
|
|
6
|
-
directPrefix(l) {
|
|
7
|
-
const level = l === undefined ? Math.abs(this.pathN?.level ?? 0) : l;
|
|
8
|
-
if (level <= 1) {
|
|
9
|
-
return "";
|
|
10
|
-
}
|
|
11
|
-
if (level === 2) {
|
|
12
|
-
return "nagy";
|
|
13
|
-
}
|
|
14
|
-
if (level === 3) {
|
|
15
|
-
return "déd";
|
|
16
|
-
}
|
|
17
|
-
if (level === 4) {
|
|
18
|
-
return "ük";
|
|
19
|
-
}
|
|
20
|
-
if (level === 5) {
|
|
21
|
-
return "szép";
|
|
22
|
-
}
|
|
23
|
-
if (level === 6) {
|
|
24
|
-
return "ős";
|
|
25
|
-
}
|
|
26
|
-
return `${level - 5}. ős`;
|
|
27
|
-
}
|
|
28
|
-
caseReplacer(relation, to, from = "nominativus", mod = "$") {
|
|
29
|
-
let newRelation = relation;
|
|
30
|
-
Object.keys(casesHu[from]).forEach((c) => {
|
|
31
|
-
newRelation = newRelation.replace(new RegExp(`(?<word1>${c}(?<mod>${mod}))`), (m, ...rest) => {
|
|
32
|
-
const groups = rest[rest.length - 1];
|
|
33
|
-
const word = groups?.word1 || groups?.word2;
|
|
34
|
-
if (!word) {
|
|
35
|
-
return m;
|
|
36
|
-
}
|
|
37
|
-
const toReplace = casesHu[from][word.trim()][to];
|
|
38
|
-
return toReplace ? `${toReplace}${groups.mod || ""}` : m;
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
return newRelation;
|
|
42
|
-
}
|
|
43
|
-
indirect() {
|
|
44
|
-
let degree = Math.abs(this.pathN?.degree ?? 0);
|
|
45
|
-
if (degree > 0) {
|
|
46
|
-
degree = degree - 1;
|
|
47
|
-
}
|
|
48
|
-
if (degree === 1) {
|
|
49
|
-
return `unokatestvér`;
|
|
50
|
-
}
|
|
51
|
-
return `${hungarianOrdinalize(degree)}unokatestvér`;
|
|
52
|
-
}
|
|
53
|
-
removal() {
|
|
54
|
-
const level = this.pathN?.level ?? 0;
|
|
55
|
-
let degree = Math.abs(this.pathN?.degree ?? 0);
|
|
56
|
-
if (degree > 0) {
|
|
57
|
-
degree = degree - 1;
|
|
58
|
-
}
|
|
59
|
-
if (!degree || (Math.abs(level) >= 1 && Math.abs(level) <= 6)) {
|
|
60
|
-
return level < 0 ? this.nibling() : this.auncle();
|
|
61
|
-
}
|
|
62
|
-
return `${hungarianOrdinalize(degree)}unokatestvér ${level}x eltávolítva`;
|
|
63
|
-
}
|
|
64
|
-
auncle() {
|
|
65
|
-
const level = this.pathN?.level ?? 0;
|
|
66
|
-
const degree = Math.abs(this.pathN?.degree ?? 0);
|
|
67
|
-
let degreeString = degree > 1 ? hungarianOrdinalize(degree) : "";
|
|
68
|
-
if (degreeString) {
|
|
69
|
-
degreeString = `${degreeString}-`;
|
|
70
|
-
}
|
|
71
|
-
let prefix = this.directPrefix();
|
|
72
|
-
const origPrefix = prefix;
|
|
73
|
-
if (level === 2) {
|
|
74
|
-
prefix = "nagy-";
|
|
75
|
-
}
|
|
76
|
-
if (this.personN?.isMale()) {
|
|
77
|
-
return `${degreeString}${prefix}nagybácsi`;
|
|
78
|
-
}
|
|
79
|
-
if (this.personN?.isFemale()) {
|
|
80
|
-
return `${degreeString}${prefix}nagynéni`;
|
|
81
|
-
}
|
|
82
|
-
return `${origPrefix}szülő ${degreeString ? `${degreeString}unoka` : ""}testvére`;
|
|
83
|
-
}
|
|
84
|
-
nibling() {
|
|
85
|
-
const level = Math.abs(this.pathN?.level ?? 0);
|
|
86
|
-
const degree = Math.abs(this.pathN?.degree ?? 0);
|
|
87
|
-
const ordinalized = degree > 1 ? hungarianOrdinalize(degree) : "";
|
|
88
|
-
let degreeString = ordinalized;
|
|
89
|
-
if (degreeString) {
|
|
90
|
-
degreeString = `${degreeString}-`;
|
|
91
|
-
}
|
|
92
|
-
const prefix = this.directPrefix(level + 1);
|
|
93
|
-
const origPrefix = this.directPrefix();
|
|
94
|
-
if (this.personN?.isMale()) {
|
|
95
|
-
return `${degreeString}${level === 1 ? origPrefix : prefix}unokaöcs`;
|
|
96
|
-
}
|
|
97
|
-
if (this.personN?.isFemale()) {
|
|
98
|
-
return `${degreeString}${level === 1 ? origPrefix : prefix}unokahúg`;
|
|
99
|
-
}
|
|
100
|
-
if (level <= 1) {
|
|
101
|
-
return `${ordinalized ? `${ordinalized}unoka` : ""}testvér gyermeke`;
|
|
102
|
-
}
|
|
103
|
-
return `${ordinalized ? `${ordinalized}unoka` : ""}testvér ${origPrefix.replace(/nagy$/, "")}unokája`;
|
|
104
|
-
}
|
|
105
|
-
parent() {
|
|
106
|
-
const prefix = this.directPrefix();
|
|
107
|
-
if (this.personN?.isMale()) {
|
|
108
|
-
return `${prefix}apa`;
|
|
109
|
-
}
|
|
110
|
-
if (this.personN?.isFemale()) {
|
|
111
|
-
return `${prefix}anya`;
|
|
112
|
-
}
|
|
113
|
-
return `${prefix}szülő`;
|
|
114
|
-
}
|
|
115
|
-
child() {
|
|
116
|
-
const level = Math.abs(this.pathN?.level ?? 0);
|
|
117
|
-
if (level <= 1) {
|
|
118
|
-
return "gyermek";
|
|
119
|
-
}
|
|
120
|
-
const prefix = this.directPrefix();
|
|
121
|
-
return `${prefix.replace(/nagy$/, "")}unoka`;
|
|
122
|
-
}
|
|
123
|
-
sibling() {
|
|
124
|
-
const parents1 = this.person1?.getBiologicalParents();
|
|
125
|
-
const parentsN = this.personN?.getBiologicalParents();
|
|
126
|
-
const inter = parents1?.intersection(parentsN);
|
|
127
|
-
// TODO if both has one parent in tree, this returns with an invalid/unsure half-blood state
|
|
128
|
-
if (!inter || inter.length < 2) {
|
|
129
|
-
return "féltestvér";
|
|
130
|
-
}
|
|
131
|
-
return "testvér";
|
|
132
|
-
}
|
|
133
|
-
spouse() {
|
|
134
|
-
if (this.personN?.isMale()) {
|
|
135
|
-
return "férj";
|
|
136
|
-
}
|
|
137
|
-
if (this.personN?.isFemale()) {
|
|
138
|
-
return "feleség";
|
|
139
|
-
}
|
|
140
|
-
return "házastárs";
|
|
141
|
-
}
|
|
142
|
-
ofSpouse(relation) {
|
|
143
|
-
if (!relation) {
|
|
144
|
-
return "";
|
|
145
|
-
}
|
|
146
|
-
const spouse = this.path?.[1].indi;
|
|
147
|
-
let spouseType = "házastárs";
|
|
148
|
-
if (spouse?.isMale()) {
|
|
149
|
-
spouseType = "férj";
|
|
150
|
-
}
|
|
151
|
-
if (spouse?.isFemale()) {
|
|
152
|
-
spouseType = "feleség";
|
|
153
|
-
}
|
|
154
|
-
return `${spouseType} ${this.caseReplacer(relation, "possessivus")}`;
|
|
155
|
-
}
|
|
156
|
-
spouseOf(relation) {
|
|
157
|
-
if (!relation) {
|
|
158
|
-
return "";
|
|
159
|
-
}
|
|
160
|
-
const spouse = this.path?.[this.path.length - 1].indi;
|
|
161
|
-
let spouseType = "házastársa";
|
|
162
|
-
if (spouse?.isMale()) {
|
|
163
|
-
spouseType = "férje";
|
|
164
|
-
}
|
|
165
|
-
if (spouse?.isFemale()) {
|
|
166
|
-
spouseType = "felesége";
|
|
167
|
-
}
|
|
168
|
-
return `${this.caseReplacer(relation, "nominativus", "possessivus")} ${spouseType}`;
|
|
169
|
-
}
|
|
170
|
-
of(relation) {
|
|
171
|
-
const formattedName = nameFormatter(this.path?.[0]?.indi, {
|
|
172
|
-
nameOrder: "last-first",
|
|
173
|
-
});
|
|
174
|
-
let name = formattedName.inOrder.filter(Boolean).join(" ");
|
|
175
|
-
if (this.displayName === "none") {
|
|
176
|
-
name = "";
|
|
177
|
-
}
|
|
178
|
-
else if (this.displayName === "givenname") {
|
|
179
|
-
name = formattedName.givenname;
|
|
180
|
-
}
|
|
181
|
-
else if (this.displayName === "surname") {
|
|
182
|
-
name = `${formattedName.surname}`;
|
|
183
|
-
}
|
|
184
|
-
const isSpouse = this.path?.[1].kinship === "spouse" ||
|
|
185
|
-
this.path?.[this.path.length - 1].kinship === "spouse";
|
|
186
|
-
if (!name || !relation) {
|
|
187
|
-
return relation ?? "";
|
|
188
|
-
}
|
|
189
|
-
if (isSpouse) {
|
|
190
|
-
return `${name} ${this.caseReplacer(this.caseReplacer(relation, "dativus", "nominativus", " "), "possessivus")}`;
|
|
191
|
-
}
|
|
192
|
-
return `${name} ${this.caseReplacer(this.caseReplacer(relation, "possessivus", "nominativus", " "), "possessivus")}`;
|
|
193
|
-
}
|
|
194
|
-
inLaw(relation) {
|
|
195
|
-
let inLawRelation = relation;
|
|
196
|
-
Object.keys(InLawsHu).find((pattern) => {
|
|
197
|
-
const regex = new RegExp(`(?<space> )(?<word1>${pattern})$|^(?<word2>${pattern.replace("?<mod1>", "?<mod2>")})$`);
|
|
198
|
-
if (relation?.match(regex)) {
|
|
199
|
-
inLawRelation = relation?.replace(regex, (m, ...rest) => {
|
|
200
|
-
const groups = rest[rest.length - 1];
|
|
201
|
-
const word = groups?.word1 || groups?.word2;
|
|
202
|
-
const mod = groups?.mod1 || groups?.mod2;
|
|
203
|
-
if (!word) {
|
|
204
|
-
return m;
|
|
205
|
-
}
|
|
206
|
-
let toReplace = InLawsHu[word.trim()] || InLawsHu[pattern];
|
|
207
|
-
if (typeof toReplace === "function") {
|
|
208
|
-
toReplace = toReplace(this.personN) ?? "";
|
|
209
|
-
}
|
|
210
|
-
return toReplace
|
|
211
|
-
? `${groups.space || ""}${mod || ""}${toReplace}`
|
|
212
|
-
: m;
|
|
213
|
-
});
|
|
214
|
-
return true;
|
|
215
|
-
}
|
|
216
|
-
return false;
|
|
217
|
-
});
|
|
218
|
-
return inLawRelation ?? "";
|
|
219
|
-
}
|
|
220
|
-
relationType(relation) {
|
|
221
|
-
if (!relation || !this.pathN?.relation) {
|
|
222
|
-
return relation ?? "";
|
|
223
|
-
}
|
|
224
|
-
return `${parentRelationsHu[this.pathN.relation]} ${relation}`;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export type Kinship = "self" | "spouse" | "child" | "parent";
|
|
2
|
-
interface IKinshipTranslator {
|
|
3
|
-
isOfSpouse: boolean;
|
|
4
|
-
isSpouseOf: boolean;
|
|
5
|
-
displayName: "none" | "givenname" | "surname" | "all";
|
|
6
|
-
parent: () => string | undefined;
|
|
7
|
-
child: () => string | undefined;
|
|
8
|
-
sibling: () => string | undefined;
|
|
9
|
-
spouse: () => string | undefined;
|
|
10
|
-
indirect: () => string | undefined;
|
|
11
|
-
removal: () => string | undefined;
|
|
12
|
-
inLaw: (relation?: string) => string | undefined;
|
|
13
|
-
ofSpouse: (relation?: string) => string | undefined;
|
|
14
|
-
spouseOf: (relation?: string) => string | undefined;
|
|
15
|
-
relationType: (relation?: string) => string | undefined;
|
|
16
|
-
of: (relation?: string) => string | undefined;
|
|
17
|
-
}
|
|
18
|
-
export default IKinshipTranslator;
|
|
19
|
-
//# sourceMappingURL=kinship-translator.interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kinship-translator.interface.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/kinship-translator.interface.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC7D,UAAU,kBAAkB;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,KAAK,CAAC;IAEtD,MAAM,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAEjC,KAAK,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAEhC,OAAO,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAElC,MAAM,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAEjC,QAAQ,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAEnC,OAAO,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAElC,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAEjD,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAEpD,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAEpD,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAExD,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAC9C;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import * as translators from "./translators.js";
|
|
2
|
-
export default class KinshipTranslator {
|
|
3
|
-
constructor(person1, person2, lang = "en", entirePath, displayName = "givenname") {
|
|
4
|
-
this.displayName = displayName;
|
|
5
|
-
this.lang = lang;
|
|
6
|
-
this.entirePath = entirePath;
|
|
7
|
-
this.person1 = person1;
|
|
8
|
-
this.person2 =
|
|
9
|
-
typeof person2 === "string"
|
|
10
|
-
? this.person1.getGedcom()?.indi(person2)
|
|
11
|
-
: person2;
|
|
12
|
-
this.path = this.person1.path(this.person2);
|
|
13
|
-
if (translators[lang]) {
|
|
14
|
-
this.translator = new translators[lang](this.path ?? [], displayName);
|
|
15
|
-
}
|
|
16
|
-
// Fallback
|
|
17
|
-
if (!this.translator) {
|
|
18
|
-
// eslint-disable-next-line new-cap
|
|
19
|
-
this.translator = new translators.en(this.path ?? [], displayName);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
get path0() {
|
|
23
|
-
return this.path?.[0];
|
|
24
|
-
}
|
|
25
|
-
get path1() {
|
|
26
|
-
return this.path?.[1];
|
|
27
|
-
}
|
|
28
|
-
get pathM() {
|
|
29
|
-
return this.path?.[this.path.length - 2];
|
|
30
|
-
}
|
|
31
|
-
get pathN() {
|
|
32
|
-
return this.path?.[this.path.length - 1];
|
|
33
|
-
}
|
|
34
|
-
direct() {
|
|
35
|
-
if (this.pathN?.level === 0 && this.pathN.degree === 0) {
|
|
36
|
-
return this.translator?.spouse();
|
|
37
|
-
}
|
|
38
|
-
if (this.pathN?.level === 0 && this.pathN.degree === 1) {
|
|
39
|
-
return this.translator?.sibling();
|
|
40
|
-
}
|
|
41
|
-
if ((this.pathN?.level ?? 0) > 0 && this.pathN?.degree === 0) {
|
|
42
|
-
return this.translator?.parent();
|
|
43
|
-
}
|
|
44
|
-
if ((this.pathN?.level ?? 0) < 0 && this.pathN?.degree === 0) {
|
|
45
|
-
return this.translator?.child();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
indirect() {
|
|
49
|
-
return this.translator?.indirect();
|
|
50
|
-
}
|
|
51
|
-
removal() {
|
|
52
|
-
return this.translator?.removal();
|
|
53
|
-
}
|
|
54
|
-
translate(showMainPerson) {
|
|
55
|
-
if (this.entirePath) {
|
|
56
|
-
const path = this.path?.map((path, index) => ({
|
|
57
|
-
id: path.indi.id,
|
|
58
|
-
gen: path.level,
|
|
59
|
-
absolute: this.person1.kinship(path.indi.id, showMainPerson, this.lang, false, this.displayName),
|
|
60
|
-
relative: this.path?.[index - 1]?.indi.kinship(path.indi.id, showMainPerson, this.lang, false, this.displayName),
|
|
61
|
-
}));
|
|
62
|
-
return path;
|
|
63
|
-
}
|
|
64
|
-
const person1 = this.path0;
|
|
65
|
-
const person2 = this.path1;
|
|
66
|
-
const personM = this.pathM;
|
|
67
|
-
const personN = this.pathN;
|
|
68
|
-
if (!person1 || !person2 || !personM || !personN) {
|
|
69
|
-
return "";
|
|
70
|
-
}
|
|
71
|
-
if (person2.kinship === "spouse" &&
|
|
72
|
-
person2.indi.id !== personN.indi.id) {
|
|
73
|
-
this.translator && (this.translator.isOfSpouse = true);
|
|
74
|
-
}
|
|
75
|
-
else if (personN.kinship === "spouse" &&
|
|
76
|
-
person2.indi.id !== personN.indi.id) {
|
|
77
|
-
this.translator && (this.translator.isSpouseOf = true);
|
|
78
|
-
}
|
|
79
|
-
let relation;
|
|
80
|
-
if (personN.degree === 0 ||
|
|
81
|
-
(personN.degree === 1 && personN.level === 0)) {
|
|
82
|
-
relation = this.direct();
|
|
83
|
-
}
|
|
84
|
-
else if (personN.level === 0) {
|
|
85
|
-
relation = this.indirect();
|
|
86
|
-
}
|
|
87
|
-
else if (personN.level !== 0) {
|
|
88
|
-
relation = this.removal();
|
|
89
|
-
}
|
|
90
|
-
relation = this.translator?.relationType(relation);
|
|
91
|
-
if (this.translator?.isOfSpouse) {
|
|
92
|
-
relation = this.translator?.ofSpouse(relation);
|
|
93
|
-
}
|
|
94
|
-
else if (this.translator?.isSpouseOf) {
|
|
95
|
-
relation = this.translator?.spouseOf(relation);
|
|
96
|
-
}
|
|
97
|
-
relation = this.translator?.inLaw(relation);
|
|
98
|
-
if (showMainPerson && relation) {
|
|
99
|
-
relation = this.translator?.of(relation);
|
|
100
|
-
}
|
|
101
|
-
return relation ?? "";
|
|
102
|
-
}
|
|
103
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"patterns.de.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/patterns.de.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAe3C,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export const InLawsDe = {
|
|
2
|
-
"Ehepartner von (kind|tochter|sohn)": "Schwiegerkind",
|
|
3
|
-
"Ehefrau von (kind|tochter|sohn)": "Schwiegertochter",
|
|
4
|
-
"Ehemann von (kind|tochter|sohn)": "Schwiegersohn",
|
|
5
|
-
"mutter des (Ehepartner|Ehefrau|Ehemann)s": "Schwiegermutter",
|
|
6
|
-
"vater des (Ehepartner|Ehefrau|Ehemann)s": "Schwiegervater",
|
|
7
|
-
"elternteil des (Ehepartner|Ehefrau|Ehemann)s": "Schwiegerelternteil",
|
|
8
|
-
"Ehefrau von (Halb)?(geschwister|schwester|bruder)": "Schwägerin",
|
|
9
|
-
"Ehemann von (Halb)?(geschwister|schwester|bruder)": "Schwager",
|
|
10
|
-
"Ehepartner von (Halb)?(geschwister|schwester|bruder)": "Schwager/Schwägerin",
|
|
11
|
-
"(Halb)?schwester des (Ehepartner|Ehefrau|Ehemann)s": "Schwägerin",
|
|
12
|
-
"(Halb)?bruder des (Ehepartner|Ehefrau|Ehemann)s": "Schwager",
|
|
13
|
-
"(Halb)?geschwister des (Ehepartner|Ehefrau|Ehemann)s": "Schwager/Schwägerin",
|
|
14
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"patterns.en.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/patterns.en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAa3C,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export const InLawsEn = {
|
|
2
|
-
"spouse of (child|daughter|son)": "child-in-law",
|
|
3
|
-
"wife of (child|daughter|son)": "daughter-in-law",
|
|
4
|
-
"husband of (child|daughter|son)": "son-in-law",
|
|
5
|
-
"mother of (spouse|wife|husband)": "mother-in-law",
|
|
6
|
-
"father of (spouse|wife|husband)": "father-in-law",
|
|
7
|
-
"parent of (spouse|wife|husband)": "parent-in-law",
|
|
8
|
-
"wife of (half-)?(sibling|sister|brother)": "sister-in-law",
|
|
9
|
-
"husband of (half-)?(sibling|sister|brother)": "brother-in-law",
|
|
10
|
-
"spouse of (half-)?(sibling|sister|brother)": "sibling-in-law",
|
|
11
|
-
"(half-)?sister of (spouse|wife|husband)": "sister-in-law",
|
|
12
|
-
"(half-)?brother of (spouse|wife|husband)": "brother-in-law",
|
|
13
|
-
"(half-)?sibling of (spouse|wife|husband)": "sibling-in-law",
|
|
14
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"patterns.es.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/patterns.es.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAa3C,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export const InLawsEs = {
|
|
2
|
-
"cónyuge de (hijo/hija|hija|hijo)": "yerno/nuera",
|
|
3
|
-
"esposa de (hijo/hija|hija|hijo)": "nuera",
|
|
4
|
-
"esposo de (hijo/hija|hija|hijo)": "yerno",
|
|
5
|
-
"madre del (cónyuge|esposa|esposo)": "suegra",
|
|
6
|
-
"padre del (cónyuge|esposa|esposo)": "suegro",
|
|
7
|
-
"padre/madre del (cónyuge|esposa|esposo)": "suegro/suegra",
|
|
8
|
-
"esposa de (medio )?(hermano/hermana|hermana|hermano)": "cuñada",
|
|
9
|
-
"esposo de (medio )?(hermano/hermana|hermana|hermano)": "cuñado",
|
|
10
|
-
"cónyuge de (medio )?(hermano/hermana|hermana|hermano)": "cuñado/cuñada",
|
|
11
|
-
"(medio )?hermana del (cónyuge|esposa|esposo)": "cuñada",
|
|
12
|
-
"(medio )?hermano del (cónyuge|esposa|esposo)": "cuñado",
|
|
13
|
-
"(medio )?hermano/hermana del (cónyuge|esposa|esposo)": "cuñado/cuñada",
|
|
14
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"patterns.fr.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/patterns.fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAa3C,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export const InLawsFr = {
|
|
2
|
-
"conjoint de (enfant|fille|fils)": "beau-fils/belle-fille",
|
|
3
|
-
"épouse de (enfant|fille|fils)": "belle-fille",
|
|
4
|
-
"mari de (enfant|fille|fils)": "gendre",
|
|
5
|
-
"mère du (conjoint|épouse|mari)": "belle-mère",
|
|
6
|
-
"père du (conjoint|épouse|mari)": "beau-père",
|
|
7
|
-
"parent du (conjoint|épouse|mari)": "beau-parent",
|
|
8
|
-
"épouse de (demi-)?(frère/sœur|sœur|frère)": "belle-sœur",
|
|
9
|
-
"mari de (demi-)?(frère/sœur|sœur|frère)": "beau-frère",
|
|
10
|
-
"conjoint de (demi-)?(frère/sœur|sœur|frère)": "beau-frère/belle-sœur",
|
|
11
|
-
"(demi-)?sœur du (conjoint|épouse|mari)": "belle-sœur",
|
|
12
|
-
"(demi-)?frère du (conjoint|épouse|mari)": "beau-frère",
|
|
13
|
-
"(demi-)?frère/sœur du (conjoint|épouse|mari)": "beau-frère/belle-sœur",
|
|
14
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { IndiType } from "../classes/indi";
|
|
2
|
-
import type { CrossCases } from "./types";
|
|
3
|
-
export declare const parentRelationsHu: Record<string, string>;
|
|
4
|
-
export declare const casesHu: CrossCases;
|
|
5
|
-
export declare const InLawsHu: Record<string, string | ((indi?: IndiType) => string | undefined)>;
|
|
6
|
-
//# sourceMappingURL=patterns.hu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"patterns.hu.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/patterns.hu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,EAAC,UAAU,EAAY,MAAM,SAAS,CAAC;AAEnD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAMpD,CAAC;AA4EF,eAAO,MAAM,OAAO,EAAE,UAIrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAC5B,MAAM,EACN,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,KAAK,MAAM,GAAG,SAAS,CAAC,CAsBlD,CAAC"}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
export const parentRelationsHu = {
|
|
2
|
-
step: "mostoha",
|
|
3
|
-
foster: "nevelt",
|
|
4
|
-
birth: "vérszerinti",
|
|
5
|
-
biological: "vérszerinti",
|
|
6
|
-
adopted: "örökbefogadott",
|
|
7
|
-
};
|
|
8
|
-
const nominativus = {
|
|
9
|
-
apa: { nominativus: "apa", dativus: "apjának", possessivus: "apja" },
|
|
10
|
-
anya: { nominativus: "anya", dativus: "anyjának", possessivus: "anyja" },
|
|
11
|
-
após: { nominativus: "após", dativus: "apósának", possessivus: "apósa" },
|
|
12
|
-
anyós: {
|
|
13
|
-
nominativus: "anyós",
|
|
14
|
-
dativus: "anyósának",
|
|
15
|
-
possessivus: "anyósa",
|
|
16
|
-
},
|
|
17
|
-
vő: { nominativus: "vő", dativus: "vejének", possessivus: "veje" },
|
|
18
|
-
meny: { nominativus: "meny", dativus: "menyének", possessivus: "menye" },
|
|
19
|
-
sógor: {
|
|
20
|
-
nominativus: "sógor",
|
|
21
|
-
dativus: "sógorának",
|
|
22
|
-
possessivus: "sógora",
|
|
23
|
-
},
|
|
24
|
-
sógornő: {
|
|
25
|
-
nominativus: "sógornő",
|
|
26
|
-
dativus: "sógornőjének",
|
|
27
|
-
possessivus: "sógornője",
|
|
28
|
-
},
|
|
29
|
-
bácsi: {
|
|
30
|
-
nominativus: "bácsi",
|
|
31
|
-
dativus: "bátyjának",
|
|
32
|
-
possessivus: "bátyja",
|
|
33
|
-
},
|
|
34
|
-
néni: { nominativus: "néni", dativus: "nénjének", possessivus: "nénje" },
|
|
35
|
-
testvér: {
|
|
36
|
-
nominativus: "testvér",
|
|
37
|
-
dativus: "testvérének",
|
|
38
|
-
possessivus: "testvére",
|
|
39
|
-
},
|
|
40
|
-
öcs: { nominativus: "öcs", dativus: "öccsének", possessivus: "öccse" },
|
|
41
|
-
húg: { nominativus: "húg", dativus: "húgának", possessivus: "húga" },
|
|
42
|
-
férj: { nominativus: "férj", dativus: "férjének", possessivus: "férje" },
|
|
43
|
-
feleség: {
|
|
44
|
-
nominativus: "feleség",
|
|
45
|
-
dativus: "feleségének",
|
|
46
|
-
possessivus: "felesége",
|
|
47
|
-
},
|
|
48
|
-
házastárs: {
|
|
49
|
-
nominativus: "házastárs",
|
|
50
|
-
dativus: "házastársának",
|
|
51
|
-
possessivus: "házastársa",
|
|
52
|
-
},
|
|
53
|
-
unoka: {
|
|
54
|
-
nominativus: "unoka",
|
|
55
|
-
dativus: "unokájának",
|
|
56
|
-
possessivus: "unokája",
|
|
57
|
-
},
|
|
58
|
-
gyermek: {
|
|
59
|
-
nominativus: "gyermek",
|
|
60
|
-
dativus: "gyermekének",
|
|
61
|
-
possessivus: "gyermeke",
|
|
62
|
-
},
|
|
63
|
-
szülő: {
|
|
64
|
-
nominativus: "szülő",
|
|
65
|
-
dativus: "szülőjének",
|
|
66
|
-
possessivus: "szülője",
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
const dativus = Object.values(nominativus).reduce((acc, val) => {
|
|
70
|
-
acc[val.dativus] = val;
|
|
71
|
-
return acc;
|
|
72
|
-
}, {});
|
|
73
|
-
const possessivus = Object.values(nominativus).reduce((acc, val) => {
|
|
74
|
-
acc[val.possessivus] = val;
|
|
75
|
-
return acc;
|
|
76
|
-
}, {});
|
|
77
|
-
export const casesHu = {
|
|
78
|
-
nominativus,
|
|
79
|
-
dativus,
|
|
80
|
-
possessivus,
|
|
81
|
-
};
|
|
82
|
-
export const InLawsHu = {
|
|
83
|
-
"gyermek felesége": "meny",
|
|
84
|
-
"gyermek férje": "vő",
|
|
85
|
-
[`(férj|feleség) (?<mod1>(${Object.values(parentRelationsHu).join("|")}) )?anyja`]: "anyós",
|
|
86
|
-
[`(férj|feleség) (?<mod1>(${Object.values(parentRelationsHu).join("|")}) )?apja`]: "após",
|
|
87
|
-
[`(férj|feleség) (?<mod1>(${Object.values(parentRelationsHu).join("|")}) )?(fél)?testvére`]: (indi) => {
|
|
88
|
-
if (indi?.isMale()) {
|
|
89
|
-
return "sógor";
|
|
90
|
-
}
|
|
91
|
-
if (indi?.isFemale()) {
|
|
92
|
-
return "sógornő";
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
[`(fél)?testvér férje`]: "sógor",
|
|
96
|
-
[`(fél)?testvér felesége`]: "sógornő",
|
|
97
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as hu } from "./kinship-translator.hu";
|
|
2
|
-
export { default as en } from "./kinship-translator.en";
|
|
3
|
-
export { default as de } from "./kinship-translator.de";
|
|
4
|
-
export { default as fr } from "./kinship-translator.fr";
|
|
5
|
-
export { default as es } from "./kinship-translator.es";
|
|
6
|
-
//# sourceMappingURL=translators.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"translators.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/translators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { default as hu } from "./kinship-translator.hu.js";
|
|
2
|
-
export { default as en } from "./kinship-translator.en.js";
|
|
3
|
-
export { default as de } from "./kinship-translator.de.js";
|
|
4
|
-
export { default as fr } from "./kinship-translator.fr.js";
|
|
5
|
-
export { default as es } from "./kinship-translator.es.js";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type Language = "en" | "hu" | "de" | "es" | "fr";
|
|
2
|
-
export interface Cases {
|
|
3
|
-
nominativus: string;
|
|
4
|
-
dativus: string;
|
|
5
|
-
possessivus: string;
|
|
6
|
-
}
|
|
7
|
-
export type CrossCase = Record<string, Cases>;
|
|
8
|
-
export type CrossCases = Record<keyof Cases, CrossCase>;
|
|
9
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAExD,MAAM,WAAW,KAAK;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAE9C,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,KAAK,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Common } from "../classes/common";
|
|
2
|
-
interface IAddressStructure extends Common {
|
|
3
|
-
ADDR?: Common & {
|
|
4
|
-
ADR1?: Common;
|
|
5
|
-
ADR2?: Common;
|
|
6
|
-
ADR3?: Common;
|
|
7
|
-
CITY?: Common;
|
|
8
|
-
STAE?: Common;
|
|
9
|
-
POST?: Common;
|
|
10
|
-
CTRY?: Common;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export default IAddressStructure;
|
|
14
|
-
//# sourceMappingURL=address.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src/structures/address.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAE9C,UAAU,iBAAkB,SAAQ,MAAM;IACzC,IAAI,CAAC,EAAE,MAAM,GAAG;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;CACF;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Common } from "../classes/common";
|
|
2
|
-
import type INoteStructure from "./note";
|
|
3
|
-
import type ISourceCitationStructure from "./source-citation";
|
|
4
|
-
interface IAssociationStructure extends Common, INoteStructure, ISourceCitationStructure {
|
|
5
|
-
ASSO?: Common & {
|
|
6
|
-
PHRASE?: Common;
|
|
7
|
-
ROLE?: Common & {
|
|
8
|
-
PHRASE?: Common;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export default IAssociationStructure;
|
|
13
|
-
//# sourceMappingURL=association.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"association.d.ts","sourceRoot":"","sources":["../../src/structures/association.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAE9C,OAAO,KAAK,cAAc,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,wBAAwB,MAAM,mBAAmB,CAAC;AAE9D,UAAU,qBACT,SAAQ,MAAM,EAAE,cAAc,EAAE,wBAAwB;IACxD,IAAI,CAAC,EAAE,MAAM,GAAG;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,GAAG;YACf,MAAM,CAAC,EAAE,MAAM,CAAC;SAChB,CAAC;KACF,CAAC;CACF;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Common } from "../classes/common";
|
|
2
|
-
import type IDateStructure from "./date";
|
|
3
|
-
import type INoteStructure from "./note";
|
|
4
|
-
interface IChangeDateStructure extends Common, INoteStructure {
|
|
5
|
-
CHAN?: Common & IDateStructure;
|
|
6
|
-
}
|
|
7
|
-
export default IChangeDateStructure;
|
|
8
|
-
//# sourceMappingURL=change-date.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"change-date.d.ts","sourceRoot":"","sources":["../../src/structures/change-date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAE9C,OAAO,KAAK,cAAc,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,cAAc,MAAM,QAAQ,CAAC;AAEzC,UAAU,oBAAqB,SAAQ,MAAM,EAAE,cAAc;IAC5D,IAAI,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;CAC/B;AAED,eAAe,oBAAoB,CAAC"}
|