@visitscotland/component-library 5.30.1 → 5.31.0
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/client/manifest.json +8 -8
- package/dist/client/scripts/05ed6c26804615289452.js +1 -0
- package/dist/client/scripts/122199d641a06bdd32b3.js +1 -0
- package/dist/client/scripts/1b690d0299117cbd172e.js +1 -0
- package/dist/components/src/components/index.d.ts +1 -0
- package/dist/components/vs-component-library.js +1 -1
- package/dist/components/vs-component-library.mjs +19 -23
- package/dist/ssr/index.js +1 -1
- package/dist/ssr/manifest.json +1 -1
- package/package.json +1 -1
- package/dist/client/scripts/159e30d5632bfa4b6b84.js +0 -1
- package/dist/client/scripts/951faebbaf9131953a9d.js +0 -1
- package/dist/client/scripts/cd4ea0dbff63d15f9a7e.js +0 -1
- /package/dist/client/styles/{159e30d5632bfa4b6b84.css → 122199d641a06bdd32b3.css} +0 -0
- /package/dist/ssr/styles/{b08884ca827853e58afb.css → dd79db22aea9d43c7e3b.css} +0 -0
|
@@ -33840,7 +33840,7 @@ async function cludoSearch(e, n, t, r, a, s) {
|
|
|
33840
33840
|
query: e || "*",
|
|
33841
33841
|
operator: s,
|
|
33842
33842
|
responseType: "JsonObject",
|
|
33843
|
-
perPage:
|
|
33843
|
+
perPage: 6,
|
|
33844
33844
|
page: t,
|
|
33845
33845
|
facets: {
|
|
33846
33846
|
Category: a ? [a] : null
|
|
@@ -33887,31 +33887,26 @@ function cleanData(e) {
|
|
|
33887
33887
|
}
|
|
33888
33888
|
async function eventSearch(e, n, t, r, a, s, o, i, l, c, u, d, f) {
|
|
33889
33889
|
const p = useFederatedSearchStore();
|
|
33890
|
-
|
|
33891
|
-
|
|
33892
|
-
|
|
33893
|
-
|
|
33894
|
-
|
|
33895
|
-
|
|
33896
|
-
|
|
33897
|
-
|
|
33898
|
-
|
|
33899
|
-
|
|
33900
|
-
return {
|
|
33901
|
-
results: cleanData(_),
|
|
33902
|
-
totalResults: _.totalResults
|
|
33903
|
-
};
|
|
33904
|
-
} catch {
|
|
33905
|
-
return p.isLoading = !1, p.eventsApiError = !0, {
|
|
33906
|
-
results: [],
|
|
33907
|
-
totalResults: 0
|
|
33908
|
-
};
|
|
33909
|
-
}
|
|
33910
|
-
} else
|
|
33890
|
+
p.eventsApiError = !1, p.cludoError = !1;
|
|
33891
|
+
let m = `${e}?query=${n}&lang=${l}`;
|
|
33892
|
+
m = t > 1 ? `${m}&page=${t}` : m, m = s !== "" ? `${m}&startDate=${s}` : m, m = o !== "" ? `${m}&endDate=${o}` : m, m = i ? `${m}&sort=${i}` : m, m = r === "events" ? `${m}&pageSize=12` : `${m}&pageSize=6`, m = c ? `${m}&postcode=${c}` : m, m = u ? `${m}&location=${u}` : m, m = d ? `${m}&radius=${d}` : m, m = f ? `${m}&postcodeareas=${f}` : m, a.forEach((g) => {
|
|
33893
|
+
m += `&category=${g}`;
|
|
33894
|
+
}), r && r !== "events" && (m += `&category=${r}`);
|
|
33895
|
+
try {
|
|
33896
|
+
const g = await fetch(m);
|
|
33897
|
+
if (!g.ok)
|
|
33898
|
+
throw p.isLoading = !1, p.eventsApiError = !0, new Error(`Events response message: ${g.status}`);
|
|
33899
|
+
const _ = await g.json();
|
|
33911
33900
|
return {
|
|
33901
|
+
results: cleanData(_),
|
|
33902
|
+
totalResults: _.totalResults
|
|
33903
|
+
};
|
|
33904
|
+
} catch {
|
|
33905
|
+
return p.isLoading = !1, p.eventsApiError = !0, {
|
|
33912
33906
|
results: [],
|
|
33913
33907
|
totalResults: 0
|
|
33914
33908
|
};
|
|
33909
|
+
}
|
|
33915
33910
|
}
|
|
33916
33911
|
async function cludoAutocomplete(e, n) {
|
|
33917
33912
|
const { apiKey: t, customerId: r, engineId: a } = n, o = `https://api-eu1.cludo.com/api/v3/${r}/${a}/Autocomplete`, i = `${r}:${t}`;
|
|
@@ -34763,7 +34758,7 @@ const _hoisted_1$4 = { class: "vs-fed-search-input" }, _hoisted_2$4 = { class: "
|
|
|
34763
34758
|
}
|
|
34764
34759
|
), a = e, s = ref(!1), o = computed$1(() => {
|
|
34765
34760
|
let v;
|
|
34766
|
-
return t.selectedCategoryKey
|
|
34761
|
+
return t.selectedCategoryKey === "events" ? v = Math.ceil(t.totalResultsEvents / 12) : v = t.totalResultsCludo >= t.totalResultsEvents ? Math.ceil(t.totalResultsCludo / 6) : Math.ceil(t.totalResultsEvents / 6), v;
|
|
34767
34762
|
});
|
|
34768
34763
|
function i() {
|
|
34769
34764
|
// Start date is after end date
|
|
@@ -36104,6 +36099,7 @@ export {
|
|
|
36104
36099
|
ListicleItem as VsListicleItem,
|
|
36105
36100
|
VsLoading as VsLoadingSpinner,
|
|
36106
36101
|
_sfc_main as VsMainMap,
|
|
36102
|
+
VsMediaCaption,
|
|
36107
36103
|
MegaNavAccordionItem as VsMegaNavAccordionItem,
|
|
36108
36104
|
MegaNavDropdownContainer as VsMegaNavDropdownContainer,
|
|
36109
36105
|
MegaNavFeaturedEvent as VsMegaNavFeaturedEvent,
|