@digitalculture/ochre-sdk 0.12.6 → 0.12.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.d.mts +2 -1
- package/dist/index.mjs +6 -3
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -618,7 +618,7 @@ type WebElement = {
|
|
|
618
618
|
*/
|
|
619
619
|
type WebElementComponent = {
|
|
620
620
|
component: "advanced-search";
|
|
621
|
-
|
|
621
|
+
boundElementUuid: string;
|
|
622
622
|
} | {
|
|
623
623
|
component: "annotated-document";
|
|
624
624
|
documentId: string;
|
|
@@ -755,6 +755,7 @@ type WebElementComponent = {
|
|
|
755
755
|
variant: "default" | "full";
|
|
756
756
|
placeholder: string | null;
|
|
757
757
|
baseQuery: string | null;
|
|
758
|
+
boundElementUuid: string;
|
|
758
759
|
} | {
|
|
759
760
|
component: "table";
|
|
760
761
|
tableId: string;
|
package/dist/index.mjs
CHANGED
|
@@ -1694,9 +1694,9 @@ function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1694
1694
|
const links = elementResource.links ? parseLinks(Array.isArray(elementResource.links) ? elementResource.links : [elementResource.links]) : [];
|
|
1695
1695
|
switch (componentName) {
|
|
1696
1696
|
case "advanced-search": {
|
|
1697
|
-
const
|
|
1698
|
-
if (!
|
|
1699
|
-
properties.
|
|
1697
|
+
const boundElementPropertyUuid = getPropertyByLabel(componentProperty.properties, "bound-element")?.values[0]?.uuid;
|
|
1698
|
+
if (!boundElementPropertyUuid) throw new Error(`Bound element not found for the following component: “${componentName}”`);
|
|
1699
|
+
properties.boundElementUuid = boundElementPropertyUuid;
|
|
1700
1700
|
break;
|
|
1701
1701
|
}
|
|
1702
1702
|
case "annotated-document": {
|
|
@@ -2061,6 +2061,8 @@ function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
2061
2061
|
break;
|
|
2062
2062
|
}
|
|
2063
2063
|
case "search-bar": {
|
|
2064
|
+
const boundElementPropertyUuid = getPropertyByLabel(componentProperty.properties, "bound-element")?.values[0]?.uuid;
|
|
2065
|
+
if (!boundElementPropertyUuid) throw new Error(`Bound element not found for the following component: “${componentName}”`);
|
|
2064
2066
|
let variant = getPropertyValueByLabel(componentProperty.properties, "variant");
|
|
2065
2067
|
variant ??= "default";
|
|
2066
2068
|
const placeholder = getPropertyValueByLabel(componentProperty.properties, "placeholder-text");
|
|
@@ -2068,6 +2070,7 @@ function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
2068
2070
|
properties.variant = variant;
|
|
2069
2071
|
properties.placeholder = placeholder !== null ? String(placeholder) : null;
|
|
2070
2072
|
properties.baseQuery = baseQuery !== null ? String(baseQuery).replaceAll(String.raw`\{`, "{").replaceAll(String.raw`\}`, "}") : null;
|
|
2073
|
+
properties.boundElementUuid = boundElementPropertyUuid;
|
|
2071
2074
|
break;
|
|
2072
2075
|
}
|
|
2073
2076
|
case "text": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitalculture/ochre-sdk",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.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",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@antfu/eslint-config": "^6.2.0",
|
|
47
|
-
"@types/node": "^24.10.
|
|
47
|
+
"@types/node": "^24.10.1",
|
|
48
48
|
"bumpp": "^10.3.1",
|
|
49
49
|
"eslint": "^9.39.1",
|
|
50
50
|
"prettier": "^3.6.2",
|
|
51
51
|
"terser": "^5.44.1",
|
|
52
|
-
"tsdown": "^0.16.
|
|
52
|
+
"tsdown": "^0.16.3",
|
|
53
53
|
"typescript": "^5.9.3",
|
|
54
54
|
"vitest": "^4.0.8"
|
|
55
55
|
},
|