@digitalculture/ochre-sdk 0.5.5 → 0.5.7
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 +15 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +15 -0
- package/package.json +3 -3
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": {
|
|
@@ -1463,6 +1472,11 @@ async function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1463
1472
|
"variant"
|
|
1464
1473
|
);
|
|
1465
1474
|
variant ??= "full";
|
|
1475
|
+
let itemVariant = getPropertyValueByLabel(
|
|
1476
|
+
componentProperty.properties,
|
|
1477
|
+
"item-variant"
|
|
1478
|
+
);
|
|
1479
|
+
itemVariant ??= "default";
|
|
1466
1480
|
let layout = getPropertyValueByLabel(
|
|
1467
1481
|
componentProperty.properties,
|
|
1468
1482
|
"layout"
|
|
@@ -1475,6 +1489,7 @@ async function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1475
1489
|
);
|
|
1476
1490
|
}
|
|
1477
1491
|
properties.variant = variant;
|
|
1492
|
+
properties.itemVariant = itemVariant;
|
|
1478
1493
|
properties.layout = layout;
|
|
1479
1494
|
properties.collectionId = collectionLink.uuid;
|
|
1480
1495
|
break;
|
package/dist/index.d.cts
CHANGED
|
@@ -499,10 +499,12 @@ 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;
|
|
505
506
|
variant: "full" | "highlights";
|
|
507
|
+
itemVariant: "default" | "card";
|
|
506
508
|
layout: "image-top" | "image-bottom" | "image-start" | "image-end";
|
|
507
509
|
isSearchable: boolean;
|
|
508
510
|
} | {
|
package/dist/index.d.ts
CHANGED
|
@@ -499,10 +499,12 @@ 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;
|
|
505
506
|
variant: "full" | "highlights";
|
|
507
|
+
itemVariant: "default" | "card";
|
|
506
508
|
layout: "image-top" | "image-bottom" | "image-start" | "image-end";
|
|
507
509
|
isSearchable: boolean;
|
|
508
510
|
} | {
|
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": {
|
|
@@ -1386,6 +1395,11 @@ async function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1386
1395
|
"variant"
|
|
1387
1396
|
);
|
|
1388
1397
|
variant ??= "full";
|
|
1398
|
+
let itemVariant = getPropertyValueByLabel(
|
|
1399
|
+
componentProperty.properties,
|
|
1400
|
+
"item-variant"
|
|
1401
|
+
);
|
|
1402
|
+
itemVariant ??= "default";
|
|
1389
1403
|
let layout = getPropertyValueByLabel(
|
|
1390
1404
|
componentProperty.properties,
|
|
1391
1405
|
"layout"
|
|
@@ -1398,6 +1412,7 @@ async function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1398
1412
|
);
|
|
1399
1413
|
}
|
|
1400
1414
|
properties.variant = variant;
|
|
1415
|
+
properties.itemVariant = itemVariant;
|
|
1401
1416
|
properties.layout = layout;
|
|
1402
1417
|
properties.collectionId = collectionLink.uuid;
|
|
1403
1418
|
break;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitalculture/ochre-sdk",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.7",
|
|
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",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"@changesets/cli": "^2.28.1",
|
|
50
50
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
51
51
|
"@types/node": "^22.14.0",
|
|
52
|
-
"eslint": "^9.
|
|
52
|
+
"eslint": "^9.24.0",
|
|
53
53
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
54
54
|
"prettier": "^3.5.3",
|
|
55
55
|
"tsup": "^8.4.0",
|
|
56
|
-
"typescript": "^5.8.
|
|
56
|
+
"typescript": "^5.8.3",
|
|
57
57
|
"vitest": "^3.1.1"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|