@wix/stores 1.0.994 → 1.0.995
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/build/cjs/context-product-by-slug.js +26 -18
- package/build/cjs/context-product-by-slug.js.map +1 -1
- package/build/es/context-product-by-slug.mjs +26 -18
- package/build/es/context-product-by-slug.mjs.map +1 -1
- package/context-runtime/context-product-by-slug/runtime.js +2 -2
- package/package.json +5 -5
|
@@ -3426,33 +3426,41 @@ function Zl() {
|
|
|
3426
3426
|
return Ql(new URL(e2.currentUrl));
|
|
3427
3427
|
}
|
|
3428
3428
|
function Ql(e2) {
|
|
3429
|
-
|
|
3429
|
+
let t2 = e2.pathname.split(`/`).filter(Boolean).at(-1);
|
|
3430
|
+
return t2 ? $l(t2) : void 0;
|
|
3430
3431
|
}
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3432
|
+
function $l(e2) {
|
|
3433
|
+
try {
|
|
3434
|
+
return decodeURIComponent(e2);
|
|
3435
|
+
} catch {
|
|
3436
|
+
return e2;
|
|
3437
|
+
}
|
|
3438
|
+
}
|
|
3439
|
+
var eu = q(`seo/seo-service`);
|
|
3440
|
+
var tu = q(`@wix/site-service-rendering-context`);
|
|
3441
|
+
function nu(e2) {
|
|
3442
|
+
let t2 = c(eu), { SSR: n2 } = c(tu), i2 = r(false);
|
|
3435
3443
|
!i2.current && e2.id && n2 && (i2.current = true, t2.setSeoEntity({ itemType: `STORES_PRODUCT`, seoData: e2.seoData ?? {}, itemData: { product: e2 } }).catch(() => {
|
|
3436
3444
|
}));
|
|
3437
3445
|
}
|
|
3438
|
-
var
|
|
3439
|
-
function
|
|
3446
|
+
var ru = `No product slug is available for the product context`;
|
|
3447
|
+
function iu() {
|
|
3440
3448
|
return o();
|
|
3441
3449
|
}
|
|
3442
|
-
function
|
|
3450
|
+
function au({ productPromise: e2 }) {
|
|
3443
3451
|
let { seoProduct: t2 } = kn(e2);
|
|
3444
|
-
return
|
|
3452
|
+
return nu(t2), null;
|
|
3445
3453
|
}
|
|
3446
|
-
function
|
|
3447
|
-
let t2 = Zl(), n2 = Yl(`slug:${t2}`, () => t2 ? Gi(t2) : Promise.reject(Error(
|
|
3448
|
-
return u(zl, { productPromise: n2, source: Xl.PRODUCT_BY_SLUG, children: [l(
|
|
3454
|
+
function ou({ children: e2 }) {
|
|
3455
|
+
let t2 = Zl(), n2 = Yl(`slug:${t2}`, () => t2 ? Gi(t2) : Promise.reject(Error(ru)));
|
|
3456
|
+
return u(zl, { productPromise: n2, source: Xl.PRODUCT_BY_SLUG, children: [l(au, { productPromise: n2 }), e2] });
|
|
3449
3457
|
}
|
|
3450
|
-
var
|
|
3458
|
+
var su = On(`b276b552-68b9-4936-98d5-fbe43c0bd257`);
|
|
3451
3459
|
export {
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3460
|
+
ru as NO_PRODUCT_SLUG_ERROR,
|
|
3461
|
+
ou as ProductBySlugContextProvider,
|
|
3462
|
+
ou as default,
|
|
3463
|
+
su as injectAccessTokenGetter,
|
|
3464
|
+
iu as useProductBySlugContext
|
|
3457
3465
|
};
|
|
3458
3466
|
//# sourceMappingURL=context-product-by-slug.mjs.map
|