@cling-se/widget 1.0.0-beta.1 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.internal.md +82 -0
- package/README.md +14 -40
- package/README.public.md +14 -0
- package/dist/AddClientCallout-e8d19R3f.js +101 -0
- package/dist/AnswerModal-BGvB8IVV.js +3291 -0
- package/dist/AttachmentItem-CkHbAm4l.js +171 -0
- package/dist/BaseUpload-BiJBcWRu.js +2472 -0
- package/dist/BlockMedia-CW5wgipC.js +103 -0
- package/dist/CCallout-Cy2eeIYd.js +104 -0
- package/dist/{CCurrencyDropdown-qH-3m2eP.js → CCurrencyDropdown-DE_3CTjm.js} +91 -49
- package/dist/CDropdownItem-Dmq5gYzA.js +751 -0
- package/dist/CFormField.vue_vue_type_script_setup_true_lang-D_U9coAY.js +292 -0
- package/dist/{CPhoneFormat-CfQayFxw.js → CPhoneFormat-BS2nP9kc.js} +13 -21
- package/dist/CPhoneInput-Bf6329PO.js +207 -0
- package/dist/CPriceInput-d1yjuMQr.js +140 -0
- package/dist/CSelect-DgnT07Hk.js +98 -0
- package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-Ckl--dyv.js +51 -0
- package/dist/ClientAutocomplete-9JzGcO9O.js +532 -0
- package/dist/ClientModal-BzWQtWSZ.js +1181 -0
- package/dist/ColorPicker-BvoFN8nu.js +1408 -0
- package/dist/CompanyModal-Bp4V_az9.js +250 -0
- package/dist/ContentWrapper-CuH6xKmo.js +265 -0
- package/dist/CoverBlockSettings-BA5L0Zee.js +861 -0
- package/dist/DocAnswer-BcNA_KEg.js +33 -0
- package/dist/DocDetails-CStEwWnU.js +448 -0
- package/dist/DocForm-BOoILf5E.js +6748 -0
- package/dist/DocFormSend-CQIf-HJY.js +171 -0
- package/dist/DocLinks-BRX5QzNe.js +36 -0
- package/dist/DocModalBase-D72yWj-x.js +29 -0
- package/dist/DocPrint-BI1LXUPE.js +399 -0
- package/dist/DocReceipt-DaZ4V76p.js +341 -0
- package/dist/DocSendReminder-DKGZlo7s.js +181 -0
- package/dist/DocTextEditor-Dm-cTZpA.js +19413 -0
- package/dist/DocTimeline-DCwofzuk.js +537 -0
- package/dist/DocumentClient-vJdxCB53.js +90 -0
- package/dist/DocumentLayout-CKSi42ev.js +1368 -0
- package/dist/DocumentLogotype-DbQlvQ-y.js +162 -0
- package/dist/DocumentVoided-CRX2WxWO.js +33 -0
- package/dist/EmbedInput-B-oeC4Wy.js +157 -0
- package/dist/EmbedSettings-B9Yka2yB.js +103 -0
- package/dist/ErrorCallout-B_ygH33E.js +34 -0
- package/dist/FilePreviewModal-Bf3ELTow.js +202 -0
- package/dist/Flag-BwTgCNHO.js +41 -0
- package/dist/HeaderSettings-DvC7nlyY.js +720 -0
- package/dist/ImageSelectModal-D3sP3lhR.js +119 -0
- package/dist/ImageUploadWrapper-RWNa-yIq.js +1585 -0
- package/dist/Index-0_3ULrWX.js +126 -0
- package/dist/Index-4NPe0sfX.js +629 -0
- package/dist/Index-B1uA0FF6.js +4 -0
- package/dist/Index-BBkCYm2q.js +201 -0
- package/dist/{Index-DIOiMm9f.js → Index-BBwvo7S9.js} +10 -18
- package/dist/Index-BEMlsYwJ.js +68 -0
- package/dist/Index-BRBhJ6kz.js +21 -0
- package/dist/{Index--qPMWUMT.js → Index-BTFmHjUt.js} +48 -61
- package/dist/Index-BcUNnxLC.js +1098 -0
- package/dist/Index-Bo6ExBUL.js +93 -0
- package/dist/Index-BvMPCgdH.js +102 -0
- package/dist/Index-Bx5TOI9k.js +74 -0
- package/dist/Index-C7GZS8EI.js +16 -0
- package/dist/Index-CNWhm07R.js +25 -0
- package/dist/{Index-DcQbh-z2.js → Index-CQpznMKV.js} +9 -17
- package/dist/Index-CRzsnIij.js +159 -0
- package/dist/Index-CeSG1C41.js +140 -0
- package/dist/Index-CjfjdZj5.js +52 -0
- package/dist/Index-CskKmZpd.js +363 -0
- package/dist/Index-D5qwbCo1.js +28 -0
- package/dist/Index-D8Ae1Txt.js +228 -0
- package/dist/Index-DE8aenDB.js +3452 -0
- package/dist/Index-DI5EB5Rt.js +39 -0
- package/dist/Index-DaV57YPP.js +163 -0
- package/dist/Index-DbwkmoyM.js +38 -0
- package/dist/Index-Df9skok6.js +70 -0
- package/dist/{Index-Bu0MGrj6.js → Index-DfLLA0ij.js} +313 -206
- package/dist/Index-Dw1CO5F9.js +76 -0
- package/dist/Index-PZXyOoVb.js +87 -0
- package/dist/{Index-D4XgxmbD.js → Index-ZUnH-BHj.js} +10 -18
- package/dist/Index-cjKGSiDi.js +136 -0
- package/dist/Index-m-goRuKD.js +49 -0
- package/dist/Index-rGeWbLcB.js +47 -0
- package/dist/Index-vrljNp6G.js +28 -0
- package/dist/Index.vue_vue_type_script_lang-aeVuChGF.js +671 -0
- package/dist/InputToggleRow-v6qAWPg6.js +99 -0
- package/dist/ManualPopover-BONBJIUA.js +57 -0
- package/dist/MediaWrapper-CXb2UGd9.js +18 -0
- package/dist/{NotBindingText-CNV2Wmdx.js → NotBindingText-BqESO13N.js} +13 -17
- package/dist/PackageGroup-AIysVmyh.js +1058 -0
- package/dist/PdfTerms-BlhHdTu3.js +34 -0
- package/dist/PdfViewer-DwZ1rwlN.js +392 -0
- package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-D6NNUTz0.js +17 -0
- package/dist/PriceHeader-C4XhnoA3.js +488 -0
- package/dist/SearchApi-B7lXgUY6.js +137 -0
- package/dist/SendForm-BcD0xSvB.js +7031 -0
- package/dist/Setup-C2qaYDei.js +47 -0
- package/dist/{SmartList-Qgu0rMrI.js → SmartList-DqG7Q5t7.js} +16 -24
- package/dist/Sortable.vue_vue_type_script_setup_true_lang-CzMbr8AX.js +1303 -0
- package/dist/{TermsSettings-CE3h_xkm.js → TermsSettings-BOCONyM4.js} +169 -49
- package/dist/ThemeColorRow-sjGdMzGN.js +108 -0
- package/dist/ToggleBinding-7oq_oXPt.js +44 -0
- package/dist/UploadModal-C_X2NjVY.js +134 -0
- package/dist/VideoPlayerInput-BsUcmpl4.js +135 -0
- package/dist/VideoPlayerSettings-BXMmxaZQ.js +78 -0
- package/dist/VideoSelectModal-CW0OweCw.js +217 -0
- package/dist/{anime.es-BrPTThYb.js → anime.es-gdcpA-eY.js} +1 -2
- package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
- package/dist/{debounce-C1AuSpOZ.js → debounce-DNl99Gyo.js} +7 -7
- package/dist/dom-CkTGWrfu.js +69 -0
- package/dist/{focusDrawerMixin-Be6BAK8-.js → focusDrawerMixin-BwcErMDY.js} +1 -1
- package/dist/{formDrawerState-DRbg5rVI.js → formDrawerState-DaurePnd.js} +2 -2
- package/dist/helpers-CPW--XIz.js +44 -0
- package/dist/index-BjiGCJPI.js +149 -0
- package/dist/index-CFNv6OvX.js +188 -0
- package/dist/index-Cx71On5Z.js +508 -0
- package/dist/index-DKMxIBz_.js +270 -0
- package/dist/index-DKf5SGLD.js +125 -0
- package/dist/index-E32WgUp9.js +3525 -0
- package/dist/index-kp-GC5I0.js +513 -0
- package/dist/index.es.js +2 -5
- package/dist/index.umd.js +306 -1505
- package/dist/{main-WKzC-Dnu.js → main-Cb-nyil1.js} +33252 -33755
- package/dist/mapFormMixin-D3BihYWW.js +1544 -0
- package/dist/omit--YYr41Xp.js +31 -0
- package/dist/{publicSenderState-BujjYsZZ.js → publicSenderState-CdRW_Wwp.js} +4 -4
- package/dist/regions-BdZt9Srn.js +1250 -0
- package/dist/splitpanes-D-ThFkeR.js +342 -0
- package/dist/style.css +1 -4
- package/dist/template-BvaNnq-g.js +1493 -0
- package/dist/{throttle-CWPJmFid.js → throttle-D-bUGaVh.js} +2 -2
- package/dist/tippy.esm-BmKNqohP.js +1994 -0
- package/dist/useTermsModal-Dhf6_eYb.js +87 -0
- package/dist/{utils-CA_Zy6u1.js → utils-CBPcYdLv.js} +8 -11
- package/dist/validation-DOcUOoMe.js +40 -0
- package/package.json +25 -31
- package/.eslintrc.cjs +0 -4
- package/dist/AddClientCallout-BWnvyBcK.js +0 -46
- package/dist/AnswerModal-CLGRdSnK.js +0 -3874
- package/dist/AttachmentItem-BPS0-wyc.js +0 -78
- package/dist/BaseDatePicker-BbmV_GdD.js +0 -3183
- package/dist/BaseUpload-9gPgI7r6.js +0 -1977
- package/dist/BlockMedia-DkPFWiYL.js +0 -76
- package/dist/CCallout-T26jwUby.js +0 -59
- package/dist/CDropdownItem-BE8BAMD1.js +0 -636
- package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
- package/dist/CFormField-DECEfoVq.js +0 -241
- package/dist/CPriceInput-C4SOB-P5.js +0 -112
- package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
- package/dist/ClientAutocomplete-DSebA1Mx.js +0 -78
- package/dist/ClientModal-BXFYvYCF.js +0 -625
- package/dist/ColorPicker-CZ_bJabP.js +0 -2879
- package/dist/CompanyModal-CDr3t28n.js +0 -141
- package/dist/ContentWrapper-BwmMoe4W.js +0 -183
- package/dist/CoverBlockSettings-_F11-DGc.js +0 -275
- package/dist/DocAnswer-BR59xzkT.js +0 -36
- package/dist/DocDetails-D1qbCbps.js +0 -259
- package/dist/DocForm-DBc2a7z5.js +0 -7272
- package/dist/DocFormSend-Casix-yG.js +0 -144
- package/dist/DocLinks-DGTaewyX.js +0 -38
- package/dist/DocModalBase-BbS_qvSv.js +0 -28
- package/dist/DocPrint-0PqX3mbJ.js +0 -240
- package/dist/DocReceipt-CU3VD5pt.js +0 -210
- package/dist/DocSendReminder-CuycBspr.js +0 -137
- package/dist/DocTextEditor-CntS2Bd-.js +0 -17180
- package/dist/DocTimeline-DJuv3yBe.js +0 -481
- package/dist/DocumentClient-C25XXzz6.js +0 -136
- package/dist/DocumentLayout-B7afHRMr.js +0 -4909
- package/dist/DocumentLogotype-sqI51wvM.js +0 -87
- package/dist/DocumentVoided-TahdTSMn.js +0 -25
- package/dist/EmbedInput-BY-wHSfc.js +0 -113
- package/dist/EmbedSettings-8pfjk4NP.js +0 -72
- package/dist/ErrorCallout-Dsr8PNsU.js +0 -28
- package/dist/FilePreviewModal-CcEinEFg.js +0 -81
- package/dist/Flag-PJKrghi9.js +0 -114
- package/dist/HeaderSettings-BqczIOsG.js +0 -392
- package/dist/ImageSelectModal-Cd-HhKnH.js +0 -84
- package/dist/ImageUploadWrapper-Dv43rGdb.js +0 -1604
- package/dist/Index-6b5VBKE-.js +0 -107
- package/dist/Index-B4pRJnbw.js +0 -84
- package/dist/Index-B69f8qgZ.js +0 -62
- package/dist/Index-B79YN9RO.js +0 -25
- package/dist/Index-BBrlPoe8.js +0 -58
- package/dist/Index-BXfWJCuq.js +0 -52
- package/dist/Index-Bd76vb37.js +0 -55
- package/dist/Index-BmbtQO5F.js +0 -150
- package/dist/Index-ByV_kJaH.js +0 -77
- package/dist/Index-CDV5rhWS.js +0 -49
- package/dist/Index-CIx4OOK-.js +0 -144
- package/dist/Index-CL1OWLt6.js +0 -223
- package/dist/Index-Caow0eZu.js +0 -31
- package/dist/Index-Cd3-3PEK.js +0 -2402
- package/dist/Index-CdpZBEKU.js +0 -98
- package/dist/Index-CmU3Sys-.js +0 -754
- package/dist/Index-CtRtgnpm.js +0 -32
- package/dist/Index-Cukkr33D.js +0 -140
- package/dist/Index-Cuqw0ios.js +0 -57
- package/dist/Index-Czm_WdqC.js +0 -25
- package/dist/Index-DNdYXHgr.js +0 -33
- package/dist/Index-DcuBxutp.js +0 -642
- package/dist/Index-DpWNWiyY.js +0 -291
- package/dist/Index-DzS1rZdF.js +0 -24
- package/dist/Index-N6s5pZxv.js +0 -26
- package/dist/Index-g_DNu4mt.js +0 -69
- package/dist/Index-mJ8F41GY.js +0 -154
- package/dist/Index-q7W9KA8m.js +0 -21
- package/dist/Index-rtzblZp4.js +0 -70
- package/dist/InputToggleRow-CZjxsDOQ.js +0 -57
- package/dist/ManualPopover-CZrWiT-P.js +0 -58
- package/dist/MediaWrapper-D37qK4KR.js +0 -23
- package/dist/PackageGroup-Heo_s8ct.js +0 -699
- package/dist/PdfTerms-AB9tXAtU.js +0 -36
- package/dist/PdfViewer-CIVkvOBr.js +0 -373
- package/dist/PlainHtml-CPmIebjY.js +0 -20
- package/dist/PriceHeader-DhDAruwX.js +0 -339
- package/dist/SearchApi-BMgdaI4s.js +0 -161
- package/dist/Setup-VIaIV9uT.js +0 -50
- package/dist/ThemeColorRow-DYJNgk6S.js +0 -67
- package/dist/ToggleBinding-CuwCeYpO.js +0 -38
- package/dist/UploadModal-BITcxG-J.js +0 -95
- package/dist/VideoPlayerInput-8szEX_8L.js +0 -93
- package/dist/VideoPlayerSettings-BIPytm6w.js +0 -61
- package/dist/VideoSelectModal-B-Pe34nb.js +0 -100
- package/dist/answerDocumentMixin-W7vE1Gp4.js +0 -51
- package/dist/formComponentsInstall-Bm3VMOh6.js +0 -2507
- package/dist/formValidationMixin-COkY8COk.js +0 -49
- package/dist/index-BFvjENMH.js +0 -81
- package/dist/index-BV2nGWay.js +0 -492
- package/dist/index-BgJ05dYc.js +0 -165
- package/dist/index-CMPAXxzs.js +0 -347
- package/dist/index-DNDjI5uI.js +0 -3916
- package/dist/index-aoff9oUi.js +0 -102
- package/dist/mapFormMixin-QbevCwJK.js +0 -72
- package/dist/omit-CTp9CXoU.js +0 -31
- package/dist/splitpanes-BHUVsCZF.js +0 -382
- package/dist/tinycolor-kTl0yxzz.js +0 -633
- package/dist/tippy.esm-sS5koDSU.js +0 -1799
- package/dist/vuedraggable.umd-BA3ZDRAp.js +0 -3161
- package/dist/vuex.esm-DKGl8mcw.js +0 -467
- package/public/favicon.ico +0 -0
- package/tsconfig.json +0 -26
- package/tsconfig.node.json +0 -10
- package/tsconfig.paths.json +0 -17
- package/vite.config.ts +0 -60
|
@@ -1,625 +0,0 @@
|
|
|
1
|
-
import { C as v } from "./ClientAutocomplete-DSebA1Mx.js";
|
|
2
|
-
import { E as p, a9 as y, I as C, n as u, b as l, d as b, c as _, g as c, aa as $, y as w } from "./main-WKzC-Dnu.js";
|
|
3
|
-
import { w as f } from "./CDropdownItem-BE8BAMD1.js";
|
|
4
|
-
import { v as r } from "./index-BV2nGWay.js";
|
|
5
|
-
import { m as g, b as x, a as k } from "./vuex.esm-DKGl8mcw.js";
|
|
6
|
-
import { o as N } from "./omit-CTp9CXoU.js";
|
|
7
|
-
function h(a) {
|
|
8
|
-
if (typeof a > "u")
|
|
9
|
-
throw Error("Missing param inputParam");
|
|
10
|
-
let e = a;
|
|
11
|
-
Number.isInteger(e) && (e = e.toString());
|
|
12
|
-
let t = 0;
|
|
13
|
-
const i = e.length, n = i % 2;
|
|
14
|
-
let s, o;
|
|
15
|
-
for (s = 0; s < i; s += 1)
|
|
16
|
-
o = parseInt(e.charAt(s), 10), s % 2 === n && (o *= 2), o > 9 && (o -= 9), t += o;
|
|
17
|
-
return t % 10 === 0;
|
|
18
|
-
}
|
|
19
|
-
function m(a) {
|
|
20
|
-
let e = a.replace(/ /g, "");
|
|
21
|
-
return e = e.replace(/-/g, ""), !h(e) || (e = [e.slice(0, 6), "-", e.slice(6)].join(""), !e.match(/^(\d{6})-(\d{4})$/)) ? !1 : e;
|
|
22
|
-
}
|
|
23
|
-
function d(a) {
|
|
24
|
-
if (typeof a > "u" || a === null || a === "")
|
|
25
|
-
return !1;
|
|
26
|
-
let e = a.trim().replace(/[^0-9]+/g, "");
|
|
27
|
-
if (e.length !== 10 && e.length !== 12)
|
|
28
|
-
return !1;
|
|
29
|
-
if (e.length === 10) {
|
|
30
|
-
const n = e.substring(0, 2), s = (/* @__PURE__ */ new Date()).getFullYear(), o = parseInt(
|
|
31
|
-
s.toString().substring(2, 2),
|
|
32
|
-
10
|
|
33
|
-
);
|
|
34
|
-
parseInt(n, 10) === 19 || parseInt(n, 10) === 20 || (parseInt(n, 10) >= 0 && parseInt(n, 10) <= o ? e = `20${e}` : e = `19${e}`);
|
|
35
|
-
}
|
|
36
|
-
return (/* @__PURE__ */ new Date()).getFullYear() - parseInt(e.substring(0, 4), 10) < 16 ? !1 : h(e.substring(2)) ? e : !1;
|
|
37
|
-
}
|
|
38
|
-
const I = {
|
|
39
|
-
sv: {
|
|
40
|
-
title: "Mottagare",
|
|
41
|
-
updateButton: "Spara mottagare",
|
|
42
|
-
individual: "Privatperson",
|
|
43
|
-
reference: "Referens",
|
|
44
|
-
workAddressSubLabel: "Där arbetet utförs",
|
|
45
|
-
showMore: "Visa fler fält",
|
|
46
|
-
seperateWorkAddress: {
|
|
47
|
-
false: "Arbetsadress som ovan",
|
|
48
|
-
true: "Annan"
|
|
49
|
-
},
|
|
50
|
-
placeholders: {
|
|
51
|
-
name: "Mottagarens namn",
|
|
52
|
-
companyName: "Företagets namn",
|
|
53
|
-
socialNo: "10 eller 12 siffror",
|
|
54
|
-
orgNo: "Företagets org-nr",
|
|
55
|
-
reference: "Er referens",
|
|
56
|
-
cellphone: "Mobilnummer",
|
|
57
|
-
address: "Gatuadress"
|
|
58
|
-
},
|
|
59
|
-
validations: {
|
|
60
|
-
name: {
|
|
61
|
-
required: "Vem är din kund?"
|
|
62
|
-
},
|
|
63
|
-
orgNo: {
|
|
64
|
-
personalNumber: "Personnumret är inte giltigt"
|
|
65
|
-
},
|
|
66
|
-
realOrgNo: {
|
|
67
|
-
realOrgNo: "Organisationsnumret är inte giltigt"
|
|
68
|
-
},
|
|
69
|
-
reference: {
|
|
70
|
-
required: "Vem är din referens?"
|
|
71
|
-
},
|
|
72
|
-
email: {
|
|
73
|
-
required: "E-post saknas",
|
|
74
|
-
email: "E-posten är ogiltig"
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
signMethod: {
|
|
78
|
-
button: {
|
|
79
|
-
title: "Standard - knapptryck",
|
|
80
|
-
content: "Bevisnivå: IP-adress, tidpunkt och enhet."
|
|
81
|
-
},
|
|
82
|
-
bankId: {
|
|
83
|
-
title: "BankId",
|
|
84
|
-
content: "Samma säkerhetsgrad som bankerna har."
|
|
85
|
-
},
|
|
86
|
-
signature: {
|
|
87
|
-
title: "Standard",
|
|
88
|
-
content: "Bevisnivå: IP-adress, tidpunkt och enhet."
|
|
89
|
-
},
|
|
90
|
-
inPerson: {
|
|
91
|
-
title: "Fysisk underskrift",
|
|
92
|
-
content: "Signatur på utskrivet dokument"
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
en: {
|
|
97
|
-
title: "Recipient",
|
|
98
|
-
updateButton: "Save recipient",
|
|
99
|
-
individual: "Individual",
|
|
100
|
-
reference: "Contact",
|
|
101
|
-
workAddressSubLabel: "Where work is going to be performed",
|
|
102
|
-
showMore: "Show additional fields",
|
|
103
|
-
seperateWorkAddress: {
|
|
104
|
-
false: "Work address same as above",
|
|
105
|
-
true: "Other"
|
|
106
|
-
},
|
|
107
|
-
placeholders: {
|
|
108
|
-
name: "Recipient name",
|
|
109
|
-
companyName: "Company name",
|
|
110
|
-
socialNo: "10 or 12 numbers",
|
|
111
|
-
orgNo: "Company registration number",
|
|
112
|
-
reference: "Name",
|
|
113
|
-
cellphone: "Cellphone",
|
|
114
|
-
address: "Street"
|
|
115
|
-
},
|
|
116
|
-
validations: {
|
|
117
|
-
name: {
|
|
118
|
-
required: "Who's your contact person?"
|
|
119
|
-
},
|
|
120
|
-
orgNo: {
|
|
121
|
-
personalNumber: "Invalid social security number"
|
|
122
|
-
},
|
|
123
|
-
realOrgNo: {
|
|
124
|
-
realOrgNo: "Invalid organisation number"
|
|
125
|
-
},
|
|
126
|
-
reference: {
|
|
127
|
-
required: "Missing contact name"
|
|
128
|
-
},
|
|
129
|
-
email: {
|
|
130
|
-
required: "Email missing",
|
|
131
|
-
email: "Invalid email"
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
signMethod: {
|
|
135
|
-
button: {
|
|
136
|
-
title: "Standard - button",
|
|
137
|
-
content: "Level of proof: IP address, timestamp and device."
|
|
138
|
-
},
|
|
139
|
-
bankId: {
|
|
140
|
-
title: "BankID",
|
|
141
|
-
content: "Same level of proof as the banks use."
|
|
142
|
-
},
|
|
143
|
-
signature: {
|
|
144
|
-
title: "Signature",
|
|
145
|
-
content: "Level of proof: IP address, timestamp and device."
|
|
146
|
-
},
|
|
147
|
-
inPerson: {
|
|
148
|
-
title: "In person",
|
|
149
|
-
content: "Signature on print document"
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}, { mapFields: S } = p({
|
|
154
|
-
getterType: "forms/getField",
|
|
155
|
-
mutationType: "forms/updateField"
|
|
156
|
-
}), F = {
|
|
157
|
-
name: "FormClient",
|
|
158
|
-
i18nOptions: {
|
|
159
|
-
namespaces: "formClient",
|
|
160
|
-
messages: I
|
|
161
|
-
},
|
|
162
|
-
components: {
|
|
163
|
-
ClientAutocomplete: v,
|
|
164
|
-
Animation: y
|
|
165
|
-
},
|
|
166
|
-
mixins: [f],
|
|
167
|
-
props: {
|
|
168
|
-
requireReference: {
|
|
169
|
-
type: Boolean,
|
|
170
|
-
default: !0
|
|
171
|
-
},
|
|
172
|
-
searchEnabled: {
|
|
173
|
-
type: Boolean,
|
|
174
|
-
default: !1
|
|
175
|
-
},
|
|
176
|
-
validateOrgNo: {
|
|
177
|
-
type: Boolean,
|
|
178
|
-
default: !1
|
|
179
|
-
},
|
|
180
|
-
simpleForm: {
|
|
181
|
-
type: Boolean,
|
|
182
|
-
default: !1
|
|
183
|
-
},
|
|
184
|
-
inputFocusOnMount: {
|
|
185
|
-
type: String,
|
|
186
|
-
default: ""
|
|
187
|
-
},
|
|
188
|
-
// Optional field with prop sync, if within the context of documents
|
|
189
|
-
documentRole: {
|
|
190
|
-
type: String,
|
|
191
|
-
default: ""
|
|
192
|
-
},
|
|
193
|
-
// Optional field with prop sync, if within the context of documents
|
|
194
|
-
answerMethod: {
|
|
195
|
-
type: Object,
|
|
196
|
-
default: null
|
|
197
|
-
},
|
|
198
|
-
signOptions: {
|
|
199
|
-
type: Array,
|
|
200
|
-
default: () => []
|
|
201
|
-
},
|
|
202
|
-
isPublicForm: {
|
|
203
|
-
type: Boolean,
|
|
204
|
-
default: !1
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
validations() {
|
|
208
|
-
return [
|
|
209
|
-
this.name,
|
|
210
|
-
this.orgNo,
|
|
211
|
-
this.reference,
|
|
212
|
-
this.email,
|
|
213
|
-
this.cellphone
|
|
214
|
-
].some((e) => !!e) ? {
|
|
215
|
-
orgNo: {
|
|
216
|
-
personalNumber(e) {
|
|
217
|
-
return !this.validateOrgNo || !e ? !0 : this.isIndivid ? d(e) : m(e) || d(e);
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
reference: {
|
|
221
|
-
required: r.requiredIf((e) => e.requireReference && !e.isIndivid)
|
|
222
|
-
},
|
|
223
|
-
email: {
|
|
224
|
-
email: r.email
|
|
225
|
-
}
|
|
226
|
-
} : {
|
|
227
|
-
name: {
|
|
228
|
-
required: r.required
|
|
229
|
-
},
|
|
230
|
-
orgNo: {
|
|
231
|
-
required: r.requiredIf((e) => e.type === "company")
|
|
232
|
-
},
|
|
233
|
-
cellphone: {
|
|
234
|
-
required: r.requiredIf((e) => !e.isIndivid)
|
|
235
|
-
},
|
|
236
|
-
reference: {
|
|
237
|
-
required: r.requiredIf((e) => !e.isIndivid)
|
|
238
|
-
},
|
|
239
|
-
email: {
|
|
240
|
-
required: r.requiredIf((e) => !e.isIndivid)
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
},
|
|
244
|
-
computed: {
|
|
245
|
-
...S({
|
|
246
|
-
id: "endCustomer.id",
|
|
247
|
-
type: "endCustomer.customerType",
|
|
248
|
-
name: "endCustomer.name",
|
|
249
|
-
realOrgNo: "endCustomer.org_no",
|
|
250
|
-
reference: "endCustomer.reference",
|
|
251
|
-
email: "endCustomer.email",
|
|
252
|
-
street: "endCustomer.street",
|
|
253
|
-
zip: "endCustomer.zip",
|
|
254
|
-
city: "endCustomer.city",
|
|
255
|
-
cellphone: "endCustomer.cellphone",
|
|
256
|
-
cellphoneRegion: "endCustomer.cellphoneRegion",
|
|
257
|
-
separateWorkAddress: "endCustomer.separateWorkAddress",
|
|
258
|
-
workStreet: "endCustomer.workStreet",
|
|
259
|
-
workZip: "endCustomer.workZip",
|
|
260
|
-
workCity: "endCustomer.workCity",
|
|
261
|
-
reverseVat: "endCustomer.reverseVat",
|
|
262
|
-
doUpdateEndCustomer: "endCustomer.doUpdateEndCustomer"
|
|
263
|
-
}),
|
|
264
|
-
...g({
|
|
265
|
-
isPosting: "endCustomers/isPosting",
|
|
266
|
-
companyRegion: "application/companyRegion",
|
|
267
|
-
feature: "application/feature"
|
|
268
|
-
}),
|
|
269
|
-
messages() {
|
|
270
|
-
return {
|
|
271
|
-
name: {
|
|
272
|
-
required: this.$t("validations.name.required")
|
|
273
|
-
},
|
|
274
|
-
orgNo: {
|
|
275
|
-
personalNumber: this.$t("validations.orgNo.personalNumber")
|
|
276
|
-
},
|
|
277
|
-
realOrgNo: {
|
|
278
|
-
personalNumber: this.$t("validations.realOrgNo.realOrgNo")
|
|
279
|
-
},
|
|
280
|
-
reference: {
|
|
281
|
-
required: this.$t("validations.reference.required")
|
|
282
|
-
},
|
|
283
|
-
email: {
|
|
284
|
-
required: this.$t("validations.email.required"),
|
|
285
|
-
email: this.$t("validations.email.email")
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
},
|
|
289
|
-
orgNo: {
|
|
290
|
-
get() {
|
|
291
|
-
return this.realOrgNo;
|
|
292
|
-
},
|
|
293
|
-
set(a) {
|
|
294
|
-
const e = this.isIndivid ? d(a) : m(a) || d(a);
|
|
295
|
-
return this.validateOrgNo && e ? (this.realOrgNo = e, !0) : (this.realOrgNo = a, !0);
|
|
296
|
-
}
|
|
297
|
-
},
|
|
298
|
-
isIndivid() {
|
|
299
|
-
return this.type === "individual";
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
|
-
watch: {
|
|
303
|
-
type(a) {
|
|
304
|
-
C.setItem("defaultClientType", a);
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
mounted() {
|
|
308
|
-
this.$refs[this.inputFocusOnMount] ? this.$refs[this.inputFocusOnMount].$el.querySelector("input").focus() : this.$refs.name.$el.querySelector("input").focus();
|
|
309
|
-
},
|
|
310
|
-
methods: {
|
|
311
|
-
validateForm() {
|
|
312
|
-
return this.$v.$touch(), this.$v.$invalid ? !1 : (this.$emit("submit", !0), !0);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
var M = function() {
|
|
317
|
-
var e = this, t = e._self._c;
|
|
318
|
-
return t("div", { staticClass: "form-client" }, [e.simpleForm ? t("form", { on: { submit: function(i) {
|
|
319
|
-
return i.preventDefault(), e.validateForm.apply(null, arguments);
|
|
320
|
-
} } }, [t("div", { staticClass: "space-between flex flex-wrap items-center pb-6" }, [t("div", { staticClass: "flex-grow", staticStyle: { "font-weight": "600", "font-size": "20px" } }, [e._v(" " + e._s(e.$t("_common:recipient").capitalize()) + " ")]), t("div", { staticClass: "type-toggle" }, [t("div", { staticClass: "type-toggle-button", class: { active: e.type === "individual" }, on: { click: function(i) {
|
|
321
|
-
e.type = "individual";
|
|
322
|
-
} } }, [e._v(" " + e._s(e.$t("individual")) + " ")]), t("div", { staticClass: "type-toggle-button", class: { active: e.type === "company" }, on: { click: function(i) {
|
|
323
|
-
e.type = "company";
|
|
324
|
-
} } }, [e._v(" " + e._s(e.$t("_common:company").capitalize()) + " ")])])]), t("CField", { staticStyle: { "margin-bottom": "calc(1.5 * var(--rem))" }, attrs: { label: e.isIndivid ? e.$t("_common:name").capitalize() : e.$t("_common:company").capitalize(), validator: e.$v.name, messages: e.messages.name, "label-position": "inside" } }, [t("ClientAutocomplete", { ref: "name", attrs: { placeholder: e.isIndivid ? e.$t("placeholders.name") : e.$t("placeholders.companyName"), "search-enabled": e.searchEnabled, "show-loading": !0 }, on: { setClient: function(i) {
|
|
325
|
-
return e.$emit("setClient", i);
|
|
326
|
-
} }, model: { value: e.name, callback: function(i) {
|
|
327
|
-
e.name = i;
|
|
328
|
-
}, expression: "name" } })], 1), t("Animation", [e.isIndivid ? e._e() : t("CField", { staticClass: "pb-4", attrs: { validator: e.$v.reference, messages: e.messages.reference, label: e.$t("reference").capitalize(), "label-position": "inside" } }, [t("CInput", { ref: "reference", attrs: { placeholder: e.$t("placeholders.reference") }, model: { value: e.reference, callback: function(i) {
|
|
329
|
-
e.reference = i;
|
|
330
|
-
}, expression: "reference" } })], 1)], 1), t("CField", { staticStyle: { "margin-bottom": "calc(1.5 * var(--rem))" }, attrs: { validator: e.$v.email, messages: e.messages.email, label: e.$t("_common:email").capitalize(), "label-position": "inside" } }, [t("CInput", { ref: "email", attrs: { placeholder: e.$t("_common:email").capitalize() }, model: { value: e.email, callback: function(i) {
|
|
331
|
-
e.email = typeof i == "string" ? i.trim() : i;
|
|
332
|
-
}, expression: "email" } })], 1), t("CPhoneInput", { ref: "cellphone", staticStyle: { "margin-bottom": "calc(1.5 * var(--rem))" }, attrs: { label: e.$t("_common:cellphone").capitalize(), placeholder: e.$t("placeholders.cellphone"), region: e.cellphoneRegion, "default-region": e.companyRegion, "label-position": "inside" }, on: { "update:region": function(i) {
|
|
333
|
-
e.cellphoneRegion = i;
|
|
334
|
-
} }, model: { value: e.cellphone, callback: function(i) {
|
|
335
|
-
e.cellphone = i;
|
|
336
|
-
}, expression: "cellphone" } }), e.documentRole ? t("CDropdown", { staticStyle: { "margin-bottom": "calc(1 * var(--rem))" }, attrs: { expanded: "" } }, [t("CButton", { staticClass: "is-left", staticStyle: { width: "100%" }, attrs: { slot: "trigger", "dropdown-icon": !0, "icon-props": {
|
|
337
|
-
stroke: "hsl(0, 0%, 50%)"
|
|
338
|
-
}, "icon-left": e.documentRole === "signee" ? "pen-tool" : "eye", type: "none", pattern: "secondary" }, slot: "trigger" }, [t("div", { staticStyle: { "line-height": "1.25", padding: "4px 0" } }, [t("div", [e._v(" " + e._s(e.$t(`_common:documentRole.${e.documentRole}.description`)) + " ")]), t("div", { staticStyle: { "font-size": "12px", opacity: "0.7" } }, [e._v(" " + e._s(e.$t(`_common:documentRole.${e.documentRole}.label`)) + " ")])])]), e._l(["signee", "recipient", "approver"], function(i) {
|
|
339
|
-
return t("CDropdownItem", { key: i, attrs: { "icon-left": i === "signee" ? "pen-tool" : "eye", "icon-props": {
|
|
340
|
-
stroke: "hsl(0, 0%, 50%)"
|
|
341
|
-
} }, on: { click: function(n) {
|
|
342
|
-
return e.$emit("update:document-role", i);
|
|
343
|
-
} } }, [t("div", { staticStyle: { "line-height": "1.25", padding: "4px 0" } }, [t("div", [e._v(e._s(e.$t(`_common:documentRole.${i}.description`)))]), t("div", { staticStyle: { "font-size": "12px", opacity: "0.7" } }, [e._v(" " + e._s(e.$t(`_common:documentRole.${i}.label`)) + " ")])])]);
|
|
344
|
-
})], 2) : e._e(), t("CButton", { attrs: { type: "secondary", pattern: "tertiary", size: "small", "icon-left": "arrow-right" }, on: { click: function(i) {
|
|
345
|
-
return e.$emit("show-more");
|
|
346
|
-
} } }, [e._v(" " + e._s(e.$t("showMore").capitalize()) + " ")]), t("CButton", { staticClass: "mt-4", staticStyle: { padding: "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: { loading: e.isPosting, "native-type": "submit", type: "secondary", wide: "", size: "medium" } }, [e._v(" " + e._s(e.$t("updateButton")) + " ")])], 1) : t("div", { class: { "column-only": e.windowWidth <= 600 } }, [t("div", { staticClass: "flex items-center justify-center", staticStyle: { "margin-bottom": "calc(2.5 * var(--rem))" } }, [t("div", { staticClass: "type-toggle" }, [t("div", { staticClass: "type-toggle-button", class: { active: e.type === "individual" }, on: { click: function(i) {
|
|
347
|
-
e.type = "individual";
|
|
348
|
-
} } }, [e._v(" " + e._s(e.$t("individual")) + " ")]), t("div", { staticClass: "type-toggle-button", class: { active: e.type === "company" }, on: { click: function(i) {
|
|
349
|
-
e.type = "company";
|
|
350
|
-
} } }, [e._v(" " + e._s(e.$t("_common:company").capitalize()) + " ")])])]), t("CField", { staticClass: "flex", attrs: { grouped: "" } }, [t("CField", { attrs: { label: e.isIndivid ? e.$t("_common:name").capitalize() : e.$t("_common:company").capitalize(), validator: e.$v.name, messages: e.messages.name, "label-position": "inside", expanded: "" } }, [t("ClientAutocomplete", { ref: "name", attrs: { placeholder: e.isIndivid ? e.$t("placeholders.name") : e.$t("placeholders.companyName"), "show-loading": !0, "search-enabled": e.searchEnabled }, on: { setClient: function(i) {
|
|
351
|
-
return e.$emit("setClient", i);
|
|
352
|
-
} }, model: { value: e.name, callback: function(i) {
|
|
353
|
-
e.name = i;
|
|
354
|
-
}, expression: "name" } })], 1), t("CField", { attrs: { label: e.isIndivid ? e.$t("_common:socialNo").capitalize() : e.$t("_common:orgNoShort").capitalize(), validator: e.$v.orgNo, messages: e.isIndivid ? e.messages.orgNo : e.messages.realOrgNo, "label-position": "inside", expanded: "" } }, [t("CInput", { ref: "orgNo", attrs: { placeholder: e.isIndivid ? e.$t("placeholders.socialNo") : e.$t("placeholders.orgNo") }, model: { value: e.orgNo, callback: function(i) {
|
|
355
|
-
e.orgNo = i;
|
|
356
|
-
}, expression: "orgNo" } })], 1)], 1), t("Animation", [e.type && !e.isIndivid ? t("CField", { staticClass: "pb-4", attrs: { validator: e.$v.reference, messages: e.messages.reference, label: e.$t("_common:reference").capitalize(), "label-position": "inside" } }, [t("CInput", { ref: "reference", attrs: { placeholder: e.$t("placeholders.reference") }, model: { value: e.reference, callback: function(i) {
|
|
357
|
-
e.reference = i;
|
|
358
|
-
}, expression: "reference" } })], 1) : e._e(), e.type && !e.isIndivid && e.feature("reverseVat") && e.feature("regionSE") ? t("CField", { staticStyle: { "padding-left": "0.5em", "margin-bottom": "calc(2 * var(--rem))" } }, [t("CCheckbox", { attrs: { size: "normal" }, model: { value: e.reverseVat, callback: function(i) {
|
|
359
|
-
e.reverseVat = i;
|
|
360
|
-
}, expression: "reverseVat" } }, [e._v(" " + e._s(e.$t("_common:vat.reverseVat")) + " ")])], 1) : e._e()], 1), t("CField", { staticClass: "flex", attrs: { grouped: "" } }, [t("CField", { staticClass: "flex-1", attrs: { validator: e.$v.email, messages: e.messages.email, label: e.$t("_common:email").capitalize(), "label-position": "inside", expanded: "" } }, [t("CInput", { ref: "email", attrs: { placeholder: e.$t("_common:email").capitalize() }, model: { value: e.email, callback: function(i) {
|
|
361
|
-
e.email = typeof i == "string" ? i.trim() : i;
|
|
362
|
-
}, expression: "email" } })], 1), t("CPhoneInput", { staticClass: "flex-1", staticStyle: { "margin-bottom": "calc(1.5 * var(--rem))" }, attrs: { label: e.$t("_common:cellphone").capitalize(), placeholder: e.$t("placeholders.cellphone"), region: e.cellphoneRegion, "default-region": e.companyRegion, "label-position": "inside" }, on: { "update:region": function(i) {
|
|
363
|
-
e.cellphoneRegion = i;
|
|
364
|
-
} }, model: { value: e.cellphone, callback: function(i) {
|
|
365
|
-
e.cellphone = i;
|
|
366
|
-
}, expression: "cellphone" } })], 1), t("CField", { attrs: { label: e.$t("_common:address").capitalize(), "label-position": "inside" } }, [t("CInput", { ref: "street", attrs: { placeholder: e.$t("placeholders.address") }, model: { value: e.street, callback: function(i) {
|
|
367
|
-
e.street = i;
|
|
368
|
-
}, expression: "street" } })], 1), t("CField", { staticClass: "force-two flex", attrs: { grouped: "" } }, [t("CField", { attrs: { expanded: "" } }, [t("CInput", { ref: "zip", attrs: { placeholder: e.$t("_common:zip").capitalize() }, model: { value: e.zip, callback: function(i) {
|
|
369
|
-
e.zip = i;
|
|
370
|
-
}, expression: "zip" } })], 1), t("CField", { attrs: { expanded: "" } }, [t("CInput", { ref: "city", attrs: { placeholder: e.$t("_common:city").capitalize() }, model: { value: e.city, callback: function(i) {
|
|
371
|
-
e.city = i;
|
|
372
|
-
}, expression: "city" } })], 1)], 1), t("CField", { staticClass: "flex" }, [t("CRadio", { staticStyle: { "margin-bottom": "0.5em" }, attrs: { "native-value": !1, type: "secondary", size: "small" }, model: { value: e.separateWorkAddress, callback: function(i) {
|
|
373
|
-
e.separateWorkAddress = i;
|
|
374
|
-
}, expression: "separateWorkAddress" } }, [e._v(" " + e._s(e.$t("seperateWorkAddress.false")) + " ")]), t("CRadio", { staticStyle: { "margin-bottom": "0.5em" }, attrs: { "native-value": !0, type: "secondary", size: "small" }, model: { value: e.separateWorkAddress, callback: function(i) {
|
|
375
|
-
e.separateWorkAddress = i;
|
|
376
|
-
}, expression: "separateWorkAddress" } }, [e._v(" " + e._s(e.$t("seperateWorkAddress.true")) + " ")])], 1), t("Animation", [e.type && e.separateWorkAddress ? t("div", [t("CField", { attrs: { label: e.$t("_common:addressWork").capitalize() + ` ( ${e.$t("workAddressSubLabel")} )` } }, [t("CInput", { ref: "workStreet", attrs: { placeholder: e.$t("placeholders.address") }, model: { value: e.workStreet, callback: function(i) {
|
|
377
|
-
e.workStreet = i;
|
|
378
|
-
}, expression: "workStreet" } })], 1), t("CField", { staticClass: "force-two flex", attrs: { grouped: "" } }, [t("CField", { attrs: { expanded: "" } }, [t("CInput", { ref: "workZip", attrs: { placeholder: e.$t("_common:zip").capitalize(), expanded: "" }, model: { value: e.workZip, callback: function(i) {
|
|
379
|
-
e.workZip = i;
|
|
380
|
-
}, expression: "workZip" } })], 1), t("CField", { attrs: { expanded: "" } }, [t("CInput", { ref: "workCity", attrs: { placeholder: e.$t("_common:city").capitalize(), expanded: "" }, model: { value: e.workCity, callback: function(i) {
|
|
381
|
-
e.workCity = i;
|
|
382
|
-
}, expression: "workCity" } })], 1)], 1)], 1) : e._e()]), e.documentRole || e.answerMethod ? t("CField", { staticClass: "flex pt-4", attrs: { grouped: "" } }, [e.documentRole ? t("div", { staticClass: "dropdown-field-wrapper flex min-w-0 flex-col" }, [t("div", { staticClass: "my-1 text-sm text-gray-600" }, [e._v(" " + e._s(e.$t("_common:documentRole.title")) + " ")]), t("CDropdown", { staticStyle: { "margin-bottom": "calc(1 * var(--rem))" }, attrs: { expanded: "" } }, [t("CButton", { staticClass: "is-left", attrs: { slot: "trigger", "dropdown-icon": !0, "icon-props": {
|
|
383
|
-
stroke: "hsl(0, 0%, 50%)"
|
|
384
|
-
}, "icon-left": e.documentRole === "signee" ? "pen-tool" : "eye", type: "none", pattern: "secondary", expanded: "" }, slot: "trigger" }, [t("div", { staticClass: "py-1 leading-5" }, [t("div", [e._v(" " + e._s(e.$t(`_common:documentRole.${e.documentRole}.description`)) + " ")]), t("div", { staticClass: "text-xs opacity-70" }, [e._v(" " + e._s(e.$t(`_common:documentRole.${e.documentRole}.label`)) + " ")])])]), e._l(["signee", "recipient", "approver"], function(i) {
|
|
385
|
-
return t("CDropdownItem", { key: i, attrs: { "icon-left": i === "signee" ? "pen-tool" : "eye", "icon-props": {
|
|
386
|
-
stroke: "hsl(0, 0%, 50%)"
|
|
387
|
-
} }, on: { click: function(n) {
|
|
388
|
-
return e.$emit("update:document-role", i);
|
|
389
|
-
} } }, [t("div", { staticStyle: { "line-height": "1.25", padding: "4px 0" } }, [t("div", [e._v(e._s(e.$t(`_common:documentRole.${i}.description`)))]), t("div", { staticStyle: { "font-size": "12px", opacity: "0.7" } }, [e._v(" " + e._s(e.$t(`_common:documentRole.${i}.label`)) + " ")])])]);
|
|
390
|
-
})], 2)], 1) : e._e(), e.answerMethod ? t("div", { staticClass: "dropdown-field-wrapper flex min-w-0 flex-col" }, [t("div", { staticClass: "my-1 text-sm text-gray-600" }, [e._v(" " + e._s(e.$t("_common:signMethod.title")) + " ")]), t("CDropdown", { staticStyle: { "margin-bottom": "calc(1 * var(--rem))" }, attrs: { expanded: "" } }, [t("CButton", { staticClass: "is-left", attrs: { slot: "trigger", "dropdown-icon": !0, type: "none", pattern: "secondary", expanded: "" }, slot: "trigger" }, [t("div", { staticClass: "max-w-[calc(16_*_var(--rem))] py-1 leading-5" }, [t("div", [e._v(e._s(e.$t(`signMethod.${e.answerMethod.accept}.title`)))]), t("div", { staticClass: "truncate text-xs opacity-70" }, [e._v(" " + e._s(e.$t(`signMethod.${e.answerMethod.accept}.content`)) + " ")])])]), e._l(e.signOptions, function(i) {
|
|
391
|
-
return t("CDropdownItem", { key: i, on: { click: function(n) {
|
|
392
|
-
return e.$emit("update:answer-method", {
|
|
393
|
-
...e.answerMethod,
|
|
394
|
-
accept: i
|
|
395
|
-
});
|
|
396
|
-
} } }, [t("div", { staticStyle: { "line-height": "1.25", padding: "4px 0" } }, [t("div", [e._v(e._s(e.$t(`signMethod.${i}.title`)))]), t("div", { staticClass: "max-w-[calc(12_*_var(--rem))] truncate", staticStyle: { "font-size": "12px", opacity: "0.7", "text-wrap": "wrap" } }, [e._v(" " + e._s(e.$t(`signMethod.${i}.content`)) + " ")])])]);
|
|
397
|
-
})], 2)], 1) : e._e()]) : e._e(), t("div", { staticStyle: { "margin-top": "calc(3 * var(--rem))" } }, [t("CButton", { staticStyle: { padding: "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: { loading: e.isPosting, type: "secondary", wide: "" }, on: { click: e.validateForm } }, [e._v(e._s(e.$t("updateButton")))])], 1)], 1)]);
|
|
398
|
-
}, z = [], O = /* @__PURE__ */ u(
|
|
399
|
-
F,
|
|
400
|
-
M,
|
|
401
|
-
z,
|
|
402
|
-
!1,
|
|
403
|
-
null,
|
|
404
|
-
"99750061"
|
|
405
|
-
);
|
|
406
|
-
const R = O.exports, { mapFields: q } = p({
|
|
407
|
-
getterType: "forms/getField",
|
|
408
|
-
mutationType: "forms/updateField"
|
|
409
|
-
}), A = {
|
|
410
|
-
name: "ClientModal",
|
|
411
|
-
i18nOptions: {
|
|
412
|
-
namespaces: "clientModal",
|
|
413
|
-
messages: {
|
|
414
|
-
en: {
|
|
415
|
-
unsavedDialog: {
|
|
416
|
-
title: "Unsaved changes",
|
|
417
|
-
message: "Are you sure you want to cancel?",
|
|
418
|
-
cancel: "No",
|
|
419
|
-
submit: "Yes"
|
|
420
|
-
},
|
|
421
|
-
removeDialog: {
|
|
422
|
-
title: "Remove recipient",
|
|
423
|
-
message: "Would you like to remove recipient from the document?"
|
|
424
|
-
}
|
|
425
|
-
},
|
|
426
|
-
sv: {
|
|
427
|
-
unsavedDialog: {
|
|
428
|
-
title: "Osparade ändringar",
|
|
429
|
-
message: "Är du säker på att du vill avbryta?",
|
|
430
|
-
cancel: "Stanna kvar",
|
|
431
|
-
submit: "Ja, stäng"
|
|
432
|
-
},
|
|
433
|
-
removeDialog: {
|
|
434
|
-
title: "Ta bort mottagare",
|
|
435
|
-
message: "Vill du ta bort mottagaren från dokumentet?"
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
},
|
|
440
|
-
components: {
|
|
441
|
-
FormClient: R
|
|
442
|
-
},
|
|
443
|
-
mixins: [f],
|
|
444
|
-
props: {
|
|
445
|
-
documentClientIndex: {
|
|
446
|
-
type: Number,
|
|
447
|
-
default: 0
|
|
448
|
-
},
|
|
449
|
-
signOrder: {
|
|
450
|
-
type: Number,
|
|
451
|
-
default: 0
|
|
452
|
-
},
|
|
453
|
-
inputFocusOnMount: {
|
|
454
|
-
type: String,
|
|
455
|
-
default: ""
|
|
456
|
-
},
|
|
457
|
-
forceExpand: {
|
|
458
|
-
type: Boolean,
|
|
459
|
-
default: !1
|
|
460
|
-
},
|
|
461
|
-
signOptions: {
|
|
462
|
-
type: Array,
|
|
463
|
-
default: () => ["signature", "inPerson"]
|
|
464
|
-
},
|
|
465
|
-
setFormValue: {
|
|
466
|
-
type: Function,
|
|
467
|
-
required: !0
|
|
468
|
-
},
|
|
469
|
-
removeFormValue: {
|
|
470
|
-
type: Function,
|
|
471
|
-
required: !0
|
|
472
|
-
},
|
|
473
|
-
// Optional prop if this modal is mounted from public form
|
|
474
|
-
isPublicForm: {
|
|
475
|
-
type: Boolean,
|
|
476
|
-
default: !1
|
|
477
|
-
}
|
|
478
|
-
},
|
|
479
|
-
data() {
|
|
480
|
-
var e;
|
|
481
|
-
let a = l(this.formData, "data.defaultAnswerMethod.accept") || "signature";
|
|
482
|
-
return (e = this.signOptions) != null && e.length && !this.signOptions.includes(a) && ([a] = this.signOptions), {
|
|
483
|
-
storedNewClient: {
|
|
484
|
-
documentRole: "signee",
|
|
485
|
-
answerMethod: {
|
|
486
|
-
accept: a,
|
|
487
|
-
deny: "button"
|
|
488
|
-
}
|
|
489
|
-
},
|
|
490
|
-
isLoading: !1,
|
|
491
|
-
hasChanged: !1,
|
|
492
|
-
showMore: !1
|
|
493
|
-
};
|
|
494
|
-
},
|
|
495
|
-
computed: {
|
|
496
|
-
...q({
|
|
497
|
-
endCustomer: "endCustomer"
|
|
498
|
-
}),
|
|
499
|
-
...x("forms", {
|
|
500
|
-
formData: (a) => a.document2
|
|
501
|
-
}),
|
|
502
|
-
...g({
|
|
503
|
-
can: "application/can",
|
|
504
|
-
feature: "application/feature",
|
|
505
|
-
defaultClientType: "endCustomers/defaultClientType"
|
|
506
|
-
}),
|
|
507
|
-
validateOrgNo() {
|
|
508
|
-
return !!(this.feature("bankId") || this.isPublicForm && b[_.brand].defaultRegion === "SE");
|
|
509
|
-
},
|
|
510
|
-
existsOnDocument() {
|
|
511
|
-
return !!l(this.formData, `clients[${this.documentClientIndex}]`);
|
|
512
|
-
}
|
|
513
|
-
},
|
|
514
|
-
created() {
|
|
515
|
-
this.forceExpand && (this.showMore = !0);
|
|
516
|
-
const a = l(
|
|
517
|
-
this.formData,
|
|
518
|
-
`clients[${this.documentClientIndex}]`,
|
|
519
|
-
{}
|
|
520
|
-
);
|
|
521
|
-
this.loadForm(a), ["endCustomer", "storedNewClient"].forEach(
|
|
522
|
-
(e) => this.$watch(e, {
|
|
523
|
-
deep: !0,
|
|
524
|
-
handler() {
|
|
525
|
-
this.hasChanged = !0;
|
|
526
|
-
}
|
|
527
|
-
})
|
|
528
|
-
);
|
|
529
|
-
},
|
|
530
|
-
methods: {
|
|
531
|
-
...k({
|
|
532
|
-
saveClient: c.FORM_SUBMIT_ENDCUSTOMER,
|
|
533
|
-
showMessage: c.SHOW_MESSAGE
|
|
534
|
-
}),
|
|
535
|
-
omit: N,
|
|
536
|
-
loadForm(a = {}) {
|
|
537
|
-
this.storedNewClient = Object.assign(this.storedNewClient, a), this.endCustomer = $({
|
|
538
|
-
type: this.defaultClientType(),
|
|
539
|
-
...a
|
|
540
|
-
});
|
|
541
|
-
},
|
|
542
|
-
async onSave() {
|
|
543
|
-
this.isLoading = !0;
|
|
544
|
-
let a = l(this.endCustomer, "id");
|
|
545
|
-
if (!this.isPublicForm) {
|
|
546
|
-
let e = !1;
|
|
547
|
-
this.endCustomer && (this.endCustomer.id ? this.can("endCustomers", "modify", this.endCustomer.id) && (e = !0) : this.can("endCustomers", "create") && (e = !0)), e && (a = await this.saveClient());
|
|
548
|
-
}
|
|
549
|
-
this.setFormValue({
|
|
550
|
-
key: `clients[${this.documentClientIndex}]`,
|
|
551
|
-
value: w(
|
|
552
|
-
{ ...this.endCustomer, ...a && { id: a } },
|
|
553
|
-
{ ...this.storedNewClient, signOrder: this.signOrder }
|
|
554
|
-
)
|
|
555
|
-
}), this.$emit("close"), this.isLoading = !1;
|
|
556
|
-
},
|
|
557
|
-
removeClient() {
|
|
558
|
-
this.showMessage({
|
|
559
|
-
displayType: "dialog",
|
|
560
|
-
type: "danger",
|
|
561
|
-
title: this.$t("removeDialog.title"),
|
|
562
|
-
message: this.$t("removeDialog.message"),
|
|
563
|
-
actions: {
|
|
564
|
-
cancel: {
|
|
565
|
-
text: this.$t("_common:cancel"),
|
|
566
|
-
callback: "cancel"
|
|
567
|
-
},
|
|
568
|
-
submit: {
|
|
569
|
-
text: this.$t("_common:remove"),
|
|
570
|
-
callback: () => {
|
|
571
|
-
this.removeFormValue(`clients[${this.documentClientIndex}]`), this.$emit("close");
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
|
-
},
|
|
577
|
-
close() {
|
|
578
|
-
return !this.hasChanged || !this.showMore ? this.$emit("close") : this.showMessage({
|
|
579
|
-
displayType: "dialog",
|
|
580
|
-
type: "danger",
|
|
581
|
-
title: this.$t("unsavedDialog.title"),
|
|
582
|
-
message: this.$t("unsavedDialog.message"),
|
|
583
|
-
actions: {
|
|
584
|
-
cancel: {
|
|
585
|
-
text: this.$t("unsavedDialog.cancel"),
|
|
586
|
-
callback: "cancel"
|
|
587
|
-
},
|
|
588
|
-
submit: {
|
|
589
|
-
text: this.$t("unsavedDialog.submit"),
|
|
590
|
-
callback: () => this.$emit("close")
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
});
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
};
|
|
597
|
-
var D = function() {
|
|
598
|
-
var e = this, t = e._self._c;
|
|
599
|
-
return t("div", { staticClass: "font-primary fixed inset-0 z-[1000] grid place-items-center overflow-auto bg-black bg-opacity-10 max-sm:block max-sm:min-h-full max-sm:w-full max-sm:overflow-auto sm:py-4", on: { "&click": function(i) {
|
|
600
|
-
return i.target !== i.currentTarget ? null : e.close.apply(null, arguments);
|
|
601
|
-
} } }, [t("div", { staticClass: "max-sm:h-initial relative mx-auto flex flex-col items-center rounded-xl bg-white p-10 text-lg max-sm:min-h-full max-sm:w-full max-sm:rounded-none max-sm:pt-16" }, [t("CButton", { staticClass: "z-2 absolute right-4 top-4", class: e.showMore ? "" : "sm:!hidden", attrs: { pattern: "tertiary", type: "none", circle: "", icon: "x" }, on: { click: e.close } }), t("FormClient", { staticClass: "max-w-full p-0", class: [e.showMore ? "w-[520px]" : "w-[360px]"], attrs: { "search-enabled": !0, "require-reference": !1, "simple-form": !e.showMore, "input-focus-on-mount": e.inputFocusOnMount, "document-role": e.storedNewClient.documentRole, "answer-method": e.storedNewClient.answerMethod, "sign-options": e.signOptions, "validate-org-no": e.validateOrgNo, "is-public-form": e.isPublicForm }, on: { "update:documentRole": function(i) {
|
|
602
|
-
return e.$set(e.storedNewClient, "documentRole", i);
|
|
603
|
-
}, "update:document-role": function(i) {
|
|
604
|
-
return e.$set(e.storedNewClient, "documentRole", i);
|
|
605
|
-
}, "update:answerMethod": function(i) {
|
|
606
|
-
return e.$set(e.storedNewClient, "answerMethod", i);
|
|
607
|
-
}, "update:answer-method": function(i) {
|
|
608
|
-
return e.$set(e.storedNewClient, "answerMethod", i);
|
|
609
|
-
}, setClient: function(i) {
|
|
610
|
-
e.loadForm(e.omit(i, ["answerMethod"]));
|
|
611
|
-
}, submit: e.onSave, "show-more": function(i) {
|
|
612
|
-
e.showMore = !0;
|
|
613
|
-
} } }), e.existsOnDocument && e.mq === "sm" ? t("CButton", { staticClass: "mt-4 text-sm", attrs: { type: "danger", pattern: "secondary", wide: "" }, on: { click: e.removeClient } }, [e._v(" " + e._s(e.$t("_common:remove")) + " ")]) : e._e()], 1)]);
|
|
614
|
-
}, B = [], E = /* @__PURE__ */ u(
|
|
615
|
-
A,
|
|
616
|
-
D,
|
|
617
|
-
B,
|
|
618
|
-
!1,
|
|
619
|
-
null,
|
|
620
|
-
null
|
|
621
|
-
);
|
|
622
|
-
const U = E.exports;
|
|
623
|
-
export {
|
|
624
|
-
U as default
|
|
625
|
-
};
|