@cling-se/widget 1.0.0-beta.1 → 1.0.0-beta.3
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/CHANGELOG.md +25 -0
- package/README.internal.md +82 -0
- package/README.md +14 -40
- package/README.public.md +14 -0
- package/dist/AddClientCallout-DRcy9Dqb.js +101 -0
- package/dist/AnswerModal-Dc3cgkap.js +3291 -0
- package/dist/AttachmentItem-Bef5zdHr.js +171 -0
- package/dist/BaseUpload--paElAyr.js +2472 -0
- package/dist/BlockMedia-DbVE3vsb.js +103 -0
- package/dist/CCallout-81NkOge7.js +104 -0
- package/dist/{CCurrencyDropdown-qH-3m2eP.js → CCurrencyDropdown-M3hi1VVi.js} +91 -49
- package/dist/CDropdownItem-DvaU14-V.js +749 -0
- package/dist/CFormField.vue_vue_type_script_setup_true_lang-B4s_Zfsp.js +292 -0
- package/dist/{CPhoneFormat-CfQayFxw.js → CPhoneFormat-BBQ_UIc_.js} +13 -21
- package/dist/CPhoneInput-Dw_LJDgc.js +207 -0
- package/dist/CPriceInput-BfWZZv0f.js +140 -0
- package/dist/CSelect-B1AAIFbK.js +98 -0
- package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-D56L_PYT.js +51 -0
- package/dist/ClientAutocomplete-D5veIKyZ.js +532 -0
- package/dist/ClientModal-D8_TPzkv.js +1181 -0
- package/dist/ColorPicker-C0OahiVg.js +1408 -0
- package/dist/CompanyModal-CjzwQU4B.js +250 -0
- package/dist/ContentWrapper-DrmiaFOz.js +265 -0
- package/dist/CoverBlockSettings-C9DWvA-C.js +861 -0
- package/dist/DocAnswer-BEsvAMEp.js +33 -0
- package/dist/DocDetails--LO0-S5d.js +448 -0
- package/dist/DocForm-D6_tGw06.js +6748 -0
- package/dist/DocFormSend-CdFL6rOD.js +171 -0
- package/dist/DocLinks-CIQFUh7c.js +36 -0
- package/dist/DocModalBase-DtPJK9sp.js +29 -0
- package/dist/DocPrint-qX88Ue2I.js +399 -0
- package/dist/DocReceipt-BbXoCmpz.js +341 -0
- package/dist/DocSendReminder-DZqOkd63.js +181 -0
- package/dist/DocTextEditor-Cw-Skmd4.js +19413 -0
- package/dist/DocTimeline-CdbSOVD1.js +537 -0
- package/dist/DocumentClient-DtTv7gkF.js +90 -0
- package/dist/DocumentLayout-BRfEjoYq.js +1368 -0
- package/dist/DocumentLogotype-CUNzyewq.js +162 -0
- package/dist/DocumentVoided-CgDt-JFI.js +33 -0
- package/dist/EmbedInput-rPvTnpXn.js +157 -0
- package/dist/EmbedSettings-BtmFxYGB.js +103 -0
- package/dist/ErrorCallout-B6YrdUsG.js +34 -0
- package/dist/FilePreviewModal-BfIqIIbb.js +202 -0
- package/dist/Flag-CE3K7-8a.js +41 -0
- package/dist/HeaderSettings-5QR7MmVf.js +720 -0
- package/dist/ImageSelectModal-E3hGi8ty.js +119 -0
- package/dist/ImageUploadWrapper-BaexFAAh.js +1585 -0
- package/dist/Index--gv5fH24.js +201 -0
- package/dist/{Index-D4XgxmbD.js → Index-B3ycPjAI.js} +10 -18
- package/dist/Index-B7ECpXAa.js +28 -0
- package/dist/Index-BIXfUsHH.js +52 -0
- package/dist/Index-BM658CCq.js +93 -0
- package/dist/{Index--qPMWUMT.js → Index-B_DCM_bL.js} +48 -61
- package/dist/Index-BcMATT2_.js +47 -0
- package/dist/Index-BpWFU3Td.js +68 -0
- package/dist/Index-BulSI5iO.js +38 -0
- package/dist/Index-CHInIRw5.js +228 -0
- package/dist/Index-COYqsxs9.js +25 -0
- package/dist/Index-CSGk060H.js +1098 -0
- package/dist/Index-CV2O2fWT.js +21 -0
- package/dist/{Index-Bu0MGrj6.js → Index-CXqdBSZ3.js} +313 -206
- package/dist/Index-CavttI66.js +126 -0
- package/dist/Index-CbZ65-O3.js +629 -0
- package/dist/Index-CqrTij2j.js +70 -0
- package/dist/Index-CrsGxDWC.js +16 -0
- package/dist/Index-CxY5Ii6K.js +49 -0
- package/dist/Index-D7Z2w9cd.js +163 -0
- package/dist/Index-D7ixmzBH.js +76 -0
- package/dist/Index-D7pzv-AR.js +74 -0
- package/dist/Index-D9keESQi.js +159 -0
- package/dist/Index-Dd6ueeUc.js +136 -0
- package/dist/{Index-DIOiMm9f.js → Index-DexIUz3R.js} +10 -18
- package/dist/Index-Dnmt6W0u.js +140 -0
- package/dist/Index-DtcV6rl1.js +4 -0
- package/dist/Index-DuDVafLn.js +3452 -0
- package/dist/Index-L913X8Ly.js +102 -0
- package/dist/Index-Mdn0niR_.js +28 -0
- package/dist/Index-_ellB2fs.js +363 -0
- package/dist/{Index-DcQbh-z2.js → Index-baSB5tPv.js} +9 -17
- package/dist/Index-bgKndj-l.js +39 -0
- package/dist/Index-lNYXAFUH.js +87 -0
- package/dist/Index.vue_vue_type_script_lang-DLogex2i.js +671 -0
- package/dist/InputToggleRow-BCvMVbW-.js +99 -0
- package/dist/ManualPopover-BzBvSl_x.js +57 -0
- package/dist/MediaWrapper-_LPau2Ks.js +18 -0
- package/dist/{NotBindingText-CNV2Wmdx.js → NotBindingText-DgcOjUmQ.js} +13 -17
- package/dist/PackageGroup-1X3jUipj.js +1058 -0
- package/dist/PdfTerms-Bf4TlzP5.js +34 -0
- package/dist/PdfViewer-BdhwFfc6.js +392 -0
- package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-BgsfquR_.js +17 -0
- package/dist/PriceHeader-DyC8xssf.js +488 -0
- package/dist/SearchApi-C__orGkO.js +137 -0
- package/dist/SendForm-Be8uiuaJ.js +7031 -0
- package/dist/Setup-DbXs2Zar.js +47 -0
- package/dist/{SmartList-Qgu0rMrI.js → SmartList-BmmtZoZ0.js} +16 -24
- package/dist/Sortable.vue_vue_type_script_setup_true_lang-D0mloJIN.js +1303 -0
- package/dist/{TermsSettings-CE3h_xkm.js → TermsSettings-DsN6v5yj.js} +169 -49
- package/dist/ThemeColorRow-BL6p09pN.js +108 -0
- package/dist/ToggleBinding-B-tVioQ9.js +44 -0
- package/dist/UploadModal-BnA1xLMy.js +134 -0
- package/dist/VideoPlayerInput-D38S1IDH.js +135 -0
- package/dist/VideoPlayerSettings-B5iXoj5E.js +78 -0
- package/dist/VideoSelectModal-BNCoMFKU.js +217 -0
- package/dist/{anime.es-BrPTThYb.js → anime.es-gdcpA-eY.js} +1 -2
- package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
- package/dist/{debounce-C1AuSpOZ.js → debounce-CBRJalZI.js} +7 -7
- package/dist/dom-CkTGWrfu.js +69 -0
- package/dist/{focusDrawerMixin-Be6BAK8-.js → focusDrawerMixin-T94b2Y6F.js} +1 -1
- package/dist/{formDrawerState-DRbg5rVI.js → formDrawerState-jssoGOce.js} +2 -2
- package/dist/helpers-Vo_6Zz3M.js +44 -0
- package/dist/index-8g2jwLJx.js +513 -0
- package/dist/index-B0udVHyo.js +125 -0
- package/dist/index-D63IJVsJ.js +3525 -0
- package/dist/index-DCYCN_FR.js +508 -0
- package/dist/index-FRHGChx1.js +149 -0
- package/dist/index-HXiq8Yxs.js +270 -0
- package/dist/index-jOufDnZ8.js +188 -0
- package/dist/index.es.js +2 -5
- package/dist/index.umd.js +306 -1505
- package/dist/{main-WKzC-Dnu.js → main-C4OdoeS2.js} +36750 -37369
- package/dist/mapFormMixin-v-nbaWcx.js +1544 -0
- package/dist/omit-GuxX6Zt-.js +31 -0
- package/dist/{publicSenderState-BujjYsZZ.js → publicSenderState-C-7OMKKW.js} +4 -4
- package/dist/regions-BdZt9Srn.js +1250 -0
- package/dist/splitpanes-DChJiJ8d.js +342 -0
- package/dist/style.css +1 -4
- package/dist/template-m1V22cUt.js +1493 -0
- package/dist/{throttle-CWPJmFid.js → throttle-WWMDZKby.js} +2 -2
- package/dist/tippy.esm-Dz-faEsS.js +1994 -0
- package/dist/useTermsModal-C_eLdGLi.js +87 -0
- package/dist/{utils-CA_Zy6u1.js → utils-vnvZGRwQ.js} +8 -11
- package/dist/validation-C-dQpENM.js +40 -0
- package/package.json +25 -31
- package/.eslintrc.cjs +0 -4
- package/dist/AddClientCallout-BWnvyBcK.js +0 -46
- package/dist/AnswerModal-CLGRdSnK.js +0 -3874
- package/dist/AttachmentItem-BPS0-wyc.js +0 -78
- package/dist/BaseDatePicker-BbmV_GdD.js +0 -3183
- package/dist/BaseUpload-9gPgI7r6.js +0 -1977
- package/dist/BlockMedia-DkPFWiYL.js +0 -76
- package/dist/CCallout-T26jwUby.js +0 -59
- package/dist/CDropdownItem-BE8BAMD1.js +0 -636
- package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
- package/dist/CFormField-DECEfoVq.js +0 -241
- package/dist/CPriceInput-C4SOB-P5.js +0 -112
- package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
- package/dist/ClientAutocomplete-DSebA1Mx.js +0 -78
- package/dist/ClientModal-BXFYvYCF.js +0 -625
- package/dist/ColorPicker-CZ_bJabP.js +0 -2879
- package/dist/CompanyModal-CDr3t28n.js +0 -141
- package/dist/ContentWrapper-BwmMoe4W.js +0 -183
- package/dist/CoverBlockSettings-_F11-DGc.js +0 -275
- package/dist/DocAnswer-BR59xzkT.js +0 -36
- package/dist/DocDetails-D1qbCbps.js +0 -259
- package/dist/DocForm-DBc2a7z5.js +0 -7272
- package/dist/DocFormSend-Casix-yG.js +0 -144
- package/dist/DocLinks-DGTaewyX.js +0 -38
- package/dist/DocModalBase-BbS_qvSv.js +0 -28
- package/dist/DocPrint-0PqX3mbJ.js +0 -240
- package/dist/DocReceipt-CU3VD5pt.js +0 -210
- package/dist/DocSendReminder-CuycBspr.js +0 -137
- package/dist/DocTextEditor-CntS2Bd-.js +0 -17180
- package/dist/DocTimeline-DJuv3yBe.js +0 -481
- package/dist/DocumentClient-C25XXzz6.js +0 -136
- package/dist/DocumentLayout-B7afHRMr.js +0 -4909
- package/dist/DocumentLogotype-sqI51wvM.js +0 -87
- package/dist/DocumentVoided-TahdTSMn.js +0 -25
- package/dist/EmbedInput-BY-wHSfc.js +0 -113
- package/dist/EmbedSettings-8pfjk4NP.js +0 -72
- package/dist/ErrorCallout-Dsr8PNsU.js +0 -28
- package/dist/FilePreviewModal-CcEinEFg.js +0 -81
- package/dist/Flag-PJKrghi9.js +0 -114
- package/dist/HeaderSettings-BqczIOsG.js +0 -392
- package/dist/ImageSelectModal-Cd-HhKnH.js +0 -84
- package/dist/ImageUploadWrapper-Dv43rGdb.js +0 -1604
- package/dist/Index-6b5VBKE-.js +0 -107
- package/dist/Index-B4pRJnbw.js +0 -84
- package/dist/Index-B69f8qgZ.js +0 -62
- package/dist/Index-B79YN9RO.js +0 -25
- package/dist/Index-BBrlPoe8.js +0 -58
- package/dist/Index-BXfWJCuq.js +0 -52
- package/dist/Index-Bd76vb37.js +0 -55
- package/dist/Index-BmbtQO5F.js +0 -150
- package/dist/Index-ByV_kJaH.js +0 -77
- package/dist/Index-CDV5rhWS.js +0 -49
- package/dist/Index-CIx4OOK-.js +0 -144
- package/dist/Index-CL1OWLt6.js +0 -223
- package/dist/Index-Caow0eZu.js +0 -31
- package/dist/Index-Cd3-3PEK.js +0 -2402
- package/dist/Index-CdpZBEKU.js +0 -98
- package/dist/Index-CmU3Sys-.js +0 -754
- package/dist/Index-CtRtgnpm.js +0 -32
- package/dist/Index-Cukkr33D.js +0 -140
- package/dist/Index-Cuqw0ios.js +0 -57
- package/dist/Index-Czm_WdqC.js +0 -25
- package/dist/Index-DNdYXHgr.js +0 -33
- package/dist/Index-DcuBxutp.js +0 -642
- package/dist/Index-DpWNWiyY.js +0 -291
- package/dist/Index-DzS1rZdF.js +0 -24
- package/dist/Index-N6s5pZxv.js +0 -26
- package/dist/Index-g_DNu4mt.js +0 -69
- package/dist/Index-mJ8F41GY.js +0 -154
- package/dist/Index-q7W9KA8m.js +0 -21
- package/dist/Index-rtzblZp4.js +0 -70
- package/dist/InputToggleRow-CZjxsDOQ.js +0 -57
- package/dist/ManualPopover-CZrWiT-P.js +0 -58
- package/dist/MediaWrapper-D37qK4KR.js +0 -23
- package/dist/PackageGroup-Heo_s8ct.js +0 -699
- package/dist/PdfTerms-AB9tXAtU.js +0 -36
- package/dist/PdfViewer-CIVkvOBr.js +0 -373
- package/dist/PlainHtml-CPmIebjY.js +0 -20
- package/dist/PriceHeader-DhDAruwX.js +0 -339
- package/dist/SearchApi-BMgdaI4s.js +0 -161
- package/dist/Setup-VIaIV9uT.js +0 -50
- package/dist/ThemeColorRow-DYJNgk6S.js +0 -67
- package/dist/ToggleBinding-CuwCeYpO.js +0 -38
- package/dist/UploadModal-BITcxG-J.js +0 -95
- package/dist/VideoPlayerInput-8szEX_8L.js +0 -93
- package/dist/VideoPlayerSettings-BIPytm6w.js +0 -61
- package/dist/VideoSelectModal-B-Pe34nb.js +0 -100
- package/dist/answerDocumentMixin-W7vE1Gp4.js +0 -51
- package/dist/formComponentsInstall-Bm3VMOh6.js +0 -2507
- package/dist/formValidationMixin-COkY8COk.js +0 -49
- package/dist/index-BFvjENMH.js +0 -81
- package/dist/index-BV2nGWay.js +0 -492
- package/dist/index-BgJ05dYc.js +0 -165
- package/dist/index-CMPAXxzs.js +0 -347
- package/dist/index-DNDjI5uI.js +0 -3916
- package/dist/index-aoff9oUi.js +0 -102
- package/dist/mapFormMixin-QbevCwJK.js +0 -72
- package/dist/omit-CTp9CXoU.js +0 -31
- package/dist/splitpanes-BHUVsCZF.js +0 -382
- package/dist/tinycolor-kTl0yxzz.js +0 -633
- package/dist/tippy.esm-sS5koDSU.js +0 -1799
- package/dist/vuedraggable.umd-BA3ZDRAp.js +0 -3161
- package/dist/vuex.esm-DKGl8mcw.js +0 -467
- package/public/favicon.ico +0 -0
- package/tsconfig.json +0 -26
- package/tsconfig.node.json +0 -10
- package/tsconfig.paths.json +0 -17
- package/vite.config.ts +0 -60
|
@@ -0,0 +1,1058 @@
|
|
|
1
|
+
import { m as D } from "./mapFormMixin-v-nbaWcx.js";
|
|
2
|
+
import { E as M } from "./ErrorCallout-B6YrdUsG.js";
|
|
3
|
+
import { d6 as O, d7 as C, A as F, _ as T, o as a, d as c, s as l, v as o, f as n, F as f, B as k, n as P, d8 as W, b as v, a3 as B, E as I, k as b, c as _, ac as q, e as V, w as S, G as E, l as x, aa as w, bF as L, D as Z, p as N } from "./main-C4OdoeS2.js";
|
|
4
|
+
import { t as A } from "./template-m1V22cUt.js";
|
|
5
|
+
import { T as G } from "./DocTextEditor-Cw-Skmd4.js";
|
|
6
|
+
const j = {
|
|
7
|
+
name: "ArticleItem",
|
|
8
|
+
mixins: [D([])],
|
|
9
|
+
props: {
|
|
10
|
+
title: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: !0
|
|
13
|
+
},
|
|
14
|
+
quantity: {
|
|
15
|
+
type: Number,
|
|
16
|
+
required: !0
|
|
17
|
+
},
|
|
18
|
+
unitType: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: !0
|
|
21
|
+
},
|
|
22
|
+
articleNo: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: null
|
|
25
|
+
},
|
|
26
|
+
houseWorkType: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: null
|
|
29
|
+
},
|
|
30
|
+
price: {
|
|
31
|
+
type: Number,
|
|
32
|
+
default: 0
|
|
33
|
+
},
|
|
34
|
+
currency: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: !0
|
|
37
|
+
},
|
|
38
|
+
vat: {
|
|
39
|
+
type: Number,
|
|
40
|
+
default: null
|
|
41
|
+
},
|
|
42
|
+
priceType: {
|
|
43
|
+
type: String,
|
|
44
|
+
required: !0
|
|
45
|
+
},
|
|
46
|
+
showPrice: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !0
|
|
49
|
+
},
|
|
50
|
+
position: {
|
|
51
|
+
type: Number,
|
|
52
|
+
default: null
|
|
53
|
+
},
|
|
54
|
+
showPricesIncVat: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
required: !0
|
|
57
|
+
},
|
|
58
|
+
discount: {
|
|
59
|
+
type: Number,
|
|
60
|
+
default: null
|
|
61
|
+
},
|
|
62
|
+
discountType: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: null
|
|
65
|
+
},
|
|
66
|
+
totalAmount: {
|
|
67
|
+
type: Number,
|
|
68
|
+
default: null
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
docLang: O,
|
|
72
|
+
computed: {
|
|
73
|
+
fixQuantity() {
|
|
74
|
+
return this.priceType === "openAcc" ? 1 : this.quantity;
|
|
75
|
+
},
|
|
76
|
+
showDetails() {
|
|
77
|
+
return this.showPrice ? this.priceType === "openAcc" || this.priceType === "markup" || this.quantity !== 1 || this.unitType !== "unit" : !1;
|
|
78
|
+
},
|
|
79
|
+
calcPricePrefix() {
|
|
80
|
+
return this.priceType === "approx" ? `${this._document.$t("approx")} ` : "";
|
|
81
|
+
},
|
|
82
|
+
unitPriceUnformatted() {
|
|
83
|
+
let { price: t } = this;
|
|
84
|
+
return this.priceType === "markup" || this.showPricesIncVat && (t *= (100 + this.vat) / 100), t;
|
|
85
|
+
},
|
|
86
|
+
atPrice() {
|
|
87
|
+
if (!this.price || !this.showPrice || this.priceType === "openAcc" || this.priceType === "markup")
|
|
88
|
+
return !1;
|
|
89
|
+
let { price: t } = this;
|
|
90
|
+
return this.showPricesIncVat && (t *= (100 + this.vat) / 100), this.priceFormat(t, {
|
|
91
|
+
currency: this.currency,
|
|
92
|
+
decimals: 2,
|
|
93
|
+
hideZeroDecimals: !0
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
totalPrice() {
|
|
97
|
+
if (!this.price || !this.totalAmount)
|
|
98
|
+
return "";
|
|
99
|
+
let t = this.totalAmount;
|
|
100
|
+
this.showPricesIncVat && this.priceType !== "markup" && (t *= (100 + this.vat) / 100);
|
|
101
|
+
let i = "";
|
|
102
|
+
return this.priceType === "openAcc" && (i = `/${C(this.unitType, {
|
|
103
|
+
lng: this._document.language
|
|
104
|
+
})}`, this.houseWorkType && (t *= {
|
|
105
|
+
rot: 0.7,
|
|
106
|
+
rut: 0.5,
|
|
107
|
+
greenRot15: 0.85,
|
|
108
|
+
greenRot20: 0.8,
|
|
109
|
+
greenRot50: 0.5
|
|
110
|
+
}[this.houseWorkType])), this.priceType === "markup" ? t = `${this.priceFormat(t, {
|
|
111
|
+
suffix: !1,
|
|
112
|
+
decimals: 2,
|
|
113
|
+
currency: this.currency
|
|
114
|
+
})} %` : t = this.priceFormat(t, {
|
|
115
|
+
currency: this.currency,
|
|
116
|
+
decimals: 2,
|
|
117
|
+
hideZeroDecimals: !0
|
|
118
|
+
}), this.calcPricePrefix + t + i;
|
|
119
|
+
},
|
|
120
|
+
discountLabels() {
|
|
121
|
+
if (!this.discount) return "";
|
|
122
|
+
const t = this.priceFormat(
|
|
123
|
+
this.fixQuantity * this.unitPriceUnformatted,
|
|
124
|
+
{
|
|
125
|
+
currency: this.currency
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
let i = "", e = "";
|
|
129
|
+
return this.discountType === "percentage" ? (i = `<span style="color: red;">-${this.discount / 100}%</span>`, e = `<span style="text-decoration: line-through; font-weight: 400; padding-left: 0.75ch; opacity: 0.75;">${t}</span>`) : e = `<span style="text-decoration: line-through; color: red;">${t}</span>`, `<div style="font-size: calc(1em - 2px);">${i}${e}</div>`;
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
methods: {
|
|
133
|
+
articleUnitLabel: C,
|
|
134
|
+
priceFormat: F
|
|
135
|
+
}
|
|
136
|
+
}, $ = { class: "article-text" }, H = { class: "article-text-title hyphens-auto break-all" }, U = {
|
|
137
|
+
key: 0,
|
|
138
|
+
class: "article-text-sub"
|
|
139
|
+
}, Q = { key: 0 }, R = { key: 1 }, J = {
|
|
140
|
+
key: 2,
|
|
141
|
+
style: { margin: "0 4px" },
|
|
142
|
+
width: "6",
|
|
143
|
+
height: "6",
|
|
144
|
+
viewBox: "0 0 148 141",
|
|
145
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
146
|
+
}, K = { key: 3 }, X = { class: "article-price" }, Y = ["innerHTML"], ee = {
|
|
147
|
+
key: 1,
|
|
148
|
+
class: "article-price-sub"
|
|
149
|
+
};
|
|
150
|
+
function te(t, i, e, p, g, r) {
|
|
151
|
+
return a(), c("div", {
|
|
152
|
+
class: P([{
|
|
153
|
+
"no-border-top": e.position === 0
|
|
154
|
+
}, "article-wrapper print-avoid-break-inside"])
|
|
155
|
+
}, [
|
|
156
|
+
l("div", $, [
|
|
157
|
+
l("div", H, o(e.title), 1),
|
|
158
|
+
r.showDetails ? (a(), c("div", U, [
|
|
159
|
+
e.priceType === "openAcc" || e.priceType === "markup" ? (a(), c("div", Q, o(t._document.$t(`price.${e.priceType}`)) + " ", 1)) : n("", !0),
|
|
160
|
+
e.priceType !== "openAcc" && e.priceType !== "markup" ? (a(), c("div", R, o(r.fixQuantity) + " " + o(r.articleUnitLabel(e.unitType, {
|
|
161
|
+
count: r.fixQuantity,
|
|
162
|
+
lng: t._document.language,
|
|
163
|
+
instance: t.$options.docLang
|
|
164
|
+
})), 1)) : n("", !0),
|
|
165
|
+
r.atPrice ? (a(), c("svg", J, i[0] || (i[0] = [
|
|
166
|
+
l("path", {
|
|
167
|
+
d: "M73.742787 92.65535l-34.444359 47.40859-18.607391-13.51906 34.060775-46.88064L0 61.8743 7.107391 40 62 57.83569V0h23v57.99346L140.378182 40l7.107391 21.8743-54.751812 17.78994 34.060775 46.88064-18.607391 13.51906-34.444358-47.40859z",
|
|
168
|
+
fill: "#000",
|
|
169
|
+
"fill-rule": "evenodd"
|
|
170
|
+
}, null, -1)
|
|
171
|
+
]))) : n("", !0),
|
|
172
|
+
r.atPrice ? (a(), c("div", K, o(r.atPrice), 1)) : n("", !0)
|
|
173
|
+
])) : n("", !0)
|
|
174
|
+
]),
|
|
175
|
+
l("div", X, [
|
|
176
|
+
e.showPrice ? (a(), c(f, { key: 0 }, [
|
|
177
|
+
e.discount ? (a(), c("div", {
|
|
178
|
+
key: 0,
|
|
179
|
+
innerHTML: r.discountLabels
|
|
180
|
+
}, null, 8, Y)) : n("", !0),
|
|
181
|
+
l("div", null, o(r.totalPrice), 1)
|
|
182
|
+
], 64)) : n("", !0),
|
|
183
|
+
e.houseWorkType ? (a(), c("div", ee, [
|
|
184
|
+
e.houseWorkType && e.priceType === "openAcc" ? (a(), c(f, { key: 0 }, [
|
|
185
|
+
k(o(t._document.$t("deduction.afterType", {
|
|
186
|
+
type: t._document.$t(`deduction.${e.houseWorkType}_percentage`)
|
|
187
|
+
})), 1)
|
|
188
|
+
], 64)) : e.houseWorkType ? (a(), c(f, { key: 1 }, [
|
|
189
|
+
k(o(t._document.$t("chapters.articleItem.eligibleForDeduction", {
|
|
190
|
+
type: t._document.$t(`deduction.${e.houseWorkType}_percentage`)
|
|
191
|
+
})), 1)
|
|
192
|
+
], 64)) : n("", !0)
|
|
193
|
+
])) : n("", !0)
|
|
194
|
+
])
|
|
195
|
+
], 2);
|
|
196
|
+
}
|
|
197
|
+
const ie = /* @__PURE__ */ T(j, [["render", te], ["__scopeId", "data-v-0358ad9f"]]), re = {
|
|
198
|
+
name: "ArticleList",
|
|
199
|
+
components: {
|
|
200
|
+
DocChapterArticleItem: ie
|
|
201
|
+
},
|
|
202
|
+
emits: ["toggle-show-vat"],
|
|
203
|
+
mixins: [D([])],
|
|
204
|
+
props: {
|
|
205
|
+
articles: {
|
|
206
|
+
type: Array,
|
|
207
|
+
required: !0
|
|
208
|
+
},
|
|
209
|
+
showPrices: {
|
|
210
|
+
type: Boolean,
|
|
211
|
+
default: !0
|
|
212
|
+
},
|
|
213
|
+
showPricesIncVat: {
|
|
214
|
+
type: Boolean,
|
|
215
|
+
default: !0
|
|
216
|
+
},
|
|
217
|
+
parent: {
|
|
218
|
+
type: String,
|
|
219
|
+
default: ""
|
|
220
|
+
},
|
|
221
|
+
useVat: {
|
|
222
|
+
type: Boolean,
|
|
223
|
+
required: !0
|
|
224
|
+
},
|
|
225
|
+
vatType: {
|
|
226
|
+
type: String,
|
|
227
|
+
required: !0
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
computed: {
|
|
231
|
+
showVatToggle() {
|
|
232
|
+
return this.useVat && (this.articles || []).some(({ vat: t }) => t !== null);
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
methods: {
|
|
236
|
+
articleHouseWorkType: W
|
|
237
|
+
}
|
|
238
|
+
}, ae = { class: "article-list-wrapper" }, ce = { class: "article-head" };
|
|
239
|
+
function se(t, i, e, p, g, r) {
|
|
240
|
+
const d = v("DocChapterArticleItem"), u = B("tooltip");
|
|
241
|
+
return a(), c("div", ae, [
|
|
242
|
+
l("div", ce, [
|
|
243
|
+
l("div", null, o(t._document.$t("chapters.articleList.title")), 1),
|
|
244
|
+
e.showPrices && r.showVatToggle ? I((a(), c("div", {
|
|
245
|
+
key: 0,
|
|
246
|
+
style: { "text-decoration": "underline", cursor: "pointer" },
|
|
247
|
+
onClick: i[0] || (i[0] = (s) => t.$emit("toggle-show-vat", !e.showPricesIncVat))
|
|
248
|
+
}, [
|
|
249
|
+
k(o(t._document.$t(`vat.${e.showPricesIncVat ? "incVat" : "exVat"}`, {
|
|
250
|
+
thing: t._document.$t(`vat.${e.vatType}`)
|
|
251
|
+
})), 1)
|
|
252
|
+
])), [
|
|
253
|
+
[
|
|
254
|
+
u,
|
|
255
|
+
t._document.$t("chapters.articleList.changeShowVatTooltip", {
|
|
256
|
+
type: t._document.$t(`vat.${e.showPricesIncVat ? "exVat" : "incVat"}`, {
|
|
257
|
+
thing: t._document.$t(`vat.${e.vatType}`)
|
|
258
|
+
})
|
|
259
|
+
})
|
|
260
|
+
]
|
|
261
|
+
]) : n("", !0)
|
|
262
|
+
]),
|
|
263
|
+
(a(!0), c(f, null, b(e.articles, (s, m) => (a(), _(d, {
|
|
264
|
+
key: m,
|
|
265
|
+
_document: t._document,
|
|
266
|
+
title: s.name,
|
|
267
|
+
quantity: s.quantity,
|
|
268
|
+
unit: s.unit,
|
|
269
|
+
"unit-type": s.unitType,
|
|
270
|
+
"article-no": s.article_no,
|
|
271
|
+
"house-work-type": r.articleHouseWorkType(s),
|
|
272
|
+
price: e.showPrices ? s.price : null,
|
|
273
|
+
currency: s.currency,
|
|
274
|
+
vat: s.vat,
|
|
275
|
+
"price-type": s.priceType,
|
|
276
|
+
"show-price": s.showPrice,
|
|
277
|
+
position: s.position,
|
|
278
|
+
"show-prices-inc-vat": e.showPricesIncVat,
|
|
279
|
+
discount: s.discount,
|
|
280
|
+
"discount-type": s.discountType,
|
|
281
|
+
"total-amount": s.totalAmount
|
|
282
|
+
}, null, 8, ["_document", "title", "quantity", "unit", "unit-type", "article-no", "house-work-type", "price", "currency", "vat", "price-type", "show-price", "position", "show-prices-inc-vat", "discount", "discount-type", "total-amount"]))), 128))
|
|
283
|
+
]);
|
|
284
|
+
}
|
|
285
|
+
const oe = /* @__PURE__ */ T(re, [["render", se], ["__scopeId", "data-v-b30c0035"]]), ne = {
|
|
286
|
+
name: "PackageItem",
|
|
287
|
+
i18nOptions: {
|
|
288
|
+
namespaces: "PackageItem",
|
|
289
|
+
messages: {
|
|
290
|
+
en: {
|
|
291
|
+
selectTooltip: "Only your clients can select options"
|
|
292
|
+
},
|
|
293
|
+
sv: {
|
|
294
|
+
selectTooltip: "Enbart din kund kan välja ett paket"
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
components: {
|
|
299
|
+
ArticleList: oe,
|
|
300
|
+
TextEditor: G
|
|
301
|
+
},
|
|
302
|
+
emits: ["toggle", "toggle-show-vat"],
|
|
303
|
+
inject: {
|
|
304
|
+
isPdf: {
|
|
305
|
+
default: !1
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
props: {
|
|
309
|
+
workPackage: {
|
|
310
|
+
type: Object,
|
|
311
|
+
required: !0
|
|
312
|
+
},
|
|
313
|
+
type: {
|
|
314
|
+
type: String,
|
|
315
|
+
required: !0
|
|
316
|
+
},
|
|
317
|
+
canToggle: {
|
|
318
|
+
type: Boolean,
|
|
319
|
+
default: !1
|
|
320
|
+
},
|
|
321
|
+
isPreview: {
|
|
322
|
+
type: Boolean,
|
|
323
|
+
default: !1
|
|
324
|
+
},
|
|
325
|
+
showToggle: {
|
|
326
|
+
type: Boolean,
|
|
327
|
+
default: !1
|
|
328
|
+
},
|
|
329
|
+
showPricesIncVat: {
|
|
330
|
+
type: Boolean,
|
|
331
|
+
default: !0
|
|
332
|
+
},
|
|
333
|
+
headingColor: {
|
|
334
|
+
type: String,
|
|
335
|
+
default: "#03f"
|
|
336
|
+
},
|
|
337
|
+
_document: {
|
|
338
|
+
type: Object,
|
|
339
|
+
default: null
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
data() {
|
|
343
|
+
return {
|
|
344
|
+
internalShowDetails: !1,
|
|
345
|
+
tinycolor: A
|
|
346
|
+
};
|
|
347
|
+
},
|
|
348
|
+
computed: {
|
|
349
|
+
prices() {
|
|
350
|
+
return this.workPackage.prices;
|
|
351
|
+
},
|
|
352
|
+
totalBeforeDiscount() {
|
|
353
|
+
return (this.workPackage.articles || []).reduce((t, i) => {
|
|
354
|
+
const e = i.priceType === "openAcc" ? 1 : i.quantity;
|
|
355
|
+
let { price: p } = i;
|
|
356
|
+
return this.showPricesIncVat && i.priceType !== "markup" && (p *= (100 + i.vat) / 100), t + e * p;
|
|
357
|
+
}, 0);
|
|
358
|
+
},
|
|
359
|
+
showDetails: {
|
|
360
|
+
get() {
|
|
361
|
+
return this.type === "single" || this.workPackage.isSelected && !this.workPackage.toggable ? !0 : this.internalShowDetails || this.isPdf;
|
|
362
|
+
},
|
|
363
|
+
set(t) {
|
|
364
|
+
this.internalShowDetails = t;
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
description() {
|
|
368
|
+
const t = this._document ? this._document._doc : {};
|
|
369
|
+
return q(this.workPackage.data.description, t);
|
|
370
|
+
},
|
|
371
|
+
useVat() {
|
|
372
|
+
return this._document ? this._document.useVat : !1;
|
|
373
|
+
},
|
|
374
|
+
vatType() {
|
|
375
|
+
return this._document ? this._document.vatType : "vat";
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
methods: {
|
|
379
|
+
priceFormat(t, i = {}) {
|
|
380
|
+
return F(t, {
|
|
381
|
+
currency: this.prices.currency,
|
|
382
|
+
decimals: 2,
|
|
383
|
+
hideZeroDecimals: !0,
|
|
384
|
+
...i
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}, le = { class: "top-container" }, ue = {
|
|
389
|
+
key: 0,
|
|
390
|
+
style: { "font-weight": "800", "font-size": "calc(calc(1 * var(--rem)) + 4px)", "margin-bottom": "calc(0.5 * var(--rem))" }
|
|
391
|
+
}, de = {
|
|
392
|
+
key: 0,
|
|
393
|
+
class: "flex w-full justify-end",
|
|
394
|
+
style: { "margin-top": "calc(3 * var(--rem))" }
|
|
395
|
+
}, he = { style: { padding: `calc(0.75 * var(--rem)) calc(1 * var(--rem))
|
|
396
|
+
calc(0.75 * var(--rem)) calc(3 * var(--rem))`, "text-align": "right" } }, me = {
|
|
397
|
+
key: 0,
|
|
398
|
+
class: "price-total",
|
|
399
|
+
style: { color: "red", "text-decoration": "line-through", "font-size": "16px", "font-weight": "600" }
|
|
400
|
+
}, pe = { style: { "line-height": "1.2", "font-size": "13px" } }, ge = {
|
|
401
|
+
class: "price-total",
|
|
402
|
+
style: { padding: "2px 0 3px 0" }
|
|
403
|
+
}, ye = { class: "price-total" }, fe = {
|
|
404
|
+
key: 0,
|
|
405
|
+
class: "primary-text-color",
|
|
406
|
+
style: { "font-weight": "900" }
|
|
407
|
+
}, ke = {
|
|
408
|
+
key: 0,
|
|
409
|
+
style: { "line-height": "1.2", "font-size": "13px", padding: "2px 0 3px 0" }
|
|
410
|
+
}, ve = {
|
|
411
|
+
key: 1,
|
|
412
|
+
class: "flex w-full items-center justify-end",
|
|
413
|
+
style: { "background-color": "hsl(215, 10%, 95%)" }
|
|
414
|
+
}, _e = {
|
|
415
|
+
style: { "margin-right": "calc(0.5 * var(--rem))" },
|
|
416
|
+
viewBox: "0 0 24 24",
|
|
417
|
+
width: "18",
|
|
418
|
+
height: "18",
|
|
419
|
+
stroke: "currentColor",
|
|
420
|
+
"stroke-width": "3.5",
|
|
421
|
+
fill: "none",
|
|
422
|
+
"stroke-linecap": "round",
|
|
423
|
+
"stroke-linejoin": "round"
|
|
424
|
+
};
|
|
425
|
+
function we(t, i, e, p, g, r) {
|
|
426
|
+
const d = v("TextEditor"), u = v("ArticleList"), s = v("Animation"), m = v("CButton"), h = B("tooltip");
|
|
427
|
+
return a(), c("div", {
|
|
428
|
+
style: x({
|
|
429
|
+
...e.workPackage.isSelected && {
|
|
430
|
+
boxShadow: `0 0 0 2px ${e.headingColor}`
|
|
431
|
+
}
|
|
432
|
+
}),
|
|
433
|
+
class: P([{
|
|
434
|
+
"single-package": e.type === "single" || e.workPackage.isSelected && !e.workPackage.toggable
|
|
435
|
+
}, "package-container font-inter"])
|
|
436
|
+
}, [
|
|
437
|
+
l("div", le, [
|
|
438
|
+
e.workPackage.data.name ? (a(), c("div", ue, o(e.workPackage.data.name), 1)) : n("", !0),
|
|
439
|
+
l("div", null, [
|
|
440
|
+
r.description ? (a(), _(d, {
|
|
441
|
+
key: 0,
|
|
442
|
+
"model-value": r.description,
|
|
443
|
+
style: { "margin-bottom": "1em" }
|
|
444
|
+
}, null, 8, ["model-value"])) : n("", !0)
|
|
445
|
+
])
|
|
446
|
+
]),
|
|
447
|
+
V(s, null, {
|
|
448
|
+
default: S(() => [
|
|
449
|
+
I(V(u, {
|
|
450
|
+
_document: e._document,
|
|
451
|
+
articles: e.workPackage.articles,
|
|
452
|
+
"show-prices-inc-vat": e.showPricesIncVat,
|
|
453
|
+
"use-vat": r.useVat,
|
|
454
|
+
"vat-type": r.vatType,
|
|
455
|
+
parent: "packageGroup",
|
|
456
|
+
class: "articles-container",
|
|
457
|
+
onToggleShowVat: i[0] || (i[0] = (y) => t.$emit("toggle-show-vat", y))
|
|
458
|
+
}, null, 8, ["_document", "articles", "show-prices-inc-vat", "use-vat", "vat-type"]), [
|
|
459
|
+
[E, r.showDetails && e.workPackage.articles.length]
|
|
460
|
+
])
|
|
461
|
+
]),
|
|
462
|
+
_: 1
|
|
463
|
+
}),
|
|
464
|
+
e.type !== "single" && (e.workPackage.toggable || e.isPreview) && (r.prices.total || r.prices.type === "openAcc") ? (a(), c("div", de, [
|
|
465
|
+
l("div", he, [
|
|
466
|
+
r.prices.helpers.discount ? (a(), c("div", me, o(r.priceFormat(
|
|
467
|
+
e.showPricesIncVat ? r.totalBeforeDiscount : r.prices.subTotal + r.prices.helpers.discount
|
|
468
|
+
)), 1)) : n("", !0),
|
|
469
|
+
r.prices.type === "openAcc" ? (a(), c(f, { key: 1 }, [
|
|
470
|
+
l("div", pe, o(e._document.$t("price.pricing")), 1),
|
|
471
|
+
l("div", ge, o(e._document.$t("price.openAccPrice")), 1)
|
|
472
|
+
], 64)) : (a(), c(f, { key: 2 }, [
|
|
473
|
+
l("div", ye, [
|
|
474
|
+
e.type === "checkbox" ? (a(), c("span", fe, "+")) : n("", !0),
|
|
475
|
+
k(" " + o(r.priceFormat(e.showPricesIncVat ? r.prices.total : r.prices.subTotal)), 1)
|
|
476
|
+
]),
|
|
477
|
+
r.useVat ? (a(), c("div", ke, o(e._document.$t("price.price").capitalize()) + " " + o(e._document.$t(`vat.${e.showPricesIncVat ? "incVat" : "exVat"}`, {
|
|
478
|
+
thing: e._document.$t(`vat.${r.vatType}`)
|
|
479
|
+
})), 1)) : n("", !0)
|
|
480
|
+
], 64))
|
|
481
|
+
])
|
|
482
|
+
])) : n("", !0),
|
|
483
|
+
e.showToggle ? (a(), c("div", ve, [
|
|
484
|
+
r.isPdf ? n("", !0) : (a(), c(f, { key: 0 }, [
|
|
485
|
+
V(m, {
|
|
486
|
+
class: "package-button",
|
|
487
|
+
pattern: "tertiary",
|
|
488
|
+
type: "text",
|
|
489
|
+
icon: r.showDetails ? "arrow-up" : "arrow-down",
|
|
490
|
+
"icon-props": { size: 20 },
|
|
491
|
+
onClick: i[1] || (i[1] = (y) => r.showDetails = !r.showDetails)
|
|
492
|
+
}, {
|
|
493
|
+
default: S(() => [
|
|
494
|
+
k(o(e._document.$t("show", {
|
|
495
|
+
thing: e._document.$t(`${r.showDetails ? "less" : "detail_plural"}`)
|
|
496
|
+
})), 1)
|
|
497
|
+
]),
|
|
498
|
+
_: 1
|
|
499
|
+
}, 8, ["icon"]),
|
|
500
|
+
e.canToggle || e.isPreview ? I((a(), _(m, {
|
|
501
|
+
key: 0,
|
|
502
|
+
style: x({
|
|
503
|
+
backgroundColor: e.headingColor,
|
|
504
|
+
color: g.tinycolor.readability(e.headingColor, "#FFF") > 2.2 ? "#FFF" : "#000"
|
|
505
|
+
}),
|
|
506
|
+
class: P([{ "is-disabled": e.isPreview }, "package-button"]),
|
|
507
|
+
type: "text",
|
|
508
|
+
onClick: i[2] || (i[2] = (y) => e.canToggle ? t.$emit("toggle", e.workPackage.packageId) : null)
|
|
509
|
+
}, {
|
|
510
|
+
default: S(() => [
|
|
511
|
+
e.workPackage.isSelected ? (a(), c(f, { key: 0 }, [
|
|
512
|
+
(a(), c("svg", _e, i[3] || (i[3] = [
|
|
513
|
+
l("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
514
|
+
]))),
|
|
515
|
+
k(" " + o(e._document.$t("chapters.packageItem.selected")), 1)
|
|
516
|
+
], 64)) : (a(), c(f, { key: 1 }, [
|
|
517
|
+
k(o(e._document.$t(
|
|
518
|
+
`chapters.packageItem.${e.type === "radio" ? "select" : "add"}`
|
|
519
|
+
)), 1)
|
|
520
|
+
], 64))
|
|
521
|
+
]),
|
|
522
|
+
_: 1
|
|
523
|
+
}, 8, ["style", "class"])), [
|
|
524
|
+
[
|
|
525
|
+
h,
|
|
526
|
+
e.isPreview && {
|
|
527
|
+
content: t.$t("selectTooltip"),
|
|
528
|
+
distance: 5
|
|
529
|
+
}
|
|
530
|
+
]
|
|
531
|
+
]) : n("", !0)
|
|
532
|
+
], 64))
|
|
533
|
+
])) : n("", !0)
|
|
534
|
+
], 6);
|
|
535
|
+
}
|
|
536
|
+
const Pe = /* @__PURE__ */ T(ne, [["render", we], ["__scopeId", "data-v-d5b69771"]]), be = {
|
|
537
|
+
name: "PackagePricingSummary",
|
|
538
|
+
props: {
|
|
539
|
+
// PackageGroup.prices (format: calcPrices of one group)
|
|
540
|
+
prices: {
|
|
541
|
+
type: Object,
|
|
542
|
+
default: () => ({ region: {} })
|
|
543
|
+
},
|
|
544
|
+
showPrices: {
|
|
545
|
+
type: Boolean,
|
|
546
|
+
default: !0
|
|
547
|
+
},
|
|
548
|
+
_document: {
|
|
549
|
+
type: Object,
|
|
550
|
+
default: () => ({})
|
|
551
|
+
},
|
|
552
|
+
primaryColor: {
|
|
553
|
+
type: String,
|
|
554
|
+
default: "#03f"
|
|
555
|
+
},
|
|
556
|
+
placeholder: {
|
|
557
|
+
type: Boolean,
|
|
558
|
+
default: !1
|
|
559
|
+
},
|
|
560
|
+
showPricesIncVat: {
|
|
561
|
+
type: Boolean,
|
|
562
|
+
default: !0
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
computed: {
|
|
566
|
+
blocks() {
|
|
567
|
+
const {
|
|
568
|
+
type: t,
|
|
569
|
+
total: i,
|
|
570
|
+
maxTotal: e,
|
|
571
|
+
subTotal: p,
|
|
572
|
+
taxAmount: g,
|
|
573
|
+
roundingAmount: r,
|
|
574
|
+
currency: d
|
|
575
|
+
} = this.prices, u = [];
|
|
576
|
+
if (!d) return u;
|
|
577
|
+
const s = {
|
|
578
|
+
title: this._document.$t("chapters.pricingSummary.blocks.price"),
|
|
579
|
+
subTitle: this._document.$t("chapters.pricingSummary.blocks.summary")
|
|
580
|
+
}, m = this.getPricingInfo({
|
|
581
|
+
includeFixedCosts: !this.isOpenAccPricing
|
|
582
|
+
});
|
|
583
|
+
let h = this.hasDeductions ? this._document.$t(
|
|
584
|
+
"chapters.pricingSummary.blocks.deductionSubValue",
|
|
585
|
+
{
|
|
586
|
+
price: this.priceFormat(p + g + r, {
|
|
587
|
+
currency: d,
|
|
588
|
+
decimals: 2,
|
|
589
|
+
hideZeroDecimals: !0
|
|
590
|
+
})
|
|
591
|
+
}
|
|
592
|
+
) : null, y = i;
|
|
593
|
+
return this.prices.useVat && !this.showPricesIncVat && !this.hasDeductions && (y = p, h = `${this.priceFormat(i, {
|
|
594
|
+
currency: d,
|
|
595
|
+
decimals: 2,
|
|
596
|
+
hideZeroDecimals: !0
|
|
597
|
+
})} ${this._document.$t("vat.incVat")}`), ["fixed", "approx"].includes(t) && u.push({
|
|
598
|
+
header: s,
|
|
599
|
+
items: m,
|
|
600
|
+
footer: {
|
|
601
|
+
title: this._document.$t("chapters.pricingSummary.blocks.total"),
|
|
602
|
+
subTitle: t === "approx" ? this._document.$t("chapters.pricingSummary.blocks.approx") : null,
|
|
603
|
+
value: this.priceFormat(y, {
|
|
604
|
+
currency: d,
|
|
605
|
+
decimals: 2,
|
|
606
|
+
hideZeroDecimals: !0
|
|
607
|
+
}),
|
|
608
|
+
subValue: h
|
|
609
|
+
}
|
|
610
|
+
}), this.isOpenAccPricing && (u.push({
|
|
611
|
+
header: s,
|
|
612
|
+
items: m,
|
|
613
|
+
footer: e ? {
|
|
614
|
+
title: this._document.$t(
|
|
615
|
+
"chapters.pricingSummary.blocks.maxPrice"
|
|
616
|
+
),
|
|
617
|
+
value: this.priceFormat(this.calcMaxPrice, {
|
|
618
|
+
currency: d,
|
|
619
|
+
decimals: 2,
|
|
620
|
+
hideZeroDecimals: !0
|
|
621
|
+
})
|
|
622
|
+
} : null
|
|
623
|
+
}), i && u.push({
|
|
624
|
+
header: {
|
|
625
|
+
subTitle: this._document.$t(
|
|
626
|
+
"chapters.pricingSummary.blocks.subTitleArticles"
|
|
627
|
+
)
|
|
628
|
+
},
|
|
629
|
+
items: this.getPricingInfo({
|
|
630
|
+
includeFixedCosts: !0,
|
|
631
|
+
showType: !1
|
|
632
|
+
}),
|
|
633
|
+
footer: {
|
|
634
|
+
title: this._document.$t("chapters.pricingSummary.blocks.total"),
|
|
635
|
+
value: this.priceFormat(y, {
|
|
636
|
+
currency: d,
|
|
637
|
+
decimals: 2,
|
|
638
|
+
hideZeroDecimals: !0
|
|
639
|
+
}),
|
|
640
|
+
subValue: h
|
|
641
|
+
}
|
|
642
|
+
})), u;
|
|
643
|
+
},
|
|
644
|
+
isOpenAccPricing() {
|
|
645
|
+
return ["openAcc", "openAccMaxPrice"].includes(this.prices.type);
|
|
646
|
+
},
|
|
647
|
+
showIncVat() {
|
|
648
|
+
return w(this._document, "prices.helpers.isIndivid", !0);
|
|
649
|
+
},
|
|
650
|
+
calcMaxPrice() {
|
|
651
|
+
return this.prices.maxTotal ? this.showIncVat ? this.prices.maxTotal * 1.25 : this.prices.maxTotal : null;
|
|
652
|
+
},
|
|
653
|
+
showPricingCard() {
|
|
654
|
+
const { subTotal: t, total: i, maxTotal: e, currency: p } = this.prices;
|
|
655
|
+
return p && (this.isOpenAccPricing || this.placeholder || t || i || e);
|
|
656
|
+
},
|
|
657
|
+
hasDeductions() {
|
|
658
|
+
return this.prices.region && this.prices.region.houseWorkAmount;
|
|
659
|
+
},
|
|
660
|
+
vatType() {
|
|
661
|
+
return w(this, "_document.vatType");
|
|
662
|
+
}
|
|
663
|
+
},
|
|
664
|
+
methods: {
|
|
665
|
+
priceFormat(t, i = { showZero: !0 }) {
|
|
666
|
+
return F(t, i);
|
|
667
|
+
},
|
|
668
|
+
deductionText(t = !0) {
|
|
669
|
+
let i = "";
|
|
670
|
+
return this.hasDeductions && (i = this._document.$t(
|
|
671
|
+
"chapters.pricingSummary.blocks.typeDeduction",
|
|
672
|
+
{
|
|
673
|
+
type: this._document.$t(
|
|
674
|
+
`deduction.${this.prices.region.houseWorkType}_percentage`
|
|
675
|
+
)
|
|
676
|
+
}
|
|
677
|
+
)), t || (i = i.charAt(0).toLowerCase() + i.slice(1)), i;
|
|
678
|
+
},
|
|
679
|
+
getPricingInfo({ includeFixedCosts: t = !0, showType: i = !0 }) {
|
|
680
|
+
const {
|
|
681
|
+
type: e,
|
|
682
|
+
subTotal: p,
|
|
683
|
+
roundingAmount: g,
|
|
684
|
+
taxAmount: r,
|
|
685
|
+
maxTotal: d,
|
|
686
|
+
region: u = {},
|
|
687
|
+
currency: s,
|
|
688
|
+
helpers: { discount: m }
|
|
689
|
+
} = this.prices;
|
|
690
|
+
let h = [];
|
|
691
|
+
return u.country === "sweden" && (e === "openAccMaxPrice" && d && !t && (h.push({
|
|
692
|
+
label: this._document.$t(
|
|
693
|
+
"chapters.pricingSummary.blocks.maxPriceVat",
|
|
694
|
+
{ vat: this._document.$t("vat.exVat") }
|
|
695
|
+
),
|
|
696
|
+
value: this.priceFormat(d, {
|
|
697
|
+
currency: s,
|
|
698
|
+
decimals: 2,
|
|
699
|
+
hideZeroDecimals: !0
|
|
700
|
+
})
|
|
701
|
+
}), u.reverseVat || h.push({
|
|
702
|
+
label: this._document.$t(
|
|
703
|
+
"chapters.pricingSummary.blocks.maxPriceVat",
|
|
704
|
+
{ vat: this._document.$t("vat.incVat") }
|
|
705
|
+
),
|
|
706
|
+
value: this.priceFormat(d * 1.25, {
|
|
707
|
+
currency: s,
|
|
708
|
+
decimals: 2,
|
|
709
|
+
hideZeroDecimals: !0
|
|
710
|
+
})
|
|
711
|
+
})), u.houseWorkType && u.houseWorkAmount && t && h.push({
|
|
712
|
+
label: this._document.$t("deduction.type", {
|
|
713
|
+
type: this._document.$t(
|
|
714
|
+
`deduction.${u.houseWorkType}${u.houseWorkManualAmount === null ? "_percentage" : ""}`
|
|
715
|
+
)
|
|
716
|
+
}),
|
|
717
|
+
value: this.priceFormat(-1 * u.houseWorkAmount, {
|
|
718
|
+
currency: s,
|
|
719
|
+
decimals: 2,
|
|
720
|
+
hideZeroDecimals: !0
|
|
721
|
+
})
|
|
722
|
+
})), t && (h = [
|
|
723
|
+
{
|
|
724
|
+
label: this._document.$t("chapters.pricingSummary.blocks.net"),
|
|
725
|
+
value: this.priceFormat(p, {
|
|
726
|
+
currency: s,
|
|
727
|
+
decimals: 2,
|
|
728
|
+
hideZeroDecimals: !0
|
|
729
|
+
})
|
|
730
|
+
},
|
|
731
|
+
...this.prices.useVat ? [
|
|
732
|
+
{
|
|
733
|
+
label: this._document.$t(`vat.${this.vatType}`).capitalize(),
|
|
734
|
+
value: this.priceFormat(u.reverseVat ? 0 : r, {
|
|
735
|
+
showZero: !0,
|
|
736
|
+
currency: s,
|
|
737
|
+
decimals: 2,
|
|
738
|
+
hideZeroDecimals: !0
|
|
739
|
+
})
|
|
740
|
+
}
|
|
741
|
+
] : [],
|
|
742
|
+
...h,
|
|
743
|
+
...this.prices.rounding.enabled && this.prices.rounding.show ? [
|
|
744
|
+
{
|
|
745
|
+
label: this._document.$t(
|
|
746
|
+
"chapters.pricingSummary.blocks.rounding"
|
|
747
|
+
),
|
|
748
|
+
value: this.priceFormat(g, {
|
|
749
|
+
decimals: 2,
|
|
750
|
+
showZero: !0,
|
|
751
|
+
currency: s,
|
|
752
|
+
hideZeroDecimals: !0
|
|
753
|
+
})
|
|
754
|
+
}
|
|
755
|
+
] : [],
|
|
756
|
+
...this.prices.helpers.discount ? [
|
|
757
|
+
{
|
|
758
|
+
label: this._document.$t(
|
|
759
|
+
"chapters.pricingSummary.blocks.discount"
|
|
760
|
+
),
|
|
761
|
+
value: `-${this.priceFormat(m, {
|
|
762
|
+
decimals: 2,
|
|
763
|
+
showZero: !0,
|
|
764
|
+
currency: s,
|
|
765
|
+
hideZeroDecimals: !0
|
|
766
|
+
})}`
|
|
767
|
+
}
|
|
768
|
+
] : []
|
|
769
|
+
]), i && e !== "fixed" && (h = [
|
|
770
|
+
{
|
|
771
|
+
label: this._document.$t("price.pricing").capitalize(),
|
|
772
|
+
value: this._document.$t(`price.${e}`)
|
|
773
|
+
},
|
|
774
|
+
...h
|
|
775
|
+
]), h;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}, Te = {
|
|
779
|
+
key: 0,
|
|
780
|
+
id: "price",
|
|
781
|
+
style: { "margin-top": "calc(2 * var(--rem))", "margin-bottom": "calc(2 * var(--rem))", position: "relative" },
|
|
782
|
+
class: "font-inter"
|
|
783
|
+
}, xe = { class: "block-header" }, Ve = {
|
|
784
|
+
key: 0,
|
|
785
|
+
style: { "font-weight": "800" }
|
|
786
|
+
}, Se = {
|
|
787
|
+
key: 1,
|
|
788
|
+
style: { "font-size": "16px", "margin-left": "0.5em" }
|
|
789
|
+
}, Ie = {
|
|
790
|
+
key: 0,
|
|
791
|
+
class: "block-body"
|
|
792
|
+
}, Ae = {
|
|
793
|
+
key: 0,
|
|
794
|
+
style: { "font-weight": "500", "font-size": "calc(1em - 2px)" }
|
|
795
|
+
}, De = { class: "text-right" }, Fe = {
|
|
796
|
+
key: 0,
|
|
797
|
+
class: "block-body-footer-hint"
|
|
798
|
+
}, Ce = {
|
|
799
|
+
key: 0,
|
|
800
|
+
class: "terms-text"
|
|
801
|
+
}, Be = {
|
|
802
|
+
key: 1,
|
|
803
|
+
id: "villkor-avdrag",
|
|
804
|
+
class: "terms-text"
|
|
805
|
+
}, ze = {
|
|
806
|
+
key: 2,
|
|
807
|
+
class: "terms-text"
|
|
808
|
+
}, Me = {
|
|
809
|
+
key: 1,
|
|
810
|
+
class: "flex w-full flex-col items-center justify-center",
|
|
811
|
+
style: { position: "absolute", top: "calc(1 * var(--rem))", left: "50%", transform: "translate(-50%, 0%)", "background-color": "white", width: "350px", "max-width": "90%", "border-radius": "3px", padding: "calc(2 * var(--rem))", "box-shadow": `0 1px rgba(0, 0, 0, 0.1),
|
|
812
|
+
0 calc(0.5 * var(--rem)) calc(2 * var(--rem)) calc(-0.5 * var(--rem))
|
|
813
|
+
rgba(0, 0, 0, 0.3)`, "text-align": "center", "font-size": "16px" }
|
|
814
|
+
}, Oe = {
|
|
815
|
+
width: "200",
|
|
816
|
+
height: "100",
|
|
817
|
+
viewBox: "0 0 418 211",
|
|
818
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
819
|
+
}, We = {
|
|
820
|
+
fill: "none",
|
|
821
|
+
"fill-rule": "evenodd"
|
|
822
|
+
}, qe = ["fill"], Ee = {
|
|
823
|
+
"font-family": "Inter-Regular, Inter",
|
|
824
|
+
"font-size": "24",
|
|
825
|
+
fill: "#FFF"
|
|
826
|
+
}, Le = {
|
|
827
|
+
x: "332.4",
|
|
828
|
+
y: "173"
|
|
829
|
+
}, Ze = { style: { "padding-top": "1em", "font-weight": "600", "font-size": "18px" } }, Ne = { style: { "font-weight": "600" } };
|
|
830
|
+
function Ge(t, i, e, p, g, r) {
|
|
831
|
+
return e._document.readPrices ? (a(), c("div", Te, [
|
|
832
|
+
r.showPricingCard ? (a(), c("div", {
|
|
833
|
+
key: 0,
|
|
834
|
+
class: P([{ faded: e.placeholder }, "pricing-container"])
|
|
835
|
+
}, [
|
|
836
|
+
(a(!0), c(f, null, b(r.blocks, ({ header: d, items: u, footer: s }, m) => (a(), c("div", {
|
|
837
|
+
key: m,
|
|
838
|
+
class: P([{ first: m === 0 }, "block-container print-avoid-break-inside"])
|
|
839
|
+
}, [
|
|
840
|
+
l("div", xe, [
|
|
841
|
+
d.title ? (a(), c("div", Ve, o(d.title), 1)) : n("", !0),
|
|
842
|
+
d.subTitle ? (a(), c("div", Se, o(d.subTitle), 1)) : n("", !0)
|
|
843
|
+
]),
|
|
844
|
+
u.length || s ? (a(), c("div", Ie, [
|
|
845
|
+
(a(!0), c(f, null, b(u, ({ label: h, value: y }, z) => (a(), c("div", {
|
|
846
|
+
key: `item-${z}-${m}`,
|
|
847
|
+
class: P([m === 0 && "primary-light-background", "block-body-item"]),
|
|
848
|
+
style: x(m !== 0 && { borderBottom: "1px solid hsl(210, 15%, 85%)" })
|
|
849
|
+
}, [
|
|
850
|
+
l("div", null, o(h), 1),
|
|
851
|
+
l("div", null, o(y), 1)
|
|
852
|
+
], 6))), 128)),
|
|
853
|
+
s ? (a(), c("div", {
|
|
854
|
+
key: 0,
|
|
855
|
+
style: x({ "border-top": `4px solid ${e.primaryColor}` }),
|
|
856
|
+
class: "block-body-footer"
|
|
857
|
+
}, [
|
|
858
|
+
l("div", null, [
|
|
859
|
+
k(o(s.title) + " ", 1),
|
|
860
|
+
s.subTitle ? (a(), c("div", Ae, o(s.subTitle), 1)) : n("", !0)
|
|
861
|
+
]),
|
|
862
|
+
l("div", De, [
|
|
863
|
+
l("div", null, o(s.value), 1),
|
|
864
|
+
s.subValue ? (a(), c("div", Fe, o(s.subValue), 1)) : n("", !0)
|
|
865
|
+
])
|
|
866
|
+
], 4)) : n("", !0)
|
|
867
|
+
])) : n("", !0)
|
|
868
|
+
], 2))), 128)),
|
|
869
|
+
e.prices.region && e.prices.region.reverseVat ? (a(), c("div", Ce, o(e._document.$t("chapters.pricingSummary.terms.reverseVat")), 1)) : n("", !0),
|
|
870
|
+
e.prices.region && e.prices.region.houseWorkType ? (a(), c("div", Be, o(e._document.$t("chapters.pricingSummary.terms.houseWork", {
|
|
871
|
+
type: e._document.$t(
|
|
872
|
+
`deduction.${e.prices.region.houseWorkType}_percentage`
|
|
873
|
+
)
|
|
874
|
+
})), 1)) : n("", !0),
|
|
875
|
+
e.prices.type === "approx" && e.prices.region && e.prices.region.houseWorkType === "rot" ? (a(), c("div", ze, o(e._document.$t("chapters.pricingSummary.terms.houseWorkApprox")), 1)) : n("", !0)
|
|
876
|
+
], 2)) : n("", !0),
|
|
877
|
+
e.placeholder ? (a(), c("div", Me, [
|
|
878
|
+
(a(), c("svg", Oe, [
|
|
879
|
+
i[3] || (i[3] = L('<defs data-v-16cd51d3><filter id="a" x="-30.7%" y="-26.2%" width="160%" height="155%" filterUnits="objectBoundingBox" data-v-16cd51d3><feOffset dy="3" in="SourceAlpha" result="shadowOffsetOuter1" data-v-16cd51d3></feOffset><feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1" data-v-16cd51d3></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" in="shadowBlurOuter1" result="shadowMatrixOuter1" data-v-16cd51d3></feColorMatrix><feMerge data-v-16cd51d3><feMergeNode in="shadowMatrixOuter1" data-v-16cd51d3></feMergeNode><feMergeNode in="SourceGraphic" data-v-16cd51d3></feMergeNode></feMerge></filter></defs>', 1)),
|
|
880
|
+
l("g", We, [
|
|
881
|
+
i[0] || (i[0] = l("path", {
|
|
882
|
+
stroke: "#E4E4E4",
|
|
883
|
+
"stroke-width": "3",
|
|
884
|
+
d: "M1.5 1.5h415v187H1.5z"
|
|
885
|
+
}, null, -1)),
|
|
886
|
+
l("path", {
|
|
887
|
+
fill: e.primaryColor,
|
|
888
|
+
"fill-rule": "nonzero",
|
|
889
|
+
d: "M282 139h136v51H282z"
|
|
890
|
+
}, null, 8, qe),
|
|
891
|
+
i[1] || (i[1] = l("g", {
|
|
892
|
+
filter: "url(#a)",
|
|
893
|
+
transform: "translate(365.5 165)"
|
|
894
|
+
}, [
|
|
895
|
+
l("path", {
|
|
896
|
+
d: "M8.2 30.7c-.7-.9-1.6-2.7-3.1-5-.9-1.3-3-3.6-3.7-4.8a3.3 3.3 0 013.2-5c1.3.2 2.5.8 3.4 1.8a16 16 0 011.8 2l.9 1.2c.5.6.8 1.2.5.3-.1-1.3-.4-3.3-.9-5.2l-.7-2.8c-.3-1-.4-2-.8-3.1l-.7-3.7a7 7 0 01.7-4.6 3 3 0 013.2-.6c1.1.8 2 2 2.4 3.3.6 1.6 1 3.3 1.3 5 .4 2.5 1.2 6.1 1.2 6.9 0-1-.2-2.9 0-3.8.1-.9.8-1.6 1.7-2a5 5 0 012.3-.1c.7.1 1.4.6 1.9 1.2.6 1.5.9 3 1 4.6 0-1.4.2-2.7.6-4 .4-.6 1-1 1.8-1.3a7 7 0 012.4 0c.7.3 1.3.7 1.8 1.3.5 1.3.8 2.7.9 4.1 0 .4.2-1 .7-1.8a2.5 2.5 0 114.8 1.6v5.6c-.1 1.5-.3 3-.6 4.4-.5 1.2-1 2.4-1.8 3.6a18 18 0 00-3 4.5 10 10 0 000 4.8h-3c-1-.2-2.2-2.1-2.5-2.7a1 1 0 00-1.7 0c-.6 1-1.8 2.6-2.6 2.8h-7.9s.5-2.6-.6-3.5l-2.8-2.6-2.1-2.4z",
|
|
897
|
+
fill: "#FFF",
|
|
898
|
+
"fill-rule": "nonzero"
|
|
899
|
+
}),
|
|
900
|
+
l("path", {
|
|
901
|
+
d: "M8.2 30.7c-.7-.9-1.6-2.7-3.1-5-.9-1.3-3-3.6-3.7-4.8a3.3 3.3 0 013.2-5c1.3.2 2.5.8 3.4 1.8a16 16 0 011.8 2l.9 1.2c.5.6.8 1.2.5.3-.1-1.3-.4-3.3-.9-5.2l-.7-2.8c-.3-1-.4-2-.8-3.1l-.7-3.7a7 7 0 01.7-4.6 3 3 0 013.2-.6c1.1.8 2 2 2.4 3.3.6 1.6 1 3.3 1.3 5 .4 2.5 1.2 6.1 1.2 6.9 0-1-.2-2.9 0-3.8.1-.9.8-1.6 1.7-2a5 5 0 012.3-.1c.7.1 1.4.6 1.9 1.2.6 1.5.9 3 1 4.6 0-1.4.2-2.7.6-4 .4-.6 1-1 1.8-1.3a7 7 0 012.4 0c.7.3 1.3.7 1.8 1.3.5 1.3.8 2.7.9 4.1 0 .4.2-1 .7-1.8a2.5 2.5 0 114.8 1.6v5.6c-.1 1.5-.3 3-.6 4.4-.5 1.2-1 2.4-1.8 3.6a18 18 0 00-3 4.5 10 10 0 000 4.8h-3c-1-.2-2.2-2.1-2.5-2.7a1 1 0 00-1.7 0c-.6 1-1.8 2.6-2.6 2.8h-7.9s.5-2.6-.6-3.5l-2.8-2.6-2.1-2.4z",
|
|
902
|
+
stroke: "#000",
|
|
903
|
+
"stroke-width": "1.9",
|
|
904
|
+
"stroke-linecap": "round",
|
|
905
|
+
"stroke-linejoin": "round"
|
|
906
|
+
}),
|
|
907
|
+
l("path", {
|
|
908
|
+
d: "M29.4 32v-8.6a1 1 0 00-1.9 0v8.7a1 1 0 001.9 0zM24.4 32v-8.6a1 1 0 00-1.9 0v8.7a1 1 0 002 0zM17.5 23.4v8.7a1 1 0 102 0l-.1-8.7a1 1 0 10-1.9 0z",
|
|
909
|
+
fill: "#000",
|
|
910
|
+
"fill-rule": "nonzero"
|
|
911
|
+
})
|
|
912
|
+
], -1)),
|
|
913
|
+
l("text", Ee, [
|
|
914
|
+
l("tspan", Le, o(e._document.$t("select")), 1)
|
|
915
|
+
]),
|
|
916
|
+
i[2] || (i[2] = l("path", {
|
|
917
|
+
fill: "#E4E4E4",
|
|
918
|
+
"fill-rule": "nonzero",
|
|
919
|
+
d: "M28 27h124v24H28zM28 64h355v11H28zM28 82h355v12H28zM28 103h178v12H28z"
|
|
920
|
+
}, null, -1))
|
|
921
|
+
])
|
|
922
|
+
])),
|
|
923
|
+
l("div", Ze, o(e._document.$t("chapters.pricingSummary.placeholder.title")), 1),
|
|
924
|
+
l("div", null, [
|
|
925
|
+
k(o(e._document.$t("chapters.pricingSummary.placeholder.description")), 1),
|
|
926
|
+
l("span", Ne, o(e._document.$t("chapters.pricingSummary.placeholder.descriptionBold")), 1),
|
|
927
|
+
i[4] || (i[4] = k(". "))
|
|
928
|
+
])
|
|
929
|
+
])) : n("", !0)
|
|
930
|
+
])) : n("", !0);
|
|
931
|
+
}
|
|
932
|
+
const je = /* @__PURE__ */ T(be, [["render", Ge], ["__scopeId", "data-v-16cd51d3"]]), $e = {
|
|
933
|
+
name: "PackageGroup",
|
|
934
|
+
components: {
|
|
935
|
+
PackageItem: Pe,
|
|
936
|
+
PackagePricingSummary: je,
|
|
937
|
+
ErrorCallout: M
|
|
938
|
+
},
|
|
939
|
+
mixins: [
|
|
940
|
+
D(["type", "packages", "hideGroupPrice"], { useEmit: !1 })
|
|
941
|
+
],
|
|
942
|
+
props: {
|
|
943
|
+
validator: {
|
|
944
|
+
type: Object,
|
|
945
|
+
default: () => ({})
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
data() {
|
|
949
|
+
return {
|
|
950
|
+
showPricesIncVat: !0
|
|
951
|
+
};
|
|
952
|
+
},
|
|
953
|
+
computed: {
|
|
954
|
+
prices() {
|
|
955
|
+
return (this._document.packageGroups.getPackageGroupUniqId(
|
|
956
|
+
this._value.groupId
|
|
957
|
+
) || {}).prices || {};
|
|
958
|
+
},
|
|
959
|
+
showToggle() {
|
|
960
|
+
return this.type !== "single";
|
|
961
|
+
},
|
|
962
|
+
canToggle() {
|
|
963
|
+
const { hasAnswers: t } = this._document, { hasAnswered: i, canAnswer: e } = this._document.answerActions || {};
|
|
964
|
+
return !t && this.type !== "single" && !i && e;
|
|
965
|
+
},
|
|
966
|
+
fixedPackages() {
|
|
967
|
+
return this.packages.filter((t) => !t.toggable && t.isSelected);
|
|
968
|
+
},
|
|
969
|
+
toggablePackages() {
|
|
970
|
+
return this.packages.filter((t) => !(!t.toggable && t.isSelected));
|
|
971
|
+
},
|
|
972
|
+
primaryColor() {
|
|
973
|
+
let t = w(this, '_document.data.css[".chapter"]["--accentColor"]') || w(this, "_document.theme.headingColor");
|
|
974
|
+
function i() {
|
|
975
|
+
A.readability(t, "#fff") < 1.8 && (t = A(t).darken(5).toString(), i());
|
|
976
|
+
}
|
|
977
|
+
return i(), t;
|
|
978
|
+
},
|
|
979
|
+
selectedPackages() {
|
|
980
|
+
return this.packages.filter(({ isSelected: t }) => t);
|
|
981
|
+
}
|
|
982
|
+
},
|
|
983
|
+
created() {
|
|
984
|
+
const {
|
|
985
|
+
isPreview: t,
|
|
986
|
+
setPricesIncVat: i = null,
|
|
987
|
+
useVat: e = Z[N.brand].defaultRegion === "SE"
|
|
988
|
+
} = w(this, "_document", {});
|
|
989
|
+
t && i !== null ? this.showPricesIncVat = i : this.showPricesIncVat = w(this, "_document.prices.helpers.isIndivid", !0) && e;
|
|
990
|
+
},
|
|
991
|
+
methods: {
|
|
992
|
+
onToggle(t) {
|
|
993
|
+
if (this.type === "single") return;
|
|
994
|
+
const i = this.packages.findIndex(({ packageId: e }) => e === t);
|
|
995
|
+
i === -1 || this.type === "radio" && this.packages[i].isSelected || (this.setField({
|
|
996
|
+
key: `${this._value.packages}[${i}].isSelected`,
|
|
997
|
+
value: !this.packages[i].isSelected
|
|
998
|
+
}), this.type === "radio" && this.packages.forEach((e, p) => {
|
|
999
|
+
p !== i && this.setField({
|
|
1000
|
+
key: `${this._value.packages}[${p}].isSelected`,
|
|
1001
|
+
value: !1
|
|
1002
|
+
});
|
|
1003
|
+
}));
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
}, He = { style: { position: "relative" } }, Ue = { key: 0 }, Qe = {
|
|
1007
|
+
key: 0,
|
|
1008
|
+
style: { padding: "calc(0.5 * var(--rem))", "line-height": "2", color: "hsla(0, 0%, 0%, 0.65)", "font-weight": "600", "font-size": "calc(1 * var(--rem))" }
|
|
1009
|
+
};
|
|
1010
|
+
function Re(t, i, e, p, g, r) {
|
|
1011
|
+
const d = v("PackageItem"), u = v("ErrorCallout"), s = v("PackagePricingSummary");
|
|
1012
|
+
return a(), c("div", He, [
|
|
1013
|
+
(a(!0), c(f, null, b(r.fixedPackages, (m, h) => (a(), _(d, {
|
|
1014
|
+
key: h,
|
|
1015
|
+
type: t.type,
|
|
1016
|
+
"work-package": t._document.packageGroups.getPackageById(m.packageId),
|
|
1017
|
+
"heading-color": r.primaryColor,
|
|
1018
|
+
"can-toggle": r.canToggle,
|
|
1019
|
+
"show-prices-inc-vat": g.showPricesIncVat,
|
|
1020
|
+
_document: t._document,
|
|
1021
|
+
onToggle: r.onToggle,
|
|
1022
|
+
onToggleShowVat: i[0] || (i[0] = (y) => g.showPricesIncVat = y)
|
|
1023
|
+
}, null, 8, ["type", "work-package", "heading-color", "can-toggle", "show-prices-inc-vat", "_document", "onToggle"]))), 128)),
|
|
1024
|
+
r.toggablePackages.length ? (a(), c("div", Ue, [
|
|
1025
|
+
r.fixedPackages.length && r.toggablePackages.length ? (a(), c("div", Qe, o(t._document.$t("chapters.packageGroup.selectableOptions")), 1)) : n("", !0),
|
|
1026
|
+
(a(!0), c(f, null, b(r.toggablePackages, (m, h) => (a(), _(d, {
|
|
1027
|
+
key: `fixed-${h}`,
|
|
1028
|
+
"work-package": t._document.packageGroups.getPackageById(m.packageId),
|
|
1029
|
+
type: t.type,
|
|
1030
|
+
"heading-color": r.primaryColor,
|
|
1031
|
+
"show-toggle": r.showToggle,
|
|
1032
|
+
"can-toggle": r.canToggle,
|
|
1033
|
+
"is-preview": t._document.isPreview,
|
|
1034
|
+
"show-prices-inc-vat": g.showPricesIncVat,
|
|
1035
|
+
_document: t._document,
|
|
1036
|
+
onToggle: r.onToggle,
|
|
1037
|
+
onToggleShowVat: i[1] || (i[1] = (y) => g.showPricesIncVat = y)
|
|
1038
|
+
}, null, 8, ["work-package", "type", "heading-color", "show-toggle", "can-toggle", "is-preview", "show-prices-inc-vat", "_document", "onToggle"]))), 128))
|
|
1039
|
+
])) : n("", !0),
|
|
1040
|
+
e.validator.$invalid && e.validator.$dirty ? (a(), _(u, {
|
|
1041
|
+
key: 1,
|
|
1042
|
+
message: t._document.$t("chapters.packageGroup.errorCallout"),
|
|
1043
|
+
style: { "padding-bottom": "calc(1.5 * var(--rem))" }
|
|
1044
|
+
}, null, 8, ["message"])) : n("", !0),
|
|
1045
|
+
t.hideGroupPrice ? n("", !0) : (a(), _(s, {
|
|
1046
|
+
key: 2,
|
|
1047
|
+
prices: r.prices,
|
|
1048
|
+
_document: t._document,
|
|
1049
|
+
"show-prices-inc-vat": g.showPricesIncVat,
|
|
1050
|
+
"primary-color": r.primaryColor,
|
|
1051
|
+
placeholder: !r.selectedPackages.length
|
|
1052
|
+
}, null, 8, ["prices", "_document", "show-prices-inc-vat", "primary-color", "placeholder"]))
|
|
1053
|
+
]);
|
|
1054
|
+
}
|
|
1055
|
+
const tt = /* @__PURE__ */ T($e, [["render", Re]]);
|
|
1056
|
+
export {
|
|
1057
|
+
tt as default
|
|
1058
|
+
};
|