Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into add-date-to-fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
khoidt committed Feb 9, 2024
2 parents 1eb95d5 + 81e9900 commit 6b9eb5a
Show file tree
Hide file tree
Showing 28 changed files with 510 additions and 342 deletions.
15 changes: 9 additions & 6 deletions src/about/ui/bibliography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ export default function AboutBibliography(
markupService={markupService}
text="@bib{vondassow2000neobabylonian}; @bib{vondassow2000neobabylonianprivate};
@bib{debourse2022priests}; @bib{delaunay1977moldenke}; @bib{deller1995saab9};
@bib{CT0054}; @bib{RN2769}; @bib{VS_17}; @bib{RN570}; @bib{YOS_11};
@bib{RN569}; @bib{dijk2003ur}; @bib{KAM11}; @bib{RN2110}; @bib{RN932};
@bib{YOS_20}; @bib{YOS_6}"
@bib{dietrich1969soziale}; @bib{dietrich1969sozialeb}; @bib{dietrich1970soziale};
@bib{CT0054}; @bib{dietrich1997vertrag}; @bib{RN2769}; @bib{VS_17}; @bib{RN570};
@bib{YOS_11}; @bib{RN569}; @bib{dijk2003ur}; @bib{KAM11}; @bib{RN2110};
@bib{RN932}; @bib{YOS_20}; @bib{YOS_6}"
/>
<h4>E</h4>
<Markup
Expand Down Expand Up @@ -165,7 +166,7 @@ export default function AboutBibliography(
@bib{RN2604azz}; @bib{RN2623}; @bib{fromebllab0002}; @bib{fromebllab0011};
@bib{fromebllab0022}; @bib{fromebllab0028}; @bib{RN1745xx}; @bib{HauptNimrod};
@bib{RN1156}; @bib{RN2805}; @bib{KAL13}; @bib{RN3094a}; @bib{fromebllab0005};
@bib{fromebllab0009}; @bib{fromebllab0017}; @bib{fromebllab0018};
@bib{fromebllab0009}; @bib{fromebllab0017}; @bib{fromebllab0018}; @bib{hess1999canaan};
@bib{BE_A_1_1}; @bib{BE_A_1_2}; @bib{BE_A_9}; @bib{BE_D_1}; @bib{BE_A_20_1};
@bib{RN2817aa}; @bib{BE_D_4}; @bib{RN2700a}; @bib{RN500}; @bib{KAL14};
@bib{RN497}; @bib{LS125}; @bib{RN2049}; @bib{LS159}; @bib{LS159as};
Expand Down Expand Up @@ -238,7 +239,8 @@ export default function AboutBibliography(
<h4>N</h4>
<Markup
markupService={markupService}
text="@bib{nemetnejat1982late}; @bib{YOS_16}; @bib{RN1438}; @bib{Nougayrol1979}"
text="@bib{nemetnejat1982late}; @bib{YOS_16}; @bib{RN1438}; @bib{niedroff2008mittelbabylonischen};
@bib{Nougayrol1979}"
/>
<h4>O</h4>
<Markup
Expand Down Expand Up @@ -308,7 +310,8 @@ export default function AboutBibliography(
@bib{walker2005astronomical}; @bib{wallenfels2014late};
@bib{wallenfels2014latebabylonian}; @bib{RN3091}; @bib{RN545a};
@bib{WeiHru2018}; @bib{KAL11}; @bib{YOS_17}; @bib{UBHD-1553948};
@bib{UBHD-1553949}; @bib{UBHD-1553950}; @bib{Wunsch1993A}; @bib{Wunsch1993B};
@bib{UBHD-1553949}; @bib{UBHD-1553950}; @bib{wiseman1953alalakh};
@bib{wiseman1954supplementary}; @bib{Wunsch1993A}; @bib{Wunsch1993B};
@bib{wunsch1997richter}; @bib{wunschEgibiArchivFelderUnd2000}; @bib{RN2083ax}"
/>
<h4>Z</h4>
Expand Down
5 changes: 0 additions & 5 deletions src/chronology/domain/DateBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ export interface DateField {
isUncertain?: boolean
}

export interface DateRange {
start: Date
end: Date
}

export interface MonthField extends DateField {
isIntercalary?: boolean
}
Expand Down
1 change: 1 addition & 0 deletions src/corpus/domain/provenance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const Provenances = {
Ebla: { name: 'Ebla', abbreviation: 'Ebl', parent: 'Periphery' },
Elam: { name: 'Elam', abbreviation: 'Elam', parent: 'Periphery' },
Emar: { name: 'Emar', abbreviation: 'Emr', parent: 'Periphery' },
Hamath: { name: 'Hamath', abbreviation: 'Ham', parent: 'Periphery' },
Ḫattuša: { name: 'Ḫattuša', abbreviation: 'Hat', parent: 'Periphery' },
Kaneš: { name: 'Kaneš', abbreviation: 'Kan', parent: 'Periphery' },
Karkemiš: { name: 'Karkemiš', abbreviation: 'Kar', parent: 'Periphery' },
Expand Down
4 changes: 4 additions & 0 deletions src/corpus/ui/ManuscriptPopover.sass
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
@include ebl-font
&__header
font-weight: bold
&__old-sigla
font-weight: normal
.type-abbreviation
display: none
&__body p
margin-bottom: .5rem
&__provenance
Expand Down
13 changes: 8 additions & 5 deletions src/corpus/ui/ManuscriptPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { OldSiglum } from 'corpus/domain/manuscript'
import ManuscriptJoins from './ManuscriptJoins'
import ManuscriptReferences from './ManuscriptReferences'
import Citation from 'bibliography/ui/Citation'
import { Markdown } from 'common/Markdown'

function OldSiglumList({
siglumList,
Expand All @@ -19,12 +20,14 @@ function OldSiglumList({
{siglumList.map((oldSiglum, index) => (
<React.Fragment key={index}>
{index > 0 && '; '}
{oldSiglum.siglum}
{/* add bibliography info popover here */}
<span className="manuscript-popover__old-sigla__bibliography">
<Markdown text={oldSiglum.siglum} />
{/* add bibliography info popover here */}

<sup>
<Citation reference={oldSiglum.reference} />
</sup>
<sup>
<Citation reference={oldSiglum.reference} />
</sup>
</span>
</React.Fragment>
))}
)
Expand Down
32 changes: 19 additions & 13 deletions src/corpus/ui/__snapshots__/ManuscriptPopover.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,28 @@ exports[`Show manuscript line details 1`] = `
class="manuscript-popover__old-sigla"
>
 (
fuwriv
<sup>
<span
class="reference-popover__citation"
>
Estrada & Wolfe, 2069: 7477711662481408-4847418310918144
[
l. 4'.2., 3'.
]
<span
class="manuscript-popover__old-sigla__bibliography"
>
<span>
fuwriv
</span>
<sup>
<span
class="type-abbreviation"
class="reference-popover__citation"
>
(C)
Estrada & Wolfe, 2069: 7477711662481408-4847418310918144
[
l. 4'.2., 3'.
]
<span
class="type-abbreviation"
>
(C)
</span>
</span>
</span>
</sup>
</sup>
</span>
)
</span>
</h3>
Expand Down
8 changes: 3 additions & 5 deletions src/fragmentarium/application/FragmentService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ import { wordFactory } from 'test-support/word-fixtures'
import { silenceConsoleErrors } from 'setupTests'
import { QueryResult } from 'query/QueryResult'
import { MesopotamianDate } from 'chronology/domain/Date'
import {
Archaeology,
ArchaeologyDto,
toArchaeologyDto,
} from 'fragmentarium/domain/archaeology'
import { Archaeology } from 'fragmentarium/domain/archaeology'
import { ArchaeologyDto } from 'fragmentarium/domain/archaeologyDtos'
import { toArchaeologyDto } from 'fragmentarium/domain/archaeologyDtos'

jest.mock('./LemmatizationFactory')

Expand Down
2 changes: 1 addition & 1 deletion src/fragmentarium/application/FragmentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { ManuscriptAttestation } from 'corpus/domain/manuscriptAttestation'
import { FragmentQuery } from 'query/FragmentQuery'
import { MesopotamianDate } from 'chronology/domain/Date'
import { FragmentAfoRegisterQueryResult, QueryResult } from 'query/QueryResult'
import { ArchaeologyDto } from 'fragmentarium/domain/archaeology'
import { ArchaeologyDto } from 'fragmentarium/domain/archaeologyDtos'

export const onError = (error) => {
if (error.message === '403 Forbidden') {
Expand Down
1 change: 1 addition & 0 deletions src/fragmentarium/domain/Fragment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const config: Parameters<typeof Fragment['create']>[0] = {
note: '',
legacyData: '',
isInFragmentarium: true,
isEnvelope: true,
},
],
],
Expand Down
2 changes: 1 addition & 1 deletion src/fragmentarium/domain/FragmentDtos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
KingDateField,
Ur3Calendar,
} from 'chronology/domain/DateBase'
import { ArchaeologyDto } from './archaeology'
import { ArchaeologyDto } from './archaeologyDtos'

interface MeasureDto {
value?: number
Expand Down
27 changes: 14 additions & 13 deletions src/fragmentarium/domain/archaeology.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ import {
import {
BuildingType,
Findspot,
FindspotDto,
PartialDate,
SiteKey,
createArchaeology,
excavationSites,
} from './archaeology'
import {
FindspotDto,
fromFindspotDto,
fromPlanDto,
toArchaeologyDto,
toFindspotDto,
toPlanDto,
} from './archaeology'
} from './archaeologyDtos'
import { createArchaeology, toArchaeologyDto } from './archaeologyDtos'
import MuseumNumber, { museumNumberToString } from './MuseumNumber'
import {
cslDataFactory,
Expand All @@ -42,10 +44,9 @@ const planDto = {
references: [referenceDto],
}
const plan = { svg: '<svg></svg>', references: [reference] }
const dateRange = dateRangeFactory.build()
const findspot = findspotFactory.build({
site: excavationSites[site],
dateRange: dateRange,
date: dateRangeFactory.build(),
plans: [plan],
})
const findspotDto: FindspotDto = {
Expand All @@ -59,7 +60,7 @@ const findspotDto: FindspotDto = {
'context',
'primaryContext',
'notes',
'dateRange'
'date'
),
_id: findspot.id,
site: site,
Expand All @@ -70,9 +71,9 @@ const displayParams: Partial<Findspot> = {
building: 'a house',
buildingType: 'RESIDENTIAL' as BuildingType,
levelLayerPhase: 'II',
dateRange: {
start: -1200,
end: -1150,
date: {
start: new PartialDate(-1200),
end: new PartialDate(-1150),
notes: '',
},
notes: '',
Expand Down Expand Up @@ -121,7 +122,7 @@ test('createArchaeology', () => {
test.each([
[
'with area and notes',
{ ...displayParams, area: 'some area', notes: 'general notes' },
{ ...displayParams, area: 'some area', notes: 'general notes.' },
'some area > a house (Residential), II (1200 BCE - 1150 BCE), general notes.',
],
[
Expand All @@ -141,14 +142,14 @@ test.each([
],
[
'no levelLayerPhase and date',
{ ...displayParams, levelLayerPhase: '', dateRange: null },
{ ...displayParams, levelLayerPhase: '', date: null },
'a house (Residential).',
],
[
'with date notes',
{
...displayParams,
dateRange: { ...displayParams.dateRange, notes: 'date notes' },
date: { ...displayParams.date, notes: 'date notes' },
},
'a house (Residential), II (1200 BCE - 1150 BCE, date notes).',
],
Expand Down
Loading

0 comments on commit 6b9eb5a

Please sign in to comment.