@cling-se/widget 0.14.4 → 0.14.5
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/.eslintrc.cjs +4 -4
- package/README.md +40 -40
- package/dist/AddClientCallout-BMc-v9rJ.js +46 -0
- package/dist/AnswerModal-Cu0Ke5pl.js +3874 -0
- package/dist/AttachmentItem-Co8pVvtv.js +78 -0
- package/dist/BaseDatePicker-P5iq-XAp.js +3183 -0
- package/dist/BaseUpload-BDWnWTxr.js +1977 -0
- package/dist/BlockMedia-B_UiePCr.js +76 -0
- package/dist/CCallout-Bbp9ya9n.js +59 -0
- package/dist/CCurrencyDropdown-Cw39vJWw.js +246 -0
- package/dist/CDropdownItem-BjYnhZJr.js +538 -0
- package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +1 -0
- package/dist/CFormField-CeJ58aN2.js +241 -0
- package/dist/CPhoneFormat-BZnmeEeW.js +62 -0
- package/dist/CPriceInput-B07d19qq.js +112 -0
- package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +1 -0
- package/dist/ClientAutocomplete-9iM1pR9l.js +78 -0
- package/dist/ClientModal-fw8f6UvL.js +625 -0
- package/dist/ColorPicker-uu6vKe8o.js +2879 -0
- package/dist/CompanyModal-5t4yhKL4.js +141 -0
- package/dist/ContentWrapper-DwcOQ21l.js +183 -0
- package/dist/CoverBlockSettings-cCCXzAZ0.js +275 -0
- package/dist/DocAnswer-9lbgqHRX.js +36 -0
- package/dist/DocDetails-CoLL_tHs.js +246 -0
- package/dist/DocForm-DUjcuHJe.js +7273 -0
- package/dist/DocFormSend-LawcXcM2.js +143 -0
- package/dist/DocLinks-pJT9HpjR.js +38 -0
- package/dist/DocModalBase-xUoskL63.js +28 -0
- package/dist/DocPrint-ClEJBiAg.js +240 -0
- package/dist/DocReceipt-x_YsXPnG.js +210 -0
- package/dist/DocSendReminder-Dbz8CkAz.js +137 -0
- package/dist/DocTextEditor-AqBE7jZj.js +17181 -0
- package/dist/DocTimeline-hq2asPzr.js +481 -0
- package/dist/DocumentClient-TmtHqfiw.js +136 -0
- package/dist/DocumentLayout-CRAp8mfk.js +4909 -0
- package/dist/DocumentLogotype-emSjQ21f.js +87 -0
- package/dist/DocumentVoided-BOjiWBK6.js +25 -0
- package/dist/EmbedInput-B3LFGEee.js +113 -0
- package/dist/EmbedSettings-BYPJTGQf.js +72 -0
- package/dist/ErrorCallout-CwgYHBkg.js +28 -0
- package/dist/FilePreviewModal-81sSrDGg.js +81 -0
- package/dist/Flag-DGFvUTQZ.js +114 -0
- package/dist/HeaderSettings-BGpkzcbj.js +392 -0
- package/dist/ImageSelectModal-Cimviyuy.js +84 -0
- package/dist/ImageUploadWrapper-qJDHCf8T.js +1604 -0
- package/dist/Index-18w_qMQH.js +25 -0
- package/dist/Index-9_R8_myc.js +77 -0
- package/dist/Index-BKoXW7GK.js +84 -0
- package/dist/Index-BL3-tRGt.js +642 -0
- package/dist/Index-BNfAA-ZJ.js +154 -0
- package/dist/Index-BOxSvAug.js +144 -0
- package/dist/Index-BQgW1jlH.js +45 -0
- package/dist/Index-BXAqgXVi.js +150 -0
- package/dist/Index-BgK_WC0d.js +140 -0
- package/dist/Index-BkUzlQaQ.js +107 -0
- package/dist/Index-BpyYa9LR.js +171 -0
- package/dist/Index-ByzGXUoc.js +292 -0
- package/dist/Index-C1lsSfnX.js +52 -0
- package/dist/Index-C9sq_RDg.js +223 -0
- package/dist/Index-CDEh3GAi.js +26 -0
- package/dist/Index-CEG-Hiv6.js +69 -0
- package/dist/Index-CMUg61_b.js +33 -0
- package/dist/Index-CObGPoQv.js +62 -0
- package/dist/Index-CPNUsaOS.js +57 -0
- package/dist/Index-CegW1Rim.js +98 -0
- package/dist/Index-CoSt-Bws.js +31 -0
- package/dist/Index-CpDgldnz.js +70 -0
- package/dist/Index-CqImx-rG.js +55 -0
- package/dist/Index-CrOD4_xj.js +58 -0
- package/dist/Index-DBCNVVm5.js +24 -0
- package/dist/Index-DGG1S8uJ.js +559 -0
- package/dist/Index-DRWS2z82.js +2402 -0
- package/dist/Index-DXRgZZNj.js +61 -0
- package/dist/Index-DY5gAUnE.js +754 -0
- package/dist/Index-Dr7mVlBb.js +49 -0
- package/dist/Index-Dx944wv-.js +21 -0
- package/dist/Index-Eq3JlTKK.js +46 -0
- package/dist/Index-Sr3emNkE.js +25 -0
- package/dist/Index-VshOfaom.js +32 -0
- package/dist/InputToggleRow-CQsaayf-.js +57 -0
- package/dist/ManualPopover-CFXm5cQy.js +58 -0
- package/dist/MediaWrapper-Cn0Yr4ce.js +23 -0
- package/dist/NotBindingText-CNiszGqn.js +32 -0
- package/dist/PackageGroup-BVys9ouj.js +699 -0
- package/dist/PdfTerms-Bbns-jMY.js +36 -0
- package/dist/PdfViewer-B1zzZU4Y.js +374 -0
- package/dist/PlainHtml-CARRbTxi.js +20 -0
- package/dist/PriceHeader-CqeC9Lhb.js +339 -0
- package/dist/SearchApi-bB9FLxUq.js +161 -0
- package/dist/Setup-p3Du_uf8.js +50 -0
- package/dist/SmartList-P5ZfTWBb.js +83 -0
- package/dist/TermsSettings-CQ8TGwBV.js +102 -0
- package/dist/ThemeColorRow-DMWVlFRU.js +67 -0
- package/dist/ToggleBinding-BPaYWgqP.js +38 -0
- package/dist/UploadModal-9O4HTVZm.js +95 -0
- package/dist/VideoPlayerInput-5KybfY7N.js +93 -0
- package/dist/VideoPlayerSettings-xSW8tcTZ.js +61 -0
- package/dist/VideoSelectModal-BbaNAxGH.js +100 -0
- package/dist/anime.es-BrPTThYb.js +858 -0
- package/dist/answerDocumentMixin-S-Bmv15G.js +51 -0
- package/dist/color-TdtKxwVa.js +19 -0
- package/dist/debounce-B_0g8OVh.js +84 -0
- package/dist/dom-CJxkno7i.js +91 -0
- package/dist/favicon.ico +0 -0
- package/dist/focusDrawerMixin-DhsqWZUo.js +22 -0
- package/dist/formComponentsInstall-UG7a9vjZ.js +2499 -0
- package/dist/formDrawerState-BMQrWaBt.js +20 -0
- package/dist/formValidationMixin-DUu0omWT.js +49 -0
- package/dist/i18nMessages-Chz_lxGG.js +17 -0
- package/dist/index-B3R_uKML.js +347 -0
- package/dist/index-B4aiQXsr.js +166 -0
- package/dist/index-C50JSDKO.js +3916 -0
- package/dist/index-CJ9AvuZH.js +102 -0
- package/dist/index-Czyda2Ej.js +492 -0
- package/dist/index-myOYAnwV.js +81 -0
- package/dist/index.es.js +35 -0
- package/dist/index.umd.js +3148 -0
- package/dist/main-B9t0ybqW.js +56739 -0
- package/dist/mapFormMixin-ETYhBLl2.js +72 -0
- package/dist/omit-DtTfKAed.js +31 -0
- package/dist/publicSenderState-DD1lN9CR.js +21 -0
- package/dist/splitpanes-BHUVsCZF.js +382 -0
- package/dist/style.css +4 -0
- package/dist/throttle-qziKkJJX.js +18 -0
- package/dist/tinycolor-CMC8Xp7x.js +633 -0
- package/dist/tippy.esm-DjbYjfS2.js +1799 -0
- package/dist/utils-C5Rg0fQC.js +108 -0
- package/dist/vuedraggable.umd-CE3WmaEQ.js +3161 -0
- package/dist/vuex.esm-DKGl8mcw.js +467 -0
- package/package.json +1 -1
- package/tsconfig.json +26 -26
- package/tsconfig.node.json +10 -10
- package/tsconfig.paths.json +17 -17
- package/vite.config.ts +61 -61
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
import { m as g } from "./mapFormMixin-ETYhBLl2.js";
|
|
2
|
+
import { E as y } from "./ErrorCallout-CwgYHBkg.js";
|
|
3
|
+
import { am as f, an as v, w as _, n as d, ao as k, A as w, b as p, d as P, c as $ } from "./main-B9t0ybqW.js";
|
|
4
|
+
import { t as m } from "./tinycolor-CMC8Xp7x.js";
|
|
5
|
+
import { T as b } from "./DocTextEditor-AqBE7jZj.js";
|
|
6
|
+
const x = {
|
|
7
|
+
name: "ArticleItem",
|
|
8
|
+
mixins: [g([])],
|
|
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: f,
|
|
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: i } = this;
|
|
84
|
+
return this.priceType === "markup" || this.showPricesIncVat && (i *= (100 + this.vat) / 100), i;
|
|
85
|
+
},
|
|
86
|
+
atPrice() {
|
|
87
|
+
if (!this.price || !this.showPrice || this.priceType === "openAcc" || this.priceType === "markup")
|
|
88
|
+
return !1;
|
|
89
|
+
let { price: i } = this;
|
|
90
|
+
return this.showPricesIncVat && (i *= (100 + this.vat) / 100), this.priceFormat(i, {
|
|
91
|
+
currency: this.currency,
|
|
92
|
+
decimals: 2,
|
|
93
|
+
hideZeroDecimals: !0
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
totalPrice() {
|
|
97
|
+
if (!this.price || !this.totalAmount)
|
|
98
|
+
return "";
|
|
99
|
+
let i = this.totalAmount;
|
|
100
|
+
this.showPricesIncVat && this.priceType !== "markup" && (i *= (100 + this.vat) / 100);
|
|
101
|
+
let e = "";
|
|
102
|
+
return this.priceType === "openAcc" && (e = `/${v(this.unitType, {
|
|
103
|
+
lng: this._document.language
|
|
104
|
+
})}`, this.houseWorkType && (i *= {
|
|
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" ? i = `${this.priceFormat(i, {
|
|
111
|
+
suffix: !1,
|
|
112
|
+
decimals: 2,
|
|
113
|
+
currency: this.currency
|
|
114
|
+
})} %` : i = this.priceFormat(i, {
|
|
115
|
+
currency: this.currency,
|
|
116
|
+
decimals: 2,
|
|
117
|
+
hideZeroDecimals: !0
|
|
118
|
+
}), this.calcPricePrefix + i + e;
|
|
119
|
+
},
|
|
120
|
+
discountLabels() {
|
|
121
|
+
if (!this.discount)
|
|
122
|
+
return "";
|
|
123
|
+
const i = this.priceFormat(
|
|
124
|
+
this.fixQuantity * this.unitPriceUnformatted,
|
|
125
|
+
{
|
|
126
|
+
currency: this.currency
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
let e = "", t = "";
|
|
130
|
+
return this.discountType === "percentage" ? (e = `<span style="color: red;">-${this.discount / 100}%</span>`, t = `<span style="text-decoration: line-through; font-weight: 400; padding-left: 0.75ch; opacity: 0.75;">${i}</span>`) : t = `<span style="text-decoration: line-through; color: red;">${i}</span>`, `<div style="font-size: calc(1em - 2px);">${e}${t}</div>`;
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
methods: {
|
|
134
|
+
articleUnitLabel: v,
|
|
135
|
+
priceFormat: _
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
var T = function() {
|
|
139
|
+
var e = this, t = e._self._c;
|
|
140
|
+
return t("div", { staticClass: "article-wrapper print-avoid-break-inside", class: {
|
|
141
|
+
"no-border-top": e.position === 0
|
|
142
|
+
} }, [t("div", { staticClass: "article-text" }, [t("div", { staticClass: "article-text-title hyphens-auto break-all" }, [e._v(e._s(e.title))]), e.showDetails ? t("div", { staticClass: "article-text-sub" }, [e.priceType === "openAcc" || e.priceType === "markup" ? t("div", [e._v(" " + e._s(e._document.$t(`price.${e.priceType}`)) + " ")]) : e._e(), e.priceType !== "openAcc" && e.priceType !== "markup" ? t("div", [e._v(" " + e._s(e.fixQuantity) + " " + e._s(e.articleUnitLabel(e.unitType, { count: e.fixQuantity, lng: e._document.language, instance: e.$options.docLang })) + " ")]) : e._e(), e.atPrice ? t("svg", { staticStyle: { margin: "0 4px" }, attrs: { width: "6", height: "6", viewBox: "0 0 148 141", xmlns: "http://www.w3.org/2000/svg" } }, [t("path", { attrs: { 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", fill: "#000", "fill-rule": "evenodd" } })]) : e._e(), e.atPrice ? t("div", [e._v(e._s(e.atPrice))]) : e._e()]) : e._e()]), t("div", { staticClass: "article-price" }, [e.showPrice ? [e.discount ? t("div", { domProps: { innerHTML: e._s(e.discountLabels) } }) : e._e(), t("div", [e._v(" " + e._s(e.totalPrice) + " ")])] : e._e(), e.houseWorkType ? t("div", { staticClass: "article-price-sub" }, [e.houseWorkType && e.priceType === "openAcc" ? [e._v(e._s(e._document.$t("deduction.afterType", { type: `${e.houseWorkType}_percentage` })))] : e.houseWorkType ? [e._v(e._s(e._document.$t("chapters.articleItem.eligibleForDeduction", { type: `${e.houseWorkType}_percentage` })))] : e._e()], 2) : e._e()], 2)]);
|
|
143
|
+
}, S = [], V = /* @__PURE__ */ d(
|
|
144
|
+
x,
|
|
145
|
+
T,
|
|
146
|
+
S,
|
|
147
|
+
!1,
|
|
148
|
+
null,
|
|
149
|
+
"cf33c521"
|
|
150
|
+
);
|
|
151
|
+
const C = V.exports, I = {
|
|
152
|
+
name: "ArticleList",
|
|
153
|
+
components: {
|
|
154
|
+
DocChapterArticleItem: C
|
|
155
|
+
},
|
|
156
|
+
mixins: [g([])],
|
|
157
|
+
props: {
|
|
158
|
+
articles: {
|
|
159
|
+
type: Array,
|
|
160
|
+
required: !0
|
|
161
|
+
},
|
|
162
|
+
showPrices: {
|
|
163
|
+
type: Boolean,
|
|
164
|
+
default: !0
|
|
165
|
+
},
|
|
166
|
+
showPricesIncVat: {
|
|
167
|
+
type: Boolean,
|
|
168
|
+
default: !0
|
|
169
|
+
},
|
|
170
|
+
parent: {
|
|
171
|
+
type: String,
|
|
172
|
+
default: ""
|
|
173
|
+
},
|
|
174
|
+
useVat: {
|
|
175
|
+
type: Boolean,
|
|
176
|
+
required: !0
|
|
177
|
+
},
|
|
178
|
+
vatType: {
|
|
179
|
+
type: String,
|
|
180
|
+
required: !0
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
computed: {
|
|
184
|
+
showVatToggle() {
|
|
185
|
+
return this.useVat && (this.articles || []).some(({ vat: i }) => i !== null);
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
methods: {
|
|
189
|
+
articleHouseWorkType: k
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
var A = function() {
|
|
193
|
+
var e = this, t = e._self._c;
|
|
194
|
+
return t("div", { staticClass: "article-list-wrapper" }, [t("div", { staticClass: "article-head" }, [t("div", [e._v(e._s(e._document.$t("chapters.articleList.title")))]), e.showPrices && e.showVatToggle ? t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e._document.$t("chapters.articleList.changeShowVatTooltip", {
|
|
195
|
+
type: e._document.$t(`vat.${e.showPricesIncVat ? "exVat" : "incVat"}`, {
|
|
196
|
+
thing: e._document.$t(`vat.${e.vatType}`)
|
|
197
|
+
})
|
|
198
|
+
}), expression: "\n _document.$t('chapters.articleList.changeShowVatTooltip', {\n type: _document.$t(`vat.${showPricesIncVat ? 'exVat' : 'incVat'}`, {\n thing: _document.$t(`vat.${vatType}`)\n })\n })\n " }], staticStyle: { "text-decoration": "underline", cursor: "pointer" }, on: { click: function(r) {
|
|
199
|
+
return e.$emit("toggle-show-vat", !e.showPricesIncVat);
|
|
200
|
+
} } }, [e._v(" " + e._s(e._document.$t(`vat.${e.showPricesIncVat ? "incVat" : "exVat"}`, { thing: e._document.$t(`vat.${e.vatType}`) })) + " ")]) : e._e()]), e._l(e.articles, function(r, o) {
|
|
201
|
+
return t("DocChapterArticleItem", { key: o, attrs: { _document: e._document, title: r.name, quantity: r.quantity, unit: r.unit, "unit-type": r.unitType, "article-no": r.article_no, "house-work-type": e.articleHouseWorkType(r), price: e.showPrices ? r.price : null, currency: r.currency, vat: r.vat, "price-type": r.priceType, "show-price": r.showPrice, position: r.position, "show-prices-inc-vat": e.showPricesIncVat, discount: r.discount, "discount-type": r.discountType, "total-amount": r.totalAmount } });
|
|
202
|
+
})], 2);
|
|
203
|
+
}, F = [], D = /* @__PURE__ */ d(
|
|
204
|
+
I,
|
|
205
|
+
A,
|
|
206
|
+
F,
|
|
207
|
+
!1,
|
|
208
|
+
null,
|
|
209
|
+
"cb0dfa52"
|
|
210
|
+
);
|
|
211
|
+
const z = D.exports, B = {
|
|
212
|
+
name: "PackageItem",
|
|
213
|
+
i18nOptions: {
|
|
214
|
+
namespaces: "PackageItem",
|
|
215
|
+
messages: {
|
|
216
|
+
en: {
|
|
217
|
+
selectTooltip: "Only your clients can select options"
|
|
218
|
+
},
|
|
219
|
+
sv: {
|
|
220
|
+
selectTooltip: "Enbart din kund kan välja ett paket"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
components: {
|
|
225
|
+
ArticleList: z,
|
|
226
|
+
TextEditor: b
|
|
227
|
+
},
|
|
228
|
+
inject: {
|
|
229
|
+
isPdf: {
|
|
230
|
+
default: !1
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
props: {
|
|
234
|
+
workPackage: {
|
|
235
|
+
type: Object,
|
|
236
|
+
required: !0
|
|
237
|
+
},
|
|
238
|
+
type: {
|
|
239
|
+
type: String,
|
|
240
|
+
required: !0
|
|
241
|
+
},
|
|
242
|
+
canToggle: {
|
|
243
|
+
type: Boolean,
|
|
244
|
+
default: !1
|
|
245
|
+
},
|
|
246
|
+
isPreview: {
|
|
247
|
+
type: Boolean,
|
|
248
|
+
default: !1
|
|
249
|
+
},
|
|
250
|
+
showToggle: {
|
|
251
|
+
type: Boolean,
|
|
252
|
+
default: !1
|
|
253
|
+
},
|
|
254
|
+
showPricesIncVat: {
|
|
255
|
+
type: Boolean,
|
|
256
|
+
default: !0
|
|
257
|
+
},
|
|
258
|
+
headingColor: {
|
|
259
|
+
type: String,
|
|
260
|
+
default: "#03f"
|
|
261
|
+
},
|
|
262
|
+
_document: {
|
|
263
|
+
type: Object,
|
|
264
|
+
default: null
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
data() {
|
|
268
|
+
return {
|
|
269
|
+
internalShowDetails: !1,
|
|
270
|
+
tinycolor: m
|
|
271
|
+
};
|
|
272
|
+
},
|
|
273
|
+
computed: {
|
|
274
|
+
prices() {
|
|
275
|
+
return this.workPackage.prices;
|
|
276
|
+
},
|
|
277
|
+
totalBeforeDiscount() {
|
|
278
|
+
return (this.workPackage.articles || []).reduce((i, e) => {
|
|
279
|
+
const t = e.priceType === "openAcc" ? 1 : e.quantity;
|
|
280
|
+
let { price: r } = e;
|
|
281
|
+
return this.showPricesIncVat && e.priceType !== "markup" && (r *= (100 + e.vat) / 100), i + t * r;
|
|
282
|
+
}, 0);
|
|
283
|
+
},
|
|
284
|
+
showDetails: {
|
|
285
|
+
get() {
|
|
286
|
+
return this.type === "single" || this.workPackage.isSelected && !this.workPackage.toggable ? !0 : this.internalShowDetails || this.isPdf;
|
|
287
|
+
},
|
|
288
|
+
set(i) {
|
|
289
|
+
this.internalShowDetails = i;
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
description() {
|
|
293
|
+
const i = this._document ? this._document._doc : {};
|
|
294
|
+
return w(this.workPackage.data.description, i);
|
|
295
|
+
},
|
|
296
|
+
useVat() {
|
|
297
|
+
return this._document ? this._document.useVat : !1;
|
|
298
|
+
},
|
|
299
|
+
vatType() {
|
|
300
|
+
return this._document ? this._document.vatType : "vat";
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
methods: {
|
|
304
|
+
priceFormat(i, e = {}) {
|
|
305
|
+
return _(i, {
|
|
306
|
+
currency: this.prices.currency,
|
|
307
|
+
decimals: 2,
|
|
308
|
+
hideZeroDecimals: !0,
|
|
309
|
+
...e
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
var M = function() {
|
|
315
|
+
var e = this, t = e._self._c;
|
|
316
|
+
return t("div", { staticClass: "package-container font-inter", class: {
|
|
317
|
+
"single-package": e.type === "single" || e.workPackage.isSelected && !e.workPackage.toggable
|
|
318
|
+
}, style: {
|
|
319
|
+
...e.workPackage.isSelected && {
|
|
320
|
+
boxShadow: `0 0 0 2px ${e.headingColor}`
|
|
321
|
+
}
|
|
322
|
+
} }, [t("div", { staticClass: "top-container" }, [e.workPackage.data.name ? t("div", { staticStyle: { "font-weight": "800", "font-size": "calc(calc(1 * var(--rem)) + 4px)", "margin-bottom": "calc(0.5 * var(--rem))" } }, [e._v(" " + e._s(e.workPackage.data.name) + " ")]) : e._e(), t("div", [e.description ? t("TextEditor", { staticStyle: { "margin-bottom": "1em" }, attrs: { value: e.description } }) : e._e()], 1)]), t("Animation", [t("ArticleList", { directives: [{ name: "show", rawName: "v-show", value: e.showDetails && e.workPackage.articles.length, expression: "showDetails && workPackage.articles.length" }], staticClass: "articles-container", attrs: { _document: e._document, articles: e.workPackage.articles, "show-prices-inc-vat": e.showPricesIncVat, "use-vat": e.useVat, "vat-type": e.vatType, parent: "packageGroup" }, on: { "toggle-show-vat": function(r) {
|
|
323
|
+
return e.$emit("toggle-show-vat", r);
|
|
324
|
+
} } })], 1), e.type !== "single" && (e.workPackage.toggable || e.isPreview) && (e.prices.total || e.prices.type === "openAcc") ? t("div", { staticClass: "flex w-full justify-end", staticStyle: { "margin-top": "calc(3 * var(--rem))" } }, [t("div", { staticStyle: { padding: "calc(0.75 * var(--rem)) calc(1 * var(--rem))", "text-align": "right" } }, [e.prices.helpers.discount ? t("div", { staticClass: "price-total", staticStyle: { color: "red", "text-decoration": "line-through", "font-size": "16px", "font-weight": "600" } }, [e._v(" " + e._s(e.priceFormat(e.showPricesIncVat ? e.totalBeforeDiscount : e.prices.subTotal + e.prices.helpers.discount)) + " ")]) : e._e(), e.prices.type === "openAcc" ? [t("div", { staticStyle: { "line-height": "1.2", "font-size": "13px" } }, [e._v(" " + e._s(e._document.$t("price.pricing")) + " ")]), t("div", { staticClass: "price-total", staticStyle: { padding: "2px 0 3px 0" } }, [e._v(" " + e._s(e._document.$t("price.openAccPrice")) + " ")])] : [t("div", { staticClass: "price-total" }, [e.type === "checkbox" ? t("span", { staticClass: "primary-text-color", staticStyle: { "font-weight": "900" } }, [e._v("+")]) : e._e(), e._v(" " + e._s(e.priceFormat(e.showPricesIncVat ? e.prices.total : e.prices.subTotal)) + " ")]), e.useVat ? t("div", { staticStyle: { "line-height": "1.2", "font-size": "13px", padding: "2px 0 3px 0" } }, [e._v(" " + e._s(e._document.$t("price.price").capitalize()) + " " + e._s(e._document.$t(`vat.${e.showPricesIncVat ? "incVat" : "exVat"}`, { thing: e._document.$t(`vat.${e.vatType}`) })) + " ")]) : e._e()]], 2)]) : e._e(), e.showToggle ? t("div", { staticClass: "flex w-full items-center justify-end", staticStyle: { "background-color": "hsl(215, 10%, 95%)" } }, [e.isPdf ? e._e() : [t("CButton", { staticClass: "package-button", attrs: { pattern: "tertiary", type: "text", icon: e.showDetails ? "arrow-up" : "arrow-down", "icon-props": { size: 20 } }, on: { click: function(r) {
|
|
325
|
+
e.showDetails = !e.showDetails;
|
|
326
|
+
} } }, [e._v(" " + e._s(e._document.$t("show", { thing: e._document.$t(`${e.showDetails ? "less" : "detail_plural"}`) })) + " ")]), e.canToggle || e.isPreview ? t("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.isPreview && {
|
|
327
|
+
content: e.$t("selectTooltip"),
|
|
328
|
+
offset: 5
|
|
329
|
+
}, expression: `
|
|
330
|
+
isPreview && {
|
|
331
|
+
content: $t('selectTooltip'),
|
|
332
|
+
offset: 5
|
|
333
|
+
}
|
|
334
|
+
` }], staticClass: "package-button", class: { "is-disabled": e.isPreview }, style: {
|
|
335
|
+
backgroundColor: e.headingColor,
|
|
336
|
+
color: e.tinycolor.readability(e.headingColor, "#FFF") > 2.2 ? "#FFF" : "#000"
|
|
337
|
+
}, attrs: { type: "text" }, on: { click: function(r) {
|
|
338
|
+
e.canToggle && e.$emit("toggle", e.workPackage.packageId);
|
|
339
|
+
} } }, [e.workPackage.isSelected ? [t("svg", { staticStyle: { "margin-right": "calc(0.5 * var(--rem))" }, attrs: { viewBox: "0 0 24 24", width: "18", height: "18", stroke: "currentColor", "stroke-width": "3.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("polyline", { attrs: { points: "20 6 9 17 4 12" } })]), e._v(" " + e._s(e._document.$t("chapters.packageItem.selected")) + " ")] : [e._v(" " + e._s(e._document.$t(`chapters.packageItem.${e.type === "radio" ? "select" : "add"}`)) + " ")]], 2) : e._e()]], 2) : e._e()], 1);
|
|
340
|
+
}, W = [], O = /* @__PURE__ */ d(
|
|
341
|
+
B,
|
|
342
|
+
M,
|
|
343
|
+
W,
|
|
344
|
+
!1,
|
|
345
|
+
null,
|
|
346
|
+
"597f71fb"
|
|
347
|
+
);
|
|
348
|
+
const Z = O.exports, q = {
|
|
349
|
+
name: "PackagePricingSummary",
|
|
350
|
+
props: {
|
|
351
|
+
// PackageGroup.prices (format: calcPrices of one group)
|
|
352
|
+
prices: {
|
|
353
|
+
type: Object,
|
|
354
|
+
default: () => ({ region: {} })
|
|
355
|
+
},
|
|
356
|
+
showPrices: {
|
|
357
|
+
type: Boolean,
|
|
358
|
+
default: !0
|
|
359
|
+
},
|
|
360
|
+
_document: {
|
|
361
|
+
type: Object,
|
|
362
|
+
default: () => ({})
|
|
363
|
+
},
|
|
364
|
+
primaryColor: {
|
|
365
|
+
type: String,
|
|
366
|
+
default: "#03f"
|
|
367
|
+
},
|
|
368
|
+
placeholder: {
|
|
369
|
+
type: Boolean,
|
|
370
|
+
default: !1
|
|
371
|
+
},
|
|
372
|
+
showPricesIncVat: {
|
|
373
|
+
type: Boolean,
|
|
374
|
+
default: !0
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
computed: {
|
|
378
|
+
blocks() {
|
|
379
|
+
const {
|
|
380
|
+
type: i,
|
|
381
|
+
total: e,
|
|
382
|
+
maxTotal: t,
|
|
383
|
+
subTotal: r,
|
|
384
|
+
taxAmount: o,
|
|
385
|
+
roundingAmount: s,
|
|
386
|
+
currency: a
|
|
387
|
+
} = this.prices, c = [];
|
|
388
|
+
if (!a)
|
|
389
|
+
return c;
|
|
390
|
+
const n = {
|
|
391
|
+
title: this._document.$t("chapters.pricingSummary.blocks.price"),
|
|
392
|
+
subTitle: this._document.$t("chapters.pricingSummary.blocks.summary")
|
|
393
|
+
}, u = this.getPricingInfo({
|
|
394
|
+
includeFixedCosts: !this.isOpenAccPricing
|
|
395
|
+
});
|
|
396
|
+
let l = this.hasDeductions ? this._document.$t(
|
|
397
|
+
"chapters.pricingSummary.blocks.deductionSubValue",
|
|
398
|
+
{
|
|
399
|
+
price: this.priceFormat(r + o + s, {
|
|
400
|
+
currency: a,
|
|
401
|
+
decimals: 2,
|
|
402
|
+
hideZeroDecimals: !0
|
|
403
|
+
})
|
|
404
|
+
}
|
|
405
|
+
) : null, h = e;
|
|
406
|
+
return this.prices.useVat && !this.showPricesIncVat && !this.hasDeductions && (h = r, l = `${this.priceFormat(e, {
|
|
407
|
+
currency: a,
|
|
408
|
+
decimals: 2,
|
|
409
|
+
hideZeroDecimals: !0
|
|
410
|
+
})} ${this._document.$t("vat.incVat")}`), ["fixed", "approx"].includes(i) && c.push({
|
|
411
|
+
header: n,
|
|
412
|
+
items: u,
|
|
413
|
+
footer: {
|
|
414
|
+
title: this._document.$t("chapters.pricingSummary.blocks.total"),
|
|
415
|
+
subTitle: i === "approx" ? this._document.$t("chapters.pricingSummary.blocks.approx") : null,
|
|
416
|
+
value: this.priceFormat(h, {
|
|
417
|
+
currency: a,
|
|
418
|
+
decimals: 2,
|
|
419
|
+
hideZeroDecimals: !0
|
|
420
|
+
}),
|
|
421
|
+
subValue: l
|
|
422
|
+
}
|
|
423
|
+
}), this.isOpenAccPricing && (c.push({
|
|
424
|
+
header: n,
|
|
425
|
+
items: u,
|
|
426
|
+
footer: t ? {
|
|
427
|
+
title: this._document.$t(
|
|
428
|
+
"chapters.pricingSummary.blocks.maxPrice"
|
|
429
|
+
),
|
|
430
|
+
value: this.priceFormat(this.calcMaxPrice, {
|
|
431
|
+
currency: a,
|
|
432
|
+
decimals: 2,
|
|
433
|
+
hideZeroDecimals: !0
|
|
434
|
+
})
|
|
435
|
+
} : null
|
|
436
|
+
}), e && c.push({
|
|
437
|
+
header: {
|
|
438
|
+
subTitle: this._document.$t(
|
|
439
|
+
"chapters.pricingSummary.blocks.subTitleArticles"
|
|
440
|
+
)
|
|
441
|
+
},
|
|
442
|
+
items: this.getPricingInfo({
|
|
443
|
+
includeFixedCosts: !0,
|
|
444
|
+
showType: !1
|
|
445
|
+
}),
|
|
446
|
+
footer: {
|
|
447
|
+
title: this._document.$t("chapters.pricingSummary.blocks.total"),
|
|
448
|
+
value: this.priceFormat(h, {
|
|
449
|
+
currency: a,
|
|
450
|
+
decimals: 2,
|
|
451
|
+
hideZeroDecimals: !0
|
|
452
|
+
}),
|
|
453
|
+
subValue: l
|
|
454
|
+
}
|
|
455
|
+
})), c;
|
|
456
|
+
},
|
|
457
|
+
isOpenAccPricing() {
|
|
458
|
+
return ["openAcc", "openAccMaxPrice"].includes(this.prices.type);
|
|
459
|
+
},
|
|
460
|
+
showIncVat() {
|
|
461
|
+
return p(this._document, "prices.helpers.isIndivid", !0);
|
|
462
|
+
},
|
|
463
|
+
calcMaxPrice() {
|
|
464
|
+
return this.prices.maxTotal ? this.showIncVat ? this.prices.maxTotal * 1.25 : this.prices.maxTotal : null;
|
|
465
|
+
},
|
|
466
|
+
showPricingCard() {
|
|
467
|
+
const { subTotal: i, total: e, maxTotal: t, currency: r } = this.prices;
|
|
468
|
+
return r && (this.isOpenAccPricing || this.placeholder || i || e || t);
|
|
469
|
+
},
|
|
470
|
+
hasDeductions() {
|
|
471
|
+
return this.prices.region && this.prices.region.houseWorkAmount;
|
|
472
|
+
},
|
|
473
|
+
vatType() {
|
|
474
|
+
return p(this, "_document.vatType");
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
methods: {
|
|
478
|
+
priceFormat(i, e = { showZero: !0 }) {
|
|
479
|
+
return _(i, e);
|
|
480
|
+
},
|
|
481
|
+
deductionText(i = !0) {
|
|
482
|
+
let e = "";
|
|
483
|
+
return this.hasDeductions && (e = this._document.$t(
|
|
484
|
+
"chapters.pricingSummary.blocks.typeDeduction",
|
|
485
|
+
{ type: `${this.prices.region.houseWorkType}_percentage` }
|
|
486
|
+
)), i || (e = e.charAt(0).toLowerCase() + e.slice(1)), e;
|
|
487
|
+
},
|
|
488
|
+
getPricingInfo({ includeFixedCosts: i = !0, showType: e = !0 }) {
|
|
489
|
+
const {
|
|
490
|
+
type: t,
|
|
491
|
+
subTotal: r,
|
|
492
|
+
roundingAmount: o,
|
|
493
|
+
taxAmount: s,
|
|
494
|
+
maxTotal: a,
|
|
495
|
+
region: c = {},
|
|
496
|
+
currency: n,
|
|
497
|
+
helpers: { discount: u }
|
|
498
|
+
} = this.prices;
|
|
499
|
+
let l = [];
|
|
500
|
+
return c.country === "sweden" && (t === "openAccMaxPrice" && a && !i && (l.push({
|
|
501
|
+
label: this._document.$t(
|
|
502
|
+
"chapters.pricingSummary.blocks.maxPriceVat",
|
|
503
|
+
{ vat: this._document.$t("vat.exVat") }
|
|
504
|
+
),
|
|
505
|
+
value: this.priceFormat(a, {
|
|
506
|
+
currency: n,
|
|
507
|
+
decimals: 2,
|
|
508
|
+
hideZeroDecimals: !0
|
|
509
|
+
})
|
|
510
|
+
}), c.reverseVat || l.push({
|
|
511
|
+
label: this._document.$t(
|
|
512
|
+
"chapters.pricingSummary.blocks.maxPriceVat",
|
|
513
|
+
{ vat: this._document.$t("vat.incVat") }
|
|
514
|
+
),
|
|
515
|
+
value: this.priceFormat(a * 1.25, {
|
|
516
|
+
currency: n,
|
|
517
|
+
decimals: 2,
|
|
518
|
+
hideZeroDecimals: !0
|
|
519
|
+
})
|
|
520
|
+
})), c.houseWorkType && c.houseWorkAmount && i && l.push({
|
|
521
|
+
label: this._document.$t("deduction.type", {
|
|
522
|
+
type: `${c.houseWorkType}${c.houseWorkManualAmount === null ? "_percentage" : ""}`
|
|
523
|
+
}),
|
|
524
|
+
value: this.priceFormat(-1 * c.houseWorkAmount, {
|
|
525
|
+
currency: n,
|
|
526
|
+
decimals: 2,
|
|
527
|
+
hideZeroDecimals: !0
|
|
528
|
+
})
|
|
529
|
+
})), i && (l = [
|
|
530
|
+
{
|
|
531
|
+
label: this._document.$t("chapters.pricingSummary.blocks.net"),
|
|
532
|
+
value: this.priceFormat(r, {
|
|
533
|
+
currency: n,
|
|
534
|
+
decimals: 2,
|
|
535
|
+
hideZeroDecimals: !0
|
|
536
|
+
})
|
|
537
|
+
},
|
|
538
|
+
...this.prices.useVat ? [
|
|
539
|
+
{
|
|
540
|
+
label: this._document.$t(`vat.${this.vatType}`).capitalize(),
|
|
541
|
+
value: this.priceFormat(c.reverseVat ? 0 : s, {
|
|
542
|
+
showZero: !0,
|
|
543
|
+
currency: n,
|
|
544
|
+
decimals: 2,
|
|
545
|
+
hideZeroDecimals: !0
|
|
546
|
+
})
|
|
547
|
+
}
|
|
548
|
+
] : [],
|
|
549
|
+
...l,
|
|
550
|
+
...this.prices.rounding.enabled && this.prices.rounding.show ? [
|
|
551
|
+
{
|
|
552
|
+
label: this._document.$t(
|
|
553
|
+
"chapters.pricingSummary.blocks.rounding"
|
|
554
|
+
),
|
|
555
|
+
value: this.priceFormat(o, {
|
|
556
|
+
decimals: 2,
|
|
557
|
+
showZero: !0,
|
|
558
|
+
currency: n,
|
|
559
|
+
hideZeroDecimals: !0
|
|
560
|
+
})
|
|
561
|
+
}
|
|
562
|
+
] : [],
|
|
563
|
+
...this.prices.helpers.discount ? [
|
|
564
|
+
{
|
|
565
|
+
label: this._document.$t(
|
|
566
|
+
"chapters.pricingSummary.blocks.discount"
|
|
567
|
+
),
|
|
568
|
+
value: `-${this.priceFormat(u, {
|
|
569
|
+
decimals: 2,
|
|
570
|
+
showZero: !0,
|
|
571
|
+
currency: n,
|
|
572
|
+
hideZeroDecimals: !0
|
|
573
|
+
})}`
|
|
574
|
+
}
|
|
575
|
+
] : []
|
|
576
|
+
]), e && t !== "fixed" && (l = [
|
|
577
|
+
{
|
|
578
|
+
label: this._document.$t("price.pricing").capitalize(),
|
|
579
|
+
value: this._document.$t(`price.${t}`)
|
|
580
|
+
},
|
|
581
|
+
...l
|
|
582
|
+
]), l;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
var L = function() {
|
|
587
|
+
var e = this, t = e._self._c;
|
|
588
|
+
return e._document.readPrices ? t("div", { staticClass: "font-inter", staticStyle: { "margin-top": "calc(2 * var(--rem))", "margin-bottom": "calc(2 * var(--rem))", position: "relative" }, attrs: { id: "price" } }, [e.showPricingCard ? t("div", { staticClass: "pricing-container", class: { faded: e.placeholder } }, [e._l(e.blocks, function({ header: r, items: o, footer: s }, a) {
|
|
589
|
+
return t("div", { key: a, staticClass: "block-container print-avoid-break-inside", class: { first: a === 0 } }, [t("div", { staticClass: "block-header" }, [r.title ? t("div", { staticStyle: { "font-weight": "800" } }, [e._v(" " + e._s(r.title) + " ")]) : e._e(), r.subTitle ? t("div", { staticStyle: { "font-size": "16px", "margin-left": "0.5em" } }, [e._v(" " + e._s(r.subTitle) + " ")]) : e._e()]), o.length || s ? t("div", { staticClass: "block-body" }, [e._l(o, function({ label: c, value: n }, u) {
|
|
590
|
+
return t("div", { key: `item-${u}-${a}`, staticClass: "block-body-item", class: a === 0 && "primary-light-background", style: a !== 0 && { borderBottom: "1px solid hsl(210, 15%, 85%)" } }, [t("div", [e._v(e._s(c))]), t("div", [e._v(e._s(n))])]);
|
|
591
|
+
}), s ? t("div", { staticClass: "block-body-footer", style: { "border-top": `4px solid ${e.primaryColor}` } }, [t("div", [e._v(" " + e._s(s.title) + " "), s.subTitle ? t("div", { staticStyle: { "font-weight": "500", "font-size": "calc(1em - 2px)" } }, [e._v(" " + e._s(s.subTitle) + " ")]) : e._e()]), t("div", { staticClass: "text-right" }, [t("div", [e._v(e._s(s.value))]), s.subValue ? t("div", { staticClass: "block-body-footer-hint" }, [e._v(" " + e._s(s.subValue) + " ")]) : e._e()])]) : e._e()], 2) : e._e()]);
|
|
592
|
+
}), e.prices.region && e.prices.region.reverseVat ? [t("div", { staticClass: "terms-text" }, [e._v(" " + e._s(e._document.$t("chapters.pricingSummary.terms.reverseVat")) + " ")])] : e._e(), e.prices.region && e.prices.region.houseWorkType ? t("div", { staticClass: "terms-text", attrs: { id: "villkor-avdrag" } }, [e._v(" " + e._s(e._document.$t("chapters.pricingSummary.terms.houseWork", { type: `${e.prices.region.houseWorkType}_percentage` })) + " ")]) : e._e(), e.prices.type === "approx" && e.prices.region && e.prices.region.houseWorkType === "rot" ? t("div", { staticClass: "terms-text" }, [e._v(" " + e._s(e._document.$t("chapters.pricingSummary.terms.houseWorkApprox")) + " ")]) : e._e()], 2) : e._e(), e.placeholder ? t("div", { staticClass: "flex w-full flex-col items-center justify-center", staticStyle: { 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))", "text-align": "center", "font-size": "16px" } }, [t("svg", { attrs: { width: "200", height: "100", viewBox: "0 0 418 211", xmlns: "http://www.w3.org/2000/svg" } }, [t("defs", [t("filter", { attrs: { id: "a", x: "-30.7%", y: "-26.2%", width: "160%", height: "155%", filterUnits: "objectBoundingBox" } }, [t("feOffset", { attrs: { dy: "3", in: "SourceAlpha", result: "shadowOffsetOuter1" } }), t("feGaussianBlur", { attrs: { stdDeviation: "1", in: "shadowOffsetOuter1", result: "shadowBlurOuter1" } }), t("feColorMatrix", { attrs: { 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" } }), t("feMerge", [t("feMergeNode", { attrs: { in: "shadowMatrixOuter1" } }), t("feMergeNode", { attrs: { in: "SourceGraphic" } })], 1)], 1)]), t("g", { attrs: { fill: "none", "fill-rule": "evenodd" } }, [t("path", { attrs: { stroke: "#E4E4E4", "stroke-width": "3", d: "M1.5 1.5h415v187H1.5z" } }), t("path", { attrs: { fill: e.primaryColor, "fill-rule": "nonzero", d: "M282 139h136v51H282z" } }), t("g", { attrs: { filter: "url(#a)", transform: "translate(365.5 165)" } }, [t("path", { attrs: { 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", fill: "#FFF", "fill-rule": "nonzero" } }), t("path", { attrs: { 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", stroke: "#000", "stroke-width": "1.9", "stroke-linecap": "round", "stroke-linejoin": "round" } }), t("path", { attrs: { 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", fill: "#000", "fill-rule": "nonzero" } })]), t("text", { attrs: { "font-family": "Inter-Regular, Inter", "font-size": "24", fill: "#FFF" } }, [t("tspan", { attrs: { x: "332.4", y: "173" } }, [e._v(e._s(e._document.$t("select")))])]), t("path", { attrs: { fill: "#E4E4E4", "fill-rule": "nonzero", d: "M28 27h124v24H28zM28 64h355v11H28zM28 82h355v12H28zM28 103h178v12H28z" } })])]), t("div", { staticStyle: { "padding-top": "1em", "font-weight": "600", "font-size": "18px" } }, [e._v(" " + e._s(e._document.$t("chapters.pricingSummary.placeholder.title")) + " ")]), t("div", [e._v(" " + e._s(e._document.$t("chapters.pricingSummary.placeholder.description"))), t("span", { staticStyle: { "font-weight": "600" } }, [e._v(e._s(e._document.$t("chapters.pricingSummary.placeholder.descriptionBold")))]), e._v(". ")])]) : e._e()]) : e._e();
|
|
593
|
+
}, E = [], j = /* @__PURE__ */ d(
|
|
594
|
+
q,
|
|
595
|
+
L,
|
|
596
|
+
E,
|
|
597
|
+
!1,
|
|
598
|
+
null,
|
|
599
|
+
"a3ec6611"
|
|
600
|
+
);
|
|
601
|
+
const G = j.exports, N = {
|
|
602
|
+
name: "PackageGroup",
|
|
603
|
+
components: {
|
|
604
|
+
PackageItem: Z,
|
|
605
|
+
PackagePricingSummary: G,
|
|
606
|
+
ErrorCallout: y
|
|
607
|
+
},
|
|
608
|
+
mixins: [
|
|
609
|
+
g(["type", "packages", "hideGroupPrice"], { useEmit: !1 })
|
|
610
|
+
],
|
|
611
|
+
props: {
|
|
612
|
+
validator: {
|
|
613
|
+
type: Object,
|
|
614
|
+
default: () => ({})
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
data() {
|
|
618
|
+
return {
|
|
619
|
+
showPricesIncVat: !0
|
|
620
|
+
};
|
|
621
|
+
},
|
|
622
|
+
computed: {
|
|
623
|
+
prices() {
|
|
624
|
+
return (this._document.packageGroups.getPackageGroupUniqId(
|
|
625
|
+
this._value.groupId
|
|
626
|
+
) || {}).prices || {};
|
|
627
|
+
},
|
|
628
|
+
showToggle() {
|
|
629
|
+
return this.type !== "single";
|
|
630
|
+
},
|
|
631
|
+
canToggle() {
|
|
632
|
+
const { hasAnswers: i } = this._document, { hasAnswered: e, canAnswer: t } = this._document.answerActions || {};
|
|
633
|
+
return !i && this.type !== "single" && !e && t;
|
|
634
|
+
},
|
|
635
|
+
fixedPackages() {
|
|
636
|
+
return this.packages.filter((i) => !i.toggable && i.isSelected);
|
|
637
|
+
},
|
|
638
|
+
toggablePackages() {
|
|
639
|
+
return this.packages.filter((i) => !(!i.toggable && i.isSelected));
|
|
640
|
+
},
|
|
641
|
+
primaryColor() {
|
|
642
|
+
let i = p(this, '_document.data.css[".chapter"]["--accentColor"]') || p(this, "_document.theme.headingColor");
|
|
643
|
+
function e() {
|
|
644
|
+
m.readability(i, "#fff") < 1.8 && (i = m(i).darken(5).toString(), e());
|
|
645
|
+
}
|
|
646
|
+
return e(), i;
|
|
647
|
+
},
|
|
648
|
+
selectedPackages() {
|
|
649
|
+
return this.packages.filter(({ isSelected: i }) => i);
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
created() {
|
|
653
|
+
const {
|
|
654
|
+
isPreview: i,
|
|
655
|
+
setPricesIncVat: e = null,
|
|
656
|
+
useVat: t = P[$.brand].defaultRegion === "SE"
|
|
657
|
+
} = p(this, "_document", {});
|
|
658
|
+
i && e !== null ? this.showPricesIncVat = e : this.showPricesIncVat = p(this, "_document.prices.helpers.isIndivid", !0) && t;
|
|
659
|
+
},
|
|
660
|
+
methods: {
|
|
661
|
+
onToggle(i) {
|
|
662
|
+
if (this.type === "single")
|
|
663
|
+
return;
|
|
664
|
+
const e = this.packages.findIndex(({ packageId: t }) => t === i);
|
|
665
|
+
e === -1 || this.type === "radio" && this.packages[e].isSelected || (this.setField({
|
|
666
|
+
key: `${this._value.packages}[${e}].isSelected`,
|
|
667
|
+
value: !this.packages[e].isSelected
|
|
668
|
+
}), this.type === "radio" && this.packages.forEach((t, r) => {
|
|
669
|
+
r !== e && this.setField({
|
|
670
|
+
key: `${this._value.packages}[${r}].isSelected`,
|
|
671
|
+
value: !1
|
|
672
|
+
});
|
|
673
|
+
}));
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
var R = function() {
|
|
678
|
+
var e = this, t = e._self._c;
|
|
679
|
+
return t("div", { staticStyle: { position: "relative" } }, [e._l(e.fixedPackages, function(r, o) {
|
|
680
|
+
return t("PackageItem", { key: o, attrs: { type: e.type, "work-package": e._document.packageGroups.getPackageById(r.packageId), "heading-color": e.primaryColor, "can-toggle": e.canToggle, "show-prices-inc-vat": e.showPricesIncVat, _document: e._document }, on: { toggle: e.onToggle, "toggle-show-vat": function(s) {
|
|
681
|
+
e.showPricesIncVat = s;
|
|
682
|
+
} } });
|
|
683
|
+
}), e.toggablePackages.length ? t("div", [e.fixedPackages.length && e.toggablePackages.length ? t("div", { staticStyle: { 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))" } }, [e._v(" " + e._s(e._document.$t("chapters.packageGroup.selectableOptions")) + " ")]) : e._e(), e._l(e.toggablePackages, function(r, o) {
|
|
684
|
+
return t("PackageItem", { key: `fixed-${o}`, attrs: { "work-package": e._document.packageGroups.getPackageById(r.packageId), type: e.type, "heading-color": e.primaryColor, "show-toggle": e.showToggle, "can-toggle": e.canToggle, "is-preview": e._document.isPreview, "show-prices-inc-vat": e.showPricesIncVat, _document: e._document }, on: { toggle: e.onToggle, "toggle-show-vat": function(s) {
|
|
685
|
+
e.showPricesIncVat = s;
|
|
686
|
+
} } });
|
|
687
|
+
})], 2) : e._e(), e.validator.$invalid && e.validator.$dirty ? t("ErrorCallout", { staticStyle: { "padding-bottom": "calc(1.5 * var(--rem))" }, attrs: { message: e._document.$t("chapters.packageGroup.errorCallout") } }) : e._e(), e.hideGroupPrice ? e._e() : t("PackagePricingSummary", { attrs: { prices: e.prices, _document: e._document, "show-prices-inc-vat": e.showPricesIncVat, "primary-color": e.primaryColor, placeholder: !e.selectedPackages.length } })], 2);
|
|
688
|
+
}, H = [], U = /* @__PURE__ */ d(
|
|
689
|
+
N,
|
|
690
|
+
R,
|
|
691
|
+
H,
|
|
692
|
+
!1,
|
|
693
|
+
null,
|
|
694
|
+
"f50d442e"
|
|
695
|
+
);
|
|
696
|
+
const ee = U.exports;
|
|
697
|
+
export {
|
|
698
|
+
ee as default
|
|
699
|
+
};
|