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