@konnectio/core 4.0.56-rc20 → 4.0.56-rc22

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