@cling-se/widget 0.17.3 → 0.18.1

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 +24 -0
  2. package/dist/AddClientCallout-CCt78VvH.js +101 -0
  3. package/dist/AnswerModal-B4LwVv2N.js +3371 -0
  4. package/dist/AttachmentItem-DnvYffKP.js +171 -0
  5. package/dist/BaseUpload-DFoV0ZLe.js +6503 -0
  6. package/dist/BlockMedia-Amo_kdHo.js +103 -0
  7. package/dist/CCallout-Gd06ds6O.js +104 -0
  8. package/dist/{CCurrencyDropdown-CXXQu8th.js → CCurrencyDropdown-B4GNmOGA.js} +91 -53
  9. package/dist/CDropdownItem-BUNVCpSR.js +749 -0
  10. package/dist/CFormField.vue_vue_type_script_setup_true_lang-Bo2J0c4G.js +292 -0
  11. package/dist/{CPhoneFormat-BtBGl8b4.js → CPhoneFormat-DmN5r9Ci.js} +13 -21
  12. package/dist/CPhoneInput-B6iyhsOG.js +207 -0
  13. package/dist/CPriceInput-BLQaNu1d.js +142 -0
  14. package/dist/CSelect-BVO9iO9L.js +98 -0
  15. package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-C9loRtrk.js +51 -0
  16. package/dist/ClientAutocomplete-C__yUaxD.js +532 -0
  17. package/dist/ClientModal-B9cbuEiC.js +1188 -0
  18. package/dist/ColorPicker-G2kkxL7_.js +1408 -0
  19. package/dist/CompanyModal-por9AG4P.js +250 -0
  20. package/dist/ContentWrapper-CQtaGA2u.js +265 -0
  21. package/dist/CoverBlockSettings-BCBDouyl.js +861 -0
  22. package/dist/DocAnswer-BrKctwrY.js +33 -0
  23. package/dist/DocDetails-B_LWVHGt.js +452 -0
  24. package/dist/DocForm-D6T7NmfO.js +6772 -0
  25. package/dist/DocFormSend-COYPrhl7.js +171 -0
  26. package/dist/DocLinks-B0LjxXIk.js +36 -0
  27. package/dist/DocModalBase-DObZHuYr.js +29 -0
  28. package/dist/DocPrint-CkDq78fB.js +399 -0
  29. package/dist/DocReceipt-CYBPyePC.js +341 -0
  30. package/dist/DocSendReminder-Dau6s43e.js +181 -0
  31. package/dist/{DocTextEditor-yD9Dt_um.js → DocTextEditor-CVn6gE1i.js} +7907 -5579
  32. package/dist/DocTimeline-ChBDPOfd.js +537 -0
  33. package/dist/DocumentClient-MLXzzXLb.js +90 -0
  34. package/dist/DocumentLayout-BMHOt380.js +1434 -0
  35. package/dist/DocumentLogotype-Clj3fopX.js +162 -0
  36. package/dist/DocumentVoided-B5_MSBbC.js +33 -0
  37. package/dist/EmbedInput-CzkOa02p.js +156 -0
  38. package/dist/EmbedSettings-Cf_F3KrM.js +103 -0
  39. package/dist/ErrorCallout-CJn6NCse.js +34 -0
  40. package/dist/FilePreviewModal-Di1VnPNY.js +202 -0
  41. package/dist/Flag-C4_G5IY1.js +41 -0
  42. package/dist/HeaderSettings-DWN0TjVD.js +720 -0
  43. package/dist/ImageSelectModal-DmAJ9PrN.js +119 -0
  44. package/dist/ImageUploadWrapper-QLEhA_dI.js +1585 -0
  45. package/dist/Index-B06eCuBA.js +76 -0
  46. package/dist/Index-B8Zj0-MX.js +87 -0
  47. package/dist/{Index-C_aIQ908.js → Index-BBBXL4zh.js} +319 -214
  48. package/dist/Index-BCHLxp7B.js +21 -0
  49. package/dist/Index-BDAp1CwZ.js +363 -0
  50. package/dist/Index-BFbcjFo4.js +16 -0
  51. package/dist/{Index-CRiATiQn.js → Index-BODJXJNp.js} +10 -18
  52. package/dist/Index-BOx_9tTM.js +136 -0
  53. package/dist/Index-BgZNiD7A.js +47 -0
  54. package/dist/Index-Bt97lEsI.js +228 -0
  55. package/dist/Index-C9aBeBBk.js +70 -0
  56. package/dist/Index-CE3pWPzp.js +49 -0
  57. package/dist/Index-CMdPSsp4.js +38 -0
  58. package/dist/Index-CNhBDG2e.js +126 -0
  59. package/dist/Index-CdsOdgG2.js +28 -0
  60. package/dist/{Index-Ch9r5yhG.js → Index-CmxFh3dW.js} +9 -17
  61. package/dist/Index-CpxzwwQS.js +52 -0
  62. package/dist/Index-CxTwWRD9.js +93 -0
  63. package/dist/Index-D9WFWlE6.js +140 -0
  64. package/dist/Index-D9bulLeI.js +39 -0
  65. package/dist/{Index-RWMPRDAE.js → Index-DL_9LzoR.js} +10 -18
  66. package/dist/Index-DR-sGE3Y.js +25 -0
  67. package/dist/Index-DRoOW5Pn.js +163 -0
  68. package/dist/Index-DTn47-hP.js +74 -0
  69. package/dist/Index-DeGDlj0B.js +68 -0
  70. package/dist/Index-DhYYK4bK.js +28 -0
  71. package/dist/Index-Dssdb-0Z.js +629 -0
  72. package/dist/Index-OcBnU480.js +200 -0
  73. package/dist/Index-Qh_8JqAv.js +3477 -0
  74. package/dist/Index-W10PQb8i.js +102 -0
  75. package/dist/Index-lbWFEELM.js +4 -0
  76. package/dist/Index-qFAg7VVU.js +1098 -0
  77. package/dist/Index-rDndJKo1.js +160 -0
  78. package/dist/{Index-Dfq7egc1.js → Index-s-6Qh_NE.js} +47 -60
  79. package/dist/Index.vue_vue_type_script_lang-CriDqp1F.js +671 -0
  80. package/dist/InputToggleRow-DJarYsVL.js +99 -0
  81. package/dist/ManualPopover-BMrkEHtV.js +65 -0
  82. package/dist/MediaWrapper-BYdVpmov.js +18 -0
  83. package/dist/{NotBindingText-CC7TxUqg.js → NotBindingText-DGjJoN8-.js} +13 -17
  84. package/dist/PackageGroup-q7_oBOqw.js +1060 -0
  85. package/dist/PdfTerms-DBEClYQ5.js +34 -0
  86. package/dist/PdfViewer-C_y5sqXB.js +392 -0
  87. package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-D5ZLw34T.js +17 -0
  88. package/dist/PriceHeader-BSwv3mzc.js +488 -0
  89. package/dist/{SearchApi-G2Hvp0Dd.js → SearchApi-BM6TTqxW.js} +37 -49
  90. package/dist/SendForm-DfmBbhp9.js +6689 -0
  91. package/dist/Setup-BC1feKr_.js +47 -0
  92. package/dist/{SmartList-BynTuXtB.js → SmartList-B3pgsg4S.js} +16 -24
  93. package/dist/Sortable.vue_vue_type_script_setup_true_lang-YOP-Y07m.js +1349 -0
  94. package/dist/{TermsSettings-cA5YAO77.js → TermsSettings-DEkACrRU.js} +169 -56
  95. package/dist/ThemeColorRow-qG8Dkkyj.js +105 -0
  96. package/dist/ToggleBinding-Cdtl_-1s.js +44 -0
  97. package/dist/UploadModal-1OWPRxA5.js +134 -0
  98. package/dist/VideoPlayerInput-DgFNjiKK.js +134 -0
  99. package/dist/VideoPlayerSettings-CFuA-7RC.js +78 -0
  100. package/dist/VideoSelectModal-CSv67eA8.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-r-OZchfV.js} +1 -1
  105. package/dist/{formDrawerState-CkNGdxn5.js → formDrawerState-COVczNhJ.js} +2 -2
  106. package/dist/helpers-ChwW54Ex.js +46 -0
  107. package/dist/index-BMZle8Ew.js +513 -0
  108. package/dist/index-Bf-fiKJf.js +268 -0
  109. package/dist/index-Bg4JRi5S.js +125 -0
  110. package/dist/index-C7chK2UD.js +3525 -0
  111. package/dist/index-CR52qIBO.js +149 -0
  112. package/dist/index-D1x9O_nJ.js +188 -0
  113. package/dist/index-YFcPqc9m.js +508 -0
  114. package/dist/index.es.js +2 -5
  115. package/dist/index.umd.js +303 -1486
  116. package/dist/main-DI0diChK.js +57570 -0
  117. package/dist/mapFormMixin-Cgvwie9a.js +1528 -0
  118. package/dist/omit-DpjD7Dj9.js +56 -0
  119. package/dist/{publicSenderState-CGEm9EYe.js → publicSenderState-BcjNldje.js} +4 -4
  120. package/dist/splitpanes-BypKTSRL.js +342 -0
  121. package/dist/template-Dzexob5I.js +1572 -0
  122. package/dist/tippy.esm-0UMN6kWf.js +1994 -0
  123. package/dist/useTermsModal-DzH_PDFP.js +87 -0
  124. package/dist/{utils-Dr4AcaE9.js → utils--kBYCNZD.js} +8 -11
  125. package/dist/validation-B-omH73u.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
@@ -0,0 +1,488 @@
1
+ import { m as v } from "./mapFormMixin-Cgvwie9a.js";
2
+ import { B as A } from "./BlockMedia-Amo_kdHo.js";
3
+ import { a9 as u, A as C, _ as b, o as n, b as s, s as i, n as f, l as w, v as r, f as l, B as T, z as N, e as h, c as _, F as V, b1 as F, d as x, $ as P } from "./main-DI0diChK.js";
4
+ import { u as B } from "./DocumentLayout-BMHOt380.js";
5
+ import { t as D } from "./template-Dzexob5I.js";
6
+ import { s as L } from "./dom-CkTGWrfu.js";
7
+ import { T as j } from "./DocTextEditor-CVn6gE1i.js";
8
+ import { i as z } from "./i18nMessages-Chz_lxGG.js";
9
+ const M = {
10
+ name: "SummaryBottom",
11
+ mixins: [v([])],
12
+ props: {
13
+ base: {
14
+ type: Object,
15
+ default: null
16
+ },
17
+ options: {
18
+ type: Array,
19
+ default: () => []
20
+ },
21
+ backgroundColor: {
22
+ type: String,
23
+ default: "#4c576d"
24
+ },
25
+ documentCurrency: {
26
+ type: String,
27
+ required: !0
28
+ },
29
+ vatType: {
30
+ type: String,
31
+ required: !0
32
+ }
33
+ },
34
+ setup() {
35
+ return { docWidth: B() };
36
+ },
37
+ data() {
38
+ return {
39
+ get: u,
40
+ tinycolor: D
41
+ };
42
+ },
43
+ computed: {
44
+ prices() {
45
+ return u(this, "base.prices") || {};
46
+ },
47
+ isIndivid() {
48
+ return u(this.prices, "helpers.isIndivid", !0);
49
+ },
50
+ showIncVat() {
51
+ return this.isIndivid;
52
+ },
53
+ priceTotal() {
54
+ return this.isIndivid ? u(this.prices, "total", null) : u(this.prices, "subTotal", null);
55
+ },
56
+ priceType() {
57
+ return this.prices.type || ["fixed"];
58
+ },
59
+ currency() {
60
+ return this.prices.currency || this.documentCurrency;
61
+ },
62
+ openAccMaxPrice() {
63
+ return this.prices.maxTotal || null;
64
+ },
65
+ houseWorkType() {
66
+ return u(this.prices, "region.houseWorkType", null);
67
+ },
68
+ isReverseVat() {
69
+ return u(this.prices, "region.reverseVat", !1);
70
+ },
71
+ priceTypeString() {
72
+ 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();
73
+ },
74
+ priceDeductionVatString() {
75
+ let e = "";
76
+ if (this.isReverseVat && !this.showIncVat) {
77
+ const o = this.priceFormat(0, {
78
+ currency: this.currency,
79
+ showZero: !0
80
+ });
81
+ return e = this._document.$t("summaryBottom.reverseVat", { amount: o }), e;
82
+ }
83
+ return this.houseWorkType && (e = this._document.$t("deduction.afterType", {
84
+ type: this.$t(`deduction.${this.houseWorkType}_percentage`)
85
+ })), this.showIncVat && (e += ` ${this._document.$t("vat.incVat", {
86
+ thing: this._document.$t(`vat.${this.vatType}`)
87
+ })}`), this.showIncVat || (e += ` ${this._document.$t("vat.exVat", {
88
+ thing: this._document.$t(`vat.${this.vatType}`)
89
+ })}`), e.capitalize();
90
+ },
91
+ backgroundSecondary() {
92
+ if (!this.isSmallScreen) return { backgroundColor: "transparent" };
93
+ const e = this.backgroundColor.match(/(\d*\.)?\d+/g)[0], o = this.backgroundColor.match(/(\d*\.)?\d+/g)[1], t = this.backgroundColor.match(/(\d*\.)?\d+/g)[2], c = this.backgroundColor.match(/(\d*\.)?\d+/g)[3];
94
+ return {
95
+ backgroundColor: `hsla(${e}, ${o ** 0.9}%, ${t ** 0.9}%, ${c})`
96
+ };
97
+ },
98
+ isSmallScreen() {
99
+ return this.docWidth <= 576;
100
+ }
101
+ },
102
+ methods: {
103
+ priceFormat: C,
104
+ scrollToPricing() {
105
+ const e = document.querySelector("#price");
106
+ e && L(e);
107
+ }
108
+ }
109
+ }, I = { class: "summary-bottom-root" }, W = { class: "price-type-string data-text" }, H = {
110
+ key: 0,
111
+ class: "price-deduction-text"
112
+ }, $ = {
113
+ key: 0,
114
+ class: "open-acc-wrapper"
115
+ }, E = {
116
+ key: 0,
117
+ class: "open-acc-item"
118
+ }, O = { class: "open-acc-link" }, U = {
119
+ class: "data-text",
120
+ style: { "font-size": "calc(2 * var(--rem))", "font-weight": "900", "letter-spacing": "1px", "line-height": "1", "padding-bottom": "calc(0.3 * var(--rem))" }
121
+ }, q = {
122
+ key: 2,
123
+ class: "label-text caps price-deduction-text",
124
+ style: { "margin-top": "4px" }
125
+ }, Z = {
126
+ key: 1,
127
+ class: "flex w-full items-center justify-end",
128
+ style: { height: "108px" }
129
+ }, R = { style: { "text-align": "right", padding: "calc(2 * var(--rem))" } }, G = { style: { "font-size": "calc(1.5 * var(--rem))", "font-weight": "900" } }, J = { style: { "background-color": "hsla(0, 0%, 0%, 0.15)", paadding: "calc(1 * var(--rem)) calc(2 * var(--rem))", height: "100%", display: "inline-flex" } }, K = {
130
+ key: 0,
131
+ style: { padding: "calc(2 * var(--rem))", display: "inline-flex", "align-items": "center", "justify-content": "center", "font-weight": "900", "font-size": "calc(2.5 * var(--rem))" }
132
+ }, Q = {
133
+ key: 1,
134
+ style: { display: "flex", "flex-direction": "column", "align-items": "flex-start", "justify-content": "center", padding: "calc(1 * var(--rem)) calc(1 * var(--rem))", "text-align": "left" }
135
+ }, X = { style: { "font-weight": "900", "font-size": "calc(1.5 * var(--rem))" } };
136
+ function Y(e, o, t, c, d, a) {
137
+ return n(), s("section", I, [
138
+ i("div", {
139
+ style: w([
140
+ {
141
+ backgroundColor: t.backgroundColor,
142
+ color: d.tinycolor.readability(t.backgroundColor, "#FFF") > 2.2 ? "#FFF" : "#000"
143
+ },
144
+ t.options.length && {
145
+ overflow: "hidden",
146
+ padding: 0
147
+ }
148
+ ]),
149
+ class: "summary-bottom"
150
+ }, [
151
+ t.options.length ? (n(), s("div", Z, [
152
+ i("div", R, [
153
+ i("div", G, r(e._document.$t("price.proposal")), 1),
154
+ i("div", null, r(e._document.$t("summaryBottom.chooseFrom")), 1)
155
+ ]),
156
+ i("div", J, [
157
+ t.base ? (n(), s("div", Q, [
158
+ i("div", X, r(a.priceFormat(t.base.prices.total, {
159
+ currency: a.currency,
160
+ decimals: 2,
161
+ hideZeroDecimals: !0
162
+ })), 1),
163
+ i("div", null, " + " + r(e._document.$tc("summaryBottom.option", { count: t.options.length })), 1)
164
+ ])) : (n(), s("div", K, r(e._document.$t("summaryBottom.noOfOptions", {
165
+ count: t.options.length
166
+ })), 1))
167
+ ]),
168
+ o[1] || (o[1] = i("div", { style: { "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)" } }, null, -1))
169
+ ])) : (n(), s("div", {
170
+ key: 0,
171
+ class: f([[
172
+ {
173
+ column: a.isSmallScreen,
174
+ sm: a.isSmallScreen
175
+ }
176
+ ], "flex w-full justify-between"]),
177
+ style: { position: "relative" }
178
+ }, [
179
+ i("div", {
180
+ class: f(["flex w-full flex-col", [{ "fixed-price-type-string": a.isSmallScreen }]]),
181
+ style: w([{ "background-color": "hsl(224, 57%, 39%)" }, [a.backgroundSecondary]])
182
+ }, [
183
+ i("div", W, r(a.priceTypeString), 1),
184
+ a.isSmallScreen ? l("", !0) : (n(), s("div", H, r(a.priceDeductionVatString), 1))
185
+ ], 6),
186
+ a.priceType.some((m) => ["openAcc", "openAccMaxPrice"].includes(m)) ? (n(), s("div", $, [
187
+ a.openAccMaxPrice ? (n(), s("div", E, [
188
+ i("div", null, r(e._document.$t("price.maxPrice").capitalize()) + " " + r(e._document.$t("vat.exVat", {
189
+ thing: e._document.$t(`vat.${t.vatType}`)
190
+ })) + ": ", 1),
191
+ i("div", null, r(a.priceFormat(a.openAccMaxPrice, { currency: a.currency })), 1)
192
+ ])) : l("", !0),
193
+ i("div", O, [
194
+ T(r(e._document.$t("see").capitalize()) + " ", 1),
195
+ i("span", {
196
+ style: { color: "inherit", cursor: "pointer" },
197
+ onClick: o[0] || (o[0] = (...m) => a.scrollToPricing && a.scrollToPricing(...m))
198
+ }, [
199
+ i("u", null, r(e._document.$t("price.price_plural")), 1)
200
+ ]),
201
+ T(" " + r(e._document.$t("summaryBottom.forDetails")), 1)
202
+ ])
203
+ ])) : (n(), s("div", {
204
+ key: 1,
205
+ class: f([[{ "justify-end": !a.isSmallScreen }], "flex w-full items-center"])
206
+ }, [
207
+ i("div", U, r(a.priceType.includes("approx") ? e._document.$t("approx").capitalize() : "") + " " + r(a.priceFormat(a.priceTotal, {
208
+ currency: a.currency,
209
+ decimals: 2,
210
+ hideZeroDecimals: !0
211
+ })), 1)
212
+ ], 2)),
213
+ a.isSmallScreen ? (n(), s("div", q, r(a.priceDeductionVatString), 1)) : l("", !0)
214
+ ], 2))
215
+ ], 4)
216
+ ]);
217
+ }
218
+ const ee = /* @__PURE__ */ b(M, [["render", Y], ["__scopeId", "data-v-7ac386a1"]]), te = {
219
+ name: "SummaryTop",
220
+ i18nOptions: {
221
+ namespaces: "summaryTop",
222
+ messages: z
223
+ },
224
+ components: {
225
+ TextEditor: j,
226
+ DocumentLogotype: N(
227
+ () => import("./DocumentLogotype-Clj3fopX.js")
228
+ )
229
+ },
230
+ emits: ["update:logotype", "update:doc-name"],
231
+ mixins: [v([])],
232
+ props: {
233
+ showLogo: {
234
+ type: Boolean,
235
+ default: !0
236
+ },
237
+ logotype: {
238
+ type: String,
239
+ default: null
240
+ },
241
+ companyLogotype: {
242
+ type: String,
243
+ default: null
244
+ },
245
+ senderName: {
246
+ type: String,
247
+ default: null
248
+ },
249
+ docName: {
250
+ type: String,
251
+ default: null
252
+ },
253
+ docType: {
254
+ type: String,
255
+ required: !0
256
+ },
257
+ docNumber: {
258
+ type: [Number, String],
259
+ default: null
260
+ },
261
+ sentAt: {
262
+ type: [String, Number],
263
+ default: null
264
+ // required: true,
265
+ },
266
+ expiresAt: {
267
+ type: String,
268
+ default: null
269
+ },
270
+ estimatedTime: {
271
+ type: String,
272
+ default: null
273
+ },
274
+ validator: {
275
+ type: Object,
276
+ default: () => ({})
277
+ },
278
+ hasHover: {
279
+ type: Boolean,
280
+ default: !1
281
+ }
282
+ },
283
+ setup() {
284
+ return { docWidth: B() };
285
+ }
286
+ }, oe = { class: "summary-top flex w-full justify-center" }, ae = { class: "doc-summary-top-wrapper" }, ie = {
287
+ class: "flex w-full justify-between",
288
+ style: { "margin-bottom": "calc(2.5 * var(--rem))" }
289
+ }, re = {
290
+ key: 1,
291
+ class: "company-name"
292
+ }, ne = { class: "top-right-text-wrapper" }, se = { key: 0 }, ce = { key: 1 }, le = { class: "title-text" }, de = ["innerHTML"], me = { class: "flex w-full justify-between" }, ue = {
293
+ key: 0,
294
+ class: "data-group"
295
+ }, pe = { class: "label-text caps" }, ye = { class: "data-text" }, he = {
296
+ key: 1,
297
+ class: "data-group"
298
+ }, ge = { class: "label-text caps" }, fe = { class: "data-text" }, _e = {
299
+ key: 0,
300
+ class: "data-group"
301
+ }, ve = { class: "label-text caps" }, be = { class: "data-text" };
302
+ function ke(e, o, t, c, d, a) {
303
+ const m = h("DocumentLogotype"), g = h("TextEditor");
304
+ return n(), s("section", oe, [
305
+ i("div", ae, [
306
+ o[2] || (o[2] = i("div", { class: "doc-summary-top-wrapper__background" }, null, -1)),
307
+ i("div", ie, [
308
+ t.showLogo && (t.logotype || t.companyLogotype) || e.canEdit ? (n(), _(m, {
309
+ key: 0,
310
+ "model-value": t.logotype,
311
+ "show-logo": t.showLogo,
312
+ "company-logotype": t.companyLogotype,
313
+ "has-hover": t.hasHover,
314
+ "onUpdate:modelValue": o[0] || (o[0] = (p) => e.$emit("update:logotype", p))
315
+ }, null, 8, ["model-value", "show-logo", "company-logotype", "has-hover"])) : (n(), s("div", re, r(t.senderName), 1)),
316
+ i("div", ne, [
317
+ t.sentAt ? (n(), s("div", se, r(e.$formatDate(t.sentAt)), 1)) : l("", !0),
318
+ t.docNumber ? (n(), s("div", ce, " #" + r(t.docNumber), 1)) : l("", !0)
319
+ ])
320
+ ]),
321
+ i("div", le, [
322
+ e.canEdit ? (n(), _(g, {
323
+ key: 1,
324
+ ref: "editor",
325
+ "model-value": t.docName,
326
+ placeholder: e.$t("name.placeholder"),
327
+ extensions: {
328
+ bulletList: !1,
329
+ heading: [1, 2, 3],
330
+ bold: !1,
331
+ link: !1,
332
+ underline: !1,
333
+ blockquote: !0,
334
+ table: !1
335
+ },
336
+ unstyled: "",
337
+ class: "no-drag",
338
+ static: "",
339
+ style: { "will-change": "opacity" },
340
+ "onUpdate:modelValue": o[1] || (o[1] = (p) => e.$emit("update:doc-name", p))
341
+ }, null, 8, ["model-value", "placeholder"])) : (n(), s("div", {
342
+ key: 0,
343
+ class: "quill-custom",
344
+ innerHTML: t.docName
345
+ }, null, 8, de))
346
+ ]),
347
+ i("div", me, [
348
+ t.expiresAt ? (n(), s("div", ue, [
349
+ i("div", pe, r(e._document.$t("replyBy")), 1),
350
+ i("div", ye, r(e.$formatDate(t.expiresAt)), 1)
351
+ ])) : l("", !0),
352
+ t.docType !== "document" ? (n(), s("div", he, [
353
+ i("div", ge, r(e._document.$t("document").capitalize()), 1),
354
+ i("div", fe, r(e._document.$t(`series.${t.docType}`).capitalize()), 1)
355
+ ])) : l("", !0),
356
+ c.docWidth >= 576 ? (n(), s(V, { key: 2 }, [
357
+ t.estimatedTime ? (n(), s("div", _e, [
358
+ i("div", ve, r(e.$t("estimatedTime")), 1),
359
+ i("div", be, r(e._document.$t("approx")) + " " + r(t.estimatedTime), 1)
360
+ ])) : l("", !0)
361
+ ], 64)) : l("", !0)
362
+ ])
363
+ ])
364
+ ]);
365
+ }
366
+ const Se = /* @__PURE__ */ b(te, [["render", ke], ["__scopeId", "data-v-8f85211e"]]), we = {
367
+ name: "PriceHeader",
368
+ components: {
369
+ SummaryTop: Se,
370
+ SummaryBottom: ee,
371
+ BlockMedia: A
372
+ },
373
+ emits: ["input"],
374
+ mixins: [
375
+ v([
376
+ "media",
377
+ "backgroundColor",
378
+ "documentName",
379
+ "showPriceSummary",
380
+ "showLogo",
381
+ "logotype"
382
+ ])
383
+ ],
384
+ props: {
385
+ _document: {
386
+ type: Object,
387
+ default: () => ({})
388
+ },
389
+ _value: {
390
+ type: Object,
391
+ default: () => ({})
392
+ },
393
+ hasHover: {
394
+ type: Boolean,
395
+ default: !1
396
+ }
397
+ },
398
+ computed: {
399
+ internalName: {
400
+ get() {
401
+ var e;
402
+ return this.documentName || `<p data-typography="title">${((e = this._document.data) == null ? void 0 : e.name) || ""}</p>`;
403
+ },
404
+ set(e) {
405
+ this.documentName = e, this.$emit("input", {
406
+ key: "data.name",
407
+ value: F(e).trim().slice(0, 255)
408
+ });
409
+ }
410
+ },
411
+ company() {
412
+ return this._document.sender.company;
413
+ },
414
+ prices() {
415
+ return this._document.prices;
416
+ },
417
+ estimatedTimeString() {
418
+ var t, c;
419
+ const { value: e, unitType: o } = ((c = (t = this._document) == null ? void 0 : t.data) == null ? void 0 : c.estimatedTime) || {};
420
+ return !e || !o ? null : this.$tc(`${o}`, { count: e });
421
+ },
422
+ sendAtShowDate() {
423
+ const { sentAt: e, scheduledFirstDelivery: o } = this._document;
424
+ return e || (o ? o.sendAt : null);
425
+ },
426
+ summaryBottom() {
427
+ var c;
428
+ let e = {
429
+ show: !1,
430
+ backgroundColor: this.backgroundColor || this._document.theme.priceSummaryBackground,
431
+ documentCurrency: this._document.currency,
432
+ vatType: this._document.vatType
433
+ }, { showPriceSummary: o } = this;
434
+ typeof o != "boolean" && ({ showPriceSummary: o } = this._document.theme);
435
+ const t = ((c = this._document.packageGroups) == null ? void 0 : c.packages) || [];
436
+ return t.length > 1 ? e = {
437
+ ...e,
438
+ show: o,
439
+ base: { prices: this.prices },
440
+ options: t.filter(({ toggable: d }) => d).map(({ prices: d }) => ({ prices: d }))
441
+ } : e = {
442
+ ...e,
443
+ show: o && this._document.readPrices && (this.prices.total || this.prices.type.some(
444
+ (d) => ["openAccMaxPrice", "openAcc"].includes(d)
445
+ )),
446
+ base: { prices: this.prices }
447
+ }, this.canEdit && o && (e.show = !0), e.documentCurrency || (e.show = !1), e;
448
+ }
449
+ }
450
+ }, Te = { class: "doc-jumbotron-wrapper" };
451
+ function xe(e, o, t, c, d, a) {
452
+ var k, S;
453
+ const m = h("BlockMedia"), g = h("SummaryTop"), p = h("SummaryBottom");
454
+ return n(), s("div", null, [
455
+ i("div", Te, [
456
+ x(m, {
457
+ media: {
458
+ ...e.media,
459
+ resourceUrl: ((k = e.media) == null ? void 0 : k.resourceUrl) || t._document.theme.background,
460
+ overlayColor: ((S = e.media) == null ? void 0 : S.overlayColor) || t._document.theme.backgroundFilter
461
+ },
462
+ class: "price-media-wrapper"
463
+ }, null, 8, ["media"]),
464
+ x(g, {
465
+ "show-logo": e.showLogo,
466
+ "onUpdate:showLogo": o[0] || (o[0] = (y) => e.showLogo = y),
467
+ logotype: e.logotype,
468
+ "onUpdate:logotype": o[1] || (o[1] = (y) => e.logotype = y),
469
+ "doc-name": a.internalName,
470
+ "onUpdate:docName": o[2] || (o[2] = (y) => a.internalName = y),
471
+ _document: t._document,
472
+ "company-logotype": a.company.logotype,
473
+ "sender-name": a.company.name,
474
+ "doc-type": t._document.docNumber.series,
475
+ "doc-number": t._document.docNumber.value,
476
+ "sent-at": a.sendAtShowDate,
477
+ "expires-at": t._document.expiresAt,
478
+ "estimated-time": a.estimatedTimeString,
479
+ "has-hover": t.hasHover
480
+ }, null, 8, ["show-logo", "logotype", "doc-name", "_document", "company-logotype", "sender-name", "doc-type", "doc-number", "sent-at", "expires-at", "estimated-time", "has-hover"])
481
+ ]),
482
+ a.summaryBottom.show ? (n(), _(p, P({ key: 0 }, a.summaryBottom, { _document: t._document }), null, 16, ["_document"])) : l("", !0)
483
+ ]);
484
+ }
485
+ const Le = /* @__PURE__ */ b(we, [["render", xe], ["__scopeId", "data-v-3628151e"]]);
486
+ export {
487
+ Le as default
488
+ };
@@ -1,7 +1,5 @@
1
- import { p as u, f as h, i as f, n as m } from "./main-BL_yzf2r.js";
2
- import { d } from "./debounce-Ch1d3526.js";
3
- import { m as p } from "./vuex.esm-DKGl8mcw.js";
4
- const y = {
1
+ import { m as u, U as h, V as f, W as d, X as p, _ as m, S as y } from "./main-DI0diChK.js";
2
+ const g = {
5
3
  name: "SearchApi",
6
4
  props: {
7
5
  customSearch: {
@@ -27,7 +25,7 @@ const y = {
27
25
  };
28
26
  },
29
27
  computed: {
30
- ...p({
28
+ ...u({
31
29
  allAuthenticatedCRMs: "settings/allAuthenticatedCRMs",
32
30
  can: "application/can"
33
31
  }),
@@ -43,20 +41,19 @@ const y = {
43
41
  canFetchType(t) {
44
42
  return t === "endCustomer" ? this.can("endCustomers", "read") : !0;
45
43
  },
46
- async fetch({ query: t, start: s = null, end: a = null }) {
44
+ async fetch({ query: t, start: a = null, end: r = null }) {
47
45
  const e = this.typesToFetch.reduce(
48
46
  (i, n) => ({ ...i, [n]: [] }),
49
47
  {}
50
- ), r = t.toLowerCase();
51
- if (this.emptyQuery && r && r.startsWith(this.emptyQuery) || (this.emptyQuery = null, this.hasSearchedAll = !0, !r))
52
- return e;
48
+ ), s = t.toLowerCase();
49
+ if (this.emptyQuery && s && s.startsWith(this.emptyQuery) || (this.emptyQuery = null, this.hasSearchedAll = !0, !s)) return e;
53
50
  try {
54
51
  const i = [], n = Object.keys(this.defaultSearch);
55
52
  (this.typesToFetch || []).forEach((c) => {
56
53
  n.includes(c) && i.push(
57
54
  (async () => {
58
55
  let o = [];
59
- c === "document" ? o = await this.fetchDocuments(r, s, a) : c === "extensionArticle" ? o = await this.fetchExtensionArticles(r, s, a) : o = await this.fetchType(c, r, s, a), e[c] = o;
56
+ c === "document" ? o = await this.fetchDocuments(s, a, r) : c === "extensionArticle" ? o = await this.fetchExtensionArticles(s, a, r) : o = await this.fetchType(c, s, a, r), e[c] = o;
60
57
  })()
61
58
  );
62
59
  }), await Promise.all(i);
@@ -65,20 +62,19 @@ const y = {
65
62
  }
66
63
  return Object.keys(e).every(
67
64
  (i) => e[i].length === 0
68
- ) && this.hasSearchedAll && (this.emptyQuery = r), e;
65
+ ) && this.hasSearchedAll && (this.emptyQuery = s), e;
69
66
  },
70
- async fetchType(t, s, a, e) {
71
- if (!this.canFetchType(t))
72
- return [];
73
- const { data: r } = await u("search", {
67
+ async fetchType(t, a, r, e) {
68
+ if (!this.canFetchType(t)) return [];
69
+ const { data: s } = await h("search", {
74
70
  type: t,
75
- query: s,
76
- ...a !== null && e !== null && { start: a, end: e }
71
+ query: a,
72
+ ...r !== null && e !== null && { start: r, end: e }
77
73
  });
78
- return r;
74
+ return s;
79
75
  },
80
- async fetchDocuments(t, s, a) {
81
- const e = t.replace(/[-[\]{}()*+?.,\\/^$|#]/g, "\\$&"), r = {
76
+ async fetchDocuments(t, a, r) {
77
+ const e = t.replace(/[-[\]{}()*+?.,\\/^$|#]/g, "\\$&"), s = {
82
78
  $or: [
83
79
  { "data.name": { $regex: e, $options: "i" } },
84
80
  { "docNumber.value": { $regex: e, $options: "i" } },
@@ -92,57 +88,49 @@ const y = {
92
88
  }
93
89
  }
94
90
  ]
95
- }, { data: l } = await h("/document", {
91
+ }, { data: l } = await f("/document", {
96
92
  params: {
97
93
  lean: !0,
98
- filter: encodeURIComponent(JSON.stringify(r)),
94
+ filter: encodeURIComponent(JSON.stringify(s)),
99
95
  fields: "clients,data.name,projectId,docNumber,createdAt",
100
- ...s !== null && a !== null && { skip: s, limit: a - s }
96
+ ...a !== null && r !== null && { skip: a, limit: r - a }
101
97
  }
102
98
  }), { items: i = [] } = l || {};
103
99
  return i;
104
100
  },
105
101
  async fetchExtensionArticles(t) {
106
- const s = [];
102
+ const a = [];
107
103
  return await Promise.all(
108
- this.allAuthenticatedCRMs.map(async (a) => {
104
+ this.allAuthenticatedCRMs.map(async (r) => {
109
105
  try {
110
- if (a === "pipedrive" && t.length < 2) {
106
+ if (r === "pipedrive" && t.length < 2) {
111
107
  this.hasSearchedAll = !1;
112
108
  return;
113
109
  }
114
- const { data: e } = await f.search(a, {
110
+ const { data: e } = await d.search(r, {
115
111
  query: t,
116
112
  type: "article"
117
113
  });
118
- e && Array.isArray(e) && s.push(...e);
114
+ e && Array.isArray(e) && a.push(...e);
119
115
  } catch {
120
116
  }
121
117
  })
122
- ), s;
118
+ ), a;
123
119
  },
124
- triggerSearch: d(async function({ q: s, cb: a, start: e, end: r }) {
120
+ triggerSearch: p(async function({ q: a, cb: r, start: e, end: s }) {
125
121
  this.isLoading = !0;
126
- const l = await this.fetch({ query: s, start: e, end: r });
127
- return this.isLoading = !1, a(l);
122
+ const l = await this.fetch({ query: a, start: e, end: s });
123
+ return this.isLoading = !1, r(l);
128
124
  }, 500)
129
- },
130
- render() {
131
- return this.$scopedSlots.default({
132
- fetch: ({ q: t, cb: s, start: a = null, end: e = null }) => (this.isLoading = !0, this.triggerSearch({ q: t, cb: s, start: a, end: e })),
133
- isLoading: this.isLoading
134
- });
135
125
  }
136
- }, g = null, A = null;
137
- var S = /* @__PURE__ */ m(
138
- y,
139
- g,
140
- A,
141
- !1,
142
- null,
143
- null
144
- );
145
- const _ = S.exports;
126
+ };
127
+ function S(t, a, r, e, s, l) {
128
+ return y(t.$slots, "default", {
129
+ fetch: ({ q: i, cb: n, start: c = null, end: o = null }) => (s.isLoading = !0, l.triggerSearch({ q: i, cb: n, start: c, end: o })),
130
+ isLoading: s.isLoading
131
+ });
132
+ }
133
+ const $ = /* @__PURE__ */ m(g, [["render", S]]);
146
134
  export {
147
- _ as S
135
+ $ as S
148
136
  };