@digitalculture/ochre-sdk 0.15.10 → 0.15.12

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
@@ -660,7 +660,7 @@ type Website = {
660
660
  iiifViewer: "universal-viewer" | "clover";
661
661
  isPropertyValuesGrouped: boolean;
662
662
  options: {
663
- contexts: PropertyContexts;
663
+ contexts: PropertyContexts | null;
664
664
  };
665
665
  };
666
666
  };
@@ -784,6 +784,7 @@ type WebElementComponent = {
784
784
  isMapDisplayed: boolean;
785
785
  isInputDisplayed: boolean;
786
786
  isLimitedToTitleQuery: boolean;
787
+ isLimitedToHighestHierarchyLevel: boolean;
787
788
  sidebarSort: "default" | "alphabetical";
788
789
  };
789
790
  options: {
@@ -796,7 +797,7 @@ type WebElementComponent = {
796
797
  type: string;
797
798
  identification: Identification;
798
799
  }>;
799
- contexts: PropertyContexts;
800
+ contexts: PropertyContexts | null;
800
801
  };
801
802
  } | {
802
803
  component: "empty-space";
package/dist/index.mjs CHANGED
@@ -2050,6 +2050,9 @@ function parseWebElementProperties(componentProperty, elementResource) {
2050
2050
  let isFilterLimitedToTitleQuery = false;
2051
2051
  const isFilterLimitedToTitleQueryProperty = getPropertyValueByLabel(componentProperty.properties, "filter-limit-to-title-query");
2052
2052
  if (isFilterLimitedToTitleQueryProperty !== null) isFilterLimitedToTitleQuery = isFilterLimitedToTitleQueryProperty === true;
2053
+ let isFilterLimitedToHighestHierarchyLevel = false;
2054
+ const isFilterLimitedToHighestHierarchyLevelProperty = getPropertyValueByLabel(componentProperty.properties, "filter-limit-to-highest-hierarchy-level");
2055
+ if (isFilterLimitedToHighestHierarchyLevelProperty !== null) isFilterLimitedToHighestHierarchyLevel = isFilterLimitedToHighestHierarchyLevelProperty === true;
2053
2056
  let isSortDisplayed = false;
2054
2057
  const isSortDisplayedProperty = getPropertyValueByLabel(componentProperty.properties, "sort-displayed");
2055
2058
  if (isSortDisplayedProperty !== null) isSortDisplayed = isSortDisplayedProperty === true;
@@ -2070,16 +2073,7 @@ function parseWebElementProperties(componentProperty, elementResource) {
2070
2073
  type: scope.uuid.type,
2071
2074
  identification: parseIdentification(scope.identification)
2072
2075
  })) : [],
2073
- contexts: {
2074
- flatten: [],
2075
- filter: [],
2076
- sort: [],
2077
- detail: [],
2078
- download: [],
2079
- label: [],
2080
- suppress: [],
2081
- prominent: []
2082
- }
2076
+ contexts: null
2083
2077
  };
2084
2078
  if ("options" in elementResource && elementResource.options) {
2085
2079
  const flattenContextsRaw = elementResource.options.flattenContexts != null ? Array.isArray(elementResource.options.flattenContexts) ? elementResource.options.flattenContexts : [elementResource.options.flattenContexts] : [];
@@ -2118,6 +2112,7 @@ function parseWebElementProperties(componentProperty, elementResource) {
2118
2112
  isMapDisplayed: isFilterMapDisplayed,
2119
2113
  isInputDisplayed: isFilterInputDisplayed,
2120
2114
  isLimitedToTitleQuery: isFilterLimitedToTitleQuery,
2115
+ isLimitedToHighestHierarchyLevel: isFilterLimitedToHighestHierarchyLevel,
2121
2116
  sidebarSort: filterSidebarSort
2122
2117
  };
2123
2118
  properties.isSortDisplayed = isSortDisplayed;
@@ -2912,16 +2907,7 @@ function parseWebsiteProperties(properties, websiteTree) {
2912
2907
  const defaultThemeProperty = websiteProperties.find((property) => property.label === "default-theme")?.values[0];
2913
2908
  if (defaultThemeProperty) defaultTheme = defaultThemeProperty.content;
2914
2909
  const { type: validatedType, status: validatedStatus, privacy: validatedPrivacy } = result.data;
2915
- let contexts = {
2916
- flatten: [],
2917
- suppress: [],
2918
- filter: [],
2919
- sort: [],
2920
- detail: [],
2921
- download: [],
2922
- label: [],
2923
- prominent: []
2924
- };
2910
+ let contexts = null;
2925
2911
  if ("options" in websiteTree && websiteTree.options) {
2926
2912
  const flattenContextsRaw = websiteTree.options.flattenContexts != null ? Array.isArray(websiteTree.options.flattenContexts) ? websiteTree.options.flattenContexts : [websiteTree.options.flattenContexts] : [];
2927
2913
  const suppressContextsRaw = websiteTree.options.suppressContexts != null ? Array.isArray(websiteTree.options.suppressContexts) ? websiteTree.options.suppressContexts : [websiteTree.options.suppressContexts] : [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.15.10",
3
+ "version": "0.15.12",
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",
@@ -43,7 +43,7 @@
43
43
  "zod": "^4.3.5"
44
44
  },
45
45
  "devDependencies": {
46
- "@antfu/eslint-config": "^7.0.1",
46
+ "@antfu/eslint-config": "^7.1.0",
47
47
  "@types/node": "^24.10.9",
48
48
  "bumpp": "^10.4.0",
49
49
  "eslint": "^9.39.2",