@bagelink/blox 1.15.655 → 1.15.659
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/CmsPageView.vue.d.ts.map +1 -1
- package/dist/{PreviewApp-CACfRxeF.cjs → PreviewApp-6SFipygX.cjs} +1 -1
- package/dist/{PreviewApp-D2UH5Z5c.js → PreviewApp-HmKWAJlr.js} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-DW84Blfc.cjs → PreviewApp.vue_vue_type_style_index_0_lang-BunY96Db.cjs} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-C4QRUJtN.js → PreviewApp.vue_vue_type_style_index_0_lang-DNNMZc3y.js} +1 -1
- package/dist/{appRuntime-lCWtPnUw.js → appRuntime-GZNiXRKQ.js} +24 -3
- package/dist/{appRuntime-CZtNzHTb.cjs → appRuntime-wuyiLmzO.cjs} +23 -2
- package/dist/composables/useLocaleNav.d.ts.map +1 -1
- package/dist/index.cjs +3 -5
- package/dist/index.mjs +4 -6
- package/dist/ssg/createSSREntry.d.ts +2 -0
- package/dist/ssg/createSSREntry.d.ts.map +1 -1
- package/dist/ssg/index.cjs +4 -2
- package/dist/ssg/index.mjs +4 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsPageView.vue.d.ts","sourceRoot":"","sources":["../src/CmsPageView.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CmsPageView.vue.d.ts","sourceRoot":"","sources":["../src/CmsPageView.vue"],"names":[],"mappings":";AAioBA,wBAMG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
3
|
+
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-BunY96Db.cjs");
|
|
4
4
|
exports.default = PreviewApp_vue_vue_type_style_index_0_lang._sfc_main;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, inject, ref, h, provide, onMounted, onUnmounted, openBlock, createElementBlock, createVNode, unref, nextTick } from "vue";
|
|
2
|
-
import { d as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, e as BLOX_RUNTIME_KEY } from "./appRuntime-
|
|
2
|
+
import { d as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, e as BLOX_RUNTIME_KEY } from "./appRuntime-GZNiXRKQ.js";
|
|
3
3
|
function sendToEditor(msg) {
|
|
4
4
|
window.parent.postMessage(cloneForPostMessage(msg), "*");
|
|
5
5
|
}
|
|
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4
4
|
import { createPinia } from "pinia";
|
|
5
5
|
import { inject, computed, ref, defineComponent, onMounted, unref, openBlock, createElementBlock, createElementVNode, createCommentVNode, getCurrentInstance, h, provide, watch, resolveComponent, toDisplayString, createVNode, withCtx, createTextVNode, Fragment, createBlock, shallowRef, onServerPrefetch, toValue, markRaw, resolveDynamicComponent } from "vue";
|
|
6
6
|
import { useBloxApi, getWebsiteIdSync, getWebsiteId, resolvePath, configureApi, listItemsFromActiveApi, getItemBySlug, getItemById } from "./index-I81QTzv-.js";
|
|
7
|
-
import { useRoute } from "vue-router";
|
|
7
|
+
import { useRoute, useRouter } from "vue-router";
|
|
8
8
|
import { getI18n } from "@bagelink/vue";
|
|
9
9
|
import { r as resolvePageTitle, s as siteNameFromContexts, a as preserveCurrentSiteSuffix } from "./pageTitle-B1mtDJKn.js";
|
|
10
10
|
import { r as readBloxHydration } from "./client-Ce9fRCGH.js";
|
|
@@ -289,6 +289,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
289
289
|
setup(__props) {
|
|
290
290
|
var _a;
|
|
291
291
|
const route = useRoute();
|
|
292
|
+
const router = useRouter();
|
|
292
293
|
const { locale: locale2, setLocale, setAlternates } = useLocale();
|
|
293
294
|
const strategy = inject(BLOX_LOCALE_STRATEGY_KEY, null);
|
|
294
295
|
const config = inject(BLOX_CONFIG_KEY, null);
|
|
@@ -314,6 +315,22 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
314
315
|
function currentRouteTarget(fallback) {
|
|
315
316
|
return typeof (route == null ? void 0 : route.fullPath) === "string" && route.fullPath ? route.fullPath : currentRoutePath() || fallback;
|
|
316
317
|
}
|
|
318
|
+
function homePath(localeCode) {
|
|
319
|
+
if (strategy) return strategy.toPath("/", localeCode);
|
|
320
|
+
return localeCode === "en" ? "/" : `/${localeCode}`;
|
|
321
|
+
}
|
|
322
|
+
function hasUnresolvedBinding(resolved) {
|
|
323
|
+
var _a2;
|
|
324
|
+
const bindings = (_a2 = resolved.page) == null ? void 0 : _a2.data_bindings;
|
|
325
|
+
if (!bindings) return false;
|
|
326
|
+
const boundKeys = Object.keys(bindings).filter((key) => key !== "$website");
|
|
327
|
+
if (!boundKeys.length) return false;
|
|
328
|
+
const contexts2 = resolved.contexts ?? {};
|
|
329
|
+
return boundKeys.some((key) => {
|
|
330
|
+
const value = contexts2[key];
|
|
331
|
+
return value === null || value === void 0;
|
|
332
|
+
});
|
|
333
|
+
}
|
|
317
334
|
function tryHydrateFromState(path) {
|
|
318
335
|
var _a2;
|
|
319
336
|
if ((ssrRouteState == null ? void 0 : ssrRouteState.path) === path && ssrRouteState.resolved) {
|
|
@@ -372,6 +389,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
372
389
|
navigating.value = true;
|
|
373
390
|
try {
|
|
374
391
|
const resolved = await ((api == null ? void 0 : api.resolvePath(slug, urlLocale)) ?? resolvePath(slug, urlLocale));
|
|
392
|
+
if (hasUnresolvedBinding(resolved)) {
|
|
393
|
+
await router.replace(homePath(urlLocale));
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
375
396
|
blocks.value = ((_a2 = resolved.page.content) == null ? void 0 : _a2.blocks) ?? [];
|
|
376
397
|
contexts.value = resolved.contexts ?? {};
|
|
377
398
|
currentPageId.value = resolved.page.id ?? null;
|
|
@@ -380,7 +401,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
380
401
|
} catch (e) {
|
|
381
402
|
const msg = e instanceof Error ? e.message : String(e);
|
|
382
403
|
if (msg.includes("404")) {
|
|
383
|
-
|
|
404
|
+
await router.replace(homePath(urlLocale));
|
|
384
405
|
} else {
|
|
385
406
|
error.value = msg;
|
|
386
407
|
}
|
|
@@ -870,7 +891,7 @@ class BloxInstance {
|
|
|
870
891
|
router.addRoute({
|
|
871
892
|
path: "/_blox_preview",
|
|
872
893
|
name: BLOX_PREVIEW_ROUTE_NAME,
|
|
873
|
-
component: () => import("./PreviewApp-
|
|
894
|
+
component: () => import("./PreviewApp-HmKWAJlr.js"),
|
|
874
895
|
beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
|
|
875
896
|
});
|
|
876
897
|
}
|
|
@@ -290,6 +290,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
290
290
|
setup(__props) {
|
|
291
291
|
var _a;
|
|
292
292
|
const route = vueRouter.useRoute();
|
|
293
|
+
const router = vueRouter.useRouter();
|
|
293
294
|
const { locale: locale2, setLocale, setAlternates } = useLocale();
|
|
294
295
|
const strategy = vue.inject(BLOX_LOCALE_STRATEGY_KEY, null);
|
|
295
296
|
const config = vue.inject(BLOX_CONFIG_KEY, null);
|
|
@@ -315,6 +316,22 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
315
316
|
function currentRouteTarget(fallback) {
|
|
316
317
|
return typeof (route == null ? void 0 : route.fullPath) === "string" && route.fullPath ? route.fullPath : currentRoutePath() || fallback;
|
|
317
318
|
}
|
|
319
|
+
function homePath(localeCode) {
|
|
320
|
+
if (strategy) return strategy.toPath("/", localeCode);
|
|
321
|
+
return localeCode === "en" ? "/" : `/${localeCode}`;
|
|
322
|
+
}
|
|
323
|
+
function hasUnresolvedBinding(resolved) {
|
|
324
|
+
var _a2;
|
|
325
|
+
const bindings = (_a2 = resolved.page) == null ? void 0 : _a2.data_bindings;
|
|
326
|
+
if (!bindings) return false;
|
|
327
|
+
const boundKeys = Object.keys(bindings).filter((key) => key !== "$website");
|
|
328
|
+
if (!boundKeys.length) return false;
|
|
329
|
+
const contexts2 = resolved.contexts ?? {};
|
|
330
|
+
return boundKeys.some((key) => {
|
|
331
|
+
const value = contexts2[key];
|
|
332
|
+
return value === null || value === void 0;
|
|
333
|
+
});
|
|
334
|
+
}
|
|
318
335
|
function tryHydrateFromState(path) {
|
|
319
336
|
var _a2;
|
|
320
337
|
if ((ssrRouteState == null ? void 0 : ssrRouteState.path) === path && ssrRouteState.resolved) {
|
|
@@ -373,6 +390,10 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
373
390
|
navigating.value = true;
|
|
374
391
|
try {
|
|
375
392
|
const resolved = await ((api == null ? void 0 : api.resolvePath(slug, urlLocale)) ?? index.resolvePath(slug, urlLocale));
|
|
393
|
+
if (hasUnresolvedBinding(resolved)) {
|
|
394
|
+
await router.replace(homePath(urlLocale));
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
376
397
|
blocks.value = ((_a2 = resolved.page.content) == null ? void 0 : _a2.blocks) ?? [];
|
|
377
398
|
contexts.value = resolved.contexts ?? {};
|
|
378
399
|
currentPageId.value = resolved.page.id ?? null;
|
|
@@ -381,7 +402,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
381
402
|
} catch (e) {
|
|
382
403
|
const msg = e instanceof Error ? e.message : String(e);
|
|
383
404
|
if (msg.includes("404")) {
|
|
384
|
-
|
|
405
|
+
await router.replace(homePath(urlLocale));
|
|
385
406
|
} else {
|
|
386
407
|
error.value = msg;
|
|
387
408
|
}
|
|
@@ -871,7 +892,7 @@ class BloxInstance {
|
|
|
871
892
|
router.addRoute({
|
|
872
893
|
path: "/_blox_preview",
|
|
873
894
|
name: BLOX_PREVIEW_ROUTE_NAME,
|
|
874
|
-
component: () => Promise.resolve().then(() => require("./PreviewApp-
|
|
895
|
+
component: () => Promise.resolve().then(() => require("./PreviewApp-6SFipygX.cjs")),
|
|
875
896
|
beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
|
|
876
897
|
});
|
|
877
898
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleNav.d.ts","sourceRoot":"","sources":["../../src/composables/useLocaleNav.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY;iCAYS,MAAM;
|
|
1
|
+
{"version":3,"file":"useLocaleNav.d.ts","sourceRoot":"","sources":["../../src/composables/useLocaleNav.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY;iCAYS,MAAM;mBAiBpB,MAAM,KAAG,MAAM;+BAOH,MAAM,oBAAe,MAAM;mBAYvC,MAAM,KAAG;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;;;EAa/D"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const index = require("./index-DUjEj7ts.cjs");
|
|
4
|
-
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
5
|
-
const appRuntime = require("./appRuntime-
|
|
4
|
+
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-BunY96Db.cjs");
|
|
5
|
+
const appRuntime = require("./appRuntime-wuyiLmzO.cjs");
|
|
6
6
|
const vue = require("vue");
|
|
7
7
|
const ssg_client = require("./client-AoDTJJXJ.cjs");
|
|
8
8
|
const vueRouter = require("vue-router");
|
|
@@ -139,9 +139,7 @@ function useLocaleNav() {
|
|
|
139
139
|
function switchLocale(targetLocale) {
|
|
140
140
|
if (!strategy) return;
|
|
141
141
|
const alts = currentAlternates.value;
|
|
142
|
-
const
|
|
143
|
-
const { slug: currentSlug } = strategy.detect(hostname, router.currentRoute.value.path);
|
|
144
|
-
const alternateSlug = alts[targetLocale] ?? alts[strategy.defaultLocale] ?? currentSlug ?? "/";
|
|
142
|
+
const alternateSlug = alts[targetLocale] ?? "/";
|
|
145
143
|
strategy.switchTo(targetLocale, alternateSlug, router);
|
|
146
144
|
}
|
|
147
145
|
function toPath(slug) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useBloxApi, getItemBySlug, getItemById, provideBloxApi } from "./index-I81QTzv-.js";
|
|
2
2
|
import { configureApi, createBloxApi, getCollectionResolver, getWebsiteId, getWebsiteIdSync, listItems, resolvePath, setApiOrigin, setCollectionResolver } from "./index-I81QTzv-.js";
|
|
3
|
-
import { _, P, s, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
4
|
-
import { f as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, e as BLOX_RUNTIME_KEY, g as useSeo, h as getRegistryData, j as getContentRoute, p as provideBloxData, b as provideBloxLocale, i as installBloxRuntime, s as setActiveLocale, k as installSmartLinks, l as consumePendingLocaleSwitch } from "./appRuntime-
|
|
5
|
-
import { _ as _2, m, o, q, t, v, w, x, y, P as P2, z, A, c, a as a2, C, D, E, F, G, H, I, J, K, L, M, r, N, O, Q, R } from "./appRuntime-
|
|
3
|
+
import { _, P, s, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-DNNMZc3y.js";
|
|
4
|
+
import { f as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, e as BLOX_RUNTIME_KEY, g as useSeo, h as getRegistryData, j as getContentRoute, p as provideBloxData, b as provideBloxLocale, i as installBloxRuntime, s as setActiveLocale, k as installSmartLinks, l as consumePendingLocaleSwitch } from "./appRuntime-GZNiXRKQ.js";
|
|
5
|
+
import { _ as _2, m, o, q, t, v, w, x, y, P as P2, z, A, c, a as a2, C, D, E, F, G, H, I, J, K, L, M, r, N, O, Q, R } from "./appRuntime-GZNiXRKQ.js";
|
|
6
6
|
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, Transition, resolveDynamicComponent, inject, ref, watch, onMounted, onUnmounted, computed, onServerPrefetch, toValue, h, Suspense, createSSRApp, createApp } from "vue";
|
|
7
7
|
import { r as readBloxHydration } from "./client-Ce9fRCGH.js";
|
|
8
8
|
import { useRouter, useRoute } from "vue-router";
|
|
@@ -139,9 +139,7 @@ function useLocaleNav() {
|
|
|
139
139
|
function switchLocale(targetLocale) {
|
|
140
140
|
if (!strategy) return;
|
|
141
141
|
const alts = currentAlternates.value;
|
|
142
|
-
const
|
|
143
|
-
const { slug: currentSlug } = strategy.detect(hostname, router.currentRoute.value.path);
|
|
144
|
-
const alternateSlug = alts[targetLocale] ?? alts[strategy.defaultLocale] ?? currentSlug ?? "/";
|
|
142
|
+
const alternateSlug = alts[targetLocale] ?? "/";
|
|
145
143
|
strategy.switchTo(targetLocale, alternateSlug, router);
|
|
146
144
|
}
|
|
147
145
|
function toPath(slug) {
|
|
@@ -64,6 +64,8 @@ interface PublishedPage {
|
|
|
64
64
|
}>;
|
|
65
65
|
/** Authoritative per-locale slugs, provided by the backend for static pages. */
|
|
66
66
|
alternates?: Record<string, string>;
|
|
67
|
+
/** Per-locale route PATTERNS for templates (`/legal/:slug` vs `/legale/:slug`). */
|
|
68
|
+
alternate_patterns?: Record<string, string>;
|
|
67
69
|
}
|
|
68
70
|
/**
|
|
69
71
|
* The `$website` context embedded into prerendered pages.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSSREntry.d.ts","sourceRoot":"","sources":["../../src/ssg/createSSREntry.ts"],"names":[],"mappings":"AAA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cAAc,UAAQ,GACpB,aAAa,GAAG,IAAI,CAUtB;AAuBD,wBAAsB,oBAAoB,CACzC,KAAK,EAAE,aAAa,EAAE,EACtB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,GACxD,OAAO,CAAC;IACV,IAAI,EAAE,aAAa,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAAA;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACnC,GAAG,IAAI,CAAC,CA+DR;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,YAAY,CAgNnF"}
|
package/dist/ssg/index.cjs
CHANGED
|
@@ -26,7 +26,7 @@ const llmArtifacts = require("../validate-output-BdzD7fIN.cjs");
|
|
|
26
26
|
const ssg_buildGrant = require("./build-grant.cjs");
|
|
27
27
|
const ssg_client = require("../client-AoDTJJXJ.cjs");
|
|
28
28
|
const vue = require("vue");
|
|
29
|
-
const appRuntime = require("../appRuntime-
|
|
29
|
+
const appRuntime = require("../appRuntime-wuyiLmzO.cjs");
|
|
30
30
|
const index = require("../index-DUjEj7ts.cjs");
|
|
31
31
|
async function renderBloxSsgPage(options) {
|
|
32
32
|
var _a, _b, _c, _d;
|
|
@@ -171,6 +171,7 @@ async function resolvePublishedPage(pages, slug, locale, resolver) {
|
|
|
171
171
|
if (availableLocales.length && stableId != null) {
|
|
172
172
|
const escapedId = String(stableId).replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
173
173
|
const localized = await Promise.all(availableLocales.map(async (targetLocale) => {
|
|
174
|
+
var _a2;
|
|
174
175
|
const localizedItems = targetLocale === locale ? [item] : await resolver(binding.collection, {
|
|
175
176
|
locale: targetLocale,
|
|
176
177
|
q: `id eq "${escapedId}"`,
|
|
@@ -179,9 +180,10 @@ async function resolvePublishedPage(pages, slug, locale, resolver) {
|
|
|
179
180
|
const localizedItem = localizedItems[0];
|
|
180
181
|
const localizedValue = localizedItem == null ? void 0 : localizedItem[binding.bind_by];
|
|
181
182
|
if (typeof localizedValue !== "string" || !localizedValue) return null;
|
|
183
|
+
const template = ((_a2 = page.alternate_patterns) == null ? void 0 : _a2[targetLocale]) ?? page.slug;
|
|
182
184
|
return [
|
|
183
185
|
targetLocale,
|
|
184
|
-
|
|
186
|
+
template.replace(`:${param.name}`, localizedValue)
|
|
185
187
|
];
|
|
186
188
|
}));
|
|
187
189
|
alternates = Object.fromEntries(localized.filter((value2) => value2 != null));
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { k, l, f, m, n, o, q, g, r, s, t, w, x, y, p, a, z, A, u, c, v } from ".
|
|
|
3
3
|
import { parseBloxBuildGrantBody, resolveBloxBuildGrant } from "./build-grant.mjs";
|
|
4
4
|
import { a as BLOX_HYDRATION_WINDOW_KEY } from "../client-Ce9fRCGH.js";
|
|
5
5
|
import { createSSRApp, h, Suspense } from "vue";
|
|
6
|
-
import { c as collectBloxData, a as collectBloxSeo, p as provideBloxData, b as provideBloxLocale, B as BLOX_SSR_ROUTE_STATE_KEY, i as installBloxRuntime, s as setActiveLocale } from "../appRuntime-
|
|
6
|
+
import { c as collectBloxData, a as collectBloxSeo, p as provideBloxData, b as provideBloxLocale, B as BLOX_SSR_ROUTE_STATE_KEY, i as installBloxRuntime, s as setActiveLocale } from "../appRuntime-GZNiXRKQ.js";
|
|
7
7
|
import { provideBloxApi, getCollectionResolver } from "../index-I81QTzv-.js";
|
|
8
8
|
async function renderBloxSsgPage(options) {
|
|
9
9
|
var _a, _b, _c, _d;
|
|
@@ -148,6 +148,7 @@ async function resolvePublishedPage(pages, slug, locale, resolver) {
|
|
|
148
148
|
if (availableLocales.length && stableId != null) {
|
|
149
149
|
const escapedId = String(stableId).replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
150
150
|
const localized = await Promise.all(availableLocales.map(async (targetLocale) => {
|
|
151
|
+
var _a2;
|
|
151
152
|
const localizedItems = targetLocale === locale ? [item] : await resolver(binding.collection, {
|
|
152
153
|
locale: targetLocale,
|
|
153
154
|
q: `id eq "${escapedId}"`,
|
|
@@ -156,9 +157,10 @@ async function resolvePublishedPage(pages, slug, locale, resolver) {
|
|
|
156
157
|
const localizedItem = localizedItems[0];
|
|
157
158
|
const localizedValue = localizedItem == null ? void 0 : localizedItem[binding.bind_by];
|
|
158
159
|
if (typeof localizedValue !== "string" || !localizedValue) return null;
|
|
160
|
+
const template = ((_a2 = page.alternate_patterns) == null ? void 0 : _a2[targetLocale]) ?? page.slug;
|
|
159
161
|
return [
|
|
160
162
|
targetLocale,
|
|
161
|
-
|
|
163
|
+
template.replace(`:${param.name}`, localizedValue)
|
|
162
164
|
];
|
|
163
165
|
}));
|
|
164
166
|
alternates = Object.fromEntries(localized.filter((value2) => value2 != null));
|
package/package.json
CHANGED