@konnectio/core 4.0.56-rc4 → 4.0.56-rc6

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 (115) hide show
  1. package/dist/{ActionField-UFZMmHDy.js → ActionField-YyW_C34E.js} +27 -28
  2. package/dist/ActionField-YyW_C34E.js.br +0 -0
  3. package/dist/AvailabilitySkeleton-lYcDX41T.js +239 -0
  4. package/dist/AvailabilitySkeleton-lYcDX41T.js.br +0 -0
  5. package/dist/{CheckoutWindow-2RMgPiGi.js → CheckoutWindow-T7-vrZyG.js} +46 -47
  6. package/dist/CheckoutWindow-T7-vrZyG.js.br +0 -0
  7. package/dist/{Container-XBRB0sOV.js → Container-w7O0He-s.js} +6 -7
  8. package/dist/Container-w7O0He-s.js.br +0 -0
  9. package/dist/{DateField.vue_vue_type_style_index_0_lang-o-uoh8_-.js → DateField.vue_vue_type_style_index_0_lang-pLqbpoS_.js} +5 -6
  10. package/dist/DateField.vue_vue_type_style_index_0_lang-pLqbpoS_.js.br +0 -0
  11. package/dist/{Field-uK3Wuuv6.js → Field-fWwF40rD.js} +12 -13
  12. package/dist/Field-fWwF40rD.js.br +0 -0
  13. package/dist/SelectField.vue_vue_type_style_index_0_lang-C-MscjWo.js +30461 -0
  14. package/dist/SelectField.vue_vue_type_style_index_0_lang-C-MscjWo.js.br +0 -0
  15. package/dist/{ThankYou-nz4vPX4O.js → ThankYou-pUA2X7-4.js} +569 -569
  16. package/dist/ThankYou-pUA2X7-4.js.br +0 -0
  17. package/dist/_-TlutFgf7.js +19 -0
  18. package/dist/_commonjsHelpers-4t9S7M5p.js +30 -0
  19. package/dist/availability.js +96 -98
  20. package/dist/availability.js.br +0 -0
  21. package/dist/components/Alert.vue.d.ts +4 -4
  22. package/dist/components/Clickable.vue.d.ts +5 -5
  23. package/dist/components/Container.vue.d.ts +4 -4
  24. package/dist/components/ErrorMessage.vue.d.ts +3 -3
  25. package/dist/components/Gallery.vue.d.ts +4 -4
  26. package/dist/components/GoogleNotice.vue.d.ts +1 -1
  27. package/dist/components/Icon.vue.d.ts +4 -4
  28. package/dist/components/Loading.vue.d.ts +4 -4
  29. package/dist/components/Spinner.vue.d.ts +1 -1
  30. package/dist/components/forms/EventAvailabilityForm.vue.d.ts +4 -4
  31. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +4 -4
  32. package/dist/components/forms/HotelReservationForm.vue.d.ts +4 -4
  33. package/dist/components/forms/MultiStepForm.vue.d.ts +5 -5
  34. package/dist/components/forms/ReservationForm.vue.d.ts +4 -4
  35. package/dist/components/forms/_.vue.d.ts +5 -5
  36. package/dist/components/inputs/Checkbox.vue.d.ts +6 -6
  37. package/dist/components/inputs/CheckboxField.vue.d.ts +5 -5
  38. package/dist/components/inputs/DateField.vue.d.ts +5 -5
  39. package/dist/components/inputs/InputField.vue.d.ts +4 -4
  40. package/dist/components/inputs/MediaSelector.vue.d.ts +5 -5
  41. package/dist/components/inputs/NumberField.vue.d.ts +5 -5
  42. package/dist/components/inputs/SelectField.vue.d.ts +5 -5
  43. package/dist/components/inputs/TextField.vue.d.ts +6 -6
  44. package/dist/components/inputs/TimeField.vue.d.ts +4 -4
  45. package/dist/components/inputs/grouped/ActionField.vue.d.ts +5 -5
  46. package/dist/components/inputs/grouped/CountryField.vue.d.ts +5 -5
  47. package/dist/components/inputs/grouped/NameField.vue.d.ts +6 -6
  48. package/dist/components/inputs/grouped/PhoneField.vue.d.ts +6 -6
  49. package/dist/components/inputs/grouped/RoomConfigField.vue.d.ts +5 -5
  50. package/dist/components/listings/Base.vue.d.ts +4 -4
  51. package/dist/components/listings/Event.vue.d.ts +4 -4
  52. package/dist/components/listings/Hotel.vue.d.ts +3 -3
  53. package/dist/components/listings/Template.vue.d.ts +3 -3
  54. package/dist/components/side-panels/Base.vue.d.ts +5 -5
  55. package/dist/components/side-panels/ListingInfo.vue.d.ts +3 -3
  56. package/dist/components/side-panels/Template.vue.d.ts +3 -3
  57. package/dist/components/side-panels/TermsOfService.vue.d.ts +3 -3
  58. package/dist/components/skeletons/AvailabilitySkeleton.vue.d.ts +4 -4
  59. package/dist/components/skeletons/Field.vue.d.ts +4 -4
  60. package/dist/components/skeletons/GiftCardSkeleton.vue.d.ts +1 -1
  61. package/dist/components/skeletons/HotelSkeleton.vue.d.ts +1 -1
  62. package/dist/components/skeletons/Listing.vue.d.ts +1 -1
  63. package/dist/components/skeletons/Sidebar.vue.d.ts +1 -1
  64. package/dist/components/skeletons/_.vue.d.ts +4 -4
  65. package/dist/components/views/CheckoutWindow.vue.d.ts +1 -1
  66. package/dist/components/views/TermsOfService.vue.d.ts +1 -1
  67. package/dist/components/views/ThankYou.vue.d.ts +4 -4
  68. package/dist/entries/availability.d.ts +5 -5
  69. package/dist/entries/event.d.ts +1 -1
  70. package/dist/entries/gift-card-validation.d.ts +5 -5
  71. package/dist/entries/gift-card.d.ts +5 -5
  72. package/dist/entries/hotel.d.ts +5 -5
  73. package/dist/{event--wgsUkQp.js → event-mDcuoL9g.js} +53 -54
  74. package/dist/event-mDcuoL9g.js.br +0 -0
  75. package/dist/event.js +212 -213
  76. package/dist/event.js.br +0 -0
  77. package/dist/gift-card-validation.js +65 -54
  78. package/dist/gift-card-validation.js.br +0 -0
  79. package/dist/gift-card.js +286 -276
  80. package/dist/gift-card.js.br +0 -0
  81. package/dist/hotel.js +1332 -1314
  82. package/dist/hotel.js.br +0 -0
  83. package/dist/layouts/Availability.vue.d.ts +4 -4
  84. package/dist/layouts/Event.vue.d.ts +4 -4
  85. package/dist/layouts/GiftCard.vue.d.ts +4 -4
  86. package/dist/layouts/GiftCardValidation.vue.d.ts +4 -4
  87. package/dist/layouts/Hotel.vue.d.ts +4 -4
  88. package/dist/layouts/_.vue.d.ts +4 -4
  89. package/dist/polyfill.js +2 -2
  90. package/dist/polyfill.js.br +0 -0
  91. package/dist/store/alert.d.ts +15 -15
  92. package/dist/store/applyGiftCard.d.ts +18 -18
  93. package/dist/store/availability.d.ts +12 -12
  94. package/dist/store/event.d.ts +141 -141
  95. package/dist/store/giftCard.d.ts +51 -51
  96. package/dist/store/payment.d.ts +39 -39
  97. package/dist/store/recaptcha.d.ts +3 -3
  98. package/dist/store/tracking.d.ts +6 -6
  99. package/dist/store/utilities.d.ts +129 -129
  100. package/dist/style.css +1 -1
  101. package/dist/style.css.br +0 -0
  102. package/package.json +4 -3
  103. package/dist/ActionField-UFZMmHDy.js.br +0 -0
  104. package/dist/AvailabilitySkeleton-hVUJYdXH.js +0 -242
  105. package/dist/AvailabilitySkeleton-hVUJYdXH.js.br +0 -0
  106. package/dist/CheckoutWindow-2RMgPiGi.js.br +0 -0
  107. package/dist/Container-XBRB0sOV.js.br +0 -0
  108. package/dist/DateField.vue_vue_type_style_index_0_lang-o-uoh8_-.js.br +0 -0
  109. package/dist/Field-uK3Wuuv6.js.br +0 -0
  110. package/dist/SelectField.vue_vue_type_style_index_0_lang-3YCxOJhZ.js +0 -21472
  111. package/dist/SelectField.vue_vue_type_style_index_0_lang-3YCxOJhZ.js.br +0 -0
  112. package/dist/ThankYou-nz4vPX4O.js.br +0 -0
  113. package/dist/_-oPH7HiaC.js +0 -20
  114. package/dist/_commonjsHelpers-FF1eOqK0.js +0 -8
  115. package/dist/event--wgsUkQp.js.br +0 -0
package/dist/gift-card.js CHANGED
@@ -1,131 +1,130 @@
1
- var ve = Object.defineProperty;
1
+ var fe = Object.defineProperty;
2
2
  var ae = Object.getOwnPropertySymbols;
3
- var ge = Object.prototype.hasOwnProperty, be = Object.prototype.propertyIsEnumerable;
4
- var le = (u, t, r) => t in u ? ve(u, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : u[t] = r, te = (u, t) => {
5
- for (var r in t || (t = {}))
6
- ge.call(t, r) && le(u, r, t[r]);
3
+ var ve = Object.prototype.hasOwnProperty, ge = Object.prototype.propertyIsEnumerable;
4
+ var le = (c, l, i) => l in c ? fe(c, l, { enumerable: !0, configurable: !0, writable: !0, value: i }) : c[l] = i, te = (c, l) => {
5
+ for (var i in l || (l = {}))
6
+ ve.call(l, i) && le(c, i, l[i]);
7
7
  if (ae)
8
- for (var r of ae(t))
9
- be.call(t, r) && le(u, r, t[r]);
10
- return u;
8
+ for (var i of ae(l))
9
+ ge.call(l, i) && le(c, i, l[i]);
10
+ return c;
11
11
  };
12
- var J = (u, t, r) => new Promise((o, s) => {
13
- var h = (m) => {
12
+ var J = (c, l, i) => new Promise((t, n) => {
13
+ var g = (d) => {
14
14
  try {
15
- v(r.next(m));
16
- } catch (g) {
17
- s(g);
15
+ m(i.next(d));
16
+ } catch (y) {
17
+ n(y);
18
18
  }
19
- }, f = (m) => {
19
+ }, p = (d) => {
20
20
  try {
21
- v(r.throw(m));
22
- } catch (g) {
23
- s(g);
21
+ m(i.throw(d));
22
+ } catch (y) {
23
+ n(y);
24
24
  }
25
- }, v = (m) => m.done ? o(m.value) : Promise.resolve(m.value).then(h, f);
26
- v((r = r.apply(u, t)).next());
25
+ }, m = (d) => d.done ? t(d.value) : Promise.resolve(d.value).then(g, p);
26
+ m((i = i.apply(c, l)).next());
27
27
  });
28
- import { ref as _, computed as V, defineComponent as Z, openBlock as p, createBlock as L, withCtx as D, createElementVNode as d, createElementBlock as b, createVNode as n, unref as e, createCommentVNode as T, normalizeClass as ue, watch as ye, onMounted as he, Suspense as ke, toDisplayString as oe, withDirectives as W, vShow as j, Fragment as Ce, renderList as _e, isRef as C, createApp as Ve } from "vue";
29
- import { d as Fe, u as Pe, s as X, c as ce, H as $, e as Y, i as ie, S as Q, h as we, f as Te, J as Se, l as pe, b as Ue, I as $e, C as z, _ as me, m as Ee, j as qe, L as ne, T as H, k as Ie, q as Re, t as Le, D as Ge } from "./SelectField.vue_vue_type_style_index_0_lang-3YCxOJhZ.js";
30
- import { C as Me } from "./Container-XBRB0sOV.js";
31
- import { a as xe, C as re, P as De, _ as ze } from "./CheckoutWindow-2RMgPiGi.js";
32
- import { E as Ae } from "./_-oPH7HiaC.js";
33
- import { F as x } from "./Field-uK3Wuuv6.js";
34
- import "./_commonjsHelpers-FF1eOqK0.js";
35
- const se = Fe("giftCard", () => {
36
- const { pay: u } = Pe(), { bearerToken: t, metaData: r, currencyId: o } = X(ce()), s = _($.InitialState), h = Y("konnectio_name", "", void 0, { serializer: Q.string }), f = Y("konnectio_email", "", void 0, { serializer: Q.string }), v = Y("konnectio_phone", "", void 0, { serializer: Q.string }), m = _(""), g = _(1), S = _(!0), G = _(""), k = _({
28
+ import { d as ye, u as be, s as X, c as ue, r as _, ad as $, e as Y, f as V, j as oe, S as Q, i as he, h as ke, ae as Ce, k as Z, F as ce, b as _e, o as v, m as L, w as G, x as u, l as b, p as r, z as e, C as B, n as T, q as pe, I as Ve, _ as me, a2 as Fe, B as we, G as Pe, H as ne, af as W, ag as j, a3 as Te, a4 as Se, J as C, y as Ue, a5 as ie, T as H, A as $e, P as Ee, U as Ie, V as Re, W as qe, a9 as Le } from "./SelectField.vue_vue_type_style_index_0_lang-C-MscjWo.js";
29
+ import { C as Me } from "./Container-w7O0He-s.js";
30
+ import { a as xe, C as se, P as Ae, _ as Ge } from "./CheckoutWindow-T7-vrZyG.js";
31
+ import { E as Be } from "./_-TlutFgf7.js";
32
+ import { F as A } from "./Field-fWwF40rD.js";
33
+ import "./_commonjsHelpers-4t9S7M5p.js";
34
+ const re = ye("giftCard", () => {
35
+ const { pay: c } = be(), { bearerToken: l, metaData: i, currencyId: t } = X(ue()), n = _($.InitialState), g = Y("konnectio_name", "", void 0, { serializer: Q.string }), p = Y("konnectio_email", "", void 0, { serializer: Q.string }), m = Y("konnectio_phone", "", void 0, { serializer: Q.string }), d = _(""), y = _(1), S = _(!0), M = _(""), k = _({
37
36
  base64: "",
38
37
  type: "",
39
38
  name: ""
40
- }), l = _(void 0), c = _(0), y = _(!1), q = _(0), F = V(() => s.value === $.InitialState || s.value === $.WaitingForResponse), I = V(() => s.value === $.ReadyToPay), M = V(() => s.value === $.PaymentSuccess), P = V(() => {
39
+ }), o = _(void 0), f = _(0), h = _(!1), I = _(0), F = V(() => n.value === $.InitialState || n.value === $.WaitingForResponse), R = V(() => n.value === $.ReadyToPay), x = V(() => n.value === $.PaymentSuccess), w = V(() => {
41
40
  const a = {
42
41
  1: {
43
- label: ie.t("giftCard.hotelType"),
42
+ label: oe.t("giftCard.hotelType"),
44
43
  data: []
45
44
  },
46
45
  2: {
47
- label: ie.t("giftCard.restaurantType"),
46
+ label: oe.t("giftCard.restaurantType"),
48
47
  data: []
49
48
  }
50
- }, U = r.value.hotels[0].places;
51
- return U && U.forEach((w) => {
52
- a[w.placeType].data.push(w);
49
+ }, U = i.value.hotels[0].places;
50
+ return U && U.forEach((P) => {
51
+ a[P.placeType].data.push(P);
53
52
  }), Object.fromEntries(
54
- Object.entries(a).filter(([, w]) => w.data.length > 0)
53
+ Object.entries(a).filter(([, P]) => P.data.length > 0)
55
54
  );
56
- }), A = V(() => q.value !== 0), E = V(() => {
55
+ }), z = V(() => I.value !== 0), E = V(() => {
57
56
  let a;
58
- if (A.value)
59
- a = P.value[q.value].data[0];
60
- else if (c.value !== 0) {
61
- const U = l.value, w = P.value[c.value].data;
62
- w.length === 1 ? a = w[0] : U !== void 0 && w.forEach((ee) => {
57
+ if (z.value)
58
+ a = w.value[I.value].data[0];
59
+ else if (f.value !== 0) {
60
+ const U = o.value, P = w.value[f.value].data;
61
+ P.length === 1 ? a = P[0] : U !== void 0 && P.forEach((ee) => {
63
62
  String(ee.id) === String(U) && (a = ee);
64
63
  });
65
64
  }
66
65
  return a;
67
- }), B = V(() => !(!h.value || !f.value || !(v.value.length >= 5) || !m.value || E.value === void 0)), O = V(() => !(s.value === $.InitialState && y.value)), K = V(() => !!(s.value === $.WaitingForResponse && y.value));
68
- function R() {
66
+ }), D = V(() => !(!g.value || !p.value || !(m.value.length >= 5) || !d.value || E.value === void 0)), O = V(() => !(n.value === $.InitialState && h.value)), K = V(() => !!(n.value === $.WaitingForResponse && h.value));
67
+ function q() {
69
68
  return J(this, null, function* () {
70
- s.value = $.WaitingForResponse, y.value = !0, yield we.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
69
+ n.value = $.WaitingForResponse, h.value = !0, yield he.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
71
70
  termsOfserviceURL: window.location.origin,
72
71
  checkoutUrl: window.location.origin,
73
- currencyID: o.value,
74
- language: Te(),
75
- amount: m.value,
76
- quantity: g.value,
77
- freeText: G.value,
72
+ currencyID: t.value,
73
+ language: ke(),
74
+ amount: d.value,
75
+ quantity: y.value,
76
+ freeText: M.value,
78
77
  showPrice: S.value,
79
- contactName: h.value,
80
- contactEmail: f.value,
81
- contactPhone: v.value,
82
- imageBase64: Se(k.value.base64),
78
+ contactName: g.value,
79
+ contactEmail: p.value,
80
+ contactPhone: m.value,
81
+ imageBase64: Ce(k.value.base64),
83
82
  imageName: k.value.name,
84
83
  imageFormat: k.value.type,
85
84
  placeType: E.value ? E.value.placeType : void 0,
86
85
  placeID: E.value ? E.value.id : void 0
87
86
  }, {
88
87
  headers: {
89
- Authorization: t.value,
88
+ Authorization: l.value,
90
89
  Accept: "application/json",
91
- "Fresh-Booking-Ver": "4.0.56-rc4"
90
+ "Fresh-Booking-Ver": "4.0.56-rc6"
92
91
  }
93
92
  }).then((a) => {
94
- s.value = $.ReadyToPay, y.value = !1, u({
93
+ n.value = $.ReadyToPay, h.value = !1, c({
95
94
  callback: () => console.log("Callback!"),
96
95
  response: a.data
97
96
  });
98
97
  });
99
98
  });
100
99
  }
101
- function i(a) {
102
- a && (q.value = a);
100
+ function s(a) {
101
+ a && (I.value = a);
103
102
  }
104
103
  return {
105
104
  selectedPlace: E,
106
- moduleState: s,
107
- name: h,
108
- email: f,
109
- phone: v,
110
- value: m,
111
- remark: G,
105
+ moduleState: n,
106
+ name: g,
107
+ email: p,
108
+ phone: m,
109
+ value: d,
110
+ remark: M,
112
111
  showValue: S,
113
- quantity: g,
112
+ quantity: y,
114
113
  media: k,
115
- placeId: l,
116
- placeType: c,
114
+ placeId: o,
115
+ placeType: f,
117
116
  showFormPage: F,
118
- showPaymentPage: I,
119
- showConfirmationPage: M,
120
- places: P,
121
- hasFilledForm: B,
122
- hasForcedPlaceType: A,
117
+ showPaymentPage: R,
118
+ showConfirmationPage: x,
119
+ places: w,
120
+ hasFilledForm: D,
121
+ hasForcedPlaceType: z,
123
122
  isWaitingForResponse: K,
124
123
  isMetaDataAvailable: O,
125
- orderGiftCard: R,
126
- initialize: i
124
+ orderGiftCard: q,
125
+ initialize: s
127
126
  };
128
- }), Be = { class: "media-selector" }, We = ["accept"], je = { class: "media-selector-wrapper" }, He = { class: "media-selector-tools" }, Ne = { key: 0 }, Oe = { key: 1 }, Ke = { key: 2 }, Je = ["src"], Ye = /* @__PURE__ */ Z({
127
+ }), ze = { class: "media-selector" }, De = ["accept"], We = { class: "media-selector-wrapper" }, je = { class: "media-selector-tools" }, He = { key: 0 }, Ne = { key: 1 }, Oe = { key: 2 }, Ke = ["src"], Je = /* @__PURE__ */ Z({
129
128
  __name: "MediaSelector",
130
129
  props: {
131
130
  modelValue: {},
@@ -135,96 +134,96 @@ const se = Fe("giftCard", () => {
135
134
  required: { type: Boolean, default: !1 }
136
135
  },
137
136
  emits: ["update:modelValue"],
138
- setup(u, { emit: t }) {
139
- const r = t, o = u, { t: s } = pe(), { display: h } = Ue(), f = _(), v = V(() => o.modelValue.base64 !== "");
140
- function m(l) {
141
- r("update:modelValue", l);
137
+ setup(c, { emit: l }) {
138
+ const i = l, t = c, { t: n } = ce(), { display: g } = _e(), p = _(), m = V(() => t.modelValue.base64 !== "");
139
+ function d(o) {
140
+ i("update:modelValue", o);
142
141
  }
143
- function g() {
144
- m({
142
+ function y() {
143
+ d({
145
144
  base64: "",
146
145
  name: "",
147
146
  type: ""
148
- }), f.value && (f.value.value = "");
147
+ }), p.value && (p.value.value = "");
149
148
  }
150
149
  function S() {
151
- f.value && f.value.click();
150
+ p.value && p.value.click();
152
151
  }
153
- function G(l, c) {
154
- const [y, q] = [l.name, l.type], F = new FileReader();
155
- F.onload = function(I) {
156
- if (I.target) {
157
- const M = I.target.result;
158
- c({ base64: M, name: y, type: q });
152
+ function M(o, f) {
153
+ const [h, I] = [o.name, o.type], F = new FileReader();
154
+ F.onload = function(R) {
155
+ if (R.target) {
156
+ const x = R.target.result;
157
+ f({ base64: x, name: h, type: I });
159
158
  } else
160
- h({
161
- message: s("imageUploadError"),
159
+ g({
160
+ message: n("imageUploadError"),
162
161
  type: "error"
163
162
  });
164
- }, F.readAsDataURL(l);
163
+ }, F.readAsDataURL(o);
165
164
  }
166
165
  function k() {
167
166
  return J(this, null, function* () {
168
- let l;
169
- (l = f.value.files) instanceof FileList && G(l[0], m);
167
+ let o;
168
+ (o = p.value.files) instanceof FileList && M(o[0], d);
170
169
  });
171
170
  }
172
- return (l, c) => (p(), L($e, {
173
- label: l.label,
174
- required: l.required,
171
+ return (o, f) => (v(), L(Ve, {
172
+ label: o.label,
173
+ required: o.required,
175
174
  type: "media"
176
175
  }, {
177
- default: D(() => [
178
- d("div", Be, [
179
- d("input", {
176
+ default: G(() => [
177
+ u("div", ze, [
178
+ u("input", {
180
179
  ref_key: "fileInput",
181
- ref: f,
180
+ ref: p,
182
181
  type: "file",
183
182
  class: "hidden",
184
- accept: l.validation,
183
+ accept: o.validation,
185
184
  single: "",
186
- onChange: c[0] || (c[0] = (y) => k())
187
- }, null, 40, We),
188
- d("div", je, [
189
- d("ul", He, [
190
- v.value ? T("", !0) : (p(), b("li", Ne, [
191
- n(z, {
192
- label: e(s)("uploadFile"),
185
+ onChange: f[0] || (f[0] = (h) => k())
186
+ }, null, 40, De),
187
+ u("div", We, [
188
+ u("ul", je, [
189
+ m.value ? T("", !0) : (v(), b("li", He, [
190
+ r(B, {
191
+ label: e(n)("uploadFile"),
193
192
  type: "button",
194
193
  icon: "upload",
195
- "icon-color": l.iconColor,
196
- onClickEvent: c[1] || (c[1] = (y) => S())
194
+ "icon-color": o.iconColor,
195
+ onClickEvent: f[1] || (f[1] = (h) => S())
197
196
  }, null, 8, ["label", "icon-color"])
198
197
  ])),
199
- v.value ? (p(), b("li", Oe, [
200
- n(z, {
201
- label: e(s)("replaceFile"),
198
+ m.value ? (v(), b("li", Ne, [
199
+ r(B, {
200
+ label: e(n)("replaceFile"),
202
201
  type: "button",
203
202
  icon: "repeat-alt",
204
- "icon-color": l.iconColor,
205
- onClickEvent: c[2] || (c[2] = (y) => S())
203
+ "icon-color": o.iconColor,
204
+ onClickEvent: f[2] || (f[2] = (h) => S())
206
205
  }, null, 8, ["label", "icon-color"])
207
206
  ])) : T("", !0),
208
- v.value ? (p(), b("li", Ke, [
209
- n(z, {
210
- label: e(s)("removeFile"),
207
+ m.value ? (v(), b("li", Oe, [
208
+ r(B, {
209
+ label: e(n)("removeFile"),
211
210
  type: "button",
212
211
  icon: "trash-alt",
213
- "icon-color": l.iconColor,
214
- onClickEvent: c[3] || (c[3] = (y) => g())
212
+ "icon-color": o.iconColor,
213
+ onClickEvent: f[3] || (f[3] = (h) => y())
215
214
  }, null, 8, ["label", "icon-color"])
216
215
  ])) : T("", !0)
217
216
  ]),
218
- d("div", {
219
- class: ue([
217
+ u("div", {
218
+ class: pe([
220
219
  "media-selector-previewer",
221
- { opened: v.value }
220
+ { opened: m.value }
222
221
  ])
223
222
  }, [
224
- l.modelValue ? (p(), b("img", {
223
+ o.modelValue ? (v(), b("img", {
225
224
  key: 0,
226
- src: l.modelValue.base64
227
- }, null, 8, Je)) : T("", !0)
225
+ src: o.modelValue.base64
226
+ }, null, 8, Ke)) : T("", !0)
228
227
  ], 2)
229
228
  ])
230
229
  ])
@@ -233,9 +232,9 @@ const se = Fe("giftCard", () => {
233
232
  }, 8, ["label", "required"]));
234
233
  }
235
234
  });
236
- function de(u) {
237
- const t = u;
238
- t.__i18n = t.__i18n || [], t.__i18n.push({
235
+ function de(c) {
236
+ const l = c;
237
+ l.__i18n = l.__i18n || [], l.__i18n.push({
239
238
  locale: "",
240
239
  resource: {
241
240
  da: {
@@ -253,39 +252,39 @@ function de(u) {
253
252
  }
254
253
  });
255
254
  }
256
- typeof de == "function" && de(Ye);
257
- const Qe = { class: "gift-card-skeleton" }, Xe = { class: "gift-card-skeleton-form" }, Ze = /* @__PURE__ */ Z({
255
+ typeof de == "function" && de(Je);
256
+ const Ye = { class: "gift-card-skeleton" }, Qe = { class: "gift-card-skeleton-form" }, Xe = /* @__PURE__ */ Z({
258
257
  __name: "GiftCardSkeleton",
259
- setup(u) {
260
- return (t, r) => (p(), b("div", Qe, [
261
- d("div", Xe, [
262
- n(x),
263
- n(x),
264
- n(x),
265
- n(x),
266
- n(x, { "is-text-area": "" }),
267
- n(Ae, { height: "44px" })
258
+ setup(c) {
259
+ return (l, i) => (v(), b("div", Ye, [
260
+ u("div", Qe, [
261
+ r(A),
262
+ r(A),
263
+ r(A),
264
+ r(A),
265
+ r(A, { "is-text-area": "" }),
266
+ r(Be, { height: "44px" })
268
267
  ])
269
268
  ]));
270
269
  }
271
- }), ea = /* @__PURE__ */ me(Ze, [["__scopeId", "data-v-e35c75b3"]]), aa = {
270
+ }), Ze = /* @__PURE__ */ me(Xe, [["__scopeId", "data-v-e35c75b3"]]), ea = {
272
271
  key: 0,
273
272
  id: "konnectio-gift-card-wrapper"
274
- }, la = { id: "konnectio-gift-card-title" }, ta = { id: "konnectio-gift-card-content" }, oa = { id: "konnectio-gift-card-payment" }, ia = ["innerHTML"], na = { key: 0 }, ra = {
273
+ }, aa = { id: "konnectio-gift-card-title" }, la = { id: "konnectio-gift-card-content" }, ta = { id: "konnectio-gift-card-payment" }, oa = ["innerHTML"], na = { key: 0 }, ia = {
275
274
  key: 0,
276
275
  id: "fresh-booking-select-place-type"
277
276
  }, sa = {
278
- class: /* @__PURE__ */ ue(["fresh-booking-label", "required"])
279
- }, da = { id: "fresh-booking-select-place-type-input" }, ua = ["innerHTML"], ca = {
277
+ class: /* @__PURE__ */ pe(["fresh-booking-label", "required"])
278
+ }, ra = { id: "fresh-booking-select-place-type-input" }, da = ["innerHTML"], ua = {
280
279
  key: 0,
281
280
  id: "konnectio-gift-card-order"
282
- }, pa = { class: "fresh-booking-panel" }, ma = {
281
+ }, ca = { class: "fresh-booking-panel" }, pa = {
283
282
  key: 1,
284
283
  id: "konnectio-gift-card-remarks"
285
- }, fa = {
284
+ }, ma = {
286
285
  key: 2,
287
286
  id: "konnectio-gift-card-order-minimal"
288
- }, va = { id: "konnectio-gift-card-recaptcha" }, ga = /* @__PURE__ */ Z({
287
+ }, fa = { id: "konnectio-gift-card-recaptcha" }, va = /* @__PURE__ */ Z({
289
288
  name: "GiftCardLayout",
290
289
  __name: "GiftCard",
291
290
  props: {
@@ -294,72 +293,72 @@ const Qe = { class: "gift-card-skeleton" }, Xe = { class: "gift-card-skeleton-fo
294
293
  placeType: {},
295
294
  styling: {}
296
295
  },
297
- setup(u) {
298
- const t = u, r = V(() => te({
296
+ setup(c) {
297
+ const l = c, i = V(() => te({
299
298
  panelMaxWidth: "800px"
300
- }, t.styling)), { t: o } = pe(), {
301
- name: s,
302
- email: h,
303
- phone: f,
304
- value: v,
305
- remark: m,
306
- showValue: g,
299
+ }, l.styling)), { t } = ce(), {
300
+ name: n,
301
+ email: g,
302
+ phone: p,
303
+ value: m,
304
+ remark: d,
305
+ showValue: y,
307
306
  quantity: S,
308
- media: G,
307
+ media: M,
309
308
  placeId: k,
310
- placeType: l,
311
- showFormPage: c,
312
- showPaymentPage: y,
313
- showConfirmationPage: q,
309
+ placeType: o,
310
+ showFormPage: f,
311
+ showPaymentPage: h,
312
+ showConfirmationPage: I,
314
313
  places: F,
315
- hasFilledForm: I,
316
- hasForcedPlaceType: M,
317
- isWaitingForResponse: P,
318
- isMetaDataAvailable: A
319
- } = X(se()), { initialize: E, orderGiftCard: B } = se(), { isRecaptchaEnabled: O, currency: K } = X(ce());
320
- return ye(l, () => {
314
+ hasFilledForm: R,
315
+ hasForcedPlaceType: x,
316
+ isWaitingForResponse: w,
317
+ isMetaDataAvailable: z
318
+ } = X(re()), { initialize: E, orderGiftCard: D } = re(), { isRecaptchaEnabled: O, currency: K } = X(ue());
319
+ return Fe(o, () => {
321
320
  k.value = void 0;
322
- }), he(() => {
323
- const R = t.placeType ? parseInt(t.placeType) : void 0;
324
- E(R);
325
- }), (R, i) => (p(), L(Me, { styling: r.value }, {
326
- default: D(() => [
327
- (p(), L(ke, null, {
328
- default: D(() => [
329
- n(Ee, {
321
+ }), we(() => {
322
+ const q = l.placeType ? parseInt(l.placeType) : void 0;
323
+ E(q);
324
+ }), (q, s) => (v(), L(Me, { styling: i.value }, {
325
+ default: G(() => [
326
+ (v(), L(Pe, null, {
327
+ default: G(() => [
328
+ r(Ee, {
330
329
  id: "konnectio-gift-card-module",
331
330
  type: "gift-card",
332
- "access-token": R.accessToken,
333
- "data-layout": R.layout
331
+ "access-token": q.accessToken,
332
+ "data-layout": q.layout
334
333
  }, {
335
- default: D(() => [
336
- e(A) ? (p(), b("div", aa, [
337
- d("h2", la, [
338
- d("span", null, oe(e(o)("giftCard.title")), 1)
334
+ default: G(() => [
335
+ e(z) ? (v(), b("div", ea, [
336
+ u("h2", aa, [
337
+ u("span", null, ne(e(t)("giftCard.title")), 1)
339
338
  ]),
340
- d("div", ta, [
341
- W(d("div", oa, [
342
- n(xe)
339
+ u("div", la, [
340
+ W(u("div", ta, [
341
+ r(xe)
343
342
  ], 512), [
344
- [j, e(y)]
343
+ [j, e(h)]
345
344
  ]),
346
- W(d("div", null, [
347
- d("p", {
345
+ W(u("div", null, [
346
+ u("p", {
348
347
  id: "konnectio-gift-card-description",
349
- innerHTML: e(o)("giftCard.description")
350
- }, null, 8, ia),
351
- d("form", null, [
352
- e(M) ? T("", !0) : (p(), b("div", na, [
353
- e(F) ? (p(), b("div", ra, [
354
- d("label", sa, [
355
- d("span", null, oe(e(o)("giftCard.selectType")), 1)
348
+ innerHTML: e(t)("giftCard.description")
349
+ }, null, 8, oa),
350
+ u("form", null, [
351
+ e(x) ? T("", !0) : (v(), b("div", na, [
352
+ e(F) ? (v(), b("div", ia, [
353
+ u("label", sa, [
354
+ u("span", null, ne(e(t)("giftCard.selectType")), 1)
356
355
  ]),
357
- d("div", da, [
358
- d("ul", null, [
359
- (p(!0), b(Ce, null, _e(e(F), (a, U) => (p(), b("li", { key: U }, [
360
- n(re, {
361
- modelValue: e(l),
362
- "onUpdate:modelValue": i[0] || (i[0] = (w) => C(l) ? l.value = w : null),
356
+ u("div", ra, [
357
+ u("ul", null, [
358
+ (v(!0), b(Te, null, Se(e(F), (a, U) => (v(), b("li", { key: U }, [
359
+ r(se, {
360
+ modelValue: e(o),
361
+ "onUpdate:modelValue": s[0] || (s[0] = (P) => C(o) ? o.value = P : null),
363
362
  type: "radio",
364
363
  name: "placeType",
365
364
  val: U,
@@ -367,134 +366,134 @@ const Qe = { class: "gift-card-skeleton" }, Xe = { class: "gift-card-skeleton-fo
367
366
  }, null, 8, ["modelValue", "val", "label"])
368
367
  ]))), 128))
369
368
  ]),
370
- e(F)[e(l)] && e(F)[e(l)].data.length > 1 ? (p(), L(qe, {
369
+ e(F)[e(o)] && e(F)[e(o)].data.length > 1 ? (v(), L(Ue, {
371
370
  key: 0,
372
371
  modelValue: e(k),
373
- "onUpdate:modelValue": i[1] || (i[1] = (a) => C(k) ? k.value = a : null),
374
- placeholder: e(o)("giftCard.selectPlacePlaceholder"),
375
- options: e(F)[e(l)].data,
372
+ "onUpdate:modelValue": s[1] || (s[1] = (a) => C(k) ? k.value = a : null),
373
+ placeholder: e(t)("giftCard.selectPlacePlaceholder"),
374
+ options: e(F)[e(o)].data,
376
375
  labelKey: "name",
377
376
  valueKey: "id",
378
377
  required: ""
379
378
  }, null, 8, ["modelValue", "placeholder", "options"])) : T("", !0)
380
379
  ])
381
- ])) : (p(), L(ne, { key: 1 }))
380
+ ])) : (v(), L(ie, { key: 1 }))
382
381
  ])),
383
- n(H, {
384
- modelValue: e(s),
385
- "onUpdate:modelValue": i[2] || (i[2] = (a) => C(s) ? s.value = a : null),
382
+ r(H, {
383
+ modelValue: e(n),
384
+ "onUpdate:modelValue": s[2] || (s[2] = (a) => C(n) ? n.value = a : null),
386
385
  type: "text",
387
386
  name: "name",
388
387
  autocomplete: "name",
389
- label: e(o)("giftCard.name"),
388
+ label: e(t)("giftCard.name"),
390
389
  icon: "user-alt",
391
- placeholder: e(o)("giftCard.namePlaceholder"),
390
+ placeholder: e(t)("giftCard.namePlaceholder"),
392
391
  required: ""
393
392
  }, null, 8, ["modelValue", "label", "placeholder"]),
394
- n(H, {
395
- modelValue: e(h),
396
- "onUpdate:modelValue": i[3] || (i[3] = (a) => C(h) ? h.value = a : null),
393
+ r(H, {
394
+ modelValue: e(g),
395
+ "onUpdate:modelValue": s[3] || (s[3] = (a) => C(g) ? g.value = a : null),
397
396
  type: "email",
398
397
  name: "email",
399
398
  autocomplete: "email",
400
- label: e(o)("giftCard.email"),
399
+ label: e(t)("giftCard.email"),
401
400
  icon: "at",
402
- placeholder: e(o)("giftCard.emailPlaceholder"),
401
+ placeholder: e(t)("giftCard.emailPlaceholder"),
403
402
  required: ""
404
403
  }, null, 8, ["modelValue", "label", "placeholder"]),
405
- n(De, {
406
- modelValue: e(f),
407
- "onUpdate:modelValue": i[4] || (i[4] = (a) => C(f) ? f.value = a : null),
404
+ r(Ae, {
405
+ modelValue: e(p),
406
+ "onUpdate:modelValue": s[4] || (s[4] = (a) => C(p) ? p.value = a : null),
408
407
  icon: "phone-office",
409
- label: e(o)("giftCard.phone"),
410
- placeholder: e(o)("giftCard.phonePlaceholder"),
408
+ label: e(t)("giftCard.phone"),
409
+ placeholder: e(t)("giftCard.phonePlaceholder"),
411
410
  required: ""
412
411
  }, null, 8, ["modelValue", "label", "placeholder"]),
413
- n(H, {
414
- modelValue: e(v),
415
- "onUpdate:modelValue": i[5] || (i[5] = (a) => C(v) ? v.value = a : null),
412
+ r(H, {
413
+ modelValue: e(m),
414
+ "onUpdate:modelValue": s[5] || (s[5] = (a) => C(m) ? m.value = a : null),
416
415
  type: "number",
417
416
  name: "value",
418
- label: e(o)("giftCard.value"),
417
+ label: e(t)("giftCard.value"),
419
418
  icon: "money-bill",
420
- placeholder: e(o)("giftCard.valuePlaceholder"),
419
+ placeholder: e(t)("giftCard.valuePlaceholder"),
421
420
  suffix: e(K),
422
421
  required: ""
423
422
  }, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
424
- n(re, {
425
- modelValue: e(g),
426
- "onUpdate:modelValue": i[6] || (i[6] = (a) => C(g) ? g.value = a : null),
423
+ r(se, {
424
+ modelValue: e(y),
425
+ "onUpdate:modelValue": s[6] || (s[6] = (a) => C(y) ? y.value = a : null),
427
426
  type: "checkbox",
428
427
  name: "showValue",
429
- label: e(o)("giftCard.showValue"),
430
- checked: e(g)
428
+ label: e(t)("giftCard.showValue"),
429
+ checked: e(y)
431
430
  }, null, 8, ["modelValue", "label", "checked"]),
432
431
  T("", !0),
433
- n(Ie, {
432
+ r($e, {
434
433
  modelValue: e(S),
435
- "onUpdate:modelValue": i[8] || (i[8] = (a) => C(S) ? S.value = a : null),
436
- label: e(o)("giftCard.quantity"),
434
+ "onUpdate:modelValue": s[8] || (s[8] = (a) => C(S) ? S.value = a : null),
435
+ label: e(t)("giftCard.quantity"),
437
436
  icon: "gift-card",
438
437
  required: ""
439
438
  }, null, 8, ["modelValue", "label"])
440
439
  ])
441
440
  ], 512), [
442
- [j, e(c)]
441
+ [j, e(f)]
443
442
  ]),
444
- W(d("div", null, [
445
- d("div", {
446
- innerHTML: e(o)("giftCard.thankYou")
447
- }, null, 8, ua)
443
+ W(u("div", null, [
444
+ u("div", {
445
+ innerHTML: e(t)("giftCard.thankYou")
446
+ }, null, 8, da)
448
447
  ], 512), [
449
- [j, e(q)]
448
+ [j, e(I)]
450
449
  ])
451
450
  ]),
452
- R.layout !== "minimal" && e(c) ? (p(), b("div", ca, [
453
- d("div", pa, [
454
- n(z, {
455
- label: e(o)("giftCard.orderGiftCard"),
451
+ q.layout !== "minimal" && e(f) ? (v(), b("div", ua, [
452
+ u("div", ca, [
453
+ r(B, {
454
+ label: e(t)("giftCard.orderGiftCard"),
456
455
  "full-width": !0,
457
- disabled: !e(I),
458
- "is-loading": e(P),
459
- "onUpdate:isLoading": i[9] || (i[9] = (a) => C(P) ? P.value = a : null),
460
- onClickEvent: e(B)
456
+ disabled: !e(R),
457
+ "is-loading": e(w),
458
+ "onUpdate:isLoading": s[9] || (s[9] = (a) => C(w) ? w.value = a : null),
459
+ onClickEvent: e(D)
461
460
  }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"])
462
461
  ])
463
462
  ])) : T("", !0),
464
- e(c) ? (p(), b("div", ma, [
465
- n(H, {
466
- modelValue: e(m),
467
- "onUpdate:modelValue": i[10] || (i[10] = (a) => C(m) ? m.value = a : null),
463
+ e(f) ? (v(), b("div", pa, [
464
+ r(H, {
465
+ modelValue: e(d),
466
+ "onUpdate:modelValue": s[10] || (s[10] = (a) => C(d) ? d.value = a : null),
468
467
  type: "textarea",
469
468
  name: "remark",
470
- label: e(o)("giftCard.remark"),
469
+ label: e(t)("giftCard.remark"),
471
470
  icon: "info-circle",
472
- placeholder: e(o)("giftCard.remarkPlaceholder")
471
+ placeholder: e(t)("giftCard.remarkPlaceholder")
473
472
  }, null, 8, ["modelValue", "label", "placeholder"])
474
473
  ])) : T("", !0),
475
- e(c) ? (p(), b("div", fa, [
476
- n(z, {
477
- label: e(o)("giftCard.orderGiftCard"),
474
+ e(f) ? (v(), b("div", ma, [
475
+ r(B, {
476
+ label: e(t)("giftCard.orderGiftCard"),
478
477
  "full-width": !0,
479
- disabled: !e(I),
478
+ disabled: !e(R),
480
479
  "data-test": "orderGiftCard",
481
- "is-loading": e(P),
482
- "onUpdate:isLoading": i[11] || (i[11] = (a) => C(P) ? P.value = a : null),
483
- onClickEvent: e(B)
480
+ "is-loading": e(w),
481
+ "onUpdate:isLoading": s[11] || (s[11] = (a) => C(w) ? w.value = a : null),
482
+ onClickEvent: e(D)
484
483
  }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"]),
485
- W(d("div", va, [
486
- n(ze)
484
+ W(u("div", fa, [
485
+ r(Ge)
487
486
  ], 512), [
488
487
  [j, e(O)]
489
488
  ])
490
489
  ])) : T("", !0)
491
- ])) : (p(), L(ne, { key: 1 }))
490
+ ])) : (v(), L(ie, { key: 1 }))
492
491
  ]),
493
492
  _: 1
494
493
  }, 8, ["access-token", "data-layout"])
495
494
  ]),
496
- fallback: D(() => [
497
- n(ea)
495
+ fallback: G(() => [
496
+ r(Ze)
498
497
  ]),
499
498
  _: 1
500
499
  }))
@@ -502,16 +501,27 @@ const Qe = { class: "gift-card-skeleton" }, Xe = { class: "gift-card-skeleton-fo
502
501
  _: 1
503
502
  }, 8, ["styling"]));
504
503
  }
505
- }), fe = /* @__PURE__ */ me(ga, [["__scopeId", "data-v-ec9ea15b"]]), ba = Re(), N = Ve({ components: { GiftCard: fe } });
506
- N.use(ba);
507
- N.use(Le);
508
- N.use(Ge, { bootstrap: !0 });
509
- N.mount("#konnectio-gift-card-app");
510
- const wa = {
511
- install: (u) => {
512
- u.component("GiftCard", fe);
504
+ }), N = /* @__PURE__ */ me(va, [["__scopeId", "data-v-ec9ea15b"]]), ga = Ie();
505
+ class ya extends HTMLElement {
506
+ constructor() {
507
+ super();
513
508
  }
514
- };
509
+ connectedCallback() {
510
+ var p;
511
+ const l = typeof N == "function" ? N.options : N, i = Array.isArray(l.props) ? l.props : Object.keys(l.props || {}), t = {};
512
+ for (const m of i) {
513
+ const d = (p = this.attributes.getNamedItem(m)) == null ? void 0 : p.value;
514
+ if (!d)
515
+ break;
516
+ t[m] = d;
517
+ }
518
+ const n = Re(N, t);
519
+ n.use(ga), n.use(qe), n.use(Le, { bootstrap: !0 });
520
+ const g = document.createElement("div");
521
+ n.mount(g), this.appendChild(g.children[0]);
522
+ }
523
+ }
524
+ window.customElements.define("konnectio-gift-card", ya);
515
525
  export {
516
- wa as default
526
+ ya as default
517
527
  };