@bikematrix/web-components 1.0.11 → 1.0.15
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/bm_core.es.js +21 -16
- package/dist/bm_core.js +3 -3
- package/dist/bm_core.umd.js +3 -3
- package/dist/types/bm_core.es.d.ts +1 -0
- package/package.json +1 -1
package/dist/bm_core.es.js
CHANGED
|
@@ -1240,9 +1240,11 @@ const Gt = de(!1), j = de(null), we = de([]), re = de(!1), Ee = de([]), oe = de(
|
|
|
1240
1240
|
Va(() => {
|
|
1241
1241
|
j.value = null, we.value = [], re.value = !1, Ee.value = [], oe.value = !1;
|
|
1242
1242
|
});
|
|
1243
|
-
}, zo = "bm_currentBike", Ka = "v2", Ja = "https://bikematrix
|
|
1244
|
-
//
|
|
1243
|
+
}, zo = "bm_currentBike", Ka = "v2", Ja = "https://cdn.bikematrix.io", Pr = {
|
|
1244
|
+
// Shopify specific
|
|
1245
1245
|
isShopify: !1,
|
|
1246
|
+
skuField: "sku",
|
|
1247
|
+
// Bike Selector
|
|
1246
1248
|
apiUrl: "https://api.bikematrix.io/",
|
|
1247
1249
|
currentCollectionHandle: "",
|
|
1248
1250
|
categories: [],
|
|
@@ -5386,25 +5388,28 @@ const Ji = async (t, e, r) => {
|
|
|
5386
5388
|
};
|
|
5387
5389
|
function Wi({
|
|
5388
5390
|
"data-product-id": t,
|
|
5389
|
-
"data-product-skus": e
|
|
5391
|
+
"data-product-skus": e,
|
|
5392
|
+
"data-product-barcodes": r,
|
|
5393
|
+
"data-product-metafields": o
|
|
5390
5394
|
}) {
|
|
5391
|
-
const
|
|
5395
|
+
const a = window.BikeMatrix, i = a.getConfig(), [n, s] = Q(!1), u = !!a.getActiveSubscription();
|
|
5392
5396
|
ie = {
|
|
5393
5397
|
type: "unavailable",
|
|
5394
5398
|
...Se.unavailable
|
|
5395
5399
|
};
|
|
5396
5400
|
const {
|
|
5397
|
-
currentCollectionHandle:
|
|
5398
|
-
isHomePage:
|
|
5399
|
-
isSearchPage:
|
|
5400
|
-
showSearchPageCollection:
|
|
5401
|
-
showHomePageCollection:
|
|
5402
|
-
logLevel:
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5401
|
+
currentCollectionHandle: l,
|
|
5402
|
+
isHomePage: p,
|
|
5403
|
+
isSearchPage: c,
|
|
5404
|
+
showSearchPageCollection: g,
|
|
5405
|
+
showHomePageCollection: f,
|
|
5406
|
+
logLevel: _,
|
|
5407
|
+
skuField: m
|
|
5408
|
+
} = i, y = !!i.pageType && i.pageType === "product", C = m === "barcode" ? r : m === "metafield" ? o : e || "";
|
|
5409
|
+
return _ === "verbose" && (console.log("CollectionResult currentCollectionHandle: ", l), console.log("CollectionResult productId: ", t), console.log("CollectionResult productVariantsSkus: ", e), console.log("CollectionResult skusToCheck: ", C), console.log("CollectionResult BikeSignal.value: " + JSON.stringify(j.value))), oe.value ? s(!0) : j.value && Yi(p, c, f, g, y, t, l) ? Ji(j.value.key, t, C).then(() => {
|
|
5410
|
+
s(!0);
|
|
5411
|
+
}) : s(!1), _ === "verbose" && console.log("CollectionResult status: ", ie), d(N, {
|
|
5412
|
+
children: u && n && d(N, {
|
|
5408
5413
|
children: [d("style", {
|
|
5409
5414
|
type: "text/css",
|
|
5410
5415
|
children: Ki
|
|
@@ -5616,7 +5621,7 @@ function an({
|
|
|
5616
5621
|
return null;
|
|
5617
5622
|
const A = (V = (O = e == null ? void 0 : e.current) == null ? void 0 : O.parentElement) == null ? void 0 : V.querySelector('template[slot="product-card"]');
|
|
5618
5623
|
b === "verbose" && console.log("CompatibleList Product Card Template: ", A);
|
|
5619
|
-
const q = (A ? A.innerHTML : on()).replace(/\{\{
|
|
5624
|
+
const q = (A ? A.innerHTML : on()).replace(o.isShopify ? /\@\@#if\s+(\w+)\@\@(.*?)\@\@\/if\@\@/gs : /\{\{#if\s+(\w+)\}\}(.*?)\{\{\/if\}\}/gs, (I, G, x) => w[G] ? x : "").replace(o.isShopify ? /\@\@\s*(\w+)\s*\@\@/g : /\{\{\s*(\w+)\s*\}\}/g, (I, G) => {
|
|
5620
5625
|
if (G === "compatibility")
|
|
5621
5626
|
return '<bikematrix-compatibilitylabel data-type="compatible"></bikematrix-compatibilitylabel>';
|
|
5622
5627
|
const x = w[G];
|