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