Skip to content

Commit

Permalink
Merge branch 'master' into add-digitale-keilschrift-bibliothek
Browse files Browse the repository at this point in the history
  • Loading branch information
ejimsan authored Jan 5, 2025
2 parents 519fc75 + e18911f commit 7ed8013
Show file tree
Hide file tree
Showing 11 changed files with 882 additions and 212 deletions.
1,044 changes: 837 additions & 207 deletions src/about/ui/bibliography.tsx

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/fragmentarium/domain/Fragment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ const config: Parameters<typeof Fragment['create']>[0] = {
nabuccoNumber: '123',
digitaleKeilschriftBibliothekNumber: '123',
metropolitanNumber: '123',
pierpontMorganNumber: '123',
louvreNumber: '123',
dublinTcdNumber: '123',
alalahHpmNumber: '123',
Expand Down
1 change: 1 addition & 0 deletions src/fragmentarium/domain/FragmentDtos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const ExternalNumberTypes = [
'nabuccoNumber',
'digitaleKeilschriftBibliothekNumber',
'metropolitanNumber',
'pierpontMorganNumber',
'louvreNumber',
'dublinTcdNumber',
'alalahHpmNumber',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5963,7 +5963,7 @@ exports[`Snapshot 1`] = `
<span
class="reference-popover__citation"
>
Chirici & Borchi, 2110: 7824054333472768-2832266722017280
Chirici & Borchi, 2109: 7824054333472768-2832266722017280
[
l. 3'., 4'.2.
]
Expand Down
13 changes: 13 additions & 0 deletions src/fragmentarium/ui/info/ExternalNumberLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,19 @@ export function MetropolitanLink({ number }: { number: string }): JSX.Element {
/>
)
}
export function pierpontMorganLink({
number,
}: {
number: string
}): JSX.Element {
return (
<ExternalNumberLink
number={number}
baseUrl={'https://www.themorgan.org/seals-and-tablets/'}
label={'Pierpont Morgan Library'}
/>
)
}
export function LouvreLink({ number }: { number: string }): JSX.Element {
return (
<ExternalNumberLink
Expand Down
8 changes: 8 additions & 0 deletions src/fragmentarium/ui/info/ExternalResources.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const achemenetNumber = 'H00744'
const nabuccoNumber = 'H00765'
const digitaleKeilschriftBibliothekNumber = 'H00765'
const metropolitanNumber = 'M123'
const pierpontMorganNumber = 'P123'
const louvreNumber = 'L123'
const dublinTcdNumber = 'L123'
const alalahHpmNumber = 'L123'
Expand Down Expand Up @@ -46,6 +47,7 @@ describe('external resources', () => {
nabuccoNumber,
digitaleKeilschriftBibliothekNumber,
metropolitanNumber,
pierpontMorganNumber,
louvreNumber,
dublinTcdNumber,
alalahHpmNumber,
Expand Down Expand Up @@ -100,6 +102,11 @@ describe('external resources', () => {
'https://www.metmuseum.org/art/collection/search/',
metropolitanNumber,
],
[
'Pierpont Morgan Library',
'https://www.themorgan.org/seals-and-tablets/',
pierpontMorganNumber,
],
['Louvre', 'https://collections.louvre.fr/ark:/53355/', louvreNumber],
[
'Trinity College Dublin',
Expand Down Expand Up @@ -161,6 +168,7 @@ describe('missing external resources', () => {
'NaBuCCo',
'Digitale Keilschrift Bibliothek',
'The Metropolitan Museum of Art',
'Pierpont Morgan Library',
'Louvre',
'Trinity College Dublin',
'Alalah HPM Number',
Expand Down
2 changes: 2 additions & 0 deletions src/fragmentarium/ui/info/ExternalResources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
NabuccoLink,
DigitaleKeilschriftBibliothekLink,
MetropolitanLink,
pierpontMorganLink,
LouvreLink,
dublinTcdLink,
alalahHpmLink,
Expand Down Expand Up @@ -59,6 +60,7 @@ export default function ExternalResources({
DigitaleKeilschriftBibliothekLink,
],
[fragment.getExternalNumber('metropolitanNumber'), MetropolitanLink],
[fragment.getExternalNumber('pierpontMorganNumber'), pierpontMorganLink],
[fragment.getExternalNumber('louvreNumber'), LouvreLink],
[fragment.getExternalNumber('dublinTcdNumber'), dublinTcdLink],
[fragment.getExternalNumber('alalahHpmNumber'), alalahHpmLink],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,18 @@ exports[`external resources Snapshot 1`] = `
</a>
)
</li>
<li>
Pierpont Morgan Library (
<a
aria-label="Pierpont Morgan Library text P123"
href="https://www.themorgan.org/seals-and-tablets/P123"
rel="noopener noreferrer"
target="_blank"
>
P123
</a>
)
</li>
<li>
Louvre (
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
<span
class="reference-popover__citation"
>
Shaw & Robert, 2047: 8795192725340160-2754431460311040
Shaw & Robert, 2046: 8795192725340160-2754431460311040
[
l. 2., 1.
]
Expand All @@ -895,7 +895,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
<span
class="reference-popover__citation"
>
Gaillard & Markus, 2101: 4012371584483328-4796367274770432
Gaillard & Markus, 2100: 4012371584483328-4796367274770432
[
l. 2., 4'.2.
]
Expand Down Expand Up @@ -6690,7 +6690,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
<span
class="reference-popover__citation"
>
Palchetti & van Veen, 2030: 5656796368732160-1372834444083200
Palchetti & van Veen, 2029: 5656796368732160-1372834444083200
[
l. 3'., 1.
]
Expand All @@ -6709,7 +6709,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
<span
class="reference-popover__citation"
>
Stokes & Carpenter, 2040: 8493366115303424-3968001768423424
Stokes & Carpenter, 2039: 8493366115303424-3968001768423424
[
l. 3'., 4'.2.
]
Expand Down
2 changes: 2 additions & 0 deletions src/test-support/fragment-data-fixtures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ export const externalNumbersFactory = Factory.define<ExternalNumbers>(
hilprechtHeidelbergNumber:
associations.hilprechtHeidelbergNumber ?? chance.string(),
metropolitanNumber: associations.metropolitanNumber ?? chance.string(),
pierpontMorganNumber:
associations.pierpontMorganNumber ?? chance.string(),
achemenetNumber: associations.achemenetNumber ?? chance.string(),
nabuccoNumber: associations.nabuccoNumber ?? chance.string(),
digitaleKeilschriftBibliothekNumber:
Expand Down
1 change: 1 addition & 0 deletions src/test-support/test-fragment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const externalNumbers = {
nabuccoNumber: '5',
digitaleKeilschriftBibliothekNumber: '5',
metropolitanNumber: '123',
pierpontMorganNumber: '123',
louvreNumber: '123',
dublinTcdNumber: '123',
alalahHpmNumber: '123',
Expand Down

0 comments on commit 7ed8013

Please sign in to comment.