@konnectio/core 4.0.41 → 4.0.43

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