@konnectio/core 4.11.3 → 4.11.5
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/{ActionField-dg0RS8gf.js → ActionField-DBxduvRT.js} +1 -1
- package/dist/ActionField-DBxduvRT.js.br +0 -0
- package/dist/ActionField-DBxduvRT.js.gz +0 -0
- package/dist/{AvailabilitySkeleton-uoeeP_5d.js → AvailabilitySkeleton-DoVzHCoF.js} +2 -2
- package/dist/AvailabilitySkeleton-DoVzHCoF.js.br +0 -0
- package/dist/AvailabilitySkeleton-DoVzHCoF.js.gz +0 -0
- package/dist/{CheckoutWindow-DXRVoh-J.js → CheckoutWindow-CJq8smYV.js} +4 -4
- package/dist/CheckoutWindow-CJq8smYV.js.br +0 -0
- package/dist/CheckoutWindow-CJq8smYV.js.gz +0 -0
- package/dist/{ErrorMessage-OQ4r9QGR.js → ErrorMessage-voedvcXr.js} +1 -1
- package/dist/ErrorMessage-voedvcXr.js.br +0 -0
- package/dist/ErrorMessage-voedvcXr.js.gz +0 -0
- package/dist/{EventAvailabilityForm-B4pOCkcm.js → EventAvailabilityForm-BjLCcN_W.js} +2 -2
- package/dist/EventAvailabilityForm-BjLCcN_W.js.br +0 -0
- package/dist/EventAvailabilityForm-BjLCcN_W.js.gz +0 -0
- package/dist/{Field-DpRx5gtJ.js → Field-2Hbk9ahl.js} +1 -1
- package/dist/Field-2Hbk9ahl.js.br +0 -0
- package/dist/Field-2Hbk9ahl.js.gz +0 -0
- package/dist/{HotelAvailabilityForm-BSM-KcqG.js → HotelAvailabilityForm-v-z9AFWI.js} +2 -2
- package/dist/HotelAvailabilityForm-v-z9AFWI.js.br +0 -0
- package/dist/HotelAvailabilityForm-v-z9AFWI.js.gz +0 -0
- package/dist/{SelectField-CEEffgaQ.js → SelectField-w9Labj2W.js} +2913 -2907
- package/dist/SelectField-w9Labj2W.js.br +0 -0
- package/dist/SelectField-w9Labj2W.js.gz +0 -0
- package/dist/{TermsOfService-C4YZ5zhE.js → TermsOfService-D8q2gi5I.js} +2 -2
- package/dist/TermsOfService-D8q2gi5I.js.br +0 -0
- package/dist/TermsOfService-D8q2gi5I.js.gz +4 -0
- package/dist/{_-DM-h5BQz.js → _-Cpgd04rM.js} +1 -1
- package/dist/_-Cpgd04rM.js.br +0 -0
- package/dist/_-Cpgd04rM.js.gz +0 -0
- package/dist/availability.js +7 -7
- package/dist/availability.js.br +0 -0
- package/dist/availability.js.gz +0 -0
- package/dist/cancel-reservation.js +4 -4
- package/dist/cancel-reservation.js.br +0 -0
- package/dist/cancel-reservation.js.gz +0 -0
- package/dist/core.css +1 -1
- package/dist/core.css.br +0 -0
- package/dist/core.css.gz +0 -0
- package/dist/{dist-BQy2-bMP.js → dist-0CoL4k9r.js} +4 -4
- package/dist/dist-0CoL4k9r.js.br +0 -0
- package/dist/dist-0CoL4k9r.js.gz +0 -0
- package/dist/{dist-Q9kXoafy.js → dist-Drv0vus3.js} +2 -2
- package/dist/dist-Drv0vus3.js.br +0 -0
- package/dist/dist-Drv0vus3.js.gz +0 -0
- package/dist/event.js +10 -10
- package/dist/event.js.br +0 -0
- package/dist/event.js.gz +0 -0
- package/dist/gift-card-validation.js +7 -7
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card-validation.js.gz +0 -0
- package/dist/gift-card.js +182 -83
- package/dist/gift-card.js.br +0 -0
- package/dist/gift-card.js.gz +0 -0
- package/dist/giftCard-6oDMPMDe.js +134 -0
- package/dist/giftCard-6oDMPMDe.js.br +0 -0
- package/dist/giftCard-6oDMPMDe.js.gz +0 -0
- package/dist/hotel.js +145 -145
- package/dist/hotel.js.br +0 -0
- package/dist/hotel.js.gz +0 -0
- package/dist/polyfill.js +1 -1
- package/dist/polyfill.js.br +0 -0
- package/dist/polyfill.js.gz +0 -0
- package/dist/{style-xK2dve9W.js → style-BJBxZSi0.js} +1 -1
- package/dist/style-BJBxZSi0.js.br +0 -0
- package/dist/style-BJBxZSi0.js.gz +0 -0
- package/dist-wix/availability.js +2 -2
- package/dist-wix/event.js +2 -2
- package/dist-wix/gift-card-validation.js +23 -23
- package/dist-wix/gift-card.js +37 -37
- package/dist-wix/hotel.js +4 -4
- package/package.json +1 -1
- package/dist/ActionField-dg0RS8gf.js.br +0 -0
- package/dist/ActionField-dg0RS8gf.js.gz +0 -0
- package/dist/AvailabilitySkeleton-uoeeP_5d.js.br +0 -0
- package/dist/AvailabilitySkeleton-uoeeP_5d.js.gz +0 -0
- package/dist/CheckoutWindow-DXRVoh-J.js.br +0 -0
- package/dist/CheckoutWindow-DXRVoh-J.js.gz +0 -0
- package/dist/ErrorMessage-OQ4r9QGR.js.br +0 -0
- package/dist/ErrorMessage-OQ4r9QGR.js.gz +0 -0
- package/dist/EventAvailabilityForm-B4pOCkcm.js.br +0 -0
- package/dist/EventAvailabilityForm-B4pOCkcm.js.gz +0 -0
- package/dist/Field-DpRx5gtJ.js.br +0 -0
- package/dist/Field-DpRx5gtJ.js.gz +0 -0
- package/dist/HotelAvailabilityForm-BSM-KcqG.js.br +0 -0
- package/dist/HotelAvailabilityForm-BSM-KcqG.js.gz +0 -0
- package/dist/SelectField-CEEffgaQ.js.br +0 -0
- package/dist/SelectField-CEEffgaQ.js.gz +0 -0
- package/dist/TermsOfService-C4YZ5zhE.js.br +0 -0
- package/dist/TermsOfService-C4YZ5zhE.js.gz +0 -0
- package/dist/_-DM-h5BQz.js.br +0 -0
- package/dist/_-DM-h5BQz.js.gz +0 -0
- package/dist/dist-BQy2-bMP.js.br +0 -0
- package/dist/dist-BQy2-bMP.js.gz +0 -0
- package/dist/dist-Q9kXoafy.js.br +0 -0
- package/dist/dist-Q9kXoafy.js.gz +0 -0
- package/dist/giftCard-DO4ELDIx.js +0 -113
- package/dist/giftCard-DO4ELDIx.js.br +0 -0
- package/dist/giftCard-DO4ELDIx.js.gz +0 -0
- package/dist/style-xK2dve9W.js.br +0 -0
- package/dist/style-xK2dve9W.js.gz +0 -0
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/_-DM-h5BQz.js.br
DELETED
|
Binary file
|
package/dist/_-DM-h5BQz.js.gz
DELETED
|
Binary file
|
package/dist/dist-BQy2-bMP.js.br
DELETED
|
Binary file
|
package/dist/dist-BQy2-bMP.js.gz
DELETED
|
Binary file
|
package/dist/dist-Q9kXoafy.js.br
DELETED
|
Binary file
|
package/dist/dist-Q9kXoafy.js.gz
DELETED
|
Binary file
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { A as e, d as t, h as n, m as r, s as i, t as a, xt as o } from "./i18n-Dq3VKG7w.js";
|
|
2
|
-
import { C as s, G as c, P as l, at as u, j as d, k as f, w as p } from "./SelectField-CEEffgaQ.js";
|
|
3
|
-
// src/store/giftCard.ts
|
|
4
|
-
var m = r("giftCard", () => {
|
|
5
|
-
let { pay: r } = f(), { display: m } = d(), { metaData: h, currencyId: g, hasError: _ } = n(p()), v = p(), y = o(u.InitialState), b = t("konnectio_name", "", void 0, { serializer: i.string }), x = t("konnectio_email", "", void 0, { serializer: i.string }), S = t("konnectio_phone", "", void 0, { serializer: i.string }), C = o(""), w = o(1), T = o(!0), E = o(""), D = o({
|
|
6
|
-
base64: "",
|
|
7
|
-
type: "",
|
|
8
|
-
name: ""
|
|
9
|
-
}), O = o(void 0), k = o(0), A = o(!1), j = o(0), M = e(() => v.metaData.hotels?.[0]), N = e(() => M.value?.termsOfService ?? ""), P = e(() => y.value === u.InitialState || y.value === u.WaitingForResponse), F = e(() => y.value === u.ReadyToPay), I = e(() => y.value === u.PaymentSuccess), L = e(() => {
|
|
10
|
-
let e = {
|
|
11
|
-
1: {
|
|
12
|
-
label: a.t("giftCard.hotelType"),
|
|
13
|
-
data: []
|
|
14
|
-
},
|
|
15
|
-
2: {
|
|
16
|
-
label: a.t("giftCard.restaurantType"),
|
|
17
|
-
data: []
|
|
18
|
-
}
|
|
19
|
-
}, t = h.value.hotels?.[0]?.places;
|
|
20
|
-
return t && t.forEach((t) => {
|
|
21
|
-
e[t.placeType].data.push(t);
|
|
22
|
-
}), Object.fromEntries(Object.entries(e).filter(([, e]) => e.data.length > 0));
|
|
23
|
-
}), R = e(() => j.value !== 0), z = e(() => {
|
|
24
|
-
let e;
|
|
25
|
-
if (R.value) e = L.value[j.value]?.data[0];
|
|
26
|
-
else if (k.value !== 0) {
|
|
27
|
-
let t = O.value, n = L.value[k.value]?.data ?? [];
|
|
28
|
-
n.length === 1 ? e = n[0] : t !== void 0 && n.forEach((n) => {
|
|
29
|
-
String(n.id) === String(t) && (e = n);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
return e;
|
|
33
|
-
}), B = e(() => !(!b.value || !x.value || !(S.value.length >= 5) || !C.value || z.value === void 0)), V = e(() => !(y.value === u.InitialState && A.value)), H = e(() => !!(y.value === u.WaitingForResponse && A.value));
|
|
34
|
-
async function U() {
|
|
35
|
-
try {
|
|
36
|
-
let e = (await s().get("/gift-card/metadata", { params: { language: c() } })).data;
|
|
37
|
-
e.success === void 0 ? _.value = !1 : _.value = !e.success, h.value = e;
|
|
38
|
-
} catch {
|
|
39
|
-
m({
|
|
40
|
-
message: a.t("alert.error.couldntFetchMetadata"),
|
|
41
|
-
type: "warning"
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function W() {
|
|
46
|
-
return {
|
|
47
|
-
termsOfserviceURL: window.location.origin,
|
|
48
|
-
checkoutUrl: window.location.origin,
|
|
49
|
-
currencyID: g.value,
|
|
50
|
-
language: c(),
|
|
51
|
-
amount: C.value,
|
|
52
|
-
quantity: w.value,
|
|
53
|
-
freeText: E.value,
|
|
54
|
-
showPrice: T.value,
|
|
55
|
-
contactName: b.value,
|
|
56
|
-
contactEmail: x.value,
|
|
57
|
-
contactPhone: S.value,
|
|
58
|
-
imageBase64: l(D.value.base64),
|
|
59
|
-
imageName: D.value.name,
|
|
60
|
-
imageFormat: D.value.type,
|
|
61
|
-
placeType: z.value ? z.value.placeType : void 0,
|
|
62
|
-
placeID: z.value ? z.value.id : void 0
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
async function G() {
|
|
66
|
-
y.value = u.WaitingForResponse, A.value = !0;
|
|
67
|
-
try {
|
|
68
|
-
let e = await s().post("/gift-card/create", W());
|
|
69
|
-
y.value = u.ReadyToPay, A.value = !1, r({
|
|
70
|
-
callback: (e) => {
|
|
71
|
-
e === 2 && (y.value = u.PaymentSuccess);
|
|
72
|
-
},
|
|
73
|
-
response: e.data,
|
|
74
|
-
enableHostedRedirect: !0
|
|
75
|
-
});
|
|
76
|
-
return;
|
|
77
|
-
} catch (e) {
|
|
78
|
-
if (A.value = !1, y.value = u.InitialState, e?.response?.status === 422) return e.response.data.errors;
|
|
79
|
-
throw e;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
function K(e) {
|
|
83
|
-
e && (j.value = e);
|
|
84
|
-
}
|
|
85
|
-
return {
|
|
86
|
-
selectedPlace: z,
|
|
87
|
-
moduleState: y,
|
|
88
|
-
name: b,
|
|
89
|
-
email: x,
|
|
90
|
-
phone: S,
|
|
91
|
-
value: C,
|
|
92
|
-
remark: E,
|
|
93
|
-
showValue: T,
|
|
94
|
-
quantity: w,
|
|
95
|
-
media: D,
|
|
96
|
-
placeId: O,
|
|
97
|
-
placeType: k,
|
|
98
|
-
showFormPage: P,
|
|
99
|
-
showPaymentPage: F,
|
|
100
|
-
showConfirmationPage: I,
|
|
101
|
-
places: L,
|
|
102
|
-
hasFilledForm: B,
|
|
103
|
-
hasForcedPlaceType: R,
|
|
104
|
-
isWaitingForResponse: H,
|
|
105
|
-
isMetadataAvailable: V,
|
|
106
|
-
termsOfService: N,
|
|
107
|
-
fetchMetadata: U,
|
|
108
|
-
giftCardPayload: W,
|
|
109
|
-
orderGiftCard: G,
|
|
110
|
-
initialize: K
|
|
111
|
-
};
|
|
112
|
-
});
|
|
113
|
-
export { m as t };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|