@gomusdev/web-components 3.0.0 → 3.1.1
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.
|
@@ -3765,7 +3765,9 @@ class Ld {
|
|
|
3765
3765
|
// Unix time (seconds)
|
|
3766
3766
|
};
|
|
3767
3767
|
constructor() {
|
|
3768
|
-
this.load(),
|
|
3768
|
+
this.load(), typeof window < "u" && window.addEventListener("storage", (e) => {
|
|
3769
|
+
e.key === "go-auth" && this.load();
|
|
3770
|
+
});
|
|
3769
3771
|
}
|
|
3770
3772
|
customerLevel() {
|
|
3771
3773
|
if (this.isGuest()) return 10;
|
|
@@ -3795,9 +3797,10 @@ class Ld {
|
|
|
3795
3797
|
return JSON.stringify(this.#e);
|
|
3796
3798
|
}
|
|
3797
3799
|
save() {
|
|
3798
|
-
localStorage.setItem("go-auth", this.toString());
|
|
3800
|
+
typeof localStorage > "u" || localStorage.setItem("go-auth", this.toString());
|
|
3799
3801
|
}
|
|
3800
3802
|
load() {
|
|
3803
|
+
if (typeof localStorage > "u") return;
|
|
3801
3804
|
const e = localStorage.getItem("go-auth");
|
|
3802
3805
|
if (!e) {
|
|
3803
3806
|
this.signOut();
|
|
@@ -7967,7 +7970,7 @@ function ew(t) {
|
|
|
7967
7970
|
const e = t.product.type;
|
|
7968
7971
|
switch (e) {
|
|
7969
7972
|
case "Ticket":
|
|
7970
|
-
if (t.
|
|
7973
|
+
if (t.time && !Wd(t.time)) return;
|
|
7971
7974
|
const r = Ia(t.product);
|
|
7972
7975
|
return ht(r, { time: t.time, quantity: t.quantity });
|
|
7973
7976
|
case "Event":
|
|
@@ -12770,7 +12773,7 @@ function Z1(t, e) {
|
|
|
12770
12773
|
fields: [{ key: "token", required: !0 }]
|
|
12771
12774
|
});
|
|
12772
12775
|
async function r(a) {
|
|
12773
|
-
const l = a.details.fields.find((d) => d.key === "token"), u = (a.details.fieldValue("token") ?? "").trim();
|
|
12776
|
+
const l = a.details.fields.find((d) => d.key === "token"), u = (a.details.fieldValue("token") ?? "").trim().toUpperCase();
|
|
12774
12777
|
if (!u) return { success: !0 };
|
|
12775
12778
|
const c = await R1(u);
|
|
12776
12779
|
return c.success ? (l && (l.value = ""), a.dispatchEvent(new Event("go-success", { bubbles: !0, composed: !0 })), c) : (a.details.apiErrors = c.errors, c);
|