@konnectio/core 4.0.56-rc7 → 4.0.56-rc8

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