@bikematrix/web-components 1.1.38 → 1.1.39
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 +8 -9
- package/dist/bm_core.js +4 -4
- package/dist/bm_core.umd.js +4 -4
- package/package.json +1 -1
package/dist/bm_core.es.js
CHANGED
|
@@ -3971,7 +3971,6 @@ class Wt {
|
|
|
3971
3971
|
success: !1,
|
|
3972
3972
|
error: "error_generic getBikeBom"
|
|
3973
3973
|
};
|
|
3974
|
-
console.log(e);
|
|
3975
3974
|
const t = this.getEndpoint("bikeBom"), r = await this.makeRequest(t, {
|
|
3976
3975
|
params: {
|
|
3977
3976
|
bikeKey: e
|
|
@@ -4307,12 +4306,12 @@ const C2 = class Aa {
|
|
|
4307
4306
|
}
|
|
4308
4307
|
// Initialize with optional config
|
|
4309
4308
|
async initialize(e) {
|
|
4310
|
-
|
|
4309
|
+
this.components = [], this.initialized && this.cleanup(), e && (this.config = {
|
|
4311
4310
|
...this.config,
|
|
4312
4311
|
...e
|
|
4313
4312
|
}), this.initializeConfig(), this.service = new Wt(this.config.apiUrl, this.config.apiKey, this.config.apiToken, this.config.isShopify), this.initializeActiveSubscription(), localStorage.bm_currentBike && (this.currentBike = JSON.parse(localStorage.bm_currentBike)), this.setupEventListeners(), this.registerComponents(), this.initialized = !0, Tu.value = !0;
|
|
4314
4313
|
const t = new Event("BM:Initialized");
|
|
4315
|
-
document.dispatchEvent(t), this.config.logLevel === "verbose" && console.log("BikeMatrixCore initialized");
|
|
4314
|
+
document.dispatchEvent(t), this.config.logLevel === "verbose" && (console.log("BikeMatrix WebComponent Version: 1.1.39"), console.log("BikeMatrixCore initialized"));
|
|
4316
4315
|
}
|
|
4317
4316
|
// Singleton pattern to ensure a single global instance
|
|
4318
4317
|
static getInstance() {
|
|
@@ -4434,7 +4433,7 @@ const C2 = class Aa {
|
|
|
4434
4433
|
this.currentBike === null ? (e = window.bm_selectBikeButton) == null || e.classList.remove("show-selected") : (t = window.bm_selectBikeButton) == null || t.classList.add("show-selected");
|
|
4435
4434
|
}
|
|
4436
4435
|
ChangeBike() {
|
|
4437
|
-
this.config.logLevel === "verbose" && console.log("ChangeBike() Method Called"), !(Ut.value === !0 || dr.value === !0) && (Ut.value = !0, dr.value = !0, Ai.value = [], Di.value = [], console.log("ChangeBike updateBikeSignal..."), this.updateBikeSignal().then(() => {
|
|
4436
|
+
this.config.logLevel === "verbose" && console.log("ChangeBike() Method Called"), !(Ut.value === !0 || dr.value === !0) && (Ut.value = !0, dr.value = !0, Ai.value = [], Di.value = [], this.config.logLevel === "verbose" && console.log("ChangeBike updateBikeSignal..."), this.updateBikeSignal().then(() => {
|
|
4438
4437
|
this.config.logLevel === "verbose" && console.log("Bike Signal Updated: ", JSON.stringify(Ae.value, null, 2)), this.ResetSelectedBikeIndicator(), this.RefreshCompatibleSkus().then(() => {
|
|
4439
4438
|
document.dispatchEvent(new Event("RefreshCompatibility", {
|
|
4440
4439
|
bubbles: !0,
|
|
@@ -4492,8 +4491,8 @@ const C2 = class Aa {
|
|
|
4492
4491
|
const h = await this.service.checkSkusCompatibilityWithResults(Ae.value.key, u, r, {
|
|
4493
4492
|
signal: f
|
|
4494
4493
|
});
|
|
4495
|
-
if (this.config.logLevel === "verbose" && console.log("Refresh Collection SKUs from API. SKUs: ", JSON.stringify(h)),
|
|
4496
|
-
console.log("function RefreshCompatibleSkus() operation aborted");
|
|
4494
|
+
if (this.config.logLevel === "verbose" && console.log("Refresh Collection SKUs from API. SKUs: ", JSON.stringify(h)), f.aborted) {
|
|
4495
|
+
this.config.logLevel === "verbose" && console.log("function RefreshCompatibleSkus() operation aborted");
|
|
4497
4496
|
return;
|
|
4498
4497
|
}
|
|
4499
4498
|
(l = h.data) != null && l.errors ? (ss.value = !0, this.config.logLevel === "verbose" && console.log("Compatible List Error: ", h.data.errors)) : (sessionStorage.setItem(e, JSON.stringify(h.data)), Ai.value = h.data);
|
|
@@ -8321,7 +8320,7 @@ const Dy = () => {
|
|
|
8321
8320
|
});
|
|
8322
8321
|
}, Sc = () => {
|
|
8323
8322
|
JSON.parse(sessionStorage.getItem("bm_categories")).collections.map((e) => {
|
|
8324
|
-
|
|
8323
|
+
sessionStorage.removeItem(`${Ae.value.key}:${e.handle}:v2`);
|
|
8325
8324
|
});
|
|
8326
8325
|
}, Mc = {
|
|
8327
8326
|
frame: "Frame_ID",
|
|
@@ -8507,7 +8506,7 @@ const Dy = () => {
|
|
|
8507
8506
|
className: "type-wrapper",
|
|
8508
8507
|
children: g("h4", {
|
|
8509
8508
|
className: "type font-semibold capitalize",
|
|
8510
|
-
children:
|
|
8509
|
+
children: i(gh[c])
|
|
8511
8510
|
})
|
|
8512
8511
|
}), g("div", {
|
|
8513
8512
|
className: `part-wrapper ${f != null && f.swap && !t ? "can-hover" : ""}`,
|
|
@@ -11815,7 +11814,7 @@ const yw = () => {
|
|
|
11815
11814
|
number: m.number
|
|
11816
11815
|
})
|
|
11817
11816
|
}, P))
|
|
11818
|
-
}),
|
|
11817
|
+
}), g("div", {
|
|
11819
11818
|
className: "button-wrapper",
|
|
11820
11819
|
children: g(jr, {
|
|
11821
11820
|
onClick: () => i < t.length - 1 ? r.current.slideNext() : b(),
|