ochre-sdk 0.22.9 → 0.22.11

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 CHANGED
@@ -1049,11 +1049,10 @@ type WebElementComponent = {
1049
1049
  uuid: string;
1050
1050
  label: string;
1051
1051
  }> | null;
1052
- variant: "detailed" | "card" | "tile" | "showcase";
1052
+ variant: "slide" | "table" | "card" | "tile" | "showcase";
1053
1053
  paginationVariant: "default" | "numeric";
1054
1054
  loadingVariant: "spinner" | "skeleton" | "animation" | "none";
1055
- layout: "image-top" | "image-bottom" | "image-start" | "image-end";
1056
- imageQuality: "high" | "low";
1055
+ imageLayout: "top" | "bottom" | "start" | "end" | null;
1057
1056
  isSortDisplayed: boolean;
1058
1057
  isUsingQueryParams: boolean;
1059
1058
  filter: {
@@ -1067,8 +1066,14 @@ type WebElementComponent = {
1067
1066
  };
1068
1067
  options: {
1069
1068
  attributeFilters: {
1070
- bibliographies: boolean;
1071
- periods: boolean;
1069
+ bibliographies: {
1070
+ enabled: boolean;
1071
+ isOpenByDefault: boolean;
1072
+ };
1073
+ periods: {
1074
+ enabled: boolean;
1075
+ isOpenByDefault: boolean;
1076
+ };
1072
1077
  };
1073
1078
  scopes: Array<Scope> | null;
1074
1079
  contexts: PropertyContexts | null;
@@ -1158,9 +1163,9 @@ type WebElementComponent = {
1158
1163
  loadingVariant: Extract<WebElementComponent, {
1159
1164
  component: "collection";
1160
1165
  }>["loadingVariant"];
1161
- layout: Extract<WebElementComponent, {
1166
+ imageLayout: Extract<WebElementComponent, {
1162
1167
  component: "collection";
1163
- }>["layout"];
1168
+ }>["imageLayout"];
1164
1169
  };
1165
1170
  } | {
1166
1171
  component: "search-bar";
package/dist/index.mjs CHANGED
@@ -3912,13 +3912,11 @@ function parseWebElementProperties(componentProperty, elementResource) {
3912
3912
  if (setLinks.every((link) => link.uuid === null)) throw new Error(`Set links not found for the following component: “${componentName}”`);
3913
3913
  const displayedProperties = getPropertyByLabel(componentProperty.properties, "use-property");
3914
3914
  let variant = getPropertyValueContentByLabel(componentProperty.properties, "variant");
3915
- variant ??= "detailed";
3915
+ variant ??= "slide";
3916
3916
  let paginationVariant = getPropertyValueContentByLabel(componentProperty.properties, "pagination-variant");
3917
3917
  paginationVariant ??= "default";
3918
3918
  let loadingVariant = getPropertyValueContentByLabel(componentProperty.properties, "loading-variant");
3919
- loadingVariant ??= "spinner";
3920
- let imageQuality = getPropertyValueContentByLabel(componentProperty.properties, "image-quality");
3921
- imageQuality ??= "low";
3919
+ loadingVariant ??= "skeleton";
3922
3920
  let isUsingQueryParams = getPropertyValueContentByLabel(componentProperty.properties, "is-using-query-params");
3923
3921
  isUsingQueryParams ??= false;
3924
3922
  let isFilterResultsBarDisplayed = getPropertyValueContentByLabel(componentProperty.properties, "filter-results-bar-displayed");
@@ -3937,12 +3935,18 @@ function parseWebElementProperties(componentProperty, elementResource) {
3937
3935
  isFilterSidebarDisplayed ??= false;
3938
3936
  let filterSidebarSort = getPropertyValueContentByLabel(componentProperty.properties, "filter-sidebar-sort");
3939
3937
  filterSidebarSort ??= "default";
3940
- let layout = getPropertyValueContentByLabel(componentProperty.properties, "layout");
3941
- layout ??= "image-start";
3938
+ let imageLayout = getPropertyValueContentByLabel(componentProperty.properties, "image-layout");
3939
+ imageLayout ??= "start";
3942
3940
  const options = {
3943
3941
  attributeFilters: {
3944
- bibliographies: elementResource.options?.filterBibliography ?? false,
3945
- periods: elementResource.options?.filterPeriods ?? false
3942
+ bibliographies: {
3943
+ enabled: elementResource.options?.filterBibliography ?? false,
3944
+ isOpenByDefault: false
3945
+ },
3946
+ periods: {
3947
+ enabled: elementResource.options?.filterPeriods ?? false,
3948
+ isOpenByDefault: false
3949
+ }
3946
3950
  },
3947
3951
  scopes: elementResource.options?.scopes != null ? ensureArray(elementResource.options.scopes.scope).map((scope) => ({
3948
3952
  uuid: scope.uuid.content,
@@ -3969,8 +3973,7 @@ function parseWebElementProperties(componentProperty, elementResource) {
3969
3973
  variant,
3970
3974
  paginationVariant,
3971
3975
  loadingVariant,
3972
- layout,
3973
- imageQuality,
3976
+ imageLayout,
3974
3977
  isUsingQueryParams,
3975
3978
  isSortDisplayed,
3976
3979
  filter: {
@@ -4226,13 +4229,13 @@ function parseWebElementProperties(componentProperty, elementResource) {
4226
4229
  }
4227
4230
  const displayedProperties = getPropertyByLabel(componentProperty.properties, "use-property");
4228
4231
  let variant = getPropertyValueContentByLabel(componentProperty.properties, "variant");
4229
- variant ??= "detailed";
4232
+ variant ??= "slide";
4230
4233
  let paginationVariant = getPropertyValueContentByLabel(componentProperty.properties, "pagination-variant");
4231
4234
  paginationVariant ??= "default";
4232
4235
  let loadingVariant = getPropertyValueContentByLabel(componentProperty.properties, "loading-variant");
4233
- loadingVariant ??= "spinner";
4234
- let layout = getPropertyValueContentByLabel(componentProperty.properties, "layout");
4235
- layout ??= "image-start";
4236
+ loadingVariant ??= "skeleton";
4237
+ let imageLayout = getPropertyValueContentByLabel(componentProperty.properties, "image-layout");
4238
+ imageLayout ??= "start";
4236
4239
  properties = {
4237
4240
  component: "query",
4238
4241
  linkUuids: setLinks.map((link) => link.uuid).filter((uuid) => uuid !== null),
@@ -4246,7 +4249,7 @@ function parseWebElementProperties(componentProperty, elementResource) {
4246
4249
  variant,
4247
4250
  paginationVariant,
4248
4251
  loadingVariant,
4249
- layout
4252
+ imageLayout
4250
4253
  }
4251
4254
  };
4252
4255
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ochre-sdk",
3
- "version": "0.22.9",
3
+ "version": "0.22.11",
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",
@@ -53,8 +53,8 @@
53
53
  "@types/node": "^24.12.2",
54
54
  "bumpp": "^11.0.1",
55
55
  "eslint": "^10.2.0",
56
- "prettier": "^3.8.2",
57
- "tsdown": "^0.21.8",
56
+ "prettier": "^3.8.3",
57
+ "tsdown": "^0.21.9",
58
58
  "typescript": "^6.0.2",
59
59
  "vitest": "^4.1.4"
60
60
  },