@konnectio/core 4.0.5 → 4.0.7

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 (197) hide show
  1. package/dist/{ActionField-0c047379.mjs → ActionField-5ecfc9dc.js} +26 -28
  2. package/dist/ActionField-5ecfc9dc.js.br +0 -0
  3. package/dist/ActionField-ae9b1adf.cjs +1 -0
  4. package/dist/HotelAvailabilityForm-0cd1abda.cjs +1 -0
  5. package/dist/{HotelAvailabilityForm-29f12395.mjs → HotelAvailabilityForm-a7b6f17e.js} +23 -25
  6. package/dist/HotelAvailabilityForm-a7b6f17e.js.br +0 -0
  7. package/dist/NumberField.vue_vue_type_style_index_0_lang-0b6d48f1.cjs +793 -0
  8. package/dist/NumberField.vue_vue_type_style_index_0_lang-ab747739.js +16403 -0
  9. package/dist/NumberField.vue_vue_type_style_index_0_lang-ab747739.js.br +0 -0
  10. package/dist/{ReCaptchaVuePlugin-616ef9b9.mjs → ReCaptchaVuePlugin-05b8ec39.js} +2 -3
  11. package/dist/ReCaptchaVuePlugin-05b8ec39.js.br +0 -0
  12. package/dist/ReCaptchaVuePlugin-08ee5d62.cjs +1 -0
  13. package/dist/{SelectField.vue_vue_type_style_index_0_lang-a45312d1.mjs → SelectField.vue_vue_type_style_index_0_lang-5bdd7db9.js} +1020 -1022
  14. package/dist/SelectField.vue_vue_type_style_index_0_lang-5bdd7db9.js.br +0 -0
  15. package/dist/{SelectField.vue_vue_type_style_index_0_lang-18843626.js → SelectField.vue_vue_type_style_index_0_lang-5f1087dc.cjs} +16 -17
  16. package/dist/{ThankYou-f6205791.mjs → ThankYou-1866d8db.js} +2853 -2825
  17. package/dist/ThankYou-1866d8db.js.br +0 -0
  18. package/dist/ThankYou-5741bcb6.cjs +15 -0
  19. package/dist/{_commonjsHelpers-6763f629.js → _commonjsHelpers-6763f629.cjs} +0 -1
  20. package/dist/{_commonjsHelpers-c5d32002.mjs → _commonjsHelpers-aeeeeb92.js} +2 -3
  21. package/dist/{applyGiftCard-02342491.mjs → applyGiftCard-c5e4aaad.js} +12 -14
  22. package/dist/applyGiftCard-c5e4aaad.js.br +0 -0
  23. package/dist/applyGiftCard-d9ab3dcf.cjs +1 -0
  24. package/dist/assets/typescript/mixins.d.ts +36 -0
  25. package/dist/availability.cjs.js +1 -2
  26. package/dist/availability.cjs.js.br +0 -0
  27. package/dist/availability.d.ts +3 -0
  28. package/dist/availability.es.js +31 -30
  29. package/dist/availability.es.js.br +0 -0
  30. package/dist/components/Alert.vue.d.ts +5 -0
  31. package/dist/components/Alert.vue.d.ts.map +1 -0
  32. package/dist/components/Clickable.vue.d.ts +5 -0
  33. package/dist/components/Clickable.vue.d.ts.map +1 -0
  34. package/dist/components/GoogleNotice.vue.d.ts +4 -0
  35. package/dist/components/GoogleNotice.vue.d.ts.map +1 -0
  36. package/dist/components/Icon.vue.d.ts +5 -0
  37. package/dist/components/Icon.vue.d.ts.map +1 -0
  38. package/dist/components/Loading.vue.d.ts +5 -0
  39. package/dist/components/Loading.vue.d.ts.map +1 -0
  40. package/dist/components/LoadingBlock.vue.d.ts +4 -0
  41. package/dist/components/LoadingBlock.vue.d.ts.map +1 -0
  42. package/dist/components/forms/EventAvailabilityForm.vue.d.ts +5 -0
  43. package/dist/components/forms/EventAvailabilityForm.vue.d.ts.map +1 -0
  44. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +5 -0
  45. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts.map +1 -0
  46. package/dist/components/forms/MultiStepForm.vue.d.ts +5 -0
  47. package/dist/components/forms/MultiStepForm.vue.d.ts.map +1 -0
  48. package/dist/components/forms/ReservationForm.vue.d.ts +5 -0
  49. package/dist/components/forms/ReservationForm.vue.d.ts.map +1 -0
  50. package/dist/components/inputs/Checkbox.vue.d.ts +5 -0
  51. package/dist/components/inputs/Checkbox.vue.d.ts.map +1 -0
  52. package/dist/components/inputs/DateField.vue.d.ts +5 -0
  53. package/dist/components/inputs/DateField.vue.d.ts.map +1 -0
  54. package/dist/components/inputs/InputField.vue.d.ts +5 -0
  55. package/dist/components/inputs/InputField.vue.d.ts.map +1 -0
  56. package/dist/components/inputs/MediaSelector.vue.d.ts +5 -0
  57. package/dist/components/inputs/MediaSelector.vue.d.ts.map +1 -0
  58. package/dist/components/inputs/NumberField.vue.d.ts +5 -0
  59. package/dist/components/inputs/NumberField.vue.d.ts.map +1 -0
  60. package/dist/components/inputs/SelectField.vue.d.ts +5 -0
  61. package/dist/components/inputs/SelectField.vue.d.ts.map +1 -0
  62. package/dist/components/inputs/TextField.vue.d.ts +5 -0
  63. package/dist/components/inputs/TextField.vue.d.ts.map +1 -0
  64. package/dist/components/inputs/TimeField.vue.d.ts +5 -0
  65. package/dist/components/inputs/TimeField.vue.d.ts.map +1 -0
  66. package/dist/components/inputs/grouped/ActionField.vue.d.ts +5 -0
  67. package/dist/components/inputs/grouped/ActionField.vue.d.ts.map +1 -0
  68. package/dist/components/inputs/grouped/CountryField.vue.d.ts +5 -0
  69. package/dist/components/inputs/grouped/CountryField.vue.d.ts.map +1 -0
  70. package/dist/components/inputs/grouped/NameField.vue.d.ts +5 -0
  71. package/dist/components/inputs/grouped/NameField.vue.d.ts.map +1 -0
  72. package/dist/components/inputs/grouped/PhoneField.vue.d.ts +5 -0
  73. package/dist/components/inputs/grouped/PhoneField.vue.d.ts.map +1 -0
  74. package/dist/components/inputs/grouped/RoomConfigField.vue.d.ts +4 -0
  75. package/dist/components/inputs/grouped/RoomConfigField.vue.d.ts.map +1 -0
  76. package/dist/components/listings/Base.vue.d.ts +6 -0
  77. package/dist/components/listings/Base.vue.d.ts.map +1 -0
  78. package/dist/components/listings/Event.vue.d.ts +5 -0
  79. package/dist/components/listings/Event.vue.d.ts.map +1 -0
  80. package/dist/components/listings/Test.vue.d.ts +5 -0
  81. package/dist/components/listings/Test.vue.d.ts.map +1 -0
  82. package/dist/components/modals/Base.vue.d.ts +5 -0
  83. package/dist/components/modals/Base.vue.d.ts.map +1 -0
  84. package/dist/components/modals/Info.vue.d.ts +5 -0
  85. package/dist/components/modals/Info.vue.d.ts.map +1 -0
  86. package/dist/components/modals/Terms.vue.d.ts +4 -0
  87. package/dist/components/modals/Terms.vue.d.ts.map +1 -0
  88. package/dist/components/side-panels/Base.vue.d.ts +5 -0
  89. package/dist/components/side-panels/Base.vue.d.ts.map +1 -0
  90. package/dist/components/side-panels/Hotel.vue.d.ts +4 -0
  91. package/dist/components/side-panels/Hotel.vue.d.ts.map +1 -0
  92. package/dist/components/views/CheckoutWindow.vue.d.ts +5 -0
  93. package/dist/components/views/CheckoutWindow.vue.d.ts.map +1 -0
  94. package/dist/components/views/TermsOfService.vue.d.ts +5 -0
  95. package/dist/components/views/TermsOfService.vue.d.ts.map +1 -0
  96. package/dist/components/views/ThankYou.vue.d.ts +5 -0
  97. package/dist/components/views/ThankYou.vue.d.ts.map +1 -0
  98. package/dist/entries/availability.d.ts +2 -0
  99. package/dist/entries/event.d.ts +2 -0
  100. package/dist/entries/gift-card-validation.d.ts +2 -0
  101. package/dist/entries/gift-card.d.ts +2 -0
  102. package/dist/entries/hotel.d.ts +2 -0
  103. package/dist/entries/navigation.d.ts +1 -0
  104. package/dist/entries/polyfill.d.ts +0 -0
  105. package/dist/event-39706438.cjs +1 -0
  106. package/dist/{event-cc266121.mjs → event-a70cffeb.js} +48 -47
  107. package/dist/event-a70cffeb.js.br +0 -0
  108. package/dist/event.cjs.js +1 -2
  109. package/dist/event.cjs.js.br +0 -0
  110. package/dist/event.d.ts +3 -0
  111. package/dist/event.es.js +175 -174
  112. package/dist/event.es.js.br +0 -0
  113. package/dist/gift-card-validation.cjs.js +1 -2
  114. package/dist/gift-card-validation.cjs.js.br +0 -0
  115. package/dist/gift-card-validation.d.ts +3 -0
  116. package/dist/gift-card-validation.es.js +54 -53
  117. package/dist/gift-card-validation.es.js.br +0 -0
  118. package/dist/gift-card.cjs.js +1 -2
  119. package/dist/gift-card.cjs.js.br +0 -0
  120. package/dist/gift-card.d.ts +3 -0
  121. package/dist/gift-card.es.js +90 -89
  122. package/dist/gift-card.es.js.br +0 -0
  123. package/dist/hotel.cjs.js +5 -6
  124. package/dist/hotel.cjs.js.br +0 -0
  125. package/dist/hotel.d.ts +3 -0
  126. package/dist/hotel.es.js +298 -298
  127. package/dist/hotel.es.js.br +0 -0
  128. package/dist/{index-30f70976.mjs → index-00262c16.js} +64 -69
  129. package/dist/index-00262c16.js.br +0 -0
  130. package/dist/index-58f3b0cc.cjs +1 -0
  131. package/dist/layouts/Availability.vue.d.ts +244 -0
  132. package/dist/layouts/Event.vue.d.ts +244 -0
  133. package/dist/layouts/GiftCard.vue.d.ts +252 -0
  134. package/dist/layouts/GiftCardValidation.vue.d.ts +228 -0
  135. package/dist/layouts/Hotel.vue.d.ts +277 -0
  136. package/dist/layouts/_.vue.d.ts +30 -0
  137. package/dist/navigation.cjs.js +1 -2
  138. package/dist/navigation.d.ts +1 -0
  139. package/dist/navigation.es.js +1 -59
  140. package/dist/{payment-b3022c46.mjs → payment-9e219e9b.js} +221 -223
  141. package/dist/payment-9e219e9b.js.br +0 -0
  142. package/dist/{payment-bfd660a7.js → payment-fbffaa6d.cjs} +2 -3
  143. package/dist/plugins/i18n.d.ts +5 -0
  144. package/dist/polyfill.cjs.js +2 -3
  145. package/dist/polyfill.cjs.js.br +0 -0
  146. package/dist/polyfill.d.ts +1 -0
  147. package/dist/polyfill.es.js +2 -4
  148. package/dist/polyfill.es.js.br +0 -0
  149. package/dist/store/alert.d.ts +28 -0
  150. package/dist/store/applyGiftCard.d.ts +28 -0
  151. package/dist/store/availability.d.ts +37 -0
  152. package/dist/store/event.d.ts +683 -0
  153. package/dist/store/giftCard.d.ts +80 -0
  154. package/dist/store/hotel.d.ts +662 -0
  155. package/dist/store/payment.d.ts +133 -0
  156. package/dist/store/recaptcha.d.ts +1 -0
  157. package/dist/store/tracking.d.ts +24 -0
  158. package/dist/store/utilities.d.ts +317 -0
  159. package/dist/style.css +1 -1
  160. package/dist/style.css.br +0 -0
  161. package/dist/types/index.d.ts +868 -0
  162. package/package.json +27 -11
  163. package/dist/ActionField-0c047379.mjs.br +0 -0
  164. package/dist/ActionField-3640689b.js +0 -2
  165. package/dist/ActionField-3640689b.js.br +0 -0
  166. package/dist/Clickable-386eceb6.mjs +0 -12390
  167. package/dist/Clickable-386eceb6.mjs.br +0 -0
  168. package/dist/Clickable-77afc133.js +0 -768
  169. package/dist/Clickable-77afc133.js.br +0 -0
  170. package/dist/HotelAvailabilityForm-29f12395.mjs.br +0 -0
  171. package/dist/HotelAvailabilityForm-89ba629d.js +0 -2
  172. package/dist/HotelAvailabilityForm-89ba629d.js.br +0 -0
  173. package/dist/NumberField.vue_vue_type_style_index_0_lang-99de44b7.mjs +0 -4027
  174. package/dist/NumberField.vue_vue_type_style_index_0_lang-99de44b7.mjs.br +0 -0
  175. package/dist/NumberField.vue_vue_type_style_index_0_lang-e8efabad.js +0 -28
  176. package/dist/NumberField.vue_vue_type_style_index_0_lang-e8efabad.js.br +0 -0
  177. package/dist/ReCaptchaVuePlugin-0988d77f.js +0 -2
  178. package/dist/ReCaptchaVuePlugin-0988d77f.js.br +0 -0
  179. package/dist/ReCaptchaVuePlugin-616ef9b9.mjs.br +0 -0
  180. package/dist/SelectField.vue_vue_type_style_index_0_lang-18843626.js.br +0 -0
  181. package/dist/SelectField.vue_vue_type_style_index_0_lang-a45312d1.mjs.br +0 -0
  182. package/dist/ThankYou-1096ca5a.js +0 -16
  183. package/dist/ThankYou-1096ca5a.js.br +0 -0
  184. package/dist/ThankYou-f6205791.mjs.br +0 -0
  185. package/dist/applyGiftCard-02342491.mjs.br +0 -0
  186. package/dist/applyGiftCard-e24bae0c.js +0 -2
  187. package/dist/applyGiftCard-e24bae0c.js.br +0 -0
  188. package/dist/event-cc266121.mjs.br +0 -0
  189. package/dist/event-d580e6e8.js +0 -2
  190. package/dist/event-d580e6e8.js.br +0 -0
  191. package/dist/index-30f70976.mjs.br +0 -0
  192. package/dist/index-4e9533a9.js +0 -2
  193. package/dist/index-4e9533a9.js.br +0 -0
  194. package/dist/navigation.cjs.js.br +0 -0
  195. package/dist/navigation.es.js.br +0 -0
  196. package/dist/payment-b3022c46.mjs.br +0 -0
  197. package/dist/payment-bfd660a7.js.br +0 -0
Binary file
@@ -1,2 +1 @@
1
- "use strict";const e=require("./Clickable-77afc133.js"),t=require("./NumberField.vue_vue_type_style_index_0_lang-e8efabad.js"),p=require("./applyGiftCard-e24bae0c.js"),y=require("./ActionField-3640689b.js");require("./SelectField.vue_vue_type_style_index_0_lang-18843626.js");require("./_commonjsHelpers-6763f629.js");const h=r=>(e.pushScopeId("data-v-64c7a8a4"),r=r(),e.popScopeId(),r),m=["innerHTML"],N={key:0,id:"fresh-booking-gift-card-validation-resume",class:"fresh-booking-panel"},F=h(()=>e.createBaseVNode("span",null,"Loading...",-1)),k=e.defineComponent({__name:"GiftCardValidation",props:{accessToken:{},accentColor:{},buttonBackground:{},buttonBorder:{},buttonBorderRadius:{},buttonColor:{},buttonFontFamily:{},buttonFontSize:{},buttonTextTransform:{},buttonFontWeight:{},fontColor:{},fontFamily:{},fontSize:{},fontWeight:{},grayColor:{},headerColor:{},headerFontSize:{},inputBackground:{},inputBorder:{},inputBorderRadius:{},inputFontColor:{},labelFontWeight:{},labelPadding:{},loadingColor:{},panelBackground:{},panelBorder:{},panelBorderRadius:{},panelPadding:{}},setup(r){const o=r,{t:a}=t.useI18n(),{voucher:u,isValid:f,amount:g,expirationDate:B,productName:b,isLoading:l}=t.storeToRefs(p.useApplyGiftCardStore()),{currency:C}=t.storeToRefs(t.useUtilityStore()),{apply:c}=p.useApplyGiftCardStore(),V={"--accentColor":o.accentColor,"--buttonBackground":o.buttonBackground,"--buttonBorder":o.buttonBorder,"--buttonBorderRadius":o.buttonBorderRadius,"--buttonColor":o.buttonColor,"--buttonFontFamily":o.buttonFontFamily,"--buttonFontSize":o.buttonFontSize,"--buttonTextTransform":o.buttonTextTransform,"--buttonFontWeight":o.buttonFontWeight,"--fontColor":o.fontColor,"--fontFamily":o.fontFamily,"--fontSize":o.fontSize,"--fontWeight":o.fontWeight,"--grayColor":o.grayColor,"--headerColor":o.headerColor,"--headerFontSize":o.headerFontSize,"--inputBackground":o.inputBackground,"--inputBorder":o.inputBorder,"--inputBorderRadius":o.inputBorderRadius,"--inputFontColor":o.inputFontColor,"--labelFontWeight":o.labelFontWeight,"--labelPadding":o.labelPadding,"--loadingColor":o.loadingColor,"--panelBackground":o.panelBackground,"--panelBorder":o.panelBorder,"--panelBorderRadius":o.panelBorderRadius,"--panelPadding":o.panelPadding};return(d,n)=>(e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(t._sfc_main,{id:"fresh-booking-gift-card-validation-module",class:"fresh-booking-app","access-token":d.accessToken,type:"gift-card",style:V},{default:e.withCtx(()=>[e.createBaseVNode("form",{onSubmit:n[3]||(n[3]=e.withModifiers(i=>e.unref(c)(),["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,m),e.createVNode(y.ActionField,{modelValue:e.unref(u),"onUpdate:modelValue":n[0]||(n[0]=i=>e.isRef(u)?u.value=i:null),icon:"gift-card",label:e.unref(a)("booking.reservation.giftCardCode"),buttonLabel:e.unref(a)("giftCardValidation.submitButton"),placeholder:"XXXXXXXX","is-loading":e.unref(l),"onUpdate:isLoading":n[1]||(n[1]=i=>e.isRef(l)?l.value=i:null),onAction:n[2]||(n[2]=i=>e.unref(c)())},null,8,["modelValue","label","buttonLabel","is-loading"]),!e.unref(l)&&e.unref(f)?(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","icon-color":d.headerColor},null,8,["icon-color"])]),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","icon-color":d.headerColor},null,8,["icon-color"])]),e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCardValidation.expirationDate")),1),e.createVNode(e.Icon,{icon:"timer",type:"fas","icon-color":d.headerColor},null,8,["icon-color"])])])]),e.createBaseVNode("tbody",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(b)),1)]),e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t.showPrice)(e.unref(g),e.unref(C))),1)]),e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t.showDate)(e.unref(B))),1)])])])])):e.createCommentVNode("",!0)],32)]),_:1},8,["access-token"])]),fallback:e.withCtx(()=>[F]),_:1}))}});const _=e._export_sfc(k,[["__scopeId","data-v-64c7a8a4"]]),s=e.createApp({components:{GiftCardValidation:_}}),S=t.createPinia();s.use(S);s.use(t.instance);s.mount("#fresh-booking-gift-card-validation-app");
2
- //# sourceMappingURL=gift-card-validation.cjs.js.map
1
+ "use strict";const e=require("./NumberField.vue_vue_type_style_index_0_lang-0b6d48f1.cjs"),c=require("./applyGiftCard-d9ab3dcf.cjs"),V=require("./ActionField-ae9b1adf.cjs");require("./SelectField.vue_vue_type_style_index_0_lang-5f1087dc.cjs");require("./_commonjsHelpers-6763f629.cjs");const y=a=>(e.pushScopeId("data-v-72b6e39c"),a=a(),e.popScopeId(),a),h=["innerHTML"],m={key:0,id:"fresh-booking-gift-card-validation-resume",class:"fresh-booking-panel"},N=y(()=>e.createBaseVNode("span",null,"Loading...",-1)),F=e.defineComponent({__name:"GiftCardValidation",props:{accessToken:{},accentColor:{},buttonBackground:{},buttonBorder:{},buttonBorderRadius:{},buttonColor:{},buttonFontFamily:{},buttonFontSize:{},buttonTextTransform:{},buttonFontWeight:{},fontColor:{},fontFamily:{},fontSize:{},fontWeight:{},grayColor:{},headerColor:{},headerFontSize:{},inputBackground:{},inputBorder:{},inputBorderRadius:{},inputFontColor:{},labelFontWeight:{},labelPadding:{},loadingColor:{},panelBackground:{},panelBorder:{},panelBorderRadius:{},panelPadding:{}},setup(a){const o=a,{t:n}=e.useI18n(),{voucher:u,isValid:p,amount:f,expirationDate:g,productName:b,isLoading:i}=e.storeToRefs(c.useApplyGiftCardStore()),{currency:B}=e.storeToRefs(e.useUtilityStore()),{apply:s}=c.useApplyGiftCardStore(),C={"--accentColor":o.accentColor,"--buttonBackground":o.buttonBackground,"--buttonBorder":o.buttonBorder,"--buttonBorderRadius":o.buttonBorderRadius,"--buttonColor":o.buttonColor,"--buttonFontFamily":o.buttonFontFamily,"--buttonFontSize":o.buttonFontSize,"--buttonTextTransform":o.buttonTextTransform,"--buttonFontWeight":o.buttonFontWeight,"--fontColor":o.fontColor,"--fontFamily":o.fontFamily,"--fontSize":o.fontSize,"--fontWeight":o.fontWeight,"--grayColor":o.grayColor,"--headerColor":o.headerColor,"--headerFontSize":o.headerFontSize,"--inputBackground":o.inputBackground,"--inputBorder":o.inputBorder,"--inputBorderRadius":o.inputBorderRadius,"--inputFontColor":o.inputFontColor,"--labelFontWeight":o.labelFontWeight,"--labelPadding":o.labelPadding,"--loadingColor":o.loadingColor,"--panelBackground":o.panelBackground,"--panelBorder":o.panelBorder,"--panelBorderRadius":o.panelBorderRadius,"--panelPadding":o.panelPadding};return(l,t)=>(e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main,{id:"fresh-booking-gift-card-validation-module",class:"fresh-booking-app","access-token":l.accessToken,type:"gift-card",style:C},{default:e.withCtx(()=>[e.createBaseVNode("form",{onSubmit:t[3]||(t[3]=e.withModifiers(r=>e.unref(s)(),["prevent"]))},[e.createBaseVNode("h4",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("giftCardValidation.title")),1)]),e.createBaseVNode("p",{innerHTML:e.unref(n)("giftCardValidation.description")},null,8,h),e.createVNode(V.ActionField,{modelValue:e.unref(u),"onUpdate:modelValue":t[0]||(t[0]=r=>e.isRef(u)?u.value=r:null),icon:"gift-card",label:e.unref(n)("booking.reservation.giftCardCode"),buttonLabel:e.unref(n)("giftCardValidation.submitButton"),placeholder:"XXXXXXXX","is-loading":e.unref(i),"onUpdate:isLoading":t[1]||(t[1]=r=>e.isRef(i)?i.value=r:null),onAction:t[2]||(t[2]=r=>e.unref(s)())},null,8,["modelValue","label","buttonLabel","is-loading"]),!e.unref(i)&&e.unref(p)?(e.openBlock(),e.createElementBlock("table",m,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("giftCardValidation.giftCard")),1),e.createVNode(e.Icon,{icon:"gift-card",type:"fas","icon-color":l.headerColor},null,8,["icon-color"])]),e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("giftCardValidation.balance")),1),e.createVNode(e.Icon,{icon:"money-bill",type:"fas","icon-color":l.headerColor},null,8,["icon-color"])]),e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("giftCardValidation.expirationDate")),1),e.createVNode(e.Icon,{icon:"timer",type:"fas","icon-color":l.headerColor},null,8,["icon-color"])])])]),e.createBaseVNode("tbody",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(b)),1)]),e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(e.unref(f),e.unref(B))),1)]),e.createBaseVNode("td",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showDate)(e.unref(g))),1)])])])])):e.createCommentVNode("",!0)],32)]),_:1},8,["access-token"])]),fallback:e.withCtx(()=>[N]),_:1}))}});const k=e._export_sfc(F,[["__scopeId","data-v-72b6e39c"]]),d=e.createApp({components:{GiftCardValidation:k}}),_=e.createPinia();d.use(_);d.use(e.instance);d.mount("#fresh-booking-gift-card-validation-app");module.exports=d;
Binary file
@@ -0,0 +1,3 @@
1
+ export * from './entries/gift-card-validation'
2
+ import _default from './entries/gift-card-validation'
3
+ export default _default
@@ -1,14 +1,13 @@
1
- import { d as v, o as m, h as R, w as c, a as d, b as t, t as l, u as n, i as C, c as T, I as g, k as z, j as W, S as P, p as X, l as I, _ as L, m as w } from "./Clickable-386eceb6.mjs";
2
- import { u as x, s as h, h as A, g as D, l as G, _ as N, c as M, i as U } from "./NumberField.vue_vue_type_style_index_0_lang-99de44b7.mjs";
3
- import { u as B } from "./applyGiftCard-02342491.mjs";
4
- import { A as $ } from "./ActionField-0c047379.mjs";
5
- import "./SelectField.vue_vue_type_style_index_0_lang-a45312d1.mjs";
6
- import "./_commonjsHelpers-c5d32002.mjs";
7
- const H = (i) => (X("data-v-64c7a8a4"), i = i(), I(), i), j = ["innerHTML"], E = {
1
+ import { h as v, q as R, s as C, a as T, k as m, l as z, w as c, m as d, x as n, B as l, n as t, z as h, v as P, D as g, F as W, G as L, y as X, H as x, J as w, K as I, L as A, M as D, _ as G, N, P as M, Q as H } from "./NumberField.vue_vue_type_style_index_0_lang-ab747739.js";
2
+ import { u as B } from "./applyGiftCard-c5e4aaad.js";
3
+ import { A as U } from "./ActionField-5ecfc9dc.js";
4
+ import "./SelectField.vue_vue_type_style_index_0_lang-5bdd7db9.js";
5
+ import "./_commonjsHelpers-aeeeeb92.js";
6
+ const $ = (i) => (A("data-v-72b6e39c"), i = i(), D(), i), q = ["innerHTML"], E = {
8
7
  key: 0,
9
8
  id: "fresh-booking-gift-card-validation-resume",
10
9
  class: "fresh-booking-panel"
11
- }, q = /* @__PURE__ */ H(() => /* @__PURE__ */ t("span", null, "Loading...", -1)), J = /* @__PURE__ */ v({
10
+ }, J = /* @__PURE__ */ $(() => /* @__PURE__ */ n("span", null, "Loading...", -1)), K = /* @__PURE__ */ v({
12
11
  __name: "GiftCardValidation",
13
12
  props: {
14
13
  accessToken: {},
@@ -41,14 +40,14 @@ const H = (i) => (X("data-v-64c7a8a4"), i = i(), I(), i), j = ["innerHTML"], E =
41
40
  panelPadding: {}
42
41
  },
43
42
  setup(i) {
44
- const o = i, { t: e } = x(), {
43
+ const o = i, { t: e } = R(), {
45
44
  voucher: p,
46
- isValid: k,
47
- amount: y,
48
- expirationDate: F,
45
+ isValid: y,
46
+ amount: F,
47
+ expirationDate: k,
49
48
  productName: _,
50
49
  isLoading: s
51
- } = h(B()), { currency: S } = h(A()), { apply: b } = B(), V = {
50
+ } = C(B()), { currency: S } = C(T()), { apply: b } = B(), V = {
52
51
  "--accentColor": o.accentColor,
53
52
  "--buttonBackground": o.buttonBackground,
54
53
  "--buttonBorder": o.buttonBorder,
@@ -77,9 +76,9 @@ const H = (i) => (X("data-v-64c7a8a4"), i = i(), I(), i), j = ["innerHTML"], E =
77
76
  "--panelBorderRadius": o.panelBorderRadius,
78
77
  "--panelPadding": o.panelPadding
79
78
  };
80
- return (u, a) => (m(), R(P, null, {
79
+ return (u, a) => (m(), z(I, null, {
81
80
  default: c(() => [
82
- d(N, {
81
+ d(w, {
83
82
  id: "fresh-booking-gift-card-validation-module",
84
83
  class: "fresh-booking-app",
85
84
  "access-token": u.accessToken,
@@ -87,47 +86,47 @@ const H = (i) => (X("data-v-64c7a8a4"), i = i(), I(), i), j = ["innerHTML"], E =
87
86
  style: V
88
87
  }, {
89
88
  default: c(() => [
90
- t("form", {
91
- onSubmit: a[3] || (a[3] = W((r) => n(b)(), ["prevent"]))
89
+ n("form", {
90
+ onSubmit: a[3] || (a[3] = x((r) => t(b)(), ["prevent"]))
92
91
  }, [
93
- t("h4", null, [
94
- t("span", null, l(n(e)("giftCardValidation.title")), 1)
92
+ n("h4", null, [
93
+ n("span", null, l(t(e)("giftCardValidation.title")), 1)
95
94
  ]),
96
- t("p", {
97
- innerHTML: n(e)("giftCardValidation.description")
98
- }, null, 8, j),
99
- d($, {
100
- modelValue: n(p),
101
- "onUpdate:modelValue": a[0] || (a[0] = (r) => C(p) ? p.value = r : null),
95
+ n("p", {
96
+ innerHTML: t(e)("giftCardValidation.description")
97
+ }, null, 8, q),
98
+ d(U, {
99
+ modelValue: t(p),
100
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => h(p) ? p.value = r : null),
102
101
  icon: "gift-card",
103
- label: n(e)("booking.reservation.giftCardCode"),
104
- buttonLabel: n(e)("giftCardValidation.submitButton"),
102
+ label: t(e)("booking.reservation.giftCardCode"),
103
+ buttonLabel: t(e)("giftCardValidation.submitButton"),
105
104
  placeholder: "XXXXXXXX",
106
- "is-loading": n(s),
107
- "onUpdate:isLoading": a[1] || (a[1] = (r) => C(s) ? s.value = r : null),
108
- onAction: a[2] || (a[2] = (r) => n(b)())
105
+ "is-loading": t(s),
106
+ "onUpdate:isLoading": a[1] || (a[1] = (r) => h(s) ? s.value = r : null),
107
+ onAction: a[2] || (a[2] = (r) => t(b)())
109
108
  }, null, 8, ["modelValue", "label", "buttonLabel", "is-loading"]),
110
- !n(s) && n(k) ? (m(), T("table", E, [
111
- t("thead", null, [
112
- t("tr", null, [
113
- t("th", null, [
114
- t("span", null, l(n(e)("giftCardValidation.giftCard")), 1),
109
+ !t(s) && t(y) ? (m(), P("table", E, [
110
+ n("thead", null, [
111
+ n("tr", null, [
112
+ n("th", null, [
113
+ n("span", null, l(t(e)("giftCardValidation.giftCard")), 1),
115
114
  d(g, {
116
115
  icon: "gift-card",
117
116
  type: "fas",
118
117
  "icon-color": u.headerColor
119
118
  }, null, 8, ["icon-color"])
120
119
  ]),
121
- t("th", null, [
122
- t("span", null, l(n(e)("giftCardValidation.balance")), 1),
120
+ n("th", null, [
121
+ n("span", null, l(t(e)("giftCardValidation.balance")), 1),
123
122
  d(g, {
124
123
  icon: "money-bill",
125
124
  type: "fas",
126
125
  "icon-color": u.headerColor
127
126
  }, null, 8, ["icon-color"])
128
127
  ]),
129
- t("th", null, [
130
- t("span", null, l(n(e)("giftCardValidation.expirationDate")), 1),
128
+ n("th", null, [
129
+ n("span", null, l(t(e)("giftCardValidation.expirationDate")), 1),
131
130
  d(g, {
132
131
  icon: "timer",
133
132
  type: "fas",
@@ -136,34 +135,36 @@ const H = (i) => (X("data-v-64c7a8a4"), i = i(), I(), i), j = ["innerHTML"], E =
136
135
  ])
137
136
  ])
138
137
  ]),
139
- t("tbody", null, [
140
- t("tr", null, [
141
- t("td", null, [
142
- t("span", null, l(n(_)), 1)
138
+ n("tbody", null, [
139
+ n("tr", null, [
140
+ n("td", null, [
141
+ n("span", null, l(t(_)), 1)
143
142
  ]),
144
- t("td", null, [
145
- t("span", null, l(n(D)(n(y), n(S))), 1)
143
+ n("td", null, [
144
+ n("span", null, l(t(W)(t(F), t(S))), 1)
146
145
  ]),
147
- t("td", null, [
148
- t("span", null, l(n(G)(n(F))), 1)
146
+ n("td", null, [
147
+ n("span", null, l(t(L)(t(k))), 1)
149
148
  ])
150
149
  ])
151
150
  ])
152
- ])) : z("", !0)
151
+ ])) : X("", !0)
153
152
  ], 32)
154
153
  ]),
155
154
  _: 1
156
155
  }, 8, ["access-token"])
157
156
  ]),
158
157
  fallback: c(() => [
159
- q
158
+ J
160
159
  ]),
161
160
  _: 1
162
161
  }));
163
162
  }
164
163
  });
165
- const K = /* @__PURE__ */ L(J, [["__scopeId", "data-v-64c7a8a4"]]), f = w({ components: { GiftCardValidation: K } }), O = M();
166
- f.use(O);
167
- f.use(U);
164
+ const Q = /* @__PURE__ */ G(K, [["__scopeId", "data-v-72b6e39c"]]), f = N({ components: { GiftCardValidation: Q } }), j = M();
165
+ f.use(j);
166
+ f.use(H);
168
167
  f.mount("#fresh-booking-gift-card-validation-app");
169
- //# sourceMappingURL=gift-card-validation.es.js.map
168
+ export {
169
+ f as default
170
+ };
Binary file
@@ -1,2 +1 @@
1
- "use strict";const e=require("./Clickable-77afc133.js"),o=require("./NumberField.vue_vue_type_style_index_0_lang-e8efabad.js"),F=require("./index-4e9533a9.js"),L=require("./ReCaptchaVuePlugin-0988d77f.js"),w=require("./SelectField.vue_vue_type_style_index_0_lang-18843626.js");require("./_commonjsHelpers-6763f629.js");const G=o.defineStore("giftCard",()=>{const{display:p}=o.useAlertStore(),{bearerToken:t,metaData:a}=o.storeToRefs(o.useUtilityStore()),l=e.ref(o.GiftCardModuleState.InitialState),k=o.useStorage("freshBookingName","",void 0,{serializer:o.StorageSerializers.string}),s=o.useStorage("freshBookingEmail","",void 0,{serializer:o.StorageSerializers.string}),f=o.useStorage("freshBookingPhone","",void 0,{serializer:o.StorageSerializers.string}),v=e.ref(""),y=e.ref(1),_=e.ref(!0),S=e.ref(""),g=e.ref({base64:"",type:"",name:""}),r=e.ref(void 0),d=e.ref(0),m=e.ref(!1),C=e.ref(0),b=e.computed(()=>l.value===o.GiftCardModuleState.InitialState||l.value===o.GiftCardModuleState.WaitingForResponse),B=e.computed(()=>l.value===o.GiftCardModuleState.ReadyToPay),N=e.computed(()=>l.value===o.GiftCardModuleState.PaymentSuccess),h=e.computed(()=>{const u={1:{label:o.i18n.t("giftCard.hotelType"),data:[]},2:{label:o.i18n.t("giftCard.restaurantType"),data:[]}},i=a.value.places;return i&&i.forEach(n=>{u[n.placeType].data.push(n)}),Object.fromEntries(Object.entries(u).filter(([,n])=>n.data.length>0))}),T=e.computed(()=>C.value!==0),V=e.computed(()=>{let u;if(T.value)u=h.value[C.value].data[0];else if(d.value!==0){const i=r.value,n=h.value[d.value].data;n.length===1?u=n[0]:i!==void 0&&n.forEach(R=>{String(R.id)===String(i)&&(u=R)})}return u}),z=e.computed(()=>!(!k.value||!s.value||!(f.value.length>=5)||!v.value||V.value===void 0)),E=e.computed(()=>!(l.value===o.GiftCardModuleState.InitialState&&m.value)),q=e.computed(()=>!!(l.value===o.GiftCardModuleState.WaitingForResponse&&m.value));async function U(){l.value=o.GiftCardModuleState.WaitingForResponse,m.value=!0,await o.axios.post("http://localhost:91/api/gift-card/create",{termsOfserviceURL:"https://freshbooking.dk",checkoutUrl:"https://freshbooking.dk",currencyID:a.value.currency.id,language:o.getUserLanguage(),amount:v.value,quantity:y.value,freeText:S.value,showPrice:_.value,contactName:k.value,contactEmail:s.value,contactPhone:f.value,imageBase64:o.b2a(g.value.base64),imageName:g.value.name,imageFormat:g.value.type,placeType:V.value?V.value.placeType:void 0,placeID:V.value?V.value.id:void 0},{headers:{Authorization:t.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.5"}}).then(u=>{if(m.value=!1,u.data.easyPayment){l.value=o.GiftCardModuleState.ReadyToPay;const i=new Reepay.EmbeddedCheckout(u.data.easyPayment.paymentID,{html_element:"fresh-booking-gift-card-payment"});i.addEventHandler(o.ReepayEvent.Accept,()=>{l.value=o.GiftCardModuleState.PaymentSuccess,p({message:o.i18n.t("alert.success.giftCardOrdered"),type:"success"})}),i.addEventHandler(o.ReepayEvent.Error,()=>{p({message:o.i18n.t("booking.other.errorMessage"),type:"warning"})})}else l.value=o.GiftCardModuleState.InitialState,p({message:`${o.i18n.t("booking.other.errorMessage")} (HTTP: ${u.status})`,type:"warning"})})}function M(u){C.value=u}return{moduleState:l,name:k,email:s,phone:f,value:v,remark:S,showValue:_,quantity:y,media:g,placeId:r,placeType:d,showFormPage:b,showPaymentPage:B,showConfirmationPage:N,places:h,hasFilledForm:z,hasForcedPlaceType:T,isWaitingForResponse:q,isMetaDataAvailable:E,orderGiftCard:U,initialize:M}}),W={class:"media-selector"},x=["accept"],A={class:"media-selector-wrapper"},H={class:"media-selector-tools"},j={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:t}){const a=p,{t:l}=o.useI18n(),{display:k}=o.useAlertStore(),s=e.ref(),f=e.computed(()=>a.modelValue.base64!=="");function v(r){t("update:modelValue",r)}function y(){v({base64:"",name:"",type:""}),s.value&&(s.value.value="")}function _(){s.value&&s.value.click()}function S(r,d){const[m,C]=[r.name,r.type],b=new FileReader;b.onload=function(B){if(B.target){const N=B.target.result;d({base64:N,name:m,type:C})}else k({message:l("imageUploadError"),type:"error"})},b.readAsDataURL(r)}async function g(){let r;(r=s.value.files)instanceof FileList&&S(r[0],v)}return(r,d)=>(e.openBlock(),e.createBlock(o.InputField,{label:r.label,required:r.required,type:"media"},{default:e.withCtx(()=>[e.createBaseVNode("div",W,[e.createBaseVNode("input",{ref_key:"fileInput",ref:s,type:"file",class:"hidden",accept:r.validation,single:"",onChange:d[0]||(d[0]=m=>g())},null,40,x),e.createBaseVNode("div",A,[e.createBaseVNode("ul",H,[f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",j,[e.createVNode(e.Clickable,{label:e.unref(l)("uploadFile"),type:"button",icon:"upload","icon-color":r.iconColor,onClickEvent:d[1]||(d[1]=m=>_())},null,8,["label","icon-color"])])),f.value?(e.openBlock(),e.createElementBlock("li",O,[e.createVNode(e.Clickable,{label:e.unref(l)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":r.iconColor,onClickEvent:d[2]||(d[2]=m=>_())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("li",K,[e.createVNode(e.Clickable,{label:e.unref(l)("removeFile"),type:"button",icon:"trash-alt","icon-color":r.iconColor,onClickEvent:d[3]||(d[3]=m=>y())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:f.value}])},[r.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.modelValue.base64},null,8,Y)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function I(p){const t=p;t.__i18n=t.__i18n||[],t.__i18n.push({locale:"",resource:{da:{uploadFile:a=>{const{normalize:l}=a;return l(["Upload billede"])},removeFile:a=>{const{normalize:l}=a;return l(["Fjern billede"])},replaceFile:a=>{const{normalize:l}=a;return l(["Ersat billede"])},imageUploadError:a=>{const{normalize:l}=a;return l(["Der skete en fejl under billede upload!"])}},en:{uploadFile:a=>{const{normalize:l}=a;return l(["Upload image"])},removeFile:a=>{const{normalize:l}=a;return l(["Remove image"])},replaceFile:a=>{const{normalize:l}=a;return l(["Replace image"])},imageUploadError:a=>{const{normalize:l}=a;return l(["An error occurred under image upload!"])}}}})}typeof I=="function"&&I(J);const Q=p=>(e.pushScopeId("data-v-10b51e8f"),p=p(),e.popScopeId(),p),X={key:0,id:"fresh-booking-gift-card-wrapper"},Z={id:"fresh-booking-gift-card-title"},ee={id:"fresh-booking-gift-card-content"},oe={id:"fresh-booking-gift-card-payment"},ae=["innerHTML"],te={key:0},le={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"],ce={key:0,id:"fresh-booking-gift-card-order"},de={class:"fresh-booking-panel"},ue={key:1,id:"fresh-booking-gift-card-remarks"},se={key:2,id:"fresh-booking-gift-card-order-minimal","sticky-side":"bottom"},pe={id:"fresh-booking-gift-card-recaptcha"},fe=Q(()=>e.createBaseVNode("span",null,"Loading...",-1)),me=e.defineComponent({__name:"GiftCard",props:{accessToken:{},accentColor:{},buttonBackground:{},buttonBorder:{},buttonBorderRadius:{},buttonColor:{},buttonFontFamily:{},buttonFontSize:{},buttonTextTransform:{},buttonFontWeight:{},fontColor:{},fontFamily:{},fontSize:{},fontWeight:{},grayColor:{},headerColor:{},headerFontSize:{},inputBackground:{},inputBorder:{},inputBorderRadius:{},inputFontColor:{},labelFontWeight:{},labelPadding:{},layout:{},loadingColor:{},panelBackground:{},panelBorder:{},panelBorderRadius:{},panelPadding:{},placeType:{},successColor:{}},setup(p){const t=p,{t:a}=o.useI18n(),{name:l,email:k,phone:s,value:f,remark:v,showValue:y,quantity:_,media:S,placeId:g,placeType:r,showFormPage:d,showPaymentPage:m,showConfirmationPage:C,places:b,hasFilledForm:B,hasForcedPlaceType:N,isWaitingForResponse:h,isMetaDataAvailable:T}=o.storeToRefs(G()),{initialize:V,orderGiftCard:z}=G(),{isRecaptchaEnabled:E,currency:q}=o.storeToRefs(o.useUtilityStore()),{display:U}=o.useAlertStore();async function M(){const i=L.useReCaptcha_1();if(E.value&&i){await i.recaptchaLoaded();const n=await i.executeRecaptcha("create_gift_card");(await o.axios.get(`/?rest_route=/freshcase-octopus/v1/recaptcha/${n}`)).data.success?await z():U({message:a("alert.error.robot"),type:"error"})}else await z()}e.watch(r,()=>{g.value=void 0}),e.onMounted(()=>{V(parseInt(t.placeType))});const u={"--accentColor":t.accentColor,"--buttonBackground":t.buttonBackground,"--buttonBorder":t.buttonBorder,"--buttonBorderRadius":t.buttonBorderRadius,"--buttonFontFamily":t.buttonFontFamily,"--buttonColor":t.buttonColor,"--buttonFontSize":t.buttonFontSize,"--buttonTextTransform":t.buttonTextTransform,"--buttonFontWeight":t.buttonFontWeight,"--fontColor":t.fontColor,"--fontFamily":t.fontFamily,"--fontSize":t.fontSize,"--fontWeight":t.fontWeight,"--grayColor":t.grayColor,"--headerColor":t.headerColor,"--headerFontSize":t.headerFontSize,"--inputBackground":t.inputBackground,"--inputBorder":t.inputBorder,"--inputBorderRadius":t.inputBorderRadius,"--inputFontColor":t.inputFontColor,"--labelFontWeight":t.labelFontWeight,"--labelPadding":t.labelPadding,"--loadingColor":t.loadingColor,"--panelBackground":t.panelBackground,"--panelBorder":t.panelBorder,"--panelBorderRadius":t.panelBorderRadius,"--panelPadding":t.panelPadding,"--successColor":t.successColor};return(i,n)=>{const R=e.resolveDirective("sticky");return e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(o._sfc_main,{id:"fresh-booking-gift-card-module",class:"fresh-booking-app",type:"gift-card","access-token":i.accessToken,"data-layout":i.layout,style:u,"sticky-container":""},{default:e.withCtx(()=>[e.unref(T)?(e.openBlock(),e.createElementBlock("div",X,[e.createBaseVNode("h4",Z,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCard.title")),1)]),e.createBaseVNode("div",ee,[e.withDirectives(e.createBaseVNode("div",oe,null,512),[[e.vShow,e.unref(m)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("p",{id:"fresh-booking-gift-card-description",innerHTML:e.unref(a)("giftCard.description")},null,8,ae),e.createBaseVNode("form",null,[e.createVNode(w.TextField,{modelValue:e.unref(l),"onUpdate:modelValue":n[0]||(n[0]=c=>e.isRef(l)?l.value=c:null),type:"text",name:"name",autocomplete:"name",label:e.unref(a)("giftCard.name"),icon:"user-alt","icon-color":i.accentColor,placeholder:e.unref(a)("giftCard.namePlaceholder"),required:""},null,8,["modelValue","label","icon-color","placeholder"]),e.createVNode(w.TextField,{modelValue:e.unref(k),"onUpdate:modelValue":n[1]||(n[1]=c=>e.isRef(k)?k.value=c:null),type:"email",name:"email",autocomplete:"email",label:e.unref(a)("giftCard.email"),icon:"at","icon-color":i.accentColor,placeholder:e.unref(a)("giftCard.emailPlaceholder"),required:""},null,8,["modelValue","label","icon-color","placeholder"]),e.createVNode(F.PhoneField,{modelValue:e.unref(s),"onUpdate:modelValue":n[2]||(n[2]=c=>e.isRef(s)?s.value=c:null),icon:"phone-office","icon-color":i.accentColor,label:e.unref(a)("giftCard.phone"),placeholder:e.unref(a)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","icon-color","label","placeholder"]),e.unref(N)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",te,[e.unref(b)?(e.openBlock(),e.createElementBlock("div",le,[e.createBaseVNode("label",ne,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a)("giftCard.selectType")),1)]),e.createBaseVNode("div",re,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(b),(c,$)=>(e.openBlock(),e.createElementBlock("li",{key:$},[e.createVNode(F.Checkbox,{modelValue:e.unref(r),"onUpdate:modelValue":n[3]||(n[3]=D=>e.isRef(r)?r.value=D:null),type:"radio",name:"placeType",val:$,label:c.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(b)[e.unref(r)]&&e.unref(b)[e.unref(r)].data.length>1?(e.openBlock(),e.createBlock(w._sfc_main,{key:0,modelValue:e.unref(g),"onUpdate:modelValue":n[4]||(n[4]=c=>e.isRef(g)?g.value=c:null),placeholder:e.unref(a)("giftCard.selectPlacePlaceholder"),options:e.unref(b)[e.unref(r)].data,labelKey:"name",valueKey:"id",required:""},null,8,["modelValue","placeholder","options"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(e.Loading,{key:1,color:i.loadingColor},null,8,["color"]))])),e.createVNode(w.TextField,{modelValue:e.unref(f),"onUpdate:modelValue":n[5]||(n[5]=c=>e.isRef(f)?f.value=c:null),type:"number",name:"value",label:e.unref(a)("giftCard.value"),icon:"money-bill","icon-color":i.accentColor,placeholder:e.unref(a)("giftCard.valuePlaceholder"),suffix:e.unref(q),required:""},null,8,["modelValue","label","icon-color","placeholder","suffix"]),e.createVNode(F.Checkbox,{modelValue:e.unref(y),"onUpdate:modelValue":n[6]||(n[6]=c=>e.isRef(y)?y.value=c:null),type:"checkbox",name:"showValue",label:e.unref(a)("giftCard.showValue"),checked:e.unref(y)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createCommentVNode("",!0)])],512),[[e.vShow,e.unref(d)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("div",{innerHTML:e.unref(a)("giftCard.thankYou")},null,8,ie)],512),[[e.vShow,e.unref(C)]])]),i.layout!=="minimal"&&e.unref(d)?(e.openBlock(),e.createElementBlock("div",ce,[e.createBaseVNode("div",de,[e.createVNode(e.Clickable,{label:e.unref(a)("giftCard.orderGiftCard"),style:e.normalizeStyle({background:i.successColor}),"full-width":!0,disabled:!e.unref(B),"is-loading":e.unref(h),"onUpdate:isLoading":n[9]||(n[9]=c=>e.isRef(h)?h.value=c:null),onClickEvent:M},null,8,["label","style","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(d)?(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(w.TextField,{modelValue:e.unref(v),"onUpdate:modelValue":n[10]||(n[10]=c=>e.isRef(v)?v.value=c:null),type:"textarea",name:"remark",label:e.unref(a)("giftCard.remark"),icon:"info-circle","icon-color":i.accentColor,placeholder:e.unref(a)("giftCard.remarkPlaceholder")},null,8,["modelValue","label","icon-color","placeholder"])])):e.createCommentVNode("",!0),e.unref(d)?e.withDirectives((e.openBlock(),e.createElementBlock("div",se,[e.createVNode(e.Clickable,{label:e.unref(a)("giftCard.orderGiftCard"),style:e.normalizeStyle({background:i.successColor}),"full-width":!0,disabled:!e.unref(B),"data-test":"orderGiftCard","is-loading":e.unref(h),"onUpdate:isLoading":n[11]||(n[11]=c=>e.isRef(h)?h.value=c:null),onClickEvent:M},null,8,["label","style","disabled","is-loading"]),e.withDirectives(e.createBaseVNode("div",pe,[e.createVNode(F._sfc_main)],512),[[e.vShow,e.unref(E)]])])),[[R]]):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","data-layout"])]),fallback:e.withCtx(()=>[fe]),_:1})}}});const ge=e._export_sfc(me,[["__scopeId","data-v-10b51e8f"]]),ve=o.createPinia(),P=e.createApp({components:{GiftCard:ge}});P.use(ve);P.use(o.instance);P.use(F.StickyPlugin);P.use(F.install,{bootstrap:!1});P.mount("#fresh-booking-gift-card-app");
2
- //# sourceMappingURL=gift-card.cjs.js.map
1
+ "use strict";const e=require("./NumberField.vue_vue_type_style_index_0_lang-0b6d48f1.cjs"),V=require("./index-58f3b0cc.cjs"),I=require("./ReCaptchaVuePlugin-08ee5d62.cjs"),w=require("./SelectField.vue_vue_type_style_index_0_lang-5f1087dc.cjs");require("./_commonjsHelpers-6763f629.cjs");const U=e.defineStore("giftCard",()=>{const{display:c}=e.useAlertStore(),{bearerToken:t,metaData:o}=e.storeToRefs(e.useUtilityStore()),a=e.ref(e.GiftCardModuleState.InitialState),y=e.useStorage("freshBookingName","",void 0,{serializer:e.StorageSerializers.string}),s=e.useStorage("freshBookingEmail","",void 0,{serializer:e.StorageSerializers.string}),p=e.useStorage("freshBookingPhone","",void 0,{serializer:e.StorageSerializers.string}),g=e.ref(""),b=e.ref(1),B=e.ref(!0),S=e.ref(""),m=e.ref({base64:"",type:"",name:""}),n=e.ref(void 0),d=e.ref(0),f=e.ref(!1),h=e.ref(0),v=e.computed(()=>a.value===e.GiftCardModuleState.InitialState||a.value===e.GiftCardModuleState.WaitingForResponse),k=e.computed(()=>a.value===e.GiftCardModuleState.ReadyToPay),N=e.computed(()=>a.value===e.GiftCardModuleState.PaymentSuccess),_=e.computed(()=>{const u={1:{label:e.i18n.t("giftCard.hotelType"),data:[]},2:{label:e.i18n.t("giftCard.restaurantType"),data:[]}},r=o.value.places;return r&&r.forEach(l=>{u[l.placeType].data.push(l)}),Object.fromEntries(Object.entries(u).filter(([,l])=>l.data.length>0))}),P=e.computed(()=>h.value!==0),C=e.computed(()=>{let u;if(P.value)u=_.value[h.value].data[0];else if(d.value!==0){const r=n.value,l=_.value[d.value].data;l.length===1?u=l[0]:r!==void 0&&l.forEach(R=>{String(R.id)===String(r)&&(u=R)})}return u}),T=e.computed(()=>!(!y.value||!s.value||!(p.value.length>=5)||!g.value||C.value===void 0)),z=e.computed(()=>!(a.value===e.GiftCardModuleState.InitialState&&f.value)),M=e.computed(()=>!!(a.value===e.GiftCardModuleState.WaitingForResponse&&f.value));async function x(){a.value=e.GiftCardModuleState.WaitingForResponse,f.value=!0,await e.axios.post("http://localhost:91/api/gift-card/create",{termsOfserviceURL:"https://freshbooking.dk",checkoutUrl:"https://freshbooking.dk",currencyID:o.value.currency.id,language:e.getUserLanguage(),amount:g.value,quantity:b.value,freeText:S.value,showPrice:B.value,contactName:y.value,contactEmail:s.value,contactPhone:p.value,imageBase64:e.b2a(m.value.base64),imageName:m.value.name,imageFormat:m.value.type,placeType:C.value?C.value.placeType:void 0,placeID:C.value?C.value.id:void 0},{headers:{Authorization:t.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.6"}}).then(u=>{if(f.value=!1,u.data.easyPayment){a.value=e.GiftCardModuleState.ReadyToPay;const r=new Reepay.EmbeddedCheckout(u.data.easyPayment.paymentID,{html_element:"fresh-booking-gift-card-payment"});r.addEventHandler(e.ReepayEvent.Accept,()=>{a.value=e.GiftCardModuleState.PaymentSuccess,c({message:e.i18n.t("alert.success.giftCardOrdered"),type:"success"})}),r.addEventHandler(e.ReepayEvent.Error,()=>{c({message:e.i18n.t("booking.other.errorMessage"),type:"warning"})})}else a.value=e.GiftCardModuleState.InitialState,c({message:`${e.i18n.t("booking.other.errorMessage")} (HTTP: ${u.status})`,type:"warning"})})}function E(u){h.value=u}return{moduleState:a,name:y,email:s,phone:p,value:g,remark:S,showValue:B,quantity:b,media:m,placeId:n,placeType:d,showFormPage:v,showPaymentPage:k,showConfirmationPage:N,places:_,hasFilledForm:T,hasForcedPlaceType:P,isWaitingForResponse:M,isMetaDataAvailable:z,orderGiftCard:x,initialize:E}}),D={class:"media-selector"},L=["accept"],W={class:"media-selector-wrapper"},A={class:"media-selector-tools"},H={key:0},j={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(c,{emit:t}){const o=c,{t:a}=e.useI18n(),{display:y}=e.useAlertStore(),s=e.ref(),p=e.computed(()=>o.modelValue.base64!=="");function g(n){t("update:modelValue",n)}function b(){g({base64:"",name:"",type:""}),s.value&&(s.value.value="")}function B(){s.value&&s.value.click()}function S(n,d){const[f,h]=[n.name,n.type],v=new FileReader;v.onload=function(k){if(k.target){const N=k.target.result;d({base64:N,name:f,type:h})}else y({message:a("imageUploadError"),type:"error"})},v.readAsDataURL(n)}async function m(){let n;(n=s.value.files)instanceof FileList&&S(n[0],g)}return(n,d)=>(e.openBlock(),e.createBlock(e.InputField,{label:n.label,required:n.required,type:"media"},{default:e.withCtx(()=>[e.createBaseVNode("div",D,[e.createBaseVNode("input",{ref_key:"fileInput",ref:s,type:"file",class:"hidden",accept:n.validation,single:"",onChange:d[0]||(d[0]=f=>m())},null,40,L),e.createBaseVNode("div",W,[e.createBaseVNode("ul",A,[p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",H,[e.createVNode(e.Clickable,{label:e.unref(a)("uploadFile"),type:"button",icon:"upload","icon-color":n.iconColor,onClickEvent:d[1]||(d[1]=f=>B())},null,8,["label","icon-color"])])),p.value?(e.openBlock(),e.createElementBlock("li",j,[e.createVNode(e.Clickable,{label:e.unref(a)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":n.iconColor,onClickEvent:d[2]||(d[2]=f=>B())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("li",O,[e.createVNode(e.Clickable,{label:e.unref(a)("removeFile"),type:"button",icon:"trash-alt","icon-color":n.iconColor,onClickEvent:d[3]||(d[3]=f=>b())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:p.value}])},[n.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.modelValue.base64},null,8,K)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function $(c){const t=c;t.__i18n=t.__i18n||[],t.__i18n.push({locale:"",resource:{da:{uploadFile:o=>{const{normalize:a}=o;return a(["Upload billede"])},removeFile:o=>{const{normalize:a}=o;return a(["Fjern billede"])},replaceFile:o=>{const{normalize:a}=o;return a(["Ersat billede"])},imageUploadError:o=>{const{normalize:a}=o;return a(["Der skete en fejl under billede upload!"])}},en:{uploadFile:o=>{const{normalize:a}=o;return a(["Upload image"])},removeFile:o=>{const{normalize:a}=o;return a(["Remove image"])},replaceFile:o=>{const{normalize:a}=o;return a(["Replace image"])},imageUploadError:o=>{const{normalize:a}=o;return a(["An error occurred under image upload!"])}}}})}typeof $=="function"&&$(Y);const J=c=>(e.pushScopeId("data-v-259a8073"),c=c(),e.popScopeId(),c),Q={key:0,id:"fresh-booking-gift-card-wrapper"},X={id:"fresh-booking-gift-card-title"},Z={id:"fresh-booking-gift-card-content"},ee={id:"fresh-booking-gift-card-payment"},oe=["innerHTML"],te={key:0},ae={key:0,id:"fresh-booking-select-place-type"},le={class:e.normalizeClass(["fresh-booking-label","required"])},ne={id:"fresh-booking-select-place-type-input"},re=["innerHTML"],ie={key:0,id:"fresh-booking-gift-card-order"},de={class:"fresh-booking-panel"},ue={key:1,id:"fresh-booking-gift-card-remarks"},se={key:2,id:"fresh-booking-gift-card-order-minimal","sticky-side":"bottom"},ce={id:"fresh-booking-gift-card-recaptcha"},pe=J(()=>e.createBaseVNode("span",null,"Loading...",-1)),fe=e.defineComponent({__name:"GiftCard",props:{accessToken:{},accentColor:{},buttonBackground:{},buttonBorder:{},buttonBorderRadius:{},buttonColor:{},buttonFontFamily:{},buttonFontSize:{},buttonTextTransform:{},buttonFontWeight:{},fontColor:{},fontFamily:{},fontSize:{},fontWeight:{},grayColor:{},headerColor:{},headerFontSize:{},inputBackground:{},inputBorder:{},inputBorderRadius:{},inputFontColor:{},labelFontWeight:{},labelPadding:{},layout:{},loadingColor:{},panelBackground:{},panelBorder:{},panelBorderRadius:{},panelPadding:{},placeType:{},successColor:{}},setup(c){const t=c,{t:o}=e.useI18n(),{name:a,email:y,phone:s,value:p,remark:g,showValue:b,quantity:B,media:S,placeId:m,placeType:n,showFormPage:d,showPaymentPage:f,showConfirmationPage:h,places:v,hasFilledForm:k,hasForcedPlaceType:N,isWaitingForResponse:_,isMetaDataAvailable:P}=e.storeToRefs(U()),{initialize:C,orderGiftCard:T}=U(),{isRecaptchaEnabled:z,currency:M}=e.storeToRefs(e.useUtilityStore()),{display:x}=e.useAlertStore();async function E(){const r=I.useReCaptcha_1();if(z.value&&r){await r.recaptchaLoaded();const l=await r.executeRecaptcha("create_gift_card");(await e.axios.get(`/?rest_route=/freshcase-octopus/v1/recaptcha/${l}`)).data.success?await T():x({message:o("alert.error.robot"),type:"error"})}else await T()}e.watch(n,()=>{m.value=void 0}),e.onMounted(()=>{C(parseInt(t.placeType))});const u={"--accentColor":t.accentColor,"--buttonBackground":t.buttonBackground,"--buttonBorder":t.buttonBorder,"--buttonBorderRadius":t.buttonBorderRadius,"--buttonFontFamily":t.buttonFontFamily,"--buttonColor":t.buttonColor,"--buttonFontSize":t.buttonFontSize,"--buttonTextTransform":t.buttonTextTransform,"--buttonFontWeight":t.buttonFontWeight,"--fontColor":t.fontColor,"--fontFamily":t.fontFamily,"--fontSize":t.fontSize,"--fontWeight":t.fontWeight,"--grayColor":t.grayColor,"--headerColor":t.headerColor,"--headerFontSize":t.headerFontSize,"--inputBackground":t.inputBackground,"--inputBorder":t.inputBorder,"--inputBorderRadius":t.inputBorderRadius,"--inputFontColor":t.inputFontColor,"--labelFontWeight":t.labelFontWeight,"--labelPadding":t.labelPadding,"--loadingColor":t.loadingColor,"--panelBackground":t.panelBackground,"--panelBorder":t.panelBorder,"--panelBorderRadius":t.panelBorderRadius,"--panelPadding":t.panelPadding,"--successColor":t.successColor};return(r,l)=>{const R=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",class:"fresh-booking-app",type:"gift-card","access-token":r.accessToken,"data-layout":r.layout,style:u,"sticky-container":""},{default:e.withCtx(()=>[e.unref(P)?(e.openBlock(),e.createElementBlock("div",Q,[e.createBaseVNode("h4",X,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(o)("giftCard.title")),1)]),e.createBaseVNode("div",Z,[e.withDirectives(e.createBaseVNode("div",ee,null,512),[[e.vShow,e.unref(f)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("p",{id:"fresh-booking-gift-card-description",innerHTML:e.unref(o)("giftCard.description")},null,8,oe),e.createBaseVNode("form",null,[e.createVNode(w.TextField,{modelValue:e.unref(a),"onUpdate:modelValue":l[0]||(l[0]=i=>e.isRef(a)?a.value=i:null),type:"text",name:"name",autocomplete:"name",label:e.unref(o)("giftCard.name"),icon:"user-alt","icon-color":r.accentColor,placeholder:e.unref(o)("giftCard.namePlaceholder"),required:""},null,8,["modelValue","label","icon-color","placeholder"]),e.createVNode(w.TextField,{modelValue:e.unref(y),"onUpdate:modelValue":l[1]||(l[1]=i=>e.isRef(y)?y.value=i:null),type:"email",name:"email",autocomplete:"email",label:e.unref(o)("giftCard.email"),icon:"at","icon-color":r.accentColor,placeholder:e.unref(o)("giftCard.emailPlaceholder"),required:""},null,8,["modelValue","label","icon-color","placeholder"]),e.createVNode(V.PhoneField,{modelValue:e.unref(s),"onUpdate:modelValue":l[2]||(l[2]=i=>e.isRef(s)?s.value=i:null),icon:"phone-office","icon-color":r.accentColor,label:e.unref(o)("giftCard.phone"),placeholder:e.unref(o)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","icon-color","label","placeholder"]),e.unref(N)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",te,[e.unref(v)?(e.openBlock(),e.createElementBlock("div",ae,[e.createBaseVNode("label",le,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(o)("giftCard.selectType")),1)]),e.createBaseVNode("div",ne,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(v),(i,q)=>(e.openBlock(),e.createElementBlock("li",{key:q},[e.createVNode(V.Checkbox,{modelValue:e.unref(n),"onUpdate:modelValue":l[3]||(l[3]=G=>e.isRef(n)?n.value=G:null),type:"radio",name:"placeType",val:q,label:i.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(v)[e.unref(n)]&&e.unref(v)[e.unref(n)].data.length>1?(e.openBlock(),e.createBlock(w._sfc_main,{key:0,modelValue:e.unref(m),"onUpdate:modelValue":l[4]||(l[4]=i=>e.isRef(m)?m.value=i:null),placeholder:e.unref(o)("giftCard.selectPlacePlaceholder"),options:e.unref(v)[e.unref(n)].data,labelKey:"name",valueKey:"id",required:""},null,8,["modelValue","placeholder","options"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(e.Loading,{key:1,color:r.loadingColor},null,8,["color"]))])),e.createVNode(w.TextField,{modelValue:e.unref(p),"onUpdate:modelValue":l[5]||(l[5]=i=>e.isRef(p)?p.value=i:null),type:"number",name:"value",label:e.unref(o)("giftCard.value"),icon:"money-bill","icon-color":r.accentColor,placeholder:e.unref(o)("giftCard.valuePlaceholder"),suffix:e.unref(M),required:""},null,8,["modelValue","label","icon-color","placeholder","suffix"]),e.createVNode(V.Checkbox,{modelValue:e.unref(b),"onUpdate:modelValue":l[6]||(l[6]=i=>e.isRef(b)?b.value=i:null),type:"checkbox",name:"showValue",label:e.unref(o)("giftCard.showValue"),checked:e.unref(b)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createCommentVNode("",!0)])],512),[[e.vShow,e.unref(d)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("div",{innerHTML:e.unref(o)("giftCard.thankYou")},null,8,re)],512),[[e.vShow,e.unref(h)]])]),r.layout!=="minimal"&&e.unref(d)?(e.openBlock(),e.createElementBlock("div",ie,[e.createBaseVNode("div",de,[e.createVNode(e.Clickable,{label:e.unref(o)("giftCard.orderGiftCard"),style:e.normalizeStyle({background:r.successColor}),"full-width":!0,disabled:!e.unref(k),"is-loading":e.unref(_),"onUpdate:isLoading":l[9]||(l[9]=i=>e.isRef(_)?_.value=i:null),onClickEvent:E},null,8,["label","style","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(d)?(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(w.TextField,{modelValue:e.unref(g),"onUpdate:modelValue":l[10]||(l[10]=i=>e.isRef(g)?g.value=i:null),type:"textarea",name:"remark",label:e.unref(o)("giftCard.remark"),icon:"info-circle","icon-color":r.accentColor,placeholder:e.unref(o)("giftCard.remarkPlaceholder")},null,8,["modelValue","label","icon-color","placeholder"])])):e.createCommentVNode("",!0),e.unref(d)?e.withDirectives((e.openBlock(),e.createElementBlock("div",se,[e.createVNode(e.Clickable,{label:e.unref(o)("giftCard.orderGiftCard"),style:e.normalizeStyle({background:r.successColor}),"full-width":!0,disabled:!e.unref(k),"data-test":"orderGiftCard","is-loading":e.unref(_),"onUpdate:isLoading":l[11]||(l[11]=i=>e.isRef(_)?_.value=i:null),onClickEvent:E},null,8,["label","style","disabled","is-loading"]),e.withDirectives(e.createBaseVNode("div",ce,[e.createVNode(V._sfc_main)],512),[[e.vShow,e.unref(z)]])])),[[R]]):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","data-layout"])]),fallback:e.withCtx(()=>[pe]),_:1})}}});const me=e._export_sfc(fe,[["__scopeId","data-v-259a8073"]]),ge=e.createPinia(),F=e.createApp({components:{GiftCard:me}});F.use(ge);F.use(e.instance);F.use(V.StickyPlugin);F.use(V.install,{bootstrap:!1});F.mount("#fresh-booking-gift-card-app");module.exports=F;
Binary file
@@ -0,0 +1,3 @@
1
+ export * from './entries/gift-card'
2
+ import _default from './entries/gift-card'
3
+ export default _default