@digitalculture/ochre-sdk 0.5.5 → 0.5.6

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 CHANGED
@@ -1447,6 +1447,14 @@ async function parseWebElementProperties(componentProperty, elementResource) {
1447
1447
  isExternal = true;
1448
1448
  }
1449
1449
  }
1450
+ let icon = null;
1451
+ const iconProperty = getPropertyValueByLabel(
1452
+ componentProperty.properties,
1453
+ "icon"
1454
+ );
1455
+ if (iconProperty !== null) {
1456
+ icon = iconProperty;
1457
+ }
1450
1458
  properties.variant = variant;
1451
1459
  properties.href = href;
1452
1460
  properties.isExternal = isExternal;
@@ -1455,6 +1463,7 @@ async function parseWebElementProperties(componentProperty, elementResource) {
1455
1463
  ) ? parseFakeString(elementResource.identification.label) : parseStringContent(
1456
1464
  elementResource.identification.label
1457
1465
  );
1466
+ properties.icon = icon;
1458
1467
  break;
1459
1468
  }
1460
1469
  case "collection": {
package/dist/index.d.cts CHANGED
@@ -499,6 +499,7 @@ type WebElementComponent = {
499
499
  href: string;
500
500
  isExternal: boolean;
501
501
  label: string;
502
+ icon: string | null;
502
503
  } | {
503
504
  component: "collection";
504
505
  collectionId: string;
package/dist/index.d.ts CHANGED
@@ -499,6 +499,7 @@ type WebElementComponent = {
499
499
  href: string;
500
500
  isExternal: boolean;
501
501
  label: string;
502
+ icon: string | null;
502
503
  } | {
503
504
  component: "collection";
504
505
  collectionId: string;
package/dist/index.js CHANGED
@@ -1370,6 +1370,14 @@ async function parseWebElementProperties(componentProperty, elementResource) {
1370
1370
  isExternal = true;
1371
1371
  }
1372
1372
  }
1373
+ let icon = null;
1374
+ const iconProperty = getPropertyValueByLabel(
1375
+ componentProperty.properties,
1376
+ "icon"
1377
+ );
1378
+ if (iconProperty !== null) {
1379
+ icon = iconProperty;
1380
+ }
1373
1381
  properties.variant = variant;
1374
1382
  properties.href = href;
1375
1383
  properties.isExternal = isExternal;
@@ -1378,6 +1386,7 @@ async function parseWebElementProperties(componentProperty, elementResource) {
1378
1386
  ) ? parseFakeString(elementResource.identification.label) : parseStringContent(
1379
1387
  elementResource.identification.label
1380
1388
  );
1389
+ properties.icon = icon;
1381
1390
  break;
1382
1391
  }
1383
1392
  case "collection": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Node.js library for working with OCHRE (Online Cultural and Historical Research Environment) data",