@cling-se/widget 0.14.3 → 0.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/.eslintrc.cjs +4 -4
  2. package/README.md +40 -40
  3. package/package.json +1 -1
  4. package/tsconfig.json +26 -26
  5. package/tsconfig.node.json +10 -10
  6. package/tsconfig.paths.json +17 -17
  7. package/vite.config.ts +61 -61
  8. package/dist/AddClientCallout-DKH-LP5B.js +0 -46
  9. package/dist/AnswerModal-BCbq8wc4.js +0 -3869
  10. package/dist/AttachmentItem-60CSZnkF.js +0 -78
  11. package/dist/BaseDatePicker-Cl8SnC1k.js +0 -3183
  12. package/dist/BaseUpload-D4FCjlhL.js +0 -1977
  13. package/dist/BlockMedia-CqkwdGnE.js +0 -76
  14. package/dist/CCallout-BTBgU8f-.js +0 -59
  15. package/dist/CCurrencyDropdown-CL32Mo-Y.js +0 -246
  16. package/dist/CDropdownItem-DlWtQwO6.js +0 -538
  17. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
  18. package/dist/CFormField-BxJv-nUO.js +0 -241
  19. package/dist/CPhoneFormat-CJ9kndtJ.js +0 -62
  20. package/dist/CPriceInput-BpXI5X2j.js +0 -112
  21. package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
  22. package/dist/ClientAutocomplete-D9Dj9iBW.js +0 -78
  23. package/dist/ClientModal-JOt8NGcR.js +0 -625
  24. package/dist/ColorPicker-uPKD-Gvm.js +0 -2879
  25. package/dist/CompanyModal-7bG0iIRd.js +0 -141
  26. package/dist/ContentWrapper-B2nyZHL4.js +0 -183
  27. package/dist/CoverBlockSettings-C1O_FAde.js +0 -275
  28. package/dist/DocAnswer-B9G-y4Px.js +0 -36
  29. package/dist/DocDetails-DYHxKChO.js +0 -246
  30. package/dist/DocForm-BktEXjML.js +0 -7273
  31. package/dist/DocFormSend-DM6QgUOj.js +0 -143
  32. package/dist/DocLinks-BIGwfB3H.js +0 -38
  33. package/dist/DocModalBase-D5GdwTI7.js +0 -28
  34. package/dist/DocPrint-HqbaIGms.js +0 -240
  35. package/dist/DocReceipt-WXo6vWyW.js +0 -210
  36. package/dist/DocSendReminder-C8dNEpLg.js +0 -137
  37. package/dist/DocTextEditor-BfOZFDTP.js +0 -17177
  38. package/dist/DocTimeline-CitwS9px.js +0 -481
  39. package/dist/DocumentClient-CQ_z8ajY.js +0 -136
  40. package/dist/DocumentLayout-BA7mFfZh.js +0 -4909
  41. package/dist/DocumentLogotype-woc_hfll.js +0 -87
  42. package/dist/DocumentVoided-DC4FzpxG.js +0 -25
  43. package/dist/EmbedInput-CheqYcNr.js +0 -113
  44. package/dist/EmbedSettings-YcwM8hJw.js +0 -72
  45. package/dist/ErrorCallout-6pCYcx00.js +0 -28
  46. package/dist/FilePreviewModal-T8AiphqO.js +0 -81
  47. package/dist/Flag-Ddm6a4Il.js +0 -114
  48. package/dist/HeaderSettings-DHdZweJH.js +0 -392
  49. package/dist/ImageSelectModal-CAoBhnI8.js +0 -84
  50. package/dist/ImageUploadWrapper-CNv59Lhh.js +0 -1604
  51. package/dist/Index-B6S9U4Z-.js +0 -26
  52. package/dist/Index-BHX0D5fW.js +0 -559
  53. package/dist/Index-BL_7m5Ca.js +0 -70
  54. package/dist/Index-BXMXEUfo.js +0 -223
  55. package/dist/Index-BhVBvMu6.js +0 -32
  56. package/dist/Index-Bl_SNW80.js +0 -25
  57. package/dist/Index-BsguntKl.js +0 -21
  58. package/dist/Index-CGYjPfsf.js +0 -2402
  59. package/dist/Index-CKrGb3of.js +0 -61
  60. package/dist/Index-CMNrQo5a.js +0 -140
  61. package/dist/Index-CU50Al5c.js +0 -642
  62. package/dist/Index-CdqrrZxd.js +0 -77
  63. package/dist/Index-CfnL9dAw.js +0 -58
  64. package/dist/Index-CuW0MYrT.js +0 -171
  65. package/dist/Index-D-z8JSn6.js +0 -154
  66. package/dist/Index-D8giJ_bs.js +0 -84
  67. package/dist/Index-DDvfqy_h.js +0 -24
  68. package/dist/Index-DQDalqZ-.js +0 -107
  69. package/dist/Index-DTIPKKkV.js +0 -150
  70. package/dist/Index-DWxzUBff.js +0 -754
  71. package/dist/Index-DaNGeDQw.js +0 -144
  72. package/dist/Index-DfLU_AyN.js +0 -49
  73. package/dist/Index-DkVav_I7.js +0 -25
  74. package/dist/Index-Dxp8QAtB.js +0 -57
  75. package/dist/Index-DzjxFkcv.js +0 -52
  76. package/dist/Index-EwUJJWaB.js +0 -69
  77. package/dist/Index-I60qAqLl.js +0 -31
  78. package/dist/Index-LfF-7lQK.js +0 -292
  79. package/dist/Index-P0_dyc2V.js +0 -45
  80. package/dist/Index-RQMPSeHw.js +0 -98
  81. package/dist/Index-oipNLl3Y.js +0 -46
  82. package/dist/Index-sJq2Iyvt.js +0 -62
  83. package/dist/Index-uubi3NHX.js +0 -33
  84. package/dist/Index-vNj2kYZT.js +0 -55
  85. package/dist/InputToggleRow-B2pWvVyx.js +0 -57
  86. package/dist/ManualPopover-BI_Sf1zG.js +0 -54
  87. package/dist/MediaWrapper-eFpWxv3n.js +0 -23
  88. package/dist/NotBindingText-DA5NpePz.js +0 -32
  89. package/dist/PackageGroup-DOSijBdN.js +0 -699
  90. package/dist/PdfTerms-Q5YuVtrJ.js +0 -36
  91. package/dist/PdfViewer-zcWl8XZT.js +0 -374
  92. package/dist/PlainHtml-BmA83UAm.js +0 -20
  93. package/dist/PriceHeader-C14L5zgG.js +0 -339
  94. package/dist/SearchApi-CGT7-jVf.js +0 -161
  95. package/dist/Setup-RJQvZlDO.js +0 -50
  96. package/dist/SmartList-YosKRPVn.js +0 -83
  97. package/dist/TermsSettings-C5JTv7rT.js +0 -102
  98. package/dist/ThemeColorRow-D-C_tm2f.js +0 -63
  99. package/dist/ToggleBinding-KEVHHvKf.js +0 -38
  100. package/dist/UploadModal-DOYoWELI.js +0 -95
  101. package/dist/VideoPlayerInput-Dxb6CNk-.js +0 -93
  102. package/dist/VideoPlayerSettings-DsVN4Ix-.js +0 -61
  103. package/dist/VideoSelectModal-BpfzNx61.js +0 -100
  104. package/dist/anime.es-BrPTThYb.js +0 -858
  105. package/dist/answerDocumentMixin-BJMGrfUs.js +0 -51
  106. package/dist/color-TdtKxwVa.js +0 -19
  107. package/dist/debounce-BN83gOVd.js +0 -84
  108. package/dist/dom-CJxkno7i.js +0 -91
  109. package/dist/favicon.ico +0 -0
  110. package/dist/focusDrawerMixin-CawyQaGq.js +0 -22
  111. package/dist/formComponentsInstall-jcnyQ1zw.js +0 -2494
  112. package/dist/formDrawerState-BdNohvZH.js +0 -20
  113. package/dist/formValidationMixin-DOwgebZk.js +0 -49
  114. package/dist/i18nMessages-Chz_lxGG.js +0 -17
  115. package/dist/index-BBJIOkm_.js +0 -347
  116. package/dist/index-BNq9YCWc.js +0 -166
  117. package/dist/index-BdhbkLLU.js +0 -81
  118. package/dist/index-COf8F6CL.js +0 -3916
  119. package/dist/index-D0WvZHX_.js +0 -102
  120. package/dist/index-DTzZP4yq.js +0 -492
  121. package/dist/index.es.js +0 -35
  122. package/dist/index.umd.js +0 -3148
  123. package/dist/main-DE5THsiR.js +0 -56739
  124. package/dist/mapFormMixin-y2txvLw9.js +0 -72
  125. package/dist/omit-BrsWQAtU.js +0 -31
  126. package/dist/publicSenderState-BYsq95Vt.js +0 -21
  127. package/dist/splitpanes-BHUVsCZF.js +0 -382
  128. package/dist/style.css +0 -4
  129. package/dist/throttle-C2srA2wa.js +0 -18
  130. package/dist/tinycolor-SjV_ROuP.js +0 -633
  131. package/dist/tippy.esm-Dj7DQppr.js +0 -1799
  132. package/dist/utils-16HMuRfY.js +0 -108
  133. package/dist/vuedraggable.umd-Cd1g2Hr7.js +0 -3161
  134. package/dist/vuex.esm-DKGl8mcw.js +0 -467
@@ -1,143 +0,0 @@
1
- import { i as s, S as l } from "./formComponentsInstall-jcnyQ1zw.js";
2
- import { V as n, m as r, a as i, g as u, C as c, n as m } from "./main-DE5THsiR.js";
3
- n.use(s);
4
- const a = n.observable({
5
- canEdit: !1,
6
- isForm: !0,
7
- setFormValue: null,
8
- removeFormValue: null
9
- }), d = {
10
- name: "DocFormSend",
11
- components: {
12
- SendForm: l
13
- },
14
- provide: () => ({ viewSettings: a, allowSenderSign: !1 }),
15
- // TODO maybe not needed
16
- props: {
17
- // consumer options
18
- showName: {
19
- type: Boolean,
20
- default: !0
21
- },
22
- showSave: {
23
- type: Boolean,
24
- default: !0
25
- },
26
- showSchedule: {
27
- type: Boolean,
28
- default: !0
29
- },
30
- allowManualDelivery: {
31
- type: Boolean,
32
- default: !1
33
- },
34
- allowEditClients: {
35
- type: Boolean,
36
- default: !0
37
- },
38
- contentSlot: {
39
- type: String,
40
- default: null
41
- },
42
- footerSlot: {
43
- type: String,
44
- default: null
45
- },
46
- // widget internals
47
- setFormValue: {
48
- type: Function,
49
- default: null
50
- },
51
- removeFormValue: {
52
- type: Function,
53
- default: null
54
- },
55
- closeFunc: {
56
- type: Function,
57
- default: null
58
- },
59
- beforeSave: {
60
- type: Function,
61
- default: null
62
- },
63
- beforeSend: {
64
- type: Function,
65
- default: null
66
- }
67
- },
68
- data() {
69
- return {
70
- document: null
71
- };
72
- },
73
- computed: {
74
- ...r({
75
- company: "application/company",
76
- can: "application/can",
77
- rawDoc: "forms/document",
78
- isPosting: "documents2/isPosting"
79
- })
80
- },
81
- watch: {
82
- rawDoc: {
83
- immediate: !0,
84
- handler() {
85
- this.initDoc();
86
- }
87
- }
88
- },
89
- async created() {
90
- this.setDocValue && (a.setFormValue = this.setDocValue), this.removeDocValue && (a.removeFormValue = this.removeDocValue);
91
- },
92
- methods: {
93
- ...i({
94
- saveDocument: u.SAVE_DYNDOC_FORM
95
- // loadCompanyUser: global.LOAD_COMPANY_USER,
96
- }),
97
- async initDoc() {
98
- if (!this.rawDoc)
99
- throw new Error("Missing initiated form document");
100
- this.document = new c({
101
- data: this.rawDoc,
102
- can: this.can,
103
- getters: this.$store.getters,
104
- updateSender: !0
105
- });
106
- },
107
- setDocValue({ key: t, value: e }) {
108
- return this.setFormValue({ key: t, value: e });
109
- },
110
- removeDocValue(t) {
111
- return this.removeFormValue(t);
112
- },
113
- async onSaveDocument({ doSend: t = !1 } = {}) {
114
- let e = !1;
115
- typeof this.beforeSave == "function" && (e = await this.beforeSave(this.document)), t && typeof this.beforeSend == "function" && (e = await this.beforeSend(this.document)), !(e || !await this.saveDocument({ doSend: t })) && this.close();
116
- },
117
- close() {
118
- this.closeFunc();
119
- }
120
- }
121
- };
122
- var f = function() {
123
- var e = this, o = e._self._c;
124
- return e.document ? o("SendForm", { staticClass: "h-full w-full", attrs: { _document: e.document, _value: {
125
- expiresAt: "data.expiresAt",
126
- personalMessage: "data.personalMessage",
127
- defaultAnswerMethod: "data.defaultAnswerMethod",
128
- clients: "clients",
129
- reminders: "data.reminders",
130
- name: "data.name"
131
- }, "show-name": e.showName, "show-save": e.showSave, "show-schedule": e.showSchedule, "allow-edit-clients": e.allowEditClients, "allow-manual-delivery": e.allowManualDelivery, "set-form-value": e.setDocValue, "remove-form-value": e.removeDocValue, "on-save-document": e.onSaveDocument, "use-scroll": "" } }, [e.contentSlot ? o("div", { attrs: { slot: "content" }, domProps: { innerHTML: e._s(e.contentSlot) }, slot: "content" }) : e._e(), e.footerSlot ? o("div", { attrs: { slot: "footer" }, domProps: { innerHTML: e._s(e.footerSlot) }, slot: "footer" }) : e._e()]) : o("div", { staticClass: "grid h-full w-full place-items-center" }, [o("CIcon", { staticClass: "animate-spin text-gray-400", attrs: { type: "loader", size: 28 } })], 1);
132
- }, p = [], h = /* @__PURE__ */ m(
133
- d,
134
- f,
135
- p,
136
- !1,
137
- null,
138
- null
139
- );
140
- const S = h.exports;
141
- export {
142
- S as default
143
- };
@@ -1,38 +0,0 @@
1
- import { C as o } from "./index-D0WvZHX_.js";
2
- import { n as s } from "./main-DE5THsiR.js";
3
- const t = {
4
- name: "DocLinks",
5
- components: {
6
- ClientLinks: o
7
- },
8
- props: {
9
- document: {
10
- type: Object,
11
- required: !0
12
- },
13
- closeFunc: {
14
- type: Function,
15
- default: null
16
- }
17
- },
18
- methods: {
19
- close() {
20
- this.closeFunc && this.closeFunc();
21
- }
22
- }
23
- };
24
- var c = function() {
25
- var e = this, n = e._self._c;
26
- return n("div", { staticClass: "h-full w-full overflow-auto" }, [n("ClientLinks", { attrs: { id: e.document.id }, on: { close: e.close } })], 1);
27
- }, l = [], r = /* @__PURE__ */ s(
28
- t,
29
- c,
30
- l,
31
- !1,
32
- null,
33
- null
34
- );
35
- const f = r.exports;
36
- export {
37
- f as default
38
- };
@@ -1,28 +0,0 @@
1
- import { n as o } from "./main-DE5THsiR.js";
2
- const s = {
3
- name: "DocModalBase",
4
- components: {},
5
- props: {
6
- showClose: {
7
- type: Boolean,
8
- default: !1
9
- }
10
- }
11
- };
12
- var a = function() {
13
- var e = this, t = e._self._c;
14
- return t("div", { staticClass: "doc-modal-base" }, [e.showClose ? t("CButton", { staticClass: "absolute right-4 top-4 text-gray-500", attrs: { circle: "", icon: "x" }, on: { click: function(l) {
15
- return e.$parent.$emit("close");
16
- } } }) : e._e(), e._t("default")], 2);
17
- }, n = [], r = /* @__PURE__ */ o(
18
- s,
19
- a,
20
- n,
21
- !1,
22
- null,
23
- "14171006"
24
- );
25
- const i = r.exports;
26
- export {
27
- i as D
28
- };
@@ -1,240 +0,0 @@
1
- import { n as d, J as h, c, I as l, K as p, L as a, M as m } from "./main-DE5THsiR.js";
2
- const u = {
3
- i18nOptions: {
4
- namespaces: "documentPrint",
5
- messages: {
6
- en: {
7
- title: "Print options",
8
- appendAttachments: "Append attachments",
9
- appendAttachmentsSub: "Append attachments",
10
- hideDocumentAttachmentBlocks: "Hide document attachment blocks",
11
- hideDocumentAttachmentBlocksTooltip: "Hide blocks with the type of attachments.",
12
- showVerification: "Include verification",
13
- showVerificationSub: "Signature verification.",
14
- showLast4ssn: "Include the last 4 digits of the personal identification number from the BankID signature.",
15
- showEvents: "Show events",
16
- buttonText: "Download PDF",
17
- preparingPdf: "Preparing PDF...",
18
- preparingPdfDone: "PDF is complete",
19
- preparingPdfError: "Could not create PDF. Try again."
20
- },
21
- sv: {
22
- title: "Utskriftsinställningar",
23
- appendAttachments: "Bifoga bilagor",
24
- appendAttachmentsSub: "Inkludera bilagor i slutet av PDF:en.",
25
- hideDocumentAttachmentBlocks: "Göm dokumentblock som är bilagor",
26
- hideDocumentAttachmentBlocksTooltip: "Dölj blocken av typen bilagor.",
27
- showVerification: "Inkludera verifikat",
28
- showVerificationSub: "Signaturverifikat.",
29
- showLast4ssn: "Inkludera de sista 4-siffrorna i personnummret från BankID-signaturen",
30
- showEvents: "Visa händelser",
31
- buttonText: "Ladda ner PDF",
32
- preparingPdf: "Förbereder PDF...",
33
- preparingPdfDone: "PDF är redo",
34
- preparingPdfError: "Kunde inte skapa PDF. Pröva igen."
35
- }
36
- }
37
- },
38
- name: "DocumentPrint",
39
- components: {
40
- CCheckbox: h
41
- },
42
- props: {
43
- document: {
44
- type: Object,
45
- required: !0
46
- },
47
- isSuperUser: {
48
- type: Boolean,
49
- required: !1
50
- }
51
- },
52
- data() {
53
- return {
54
- options: {
55
- appendAttachments: !0,
56
- hideDocumentAttachmentBlocks: !1,
57
- showVerification: !0,
58
- showEvents: !0,
59
- showLast4ssn: !0,
60
- forceDoCreatePdf: !1,
61
- // Only for superuser
62
- compressImages: !1,
63
- // Only for superuser
64
- debugPage: !1,
65
- // Only for superuser
66
- extraTimeout: 0
67
- // Only for superuser
68
- },
69
- showMoreOptions: !1,
70
- omitAttachmentBlockTooltip: {
71
- content: '<svg style="margin-top: 2px;" width="193" height="122" viewBox="0 0 193 122" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="193" height="122" rx="5" fill="white"/><text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" font-weight="bold" letter-spacing="0em"><tspan x="13" y="25.5">' + this.$t("_common:attachment_plural").capitalize() + `</tspan></text><path d="M14 33H25.2941L30 38.225V52H14V33Z" fill="#FFC4C4"/><path opacity="0.34" d="M14 60H25.5L30 64.5V79H14V60Z" fill="#42A4FF"/><text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" letter-spacing="0em"><tspan x="41" y="46.5">${this.$t("_common:file").capitalize()} #1</tspan></text><text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" letter-spacing="0em"><tspan x="41" y="73.5">${this.$t("_common:file").capitalize()} #2</tspan></text><rect x="13" y="87" width="61" height="12" fill="#E2E2E2"/><rect x="13" y="103" width="168" height="6" fill="#E2E2E2"/><rect x="13" y="112" width="151" height="6" fill="#E2E2E2"/><rect x="13" y="3" width="97" height="6" fill="#E2E2E2"/><rect x="14" y="47" width="16" height="5" fill="#FF1515"/><rect x="14" y="74" width="16" height="5" fill="#42A4FF"/></svg><div style="max-width: 193px; padding: 2px 0 8px 0;">
72
- ${this.$t("hideDocumentAttachmentBlocksTooltip")}
73
- </div>`,
74
- placement: "left",
75
- boundariesElement() {
76
- return this.$parent.$el;
77
- },
78
- html: !0
79
- }
80
- };
81
- },
82
- computed: {
83
- extraTimeout: {
84
- get() {
85
- return this.options.extraTimeout || null;
86
- },
87
- set(s) {
88
- s ? this.options.extraTimeout = parseInt(s, 10) : this.options.extraTimeout = 0;
89
- }
90
- },
91
- allowVerification() {
92
- return this.document && this.document.allowVerification;
93
- },
94
- showAdminOptions() {
95
- return c.showAdminSettings || this.isSuperUser;
96
- },
97
- hasBankIdSignatures() {
98
- var e;
99
- const { clients: s, senderClient: t } = this.document;
100
- return t != null && t.socialNo && ((e = t.answerMethod) == null ? void 0 : e.accept) === "bankId" ? !0 : s.some(
101
- (i) => {
102
- var n;
103
- return i.socialNo && ((n = i.answerMethod) == null ? void 0 : n.accept) === "bankId";
104
- }
105
- );
106
- }
107
- },
108
- created() {
109
- Object.assign(
110
- this.options,
111
- JSON.parse(l.getItem("print-settings"))
112
- ), this.allowVerification || (this.options.showVerification = !1), this.$watch("options", {
113
- deep: !0,
114
- handler(s) {
115
- l.setItem("print-settings", JSON.stringify(s)), !s.showVerification && !s.showEvents && (this.options.showEvents = !0), !s.showVerification && !s.showLast4ssn && (this.options.showLast4ssn = !0);
116
- }
117
- });
118
- },
119
- methods: {
120
- async generatePdf() {
121
- if (!this.document || !this.document.publicId)
122
- return;
123
- const { data: s } = await p.addDocument(this.document.publicId, {
124
- ...this.options,
125
- brand: c.brand
126
- // this.$brand not defined on init
127
- // locale: this.$i18n.locale,
128
- // timeZone: this.$get(Intl.DateTimeFormat().resolvedOptions(), 'timeZone') || '',
129
- });
130
- let t, e;
131
- const i = async () => {
132
- const { data: o } = await p.get(s) || {};
133
- ({ status: t, url: e } = o);
134
- }, n = async () => {
135
- try {
136
- if (await i(), t === "canceled")
137
- throw new Error(
138
- `Canceled preparing document pdf for publicId: ${this.document.publicId}`
139
- );
140
- if (t === "completed" && e) {
141
- const o = () => {
142
- const r = window.open(e, "_blank");
143
- return r ? (r.focus(), !0) : !1;
144
- };
145
- return o() || a({
146
- type: "success",
147
- message: this.$t("preparingPdfDone"),
148
- time: null,
149
- // won't close notification after default 6 sec
150
- closeButton: !0,
151
- actions: {
152
- submit: {
153
- text: this.$t("_common:download"),
154
- callback: o
155
- }
156
- }
157
- }), "close";
158
- }
159
- return await m(3e3), n();
160
- } catch (o) {
161
- return a({
162
- type: "error",
163
- message: this.$t("preparingPdfError")
164
- }), this.$error(o, { showMessage: !1 }), "close";
165
- }
166
- };
167
- await a({
168
- type: "spinner",
169
- message: this.$t("preparingPdf"),
170
- time: n,
171
- closeButton: !0
172
- }), this.$emit("close");
173
- }
174
- }
175
- };
176
- var f = function() {
177
- var t = this, e = t._self._c;
178
- return e("div", [e("div", { staticClass: "options-wrapper" }, [e("div", { staticClass: "pb-4 text-lg font-semibold" }, [t._v(t._s(t.$t("title")))]), e("div", { staticClass: "print-options" }, [e("div", { staticClass: "select-none pb-1 text-sm font-medium text-gray-800" }, [t._v(" " + t._s(t.$t("_common:document")) + " ")]), e("div", { staticClass: "option-item" }, [e("div", { staticClass: "option-item__inner bg-gray-100 hover:bg-gray-200", class: { disabled: !t.document.attachedFiles.length }, on: { click: function(i) {
179
- t.options.appendAttachments = !t.options.appendAttachments;
180
- } } }, [e("CCheckbox", { staticStyle: { flex: "0 0 30px" }, attrs: { value: t.document.attachedFiles.length ? t.options.appendAttachments : !1, type: "secondary", size: "small" } }), e("div", [e("div", [t._v(t._s(t.$t("appendAttachments")))]), e("div", { staticClass: "has-text-grey-dark", staticStyle: { "font-size": "13px" } }, [t._v(" " + t._s(t.$tc("_common:attachment", { count: t.document.attachedFiles.length })) + " ")])])], 1), e("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: t.omitAttachmentBlockTooltip, expression: "omitAttachmentBlockTooltip" }] }, [e("div", { staticClass: "option-item__inner border-t-2 border-white bg-gray-100 hover:bg-gray-200", class: {
181
- disabled: !t.document.getAllNodesWithType("attachments").length
182
- }, on: { click: function(i) {
183
- t.options.hideDocumentAttachmentBlocks = !t.options.hideDocumentAttachmentBlocks;
184
- } } }, [e("CCheckbox", { staticStyle: { flex: "0 0 30px" }, attrs: { value: t.document.getAllNodesWithType("attachments").length ? t.options.hideDocumentAttachmentBlocks : !1, type: "secondary", size: "small" } }), e("div", [e("div", [t._v(t._s(t.$t("hideDocumentAttachmentBlocks")))]), e("div", { staticClass: "has-text-grey-dark", staticStyle: { "font-size": "13px" } }, [t._v(" " + t._s(t.$tc("_common:block", { count: t.document.getAllNodesWithType("attachments").length })) + " ")])])], 1)])]), e("div", { staticStyle: { height: "1.25rem" } }), e("div", { staticClass: "select-none pb-1 text-sm font-medium text-gray-800" }, [t._v(" " + t._s(t.$t("_common:verification").capitalize()) + " ")]), e("div", { staticClass: "option-item", class: { disabled: !t.allowVerification } }, [e("div", { staticClass: "option-item__inner bg-gray-100 hover:bg-gray-200", on: { click: function(i) {
185
- t.options.showVerification = !t.options.showVerification;
186
- } } }, [e("CCheckbox", { staticStyle: { flex: "0 0 30px" }, attrs: { value: t.options.showVerification, type: "secondary", size: "small" } }), e("div", [e("div", [t._v(t._s(t.$t("showVerification")))]), e("div", { staticClass: "has-text-grey-dark", staticStyle: { "font-size": "13px" } }, [t._v(" " + t._s(t.$t("showVerificationSub")) + " ")])])], 1), t.options.showVerification ? e("div", { staticClass: "option-item__inner border-t-2 border-white bg-gray-100 pl-8 hover:bg-gray-200", on: { click: function(i) {
187
- t.options.showEvents = !t.options.showEvents;
188
- } } }, [e("CCheckbox", { staticStyle: { flex: "0 0 30px" }, attrs: { value: t.options.showEvents, type: "secondary", size: "small" } }), e("div", [e("div", [t._v(t._s(t.$t("showEvents")))])])], 1) : t._e(), t.options.showVerification && t.hasBankIdSignatures ? e("div", [e("div", { staticClass: "mb-1 mt-3 inline-flex cursor-pointer select-none items-center rounded p-2 text-xs font-medium leading-none text-gray-500 hover:bg-gray-100", on: { click: function(i) {
189
- t.showMoreOptions = !t.showMoreOptions;
190
- } } }, [t._v(" " + t._s(t.$t("_common:more").capitalize()) + " "), e("CIcon", { staticClass: "ml-0.5 transition-transform", class: { "rotate-90": t.showMoreOptions }, attrs: { type: "chevron-right", "stroke-width": "2.25", size: "12" } })], 1), e("Animation", [t.showMoreOptions ? e("div", { staticClass: "option-item__inner bg-gray-100 hover:bg-gray-200", on: { click: function(i) {
191
- t.options.showLast4ssn = !t.options.showLast4ssn;
192
- } } }, [e("CCheckbox", { staticStyle: { flex: "0 0 30px" }, attrs: { value: t.options.showLast4ssn, type: "secondary", size: "small" } }), e("div", [e("div", [t._v(t._s(t.$t("showLast4ssn")))])])], 1) : t._e()])], 1) : t._e()]), t.showAdminOptions ? e("div", [e("div", { staticStyle: { height: "1.25rem" } }), e("div", { staticClass: "select-none pb-1 text-sm font-medium text-gray-800" }, [t._v(" Superuser + VPN ")]), e("div", { staticClass: "option-item__inner border-t-2 border-white bg-gray-100 text-xs opacity-80 hover:bg-gray-200", on: { click: function(i) {
193
- t.options.forceDoCreatePdf = !t.options.forceDoCreatePdf;
194
- } } }, [e("CCheckbox", { staticClass: "py-2", attrs: { value: t.options.forceDoCreatePdf, size: "small" } }, [t._v(" Force re-create PDF ")])], 1), e("div", { staticClass: "option-item__inner border-t-2 border-white bg-gray-100 text-xs opacity-80 hover:bg-gray-200", on: { click: function(i) {
195
- t.options.compressImages = !t.options.compressImages;
196
- } } }, [e("CCheckbox", { staticStyle: { flex: "0 0 30px" }, attrs: { value: t.options.compressImages, type: "secondary", size: "small" } }), t._m(0)], 1), e("div", { staticClass: "option-item__inner border-t-2 border-white bg-gray-100 text-xs opacity-80 hover:bg-gray-200", on: { click: function(i) {
197
- t.options.debugPage = !t.options.debugPage;
198
- } } }, [e("CCheckbox", { staticClass: "py-2", attrs: { value: t.options.debugPage, size: "small" } }, [t._v(" Debug page output ")])], 1), e("div", { staticClass: "border-t-2 border-white bg-gray-100 text-xs opacity-80 hover:bg-gray-200" }, [e("CInput", { attrs: { type: "number", filled: "", size: "small", placeholder: "Optional extra timeout (ms)" }, model: { value: t.extraTimeout, callback: function(i) {
199
- t.extraTimeout = t._n(i);
200
- }, expression: "extraTimeout" } })], 1)]) : t._e()])]), e("CButton", { attrs: { type: "secondary", size: "medium", wide: "" }, on: { click: t.generatePdf } }, [t._v(" " + t._s(t.$t("buttonText")) + " ")])], 1);
201
- }, g = [function() {
202
- var s = this, t = s._self._c;
203
- return t("div", [t("div", [s._v("Compress images")])]);
204
- }], v = /* @__PURE__ */ d(
205
- u,
206
- f,
207
- g,
208
- !1,
209
- null,
210
- "c95522c4"
211
- );
212
- const b = v.exports, w = {
213
- name: "DocPrint",
214
- components: {
215
- DocumentPrint: b
216
- },
217
- props: {
218
- document: {
219
- type: Object,
220
- required: !0
221
- }
222
- }
223
- };
224
- var y = function() {
225
- var t = this, e = t._self._c;
226
- return e("div", { staticClass: "h-full w-full overflow-auto px-8 py-12" }, [e("DocumentPrint", { attrs: { document: t.document }, on: { close: function(i) {
227
- return t.$router.push("/");
228
- } } })], 1);
229
- }, _ = [], x = /* @__PURE__ */ d(
230
- w,
231
- y,
232
- _,
233
- !1,
234
- null,
235
- null
236
- );
237
- const C = x.exports;
238
- export {
239
- C as default
240
- };
@@ -1,210 +0,0 @@
1
- import { g as p, n as u } from "./main-DE5THsiR.js";
2
- import { m as g, a as _ } from "./vuex.esm-DKGl8mcw.js";
3
- const f = {
4
- sv: {
5
- title: "Verifikat på signering",
6
- waitingForSign: "Väntar på signatur",
7
- signMethod: "Signeringsmetod",
8
- remaining: "{{count}} st signaturer kvarstår innan dokumentet är helt signerat.",
9
- confirmChangeMessage: "Vill du verkligen byta signeringsmetod för {{- name}}?",
10
- bankIdHint: "Identifiering och signering säkerställd med BankID."
11
- },
12
- en: {
13
- title: "Signature verification",
14
- waitingForSign: "Waiting for signature",
15
- signMethod: "Sign method",
16
- remaining: "{{count}} signatures are remaining before the document is completely signed.",
17
- confirmChangeMessage: "Do you really want to change sign method for {{- name}}?",
18
- bankIdHint: "Identity and signature confirmed with BankID"
19
- }
20
- }, x = {
21
- name: "DocumentReceipt",
22
- i18nOptions: {
23
- namespaces: "documentReceipt",
24
- messages: f
25
- },
26
- props: {
27
- document: {
28
- type: Object,
29
- required: !0
30
- },
31
- allowSignMethodUpdate: {
32
- type: Boolean,
33
- default: !0
34
- }
35
- },
36
- computed: {
37
- ...g({
38
- feature: "application/feature"
39
- }),
40
- signees() {
41
- const { senderClient: a, clients: t } = this.document;
42
- return [
43
- ...a ? [a] : [],
44
- ...(t || []).map((n, s) => ({ ...n, index: s }))
45
- ].filter(
46
- (n) => {
47
- var s;
48
- return ["signee", "approver"].includes(n.documentRole) || ((s = n.answer) == null ? void 0 : s.didAccept);
49
- }
50
- ).map(
51
- ({
52
- name: n = "",
53
- companyName: s,
54
- email: o,
55
- socialNo: c = null,
56
- answerMethod: i,
57
- answer: d,
58
- documentRole: m,
59
- index: l
60
- }) => ({
61
- name: n || s || o,
62
- socialNo: c,
63
- method: (i == null ? void 0 : i.accept) || "",
64
- documentRole: m,
65
- ...d,
66
- index: l
67
- })
68
- );
69
- },
70
- waitingFor() {
71
- return this.document.recipients.reduce(
72
- (a, t) => {
73
- var e;
74
- return t.answer || !["signee", "approver"].includes(t.documentRole) || ((e = t.answerMethod) == null ? void 0 : e.accept) === "inPerson" ? a : [...a, t];
75
- },
76
- []
77
- );
78
- },
79
- documentName() {
80
- return this.document.name || "";
81
- },
82
- sentByName() {
83
- var a, t;
84
- return ((t = (a = this.document.sender) == null ? void 0 : a.user) == null ? void 0 : t.name) || "";
85
- },
86
- signOptions() {
87
- var a;
88
- return ((a = this.document) == null ? void 0 : a.signOptions) || [];
89
- }
90
- },
91
- methods: {
92
- ..._({
93
- showMessage: p.SHOW_MESSAGE,
94
- updateDocument: p.UPDATE_DOCUMENT2
95
- }),
96
- getIconType(a) {
97
- return a === "signee" ? "pen-tool" : a === "recipient" ? "eye" : a === "approver" ? "check" : "shield";
98
- },
99
- getBrowserString({ browser: a, os: t, device: e }) {
100
- return [a == null ? void 0 : a.name, t == null ? void 0 : t.name, e == null ? void 0 : e.model].filter((n) => !!n).join(", ");
101
- },
102
- onUpdate(a, t) {
103
- this.showMessage({
104
- displayType: "dialog",
105
- type: "secondary",
106
- title: this.$t("_common:change", {
107
- thing: this.$t("_common:signMethod.title").toLowerCase()
108
- }),
109
- message: this.$t("confirmChangeMessage", { name: a.name }),
110
- actions: {
111
- cancel: {
112
- text: this.$t("_common:cancel"),
113
- callback: "cancel"
114
- },
115
- submit: {
116
- text: this.$t("actions:updateDocumentDialog.submit"),
117
- callback: () => this.updateSignMethod(a.index, t)
118
- }
119
- }
120
- });
121
- },
122
- async updateSignMethod(a, t) {
123
- const { id: e } = this.document || {}, n = { [`clients.${a}.answerMethod.accept`]: t };
124
- await this.updateDocument({
125
- id: e,
126
- body: n,
127
- params: { type: "paths" }
128
- });
129
- }
130
- }
131
- };
132
- var h = function() {
133
- var t = this, e = t._self._c;
134
- return e("div", { staticClass: "rounded-lg border border-gray-200 bg-gray-100 px-1 pb-1 pt-4 text-gray-600" }, [e("div", { staticClass: "relative mb-1 leading-5" }, [e("div", { staticClass: "pb-1 pl-4" }, [e("div", { staticClass: "font-medium text-black" }, [t._v(t._s(t.$t("title")))]), e("div", { staticClass: "data-label" }, [t._v(t._s(t.documentName))]), e("div", { staticClass: "grid grid-cols-3 gap-2 pb-1 pt-4", staticStyle: { "grid-template-columns": "repeat(auto-fit, minmax(200px, 1fr))" } }, [t._l([
135
- [t.$t("_common:sentByName"), t.sentByName],
136
- [
137
- t.$t("_components:status.sent"),
138
- t.$formatDate(t.document.sentAt, "Pp")
139
- ],
140
- [
141
- t.$t("_components:replyBy"),
142
- t.document.status === "sent" && t.$formatDate(t.document.expiresAt)
143
- ],
144
- [
145
- t.$t("_components:status.accepted"),
146
- t.$formatDate(t.document.acceptedAt, "Pp")
147
- ]
148
- ], function([n, s], o) {
149
- return [s ? e("div", { key: o }, [e("div", { staticClass: "text-xs text-gray-900", domProps: { textContent: t._s(n) } }), e("div", { staticClass: "mr-1.5 text-gray-600", domProps: { textContent: t._s(s) } })]) : t._e()];
150
- })], 2)]), t.waitingFor.length ? e("div", { staticClass: "ml-3 mt-2 inline-flex items-center rounded-full border border-orange-200/90 bg-orange-50 px-1 py-0.5 text-xs font-medium text-black/80" }, [e("CIcon", { staticClass: "text-orange-500/80", attrs: { type: "info", size: "14" } }), e("div", { staticClass: "px-1.5" }, [t._v(" " + t._s(t.$t("remaining", { count: t.waitingFor.length })) + " ")])], 1) : t._e(), e("CIcon", { staticClass: "absolute right-5 top-1 text-gray-500", attrs: { type: "lock", size: "18" } })], 1), e("div", { staticClass: "flex flex-col gap-2 p-2" }, t._l(t.signees, function(n, s) {
151
- var o, c;
152
- return e("div", { key: s, staticClass: "relative rounded-md border border-gray-200 bg-white text-gray-700" }, [e("div", { staticClass: "px-4 py-3" }, [n.didAccept && n.method === "bankId" ? e("CIcon", { staticClass: "absolute right-4 top-3", attrs: { type: "bankIdColor", size: "22" } }) : n.didAccept ? e("CIcon", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: t.$t(`_common:documentRole.${n.documentRole}.label`), expression: "$t(`_common:documentRole.${signee.documentRole}.label`)" }], staticClass: "lock-icon absolute right-6 top-4 opacity-70", attrs: { size: 18, type: t.getIconType(n.documentRole) } }) : t._e(), n.didAccept === !1 ? e("div", { staticClass: "absolute right-3 top-3 inline-flex rounded-full border border-red-400/50 bg-red-200 px-2 py-0.5 text-xs font-medium text-red-700" }, [t._v(" " + t._s(t.$t("_common:denied").capitalize()) + " ")]) : !n.didAccept && n.method !== "inPerson" ? e("div", { staticClass: "absolute right-3 top-3 inline-flex rounded-full border border-orange-200/70 bg-orange-50 px-2 py-0.5 text-xs font-medium text-black/80" }, [t._v(" " + t._s(t.$t("waitingForSign")) + " ")]) : t._e(), e("div", { staticClass: "pb-1 text-[15px] font-medium text-black" }, [t._v(" " + t._s(((o = n.response) == null ? void 0 : o.name) || n.name) + " ")]), e("div", { staticClass: "grid grid-cols-3 gap-2 py-1", staticStyle: { "grid-template-columns": "repeat(auto-fit, minmax(190px, 1fr))" } }, [t._l([
153
- [t.$t("_common:socialNo").capitalize(), n.socialNo],
154
- [
155
- t.$t("signMethod"),
156
- t.$t(`_common:signMethod.${n.method}`),
157
- "signMethod"
158
- ],
159
- [
160
- `${t.$t("_common:date").capitalize()} & ${t.$t("_common:time")}`,
161
- t.$formatDate(n.didAnswerAt, "Pp")
162
- ],
163
- ["IP-" + t.$t("_common:address"), n.ip],
164
- [
165
- `${t.$t("_common:browser")}, OS & ${t.$t("_common:device")}`,
166
- t.getBrowserString(n)
167
- ]
168
- ], function([i, d, m], l) {
169
- return [d ? e("div", { key: l, staticClass: "text-[13px]" }, [e("div", { staticClass: "text-gray-900", domProps: { textContent: t._s(i) } }), e("div", { staticClass: "flex items-center" }, [e("div", { staticClass: "mr-1.5 text-gray-500", domProps: { textContent: t._s(d) } }), m === "signMethod" && n.method && t.allowSignMethodUpdate && t.signOptions.length > 1 && t.document.status !== "accepted" && n.didAccept === void 0 ? e("CDropdown", { attrs: { "append-to-body": !0, "menu-styling": { width: "180px" } } }, [e("div", { staticClass: "text-primary-500 text-xs font-medium underline", attrs: { slot: "trigger" }, domProps: { textContent: t._s(t.$t("_common:change")) }, slot: "trigger" }), t._l(t.signOptions, function(r) {
170
- return e("CDropdownItem", { key: r, attrs: { "icon-right": n.method === r ? "check" : "" }, on: { click: function(D) {
171
- n.method !== r && t.onUpdate(n, r);
172
- } } }, [t._v(" " + t._s(t.$t(`_common:signMethod.${r}`)) + " ")]);
173
- })], 2) : t._e()], 1)]) : t._e()];
174
- })], 2)], 1), n.signatureDataURL ? e("div", { staticClass: "mx-4 h-20 border-t border-gray-100 py-6" }, [e("img", { staticClass: "h-full", attrs: { src: n.signatureDataURL } })]) : n.didAccept && n.method === "bankId" ? e("div", { staticClass: "mx-4 mb-4 flex items-center rounded-md bg-gray-300 p-1.5 text-white/90", staticStyle: { border: "1px solid #35677e" }, style: "background: linear-gradient(45deg,hsl(200deg 35% 17%),hsl(199deg 25% 30%));" }, [e("div", { staticClass: "ml-0.5 mr-2 flex h-9 w-9 items-center justify-center rounded-md border border-[#275369] bg-[#183e4f]" }, [e("CIcon", { attrs: { type: "bankId", size: "22" } })], 1), e("div", [e("div", { staticClass: "text-xs font-medium", domProps: { textContent: t._s(t.$t("bankIdHint")) } }), e("div", { staticClass: "text-xs opacity-70" }, [t._v(" " + t._s(((c = n.response) == null ? void 0 : c.name) || n.name) + " · " + t._s(n.socialNo) + " ")])])]) : t._e()]);
175
- }), 0)]);
176
- }, y = [], b = /* @__PURE__ */ u(
177
- x,
178
- h,
179
- y,
180
- !1,
181
- null,
182
- null
183
- );
184
- const v = b.exports, C = {
185
- name: "DocReceipt",
186
- components: {
187
- DocumentReceipt: v
188
- },
189
- props: {
190
- document: {
191
- type: Object,
192
- required: !0
193
- }
194
- }
195
- };
196
- var $ = function() {
197
- var t = this, e = t._self._c;
198
- return e("div", [e("DocumentReceipt", { attrs: { document: t.document, "allow-sign-method-update": !1 } })], 1);
199
- }, k = [], w = /* @__PURE__ */ u(
200
- C,
201
- $,
202
- k,
203
- !1,
204
- null,
205
- null
206
- );
207
- const M = w.exports;
208
- export {
209
- M as default
210
- };