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