@konnectio/core 4.0.43 → 4.0.45

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 (74) hide show
  1. package/dist/{ActionField-46bc1332.js → ActionField-1e9b784f.js} +2 -2
  2. package/dist/ActionField-1e9b784f.js.br +0 -0
  3. package/dist/{ActionField-43360bd2.cjs → ActionField-2a5b0069.cjs} +1 -1
  4. package/dist/{AvailabilitySkeleton-0a70de37.cjs → AvailabilitySkeleton-548b948c.cjs} +1 -1
  5. package/dist/{AvailabilitySkeleton-f86f40b9.js → AvailabilitySkeleton-f2902197.js} +5 -5
  6. package/dist/AvailabilitySkeleton-f2902197.js.br +0 -0
  7. package/dist/{CheckoutWindow-046e2e84.js → CheckoutWindow-70c47274.js} +1 -1
  8. package/dist/CheckoutWindow-70c47274.js.br +0 -0
  9. package/dist/{CheckoutWindow-a2dfaa01.cjs → CheckoutWindow-b0b45e70.cjs} +1 -1
  10. package/dist/{DateField.vue_vue_type_style_index_0_lang-10d7dd19.js → DateField.vue_vue_type_style_index_0_lang-d1cb0d52.js} +1 -1
  11. package/dist/DateField.vue_vue_type_style_index_0_lang-d1cb0d52.js.br +0 -0
  12. package/dist/{DateField.vue_vue_type_style_index_0_lang-a4c0f28b.cjs → DateField.vue_vue_type_style_index_0_lang-fd129a1c.cjs} +1 -1
  13. package/dist/{Field-0588c03e.cjs → Field-327ae27e.cjs} +1 -1
  14. package/dist/{Field-a28f1e97.js → Field-44e97149.js} +2 -2
  15. package/dist/Field-44e97149.js.br +0 -0
  16. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-01f7e3ee.cjs → NumberField.vue_vue_type_script_setup_true_lang-d4ee7977.cjs} +1 -1
  17. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-9edbbae0.js → NumberField.vue_vue_type_script_setup_true_lang-f3b45625.js} +1 -1
  18. package/dist/NumberField.vue_vue_type_script_setup_true_lang-f3b45625.js.br +0 -0
  19. package/dist/{SelectField.vue_vue_type_style_index_0_lang-fbce2406.js → SelectField.vue_vue_type_style_index_0_lang-656991fc.js} +13846 -12369
  20. package/dist/SelectField.vue_vue_type_style_index_0_lang-656991fc.js.br +0 -0
  21. package/dist/SelectField.vue_vue_type_style_index_0_lang-b66917f6.cjs +865 -0
  22. package/dist/{ThankYou-2acb4fdf.cjs → ThankYou-367bae0e.cjs} +7 -7
  23. package/dist/{ThankYou-0b7441d8.js → ThankYou-c78aff79.js} +195 -195
  24. package/dist/ThankYou-c78aff79.js.br +0 -0
  25. package/dist/{_-5f328ff3.js → _-0345553a.js} +1 -1
  26. package/dist/{_-357f8de1.cjs → _-e7cd8ef2.cjs} +1 -1
  27. package/dist/availability.cjs +1 -1
  28. package/dist/availability.js +7 -7
  29. package/dist/availability.js.br +0 -0
  30. package/dist/components/inputs/InputField.vue.d.ts +1 -1
  31. package/dist/components/side-panels/Base.vue.d.ts +2 -1
  32. package/dist/components/side-panels/Base.vue.d.ts.map +1 -1
  33. package/dist/components/side-panels/ListingInfo.vue.d.ts +1 -1
  34. package/dist/components/side-panels/Template.vue.d.ts +3 -2
  35. package/dist/components/side-panels/Template.vue.d.ts.map +1 -1
  36. package/dist/components/skeletons/HotelSkeleton.vue.d.ts +1 -1
  37. package/dist/{event-b8c5517e.cjs → event-15977eb5.cjs} +1 -1
  38. package/dist/{event-7eca2398.js → event-fa719df8.js} +7 -7
  39. package/dist/event-fa719df8.js.br +0 -0
  40. package/dist/event.cjs +1 -1
  41. package/dist/event.js +8 -8
  42. package/dist/event.js.br +0 -0
  43. package/dist/gift-card-validation.cjs +1 -1
  44. package/dist/gift-card-validation.js +3 -3
  45. package/dist/gift-card-validation.js.br +0 -0
  46. package/dist/gift-card.cjs +1 -1
  47. package/dist/gift-card.js +232 -227
  48. package/dist/gift-card.js.br +0 -0
  49. package/dist/hotel.cjs +7 -7
  50. package/dist/hotel.js +688 -688
  51. package/dist/hotel.js.br +0 -0
  52. package/dist/polyfill.cjs +4 -4
  53. package/dist/polyfill.js +3214 -3173
  54. package/dist/polyfill.js.br +0 -0
  55. package/dist/store/payment.d.ts +6 -0
  56. package/dist/store/utilities.d.ts +92 -87
  57. package/dist/style.css +1 -1
  58. package/dist/style.css.br +0 -0
  59. package/dist/types/index.d.ts +7 -1
  60. package/package.json +10 -8
  61. package/dist/ActionField-46bc1332.js.br +0 -0
  62. package/dist/AvailabilitySkeleton-f86f40b9.js.br +0 -0
  63. package/dist/CheckoutWindow-046e2e84.js.br +0 -0
  64. package/dist/DateField.vue_vue_type_style_index_0_lang-10d7dd19.js.br +0 -0
  65. package/dist/Field-a28f1e97.js.br +0 -0
  66. package/dist/NumberField.vue_vue_type_script_setup_true_lang-9edbbae0.js.br +0 -0
  67. package/dist/SelectField.vue_vue_type_style_index_0_lang-88de73f4.cjs +0 -861
  68. package/dist/SelectField.vue_vue_type_style_index_0_lang-fbce2406.js.br +0 -0
  69. package/dist/ThankYou-0b7441d8.js.br +0 -0
  70. package/dist/event-7eca2398.js.br +0 -0
  71. package/dist/store/availability.d.ts +0 -40
  72. package/dist/store/event.d.ts +0 -683
  73. package/dist/store/giftCard.d.ts +0 -80
  74. package/dist/store/hotel.d.ts +0 -815
package/dist/gift-card.js CHANGED
@@ -1,99 +1,104 @@
1
- import { d as ue, u as ce, s as Q, c as ne, r as b, ae as F, e as Y, f as C, j as ee, S as J, h as pe, i as fe, af as me, k as X, D as se, b as ve, m as r, n as x, w as O, A as n, v as m, p as i, q as e, C as D, x as y, y as re, I as ge, _ as de, a1 as he, o as be, F as ae, ag as W, ah as j, T as H, G as k, a2 as ye, a3 as _e, B as ke, a4 as le, M as Ce, N as Ve, U as Fe, a8 as Pe, R as Se, V as we, a9 as Te } from "./SelectField.vue_vue_type_style_index_0_lang-fbce2406.js";
2
- import { a as $e, P as Ue, C as te, _ as Re } from "./CheckoutWindow-046e2e84.js";
3
- import { E as qe } from "./_-5f328ff3.js";
4
- import { F as L } from "./Field-a28f1e97.js";
1
+ import { d as ce, u as pe, s as X, c as Z, r as h, ae as w, e as J, f as C, j as le, S as Q, h as fe, i as me, af as ve, k as ee, D as re, b as ge, m as s, n as x, w as K, A as n, v as m, p as i, q as e, C as D, x as y, y as de, I as he, _ as ue, a1 as ye, o as be, F as te, ag as j, ah as H, a2 as _e, a3 as ke, G as k, B as Ce, a4 as oe, T as O, M as Ve, N as Fe, U as we, a8 as Pe, R as Se, V as Te, a9 as $e } from "./SelectField.vue_vue_type_style_index_0_lang-656991fc.js";
2
+ import { a as Ue, C as ie, P as Re, _ as qe } from "./CheckoutWindow-70c47274.js";
3
+ import { E as Ee } from "./_-0345553a.js";
4
+ import { F as L } from "./Field-44e97149.js";
5
5
  import "./_commonjsHelpers-aeeeeb92.js";
6
- const oe = ue("giftCard", () => {
7
- const { pay: $ } = ce(), { bearerToken: a, metaData: P, currencyId: U } = Q(ne()), s = b(F.InitialState), V = Y("konnectio_name", "", void 0, { serializer: J.string }), p = Y("konnectio_email", "", void 0, { serializer: J.string }), f = Y("konnectio_phone", "", void 0, { serializer: J.string }), R = b(""), I = b(1), _ = b(!0), v = b(""), g = b({
6
+ const ne = ce("giftCard", () => {
7
+ const { pay: $ } = pe(), { bearerToken: a, metaData: P, currencyId: U } = X(Z()), { verifyRecaptcha: b } = Z(), r = h(w.InitialState), c = J("konnectio_name", "", void 0, { serializer: Q.string }), f = J("konnectio_email", "", void 0, { serializer: Q.string }), R = J("konnectio_phone", "", void 0, { serializer: Q.string }), E = h(""), _ = h(1), v = h(!0), V = h(""), l = h({
8
8
  base64: "",
9
9
  type: "",
10
10
  name: ""
11
- }), t = b(void 0), d = b(0), u = b(!1), S = b(0), E = C(() => s.value === F.InitialState || s.value === F.WaitingForResponse), h = C(() => s.value === F.ReadyToPay), M = C(() => s.value === F.PaymentSuccess), B = C(() => {
12
- const c = {
11
+ }), d = h(void 0), u = h(0), F = h(!1), S = h(0), g = C(() => r.value === w.InitialState || r.value === w.WaitingForResponse), M = C(() => r.value === w.ReadyToPay), Y = C(() => r.value === w.PaymentSuccess), B = C(() => {
12
+ const p = {
13
13
  1: {
14
- label: ee.t("giftCard.hotelType"),
14
+ label: le.t("giftCard.hotelType"),
15
15
  data: []
16
16
  },
17
17
  2: {
18
- label: ee.t("giftCard.restaurantType"),
18
+ label: le.t("giftCard.restaurantType"),
19
19
  data: []
20
20
  }
21
- }, w = P.value.places;
22
- return w && w.forEach((T) => {
23
- c[T.placeType].data.push(T);
21
+ }, I = P.value.hotels[0].places;
22
+ return I && I.forEach((T) => {
23
+ p[T.placeType].data.push(T);
24
24
  }), Object.fromEntries(
25
- Object.entries(c).filter(([, T]) => T.data.length > 0)
25
+ Object.entries(p).filter(([, T]) => T.data.length > 0)
26
26
  );
27
27
  }), z = C(() => S.value !== 0), q = C(() => {
28
- let c;
28
+ let p;
29
29
  if (z.value)
30
- c = B.value[S.value].data[0];
31
- else if (d.value !== 0) {
32
- const w = t.value, T = B.value[d.value].data;
33
- T.length === 1 ? c = T[0] : w !== void 0 && T.forEach((Z) => {
34
- String(Z.id) === String(w) && (c = Z);
30
+ p = B.value[S.value].data[0];
31
+ else if (u.value !== 0) {
32
+ const I = d.value, T = B.value[u.value].data;
33
+ T.length === 1 ? p = T[0] : I !== void 0 && T.forEach((ae) => {
34
+ String(ae.id) === String(I) && (p = ae);
35
35
  });
36
36
  }
37
- return c;
38
- }), K = C(() => !(!V.value || !p.value || !(f.value.length >= 5) || !R.value || q.value === void 0)), N = C(() => !(s.value === F.InitialState && u.value)), G = C(() => !!(s.value === F.WaitingForResponse && u.value));
39
- async function o() {
40
- s.value = F.WaitingForResponse, u.value = !0, await pe.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
41
- termsOfserviceURL: "https://freshbooking.dk",
42
- checkoutUrl: "https://freshbooking.dk",
43
- currencyID: U.value,
44
- language: fe(),
45
- amount: R.value,
46
- quantity: I.value,
47
- freeText: v.value,
48
- showPrice: _.value,
49
- contactName: V.value,
50
- contactEmail: p.value,
51
- contactPhone: f.value,
52
- imageBase64: me(g.value.base64),
53
- imageName: g.value.name,
54
- imageFormat: g.value.type,
55
- placeType: q.value ? q.value.placeType : void 0,
56
- placeID: q.value ? q.value.id : void 0
57
- }, {
58
- headers: {
59
- Authorization: a.value,
60
- Accept: "application/json",
61
- "Fresh-Booking-Ver": "4.0.43"
37
+ return p;
38
+ }), N = C(() => !(!c.value || !f.value || !(R.value.length >= 5) || !E.value || q.value === void 0)), G = C(() => !(r.value === w.InitialState && F.value)), o = C(() => !!(r.value === w.WaitingForResponse && F.value));
39
+ async function t() {
40
+ r.value = w.WaitingForResponse, F.value = !0, b({
41
+ type: "create_gift_card",
42
+ callback: async () => {
43
+ await fe.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
44
+ termsOfserviceURL: window.location.origin,
45
+ checkoutUrl: window.location.origin,
46
+ currencyID: U.value,
47
+ language: me(),
48
+ amount: E.value,
49
+ quantity: _.value,
50
+ freeText: V.value,
51
+ showPrice: v.value,
52
+ contactName: c.value,
53
+ contactEmail: f.value,
54
+ contactPhone: R.value,
55
+ imageBase64: ve(l.value.base64),
56
+ imageName: l.value.name,
57
+ imageFormat: l.value.type,
58
+ placeType: q.value ? q.value.placeType : void 0,
59
+ placeID: q.value ? q.value.id : void 0
60
+ }, {
61
+ headers: {
62
+ Authorization: a.value,
63
+ Accept: "application/json",
64
+ "Fresh-Booking-Ver": "4.0.45"
65
+ }
66
+ }).then((p) => {
67
+ r.value = w.ReadyToPay, F.value = !1, $({
68
+ callback: () => console.log("Callback!"),
69
+ response: p.data
70
+ });
71
+ });
62
72
  }
63
- }).then((c) => {
64
- s.value = F.ReadyToPay, u.value = !1, $({
65
- callback: () => console.log("Callback!"),
66
- response: c.data
67
- });
68
73
  });
69
74
  }
70
- function l(c) {
71
- c && (S.value = c);
75
+ function W(p) {
76
+ p && (S.value = p);
72
77
  }
73
78
  return {
74
- moduleState: s,
75
- name: V,
76
- email: p,
77
- phone: f,
78
- value: R,
79
- remark: v,
80
- showValue: _,
81
- quantity: I,
82
- media: g,
83
- placeId: t,
84
- placeType: d,
85
- showFormPage: E,
86
- showPaymentPage: h,
87
- showConfirmationPage: M,
79
+ moduleState: r,
80
+ name: c,
81
+ email: f,
82
+ phone: R,
83
+ value: E,
84
+ remark: V,
85
+ showValue: v,
86
+ quantity: _,
87
+ media: l,
88
+ placeId: d,
89
+ placeType: u,
90
+ showFormPage: g,
91
+ showPaymentPage: M,
92
+ showConfirmationPage: Y,
88
93
  places: B,
89
- hasFilledForm: K,
94
+ hasFilledForm: N,
90
95
  hasForcedPlaceType: z,
91
- isWaitingForResponse: G,
92
- isMetaDataAvailable: N,
93
- orderGiftCard: o,
94
- initialize: l
96
+ isWaitingForResponse: o,
97
+ isMetaDataAvailable: G,
98
+ orderGiftCard: t,
99
+ initialize: W
95
100
  };
96
- }), Ee = { class: "media-selector" }, Ge = ["accept"], Ie = { class: "media-selector-wrapper" }, Me = { class: "media-selector-tools" }, Be = { key: 0 }, Le = { key: 1 }, xe = { key: 2 }, De = ["src"], Ae = /* @__PURE__ */ X({
101
+ }), Ge = { class: "media-selector" }, Ie = ["accept"], Me = { class: "media-selector-wrapper" }, Be = { class: "media-selector-tools" }, Le = { key: 0 }, xe = { key: 1 }, De = { key: 2 }, Ae = ["src"], ze = /* @__PURE__ */ ee({
97
102
  __name: "MediaSelector",
98
103
  props: {
99
104
  modelValue: {},
@@ -104,93 +109,93 @@ const oe = ue("giftCard", () => {
104
109
  },
105
110
  emits: ["update:modelValue"],
106
111
  setup($, { emit: a }) {
107
- const P = a, U = $, { t: s } = se(), { display: V } = ve(), p = b(), f = C(() => U.modelValue.base64 !== "");
108
- function R(t) {
109
- P("update:modelValue", t);
112
+ const P = a, U = $, { t: b } = re(), { display: r } = ge(), c = h(), f = C(() => U.modelValue.base64 !== "");
113
+ function R(l) {
114
+ P("update:modelValue", l);
110
115
  }
111
- function I() {
116
+ function E() {
112
117
  R({
113
118
  base64: "",
114
119
  name: "",
115
120
  type: ""
116
- }), p.value && (p.value.value = "");
121
+ }), c.value && (c.value.value = "");
117
122
  }
118
123
  function _() {
119
- p.value && p.value.click();
124
+ c.value && c.value.click();
120
125
  }
121
- function v(t, d) {
122
- const [u, S] = [t.name, t.type], E = new FileReader();
123
- E.onload = function(h) {
124
- if (h.target) {
125
- const M = h.target.result;
126
- d({ base64: M, name: u, type: S });
126
+ function v(l, d) {
127
+ const [u, F] = [l.name, l.type], S = new FileReader();
128
+ S.onload = function(g) {
129
+ if (g.target) {
130
+ const M = g.target.result;
131
+ d({ base64: M, name: u, type: F });
127
132
  } else
128
- V({
129
- message: s("imageUploadError"),
133
+ r({
134
+ message: b("imageUploadError"),
130
135
  type: "error"
131
136
  });
132
- }, E.readAsDataURL(t);
137
+ }, S.readAsDataURL(l);
133
138
  }
134
- async function g() {
135
- let t;
136
- (t = p.value.files) instanceof FileList && v(t[0], R);
139
+ async function V() {
140
+ let l;
141
+ (l = c.value.files) instanceof FileList && v(l[0], R);
137
142
  }
138
- return (t, d) => (r(), x(ge, {
139
- label: t.label,
140
- required: t.required,
143
+ return (l, d) => (s(), x(he, {
144
+ label: l.label,
145
+ required: l.required,
141
146
  type: "media"
142
147
  }, {
143
- default: O(() => [
144
- n("div", Ee, [
148
+ default: K(() => [
149
+ n("div", Ge, [
145
150
  n("input", {
146
151
  ref_key: "fileInput",
147
- ref: p,
152
+ ref: c,
148
153
  type: "file",
149
154
  class: "hidden",
150
- accept: t.validation,
155
+ accept: l.validation,
151
156
  single: "",
152
- onChange: d[0] || (d[0] = (u) => g())
153
- }, null, 40, Ge),
154
- n("div", Ie, [
155
- n("ul", Me, [
156
- f.value ? y("", !0) : (r(), m("li", Be, [
157
+ onChange: d[0] || (d[0] = (u) => V())
158
+ }, null, 40, Ie),
159
+ n("div", Me, [
160
+ n("ul", Be, [
161
+ f.value ? y("", !0) : (s(), m("li", Le, [
157
162
  i(D, {
158
- label: e(s)("uploadFile"),
163
+ label: e(b)("uploadFile"),
159
164
  type: "button",
160
165
  icon: "upload",
161
- "icon-color": t.iconColor,
166
+ "icon-color": l.iconColor,
162
167
  onClickEvent: d[1] || (d[1] = (u) => _())
163
168
  }, null, 8, ["label", "icon-color"])
164
169
  ])),
165
- f.value ? (r(), m("li", Le, [
170
+ f.value ? (s(), m("li", xe, [
166
171
  i(D, {
167
- label: e(s)("replaceFile"),
172
+ label: e(b)("replaceFile"),
168
173
  type: "button",
169
174
  icon: "repeat-alt",
170
- "icon-color": t.iconColor,
175
+ "icon-color": l.iconColor,
171
176
  onClickEvent: d[2] || (d[2] = (u) => _())
172
177
  }, null, 8, ["label", "icon-color"])
173
178
  ])) : y("", !0),
174
- f.value ? (r(), m("li", xe, [
179
+ f.value ? (s(), m("li", De, [
175
180
  i(D, {
176
- label: e(s)("removeFile"),
181
+ label: e(b)("removeFile"),
177
182
  type: "button",
178
183
  icon: "trash-alt",
179
- "icon-color": t.iconColor,
180
- onClickEvent: d[3] || (d[3] = (u) => I())
184
+ "icon-color": l.iconColor,
185
+ onClickEvent: d[3] || (d[3] = (u) => E())
181
186
  }, null, 8, ["label", "icon-color"])
182
187
  ])) : y("", !0)
183
188
  ]),
184
189
  n("div", {
185
- class: re([
190
+ class: de([
186
191
  "media-selector-previewer",
187
192
  { opened: f.value }
188
193
  ])
189
194
  }, [
190
- t.modelValue ? (r(), m("img", {
195
+ l.modelValue ? (s(), m("img", {
191
196
  key: 0,
192
- src: t.modelValue.base64
193
- }, null, 8, De)) : y("", !0)
197
+ src: l.modelValue.base64
198
+ }, null, 8, Ae)) : y("", !0)
194
199
  ], 2)
195
200
  ])
196
201
  ])
@@ -199,7 +204,7 @@ const oe = ue("giftCard", () => {
199
204
  }, 8, ["label", "required"]));
200
205
  }
201
206
  });
202
- function ie($) {
207
+ function se($) {
203
208
  const a = $;
204
209
  a.__i18n = a.__i18n || [], a.__i18n.push({
205
210
  locale: "",
@@ -219,40 +224,40 @@ function ie($) {
219
224
  }
220
225
  });
221
226
  }
222
- typeof ie == "function" && ie(Ae);
223
- const ze = { class: "gift-card-skeleton" }, Ne = { class: "gift-card-skeleton-form" }, We = /* @__PURE__ */ X({
227
+ typeof se == "function" && se(ze);
228
+ const Ne = { class: "gift-card-skeleton" }, We = { class: "gift-card-skeleton-form" }, je = /* @__PURE__ */ ee({
224
229
  __name: "GiftCardSkeleton",
225
230
  setup($) {
226
- return (a, P) => (r(), m("div", ze, [
227
- n("div", Ne, [
231
+ return (a, P) => (s(), m("div", Ne, [
232
+ n("div", We, [
228
233
  i(L),
229
234
  i(L),
230
235
  i(L),
231
236
  i(L),
232
237
  i(L, { "is-text-area": "" }),
233
- i(qe, { height: "44px" })
238
+ i(Ee, { height: "44px" })
234
239
  ])
235
240
  ]));
236
241
  }
237
242
  });
238
- const je = /* @__PURE__ */ de(We, [["__scopeId", "data-v-2600a731"]]), He = {
243
+ const He = /* @__PURE__ */ ue(je, [["__scopeId", "data-v-2600a731"]]), Oe = {
239
244
  key: 0,
240
245
  id: "fresh-booking-gift-card-wrapper"
241
- }, Oe = { id: "fresh-booking-gift-card-title" }, Ke = { id: "fresh-booking-gift-card-content" }, Ye = { id: "fresh-booking-gift-card-payment" }, Je = ["innerHTML"], Qe = { key: 0 }, Xe = {
246
+ }, Ke = { id: "fresh-booking-gift-card-title" }, Ye = { id: "fresh-booking-gift-card-content" }, Je = { id: "fresh-booking-gift-card-payment" }, Qe = ["innerHTML"], Xe = { key: 0 }, Ze = {
242
247
  key: 0,
243
248
  id: "fresh-booking-select-place-type"
244
- }, Ze = {
245
- class: /* @__PURE__ */ re(["fresh-booking-label", "required"])
246
- }, ea = { id: "fresh-booking-select-place-type-input" }, aa = ["innerHTML"], la = {
249
+ }, ea = {
250
+ class: /* @__PURE__ */ de(["fresh-booking-label", "required"])
251
+ }, aa = { id: "fresh-booking-select-place-type-input" }, la = ["innerHTML"], ta = {
247
252
  key: 0,
248
253
  id: "fresh-booking-gift-card-order"
249
- }, ta = { class: "fresh-booking-panel" }, oa = {
254
+ }, oa = { class: "fresh-booking-panel" }, ia = {
250
255
  key: 1,
251
256
  id: "fresh-booking-gift-card-remarks"
252
- }, ia = {
257
+ }, na = {
253
258
  key: 2,
254
259
  id: "fresh-booking-gift-card-order-minimal"
255
- }, na = { id: "fresh-booking-gift-card-recaptcha" }, sa = /* @__PURE__ */ X({
260
+ }, sa = { id: "fresh-booking-gift-card-recaptcha" }, ra = /* @__PURE__ */ ee({
256
261
  name: "GiftCardLayout",
257
262
  __name: "GiftCard",
258
263
  props: {
@@ -262,62 +267,93 @@ const je = /* @__PURE__ */ de(We, [["__scopeId", "data-v-2600a731"]]), He = {
262
267
  styling: {}
263
268
  },
264
269
  setup($) {
265
- const { t: a } = se(), {
270
+ const { t: a } = re(), {
266
271
  name: P,
267
272
  email: U,
268
- phone: s,
269
- value: V,
270
- remark: p,
273
+ phone: b,
274
+ value: r,
275
+ remark: c,
271
276
  showValue: f,
272
277
  quantity: R,
273
- media: I,
278
+ media: E,
274
279
  placeId: _,
275
280
  placeType: v,
276
- showFormPage: g,
277
- showPaymentPage: t,
281
+ showFormPage: V,
282
+ showPaymentPage: l,
278
283
  showConfirmationPage: d,
279
284
  places: u,
280
- hasFilledForm: S,
281
- hasForcedPlaceType: E,
282
- isWaitingForResponse: h,
285
+ hasFilledForm: F,
286
+ hasForcedPlaceType: S,
287
+ isWaitingForResponse: g,
283
288
  isMetaDataAvailable: M
284
- } = Q(oe()), { initialize: B, orderGiftCard: z } = oe(), { isRecaptchaEnabled: q, currency: K } = Q(ne());
289
+ } = X(ne()), { initialize: Y, orderGiftCard: B } = ne(), { isRecaptchaEnabled: z, currency: q } = X(Z());
285
290
  async function N() {
286
- await z();
291
+ await B();
287
292
  }
288
- return he(v, () => {
293
+ return ye(v, () => {
289
294
  _.value = void 0;
290
295
  }), be(() => {
291
- B();
292
- }), (G, o) => (r(), x(Ve, null, {
293
- default: O(() => [
294
- i(Ce, {
296
+ Y();
297
+ }), (G, o) => (s(), x(Fe, null, {
298
+ default: K(() => [
299
+ i(Ve, {
295
300
  id: "fresh-booking-gift-card-module",
296
301
  type: "gift-card",
297
302
  "access-token": G.accessToken,
298
303
  "data-layout": G.layout,
299
304
  styling: G.styling
300
305
  }, {
301
- default: O(() => [
302
- e(M) ? (r(), m("div", He, [
303
- n("h4", Oe, [
304
- n("span", null, ae(e(a)("giftCard.title")), 1)
306
+ default: K(() => [
307
+ e(M) ? (s(), m("div", Oe, [
308
+ n("h2", Ke, [
309
+ n("span", null, te(e(a)("giftCard.title")), 1)
305
310
  ]),
306
- n("div", Ke, [
307
- W(n("div", Ye, [
308
- i($e)
311
+ n("div", Ye, [
312
+ j(n("div", Je, [
313
+ i(Ue)
309
314
  ], 512), [
310
- [j, e(t)]
315
+ [H, e(l)]
311
316
  ]),
312
- W(n("div", null, [
317
+ j(n("div", null, [
313
318
  n("p", {
314
319
  id: "fresh-booking-gift-card-description",
315
320
  innerHTML: e(a)("giftCard.description")
316
- }, null, 8, Je),
321
+ }, null, 8, Qe),
317
322
  n("form", null, [
318
- i(H, {
323
+ e(S) ? y("", !0) : (s(), m("div", Xe, [
324
+ e(u) ? (s(), m("div", Ze, [
325
+ n("label", ea, [
326
+ n("span", null, te(e(a)("giftCard.selectType")), 1)
327
+ ]),
328
+ n("div", aa, [
329
+ n("ul", null, [
330
+ (s(!0), m(_e, null, ke(e(u), (t, W) => (s(), m("li", { key: W }, [
331
+ i(ie, {
332
+ modelValue: e(v),
333
+ "onUpdate:modelValue": o[0] || (o[0] = (p) => k(v) ? v.value = p : null),
334
+ type: "radio",
335
+ name: "placeType",
336
+ val: W,
337
+ label: t.label
338
+ }, null, 8, ["modelValue", "val", "label"])
339
+ ]))), 128))
340
+ ]),
341
+ e(u)[e(v)] && e(u)[e(v)].data.length > 1 ? (s(), x(Ce, {
342
+ key: 0,
343
+ modelValue: e(_),
344
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => k(_) ? _.value = t : null),
345
+ placeholder: e(a)("giftCard.selectPlacePlaceholder"),
346
+ options: e(u)[e(v)].data,
347
+ labelKey: "name",
348
+ valueKey: "id",
349
+ required: ""
350
+ }, null, 8, ["modelValue", "placeholder", "options"])) : y("", !0)
351
+ ])
352
+ ])) : (s(), x(oe, { key: 1 }))
353
+ ])),
354
+ i(O, {
319
355
  modelValue: e(P),
320
- "onUpdate:modelValue": o[0] || (o[0] = (l) => k(P) ? P.value = l : null),
356
+ "onUpdate:modelValue": o[2] || (o[2] = (t) => k(P) ? P.value = t : null),
321
357
  type: "text",
322
358
  name: "name",
323
359
  autocomplete: "name",
@@ -326,9 +362,9 @@ const je = /* @__PURE__ */ de(We, [["__scopeId", "data-v-2600a731"]]), He = {
326
362
  placeholder: e(a)("giftCard.namePlaceholder"),
327
363
  required: ""
328
364
  }, null, 8, ["modelValue", "label", "placeholder"]),
329
- i(H, {
365
+ i(O, {
330
366
  modelValue: e(U),
331
- "onUpdate:modelValue": o[1] || (o[1] = (l) => k(U) ? U.value = l : null),
367
+ "onUpdate:modelValue": o[3] || (o[3] = (t) => k(U) ? U.value = t : null),
332
368
  type: "email",
333
369
  name: "email",
334
370
  autocomplete: "email",
@@ -337,59 +373,28 @@ const je = /* @__PURE__ */ de(We, [["__scopeId", "data-v-2600a731"]]), He = {
337
373
  placeholder: e(a)("giftCard.emailPlaceholder"),
338
374
  required: ""
339
375
  }, null, 8, ["modelValue", "label", "placeholder"]),
340
- i(Ue, {
341
- modelValue: e(s),
342
- "onUpdate:modelValue": o[2] || (o[2] = (l) => k(s) ? s.value = l : null),
376
+ i(Re, {
377
+ modelValue: e(b),
378
+ "onUpdate:modelValue": o[4] || (o[4] = (t) => k(b) ? b.value = t : null),
343
379
  icon: "phone-office",
344
380
  label: e(a)("giftCard.phone"),
345
381
  placeholder: e(a)("giftCard.phonePlaceholder"),
346
382
  required: ""
347
383
  }, null, 8, ["modelValue", "label", "placeholder"]),
348
- e(E) ? y("", !0) : (r(), m("div", Qe, [
349
- e(u) ? (r(), m("div", Xe, [
350
- n("label", Ze, [
351
- n("span", null, ae(e(a)("giftCard.selectType")), 1)
352
- ]),
353
- n("div", ea, [
354
- n("ul", null, [
355
- (r(!0), m(ye, null, _e(e(u), (l, c) => (r(), m("li", { key: c }, [
356
- i(te, {
357
- modelValue: e(v),
358
- "onUpdate:modelValue": o[3] || (o[3] = (w) => k(v) ? v.value = w : null),
359
- type: "radio",
360
- name: "placeType",
361
- val: c,
362
- label: l.label
363
- }, null, 8, ["modelValue", "val", "label"])
364
- ]))), 128))
365
- ]),
366
- e(u)[e(v)] && e(u)[e(v)].data.length > 1 ? (r(), x(ke, {
367
- key: 0,
368
- modelValue: e(_),
369
- "onUpdate:modelValue": o[4] || (o[4] = (l) => k(_) ? _.value = l : null),
370
- placeholder: e(a)("giftCard.selectPlacePlaceholder"),
371
- options: e(u)[e(v)].data,
372
- labelKey: "name",
373
- valueKey: "id",
374
- required: ""
375
- }, null, 8, ["modelValue", "placeholder", "options"])) : y("", !0)
376
- ])
377
- ])) : (r(), x(le, { key: 1 }))
378
- ])),
379
- i(H, {
380
- modelValue: e(V),
381
- "onUpdate:modelValue": o[5] || (o[5] = (l) => k(V) ? V.value = l : null),
384
+ i(O, {
385
+ modelValue: e(r),
386
+ "onUpdate:modelValue": o[5] || (o[5] = (t) => k(r) ? r.value = t : null),
382
387
  type: "number",
383
388
  name: "value",
384
389
  label: e(a)("giftCard.value"),
385
390
  icon: "money-bill",
386
391
  placeholder: e(a)("giftCard.valuePlaceholder"),
387
- suffix: e(K),
392
+ suffix: e(q),
388
393
  required: ""
389
394
  }, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
390
- i(te, {
395
+ i(ie, {
391
396
  modelValue: e(f),
392
- "onUpdate:modelValue": o[6] || (o[6] = (l) => k(f) ? f.value = l : null),
397
+ "onUpdate:modelValue": o[6] || (o[6] = (t) => k(f) ? f.value = t : null),
393
398
  type: "checkbox",
394
399
  name: "showValue",
395
400
  label: e(a)("giftCard.showValue"),
@@ -399,32 +404,32 @@ const je = /* @__PURE__ */ de(We, [["__scopeId", "data-v-2600a731"]]), He = {
399
404
  y("", !0)
400
405
  ])
401
406
  ], 512), [
402
- [j, e(g)]
407
+ [H, e(V)]
403
408
  ]),
404
- W(n("div", null, [
409
+ j(n("div", null, [
405
410
  n("div", {
406
411
  innerHTML: e(a)("giftCard.thankYou")
407
- }, null, 8, aa)
412
+ }, null, 8, la)
408
413
  ], 512), [
409
- [j, e(d)]
414
+ [H, e(d)]
410
415
  ])
411
416
  ]),
412
- G.layout !== "minimal" && e(g) ? (r(), m("div", la, [
413
- n("div", ta, [
417
+ G.layout !== "minimal" && e(V) ? (s(), m("div", ta, [
418
+ n("div", oa, [
414
419
  i(D, {
415
420
  label: e(a)("giftCard.orderGiftCard"),
416
421
  "full-width": !0,
417
- disabled: !e(S),
418
- "is-loading": e(h),
419
- "onUpdate:isLoading": o[9] || (o[9] = (l) => k(h) ? h.value = l : null),
422
+ disabled: !e(F),
423
+ "is-loading": e(g),
424
+ "onUpdate:isLoading": o[9] || (o[9] = (t) => k(g) ? g.value = t : null),
420
425
  onClickEvent: N
421
426
  }, null, 8, ["label", "disabled", "is-loading"])
422
427
  ])
423
428
  ])) : y("", !0),
424
- e(g) ? (r(), m("div", oa, [
425
- i(H, {
426
- modelValue: e(p),
427
- "onUpdate:modelValue": o[10] || (o[10] = (l) => k(p) ? p.value = l : null),
429
+ e(V) ? (s(), m("div", ia, [
430
+ i(O, {
431
+ modelValue: e(c),
432
+ "onUpdate:modelValue": o[10] || (o[10] = (t) => k(c) ? c.value = t : null),
428
433
  type: "textarea",
429
434
  name: "remark",
430
435
  label: e(a)("giftCard.remark"),
@@ -432,37 +437,37 @@ const je = /* @__PURE__ */ de(We, [["__scopeId", "data-v-2600a731"]]), He = {
432
437
  placeholder: e(a)("giftCard.remarkPlaceholder")
433
438
  }, null, 8, ["modelValue", "label", "placeholder"])
434
439
  ])) : y("", !0),
435
- e(g) ? (r(), m("div", ia, [
440
+ e(V) ? (s(), m("div", na, [
436
441
  i(D, {
437
442
  label: e(a)("giftCard.orderGiftCard"),
438
443
  "full-width": !0,
439
- disabled: !e(S),
444
+ disabled: !e(F),
440
445
  "data-test": "orderGiftCard",
441
- "is-loading": e(h),
442
- "onUpdate:isLoading": o[11] || (o[11] = (l) => k(h) ? h.value = l : null),
446
+ "is-loading": e(g),
447
+ "onUpdate:isLoading": o[11] || (o[11] = (t) => k(g) ? g.value = t : null),
443
448
  onClickEvent: N
444
449
  }, null, 8, ["label", "disabled", "is-loading"]),
445
- W(n("div", na, [
446
- i(Re)
450
+ j(n("div", sa, [
451
+ i(qe)
447
452
  ], 512), [
448
- [j, e(q)]
453
+ [H, e(z)]
449
454
  ])
450
455
  ])) : y("", !0)
451
- ])) : (r(), x(le, { key: 1 }))
456
+ ])) : (s(), x(oe, { key: 1 }))
452
457
  ]),
453
458
  _: 1
454
459
  }, 8, ["access-token", "data-layout", "styling"])
455
460
  ]),
456
- fallback: O(() => [
457
- i(je)
461
+ fallback: K(() => [
462
+ i(He)
458
463
  ]),
459
464
  _: 1
460
465
  }));
461
466
  }
462
467
  });
463
- const ra = /* @__PURE__ */ de(sa, [["__scopeId", "data-v-d95c25af"]]), da = Fe(), ua = Pe(), A = Se({ components: { GiftCard: ra } });
464
- A.use(da);
465
- A.use(we);
468
+ const da = /* @__PURE__ */ ue(ra, [["__scopeId", "data-v-5019ef21"]]), ua = we(), ca = Pe(), A = Se({ components: { GiftCard: da } });
466
469
  A.use(ua);
467
- A.use(Te, { bootstrap: !0 });
470
+ A.use(Te);
471
+ A.use(ca);
472
+ A.use($e, { bootstrap: !0 });
468
473
  A.mount("#konnectio-gift-card-app");