@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,77 +0,0 @@
1
- import { n, w as l } from "./main-DE5THsiR.js";
2
- const d = {
3
- name: "MultiGroupPricing",
4
- props: {
5
- _document: {
6
- type: Object,
7
- default: () => ({})
8
- }
9
- },
10
- computed: {
11
- docPriceItems() {
12
- const { total: c, subTotal: t } = this._document.prices || {};
13
- return [
14
- {
15
- label: this._document.$t("price.net"),
16
- value: this.priceFormat(t)
17
- },
18
- {
19
- label: this._document.$t("price.total"),
20
- value: this.priceFormat(c)
21
- }
22
- ];
23
- },
24
- pkgGroups() {
25
- var t;
26
- return (((t = this._document.packageGroups) == null ? void 0 : t.groups) || []).map(({ title: e, prices: r, selectedPackages: i }) => {
27
- const { total: a, subTotal: s } = r || {};
28
- return {
29
- title: e,
30
- noOfSelectedPackages: i.length,
31
- priceItems: [
32
- {
33
- label: this._document.$t("price.net"),
34
- value: this.priceFormat(s)
35
- },
36
- {
37
- label: this._document.$t("price.total"),
38
- value: this.priceFormat(a)
39
- }
40
- ]
41
- };
42
- });
43
- }
44
- },
45
- methods: {
46
- priceFormat(c, t) {
47
- return l(c, {
48
- currency: this._document.currency,
49
- showZero: !0,
50
- decimals: 2,
51
- hideZeroDecimals: !0,
52
- ...t
53
- });
54
- }
55
- }
56
- };
57
- var p = function() {
58
- var t = this, e = t._self._c;
59
- return e("div", [t._l(t.pkgGroups, function(r, i) {
60
- return e("div", { key: i, staticStyle: { padding: "calc(0.5 * var(--rem)) 0" } }, [e("div", { staticStyle: { display: "flex", "font-size": "calc(1.1 * var(--rem))", "font-weight": "600", "padding-bottom": "3px", "border-bottom": "1px solid rgba(0, 0, 0, 0.2)" } }, [t._v(" " + t._s(r.title) + " "), e("span", { staticClass: "text-gray-400", staticStyle: { "margin-left": "auto", "font-size": "calc(1 * var(--rem))" } }, [t._v(" " + t._s(r.noOfSelectedPackages) + " paket ")])]), t._l(r.priceItems, function({ label: a, value: s }, o) {
61
- return e("div", { key: a + o, staticStyle: { display: "flex", "justify-content": "space-between", "font-size": "calc(1 * var(--rem))" } }, [e("div", [t._v(t._s(a))]), e("div", [t._v(t._s(s))])]);
62
- })], 2);
63
- }), e("div", { staticStyle: { "margin-top": "calc(1 * var(--rem))" } }, [e("div", { staticStyle: { "font-size": "calc(1.1 * var(--rem))", "font-weight": "600", "padding-bottom": "3px", "border-bottom": "1px solid rgba(0, 0, 0, 0.2)" } }, [t._v(" Doc summary ")]), t._l(t.docPriceItems, function({ label: r, value: i }, a) {
64
- return e("div", { key: a + r, staticStyle: { display: "flex", "justify-content": "space-between", "font-size": "calc(1 * var(--rem))" } }, [e("div", [t._v(t._s(r))]), e("div", [t._v(t._s(i))])]);
65
- })], 2)], 2);
66
- }, m = [], u = /* @__PURE__ */ n(
67
- d,
68
- p,
69
- m,
70
- !1,
71
- null,
72
- "adf5d470"
73
- );
74
- const v = u.exports;
75
- export {
76
- v as default
77
- };
@@ -1,58 +0,0 @@
1
- import { m as r } from "./mapFormMixin-y2txvLw9.js";
2
- import { I as n } from "./InputToggleRow-B2pWvVyx.js";
3
- import { B as s } from "./BaseDatePicker-Cl8SnC1k.js";
4
- import { n as l } from "./main-DE5THsiR.js";
5
- const c = {
6
- i18nOptions: {
7
- namespaces: "estimatedTimeStartEnd",
8
- messages: {
9
- en: {
10
- title: "Start and end date",
11
- label: "Work start and ends",
12
- placeholders: {
13
- start: "Start date",
14
- end: "End date"
15
- }
16
- },
17
- sv: {
18
- title: "Start- och slutdatum",
19
- label: "Arbetet påbörjas och avslutas",
20
- placeholders: {
21
- start: "Startdatum",
22
- end: "Slutdatum"
23
- }
24
- }
25
- }
26
- },
27
- name: "EstimatedWorkStartAndEndAtTextEdit",
28
- components: {
29
- InputToggleRow: n,
30
- BaseDatePicker: s
31
- },
32
- mixins: [r(["startAt", "endAt"])]
33
- };
34
- var i = function() {
35
- var t = this, a = t._self._c;
36
- return a("InputToggleRow", { attrs: { "display-value": t.startAt && t.endAt ? `${t.$formatDate(t.startAt)} → ${t.$formatDate(t.endAt)}` : t.$t("_common:add"), label: t.$t("label"), "show-clear": !!(t.startAt && t.endAt) }, on: { remove: function(e) {
37
- t.startAt = null, t.endAt = null;
38
- } } }, [a("div", { staticStyle: { display: "inline-flex" } }, [a("BaseDatePicker", { staticClass: "datepicker-simple", staticStyle: { width: "calc(8 * var(--rem))" }, attrs: { placeholder: t.$t("placeholders.start") }, on: { click: function(e) {
39
- e.preventDefault();
40
- } }, model: { value: t.startAt, callback: function(e) {
41
- t.startAt = e;
42
- }, expression: "startAt" } }), a("div", { staticStyle: { "line-height": "calc(3 * var(--rem))", margin: "0 calc(0.5 * var(--rem))", "font-size": "calc(calc(1 * var(--rem)) + 2px)" } }, [t._v(" → ")]), a("BaseDatePicker", { staticClass: "datepicker-simple", staticStyle: { width: "calc(8 * var(--rem))" }, attrs: { static: !0, placeholder: t.$t("placeholders.end") }, on: { click: function(e) {
43
- e.preventDefault();
44
- } }, model: { value: t.endAt, callback: function(e) {
45
- t.endAt = e;
46
- }, expression: "endAt" } })], 1)]);
47
- }, o = [], d = /* @__PURE__ */ l(
48
- c,
49
- i,
50
- o,
51
- !1,
52
- null,
53
- null
54
- );
55
- const A = d.exports;
56
- export {
57
- A as default
58
- };
@@ -1,171 +0,0 @@
1
- import { P as m } from "./PlainHtml-BmA83UAm.js";
2
- import { T as c, w as u, n as p } from "./main-DE5THsiR.js";
3
- import { s as g } from "./dom-CJxkno7i.js";
4
- const h = {
5
- name: "ExtraWorkConstructionPricingListRead",
6
- props: {
7
- _document: {
8
- type: Object,
9
- default: null
10
- },
11
- workPrice: {
12
- type: Number,
13
- default: null
14
- },
15
- managementPrice: {
16
- type: Number,
17
- default: null
18
- },
19
- entrepreneurMarkupPercentage: {
20
- type: Number,
21
- default: null
22
- },
23
- miscMarkupPercentage: {
24
- type: Number,
25
- default: null
26
- }
27
- },
28
- i18nOptions: {
29
- namespaces: "extraWorkConstructionPricingList",
30
- messages: {
31
- en: {
32
- andVat: "and VAT",
33
- subPriceString: "Price {{str}} incl. contractor fees {vat}.",
34
- labor: "Labor",
35
- laborManagement: "Labor management",
36
- subContractors: "Agreed upon subcontractors",
37
- subContractorsSub: "Markup with reported prime cost with supplement for contractor fees.",
38
- material: "Material, utils & other",
39
- materialSub: "Markup with reported prime cost with supplement for contractor fees.",
40
- descriptionTop: "Amendments and additional work will be charged as either fixed or cost-plus pricing. In case of cost-plus pricing, fees will be estimated according to:",
41
- descriptionBottom: "Possible agreements regarding amendments and additional work should be written and contain information about scope of work, if the contract period is affected and other conditions.",
42
- houseWorkDesc1: "Note that as a client, you need to qualify for deductions, for more information",
43
- houseWorkDesc2: "in the section about price.",
44
- houseWorkReadTerms: "read the terms"
45
- },
46
- sv: {
47
- andVat: "och moms",
48
- subPriceString: "Pris {{str}} inkl. entrepenörarvode {{vat}}.",
49
- labor: "Arbete",
50
- laborManagement: "Arbetsledning",
51
- subContractors: "Överenskomna underentreprenader",
52
- subContractorsSub: "Påslag med redovisad självkostnad med tillägg för entreprenörarvode.",
53
- material: "Material, hjälpmedel & övrigt",
54
- materialSub: "Påslag med redovisad självkostnad med tillägg för entreprenörarvode.",
55
- descriptionTop: "Ändringar och tilläggsarbeten debiteras antingen till fast pris eller på löpande räkning. Vid arbete på löpande räkning debiteras kostnaden enligt följande:",
56
- descriptionBottom: "Eventuella överenskommelser om ändringar och tilläggsarbeten bör vara skriftliga och innehålla information om arbetets omfattning, om arbetet påverkar kontraktstiden och övriga villkor.",
57
- houseWorkDesc1: "Notera att du som Beställare ska kvalificera för avdrag, för mer information",
58
- houseWorkDesc2: "i stycket för pris.",
59
- houseWorkReadTerms: "läs villkoren"
60
- }
61
- }
62
- },
63
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
64
- render(e) {
65
- if (!this._document.readPrices)
66
- return e("div");
67
- let n = !0, i = null, s = 1, o = null;
68
- const {
69
- prices: r = null
70
- } = this._document || {};
71
- if (r && (r.currency && ({
72
- currency: o
73
- } = r), r.helpers && ({
74
- isIndivid: n
75
- } = r.helpers), r.region)) {
76
- ({
77
- houseWorkType: i
78
- } = r.region);
79
- const t = {
80
- rot: 0.7,
81
- rut: 0.5,
82
- greenRot15: 0.85,
83
- greenRot20: 0.8,
84
- greenRot50: 0.5
85
- };
86
- n && (s *= 1.25), n && t[i] && (s *= t[i]);
87
- }
88
- const d = () => i ? this.$t("deduction.afterType", {
89
- type: i
90
- }) : n ? "" : `${this.$t("vat.exVat", {
91
- thing: this.$t("_common:vat.sharedTitle")
92
- })} `, l = this.$t("subPriceString", {
93
- str: d(),
94
- vat: n ? this.$t("andVat") : ""
95
- }), a = [];
96
- if (this.workPrice) {
97
- const t = c({
98
- amount: this.workPrice
99
- }).multiply(s).getAmount();
100
- a.push({
101
- title: this.$t("labor"),
102
- subTitle: l,
103
- amount: `${u(t, {
104
- showZero: !0,
105
- currency: o
106
- })}/h`
107
- });
108
- }
109
- if (this.managementPrice) {
110
- const t = c({
111
- amount: this.managementPrice
112
- }).multiply(s).getAmount();
113
- a.push({
114
- title: this.$t("laborManagement"),
115
- subTitle: l,
116
- amount: `${u(t, {
117
- showZero: !0,
118
- currency: o
119
- })}/h`
120
- });
121
- }
122
- return this.entrepreneurMarkupPercentage && a.push({
123
- title: this.$t("subContractors"),
124
- subTitle: this.$t("subContractorsSub"),
125
- amount: `${this.entrepreneurMarkupPercentage} %`
126
- }), this.miscMarkupPercentage && a.push({
127
- title: this.$t("material"),
128
- subTitle: this.$t("materialSub"),
129
- amount: `${this.miscMarkupPercentage} %`
130
- }), e(m, [e("div", {
131
- class: "m-b-2r"
132
- }, [this.$t("descriptionTop")]), e("div", {
133
- class: "m-b-2r list-box"
134
- }, [a.map((t) => e("div", {
135
- class: "ata-item"
136
- }, [e("div", {
137
- class: "ata-item-text"
138
- }, [e("div", {
139
- class: "ata-item-text-title"
140
- }, [t.title]), e("div", {
141
- class: "ata-item-text-sub"
142
- }, [t.subTitle])]), e("div", {
143
- class: "ata-item-data"
144
- }, [t.amount])]))]), e("div", {
145
- class: "m-b-2r"
146
- }, [this.$t("descriptionBottom")]), i && e("div", {
147
- class: "hint-text"
148
- }, [this.$t("houseWorkDesc1"), " ", document.getElementById("villkor-avdrag") ? e("span", {
149
- on: {
150
- click: () => g(document.getElementById("villkor-avdrag"), {
151
- offset: 80
152
- })
153
- },
154
- attrs: {
155
- className: "cursor-pointer underline"
156
- }
157
- }, [this.$t("houseWorkReadTerms")]) : this.$t("houseWorkReadTerms"), " ", this.$t("houseWorkDesc2")])]);
158
- }
159
- }, f = null, b = null;
160
- var k = /* @__PURE__ */ p(
161
- h,
162
- f,
163
- b,
164
- !1,
165
- null,
166
- "fc277004"
167
- );
168
- const T = k.exports;
169
- export {
170
- T as default
171
- };
@@ -1,154 +0,0 @@
1
- import { m as n } from "./mapFormMixin-y2txvLw9.js";
2
- import { D as l } from "./DocModalBase-D5GdwTI7.js";
3
- import { a as o } from "./DocumentLayout-BA7mFfZh.js";
4
- import { n as a } from "./main-DE5THsiR.js";
5
- const c = {
6
- name: "TermsModal",
7
- components: {
8
- DocModalBase: l,
9
- DocumentStyleContainer: o
10
- },
11
- mixins: [n([])],
12
- props: {
13
- text: {
14
- type: String,
15
- required: !0
16
- }
17
- }
18
- };
19
- var m = function() {
20
- var i;
21
- var e = this, t = e._self._c;
22
- return t("div", [t("div", { staticStyle: { height: "200px", "max-height": "15vh" }, on: { click: function(r) {
23
- return e.$emit("close");
24
- } } }), t("DocModalBase", { staticClass: "terms-root" }, [t("div", { staticClass: "sticky-btn" }, [t("CButton", { staticStyle: { "margin-top": "calc(0.5 * var(--rem))" }, attrs: { circle: "", icon: "x" }, on: { click: function(r) {
25
- return e.$emit("close");
26
- } } })], 1), t("div", { staticStyle: { padding: "0 calc(1 * var(--rem))" } }, [t("DocumentStyleContainer", { staticStyle: { width: "100%", height: "100%" }, attrs: { "input-style": ((i = e._document.data) == null ? void 0 : i.css) || null } }, [t("div", { staticClass: "term-text quill-format", domProps: { innerHTML: e._s(e.text) } })])], 1)])], 1);
27
- }, d = [], f = /* @__PURE__ */ a(
28
- c,
29
- m,
30
- d,
31
- !1,
32
- null,
33
- null
34
- );
35
- const p = f.exports, u = {
36
- name: "TermsDisclaimer",
37
- mixins: [n([])],
38
- inject: {
39
- isPdf: {
40
- default: !1
41
- },
42
- _firstBlock: {
43
- default: !1
44
- },
45
- _lastBlock: {
46
- default: !1
47
- }
48
- },
49
- props: {
50
- href: {
51
- type: String,
52
- default: null
53
- },
54
- termType: {
55
- type: String,
56
- default: null
57
- },
58
- file: {
59
- type: Object,
60
- default: () => ({})
61
- },
62
- text: {
63
- type: String,
64
- default: null
65
- }
66
- },
67
- computed: {
68
- printPdfTerms() {
69
- return this.isPdf ? () => import("./PdfTerms-Q5YuVtrJ.js") : void 0;
70
- }
71
- },
72
- methods: {
73
- openTerms() {
74
- this.$modal.show(
75
- p,
76
- {
77
- text: this.text,
78
- _document: this._document
79
- },
80
- {
81
- adaptive: !0,
82
- height: "auto",
83
- scrollable: !0,
84
- maxWidth: 700,
85
- width: "100%",
86
- classes: "overflow-visible mobile-margin-bottom-0",
87
- transition: "fade-in-slide-up"
88
- }
89
- );
90
- }
91
- },
92
- render(s) {
93
- let e = {};
94
- const t = this.termType;
95
- if (t === "href" ? e = {
96
- href: this.href,
97
- target: "_blank",
98
- rel: "noopener"
99
- } : t === "file" && (e = {
100
- // Some documents with file terms are missing url
101
- href: (this.file.url || "").replace(/\+/g, "%2B"),
102
- target: "_blank",
103
- rel: "noopener"
104
- }), this.$scopedSlots.default)
105
- return this.$scopedSlots.default({
106
- openTerms: t === "text" ? this.openTerms : () => window.open(e.href)
107
- });
108
- if (this.printPdfTerms) {
109
- const r = {
110
- ...t === "text" && { text: this.text },
111
- ...t === "file" && { file: this.file }
112
- };
113
- return s(
114
- "div",
115
- {
116
- class: {
117
- "break-before-page": this.isPdf && !this._firstBlock,
118
- "break-after-page": this.isPdf && !this._lastBlock
119
- }
120
- },
121
- [s(this.printPdfTerms, { attrs: r })]
122
- );
123
- }
124
- const i = {};
125
- return t && (i.attrs = e), t === "text" && (i.on = { click: this.openTerms }), s(
126
- "div",
127
- {
128
- staticClass: "terms-disclaimer"
129
- },
130
- [
131
- s("div", { staticClass: "terms-disclaimer__divider" }),
132
- this._document.$t("chapters.termsDisclaimer.description"),
133
- s(
134
- "a",
135
- i,
136
- this._document.$t("chapters.termsDisclaimer.termsAndConditions")
137
- ),
138
- "."
139
- ]
140
- );
141
- }
142
- }, h = null, _ = null;
143
- var v = /* @__PURE__ */ a(
144
- u,
145
- h,
146
- _,
147
- !1,
148
- null,
149
- "7623e4d6"
150
- );
151
- const k = v.exports;
152
- export {
153
- k as default
154
- };
@@ -1,84 +0,0 @@
1
- import { m as s } from "./mapFormMixin-y2txvLw9.js";
2
- import { B as c } from "./BlockMedia-CqkwdGnE.js";
3
- import { T as a } from "./DocTextEditor-BfOZFDTP.js";
4
- import { f as n } from "./focusDrawerMixin-CawyQaGq.js";
5
- import { b as i, z as l, A as v, B as d, P as u, n as m } from "./main-DE5THsiR.js";
6
- const _ = {
7
- name: "CoverBlock",
8
- components: {
9
- BlockMedia: c,
10
- TextEditor: a,
11
- CoverBlockSettings: () => import("./CoverBlockSettings-C1O_FAde.js")
12
- },
13
- mixins: [s(["coverBlock"]), n],
14
- inject: ["parentSize"],
15
- data() {
16
- return {
17
- showControls: !1
18
- };
19
- },
20
- computed: {
21
- text: {
22
- get() {
23
- const t = i(this, "coverBlock.text", "");
24
- return this.canEdit ? l(
25
- t,
26
- this._document.textTemplateMap,
27
- this._document._doc
28
- ) : v(t, this._document._doc);
29
- },
30
- set(t) {
31
- this.setValue({ key: "text", value: d(t) });
32
- }
33
- },
34
- media() {
35
- const { type: t, cover: e } = this.coverBlock || {};
36
- return { ...e, ...t && { type: t } };
37
- }
38
- },
39
- methods: {
40
- setValue({ key: t, value: e }) {
41
- this.coverBlock = u(this.coverBlock, t, e);
42
- },
43
- onAdd() {
44
- const t = () => this.$refs.editor.focus();
45
- this.$refs.editor ? t() : this.$once("triggerOnAdd", t);
46
- }
47
- }
48
- };
49
- var p = function() {
50
- var e = this, o = e._self._c;
51
- return o("div", { staticClass: "cover-root font-inter", class: { "is-700-plus": e.parentSize.width >= 700 }, on: { "&mouseover": function(r) {
52
- e.showControls = !0;
53
- }, "&mouseleave": function(r) {
54
- e.showControls = !1;
55
- } } }, [o("div", { staticClass: "cover-base" }, [o("BlockMedia", { attrs: { media: e.media } }), o("div", { staticClass: "cover-text-wrapper no-drag" }, [o("div", { staticClass: "cover-text" }, [o("TextEditor", { key: e.canEdit, ref: "editor", attrs: { editable: e.canEdit, mentions: () => e._document.textTemplateItems, snippets: !0, extensions: "all", unstyled: "" }, on: { "hook:mounted": function(r) {
56
- return e.$emit("triggerOnAdd");
57
- } }, model: { value: e.text, callback: function(r) {
58
- e.text = r;
59
- }, expression: "text" } })], 1)])], 1), e.isForm ? [e.showDrawer ? o("portal", { attrs: { to: "drawer-content" } }, [o("CoverBlockSettings", { attrs: { _document: e._document, _value: {
60
- type: `${e._value.coverBlock}.type`,
61
- video: `${e._value.coverBlock}.cover.video`,
62
- resourceUrl: `${e._value.coverBlock}.cover.resourceUrl`,
63
- filter: `${e._value.coverBlock}.cover.filter`,
64
- blur: `${e._value.coverBlock}.cover.blur`,
65
- position: `${e._value.coverBlock}.cover.position`,
66
- overlay: `${e._value.coverBlock}.cover.overlay`,
67
- overlayColor: `${e._value.coverBlock}.cover.overlayColor`,
68
- gradient: `${e._value.coverBlock}.cover.gradient`,
69
- backgroundColor: `${e._value.coverBlock}.cover.backgroundColor`
70
- } } }), o("div", { staticClass: "footer-button", attrs: { slot: "footer" }, slot: "footer" }, [o("CButton", { attrs: { type: "danger", pattern: "tertiary", wide: "" }, on: { click: function(r) {
71
- return e.$emit("section-remove");
72
- } } }, [e._v(" " + e._s(e.$t("_common:remove")) + " ")])], 1)], 1) : e._e()] : e._e()], 2);
73
- }, f = [], k = /* @__PURE__ */ m(
74
- _,
75
- p,
76
- f,
77
- !1,
78
- null,
79
- "a29fb39a"
80
- );
81
- const g = k.exports;
82
- export {
83
- g as default
84
- };
@@ -1,24 +0,0 @@
1
- import { m as r } from "./mapFormMixin-y2txvLw9.js";
2
- import { n } from "./main-DE5THsiR.js";
3
- const s = {
4
- name: "WorkAddressText",
5
- components: {
6
- Read: () => import("./Index-BsguntKl.js")
7
- },
8
- mixins: [r(["street", "city", "zip"])]
9
- };
10
- var o = function() {
11
- var e = this, t = e._self._c;
12
- return t("Read", { attrs: { street: e.street, city: e.city, zip: e.zip } });
13
- }, i = [], a = /* @__PURE__ */ n(
14
- s,
15
- o,
16
- i,
17
- !1,
18
- null,
19
- null
20
- );
21
- const p = a.exports;
22
- export {
23
- p as default
24
- };
@@ -1,107 +0,0 @@
1
- import { m as i } from "./mapFormMixin-y2txvLw9.js";
2
- import { V as n } from "./PdfViewer-zcWl8XZT.js";
3
- import { c as l, d as o, n as d } from "./main-DE5THsiR.js";
4
- const u = {
5
- i18nOptions: {
6
- namespaces: "pdfBlock",
7
- messages: {
8
- en: {
9
- embedded: "Embedded",
10
- numOfPages: "- {{numPages}} pages",
11
- upload: "Upload PDF"
12
- },
13
- sv: {
14
- embedded: "Inbäddat",
15
- numOfPages: "- {{numPages}} sidor",
16
- upload: "Ladda upp en pdf"
17
- }
18
- }
19
- },
20
- name: "Pdf",
21
- components: {
22
- PdfViewer: n,
23
- FileIcon: () => import("./Index-DWxzUBff.js"),
24
- BaseUpload: () => import("./BaseUpload-D4FCjlhL.js")
25
- },
26
- mixins: [i(["file"])],
27
- inject: {
28
- isPdf: {
29
- default: !1
30
- },
31
- _firstBlock: {
32
- default: !1
33
- },
34
- _lastBlock: {
35
- default: !1
36
- }
37
- },
38
- data() {
39
- return {
40
- uploadProgress: null,
41
- isHover: !1,
42
- numPages: null,
43
- maxFileSize: 1e3 * 1e3 * 30
44
- // 30 MB
45
- };
46
- },
47
- computed: {
48
- showControls() {
49
- return !this.file || this.isHover || this.uploadProgress !== null;
50
- },
51
- // Fetch the file from API instead of AWS directly
52
- fileUrl() {
53
- if (!this.file || !this.file.url)
54
- return null;
55
- if (this.file.url.startsWith(l.api.baseUrl))
56
- return this.file.url;
57
- try {
58
- const { hostname: a } = new URL(this.file.url);
59
- if (Object.keys(o).some(
60
- (s) => a.includes(o[s].domain)
61
- ))
62
- return this.file.url;
63
- } catch {
64
- }
65
- return `${l.api.baseUrl}/public/fileProxy?url=${encodeURIComponent(
66
- this.file.url
67
- )}`;
68
- }
69
- },
70
- methods: {
71
- onUploadSuccess(a) {
72
- const { id: e, displayName: s, url: t, mime: r } = a.response;
73
- if (!e)
74
- throw new Error("Could not read id from uploaded file");
75
- this.file = {
76
- fileId: e,
77
- name: s,
78
- mime: r,
79
- url: t
80
- }, this.$refs.uploader.remove(a), this.uploadProgress = null;
81
- }
82
- }
83
- };
84
- var f = function() {
85
- var e = this, s = e._self._c;
86
- return s("div", { staticClass: "font-inter print-no-margin", staticStyle: { position: "relative" }, on: { mouseover: function(t) {
87
- e.isHover = !0;
88
- }, mouseleave: function(t) {
89
- e.isHover = !1;
90
- } } }, [e.canEdit ? s("div", { directives: [{ name: "show", rawName: "v-show", value: e.showControls, expression: "showControls" }], staticClass: "chapter-spacing-x pointer-events-none mx-auto flex max-w-full items-center justify-center", class: !!e.file && "absolute left-0 right-0 top-2 z-10" }, [s("div", { staticClass: "pointer-events-auto flex w-full max-w-[95%] items-center rounded-lg bg-gray-100 !p-4 text-left", class: !!e.file && "border border-gray-200 !p-2 shadow-lg" }, [s("FileIcon", { attrs: { mime: "application/pdf" } }), s("div", { staticClass: "flex-auto pl-4" }, [s("div", { staticClass: "font-medium" }, [e._v("PDF")]), s("div", { staticClass: "text-sm text-gray-600" }, [e._v(" " + e._s(e.$t("embedded")) + " " + e._s(e.numPages ? e.$t("numOfPages", { numPages: e.numPages }) : "") + " ")])]), s("BaseUpload", { ref: "uploader", attrs: { "autostart-upload": !0, "background-drop": !1, extensions: "pdf", accept: "application/pdf", "max-size": e.maxFileSize }, on: { input: ([t]) => e.uploadProgress = t ? parseInt(t.progress, 10) : null, "upload-success": e.onUploadSuccess }, scopedSlots: e._u([{ key: "default", fn: function({ openFilePicker: t }) {
91
- return [s("CButton", { staticStyle: { "z-index": "2" }, attrs: { type: e.file ? "none" : "secondary", pattern: e.file ? "secondary" : "primary", disabled: e.uploadProgress !== null }, on: { click: t } }, [e.uploadProgress !== null ? [e._v(" " + e._s(`${e.uploadProgress}% ${e.$t("_common:uploading")}`) + " ")] : [e._v(" " + e._s(e.file ? e.$t("_common:change", { thing: e.$t("_common:file") }) : e.$t("upload")) + " ")]], 2)];
92
- } }], null, !1, 3134809537) })], 1)]) : e._e(), e.file ? s("div", [s("div", { class: {
93
- "break-before-page": e.isPdf && !e._firstBlock,
94
- "break-after-page": e.isPdf && !e._lastBlock
95
- } }, [e.file && e.file.url ? s("PdfViewer", { attrs: { src: e.fileUrl, toolbar: !e.canEdit, "doc-file-path": `${e._value.file}.url` }, on: { numPages: (t) => e.numPages = t } }) : e._e()], 1)]) : e._e()]);
96
- }, c = [], p = /* @__PURE__ */ d(
97
- u,
98
- f,
99
- c,
100
- !1,
101
- null,
102
- null
103
- );
104
- const _ = p.exports;
105
- export {
106
- _ as default
107
- };