@konnectio/core 4.0.56-rc22 → 4.0.56-rc24

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 (44) hide show
  1. package/dist/{ActionField-ZJdtBRXa.js → ActionField-h6vpGaYw.js} +10 -10
  2. package/dist/ActionField-h6vpGaYw.js.br +0 -0
  3. package/dist/{DateField.vue_vue_type_style_index_0_lang-KjvE2y5e.js → AvailabilitySkeleton-HUUimpaX.js} +2461 -2405
  4. package/dist/AvailabilitySkeleton-HUUimpaX.js.br +0 -0
  5. package/dist/CheckoutWindow-Dmg9JyZJ.js +710 -0
  6. package/dist/CheckoutWindow-Dmg9JyZJ.js.br +0 -0
  7. package/dist/{ErrorMessage-mUpn7ZBU.js → ErrorMessage-iVDG0uzJ.js} +1 -1
  8. package/dist/ErrorMessage-iVDG0uzJ.js.br +0 -0
  9. package/dist/EventAvailabilityForm-UmnEHYcV.js +325 -0
  10. package/dist/EventAvailabilityForm-UmnEHYcV.js.br +0 -0
  11. package/dist/{_-KavQ60qi.js → Field-wvMopAED.js} +13143 -12490
  12. package/dist/Field-wvMopAED.js.br +0 -0
  13. package/dist/HotelAvailabilityForm-GWIoGscc.js +164 -0
  14. package/dist/HotelAvailabilityForm-GWIoGscc.js.br +0 -0
  15. package/dist/availability.js +27 -26
  16. package/dist/availability.js.br +0 -0
  17. package/dist/event.js +578 -304
  18. package/dist/event.js.br +0 -0
  19. package/dist/gift-card-validation.js +46 -47
  20. package/dist/gift-card-validation.js.br +0 -0
  21. package/dist/gift-card.js +304 -291
  22. package/dist/gift-card.js.br +0 -0
  23. package/dist/hotel.js +1081 -2224
  24. package/dist/hotel.js.br +0 -0
  25. package/dist/{ThankYou-EiAxaHd8.js → masonry.plugin-UcfbgWN-.js} +4922 -4231
  26. package/dist/masonry.plugin-UcfbgWN-.js.br +0 -0
  27. package/dist/polyfill.js +3014 -2962
  28. package/dist/polyfill.js.br +0 -0
  29. package/dist/style.css +1 -1
  30. package/dist/style.css.br +0 -0
  31. package/package.json +9 -9
  32. package/dist/ActionField-ZJdtBRXa.js.br +0 -4
  33. package/dist/AvailabilitySkeleton-tfEBupNq.js +0 -234
  34. package/dist/AvailabilitySkeleton-tfEBupNq.js.br +0 -0
  35. package/dist/CheckoutWindow-orJD6dJy.js +0 -205
  36. package/dist/CheckoutWindow-orJD6dJy.js.br +0 -0
  37. package/dist/DateField.vue_vue_type_style_index_0_lang-KjvE2y5e.js.br +0 -0
  38. package/dist/ErrorMessage-mUpn7ZBU.js.br +0 -0
  39. package/dist/EventAvailabilityForm-cAOEZVnn.js +0 -366
  40. package/dist/EventAvailabilityForm-cAOEZVnn.js.br +0 -0
  41. package/dist/Field-Kwm-GcDa.js +0 -41
  42. package/dist/Field-Kwm-GcDa.js.br +0 -0
  43. package/dist/ThankYou-EiAxaHd8.js.br +0 -0
  44. package/dist/_-KavQ60qi.js.br +0 -0
Binary file
@@ -0,0 +1,164 @@
1
+ import { d as J, u as K, i as P, s as h, a as U, b as x, c as Q, r as W, e as m, w as C, o as X, f as n, g as v, h as _, j as e, k, l as f, _ as Y, m as g, F as R, n as D, T as B, p as F, C as H, q as I, t as Z, v as ee, x as ae } from "./Field-wvMopAED.js";
2
+ import { _ as le } from "./AvailabilitySkeleton-HUUimpaX.js";
3
+ const te = {
4
+ key: 0,
5
+ class: "konnectio-availability-location"
6
+ }, ie = { id: "fresh-booking-availability-date-selection" }, ne = {
7
+ key: 1,
8
+ id: "fresh-booking-availability-guest-selection"
9
+ }, oe = { id: "fresh-booking-availability-confirmation" }, se = /* @__PURE__ */ J({
10
+ __name: "HotelAvailabilityForm",
11
+ props: {
12
+ booking: { type: Boolean, default: !1 },
13
+ link: {}
14
+ },
15
+ setup(N) {
16
+ const { t: l } = K(), O = P("emitter"), o = N, {
17
+ adults: s,
18
+ children: c,
19
+ arrivalDate: d,
20
+ departureDate: b,
21
+ location: w,
22
+ isExpired: T
23
+ } = h(U()), { reset: $ } = U(), { fetchAvailabilityData: j } = x(), { areListingsLoading: A, hotelList: q, hasHotelList: y } = h(x()), {
24
+ firstSelectableDateOffset: L,
25
+ lastSelectableDateOffset: S,
26
+ disableChildSelection: r,
27
+ disableAdultSelection: u
28
+ } = h(Q()), p = W([]), z = m(() => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + (L.value - 1))));
29
+ m(() => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + S.value))), m(() => new Date((/* @__PURE__ */ new Date()).setDate(d.value.getDate() + L.value)));
30
+ const E = m(() => new Date((/* @__PURE__ */ new Date()).setDate(d.value.getDate() + (S.value + 1)))), V = m(() => !(!u && s.value === 0)), M = m(() => typeof o.link != "string");
31
+ function G() {
32
+ if (o.booking === !1)
33
+ if (M.value) {
34
+ const t = ee();
35
+ o.link[t] ? window.location.replace(o.link[t]) : o.link.en ? window.location.replace(o.link.en) : console.log("Sprog understøttes ikke");
36
+ } else
37
+ window.location.replace(o.link);
38
+ else
39
+ V.value && j();
40
+ }
41
+ return C(d, (t) => {
42
+ const a = new Date(new Date(t).setDate(new Date(t).getDate() + 1));
43
+ new Date(b.value) < a && (b.value = a);
44
+ }), O.on("forcedDateChange", () => {
45
+ p.value = [d.value, b.value];
46
+ }), C(p, (t) => {
47
+ d.value = t[0], b.value = t[1];
48
+ }), X(() => {
49
+ T.value && $(), p.value = [d.value, b.value];
50
+ }), (t, a) => (n(), v("form", {
51
+ id: "konnectio-availability-form",
52
+ class: I({ reservation: t.booking }),
53
+ type: "availability",
54
+ onSubmit: Z(G, ["prevent"])
55
+ }, [
56
+ _("ul", {
57
+ id: "konnectio-availability-form-content",
58
+ class: I([
59
+ { "is-booking-page": t.booking },
60
+ { "only-adult-guests": !e(u) && e(r) },
61
+ { "only-child-guests": !e(r) && e(u) },
62
+ { "no-guests": e(u) && e(r) },
63
+ { "all-guests": !e(u) && !e(r) },
64
+ { "has-location": e(y) }
65
+ ])
66
+ }, [
67
+ e(y) ? (n(), v("li", te, [
68
+ k(Y, {
69
+ modelValue: e(w),
70
+ "onUpdate:modelValue": a[0] || (a[0] = (i) => f(w) ? w.value = i : null),
71
+ label: e(l)("general.location"),
72
+ icon: "location-dot",
73
+ "icon-type": "fas",
74
+ "icon-placement": "label",
75
+ options: e(q),
76
+ searchable: !1
77
+ }, null, 8, ["modelValue", "label", "options"])
78
+ ])) : g("", !0),
79
+ _("li", ie, [
80
+ k(le, {
81
+ modelValue: p.value,
82
+ "onUpdate:modelValue": a[1] || (a[1] = (i) => p.value = i),
83
+ label: e(l)("availability.checkInOut"),
84
+ "icon-type": "fas",
85
+ "icon-placement": "label",
86
+ "min-range": 1,
87
+ "min-date": z.value,
88
+ "max-date": E.value,
89
+ range: ""
90
+ }, null, 8, ["modelValue", "label", "min-date", "max-date"]),
91
+ g("", !0)
92
+ ]),
93
+ !e(u) || !e(r) ? (n(), v("li", ne, [
94
+ e(u) ? g("", !0) : (n(), v(R, { key: 0 }, [
95
+ e(y) ? (n(), D(B, {
96
+ key: 0,
97
+ modelValue: e(s),
98
+ "onUpdate:modelValue": a[4] || (a[4] = (i) => f(s) ? s.value = i : null),
99
+ label: e(l)("availability.adults"),
100
+ description: e(l)("general.adultAgeRange"),
101
+ "icon-type": "fas",
102
+ "icon-placement": "label",
103
+ name: "adults",
104
+ icon: "male"
105
+ }, null, 8, ["modelValue", "label", "description"])) : (n(), D(F, {
106
+ key: 1,
107
+ modelValue: e(s),
108
+ "onUpdate:modelValue": a[5] || (a[5] = (i) => f(s) ? s.value = i : null),
109
+ label: e(l)("availability.adults"),
110
+ description: e(l)("general.adultAgeRange"),
111
+ "icon-type": "fas",
112
+ "icon-placement": "label",
113
+ name: "adults",
114
+ icon: "male"
115
+ }, null, 8, ["modelValue", "label", "description"]))
116
+ ], 64)),
117
+ e(r) ? g("", !0) : (n(), v(R, { key: 1 }, [
118
+ e(y) ? (n(), D(B, {
119
+ key: 0,
120
+ modelValue: e(c),
121
+ "onUpdate:modelValue": a[6] || (a[6] = (i) => f(c) ? c.value = i : null),
122
+ label: e(l)("availability.children"),
123
+ description: e(l)("general.childAgeRange"),
124
+ "icon-type": "fas",
125
+ "icon-placement": "label",
126
+ name: "children",
127
+ icon: "child"
128
+ }, null, 8, ["modelValue", "label", "description"])) : (n(), D(F, {
129
+ key: 1,
130
+ modelValue: e(c),
131
+ "onUpdate:modelValue": a[7] || (a[7] = (i) => f(c) ? c.value = i : null),
132
+ label: e(l)("availability.children"),
133
+ description: e(l)("general.childAgeRange"),
134
+ "icon-type": "fas",
135
+ "icon-placement": "label",
136
+ name: "children",
137
+ icon: "child"
138
+ }, null, 8, ["modelValue", "label", "description"]))
139
+ ], 64))
140
+ ])) : g("", !0),
141
+ _("li", oe, [
142
+ k(H, {
143
+ class: "konnectio-availability-submit-small",
144
+ type: "submit",
145
+ icon: "search",
146
+ "icon-type": "fas",
147
+ disabled: !V.value,
148
+ "is-loading": e(A)
149
+ }, null, 8, ["disabled", "is-loading"]),
150
+ k(H, {
151
+ class: "konnectio-availability-submit-large",
152
+ type: "submit",
153
+ label: e(l)("availability.buttonLabel"),
154
+ disabled: !V.value,
155
+ "is-loading": e(A)
156
+ }, null, 8, ["label", "disabled", "is-loading"])
157
+ ])
158
+ ], 2)
159
+ ], 34));
160
+ }
161
+ }), de = /* @__PURE__ */ ae(se, [["__scopeId", "data-v-e14cfaa9"]]);
162
+ export {
163
+ de as H
164
+ };
@@ -1,8 +1,9 @@
1
- import { d as C, j as w, k as E, c as m, l as S, o as p, a as v, w as d, S as T, b as a, f as y, h as I, n as b, m as f, t as A, u as _, F as z, i as L, p as B, q as F, s as H, v as M, x as N, g as P, y as V, z as j, A as O } from "./_-KavQ60qi.js";
2
- import { H as $, A as x, m as U } from "./AvailabilitySkeleton-tfEBupNq.js";
3
- import { E as Z } from "./EventAvailabilityForm-cAOEZVnn.js";
4
- import { E as q } from "./ErrorMessage-mUpn7ZBU.js";
5
- const D = (l) => (M("data-v-16ca7abd"), l = l(), N(), l), K = { class: "konnectio-availability-module" }, G = { class: "konnectio-availability-navigation" }, J = /* @__PURE__ */ D(() => /* @__PURE__ */ a("div", { class: "konnectio-availability-divider" }, null, -1)), Q = { class: "konnectio-availability-search-form" }, R = /* @__PURE__ */ C({
1
+ import { d as C, u as w, r as E, e as m, o as S, f as p, n as v, z as d, S as T, h as a, k as y, g as B, q as b, t as f, A, j as L, F as I, m as _, B as z, D as H, E as M, G as F, H as N, x as P, J as V, K as j, L as O, M as $ } from "./Field-wvMopAED.js";
2
+ import { H as x } from "./HotelAvailabilityForm-GWIoGscc.js";
3
+ import { E as D } from "./EventAvailabilityForm-UmnEHYcV.js";
4
+ import { E as K } from "./ErrorMessage-iVDG0uzJ.js";
5
+ import { A as U } from "./AvailabilitySkeleton-HUUimpaX.js";
6
+ const Z = (l) => (F("data-v-16ca7abd"), l = l(), N(), l), q = { class: "konnectio-availability-module" }, G = { class: "konnectio-availability-navigation" }, J = /* @__PURE__ */ Z(() => /* @__PURE__ */ a("div", { class: "konnectio-availability-divider" }, null, -1)), Q = { class: "konnectio-availability-search-form" }, R = /* @__PURE__ */ C({
6
7
  name: "AvailabilityLayout",
7
8
  __name: "Availability",
8
9
  props: {
@@ -12,21 +13,21 @@ const D = (l) => (M("data-v-16ca7abd"), l = l(), N(), l), K = { class: "konnecti
12
13
  styling: {}
13
14
  },
14
15
  setup(l) {
15
- const { t: r } = w(), s = l, i = E(), h = m(() => s.hotelLink || s.eventLink), c = m(() => s.hotelLink && s.eventLink), o = m(() => i.value === "hotel"), u = m(() => i.value === "event"), e = (t) => i.value = t;
16
+ const { t: r } = w(), i = l, s = E(), h = m(() => i.hotelLink || i.eventLink), c = m(() => i.hotelLink && i.eventLink), o = m(() => s.value === "hotel"), u = m(() => s.value === "event"), e = (t) => s.value = t;
16
17
  return S(() => {
17
- !s.hotelLink && s.eventLink ? i.value = "event" : i.value = "hotel";
18
- }), (t, n) => (p(), v(H, { styling: t.styling }, {
18
+ !i.hotelLink && i.eventLink ? s.value = "event" : s.value = "hotel";
19
+ }), (t, n) => (p(), v(M, { styling: t.styling }, {
19
20
  default: d(() => [
20
21
  h.value ? (p(), v(T, { key: 0 }, {
21
22
  default: d(() => [
22
23
  a("div", null, [
23
- y(F, {
24
+ y(H, {
24
25
  "access-token": t.accessToken,
25
26
  type: "hotel"
26
27
  }, {
27
28
  default: d(() => [
28
- a("div", K, [
29
- c.value ? (p(), I(z, { key: 0 }, [
29
+ a("div", q, [
30
+ c.value ? (p(), B(I, { key: 0 }, [
30
31
  a("nav", G, [
31
32
  a("ul", null, [
32
33
  a("li", null, [
@@ -34,7 +35,7 @@ const D = (l) => (M("data-v-16ca7abd"), l = l(), N(), l), K = { class: "konnecti
34
35
  class: b({ active: o.value }),
35
36
  onClick: n[0] || (n[0] = f((g) => e("hotel"), ["prevent"]))
36
37
  }, [
37
- a("span", null, A(_(r)("availability.hotel")), 1)
38
+ a("span", null, A(L(r)("availability.hotel")), 1)
38
39
  ], 2)
39
40
  ]),
40
41
  a("li", null, [
@@ -42,27 +43,27 @@ const D = (l) => (M("data-v-16ca7abd"), l = l(), N(), l), K = { class: "konnecti
42
43
  class: b({ active: u.value }),
43
44
  onClick: n[1] || (n[1] = f((g) => e("event"), ["prevent"]))
44
45
  }, [
45
- a("span", null, A(_(r)("availability.events")), 1)
46
+ a("span", null, A(L(r)("availability.events")), 1)
46
47
  ], 2)
47
48
  ])
48
49
  ])
49
50
  ]),
50
51
  J
51
- ], 64)) : L("", !0),
52
+ ], 64)) : _("", !0),
52
53
  a("div", Q, [
53
- y(B, {
54
+ y(z, {
54
55
  name: "fade",
55
56
  mode: "out-in",
56
57
  appear: ""
57
58
  }, {
58
59
  default: d(() => [
59
- o.value ? (p(), v($, {
60
+ o.value ? (p(), v(x, {
60
61
  key: 0,
61
62
  link: t.hotelLink
62
- }, null, 8, ["link"])) : u.value ? (p(), v(Z, {
63
+ }, null, 8, ["link"])) : u.value ? (p(), v(D, {
63
64
  key: 1,
64
65
  link: t.eventLink
65
- }, null, 8, ["link"])) : L("", !0)
66
+ }, null, 8, ["link"])) : _("", !0)
66
67
  ]),
67
68
  _: 1
68
69
  })
@@ -75,13 +76,13 @@ const D = (l) => (M("data-v-16ca7abd"), l = l(), N(), l), K = { class: "konnecti
75
76
  ]),
76
77
  fallback: d(() => [
77
78
  a("div", null, [
78
- y(x, {
79
- view: c.value ? "both" : i.value
79
+ y(U, {
80
+ view: c.value ? "both" : s.value
80
81
  }, null, 8, ["view"])
81
82
  ])
82
83
  ]),
83
84
  _: 1
84
- })) : (p(), v(q, {
85
+ })) : (p(), v(K, {
85
86
  key: 1,
86
87
  title: "Unable to render Availability module",
87
88
  description: `The 'hotel-link' and/or 'event-link' properties are missing.<br>\r
@@ -91,7 +92,7 @@ const D = (l) => (M("data-v-16ca7abd"), l = l(), N(), l), K = { class: "konnecti
91
92
  _: 1
92
93
  }, 8, ["styling"]));
93
94
  }
94
- }), k = /* @__PURE__ */ P(R, [["__scopeId", "data-v-16ca7abd"]]), W = V(), X = U();
95
+ }), k = /* @__PURE__ */ P(R, [["__scopeId", "data-v-16ca7abd"]]), W = V(), X = $();
95
96
  class Y extends HTMLElement {
96
97
  vueApp;
97
98
  constructor() {
@@ -102,15 +103,15 @@ class Y extends HTMLElement {
102
103
  }
103
104
  connectedCallback() {
104
105
  const r = typeof k == "function" ? k.options : k;
105
- let s = Array.isArray(r.props) ? r.props : Object.keys(r.props || {});
106
- const i = (e) => e.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (t, n) => (n ? "-" : "") + t.toLowerCase()), h = (e) => e.replace(/-./g, (t) => t[1].toUpperCase()), c = {};
107
- s = s.map(i);
106
+ let i = Array.isArray(r.props) ? r.props : Object.keys(r.props || {});
107
+ const s = (e) => e.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (t, n) => (n ? "-" : "") + t.toLowerCase()), h = (e) => e.replace(/-./g, (t) => t[1].toUpperCase()), c = {};
108
+ i = i.map(s);
108
109
  const o = {};
109
110
  for (const e of this.attributes) {
110
111
  const n = e.name.split(".");
111
112
  n.length > 1 && (o[n[0]] || (o[n[0]] = {}), o[n[0]][h(n[1])] = e.value);
112
113
  }
113
- for (const e of s) {
114
+ for (const e of i) {
114
115
  let t = this.attributes.getNamedItem(e)?.value;
115
116
  o.hasOwnProperty(e) && (t = o[e]), c[e] = t;
116
117
  }
Binary file