@digitalculture/ochre-sdk 0.12.3 → 0.12.4
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.d.mts +1 -1
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -654,7 +654,7 @@ type WebElementComponent = {
|
|
|
654
654
|
image: WebImage | null;
|
|
655
655
|
} | {
|
|
656
656
|
component: "collection";
|
|
657
|
-
|
|
657
|
+
collectionIds: Array<string>;
|
|
658
658
|
variant: "full" | "highlights";
|
|
659
659
|
itemVariant: "detailed" | "card" | "tile";
|
|
660
660
|
paginationVariant: "default" | "numeric";
|
package/dist/index.mjs
CHANGED
|
@@ -1783,8 +1783,8 @@ function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1783
1783
|
break;
|
|
1784
1784
|
}
|
|
1785
1785
|
case "collection": {
|
|
1786
|
-
const
|
|
1787
|
-
if (
|
|
1786
|
+
const collectionLinks = links.filter((link) => link.category === "set");
|
|
1787
|
+
if (collectionLinks.length === 0) throw new Error(`Collection links not found for the following component: “${componentName}”`);
|
|
1788
1788
|
let variant = getPropertyValueByLabel(componentProperty.properties, "variant");
|
|
1789
1789
|
variant ??= "full";
|
|
1790
1790
|
let itemVariant = getPropertyValueByLabel(componentProperty.properties, "item-variant");
|
|
@@ -1845,7 +1845,7 @@ function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1845
1845
|
prominent: parseContexts(prominentContextsRaw)
|
|
1846
1846
|
};
|
|
1847
1847
|
}
|
|
1848
|
-
properties.
|
|
1848
|
+
properties.collectionIds = collectionLinks.map((link) => link.uuid);
|
|
1849
1849
|
properties.variant = variant;
|
|
1850
1850
|
properties.itemVariant = itemVariant;
|
|
1851
1851
|
properties.paginationVariant = paginationVariant;
|
package/package.json
CHANGED