@konnectio/core 4.8.2 → 4.8.4

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