@konnectio/core 4.0.92 → 4.0.94

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 (53) hide show
  1. package/dist/{ActionField-CgMznDNS.js → ActionField-pZOFNMkw.js} +2 -2
  2. package/dist/ActionField-pZOFNMkw.js.br +0 -0
  3. package/dist/AvailabilitySkeleton-DJyT38F9.js +319 -0
  4. package/dist/AvailabilitySkeleton-DJyT38F9.js.br +0 -0
  5. package/dist/{AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_cebeb733_lang-W7VRxfL4.js → AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_cebeb733_lang-CuRWF7vG.js} +253 -245
  6. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_cebeb733_lang-CuRWF7vG.js.br +0 -0
  7. package/dist/{CheckoutWindow-BoEtvp4P.js → CheckoutWindow-5ngdoK38.js} +2 -2
  8. package/dist/CheckoutWindow-5ngdoK38.js.br +0 -0
  9. package/dist/{ErrorMessage-CvJnQM2S.js → ErrorMessage-BVaWW4Hz.js} +2 -2
  10. package/dist/ErrorMessage-BVaWW4Hz.js.br +0 -0
  11. package/dist/{EventAvailabilityForm-D_KjLqgK.js → EventAvailabilityForm-Du4kySZ-.js} +3 -3
  12. package/dist/EventAvailabilityForm-Du4kySZ-.js.br +0 -0
  13. package/dist/{Field-Ce6P6QCM.js → Field-MzDRmdmU.js} +3 -3
  14. package/dist/Field-MzDRmdmU.js.br +0 -0
  15. package/dist/{Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CtysUXs-.js → Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CH1o9S9a.js} +2 -2
  16. package/dist/{SelectField.vue_vue_type_style_index_0_lang-DeqWEc4j.js → SelectField.vue_vue_type_style_index_0_lang-BeprYLM8.js} +301 -302
  17. package/dist/SelectField.vue_vue_type_style_index_0_lang-BeprYLM8.js.br +0 -0
  18. package/dist/{TermsOfService-DS18Dl-L.js → TermsOfService-9iLxpj-0.js} +3 -3
  19. package/dist/_-DXSHtzqt.js +5 -0
  20. package/dist/{_.vue_vue_type_style_index_0_lang-CXamzQ3j.js → _.vue_vue_type_style_index_0_lang-mNFTf-c3.js} +2 -2
  21. package/dist/availability.js +5 -5
  22. package/dist/availability.js.br +0 -0
  23. package/dist/cancel-reservation.js +3 -3
  24. package/dist/cancel-reservation.js.br +0 -0
  25. package/dist/event.js +7 -7
  26. package/dist/event.js.br +0 -0
  27. package/dist/gift-card-validation.js +7 -7
  28. package/dist/gift-card-validation.js.br +0 -0
  29. package/dist/gift-card.js +8 -8
  30. package/dist/gift-card.js.br +0 -0
  31. package/dist/{giftCard-Dx--Stye.js → giftCard-CmhfXMZj.js} +2 -2
  32. package/dist/giftCard-CmhfXMZj.js.br +0 -0
  33. package/dist/hotel.js +724 -734
  34. package/dist/hotel.js.br +0 -0
  35. package/dist/{masonry.plugin-CPsNk-yp.js → masonry.plugin-Bz6kKi0V.js} +21 -25
  36. package/dist/masonry.plugin-Bz6kKi0V.js.br +0 -0
  37. package/dist/polyfill.js +1 -1
  38. package/dist/polyfill.js.br +0 -0
  39. package/dist/style.css +1 -1
  40. package/dist/style.css.br +0 -0
  41. package/package.json +8 -8
  42. package/dist/ActionField-CgMznDNS.js.br +0 -0
  43. package/dist/AvailabilitySkeleton-B12FSS31.js +0 -322
  44. package/dist/AvailabilitySkeleton-B12FSS31.js.br +0 -0
  45. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_cebeb733_lang-W7VRxfL4.js.br +0 -0
  46. package/dist/CheckoutWindow-BoEtvp4P.js.br +0 -0
  47. package/dist/ErrorMessage-CvJnQM2S.js.br +0 -0
  48. package/dist/EventAvailabilityForm-D_KjLqgK.js.br +0 -0
  49. package/dist/Field-Ce6P6QCM.js.br +0 -0
  50. package/dist/SelectField.vue_vue_type_style_index_0_lang-DeqWEc4j.js.br +0 -0
  51. package/dist/_-Csc-2ekB.js +0 -5
  52. package/dist/giftCard-Dx--Stye.js.br +0 -0
  53. package/dist/masonry.plugin-CPsNk-yp.js.br +0 -0
@@ -1,5 +1,5 @@
1
1
  import { d as c, c as p, a as d, b as i, w as V, e as v, i as t, f as q } from "./mitt-BGszhQ2P.js";
2
- import { D as g, c as k, f as B, T as I, d as C, r as F, _ as A } from "./SelectField.vue_vue_type_style_index_0_lang-DeqWEc4j.js";
2
+ import { D as g, c as k, f as B, T as I, d as C, r as F, _ as A } from "./SelectField.vue_vue_type_style_index_0_lang-BeprYLM8.js";
3
3
  const L = { class: "fresh-booking-action-field" }, T = /* @__PURE__ */ c({
4
4
  __name: "ActionField",
5
5
  props: {
@@ -97,4 +97,4 @@ const L = { class: "fresh-booking-action-field" }, T = /* @__PURE__ */ c({
97
97
  export {
98
98
  w as A
99
99
  };
100
- //# sourceMappingURL=ActionField-CgMznDNS.js.map
100
+ //# sourceMappingURL=ActionField-pZOFNMkw.js.map
Binary file
@@ -0,0 +1,319 @@
1
+ import { d as te, u as De, s as L, r as b, c as s, C as K, o as ke, a as r, g as m, f as n, w as he, i as t, b as k, j as N, e as h, n as S, D as we, h as Ve, O as _e } from "./mitt-BGszhQ2P.js";
2
+ import { u as Q, b as W, a as Ae, g as X, T as Le, c as xe, f as Z, d as ee, q as Ne, _ as le } from "./SelectField.vue_vue_type_style_index_0_lang-BeprYLM8.js";
3
+ import { _ as x } from "./AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_cebeb733_lang-CuRWF7vG.js";
4
+ import { E as ae } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CH1o9S9a.js";
5
+ import { F as p } from "./Field-MzDRmdmU.js";
6
+ const Se = {
7
+ class: "konnectio-availability-location",
8
+ key: "location"
9
+ }, Ce = {
10
+ id: "konnectio-availability-date-selection",
11
+ key: "multiDate"
12
+ }, Ue = {
13
+ key: 0,
14
+ class: "konnectio-availability-date-selection-multi"
15
+ }, $e = {
16
+ class: "konnectio-availability-guest-selection",
17
+ key: "guests"
18
+ }, Be = {
19
+ id: "konnectio-availability-confirmation",
20
+ key: "confirm"
21
+ }, He = /* @__PURE__ */ te({
22
+ __name: "HotelAvailabilityForm",
23
+ props: {
24
+ booking: { type: Boolean, default: !1 },
25
+ link: {},
26
+ selectedLocation: { default: NaN },
27
+ disableDefaultLocation: { type: Boolean, default: !1 }
28
+ },
29
+ setup(C) {
30
+ const { t: i } = De(), U = _e("emitter"), l = C, $ = Q(), {
31
+ adults: oe,
32
+ children: ie,
33
+ arrivalDate: B,
34
+ departureDate: H,
35
+ location: R,
36
+ hasHotelLocations: w,
37
+ hotelLocations: F,
38
+ controlLocation: ne
39
+ } = L(Q()), { fetchAvailabilityData: se } = W(), { areListingsLoading: I } = L(W()), { display: y } = Ae(), {
40
+ firstSelectableDateOffset: O,
41
+ lastSelectableDateOffset: T,
42
+ defaultAdultAmount: ue,
43
+ defaultChildAmount: re,
44
+ maxAdultAmount: ce,
45
+ maxChildAmount: de,
46
+ splitBookingCalendar: ve
47
+ } = L(X()), { hasChildSelection: V } = X(), me = () => new Date(new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + 1)).setHours(12, 0, 0, 0)), be = () => new Date(new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + 2)).setHours(12, 0, 0, 0)), pe = () => l.disableDefaultLocation ? void 0 : ne.value, M = b(ue.value), j = b(re.value), E = b(me()), P = b(be()), q = b(pe()), g = s({
48
+ get: () => l.booking ? $.adults : M.value,
49
+ set: (e) => {
50
+ l.booking ? oe.value = Number(e) : M.value = Number(e);
51
+ }
52
+ }), D = s({
53
+ get: () => l.booking ? $.children : j.value,
54
+ set: (e) => {
55
+ l.booking ? ie.value = Number(e) : j.value = Number(e);
56
+ }
57
+ }), u = s({
58
+ get: () => l.booking ? B.value : E.value,
59
+ set: (e) => {
60
+ l.booking ? B.value = e : E.value = e;
61
+ }
62
+ }), c = s({
63
+ get: () => l.booking ? H.value : P.value,
64
+ set: (e) => {
65
+ l.booking ? H.value = e : P.value = e;
66
+ }
67
+ }), d = s({
68
+ get: () => isNaN(l.selectedLocation) ? l.booking ? R.value : q.value : l.selectedLocation,
69
+ set: (e) => {
70
+ l.booking ? R.value = e : q.value = e;
71
+ }
72
+ }), z = s(() => {
73
+ const e = F.value.find(({ id: a }) => a === l.selectedLocation);
74
+ return e ? e.name : "";
75
+ }), f = b([]), G = s(() => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + (O.value - 1)))), ge = s(() => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + T.value)));
76
+ s(() => new Date((/* @__PURE__ */ new Date()).setDate(u.value.getDate() + O.value)));
77
+ const Y = s(() => new Date((/* @__PURE__ */ new Date()).setDate(u.value.getDate() + (T.value + 1)))), _ = s(() => g.value !== 0), fe = s(() => typeof l.link != "string");
78
+ function J(e) {
79
+ const a = e.getFullYear();
80
+ let o = e.getMonth() + 1, v = e.getDate();
81
+ return v < 10 && (v = "0" + v), o < 10 && (o = "0" + o), `${a}-${o}-${v}`;
82
+ }
83
+ function A(e) {
84
+ const a = {
85
+ a: g.value.toString(),
86
+ c: D.value.toString(),
87
+ ci: J(u.value),
88
+ co: J(c.value),
89
+ hid: d.value.toString()
90
+ }, o = new URLSearchParams(a), v = new URL(e, window.location.origin);
91
+ v.search = o.toString(), window.location.replace(v.toString());
92
+ }
93
+ function ye() {
94
+ if (isNaN(d.value) && w.value) {
95
+ y({
96
+ message: i("alert.error.selectHotelId"),
97
+ type: "error"
98
+ });
99
+ return;
100
+ }
101
+ if (isNaN(g.value)) {
102
+ y({
103
+ message: i("alert.error.selectValidAdults"),
104
+ type: "error"
105
+ });
106
+ return;
107
+ }
108
+ if (isNaN(D.value)) {
109
+ y({
110
+ message: i("alert.error.selectValidChildren"),
111
+ type: "error"
112
+ });
113
+ return;
114
+ }
115
+ if (l.booking === !1)
116
+ if (fe.value) {
117
+ const e = Ne();
118
+ l.link[e] ? A(l.link[e]) : l.link.en ? A(l.link.en) : y({
119
+ message: "Module misconfiguration, contact an admin",
120
+ type: "error"
121
+ });
122
+ } else
123
+ A(l.link);
124
+ else _.value && se();
125
+ }
126
+ return K(u, (e) => {
127
+ const a = new Date(new Date(e).setDate(new Date(e).getDate() + 1));
128
+ new Date(c.value) < a && (c.value = a);
129
+ }), U.on("forcedDateChange", () => {
130
+ f.value = [u.value, c.value];
131
+ }), K(f, (e) => {
132
+ u.value = e[0], c.value = e[1];
133
+ }), ke(() => {
134
+ f.value = [u.value, c.value];
135
+ }), (e, a) => (r(), m("form", {
136
+ id: "konnectio-availability-form",
137
+ class: S({ reservation: e.booking }),
138
+ type: "availability",
139
+ onSubmit: Ve(ye, ["prevent"])
140
+ }, [
141
+ n(we, {
142
+ id: "konnectio-availability-form-content",
143
+ tag: "ul",
144
+ class: S([
145
+ { "is-booking-page": e.booking },
146
+ { "only-adult-guests": !t(V)(d.value) },
147
+ { "all-guests": t(V)(d.value) },
148
+ { "has-location": t(w) }
149
+ ])
150
+ }, {
151
+ default: he(() => [
152
+ t(w) ? (r(), m("li", Se, [
153
+ isNaN(e.selectedLocation) ? (r(), k(xe, {
154
+ key: 1,
155
+ modelValue: d.value,
156
+ "onUpdate:modelValue": a[1] || (a[1] = (o) => d.value = o),
157
+ label: t(i)("general.location"),
158
+ placeholder: t(i)("general.locationPlaceholder"),
159
+ icon: "location-dot",
160
+ "icon-type": "fas",
161
+ "icon-placement": "label",
162
+ "label-key": "name",
163
+ "value-key": "id",
164
+ options: t(F),
165
+ searchable: !1
166
+ }, null, 8, ["modelValue", "label", "placeholder", "options"])) : (r(), k(Le, {
167
+ key: 0,
168
+ modelValue: z.value,
169
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => z.value = o),
170
+ label: t(i)("general.location"),
171
+ icon: "location-dot",
172
+ "icon-type": "fas",
173
+ "icon-placement": "label",
174
+ readonly: ""
175
+ }, null, 8, ["modelValue", "label"]))
176
+ ])) : N("", !0),
177
+ h("li", Ce, [
178
+ t(ve) ? (r(), m("div", Ue, [
179
+ n(x, {
180
+ modelValue: u.value,
181
+ "onUpdate:modelValue": a[2] || (a[2] = (o) => u.value = o),
182
+ label: t(i)("availability.arrivalDate"),
183
+ name: "arrivalDate",
184
+ "icon-type": "fas",
185
+ "icon-placement": "label",
186
+ "start-date": u.value,
187
+ "min-date": G.value,
188
+ "max-date": ge.value
189
+ }, null, 8, ["modelValue", "label", "start-date", "min-date", "max-date"]),
190
+ n(x, {
191
+ modelValue: c.value,
192
+ "onUpdate:modelValue": a[3] || (a[3] = (o) => c.value = o),
193
+ label: t(i)("availability.departureDate"),
194
+ name: "departureDate",
195
+ "icon-type": "fas",
196
+ "icon-placement": "label",
197
+ "start-date": c.value,
198
+ "min-date": u.value,
199
+ "max-date": Y.value
200
+ }, null, 8, ["modelValue", "label", "start-date", "min-date", "max-date"])
201
+ ])) : (r(), k(x, {
202
+ key: 1,
203
+ modelValue: f.value,
204
+ "onUpdate:modelValue": a[4] || (a[4] = (o) => f.value = o),
205
+ label: t(i)("availability.checkInOut"),
206
+ "icon-type": "fas",
207
+ "icon-placement": "label",
208
+ "min-range": 1,
209
+ "min-date": G.value,
210
+ "max-date": Y.value,
211
+ range: ""
212
+ }, null, 8, ["modelValue", "label", "min-date", "max-date"]))
213
+ ]),
214
+ h("li", $e, [
215
+ n(Z, {
216
+ modelValue: g.value,
217
+ "onUpdate:modelValue": a[5] || (a[5] = (o) => g.value = o),
218
+ label: t(i)("availability.adults"),
219
+ description: t(i)("general.adultAgeRange"),
220
+ "icon-type": "fas",
221
+ "icon-placement": "label",
222
+ name: "adults",
223
+ icon: "male",
224
+ "max-value": t(ce),
225
+ controls: !0
226
+ }, null, 8, ["modelValue", "label", "description", "max-value"]),
227
+ t(V)(d.value) ? (r(), k(Z, {
228
+ key: 0,
229
+ modelValue: D.value,
230
+ "onUpdate:modelValue": a[6] || (a[6] = (o) => D.value = o),
231
+ label: t(i)("availability.children"),
232
+ description: t(i)("general.childAgeRange"),
233
+ "icon-type": "fas",
234
+ "icon-placement": "label",
235
+ name: "children",
236
+ icon: "child",
237
+ "max-value": t(de),
238
+ controls: !0
239
+ }, null, 8, ["modelValue", "label", "description", "max-value"])) : N("", !0)
240
+ ]),
241
+ h("li", Be, [
242
+ n(ee, {
243
+ class: "konnectio-availability-submit-small",
244
+ type: "submit",
245
+ icon: "search",
246
+ "icon-type": "fas",
247
+ disabled: !_.value,
248
+ "is-loading": t(I)
249
+ }, null, 8, ["disabled", "is-loading"]),
250
+ n(ee, {
251
+ class: "konnectio-availability-submit-large",
252
+ type: "submit",
253
+ label: t(i)("availability.buttonLabel"),
254
+ disabled: !_.value,
255
+ "is-loading": t(I)
256
+ }, null, 8, ["label", "disabled", "is-loading"])
257
+ ])
258
+ ]),
259
+ _: 1
260
+ }, 8, ["class"])
261
+ ], 34));
262
+ }
263
+ }), ze = /* @__PURE__ */ le(He, [["__scopeId", "data-v-1d793fb5"]]), Re = { class: "availability-skeleton" }, Fe = {
264
+ key: 0,
265
+ class: "availability-skeleton-navigation"
266
+ }, Ie = { class: "availability-skeleton-content" }, Oe = {
267
+ key: 1,
268
+ class: "availability-skeleton-event"
269
+ }, Te = /* @__PURE__ */ te({
270
+ __name: "AvailabilitySkeleton",
271
+ props: {
272
+ view: { default: "hotel" },
273
+ hotel: { type: Boolean, default: !1 }
274
+ },
275
+ setup(C) {
276
+ return (i, U) => (r(), m("div", Re, [
277
+ i.view === "both" ? (r(), m("div", Fe, [
278
+ n(ae, {
279
+ height: "28px",
280
+ width: "60px",
281
+ "border-radius": "20px"
282
+ }),
283
+ n(ae, {
284
+ height: "28px",
285
+ width: "60px",
286
+ "border-radius": "20px"
287
+ })
288
+ ])) : N("", !0),
289
+ h("div", Ie, [
290
+ i.view !== "event" ? (r(), m("div", {
291
+ key: 0,
292
+ class: S([
293
+ "availability-skeleton-hotel",
294
+ { "within-hotel": i.hotel }
295
+ ])
296
+ }, [
297
+ n(p, { "with-icon": "" }),
298
+ n(p, { "with-icon": "" }),
299
+ n(p, { "with-icon": "" }),
300
+ n(p, {
301
+ "with-icon": "",
302
+ "no-label": ""
303
+ })
304
+ ], 2)) : (r(), m("div", Oe, [
305
+ n(p, { "with-icon": "" }),
306
+ n(p, {
307
+ "with-icon": "",
308
+ "no-label": ""
309
+ })
310
+ ]))
311
+ ])
312
+ ]));
313
+ }
314
+ }), Ge = /* @__PURE__ */ le(Te, [["__scopeId", "data-v-cebeb733"]]);
315
+ export {
316
+ Ge as A,
317
+ ze as H
318
+ };
319
+ //# sourceMappingURL=AvailabilitySkeleton-DJyT38F9.js.map