From 2477344a4e3d5fb2c5bb2338648f2d1ffad30746 Mon Sep 17 00:00:00 2001 From: fo Date: Thu, 18 Jun 2026 12:23:44 +0000 Subject: [PATCH 1/4] Update NAR creation - Comman before $d in generated 4XX - 4XX splitting works with names with diacritics --- .../panels/edit/modals/NacoStubCreateModal.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/panels/edit/modals/NacoStubCreateModal.vue b/src/components/panels/edit/modals/NacoStubCreateModal.vue index d04b72c0..81040d99 100644 --- a/src/components/panels/edit/modals/NacoStubCreateModal.vue +++ b/src/components/panels/edit/modals/NacoStubCreateModal.vue @@ -777,13 +777,19 @@ if (dollarKey.a){ // Check for compound last names: hyphenated ("Jacobsen-Smith, Alejandro") or spaced ("Jacobsen Smith, Alejandro") + // Aguirre Rodríguez, Julio, $d 1966- let isHyphenated = /[A-Z][a-z]+\-[A-Z][a-z]+/.test(dollarKey.a) - let isSpacedCompound = !isHyphenated && /[A-Z][a-z]+ [A-Z][a-z]+,/.test(dollarKey.a) + let isSpacedCompound = !isHyphenated && /[A-Za-zÀ-ž]+ [A-Za-zÀ-ž]+,/.test(dollarKey.a) + + console.info("isHyphenated: ", isHyphenated) + console.info("isSpacedCompound: ", isSpacedCompound) if (isHyphenated || isSpacedCompound){ let separator = isHyphenated ? '-' : ' ' + console.info("\t separator: ", separator) if (dollarKey.a.split(',')[0]){ let compoundParts = dollarKey.a.split(',')[0].split(separator) + console.info("\t compoundParts: ", compoundParts) if (compoundParts.length == 2){ let trailingSeparator = isHyphenated ? separator : '' let newDollarA = `${compoundParts[1]}, ${dollarKey.a.split(',')[1].trim()} ${compoundParts[0]}${trailingSeparator}` @@ -799,10 +805,16 @@ compound4xx.fieldTag = compound4xx.fieldTag.join(''); let subfields = "" for (let key in compound4xx){ + console.info("key: ", key) if (key.length==1){ - subfields = subfields + '$'+key+' '+compound4xx[key] + ' ' + if (key == 'd'){ + subfields = subfields.trim() + ', $'+key+' '+compound4xx[key] + ' ' + } else { + subfields = subfields + '$'+key+' '+compound4xx[key] + ' ' + } } } + console.info("\tsubfields: ", subfields) compound4xx.preview = `${compound4xx.fieldTag} ${compound4xx.indicators.replace(/\s/g,'#')} ${subfields}` this.hyphenated4xx = compound4xx this.buildHyphenated4xx = true From 0d81bfa0611ece485fe0834943b9694ab37a2171 Mon Sep 17 00:00:00 2001 From: fo Date: Thu, 18 Jun 2026 12:33:20 +0000 Subject: [PATCH 2/4] Setting NAR tag `053` sets indicators `#0` ind2=0, assigned by LC --- .../panels/edit/modals/NacoStubCreateModal.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/panels/edit/modals/NacoStubCreateModal.vue b/src/components/panels/edit/modals/NacoStubCreateModal.vue index 81040d99..d7b3008c 100644 --- a/src/components/panels/edit/modals/NacoStubCreateModal.vue +++ b/src/components/panels/edit/modals/NacoStubCreateModal.vue @@ -97,6 +97,10 @@ validating: false, validationResult: null, + + tagMap: { // Map between tag and expected indicators + '053': '#0', + } } }, computed: { @@ -1823,6 +1827,13 @@ } }, + setIndicators: function(row){ + let tag = row.fieldTag + if (tag.length == 3 && this.tagMap[tag]){ + row.indicators = this.tagMap[tag] + } + }, + }, @@ -2242,6 +2253,7 @@ v-model="row.fieldTag" maxlength="3" placeholder="TAG" + @input="setIndicators(row)" :class="['extra-marc-tag', {'literal-bold': preferenceStore.returnValue('--b-edit-main-literal-bold-font'), 'missing-indicators': row.fieldTag.length != 3}]" :style="`margin-right: 1em; width: 50px; font-size: ${preferenceStore.returnValue('--n-edit-main-literal-font-size')}; color: ${preferenceStore.returnValue('--c-edit-main-literal-font-color')};`" /> From dcb834310d07bdda3541eae37afcb849bb8c21e6 Mon Sep 17 00:00:00 2001 From: fo Date: Thu, 18 Jun 2026 13:10:09 +0000 Subject: [PATCH 3/4] clean up --- src/components/panels/edit/modals/NacoStubCreateModal.vue | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/components/panels/edit/modals/NacoStubCreateModal.vue b/src/components/panels/edit/modals/NacoStubCreateModal.vue index d7b3008c..002653cc 100644 --- a/src/components/panels/edit/modals/NacoStubCreateModal.vue +++ b/src/components/panels/edit/modals/NacoStubCreateModal.vue @@ -785,15 +785,10 @@ let isHyphenated = /[A-Z][a-z]+\-[A-Z][a-z]+/.test(dollarKey.a) let isSpacedCompound = !isHyphenated && /[A-Za-zÀ-ž]+ [A-Za-zÀ-ž]+,/.test(dollarKey.a) - console.info("isHyphenated: ", isHyphenated) - console.info("isSpacedCompound: ", isSpacedCompound) - if (isHyphenated || isSpacedCompound){ let separator = isHyphenated ? '-' : ' ' - console.info("\t separator: ", separator) if (dollarKey.a.split(',')[0]){ let compoundParts = dollarKey.a.split(',')[0].split(separator) - console.info("\t compoundParts: ", compoundParts) if (compoundParts.length == 2){ let trailingSeparator = isHyphenated ? separator : '' let newDollarA = `${compoundParts[1]}, ${dollarKey.a.split(',')[1].trim()} ${compoundParts[0]}${trailingSeparator}` @@ -809,7 +804,6 @@ compound4xx.fieldTag = compound4xx.fieldTag.join(''); let subfields = "" for (let key in compound4xx){ - console.info("key: ", key) if (key.length==1){ if (key == 'd'){ subfields = subfields.trim() + ', $'+key+' '+compound4xx[key] + ' ' @@ -818,7 +812,6 @@ } } } - console.info("\tsubfields: ", subfields) compound4xx.preview = `${compound4xx.fieldTag} ${compound4xx.indicators.replace(/\s/g,'#')} ${subfields}` this.hyphenated4xx = compound4xx this.buildHyphenated4xx = true From 3f7bf755f294872f1f9327baf9f5bc212de6b631 Mon Sep 17 00:00:00 2001 From: fo Date: Thu, 18 Jun 2026 13:32:27 +0000 Subject: [PATCH 4/4] cleanup --- src/components/panels/edit/fields/helpers/ActionButton.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/panels/edit/fields/helpers/ActionButton.vue b/src/components/panels/edit/fields/helpers/ActionButton.vue index e5088f4d..99003e45 100644 --- a/src/components/panels/edit/fields/helpers/ActionButton.vue +++ b/src/components/panels/edit/fields/helpers/ActionButton.vue @@ -579,7 +579,6 @@ //does this have defaults, or are the defaults higher up? let defaults = this.structure.valueConstraint.defaults - console.info("structure: ", this.structure) if (defaults.length > 0 && !["lc:RT:bf2:SeriesHub", "lc:RT:bf2:SeriesHubInput"].includes(this.structure.parentId ) ){ if ( ['id_loc_gov_ontologies_bibframe_status__status', 'id_loc_gov_ontologies_bibframe_relationship__relationship'].includes(this.structure.id) && ["lc:RT:bf2:SeriesHub", "lc:RT:bf2:SeriesHubInput"].includes(this.structure.parentId)){