@konnectio/core 4.0.16 → 4.0.18

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 (88) hide show
  1. package/dist/ActionField-25ef64cf.js +163 -0
  2. package/dist/ActionField-25ef64cf.js.br +0 -0
  3. package/dist/ActionField-86389dfe.cjs +1 -0
  4. package/dist/AvailabilitySkeleton-3bb4b572.js +200 -0
  5. package/dist/AvailabilitySkeleton-3bb4b572.js.br +0 -0
  6. package/dist/AvailabilitySkeleton-a72464a1.cjs +1 -0
  7. package/dist/{DateField.vue_vue_type_style_index_0_lang-f7e8a940.js → DateField.vue_vue_type_style_index_0_lang-d1a56eb0.js} +707 -701
  8. package/dist/DateField.vue_vue_type_style_index_0_lang-d1a56eb0.js.br +0 -0
  9. package/dist/DateField.vue_vue_type_style_index_0_lang-f99302dc.cjs +5 -0
  10. package/dist/{Field-c0c88ff7.js → Field-03e6b847.js} +5 -5
  11. package/dist/Field-03e6b847.js.br +0 -0
  12. package/dist/{Field-91254e17.cjs → Field-a7c1ed62.cjs} +1 -1
  13. package/dist/NumberField.vue_vue_type_style_index_0_lang-94fa5765.js +194 -0
  14. package/dist/NumberField.vue_vue_type_style_index_0_lang-94fa5765.js.br +0 -0
  15. package/dist/NumberField.vue_vue_type_style_index_0_lang-a779a531.cjs +1 -0
  16. package/dist/SelectField.vue_vue_type_style_index_0_lang-03794d02.cjs +855 -0
  17. package/dist/SelectField.vue_vue_type_style_index_0_lang-51defa22.js +28643 -0
  18. package/dist/SelectField.vue_vue_type_style_index_0_lang-51defa22.js.br +0 -0
  19. package/dist/{ThankYou-266a1340.cjs → ThankYou-3ab29b45.cjs} +2 -2
  20. package/dist/{ThankYou-b353b8e0.js → ThankYou-f4945877.js} +11 -10
  21. package/dist/ThankYou-f4945877.js.br +0 -0
  22. package/dist/{_-f8481bc2.js → _-0787261e.js} +12 -12
  23. package/dist/_-0787261e.js.br +0 -0
  24. package/dist/{_-0a59e9b5.cjs → _-917dcead.cjs} +1 -1
  25. package/dist/{_commonjsHelpers-c5d32002.js → _commonjsHelpers-aeeeeb92.js} +2 -2
  26. package/dist/applyGiftCard-ba1da572.cjs +1 -0
  27. package/dist/applyGiftCard-f2282bd2.js +53 -0
  28. package/dist/applyGiftCard-f2282bd2.js.br +0 -0
  29. package/dist/availability.cjs +2 -2
  30. package/dist/availability.d.ts +2 -0
  31. package/dist/availability.js +66 -58
  32. package/dist/availability.js.br +0 -0
  33. package/dist/components/Clickable.vue.d.ts +1 -1
  34. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +1 -1
  35. package/dist/components/forms/ReservationForm.vue.d.ts +1 -1
  36. package/dist/components/listings/Base.vue.d.ts +1 -1
  37. package/dist/components/listings/Hotel.vue.d.ts +1 -1
  38. package/dist/components/skeletons/HotelSkeleton.vue.d.ts +1 -1
  39. package/dist/entries/availability.d.ts +5 -1
  40. package/dist/event-07ba3a0e.cjs +1 -0
  41. package/dist/{event-1b2cce27.js → event-208206cf.js} +9 -9
  42. package/dist/event-208206cf.js.br +0 -0
  43. package/dist/event.cjs +1 -1
  44. package/dist/event.js +153 -153
  45. package/dist/event.js.br +0 -0
  46. package/dist/gift-card-validation.cjs +1 -1
  47. package/dist/gift-card-validation.js +27 -27
  48. package/dist/gift-card-validation.js.br +0 -0
  49. package/dist/gift-card.cjs +1 -1
  50. package/dist/gift-card.js +38 -38
  51. package/dist/gift-card.js.br +0 -0
  52. package/dist/hotel.cjs +5 -5
  53. package/dist/hotel.js +954 -957
  54. package/dist/hotel.js.br +0 -0
  55. package/dist/{index-1532370f.js → index-5e1ea6f0.js} +1 -2
  56. package/dist/index-5e1ea6f0.js.br +0 -0
  57. package/dist/index-7ef3288b.cjs +1 -0
  58. package/dist/layouts/Availability.vue.d.ts +7 -4
  59. package/dist/polyfill.cjs +1 -1
  60. package/dist/polyfill.js +2 -2
  61. package/dist/polyfill.js.br +0 -0
  62. package/dist/style.css +1 -1
  63. package/dist/style.css.br +0 -0
  64. package/package.json +9 -9
  65. package/dist/ActionField-3450fcba.cjs +0 -1
  66. package/dist/ActionField-c1dc7f3e.js +0 -101
  67. package/dist/ActionField-c1dc7f3e.js.br +0 -0
  68. package/dist/AvailabilitySkeleton-454ad0ec.js +0 -190
  69. package/dist/AvailabilitySkeleton-454ad0ec.js.br +0 -0
  70. package/dist/AvailabilitySkeleton-f0e12cb1.cjs +0 -1
  71. package/dist/DateField.vue_vue_type_style_index_0_lang-4f2f4c47.cjs +0 -5
  72. package/dist/DateField.vue_vue_type_style_index_0_lang-f7e8a940.js.br +0 -0
  73. package/dist/Field-c0c88ff7.js.br +0 -0
  74. package/dist/NumberField.vue_vue_type_script_setup_true_lang-1aefdd0e.cjs +0 -1
  75. package/dist/NumberField.vue_vue_type_script_setup_true_lang-aad02565.js +0 -116
  76. package/dist/NumberField.vue_vue_type_script_setup_true_lang-aad02565.js.br +0 -0
  77. package/dist/SelectField.vue_vue_type_style_index_0_lang-2d4e943b.cjs +0 -802
  78. package/dist/SelectField.vue_vue_type_style_index_0_lang-ab6da587.js +0 -19549
  79. package/dist/SelectField.vue_vue_type_style_index_0_lang-ab6da587.js.br +0 -0
  80. package/dist/TextField-2ccfa48b.cjs +0 -54
  81. package/dist/TextField-45a6d0f3.js +0 -9271
  82. package/dist/TextField-45a6d0f3.js.br +0 -0
  83. package/dist/ThankYou-b353b8e0.js.br +0 -0
  84. package/dist/_-f8481bc2.js.br +0 -0
  85. package/dist/event-0a73d10e.cjs +0 -1
  86. package/dist/event-1b2cce27.js.br +0 -0
  87. package/dist/index-1532370f.js.br +0 -0
  88. package/dist/index-4a6e0dad.cjs +0 -1
package/dist/style.css.br CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konnectio/core",
3
- "version": "4.0.16",
3
+ "version": "4.0.18",
4
4
  "author": "Konnectio <info@freshcase.dk> (https://konnectio.dk)",
5
5
  "homepage": "https://konnectio.dk",
6
6
  "description": "Konnectio Core Frontend Integration.",
@@ -10,10 +10,10 @@
10
10
  ],
11
11
  "exports": {
12
12
  "./availability": "./dist/availability.js",
13
- "./hotel": "./dist/hotel.es.js",
14
- "./event": "./dist/event.es.js",
15
- "./gift-card": "./dist/gift-card.es.js",
16
- "./gift-card-validation": "./dist/gift-card-validation.es.js"
13
+ "./hotel": "./dist/hotel.js",
14
+ "./event": "./dist/event.js",
15
+ "./gift-card": "./dist/gift-card.js",
16
+ "./gift-card-validation": "./dist/gift-card-validation.js"
17
17
  },
18
18
  "scripts": {
19
19
  "dev": "vite",
@@ -39,8 +39,8 @@
39
39
  "@unhead/vue": "1.8.3",
40
40
  "@vuepic/vue-datepicker": "7.2.2",
41
41
  "@vueup/vue-quill": "1.2.0",
42
- "@vueuse/core": "10.5.0",
43
- "axios": "1.6.0",
42
+ "@vueuse/core": "10.6.0",
43
+ "axios": "1.6.1",
44
44
  "core-js": "3.33.2",
45
45
  "cqfill": "0.6.1",
46
46
  "dotenv": "16.3.1",
@@ -66,11 +66,11 @@
66
66
  "@types/node": "20.9.0",
67
67
  "@typescript-eslint/eslint-plugin": "6.10.0",
68
68
  "@typescript-eslint/parser": "6.10.0",
69
- "@vitejs/plugin-vue": "4.4.0",
69
+ "@vitejs/plugin-vue": "4.4.1",
70
70
  "@vue/eslint-config-typescript": "12.0.0",
71
71
  "@vue/test-utils": "2.4.1",
72
72
  "cross-env": "7.0.3",
73
- "cypress": "13.4.0",
73
+ "cypress": "13.5.0",
74
74
  "eslint": "8.53.0",
75
75
  "eslint-plugin-vue": "9.18.1",
76
76
  "rollup-plugin-typescript2": "0.36.0",
@@ -1 +0,0 @@
1
- "use strict";const l=require("./SelectField.vue_vue_type_style_index_0_lang-2d4e943b.cjs"),m=require("./TextField-2ccfa48b.cjs"),y=require("./NumberField.vue_vue_type_script_setup_true_lang-1aefdd0e.cjs"),b={class:"fresh-booking-action-field"},f=l.defineComponent({__name:"ActionField",props:{modelValue:{},label:{},buttonLabel:{},buttonIcon:{},buttonIconColor:{},buttonDisabled:{type:Boolean,default:!1},secondary:{type:Boolean,default:!1},name:{},id:{},type:{default:"text"},placeholder:{},icon:{},iconType:{default:"fal"},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},data:{},action:{},minValue:{},maxValue:{},isLoading:{type:Boolean,default:!1}},emits:["update:modelValue","action"],setup(s,{emit:p}){const i=p,t=s,a=t.id||l.ranId();function u(e){i("update:modelValue",e)}const d=l.computed({get:()=>t.modelValue,set:e=>u(e)}),r=l.computed({get:()=>t.modelValue,set:e=>u(e)});function c(){i("action")}return(e,o)=>(l.openBlock(),l.createBlock(l.InputField,{label:e.label,id:l.unref(a),icon:e.icon,"icon-type":e.iconType,required:e.required,type:e.type,readonly:e.readonly},{default:l.withCtx(()=>[l.createBaseVNode("div",b,[e.type==="dropdown"&&e.data?(l.openBlock(),l.createBlock(l._sfc_main,{key:0,modelValue:d.value,"onUpdate:modelValue":o[0]||(o[0]=n=>d.value=n),id:l.unref(a),options:e.data,name:e.name,required:e.required,placeholder:e.placeholder},null,8,["modelValue","id","options","name","required","placeholder"])):e.type==="number"?(l.openBlock(),l.createBlock(y._sfc_main,{key:1,modelValue:r.value,"onUpdate:modelValue":o[1]||(o[1]=n=>r.value=n),id:l.unref(a),"min-value":e.minValue,"max-value":e.maxValue},null,8,["modelValue","id","min-value","max-value"])):(l.openBlock(),l.createBlock(m.TextField,{key:2,modelValue:d.value,"onUpdate:modelValue":o[2]||(o[2]=n=>d.value=n),id:l.unref(a),name:e.name,required:e.required,placeholder:e.placeholder},null,8,["modelValue","id","name","required","placeholder"])),l.createVNode(l.Clickable,{"data-test":`${e.name}Submit`,icon:e.buttonIcon,label:e.buttonLabel,"icon-color":e.buttonIconColor,styling:e.action,type:"button","is-loading":e.isLoading,disabled:e.buttonDisabled,secondary:e.secondary,onClickEvent:o[3]||(o[3]=n=>c())},null,8,["data-test","icon","label","icon-color","styling","is-loading","disabled","secondary"])])]),_:1},8,["label","id","icon","icon-type","required","type","readonly"]))}});const V=l._export_sfc(f,[["__scopeId","data-v-07d4466b"]]);exports.ActionField=V;
@@ -1,101 +0,0 @@
1
- import { h as f, j as V, c as p, k as d, l as i, w as v, x as g, y as q, n as t, m as k, C as B, I, _ as C } from "./SelectField.vue_vue_type_style_index_0_lang-ab6da587.js";
2
- import { T as F } from "./TextField-45a6d0f3.js";
3
- import { _ as A } from "./NumberField.vue_vue_type_script_setup_true_lang-aad02565.js";
4
- const h = { class: "fresh-booking-action-field" }, L = /* @__PURE__ */ f({
5
- __name: "ActionField",
6
- props: {
7
- modelValue: {},
8
- label: {},
9
- buttonLabel: {},
10
- buttonIcon: {},
11
- buttonIconColor: {},
12
- buttonDisabled: { type: Boolean, default: !1 },
13
- secondary: { type: Boolean, default: !1 },
14
- name: {},
15
- id: {},
16
- type: { default: "text" },
17
- placeholder: {},
18
- icon: {},
19
- iconType: { default: "fal" },
20
- required: { type: Boolean, default: !1 },
21
- readonly: { type: Boolean, default: !1 },
22
- data: {},
23
- action: {},
24
- minValue: {},
25
- maxValue: {},
26
- isLoading: { type: Boolean, default: !1 }
27
- },
28
- emits: ["update:modelValue", "action"],
29
- setup(y, { emit: b }) {
30
- const s = b, u = y, o = u.id || V();
31
- function r(e) {
32
- s("update:modelValue", e);
33
- }
34
- const n = p({
35
- get: () => u.modelValue,
36
- set: (e) => r(e)
37
- }), m = p({
38
- get: () => u.modelValue,
39
- set: (e) => r(e)
40
- });
41
- function c() {
42
- s("action");
43
- }
44
- return (e, a) => (d(), i(I, {
45
- label: e.label,
46
- id: t(o),
47
- icon: e.icon,
48
- "icon-type": e.iconType,
49
- required: e.required,
50
- type: e.type,
51
- readonly: e.readonly
52
- }, {
53
- default: v(() => [
54
- g("div", h, [
55
- e.type === "dropdown" && e.data ? (d(), i(q, {
56
- key: 0,
57
- modelValue: n.value,
58
- "onUpdate:modelValue": a[0] || (a[0] = (l) => n.value = l),
59
- id: t(o),
60
- options: e.data,
61
- name: e.name,
62
- required: e.required,
63
- placeholder: e.placeholder
64
- }, null, 8, ["modelValue", "id", "options", "name", "required", "placeholder"])) : e.type === "number" ? (d(), i(A, {
65
- key: 1,
66
- modelValue: m.value,
67
- "onUpdate:modelValue": a[1] || (a[1] = (l) => m.value = l),
68
- id: t(o),
69
- "min-value": e.minValue,
70
- "max-value": e.maxValue
71
- }, null, 8, ["modelValue", "id", "min-value", "max-value"])) : (d(), i(F, {
72
- key: 2,
73
- modelValue: n.value,
74
- "onUpdate:modelValue": a[2] || (a[2] = (l) => n.value = l),
75
- id: t(o),
76
- name: e.name,
77
- required: e.required,
78
- placeholder: e.placeholder
79
- }, null, 8, ["modelValue", "id", "name", "required", "placeholder"])),
80
- k(B, {
81
- "data-test": `${e.name}Submit`,
82
- icon: e.buttonIcon,
83
- label: e.buttonLabel,
84
- "icon-color": e.buttonIconColor,
85
- styling: e.action,
86
- type: "button",
87
- "is-loading": e.isLoading,
88
- disabled: e.buttonDisabled,
89
- secondary: e.secondary,
90
- onClickEvent: a[3] || (a[3] = (l) => c())
91
- }, null, 8, ["data-test", "icon", "label", "icon-color", "styling", "is-loading", "disabled", "secondary"])
92
- ])
93
- ]),
94
- _: 1
95
- }, 8, ["label", "id", "icon", "icon-type", "required", "type", "readonly"]));
96
- }
97
- });
98
- const U = /* @__PURE__ */ C(L, [["__scopeId", "data-v-07d4466b"]]);
99
- export {
100
- U as A
101
- };
Binary file
@@ -1,190 +0,0 @@
1
- import { h as $, r as I, a as O, k as i, q as b, a8 as G, H as J, z as K, s as w, c as y, a0 as F, o as P, l as k, w as Q, n as e, y as W, B as V, t as p, x, m as l, C as X, v as H, _ as q } from "./SelectField.vue_vue_type_style_index_0_lang-ab6da587.js";
2
- import { u as L, a as R, _ as Y } from "./DateField.vue_vue_type_style_index_0_lang-f7e8a940.js";
3
- import { _ as E } from "./NumberField.vue_vue_type_script_setup_true_lang-aad02565.js";
4
- import { E as N } from "./_-f8481bc2.js";
5
- import { F as v } from "./Field-c0c88ff7.js";
6
- const Z = ["onSubmit"], ee = /* @__PURE__ */ $({
7
- __name: "_",
8
- props: {
9
- type: { default: "submit" }
10
- },
11
- emits: ["submit"],
12
- setup(D, { emit: t }) {
13
- const o = I(!1), c = t, f = D, { verifyRecaptcha: r } = O();
14
- function d() {
15
- o.value = !0, r({
16
- callback: _,
17
- type: f.type
18
- }).then(() => o.value = !1);
19
- }
20
- function _() {
21
- c("submit");
22
- }
23
- return (g, A) => (i(), b("form", {
24
- onSubmit: J(d, ["prevent"])
25
- }, [
26
- G(g.$slots, "default", { isLoading: o.value })
27
- ], 40, Z));
28
- }
29
- }), ae = { id: "fresh-booking-availability-date-selection" }, te = {
30
- key: 0,
31
- id: "fresh-booking-availability-guest-selection"
32
- }, le = { id: "fresh-booking-availability-confirmation" }, ie = /* @__PURE__ */ $({
33
- __name: "HotelAvailabilityForm",
34
- props: {
35
- booking: { type: Boolean, default: !1 },
36
- link: {}
37
- },
38
- setup(D) {
39
- const { t } = K(), o = D, {
40
- adults: c,
41
- children: f,
42
- arrivalDate: r,
43
- departureDate: d,
44
- location: _,
45
- isExpired: g
46
- } = w(L()), { reset: A } = L(), { fetchAvailabilityData: z } = R(), { areListingsLoading: M, hotelList: S } = w(R()), {
47
- firstSelectableDateOffset: B,
48
- lastSelectableDateOffset: C,
49
- disableChildSelection: m,
50
- disableAdultSelection: u
51
- } = w(O()), h = I([]), ce = y(() => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + (B.value - 1)))), de = y(() => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + C.value))), me = y(() => new Date((/* @__PURE__ */ new Date()).setDate(r.value.getDate() + B.value))), ve = y(() => new Date((/* @__PURE__ */ new Date()).setDate(r.value.getDate() + (C.value + 1)))), U = y(() => !(!u && c.value === 0));
52
- function T() {
53
- o.booking === !1 ? window.location.replace(o.link) : U.value && z();
54
- }
55
- return F(r, (s) => {
56
- const a = new Date(new Date(s).setDate(new Date(s).getDate() + 1));
57
- new Date(d.value) < a && (d.value = a);
58
- }), F(h, (s) => {
59
- r.value = s[0], d.value = s[1];
60
- }), P(() => {
61
- g.value && o.booking && A(), h.value = [r.value, d.value];
62
- }), (s, a) => (i(), k(ee, {
63
- id: "konnectio-availability-form",
64
- class: H({ reservation: s.booking }),
65
- type: "availability",
66
- onSubmit: T
67
- }, {
68
- default: Q(({ isLoading: j }) => [
69
- e(S) ? (i(), k(W, {
70
- key: 0,
71
- modelValue: e(_),
72
- "onUpdate:modelValue": a[0] || (a[0] = (n) => V(_) ? _.value = n : null),
73
- label: e(t)("general.location"),
74
- icon: "location-dot",
75
- "icon-type": "fas",
76
- "icon-placement": "label",
77
- options: e(S),
78
- searchable: !1,
79
- style: { marginBottom: "15px" }
80
- }, null, 8, ["modelValue", "label", "options"])) : p("", !0),
81
- x("ul", {
82
- id: "konnectio-availability-form-content",
83
- class: H([
84
- { "is-not-booking-page": !s.booking },
85
- { "only-adult-guests": !e(u) && e(m) },
86
- { "only-child-guests": !e(m) && e(u) },
87
- { "no-guests": e(u) && e(m) },
88
- { "all-guests": !e(u) && !e(m) }
89
- ])
90
- }, [
91
- x("li", ae, [
92
- l(Y, {
93
- modelValue: h.value,
94
- "onUpdate:modelValue": a[1] || (a[1] = (n) => h.value = n),
95
- label: e(t)("availability.checkInOut"),
96
- "icon-type": "fas",
97
- "icon-placement": "label",
98
- "min-range": 1,
99
- range: ""
100
- }, null, 8, ["modelValue", "label"]),
101
- p("", !0)
102
- ]),
103
- !e(u) || !e(m) ? (i(), b("li", te, [
104
- e(u) ? p("", !0) : (i(), k(E, {
105
- key: 0,
106
- modelValue: e(c),
107
- "onUpdate:modelValue": a[4] || (a[4] = (n) => V(c) ? c.value = n : null),
108
- label: e(t)("availability.adults"),
109
- "icon-type": "fas",
110
- "icon-placement": "label",
111
- name: "adults",
112
- icon: "male"
113
- }, null, 8, ["modelValue", "label"])),
114
- e(m) ? p("", !0) : (i(), k(E, {
115
- key: 1,
116
- modelValue: e(f),
117
- "onUpdate:modelValue": a[5] || (a[5] = (n) => V(f) ? f.value = n : null),
118
- label: e(t)("availability.children"),
119
- "icon-type": "fas",
120
- "icon-placement": "label",
121
- name: "children",
122
- icon: "child"
123
- }, null, 8, ["modelValue", "label"]))
124
- ])) : p("", !0),
125
- x("li", le, [
126
- l(X, {
127
- type: "submit",
128
- label: e(t)("availability.buttonLabel"),
129
- disabled: !U.value,
130
- "is-loading": e(M) || j
131
- }, null, 8, ["label", "disabled", "is-loading"])
132
- ])
133
- ], 2)
134
- ]),
135
- _: 1
136
- }, 8, ["class"]));
137
- }
138
- });
139
- const De = /* @__PURE__ */ q(ie, [["__scopeId", "data-v-de473a43"]]), ne = { class: "availability-skeleton" }, oe = {
140
- key: 0,
141
- class: "availability-skeleton-navigation"
142
- }, se = {
143
- key: 1,
144
- class: "availability-skeleton-hotel"
145
- }, re = {
146
- key: 2,
147
- class: "availability-skeleton-event"
148
- }, ue = /* @__PURE__ */ $({
149
- __name: "AvailabilitySkeleton",
150
- props: {
151
- view: { default: "hotel" }
152
- },
153
- setup(D) {
154
- return (t, o) => (i(), b("div", ne, [
155
- t.view === "both" ? (i(), b("div", oe, [
156
- l(N, {
157
- height: "28px",
158
- width: "60px",
159
- "border-radius": "20px"
160
- }),
161
- l(N, {
162
- height: "28px",
163
- width: "60px",
164
- "border-radius": "20px"
165
- })
166
- ])) : p("", !0),
167
- t.view !== "event" ? (i(), b("div", se, [
168
- l(v, { "with-icon": "" }),
169
- l(v, { "with-icon": "" }),
170
- l(v, { "with-icon": "" }),
171
- l(v, {
172
- "with-icon": "",
173
- "no-label": ""
174
- })
175
- ])) : (i(), b("div", re, [
176
- l(v, { "with-icon": "" }),
177
- l(v, {
178
- "with-icon": "",
179
- "no-label": ""
180
- })
181
- ]))
182
- ]));
183
- }
184
- });
185
- const he = /* @__PURE__ */ q(ue, [["__scopeId", "data-v-c266ccbc"]]);
186
- export {
187
- he as A,
188
- De as H,
189
- ee as _
190
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-2d4e943b.cjs"),m=require("./DateField.vue_vue_type_style_index_0_lang-4f2f4c47.cjs"),V=require("./NumberField.vue_vue_type_script_setup_true_lang-1aefdd0e.cjs"),x=require("./_-0a59e9b5.cjs"),_=require("./Field-91254e17.cjs"),A=["onSubmit"],w=e.defineComponent({__name:"_",props:{type:{default:"submit"}},emits:["submit"],setup(p,{emit:a}){const n=e.ref(!1),s=a,d=p,{verifyRecaptcha:o}=e.useUtilityStore();function r(){n.value=!0,o({callback:v,type:d.type}).then(()=>n.value=!1)}function v(){s("submit")}return(y,b)=>(e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(r,["prevent"])},[e.renderSlot(y.$slots,"default",{isLoading:n.value})],40,A))}}),C={id:"fresh-booking-availability-date-selection"},$={key:0,id:"fresh-booking-availability-guest-selection"},E={id:"fresh-booking-availability-confirmation"},R=e.defineComponent({__name:"HotelAvailabilityForm",props:{booking:{type:Boolean,default:!1},link:{}},setup(p){const{t:a}=e.useI18n(),n=p,{adults:s,children:d,arrivalDate:o,departureDate:r,location:v,isExpired:y}=e.storeToRefs(m.useAvailabilityStore()),{reset:b}=m.useAvailabilityStore(),{fetchAvailabilityData:S}=m.useHotelStore(),{areListingsLoading:F,hotelList:D}=e.storeToRefs(m.useHotelStore()),{firstSelectableDateOffset:k,lastSelectableDateOffset:g,disableChildSelection:c,disableAdultSelection:u}=e.storeToRefs(e.useUtilityStore()),f=e.ref([]),z=e.computed(()=>new Date(new Date().setDate(new Date().getDate()+(k.value-1)))),M=e.computed(()=>new Date(new Date().setDate(new Date().getDate()+g.value))),j=e.computed(()=>new Date(new Date().setDate(o.value.getDate()+k.value))),G=e.computed(()=>new Date(new Date().setDate(o.value.getDate()+(g.value+1)))),h=e.computed(()=>!(!u&&s.value===0));function B(){n.booking===!1?window.location.replace(n.link):h.value&&S()}return e.watch(o,i=>{const t=new Date(new Date(i).setDate(new Date(i).getDate()+1));new Date(r.value)<t&&(r.value=t)}),e.watch(f,i=>{o.value=i[0],r.value=i[1]}),e.onMounted(()=>{y.value&&n.booking&&b(),f.value=[o.value,r.value]}),(i,t)=>(e.openBlock(),e.createBlock(w,{id:"konnectio-availability-form",class:e.normalizeClass({reservation:i.booking}),type:"availability",onSubmit:B},{default:e.withCtx(({isLoading:N})=>[e.unref(D)?(e.openBlock(),e.createBlock(e._sfc_main,{key:0,modelValue:e.unref(v),"onUpdate:modelValue":t[0]||(t[0]=l=>e.isRef(v)?v.value=l:null),label:e.unref(a)("general.location"),icon:"location-dot","icon-type":"fas","icon-placement":"label",options:e.unref(D),searchable:!1,style:{marginBottom:"15px"}},null,8,["modelValue","label","options"])):e.createCommentVNode("",!0),e.createBaseVNode("ul",{id:"konnectio-availability-form-content",class:e.normalizeClass([{"is-not-booking-page":!i.booking},{"only-adult-guests":!e.unref(u)&&e.unref(c)},{"only-child-guests":!e.unref(c)&&e.unref(u)},{"no-guests":e.unref(u)&&e.unref(c)},{"all-guests":!e.unref(u)&&!e.unref(c)}])},[e.createBaseVNode("li",C,[e.createVNode(m._sfc_main,{modelValue:f.value,"onUpdate:modelValue":t[1]||(t[1]=l=>f.value=l),label:e.unref(a)("availability.checkInOut"),"icon-type":"fas","icon-placement":"label","min-range":1,range:""},null,8,["modelValue","label"]),e.createCommentVNode("",!0)]),!e.unref(u)||!e.unref(c)?(e.openBlock(),e.createElementBlock("li",$,[e.unref(u)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(V._sfc_main,{key:0,modelValue:e.unref(s),"onUpdate:modelValue":t[4]||(t[4]=l=>e.isRef(s)?s.value=l:null),label:e.unref(a)("availability.adults"),"icon-type":"fas","icon-placement":"label",name:"adults",icon:"male"},null,8,["modelValue","label"])),e.unref(c)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(V._sfc_main,{key:1,modelValue:e.unref(d),"onUpdate:modelValue":t[5]||(t[5]=l=>e.isRef(d)?d.value=l:null),label:e.unref(a)("availability.children"),"icon-type":"fas","icon-placement":"label",name:"children",icon:"child"},null,8,["modelValue","label"]))])):e.createCommentVNode("",!0),e.createBaseVNode("li",E,[e.createVNode(e.Clickable,{type:"submit",label:e.unref(a)("availability.buttonLabel"),disabled:!h.value,"is-loading":e.unref(F)||N},null,8,["label","disabled","is-loading"])])],2)]),_:1},8,["class"]))}});const U=e._export_sfc(R,[["__scopeId","data-v-de473a43"]]),q={class:"availability-skeleton"},H={key:0,class:"availability-skeleton-navigation"},L={key:1,class:"availability-skeleton-hotel"},I={key:2,class:"availability-skeleton-event"},O=e.defineComponent({__name:"AvailabilitySkeleton",props:{view:{default:"hotel"}},setup(p){return(a,n)=>(e.openBlock(),e.createElementBlock("div",q,[a.view==="both"?(e.openBlock(),e.createElementBlock("div",H,[e.createVNode(x.Element,{height:"28px",width:"60px","border-radius":"20px"}),e.createVNode(x.Element,{height:"28px",width:"60px","border-radius":"20px"})])):e.createCommentVNode("",!0),a.view!=="event"?(e.openBlock(),e.createElementBlock("div",L,[e.createVNode(_.Field,{"with-icon":""}),e.createVNode(_.Field,{"with-icon":""}),e.createVNode(_.Field,{"with-icon":""}),e.createVNode(_.Field,{"with-icon":"","no-label":""})])):(e.openBlock(),e.createElementBlock("div",I,[e.createVNode(_.Field,{"with-icon":""}),e.createVNode(_.Field,{"with-icon":"","no-label":""})]))]))}});const T=e._export_sfc(O,[["__scopeId","data-v-c266ccbc"]]);exports.AvailabilitySkeleton=T;exports.HotelAvailabilityForm=U;exports._sfc_main=w;