@konnectio/core 4.0.7 → 4.0.10

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 (164) hide show
  1. package/dist/{ActionField-5ecfc9dc.js → ActionField-68f65af4.js} +3 -3
  2. package/dist/ActionField-68f65af4.js.br +0 -0
  3. package/dist/{ActionField-ae9b1adf.cjs → ActionField-ab9c01ab.cjs} +1 -1
  4. package/dist/AvailabilitySkeleton-c48588e4.js +382 -0
  5. package/dist/AvailabilitySkeleton-c48588e4.js.br +0 -0
  6. package/dist/AvailabilitySkeleton-ca6cf6b6.cjs +1 -0
  7. package/dist/{payment-9e219e9b.js → DateField.vue_vue_type_style_index_0_lang-87ddfed8.js} +3201 -2937
  8. package/dist/DateField.vue_vue_type_style_index_0_lang-87ddfed8.js.br +0 -0
  9. package/dist/DateField.vue_vue_type_style_index_0_lang-b6694990.cjs +5 -0
  10. package/dist/Field-b76d82cb.js +42 -0
  11. package/dist/Field-b76d82cb.js.br +0 -0
  12. package/dist/Field-d926807f.cjs +1 -0
  13. package/dist/{applyGiftCard-c5e4aaad.js → NumberField.vue_vue_type_script_setup_true_lang-a32b2a11.js} +59 -59
  14. package/dist/NumberField.vue_vue_type_script_setup_true_lang-a32b2a11.js.br +0 -0
  15. package/dist/NumberField.vue_vue_type_script_setup_true_lang-a549c70e.cjs +1 -0
  16. package/dist/SelectField.vue_vue_type_style_index_0_lang-2bf82818.cjs +806 -0
  17. package/dist/SelectField.vue_vue_type_style_index_0_lang-c973d794.js +19169 -0
  18. package/dist/SelectField.vue_vue_type_style_index_0_lang-c973d794.js.br +0 -0
  19. package/dist/TextField-528ca68c.cjs +54 -0
  20. package/dist/TextField-8f6e5ef5.js +9345 -0
  21. package/dist/TextField-8f6e5ef5.js.br +0 -0
  22. package/dist/ThankYou-2f3c4efe.js +11777 -0
  23. package/dist/ThankYou-2f3c4efe.js.br +0 -0
  24. package/dist/ThankYou-8ae535bf.cjs +54 -0
  25. package/dist/_-3cff5490.cjs +1 -0
  26. package/dist/_-734c9d50.js +82 -0
  27. package/dist/_-734c9d50.js.br +0 -0
  28. package/dist/{_commonjsHelpers-aeeeeb92.js → _commonjsHelpers-c5d32002.js} +2 -2
  29. package/dist/assets/typescript/mixins.d.ts +1 -4
  30. package/dist/availability.cjs +2 -0
  31. package/dist/availability.js +188 -0
  32. package/dist/availability.js.br +0 -0
  33. package/dist/components/ErrorMessage.vue.d.ts +5 -0
  34. package/dist/components/ErrorMessage.vue.d.ts.map +1 -0
  35. package/dist/components/Icon.vue.d.ts +1 -1
  36. package/dist/components/forms/EventAvailabilityForm.vue.d.ts +1 -1
  37. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +1 -1
  38. package/dist/components/forms/HotelReservationForm.vue.d.ts +4 -0
  39. package/dist/components/forms/HotelReservationForm.vue.d.ts.map +1 -0
  40. package/dist/components/forms/MultiStepForm.vue.d.ts +1 -1
  41. package/dist/components/forms/ReservationForm.vue.d.ts +1 -1
  42. package/dist/components/forms/_.vue.d.ts +4 -0
  43. package/dist/components/forms/_.vue.d.ts.map +1 -0
  44. package/dist/components/inputs/InputField.vue.d.ts +1 -1
  45. package/dist/components/inputs/grouped/CountryField.vue.d.ts +1 -1
  46. package/dist/components/listings/Base.vue.d.ts +1 -1
  47. package/dist/components/listings/Event.vue.d.ts +1 -1
  48. package/dist/components/listings/{Test.vue.d.ts → Hotel.vue.d.ts} +3 -3
  49. package/dist/components/listings/Hotel.vue.d.ts.map +1 -0
  50. package/dist/components/modals/Info.vue.d.ts +1 -1
  51. package/dist/components/skeletons/AvailabilitySkeleton.vue.d.ts +5 -0
  52. package/dist/components/skeletons/AvailabilitySkeleton.vue.d.ts.map +1 -0
  53. package/dist/components/{side-panels/Base.vue.d.ts → skeletons/Field.vue.d.ts} +3 -3
  54. package/dist/components/skeletons/Field.vue.d.ts.map +1 -0
  55. package/dist/components/skeletons/GiftCardSkeleton.vue.d.ts +5 -0
  56. package/dist/components/skeletons/GiftCardSkeleton.vue.d.ts.map +1 -0
  57. package/dist/components/skeletons/HotelSkeleton.vue.d.ts +5 -0
  58. package/dist/components/skeletons/HotelSkeleton.vue.d.ts.map +1 -0
  59. package/dist/components/skeletons/Listing.vue.d.ts +5 -0
  60. package/dist/components/skeletons/Listing.vue.d.ts.map +1 -0
  61. package/dist/components/skeletons/Sidebar.vue.d.ts +5 -0
  62. package/dist/components/skeletons/Sidebar.vue.d.ts.map +1 -0
  63. package/dist/components/skeletons/_.vue.d.ts +5 -0
  64. package/dist/components/skeletons/_.vue.d.ts.map +1 -0
  65. package/dist/components/views/CheckoutWindow.vue.d.ts +1 -1
  66. package/dist/components/views/TermsOfService.vue.d.ts +1 -1
  67. package/dist/components/views/ThankYou.vue.d.ts +1 -1
  68. package/dist/entries/availability.d.ts +3 -2
  69. package/dist/entries/gift-card.d.ts +1 -2
  70. package/dist/entries/hotel.d.ts +0 -2
  71. package/dist/event-4662e27c.cjs +1 -0
  72. package/dist/{event-a70cffeb.js → event-e08d0178.js} +101 -101
  73. package/dist/event-e08d0178.js.br +0 -0
  74. package/dist/event.cjs +1 -0
  75. package/dist/event.js +563 -0
  76. package/dist/event.js.br +0 -0
  77. package/dist/gift-card-validation.cjs +1 -0
  78. package/dist/gift-card-validation.js +116 -0
  79. package/dist/gift-card-validation.js.br +0 -0
  80. package/dist/gift-card.cjs +1 -0
  81. package/dist/gift-card.d.ts +0 -2
  82. package/dist/gift-card.js +502 -0
  83. package/dist/gift-card.js.br +0 -0
  84. package/dist/hotel.cjs +19 -0
  85. package/dist/hotel.d.ts +0 -2
  86. package/dist/hotel.js +2967 -0
  87. package/dist/hotel.js.br +0 -0
  88. package/dist/index-a46a0876.cjs +1 -0
  89. package/dist/{index-00262c16.js → index-c28f52d1.js} +32 -16
  90. package/dist/index-c28f52d1.js.br +0 -0
  91. package/dist/layouts/Availability.vue.d.ts +20 -242
  92. package/dist/layouts/Event.vue.d.ts +16 -242
  93. package/dist/layouts/GiftCard.vue.d.ts +31 -251
  94. package/dist/layouts/GiftCardValidation.vue.d.ts +16 -226
  95. package/dist/layouts/Hotel.vue.d.ts +36 -276
  96. package/dist/layouts/_.vue.d.ts +31 -20
  97. package/dist/polyfill.cjs +4 -0
  98. package/dist/polyfill.js +6826 -0
  99. package/dist/polyfill.js.br +0 -0
  100. package/dist/store/availability.d.ts +5 -2
  101. package/dist/store/giftCard.d.ts +3 -3
  102. package/dist/store/hotel.d.ts +318 -204
  103. package/dist/store/tracking.d.ts +6 -14
  104. package/dist/store/utilities.d.ts +87 -81
  105. package/dist/style.css +1 -1
  106. package/dist/style.css.br +0 -0
  107. package/dist/types/index.d.ts +44 -8
  108. package/package.json +30 -40
  109. package/dist/ActionField-5ecfc9dc.js.br +0 -0
  110. package/dist/HotelAvailabilityForm-0cd1abda.cjs +0 -1
  111. package/dist/HotelAvailabilityForm-a7b6f17e.js +0 -97
  112. package/dist/HotelAvailabilityForm-a7b6f17e.js.br +0 -0
  113. package/dist/NumberField.vue_vue_type_style_index_0_lang-0b6d48f1.cjs +0 -793
  114. package/dist/NumberField.vue_vue_type_style_index_0_lang-ab747739.js +0 -16403
  115. package/dist/NumberField.vue_vue_type_style_index_0_lang-ab747739.js.br +0 -0
  116. package/dist/ReCaptchaVuePlugin-05b8ec39.js +0 -376
  117. package/dist/ReCaptchaVuePlugin-05b8ec39.js.br +0 -0
  118. package/dist/ReCaptchaVuePlugin-08ee5d62.cjs +0 -1
  119. package/dist/SelectField.vue_vue_type_style_index_0_lang-5bdd7db9.js +0 -10107
  120. package/dist/SelectField.vue_vue_type_style_index_0_lang-5bdd7db9.js.br +0 -0
  121. package/dist/SelectField.vue_vue_type_style_index_0_lang-5f1087dc.cjs +0 -56
  122. package/dist/ThankYou-1866d8db.js +0 -8547
  123. package/dist/ThankYou-1866d8db.js.br +0 -0
  124. package/dist/ThankYou-5741bcb6.cjs +0 -15
  125. package/dist/applyGiftCard-c5e4aaad.js.br +0 -0
  126. package/dist/applyGiftCard-d9ab3dcf.cjs +0 -1
  127. package/dist/availability.cjs.js +0 -1
  128. package/dist/availability.cjs.js.br +0 -0
  129. package/dist/availability.es.js +0 -183
  130. package/dist/availability.es.js.br +0 -0
  131. package/dist/components/LoadingBlock.vue.d.ts +0 -4
  132. package/dist/components/LoadingBlock.vue.d.ts.map +0 -1
  133. package/dist/components/listings/Test.vue.d.ts.map +0 -1
  134. package/dist/components/side-panels/Base.vue.d.ts.map +0 -1
  135. package/dist/components/side-panels/Hotel.vue.d.ts +0 -4
  136. package/dist/components/side-panels/Hotel.vue.d.ts.map +0 -1
  137. package/dist/event-39706438.cjs +0 -1
  138. package/dist/event-a70cffeb.js.br +0 -0
  139. package/dist/event.cjs.js +0 -1
  140. package/dist/event.cjs.js.br +0 -0
  141. package/dist/event.es.js +0 -645
  142. package/dist/event.es.js.br +0 -0
  143. package/dist/gift-card-validation.cjs.js +0 -1
  144. package/dist/gift-card-validation.cjs.js.br +0 -0
  145. package/dist/gift-card-validation.es.js +0 -170
  146. package/dist/gift-card-validation.es.js.br +0 -0
  147. package/dist/gift-card.cjs.js +0 -1
  148. package/dist/gift-card.cjs.js.br +0 -0
  149. package/dist/gift-card.es.js +0 -584
  150. package/dist/gift-card.es.js.br +0 -0
  151. package/dist/hotel.cjs.js +0 -19
  152. package/dist/hotel.cjs.js.br +0 -0
  153. package/dist/hotel.es.js +0 -2394
  154. package/dist/hotel.es.js.br +0 -0
  155. package/dist/index-00262c16.js.br +0 -0
  156. package/dist/index-58f3b0cc.cjs +0 -1
  157. package/dist/payment-9e219e9b.js.br +0 -0
  158. package/dist/payment-fbffaa6d.cjs +0 -2
  159. package/dist/polyfill.cjs.js +0 -4
  160. package/dist/polyfill.cjs.js.br +0 -0
  161. package/dist/polyfill.es.js +0 -6764
  162. package/dist/polyfill.es.js.br +0 -0
  163. /package/dist/{navigation.cjs.js → navigation.cjs} +0 -0
  164. /package/dist/{navigation.es.js → navigation.js} +0 -0
@@ -0,0 +1,116 @@
1
+ import { h as L, y as S, s as g, a as X, k as _, l as w, w as u, m as l, x as a, z as o, n as t, A as y, q as x, B as p, D as A, F as B, t as G, G as I, H as D, J as N, K as T, L as M, _ as H, M as P, N as U, P as $ } from "./SelectField.vue_vue_type_style_index_0_lang-c973d794.js";
2
+ import { u as b } from "./NumberField.vue_vue_type_script_setup_true_lang-a32b2a11.js";
3
+ import { A as F } from "./ActionField-68f65af4.js";
4
+ import "./TextField-8f6e5ef5.js";
5
+ import "./_commonjsHelpers-c5d32002.js";
6
+ const R = (s) => (T("data-v-5d5827dc"), s = s(), M(), s), q = ["innerHTML"], z = {
7
+ key: 0,
8
+ id: "fresh-booking-gift-card-validation-resume",
9
+ class: "fresh-booking-panel"
10
+ }, E = /* @__PURE__ */ R(() => /* @__PURE__ */ a("span", null, "Loading...", -1)), J = /* @__PURE__ */ L({
11
+ name: "GiftCardValidationLayout",
12
+ __name: "GiftCardValidation",
13
+ props: {
14
+ accessToken: {},
15
+ styling: {}
16
+ },
17
+ setup(s) {
18
+ const { t: e } = S(), {
19
+ voucher: r,
20
+ isValid: C,
21
+ amount: V,
22
+ expirationDate: h,
23
+ productName: k,
24
+ isLoading: d
25
+ } = g(b()), { currency: v } = g(X()), { apply: f } = b();
26
+ return (m, n) => (_(), w(N, null, {
27
+ default: u(() => [
28
+ l(D, {
29
+ id: "fresh-booking-gift-card-validation-module",
30
+ "access-token": m.accessToken,
31
+ type: "gift-card",
32
+ styling: m.styling
33
+ }, {
34
+ default: u(() => [
35
+ a("form", {
36
+ onSubmit: n[3] || (n[3] = I((i) => t(f)(), ["prevent"]))
37
+ }, [
38
+ a("h4", null, [
39
+ a("span", null, o(t(e)("giftCardValidation.title")), 1)
40
+ ]),
41
+ a("p", {
42
+ innerHTML: t(e)("giftCardValidation.description")
43
+ }, null, 8, q),
44
+ l(F, {
45
+ modelValue: t(r),
46
+ "onUpdate:modelValue": n[0] || (n[0] = (i) => y(r) ? r.value = i : null),
47
+ icon: "gift-card",
48
+ label: t(e)("booking.reservation.giftCardCode"),
49
+ buttonLabel: t(e)("giftCardValidation.submitButton"),
50
+ placeholder: "XXXXXXXX",
51
+ "is-loading": t(d),
52
+ "onUpdate:isLoading": n[1] || (n[1] = (i) => y(d) ? d.value = i : null),
53
+ onAction: n[2] || (n[2] = (i) => t(f)())
54
+ }, null, 8, ["modelValue", "label", "buttonLabel", "is-loading"]),
55
+ !t(d) && t(C) ? (_(), x("table", z, [
56
+ a("thead", null, [
57
+ a("tr", null, [
58
+ a("th", null, [
59
+ a("span", null, o(t(e)("giftCardValidation.giftCard")), 1),
60
+ l(p, {
61
+ icon: "gift-card",
62
+ type: "fas",
63
+ color: "header"
64
+ })
65
+ ]),
66
+ a("th", null, [
67
+ a("span", null, o(t(e)("giftCardValidation.balance")), 1),
68
+ l(p, {
69
+ icon: "money-bill",
70
+ type: "fas",
71
+ color: "header"
72
+ })
73
+ ]),
74
+ a("th", null, [
75
+ a("span", null, o(t(e)("giftCardValidation.expirationDate")), 1),
76
+ l(p, {
77
+ icon: "timer",
78
+ type: "fas",
79
+ color: "header"
80
+ })
81
+ ])
82
+ ])
83
+ ]),
84
+ a("tbody", null, [
85
+ a("tr", null, [
86
+ a("td", null, [
87
+ a("span", null, o(t(k)), 1)
88
+ ]),
89
+ a("td", null, [
90
+ a("span", null, o(t(A)(t(V), t(v))), 1)
91
+ ]),
92
+ a("td", null, [
93
+ a("span", null, o(t(B)(t(h))), 1)
94
+ ])
95
+ ])
96
+ ])
97
+ ])) : G("", !0)
98
+ ], 32)
99
+ ]),
100
+ _: 1
101
+ }, 8, ["access-token", "styling"])
102
+ ]),
103
+ fallback: u(() => [
104
+ E
105
+ ]),
106
+ _: 1
107
+ }));
108
+ }
109
+ });
110
+ const K = /* @__PURE__ */ H(J, [["__scopeId", "data-v-5d5827dc"]]), c = P({ components: { GiftCardValidation: K } }), j = U();
111
+ c.use(j);
112
+ c.use($);
113
+ c.mount("#konnectio-gift-card-validation-app");
114
+ export {
115
+ c as default
116
+ };
Binary file
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-2bf82818.cjs"),V=require("./index-a46a0876.cjs"),M=require("./_-3cff5490.cjs"),x=require("./TextField-528ca68c.cjs"),R=require("./Field-d926807f.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),g=e.useStorage("freshBookingName","",void 0,{serializer:e.StorageSerializers.string}),d=e.useStorage("freshBookingEmail","",void 0,{serializer:e.StorageSerializers.string}),c=e.useStorage("freshBookingPhone","",void 0,{serializer:e.StorageSerializers.string}),p=e.ref(""),F=e.ref(1),C=e.ref(!0),k=e.ref(""),s=e.ref({base64:"",type:"",name:""}),n=e.ref(void 0),i=e.ref(0),f=e.ref(!1),m=e.ref(0),h=e.computed(()=>t.value===e.GiftCardModuleState.InitialState||t.value===e.GiftCardModuleState.WaitingForResponse),B=e.computed(()=>t.value===e.GiftCardModuleState.ReadyToPay),v=e.computed(()=>t.value===e.GiftCardModuleState.PaymentSuccess),w=e.computed(()=>{const u={1:{label:e.i18n.t("giftCard.hotelType"),data:[]},2:{label:e.i18n.t("giftCard.restaurantType"),data:[]}},a=o.value.places;return a&&a.forEach(_=>{u[_.placeType].data.push(_)}),Object.fromEntries(Object.entries(u).filter(([,_])=>_.data.length>0))}),T=e.computed(()=>m.value!==0),b=e.computed(()=>{let u;if(T.value)u=w.value[m.value].data[0];else if(i.value!==0){const a=n.value,_=w.value[i.value].data;_.length===1?u=_[0]:a!==void 0&&_.forEach(z=>{String(z.id)===String(a)&&(u=z)})}return u}),E=e.computed(()=>!(!g.value||!d.value||!(c.value.length>=5)||!p.value||b.value===void 0)),q=e.computed(()=>!(t.value===e.GiftCardModuleState.InitialState&&f.value)),P=e.computed(()=>!!(t.value===e.GiftCardModuleState.WaitingForResponse&&f.value));async function N(){t.value=e.GiftCardModuleState.WaitingForResponse,f.value=!0,await e.axios.post("http://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:p.value,quantity:F.value,freeText:k.value,showPrice:C.value,contactName:g.value,contactEmail:d.value,contactPhone:c.value,imageBase64:e.b2a(s.value.base64),imageName:s.value.name,imageFormat:s.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.9"}}).then(u=>{t.value=e.GiftCardModuleState.ReadyToPay,f.value=!1,y({callback:()=>console.log("Callback!"),response:u.data})})}function r(u){u&&(m.value=u)}return{moduleState:t,name:g,email:d,phone:c,value:p,remark:k,showValue:C,quantity:F,media:s,placeId:n,placeType:i,showFormPage:h,showPaymentPage:B,showConfirmationPage:v,places:w,hasFilledForm:E,hasForcedPlaceType:T,isWaitingForResponse:P,isMetaDataAvailable:q,orderGiftCard:N,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=y,{t}=e.useI18n(),{display:g}=e.useAlertStore(),d=e.ref(),c=e.computed(()=>o.modelValue.base64!=="");function p(n){l("update:modelValue",n)}function F(){p({base64:"",name:"",type:""}),d.value&&(d.value.value="")}function C(){d.value&&d.value.click()}function k(n,i){const[f,m]=[n.name,n.type],h=new FileReader;h.onload=function(B){if(B.target){const v=B.target.result;i({base64:v,name:f,type:m})}else g({message:t("imageUploadError"),type:"error"})},h.readAsDataURL(n)}async function s(){let n;(n=d.value.files)instanceof FileList&&k(n[0],p)}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:d,type:"file",class:"hidden",accept:n.validation,single:"",onChange:i[0]||(i[0]=f=>s())},null,40,D),e.createBaseVNode("div",I,[e.createBaseVNode("ul",L,[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",A,[e.createVNode(e.Clickable,{label:e.unref(t)("uploadFile"),type:"button",icon:"upload","icon-color":n.iconColor,onClickEvent:i[1]||(i[1]=f=>C())},null,8,["label","icon-color"])])),c.value?(e.openBlock(),e.createElementBlock("li",W,[e.createVNode(e.Clickable,{label:e.unref(t)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":n.iconColor,onClickEvent:i[2]||(i[2]=f=>C())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("li",j,[e.createVNode(e.Clickable,{label:e.unref(t)("removeFile"),type:"button",icon:"trash-alt","icon-color":n.iconColor,onClickEvent:i[3]||(i[3]=f=>F())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:c.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:g,value:d,remark:c,showValue:p,quantity:F,media:C,placeId:k,placeType:s,showFormPage:n,showPaymentPage:i,showConfirmationPage:f,places:m,hasFilledForm:h,hasForcedPlaceType:B,isWaitingForResponse:v,isMetaDataAvailable:w}=e.storeToRefs(U()),{initialize:T,orderGiftCard:b}=U(),{isRecaptchaEnabled:E,currency:q}=e.storeToRefs(e.useUtilityStore());async function P(){await b()}return e.watch(s,()=>{k.value=void 0}),e.onMounted(()=>{T()}),(N,r)=>{const u=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":N.accessToken,"data-layout":N.layout,styling:N.styling,"sticky-container":""},{default:e.withCtx(()=>[e.unref(w)?(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(i)]]),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(g),"onUpdate:modelValue":r[2]||(r[2]=a=>e.isRef(g)?g.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(B)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",le,[e.unref(m)?(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(m),(a,_)=>(e.openBlock(),e.createElementBlock("li",{key:_},[e.createVNode(V.Checkbox,{modelValue:e.unref(s),"onUpdate:modelValue":r[3]||(r[3]=z=>e.isRef(s)?s.value=z:null),type:"radio",name:"placeType",val:_,label:a.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(m)[e.unref(s)]&&e.unref(m)[e.unref(s)].data.length>1?(e.openBlock(),e.createBlock(x._sfc_main,{key:0,modelValue:e.unref(k),"onUpdate:modelValue":r[4]||(r[4]=a=>e.isRef(k)?k.value=a:null),placeholder:e.unref(l)("giftCard.selectPlacePlaceholder"),options:e.unref(m)[e.unref(s)].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(d),"onUpdate:modelValue":r[5]||(r[5]=a=>e.isRef(d)?d.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(p),"onUpdate:modelValue":r[6]||(r[6]=a=>e.isRef(p)?p.value=a:null),type:"checkbox",name:"showValue",label:e.unref(l)("giftCard.showValue"),checked:e.unref(p)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createCommentVNode("",!0)])],512),[[e.vShow,e.unref(n)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("div",{innerHTML:e.unref(l)("giftCard.thankYou")},null,8,ie)],512),[[e.vShow,e.unref(f)]])]),N.layout!=="minimal"&&e.unref(n)?(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(h),"is-loading":e.unref(v),"onUpdate:isLoading":r[9]||(r[9]=a=>e.isRef(v)?v.value=a:null),onClickEvent:P},null,8,["label","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(n)?(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(x.TextField,{modelValue:e.unref(c),"onUpdate:modelValue":r[10]||(r[10]=a=>e.isRef(c)?c.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(n)?e.withDirectives((e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(h),"data-test":"orderGiftCard","is-loading":e.unref(v),"onUpdate:isLoading":r[11]||(r[11]=a=>e.isRef(v)?v.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)]])])),[[u]]):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(),S=e.createApp({components:{GiftCard:me}});S.use(_e);S.use(e.instance);S.use(ve);S.use(V.StickyPlugin);S.use(V.install,{bootstrap:!1});S.mount("#konnectio-gift-card-app");
@@ -1,3 +1 @@
1
1
  export * from './entries/gift-card'
2
- import _default from './entries/gift-card'
3
- export default _default
@@ -0,0 +1,502 @@
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 re, k as d, l as L, w as j, x as s, q as f, m as r, n as e, C as x, t as k, v as se, 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-c973d794.js";
2
+ import { a as Se, P as we, C as le, _ as ze, S as Te, i as $e } from "./index-c28f52d1.js";
3
+ import { u as Ue, E as qe } from "./_-734c9d50.js";
4
+ import { T as H, _ as Re } from "./TextField-8f6e5ef5.js";
5
+ import { F as M } from "./Field-b76d82cb.js";
6
+ import "./_commonjsHelpers-c5d32002.js";
7
+ const te = ue("giftCard", () => {
8
+ ne();
9
+ const { pay: z } = Ue(), { bearerToken: t, metaData: o } = Q(ie()), a = b(w.InitialState), P = J("freshBookingName", "", void 0, { serializer: Y.string }), c = J("freshBookingEmail", "", void 0, { serializer: Y.string }), v = J("freshBookingPhone", "", void 0, { serializer: Y.string }), h = b(""), B = b(1), U = b(!0), S = b(""), p = b({
10
+ base64: "",
11
+ type: "",
12
+ name: ""
13
+ }), n = b(void 0), u = b(0), g = b(!1), y = b(0), T = F(() => a.value === w.InitialState || a.value === w.WaitingForResponse), q = F(() => a.value === w.ReadyToPay), C = F(() => a.value === w.PaymentSuccess), G = F(() => {
14
+ const m = {
15
+ 1: {
16
+ label: Z.t("giftCard.hotelType"),
17
+ data: []
18
+ },
19
+ 2: {
20
+ label: Z.t("giftCard.restaurantType"),
21
+ data: []
22
+ }
23
+ }, l = o.value.places;
24
+ return l && l.forEach((_) => {
25
+ m[_.placeType].data.push(_);
26
+ }), Object.fromEntries(
27
+ Object.entries(m).filter(([, _]) => _.data.length > 0)
28
+ );
29
+ }), D = F(() => y.value !== 0), $ = F(() => {
30
+ let m;
31
+ if (D.value)
32
+ m = G.value[y.value].data[0];
33
+ else if (u.value !== 0) {
34
+ const l = n.value, _ = G.value[u.value].data;
35
+ _.length === 1 ? m = _[0] : l !== void 0 && _.forEach((N) => {
36
+ String(N.id) === String(l) && (m = N);
37
+ });
38
+ }
39
+ return m;
40
+ }), O = F(() => !(!P.value || !c.value || !(v.value.length >= 5) || !h.value || $.value === void 0)), K = F(() => !(a.value === w.InitialState && g.value)), A = F(() => !!(a.value === w.WaitingForResponse && g.value));
41
+ async function R() {
42
+ a.value = w.WaitingForResponse, g.value = !0, await ce.post("http://stage.hotel_service.konnectio.dk/api/gift-card/create", {
43
+ termsOfserviceURL: "https://freshbooking.dk",
44
+ checkoutUrl: "https://freshbooking.dk",
45
+ currencyID: o.value.currency.id,
46
+ language: pe(),
47
+ amount: h.value,
48
+ quantity: B.value,
49
+ freeText: S.value,
50
+ showPrice: U.value,
51
+ contactName: P.value,
52
+ contactEmail: c.value,
53
+ contactPhone: v.value,
54
+ imageBase64: me(p.value.base64),
55
+ imageName: p.value.name,
56
+ imageFormat: p.value.type,
57
+ placeType: $.value ? $.value.placeType : void 0,
58
+ placeID: $.value ? $.value.id : void 0
59
+ }, {
60
+ headers: {
61
+ Authorization: t.value,
62
+ Accept: "application/json",
63
+ "Fresh-Booking-Ver": "4.0.9"
64
+ }
65
+ }).then((m) => {
66
+ a.value = w.ReadyToPay, g.value = !1, z({
67
+ callback: () => console.log("Callback!"),
68
+ response: m.data
69
+ });
70
+ });
71
+ }
72
+ function i(m) {
73
+ m && (y.value = m);
74
+ }
75
+ return {
76
+ moduleState: a,
77
+ name: P,
78
+ email: c,
79
+ phone: v,
80
+ value: h,
81
+ remark: S,
82
+ showValue: U,
83
+ quantity: B,
84
+ media: p,
85
+ placeId: n,
86
+ placeType: u,
87
+ showFormPage: T,
88
+ showPaymentPage: q,
89
+ showConfirmationPage: C,
90
+ places: G,
91
+ hasFilledForm: O,
92
+ hasForcedPlaceType: D,
93
+ isWaitingForResponse: A,
94
+ isMetaDataAvailable: K,
95
+ orderGiftCard: R,
96
+ initialize: i
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({
99
+ __name: "MediaSelector",
100
+ props: {
101
+ modelValue: {},
102
+ validation: { default: "image/*" },
103
+ iconColor: { default: "#000" },
104
+ label: {},
105
+ required: { type: Boolean, default: !1 }
106
+ },
107
+ emits: ["update:modelValue"],
108
+ setup(z, { emit: t }) {
109
+ const o = z, { t: a } = re(), { display: P } = ne(), c = b(), v = F(() => o.modelValue.base64 !== "");
110
+ function h(n) {
111
+ t("update:modelValue", n);
112
+ }
113
+ function B() {
114
+ h({
115
+ base64: "",
116
+ name: "",
117
+ type: ""
118
+ }), c.value && (c.value.value = "");
119
+ }
120
+ function U() {
121
+ c.value && c.value.click();
122
+ }
123
+ function S(n, u) {
124
+ const [g, y] = [n.name, n.type], T = new FileReader();
125
+ T.onload = function(q) {
126
+ if (q.target) {
127
+ const C = q.target.result;
128
+ u({ base64: C, name: g, type: y });
129
+ } else
130
+ P({
131
+ message: a("imageUploadError"),
132
+ type: "error"
133
+ });
134
+ }, T.readAsDataURL(n);
135
+ }
136
+ async function p() {
137
+ let n;
138
+ (n = c.value.files) instanceof FileList && S(n[0], h);
139
+ }
140
+ return (n, u) => (d(), L(fe, {
141
+ label: n.label,
142
+ required: n.required,
143
+ type: "media"
144
+ }, {
145
+ default: j(() => [
146
+ s("div", Ee, [
147
+ s("input", {
148
+ ref_key: "fileInput",
149
+ ref: c,
150
+ type: "file",
151
+ class: "hidden",
152
+ accept: n.validation,
153
+ single: "",
154
+ onChange: u[0] || (u[0] = (g) => p())
155
+ }, null, 40, Be),
156
+ s("div", Ge, [
157
+ s("ul", Ie, [
158
+ v.value ? k("", !0) : (d(), f("li", Me, [
159
+ r(x, {
160
+ label: e(a)("uploadFile"),
161
+ type: "button",
162
+ icon: "upload",
163
+ "icon-color": n.iconColor,
164
+ onClickEvent: u[1] || (u[1] = (g) => U())
165
+ }, null, 8, ["label", "icon-color"])
166
+ ])),
167
+ v.value ? (d(), f("li", Le, [
168
+ r(x, {
169
+ label: e(a)("replaceFile"),
170
+ type: "button",
171
+ icon: "repeat-alt",
172
+ "icon-color": n.iconColor,
173
+ onClickEvent: u[2] || (u[2] = (g) => U())
174
+ }, null, 8, ["label", "icon-color"])
175
+ ])) : k("", !0),
176
+ v.value ? (d(), f("li", xe, [
177
+ r(x, {
178
+ label: e(a)("removeFile"),
179
+ type: "button",
180
+ icon: "trash-alt",
181
+ "icon-color": n.iconColor,
182
+ onClickEvent: u[3] || (u[3] = (g) => B())
183
+ }, null, 8, ["label", "icon-color"])
184
+ ])) : k("", !0)
185
+ ]),
186
+ s("div", {
187
+ class: se([
188
+ "media-selector-previewer",
189
+ { opened: v.value }
190
+ ])
191
+ }, [
192
+ n.modelValue ? (d(), f("img", {
193
+ key: 0,
194
+ src: n.modelValue.base64
195
+ }, null, 8, De)) : k("", !0)
196
+ ], 2)
197
+ ])
198
+ ])
199
+ ]),
200
+ _: 1
201
+ }, 8, ["label", "required"]));
202
+ }
203
+ });
204
+ function oe(z) {
205
+ const t = z;
206
+ t.__i18n = t.__i18n || [], t.__i18n.push({
207
+ locale: "",
208
+ resource: {
209
+ da: {
210
+ uploadFile: (o) => {
211
+ const { normalize: a } = o;
212
+ return a(["Upload billede"]);
213
+ },
214
+ removeFile: (o) => {
215
+ const { normalize: a } = o;
216
+ return a(["Fjern billede"]);
217
+ },
218
+ replaceFile: (o) => {
219
+ const { normalize: a } = o;
220
+ return a(["Ersat billede"]);
221
+ },
222
+ imageUploadError: (o) => {
223
+ const { normalize: a } = o;
224
+ return a(["Der skete en fejl under billede upload!"]);
225
+ }
226
+ },
227
+ en: {
228
+ uploadFile: (o) => {
229
+ const { normalize: a } = o;
230
+ return a(["Upload image"]);
231
+ },
232
+ removeFile: (o) => {
233
+ const { normalize: a } = o;
234
+ return a(["Remove image"]);
235
+ },
236
+ replaceFile: (o) => {
237
+ const { normalize: a } = o;
238
+ return a(["Replace image"]);
239
+ },
240
+ imageUploadError: (o) => {
241
+ const { normalize: a } = o;
242
+ return a(["An error occurred under image upload!"]);
243
+ }
244
+ }
245
+ }
246
+ });
247
+ }
248
+ typeof oe == "function" && oe(Ae);
249
+ const Ne = { class: "gift-card-skeleton" }, We = { class: "gift-card-skeleton-form" }, He = /* @__PURE__ */ X({
250
+ __name: "GiftCardSkeleton",
251
+ setup(z) {
252
+ return (t, o) => (d(), f("div", Ne, [
253
+ s("div", We, [
254
+ r(M),
255
+ r(M),
256
+ r(M),
257
+ r(M),
258
+ r(M, { "is-text-area": "" }),
259
+ r(qe, { height: "44px" })
260
+ ])
261
+ ]));
262
+ }
263
+ });
264
+ const je = /* @__PURE__ */ de(He, [["__scopeId", "data-v-2600a731"]]), Oe = {
265
+ key: 0,
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 = {
268
+ key: 0,
269
+ id: "fresh-booking-select-place-type"
270
+ }, ea = {
271
+ class: /* @__PURE__ */ se(["fresh-booking-label", "required"])
272
+ }, aa = { id: "fresh-booking-select-place-type-input" }, la = ["innerHTML"], ta = {
273
+ key: 0,
274
+ id: "fresh-booking-gift-card-order"
275
+ }, oa = { class: "fresh-booking-panel" }, na = {
276
+ key: 1,
277
+ id: "fresh-booking-gift-card-remarks"
278
+ }, ia = {
279
+ key: 2,
280
+ id: "fresh-booking-gift-card-order-minimal",
281
+ "sticky-side": "bottom"
282
+ }, ra = { id: "fresh-booking-gift-card-recaptcha" }, sa = /* @__PURE__ */ X({
283
+ name: "GiftCardLayout",
284
+ __name: "GiftCard",
285
+ props: {
286
+ accessToken: {},
287
+ layout: { default: "minimal" },
288
+ placeType: {},
289
+ styling: {}
290
+ },
291
+ setup(z) {
292
+ const { t } = re(), {
293
+ name: o,
294
+ email: a,
295
+ phone: P,
296
+ value: c,
297
+ remark: v,
298
+ showValue: h,
299
+ quantity: B,
300
+ media: U,
301
+ placeId: S,
302
+ placeType: p,
303
+ showFormPage: n,
304
+ showPaymentPage: u,
305
+ showConfirmationPage: g,
306
+ places: y,
307
+ hasFilledForm: T,
308
+ hasForcedPlaceType: q,
309
+ isWaitingForResponse: C,
310
+ isMetaDataAvailable: G
311
+ } = Q(te()), { initialize: D, orderGiftCard: $ } = te(), { isRecaptchaEnabled: O, currency: K } = Q(ie());
312
+ async function A() {
313
+ await $();
314
+ }
315
+ return ve(p, () => {
316
+ S.value = void 0;
317
+ }), ge(() => {
318
+ D();
319
+ }), (R, i) => {
320
+ const m = he("sticky");
321
+ return d(), L(ke, null, {
322
+ default: j(() => [
323
+ r(be, {
324
+ id: "fresh-booking-gift-card-module",
325
+ type: "gift-card",
326
+ "access-token": R.accessToken,
327
+ "data-layout": R.layout,
328
+ styling: R.styling,
329
+ "sticky-container": ""
330
+ }, {
331
+ default: j(() => [
332
+ e(G) ? (d(), f("div", Oe, [
333
+ s("h4", Ke, [
334
+ s("span", null, ee(e(t)("giftCard.title")), 1)
335
+ ]),
336
+ s("div", Je, [
337
+ I(s("div", Ye, [
338
+ r(Se)
339
+ ], 512), [
340
+ [W, e(u)]
341
+ ]),
342
+ I(s("div", null, [
343
+ s("p", {
344
+ id: "fresh-booking-gift-card-description",
345
+ innerHTML: e(t)("giftCard.description")
346
+ }, null, 8, Qe),
347
+ s("form", null, [
348
+ r(H, {
349
+ modelValue: e(o),
350
+ "onUpdate:modelValue": i[0] || (i[0] = (l) => V(o) ? o.value = l : null),
351
+ type: "text",
352
+ name: "name",
353
+ autocomplete: "name",
354
+ label: e(t)("giftCard.name"),
355
+ icon: "user-alt",
356
+ placeholder: e(t)("giftCard.namePlaceholder"),
357
+ required: ""
358
+ }, null, 8, ["modelValue", "label", "placeholder"]),
359
+ r(H, {
360
+ modelValue: e(a),
361
+ "onUpdate:modelValue": i[1] || (i[1] = (l) => V(a) ? a.value = l : null),
362
+ type: "email",
363
+ name: "email",
364
+ autocomplete: "email",
365
+ label: e(t)("giftCard.email"),
366
+ icon: "at",
367
+ placeholder: e(t)("giftCard.emailPlaceholder"),
368
+ required: ""
369
+ }, null, 8, ["modelValue", "label", "placeholder"]),
370
+ r(we, {
371
+ modelValue: e(P),
372
+ "onUpdate:modelValue": i[2] || (i[2] = (l) => V(P) ? P.value = l : null),
373
+ icon: "phone-office",
374
+ label: e(t)("giftCard.phone"),
375
+ placeholder: e(t)("giftCard.phonePlaceholder"),
376
+ required: ""
377
+ }, null, 8, ["modelValue", "label", "placeholder"]),
378
+ e(q) ? k("", !0) : (d(), f("div", Xe, [
379
+ e(y) ? (d(), f("div", Ze, [
380
+ s("label", ea, [
381
+ s("span", null, ee(e(t)("giftCard.selectType")), 1)
382
+ ]),
383
+ s("div", aa, [
384
+ s("ul", null, [
385
+ (d(!0), f(ye, null, _e(e(y), (l, _) => (d(), f("li", { key: _ }, [
386
+ r(le, {
387
+ modelValue: e(p),
388
+ "onUpdate:modelValue": i[3] || (i[3] = (N) => V(p) ? p.value = N : null),
389
+ type: "radio",
390
+ name: "placeType",
391
+ val: _,
392
+ label: l.label
393
+ }, null, 8, ["modelValue", "val", "label"])
394
+ ]))), 128))
395
+ ]),
396
+ e(y)[e(p)] && e(y)[e(p)].data.length > 1 ? (d(), L(Re, {
397
+ key: 0,
398
+ modelValue: e(S),
399
+ "onUpdate:modelValue": i[4] || (i[4] = (l) => V(S) ? S.value = l : null),
400
+ placeholder: e(t)("giftCard.selectPlacePlaceholder"),
401
+ options: e(y)[e(p)].data,
402
+ labelKey: "name",
403
+ valueKey: "id",
404
+ required: ""
405
+ }, null, 8, ["modelValue", "placeholder", "options"])) : k("", !0)
406
+ ])
407
+ ])) : (d(), L(ae, { key: 1 }))
408
+ ])),
409
+ r(H, {
410
+ modelValue: e(c),
411
+ "onUpdate:modelValue": i[5] || (i[5] = (l) => V(c) ? c.value = l : null),
412
+ type: "number",
413
+ name: "value",
414
+ label: e(t)("giftCard.value"),
415
+ icon: "money-bill",
416
+ placeholder: e(t)("giftCard.valuePlaceholder"),
417
+ suffix: e(K),
418
+ required: ""
419
+ }, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
420
+ r(le, {
421
+ modelValue: e(h),
422
+ "onUpdate:modelValue": i[6] || (i[6] = (l) => V(h) ? h.value = l : null),
423
+ type: "checkbox",
424
+ name: "showValue",
425
+ label: e(t)("giftCard.showValue"),
426
+ checked: e(h)
427
+ }, null, 8, ["modelValue", "label", "checked"]),
428
+ k("", !0),
429
+ k("", !0)
430
+ ])
431
+ ], 512), [
432
+ [W, e(n)]
433
+ ]),
434
+ I(s("div", null, [
435
+ s("div", {
436
+ innerHTML: e(t)("giftCard.thankYou")
437
+ }, null, 8, la)
438
+ ], 512), [
439
+ [W, e(g)]
440
+ ])
441
+ ]),
442
+ R.layout !== "minimal" && e(n) ? (d(), f("div", ta, [
443
+ s("div", oa, [
444
+ r(x, {
445
+ label: e(t)("giftCard.orderGiftCard"),
446
+ "full-width": !0,
447
+ disabled: !e(T),
448
+ "is-loading": e(C),
449
+ "onUpdate:isLoading": i[9] || (i[9] = (l) => V(C) ? C.value = l : null),
450
+ onClickEvent: A
451
+ }, null, 8, ["label", "disabled", "is-loading"])
452
+ ])
453
+ ])) : k("", !0),
454
+ e(n) ? (d(), f("div", na, [
455
+ r(H, {
456
+ modelValue: e(v),
457
+ "onUpdate:modelValue": i[10] || (i[10] = (l) => V(v) ? v.value = l : null),
458
+ type: "textarea",
459
+ name: "remark",
460
+ label: e(t)("giftCard.remark"),
461
+ icon: "info-circle",
462
+ placeholder: e(t)("giftCard.remarkPlaceholder")
463
+ }, null, 8, ["modelValue", "label", "placeholder"])
464
+ ])) : k("", !0),
465
+ e(n) ? I((d(), f("div", ia, [
466
+ r(x, {
467
+ label: e(t)("giftCard.orderGiftCard"),
468
+ "full-width": !0,
469
+ disabled: !e(T),
470
+ "data-test": "orderGiftCard",
471
+ "is-loading": e(C),
472
+ "onUpdate:isLoading": i[11] || (i[11] = (l) => V(C) ? C.value = l : null),
473
+ onClickEvent: A
474
+ }, null, 8, ["label", "disabled", "is-loading"]),
475
+ I(s("div", ra, [
476
+ r(ze)
477
+ ], 512), [
478
+ [W, e(O)]
479
+ ])
480
+ ])), [
481
+ [m]
482
+ ]) : k("", !0)
483
+ ])) : (d(), L(ae, { key: 1 }))
484
+ ]),
485
+ _: 1
486
+ }, 8, ["access-token", "data-layout", "styling"])
487
+ ]),
488
+ fallback: j(() => [
489
+ r(je)
490
+ ]),
491
+ _: 1
492
+ });
493
+ };
494
+ }
495
+ });
496
+ const da = /* @__PURE__ */ de(sa, [["__scopeId", "data-v-e4aa1e4c"]]), ua = Ce(), ca = Ve(), E = Fe({ components: { GiftCard: da } });
497
+ E.use(ua);
498
+ E.use(Pe);
499
+ E.use(ca);
500
+ E.use(Te);
501
+ E.use($e, { bootstrap: !1 });
502
+ E.mount("#konnectio-gift-card-app");
Binary file