@konnectio/core 4.0.15 → 4.0.17
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.
- package/dist/ActionField-3184bffd.cjs +1 -0
- package/dist/ActionField-82ef422e.js +164 -0
- package/dist/ActionField-82ef422e.js.br +0 -0
- package/dist/AvailabilitySkeleton-528d40ef.cjs +1 -0
- package/dist/AvailabilitySkeleton-ec092c09.js +203 -0
- package/dist/AvailabilitySkeleton-ec092c09.js.br +0 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-5692c5b2.cjs +5 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-d5a1efd5.js +8873 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-d5a1efd5.js.br +0 -0
- package/dist/{Field-2fb37b34.js → Field-7137ef85.js} +12 -11
- package/dist/Field-7137ef85.js.br +0 -0
- package/dist/Field-b1690485.cjs +1 -0
- package/dist/NumberField.vue_vue_type_style_index_0_lang-8c28c1dd.cjs +1 -0
- package/dist/NumberField.vue_vue_type_style_index_0_lang-eebde8cd.js +194 -0
- package/dist/NumberField.vue_vue_type_style_index_0_lang-eebde8cd.js.br +0 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-5e1192e9.js +19741 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-5e1192e9.js.br +0 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-c0715ca3.cjs +850 -0
- package/dist/{ThankYou-a44a3589.js → ThankYou-433bd249.js} +429 -428
- package/dist/ThankYou-433bd249.js.br +0 -0
- package/dist/ThankYou-817b93d0.cjs +54 -0
- package/dist/{_-6e32ea4d.js → _-048b5217.js} +17 -16
- package/dist/_-048b5217.js.br +0 -0
- package/dist/_-120d9090.cjs +1 -0
- package/dist/_commonjsHelpers-10dfc225.js +8 -0
- package/dist/_commonjsHelpers-87b0abe8.cjs +1 -0
- package/dist/applyGiftCard-45cf782e.js +54 -0
- package/dist/applyGiftCard-45cf782e.js.br +0 -0
- package/dist/applyGiftCard-f1b620cc.cjs +1 -0
- package/dist/availability.cjs +2 -2
- package/dist/availability.d.ts +2 -0
- package/dist/availability.js +70 -61
- package/dist/availability.js.br +0 -0
- package/dist/components/Clickable.vue.d.ts +1 -1
- package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +1 -1
- package/dist/components/forms/ReservationForm.vue.d.ts +1 -1
- package/dist/components/listings/Base.vue.d.ts +1 -1
- package/dist/components/listings/Hotel.vue.d.ts +1 -1
- package/dist/components/skeletons/HotelSkeleton.vue.d.ts +1 -1
- package/dist/entries/availability.d.ts +5 -1
- package/dist/{event-a09daadc.js → event-3ef40faf.js} +30 -29
- package/dist/event-3ef40faf.js.br +0 -0
- package/dist/event-d531df9d.cjs +1 -0
- package/dist/event.cjs +1 -1
- package/dist/event.js +236 -235
- package/dist/event.js.br +0 -0
- package/dist/gift-card-validation.cjs +1 -1
- package/dist/gift-card-validation.js +55 -54
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card.cjs +1 -1
- package/dist/gift-card.js +188 -187
- package/dist/gift-card.js.br +0 -0
- package/dist/hotel.cjs +5 -5
- package/dist/hotel.js +1399 -1414
- package/dist/hotel.js.br +0 -0
- package/dist/{index-84c4adc0.js → index-36d9ed45.js} +16 -15
- package/dist/index-36d9ed45.js.br +0 -0
- package/dist/index-8309eba2.cjs +1 -0
- package/dist/layouts/Availability.vue.d.ts +7 -4
- package/dist/polyfill.cjs +2 -2
- package/dist/polyfill.js +2 -2
- package/dist/polyfill.js.br +0 -0
- package/dist/style.css +1 -1
- package/dist/style.css.br +0 -0
- package/package.json +14 -14
- package/dist/ActionField-bcecb3ad.cjs +0 -1
- package/dist/ActionField-d82454ed.js +0 -101
- package/dist/ActionField-d82454ed.js.br +0 -0
- package/dist/AvailabilitySkeleton-120dbd72.cjs +0 -1
- package/dist/AvailabilitySkeleton-9e34fdd6.js +0 -190
- package/dist/AvailabilitySkeleton-9e34fdd6.js.br +0 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-6f00c90f.cjs +0 -5
- package/dist/DateField.vue_vue_type_style_index_0_lang-a494ebda.js +0 -10010
- package/dist/DateField.vue_vue_type_style_index_0_lang-a494ebda.js.br +0 -0
- package/dist/Field-11498556.cjs +0 -1
- package/dist/Field-2fb37b34.js.br +0 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-21318607.js +0 -116
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-21318607.js.br +0 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-e92e7311.cjs +0 -1
- package/dist/SelectField.vue_vue_type_style_index_0_lang-354a8ba7.cjs +0 -802
- package/dist/SelectField.vue_vue_type_style_index_0_lang-a75b8f32.js +0 -19520
- package/dist/SelectField.vue_vue_type_style_index_0_lang-a75b8f32.js.br +0 -0
- package/dist/TextField-46d88ef6.js +0 -9271
- package/dist/TextField-46d88ef6.js.br +0 -0
- package/dist/TextField-afd7af9b.cjs +0 -54
- package/dist/ThankYou-a44a3589.js.br +0 -0
- package/dist/ThankYou-e988ffbe.cjs +0 -54
- package/dist/_-0e8547fb.cjs +0 -1
- package/dist/_-6e32ea4d.js.br +0 -0
- package/dist/_commonjsHelpers-6763f629.cjs +0 -1
- package/dist/_commonjsHelpers-c5d32002.js +0 -30
- package/dist/event-a09daadc.js.br +0 -0
- package/dist/event-d85117b3.cjs +0 -1
- package/dist/index-3a59acc2.cjs +0 -1
- package/dist/index-84c4adc0.js.br +0 -0
package/dist/event.js.br
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";const e=require("vue"),t=require("./SelectField.vue_vue_type_style_index_0_lang-c0715ca3.cjs"),u=require("./applyGiftCard-f1b620cc.cjs"),y=require("./ActionField-3184bffd.cjs");require("./_commonjsHelpers-87b0abe8.cjs");require("./NumberField.vue_vue_type_style_index_0_lang-8c28c1dd.cjs");const _=l=>(e.pushScopeId("data-v-5d5827dc"),l=l(),e.popScopeId(),l),N=["innerHTML"],E={key:0,id:"fresh-booking-gift-card-validation-resume",class:"fresh-booking-panel"},C=_(()=>e.createElementVNode("span",null,"Loading...",-1)),b=e.defineComponent({name:"GiftCardValidationLayout",__name:"GiftCardValidation",props:{accessToken:{},styling:{}},setup(l){const{t:o}=t.useI18n(),{voucher:d,isValid:p,amount:f,expirationDate:m,productName:V,isLoading:i}=t.storeToRefs(u.useApplyGiftCardStore()),{currency:g}=t.storeToRefs(t.useUtilityStore()),{apply:s}=u.useApplyGiftCardStore();return(c,n)=>(e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(t._sfc_main,{id:"fresh-booking-gift-card-validation-module","access-token":c.accessToken,type:"gift-card",styling:c.styling},{default:e.withCtx(()=>[e.createElementVNode("form",{onSubmit:n[3]||(n[3]=e.withModifiers(a=>e.unref(s)(),["prevent"]))},[e.createElementVNode("h4",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("giftCardValidation.title")),1)]),e.createElementVNode("p",{innerHTML:e.unref(o)("giftCardValidation.description")},null,8,N),e.createVNode(y.ActionField,{modelValue:e.unref(d),"onUpdate:modelValue":n[0]||(n[0]=a=>e.isRef(d)?d.value=a:null),icon:"gift-card",label:e.unref(o)("booking.reservation.giftCardCode"),buttonLabel:e.unref(o)("giftCardValidation.submitButton"),placeholder:"XXXXXXXX","is-loading":e.unref(i),"onUpdate:isLoading":n[1]||(n[1]=a=>e.isRef(i)?i.value=a:null),onAction:n[2]||(n[2]=a=>e.unref(s)())},null,8,["modelValue","label","buttonLabel","is-loading"]),!e.unref(i)&&e.unref(p)?(e.openBlock(),e.createElementBlock("table",E,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("giftCardValidation.giftCard")),1),e.createVNode(t.Icon,{icon:"gift-card",type:"fas",color:"header"})]),e.createElementVNode("th",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("giftCardValidation.balance")),1),e.createVNode(t.Icon,{icon:"money-bill",type:"fas",color:"header"})]),e.createElementVNode("th",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("giftCardValidation.expirationDate")),1),e.createVNode(t.Icon,{icon:"timer",type:"fas",color:"header"})])])]),e.createElementVNode("tbody",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(V)),1)]),e.createElementVNode("td",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(t.showPrice)(e.unref(f),e.unref(g))),1)]),e.createElementVNode("td",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(t.showDate)(e.unref(m))),1)])])])])):e.createCommentVNode("",!0)],32)]),_:1},8,["access-token","styling"])]),fallback:e.withCtx(()=>[C]),_:1}))}});const h=t._export_sfc(b,[["__scopeId","data-v-5d5827dc"]]),r=e.createApp({components:{GiftCardValidation:h}}),v=t.createPinia();r.use(v);r.use(t.instance);r.mount("#konnectio-gift-card-validation-app");module.exports=r;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
|
|
1
|
+
import { defineComponent as L, openBlock as g, createBlock as S, Suspense as X, withCtx as p, createVNode as l, createElementVNode as t, withModifiers as I, unref as a, toDisplayString as o, isRef as _, createElementBlock as w, createCommentVNode as x, pushScopeId as A, popScopeId as G, createApp as T } from "vue";
|
|
2
|
+
import { f as B, s as y, a as D, h as N, I as u, j as M, k as U, _ as $, l as E, m as H } from "./SelectField.vue_vue_type_style_index_0_lang-5e1192e9.js";
|
|
3
|
+
import { u as b } from "./applyGiftCard-45cf782e.js";
|
|
4
|
+
import { A as P } from "./ActionField-82ef422e.js";
|
|
5
|
+
import "./_commonjsHelpers-10dfc225.js";
|
|
6
|
+
import "./NumberField.vue_vue_type_style_index_0_lang-eebde8cd.js";
|
|
7
|
+
const R = (s) => (A("data-v-5d5827dc"), s = s(), G(), s), j = ["innerHTML"], F = {
|
|
7
8
|
key: 0,
|
|
8
9
|
id: "fresh-booking-gift-card-validation-resume",
|
|
9
10
|
class: "fresh-booking-panel"
|
|
10
|
-
},
|
|
11
|
+
}, q = /* @__PURE__ */ R(() => /* @__PURE__ */ t("span", null, "Loading...", -1)), z = /* @__PURE__ */ L({
|
|
11
12
|
name: "GiftCardValidationLayout",
|
|
12
13
|
__name: "GiftCardValidation",
|
|
13
14
|
props: {
|
|
@@ -15,65 +16,65 @@ const R = (s) => (T("data-v-5d5827dc"), s = s(), M(), s), q = ["innerHTML"], z =
|
|
|
15
16
|
styling: {}
|
|
16
17
|
},
|
|
17
18
|
setup(s) {
|
|
18
|
-
const { t: e } =
|
|
19
|
+
const { t: e } = B(), {
|
|
19
20
|
voucher: r,
|
|
20
21
|
isValid: C,
|
|
21
22
|
amount: V,
|
|
22
23
|
expirationDate: h,
|
|
23
24
|
productName: k,
|
|
24
25
|
isLoading: d
|
|
25
|
-
} =
|
|
26
|
-
return (m, n) => (
|
|
27
|
-
default:
|
|
28
|
-
l(
|
|
26
|
+
} = y(b()), { currency: v } = y(D()), { apply: f } = b();
|
|
27
|
+
return (m, n) => (g(), S(X, null, {
|
|
28
|
+
default: p(() => [
|
|
29
|
+
l(N, {
|
|
29
30
|
id: "fresh-booking-gift-card-validation-module",
|
|
30
31
|
"access-token": m.accessToken,
|
|
31
32
|
type: "gift-card",
|
|
32
33
|
styling: m.styling
|
|
33
34
|
}, {
|
|
34
|
-
default:
|
|
35
|
-
|
|
36
|
-
onSubmit: n[3] || (n[3] = I((i) =>
|
|
35
|
+
default: p(() => [
|
|
36
|
+
t("form", {
|
|
37
|
+
onSubmit: n[3] || (n[3] = I((i) => a(f)(), ["prevent"]))
|
|
37
38
|
}, [
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
t("h4", null, [
|
|
40
|
+
t("span", null, o(a(e)("giftCardValidation.title")), 1)
|
|
40
41
|
]),
|
|
41
|
-
|
|
42
|
-
innerHTML:
|
|
43
|
-
}, null, 8,
|
|
44
|
-
l(
|
|
45
|
-
modelValue:
|
|
46
|
-
"onUpdate:modelValue": n[0] || (n[0] = (i) =>
|
|
42
|
+
t("p", {
|
|
43
|
+
innerHTML: a(e)("giftCardValidation.description")
|
|
44
|
+
}, null, 8, j),
|
|
45
|
+
l(P, {
|
|
46
|
+
modelValue: a(r),
|
|
47
|
+
"onUpdate:modelValue": n[0] || (n[0] = (i) => _(r) ? r.value = i : null),
|
|
47
48
|
icon: "gift-card",
|
|
48
|
-
label:
|
|
49
|
-
buttonLabel:
|
|
49
|
+
label: a(e)("booking.reservation.giftCardCode"),
|
|
50
|
+
buttonLabel: a(e)("giftCardValidation.submitButton"),
|
|
50
51
|
placeholder: "XXXXXXXX",
|
|
51
|
-
"is-loading":
|
|
52
|
-
"onUpdate:isLoading": n[1] || (n[1] = (i) =>
|
|
53
|
-
onAction: n[2] || (n[2] = (i) =>
|
|
52
|
+
"is-loading": a(d),
|
|
53
|
+
"onUpdate:isLoading": n[1] || (n[1] = (i) => _(d) ? d.value = i : null),
|
|
54
|
+
onAction: n[2] || (n[2] = (i) => a(f)())
|
|
54
55
|
}, null, 8, ["modelValue", "label", "buttonLabel", "is-loading"]),
|
|
55
|
-
!
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
l(
|
|
56
|
+
!a(d) && a(C) ? (g(), w("table", F, [
|
|
57
|
+
t("thead", null, [
|
|
58
|
+
t("tr", null, [
|
|
59
|
+
t("th", null, [
|
|
60
|
+
t("span", null, o(a(e)("giftCardValidation.giftCard")), 1),
|
|
61
|
+
l(u, {
|
|
61
62
|
icon: "gift-card",
|
|
62
63
|
type: "fas",
|
|
63
64
|
color: "header"
|
|
64
65
|
})
|
|
65
66
|
]),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
l(
|
|
67
|
+
t("th", null, [
|
|
68
|
+
t("span", null, o(a(e)("giftCardValidation.balance")), 1),
|
|
69
|
+
l(u, {
|
|
69
70
|
icon: "money-bill",
|
|
70
71
|
type: "fas",
|
|
71
72
|
color: "header"
|
|
72
73
|
})
|
|
73
74
|
]),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
l(
|
|
75
|
+
t("th", null, [
|
|
76
|
+
t("span", null, o(a(e)("giftCardValidation.expirationDate")), 1),
|
|
77
|
+
l(u, {
|
|
77
78
|
icon: "timer",
|
|
78
79
|
type: "fas",
|
|
79
80
|
color: "header"
|
|
@@ -81,35 +82,35 @@ const R = (s) => (T("data-v-5d5827dc"), s = s(), M(), s), q = ["innerHTML"], z =
|
|
|
81
82
|
])
|
|
82
83
|
])
|
|
83
84
|
]),
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
t("tbody", null, [
|
|
86
|
+
t("tr", null, [
|
|
87
|
+
t("td", null, [
|
|
88
|
+
t("span", null, o(a(k)), 1)
|
|
88
89
|
]),
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
t("td", null, [
|
|
91
|
+
t("span", null, o(a(M)(a(V), a(v))), 1)
|
|
91
92
|
]),
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
t("td", null, [
|
|
94
|
+
t("span", null, o(a(U)(a(h))), 1)
|
|
94
95
|
])
|
|
95
96
|
])
|
|
96
97
|
])
|
|
97
|
-
])) :
|
|
98
|
+
])) : x("", !0)
|
|
98
99
|
], 32)
|
|
99
100
|
]),
|
|
100
101
|
_: 1
|
|
101
102
|
}, 8, ["access-token", "styling"])
|
|
102
103
|
]),
|
|
103
|
-
fallback:
|
|
104
|
-
|
|
104
|
+
fallback: p(() => [
|
|
105
|
+
q
|
|
105
106
|
]),
|
|
106
107
|
_: 1
|
|
107
108
|
}));
|
|
108
109
|
}
|
|
109
110
|
});
|
|
110
|
-
const
|
|
111
|
-
c.use(
|
|
112
|
-
c.use(
|
|
111
|
+
const J = /* @__PURE__ */ $(z, [["__scopeId", "data-v-5d5827dc"]]), c = T({ components: { GiftCardValidation: J } }), K = E();
|
|
112
|
+
c.use(K);
|
|
113
|
+
c.use(H);
|
|
113
114
|
c.mount("#konnectio-gift-card-validation-app");
|
|
114
115
|
export {
|
|
115
116
|
c as default
|
|
Binary file
|
package/dist/gift-card.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-354a8ba7.cjs"),V=require("./index-3a59acc2.cjs"),$=require("./_-0e8547fb.cjs"),P=require("./TextField-afd7af9b.cjs"),x=require("./Field-11498556.cjs");require("./_commonjsHelpers-6763f629.cjs");const U=e.defineStore("giftCard",()=>{e.useAlertStore();const{pay:y}=$.usePaymentStore(),{bearerToken:l,metaData:o}=e.storeToRefs(e.useUtilityStore()),t=e.ref(e.GiftCardModuleState.InitialState),p=e.useStorage("konnectio_name","",void 0,{serializer:e.StorageSerializers.string}),g=e.useStorage("konnectio_email","",void 0,{serializer:e.StorageSerializers.string}),c=e.useStorage("konnectio_phone","",void 0,{serializer:e.StorageSerializers.string}),f=e.ref(""),C=e.ref(1),w=e.ref(!0),v=e.ref(""),s=e.ref({base64:"",type:"",name:""}),k=e.ref(void 0),n=e.ref(0),i=e.ref(!1),d=e.ref(0),B=e.computed(()=>t.value===e.GiftCardModuleState.InitialState||t.value===e.GiftCardModuleState.WaitingForResponse),S=e.computed(()=>t.value===e.GiftCardModuleState.ReadyToPay),m=e.computed(()=>t.value===e.GiftCardModuleState.PaymentSuccess),h=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))}),R=e.computed(()=>d.value!==0),b=e.computed(()=>{let u;if(R.value)u=h.value[d.value].data[0];else if(n.value!==0){const a=k.value,_=h.value[n.value].data;_.length===1?u=_[0]:a!==void 0&&_.forEach(z=>{String(z.id)===String(a)&&(u=z)})}return u}),E=e.computed(()=>!(!p.value||!g.value||!(c.value.length>=5)||!f.value||b.value===void 0)),q=e.computed(()=>!(t.value===e.GiftCardModuleState.InitialState&&i.value)),T=e.computed(()=>!!(t.value===e.GiftCardModuleState.WaitingForResponse&&i.value));async function N(){t.value=e.GiftCardModuleState.WaitingForResponse,i.value=!0,await e.axios.post("https://stage.hotel-service.konnectio.dk/api/gift-card/create",{termsOfserviceURL:"https://freshbooking.dk",checkoutUrl:"https://freshbooking.dk",currencyID:o.value.currency.id,language:e.getUserLanguage(),amount:f.value,quantity:C.value,freeText:v.value,showPrice:w.value,contactName:p.value,contactEmail:g.value,contactPhone: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.15"}}).then(u=>{t.value=e.GiftCardModuleState.ReadyToPay,i.value=!1,y({callback:()=>console.log("Callback!"),response:u.data})})}function r(u){u&&(d.value=u)}return{moduleState:t,name:p,email:g,phone:c,value:f,remark:v,showValue:w,quantity:C,media:s,placeId:k,placeType:n,showFormPage:B,showPaymentPage:S,showConfirmationPage:m,places:h,hasFilledForm:E,hasForcedPlaceType:R,isWaitingForResponse:T,isMetaDataAvailable:q,orderGiftCard:N,initialize:r}}),M={class:"media-selector"},D=["accept"],I={class:"media-selector-wrapper"},L={class:"media-selector-tools"},A={key:0},W={key:1},j={key:2},H=["src"],O=e.defineComponent({__name:"MediaSelector",props:{modelValue:{},validation:{default:"image/*"},iconColor:{default:"#000"},label:{},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(y,{emit:l}){const o=l,t=y,{t:p}=e.useI18n(),{display:g}=e.useAlertStore(),c=e.ref(),f=e.computed(()=>t.modelValue.base64!=="");function C(n){o("update:modelValue",n)}function w(){C({base64:"",name:"",type:""}),c.value&&(c.value.value="")}function v(){c.value&&c.value.click()}function s(n,i){const[d,B]=[n.name,n.type],S=new FileReader;S.onload=function(m){if(m.target){const h=m.target.result;i({base64:h,name:d,type:B})}else g({message:p("imageUploadError"),type:"error"})},S.readAsDataURL(n)}async function k(){let n;(n=c.value.files)instanceof FileList&&s(n[0],C)}return(n,i)=>(e.openBlock(),e.createBlock(e.InputField,{label:n.label,required:n.required,type:"media"},{default:e.withCtx(()=>[e.createBaseVNode("div",M,[e.createBaseVNode("input",{ref_key:"fileInput",ref:c,type:"file",class:"hidden",accept:n.validation,single:"",onChange:i[0]||(i[0]=d=>k())},null,40,D),e.createBaseVNode("div",I,[e.createBaseVNode("ul",L,[f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",A,[e.createVNode(e.Clickable,{label:e.unref(p)("uploadFile"),type:"button",icon:"upload","icon-color":n.iconColor,onClickEvent:i[1]||(i[1]=d=>v())},null,8,["label","icon-color"])])),f.value?(e.openBlock(),e.createElementBlock("li",W,[e.createVNode(e.Clickable,{label:e.unref(p)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":n.iconColor,onClickEvent:i[2]||(i[2]=d=>v())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("li",j,[e.createVNode(e.Clickable,{label:e.unref(p)("removeFile"),type:"button",icon:"trash-alt","icon-color":n.iconColor,onClickEvent:i[3]||(i[3]=d=>w())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:f.value}])},[n.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.modelValue.base64},null,8,H)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function G(y){const l=y;l.__i18n=l.__i18n||[],l.__i18n.push({locale:"",resource:{da:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload billede"])},removeFile:o=>{const{normalize:t}=o;return t(["Fjern billede"])},replaceFile:o=>{const{normalize:t}=o;return t(["Ersat billede"])},imageUploadError:o=>{const{normalize:t}=o;return t(["Der skete en fejl under billede upload!"])}},en:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload image"])},removeFile:o=>{const{normalize:t}=o;return t(["Remove image"])},replaceFile:o=>{const{normalize:t}=o;return t(["Replace image"])},imageUploadError:o=>{const{normalize:t}=o;return t(["An error occurred under image upload!"])}}}})}typeof G=="function"&&G(O);const K={class:"gift-card-skeleton"},Y={class:"gift-card-skeleton-form"},J=e.defineComponent({__name:"GiftCardSkeleton",setup(y){return(l,o)=>(e.openBlock(),e.createElementBlock("div",K,[e.createBaseVNode("div",Y,[e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field),e.createVNode(x.Field,{"is-text-area":""}),e.createVNode($.Element,{height:"44px"})])]))}});const Q=e._export_sfc(J,[["__scopeId","data-v-2600a731"]]),X={key:0,id:"fresh-booking-gift-card-wrapper"},Z={id:"fresh-booking-gift-card-title"},ee={id:"fresh-booking-gift-card-content"},te={id:"fresh-booking-gift-card-payment"},ae=["innerHTML"],le={key:0},oe={key:0,id:"fresh-booking-select-place-type"},ne={class:e.normalizeClass(["fresh-booking-label","required"])},re={id:"fresh-booking-select-place-type-input"},ie=["innerHTML"],de={key:0,id:"fresh-booking-gift-card-order"},ce={class:"fresh-booking-panel"},se={key:1,id:"fresh-booking-gift-card-remarks"},ue={key:2,id:"fresh-booking-gift-card-order-minimal","sticky-side":"bottom"},fe={id:"fresh-booking-gift-card-recaptcha"},pe=e.defineComponent({name:"GiftCardLayout",__name:"GiftCard",props:{accessToken:{},layout:{default:"minimal"},placeType:{},styling:{}},setup(y){const{t:l}=e.useI18n(),{name:o,email:t,phone:p,value:g,remark:c,showValue:f,quantity:C,media:w,placeId:v,placeType:s,showFormPage:k,showPaymentPage:n,showConfirmationPage:i,places:d,hasFilledForm:B,hasForcedPlaceType:S,isWaitingForResponse:m,isMetaDataAvailable:h}=e.storeToRefs(U()),{initialize:R,orderGiftCard:b}=U(),{isRecaptchaEnabled:E,currency:q}=e.storeToRefs(e.useUtilityStore());async function T(){await b()}return e.watch(s,()=>{v.value=void 0}),e.onMounted(()=>{R()}),(N,r)=>{const u=e.resolveDirective("sticky");return e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main$1,{id:"fresh-booking-gift-card-module",type:"gift-card","access-token":N.accessToken,"data-layout":N.layout,styling:N.styling,"sticky-container":""},{default:e.withCtx(()=>[e.unref(h)?(e.openBlock(),e.createElementBlock("div",X,[e.createBaseVNode("h4",Z,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.title")),1)]),e.createBaseVNode("div",ee,[e.withDirectives(e.createBaseVNode("div",te,[e.createVNode(V.CheckoutWindow)],512),[[e.vShow,e.unref(n)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("p",{id:"fresh-booking-gift-card-description",innerHTML:e.unref(l)("giftCard.description")},null,8,ae),e.createBaseVNode("form",null,[e.createVNode(P.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(P.TextField,{modelValue:e.unref(t),"onUpdate:modelValue":r[1]||(r[1]=a=>e.isRef(t)?t.value=a:null),type:"email",name:"email",autocomplete:"email",label:e.unref(l)("giftCard.email"),icon:"at",placeholder:e.unref(l)("giftCard.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(V.PhoneField,{modelValue:e.unref(p),"onUpdate:modelValue":r[2]||(r[2]=a=>e.isRef(p)?p.value=a:null),icon:"phone-office",label:e.unref(l)("giftCard.phone"),placeholder:e.unref(l)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.unref(S)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",le,[e.unref(d)?(e.openBlock(),e.createElementBlock("div",oe,[e.createBaseVNode("label",ne,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.selectType")),1)]),e.createBaseVNode("div",re,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(a,_)=>(e.openBlock(),e.createElementBlock("li",{key:_},[e.createVNode(V.Checkbox,{modelValue:e.unref(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(d)[e.unref(s)]&&e.unref(d)[e.unref(s)].data.length>1?(e.openBlock(),e.createBlock(e._sfc_main,{key:0,modelValue:e.unref(v),"onUpdate:modelValue":r[4]||(r[4]=a=>e.isRef(v)?v.value=a:null),placeholder:e.unref(l)("giftCard.selectPlacePlaceholder"),options:e.unref(d)[e.unref(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(P.TextField,{modelValue:e.unref(g),"onUpdate:modelValue":r[5]||(r[5]=a=>e.isRef(g)?g.value=a:null),type:"number",name:"value",label:e.unref(l)("giftCard.value"),icon:"money-bill",placeholder:e.unref(l)("giftCard.valuePlaceholder"),suffix:e.unref(q),required:""},null,8,["modelValue","label","placeholder","suffix"]),e.createVNode(V.Checkbox,{modelValue:e.unref(f),"onUpdate:modelValue":r[6]||(r[6]=a=>e.isRef(f)?f.value=a:null),type:"checkbox",name:"showValue",label:e.unref(l)("giftCard.showValue"),checked:e.unref(f)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createCommentVNode("",!0)])],512),[[e.vShow,e.unref(k)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("div",{innerHTML:e.unref(l)("giftCard.thankYou")},null,8,ie)],512),[[e.vShow,e.unref(i)]])]),N.layout!=="minimal"&&e.unref(k)?(e.openBlock(),e.createElementBlock("div",de,[e.createBaseVNode("div",ce,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(B),"is-loading":e.unref(m),"onUpdate:isLoading":r[9]||(r[9]=a=>e.isRef(m)?m.value=a:null),onClickEvent:T},null,8,["label","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(P.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(k)?e.withDirectives((e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(B),"data-test":"orderGiftCard","is-loading":e.unref(m),"onUpdate:isLoading":r[11]||(r[11]=a=>e.isRef(m)?m.value=a:null),onClickEvent:T},null,8,["label","disabled","is-loading"]),e.withDirectives(e.createBaseVNode("div",fe,[e.createVNode(V._sfc_main)],512),[[e.vShow,e.unref(E)]])])),[[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(),F=e.createApp({components:{GiftCard:me}});F.use(_e);F.use(e.instance);F.use(ve);F.use(V.StickyPlugin);F.use(V.install,{bootstrap:!1});F.mount("#konnectio-gift-card-app");
|
|
1
|
+
"use strict";const e=require("vue"),t=require("./SelectField.vue_vue_type_style_index_0_lang-c0715ca3.cjs"),C=require("./index-8309eba2.cjs"),x=require("./_-120d9090.cjs");require("./NumberField.vue_vue_type_style_index_0_lang-8c28c1dd.cjs");const T=require("./Field-b1690485.cjs");require("./_commonjsHelpers-87b0abe8.cjs");const U=t.defineStore("giftCard",()=>{t.useAlertStore();const{pay:y}=x.usePaymentStore(),{bearerToken:a,metaData:n}=t.storeToRefs(t.useUtilityStore()),l=e.ref(t.GiftCardModuleState.InitialState),p=t.useStorage("konnectio_name","",void 0,{serializer:t.StorageSerializers.string}),h=t.useStorage("konnectio_email","",void 0,{serializer:t.StorageSerializers.string}),s=t.useStorage("konnectio_phone","",void 0,{serializer:t.StorageSerializers.string}),m=e.ref(""),N=e.ref(1),w=e.ref(!0),k=e.ref(""),u=e.ref({base64:"",type:"",name:""}),_=e.ref(void 0),r=e.ref(0),d=e.ref(!1),c=e.ref(0),E=e.computed(()=>l.value===t.GiftCardModuleState.InitialState||l.value===t.GiftCardModuleState.WaitingForResponse),S=e.computed(()=>l.value===t.GiftCardModuleState.ReadyToPay),v=e.computed(()=>l.value===t.GiftCardModuleState.PaymentSuccess),b=e.computed(()=>{const f={1:{label:t.i18n.t("giftCard.hotelType"),data:[]},2:{label:t.i18n.t("giftCard.restaurantType"),data:[]}},o=n.value.places;return o&&o.forEach(g=>{f[g.placeType].data.push(g)}),Object.fromEntries(Object.entries(f).filter(([,g])=>g.data.length>0))}),z=e.computed(()=>c.value!==0),V=e.computed(()=>{let f;if(z.value)f=b.value[c.value].data[0];else if(r.value!==0){const o=_.value,g=b.value[r.value].data;g.length===1?f=g[0]:o!==void 0&&g.forEach(R=>{String(R.id)===String(o)&&(f=R)})}return f}),G=e.computed(()=>!(!p.value||!h.value||!(s.value.length>=5)||!m.value||V.value===void 0)),q=e.computed(()=>!(l.value===t.GiftCardModuleState.InitialState&&d.value)),P=e.computed(()=>!!(l.value===t.GiftCardModuleState.WaitingForResponse&&d.value));async function F(){l.value=t.GiftCardModuleState.WaitingForResponse,d.value=!0,await t.axios.post("https://stage.hotel-service.konnectio.dk/api/gift-card/create",{termsOfserviceURL:"https://freshbooking.dk",checkoutUrl:"https://freshbooking.dk",currencyID:n.value.currency.id,language:t.getUserLanguage(),amount:m.value,quantity:N.value,freeText:k.value,showPrice:w.value,contactName:p.value,contactEmail:h.value,contactPhone:s.value,imageBase64:t.b2a(u.value.base64),imageName:u.value.name,imageFormat:u.value.type,placeType:V.value?V.value.placeType:void 0,placeID:V.value?V.value.id:void 0},{headers:{Authorization:a.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.17"}}).then(f=>{l.value=t.GiftCardModuleState.ReadyToPay,d.value=!1,y({callback:()=>console.log("Callback!"),response:f.data})})}function i(f){f&&(c.value=f)}return{moduleState:l,name:p,email:h,phone:s,value:m,remark:k,showValue:w,quantity:N,media:u,placeId:_,placeType:r,showFormPage:E,showPaymentPage:S,showConfirmationPage:v,places:b,hasFilledForm:G,hasForcedPlaceType:z,isWaitingForResponse:P,isMetaDataAvailable:q,orderGiftCard:F,initialize:i}}),M={class:"media-selector"},D=["accept"],I={class:"media-selector-wrapper"},L={class:"media-selector-tools"},A={key:0},W={key:1},j={key:2},H=["src"],O=e.defineComponent({__name:"MediaSelector",props:{modelValue:{},validation:{default:"image/*"},iconColor:{default:"#000"},label:{},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(y,{emit:a}){const n=a,l=y,{t:p}=t.useI18n(),{display:h}=t.useAlertStore(),s=e.ref(),m=e.computed(()=>l.modelValue.base64!=="");function N(r){n("update:modelValue",r)}function w(){N({base64:"",name:"",type:""}),s.value&&(s.value.value="")}function k(){s.value&&s.value.click()}function u(r,d){const[c,E]=[r.name,r.type],S=new FileReader;S.onload=function(v){if(v.target){const b=v.target.result;d({base64:b,name:c,type:E})}else h({message:p("imageUploadError"),type:"error"})},S.readAsDataURL(r)}async function _(){let r;(r=s.value.files)instanceof FileList&&u(r[0],N)}return(r,d)=>(e.openBlock(),e.createBlock(t.InputField,{label:r.label,required:r.required,type:"media"},{default:e.withCtx(()=>[e.createElementVNode("div",M,[e.createElementVNode("input",{ref_key:"fileInput",ref:s,type:"file",class:"hidden",accept:r.validation,single:"",onChange:d[0]||(d[0]=c=>_())},null,40,D),e.createElementVNode("div",I,[e.createElementVNode("ul",L,[m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",A,[e.createVNode(t.Clickable,{label:e.unref(p)("uploadFile"),type:"button",icon:"upload","icon-color":r.iconColor,onClickEvent:d[1]||(d[1]=c=>k())},null,8,["label","icon-color"])])),m.value?(e.openBlock(),e.createElementBlock("li",W,[e.createVNode(t.Clickable,{label:e.unref(p)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":r.iconColor,onClickEvent:d[2]||(d[2]=c=>k())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("li",j,[e.createVNode(t.Clickable,{label:e.unref(p)("removeFile"),type:"button",icon:"trash-alt","icon-color":r.iconColor,onClickEvent:d[3]||(d[3]=c=>w())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:m.value}])},[r.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.modelValue.base64},null,8,H)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function $(y){const a=y;a.__i18n=a.__i18n||[],a.__i18n.push({locale:"",resource:{da:{uploadFile:n=>{const{normalize:l}=n;return l(["Upload billede"])},removeFile:n=>{const{normalize:l}=n;return l(["Fjern billede"])},replaceFile:n=>{const{normalize:l}=n;return l(["Ersat billede"])},imageUploadError:n=>{const{normalize:l}=n;return l(["Der skete en fejl under billede upload!"])}},en:{uploadFile:n=>{const{normalize:l}=n;return l(["Upload image"])},removeFile:n=>{const{normalize:l}=n;return l(["Remove image"])},replaceFile:n=>{const{normalize:l}=n;return l(["Replace image"])},imageUploadError:n=>{const{normalize:l}=n;return l(["An error occurred under image upload!"])}}}})}typeof $=="function"&&$(O);const K={class:"gift-card-skeleton"},Y={class:"gift-card-skeleton-form"},J=e.defineComponent({__name:"GiftCardSkeleton",setup(y){return(a,n)=>(e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("div",Y,[e.createVNode(T.Field),e.createVNode(T.Field),e.createVNode(T.Field),e.createVNode(T.Field),e.createVNode(T.Field,{"is-text-area":""}),e.createVNode(x.Element,{height:"44px"})])]))}});const Q=t._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"},le=["innerHTML"],ae={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"},ce={class:"fresh-booking-panel"},se={key:1,id:"fresh-booking-gift-card-remarks"},ue={key:2,id:"fresh-booking-gift-card-order-minimal","sticky-side":"bottom"},fe={id:"fresh-booking-gift-card-recaptcha"},me=e.defineComponent({name:"GiftCardLayout",__name:"GiftCard",props:{accessToken:{},layout:{default:"minimal"},placeType:{},styling:{}},setup(y){const{t:a}=t.useI18n(),{name:n,email:l,phone:p,value:h,remark:s,showValue:m,quantity:N,media:w,placeId:k,placeType:u,showFormPage:_,showPaymentPage:r,showConfirmationPage:d,places:c,hasFilledForm:E,hasForcedPlaceType:S,isWaitingForResponse:v,isMetaDataAvailable:b}=t.storeToRefs(U()),{initialize:z,orderGiftCard:V}=U(),{isRecaptchaEnabled:G,currency:q}=t.storeToRefs(t.useUtilityStore());async function P(){await V()}return e.watch(u,()=>{k.value=void 0}),e.onMounted(()=>{z()}),(F,i)=>{const f=e.resolveDirective("sticky");return e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(t._sfc_main,{id:"fresh-booking-gift-card-module",type:"gift-card","access-token":F.accessToken,"data-layout":F.layout,styling:F.styling,"sticky-container":""},{default:e.withCtx(()=>[e.unref(b)?(e.openBlock(),e.createElementBlock("div",X,[e.createElementVNode("h4",Z,[e.createElementVNode("span",null,e.toDisplayString(e.unref(a)("giftCard.title")),1)]),e.createElementVNode("div",ee,[e.withDirectives(e.createElementVNode("div",te,[e.createVNode(C.CheckoutWindow)],512),[[e.vShow,e.unref(r)]]),e.withDirectives(e.createElementVNode("div",null,[e.createElementVNode("p",{id:"fresh-booking-gift-card-description",innerHTML:e.unref(a)("giftCard.description")},null,8,le),e.createElementVNode("form",null,[e.createVNode(t.TextField,{modelValue:e.unref(n),"onUpdate:modelValue":i[0]||(i[0]=o=>e.isRef(n)?n.value=o:null),type:"text",name:"name",autocomplete:"name",label:e.unref(a)("giftCard.name"),icon:"user-alt",placeholder:e.unref(a)("giftCard.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(t.TextField,{modelValue:e.unref(l),"onUpdate:modelValue":i[1]||(i[1]=o=>e.isRef(l)?l.value=o:null),type:"email",name:"email",autocomplete:"email",label:e.unref(a)("giftCard.email"),icon:"at",placeholder:e.unref(a)("giftCard.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(C.PhoneField,{modelValue:e.unref(p),"onUpdate:modelValue":i[2]||(i[2]=o=>e.isRef(p)?p.value=o:null),icon:"phone-office",label:e.unref(a)("giftCard.phone"),placeholder:e.unref(a)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.unref(S)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ae,[e.unref(c)?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("label",ne,[e.createElementVNode("span",null,e.toDisplayString(e.unref(a)("giftCard.selectType")),1)]),e.createElementVNode("div",re,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(o,g)=>(e.openBlock(),e.createElementBlock("li",{key:g},[e.createVNode(C.Checkbox,{modelValue:e.unref(u),"onUpdate:modelValue":i[3]||(i[3]=R=>e.isRef(u)?u.value=R:null),type:"radio",name:"placeType",val:g,label:o.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(c)[e.unref(u)]&&e.unref(c)[e.unref(u)].data.length>1?(e.openBlock(),e.createBlock(t._sfc_main$1,{key:0,modelValue:e.unref(k),"onUpdate:modelValue":i[4]||(i[4]=o=>e.isRef(k)?k.value=o:null),placeholder:e.unref(a)("giftCard.selectPlacePlaceholder"),options:e.unref(c)[e.unref(u)].data,labelKey:"name",valueKey:"id",required:""},null,8,["modelValue","placeholder","options"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(t.Loading,{key:1}))])),e.createVNode(t.TextField,{modelValue:e.unref(h),"onUpdate:modelValue":i[5]||(i[5]=o=>e.isRef(h)?h.value=o:null),type:"number",name:"value",label:e.unref(a)("giftCard.value"),icon:"money-bill",placeholder:e.unref(a)("giftCard.valuePlaceholder"),suffix:e.unref(q),required:""},null,8,["modelValue","label","placeholder","suffix"]),e.createVNode(C.Checkbox,{modelValue:e.unref(m),"onUpdate:modelValue":i[6]||(i[6]=o=>e.isRef(m)?m.value=o:null),type:"checkbox",name:"showValue",label:e.unref(a)("giftCard.showValue"),checked:e.unref(m)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createCommentVNode("",!0)])],512),[[e.vShow,e.unref(_)]]),e.withDirectives(e.createElementVNode("div",null,[e.createElementVNode("div",{innerHTML:e.unref(a)("giftCard.thankYou")},null,8,ie)],512),[[e.vShow,e.unref(d)]])]),F.layout!=="minimal"&&e.unref(_)?(e.openBlock(),e.createElementBlock("div",de,[e.createElementVNode("div",ce,[e.createVNode(t.Clickable,{label:e.unref(a)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(E),"is-loading":e.unref(v),"onUpdate:isLoading":i[9]||(i[9]=o=>e.isRef(v)?v.value=o:null),onClickEvent:P},null,8,["label","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(_)?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(t.TextField,{modelValue:e.unref(s),"onUpdate:modelValue":i[10]||(i[10]=o=>e.isRef(s)?s.value=o:null),type:"textarea",name:"remark",label:e.unref(a)("giftCard.remark"),icon:"info-circle",placeholder:e.unref(a)("giftCard.remarkPlaceholder")},null,8,["modelValue","label","placeholder"])])):e.createCommentVNode("",!0),e.unref(_)?e.withDirectives((e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(t.Clickable,{label:e.unref(a)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(E),"data-test":"orderGiftCard","is-loading":e.unref(v),"onUpdate:isLoading":i[11]||(i[11]=o=>e.isRef(v)?v.value=o:null),onClickEvent:P},null,8,["label","disabled","is-loading"]),e.withDirectives(e.createElementVNode("div",fe,[e.createVNode(C._sfc_main)],512),[[e.vShow,e.unref(G)]])])),[[f]]):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(t.Loading,{key:1}))]),_:1},8,["access-token","data-layout","styling"])]),fallback:e.withCtx(()=>[e.createVNode(Q)]),_:1})}}});const pe=t._export_sfc(me,[["__scopeId","data-v-e4aa1e4c"]]),ve=t.createPinia(),ge=t.zo(),B=e.createApp({components:{GiftCard:pe}});B.use(ve);B.use(t.instance);B.use(ge);B.use(C.StickyPlugin);B.use(C.install,{bootstrap:!1});B.mount("#konnectio-gift-card-app");
|