@konnectio/core 4.0.44 → 4.0.46

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 (82) hide show
  1. package/dist/{ActionField-1d9dab85.cjs → ActionField-b883fc4c.cjs} +1 -1
  2. package/dist/{ActionField-577de6a8.js → ActionField-bab5237c.js} +2 -2
  3. package/dist/ActionField-bab5237c.js.br +0 -0
  4. package/dist/{AvailabilitySkeleton-84be4494.js → AvailabilitySkeleton-7febb473.js} +15 -15
  5. package/dist/AvailabilitySkeleton-7febb473.js.br +0 -0
  6. package/dist/{AvailabilitySkeleton-b3a8cea6.cjs → AvailabilitySkeleton-a5784bd2.cjs} +1 -1
  7. package/dist/{CheckoutWindow-8f863674.js → CheckoutWindow-7c0d94ac.js} +10 -10
  8. package/dist/CheckoutWindow-7c0d94ac.js.br +0 -0
  9. package/dist/{CheckoutWindow-d600d196.cjs → CheckoutWindow-7db5f05c.cjs} +1 -1
  10. package/dist/Container-7fbc2a99.cjs +1 -0
  11. package/dist/Container-b16559ce.js +59 -0
  12. package/dist/Container-b16559ce.js.br +0 -0
  13. package/dist/{DateField.vue_vue_type_style_index_0_lang-5af1c253.cjs → DateField.vue_vue_type_style_index_0_lang-bbdf3590.cjs} +1 -1
  14. package/dist/{DateField.vue_vue_type_style_index_0_lang-769d61b5.js → DateField.vue_vue_type_style_index_0_lang-d9877da2.js} +593 -593
  15. package/dist/DateField.vue_vue_type_style_index_0_lang-d9877da2.js.br +0 -0
  16. package/dist/{Field-44da50f3.js → Field-15886b67.js} +2 -2
  17. package/dist/Field-15886b67.js.br +0 -0
  18. package/dist/{Field-c8766174.cjs → Field-37af659e.cjs} +1 -1
  19. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-84454fdf.js → NumberField.vue_vue_type_script_setup_true_lang-41b14077.js} +1 -1
  20. package/dist/NumberField.vue_vue_type_script_setup_true_lang-41b14077.js.br +0 -0
  21. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-5fa3355c.cjs → NumberField.vue_vue_type_script_setup_true_lang-ce6a2c1f.cjs} +1 -1
  22. package/dist/SelectField.vue_vue_type_style_index_0_lang-56f30f3f.cjs +856 -0
  23. package/dist/SelectField.vue_vue_type_style_index_0_lang-64d83bbf.js +30283 -0
  24. package/dist/SelectField.vue_vue_type_style_index_0_lang-64d83bbf.js.br +0 -0
  25. package/dist/{ThankYou-ae7ac742.js → ThankYou-816a119f.js} +759 -757
  26. package/dist/ThankYou-816a119f.js.br +0 -0
  27. package/dist/{ThankYou-53d13bb8.cjs → ThankYou-d7fc0e28.cjs} +7 -7
  28. package/dist/{_-74a1be42.cjs → _-4dd7b3ec.cjs} +1 -1
  29. package/dist/{_-bf149468.js → _-de5d9a78.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/side-panels/Base.vue.d.ts +1 -1
  39. package/dist/components/skeletons/GiftCardSkeleton.vue.d.ts +1 -1
  40. package/dist/{event-32004bb3.js → event-b0ba109e.js} +7 -7
  41. package/dist/event-b0ba109e.js.br +0 -0
  42. package/dist/{event-46702541.cjs → event-c192d5b2.cjs} +1 -1
  43. package/dist/event.cjs +1 -1
  44. package/dist/event.js +116 -117
  45. package/dist/event.js.br +0 -0
  46. package/dist/gift-card-validation.cjs +1 -1
  47. package/dist/gift-card-validation.js +97 -92
  48. package/dist/gift-card-validation.js.br +0 -0
  49. package/dist/gift-card.cjs +1 -1
  50. package/dist/gift-card.js +358 -346
  51. package/dist/gift-card.js.br +0 -0
  52. package/dist/hotel.cjs +8 -8
  53. package/dist/hotel.js +1588 -1718
  54. package/dist/hotel.js.br +0 -0
  55. package/dist/layouts/Availability.vue.d.ts +2 -2
  56. package/dist/layouts/GiftCard.vue.d.ts +1 -1
  57. package/dist/layouts/GiftCardValidation.vue.d.ts +2 -2
  58. package/dist/layouts/Hotel.vue.d.ts +1 -1
  59. package/dist/layouts/_.vue.d.ts +1 -3
  60. package/dist/polyfill.cjs +1 -1
  61. package/dist/polyfill.js +1 -1
  62. package/dist/polyfill.js.br +0 -0
  63. package/dist/store/utilities.d.ts +92 -87
  64. package/dist/style.css +1 -1
  65. package/dist/style.css.br +0 -0
  66. package/dist/types/index.d.ts +42 -37
  67. package/package.json +3 -4
  68. package/dist/ActionField-577de6a8.js.br +0 -0
  69. package/dist/AvailabilitySkeleton-84be4494.js.br +0 -0
  70. package/dist/CheckoutWindow-8f863674.js.br +0 -0
  71. package/dist/DateField.vue_vue_type_style_index_0_lang-769d61b5.js.br +0 -0
  72. package/dist/Field-44da50f3.js.br +0 -0
  73. package/dist/NumberField.vue_vue_type_script_setup_true_lang-84454fdf.js.br +0 -0
  74. package/dist/SelectField.vue_vue_type_style_index_0_lang-1ff1cdee.js +0 -32113
  75. package/dist/SelectField.vue_vue_type_style_index_0_lang-1ff1cdee.js.br +0 -0
  76. package/dist/SelectField.vue_vue_type_style_index_0_lang-5d251c37.cjs +0 -865
  77. package/dist/ThankYou-ae7ac742.js.br +0 -0
  78. package/dist/components/modals/Base.vue.d.ts +0 -5
  79. package/dist/components/modals/Base.vue.d.ts.map +0 -1
  80. package/dist/components/modals/Info.vue.d.ts +0 -5
  81. package/dist/components/modals/Info.vue.d.ts.map +0 -1
  82. package/dist/event-32004bb3.js.br +0 -0
package/dist/gift-card.js CHANGED
@@ -1,99 +1,105 @@
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-1ff1cdee.js";
2
- import { a as $e, P as Ue, C as te, _ as Re } from "./CheckoutWindow-8f863674.js";
3
- import { E as qe } from "./_-bf149468.js";
4
- import { F as L } from "./Field-44da50f3.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-64d83bbf.js";
2
+ import { C as $e } from "./Container-b16559ce.js";
3
+ import { a as Ue, C as ne, P as Re, _ as qe } from "./CheckoutWindow-7c0d94ac.js";
4
+ import { E as Ee } from "./_-de5d9a78.js";
5
+ import { F as L } from "./Field-15886b67.js";
5
6
  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({
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
- }), 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 = {
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
- label: ee.t("giftCard.hotelType"),
15
+ label: le.t("giftCard.hotelType"),
15
16
  data: []
16
17
  },
17
18
  2: {
18
- label: ee.t("giftCard.restaurantType"),
19
+ label: le.t("giftCard.restaurantType"),
19
20
  data: []
20
21
  }
21
- }, w = P.value.places;
22
- return w && w.forEach((T) => {
23
- c[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(c).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 c;
28
+ }), z = g(() => m.value !== 0), R = g(() => {
29
+ let a;
29
30
  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);
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 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.44"
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, _({
42
+ type: "create_gift_card",
43
+ callback: async () => {
44
+ await me.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
45
+ termsOfserviceURL: window.location.origin,
46
+ checkoutUrl: window.location.origin,
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,
56
+ imageBase64: ve(l.value.base64),
57
+ imageName: l.value.name,
58
+ imageFormat: l.value.type,
59
+ placeType: R.value ? R.value.placeType : void 0,
60
+ placeID: R.value ? R.value.id : void 0
61
+ }, {
62
+ headers: {
63
+ Authorization: b.value,
64
+ Accept: "application/json",
65
+ "Fresh-Booking-Ver": "4.0.46"
66
+ }
67
+ }).then((a) => {
68
+ d.value = P.ReadyToPay, T.value = !1, S({
69
+ callback: () => console.log("Callback!"),
70
+ response: a.data
71
+ });
72
+ });
62
73
  }
63
- }).then((c) => {
64
- s.value = F.ReadyToPay, u.value = !1, $({
65
- callback: () => console.log("Callback!"),
66
- response: c.data
67
- });
68
74
  });
69
75
  }
70
- function l(c) {
71
- c && (S.value = c);
76
+ function o(a) {
77
+ a && (m.value = a);
72
78
  }
73
79
  return {
74
- moduleState: s,
75
- name: V,
80
+ moduleState: d,
81
+ name: u,
76
82
  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,
88
- places: B,
83
+ phone: h,
84
+ value: k,
85
+ remark: F,
86
+ showValue: I,
87
+ quantity: E,
88
+ media: l,
89
+ placeId: r,
90
+ placeType: f,
91
+ showFormPage: U,
92
+ showPaymentPage: M,
93
+ showConfirmationPage: $,
94
+ places: x,
89
95
  hasFilledForm: K,
90
96
  hasForcedPlaceType: z,
91
- isWaitingForResponse: G,
92
- isMetaDataAvailable: N,
93
- orderGiftCard: o,
94
- initialize: l
97
+ isWaitingForResponse: W,
98
+ isMetaDataAvailable: J,
99
+ orderGiftCard: B,
100
+ initialize: o
95
101
  };
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({
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({
97
103
  __name: "MediaSelector",
98
104
  props: {
99
105
  modelValue: {},
@@ -103,93 +109,93 @@ const oe = ue("giftCard", () => {
103
109
  required: { type: Boolean, default: !1 }
104
110
  },
105
111
  emits: ["update:modelValue"],
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);
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);
110
116
  }
111
- function I() {
112
- R({
117
+ function k() {
118
+ h({
113
119
  base64: "",
114
120
  name: "",
115
121
  type: ""
116
- }), p.value && (p.value.value = "");
122
+ }), u.value && (u.value.value = "");
117
123
  }
118
- function _() {
119
- p.value && p.value.click();
124
+ function E() {
125
+ u.value && u.value.click();
120
126
  }
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
+ 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 });
127
133
  } else
128
- V({
129
- message: s("imageUploadError"),
134
+ d({
135
+ message: _("imageUploadError"),
130
136
  type: "error"
131
137
  });
132
- }, E.readAsDataURL(t);
138
+ }, m.readAsDataURL(l);
133
139
  }
134
- async function g() {
135
- let t;
136
- (t = p.value.files) instanceof FileList && v(t[0], R);
140
+ async function F() {
141
+ let l;
142
+ (l = u.value.files) instanceof FileList && I(l[0], h);
137
143
  }
138
- return (t, d) => (r(), x(ge, {
139
- label: t.label,
140
- required: t.required,
144
+ return (l, r) => (s(), G(ye, {
145
+ label: l.label,
146
+ required: l.required,
141
147
  type: "media"
142
148
  }, {
143
- default: O(() => [
144
- n("div", Ee, [
145
- n("input", {
149
+ default: A(() => [
150
+ i("div", Ge, [
151
+ i("input", {
146
152
  ref_key: "fileInput",
147
- ref: p,
153
+ ref: u,
148
154
  type: "file",
149
155
  class: "hidden",
150
- accept: t.validation,
156
+ accept: l.validation,
151
157
  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
- i(D, {
158
- label: e(s)("uploadFile"),
158
+ onChange: r[0] || (r[0] = (f) => F())
159
+ }, null, 40, Ie),
160
+ i("div", Me, [
161
+ i("ul", xe, [
162
+ p.value ? y("", !0) : (s(), c("li", Be, [
163
+ n(D, {
164
+ label: e(_)("uploadFile"),
159
165
  type: "button",
160
166
  icon: "upload",
161
- "icon-color": t.iconColor,
162
- onClickEvent: d[1] || (d[1] = (u) => _())
167
+ "icon-color": l.iconColor,
168
+ onClickEvent: r[1] || (r[1] = (f) => E())
163
169
  }, null, 8, ["label", "icon-color"])
164
170
  ])),
165
- f.value ? (r(), m("li", Le, [
166
- i(D, {
167
- label: e(s)("replaceFile"),
171
+ p.value ? (s(), c("li", Le, [
172
+ n(D, {
173
+ label: e(_)("replaceFile"),
168
174
  type: "button",
169
175
  icon: "repeat-alt",
170
- "icon-color": t.iconColor,
171
- onClickEvent: d[2] || (d[2] = (u) => _())
176
+ "icon-color": l.iconColor,
177
+ onClickEvent: r[2] || (r[2] = (f) => E())
172
178
  }, null, 8, ["label", "icon-color"])
173
179
  ])) : y("", !0),
174
- f.value ? (r(), m("li", xe, [
175
- i(D, {
176
- label: e(s)("removeFile"),
180
+ p.value ? (s(), c("li", Ae, [
181
+ n(D, {
182
+ label: e(_)("removeFile"),
177
183
  type: "button",
178
184
  icon: "trash-alt",
179
- "icon-color": t.iconColor,
180
- onClickEvent: d[3] || (d[3] = (u) => I())
185
+ "icon-color": l.iconColor,
186
+ onClickEvent: r[3] || (r[3] = (f) => k())
181
187
  }, null, 8, ["label", "icon-color"])
182
188
  ])) : y("", !0)
183
189
  ]),
184
- n("div", {
185
- class: re([
190
+ i("div", {
191
+ class: de([
186
192
  "media-selector-previewer",
187
- { opened: f.value }
193
+ { opened: p.value }
188
194
  ])
189
195
  }, [
190
- t.modelValue ? (r(), m("img", {
196
+ l.modelValue ? (s(), c("img", {
191
197
  key: 0,
192
- src: t.modelValue.base64
198
+ src: l.modelValue.base64
193
199
  }, null, 8, De)) : y("", !0)
194
200
  ], 2)
195
201
  ])
@@ -199,9 +205,9 @@ const oe = ue("giftCard", () => {
199
205
  }, 8, ["label", "required"]));
200
206
  }
201
207
  });
202
- function ie($) {
203
- const a = $;
204
- a.__i18n = a.__i18n || [], a.__i18n.push({
208
+ function se(S) {
209
+ const b = S;
210
+ b.__i18n = b.__i18n || [], b.__i18n.push({
205
211
  locale: "",
206
212
  resource: {
207
213
  da: {
@@ -219,40 +225,40 @@ function ie($) {
219
225
  }
220
226
  });
221
227
  }
222
- typeof ie == "function" && ie(Ae);
223
- const ze = { class: "gift-card-skeleton" }, Ne = { class: "gift-card-skeleton-form" }, We = /* @__PURE__ */ X({
228
+ typeof se == "function" && se(ze);
229
+ const We = { class: "gift-card-skeleton" }, Ne = { class: "gift-card-skeleton-form" }, je = /* @__PURE__ */ ee({
224
230
  __name: "GiftCardSkeleton",
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" })
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" })
234
240
  ])
235
241
  ]));
236
242
  }
237
243
  });
238
- const je = /* @__PURE__ */ de(We, [["__scopeId", "data-v-2600a731"]]), He = {
244
+ const He = /* @__PURE__ */ ue(je, [["__scopeId", "data-v-e35c75b3"]]), Oe = {
239
245
  key: 0,
240
- 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
+ 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 = {
242
248
  key: 0,
243
249
  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 = {
250
+ }, ea = {
251
+ class: /* @__PURE__ */ de(["fresh-booking-label", "required"])
252
+ }, aa = { id: "fresh-booking-select-place-type-input" }, la = ["innerHTML"], ta = {
247
253
  key: 0,
248
- id: "fresh-booking-gift-card-order"
249
- }, ta = { class: "fresh-booking-panel" }, oa = {
254
+ id: "konnectio-gift-card-order"
255
+ }, oa = { class: "fresh-booking-panel" }, na = {
250
256
  key: 1,
251
- id: "fresh-booking-gift-card-remarks"
257
+ id: "konnectio-gift-card-remarks"
252
258
  }, ia = {
253
259
  key: 2,
254
- id: "fresh-booking-gift-card-order-minimal"
255
- }, na = { id: "fresh-booking-gift-card-recaptcha" }, sa = /* @__PURE__ */ X({
260
+ id: "konnectio-gift-card-order-minimal"
261
+ }, sa = { id: "konnectio-gift-card-recaptcha" }, ra = /* @__PURE__ */ ee({
256
262
  name: "GiftCardLayout",
257
263
  __name: "GiftCard",
258
264
  props: {
@@ -261,208 +267,214 @@ const je = /* @__PURE__ */ de(We, [["__scopeId", "data-v-2600a731"]]), He = {
261
267
  placeType: {},
262
268
  styling: {}
263
269
  },
264
- setup($) {
265
- const { t: a } = se(), {
266
- name: P,
267
- email: U,
268
- phone: s,
269
- value: V,
270
- remark: p,
271
- showValue: f,
272
- quantity: R,
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,
273
282
  media: I,
274
- placeId: _,
275
- placeType: v,
276
- showFormPage: g,
277
- showPaymentPage: t,
278
- showConfirmationPage: d,
279
- places: u,
280
- hasFilledForm: S,
281
- hasForcedPlaceType: E,
282
- isWaitingForResponse: h,
283
- isMetaDataAvailable: M
284
- } = Q(oe()), { initialize: B, orderGiftCard: z } = oe(), { isRecaptchaEnabled: q, currency: K } = Q(ne());
285
- async function N() {
286
- await z();
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();
287
296
  }
288
- return he(v, () => {
289
- _.value = void 0;
290
- }), be(() => {
291
- B();
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)]
311
- ]),
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))
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),
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)
400
- ])
401
- ], 512), [
402
- [j, e(g)]
403
- ]),
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
- ])
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 }))
411
462
  ]),
412
- G.layout !== "minimal" && e(g) ? (r(), m("div", la, [
413
- n("div", ta, [
414
- i(D, {
415
- label: e(a)("giftCard.orderGiftCard"),
416
- "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),
420
- onClickEvent: N
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 }))
463
+ _: 1
464
+ }, 8, ["access-token", "data-layout"])
465
+ ]),
466
+ fallback: A(() => [
467
+ n(He)
452
468
  ]),
453
469
  _: 1
454
- }, 8, ["access-token", "data-layout", "styling"])
455
- ]),
456
- fallback: O(() => [
457
- i(je)
470
+ }))
458
471
  ]),
459
472
  _: 1
460
- }));
473
+ }, 8, ["styling"]));
461
474
  }
462
475
  });
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");
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");