@konnectio/core 4.7.17 → 4.8.0

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 (115) hide show
  1. package/dist/{ActionField-Dtyg_Xqt.js → ActionField-CiBTmhVP.js} +5 -5
  2. package/dist/ActionField-CiBTmhVP.js.br +0 -0
  3. package/dist/ActionField-CiBTmhVP.js.gz +0 -0
  4. package/dist/{AvailabilitySkeleton-6jjgsDUN.js → AvailabilitySkeleton-Tv_yaXPa.js} +1515 -1357
  5. package/dist/AvailabilitySkeleton-Tv_yaXPa.js.br +0 -0
  6. package/dist/AvailabilitySkeleton-Tv_yaXPa.js.gz +0 -0
  7. package/dist/{CheckoutWindow-CUoVKHnQ.js → CheckoutWindow-3gTfVepQ.js} +21 -17
  8. package/dist/CheckoutWindow-3gTfVepQ.js.br +0 -0
  9. package/dist/CheckoutWindow-3gTfVepQ.js.gz +0 -0
  10. package/dist/{ErrorMessage-CeH20mgp.js → ErrorMessage-ClFJa4be.js} +8 -8
  11. package/dist/ErrorMessage-ClFJa4be.js.br +0 -0
  12. package/dist/ErrorMessage-ClFJa4be.js.gz +0 -0
  13. package/dist/{EventAvailabilityForm-CEi0n5w5.js → EventAvailabilityForm-D_UqbRBj.js} +22 -21
  14. package/dist/EventAvailabilityForm-D_UqbRBj.js.br +0 -0
  15. package/dist/EventAvailabilityForm-D_UqbRBj.js.gz +0 -0
  16. package/dist/{Field-nvWxJ8O5.js → Field-CzT0QKcQ.js} +2 -2
  17. package/dist/Field-CzT0QKcQ.js.br +0 -0
  18. package/dist/Field-CzT0QKcQ.js.gz +0 -0
  19. package/dist/HotelAvailabilityForm-oY9nC2co.js +324 -0
  20. package/dist/HotelAvailabilityForm-oY9nC2co.js.br +0 -0
  21. package/dist/HotelAvailabilityForm-oY9nC2co.js.gz +0 -0
  22. package/dist/{SelectField-DO26J3vV.js → SelectField-DMU4o8wT.js} +2871 -2748
  23. package/dist/SelectField-DMU4o8wT.js.br +0 -0
  24. package/dist/SelectField-DMU4o8wT.js.gz +0 -0
  25. package/dist/{TermsOfService-1ml1UlRa.js → TermsOfService-Bh49zB1Y.js} +3 -3
  26. package/dist/TermsOfService-Bh49zB1Y.js.br +0 -0
  27. package/dist/TermsOfService-Bh49zB1Y.js.gz +0 -0
  28. package/dist/{_-BfUSBI8s.js → _-CYKi9htj.js} +3 -3
  29. package/dist/_-CYKi9htj.js.br +0 -0
  30. package/dist/_-CYKi9htj.js.gz +7 -0
  31. package/dist/availability.js +8 -8
  32. package/dist/availability.js.br +0 -0
  33. package/dist/availability.js.gz +0 -0
  34. package/dist/cancel-reservation.js +13 -13
  35. package/dist/cancel-reservation.js.br +0 -0
  36. package/dist/cancel-reservation.js.gz +0 -0
  37. package/dist/core.css +1 -1
  38. package/dist/core.css.br +0 -0
  39. package/dist/core.css.gz +0 -0
  40. package/dist/deep-link.js +1 -1
  41. package/dist/deep-link.js.br +0 -0
  42. package/dist/deep-link.js.gz +0 -0
  43. package/dist/dist-Dhf-kBcE.js +3631 -0
  44. package/dist/dist-Dhf-kBcE.js.br +0 -0
  45. package/dist/dist-Dhf-kBcE.js.gz +0 -0
  46. package/dist/{dist-DvERnyi9.js → dist-IXFfy6j_.js} +79 -66
  47. package/dist/dist-IXFfy6j_.js.br +0 -0
  48. package/dist/dist-IXFfy6j_.js.gz +0 -0
  49. package/dist/event.js +190 -176
  50. package/dist/event.js.br +0 -0
  51. package/dist/event.js.gz +0 -0
  52. package/dist/gift-card-validation.js +16 -16
  53. package/dist/gift-card-validation.js.br +0 -0
  54. package/dist/gift-card-validation.js.gz +0 -0
  55. package/dist/gift-card.js +10 -10
  56. package/dist/gift-card.js.br +0 -0
  57. package/dist/gift-card.js.gz +0 -0
  58. package/dist/{giftCard-Cp7GosHw.js → giftCard-BP6ydQ7Q.js} +10 -10
  59. package/dist/giftCard-BP6ydQ7Q.js.br +0 -0
  60. package/dist/giftCard-BP6ydQ7Q.js.gz +0 -0
  61. package/dist/hotel.js +2849 -1726
  62. package/dist/hotel.js.br +0 -0
  63. package/dist/hotel.js.gz +0 -0
  64. package/dist/{i18n-DwFTw_rF.js → i18n-BF6zkld-.js} +3397 -3461
  65. package/dist/i18n-BF6zkld-.js.br +0 -0
  66. package/dist/i18n-BF6zkld-.js.gz +0 -0
  67. package/dist/polyfill.js +1906 -1641
  68. package/dist/polyfill.js.br +0 -0
  69. package/dist/polyfill.js.gz +0 -0
  70. package/dist/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
  71. package/dist/rolldown-runtime-B0aSnxlc.js.br +0 -0
  72. package/dist/rolldown-runtime-B0aSnxlc.js.gz +5 -0
  73. package/dist/{style-DS_dEN32.js → style-CXIHVW9k.js} +8 -6
  74. package/dist/style-CXIHVW9k.js.br +0 -0
  75. package/dist/style-CXIHVW9k.js.gz +0 -0
  76. package/dist-wix/availability.js +42 -36
  77. package/dist-wix/event.js +32 -25
  78. package/dist-wix/gift-card-validation.js +33 -33
  79. package/dist-wix/gift-card.js +42 -35
  80. package/dist-wix/hotel.js +34 -27
  81. package/package.json +26 -24
  82. package/dist/ActionField-Dtyg_Xqt.js.br +0 -0
  83. package/dist/ActionField-Dtyg_Xqt.js.gz +0 -0
  84. package/dist/AvailabilitySkeleton-6jjgsDUN.js.br +0 -0
  85. package/dist/AvailabilitySkeleton-6jjgsDUN.js.gz +0 -0
  86. package/dist/CheckoutWindow-CUoVKHnQ.js.br +0 -0
  87. package/dist/CheckoutWindow-CUoVKHnQ.js.gz +0 -0
  88. package/dist/ErrorMessage-CeH20mgp.js.br +0 -0
  89. package/dist/ErrorMessage-CeH20mgp.js.gz +0 -0
  90. package/dist/EventAvailabilityForm-CEi0n5w5.js.br +0 -0
  91. package/dist/EventAvailabilityForm-CEi0n5w5.js.gz +0 -0
  92. package/dist/Field-nvWxJ8O5.js.br +0 -0
  93. package/dist/Field-nvWxJ8O5.js.gz +0 -0
  94. package/dist/HotelAvailabilityForm-CmL_Zi12.js +0 -323
  95. package/dist/HotelAvailabilityForm-CmL_Zi12.js.br +0 -0
  96. package/dist/HotelAvailabilityForm-CmL_Zi12.js.gz +0 -0
  97. package/dist/SelectField-DO26J3vV.js.br +0 -0
  98. package/dist/SelectField-DO26J3vV.js.gz +0 -0
  99. package/dist/TermsOfService-1ml1UlRa.js.br +0 -0
  100. package/dist/TermsOfService-1ml1UlRa.js.gz +0 -2
  101. package/dist/_-BfUSBI8s.js.br +0 -0
  102. package/dist/_-BfUSBI8s.js.gz +0 -0
  103. package/dist/dist-DvERnyi9.js.br +0 -0
  104. package/dist/dist-DvERnyi9.js.gz +0 -0
  105. package/dist/dist-UZ0ttnnU.js +0 -1338
  106. package/dist/dist-UZ0ttnnU.js.br +0 -0
  107. package/dist/dist-UZ0ttnnU.js.gz +0 -0
  108. package/dist/giftCard-Cp7GosHw.js.br +0 -0
  109. package/dist/giftCard-Cp7GosHw.js.gz +0 -10
  110. package/dist/i18n-DwFTw_rF.js.br +0 -0
  111. package/dist/i18n-DwFTw_rF.js.gz +0 -0
  112. package/dist/rolldown-runtime-Dqa2HsxW.js.br +0 -0
  113. package/dist/rolldown-runtime-Dqa2HsxW.js.gz +0 -2
  114. package/dist/style-DS_dEN32.js.br +0 -0
  115. package/dist/style-DS_dEN32.js.gz +0 -0
@@ -0,0 +1,324 @@
1
+ import { D as e, E as t, Et as n, J as r, K as ee, N as i, O as a, T as o, Tt as s, a as c, ct as l, d as te, j as u, l as ne, ut as re, v as ie, w as d, yt as f } from "./i18n-BF6zkld-.js";
2
+ import { C as p, E as m, K as ae, N as oe, O as se, S as h, dt as ce, k as le, mt as ue, n as de, r as g, t as fe, v as _ } from "./SelectField-DMU4o8wT.js";
3
+ import { n as v, p as pe } from "./AvailabilitySkeleton-Tv_yaXPa.js";
4
+ //#region src/components/forms/HotelAvailabilityForm.vue?vue&type=script&setup=true&lang.ts
5
+ var me = {
6
+ class: "konnectio-availability-location",
7
+ key: "location"
8
+ }, he = {
9
+ id: "konnectio-availability-date-selection",
10
+ key: "multiDate"
11
+ }, ge = {
12
+ key: 0,
13
+ class: "konnectio-availability-date-selection-multi"
14
+ }, _e = {
15
+ class: "konnectio-availability-room-count",
16
+ key: "room"
17
+ }, ve = {
18
+ class: "konnectio-availability-guest-selection",
19
+ key: "guests"
20
+ }, ye = {
21
+ id: "konnectio-availability-confirmation",
22
+ key: "confirm"
23
+ }, y = /*#__PURE__*/ h(/* @__PURE__ */ i({
24
+ __name: "HotelAvailabilityForm",
25
+ props: {
26
+ booking: {
27
+ type: Boolean,
28
+ default: !1
29
+ },
30
+ link: {},
31
+ selectedLocation: { default: NaN },
32
+ disableDefaultLocation: {
33
+ type: Boolean,
34
+ default: !1
35
+ },
36
+ hideLocations: {
37
+ type: Boolean,
38
+ default: !1
39
+ }
40
+ },
41
+ setup(i) {
42
+ let { t: h } = c(), y = i, b = p(), { adults: be, children: xe, roomCount: Se, arrivalDate: x, departureDate: S, location: C, hasHotelLocations: w, hotelLocations: T, controlLocation: Ce } = ne(p()), E = se(), we = pe(), { display: D } = oe(), { firstSelectableDateOffset: O, lastSelectableDateOffset: k, defaultAdultAmount: A, defaultChildAmount: j, maxAdultAmount: Te, maxChildAmount: Ee, splitBookingCalendar: De, disableCalendarPricesAvailability: M } = ne(m()), { hasChildSelection: N, hasRoomAmountSelection: P } = m(), Oe = () => new Date(new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + O.value)).setHours(12, 0, 0, 0)), ke = () => new Date(new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + O.value + 1)).setHours(12, 0, 0, 0)), Ae = () => y.disableDefaultLocation ? void 0 : Ce.value, F = f(A.value), I = f(j.value), L = f(1), R = f(Oe()), z = f(ke()), B = f(Ae()), V = d({
43
+ get: () => y.booking ? b.adults : F.value,
44
+ set: (e) => {
45
+ y.booking ? be.value = Number(e) : F.value = Number(e);
46
+ }
47
+ }), H = d({
48
+ get: () => y.booking ? b.children : I.value,
49
+ set: (e) => {
50
+ y.booking ? xe.value = Number(e) : I.value = Number(e);
51
+ }
52
+ }), U = d({
53
+ get: () => y.booking ? b.roomCount : L.value,
54
+ set: (e) => {
55
+ y.booking ? Se.value = Number(e) : L.value = Number(e);
56
+ }
57
+ }), W = d({
58
+ get: () => y.booking ? x.value : R.value,
59
+ set: (e) => {
60
+ y.booking ? x.value = e : R.value = e;
61
+ }
62
+ }), G = d({
63
+ get: () => y.booking ? S.value : z.value,
64
+ set: (e) => {
65
+ y.booking ? S.value = e : z.value = e;
66
+ }
67
+ }), K = d({
68
+ get: () => isNaN(y.selectedLocation) ? y.booking ? C.value ?? NaN : B.value ?? NaN : y.selectedLocation,
69
+ set: (e) => {
70
+ y.booking ? C.value = e : B.value = e;
71
+ }
72
+ }), q = d(() => {
73
+ let e = T.value.find(({ id: e }) => e === y.selectedLocation);
74
+ return e ? e.name : "";
75
+ }), J = d(() => w.value && !y.hideLocations), Y = f([]), je = d(() => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate()))), Me = d(() => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + k.value))), Ne = d(() => new Date((/* @__PURE__ */ new Date()).setDate(W.value.getDate() + (k.value + 1)))), X = d(() => V.value !== 0), Pe = d(() => typeof y.link != "string");
76
+ function Z(e) {
77
+ let t = e.getFullYear(), n = e.getMonth() + 1, r = e.getDate();
78
+ return r < 10 && (r = "0" + r), n < 10 && (n = "0" + n), `${t}-${n}-${r}`;
79
+ }
80
+ function Q(e) {
81
+ let t = {
82
+ a: V.value.toString(),
83
+ c: H.value.toString(),
84
+ r: U.value.toString(),
85
+ ci: Z(W.value),
86
+ co: Z(G.value),
87
+ hid: K.value.toString()
88
+ }, n = new URLSearchParams(t), r = new URL(e, window.location.origin);
89
+ r.search = n.toString(), window.location.replace(r.toString());
90
+ }
91
+ function Fe() {
92
+ if (isNaN(K.value) && w.value) {
93
+ D({
94
+ message: h("alert.error.selectHotelId"),
95
+ type: "error"
96
+ });
97
+ return;
98
+ }
99
+ if (isNaN(V.value)) {
100
+ D({
101
+ message: h("alert.error.selectValidAdults"),
102
+ type: "error"
103
+ });
104
+ return;
105
+ }
106
+ if (isNaN(H.value)) {
107
+ D({
108
+ message: h("alert.error.selectValidChildren"),
109
+ type: "error"
110
+ });
111
+ return;
112
+ }
113
+ if (y.booking === !1) {
114
+ if (Pe.value) {
115
+ let e = ae();
116
+ y.link[e] ? Q(y.link[e]) : y.link.en ? Q(y.link.en) : D({
117
+ message: "Module misconfiguration, contact an admin",
118
+ type: "error"
119
+ });
120
+ } else Q(y.link);
121
+ } else X.value && E.fetchAvailabilityData();
122
+ }
123
+ let Ie = ue("history", { removeNullishValues: !0 });
124
+ function $() {
125
+ y.booking && (Ie.ci = Z(W.value), Ie.co = Z(G.value));
126
+ }
127
+ return l(W, (e) => {
128
+ let t = new Date(new Date(e).setDate(new Date(e).getDate() + 1));
129
+ new Date(G.value) < t && (G.value = t), $();
130
+ }), l(G, () => {
131
+ $();
132
+ }), ce(le).on(() => {
133
+ Y.value = [W.value, G.value];
134
+ }), l(Y, (e) => {
135
+ W.value = e[0], G.value = e[1];
136
+ }), l([
137
+ V,
138
+ H,
139
+ K
140
+ ], () => {
141
+ we.clearCache();
142
+ }), ee(() => {
143
+ Y.value = [W.value, G.value];
144
+ }), (ee, c) => (r(), a("form", {
145
+ id: "konnectio-availability-form",
146
+ class: n({ reservation: i.booking }),
147
+ type: "availability",
148
+ onSubmit: ie(Fe, ["prevent"])
149
+ }, [u(te, {
150
+ id: "konnectio-availability-form-content",
151
+ tag: "ul",
152
+ class: n([
153
+ { "is-booking-page": i.booking },
154
+ { "only-adult-guests": !s(N)(K.value) },
155
+ { "all-guests": s(N)(K.value) },
156
+ { "has-location": J.value },
157
+ { "has-room-count": s(P)(K.value) }
158
+ ])
159
+ }, {
160
+ default: re(() => [
161
+ J.value ? (r(), a("li", me, [isNaN(i.selectedLocation) ? (r(), t(fe, {
162
+ key: 1,
163
+ modelValue: K.value,
164
+ "onUpdate:modelValue": c[1] ||= (e) => K.value = e,
165
+ label: s(h)("general.location"),
166
+ placeholder: s(h)("general.locationPlaceholder"),
167
+ icon: "location-dot",
168
+ "icon-type": "fas",
169
+ "icon-placement": "label",
170
+ "label-key": "name",
171
+ "value-key": "id",
172
+ options: s(T),
173
+ searchable: !1
174
+ }, null, 8, [
175
+ "modelValue",
176
+ "label",
177
+ "placeholder",
178
+ "options"
179
+ ])) : (r(), t(de, {
180
+ key: 0,
181
+ modelValue: q.value,
182
+ "onUpdate:modelValue": c[0] ||= (e) => q.value = e,
183
+ label: s(h)("general.location"),
184
+ icon: "location-dot",
185
+ "icon-type": "fas",
186
+ "icon-placement": "label",
187
+ readonly: ""
188
+ }, null, 8, ["modelValue", "label"]))])) : e("", !0),
189
+ o("li", he, [s(De) ? (r(), a("div", ge, [u(v, {
190
+ modelValue: W.value,
191
+ "onUpdate:modelValue": c[2] ||= (e) => W.value = e,
192
+ label: s(h)("availability.arrivalDate"),
193
+ name: "arrivalDate",
194
+ "icon-type": "fas",
195
+ "icon-placement": "label",
196
+ "start-date": W.value,
197
+ "min-date": je.value,
198
+ "max-date": Me.value,
199
+ "show-prices": !s(M),
200
+ "show-availability": !s(M)
201
+ }, null, 8, [
202
+ "modelValue",
203
+ "label",
204
+ "start-date",
205
+ "min-date",
206
+ "max-date",
207
+ "show-prices",
208
+ "show-availability"
209
+ ]), u(v, {
210
+ modelValue: G.value,
211
+ "onUpdate:modelValue": c[3] ||= (e) => G.value = e,
212
+ label: s(h)("availability.departureDate"),
213
+ name: "departureDate",
214
+ "icon-type": "fas",
215
+ "icon-placement": "label",
216
+ "start-date": G.value,
217
+ "min-date": W.value,
218
+ "max-date": Ne.value,
219
+ "show-prices": !s(M),
220
+ "show-availability": !s(M)
221
+ }, null, 8, [
222
+ "modelValue",
223
+ "label",
224
+ "start-date",
225
+ "min-date",
226
+ "max-date",
227
+ "show-prices",
228
+ "show-availability"
229
+ ])])) : (r(), t(v, {
230
+ key: 1,
231
+ modelValue: Y.value,
232
+ "onUpdate:modelValue": c[4] ||= (e) => Y.value = e,
233
+ label: s(h)("availability.checkInOut"),
234
+ "icon-type": "fas",
235
+ "icon-placement": "label",
236
+ "min-range": 1,
237
+ "min-date": je.value,
238
+ "max-date": Ne.value,
239
+ "show-prices": !s(M),
240
+ "show-availability": !s(M),
241
+ range: ""
242
+ }, null, 8, [
243
+ "modelValue",
244
+ "label",
245
+ "min-date",
246
+ "max-date",
247
+ "show-prices",
248
+ "show-availability"
249
+ ]))]),
250
+ s(P)(K.value) ? (r(), a("li", _e, [u(g, {
251
+ modelValue: U.value,
252
+ "onUpdate:modelValue": c[5] ||= (e) => U.value = e,
253
+ label: s(h)("availability.roomCount"),
254
+ "icon-type": "fas",
255
+ "icon-placement": "label",
256
+ name: "roomCount",
257
+ icon: "house",
258
+ "min-value": 1,
259
+ "max-value": 10,
260
+ controls: !0
261
+ }, null, 8, ["modelValue", "label"])])) : e("", !0),
262
+ o("li", ve, [u(g, {
263
+ modelValue: V.value,
264
+ "onUpdate:modelValue": c[6] ||= (e) => V.value = e,
265
+ label: s(h)("availability.adults"),
266
+ description: s(h)("general.adultAgeRange"),
267
+ "icon-type": "fas",
268
+ "icon-placement": "label",
269
+ name: "adults",
270
+ icon: "male",
271
+ "max-value": s(Te),
272
+ placeholder: `${s(A)}`,
273
+ controls: !0
274
+ }, null, 8, [
275
+ "modelValue",
276
+ "label",
277
+ "description",
278
+ "max-value",
279
+ "placeholder"
280
+ ]), s(N)(K.value) ? (r(), t(g, {
281
+ key: 0,
282
+ modelValue: H.value,
283
+ "onUpdate:modelValue": c[7] ||= (e) => H.value = e,
284
+ label: s(h)("availability.children"),
285
+ description: s(h)("general.childAgeRange"),
286
+ "icon-type": "fas",
287
+ "icon-placement": "label",
288
+ name: "children",
289
+ icon: "child",
290
+ "max-value": s(Ee),
291
+ placeholder: `${s(j)}`,
292
+ controls: !0
293
+ }, null, 8, [
294
+ "modelValue",
295
+ "label",
296
+ "description",
297
+ "max-value",
298
+ "placeholder"
299
+ ])) : e("", !0)]),
300
+ o("li", ye, [u(_, {
301
+ class: "konnectio-availability-submit-small",
302
+ type: "submit",
303
+ icon: "search",
304
+ "icon-type": "fas",
305
+ disabled: !X.value,
306
+ "is-loading": s(E).areListingsLoading
307
+ }, null, 8, ["disabled", "is-loading"]), u(_, {
308
+ class: "konnectio-availability-submit-large",
309
+ type: "submit",
310
+ label: s(h)("availability.buttonLabel"),
311
+ disabled: !X.value,
312
+ "is-loading": s(E).areListingsLoading
313
+ }, null, 8, [
314
+ "label",
315
+ "disabled",
316
+ "is-loading"
317
+ ])])
318
+ ]),
319
+ _: 1
320
+ }, 8, ["class"])], 34));
321
+ }
322
+ }), [["__scopeId", "data-v-ef82679e"]]);
323
+ //#endregion
324
+ export { y as t };