@konnectio/core 4.0.63 → 4.0.65

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 (76) hide show
  1. package/dist/{ActionField-3MggPKk9.js → ActionField-D5c9yQMq.js} +36 -28
  2. package/dist/ActionField-D5c9yQMq.js.br +0 -0
  3. package/dist/AvailabilitySkeleton-BfyLbK2o.js +299 -0
  4. package/dist/AvailabilitySkeleton-BfyLbK2o.js.br +0 -0
  5. package/dist/{AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-CnYjbggZ.js → AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-CxZ-h3My.js} +934 -924
  6. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-CxZ-h3My.js.br +0 -0
  7. package/dist/{CheckoutWindow-DolJgk40.js → CheckoutWindow-B74NMuGr.js} +174 -166
  8. package/dist/CheckoutWindow-B74NMuGr.js.br +0 -0
  9. package/dist/{ErrorMessage-BksKCxAq.js → ErrorMessage-CWR5rjTx.js} +24 -16
  10. package/dist/ErrorMessage-CWR5rjTx.js.br +0 -0
  11. package/dist/EventAvailabilityForm-lFAnwVMX.js +125 -0
  12. package/dist/EventAvailabilityForm-lFAnwVMX.js.br +0 -0
  13. package/dist/Field-C4DyN4XC.js +58 -0
  14. package/dist/Field-C4DyN4XC.js.br +0 -0
  15. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-D7XjSTM3.js +18813 -0
  16. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-D7XjSTM3.js.br +0 -0
  17. package/dist/TermsOfService-Bx4b2VxT.js +44 -0
  18. package/dist/TermsOfService-Bx4b2VxT.js.br +0 -0
  19. package/dist/_-DmU4JLX1.js +20 -0
  20. package/dist/_.vue_vue_type_style_index_0_lang-B2Kq55VX.js +77 -0
  21. package/dist/_.vue_vue_type_style_index_0_lang-B2Kq55VX.js.br +0 -0
  22. package/dist/_commonjsHelpers-BbdZelfp.js +25 -0
  23. package/dist/_commonjsHelpers-BbdZelfp.js.br +0 -0
  24. package/dist/{_sentry-release-injection-file-DEszgcWK.js → _sentry-release-injection-file-tJBg8sGS.js} +1643 -1635
  25. package/dist/_sentry-release-injection-file-tJBg8sGS.js.br +0 -0
  26. package/dist/availability.js +65 -55
  27. package/dist/availability.js.br +0 -0
  28. package/dist/deep-link.js +29 -21
  29. package/dist/deep-link.js.br +0 -0
  30. package/dist/event.js +260 -252
  31. package/dist/event.js.br +0 -0
  32. package/dist/gift-card-validation.js +64 -56
  33. package/dist/gift-card-validation.js.br +0 -0
  34. package/dist/gift-card.js +137 -129
  35. package/dist/gift-card.js.br +0 -0
  36. package/dist/giftCard-SDJGsDep.js +134 -0
  37. package/dist/giftCard-SDJGsDep.js.br +0 -0
  38. package/dist/hotel.js +939 -920
  39. package/dist/hotel.js.br +0 -0
  40. package/dist/{masonry.plugin-GGoTX7a7.js → masonry.plugin-BhK5XQta.js} +860 -852
  41. package/dist/masonry.plugin-BhK5XQta.js.br +0 -0
  42. package/dist/{mitt-DnPlcQNp.js → mitt-CGFh35r5.js} +505 -497
  43. package/dist/mitt-CGFh35r5.js.br +0 -0
  44. package/dist/polyfill.js +6471 -6259
  45. package/dist/polyfill.js.br +0 -0
  46. package/dist/{style-2RYcVxT9.js → style-BQlIFUN3.js} +418 -403
  47. package/dist/style-BQlIFUN3.js.br +0 -0
  48. package/dist/style.css +1 -1
  49. package/dist/style.css.br +0 -0
  50. package/dist/{_commonjsHelpers-DEK47QeC.js → tracing-B1Jp160Y.js} +597 -544
  51. package/dist/tracing-B1Jp160Y.js.br +0 -0
  52. package/package.json +16 -16
  53. package/dist/ActionField-3MggPKk9.js.br +0 -0
  54. package/dist/AvailabilitySkeleton-DSgC6hn3.js +0 -293
  55. package/dist/AvailabilitySkeleton-DSgC6hn3.js.br +0 -0
  56. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-CnYjbggZ.js.br +0 -0
  57. package/dist/CheckoutWindow-DolJgk40.js.br +0 -0
  58. package/dist/ErrorMessage-BksKCxAq.js.br +0 -0
  59. package/dist/EventAvailabilityForm-DZljldrC.js +0 -117
  60. package/dist/EventAvailabilityForm-DZljldrC.js.br +0 -0
  61. package/dist/Field-DGi_AnA6.js +0 -50
  62. package/dist/Field-DGi_AnA6.js.br +0 -0
  63. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-B7IfVdWJ.js +0 -18734
  64. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-B7IfVdWJ.js.br +0 -0
  65. package/dist/TermsOfService-LDUTInOo.js +0 -36
  66. package/dist/TermsOfService-LDUTInOo.js.br +0 -0
  67. package/dist/_-CBEOFztf.js +0 -12
  68. package/dist/_.vue_vue_type_style_index_0_lang-DjuzMOwH.js +0 -69
  69. package/dist/_.vue_vue_type_style_index_0_lang-DjuzMOwH.js.br +0 -0
  70. package/dist/_commonjsHelpers-DEK47QeC.js.br +0 -0
  71. package/dist/_sentry-release-injection-file-DEszgcWK.js.br +0 -0
  72. package/dist/giftCard-DLrIdehA.js +0 -126
  73. package/dist/giftCard-DLrIdehA.js.br +0 -0
  74. package/dist/masonry.plugin-GGoTX7a7.js.br +0 -0
  75. package/dist/mitt-DnPlcQNp.js.br +0 -0
  76. package/dist/style-2RYcVxT9.js.br +0 -0
@@ -0,0 +1,134 @@
1
+ import { r as H, a as J, d as A, G as o, t as b, S as k, v as O, o as x, w as Q } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-D7XjSTM3.js";
2
+ import { d as X, s as Y, a as P } from "./mitt-CGFh35r5.js";
3
+ import { r as t, c as a } from "./_sentry-release-injection-file-tJBg8sGS.js";
4
+ (function() {
5
+ try {
6
+ var r = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, c = new Error().stack;
7
+ c && (r._sentryDebugIds = r._sentryDebugIds || {}, r._sentryDebugIds[c] = "41681274-d3f2-4b96-932d-f5a17319d56d", r._sentryDebugIdIdentifier = "sentry-dbid-41681274-d3f2-4b96-932d-f5a17319d56d");
8
+ } catch {
9
+ }
10
+ })();
11
+ {
12
+ var f = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
13
+ f._sentryModuleMetadata = f._sentryModuleMetadata || {}, f._sentryModuleMetadata[new Error().stack] = Object.assign(
14
+ {},
15
+ f._sentryModuleMetadata[new Error().stack],
16
+ { "_sentryBundlerPluginAppKey:konnectio-frontend-core": !0 }
17
+ );
18
+ }
19
+ const te = X("giftCard", () => {
20
+ const { pay: r } = H(), { display: c } = J(), { bearerToken: v, metaData: I, currencyId: j, hasError: T } = Y(A()), F = A(), n = t(o.InitialState), p = b("konnectio_name", "", void 0, { serializer: k.string }), g = b("konnectio_email", "", void 0, { serializer: k.string }), y = b("konnectio_phone", "", void 0, { serializer: k.string }), m = t(""), _ = t(1), C = t(!0), D = t(""), u = t({
21
+ base64: "",
22
+ type: "",
23
+ name: ""
24
+ }), E = t(void 0), h = t(0), d = t(!1), w = t(0), M = a(() => F.hasMetadata ? F.metaData.hotels[0] : {}), U = a(() => M.value.termsOfService ? M.value.termsOfService : ""), W = a(() => n.value === o.InitialState || n.value === o.WaitingForResponse), L = a(() => n.value === o.ReadyToPay), q = a(() => n.value === o.PaymentSuccess), S = a(() => {
25
+ const e = {
26
+ 1: {
27
+ label: P.t("giftCard.hotelType"),
28
+ data: []
29
+ },
30
+ 2: {
31
+ label: P.t("giftCard.restaurantType"),
32
+ data: []
33
+ }
34
+ }, l = I.value.hotels[0].places;
35
+ return l && l.forEach((s) => {
36
+ e[s.placeType].data.push(s);
37
+ }), Object.fromEntries(
38
+ Object.entries(e).filter(([, s]) => s.data.length > 0)
39
+ );
40
+ }), R = a(() => w.value !== 0), i = a(() => {
41
+ let e;
42
+ if (R.value)
43
+ e = S.value[w.value].data[0];
44
+ else if (h.value !== 0) {
45
+ const l = E.value, s = S.value[h.value].data;
46
+ s.length === 1 ? e = s[0] : l !== void 0 && s.forEach((z) => {
47
+ String(z.id) === String(l) && (e = z);
48
+ });
49
+ }
50
+ return e;
51
+ }), B = a(() => !(!p.value || !g.value || !(y.value.length >= 5) || !m.value || i.value === void 0)), G = a(() => !(n.value === o.InitialState && d.value)), N = a(() => !!(n.value === o.WaitingForResponse && d.value));
52
+ async function $() {
53
+ try {
54
+ const e = (await O.get("https://production.hotel-service.konnectio.dk/api/gift-card/metadata", {
55
+ params: {
56
+ language: x()
57
+ },
58
+ headers: {
59
+ Authorization: v.value,
60
+ Accept: "application/json"
61
+ }
62
+ })).data;
63
+ e.success !== void 0 ? T.value = !e.success : T.value = !1, I.value = e;
64
+ } catch {
65
+ c({
66
+ message: P.t("alert.error.couldntFetchMetadata"),
67
+ type: "warning"
68
+ });
69
+ }
70
+ }
71
+ async function K() {
72
+ n.value = o.WaitingForResponse, d.value = !0, await O.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
73
+ termsOfserviceURL: window.location.origin,
74
+ checkoutUrl: window.location.origin,
75
+ currencyID: j.value,
76
+ language: x(),
77
+ amount: m.value,
78
+ quantity: _.value,
79
+ freeText: D.value,
80
+ showPrice: C.value,
81
+ contactName: p.value,
82
+ contactEmail: g.value,
83
+ contactPhone: y.value,
84
+ imageBase64: Q(u.value.base64),
85
+ imageName: u.value.name,
86
+ imageFormat: u.value.type,
87
+ placeType: i.value ? i.value.placeType : void 0,
88
+ placeID: i.value ? i.value.id : void 0
89
+ }, {
90
+ headers: {
91
+ Authorization: v.value,
92
+ Accept: "application/json"
93
+ }
94
+ }).then((e) => {
95
+ n.value = o.ReadyToPay, d.value = !1, r({
96
+ callback: () => console.log("Callback!"),
97
+ response: e.data
98
+ });
99
+ });
100
+ }
101
+ function V(e) {
102
+ e && (w.value = e);
103
+ }
104
+ return {
105
+ selectedPlace: i,
106
+ moduleState: n,
107
+ name: p,
108
+ email: g,
109
+ phone: y,
110
+ value: m,
111
+ remark: D,
112
+ showValue: C,
113
+ quantity: _,
114
+ media: u,
115
+ placeId: E,
116
+ placeType: h,
117
+ showFormPage: W,
118
+ showPaymentPage: L,
119
+ showConfirmationPage: q,
120
+ places: S,
121
+ hasFilledForm: B,
122
+ hasForcedPlaceType: R,
123
+ isWaitingForResponse: N,
124
+ isMetadataAvailable: G,
125
+ termsOfService: U,
126
+ fetchMetadata: $,
127
+ orderGiftCard: K,
128
+ initialize: V
129
+ };
130
+ });
131
+ export {
132
+ te as u
133
+ };
134
+ //# sourceMappingURL=giftCard-SDJGsDep.js.map
Binary file