@konnectio/core 4.0.55 → 4.0.56-rc2

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