ochre-sdk 0.22.0 → 0.22.2
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 +18 -13
- package/dist/index.mjs +15 -7
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1045,6 +1045,7 @@ type WebElementComponent = {
|
|
|
1045
1045
|
}> | null;
|
|
1046
1046
|
variant: "detailed" | "card" | "tile" | "showcase";
|
|
1047
1047
|
paginationVariant: "default" | "numeric";
|
|
1048
|
+
loadingVariant: "spinner" | "skeleton" | "animation" | "none";
|
|
1048
1049
|
layout: "image-top" | "image-bottom" | "image-start" | "image-end";
|
|
1049
1050
|
imageQuality: "high" | "low";
|
|
1050
1051
|
isSortDisplayed: boolean;
|
|
@@ -1138,19 +1139,23 @@ type WebElementComponent = {
|
|
|
1138
1139
|
title: string | null;
|
|
1139
1140
|
};
|
|
1140
1141
|
};
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1142
|
+
collectionProperties: {
|
|
1143
|
+
displayedProperties: Extract<WebElementComponent, {
|
|
1144
|
+
component: "collection";
|
|
1145
|
+
}>["displayedProperties"];
|
|
1146
|
+
variant: Extract<WebElementComponent, {
|
|
1147
|
+
component: "collection";
|
|
1148
|
+
}>["variant"];
|
|
1149
|
+
paginationVariant: Extract<WebElementComponent, {
|
|
1150
|
+
component: "collection";
|
|
1151
|
+
}>["paginationVariant"];
|
|
1152
|
+
loadingVariant: Extract<WebElementComponent, {
|
|
1153
|
+
component: "collection";
|
|
1154
|
+
}>["loadingVariant"];
|
|
1155
|
+
layout: Extract<WebElementComponent, {
|
|
1156
|
+
component: "collection";
|
|
1157
|
+
}>["layout"];
|
|
1158
|
+
};
|
|
1154
1159
|
} | {
|
|
1155
1160
|
component: "search-bar";
|
|
1156
1161
|
queryVariant: "submit" | "change";
|
package/dist/index.mjs
CHANGED
|
@@ -4389,6 +4389,8 @@ function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
4389
4389
|
variant ??= "detailed";
|
|
4390
4390
|
let paginationVariant = getPropertyValueContentByLabel(componentProperty.properties, "pagination-variant");
|
|
4391
4391
|
paginationVariant ??= "default";
|
|
4392
|
+
let loadingVariant = getPropertyValueContentByLabel(componentProperty.properties, "loading-variant");
|
|
4393
|
+
loadingVariant ??= "spinner";
|
|
4392
4394
|
let imageQuality = getPropertyValueContentByLabel(componentProperty.properties, "image-quality");
|
|
4393
4395
|
imageQuality ??= "low";
|
|
4394
4396
|
let isUsingQueryParams = getPropertyValueContentByLabel(componentProperty.properties, "is-using-query-params");
|
|
@@ -4440,6 +4442,7 @@ function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
4440
4442
|
})) ?? null,
|
|
4441
4443
|
variant,
|
|
4442
4444
|
paginationVariant,
|
|
4445
|
+
loadingVariant,
|
|
4443
4446
|
layout,
|
|
4444
4447
|
imageQuality,
|
|
4445
4448
|
isUsingQueryParams,
|
|
@@ -4700,6 +4703,8 @@ function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
4700
4703
|
variant ??= "detailed";
|
|
4701
4704
|
let paginationVariant = getPropertyValueContentByLabel(componentProperty.properties, "pagination-variant");
|
|
4702
4705
|
paginationVariant ??= "default";
|
|
4706
|
+
let loadingVariant = getPropertyValueContentByLabel(componentProperty.properties, "loading-variant");
|
|
4707
|
+
loadingVariant ??= "spinner";
|
|
4703
4708
|
let layout = getPropertyValueContentByLabel(componentProperty.properties, "layout");
|
|
4704
4709
|
layout ??= "image-start";
|
|
4705
4710
|
properties = {
|
|
@@ -4707,13 +4712,16 @@ function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
4707
4712
|
linkUuids: setLinks.map((link) => link.uuid).filter((uuid) => uuid !== null),
|
|
4708
4713
|
items,
|
|
4709
4714
|
options,
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4715
|
+
collectionProperties: {
|
|
4716
|
+
displayedProperties: displayedProperties?.values.filter((value) => value.uuid !== null).map((value) => ({
|
|
4717
|
+
uuid: value.uuid,
|
|
4718
|
+
label: value.content?.toString() ?? ""
|
|
4719
|
+
})) ?? null,
|
|
4720
|
+
variant,
|
|
4721
|
+
paginationVariant,
|
|
4722
|
+
loadingVariant,
|
|
4723
|
+
layout
|
|
4724
|
+
}
|
|
4717
4725
|
};
|
|
4718
4726
|
break;
|
|
4719
4727
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ochre-sdk",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.2",
|
|
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,7 +49,7 @@
|
|
|
49
49
|
"zod": "^4.3.6"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@antfu/eslint-config": "^8.
|
|
52
|
+
"@antfu/eslint-config": "^8.1.0",
|
|
53
53
|
"@types/node": "^24.12.2",
|
|
54
54
|
"bumpp": "^11.0.1",
|
|
55
55
|
"eslint": "^10.2.0",
|