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