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