@cling-se/widget 0.17.3 → 0.18.0
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 +7 -0
- package/dist/AddClientCallout-Bod9Eqx4.js +101 -0
- package/dist/AnswerModal-a2cyKFbt.js +3371 -0
- package/dist/AttachmentItem-DBUqckCS.js +171 -0
- package/dist/BaseUpload-DrWzuvbS.js +6503 -0
- package/dist/BlockMedia-DuE_K9hR.js +103 -0
- package/dist/CCallout-CM1VsH30.js +104 -0
- package/dist/{CCurrencyDropdown-CXXQu8th.js → CCurrencyDropdown-C_lAaq4P.js} +91 -53
- package/dist/CDropdownItem-DMUAJ90n.js +749 -0
- package/dist/CFormField.vue_vue_type_script_setup_true_lang-BqAyWe3T.js +292 -0
- package/dist/{CPhoneFormat-BtBGl8b4.js → CPhoneFormat-Dnn_cKk7.js} +13 -21
- package/dist/CPhoneInput-DuGkDiv-.js +207 -0
- package/dist/CPriceInput-B7DYzKcF.js +142 -0
- package/dist/CSelect-BZZDr27O.js +98 -0
- package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-D2jDhnYI.js +51 -0
- package/dist/ClientAutocomplete-DuaJ5zDf.js +532 -0
- package/dist/ClientModal-CaMSjLkD.js +1188 -0
- package/dist/ColorPicker-BISZPQ6j.js +1408 -0
- package/dist/CompanyModal-ClTcmU4Y.js +250 -0
- package/dist/ContentWrapper-Bj7jbWU0.js +265 -0
- package/dist/CoverBlockSettings-AXyiLxrF.js +861 -0
- package/dist/DocAnswer-Bu09V33D.js +33 -0
- package/dist/DocDetails-B6-2LKsO.js +452 -0
- package/dist/DocForm-CFN8LWSd.js +6772 -0
- package/dist/DocFormSend-D1CUhy4n.js +171 -0
- package/dist/DocLinks-CuliFqtN.js +36 -0
- package/dist/DocModalBase-BxKsnwN-.js +29 -0
- package/dist/DocPrint-B_HJ_RET.js +399 -0
- package/dist/DocReceipt-D-A1TaTI.js +341 -0
- package/dist/DocSendReminder-BKTJonzh.js +181 -0
- package/dist/{DocTextEditor-yD9Dt_um.js → DocTextEditor-CEPcJT2o.js} +7907 -5579
- package/dist/DocTimeline-CF9S4YDZ.js +537 -0
- package/dist/DocumentClient-7mbq2QA4.js +90 -0
- package/dist/DocumentLayout-DkFlHgW6.js +1434 -0
- package/dist/DocumentLogotype-BTYMdpNi.js +162 -0
- package/dist/DocumentVoided-CWr5WMUv.js +33 -0
- package/dist/EmbedInput-SevVEpwc.js +156 -0
- package/dist/EmbedSettings-YMbUmp1O.js +103 -0
- package/dist/ErrorCallout-CQo2iF9c.js +34 -0
- package/dist/FilePreviewModal-C0xBeoAz.js +202 -0
- package/dist/Flag-BObij6SN.js +41 -0
- package/dist/HeaderSettings-C77pR78n.js +720 -0
- package/dist/ImageSelectModal-DKdU-0uq.js +119 -0
- package/dist/ImageUploadWrapper-BGkS5Cll.js +1585 -0
- package/dist/Index-B3y-jq9s.js +1098 -0
- package/dist/Index-B41pUREi.js +47 -0
- package/dist/Index-BEyeS1OG.js +52 -0
- package/dist/Index-BG5j8ZFP.js +93 -0
- package/dist/Index-BOT65yQR.js +68 -0
- package/dist/Index-BQNl-cXP.js +28 -0
- package/dist/Index-BY6xsS7C.js +38 -0
- package/dist/Index-Bh0Xv5ry.js +163 -0
- package/dist/Index-Bn4FSQcx.js +228 -0
- package/dist/Index-BrRIAede.js +87 -0
- package/dist/Index-C-6um0kX.js +76 -0
- package/dist/{Index-C_aIQ908.js → Index-C-gHa5xk.js} +319 -214
- package/dist/Index-C0wcjKCH.js +629 -0
- package/dist/Index-C6BbUFYw.js +160 -0
- package/dist/Index-C8xwJ0m1.js +200 -0
- package/dist/Index-CKgFEJF4.js +140 -0
- package/dist/{Index-Dfq7egc1.js → Index-CQwmu4f1.js} +47 -60
- package/dist/Index-CXchTpBa.js +74 -0
- package/dist/{Index-Ch9r5yhG.js → Index-CYoRt8PA.js} +9 -17
- package/dist/Index-CZZNQ4q5.js +39 -0
- package/dist/Index-CkaAs5ms.js +136 -0
- package/dist/Index-CtpXaBz8.js +363 -0
- package/dist/Index-CxDsSGtZ.js +126 -0
- package/dist/Index-DFkTBm02.js +102 -0
- package/dist/Index-DP3ll8F-.js +70 -0
- package/dist/{Index-RWMPRDAE.js → Index-DPDzMKQa.js} +10 -18
- package/dist/Index-DvxSig3z.js +25 -0
- package/dist/Index-Dzrn3Y6p.js +16 -0
- package/dist/{Index-CRiATiQn.js → Index-LQb0omFE.js} +10 -18
- package/dist/Index-Mt4mSaNT.js +4 -0
- package/dist/Index-_xN_cczo.js +3477 -0
- package/dist/Index-gAz45qgR.js +21 -0
- package/dist/Index-xXLFalgR.js +49 -0
- package/dist/Index-zyZRPz3H.js +28 -0
- package/dist/Index.vue_vue_type_script_lang-Ddo1wo-D.js +671 -0
- package/dist/InputToggleRow-CokEYwm2.js +99 -0
- package/dist/ManualPopover-Dukly7GP.js +65 -0
- package/dist/MediaWrapper-B8msCrQm.js +18 -0
- package/dist/{NotBindingText-CC7TxUqg.js → NotBindingText-DcQd8Eej.js} +13 -17
- package/dist/PackageGroup-clUIUoik.js +1060 -0
- package/dist/PdfTerms-DpzMVRfN.js +34 -0
- package/dist/PdfViewer-CSf4Rtbj.js +392 -0
- package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-D6KSjjMA.js +17 -0
- package/dist/PriceHeader-Dyweu8aH.js +488 -0
- package/dist/{SearchApi-G2Hvp0Dd.js → SearchApi-Y1fDQn0u.js} +37 -49
- package/dist/SendForm-B9l24WwR.js +6689 -0
- package/dist/Setup-DyzbPFM4.js +47 -0
- package/dist/{SmartList-BynTuXtB.js → SmartList-CWGKoAJh.js} +16 -24
- package/dist/Sortable.vue_vue_type_script_setup_true_lang-C2Gwp6Q-.js +1349 -0
- package/dist/{TermsSettings-cA5YAO77.js → TermsSettings-BeQH307A.js} +169 -56
- package/dist/ThemeColorRow-DFIsPy55.js +105 -0
- package/dist/ToggleBinding-DlH4y1IM.js +44 -0
- package/dist/UploadModal-BZ0mPBBB.js +134 -0
- package/dist/VideoPlayerInput-DBxcTUb7.js +134 -0
- package/dist/VideoPlayerSettings-Dg1OxjOa.js +78 -0
- package/dist/VideoSelectModal-BhbanMix.js +217 -0
- package/dist/{anime.es-BrPTThYb.js → anime.es-4wvNItHq.js} +205 -201
- package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
- package/dist/{dom-Ds4ypDrd.js → dom-CkTGWrfu.js} +3 -6
- package/dist/{focusDrawerMixin-CximZA1J.js → focusDrawerMixin-BVbTYOGr.js} +1 -1
- package/dist/{formDrawerState-CkNGdxn5.js → formDrawerState-CogZ-GVm.js} +2 -2
- package/dist/helpers-B4GUxtdD.js +46 -0
- package/dist/index-BZDey7B-.js +268 -0
- package/dist/index-Bd8_ZHHq.js +188 -0
- package/dist/index-BvyoYp1e.js +508 -0
- package/dist/index-CJZoubA3.js +3525 -0
- package/dist/index-D7yQWP4d.js +125 -0
- package/dist/index-D8hGHka6.js +513 -0
- package/dist/index-Dxy4tf7x.js +149 -0
- package/dist/index.es.js +2 -5
- package/dist/index.umd.js +303 -1486
- package/dist/main-Bn5XkQPb.js +57570 -0
- package/dist/mapFormMixin-C7FJLnbO.js +1528 -0
- package/dist/omit-DrWpFvRJ.js +56 -0
- package/dist/{publicSenderState-CGEm9EYe.js → publicSenderState-tdtCFPMx.js} +4 -4
- package/dist/splitpanes-BApidgjj.js +342 -0
- package/dist/template-CHdf2K2I.js +1572 -0
- package/dist/tippy.esm-Co6FYzEM.js +1994 -0
- package/dist/useTermsModal-VDnO1Lro.js +87 -0
- package/dist/{utils-Dr4AcaE9.js → utils-DZkn0Q9c.js} +8 -11
- package/dist/validation-CqBkar3f.js +40 -0
- package/dist/widget.css +1 -0
- package/package.json +20 -25
- package/dist/AddClientCallout-Br6IhwGH.js +0 -48
- package/dist/AnswerModal-CsWltR6j.js +0 -3879
- package/dist/AttachmentItem-BG7FuSCD.js +0 -85
- package/dist/BaseDatePicker-PSNBtUIh.js +0 -3187
- package/dist/BaseUpload-BfEurAAV.js +0 -1977
- package/dist/BlockMedia-Bo3OfNSU.js +0 -76
- package/dist/CCallout-CAjM8-1X.js +0 -58
- package/dist/CDropdownItem-CN7gSfgY.js +0 -640
- package/dist/CFormField-Clvcf2Jh.js +0 -240
- package/dist/CPhoneInput-CEHXh5jM.js +0 -138
- package/dist/CPriceInput-D2c07SXp.js +0 -116
- package/dist/CSelect-Cz2IPzxS.js +0 -91
- package/dist/CSkeleton-AsnvnD-m.js +0 -55
- package/dist/ClientAutocomplete-CZ55-DKe.js +0 -438
- package/dist/ClientModal-CgUhWZ5L.js +0 -666
- package/dist/ColorPicker-IFGHqH-u.js +0 -2879
- package/dist/CompanyModal-TLSBFo3U.js +0 -147
- package/dist/ContentWrapper-HClxKPuT.js +0 -190
- package/dist/CoverBlockSettings-D99hAa6e.js +0 -659
- package/dist/DocAnswer-CTV_Bpt7.js +0 -36
- package/dist/DocDetails-CQe5htXj.js +0 -263
- package/dist/DocForm-6Efv5_oz.js +0 -5017
- package/dist/DocFormSend-DbXcklxU.js +0 -146
- package/dist/DocLinks-BO545zbL.js +0 -38
- package/dist/DocModalBase-DXHNJ-6i.js +0 -28
- package/dist/DocPrint-Bf2U4FQN.js +0 -240
- package/dist/DocReceipt-CWXvC7bY.js +0 -217
- package/dist/DocSendReminder-CRzBM2NJ.js +0 -140
- package/dist/DocTimeline-DGVOk8-2.js +0 -485
- package/dist/DocumentClient-Das9BaJ7.js +0 -136
- package/dist/DocumentLayout-4q8rmTVT.js +0 -4880
- package/dist/DocumentLogotype-DLncJJAB.js +0 -92
- package/dist/DocumentVoided-CcI9lX27.js +0 -25
- package/dist/EmbedInput-BPdy0lGS.js +0 -117
- package/dist/EmbedSettings-L2iwYLQK.js +0 -74
- package/dist/ErrorCallout-Ds_tBT02.js +0 -27
- package/dist/FilePreviewModal-hxUu330p.js +0 -81
- package/dist/Flag-1-HcT5Dz.js +0 -46
- package/dist/HeaderSettings-C27fMugK.js +0 -440
- package/dist/ImageSelectModal-BKDIyxF4.js +0 -86
- package/dist/ImageUploadWrapper-BiYzUQur.js +0 -1604
- package/dist/Index-5BOWxcPG.js +0 -26
- package/dist/Index-B1Odktov.js +0 -754
- package/dist/Index-B3d5BjEn.js +0 -25
- package/dist/Index-B3sSU_4X.js +0 -54
- package/dist/Index-B5Dqsh3K.js +0 -150
- package/dist/Index-B6aO1c_w.js +0 -62
- package/dist/Index-BGfICxJQ.js +0 -643
- package/dist/Index-BHopC0hv.js +0 -24
- package/dist/Index-BJXcSmp_.js +0 -55
- package/dist/Index-BQe6QjQZ.js +0 -25
- package/dist/Index-BmXx_x6t.js +0 -77
- package/dist/Index-C692qMTG.js +0 -294
- package/dist/Index-CEvbw-3i.js +0 -41
- package/dist/Index-CYSULnpn.js +0 -32
- package/dist/Index-CdtYzwAM.js +0 -107
- package/dist/Index-CetF2FW0.js +0 -230
- package/dist/Index-Cv6XLM20.js +0 -73
- package/dist/Index-Cwy8ff76.js +0 -154
- package/dist/Index-D34z4UEY.js +0 -84
- package/dist/Index-DNCei-lp.js +0 -56
- package/dist/Index-DUbxgIYB.js +0 -2445
- package/dist/Index-DVwn_LLf.js +0 -28
- package/dist/Index-Dla-mesV.js +0 -146
- package/dist/Index-KtUkOPI2.js +0 -58
- package/dist/Index-LjnOTVJk.js +0 -66
- package/dist/Index-ky1SRtfY.js +0 -94
- package/dist/Index-mceZW2NX.js +0 -41
- package/dist/Index-tD3hZjh8.js +0 -144
- package/dist/Index-vM5kDtC2.js +0 -33
- package/dist/InputToggleRow-BmDuSbE2.js +0 -57
- package/dist/ManualPopover-CQfjPvFe.js +0 -60
- package/dist/MediaWrapper-DDzcjR6V.js +0 -23
- package/dist/PackageGroup-mAGXfZDv.js +0 -704
- package/dist/PdfTerms-BH_Nwf2h.js +0 -31
- package/dist/PdfViewer-mBLxI8bA.js +0 -383
- package/dist/PlainHtml-B7gUNNZd.js +0 -27
- package/dist/PriceHeader-DClYMPcq.js +0 -338
- package/dist/SendForm-Cxv_m8Rq.js +0 -1023
- package/dist/Setup-B90VDZTG.js +0 -50
- package/dist/ThemeColorRow-D-Z7w4Wk.js +0 -69
- package/dist/ToggleBinding-DOeTcWzi.js +0 -42
- package/dist/UploadModal-DOPLVEpV.js +0 -95
- package/dist/VideoPlayerInput-1zG06elO.js +0 -97
- package/dist/VideoPlayerSettings-O-4rAYYh.js +0 -61
- package/dist/VideoSelectModal-DzqFrqCg.js +0 -104
- package/dist/answerDocumentMixin-HBiNWYCH.js +0 -51
- package/dist/debounce-Ch1d3526.js +0 -84
- package/dist/formValidationMixin-D_MzsHsR.js +0 -49
- package/dist/index-BNdbPq4J.js +0 -492
- package/dist/index-BXzugeJ6.js +0 -81
- package/dist/index-C5wcxrC6.js +0 -167
- package/dist/index-CgDOs7t4.js +0 -2700
- package/dist/index-Cj-_2coz.js +0 -351
- package/dist/index-DpqV5y0K.js +0 -102
- package/dist/main-BL_yzf2r.js +0 -57357
- package/dist/mapFormMixin-Cu_vkTP-.js +0 -3028
- package/dist/omit-Dfe_H1Ft.js +0 -31
- package/dist/simplebar.min-CRlLD1Oz.js +0 -71
- package/dist/splitpanes-BHUVsCZF.js +0 -382
- package/dist/style.css +0 -4
- package/dist/throttle-BX_w77tW.js +0 -18
- package/dist/tippy.esm-n4arfVzA.js +0 -1805
- package/dist/vuedraggable.umd-DW4PJoZ3.js +0 -3161
- package/dist/vuex.esm-DKGl8mcw.js +0 -467
|
@@ -0,0 +1,1060 @@
|
|
|
1
|
+
import { m as D } from "./mapFormMixin-C7FJLnbO.js";
|
|
2
|
+
import { E as M } from "./ErrorCallout-CQo2iF9c.js";
|
|
3
|
+
import { bf as O, bg as C, A as F, _ as T, o as a, b as c, s as l, v as o, f as n, F as f, B as k, n as w, bh as W, e as v, a2 as B, E as I, k as b, c as _, ab as q, d as V, w as S, G as E, l as x, a9 as P, bi as L, D as Z, p as N } from "./main-Bn5XkQPb.js";
|
|
4
|
+
import { t as A } from "./template-CHdf2K2I.js";
|
|
5
|
+
import { T as G } from "./DocTextEditor-CEPcJT2o.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: w([{
|
|
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-head" };
|
|
239
|
+
function ce(t, i, e, p, g, r) {
|
|
240
|
+
const d = v("DocChapterArticleItem"), u = B("tooltip");
|
|
241
|
+
return a(), c("div", {
|
|
242
|
+
class: w(["article-list-wrapper", t.$attrs.class])
|
|
243
|
+
}, [
|
|
244
|
+
l("div", ae, [
|
|
245
|
+
l("div", null, o(t._document.$t("chapters.articleList.title")), 1),
|
|
246
|
+
e.showPrices && r.showVatToggle ? I((a(), c("div", {
|
|
247
|
+
key: 0,
|
|
248
|
+
style: { "text-decoration": "underline", cursor: "pointer" },
|
|
249
|
+
onClick: i[0] || (i[0] = (s) => t.$emit("toggle-show-vat", !e.showPricesIncVat))
|
|
250
|
+
}, [
|
|
251
|
+
k(o(t._document.$t(`vat.${e.showPricesIncVat ? "incVat" : "exVat"}`, {
|
|
252
|
+
thing: t._document.$t(`vat.${e.vatType}`)
|
|
253
|
+
})), 1)
|
|
254
|
+
])), [
|
|
255
|
+
[
|
|
256
|
+
u,
|
|
257
|
+
t._document.$t("chapters.articleList.changeShowVatTooltip", {
|
|
258
|
+
type: t._document.$t(`vat.${e.showPricesIncVat ? "exVat" : "incVat"}`, {
|
|
259
|
+
thing: t._document.$t(`vat.${e.vatType}`)
|
|
260
|
+
})
|
|
261
|
+
})
|
|
262
|
+
]
|
|
263
|
+
]) : n("", !0)
|
|
264
|
+
]),
|
|
265
|
+
(a(!0), c(f, null, b(e.articles, (s, m) => (a(), _(d, {
|
|
266
|
+
key: m,
|
|
267
|
+
_document: t._document,
|
|
268
|
+
title: s.name,
|
|
269
|
+
quantity: s.quantity,
|
|
270
|
+
unit: s.unit,
|
|
271
|
+
"unit-type": s.unitType,
|
|
272
|
+
"article-no": s.article_no,
|
|
273
|
+
"house-work-type": r.articleHouseWorkType(s),
|
|
274
|
+
price: e.showPrices ? s.price : null,
|
|
275
|
+
currency: s.currency,
|
|
276
|
+
vat: s.vat,
|
|
277
|
+
"price-type": s.priceType,
|
|
278
|
+
"show-price": s.showPrice,
|
|
279
|
+
position: s.position,
|
|
280
|
+
"show-prices-inc-vat": e.showPricesIncVat,
|
|
281
|
+
discount: s.discount,
|
|
282
|
+
"discount-type": s.discountType,
|
|
283
|
+
"total-amount": s.totalAmount
|
|
284
|
+
}, 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))
|
|
285
|
+
], 2);
|
|
286
|
+
}
|
|
287
|
+
const se = /* @__PURE__ */ T(re, [["render", ce], ["__scopeId", "data-v-76980fe6"]]), oe = {
|
|
288
|
+
name: "PackageItem",
|
|
289
|
+
i18nOptions: {
|
|
290
|
+
namespaces: "PackageItem",
|
|
291
|
+
messages: {
|
|
292
|
+
en: {
|
|
293
|
+
selectTooltip: "Only your clients can select options"
|
|
294
|
+
},
|
|
295
|
+
sv: {
|
|
296
|
+
selectTooltip: "Enbart din kund kan välja ett paket"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
components: {
|
|
301
|
+
ArticleList: se,
|
|
302
|
+
TextEditor: G
|
|
303
|
+
},
|
|
304
|
+
emits: ["toggle", "toggle-show-vat"],
|
|
305
|
+
inject: {
|
|
306
|
+
isPdf: {
|
|
307
|
+
default: !1
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
props: {
|
|
311
|
+
workPackage: {
|
|
312
|
+
type: Object,
|
|
313
|
+
required: !0
|
|
314
|
+
},
|
|
315
|
+
type: {
|
|
316
|
+
type: String,
|
|
317
|
+
required: !0
|
|
318
|
+
},
|
|
319
|
+
canToggle: {
|
|
320
|
+
type: Boolean,
|
|
321
|
+
default: !1
|
|
322
|
+
},
|
|
323
|
+
isPreview: {
|
|
324
|
+
type: Boolean,
|
|
325
|
+
default: !1
|
|
326
|
+
},
|
|
327
|
+
showToggle: {
|
|
328
|
+
type: Boolean,
|
|
329
|
+
default: !1
|
|
330
|
+
},
|
|
331
|
+
showPricesIncVat: {
|
|
332
|
+
type: Boolean,
|
|
333
|
+
default: !0
|
|
334
|
+
},
|
|
335
|
+
headingColor: {
|
|
336
|
+
type: String,
|
|
337
|
+
default: "#03f"
|
|
338
|
+
},
|
|
339
|
+
_document: {
|
|
340
|
+
type: Object,
|
|
341
|
+
default: null
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
data() {
|
|
345
|
+
return {
|
|
346
|
+
internalShowDetails: !1,
|
|
347
|
+
tinycolor: A
|
|
348
|
+
};
|
|
349
|
+
},
|
|
350
|
+
computed: {
|
|
351
|
+
prices() {
|
|
352
|
+
return this.workPackage.prices;
|
|
353
|
+
},
|
|
354
|
+
totalBeforeDiscount() {
|
|
355
|
+
return (this.workPackage.articles || []).reduce((t, i) => {
|
|
356
|
+
const e = i.priceType === "openAcc" ? 1 : i.quantity;
|
|
357
|
+
let { price: p } = i;
|
|
358
|
+
return this.showPricesIncVat && i.priceType !== "markup" && (p *= (100 + i.vat) / 100), t + e * p;
|
|
359
|
+
}, 0);
|
|
360
|
+
},
|
|
361
|
+
showDetails: {
|
|
362
|
+
get() {
|
|
363
|
+
return this.type === "single" || this.workPackage.isSelected && !this.workPackage.toggable ? !0 : this.internalShowDetails || this.isPdf;
|
|
364
|
+
},
|
|
365
|
+
set(t) {
|
|
366
|
+
this.internalShowDetails = t;
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
description() {
|
|
370
|
+
const t = this._document ? this._document._doc : {};
|
|
371
|
+
return q(this.workPackage.data.description, t);
|
|
372
|
+
},
|
|
373
|
+
useVat() {
|
|
374
|
+
return this._document ? this._document.useVat : !1;
|
|
375
|
+
},
|
|
376
|
+
vatType() {
|
|
377
|
+
return this._document ? this._document.vatType : "vat";
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
methods: {
|
|
381
|
+
priceFormat(t, i = {}) {
|
|
382
|
+
return F(t, {
|
|
383
|
+
currency: this.prices.currency,
|
|
384
|
+
decimals: 2,
|
|
385
|
+
hideZeroDecimals: !0,
|
|
386
|
+
...i
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}, ne = { class: "top-container" }, le = {
|
|
391
|
+
key: 0,
|
|
392
|
+
style: { "font-weight": "800", "font-size": "calc(calc(1 * var(--rem)) + 4px)", "margin-bottom": "calc(0.5 * var(--rem))" }
|
|
393
|
+
}, ue = {
|
|
394
|
+
key: 0,
|
|
395
|
+
class: "flex w-full justify-end",
|
|
396
|
+
style: { "margin-top": "calc(3 * var(--rem))" }
|
|
397
|
+
}, de = { style: { padding: `calc(0.75 * var(--rem)) calc(1 * var(--rem))
|
|
398
|
+
calc(0.75 * var(--rem)) calc(3 * var(--rem))`, "text-align": "right" } }, he = {
|
|
399
|
+
key: 0,
|
|
400
|
+
class: "price-total",
|
|
401
|
+
style: { color: "red", "text-decoration": "line-through", "font-size": "16px", "font-weight": "600" }
|
|
402
|
+
}, me = { style: { "line-height": "1.2", "font-size": "13px" } }, pe = {
|
|
403
|
+
class: "price-total",
|
|
404
|
+
style: { padding: "2px 0 3px 0" }
|
|
405
|
+
}, ge = { class: "price-total" }, ye = {
|
|
406
|
+
key: 0,
|
|
407
|
+
class: "primary-text-color",
|
|
408
|
+
style: { "font-weight": "900" }
|
|
409
|
+
}, fe = {
|
|
410
|
+
key: 0,
|
|
411
|
+
style: { "line-height": "1.2", "font-size": "13px", padding: "2px 0 3px 0" }
|
|
412
|
+
}, ke = {
|
|
413
|
+
key: 1,
|
|
414
|
+
class: "flex w-full items-center justify-end",
|
|
415
|
+
style: { "background-color": "hsl(215, 10%, 95%)" }
|
|
416
|
+
}, ve = {
|
|
417
|
+
style: { "margin-right": "calc(0.5 * var(--rem))" },
|
|
418
|
+
viewBox: "0 0 24 24",
|
|
419
|
+
width: "18",
|
|
420
|
+
height: "18",
|
|
421
|
+
stroke: "currentColor",
|
|
422
|
+
"stroke-width": "3.5",
|
|
423
|
+
fill: "none",
|
|
424
|
+
"stroke-linecap": "round",
|
|
425
|
+
"stroke-linejoin": "round"
|
|
426
|
+
};
|
|
427
|
+
function _e(t, i, e, p, g, r) {
|
|
428
|
+
const d = v("TextEditor"), u = v("ArticleList"), s = v("Animation"), m = v("CButton"), h = B("tooltip");
|
|
429
|
+
return a(), c("div", {
|
|
430
|
+
style: x({
|
|
431
|
+
...e.workPackage.isSelected && {
|
|
432
|
+
boxShadow: `0 0 0 2px ${e.headingColor}`
|
|
433
|
+
}
|
|
434
|
+
}),
|
|
435
|
+
class: w([{
|
|
436
|
+
"single-package": e.type === "single" || e.workPackage.isSelected && !e.workPackage.toggable
|
|
437
|
+
}, "package-container font-inter"])
|
|
438
|
+
}, [
|
|
439
|
+
l("div", ne, [
|
|
440
|
+
e.workPackage.data.name ? (a(), c("div", le, o(e.workPackage.data.name), 1)) : n("", !0),
|
|
441
|
+
l("div", null, [
|
|
442
|
+
r.description ? (a(), _(d, {
|
|
443
|
+
key: 0,
|
|
444
|
+
"model-value": r.description,
|
|
445
|
+
style: { "margin-bottom": "1em" }
|
|
446
|
+
}, null, 8, ["model-value"])) : n("", !0)
|
|
447
|
+
])
|
|
448
|
+
]),
|
|
449
|
+
V(s, null, {
|
|
450
|
+
default: S(() => [
|
|
451
|
+
I(V(u, {
|
|
452
|
+
_document: e._document,
|
|
453
|
+
articles: e.workPackage.articles,
|
|
454
|
+
"show-prices-inc-vat": e.showPricesIncVat,
|
|
455
|
+
"use-vat": r.useVat,
|
|
456
|
+
"vat-type": r.vatType,
|
|
457
|
+
parent: "packageGroup",
|
|
458
|
+
class: "articles-container",
|
|
459
|
+
onToggleShowVat: i[0] || (i[0] = (y) => t.$emit("toggle-show-vat", y))
|
|
460
|
+
}, null, 8, ["_document", "articles", "show-prices-inc-vat", "use-vat", "vat-type"]), [
|
|
461
|
+
[E, r.showDetails && e.workPackage.articles.length]
|
|
462
|
+
])
|
|
463
|
+
]),
|
|
464
|
+
_: 1
|
|
465
|
+
}),
|
|
466
|
+
e.type !== "single" && (e.workPackage.toggable || e.isPreview) && (r.prices.total || r.prices.type === "openAcc") ? (a(), c("div", ue, [
|
|
467
|
+
l("div", de, [
|
|
468
|
+
r.prices.helpers.discount ? (a(), c("div", he, o(r.priceFormat(
|
|
469
|
+
e.showPricesIncVat ? r.totalBeforeDiscount : r.prices.subTotal + r.prices.helpers.discount
|
|
470
|
+
)), 1)) : n("", !0),
|
|
471
|
+
r.prices.type === "openAcc" ? (a(), c(f, { key: 1 }, [
|
|
472
|
+
l("div", me, o(e._document.$t("price.pricing")), 1),
|
|
473
|
+
l("div", pe, o(e._document.$t("price.openAccPrice")), 1)
|
|
474
|
+
], 64)) : (a(), c(f, { key: 2 }, [
|
|
475
|
+
l("div", ge, [
|
|
476
|
+
e.type === "checkbox" ? (a(), c("span", ye, "+")) : n("", !0),
|
|
477
|
+
k(" " + o(r.priceFormat(e.showPricesIncVat ? r.prices.total : r.prices.subTotal)), 1)
|
|
478
|
+
]),
|
|
479
|
+
r.useVat ? (a(), c("div", fe, o(e._document.$t("price.price").capitalize()) + " " + o(e._document.$t(`vat.${e.showPricesIncVat ? "incVat" : "exVat"}`, {
|
|
480
|
+
thing: e._document.$t(`vat.${r.vatType}`)
|
|
481
|
+
})), 1)) : n("", !0)
|
|
482
|
+
], 64))
|
|
483
|
+
])
|
|
484
|
+
])) : n("", !0),
|
|
485
|
+
e.showToggle ? (a(), c("div", ke, [
|
|
486
|
+
r.isPdf ? n("", !0) : (a(), c(f, { key: 0 }, [
|
|
487
|
+
V(m, {
|
|
488
|
+
class: "package-button",
|
|
489
|
+
pattern: "tertiary",
|
|
490
|
+
type: "text",
|
|
491
|
+
icon: r.showDetails ? "arrow-up" : "arrow-down",
|
|
492
|
+
"icon-props": { size: 20 },
|
|
493
|
+
onClick: i[1] || (i[1] = (y) => r.showDetails = !r.showDetails)
|
|
494
|
+
}, {
|
|
495
|
+
default: S(() => [
|
|
496
|
+
k(o(e._document.$t("show", {
|
|
497
|
+
thing: e._document.$t(`${r.showDetails ? "less" : "detail_plural"}`)
|
|
498
|
+
})), 1)
|
|
499
|
+
]),
|
|
500
|
+
_: 1
|
|
501
|
+
}, 8, ["icon"]),
|
|
502
|
+
e.canToggle || e.isPreview ? I((a(), _(m, {
|
|
503
|
+
key: 0,
|
|
504
|
+
style: x({
|
|
505
|
+
backgroundColor: e.headingColor,
|
|
506
|
+
color: g.tinycolor.readability(e.headingColor, "#FFF") > 2.2 ? "#FFF" : "#000"
|
|
507
|
+
}),
|
|
508
|
+
class: w([{ "is-disabled": e.isPreview }, "package-button"]),
|
|
509
|
+
type: "text",
|
|
510
|
+
onClick: i[2] || (i[2] = (y) => e.canToggle ? t.$emit("toggle", e.workPackage.packageId) : null)
|
|
511
|
+
}, {
|
|
512
|
+
default: S(() => [
|
|
513
|
+
e.workPackage.isSelected ? (a(), c(f, { key: 0 }, [
|
|
514
|
+
(a(), c("svg", ve, i[3] || (i[3] = [
|
|
515
|
+
l("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
516
|
+
]))),
|
|
517
|
+
k(" " + o(e._document.$t("chapters.packageItem.selected")), 1)
|
|
518
|
+
], 64)) : (a(), c(f, { key: 1 }, [
|
|
519
|
+
k(o(e._document.$t(
|
|
520
|
+
`chapters.packageItem.${e.type === "radio" ? "select" : "add"}`
|
|
521
|
+
)), 1)
|
|
522
|
+
], 64))
|
|
523
|
+
]),
|
|
524
|
+
_: 1
|
|
525
|
+
}, 8, ["style", "class"])), [
|
|
526
|
+
[
|
|
527
|
+
h,
|
|
528
|
+
e.isPreview && {
|
|
529
|
+
content: t.$t("selectTooltip"),
|
|
530
|
+
distance: 5
|
|
531
|
+
}
|
|
532
|
+
]
|
|
533
|
+
]) : n("", !0)
|
|
534
|
+
], 64))
|
|
535
|
+
])) : n("", !0)
|
|
536
|
+
], 6);
|
|
537
|
+
}
|
|
538
|
+
const we = /* @__PURE__ */ T(oe, [["render", _e], ["__scopeId", "data-v-d5b69771"]]), Pe = {
|
|
539
|
+
name: "PackagePricingSummary",
|
|
540
|
+
props: {
|
|
541
|
+
// PackageGroup.prices (format: calcPrices of one group)
|
|
542
|
+
prices: {
|
|
543
|
+
type: Object,
|
|
544
|
+
default: () => ({ region: {} })
|
|
545
|
+
},
|
|
546
|
+
showPrices: {
|
|
547
|
+
type: Boolean,
|
|
548
|
+
default: !0
|
|
549
|
+
},
|
|
550
|
+
_document: {
|
|
551
|
+
type: Object,
|
|
552
|
+
default: () => ({})
|
|
553
|
+
},
|
|
554
|
+
primaryColor: {
|
|
555
|
+
type: String,
|
|
556
|
+
default: "#03f"
|
|
557
|
+
},
|
|
558
|
+
placeholder: {
|
|
559
|
+
type: Boolean,
|
|
560
|
+
default: !1
|
|
561
|
+
},
|
|
562
|
+
showPricesIncVat: {
|
|
563
|
+
type: Boolean,
|
|
564
|
+
default: !0
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
computed: {
|
|
568
|
+
blocks() {
|
|
569
|
+
const {
|
|
570
|
+
type: t,
|
|
571
|
+
total: i,
|
|
572
|
+
maxTotal: e,
|
|
573
|
+
subTotal: p,
|
|
574
|
+
taxAmount: g,
|
|
575
|
+
roundingAmount: r,
|
|
576
|
+
currency: d
|
|
577
|
+
} = this.prices, u = [];
|
|
578
|
+
if (!d) return u;
|
|
579
|
+
const s = {
|
|
580
|
+
title: this._document.$t("chapters.pricingSummary.blocks.price"),
|
|
581
|
+
subTitle: this._document.$t("chapters.pricingSummary.blocks.summary")
|
|
582
|
+
}, m = this.getPricingInfo({
|
|
583
|
+
includeFixedCosts: !this.isOpenAccPricing
|
|
584
|
+
});
|
|
585
|
+
let h = this.hasDeductions ? this._document.$t(
|
|
586
|
+
"chapters.pricingSummary.blocks.deductionSubValue",
|
|
587
|
+
{
|
|
588
|
+
price: this.priceFormat(p + g + r, {
|
|
589
|
+
currency: d,
|
|
590
|
+
decimals: 2,
|
|
591
|
+
hideZeroDecimals: !0
|
|
592
|
+
})
|
|
593
|
+
}
|
|
594
|
+
) : null, y = i;
|
|
595
|
+
return this.prices.useVat && !this.showPricesIncVat && !this.hasDeductions && (y = p, h = `${this.priceFormat(i, {
|
|
596
|
+
currency: d,
|
|
597
|
+
decimals: 2,
|
|
598
|
+
hideZeroDecimals: !0
|
|
599
|
+
})} ${this._document.$t("vat.incVat")}`), ["fixed", "approx"].includes(t) && u.push({
|
|
600
|
+
header: s,
|
|
601
|
+
items: m,
|
|
602
|
+
footer: {
|
|
603
|
+
title: this._document.$t("chapters.pricingSummary.blocks.total"),
|
|
604
|
+
subTitle: t === "approx" ? this._document.$t("chapters.pricingSummary.blocks.approx") : null,
|
|
605
|
+
value: this.priceFormat(y, {
|
|
606
|
+
currency: d,
|
|
607
|
+
decimals: 2,
|
|
608
|
+
hideZeroDecimals: !0
|
|
609
|
+
}),
|
|
610
|
+
subValue: h
|
|
611
|
+
}
|
|
612
|
+
}), this.isOpenAccPricing && (u.push({
|
|
613
|
+
header: s,
|
|
614
|
+
items: m,
|
|
615
|
+
footer: e ? {
|
|
616
|
+
title: this._document.$t(
|
|
617
|
+
"chapters.pricingSummary.blocks.maxPrice"
|
|
618
|
+
),
|
|
619
|
+
value: this.priceFormat(this.calcMaxPrice, {
|
|
620
|
+
currency: d,
|
|
621
|
+
decimals: 2,
|
|
622
|
+
hideZeroDecimals: !0
|
|
623
|
+
})
|
|
624
|
+
} : null
|
|
625
|
+
}), i && u.push({
|
|
626
|
+
header: {
|
|
627
|
+
subTitle: this._document.$t(
|
|
628
|
+
"chapters.pricingSummary.blocks.subTitleArticles"
|
|
629
|
+
)
|
|
630
|
+
},
|
|
631
|
+
items: this.getPricingInfo({
|
|
632
|
+
includeFixedCosts: !0,
|
|
633
|
+
showType: !1
|
|
634
|
+
}),
|
|
635
|
+
footer: {
|
|
636
|
+
title: this._document.$t("chapters.pricingSummary.blocks.total"),
|
|
637
|
+
value: this.priceFormat(y, {
|
|
638
|
+
currency: d,
|
|
639
|
+
decimals: 2,
|
|
640
|
+
hideZeroDecimals: !0
|
|
641
|
+
}),
|
|
642
|
+
subValue: h
|
|
643
|
+
}
|
|
644
|
+
})), u;
|
|
645
|
+
},
|
|
646
|
+
isOpenAccPricing() {
|
|
647
|
+
return ["openAcc", "openAccMaxPrice"].includes(this.prices.type);
|
|
648
|
+
},
|
|
649
|
+
showIncVat() {
|
|
650
|
+
return P(this._document, "prices.helpers.isIndivid", !0);
|
|
651
|
+
},
|
|
652
|
+
calcMaxPrice() {
|
|
653
|
+
return this.prices.maxTotal ? this.showIncVat ? this.prices.maxTotal * 1.25 : this.prices.maxTotal : null;
|
|
654
|
+
},
|
|
655
|
+
showPricingCard() {
|
|
656
|
+
const { subTotal: t, total: i, maxTotal: e, currency: p } = this.prices;
|
|
657
|
+
return p && (this.isOpenAccPricing || this.placeholder || t || i || e);
|
|
658
|
+
},
|
|
659
|
+
hasDeductions() {
|
|
660
|
+
return this.prices.region && this.prices.region.houseWorkAmount;
|
|
661
|
+
},
|
|
662
|
+
vatType() {
|
|
663
|
+
return P(this, "_document.vatType");
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
methods: {
|
|
667
|
+
priceFormat(t, i = { showZero: !0 }) {
|
|
668
|
+
return F(t, i);
|
|
669
|
+
},
|
|
670
|
+
deductionText(t = !0) {
|
|
671
|
+
let i = "";
|
|
672
|
+
return this.hasDeductions && (i = this._document.$t(
|
|
673
|
+
"chapters.pricingSummary.blocks.typeDeduction",
|
|
674
|
+
{
|
|
675
|
+
type: this._document.$t(
|
|
676
|
+
`deduction.${this.prices.region.houseWorkType}_percentage`
|
|
677
|
+
)
|
|
678
|
+
}
|
|
679
|
+
)), t || (i = i.charAt(0).toLowerCase() + i.slice(1)), i;
|
|
680
|
+
},
|
|
681
|
+
getPricingInfo({ includeFixedCosts: t = !0, showType: i = !0 }) {
|
|
682
|
+
const {
|
|
683
|
+
type: e,
|
|
684
|
+
subTotal: p,
|
|
685
|
+
roundingAmount: g,
|
|
686
|
+
taxAmount: r,
|
|
687
|
+
maxTotal: d,
|
|
688
|
+
region: u = {},
|
|
689
|
+
currency: s,
|
|
690
|
+
helpers: { discount: m }
|
|
691
|
+
} = this.prices;
|
|
692
|
+
let h = [];
|
|
693
|
+
return u.country === "sweden" && (e === "openAccMaxPrice" && d && !t && (h.push({
|
|
694
|
+
label: this._document.$t(
|
|
695
|
+
"chapters.pricingSummary.blocks.maxPriceVat",
|
|
696
|
+
{ vat: this._document.$t("vat.exVat") }
|
|
697
|
+
),
|
|
698
|
+
value: this.priceFormat(d, {
|
|
699
|
+
currency: s,
|
|
700
|
+
decimals: 2,
|
|
701
|
+
hideZeroDecimals: !0
|
|
702
|
+
})
|
|
703
|
+
}), u.reverseVat || h.push({
|
|
704
|
+
label: this._document.$t(
|
|
705
|
+
"chapters.pricingSummary.blocks.maxPriceVat",
|
|
706
|
+
{ vat: this._document.$t("vat.incVat") }
|
|
707
|
+
),
|
|
708
|
+
value: this.priceFormat(d * 1.25, {
|
|
709
|
+
currency: s,
|
|
710
|
+
decimals: 2,
|
|
711
|
+
hideZeroDecimals: !0
|
|
712
|
+
})
|
|
713
|
+
})), u.houseWorkType && u.houseWorkAmount && t && h.push({
|
|
714
|
+
label: this._document.$t("deduction.type", {
|
|
715
|
+
type: this._document.$t(
|
|
716
|
+
`deduction.${u.houseWorkType}${u.houseWorkManualAmount === null ? "_percentage" : ""}`
|
|
717
|
+
)
|
|
718
|
+
}),
|
|
719
|
+
value: this.priceFormat(-1 * u.houseWorkAmount, {
|
|
720
|
+
currency: s,
|
|
721
|
+
decimals: 2,
|
|
722
|
+
hideZeroDecimals: !0
|
|
723
|
+
})
|
|
724
|
+
})), t && (h = [
|
|
725
|
+
{
|
|
726
|
+
label: this._document.$t("chapters.pricingSummary.blocks.net"),
|
|
727
|
+
value: this.priceFormat(p, {
|
|
728
|
+
currency: s,
|
|
729
|
+
decimals: 2,
|
|
730
|
+
hideZeroDecimals: !0
|
|
731
|
+
})
|
|
732
|
+
},
|
|
733
|
+
...this.prices.useVat ? [
|
|
734
|
+
{
|
|
735
|
+
label: this._document.$t(`vat.${this.vatType}`).capitalize(),
|
|
736
|
+
value: this.priceFormat(u.reverseVat ? 0 : r, {
|
|
737
|
+
showZero: !0,
|
|
738
|
+
currency: s,
|
|
739
|
+
decimals: 2,
|
|
740
|
+
hideZeroDecimals: !0
|
|
741
|
+
})
|
|
742
|
+
}
|
|
743
|
+
] : [],
|
|
744
|
+
...h,
|
|
745
|
+
...this.prices.rounding.enabled && this.prices.rounding.show ? [
|
|
746
|
+
{
|
|
747
|
+
label: this._document.$t(
|
|
748
|
+
"chapters.pricingSummary.blocks.rounding"
|
|
749
|
+
),
|
|
750
|
+
value: this.priceFormat(g, {
|
|
751
|
+
decimals: 2,
|
|
752
|
+
showZero: !0,
|
|
753
|
+
currency: s,
|
|
754
|
+
hideZeroDecimals: !0
|
|
755
|
+
})
|
|
756
|
+
}
|
|
757
|
+
] : [],
|
|
758
|
+
...this.prices.helpers.discount ? [
|
|
759
|
+
{
|
|
760
|
+
label: this._document.$t(
|
|
761
|
+
"chapters.pricingSummary.blocks.discount"
|
|
762
|
+
),
|
|
763
|
+
value: `-${this.priceFormat(m, {
|
|
764
|
+
decimals: 2,
|
|
765
|
+
showZero: !0,
|
|
766
|
+
currency: s,
|
|
767
|
+
hideZeroDecimals: !0
|
|
768
|
+
})}`
|
|
769
|
+
}
|
|
770
|
+
] : []
|
|
771
|
+
]), i && e !== "fixed" && (h = [
|
|
772
|
+
{
|
|
773
|
+
label: this._document.$t("price.pricing").capitalize(),
|
|
774
|
+
value: this._document.$t(`price.${e}`)
|
|
775
|
+
},
|
|
776
|
+
...h
|
|
777
|
+
]), h;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
}, be = {
|
|
781
|
+
key: 0,
|
|
782
|
+
id: "price",
|
|
783
|
+
style: { "margin-top": "calc(2 * var(--rem))", "margin-bottom": "calc(2 * var(--rem))", position: "relative" },
|
|
784
|
+
class: "font-inter"
|
|
785
|
+
}, Te = { class: "block-header" }, xe = {
|
|
786
|
+
key: 0,
|
|
787
|
+
style: { "font-weight": "800" }
|
|
788
|
+
}, Ve = {
|
|
789
|
+
key: 1,
|
|
790
|
+
style: { "font-size": "16px", "margin-left": "0.5em" }
|
|
791
|
+
}, Se = {
|
|
792
|
+
key: 0,
|
|
793
|
+
class: "block-body"
|
|
794
|
+
}, Ie = {
|
|
795
|
+
key: 0,
|
|
796
|
+
style: { "font-weight": "500", "font-size": "calc(1em - 2px)" }
|
|
797
|
+
}, Ae = { class: "text-right" }, De = {
|
|
798
|
+
key: 0,
|
|
799
|
+
class: "block-body-footer-hint"
|
|
800
|
+
}, Fe = {
|
|
801
|
+
key: 0,
|
|
802
|
+
class: "terms-text"
|
|
803
|
+
}, Ce = {
|
|
804
|
+
key: 1,
|
|
805
|
+
id: "villkor-avdrag",
|
|
806
|
+
class: "terms-text"
|
|
807
|
+
}, Be = {
|
|
808
|
+
key: 2,
|
|
809
|
+
class: "terms-text"
|
|
810
|
+
}, ze = {
|
|
811
|
+
key: 1,
|
|
812
|
+
class: "flex w-full flex-col items-center justify-center",
|
|
813
|
+
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),
|
|
814
|
+
0 calc(0.5 * var(--rem)) calc(2 * var(--rem)) calc(-0.5 * var(--rem))
|
|
815
|
+
rgba(0, 0, 0, 0.3)`, "text-align": "center", "font-size": "16px" }
|
|
816
|
+
}, Me = {
|
|
817
|
+
width: "200",
|
|
818
|
+
height: "100",
|
|
819
|
+
viewBox: "0 0 418 211",
|
|
820
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
821
|
+
}, Oe = {
|
|
822
|
+
fill: "none",
|
|
823
|
+
"fill-rule": "evenodd"
|
|
824
|
+
}, We = ["fill"], qe = {
|
|
825
|
+
"font-family": "Inter-Regular, Inter",
|
|
826
|
+
"font-size": "24",
|
|
827
|
+
fill: "#FFF"
|
|
828
|
+
}, Ee = {
|
|
829
|
+
x: "332.4",
|
|
830
|
+
y: "173"
|
|
831
|
+
}, Le = { style: { "padding-top": "1em", "font-weight": "600", "font-size": "18px" } }, Ze = { style: { "font-weight": "600" } };
|
|
832
|
+
function Ne(t, i, e, p, g, r) {
|
|
833
|
+
return e._document.readPrices ? (a(), c("div", be, [
|
|
834
|
+
r.showPricingCard ? (a(), c("div", {
|
|
835
|
+
key: 0,
|
|
836
|
+
class: w([{ faded: e.placeholder }, "pricing-container"])
|
|
837
|
+
}, [
|
|
838
|
+
(a(!0), c(f, null, b(r.blocks, ({ header: d, items: u, footer: s }, m) => (a(), c("div", {
|
|
839
|
+
key: m,
|
|
840
|
+
class: w([{ first: m === 0 }, "block-container print-avoid-break-inside"])
|
|
841
|
+
}, [
|
|
842
|
+
l("div", Te, [
|
|
843
|
+
d.title ? (a(), c("div", xe, o(d.title), 1)) : n("", !0),
|
|
844
|
+
d.subTitle ? (a(), c("div", Ve, o(d.subTitle), 1)) : n("", !0)
|
|
845
|
+
]),
|
|
846
|
+
u.length || s ? (a(), c("div", Se, [
|
|
847
|
+
(a(!0), c(f, null, b(u, ({ label: h, value: y }, z) => (a(), c("div", {
|
|
848
|
+
key: `item-${z}-${m}`,
|
|
849
|
+
class: w([m === 0 && "primary-light-background", "block-body-item"]),
|
|
850
|
+
style: x(m !== 0 && { borderBottom: "1px solid hsl(210, 15%, 85%)" })
|
|
851
|
+
}, [
|
|
852
|
+
l("div", null, o(h), 1),
|
|
853
|
+
l("div", null, o(y), 1)
|
|
854
|
+
], 6))), 128)),
|
|
855
|
+
s ? (a(), c("div", {
|
|
856
|
+
key: 0,
|
|
857
|
+
style: x({ "border-top": `4px solid ${e.primaryColor}` }),
|
|
858
|
+
class: "block-body-footer"
|
|
859
|
+
}, [
|
|
860
|
+
l("div", null, [
|
|
861
|
+
k(o(s.title) + " ", 1),
|
|
862
|
+
s.subTitle ? (a(), c("div", Ie, o(s.subTitle), 1)) : n("", !0)
|
|
863
|
+
]),
|
|
864
|
+
l("div", Ae, [
|
|
865
|
+
l("div", null, o(s.value), 1),
|
|
866
|
+
s.subValue ? (a(), c("div", De, o(s.subValue), 1)) : n("", !0)
|
|
867
|
+
])
|
|
868
|
+
], 4)) : n("", !0)
|
|
869
|
+
])) : n("", !0)
|
|
870
|
+
], 2))), 128)),
|
|
871
|
+
e.prices.region && e.prices.region.reverseVat ? (a(), c("div", Fe, o(e._document.$t("chapters.pricingSummary.terms.reverseVat")), 1)) : n("", !0),
|
|
872
|
+
e.prices.region && e.prices.region.houseWorkType ? (a(), c("div", Ce, o(e._document.$t("chapters.pricingSummary.terms.houseWork", {
|
|
873
|
+
type: e._document.$t(
|
|
874
|
+
`deduction.${e.prices.region.houseWorkType}_percentage`
|
|
875
|
+
)
|
|
876
|
+
})), 1)) : n("", !0),
|
|
877
|
+
e.prices.type === "approx" && e.prices.region && e.prices.region.houseWorkType === "rot" ? (a(), c("div", Be, o(e._document.$t("chapters.pricingSummary.terms.houseWorkApprox")), 1)) : n("", !0)
|
|
878
|
+
], 2)) : n("", !0),
|
|
879
|
+
e.placeholder ? (a(), c("div", ze, [
|
|
880
|
+
(a(), c("svg", Me, [
|
|
881
|
+
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)),
|
|
882
|
+
l("g", Oe, [
|
|
883
|
+
i[0] || (i[0] = l("path", {
|
|
884
|
+
stroke: "#E4E4E4",
|
|
885
|
+
"stroke-width": "3",
|
|
886
|
+
d: "M1.5 1.5h415v187H1.5z"
|
|
887
|
+
}, null, -1)),
|
|
888
|
+
l("path", {
|
|
889
|
+
fill: e.primaryColor,
|
|
890
|
+
"fill-rule": "nonzero",
|
|
891
|
+
d: "M282 139h136v51H282z"
|
|
892
|
+
}, null, 8, We),
|
|
893
|
+
i[1] || (i[1] = l("g", {
|
|
894
|
+
filter: "url(#a)",
|
|
895
|
+
transform: "translate(365.5 165)"
|
|
896
|
+
}, [
|
|
897
|
+
l("path", {
|
|
898
|
+
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",
|
|
899
|
+
fill: "#FFF",
|
|
900
|
+
"fill-rule": "nonzero"
|
|
901
|
+
}),
|
|
902
|
+
l("path", {
|
|
903
|
+
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",
|
|
904
|
+
stroke: "#000",
|
|
905
|
+
"stroke-width": "1.9",
|
|
906
|
+
"stroke-linecap": "round",
|
|
907
|
+
"stroke-linejoin": "round"
|
|
908
|
+
}),
|
|
909
|
+
l("path", {
|
|
910
|
+
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",
|
|
911
|
+
fill: "#000",
|
|
912
|
+
"fill-rule": "nonzero"
|
|
913
|
+
})
|
|
914
|
+
], -1)),
|
|
915
|
+
l("text", qe, [
|
|
916
|
+
l("tspan", Ee, o(e._document.$t("select")), 1)
|
|
917
|
+
]),
|
|
918
|
+
i[2] || (i[2] = l("path", {
|
|
919
|
+
fill: "#E4E4E4",
|
|
920
|
+
"fill-rule": "nonzero",
|
|
921
|
+
d: "M28 27h124v24H28zM28 64h355v11H28zM28 82h355v12H28zM28 103h178v12H28z"
|
|
922
|
+
}, null, -1))
|
|
923
|
+
])
|
|
924
|
+
])),
|
|
925
|
+
l("div", Le, o(e._document.$t("chapters.pricingSummary.placeholder.title")), 1),
|
|
926
|
+
l("div", null, [
|
|
927
|
+
k(o(e._document.$t("chapters.pricingSummary.placeholder.description")), 1),
|
|
928
|
+
l("span", Ze, o(e._document.$t("chapters.pricingSummary.placeholder.descriptionBold")), 1),
|
|
929
|
+
i[4] || (i[4] = k(". "))
|
|
930
|
+
])
|
|
931
|
+
])) : n("", !0)
|
|
932
|
+
])) : n("", !0);
|
|
933
|
+
}
|
|
934
|
+
const Ge = /* @__PURE__ */ T(Pe, [["render", Ne], ["__scopeId", "data-v-16cd51d3"]]), je = {
|
|
935
|
+
name: "PackageGroup",
|
|
936
|
+
components: {
|
|
937
|
+
PackageItem: we,
|
|
938
|
+
PackagePricingSummary: Ge,
|
|
939
|
+
ErrorCallout: M
|
|
940
|
+
},
|
|
941
|
+
mixins: [
|
|
942
|
+
D(["type", "packages", "hideGroupPrice"], { useEmit: !1 })
|
|
943
|
+
],
|
|
944
|
+
props: {
|
|
945
|
+
validator: {
|
|
946
|
+
type: Object,
|
|
947
|
+
default: () => ({})
|
|
948
|
+
}
|
|
949
|
+
},
|
|
950
|
+
data() {
|
|
951
|
+
return {
|
|
952
|
+
showPricesIncVat: !0
|
|
953
|
+
};
|
|
954
|
+
},
|
|
955
|
+
computed: {
|
|
956
|
+
prices() {
|
|
957
|
+
return (this._document.packageGroups.getPackageGroupUniqId(
|
|
958
|
+
this._value.groupId
|
|
959
|
+
) || {}).prices || {};
|
|
960
|
+
},
|
|
961
|
+
showToggle() {
|
|
962
|
+
return this.type !== "single";
|
|
963
|
+
},
|
|
964
|
+
canToggle() {
|
|
965
|
+
const { hasAnswers: t } = this._document, { hasAnswered: i, canAnswer: e } = this._document.answerActions || {};
|
|
966
|
+
return !t && this.type !== "single" && !i && e;
|
|
967
|
+
},
|
|
968
|
+
fixedPackages() {
|
|
969
|
+
return this.packages.filter((t) => !t.toggable && t.isSelected);
|
|
970
|
+
},
|
|
971
|
+
toggablePackages() {
|
|
972
|
+
return this.packages.filter((t) => !(!t.toggable && t.isSelected));
|
|
973
|
+
},
|
|
974
|
+
primaryColor() {
|
|
975
|
+
let t = P(this, '_document.data.css[".chapter"]["--accentColor"]') || P(this, "_document.theme.headingColor");
|
|
976
|
+
function i() {
|
|
977
|
+
A.readability(t, "#fff") < 1.8 && (t = A(t).darken(5).toString(), i());
|
|
978
|
+
}
|
|
979
|
+
return i(), t;
|
|
980
|
+
},
|
|
981
|
+
selectedPackages() {
|
|
982
|
+
return this.packages.filter(({ isSelected: t }) => t);
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
created() {
|
|
986
|
+
const {
|
|
987
|
+
isPreview: t,
|
|
988
|
+
setPricesIncVat: i = null,
|
|
989
|
+
useVat: e = Z[N.brand].defaultRegion === "SE"
|
|
990
|
+
} = P(this, "_document", {});
|
|
991
|
+
t && i !== null ? this.showPricesIncVat = i : this.showPricesIncVat = P(this, "_document.prices.helpers.isIndivid", !0) && e;
|
|
992
|
+
},
|
|
993
|
+
methods: {
|
|
994
|
+
onToggle(t) {
|
|
995
|
+
if (this.type === "single") return;
|
|
996
|
+
const i = this.packages.findIndex(({ packageId: e }) => e === t);
|
|
997
|
+
i === -1 || this.type === "radio" && this.packages[i].isSelected || (this.setField({
|
|
998
|
+
key: `${this._value.packages}[${i}].isSelected`,
|
|
999
|
+
value: !this.packages[i].isSelected
|
|
1000
|
+
}), this.type === "radio" && this.packages.forEach((e, p) => {
|
|
1001
|
+
p !== i && this.setField({
|
|
1002
|
+
key: `${this._value.packages}[${p}].isSelected`,
|
|
1003
|
+
value: !1
|
|
1004
|
+
});
|
|
1005
|
+
}));
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
}, $e = { style: { position: "relative" } }, He = { key: 0 }, Ue = {
|
|
1009
|
+
key: 0,
|
|
1010
|
+
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))" }
|
|
1011
|
+
};
|
|
1012
|
+
function Qe(t, i, e, p, g, r) {
|
|
1013
|
+
const d = v("PackageItem"), u = v("ErrorCallout"), s = v("PackagePricingSummary");
|
|
1014
|
+
return a(), c("div", $e, [
|
|
1015
|
+
(a(!0), c(f, null, b(r.fixedPackages, (m, h) => (a(), _(d, {
|
|
1016
|
+
key: h,
|
|
1017
|
+
type: t.type,
|
|
1018
|
+
"work-package": t._document.packageGroups.getPackageById(m.packageId),
|
|
1019
|
+
"heading-color": r.primaryColor,
|
|
1020
|
+
"can-toggle": r.canToggle,
|
|
1021
|
+
"show-prices-inc-vat": g.showPricesIncVat,
|
|
1022
|
+
_document: t._document,
|
|
1023
|
+
onToggle: r.onToggle,
|
|
1024
|
+
onToggleShowVat: i[0] || (i[0] = (y) => g.showPricesIncVat = y)
|
|
1025
|
+
}, null, 8, ["type", "work-package", "heading-color", "can-toggle", "show-prices-inc-vat", "_document", "onToggle"]))), 128)),
|
|
1026
|
+
r.toggablePackages.length ? (a(), c("div", He, [
|
|
1027
|
+
r.fixedPackages.length && r.toggablePackages.length ? (a(), c("div", Ue, o(t._document.$t("chapters.packageGroup.selectableOptions")), 1)) : n("", !0),
|
|
1028
|
+
(a(!0), c(f, null, b(r.toggablePackages, (m, h) => (a(), _(d, {
|
|
1029
|
+
key: `fixed-${h}`,
|
|
1030
|
+
"work-package": t._document.packageGroups.getPackageById(m.packageId),
|
|
1031
|
+
type: t.type,
|
|
1032
|
+
"heading-color": r.primaryColor,
|
|
1033
|
+
"show-toggle": r.showToggle,
|
|
1034
|
+
"can-toggle": r.canToggle,
|
|
1035
|
+
"is-preview": t._document.isPreview,
|
|
1036
|
+
"show-prices-inc-vat": g.showPricesIncVat,
|
|
1037
|
+
_document: t._document,
|
|
1038
|
+
onToggle: r.onToggle,
|
|
1039
|
+
onToggleShowVat: i[1] || (i[1] = (y) => g.showPricesIncVat = y)
|
|
1040
|
+
}, null, 8, ["work-package", "type", "heading-color", "show-toggle", "can-toggle", "is-preview", "show-prices-inc-vat", "_document", "onToggle"]))), 128))
|
|
1041
|
+
])) : n("", !0),
|
|
1042
|
+
e.validator.$invalid && e.validator.$dirty ? (a(), _(u, {
|
|
1043
|
+
key: 1,
|
|
1044
|
+
message: t._document.$t("chapters.packageGroup.errorCallout"),
|
|
1045
|
+
style: { "padding-bottom": "calc(1.5 * var(--rem))" }
|
|
1046
|
+
}, null, 8, ["message"])) : n("", !0),
|
|
1047
|
+
t.hideGroupPrice ? n("", !0) : (a(), _(s, {
|
|
1048
|
+
key: 2,
|
|
1049
|
+
prices: r.prices,
|
|
1050
|
+
_document: t._document,
|
|
1051
|
+
"show-prices-inc-vat": g.showPricesIncVat,
|
|
1052
|
+
"primary-color": r.primaryColor,
|
|
1053
|
+
placeholder: !r.selectedPackages.length
|
|
1054
|
+
}, null, 8, ["prices", "_document", "show-prices-inc-vat", "primary-color", "placeholder"]))
|
|
1055
|
+
]);
|
|
1056
|
+
}
|
|
1057
|
+
const et = /* @__PURE__ */ T(je, [["render", Qe]]);
|
|
1058
|
+
export {
|
|
1059
|
+
et as default
|
|
1060
|
+
};
|