@konnectio/core 4.0.56-rc15 → 4.0.56-rc17

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