@konnectio/core 4.0.56-rc39 → 4.0.56-rc40
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-Cj7yAIiF.js → ActionField-CD5wWyTP.js} +10 -10
- package/dist/ActionField-CD5wWyTP.js.br +0 -0
- package/dist/{AvailabilitySkeleton-B1NfPwnx.js → AvailabilitySkeleton-D9lVJ7Y4.js} +71 -69
- package/dist/AvailabilitySkeleton-D9lVJ7Y4.js.br +0 -0
- package/dist/{AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-4TxEs6Ur.js → AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-Cb15NqtR.js} +2692 -2638
- package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-Cb15NqtR.js.br +0 -0
- package/dist/{CheckoutWindow-Dj_a3rqK.js → CheckoutWindow-POqLB9M4.js} +33 -33
- package/dist/CheckoutWindow-POqLB9M4.js.br +0 -0
- package/dist/{ErrorMessage-B_o47rUW.js → ErrorMessage-DACtGUvq.js} +4 -4
- package/dist/ErrorMessage-DACtGUvq.js.br +0 -0
- package/dist/{EventAvailabilityForm-vxL1OmZL.js → EventAvailabilityForm-Dx4hfkc1.js} +36 -36
- package/dist/EventAvailabilityForm-Dx4hfkc1.js.br +0 -0
- package/dist/{Field-DC9mZy8_.js → Field-Nqc4wuqz.js} +8 -8
- package/dist/Field-Nqc4wuqz.js.br +0 -0
- package/dist/{Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CITxgseu.js → Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-Bi1FLGK9.js} +3483 -3533
- package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-Bi1FLGK9.js.br +0 -0
- package/dist/{TermsOfService-COGxWG3S.js → TermsOfService-D3ujvGpJ.js} +9 -9
- package/dist/TermsOfService-D3ujvGpJ.js.br +0 -0
- package/dist/_-BeIBHN5G.js +12 -0
- package/dist/_.vue_vue_type_style_index_0_lang-CfxcWxuU.js +72 -0
- package/dist/_.vue_vue_type_style_index_0_lang-CfxcWxuU.js.br +0 -0
- package/dist/{_commonjsHelpers-UWZO_9XV.js → _commonjsHelpers-BpcYSDvQ.js} +149 -148
- package/dist/_commonjsHelpers-BpcYSDvQ.js.br +0 -0
- package/dist/availability.js +57 -56
- package/dist/availability.js.br +0 -0
- package/dist/event.js +95 -95
- package/dist/event.js.br +0 -0
- package/dist/gift-card-validation.js +43 -41
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card.js +241 -331
- package/dist/gift-card.js.br +0 -0
- package/dist/giftCard-BEp1vsXy.js +128 -0
- package/dist/giftCard-BEp1vsXy.js.br +0 -0
- package/dist/hotel.js +942 -938
- package/dist/hotel.js.br +0 -0
- package/dist/{masonry.plugin-a1QQfgj3.js → masonry.plugin-CnRH1tRE.js} +6 -6
- package/dist/masonry.plugin-CnRH1tRE.js.br +0 -0
- package/dist/navigation.js +3 -3
- package/dist/polyfill.js +10 -5
- package/dist/polyfill.js.br +0 -0
- package/dist/style.css +1 -1
- package/dist/style.css.br +0 -0
- package/package.json +9 -9
- package/dist/ActionField-Cj7yAIiF.js.br +0 -0
- package/dist/AvailabilitySkeleton-B1NfPwnx.js.br +0 -0
- package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-4TxEs6Ur.js.br +0 -0
- package/dist/CheckoutWindow-Dj_a3rqK.js.br +0 -0
- package/dist/ErrorMessage-B_o47rUW.js.br +0 -0
- package/dist/EventAvailabilityForm-vxL1OmZL.js.br +0 -0
- package/dist/Field-DC9mZy8_.js.br +0 -0
- package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CITxgseu.js.br +0 -0
- package/dist/TermsOfService-COGxWG3S.js.br +0 -0
- package/dist/_commonjsHelpers-UWZO_9XV.js.br +0 -0
- package/dist/masonry.plugin-a1QQfgj3.js.br +0 -0
package/dist/gift-card.js
CHANGED
|
@@ -1,110 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { d as I, r as K, c as Z, o as s, b as w, w as F, g as t, a as v, f as o, u as e, e as g, n as Y, t as G, i as ae, q as oe, h as ne, S as ie, y as T, z as M, F as se, A as re, x as k, p as de, j as ue, k as ce } from "./_commonjsHelpers-BpcYSDvQ.js";
|
|
2
|
+
import { h as B, a as pe, C as S, I as me, E as fe, _ as z, F as be, s as O, b as ve, k as he, L as _e, T as L, l as ge, n as ye, o as ke, p as Ce, q as Ve, H as we, t as Fe } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-Bi1FLGK9.js";
|
|
3
|
+
import { u as D } from "./giftCard-BEp1vsXy.js";
|
|
4
|
+
import { _ as $e } from "./_.vue_vue_type_style_index_0_lang-CfxcWxuU.js";
|
|
5
|
+
import { C as Ee, a as Pe, P as Ue, _ as Ae } from "./CheckoutWindow-POqLB9M4.js";
|
|
6
|
+
import { F as A } from "./Field-Nqc4wuqz.js";
|
|
7
|
+
import { E as Se } from "./ErrorMessage-DACtGUvq.js";
|
|
8
|
+
import { S as Ie } from "./TermsOfService-D3ujvGpJ.js";
|
|
3
9
|
import "./navigation.js";
|
|
4
|
-
import { C as De, a as xe, P as Be, _ as ze } from "./CheckoutWindow-Dj_a3rqK.js";
|
|
5
|
-
import { F as B } from "./Field-DC9mZy8_.js";
|
|
6
|
-
import { E as Oe } from "./ErrorMessage-B_o47rUW.js";
|
|
7
|
-
import { S as je } from "./TermsOfService-COGxWG3S.js";
|
|
8
10
|
(function() {
|
|
9
11
|
try {
|
|
10
|
-
var
|
|
11
|
-
n && (
|
|
12
|
+
var d = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, n = new Error().stack;
|
|
13
|
+
n && (d._sentryDebugIds = d._sentryDebugIds || {}, d._sentryDebugIds[n] = "fc7b5da2-4e3a-48ed-875e-930238643f93", d._sentryDebugIdIdentifier = "sentry-dbid-fc7b5da2-4e3a-48ed-875e-930238643f93");
|
|
12
14
|
} catch {
|
|
13
15
|
}
|
|
14
16
|
})();
|
|
15
|
-
const
|
|
16
|
-
const { pay: c } = _e(), { bearerToken: n, metaData: v, currencyId: t } = le(oe()), m = oe(), d = V(T.InitialState), p = ae("konnectio_name", "", void 0, { serializer: te.string }), h = ae("konnectio_email", "", void 0, { serializer: te.string }), s = ae("konnectio_phone", "", void 0, { serializer: te.string }), b = V(""), g = V(1), M = V(!0), P = V(""), a = V({
|
|
17
|
-
base64: "",
|
|
18
|
-
type: "",
|
|
19
|
-
name: ""
|
|
20
|
-
}), f = V(void 0), w = V(0), $ = V(!1), _ = V(0), E = k(() => m.metaData.hotels[0]), D = k(() => E.value.termsOfService ? E.value.termsOfService : ""), I = k(() => d.value === T.InitialState || d.value === T.WaitingForResponse), X = k(() => d.value === T.ReadyToPay), j = k(() => d.value === T.PaymentSuccess), x = k(() => {
|
|
21
|
-
const C = {
|
|
22
|
-
1: {
|
|
23
|
-
label: re.t("giftCard.hotelType"),
|
|
24
|
-
data: []
|
|
25
|
-
},
|
|
26
|
-
2: {
|
|
27
|
-
label: re.t("giftCard.restaurantType"),
|
|
28
|
-
data: []
|
|
29
|
-
}
|
|
30
|
-
}, q = v.value.hotels[0].places;
|
|
31
|
-
return q && q.forEach((L) => {
|
|
32
|
-
C[L.placeType].data.push(L);
|
|
33
|
-
}), Object.fromEntries(
|
|
34
|
-
Object.entries(C).filter(([, L]) => L.data.length > 0)
|
|
35
|
-
);
|
|
36
|
-
}), N = k(() => _.value !== 0), U = k(() => {
|
|
37
|
-
let C;
|
|
38
|
-
if (N.value)
|
|
39
|
-
C = x.value[_.value].data[0];
|
|
40
|
-
else if (w.value !== 0) {
|
|
41
|
-
const q = f.value, L = x.value[w.value].data;
|
|
42
|
-
L.length === 1 ? C = L[0] : q !== void 0 && L.forEach((se) => {
|
|
43
|
-
String(se.id) === String(q) && (C = se);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
return C;
|
|
47
|
-
}), A = k(() => !(!p.value || !h.value || !(s.value.length >= 5) || !b.value || U.value === void 0)), r = k(() => !(d.value === T.InitialState && $.value)), i = k(() => !!(d.value === T.WaitingForResponse && $.value));
|
|
48
|
-
async function W() {
|
|
49
|
-
d.value = T.WaitingForResponse, $.value = !0, await Ce.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
|
|
50
|
-
termsOfserviceURL: window.location.origin,
|
|
51
|
-
checkoutUrl: window.location.origin,
|
|
52
|
-
currencyID: t.value,
|
|
53
|
-
language: Ve(),
|
|
54
|
-
amount: b.value,
|
|
55
|
-
quantity: g.value,
|
|
56
|
-
freeText: P.value,
|
|
57
|
-
showPrice: M.value,
|
|
58
|
-
contactName: p.value,
|
|
59
|
-
contactEmail: h.value,
|
|
60
|
-
contactPhone: s.value,
|
|
61
|
-
imageBase64: we(a.value.base64),
|
|
62
|
-
imageName: a.value.name,
|
|
63
|
-
imageFormat: a.value.type,
|
|
64
|
-
placeType: U.value ? U.value.placeType : void 0,
|
|
65
|
-
placeID: U.value ? U.value.id : void 0
|
|
66
|
-
}, {
|
|
67
|
-
headers: {
|
|
68
|
-
Authorization: n.value,
|
|
69
|
-
Accept: "application/json",
|
|
70
|
-
"Fresh-Booking-Ver": "4.0.56-rc39"
|
|
71
|
-
}
|
|
72
|
-
}).then((C) => {
|
|
73
|
-
d.value = T.ReadyToPay, $.value = !1, c({
|
|
74
|
-
callback: () => console.log("Callback!"),
|
|
75
|
-
response: C.data
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
function ee(C) {
|
|
80
|
-
C && (_.value = C);
|
|
81
|
-
}
|
|
82
|
-
return {
|
|
83
|
-
selectedPlace: U,
|
|
84
|
-
moduleState: d,
|
|
85
|
-
name: p,
|
|
86
|
-
email: h,
|
|
87
|
-
phone: s,
|
|
88
|
-
value: b,
|
|
89
|
-
remark: P,
|
|
90
|
-
showValue: M,
|
|
91
|
-
quantity: g,
|
|
92
|
-
media: a,
|
|
93
|
-
placeId: f,
|
|
94
|
-
placeType: w,
|
|
95
|
-
showFormPage: I,
|
|
96
|
-
showPaymentPage: X,
|
|
97
|
-
showConfirmationPage: j,
|
|
98
|
-
places: x,
|
|
99
|
-
hasFilledForm: A,
|
|
100
|
-
hasForcedPlaceType: N,
|
|
101
|
-
isWaitingForResponse: i,
|
|
102
|
-
isMetaDataAvailable: r,
|
|
103
|
-
termsOfService: D,
|
|
104
|
-
orderGiftCard: W,
|
|
105
|
-
initialize: ee
|
|
106
|
-
};
|
|
107
|
-
}), Ne = { class: "media-selector" }, We = ["accept"], He = { class: "media-selector-wrapper" }, Ke = { class: "media-selector-tools" }, Ze = { key: 0 }, Je = { key: 1 }, Ye = { key: 2 }, Qe = ["src"], Xe = /* @__PURE__ */ O({
|
|
17
|
+
const Te = { class: "media-selector" }, Me = ["accept"], Le = { class: "media-selector-wrapper" }, qe = { class: "media-selector-tools" }, Ge = { key: 0 }, Be = { key: 1 }, Re = { key: 2 }, xe = ["src"], De = /* @__PURE__ */ I({
|
|
108
18
|
__name: "MediaSelector",
|
|
109
19
|
props: {
|
|
110
20
|
modelValue: {},
|
|
@@ -114,94 +24,94 @@ const ne = ke("giftCard", () => {
|
|
|
114
24
|
required: { type: Boolean, default: !1 }
|
|
115
25
|
},
|
|
116
26
|
emits: ["update:modelValue"],
|
|
117
|
-
setup(
|
|
118
|
-
const
|
|
119
|
-
function
|
|
120
|
-
|
|
27
|
+
setup(d, { emit: n }) {
|
|
28
|
+
const m = n, l = d, { t: c } = B(), { display: h } = pe(), p = K(), _ = Z(() => l.modelValue.base64 !== "");
|
|
29
|
+
function u(a) {
|
|
30
|
+
m("update:modelValue", a);
|
|
121
31
|
}
|
|
122
|
-
function
|
|
123
|
-
|
|
32
|
+
function y() {
|
|
33
|
+
u({
|
|
124
34
|
base64: "",
|
|
125
35
|
name: "",
|
|
126
36
|
type: ""
|
|
127
37
|
}), p.value && (p.value.value = "");
|
|
128
38
|
}
|
|
129
|
-
function
|
|
39
|
+
function b() {
|
|
130
40
|
p.value && p.value.click();
|
|
131
41
|
}
|
|
132
|
-
function
|
|
133
|
-
const [
|
|
134
|
-
|
|
135
|
-
if (
|
|
136
|
-
const
|
|
137
|
-
f({ base64:
|
|
42
|
+
function H(a, f) {
|
|
43
|
+
const [V, R] = [a.name, a.type], C = new FileReader();
|
|
44
|
+
C.onload = function(U) {
|
|
45
|
+
if (U.target) {
|
|
46
|
+
const x = U.target.result;
|
|
47
|
+
f({ base64: x, name: V, type: R });
|
|
138
48
|
} else
|
|
139
|
-
|
|
140
|
-
message:
|
|
49
|
+
h({
|
|
50
|
+
message: c("imageUploadError"),
|
|
141
51
|
type: "error"
|
|
142
52
|
});
|
|
143
|
-
},
|
|
53
|
+
}, C.readAsDataURL(a);
|
|
144
54
|
}
|
|
145
|
-
async function
|
|
55
|
+
async function $() {
|
|
146
56
|
let a;
|
|
147
|
-
(a = p.value.files) instanceof FileList &&
|
|
57
|
+
(a = p.value.files) instanceof FileList && H(a[0], u);
|
|
148
58
|
}
|
|
149
|
-
return (a, f) => (
|
|
59
|
+
return (a, f) => (s(), w(me, {
|
|
150
60
|
label: a.label,
|
|
151
61
|
required: a.required,
|
|
152
62
|
type: "media"
|
|
153
63
|
}, {
|
|
154
|
-
default:
|
|
155
|
-
|
|
156
|
-
|
|
64
|
+
default: F(() => [
|
|
65
|
+
t("div", Te, [
|
|
66
|
+
t("input", {
|
|
157
67
|
ref_key: "fileInput",
|
|
158
68
|
ref: p,
|
|
159
69
|
type: "file",
|
|
160
70
|
class: "hidden",
|
|
161
71
|
accept: a.validation,
|
|
162
72
|
single: "",
|
|
163
|
-
onChange: f[0] || (f[0] = (
|
|
164
|
-
}, null, 40,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
o(
|
|
169
|
-
label: e(
|
|
73
|
+
onChange: f[0] || (f[0] = (V) => $())
|
|
74
|
+
}, null, 40, Me),
|
|
75
|
+
t("div", Le, [
|
|
76
|
+
t("ul", qe, [
|
|
77
|
+
_.value ? g("", !0) : (s(), v("li", Ge, [
|
|
78
|
+
o(S, {
|
|
79
|
+
label: e(c)("uploadFile"),
|
|
170
80
|
type: "button",
|
|
171
81
|
icon: "upload",
|
|
172
82
|
"icon-color": a.iconColor,
|
|
173
|
-
onClickEvent: f[1] || (f[1] = (
|
|
83
|
+
onClickEvent: f[1] || (f[1] = (V) => b())
|
|
174
84
|
}, null, 8, ["label", "icon-color"])
|
|
175
85
|
])),
|
|
176
|
-
|
|
177
|
-
o(
|
|
178
|
-
label: e(
|
|
86
|
+
_.value ? (s(), v("li", Be, [
|
|
87
|
+
o(S, {
|
|
88
|
+
label: e(c)("replaceFile"),
|
|
179
89
|
type: "button",
|
|
180
90
|
icon: "repeat-alt",
|
|
181
91
|
"icon-color": a.iconColor,
|
|
182
|
-
onClickEvent: f[2] || (f[2] = (
|
|
92
|
+
onClickEvent: f[2] || (f[2] = (V) => b())
|
|
183
93
|
}, null, 8, ["label", "icon-color"])
|
|
184
|
-
])) :
|
|
185
|
-
|
|
186
|
-
o(
|
|
187
|
-
label: e(
|
|
94
|
+
])) : g("", !0),
|
|
95
|
+
_.value ? (s(), v("li", Re, [
|
|
96
|
+
o(S, {
|
|
97
|
+
label: e(c)("removeFile"),
|
|
188
98
|
type: "button",
|
|
189
99
|
icon: "trash-alt",
|
|
190
100
|
"icon-color": a.iconColor,
|
|
191
|
-
onClickEvent: f[3] || (f[3] = (
|
|
101
|
+
onClickEvent: f[3] || (f[3] = (V) => y())
|
|
192
102
|
}, null, 8, ["label", "icon-color"])
|
|
193
|
-
])) :
|
|
103
|
+
])) : g("", !0)
|
|
194
104
|
]),
|
|
195
|
-
|
|
196
|
-
class:
|
|
105
|
+
t("div", {
|
|
106
|
+
class: Y([
|
|
197
107
|
"media-selector-previewer",
|
|
198
|
-
{ opened:
|
|
108
|
+
{ opened: _.value }
|
|
199
109
|
])
|
|
200
110
|
}, [
|
|
201
|
-
a.modelValue ? (
|
|
111
|
+
a.modelValue ? (s(), v("img", {
|
|
202
112
|
key: 0,
|
|
203
113
|
src: a.modelValue.base64
|
|
204
|
-
}, null, 8,
|
|
114
|
+
}, null, 8, xe)) : g("", !0)
|
|
205
115
|
], 2)
|
|
206
116
|
])
|
|
207
117
|
])
|
|
@@ -210,8 +120,8 @@ const ne = ke("giftCard", () => {
|
|
|
210
120
|
}, 8, ["label", "required"]));
|
|
211
121
|
}
|
|
212
122
|
});
|
|
213
|
-
function
|
|
214
|
-
const n =
|
|
123
|
+
function W(d) {
|
|
124
|
+
const n = d;
|
|
215
125
|
n.__i18n = n.__i18n || [], n.__i18n.push({
|
|
216
126
|
locale: "",
|
|
217
127
|
resource: {
|
|
@@ -230,80 +140,80 @@ function de(c) {
|
|
|
230
140
|
}
|
|
231
141
|
});
|
|
232
142
|
}
|
|
233
|
-
typeof
|
|
234
|
-
const
|
|
143
|
+
typeof W == "function" && W(De);
|
|
144
|
+
const ze = { class: "gift-card-skeleton" }, He = { class: "gift-card-skeleton-form" }, je = /* @__PURE__ */ I({
|
|
235
145
|
__name: "GiftCardSkeleton",
|
|
236
|
-
setup(
|
|
237
|
-
return (n,
|
|
238
|
-
|
|
239
|
-
o(
|
|
240
|
-
o(
|
|
241
|
-
o(
|
|
242
|
-
o(
|
|
243
|
-
o(
|
|
244
|
-
o(
|
|
146
|
+
setup(d) {
|
|
147
|
+
return (n, m) => (s(), v("div", ze, [
|
|
148
|
+
t("div", He, [
|
|
149
|
+
o(A),
|
|
150
|
+
o(A),
|
|
151
|
+
o(A),
|
|
152
|
+
o(A),
|
|
153
|
+
o(A, { "is-text-area": "" }),
|
|
154
|
+
o(fe, { height: "44px" })
|
|
245
155
|
])
|
|
246
156
|
]));
|
|
247
157
|
}
|
|
248
|
-
}),
|
|
158
|
+
}), Ne = /* @__PURE__ */ z(je, [["__scopeId", "data-v-ba3efaa1"]]), Oe = { class: "konnectio-accept-terms" }, We = /* @__PURE__ */ I({
|
|
249
159
|
__name: "_",
|
|
250
160
|
props: {
|
|
251
161
|
content: {},
|
|
252
162
|
buttonLabel: {}
|
|
253
163
|
},
|
|
254
|
-
setup(
|
|
255
|
-
const { t: n } =
|
|
256
|
-
return (
|
|
257
|
-
o(e(
|
|
164
|
+
setup(d) {
|
|
165
|
+
const { t: n } = B(), m = K(!1);
|
|
166
|
+
return (l, c) => (s(), v("div", Oe, [
|
|
167
|
+
o(e(be), {
|
|
258
168
|
keypath: "general.termsAndConditionsNotice",
|
|
259
169
|
tag: "span",
|
|
260
170
|
scope: "global"
|
|
261
171
|
}, {
|
|
262
|
-
button:
|
|
263
|
-
|
|
172
|
+
button: F(() => [
|
|
173
|
+
t("i", null, '"' + G(l.buttonLabel) + '"', 1)
|
|
264
174
|
]),
|
|
265
|
-
terms:
|
|
266
|
-
|
|
175
|
+
terms: F(() => [
|
|
176
|
+
t("a", {
|
|
267
177
|
class: "konnectio-accept-terms-link",
|
|
268
178
|
target: "_blank",
|
|
269
|
-
onClick:
|
|
179
|
+
onClick: c[0] || (c[0] = ae((h) => m.value = !0, ["prevent"]))
|
|
270
180
|
}, [
|
|
271
|
-
|
|
181
|
+
t("span", null, G(e(n)("general.termsAndConditions")), 1)
|
|
272
182
|
])
|
|
273
183
|
]),
|
|
274
184
|
_: 1
|
|
275
185
|
}),
|
|
276
|
-
o(
|
|
277
|
-
modelValue:
|
|
278
|
-
"onUpdate:modelValue":
|
|
279
|
-
description:
|
|
186
|
+
o(Ie, {
|
|
187
|
+
modelValue: m.value,
|
|
188
|
+
"onUpdate:modelValue": c[1] || (c[1] = (h) => m.value = h),
|
|
189
|
+
description: l.content
|
|
280
190
|
}, null, 8, ["modelValue", "description"])
|
|
281
191
|
]));
|
|
282
192
|
}
|
|
283
|
-
}),
|
|
193
|
+
}), Ke = /* @__PURE__ */ z(We, [["__scopeId", "data-v-c9c826cf"]]), Ze = /* @__PURE__ */ I({
|
|
284
194
|
__name: "GiftCard",
|
|
285
|
-
setup(
|
|
286
|
-
const { t: n } =
|
|
287
|
-
return (
|
|
288
|
-
content: e(
|
|
195
|
+
setup(d) {
|
|
196
|
+
const { t: n } = B(), m = D();
|
|
197
|
+
return (l, c) => (s(), w(Ke, {
|
|
198
|
+
content: e(m).termsOfService,
|
|
289
199
|
"button-label": e(n)("giftCard.orderGiftCard")
|
|
290
200
|
}, null, 8, ["content", "button-label"]));
|
|
291
201
|
}
|
|
292
|
-
}),
|
|
202
|
+
}), Ye = (d) => (de("data-v-36e1c4fe"), d = d(), ue(), d), Je = ["data-layout"], Qe = { id: "konnectio-gift-card-wrapper" }, Xe = { id: "konnectio-gift-card-title" }, et = { id: "konnectio-gift-card-content" }, tt = { id: "konnectio-gift-card-payment" }, lt = ["innerHTML"], at = { key: 0 }, ot = {
|
|
293
203
|
key: 0,
|
|
294
204
|
id: "konnectio-select-place-type"
|
|
295
|
-
},
|
|
296
|
-
class: /* @__PURE__ */
|
|
297
|
-
},
|
|
205
|
+
}, nt = {
|
|
206
|
+
class: /* @__PURE__ */ Y(["konnectio-label", "required"])
|
|
207
|
+
}, it = { id: "konnectio-select-place-type-input" }, st = ["innerHTML"], rt = {
|
|
298
208
|
key: 0,
|
|
299
209
|
id: "konnectio-gift-card-order"
|
|
300
|
-
},
|
|
210
|
+
}, dt = { class: "konnectio-panel" }, ut = {
|
|
301
211
|
key: 1,
|
|
302
212
|
id: "konnectio-gift-card-remarks"
|
|
303
|
-
},
|
|
213
|
+
}, ct = {
|
|
304
214
|
key: 2,
|
|
305
215
|
id: "konnectio-gift-card-order-minimal"
|
|
306
|
-
},
|
|
216
|
+
}, pt = /* @__PURE__ */ Ye(() => /* @__PURE__ */ t("div", { class: "konnectio-divider" }, null, -1)), mt = { id: "konnectio-gift-card-recaptcha" }, ft = /* @__PURE__ */ I({
|
|
307
217
|
name: "GiftCardLayout",
|
|
308
218
|
__name: "GiftCard",
|
|
309
219
|
props: {
|
|
@@ -312,213 +222,213 @@ const ea = { class: "gift-card-skeleton" }, aa = { class: "gift-card-skeleton-fo
|
|
|
312
222
|
placeType: {},
|
|
313
223
|
styling: {}
|
|
314
224
|
},
|
|
315
|
-
setup(
|
|
316
|
-
const n =
|
|
225
|
+
setup(d) {
|
|
226
|
+
const n = d, m = Z(() => ({
|
|
317
227
|
panelMaxWidth: "800px",
|
|
318
228
|
...n.styling
|
|
319
|
-
})), { t } =
|
|
320
|
-
name:
|
|
321
|
-
email:
|
|
229
|
+
})), { t: l } = B(), {
|
|
230
|
+
name: c,
|
|
231
|
+
email: h,
|
|
322
232
|
phone: p,
|
|
323
|
-
value:
|
|
324
|
-
remark:
|
|
325
|
-
showValue:
|
|
326
|
-
quantity:
|
|
327
|
-
media:
|
|
328
|
-
placeId:
|
|
233
|
+
value: _,
|
|
234
|
+
remark: u,
|
|
235
|
+
showValue: y,
|
|
236
|
+
quantity: b,
|
|
237
|
+
media: H,
|
|
238
|
+
placeId: $,
|
|
329
239
|
placeType: a,
|
|
330
240
|
showFormPage: f,
|
|
331
|
-
showPaymentPage:
|
|
332
|
-
showConfirmationPage:
|
|
333
|
-
places:
|
|
334
|
-
hasFilledForm:
|
|
335
|
-
hasForcedPlaceType:
|
|
336
|
-
isWaitingForResponse:
|
|
337
|
-
} =
|
|
338
|
-
return
|
|
339
|
-
|
|
340
|
-
}),
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
}), (
|
|
344
|
-
default:
|
|
345
|
-
(
|
|
346
|
-
default:
|
|
347
|
-
o(
|
|
348
|
-
|
|
349
|
-
"
|
|
350
|
-
|
|
241
|
+
showPaymentPage: V,
|
|
242
|
+
showConfirmationPage: R,
|
|
243
|
+
places: C,
|
|
244
|
+
hasFilledForm: U,
|
|
245
|
+
hasForcedPlaceType: x,
|
|
246
|
+
isWaitingForResponse: E
|
|
247
|
+
} = O(D()), { initialize: J, orderGiftCard: j, fetchMetadata: Q } = D(), { isRecaptchaEnabled: X, currency: ee, hasError: te } = O(ve());
|
|
248
|
+
return oe(a, () => {
|
|
249
|
+
$.value = void 0;
|
|
250
|
+
}), ne(() => {
|
|
251
|
+
const P = n.placeType ? parseInt(n.placeType) : void 0;
|
|
252
|
+
J(P);
|
|
253
|
+
}), (P, r) => (s(), w(ye, { styling: m.value }, {
|
|
254
|
+
default: F(() => [
|
|
255
|
+
(s(), w(ie, null, {
|
|
256
|
+
default: F(() => [
|
|
257
|
+
o($e, {
|
|
258
|
+
"access-token": P.accessToken,
|
|
259
|
+
"data-layout": P.layout,
|
|
260
|
+
onMetadata: e(Q)
|
|
351
261
|
}, {
|
|
352
|
-
default:
|
|
353
|
-
e(
|
|
262
|
+
default: F(() => [
|
|
263
|
+
e(te) ? (s(), w(Se, {
|
|
354
264
|
key: 1,
|
|
355
265
|
title: "Unable to render Gift card module",
|
|
356
266
|
description: "Gift card functionality hasn't been setup for this account. Please contact Octopus PMS for support."
|
|
357
|
-
})) : (
|
|
267
|
+
})) : (s(), v("div", {
|
|
358
268
|
key: 0,
|
|
359
269
|
id: "konnectio-gift-card-module",
|
|
360
|
-
"data-layout":
|
|
270
|
+
"data-layout": P.layout
|
|
361
271
|
}, [
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
272
|
+
t("div", Qe, [
|
|
273
|
+
t("h2", Xe, [
|
|
274
|
+
t("span", null, G(e(l)("giftCard.title")), 1)
|
|
365
275
|
]),
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
o(
|
|
276
|
+
t("div", et, [
|
|
277
|
+
T(t("div", tt, [
|
|
278
|
+
o(Ee)
|
|
369
279
|
], 512), [
|
|
370
|
-
[
|
|
280
|
+
[M, e(V)]
|
|
371
281
|
]),
|
|
372
|
-
|
|
373
|
-
|
|
282
|
+
T(t("div", null, [
|
|
283
|
+
t("p", {
|
|
374
284
|
id: "konnectio-gift-card-description",
|
|
375
|
-
innerHTML: e(
|
|
376
|
-
}, null, 8,
|
|
377
|
-
|
|
378
|
-
e(
|
|
379
|
-
e(
|
|
380
|
-
|
|
381
|
-
|
|
285
|
+
innerHTML: e(l)("giftCard.description")
|
|
286
|
+
}, null, 8, lt),
|
|
287
|
+
t("form", null, [
|
|
288
|
+
e(x) ? g("", !0) : (s(), v("div", at, [
|
|
289
|
+
e(C) ? (s(), v("div", ot, [
|
|
290
|
+
t("label", nt, [
|
|
291
|
+
t("span", null, G(e(l)("giftCard.selectType")), 1)
|
|
382
292
|
]),
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
(
|
|
386
|
-
o(
|
|
293
|
+
t("div", it, [
|
|
294
|
+
t("ul", null, [
|
|
295
|
+
(s(!0), v(se, null, re(e(C), (i, N) => (s(), v("li", { key: N }, [
|
|
296
|
+
o(Pe, {
|
|
387
297
|
modelValue: e(a),
|
|
388
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
298
|
+
"onUpdate:modelValue": r[0] || (r[0] = (le) => k(a) ? a.value = le : null),
|
|
389
299
|
type: "radio",
|
|
390
300
|
name: "placeType",
|
|
391
|
-
val:
|
|
301
|
+
val: N,
|
|
392
302
|
label: i.label
|
|
393
303
|
}, null, 8, ["modelValue", "val", "label"])
|
|
394
304
|
]))), 128))
|
|
395
305
|
]),
|
|
396
|
-
e(
|
|
306
|
+
e(C)[e(a)] && e(C)[e(a)].data.length > 1 ? (s(), w(he, {
|
|
397
307
|
key: 0,
|
|
398
|
-
modelValue: e(
|
|
399
|
-
"onUpdate:modelValue": r[1] || (r[1] = (i) =>
|
|
400
|
-
placeholder: e(
|
|
401
|
-
options: e(
|
|
308
|
+
modelValue: e($),
|
|
309
|
+
"onUpdate:modelValue": r[1] || (r[1] = (i) => k($) ? $.value = i : null),
|
|
310
|
+
placeholder: e(l)("giftCard.selectPlacePlaceholder"),
|
|
311
|
+
options: e(C)[e(a)].data,
|
|
402
312
|
labelKey: "name",
|
|
403
313
|
valueKey: "id",
|
|
404
314
|
required: ""
|
|
405
|
-
}, null, 8, ["modelValue", "placeholder", "options"])) :
|
|
315
|
+
}, null, 8, ["modelValue", "placeholder", "options"])) : g("", !0)
|
|
406
316
|
])
|
|
407
|
-
])) : (
|
|
317
|
+
])) : (s(), w(_e, { key: 1 }))
|
|
408
318
|
])),
|
|
409
|
-
o(
|
|
410
|
-
modelValue: e(
|
|
411
|
-
"onUpdate:modelValue": r[2] || (r[2] = (i) =>
|
|
319
|
+
o(L, {
|
|
320
|
+
modelValue: e(c),
|
|
321
|
+
"onUpdate:modelValue": r[2] || (r[2] = (i) => k(c) ? c.value = i : null),
|
|
412
322
|
type: "text",
|
|
413
323
|
name: "name",
|
|
414
324
|
autocomplete: "name",
|
|
415
|
-
label: e(
|
|
325
|
+
label: e(l)("giftCard.name"),
|
|
416
326
|
icon: "user-alt",
|
|
417
|
-
placeholder: e(
|
|
327
|
+
placeholder: e(l)("giftCard.namePlaceholder"),
|
|
418
328
|
required: ""
|
|
419
329
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
420
|
-
o(
|
|
421
|
-
modelValue: e(
|
|
422
|
-
"onUpdate:modelValue": r[3] || (r[3] = (i) =>
|
|
330
|
+
o(L, {
|
|
331
|
+
modelValue: e(h),
|
|
332
|
+
"onUpdate:modelValue": r[3] || (r[3] = (i) => k(h) ? h.value = i : null),
|
|
423
333
|
type: "email",
|
|
424
334
|
name: "email",
|
|
425
335
|
autocomplete: "email",
|
|
426
|
-
label: e(
|
|
336
|
+
label: e(l)("giftCard.email"),
|
|
427
337
|
icon: "at",
|
|
428
|
-
placeholder: e(
|
|
338
|
+
placeholder: e(l)("giftCard.emailPlaceholder"),
|
|
429
339
|
required: ""
|
|
430
340
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
431
|
-
o(
|
|
341
|
+
o(Ue, {
|
|
432
342
|
modelValue: e(p),
|
|
433
|
-
"onUpdate:modelValue": r[4] || (r[4] = (i) =>
|
|
343
|
+
"onUpdate:modelValue": r[4] || (r[4] = (i) => k(p) ? p.value = i : null),
|
|
434
344
|
icon: "phone-office",
|
|
435
|
-
label: e(
|
|
436
|
-
placeholder: e(
|
|
345
|
+
label: e(l)("giftCard.phone"),
|
|
346
|
+
placeholder: e(l)("giftCard.phonePlaceholder"),
|
|
437
347
|
required: ""
|
|
438
348
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
439
|
-
o(
|
|
440
|
-
modelValue: e(
|
|
441
|
-
"onUpdate:modelValue": r[5] || (r[5] = (i) =>
|
|
349
|
+
o(L, {
|
|
350
|
+
modelValue: e(_),
|
|
351
|
+
"onUpdate:modelValue": r[5] || (r[5] = (i) => k(_) ? _.value = i : null),
|
|
442
352
|
type: "number",
|
|
443
353
|
name: "value",
|
|
444
|
-
label: e(
|
|
354
|
+
label: e(l)("giftCard.value"),
|
|
445
355
|
icon: "money-bill",
|
|
446
|
-
placeholder: e(
|
|
447
|
-
suffix: e(
|
|
356
|
+
placeholder: e(l)("giftCard.valuePlaceholder"),
|
|
357
|
+
suffix: e(ee),
|
|
448
358
|
required: ""
|
|
449
359
|
}, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
o(
|
|
453
|
-
modelValue: e(
|
|
454
|
-
"onUpdate:modelValue": r[8] || (r[8] = (i) =>
|
|
455
|
-
label: e(
|
|
360
|
+
g("", !0),
|
|
361
|
+
g("", !0),
|
|
362
|
+
o(ge, {
|
|
363
|
+
modelValue: e(b),
|
|
364
|
+
"onUpdate:modelValue": r[8] || (r[8] = (i) => k(b) ? b.value = i : null),
|
|
365
|
+
label: e(l)("giftCard.quantity"),
|
|
456
366
|
icon: "gift-card",
|
|
457
367
|
required: ""
|
|
458
368
|
}, null, 8, ["modelValue", "label"])
|
|
459
369
|
])
|
|
460
370
|
], 512), [
|
|
461
|
-
[
|
|
371
|
+
[M, e(f)]
|
|
462
372
|
]),
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
innerHTML: e(
|
|
466
|
-
}, null, 8,
|
|
373
|
+
T(t("div", null, [
|
|
374
|
+
t("div", {
|
|
375
|
+
innerHTML: e(l)("giftCard.thankYou")
|
|
376
|
+
}, null, 8, st)
|
|
467
377
|
], 512), [
|
|
468
|
-
[
|
|
378
|
+
[M, e(R)]
|
|
469
379
|
])
|
|
470
380
|
]),
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
o(
|
|
474
|
-
label: e(
|
|
381
|
+
P.layout !== "minimal" && e(f) ? (s(), v("div", rt, [
|
|
382
|
+
t("div", dt, [
|
|
383
|
+
o(S, {
|
|
384
|
+
label: e(l)("giftCard.orderGiftCard"),
|
|
475
385
|
"full-width": !0,
|
|
476
|
-
disabled: !e(
|
|
477
|
-
"is-loading": e(
|
|
478
|
-
"onUpdate:isLoading": r[9] || (r[9] = (i) =>
|
|
386
|
+
disabled: !e(U),
|
|
387
|
+
"is-loading": e(E),
|
|
388
|
+
"onUpdate:isLoading": r[9] || (r[9] = (i) => k(E) ? E.value = i : null),
|
|
479
389
|
onClickEvent: e(j)
|
|
480
390
|
}, null, 8, ["label", "disabled", "is-loading", "onClickEvent"])
|
|
481
391
|
])
|
|
482
|
-
])) :
|
|
483
|
-
e(f) ? (
|
|
484
|
-
o(
|
|
485
|
-
modelValue: e(
|
|
486
|
-
"onUpdate:modelValue": r[10] || (r[10] = (i) =>
|
|
392
|
+
])) : g("", !0),
|
|
393
|
+
e(f) ? (s(), v("div", ut, [
|
|
394
|
+
o(L, {
|
|
395
|
+
modelValue: e(u),
|
|
396
|
+
"onUpdate:modelValue": r[10] || (r[10] = (i) => k(u) ? u.value = i : null),
|
|
487
397
|
type: "textarea",
|
|
488
398
|
name: "remark",
|
|
489
|
-
label: e(
|
|
399
|
+
label: e(l)("giftCard.remark"),
|
|
490
400
|
icon: "info-circle",
|
|
491
|
-
placeholder: e(
|
|
401
|
+
placeholder: e(l)("giftCard.remarkPlaceholder")
|
|
492
402
|
}, null, 8, ["modelValue", "label", "placeholder"])
|
|
493
|
-
])) :
|
|
494
|
-
e(f) ? (
|
|
495
|
-
o(
|
|
496
|
-
label: e(
|
|
403
|
+
])) : g("", !0),
|
|
404
|
+
e(f) ? (s(), v("div", ct, [
|
|
405
|
+
o(S, {
|
|
406
|
+
label: e(l)("giftCard.orderGiftCard"),
|
|
497
407
|
"full-width": !0,
|
|
498
|
-
disabled: !e(
|
|
408
|
+
disabled: !e(U),
|
|
499
409
|
"data-test": "orderGiftCard",
|
|
500
|
-
"is-loading": e(
|
|
501
|
-
"onUpdate:isLoading": r[11] || (r[11] = (i) =>
|
|
410
|
+
"is-loading": e(E),
|
|
411
|
+
"onUpdate:isLoading": r[11] || (r[11] = (i) => k(E) ? E.value = i : null),
|
|
502
412
|
onClickEvent: e(j)
|
|
503
413
|
}, null, 8, ["label", "disabled", "is-loading", "onClickEvent"]),
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
o(
|
|
414
|
+
t("div", null, [
|
|
415
|
+
pt,
|
|
416
|
+
o(Ze)
|
|
507
417
|
]),
|
|
508
|
-
|
|
509
|
-
o(
|
|
418
|
+
T(t("div", mt, [
|
|
419
|
+
o(Ae)
|
|
510
420
|
], 512), [
|
|
511
|
-
[
|
|
421
|
+
[M, e(X)]
|
|
512
422
|
])
|
|
513
|
-
])) :
|
|
423
|
+
])) : g("", !0)
|
|
514
424
|
])
|
|
515
|
-
], 8,
|
|
425
|
+
], 8, Je))
|
|
516
426
|
]),
|
|
517
427
|
_: 1
|
|
518
|
-
}, 8, ["access-token", "data-layout"])
|
|
428
|
+
}, 8, ["access-token", "data-layout", "onMetadata"])
|
|
519
429
|
]),
|
|
520
|
-
fallback:
|
|
521
|
-
o(
|
|
430
|
+
fallback: F(() => [
|
|
431
|
+
o(Ne)
|
|
522
432
|
]),
|
|
523
433
|
_: 1
|
|
524
434
|
}))
|
|
@@ -526,8 +436,8 @@ const ea = { class: "gift-card-skeleton" }, aa = { class: "gift-card-skeleton-fo
|
|
|
526
436
|
_: 1
|
|
527
437
|
}, 8, ["styling"]));
|
|
528
438
|
}
|
|
529
|
-
}),
|
|
530
|
-
class
|
|
439
|
+
}), q = /* @__PURE__ */ z(ft, [["__scopeId", "data-v-36e1c4fe"]]), bt = ke(), vt = Fe();
|
|
440
|
+
class ht extends HTMLElement {
|
|
531
441
|
vueApp;
|
|
532
442
|
constructor() {
|
|
533
443
|
super();
|
|
@@ -536,26 +446,26 @@ class $a extends HTMLElement {
|
|
|
536
446
|
this.vueApp.unmount();
|
|
537
447
|
}
|
|
538
448
|
connectedCallback() {
|
|
539
|
-
const n = typeof
|
|
540
|
-
let
|
|
541
|
-
const
|
|
542
|
-
|
|
449
|
+
const n = typeof q == "function" ? q.options : q;
|
|
450
|
+
let m = Array.isArray(n.props) ? n.props : Object.keys(n.props || {});
|
|
451
|
+
const l = (u) => u.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (y, b) => (b ? "-" : "") + y.toLowerCase()), c = (u) => u.replace(/-./g, (y) => y[1].toUpperCase()), h = {};
|
|
452
|
+
m = m.map(l);
|
|
543
453
|
const p = {};
|
|
544
|
-
for (const
|
|
545
|
-
const
|
|
546
|
-
|
|
454
|
+
for (const u of this.attributes) {
|
|
455
|
+
const b = u.name.split(".");
|
|
456
|
+
b.length > 1 && (p[b[0]] || (p[b[0]] = {}), p[b[0]][c(b[1])] = u.value);
|
|
547
457
|
}
|
|
548
|
-
for (const
|
|
549
|
-
let
|
|
550
|
-
p.hasOwnProperty(
|
|
458
|
+
for (const u of m) {
|
|
459
|
+
let y = this.attributes.getNamedItem(u)?.value;
|
|
460
|
+
p.hasOwnProperty(u) && (y = p[u]), h[u] = y;
|
|
551
461
|
}
|
|
552
|
-
this.vueApp =
|
|
553
|
-
const
|
|
554
|
-
this.vueApp.mount(
|
|
462
|
+
this.vueApp = ce(q, h), Ce(this.vueApp), this.vueApp.provide("emitter", vt), this.vueApp.use(bt), this.vueApp.use(Ve), this.vueApp.use(we, { bootstrap: !0 });
|
|
463
|
+
const _ = document.createElement("div");
|
|
464
|
+
this.vueApp.mount(_), this.appendChild(_.children[0]);
|
|
555
465
|
}
|
|
556
466
|
}
|
|
557
|
-
window.customElements.define("konnectio-gift-card",
|
|
467
|
+
window.customElements.define("konnectio-gift-card", ht);
|
|
558
468
|
export {
|
|
559
|
-
|
|
469
|
+
ht as default
|
|
560
470
|
};
|
|
561
471
|
//# sourceMappingURL=gift-card.js.map
|