@konnectio/core 4.0.56-rc8 → 4.0.56

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 (70) hide show
  1. package/dist/{ActionField-na8McB-H.js → ActionField-j1i8YL6H.js} +43 -34
  2. package/dist/ActionField-j1i8YL6H.js.br +0 -0
  3. package/dist/AvailabilitySkeleton-78ug9z_g.js +294 -0
  4. package/dist/AvailabilitySkeleton-78ug9z_g.js.br +0 -0
  5. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-B72HmqV2.js +8652 -0
  6. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-B72HmqV2.js.br +0 -0
  7. package/dist/CheckoutWindow-DYdrHbQ-.js +677 -0
  8. package/dist/CheckoutWindow-DYdrHbQ-.js.br +0 -0
  9. package/dist/ErrorMessage-DJ_hHpkR.js +45 -0
  10. package/dist/ErrorMessage-DJ_hHpkR.js.br +0 -0
  11. package/dist/EventAvailabilityForm-B4Y8N8P1.js +117 -0
  12. package/dist/EventAvailabilityForm-B4Y8N8P1.js.br +0 -0
  13. package/dist/Field-CHlcB-1U.js +50 -0
  14. package/dist/Field-CHlcB-1U.js.br +0 -0
  15. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CXrsASkr.js +18825 -0
  16. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CXrsASkr.js.br +0 -0
  17. package/dist/TermsOfService-BTaz4T1c.js +36 -0
  18. package/dist/TermsOfService-BTaz4T1c.js.br +0 -0
  19. package/dist/_-Bv_QUFw4.js +12 -0
  20. package/dist/_.vue_vue_type_style_index_0_lang-BHKGq8g4.js +69 -0
  21. package/dist/_.vue_vue_type_style_index_0_lang-BHKGq8g4.js.br +0 -0
  22. package/dist/_commonjsHelpers-4HJ9V5A_.js +17 -0
  23. package/dist/_sentry-release-injection-file-B7Jqb6lo.js +9598 -0
  24. package/dist/_sentry-release-injection-file-B7Jqb6lo.js.br +0 -0
  25. package/dist/availability.js +89 -170
  26. package/dist/availability.js.br +0 -0
  27. package/dist/deep-link.js +62 -0
  28. package/dist/deep-link.js.br +0 -0
  29. package/dist/event.js +780 -500
  30. package/dist/event.js.br +0 -0
  31. package/dist/gift-card-validation.js +114 -67
  32. package/dist/gift-card-validation.js.br +0 -0
  33. package/dist/gift-card.js +356 -390
  34. package/dist/gift-card.js.br +0 -0
  35. package/dist/giftCard-D5RQomNw.js +134 -0
  36. package/dist/giftCard-D5RQomNw.js.br +0 -0
  37. package/dist/hotel.js +2215 -11
  38. package/dist/hotel.js.br +0 -0
  39. package/dist/masonry.plugin-DKJPmkN0.js +12766 -0
  40. package/dist/masonry.plugin-DKJPmkN0.js.br +0 -0
  41. package/dist/mitt-mvNuFbhJ.js +2952 -0
  42. package/dist/mitt-mvNuFbhJ.js.br +0 -0
  43. package/dist/polyfill.js +13670 -4711
  44. package/dist/polyfill.js.br +0 -0
  45. package/dist/style.css +1 -1
  46. package/dist/style.css.br +0 -0
  47. package/dist/tracing-CMlyHB3J.js +2537 -0
  48. package/dist/tracing-CMlyHB3J.js.br +0 -0
  49. package/package.json +47 -38
  50. package/dist/ActionField-na8McB-H.js.br +0 -0
  51. package/dist/AvailabilitySkeleton-1_yLVsq6.js +0 -214
  52. package/dist/AvailabilitySkeleton-1_yLVsq6.js.br +0 -0
  53. package/dist/CheckoutWindow-r6ch1iOr.js +0 -205
  54. package/dist/CheckoutWindow-r6ch1iOr.js.br +0 -0
  55. package/dist/DateField.vue_vue_type_style_index_0_lang-ZM6h3KFg.js +0 -8558
  56. package/dist/DateField.vue_vue_type_style_index_0_lang-ZM6h3KFg.js.br +0 -0
  57. package/dist/Field-S_yxW5IQ.js +0 -42
  58. package/dist/Field-S_yxW5IQ.js.br +0 -0
  59. package/dist/SelectField.vue_vue_type_style_index_0_lang-K94DVjrE.js +0 -30460
  60. package/dist/SelectField.vue_vue_type_style_index_0_lang-K94DVjrE.js.br +0 -0
  61. package/dist/ThankYou-ekf_1AWY.js +0 -13233
  62. package/dist/ThankYou-ekf_1AWY.js.br +0 -0
  63. package/dist/_-vErl-x3v.js +0 -19
  64. package/dist/_commonjsHelpers-2ufMB8rV.js +0 -30
  65. package/dist/event-iDLUEMAV.js +0 -328
  66. package/dist/event-iDLUEMAV.js.br +0 -0
  67. package/dist/favicon.ico +0 -0
  68. package/dist/hotel-4O89o7V2.js +0 -3111
  69. package/dist/hotel-4O89o7V2.js.br +0 -0
  70. package/dist/navigation.js +0 -1
Binary file
@@ -1,19 +0,0 @@
1
- import { k as a, t as s, o as t, l as o, _ as r } from "./SelectField.vue_vue_type_style_index_0_lang-K94DVjrE.js";
2
- const d = { class: "placeholder" }, _ = /* @__PURE__ */ a({
3
- __name: "_",
4
- props: {
5
- height: { default: "100%" },
6
- width: { default: "100%" },
7
- borderRadius: { default: "3px" }
8
- },
9
- setup(n) {
10
- return s((e) => ({
11
- "498aa37e": e.width,
12
- "640a5b22": e.height,
13
- 23792726: e.borderRadius
14
- })), (e, p) => (t(), o("div", d));
15
- }
16
- }), i = /* @__PURE__ */ r(_, [["__scopeId", "data-v-9a3e9892"]]);
17
- export {
18
- i as E
19
- };
@@ -1,30 +0,0 @@
1
- var u = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
- function f(e) {
3
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
- }
5
- function l(e) {
6
- if (e.__esModule)
7
- return e;
8
- var r = e.default;
9
- if (typeof r == "function") {
10
- var t = function o() {
11
- return this instanceof o ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
12
- };
13
- t.prototype = r.prototype;
14
- } else
15
- t = {};
16
- return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
17
- var n = Object.getOwnPropertyDescriptor(e, o);
18
- Object.defineProperty(t, o, n.get ? n : {
19
- enumerable: !0,
20
- get: function() {
21
- return e[o];
22
- }
23
- });
24
- }), t;
25
- }
26
- export {
27
- l as a,
28
- u as c,
29
- f as g
30
- };
@@ -1,328 +0,0 @@
1
- import { d as Ge, u as Ve, s as oe, a as Le, b as Ue, c as _e, r, E as v, e as U, f as a, O as le, S as _, g as qe, h as F, i as C, j as D } from "./SelectField.vue_vue_type_style_index_0_lang-K94DVjrE.js";
2
- const xe = Ge("event", () => {
3
- const re = Ve(), { voucher: se } = oe(Le()), { display: h } = Ue(), { bearerToken: I } = oe(_e()), p = r({}), y = r({}), t = r(void 0), l = r(!0), i = r(v.InitialState), q = r(/* @__PURE__ */ new Date()), N = r(NaN), T = r(1), S = r(NaN), K = r(NaN), E = r(""), $ = U("konnectio_name", "", void 0, { serializer: _.string }), O = U("konnectio_phone", "", void 0, { serializer: _.string }), R = U("konnectio_email", "", void 0, { serializer: _.string }), x = r(""), P = r({}), m = r({}), z = r("");
4
- function o(e) {
5
- return e.templateID !== void 0;
6
- }
7
- const ue = a(() => p.value.currency), ie = a(() => p.value.maxNumberPerBooking), ve = a(() => p.value.title), ce = a(() => p.value.subtitle), de = a(() => p.value.slideshow), A = a(() => q.value.toISOString()), pe = a(() => o(t.value)), M = a(() => o(t.value) ? t.value.numberOfDays : T.value), me = a(() => o(t.value) ? t.value.packageCount : 0), ge = a(() => o(t.value) ? t.value.fromDate : ""), b = a(() => y.value.events.find((e) => e.id === S.value)), fe = a(() => b.value ? b.value.length : void 0), j = a(() => o(t.value) ? t.value.templateID : 0), he = a(() => y.value.events), ye = a(() => y.value.templates), be = a(() => y.value.events.length > 0), ke = a(() => y.value.templates.length > 0), Q = a(() => b.value && b.value.eventRateType ? b.value.eventRateType : le.None), B = a(() => {
8
- if (!o(t.value))
9
- return t.value;
10
- }), H = a(() => {
11
- if (B.value !== void 0) {
12
- const e = B.value.find(
13
- (n) => n.time === E.value
14
- );
15
- if (e && e.price)
16
- return e.price;
17
- }
18
- return 0;
19
- }), J = a(() => {
20
- if (o(t.value))
21
- return t.value.templateCounts;
22
- }), De = a(() => (e) => p.value.eventImages.filter((n) => n.eventID === e));
23
- function G(e, n, s) {
24
- let c = 0;
25
- if (o(t.value)) {
26
- const u = t.value.templateCounts[s];
27
- if (u) {
28
- const k = u.addons, g = P.value[`${n}.${e}.${s}`] || 0;
29
- if (g > 0) {
30
- const f = k?.find((w) => w.addonID === e), d = typeof g == "boolean" ? 1 : g;
31
- c += qe(f?.price, f?.quantityStrategy, M.value, u.adultPerRoom) * d;
32
- }
33
- }
34
- } else {
35
- const u = m.value[e] || 0;
36
- if (u > 0) {
37
- const k = b.value?.products?.find((g) => g.productID === e);
38
- k && (c += k.price * u);
39
- }
40
- }
41
- return c;
42
- }
43
- function V(e, n) {
44
- let s = 0;
45
- if (o(t.value))
46
- for (const c in P.value) {
47
- const u = c.split(".");
48
- parseInt(u[0]) === e && parseInt(u[2]) === n && (s += G(parseInt(u[1]), e, n));
49
- }
50
- else
51
- for (const c in m.value)
52
- s += G(parseInt(c)) * T.value;
53
- return s;
54
- }
55
- const W = a(() => o(t.value) && t.value.totalPrice || 0), Ie = a(() => {
56
- if (o(t.value))
57
- return t.value.templateCounts === void 0 ? NaN : t.value.templateCounts.flatMap((e) => e.roomGroupID).reduce(
58
- (e, n, s) => e + V(n, s),
59
- W.value
60
- ) || 0;
61
- {
62
- let e = V();
63
- return e += H.value, e;
64
- }
65
- }), Se = a(() => o(t.value) && t.value.templateCounts !== void 0 && t.value.templateCounts.flatMap((e) => e.weekendFee).reduce((e, n) => e + n, 0) || 0), Pe = a(() => o(t.value) && t.value.templateCounts !== void 0 && t.value.templateCounts.flatMap((e) => e.roomUpgrade).reduce((e, n) => e + n, 0) || 0), Ae = a(() => {
66
- const e = m.value;
67
- let n = 0;
68
- for (const s in e)
69
- n += Number.isNaN(e[s]) ? 0 : e[s];
70
- return n > 0;
71
- }), X = a(() => o(t.value) ? !1 : Object.keys(m.value).length > 0), we = a(() => !!($.value !== "" && R.value !== "" && O.value.length >= 5 && (!X.value || Ae.value) && (!(!o(t.value) && Q.value !== le.FullDayEvent) || E.value !== "")));
72
- function Ce(e) {
73
- return i.value === v.ReservationState && S.value === e && l.value;
74
- }
75
- const Ee = a(() => !(i.value === v.InitialState && l.value)), Fe = a(() => !(i.value === v.AvailabilityState && l.value)), Ne = a(() => t.value !== void 0), Te = a(() => i.value === v.PaymentState && l.value);
76
- async function Y() {
77
- try {
78
- const e = (await C.get("https://production.hotel-service.konnectio.dk/api/event/metadata", {
79
- params: {
80
- language: F()
81
- },
82
- headers: {
83
- Authorization: I.value,
84
- "Fresh-Booking-Ver": "4.0.56-rc8"
85
- }
86
- })).data;
87
- p.value = e, Z();
88
- } catch {
89
- h({
90
- message: D.t("alert.error.couldntFetchMetadata"),
91
- type: "warning"
92
- });
93
- }
94
- }
95
- async function Z() {
96
- i.value = v.AvailabilityState, l.value = !0;
97
- try {
98
- const e = (await C.get("https://production.hotel-service.konnectio.dk/api/event/restaurant-events", {
99
- params: {
100
- language: F(),
101
- date: A.value
102
- },
103
- headers: {
104
- Authorization: I.value,
105
- "Fresh-Booking-Ver": "4.0.56-rc8"
106
- }
107
- })).data;
108
- y.value = e, l.value = !1;
109
- } catch {
110
- h({
111
- message: D.t("alert.error.couldntFetchListings"),
112
- type: "warning"
113
- });
114
- }
115
- }
116
- async function $e(e) {
117
- i.value = v.ReservationState, l.value = !0;
118
- try {
119
- const n = (await C.get("https://production.hotel-service.konnectio.dk/api/v3/event/get-availability", {
120
- params: {
121
- language: F(),
122
- date: A.value,
123
- templateId: S.value,
124
- numberOfPeople: N.value
125
- },
126
- headers: {
127
- Authorization: I.value,
128
- "Fresh-Booking-Ver": "4.0.56-rc8"
129
- }
130
- })).data;
131
- n.templateCounts.length === 0 ? h({
132
- message: D.t("alert.error.eventNotAvailable"),
133
- type: "warning"
134
- }) : (t.value = n, e()), l.value = !1;
135
- } catch {
136
- l.value = !1, i.value = v.AvailabilityState, h({
137
- message: D.t("alert.error.couldntFetchEvent"),
138
- type: "warning"
139
- });
140
- }
141
- }
142
- async function Oe(e) {
143
- i.value = v.ReservationState, l.value = !0;
144
- try {
145
- const n = (await C.get("https://production.hotel-service.konnectio.dk/api/v3/event/get-table-availability", {
146
- params: {
147
- language: F(),
148
- date: A.value,
149
- numberOfPeople: N.value,
150
- eventId: S.value,
151
- tableGroupId: K.value
152
- },
153
- headers: {
154
- Authorization: I.value,
155
- "Fresh-Booking-Ver": "4.0.56-rc8"
156
- }
157
- })).data;
158
- t.value = n, l.value = !1, e();
159
- } catch {
160
- l.value = !1, i.value = v.AvailabilityState, h({
161
- message: D.t("alert.error.couldntFetchEvent"),
162
- type: "warning"
163
- });
164
- }
165
- }
166
- async function Re() {
167
- try {
168
- const e = (await C.get("https://production.hotel-service.konnectio.dk/api/v3/event/validate-discount-code", {
169
- params: {
170
- language: F(),
171
- date: A.value,
172
- discountCode: z.value
173
- },
174
- headers: {
175
- Authorization: I.value,
176
- "Fresh-Booking-Ver": "4.0.56-rc8"
177
- }
178
- })).data;
179
- console.log(e);
180
- } catch (e) {
181
- console.log(e), h({
182
- message: D.t("alert.error.discountCodeValidation"),
183
- type: "warning"
184
- });
185
- }
186
- }
187
- async function ze(e) {
188
- i.value = v.PaymentState, l.value = !0;
189
- const n = () => {
190
- l.value = !1, i.value = v.ReservationState, h({
191
- message: D.t("booking.other.errorMessage"),
192
- type: "warning"
193
- });
194
- };
195
- let s, c, u;
196
- const k = [];
197
- if (o(t.value))
198
- J.value?.forEach((d, w) => {
199
- const ee = [];
200
- let te = 0;
201
- for (const ae in P.value) {
202
- const L = ae.split("."), ne = P.value[ae];
203
- parseInt(L[0]) === d.roomGroupID && parseInt(L[2]) === w && ne > 0 && (ee.push({
204
- id: te,
205
- addonID: parseInt(L[1]),
206
- quantity: ne
207
- }), te++);
208
- }
209
- k.push({
210
- adultPerRoom: d.adultPerRoom,
211
- count: d.count,
212
- roomGroupID: d.roomGroupID,
213
- addons: ee
214
- });
215
- }), s = {
216
- templateID: j.value,
217
- numberOfDays: T.value,
218
- templateCounts: k
219
- };
220
- else {
221
- c = [], u = E.value;
222
- for (const d in m.value) {
223
- const w = m.value[parseInt(d)];
224
- w > 0 && c.push({
225
- id: parseInt(d),
226
- quantity: w
227
- });
228
- }
229
- }
230
- let g = "https://production.hotel-service.konnectio.dk/api/v3/event/template-book";
231
- const f = {
232
- date: A.value,
233
- name: $.value,
234
- email: R.value,
235
- phone: O.value,
236
- remark: x.value,
237
- numberOfPeople: N.value,
238
- days: M.value,
239
- discountCode: z.value,
240
- giftCardCode: se.value,
241
- checkoutUrl: window.location.origin,
242
- privacyUrl: window.location.origin
243
- };
244
- o(t.value) ? f.templateGroup = s : (f.time = u, f.eventId = S.value, f.products = c, g = "https://production.hotel-service.konnectio.dk/api/v3/event/event-book"), await C.post(g, f, {
245
- headers: {
246
- Authorization: I.value,
247
- "Fresh-Booking-Ver": "4.0.56-rc8"
248
- }
249
- }).then((d) => {
250
- l.value = !1, re.pay({
251
- callback: e,
252
- response: d.data
253
- });
254
- }).catch(() => n());
255
- }
256
- function Me(e) {
257
- P.value = {}, m.value = {}, E.value = "", e();
258
- }
259
- function Be() {
260
- Y();
261
- }
262
- return {
263
- metaData: p,
264
- listingData: y,
265
- tableBasePrice: H,
266
- availabilityData: t,
267
- isLoading: l,
268
- moduleState: i,
269
- searchDate: q,
270
- numberOfPeople: N,
271
- numberOfDays: T,
272
- eventId: S,
273
- tableGroupId: K,
274
- arrivalTime: E,
275
- addons: P,
276
- products: m,
277
- discountCode: z,
278
- name: $,
279
- phone: O,
280
- email: R,
281
- remark: x,
282
- isTemplateEvent: pe,
283
- currency: ue,
284
- maxNumberOfPeople: ie,
285
- title: ve,
286
- subtitle: ce,
287
- slideshow: de,
288
- date: A,
289
- numberOfTotalDays: M,
290
- numberOfRooms: me,
291
- fromDate: ge,
292
- getEventData: b,
293
- length: fe,
294
- templateId: j,
295
- getEvents: he,
296
- getTemplates: ye,
297
- hasEvents: be,
298
- hasTemplates: ke,
299
- basePrice: W,
300
- totalPrice: Ie,
301
- getTemplateData: J,
302
- getEventTableData: B,
303
- roomUpgrade: Pe,
304
- weekendFee: Se,
305
- hasProducts: X,
306
- eventRateType: Q,
307
- isReservationFormFilled: we,
308
- isMetaDataAvailable: Ee,
309
- areListingsAvailable: Fe,
310
- isAvailabilityDataAvailable: Ne,
311
- isPaymentLoading: Te,
312
- getEventImages: De,
313
- isEventListingLoading: Ce,
314
- fetchMetaData: Y,
315
- fetchListings: Z,
316
- getTemplateAvailability: $e,
317
- getEventAvailability: Oe,
318
- validateDiscountCode: Re,
319
- localAddonPrice: G,
320
- totalAddonPrice: V,
321
- createBooking: ze,
322
- reset: Me,
323
- initialize: Be
324
- };
325
- });
326
- export {
327
- xe as u
328
- };
Binary file
package/dist/favicon.ico DELETED
Binary file