@konnectio/core 4.0.12 → 4.0.14

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 (76) hide show
  1. package/dist/{ActionField-23ce1b2a.cjs → ActionField-251eb289.cjs} +1 -1
  2. package/dist/{ActionField-311942d2.js → ActionField-ed13e600.js} +7 -7
  3. package/dist/ActionField-ed13e600.js.br +0 -0
  4. package/dist/AvailabilitySkeleton-beb10d07.js +189 -0
  5. package/dist/AvailabilitySkeleton-beb10d07.js.br +0 -0
  6. package/dist/AvailabilitySkeleton-cc8eafe0.cjs +1 -0
  7. package/dist/{DateField.vue_vue_type_style_index_0_lang-47e679d1.cjs → DateField.vue_vue_type_style_index_0_lang-8ddce55e.cjs} +5 -5
  8. package/dist/{DateField.vue_vue_type_style_index_0_lang-ec35955b.js → DateField.vue_vue_type_style_index_0_lang-d1a9ffca.js} +1805 -1801
  9. package/dist/DateField.vue_vue_type_style_index_0_lang-d1a9ffca.js.br +0 -0
  10. package/dist/{Field-ff599d13.js → Field-48a50c44.js} +2 -2
  11. package/dist/Field-48a50c44.js.br +0 -0
  12. package/dist/{Field-dcffacf2.cjs → Field-cbc16db4.cjs} +1 -1
  13. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-50fc08f1.cjs → NumberField.vue_vue_type_script_setup_true_lang-7676783c.cjs} +1 -1
  14. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-2eb1b46f.js → NumberField.vue_vue_type_script_setup_true_lang-7aa515cb.js} +2 -2
  15. package/dist/NumberField.vue_vue_type_script_setup_true_lang-7aa515cb.js.br +0 -0
  16. package/dist/SelectField.vue_vue_type_style_index_0_lang-43c8a651.cjs +802 -0
  17. package/dist/{SelectField.vue_vue_type_style_index_0_lang-e2f4edc3.js → SelectField.vue_vue_type_style_index_0_lang-96b84c98.js} +9985 -9670
  18. package/dist/SelectField.vue_vue_type_style_index_0_lang-96b84c98.js.br +0 -0
  19. package/dist/{TextField-6f7e37d9.cjs → TextField-379793fe.cjs} +27 -27
  20. package/dist/{TextField-cd93b966.js → TextField-7150eae7.js} +2363 -2437
  21. package/dist/TextField-7150eae7.js.br +0 -0
  22. package/dist/{ThankYou-3d74a6dc.cjs → ThankYou-bcce79d1.cjs} +1 -1
  23. package/dist/{ThankYou-c1878478.js → ThankYou-f3dd76f4.js} +6 -6
  24. package/dist/ThankYou-f3dd76f4.js.br +0 -0
  25. package/dist/{_-8772cf9a.js → _-cd5be070.js} +5 -5
  26. package/dist/_-cd5be070.js.br +0 -0
  27. package/dist/{_-0895679a.cjs → _-de6b4115.cjs} +1 -1
  28. package/dist/availability.cjs +2 -2
  29. package/dist/availability.d.ts +0 -2
  30. package/dist/availability.js +124 -123
  31. package/dist/availability.js.br +0 -0
  32. package/dist/components/forms/EventAvailabilityForm.vue.d.ts +1 -1
  33. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +1 -1
  34. package/dist/entries/availability.d.ts +1 -3
  35. package/dist/{event-8e90a6e3.cjs → event-2b792293.cjs} +1 -1
  36. package/dist/{event-60e076f2.js → event-43539c7b.js} +9 -9
  37. package/dist/event-43539c7b.js.br +0 -0
  38. package/dist/event.cjs +1 -1
  39. package/dist/event.js +65 -65
  40. package/dist/event.js.br +0 -0
  41. package/dist/gift-card-validation.cjs +1 -1
  42. package/dist/gift-card-validation.js +6 -6
  43. package/dist/gift-card-validation.js.br +0 -0
  44. package/dist/gift-card.cjs +1 -1
  45. package/dist/gift-card.js +51 -51
  46. package/dist/gift-card.js.br +0 -0
  47. package/dist/hotel.cjs +5 -5
  48. package/dist/hotel.js +957 -957
  49. package/dist/hotel.js.br +0 -0
  50. package/dist/{index-345407fb.cjs → index-751b236a.cjs} +1 -1
  51. package/dist/{index-b5d8f4fc.js → index-cadcbd9e.js} +2 -2
  52. package/dist/index-cadcbd9e.js.br +0 -0
  53. package/dist/polyfill.cjs +1 -1
  54. package/dist/polyfill.js +1 -1
  55. package/dist/polyfill.js.br +0 -0
  56. package/dist/store/event.d.ts +1 -1
  57. package/dist/store/hotel.d.ts +5 -2
  58. package/dist/store/utilities.d.ts +18 -2
  59. package/dist/style.css +1 -1
  60. package/dist/style.css.br +0 -0
  61. package/package.json +4 -5
  62. package/dist/ActionField-311942d2.js.br +0 -0
  63. package/dist/AvailabilitySkeleton-2dfbb28e.js +0 -382
  64. package/dist/AvailabilitySkeleton-2dfbb28e.js.br +0 -0
  65. package/dist/AvailabilitySkeleton-7d9e2680.cjs +0 -1
  66. package/dist/DateField.vue_vue_type_style_index_0_lang-ec35955b.js.br +0 -0
  67. package/dist/Field-ff599d13.js.br +0 -0
  68. package/dist/NumberField.vue_vue_type_script_setup_true_lang-2eb1b46f.js.br +0 -0
  69. package/dist/SelectField.vue_vue_type_style_index_0_lang-4755fb8a.cjs +0 -802
  70. package/dist/SelectField.vue_vue_type_style_index_0_lang-e2f4edc3.js.br +0 -0
  71. package/dist/TextField-cd93b966.js.br +0 -0
  72. package/dist/ThankYou-c1878478.js.br +0 -0
  73. package/dist/_-8772cf9a.js.br +0 -0
  74. package/dist/event-60e076f2.js.br +0 -0
  75. package/dist/index-b5d8f4fc.js.br +0 -0
  76. package/dist/store/recaptcha.d.ts +0 -1
@@ -1 +1 @@
1
- "use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-4755fb8a.cjs"),V=require("./index-345407fb.cjs"),M=require("./_-0895679a.cjs"),x=require("./TextField-6f7e37d9.cjs"),R=require("./Field-dcffacf2.cjs");require("./_commonjsHelpers-6763f629.cjs");const U=e.defineStore("giftCard",()=>{e.useAlertStore();const{pay:y}=M.usePaymentStore(),{bearerToken:l,metaData:o}=e.storeToRefs(e.useUtilityStore()),t=e.ref(e.GiftCardModuleState.InitialState),p=e.useStorage("freshBookingName","",void 0,{serializer:e.StorageSerializers.string}),g=e.useStorage("freshBookingEmail","",void 0,{serializer:e.StorageSerializers.string}),s=e.useStorage("freshBookingPhone","",void 0,{serializer:e.StorageSerializers.string}),f=e.ref(""),C=e.ref(1),w=e.ref(!0),v=e.ref(""),u=e.ref({base64:"",type:"",name:""}),k=e.ref(void 0),n=e.ref(0),i=e.ref(!1),d=e.ref(0),B=e.computed(()=>t.value===e.GiftCardModuleState.InitialState||t.value===e.GiftCardModuleState.WaitingForResponse),N=e.computed(()=>t.value===e.GiftCardModuleState.ReadyToPay),m=e.computed(()=>t.value===e.GiftCardModuleState.PaymentSuccess),h=e.computed(()=>{const c={1:{label:e.i18n.t("giftCard.hotelType"),data:[]},2:{label:e.i18n.t("giftCard.restaurantType"),data:[]}},a=o.value.places;return a&&a.forEach(_=>{c[_.placeType].data.push(_)}),Object.fromEntries(Object.entries(c).filter(([,_])=>_.data.length>0))}),T=e.computed(()=>d.value!==0),b=e.computed(()=>{let c;if(T.value)c=h.value[d.value].data[0];else if(n.value!==0){const a=k.value,_=h.value[n.value].data;_.length===1?c=_[0]:a!==void 0&&_.forEach(z=>{String(z.id)===String(a)&&(c=z)})}return c}),E=e.computed(()=>!(!p.value||!g.value||!(s.value.length>=5)||!f.value||b.value===void 0)),q=e.computed(()=>!(t.value===e.GiftCardModuleState.InitialState&&i.value)),P=e.computed(()=>!!(t.value===e.GiftCardModuleState.WaitingForResponse&&i.value));async function S(){t.value=e.GiftCardModuleState.WaitingForResponse,i.value=!0,await e.axios.post("https://stage.hotel-service.konnectio.dk/api/gift-card/create",{termsOfserviceURL:"https://freshbooking.dk",checkoutUrl:"https://freshbooking.dk",currencyID:o.value.currency.id,language:e.getUserLanguage(),amount:f.value,quantity:C.value,freeText:v.value,showPrice:w.value,contactName:p.value,contactEmail:g.value,contactPhone:s.value,imageBase64:e.b2a(u.value.base64),imageName:u.value.name,imageFormat:u.value.type,placeType:b.value?b.value.placeType:void 0,placeID:b.value?b.value.id:void 0},{headers:{Authorization:l.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.12"}}).then(c=>{t.value=e.GiftCardModuleState.ReadyToPay,i.value=!1,y({callback:()=>console.log("Callback!"),response:c.data})})}function r(c){c&&(d.value=c)}return{moduleState:t,name:p,email:g,phone:s,value:f,remark:v,showValue:w,quantity:C,media:u,placeId:k,placeType:n,showFormPage:B,showPaymentPage:N,showConfirmationPage:m,places:h,hasFilledForm:E,hasForcedPlaceType:T,isWaitingForResponse:P,isMetaDataAvailable:q,orderGiftCard:S,initialize:r}}),$={class:"media-selector"},D=["accept"],I={class:"media-selector-wrapper"},L={class:"media-selector-tools"},A={key:0},W={key:1},j={key:2},H=["src"],O=e.defineComponent({__name:"MediaSelector",props:{modelValue:{},validation:{default:"image/*"},iconColor:{default:"#000"},label:{},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(y,{emit:l}){const o=l,t=y,{t:p}=e.useI18n(),{display:g}=e.useAlertStore(),s=e.ref(),f=e.computed(()=>t.modelValue.base64!=="");function C(n){o("update:modelValue",n)}function w(){C({base64:"",name:"",type:""}),s.value&&(s.value.value="")}function v(){s.value&&s.value.click()}function u(n,i){const[d,B]=[n.name,n.type],N=new FileReader;N.onload=function(m){if(m.target){const h=m.target.result;i({base64:h,name:d,type:B})}else g({message:p("imageUploadError"),type:"error"})},N.readAsDataURL(n)}async function k(){let n;(n=s.value.files)instanceof FileList&&u(n[0],C)}return(n,i)=>(e.openBlock(),e.createBlock(e.InputField,{label:n.label,required:n.required,type:"media"},{default:e.withCtx(()=>[e.createBaseVNode("div",$,[e.createBaseVNode("input",{ref_key:"fileInput",ref:s,type:"file",class:"hidden",accept:n.validation,single:"",onChange:i[0]||(i[0]=d=>k())},null,40,D),e.createBaseVNode("div",I,[e.createBaseVNode("ul",L,[f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",A,[e.createVNode(e.Clickable,{label:e.unref(p)("uploadFile"),type:"button",icon:"upload","icon-color":n.iconColor,onClickEvent:i[1]||(i[1]=d=>v())},null,8,["label","icon-color"])])),f.value?(e.openBlock(),e.createElementBlock("li",W,[e.createVNode(e.Clickable,{label:e.unref(p)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":n.iconColor,onClickEvent:i[2]||(i[2]=d=>v())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("li",j,[e.createVNode(e.Clickable,{label:e.unref(p)("removeFile"),type:"button",icon:"trash-alt","icon-color":n.iconColor,onClickEvent:i[3]||(i[3]=d=>w())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:f.value}])},[n.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.modelValue.base64},null,8,H)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function G(y){const l=y;l.__i18n=l.__i18n||[],l.__i18n.push({locale:"",resource:{da:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload billede"])},removeFile:o=>{const{normalize:t}=o;return t(["Fjern billede"])},replaceFile:o=>{const{normalize:t}=o;return t(["Ersat billede"])},imageUploadError:o=>{const{normalize:t}=o;return t(["Der skete en fejl under billede upload!"])}},en:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload image"])},removeFile:o=>{const{normalize:t}=o;return t(["Remove image"])},replaceFile:o=>{const{normalize:t}=o;return t(["Replace image"])},imageUploadError:o=>{const{normalize:t}=o;return t(["An error occurred under image upload!"])}}}})}typeof G=="function"&&G(O);const K={class:"gift-card-skeleton"},Y={class:"gift-card-skeleton-form"},J=e.defineComponent({__name:"GiftCardSkeleton",setup(y){return(l,o)=>(e.openBlock(),e.createElementBlock("div",K,[e.createBaseVNode("div",Y,[e.createVNode(R.Field),e.createVNode(R.Field),e.createVNode(R.Field),e.createVNode(R.Field),e.createVNode(R.Field,{"is-text-area":""}),e.createVNode(M.Element,{height:"44px"})])]))}});const Q=e._export_sfc(J,[["__scopeId","data-v-2600a731"]]),X={key:0,id:"fresh-booking-gift-card-wrapper"},Z={id:"fresh-booking-gift-card-title"},ee={id:"fresh-booking-gift-card-content"},te={id:"fresh-booking-gift-card-payment"},ae=["innerHTML"],le={key:0},oe={key:0,id:"fresh-booking-select-place-type"},ne={class:e.normalizeClass(["fresh-booking-label","required"])},re={id:"fresh-booking-select-place-type-input"},ie=["innerHTML"],de={key:0,id:"fresh-booking-gift-card-order"},se={class:"fresh-booking-panel"},ue={key:1,id:"fresh-booking-gift-card-remarks"},ce={key:2,id:"fresh-booking-gift-card-order-minimal","sticky-side":"bottom"},fe={id:"fresh-booking-gift-card-recaptcha"},pe=e.defineComponent({name:"GiftCardLayout",__name:"GiftCard",props:{accessToken:{},layout:{default:"minimal"},placeType:{},styling:{}},setup(y){const{t:l}=e.useI18n(),{name:o,email:t,phone:p,value:g,remark:s,showValue:f,quantity:C,media:w,placeId:v,placeType:u,showFormPage:k,showPaymentPage:n,showConfirmationPage:i,places:d,hasFilledForm:B,hasForcedPlaceType:N,isWaitingForResponse:m,isMetaDataAvailable:h}=e.storeToRefs(U()),{initialize:T,orderGiftCard:b}=U(),{isRecaptchaEnabled:E,currency:q}=e.storeToRefs(e.useUtilityStore());async function P(){await b()}return e.watch(u,()=>{v.value=void 0}),e.onMounted(()=>{T()}),(S,r)=>{const c=e.resolveDirective("sticky");return e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main,{id:"fresh-booking-gift-card-module",type:"gift-card","access-token":S.accessToken,"data-layout":S.layout,styling:S.styling,"sticky-container":""},{default:e.withCtx(()=>[e.unref(h)?(e.openBlock(),e.createElementBlock("div",X,[e.createBaseVNode("h4",Z,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.title")),1)]),e.createBaseVNode("div",ee,[e.withDirectives(e.createBaseVNode("div",te,[e.createVNode(V.CheckoutWindow)],512),[[e.vShow,e.unref(n)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("p",{id:"fresh-booking-gift-card-description",innerHTML:e.unref(l)("giftCard.description")},null,8,ae),e.createBaseVNode("form",null,[e.createVNode(x.TextField,{modelValue:e.unref(o),"onUpdate:modelValue":r[0]||(r[0]=a=>e.isRef(o)?o.value=a: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(x.TextField,{modelValue:e.unref(t),"onUpdate:modelValue":r[1]||(r[1]=a=>e.isRef(t)?t.value=a: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(V.PhoneField,{modelValue:e.unref(p),"onUpdate:modelValue":r[2]||(r[2]=a=>e.isRef(p)?p.value=a:null),icon:"phone-office",label:e.unref(l)("giftCard.phone"),placeholder:e.unref(l)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.unref(N)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",le,[e.unref(d)?(e.openBlock(),e.createElementBlock("div",oe,[e.createBaseVNode("label",ne,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.selectType")),1)]),e.createBaseVNode("div",re,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(a,_)=>(e.openBlock(),e.createElementBlock("li",{key:_},[e.createVNode(V.Checkbox,{modelValue:e.unref(u),"onUpdate:modelValue":r[3]||(r[3]=z=>e.isRef(u)?u.value=z:null),type:"radio",name:"placeType",val:_,label:a.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(d)[e.unref(u)]&&e.unref(d)[e.unref(u)].data.length>1?(e.openBlock(),e.createBlock(x._sfc_main,{key:0,modelValue:e.unref(v),"onUpdate:modelValue":r[4]||(r[4]=a=>e.isRef(v)?v.value=a:null),placeholder:e.unref(l)("giftCard.selectPlacePlaceholder"),options:e.unref(d)[e.unref(u)].data,labelKey:"name",valueKey:"id",required:""},null,8,["modelValue","placeholder","options"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))])),e.createVNode(x.TextField,{modelValue:e.unref(g),"onUpdate:modelValue":r[5]||(r[5]=a=>e.isRef(g)?g.value=a:null),type:"number",name:"value",label:e.unref(l)("giftCard.value"),icon:"money-bill",placeholder:e.unref(l)("giftCard.valuePlaceholder"),suffix:e.unref(q),required:""},null,8,["modelValue","label","placeholder","suffix"]),e.createVNode(V.Checkbox,{modelValue:e.unref(f),"onUpdate:modelValue":r[6]||(r[6]=a=>e.isRef(f)?f.value=a:null),type:"checkbox",name:"showValue",label:e.unref(l)("giftCard.showValue"),checked:e.unref(f)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createCommentVNode("",!0)])],512),[[e.vShow,e.unref(k)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("div",{innerHTML:e.unref(l)("giftCard.thankYou")},null,8,ie)],512),[[e.vShow,e.unref(i)]])]),S.layout!=="minimal"&&e.unref(k)?(e.openBlock(),e.createElementBlock("div",de,[e.createBaseVNode("div",se,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(B),"is-loading":e.unref(m),"onUpdate:isLoading":r[9]||(r[9]=a=>e.isRef(m)?m.value=a:null),onClickEvent:P},null,8,["label","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(x.TextField,{modelValue:e.unref(s),"onUpdate:modelValue":r[10]||(r[10]=a=>e.isRef(s)?s.value=a: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(k)?e.withDirectives((e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(B),"data-test":"orderGiftCard","is-loading":e.unref(m),"onUpdate:isLoading":r[11]||(r[11]=a=>e.isRef(m)?m.value=a:null),onClickEvent:P},null,8,["label","disabled","is-loading"]),e.withDirectives(e.createBaseVNode("div",fe,[e.createVNode(V._sfc_main)],512),[[e.vShow,e.unref(E)]])])),[[c]]):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","data-layout","styling"])]),fallback:e.withCtx(()=>[e.createVNode(Q)]),_:1})}}});const me=e._export_sfc(pe,[["__scopeId","data-v-e4aa1e4c"]]),_e=e.createPinia(),ve=e.zo(),F=e.createApp({components:{GiftCard:me}});F.use(_e);F.use(e.instance);F.use(ve);F.use(V.StickyPlugin);F.use(V.install,{bootstrap:!1});F.mount("#konnectio-gift-card-app");
1
+ "use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-43c8a651.cjs"),V=require("./index-751b236a.cjs"),$=require("./_-de6b4115.cjs"),z=require("./TextField-379793fe.cjs"),x=require("./Field-cbc16db4.cjs");require("./_commonjsHelpers-6763f629.cjs");const U=e.defineStore("giftCard",()=>{e.useAlertStore();const{pay:y}=$.usePaymentStore(),{bearerToken:l,metaData:o}=e.storeToRefs(e.useUtilityStore()),t=e.ref(e.GiftCardModuleState.InitialState),p=e.useStorage("freshBookingName","",void 0,{serializer:e.StorageSerializers.string}),g=e.useStorage("freshBookingEmail","",void 0,{serializer:e.StorageSerializers.string}),s=e.useStorage("freshBookingPhone","",void 0,{serializer:e.StorageSerializers.string}),f=e.ref(""),C=e.ref(1),w=e.ref(!0),v=e.ref(""),u=e.ref({base64:"",type:"",name:""}),k=e.ref(void 0),n=e.ref(0),i=e.ref(!1),d=e.ref(0),B=e.computed(()=>t.value===e.GiftCardModuleState.InitialState||t.value===e.GiftCardModuleState.WaitingForResponse),N=e.computed(()=>t.value===e.GiftCardModuleState.ReadyToPay),m=e.computed(()=>t.value===e.GiftCardModuleState.PaymentSuccess),h=e.computed(()=>{const c={1:{label:e.i18n.t("giftCard.hotelType"),data:[]},2:{label:e.i18n.t("giftCard.restaurantType"),data:[]}},a=o.value.places;return a&&a.forEach(_=>{c[_.placeType].data.push(_)}),Object.fromEntries(Object.entries(c).filter(([,_])=>_.data.length>0))}),R=e.computed(()=>d.value!==0),b=e.computed(()=>{let c;if(R.value)c=h.value[d.value].data[0];else if(n.value!==0){const a=k.value,_=h.value[n.value].data;_.length===1?c=_[0]:a!==void 0&&_.forEach(P=>{String(P.id)===String(a)&&(c=P)})}return c}),E=e.computed(()=>!(!p.value||!g.value||!(s.value.length>=5)||!f.value||b.value===void 0)),q=e.computed(()=>!(t.value===e.GiftCardModuleState.InitialState&&i.value)),T=e.computed(()=>!!(t.value===e.GiftCardModuleState.WaitingForResponse&&i.value));async function S(){t.value=e.GiftCardModuleState.WaitingForResponse,i.value=!0,await e.axios.post("https://stage.hotel-service.konnectio.dk/api/gift-card/create",{termsOfserviceURL:"https://freshbooking.dk",checkoutUrl:"https://freshbooking.dk",currencyID:o.value.currency.id,language:e.getUserLanguage(),amount:f.value,quantity:C.value,freeText:v.value,showPrice:w.value,contactName:p.value,contactEmail:g.value,contactPhone:s.value,imageBase64:e.b2a(u.value.base64),imageName:u.value.name,imageFormat:u.value.type,placeType:b.value?b.value.placeType:void 0,placeID:b.value?b.value.id:void 0},{headers:{Authorization:l.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.14"}}).then(c=>{t.value=e.GiftCardModuleState.ReadyToPay,i.value=!1,y({callback:()=>console.log("Callback!"),response:c.data})})}function r(c){c&&(d.value=c)}return{moduleState:t,name:p,email:g,phone:s,value:f,remark:v,showValue:w,quantity:C,media:u,placeId:k,placeType:n,showFormPage:B,showPaymentPage:N,showConfirmationPage:m,places:h,hasFilledForm:E,hasForcedPlaceType:R,isWaitingForResponse:T,isMetaDataAvailable:q,orderGiftCard:S,initialize:r}}),M={class:"media-selector"},D=["accept"],I={class:"media-selector-wrapper"},L={class:"media-selector-tools"},A={key:0},W={key:1},j={key:2},H=["src"],O=e.defineComponent({__name:"MediaSelector",props:{modelValue:{},validation:{default:"image/*"},iconColor:{default:"#000"},label:{},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(y,{emit:l}){const o=l,t=y,{t:p}=e.useI18n(),{display:g}=e.useAlertStore(),s=e.ref(),f=e.computed(()=>t.modelValue.base64!=="");function C(n){o("update:modelValue",n)}function w(){C({base64:"",name:"",type:""}),s.value&&(s.value.value="")}function v(){s.value&&s.value.click()}function u(n,i){const[d,B]=[n.name,n.type],N=new FileReader;N.onload=function(m){if(m.target){const h=m.target.result;i({base64:h,name:d,type:B})}else g({message:p("imageUploadError"),type:"error"})},N.readAsDataURL(n)}async function k(){let n;(n=s.value.files)instanceof FileList&&u(n[0],C)}return(n,i)=>(e.openBlock(),e.createBlock(e.InputField,{label:n.label,required:n.required,type:"media"},{default:e.withCtx(()=>[e.createBaseVNode("div",M,[e.createBaseVNode("input",{ref_key:"fileInput",ref:s,type:"file",class:"hidden",accept:n.validation,single:"",onChange:i[0]||(i[0]=d=>k())},null,40,D),e.createBaseVNode("div",I,[e.createBaseVNode("ul",L,[f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",A,[e.createVNode(e.Clickable,{label:e.unref(p)("uploadFile"),type:"button",icon:"upload","icon-color":n.iconColor,onClickEvent:i[1]||(i[1]=d=>v())},null,8,["label","icon-color"])])),f.value?(e.openBlock(),e.createElementBlock("li",W,[e.createVNode(e.Clickable,{label:e.unref(p)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":n.iconColor,onClickEvent:i[2]||(i[2]=d=>v())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("li",j,[e.createVNode(e.Clickable,{label:e.unref(p)("removeFile"),type:"button",icon:"trash-alt","icon-color":n.iconColor,onClickEvent:i[3]||(i[3]=d=>w())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:f.value}])},[n.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.modelValue.base64},null,8,H)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function G(y){const l=y;l.__i18n=l.__i18n||[],l.__i18n.push({locale:"",resource:{da:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload billede"])},removeFile:o=>{const{normalize:t}=o;return t(["Fjern billede"])},replaceFile:o=>{const{normalize:t}=o;return t(["Ersat billede"])},imageUploadError:o=>{const{normalize:t}=o;return t(["Der skete en fejl under billede upload!"])}},en:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload image"])},removeFile:o=>{const{normalize:t}=o;return t(["Remove image"])},replaceFile:o=>{const{normalize:t}=o;return t(["Replace image"])},imageUploadError:o=>{const{normalize:t}=o;return t(["An error occurred under image upload!"])}}}})}typeof G=="function"&&G(O);const K={class:"gift-card-skeleton"},Y={class:"gift-card-skeleton-form"},J=e.defineComponent({__name:"GiftCardSkeleton",setup(y){return(l,o)=>(e.openBlock(),e.createElementBlock("div",K,[e.createBaseVNode("div",Y,[e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field,{"is-text-area":""}),e.createVNode($.Element,{height:"44px"})])]))}});const Q=e._export_sfc(J,[["__scopeId","data-v-2600a731"]]),X={key:0,id:"fresh-booking-gift-card-wrapper"},Z={id:"fresh-booking-gift-card-title"},ee={id:"fresh-booking-gift-card-content"},te={id:"fresh-booking-gift-card-payment"},ae=["innerHTML"],le={key:0},oe={key:0,id:"fresh-booking-select-place-type"},ne={class:e.normalizeClass(["fresh-booking-label","required"])},re={id:"fresh-booking-select-place-type-input"},ie=["innerHTML"],de={key:0,id:"fresh-booking-gift-card-order"},se={class:"fresh-booking-panel"},ue={key:1,id:"fresh-booking-gift-card-remarks"},ce={key:2,id:"fresh-booking-gift-card-order-minimal","sticky-side":"bottom"},fe={id:"fresh-booking-gift-card-recaptcha"},pe=e.defineComponent({name:"GiftCardLayout",__name:"GiftCard",props:{accessToken:{},layout:{default:"minimal"},placeType:{},styling:{}},setup(y){const{t:l}=e.useI18n(),{name:o,email:t,phone:p,value:g,remark:s,showValue:f,quantity:C,media:w,placeId:v,placeType:u,showFormPage:k,showPaymentPage:n,showConfirmationPage:i,places:d,hasFilledForm:B,hasForcedPlaceType:N,isWaitingForResponse:m,isMetaDataAvailable:h}=e.storeToRefs(U()),{initialize:R,orderGiftCard:b}=U(),{isRecaptchaEnabled:E,currency:q}=e.storeToRefs(e.useUtilityStore());async function T(){await b()}return e.watch(u,()=>{v.value=void 0}),e.onMounted(()=>{R()}),(S,r)=>{const c=e.resolveDirective("sticky");return e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main$1,{id:"fresh-booking-gift-card-module",type:"gift-card","access-token":S.accessToken,"data-layout":S.layout,styling:S.styling,"sticky-container":""},{default:e.withCtx(()=>[e.unref(h)?(e.openBlock(),e.createElementBlock("div",X,[e.createBaseVNode("h4",Z,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.title")),1)]),e.createBaseVNode("div",ee,[e.withDirectives(e.createBaseVNode("div",te,[e.createVNode(V.CheckoutWindow)],512),[[e.vShow,e.unref(n)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("p",{id:"fresh-booking-gift-card-description",innerHTML:e.unref(l)("giftCard.description")},null,8,ae),e.createBaseVNode("form",null,[e.createVNode(z.TextField,{modelValue:e.unref(o),"onUpdate:modelValue":r[0]||(r[0]=a=>e.isRef(o)?o.value=a: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(z.TextField,{modelValue:e.unref(t),"onUpdate:modelValue":r[1]||(r[1]=a=>e.isRef(t)?t.value=a: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(V.PhoneField,{modelValue:e.unref(p),"onUpdate:modelValue":r[2]||(r[2]=a=>e.isRef(p)?p.value=a:null),icon:"phone-office",label:e.unref(l)("giftCard.phone"),placeholder:e.unref(l)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.unref(N)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",le,[e.unref(d)?(e.openBlock(),e.createElementBlock("div",oe,[e.createBaseVNode("label",ne,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.selectType")),1)]),e.createBaseVNode("div",re,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(a,_)=>(e.openBlock(),e.createElementBlock("li",{key:_},[e.createVNode(V.Checkbox,{modelValue:e.unref(u),"onUpdate:modelValue":r[3]||(r[3]=P=>e.isRef(u)?u.value=P:null),type:"radio",name:"placeType",val:_,label:a.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(d)[e.unref(u)]&&e.unref(d)[e.unref(u)].data.length>1?(e.openBlock(),e.createBlock(e._sfc_main,{key:0,modelValue:e.unref(v),"onUpdate:modelValue":r[4]||(r[4]=a=>e.isRef(v)?v.value=a:null),placeholder:e.unref(l)("giftCard.selectPlacePlaceholder"),options:e.unref(d)[e.unref(u)].data,labelKey:"name",valueKey:"id",required:""},null,8,["modelValue","placeholder","options"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))])),e.createVNode(z.TextField,{modelValue:e.unref(g),"onUpdate:modelValue":r[5]||(r[5]=a=>e.isRef(g)?g.value=a:null),type:"number",name:"value",label:e.unref(l)("giftCard.value"),icon:"money-bill",placeholder:e.unref(l)("giftCard.valuePlaceholder"),suffix:e.unref(q),required:""},null,8,["modelValue","label","placeholder","suffix"]),e.createVNode(V.Checkbox,{modelValue:e.unref(f),"onUpdate:modelValue":r[6]||(r[6]=a=>e.isRef(f)?f.value=a:null),type:"checkbox",name:"showValue",label:e.unref(l)("giftCard.showValue"),checked:e.unref(f)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createCommentVNode("",!0)])],512),[[e.vShow,e.unref(k)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("div",{innerHTML:e.unref(l)("giftCard.thankYou")},null,8,ie)],512),[[e.vShow,e.unref(i)]])]),S.layout!=="minimal"&&e.unref(k)?(e.openBlock(),e.createElementBlock("div",de,[e.createBaseVNode("div",se,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(B),"is-loading":e.unref(m),"onUpdate:isLoading":r[9]||(r[9]=a=>e.isRef(m)?m.value=a:null),onClickEvent:T},null,8,["label","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(z.TextField,{modelValue:e.unref(s),"onUpdate:modelValue":r[10]||(r[10]=a=>e.isRef(s)?s.value=a: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(k)?e.withDirectives((e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(B),"data-test":"orderGiftCard","is-loading":e.unref(m),"onUpdate:isLoading":r[11]||(r[11]=a=>e.isRef(m)?m.value=a:null),onClickEvent:T},null,8,["label","disabled","is-loading"]),e.withDirectives(e.createBaseVNode("div",fe,[e.createVNode(V._sfc_main)],512),[[e.vShow,e.unref(E)]])])),[[c]]):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","data-layout","styling"])]),fallback:e.withCtx(()=>[e.createVNode(Q)]),_:1})}}});const me=e._export_sfc(pe,[["__scopeId","data-v-e4aa1e4c"]]),_e=e.createPinia(),ve=e.zo(),F=e.createApp({components:{GiftCard:me}});F.use(_e);F.use(e.instance);F.use(ve);F.use(V.StickyPlugin);F.use(V.install,{bootstrap:!1});F.mount("#konnectio-gift-card-app");
package/dist/gift-card.js CHANGED
@@ -1,12 +1,12 @@
1
- import { d as ue, u as ne, s as Q, a as ie, r as b, a8 as w, b as J, c as F, i as Z, S as Y, e as ce, f as pe, a9 as me, h as X, y as se, k as d, l as L, w as j, x as r, q as g, m as s, n as e, C as x, t as k, v as re, I as fe, _ as de, $ as ve, o as ge, aa as he, z as ee, ab as I, ac as W, A as V, a0 as ye, a1 as _e, a2 as ae, H as be, J as ke, N as Ce, a6 as Ve, M as Fe, P as Pe } from "./SelectField.vue_vue_type_style_index_0_lang-e2f4edc3.js";
2
- import { a as Se, P as we, C as le, _ as ze, S as Te, i as $e } from "./index-b5d8f4fc.js";
3
- import { u as Ue, E as qe } from "./_-8772cf9a.js";
4
- import { T as H, _ as Re } from "./TextField-cd93b966.js";
5
- import { F as M } from "./Field-ff599d13.js";
1
+ import { d as ue, u as ne, s as Y, a as ie, r as b, aa as w, b as J, c as F, i as Z, S as Q, e as ce, f as pe, ab as me, h as X, z as se, k as d, l as M, w as H, x as r, q as g, m as s, n as e, C as x, t as k, v as re, I as fe, _ as de, a0 as ve, o as ge, ac as he, A as ee, ad as I, ae as W, B as V, a1 as ye, a2 as _e, y as be, a3 as ae, J as ke, K as Ce, P as Ve, a7 as Fe, N as Pe, Q as Se } from "./SelectField.vue_vue_type_style_index_0_lang-96b84c98.js";
2
+ import { a as we, P as ze, C as le, _ as Te, S as $e, i as Ue } from "./index-cadcbd9e.js";
3
+ import { u as qe, E as Re } from "./_-cd5be070.js";
4
+ import { T as j } from "./TextField-7150eae7.js";
5
+ import { F as L } from "./Field-48a50c44.js";
6
6
  import "./_commonjsHelpers-c5d32002.js";
7
7
  const te = ue("giftCard", () => {
8
8
  ne();
9
- const { pay: z } = Ue(), { bearerToken: t, metaData: o } = Q(ie()), a = b(w.InitialState), h = J("freshBookingName", "", void 0, { serializer: Y.string }), P = J("freshBookingEmail", "", void 0, { serializer: Y.string }), p = J("freshBookingPhone", "", void 0, { serializer: Y.string }), v = b(""), U = b(1), G = b(!0), C = b(""), m = b({
9
+ const { pay: z } = qe(), { bearerToken: t, metaData: o } = Y(ie()), a = b(w.InitialState), h = J("freshBookingName", "", void 0, { serializer: Q.string }), P = J("freshBookingEmail", "", void 0, { serializer: Q.string }), p = J("freshBookingPhone", "", void 0, { serializer: Q.string }), v = b(""), U = b(1), G = b(!0), C = b(""), m = b({
10
10
  base64: "",
11
11
  type: "",
12
12
  name: ""
@@ -37,7 +37,7 @@ const te = ue("giftCard", () => {
37
37
  });
38
38
  }
39
39
  return f;
40
- }), O = F(() => !(!h.value || !P.value || !(p.value.length >= 5) || !v.value || $.value === void 0)), K = F(() => !(a.value === w.InitialState && u.value)), A = F(() => !!(a.value === w.WaitingForResponse && u.value));
40
+ }), K = F(() => !(!h.value || !P.value || !(p.value.length >= 5) || !v.value || $.value === void 0)), O = F(() => !(a.value === w.InitialState && u.value)), A = F(() => !!(a.value === w.WaitingForResponse && u.value));
41
41
  async function E() {
42
42
  a.value = w.WaitingForResponse, u.value = !0, await ce.post("https://stage.hotel-service.konnectio.dk/api/gift-card/create", {
43
43
  termsOfserviceURL: "https://freshbooking.dk",
@@ -60,7 +60,7 @@ const te = ue("giftCard", () => {
60
60
  headers: {
61
61
  Authorization: t.value,
62
62
  Accept: "application/json",
63
- "Fresh-Booking-Ver": "4.0.12"
63
+ "Fresh-Booking-Ver": "4.0.14"
64
64
  }
65
65
  }).then((f) => {
66
66
  a.value = w.ReadyToPay, u.value = !1, z({
@@ -88,14 +88,14 @@ const te = ue("giftCard", () => {
88
88
  showPaymentPage: R,
89
89
  showConfirmationPage: y,
90
90
  places: T,
91
- hasFilledForm: O,
91
+ hasFilledForm: K,
92
92
  hasForcedPlaceType: D,
93
93
  isWaitingForResponse: A,
94
- isMetaDataAvailable: K,
94
+ isMetaDataAvailable: O,
95
95
  orderGiftCard: E,
96
96
  initialize: i
97
97
  };
98
- }), Ee = { class: "media-selector" }, Be = ["accept"], Ge = { class: "media-selector-wrapper" }, Ie = { class: "media-selector-tools" }, Me = { key: 0 }, Le = { key: 1 }, xe = { key: 2 }, De = ["src"], Ae = /* @__PURE__ */ X({
98
+ }), Ee = { class: "media-selector" }, Be = ["accept"], Ge = { class: "media-selector-wrapper" }, Ie = { class: "media-selector-tools" }, Le = { key: 0 }, Me = { key: 1 }, xe = { key: 2 }, De = ["src"], Ae = /* @__PURE__ */ X({
99
99
  __name: "MediaSelector",
100
100
  props: {
101
101
  modelValue: {},
@@ -137,12 +137,12 @@ const te = ue("giftCard", () => {
137
137
  let n;
138
138
  (n = p.value.files) instanceof FileList && m(n[0], U);
139
139
  }
140
- return (n, u) => (d(), L(fe, {
140
+ return (n, u) => (d(), M(fe, {
141
141
  label: n.label,
142
142
  required: n.required,
143
143
  type: "media"
144
144
  }, {
145
- default: j(() => [
145
+ default: H(() => [
146
146
  r("div", Ee, [
147
147
  r("input", {
148
148
  ref_key: "fileInput",
@@ -155,7 +155,7 @@ const te = ue("giftCard", () => {
155
155
  }, null, 40, Be),
156
156
  r("div", Ge, [
157
157
  r("ul", Ie, [
158
- v.value ? k("", !0) : (d(), g("li", Me, [
158
+ v.value ? k("", !0) : (d(), g("li", Le, [
159
159
  s(x, {
160
160
  label: e(h)("uploadFile"),
161
161
  type: "button",
@@ -164,7 +164,7 @@ const te = ue("giftCard", () => {
164
164
  onClickEvent: u[1] || (u[1] = (c) => C())
165
165
  }, null, 8, ["label", "icon-color"])
166
166
  ])),
167
- v.value ? (d(), g("li", Le, [
167
+ v.value ? (d(), g("li", Me, [
168
168
  s(x, {
169
169
  label: e(h)("replaceFile"),
170
170
  type: "button",
@@ -246,25 +246,25 @@ function oe(z) {
246
246
  });
247
247
  }
248
248
  typeof oe == "function" && oe(Ae);
249
- const Ne = { class: "gift-card-skeleton" }, We = { class: "gift-card-skeleton-form" }, He = /* @__PURE__ */ X({
249
+ const Ne = { class: "gift-card-skeleton" }, We = { class: "gift-card-skeleton-form" }, je = /* @__PURE__ */ X({
250
250
  __name: "GiftCardSkeleton",
251
251
  setup(z) {
252
252
  return (t, o) => (d(), g("div", Ne, [
253
253
  r("div", We, [
254
- s(M),
255
- s(M),
256
- s(M),
257
- s(M),
258
- s(M, { "is-text-area": "" }),
259
- s(qe, { height: "44px" })
254
+ s(L),
255
+ s(L),
256
+ s(L),
257
+ s(L),
258
+ s(L, { "is-text-area": "" }),
259
+ s(Re, { height: "44px" })
260
260
  ])
261
261
  ]));
262
262
  }
263
263
  });
264
- const je = /* @__PURE__ */ de(He, [["__scopeId", "data-v-2600a731"]]), Oe = {
264
+ const He = /* @__PURE__ */ de(je, [["__scopeId", "data-v-2600a731"]]), Ke = {
265
265
  key: 0,
266
266
  id: "fresh-booking-gift-card-wrapper"
267
- }, Ke = { id: "fresh-booking-gift-card-title" }, Je = { id: "fresh-booking-gift-card-content" }, Ye = { id: "fresh-booking-gift-card-payment" }, Qe = ["innerHTML"], Xe = { key: 0 }, Ze = {
267
+ }, Oe = { id: "fresh-booking-gift-card-title" }, Je = { id: "fresh-booking-gift-card-content" }, Qe = { id: "fresh-booking-gift-card-payment" }, Ye = ["innerHTML"], Xe = { key: 0 }, Ze = {
268
268
  key: 0,
269
269
  id: "fresh-booking-select-place-type"
270
270
  }, ea = {
@@ -308,7 +308,7 @@ const je = /* @__PURE__ */ de(He, [["__scopeId", "data-v-2600a731"]]), Oe = {
308
308
  hasForcedPlaceType: R,
309
309
  isWaitingForResponse: y,
310
310
  isMetaDataAvailable: T
311
- } = Q(te()), { initialize: D, orderGiftCard: $ } = te(), { isRecaptchaEnabled: O, currency: K } = Q(ie());
311
+ } = Y(te()), { initialize: D, orderGiftCard: $ } = te(), { isRecaptchaEnabled: K, currency: O } = Y(ie());
312
312
  async function A() {
313
313
  await $();
314
314
  }
@@ -318,9 +318,9 @@ const je = /* @__PURE__ */ de(He, [["__scopeId", "data-v-2600a731"]]), Oe = {
318
318
  D();
319
319
  }), (E, i) => {
320
320
  const f = he("sticky");
321
- return d(), L(ke, null, {
322
- default: j(() => [
323
- s(be, {
321
+ return d(), M(Ce, null, {
322
+ default: H(() => [
323
+ s(ke, {
324
324
  id: "fresh-booking-gift-card-module",
325
325
  type: "gift-card",
326
326
  "access-token": E.accessToken,
@@ -328,14 +328,14 @@ const je = /* @__PURE__ */ de(He, [["__scopeId", "data-v-2600a731"]]), Oe = {
328
328
  styling: E.styling,
329
329
  "sticky-container": ""
330
330
  }, {
331
- default: j(() => [
332
- e(T) ? (d(), g("div", Oe, [
333
- r("h4", Ke, [
331
+ default: H(() => [
332
+ e(T) ? (d(), g("div", Ke, [
333
+ r("h4", Oe, [
334
334
  r("span", null, ee(e(t)("giftCard.title")), 1)
335
335
  ]),
336
336
  r("div", Je, [
337
- I(r("div", Ye, [
338
- s(Se)
337
+ I(r("div", Qe, [
338
+ s(we)
339
339
  ], 512), [
340
340
  [W, e(n)]
341
341
  ]),
@@ -343,9 +343,9 @@ const je = /* @__PURE__ */ de(He, [["__scopeId", "data-v-2600a731"]]), Oe = {
343
343
  r("p", {
344
344
  id: "fresh-booking-gift-card-description",
345
345
  innerHTML: e(t)("giftCard.description")
346
- }, null, 8, Qe),
346
+ }, null, 8, Ye),
347
347
  r("form", null, [
348
- s(H, {
348
+ s(j, {
349
349
  modelValue: e(o),
350
350
  "onUpdate:modelValue": i[0] || (i[0] = (l) => V(o) ? o.value = l : null),
351
351
  type: "text",
@@ -356,7 +356,7 @@ const je = /* @__PURE__ */ de(He, [["__scopeId", "data-v-2600a731"]]), Oe = {
356
356
  placeholder: e(t)("giftCard.namePlaceholder"),
357
357
  required: ""
358
358
  }, null, 8, ["modelValue", "label", "placeholder"]),
359
- s(H, {
359
+ s(j, {
360
360
  modelValue: e(a),
361
361
  "onUpdate:modelValue": i[1] || (i[1] = (l) => V(a) ? a.value = l : null),
362
362
  type: "email",
@@ -367,7 +367,7 @@ const je = /* @__PURE__ */ de(He, [["__scopeId", "data-v-2600a731"]]), Oe = {
367
367
  placeholder: e(t)("giftCard.emailPlaceholder"),
368
368
  required: ""
369
369
  }, null, 8, ["modelValue", "label", "placeholder"]),
370
- s(we, {
370
+ s(ze, {
371
371
  modelValue: e(h),
372
372
  "onUpdate:modelValue": i[2] || (i[2] = (l) => V(h) ? h.value = l : null),
373
373
  icon: "phone-office",
@@ -393,7 +393,7 @@ const je = /* @__PURE__ */ de(He, [["__scopeId", "data-v-2600a731"]]), Oe = {
393
393
  }, null, 8, ["modelValue", "val", "label"])
394
394
  ]))), 128))
395
395
  ]),
396
- e(c)[e(m)] && e(c)[e(m)].data.length > 1 ? (d(), L(Re, {
396
+ e(c)[e(m)] && e(c)[e(m)].data.length > 1 ? (d(), M(be, {
397
397
  key: 0,
398
398
  modelValue: e(C),
399
399
  "onUpdate:modelValue": i[4] || (i[4] = (l) => V(C) ? C.value = l : null),
@@ -404,9 +404,9 @@ const je = /* @__PURE__ */ de(He, [["__scopeId", "data-v-2600a731"]]), Oe = {
404
404
  required: ""
405
405
  }, null, 8, ["modelValue", "placeholder", "options"])) : k("", !0)
406
406
  ])
407
- ])) : (d(), L(ae, { key: 1 }))
407
+ ])) : (d(), M(ae, { key: 1 }))
408
408
  ])),
409
- s(H, {
409
+ s(j, {
410
410
  modelValue: e(P),
411
411
  "onUpdate:modelValue": i[5] || (i[5] = (l) => V(P) ? P.value = l : null),
412
412
  type: "number",
@@ -414,7 +414,7 @@ const je = /* @__PURE__ */ de(He, [["__scopeId", "data-v-2600a731"]]), Oe = {
414
414
  label: e(t)("giftCard.value"),
415
415
  icon: "money-bill",
416
416
  placeholder: e(t)("giftCard.valuePlaceholder"),
417
- suffix: e(K),
417
+ suffix: e(O),
418
418
  required: ""
419
419
  }, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
420
420
  s(le, {
@@ -452,7 +452,7 @@ const je = /* @__PURE__ */ de(He, [["__scopeId", "data-v-2600a731"]]), Oe = {
452
452
  ])
453
453
  ])) : k("", !0),
454
454
  e(S) ? (d(), g("div", na, [
455
- s(H, {
455
+ s(j, {
456
456
  modelValue: e(p),
457
457
  "onUpdate:modelValue": i[10] || (i[10] = (l) => V(p) ? p.value = l : null),
458
458
  type: "textarea",
@@ -473,30 +473,30 @@ const je = /* @__PURE__ */ de(He, [["__scopeId", "data-v-2600a731"]]), Oe = {
473
473
  onClickEvent: A
474
474
  }, null, 8, ["label", "disabled", "is-loading"]),
475
475
  I(r("div", sa, [
476
- s(ze)
476
+ s(Te)
477
477
  ], 512), [
478
- [W, e(O)]
478
+ [W, e(K)]
479
479
  ])
480
480
  ])), [
481
481
  [f]
482
482
  ]) : k("", !0)
483
- ])) : (d(), L(ae, { key: 1 }))
483
+ ])) : (d(), M(ae, { key: 1 }))
484
484
  ]),
485
485
  _: 1
486
486
  }, 8, ["access-token", "data-layout", "styling"])
487
487
  ]),
488
- fallback: j(() => [
489
- s(je)
488
+ fallback: H(() => [
489
+ s(He)
490
490
  ]),
491
491
  _: 1
492
492
  });
493
493
  };
494
494
  }
495
495
  });
496
- const da = /* @__PURE__ */ de(ra, [["__scopeId", "data-v-e4aa1e4c"]]), ua = Ce(), ca = Ve(), B = Fe({ components: { GiftCard: da } });
496
+ const da = /* @__PURE__ */ de(ra, [["__scopeId", "data-v-e4aa1e4c"]]), ua = Ve(), ca = Fe(), B = Pe({ components: { GiftCard: da } });
497
497
  B.use(ua);
498
- B.use(Pe);
498
+ B.use(Se);
499
499
  B.use(ca);
500
- B.use(Te);
501
- B.use($e, { bootstrap: !1 });
500
+ B.use($e);
501
+ B.use(Ue, { bootstrap: !1 });
502
502
  B.mount("#konnectio-gift-card-app");
Binary file