@digitalculture/ochre-sdk 0.6.3 → 0.6.5
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/index.cjs +2 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -843,6 +843,7 @@ function parseLicense(license) {
|
|
|
843
843
|
function parsePerson(person) {
|
|
844
844
|
return {
|
|
845
845
|
uuid: person.uuid,
|
|
846
|
+
category: "person",
|
|
846
847
|
publicationDateTime: person.publicationDateTime != null ? new Date(person.publicationDateTime) : null,
|
|
847
848
|
type: person.type ?? null,
|
|
848
849
|
date: person.date != null ? new Date(person.date) : null,
|
|
@@ -2630,7 +2631,7 @@ async function fetchGallery(uuid, filter, page, perPage) {
|
|
|
2630
2631
|
const response = await fetch(
|
|
2631
2632
|
`https://ochre.lib.uchicago.edu/ochre?xquery=${encodeURIComponent(`
|
|
2632
2633
|
for $q in input()/ochre[@uuid='${parsedUuid}']
|
|
2633
|
-
let $filtered := $q
|
|
2634
|
+
let $filtered := $q//items/resource[contains(lower-case(identification/label), lower-case('${parsedFilter}'))]
|
|
2634
2635
|
let $maxLength := count($filtered)
|
|
2635
2636
|
return <gallery maxLength='{$maxLength}'>
|
|
2636
2637
|
{$q/metadata/project}
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -769,6 +769,7 @@ function parseLicense(license) {
|
|
|
769
769
|
function parsePerson(person) {
|
|
770
770
|
return {
|
|
771
771
|
uuid: person.uuid,
|
|
772
|
+
category: "person",
|
|
772
773
|
publicationDateTime: person.publicationDateTime != null ? new Date(person.publicationDateTime) : null,
|
|
773
774
|
type: person.type ?? null,
|
|
774
775
|
date: person.date != null ? new Date(person.date) : null,
|
|
@@ -2556,7 +2557,7 @@ async function fetchGallery(uuid, filter, page, perPage) {
|
|
|
2556
2557
|
const response = await fetch(
|
|
2557
2558
|
`https://ochre.lib.uchicago.edu/ochre?xquery=${encodeURIComponent(`
|
|
2558
2559
|
for $q in input()/ochre[@uuid='${parsedUuid}']
|
|
2559
|
-
let $filtered := $q
|
|
2560
|
+
let $filtered := $q//items/resource[contains(lower-case(identification/label), lower-case('${parsedFilter}'))]
|
|
2560
2561
|
let $maxLength := count($filtered)
|
|
2561
2562
|
return <gallery maxLength='{$maxLength}'>
|
|
2562
2563
|
{$q/metadata/project}
|
package/package.json
CHANGED