@konnectio/core 4.0.20 → 4.0.21
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-b64a1572.js → ActionField-7685b1ca.js} +2 -2
- package/dist/ActionField-7685b1ca.js.br +0 -0
- package/dist/{ActionField-11f4ccee.cjs → ActionField-f278c92a.cjs} +1 -1
- package/dist/{AvailabilitySkeleton-7e2eb59c.js → AvailabilitySkeleton-9f7adad1.js} +15 -15
- package/dist/AvailabilitySkeleton-9f7adad1.js.br +0 -0
- package/dist/{AvailabilitySkeleton-7ffbfe43.cjs → AvailabilitySkeleton-b8004f01.cjs} +1 -1
- package/dist/{DateField.vue_vue_type_style_index_0_lang-02fb5e5b.js → DateField.vue_vue_type_style_index_0_lang-4d19c297.js} +2750 -2780
- package/dist/DateField.vue_vue_type_style_index_0_lang-4d19c297.js.br +0 -0
- package/dist/{DateField.vue_vue_type_style_index_0_lang-c71c3980.cjs → DateField.vue_vue_type_style_index_0_lang-66f33a43.cjs} +3 -3
- package/dist/{Field-efcdcec2.cjs → Field-7bca22a3.cjs} +1 -1
- package/dist/{Field-b1950c55.js → Field-850f6158.js} +2 -2
- package/dist/Field-850f6158.js.br +0 -0
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-d5f3da80.js → NumberField.vue_vue_type_script_setup_true_lang-615d58a2.js} +2 -2
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-615d58a2.js.br +0 -0
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-4edef708.cjs → NumberField.vue_vue_type_script_setup_true_lang-9af13100.cjs} +1 -1
- package/dist/{SelectField.vue_vue_type_style_index_0_lang-3fb22f7d.js → SelectField.vue_vue_type_style_index_0_lang-de13480f.js} +8358 -8473
- package/dist/SelectField.vue_vue_type_style_index_0_lang-de13480f.js.br +0 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-f2eadc00.cjs +855 -0
- package/dist/{ThankYou-74362b99.cjs → ThankYou-328e6196.cjs} +6 -6
- package/dist/{ThankYou-aa12ca2d.js → ThankYou-ce7a43f1.js} +1489 -1459
- package/dist/ThankYou-ce7a43f1.js.br +0 -0
- package/dist/{_-4e24cc83.js → _-55d616f9.js} +1 -1
- package/dist/_-55d616f9.js.br +0 -0
- package/dist/{_-29774432.cjs → _-72d06a62.cjs} +1 -1
- package/dist/availability.cjs +2 -2
- package/dist/availability.js +7 -7
- package/dist/availability.js.br +0 -0
- package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +1 -1
- package/dist/components/forms/MultiStepForm.vue.d.ts +1 -1
- package/dist/components/forms/ReservationForm.vue.d.ts +1 -1
- package/dist/components/listings/Hotel.vue.d.ts +1 -1
- package/dist/{event-35c4accb.cjs → event-67cf0ebb.cjs} +1 -1
- package/dist/{event-9664d920.js → event-d42b8289.js} +9 -9
- package/dist/event-d42b8289.js.br +0 -0
- package/dist/event.cjs +1 -1
- package/dist/event.js +37 -37
- 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 +5 -5
- package/dist/gift-card.js.br +0 -0
- package/dist/hotel.cjs +5 -5
- package/dist/hotel.js +75 -73
- package/dist/hotel.js.br +0 -0
- package/dist/{index-c6a01479.cjs → index-85780e6d.cjs} +1 -1
- package/dist/{index-61423a7a.js → index-a6e71920.js} +1 -1
- package/dist/index-a6e71920.js.br +0 -0
- package/dist/polyfill.cjs +1 -1
- package/dist/polyfill.js +1 -1
- package/dist/polyfill.js.br +0 -0
- package/dist/store/availability.d.ts +1 -1
- package/dist/store/event.d.ts +1 -1
- package/dist/store/hotel.d.ts +1 -1
- package/dist/store/payment.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/style.css.br +0 -0
- package/package.json +7 -7
- package/dist/ActionField-b64a1572.js.br +0 -0
- package/dist/AvailabilitySkeleton-7e2eb59c.js.br +0 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-02fb5e5b.js.br +0 -0
- package/dist/Field-b1950c55.js.br +0 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-d5f3da80.js.br +0 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-3fb22f7d.js.br +0 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-5d0dffb8.cjs +0 -855
- package/dist/ThankYou-aa12ca2d.js.br +0 -0
- package/dist/_-4e24cc83.js.br +0 -0
- package/dist/event-9664d920.js.br +0 -0
- package/dist/index-61423a7a.js.br +0 -0
package/dist/event.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { h as ge, z as he, u as
|
|
2
|
-
import { P as ol, C as ve, a as sl, S as il, i as rl } from "./index-
|
|
3
|
-
import { B as ul, M as dl, R as ml, T as cl, x as pl } from "./ThankYou-
|
|
4
|
-
import { u as J } from "./event-
|
|
5
|
-
import { A as vl } from "./ActionField-
|
|
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 { h as ge, z as he, u as ze, s as Y, a as ke, r as Qe, c as We, k as t, l as b, W as Ye, w as g, x as l, m as r, D as h, A as n, n as e, X as Je, Y as ie, q as i, Z as re, t as u, $ as Xe, F as $, a0 as Ze, _ as fe, o as je, a1 as Ge, B as D, a2 as V, a3 as w, a4 as ue, O as de, T as me, a5 as ce, a6 as He, a7 as K, G as pe, J as Ke, L as xe, M as el, P as ll, a8 as nl, N as tl, Q as al } from "./SelectField.vue_vue_type_style_index_0_lang-de13480f.js";
|
|
2
|
+
import { P as ol, C as ve, a as sl, S as il, i as rl } from "./index-a6e71920.js";
|
|
3
|
+
import { B as ul, M as dl, R as ml, T as cl, x as pl } from "./ThankYou-ce7a43f1.js";
|
|
4
|
+
import { u as J } from "./event-d42b8289.js";
|
|
5
|
+
import { A as vl } from "./ActionField-7685b1ca.js";
|
|
6
|
+
import { _ as bl } from "./DateField.vue_vue_type_style_index_0_lang-4d19c297.js";
|
|
7
|
+
import { _ as x } from "./NumberField.vue_vue_type_script_setup_true_lang-615d58a2.js";
|
|
8
8
|
import "./_commonjsHelpers-aeeeeb92.js";
|
|
9
|
-
import "./_-
|
|
9
|
+
import "./_-55d616f9.js";
|
|
10
10
|
const gl = { class: "fresh-booking-event-listing-information" }, hl = { key: 0 }, kl = { key: 1 }, fl = /* @__PURE__ */ ge({
|
|
11
11
|
__name: "Event",
|
|
12
12
|
props: {
|
|
@@ -30,7 +30,7 @@ const gl = { class: "fresh-booking-event-listing-information" }, hl = { key: 0 }
|
|
|
30
30
|
callback: {}
|
|
31
31
|
},
|
|
32
32
|
setup(B) {
|
|
33
|
-
const { t: a } = he(), v = B, { display: E } =
|
|
33
|
+
const { t: a } = he(), v = B, { display: E } = ze(), { currency: I } = Y(ke()), {
|
|
34
34
|
maxNumberOfPeople: C,
|
|
35
35
|
numberOfPeople: X,
|
|
36
36
|
eventId: U,
|
|
@@ -39,7 +39,7 @@ const gl = { class: "fresh-booking-event-listing-information" }, hl = { key: 0 }
|
|
|
39
39
|
getTemplateAvailability: N,
|
|
40
40
|
getEventAvailability: S,
|
|
41
41
|
isEventListingLoading: O
|
|
42
|
-
} = J(), P = Qe(0),
|
|
42
|
+
} = J(), P = Qe(0), z = We(() => O(v.listingId)), Z = () => {
|
|
43
43
|
P.value > 0 ? (U.value = v.listingId, X.value = P.value, N(v.callback)) : E({
|
|
44
44
|
type: "error",
|
|
45
45
|
message: a("alert.error.selectPeople")
|
|
@@ -67,8 +67,8 @@ const gl = { class: "fresh-booking-event-listing-information" }, hl = { key: 0 }
|
|
|
67
67
|
buttonDisabled: s.soldOut,
|
|
68
68
|
"min-value": s.type === "event" ? 1 : s.minimumPersonCount,
|
|
69
69
|
"max-value": s.type === "event" ? s.maxOnlineReservationLimit || 1 / 0 : e(C),
|
|
70
|
-
"is-loading":
|
|
71
|
-
"onUpdate:isLoading": f[1] || (f[1] = (F) =>
|
|
70
|
+
"is-loading": z.value,
|
|
71
|
+
"onUpdate:isLoading": f[1] || (f[1] = (F) => z.value = F),
|
|
72
72
|
onAction: f[2] || (f[2] = (F) => s.type === "event" ? k() : Z())
|
|
73
73
|
}, null, 8, ["modelValue", "label", "buttonLabel", "buttonDisabled", "min-value", "max-value", "is-loading"])
|
|
74
74
|
]),
|
|
@@ -132,7 +132,7 @@ const gl = { class: "fresh-booking-event-listing-information" }, hl = { key: 0 }
|
|
|
132
132
|
icon: "money-bill",
|
|
133
133
|
color: "header"
|
|
134
134
|
}),
|
|
135
|
-
l("span", null, n(`${e(a)("general.pricesFrom")} ${e($)(s.fromPrice, e(
|
|
135
|
+
l("span", null, n(`${e(a)("general.pricesFrom")} ${e($)(s.fromPrice, e(I))}`), 1)
|
|
136
136
|
])
|
|
137
137
|
])
|
|
138
138
|
]),
|
|
@@ -147,7 +147,7 @@ const be = /* @__PURE__ */ fe(fl, [["__scopeId", "data-v-4a459a74"]]), A = (B) =
|
|
|
147
147
|
}, Vl = { class: "fresh-booking-event-listings" }, Pl = { class: "fresh-booking-event-listings" }, Tl = {
|
|
148
148
|
key: 2,
|
|
149
149
|
id: "fresh-booking-event-addons"
|
|
150
|
-
}, $l = { class: "fresh-booking-table" }, El = /* @__PURE__ */ A(() => /* @__PURE__ */ l("th", { class: "fresh-booking-event-addons-input" }, null, -1)), Ol = { class: "fresh-booking-event-addons-price" }, Dl = /* @__PURE__ */ A(() => /* @__PURE__ */ l("br", null, null, -1)), wl = { class: "fresh-booking-event-addons-input" }, Ll = { class: "fresh-booking-event-addons-price" }, Bl = /* @__PURE__ */ A(() => /* @__PURE__ */ l("td", { colspan: "2" }, null, -1)), Cl = { class: "fresh-booking-event-addons-price" }, Ul = { key: 3 }, Fl = { class: "fresh-booking-label required" }, Al = { id: "fresh-booking-event-table" }, Rl = { key: 4 }, Nl = { class: "fresh-booking-label required" }, Sl = { class: "fresh-booking-table" }, ql = /* @__PURE__ */ A(() => /* @__PURE__ */ l("th", { class: "fresh-booking-event-addons-input" }, null, -1)), Ml = { class: "fresh-booking-event-addons-price" },
|
|
150
|
+
}, $l = { class: "fresh-booking-table" }, El = /* @__PURE__ */ A(() => /* @__PURE__ */ l("th", { class: "fresh-booking-event-addons-input" }, null, -1)), Ol = { class: "fresh-booking-event-addons-price" }, Dl = /* @__PURE__ */ A(() => /* @__PURE__ */ l("br", null, null, -1)), wl = { class: "fresh-booking-event-addons-input" }, Ll = { class: "fresh-booking-event-addons-price" }, Bl = /* @__PURE__ */ A(() => /* @__PURE__ */ l("td", { colspan: "2" }, null, -1)), Cl = { class: "fresh-booking-event-addons-price" }, Ul = { key: 3 }, Fl = { class: "fresh-booking-label required" }, Al = { id: "fresh-booking-event-table" }, Rl = { key: 4 }, Nl = { class: "fresh-booking-label required" }, Sl = { class: "fresh-booking-table" }, ql = /* @__PURE__ */ A(() => /* @__PURE__ */ l("th", { class: "fresh-booking-event-addons-input" }, null, -1)), Ml = { class: "fresh-booking-event-addons-price" }, Il = /* @__PURE__ */ A(() => /* @__PURE__ */ l("br", null, null, -1)), zl = /* @__PURE__ */ A(() => /* @__PURE__ */ l("br", null, null, -1)), Ql = { class: "fresh-booking-event-addons-input" }, Wl = { class: "fresh-booking-event-addons-price" }, Yl = { key: 0 }, Jl = { key: 1 }, Xl = { key: 2 }, Zl = { key: 3 }, jl = { key: 4 }, Gl = { key: 5 }, Hl = { key: 6 }, Kl = /* @__PURE__ */ ge({
|
|
151
151
|
name: "EventLayout",
|
|
152
152
|
__name: "Event",
|
|
153
153
|
props: {
|
|
@@ -158,7 +158,7 @@ const be = /* @__PURE__ */ fe(fl, [["__scopeId", "data-v-4a459a74"]]), A = (B) =
|
|
|
158
158
|
const { t: a } = he(), {
|
|
159
159
|
searchDate: v,
|
|
160
160
|
addons: E,
|
|
161
|
-
products:
|
|
161
|
+
products: I,
|
|
162
162
|
numberOfDays: C,
|
|
163
163
|
discountCode: X,
|
|
164
164
|
name: U,
|
|
@@ -167,7 +167,7 @@ const be = /* @__PURE__ */ fe(fl, [["__scopeId", "data-v-4a459a74"]]), A = (B) =
|
|
|
167
167
|
remark: S,
|
|
168
168
|
arrivalTime: O,
|
|
169
169
|
title: P,
|
|
170
|
-
subtitle:
|
|
170
|
+
subtitle: z,
|
|
171
171
|
slideshow: Z,
|
|
172
172
|
currency: k,
|
|
173
173
|
numberOfPeople: s,
|
|
@@ -206,9 +206,9 @@ const be = /* @__PURE__ */ fe(fl, [["__scopeId", "data-v-4a459a74"]]), A = (B) =
|
|
|
206
206
|
reset: qe
|
|
207
207
|
} = J(), {
|
|
208
208
|
hideEvents: Me,
|
|
209
|
-
hideEventTemplates:
|
|
209
|
+
hideEventTemplates: Ie
|
|
210
210
|
} = Y(ke());
|
|
211
|
-
return je(() => Re()),
|
|
211
|
+
return je(() => Re()), Ge(v, () => Ne()), (se, d) => (t(), b(Ke, {
|
|
212
212
|
id: "fresh-booking-event-module",
|
|
213
213
|
class: "fresh-booking-app",
|
|
214
214
|
type: "event",
|
|
@@ -220,7 +220,7 @@ const be = /* @__PURE__ */ fe(fl, [["__scopeId", "data-v-4a459a74"]]), A = (B) =
|
|
|
220
220
|
key: 0,
|
|
221
221
|
slideshow: e(Z),
|
|
222
222
|
title: e(P),
|
|
223
|
-
subtitle: e(
|
|
223
|
+
subtitle: e(z)
|
|
224
224
|
}, {
|
|
225
225
|
availability: g(({ next: W }) => [
|
|
226
226
|
l("div", yl, [
|
|
@@ -251,15 +251,15 @@ const be = /* @__PURE__ */ fe(fl, [["__scopeId", "data-v-4a459a74"]]), A = (B) =
|
|
|
251
251
|
fromDate: p,
|
|
252
252
|
toDate: q,
|
|
253
253
|
tableGroupID: j,
|
|
254
|
-
description:
|
|
255
|
-
soldOut:
|
|
254
|
+
description: G,
|
|
255
|
+
soldOut: H,
|
|
256
256
|
maxOnlineReservationLimit: M
|
|
257
257
|
}) => (t(), b(be, {
|
|
258
258
|
key: y,
|
|
259
259
|
type: "event",
|
|
260
260
|
"listing-id": y,
|
|
261
261
|
"table-group-id": j,
|
|
262
|
-
description:
|
|
262
|
+
description: G,
|
|
263
263
|
name: c,
|
|
264
264
|
days: o,
|
|
265
265
|
"from-date": p,
|
|
@@ -267,12 +267,12 @@ const be = /* @__PURE__ */ fe(fl, [["__scopeId", "data-v-4a459a74"]]), A = (B) =
|
|
|
267
267
|
"max-online-reservation-limit": M,
|
|
268
268
|
"time-from": _,
|
|
269
269
|
"time-to": m,
|
|
270
|
-
"sold-out":
|
|
270
|
+
"sold-out": H,
|
|
271
271
|
callback: W
|
|
272
272
|
}, 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))
|
|
273
273
|
])
|
|
274
274
|
], 64)) : u("", !0),
|
|
275
|
-
e(Te) && !e(
|
|
275
|
+
e(Te) && !e(Ie) ? (t(), i(V, { key: 1 }, [
|
|
276
276
|
l("h2", null, [
|
|
277
277
|
r(h, {
|
|
278
278
|
icon: "stars",
|
|
@@ -391,13 +391,13 @@ const be = /* @__PURE__ */ fe(fl, [["__scopeId", "data-v-4a459a74"]]), A = (B) =
|
|
|
391
391
|
addonID: p,
|
|
392
392
|
cardinality: q,
|
|
393
393
|
name: j,
|
|
394
|
-
price:
|
|
395
|
-
quantityStrategy:
|
|
394
|
+
price: G,
|
|
395
|
+
quantityStrategy: H
|
|
396
396
|
}) => (t(), i("tr", { key: p }, [
|
|
397
397
|
l("td", null, [
|
|
398
398
|
l("b", null, n(j), 1),
|
|
399
399
|
Dl,
|
|
400
|
-
l("span", null, n(e($)(
|
|
400
|
+
l("span", null, n(e($)(G, e(k))) + " " + n(e(He)(H)), 1)
|
|
401
401
|
]),
|
|
402
402
|
l("td", wl, [
|
|
403
403
|
q === 3 ? (t(), b(x, {
|
|
@@ -443,7 +443,7 @@ const be = /* @__PURE__ */ fe(fl, [["__scopeId", "data-v-4a459a74"]]), A = (B) =
|
|
|
443
443
|
type: "radio",
|
|
444
444
|
name: "eventTimeTable",
|
|
445
445
|
val: o.time,
|
|
446
|
-
label: e(
|
|
446
|
+
label: e(K)(o.time)
|
|
447
447
|
}, null, 8, ["modelValue", "val", "label"])
|
|
448
448
|
]))), 128))
|
|
449
449
|
])
|
|
@@ -470,15 +470,15 @@ const be = /* @__PURE__ */ fe(fl, [["__scopeId", "data-v-4a459a74"]]), A = (B) =
|
|
|
470
470
|
l("b", null, [
|
|
471
471
|
l("span", null, n(c), 1)
|
|
472
472
|
]),
|
|
473
|
-
zl,
|
|
474
|
-
l("span", null, n(m), 1),
|
|
475
473
|
Il,
|
|
474
|
+
l("span", null, n(m), 1),
|
|
475
|
+
zl,
|
|
476
476
|
l("span", null, n(e($)(_, e(k))), 1)
|
|
477
477
|
]),
|
|
478
478
|
l("td", Ql, [
|
|
479
479
|
r(x, {
|
|
480
|
-
modelValue: e(
|
|
481
|
-
"onUpdate:modelValue": (p) => e(
|
|
480
|
+
modelValue: e(I)[o],
|
|
481
|
+
"onUpdate:modelValue": (p) => e(I)[o] = p,
|
|
482
482
|
small: !0,
|
|
483
483
|
"min-value": 0
|
|
484
484
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
@@ -514,13 +514,13 @@ const be = /* @__PURE__ */ fe(fl, [["__scopeId", "data-v-4a459a74"]]), A = (B) =
|
|
|
514
514
|
])) : u("", !0),
|
|
515
515
|
!e(T) && e(O) ? (t(), i("li", jl, [
|
|
516
516
|
l("span", null, n(e(a)("event.startOfEvent")), 1),
|
|
517
|
-
l("b", null, n(e(
|
|
517
|
+
l("b", null, n(e(K)(e(O))), 1)
|
|
518
518
|
])) : u("", !0),
|
|
519
|
-
!e(T) && e(ee) ? (t(), i("li",
|
|
519
|
+
!e(T) && e(ee) ? (t(), i("li", Gl, [
|
|
520
520
|
l("span", null, n(e(a)("event.lengthOfEvent")), 1),
|
|
521
|
-
l("b", null, n(e(
|
|
521
|
+
l("b", null, n(e(K)(e(ee))), 1)
|
|
522
522
|
])) : u("", !0),
|
|
523
|
-
!e(T) && e(te) > 0 ? (t(), i("li",
|
|
523
|
+
!e(T) && e(te) > 0 ? (t(), i("li", Hl, [
|
|
524
524
|
l("span", null, n(e(a)("booking.availability.basePrice")), 1),
|
|
525
525
|
l("b", null, n(e($)(e(te), e(k))), 1)
|
|
526
526
|
])) : u("", !0)
|
|
@@ -549,7 +549,7 @@ const be = /* @__PURE__ */ fe(fl, [["__scopeId", "data-v-4a459a74"]]), A = (B) =
|
|
|
549
549
|
}, 8, ["access-token", "styling"]));
|
|
550
550
|
}
|
|
551
551
|
});
|
|
552
|
-
const xl = /* @__PURE__ */ fe(
|
|
552
|
+
const xl = /* @__PURE__ */ fe(Kl, [["__scopeId", "data-v-b2eee97d"]]), en = ll(), ln = nl(), L = tl({ components: { Event: xl } });
|
|
553
553
|
L.use(en);
|
|
554
554
|
L.use(ln);
|
|
555
555
|
L.use(il);
|
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-f2eadc00.cjs"),c=require("./NumberField.vue_vue_type_script_setup_true_lang-9af13100.cjs"),_=require("./ActionField-f278c92a.cjs");require("./_commonjsHelpers-6763f629.cjs");const y=o=>(e.pushScopeId("data-v-5d5827dc"),o=o(),e.popScopeId(),o),N=["innerHTML"],B={key:0,id:"fresh-booking-gift-card-validation-resume",class:"fresh-booking-panel"},m=y(()=>e.createBaseVNode("span",null,"Loading...",-1)),C=e.defineComponent({name:"GiftCardValidationLayout",__name:"GiftCardValidation",props:{accessToken:{},styling:{}},setup(o){const{t:a}=e.useI18n(),{voucher:l,isValid:u,amount:p,expirationDate:f,productName:V,isLoading:i}=e.storeToRefs(c.useApplyGiftCardStore()),{currency:g}=e.storeToRefs(e.useUtilityStore()),{apply:s}=c.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,N),e.createVNode(_.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(u)?(e.openBlock(),e.createElementBlock("table",B,[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(V)),1)]),e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(p),e.unref(g))),1)]),e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDate)(e.unref(f))),1)])])])])):e.createCommentVNode("",!0)],32)]),_:1},8,["access-token","styling"])]),fallback:e.withCtx(()=>[m]),_:1}))}});const b=e._export_sfc(C,[["__scopeId","data-v-5d5827dc"]]),r=e.createApp({components:{GiftCardValidation:b}}),v=e.createPinia();r.use(v);r.use(e.instance);r.mount("#konnectio-gift-card-validation-app");module.exports=r;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h as L, z as S, s as g, a as X, k as _, l as w, w as u, m as l, x as a, A as o, n as t, B as y, q as x, D as p, F as A, G as B, t as G, H as I, J as D, K as N, L as T, M, _ as H, N as P, P as U, Q as $ } from "./SelectField.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { u as b } from "./NumberField.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { A as F } from "./ActionField-
|
|
1
|
+
import { h as L, z as S, s as g, a as X, k as _, l as w, w as u, m as l, x as a, A as o, n as t, B as y, q as x, D as p, F as A, G as B, t as G, H as I, J as D, K as N, L as T, M, _ as H, N as P, P as U, Q as $ } from "./SelectField.vue_vue_type_style_index_0_lang-de13480f.js";
|
|
2
|
+
import { u as b } from "./NumberField.vue_vue_type_script_setup_true_lang-615d58a2.js";
|
|
3
|
+
import { A as F } from "./ActionField-7685b1ca.js";
|
|
4
4
|
import "./_commonjsHelpers-aeeeeb92.js";
|
|
5
5
|
const R = (s) => (T("data-v-5d5827dc"), s = s(), M(), s), q = ["innerHTML"], z = {
|
|
6
6
|
key: 0,
|
|
Binary file
|
package/dist/gift-card.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-5d0dffb8.cjs"),V=require("./index-c6a01479.cjs"),G=require("./_-29774432.cjs"),R=require("./Field-efcdcec2.cjs");require("./_commonjsHelpers-6763f629.cjs");const q=e.defineStore("giftCard",()=>{e.useAlertStore();const{pay:y}=G.usePaymentStore(),{bearerToken:l,metaData:o}=e.storeToRefs(e.useUtilityStore()),t=e.ref(e.GiftCardModuleState.InitialState),p=e.useStorage("konnectio_name","",void 0,{serializer:e.StorageSerializers.string}),g=e.useStorage("konnectio_email","",void 0,{serializer:e.StorageSerializers.string}),c=e.useStorage("konnectio_phone","",void 0,{serializer:e.StorageSerializers.string}),f=e.ref(""),C=e.ref(1),w=e.ref(!0),v=e.ref(""),s=e.ref({base64:"",type:"",name:""}),k=e.ref(void 0),n=e.ref(0),i=e.ref(!1),d=e.ref(0),B=e.computed(()=>t.value===e.GiftCardModuleState.InitialState||t.value===e.GiftCardModuleState.WaitingForResponse),S=e.computed(()=>t.value===e.GiftCardModuleState.ReadyToPay),m=e.computed(()=>t.value===e.GiftCardModuleState.PaymentSuccess),h=e.computed(()=>{const u={1:{label:e.i18n.t("giftCard.hotelType"),data:[]},2:{label:e.i18n.t("giftCard.restaurantType"),data:[]}},a=o.value.places;return a&&a.forEach(_=>{u[_.placeType].data.push(_)}),Object.fromEntries(Object.entries(u).filter(([,_])=>_.data.length>0))}),x=e.computed(()=>d.value!==0),b=e.computed(()=>{let u;if(x.value)u=h.value[d.value].data[0];else if(n.value!==0){const a=k.value,_=h.value[n.value].data;_.length===1?u=_[0]:a!==void 0&&_.forEach(z=>{String(z.id)===String(a)&&(u=z)})}return u}),P=e.computed(()=>!(!p.value||!g.value||!(c.value.length>=5)||!f.value||b.value===void 0)),E=e.computed(()=>!(t.value===e.GiftCardModuleState.InitialState&&i.value)),T=e.computed(()=>!!(t.value===e.GiftCardModuleState.WaitingForResponse&&i.value));async function N(){t.value=e.GiftCardModuleState.WaitingForResponse,i.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:o.value.currency.id,language:e.getUserLanguage(),amount:f.value,quantity:C.value,freeText:v.value,showPrice:w.value,contactName:p.value,contactEmail:g.value,contactPhone:c.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:l.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.20"}}).then(u=>{t.value=e.GiftCardModuleState.ReadyToPay,i.value=!1,y({callback:()=>console.log("Callback!"),response:u.data})})}function r(u){u&&(d.value=u)}return{moduleState:t,name:p,email:g,phone:c,value:f,remark:v,showValue:w,quantity:C,media:s,placeId:k,placeType:n,showFormPage:B,showPaymentPage:S,showConfirmationPage:m,places:h,hasFilledForm:P,hasForcedPlaceType:x,isWaitingForResponse:T,isMetaDataAvailable:E,orderGiftCard:N,initialize:r}}),$={class:"media-selector"},M=["accept"],D={class:"media-selector-wrapper"},I={class:"media-selector-tools"},L={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:l}){const o=l,t=y,{t:p}=e.useI18n(),{display:g}=e.useAlertStore(),c=e.ref(),f=e.computed(()=>t.modelValue.base64!=="");function C(n){o("update:modelValue",n)}function w(){C({base64:"",name:"",type:""}),c.value&&(c.value.value="")}function v(){c.value&&c.value.click()}function s(n,i){const[d,B]=[n.name,n.type],S=new FileReader;S.onload=function(m){if(m.target){const h=m.target.result;i({base64:h,name:d,type:B})}else g({message:p("imageUploadError"),type:"error"})},S.readAsDataURL(n)}async function k(){let n;(n=c.value.files)instanceof FileList&&s(n[0],C)}return(n,i)=>(e.openBlock(),e.createBlock(e.InputField,{label:n.label,required:n.required,type:"media"},{default:e.withCtx(()=>[e.createBaseVNode("div",$,[e.createBaseVNode("input",{ref_key:"fileInput",ref:c,type:"file",class:"hidden",accept:n.validation,single:"",onChange:i[0]||(i[0]=d=>k())},null,40,M),e.createBaseVNode("div",D,[e.createBaseVNode("ul",I,[f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",L,[e.createVNode(e.Clickable,{label:e.unref(p)("uploadFile"),type:"button",icon:"upload","icon-color":n.iconColor,onClickEvent:i[1]||(i[1]=d=>v())},null,8,["label","icon-color"])])),f.value?(e.openBlock(),e.createElementBlock("li",A,[e.createVNode(e.Clickable,{label:e.unref(p)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":n.iconColor,onClickEvent:i[2]||(i[2]=d=>v())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("li",W,[e.createVNode(e.Clickable,{label:e.unref(p)("removeFile"),type:"button",icon:"trash-alt","icon-color":n.iconColor,onClickEvent:i[3]||(i[3]=d=>w())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:f.value}])},[n.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.modelValue.base64},null,8,j)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function U(y){const l=y;l.__i18n=l.__i18n||[],l.__i18n.push({locale:"",resource:{da:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload billede"])},removeFile:o=>{const{normalize:t}=o;return t(["Fjern billede"])},replaceFile:o=>{const{normalize:t}=o;return t(["Ersat billede"])},imageUploadError:o=>{const{normalize:t}=o;return t(["Der skete en fejl under billede upload!"])}},en:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload image"])},removeFile:o=>{const{normalize:t}=o;return t(["Remove image"])},replaceFile:o=>{const{normalize:t}=o;return t(["Replace image"])},imageUploadError:o=>{const{normalize:t}=o;return t(["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(l,o)=>(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(G.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"},re=["innerHTML"],ie={key:0,id:"fresh-booking-gift-card-order"},de={class:"fresh-booking-panel"},ce={key:1,id:"fresh-booking-gift-card-remarks"},se={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:l}=e.useI18n(),{name:o,email:t,phone:p,value:g,remark:c,showValue:f,quantity:C,media:w,placeId:v,placeType:s,showFormPage:k,showPaymentPage:n,showConfirmationPage:i,places:d,hasFilledForm:B,hasForcedPlaceType:S,isWaitingForResponse:m,isMetaDataAvailable:h}=e.storeToRefs(q()),{initialize:x,orderGiftCard:b}=q(),{isRecaptchaEnabled:P,currency:E}=e.storeToRefs(e.useUtilityStore());async function T(){await b()}return e.watch(s,()=>{v.value=void 0}),e.onMounted(()=>{x()}),(N,r)=>{const u=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":N.accessToken,"data-layout":N.layout,styling:N.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(l)("giftCard.title")),1)]),e.createBaseVNode("div",Z,[e.withDirectives(e.createBaseVNode("div",ee,[e.createVNode(V.CheckoutWindow)],512),[[e.vShow,e.unref(n)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("p",{id:"fresh-booking-gift-card-description",innerHTML:e.unref(l)("giftCard.description")},null,8,te),e.createBaseVNode("form",null,[e.createVNode(e.TextField,{modelValue:e.unref(o),"onUpdate:modelValue":r[0]||(r[0]=a=>e.isRef(o)?o.value=a:null),type:"text",name:"name",autocomplete:"name",label:e.unref(l)("giftCard.name"),icon:"user-alt",placeholder:e.unref(l)("giftCard.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(e.TextField,{modelValue:e.unref(t),"onUpdate:modelValue":r[1]||(r[1]=a=>e.isRef(t)?t.value=a:null),type:"email",name:"email",autocomplete:"email",label:e.unref(l)("giftCard.email"),icon:"at",placeholder:e.unref(l)("giftCard.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(V.PhoneField,{modelValue:e.unref(p),"onUpdate:modelValue":r[2]||(r[2]=a=>e.isRef(p)?p.value=a:null),icon:"phone-office",label:e.unref(l)("giftCard.phone"),placeholder:e.unref(l)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.unref(S)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ae,[e.unref(d)?(e.openBlock(),e.createElementBlock("div",le,[e.createBaseVNode("label",oe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.selectType")),1)]),e.createBaseVNode("div",ne,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(a,_)=>(e.openBlock(),e.createElementBlock("li",{key:_},[e.createVNode(V.Checkbox,{modelValue:e.unref(s),"onUpdate:modelValue":r[3]||(r[3]=z=>e.isRef(s)?s.value=z:null),type:"radio",name:"placeType",val:_,label:a.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(d)[e.unref(s)]&&e.unref(d)[e.unref(s)].data.length>1?(e.openBlock(),e.createBlock(e._sfc_main,{key:0,modelValue:e.unref(v),"onUpdate:modelValue":r[4]||(r[4]=a=>e.isRef(v)?v.value=a:null),placeholder:e.unref(l)("giftCard.selectPlacePlaceholder"),options:e.unref(d)[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":r[5]||(r[5]=a=>e.isRef(g)?g.value=a:null),type:"number",name:"value",label:e.unref(l)("giftCard.value"),icon:"money-bill",placeholder:e.unref(l)("giftCard.valuePlaceholder"),suffix:e.unref(E),required:""},null,8,["modelValue","label","placeholder","suffix"]),e.createVNode(V.Checkbox,{modelValue:e.unref(f),"onUpdate:modelValue":r[6]||(r[6]=a=>e.isRef(f)?f.value=a:null),type:"checkbox",name:"showValue",label:e.unref(l)("giftCard.showValue"),checked:e.unref(f)},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(l)("giftCard.thankYou")},null,8,re)],512),[[e.vShow,e.unref(i)]])]),N.layout!=="minimal"&&e.unref(k)?(e.openBlock(),e.createElementBlock("div",ie,[e.createBaseVNode("div",de,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(B),"is-loading":e.unref(m),"onUpdate:isLoading":r[9]||(r[9]=a=>e.isRef(m)?m.value=a:null),onClickEvent:T},null,8,["label","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(e.TextField,{modelValue:e.unref(c),"onUpdate:modelValue":r[10]||(r[10]=a=>e.isRef(c)?c.value=a:null),type:"textarea",name:"remark",label:e.unref(l)("giftCard.remark"),icon:"info-circle",placeholder:e.unref(l)("giftCard.remarkPlaceholder")},null,8,["modelValue","label","placeholder"])])):e.createCommentVNode("",!0),e.unref(k)?e.withDirectives((e.openBlock(),e.createElementBlock("div",se,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(B),"data-test":"orderGiftCard","is-loading":e.unref(m),"onUpdate:isLoading":r[11]||(r[11]=a=>e.isRef(m)?m.value=a:null),onClickEvent:T},null,8,["label","disabled","is-loading"]),e.withDirectives(e.createBaseVNode("div",ue,[e.createVNode(V._sfc_main)],512),[[e.vShow,e.unref(P)]])])),[[u]]):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.zo(),F=e.createApp({components:{GiftCard:pe}});F.use(me);F.use(e.instance);F.use(_e);F.use(V.StickyPlugin);F.use(V.install,{bootstrap:!1});F.mount("#konnectio-gift-card-app");
|
|
1
|
+
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-f2eadc00.cjs"),V=require("./index-85780e6d.cjs"),U=require("./_-72d06a62.cjs"),R=require("./Field-7bca22a3.cjs");require("./_commonjsHelpers-6763f629.cjs");const q=e.defineStore("giftCard",()=>{e.useAlertStore();const{pay:y}=U.usePaymentStore(),{bearerToken:l,metaData:o}=e.storeToRefs(e.useUtilityStore()),t=e.ref(e.GiftCardModuleState.InitialState),p=e.useStorage("konnectio_name","",void 0,{serializer:e.StorageSerializers.string}),g=e.useStorage("konnectio_email","",void 0,{serializer:e.StorageSerializers.string}),c=e.useStorage("konnectio_phone","",void 0,{serializer:e.StorageSerializers.string}),f=e.ref(""),C=e.ref(1),w=e.ref(!0),v=e.ref(""),s=e.ref({base64:"",type:"",name:""}),k=e.ref(void 0),n=e.ref(0),i=e.ref(!1),d=e.ref(0),B=e.computed(()=>t.value===e.GiftCardModuleState.InitialState||t.value===e.GiftCardModuleState.WaitingForResponse),S=e.computed(()=>t.value===e.GiftCardModuleState.ReadyToPay),m=e.computed(()=>t.value===e.GiftCardModuleState.PaymentSuccess),h=e.computed(()=>{const u={1:{label:e.i18n.t("giftCard.hotelType"),data:[]},2:{label:e.i18n.t("giftCard.restaurantType"),data:[]}},a=o.value.places;return a&&a.forEach(_=>{u[_.placeType].data.push(_)}),Object.fromEntries(Object.entries(u).filter(([,_])=>_.data.length>0))}),x=e.computed(()=>d.value!==0),b=e.computed(()=>{let u;if(x.value)u=h.value[d.value].data[0];else if(n.value!==0){const a=k.value,_=h.value[n.value].data;_.length===1?u=_[0]:a!==void 0&&_.forEach(P=>{String(P.id)===String(a)&&(u=P)})}return u}),z=e.computed(()=>!(!p.value||!g.value||!(c.value.length>=5)||!f.value||b.value===void 0)),E=e.computed(()=>!(t.value===e.GiftCardModuleState.InitialState&&i.value)),T=e.computed(()=>!!(t.value===e.GiftCardModuleState.WaitingForResponse&&i.value));async function N(){t.value=e.GiftCardModuleState.WaitingForResponse,i.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:o.value.currency.id,language:e.getUserLanguage(),amount:f.value,quantity:C.value,freeText:v.value,showPrice:w.value,contactName:p.value,contactEmail:g.value,contactPhone:c.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:l.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.21"}}).then(u=>{t.value=e.GiftCardModuleState.ReadyToPay,i.value=!1,y({callback:()=>console.log("Callback!"),response:u.data})})}function r(u){u&&(d.value=u)}return{moduleState:t,name:p,email:g,phone:c,value:f,remark:v,showValue:w,quantity:C,media:s,placeId:k,placeType:n,showFormPage:B,showPaymentPage:S,showConfirmationPage:m,places:h,hasFilledForm:z,hasForcedPlaceType:x,isWaitingForResponse:T,isMetaDataAvailable:E,orderGiftCard:N,initialize:r}}),$={class:"media-selector"},M=["accept"],D={class:"media-selector-wrapper"},I={class:"media-selector-tools"},L={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:l}){const o=l,t=y,{t:p}=e.useI18n(),{display:g}=e.useAlertStore(),c=e.ref(),f=e.computed(()=>t.modelValue.base64!=="");function C(n){o("update:modelValue",n)}function w(){C({base64:"",name:"",type:""}),c.value&&(c.value.value="")}function v(){c.value&&c.value.click()}function s(n,i){const[d,B]=[n.name,n.type],S=new FileReader;S.onload=function(m){if(m.target){const h=m.target.result;i({base64:h,name:d,type:B})}else g({message:p("imageUploadError"),type:"error"})},S.readAsDataURL(n)}async function k(){let n;(n=c.value.files)instanceof FileList&&s(n[0],C)}return(n,i)=>(e.openBlock(),e.createBlock(e.InputField,{label:n.label,required:n.required,type:"media"},{default:e.withCtx(()=>[e.createBaseVNode("div",$,[e.createBaseVNode("input",{ref_key:"fileInput",ref:c,type:"file",class:"hidden",accept:n.validation,single:"",onChange:i[0]||(i[0]=d=>k())},null,40,M),e.createBaseVNode("div",D,[e.createBaseVNode("ul",I,[f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",L,[e.createVNode(e.Clickable,{label:e.unref(p)("uploadFile"),type:"button",icon:"upload","icon-color":n.iconColor,onClickEvent:i[1]||(i[1]=d=>v())},null,8,["label","icon-color"])])),f.value?(e.openBlock(),e.createElementBlock("li",A,[e.createVNode(e.Clickable,{label:e.unref(p)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":n.iconColor,onClickEvent:i[2]||(i[2]=d=>v())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("li",W,[e.createVNode(e.Clickable,{label:e.unref(p)("removeFile"),type:"button",icon:"trash-alt","icon-color":n.iconColor,onClickEvent:i[3]||(i[3]=d=>w())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:f.value}])},[n.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.modelValue.base64},null,8,j)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function G(y){const l=y;l.__i18n=l.__i18n||[],l.__i18n.push({locale:"",resource:{da:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload billede"])},removeFile:o=>{const{normalize:t}=o;return t(["Fjern billede"])},replaceFile:o=>{const{normalize:t}=o;return t(["Ersat billede"])},imageUploadError:o=>{const{normalize:t}=o;return t(["Der skete en fejl under billede upload!"])}},en:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload image"])},removeFile:o=>{const{normalize:t}=o;return t(["Remove image"])},replaceFile:o=>{const{normalize:t}=o;return t(["Replace image"])},imageUploadError:o=>{const{normalize:t}=o;return t(["An error occurred under image upload!"])}}}})}typeof G=="function"&&G(H);const O={class:"gift-card-skeleton"},K={class:"gift-card-skeleton-form"},Y=e.defineComponent({__name:"GiftCardSkeleton",setup(y){return(l,o)=>(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(U.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"},re=["innerHTML"],ie={key:0,id:"fresh-booking-gift-card-order"},de={class:"fresh-booking-panel"},ce={key:1,id:"fresh-booking-gift-card-remarks"},se={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:l}=e.useI18n(),{name:o,email:t,phone:p,value:g,remark:c,showValue:f,quantity:C,media:w,placeId:v,placeType:s,showFormPage:k,showPaymentPage:n,showConfirmationPage:i,places:d,hasFilledForm:B,hasForcedPlaceType:S,isWaitingForResponse:m,isMetaDataAvailable:h}=e.storeToRefs(q()),{initialize:x,orderGiftCard:b}=q(),{isRecaptchaEnabled:z,currency:E}=e.storeToRefs(e.useUtilityStore());async function T(){await b()}return e.watch(s,()=>{v.value=void 0}),e.onMounted(()=>{x()}),(N,r)=>{const u=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":N.accessToken,"data-layout":N.layout,styling:N.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(l)("giftCard.title")),1)]),e.createBaseVNode("div",Z,[e.withDirectives(e.createBaseVNode("div",ee,[e.createVNode(V.CheckoutWindow)],512),[[e.vShow,e.unref(n)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("p",{id:"fresh-booking-gift-card-description",innerHTML:e.unref(l)("giftCard.description")},null,8,te),e.createBaseVNode("form",null,[e.createVNode(e.TextField,{modelValue:e.unref(o),"onUpdate:modelValue":r[0]||(r[0]=a=>e.isRef(o)?o.value=a:null),type:"text",name:"name",autocomplete:"name",label:e.unref(l)("giftCard.name"),icon:"user-alt",placeholder:e.unref(l)("giftCard.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(e.TextField,{modelValue:e.unref(t),"onUpdate:modelValue":r[1]||(r[1]=a=>e.isRef(t)?t.value=a:null),type:"email",name:"email",autocomplete:"email",label:e.unref(l)("giftCard.email"),icon:"at",placeholder:e.unref(l)("giftCard.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(V.PhoneField,{modelValue:e.unref(p),"onUpdate:modelValue":r[2]||(r[2]=a=>e.isRef(p)?p.value=a:null),icon:"phone-office",label:e.unref(l)("giftCard.phone"),placeholder:e.unref(l)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.unref(S)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ae,[e.unref(d)?(e.openBlock(),e.createElementBlock("div",le,[e.createBaseVNode("label",oe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.selectType")),1)]),e.createBaseVNode("div",ne,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(a,_)=>(e.openBlock(),e.createElementBlock("li",{key:_},[e.createVNode(V.Checkbox,{modelValue:e.unref(s),"onUpdate:modelValue":r[3]||(r[3]=P=>e.isRef(s)?s.value=P:null),type:"radio",name:"placeType",val:_,label:a.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(d)[e.unref(s)]&&e.unref(d)[e.unref(s)].data.length>1?(e.openBlock(),e.createBlock(e._sfc_main,{key:0,modelValue:e.unref(v),"onUpdate:modelValue":r[4]||(r[4]=a=>e.isRef(v)?v.value=a:null),placeholder:e.unref(l)("giftCard.selectPlacePlaceholder"),options:e.unref(d)[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":r[5]||(r[5]=a=>e.isRef(g)?g.value=a:null),type:"number",name:"value",label:e.unref(l)("giftCard.value"),icon:"money-bill",placeholder:e.unref(l)("giftCard.valuePlaceholder"),suffix:e.unref(E),required:""},null,8,["modelValue","label","placeholder","suffix"]),e.createVNode(V.Checkbox,{modelValue:e.unref(f),"onUpdate:modelValue":r[6]||(r[6]=a=>e.isRef(f)?f.value=a:null),type:"checkbox",name:"showValue",label:e.unref(l)("giftCard.showValue"),checked:e.unref(f)},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(l)("giftCard.thankYou")},null,8,re)],512),[[e.vShow,e.unref(i)]])]),N.layout!=="minimal"&&e.unref(k)?(e.openBlock(),e.createElementBlock("div",ie,[e.createBaseVNode("div",de,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(B),"is-loading":e.unref(m),"onUpdate:isLoading":r[9]||(r[9]=a=>e.isRef(m)?m.value=a:null),onClickEvent:T},null,8,["label","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(e.TextField,{modelValue:e.unref(c),"onUpdate:modelValue":r[10]||(r[10]=a=>e.isRef(c)?c.value=a:null),type:"textarea",name:"remark",label:e.unref(l)("giftCard.remark"),icon:"info-circle",placeholder:e.unref(l)("giftCard.remarkPlaceholder")},null,8,["modelValue","label","placeholder"])])):e.createCommentVNode("",!0),e.unref(k)?e.withDirectives((e.openBlock(),e.createElementBlock("div",se,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(B),"data-test":"orderGiftCard","is-loading":e.unref(m),"onUpdate:isLoading":r[11]||(r[11]=a=>e.isRef(m)?m.value=a:null),onClickEvent:T},null,8,["label","disabled","is-loading"]),e.withDirectives(e.createBaseVNode("div",ue,[e.createVNode(V._sfc_main)],512),[[e.vShow,e.unref(z)]])])),[[u]]):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(V.StickyPlugin);F.use(V.install,{bootstrap:!1});F.mount("#konnectio-gift-card-app");
|
package/dist/gift-card.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as ue, u as ne, s as Y, a as ie, r as b,
|
|
2
|
-
import { a as we, P as ze, C as le, _ as Te, S as $e, i as Ue } from "./index-
|
|
3
|
-
import { u as qe, E as Re } from "./_-
|
|
4
|
-
import { F as L } from "./Field-
|
|
1
|
+
import { d as ue, u as ne, s as Y, a as ie, r as b, ac as w, b as J, c as F, i as Z, S as Q, e as ce, f as pe, ad as me, h as X, z as se, k as d, l as M, w as H, x as r, q as g, m as s, n as e, C as x, t as k, v as re, I as fe, _ as de, a1 as ve, o as ge, ae as he, A as ee, af as B, ag as W, T as j, B as V, a2 as ye, a3 as _e, y as be, a4 as ae, J as ke, K as Ce, P as Ve, a8 as Fe, N as Pe, Q as Se } from "./SelectField.vue_vue_type_style_index_0_lang-de13480f.js";
|
|
2
|
+
import { a as we, P as ze, C as le, _ as Te, S as $e, i as Ue } from "./index-a6e71920.js";
|
|
3
|
+
import { u as qe, E as Re } from "./_-55d616f9.js";
|
|
4
|
+
import { F as L } from "./Field-850f6158.js";
|
|
5
5
|
import "./_commonjsHelpers-aeeeeb92.js";
|
|
6
6
|
const te = ue("giftCard", () => {
|
|
7
7
|
ne();
|
|
@@ -59,7 +59,7 @@ const te = ue("giftCard", () => {
|
|
|
59
59
|
headers: {
|
|
60
60
|
Authorization: t.value,
|
|
61
61
|
Accept: "application/json",
|
|
62
|
-
"Fresh-Booking-Ver": "4.0.
|
|
62
|
+
"Fresh-Booking-Ver": "4.0.21"
|
|
63
63
|
}
|
|
64
64
|
}).then((f) => {
|
|
65
65
|
a.value = w.ReadyToPay, u.value = !1, z({
|
package/dist/gift-card.js.br
CHANGED
|
Binary file
|