@cling-se/widget 0.14.4 → 0.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AddClientCallout-C7abPZ87.js +46 -0
- package/dist/AnswerModal-CsA2pl2P.js +3874 -0
- package/dist/AttachmentItem-Da1-7xwf.js +78 -0
- package/dist/BaseDatePicker-k9zlSi5J.js +3183 -0
- package/dist/BaseUpload-BUrXX3fT.js +1977 -0
- package/dist/BlockMedia-CYI07qAn.js +76 -0
- package/dist/CCallout-Qwae66vo.js +59 -0
- package/dist/CCurrencyDropdown-Y_u0hgBx.js +246 -0
- package/dist/CDropdownItem-CXJ4xD8W.js +538 -0
- package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +1 -0
- package/dist/CFormField--m3PvQuT.js +241 -0
- package/dist/CPhoneFormat-Qg6MkDVP.js +62 -0
- package/dist/CPriceInput-Dlx44UrR.js +112 -0
- package/dist/CTabs.vue_vue_type_style_index_0_scoped_b7262014_lang-l0sNRNKZ.js +1 -0
- package/dist/ClientAutocomplete-BKKc_br6.js +78 -0
- package/dist/ClientModal-CVZFb1Br.js +625 -0
- package/dist/ColorPicker-Bo3s3Esp.js +2879 -0
- package/dist/CompanyModal-DadjAioS.js +141 -0
- package/dist/ContentWrapper-BC3ZBQW9.js +183 -0
- package/dist/CoverBlockSettings-B484eE4g.js +275 -0
- package/dist/DocAnswer-CcYryOWI.js +36 -0
- package/dist/DocDetails-BigsoEWL.js +246 -0
- package/dist/DocForm-DlN0eNWt.js +7273 -0
- package/dist/DocFormSend-TqKo210I.js +143 -0
- package/dist/DocLinks-DSo54vDn.js +38 -0
- package/dist/DocModalBase-XlM1SThW.js +28 -0
- package/dist/DocPrint-tD0Vd9Sw.js +240 -0
- package/dist/DocReceipt-CDHPrhXM.js +210 -0
- package/dist/DocSendReminder-C62RhltH.js +137 -0
- package/dist/DocTextEditor-VjhV9IRp.js +17181 -0
- package/dist/DocTimeline-LcW4z3nC.js +481 -0
- package/dist/DocumentClient-CqbTRdpB.js +136 -0
- package/dist/DocumentLayout-Dbf8_01r.js +4909 -0
- package/dist/DocumentLogotype-DXYnBedV.js +87 -0
- package/dist/DocumentVoided-vH1Ti5lZ.js +25 -0
- package/dist/EmbedInput-D9qP8OnY.js +113 -0
- package/dist/EmbedSettings-DISuNqJT.js +72 -0
- package/dist/ErrorCallout-CCtCVwSh.js +28 -0
- package/dist/FilePreviewModal-BjhNyb6L.js +81 -0
- package/dist/Flag-Dhukv9_J.js +114 -0
- package/dist/HeaderSettings-CK4SkB1x.js +392 -0
- package/dist/ImageSelectModal-DnvPZzXx.js +84 -0
- package/dist/ImageUploadWrapper-B7cNMu5a.js +1604 -0
- package/dist/Index-B3HoK_cZ.js +84 -0
- package/dist/Index-B3aucNji.js +25 -0
- package/dist/Index-B9H5MMHb.js +62 -0
- package/dist/Index-BAYdvT-t.js +754 -0
- package/dist/Index-BLeQprjq.js +46 -0
- package/dist/Index-BOyvQlng.js +154 -0
- package/dist/Index-BVsw2tak.js +70 -0
- package/dist/Index-BY1UKGEO.js +98 -0
- package/dist/Index-Bh0kMSsA.js +107 -0
- package/dist/Index-BlQSM7tC.js +144 -0
- package/dist/Index-BpcJBGGd.js +642 -0
- package/dist/Index-Bs8wprXw.js +58 -0
- package/dist/Index-BvZZAvFd.js +21 -0
- package/dist/Index-CFo-3Y5Q.js +26 -0
- package/dist/Index-CNvp5K3L.js +559 -0
- package/dist/Index-CPJVx14x.js +171 -0
- package/dist/Index-CQ325eVT.js +140 -0
- package/dist/Index-CWrDtcfT.js +49 -0
- package/dist/Index-CyJnSvDR.js +223 -0
- package/dist/Index-D6bc7lg4.js +52 -0
- package/dist/Index-DCR8ev4U.js +33 -0
- package/dist/Index-DGQSB9cH.js +24 -0
- package/dist/Index-DXAvlq74.js +292 -0
- package/dist/Index-D_rfst8y.js +45 -0
- package/dist/Index-Dm8xMFGg.js +61 -0
- package/dist/Index-DtSSgtxB.js +55 -0
- package/dist/Index-DuTw9vhb.js +77 -0
- package/dist/Index-Dw26jtGV.js +31 -0
- package/dist/Index-OxN73_fO.js +32 -0
- package/dist/Index-S-FHG7_k.js +2402 -0
- package/dist/Index-ZFkitzfq.js +69 -0
- package/dist/Index-dyWK9jgr.js +25 -0
- package/dist/Index-gb11ngPS.js +57 -0
- package/dist/Index-lKk_XKJ3.js +150 -0
- package/dist/InputToggleRow-DSSvhPKA.js +57 -0
- package/dist/ManualPopover-lpJYSkw5.js +58 -0
- package/dist/MediaWrapper-BQ22FA2B.js +23 -0
- package/dist/NotBindingText-JxwzZLPP.js +32 -0
- package/dist/PackageGroup-BLSMSUDz.js +699 -0
- package/dist/PdfTerms-DtutjM5Y.js +36 -0
- package/dist/PdfViewer-BsxcZI_x.js +374 -0
- package/dist/PlainHtml-BMPZs2fT.js +20 -0
- package/dist/PriceHeader-BRYY01H2.js +339 -0
- package/dist/SearchApi-6001iFxU.js +161 -0
- package/dist/Setup-cw6jMI9M.js +50 -0
- package/dist/SmartList-q6H-uLbm.js +83 -0
- package/dist/TermsSettings-DWvaPneu.js +102 -0
- package/dist/ThemeColorRow-BXWnvfz-.js +67 -0
- package/dist/ToggleBinding-DydtwpNG.js +38 -0
- package/dist/UploadModal-D_EDKHGD.js +95 -0
- package/dist/VideoPlayerInput-B9yzUeBW.js +93 -0
- package/dist/VideoPlayerSettings-Bvp9l0yj.js +61 -0
- package/dist/VideoSelectModal-DY3N4JiS.js +100 -0
- package/dist/anime.es-BrPTThYb.js +858 -0
- package/dist/answerDocumentMixin-BYZPU_R-.js +51 -0
- package/dist/color-TdtKxwVa.js +19 -0
- package/dist/debounce-BPnlzNwd.js +84 -0
- package/dist/dom-CJxkno7i.js +91 -0
- package/dist/favicon.ico +0 -0
- package/dist/focusDrawerMixin-DC9Oa1i7.js +22 -0
- package/dist/formComponentsInstall-CEW6TK6z.js +2499 -0
- package/dist/formDrawerState-CAzvSMiQ.js +20 -0
- package/dist/formValidationMixin-D7zXxCpC.js +49 -0
- package/dist/i18nMessages-Chz_lxGG.js +17 -0
- package/dist/index-B9WDC3Xe.js +166 -0
- package/dist/index-BCMaUC5r.js +3916 -0
- package/dist/index-BDMI4NVY.js +492 -0
- package/dist/index-BbscgdRg.js +81 -0
- package/dist/index-CLUljEDI.js +347 -0
- package/dist/index-SxyZvewN.js +102 -0
- package/dist/index.es.js +35 -0
- package/dist/index.umd.js +3148 -0
- package/dist/main-CQBEuZk9.js +56739 -0
- package/dist/mapFormMixin-DlFcgwhm.js +72 -0
- package/dist/omit-BWy0Zhd3.js +31 -0
- package/dist/publicSenderState-CvOcFv2U.js +21 -0
- package/dist/splitpanes-BHUVsCZF.js +382 -0
- package/dist/style.css +4 -0
- package/dist/throttle-BrC8eGjQ.js +18 -0
- package/dist/tinycolor-PhFP695w.js +633 -0
- package/dist/tippy.esm-7dmKOUvu.js +1799 -0
- package/dist/utils-NBLgNGHR.js +108 -0
- package/dist/vuedraggable.umd-ByfH7ZxC.js +3161 -0
- package/dist/vuex.esm-DKGl8mcw.js +467 -0
- package/package.json +1 -1
- package/vite.config.ts +0 -1
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { m as c } from "./mapFormMixin-DlFcgwhm.js";
|
|
2
|
+
import { B as l } from "./BlockMedia-CYI07qAn.js";
|
|
3
|
+
import { b as r, w as d, n, ab as m } from "./main-CQBEuZk9.js";
|
|
4
|
+
import { t as u } from "./tinycolor-PhFP695w.js";
|
|
5
|
+
import { s as p } from "./dom-CJxkno7i.js";
|
|
6
|
+
import { T as y } from "./DocTextEditor-VjhV9IRp.js";
|
|
7
|
+
import { i as h } from "./i18nMessages-Chz_lxGG.js";
|
|
8
|
+
const _ = {
|
|
9
|
+
name: "SummaryBottom",
|
|
10
|
+
mixins: [c([])],
|
|
11
|
+
inject: ["parentSize"],
|
|
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
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
get: r,
|
|
37
|
+
tinycolor: u
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
computed: {
|
|
41
|
+
prices() {
|
|
42
|
+
return r(this, "base.prices") || {};
|
|
43
|
+
},
|
|
44
|
+
isIndivid() {
|
|
45
|
+
return r(this.prices, "helpers.isIndivid", !0);
|
|
46
|
+
},
|
|
47
|
+
showIncVat() {
|
|
48
|
+
return this.isIndivid;
|
|
49
|
+
},
|
|
50
|
+
priceTotal() {
|
|
51
|
+
return this.isIndivid ? r(this.prices, "total", null) : r(this.prices, "subTotal", null);
|
|
52
|
+
},
|
|
53
|
+
priceType() {
|
|
54
|
+
return this.prices.type || ["fixed"];
|
|
55
|
+
},
|
|
56
|
+
currency() {
|
|
57
|
+
return this.prices.currency || this.documentCurrency;
|
|
58
|
+
},
|
|
59
|
+
openAccMaxPrice() {
|
|
60
|
+
return this.prices.maxTotal || null;
|
|
61
|
+
},
|
|
62
|
+
houseWorkType() {
|
|
63
|
+
return r(this.prices, "region.houseWorkType", null);
|
|
64
|
+
},
|
|
65
|
+
isReverseVat() {
|
|
66
|
+
return r(this.prices, "region.reverseVat", !1);
|
|
67
|
+
},
|
|
68
|
+
priceTypeString() {
|
|
69
|
+
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();
|
|
70
|
+
},
|
|
71
|
+
priceDeductionVatString() {
|
|
72
|
+
let i = "";
|
|
73
|
+
if (this.isReverseVat && !this.showIncVat) {
|
|
74
|
+
const t = this.priceFormat(0, {
|
|
75
|
+
currency: this.currency,
|
|
76
|
+
showZero: !0
|
|
77
|
+
});
|
|
78
|
+
return i = this._document.$t("summaryBottom.reverseVat", { amount: t }), i;
|
|
79
|
+
}
|
|
80
|
+
return this.houseWorkType && (i = this._document.$t("deduction.afterType", {
|
|
81
|
+
type: `${this.houseWorkType}_percentage`
|
|
82
|
+
})), this.showIncVat && (i += ` ${this._document.$t("vat.incVat", {
|
|
83
|
+
thing: this._document.$t(`vat.${this.vatType}`)
|
|
84
|
+
})}`), this.showIncVat || (i += ` ${this._document.$t("vat.exVat", {
|
|
85
|
+
thing: this._document.$t(`vat.${this.vatType}`)
|
|
86
|
+
})}`), i.capitalize();
|
|
87
|
+
},
|
|
88
|
+
backgroundSecondary() {
|
|
89
|
+
if (!this.isSmallScreen)
|
|
90
|
+
return { backgroundColor: "transparent" };
|
|
91
|
+
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];
|
|
92
|
+
return {
|
|
93
|
+
backgroundColor: `hsla(${i}, ${t ** 0.9}%, ${e ** 0.9}%, ${s})`
|
|
94
|
+
};
|
|
95
|
+
},
|
|
96
|
+
isSmallScreen() {
|
|
97
|
+
return this.parentSize.width <= 576;
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
methods: {
|
|
101
|
+
priceFormat: d,
|
|
102
|
+
scrollToPricing() {
|
|
103
|
+
const i = document.querySelector("#price");
|
|
104
|
+
i && p(i);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
var v = function() {
|
|
109
|
+
var t = this, e = t._self._c;
|
|
110
|
+
return e("section", { staticClass: "summary-bottom-root" }, [e("div", { staticClass: "summary-bottom", style: [
|
|
111
|
+
{
|
|
112
|
+
backgroundColor: t.backgroundColor,
|
|
113
|
+
color: t.tinycolor.readability(t.backgroundColor, "#FFF") > 2.2 ? "#FFF" : "#000"
|
|
114
|
+
},
|
|
115
|
+
t.options.length && {
|
|
116
|
+
overflow: "hidden",
|
|
117
|
+
padding: 0
|
|
118
|
+
}
|
|
119
|
+
] }, [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: [
|
|
120
|
+
{
|
|
121
|
+
column: t.isSmallScreen,
|
|
122
|
+
sm: t.isSmallScreen
|
|
123
|
+
}
|
|
124
|
+
], 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()])])]);
|
|
125
|
+
}, f = [], g = /* @__PURE__ */ n(
|
|
126
|
+
_,
|
|
127
|
+
v,
|
|
128
|
+
f,
|
|
129
|
+
!1,
|
|
130
|
+
null,
|
|
131
|
+
"d9f78f5f"
|
|
132
|
+
);
|
|
133
|
+
const S = g.exports, x = {
|
|
134
|
+
name: "SummaryTop",
|
|
135
|
+
i18nOptions: {
|
|
136
|
+
namespaces: "summaryTop",
|
|
137
|
+
messages: h
|
|
138
|
+
},
|
|
139
|
+
components: {
|
|
140
|
+
TextEditor: y,
|
|
141
|
+
DocumentLogotype: () => import("./DocumentLogotype-DXYnBedV.js")
|
|
142
|
+
},
|
|
143
|
+
mixins: [c([])],
|
|
144
|
+
inject: ["parentSize"],
|
|
145
|
+
props: {
|
|
146
|
+
showLogo: {
|
|
147
|
+
type: Boolean,
|
|
148
|
+
default: !0
|
|
149
|
+
},
|
|
150
|
+
logotype: {
|
|
151
|
+
type: String,
|
|
152
|
+
default: null
|
|
153
|
+
},
|
|
154
|
+
companyLogotype: {
|
|
155
|
+
type: String,
|
|
156
|
+
default: null
|
|
157
|
+
},
|
|
158
|
+
senderName: {
|
|
159
|
+
type: String,
|
|
160
|
+
default: null
|
|
161
|
+
},
|
|
162
|
+
docName: {
|
|
163
|
+
type: String,
|
|
164
|
+
default: null
|
|
165
|
+
},
|
|
166
|
+
docType: {
|
|
167
|
+
type: String,
|
|
168
|
+
required: !0
|
|
169
|
+
},
|
|
170
|
+
docNumber: {
|
|
171
|
+
type: [Number, String],
|
|
172
|
+
default: null
|
|
173
|
+
},
|
|
174
|
+
sentAt: {
|
|
175
|
+
type: [String, Number],
|
|
176
|
+
default: null
|
|
177
|
+
// required: true,
|
|
178
|
+
},
|
|
179
|
+
expiresAt: {
|
|
180
|
+
type: String,
|
|
181
|
+
default: null
|
|
182
|
+
},
|
|
183
|
+
estimatedTime: {
|
|
184
|
+
type: String,
|
|
185
|
+
default: null
|
|
186
|
+
},
|
|
187
|
+
validator: {
|
|
188
|
+
type: Object,
|
|
189
|
+
default: () => ({})
|
|
190
|
+
},
|
|
191
|
+
hasHover: {
|
|
192
|
+
type: Boolean,
|
|
193
|
+
default: !1
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
computed: {
|
|
197
|
+
logotypeListeners() {
|
|
198
|
+
return {
|
|
199
|
+
...this.$listeners,
|
|
200
|
+
input: (i) => this.$emit("update:logotype", i)
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
var b = function() {
|
|
206
|
+
var t = this, e = t._self._c;
|
|
207
|
+
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: {
|
|
208
|
+
bulletList: !1,
|
|
209
|
+
heading: [1, 2, 3],
|
|
210
|
+
bold: !1,
|
|
211
|
+
link: !1,
|
|
212
|
+
underline: !1,
|
|
213
|
+
blockquote: !0,
|
|
214
|
+
table: !1
|
|
215
|
+
}, unstyled: "", static: "" }, on: { input: function(s) {
|
|
216
|
+
return t.$emit("update:doc-name", s);
|
|
217
|
+
} } }) : 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)])]);
|
|
218
|
+
}, C = [], $ = /* @__PURE__ */ n(
|
|
219
|
+
x,
|
|
220
|
+
b,
|
|
221
|
+
C,
|
|
222
|
+
!1,
|
|
223
|
+
null,
|
|
224
|
+
"181b75e7"
|
|
225
|
+
);
|
|
226
|
+
const w = $.exports, T = {
|
|
227
|
+
name: "PriceHeader",
|
|
228
|
+
components: {
|
|
229
|
+
SummaryTop: w,
|
|
230
|
+
SummaryBottom: S,
|
|
231
|
+
BlockMedia: l
|
|
232
|
+
},
|
|
233
|
+
mixins: [
|
|
234
|
+
c([
|
|
235
|
+
"media",
|
|
236
|
+
"backgroundColor",
|
|
237
|
+
"documentName",
|
|
238
|
+
"showPriceSummary",
|
|
239
|
+
"showLogo",
|
|
240
|
+
"logotype"
|
|
241
|
+
])
|
|
242
|
+
],
|
|
243
|
+
props: {
|
|
244
|
+
_document: {
|
|
245
|
+
type: Object,
|
|
246
|
+
default: () => ({})
|
|
247
|
+
},
|
|
248
|
+
_value: {
|
|
249
|
+
type: Object,
|
|
250
|
+
default: () => ({})
|
|
251
|
+
},
|
|
252
|
+
hasHover: {
|
|
253
|
+
type: Boolean,
|
|
254
|
+
default: !1
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
computed: {
|
|
258
|
+
internalName: {
|
|
259
|
+
get() {
|
|
260
|
+
var i;
|
|
261
|
+
return this.documentName || `<p data-typography="title">${((i = this._document.data) == null ? void 0 : i.name) || ""}</p>`;
|
|
262
|
+
},
|
|
263
|
+
set(i) {
|
|
264
|
+
this.documentName = i, this.$emit("input", {
|
|
265
|
+
key: "data.name",
|
|
266
|
+
value: m(i).trim().slice(0, 255)
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
company() {
|
|
271
|
+
return this._document.sender.company;
|
|
272
|
+
},
|
|
273
|
+
prices() {
|
|
274
|
+
return this._document.prices;
|
|
275
|
+
},
|
|
276
|
+
estimatedTimeString() {
|
|
277
|
+
var e, s;
|
|
278
|
+
const { value: i, unitType: t } = ((s = (e = this._document) == null ? void 0 : e.data) == null ? void 0 : s.estimatedTime) || {};
|
|
279
|
+
return !i || !t ? null : this.$tc(`${t}`, { count: i });
|
|
280
|
+
},
|
|
281
|
+
sendAtShowDate() {
|
|
282
|
+
const { sentAt: i, scheduledFirstDelivery: t } = this._document;
|
|
283
|
+
return i || (t ? t.sendAt : null);
|
|
284
|
+
},
|
|
285
|
+
summaryBottom() {
|
|
286
|
+
var s;
|
|
287
|
+
let i = {
|
|
288
|
+
show: !1,
|
|
289
|
+
backgroundColor: this.backgroundColor || this._document.theme.priceSummaryBackground,
|
|
290
|
+
documentCurrency: this._document.currency,
|
|
291
|
+
vatType: this._document.vatType
|
|
292
|
+
}, { showPriceSummary: t } = this;
|
|
293
|
+
typeof t != "boolean" && ({ showPriceSummary: t } = this._document.theme);
|
|
294
|
+
const e = ((s = this._document.packageGroups) == null ? void 0 : s.packages) || [];
|
|
295
|
+
return e.length > 1 ? i = {
|
|
296
|
+
...i,
|
|
297
|
+
show: t,
|
|
298
|
+
base: { prices: this.prices },
|
|
299
|
+
options: e.filter(({ toggable: o }) => o).map(({ prices: o }) => ({ prices: o }))
|
|
300
|
+
} : i = {
|
|
301
|
+
...i,
|
|
302
|
+
show: t && this._document.readPrices && (this.prices.total || this.prices.type.some(
|
|
303
|
+
(o) => ["openAccMaxPrice", "openAcc"].includes(o)
|
|
304
|
+
)),
|
|
305
|
+
base: { prices: this.prices }
|
|
306
|
+
}, this.canEdit && t && (i.show = !0), i.documentCurrency || (i.show = !1), i;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
var k = function() {
|
|
311
|
+
var s, o;
|
|
312
|
+
var t = this, e = t._self._c;
|
|
313
|
+
return e("div", [e("div", { staticClass: "doc-jumbotron-wrapper" }, [e("BlockMedia", { staticClass: "price-media-wrapper", attrs: { media: {
|
|
314
|
+
...t.media,
|
|
315
|
+
resourceUrl: ((s = t.media) == null ? void 0 : s.resourceUrl) || t._document.theme.background,
|
|
316
|
+
overlayColor: ((o = t.media) == null ? void 0 : o.overlayColor) || t._document.theme.backgroundFilter
|
|
317
|
+
} } }), 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) {
|
|
318
|
+
t.showLogo = a;
|
|
319
|
+
}, "update:show-logo": function(a) {
|
|
320
|
+
t.showLogo = a;
|
|
321
|
+
}, "update:logotype": function(a) {
|
|
322
|
+
t.logotype = a;
|
|
323
|
+
}, "update:docName": function(a) {
|
|
324
|
+
t.internalName = a;
|
|
325
|
+
}, "update:doc-name": function(a) {
|
|
326
|
+
t.internalName = a;
|
|
327
|
+
} } })], 1), t.summaryBottom.show ? e("SummaryBottom", t._b({ attrs: { _document: t._document } }, "SummaryBottom", t.summaryBottom, !1)) : t._e()], 1);
|
|
328
|
+
}, A = [], B = /* @__PURE__ */ n(
|
|
329
|
+
T,
|
|
330
|
+
k,
|
|
331
|
+
A,
|
|
332
|
+
!1,
|
|
333
|
+
null,
|
|
334
|
+
"202cc03f"
|
|
335
|
+
);
|
|
336
|
+
const D = B.exports;
|
|
337
|
+
export {
|
|
338
|
+
D as default
|
|
339
|
+
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { g as u, p as h, i as f, j as d, n as m } from "./main-CQBEuZk9.js";
|
|
2
|
+
import { d as p } from "./debounce-BPnlzNwd.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
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { n as s, c as o, e as c } from "./main-CQBEuZk9.js";
|
|
2
|
+
const i = {
|
|
3
|
+
name: "Setup",
|
|
4
|
+
props: {
|
|
5
|
+
partnerName: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: "Partner"
|
|
8
|
+
},
|
|
9
|
+
closeFunc: {
|
|
10
|
+
type: Function,
|
|
11
|
+
default: () => {
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
computed: {
|
|
16
|
+
baseAppUrl() {
|
|
17
|
+
return o.baseUrl;
|
|
18
|
+
},
|
|
19
|
+
iframeUrl() {
|
|
20
|
+
return `${this.baseAppUrl}/partner/connect?partnerName=${this.partnerName}`;
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
created() {
|
|
24
|
+
window.addEventListener("message", this.onReceiveMessage);
|
|
25
|
+
},
|
|
26
|
+
beforeDestroy() {
|
|
27
|
+
window.removeEventListener("message", this.onReceiveMessage);
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
onReceiveMessage({ data: e, origin: r, source: n }) {
|
|
31
|
+
var t;
|
|
32
|
+
r === this.baseAppUrl && ((e == null ? void 0 : e.type) === "channelPartnerConnect" && (n == null || n.postMessage({ type: "readyForPartnerConnect" }, r)), (e == null ? void 0 : e.type) === "partnerUserConnect" && (c.trigger("account:userConnect", e == null ? void 0 : e.value), (t = this.closeFunc) == null || t.call(this)));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var p = function() {
|
|
37
|
+
var r = this, n = r._self._c;
|
|
38
|
+
return n("iframe", { staticClass: "h-full w-full", attrs: { title: "Partner Connect", src: r.iframeUrl, frameborder: "0" } });
|
|
39
|
+
}, l = [], a = /* @__PURE__ */ s(
|
|
40
|
+
i,
|
|
41
|
+
p,
|
|
42
|
+
l,
|
|
43
|
+
!1,
|
|
44
|
+
null,
|
|
45
|
+
null
|
|
46
|
+
);
|
|
47
|
+
const m = a.exports;
|
|
48
|
+
export {
|
|
49
|
+
m as default
|
|
50
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { n as s, s as r } from "./main-CQBEuZk9.js";
|
|
2
|
+
const o = {
|
|
3
|
+
name: "SmartList",
|
|
4
|
+
props: {
|
|
5
|
+
defaultSort: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: "desc",
|
|
8
|
+
validator(t) {
|
|
9
|
+
return ["asc", "desc"].includes(t);
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
filterMethod: {
|
|
13
|
+
type: Function,
|
|
14
|
+
default: null
|
|
15
|
+
},
|
|
16
|
+
items: {
|
|
17
|
+
type: Array,
|
|
18
|
+
required: !0
|
|
19
|
+
},
|
|
20
|
+
sortMethod: {
|
|
21
|
+
type: Function,
|
|
22
|
+
default: null
|
|
23
|
+
},
|
|
24
|
+
sortKey: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ""
|
|
27
|
+
},
|
|
28
|
+
query: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
data() {
|
|
34
|
+
return {
|
|
35
|
+
sortBy: this.sortKey,
|
|
36
|
+
sortOrder: 1
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
computed: {
|
|
40
|
+
filteredItems() {
|
|
41
|
+
let t = this.items;
|
|
42
|
+
return this.query && (t = this.filterMethod ? this.filterMethod(this.query, this.items) : this.searchedItems), (this.sortBy || this.defaultSort) && (t = this.sortMethod ? this.sortMethod(this.sort, this.searchedItems) : this.sortedItems), t;
|
|
43
|
+
},
|
|
44
|
+
searchedItems() {
|
|
45
|
+
return this.items.filter((t) => typeof t == "object" ? Object.keys(t).some(
|
|
46
|
+
(e) => String(t[e]).toLowerCase().includes(this.query.toLowerCase())
|
|
47
|
+
) : String(t).toLowerCase().includes(this.query.toLowerCase()));
|
|
48
|
+
},
|
|
49
|
+
sortedItems() {
|
|
50
|
+
return this.searchedItems.slice().sort((t, e) => (typeof t == "object" && typeof e == "object" && (t = t[this.sortBy], e = e[this.sortBy]), (t === e ? 0 : r(t, e)) * this.sortOrder));
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
created() {
|
|
54
|
+
this.defaultSort && (this.sortOrder = this.defaultSort === "asc" ? this.sortOrder : this.sortOrder * -1);
|
|
55
|
+
},
|
|
56
|
+
methods: {
|
|
57
|
+
sort(t) {
|
|
58
|
+
this.sortBy = t, this.sortOrder = this.sortOrder * -1;
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
render() {
|
|
62
|
+
return this.$scopedSlots.default({
|
|
63
|
+
items: this.filteredItems,
|
|
64
|
+
sortBy: this.sort,
|
|
65
|
+
sort: {
|
|
66
|
+
by: this.sortBy,
|
|
67
|
+
order: this.sortOrder === 1 ? "asc" : "desc"
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}, i = null, d = null;
|
|
72
|
+
var h = /* @__PURE__ */ s(
|
|
73
|
+
o,
|
|
74
|
+
i,
|
|
75
|
+
d,
|
|
76
|
+
!1,
|
|
77
|
+
null,
|
|
78
|
+
null
|
|
79
|
+
);
|
|
80
|
+
const u = h.exports;
|
|
81
|
+
export {
|
|
82
|
+
u as S
|
|
83
|
+
};
|