@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.
Files changed (232) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/AddClientCallout-Bod9Eqx4.js +101 -0
  3. package/dist/AnswerModal-a2cyKFbt.js +3371 -0
  4. package/dist/AttachmentItem-DBUqckCS.js +171 -0
  5. package/dist/BaseUpload-DrWzuvbS.js +6503 -0
  6. package/dist/BlockMedia-DuE_K9hR.js +103 -0
  7. package/dist/CCallout-CM1VsH30.js +104 -0
  8. package/dist/{CCurrencyDropdown-CXXQu8th.js → CCurrencyDropdown-C_lAaq4P.js} +91 -53
  9. package/dist/CDropdownItem-DMUAJ90n.js +749 -0
  10. package/dist/CFormField.vue_vue_type_script_setup_true_lang-BqAyWe3T.js +292 -0
  11. package/dist/{CPhoneFormat-BtBGl8b4.js → CPhoneFormat-Dnn_cKk7.js} +13 -21
  12. package/dist/CPhoneInput-DuGkDiv-.js +207 -0
  13. package/dist/CPriceInput-B7DYzKcF.js +142 -0
  14. package/dist/CSelect-BZZDr27O.js +98 -0
  15. package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-D2jDhnYI.js +51 -0
  16. package/dist/ClientAutocomplete-DuaJ5zDf.js +532 -0
  17. package/dist/ClientModal-CaMSjLkD.js +1188 -0
  18. package/dist/ColorPicker-BISZPQ6j.js +1408 -0
  19. package/dist/CompanyModal-ClTcmU4Y.js +250 -0
  20. package/dist/ContentWrapper-Bj7jbWU0.js +265 -0
  21. package/dist/CoverBlockSettings-AXyiLxrF.js +861 -0
  22. package/dist/DocAnswer-Bu09V33D.js +33 -0
  23. package/dist/DocDetails-B6-2LKsO.js +452 -0
  24. package/dist/DocForm-CFN8LWSd.js +6772 -0
  25. package/dist/DocFormSend-D1CUhy4n.js +171 -0
  26. package/dist/DocLinks-CuliFqtN.js +36 -0
  27. package/dist/DocModalBase-BxKsnwN-.js +29 -0
  28. package/dist/DocPrint-B_HJ_RET.js +399 -0
  29. package/dist/DocReceipt-D-A1TaTI.js +341 -0
  30. package/dist/DocSendReminder-BKTJonzh.js +181 -0
  31. package/dist/{DocTextEditor-yD9Dt_um.js → DocTextEditor-CEPcJT2o.js} +7907 -5579
  32. package/dist/DocTimeline-CF9S4YDZ.js +537 -0
  33. package/dist/DocumentClient-7mbq2QA4.js +90 -0
  34. package/dist/DocumentLayout-DkFlHgW6.js +1434 -0
  35. package/dist/DocumentLogotype-BTYMdpNi.js +162 -0
  36. package/dist/DocumentVoided-CWr5WMUv.js +33 -0
  37. package/dist/EmbedInput-SevVEpwc.js +156 -0
  38. package/dist/EmbedSettings-YMbUmp1O.js +103 -0
  39. package/dist/ErrorCallout-CQo2iF9c.js +34 -0
  40. package/dist/FilePreviewModal-C0xBeoAz.js +202 -0
  41. package/dist/Flag-BObij6SN.js +41 -0
  42. package/dist/HeaderSettings-C77pR78n.js +720 -0
  43. package/dist/ImageSelectModal-DKdU-0uq.js +119 -0
  44. package/dist/ImageUploadWrapper-BGkS5Cll.js +1585 -0
  45. package/dist/Index-B3y-jq9s.js +1098 -0
  46. package/dist/Index-B41pUREi.js +47 -0
  47. package/dist/Index-BEyeS1OG.js +52 -0
  48. package/dist/Index-BG5j8ZFP.js +93 -0
  49. package/dist/Index-BOT65yQR.js +68 -0
  50. package/dist/Index-BQNl-cXP.js +28 -0
  51. package/dist/Index-BY6xsS7C.js +38 -0
  52. package/dist/Index-Bh0Xv5ry.js +163 -0
  53. package/dist/Index-Bn4FSQcx.js +228 -0
  54. package/dist/Index-BrRIAede.js +87 -0
  55. package/dist/Index-C-6um0kX.js +76 -0
  56. package/dist/{Index-C_aIQ908.js → Index-C-gHa5xk.js} +319 -214
  57. package/dist/Index-C0wcjKCH.js +629 -0
  58. package/dist/Index-C6BbUFYw.js +160 -0
  59. package/dist/Index-C8xwJ0m1.js +200 -0
  60. package/dist/Index-CKgFEJF4.js +140 -0
  61. package/dist/{Index-Dfq7egc1.js → Index-CQwmu4f1.js} +47 -60
  62. package/dist/Index-CXchTpBa.js +74 -0
  63. package/dist/{Index-Ch9r5yhG.js → Index-CYoRt8PA.js} +9 -17
  64. package/dist/Index-CZZNQ4q5.js +39 -0
  65. package/dist/Index-CkaAs5ms.js +136 -0
  66. package/dist/Index-CtpXaBz8.js +363 -0
  67. package/dist/Index-CxDsSGtZ.js +126 -0
  68. package/dist/Index-DFkTBm02.js +102 -0
  69. package/dist/Index-DP3ll8F-.js +70 -0
  70. package/dist/{Index-RWMPRDAE.js → Index-DPDzMKQa.js} +10 -18
  71. package/dist/Index-DvxSig3z.js +25 -0
  72. package/dist/Index-Dzrn3Y6p.js +16 -0
  73. package/dist/{Index-CRiATiQn.js → Index-LQb0omFE.js} +10 -18
  74. package/dist/Index-Mt4mSaNT.js +4 -0
  75. package/dist/Index-_xN_cczo.js +3477 -0
  76. package/dist/Index-gAz45qgR.js +21 -0
  77. package/dist/Index-xXLFalgR.js +49 -0
  78. package/dist/Index-zyZRPz3H.js +28 -0
  79. package/dist/Index.vue_vue_type_script_lang-Ddo1wo-D.js +671 -0
  80. package/dist/InputToggleRow-CokEYwm2.js +99 -0
  81. package/dist/ManualPopover-Dukly7GP.js +65 -0
  82. package/dist/MediaWrapper-B8msCrQm.js +18 -0
  83. package/dist/{NotBindingText-CC7TxUqg.js → NotBindingText-DcQd8Eej.js} +13 -17
  84. package/dist/PackageGroup-clUIUoik.js +1060 -0
  85. package/dist/PdfTerms-DpzMVRfN.js +34 -0
  86. package/dist/PdfViewer-CSf4Rtbj.js +392 -0
  87. package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-D6KSjjMA.js +17 -0
  88. package/dist/PriceHeader-Dyweu8aH.js +488 -0
  89. package/dist/{SearchApi-G2Hvp0Dd.js → SearchApi-Y1fDQn0u.js} +37 -49
  90. package/dist/SendForm-B9l24WwR.js +6689 -0
  91. package/dist/Setup-DyzbPFM4.js +47 -0
  92. package/dist/{SmartList-BynTuXtB.js → SmartList-CWGKoAJh.js} +16 -24
  93. package/dist/Sortable.vue_vue_type_script_setup_true_lang-C2Gwp6Q-.js +1349 -0
  94. package/dist/{TermsSettings-cA5YAO77.js → TermsSettings-BeQH307A.js} +169 -56
  95. package/dist/ThemeColorRow-DFIsPy55.js +105 -0
  96. package/dist/ToggleBinding-DlH4y1IM.js +44 -0
  97. package/dist/UploadModal-BZ0mPBBB.js +134 -0
  98. package/dist/VideoPlayerInput-DBxcTUb7.js +134 -0
  99. package/dist/VideoPlayerSettings-Dg1OxjOa.js +78 -0
  100. package/dist/VideoSelectModal-BhbanMix.js +217 -0
  101. package/dist/{anime.es-BrPTThYb.js → anime.es-4wvNItHq.js} +205 -201
  102. package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
  103. package/dist/{dom-Ds4ypDrd.js → dom-CkTGWrfu.js} +3 -6
  104. package/dist/{focusDrawerMixin-CximZA1J.js → focusDrawerMixin-BVbTYOGr.js} +1 -1
  105. package/dist/{formDrawerState-CkNGdxn5.js → formDrawerState-CogZ-GVm.js} +2 -2
  106. package/dist/helpers-B4GUxtdD.js +46 -0
  107. package/dist/index-BZDey7B-.js +268 -0
  108. package/dist/index-Bd8_ZHHq.js +188 -0
  109. package/dist/index-BvyoYp1e.js +508 -0
  110. package/dist/index-CJZoubA3.js +3525 -0
  111. package/dist/index-D7yQWP4d.js +125 -0
  112. package/dist/index-D8hGHka6.js +513 -0
  113. package/dist/index-Dxy4tf7x.js +149 -0
  114. package/dist/index.es.js +2 -5
  115. package/dist/index.umd.js +303 -1486
  116. package/dist/main-Bn5XkQPb.js +57570 -0
  117. package/dist/mapFormMixin-C7FJLnbO.js +1528 -0
  118. package/dist/omit-DrWpFvRJ.js +56 -0
  119. package/dist/{publicSenderState-CGEm9EYe.js → publicSenderState-tdtCFPMx.js} +4 -4
  120. package/dist/splitpanes-BApidgjj.js +342 -0
  121. package/dist/template-CHdf2K2I.js +1572 -0
  122. package/dist/tippy.esm-Co6FYzEM.js +1994 -0
  123. package/dist/useTermsModal-VDnO1Lro.js +87 -0
  124. package/dist/{utils-Dr4AcaE9.js → utils-DZkn0Q9c.js} +8 -11
  125. package/dist/validation-CqBkar3f.js +40 -0
  126. package/dist/widget.css +1 -0
  127. package/package.json +20 -25
  128. package/dist/AddClientCallout-Br6IhwGH.js +0 -48
  129. package/dist/AnswerModal-CsWltR6j.js +0 -3879
  130. package/dist/AttachmentItem-BG7FuSCD.js +0 -85
  131. package/dist/BaseDatePicker-PSNBtUIh.js +0 -3187
  132. package/dist/BaseUpload-BfEurAAV.js +0 -1977
  133. package/dist/BlockMedia-Bo3OfNSU.js +0 -76
  134. package/dist/CCallout-CAjM8-1X.js +0 -58
  135. package/dist/CDropdownItem-CN7gSfgY.js +0 -640
  136. package/dist/CFormField-Clvcf2Jh.js +0 -240
  137. package/dist/CPhoneInput-CEHXh5jM.js +0 -138
  138. package/dist/CPriceInput-D2c07SXp.js +0 -116
  139. package/dist/CSelect-Cz2IPzxS.js +0 -91
  140. package/dist/CSkeleton-AsnvnD-m.js +0 -55
  141. package/dist/ClientAutocomplete-CZ55-DKe.js +0 -438
  142. package/dist/ClientModal-CgUhWZ5L.js +0 -666
  143. package/dist/ColorPicker-IFGHqH-u.js +0 -2879
  144. package/dist/CompanyModal-TLSBFo3U.js +0 -147
  145. package/dist/ContentWrapper-HClxKPuT.js +0 -190
  146. package/dist/CoverBlockSettings-D99hAa6e.js +0 -659
  147. package/dist/DocAnswer-CTV_Bpt7.js +0 -36
  148. package/dist/DocDetails-CQe5htXj.js +0 -263
  149. package/dist/DocForm-6Efv5_oz.js +0 -5017
  150. package/dist/DocFormSend-DbXcklxU.js +0 -146
  151. package/dist/DocLinks-BO545zbL.js +0 -38
  152. package/dist/DocModalBase-DXHNJ-6i.js +0 -28
  153. package/dist/DocPrint-Bf2U4FQN.js +0 -240
  154. package/dist/DocReceipt-CWXvC7bY.js +0 -217
  155. package/dist/DocSendReminder-CRzBM2NJ.js +0 -140
  156. package/dist/DocTimeline-DGVOk8-2.js +0 -485
  157. package/dist/DocumentClient-Das9BaJ7.js +0 -136
  158. package/dist/DocumentLayout-4q8rmTVT.js +0 -4880
  159. package/dist/DocumentLogotype-DLncJJAB.js +0 -92
  160. package/dist/DocumentVoided-CcI9lX27.js +0 -25
  161. package/dist/EmbedInput-BPdy0lGS.js +0 -117
  162. package/dist/EmbedSettings-L2iwYLQK.js +0 -74
  163. package/dist/ErrorCallout-Ds_tBT02.js +0 -27
  164. package/dist/FilePreviewModal-hxUu330p.js +0 -81
  165. package/dist/Flag-1-HcT5Dz.js +0 -46
  166. package/dist/HeaderSettings-C27fMugK.js +0 -440
  167. package/dist/ImageSelectModal-BKDIyxF4.js +0 -86
  168. package/dist/ImageUploadWrapper-BiYzUQur.js +0 -1604
  169. package/dist/Index-5BOWxcPG.js +0 -26
  170. package/dist/Index-B1Odktov.js +0 -754
  171. package/dist/Index-B3d5BjEn.js +0 -25
  172. package/dist/Index-B3sSU_4X.js +0 -54
  173. package/dist/Index-B5Dqsh3K.js +0 -150
  174. package/dist/Index-B6aO1c_w.js +0 -62
  175. package/dist/Index-BGfICxJQ.js +0 -643
  176. package/dist/Index-BHopC0hv.js +0 -24
  177. package/dist/Index-BJXcSmp_.js +0 -55
  178. package/dist/Index-BQe6QjQZ.js +0 -25
  179. package/dist/Index-BmXx_x6t.js +0 -77
  180. package/dist/Index-C692qMTG.js +0 -294
  181. package/dist/Index-CEvbw-3i.js +0 -41
  182. package/dist/Index-CYSULnpn.js +0 -32
  183. package/dist/Index-CdtYzwAM.js +0 -107
  184. package/dist/Index-CetF2FW0.js +0 -230
  185. package/dist/Index-Cv6XLM20.js +0 -73
  186. package/dist/Index-Cwy8ff76.js +0 -154
  187. package/dist/Index-D34z4UEY.js +0 -84
  188. package/dist/Index-DNCei-lp.js +0 -56
  189. package/dist/Index-DUbxgIYB.js +0 -2445
  190. package/dist/Index-DVwn_LLf.js +0 -28
  191. package/dist/Index-Dla-mesV.js +0 -146
  192. package/dist/Index-KtUkOPI2.js +0 -58
  193. package/dist/Index-LjnOTVJk.js +0 -66
  194. package/dist/Index-ky1SRtfY.js +0 -94
  195. package/dist/Index-mceZW2NX.js +0 -41
  196. package/dist/Index-tD3hZjh8.js +0 -144
  197. package/dist/Index-vM5kDtC2.js +0 -33
  198. package/dist/InputToggleRow-BmDuSbE2.js +0 -57
  199. package/dist/ManualPopover-CQfjPvFe.js +0 -60
  200. package/dist/MediaWrapper-DDzcjR6V.js +0 -23
  201. package/dist/PackageGroup-mAGXfZDv.js +0 -704
  202. package/dist/PdfTerms-BH_Nwf2h.js +0 -31
  203. package/dist/PdfViewer-mBLxI8bA.js +0 -383
  204. package/dist/PlainHtml-B7gUNNZd.js +0 -27
  205. package/dist/PriceHeader-DClYMPcq.js +0 -338
  206. package/dist/SendForm-Cxv_m8Rq.js +0 -1023
  207. package/dist/Setup-B90VDZTG.js +0 -50
  208. package/dist/ThemeColorRow-D-Z7w4Wk.js +0 -69
  209. package/dist/ToggleBinding-DOeTcWzi.js +0 -42
  210. package/dist/UploadModal-DOPLVEpV.js +0 -95
  211. package/dist/VideoPlayerInput-1zG06elO.js +0 -97
  212. package/dist/VideoPlayerSettings-O-4rAYYh.js +0 -61
  213. package/dist/VideoSelectModal-DzqFrqCg.js +0 -104
  214. package/dist/answerDocumentMixin-HBiNWYCH.js +0 -51
  215. package/dist/debounce-Ch1d3526.js +0 -84
  216. package/dist/formValidationMixin-D_MzsHsR.js +0 -49
  217. package/dist/index-BNdbPq4J.js +0 -492
  218. package/dist/index-BXzugeJ6.js +0 -81
  219. package/dist/index-C5wcxrC6.js +0 -167
  220. package/dist/index-CgDOs7t4.js +0 -2700
  221. package/dist/index-Cj-_2coz.js +0 -351
  222. package/dist/index-DpqV5y0K.js +0 -102
  223. package/dist/main-BL_yzf2r.js +0 -57357
  224. package/dist/mapFormMixin-Cu_vkTP-.js +0 -3028
  225. package/dist/omit-Dfe_H1Ft.js +0 -31
  226. package/dist/simplebar.min-CRlLD1Oz.js +0 -71
  227. package/dist/splitpanes-BHUVsCZF.js +0 -382
  228. package/dist/style.css +0 -4
  229. package/dist/throttle-BX_w77tW.js +0 -18
  230. package/dist/tippy.esm-n4arfVzA.js +0 -1805
  231. package/dist/vuedraggable.umd-DW4PJoZ3.js +0 -3161
  232. package/dist/vuex.esm-DKGl8mcw.js +0 -467
@@ -1,704 +0,0 @@
1
- import { m as g, t as m } from "./mapFormMixin-Cu_vkTP-.js";
2
- import { E as y } from "./ErrorCallout-Ds_tBT02.js";
3
- import { au as f, av as v, D as _, n as d, aw as k, J as w, b as p, d as P, c as $ } from "./main-BL_yzf2r.js";
4
- import { T as b } from "./DocTextEditor-yD9Dt_um.js";
5
- const x = {
6
- name: "ArticleItem",
7
- mixins: [g([])],
8
- props: {
9
- title: {
10
- type: String,
11
- required: !0
12
- },
13
- quantity: {
14
- type: Number,
15
- required: !0
16
- },
17
- unitType: {
18
- type: String,
19
- required: !0
20
- },
21
- articleNo: {
22
- type: String,
23
- default: null
24
- },
25
- houseWorkType: {
26
- type: String,
27
- default: null
28
- },
29
- price: {
30
- type: Number,
31
- default: 0
32
- },
33
- currency: {
34
- type: String,
35
- required: !0
36
- },
37
- vat: {
38
- type: Number,
39
- default: null
40
- },
41
- priceType: {
42
- type: String,
43
- required: !0
44
- },
45
- showPrice: {
46
- type: Boolean,
47
- default: !0
48
- },
49
- position: {
50
- type: Number,
51
- default: null
52
- },
53
- showPricesIncVat: {
54
- type: Boolean,
55
- required: !0
56
- },
57
- discount: {
58
- type: Number,
59
- default: null
60
- },
61
- discountType: {
62
- type: String,
63
- default: null
64
- },
65
- totalAmount: {
66
- type: Number,
67
- default: null
68
- }
69
- },
70
- docLang: f,
71
- computed: {
72
- fixQuantity() {
73
- return this.priceType === "openAcc" ? 1 : this.quantity;
74
- },
75
- showDetails() {
76
- return this.showPrice ? this.priceType === "openAcc" || this.priceType === "markup" || this.quantity !== 1 || this.unitType !== "unit" : !1;
77
- },
78
- calcPricePrefix() {
79
- return this.priceType === "approx" ? `${this._document.$t("approx")} ` : "";
80
- },
81
- unitPriceUnformatted() {
82
- let { price: i } = this;
83
- return this.priceType === "markup" || this.showPricesIncVat && (i *= (100 + this.vat) / 100), i;
84
- },
85
- atPrice() {
86
- if (!this.price || !this.showPrice || this.priceType === "openAcc" || this.priceType === "markup")
87
- return !1;
88
- let { price: i } = this;
89
- return this.showPricesIncVat && (i *= (100 + this.vat) / 100), this.priceFormat(i, {
90
- currency: this.currency,
91
- decimals: 2,
92
- hideZeroDecimals: !0
93
- });
94
- },
95
- totalPrice() {
96
- if (!this.price || !this.totalAmount)
97
- return "";
98
- let i = this.totalAmount;
99
- this.showPricesIncVat && this.priceType !== "markup" && (i *= (100 + this.vat) / 100);
100
- let e = "";
101
- return this.priceType === "openAcc" && (e = `/${v(this.unitType, {
102
- lng: this._document.language
103
- })}`, this.houseWorkType && (i *= {
104
- rot: 0.7,
105
- rut: 0.5,
106
- greenRot15: 0.85,
107
- greenRot20: 0.8,
108
- greenRot50: 0.5
109
- }[this.houseWorkType])), this.priceType === "markup" ? i = `${this.priceFormat(i, {
110
- suffix: !1,
111
- decimals: 2,
112
- currency: this.currency
113
- })} %` : i = this.priceFormat(i, {
114
- currency: this.currency,
115
- decimals: 2,
116
- hideZeroDecimals: !0
117
- }), this.calcPricePrefix + i + e;
118
- },
119
- discountLabels() {
120
- if (!this.discount)
121
- return "";
122
- const i = this.priceFormat(
123
- this.fixQuantity * this.unitPriceUnformatted,
124
- {
125
- currency: this.currency
126
- }
127
- );
128
- let e = "", t = "";
129
- 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>`;
130
- }
131
- },
132
- methods: {
133
- articleUnitLabel: v,
134
- priceFormat: _
135
- }
136
- };
137
- var T = function() {
138
- var e = this, t = e._self._c;
139
- return t("div", { staticClass: "article-wrapper print-avoid-break-inside", class: {
140
- "no-border-top": e.position === 0
141
- } }, [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._document.$t(`deduction.${e.houseWorkType}_percentage`) })))] : e.houseWorkType ? [e._v(e._s(e._document.$t("chapters.articleItem.eligibleForDeduction", { type: e._document.$t(`deduction.${e.houseWorkType}_percentage`) })))] : e._e()], 2) : e._e()], 2)]);
142
- }, S = [], V = /* @__PURE__ */ d(
143
- x,
144
- T,
145
- S,
146
- !1,
147
- null,
148
- "0358ad9f"
149
- );
150
- const C = V.exports, I = {
151
- name: "ArticleList",
152
- components: {
153
- DocChapterArticleItem: C
154
- },
155
- mixins: [g([])],
156
- props: {
157
- articles: {
158
- type: Array,
159
- required: !0
160
- },
161
- showPrices: {
162
- type: Boolean,
163
- default: !0
164
- },
165
- showPricesIncVat: {
166
- type: Boolean,
167
- default: !0
168
- },
169
- parent: {
170
- type: String,
171
- default: ""
172
- },
173
- useVat: {
174
- type: Boolean,
175
- required: !0
176
- },
177
- vatType: {
178
- type: String,
179
- required: !0
180
- }
181
- },
182
- computed: {
183
- showVatToggle() {
184
- return this.useVat && (this.articles || []).some(({ vat: i }) => i !== null);
185
- }
186
- },
187
- methods: {
188
- articleHouseWorkType: k
189
- }
190
- };
191
- var A = function() {
192
- var e = this, t = e._self._c;
193
- 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", {
194
- type: e._document.$t(`vat.${e.showPricesIncVat ? "exVat" : "incVat"}`, {
195
- thing: e._document.$t(`vat.${e.vatType}`)
196
- })
197
- }), 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) {
198
- return e.$emit("toggle-show-vat", !e.showPricesIncVat);
199
- } } }, [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) {
200
- 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 } });
201
- })], 2);
202
- }, D = [], F = /* @__PURE__ */ d(
203
- I,
204
- A,
205
- D,
206
- !1,
207
- null,
208
- "cb0dfa52"
209
- );
210
- const z = F.exports, B = {
211
- name: "PackageItem",
212
- i18nOptions: {
213
- namespaces: "PackageItem",
214
- messages: {
215
- en: {
216
- selectTooltip: "Only your clients can select options"
217
- },
218
- sv: {
219
- selectTooltip: "Enbart din kund kan välja ett paket"
220
- }
221
- }
222
- },
223
- components: {
224
- ArticleList: z,
225
- TextEditor: b
226
- },
227
- inject: {
228
- isPdf: {
229
- default: !1
230
- }
231
- },
232
- props: {
233
- workPackage: {
234
- type: Object,
235
- required: !0
236
- },
237
- type: {
238
- type: String,
239
- required: !0
240
- },
241
- canToggle: {
242
- type: Boolean,
243
- default: !1
244
- },
245
- isPreview: {
246
- type: Boolean,
247
- default: !1
248
- },
249
- showToggle: {
250
- type: Boolean,
251
- default: !1
252
- },
253
- showPricesIncVat: {
254
- type: Boolean,
255
- default: !0
256
- },
257
- headingColor: {
258
- type: String,
259
- default: "#03f"
260
- },
261
- _document: {
262
- type: Object,
263
- default: null
264
- }
265
- },
266
- data() {
267
- return {
268
- internalShowDetails: !1,
269
- tinycolor: m
270
- };
271
- },
272
- computed: {
273
- prices() {
274
- return this.workPackage.prices;
275
- },
276
- totalBeforeDiscount() {
277
- return (this.workPackage.articles || []).reduce((i, e) => {
278
- const t = e.priceType === "openAcc" ? 1 : e.quantity;
279
- let { price: r } = e;
280
- return this.showPricesIncVat && e.priceType !== "markup" && (r *= (100 + e.vat) / 100), i + t * r;
281
- }, 0);
282
- },
283
- showDetails: {
284
- get() {
285
- return this.type === "single" || this.workPackage.isSelected && !this.workPackage.toggable ? !0 : this.internalShowDetails || this.isPdf;
286
- },
287
- set(i) {
288
- this.internalShowDetails = i;
289
- }
290
- },
291
- description() {
292
- const i = this._document ? this._document._doc : {};
293
- return w(this.workPackage.data.description, i);
294
- },
295
- useVat() {
296
- return this._document ? this._document.useVat : !1;
297
- },
298
- vatType() {
299
- return this._document ? this._document.vatType : "vat";
300
- }
301
- },
302
- methods: {
303
- priceFormat(i, e = {}) {
304
- return _(i, {
305
- currency: this.prices.currency,
306
- decimals: 2,
307
- hideZeroDecimals: !0,
308
- ...e
309
- });
310
- }
311
- }
312
- };
313
- var M = function() {
314
- var e = this, t = e._self._c;
315
- return t("div", { staticClass: "package-container font-inter", class: {
316
- "single-package": e.type === "single" || e.workPackage.isSelected && !e.workPackage.toggable
317
- }, style: {
318
- ...e.workPackage.isSelected && {
319
- boxShadow: `0 0 0 2px ${e.headingColor}`
320
- }
321
- } }, [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) {
322
- return e.$emit("toggle-show-vat", r);
323
- } } })], 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) {
324
- e.showDetails = !e.showDetails;
325
- } } }, [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 && {
326
- content: e.$t("selectTooltip"),
327
- offset: 5
328
- }, expression: `
329
- isPreview && {
330
- content: $t('selectTooltip'),
331
- offset: 5
332
- }
333
- ` }], staticClass: "package-button", class: { "is-disabled": e.isPreview }, style: {
334
- backgroundColor: e.headingColor,
335
- color: e.tinycolor.readability(e.headingColor, "#FFF") > 2.2 ? "#FFF" : "#000"
336
- }, attrs: { type: "text" }, on: { click: function(r) {
337
- e.canToggle && e.$emit("toggle", e.workPackage.packageId);
338
- } } }, [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);
339
- }, W = [], O = /* @__PURE__ */ d(
340
- B,
341
- M,
342
- W,
343
- !1,
344
- null,
345
- "597f71fb"
346
- );
347
- const Z = O.exports, q = {
348
- name: "PackagePricingSummary",
349
- props: {
350
- // PackageGroup.prices (format: calcPrices of one group)
351
- prices: {
352
- type: Object,
353
- default: () => ({ region: {} })
354
- },
355
- showPrices: {
356
- type: Boolean,
357
- default: !0
358
- },
359
- _document: {
360
- type: Object,
361
- default: () => ({})
362
- },
363
- primaryColor: {
364
- type: String,
365
- default: "#03f"
366
- },
367
- placeholder: {
368
- type: Boolean,
369
- default: !1
370
- },
371
- showPricesIncVat: {
372
- type: Boolean,
373
- default: !0
374
- }
375
- },
376
- computed: {
377
- blocks() {
378
- const {
379
- type: i,
380
- total: e,
381
- maxTotal: t,
382
- subTotal: r,
383
- taxAmount: o,
384
- roundingAmount: s,
385
- currency: a
386
- } = this.prices, c = [];
387
- if (!a)
388
- return c;
389
- const n = {
390
- title: this._document.$t("chapters.pricingSummary.blocks.price"),
391
- subTitle: this._document.$t("chapters.pricingSummary.blocks.summary")
392
- }, u = this.getPricingInfo({
393
- includeFixedCosts: !this.isOpenAccPricing
394
- });
395
- let l = this.hasDeductions ? this._document.$t(
396
- "chapters.pricingSummary.blocks.deductionSubValue",
397
- {
398
- price: this.priceFormat(r + o + s, {
399
- currency: a,
400
- decimals: 2,
401
- hideZeroDecimals: !0
402
- })
403
- }
404
- ) : null, h = e;
405
- return this.prices.useVat && !this.showPricesIncVat && !this.hasDeductions && (h = r, l = `${this.priceFormat(e, {
406
- currency: a,
407
- decimals: 2,
408
- hideZeroDecimals: !0
409
- })} ${this._document.$t("vat.incVat")}`), ["fixed", "approx"].includes(i) && c.push({
410
- header: n,
411
- items: u,
412
- footer: {
413
- title: this._document.$t("chapters.pricingSummary.blocks.total"),
414
- subTitle: i === "approx" ? this._document.$t("chapters.pricingSummary.blocks.approx") : null,
415
- value: this.priceFormat(h, {
416
- currency: a,
417
- decimals: 2,
418
- hideZeroDecimals: !0
419
- }),
420
- subValue: l
421
- }
422
- }), this.isOpenAccPricing && (c.push({
423
- header: n,
424
- items: u,
425
- footer: t ? {
426
- title: this._document.$t(
427
- "chapters.pricingSummary.blocks.maxPrice"
428
- ),
429
- value: this.priceFormat(this.calcMaxPrice, {
430
- currency: a,
431
- decimals: 2,
432
- hideZeroDecimals: !0
433
- })
434
- } : null
435
- }), e && c.push({
436
- header: {
437
- subTitle: this._document.$t(
438
- "chapters.pricingSummary.blocks.subTitleArticles"
439
- )
440
- },
441
- items: this.getPricingInfo({
442
- includeFixedCosts: !0,
443
- showType: !1
444
- }),
445
- footer: {
446
- title: this._document.$t("chapters.pricingSummary.blocks.total"),
447
- value: this.priceFormat(h, {
448
- currency: a,
449
- decimals: 2,
450
- hideZeroDecimals: !0
451
- }),
452
- subValue: l
453
- }
454
- })), c;
455
- },
456
- isOpenAccPricing() {
457
- return ["openAcc", "openAccMaxPrice"].includes(this.prices.type);
458
- },
459
- showIncVat() {
460
- return p(this._document, "prices.helpers.isIndivid", !0);
461
- },
462
- calcMaxPrice() {
463
- return this.prices.maxTotal ? this.showIncVat ? this.prices.maxTotal * 1.25 : this.prices.maxTotal : null;
464
- },
465
- showPricingCard() {
466
- const { subTotal: i, total: e, maxTotal: t, currency: r } = this.prices;
467
- return r && (this.isOpenAccPricing || this.placeholder || i || e || t);
468
- },
469
- hasDeductions() {
470
- return this.prices.region && this.prices.region.houseWorkAmount;
471
- },
472
- vatType() {
473
- return p(this, "_document.vatType");
474
- }
475
- },
476
- methods: {
477
- priceFormat(i, e = { showZero: !0 }) {
478
- return _(i, e);
479
- },
480
- deductionText(i = !0) {
481
- let e = "";
482
- return this.hasDeductions && (e = this._document.$t(
483
- "chapters.pricingSummary.blocks.typeDeduction",
484
- {
485
- type: this._document.$t(
486
- `deduction.${this.prices.region.houseWorkType}_percentage`
487
- )
488
- }
489
- )), i || (e = e.charAt(0).toLowerCase() + e.slice(1)), e;
490
- },
491
- getPricingInfo({ includeFixedCosts: i = !0, showType: e = !0 }) {
492
- const {
493
- type: t,
494
- subTotal: r,
495
- roundingAmount: o,
496
- taxAmount: s,
497
- maxTotal: a,
498
- region: c = {},
499
- currency: n,
500
- helpers: { discount: u }
501
- } = this.prices;
502
- let l = [];
503
- return c.country === "sweden" && (t === "openAccMaxPrice" && a && !i && (l.push({
504
- label: this._document.$t(
505
- "chapters.pricingSummary.blocks.maxPriceVat",
506
- { vat: this._document.$t("vat.exVat") }
507
- ),
508
- value: this.priceFormat(a, {
509
- currency: n,
510
- decimals: 2,
511
- hideZeroDecimals: !0
512
- })
513
- }), c.reverseVat || l.push({
514
- label: this._document.$t(
515
- "chapters.pricingSummary.blocks.maxPriceVat",
516
- { vat: this._document.$t("vat.incVat") }
517
- ),
518
- value: this.priceFormat(a * 1.25, {
519
- currency: n,
520
- decimals: 2,
521
- hideZeroDecimals: !0
522
- })
523
- })), c.houseWorkType && c.houseWorkAmount && i && l.push({
524
- label: this._document.$t("deduction.type", {
525
- type: this._document.$t(
526
- `deduction.${c.houseWorkType}${c.houseWorkManualAmount === null ? "_percentage" : ""}`
527
- )
528
- }),
529
- value: this.priceFormat(-1 * c.houseWorkAmount, {
530
- currency: n,
531
- decimals: 2,
532
- hideZeroDecimals: !0
533
- })
534
- })), i && (l = [
535
- {
536
- label: this._document.$t("chapters.pricingSummary.blocks.net"),
537
- value: this.priceFormat(r, {
538
- currency: n,
539
- decimals: 2,
540
- hideZeroDecimals: !0
541
- })
542
- },
543
- ...this.prices.useVat ? [
544
- {
545
- label: this._document.$t(`vat.${this.vatType}`).capitalize(),
546
- value: this.priceFormat(c.reverseVat ? 0 : s, {
547
- showZero: !0,
548
- currency: n,
549
- decimals: 2,
550
- hideZeroDecimals: !0
551
- })
552
- }
553
- ] : [],
554
- ...l,
555
- ...this.prices.rounding.enabled && this.prices.rounding.show ? [
556
- {
557
- label: this._document.$t(
558
- "chapters.pricingSummary.blocks.rounding"
559
- ),
560
- value: this.priceFormat(o, {
561
- decimals: 2,
562
- showZero: !0,
563
- currency: n,
564
- hideZeroDecimals: !0
565
- })
566
- }
567
- ] : [],
568
- ...this.prices.helpers.discount ? [
569
- {
570
- label: this._document.$t(
571
- "chapters.pricingSummary.blocks.discount"
572
- ),
573
- value: `-${this.priceFormat(u, {
574
- decimals: 2,
575
- showZero: !0,
576
- currency: n,
577
- hideZeroDecimals: !0
578
- })}`
579
- }
580
- ] : []
581
- ]), e && t !== "fixed" && (l = [
582
- {
583
- label: this._document.$t("price.pricing").capitalize(),
584
- value: this._document.$t(`price.${t}`)
585
- },
586
- ...l
587
- ]), l;
588
- }
589
- }
590
- };
591
- var L = function() {
592
- var e = this, t = e._self._c;
593
- 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) {
594
- 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) {
595
- 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))])]);
596
- }), 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()]);
597
- }), 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._document.$t(`deduction.${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();
598
- }, E = [], j = /* @__PURE__ */ d(
599
- q,
600
- L,
601
- E,
602
- !1,
603
- null,
604
- "16cd51d3"
605
- );
606
- const G = j.exports, N = {
607
- name: "PackageGroup",
608
- components: {
609
- PackageItem: Z,
610
- PackagePricingSummary: G,
611
- ErrorCallout: y
612
- },
613
- mixins: [
614
- g(["type", "packages", "hideGroupPrice"], { useEmit: !1 })
615
- ],
616
- props: {
617
- validator: {
618
- type: Object,
619
- default: () => ({})
620
- }
621
- },
622
- data() {
623
- return {
624
- showPricesIncVat: !0
625
- };
626
- },
627
- computed: {
628
- prices() {
629
- return (this._document.packageGroups.getPackageGroupUniqId(
630
- this._value.groupId
631
- ) || {}).prices || {};
632
- },
633
- showToggle() {
634
- return this.type !== "single";
635
- },
636
- canToggle() {
637
- const { hasAnswers: i } = this._document, { hasAnswered: e, canAnswer: t } = this._document.answerActions || {};
638
- return !i && this.type !== "single" && !e && t;
639
- },
640
- fixedPackages() {
641
- return this.packages.filter((i) => !i.toggable && i.isSelected);
642
- },
643
- toggablePackages() {
644
- return this.packages.filter((i) => !(!i.toggable && i.isSelected));
645
- },
646
- primaryColor() {
647
- let i = p(this, '_document.data.css[".chapter"]["--accentColor"]') || p(this, "_document.theme.headingColor");
648
- function e() {
649
- m.readability(i, "#fff") < 1.8 && (i = m(i).darken(5).toString(), e());
650
- }
651
- return e(), i;
652
- },
653
- selectedPackages() {
654
- return this.packages.filter(({ isSelected: i }) => i);
655
- }
656
- },
657
- created() {
658
- const {
659
- isPreview: i,
660
- setPricesIncVat: e = null,
661
- useVat: t = P[$.brand].defaultRegion === "SE"
662
- } = p(this, "_document", {});
663
- i && e !== null ? this.showPricesIncVat = e : this.showPricesIncVat = p(this, "_document.prices.helpers.isIndivid", !0) && t;
664
- },
665
- methods: {
666
- onToggle(i) {
667
- if (this.type === "single")
668
- return;
669
- const e = this.packages.findIndex(({ packageId: t }) => t === i);
670
- e === -1 || this.type === "radio" && this.packages[e].isSelected || (this.setField({
671
- key: `${this._value.packages}[${e}].isSelected`,
672
- value: !this.packages[e].isSelected
673
- }), this.type === "radio" && this.packages.forEach((t, r) => {
674
- r !== e && this.setField({
675
- key: `${this._value.packages}[${r}].isSelected`,
676
- value: !1
677
- });
678
- }));
679
- }
680
- }
681
- };
682
- var R = function() {
683
- var e = this, t = e._self._c;
684
- return t("div", { staticStyle: { position: "relative" } }, [e._l(e.fixedPackages, function(r, o) {
685
- 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) {
686
- e.showPricesIncVat = s;
687
- } } });
688
- }), 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) {
689
- 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) {
690
- e.showPricesIncVat = s;
691
- } } });
692
- })], 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);
693
- }, H = [], U = /* @__PURE__ */ d(
694
- N,
695
- R,
696
- H,
697
- !1,
698
- null,
699
- "f50d442e"
700
- );
701
- const Y = U.exports;
702
- export {
703
- Y as default
704
- };