@konnectio/core 4.0.81 → 4.0.83

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.
Files changed (73) hide show
  1. package/dist/ActionField-BA-fYDFE.js +100 -0
  2. package/dist/ActionField-BA-fYDFE.js.br +0 -0
  3. package/dist/AvailabilitySkeleton-cs1R6FqT.js +281 -0
  4. package/dist/AvailabilitySkeleton-cs1R6FqT.js.br +0 -0
  5. package/dist/{AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_cebeb733_lang-b67PURkf.js → AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_cebeb733_lang-Qc9hcPxa.js} +1156 -1171
  6. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_cebeb733_lang-Qc9hcPxa.js.br +0 -0
  7. package/dist/{CheckoutWindow-CiImalcO.js → CheckoutWindow-BWvzwZp7.js} +153 -168
  8. package/dist/CheckoutWindow-BWvzwZp7.js.br +0 -0
  9. package/dist/{ErrorMessage-noDYCPm1.js → ErrorMessage-Cznv1pOA.js} +20 -35
  10. package/dist/ErrorMessage-Cznv1pOA.js.br +0 -0
  11. package/dist/EventAvailabilityForm-CCIRdxiD.js +111 -0
  12. package/dist/EventAvailabilityForm-CCIRdxiD.js.br +0 -0
  13. package/dist/Field-BvDQnKDq.js +43 -0
  14. package/dist/Field-BvDQnKDq.js.br +0 -0
  15. package/dist/{Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-DYwA6hiM.js → Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-9lyXRaoC.js} +2302 -2317
  16. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-9lyXRaoC.js.br +0 -0
  17. package/dist/TermsOfService-GFdUcU5a.js +29 -0
  18. package/dist/_-CApO2y_W.js +5 -0
  19. package/dist/_.vue_vue_type_style_index_0_lang-JXEPTW6b.js +25 -0
  20. package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
  21. package/dist/availability.js +55 -71
  22. package/dist/availability.js.br +0 -0
  23. package/dist/deep-link.js +21 -36
  24. package/dist/deep-link.js.br +0 -0
  25. package/dist/event.js +408 -424
  26. package/dist/event.js.br +0 -0
  27. package/dist/gift-card-validation.js +73 -89
  28. package/dist/gift-card-validation.js.br +0 -0
  29. package/dist/gift-card.js +181 -197
  30. package/dist/gift-card.js.br +0 -0
  31. package/dist/giftCard-DA27WKsi.js +119 -0
  32. package/dist/giftCard-DA27WKsi.js.br +0 -0
  33. package/dist/hotel.js +505 -520
  34. package/dist/hotel.js.br +0 -0
  35. package/dist/{masonry.plugin-DD0W9fy2.js → masonry.plugin-C22IPiCy.js} +53 -68
  36. package/dist/masonry.plugin-C22IPiCy.js.br +0 -0
  37. package/dist/{mitt-BeqJ2MFv.js → mitt-QLRlCcPH.js} +983 -998
  38. package/dist/mitt-QLRlCcPH.js.br +0 -0
  39. package/dist/polyfill.js +4686 -13780
  40. package/dist/polyfill.js.br +0 -0
  41. package/dist/{style-DcfCYaKA.js → style-CF23zZwv.js} +388 -403
  42. package/dist/style-CF23zZwv.js.br +0 -0
  43. package/dist/{_sentry-release-injection-file-DNUh2Gjq.js → vue.esm-bundler-BkY4vCIk.js} +1987 -2003
  44. package/dist/vue.esm-bundler-BkY4vCIk.js.br +0 -0
  45. package/package.json +1 -3
  46. package/dist/ActionField-CTdoYeCb.js +0 -115
  47. package/dist/ActionField-CTdoYeCb.js.br +0 -0
  48. package/dist/AvailabilitySkeleton-goa9gs9v.js +0 -296
  49. package/dist/AvailabilitySkeleton-goa9gs9v.js.br +0 -0
  50. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_cebeb733_lang-b67PURkf.js.br +0 -0
  51. package/dist/CheckoutWindow-CiImalcO.js.br +0 -0
  52. package/dist/ErrorMessage-noDYCPm1.js.br +0 -0
  53. package/dist/EventAvailabilityForm-9NeWNNcp.js +0 -126
  54. package/dist/EventAvailabilityForm-9NeWNNcp.js.br +0 -0
  55. package/dist/Field-BWYA1VPD.js +0 -58
  56. package/dist/Field-BWYA1VPD.js.br +0 -0
  57. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-DYwA6hiM.js.br +0 -0
  58. package/dist/TermsOfService-Ck17xk9Q.js +0 -44
  59. package/dist/TermsOfService-Ck17xk9Q.js.br +0 -0
  60. package/dist/_-Cd2-tqPM.js +0 -20
  61. package/dist/_.vue_vue_type_style_index_0_lang-NE_Zq7Js.js +0 -40
  62. package/dist/_.vue_vue_type_style_index_0_lang-NE_Zq7Js.js.br +0 -0
  63. package/dist/_commonjsHelpers-wQPQJtsq.js +0 -25
  64. package/dist/_commonjsHelpers-wQPQJtsq.js.br +0 -0
  65. package/dist/_sentry-release-injection-file-DNUh2Gjq.js.br +0 -0
  66. package/dist/giftCard-DrwsQrjA.js +0 -134
  67. package/dist/giftCard-DrwsQrjA.js.br +0 -0
  68. package/dist/masonry.plugin-DD0W9fy2.js.br +0 -0
  69. package/dist/mitt-BeqJ2MFv.js.br +0 -0
  70. package/dist/sentry-Bmg62TCa.js +0 -26
  71. package/dist/style-DcfCYaKA.js.br +0 -0
  72. package/dist/tracing-nJlxVqd0.js +0 -2639
  73. package/dist/tracing-nJlxVqd0.js.br +0 -0
@@ -0,0 +1,119 @@
1
+ import { r as H, a as J, d as M, G as s, t as h, S as y, v as O, o as x, w as K } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-9lyXRaoC.js";
2
+ import { d as Q, s as X, a as S } from "./mitt-QLRlCcPH.js";
3
+ import { r as t, c as a } from "./vue.esm-bundler-BkY4vCIk.js";
4
+ const ae = Q("giftCard", () => {
5
+ const { pay: E } = H(), { display: G } = J(), { bearerToken: w, metaData: P, currencyId: D, hasError: T } = X(M()), b = M(), o = t(s.InitialState), u = h("konnectio_name", "", void 0, { serializer: y.string }), v = h("konnectio_email", "", void 0, { serializer: y.string }), d = h("konnectio_phone", "", void 0, { serializer: y.string }), p = t(""), k = t(1), F = t(!0), C = t(""), l = t({
6
+ base64: "",
7
+ type: "",
8
+ name: ""
9
+ }), R = t(void 0), f = t(0), c = t(!1), m = t(0), z = a(() => b.hasMetadata ? b.metaData.hotels[0] : {}), U = a(() => z.value.termsOfService ? z.value.termsOfService : ""), W = a(() => o.value === s.InitialState || o.value === s.WaitingForResponse), _ = a(() => o.value === s.ReadyToPay), j = a(() => o.value === s.PaymentSuccess), g = a(() => {
10
+ const e = {
11
+ 1: {
12
+ label: S.t("giftCard.hotelType"),
13
+ data: []
14
+ },
15
+ 2: {
16
+ label: S.t("giftCard.restaurantType"),
17
+ data: []
18
+ }
19
+ }, r = P.value.hotels[0].places;
20
+ return r && r.forEach((n) => {
21
+ e[n.placeType].data.push(n);
22
+ }), Object.fromEntries(
23
+ Object.entries(e).filter(([, n]) => n.data.length > 0)
24
+ );
25
+ }), I = a(() => m.value !== 0), i = a(() => {
26
+ let e;
27
+ if (I.value)
28
+ e = g.value[m.value].data[0];
29
+ else if (f.value !== 0) {
30
+ const r = R.value, n = g.value[f.value].data;
31
+ n.length === 1 ? e = n[0] : r !== void 0 && n.forEach((A) => {
32
+ String(A.id) === String(r) && (e = A);
33
+ });
34
+ }
35
+ return e;
36
+ }), L = a(() => !(!u.value || !v.value || !(d.value.length >= 5) || !p.value || i.value === void 0)), q = a(() => !(o.value === s.InitialState && c.value)), N = a(() => !!(o.value === s.WaitingForResponse && c.value));
37
+ async function $() {
38
+ try {
39
+ const e = (await O.get("https://production.hotel-service.konnectio.com/api/gift-card/metadata", {
40
+ params: {
41
+ language: x()
42
+ },
43
+ headers: {
44
+ Authorization: w.value,
45
+ Accept: "application/json"
46
+ }
47
+ })).data;
48
+ e.success !== void 0 ? T.value = !e.success : T.value = !1, P.value = e;
49
+ } catch {
50
+ G({
51
+ message: S.t("alert.error.couldntFetchMetadata"),
52
+ type: "warning"
53
+ });
54
+ }
55
+ }
56
+ async function B() {
57
+ o.value = s.WaitingForResponse, c.value = !0, await O.post("https://production.hotel-service.konnectio.com/api/gift-card/create", {
58
+ termsOfserviceURL: window.location.origin,
59
+ checkoutUrl: window.location.origin,
60
+ currencyID: D.value,
61
+ language: x(),
62
+ amount: p.value,
63
+ quantity: k.value,
64
+ freeText: C.value,
65
+ showPrice: F.value,
66
+ contactName: u.value,
67
+ contactEmail: v.value,
68
+ contactPhone: d.value,
69
+ imageBase64: K(l.value.base64),
70
+ imageName: l.value.name,
71
+ imageFormat: l.value.type,
72
+ placeType: i.value ? i.value.placeType : void 0,
73
+ placeID: i.value ? i.value.id : void 0
74
+ }, {
75
+ headers: {
76
+ Authorization: w.value,
77
+ Accept: "application/json"
78
+ }
79
+ }).then((e) => {
80
+ o.value = s.ReadyToPay, c.value = !1, E({
81
+ callback: () => console.log("Callback!"),
82
+ response: e.data
83
+ });
84
+ });
85
+ }
86
+ function V(e) {
87
+ e && (m.value = e);
88
+ }
89
+ return {
90
+ selectedPlace: i,
91
+ moduleState: o,
92
+ name: u,
93
+ email: v,
94
+ phone: d,
95
+ value: p,
96
+ remark: C,
97
+ showValue: F,
98
+ quantity: k,
99
+ media: l,
100
+ placeId: R,
101
+ placeType: f,
102
+ showFormPage: W,
103
+ showPaymentPage: _,
104
+ showConfirmationPage: j,
105
+ places: g,
106
+ hasFilledForm: L,
107
+ hasForcedPlaceType: I,
108
+ isWaitingForResponse: N,
109
+ isMetadataAvailable: q,
110
+ termsOfService: U,
111
+ fetchMetadata: $,
112
+ orderGiftCard: B,
113
+ initialize: V
114
+ };
115
+ });
116
+ export {
117
+ ae as u
118
+ };
119
+ //# sourceMappingURL=giftCard-DA27WKsi.js.map
Binary file