@konnectio/core 4.0.56-rc5 → 4.0.56-rc7

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 (128) hide show
  1. package/dist/{ActionField--byx0Lp1.js → ActionField-i2xWkFyi.js} +1 -1
  2. package/dist/ActionField-i2xWkFyi.js.br +0 -0
  3. package/dist/AvailabilitySkeleton-PWA_yfC-.js +214 -0
  4. package/dist/AvailabilitySkeleton-PWA_yfC-.js.br +0 -0
  5. package/dist/{CheckoutWindow-_ZUCAYgm.js → CheckoutWindow-k3-Mh7Mp.js} +17 -17
  6. package/dist/CheckoutWindow-k3-Mh7Mp.js.br +0 -0
  7. package/dist/{DateField.vue_vue_type_style_index_0_lang-v-NT3HRG.js → DateField.vue_vue_type_style_index_0_lang-Lzoa_ZgT.js} +2910 -2918
  8. package/dist/DateField.vue_vue_type_style_index_0_lang-Lzoa_ZgT.js.br +0 -0
  9. package/dist/{Field-GdMucFcQ.js → Field-f9KUVLIW.js} +7 -7
  10. package/dist/Field-f9KUVLIW.js.br +0 -0
  11. package/dist/SelectField.vue_vue_type_style_index_0_lang-1RNEqBhG.js +30460 -0
  12. package/dist/SelectField.vue_vue_type_style_index_0_lang-1RNEqBhG.js.br +0 -0
  13. package/dist/{ThankYou-9pzt2SfJ.js → ThankYou-cAeMnWCk.js} +4325 -4567
  14. package/dist/ThankYou-cAeMnWCk.js.br +0 -0
  15. package/dist/{_-5uiOrU07.js → _-SqGSx3KP.js} +1 -1
  16. package/dist/{_commonjsHelpers-4t9S7M5p.js → _commonjsHelpers-2ufMB8rV.js} +1 -1
  17. package/dist/availability.js +138 -108
  18. package/dist/availability.js.br +0 -0
  19. package/dist/components/Alert.vue.d.ts +4 -27
  20. package/dist/components/Clickable.vue.d.ts +4 -59
  21. package/dist/components/Container.vue.d.ts +4 -22
  22. package/dist/components/ErrorMessage.vue.d.ts +4 -14
  23. package/dist/components/Gallery.vue.d.ts +4 -30
  24. package/dist/components/GoogleNotice.vue.d.ts +4 -2
  25. package/dist/components/Icon.vue.d.ts +4 -37
  26. package/dist/components/Loading.vue.d.ts +4 -28
  27. package/dist/components/Spinner.vue.d.ts +3 -1
  28. package/dist/components/forms/EventAvailabilityForm.vue.d.ts +4 -17
  29. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +4 -33
  30. package/dist/components/forms/HotelReservationForm.vue.d.ts +4 -41
  31. package/dist/components/forms/MultiStepForm.vue.d.ts +4 -42
  32. package/dist/components/forms/ReservationForm.vue.d.ts +5 -62
  33. package/dist/components/forms/_.vue.d.ts +4 -42
  34. package/dist/components/inputs/Checkbox.vue.d.ts +4 -54
  35. package/dist/components/inputs/CheckboxField.vue.d.ts +4 -28
  36. package/dist/components/inputs/DateField.vue.d.ts +5 -104
  37. package/dist/components/inputs/InputField.vue.d.ts +4 -61
  38. package/dist/components/inputs/MediaSelector.vue.d.ts +4 -42
  39. package/dist/components/inputs/NumberField.vue.d.ts +5 -87
  40. package/dist/components/inputs/SelectField.vue.d.ts +5 -90
  41. package/dist/components/inputs/TextField.vue.d.ts +4 -67
  42. package/dist/components/inputs/TimeField.vue.d.ts +5 -44
  43. package/dist/components/inputs/grouped/ActionField.vue.d.ts +4 -71
  44. package/dist/components/inputs/grouped/CountryField.vue.d.ts +4 -40
  45. package/dist/components/inputs/grouped/NameField.vue.d.ts +4 -70
  46. package/dist/components/inputs/grouped/PhoneField.vue.d.ts +4 -50
  47. package/dist/components/inputs/grouped/RoomConfigField.vue.d.ts +4 -46
  48. package/dist/components/listings/Base.vue.d.ts +5 -55
  49. package/dist/components/listings/Event.vue.d.ts +4 -46
  50. package/dist/components/listings/Hotel.vue.d.ts +4 -15
  51. package/dist/components/listings/Template.vue.d.ts +4 -20
  52. package/dist/components/side-panels/Base.vue.d.ts +5 -60
  53. package/dist/components/side-panels/ListingInfo.vue.d.ts +4 -17
  54. package/dist/components/side-panels/Template.vue.d.ts +4 -17
  55. package/dist/components/side-panels/TermsOfService.vue.d.ts +4 -13
  56. package/dist/components/skeletons/AvailabilitySkeleton.vue.d.ts +4 -32
  57. package/dist/components/skeletons/Field.vue.d.ts +4 -35
  58. package/dist/components/skeletons/GiftCardSkeleton.vue.d.ts +4 -1
  59. package/dist/components/skeletons/HotelSkeleton.vue.d.ts +4 -1
  60. package/dist/components/skeletons/Listing.vue.d.ts +4 -1
  61. package/dist/components/skeletons/Sidebar.vue.d.ts +4 -1
  62. package/dist/components/skeletons/_.vue.d.ts +4 -35
  63. package/dist/components/views/CheckoutWindow.vue.d.ts +4 -1
  64. package/dist/components/views/TermsOfService.vue.d.ts +4 -1
  65. package/dist/components/views/ThankYou.vue.d.ts +4 -14
  66. package/dist/event-WJGagPbM.js +328 -0
  67. package/dist/event-WJGagPbM.js.br +0 -0
  68. package/dist/event.js +431 -412
  69. package/dist/event.js.br +0 -0
  70. package/dist/favicon.ico +0 -0
  71. package/dist/gift-card-validation.js +77 -67
  72. package/dist/gift-card-validation.js.br +0 -0
  73. package/dist/gift-card.js +291 -312
  74. package/dist/gift-card.js.br +0 -0
  75. package/dist/hotel-z4fa3tEa.js +3101 -0
  76. package/dist/hotel-z4fa3tEa.js.br +0 -0
  77. package/dist/hotel.js +11 -3136
  78. package/dist/polyfill.js +159 -159
  79. package/dist/polyfill.js.br +0 -0
  80. package/dist/style.css +1 -1
  81. package/dist/style.css.br +0 -0
  82. package/package.json +14 -16
  83. package/dist/ActionField--byx0Lp1.js.br +0 -0
  84. package/dist/AvailabilitySkeleton-cL6E9wAp.js +0 -239
  85. package/dist/AvailabilitySkeleton-cL6E9wAp.js.br +0 -0
  86. package/dist/CheckoutWindow-_ZUCAYgm.js.br +0 -0
  87. package/dist/Container-6UeOakwz.js +0 -68
  88. package/dist/Container-6UeOakwz.js.br +0 -0
  89. package/dist/DateField.vue_vue_type_style_index_0_lang-v-NT3HRG.js.br +0 -0
  90. package/dist/Field-GdMucFcQ.js.br +0 -5
  91. package/dist/SelectField.vue_vue_type_style_index_0_lang-XwPp5AXD.js +0 -27240
  92. package/dist/SelectField.vue_vue_type_style_index_0_lang-XwPp5AXD.js.br +0 -0
  93. package/dist/ThankYou-9pzt2SfJ.js.br +0 -0
  94. package/dist/assets/typescript/mixins.d.ts +0 -34
  95. package/dist/availability.d.ts +0 -3
  96. package/dist/entries/availability.d.ts +0 -5
  97. package/dist/entries/event.d.ts +0 -2
  98. package/dist/entries/gift-card-validation.d.ts +0 -5
  99. package/dist/entries/gift-card.d.ts +0 -5
  100. package/dist/entries/hotel.d.ts +0 -5
  101. package/dist/entries/navigation.d.ts +0 -1
  102. package/dist/entries/polyfill.d.ts +0 -0
  103. package/dist/event-jnP6wH4w.js +0 -358
  104. package/dist/event-jnP6wH4w.js.br +0 -0
  105. package/dist/event.d.ts +0 -3
  106. package/dist/gift-card-validation.d.ts +0 -3
  107. package/dist/gift-card.d.ts +0 -3
  108. package/dist/hotel.d.ts +0 -3
  109. package/dist/hotel.js.br +0 -0
  110. package/dist/layouts/Availability.vue.d.ts +0 -25
  111. package/dist/layouts/Event.vue.d.ts +0 -18
  112. package/dist/layouts/GiftCard.vue.d.ts +0 -32
  113. package/dist/layouts/GiftCardValidation.vue.d.ts +0 -18
  114. package/dist/layouts/Hotel.vue.d.ts +0 -36
  115. package/dist/layouts/_.vue.d.ts +0 -39
  116. package/dist/navigation.d.ts +0 -1
  117. package/dist/plugins/i18n.d.ts +0 -5
  118. package/dist/polyfill.d.ts +0 -1
  119. package/dist/store/alert.d.ts +0 -28
  120. package/dist/store/applyGiftCard.d.ts +0 -28
  121. package/dist/store/availability.d.ts +0 -40
  122. package/dist/store/event.d.ts +0 -683
  123. package/dist/store/giftCard.d.ts +0 -83
  124. package/dist/store/payment.d.ts +0 -139
  125. package/dist/store/recaptcha.d.ts +0 -28
  126. package/dist/store/tracking.d.ts +0 -57
  127. package/dist/store/utilities.d.ts +0 -350
  128. package/dist/types/index.d.ts +0 -976
package/dist/gift-card.js CHANGED
@@ -1,130 +1,100 @@
1
- var ve = Object.defineProperty;
2
- var ae = Object.getOwnPropertySymbols;
3
- var ge = Object.prototype.hasOwnProperty, be = Object.prototype.propertyIsEnumerable;
4
- var le = (u, t, s) => t in u ? ve(u, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : u[t] = s, te = (u, t) => {
5
- for (var s in t || (t = {}))
6
- ge.call(t, s) && le(u, s, t[s]);
7
- if (ae)
8
- for (var s of ae(t))
9
- be.call(t, s) && le(u, s, t[s]);
10
- return u;
11
- };
12
- var J = (u, t, s) => new Promise((o, r) => {
13
- var h = (m) => {
14
- try {
15
- v(s.next(m));
16
- } catch (g) {
17
- r(g);
18
- }
19
- }, f = (m) => {
20
- try {
21
- v(s.throw(m));
22
- } catch (g) {
23
- r(g);
24
- }
25
- }, v = (m) => m.done ? o(m.value) : Promise.resolve(m.value).then(h, f);
26
- v((s = s.apply(u, t)).next());
27
- });
28
- import { d as ye, u as he, s as X, c as ue, r as _, ad as $, e as Y, f as V, j as oe, S as Q, i as ke, h as Ce, ae as _e, k as Z, F as ce, b as Ve, o as p, m as G, w as B, x as d, l as b, p as n, z as e, C as z, n as T, q as pe, I as Fe, _ as me, a2 as Pe, B as we, G as Te, H as ie, af as W, ag as j, a3 as Se, a4 as Ue, J as C, y as $e, a5 as ne, T as H, A as Ee, P as Re, V as qe, U as Ie, W as Ge, a9 as Le } from "./SelectField.vue_vue_type_style_index_0_lang-XwPp5AXD.js";
29
- import { C as Me } from "./Container-6UeOakwz.js";
30
- import { a as xe, C as se, P as Be, _ as ze } from "./CheckoutWindow-_ZUCAYgm.js";
31
- import { E as Ae } from "./_-5uiOrU07.js";
32
- import { F as x } from "./Field-GdMucFcQ.js";
33
- import "./_commonjsHelpers-4t9S7M5p.js";
34
- const re = ye("giftCard", () => {
35
- const { pay: u } = he(), { bearerToken: t, metaData: s, currencyId: o } = X(ue()), r = _($.InitialState), h = Y("konnectio_name", "", void 0, { serializer: Q.string }), f = Y("konnectio_email", "", void 0, { serializer: Q.string }), v = Y("konnectio_phone", "", void 0, { serializer: Q.string }), m = _(""), g = _(1), S = _(!0), L = _(""), k = _({
1
+ import { d as ue, u as ce, s as J, c as ie, r as y, ae as $, e as Y, f as h, j as ee, S as Z, i as pe, h as me, af as fe, k as Q, B as se, b as ve, o as d, m as L, w as G, x as s, l as m, p as i, z as e, C as B, n as F, q as re, I as ge, _ as de, Y as be, Z as ye, D as he, F as ae, ag as N, ah as W, $ as ke, a6 as Ce, G as b, y as _e, a7 as le, T as j, A as Ve, M as Fe, N as we, R as Pe, U as Te, V as Se, ab as $e } from "./SelectField.vue_vue_type_style_index_0_lang-1RNEqBhG.js";
2
+ import { a as Ue, C as te, P as Ee, _ as Re } from "./CheckoutWindow-k3-Mh7Mp.js";
3
+ import { E as Ie } from "./_-SqGSx3KP.js";
4
+ import { F as A } from "./Field-f9KUVLIW.js";
5
+ import "./_commonjsHelpers-2ufMB8rV.js";
6
+ const oe = ue("giftCard", () => {
7
+ const { pay: w } = ce(), { bearerToken: c, metaData: U, currencyId: t } = J(ie()), n = y($.InitialState), f = Y("konnectio_name", "", void 0, { serializer: Z.string }), u = Y("konnectio_email", "", void 0, { serializer: Z.string }), p = Y("konnectio_phone", "", void 0, { serializer: Z.string }), k = y(""), P = y(1), T = y(!0), M = y(""), g = y({
36
8
  base64: "",
37
9
  type: "",
38
10
  name: ""
39
- }), l = _(void 0), c = _(0), y = _(!1), R = _(0), F = V(() => r.value === $.InitialState || r.value === $.WaitingForResponse), q = V(() => r.value === $.ReadyToPay), M = V(() => r.value === $.PaymentSuccess), P = V(() => {
11
+ }), l = y(void 0), r = y(0), v = y(!1), R = y(0), C = h(() => n.value === $.InitialState || n.value === $.WaitingForResponse), I = h(() => n.value === $.ReadyToPay), x = h(() => n.value === $.PaymentSuccess), _ = h(() => {
40
12
  const a = {
41
13
  1: {
42
- label: oe.t("giftCard.hotelType"),
14
+ label: ee.t("giftCard.hotelType"),
43
15
  data: []
44
16
  },
45
17
  2: {
46
- label: oe.t("giftCard.restaurantType"),
18
+ label: ee.t("giftCard.restaurantType"),
47
19
  data: []
48
20
  }
49
- }, U = s.value.hotels[0].places;
50
- return U && U.forEach((w) => {
51
- a[w.placeType].data.push(w);
21
+ }, S = U.value.hotels[0].places;
22
+ return S && S.forEach((V) => {
23
+ a[V.placeType].data.push(V);
52
24
  }), Object.fromEntries(
53
- Object.entries(a).filter(([, w]) => w.data.length > 0)
25
+ Object.entries(a).filter(([, V]) => V.data.length > 0)
54
26
  );
55
- }), A = V(() => R.value !== 0), E = V(() => {
27
+ }), D = h(() => R.value !== 0), E = h(() => {
56
28
  let a;
57
- if (A.value)
58
- a = P.value[R.value].data[0];
59
- else if (c.value !== 0) {
60
- const U = l.value, w = P.value[c.value].data;
61
- w.length === 1 ? a = w[0] : U !== void 0 && w.forEach((ee) => {
62
- String(ee.id) === String(U) && (a = ee);
29
+ if (D.value)
30
+ a = _.value[R.value].data[0];
31
+ else if (r.value !== 0) {
32
+ const S = l.value, V = _.value[r.value].data;
33
+ V.length === 1 ? a = V[0] : S !== void 0 && V.forEach((X) => {
34
+ String(X.id) === String(S) && (a = X);
63
35
  });
64
36
  }
65
37
  return a;
66
- }), D = V(() => !(!h.value || !f.value || !(v.value.length >= 5) || !m.value || E.value === void 0)), O = V(() => !(r.value === $.InitialState && y.value)), K = V(() => !!(r.value === $.WaitingForResponse && y.value));
67
- function I() {
68
- return J(this, null, function* () {
69
- r.value = $.WaitingForResponse, y.value = !0, yield ke.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
70
- termsOfserviceURL: window.location.origin,
71
- checkoutUrl: window.location.origin,
72
- currencyID: o.value,
73
- language: Ce(),
74
- amount: m.value,
75
- quantity: g.value,
76
- freeText: L.value,
77
- showPrice: S.value,
78
- contactName: h.value,
79
- contactEmail: f.value,
80
- contactPhone: v.value,
81
- imageBase64: _e(k.value.base64),
82
- imageName: k.value.name,
83
- imageFormat: k.value.type,
84
- placeType: E.value ? E.value.placeType : void 0,
85
- placeID: E.value ? E.value.id : void 0
86
- }, {
87
- headers: {
88
- Authorization: t.value,
89
- Accept: "application/json",
90
- "Fresh-Booking-Ver": "4.0.56-rc5"
91
- }
92
- }).then((a) => {
93
- r.value = $.ReadyToPay, y.value = !1, u({
94
- callback: () => console.log("Callback!"),
95
- response: a.data
96
- });
38
+ }), z = h(() => !(!f.value || !u.value || !(p.value.length >= 5) || !k.value || E.value === void 0)), O = h(() => !(n.value === $.InitialState && v.value)), K = h(() => !!(n.value === $.WaitingForResponse && v.value));
39
+ async function q() {
40
+ n.value = $.WaitingForResponse, v.value = !0, await pe.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
41
+ termsOfserviceURL: window.location.origin,
42
+ checkoutUrl: window.location.origin,
43
+ currencyID: t.value,
44
+ language: me(),
45
+ amount: k.value,
46
+ quantity: P.value,
47
+ freeText: M.value,
48
+ showPrice: T.value,
49
+ contactName: f.value,
50
+ contactEmail: u.value,
51
+ contactPhone: p.value,
52
+ imageBase64: fe(g.value.base64),
53
+ imageName: g.value.name,
54
+ imageFormat: g.value.type,
55
+ placeType: E.value ? E.value.placeType : void 0,
56
+ placeID: E.value ? E.value.id : void 0
57
+ }, {
58
+ headers: {
59
+ Authorization: c.value,
60
+ Accept: "application/json",
61
+ "Fresh-Booking-Ver": "4.0.56-rc7"
62
+ }
63
+ }).then((a) => {
64
+ n.value = $.ReadyToPay, v.value = !1, w({
65
+ callback: () => console.log("Callback!"),
66
+ response: a.data
97
67
  });
98
68
  });
99
69
  }
100
- function i(a) {
70
+ function o(a) {
101
71
  a && (R.value = a);
102
72
  }
103
73
  return {
104
74
  selectedPlace: E,
105
- moduleState: r,
106
- name: h,
107
- email: f,
108
- phone: v,
109
- value: m,
110
- remark: L,
111
- showValue: S,
112
- quantity: g,
113
- media: k,
75
+ moduleState: n,
76
+ name: f,
77
+ email: u,
78
+ phone: p,
79
+ value: k,
80
+ remark: M,
81
+ showValue: T,
82
+ quantity: P,
83
+ media: g,
114
84
  placeId: l,
115
- placeType: c,
116
- showFormPage: F,
117
- showPaymentPage: q,
118
- showConfirmationPage: M,
119
- places: P,
120
- hasFilledForm: D,
121
- hasForcedPlaceType: A,
85
+ placeType: r,
86
+ showFormPage: C,
87
+ showPaymentPage: I,
88
+ showConfirmationPage: x,
89
+ places: _,
90
+ hasFilledForm: z,
91
+ hasForcedPlaceType: D,
122
92
  isWaitingForResponse: K,
123
93
  isMetaDataAvailable: O,
124
- orderGiftCard: I,
125
- initialize: i
94
+ orderGiftCard: q,
95
+ initialize: o
126
96
  };
127
- }), De = { class: "media-selector" }, We = ["accept"], je = { class: "media-selector-wrapper" }, He = { class: "media-selector-tools" }, Ne = { key: 0 }, Oe = { key: 1 }, Ke = { key: 2 }, Je = ["src"], Ye = /* @__PURE__ */ Z({
97
+ }), qe = { class: "media-selector" }, Le = ["accept"], Me = { class: "media-selector-wrapper" }, xe = { class: "media-selector-tools" }, Ae = { key: 0 }, Ge = { key: 1 }, Be = { key: 2 }, De = ["src"], ze = /* @__PURE__ */ Q({
128
98
  __name: "MediaSelector",
129
99
  props: {
130
100
  modelValue: {},
@@ -134,96 +104,94 @@ const re = ye("giftCard", () => {
134
104
  required: { type: Boolean, default: !1 }
135
105
  },
136
106
  emits: ["update:modelValue"],
137
- setup(u, { emit: t }) {
138
- const s = t, o = u, { t: r } = ce(), { display: h } = Ve(), f = _(), v = V(() => o.modelValue.base64 !== "");
139
- function m(l) {
140
- s("update:modelValue", l);
107
+ setup(w, { emit: c }) {
108
+ const U = c, t = w, { t: n } = se(), { display: f } = ve(), u = y(), p = h(() => t.modelValue.base64 !== "");
109
+ function k(l) {
110
+ U("update:modelValue", l);
141
111
  }
142
- function g() {
143
- m({
112
+ function P() {
113
+ k({
144
114
  base64: "",
145
115
  name: "",
146
116
  type: ""
147
- }), f.value && (f.value.value = "");
117
+ }), u.value && (u.value.value = "");
148
118
  }
149
- function S() {
150
- f.value && f.value.click();
119
+ function T() {
120
+ u.value && u.value.click();
151
121
  }
152
- function L(l, c) {
153
- const [y, R] = [l.name, l.type], F = new FileReader();
154
- F.onload = function(q) {
155
- if (q.target) {
156
- const M = q.target.result;
157
- c({ base64: M, name: y, type: R });
122
+ function M(l, r) {
123
+ const [v, R] = [l.name, l.type], C = new FileReader();
124
+ C.onload = function(I) {
125
+ if (I.target) {
126
+ const x = I.target.result;
127
+ r({ base64: x, name: v, type: R });
158
128
  } else
159
- h({
160
- message: r("imageUploadError"),
129
+ f({
130
+ message: n("imageUploadError"),
161
131
  type: "error"
162
132
  });
163
- }, F.readAsDataURL(l);
133
+ }, C.readAsDataURL(l);
164
134
  }
165
- function k() {
166
- return J(this, null, function* () {
167
- let l;
168
- (l = f.value.files) instanceof FileList && L(l[0], m);
169
- });
135
+ async function g() {
136
+ let l;
137
+ (l = u.value.files) instanceof FileList && M(l[0], k);
170
138
  }
171
- return (l, c) => (p(), G(Fe, {
139
+ return (l, r) => (d(), L(ge, {
172
140
  label: l.label,
173
141
  required: l.required,
174
142
  type: "media"
175
143
  }, {
176
- default: B(() => [
177
- d("div", De, [
178
- d("input", {
144
+ default: G(() => [
145
+ s("div", qe, [
146
+ s("input", {
179
147
  ref_key: "fileInput",
180
- ref: f,
148
+ ref: u,
181
149
  type: "file",
182
150
  class: "hidden",
183
151
  accept: l.validation,
184
152
  single: "",
185
- onChange: c[0] || (c[0] = (y) => k())
186
- }, null, 40, We),
187
- d("div", je, [
188
- d("ul", He, [
189
- v.value ? T("", !0) : (p(), b("li", Ne, [
190
- n(z, {
191
- label: e(r)("uploadFile"),
153
+ onChange: r[0] || (r[0] = (v) => g())
154
+ }, null, 40, Le),
155
+ s("div", Me, [
156
+ s("ul", xe, [
157
+ p.value ? F("", !0) : (d(), m("li", Ae, [
158
+ i(B, {
159
+ label: e(n)("uploadFile"),
192
160
  type: "button",
193
161
  icon: "upload",
194
162
  "icon-color": l.iconColor,
195
- onClickEvent: c[1] || (c[1] = (y) => S())
163
+ onClickEvent: r[1] || (r[1] = (v) => T())
196
164
  }, null, 8, ["label", "icon-color"])
197
165
  ])),
198
- v.value ? (p(), b("li", Oe, [
199
- n(z, {
200
- label: e(r)("replaceFile"),
166
+ p.value ? (d(), m("li", Ge, [
167
+ i(B, {
168
+ label: e(n)("replaceFile"),
201
169
  type: "button",
202
170
  icon: "repeat-alt",
203
171
  "icon-color": l.iconColor,
204
- onClickEvent: c[2] || (c[2] = (y) => S())
172
+ onClickEvent: r[2] || (r[2] = (v) => T())
205
173
  }, null, 8, ["label", "icon-color"])
206
- ])) : T("", !0),
207
- v.value ? (p(), b("li", Ke, [
208
- n(z, {
209
- label: e(r)("removeFile"),
174
+ ])) : F("", !0),
175
+ p.value ? (d(), m("li", Be, [
176
+ i(B, {
177
+ label: e(n)("removeFile"),
210
178
  type: "button",
211
179
  icon: "trash-alt",
212
180
  "icon-color": l.iconColor,
213
- onClickEvent: c[3] || (c[3] = (y) => g())
181
+ onClickEvent: r[3] || (r[3] = (v) => P())
214
182
  }, null, 8, ["label", "icon-color"])
215
- ])) : T("", !0)
183
+ ])) : F("", !0)
216
184
  ]),
217
- d("div", {
218
- class: pe([
185
+ s("div", {
186
+ class: re([
219
187
  "media-selector-previewer",
220
- { opened: v.value }
188
+ { opened: p.value }
221
189
  ])
222
190
  }, [
223
- l.modelValue ? (p(), b("img", {
191
+ l.modelValue ? (d(), m("img", {
224
192
  key: 0,
225
193
  src: l.modelValue.base64
226
- }, null, 8, Je)) : T("", !0)
194
+ }, null, 8, De)) : F("", !0)
227
195
  ], 2)
228
196
  ])
229
197
  ])
@@ -232,9 +200,9 @@ const re = ye("giftCard", () => {
232
200
  }, 8, ["label", "required"]));
233
201
  }
234
202
  });
235
- function de(u) {
236
- const t = u;
237
- t.__i18n = t.__i18n || [], t.__i18n.push({
203
+ function ne(w) {
204
+ const c = w;
205
+ c.__i18n = c.__i18n || [], c.__i18n.push({
238
206
  locale: "",
239
207
  resource: {
240
208
  da: {
@@ -252,39 +220,39 @@ function de(u) {
252
220
  }
253
221
  });
254
222
  }
255
- typeof de == "function" && de(Ye);
256
- const Qe = { class: "gift-card-skeleton" }, Xe = { class: "gift-card-skeleton-form" }, Ze = /* @__PURE__ */ Z({
223
+ typeof ne == "function" && ne(ze);
224
+ const Ne = { class: "gift-card-skeleton" }, We = { class: "gift-card-skeleton-form" }, je = /* @__PURE__ */ Q({
257
225
  __name: "GiftCardSkeleton",
258
- setup(u) {
259
- return (t, s) => (p(), b("div", Qe, [
260
- d("div", Xe, [
261
- n(x),
262
- n(x),
263
- n(x),
264
- n(x),
265
- n(x, { "is-text-area": "" }),
266
- n(Ae, { height: "44px" })
226
+ setup(w) {
227
+ return (c, U) => (d(), m("div", Ne, [
228
+ s("div", We, [
229
+ i(A),
230
+ i(A),
231
+ i(A),
232
+ i(A),
233
+ i(A, { "is-text-area": "" }),
234
+ i(Ie, { height: "44px" })
267
235
  ])
268
236
  ]));
269
237
  }
270
- }), ea = /* @__PURE__ */ me(Ze, [["__scopeId", "data-v-e35c75b3"]]), aa = {
238
+ }), He = /* @__PURE__ */ de(je, [["__scopeId", "data-v-e35c75b3"]]), Oe = {
271
239
  key: 0,
272
240
  id: "konnectio-gift-card-wrapper"
273
- }, la = { id: "konnectio-gift-card-title" }, ta = { id: "konnectio-gift-card-content" }, oa = { id: "konnectio-gift-card-payment" }, ia = ["innerHTML"], na = { key: 0 }, sa = {
241
+ }, Ke = { id: "konnectio-gift-card-title" }, Ye = { id: "konnectio-gift-card-content" }, Ze = { id: "konnectio-gift-card-payment" }, Je = ["innerHTML"], Qe = { key: 0 }, Xe = {
274
242
  key: 0,
275
243
  id: "fresh-booking-select-place-type"
276
- }, ra = {
277
- class: /* @__PURE__ */ pe(["fresh-booking-label", "required"])
278
- }, da = { id: "fresh-booking-select-place-type-input" }, ua = ["innerHTML"], ca = {
244
+ }, ea = {
245
+ class: /* @__PURE__ */ re(["fresh-booking-label", "required"])
246
+ }, aa = { id: "fresh-booking-select-place-type-input" }, la = ["innerHTML"], ta = {
279
247
  key: 0,
280
248
  id: "konnectio-gift-card-order"
281
- }, pa = { class: "fresh-booking-panel" }, ma = {
249
+ }, oa = { class: "fresh-booking-panel" }, na = {
282
250
  key: 1,
283
251
  id: "konnectio-gift-card-remarks"
284
- }, fa = {
252
+ }, ia = {
285
253
  key: 2,
286
254
  id: "konnectio-gift-card-order-minimal"
287
- }, va = { id: "konnectio-gift-card-recaptcha" }, ga = /* @__PURE__ */ Z({
255
+ }, sa = { id: "konnectio-gift-card-recaptcha" }, ra = /* @__PURE__ */ Q({
288
256
  name: "GiftCardLayout",
289
257
  __name: "GiftCard",
290
258
  props: {
@@ -293,207 +261,208 @@ const Qe = { class: "gift-card-skeleton" }, Xe = { class: "gift-card-skeleton-fo
293
261
  placeType: {},
294
262
  styling: {}
295
263
  },
296
- setup(u) {
297
- const t = u, s = V(() => te({
298
- panelMaxWidth: "800px"
299
- }, t.styling)), { t: o } = ce(), {
300
- name: r,
301
- email: h,
302
- phone: f,
303
- value: v,
304
- remark: m,
305
- showValue: g,
306
- quantity: S,
307
- media: L,
308
- placeId: k,
264
+ setup(w) {
265
+ const c = w, U = h(() => ({
266
+ panelMaxWidth: "800px",
267
+ ...c.styling
268
+ })), { t } = se(), {
269
+ name: n,
270
+ email: f,
271
+ phone: u,
272
+ value: p,
273
+ remark: k,
274
+ showValue: P,
275
+ quantity: T,
276
+ media: M,
277
+ placeId: g,
309
278
  placeType: l,
310
- showFormPage: c,
311
- showPaymentPage: y,
279
+ showFormPage: r,
280
+ showPaymentPage: v,
312
281
  showConfirmationPage: R,
313
- places: F,
314
- hasFilledForm: q,
315
- hasForcedPlaceType: M,
316
- isWaitingForResponse: P,
317
- isMetaDataAvailable: A
318
- } = X(re()), { initialize: E, orderGiftCard: D } = re(), { isRecaptchaEnabled: O, currency: K } = X(ue());
319
- return Pe(l, () => {
320
- k.value = void 0;
321
- }), we(() => {
322
- const I = t.placeType ? parseInt(t.placeType) : void 0;
323
- E(I);
324
- }), (I, i) => (p(), G(Me, { styling: s.value }, {
325
- default: B(() => [
326
- (p(), G(Te, null, {
327
- default: B(() => [
328
- n(Re, {
282
+ places: C,
283
+ hasFilledForm: I,
284
+ hasForcedPlaceType: x,
285
+ isWaitingForResponse: _,
286
+ isMetaDataAvailable: D
287
+ } = J(oe()), { initialize: E, orderGiftCard: z } = oe(), { isRecaptchaEnabled: O, currency: K } = J(ie());
288
+ return be(l, () => {
289
+ g.value = void 0;
290
+ }), ye(() => {
291
+ const q = c.placeType ? parseInt(c.placeType) : void 0;
292
+ E(q);
293
+ }), (q, o) => (d(), L(we, { styling: U.value }, {
294
+ default: G(() => [
295
+ (d(), L(he, null, {
296
+ default: G(() => [
297
+ i(Fe, {
329
298
  id: "konnectio-gift-card-module",
330
299
  type: "gift-card",
331
- "access-token": I.accessToken,
332
- "data-layout": I.layout
300
+ "access-token": q.accessToken,
301
+ "data-layout": q.layout
333
302
  }, {
334
- default: B(() => [
335
- e(A) ? (p(), b("div", aa, [
336
- d("h2", la, [
337
- d("span", null, ie(e(o)("giftCard.title")), 1)
303
+ default: G(() => [
304
+ e(D) ? (d(), m("div", Oe, [
305
+ s("h2", Ke, [
306
+ s("span", null, ae(e(t)("giftCard.title")), 1)
338
307
  ]),
339
- d("div", ta, [
340
- W(d("div", oa, [
341
- n(xe)
308
+ s("div", Ye, [
309
+ N(s("div", Ze, [
310
+ i(Ue)
342
311
  ], 512), [
343
- [j, e(y)]
312
+ [W, e(v)]
344
313
  ]),
345
- W(d("div", null, [
346
- d("p", {
314
+ N(s("div", null, [
315
+ s("p", {
347
316
  id: "konnectio-gift-card-description",
348
- innerHTML: e(o)("giftCard.description")
349
- }, null, 8, ia),
350
- d("form", null, [
351
- e(M) ? T("", !0) : (p(), b("div", na, [
352
- e(F) ? (p(), b("div", sa, [
353
- d("label", ra, [
354
- d("span", null, ie(e(o)("giftCard.selectType")), 1)
317
+ innerHTML: e(t)("giftCard.description")
318
+ }, null, 8, Je),
319
+ s("form", null, [
320
+ e(x) ? F("", !0) : (d(), m("div", Qe, [
321
+ e(C) ? (d(), m("div", Xe, [
322
+ s("label", ea, [
323
+ s("span", null, ae(e(t)("giftCard.selectType")), 1)
355
324
  ]),
356
- d("div", da, [
357
- d("ul", null, [
358
- (p(!0), b(Se, null, Ue(e(F), (a, U) => (p(), b("li", { key: U }, [
359
- n(se, {
325
+ s("div", aa, [
326
+ s("ul", null, [
327
+ (d(!0), m(ke, null, Ce(e(C), (a, S) => (d(), m("li", { key: S }, [
328
+ i(te, {
360
329
  modelValue: e(l),
361
- "onUpdate:modelValue": i[0] || (i[0] = (w) => C(l) ? l.value = w : null),
330
+ "onUpdate:modelValue": o[0] || (o[0] = (V) => b(l) ? l.value = V : null),
362
331
  type: "radio",
363
332
  name: "placeType",
364
- val: U,
333
+ val: S,
365
334
  label: a.label
366
335
  }, null, 8, ["modelValue", "val", "label"])
367
336
  ]))), 128))
368
337
  ]),
369
- e(F)[e(l)] && e(F)[e(l)].data.length > 1 ? (p(), G($e, {
338
+ e(C)[e(l)] && e(C)[e(l)].data.length > 1 ? (d(), L(_e, {
370
339
  key: 0,
371
- modelValue: e(k),
372
- "onUpdate:modelValue": i[1] || (i[1] = (a) => C(k) ? k.value = a : null),
373
- placeholder: e(o)("giftCard.selectPlacePlaceholder"),
374
- options: e(F)[e(l)].data,
340
+ modelValue: e(g),
341
+ "onUpdate:modelValue": o[1] || (o[1] = (a) => b(g) ? g.value = a : null),
342
+ placeholder: e(t)("giftCard.selectPlacePlaceholder"),
343
+ options: e(C)[e(l)].data,
375
344
  labelKey: "name",
376
345
  valueKey: "id",
377
346
  required: ""
378
- }, null, 8, ["modelValue", "placeholder", "options"])) : T("", !0)
347
+ }, null, 8, ["modelValue", "placeholder", "options"])) : F("", !0)
379
348
  ])
380
- ])) : (p(), G(ne, { key: 1 }))
349
+ ])) : (d(), L(le, { key: 1 }))
381
350
  ])),
382
- n(H, {
383
- modelValue: e(r),
384
- "onUpdate:modelValue": i[2] || (i[2] = (a) => C(r) ? r.value = a : null),
351
+ i(j, {
352
+ modelValue: e(n),
353
+ "onUpdate:modelValue": o[2] || (o[2] = (a) => b(n) ? n.value = a : null),
385
354
  type: "text",
386
355
  name: "name",
387
356
  autocomplete: "name",
388
- label: e(o)("giftCard.name"),
357
+ label: e(t)("giftCard.name"),
389
358
  icon: "user-alt",
390
- placeholder: e(o)("giftCard.namePlaceholder"),
359
+ placeholder: e(t)("giftCard.namePlaceholder"),
391
360
  required: ""
392
361
  }, null, 8, ["modelValue", "label", "placeholder"]),
393
- n(H, {
394
- modelValue: e(h),
395
- "onUpdate:modelValue": i[3] || (i[3] = (a) => C(h) ? h.value = a : null),
362
+ i(j, {
363
+ modelValue: e(f),
364
+ "onUpdate:modelValue": o[3] || (o[3] = (a) => b(f) ? f.value = a : null),
396
365
  type: "email",
397
366
  name: "email",
398
367
  autocomplete: "email",
399
- label: e(o)("giftCard.email"),
368
+ label: e(t)("giftCard.email"),
400
369
  icon: "at",
401
- placeholder: e(o)("giftCard.emailPlaceholder"),
370
+ placeholder: e(t)("giftCard.emailPlaceholder"),
402
371
  required: ""
403
372
  }, null, 8, ["modelValue", "label", "placeholder"]),
404
- n(Be, {
405
- modelValue: e(f),
406
- "onUpdate:modelValue": i[4] || (i[4] = (a) => C(f) ? f.value = a : null),
373
+ i(Ee, {
374
+ modelValue: e(u),
375
+ "onUpdate:modelValue": o[4] || (o[4] = (a) => b(u) ? u.value = a : null),
407
376
  icon: "phone-office",
408
- label: e(o)("giftCard.phone"),
409
- placeholder: e(o)("giftCard.phonePlaceholder"),
377
+ label: e(t)("giftCard.phone"),
378
+ placeholder: e(t)("giftCard.phonePlaceholder"),
410
379
  required: ""
411
380
  }, null, 8, ["modelValue", "label", "placeholder"]),
412
- n(H, {
413
- modelValue: e(v),
414
- "onUpdate:modelValue": i[5] || (i[5] = (a) => C(v) ? v.value = a : null),
381
+ i(j, {
382
+ modelValue: e(p),
383
+ "onUpdate:modelValue": o[5] || (o[5] = (a) => b(p) ? p.value = a : null),
415
384
  type: "number",
416
385
  name: "value",
417
- label: e(o)("giftCard.value"),
386
+ label: e(t)("giftCard.value"),
418
387
  icon: "money-bill",
419
- placeholder: e(o)("giftCard.valuePlaceholder"),
388
+ placeholder: e(t)("giftCard.valuePlaceholder"),
420
389
  suffix: e(K),
421
390
  required: ""
422
391
  }, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
423
- n(se, {
424
- modelValue: e(g),
425
- "onUpdate:modelValue": i[6] || (i[6] = (a) => C(g) ? g.value = a : null),
392
+ i(te, {
393
+ modelValue: e(P),
394
+ "onUpdate:modelValue": o[6] || (o[6] = (a) => b(P) ? P.value = a : null),
426
395
  type: "checkbox",
427
396
  name: "showValue",
428
- label: e(o)("giftCard.showValue"),
429
- checked: e(g)
397
+ label: e(t)("giftCard.showValue"),
398
+ checked: e(P)
430
399
  }, null, 8, ["modelValue", "label", "checked"]),
431
- T("", !0),
432
- n(Ee, {
433
- modelValue: e(S),
434
- "onUpdate:modelValue": i[8] || (i[8] = (a) => C(S) ? S.value = a : null),
435
- label: e(o)("giftCard.quantity"),
400
+ F("", !0),
401
+ i(Ve, {
402
+ modelValue: e(T),
403
+ "onUpdate:modelValue": o[8] || (o[8] = (a) => b(T) ? T.value = a : null),
404
+ label: e(t)("giftCard.quantity"),
436
405
  icon: "gift-card",
437
406
  required: ""
438
407
  }, null, 8, ["modelValue", "label"])
439
408
  ])
440
409
  ], 512), [
441
- [j, e(c)]
410
+ [W, e(r)]
442
411
  ]),
443
- W(d("div", null, [
444
- d("div", {
445
- innerHTML: e(o)("giftCard.thankYou")
446
- }, null, 8, ua)
412
+ N(s("div", null, [
413
+ s("div", {
414
+ innerHTML: e(t)("giftCard.thankYou")
415
+ }, null, 8, la)
447
416
  ], 512), [
448
- [j, e(R)]
417
+ [W, e(R)]
449
418
  ])
450
419
  ]),
451
- I.layout !== "minimal" && e(c) ? (p(), b("div", ca, [
452
- d("div", pa, [
453
- n(z, {
454
- label: e(o)("giftCard.orderGiftCard"),
420
+ q.layout !== "minimal" && e(r) ? (d(), m("div", ta, [
421
+ s("div", oa, [
422
+ i(B, {
423
+ label: e(t)("giftCard.orderGiftCard"),
455
424
  "full-width": !0,
456
- disabled: !e(q),
457
- "is-loading": e(P),
458
- "onUpdate:isLoading": i[9] || (i[9] = (a) => C(P) ? P.value = a : null),
459
- onClickEvent: e(D)
425
+ disabled: !e(I),
426
+ "is-loading": e(_),
427
+ "onUpdate:isLoading": o[9] || (o[9] = (a) => b(_) ? _.value = a : null),
428
+ onClickEvent: e(z)
460
429
  }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"])
461
430
  ])
462
- ])) : T("", !0),
463
- e(c) ? (p(), b("div", ma, [
464
- n(H, {
465
- modelValue: e(m),
466
- "onUpdate:modelValue": i[10] || (i[10] = (a) => C(m) ? m.value = a : null),
431
+ ])) : F("", !0),
432
+ e(r) ? (d(), m("div", na, [
433
+ i(j, {
434
+ modelValue: e(k),
435
+ "onUpdate:modelValue": o[10] || (o[10] = (a) => b(k) ? k.value = a : null),
467
436
  type: "textarea",
468
437
  name: "remark",
469
- label: e(o)("giftCard.remark"),
438
+ label: e(t)("giftCard.remark"),
470
439
  icon: "info-circle",
471
- placeholder: e(o)("giftCard.remarkPlaceholder")
440
+ placeholder: e(t)("giftCard.remarkPlaceholder")
472
441
  }, null, 8, ["modelValue", "label", "placeholder"])
473
- ])) : T("", !0),
474
- e(c) ? (p(), b("div", fa, [
475
- n(z, {
476
- label: e(o)("giftCard.orderGiftCard"),
442
+ ])) : F("", !0),
443
+ e(r) ? (d(), m("div", ia, [
444
+ i(B, {
445
+ label: e(t)("giftCard.orderGiftCard"),
477
446
  "full-width": !0,
478
- disabled: !e(q),
447
+ disabled: !e(I),
479
448
  "data-test": "orderGiftCard",
480
- "is-loading": e(P),
481
- "onUpdate:isLoading": i[11] || (i[11] = (a) => C(P) ? P.value = a : null),
482
- onClickEvent: e(D)
449
+ "is-loading": e(_),
450
+ "onUpdate:isLoading": o[11] || (o[11] = (a) => b(_) ? _.value = a : null),
451
+ onClickEvent: e(z)
483
452
  }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"]),
484
- W(d("div", va, [
485
- n(ze)
453
+ N(s("div", sa, [
454
+ i(Re)
486
455
  ], 512), [
487
- [j, e(O)]
456
+ [W, e(O)]
488
457
  ])
489
- ])) : T("", !0)
490
- ])) : (p(), G(ne, { key: 1 }))
458
+ ])) : F("", !0)
459
+ ])) : (d(), L(le, { key: 1 }))
491
460
  ]),
492
461
  _: 1
493
462
  }, 8, ["access-token", "data-layout"])
494
463
  ]),
495
- fallback: B(() => [
496
- n(ea)
464
+ fallback: G(() => [
465
+ i(He)
497
466
  ]),
498
467
  _: 1
499
468
  }))
@@ -501,16 +470,26 @@ const Qe = { class: "gift-card-skeleton" }, Xe = { class: "gift-card-skeleton-fo
501
470
  _: 1
502
471
  }, 8, ["styling"]));
503
472
  }
504
- }), fe = /* @__PURE__ */ me(ga, [["__scopeId", "data-v-ec9ea15b"]]), ba = qe(), N = Ie({ components: { GiftCard: fe } });
505
- N.use(ba);
506
- N.use(Ge);
507
- N.use(Le, { bootstrap: !0 });
508
- N.mount("#konnectio-gift-card-app");
509
- const Pa = {
510
- install: (u) => {
511
- u.component("GiftCard", fe);
473
+ }), H = /* @__PURE__ */ de(ra, [["__scopeId", "data-v-ec9ea15b"]]), da = Pe();
474
+ class ua extends HTMLElement {
475
+ constructor() {
476
+ super();
512
477
  }
513
- };
478
+ connectedCallback() {
479
+ const c = typeof H == "function" ? H.options : H, U = Array.isArray(c.props) ? c.props : Object.keys(c.props || {}), t = {};
480
+ for (const u of U) {
481
+ const p = this.attributes.getNamedItem(u)?.value;
482
+ if (!p)
483
+ break;
484
+ t[u] = p;
485
+ }
486
+ const n = Te(H, t);
487
+ n.use(da), n.use(Se), n.use($e, { bootstrap: !0 });
488
+ const f = document.createElement("div");
489
+ n.mount(f), this.appendChild(f.children[0]);
490
+ }
491
+ }
492
+ window.customElements.define("konnectio-gift-card", ua);
514
493
  export {
515
- Pa as default
494
+ ua as default
516
495
  };