@konnectio/core 4.0.36 → 4.0.38
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.
- package/dist/{ActionField-a8e5d5d9.js → ActionField-cd683106.js} +2 -2
- package/dist/ActionField-cd683106.js.br +0 -0
- package/dist/{ActionField-3885f32a.cjs → ActionField-dc98863c.cjs} +1 -1
- package/dist/{AvailabilitySkeleton-cd318692.cjs → AvailabilitySkeleton-2dd88f42.cjs} +1 -1
- package/dist/{AvailabilitySkeleton-e6d2014e.js → AvailabilitySkeleton-64372a3d.js} +5 -5
- package/dist/AvailabilitySkeleton-64372a3d.js.br +0 -0
- package/dist/{DateField.vue_vue_type_style_index_0_lang-9094d6d1.js → DateField.vue_vue_type_style_index_0_lang-239ef816.js} +1 -1
- package/dist/DateField.vue_vue_type_style_index_0_lang-239ef816.js.br +0 -0
- package/dist/{DateField.vue_vue_type_style_index_0_lang-1a8b5f6a.cjs → DateField.vue_vue_type_style_index_0_lang-7267a5fa.cjs} +1 -1
- package/dist/{Field-9ceb2f44.cjs → Field-825b33aa.cjs} +1 -1
- package/dist/{Field-3acea4f1.js → Field-94ac0265.js} +2 -2
- package/dist/Field-94ac0265.js.br +0 -0
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-bec0662b.cjs → NumberField.vue_vue_type_script_setup_true_lang-4b483b4b.cjs} +1 -1
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-8011015d.js → NumberField.vue_vue_type_script_setup_true_lang-ab43cf10.js} +1 -1
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-ab43cf10.js.br +0 -0
- package/dist/{SelectField.vue_vue_type_style_index_0_lang-6c4869ab.js → SelectField.vue_vue_type_style_index_0_lang-9187c95a.js} +825 -824
- package/dist/SelectField.vue_vue_type_style_index_0_lang-9187c95a.js.br +0 -0
- package/dist/{SelectField.vue_vue_type_style_index_0_lang-8dbda757.cjs → SelectField.vue_vue_type_style_index_0_lang-a4d7be42.cjs} +32 -32
- package/dist/{ThankYou-ed65bc7a.cjs → ThankYou-2219aecc.cjs} +2 -2
- package/dist/{ThankYou-2f394123.js → ThankYou-d505adc9.js} +7 -7
- package/dist/ThankYou-d505adc9.js.br +0 -0
- package/dist/{_-8101ab39.cjs → _-b9738f5d.cjs} +1 -1
- package/dist/{_-e9260c32.js → _-e90b6bab.js} +1 -1
- package/dist/availability.cjs +2 -2
- package/dist/availability.js +10 -10
- package/dist/availability.js.br +0 -0
- package/dist/components/inputs/CheckboxField.vue.d.ts +1 -1
- package/dist/components/listings/Base.vue.d.ts +1 -1
- package/dist/components/listings/Event.vue.d.ts +1 -1
- package/dist/components/modals/Info.vue.d.ts +1 -1
- package/dist/entries/availability.d.ts +1 -1
- package/dist/event-8dde494e.cjs +1 -0
- package/dist/{event-26a75404.js → event-9b5b92a7.js} +30 -30
- package/dist/event-9b5b92a7.js.br +0 -0
- package/dist/event.cjs +1 -1
- package/dist/event.js +9 -9
- package/dist/event.js.br +0 -0
- package/dist/gift-card-validation.cjs +1 -1
- package/dist/gift-card-validation.js +3 -3
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card.cjs +1 -1
- package/dist/gift-card.js +227 -228
- package/dist/gift-card.js.br +0 -0
- package/dist/hotel.cjs +5 -5
- package/dist/hotel.js +655 -656
- package/dist/hotel.js.br +0 -0
- package/dist/{index-7ebaf6a6.js → index-524d9d24.js} +1 -1
- package/dist/index-524d9d24.js.br +0 -0
- package/dist/{index-29b94b33.cjs → index-85e3a13d.cjs} +1 -1
- package/dist/polyfill.cjs +1 -1
- package/dist/polyfill.js +1 -1
- package/dist/polyfill.js.br +0 -0
- package/dist/store/event.d.ts +3 -3
- package/dist/store/tracking.d.ts +8 -3
- package/dist/store/utilities.d.ts +4 -1
- package/dist/style.css +1 -1
- package/dist/style.css.br +0 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -1
- package/dist/ActionField-a8e5d5d9.js.br +0 -0
- package/dist/AvailabilitySkeleton-e6d2014e.js.br +0 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-9094d6d1.js.br +0 -0
- package/dist/Field-3acea4f1.js.br +0 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-8011015d.js.br +0 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-6c4869ab.js.br +0 -0
- package/dist/ThankYou-2f394123.js.br +0 -0
- package/dist/event-26a75404.js.br +0 -0
- package/dist/event-48dd46cf.cjs +0 -1
- package/dist/index-7ebaf6a6.js.br +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as Ge, u as Ve, s as oe, a as Le, b as Ue, c as _e, r as s, E as v, e as U, f as a, O as le, S as _, g as qe, h as C, i as F, j as D } from "./SelectField.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import { d as Ge, u as Ve, s as oe, a as Le, b as Ue, c as _e, r as s, E as v, e as U, f as a, O as le, S as _, g as qe, h as C, i as F, j as D } from "./SelectField.vue_vue_type_style_index_0_lang-9187c95a.js";
|
|
2
2
|
const xe = Ge("event", () => {
|
|
3
|
-
const se = Ve(), { voucher: re } = oe(Le()), { display: h } = Ue(), { bearerToken: I } = oe(_e()), p = s({}), y = s({}), t = s(void 0), l = s(!0), i = s(v.InitialState), q = s(/* @__PURE__ */ new Date()), N = s(NaN), T = s(1), S = s(NaN), K = s(NaN), E = s(""), $ = U("konnectio_name", "", void 0, { serializer: _.string }), O = U("konnectio_phone", "", void 0, { serializer: _.string }), R = U("konnectio_email", "", void 0, { serializer: _.string }), x = s(""), P = s({}),
|
|
3
|
+
const se = Ve(), { voucher: re } = oe(Le()), { display: h } = Ue(), { bearerToken: I } = oe(_e()), p = s({}), y = s({}), t = s(void 0), l = s(!0), i = s(v.InitialState), q = s(/* @__PURE__ */ new Date()), N = s(NaN), T = s(1), S = s(NaN), K = s(NaN), E = s(""), $ = U("konnectio_name", "", void 0, { serializer: _.string }), O = U("konnectio_phone", "", void 0, { serializer: _.string }), R = U("konnectio_email", "", void 0, { serializer: _.string }), x = s(""), P = s({}), m = s({}), z = s("");
|
|
4
4
|
function o(e) {
|
|
5
5
|
return e.templateID !== void 0;
|
|
6
6
|
}
|
|
7
|
-
const ue = a(() => p.value.currency), ie = a(() => p.value.maxNumberPerBooking), ve = a(() => p.value.title), ce = a(() => p.value.subtitle), de = a(() => p.value.slideshow), A = a(() => q.value.toISOString()), pe = a(() => o(t.value)), M = a(() => o(t.value) ? t.value.numberOfDays : T.value),
|
|
7
|
+
const ue = a(() => p.value.currency), ie = a(() => p.value.maxNumberPerBooking), ve = a(() => p.value.title), ce = a(() => p.value.subtitle), de = a(() => p.value.slideshow), A = a(() => q.value.toISOString()), pe = a(() => o(t.value)), M = a(() => o(t.value) ? t.value.numberOfDays : T.value), me = a(() => o(t.value) ? t.value.packageCount : 0), ge = a(() => o(t.value) ? t.value.fromDate : ""), b = a(() => y.value.events.find((e) => e.id === S.value)), fe = a(() => b.value ? b.value.length : void 0), j = a(() => o(t.value) ? t.value.templateID : 0), he = a(() => y.value.events), ye = a(() => y.value.templates), be = a(() => y.value.events.length > 0), ke = a(() => y.value.templates.length > 0), Q = a(() => b.value && b.value.eventRateType ? b.value.eventRateType : le.None), B = a(() => {
|
|
8
8
|
if (!o(t.value))
|
|
9
9
|
return t.value;
|
|
10
10
|
}), H = a(() => {
|
|
@@ -25,16 +25,16 @@ const xe = Ge("event", () => {
|
|
|
25
25
|
if (o(t.value)) {
|
|
26
26
|
const u = t.value.templateCounts[r];
|
|
27
27
|
if (u) {
|
|
28
|
-
const k = u.addons,
|
|
29
|
-
if (
|
|
30
|
-
const f = k?.find((w) => w.addonID === e), d = typeof
|
|
28
|
+
const k = u.addons, g = P.value[`${n}.${e}.${r}`] || 0;
|
|
29
|
+
if (g > 0) {
|
|
30
|
+
const f = k?.find((w) => w.addonID === e), d = typeof g == "boolean" ? 1 : g;
|
|
31
31
|
c += qe(f?.price, f?.quantityStrategy, M.value, u.adultPerRoom) * d;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
} else {
|
|
35
|
-
const u =
|
|
35
|
+
const u = m.value[e] || 0;
|
|
36
36
|
if (u > 0) {
|
|
37
|
-
const k = b.value?.products?.find((
|
|
37
|
+
const k = b.value?.products?.find((g) => g.productID === e);
|
|
38
38
|
k && (c += k.price * u);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -48,7 +48,7 @@ const xe = Ge("event", () => {
|
|
|
48
48
|
parseInt(u[0]) === e && parseInt(u[2]) === n && (r += G(parseInt(u[1]), e, n));
|
|
49
49
|
}
|
|
50
50
|
else
|
|
51
|
-
for (const c in
|
|
51
|
+
for (const c in m.value)
|
|
52
52
|
r += G(parseInt(c)) * T.value;
|
|
53
53
|
return r;
|
|
54
54
|
}
|
|
@@ -63,25 +63,25 @@ const xe = Ge("event", () => {
|
|
|
63
63
|
return e += H.value, e;
|
|
64
64
|
}
|
|
65
65
|
}), Se = a(() => o(t.value) && t.value.templateCounts !== void 0 && t.value.templateCounts.flatMap((e) => e.weekendFee).reduce((e, n) => e + n, 0) || 0), Pe = a(() => o(t.value) && t.value.templateCounts !== void 0 && t.value.templateCounts.flatMap((e) => e.roomUpgrade).reduce((e, n) => e + n, 0) || 0), Ae = a(() => {
|
|
66
|
-
const e =
|
|
66
|
+
const e = m.value;
|
|
67
67
|
let n = 0;
|
|
68
68
|
for (const r in e)
|
|
69
69
|
n += Number.isNaN(e[r]) ? 0 : e[r];
|
|
70
70
|
return n > 0;
|
|
71
|
-
}), X = a(() => o(t.value) ? !1 : Object.keys(
|
|
71
|
+
}), X = a(() => o(t.value) ? !1 : Object.keys(m.value).length > 0), we = a(() => !!($.value !== "" && R.value !== "" && O.value.length >= 5 && (!X.value || Ae.value) && (!(!o(t.value) && Q.value !== le.FullDayEvent) || E.value !== "")));
|
|
72
72
|
function Ce(e) {
|
|
73
73
|
return i.value === v.ReservationState && S.value === e && l.value;
|
|
74
74
|
}
|
|
75
75
|
const Ee = a(() => !(i.value === v.InitialState && l.value)), Fe = a(() => !(i.value === v.AvailabilityState && l.value)), Ne = a(() => t.value !== void 0), Te = a(() => i.value === v.PaymentState && l.value);
|
|
76
76
|
async function Y() {
|
|
77
77
|
try {
|
|
78
|
-
const e = (await C.get("https://
|
|
78
|
+
const e = (await C.get("https://production.hotel-service.konnectio.dk/api/event/metadata", {
|
|
79
79
|
params: {
|
|
80
80
|
language: F()
|
|
81
81
|
},
|
|
82
82
|
headers: {
|
|
83
83
|
Authorization: I.value,
|
|
84
|
-
"Fresh-Booking-Ver": "4.0.
|
|
84
|
+
"Fresh-Booking-Ver": "4.0.38"
|
|
85
85
|
}
|
|
86
86
|
})).data;
|
|
87
87
|
p.value = e, Z();
|
|
@@ -95,14 +95,14 @@ const xe = Ge("event", () => {
|
|
|
95
95
|
async function Z() {
|
|
96
96
|
i.value = v.AvailabilityState, l.value = !0;
|
|
97
97
|
try {
|
|
98
|
-
const e = (await C.get("https://
|
|
98
|
+
const e = (await C.get("https://production.hotel-service.konnectio.dk/api/event/restaurant-events", {
|
|
99
99
|
params: {
|
|
100
100
|
language: F(),
|
|
101
101
|
date: A.value
|
|
102
102
|
},
|
|
103
103
|
headers: {
|
|
104
104
|
Authorization: I.value,
|
|
105
|
-
"Fresh-Booking-Ver": "4.0.
|
|
105
|
+
"Fresh-Booking-Ver": "4.0.38"
|
|
106
106
|
}
|
|
107
107
|
})).data;
|
|
108
108
|
y.value = e, l.value = !1;
|
|
@@ -116,7 +116,7 @@ const xe = Ge("event", () => {
|
|
|
116
116
|
async function $e(e) {
|
|
117
117
|
i.value = v.ReservationState, l.value = !0;
|
|
118
118
|
try {
|
|
119
|
-
const n = (await C.get("https://
|
|
119
|
+
const n = (await C.get("https://production.hotel-service.konnectio.dk/api/v3/event/get-availability", {
|
|
120
120
|
params: {
|
|
121
121
|
language: F(),
|
|
122
122
|
date: A.value,
|
|
@@ -125,7 +125,7 @@ const xe = Ge("event", () => {
|
|
|
125
125
|
},
|
|
126
126
|
headers: {
|
|
127
127
|
Authorization: I.value,
|
|
128
|
-
"Fresh-Booking-Ver": "4.0.
|
|
128
|
+
"Fresh-Booking-Ver": "4.0.38"
|
|
129
129
|
}
|
|
130
130
|
})).data;
|
|
131
131
|
n.templateCounts.length === 0 ? h({
|
|
@@ -142,7 +142,7 @@ const xe = Ge("event", () => {
|
|
|
142
142
|
async function Oe(e) {
|
|
143
143
|
i.value = v.ReservationState, l.value = !0;
|
|
144
144
|
try {
|
|
145
|
-
const n = (await C.get("https://
|
|
145
|
+
const n = (await C.get("https://production.hotel-service.konnectio.dk/api/v3/event/get-table-availability", {
|
|
146
146
|
params: {
|
|
147
147
|
language: F(),
|
|
148
148
|
date: A.value,
|
|
@@ -152,7 +152,7 @@ const xe = Ge("event", () => {
|
|
|
152
152
|
},
|
|
153
153
|
headers: {
|
|
154
154
|
Authorization: I.value,
|
|
155
|
-
"Fresh-Booking-Ver": "4.0.
|
|
155
|
+
"Fresh-Booking-Ver": "4.0.38"
|
|
156
156
|
}
|
|
157
157
|
})).data;
|
|
158
158
|
t.value = n, l.value = !1, e();
|
|
@@ -165,7 +165,7 @@ const xe = Ge("event", () => {
|
|
|
165
165
|
}
|
|
166
166
|
async function Re() {
|
|
167
167
|
try {
|
|
168
|
-
const e = (await C.get("https://
|
|
168
|
+
const e = (await C.get("https://production.hotel-service.konnectio.dk/api/v3/event/validate-discount-code", {
|
|
169
169
|
params: {
|
|
170
170
|
language: F(),
|
|
171
171
|
date: A.value,
|
|
@@ -173,7 +173,7 @@ const xe = Ge("event", () => {
|
|
|
173
173
|
},
|
|
174
174
|
headers: {
|
|
175
175
|
Authorization: I.value,
|
|
176
|
-
"Fresh-Booking-Ver": "4.0.
|
|
176
|
+
"Fresh-Booking-Ver": "4.0.38"
|
|
177
177
|
}
|
|
178
178
|
})).data;
|
|
179
179
|
console.log(e);
|
|
@@ -219,15 +219,15 @@ const xe = Ge("event", () => {
|
|
|
219
219
|
};
|
|
220
220
|
else {
|
|
221
221
|
c = [], u = E.value;
|
|
222
|
-
for (const d in
|
|
223
|
-
const w =
|
|
222
|
+
for (const d in m.value) {
|
|
223
|
+
const w = m.value[parseInt(d)];
|
|
224
224
|
w > 0 && c.push({
|
|
225
225
|
id: parseInt(d),
|
|
226
226
|
quantity: w
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
let
|
|
230
|
+
let g = "https://production.hotel-service.konnectio.dk/api/v3/event/template-book";
|
|
231
231
|
const f = {
|
|
232
232
|
date: A.value,
|
|
233
233
|
name: $.value,
|
|
@@ -241,10 +241,10 @@ const xe = Ge("event", () => {
|
|
|
241
241
|
checkoutUrl: window.location.origin,
|
|
242
242
|
privacyUrl: window.location.origin
|
|
243
243
|
};
|
|
244
|
-
o(t.value) ? f.templateGroup = r : (f.time = u, f.eventId = S.value, f.products = c,
|
|
244
|
+
o(t.value) ? f.templateGroup = r : (f.time = u, f.eventId = S.value, f.products = c, g = "https://production.hotel-service.konnectio.dk/api/v3/event/event-book"), await C.post(g, f, {
|
|
245
245
|
headers: {
|
|
246
246
|
Authorization: I.value,
|
|
247
|
-
"Fresh-Booking-Ver": "4.0.
|
|
247
|
+
"Fresh-Booking-Ver": "4.0.38"
|
|
248
248
|
}
|
|
249
249
|
}).then((d) => {
|
|
250
250
|
l.value = !1, se.pay({
|
|
@@ -254,7 +254,7 @@ const xe = Ge("event", () => {
|
|
|
254
254
|
}).catch(() => n());
|
|
255
255
|
}
|
|
256
256
|
function Me(e) {
|
|
257
|
-
P.value = {},
|
|
257
|
+
P.value = {}, m.value = {}, E.value = "", e();
|
|
258
258
|
}
|
|
259
259
|
function Be() {
|
|
260
260
|
Y();
|
|
@@ -273,7 +273,7 @@ const xe = Ge("event", () => {
|
|
|
273
273
|
tableGroupId: K,
|
|
274
274
|
arrivalTime: E,
|
|
275
275
|
addons: P,
|
|
276
|
-
products:
|
|
276
|
+
products: m,
|
|
277
277
|
discountCode: z,
|
|
278
278
|
name: $,
|
|
279
279
|
phone: O,
|
|
@@ -287,8 +287,8 @@ const xe = Ge("event", () => {
|
|
|
287
287
|
slideshow: de,
|
|
288
288
|
date: A,
|
|
289
289
|
numberOfTotalDays: M,
|
|
290
|
-
numberOfRooms:
|
|
291
|
-
fromDate:
|
|
290
|
+
numberOfRooms: me,
|
|
291
|
+
fromDate: ge,
|
|
292
292
|
getEventData: b,
|
|
293
293
|
length: fe,
|
|
294
294
|
templateId: j,
|
|
Binary file
|
package/dist/event.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-8dbda757.cjs"),w=require("./ThankYou-ed65bc7a.cjs"),L=require("./event-48dd46cf.cjs"),ke=require("./ActionField-3885f32a.cjs"),C=require("./index-29b94b33.cjs"),_e=require("./DateField.vue_vue_type_style_index_0_lang-1a8b5f6a.cjs"),A=require("./NumberField.vue_vue_type_script_setup_true_lang-bec0662b.cjs");require("./_commonjsHelpers-6763f629.cjs");require("./_-8101ab39.cjs");const ye={class:"fresh-booking-event-listing-information"},Be={key:0},Ve={key:1},be=e.defineComponent({__name:"Event",props:{name:{},type:{},description:{},fromDate:{},toDate:{},listingId:{},tableGroupId:{},days:{},timeFrom:{},timeTo:{},maxOnlineReservationLimit:{},minimumPersonCount:{},fromPrice:{},gallery:{},soldOut:{type:Boolean,default:!1},layout:{},trackingEnabled:{type:Boolean},callback:{}},setup(_){const{t}=e.useI18n(),i=_,{display:g}=e.useAlertStore(),{currency:F}=e.storeToRefs(e.useUtilityStore()),{maxNumberOfPeople:y,numberOfPeople:x,eventId:B,tableGroupId:N}=e.storeToRefs(L.useEventStore()),{getTemplateAvailability:h,getEventAvailability:S,isEventListingLoading:k}=L.useEventStore(),m=e.ref(0),P=e.computed(()=>k(i.listingId)),O=()=>{m.value>0?(B.value=i.listingId,x.value=m.value,h(i.callback)):g({type:"error",message:t("alert.error.selectPeople")})},u=()=>{m.value>0?(B.value=i.listingId,N.value=i.tableGroupId,x.value=m.value,S(i.callback)):g({type:"error",message:t("alert.error.selectPeople")})};return(o,c)=>(e.openBlock(),e.createBlock(w.Base,{"listing-id":o.listingId,gallery:o.gallery,name:o.name,description:o.description,layout:e.unref(e.BookingLayout).Event},e.createSlots({action:e.withCtx(()=>[e.createVNode(ke.ActionField,{modelValue:m.value,"onUpdate:modelValue":c[0]||(c[0]=V=>m.value=V),type:"number",label:e.unref(t)("event.numberOfGuests"),buttonLabel:o.soldOut?e.unref(t)("event.soldOut"):e.unref(t)("event.bookNowButton"),buttonDisabled:o.soldOut,"min-value":o.type==="event"?1:o.minimumPersonCount,"max-value":o.type==="event"?o.maxOnlineReservationLimit||1/0:e.unref(y),"is-loading":P.value,"onUpdate:isLoading":c[1]||(c[1]=V=>P.value=V),onAction:c[2]||(c[2]=V=>o.type==="event"?u():O())},null,8,["modelValue","label","buttonLabel","buttonDisabled","min-value","max-value","is-loading"])]),_:2},[o.type==="event"?{name:"description",fn:e.withCtx(()=>[e.createBaseVNode("ul",ye,[e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"calendar-range",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDay)(o.days)),1)]),e.unref(e.daysBetweenDates)(o.fromDate,o.toDate)<180?(e.openBlock(),e.createElementBlock("li",Be,[e.createVNode(e.Icon,{icon:"calendar-days",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDates)(o.fromDate,o.toDate)),1)])):e.createCommentVNode("",!0),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"calendar-clock",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showTimes)(o.timeFrom,o.timeTo)),1)]),o.maxOnlineReservationLimit?(e.openBlock(),e.createElementBlock("li",Ve,[e.createVNode(e.Icon,{icon:"user-alt",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(`1 - ${o.maxOnlineReservationLimit} ${e.unref(t)("general.people")}`),1)])):e.createCommentVNode("",!0)])]),key:"0"}:{name:"description",fn:e.withCtx(()=>[e.createBaseVNode("ul",{class:"fresh-booking-event-listing-information"},[e.unref(e.daysBetweenDates)(o.fromDate,o.toDate)<180?(e.openBlock(),e.createElementBlock("li",{key:0},[e.createVNode(e.Icon,{icon:"calendar-days",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDates)(o.fromDate,o.toDate,!0)),1)])):e.createCommentVNode("",!0),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"user-alt",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(`${o.minimumPersonCount} - ${e.unref(y)} ${e.unref(t)("general.people")}`),1)]),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"money-bill",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(`${e.unref(t)("general.pricesFrom")} ${e.unref(e.showPrice)(o.fromPrice,e.unref(F))}`),1)])])]),key:"1"}]),1032,["listing-id","gallery","name","description","layout"]))}});const H=e._export_sfc(be,[["__scopeId","data-v-4a459a74"]]),b=_=>(e.pushScopeId("data-v-b2eee97d"),_=_(),e.popScopeId(),_),Ne={class:"fresh-booking-panel"},he={key:0,id:"fresh-booking-event-overview"},Se={class:"fresh-booking-event-listings"},De={class:"fresh-booking-event-listings"},Ee={key:2,id:"fresh-booking-event-addons"},Ce={class:"fresh-booking-table"},we=b(()=>e.createBaseVNode("th",{class:"fresh-booking-event-addons-input"},null,-1)),Fe={class:"fresh-booking-event-addons-price"},Pe=b(()=>e.createBaseVNode("br",null,null,-1)),Te={class:"fresh-booking-event-addons-input"},$e={class:"fresh-booking-event-addons-price"},Le=b(()=>e.createBaseVNode("td",{colspan:"2"},null,-1)),xe={class:"fresh-booking-event-addons-price"},Oe={key:3},Re={class:"fresh-booking-label required"},Ue={id:"fresh-booking-event-table"},qe={key:4},Ae={class:"fresh-booking-label required"},Ie={class:"fresh-booking-table"},Me=b(()=>e.createBaseVNode("th",{class:"fresh-booking-event-addons-input"},null,-1)),Ye={class:"fresh-booking-event-addons-price"},ze=b(()=>e.createBaseVNode("br",null,null,-1)),Qe=b(()=>e.createBaseVNode("br",null,null,-1)),We={class:"fresh-booking-event-addons-input"},je={class:"fresh-booking-event-addons-price"},He={key:0},Je={key:1},Ke={key:2},Xe={key:3},Ze={key:4},Ge={key:5},et={key:6},tt=e.defineComponent({name:"EventLayout",__name:"Event",props:{accessToken:{},styling:{}},setup(_){const{t}=e.useI18n(),{searchDate:i,addons:g,products:F,numberOfDays:y,discountCode:x,name:B,phone:N,email:h,remark:S,arrivalTime:k,title:m,subtitle:P,slideshow:O,currency:u,numberOfPeople:o,numberOfTotalDays:c,numberOfRooms:V,basePrice:J,totalPrice:K,isPaymentLoading:X,hasEvents:Z,hasTemplates:G,getEvents:ee,getTemplates:te,getEventData:ne,getTemplateData:T,getEventTableData:oe,length:I,roomUpgrade:le,weekendFee:ae,fromDate:M,hasProducts:re,eventRateType:Y,isMetaDataAvailable:se,areListingsAvailable:ie,isReservationFormFilled:ue,isAvailabilityDataAvailable:ce,isTemplateEvent:f,tableBasePrice:z}=e.storeToRefs(L.useEventStore()),{initialize:de,validateDiscountCode:at,fetchListings:pe,createBooking:me,localAddonPrice:Q,totalAddonPrice:W,reset:fe}=L.useEventStore(),{hideEvents:ve,hideEventTemplates:ge}=e.storeToRefs(e.useUtilityStore());return e.onMounted(()=>de()),e.watch(i,()=>pe()),(j,l)=>(e.openBlock(),e.createBlock(e._sfc_main$1,{id:"fresh-booking-event-module",class:"fresh-booking-app",type:"event","access-token":j.accessToken,styling:j.styling},{default:e.withCtx(()=>[e.unref(se)?(e.openBlock(),e.createBlock(w.MultiStepForm,{key:0,slideshow:e.unref(O),title:e.unref(m),subtitle:e.unref(P)},{availability:e.withCtx(({next:$})=>[e.createBaseVNode("div",Ne,[e.createVNode(_e._sfc_main,{modelValue:e.unref(i),"onUpdate:modelValue":l[0]||(l[0]=d=>e.isRef(i)?i.value=d:null),label:e.unref(t)("event.selectDate"),"min-date":new Date},null,8,["modelValue","label","min-date"])]),e.unref(ie)?(e.openBlock(),e.createElementBlock("div",he,[e.unref(Z)&&!e.unref(ve)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createBaseVNode("h2",null,[e.createVNode(e.Icon,{icon:"clock-seven",type:"fal",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.eventsTitle")),1)]),e.createBaseVNode("ul",Se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ee),({id:d,days:n,name:r,timeFrom:p,timeTo:a,fromDate:s,toDate:D,tableGroupID:R,description:U,soldOut:q,maxOnlineReservationLimit:E})=>(e.openBlock(),e.createBlock(H,{key:d,type:"event","listing-id":d,"table-group-id":R,description:U,name:r,days:n,"from-date":s,"to-date":D,"max-online-reservation-limit":E,"time-from":p,"time-to":a,"sold-out":q,callback:$},null,8,["listing-id","table-group-id","description","name","days","from-date","to-date","max-online-reservation-limit","time-from","time-to","sold-out","callback"]))),128))])],64)):e.createCommentVNode("",!0),e.unref(G)&&!e.unref(ge)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createBaseVNode("h2",null,[e.createVNode(e.Icon,{icon:"stars",type:"fal",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.stayTitle")),1)]),e.createBaseVNode("ul",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(te),({id:d,name:n,fromDate:r,toDate:p,minimumPersonCount:a,fromPrice:s,description:D})=>(e.openBlock(),e.createBlock(H,{key:d,type:"template","listing-id":d,name:n,description:D,"from-date":r,"to-date":p,"minimum-person-count":a,fromPrice:s,callback:$},null,8,["listing-id","name","description","from-date","to-date","minimum-person-count","fromPrice","callback"]))),128))])],64)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),reservation:e.withCtx(({next:$,prev:d})=>[e.unref(ce)?(e.openBlock(),e.createBlock(w.ReservationForm,{key:0,remark:e.unref(S),"onUpdate:remark":l[8]||(l[8]=n=>e.isRef(S)?S.value=n:null),"is-filled":e.unref(ue),"is-loading":e.unref(X),"base-price":e.unref(J),"total-price":e.unref(K),"weekend-fee":e.unref(ae),"room-upgrade":e.unref(le),onPrev:n=>e.unref(fe)(d),onNext:n=>e.unref(me)($)},{form:e.withCtx(()=>[e.unref(Y)===e.unref(e.OctopusEventRateType).FullDayEvent?(e.openBlock(),e.createBlock(A._sfc_main,{key:0,modelValue:e.unref(y),"onUpdate:modelValue":l[1]||(l[1]=n=>e.isRef(y)?y.value=n:null),label:e.unref(t)("event.numberOfDays"),"min-value":1,required:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0),e.createVNode(e.TextField,{modelValue:e.unref(B),"onUpdate:modelValue":l[2]||(l[2]=n=>e.isRef(B)?B.value=n:null),type:"text",label:e.unref(t)("booking.reservation.name"),icon:"user-alt",placeholder:e.unref(t)("booking.reservation.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(e.TextField,{modelValue:e.unref(h),"onUpdate:modelValue":l[3]||(l[3]=n=>e.isRef(h)?h.value=n:null),label:e.unref(t)("booking.reservation.email"),type:"email",name:"email",autocomplete:"email",icon:"at",placeholder:e.unref(t)("booking.reservation.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(C.PhoneField,{modelValue:e.unref(N),"onUpdate:modelValue":l[4]||(l[4]=n=>e.isRef(N)?N.value=n:null),label:e.unref(t)("booking.reservation.phone"),icon:"phone-office",placeholder:e.unref(t)("booking.reservation.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createCommentVNode("",!0),e.unref(T)&&e.unref(T).length>0?(e.openBlock(),e.createElementBlock("ul",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(T),({roomGroupID:n,addons:r,adultPerRoom:p},a)=>(e.openBlock(),e.createElementBlock("li",{key:n},[e.createBaseVNode("h5",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.room"))+" #"+e.toDisplayString(a+1),1),e.createTextVNode(" ("),e.createVNode(e.Icon,{icon:"male",type:"fas",color:"header"}),e.createTextVNode(" "+e.toDisplayString(p)+") ",1)]),e.createBaseVNode("table",Ce,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.addons")),1)]),we,e.createBaseVNode("th",Fe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.price")),1)])])]),e.createBaseVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,({addonID:s,cardinality:D,name:R,price:U,quantityStrategy:q})=>(e.openBlock(),e.createElementBlock("tr",{key:s},[e.createBaseVNode("td",null,[e.createBaseVNode("b",null,e.toDisplayString(R),1),Pe,e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(U,e.unref(u)))+" "+e.toDisplayString(e.unref(e.getPriceQuantityLabel)(q)),1)]),e.createBaseVNode("td",Te,[D===3?(e.openBlock(),e.createBlock(A._sfc_main,{key:0,modelValue:e.unref(g)[`${n}.${s}.${a}`],"onUpdate:modelValue":E=>e.unref(g)[`${n}.${s}.${a}`]=E,small:!0,"min-value":0},null,8,["modelValue","onUpdate:modelValue"])):(e.openBlock(),e.createBlock(C.Checkbox,{key:1,modelValue:e.unref(g)[`${n}.${s}.${a}`],"onUpdate:modelValue":E=>e.unref(g)[`${n}.${s}.${a}`]=E,numeric:!0},null,8,["modelValue","onUpdate:modelValue"]))]),e.createBaseVNode("td",$e,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(Q)(s,n,a),e.unref(u))),1)])]))),128))]),e.createBaseVNode("tfoot",null,[e.createBaseVNode("tr",null,[Le,e.createBaseVNode("td",xe,[e.createBaseVNode("u",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(W)(n,a),e.unref(u))),1)])])])])])]))),128))])):e.createCommentVNode("",!0),e.unref(Y)!==e.unref(e.OctopusEventRateType).FullDayEvent&&!e.unref(f)?(e.openBlock(),e.createElementBlock("div",Oe,[e.createBaseVNode("label",Re,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.selectArrivalTime")),1)]),e.createBaseVNode("ul",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(oe),(n,r)=>(e.openBlock(),e.createElementBlock("li",{key:r},[e.createVNode(C.Checkbox,{modelValue:e.unref(k),"onUpdate:modelValue":l[7]||(l[7]=p=>e.isRef(k)?k.value=p:null),type:"radio",name:"eventTimeTable",val:n.time,label:e.unref(e.showTime)(n.time)},null,8,["modelValue","val","label"])]))),128))])])):e.createCommentVNode("",!0),e.unref(re)?(e.openBlock(),e.createElementBlock("div",qe,[e.createBaseVNode("label",Ae,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.selectProducts")),1)]),e.createBaseVNode("table",Ie,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.addons")),1)]),Me,e.createBaseVNode("th",Ye,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.price")),1)])])]),e.createBaseVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ne).products,({productID:n,productName:r,price:p,description:a})=>(e.openBlock(),e.createElementBlock("tr",{key:n},[e.createBaseVNode("td",null,[e.createBaseVNode("b",null,[e.createBaseVNode("span",null,e.toDisplayString(r),1)]),ze,e.createBaseVNode("span",null,e.toDisplayString(a),1),Qe,e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(p,e.unref(u))),1)]),e.createBaseVNode("td",We,[e.createVNode(A._sfc_main,{modelValue:e.unref(F)[n],"onUpdate:modelValue":s=>e.unref(F)[n]=s,small:!0,"min-value":0},null,8,["modelValue","onUpdate:modelValue"])]),e.createBaseVNode("td",je,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(Q)(n),e.unref(u))),1)])]))),128))])])])):e.createCommentVNode("",!0)]),resume:e.withCtx(()=>[e.createBaseVNode("li",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.numberOfGuests")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(o)),1)]),e.unref(f)?(e.openBlock(),e.createElementBlock("li",He,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.numberOfRooms")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(V)),1)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("li",Je,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.numberOfDays")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(c)),1)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("li",Ke,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.arrival")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showDate)(e.unref(M))),1)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("li",Xe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.departure")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showDate)(e.unref(M),e.unref(c))),1)])):e.createCommentVNode("",!0),!e.unref(f)&&e.unref(k)?(e.openBlock(),e.createElementBlock("li",Ze,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.startOfEvent")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showTime)(e.unref(k))),1)])):e.createCommentVNode("",!0),!e.unref(f)&&e.unref(I)?(e.openBlock(),e.createElementBlock("li",Ge,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.lengthOfEvent")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showTime)(e.unref(I))),1)])):e.createCommentVNode("",!0),!e.unref(f)&&e.unref(z)>0?(e.openBlock(),e.createElementBlock("li",et,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.basePrice")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(z),e.unref(u))),1)])):e.createCommentVNode("",!0)]),expenses:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(T),({roomGroupID:n},r)=>(e.openBlock(),e.createElementBlock("li",{key:n},[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.addons"))+" - "+e.toDisplayString(e.unref(t)("booking.reservation.room"))+" #"+e.toDisplayString(r+1),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(W)(n,r),e.unref(u))),1)]))),128))]),_:2},1032,["remark","is-filled","is-loading","base-price","total-price","weekend-fee","room-upgrade","onPrev","onNext"])):e.createCommentVNode("",!0)]),payment:e.withCtx(()=>[e.createVNode(C.CheckoutWindow)]),confirmation:e.withCtx(()=>[e.createVNode(w.ThankYou,{message:e.unref(t)("event.confirmationMessage")},null,8,["message"])]),_:1},8,["slideshow","title","subtitle"])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","styling"]))}});const nt=e._export_sfc(tt,[["__scopeId","data-v-b2eee97d"]]),ot=e.createPinia(),lt=e.Go(),v=e.createApp({components:{Event:nt}});v.use(ot);v.use(lt);v.use(C.StickyPlugin);v.use(e.instance);v.use(w.xt);v.use(e.install,{bootstrap:!0});v.mount("#konnectio-event-app");module.exports=v;
|
|
1
|
+
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-a4d7be42.cjs"),w=require("./ThankYou-2219aecc.cjs"),L=require("./event-8dde494e.cjs"),ke=require("./ActionField-dc98863c.cjs"),C=require("./index-85e3a13d.cjs"),_e=require("./DateField.vue_vue_type_style_index_0_lang-7267a5fa.cjs"),A=require("./NumberField.vue_vue_type_script_setup_true_lang-4b483b4b.cjs");require("./_commonjsHelpers-6763f629.cjs");require("./_-b9738f5d.cjs");const ye={class:"fresh-booking-event-listing-information"},Be={key:0},Ve={key:1},be=e.defineComponent({__name:"Event",props:{name:{},type:{},description:{},fromDate:{},toDate:{},listingId:{},tableGroupId:{},days:{},timeFrom:{},timeTo:{},maxOnlineReservationLimit:{},minimumPersonCount:{},fromPrice:{},gallery:{},soldOut:{type:Boolean,default:!1},layout:{},trackingEnabled:{type:Boolean},callback:{}},setup(_){const{t}=e.useI18n(),i=_,{display:g}=e.useAlertStore(),{currency:F}=e.storeToRefs(e.useUtilityStore()),{maxNumberOfPeople:y,numberOfPeople:x,eventId:B,tableGroupId:N}=e.storeToRefs(L.useEventStore()),{getTemplateAvailability:h,getEventAvailability:S,isEventListingLoading:k}=L.useEventStore(),m=e.ref(0),P=e.computed(()=>k(i.listingId)),O=()=>{m.value>0?(B.value=i.listingId,x.value=m.value,h(i.callback)):g({type:"error",message:t("alert.error.selectPeople")})},u=()=>{m.value>0?(B.value=i.listingId,N.value=i.tableGroupId,x.value=m.value,S(i.callback)):g({type:"error",message:t("alert.error.selectPeople")})};return(o,c)=>(e.openBlock(),e.createBlock(w.Base,{"listing-id":o.listingId,gallery:o.gallery,name:o.name,description:o.description,layout:e.unref(e.BookingLayout).Event},e.createSlots({action:e.withCtx(()=>[e.createVNode(ke.ActionField,{modelValue:m.value,"onUpdate:modelValue":c[0]||(c[0]=V=>m.value=V),type:"number",label:e.unref(t)("event.numberOfGuests"),buttonLabel:o.soldOut?e.unref(t)("event.soldOut"):e.unref(t)("event.bookNowButton"),buttonDisabled:o.soldOut,"min-value":o.type==="event"?1:o.minimumPersonCount,"max-value":o.type==="event"?o.maxOnlineReservationLimit||1/0:e.unref(y),"is-loading":P.value,"onUpdate:isLoading":c[1]||(c[1]=V=>P.value=V),onAction:c[2]||(c[2]=V=>o.type==="event"?u():O())},null,8,["modelValue","label","buttonLabel","buttonDisabled","min-value","max-value","is-loading"])]),_:2},[o.type==="event"?{name:"description",fn:e.withCtx(()=>[e.createBaseVNode("ul",ye,[e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"calendar-range",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDay)(o.days)),1)]),e.unref(e.daysBetweenDates)(o.fromDate,o.toDate)<180?(e.openBlock(),e.createElementBlock("li",Be,[e.createVNode(e.Icon,{icon:"calendar-days",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDates)(o.fromDate,o.toDate)),1)])):e.createCommentVNode("",!0),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"calendar-clock",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showTimes)(o.timeFrom,o.timeTo)),1)]),o.maxOnlineReservationLimit?(e.openBlock(),e.createElementBlock("li",Ve,[e.createVNode(e.Icon,{icon:"user-alt",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(`1 - ${o.maxOnlineReservationLimit} ${e.unref(t)("general.people")}`),1)])):e.createCommentVNode("",!0)])]),key:"0"}:{name:"description",fn:e.withCtx(()=>[e.createBaseVNode("ul",{class:"fresh-booking-event-listing-information"},[e.unref(e.daysBetweenDates)(o.fromDate,o.toDate)<180?(e.openBlock(),e.createElementBlock("li",{key:0},[e.createVNode(e.Icon,{icon:"calendar-days",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDates)(o.fromDate,o.toDate,!0)),1)])):e.createCommentVNode("",!0),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"user-alt",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(`${o.minimumPersonCount} - ${e.unref(y)} ${e.unref(t)("general.people")}`),1)]),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"money-bill",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(`${e.unref(t)("general.pricesFrom")} ${e.unref(e.showPrice)(o.fromPrice,e.unref(F))}`),1)])])]),key:"1"}]),1032,["listing-id","gallery","name","description","layout"]))}});const H=e._export_sfc(be,[["__scopeId","data-v-013d2269"]]),b=_=>(e.pushScopeId("data-v-b2eee97d"),_=_(),e.popScopeId(),_),Ne={class:"fresh-booking-panel"},he={key:0,id:"fresh-booking-event-overview"},Se={class:"fresh-booking-event-listings"},De={class:"fresh-booking-event-listings"},Ee={key:2,id:"fresh-booking-event-addons"},Ce={class:"fresh-booking-table"},we=b(()=>e.createBaseVNode("th",{class:"fresh-booking-event-addons-input"},null,-1)),Fe={class:"fresh-booking-event-addons-price"},Pe=b(()=>e.createBaseVNode("br",null,null,-1)),Te={class:"fresh-booking-event-addons-input"},$e={class:"fresh-booking-event-addons-price"},Le=b(()=>e.createBaseVNode("td",{colspan:"2"},null,-1)),xe={class:"fresh-booking-event-addons-price"},Oe={key:3},Re={class:"fresh-booking-label required"},Ue={id:"fresh-booking-event-table"},qe={key:4},Ae={class:"fresh-booking-label required"},Ie={class:"fresh-booking-table"},Me=b(()=>e.createBaseVNode("th",{class:"fresh-booking-event-addons-input"},null,-1)),Ye={class:"fresh-booking-event-addons-price"},ze=b(()=>e.createBaseVNode("br",null,null,-1)),Qe=b(()=>e.createBaseVNode("br",null,null,-1)),We={class:"fresh-booking-event-addons-input"},je={class:"fresh-booking-event-addons-price"},He={key:0},Je={key:1},Ke={key:2},Xe={key:3},Ze={key:4},Ge={key:5},et={key:6},tt=e.defineComponent({name:"EventLayout",__name:"Event",props:{accessToken:{},styling:{}},setup(_){const{t}=e.useI18n(),{searchDate:i,addons:g,products:F,numberOfDays:y,discountCode:x,name:B,phone:N,email:h,remark:S,arrivalTime:k,title:m,subtitle:P,slideshow:O,currency:u,numberOfPeople:o,numberOfTotalDays:c,numberOfRooms:V,basePrice:J,totalPrice:K,isPaymentLoading:X,hasEvents:Z,hasTemplates:G,getEvents:ee,getTemplates:te,getEventData:ne,getTemplateData:T,getEventTableData:oe,length:I,roomUpgrade:le,weekendFee:ae,fromDate:M,hasProducts:re,eventRateType:Y,isMetaDataAvailable:se,areListingsAvailable:ie,isReservationFormFilled:ue,isAvailabilityDataAvailable:ce,isTemplateEvent:f,tableBasePrice:z}=e.storeToRefs(L.useEventStore()),{initialize:de,validateDiscountCode:at,fetchListings:pe,createBooking:me,localAddonPrice:Q,totalAddonPrice:W,reset:fe}=L.useEventStore(),{hideEvents:ve,hideEventTemplates:ge}=e.storeToRefs(e.useUtilityStore());return e.onMounted(()=>de()),e.watch(i,()=>pe()),(j,l)=>(e.openBlock(),e.createBlock(e._sfc_main$1,{id:"fresh-booking-event-module",class:"fresh-booking-app",type:"event","access-token":j.accessToken,styling:j.styling},{default:e.withCtx(()=>[e.unref(se)?(e.openBlock(),e.createBlock(w.MultiStepForm,{key:0,slideshow:e.unref(O),title:e.unref(m),subtitle:e.unref(P)},{availability:e.withCtx(({next:$})=>[e.createBaseVNode("div",Ne,[e.createVNode(_e._sfc_main,{modelValue:e.unref(i),"onUpdate:modelValue":l[0]||(l[0]=d=>e.isRef(i)?i.value=d:null),label:e.unref(t)("event.selectDate"),"min-date":new Date},null,8,["modelValue","label","min-date"])]),e.unref(ie)?(e.openBlock(),e.createElementBlock("div",he,[e.unref(Z)&&!e.unref(ve)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createBaseVNode("h2",null,[e.createVNode(e.Icon,{icon:"clock-seven",type:"fal",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.eventsTitle")),1)]),e.createBaseVNode("ul",Se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ee),({id:d,days:n,name:r,timeFrom:p,timeTo:a,fromDate:s,toDate:D,tableGroupID:R,description:U,soldOut:q,maxOnlineReservationLimit:E})=>(e.openBlock(),e.createBlock(H,{key:d,type:"event","listing-id":d,"table-group-id":R,description:U,name:r,days:n,"from-date":s,"to-date":D,"max-online-reservation-limit":E,"time-from":p,"time-to":a,"sold-out":q,callback:$},null,8,["listing-id","table-group-id","description","name","days","from-date","to-date","max-online-reservation-limit","time-from","time-to","sold-out","callback"]))),128))])],64)):e.createCommentVNode("",!0),e.unref(G)&&!e.unref(ge)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createBaseVNode("h2",null,[e.createVNode(e.Icon,{icon:"stars",type:"fal",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.stayTitle")),1)]),e.createBaseVNode("ul",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(te),({id:d,name:n,fromDate:r,toDate:p,minimumPersonCount:a,fromPrice:s,description:D})=>(e.openBlock(),e.createBlock(H,{key:d,type:"template","listing-id":d,name:n,description:D,"from-date":r,"to-date":p,"minimum-person-count":a,fromPrice:s,callback:$},null,8,["listing-id","name","description","from-date","to-date","minimum-person-count","fromPrice","callback"]))),128))])],64)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),reservation:e.withCtx(({next:$,prev:d})=>[e.unref(ce)?(e.openBlock(),e.createBlock(w.ReservationForm,{key:0,remark:e.unref(S),"onUpdate:remark":l[8]||(l[8]=n=>e.isRef(S)?S.value=n:null),"is-filled":e.unref(ue),"is-loading":e.unref(X),"base-price":e.unref(J),"total-price":e.unref(K),"weekend-fee":e.unref(ae),"room-upgrade":e.unref(le),onPrev:n=>e.unref(fe)(d),onNext:n=>e.unref(me)($)},{form:e.withCtx(()=>[e.unref(Y)===e.unref(e.OctopusEventRateType).FullDayEvent?(e.openBlock(),e.createBlock(A._sfc_main,{key:0,modelValue:e.unref(y),"onUpdate:modelValue":l[1]||(l[1]=n=>e.isRef(y)?y.value=n:null),label:e.unref(t)("event.numberOfDays"),"min-value":1,required:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0),e.createVNode(e.TextField,{modelValue:e.unref(B),"onUpdate:modelValue":l[2]||(l[2]=n=>e.isRef(B)?B.value=n:null),type:"text",label:e.unref(t)("booking.reservation.name"),icon:"user-alt",placeholder:e.unref(t)("booking.reservation.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(e.TextField,{modelValue:e.unref(h),"onUpdate:modelValue":l[3]||(l[3]=n=>e.isRef(h)?h.value=n:null),label:e.unref(t)("booking.reservation.email"),type:"email",name:"email",autocomplete:"email",icon:"at",placeholder:e.unref(t)("booking.reservation.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(C.PhoneField,{modelValue:e.unref(N),"onUpdate:modelValue":l[4]||(l[4]=n=>e.isRef(N)?N.value=n:null),label:e.unref(t)("booking.reservation.phone"),icon:"phone-office",placeholder:e.unref(t)("booking.reservation.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createCommentVNode("",!0),e.unref(T)&&e.unref(T).length>0?(e.openBlock(),e.createElementBlock("ul",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(T),({roomGroupID:n,addons:r,adultPerRoom:p},a)=>(e.openBlock(),e.createElementBlock("li",{key:n},[e.createBaseVNode("h5",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.room"))+" #"+e.toDisplayString(a+1),1),e.createTextVNode(" ("),e.createVNode(e.Icon,{icon:"male",type:"fas",color:"header"}),e.createTextVNode(" "+e.toDisplayString(p)+") ",1)]),e.createBaseVNode("table",Ce,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.addons")),1)]),we,e.createBaseVNode("th",Fe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.price")),1)])])]),e.createBaseVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,({addonID:s,cardinality:D,name:R,price:U,quantityStrategy:q})=>(e.openBlock(),e.createElementBlock("tr",{key:s},[e.createBaseVNode("td",null,[e.createBaseVNode("b",null,e.toDisplayString(R),1),Pe,e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(U,e.unref(u)))+" "+e.toDisplayString(e.unref(e.getPriceQuantityLabel)(q)),1)]),e.createBaseVNode("td",Te,[D===3?(e.openBlock(),e.createBlock(A._sfc_main,{key:0,modelValue:e.unref(g)[`${n}.${s}.${a}`],"onUpdate:modelValue":E=>e.unref(g)[`${n}.${s}.${a}`]=E,small:!0,"min-value":0},null,8,["modelValue","onUpdate:modelValue"])):(e.openBlock(),e.createBlock(C.Checkbox,{key:1,modelValue:e.unref(g)[`${n}.${s}.${a}`],"onUpdate:modelValue":E=>e.unref(g)[`${n}.${s}.${a}`]=E,numeric:!0},null,8,["modelValue","onUpdate:modelValue"]))]),e.createBaseVNode("td",$e,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(Q)(s,n,a),e.unref(u))),1)])]))),128))]),e.createBaseVNode("tfoot",null,[e.createBaseVNode("tr",null,[Le,e.createBaseVNode("td",xe,[e.createBaseVNode("u",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(W)(n,a),e.unref(u))),1)])])])])])]))),128))])):e.createCommentVNode("",!0),e.unref(Y)!==e.unref(e.OctopusEventRateType).FullDayEvent&&!e.unref(f)?(e.openBlock(),e.createElementBlock("div",Oe,[e.createBaseVNode("label",Re,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.selectArrivalTime")),1)]),e.createBaseVNode("ul",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(oe),(n,r)=>(e.openBlock(),e.createElementBlock("li",{key:r},[e.createVNode(C.Checkbox,{modelValue:e.unref(k),"onUpdate:modelValue":l[7]||(l[7]=p=>e.isRef(k)?k.value=p:null),type:"radio",name:"eventTimeTable",val:n.time,label:e.unref(e.showTime)(n.time)},null,8,["modelValue","val","label"])]))),128))])])):e.createCommentVNode("",!0),e.unref(re)?(e.openBlock(),e.createElementBlock("div",qe,[e.createBaseVNode("label",Ae,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.selectProducts")),1)]),e.createBaseVNode("table",Ie,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.addons")),1)]),Me,e.createBaseVNode("th",Ye,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.price")),1)])])]),e.createBaseVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ne).products,({productID:n,productName:r,price:p,description:a})=>(e.openBlock(),e.createElementBlock("tr",{key:n},[e.createBaseVNode("td",null,[e.createBaseVNode("b",null,[e.createBaseVNode("span",null,e.toDisplayString(r),1)]),ze,e.createBaseVNode("span",null,e.toDisplayString(a),1),Qe,e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(p,e.unref(u))),1)]),e.createBaseVNode("td",We,[e.createVNode(A._sfc_main,{modelValue:e.unref(F)[n],"onUpdate:modelValue":s=>e.unref(F)[n]=s,small:!0,"min-value":0},null,8,["modelValue","onUpdate:modelValue"])]),e.createBaseVNode("td",je,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(Q)(n),e.unref(u))),1)])]))),128))])])])):e.createCommentVNode("",!0)]),resume:e.withCtx(()=>[e.createBaseVNode("li",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.numberOfGuests")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(o)),1)]),e.unref(f)?(e.openBlock(),e.createElementBlock("li",He,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.numberOfRooms")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(V)),1)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("li",Je,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.numberOfDays")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(c)),1)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("li",Ke,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.arrival")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showDate)(e.unref(M))),1)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("li",Xe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.departure")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showDate)(e.unref(M),e.unref(c))),1)])):e.createCommentVNode("",!0),!e.unref(f)&&e.unref(k)?(e.openBlock(),e.createElementBlock("li",Ze,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.startOfEvent")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showTime)(e.unref(k))),1)])):e.createCommentVNode("",!0),!e.unref(f)&&e.unref(I)?(e.openBlock(),e.createElementBlock("li",Ge,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("event.lengthOfEvent")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showTime)(e.unref(I))),1)])):e.createCommentVNode("",!0),!e.unref(f)&&e.unref(z)>0?(e.openBlock(),e.createElementBlock("li",et,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.basePrice")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(z),e.unref(u))),1)])):e.createCommentVNode("",!0)]),expenses:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(T),({roomGroupID:n},r)=>(e.openBlock(),e.createElementBlock("li",{key:n},[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.addons"))+" - "+e.toDisplayString(e.unref(t)("booking.reservation.room"))+" #"+e.toDisplayString(r+1),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(W)(n,r),e.unref(u))),1)]))),128))]),_:2},1032,["remark","is-filled","is-loading","base-price","total-price","weekend-fee","room-upgrade","onPrev","onNext"])):e.createCommentVNode("",!0)]),payment:e.withCtx(()=>[e.createVNode(C.CheckoutWindow)]),confirmation:e.withCtx(()=>[e.createVNode(w.ThankYou,{message:e.unref(t)("event.confirmationMessage")},null,8,["message"])]),_:1},8,["slideshow","title","subtitle"])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","styling"]))}});const nt=e._export_sfc(tt,[["__scopeId","data-v-b2eee97d"]]),ot=e.createPinia(),lt=e.Go(),v=e.createApp({components:{Event:nt}});v.use(ot);v.use(lt);v.use(C.StickyPlugin);v.use(e.instance);v.use(w.xt);v.use(e.install,{bootstrap:!0});v.mount("#konnectio-event-app");module.exports=v;
|
package/dist/event.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { k as ge, D as ke, b as Qe, s as z, c as he, r as We, f as Ye, m as t, n as b, W as ze, w as g, A as l, p as r, H as k, F as n, q as e, X as He, Y as ie, v as i, Z as re, x as u, $ as Je, J as $, a0 as Ke, _ as fe, o as Xe, a1 as Ze, G as D, a2 as V, a3 as w, a4 as ue, O as de, T as me, a5 as ce, a6 as je, a7 as G, K as pe, M as Ge, P as xe, Q as el, U as ll, a8 as nl, R as tl, V as al, a9 as ol } from "./SelectField.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { B as sl, M as il, R as rl, T as ul, x as dl } from "./ThankYou-
|
|
3
|
-
import { u as H } from "./event-
|
|
4
|
-
import { A as ml } from "./ActionField-
|
|
5
|
-
import { P as cl, C as ve, a as pl, S as vl } from "./index-
|
|
6
|
-
import { _ as bl } from "./DateField.vue_vue_type_style_index_0_lang-
|
|
7
|
-
import { _ as x } from "./NumberField.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { k as ge, D as ke, b as Qe, s as z, c as he, r as We, f as Ye, m as t, n as b, W as ze, w as g, A as l, p as r, H as k, F as n, q as e, X as He, Y as ie, v as i, Z as re, x as u, $ as Je, J as $, a0 as Ke, _ as fe, o as Xe, a1 as Ze, G as D, a2 as V, a3 as w, a4 as ue, O as de, T as me, a5 as ce, a6 as je, a7 as G, K as pe, M as Ge, P as xe, Q as el, U as ll, a8 as nl, R as tl, V as al, a9 as ol } from "./SelectField.vue_vue_type_style_index_0_lang-9187c95a.js";
|
|
2
|
+
import { B as sl, M as il, R as rl, T as ul, x as dl } from "./ThankYou-d505adc9.js";
|
|
3
|
+
import { u as H } from "./event-9b5b92a7.js";
|
|
4
|
+
import { A as ml } from "./ActionField-cd683106.js";
|
|
5
|
+
import { P as cl, C as ve, a as pl, S as vl } from "./index-524d9d24.js";
|
|
6
|
+
import { _ as bl } from "./DateField.vue_vue_type_style_index_0_lang-239ef816.js";
|
|
7
|
+
import { _ as x } from "./NumberField.vue_vue_type_script_setup_true_lang-ab43cf10.js";
|
|
8
8
|
import "./_commonjsHelpers-aeeeeb92.js";
|
|
9
|
-
import "./_-
|
|
9
|
+
import "./_-e90b6bab.js";
|
|
10
10
|
const gl = { class: "fresh-booking-event-listing-information" }, kl = { key: 0 }, hl = { key: 1 }, fl = /* @__PURE__ */ ge({
|
|
11
11
|
__name: "Event",
|
|
12
12
|
props: {
|
|
@@ -141,7 +141,7 @@ const gl = { class: "fresh-booking-event-listing-information" }, kl = { key: 0 }
|
|
|
141
141
|
]), 1032, ["listing-id", "gallery", "name", "description", "layout"]));
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
|
-
const be = /* @__PURE__ */ fe(fl, [["__scopeId", "data-v-
|
|
144
|
+
const be = /* @__PURE__ */ fe(fl, [["__scopeId", "data-v-013d2269"]]), A = (L) => (xe("data-v-b2eee97d"), L = L(), el(), L), yl = { class: "fresh-booking-panel" }, _l = {
|
|
145
145
|
key: 0,
|
|
146
146
|
id: "fresh-booking-event-overview"
|
|
147
147
|
}, Vl = { class: "fresh-booking-event-listings" }, Pl = { class: "fresh-booking-event-listings" }, Tl = {
|
package/dist/event.js.br
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-a4d7be42.cjs"),g=require("./ActionField-dc98863c.cjs");require("./_commonjsHelpers-6763f629.cjs");require("./NumberField.vue_vue_type_script_setup_true_lang-4b483b4b.cjs");const _=o=>(e.pushScopeId("data-v-5d5827dc"),o=o(),e.popScopeId(),o),y=["innerHTML"],N={key:0,id:"fresh-booking-gift-card-validation-resume",class:"fresh-booking-panel"},B=_(()=>e.createBaseVNode("span",null,"Loading...",-1)),m=e.defineComponent({name:"GiftCardValidationLayout",__name:"GiftCardValidation",props:{accessToken:{},styling:{}},setup(o){const{t:a}=e.useI18n(),{voucher:l,isValid:c,amount:u,expirationDate:p,productName:f,isLoading:i}=e.storeToRefs(e.useApplyGiftCardStore()),{currency:V}=e.storeToRefs(e.useUtilityStore()),{apply:s}=e.useApplyGiftCardStore();return(d,t)=>(e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main$1,{id:"fresh-booking-gift-card-validation-module","access-token":d.accessToken,type:"gift-card",styling:d.styling},{default:e.withCtx(()=>[e.createBaseVNode("form",{onSubmit:t[3]||(t[3]=e.withModifiers(n=>e.unref(s)(),["prevent"]))},[e.createBaseVNode("h4",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCardValidation.title")),1)]),e.createBaseVNode("p",{innerHTML:e.unref(a)("giftCardValidation.description")},null,8,y),e.createVNode(g.ActionField,{modelValue:e.unref(l),"onUpdate:modelValue":t[0]||(t[0]=n=>e.isRef(l)?l.value=n:null),icon:"gift-card",label:e.unref(a)("booking.reservation.giftCardCode"),buttonLabel:e.unref(a)("giftCardValidation.submitButton"),placeholder:"XXXXXXXX","is-loading":e.unref(i),"onUpdate:isLoading":t[1]||(t[1]=n=>e.isRef(i)?i.value=n:null),onAction:t[2]||(t[2]=n=>e.unref(s)())},null,8,["modelValue","label","buttonLabel","is-loading"]),!e.unref(i)&&e.unref(c)?(e.openBlock(),e.createElementBlock("table",N,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCardValidation.giftCard")),1),e.createVNode(e.Icon,{icon:"gift-card",type:"fas",color:"header"})]),e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCardValidation.balance")),1),e.createVNode(e.Icon,{icon:"money-bill",type:"fas",color:"header"})]),e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCardValidation.expirationDate")),1),e.createVNode(e.Icon,{icon:"timer",type:"fas",color:"header"})])])]),e.createBaseVNode("tbody",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(f)),1)]),e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(u),e.unref(V))),1)]),e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDate)(e.unref(p))),1)])])])])):e.createCommentVNode("",!0)],32)]),_:1},8,["access-token","styling"])]),fallback:e.withCtx(()=>[B]),_:1}))}});const C=e._export_sfc(m,[["__scopeId","data-v-5d5827dc"]]),r=e.createApp({components:{GiftCardValidation:C}}),b=e.createPinia();r.use(b);r.use(e.instance);r.mount("#konnectio-gift-card-validation-app");module.exports=r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { k as L, D as S, s as m, a as _, c as X, m as y, n as w, w as p, p as l, A as a, F as o, q as t, G as V, v as x, H as u, J as A, K as G, x as I, L as B, M as D, N, P as T, Q as M, _ as U, R as H, U as P, V as R } from "./SelectField.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { A as $ } from "./ActionField-
|
|
1
|
+
import { k as L, D as S, s as m, a as _, c as X, m as y, n as w, w as p, p as l, A as a, F as o, q as t, G as V, v as x, H as u, J as A, K as G, x as I, L as B, M as D, N, P as T, Q as M, _ as U, R as H, U as P, V as R } from "./SelectField.vue_vue_type_style_index_0_lang-9187c95a.js";
|
|
2
|
+
import { A as $ } from "./ActionField-cd683106.js";
|
|
3
3
|
import "./_commonjsHelpers-aeeeeb92.js";
|
|
4
|
-
import "./NumberField.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import "./NumberField.vue_vue_type_script_setup_true_lang-ab43cf10.js";
|
|
5
5
|
const F = (s) => (T("data-v-5d5827dc"), s = s(), M(), s), q = ["innerHTML"], E = {
|
|
6
6
|
key: 0,
|
|
7
7
|
id: "fresh-booking-gift-card-validation-resume",
|
|
Binary file
|
package/dist/gift-card.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-8dbda757.cjs"),N=require("./index-29b94b33.cjs"),$=require("./_-8101ab39.cjs"),R=require("./Field-9ceb2f44.cjs");require("./_commonjsHelpers-6763f629.cjs");const G=e.defineStore("giftCard",()=>{e.useAlertStore();const{pay:y}=e.usePaymentStore(),{bearerToken:a,metaData:v}=e.storeToRefs(e.useUtilityStore()),i=e.ref(e.GiftCardModuleState.InitialState),f=e.useStorage("konnectio_name","",void 0,{serializer:e.StorageSerializers.string}),g=e.useStorage("konnectio_email","",void 0,{serializer:e.StorageSerializers.string}),d=e.useStorage("konnectio_phone","",void 0,{serializer:e.StorageSerializers.string}),u=e.ref(""),V=e.ref(1),w=e.ref(!0),_=e.ref(""),s=e.ref({base64:"",type:"",name:""}),k=e.ref(void 0),l=e.ref(0),n=e.ref(!1),r=e.ref(0),C=e.computed(()=>i.value===e.GiftCardModuleState.InitialState||i.value===e.GiftCardModuleState.WaitingForResponse),B=e.computed(()=>i.value===e.GiftCardModuleState.ReadyToPay),p=e.computed(()=>i.value===e.GiftCardModuleState.PaymentSuccess),h=e.computed(()=>{const c={1:{label:e.i18n.t("giftCard.hotelType"),data:[]},2:{label:e.i18n.t("giftCard.restaurantType"),data:[]}},t=v.value.places;return t&&t.forEach(m=>{c[m.placeType].data.push(m)}),Object.fromEntries(Object.entries(c).filter(([,m])=>m.data.length>0))}),x=e.computed(()=>r.value!==0),b=e.computed(()=>{let c;if(x.value)c=h.value[r.value].data[0];else if(l.value!==0){const t=k.value,m=h.value[l.value].data;m.length===1?c=m[0]:t!==void 0&&m.forEach(P=>{String(P.id)===String(t)&&(c=P)})}return c}),E=e.computed(()=>!(!f.value||!g.value||!(d.value.length>=5)||!u.value||b.value===void 0)),q=e.computed(()=>!(i.value===e.GiftCardModuleState.InitialState&&n.value)),T=e.computed(()=>!!(i.value===e.GiftCardModuleState.WaitingForResponse&&n.value));async function S(){i.value=e.GiftCardModuleState.WaitingForResponse,n.value=!0,await e.axios.post("https://stage.hotel-service.konnectio.dk/api/gift-card/create",{termsOfserviceURL:"https://freshbooking.dk",checkoutUrl:"https://freshbooking.dk",currencyID:v.value.currency.id,language:e.getUserLanguage(),amount:u.value,quantity:V.value,freeText:_.value,showPrice:w.value,contactName:f.value,contactEmail:g.value,contactPhone:d.value,imageBase64:e.b2a(s.value.base64),imageName:s.value.name,imageFormat:s.value.type,placeType:b.value?b.value.placeType:void 0,placeID:b.value?b.value.id:void 0},{headers:{Authorization:a.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.36"}}).then(c=>{i.value=e.GiftCardModuleState.ReadyToPay,n.value=!1,y({callback:()=>console.log("Callback!"),response:c.data})})}function o(c){c&&(r.value=c)}return{moduleState:i,name:f,email:g,phone:d,value:u,remark:_,showValue:w,quantity:V,media:s,placeId:k,placeType:l,showFormPage:C,showPaymentPage:B,showConfirmationPage:p,places:h,hasFilledForm:E,hasForcedPlaceType:x,isWaitingForResponse:T,isMetaDataAvailable:q,orderGiftCard:S,initialize:o}}),M={class:"media-selector"},D=["accept"],I={class:"media-selector-wrapper"},L={class:"media-selector-tools"},z={key:0},A={key:1},W={key:2},j=["src"],H=e.defineComponent({__name:"MediaSelector",props:{modelValue:{},validation:{default:"image/*"},iconColor:{default:"#000"},label:{},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(y,{emit:a}){const v=a,i=y,{t:f}=e.useI18n(),{display:g}=e.useAlertStore(),d=e.ref(),u=e.computed(()=>i.modelValue.base64!=="");function V(l){v("update:modelValue",l)}function w(){V({base64:"",name:"",type:""}),d.value&&(d.value.value="")}function _(){d.value&&d.value.click()}function s(l,n){const[r,C]=[l.name,l.type],B=new FileReader;B.onload=function(p){if(p.target){const h=p.target.result;n({base64:h,name:r,type:C})}else g({message:f("imageUploadError"),type:"error"})},B.readAsDataURL(l)}async function k(){let l;(l=d.value.files)instanceof FileList&&s(l[0],V)}return(l,n)=>(e.openBlock(),e.createBlock(e.InputField,{label:l.label,required:l.required,type:"media"},{default:e.withCtx(()=>[e.createBaseVNode("div",M,[e.createBaseVNode("input",{ref_key:"fileInput",ref:d,type:"file",class:"hidden",accept:l.validation,single:"",onChange:n[0]||(n[0]=r=>k())},null,40,D),e.createBaseVNode("div",I,[e.createBaseVNode("ul",L,[u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",z,[e.createVNode(e.Clickable,{label:e.unref(f)("uploadFile"),type:"button",icon:"upload","icon-color":l.iconColor,onClickEvent:n[1]||(n[1]=r=>_())},null,8,["label","icon-color"])])),u.value?(e.openBlock(),e.createElementBlock("li",A,[e.createVNode(e.Clickable,{label:e.unref(f)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":l.iconColor,onClickEvent:n[2]||(n[2]=r=>_())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("li",W,[e.createVNode(e.Clickable,{label:e.unref(f)("removeFile"),type:"button",icon:"trash-alt","icon-color":l.iconColor,onClickEvent:n[3]||(n[3]=r=>w())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:u.value}])},[l.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:l.modelValue.base64},null,8,j)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function U(y){const a=y;a.__i18n=a.__i18n||[],a.__i18n.push({locale:"",resource:{da:{uploadFile:{t:0,b:{t:2,i:[{t:3}],s:"Upload billede"}},removeFile:{t:0,b:{t:2,i:[{t:3}],s:"Fjern billede"}},replaceFile:{t:0,b:{t:2,i:[{t:3}],s:"Ersat billede"}},imageUploadError:{t:0,b:{t:2,i:[{t:3}],s:"Der skete en fejl under billede upload!"}}},en:{uploadFile:{t:0,b:{t:2,i:[{t:3}],s:"Upload image"}},removeFile:{t:0,b:{t:2,i:[{t:3}],s:"Remove image"}},replaceFile:{t:0,b:{t:2,i:[{t:3}],s:"Replace image"}},imageUploadError:{t:0,b:{t:2,i:[{t:3}],s:"An error occurred under image upload!"}}}}})}typeof U=="function"&&U(H);const O={class:"gift-card-skeleton"},K={class:"gift-card-skeleton-form"},Y=e.defineComponent({__name:"GiftCardSkeleton",setup(y){return(a,v)=>(e.openBlock(),e.createElementBlock("div",O,[e.createBaseVNode("div",K,[e.createVNode(R.Field),e.createVNode(R.Field),e.createVNode(R.Field),e.createVNode(R.Field),e.createVNode(R.Field,{"is-text-area":""}),e.createVNode($.Element,{height:"44px"})])]))}});const J=e._export_sfc(Y,[["__scopeId","data-v-2600a731"]]),Q={key:0,id:"fresh-booking-gift-card-wrapper"},X={id:"fresh-booking-gift-card-title"},Z={id:"fresh-booking-gift-card-content"},ee={id:"fresh-booking-gift-card-payment"},te=["innerHTML"],ae={key:0},le={key:0,id:"fresh-booking-select-place-type"},oe={class:e.normalizeClass(["fresh-booking-label","required"])},ne={id:"fresh-booking-select-place-type-input"},ie=["innerHTML"],re={key:0,id:"fresh-booking-gift-card-order"},de={class:"fresh-booking-panel"},se={key:1,id:"fresh-booking-gift-card-remarks"},ce={key:2,id:"fresh-booking-gift-card-order-minimal","sticky-side":"bottom"},ue={id:"fresh-booking-gift-card-recaptcha"},fe=e.defineComponent({name:"GiftCardLayout",__name:"GiftCard",props:{accessToken:{},layout:{default:"minimal"},placeType:{},styling:{}},setup(y){const{t:a}=e.useI18n(),{name:v,email:i,phone:f,value:g,remark:d,showValue:u,quantity:V,media:w,placeId:_,placeType:s,showFormPage:k,showPaymentPage:l,showConfirmationPage:n,places:r,hasFilledForm:C,hasForcedPlaceType:B,isWaitingForResponse:p,isMetaDataAvailable:h}=e.storeToRefs(G()),{initialize:x,orderGiftCard:b}=G(),{isRecaptchaEnabled:E,currency:q}=e.storeToRefs(e.useUtilityStore());async function T(){await b()}return e.watch(s,()=>{_.value=void 0}),e.onMounted(()=>{x()}),(S,o)=>{const c=e.resolveDirective("sticky");return e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main$1,{id:"fresh-booking-gift-card-module",type:"gift-card","access-token":S.accessToken,"data-layout":S.layout,styling:S.styling,"sticky-container":""},{default:e.withCtx(()=>[e.unref(h)?(e.openBlock(),e.createElementBlock("div",Q,[e.createBaseVNode("h4",X,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCard.title")),1)]),e.createBaseVNode("div",Z,[e.withDirectives(e.createBaseVNode("div",ee,[e.createVNode(N.CheckoutWindow)],512),[[e.vShow,e.unref(l)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("p",{id:"fresh-booking-gift-card-description",innerHTML:e.unref(a)("giftCard.description")},null,8,te),e.createBaseVNode("form",null,[e.createVNode(e.TextField,{modelValue:e.unref(v),"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(v)?v.value=t:null),type:"text",name:"name",autocomplete:"name",label:e.unref(a)("giftCard.name"),icon:"user-alt",placeholder:e.unref(a)("giftCard.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(e.TextField,{modelValue:e.unref(i),"onUpdate:modelValue":o[1]||(o[1]=t=>e.isRef(i)?i.value=t:null),type:"email",name:"email",autocomplete:"email",label:e.unref(a)("giftCard.email"),icon:"at",placeholder:e.unref(a)("giftCard.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(N.PhoneField,{modelValue:e.unref(f),"onUpdate:modelValue":o[2]||(o[2]=t=>e.isRef(f)?f.value=t:null),icon:"phone-office",label:e.unref(a)("giftCard.phone"),placeholder:e.unref(a)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.unref(B)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ae,[e.unref(r)?(e.openBlock(),e.createElementBlock("div",le,[e.createBaseVNode("label",oe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCard.selectType")),1)]),e.createBaseVNode("div",ne,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(t,m)=>(e.openBlock(),e.createElementBlock("li",{key:m},[e.createVNode(N.Checkbox,{modelValue:e.unref(s),"onUpdate:modelValue":o[3]||(o[3]=P=>e.isRef(s)?s.value=P:null),type:"radio",name:"placeType",val:m,label:t.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(r)[e.unref(s)]&&e.unref(r)[e.unref(s)].data.length>1?(e.openBlock(),e.createBlock(e._sfc_main,{key:0,modelValue:e.unref(_),"onUpdate:modelValue":o[4]||(o[4]=t=>e.isRef(_)?_.value=t:null),placeholder:e.unref(a)("giftCard.selectPlacePlaceholder"),options:e.unref(r)[e.unref(s)].data,labelKey:"name",valueKey:"id",required:""},null,8,["modelValue","placeholder","options"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))])),e.createVNode(e.TextField,{modelValue:e.unref(g),"onUpdate:modelValue":o[5]||(o[5]=t=>e.isRef(g)?g.value=t:null),type:"number",name:"value",label:e.unref(a)("giftCard.value"),icon:"money-bill",placeholder:e.unref(a)("giftCard.valuePlaceholder"),suffix:e.unref(q),required:""},null,8,["modelValue","label","placeholder","suffix"]),e.createVNode(N.Checkbox,{modelValue:e.unref(u),"onUpdate:modelValue":o[6]||(o[6]=t=>e.isRef(u)?u.value=t:null),type:"checkbox",name:"showValue",label:e.unref(a)("giftCard.showValue"),checked:e.unref(u)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createCommentVNode("",!0)])],512),[[e.vShow,e.unref(k)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("div",{innerHTML:e.unref(a)("giftCard.thankYou")},null,8,ie)],512),[[e.vShow,e.unref(n)]])]),S.layout!=="minimal"&&e.unref(k)?(e.openBlock(),e.createElementBlock("div",re,[e.createBaseVNode("div",de,[e.createVNode(e.Clickable,{label:e.unref(a)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(C),"is-loading":e.unref(p),"onUpdate:isLoading":o[9]||(o[9]=t=>e.isRef(p)?p.value=t:null),onClickEvent:T},null,8,["label","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(e.TextField,{modelValue:e.unref(d),"onUpdate:modelValue":o[10]||(o[10]=t=>e.isRef(d)?d.value=t:null),type:"textarea",name:"remark",label:e.unref(a)("giftCard.remark"),icon:"info-circle",placeholder:e.unref(a)("giftCard.remarkPlaceholder")},null,8,["modelValue","label","placeholder"])])):e.createCommentVNode("",!0),e.unref(k)?e.withDirectives((e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(e.Clickable,{label:e.unref(a)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(C),"data-test":"orderGiftCard","is-loading":e.unref(p),"onUpdate:isLoading":o[11]||(o[11]=t=>e.isRef(p)?p.value=t:null),onClickEvent:T},null,8,["label","disabled","is-loading"]),e.withDirectives(e.createBaseVNode("div",ue,[e.createVNode(N._sfc_main)],512),[[e.vShow,e.unref(E)]])])),[[c]]):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","data-layout","styling"])]),fallback:e.withCtx(()=>[e.createVNode(J)]),_:1})}}});const pe=e._export_sfc(fe,[["__scopeId","data-v-e4aa1e4c"]]),me=e.createPinia(),_e=e.Go(),F=e.createApp({components:{GiftCard:pe}});F.use(me);F.use(e.instance);F.use(_e);F.use(N.StickyPlugin);F.use(e.install,{bootstrap:!0});F.mount("#konnectio-gift-card-app");
|
|
1
|
+
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-a4d7be42.cjs"),N=require("./index-85e3a13d.cjs"),M=require("./_-b9738f5d.cjs"),x=require("./Field-825b33aa.cjs");require("./_commonjsHelpers-6763f629.cjs");const U=e.defineStore("giftCard",()=>{const{pay:y}=e.usePaymentStore(),{bearerToken:a,metaData:g,currencyId:h}=e.storeToRefs(e.useUtilityStore()),n=e.ref(e.GiftCardModuleState.InitialState),_=e.useStorage("konnectio_name","",void 0,{serializer:e.StorageSerializers.string}),d=e.useStorage("konnectio_email","",void 0,{serializer:e.StorageSerializers.string}),s=e.useStorage("konnectio_phone","",void 0,{serializer:e.StorageSerializers.string}),b=e.ref(""),F=e.ref(1),p=e.ref(!0),c=e.ref(""),u=e.ref({base64:"",type:"",name:""}),l=e.ref(void 0),i=e.ref(0),r=e.ref(!1),k=e.ref(0),C=e.computed(()=>n.value===e.GiftCardModuleState.InitialState||n.value===e.GiftCardModuleState.WaitingForResponse),f=e.computed(()=>n.value===e.GiftCardModuleState.ReadyToPay),w=e.computed(()=>n.value===e.GiftCardModuleState.PaymentSuccess),R=e.computed(()=>{const t={1:{label:e.i18n.t("giftCard.hotelType"),data:[]},2:{label:e.i18n.t("giftCard.restaurantType"),data:[]}},v=g.value.places;return v&&v.forEach(m=>{t[m.placeType].data.push(m)}),Object.fromEntries(Object.entries(t).filter(([,m])=>m.data.length>0))}),T=e.computed(()=>k.value!==0),V=e.computed(()=>{let t;if(T.value)t=R.value[k.value].data[0];else if(i.value!==0){const v=l.value,m=R.value[i.value].data;m.length===1?t=m[0]:v!==void 0&&m.forEach(G=>{String(G.id)===String(v)&&(t=G)})}return t}),E=e.computed(()=>!(!_.value||!d.value||!(s.value.length>=5)||!b.value||V.value===void 0)),P=e.computed(()=>!(n.value===e.GiftCardModuleState.InitialState&&r.value)),B=e.computed(()=>!!(n.value===e.GiftCardModuleState.WaitingForResponse&&r.value));async function o(){n.value=e.GiftCardModuleState.WaitingForResponse,r.value=!0,await e.axios.post("https://production.hotel-service.konnectio.dk/api/gift-card/create",{termsOfserviceURL:"https://freshbooking.dk",checkoutUrl:"https://freshbooking.dk",currencyID:h.value,language:e.getUserLanguage(),amount:b.value,quantity:F.value,freeText:c.value,showPrice:p.value,contactName:_.value,contactEmail:d.value,contactPhone:s.value,imageBase64:e.b2a(u.value.base64),imageName:u.value.name,imageFormat:u.value.type,placeType:V.value?V.value.placeType:void 0,placeID:V.value?V.value.id:void 0},{headers:{Authorization:a.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.38"}}).then(t=>{n.value=e.GiftCardModuleState.ReadyToPay,r.value=!1,y({callback:()=>console.log("Callback!"),response:t.data})})}function q(t){t&&(k.value=t)}return{moduleState:n,name:_,email:d,phone:s,value:b,remark:c,showValue:p,quantity:F,media:u,placeId:l,placeType:i,showFormPage:C,showPaymentPage:f,showConfirmationPage:w,places:R,hasFilledForm:E,hasForcedPlaceType:T,isWaitingForResponse:B,isMetaDataAvailable:P,orderGiftCard:o,initialize:q}}),D={class:"media-selector"},I=["accept"],L={class:"media-selector-wrapper"},z={class:"media-selector-tools"},A={key:0},W={key:1},j={key:2},H=["src"],O=e.defineComponent({__name:"MediaSelector",props:{modelValue:{},validation:{default:"image/*"},iconColor:{default:"#000"},label:{},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(y,{emit:a}){const g=a,h=y,{t:n}=e.useI18n(),{display:_}=e.useAlertStore(),d=e.ref(),s=e.computed(()=>h.modelValue.base64!=="");function b(l){g("update:modelValue",l)}function F(){b({base64:"",name:"",type:""}),d.value&&(d.value.value="")}function p(){d.value&&d.value.click()}function c(l,i){const[r,k]=[l.name,l.type],C=new FileReader;C.onload=function(f){if(f.target){const w=f.target.result;i({base64:w,name:r,type:k})}else _({message:n("imageUploadError"),type:"error"})},C.readAsDataURL(l)}async function u(){let l;(l=d.value.files)instanceof FileList&&c(l[0],b)}return(l,i)=>(e.openBlock(),e.createBlock(e.InputField,{label:l.label,required:l.required,type:"media"},{default:e.withCtx(()=>[e.createBaseVNode("div",D,[e.createBaseVNode("input",{ref_key:"fileInput",ref:d,type:"file",class:"hidden",accept:l.validation,single:"",onChange:i[0]||(i[0]=r=>u())},null,40,I),e.createBaseVNode("div",L,[e.createBaseVNode("ul",z,[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",A,[e.createVNode(e.Clickable,{label:e.unref(n)("uploadFile"),type:"button",icon:"upload","icon-color":l.iconColor,onClickEvent:i[1]||(i[1]=r=>p())},null,8,["label","icon-color"])])),s.value?(e.openBlock(),e.createElementBlock("li",W,[e.createVNode(e.Clickable,{label:e.unref(n)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":l.iconColor,onClickEvent:i[2]||(i[2]=r=>p())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("li",j,[e.createVNode(e.Clickable,{label:e.unref(n)("removeFile"),type:"button",icon:"trash-alt","icon-color":l.iconColor,onClickEvent:i[3]||(i[3]=r=>F())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:s.value}])},[l.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:l.modelValue.base64},null,8,H)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function $(y){const a=y;a.__i18n=a.__i18n||[],a.__i18n.push({locale:"",resource:{da:{uploadFile:{t:0,b:{t:2,i:[{t:3}],s:"Upload billede"}},removeFile:{t:0,b:{t:2,i:[{t:3}],s:"Fjern billede"}},replaceFile:{t:0,b:{t:2,i:[{t:3}],s:"Ersat billede"}},imageUploadError:{t:0,b:{t:2,i:[{t:3}],s:"Der skete en fejl under billede upload!"}}},en:{uploadFile:{t:0,b:{t:2,i:[{t:3}],s:"Upload image"}},removeFile:{t:0,b:{t:2,i:[{t:3}],s:"Remove image"}},replaceFile:{t:0,b:{t:2,i:[{t:3}],s:"Replace image"}},imageUploadError:{t:0,b:{t:2,i:[{t:3}],s:"An error occurred under image upload!"}}}}})}typeof $=="function"&&$(O);const K={class:"gift-card-skeleton"},Y={class:"gift-card-skeleton-form"},J=e.defineComponent({__name:"GiftCardSkeleton",setup(y){return(a,g)=>(e.openBlock(),e.createElementBlock("div",K,[e.createBaseVNode("div",Y,[e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field,{"is-text-area":""}),e.createVNode(M.Element,{height:"44px"})])]))}});const Q=e._export_sfc(J,[["__scopeId","data-v-2600a731"]]),X={key:0,id:"fresh-booking-gift-card-wrapper"},Z={id:"fresh-booking-gift-card-title"},ee={id:"fresh-booking-gift-card-content"},te={id:"fresh-booking-gift-card-payment"},ae=["innerHTML"],le={key:0},oe={key:0,id:"fresh-booking-select-place-type"},ne={class:e.normalizeClass(["fresh-booking-label","required"])},ie={id:"fresh-booking-select-place-type-input"},re=["innerHTML"],de={key:0,id:"fresh-booking-gift-card-order"},se={class:"fresh-booking-panel"},ce={key:1,id:"fresh-booking-gift-card-remarks"},ue={key:2,id:"fresh-booking-gift-card-order-minimal","sticky-side":"bottom"},fe={id:"fresh-booking-gift-card-recaptcha"},pe=e.defineComponent({name:"GiftCardLayout",__name:"GiftCard",props:{accessToken:{},layout:{default:"minimal"},placeType:{},styling:{}},setup(y){const{t:a}=e.useI18n(),{name:g,email:h,phone:n,value:_,remark:d,showValue:s,quantity:b,media:F,placeId:p,placeType:c,showFormPage:u,showPaymentPage:l,showConfirmationPage:i,places:r,hasFilledForm:k,hasForcedPlaceType:C,isWaitingForResponse:f,isMetaDataAvailable:w}=e.storeToRefs(U()),{initialize:R,orderGiftCard:T}=U(),{isRecaptchaEnabled:V,currency:E}=e.storeToRefs(e.useUtilityStore());async function P(){await T()}return e.watch(c,()=>{p.value=void 0}),e.onMounted(()=>{R()}),(B,o)=>{const q=e.resolveDirective("sticky");return e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main$1,{id:"fresh-booking-gift-card-module",type:"gift-card","access-token":B.accessToken,"data-layout":B.layout,styling:B.styling,"sticky-container":""},{default:e.withCtx(()=>[e.unref(w)?(e.openBlock(),e.createElementBlock("div",X,[e.createBaseVNode("h4",Z,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCard.title")),1)]),e.createBaseVNode("div",ee,[e.withDirectives(e.createBaseVNode("div",te,[e.createVNode(N.CheckoutWindow)],512),[[e.vShow,e.unref(l)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("p",{id:"fresh-booking-gift-card-description",innerHTML:e.unref(a)("giftCard.description")},null,8,ae),e.createBaseVNode("form",null,[e.createVNode(e.TextField,{modelValue:e.unref(g),"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(g)?g.value=t:null),type:"text",name:"name",autocomplete:"name",label:e.unref(a)("giftCard.name"),icon:"user-alt",placeholder:e.unref(a)("giftCard.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(e.TextField,{modelValue:e.unref(h),"onUpdate:modelValue":o[1]||(o[1]=t=>e.isRef(h)?h.value=t:null),type:"email",name:"email",autocomplete:"email",label:e.unref(a)("giftCard.email"),icon:"at",placeholder:e.unref(a)("giftCard.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(N.PhoneField,{modelValue:e.unref(n),"onUpdate:modelValue":o[2]||(o[2]=t=>e.isRef(n)?n.value=t:null),icon:"phone-office",label:e.unref(a)("giftCard.phone"),placeholder:e.unref(a)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.unref(C)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",le,[e.unref(r)?(e.openBlock(),e.createElementBlock("div",oe,[e.createBaseVNode("label",ne,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCard.selectType")),1)]),e.createBaseVNode("div",ie,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(t,v)=>(e.openBlock(),e.createElementBlock("li",{key:v},[e.createVNode(N.Checkbox,{modelValue:e.unref(c),"onUpdate:modelValue":o[3]||(o[3]=m=>e.isRef(c)?c.value=m:null),type:"radio",name:"placeType",val:v,label:t.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(r)[e.unref(c)]&&e.unref(r)[e.unref(c)].data.length>1?(e.openBlock(),e.createBlock(e._sfc_main,{key:0,modelValue:e.unref(p),"onUpdate:modelValue":o[4]||(o[4]=t=>e.isRef(p)?p.value=t:null),placeholder:e.unref(a)("giftCard.selectPlacePlaceholder"),options:e.unref(r)[e.unref(c)].data,labelKey:"name",valueKey:"id",required:""},null,8,["modelValue","placeholder","options"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))])),e.createVNode(e.TextField,{modelValue:e.unref(_),"onUpdate:modelValue":o[5]||(o[5]=t=>e.isRef(_)?_.value=t:null),type:"number",name:"value",label:e.unref(a)("giftCard.value"),icon:"money-bill",placeholder:e.unref(a)("giftCard.valuePlaceholder"),suffix:e.unref(E),required:""},null,8,["modelValue","label","placeholder","suffix"]),e.createVNode(N.Checkbox,{modelValue:e.unref(s),"onUpdate:modelValue":o[6]||(o[6]=t=>e.isRef(s)?s.value=t:null),type:"checkbox",name:"showValue",label:e.unref(a)("giftCard.showValue"),checked:e.unref(s)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createCommentVNode("",!0)])],512),[[e.vShow,e.unref(u)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("div",{innerHTML:e.unref(a)("giftCard.thankYou")},null,8,re)],512),[[e.vShow,e.unref(i)]])]),B.layout!=="minimal"&&e.unref(u)?(e.openBlock(),e.createElementBlock("div",de,[e.createBaseVNode("div",se,[e.createVNode(e.Clickable,{label:e.unref(a)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(k),"is-loading":e.unref(f),"onUpdate:isLoading":o[9]||(o[9]=t=>e.isRef(f)?f.value=t:null),onClickEvent:P},null,8,["label","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(u)?(e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(e.TextField,{modelValue:e.unref(d),"onUpdate:modelValue":o[10]||(o[10]=t=>e.isRef(d)?d.value=t:null),type:"textarea",name:"remark",label:e.unref(a)("giftCard.remark"),icon:"info-circle",placeholder:e.unref(a)("giftCard.remarkPlaceholder")},null,8,["modelValue","label","placeholder"])])):e.createCommentVNode("",!0),e.unref(u)?e.withDirectives((e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(e.Clickable,{label:e.unref(a)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(k),"data-test":"orderGiftCard","is-loading":e.unref(f),"onUpdate:isLoading":o[11]||(o[11]=t=>e.isRef(f)?f.value=t:null),onClickEvent:P},null,8,["label","disabled","is-loading"]),e.withDirectives(e.createBaseVNode("div",fe,[e.createVNode(N._sfc_main)],512),[[e.vShow,e.unref(V)]])])),[[q]]):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","data-layout","styling"])]),fallback:e.withCtx(()=>[e.createVNode(Q)]),_:1})}}});const me=e._export_sfc(pe,[["__scopeId","data-v-e4aa1e4c"]]),_e=e.createPinia(),ve=e.Go(),S=e.createApp({components:{GiftCard:me}});S.use(_e);S.use(e.instance);S.use(ve);S.use(N.StickyPlugin);S.use(e.install,{bootstrap:!0});S.mount("#konnectio-gift-card-app");
|