@konnectio/core 4.0.56-rc31 → 4.0.56-rc33

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 (46) hide show
  1. package/dist/{ActionField-qP-3ktN4.js → ActionField-tze5AH3K.js} +10 -10
  2. package/dist/ActionField-tze5AH3K.js.br +0 -0
  3. package/dist/AvailabilitySkeleton-BO4Erg_O.js +277 -0
  4. package/dist/AvailabilitySkeleton-BO4Erg_O.js.br +0 -0
  5. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-_E-GDGw7.js +7681 -0
  6. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-_E-GDGw7.js.br +0 -0
  7. package/dist/{CheckoutWindow-RWkSWvbk.js → CheckoutWindow-CIZWV-gI.js} +55 -55
  8. package/dist/CheckoutWindow-CIZWV-gI.js.br +0 -0
  9. package/dist/{ErrorMessage-z0JJ8Q3W.js → ErrorMessage-BzZDhDkX.js} +1 -1
  10. package/dist/ErrorMessage-BzZDhDkX.js.br +0 -0
  11. package/dist/EventAvailabilityForm-D73TXrag.js +422 -0
  12. package/dist/EventAvailabilityForm-D73TXrag.js.br +0 -0
  13. package/dist/Field-oZiblvji.js +41 -0
  14. package/dist/Field-oZiblvji.js.br +0 -0
  15. package/dist/{Field-C9r1d8IB.js → Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-Bsv17X7r.js} +11521 -11751
  16. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-Bsv17X7r.js.br +0 -0
  17. package/dist/{TermsOfService-oZz-B-KI.js → TermsOfService-yJlRLBDk.js} +2 -2
  18. package/dist/availability.js +45 -46
  19. package/dist/availability.js.br +0 -0
  20. package/dist/event.js +622 -491
  21. package/dist/event.js.br +0 -0
  22. package/dist/gift-card-validation.js +87 -77
  23. package/dist/gift-card-validation.js.br +0 -0
  24. package/dist/gift-card.js +261 -260
  25. package/dist/gift-card.js.br +0 -0
  26. package/dist/hotel.js +1016 -1027
  27. package/dist/hotel.js.br +0 -0
  28. package/dist/{masonry.plugin-fa0tia29.js → masonry.plugin-B71LqMrD.js} +1263 -1271
  29. package/dist/masonry.plugin-B71LqMrD.js.br +0 -0
  30. package/dist/polyfill.js +2507 -2503
  31. package/dist/polyfill.js.br +0 -0
  32. package/dist/style.css +1 -1
  33. package/dist/style.css.br +0 -0
  34. package/package.json +25 -24
  35. package/dist/ActionField-qP-3ktN4.js.br +0 -0
  36. package/dist/AvailabilitySkeleton-uaCnfwHM.js +0 -7665
  37. package/dist/AvailabilitySkeleton-uaCnfwHM.js.br +0 -0
  38. package/dist/CheckoutWindow-RWkSWvbk.js.br +0 -0
  39. package/dist/ErrorMessage-z0JJ8Q3W.js.br +0 -0
  40. package/dist/EventAvailabilityForm-LIgUj1t3.js +0 -325
  41. package/dist/EventAvailabilityForm-LIgUj1t3.js.br +0 -0
  42. package/dist/Field-C9r1d8IB.js.br +0 -0
  43. package/dist/HotelAvailabilityForm-AQ4VA15t.js +0 -212
  44. package/dist/HotelAvailabilityForm-AQ4VA15t.js.br +0 -0
  45. package/dist/masonry.plugin-fa0tia29.js.br +0 -0
  46. /package/dist/{_commonjsHelpers-f3sTPFkQ.js → _commonjsHelpers-DaMA6jEr.js} +0 -0
package/dist/gift-card.js CHANGED
@@ -1,14 +1,15 @@
1
- import { N as ue, O as pe, s as te, c as le, r as V, ag as T, U as ee, e as _, Y as re, W as ae, X as me, t as fe, ah as ve, d as z, u as J, Q as ge, f as d, k as M, x as G, h as l, g as k, m as o, j as e, C as O, l as F, p as ce, I as he, a1 as D, a0 as be, v as ne, A as Z, q as ye, ai as ke, w as _e, o as Ce, S as Ve, aj as W, ak as H, F as we, ab as Fe, $ as P, _ as Pe, al as Se, T as K, n as Te, D as $e, E as Ue, G as Ee, H as Ae, J as Ie, K as Le, L as Me, af as Ge, M as Re } from "./Field-C9r1d8IB.js";
2
- import { a as qe, C as xe, P as Be, _ as De } from "./CheckoutWindow-RWkSWvbk.js";
3
- import { E as Oe } from "./ErrorMessage-z0JJ8Q3W.js";
4
- import { S as ze } from "./TermsOfService-oZz-B-KI.js";
5
- const oe = ue("giftCard", () => {
6
- const { pay: g } = pe(), { bearerToken: c, metaData: v, currencyId: t } = te(le()), p = le(), r = V(T.InitialState), u = ee("konnectio_name", "", void 0, { serializer: ae.string }), h = ee("konnectio_email", "", void 0, { serializer: ae.string }), i = ee("konnectio_phone", "", void 0, { serializer: ae.string }), b = V(""), f = V(1), x = V(!0), S = V(""), a = V({
1
+ import { H as ue, J as pe, K as le, N as oe, m as V, a6 as T, P as ae, i as k, X as re, R as te, V as me, W as fe, a7 as ve, d as O, u as Y, M as ge, o as d, a as G, w as L, f as l, c as y, e as o, g as e, C as D, b as F, n as ce, I as he, E as be, _ as ie, t as X, q as ye, a8 as ke, a1 as _e, p as Ce, S as Ve, a9 as H, aa as K, F as we, ab as Fe, a2 as P, j as Pe, ac as Se, T as Z, k as Te, v as $e, x as Ee, y as Ue, z as Ae, A as Ie, B as Re, D as Ge, ad as Le, G as Me } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-Bsv17X7r.js";
2
+ import { C as qe, a as Be, P as xe, _ as ze } from "./CheckoutWindow-CIZWV-gI.js";
3
+ import { F as z } from "./Field-oZiblvji.js";
4
+ import { E as De } from "./ErrorMessage-BzZDhDkX.js";
5
+ import { S as Oe } from "./TermsOfService-yJlRLBDk.js";
6
+ const ne = ue("giftCard", () => {
7
+ const { pay: g } = pe(), { bearerToken: c, metaData: v, currencyId: t } = le(oe()), p = oe(), r = V(T.InitialState), u = ae("konnectio_name", "", void 0, { serializer: te.string }), h = ae("konnectio_email", "", void 0, { serializer: te.string }), i = ae("konnectio_phone", "", void 0, { serializer: te.string }), b = V(""), f = V(1), q = V(!0), S = V(""), a = V({
7
8
  base64: "",
8
9
  type: "",
9
10
  name: ""
10
- }), m = V(void 0), w = V(0), $ = V(!1), C = V(0), U = _(() => p.metaData.hotels[0]), B = _(() => U.value.termsOfService ? U.value.termsOfService : ""), E = _(() => r.value === T.InitialState || r.value === T.WaitingForResponse), ie = _(() => r.value === T.ReadyToPay), Q = _(() => r.value === T.PaymentSuccess), R = _(() => {
11
- const y = {
11
+ }), m = V(void 0), w = V(0), $ = V(!1), _ = V(0), E = k(() => p.metaData.hotels[0]), B = k(() => E.value.termsOfService ? E.value.termsOfService : ""), U = k(() => r.value === T.InitialState || r.value === T.WaitingForResponse), Q = k(() => r.value === T.ReadyToPay), N = k(() => r.value === T.PaymentSuccess), x = k(() => {
12
+ const C = {
12
13
  1: {
13
14
  label: re.t("giftCard.hotelType"),
14
15
  data: []
@@ -17,25 +18,25 @@ const oe = ue("giftCard", () => {
17
18
  label: re.t("giftCard.restaurantType"),
18
19
  data: []
19
20
  }
20
- }, q = v.value.hotels[0].places;
21
- return q && q.forEach((I) => {
22
- y[I.placeType].data.push(I);
21
+ }, M = v.value.hotels[0].places;
22
+ return M && M.forEach((I) => {
23
+ C[I.placeType].data.push(I);
23
24
  }), Object.fromEntries(
24
- Object.entries(y).filter(([, I]) => I.data.length > 0)
25
+ Object.entries(C).filter(([, I]) => I.data.length > 0)
25
26
  );
26
- }), j = _(() => C.value !== 0), A = _(() => {
27
- let y;
28
- if (j.value)
29
- y = R.value[C.value].data[0];
27
+ }), W = k(() => _.value !== 0), A = k(() => {
28
+ let C;
29
+ if (W.value)
30
+ C = x.value[_.value].data[0];
30
31
  else if (w.value !== 0) {
31
- const q = m.value, I = R.value[w.value].data;
32
- I.length === 1 ? y = I[0] : q !== void 0 && I.forEach((se) => {
33
- String(se.id) === String(q) && (y = se);
32
+ const M = m.value, I = x.value[w.value].data;
33
+ I.length === 1 ? C = I[0] : M !== void 0 && I.forEach((se) => {
34
+ String(se.id) === String(M) && (C = se);
34
35
  });
35
36
  }
36
- return y;
37
- }), X = _(() => !(!u.value || !h.value || !(i.value.length >= 5) || !b.value || A.value === void 0)), L = _(() => !(r.value === T.InitialState && $.value)), s = _(() => !!(r.value === T.WaitingForResponse && $.value));
38
- async function n() {
37
+ return C;
38
+ }), R = k(() => !(!u.value || !h.value || !(i.value.length >= 5) || !b.value || A.value === void 0)), s = k(() => !(r.value === T.InitialState && $.value)), n = k(() => !!(r.value === T.WaitingForResponse && $.value));
39
+ async function j() {
39
40
  r.value = T.WaitingForResponse, $.value = !0, await me.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
40
41
  termsOfserviceURL: window.location.origin,
41
42
  checkoutUrl: window.location.origin,
@@ -44,7 +45,7 @@ const oe = ue("giftCard", () => {
44
45
  amount: b.value,
45
46
  quantity: f.value,
46
47
  freeText: S.value,
47
- showPrice: x.value,
48
+ showPrice: q.value,
48
49
  contactName: u.value,
49
50
  contactEmail: h.value,
50
51
  contactPhone: i.value,
@@ -57,17 +58,17 @@ const oe = ue("giftCard", () => {
57
58
  headers: {
58
59
  Authorization: c.value,
59
60
  Accept: "application/json",
60
- "Fresh-Booking-Ver": "4.0.56-rc31"
61
+ "Fresh-Booking-Ver": "4.0.56-rc33"
61
62
  }
62
- }).then((y) => {
63
+ }).then((C) => {
63
64
  r.value = T.ReadyToPay, $.value = !1, g({
64
65
  callback: () => console.log("Callback!"),
65
- response: y.data
66
+ response: C.data
66
67
  });
67
68
  });
68
69
  }
69
- function N(y) {
70
- y && (C.value = y);
70
+ function ee(C) {
71
+ C && (_.value = C);
71
72
  }
72
73
  return {
73
74
  selectedPlace: A,
@@ -77,24 +78,24 @@ const oe = ue("giftCard", () => {
77
78
  phone: i,
78
79
  value: b,
79
80
  remark: S,
80
- showValue: x,
81
+ showValue: q,
81
82
  quantity: f,
82
83
  media: a,
83
84
  placeId: m,
84
85
  placeType: w,
85
- showFormPage: E,
86
- showPaymentPage: ie,
87
- showConfirmationPage: Q,
88
- places: R,
89
- hasFilledForm: X,
90
- hasForcedPlaceType: j,
91
- isWaitingForResponse: s,
92
- isMetaDataAvailable: L,
86
+ showFormPage: U,
87
+ showPaymentPage: Q,
88
+ showConfirmationPage: N,
89
+ places: x,
90
+ hasFilledForm: R,
91
+ hasForcedPlaceType: W,
92
+ isWaitingForResponse: n,
93
+ isMetaDataAvailable: s,
93
94
  termsOfService: B,
94
- orderGiftCard: n,
95
- initialize: N
95
+ orderGiftCard: j,
96
+ initialize: ee
96
97
  };
97
- }), je = { class: "media-selector" }, Ne = ["accept"], We = { class: "media-selector-wrapper" }, He = { class: "media-selector-tools" }, Ke = { key: 0 }, Ye = { key: 1 }, Ze = { key: 2 }, Je = ["src"], Qe = /* @__PURE__ */ z({
98
+ }), Ne = { class: "media-selector" }, We = ["accept"], je = { class: "media-selector-wrapper" }, He = { class: "media-selector-tools" }, Ke = { key: 0 }, Ze = { key: 1 }, Je = { key: 2 }, Xe = ["src"], Ye = /* @__PURE__ */ O({
98
99
  __name: "MediaSelector",
99
100
  props: {
100
101
  modelValue: {},
@@ -105,7 +106,7 @@ const oe = ue("giftCard", () => {
105
106
  },
106
107
  emits: ["update:modelValue"],
107
108
  setup(g, { emit: c }) {
108
- const v = c, t = g, { t: p } = J(), { display: r } = ge(), u = V(), h = _(() => t.modelValue.base64 !== "");
109
+ const v = c, t = g, { t: p } = Y(), { display: r } = ge(), u = V(), h = k(() => t.modelValue.base64 !== "");
109
110
  function i(a) {
110
111
  v("update:modelValue", a);
111
112
  }
@@ -119,30 +120,30 @@ const oe = ue("giftCard", () => {
119
120
  function f() {
120
121
  u.value && u.value.click();
121
122
  }
122
- function x(a, m) {
123
- const [w, $] = [a.name, a.type], C = new FileReader();
124
- C.onload = function(U) {
125
- if (U.target) {
126
- const B = U.target.result;
123
+ function q(a, m) {
124
+ const [w, $] = [a.name, a.type], _ = new FileReader();
125
+ _.onload = function(E) {
126
+ if (E.target) {
127
+ const B = E.target.result;
127
128
  m({ base64: B, name: w, type: $ });
128
129
  } else
129
130
  r({
130
131
  message: p("imageUploadError"),
131
132
  type: "error"
132
133
  });
133
- }, C.readAsDataURL(a);
134
+ }, _.readAsDataURL(a);
134
135
  }
135
136
  async function S() {
136
137
  let a;
137
- (a = u.value.files) instanceof FileList && x(a[0], i);
138
+ (a = u.value.files) instanceof FileList && q(a[0], i);
138
139
  }
139
- return (a, m) => (d(), M(he, {
140
+ return (a, m) => (d(), G(he, {
140
141
  label: a.label,
141
142
  required: a.required,
142
143
  type: "media"
143
144
  }, {
144
- default: G(() => [
145
- l("div", je, [
145
+ default: L(() => [
146
+ l("div", Ne, [
146
147
  l("input", {
147
148
  ref_key: "fileInput",
148
149
  ref: u,
@@ -151,11 +152,11 @@ const oe = ue("giftCard", () => {
151
152
  accept: a.validation,
152
153
  single: "",
153
154
  onChange: m[0] || (m[0] = (w) => S())
154
- }, null, 40, Ne),
155
- l("div", We, [
155
+ }, null, 40, We),
156
+ l("div", je, [
156
157
  l("ul", He, [
157
- h.value ? F("", !0) : (d(), k("li", Ke, [
158
- o(O, {
158
+ h.value ? F("", !0) : (d(), y("li", Ke, [
159
+ o(D, {
159
160
  label: e(p)("uploadFile"),
160
161
  type: "button",
161
162
  icon: "upload",
@@ -163,8 +164,8 @@ const oe = ue("giftCard", () => {
163
164
  onClickEvent: m[1] || (m[1] = (w) => f())
164
165
  }, null, 8, ["label", "icon-color"])
165
166
  ])),
166
- h.value ? (d(), k("li", Ye, [
167
- o(O, {
167
+ h.value ? (d(), y("li", Ze, [
168
+ o(D, {
168
169
  label: e(p)("replaceFile"),
169
170
  type: "button",
170
171
  icon: "repeat-alt",
@@ -172,8 +173,8 @@ const oe = ue("giftCard", () => {
172
173
  onClickEvent: m[2] || (m[2] = (w) => f())
173
174
  }, null, 8, ["label", "icon-color"])
174
175
  ])) : F("", !0),
175
- h.value ? (d(), k("li", Ze, [
176
- o(O, {
176
+ h.value ? (d(), y("li", Je, [
177
+ o(D, {
177
178
  label: e(p)("removeFile"),
178
179
  type: "button",
179
180
  icon: "trash-alt",
@@ -188,10 +189,10 @@ const oe = ue("giftCard", () => {
188
189
  { opened: h.value }
189
190
  ])
190
191
  }, [
191
- a.modelValue ? (d(), k("img", {
192
+ a.modelValue ? (d(), y("img", {
192
193
  key: 0,
193
194
  src: a.modelValue.base64
194
- }, null, 8, Je)) : F("", !0)
195
+ }, null, 8, Xe)) : F("", !0)
195
196
  ], 2)
196
197
  ])
197
198
  ])
@@ -220,83 +221,83 @@ function de(g) {
220
221
  }
221
222
  });
222
223
  }
223
- typeof de == "function" && de(Qe);
224
- const Xe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-form" }, aa = /* @__PURE__ */ z({
224
+ typeof de == "function" && de(Ye);
225
+ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-form" }, aa = /* @__PURE__ */ O({
225
226
  __name: "GiftCardSkeleton",
226
227
  setup(g) {
227
- return (c, v) => (d(), k("div", Xe, [
228
+ return (c, v) => (d(), y("div", Qe, [
228
229
  l("div", ea, [
229
- o(D),
230
- o(D),
231
- o(D),
232
- o(D),
233
- o(D, { "is-text-area": "" }),
230
+ o(z),
231
+ o(z),
232
+ o(z),
233
+ o(z),
234
+ o(z, { "is-text-area": "" }),
234
235
  o(be, { height: "44px" })
235
236
  ])
236
237
  ]));
237
238
  }
238
- }), ta = /* @__PURE__ */ ne(aa, [["__scopeId", "data-v-ba3efaa1"]]), la = { class: "konnectio-accept-terms" }, oa = /* @__PURE__ */ z({
239
+ }), ta = /* @__PURE__ */ ie(aa, [["__scopeId", "data-v-ba3efaa1"]]), la = { class: "konnectio-accept-terms" }, oa = /* @__PURE__ */ O({
239
240
  __name: "_",
240
241
  props: {
241
242
  content: {},
242
243
  buttonLabel: {}
243
244
  },
244
245
  setup(g) {
245
- const { t: c } = J(), v = V(!1);
246
- return (t, p) => (d(), k("div", la, [
246
+ const { t: c } = Y(), v = V(!1);
247
+ return (t, p) => (d(), y("div", la, [
247
248
  o(e(ke), {
248
249
  keypath: "general.termsAndConditionsNotice",
249
250
  tag: "span",
250
251
  scope: "global"
251
252
  }, {
252
- button: G(() => [
253
- l("i", null, '"' + Z(t.buttonLabel) + '"', 1)
253
+ button: L(() => [
254
+ l("i", null, '"' + X(t.buttonLabel) + '"', 1)
254
255
  ]),
255
- terms: G(() => [
256
+ terms: L(() => [
256
257
  l("a", {
257
258
  class: "konnectio-accept-terms-link",
258
259
  target: "_blank",
259
260
  onClick: p[0] || (p[0] = ye((r) => v.value = !0, ["prevent"]))
260
261
  }, [
261
- l("span", null, Z(e(c)("general.termsAndConditions")), 1)
262
+ l("span", null, X(e(c)("general.termsAndConditions")), 1)
262
263
  ])
263
264
  ]),
264
265
  _: 1
265
266
  }),
266
- o(ze, {
267
+ o(Oe, {
267
268
  modelValue: v.value,
268
269
  "onUpdate:modelValue": p[1] || (p[1] = (r) => v.value = r),
269
270
  description: t.content
270
271
  }, null, 8, ["modelValue", "description"])
271
272
  ]));
272
273
  }
273
- }), na = /* @__PURE__ */ ne(oa, [["__scopeId", "data-v-c9c826cf"]]), ia = /* @__PURE__ */ z({
274
+ }), na = /* @__PURE__ */ ie(oa, [["__scopeId", "data-v-c9c826cf"]]), ia = /* @__PURE__ */ O({
274
275
  __name: "GiftCard",
275
276
  setup(g) {
276
- const { t: c } = J(), v = oe();
277
- return (t, p) => (d(), M(na, {
277
+ const { t: c } = Y(), v = ne();
278
+ return (t, p) => (d(), G(na, {
278
279
  content: e(v).termsOfService,
279
280
  "button-label": e(c)("giftCard.orderGiftCard")
280
281
  }, null, 8, ["content", "button-label"]));
281
282
  }
282
- }), sa = (g) => (Ee("data-v-30c8e35c"), g = g(), Ae(), g), ra = {
283
+ }), sa = (g) => (Ue("data-v-1dbfbbf9"), g = g(), Ae(), g), ra = {
283
284
  key: 0,
284
- id: "konnectio-gift-card-wrapper"
285
- }, da = { id: "konnectio-gift-card-title" }, ca = { id: "konnectio-gift-card-content" }, ua = { id: "konnectio-gift-card-payment" }, pa = ["innerHTML"], ma = { key: 0 }, fa = {
285
+ id: "konnectio-gift-card-module"
286
+ }, da = { id: "konnectio-gift-card-wrapper" }, ca = { id: "konnectio-gift-card-title" }, ua = { id: "konnectio-gift-card-content" }, pa = { id: "konnectio-gift-card-payment" }, ma = ["innerHTML"], fa = { key: 0 }, va = {
286
287
  key: 0,
287
288
  id: "fresh-booking-select-place-type"
288
- }, va = {
289
+ }, ga = {
289
290
  class: /* @__PURE__ */ ce(["fresh-booking-label", "required"])
290
- }, ga = { id: "fresh-booking-select-place-type-input" }, ha = ["innerHTML"], ba = {
291
+ }, ha = { id: "fresh-booking-select-place-type-input" }, ba = ["innerHTML"], ya = {
291
292
  key: 0,
292
293
  id: "konnectio-gift-card-order"
293
- }, ya = { class: "fresh-booking-panel" }, ka = {
294
+ }, ka = { class: "fresh-booking-panel" }, _a = {
294
295
  key: 1,
295
296
  id: "konnectio-gift-card-remarks"
296
- }, _a = {
297
+ }, Ca = {
297
298
  key: 2,
298
299
  id: "konnectio-gift-card-order-minimal"
299
- }, Ca = /* @__PURE__ */ sa(() => /* @__PURE__ */ l("div", { class: "konnectio-divider" }, null, -1)), Va = { id: "konnectio-gift-card-recaptcha" }, wa = /* @__PURE__ */ z({
300
+ }, Va = /* @__PURE__ */ sa(() => /* @__PURE__ */ l("div", { class: "konnectio-divider" }, null, -1)), wa = { id: "konnectio-gift-card-recaptcha" }, Fa = /* @__PURE__ */ O({
300
301
  name: "GiftCardLayout",
301
302
  __name: "GiftCard",
302
303
  props: {
@@ -306,10 +307,10 @@ const Xe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
306
307
  styling: {}
307
308
  },
308
309
  setup(g) {
309
- const c = g, v = _(() => ({
310
+ const c = g, v = k(() => ({
310
311
  panelMaxWidth: "800px",
311
312
  ...c.styling
312
- })), { t } = J(), {
313
+ })), { t } = Y(), {
313
314
  name: p,
314
315
  email: r,
315
316
  phone: u,
@@ -317,196 +318,196 @@ const Xe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
317
318
  remark: i,
318
319
  showValue: b,
319
320
  quantity: f,
320
- media: x,
321
+ media: q,
321
322
  placeId: S,
322
323
  placeType: a,
323
324
  showFormPage: m,
324
325
  showPaymentPage: w,
325
326
  showConfirmationPage: $,
326
- places: C,
327
- hasFilledForm: U,
327
+ places: _,
328
+ hasFilledForm: E,
328
329
  hasForcedPlaceType: B,
329
- isWaitingForResponse: E,
330
- isMetaDataAvailable: ie
331
- } = te(oe()), { initialize: Q, orderGiftCard: R } = oe(), { isRecaptchaEnabled: j, currency: A, hasError: X } = te(le());
330
+ isWaitingForResponse: U
331
+ } = le(ne()), { initialize: Q, orderGiftCard: N } = ne(), { isRecaptchaEnabled: x, currency: W, hasError: A } = le(oe());
332
332
  return _e(a, () => {
333
333
  S.value = void 0;
334
334
  }), Ce(() => {
335
- const L = c.placeType ? parseInt(c.placeType) : void 0;
336
- Q(L);
337
- }), (L, s) => (d(), M(Ue, { styling: v.value }, {
338
- default: G(() => [
339
- (d(), M(Ve, null, {
340
- default: G(() => [
335
+ const R = c.placeType ? parseInt(c.placeType) : void 0;
336
+ Q(R);
337
+ }), (R, s) => (d(), G(Ee, { styling: v.value }, {
338
+ default: L(() => [
339
+ (d(), G(Ve, null, {
340
+ default: L(() => [
341
341
  o($e, {
342
- id: "konnectio-gift-card-module",
343
342
  type: "gift-card",
344
- "access-token": L.accessToken,
345
- "data-layout": L.layout
343
+ "access-token": R.accessToken,
344
+ "data-layout": R.layout
346
345
  }, {
347
- default: G(() => [
348
- e(X) ? (d(), M(Oe, {
346
+ default: L(() => [
347
+ e(A) ? (d(), G(De, {
349
348
  key: 1,
350
349
  title: "Unable to render Gift card module",
351
350
  description: "Gift card functionality hasn't been setup for this account. Please contact Octopus PMS for support."
352
- })) : (d(), k("div", ra, [
353
- l("h2", da, [
354
- l("span", null, Z(e(t)("giftCard.title")), 1)
355
- ]),
356
- l("div", ca, [
357
- W(l("div", ua, [
358
- o(qe)
359
- ], 512), [
360
- [H, e(w)]
351
+ })) : (d(), y("div", ra, [
352
+ l("div", da, [
353
+ l("h2", ca, [
354
+ l("span", null, X(e(t)("giftCard.title")), 1)
361
355
  ]),
362
- W(l("div", null, [
363
- l("p", {
364
- id: "konnectio-gift-card-description",
365
- innerHTML: e(t)("giftCard.description")
366
- }, null, 8, pa),
367
- l("form", null, [
368
- e(B) ? F("", !0) : (d(), k("div", ma, [
369
- e(C) ? (d(), k("div", fa, [
370
- l("label", va, [
371
- l("span", null, Z(e(t)("giftCard.selectType")), 1)
372
- ]),
373
- l("div", ga, [
374
- l("ul", null, [
375
- (d(!0), k(we, null, Fe(e(C), (n, N) => (d(), k("li", { key: N }, [
376
- o(xe, {
377
- modelValue: e(a),
378
- "onUpdate:modelValue": s[0] || (s[0] = (y) => P(a) ? a.value = y : null),
379
- type: "radio",
380
- name: "placeType",
381
- val: N,
382
- label: n.label
383
- }, null, 8, ["modelValue", "val", "label"])
384
- ]))), 128))
356
+ l("div", ua, [
357
+ H(l("div", pa, [
358
+ o(qe)
359
+ ], 512), [
360
+ [K, e(w)]
361
+ ]),
362
+ H(l("div", null, [
363
+ l("p", {
364
+ id: "konnectio-gift-card-description",
365
+ innerHTML: e(t)("giftCard.description")
366
+ }, null, 8, ma),
367
+ l("form", null, [
368
+ e(B) ? F("", !0) : (d(), y("div", fa, [
369
+ e(_) ? (d(), y("div", va, [
370
+ l("label", ga, [
371
+ l("span", null, X(e(t)("giftCard.selectType")), 1)
385
372
  ]),
386
- e(C)[e(a)] && e(C)[e(a)].data.length > 1 ? (d(), M(Pe, {
387
- key: 0,
388
- modelValue: e(S),
389
- "onUpdate:modelValue": s[1] || (s[1] = (n) => P(S) ? S.value = n : null),
390
- placeholder: e(t)("giftCard.selectPlacePlaceholder"),
391
- options: e(C)[e(a)].data,
392
- labelKey: "name",
393
- valueKey: "id",
394
- required: ""
395
- }, null, 8, ["modelValue", "placeholder", "options"])) : F("", !0)
396
- ])
397
- ])) : (d(), M(Se, { key: 1 }))
398
- ])),
399
- o(K, {
400
- modelValue: e(p),
401
- "onUpdate:modelValue": s[2] || (s[2] = (n) => P(p) ? p.value = n : null),
402
- type: "text",
403
- name: "name",
404
- autocomplete: "name",
405
- label: e(t)("giftCard.name"),
406
- icon: "user-alt",
407
- placeholder: e(t)("giftCard.namePlaceholder"),
408
- required: ""
409
- }, null, 8, ["modelValue", "label", "placeholder"]),
410
- o(K, {
411
- modelValue: e(r),
412
- "onUpdate:modelValue": s[3] || (s[3] = (n) => P(r) ? r.value = n : null),
413
- type: "email",
414
- name: "email",
415
- autocomplete: "email",
416
- label: e(t)("giftCard.email"),
417
- icon: "at",
418
- placeholder: e(t)("giftCard.emailPlaceholder"),
419
- required: ""
420
- }, null, 8, ["modelValue", "label", "placeholder"]),
421
- o(Be, {
422
- modelValue: e(u),
423
- "onUpdate:modelValue": s[4] || (s[4] = (n) => P(u) ? u.value = n : null),
424
- icon: "phone-office",
425
- label: e(t)("giftCard.phone"),
426
- placeholder: e(t)("giftCard.phonePlaceholder"),
427
- required: ""
428
- }, null, 8, ["modelValue", "label", "placeholder"]),
429
- o(K, {
430
- modelValue: e(h),
431
- "onUpdate:modelValue": s[5] || (s[5] = (n) => P(h) ? h.value = n : null),
432
- type: "number",
433
- name: "value",
434
- label: e(t)("giftCard.value"),
435
- icon: "money-bill",
436
- placeholder: e(t)("giftCard.valuePlaceholder"),
437
- suffix: e(A),
438
- required: ""
439
- }, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
440
- F("", !0),
441
- F("", !0),
442
- o(Te, {
443
- modelValue: e(f),
444
- "onUpdate:modelValue": s[8] || (s[8] = (n) => P(f) ? f.value = n : null),
445
- label: e(t)("giftCard.quantity"),
446
- icon: "gift-card",
447
- required: ""
448
- }, null, 8, ["modelValue", "label"])
373
+ l("div", ha, [
374
+ l("ul", null, [
375
+ (d(!0), y(we, null, Fe(e(_), (n, j) => (d(), y("li", { key: j }, [
376
+ o(Be, {
377
+ modelValue: e(a),
378
+ "onUpdate:modelValue": s[0] || (s[0] = (ee) => P(a) ? a.value = ee : null),
379
+ type: "radio",
380
+ name: "placeType",
381
+ val: j,
382
+ label: n.label
383
+ }, null, 8, ["modelValue", "val", "label"])
384
+ ]))), 128))
385
+ ]),
386
+ e(_)[e(a)] && e(_)[e(a)].data.length > 1 ? (d(), G(Pe, {
387
+ key: 0,
388
+ modelValue: e(S),
389
+ "onUpdate:modelValue": s[1] || (s[1] = (n) => P(S) ? S.value = n : null),
390
+ placeholder: e(t)("giftCard.selectPlacePlaceholder"),
391
+ options: e(_)[e(a)].data,
392
+ labelKey: "name",
393
+ valueKey: "id",
394
+ required: ""
395
+ }, null, 8, ["modelValue", "placeholder", "options"])) : F("", !0)
396
+ ])
397
+ ])) : (d(), G(Se, { key: 1 }))
398
+ ])),
399
+ o(Z, {
400
+ modelValue: e(p),
401
+ "onUpdate:modelValue": s[2] || (s[2] = (n) => P(p) ? p.value = n : null),
402
+ type: "text",
403
+ name: "name",
404
+ autocomplete: "name",
405
+ label: e(t)("giftCard.name"),
406
+ icon: "user-alt",
407
+ placeholder: e(t)("giftCard.namePlaceholder"),
408
+ required: ""
409
+ }, null, 8, ["modelValue", "label", "placeholder"]),
410
+ o(Z, {
411
+ modelValue: e(r),
412
+ "onUpdate:modelValue": s[3] || (s[3] = (n) => P(r) ? r.value = n : null),
413
+ type: "email",
414
+ name: "email",
415
+ autocomplete: "email",
416
+ label: e(t)("giftCard.email"),
417
+ icon: "at",
418
+ placeholder: e(t)("giftCard.emailPlaceholder"),
419
+ required: ""
420
+ }, null, 8, ["modelValue", "label", "placeholder"]),
421
+ o(xe, {
422
+ modelValue: e(u),
423
+ "onUpdate:modelValue": s[4] || (s[4] = (n) => P(u) ? u.value = n : null),
424
+ icon: "phone-office",
425
+ label: e(t)("giftCard.phone"),
426
+ placeholder: e(t)("giftCard.phonePlaceholder"),
427
+ required: ""
428
+ }, null, 8, ["modelValue", "label", "placeholder"]),
429
+ o(Z, {
430
+ modelValue: e(h),
431
+ "onUpdate:modelValue": s[5] || (s[5] = (n) => P(h) ? h.value = n : null),
432
+ type: "number",
433
+ name: "value",
434
+ label: e(t)("giftCard.value"),
435
+ icon: "money-bill",
436
+ placeholder: e(t)("giftCard.valuePlaceholder"),
437
+ suffix: e(W),
438
+ required: ""
439
+ }, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
440
+ F("", !0),
441
+ F("", !0),
442
+ o(Te, {
443
+ modelValue: e(f),
444
+ "onUpdate:modelValue": s[8] || (s[8] = (n) => P(f) ? f.value = n : null),
445
+ label: e(t)("giftCard.quantity"),
446
+ icon: "gift-card",
447
+ required: ""
448
+ }, null, 8, ["modelValue", "label"])
449
+ ])
450
+ ], 512), [
451
+ [K, e(m)]
452
+ ]),
453
+ H(l("div", null, [
454
+ l("div", {
455
+ innerHTML: e(t)("giftCard.thankYou")
456
+ }, null, 8, ba)
457
+ ], 512), [
458
+ [K, e($)]
449
459
  ])
450
- ], 512), [
451
- [H, e(m)]
452
460
  ]),
453
- W(l("div", null, [
454
- l("div", {
455
- innerHTML: e(t)("giftCard.thankYou")
456
- }, null, 8, ha)
457
- ], 512), [
458
- [H, e($)]
459
- ])
460
- ]),
461
- L.layout !== "minimal" && e(m) ? (d(), k("div", ba, [
462
- l("div", ya, [
463
- o(O, {
461
+ R.layout !== "minimal" && e(m) ? (d(), y("div", ya, [
462
+ l("div", ka, [
463
+ o(D, {
464
+ label: e(t)("giftCard.orderGiftCard"),
465
+ "full-width": !0,
466
+ disabled: !e(E),
467
+ "is-loading": e(U),
468
+ "onUpdate:isLoading": s[9] || (s[9] = (n) => P(U) ? U.value = n : null),
469
+ onClickEvent: e(N)
470
+ }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"])
471
+ ])
472
+ ])) : F("", !0),
473
+ e(m) ? (d(), y("div", _a, [
474
+ o(Z, {
475
+ modelValue: e(i),
476
+ "onUpdate:modelValue": s[10] || (s[10] = (n) => P(i) ? i.value = n : null),
477
+ type: "textarea",
478
+ name: "remark",
479
+ label: e(t)("giftCard.remark"),
480
+ icon: "info-circle",
481
+ placeholder: e(t)("giftCard.remarkPlaceholder")
482
+ }, null, 8, ["modelValue", "label", "placeholder"])
483
+ ])) : F("", !0),
484
+ e(m) ? (d(), y("div", Ca, [
485
+ o(D, {
464
486
  label: e(t)("giftCard.orderGiftCard"),
465
487
  "full-width": !0,
466
- disabled: !e(U),
467
- "is-loading": e(E),
468
- "onUpdate:isLoading": s[9] || (s[9] = (n) => P(E) ? E.value = n : null),
469
- onClickEvent: e(R)
470
- }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"])
471
- ])
472
- ])) : F("", !0),
473
- e(m) ? (d(), k("div", ka, [
474
- o(K, {
475
- modelValue: e(i),
476
- "onUpdate:modelValue": s[10] || (s[10] = (n) => P(i) ? i.value = n : null),
477
- type: "textarea",
478
- name: "remark",
479
- label: e(t)("giftCard.remark"),
480
- icon: "info-circle",
481
- placeholder: e(t)("giftCard.remarkPlaceholder")
482
- }, null, 8, ["modelValue", "label", "placeholder"])
483
- ])) : F("", !0),
484
- e(m) ? (d(), k("div", _a, [
485
- o(O, {
486
- label: e(t)("giftCard.orderGiftCard"),
487
- "full-width": !0,
488
- disabled: !e(U),
489
- "data-test": "orderGiftCard",
490
- "is-loading": e(E),
491
- "onUpdate:isLoading": s[11] || (s[11] = (n) => P(E) ? E.value = n : null),
492
- onClickEvent: e(R)
493
- }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"]),
494
- l("div", null, [
495
- Ca,
496
- o(ia)
497
- ]),
498
- W(l("div", Va, [
499
- o(De)
500
- ], 512), [
501
- [H, e(j)]
502
- ])
503
- ])) : F("", !0)
488
+ disabled: !e(E),
489
+ "data-test": "orderGiftCard",
490
+ "is-loading": e(U),
491
+ "onUpdate:isLoading": s[11] || (s[11] = (n) => P(U) ? U.value = n : null),
492
+ onClickEvent: e(N)
493
+ }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"]),
494
+ l("div", null, [
495
+ Va,
496
+ o(ia)
497
+ ]),
498
+ H(l("div", wa, [
499
+ o(ze)
500
+ ], 512), [
501
+ [K, e(x)]
502
+ ])
503
+ ])) : F("", !0)
504
+ ])
504
505
  ]))
505
506
  ]),
506
507
  _: 1
507
508
  }, 8, ["access-token", "data-layout"])
508
509
  ]),
509
- fallback: G(() => [
510
+ fallback: L(() => [
510
511
  o(ta)
511
512
  ]),
512
513
  _: 1
@@ -515,8 +516,8 @@ const Xe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
515
516
  _: 1
516
517
  }, 8, ["styling"]));
517
518
  }
518
- }), Y = /* @__PURE__ */ ne(wa, [["__scopeId", "data-v-30c8e35c"]]), Fa = Ie(), Pa = Re();
519
- class Sa extends HTMLElement {
519
+ }), J = /* @__PURE__ */ ie(Fa, [["__scopeId", "data-v-1dbfbbf9"]]), Pa = Ie(), Sa = Me();
520
+ class Ta extends HTMLElement {
520
521
  vueApp;
521
522
  constructor() {
522
523
  super();
@@ -525,7 +526,7 @@ class Sa extends HTMLElement {
525
526
  this.vueApp.unmount();
526
527
  }
527
528
  connectedCallback() {
528
- const c = typeof Y == "function" ? Y.options : Y;
529
+ const c = typeof J == "function" ? J.options : J;
529
530
  let v = Array.isArray(c.props) ? c.props : Object.keys(c.props || {});
530
531
  const t = (i) => i.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (b, f) => (f ? "-" : "") + b.toLowerCase()), p = (i) => i.replace(/-./g, (b) => b[1].toUpperCase()), r = {};
531
532
  v = v.map(t);
@@ -538,12 +539,12 @@ class Sa extends HTMLElement {
538
539
  let b = this.attributes.getNamedItem(i)?.value;
539
540
  u.hasOwnProperty(i) && (b = u[i]), r[i] = b;
540
541
  }
541
- this.vueApp = Le(Y, r), this.vueApp.provide("emitter", Pa), this.vueApp.use(Fa), this.vueApp.use(Me), this.vueApp.use(Ge, { bootstrap: !0 });
542
+ this.vueApp = Re(J, r), this.vueApp.provide("emitter", Sa), this.vueApp.use(Pa), this.vueApp.use(Ge), this.vueApp.use(Le, { bootstrap: !0 });
542
543
  const h = document.createElement("div");
543
544
  this.vueApp.mount(h), this.appendChild(h.children[0]);
544
545
  }
545
546
  }
546
- window.customElements.define("konnectio-gift-card", Sa);
547
+ window.customElements.define("konnectio-gift-card", Ta);
547
548
  export {
548
- Sa as default
549
+ Ta as default
549
550
  };