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