@konnectio/core 4.0.82 → 4.0.84

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 (75) hide show
  1. package/dist/ActionField-CLQbtAU7.js +100 -0
  2. package/dist/ActionField-CLQbtAU7.js.br +0 -0
  3. package/dist/AvailabilitySkeleton-BJPo5KGW.js +309 -0
  4. package/dist/AvailabilitySkeleton-BJPo5KGW.js.br +0 -0
  5. package/dist/{AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_cebeb733_lang-C4S5K4Ed.js → AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_cebeb733_lang-CAv6OSp6.js} +1152 -1168
  6. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_cebeb733_lang-CAv6OSp6.js.br +0 -0
  7. package/dist/{CheckoutWindow-DoADcN36.js → CheckoutWindow-C9Sa3vci.js} +159 -174
  8. package/dist/CheckoutWindow-C9Sa3vci.js.br +0 -0
  9. package/dist/{ErrorMessage-BxZaXdig.js → ErrorMessage-D6rbHHXd.js} +20 -35
  10. package/dist/ErrorMessage-D6rbHHXd.js.br +0 -0
  11. package/dist/EventAvailabilityForm-D-Q1vxsm.js +110 -0
  12. package/dist/EventAvailabilityForm-D-Q1vxsm.js.br +0 -0
  13. package/dist/Field-CGT9JUe-.js +43 -0
  14. package/dist/Field-CGT9JUe-.js.br +0 -0
  15. package/dist/{Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-DIbBJOzF.js → Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BR0ZkskY.js} +2819 -2807
  16. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BR0ZkskY.js.br +0 -0
  17. package/dist/TermsOfService-DmwGAt0q.js +28 -0
  18. package/dist/_-YHi6ciVk.js +5 -0
  19. package/dist/_.vue_vue_type_style_index_0_lang-DeF9xZEQ.js +25 -0
  20. package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
  21. package/dist/availability.js +54 -71
  22. package/dist/availability.js.br +0 -0
  23. package/dist/deep-link.js +20 -36
  24. package/dist/deep-link.js.br +0 -0
  25. package/dist/event.js +398 -416
  26. package/dist/event.js.br +0 -0
  27. package/dist/gift-card-validation.js +72 -89
  28. package/dist/gift-card-validation.js.br +0 -0
  29. package/dist/gift-card.js +175 -192
  30. package/dist/gift-card.js.br +0 -0
  31. package/dist/giftCard-C-lmDpUB.js +118 -0
  32. package/dist/giftCard-C-lmDpUB.js.br +0 -0
  33. package/dist/hotel.js +1210 -1099
  34. package/dist/hotel.js.br +0 -0
  35. package/dist/{masonry.plugin-DDSHAjDQ.js → masonry.plugin-DL8uXS-9.js} +52 -68
  36. package/dist/masonry.plugin-DL8uXS-9.js.br +0 -0
  37. package/dist/mitt-B_elXQ2J.js +12437 -0
  38. package/dist/mitt-B_elXQ2J.js.br +0 -0
  39. package/dist/polyfill.js +4216 -7869
  40. package/dist/polyfill.js.br +0 -0
  41. package/dist/{style-CT1Yk_a0.js → style-CDpCXUak.js} +391 -406
  42. package/dist/style-CDpCXUak.js.br +0 -0
  43. package/dist/style.css +1 -1
  44. package/dist/style.css.br +0 -0
  45. package/package.json +12 -15
  46. package/dist/ActionField-Mf3IO8Sg.js +0 -115
  47. package/dist/ActionField-Mf3IO8Sg.js.br +0 -0
  48. package/dist/AvailabilitySkeleton-D3xnLMQI.js +0 -296
  49. package/dist/AvailabilitySkeleton-D3xnLMQI.js.br +0 -0
  50. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_cebeb733_lang-C4S5K4Ed.js.br +0 -0
  51. package/dist/CheckoutWindow-DoADcN36.js.br +0 -0
  52. package/dist/ErrorMessage-BxZaXdig.js.br +0 -0
  53. package/dist/EventAvailabilityForm-Ctz8ENUN.js +0 -126
  54. package/dist/EventAvailabilityForm-Ctz8ENUN.js.br +0 -0
  55. package/dist/Field-Bg0N8Vc0.js +0 -58
  56. package/dist/Field-Bg0N8Vc0.js.br +0 -0
  57. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-DIbBJOzF.js.br +0 -0
  58. package/dist/TermsOfService-CWraQvoB.js +0 -44
  59. package/dist/TermsOfService-CWraQvoB.js.br +0 -4
  60. package/dist/_-BEZe3PAF.js +0 -20
  61. package/dist/_.vue_vue_type_style_index_0_lang-DQzgcH2c.js +0 -40
  62. package/dist/_.vue_vue_type_style_index_0_lang-DQzgcH2c.js.br +0 -0
  63. package/dist/_commonjsHelpers-C8ml6AyB.js +0 -25
  64. package/dist/_commonjsHelpers-C8ml6AyB.js.br +0 -0
  65. package/dist/_sentry-release-injection-file-8liCQLPI.js +0 -9501
  66. package/dist/_sentry-release-injection-file-8liCQLPI.js.br +0 -0
  67. package/dist/giftCard-sImOKdP0.js +0 -134
  68. package/dist/giftCard-sImOKdP0.js.br +0 -0
  69. package/dist/masonry.plugin-DDSHAjDQ.js.br +0 -0
  70. package/dist/mitt-CzL6QOyp.js +0 -2977
  71. package/dist/mitt-CzL6QOyp.js.br +0 -0
  72. package/dist/sentry-Cyc40KnT.js +0 -26
  73. package/dist/style-CT1Yk_a0.js.br +0 -0
  74. package/dist/tracing-6Srl_nMB.js +0 -2628
  75. package/dist/tracing-6Srl_nMB.js.br +0 -0
@@ -0,0 +1,118 @@
1
+ import { r as V, a as H, d as A, G as s, t as h, S as y, v as M, o as O, w as J } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BR0ZkskY.js";
2
+ import { K as Q, x as X, r as t, c as a, L as S } from "./mitt-B_elXQ2J.js";
3
+ const ee = Q("giftCard", () => {
4
+ const { pay: E } = V(), { display: G } = H(), { bearerToken: w, metaData: P, currencyId: D, hasError: T } = X(A()), b = A(), 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({
5
+ base64: "",
6
+ type: "",
7
+ name: ""
8
+ }), R = t(void 0), f = t(0), c = t(!1), g = t(0), z = a(() => b.hasMetadata ? b.metaData.hotels[0] : {}), L = a(() => z.value.termsOfService ? z.value.termsOfService : ""), U = a(() => o.value === s.InitialState || o.value === s.WaitingForResponse), W = a(() => o.value === s.ReadyToPay), _ = a(() => o.value === s.PaymentSuccess), m = a(() => {
9
+ const e = {
10
+ 1: {
11
+ label: S.t("giftCard.hotelType"),
12
+ data: []
13
+ },
14
+ 2: {
15
+ label: S.t("giftCard.restaurantType"),
16
+ data: []
17
+ }
18
+ }, r = P.value.hotels[0].places;
19
+ return r && r.forEach((n) => {
20
+ e[n.placeType].data.push(n);
21
+ }), Object.fromEntries(
22
+ Object.entries(e).filter(([, n]) => n.data.length > 0)
23
+ );
24
+ }), I = a(() => g.value !== 0), i = a(() => {
25
+ let e;
26
+ if (I.value)
27
+ e = m.value[g.value].data[0];
28
+ else if (f.value !== 0) {
29
+ const r = R.value, n = m.value[f.value].data;
30
+ n.length === 1 ? e = n[0] : r !== void 0 && n.forEach((x) => {
31
+ String(x.id) === String(r) && (e = x);
32
+ });
33
+ }
34
+ return e;
35
+ }), j = 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));
36
+ async function $() {
37
+ try {
38
+ const e = (await M.get("https://production.hotel-service.konnectio.com/api/gift-card/metadata", {
39
+ params: {
40
+ language: O()
41
+ },
42
+ headers: {
43
+ Authorization: w.value,
44
+ Accept: "application/json"
45
+ }
46
+ })).data;
47
+ e.success !== void 0 ? T.value = !e.success : T.value = !1, P.value = e;
48
+ } catch {
49
+ G({
50
+ message: S.t("alert.error.couldntFetchMetadata"),
51
+ type: "warning"
52
+ });
53
+ }
54
+ }
55
+ async function B() {
56
+ o.value = s.WaitingForResponse, c.value = !0, await M.post("https://production.hotel-service.konnectio.com/api/gift-card/create", {
57
+ termsOfserviceURL: window.location.origin,
58
+ checkoutUrl: window.location.origin,
59
+ currencyID: D.value,
60
+ language: O(),
61
+ amount: p.value,
62
+ quantity: k.value,
63
+ freeText: C.value,
64
+ showPrice: F.value,
65
+ contactName: u.value,
66
+ contactEmail: v.value,
67
+ contactPhone: d.value,
68
+ imageBase64: J(l.value.base64),
69
+ imageName: l.value.name,
70
+ imageFormat: l.value.type,
71
+ placeType: i.value ? i.value.placeType : void 0,
72
+ placeID: i.value ? i.value.id : void 0
73
+ }, {
74
+ headers: {
75
+ Authorization: w.value,
76
+ Accept: "application/json"
77
+ }
78
+ }).then((e) => {
79
+ o.value = s.ReadyToPay, c.value = !1, E({
80
+ callback: () => console.log("Callback!"),
81
+ response: e.data
82
+ });
83
+ });
84
+ }
85
+ function K(e) {
86
+ e && (g.value = e);
87
+ }
88
+ return {
89
+ selectedPlace: i,
90
+ moduleState: o,
91
+ name: u,
92
+ email: v,
93
+ phone: d,
94
+ value: p,
95
+ remark: C,
96
+ showValue: F,
97
+ quantity: k,
98
+ media: l,
99
+ placeId: R,
100
+ placeType: f,
101
+ showFormPage: U,
102
+ showPaymentPage: W,
103
+ showConfirmationPage: _,
104
+ places: m,
105
+ hasFilledForm: j,
106
+ hasForcedPlaceType: I,
107
+ isWaitingForResponse: N,
108
+ isMetadataAvailable: q,
109
+ termsOfService: L,
110
+ fetchMetadata: $,
111
+ orderGiftCard: B,
112
+ initialize: K
113
+ };
114
+ });
115
+ export {
116
+ ee as u
117
+ };
118
+ //# sourceMappingURL=giftCard-C-lmDpUB.js.map
Binary file