@cling-se/widget 0.17.0 → 1.0.0-beta.2

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/dist/AddClientCallout-e8d19R3f.js +101 -0
  2. package/dist/AnswerModal-BGvB8IVV.js +3291 -0
  3. package/dist/AttachmentItem-CkHbAm4l.js +171 -0
  4. package/dist/BaseUpload-BiJBcWRu.js +2472 -0
  5. package/dist/BlockMedia-CW5wgipC.js +103 -0
  6. package/dist/CCallout-Cy2eeIYd.js +104 -0
  7. package/dist/{CCurrencyDropdown-C2rXt2cJ.js → CCurrencyDropdown-DE_3CTjm.js} +91 -53
  8. package/dist/CDropdownItem-Dmq5gYzA.js +751 -0
  9. package/dist/CFormField.vue_vue_type_script_setup_true_lang-D_U9coAY.js +292 -0
  10. package/dist/{CPhoneFormat-C8VPsiK6.js → CPhoneFormat-BS2nP9kc.js} +13 -21
  11. package/dist/CPhoneInput-Bf6329PO.js +207 -0
  12. package/dist/CPriceInput-d1yjuMQr.js +140 -0
  13. package/dist/CSelect-DgnT07Hk.js +98 -0
  14. package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-Ckl--dyv.js +51 -0
  15. package/dist/ClientAutocomplete-9JzGcO9O.js +532 -0
  16. package/dist/ClientModal-BzWQtWSZ.js +1181 -0
  17. package/dist/ColorPicker-BvoFN8nu.js +1408 -0
  18. package/dist/CompanyModal-Bp4V_az9.js +250 -0
  19. package/dist/ContentWrapper-CuH6xKmo.js +265 -0
  20. package/dist/CoverBlockSettings-BA5L0Zee.js +861 -0
  21. package/dist/DocAnswer-BcNA_KEg.js +33 -0
  22. package/dist/DocDetails-CStEwWnU.js +448 -0
  23. package/dist/DocForm-BOoILf5E.js +6748 -0
  24. package/dist/DocFormSend-CQIf-HJY.js +171 -0
  25. package/dist/DocLinks-BRX5QzNe.js +36 -0
  26. package/dist/DocModalBase-D72yWj-x.js +29 -0
  27. package/dist/DocPrint-BI1LXUPE.js +399 -0
  28. package/dist/DocReceipt-DaZ4V76p.js +341 -0
  29. package/dist/DocSendReminder-DKGZlo7s.js +181 -0
  30. package/dist/DocTextEditor-Dm-cTZpA.js +19413 -0
  31. package/dist/DocTimeline-DCwofzuk.js +537 -0
  32. package/dist/DocumentClient-vJdxCB53.js +90 -0
  33. package/dist/DocumentLayout-CKSi42ev.js +1368 -0
  34. package/dist/DocumentLogotype-DbQlvQ-y.js +162 -0
  35. package/dist/DocumentVoided-CRX2WxWO.js +33 -0
  36. package/dist/EmbedInput-B-oeC4Wy.js +157 -0
  37. package/dist/EmbedSettings-B9Yka2yB.js +103 -0
  38. package/dist/ErrorCallout-B_ygH33E.js +34 -0
  39. package/dist/FilePreviewModal-Bf3ELTow.js +202 -0
  40. package/dist/Flag-BwTgCNHO.js +41 -0
  41. package/dist/HeaderSettings-DvC7nlyY.js +720 -0
  42. package/dist/ImageSelectModal-D3sP3lhR.js +119 -0
  43. package/dist/ImageUploadWrapper-RWNa-yIq.js +1585 -0
  44. package/dist/Index-0_3ULrWX.js +126 -0
  45. package/dist/Index-4NPe0sfX.js +629 -0
  46. package/dist/Index-B1uA0FF6.js +4 -0
  47. package/dist/Index-BBkCYm2q.js +201 -0
  48. package/dist/{Index-LzN6dktq.js → Index-BBwvo7S9.js} +10 -18
  49. package/dist/Index-BEMlsYwJ.js +68 -0
  50. package/dist/Index-BRBhJ6kz.js +21 -0
  51. package/dist/{Index-BPUYpfLJ.js → Index-BTFmHjUt.js} +47 -60
  52. package/dist/Index-BcUNnxLC.js +1098 -0
  53. package/dist/Index-Bo6ExBUL.js +93 -0
  54. package/dist/Index-BvMPCgdH.js +102 -0
  55. package/dist/Index-Bx5TOI9k.js +74 -0
  56. package/dist/Index-C7GZS8EI.js +16 -0
  57. package/dist/Index-CNWhm07R.js +25 -0
  58. package/dist/{Index-BUK-1yVR.js → Index-CQpznMKV.js} +9 -17
  59. package/dist/Index-CRzsnIij.js +159 -0
  60. package/dist/Index-CeSG1C41.js +140 -0
  61. package/dist/Index-CjfjdZj5.js +52 -0
  62. package/dist/Index-CskKmZpd.js +363 -0
  63. package/dist/Index-D5qwbCo1.js +28 -0
  64. package/dist/Index-D8Ae1Txt.js +228 -0
  65. package/dist/Index-DE8aenDB.js +3452 -0
  66. package/dist/Index-DI5EB5Rt.js +39 -0
  67. package/dist/Index-DaV57YPP.js +163 -0
  68. package/dist/Index-DbwkmoyM.js +38 -0
  69. package/dist/Index-Df9skok6.js +70 -0
  70. package/dist/{Index-BHJGfHm9.js → Index-DfLLA0ij.js} +313 -206
  71. package/dist/Index-Dw1CO5F9.js +76 -0
  72. package/dist/Index-PZXyOoVb.js +87 -0
  73. package/dist/{Index-BioOegOO.js → Index-ZUnH-BHj.js} +10 -18
  74. package/dist/Index-cjKGSiDi.js +136 -0
  75. package/dist/Index-m-goRuKD.js +49 -0
  76. package/dist/Index-rGeWbLcB.js +47 -0
  77. package/dist/Index-vrljNp6G.js +28 -0
  78. package/dist/Index.vue_vue_type_script_lang-aeVuChGF.js +671 -0
  79. package/dist/InputToggleRow-v6qAWPg6.js +99 -0
  80. package/dist/ManualPopover-BONBJIUA.js +57 -0
  81. package/dist/MediaWrapper-CXb2UGd9.js +18 -0
  82. package/dist/{NotBindingText-CM3FN0A6.js → NotBindingText-BqESO13N.js} +13 -17
  83. package/dist/PackageGroup-AIysVmyh.js +1058 -0
  84. package/dist/PdfTerms-BlhHdTu3.js +34 -0
  85. package/dist/PdfViewer-DwZ1rwlN.js +392 -0
  86. package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-D6NNUTz0.js +17 -0
  87. package/dist/PriceHeader-C4XhnoA3.js +488 -0
  88. package/dist/SearchApi-B7lXgUY6.js +137 -0
  89. package/dist/SendForm-BcD0xSvB.js +7031 -0
  90. package/dist/Setup-C2qaYDei.js +47 -0
  91. package/dist/{SmartList-DhhjSWLO.js → SmartList-DqG7Q5t7.js} +16 -24
  92. package/dist/Sortable.vue_vue_type_script_setup_true_lang-CzMbr8AX.js +1303 -0
  93. package/dist/{TermsSettings-BEQwmkFH.js → TermsSettings-BOCONyM4.js} +169 -56
  94. package/dist/ThemeColorRow-sjGdMzGN.js +108 -0
  95. package/dist/ToggleBinding-7oq_oXPt.js +44 -0
  96. package/dist/UploadModal-C_X2NjVY.js +134 -0
  97. package/dist/VideoPlayerInput-BsUcmpl4.js +135 -0
  98. package/dist/VideoPlayerSettings-BXMmxaZQ.js +78 -0
  99. package/dist/VideoSelectModal-CW0OweCw.js +217 -0
  100. package/dist/{anime.es-BrPTThYb.js → anime.es-gdcpA-eY.js} +1 -2
  101. package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
  102. package/dist/{debounce-D0hKNU85.js → debounce-DNl99Gyo.js} +10 -10
  103. package/dist/dom-CkTGWrfu.js +69 -0
  104. package/dist/{focusDrawerMixin-C_aTLmK0.js → focusDrawerMixin-BwcErMDY.js} +1 -1
  105. package/dist/{formDrawerState-Da4mcbab.js → formDrawerState-DaurePnd.js} +2 -2
  106. package/dist/helpers-CPW--XIz.js +44 -0
  107. package/dist/index-BjiGCJPI.js +149 -0
  108. package/dist/index-CFNv6OvX.js +188 -0
  109. package/dist/index-Cx71On5Z.js +508 -0
  110. package/dist/index-DKMxIBz_.js +270 -0
  111. package/dist/index-DKf5SGLD.js +125 -0
  112. package/dist/index-E32WgUp9.js +3525 -0
  113. package/dist/index-kp-GC5I0.js +513 -0
  114. package/dist/index.es.js +2 -5
  115. package/dist/index.umd.js +285 -1485
  116. package/dist/{main-BgzLHIoo.js → main-Cb-nyil1.js} +41414 -42507
  117. package/dist/mapFormMixin-D3BihYWW.js +1544 -0
  118. package/dist/omit--YYr41Xp.js +31 -0
  119. package/dist/{publicSenderState-DB4BHByV.js → publicSenderState-CdRW_Wwp.js} +4 -4
  120. package/dist/splitpanes-D-ThFkeR.js +342 -0
  121. package/dist/style.css +1 -4
  122. package/dist/template-BvaNnq-g.js +1493 -0
  123. package/dist/{throttle-DT2UVOqm.js → throttle-D-bUGaVh.js} +2 -2
  124. package/dist/tippy.esm-BmKNqohP.js +1994 -0
  125. package/dist/useTermsModal-Dhf6_eYb.js +87 -0
  126. package/dist/{utils-nos8CB1L.js → utils-CBPcYdLv.js} +8 -11
  127. package/dist/validation-DOcUOoMe.js +40 -0
  128. package/package.json +18 -21
  129. package/dist/AddClientCallout-BJzBdba1.js +0 -48
  130. package/dist/AnswerModal-frHq1g4s.js +0 -3874
  131. package/dist/AttachmentItem-BaN0OrEV.js +0 -85
  132. package/dist/BaseDatePicker-B-AfdrSb.js +0 -3187
  133. package/dist/BaseUpload-CY3lTcte.js +0 -1977
  134. package/dist/BlockMedia-Bb5wQIDg.js +0 -76
  135. package/dist/CCallout-5quI6yyk.js +0 -58
  136. package/dist/CDropdownItem-CaoSQX6X.js +0 -640
  137. package/dist/CFormField-Dd2Y71JG.js +0 -240
  138. package/dist/CPhoneInput-BU1t6eo_.js +0 -138
  139. package/dist/CPriceInput-pv2aIVkH.js +0 -116
  140. package/dist/CSelect-CrM45B7V.js +0 -91
  141. package/dist/CSkeleton-BkvONMqL.js +0 -55
  142. package/dist/ClientAutocomplete-BRXIKQSk.js +0 -438
  143. package/dist/ClientModal-CvHAptV2.js +0 -666
  144. package/dist/ColorPicker-RgoXRrud.js +0 -2879
  145. package/dist/CompanyModal-OL4bD9Gk.js +0 -147
  146. package/dist/ContentWrapper-8HduCnR4.js +0 -190
  147. package/dist/CoverBlockSettings-DUv8AcdX.js +0 -659
  148. package/dist/DocAnswer-DiyFfpT2.js +0 -36
  149. package/dist/DocDetails-BxNRfBnK.js +0 -263
  150. package/dist/DocForm-MGp-o0pu.js +0 -5017
  151. package/dist/DocFormSend-q_QuVCqh.js +0 -146
  152. package/dist/DocLinks-DGDdp30U.js +0 -38
  153. package/dist/DocModalBase-qG4RqwBn.js +0 -28
  154. package/dist/DocPrint-Cln3kt0g.js +0 -240
  155. package/dist/DocReceipt-nbsJ-ukZ.js +0 -217
  156. package/dist/DocSendReminder-B3qdqduf.js +0 -140
  157. package/dist/DocTextEditor-CQDnjnRY.js +0 -17193
  158. package/dist/DocTimeline-CgKHoDcG.js +0 -485
  159. package/dist/DocumentClient-UZlnIlz5.js +0 -136
  160. package/dist/DocumentLayout-Dvr4zgyF.js +0 -4880
  161. package/dist/DocumentLogotype-mAVgMRHr.js +0 -92
  162. package/dist/DocumentVoided-BXYNrf_6.js +0 -25
  163. package/dist/EmbedInput-YRUrw3c6.js +0 -117
  164. package/dist/EmbedSettings-DvRreF7H.js +0 -74
  165. package/dist/ErrorCallout-DVknpLVY.js +0 -27
  166. package/dist/FilePreviewModal-DC56FaGy.js +0 -81
  167. package/dist/Flag-D5iZLESg.js +0 -46
  168. package/dist/HeaderSettings-DXZnZL7A.js +0 -440
  169. package/dist/ImageSelectModal-Bu4_xZga.js +0 -86
  170. package/dist/ImageUploadWrapper-CtZhkAm1.js +0 -1604
  171. package/dist/Index-B1dJO6Bk.js +0 -54
  172. package/dist/Index-B3pz1coY.js +0 -150
  173. package/dist/Index-BHgW8EHW.js +0 -2446
  174. package/dist/Index-BNucs2O-.js +0 -154
  175. package/dist/Index-BW-EtZ1z.js +0 -55
  176. package/dist/Index-BjKACpun.js +0 -66
  177. package/dist/Index-C94BL4uU.js +0 -294
  178. package/dist/Index-CB57haU8.js +0 -58
  179. package/dist/Index-CP17iXT6.js +0 -25
  180. package/dist/Index-CUSbvjoD.js +0 -62
  181. package/dist/Index-CVnD6jo5.js +0 -25
  182. package/dist/Index-Ci5zdPeT.js +0 -28
  183. package/dist/Index-CikqSMjb.js +0 -41
  184. package/dist/Index-CxO4tJ3U.js +0 -26
  185. package/dist/Index-D4J4BpHd.js +0 -230
  186. package/dist/Index-DAQQQlut.js +0 -754
  187. package/dist/Index-DNxSR72J.js +0 -73
  188. package/dist/Index-DPuKRwmu.js +0 -41
  189. package/dist/Index-DSy8QG8T.js +0 -32
  190. package/dist/Index-DX6_D-J-.js +0 -77
  191. package/dist/Index-Dk0KaIKg.js +0 -643
  192. package/dist/Index-Hkzoh9QR.js +0 -24
  193. package/dist/Index-KsHJxWAa.js +0 -94
  194. package/dist/Index-TtItTuv6.js +0 -33
  195. package/dist/Index-YAD39Qvg.js +0 -146
  196. package/dist/Index-eh909lAz.js +0 -107
  197. package/dist/Index-otowKI_C.js +0 -56
  198. package/dist/Index-t_oVV8Rc.js +0 -84
  199. package/dist/Index-vG96oEXZ.js +0 -144
  200. package/dist/InputToggleRow-CcqJDguN.js +0 -57
  201. package/dist/ManualPopover-BE2IN-XU.js +0 -60
  202. package/dist/MediaWrapper-lnGUFiyc.js +0 -23
  203. package/dist/PackageGroup-BsmxOMLW.js +0 -704
  204. package/dist/PdfTerms-BgYwZoAZ.js +0 -31
  205. package/dist/PdfViewer-C0lDpjte.js +0 -383
  206. package/dist/PlainHtml-5YwYVj1v.js +0 -27
  207. package/dist/PriceHeader-CxqhpGS-.js +0 -338
  208. package/dist/SearchApi-BndaIbri.js +0 -161
  209. package/dist/SendForm-D7U9fG-5.js +0 -1023
  210. package/dist/Setup-CmAK2_ZT.js +0 -50
  211. package/dist/ThemeColorRow-BlnhzebY.js +0 -69
  212. package/dist/ToggleBinding-t_58JFya.js +0 -42
  213. package/dist/UploadModal-T-WpYNsN.js +0 -95
  214. package/dist/VideoPlayerInput-DKHKjMgX.js +0 -97
  215. package/dist/VideoPlayerSettings-DDMlUvSt.js +0 -61
  216. package/dist/VideoSelectModal-B9bbP0dd.js +0 -104
  217. package/dist/answerDocumentMixin-DXI_E5Kx.js +0 -51
  218. package/dist/dom-CWsqMElk.js +0 -71
  219. package/dist/formValidationMixin-WZ2lGndu.js +0 -49
  220. package/dist/index-B2l57ilt.js +0 -102
  221. package/dist/index-COKDjmM2.js +0 -167
  222. package/dist/index-HtKGcIng.js +0 -2700
  223. package/dist/index-LQ7NztTt.js +0 -81
  224. package/dist/index-fx5gR8fM.js +0 -351
  225. package/dist/index-zXXJrTvv.js +0 -492
  226. package/dist/mapFormMixin-CQgSN7dv.js +0 -3028
  227. package/dist/omit-ScS7B6c5.js +0 -31
  228. package/dist/simplebar.min-B0cB_p8g.js +0 -71
  229. package/dist/splitpanes-BHUVsCZF.js +0 -382
  230. package/dist/tippy.esm-CR89mtdY.js +0 -1805
  231. package/dist/vuedraggable.umd-CkXXkt1b.js +0 -3161
  232. package/dist/vuex.esm-DKGl8mcw.js +0 -467
@@ -1,338 +0,0 @@
1
- import { m as c, t as l } from "./mapFormMixin-CQgSN7dv.js";
2
- import { B as d } from "./BlockMedia-Bb5wQIDg.js";
3
- import { b as r, D as u, n, ah as m } from "./main-BgzLHIoo.js";
4
- import { s as p } from "./dom-CWsqMElk.js";
5
- import { T as y } from "./DocTextEditor-CQDnjnRY.js";
6
- import { i as h } from "./i18nMessages-Chz_lxGG.js";
7
- const _ = {
8
- name: "SummaryBottom",
9
- mixins: [c([])],
10
- inject: ["parentSize"],
11
- props: {
12
- base: {
13
- type: Object,
14
- default: null
15
- },
16
- options: {
17
- type: Array,
18
- default: () => []
19
- },
20
- backgroundColor: {
21
- type: String,
22
- default: "#4c576d"
23
- },
24
- documentCurrency: {
25
- type: String,
26
- required: !0
27
- },
28
- vatType: {
29
- type: String,
30
- required: !0
31
- }
32
- },
33
- data() {
34
- return {
35
- get: r,
36
- tinycolor: l
37
- };
38
- },
39
- computed: {
40
- prices() {
41
- return r(this, "base.prices") || {};
42
- },
43
- isIndivid() {
44
- return r(this.prices, "helpers.isIndivid", !0);
45
- },
46
- showIncVat() {
47
- return this.isIndivid;
48
- },
49
- priceTotal() {
50
- return this.isIndivid ? r(this.prices, "total", null) : r(this.prices, "subTotal", null);
51
- },
52
- priceType() {
53
- return this.prices.type || ["fixed"];
54
- },
55
- currency() {
56
- return this.prices.currency || this.documentCurrency;
57
- },
58
- openAccMaxPrice() {
59
- return this.prices.maxTotal || null;
60
- },
61
- houseWorkType() {
62
- return r(this.prices, "region.houseWorkType", null);
63
- },
64
- isReverseVat() {
65
- return r(this.prices, "region.reverseVat", !1);
66
- },
67
- priceTypeString() {
68
- return this.priceType.includes("openAccMaxPrice") ? this._document.$t("price.openAccMaxPrice") : this.priceType.includes("openAcc") ? this._document.$t("price.openAcc") : this._document.$t("price.price").capitalize();
69
- },
70
- priceDeductionVatString() {
71
- let i = "";
72
- if (this.isReverseVat && !this.showIncVat) {
73
- const t = this.priceFormat(0, {
74
- currency: this.currency,
75
- showZero: !0
76
- });
77
- return i = this._document.$t("summaryBottom.reverseVat", { amount: t }), i;
78
- }
79
- return this.houseWorkType && (i = this._document.$t("deduction.afterType", {
80
- type: this.$t(`deduction.${this.houseWorkType}_percentage`)
81
- })), this.showIncVat && (i += ` ${this._document.$t("vat.incVat", {
82
- thing: this._document.$t(`vat.${this.vatType}`)
83
- })}`), this.showIncVat || (i += ` ${this._document.$t("vat.exVat", {
84
- thing: this._document.$t(`vat.${this.vatType}`)
85
- })}`), i.capitalize();
86
- },
87
- backgroundSecondary() {
88
- if (!this.isSmallScreen)
89
- return { backgroundColor: "transparent" };
90
- const i = this.backgroundColor.match(/(\d*\.)?\d+/g)[0], t = this.backgroundColor.match(/(\d*\.)?\d+/g)[1], e = this.backgroundColor.match(/(\d*\.)?\d+/g)[2], s = this.backgroundColor.match(/(\d*\.)?\d+/g)[3];
91
- return {
92
- backgroundColor: `hsla(${i}, ${t ** 0.9}%, ${e ** 0.9}%, ${s})`
93
- };
94
- },
95
- isSmallScreen() {
96
- return this.parentSize.width <= 576;
97
- }
98
- },
99
- methods: {
100
- priceFormat: u,
101
- scrollToPricing() {
102
- const i = document.querySelector("#price");
103
- i && p(i);
104
- }
105
- }
106
- };
107
- var v = function() {
108
- var t = this, e = t._self._c;
109
- return e("section", { staticClass: "summary-bottom-root" }, [e("div", { staticClass: "summary-bottom", style: [
110
- {
111
- backgroundColor: t.backgroundColor,
112
- color: t.tinycolor.readability(t.backgroundColor, "#FFF") > 2.2 ? "#FFF" : "#000"
113
- },
114
- t.options.length && {
115
- overflow: "hidden",
116
- padding: 0
117
- }
118
- ] }, [t.options.length ? e("div", { staticClass: "flex w-full items-center justify-end", staticStyle: { height: "108px" } }, [e("div", { staticStyle: { "text-align": "right", padding: "calc(2 * var(--rem))" } }, [e("div", { staticStyle: { "font-size": "calc(1.5 * var(--rem))", "font-weight": "900" } }, [t._v(" " + t._s(t._document.$t("price.proposal")) + " ")]), e("div", [t._v(t._s(t._document.$t("summaryBottom.chooseFrom")))])]), e("div", { staticStyle: { "background-color": "hsla(0, 0%, 0%, 0.15)", paadding: "calc(1 * var(--rem)) calc(2 * var(--rem))", height: "100%", display: "inline-flex" } }, [t.base ? e("div", { staticStyle: { display: "flex", "flex-direction": "column", "align-items": "flex-start", "justify-content": "center", padding: "calc(1 * var(--rem)) calc(1 * var(--rem))", "text-align": "left" } }, [e("div", { staticStyle: { "font-weight": "900", "font-size": "calc(1.5 * var(--rem))" } }, [t._v(" " + t._s(t.priceFormat(t.base.prices.total, { currency: t.currency, decimals: 2, hideZeroDecimals: !0 })) + " ")]), e("div", [t._v(" + " + t._s(t._document.$tc("summaryBottom.option", { count: t.options.length })) + " ")])]) : e("div", { staticStyle: { padding: "calc(2 * var(--rem))", display: "inline-flex", "align-items": "center", "justify-content": "center", "font-weight": "900", "font-size": "calc(2.5 * var(--rem))" } }, [t._v(" " + t._s(t._document.$t("summaryBottom.noOfOptions", { count: t.options.length })) + " ")])]), e("div", { staticStyle: { "background-color": "hsla(0, 0%, 0%, 0.4)", overflow: "hidden", width: "calc(1.5 * var(--rem))", display: "flex", "flex-direction": "column", "justify-content": "center", "align-items": "center", height: "100%", color: "hsla(0, 0%, 100%, 0.2)" } })]) : e("div", { staticClass: "flex w-full justify-between", class: [
119
- {
120
- column: t.isSmallScreen,
121
- sm: t.isSmallScreen
122
- }
123
- ], staticStyle: { position: "relative" } }, [e("div", { staticClass: "flex w-full flex-col", class: [{ "fixed-price-type-string": t.isSmallScreen }], staticStyle: { "background-color": "hsl(224, 57%, 39%)" }, style: [t.backgroundSecondary] }, [e("div", { staticClass: "price-type-string data-text" }, [t._v(" " + t._s(t.priceTypeString) + " ")]), t.isSmallScreen ? t._e() : e("div", { staticClass: "price-deduction-text" }, [t._v(" " + t._s(t.priceDeductionVatString) + " ")])]), t.priceType.some((s) => ["openAcc", "openAccMaxPrice"].includes(s)) ? e("div", { staticClass: "open-acc-wrapper" }, [t.openAccMaxPrice ? e("div", { staticClass: "open-acc-item" }, [e("div", [t._v(" " + t._s(t._document.$t("price.maxPrice").capitalize()) + " " + t._s(t._document.$t("vat.exVat", { thing: t._document.$t(`vat.${t.vatType}`) })) + ": ")]), e("div", [t._v(t._s(t.priceFormat(t.openAccMaxPrice, { currency: t.currency })))])]) : t._e(), e("div", { staticClass: "open-acc-link" }, [t._v(" " + t._s(t._document.$t("see").capitalize()) + " "), e("span", { staticStyle: { color: "inherit", cursor: "pointer" }, on: { click: t.scrollToPricing } }, [e("u", [t._v(t._s(t._document.$t("price.price_plural")))])]), t._v(" " + t._s(t._document.$t("summaryBottom.forDetails")) + " ")])]) : e("div", { staticClass: "flex w-full items-center", class: [{ "justify-end": !t.isSmallScreen }] }, [e("div", { staticClass: "data-text", staticStyle: { "font-size": "calc(2 * var(--rem))", "font-weight": "900", "letter-spacing": "1px", "line-height": "1", "padding-bottom": "calc(0.3 * var(--rem))" } }, [t._v(" " + t._s(t.priceType.includes("approx") ? t._document.$t("approx").capitalize() : "") + " " + t._s(t.priceFormat(t.priceTotal, { currency: t.currency, decimals: 2, hideZeroDecimals: !0 })) + " ")])]), t.isSmallScreen ? e("div", { staticClass: "label-text caps price-deduction-text", staticStyle: { "margin-top": "4px" } }, [t._v(" " + t._s(t.priceDeductionVatString) + " ")]) : t._e()])])]);
124
- }, g = [], f = /* @__PURE__ */ n(
125
- _,
126
- v,
127
- g,
128
- !1,
129
- null,
130
- "dffa60b6"
131
- );
132
- const S = f.exports, x = {
133
- name: "SummaryTop",
134
- i18nOptions: {
135
- namespaces: "summaryTop",
136
- messages: h
137
- },
138
- components: {
139
- TextEditor: y,
140
- DocumentLogotype: () => import("./DocumentLogotype-mAVgMRHr.js")
141
- },
142
- mixins: [c([])],
143
- inject: ["parentSize"],
144
- props: {
145
- showLogo: {
146
- type: Boolean,
147
- default: !0
148
- },
149
- logotype: {
150
- type: String,
151
- default: null
152
- },
153
- companyLogotype: {
154
- type: String,
155
- default: null
156
- },
157
- senderName: {
158
- type: String,
159
- default: null
160
- },
161
- docName: {
162
- type: String,
163
- default: null
164
- },
165
- docType: {
166
- type: String,
167
- required: !0
168
- },
169
- docNumber: {
170
- type: [Number, String],
171
- default: null
172
- },
173
- sentAt: {
174
- type: [String, Number],
175
- default: null
176
- // required: true,
177
- },
178
- expiresAt: {
179
- type: String,
180
- default: null
181
- },
182
- estimatedTime: {
183
- type: String,
184
- default: null
185
- },
186
- validator: {
187
- type: Object,
188
- default: () => ({})
189
- },
190
- hasHover: {
191
- type: Boolean,
192
- default: !1
193
- }
194
- },
195
- computed: {
196
- logotypeListeners() {
197
- return {
198
- ...this.$listeners,
199
- input: (i) => this.$emit("update:logotype", i)
200
- };
201
- }
202
- }
203
- };
204
- var b = function() {
205
- var t = this, e = t._self._c;
206
- return e("section", { staticClass: "summary-top flex w-full justify-center" }, [e("div", { staticClass: "doc-summary-top-wrapper" }, [e("div", { staticClass: "doc-summary-top-wrapper__background" }), e("div", { staticClass: "flex w-full justify-between", staticStyle: { "margin-bottom": "calc(2.5 * var(--rem))" } }, [t.showLogo && (t.logotype || t.companyLogotype) || t.canEdit ? e("DocumentLogotype", t._g({ attrs: { value: t.logotype, "show-logo": t.showLogo, "company-logotype": t.companyLogotype, "has-hover": t.hasHover } }, t.logotypeListeners)) : e("div", { staticClass: "company-name" }, [t._v(" " + t._s(t.senderName) + " ")]), e("div", { staticClass: "top-right-text-wrapper" }, [t.sentAt ? e("div", [t._v(t._s(t.$formatDate(t.sentAt)))]) : t._e(), t.docNumber ? e("div", [t._v(" #" + t._s(t.docNumber) + " ")]) : t._e()])], 1), e("div", { staticClass: "title-text" }, [t.canEdit ? e("TextEditor", { ref: "editor", staticClass: "no-drag", staticStyle: { "will-change": "opacity" }, attrs: { value: t.docName, placeholder: t.$t("name.placeholder"), extensions: {
207
- bulletList: !1,
208
- heading: [1, 2, 3],
209
- bold: !1,
210
- link: !1,
211
- underline: !1,
212
- blockquote: !0,
213
- table: !1
214
- }, unstyled: "", static: "" }, on: { input: function(s) {
215
- return t.$emit("update:doc-name", s);
216
- } } }) : e("div", { staticClass: "quill-custom", domProps: { innerHTML: t._s(t.docName) } })], 1), e("div", { staticClass: "flex w-full justify-between" }, [t.expiresAt ? e("div", { staticClass: "data-group" }, [e("div", { staticClass: "label-text caps" }, [t._v(t._s(t._document.$t("replyBy")))]), e("div", { staticClass: "data-text" }, [t._v(t._s(t.$formatDate(t.expiresAt)))])]) : t._e(), t.docType !== "document" ? e("div", { staticClass: "data-group" }, [e("div", { staticClass: "label-text caps" }, [t._v(" " + t._s(t._document.$t("document").capitalize()) + " ")]), e("div", { staticClass: "data-text" }, [t._v(" " + t._s(t._document.$t(`series.${t.docType}`).capitalize()) + " ")])]) : t._e(), t.parentSize.width >= 576 ? [t.estimatedTime ? e("div", { staticClass: "data-group" }, [e("div", { staticClass: "label-text caps" }, [t._v(t._s(t.$t("estimatedTime")))]), e("div", { staticClass: "data-text" }, [t._v(" " + t._s(t._document.$t("approx")) + " " + t._s(t.estimatedTime) + " ")])]) : t._e()] : t._e()], 2)])]);
217
- }, $ = [], C = /* @__PURE__ */ n(
218
- x,
219
- b,
220
- $,
221
- !1,
222
- null,
223
- "29bec6e5"
224
- );
225
- const w = C.exports, T = {
226
- name: "PriceHeader",
227
- components: {
228
- SummaryTop: w,
229
- SummaryBottom: S,
230
- BlockMedia: d
231
- },
232
- mixins: [
233
- c([
234
- "media",
235
- "backgroundColor",
236
- "documentName",
237
- "showPriceSummary",
238
- "showLogo",
239
- "logotype"
240
- ])
241
- ],
242
- props: {
243
- _document: {
244
- type: Object,
245
- default: () => ({})
246
- },
247
- _value: {
248
- type: Object,
249
- default: () => ({})
250
- },
251
- hasHover: {
252
- type: Boolean,
253
- default: !1
254
- }
255
- },
256
- computed: {
257
- internalName: {
258
- get() {
259
- var i;
260
- return this.documentName || `<p data-typography="title">${((i = this._document.data) == null ? void 0 : i.name) || ""}</p>`;
261
- },
262
- set(i) {
263
- this.documentName = i, this.$emit("input", {
264
- key: "data.name",
265
- value: m(i).trim().slice(0, 255)
266
- });
267
- }
268
- },
269
- company() {
270
- return this._document.sender.company;
271
- },
272
- prices() {
273
- return this._document.prices;
274
- },
275
- estimatedTimeString() {
276
- var e, s;
277
- const { value: i, unitType: t } = ((s = (e = this._document) == null ? void 0 : e.data) == null ? void 0 : s.estimatedTime) || {};
278
- return !i || !t ? null : this.$tc(`${t}`, { count: i });
279
- },
280
- sendAtShowDate() {
281
- const { sentAt: i, scheduledFirstDelivery: t } = this._document;
282
- return i || (t ? t.sendAt : null);
283
- },
284
- summaryBottom() {
285
- var s;
286
- let i = {
287
- show: !1,
288
- backgroundColor: this.backgroundColor || this._document.theme.priceSummaryBackground,
289
- documentCurrency: this._document.currency,
290
- vatType: this._document.vatType
291
- }, { showPriceSummary: t } = this;
292
- typeof t != "boolean" && ({ showPriceSummary: t } = this._document.theme);
293
- const e = ((s = this._document.packageGroups) == null ? void 0 : s.packages) || [];
294
- return e.length > 1 ? i = {
295
- ...i,
296
- show: t,
297
- base: { prices: this.prices },
298
- options: e.filter(({ toggable: o }) => o).map(({ prices: o }) => ({ prices: o }))
299
- } : i = {
300
- ...i,
301
- show: t && this._document.readPrices && (this.prices.total || this.prices.type.some(
302
- (o) => ["openAccMaxPrice", "openAcc"].includes(o)
303
- )),
304
- base: { prices: this.prices }
305
- }, this.canEdit && t && (i.show = !0), i.documentCurrency || (i.show = !1), i;
306
- }
307
- }
308
- };
309
- var k = function() {
310
- var s, o;
311
- var t = this, e = t._self._c;
312
- return e("div", [e("div", { staticClass: "doc-jumbotron-wrapper" }, [e("BlockMedia", { staticClass: "price-media-wrapper", attrs: { media: {
313
- ...t.media,
314
- resourceUrl: ((s = t.media) == null ? void 0 : s.resourceUrl) || t._document.theme.background,
315
- overlayColor: ((o = t.media) == null ? void 0 : o.overlayColor) || t._document.theme.backgroundFilter
316
- } } }), e("SummaryTop", { attrs: { _document: t._document, "show-logo": t.showLogo, logotype: t.logotype, "company-logotype": t.company.logotype, "sender-name": t.company.name, "doc-type": t._document.docNumber.series, "doc-name": t.internalName, "doc-number": t._document.docNumber.value, "sent-at": t.sendAtShowDate, "expires-at": t._document.expiresAt, "estimated-time": t.estimatedTimeString, "has-hover": t.hasHover }, on: { "update:showLogo": function(a) {
317
- t.showLogo = a;
318
- }, "update:show-logo": function(a) {
319
- t.showLogo = a;
320
- }, "update:logotype": function(a) {
321
- t.logotype = a;
322
- }, "update:docName": function(a) {
323
- t.internalName = a;
324
- }, "update:doc-name": function(a) {
325
- t.internalName = a;
326
- } } })], 1), t.summaryBottom.show ? e("SummaryBottom", t._b({ attrs: { _document: t._document } }, "SummaryBottom", t.summaryBottom, !1)) : t._e()], 1);
327
- }, A = [], B = /* @__PURE__ */ n(
328
- T,
329
- k,
330
- A,
331
- !1,
332
- null,
333
- "e3b73dd6"
334
- );
335
- const D = B.exports;
336
- export {
337
- D as default
338
- };
@@ -1,161 +0,0 @@
1
- import { g as u, p as h, f, i as d, n as m } from "./main-BgzLHIoo.js";
2
- import { d as p } from "./debounce-D0hKNU85.js";
3
- import { m as y, a as g } from "./vuex.esm-DKGl8mcw.js";
4
- const A = {
5
- name: "SearchApi",
6
- props: {
7
- customSearch: {
8
- type: Object,
9
- default: () => ({})
10
- }
11
- },
12
- data() {
13
- return {
14
- defaultSearch: {
15
- project: !0,
16
- user: !0,
17
- endCustomer: !1,
18
- article: !1,
19
- extensionArticle: !1,
20
- // Articles in any authenticated CRM
21
- document: !1
22
- },
23
- hasLoadedUsers: !1,
24
- isLoading: !1,
25
- emptyQuery: null,
26
- // String to track last query that was empty, if a new query starts with this string we do not have to search again
27
- hasSearchedAll: !1
28
- // Helper to keep track when some search types have not yet searched due min query length
29
- };
30
- },
31
- computed: {
32
- ...y({
33
- allUsers: "companyUsers/all",
34
- allAuthenticatedCRMs: "settings/allAuthenticatedCRMs",
35
- can: "application/can"
36
- }),
37
- typesToFetch() {
38
- return Object.keys(this.customSearch).length ? Object.keys(this.customSearch).filter(
39
- (t) => this.customSearch[t]
40
- ) : Object.keys(this.defaultSearch).filter(
41
- (t) => this.defaultSearch[t]
42
- );
43
- }
44
- },
45
- methods: {
46
- ...g({
47
- loadUsers: u.LOAD_COMPANY_USERS
48
- }),
49
- canFetchType(t) {
50
- return t === "endCustomer" ? this.can("endCustomers", "read") : t === "user" ? this.can("users", "modify") : !0;
51
- },
52
- async fetch({ query: t, start: s = null, end: a = null }) {
53
- const e = this.typesToFetch.reduce(
54
- (n, c) => ({ ...n, [c]: [] }),
55
- {}
56
- ), r = t.toLowerCase();
57
- if (this.emptyQuery && r && r.startsWith(this.emptyQuery) || (this.emptyQuery = null, this.hasSearchedAll = !0, !r))
58
- return e;
59
- try {
60
- const n = [], c = Object.keys(this.defaultSearch);
61
- (this.typesToFetch || []).forEach((l) => {
62
- c.includes(l) && n.push(
63
- (async () => {
64
- let o = [];
65
- l === "document" ? o = await this.fetchDocuments(r, s, a) : l === "user" ? o = await this.fetchUsers(r, s, a) : l === "extensionArticle" ? o = await this.fetchExtensionArticles(r, s, a) : o = await this.fetchType(l, r, s, a), e[l] = o;
66
- })()
67
- );
68
- }), await Promise.all(n);
69
- } finally {
70
- this.isLoading = !1;
71
- }
72
- return Object.keys(e).every(
73
- (n) => e[n].length === 0
74
- ) && this.hasSearchedAll && (this.emptyQuery = r), e;
75
- },
76
- async fetchType(t, s, a, e) {
77
- if (!this.canFetchType(t))
78
- return [];
79
- const { data: r } = await h("search", {
80
- type: t,
81
- query: s,
82
- ...a !== null && e !== null && { start: a, end: e }
83
- });
84
- return r;
85
- },
86
- async fetchUsers(t, s, a) {
87
- if (!this.canFetchType("user"))
88
- return [];
89
- this.hasLoadedUsers || (await this.loadUsers(), this.hasLoadedUsers = !0);
90
- const r = Object.values(this.allUsers).filter((i) => !!(i.fullName && i.fullName.toLowerCase().includes(t) || i.email && i.email.toLowerCase().includes(t)));
91
- return s !== null && a !== null ? r.slice(s, a) : r;
92
- },
93
- async fetchDocuments(t, s, a) {
94
- const e = t.replace(/[-[\]{}()*+?.,\\/^$|#]/g, "\\$&"), r = {
95
- $or: [
96
- { "data.name": { $regex: e, $options: "i" } },
97
- { "docNumber.value": { $regex: e, $options: "i" } },
98
- {
99
- clients: {
100
- $elemMatch: {
101
- $or: ["name", "email", "socialNo", "orgNo"].map((c) => ({
102
- [c]: { $regex: e, $options: "i" }
103
- }))
104
- }
105
- }
106
- }
107
- ]
108
- }, { data: i } = await f("/document", {
109
- params: {
110
- lean: !0,
111
- filter: encodeURIComponent(JSON.stringify(r)),
112
- fields: "clients,data.name,projectId,docNumber,createdAt",
113
- ...s !== null && a !== null && { skip: s, limit: a - s }
114
- }
115
- }), { items: n = [] } = i || {};
116
- return n;
117
- },
118
- async fetchExtensionArticles(t) {
119
- const s = [];
120
- return await Promise.all(
121
- this.allAuthenticatedCRMs.map(async (a) => {
122
- try {
123
- if (a === "pipedrive" && t.length < 2) {
124
- this.hasSearchedAll = !1;
125
- return;
126
- }
127
- const { data: e } = await d.search(a, {
128
- query: t,
129
- type: "article"
130
- });
131
- e && Array.isArray(e) && s.push(...e);
132
- } catch {
133
- }
134
- })
135
- ), s;
136
- },
137
- triggerSearch: p(async function({ q: s, cb: a, start: e, end: r }) {
138
- this.isLoading = !0;
139
- const i = await this.fetch({ query: s, start: e, end: r });
140
- return this.isLoading = !1, a(i);
141
- }, 500)
142
- },
143
- render() {
144
- return this.$scopedSlots.default({
145
- fetch: ({ q: t, cb: s, start: a = null, end: e = null }) => (this.isLoading = !0, this.triggerSearch({ q: t, cb: s, start: a, end: e })),
146
- isLoading: this.isLoading
147
- });
148
- }
149
- }, S = null, w = null;
150
- var L = /* @__PURE__ */ m(
151
- A,
152
- S,
153
- w,
154
- !1,
155
- null,
156
- null
157
- );
158
- const $ = L.exports;
159
- export {
160
- $ as S
161
- };