@cling-se/widget 0.17.2 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/AddClientCallout-Bod9Eqx4.js +101 -0
- package/dist/AnswerModal-a2cyKFbt.js +3371 -0
- package/dist/AttachmentItem-DBUqckCS.js +171 -0
- package/dist/BaseUpload-DrWzuvbS.js +6503 -0
- package/dist/BlockMedia-DuE_K9hR.js +103 -0
- package/dist/CCallout-CM1VsH30.js +104 -0
- package/dist/{CCurrencyDropdown-CKRgncWy.js → CCurrencyDropdown-C_lAaq4P.js} +91 -53
- package/dist/CDropdownItem-DMUAJ90n.js +749 -0
- package/dist/CFormField.vue_vue_type_script_setup_true_lang-BqAyWe3T.js +292 -0
- package/dist/{CPhoneFormat-Bd-HZuYo.js → CPhoneFormat-Dnn_cKk7.js} +13 -21
- package/dist/CPhoneInput-DuGkDiv-.js +207 -0
- package/dist/CPriceInput-B7DYzKcF.js +142 -0
- package/dist/CSelect-BZZDr27O.js +98 -0
- package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-D2jDhnYI.js +51 -0
- package/dist/ClientAutocomplete-DuaJ5zDf.js +532 -0
- package/dist/ClientModal-CaMSjLkD.js +1188 -0
- package/dist/ColorPicker-BISZPQ6j.js +1408 -0
- package/dist/CompanyModal-ClTcmU4Y.js +250 -0
- package/dist/ContentWrapper-Bj7jbWU0.js +265 -0
- package/dist/CoverBlockSettings-AXyiLxrF.js +861 -0
- package/dist/DocAnswer-Bu09V33D.js +33 -0
- package/dist/DocDetails-B6-2LKsO.js +452 -0
- package/dist/DocForm-CFN8LWSd.js +6772 -0
- package/dist/DocFormSend-D1CUhy4n.js +171 -0
- package/dist/DocLinks-CuliFqtN.js +36 -0
- package/dist/DocModalBase-BxKsnwN-.js +29 -0
- package/dist/DocPrint-B_HJ_RET.js +399 -0
- package/dist/DocReceipt-D-A1TaTI.js +341 -0
- package/dist/DocSendReminder-BKTJonzh.js +181 -0
- package/dist/{DocTextEditor-DFid7uKr.js → DocTextEditor-CEPcJT2o.js} +7907 -5579
- package/dist/DocTimeline-CF9S4YDZ.js +537 -0
- package/dist/DocumentClient-7mbq2QA4.js +90 -0
- package/dist/DocumentLayout-DkFlHgW6.js +1434 -0
- package/dist/DocumentLogotype-BTYMdpNi.js +162 -0
- package/dist/DocumentVoided-CWr5WMUv.js +33 -0
- package/dist/EmbedInput-SevVEpwc.js +156 -0
- package/dist/EmbedSettings-YMbUmp1O.js +103 -0
- package/dist/ErrorCallout-CQo2iF9c.js +34 -0
- package/dist/FilePreviewModal-C0xBeoAz.js +202 -0
- package/dist/Flag-BObij6SN.js +41 -0
- package/dist/HeaderSettings-C77pR78n.js +720 -0
- package/dist/ImageSelectModal-DKdU-0uq.js +119 -0
- package/dist/ImageUploadWrapper-BGkS5Cll.js +1585 -0
- package/dist/Index-B3y-jq9s.js +1098 -0
- package/dist/Index-B41pUREi.js +47 -0
- package/dist/Index-BEyeS1OG.js +52 -0
- package/dist/Index-BG5j8ZFP.js +93 -0
- package/dist/Index-BOT65yQR.js +68 -0
- package/dist/Index-BQNl-cXP.js +28 -0
- package/dist/Index-BY6xsS7C.js +38 -0
- package/dist/Index-Bh0Xv5ry.js +163 -0
- package/dist/Index-Bn4FSQcx.js +228 -0
- package/dist/Index-BrRIAede.js +87 -0
- package/dist/Index-C-6um0kX.js +76 -0
- package/dist/{Index-EO0rsTmx.js → Index-C-gHa5xk.js} +319 -214
- package/dist/Index-C0wcjKCH.js +629 -0
- package/dist/Index-C6BbUFYw.js +160 -0
- package/dist/Index-C8xwJ0m1.js +200 -0
- package/dist/Index-CKgFEJF4.js +140 -0
- package/dist/{Index-CbYLDVU5.js → Index-CQwmu4f1.js} +47 -60
- package/dist/Index-CXchTpBa.js +74 -0
- package/dist/{Index-BzcZCdHj.js → Index-CYoRt8PA.js} +9 -17
- package/dist/Index-CZZNQ4q5.js +39 -0
- package/dist/Index-CkaAs5ms.js +136 -0
- package/dist/Index-CtpXaBz8.js +363 -0
- package/dist/Index-CxDsSGtZ.js +126 -0
- package/dist/Index-DFkTBm02.js +102 -0
- package/dist/Index-DP3ll8F-.js +70 -0
- package/dist/{Index-BdJbs8bM.js → Index-DPDzMKQa.js} +10 -18
- package/dist/Index-DvxSig3z.js +25 -0
- package/dist/Index-Dzrn3Y6p.js +16 -0
- package/dist/{Index-BWnh94_i.js → Index-LQb0omFE.js} +10 -18
- package/dist/Index-Mt4mSaNT.js +4 -0
- package/dist/Index-_xN_cczo.js +3477 -0
- package/dist/Index-gAz45qgR.js +21 -0
- package/dist/Index-xXLFalgR.js +49 -0
- package/dist/Index-zyZRPz3H.js +28 -0
- package/dist/Index.vue_vue_type_script_lang-Ddo1wo-D.js +671 -0
- package/dist/InputToggleRow-CokEYwm2.js +99 -0
- package/dist/ManualPopover-Dukly7GP.js +65 -0
- package/dist/MediaWrapper-B8msCrQm.js +18 -0
- package/dist/{NotBindingText-D8Blua5a.js → NotBindingText-DcQd8Eej.js} +13 -17
- package/dist/PackageGroup-clUIUoik.js +1060 -0
- package/dist/PdfTerms-DpzMVRfN.js +34 -0
- package/dist/PdfViewer-CSf4Rtbj.js +392 -0
- package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-D6KSjjMA.js +17 -0
- package/dist/PriceHeader-Dyweu8aH.js +488 -0
- package/dist/{SearchApi-Bg9FwkW0.js → SearchApi-Y1fDQn0u.js} +37 -49
- package/dist/SendForm-B9l24WwR.js +6689 -0
- package/dist/Setup-DyzbPFM4.js +47 -0
- package/dist/{SmartList-DofjZjfy.js → SmartList-CWGKoAJh.js} +16 -24
- package/dist/Sortable.vue_vue_type_script_setup_true_lang-C2Gwp6Q-.js +1349 -0
- package/dist/{TermsSettings-B4glHd0I.js → TermsSettings-BeQH307A.js} +169 -56
- package/dist/ThemeColorRow-DFIsPy55.js +105 -0
- package/dist/ToggleBinding-DlH4y1IM.js +44 -0
- package/dist/UploadModal-BZ0mPBBB.js +134 -0
- package/dist/VideoPlayerInput-DBxcTUb7.js +134 -0
- package/dist/VideoPlayerSettings-Dg1OxjOa.js +78 -0
- package/dist/VideoSelectModal-BhbanMix.js +217 -0
- package/dist/{anime.es-BrPTThYb.js → anime.es-4wvNItHq.js} +205 -201
- package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
- package/dist/{dom-Ds4ypDrd.js → dom-CkTGWrfu.js} +3 -6
- package/dist/{focusDrawerMixin-DVCJIsb_.js → focusDrawerMixin-BVbTYOGr.js} +1 -1
- package/dist/{formDrawerState-BYsq1pB0.js → formDrawerState-CogZ-GVm.js} +2 -2
- package/dist/helpers-B4GUxtdD.js +46 -0
- package/dist/index-BZDey7B-.js +268 -0
- package/dist/index-Bd8_ZHHq.js +188 -0
- package/dist/index-BvyoYp1e.js +508 -0
- package/dist/index-CJZoubA3.js +3525 -0
- package/dist/index-D7yQWP4d.js +125 -0
- package/dist/index-D8hGHka6.js +513 -0
- package/dist/index-Dxy4tf7x.js +149 -0
- package/dist/index.es.js +2 -5
- package/dist/index.umd.js +303 -1486
- package/dist/main-Bn5XkQPb.js +57570 -0
- package/dist/mapFormMixin-C7FJLnbO.js +1528 -0
- package/dist/omit-DrWpFvRJ.js +56 -0
- package/dist/{publicSenderState-C4cIGu3m.js → publicSenderState-tdtCFPMx.js} +4 -4
- package/dist/splitpanes-BApidgjj.js +342 -0
- package/dist/template-CHdf2K2I.js +1572 -0
- package/dist/tippy.esm-Co6FYzEM.js +1994 -0
- package/dist/useTermsModal-VDnO1Lro.js +87 -0
- package/dist/{utils-CMs9ODO8.js → utils-DZkn0Q9c.js} +8 -11
- package/dist/validation-CqBkar3f.js +40 -0
- package/dist/widget.css +1 -0
- package/package.json +20 -25
- package/dist/AddClientCallout-TF4dWJwb.js +0 -48
- package/dist/AnswerModal-CLHDa2TD.js +0 -3879
- package/dist/AttachmentItem-ICP5nbhT.js +0 -85
- package/dist/BaseDatePicker-wwmiz_b5.js +0 -3187
- package/dist/BaseUpload-CDZOjohX.js +0 -1977
- package/dist/BlockMedia-D1JAYF9F.js +0 -76
- package/dist/CCallout-dAjcZXrm.js +0 -58
- package/dist/CDropdownItem-CkSNbSdj.js +0 -640
- package/dist/CFormField-Dw6UM1u6.js +0 -240
- package/dist/CPhoneInput-Dd6cJ4jg.js +0 -138
- package/dist/CPriceInput-CjV95s8E.js +0 -116
- package/dist/CSelect-izVnsQME.js +0 -91
- package/dist/CSkeleton-C0TjtLtY.js +0 -55
- package/dist/ClientAutocomplete-Cfu3abEx.js +0 -438
- package/dist/ClientModal-DjSoPQ9x.js +0 -666
- package/dist/ColorPicker-DZP6FIdn.js +0 -2879
- package/dist/CompanyModal-BYQWdbhG.js +0 -147
- package/dist/ContentWrapper-Bci9pSEp.js +0 -190
- package/dist/CoverBlockSettings-wD55bj3k.js +0 -659
- package/dist/DocAnswer-B5q-ntKP.js +0 -36
- package/dist/DocDetails-BQuaNZ4b.js +0 -263
- package/dist/DocForm-QzZ5wqsS.js +0 -5017
- package/dist/DocFormSend-CORtQPhb.js +0 -146
- package/dist/DocLinks-DZPzODUe.js +0 -38
- package/dist/DocModalBase-TTALjv6K.js +0 -28
- package/dist/DocPrint-BB-KT9ut.js +0 -240
- package/dist/DocReceipt-CGks1GLS.js +0 -217
- package/dist/DocSendReminder-BBQXJbsV.js +0 -140
- package/dist/DocTimeline-4jnYDmBI.js +0 -485
- package/dist/DocumentClient-BAAX7Dxk.js +0 -136
- package/dist/DocumentLayout-C4edCFmr.js +0 -4880
- package/dist/DocumentLogotype-i7YSQKcH.js +0 -92
- package/dist/DocumentVoided-BvZoMFB_.js +0 -25
- package/dist/EmbedInput-Bij7ER30.js +0 -117
- package/dist/EmbedSettings-D0oyq4-9.js +0 -74
- package/dist/ErrorCallout-CsW3WTZp.js +0 -27
- package/dist/FilePreviewModal-Doaawg0l.js +0 -81
- package/dist/Flag-C4Mf2xUU.js +0 -46
- package/dist/HeaderSettings-DwZ54IsK.js +0 -440
- package/dist/ImageSelectModal-ClFJ5uXM.js +0 -86
- package/dist/ImageUploadWrapper-DtEp_Pg3.js +0 -1604
- package/dist/Index-2MwnGZ_4.js +0 -25
- package/dist/Index-3CwdeytO.js +0 -107
- package/dist/Index-B-bSVOoh.js +0 -73
- package/dist/Index-BDyMp1ib.js +0 -643
- package/dist/Index-BMgtwHVA.js +0 -24
- package/dist/Index-BTD3hWbY.js +0 -54
- package/dist/Index-BUbd06rz.js +0 -144
- package/dist/Index-Bv2XrpgK.js +0 -25
- package/dist/Index-C00Ay-7P.js +0 -62
- package/dist/Index-CHL_6WQH.js +0 -66
- package/dist/Index-CLyNrkJA.js +0 -28
- package/dist/Index-CV57PvUE.js +0 -26
- package/dist/Index-Crj4apcP.js +0 -146
- package/dist/Index-CryBgLTa.js +0 -294
- package/dist/Index-Cv33nreP.js +0 -33
- package/dist/Index-D0ErQJ2M.js +0 -2445
- package/dist/Index-D8ZnVbsP.js +0 -32
- package/dist/Index-DPNIJewY.js +0 -56
- package/dist/Index-DVXhB0Ja.js +0 -58
- package/dist/Index-DWhQwxeB.js +0 -94
- package/dist/Index-DX7tomhl.js +0 -230
- package/dist/Index-D_AdmLWe.js +0 -41
- package/dist/Index-DgTQzlfK.js +0 -754
- package/dist/Index-DhapmO-4.js +0 -55
- package/dist/Index-DjC8joRt.js +0 -150
- package/dist/Index-Dv4l4LKF.js +0 -154
- package/dist/Index-TTFKPIIC.js +0 -84
- package/dist/Index-cT8oYfLR.js +0 -41
- package/dist/Index-igPwrQMu.js +0 -77
- package/dist/InputToggleRow-BgOubdXs.js +0 -57
- package/dist/ManualPopover-8suun-i9.js +0 -60
- package/dist/MediaWrapper-BadblLbS.js +0 -23
- package/dist/PackageGroup-BxmqH6qI.js +0 -704
- package/dist/PdfTerms-C6MRk0Ix.js +0 -31
- package/dist/PdfViewer-DUoiQx_1.js +0 -383
- package/dist/PlainHtml-DZ9V0Yuf.js +0 -27
- package/dist/PriceHeader-C3_CoKrL.js +0 -338
- package/dist/SendForm-D-OvqCee.js +0 -1023
- package/dist/Setup-CwK4er2y.js +0 -50
- package/dist/ThemeColorRow-BplIaxA2.js +0 -69
- package/dist/ToggleBinding-6ntt38Ye.js +0 -42
- package/dist/UploadModal-B6jQzsYA.js +0 -95
- package/dist/VideoPlayerInput-ryP77WC0.js +0 -97
- package/dist/VideoPlayerSettings-DJh0JNRI.js +0 -61
- package/dist/VideoSelectModal-8udQ394X.js +0 -104
- package/dist/answerDocumentMixin-CF4J_vsp.js +0 -51
- package/dist/debounce-CgyZi04Q.js +0 -84
- package/dist/formValidationMixin-Dq7aZhBk.js +0 -49
- package/dist/index-2Q8Ejpof.js +0 -167
- package/dist/index-B5-izJkt.js +0 -102
- package/dist/index-BQb6k0M8.js +0 -351
- package/dist/index-CR-KQfRE.js +0 -81
- package/dist/index-CogHiXWx.js +0 -2700
- package/dist/index-lZ1sSNWc.js +0 -492
- package/dist/main-BpqUyMpC.js +0 -57349
- package/dist/mapFormMixin-rxtAFyFK.js +0 -3028
- package/dist/omit-C7FeydiO.js +0 -31
- package/dist/simplebar.min-Dm388s-3.js +0 -71
- package/dist/splitpanes-BHUVsCZF.js +0 -382
- package/dist/style.css +0 -4
- package/dist/throttle-CfcsX8nA.js +0 -18
- package/dist/tippy.esm-C9mV-Rzr.js +0 -1805
- package/dist/vuedraggable.umd-CChGnToh.js +0 -3161
- package/dist/vuex.esm-DKGl8mcw.js +0 -467
|
@@ -1,1023 +0,0 @@
|
|
|
1
|
-
import { m as d } from "./mapFormMixin-rxtAFyFK.js";
|
|
2
|
-
import { I as S, a as w } from "./index-CogHiXWx.js";
|
|
3
|
-
import { aC as u, h as $, n as o, b as l, aD as b, v as k, z as D, aE as g, aF as M } from "./main-BpqUyMpC.js";
|
|
4
|
-
import { B as f } from "./BaseDatePicker-wwmiz_b5.js";
|
|
5
|
-
import { C as h, a as y, b as F } from "./CDropdownItem-CkSNbSdj.js";
|
|
6
|
-
import { E as A } from "./ErrorCallout-CsW3WTZp.js";
|
|
7
|
-
import { C as O, a as I } from "./ClientModal-DjSoPQ9x.js";
|
|
8
|
-
import { s as B } from "./simplebar.min-Dm388s-3.js";
|
|
9
|
-
import { b as P, m as c } from "./vuex.esm-DKGl8mcw.js";
|
|
10
|
-
import V from "./AddClientCallout-TF4dWJwb.js";
|
|
11
|
-
function _(n, e) {
|
|
12
|
-
const t = new Date(n.getTime());
|
|
13
|
-
return t.setDate(
|
|
14
|
-
n.getDate() + (7 + e - n.getDay() - 1) % 7 + 1
|
|
15
|
-
), t.setHours(8, 0, 0, 0), t;
|
|
16
|
-
}
|
|
17
|
-
function C(n) {
|
|
18
|
-
const e = new Date(n.getTime());
|
|
19
|
-
return e.setDate(e.getDate() + 1), e.setHours(10, 0, 0, 0), e;
|
|
20
|
-
}
|
|
21
|
-
let p = C(/* @__PURE__ */ new Date()), v = _(/* @__PURE__ */ new Date(), 1);
|
|
22
|
-
const R = {
|
|
23
|
-
name: "DocumentSendLater",
|
|
24
|
-
i18nOptions: {
|
|
25
|
-
namespaces: "documentSendLater",
|
|
26
|
-
messages: {
|
|
27
|
-
en: {
|
|
28
|
-
title: "Schedule Delivery",
|
|
29
|
-
tomorrowMorning: "Tomorrow morning",
|
|
30
|
-
mondayMorning: "Monday morning",
|
|
31
|
-
custom: {
|
|
32
|
-
title: "Set time & date",
|
|
33
|
-
invalid: "Time & date can't be in the past"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
sv: {
|
|
37
|
-
title: "Skicka med schemaläggning",
|
|
38
|
-
tomorrowMorning: "Imorgon förmiddag",
|
|
39
|
-
mondayMorning: "Måndag morgon",
|
|
40
|
-
custom: {
|
|
41
|
-
title: "Välj datum & tid",
|
|
42
|
-
invalid: "Välj en tid & datum längre fram i tiden."
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
components: {
|
|
48
|
-
BaseDatePicker: f
|
|
49
|
-
},
|
|
50
|
-
props: {
|
|
51
|
-
_document: {
|
|
52
|
-
type: Object,
|
|
53
|
-
default: () => ({})
|
|
54
|
-
},
|
|
55
|
-
setFormValue: {
|
|
56
|
-
type: Function,
|
|
57
|
-
required: !0
|
|
58
|
-
},
|
|
59
|
-
removeFormValue: {
|
|
60
|
-
type: Function,
|
|
61
|
-
required: !0
|
|
62
|
-
},
|
|
63
|
-
onSaveDocument: {
|
|
64
|
-
type: Function,
|
|
65
|
-
required: !0
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
data() {
|
|
69
|
-
return {
|
|
70
|
-
sendAt: u(/* @__PURE__ */ new Date(), 5).toISOString(),
|
|
71
|
-
showCustom: !1,
|
|
72
|
-
backupSentFlag: !1
|
|
73
|
-
// needed since doc/project flags not instant on double clicks
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
validations: {
|
|
77
|
-
sendAt: {
|
|
78
|
-
minValue: (n) => n > u(/* @__PURE__ */ new Date(), 2).toISOString()
|
|
79
|
-
// two minutes as safety
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
computed: {
|
|
83
|
-
...P("forms", {
|
|
84
|
-
formData: (n) => n.document2.data
|
|
85
|
-
}),
|
|
86
|
-
...c({
|
|
87
|
-
deliveryTypes: "forms/deliveryTypes",
|
|
88
|
-
isPostingDocument: "documents2/isPosting",
|
|
89
|
-
feature: "application/feature"
|
|
90
|
-
}),
|
|
91
|
-
tomorrowMorning() {
|
|
92
|
-
return p.toISOString();
|
|
93
|
-
},
|
|
94
|
-
mondayMorning() {
|
|
95
|
-
return v.toISOString();
|
|
96
|
-
},
|
|
97
|
-
reminderDeliveryTypes() {
|
|
98
|
-
const n = ["email"];
|
|
99
|
-
return this.feature("sms") && n.push("sms"), this.deliveryTypes ? [
|
|
100
|
-
...this.deliveryTypes.sms && this.feature("sms") ? ["sms"] : [],
|
|
101
|
-
...this.deliveryTypes.email ? ["email"] : []
|
|
102
|
-
] : n;
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
created() {
|
|
106
|
-
p = C(/* @__PURE__ */ new Date()), v = _(/* @__PURE__ */ new Date(), 1);
|
|
107
|
-
},
|
|
108
|
-
methods: {
|
|
109
|
-
setTime(n) {
|
|
110
|
-
const e = n.split(":"), t = new Date(this.sendAt).setHours(e[0], e[1]);
|
|
111
|
-
t && (this.sendAt = new Date(t).toISOString());
|
|
112
|
-
},
|
|
113
|
-
setDate(n) {
|
|
114
|
-
const e = new Date(this.sendAt), t = new Date(n).setHours(e.getHours(), e.getMinutes());
|
|
115
|
-
this.sendAt = new Date(t).toISOString();
|
|
116
|
-
},
|
|
117
|
-
async onSendAt(n) {
|
|
118
|
-
try {
|
|
119
|
-
if (this.$v.$invalid || this.isPostingDocument || this.backupSentFlag)
|
|
120
|
-
return;
|
|
121
|
-
this.backupSentFlag = !0;
|
|
122
|
-
const e = {
|
|
123
|
-
type: "first",
|
|
124
|
-
status: "new",
|
|
125
|
-
sendDays: 0,
|
|
126
|
-
sendAt: n,
|
|
127
|
-
deliveryTypes: this.reminderDeliveryTypes,
|
|
128
|
-
tries: 0
|
|
129
|
-
}, t = this.formData.reminders.findIndex(
|
|
130
|
-
(i) => i.type === "first"
|
|
131
|
-
), s = t >= 0 ? `data.reminders[${t}]` : "data.reminders";
|
|
132
|
-
this.setFormValue({ key: s, value: e }), await this.onSaveDocument({ doSend: !0 }), this.backupSentFlag = !1;
|
|
133
|
-
} catch (e) {
|
|
134
|
-
$(e);
|
|
135
|
-
} finally {
|
|
136
|
-
this.backupSentFlag = !1;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
var z = function() {
|
|
142
|
-
var e = this, t = e._self._c;
|
|
143
|
-
return t("div", { staticClass: "overflow-hidden rounded-xl bg-white" }, [t("div", { staticClass: "px-6 pb-3 pt-8" }, [t("div", { staticClass: "text-md text-center font-semibold" }, [e._v(" " + e._s(e.$t("title")) + " ")]), t("div", { staticClass: "pt-8" }, e._l([
|
|
144
|
-
[e.tomorrowMorning, "tomorrowMorning"],
|
|
145
|
-
[e.mondayMorning, "mondayMorning"]
|
|
146
|
-
], function(s, i) {
|
|
147
|
-
return t("div", { key: i, staticClass: "mb-4 flex cursor-pointer select-none items-center justify-between rounded-md border border-gray-200 bg-gray-50 p-4 text-sm hover:border-gray-300 hover:bg-gray-100 active:border-gray-400 active:bg-gray-200", on: { click: () => e.onSendAt(s[0]) } }, [t("div", { staticClass: "font-medium" }, [e._v(e._s(e.$t(s[1])))]), t("div", { staticClass: "text-gray-500" }, [e._v(" " + e._s(e.$formatDate(s[0], "p, d MMM")) + " ")])]);
|
|
148
|
-
}), 0)]), t("div", { staticClass: "border-t border-gray-200 bg-gray-100 px-8 py-6", class: e.showCustom ? "" : "cursor-pointer hover:bg-gray-200", on: { click: function(s) {
|
|
149
|
-
e.showCustom = !0;
|
|
150
|
-
} } }, [t("div", { staticClass: "flex items-center text-sm" }, [t("CIcon", { staticClass: "text-primary-500 mr-2", attrs: { type: "calendar", size: "18" } }), t("div", { staticClass: "font-medium", domProps: { textContent: e._s(e.$t("custom.title")) } })], 1), t("Animation", [t("div", { directives: [{ name: "show", rawName: "v-show", value: e.showCustom, expression: "showCustom" }], staticClass: "mt-4" }, [t("div", { staticClass: "grid grid-cols-2 gap-4" }, [t("BaseDatePicker", { attrs: { value: e.sendAt }, on: { input: e.setDate } }), t("CInput", { attrs: { value: e.$formatDate(e.sendAt, "HH:mm"), type: "time" }, on: { input: e.setTime } })], 1), e.$v.$invalid ? t("div", { staticClass: "error-wrapper" }, [t("CIcon", { staticClass: "text-primary-500 mr-2", attrs: { type: "calendar" } }), e._v(" " + e._s(e.$t("custom.invalid")) + " ")], 1) : e._e(), t("CButton", { staticStyle: { "margin-top": "calc(1.5 * var(--rem))" }, attrs: { loading: e.isPostingDocument, type: "secondary", wide: "" }, on: { click: function(s) {
|
|
151
|
-
return e.onSendAt(e.sendAt);
|
|
152
|
-
} } }, [e._v(" " + e._s(e.$t("_common:send")) + " " + e._s(e.$formatDate(e.sendAt, "d MMM - p")) + " ")])], 1)])], 1)]);
|
|
153
|
-
}, T = [], E = /* @__PURE__ */ o(
|
|
154
|
-
R,
|
|
155
|
-
z,
|
|
156
|
-
T,
|
|
157
|
-
!1,
|
|
158
|
-
null,
|
|
159
|
-
"dcfae061"
|
|
160
|
-
);
|
|
161
|
-
const N = E.exports, L = {
|
|
162
|
-
sv: {
|
|
163
|
-
title: "Skicka dokument",
|
|
164
|
-
nameLabel: "Dokumentnamn",
|
|
165
|
-
namePlaceholder: "Namn",
|
|
166
|
-
sendAs: "Skicka som",
|
|
167
|
-
validityPeriod: "Giltighetstid",
|
|
168
|
-
manualDelivery: "Manuell leverans",
|
|
169
|
-
manualDeliveryTooltip: "Skicka ut dokument till din mottagare själv. Du kan dela en länk eller en PDF.",
|
|
170
|
-
scheduledTooltip: "Schemalägg utskick",
|
|
171
|
-
clientsAreMissingContactInfo: "En eller flera mottagare saknar e-post eller mobiltelefon-nr. Dokumentet kommer inte att kunna skickas till dem.",
|
|
172
|
-
missingDeliveryMethod: "Välj en eller fler leveransmetoder",
|
|
173
|
-
sendButton: "Skicka dokument",
|
|
174
|
-
signMethod: {
|
|
175
|
-
title: "Signeringsmetod",
|
|
176
|
-
tooltip: "Hur ska din mottagare signera?",
|
|
177
|
-
button: {
|
|
178
|
-
title: "Standard - knapptryck",
|
|
179
|
-
content: "Bevisnivå: IP-adress, tidpunkt och enhet."
|
|
180
|
-
},
|
|
181
|
-
bankId: {
|
|
182
|
-
title: "BankId",
|
|
183
|
-
content: "Samma säkerhetsgrad som bankerna har."
|
|
184
|
-
},
|
|
185
|
-
signature: {
|
|
186
|
-
title: "Standard",
|
|
187
|
-
content: "Bevisnivå: IP-adress, tidpunkt och enhet."
|
|
188
|
-
},
|
|
189
|
-
inPerson: {
|
|
190
|
-
title: "Fysisk underskrift",
|
|
191
|
-
content: "Signatur på utskrivet dokument"
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
en: {
|
|
196
|
-
title: "Send document",
|
|
197
|
-
nameLabel: "Document name",
|
|
198
|
-
namePlaceholder: "Name",
|
|
199
|
-
sendAs: "Send as",
|
|
200
|
-
validityPeriod: "Expiration",
|
|
201
|
-
manualDelivery: "Manual delivery",
|
|
202
|
-
manualDeliveryTooltip: "Share the document with your recipient yourself. You can share a link or a PDF.",
|
|
203
|
-
scheduledTooltip: "Schedule delivery",
|
|
204
|
-
clientsAreMissingContactInfo: "Note that one or more recipients are missing an email or cellphone number. The document will not be sent to them.",
|
|
205
|
-
missingDeliveryMethod: "Please select one or more delivery methods",
|
|
206
|
-
sendButton: "Send document",
|
|
207
|
-
signMethod: {
|
|
208
|
-
title: "Signing method",
|
|
209
|
-
tooltip: "How do you want your client to sign?",
|
|
210
|
-
button: {
|
|
211
|
-
title: "Standard - button",
|
|
212
|
-
content: "Level of proof: IP address, timestamp and device."
|
|
213
|
-
},
|
|
214
|
-
bankId: {
|
|
215
|
-
title: "BankID",
|
|
216
|
-
content: "Same level of proof as the banks use."
|
|
217
|
-
},
|
|
218
|
-
signature: {
|
|
219
|
-
title: "Signature",
|
|
220
|
-
content: "Level of proof: IP address, timestamp and device."
|
|
221
|
-
},
|
|
222
|
-
inPerson: {
|
|
223
|
-
title: "In person",
|
|
224
|
-
content: "Signature on print document"
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}, j = {
|
|
229
|
-
sv: {
|
|
230
|
-
addFirstButton: "Lägg till mottagare",
|
|
231
|
-
addButton: "Lägg till mottagare",
|
|
232
|
-
signOrder: {
|
|
233
|
-
label: "Signeringsordning",
|
|
234
|
-
tooltip: "Signeringsordning låter dig bestämma i vilken ordning dina mottagare tar emot och signerar dokumentet."
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
en: {
|
|
238
|
-
addFirstButton: "Add recipient",
|
|
239
|
-
addButton: "Add recipient",
|
|
240
|
-
signOrder: {
|
|
241
|
-
label: "Signing order",
|
|
242
|
-
tooltip: "Signing order lets you decide the order in which your recipients receive and sign your documents."
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}, H = {
|
|
246
|
-
name: "ClientSendListItem",
|
|
247
|
-
components: {
|
|
248
|
-
CDropdown: h
|
|
249
|
-
},
|
|
250
|
-
props: {
|
|
251
|
-
client: {
|
|
252
|
-
type: Object,
|
|
253
|
-
default: () => ({})
|
|
254
|
-
},
|
|
255
|
-
isOrder: {
|
|
256
|
-
type: Boolean,
|
|
257
|
-
default: !1
|
|
258
|
-
},
|
|
259
|
-
isSender: {
|
|
260
|
-
type: Boolean,
|
|
261
|
-
default: !1
|
|
262
|
-
},
|
|
263
|
-
compact: {
|
|
264
|
-
type: Boolean,
|
|
265
|
-
default: !1
|
|
266
|
-
},
|
|
267
|
-
allowEditClients: {
|
|
268
|
-
type: Boolean,
|
|
269
|
-
default: !0
|
|
270
|
-
},
|
|
271
|
-
rightButton: {
|
|
272
|
-
// TODO temporary in order to disable sender sign for widget context
|
|
273
|
-
type: Boolean,
|
|
274
|
-
default: !0
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
data() {
|
|
278
|
-
return {
|
|
279
|
-
isHover: !1,
|
|
280
|
-
isDropdownOpen: !1
|
|
281
|
-
};
|
|
282
|
-
},
|
|
283
|
-
methods: {
|
|
284
|
-
onClick() {
|
|
285
|
-
var n;
|
|
286
|
-
if (this.rightButton && this.isSender)
|
|
287
|
-
return (n = this.$refs.dropdown) == null ? void 0 : n.toggle();
|
|
288
|
-
this.allowEditClients && this.$emit("open");
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
};
|
|
292
|
-
var q = function() {
|
|
293
|
-
var s;
|
|
294
|
-
var e = this, t = e._self._c;
|
|
295
|
-
return t("div", { staticClass: "rc-card flex items-center", class: {
|
|
296
|
-
"is-hover": e.isHover,
|
|
297
|
-
"has-controls": e.isOrder
|
|
298
|
-
}, staticStyle: { "padding-left": "8px" }, on: { click: e.onClick, "&mouseover": function(i) {
|
|
299
|
-
e.isHover = !0;
|
|
300
|
-
}, "&mouseleave": function(i) {
|
|
301
|
-
e.isHover = !1;
|
|
302
|
-
} } }, [e.compact ? t("div", { staticStyle: { "font-size": "14px" } }, [t("div", [e._v(e._s(e.client.name || e.client.companyName))]), e.client.name && e.client.companyName ? t("div", { staticStyle: { "font-size": "12px", "font-weight": "500" } }, [e._v(" " + e._s(e.client.companyName) + " ")]) : e._e(), e.client.documentRole ? t("div", { staticClass: "text-gray-700", staticStyle: { "font-size": "13px", "margin-top": "4px" } }, [e._v(" " + e._s(e.$t(`_common:documentRole.${e.client.documentRole}.description`)) + " ")]) : e._e(), e.isOrder ? t("div", { staticClass: "compact-order" }, [t("CIcon", { staticClass: "compact-order-button", attrs: { size: "16", type: "chevron-up" }, on: { click: function(i) {
|
|
303
|
-
return i.preventDefault(), i.stopPropagation(), e.$emit("move", -1);
|
|
304
|
-
} } }), t("div", { staticClass: "rc-order", staticStyle: { width: "20px", height: "20px" } }, [e._v(" " + e._s(e.client.signOrder) + " ")]), t("CIcon", { staticClass: "compact-order-button", attrs: { size: "16", type: "chevron-down" }, on: { click: function(i) {
|
|
305
|
-
return i.preventDefault(), i.stopPropagation(), e.$emit("move", 1);
|
|
306
|
-
} } })], 1) : e._e()]) : [t("div", { staticStyle: { width: "34px", flex: "0 0 34px", display: "inline-flex", "justify-content": "center" } }, [e.isOrder ? t("div", { staticStyle: { position: "relative", display: "inline-block" } }, [t("CButton", { staticClass: "rc-order__button up", attrs: { type: "none", pattern: "primary", circle: "", raised: "", size: "small", icon: "minus" }, on: { click: function(i) {
|
|
307
|
-
return i.preventDefault(), i.stopPropagation(), e.$emit("move", -1);
|
|
308
|
-
} } }), t("CButton", { staticClass: "rc-order__button down", attrs: { type: "none", pattern: "primary", circle: "", raised: "", size: "small", icon: "plus" }, on: { click: function(i) {
|
|
309
|
-
return i.preventDefault(), i.stopPropagation(), e.$emit("move", 1);
|
|
310
|
-
} } }), t("div", { staticClass: "rc-order" }, [e._v(" " + e._s(e.client.signOrder) + " ")])], 1) : t("CIcon", { staticClass: "text-primary-500", staticStyle: { "margin-right": "8px", flex: "0 0 18px" }, attrs: { type: e.isSender ? "send" : ["signee", "approver"].includes(e.client.documentRole) ? "pen-tool" : "eye", size: "18" } })], 1), t("div", { staticClass: "rc-data truncate-text" }, [e.client.name || e.client.companyName ? t("div", { staticStyle: { "font-weight": "500" } }, [e._v(" " + e._s(e.client.name || e.client.companyName) + " ")]) : e.isSender ? t("div", { staticClass: "text-gray-500" }, [e._v(" " + e._s(e.$t("_common:empty", { thing: e.$t("_common:reference") })) + " ")]) : t("div", { staticClass: "text-gray-500" }, [e._v(" " + e._s(e.$t("_common:missing", { thing: e.$t("_common:name") })) + " ")]), t("div", { staticClass: "text-gray-700", staticStyle: { "font-size": "12px" } }, [e.isSender ? [e.isSender ? t("span", [e._v(" " + e._s(e.$t("_common:documentRole.sender.description")) + " ")]) : e._e(), e.client.documentRole === "signee" ? t("span", [e._v(" " + e._s(e.$t(`_common:documentRole.${e.client.documentRole}.description`)) + " ")]) : e._e()] : [((s = e.client.answerMethod) == null ? void 0 : s.accept) === "inPerson" ? t("span", { staticClass: "text-red-500" }, [e._v(" " + e._s(e.$t("_common:signMethod.title")) + ": "), t("span", [e._v(" " + e._s(e.$t("_common:signMethod.inPerson")) + " ")])]) : e._e(), e.client.documentRole ? t("span", [e._v(" " + e._s(e.$t(`_common:documentRole.${e.client.documentRole}.description`)) + " ")]) : e._e(), e.client.email ? t("span", [e._v(e._s(e.client.email))]) : e._e(), e.client.cellphone ? t("span", [e._v(e._s(e.client.cellphone))]) : e._e()]], 2)])], e.rightButton ? t("transition", { attrs: { name: "fade-100" } }, [e.isHover || e.isDropdownOpen ? [e.isSender ? t("CDropdown", { ref: "dropdown", staticStyle: { position: "absolute", right: "calc(0.5 * var(--rem))" }, attrs: { position: "is-bottom-left", "menu-styling": {
|
|
311
|
-
minWidth: "220px"
|
|
312
|
-
}, "append-to-body": "" }, on: { "active-change": function(i) {
|
|
313
|
-
e.isDropdownOpen = i;
|
|
314
|
-
} }, nativeOn: { click: function(i) {
|
|
315
|
-
i.stopPropagation();
|
|
316
|
-
} }, scopedSlots: e._u([{ key: "trigger", fn: function() {
|
|
317
|
-
return [t("CButton", { attrs: { circle: "", size: "small", type: "none", pattern: "secondary", raised: "", icon: "more-horizontal" } })];
|
|
318
|
-
}, proxy: !0 }], null, !1, 383536082) }, [e._t("dropdownOptions")], 2) : e.allowEditClients ? t("CButton", { staticStyle: { position: "absolute", right: "calc(0.5 * var(--rem))" }, attrs: { circle: "", size: "small", icon: "x", type: "none", pattern: "secondary", raised: "" }, on: { click: function(i) {
|
|
319
|
-
return i.stopPropagation(), e.$emit("remove");
|
|
320
|
-
} } }) : e._e()] : e._e()], 2) : e._e()], 2);
|
|
321
|
-
}, K = [], W = /* @__PURE__ */ o(
|
|
322
|
-
H,
|
|
323
|
-
q,
|
|
324
|
-
K,
|
|
325
|
-
!1,
|
|
326
|
-
null,
|
|
327
|
-
"31fc528c"
|
|
328
|
-
);
|
|
329
|
-
const x = W.exports, G = {
|
|
330
|
-
name: "SenderBlockItem",
|
|
331
|
-
i18nOptions: {
|
|
332
|
-
namespaces: "senderBlockItem",
|
|
333
|
-
messages: {
|
|
334
|
-
en: {
|
|
335
|
-
toggle: {
|
|
336
|
-
label: "Sign the document",
|
|
337
|
-
description: "Toggle to add your own signature to the document."
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
sv: {
|
|
341
|
-
toggle: {
|
|
342
|
-
label: "Signera dokumentet",
|
|
343
|
-
description: "Aktivera för att lägga till din signatur på dokumentet."
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
},
|
|
348
|
-
components: {
|
|
349
|
-
RecipientBlockItem: x,
|
|
350
|
-
CDropdownItem: y
|
|
351
|
-
},
|
|
352
|
-
mixins: [
|
|
353
|
-
d(["senderClient"], {
|
|
354
|
-
useEmit: !1,
|
|
355
|
-
setFnName: "setFormValue"
|
|
356
|
-
})
|
|
357
|
-
],
|
|
358
|
-
inject: {
|
|
359
|
-
allowSenderSign: {
|
|
360
|
-
default: !0
|
|
361
|
-
}
|
|
362
|
-
},
|
|
363
|
-
props: {
|
|
364
|
-
setFormValue: {
|
|
365
|
-
type: Function,
|
|
366
|
-
required: !0
|
|
367
|
-
},
|
|
368
|
-
defaultAddSenderClient: {
|
|
369
|
-
type: Boolean,
|
|
370
|
-
default: !1
|
|
371
|
-
}
|
|
372
|
-
},
|
|
373
|
-
data() {
|
|
374
|
-
return {
|
|
375
|
-
senderClientData: null
|
|
376
|
-
};
|
|
377
|
-
},
|
|
378
|
-
computed: {
|
|
379
|
-
...c({
|
|
380
|
-
feature: "application/feature"
|
|
381
|
-
})
|
|
382
|
-
},
|
|
383
|
-
created() {
|
|
384
|
-
this.generateSenderClient(), this._document.id || this._document.isDirty("senderClient") ? this.toggleSenderSign(!!this.senderClient) : this.defaultAddSenderClient && this.toggleSenderSign(!0);
|
|
385
|
-
},
|
|
386
|
-
methods: {
|
|
387
|
-
get: l,
|
|
388
|
-
generateSenderClient() {
|
|
389
|
-
const { company: n, user: e } = this._document.sender || {}, t = l(
|
|
390
|
-
this._document,
|
|
391
|
-
"data.defaultAnswerMethod"
|
|
392
|
-
);
|
|
393
|
-
this.senderClientData = {
|
|
394
|
-
...b(),
|
|
395
|
-
documentRole: "recipient",
|
|
396
|
-
...t && { answerMethod: t },
|
|
397
|
-
...this.senderClient,
|
|
398
|
-
// latest sender values in the document
|
|
399
|
-
type: "company",
|
|
400
|
-
companyName: n.name,
|
|
401
|
-
name: e.name,
|
|
402
|
-
email: e.email,
|
|
403
|
-
cellphone: e.cellphone
|
|
404
|
-
};
|
|
405
|
-
},
|
|
406
|
-
toggleSenderSign(n) {
|
|
407
|
-
this.senderClientData.documentRole = n ? "signee" : "recipient", this.senderClient = n ? this.senderClientData : null, this._document.setDirty("senderClient");
|
|
408
|
-
},
|
|
409
|
-
setSenderMethod(n) {
|
|
410
|
-
const e = {
|
|
411
|
-
...this.senderClient,
|
|
412
|
-
answerMethod: {
|
|
413
|
-
accept: n,
|
|
414
|
-
deny: "button"
|
|
415
|
-
}
|
|
416
|
-
};
|
|
417
|
-
this.senderClient = e, this.senderClientData = { ...e };
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
var Y = function() {
|
|
422
|
-
var e = this, t = e._self._c;
|
|
423
|
-
return e.senderClientData ? t("RecipientBlockItem", { staticClass: "first-of-group last-of-group", staticStyle: { display: "inline-flex", width: "auto", "padding-right": "2em", "min-width": "220px" }, attrs: { client: e.senderClientData, "right-button": e.allowSenderSign, "is-sender": !0 }, scopedSlots: e._u([{ key: "dropdownOptions", fn: function() {
|
|
424
|
-
return [t("CDropdownItem", { attrs: { value: !!e.senderClient, "close-on-click": !1, toggle: "" }, on: { input: e.toggleSenderSign } }, [e._v(" " + e._s(e.$t("toggle.label")) + " ")]), e.senderClient ? [t("CDropdownItem", { attrs: { separator: "" } }), t("div", { staticClass: "text-gray-400", staticStyle: { "font-size": "13px", padding: "calc(0.5 * var(--rem)) 0 calc(0.25 * var(--rem))", "font-weight": "500" } }, [e._v(" " + e._s(e.$t("_common:signMethod.title")) + " ")]), e._l([
|
|
425
|
-
"login",
|
|
426
|
-
"signature",
|
|
427
|
-
...e.feature("bankId") ? ["bankId"] : []
|
|
428
|
-
], function(s) {
|
|
429
|
-
return t("CDropdownItem", { key: s, attrs: { "icon-right": e.get(e.senderClient, "answerMethod.accept") === s ? "check" : "" }, on: { click: function(i) {
|
|
430
|
-
return e.setSenderMethod(s);
|
|
431
|
-
} } }, [e._v(" " + e._s(e.$t(`_common:signMethod.${s}`)) + " ")]);
|
|
432
|
-
})] : t("div", { staticClass: "bg-gray-100 text-gray-700", staticStyle: { padding: "calc(0.5 * var(--rem))", margin: "calc(0.5 * var(--rem))", "font-size": "13px", "border-radius": "4px", "line-height": "1.25", "font-weight": "500" } }, [e._v(" " + e._s(e.$t("toggle.description")) + " ")])];
|
|
433
|
-
}, proxy: !0 }], null, !1, 407561968) }) : e._e();
|
|
434
|
-
}, J = [], Q = /* @__PURE__ */ o(
|
|
435
|
-
G,
|
|
436
|
-
Y,
|
|
437
|
-
J,
|
|
438
|
-
!1,
|
|
439
|
-
null,
|
|
440
|
-
"94b566c1"
|
|
441
|
-
);
|
|
442
|
-
const X = Q.exports, Z = {
|
|
443
|
-
name: "RecipientBlock",
|
|
444
|
-
i18nOptions: {
|
|
445
|
-
namespaces: "recipientBlock",
|
|
446
|
-
messages: j
|
|
447
|
-
},
|
|
448
|
-
components: {
|
|
449
|
-
AddClientCallout: V,
|
|
450
|
-
RecipientBlockItem: x,
|
|
451
|
-
SenderBlockItem: X,
|
|
452
|
-
CSwitch: F
|
|
453
|
-
},
|
|
454
|
-
mixins: [
|
|
455
|
-
d(["clients"], {
|
|
456
|
-
useEmit: !1,
|
|
457
|
-
setFnName: "setFormValue"
|
|
458
|
-
})
|
|
459
|
-
],
|
|
460
|
-
props: {
|
|
461
|
-
compact: {
|
|
462
|
-
type: Boolean,
|
|
463
|
-
default: !1
|
|
464
|
-
},
|
|
465
|
-
setFormValue: {
|
|
466
|
-
type: Function,
|
|
467
|
-
required: !0
|
|
468
|
-
},
|
|
469
|
-
removeFormValue: {
|
|
470
|
-
type: Function,
|
|
471
|
-
required: !0
|
|
472
|
-
},
|
|
473
|
-
defaultAddSenderClient: {
|
|
474
|
-
type: Boolean,
|
|
475
|
-
default: !1
|
|
476
|
-
},
|
|
477
|
-
allowEditClients: {
|
|
478
|
-
type: Boolean,
|
|
479
|
-
default: !0
|
|
480
|
-
},
|
|
481
|
-
isPublicForm: {
|
|
482
|
-
type: Boolean,
|
|
483
|
-
default: !1
|
|
484
|
-
}
|
|
485
|
-
},
|
|
486
|
-
computed: {
|
|
487
|
-
sortedClients() {
|
|
488
|
-
return [...this.clients].map((n, e) => ({ ...n, index: e })).sort((n, e) => n.signOrder - e.signOrder);
|
|
489
|
-
},
|
|
490
|
-
maxSignOrder() {
|
|
491
|
-
if (!this.useSignOrder || this.sortedClients.length === 0)
|
|
492
|
-
return 0;
|
|
493
|
-
const { signOrder: n } = this.sortedClients[this.sortedClients.length - 1];
|
|
494
|
-
return n;
|
|
495
|
-
},
|
|
496
|
-
useSignOrder() {
|
|
497
|
-
return l(this._document, "useSignOrder", !1);
|
|
498
|
-
},
|
|
499
|
-
getView() {
|
|
500
|
-
return k.value;
|
|
501
|
-
}
|
|
502
|
-
},
|
|
503
|
-
methods: {
|
|
504
|
-
onMoveRecipient({ index: n, direction: e }) {
|
|
505
|
-
this.clients = D(this.clients).set(
|
|
506
|
-
{
|
|
507
|
-
...this.clients[n],
|
|
508
|
-
signOrder: Math.max(this.clients[n].signOrder + e, 0)
|
|
509
|
-
},
|
|
510
|
-
n
|
|
511
|
-
);
|
|
512
|
-
},
|
|
513
|
-
toggleSignOrder(n) {
|
|
514
|
-
let e = [];
|
|
515
|
-
if (n) {
|
|
516
|
-
const t = !this.clients.every(
|
|
517
|
-
({ signOrder: s }) => !s
|
|
518
|
-
);
|
|
519
|
-
this.clients = this.clients.map((s, i) => ({
|
|
520
|
-
...s,
|
|
521
|
-
signOrder: t ? s.signOrder : i + 1
|
|
522
|
-
}));
|
|
523
|
-
} else
|
|
524
|
-
e = l(this._document, "template.reminders", []), e.length || (e = g.default);
|
|
525
|
-
this.setFormValue({ key: "data.reminders", value: e }), this.setFormValue({ key: "useSignOrder", value: n });
|
|
526
|
-
},
|
|
527
|
-
removeClient(n) {
|
|
528
|
-
this.removeFormValue(`clients[${n}]`);
|
|
529
|
-
},
|
|
530
|
-
openClientModal(n = 0) {
|
|
531
|
-
var t;
|
|
532
|
-
const e = l(this, `clients[${n}].signOrder`);
|
|
533
|
-
this.$modal.show(O, {
|
|
534
|
-
documentClientIndex: n,
|
|
535
|
-
...this.useSignOrder && {
|
|
536
|
-
signOrder: M(e) === "number" ? e : this.maxSignOrder + 1
|
|
537
|
-
},
|
|
538
|
-
signOptions: (t = this._document) == null ? void 0 : t.signOptions,
|
|
539
|
-
setFormValue: this.setFormValue,
|
|
540
|
-
removeFormValue: this.removeFormValue,
|
|
541
|
-
isPublicForm: this.isPublicForm
|
|
542
|
-
});
|
|
543
|
-
},
|
|
544
|
-
setClient(n) {
|
|
545
|
-
this.setFormValue({ key: `clients[${this.clients.length}]`, value: n });
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
};
|
|
549
|
-
var U = function() {
|
|
550
|
-
var e = this, t = e._self._c;
|
|
551
|
-
return t("div", [e.compact ? e._e() : [t("div", { staticClass: "pb-0.5 text-xs font-medium text-gray-900" }, [e._v(" " + e._s(e.$t("_common:from").capitalize()) + ": ")]), t("SenderBlockItem", { attrs: { _document: e._document, _value: { senderClient: "senderClient" }, "set-form-value": e.setFormValue, "default-add-sender-client": e.defaultAddSenderClient } })], t("div", { staticClass: "block-title flex pb-0.5 pt-2 text-xs text-gray-500", class: { "block-title__line": !e.compact } }, [e.compact ? e._e() : t("div", { staticClass: "font-medium text-gray-900" }, [e._v(" " + e._s(e.$t("_common:to").capitalize()) + ": ")]), e.clients && e.clients.length ? t("div", { staticClass: "ml-auto inline-flex items-center justify-end" }, [t("CIcon", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("signOrder.tooltip"), expression: "$t('signOrder.tooltip')" }], staticClass: "mr-1", attrs: { type: "info", size: "14" } }), t("div", { staticClass: "mr-2 font-medium" }, [e._v(" " + e._s(e.$t("signOrder.label")) + " ")]), t("CSwitch", { staticClass: "!mr-0", attrs: { value: e.useSignOrder, size: "tiny", type: "success" }, on: { input: e.toggleSignOrder } })], 1) : e._e()]), e.clients && e.clients.length ? [e.useSignOrder ? t("transition-group", { staticClass: "list-move", attrs: { name: "list-move" } }, [e._l(e.sortedClients, function(s, i) {
|
|
552
|
-
return [i > 0 && s.signOrder !== e.sortedClients[i - 1].signOrder ? t("div", { key: i, staticClass: "h-2 pl-6" }, [t("div", { staticClass: "bg-primary-500 h-full w-0.5 rounded-sm" })]) : e._e(), t("div", { key: s._uniqueId, staticClass: "mb-0.5 mt-px" }, [t("RecipientBlockItem", { class: {
|
|
553
|
-
"first-of-group": i === 0 || i > 0 && s.signOrder !== e.sortedClients[i - 1].signOrder,
|
|
554
|
-
"last-of-group": i === e.sortedClients.length - 1 || e.sortedClients[i + 1] && s.signOrder !== e.sortedClients[i + 1].signOrder
|
|
555
|
-
}, attrs: { client: s, "is-order": e.useSignOrder, compact: e.compact, "allow-edit-clients": e.allowEditClients }, on: { move: function(a) {
|
|
556
|
-
return e.onMoveRecipient({ index: s.index, direction: a });
|
|
557
|
-
}, open: function(a) {
|
|
558
|
-
return e.openClientModal(s.index);
|
|
559
|
-
}, remove: function(a) {
|
|
560
|
-
return e.removeClient(s.index);
|
|
561
|
-
} } })], 1)];
|
|
562
|
-
})], 2) : e._l(e.clients, function(s, i) {
|
|
563
|
-
return t("RecipientBlockItem", { key: s._uniqueId, staticClass: "mb-0.5 mt-px", class: {
|
|
564
|
-
"first-of-group": i === 0,
|
|
565
|
-
"last-of-group": i === e.clients.length - 1
|
|
566
|
-
}, attrs: { "is-order": e.useSignOrder, compact: e.compact, "allow-edit-clients": e.allowEditClients, client: s }, on: { open: function(a) {
|
|
567
|
-
return e.openClientModal(i);
|
|
568
|
-
}, remove: function(a) {
|
|
569
|
-
return e.removeClient(i);
|
|
570
|
-
} } });
|
|
571
|
-
}), !e.compact && e.allowEditClients ? t("CButton", { staticClass: "is-thinner !text-sm", attrs: { type: "secondary", pattern: "tertiary", "icon-left": "plus", size: "normal" }, on: { click: function(s) {
|
|
572
|
-
return e.openClientModal(e.clients.length);
|
|
573
|
-
} } }, [e._v(" " + e._s(e.$t("addButton")) + " ")]) : e._e()] : (e.getView === "widget" || e.viewSettings.isPublicForm) && e.allowEditClients ? t("CButton", { staticClass: "!px-4 font-medium", attrs: { type: "secondary", raised: "", size: "small", taller: "", "icon-left": "person" }, on: { click: function(s) {
|
|
574
|
-
return e.openClientModal(e.clients.length);
|
|
575
|
-
} } }, [e._v(" " + e._s(e.$t("addFirstButton")) + " ")]) : !e.compact && e.allowEditClients ? t("AddClientCallout", { attrs: { compact: !0 }, on: { add: function(s) {
|
|
576
|
-
return e.openClientModal(e.clients.length);
|
|
577
|
-
}, setClient: e.setClient } }) : e._e()], 2);
|
|
578
|
-
}, ee = [], te = /* @__PURE__ */ o(
|
|
579
|
-
Z,
|
|
580
|
-
U,
|
|
581
|
-
ee,
|
|
582
|
-
!1,
|
|
583
|
-
null,
|
|
584
|
-
"e4291b52"
|
|
585
|
-
);
|
|
586
|
-
const ne = te.exports, se = {
|
|
587
|
-
name: "DocumentSendReminderItem",
|
|
588
|
-
props: {
|
|
589
|
-
label: {
|
|
590
|
-
type: String,
|
|
591
|
-
required: !0
|
|
592
|
-
},
|
|
593
|
-
value: {
|
|
594
|
-
type: [Number, String],
|
|
595
|
-
default: 0
|
|
596
|
-
},
|
|
597
|
-
done: {
|
|
598
|
-
type: Boolean,
|
|
599
|
-
default: !1
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
};
|
|
603
|
-
var ie = function() {
|
|
604
|
-
var e = this, t = e._self._c;
|
|
605
|
-
return t("div", { staticClass: "mb-4 flex min-h-[2.5em] select-none items-center rounded-md bg-gray-100 px-4 py-2 text-sm font-medium" }, [t("div", { staticClass: "mr-6 flex-auto select-none text-gray-700" }, [e._v(" " + e._s(e.label) + " ")]), t("div", { staticClass: "flex flex-nowrap items-center justify-center text-sm" }, [e.done ? t("span", { staticClass: "text-green-500" }, [t("CIcon", { attrs: { type: "check", size: "18" } }), e._v(" " + e._s(e.$t("sent")) + " ")], 1) : [t("CButton", { staticClass: "!h-6 !w-6 bg-white", attrs: { icon: "minus", size: "small", circle: "", raised: "" }, on: { click: function(s) {
|
|
606
|
-
e.$emit("input", Math.max(e.value - 1, 0));
|
|
607
|
-
} } }), t("div", { staticClass: "min-w-[8ch] py-4 text-center text-sm font-medium text-gray-800" }, [e.value ? [e._v(" " + e._s(e.$tc("day", { count: Number(e.value) })) + " ")] : t("span", { staticClass: "text-xs text-gray-500" }, [e._v(" " + e._s(e.$t("disabled").capitalize()) + " ")])], 2), t("CButton", { staticClass: "!h-6 !w-6 bg-white", attrs: { icon: "plus", size: "small", circle: "", raised: "" }, on: { click: function(s) {
|
|
608
|
-
return e.$emit("input", e.value + 1);
|
|
609
|
-
} } })]], 2)]);
|
|
610
|
-
}, re = [], ae = /* @__PURE__ */ o(
|
|
611
|
-
se,
|
|
612
|
-
ie,
|
|
613
|
-
re,
|
|
614
|
-
!1,
|
|
615
|
-
null,
|
|
616
|
-
null
|
|
617
|
-
);
|
|
618
|
-
const oe = ae.exports, le = {
|
|
619
|
-
name: "DocumentSendReminders",
|
|
620
|
-
i18nOptions: {
|
|
621
|
-
namespaces: "documentSendReminders",
|
|
622
|
-
messages: {
|
|
623
|
-
en: {
|
|
624
|
-
description: "Edit when smart reminders should be sent to client",
|
|
625
|
-
notViewed: "Not viewed after",
|
|
626
|
-
notAnswered: "No reply after",
|
|
627
|
-
expires: "When expiration date is within"
|
|
628
|
-
},
|
|
629
|
-
sv: {
|
|
630
|
-
description: "Ställ in när smarta påminnelser ska skickas ut till mottagaren",
|
|
631
|
-
notViewed: "Inte öppnat efter",
|
|
632
|
-
notAnswered: "Inte svarat efter",
|
|
633
|
-
expires: "När giltighetstiden är inom"
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
},
|
|
637
|
-
components: {
|
|
638
|
-
DocumentSendReminderItem: oe
|
|
639
|
-
},
|
|
640
|
-
mixins: [d()],
|
|
641
|
-
props: {
|
|
642
|
-
setFormValue: {
|
|
643
|
-
type: Function,
|
|
644
|
-
required: !0
|
|
645
|
-
},
|
|
646
|
-
removeFormValue: {
|
|
647
|
-
type: Function,
|
|
648
|
-
required: !0
|
|
649
|
-
}
|
|
650
|
-
},
|
|
651
|
-
computed: {
|
|
652
|
-
reminders() {
|
|
653
|
-
const n = {
|
|
654
|
-
first: null,
|
|
655
|
-
notViewed: null,
|
|
656
|
-
notAnswered: null,
|
|
657
|
-
expires: null
|
|
658
|
-
};
|
|
659
|
-
return this._document.reminders.forEach((e, t) => {
|
|
660
|
-
e.type === "first" ? n.first = { ...e, index: t } : e.type === "viewed" ? n.notViewed = { ...e, index: t } : e.type === "expires" ? n.expires = { ...e, index: t } : n.notAnswered = { ...e, index: t };
|
|
661
|
-
}), n;
|
|
662
|
-
}
|
|
663
|
-
},
|
|
664
|
-
methods: {
|
|
665
|
-
getDefaultReminders() {
|
|
666
|
-
if (!this._document.template)
|
|
667
|
-
return [];
|
|
668
|
-
const n = this._document.template.getDefaultData({
|
|
669
|
-
path: "properties.data.properties.reminders"
|
|
670
|
-
});
|
|
671
|
-
return n && Array.isArray(n) ? n : [];
|
|
672
|
-
},
|
|
673
|
-
setReminder(n, e) {
|
|
674
|
-
let t = "sendDays";
|
|
675
|
-
if (typeof e == "string" && (t = "sendAt"), !e) {
|
|
676
|
-
this.removeFormValue(`data.reminders[${n.index}]`);
|
|
677
|
-
return;
|
|
678
|
-
}
|
|
679
|
-
if (typeof n == "string") {
|
|
680
|
-
let s = this.getDefaultReminders().find(
|
|
681
|
-
(i) => i.type === n
|
|
682
|
-
);
|
|
683
|
-
if (s || (s = g.default.find((i) => i.type === n)), !s)
|
|
684
|
-
throw new Error("Could not find default reminder");
|
|
685
|
-
s[t] = e, this.setFormValue({ key: "data.reminders", value: s });
|
|
686
|
-
return;
|
|
687
|
-
}
|
|
688
|
-
this.setFormValue({
|
|
689
|
-
key: `data.reminders[${n.index}].${t}`,
|
|
690
|
-
value: e
|
|
691
|
-
});
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
};
|
|
695
|
-
var de = function() {
|
|
696
|
-
var e = this, t = e._self._c;
|
|
697
|
-
return t("div", { staticStyle: { "background-color": "white", "border-radius": "calc(0.5 * var(--rem))", padding: "calc(2 * var(--rem))", "font-size": "16px" } }, [t("div", { staticStyle: { "font-size": "1.25em", "font-weight": "700", "margin-bottom": "0.25em", "text-align": "center" } }, [e._v(" " + e._s(e.$t("_common:reminder_plural").capitalize()) + " ")]), t("div", { staticClass: "text-center text-gray-600", staticStyle: { "max-width": "calc(20 * var(--rem))", margin: "0 auto calc(2 * var(--rem)) auto" } }, [e._v(" " + e._s(e.$t("description")) + " ")]), e._l([
|
|
698
|
-
{ type: "notViewed", fallbackKey: "viewed" },
|
|
699
|
-
{ type: "notAnswered", fallbackKey: "reminder" },
|
|
700
|
-
{ type: "expires", fallbackKey: "expires" }
|
|
701
|
-
], function(s, i) {
|
|
702
|
-
return t("DocumentSendReminderItem", { key: i, attrs: { label: e.$t(s.type), value: e.reminders[s.type] ? e.reminders[s.type].sendDays : 0, done: e.reminders[s.type] && e.reminders[s.type].status === "successful" }, on: { input: function(a) {
|
|
703
|
-
return e.setReminder(e.reminders[s.type] || s.fallbackKey, a);
|
|
704
|
-
} } });
|
|
705
|
-
}), t("div", { staticClass: "flex w-full items-center justify-center", staticStyle: { "margin-top": "calc(2.5 * var(--rem))" } }, [t("CButton", { attrs: { type: "secondary", expanded: "" }, on: { click: function(s) {
|
|
706
|
-
return e.$emit("close");
|
|
707
|
-
} } }, [e._v(" " + e._s(e.$t("_common:save")) + " ")])], 1)], 2);
|
|
708
|
-
}, ce = [], me = /* @__PURE__ */ o(
|
|
709
|
-
le,
|
|
710
|
-
de,
|
|
711
|
-
ce,
|
|
712
|
-
!1,
|
|
713
|
-
null,
|
|
714
|
-
null
|
|
715
|
-
);
|
|
716
|
-
const ue = me.exports, pe = {
|
|
717
|
-
name: "SendForm",
|
|
718
|
-
i18nOptions: {
|
|
719
|
-
namespaces: "sendForm",
|
|
720
|
-
messages: L
|
|
721
|
-
},
|
|
722
|
-
components: {
|
|
723
|
-
Simplebar: B,
|
|
724
|
-
BaseDatePicker: f,
|
|
725
|
-
RecipientBlock: ne,
|
|
726
|
-
ErrorCallout: A,
|
|
727
|
-
IsPremiumPreStep: S,
|
|
728
|
-
IsPremium: w,
|
|
729
|
-
CDropdown: h,
|
|
730
|
-
CDropdownItem: y,
|
|
731
|
-
CRadio: I
|
|
732
|
-
},
|
|
733
|
-
mixins: [
|
|
734
|
-
d(
|
|
735
|
-
["expiresAt", "clients", "defaultAnswerMethod", "reminders", "name"],
|
|
736
|
-
{
|
|
737
|
-
useEmit: !1,
|
|
738
|
-
setFnName: "setFormValue"
|
|
739
|
-
}
|
|
740
|
-
)
|
|
741
|
-
],
|
|
742
|
-
props: {
|
|
743
|
-
showName: {
|
|
744
|
-
type: Boolean,
|
|
745
|
-
default: !0
|
|
746
|
-
},
|
|
747
|
-
showSave: {
|
|
748
|
-
type: Boolean,
|
|
749
|
-
default: !0
|
|
750
|
-
},
|
|
751
|
-
showSchedule: {
|
|
752
|
-
type: Boolean,
|
|
753
|
-
default: !0
|
|
754
|
-
},
|
|
755
|
-
allowManualDelivery: {
|
|
756
|
-
type: Boolean,
|
|
757
|
-
default: !0
|
|
758
|
-
},
|
|
759
|
-
allowEditClients: {
|
|
760
|
-
type: Boolean,
|
|
761
|
-
default: !0
|
|
762
|
-
},
|
|
763
|
-
setFormValue: {
|
|
764
|
-
type: Function,
|
|
765
|
-
required: !0
|
|
766
|
-
},
|
|
767
|
-
removeFormValue: {
|
|
768
|
-
type: Function,
|
|
769
|
-
required: !0
|
|
770
|
-
},
|
|
771
|
-
useScroll: {
|
|
772
|
-
type: Boolean,
|
|
773
|
-
default: !1
|
|
774
|
-
},
|
|
775
|
-
onSaveDocument: {
|
|
776
|
-
type: Function,
|
|
777
|
-
required: !0
|
|
778
|
-
}
|
|
779
|
-
},
|
|
780
|
-
data() {
|
|
781
|
-
return {
|
|
782
|
-
localIsPosting: !1,
|
|
783
|
-
clientHoverIndex: null
|
|
784
|
-
};
|
|
785
|
-
},
|
|
786
|
-
computed: {
|
|
787
|
-
...c({
|
|
788
|
-
deliveryTypes: "forms/deliveryTypes",
|
|
789
|
-
isPostingDocument: "documents2/isPosting",
|
|
790
|
-
documentSenderSign: "settings/documentSenderSign",
|
|
791
|
-
// todo: could be moved to load form action
|
|
792
|
-
getCompanySetting: "settings/getCompanySetting",
|
|
793
|
-
feature: "application/feature"
|
|
794
|
-
}),
|
|
795
|
-
isPosting() {
|
|
796
|
-
return this.isPostingDocument || this.localIsPosting;
|
|
797
|
-
},
|
|
798
|
-
isPublicForm() {
|
|
799
|
-
return !!(this.viewSettings && this.viewSettings.isPublicForm);
|
|
800
|
-
},
|
|
801
|
-
useSignOrder() {
|
|
802
|
-
var n;
|
|
803
|
-
return ((n = this._document) == null ? void 0 : n.useSignOrder) || !1;
|
|
804
|
-
},
|
|
805
|
-
noOfReminders() {
|
|
806
|
-
return Object.values(this.reminders || []).reduce(
|
|
807
|
-
(n, e) => e && (e.sendDays || e.sendAt) && e.type !== "first" ? n + 1 : n,
|
|
808
|
-
0
|
|
809
|
-
);
|
|
810
|
-
},
|
|
811
|
-
smsActivated() {
|
|
812
|
-
return this.deliveryTypes.sms;
|
|
813
|
-
},
|
|
814
|
-
emailActivated() {
|
|
815
|
-
return this.deliveryTypes.email;
|
|
816
|
-
},
|
|
817
|
-
isManualDelivery() {
|
|
818
|
-
return !this.smsActivated && !this.emailActivated;
|
|
819
|
-
},
|
|
820
|
-
sendTypesText() {
|
|
821
|
-
return this.emailActivated || this.smsActivated ? [
|
|
822
|
-
...this.emailActivated ? [this.$t("_common:email").capitalize()] : [],
|
|
823
|
-
...this.smsActivated ? [this.$t("_common:sms")] : []
|
|
824
|
-
].join(" & ") : this._document.isDirty("isManualDelivery") && this.clients.length ? this.$t("manualDelivery") : " ";
|
|
825
|
-
},
|
|
826
|
-
clientsAreMissingContactInfo() {
|
|
827
|
-
return this.isManualDelivery ? !1 : this.clients.some((n) => !(n.email || n.cellphone));
|
|
828
|
-
},
|
|
829
|
-
signMethods() {
|
|
830
|
-
var n, e;
|
|
831
|
-
return ((e = (n = this._document.signOptions) == null ? void 0 : n.filter((t) => t !== "inPerson")) == null ? void 0 : e.map((t) => ({
|
|
832
|
-
value: t,
|
|
833
|
-
title: this.$t(`signMethod.${t}.title`),
|
|
834
|
-
content: this.$t(`signMethod.${t}.content`)
|
|
835
|
-
}))) || [];
|
|
836
|
-
}
|
|
837
|
-
},
|
|
838
|
-
created() {
|
|
839
|
-
var n;
|
|
840
|
-
if (!this.expiresAt && !this._document.isDirty("expiresAt")) {
|
|
841
|
-
const e = this.getCompanySetting("defaultExpireDays");
|
|
842
|
-
if (e && Number.isInteger(e) && e > 0) {
|
|
843
|
-
const t = /* @__PURE__ */ new Date();
|
|
844
|
-
t.setDate(t.getDate() + e), this.setField({
|
|
845
|
-
field: "expiresAt",
|
|
846
|
-
value: t.toISOString(),
|
|
847
|
-
options: { ignoreChanges: !0 }
|
|
848
|
-
});
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
if (((n = this.defaultAnswerMethod) == null ? void 0 : n.accept) === "button") {
|
|
852
|
-
const [e] = this._document.signOptions || ["signature"];
|
|
853
|
-
this.setAnswerMethod(e, { ignoreChanges: !0 });
|
|
854
|
-
}
|
|
855
|
-
},
|
|
856
|
-
validations() {
|
|
857
|
-
const n = {
|
|
858
|
-
clients: {
|
|
859
|
-
required: (e) => e && e.length
|
|
860
|
-
}
|
|
861
|
-
};
|
|
862
|
-
return !this.allowManualDelivery && this.clients.length && (n.isManualDelivery = {
|
|
863
|
-
checked: (e) => !e
|
|
864
|
-
}), n;
|
|
865
|
-
},
|
|
866
|
-
methods: {
|
|
867
|
-
async doSaveDocument({ doSend: n }) {
|
|
868
|
-
try {
|
|
869
|
-
this.localIsPosting = !0, await this.onSaveDocument({ doSend: n });
|
|
870
|
-
} finally {
|
|
871
|
-
this.localIsPosting = !1;
|
|
872
|
-
}
|
|
873
|
-
},
|
|
874
|
-
async doSendDocument() {
|
|
875
|
-
var n;
|
|
876
|
-
this.$v.$touch(), !this.$v.$invalid && (["denied", "expired", "voided"].includes((n = this._document) == null ? void 0 : n.status) && this.resetDeniedDocument(), await this.doSaveDocument({ doSend: !0 }));
|
|
877
|
-
},
|
|
878
|
-
setDeliveryMethod(n, e) {
|
|
879
|
-
const t = this.deliveryTypes;
|
|
880
|
-
t[n] = e;
|
|
881
|
-
const s = Object.keys(t).filter((i) => t[i]);
|
|
882
|
-
(this.clients || []).forEach((i, a) => {
|
|
883
|
-
this.setFormValue({
|
|
884
|
-
key: `clients[${a}].deliveryTypes`,
|
|
885
|
-
value: s
|
|
886
|
-
});
|
|
887
|
-
});
|
|
888
|
-
},
|
|
889
|
-
setAnswerMethod(n, e = {}) {
|
|
890
|
-
this.setField({
|
|
891
|
-
field: "defaultAnswerMethod",
|
|
892
|
-
value: { ...this.defaultAnswerMethod, accept: n },
|
|
893
|
-
options: e
|
|
894
|
-
}), (this.clients || []).forEach((t, s) => {
|
|
895
|
-
var i;
|
|
896
|
-
((i = t.answerMethod) == null ? void 0 : i.accept) !== "inPerson" && this.setField({
|
|
897
|
-
key: `clients[${s}].answerMethod.accept`,
|
|
898
|
-
value: n,
|
|
899
|
-
options: e
|
|
900
|
-
});
|
|
901
|
-
});
|
|
902
|
-
},
|
|
903
|
-
openReminders() {
|
|
904
|
-
this.useSignOrder || this.$modal.show(
|
|
905
|
-
ue,
|
|
906
|
-
{
|
|
907
|
-
_document: this._document,
|
|
908
|
-
setFormValue: this.setFormValue,
|
|
909
|
-
removeFormValue: this.removeFormValue
|
|
910
|
-
},
|
|
911
|
-
{
|
|
912
|
-
adaptive: !0,
|
|
913
|
-
height: "auto",
|
|
914
|
-
width: "90%",
|
|
915
|
-
maxWidth: 360
|
|
916
|
-
}
|
|
917
|
-
);
|
|
918
|
-
},
|
|
919
|
-
openSendLater() {
|
|
920
|
-
this.$v.$touch(), !this.$v.$invalid && this.$modal.show(
|
|
921
|
-
N,
|
|
922
|
-
{
|
|
923
|
-
_document: this._document,
|
|
924
|
-
setFormValue: this.setFormValue,
|
|
925
|
-
removeFormValue: this.removeFormValue,
|
|
926
|
-
onSaveDocument: this.doSaveDocument
|
|
927
|
-
},
|
|
928
|
-
{
|
|
929
|
-
adaptive: !0,
|
|
930
|
-
height: "auto",
|
|
931
|
-
width: "90%",
|
|
932
|
-
maxWidth: 360
|
|
933
|
-
}
|
|
934
|
-
);
|
|
935
|
-
},
|
|
936
|
-
resetDeniedDocument() {
|
|
937
|
-
(this.clients || []).forEach((n, e) => {
|
|
938
|
-
this.setFormValue({ key: `clients[${e}].answer`, value: null });
|
|
939
|
-
}), this.setFormValue({ key: "data.rejectReasons", value: [] }), this.setFormValue({ key: "status", value: "sent" });
|
|
940
|
-
},
|
|
941
|
-
shouldShowUpgradeModal({ canUseBankId: n, canUseSms: e }) {
|
|
942
|
-
var t;
|
|
943
|
-
return !!(this.smsActivated && !e || ((t = this.defaultAnswerMethod) == null ? void 0 : t.accept) === "bankId" && !n);
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
};
|
|
947
|
-
var ve = function() {
|
|
948
|
-
var e = this, t = e._self._c;
|
|
949
|
-
return t("IsPremium", { scopedSlots: e._u([{ key: "default", fn: function({ canUseBankId: s, canUseSms: i }) {
|
|
950
|
-
var a;
|
|
951
|
-
return [t("div", { staticClass: "@container flex h-full flex-col" }, [t(e.useScroll ? "Simplebar" : "div", { tag: "component", staticClass: "main-container" }, [t("div", { staticClass: "@md:px-8 @md:pb-8 @xl:px-16 @xl:pb-16 relative px-4 pb-4 pt-6" }, [t("div", { staticClass: "pb-4 text-lg font-bold" }, [e._v(" " + e._s(e.$t("title")) + " ")]), e.showName ? t("div", { staticClass: "mb-6" }, [t("div", { staticClass: "pb-0.5 text-xs font-medium text-gray-900" }, [e._v(" " + e._s(e.$t("nameLabel")) + " ")]), t("CInput", { attrs: { placeholder: e.$t("namePlaceholder"), filled: "" }, model: { value: e.name, callback: function(r) {
|
|
952
|
-
e.name = r;
|
|
953
|
-
}, expression: "name" } })], 1) : e._e(), t("div", { staticClass: "mb-6" }, [t("RecipientBlock", { attrs: { _value: {
|
|
954
|
-
clients: "clients"
|
|
955
|
-
}, _document: e._document, "set-form-value": e.setFormValue, "remove-form-value": e.removeFormValue, "default-add-sender-client": e.documentSenderSign, "allow-edit-clients": e.allowEditClients, "is-public-form": e.isPublicForm } })], 1), e._t("default"), e.defaultAnswerMethod && e.signMethods.length > 1 ? t("div", { staticClass: "mb-8" }, [t("div", { staticClass: "block-title pb-0.5 text-xs font-medium text-gray-900" }, [e._v(" " + e._s(e.$t("signMethod.title")) + " "), t("CIcon", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("signMethod.tooltip"), expression: "$t('signMethod.tooltip')" }], staticClass: "ml-px text-gray-500", attrs: { type: "info", size: "14" } })], 1), t("div", { staticClass: "cb-card-group" }, e._l(e.signMethods, function(r) {
|
|
956
|
-
return t("div", { key: r.value, staticClass: "cb-card flex border-2 border-transparent hover:border-gray-300/30 hover:bg-gray-200", class: {
|
|
957
|
-
checked: e.defaultAnswerMethod.accept === r.value
|
|
958
|
-
}, on: { click: function(m) {
|
|
959
|
-
e.defaultAnswerMethod.accept !== r.value && e.setAnswerMethod(r.value);
|
|
960
|
-
} } }, [t("CRadio", { staticClass: "sign-radio pointer-events-none mr-3", attrs: { value: e.defaultAnswerMethod.accept, "native-value": r.value, type: "secondary", size: "small" } }), t("div", { staticClass: "flex-grow" }, [t("div", { staticClass: "cb-card-title flex items-center justify-between" }, [e._v(" " + e._s(r.title) + " "), r.value === "bankId" && !s ? t("div", { staticClass: "bg-primary-500 ml-2 rounded-full px-1.5 py-1 text-[10px] font-semibold leading-none text-white" }, [e._v(" Pro ")]) : e._e()]), t("div", { directives: [{ name: "show", rawName: "v-show", value: e.defaultAnswerMethod.accept === r.value, expression: "defaultAnswerMethod.accept === signMethod.value" }], staticClass: "cb-card-body" }, [e._v(" " + e._s(r.content) + " ")])])], 1);
|
|
961
|
-
}), 0)]) : e._e(), t("div", { staticClass: "grid items-center gap-2", staticStyle: { "grid-template-columns": "repeat(auto-fit, minmax(200px, 1fr))" } }, [t("div", [t("BaseDatePicker", { staticClass: "psuedo-input relative", attrs: { "custom-el": !0, direction: "end", tabindex: "0" }, model: { value: e.expiresAt, callback: function(r) {
|
|
962
|
-
e.expiresAt = r;
|
|
963
|
-
}, expression: "expiresAt" } }, [t("div", { staticClass: "psuedo-input-label" }, [e._v(e._s(e.$t("validityPeriod")))]), t("div", [e._v(" " + e._s(e.expiresAt ? e.$formatDate(e.expiresAt) : e.$t("_common:disabled").capitalize()) + " ")]), e.expiresAt ? t("CButton", { staticClass: "absolute right-3 top-3 z-10", attrs: { icon: "x", size: "small", type: "none", pattern: "secondary" }, on: { click: function(r) {
|
|
964
|
-
r.preventDefault(), r.stopPropagation(), e.expiresAt = void 0, e._document.setDirty("expiresAt");
|
|
965
|
-
} } }) : e._e()], 1)], 1), t("CDropdown", { staticStyle: { flex: "1 0 200px" }, attrs: { disabled: !e.clients.length, "mobile-label": e.$t("sendAs"), expanded: "" }, scopedSlots: e._u([{ key: "trigger", fn: function() {
|
|
966
|
-
return [t("div", { staticClass: "psuedo-input", attrs: { tabindex: "0" } }, [t("div", { staticClass: "psuedo-input-label" }, [e._v(e._s(e.$t("sendAs")))]), t("div", { domProps: { innerHTML: e._s(e.sendTypesText) } })])];
|
|
967
|
-
}, proxy: !0 }], null, !0) }, [t("CDropdownItem", { attrs: { value: e.emailActivated, "close-on-click": !1, toggle: "" }, on: { click: function(r) {
|
|
968
|
-
return e.setDeliveryMethod("email", !e.emailActivated);
|
|
969
|
-
} } }, [e._v(" " + e._s(e.$t("_common:email").capitalize()) + " ")]), e.feature("sms") ? t("CDropdownItem", { attrs: { value: e.smsActivated, "close-on-click": !1, toggle: "" }, on: { click: function(r) {
|
|
970
|
-
return e.setDeliveryMethod("sms", !e.smsActivated);
|
|
971
|
-
} } }, [e._v(" " + e._s(e.$t("_common:sms")) + " "), i ? e._e() : t("div", { staticClass: "bg-primary-500 ml-2 rounded-full px-1.5 py-1 text-[10px] font-semibold leading-none text-white" }, [e._v(" Pro ")])]) : e._e(), e.allowManualDelivery ? t("CDropdownItem", { attrs: { value: "", tooltip: {
|
|
972
|
-
content: e.$t("manualDeliveryTooltip")
|
|
973
|
-
} }, domProps: { textContent: e._s(e.$t("manualDelivery")) }, on: { click: () => {
|
|
974
|
-
e.setDeliveryMethod("sms", !1), e.setDeliveryMethod("email", !1), e._document.setDirty("isManualDelivery");
|
|
975
|
-
} } }) : e._e()], 1), !e.useSignOrder && !e.isManualDelivery ? t("div", { staticClass: "psuedo-input relative", attrs: { tabindex: "0" }, on: { click: e.openReminders } }, [t("div", { staticClass: "psuedo-input-label" }, [e._v(" " + e._s(e.$t("_common:reminder_plural").capitalize()) + " ")]), t("div", [e._v(" " + e._s(e.noOfReminders ? `${e.noOfReminders} ${e.$i18n.lang === "sv" ? e.$t("_common:unitType.unit") : ""}` : e.$t("_common:disabled").capitalize()) + " ")]), e.noOfReminders ? t("CButton", { staticClass: "absolute right-3 top-3", attrs: { icon: "x", size: "small", type: "none", pattern: "secondary" }, on: { click: function(r) {
|
|
976
|
-
r.preventDefault(), r.stopPropagation(), e.reminders = [];
|
|
977
|
-
} } }) : e._e()], 1) : e._e()], 1), e.clientsAreMissingContactInfo || (a = e.$v.isManualDelivery) != null && a.$invalid ? t("ErrorCallout", { attrs: { message: e.clientsAreMissingContactInfo ? e.$t("clientsAreMissingContactInfo") : e.$t("missingDeliveryMethod"), size: "small" } }) : e._e(), e._t("content")], 2)]), t("div", { staticClass: "@md:px-8 @xl:px-16 px-4 pb-4" }, [e._t("send-header"), e._t("send", function() {
|
|
978
|
-
return [t("IsPremiumPreStep", { attrs: { feature: "bankIdAndSms" }, scopedSlots: e._u([{ key: "default", fn: function({ onClick: r }) {
|
|
979
|
-
return [t("div", { staticClass: "flex" }, [e.showSave ? t("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("_common:save", {
|
|
980
|
-
thing: e.$t("_common:document").toLowerCase()
|
|
981
|
-
}), expression: `
|
|
982
|
-
$t('_common:save', {
|
|
983
|
-
thing: $t('_common:document').toLowerCase()
|
|
984
|
-
})
|
|
985
|
-
` }], staticClass: "mr-2 w-12", attrs: { loading: e.isPosting, type: "none", icon: "save", pattern: "secondary" }, on: { click: function(m) {
|
|
986
|
-
return e.doSaveDocument({ doSend: !1 });
|
|
987
|
-
} } }) : e._e(), e.showSchedule && !e.useSignOrder && !e.isManualDelivery ? t("CButton", { staticClass: "@md:w-auto mr-2 w-12", staticStyle: { padding: "14px 16px", "border-radius": "8px", height: "initial", "font-size": "14px", "font-weight": "600" }, attrs: { disabled: e.isPosting || !e.clients.length, type: "none", pattern: "secondary" }, on: { click: e.openSendLater } }, [t("span", { staticClass: "@md:!block !hidden", domProps: { textContent: e._s(e.$t("scheduledTooltip")) } }), t("CIcon", { staticClass: "@md:!hidden", attrs: { type: "calendar", size: "16" } })], 1) : e._e(), t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$v.$invalid ? {
|
|
988
|
-
content: e.clients.length ? e.$t("missingDeliveryMethod") : e.$t(
|
|
989
|
-
"components:account.documentForm.clients.errorMessage"
|
|
990
|
-
)
|
|
991
|
-
} : {}, expression: `
|
|
992
|
-
$v.$invalid
|
|
993
|
-
? {
|
|
994
|
-
content: !clients.length
|
|
995
|
-
? $t(
|
|
996
|
-
'components:account.documentForm.clients.errorMessage'
|
|
997
|
-
)
|
|
998
|
-
: $t('missingDeliveryMethod')
|
|
999
|
-
}
|
|
1000
|
-
: {}
|
|
1001
|
-
` }], staticClass: "flex-auto" }, [t("CButton", { staticStyle: { padding: "14px 16px", "border-radius": "8px", height: "100%", "font-size": "14px", "font-weight": "600", "box-shadow": "0 2px 4px -1px rgba(0, 0, 0, 0.1)" }, attrs: { disabled: e.$v.$invalid, loading: e.isPosting, type: "secondary", wide: "" }, on: { click: function(m) {
|
|
1002
|
-
e.shouldShowUpgradeModal({ canUseBankId: s, canUseSms: i }) ? r({
|
|
1003
|
-
data: {
|
|
1004
|
-
bankIdBlocked: !s,
|
|
1005
|
-
smsBlocked: !i
|
|
1006
|
-
}
|
|
1007
|
-
}) : e.doSendDocument();
|
|
1008
|
-
} } }, [e._v(" " + e._s(e.$t("sendButton")) + " ")])], 1)], 1)];
|
|
1009
|
-
} }], null, !0) })];
|
|
1010
|
-
}), e._t("footer")], 2)], 1)];
|
|
1011
|
-
} }], null, !0) });
|
|
1012
|
-
}, ge = [], fe = /* @__PURE__ */ o(
|
|
1013
|
-
pe,
|
|
1014
|
-
ve,
|
|
1015
|
-
ge,
|
|
1016
|
-
!1,
|
|
1017
|
-
null,
|
|
1018
|
-
"7df6da42"
|
|
1019
|
-
);
|
|
1020
|
-
const De = fe.exports;
|
|
1021
|
-
export {
|
|
1022
|
-
De as S
|
|
1023
|
-
};
|