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