@digitalculture/ochre-sdk 0.15.11 → 0.15.13
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 -0
- package/dist/index.mjs +8 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -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: {
|
|
@@ -864,6 +865,7 @@ type WebElementComponent = {
|
|
|
864
865
|
}>;
|
|
865
866
|
} | {
|
|
866
867
|
component: "search-bar";
|
|
868
|
+
queryVariant: "submit" | "change";
|
|
867
869
|
placeholder: string | null;
|
|
868
870
|
baseFilterQueries: string | null;
|
|
869
871
|
boundElementUuid: string | null;
|
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;
|
|
@@ -2109,6 +2112,7 @@ function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
2109
2112
|
isMapDisplayed: isFilterMapDisplayed,
|
|
2110
2113
|
isInputDisplayed: isFilterInputDisplayed,
|
|
2111
2114
|
isLimitedToTitleQuery: isFilterLimitedToTitleQuery,
|
|
2115
|
+
isLimitedToHighestHierarchyLevel: isFilterLimitedToHighestHierarchyLevel,
|
|
2112
2116
|
sidebarSort: filterSidebarSort
|
|
2113
2117
|
};
|
|
2114
2118
|
properties.isSortDisplayed = isSortDisplayed;
|
|
@@ -2318,12 +2322,16 @@ function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
2318
2322
|
break;
|
|
2319
2323
|
}
|
|
2320
2324
|
case "search-bar": {
|
|
2325
|
+
let queryVariant = "submit";
|
|
2326
|
+
const queryVariantProperty = getPropertyValueByLabel(componentProperty.properties, "query-variant");
|
|
2327
|
+
if (queryVariantProperty !== null) queryVariant = queryVariantProperty;
|
|
2321
2328
|
const boundElementPropertyUuid = getPropertyByLabel(componentProperty.properties, "bound-element")?.values[0]?.uuid;
|
|
2322
2329
|
const linkToProperty = getPropertyByLabel(componentProperty.properties, "link-to");
|
|
2323
2330
|
const href = linkToProperty?.values[0]?.href ?? linkToProperty?.values[0]?.slug ?? null;
|
|
2324
2331
|
if (!boundElementPropertyUuid && !href) throw new Error(`Bound element or href not found for the following component: “${componentName}”`);
|
|
2325
2332
|
const placeholder = getPropertyValueByLabel(componentProperty.properties, "placeholder-text");
|
|
2326
2333
|
const baseFilterQueries = getPropertyValueByLabel(componentProperty.properties, "base-filter-queries");
|
|
2334
|
+
properties.queryVariant = queryVariant;
|
|
2327
2335
|
properties.placeholder = placeholder !== null ? String(placeholder) : null;
|
|
2328
2336
|
properties.baseFilterQueries = baseFilterQueries !== null ? String(baseFilterQueries).replaceAll(String.raw`\{`, "{").replaceAll(String.raw`\}`, "}") : null;
|
|
2329
2337
|
properties.boundElementUuid = boundElementPropertyUuid;
|
package/package.json
CHANGED