@cartbot/vehicle-search-beta 3.0.17 → 3.0.19
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/js/vehicle-search.es.js +16 -8
- package/dist/js/vehicle-search.js +14 -14
- package/package.json +1 -1
|
@@ -328,7 +328,7 @@ function X({
|
|
|
328
328
|
)
|
|
329
329
|
] });
|
|
330
330
|
}
|
|
331
|
-
const $t = "3.0.
|
|
331
|
+
const $t = "3.0.19";
|
|
332
332
|
console.info(
|
|
333
333
|
`Vehicle Search v${$t} powered by Partbot https://mmyvs.partbot.io`
|
|
334
334
|
);
|
|
@@ -565,7 +565,7 @@ function Mt({
|
|
|
565
565
|
const r = new CustomEvent("vehicle-search-submit", {
|
|
566
566
|
detail: t
|
|
567
567
|
});
|
|
568
|
-
|
|
568
|
+
window.dispatchEvent(r), setTimeout(() => {
|
|
569
569
|
Me(!1);
|
|
570
570
|
}, 900);
|
|
571
571
|
}, [se, q]), Te = N(() => {
|
|
@@ -580,7 +580,10 @@ function Mt({
|
|
|
580
580
|
const r = new CustomEvent("vehicle-search-change", {
|
|
581
581
|
detail: t
|
|
582
582
|
});
|
|
583
|
-
if (
|
|
583
|
+
if (console.log(
|
|
584
|
+
"[VehicleSearch] Dispatching vehicle-search-change:",
|
|
585
|
+
t
|
|
586
|
+
), j.current === !0) {
|
|
584
587
|
localStorage.removeItem("partbot_plate_details");
|
|
585
588
|
const ae = JSON.stringify({
|
|
586
589
|
description: `${((o = e.make) == null ? void 0 : o.value) || ""} ${((l = e.model) == null ? void 0 : l.value) || ""} ${((n = e.year) == null ? void 0 : n.value) || ""} ${((c = e.body) == null ? void 0 : c.value) || ""} ${((d = e.series) == null ? void 0 : d.value) || ""} ${(($ = e.variant) == null ? void 0 : $.value) || ""} ${((te = e.engine) == null ? void 0 : te.value) || ""} ${((pe = e.engine_capacity) == null ? void 0 : pe.value) || ""}`.trim(),
|
|
@@ -594,7 +597,7 @@ function Mt({
|
|
|
594
597
|
secure: !0
|
|
595
598
|
});
|
|
596
599
|
}
|
|
597
|
-
|
|
600
|
+
window.dispatchEvent(r), console.log("[VehicleSearch] Event dispatched to window"), Je.current = se, setTimeout(() => {
|
|
598
601
|
Me(!1);
|
|
599
602
|
}, 900);
|
|
600
603
|
}, [se, u]), _e = ut(
|
|
@@ -606,8 +609,11 @@ function Mt({
|
|
|
606
609
|
}, [se, _e]), B(() => () => {
|
|
607
610
|
_e.cancel();
|
|
608
611
|
}, [_e]), B(() => {
|
|
609
|
-
const t = () => {
|
|
610
|
-
|
|
612
|
+
const t = (r) => {
|
|
613
|
+
console.log(
|
|
614
|
+
"[VehicleSearch] Received plate-search-change:",
|
|
615
|
+
r.detail
|
|
616
|
+
), console.log("[VehicleSearch] Clearing vehicle selection"), Y({
|
|
611
617
|
make: null,
|
|
612
618
|
model: null,
|
|
613
619
|
year: null,
|
|
@@ -618,8 +624,10 @@ function Mt({
|
|
|
618
624
|
engine_capacity: null
|
|
619
625
|
}), ke([]);
|
|
620
626
|
};
|
|
621
|
-
return
|
|
622
|
-
|
|
627
|
+
return console.log(
|
|
628
|
+
"[VehicleSearch] Adding plate-search-change listener to window"
|
|
629
|
+
), window.addEventListener("plate-search-change", t), () => {
|
|
630
|
+
window.removeEventListener(
|
|
623
631
|
"plate-search-change",
|
|
624
632
|
t
|
|
625
633
|
);
|