@konnectio/core 4.0.55 → 4.0.56-rc2

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 (120) hide show
  1. package/README.md +7 -7
  2. package/dist/{ActionField-89f587d4.js → ActionField-Qf4JAgBa.js} +30 -31
  3. package/dist/ActionField-Qf4JAgBa.js.br +0 -0
  4. package/dist/ActionField-ztW-1xka.cjs +1 -0
  5. package/dist/AvailabilitySkeleton-GPTCv3Xy.js +242 -0
  6. package/dist/AvailabilitySkeleton-GPTCv3Xy.js.br +0 -0
  7. package/dist/AvailabilitySkeleton-v0QVPuim.cjs +1 -0
  8. package/dist/CheckoutWindow-NUwbNAPw.cjs +1 -0
  9. package/dist/{CheckoutWindow-df8612e3.js → CheckoutWindow-S9xKe_Wf.js} +58 -54
  10. package/dist/CheckoutWindow-S9xKe_Wf.js.br +0 -0
  11. package/dist/Container-Fl2PKj-u.js +59 -0
  12. package/dist/Container-Fl2PKj-u.js.br +0 -0
  13. package/dist/Container-Y6_3uTWy.cjs +1 -0
  14. package/dist/DateField.vue_vue_type_style_index_0_lang-hZTsLsOv.cjs +2 -0
  15. package/dist/{DateField.vue_vue_type_style_index_0_lang-bbaed106.js → DateField.vue_vue_type_style_index_0_lang-iz9zEBOR.js} +2666 -2661
  16. package/dist/DateField.vue_vue_type_style_index_0_lang-iz9zEBOR.js.br +0 -0
  17. package/dist/Field-UTbHMN9U.cjs +1 -0
  18. package/dist/Field-b7XkSAoi.js +43 -0
  19. package/dist/Field-b7XkSAoi.js.br +0 -0
  20. package/dist/SelectField.vue_vue_type_style_index_0_lang-30hJu8vr.js +21406 -0
  21. package/dist/SelectField.vue_vue_type_style_index_0_lang-30hJu8vr.js.br +0 -0
  22. package/dist/SelectField.vue_vue_type_style_index_0_lang-eLyZ247i.cjs +851 -0
  23. package/dist/{ThankYou-159b55d6.js → ThankYou-LiiG3Zv1.js} +2349 -2000
  24. package/dist/ThankYou-LiiG3Zv1.js.br +0 -0
  25. package/dist/ThankYou-M6d4G8pc.cjs +59 -0
  26. package/dist/_-FAlGPZqe.js +20 -0
  27. package/dist/_-oL4OsiNw.cjs +1 -0
  28. package/dist/_commonjsHelpers-f3sTPFkQ.js +8 -0
  29. package/dist/_commonjsHelpers-f52AuuUj.cjs +1 -0
  30. package/dist/availability.cjs +2 -2
  31. package/dist/availability.js +39 -42
  32. package/dist/availability.js.br +0 -0
  33. package/dist/components/Gallery.vue.d.ts +3 -2
  34. package/dist/components/Gallery.vue.d.ts.map +1 -1
  35. package/dist/components/forms/EventAvailabilityForm.vue.d.ts +1 -1
  36. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +1 -1
  37. package/dist/components/forms/MultiStepForm.vue.d.ts +1 -1
  38. package/dist/components/forms/ReservationForm.vue.d.ts +1 -1
  39. package/dist/components/listings/Base.vue.d.ts +1 -1
  40. package/dist/components/listings/Hotel.vue.d.ts +1 -1
  41. package/dist/components/listings/Template.vue.d.ts +1 -1
  42. package/dist/components/side-panels/ListingInfo.vue.d.ts +1 -1
  43. package/dist/components/side-panels/Template.vue.d.ts +1 -1
  44. package/dist/components/skeletons/AvailabilitySkeleton.vue.d.ts +1 -1
  45. package/dist/components/skeletons/Field.vue.d.ts +1 -1
  46. package/dist/components/skeletons/HotelSkeleton.vue.d.ts +1 -1
  47. package/dist/components/skeletons/Listing.vue.d.ts +1 -1
  48. package/dist/entries/availability.d.ts +3 -3
  49. package/dist/entries/event.d.ts +1 -1
  50. package/dist/entries/gift-card-validation.d.ts +5 -2
  51. package/dist/entries/gift-card.d.ts +5 -1
  52. package/dist/entries/hotel.d.ts +5 -0
  53. package/dist/event-GaUgVNzy.cjs +1 -0
  54. package/dist/{event-6cd5d9be.js → event-MXmxvcpC.js} +26 -25
  55. package/dist/event-MXmxvcpC.js.br +0 -0
  56. package/dist/event.cjs +1 -1
  57. package/dist/event.js +212 -214
  58. package/dist/event.js.br +0 -0
  59. package/dist/gift-card-validation.cjs +1 -1
  60. package/dist/gift-card-validation.js +68 -64
  61. package/dist/gift-card-validation.js.br +0 -0
  62. package/dist/gift-card.cjs +1 -1
  63. package/dist/gift-card.d.ts +2 -0
  64. package/dist/gift-card.js +278 -273
  65. package/dist/gift-card.js.br +0 -0
  66. package/dist/hotel.cjs +5 -5
  67. package/dist/hotel.d.ts +2 -0
  68. package/dist/hotel.js +1415 -1436
  69. package/dist/hotel.js.br +0 -0
  70. package/dist/layouts/Availability.vue.d.ts +4 -4
  71. package/dist/layouts/Event.vue.d.ts +4 -4
  72. package/dist/layouts/GiftCard.vue.d.ts +4 -4
  73. package/dist/layouts/GiftCardValidation.vue.d.ts +4 -4
  74. package/dist/layouts/Hotel.vue.d.ts +4 -4
  75. package/dist/layouts/_.vue.d.ts +4 -4
  76. package/dist/polyfill.cjs +4 -4
  77. package/dist/polyfill.js +3032 -3065
  78. package/dist/polyfill.js.br +0 -0
  79. package/dist/store/alert.d.ts +15 -15
  80. package/dist/store/applyGiftCard.d.ts +18 -18
  81. package/dist/store/availability.d.ts +12 -12
  82. package/dist/store/event.d.ts +141 -141
  83. package/dist/store/giftCard.d.ts +51 -51
  84. package/dist/store/payment.d.ts +39 -39
  85. package/dist/store/recaptcha.d.ts +28 -0
  86. package/dist/store/tracking.d.ts +6 -6
  87. package/dist/store/utilities.d.ts +131 -146
  88. package/dist/style.css +1 -1
  89. package/dist/style.css.br +0 -0
  90. package/dist/types/index.d.ts +8 -0
  91. package/package.json +22 -20
  92. package/dist/ActionField-087c3437.cjs +0 -1
  93. package/dist/ActionField-89f587d4.js.br +0 -0
  94. package/dist/AvailabilitySkeleton-01aab3cb.js +0 -237
  95. package/dist/AvailabilitySkeleton-01aab3cb.js.br +0 -0
  96. package/dist/AvailabilitySkeleton-452df88c.cjs +0 -1
  97. package/dist/CheckoutWindow-1d77f68c.cjs +0 -1
  98. package/dist/CheckoutWindow-df8612e3.js.br +0 -0
  99. package/dist/Container-3af1f7f7.cjs +0 -1
  100. package/dist/Container-9f1ed24c.js +0 -59
  101. package/dist/Container-9f1ed24c.js.br +0 -0
  102. package/dist/DateField.vue_vue_type_style_index_0_lang-b5676dde.cjs +0 -2
  103. package/dist/DateField.vue_vue_type_style_index_0_lang-bbaed106.js.br +0 -0
  104. package/dist/Field-43273ca2.cjs +0 -1
  105. package/dist/Field-92684198.js +0 -42
  106. package/dist/Field-92684198.js.br +0 -0
  107. package/dist/NumberField.vue_vue_type_script_setup_true_lang-a149d388.cjs +0 -1
  108. package/dist/NumberField.vue_vue_type_script_setup_true_lang-ce6f0b17.js +0 -67
  109. package/dist/NumberField.vue_vue_type_script_setup_true_lang-ce6f0b17.js.br +0 -0
  110. package/dist/SelectField.vue_vue_type_style_index_0_lang-11cea6ba.js +0 -30329
  111. package/dist/SelectField.vue_vue_type_style_index_0_lang-11cea6ba.js.br +0 -0
  112. package/dist/SelectField.vue_vue_type_style_index_0_lang-b1435f5a.cjs +0 -856
  113. package/dist/ThankYou-159b55d6.js.br +0 -0
  114. package/dist/ThankYou-c1cbecac.cjs +0 -59
  115. package/dist/_-52440760.js +0 -20
  116. package/dist/_-fbbc271a.cjs +0 -1
  117. package/dist/_commonjsHelpers-6763f629.cjs +0 -1
  118. package/dist/_commonjsHelpers-aeeeeb92.js +0 -30
  119. package/dist/event-6cd5d9be.js.br +0 -0
  120. package/dist/event-dfc9ed16.cjs +0 -1
package/dist/event.js.br CHANGED
Binary file
@@ -1 +1 @@
1
- "use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-b1435f5a.cjs"),g=require("./ActionField-087c3437.cjs"),_=require("./Container-3af1f7f7.cjs");require("./_commonjsHelpers-6763f629.cjs");require("./NumberField.vue_vue_type_script_setup_true_lang-a149d388.cjs");const y=o=>(e.pushScopeId("data-v-5af38302"),o=o(),e.popScopeId(),o),B=["innerHTML"],N={key:0,id:"fresh-booking-gift-card-validation-resume",class:"fresh-booking-panel"},C=y(()=>e.createBaseVNode("span",null,"Loading...",-1)),m=e.defineComponent({name:"GiftCardValidationLayout",__name:"GiftCardValidation",props:{accessToken:{},styling:{}},setup(o){const{t:a}=e.useI18n(),{voucher:l,isValid:c,amount:u,expirationDate:p,productName:f,isLoading:i}=e.storeToRefs(e.useApplyGiftCardStore()),{currency:V}=e.storeToRefs(e.useUtilityStore()),{apply:s}=e.useApplyGiftCardStore();return(d,t)=>(e.openBlock(),e.createBlock(_.Container,{styling:d.styling},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main$1,{id:"fresh-booking-gift-card-validation-module","access-token":d.accessToken,type:"gift-card"},{default:e.withCtx(()=>[e.createBaseVNode("form",{onSubmit:t[3]||(t[3]=e.withModifiers(n=>e.unref(s)(),["prevent"]))},[e.createBaseVNode("h4",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCardValidation.title")),1)]),e.createBaseVNode("p",{innerHTML:e.unref(a)("giftCardValidation.description")},null,8,B),e.createVNode(g.ActionField,{modelValue:e.unref(l),"onUpdate:modelValue":t[0]||(t[0]=n=>e.isRef(l)?l.value=n:null),icon:"gift-card",label:e.unref(a)("booking.reservation.giftCardCode"),buttonLabel:e.unref(a)("giftCardValidation.submitButton"),placeholder:"XXXXXXXX","is-loading":e.unref(i),"onUpdate:isLoading":t[1]||(t[1]=n=>e.isRef(i)?i.value=n:null),onAction:t[2]||(t[2]=n=>e.unref(s)())},null,8,["modelValue","label","buttonLabel","is-loading"]),!e.unref(i)&&e.unref(c)?(e.openBlock(),e.createElementBlock("table",N,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCardValidation.giftCard")),1),e.createVNode(e.Icon,{icon:"gift-card",type:"fas",color:"header"})]),e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCardValidation.balance")),1),e.createVNode(e.Icon,{icon:"money-bill",type:"fas",color:"header"})]),e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCardValidation.expirationDate")),1),e.createVNode(e.Icon,{icon:"timer",type:"fas",color:"header"})])])]),e.createBaseVNode("tbody",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(f)),1)]),e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(u),e.unref(V))),1)]),e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDate)(e.unref(p))),1)])])])])):e.createCommentVNode("",!0)],32)]),_:1},8,["access-token"])]),fallback:e.withCtx(()=>[C]),_:1}))]),_:1},8,["styling"]))}});const h=e._export_sfc(m,[["__scopeId","data-v-5af38302"]]),r=e.createApp({components:{GiftCardValidation:h}}),b=e.createPinia();r.use(b);r.use(e.instance);r.mount("#konnectio-gift-card-validation-app");module.exports=r;
1
+ "use strict";const e=require("vue"),t=require("./SelectField.vue_vue_type_style_index_0_lang-eLyZ247i.cjs"),N=require("./ActionField-ztW-1xka.cjs"),y=require("./Container-Y6_3uTWy.cjs");require("./_commonjsHelpers-f52AuuUj.cjs");const C=a=>(e.pushScopeId("data-v-5af38302"),a=a(),e.popScopeId(),a),E=["innerHTML"],_={key:0,id:"fresh-booking-gift-card-validation-resume",class:"fresh-booking-panel"},b=C(()=>e.createElementVNode("span",null,"Loading...",-1)),h=e.defineComponent({name:"GiftCardValidationLayout",__name:"GiftCardValidation",props:{accessToken:{},styling:{}},setup(a){const{t:o}=t.useI18n(),{voucher:r,isValid:p,amount:f,expirationDate:m,productName:V,isLoading:i}=t.storeToRefs(t.useApplyGiftCardStore()),{currency:g}=t.storeToRefs(t.useUtilityStore()),{apply:s}=t.useApplyGiftCardStore();return(c,n)=>(e.openBlock(),e.createBlock(y.Container,{styling:c.styling},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(t._sfc_main$2,{id:"fresh-booking-gift-card-validation-module","access-token":c.accessToken,type:"gift-card"},{default:e.withCtx(()=>[e.createElementVNode("form",{onSubmit:n[3]||(n[3]=e.withModifiers(l=>e.unref(s)(),["prevent"]))},[e.createElementVNode("h4",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("giftCardValidation.title")),1)]),e.createElementVNode("p",{innerHTML:e.unref(o)("giftCardValidation.description")},null,8,E),e.createVNode(N.ActionField,{modelValue:e.unref(r),"onUpdate:modelValue":n[0]||(n[0]=l=>e.isRef(r)?r.value=l:null),icon:"gift-card",label:e.unref(o)("booking.reservation.giftCardCode"),buttonLabel:e.unref(o)("giftCardValidation.submitButton"),placeholder:"XXXXXXXX","is-loading":e.unref(i),"onUpdate:isLoading":n[1]||(n[1]=l=>e.isRef(i)?i.value=l:null),onAction:n[2]||(n[2]=l=>e.unref(s)())},null,8,["modelValue","label","buttonLabel","is-loading"]),!e.unref(i)&&e.unref(p)?(e.openBlock(),e.createElementBlock("table",_,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("giftCardValidation.giftCard")),1),e.createVNode(t.Icon,{icon:"gift-card",type:"fas",color:"header"})]),e.createElementVNode("th",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("giftCardValidation.balance")),1),e.createVNode(t.Icon,{icon:"money-bill",type:"fas",color:"header"})]),e.createElementVNode("th",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("giftCardValidation.expirationDate")),1),e.createVNode(t.Icon,{icon:"timer",type:"fas",color:"header"})])])]),e.createElementVNode("tbody",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(V)),1)]),e.createElementVNode("td",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(t.showPrice)(e.unref(f),e.unref(g))),1)]),e.createElementVNode("td",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(t.showDate)(e.unref(m))),1)])])])])):e.createCommentVNode("",!0)],32)]),_:1},8,["access-token"])]),fallback:e.withCtx(()=>[b]),_:1}))]),_:1},8,["styling"]))}}),u=t._export_sfc(h,[["__scopeId","data-v-5af38302"]]),d=e.createApp({components:{GiftCardValidation:u}}),k=t.createPinia();d.use(k);d.use(t.instance);d.mount("#konnectio-gift-card-validation-app");const S={install:a=>{a.component("GiftCardValidation",u)}};module.exports=S;
@@ -1,80 +1,80 @@
1
- import { k as S, F as X, s as _, a as y, c as w, m as u, n as C, w as r, G as x, p as l, A as a, H as o, q as t, J as V, v as A, K as c, L as G, M as I, x as B, N, P as T, Q as D, R as M, _ as U, U as H, V as P, W as R } from "./SelectField.vue_vue_type_style_index_0_lang-11cea6ba.js";
2
- import { A as $ } from "./ActionField-89f587d4.js";
3
- import { C as F } from "./Container-9f1ed24c.js";
4
- import "./_commonjsHelpers-aeeeeb92.js";
5
- import "./NumberField.vue_vue_type_script_setup_true_lang-ce6f0b17.js";
6
- const q = (s) => (D("data-v-5af38302"), s = s(), M(), s), E = ["innerHTML"], J = {
1
+ import { defineComponent as X, openBlock as u, createBlock as C, withCtx as d, Suspense as I, createVNode as s, createElementVNode as t, withModifiers as w, unref as a, toDisplayString as e, isRef as b, createElementBlock as A, createCommentVNode as G, pushScopeId as T, popScopeId as x, createApp as B } from "vue";
2
+ import { l as D, s as y, a as V, c as N, m as M, n as c, o as U, p as $, _ as E, q as H, t as P } from "./SelectField.vue_vue_type_style_index_0_lang-30hJu8vr.js";
3
+ import { A as R } from "./ActionField-Qf4JAgBa.js";
4
+ import { C as q } from "./Container-Fl2PKj-u.js";
5
+ import "./_commonjsHelpers-f3sTPFkQ.js";
6
+ const F = (i) => (T("data-v-5af38302"), i = i(), x(), i), j = ["innerHTML"], z = {
7
7
  key: 0,
8
8
  id: "fresh-booking-gift-card-validation-resume",
9
9
  class: "fresh-booking-panel"
10
- }, K = /* @__PURE__ */ q(() => /* @__PURE__ */ a("span", null, "Loading...", -1)), Q = /* @__PURE__ */ S({
10
+ }, J = /* @__PURE__ */ F(() => /* @__PURE__ */ t("span", null, "Loading...", -1)), K = /* @__PURE__ */ X({
11
11
  name: "GiftCardValidationLayout",
12
12
  __name: "GiftCardValidation",
13
13
  props: {
14
14
  accessToken: {},
15
15
  styling: {}
16
16
  },
17
- setup(s) {
18
- const { t: e } = X(), {
17
+ setup(i) {
18
+ const { t: o } = D(), {
19
19
  voucher: p,
20
- isValid: b,
21
- amount: h,
22
- expirationDate: k,
23
- productName: v,
24
- isLoading: d
25
- } = _(y()), { currency: L } = _(w()), { apply: m } = y();
26
- return (g, n) => (u(), C(F, { styling: g.styling }, {
27
- default: r(() => [
28
- (u(), C(x, null, {
29
- default: r(() => [
30
- l(T, {
20
+ isValid: _,
21
+ amount: k,
22
+ expirationDate: v,
23
+ productName: L,
24
+ isLoading: r
25
+ } = y(V()), { currency: S } = y(N()), { apply: m } = V();
26
+ return (g, n) => (u(), C(q, { styling: g.styling }, {
27
+ default: d(() => [
28
+ (u(), C(I, null, {
29
+ default: d(() => [
30
+ s(M, {
31
31
  id: "fresh-booking-gift-card-validation-module",
32
32
  "access-token": g.accessToken,
33
33
  type: "gift-card"
34
34
  }, {
35
- default: r(() => [
36
- a("form", {
37
- onSubmit: n[3] || (n[3] = N((i) => t(m)(), ["prevent"]))
35
+ default: d(() => [
36
+ t("form", {
37
+ onSubmit: n[3] || (n[3] = w((l) => a(m)(), ["prevent"]))
38
38
  }, [
39
- a("h4", null, [
40
- a("span", null, o(t(e)("giftCardValidation.title")), 1)
39
+ t("h4", null, [
40
+ t("span", null, e(a(o)("giftCardValidation.title")), 1)
41
41
  ]),
42
- a("p", {
43
- innerHTML: t(e)("giftCardValidation.description")
44
- }, null, 8, E),
45
- l($, {
46
- modelValue: t(p),
47
- "onUpdate:modelValue": n[0] || (n[0] = (i) => V(p) ? p.value = i : null),
42
+ t("p", {
43
+ innerHTML: a(o)("giftCardValidation.description")
44
+ }, null, 8, j),
45
+ s(R, {
46
+ modelValue: a(p),
47
+ "onUpdate:modelValue": n[0] || (n[0] = (l) => b(p) ? p.value = l : null),
48
48
  icon: "gift-card",
49
- label: t(e)("booking.reservation.giftCardCode"),
50
- buttonLabel: t(e)("giftCardValidation.submitButton"),
49
+ label: a(o)("booking.reservation.giftCardCode"),
50
+ buttonLabel: a(o)("giftCardValidation.submitButton"),
51
51
  placeholder: "XXXXXXXX",
52
- "is-loading": t(d),
53
- "onUpdate:isLoading": n[1] || (n[1] = (i) => V(d) ? d.value = i : null),
54
- onAction: n[2] || (n[2] = (i) => t(m)())
52
+ "is-loading": a(r),
53
+ "onUpdate:isLoading": n[1] || (n[1] = (l) => b(r) ? r.value = l : null),
54
+ onAction: n[2] || (n[2] = (l) => a(m)())
55
55
  }, null, 8, ["modelValue", "label", "buttonLabel", "is-loading"]),
56
- !t(d) && t(b) ? (u(), A("table", J, [
57
- a("thead", null, [
58
- a("tr", null, [
59
- a("th", null, [
60
- a("span", null, o(t(e)("giftCardValidation.giftCard")), 1),
61
- l(c, {
56
+ !a(r) && a(_) ? (u(), A("table", z, [
57
+ t("thead", null, [
58
+ t("tr", null, [
59
+ t("th", null, [
60
+ t("span", null, e(a(o)("giftCardValidation.giftCard")), 1),
61
+ s(c, {
62
62
  icon: "gift-card",
63
63
  type: "fas",
64
64
  color: "header"
65
65
  })
66
66
  ]),
67
- a("th", null, [
68
- a("span", null, o(t(e)("giftCardValidation.balance")), 1),
69
- l(c, {
67
+ t("th", null, [
68
+ t("span", null, e(a(o)("giftCardValidation.balance")), 1),
69
+ s(c, {
70
70
  icon: "money-bill",
71
71
  type: "fas",
72
72
  color: "header"
73
73
  })
74
74
  ]),
75
- a("th", null, [
76
- a("span", null, o(t(e)("giftCardValidation.expirationDate")), 1),
77
- l(c, {
75
+ t("th", null, [
76
+ t("span", null, e(a(o)("giftCardValidation.expirationDate")), 1),
77
+ s(c, {
78
78
  icon: "timer",
79
79
  type: "fas",
80
80
  color: "header"
@@ -82,27 +82,27 @@ const q = (s) => (D("data-v-5af38302"), s = s(), M(), s), E = ["innerHTML"], J =
82
82
  ])
83
83
  ])
84
84
  ]),
85
- a("tbody", null, [
86
- a("tr", null, [
87
- a("td", null, [
88
- a("span", null, o(t(v)), 1)
85
+ t("tbody", null, [
86
+ t("tr", null, [
87
+ t("td", null, [
88
+ t("span", null, e(a(L)), 1)
89
89
  ]),
90
- a("td", null, [
91
- a("span", null, o(t(G)(t(h), t(L))), 1)
90
+ t("td", null, [
91
+ t("span", null, e(a(U)(a(k), a(S))), 1)
92
92
  ]),
93
- a("td", null, [
94
- a("span", null, o(t(I)(t(k))), 1)
93
+ t("td", null, [
94
+ t("span", null, e(a($)(a(v))), 1)
95
95
  ])
96
96
  ])
97
97
  ])
98
- ])) : B("", !0)
98
+ ])) : G("", !0)
99
99
  ], 32)
100
100
  ]),
101
101
  _: 1
102
102
  }, 8, ["access-token"])
103
103
  ]),
104
- fallback: r(() => [
105
- K
104
+ fallback: d(() => [
105
+ J
106
106
  ]),
107
107
  _: 1
108
108
  }))
@@ -110,11 +110,15 @@ const q = (s) => (D("data-v-5af38302"), s = s(), M(), s), E = ["innerHTML"], J =
110
110
  _: 1
111
111
  }, 8, ["styling"]));
112
112
  }
113
- });
114
- const W = /* @__PURE__ */ U(Q, [["__scopeId", "data-v-5af38302"]]), f = H({ components: { GiftCardValidation: W } }), j = P();
115
- f.use(j);
116
- f.use(R);
113
+ }), h = /* @__PURE__ */ E(K, [["__scopeId", "data-v-5af38302"]]), f = B({ components: { GiftCardValidation: h } }), O = H();
114
+ f.use(O);
115
+ f.use(P);
117
116
  f.mount("#konnectio-gift-card-validation-app");
117
+ const at = {
118
+ install: (i) => {
119
+ i.component("GiftCardValidation", h);
120
+ }
121
+ };
118
122
  export {
119
- f as default
123
+ at as default
120
124
  };
Binary file
@@ -1 +1 @@
1
- "use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-b1435f5a.cjs"),I=require("./Container-3af1f7f7.cjs"),x=require("./CheckoutWindow-1d77f68c.cjs"),L=require("./_-fbbc271a.cjs"),T=require("./Field-43273ca2.cjs");require("./_commonjsHelpers-6763f629.cjs");const M=e.defineStore("giftCard",()=>{const{pay:g}=e.usePaymentStore(),{bearerToken:d,metaData:B,currencyId:l}=e.storeToRefs(e.useUtilityStore()),{verifyRecaptcha:p}=e.useUtilityStore(),i=e.ref(e.GiftCardModuleState.InitialState),r=e.useStorage("konnectio_name","",void 0,{serializer:e.StorageSerializers.string}),c=e.useStorage("konnectio_email","",void 0,{serializer:e.StorageSerializers.string}),f=e.useStorage("konnectio_phone","",void 0,{serializer:e.StorageSerializers.string}),m=e.ref(""),N=e.ref(1),S=e.ref(!0),v=e.ref(""),a=e.ref({base64:"",type:"",name:""}),n=e.ref(void 0),s=e.ref(0),k=e.ref(!1),u=e.ref(0),V=e.computed(()=>i.value===e.GiftCardModuleState.InitialState||i.value===e.GiftCardModuleState.WaitingForResponse),F=e.computed(()=>i.value===e.GiftCardModuleState.ReadyToPay),h=e.computed(()=>i.value===e.GiftCardModuleState.PaymentSuccess),w=e.computed(()=>{const t={1:{label:e.i18n.t("giftCard.hotelType"),data:[]},2:{label:e.i18n.t("giftCard.restaurantType"),data:[]}},y=B.value.hotels[0].places;return y&&y.forEach(_=>{t[_.placeType].data.push(_)}),Object.fromEntries(Object.entries(t).filter(([,_])=>_.data.length>0))}),R=e.computed(()=>u.value!==0),b=e.computed(()=>{let t;if(R.value)t=w.value[u.value].data[0];else if(s.value!==0){const y=n.value,_=w.value[s.value].data;_.length===1?t=_[0]:y!==void 0&&_.forEach(G=>{String(G.id)===String(y)&&(t=G)})}return t}),q=e.computed(()=>!(!r.value||!c.value||!(f.value.length>=5)||!m.value||b.value===void 0)),U=e.computed(()=>!(i.value===e.GiftCardModuleState.InitialState&&k.value)),P=e.computed(()=>!!(i.value===e.GiftCardModuleState.WaitingForResponse&&k.value));async function C(){i.value=e.GiftCardModuleState.WaitingForResponse,k.value=!0,p({type:"create_gift_card",callback:async()=>{await e.axios.post("https://production.hotel-service.konnectio.dk/api/gift-card/create",{termsOfserviceURL:window.location.origin,checkoutUrl:window.location.origin,currencyID:l.value,language:e.getUserLanguage(),amount:m.value,quantity:N.value,freeText:v.value,showPrice:S.value,contactName:r.value,contactEmail:c.value,contactPhone:f.value,imageBase64:e.b2a(a.value.base64),imageName:a.value.name,imageFormat:a.value.type,placeType:b.value?b.value.placeType:void 0,placeID:b.value?b.value.id:void 0},{headers:{Authorization:d.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.55"}}).then(t=>{i.value=e.GiftCardModuleState.ReadyToPay,k.value=!1,g({callback:()=>console.log("Callback!"),response:t.data})})}})}function o(t){t&&(u.value=t)}return{selectedPlace:b,moduleState:i,name:r,email:c,phone:f,value:m,remark:v,showValue:S,quantity:N,media:a,placeId:n,placeType:s,showFormPage:V,showPaymentPage:F,showConfirmationPage:h,places:w,hasFilledForm:q,hasForcedPlaceType:R,isWaitingForResponse:P,isMetaDataAvailable:U,orderGiftCard:C,initialize:o}}),D={class:"media-selector"},z=["accept"],A={class:"media-selector-wrapper"},W={class:"media-selector-tools"},j={key:0},H={key:1},O={key:2},K=["src"],Y=e.defineComponent({__name:"MediaSelector",props:{modelValue:{},validation:{default:"image/*"},iconColor:{default:"#000"},label:{},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(g,{emit:d}){const B=d,l=g,{t:p}=e.useI18n(),{display:i}=e.useAlertStore(),r=e.ref(),c=e.computed(()=>l.modelValue.base64!=="");function f(a){B("update:modelValue",a)}function m(){f({base64:"",name:"",type:""}),r.value&&(r.value.value="")}function N(){r.value&&r.value.click()}function S(a,n){const[s,k]=[a.name,a.type],u=new FileReader;u.onload=function(V){if(V.target){const F=V.target.result;n({base64:F,name:s,type:k})}else i({message:p("imageUploadError"),type:"error"})},u.readAsDataURL(a)}async function v(){let a;(a=r.value.files)instanceof FileList&&S(a[0],f)}return(a,n)=>(e.openBlock(),e.createBlock(e.InputField,{label:a.label,required:a.required,type:"media"},{default:e.withCtx(()=>[e.createBaseVNode("div",D,[e.createBaseVNode("input",{ref_key:"fileInput",ref:r,type:"file",class:"hidden",accept:a.validation,single:"",onChange:n[0]||(n[0]=s=>v())},null,40,z),e.createBaseVNode("div",A,[e.createBaseVNode("ul",W,[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",j,[e.createVNode(e.Clickable,{label:e.unref(p)("uploadFile"),type:"button",icon:"upload","icon-color":a.iconColor,onClickEvent:n[1]||(n[1]=s=>N())},null,8,["label","icon-color"])])),c.value?(e.openBlock(),e.createElementBlock("li",H,[e.createVNode(e.Clickable,{label:e.unref(p)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":a.iconColor,onClickEvent:n[2]||(n[2]=s=>N())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("li",O,[e.createVNode(e.Clickable,{label:e.unref(p)("removeFile"),type:"button",icon:"trash-alt","icon-color":a.iconColor,onClickEvent:n[3]||(n[3]=s=>m())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:c.value}])},[a.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.modelValue.base64},null,8,K)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function $(g){const d=g;d.__i18n=d.__i18n||[],d.__i18n.push({locale:"",resource:{da:{uploadFile:{t:0,b:{t:2,i:[{t:3}],s:"Upload billede"}},removeFile:{t:0,b:{t:2,i:[{t:3}],s:"Fjern billede"}},replaceFile:{t:0,b:{t:2,i:[{t:3}],s:"Ersat billede"}},imageUploadError:{t:0,b:{t:2,i:[{t:3}],s:"Der skete en fejl under billede upload!"}}},en:{uploadFile:{t:0,b:{t:2,i:[{t:3}],s:"Upload image"}},removeFile:{t:0,b:{t:2,i:[{t:3}],s:"Remove image"}},replaceFile:{t:0,b:{t:2,i:[{t:3}],s:"Replace image"}},imageUploadError:{t:0,b:{t:2,i:[{t:3}],s:"An error occurred under image upload!"}}}}})}typeof $=="function"&&$(Y);const J={class:"gift-card-skeleton"},Q={class:"gift-card-skeleton-form"},X=e.defineComponent({__name:"GiftCardSkeleton",setup(g){return(d,B)=>(e.openBlock(),e.createElementBlock("div",J,[e.createBaseVNode("div",Q,[e.createVNode(T.Field),e.createVNode(T.Field),e.createVNode(T.Field),e.createVNode(T.Field),e.createVNode(T.Field,{"is-text-area":""}),e.createVNode(L.Element,{height:"44px"})])]))}});const Z=e._export_sfc(X,[["__scopeId","data-v-e35c75b3"]]),ee={key:0,id:"konnectio-gift-card-wrapper"},te={id:"konnectio-gift-card-title"},ae={id:"konnectio-gift-card-content"},le={id:"konnectio-gift-card-payment"},oe=["innerHTML"],ne={key:0},ie={key:0,id:"fresh-booking-select-place-type"},re={class:e.normalizeClass(["fresh-booking-label","required"])},de={id:"fresh-booking-select-place-type-input"},ce=["innerHTML"],ue={key:0,id:"konnectio-gift-card-order"},se={class:"fresh-booking-panel"},pe={key:1,id:"konnectio-gift-card-remarks"},fe={key:2,id:"konnectio-gift-card-order-minimal"},me={id:"konnectio-gift-card-recaptcha"},_e=e.defineComponent({name:"GiftCardLayout",__name:"GiftCard",props:{accessToken:{},layout:{default:"minimal"},placeType:{},styling:{}},setup(g){const d=g,B=e.computed(()=>({panelMaxWidth:"800px",...d.styling})),{t:l}=e.useI18n(),{name:p,email:i,phone:r,value:c,remark:f,showValue:m,quantity:N,media:S,placeId:v,placeType:a,showFormPage:n,showPaymentPage:s,showConfirmationPage:k,places:u,hasFilledForm:V,hasForcedPlaceType:F,isWaitingForResponse:h,isMetaDataAvailable:w}=e.storeToRefs(M()),{initialize:R,orderGiftCard:b}=M(),{isRecaptchaEnabled:q,currency:U}=e.storeToRefs(e.useUtilityStore());async function P(){await b()}return e.watch(a,()=>{v.value=void 0}),e.onMounted(()=>{const C=d.placeType?parseInt(d.placeType):void 0;R(C)}),(C,o)=>(e.openBlock(),e.createBlock(I.Container,{styling:B.value},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main$1,{id:"konnectio-gift-card-module",type:"gift-card","access-token":C.accessToken,"data-layout":C.layout},{default:e.withCtx(()=>[e.unref(w)?(e.openBlock(),e.createElementBlock("div",ee,[e.createBaseVNode("h2",te,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.title")),1)]),e.createBaseVNode("div",ae,[e.withDirectives(e.createBaseVNode("div",le,[e.createVNode(x.CheckoutWindow)],512),[[e.vShow,e.unref(s)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("p",{id:"konnectio-gift-card-description",innerHTML:e.unref(l)("giftCard.description")},null,8,oe),e.createBaseVNode("form",null,[e.unref(F)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ne,[e.unref(u)?(e.openBlock(),e.createElementBlock("div",ie,[e.createBaseVNode("label",re,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.selectType")),1)]),e.createBaseVNode("div",de,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),(t,y)=>(e.openBlock(),e.createElementBlock("li",{key:y},[e.createVNode(x.Checkbox,{modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=_=>e.isRef(a)?a.value=_:null),type:"radio",name:"placeType",val:y,label:t.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(u)[e.unref(a)]&&e.unref(u)[e.unref(a)].data.length>1?(e.openBlock(),e.createBlock(e._sfc_main,{key:0,modelValue:e.unref(v),"onUpdate:modelValue":o[1]||(o[1]=t=>e.isRef(v)?v.value=t:null),placeholder:e.unref(l)("giftCard.selectPlacePlaceholder"),options:e.unref(u)[e.unref(a)].data,labelKey:"name",valueKey:"id",required:""},null,8,["modelValue","placeholder","options"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))])),e.createVNode(e.TextField,{modelValue:e.unref(p),"onUpdate:modelValue":o[2]||(o[2]=t=>e.isRef(p)?p.value=t:null),type:"text",name:"name",autocomplete:"name",label:e.unref(l)("giftCard.name"),icon:"user-alt",placeholder:e.unref(l)("giftCard.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(e.TextField,{modelValue:e.unref(i),"onUpdate:modelValue":o[3]||(o[3]=t=>e.isRef(i)?i.value=t:null),type:"email",name:"email",autocomplete:"email",label:e.unref(l)("giftCard.email"),icon:"at",placeholder:e.unref(l)("giftCard.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(x.PhoneField,{modelValue:e.unref(r),"onUpdate:modelValue":o[4]||(o[4]=t=>e.isRef(r)?r.value=t:null),icon:"phone-office",label:e.unref(l)("giftCard.phone"),placeholder:e.unref(l)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(e.TextField,{modelValue:e.unref(c),"onUpdate:modelValue":o[5]||(o[5]=t=>e.isRef(c)?c.value=t:null),type:"number",name:"value",label:e.unref(l)("giftCard.value"),icon:"money-bill",placeholder:e.unref(l)("giftCard.valuePlaceholder"),suffix:e.unref(U),required:""},null,8,["modelValue","label","placeholder","suffix"]),e.createVNode(x.Checkbox,{modelValue:e.unref(m),"onUpdate:modelValue":o[6]||(o[6]=t=>e.isRef(m)?m.value=t:null),type:"checkbox",name:"showValue",label:e.unref(l)("giftCard.showValue"),checked:e.unref(m)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createCommentVNode("",!0)])],512),[[e.vShow,e.unref(n)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("div",{innerHTML:e.unref(l)("giftCard.thankYou")},null,8,ce)],512),[[e.vShow,e.unref(k)]])]),C.layout!=="minimal"&&e.unref(n)?(e.openBlock(),e.createElementBlock("div",ue,[e.createBaseVNode("div",se,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(V),"is-loading":e.unref(h),"onUpdate:isLoading":o[9]||(o[9]=t=>e.isRef(h)?h.value=t:null),onClickEvent:P},null,8,["label","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(n)?(e.openBlock(),e.createElementBlock("div",pe,[e.createVNode(e.TextField,{modelValue:e.unref(f),"onUpdate:modelValue":o[10]||(o[10]=t=>e.isRef(f)?f.value=t:null),type:"textarea",name:"remark",label:e.unref(l)("giftCard.remark"),icon:"info-circle",placeholder:e.unref(l)("giftCard.remarkPlaceholder")},null,8,["modelValue","label","placeholder"])])):e.createCommentVNode("",!0),e.unref(n)?(e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(V),"data-test":"orderGiftCard","is-loading":e.unref(h),"onUpdate:isLoading":o[11]||(o[11]=t=>e.isRef(h)?h.value=t:null),onClickEvent:P},null,8,["label","disabled","is-loading"]),e.withDirectives(e.createBaseVNode("div",me,[e.createVNode(x._sfc_main)],512),[[e.vShow,e.unref(q)]])])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","data-layout"])]),fallback:e.withCtx(()=>[e.createVNode(Z)]),_:1}))]),_:1},8,["styling"]))}});const ve=e._export_sfc(_e,[["__scopeId","data-v-111b608c"]]),ye=e.createPinia(),E=e.createApp({components:{GiftCard:ve}});E.use(ye);E.use(e.instance);E.use(e.install,{bootstrap:!0});E.mount("#konnectio-gift-card-app");
1
+ "use strict";const e=require("vue"),t=require("./SelectField.vue_vue_type_style_index_0_lang-eLyZ247i.cjs"),L=require("./Container-Y6_3uTWy.cjs"),w=require("./CheckoutWindow-NUwbNAPw.cjs"),D=require("./_-oL4OsiNw.cjs"),T=require("./Field-UTbHMN9U.cjs");require("./_commonjsHelpers-f52AuuUj.cjs");const x=t.defineStore("giftCard",()=>{const{pay:p}=t.usePaymentStore(),{bearerToken:c,metaData:F,currencyId:n}=t.storeToRefs(t.useUtilityStore()),i=e.ref(t.GiftCardModuleState.InitialState),h=t.useStorage("konnectio_name","",void 0,{serializer:t.StorageSerializers.string}),d=t.useStorage("konnectio_email","",void 0,{serializer:t.StorageSerializers.string}),u=t.useStorage("konnectio_phone","",void 0,{serializer:t.StorageSerializers.string}),m=e.ref(""),V=e.ref(1),b=e.ref(!0),S=e.ref(""),f=e.ref({base64:"",type:"",name:""}),a=e.ref(void 0),r=e.ref(0),s=e.ref(!1),_=e.ref(0),v=e.computed(()=>i.value===t.GiftCardModuleState.InitialState||i.value===t.GiftCardModuleState.WaitingForResponse),N=e.computed(()=>i.value===t.GiftCardModuleState.ReadyToPay),B=e.computed(()=>i.value===t.GiftCardModuleState.PaymentSuccess),k=e.computed(()=>{const l={1:{label:t.i18n.t("giftCard.hotelType"),data:[]},2:{label:t.i18n.t("giftCard.restaurantType"),data:[]}},y=F.value.hotels[0].places;return y&&y.forEach(g=>{l[g.placeType].data.push(g)}),Object.fromEntries(Object.entries(l).filter(([,g])=>g.data.length>0))}),P=e.computed(()=>_.value!==0),C=e.computed(()=>{let l;if(P.value)l=k.value[_.value].data[0];else if(r.value!==0){const y=a.value,g=k.value[r.value].data;g.length===1?l=g[0]:y!==void 0&&g.forEach($=>{String($.id)===String(y)&&(l=$)})}return l}),R=e.computed(()=>!(!h.value||!d.value||!(u.value.length>=5)||!m.value||C.value===void 0)),U=e.computed(()=>!(i.value===t.GiftCardModuleState.InitialState&&s.value)),G=e.computed(()=>!!(i.value===t.GiftCardModuleState.WaitingForResponse&&s.value));async function E(){i.value=t.GiftCardModuleState.WaitingForResponse,s.value=!0,await t.axios.post("https://production.hotel-service.konnectio.dk/api/gift-card/create",{termsOfserviceURL:window.location.origin,checkoutUrl:window.location.origin,currencyID:n.value,language:t.getUserLanguage(),amount:m.value,quantity:V.value,freeText:S.value,showPrice:b.value,contactName:h.value,contactEmail:d.value,contactPhone:u.value,imageBase64:t.b2a(f.value.base64),imageName:f.value.name,imageFormat:f.value.type,placeType:C.value?C.value.placeType:void 0,placeID:C.value?C.value.id:void 0},{headers:{Authorization:c.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.56-rc2"}}).then(l=>{i.value=t.GiftCardModuleState.ReadyToPay,s.value=!1,p({callback:()=>console.log("Callback!"),response:l.data})})}function o(l){l&&(_.value=l)}return{selectedPlace:C,moduleState:i,name:h,email:d,phone:u,value:m,remark:S,showValue:b,quantity:V,media:f,placeId:a,placeType:r,showFormPage:v,showPaymentPage:N,showConfirmationPage:B,places:k,hasFilledForm:R,hasForcedPlaceType:P,isWaitingForResponse:G,isMetaDataAvailable:U,orderGiftCard:E,initialize:o}}),z={class:"media-selector"},A=["accept"],W={class:"media-selector-wrapper"},j={class:"media-selector-tools"},H={key:0},O={key:1},K={key:2},Y=["src"],J=e.defineComponent({__name:"MediaSelector",props:{modelValue:{},validation:{default:"image/*"},iconColor:{default:"#000"},label:{},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(p,{emit:c}){const F=c,n=p,{t:i}=t.useI18n(),{display:h}=t.useAlertStore(),d=e.ref(),u=e.computed(()=>n.modelValue.base64!=="");function m(a){F("update:modelValue",a)}function V(){m({base64:"",name:"",type:""}),d.value&&(d.value.value="")}function b(){d.value&&d.value.click()}function S(a,r){const[s,_]=[a.name,a.type],v=new FileReader;v.onload=function(N){if(N.target){const B=N.target.result;r({base64:B,name:s,type:_})}else h({message:i("imageUploadError"),type:"error"})},v.readAsDataURL(a)}async function f(){let a;(a=d.value.files)instanceof FileList&&S(a[0],m)}return(a,r)=>(e.openBlock(),e.createBlock(t.InputField,{label:a.label,required:a.required,type:"media"},{default:e.withCtx(()=>[e.createElementVNode("div",z,[e.createElementVNode("input",{ref_key:"fileInput",ref:d,type:"file",class:"hidden",accept:a.validation,single:"",onChange:r[0]||(r[0]=s=>f())},null,40,A),e.createElementVNode("div",W,[e.createElementVNode("ul",j,[u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",H,[e.createVNode(t.Clickable,{label:e.unref(i)("uploadFile"),type:"button",icon:"upload","icon-color":a.iconColor,onClickEvent:r[1]||(r[1]=s=>b())},null,8,["label","icon-color"])])),u.value?(e.openBlock(),e.createElementBlock("li",O,[e.createVNode(t.Clickable,{label:e.unref(i)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":a.iconColor,onClickEvent:r[2]||(r[2]=s=>b())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("li",K,[e.createVNode(t.Clickable,{label:e.unref(i)("removeFile"),type:"button",icon:"trash-alt","icon-color":a.iconColor,onClickEvent:r[3]||(r[3]=s=>V())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:u.value}])},[a.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.modelValue.base64},null,8,Y)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function M(p){const c=p;c.__i18n=c.__i18n||[],c.__i18n.push({locale:"",resource:{da:{uploadFile:{t:0,b:{t:2,i:[{t:3}],s:"Upload billede"}},removeFile:{t:0,b:{t:2,i:[{t:3}],s:"Fjern billede"}},replaceFile:{t:0,b:{t:2,i:[{t:3}],s:"Ersat billede"}},imageUploadError:{t:0,b:{t:2,i:[{t:3}],s:"Der skete en fejl under billede upload!"}}},en:{uploadFile:{t:0,b:{t:2,i:[{t:3}],s:"Upload image"}},removeFile:{t:0,b:{t:2,i:[{t:3}],s:"Remove image"}},replaceFile:{t:0,b:{t:2,i:[{t:3}],s:"Replace image"}},imageUploadError:{t:0,b:{t:2,i:[{t:3}],s:"An error occurred under image upload!"}}}}})}typeof M=="function"&&M(J);const Q={class:"gift-card-skeleton"},X={class:"gift-card-skeleton-form"},Z=e.defineComponent({__name:"GiftCardSkeleton",setup(p){return(c,F)=>(e.openBlock(),e.createElementBlock("div",Q,[e.createElementVNode("div",X,[e.createVNode(T.Field),e.createVNode(T.Field),e.createVNode(T.Field),e.createVNode(T.Field),e.createVNode(T.Field,{"is-text-area":""}),e.createVNode(D.Element,{height:"44px"})])]))}}),ee=t._export_sfc(Z,[["__scopeId","data-v-e35c75b3"]]),te={key:0,id:"konnectio-gift-card-wrapper"},le={id:"konnectio-gift-card-title"},ae={id:"konnectio-gift-card-content"},oe={id:"konnectio-gift-card-payment"},ne=["innerHTML"],re={key:0},ie={key:0,id:"fresh-booking-select-place-type"},de={class:e.normalizeClass(["fresh-booking-label","required"])},ce={id:"fresh-booking-select-place-type-input"},ue=["innerHTML"],se={key:0,id:"konnectio-gift-card-order"},fe={class:"fresh-booking-panel"},pe={key:1,id:"konnectio-gift-card-remarks"},me={key:2,id:"konnectio-gift-card-order-minimal"},ve={id:"konnectio-gift-card-recaptcha"},ke=e.defineComponent({name:"GiftCardLayout",__name:"GiftCard",props:{accessToken:{},layout:{default:"minimal"},placeType:{},styling:{}},setup(p){const c=p,F=e.computed(()=>({panelMaxWidth:"800px",...c.styling})),{t:n}=t.useI18n(),{name:i,email:h,phone:d,value:u,remark:m,showValue:V,quantity:b,media:S,placeId:f,placeType:a,showFormPage:r,showPaymentPage:s,showConfirmationPage:_,places:v,hasFilledForm:N,hasForcedPlaceType:B,isWaitingForResponse:k,isMetaDataAvailable:P}=t.storeToRefs(x()),{initialize:C,orderGiftCard:R}=x(),{isRecaptchaEnabled:U,currency:G}=t.storeToRefs(t.useUtilityStore());return e.watch(a,()=>{f.value=void 0}),e.onMounted(()=>{const E=c.placeType?parseInt(c.placeType):void 0;C(E)}),(E,o)=>(e.openBlock(),e.createBlock(L.Container,{styling:F.value},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(t._sfc_main$2,{id:"konnectio-gift-card-module",type:"gift-card","access-token":E.accessToken,"data-layout":E.layout},{default:e.withCtx(()=>[e.unref(P)?(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("h2",le,[e.createElementVNode("span",null,e.toDisplayString(e.unref(n)("giftCard.title")),1)]),e.createElementVNode("div",ae,[e.withDirectives(e.createElementVNode("div",oe,[e.createVNode(w.CheckoutWindow)],512),[[e.vShow,e.unref(s)]]),e.withDirectives(e.createElementVNode("div",null,[e.createElementVNode("p",{id:"konnectio-gift-card-description",innerHTML:e.unref(n)("giftCard.description")},null,8,ne),e.createElementVNode("form",null,[e.unref(B)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",re,[e.unref(v)?(e.openBlock(),e.createElementBlock("div",ie,[e.createElementVNode("label",de,[e.createElementVNode("span",null,e.toDisplayString(e.unref(n)("giftCard.selectType")),1)]),e.createElementVNode("div",ce,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(v),(l,y)=>(e.openBlock(),e.createElementBlock("li",{key:y},[e.createVNode(w.Checkbox,{modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=g=>e.isRef(a)?a.value=g:null),type:"radio",name:"placeType",val:y,label:l.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(v)[e.unref(a)]&&e.unref(v)[e.unref(a)].data.length>1?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,modelValue:e.unref(f),"onUpdate:modelValue":o[1]||(o[1]=l=>e.isRef(f)?f.value=l:null),placeholder:e.unref(n)("giftCard.selectPlacePlaceholder"),options:e.unref(v)[e.unref(a)].data,labelKey:"name",valueKey:"id",required:""},null,8,["modelValue","placeholder","options"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(t.Loading,{key:1}))])),e.createVNode(t.TextField,{modelValue:e.unref(i),"onUpdate:modelValue":o[2]||(o[2]=l=>e.isRef(i)?i.value=l:null),type:"text",name:"name",autocomplete:"name",label:e.unref(n)("giftCard.name"),icon:"user-alt",placeholder:e.unref(n)("giftCard.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(t.TextField,{modelValue:e.unref(h),"onUpdate:modelValue":o[3]||(o[3]=l=>e.isRef(h)?h.value=l:null),type:"email",name:"email",autocomplete:"email",label:e.unref(n)("giftCard.email"),icon:"at",placeholder:e.unref(n)("giftCard.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(w.PhoneField,{modelValue:e.unref(d),"onUpdate:modelValue":o[4]||(o[4]=l=>e.isRef(d)?d.value=l:null),icon:"phone-office",label:e.unref(n)("giftCard.phone"),placeholder:e.unref(n)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(t.TextField,{modelValue:e.unref(u),"onUpdate:modelValue":o[5]||(o[5]=l=>e.isRef(u)?u.value=l:null),type:"number",name:"value",label:e.unref(n)("giftCard.value"),icon:"money-bill",placeholder:e.unref(n)("giftCard.valuePlaceholder"),suffix:e.unref(G),required:""},null,8,["modelValue","label","placeholder","suffix"]),e.createVNode(w.Checkbox,{modelValue:e.unref(V),"onUpdate:modelValue":o[6]||(o[6]=l=>e.isRef(V)?V.value=l:null),type:"checkbox",name:"showValue",label:e.unref(n)("giftCard.showValue"),checked:e.unref(V)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createVNode(t._sfc_main$1,{modelValue:e.unref(b),"onUpdate:modelValue":o[8]||(o[8]=l=>e.isRef(b)?b.value=l:null),label:e.unref(n)("giftCard.quantity"),icon:"gift-card",required:""},null,8,["modelValue","label"])])],512),[[e.vShow,e.unref(r)]]),e.withDirectives(e.createElementVNode("div",null,[e.createElementVNode("div",{innerHTML:e.unref(n)("giftCard.thankYou")},null,8,ue)],512),[[e.vShow,e.unref(_)]])]),E.layout!=="minimal"&&e.unref(r)?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("div",fe,[e.createVNode(t.Clickable,{label:e.unref(n)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(N),"is-loading":e.unref(k),"onUpdate:isLoading":o[9]||(o[9]=l=>e.isRef(k)?k.value=l:null),onClickEvent:e.unref(R)},null,8,["label","disabled","is-loading","onClickEvent"])])])):e.createCommentVNode("",!0),e.unref(r)?(e.openBlock(),e.createElementBlock("div",pe,[e.createVNode(t.TextField,{modelValue:e.unref(m),"onUpdate:modelValue":o[10]||(o[10]=l=>e.isRef(m)?m.value=l:null),type:"textarea",name:"remark",label:e.unref(n)("giftCard.remark"),icon:"info-circle",placeholder:e.unref(n)("giftCard.remarkPlaceholder")},null,8,["modelValue","label","placeholder"])])):e.createCommentVNode("",!0),e.unref(r)?(e.openBlock(),e.createElementBlock("div",me,[e.createVNode(t.Clickable,{label:e.unref(n)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(N),"data-test":"orderGiftCard","is-loading":e.unref(k),"onUpdate:isLoading":o[11]||(o[11]=l=>e.isRef(k)?k.value=l:null),onClickEvent:e.unref(R)},null,8,["label","disabled","is-loading","onClickEvent"]),e.withDirectives(e.createElementVNode("div",ve,[e.createVNode(w._sfc_main)],512),[[e.vShow,e.unref(U)]])])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(t.Loading,{key:1}))]),_:1},8,["access-token","data-layout"])]),fallback:e.withCtx(()=>[e.createVNode(ee)]),_:1}))]),_:1},8,["styling"]))}}),I=t._export_sfc(ke,[["__scopeId","data-v-ec9ea15b"]]),ge=t.createPinia(),q=e.createApp({components:{GiftCard:I}});q.use(ge);q.use(t.instance);q.use(t.install,{bootstrap:!0});q.mount("#konnectio-gift-card-app");const he={install:p=>{p.component("GiftCard",I)}};module.exports=he;
@@ -1 +1,3 @@
1
1
  export * from './entries/gift-card'
2
+ import _default from './entries/gift-card'
3
+ export default _default