@konnectio/core 4.0.17 → 4.0.19

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 (90) hide show
  1. package/dist/ActionField-4cb5a734.js +100 -0
  2. package/dist/ActionField-4cb5a734.js.br +0 -0
  3. package/dist/ActionField-656d204b.cjs +1 -0
  4. package/dist/AvailabilitySkeleton-00f7fc68.js +223 -0
  5. package/dist/AvailabilitySkeleton-00f7fc68.js.br +0 -0
  6. package/dist/AvailabilitySkeleton-8fc17074.cjs +1 -0
  7. package/dist/{DateField.vue_vue_type_style_index_0_lang-d5a1efd5.js → DateField.vue_vue_type_style_index_0_lang-36b7ee9e.js} +2323 -2323
  8. package/dist/DateField.vue_vue_type_style_index_0_lang-36b7ee9e.js.br +0 -0
  9. package/dist/DateField.vue_vue_type_style_index_0_lang-ef9c83d6.cjs +5 -0
  10. package/dist/Field-4283160f.cjs +1 -0
  11. package/dist/{Field-7137ef85.js → Field-e1af1bbc.js} +11 -12
  12. package/dist/Field-e1af1bbc.js.br +0 -0
  13. package/dist/NumberField.vue_vue_type_script_setup_true_lang-a517b062.cjs +1 -0
  14. package/dist/NumberField.vue_vue_type_script_setup_true_lang-eb9876fc.js +116 -0
  15. package/dist/NumberField.vue_vue_type_script_setup_true_lang-eb9876fc.js.br +0 -0
  16. package/dist/SelectField.vue_vue_type_style_index_0_lang-1c999286.js +28840 -0
  17. package/dist/SelectField.vue_vue_type_style_index_0_lang-1c999286.js.br +0 -0
  18. package/dist/SelectField.vue_vue_type_style_index_0_lang-af7c016a.cjs +855 -0
  19. package/dist/ThankYou-01175a37.cjs +54 -0
  20. package/dist/{ThankYou-433bd249.js → ThankYou-0860a0ab.js} +436 -430
  21. package/dist/ThankYou-0860a0ab.js.br +0 -0
  22. package/dist/{_-048b5217.js → _-6db0e1a4.js} +16 -17
  23. package/dist/_-6db0e1a4.js.br +0 -0
  24. package/dist/_-b5842a21.cjs +1 -0
  25. package/dist/_commonjsHelpers-6763f629.cjs +1 -0
  26. package/dist/_commonjsHelpers-aeeeeb92.js +30 -0
  27. package/dist/assets/typescript/mixins.d.ts +1 -0
  28. package/dist/availability.cjs +2 -2
  29. package/dist/availability.js +30 -31
  30. package/dist/availability.js.br +0 -0
  31. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +1 -1
  32. package/dist/components/forms/MultiStepForm.vue.d.ts +1 -1
  33. package/dist/components/forms/ReservationForm.vue.d.ts +1 -1
  34. package/dist/components/listings/Base.vue.d.ts +1 -1
  35. package/dist/components/listings/Hotel.vue.d.ts +1 -1
  36. package/dist/{event-3ef40faf.js → event-52fce8cc.js} +29 -30
  37. package/dist/event-52fce8cc.js.br +0 -0
  38. package/dist/event-c717dc05.cjs +1 -0
  39. package/dist/event.cjs +1 -1
  40. package/dist/event.js +233 -235
  41. package/dist/event.js.br +0 -0
  42. package/dist/gift-card-validation.cjs +1 -1
  43. package/dist/gift-card-validation.js +53 -55
  44. package/dist/gift-card-validation.js.br +0 -0
  45. package/dist/gift-card.cjs +1 -1
  46. package/dist/gift-card.js +186 -188
  47. package/dist/gift-card.js.br +0 -0
  48. package/dist/hotel.cjs +5 -5
  49. package/dist/hotel.js +1462 -1328
  50. package/dist/hotel.js.br +0 -0
  51. package/dist/{index-36d9ed45.js → index-4aff7f4e.js} +14 -16
  52. package/dist/index-4aff7f4e.js.br +0 -0
  53. package/dist/index-5d223c1a.cjs +1 -0
  54. package/dist/polyfill.cjs +2 -2
  55. package/dist/polyfill.js +2 -2
  56. package/dist/polyfill.js.br +0 -0
  57. package/dist/store/hotel.d.ts +4 -1
  58. package/dist/style.css +1 -1
  59. package/dist/style.css.br +0 -0
  60. package/dist/types/index.d.ts +1 -0
  61. package/package.json +1 -1
  62. package/dist/ActionField-3184bffd.cjs +0 -1
  63. package/dist/ActionField-82ef422e.js +0 -164
  64. package/dist/ActionField-82ef422e.js.br +0 -0
  65. package/dist/AvailabilitySkeleton-528d40ef.cjs +0 -1
  66. package/dist/AvailabilitySkeleton-ec092c09.js +0 -203
  67. package/dist/AvailabilitySkeleton-ec092c09.js.br +0 -0
  68. package/dist/DateField.vue_vue_type_style_index_0_lang-5692c5b2.cjs +0 -5
  69. package/dist/DateField.vue_vue_type_style_index_0_lang-d5a1efd5.js.br +0 -0
  70. package/dist/Field-7137ef85.js.br +0 -0
  71. package/dist/Field-b1690485.cjs +0 -1
  72. package/dist/NumberField.vue_vue_type_style_index_0_lang-8c28c1dd.cjs +0 -1
  73. package/dist/NumberField.vue_vue_type_style_index_0_lang-eebde8cd.js +0 -194
  74. package/dist/NumberField.vue_vue_type_style_index_0_lang-eebde8cd.js.br +0 -0
  75. package/dist/SelectField.vue_vue_type_style_index_0_lang-5e1192e9.js +0 -19741
  76. package/dist/SelectField.vue_vue_type_style_index_0_lang-5e1192e9.js.br +0 -0
  77. package/dist/SelectField.vue_vue_type_style_index_0_lang-c0715ca3.cjs +0 -850
  78. package/dist/ThankYou-433bd249.js.br +0 -0
  79. package/dist/ThankYou-817b93d0.cjs +0 -54
  80. package/dist/_-048b5217.js.br +0 -0
  81. package/dist/_-120d9090.cjs +0 -1
  82. package/dist/_commonjsHelpers-10dfc225.js +0 -8
  83. package/dist/_commonjsHelpers-87b0abe8.cjs +0 -1
  84. package/dist/applyGiftCard-45cf782e.js +0 -54
  85. package/dist/applyGiftCard-45cf782e.js.br +0 -0
  86. package/dist/applyGiftCard-f1b620cc.cjs +0 -1
  87. package/dist/event-3ef40faf.js.br +0 -0
  88. package/dist/event-d531df9d.cjs +0 -1
  89. package/dist/index-36d9ed45.js.br +0 -0
  90. package/dist/index-8309eba2.cjs +0 -1
package/dist/gift-card.js CHANGED
@@ -1,70 +1,68 @@
1
- import { ref as b, computed as F, defineComponent as X, openBlock as d, createBlock as D, withCtx as H, createElementVNode as s, createElementBlock as g, createVNode as r, unref as e, createCommentVNode as k, normalizeClass as ne, watch as ue, onMounted as ce, resolveDirective as pe, Suspense as me, toDisplayString as Z, withDirectives as I, vShow as N, isRef as V, Fragment as fe, renderList as ve, createApp as ge } from "vue";
2
- import { d as he, u as ie, s as Q, a as re, G as z, b as Y, i as ee, S as J, c as _e, e as ye, y as be, f as se, n as ke, C as x, _ as de, h as Ce, T as j, o as Ve, L as ae, l as Fe, z as Pe, m as Se } from "./SelectField.vue_vue_type_style_index_0_lang-5e1192e9.js";
3
- import { a as ze, P as we, C as le, _ as Te, S as Ue, i as $e } from "./index-36d9ed45.js";
4
- import { u as Ee, E as Re } from "./_-048b5217.js";
5
- import "./NumberField.vue_vue_type_style_index_0_lang-eebde8cd.js";
6
- import { F as M } from "./Field-7137ef85.js";
7
- import "./_commonjsHelpers-10dfc225.js";
8
- const te = he("giftCard", () => {
9
- ie();
10
- const { pay: w } = Ee(), { bearerToken: l, metaData: o } = Q(re()), a = b(z.InitialState), h = Y("konnectio_name", "", void 0, { serializer: J.string }), P = Y("konnectio_email", "", void 0, { serializer: J.string }), p = Y("konnectio_phone", "", void 0, { serializer: J.string }), v = b(""), $ = b(1), q = b(!0), C = b(""), m = b({
1
+ import { d as ue, u as ne, s as Y, a as ie, r as b, ab as w, b as J, c as F, i as Z, S as Q, e as ce, f as pe, ac as me, h as X, z as se, k as d, l as M, w as H, x as r, q as g, m as s, n as e, C as x, t as k, v as re, I as fe, _ as de, a1 as ve, o as ge, ad as he, A as ee, ae as B, af as W, T as j, B as V, a2 as ye, a3 as _e, y as be, a4 as ae, J as ke, K as Ce, P as Ve, a8 as Fe, N as Pe, Q as Se } from "./SelectField.vue_vue_type_style_index_0_lang-1c999286.js";
2
+ import { a as we, P as ze, C as le, _ as Te, S as $e, i as Ue } from "./index-4aff7f4e.js";
3
+ import { u as qe, E as Re } from "./_-6db0e1a4.js";
4
+ import { F as L } from "./Field-e1af1bbc.js";
5
+ import "./_commonjsHelpers-aeeeeb92.js";
6
+ const te = ue("giftCard", () => {
7
+ ne();
8
+ const { pay: z } = qe(), { bearerToken: t, metaData: o } = Y(ie()), a = b(w.InitialState), h = J("konnectio_name", "", void 0, { serializer: Q.string }), P = J("konnectio_email", "", void 0, { serializer: Q.string }), p = J("konnectio_phone", "", void 0, { serializer: Q.string }), v = b(""), U = b(1), I = b(!0), C = b(""), m = b({
11
9
  base64: "",
12
10
  type: "",
13
11
  name: ""
14
- }), S = b(void 0), n = b(0), u = b(!1), c = b(0), E = F(() => a.value === z.InitialState || a.value === z.WaitingForResponse), R = F(() => a.value === z.ReadyToPay), _ = F(() => a.value === z.PaymentSuccess), T = F(() => {
12
+ }), S = b(void 0), n = b(0), u = b(!1), c = b(0), q = F(() => a.value === w.InitialState || a.value === w.WaitingForResponse), R = F(() => a.value === w.ReadyToPay), y = F(() => a.value === w.PaymentSuccess), T = F(() => {
15
13
  const f = {
16
14
  1: {
17
- label: ee.t("giftCard.hotelType"),
15
+ label: Z.t("giftCard.hotelType"),
18
16
  data: []
19
17
  },
20
18
  2: {
21
- label: ee.t("giftCard.restaurantType"),
19
+ label: Z.t("giftCard.restaurantType"),
22
20
  data: []
23
21
  }
24
- }, t = o.value.places;
25
- return t && t.forEach((y) => {
26
- f[y.placeType].data.push(y);
22
+ }, l = o.value.places;
23
+ return l && l.forEach((_) => {
24
+ f[_.placeType].data.push(_);
27
25
  }), Object.fromEntries(
28
- Object.entries(f).filter(([, y]) => y.data.length > 0)
26
+ Object.entries(f).filter(([, _]) => _.data.length > 0)
29
27
  );
30
- }), A = F(() => c.value !== 0), U = F(() => {
28
+ }), D = F(() => c.value !== 0), $ = F(() => {
31
29
  let f;
32
- if (A.value)
30
+ if (D.value)
33
31
  f = T.value[c.value].data[0];
34
32
  else if (n.value !== 0) {
35
- const t = S.value, y = T.value[n.value].data;
36
- y.length === 1 ? f = y[0] : t !== void 0 && y.forEach((W) => {
37
- String(W.id) === String(t) && (f = W);
33
+ const l = S.value, _ = T.value[n.value].data;
34
+ _.length === 1 ? f = _[0] : l !== void 0 && _.forEach((N) => {
35
+ String(N.id) === String(l) && (f = N);
38
36
  });
39
37
  }
40
38
  return f;
41
- }), O = F(() => !(!h.value || !P.value || !(p.value.length >= 5) || !v.value || U.value === void 0)), K = F(() => !(a.value === z.InitialState && u.value)), B = F(() => !!(a.value === z.WaitingForResponse && u.value));
42
- async function G() {
43
- a.value = z.WaitingForResponse, u.value = !0, await _e.post("https://stage.hotel-service.konnectio.dk/api/gift-card/create", {
39
+ }), K = F(() => !(!h.value || !P.value || !(p.value.length >= 5) || !v.value || $.value === void 0)), O = F(() => !(a.value === w.InitialState && u.value)), A = F(() => !!(a.value === w.WaitingForResponse && u.value));
40
+ async function E() {
41
+ a.value = w.WaitingForResponse, u.value = !0, await ce.post("https://stage.hotel-service.konnectio.dk/api/gift-card/create", {
44
42
  termsOfserviceURL: "https://freshbooking.dk",
45
43
  checkoutUrl: "https://freshbooking.dk",
46
44
  currencyID: o.value.currency.id,
47
- language: ye(),
45
+ language: pe(),
48
46
  amount: v.value,
49
- quantity: $.value,
47
+ quantity: U.value,
50
48
  freeText: C.value,
51
- showPrice: q.value,
49
+ showPrice: I.value,
52
50
  contactName: h.value,
53
51
  contactEmail: P.value,
54
52
  contactPhone: p.value,
55
- imageBase64: be(m.value.base64),
53
+ imageBase64: me(m.value.base64),
56
54
  imageName: m.value.name,
57
55
  imageFormat: m.value.type,
58
- placeType: U.value ? U.value.placeType : void 0,
59
- placeID: U.value ? U.value.id : void 0
56
+ placeType: $.value ? $.value.placeType : void 0,
57
+ placeID: $.value ? $.value.id : void 0
60
58
  }, {
61
59
  headers: {
62
- Authorization: l.value,
60
+ Authorization: t.value,
63
61
  Accept: "application/json",
64
- "Fresh-Booking-Ver": "4.0.17"
62
+ "Fresh-Booking-Ver": "4.0.19"
65
63
  }
66
64
  }).then((f) => {
67
- a.value = z.ReadyToPay, u.value = !1, w({
65
+ a.value = w.ReadyToPay, u.value = !1, z({
68
66
  callback: () => console.log("Callback!"),
69
67
  response: f.data
70
68
  });
@@ -80,23 +78,23 @@ const te = he("giftCard", () => {
80
78
  phone: p,
81
79
  value: v,
82
80
  remark: C,
83
- showValue: q,
84
- quantity: $,
81
+ showValue: I,
82
+ quantity: U,
85
83
  media: m,
86
84
  placeId: S,
87
85
  placeType: n,
88
- showFormPage: E,
86
+ showFormPage: q,
89
87
  showPaymentPage: R,
90
- showConfirmationPage: _,
88
+ showConfirmationPage: y,
91
89
  places: T,
92
- hasFilledForm: O,
93
- hasForcedPlaceType: A,
94
- isWaitingForResponse: B,
95
- isMetaDataAvailable: K,
96
- orderGiftCard: G,
90
+ hasFilledForm: K,
91
+ hasForcedPlaceType: D,
92
+ isWaitingForResponse: A,
93
+ isMetaDataAvailable: O,
94
+ orderGiftCard: E,
97
95
  initialize: i
98
96
  };
99
- }), Ge = { class: "media-selector" }, Le = ["accept"], qe = { class: "media-selector-wrapper" }, Ie = { class: "media-selector-tools" }, Me = { key: 0 }, De = { key: 1 }, xe = { key: 2 }, Ae = ["src"], Be = /* @__PURE__ */ X({
97
+ }), Ee = { class: "media-selector" }, Ge = ["accept"], Ie = { class: "media-selector-wrapper" }, Be = { class: "media-selector-tools" }, Le = { key: 0 }, Me = { key: 1 }, xe = { key: 2 }, De = ["src"], Ae = /* @__PURE__ */ X({
100
98
  __name: "MediaSelector",
101
99
  props: {
102
100
  modelValue: {},
@@ -106,13 +104,13 @@ const te = he("giftCard", () => {
106
104
  required: { type: Boolean, default: !1 }
107
105
  },
108
106
  emits: ["update:modelValue"],
109
- setup(w, { emit: l }) {
110
- const o = l, a = w, { t: h } = se(), { display: P } = ie(), p = b(), v = F(() => a.modelValue.base64 !== "");
111
- function $(n) {
107
+ setup(z, { emit: t }) {
108
+ const o = t, a = z, { t: h } = se(), { display: P } = ne(), p = b(), v = F(() => a.modelValue.base64 !== "");
109
+ function U(n) {
112
110
  o("update:modelValue", n);
113
111
  }
114
- function q() {
115
- $({
112
+ function I() {
113
+ U({
116
114
  base64: "",
117
115
  name: "",
118
116
  type: ""
@@ -122,11 +120,11 @@ const te = he("giftCard", () => {
122
120
  p.value && p.value.click();
123
121
  }
124
122
  function m(n, u) {
125
- const [c, E] = [n.name, n.type], R = new FileReader();
126
- R.onload = function(_) {
127
- if (_.target) {
128
- const T = _.target.result;
129
- u({ base64: T, name: c, type: E });
123
+ const [c, q] = [n.name, n.type], R = new FileReader();
124
+ R.onload = function(y) {
125
+ if (y.target) {
126
+ const T = y.target.result;
127
+ u({ base64: T, name: c, type: q });
130
128
  } else
131
129
  P({
132
130
  message: h("imageUploadError"),
@@ -136,16 +134,16 @@ const te = he("giftCard", () => {
136
134
  }
137
135
  async function S() {
138
136
  let n;
139
- (n = p.value.files) instanceof FileList && m(n[0], $);
137
+ (n = p.value.files) instanceof FileList && m(n[0], U);
140
138
  }
141
- return (n, u) => (d(), D(ke, {
139
+ return (n, u) => (d(), M(fe, {
142
140
  label: n.label,
143
141
  required: n.required,
144
142
  type: "media"
145
143
  }, {
146
144
  default: H(() => [
147
- s("div", Ge, [
148
- s("input", {
145
+ r("div", Ee, [
146
+ r("input", {
149
147
  ref_key: "fileInput",
150
148
  ref: p,
151
149
  type: "file",
@@ -153,11 +151,11 @@ const te = he("giftCard", () => {
153
151
  accept: n.validation,
154
152
  single: "",
155
153
  onChange: u[0] || (u[0] = (c) => S())
156
- }, null, 40, Le),
157
- s("div", qe, [
158
- s("ul", Ie, [
159
- v.value ? k("", !0) : (d(), g("li", Me, [
160
- r(x, {
154
+ }, null, 40, Ge),
155
+ r("div", Ie, [
156
+ r("ul", Be, [
157
+ v.value ? k("", !0) : (d(), g("li", Le, [
158
+ s(x, {
161
159
  label: e(h)("uploadFile"),
162
160
  type: "button",
163
161
  icon: "upload",
@@ -165,8 +163,8 @@ const te = he("giftCard", () => {
165
163
  onClickEvent: u[1] || (u[1] = (c) => C())
166
164
  }, null, 8, ["label", "icon-color"])
167
165
  ])),
168
- v.value ? (d(), g("li", De, [
169
- r(x, {
166
+ v.value ? (d(), g("li", Me, [
167
+ s(x, {
170
168
  label: e(h)("replaceFile"),
171
169
  type: "button",
172
170
  icon: "repeat-alt",
@@ -175,17 +173,17 @@ const te = he("giftCard", () => {
175
173
  }, null, 8, ["label", "icon-color"])
176
174
  ])) : k("", !0),
177
175
  v.value ? (d(), g("li", xe, [
178
- r(x, {
176
+ s(x, {
179
177
  label: e(h)("removeFile"),
180
178
  type: "button",
181
179
  icon: "trash-alt",
182
180
  "icon-color": n.iconColor,
183
- onClickEvent: u[3] || (u[3] = (c) => q())
181
+ onClickEvent: u[3] || (u[3] = (c) => I())
184
182
  }, null, 8, ["label", "icon-color"])
185
183
  ])) : k("", !0)
186
184
  ]),
187
- s("div", {
188
- class: ne([
185
+ r("div", {
186
+ class: re([
189
187
  "media-selector-previewer",
190
188
  { opened: v.value }
191
189
  ])
@@ -193,7 +191,7 @@ const te = he("giftCard", () => {
193
191
  n.modelValue ? (d(), g("img", {
194
192
  key: 0,
195
193
  src: n.modelValue.base64
196
- }, null, 8, Ae)) : k("", !0)
194
+ }, null, 8, De)) : k("", !0)
197
195
  ], 2)
198
196
  ])
199
197
  ])
@@ -202,9 +200,9 @@ const te = he("giftCard", () => {
202
200
  }, 8, ["label", "required"]));
203
201
  }
204
202
  });
205
- function oe(w) {
206
- const l = w;
207
- l.__i18n = l.__i18n || [], l.__i18n.push({
203
+ function oe(z) {
204
+ const t = z;
205
+ t.__i18n = t.__i18n || [], t.__i18n.push({
208
206
  locale: "",
209
207
  resource: {
210
208
  da: {
@@ -246,30 +244,30 @@ function oe(w) {
246
244
  }
247
245
  });
248
246
  }
249
- typeof oe == "function" && oe(Be);
250
- const We = { class: "gift-card-skeleton" }, Ne = { class: "gift-card-skeleton-form" }, je = /* @__PURE__ */ X({
247
+ typeof oe == "function" && oe(Ae);
248
+ const Ne = { class: "gift-card-skeleton" }, We = { class: "gift-card-skeleton-form" }, je = /* @__PURE__ */ X({
251
249
  __name: "GiftCardSkeleton",
252
- setup(w) {
253
- return (l, o) => (d(), g("div", We, [
254
- s("div", Ne, [
255
- r(M),
256
- r(M),
257
- r(M),
258
- r(M),
259
- r(M, { "is-text-area": "" }),
260
- r(Re, { height: "44px" })
250
+ setup(z) {
251
+ return (t, o) => (d(), g("div", Ne, [
252
+ r("div", We, [
253
+ s(L),
254
+ s(L),
255
+ s(L),
256
+ s(L),
257
+ s(L, { "is-text-area": "" }),
258
+ s(Re, { height: "44px" })
261
259
  ])
262
260
  ]));
263
261
  }
264
262
  });
265
- const He = /* @__PURE__ */ de(je, [["__scopeId", "data-v-2600a731"]]), Oe = {
263
+ const He = /* @__PURE__ */ de(je, [["__scopeId", "data-v-2600a731"]]), Ke = {
266
264
  key: 0,
267
265
  id: "fresh-booking-gift-card-wrapper"
268
- }, 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 = {
266
+ }, Oe = { id: "fresh-booking-gift-card-title" }, Je = { id: "fresh-booking-gift-card-content" }, Qe = { id: "fresh-booking-gift-card-payment" }, Ye = ["innerHTML"], Xe = { key: 0 }, Ze = {
269
267
  key: 0,
270
268
  id: "fresh-booking-select-place-type"
271
269
  }, ea = {
272
- class: /* @__PURE__ */ ne(["fresh-booking-label", "required"])
270
+ class: /* @__PURE__ */ re(["fresh-booking-label", "required"])
273
271
  }, aa = { id: "fresh-booking-select-place-type-input" }, la = ["innerHTML"], ta = {
274
272
  key: 0,
275
273
  id: "fresh-booking-gift-card-order"
@@ -280,7 +278,7 @@ const He = /* @__PURE__ */ de(je, [["__scopeId", "data-v-2600a731"]]), Oe = {
280
278
  key: 2,
281
279
  id: "fresh-booking-gift-card-order-minimal",
282
280
  "sticky-side": "bottom"
283
- }, ra = { id: "fresh-booking-gift-card-recaptcha" }, sa = /* @__PURE__ */ X({
281
+ }, sa = { id: "fresh-booking-gift-card-recaptcha" }, ra = /* @__PURE__ */ X({
284
282
  name: "GiftCardLayout",
285
283
  __name: "GiftCard",
286
284
  props: {
@@ -289,215 +287,215 @@ const He = /* @__PURE__ */ de(je, [["__scopeId", "data-v-2600a731"]]), Oe = {
289
287
  placeType: {},
290
288
  styling: {}
291
289
  },
292
- setup(w) {
293
- const { t: l } = se(), {
290
+ setup(z) {
291
+ const { t } = se(), {
294
292
  name: o,
295
293
  email: a,
296
294
  phone: h,
297
295
  value: P,
298
296
  remark: p,
299
297
  showValue: v,
300
- quantity: $,
301
- media: q,
298
+ quantity: U,
299
+ media: I,
302
300
  placeId: C,
303
301
  placeType: m,
304
302
  showFormPage: S,
305
303
  showPaymentPage: n,
306
304
  showConfirmationPage: u,
307
305
  places: c,
308
- hasFilledForm: E,
306
+ hasFilledForm: q,
309
307
  hasForcedPlaceType: R,
310
- isWaitingForResponse: _,
308
+ isWaitingForResponse: y,
311
309
  isMetaDataAvailable: T
312
- } = Q(te()), { initialize: A, orderGiftCard: U } = te(), { isRecaptchaEnabled: O, currency: K } = Q(re());
313
- async function B() {
314
- await U();
310
+ } = Y(te()), { initialize: D, orderGiftCard: $ } = te(), { isRecaptchaEnabled: K, currency: O } = Y(ie());
311
+ async function A() {
312
+ await $();
315
313
  }
316
- return ue(m, () => {
314
+ return ve(m, () => {
317
315
  C.value = void 0;
318
- }), ce(() => {
319
- A();
320
- }), (G, i) => {
321
- const f = pe("sticky");
322
- return d(), D(me, null, {
316
+ }), ge(() => {
317
+ D();
318
+ }), (E, i) => {
319
+ const f = he("sticky");
320
+ return d(), M(Ce, null, {
323
321
  default: H(() => [
324
- r(Ce, {
322
+ s(ke, {
325
323
  id: "fresh-booking-gift-card-module",
326
324
  type: "gift-card",
327
- "access-token": G.accessToken,
328
- "data-layout": G.layout,
329
- styling: G.styling,
325
+ "access-token": E.accessToken,
326
+ "data-layout": E.layout,
327
+ styling: E.styling,
330
328
  "sticky-container": ""
331
329
  }, {
332
330
  default: H(() => [
333
- e(T) ? (d(), g("div", Oe, [
334
- s("h4", Ke, [
335
- s("span", null, Z(e(l)("giftCard.title")), 1)
331
+ e(T) ? (d(), g("div", Ke, [
332
+ r("h4", Oe, [
333
+ r("span", null, ee(e(t)("giftCard.title")), 1)
336
334
  ]),
337
- s("div", Ye, [
338
- I(s("div", Je, [
339
- r(ze)
335
+ r("div", Je, [
336
+ B(r("div", Qe, [
337
+ s(we)
340
338
  ], 512), [
341
- [N, e(n)]
339
+ [W, e(n)]
342
340
  ]),
343
- I(s("div", null, [
344
- s("p", {
341
+ B(r("div", null, [
342
+ r("p", {
345
343
  id: "fresh-booking-gift-card-description",
346
- innerHTML: e(l)("giftCard.description")
347
- }, null, 8, Qe),
348
- s("form", null, [
349
- r(j, {
344
+ innerHTML: e(t)("giftCard.description")
345
+ }, null, 8, Ye),
346
+ r("form", null, [
347
+ s(j, {
350
348
  modelValue: e(o),
351
- "onUpdate:modelValue": i[0] || (i[0] = (t) => V(o) ? o.value = t : null),
349
+ "onUpdate:modelValue": i[0] || (i[0] = (l) => V(o) ? o.value = l : null),
352
350
  type: "text",
353
351
  name: "name",
354
352
  autocomplete: "name",
355
- label: e(l)("giftCard.name"),
353
+ label: e(t)("giftCard.name"),
356
354
  icon: "user-alt",
357
- placeholder: e(l)("giftCard.namePlaceholder"),
355
+ placeholder: e(t)("giftCard.namePlaceholder"),
358
356
  required: ""
359
357
  }, null, 8, ["modelValue", "label", "placeholder"]),
360
- r(j, {
358
+ s(j, {
361
359
  modelValue: e(a),
362
- "onUpdate:modelValue": i[1] || (i[1] = (t) => V(a) ? a.value = t : null),
360
+ "onUpdate:modelValue": i[1] || (i[1] = (l) => V(a) ? a.value = l : null),
363
361
  type: "email",
364
362
  name: "email",
365
363
  autocomplete: "email",
366
- label: e(l)("giftCard.email"),
364
+ label: e(t)("giftCard.email"),
367
365
  icon: "at",
368
- placeholder: e(l)("giftCard.emailPlaceholder"),
366
+ placeholder: e(t)("giftCard.emailPlaceholder"),
369
367
  required: ""
370
368
  }, null, 8, ["modelValue", "label", "placeholder"]),
371
- r(we, {
369
+ s(ze, {
372
370
  modelValue: e(h),
373
- "onUpdate:modelValue": i[2] || (i[2] = (t) => V(h) ? h.value = t : null),
371
+ "onUpdate:modelValue": i[2] || (i[2] = (l) => V(h) ? h.value = l : null),
374
372
  icon: "phone-office",
375
- label: e(l)("giftCard.phone"),
376
- placeholder: e(l)("giftCard.phonePlaceholder"),
373
+ label: e(t)("giftCard.phone"),
374
+ placeholder: e(t)("giftCard.phonePlaceholder"),
377
375
  required: ""
378
376
  }, null, 8, ["modelValue", "label", "placeholder"]),
379
377
  e(R) ? k("", !0) : (d(), g("div", Xe, [
380
378
  e(c) ? (d(), g("div", Ze, [
381
- s("label", ea, [
382
- s("span", null, Z(e(l)("giftCard.selectType")), 1)
379
+ r("label", ea, [
380
+ r("span", null, ee(e(t)("giftCard.selectType")), 1)
383
381
  ]),
384
- s("div", aa, [
385
- s("ul", null, [
386
- (d(!0), g(fe, null, ve(e(c), (t, y) => (d(), g("li", { key: y }, [
387
- r(le, {
382
+ r("div", aa, [
383
+ r("ul", null, [
384
+ (d(!0), g(ye, null, _e(e(c), (l, _) => (d(), g("li", { key: _ }, [
385
+ s(le, {
388
386
  modelValue: e(m),
389
- "onUpdate:modelValue": i[3] || (i[3] = (W) => V(m) ? m.value = W : null),
387
+ "onUpdate:modelValue": i[3] || (i[3] = (N) => V(m) ? m.value = N : null),
390
388
  type: "radio",
391
389
  name: "placeType",
392
- val: y,
393
- label: t.label
390
+ val: _,
391
+ label: l.label
394
392
  }, null, 8, ["modelValue", "val", "label"])
395
393
  ]))), 128))
396
394
  ]),
397
- e(c)[e(m)] && e(c)[e(m)].data.length > 1 ? (d(), D(Ve, {
395
+ e(c)[e(m)] && e(c)[e(m)].data.length > 1 ? (d(), M(be, {
398
396
  key: 0,
399
397
  modelValue: e(C),
400
- "onUpdate:modelValue": i[4] || (i[4] = (t) => V(C) ? C.value = t : null),
401
- placeholder: e(l)("giftCard.selectPlacePlaceholder"),
398
+ "onUpdate:modelValue": i[4] || (i[4] = (l) => V(C) ? C.value = l : null),
399
+ placeholder: e(t)("giftCard.selectPlacePlaceholder"),
402
400
  options: e(c)[e(m)].data,
403
401
  labelKey: "name",
404
402
  valueKey: "id",
405
403
  required: ""
406
404
  }, null, 8, ["modelValue", "placeholder", "options"])) : k("", !0)
407
405
  ])
408
- ])) : (d(), D(ae, { key: 1 }))
406
+ ])) : (d(), M(ae, { key: 1 }))
409
407
  ])),
410
- r(j, {
408
+ s(j, {
411
409
  modelValue: e(P),
412
- "onUpdate:modelValue": i[5] || (i[5] = (t) => V(P) ? P.value = t : null),
410
+ "onUpdate:modelValue": i[5] || (i[5] = (l) => V(P) ? P.value = l : null),
413
411
  type: "number",
414
412
  name: "value",
415
- label: e(l)("giftCard.value"),
413
+ label: e(t)("giftCard.value"),
416
414
  icon: "money-bill",
417
- placeholder: e(l)("giftCard.valuePlaceholder"),
418
- suffix: e(K),
415
+ placeholder: e(t)("giftCard.valuePlaceholder"),
416
+ suffix: e(O),
419
417
  required: ""
420
418
  }, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
421
- r(le, {
419
+ s(le, {
422
420
  modelValue: e(v),
423
- "onUpdate:modelValue": i[6] || (i[6] = (t) => V(v) ? v.value = t : null),
421
+ "onUpdate:modelValue": i[6] || (i[6] = (l) => V(v) ? v.value = l : null),
424
422
  type: "checkbox",
425
423
  name: "showValue",
426
- label: e(l)("giftCard.showValue"),
424
+ label: e(t)("giftCard.showValue"),
427
425
  checked: e(v)
428
426
  }, null, 8, ["modelValue", "label", "checked"]),
429
427
  k("", !0),
430
428
  k("", !0)
431
429
  ])
432
430
  ], 512), [
433
- [N, e(S)]
431
+ [W, e(S)]
434
432
  ]),
435
- I(s("div", null, [
436
- s("div", {
437
- innerHTML: e(l)("giftCard.thankYou")
433
+ B(r("div", null, [
434
+ r("div", {
435
+ innerHTML: e(t)("giftCard.thankYou")
438
436
  }, null, 8, la)
439
437
  ], 512), [
440
- [N, e(u)]
438
+ [W, e(u)]
441
439
  ])
442
440
  ]),
443
- G.layout !== "minimal" && e(S) ? (d(), g("div", ta, [
444
- s("div", oa, [
445
- r(x, {
446
- label: e(l)("giftCard.orderGiftCard"),
441
+ E.layout !== "minimal" && e(S) ? (d(), g("div", ta, [
442
+ r("div", oa, [
443
+ s(x, {
444
+ label: e(t)("giftCard.orderGiftCard"),
447
445
  "full-width": !0,
448
- disabled: !e(E),
449
- "is-loading": e(_),
450
- "onUpdate:isLoading": i[9] || (i[9] = (t) => V(_) ? _.value = t : null),
451
- onClickEvent: B
446
+ disabled: !e(q),
447
+ "is-loading": e(y),
448
+ "onUpdate:isLoading": i[9] || (i[9] = (l) => V(y) ? y.value = l : null),
449
+ onClickEvent: A
452
450
  }, null, 8, ["label", "disabled", "is-loading"])
453
451
  ])
454
452
  ])) : k("", !0),
455
453
  e(S) ? (d(), g("div", na, [
456
- r(j, {
454
+ s(j, {
457
455
  modelValue: e(p),
458
- "onUpdate:modelValue": i[10] || (i[10] = (t) => V(p) ? p.value = t : null),
456
+ "onUpdate:modelValue": i[10] || (i[10] = (l) => V(p) ? p.value = l : null),
459
457
  type: "textarea",
460
458
  name: "remark",
461
- label: e(l)("giftCard.remark"),
459
+ label: e(t)("giftCard.remark"),
462
460
  icon: "info-circle",
463
- placeholder: e(l)("giftCard.remarkPlaceholder")
461
+ placeholder: e(t)("giftCard.remarkPlaceholder")
464
462
  }, null, 8, ["modelValue", "label", "placeholder"])
465
463
  ])) : k("", !0),
466
- e(S) ? I((d(), g("div", ia, [
467
- r(x, {
468
- label: e(l)("giftCard.orderGiftCard"),
464
+ e(S) ? B((d(), g("div", ia, [
465
+ s(x, {
466
+ label: e(t)("giftCard.orderGiftCard"),
469
467
  "full-width": !0,
470
- disabled: !e(E),
468
+ disabled: !e(q),
471
469
  "data-test": "orderGiftCard",
472
- "is-loading": e(_),
473
- "onUpdate:isLoading": i[11] || (i[11] = (t) => V(_) ? _.value = t : null),
474
- onClickEvent: B
470
+ "is-loading": e(y),
471
+ "onUpdate:isLoading": i[11] || (i[11] = (l) => V(y) ? y.value = l : null),
472
+ onClickEvent: A
475
473
  }, null, 8, ["label", "disabled", "is-loading"]),
476
- I(s("div", ra, [
477
- r(Te)
474
+ B(r("div", sa, [
475
+ s(Te)
478
476
  ], 512), [
479
- [N, e(O)]
477
+ [W, e(K)]
480
478
  ])
481
479
  ])), [
482
480
  [f]
483
481
  ]) : k("", !0)
484
- ])) : (d(), D(ae, { key: 1 }))
482
+ ])) : (d(), M(ae, { key: 1 }))
485
483
  ]),
486
484
  _: 1
487
485
  }, 8, ["access-token", "data-layout", "styling"])
488
486
  ]),
489
487
  fallback: H(() => [
490
- r(He)
488
+ s(He)
491
489
  ]),
492
490
  _: 1
493
491
  });
494
492
  };
495
493
  }
496
494
  });
497
- const da = /* @__PURE__ */ de(sa, [["__scopeId", "data-v-e4aa1e4c"]]), ua = Fe(), ca = Pe(), L = ge({ components: { GiftCard: da } });
498
- L.use(ua);
499
- L.use(Se);
500
- L.use(ca);
501
- L.use(Ue);
502
- L.use($e, { bootstrap: !1 });
503
- L.mount("#konnectio-gift-card-app");
495
+ const da = /* @__PURE__ */ de(ra, [["__scopeId", "data-v-e4aa1e4c"]]), ua = Ve(), ca = Fe(), G = Pe({ components: { GiftCard: da } });
496
+ G.use(ua);
497
+ G.use(Se);
498
+ G.use(ca);
499
+ G.use($e);
500
+ G.use(Ue, { bootstrap: !1 });
501
+ G.mount("#konnectio-gift-card-app");
Binary file