@digitalculture/ochre-sdk 0.5.9 → 0.5.10
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 +3 -17
- package/dist/index.d.cts +0 -4
- package/dist/index.d.ts +0 -4
- package/dist/index.js +3 -17
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -571,7 +571,6 @@ var componentSchema = import_zod3.z.enum(
|
|
|
571
571
|
"iiif-viewer",
|
|
572
572
|
"image",
|
|
573
573
|
"image-gallery",
|
|
574
|
-
"item-gallery",
|
|
575
574
|
"n-columns",
|
|
576
575
|
"n-rows",
|
|
577
576
|
"network-graph",
|
|
@@ -1668,7 +1667,9 @@ async function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1668
1667
|
break;
|
|
1669
1668
|
}
|
|
1670
1669
|
case "image-gallery": {
|
|
1671
|
-
const galleryLink = links.find(
|
|
1670
|
+
const galleryLink = links.find(
|
|
1671
|
+
(link) => link.category === "tree" || link.category === "set"
|
|
1672
|
+
);
|
|
1672
1673
|
if (!galleryLink) {
|
|
1673
1674
|
throw new Error(
|
|
1674
1675
|
`Image gallery link not found for the following component: \u201C${componentName}\u201D`
|
|
@@ -1682,21 +1683,6 @@ async function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1682
1683
|
properties.isSearchable = isSearchable;
|
|
1683
1684
|
break;
|
|
1684
1685
|
}
|
|
1685
|
-
case "item-gallery": {
|
|
1686
|
-
const galleryLink = links.find((link) => link.category === "tree");
|
|
1687
|
-
if (!galleryLink) {
|
|
1688
|
-
throw new Error(
|
|
1689
|
-
`Item gallery link not found for the following component: \u201C${componentName}\u201D`
|
|
1690
|
-
);
|
|
1691
|
-
}
|
|
1692
|
-
const isSearchable = getPropertyValueByLabel(
|
|
1693
|
-
componentProperty.properties,
|
|
1694
|
-
"is-searchable"
|
|
1695
|
-
) === "Yes";
|
|
1696
|
-
properties.galleryId = galleryLink.uuid;
|
|
1697
|
-
properties.isSearchable = isSearchable;
|
|
1698
|
-
break;
|
|
1699
|
-
}
|
|
1700
1686
|
case "n-columns": {
|
|
1701
1687
|
const subElements = elementResource.resource ? await parseWebpageResources(
|
|
1702
1688
|
Array.isArray(elementResource.resource) ? elementResource.resource : [elementResource.resource],
|
package/dist/index.d.cts
CHANGED
|
@@ -539,10 +539,6 @@ type WebElementComponent = {
|
|
|
539
539
|
component: "image-gallery";
|
|
540
540
|
galleryId: string;
|
|
541
541
|
isSearchable: boolean;
|
|
542
|
-
} | {
|
|
543
|
-
component: "item-gallery";
|
|
544
|
-
galleryId: string;
|
|
545
|
-
isSearchable: boolean;
|
|
546
542
|
} | {
|
|
547
543
|
component: "n-columns";
|
|
548
544
|
columns: Array<WebElement>;
|
package/dist/index.d.ts
CHANGED
|
@@ -539,10 +539,6 @@ type WebElementComponent = {
|
|
|
539
539
|
component: "image-gallery";
|
|
540
540
|
galleryId: string;
|
|
541
541
|
isSearchable: boolean;
|
|
542
|
-
} | {
|
|
543
|
-
component: "item-gallery";
|
|
544
|
-
galleryId: string;
|
|
545
|
-
isSearchable: boolean;
|
|
546
542
|
} | {
|
|
547
543
|
component: "n-columns";
|
|
548
544
|
columns: Array<WebElement>;
|
package/dist/index.js
CHANGED
|
@@ -494,7 +494,6 @@ var componentSchema = z3.enum(
|
|
|
494
494
|
"iiif-viewer",
|
|
495
495
|
"image",
|
|
496
496
|
"image-gallery",
|
|
497
|
-
"item-gallery",
|
|
498
497
|
"n-columns",
|
|
499
498
|
"n-rows",
|
|
500
499
|
"network-graph",
|
|
@@ -1591,7 +1590,9 @@ async function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1591
1590
|
break;
|
|
1592
1591
|
}
|
|
1593
1592
|
case "image-gallery": {
|
|
1594
|
-
const galleryLink = links.find(
|
|
1593
|
+
const galleryLink = links.find(
|
|
1594
|
+
(link) => link.category === "tree" || link.category === "set"
|
|
1595
|
+
);
|
|
1595
1596
|
if (!galleryLink) {
|
|
1596
1597
|
throw new Error(
|
|
1597
1598
|
`Image gallery link not found for the following component: \u201C${componentName}\u201D`
|
|
@@ -1605,21 +1606,6 @@ async function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1605
1606
|
properties.isSearchable = isSearchable;
|
|
1606
1607
|
break;
|
|
1607
1608
|
}
|
|
1608
|
-
case "item-gallery": {
|
|
1609
|
-
const galleryLink = links.find((link) => link.category === "tree");
|
|
1610
|
-
if (!galleryLink) {
|
|
1611
|
-
throw new Error(
|
|
1612
|
-
`Item gallery link not found for the following component: \u201C${componentName}\u201D`
|
|
1613
|
-
);
|
|
1614
|
-
}
|
|
1615
|
-
const isSearchable = getPropertyValueByLabel(
|
|
1616
|
-
componentProperty.properties,
|
|
1617
|
-
"is-searchable"
|
|
1618
|
-
) === "Yes";
|
|
1619
|
-
properties.galleryId = galleryLink.uuid;
|
|
1620
|
-
properties.isSearchable = isSearchable;
|
|
1621
|
-
break;
|
|
1622
|
-
}
|
|
1623
1609
|
case "n-columns": {
|
|
1624
1610
|
const subElements = elementResource.resource ? await parseWebpageResources(
|
|
1625
1611
|
Array.isArray(elementResource.resource) ? elementResource.resource : [elementResource.resource],
|
package/package.json
CHANGED