@konnectio/core 4.0.56-rc39 → 4.0.56-rc40
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-Cj7yAIiF.js → ActionField-CD5wWyTP.js} +10 -10
- package/dist/ActionField-CD5wWyTP.js.br +0 -0
- package/dist/{AvailabilitySkeleton-B1NfPwnx.js → AvailabilitySkeleton-D9lVJ7Y4.js} +71 -69
- package/dist/AvailabilitySkeleton-D9lVJ7Y4.js.br +0 -0
- package/dist/{AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-4TxEs6Ur.js → AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-Cb15NqtR.js} +2692 -2638
- package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-Cb15NqtR.js.br +0 -0
- package/dist/{CheckoutWindow-Dj_a3rqK.js → CheckoutWindow-POqLB9M4.js} +33 -33
- package/dist/CheckoutWindow-POqLB9M4.js.br +0 -0
- package/dist/{ErrorMessage-B_o47rUW.js → ErrorMessage-DACtGUvq.js} +4 -4
- package/dist/ErrorMessage-DACtGUvq.js.br +0 -0
- package/dist/{EventAvailabilityForm-vxL1OmZL.js → EventAvailabilityForm-Dx4hfkc1.js} +36 -36
- package/dist/EventAvailabilityForm-Dx4hfkc1.js.br +0 -0
- package/dist/{Field-DC9mZy8_.js → Field-Nqc4wuqz.js} +8 -8
- package/dist/Field-Nqc4wuqz.js.br +0 -0
- package/dist/{Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CITxgseu.js → Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-Bi1FLGK9.js} +3483 -3533
- package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-Bi1FLGK9.js.br +0 -0
- package/dist/{TermsOfService-COGxWG3S.js → TermsOfService-D3ujvGpJ.js} +9 -9
- package/dist/TermsOfService-D3ujvGpJ.js.br +0 -0
- package/dist/_-BeIBHN5G.js +12 -0
- package/dist/_.vue_vue_type_style_index_0_lang-CfxcWxuU.js +72 -0
- package/dist/_.vue_vue_type_style_index_0_lang-CfxcWxuU.js.br +0 -0
- package/dist/{_commonjsHelpers-UWZO_9XV.js → _commonjsHelpers-BpcYSDvQ.js} +149 -148
- package/dist/_commonjsHelpers-BpcYSDvQ.js.br +0 -0
- package/dist/availability.js +57 -56
- package/dist/availability.js.br +0 -0
- package/dist/event.js +95 -95
- package/dist/event.js.br +0 -0
- package/dist/gift-card-validation.js +43 -41
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card.js +241 -331
- package/dist/gift-card.js.br +0 -0
- package/dist/giftCard-BEp1vsXy.js +128 -0
- package/dist/giftCard-BEp1vsXy.js.br +0 -0
- package/dist/hotel.js +942 -938
- package/dist/hotel.js.br +0 -0
- package/dist/{masonry.plugin-a1QQfgj3.js → masonry.plugin-CnRH1tRE.js} +6 -6
- package/dist/masonry.plugin-CnRH1tRE.js.br +0 -0
- package/dist/navigation.js +3 -3
- package/dist/polyfill.js +10 -5
- package/dist/polyfill.js.br +0 -0
- package/dist/style.css +1 -1
- package/dist/style.css.br +0 -0
- package/package.json +9 -9
- package/dist/ActionField-Cj7yAIiF.js.br +0 -0
- package/dist/AvailabilitySkeleton-B1NfPwnx.js.br +0 -0
- package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-4TxEs6Ur.js.br +0 -0
- package/dist/CheckoutWindow-Dj_a3rqK.js.br +0 -0
- package/dist/ErrorMessage-B_o47rUW.js.br +0 -0
- package/dist/EventAvailabilityForm-vxL1OmZL.js.br +0 -0
- package/dist/Field-DC9mZy8_.js.br +0 -0
- package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CITxgseu.js.br +0 -0
- package/dist/TermsOfService-COGxWG3S.js.br +0 -0
- package/dist/_commonjsHelpers-UWZO_9XV.js.br +0 -0
- package/dist/masonry.plugin-a1QQfgj3.js.br +0 -0
package/dist/gift-card.js.br
CHANGED
|
Binary file
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { d as K, u as H, a as J, s as Q, b as E, G as s, c as S, i as w, S as k, e as M, g as O, f as X } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-Bi1FLGK9.js";
|
|
2
|
+
import { r as t, c as a } from "./_commonjsHelpers-BpcYSDvQ.js";
|
|
3
|
+
import "./navigation.js";
|
|
4
|
+
(function() {
|
|
5
|
+
try {
|
|
6
|
+
var i = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, c = new Error().stack;
|
|
7
|
+
c && (i._sentryDebugIds = i._sentryDebugIds || {}, i._sentryDebugIds[c] = "09036440-cdd3-4b30-b1d4-0371e1b113d2", i._sentryDebugIdIdentifier = "sentry-dbid-09036440-cdd3-4b30-b1d4-0371e1b113d2");
|
|
8
|
+
} catch {
|
|
9
|
+
}
|
|
10
|
+
})();
|
|
11
|
+
const ae = K("giftCard", () => {
|
|
12
|
+
const { pay: i } = H(), { display: c } = J(), { bearerToken: v, metaData: P, currencyId: x, hasError: I } = Q(E()), T = E(), o = t(s.InitialState), f = S("konnectio_name", "", void 0, { serializer: k.string }), p = S("konnectio_email", "", void 0, { serializer: k.string }), g = S("konnectio_phone", "", void 0, { serializer: k.string }), m = t(""), D = t(1), F = t(!0), C = t(""), u = t({
|
|
13
|
+
base64: "",
|
|
14
|
+
type: "",
|
|
15
|
+
name: ""
|
|
16
|
+
}), R = t(void 0), h = t(0), d = t(!1), y = t(0), _ = a(() => T.hasMetaData ? T.metaData.hotels[0] : {}), G = a(() => _.value.termsOfService ? _.value.termsOfService : ""), U = a(() => o.value === s.InitialState || o.value === s.WaitingForResponse), W = a(() => o.value === s.ReadyToPay), j = a(() => o.value === s.PaymentSuccess), b = a(() => {
|
|
17
|
+
const e = {
|
|
18
|
+
1: {
|
|
19
|
+
label: w.t("giftCard.hotelType"),
|
|
20
|
+
data: []
|
|
21
|
+
},
|
|
22
|
+
2: {
|
|
23
|
+
label: w.t("giftCard.restaurantType"),
|
|
24
|
+
data: []
|
|
25
|
+
}
|
|
26
|
+
}, l = P.value.hotels[0].places;
|
|
27
|
+
return l && l.forEach((n) => {
|
|
28
|
+
e[n.placeType].data.push(n);
|
|
29
|
+
}), Object.fromEntries(
|
|
30
|
+
Object.entries(e).filter(([, n]) => n.data.length > 0)
|
|
31
|
+
);
|
|
32
|
+
}), z = a(() => y.value !== 0), r = a(() => {
|
|
33
|
+
let e;
|
|
34
|
+
if (z.value)
|
|
35
|
+
e = b.value[y.value].data[0];
|
|
36
|
+
else if (h.value !== 0) {
|
|
37
|
+
const l = R.value, n = b.value[h.value].data;
|
|
38
|
+
n.length === 1 ? e = n[0] : l !== void 0 && n.forEach((A) => {
|
|
39
|
+
String(A.id) === String(l) && (e = A);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return e;
|
|
43
|
+
}), L = a(() => !(!f.value || !p.value || !(g.value.length >= 5) || !m.value || r.value === void 0)), V = a(() => !(o.value === s.InitialState && d.value)), q = a(() => !!(o.value === s.WaitingForResponse && d.value));
|
|
44
|
+
async function B() {
|
|
45
|
+
try {
|
|
46
|
+
const e = (await M.get("https://production.hotel-service.konnectio.dk/api/gift-card/metadata", {
|
|
47
|
+
params: {
|
|
48
|
+
language: O()
|
|
49
|
+
},
|
|
50
|
+
headers: {
|
|
51
|
+
Authorization: v.value,
|
|
52
|
+
Accept: "application/json",
|
|
53
|
+
"Konnectio-Ver": "4.0.56-rc40"
|
|
54
|
+
}
|
|
55
|
+
})).data;
|
|
56
|
+
e.success !== void 0 ? I.value = !e.success : I.value = !1, P.value = e;
|
|
57
|
+
} catch {
|
|
58
|
+
c({
|
|
59
|
+
message: w.t("alert.error.couldntFetchMetadata"),
|
|
60
|
+
type: "warning"
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async function N() {
|
|
65
|
+
o.value = s.WaitingForResponse, d.value = !0, await M.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
|
|
66
|
+
termsOfserviceURL: window.location.origin,
|
|
67
|
+
checkoutUrl: window.location.origin,
|
|
68
|
+
currencyID: x.value,
|
|
69
|
+
language: O(),
|
|
70
|
+
amount: m.value,
|
|
71
|
+
quantity: D.value,
|
|
72
|
+
freeText: C.value,
|
|
73
|
+
showPrice: F.value,
|
|
74
|
+
contactName: f.value,
|
|
75
|
+
contactEmail: p.value,
|
|
76
|
+
contactPhone: g.value,
|
|
77
|
+
imageBase64: X(u.value.base64),
|
|
78
|
+
imageName: u.value.name,
|
|
79
|
+
imageFormat: u.value.type,
|
|
80
|
+
placeType: r.value ? r.value.placeType : void 0,
|
|
81
|
+
placeID: r.value ? r.value.id : void 0
|
|
82
|
+
}, {
|
|
83
|
+
headers: {
|
|
84
|
+
Authorization: v.value,
|
|
85
|
+
Accept: "application/json",
|
|
86
|
+
"Fresh-Booking-Ver": "4.0.56-rc40"
|
|
87
|
+
}
|
|
88
|
+
}).then((e) => {
|
|
89
|
+
o.value = s.ReadyToPay, d.value = !1, i({
|
|
90
|
+
callback: () => console.log("Callback!"),
|
|
91
|
+
response: e.data
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function $(e) {
|
|
96
|
+
e && (y.value = e);
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
selectedPlace: r,
|
|
100
|
+
moduleState: o,
|
|
101
|
+
name: f,
|
|
102
|
+
email: p,
|
|
103
|
+
phone: g,
|
|
104
|
+
value: m,
|
|
105
|
+
remark: C,
|
|
106
|
+
showValue: F,
|
|
107
|
+
quantity: D,
|
|
108
|
+
media: u,
|
|
109
|
+
placeId: R,
|
|
110
|
+
placeType: h,
|
|
111
|
+
showFormPage: U,
|
|
112
|
+
showPaymentPage: W,
|
|
113
|
+
showConfirmationPage: j,
|
|
114
|
+
places: b,
|
|
115
|
+
hasFilledForm: L,
|
|
116
|
+
hasForcedPlaceType: z,
|
|
117
|
+
isWaitingForResponse: q,
|
|
118
|
+
isMetaDataAvailable: V,
|
|
119
|
+
termsOfService: G,
|
|
120
|
+
fetchMetadata: B,
|
|
121
|
+
orderGiftCard: N,
|
|
122
|
+
initialize: $
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
export {
|
|
126
|
+
ae as u
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=giftCard-BEp1vsXy.js.map
|
|
Binary file
|