@konnectio/core 4.0.2 → 4.0.3
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-138c1747.mjs → ActionField-1b4171c7.mjs} +22 -23
- package/dist/ActionField-1b4171c7.mjs.br +0 -0
- package/dist/ActionField-97c0c682.js +2 -0
- package/dist/ActionField-97c0c682.js.br +0 -0
- package/dist/Clickable-eb931b15.mjs +13899 -0
- package/dist/Clickable-eb931b15.mjs.br +0 -0
- package/dist/Clickable-f57e16ad.js +785 -0
- package/dist/Clickable-f57e16ad.js.br +0 -0
- package/dist/HotelAvailabilityForm-5750665b.js +2 -0
- package/dist/HotelAvailabilityForm-5750665b.js.br +0 -0
- package/dist/{HotelAvailabilityForm-a550be2e.mjs → HotelAvailabilityForm-bab6ef4d.mjs} +21 -22
- package/dist/HotelAvailabilityForm-bab6ef4d.mjs.br +0 -0
- package/dist/{NumberField.vue_vue_type_style_index_0_lang-778e8361.mjs → NumberField.vue_vue_type_style_index_0_lang-737bf674.mjs} +52 -53
- package/dist/NumberField.vue_vue_type_style_index_0_lang-737bf674.mjs.br +0 -0
- package/dist/{NumberField.vue_vue_type_style_index_0_lang-de20cf9f.js → NumberField.vue_vue_type_style_index_0_lang-e642c7f3.js} +20 -20
- package/dist/NumberField.vue_vue_type_style_index_0_lang-e642c7f3.js.br +0 -0
- package/dist/ReCaptchaVuePlugin-36454b0f.js +2 -0
- package/dist/ReCaptchaVuePlugin-36454b0f.js.br +0 -0
- package/dist/{ReCaptchaVuePlugin-59863bbf.mjs → ReCaptchaVuePlugin-e4f378b2.mjs} +3 -3
- package/dist/ReCaptchaVuePlugin-e4f378b2.mjs.br +0 -0
- package/dist/{SelectField.vue_vue_type_style_index_0_lang-aa7a93a7.js → SelectField.vue_vue_type_style_index_0_lang-a3371159.js} +27 -27
- package/dist/SelectField.vue_vue_type_style_index_0_lang-a3371159.js.br +0 -0
- package/dist/{SelectField.vue_vue_type_style_index_0_lang-b4fb229d.mjs → SelectField.vue_vue_type_style_index_0_lang-d7f0bf68.mjs} +296 -297
- package/dist/SelectField.vue_vue_type_style_index_0_lang-d7f0bf68.mjs.br +0 -0
- package/dist/ThankYou-23531d13.js +16 -0
- package/dist/ThankYou-23531d13.js.br +0 -0
- package/dist/{ThankYou-95c1eef3.mjs → ThankYou-4299d606.mjs} +265 -266
- package/dist/ThankYou-4299d606.mjs.br +0 -0
- package/dist/_commonjsHelpers-6763f629.js +2 -0
- package/dist/_commonjsHelpers-c5d32002.mjs +31 -0
- package/dist/applyGiftCard-9847fda1.js +2 -0
- package/dist/applyGiftCard-9847fda1.js.br +0 -0
- package/dist/{applyGiftCard-fb6fb8f4.mjs → applyGiftCard-eb7b85ee.mjs} +20 -20
- package/dist/applyGiftCard-eb7b85ee.mjs.br +0 -0
- package/dist/availability.cjs.js +1 -1
- package/dist/availability.cjs.js.br +0 -0
- package/dist/availability.es.js +22 -23
- package/dist/availability.es.js.br +0 -0
- package/dist/{event-d697bdb9.mjs → event-1b888019.mjs} +11 -11
- package/dist/event-1b888019.mjs.br +0 -0
- package/dist/event-e8e0c6a2.js +2 -0
- package/dist/event-e8e0c6a2.js.br +0 -0
- package/dist/event.cjs.js +1 -1
- package/dist/event.cjs.js.br +0 -0
- package/dist/event.es.js +149 -150
- package/dist/event.es.js.br +0 -0
- package/dist/gift-card-validation.cjs.js +1 -1
- package/dist/gift-card-validation.cjs.js.br +0 -0
- package/dist/gift-card-validation.es.js +44 -45
- package/dist/gift-card-validation.es.js.br +0 -0
- package/dist/gift-card.cjs.js +1 -1
- package/dist/gift-card.cjs.js.br +0 -0
- package/dist/gift-card.es.js +192 -193
- package/dist/gift-card.es.js.br +0 -0
- package/dist/hotel.cjs.js +5 -5
- package/dist/hotel.cjs.js.br +0 -0
- package/dist/hotel.es.js +258 -257
- package/dist/hotel.es.js.br +0 -0
- package/dist/{index-76459611.mjs → index-937554a9.mjs} +14 -16
- package/dist/index-937554a9.mjs.br +0 -0
- package/dist/index-aa255eba.js +2 -0
- package/dist/index-aa255eba.js.br +0 -0
- package/dist/navigation.cjs.js +1 -1
- package/dist/navigation.cjs.js.br +0 -0
- package/dist/navigation.es.js +18 -19
- package/dist/navigation.es.js.br +0 -0
- package/dist/payment-3140b25e.js +3 -0
- package/dist/payment-3140b25e.js.br +0 -0
- package/dist/{payment-31263275.mjs → payment-b79997a8.mjs} +3 -3
- package/dist/payment-b79997a8.mjs.br +0 -0
- package/dist/polyfill.cjs.js +2 -2
- package/dist/polyfill.cjs.js.br +0 -0
- package/dist/polyfill.es.js +2 -2
- package/dist/polyfill.es.js.br +0 -0
- package/package.json +1 -1
- package/dist/ActionField-138c1747.mjs.br +0 -0
- package/dist/ActionField-2b6751b4.js +0 -2
- package/dist/ActionField-2b6751b4.js.br +0 -0
- package/dist/Clickable-26efd8d0.mjs +0 -3497
- package/dist/Clickable-26efd8d0.mjs.br +0 -0
- package/dist/Clickable-6b252cca.js +0 -763
- package/dist/Clickable-6b252cca.js.br +0 -0
- package/dist/HotelAvailabilityForm-56badafa.js +0 -2
- package/dist/HotelAvailabilityForm-56badafa.js.br +0 -0
- package/dist/HotelAvailabilityForm-a550be2e.mjs.br +0 -0
- package/dist/NumberField.vue_vue_type_style_index_0_lang-778e8361.mjs.br +0 -0
- package/dist/NumberField.vue_vue_type_style_index_0_lang-de20cf9f.js.br +0 -0
- package/dist/ReCaptchaVuePlugin-59863bbf.mjs.br +0 -0
- package/dist/ReCaptchaVuePlugin-809f1dcc.js +0 -2
- package/dist/ReCaptchaVuePlugin-809f1dcc.js.br +0 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-aa7a93a7.js.br +0 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-b4fb229d.mjs.br +0 -0
- package/dist/ThankYou-103d0395.js +0 -16
- package/dist/ThankYou-103d0395.js.br +0 -0
- package/dist/ThankYou-95c1eef3.mjs.br +0 -0
- package/dist/_commonjsHelpers-10dfc225.mjs +0 -9
- package/dist/_commonjsHelpers-87b0abe8.js +0 -2
- package/dist/applyGiftCard-2eac2416.js +0 -2
- package/dist/applyGiftCard-2eac2416.js.br +0 -0
- package/dist/applyGiftCard-fb6fb8f4.mjs.br +0 -0
- package/dist/event-b7b4870b.js +0 -2
- package/dist/event-b7b4870b.js.br +0 -0
- package/dist/event-d697bdb9.mjs.br +0 -0
- package/dist/index-76459611.mjs.br +0 -0
- package/dist/index-95820cc1.js +0 -2
- package/dist/index-95820cc1.js.br +0 -0
- package/dist/payment-215f120d.js +0 -3
- package/dist/payment-215f120d.js.br +0 -0
- package/dist/payment-31263275.mjs.br +0 -0
package/dist/gift-card.es.js
CHANGED
|
@@ -1,66 +1,65 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as
|
|
3
|
-
import { P as Ee, C as
|
|
4
|
-
import { u as Le } from "./ReCaptchaVuePlugin-
|
|
5
|
-
import { T as j, _ as
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const { display: f } = Z(), { bearerToken: a, metaData: o } = X(ue()), l = k(y.InitialState), B = J("freshBookingName", "", void 0, { serializer: Q.string }), p = J("freshBookingEmail", "", void 0, { serializer: Q.string }), g = J("freshBookingPhone", "", void 0, { serializer: Q.string }), _ = k(""), T = k(1), E = k(!0), U = k(""), h = k({
|
|
1
|
+
import { r as k, f as S, d as se, o as u, h as W, w as x, b as s, c as b, a as m, u as e, C as D, k as C, n as de, s as fe, g as ge, y as ve, t as ae, z as L, A as O, i as B, F as be, v as he, L as oe, B as le, S as ye, p as ke, l as Ce, _ as _e, m as Fe } from "./Clickable-eb931b15.mjs";
|
|
2
|
+
import { o as Ve, b as Z, s as X, k as ue, G as y, p as J, v as M, S as Q, r as ce, t as Be, w as Se, R as te, u as pe, I as Pe, _ as ze, d as Te, c as we, a as Re, i as $e } from "./NumberField.vue_vue_type_style_index_0_lang-737bf674.mjs";
|
|
3
|
+
import { P as Ee, C as ne, _ as Ue, S as Ie, i as qe } from "./index-937554a9.mjs";
|
|
4
|
+
import { u as Le } from "./ReCaptchaVuePlugin-e4f378b2.mjs";
|
|
5
|
+
import { T as j, _ as Me } from "./SelectField.vue_vue_type_style_index_0_lang-d7f0bf68.mjs";
|
|
6
|
+
import "./_commonjsHelpers-c5d32002.mjs";
|
|
7
|
+
const re = Ve("giftCard", () => {
|
|
8
|
+
const { display: f } = Z(), { bearerToken: o, metaData: a } = X(ue()), l = k(y.InitialState), P = J("freshBookingName", "", void 0, { serializer: Q.string }), p = J("freshBookingEmail", "", void 0, { serializer: Q.string }), g = J("freshBookingPhone", "", void 0, { serializer: Q.string }), _ = k(""), z = k(1), $ = k(!0), U = k(""), h = k({
|
|
10
9
|
base64: "",
|
|
11
10
|
type: "",
|
|
12
11
|
name: ""
|
|
13
|
-
}), n = k(void 0),
|
|
12
|
+
}), n = k(void 0), d = k(0), v = k(!1), T = k(0), F = S(() => l.value === y.InitialState || l.value === y.WaitingForResponse), w = S(() => l.value === y.ReadyToPay), I = S(() => l.value === y.PaymentSuccess), V = S(() => {
|
|
14
13
|
const c = {
|
|
15
14
|
1: {
|
|
16
|
-
label:
|
|
15
|
+
label: M.t("giftCard.hotelType"),
|
|
17
16
|
data: []
|
|
18
17
|
},
|
|
19
18
|
2: {
|
|
20
|
-
label:
|
|
19
|
+
label: M.t("giftCard.restaurantType"),
|
|
21
20
|
data: []
|
|
22
21
|
}
|
|
23
|
-
}, r =
|
|
22
|
+
}, r = a.value.places;
|
|
24
23
|
return r && r.forEach((t) => {
|
|
25
24
|
c[t.placeType].data.push(t);
|
|
26
25
|
}), Object.fromEntries(
|
|
27
26
|
Object.entries(c).filter(([, t]) => t.data.length > 0)
|
|
28
27
|
);
|
|
29
|
-
}), G = S(() =>
|
|
28
|
+
}), G = S(() => T.value !== 0), R = S(() => {
|
|
30
29
|
let c;
|
|
31
30
|
if (G.value)
|
|
32
|
-
c = V.value[
|
|
33
|
-
else if (
|
|
34
|
-
const r = n.value, t = V.value[
|
|
35
|
-
t.length === 1 ? c = t[0] : r !== void 0 && t.forEach((
|
|
36
|
-
String(
|
|
31
|
+
c = V.value[T.value].data[0];
|
|
32
|
+
else if (d.value !== 0) {
|
|
33
|
+
const r = n.value, t = V.value[d.value].data;
|
|
34
|
+
t.length === 1 ? c = t[0] : r !== void 0 && t.forEach((q) => {
|
|
35
|
+
String(q.id) === String(r) && (c = q);
|
|
37
36
|
});
|
|
38
37
|
}
|
|
39
38
|
return c;
|
|
40
|
-
}), A = S(() => !(!
|
|
39
|
+
}), A = S(() => !(!P.value || !p.value || !(g.value.length >= 5) || !_.value || R.value === void 0)), N = S(() => !(l.value === y.InitialState && v.value)), K = S(() => !!(l.value === y.WaitingForResponse && v.value));
|
|
41
40
|
async function Y() {
|
|
42
41
|
l.value = y.WaitingForResponse, v.value = !0, await ce.post("http://localhost:91/api/gift-card/create", {
|
|
43
42
|
termsOfserviceURL: "https://freshbooking.dk",
|
|
44
43
|
checkoutUrl: "https://freshbooking.dk",
|
|
45
|
-
currencyID:
|
|
46
|
-
language:
|
|
44
|
+
currencyID: a.value.currency.id,
|
|
45
|
+
language: Be(),
|
|
47
46
|
amount: _.value,
|
|
48
|
-
quantity:
|
|
47
|
+
quantity: z.value,
|
|
49
48
|
freeText: U.value,
|
|
50
|
-
showPrice:
|
|
51
|
-
contactName:
|
|
49
|
+
showPrice: $.value,
|
|
50
|
+
contactName: P.value,
|
|
52
51
|
contactEmail: p.value,
|
|
53
52
|
contactPhone: g.value,
|
|
54
|
-
imageBase64:
|
|
53
|
+
imageBase64: Se(h.value.base64),
|
|
55
54
|
imageName: h.value.name,
|
|
56
55
|
imageFormat: h.value.type,
|
|
57
56
|
placeType: R.value ? R.value.placeType : void 0,
|
|
58
57
|
placeID: R.value ? R.value.id : void 0
|
|
59
58
|
}, {
|
|
60
59
|
headers: {
|
|
61
|
-
Authorization:
|
|
60
|
+
Authorization: o.value,
|
|
62
61
|
Accept: "application/json",
|
|
63
|
-
"Fresh-Booking-Ver": "4.0.
|
|
62
|
+
"Fresh-Booking-Ver": "4.0.3"
|
|
64
63
|
}
|
|
65
64
|
}).then((c) => {
|
|
66
65
|
if (v.value = !1, c.data.easyPayment) {
|
|
@@ -69,39 +68,39 @@ const re = Fe("giftCard", () => {
|
|
|
69
68
|
c.data.easyPayment.paymentID,
|
|
70
69
|
{ html_element: "fresh-booking-gift-card-payment" }
|
|
71
70
|
);
|
|
72
|
-
r.addEventHandler(
|
|
71
|
+
r.addEventHandler(te.Accept, () => {
|
|
73
72
|
l.value = y.PaymentSuccess, f({
|
|
74
|
-
message:
|
|
73
|
+
message: M.t("alert.success.giftCardOrdered"),
|
|
75
74
|
type: "success"
|
|
76
75
|
});
|
|
77
|
-
}), r.addEventHandler(
|
|
76
|
+
}), r.addEventHandler(te.Error, () => {
|
|
78
77
|
f({
|
|
79
|
-
message:
|
|
78
|
+
message: M.t("booking.other.errorMessage"),
|
|
80
79
|
type: "warning"
|
|
81
80
|
});
|
|
82
81
|
});
|
|
83
82
|
} else
|
|
84
83
|
l.value = y.InitialState, f({
|
|
85
|
-
message: `${
|
|
84
|
+
message: `${M.t("booking.other.errorMessage")} (HTTP: ${c.status})`,
|
|
86
85
|
type: "warning"
|
|
87
86
|
});
|
|
88
87
|
});
|
|
89
88
|
}
|
|
90
89
|
function H(c) {
|
|
91
|
-
|
|
90
|
+
T.value = c;
|
|
92
91
|
}
|
|
93
92
|
return {
|
|
94
93
|
moduleState: l,
|
|
95
|
-
name:
|
|
94
|
+
name: P,
|
|
96
95
|
email: p,
|
|
97
96
|
phone: g,
|
|
98
97
|
value: _,
|
|
99
98
|
remark: U,
|
|
100
|
-
showValue:
|
|
101
|
-
quantity:
|
|
99
|
+
showValue: $,
|
|
100
|
+
quantity: z,
|
|
102
101
|
media: h,
|
|
103
102
|
placeId: n,
|
|
104
|
-
placeType:
|
|
103
|
+
placeType: d,
|
|
105
104
|
showFormPage: F,
|
|
106
105
|
showPaymentPage: w,
|
|
107
106
|
showConfirmationPage: I,
|
|
@@ -113,7 +112,7 @@ const re = Fe("giftCard", () => {
|
|
|
113
112
|
orderGiftCard: Y,
|
|
114
113
|
initialize: H
|
|
115
114
|
};
|
|
116
|
-
}),
|
|
115
|
+
}), We = { class: "media-selector" }, De = ["accept"], Ge = { class: "media-selector-wrapper" }, Ae = { class: "media-selector-tools" }, Ne = { key: 0 }, He = { key: 1 }, Oe = { key: 2 }, je = ["src"], xe = /* @__PURE__ */ se({
|
|
117
116
|
__name: "MediaSelector",
|
|
118
117
|
props: {
|
|
119
118
|
modelValue: {},
|
|
@@ -123,29 +122,29 @@ const re = Fe("giftCard", () => {
|
|
|
123
122
|
required: { type: Boolean, default: !1 }
|
|
124
123
|
},
|
|
125
124
|
emits: ["update:modelValue"],
|
|
126
|
-
setup(f, { emit:
|
|
127
|
-
const
|
|
125
|
+
setup(f, { emit: o }) {
|
|
126
|
+
const a = f, { t: l } = pe(), { display: P } = Z(), p = k(), g = S(() => a.modelValue.base64 !== "");
|
|
128
127
|
function _(n) {
|
|
129
|
-
|
|
128
|
+
o("update:modelValue", n);
|
|
130
129
|
}
|
|
131
|
-
function
|
|
130
|
+
function z() {
|
|
132
131
|
_({
|
|
133
132
|
base64: "",
|
|
134
133
|
name: "",
|
|
135
134
|
type: ""
|
|
136
135
|
}), p.value && (p.value.value = "");
|
|
137
136
|
}
|
|
138
|
-
function
|
|
137
|
+
function $() {
|
|
139
138
|
p.value && p.value.click();
|
|
140
139
|
}
|
|
141
|
-
function U(n,
|
|
142
|
-
const [v,
|
|
140
|
+
function U(n, d) {
|
|
141
|
+
const [v, T] = [n.name, n.type], F = new FileReader();
|
|
143
142
|
F.onload = function(w) {
|
|
144
143
|
if (w.target) {
|
|
145
144
|
const I = w.target.result;
|
|
146
|
-
|
|
145
|
+
d({ base64: I, name: v, type: T });
|
|
147
146
|
} else
|
|
148
|
-
|
|
147
|
+
P({
|
|
149
148
|
message: l("imageUploadError"),
|
|
150
149
|
type: "error"
|
|
151
150
|
});
|
|
@@ -155,31 +154,31 @@ const re = Fe("giftCard", () => {
|
|
|
155
154
|
let n;
|
|
156
155
|
(n = p.value.files) instanceof FileList && U(n[0], _);
|
|
157
156
|
}
|
|
158
|
-
return (n,
|
|
157
|
+
return (n, d) => (u(), W(Pe, {
|
|
159
158
|
label: n.label,
|
|
160
159
|
required: n.required,
|
|
161
160
|
type: "media"
|
|
162
161
|
}, {
|
|
163
162
|
default: x(() => [
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
s("div", We, [
|
|
164
|
+
s("input", {
|
|
166
165
|
ref_key: "fileInput",
|
|
167
166
|
ref: p,
|
|
168
167
|
type: "file",
|
|
169
168
|
class: "hidden",
|
|
170
169
|
accept: n.validation,
|
|
171
170
|
single: "",
|
|
172
|
-
onChange:
|
|
171
|
+
onChange: d[0] || (d[0] = (v) => h())
|
|
173
172
|
}, null, 40, De),
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
s("div", Ge, [
|
|
174
|
+
s("ul", Ae, [
|
|
176
175
|
g.value ? C("", !0) : (u(), b("li", Ne, [
|
|
177
176
|
m(D, {
|
|
178
177
|
label: e(l)("uploadFile"),
|
|
179
178
|
type: "button",
|
|
180
179
|
icon: "upload",
|
|
181
180
|
"icon-color": n.iconColor,
|
|
182
|
-
onClickEvent:
|
|
181
|
+
onClickEvent: d[1] || (d[1] = (v) => $())
|
|
183
182
|
}, null, 8, ["label", "icon-color"])
|
|
184
183
|
])),
|
|
185
184
|
g.value ? (u(), b("li", He, [
|
|
@@ -188,7 +187,7 @@ const re = Fe("giftCard", () => {
|
|
|
188
187
|
type: "button",
|
|
189
188
|
icon: "repeat-alt",
|
|
190
189
|
"icon-color": n.iconColor,
|
|
191
|
-
onClickEvent:
|
|
190
|
+
onClickEvent: d[2] || (d[2] = (v) => $())
|
|
192
191
|
}, null, 8, ["label", "icon-color"])
|
|
193
192
|
])) : C("", !0),
|
|
194
193
|
g.value ? (u(), b("li", Oe, [
|
|
@@ -197,11 +196,11 @@ const re = Fe("giftCard", () => {
|
|
|
197
196
|
type: "button",
|
|
198
197
|
icon: "trash-alt",
|
|
199
198
|
"icon-color": n.iconColor,
|
|
200
|
-
onClickEvent:
|
|
199
|
+
onClickEvent: d[3] || (d[3] = (v) => z())
|
|
201
200
|
}, null, 8, ["label", "icon-color"])
|
|
202
201
|
])) : C("", !0)
|
|
203
202
|
]),
|
|
204
|
-
|
|
203
|
+
s("div", {
|
|
205
204
|
class: de([
|
|
206
205
|
"media-selector-previewer",
|
|
207
206
|
{ opened: g.value }
|
|
@@ -220,43 +219,43 @@ const re = Fe("giftCard", () => {
|
|
|
220
219
|
}
|
|
221
220
|
});
|
|
222
221
|
function ie(f) {
|
|
223
|
-
const
|
|
224
|
-
|
|
222
|
+
const o = f;
|
|
223
|
+
o.__i18n = o.__i18n || [], o.__i18n.push({
|
|
225
224
|
locale: "",
|
|
226
225
|
resource: {
|
|
227
226
|
da: {
|
|
228
|
-
uploadFile: (
|
|
229
|
-
const { normalize: l } =
|
|
227
|
+
uploadFile: (a) => {
|
|
228
|
+
const { normalize: l } = a;
|
|
230
229
|
return l(["Upload billede"]);
|
|
231
230
|
},
|
|
232
|
-
removeFile: (
|
|
233
|
-
const { normalize: l } =
|
|
231
|
+
removeFile: (a) => {
|
|
232
|
+
const { normalize: l } = a;
|
|
234
233
|
return l(["Fjern billede"]);
|
|
235
234
|
},
|
|
236
|
-
replaceFile: (
|
|
237
|
-
const { normalize: l } =
|
|
235
|
+
replaceFile: (a) => {
|
|
236
|
+
const { normalize: l } = a;
|
|
238
237
|
return l(["Ersat billede"]);
|
|
239
238
|
},
|
|
240
|
-
imageUploadError: (
|
|
241
|
-
const { normalize: l } =
|
|
239
|
+
imageUploadError: (a) => {
|
|
240
|
+
const { normalize: l } = a;
|
|
242
241
|
return l(["Der skete en fejl under billede upload!"]);
|
|
243
242
|
}
|
|
244
243
|
},
|
|
245
244
|
en: {
|
|
246
|
-
uploadFile: (
|
|
247
|
-
const { normalize: l } =
|
|
245
|
+
uploadFile: (a) => {
|
|
246
|
+
const { normalize: l } = a;
|
|
248
247
|
return l(["Upload image"]);
|
|
249
248
|
},
|
|
250
|
-
removeFile: (
|
|
251
|
-
const { normalize: l } =
|
|
249
|
+
removeFile: (a) => {
|
|
250
|
+
const { normalize: l } = a;
|
|
252
251
|
return l(["Remove image"]);
|
|
253
252
|
},
|
|
254
|
-
replaceFile: (
|
|
255
|
-
const { normalize: l } =
|
|
253
|
+
replaceFile: (a) => {
|
|
254
|
+
const { normalize: l } = a;
|
|
256
255
|
return l(["Replace image"]);
|
|
257
256
|
},
|
|
258
|
-
imageUploadError: (
|
|
259
|
-
const { normalize: l } =
|
|
257
|
+
imageUploadError: (a) => {
|
|
258
|
+
const { normalize: l } = a;
|
|
260
259
|
return l(["An error occurred under image upload!"]);
|
|
261
260
|
}
|
|
262
261
|
}
|
|
@@ -267,22 +266,22 @@ typeof ie == "function" && ie(xe);
|
|
|
267
266
|
const Ke = (f) => (ke("data-v-10b51e8f"), f = f(), Ce(), f), Ye = {
|
|
268
267
|
key: 0,
|
|
269
268
|
id: "fresh-booking-gift-card-wrapper"
|
|
270
|
-
}, Je = { id: "fresh-booking-gift-card-title" }, Qe = { id: "fresh-booking-gift-card-content" }, Xe = { id: "fresh-booking-gift-card-payment" }, Ze = ["innerHTML"],
|
|
269
|
+
}, Je = { id: "fresh-booking-gift-card-title" }, Qe = { id: "fresh-booking-gift-card-content" }, Xe = { id: "fresh-booking-gift-card-payment" }, Ze = ["innerHTML"], ea = { key: 0 }, aa = {
|
|
271
270
|
key: 0,
|
|
272
271
|
id: "fresh-booking-select-place-type"
|
|
273
|
-
},
|
|
272
|
+
}, oa = {
|
|
274
273
|
class: /* @__PURE__ */ de(["fresh-booking-label", "required"])
|
|
275
|
-
},
|
|
274
|
+
}, la = { id: "fresh-booking-select-place-type-input" }, ta = ["innerHTML"], na = {
|
|
276
275
|
key: 0,
|
|
277
276
|
id: "fresh-booking-gift-card-order"
|
|
278
|
-
},
|
|
277
|
+
}, ra = { class: "fresh-booking-panel" }, ia = {
|
|
279
278
|
key: 1,
|
|
280
279
|
id: "fresh-booking-gift-card-remarks"
|
|
281
|
-
},
|
|
280
|
+
}, sa = {
|
|
282
281
|
key: 2,
|
|
283
282
|
id: "fresh-booking-gift-card-order-minimal",
|
|
284
283
|
"sticky-side": "bottom"
|
|
285
|
-
},
|
|
284
|
+
}, da = { id: "fresh-booking-gift-card-recaptcha" }, ua = /* @__PURE__ */ Ke(() => /* @__PURE__ */ s("span", null, "Loading...", -1)), ca = /* @__PURE__ */ se({
|
|
286
285
|
__name: "GiftCard",
|
|
287
286
|
props: {
|
|
288
287
|
accessToken: {},
|
|
@@ -318,20 +317,20 @@ const Ke = (f) => (ke("data-v-10b51e8f"), f = f(), Ce(), f), Ye = {
|
|
|
318
317
|
successColor: {}
|
|
319
318
|
},
|
|
320
319
|
setup(f) {
|
|
321
|
-
const
|
|
320
|
+
const o = f, { t: a } = pe(), {
|
|
322
321
|
name: l,
|
|
323
|
-
email:
|
|
322
|
+
email: P,
|
|
324
323
|
phone: p,
|
|
325
324
|
value: g,
|
|
326
325
|
remark: _,
|
|
327
|
-
showValue:
|
|
328
|
-
quantity:
|
|
326
|
+
showValue: z,
|
|
327
|
+
quantity: $,
|
|
329
328
|
media: U,
|
|
330
329
|
placeId: h,
|
|
331
330
|
placeType: n,
|
|
332
|
-
showFormPage:
|
|
331
|
+
showFormPage: d,
|
|
333
332
|
showPaymentPage: v,
|
|
334
|
-
showConfirmationPage:
|
|
333
|
+
showConfirmationPage: T,
|
|
335
334
|
places: F,
|
|
336
335
|
hasFilledForm: w,
|
|
337
336
|
hasForcedPlaceType: I,
|
|
@@ -344,7 +343,7 @@ const Ke = (f) => (ke("data-v-10b51e8f"), f = f(), Ce(), f), Ye = {
|
|
|
344
343
|
await r.recaptchaLoaded();
|
|
345
344
|
const t = await r.executeRecaptcha("create_gift_card");
|
|
346
345
|
(await ce.get(`/?rest_route=/freshcase-octopus/v1/recaptcha/${t}`)).data.success ? await A() : Y({
|
|
347
|
-
message:
|
|
346
|
+
message: a("alert.error.robot"),
|
|
348
347
|
type: "error"
|
|
349
348
|
});
|
|
350
349
|
} else
|
|
@@ -353,43 +352,43 @@ const Ke = (f) => (ke("data-v-10b51e8f"), f = f(), Ce(), f), Ye = {
|
|
|
353
352
|
fe(n, () => {
|
|
354
353
|
h.value = void 0;
|
|
355
354
|
}), ge(() => {
|
|
356
|
-
R(parseInt(
|
|
355
|
+
R(parseInt(o.placeType));
|
|
357
356
|
});
|
|
358
357
|
const c = {
|
|
359
|
-
"--accentColor":
|
|
360
|
-
"--buttonBackground":
|
|
361
|
-
"--buttonBorder":
|
|
362
|
-
"--buttonBorderRadius":
|
|
363
|
-
"--buttonFontFamily":
|
|
364
|
-
"--buttonColor":
|
|
365
|
-
"--buttonFontSize":
|
|
366
|
-
"--buttonTextTransform":
|
|
367
|
-
"--buttonFontWeight":
|
|
368
|
-
"--fontColor":
|
|
369
|
-
"--fontFamily":
|
|
370
|
-
"--fontSize":
|
|
371
|
-
"--fontWeight":
|
|
372
|
-
"--grayColor":
|
|
373
|
-
"--headerColor":
|
|
374
|
-
"--headerFontSize":
|
|
375
|
-
"--inputBackground":
|
|
376
|
-
"--inputBorder":
|
|
377
|
-
"--inputBorderRadius":
|
|
378
|
-
"--inputFontColor":
|
|
379
|
-
"--labelFontWeight":
|
|
380
|
-
"--labelPadding":
|
|
381
|
-
"--loadingColor":
|
|
382
|
-
"--panelBackground":
|
|
383
|
-
"--panelBorder":
|
|
384
|
-
"--panelBorderRadius":
|
|
385
|
-
"--panelPadding":
|
|
386
|
-
"--successColor":
|
|
358
|
+
"--accentColor": o.accentColor,
|
|
359
|
+
"--buttonBackground": o.buttonBackground,
|
|
360
|
+
"--buttonBorder": o.buttonBorder,
|
|
361
|
+
"--buttonBorderRadius": o.buttonBorderRadius,
|
|
362
|
+
"--buttonFontFamily": o.buttonFontFamily,
|
|
363
|
+
"--buttonColor": o.buttonColor,
|
|
364
|
+
"--buttonFontSize": o.buttonFontSize,
|
|
365
|
+
"--buttonTextTransform": o.buttonTextTransform,
|
|
366
|
+
"--buttonFontWeight": o.buttonFontWeight,
|
|
367
|
+
"--fontColor": o.fontColor,
|
|
368
|
+
"--fontFamily": o.fontFamily,
|
|
369
|
+
"--fontSize": o.fontSize,
|
|
370
|
+
"--fontWeight": o.fontWeight,
|
|
371
|
+
"--grayColor": o.grayColor,
|
|
372
|
+
"--headerColor": o.headerColor,
|
|
373
|
+
"--headerFontSize": o.headerFontSize,
|
|
374
|
+
"--inputBackground": o.inputBackground,
|
|
375
|
+
"--inputBorder": o.inputBorder,
|
|
376
|
+
"--inputBorderRadius": o.inputBorderRadius,
|
|
377
|
+
"--inputFontColor": o.inputFontColor,
|
|
378
|
+
"--labelFontWeight": o.labelFontWeight,
|
|
379
|
+
"--labelPadding": o.labelPadding,
|
|
380
|
+
"--loadingColor": o.loadingColor,
|
|
381
|
+
"--panelBackground": o.panelBackground,
|
|
382
|
+
"--panelBorder": o.panelBorder,
|
|
383
|
+
"--panelBorderRadius": o.panelBorderRadius,
|
|
384
|
+
"--panelPadding": o.panelPadding,
|
|
385
|
+
"--successColor": o.successColor
|
|
387
386
|
};
|
|
388
387
|
return (r, t) => {
|
|
389
|
-
const
|
|
390
|
-
return u(),
|
|
388
|
+
const q = ve("sticky");
|
|
389
|
+
return u(), W(ye, null, {
|
|
391
390
|
default: x(() => [
|
|
392
|
-
m(
|
|
391
|
+
m(ze, {
|
|
393
392
|
id: "fresh-booking-gift-card-module",
|
|
394
393
|
class: "fresh-booking-app",
|
|
395
394
|
type: "gift-card",
|
|
@@ -400,188 +399,188 @@ const Ke = (f) => (ke("data-v-10b51e8f"), f = f(), Ce(), f), Ye = {
|
|
|
400
399
|
}, {
|
|
401
400
|
default: x(() => [
|
|
402
401
|
e(G) ? (u(), b("div", Ye, [
|
|
403
|
-
|
|
404
|
-
|
|
402
|
+
s("h4", Je, [
|
|
403
|
+
s("span", null, ae(e(a)("giftCard.title")), 1)
|
|
405
404
|
]),
|
|
406
|
-
|
|
407
|
-
|
|
405
|
+
s("div", Qe, [
|
|
406
|
+
L(s("div", Xe, null, 512), [
|
|
408
407
|
[O, e(v)]
|
|
409
408
|
]),
|
|
410
|
-
|
|
411
|
-
|
|
409
|
+
L(s("div", null, [
|
|
410
|
+
s("p", {
|
|
412
411
|
id: "fresh-booking-gift-card-description",
|
|
413
|
-
innerHTML: e(
|
|
412
|
+
innerHTML: e(a)("giftCard.description")
|
|
414
413
|
}, null, 8, Ze),
|
|
415
|
-
|
|
414
|
+
s("form", null, [
|
|
416
415
|
m(j, {
|
|
417
416
|
modelValue: e(l),
|
|
418
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
417
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => B(l) ? l.value = i : null),
|
|
419
418
|
type: "text",
|
|
420
419
|
name: "name",
|
|
421
420
|
autocomplete: "name",
|
|
422
|
-
label: e(
|
|
421
|
+
label: e(a)("giftCard.name"),
|
|
423
422
|
icon: "user-alt",
|
|
424
423
|
"icon-color": r.accentColor,
|
|
425
|
-
placeholder: e(
|
|
424
|
+
placeholder: e(a)("giftCard.namePlaceholder"),
|
|
426
425
|
required: ""
|
|
427
426
|
}, null, 8, ["modelValue", "label", "icon-color", "placeholder"]),
|
|
428
427
|
m(j, {
|
|
429
|
-
modelValue: e(
|
|
430
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
428
|
+
modelValue: e(P),
|
|
429
|
+
"onUpdate:modelValue": t[1] || (t[1] = (i) => B(P) ? P.value = i : null),
|
|
431
430
|
type: "email",
|
|
432
431
|
name: "email",
|
|
433
432
|
autocomplete: "email",
|
|
434
|
-
label: e(
|
|
433
|
+
label: e(a)("giftCard.email"),
|
|
435
434
|
icon: "at",
|
|
436
435
|
"icon-color": r.accentColor,
|
|
437
|
-
placeholder: e(
|
|
436
|
+
placeholder: e(a)("giftCard.emailPlaceholder"),
|
|
438
437
|
required: ""
|
|
439
438
|
}, null, 8, ["modelValue", "label", "icon-color", "placeholder"]),
|
|
440
439
|
m(Ee, {
|
|
441
440
|
modelValue: e(p),
|
|
442
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
441
|
+
"onUpdate:modelValue": t[2] || (t[2] = (i) => B(p) ? p.value = i : null),
|
|
443
442
|
icon: "phone-office",
|
|
444
443
|
"icon-color": r.accentColor,
|
|
445
|
-
label: e(
|
|
446
|
-
placeholder: e(
|
|
444
|
+
label: e(a)("giftCard.phone"),
|
|
445
|
+
placeholder: e(a)("giftCard.phonePlaceholder"),
|
|
447
446
|
required: ""
|
|
448
447
|
}, null, 8, ["modelValue", "icon-color", "label", "placeholder"]),
|
|
449
|
-
e(I) ? C("", !0) : (u(), b("div",
|
|
450
|
-
e(F) ? (u(), b("div",
|
|
451
|
-
|
|
452
|
-
|
|
448
|
+
e(I) ? C("", !0) : (u(), b("div", ea, [
|
|
449
|
+
e(F) ? (u(), b("div", aa, [
|
|
450
|
+
s("label", oa, [
|
|
451
|
+
s("span", null, ae(e(a)("giftCard.selectType")), 1)
|
|
453
452
|
]),
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
(u(!0), b(
|
|
457
|
-
m(
|
|
453
|
+
s("div", la, [
|
|
454
|
+
s("ul", null, [
|
|
455
|
+
(u(!0), b(be, null, he(e(F), (i, ee) => (u(), b("li", { key: ee }, [
|
|
456
|
+
m(ne, {
|
|
458
457
|
modelValue: e(n),
|
|
459
|
-
"onUpdate:modelValue": t[3] || (t[3] = (me) =>
|
|
458
|
+
"onUpdate:modelValue": t[3] || (t[3] = (me) => B(n) ? n.value = me : null),
|
|
460
459
|
type: "radio",
|
|
461
460
|
name: "placeType",
|
|
462
461
|
val: ee,
|
|
463
|
-
label:
|
|
462
|
+
label: i.label
|
|
464
463
|
}, null, 8, ["modelValue", "val", "label"])
|
|
465
464
|
]))), 128))
|
|
466
465
|
]),
|
|
467
|
-
e(F)[e(n)] && e(F)[e(n)].data.length > 1 ? (u(),
|
|
466
|
+
e(F)[e(n)] && e(F)[e(n)].data.length > 1 ? (u(), W(Me, {
|
|
468
467
|
key: 0,
|
|
469
468
|
modelValue: e(h),
|
|
470
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
471
|
-
placeholder: e(
|
|
469
|
+
"onUpdate:modelValue": t[4] || (t[4] = (i) => B(h) ? h.value = i : null),
|
|
470
|
+
placeholder: e(a)("giftCard.selectPlacePlaceholder"),
|
|
472
471
|
options: e(F)[e(n)].data,
|
|
473
472
|
labelKey: "name",
|
|
474
473
|
valueKey: "id",
|
|
475
474
|
required: ""
|
|
476
475
|
}, null, 8, ["modelValue", "placeholder", "options"])) : C("", !0)
|
|
477
476
|
])
|
|
478
|
-
])) : (u(),
|
|
477
|
+
])) : (u(), W(oe, {
|
|
479
478
|
key: 1,
|
|
480
479
|
color: r.loadingColor
|
|
481
480
|
}, null, 8, ["color"]))
|
|
482
481
|
])),
|
|
483
482
|
m(j, {
|
|
484
483
|
modelValue: e(g),
|
|
485
|
-
"onUpdate:modelValue": t[5] || (t[5] = (
|
|
484
|
+
"onUpdate:modelValue": t[5] || (t[5] = (i) => B(g) ? g.value = i : null),
|
|
486
485
|
type: "number",
|
|
487
486
|
name: "value",
|
|
488
|
-
label: e(
|
|
487
|
+
label: e(a)("giftCard.value"),
|
|
489
488
|
icon: "money-bill",
|
|
490
489
|
"icon-color": r.accentColor,
|
|
491
|
-
placeholder: e(
|
|
490
|
+
placeholder: e(a)("giftCard.valuePlaceholder"),
|
|
492
491
|
suffix: e(K),
|
|
493
492
|
required: ""
|
|
494
493
|
}, null, 8, ["modelValue", "label", "icon-color", "placeholder", "suffix"]),
|
|
495
|
-
m(
|
|
496
|
-
modelValue: e(
|
|
497
|
-
"onUpdate:modelValue": t[6] || (t[6] = (
|
|
494
|
+
m(ne, {
|
|
495
|
+
modelValue: e(z),
|
|
496
|
+
"onUpdate:modelValue": t[6] || (t[6] = (i) => B(z) ? z.value = i : null),
|
|
498
497
|
type: "checkbox",
|
|
499
498
|
name: "showValue",
|
|
500
|
-
label: e(
|
|
501
|
-
checked: e(
|
|
499
|
+
label: e(a)("giftCard.showValue"),
|
|
500
|
+
checked: e(z)
|
|
502
501
|
}, null, 8, ["modelValue", "label", "checked"]),
|
|
503
502
|
C("", !0),
|
|
504
503
|
C("", !0)
|
|
505
504
|
])
|
|
506
505
|
], 512), [
|
|
507
|
-
[O, e(
|
|
506
|
+
[O, e(d)]
|
|
508
507
|
]),
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
innerHTML: e(
|
|
512
|
-
}, null, 8,
|
|
508
|
+
L(s("div", null, [
|
|
509
|
+
s("div", {
|
|
510
|
+
innerHTML: e(a)("giftCard.thankYou")
|
|
511
|
+
}, null, 8, ta)
|
|
513
512
|
], 512), [
|
|
514
|
-
[O, e(
|
|
513
|
+
[O, e(T)]
|
|
515
514
|
])
|
|
516
515
|
]),
|
|
517
|
-
r.layout !== "minimal" && e(
|
|
518
|
-
|
|
516
|
+
r.layout !== "minimal" && e(d) ? (u(), b("div", na, [
|
|
517
|
+
s("div", ra, [
|
|
519
518
|
m(D, {
|
|
520
|
-
label: e(
|
|
521
|
-
style:
|
|
519
|
+
label: e(a)("giftCard.orderGiftCard"),
|
|
520
|
+
style: le({
|
|
522
521
|
background: r.successColor
|
|
523
522
|
}),
|
|
524
523
|
"full-width": !0,
|
|
525
524
|
disabled: !e(w),
|
|
526
525
|
"is-loading": e(V),
|
|
527
|
-
"onUpdate:isLoading": t[9] || (t[9] = (
|
|
526
|
+
"onUpdate:isLoading": t[9] || (t[9] = (i) => B(V) ? V.value = i : null),
|
|
528
527
|
onClickEvent: H
|
|
529
528
|
}, null, 8, ["label", "style", "disabled", "is-loading"])
|
|
530
529
|
])
|
|
531
530
|
])) : C("", !0),
|
|
532
|
-
e(
|
|
531
|
+
e(d) ? (u(), b("div", ia, [
|
|
533
532
|
m(j, {
|
|
534
533
|
modelValue: e(_),
|
|
535
|
-
"onUpdate:modelValue": t[10] || (t[10] = (
|
|
534
|
+
"onUpdate:modelValue": t[10] || (t[10] = (i) => B(_) ? _.value = i : null),
|
|
536
535
|
type: "textarea",
|
|
537
536
|
name: "remark",
|
|
538
|
-
label: e(
|
|
537
|
+
label: e(a)("giftCard.remark"),
|
|
539
538
|
icon: "info-circle",
|
|
540
539
|
"icon-color": r.accentColor,
|
|
541
|
-
placeholder: e(
|
|
540
|
+
placeholder: e(a)("giftCard.remarkPlaceholder")
|
|
542
541
|
}, null, 8, ["modelValue", "label", "icon-color", "placeholder"])
|
|
543
542
|
])) : C("", !0),
|
|
544
|
-
e(
|
|
543
|
+
e(d) ? L((u(), b("div", sa, [
|
|
545
544
|
m(D, {
|
|
546
|
-
label: e(
|
|
547
|
-
style:
|
|
545
|
+
label: e(a)("giftCard.orderGiftCard"),
|
|
546
|
+
style: le({
|
|
548
547
|
background: r.successColor
|
|
549
548
|
}),
|
|
550
549
|
"full-width": !0,
|
|
551
550
|
disabled: !e(w),
|
|
552
551
|
"data-test": "orderGiftCard",
|
|
553
552
|
"is-loading": e(V),
|
|
554
|
-
"onUpdate:isLoading": t[11] || (t[11] = (
|
|
553
|
+
"onUpdate:isLoading": t[11] || (t[11] = (i) => B(V) ? V.value = i : null),
|
|
555
554
|
onClickEvent: H
|
|
556
555
|
}, null, 8, ["label", "style", "disabled", "is-loading"]),
|
|
557
|
-
|
|
558
|
-
m(
|
|
556
|
+
L(s("div", da, [
|
|
557
|
+
m(Ue)
|
|
559
558
|
], 512), [
|
|
560
559
|
[O, e(N)]
|
|
561
560
|
])
|
|
562
561
|
])), [
|
|
563
|
-
[
|
|
562
|
+
[q]
|
|
564
563
|
]) : C("", !0)
|
|
565
|
-
])) : (u(),
|
|
564
|
+
])) : (u(), W(oe, { key: 1 }))
|
|
566
565
|
]),
|
|
567
566
|
_: 1
|
|
568
567
|
}, 8, ["access-token", "data-layout"])
|
|
569
568
|
]),
|
|
570
569
|
fallback: x(() => [
|
|
571
|
-
|
|
570
|
+
ua
|
|
572
571
|
]),
|
|
573
572
|
_: 1
|
|
574
573
|
});
|
|
575
574
|
};
|
|
576
575
|
}
|
|
577
576
|
});
|
|
578
|
-
const
|
|
577
|
+
const pa = /* @__PURE__ */ _e(ca, [["__scopeId", "data-v-10b51e8f"]]);
|
|
579
578
|
process.env.NODE_ENV === "production" && Te.flare.light();
|
|
580
|
-
const
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
579
|
+
const ma = we(), E = Fe({ components: { GiftCard: pa } });
|
|
580
|
+
E.use(Re.flareVue);
|
|
581
|
+
E.use(ma);
|
|
582
|
+
E.use($e);
|
|
583
|
+
E.use(Ie);
|
|
584
|
+
E.use(qe, { bootstrap: !1 });
|
|
585
|
+
E.mount("#fresh-booking-gift-card-app");
|
|
587
586
|
//# sourceMappingURL=gift-card.es.js.map
|