@konnectio/core 4.0.45 → 4.0.47

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