@digitalculture/ochre-sdk 0.12.7 → 0.12.8
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 +3 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -755,7 +755,8 @@ type WebElementComponent = {
|
|
|
755
755
|
variant: "default" | "full";
|
|
756
756
|
placeholder: string | null;
|
|
757
757
|
baseQuery: string | null;
|
|
758
|
-
boundElementUuid: string;
|
|
758
|
+
boundElementUuid: string | null;
|
|
759
|
+
href: string | null;
|
|
759
760
|
} | {
|
|
760
761
|
component: "table";
|
|
761
762
|
tableId: string;
|
package/dist/index.mjs
CHANGED
|
@@ -2062,7 +2062,8 @@ function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
2062
2062
|
}
|
|
2063
2063
|
case "search-bar": {
|
|
2064
2064
|
const boundElementPropertyUuid = getPropertyByLabel(componentProperty.properties, "bound-element")?.values[0]?.uuid;
|
|
2065
|
-
|
|
2065
|
+
const href = getPropertyValueByLabel(componentProperty.properties, "link-to")?.toString() ?? null;
|
|
2066
|
+
if (!boundElementPropertyUuid && !href) throw new Error(`Bound element or href not found for the following component: “${componentName}”`);
|
|
2066
2067
|
let variant = getPropertyValueByLabel(componentProperty.properties, "variant");
|
|
2067
2068
|
variant ??= "default";
|
|
2068
2069
|
const placeholder = getPropertyValueByLabel(componentProperty.properties, "placeholder-text");
|
|
@@ -2071,6 +2072,7 @@ function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
2071
2072
|
properties.placeholder = placeholder !== null ? String(placeholder) : null;
|
|
2072
2073
|
properties.baseQuery = baseQuery !== null ? String(baseQuery).replaceAll(String.raw`\{`, "{").replaceAll(String.raw`\}`, "}") : null;
|
|
2073
2074
|
properties.boundElementUuid = boundElementPropertyUuid;
|
|
2075
|
+
properties.href = href;
|
|
2074
2076
|
break;
|
|
2075
2077
|
}
|
|
2076
2078
|
case "text": {
|
package/package.json
CHANGED