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