ochre-sdk 1.0.32 → 1.0.34

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.
@@ -122,6 +122,7 @@ const propertyValueQueryItemSchema = v.pipe(v.object({
122
122
  const dataType = normalizePropertyValueDataType(val.dataType);
123
123
  const label = parsePropertyValueLabel(val.content, val.payload);
124
124
  const returnValue = {
125
+ uuid: val.uuid !== "" ? val.uuid : null,
125
126
  scope: val.scope,
126
127
  variableUuid: val.variableUuid != null && val.variableUuid !== "" ? val.variableUuid : null,
127
128
  count: val.count,
@@ -468,12 +469,14 @@ async function fetchSetPropertyValues(params, options) {
468
469
  for (const propertyValue of parsedPropertyValues) {
469
470
  if (propertyValue.content == null) continue;
470
471
  const propertyValueItem = {
472
+ uuid: propertyValue.uuid,
471
473
  count: propertyValue.count,
472
474
  dataType: propertyValue.dataType,
473
475
  content: propertyValue.content,
474
476
  label: propertyValue.label
475
477
  };
476
478
  const globalPropertyValueItem = {
479
+ uuid: propertyValue.uuid,
477
480
  count: propertyValue.globalCount ?? propertyValue.count,
478
481
  dataType: propertyValue.dataType,
479
482
  content: propertyValue.content,
@@ -337,7 +337,7 @@ function parseWebElementProperties(componentProperty, elementResource, options,
337
337
  href = parseWebsiteLinkTarget(componentReader.valueNode("link-to"), context);
338
338
  if (href === null) throw new Error(formatComponentError("Properties “navigate-to” or “link-to” not found", componentName, elementResource), { cause: componentProperty });
339
339
  else {
340
- isExternal = true;
340
+ isExternal = href.startsWith("http");
341
341
  isRelative = !href.startsWith("/");
342
342
  }
343
343
  }
@@ -739,6 +739,7 @@ type Gallery<T extends LanguageCodes = LanguageCodes> = {
739
739
  * Represents a property query item with its UUID, raw value, count, and content
740
740
  */
741
741
  type PropertyValueQueryItem = {
742
+ uuid: string | null;
742
743
  count: number;
743
744
  dataType: QueryablePropertyValueDataType;
744
745
  content: string | number | boolean | null;
@@ -2,7 +2,6 @@ import { MultilingualString } from "../parsers/multilingual.mjs";
2
2
  import { Bibliography, Identification, ItemCategory, LanguageCodes, License, Metadata, Person, QueryablePropertyValueDataType } from "./index.mjs";
3
3
 
4
4
  //#region src/types/website.d.ts
5
- type WebsitePropertyValueDataType = QueryablePropertyValueDataType;
6
5
  /**
7
6
  * Represents a context tree level item with a variable and value
8
7
  */
@@ -78,7 +77,7 @@ type StylesheetItem = {
78
77
  type WebsitePropertyQueryNode<T extends LanguageCodes = LanguageCodes> = {
79
78
  target: "property";
80
79
  propertyVariable: string;
81
- dataType: WebsitePropertyValueDataType;
80
+ dataType: QueryablePropertyValueDataType;
82
81
  matchMode: "includes" | "exact";
83
82
  isCaseSensitive: boolean;
84
83
  language: T[number];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ochre-sdk",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
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",