@konnectio/core 4.0.56-rc7 → 4.0.56-rc8
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-i2xWkFyi.js → ActionField-na8McB-H.js} +1 -1
- package/dist/ActionField-na8McB-H.js.br +0 -0
- package/dist/{AvailabilitySkeleton-PWA_yfC-.js → AvailabilitySkeleton-1_yLVsq6.js} +4 -4
- package/dist/AvailabilitySkeleton-1_yLVsq6.js.br +0 -0
- package/dist/{CheckoutWindow-k3-Mh7Mp.js → CheckoutWindow-r6ch1iOr.js} +1 -1
- package/dist/CheckoutWindow-r6ch1iOr.js.br +0 -0
- package/dist/{DateField.vue_vue_type_style_index_0_lang-Lzoa_ZgT.js → DateField.vue_vue_type_style_index_0_lang-ZM6h3KFg.js} +1 -1
- package/dist/DateField.vue_vue_type_style_index_0_lang-ZM6h3KFg.js.br +0 -0
- package/dist/{Field-f9KUVLIW.js → Field-S_yxW5IQ.js} +2 -2
- package/dist/Field-S_yxW5IQ.js.br +0 -0
- package/dist/{SelectField.vue_vue_type_style_index_0_lang-1RNEqBhG.js → SelectField.vue_vue_type_style_index_0_lang-K94DVjrE.js} +8 -8
- package/dist/SelectField.vue_vue_type_style_index_0_lang-K94DVjrE.js.br +0 -0
- package/dist/{ThankYou-cAeMnWCk.js → ThankYou-ekf_1AWY.js} +4 -4
- package/dist/ThankYou-ekf_1AWY.js.br +0 -0
- package/dist/{_-SqGSx3KP.js → _-vErl-x3v.js} +1 -1
- package/dist/availability.js +101 -101
- package/dist/availability.js.br +0 -0
- package/dist/{event-WJGagPbM.js → event-iDLUEMAV.js} +7 -7
- package/dist/event-iDLUEMAV.js.br +0 -0
- package/dist/event.js +7 -7
- package/dist/event.js.br +0 -0
- package/dist/gift-card-validation.js +2 -2
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card.js +217 -207
- package/dist/gift-card.js.br +0 -0
- package/dist/{hotel-z4fa3tEa.js → hotel-4O89o7V2.js} +888 -878
- package/dist/hotel-4O89o7V2.js.br +0 -0
- package/dist/hotel.js +9 -9
- package/dist/polyfill.js +93 -93
- package/dist/polyfill.js.br +0 -0
- package/package.json +1 -1
- package/dist/ActionField-i2xWkFyi.js.br +0 -0
- package/dist/AvailabilitySkeleton-PWA_yfC-.js.br +0 -0
- package/dist/CheckoutWindow-k3-Mh7Mp.js.br +0 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-Lzoa_ZgT.js.br +0 -0
- package/dist/Field-f9KUVLIW.js.br +0 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-1RNEqBhG.js.br +0 -0
- package/dist/ThankYou-cAeMnWCk.js.br +0 -0
- package/dist/components/Alert.vue.d.ts +0 -5
- package/dist/components/Alert.vue.d.ts.map +0 -1
- package/dist/components/Clickable.vue.d.ts +0 -5
- package/dist/components/Clickable.vue.d.ts.map +0 -1
- package/dist/components/Container.vue.d.ts +0 -5
- package/dist/components/Container.vue.d.ts.map +0 -1
- package/dist/components/ErrorMessage.vue.d.ts +0 -5
- package/dist/components/ErrorMessage.vue.d.ts.map +0 -1
- package/dist/components/Gallery.vue.d.ts +0 -5
- package/dist/components/Gallery.vue.d.ts.map +0 -1
- package/dist/components/GoogleNotice.vue.d.ts +0 -4
- package/dist/components/GoogleNotice.vue.d.ts.map +0 -1
- package/dist/components/Icon.vue.d.ts +0 -5
- package/dist/components/Icon.vue.d.ts.map +0 -1
- package/dist/components/Loading.vue.d.ts +0 -5
- package/dist/components/Loading.vue.d.ts.map +0 -1
- package/dist/components/Spinner.vue.d.ts +0 -4
- package/dist/components/Spinner.vue.d.ts.map +0 -1
- package/dist/components/forms/EventAvailabilityForm.vue.d.ts +0 -5
- package/dist/components/forms/EventAvailabilityForm.vue.d.ts.map +0 -1
- package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +0 -5
- package/dist/components/forms/HotelAvailabilityForm.vue.d.ts.map +0 -1
- package/dist/components/forms/HotelReservationForm.vue.d.ts +0 -4
- package/dist/components/forms/HotelReservationForm.vue.d.ts.map +0 -1
- package/dist/components/forms/MultiStepForm.vue.d.ts +0 -5
- package/dist/components/forms/MultiStepForm.vue.d.ts.map +0 -1
- package/dist/components/forms/ReservationForm.vue.d.ts +0 -6
- package/dist/components/forms/ReservationForm.vue.d.ts.map +0 -1
- package/dist/components/forms/_.vue.d.ts +0 -4
- package/dist/components/forms/_.vue.d.ts.map +0 -1
- package/dist/components/inputs/Checkbox.vue.d.ts +0 -5
- package/dist/components/inputs/Checkbox.vue.d.ts.map +0 -1
- package/dist/components/inputs/CheckboxField.vue.d.ts +0 -5
- package/dist/components/inputs/CheckboxField.vue.d.ts.map +0 -1
- package/dist/components/inputs/DateField.vue.d.ts +0 -5
- package/dist/components/inputs/DateField.vue.d.ts.map +0 -1
- package/dist/components/inputs/InputField.vue.d.ts +0 -5
- package/dist/components/inputs/InputField.vue.d.ts.map +0 -1
- package/dist/components/inputs/MediaSelector.vue.d.ts +0 -5
- package/dist/components/inputs/MediaSelector.vue.d.ts.map +0 -1
- package/dist/components/inputs/NumberField.vue.d.ts +0 -5
- package/dist/components/inputs/NumberField.vue.d.ts.map +0 -1
- package/dist/components/inputs/SelectField.vue.d.ts +0 -5
- package/dist/components/inputs/SelectField.vue.d.ts.map +0 -1
- package/dist/components/inputs/TextField.vue.d.ts +0 -5
- package/dist/components/inputs/TextField.vue.d.ts.map +0 -1
- package/dist/components/inputs/TimeField.vue.d.ts +0 -5
- package/dist/components/inputs/TimeField.vue.d.ts.map +0 -1
- package/dist/components/inputs/grouped/ActionField.vue.d.ts +0 -5
- package/dist/components/inputs/grouped/ActionField.vue.d.ts.map +0 -1
- package/dist/components/inputs/grouped/CountryField.vue.d.ts +0 -5
- package/dist/components/inputs/grouped/CountryField.vue.d.ts.map +0 -1
- package/dist/components/inputs/grouped/NameField.vue.d.ts +0 -5
- package/dist/components/inputs/grouped/NameField.vue.d.ts.map +0 -1
- package/dist/components/inputs/grouped/PhoneField.vue.d.ts +0 -5
- package/dist/components/inputs/grouped/PhoneField.vue.d.ts.map +0 -1
- package/dist/components/inputs/grouped/RoomConfigField.vue.d.ts +0 -5
- package/dist/components/inputs/grouped/RoomConfigField.vue.d.ts.map +0 -1
- package/dist/components/listings/Base.vue.d.ts +0 -6
- package/dist/components/listings/Base.vue.d.ts.map +0 -1
- package/dist/components/listings/Event.vue.d.ts +0 -5
- package/dist/components/listings/Event.vue.d.ts.map +0 -1
- package/dist/components/listings/Hotel.vue.d.ts +0 -5
- package/dist/components/listings/Hotel.vue.d.ts.map +0 -1
- package/dist/components/listings/Template.vue.d.ts +0 -5
- package/dist/components/listings/Template.vue.d.ts.map +0 -1
- package/dist/components/side-panels/Base.vue.d.ts +0 -6
- package/dist/components/side-panels/Base.vue.d.ts.map +0 -1
- package/dist/components/side-panels/ListingInfo.vue.d.ts +0 -5
- package/dist/components/side-panels/ListingInfo.vue.d.ts.map +0 -1
- package/dist/components/side-panels/Template.vue.d.ts +0 -5
- package/dist/components/side-panels/Template.vue.d.ts.map +0 -1
- package/dist/components/side-panels/TermsOfService.vue.d.ts +0 -5
- package/dist/components/side-panels/TermsOfService.vue.d.ts.map +0 -1
- package/dist/components/skeletons/AvailabilitySkeleton.vue.d.ts +0 -5
- package/dist/components/skeletons/AvailabilitySkeleton.vue.d.ts.map +0 -1
- package/dist/components/skeletons/Field.vue.d.ts +0 -5
- package/dist/components/skeletons/Field.vue.d.ts.map +0 -1
- package/dist/components/skeletons/GiftCardSkeleton.vue.d.ts +0 -5
- package/dist/components/skeletons/GiftCardSkeleton.vue.d.ts.map +0 -1
- package/dist/components/skeletons/HotelSkeleton.vue.d.ts +0 -5
- package/dist/components/skeletons/HotelSkeleton.vue.d.ts.map +0 -1
- package/dist/components/skeletons/Listing.vue.d.ts +0 -5
- package/dist/components/skeletons/Listing.vue.d.ts.map +0 -1
- package/dist/components/skeletons/Sidebar.vue.d.ts +0 -5
- package/dist/components/skeletons/Sidebar.vue.d.ts.map +0 -1
- package/dist/components/skeletons/_.vue.d.ts +0 -5
- package/dist/components/skeletons/_.vue.d.ts.map +0 -1
- package/dist/components/views/CheckoutWindow.vue.d.ts +0 -5
- package/dist/components/views/CheckoutWindow.vue.d.ts.map +0 -1
- package/dist/components/views/TermsOfService.vue.d.ts +0 -5
- package/dist/components/views/TermsOfService.vue.d.ts.map +0 -1
- package/dist/components/views/ThankYou.vue.d.ts +0 -5
- package/dist/components/views/ThankYou.vue.d.ts.map +0 -1
- package/dist/event-WJGagPbM.js.br +0 -0
- package/dist/hotel-z4fa3tEa.js.br +0 -0
package/dist/gift-card.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { d as ue, u as ce, s as J, c as ie, r as
|
|
2
|
-
import { a as Ue, C as te, P as Ee, _ as Re } from "./CheckoutWindow-
|
|
3
|
-
import { E as Ie } from "./_-
|
|
4
|
-
import { F as
|
|
1
|
+
import { d as ue, u as ce, s as J, c as ie, r as C, ae as U, e as K, f as _, j as ee, S as Y, i as pe, h as me, af as fe, k as Q, B as se, b as ve, o as c, m as L, w as G, x as s, l as b, p as n, z as e, C as z, n as T, q as re, I as ge, _ as de, Y as be, Z as he, D as ye, F as ae, ag as j, ah as N, $ as ke, a6 as Ce, G as k, y as _e, a7 as le, T as W, A as Ve, M as Fe, N as we, R as Pe, U as Te, V as Se, ab as $e } from "./SelectField.vue_vue_type_style_index_0_lang-K94DVjrE.js";
|
|
2
|
+
import { a as Ue, C as te, P as Ee, _ as Re } from "./CheckoutWindow-r6ch1iOr.js";
|
|
3
|
+
import { E as Ie } from "./_-vErl-x3v.js";
|
|
4
|
+
import { F as x } from "./Field-S_yxW5IQ.js";
|
|
5
5
|
import "./_commonjsHelpers-2ufMB8rV.js";
|
|
6
6
|
const oe = ue("giftCard", () => {
|
|
7
|
-
const { pay:
|
|
7
|
+
const { pay: S } = ce(), { bearerToken: f, metaData: V, currencyId: t } = J(ie()), i = C(U.InitialState), v = K("konnectio_name", "", void 0, { serializer: Y.string }), d = K("konnectio_email", "", void 0, { serializer: Y.string }), g = K("konnectio_phone", "", void 0, { serializer: Y.string }), r = C(""), p = C(1), m = C(!0), A = C(""), y = C({
|
|
8
8
|
base64: "",
|
|
9
9
|
type: "",
|
|
10
10
|
name: ""
|
|
11
|
-
}), l =
|
|
11
|
+
}), l = C(void 0), u = C(0), h = C(!1), R = C(0), F = _(() => i.value === U.InitialState || i.value === U.WaitingForResponse), I = _(() => i.value === U.ReadyToPay), M = _(() => i.value === U.PaymentSuccess), w = _(() => {
|
|
12
12
|
const a = {
|
|
13
13
|
1: {
|
|
14
14
|
label: ee.t("giftCard.hotelType"),
|
|
@@ -18,50 +18,50 @@ const oe = ue("giftCard", () => {
|
|
|
18
18
|
label: ee.t("giftCard.restaurantType"),
|
|
19
19
|
data: []
|
|
20
20
|
}
|
|
21
|
-
},
|
|
22
|
-
return
|
|
23
|
-
a[
|
|
21
|
+
}, $ = V.value.hotels[0].places;
|
|
22
|
+
return $ && $.forEach((P) => {
|
|
23
|
+
a[P.placeType].data.push(P);
|
|
24
24
|
}), Object.fromEntries(
|
|
25
|
-
Object.entries(a).filter(([,
|
|
25
|
+
Object.entries(a).filter(([, P]) => P.data.length > 0)
|
|
26
26
|
);
|
|
27
|
-
}),
|
|
27
|
+
}), B = _(() => R.value !== 0), E = _(() => {
|
|
28
28
|
let a;
|
|
29
|
-
if (
|
|
30
|
-
a =
|
|
31
|
-
else if (
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
String(X.id) === String(
|
|
29
|
+
if (B.value)
|
|
30
|
+
a = w.value[R.value].data[0];
|
|
31
|
+
else if (u.value !== 0) {
|
|
32
|
+
const $ = l.value, P = w.value[u.value].data;
|
|
33
|
+
P.length === 1 ? a = P[0] : $ !== void 0 && P.forEach((X) => {
|
|
34
|
+
String(X.id) === String($) && (a = X);
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
return a;
|
|
38
|
-
}),
|
|
38
|
+
}), D = _(() => !(!v.value || !d.value || !(g.value.length >= 5) || !r.value || E.value === void 0)), H = _(() => !(i.value === U.InitialState && h.value)), Z = _(() => !!(i.value === U.WaitingForResponse && h.value));
|
|
39
39
|
async function q() {
|
|
40
|
-
|
|
40
|
+
i.value = U.WaitingForResponse, h.value = !0, await pe.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
|
|
41
41
|
termsOfserviceURL: window.location.origin,
|
|
42
42
|
checkoutUrl: window.location.origin,
|
|
43
43
|
currencyID: t.value,
|
|
44
44
|
language: me(),
|
|
45
|
-
amount:
|
|
46
|
-
quantity:
|
|
47
|
-
freeText:
|
|
48
|
-
showPrice:
|
|
49
|
-
contactName:
|
|
50
|
-
contactEmail:
|
|
51
|
-
contactPhone:
|
|
52
|
-
imageBase64: fe(
|
|
53
|
-
imageName:
|
|
54
|
-
imageFormat:
|
|
45
|
+
amount: r.value,
|
|
46
|
+
quantity: p.value,
|
|
47
|
+
freeText: A.value,
|
|
48
|
+
showPrice: m.value,
|
|
49
|
+
contactName: v.value,
|
|
50
|
+
contactEmail: d.value,
|
|
51
|
+
contactPhone: g.value,
|
|
52
|
+
imageBase64: fe(y.value.base64),
|
|
53
|
+
imageName: y.value.name,
|
|
54
|
+
imageFormat: y.value.type,
|
|
55
55
|
placeType: E.value ? E.value.placeType : void 0,
|
|
56
56
|
placeID: E.value ? E.value.id : void 0
|
|
57
57
|
}, {
|
|
58
58
|
headers: {
|
|
59
|
-
Authorization:
|
|
59
|
+
Authorization: f.value,
|
|
60
60
|
Accept: "application/json",
|
|
61
|
-
"Fresh-Booking-Ver": "4.0.56-
|
|
61
|
+
"Fresh-Booking-Ver": "4.0.56-rc8"
|
|
62
62
|
}
|
|
63
63
|
}).then((a) => {
|
|
64
|
-
|
|
64
|
+
i.value = U.ReadyToPay, h.value = !1, S({
|
|
65
65
|
callback: () => console.log("Callback!"),
|
|
66
66
|
response: a.data
|
|
67
67
|
});
|
|
@@ -72,29 +72,29 @@ const oe = ue("giftCard", () => {
|
|
|
72
72
|
}
|
|
73
73
|
return {
|
|
74
74
|
selectedPlace: E,
|
|
75
|
-
moduleState:
|
|
76
|
-
name:
|
|
77
|
-
email:
|
|
78
|
-
phone:
|
|
79
|
-
value:
|
|
80
|
-
remark:
|
|
81
|
-
showValue:
|
|
82
|
-
quantity:
|
|
83
|
-
media:
|
|
75
|
+
moduleState: i,
|
|
76
|
+
name: v,
|
|
77
|
+
email: d,
|
|
78
|
+
phone: g,
|
|
79
|
+
value: r,
|
|
80
|
+
remark: A,
|
|
81
|
+
showValue: m,
|
|
82
|
+
quantity: p,
|
|
83
|
+
media: y,
|
|
84
84
|
placeId: l,
|
|
85
|
-
placeType:
|
|
86
|
-
showFormPage:
|
|
85
|
+
placeType: u,
|
|
86
|
+
showFormPage: F,
|
|
87
87
|
showPaymentPage: I,
|
|
88
|
-
showConfirmationPage:
|
|
89
|
-
places:
|
|
90
|
-
hasFilledForm:
|
|
91
|
-
hasForcedPlaceType:
|
|
92
|
-
isWaitingForResponse:
|
|
93
|
-
isMetaDataAvailable:
|
|
88
|
+
showConfirmationPage: M,
|
|
89
|
+
places: w,
|
|
90
|
+
hasFilledForm: D,
|
|
91
|
+
hasForcedPlaceType: B,
|
|
92
|
+
isWaitingForResponse: Z,
|
|
93
|
+
isMetaDataAvailable: H,
|
|
94
94
|
orderGiftCard: q,
|
|
95
95
|
initialize: o
|
|
96
96
|
};
|
|
97
|
-
}), qe = { class: "media-selector" }, Le = ["accept"],
|
|
97
|
+
}), qe = { class: "media-selector" }, Le = ["accept"], Ae = { class: "media-selector-wrapper" }, Me = { class: "media-selector-tools" }, xe = { key: 0 }, Ge = { key: 1 }, ze = { key: 2 }, Be = ["src"], De = /* @__PURE__ */ Q({
|
|
98
98
|
__name: "MediaSelector",
|
|
99
99
|
props: {
|
|
100
100
|
modelValue: {},
|
|
@@ -104,39 +104,39 @@ const oe = ue("giftCard", () => {
|
|
|
104
104
|
required: { type: Boolean, default: !1 }
|
|
105
105
|
},
|
|
106
106
|
emits: ["update:modelValue"],
|
|
107
|
-
setup(
|
|
108
|
-
const
|
|
109
|
-
function
|
|
110
|
-
|
|
107
|
+
setup(S, { emit: f }) {
|
|
108
|
+
const V = f, t = S, { t: i } = se(), { display: v } = ve(), d = C(), g = _(() => t.modelValue.base64 !== "");
|
|
109
|
+
function r(l) {
|
|
110
|
+
V("update:modelValue", l);
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
|
|
112
|
+
function p() {
|
|
113
|
+
r({
|
|
114
114
|
base64: "",
|
|
115
115
|
name: "",
|
|
116
116
|
type: ""
|
|
117
|
-
}),
|
|
117
|
+
}), d.value && (d.value.value = "");
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
|
|
119
|
+
function m() {
|
|
120
|
+
d.value && d.value.click();
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
const [
|
|
124
|
-
|
|
122
|
+
function A(l, u) {
|
|
123
|
+
const [h, R] = [l.name, l.type], F = new FileReader();
|
|
124
|
+
F.onload = function(I) {
|
|
125
125
|
if (I.target) {
|
|
126
|
-
const
|
|
127
|
-
|
|
126
|
+
const M = I.target.result;
|
|
127
|
+
u({ base64: M, name: h, type: R });
|
|
128
128
|
} else
|
|
129
|
-
|
|
130
|
-
message:
|
|
129
|
+
v({
|
|
130
|
+
message: i("imageUploadError"),
|
|
131
131
|
type: "error"
|
|
132
132
|
});
|
|
133
|
-
},
|
|
133
|
+
}, F.readAsDataURL(l);
|
|
134
134
|
}
|
|
135
|
-
async function
|
|
135
|
+
async function y() {
|
|
136
136
|
let l;
|
|
137
|
-
(l =
|
|
137
|
+
(l = d.value.files) instanceof FileList && A(l[0], r);
|
|
138
138
|
}
|
|
139
|
-
return (l,
|
|
139
|
+
return (l, u) => (c(), L(ge, {
|
|
140
140
|
label: l.label,
|
|
141
141
|
required: l.required,
|
|
142
142
|
type: "media"
|
|
@@ -145,53 +145,53 @@ const oe = ue("giftCard", () => {
|
|
|
145
145
|
s("div", qe, [
|
|
146
146
|
s("input", {
|
|
147
147
|
ref_key: "fileInput",
|
|
148
|
-
ref:
|
|
148
|
+
ref: d,
|
|
149
149
|
type: "file",
|
|
150
150
|
class: "hidden",
|
|
151
151
|
accept: l.validation,
|
|
152
152
|
single: "",
|
|
153
|
-
onChange:
|
|
153
|
+
onChange: u[0] || (u[0] = (h) => y())
|
|
154
154
|
}, null, 40, Le),
|
|
155
|
-
s("div",
|
|
156
|
-
s("ul",
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
label: e(
|
|
155
|
+
s("div", Ae, [
|
|
156
|
+
s("ul", Me, [
|
|
157
|
+
g.value ? T("", !0) : (c(), b("li", xe, [
|
|
158
|
+
n(z, {
|
|
159
|
+
label: e(i)("uploadFile"),
|
|
160
160
|
type: "button",
|
|
161
161
|
icon: "upload",
|
|
162
162
|
"icon-color": l.iconColor,
|
|
163
|
-
onClickEvent:
|
|
163
|
+
onClickEvent: u[1] || (u[1] = (h) => m())
|
|
164
164
|
}, null, 8, ["label", "icon-color"])
|
|
165
165
|
])),
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
label: e(
|
|
166
|
+
g.value ? (c(), b("li", Ge, [
|
|
167
|
+
n(z, {
|
|
168
|
+
label: e(i)("replaceFile"),
|
|
169
169
|
type: "button",
|
|
170
170
|
icon: "repeat-alt",
|
|
171
171
|
"icon-color": l.iconColor,
|
|
172
|
-
onClickEvent:
|
|
172
|
+
onClickEvent: u[2] || (u[2] = (h) => m())
|
|
173
173
|
}, null, 8, ["label", "icon-color"])
|
|
174
|
-
])) :
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
label: e(
|
|
174
|
+
])) : T("", !0),
|
|
175
|
+
g.value ? (c(), b("li", ze, [
|
|
176
|
+
n(z, {
|
|
177
|
+
label: e(i)("removeFile"),
|
|
178
178
|
type: "button",
|
|
179
179
|
icon: "trash-alt",
|
|
180
180
|
"icon-color": l.iconColor,
|
|
181
|
-
onClickEvent:
|
|
181
|
+
onClickEvent: u[3] || (u[3] = (h) => p())
|
|
182
182
|
}, null, 8, ["label", "icon-color"])
|
|
183
|
-
])) :
|
|
183
|
+
])) : T("", !0)
|
|
184
184
|
]),
|
|
185
185
|
s("div", {
|
|
186
186
|
class: re([
|
|
187
187
|
"media-selector-previewer",
|
|
188
|
-
{ opened:
|
|
188
|
+
{ opened: g.value }
|
|
189
189
|
])
|
|
190
190
|
}, [
|
|
191
|
-
l.modelValue ? (
|
|
191
|
+
l.modelValue ? (c(), b("img", {
|
|
192
192
|
key: 0,
|
|
193
193
|
src: l.modelValue.base64
|
|
194
|
-
}, null, 8,
|
|
194
|
+
}, null, 8, Be)) : T("", !0)
|
|
195
195
|
], 2)
|
|
196
196
|
])
|
|
197
197
|
])
|
|
@@ -200,9 +200,9 @@ const oe = ue("giftCard", () => {
|
|
|
200
200
|
}, 8, ["label", "required"]));
|
|
201
201
|
}
|
|
202
202
|
});
|
|
203
|
-
function ne(
|
|
204
|
-
const
|
|
205
|
-
|
|
203
|
+
function ne(S) {
|
|
204
|
+
const f = S;
|
|
205
|
+
f.__i18n = f.__i18n || [], f.__i18n.push({
|
|
206
206
|
locale: "",
|
|
207
207
|
resource: {
|
|
208
208
|
da: {
|
|
@@ -220,25 +220,25 @@ function ne(w) {
|
|
|
220
220
|
}
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
|
-
typeof ne == "function" && ne(
|
|
224
|
-
const
|
|
223
|
+
typeof ne == "function" && ne(De);
|
|
224
|
+
const je = { class: "gift-card-skeleton" }, Ne = { class: "gift-card-skeleton-form" }, We = /* @__PURE__ */ Q({
|
|
225
225
|
__name: "GiftCardSkeleton",
|
|
226
|
-
setup(
|
|
227
|
-
return (
|
|
228
|
-
s("div",
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
226
|
+
setup(S) {
|
|
227
|
+
return (f, V) => (c(), b("div", je, [
|
|
228
|
+
s("div", Ne, [
|
|
229
|
+
n(x),
|
|
230
|
+
n(x),
|
|
231
|
+
n(x),
|
|
232
|
+
n(x),
|
|
233
|
+
n(x, { "is-text-area": "" }),
|
|
234
|
+
n(Ie, { height: "44px" })
|
|
235
235
|
])
|
|
236
236
|
]));
|
|
237
237
|
}
|
|
238
|
-
}),
|
|
238
|
+
}), Oe = /* @__PURE__ */ de(We, [["__scopeId", "data-v-e35c75b3"]]), He = {
|
|
239
239
|
key: 0,
|
|
240
240
|
id: "konnectio-gift-card-wrapper"
|
|
241
|
-
},
|
|
241
|
+
}, Ze = { id: "konnectio-gift-card-title" }, Ke = { id: "konnectio-gift-card-content" }, Ye = { id: "konnectio-gift-card-payment" }, Je = ["innerHTML"], Qe = { key: 0 }, Xe = {
|
|
242
242
|
key: 0,
|
|
243
243
|
id: "fresh-booking-select-place-type"
|
|
244
244
|
}, ea = {
|
|
@@ -261,96 +261,96 @@ const Ne = { class: "gift-card-skeleton" }, We = { class: "gift-card-skeleton-fo
|
|
|
261
261
|
placeType: {},
|
|
262
262
|
styling: {}
|
|
263
263
|
},
|
|
264
|
-
setup(
|
|
265
|
-
const
|
|
264
|
+
setup(S) {
|
|
265
|
+
const f = S, V = _(() => ({
|
|
266
266
|
panelMaxWidth: "800px",
|
|
267
|
-
...
|
|
267
|
+
...f.styling
|
|
268
268
|
})), { t } = se(), {
|
|
269
|
-
name:
|
|
270
|
-
email:
|
|
271
|
-
phone:
|
|
272
|
-
value:
|
|
273
|
-
remark:
|
|
274
|
-
showValue:
|
|
275
|
-
quantity:
|
|
276
|
-
media:
|
|
277
|
-
placeId:
|
|
269
|
+
name: i,
|
|
270
|
+
email: v,
|
|
271
|
+
phone: d,
|
|
272
|
+
value: g,
|
|
273
|
+
remark: r,
|
|
274
|
+
showValue: p,
|
|
275
|
+
quantity: m,
|
|
276
|
+
media: A,
|
|
277
|
+
placeId: y,
|
|
278
278
|
placeType: l,
|
|
279
|
-
showFormPage:
|
|
280
|
-
showPaymentPage:
|
|
279
|
+
showFormPage: u,
|
|
280
|
+
showPaymentPage: h,
|
|
281
281
|
showConfirmationPage: R,
|
|
282
|
-
places:
|
|
282
|
+
places: F,
|
|
283
283
|
hasFilledForm: I,
|
|
284
|
-
hasForcedPlaceType:
|
|
285
|
-
isWaitingForResponse:
|
|
286
|
-
isMetaDataAvailable:
|
|
287
|
-
} = J(oe()), { initialize: E, orderGiftCard:
|
|
284
|
+
hasForcedPlaceType: M,
|
|
285
|
+
isWaitingForResponse: w,
|
|
286
|
+
isMetaDataAvailable: B
|
|
287
|
+
} = J(oe()), { initialize: E, orderGiftCard: D } = oe(), { isRecaptchaEnabled: H, currency: Z } = J(ie());
|
|
288
288
|
return be(l, () => {
|
|
289
|
-
|
|
290
|
-
}),
|
|
291
|
-
const q =
|
|
289
|
+
y.value = void 0;
|
|
290
|
+
}), he(() => {
|
|
291
|
+
const q = f.placeType ? parseInt(f.placeType) : void 0;
|
|
292
292
|
E(q);
|
|
293
|
-
}), (q, o) => (
|
|
293
|
+
}), (q, o) => (c(), L(we, { styling: V.value }, {
|
|
294
294
|
default: G(() => [
|
|
295
|
-
(
|
|
295
|
+
(c(), L(ye, null, {
|
|
296
296
|
default: G(() => [
|
|
297
|
-
|
|
297
|
+
n(Fe, {
|
|
298
298
|
id: "konnectio-gift-card-module",
|
|
299
299
|
type: "gift-card",
|
|
300
300
|
"access-token": q.accessToken,
|
|
301
301
|
"data-layout": q.layout
|
|
302
302
|
}, {
|
|
303
303
|
default: G(() => [
|
|
304
|
-
e(
|
|
305
|
-
s("h2",
|
|
304
|
+
e(B) ? (c(), b("div", He, [
|
|
305
|
+
s("h2", Ze, [
|
|
306
306
|
s("span", null, ae(e(t)("giftCard.title")), 1)
|
|
307
307
|
]),
|
|
308
|
-
s("div",
|
|
309
|
-
|
|
310
|
-
|
|
308
|
+
s("div", Ke, [
|
|
309
|
+
j(s("div", Ye, [
|
|
310
|
+
n(Ue)
|
|
311
311
|
], 512), [
|
|
312
|
-
[
|
|
312
|
+
[N, e(h)]
|
|
313
313
|
]),
|
|
314
|
-
|
|
314
|
+
j(s("div", null, [
|
|
315
315
|
s("p", {
|
|
316
316
|
id: "konnectio-gift-card-description",
|
|
317
317
|
innerHTML: e(t)("giftCard.description")
|
|
318
318
|
}, null, 8, Je),
|
|
319
319
|
s("form", null, [
|
|
320
|
-
e(
|
|
321
|
-
e(
|
|
320
|
+
e(M) ? T("", !0) : (c(), b("div", Qe, [
|
|
321
|
+
e(F) ? (c(), b("div", Xe, [
|
|
322
322
|
s("label", ea, [
|
|
323
323
|
s("span", null, ae(e(t)("giftCard.selectType")), 1)
|
|
324
324
|
]),
|
|
325
325
|
s("div", aa, [
|
|
326
326
|
s("ul", null, [
|
|
327
|
-
(
|
|
328
|
-
|
|
327
|
+
(c(!0), b(ke, null, Ce(e(F), (a, $) => (c(), b("li", { key: $ }, [
|
|
328
|
+
n(te, {
|
|
329
329
|
modelValue: e(l),
|
|
330
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
330
|
+
"onUpdate:modelValue": o[0] || (o[0] = (P) => k(l) ? l.value = P : null),
|
|
331
331
|
type: "radio",
|
|
332
332
|
name: "placeType",
|
|
333
|
-
val:
|
|
333
|
+
val: $,
|
|
334
334
|
label: a.label
|
|
335
335
|
}, null, 8, ["modelValue", "val", "label"])
|
|
336
336
|
]))), 128))
|
|
337
337
|
]),
|
|
338
|
-
e(
|
|
338
|
+
e(F)[e(l)] && e(F)[e(l)].data.length > 1 ? (c(), L(_e, {
|
|
339
339
|
key: 0,
|
|
340
|
-
modelValue: e(
|
|
341
|
-
"onUpdate:modelValue": o[1] || (o[1] = (a) =>
|
|
340
|
+
modelValue: e(y),
|
|
341
|
+
"onUpdate:modelValue": o[1] || (o[1] = (a) => k(y) ? y.value = a : null),
|
|
342
342
|
placeholder: e(t)("giftCard.selectPlacePlaceholder"),
|
|
343
|
-
options: e(
|
|
343
|
+
options: e(F)[e(l)].data,
|
|
344
344
|
labelKey: "name",
|
|
345
345
|
valueKey: "id",
|
|
346
346
|
required: ""
|
|
347
|
-
}, null, 8, ["modelValue", "placeholder", "options"])) :
|
|
347
|
+
}, null, 8, ["modelValue", "placeholder", "options"])) : T("", !0)
|
|
348
348
|
])
|
|
349
|
-
])) : (
|
|
349
|
+
])) : (c(), L(le, { key: 1 }))
|
|
350
350
|
])),
|
|
351
|
-
|
|
352
|
-
modelValue: e(
|
|
353
|
-
"onUpdate:modelValue": o[2] || (o[2] = (a) =>
|
|
351
|
+
n(W, {
|
|
352
|
+
modelValue: e(i),
|
|
353
|
+
"onUpdate:modelValue": o[2] || (o[2] = (a) => k(i) ? i.value = a : null),
|
|
354
354
|
type: "text",
|
|
355
355
|
name: "name",
|
|
356
356
|
autocomplete: "name",
|
|
@@ -359,9 +359,9 @@ const Ne = { class: "gift-card-skeleton" }, We = { class: "gift-card-skeleton-fo
|
|
|
359
359
|
placeholder: e(t)("giftCard.namePlaceholder"),
|
|
360
360
|
required: ""
|
|
361
361
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
362
|
-
|
|
363
|
-
modelValue: e(
|
|
364
|
-
"onUpdate:modelValue": o[3] || (o[3] = (a) =>
|
|
362
|
+
n(W, {
|
|
363
|
+
modelValue: e(v),
|
|
364
|
+
"onUpdate:modelValue": o[3] || (o[3] = (a) => k(v) ? v.value = a : null),
|
|
365
365
|
type: "email",
|
|
366
366
|
name: "email",
|
|
367
367
|
autocomplete: "email",
|
|
@@ -370,99 +370,99 @@ const Ne = { class: "gift-card-skeleton" }, We = { class: "gift-card-skeleton-fo
|
|
|
370
370
|
placeholder: e(t)("giftCard.emailPlaceholder"),
|
|
371
371
|
required: ""
|
|
372
372
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
373
|
-
|
|
374
|
-
modelValue: e(
|
|
375
|
-
"onUpdate:modelValue": o[4] || (o[4] = (a) =>
|
|
373
|
+
n(Ee, {
|
|
374
|
+
modelValue: e(d),
|
|
375
|
+
"onUpdate:modelValue": o[4] || (o[4] = (a) => k(d) ? d.value = a : null),
|
|
376
376
|
icon: "phone-office",
|
|
377
377
|
label: e(t)("giftCard.phone"),
|
|
378
378
|
placeholder: e(t)("giftCard.phonePlaceholder"),
|
|
379
379
|
required: ""
|
|
380
380
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
381
|
-
|
|
382
|
-
modelValue: e(
|
|
383
|
-
"onUpdate:modelValue": o[5] || (o[5] = (a) =>
|
|
381
|
+
n(W, {
|
|
382
|
+
modelValue: e(g),
|
|
383
|
+
"onUpdate:modelValue": o[5] || (o[5] = (a) => k(g) ? g.value = a : null),
|
|
384
384
|
type: "number",
|
|
385
385
|
name: "value",
|
|
386
386
|
label: e(t)("giftCard.value"),
|
|
387
387
|
icon: "money-bill",
|
|
388
388
|
placeholder: e(t)("giftCard.valuePlaceholder"),
|
|
389
|
-
suffix: e(
|
|
389
|
+
suffix: e(Z),
|
|
390
390
|
required: ""
|
|
391
391
|
}, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
|
|
392
|
-
|
|
393
|
-
modelValue: e(
|
|
394
|
-
"onUpdate:modelValue": o[6] || (o[6] = (a) =>
|
|
392
|
+
n(te, {
|
|
393
|
+
modelValue: e(p),
|
|
394
|
+
"onUpdate:modelValue": o[6] || (o[6] = (a) => k(p) ? p.value = a : null),
|
|
395
395
|
type: "checkbox",
|
|
396
396
|
name: "showValue",
|
|
397
397
|
label: e(t)("giftCard.showValue"),
|
|
398
|
-
checked: e(
|
|
398
|
+
checked: e(p)
|
|
399
399
|
}, null, 8, ["modelValue", "label", "checked"]),
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
modelValue: e(
|
|
403
|
-
"onUpdate:modelValue": o[8] || (o[8] = (a) =>
|
|
400
|
+
T("", !0),
|
|
401
|
+
n(Ve, {
|
|
402
|
+
modelValue: e(m),
|
|
403
|
+
"onUpdate:modelValue": o[8] || (o[8] = (a) => k(m) ? m.value = a : null),
|
|
404
404
|
label: e(t)("giftCard.quantity"),
|
|
405
405
|
icon: "gift-card",
|
|
406
406
|
required: ""
|
|
407
407
|
}, null, 8, ["modelValue", "label"])
|
|
408
408
|
])
|
|
409
409
|
], 512), [
|
|
410
|
-
[
|
|
410
|
+
[N, e(u)]
|
|
411
411
|
]),
|
|
412
|
-
|
|
412
|
+
j(s("div", null, [
|
|
413
413
|
s("div", {
|
|
414
414
|
innerHTML: e(t)("giftCard.thankYou")
|
|
415
415
|
}, null, 8, la)
|
|
416
416
|
], 512), [
|
|
417
|
-
[
|
|
417
|
+
[N, e(R)]
|
|
418
418
|
])
|
|
419
419
|
]),
|
|
420
|
-
q.layout !== "minimal" && e(
|
|
420
|
+
q.layout !== "minimal" && e(u) ? (c(), b("div", ta, [
|
|
421
421
|
s("div", oa, [
|
|
422
|
-
|
|
422
|
+
n(z, {
|
|
423
423
|
label: e(t)("giftCard.orderGiftCard"),
|
|
424
424
|
"full-width": !0,
|
|
425
425
|
disabled: !e(I),
|
|
426
|
-
"is-loading": e(
|
|
427
|
-
"onUpdate:isLoading": o[9] || (o[9] = (a) =>
|
|
428
|
-
onClickEvent: e(
|
|
426
|
+
"is-loading": e(w),
|
|
427
|
+
"onUpdate:isLoading": o[9] || (o[9] = (a) => k(w) ? w.value = a : null),
|
|
428
|
+
onClickEvent: e(D)
|
|
429
429
|
}, null, 8, ["label", "disabled", "is-loading", "onClickEvent"])
|
|
430
430
|
])
|
|
431
|
-
])) :
|
|
432
|
-
e(
|
|
433
|
-
|
|
434
|
-
modelValue: e(
|
|
435
|
-
"onUpdate:modelValue": o[10] || (o[10] = (a) =>
|
|
431
|
+
])) : T("", !0),
|
|
432
|
+
e(u) ? (c(), b("div", na, [
|
|
433
|
+
n(W, {
|
|
434
|
+
modelValue: e(r),
|
|
435
|
+
"onUpdate:modelValue": o[10] || (o[10] = (a) => k(r) ? r.value = a : null),
|
|
436
436
|
type: "textarea",
|
|
437
437
|
name: "remark",
|
|
438
438
|
label: e(t)("giftCard.remark"),
|
|
439
439
|
icon: "info-circle",
|
|
440
440
|
placeholder: e(t)("giftCard.remarkPlaceholder")
|
|
441
441
|
}, null, 8, ["modelValue", "label", "placeholder"])
|
|
442
|
-
])) :
|
|
443
|
-
e(
|
|
444
|
-
|
|
442
|
+
])) : T("", !0),
|
|
443
|
+
e(u) ? (c(), b("div", ia, [
|
|
444
|
+
n(z, {
|
|
445
445
|
label: e(t)("giftCard.orderGiftCard"),
|
|
446
446
|
"full-width": !0,
|
|
447
447
|
disabled: !e(I),
|
|
448
448
|
"data-test": "orderGiftCard",
|
|
449
|
-
"is-loading": e(
|
|
450
|
-
"onUpdate:isLoading": o[11] || (o[11] = (a) =>
|
|
451
|
-
onClickEvent: e(
|
|
449
|
+
"is-loading": e(w),
|
|
450
|
+
"onUpdate:isLoading": o[11] || (o[11] = (a) => k(w) ? w.value = a : null),
|
|
451
|
+
onClickEvent: e(D)
|
|
452
452
|
}, null, 8, ["label", "disabled", "is-loading", "onClickEvent"]),
|
|
453
|
-
|
|
454
|
-
|
|
453
|
+
j(s("div", sa, [
|
|
454
|
+
n(Re)
|
|
455
455
|
], 512), [
|
|
456
|
-
[
|
|
456
|
+
[N, e(H)]
|
|
457
457
|
])
|
|
458
|
-
])) :
|
|
459
|
-
])) : (
|
|
458
|
+
])) : T("", !0)
|
|
459
|
+
])) : (c(), L(le, { key: 1 }))
|
|
460
460
|
]),
|
|
461
461
|
_: 1
|
|
462
462
|
}, 8, ["access-token", "data-layout"])
|
|
463
463
|
]),
|
|
464
464
|
fallback: G(() => [
|
|
465
|
-
|
|
465
|
+
n(Oe)
|
|
466
466
|
]),
|
|
467
467
|
_: 1
|
|
468
468
|
}))
|
|
@@ -470,23 +470,33 @@ const Ne = { class: "gift-card-skeleton" }, We = { class: "gift-card-skeleton-fo
|
|
|
470
470
|
_: 1
|
|
471
471
|
}, 8, ["styling"]));
|
|
472
472
|
}
|
|
473
|
-
}),
|
|
473
|
+
}), O = /* @__PURE__ */ de(ra, [["__scopeId", "data-v-ec9ea15b"]]), da = Pe();
|
|
474
474
|
class ua extends HTMLElement {
|
|
475
475
|
constructor() {
|
|
476
476
|
super();
|
|
477
477
|
}
|
|
478
478
|
connectedCallback() {
|
|
479
|
-
const
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
479
|
+
const f = typeof O == "function" ? O.options : O;
|
|
480
|
+
let V = Array.isArray(f.props) ? f.props : Object.keys(f.props || {});
|
|
481
|
+
console.log(f);
|
|
482
|
+
const t = (r) => r.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (p, m) => (m ? "-" : "") + p.toLowerCase()), i = {};
|
|
483
|
+
V = V.map(t);
|
|
484
|
+
const v = {};
|
|
485
|
+
for (const r of this.attributes) {
|
|
486
|
+
const p = r.name, m = p.split(".");
|
|
487
|
+
console.log(p, m.length), m.length > 1 && (v[m[0]] || (v[m[0]] = {}), v[m[0]][m[1]] = r.value);
|
|
488
|
+
}
|
|
489
|
+
console.log(v);
|
|
490
|
+
for (const r of V) {
|
|
491
|
+
let p = this.attributes.getNamedItem(r)?.value;
|
|
492
|
+
if (v.hasOwnProperty(r) && (p = v[r]), !p)
|
|
483
493
|
break;
|
|
484
|
-
|
|
494
|
+
i[r] = p;
|
|
485
495
|
}
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
const
|
|
489
|
-
|
|
496
|
+
const d = Te(O, i);
|
|
497
|
+
d.use(da), d.use(Se), d.use($e, { bootstrap: !0 });
|
|
498
|
+
const g = document.createElement("div");
|
|
499
|
+
d.mount(g), this.appendChild(g.children[0]);
|
|
490
500
|
}
|
|
491
501
|
}
|
|
492
502
|
window.customElements.define("konnectio-gift-card", ua);
|