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