@konnectio/core 4.0.17 → 4.0.19

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 (90) hide show
  1. package/dist/ActionField-4cb5a734.js +100 -0
  2. package/dist/ActionField-4cb5a734.js.br +0 -0
  3. package/dist/ActionField-656d204b.cjs +1 -0
  4. package/dist/AvailabilitySkeleton-00f7fc68.js +223 -0
  5. package/dist/AvailabilitySkeleton-00f7fc68.js.br +0 -0
  6. package/dist/AvailabilitySkeleton-8fc17074.cjs +1 -0
  7. package/dist/{DateField.vue_vue_type_style_index_0_lang-d5a1efd5.js → DateField.vue_vue_type_style_index_0_lang-36b7ee9e.js} +2323 -2323
  8. package/dist/DateField.vue_vue_type_style_index_0_lang-36b7ee9e.js.br +0 -0
  9. package/dist/DateField.vue_vue_type_style_index_0_lang-ef9c83d6.cjs +5 -0
  10. package/dist/Field-4283160f.cjs +1 -0
  11. package/dist/{Field-7137ef85.js → Field-e1af1bbc.js} +11 -12
  12. package/dist/Field-e1af1bbc.js.br +0 -0
  13. package/dist/NumberField.vue_vue_type_script_setup_true_lang-a517b062.cjs +1 -0
  14. package/dist/NumberField.vue_vue_type_script_setup_true_lang-eb9876fc.js +116 -0
  15. package/dist/NumberField.vue_vue_type_script_setup_true_lang-eb9876fc.js.br +0 -0
  16. package/dist/SelectField.vue_vue_type_style_index_0_lang-1c999286.js +28840 -0
  17. package/dist/SelectField.vue_vue_type_style_index_0_lang-1c999286.js.br +0 -0
  18. package/dist/SelectField.vue_vue_type_style_index_0_lang-af7c016a.cjs +855 -0
  19. package/dist/ThankYou-01175a37.cjs +54 -0
  20. package/dist/{ThankYou-433bd249.js → ThankYou-0860a0ab.js} +436 -430
  21. package/dist/ThankYou-0860a0ab.js.br +0 -0
  22. package/dist/{_-048b5217.js → _-6db0e1a4.js} +16 -17
  23. package/dist/_-6db0e1a4.js.br +0 -0
  24. package/dist/_-b5842a21.cjs +1 -0
  25. package/dist/_commonjsHelpers-6763f629.cjs +1 -0
  26. package/dist/_commonjsHelpers-aeeeeb92.js +30 -0
  27. package/dist/assets/typescript/mixins.d.ts +1 -0
  28. package/dist/availability.cjs +2 -2
  29. package/dist/availability.js +30 -31
  30. package/dist/availability.js.br +0 -0
  31. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +1 -1
  32. package/dist/components/forms/MultiStepForm.vue.d.ts +1 -1
  33. package/dist/components/forms/ReservationForm.vue.d.ts +1 -1
  34. package/dist/components/listings/Base.vue.d.ts +1 -1
  35. package/dist/components/listings/Hotel.vue.d.ts +1 -1
  36. package/dist/{event-3ef40faf.js → event-52fce8cc.js} +29 -30
  37. package/dist/event-52fce8cc.js.br +0 -0
  38. package/dist/event-c717dc05.cjs +1 -0
  39. package/dist/event.cjs +1 -1
  40. package/dist/event.js +233 -235
  41. package/dist/event.js.br +0 -0
  42. package/dist/gift-card-validation.cjs +1 -1
  43. package/dist/gift-card-validation.js +53 -55
  44. package/dist/gift-card-validation.js.br +0 -0
  45. package/dist/gift-card.cjs +1 -1
  46. package/dist/gift-card.js +186 -188
  47. package/dist/gift-card.js.br +0 -0
  48. package/dist/hotel.cjs +5 -5
  49. package/dist/hotel.js +1462 -1328
  50. package/dist/hotel.js.br +0 -0
  51. package/dist/{index-36d9ed45.js → index-4aff7f4e.js} +14 -16
  52. package/dist/index-4aff7f4e.js.br +0 -0
  53. package/dist/index-5d223c1a.cjs +1 -0
  54. package/dist/polyfill.cjs +2 -2
  55. package/dist/polyfill.js +2 -2
  56. package/dist/polyfill.js.br +0 -0
  57. package/dist/store/hotel.d.ts +4 -1
  58. package/dist/style.css +1 -1
  59. package/dist/style.css.br +0 -0
  60. package/dist/types/index.d.ts +1 -0
  61. package/package.json +1 -1
  62. package/dist/ActionField-3184bffd.cjs +0 -1
  63. package/dist/ActionField-82ef422e.js +0 -164
  64. package/dist/ActionField-82ef422e.js.br +0 -0
  65. package/dist/AvailabilitySkeleton-528d40ef.cjs +0 -1
  66. package/dist/AvailabilitySkeleton-ec092c09.js +0 -203
  67. package/dist/AvailabilitySkeleton-ec092c09.js.br +0 -0
  68. package/dist/DateField.vue_vue_type_style_index_0_lang-5692c5b2.cjs +0 -5
  69. package/dist/DateField.vue_vue_type_style_index_0_lang-d5a1efd5.js.br +0 -0
  70. package/dist/Field-7137ef85.js.br +0 -0
  71. package/dist/Field-b1690485.cjs +0 -1
  72. package/dist/NumberField.vue_vue_type_style_index_0_lang-8c28c1dd.cjs +0 -1
  73. package/dist/NumberField.vue_vue_type_style_index_0_lang-eebde8cd.js +0 -194
  74. package/dist/NumberField.vue_vue_type_style_index_0_lang-eebde8cd.js.br +0 -0
  75. package/dist/SelectField.vue_vue_type_style_index_0_lang-5e1192e9.js +0 -19741
  76. package/dist/SelectField.vue_vue_type_style_index_0_lang-5e1192e9.js.br +0 -0
  77. package/dist/SelectField.vue_vue_type_style_index_0_lang-c0715ca3.cjs +0 -850
  78. package/dist/ThankYou-433bd249.js.br +0 -0
  79. package/dist/ThankYou-817b93d0.cjs +0 -54
  80. package/dist/_-048b5217.js.br +0 -0
  81. package/dist/_-120d9090.cjs +0 -1
  82. package/dist/_commonjsHelpers-10dfc225.js +0 -8
  83. package/dist/_commonjsHelpers-87b0abe8.cjs +0 -1
  84. package/dist/applyGiftCard-45cf782e.js +0 -54
  85. package/dist/applyGiftCard-45cf782e.js.br +0 -0
  86. package/dist/applyGiftCard-f1b620cc.cjs +0 -1
  87. package/dist/event-3ef40faf.js.br +0 -0
  88. package/dist/event-d531df9d.cjs +0 -1
  89. package/dist/index-36d9ed45.js.br +0 -0
  90. package/dist/index-8309eba2.cjs +0 -1
package/dist/style.css.br CHANGED
Binary file
@@ -28,6 +28,7 @@ export interface KonnectioStyling {
28
28
  labelPadding?: string;
29
29
  labelFontSize?: string;
30
30
  linkColor?: string;
31
+ linkHoverColor?: string;
31
32
  loadingColor?: string;
32
33
  panelBackground?: string;
33
34
  panelBorder?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konnectio/core",
3
- "version": "4.0.17",
3
+ "version": "4.0.19",
4
4
  "author": "Konnectio <info@freshcase.dk> (https://konnectio.dk)",
5
5
  "homepage": "https://konnectio.dk",
6
6
  "description": "Konnectio Core Frontend Integration.",
@@ -1 +0,0 @@
1
- "use strict";const l=require("vue"),a=require("./SelectField.vue_vue_type_style_index_0_lang-c0715ca3.cjs"),y=require("./NumberField.vue_vue_type_style_index_0_lang-8c28c1dd.cjs"),c=l.defineComponent({__name:"NumberField",props:{modelValue:{default:0},minValue:{default:0},maxValue:{default:1/0},inputtable:{type:Boolean,default:!0},label:{},placeholder:{},icon:{},iconColor:{},iconType:{default:"fal"},iconPlacement:{},step:{default:1},controls:{type:Boolean,default:!0},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},id:{},rounded:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},small:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(p,{emit:s}){const r=s,d=p,i=d.id||a.ranId();function u(o){r("update:modelValue",o)}return l.onMounted(()=>{d.modelValue||u(d.minValue)}),(o,m)=>(l.openBlock(),l.createBlock(a.InputField,{label:o.label,id:l.unref(i),icon:o.icon,"icon-color":o.iconColor,"icon-type":o.iconType,"icon-placement":o.iconPlacement,required:o.required,type:o.small?"fresh-booking-number-picker small":"fresh-booking-number-picker",readonly:o.readonly},{default:l.withCtx(()=>[l.createVNode(l.unref(y.script),{attrs:{id:l.unref(i)},modelValue:o.modelValue,min:o.minValue,max:o.maxValue,step:o.step,inline:o.inline,controls:o.controls,placeholder:o.placeholder,readonly:o.readonly,inputtable:o.inputtable,rounded:o.rounded,disabled:o.disabled,"onUpdate:modelValue":u},null,8,["attrs","modelValue","min","max","step","inline","controls","placeholder","readonly","inputtable","rounded","disabled"])]),_:1},8,["label","id","icon","icon-color","icon-type","icon-placement","required","type","readonly"]))}}),b={class:"fresh-booking-action-field"},V=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(p,{emit:s}){const r=s,d=p,i=d.id||a.ranId();function u(e){r("update:modelValue",e)}const o=l.computed({get:()=>d.modelValue,set:e=>u(e)}),m=l.computed({get:()=>d.modelValue,set:e=>u(e)});function f(){r("action")}return(e,n)=>(l.openBlock(),l.createBlock(a.InputField,{label:e.label,id:l.unref(i),icon:e.icon,"icon-type":e.iconType,required:e.required,type:e.type,readonly:e.readonly},{default:l.withCtx(()=>[l.createElementVNode("div",b,[e.type==="dropdown"&&e.data?(l.openBlock(),l.createBlock(a._sfc_main$1,{key:0,modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=t=>o.value=t),id:l.unref(i),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(c,{key:1,modelValue:m.value,"onUpdate:modelValue":n[1]||(n[1]=t=>m.value=t),id:l.unref(i),"min-value":e.minValue,"max-value":e.maxValue},null,8,["modelValue","id","min-value","max-value"])):(l.openBlock(),l.createBlock(a.TextField,{key:2,modelValue:o.value,"onUpdate:modelValue":n[2]||(n[2]=t=>o.value=t),id:l.unref(i),name:e.name,required:e.required,placeholder:e.placeholder},null,8,["modelValue","id","name","required","placeholder"])),l.createVNode(a.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:n[3]||(n[3]=t=>f())},null,8,["data-test","icon","label","icon-color","styling","is-loading","disabled","secondary"])])]),_:1},8,["label","id","icon","icon-type","required","type","readonly"]))}});const B=a._export_sfc(V,[["__scopeId","data-v-07d4466b"]]);exports.ActionField=B;exports._sfc_main=c;
@@ -1,164 +0,0 @@
1
- import { defineComponent as c, onMounted as g, openBlock as u, createBlock as r, unref as d, withCtx as b, createVNode as V, computed as y, createElementVNode as k } from "vue";
2
- import { r as v, n as B, o as h, T as C, C as I, _ as F } from "./SelectField.vue_vue_type_style_index_0_lang-5e1192e9.js";
3
- import { s as T } from "./NumberField.vue_vue_type_style_index_0_lang-eebde8cd.js";
4
- const A = /* @__PURE__ */ c({
5
- __name: "NumberField",
6
- props: {
7
- modelValue: { default: 0 },
8
- minValue: { default: 0 },
9
- maxValue: { default: 1 / 0 },
10
- inputtable: { type: Boolean, default: !0 },
11
- label: {},
12
- placeholder: {},
13
- icon: {},
14
- iconColor: {},
15
- iconType: { default: "fal" },
16
- iconPlacement: {},
17
- step: { default: 1 },
18
- controls: { type: Boolean, default: !0 },
19
- required: { type: Boolean, default: !1 },
20
- readonly: { type: Boolean, default: !1 },
21
- inline: { type: Boolean, default: !1 },
22
- id: {},
23
- rounded: { type: Boolean, default: !1 },
24
- disabled: { type: Boolean, default: !1 },
25
- small: { type: Boolean, default: !1 }
26
- },
27
- emits: ["update:modelValue"],
28
- setup(p, { emit: m }) {
29
- const s = m, a = p, n = a.id || v();
30
- function t(l) {
31
- s("update:modelValue", l);
32
- }
33
- return g(() => {
34
- a.modelValue || t(a.minValue);
35
- }), (l, f) => (u(), r(B, {
36
- label: l.label,
37
- id: d(n),
38
- icon: l.icon,
39
- "icon-color": l.iconColor,
40
- "icon-type": l.iconType,
41
- "icon-placement": l.iconPlacement,
42
- required: l.required,
43
- type: l.small ? "fresh-booking-number-picker small" : "fresh-booking-number-picker",
44
- readonly: l.readonly
45
- }, {
46
- default: b(() => [
47
- V(d(T), {
48
- attrs: { id: d(n) },
49
- modelValue: l.modelValue,
50
- min: l.minValue,
51
- max: l.maxValue,
52
- step: l.step,
53
- inline: l.inline,
54
- controls: l.controls,
55
- placeholder: l.placeholder,
56
- readonly: l.readonly,
57
- inputtable: l.inputtable,
58
- rounded: l.rounded,
59
- disabled: l.disabled,
60
- "onUpdate:modelValue": t
61
- }, null, 8, ["attrs", "modelValue", "min", "max", "step", "inline", "controls", "placeholder", "readonly", "inputtable", "rounded", "disabled"])
62
- ]),
63
- _: 1
64
- }, 8, ["label", "id", "icon", "icon-color", "icon-type", "icon-placement", "required", "type", "readonly"]));
65
- }
66
- }), L = { class: "fresh-booking-action-field" }, U = /* @__PURE__ */ c({
67
- __name: "ActionField",
68
- props: {
69
- modelValue: {},
70
- label: {},
71
- buttonLabel: {},
72
- buttonIcon: {},
73
- buttonIconColor: {},
74
- buttonDisabled: { type: Boolean, default: !1 },
75
- secondary: { type: Boolean, default: !1 },
76
- name: {},
77
- id: {},
78
- type: { default: "text" },
79
- placeholder: {},
80
- icon: {},
81
- iconType: { default: "fal" },
82
- required: { type: Boolean, default: !1 },
83
- readonly: { type: Boolean, default: !1 },
84
- data: {},
85
- action: {},
86
- minValue: {},
87
- maxValue: {},
88
- isLoading: { type: Boolean, default: !1 }
89
- },
90
- emits: ["update:modelValue", "action"],
91
- setup(p, { emit: m }) {
92
- const s = m, a = p, n = a.id || v();
93
- function t(e) {
94
- s("update:modelValue", e);
95
- }
96
- const l = y({
97
- get: () => a.modelValue,
98
- set: (e) => t(e)
99
- }), f = y({
100
- get: () => a.modelValue,
101
- set: (e) => t(e)
102
- });
103
- function q() {
104
- s("action");
105
- }
106
- return (e, o) => (u(), r(B, {
107
- label: e.label,
108
- id: d(n),
109
- icon: e.icon,
110
- "icon-type": e.iconType,
111
- required: e.required,
112
- type: e.type,
113
- readonly: e.readonly
114
- }, {
115
- default: b(() => [
116
- k("div", L, [
117
- e.type === "dropdown" && e.data ? (u(), r(h, {
118
- key: 0,
119
- modelValue: l.value,
120
- "onUpdate:modelValue": o[0] || (o[0] = (i) => l.value = i),
121
- id: d(n),
122
- options: e.data,
123
- name: e.name,
124
- required: e.required,
125
- placeholder: e.placeholder
126
- }, null, 8, ["modelValue", "id", "options", "name", "required", "placeholder"])) : e.type === "number" ? (u(), r(A, {
127
- key: 1,
128
- modelValue: f.value,
129
- "onUpdate:modelValue": o[1] || (o[1] = (i) => f.value = i),
130
- id: d(n),
131
- "min-value": e.minValue,
132
- "max-value": e.maxValue
133
- }, null, 8, ["modelValue", "id", "min-value", "max-value"])) : (u(), r(C, {
134
- key: 2,
135
- modelValue: l.value,
136
- "onUpdate:modelValue": o[2] || (o[2] = (i) => l.value = i),
137
- id: d(n),
138
- name: e.name,
139
- required: e.required,
140
- placeholder: e.placeholder
141
- }, null, 8, ["modelValue", "id", "name", "required", "placeholder"])),
142
- V(I, {
143
- "data-test": `${e.name}Submit`,
144
- icon: e.buttonIcon,
145
- label: e.buttonLabel,
146
- "icon-color": e.buttonIconColor,
147
- styling: e.action,
148
- type: "button",
149
- "is-loading": e.isLoading,
150
- disabled: e.buttonDisabled,
151
- secondary: e.secondary,
152
- onClickEvent: o[3] || (o[3] = (i) => q())
153
- }, null, 8, ["data-test", "icon", "label", "icon-color", "styling", "is-loading", "disabled", "secondary"])
154
- ])
155
- ]),
156
- _: 1
157
- }, 8, ["label", "id", "icon", "icon-type", "required", "type", "readonly"]));
158
- }
159
- });
160
- const w = /* @__PURE__ */ F(U, [["__scopeId", "data-v-07d4466b"]]);
161
- export {
162
- w as A,
163
- A as _
164
- };
Binary file
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),l=require("./SelectField.vue_vue_type_style_index_0_lang-c0715ca3.cjs"),b=require("./DateField.vue_vue_type_style_index_0_lang-5692c5b2.cjs"),D=require("./_-120d9090.cjs"),f=require("./Field-b1690485.cjs"),A=["onSubmit"],B=e.defineComponent({__name:"_",props:{type:{default:"submit"}},emits:["submit"],setup(v,{emit:i}){const t=e.ref(!1),r=i,m=v,{verifyRecaptcha:n}=l.useUtilityStore();function u(){t.value=!0,n({callback:p,type:m.type}).then(()=>t.value=!1)}function p(){r("submit")}return(k,g)=>(e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(u,["prevent"])},[e.renderSlot(k.$slots,"default",{isLoading:t.value})],40,A))}}),E={key:0,class:"konnectio-availability-location"},$={id:"fresh-booking-availability-date-selection"},L={key:1,id:"fresh-booking-availability-guest-selection"},R={id:"fresh-booking-availability-confirmation"},q=e.defineComponent({__name:"HotelAvailabilityForm",props:{booking:{type:Boolean,default:!1},link:{}},setup(v){const{t:i}=l.useI18n(),t=v,{adults:r,children:m,arrivalDate:n,departureDate:u,location:p,isExpired:k}=l.storeToRefs(b.useAvailabilityStore()),{reset:g}=b.useAvailabilityStore(),{fetchAvailabilityData:S}=b.useHotelStore(),{areListingsLoading:N,hotelList:y}=l.storeToRefs(b.useHotelStore()),{firstSelectableDateOffset:h,lastSelectableDateOffset:w,disableChildSelection:d,disableAdultSelection:s}=l.storeToRefs(l.useUtilityStore()),_=e.ref([]);e.computed(()=>new Date(new Date().setDate(new Date().getDate()+(h.value-1)))),e.computed(()=>new Date(new Date().setDate(new Date().getDate()+w.value))),e.computed(()=>new Date(new Date().setDate(n.value.getDate()+h.value))),e.computed(()=>new Date(new Date().setDate(n.value.getDate()+(w.value+1))));const V=e.computed(()=>!(!s&&r.value===0)),C=e.computed(()=>typeof t.link!="string");function F(){if(t.booking===!1)if(C.value){const a=l.getUserLanguage();t.link[a]?window.location.replace(t.link[a]):t.link.en?window.location.replace(t.link.en):console.log("Sprog understøttes ikke")}else window.location.replace(t.link);else V.value&&S()}return e.watch(n,a=>{const o=new Date(new Date(a).setDate(new Date(a).getDate()+1));new Date(u.value)<o&&(u.value=o)}),e.watch(_,a=>{n.value=a[0],u.value=a[1]}),e.onMounted(()=>{k.value&&t.booking&&g(),_.value=[n.value,u.value]}),(a,o)=>(e.openBlock(),e.createBlock(B,{id:"konnectio-availability-form",class:e.normalizeClass({reservation:a.booking}),type:"availability",onSubmit:F},{default:e.withCtx(({isLoading:x})=>[e.createElementVNode("ul",{id:"konnectio-availability-form-content",class:e.normalizeClass([{"is-not-booking-page":!a.booking},{"only-adult-guests":!e.unref(s)&&e.unref(d)},{"only-child-guests":!e.unref(d)&&e.unref(s)},{"no-guests":e.unref(s)&&e.unref(d)},{"all-guests":!e.unref(s)&&!e.unref(d)},{"has-location":e.unref(y)}])},[e.unref(y)?(e.openBlock(),e.createElementBlock("li",E,[e.createVNode(l._sfc_main$1,{modelValue:e.unref(p),"onUpdate:modelValue":o[0]||(o[0]=c=>e.isRef(p)?p.value=c:null),label:e.unref(i)("general.location"),icon:"location-dot","icon-type":"fas","icon-placement":"label",options:e.unref(y),searchable:!1},null,8,["modelValue","label","options"])])):e.createCommentVNode("",!0),e.createElementVNode("li",$,[e.createVNode(b._sfc_main,{modelValue:_.value,"onUpdate:modelValue":o[1]||(o[1]=c=>_.value=c),label:e.unref(i)("availability.checkInOut"),"icon-type":"fas","icon-placement":"label","min-range":1,range:""},null,8,["modelValue","label"]),e.createCommentVNode("",!0)]),!e.unref(s)||!e.unref(d)?(e.openBlock(),e.createElementBlock("li",L,[e.unref(s)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l.TextField,{key:0,modelValue:e.unref(r),"onUpdate:modelValue":o[4]||(o[4]=c=>e.isRef(r)?r.value=c:null),label:e.unref(i)("availability.adults"),"icon-type":"fas","icon-placement":"label",name:"adults",icon:"male"},null,8,["modelValue","label"])),e.unref(d)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l.TextField,{key:1,modelValue:e.unref(m),"onUpdate:modelValue":o[5]||(o[5]=c=>e.isRef(m)?m.value=c:null),label:e.unref(i)("availability.children"),"icon-type":"fas","icon-placement":"label",name:"children",icon:"child"},null,8,["modelValue","label"]))])):e.createCommentVNode("",!0),e.createElementVNode("li",R,[e.createVNode(l.Clickable,{type:"submit",label:e.unref(i)("availability.buttonLabel"),disabled:!V.value,"is-loading":e.unref(N)||x},null,8,["label","disabled","is-loading"])])],2)]),_:1},8,["class"]))}});const U=l._export_sfc(q,[["__scopeId","data-v-41c405ba"]]),H={class:"availability-skeleton"},T={key:0,class:"availability-skeleton-navigation"},I={key:1,class:"availability-skeleton-hotel"},z={key:2,class:"availability-skeleton-event"},O=e.defineComponent({__name:"AvailabilitySkeleton",props:{view:{default:"hotel"}},setup(v){return(i,t)=>(e.openBlock(),e.createElementBlock("div",H,[i.view==="both"?(e.openBlock(),e.createElementBlock("div",T,[e.createVNode(D.Element,{height:"28px",width:"60px","border-radius":"20px"}),e.createVNode(D.Element,{height:"28px",width:"60px","border-radius":"20px"})])):e.createCommentVNode("",!0),i.view!=="event"?(e.openBlock(),e.createElementBlock("div",I,[e.createVNode(f.Field,{"with-icon":""}),e.createVNode(f.Field,{"with-icon":""}),e.createVNode(f.Field,{"with-icon":""}),e.createVNode(f.Field,{"with-icon":"","no-label":""})])):(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(f.Field,{"with-icon":""}),e.createVNode(f.Field,{"with-icon":"","no-label":""})]))]))}});const M=l._export_sfc(O,[["__scopeId","data-v-c266ccbc"]]);exports.AvailabilitySkeleton=M;exports.HotelAvailabilityForm=U;exports._sfc_main=B;
@@ -1,203 +0,0 @@
1
- import { defineComponent as A, ref as N, openBlock as n, createElementBlock as r, withModifiers as J, renderSlot as K, computed as p, watch as U, onMounted as P, createBlock as D, normalizeClass as E, withCtx as Q, createElementVNode as S, unref as e, createVNode as i, isRef as V, createCommentVNode as f } from "vue";
2
- import { a as O, f as W, s as x, o as X, T as H, C as Y, e as Z, _ as T } from "./SelectField.vue_vue_type_style_index_0_lang-5e1192e9.js";
3
- import { u as B, a as I, _ as ee } from "./DateField.vue_vue_type_style_index_0_lang-d5a1efd5.js";
4
- import { E as R } from "./_-048b5217.js";
5
- import { F as m } from "./Field-7137ef85.js";
6
- const te = ["onSubmit"], ae = /* @__PURE__ */ A({
7
- __name: "_",
8
- props: {
9
- type: { default: "submit" }
10
- },
11
- emits: ["submit"],
12
- setup(k, { emit: o }) {
13
- const t = N(!1), d = o, _ = k, { verifyRecaptcha: s } = O();
14
- function b() {
15
- t.value = !0, s({
16
- callback: y,
17
- type: _.type
18
- }).then(() => t.value = !1);
19
- }
20
- function y() {
21
- d("submit");
22
- }
23
- return (h, L) => (n(), r("form", {
24
- onSubmit: J(b, ["prevent"])
25
- }, [
26
- K(h.$slots, "default", { isLoading: t.value })
27
- ], 40, te));
28
- }
29
- }), le = {
30
- key: 0,
31
- class: "konnectio-availability-location"
32
- }, ie = { id: "fresh-booking-availability-date-selection" }, oe = {
33
- key: 1,
34
- id: "fresh-booking-availability-guest-selection"
35
- }, ne = { id: "fresh-booking-availability-confirmation" }, se = /* @__PURE__ */ A({
36
- __name: "HotelAvailabilityForm",
37
- props: {
38
- booking: { type: Boolean, default: !1 },
39
- link: {}
40
- },
41
- setup(k) {
42
- const { t: o } = W(), t = k, {
43
- adults: d,
44
- children: _,
45
- arrivalDate: s,
46
- departureDate: b,
47
- location: y,
48
- isExpired: h
49
- } = x(B()), { reset: L } = B(), { fetchAvailabilityData: z } = I(), { areListingsLoading: M, hotelList: w } = x(I()), {
50
- firstSelectableDateOffset: $,
51
- lastSelectableDateOffset: C,
52
- disableChildSelection: v,
53
- disableAdultSelection: c
54
- } = x(O()), g = N([]);
55
- p(() => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + ($.value - 1)))), p(() => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + C.value))), p(() => new Date((/* @__PURE__ */ new Date()).setDate(s.value.getDate() + $.value))), p(() => new Date((/* @__PURE__ */ new Date()).setDate(s.value.getDate() + (C.value + 1))));
56
- const F = p(() => !(!c && d.value === 0)), q = p(() => typeof t.link != "string");
57
- function j() {
58
- if (t.booking === !1)
59
- if (q.value) {
60
- const a = Z();
61
- t.link[a] ? window.location.replace(t.link[a]) : t.link.en ? window.location.replace(t.link.en) : console.log("Sprog understøttes ikke");
62
- } else
63
- window.location.replace(t.link);
64
- else
65
- F.value && z();
66
- }
67
- return U(s, (a) => {
68
- const l = new Date(new Date(a).setDate(new Date(a).getDate() + 1));
69
- new Date(b.value) < l && (b.value = l);
70
- }), U(g, (a) => {
71
- s.value = a[0], b.value = a[1];
72
- }), P(() => {
73
- h.value && t.booking && L(), g.value = [s.value, b.value];
74
- }), (a, l) => (n(), D(ae, {
75
- id: "konnectio-availability-form",
76
- class: E({ reservation: a.booking }),
77
- type: "availability",
78
- onSubmit: j
79
- }, {
80
- default: Q(({ isLoading: G }) => [
81
- S("ul", {
82
- id: "konnectio-availability-form-content",
83
- class: E([
84
- { "is-not-booking-page": !a.booking },
85
- { "only-adult-guests": !e(c) && e(v) },
86
- { "only-child-guests": !e(v) && e(c) },
87
- { "no-guests": e(c) && e(v) },
88
- { "all-guests": !e(c) && !e(v) },
89
- { "has-location": e(w) }
90
- ])
91
- }, [
92
- e(w) ? (n(), r("li", le, [
93
- i(X, {
94
- modelValue: e(y),
95
- "onUpdate:modelValue": l[0] || (l[0] = (u) => V(y) ? y.value = u : null),
96
- label: e(o)("general.location"),
97
- icon: "location-dot",
98
- "icon-type": "fas",
99
- "icon-placement": "label",
100
- options: e(w),
101
- searchable: !1
102
- }, null, 8, ["modelValue", "label", "options"])
103
- ])) : f("", !0),
104
- S("li", ie, [
105
- i(ee, {
106
- modelValue: g.value,
107
- "onUpdate:modelValue": l[1] || (l[1] = (u) => g.value = u),
108
- label: e(o)("availability.checkInOut"),
109
- "icon-type": "fas",
110
- "icon-placement": "label",
111
- "min-range": 1,
112
- range: ""
113
- }, null, 8, ["modelValue", "label"]),
114
- f("", !0)
115
- ]),
116
- !e(c) || !e(v) ? (n(), r("li", oe, [
117
- e(c) ? f("", !0) : (n(), D(H, {
118
- key: 0,
119
- modelValue: e(d),
120
- "onUpdate:modelValue": l[4] || (l[4] = (u) => V(d) ? d.value = u : null),
121
- label: e(o)("availability.adults"),
122
- "icon-type": "fas",
123
- "icon-placement": "label",
124
- name: "adults",
125
- icon: "male"
126
- }, null, 8, ["modelValue", "label"])),
127
- e(v) ? f("", !0) : (n(), D(H, {
128
- key: 1,
129
- modelValue: e(_),
130
- "onUpdate:modelValue": l[5] || (l[5] = (u) => V(_) ? _.value = u : null),
131
- label: e(o)("availability.children"),
132
- "icon-type": "fas",
133
- "icon-placement": "label",
134
- name: "children",
135
- icon: "child"
136
- }, null, 8, ["modelValue", "label"]))
137
- ])) : f("", !0),
138
- S("li", ne, [
139
- i(Y, {
140
- type: "submit",
141
- label: e(o)("availability.buttonLabel"),
142
- disabled: !F.value,
143
- "is-loading": e(M) || G
144
- }, null, 8, ["label", "disabled", "is-loading"])
145
- ])
146
- ], 2)
147
- ]),
148
- _: 1
149
- }, 8, ["class"]));
150
- }
151
- });
152
- const ye = /* @__PURE__ */ T(se, [["__scopeId", "data-v-41c405ba"]]), ce = { class: "availability-skeleton" }, ue = {
153
- key: 0,
154
- class: "availability-skeleton-navigation"
155
- }, re = {
156
- key: 1,
157
- class: "availability-skeleton-hotel"
158
- }, de = {
159
- key: 2,
160
- class: "availability-skeleton-event"
161
- }, be = /* @__PURE__ */ A({
162
- __name: "AvailabilitySkeleton",
163
- props: {
164
- view: { default: "hotel" }
165
- },
166
- setup(k) {
167
- return (o, t) => (n(), r("div", ce, [
168
- o.view === "both" ? (n(), r("div", ue, [
169
- i(R, {
170
- height: "28px",
171
- width: "60px",
172
- "border-radius": "20px"
173
- }),
174
- i(R, {
175
- height: "28px",
176
- width: "60px",
177
- "border-radius": "20px"
178
- })
179
- ])) : f("", !0),
180
- o.view !== "event" ? (n(), r("div", re, [
181
- i(m, { "with-icon": "" }),
182
- i(m, { "with-icon": "" }),
183
- i(m, { "with-icon": "" }),
184
- i(m, {
185
- "with-icon": "",
186
- "no-label": ""
187
- })
188
- ])) : (n(), r("div", de, [
189
- i(m, { "with-icon": "" }),
190
- i(m, {
191
- "with-icon": "",
192
- "no-label": ""
193
- })
194
- ]))
195
- ]));
196
- }
197
- });
198
- const ke = /* @__PURE__ */ T(be, [["__scopeId", "data-v-c266ccbc"]]);
199
- export {
200
- ke as A,
201
- ye as H,
202
- ae as _
203
- };