@konnectio/core 4.0.56-rc39 → 4.0.56-rc40

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