@cling-se/widget 0.14.4 → 0.14.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/AddClientCallout-C7abPZ87.js +46 -0
  2. package/dist/AnswerModal-CsA2pl2P.js +3874 -0
  3. package/dist/AttachmentItem-Da1-7xwf.js +78 -0
  4. package/dist/BaseDatePicker-k9zlSi5J.js +3183 -0
  5. package/dist/BaseUpload-BUrXX3fT.js +1977 -0
  6. package/dist/BlockMedia-CYI07qAn.js +76 -0
  7. package/dist/CCallout-Qwae66vo.js +59 -0
  8. package/dist/CCurrencyDropdown-Y_u0hgBx.js +246 -0
  9. package/dist/CDropdownItem-CXJ4xD8W.js +538 -0
  10. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +1 -0
  11. package/dist/CFormField--m3PvQuT.js +241 -0
  12. package/dist/CPhoneFormat-Qg6MkDVP.js +62 -0
  13. package/dist/CPriceInput-Dlx44UrR.js +112 -0
  14. package/dist/CTabs.vue_vue_type_style_index_0_scoped_b7262014_lang-l0sNRNKZ.js +1 -0
  15. package/dist/ClientAutocomplete-BKKc_br6.js +78 -0
  16. package/dist/ClientModal-CVZFb1Br.js +625 -0
  17. package/dist/ColorPicker-Bo3s3Esp.js +2879 -0
  18. package/dist/CompanyModal-DadjAioS.js +141 -0
  19. package/dist/ContentWrapper-BC3ZBQW9.js +183 -0
  20. package/dist/CoverBlockSettings-B484eE4g.js +275 -0
  21. package/dist/DocAnswer-CcYryOWI.js +36 -0
  22. package/dist/DocDetails-BigsoEWL.js +246 -0
  23. package/dist/DocForm-DlN0eNWt.js +7273 -0
  24. package/dist/DocFormSend-TqKo210I.js +143 -0
  25. package/dist/DocLinks-DSo54vDn.js +38 -0
  26. package/dist/DocModalBase-XlM1SThW.js +28 -0
  27. package/dist/DocPrint-tD0Vd9Sw.js +240 -0
  28. package/dist/DocReceipt-CDHPrhXM.js +210 -0
  29. package/dist/DocSendReminder-C62RhltH.js +137 -0
  30. package/dist/DocTextEditor-VjhV9IRp.js +17181 -0
  31. package/dist/DocTimeline-LcW4z3nC.js +481 -0
  32. package/dist/DocumentClient-CqbTRdpB.js +136 -0
  33. package/dist/DocumentLayout-Dbf8_01r.js +4909 -0
  34. package/dist/DocumentLogotype-DXYnBedV.js +87 -0
  35. package/dist/DocumentVoided-vH1Ti5lZ.js +25 -0
  36. package/dist/EmbedInput-D9qP8OnY.js +113 -0
  37. package/dist/EmbedSettings-DISuNqJT.js +72 -0
  38. package/dist/ErrorCallout-CCtCVwSh.js +28 -0
  39. package/dist/FilePreviewModal-BjhNyb6L.js +81 -0
  40. package/dist/Flag-Dhukv9_J.js +114 -0
  41. package/dist/HeaderSettings-CK4SkB1x.js +392 -0
  42. package/dist/ImageSelectModal-DnvPZzXx.js +84 -0
  43. package/dist/ImageUploadWrapper-B7cNMu5a.js +1604 -0
  44. package/dist/Index-B3HoK_cZ.js +84 -0
  45. package/dist/Index-B3aucNji.js +25 -0
  46. package/dist/Index-B9H5MMHb.js +62 -0
  47. package/dist/Index-BAYdvT-t.js +754 -0
  48. package/dist/Index-BLeQprjq.js +46 -0
  49. package/dist/Index-BOyvQlng.js +154 -0
  50. package/dist/Index-BVsw2tak.js +70 -0
  51. package/dist/Index-BY1UKGEO.js +98 -0
  52. package/dist/Index-Bh0kMSsA.js +107 -0
  53. package/dist/Index-BlQSM7tC.js +144 -0
  54. package/dist/Index-BpcJBGGd.js +642 -0
  55. package/dist/Index-Bs8wprXw.js +58 -0
  56. package/dist/Index-BvZZAvFd.js +21 -0
  57. package/dist/Index-CFo-3Y5Q.js +26 -0
  58. package/dist/Index-CNvp5K3L.js +559 -0
  59. package/dist/Index-CPJVx14x.js +171 -0
  60. package/dist/Index-CQ325eVT.js +140 -0
  61. package/dist/Index-CWrDtcfT.js +49 -0
  62. package/dist/Index-CyJnSvDR.js +223 -0
  63. package/dist/Index-D6bc7lg4.js +52 -0
  64. package/dist/Index-DCR8ev4U.js +33 -0
  65. package/dist/Index-DGQSB9cH.js +24 -0
  66. package/dist/Index-DXAvlq74.js +292 -0
  67. package/dist/Index-D_rfst8y.js +45 -0
  68. package/dist/Index-Dm8xMFGg.js +61 -0
  69. package/dist/Index-DtSSgtxB.js +55 -0
  70. package/dist/Index-DuTw9vhb.js +77 -0
  71. package/dist/Index-Dw26jtGV.js +31 -0
  72. package/dist/Index-OxN73_fO.js +32 -0
  73. package/dist/Index-S-FHG7_k.js +2402 -0
  74. package/dist/Index-ZFkitzfq.js +69 -0
  75. package/dist/Index-dyWK9jgr.js +25 -0
  76. package/dist/Index-gb11ngPS.js +57 -0
  77. package/dist/Index-lKk_XKJ3.js +150 -0
  78. package/dist/InputToggleRow-DSSvhPKA.js +57 -0
  79. package/dist/ManualPopover-lpJYSkw5.js +58 -0
  80. package/dist/MediaWrapper-BQ22FA2B.js +23 -0
  81. package/dist/NotBindingText-JxwzZLPP.js +32 -0
  82. package/dist/PackageGroup-BLSMSUDz.js +699 -0
  83. package/dist/PdfTerms-DtutjM5Y.js +36 -0
  84. package/dist/PdfViewer-BsxcZI_x.js +374 -0
  85. package/dist/PlainHtml-BMPZs2fT.js +20 -0
  86. package/dist/PriceHeader-BRYY01H2.js +339 -0
  87. package/dist/SearchApi-6001iFxU.js +161 -0
  88. package/dist/Setup-cw6jMI9M.js +50 -0
  89. package/dist/SmartList-q6H-uLbm.js +83 -0
  90. package/dist/TermsSettings-DWvaPneu.js +102 -0
  91. package/dist/ThemeColorRow-BXWnvfz-.js +67 -0
  92. package/dist/ToggleBinding-DydtwpNG.js +38 -0
  93. package/dist/UploadModal-D_EDKHGD.js +95 -0
  94. package/dist/VideoPlayerInput-B9yzUeBW.js +93 -0
  95. package/dist/VideoPlayerSettings-Bvp9l0yj.js +61 -0
  96. package/dist/VideoSelectModal-DY3N4JiS.js +100 -0
  97. package/dist/anime.es-BrPTThYb.js +858 -0
  98. package/dist/answerDocumentMixin-BYZPU_R-.js +51 -0
  99. package/dist/color-TdtKxwVa.js +19 -0
  100. package/dist/debounce-BPnlzNwd.js +84 -0
  101. package/dist/dom-CJxkno7i.js +91 -0
  102. package/dist/favicon.ico +0 -0
  103. package/dist/focusDrawerMixin-DC9Oa1i7.js +22 -0
  104. package/dist/formComponentsInstall-CEW6TK6z.js +2499 -0
  105. package/dist/formDrawerState-CAzvSMiQ.js +20 -0
  106. package/dist/formValidationMixin-D7zXxCpC.js +49 -0
  107. package/dist/i18nMessages-Chz_lxGG.js +17 -0
  108. package/dist/index-B9WDC3Xe.js +166 -0
  109. package/dist/index-BCMaUC5r.js +3916 -0
  110. package/dist/index-BDMI4NVY.js +492 -0
  111. package/dist/index-BbscgdRg.js +81 -0
  112. package/dist/index-CLUljEDI.js +347 -0
  113. package/dist/index-SxyZvewN.js +102 -0
  114. package/dist/index.es.js +35 -0
  115. package/dist/index.umd.js +3148 -0
  116. package/dist/main-CQBEuZk9.js +56739 -0
  117. package/dist/mapFormMixin-DlFcgwhm.js +72 -0
  118. package/dist/omit-BWy0Zhd3.js +31 -0
  119. package/dist/publicSenderState-CvOcFv2U.js +21 -0
  120. package/dist/splitpanes-BHUVsCZF.js +382 -0
  121. package/dist/style.css +4 -0
  122. package/dist/throttle-BrC8eGjQ.js +18 -0
  123. package/dist/tinycolor-PhFP695w.js +633 -0
  124. package/dist/tippy.esm-7dmKOUvu.js +1799 -0
  125. package/dist/utils-NBLgNGHR.js +108 -0
  126. package/dist/vuedraggable.umd-ByfH7ZxC.js +3161 -0
  127. package/dist/vuex.esm-DKGl8mcw.js +467 -0
  128. package/package.json +1 -1
  129. package/vite.config.ts +0 -1
@@ -0,0 +1,171 @@
1
+ import { P as m } from "./PlainHtml-BMPZs2fT.js";
2
+ import { T as c, w as u, n as p } from "./main-CQBEuZk9.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
+ "16d94649"
167
+ );
168
+ const T = k.exports;
169
+ export {
170
+ T as default
171
+ };
@@ -0,0 +1,140 @@
1
+ import { m as o } from "./mapFormMixin-DlFcgwhm.js";
2
+ import { n as s, U as l } from "./main-CQBEuZk9.js";
3
+ import { v as a } from "./index-BDMI4NVY.js";
4
+ const c = (e, t) => e ? l(t.workStartAt || /* @__PURE__ */ new Date(), e) >= 0 : !0, u = {
5
+ name: "ExtraWorkTimeImpactTextEdit",
6
+ i18nOptions: {
7
+ namespaces: "ExtraWorkTimeImpactTextEdit",
8
+ messages: {
9
+ en: {
10
+ placeholders: {
11
+ workStartAt: "Start date",
12
+ workEndAt: "End date"
13
+ },
14
+ inlineForm: {
15
+ 1: "Work will start",
16
+ 2: "and will be completed no later than",
17
+ 3: "Due to the work the original project time"
18
+ },
19
+ error: "End date needs to be after start date"
20
+ },
21
+ sv: {
22
+ placeholders: {
23
+ workStartAt: "Startdatum",
24
+ workEndAt: "Slutdatum"
25
+ },
26
+ inlineForm: {
27
+ 1: "Arbetet kommer påbörjas",
28
+ 2: "och är senast klar",
29
+ 3: "Med anledning av arbetet kommer den ursprungliga kontraktstiden"
30
+ },
31
+ error: "Slutdatumet måste vara efter startdatumet."
32
+ }
33
+ }
34
+ },
35
+ mixins: [
36
+ o([
37
+ "workStartAt",
38
+ "workEndAt",
39
+ "timeUnit",
40
+ "noOfTimeUnits",
41
+ "timeDeltaDirection"
42
+ ])
43
+ ],
44
+ data() {
45
+ return {
46
+ isOpen: !1,
47
+ // Variable to store the old content when the card is disabled
48
+ hiddenModuleDateDelay: null
49
+ };
50
+ },
51
+ validations: {
52
+ workStartAt: {
53
+ required: a.requiredIf(
54
+ (e) => e.workStartAt || e.workEndAt || e.timeDeltaDirection || e.noOfTimeUnits || e.timeUnit
55
+ )
56
+ },
57
+ workEndAt: {
58
+ required: a.requiredIf(
59
+ (e) => e.workStartAt || e.workEndAt || e.timeDeltaDirection || e.noOfTimeUnits || e.timeUnit
60
+ ),
61
+ endDateMustBeGreater: c
62
+ },
63
+ timeDeltaDirection: {
64
+ required: a.requiredIf(
65
+ (e) => e.workStartAt || e.workEndAt || e.timeDeltaDirection || e.noOfTimeUnits || e.timeUnit
66
+ )
67
+ },
68
+ noOfTimeUnits: {
69
+ required: a.requiredIf(
70
+ (e) => e.workStartAt || e.workEndAt || e.timeDeltaDirection || e.noOfTimeUnits || e.timeUnit
71
+ )
72
+ },
73
+ timeUnit: {
74
+ required: a.requiredIf(
75
+ (e) => e.workStartAt || e.workEndAt || e.timeDeltaDirection || e.noOfTimeUnits || e.timeUnit
76
+ )
77
+ }
78
+ },
79
+ mounted() {
80
+ const {
81
+ workStartAt: e,
82
+ workEndAt: t,
83
+ timeUnit: r,
84
+ noOfTimeUnits: i,
85
+ timeDeltaDirection: n
86
+ } = this;
87
+ (e || t || r || i || n) && (this.isOpen = !0);
88
+ },
89
+ methods: {
90
+ getDateValue(e) {
91
+ return e ? this.$formatDate(e, "yyyy-MM-dd") : null;
92
+ },
93
+ // Method to handle internal data when open/closed
94
+ toggleOpen(e) {
95
+ return e ? !0 : (this.clearRoot(), this.$v.$touch(), !1);
96
+ },
97
+ // Method to set the root object to null to clear data
98
+ clearRoot() {
99
+ const e = this._value.workStartAt.split(".");
100
+ e.pop();
101
+ const t = e.join(".");
102
+ this.$emit("input", { key: t, value: void 0 });
103
+ }
104
+ }
105
+ };
106
+ var m = function() {
107
+ var t = this, r = t._self._c;
108
+ return r("div", { staticStyle: { position: "relative" } }, [r("CSwitch", { staticStyle: { position: "absolute", right: "0", top: "calc(-0.5 * var(--rem))", transform: "translateY(-100%)" }, on: { input: t.toggleOpen }, model: { value: t.isOpen, callback: function(i) {
109
+ t.isOpen = i;
110
+ }, expression: "isOpen" } }), t.isOpen ? r("div", [r("div", { staticClass: "inline-form" }, [t._v(" " + t._s(t.$t("inlineForm.1")) + " "), r("input", { staticClass: "ml-1 bg-gray-100", attrs: { type: "date", max: t.getDateValue(t.workEndAt) }, domProps: { value: t.getDateValue(t.workStartAt) }, on: { input: function(i) {
111
+ var n;
112
+ t.workStartAt = (n = i.target) != null && n.value ? new Date(i.target.value).toISOString() : null;
113
+ } } }), t._v(" " + t._s(t.$t("inlineForm.2")) + " "), r("input", { staticClass: "ml-1 bg-gray-100", attrs: { type: "date", min: t.getDateValue(t.workStartAt) }, domProps: { value: t.getDateValue(t.workEndAt) }, on: { input: function(i) {
114
+ var n;
115
+ t.workEndAt = (n = i.target) != null && n.value ? new Date(i.target.value).toISOString() : null;
116
+ } } }), t._v(". " + t._s(t.$t("inlineForm.3")) + " "), r("CSelect", { staticClass: "select-width input-inline-language", attrs: { placeholder: t.$t("_common:select") }, model: { value: t.timeDeltaDirection, callback: function(i) {
117
+ t.timeDeltaDirection = i;
118
+ }, expression: "timeDeltaDirection" } }, [r("option", { attrs: { value: "extend" } }, [t._v(" " + t._s(t.$t("_common:extend").toLowerCase()) + " ")]), r("option", { attrs: { value: "shorten" } }, [t._v(" " + t._s(t.$t("_common:shorten").toLowerCase()) + " ")])]), t._v(" " + t._s(t.$t("_common:with")) + " "), r("CSelect", { staticClass: "select-width quantity input-inline-language", staticStyle: { width: "calc(2 * var(--rem))", "margin-right": "calc(0.5 * var(--rem))" }, attrs: { placeholder: t.$t("_common:select") }, model: { value: t.noOfTimeUnits, callback: function(i) {
119
+ t.noOfTimeUnits = i;
120
+ }, expression: "noOfTimeUnits" } }, t._l(31, function(i, n) {
121
+ return r("option", { key: n, staticStyle: { "font-size": "calc(calc(1 * var(--rem)) + 1px)", "text-align": "center" }, domProps: { value: i - 1 } }, [t._v(" " + t._s(i - 1) + " ")]);
122
+ }), 0), r("CSelect", { staticClass: "select-width unit input-inline-language", attrs: { placeholder: t.$t("_common:select") }, on: { blur: function(i) {
123
+ return t.$v.timeUnit.$touch();
124
+ } }, model: { value: t.timeUnit, callback: function(i) {
125
+ t.timeUnit = i;
126
+ }, expression: "timeUnit" } }, [r("option", { attrs: { value: "days" } }, [t._v(t._s(t.$t("_common:day_plural")))]), r("option", { attrs: { value: "weeks" } }, [t._v(t._s(t.$t("_common:week_plural")))]), r("option", { attrs: { value: "months" } }, [t._v(" " + t._s(t.$t("_common:month_plural")) + " ")])]), t._v(". ")], 1), t.$v.$invalid && t.$v.$dirty ? r("div", { staticClass: "error-wrapper", on: { click: function(i) {
127
+ return t.$v.$touch();
128
+ } } }, [r("svg", { attrs: { name: "info-icon", width: "14", height: "14", viewBox: "0 0 125 125", xmlns: "http://www.w3.org/2000/svg" } }, [r("path", { attrs: { d: "M62.5 125C27.9822 125 0 97.0178 0 62.5S27.9822 0 62.5 0 125 27.9822 125 62.5 97.0178 125 62.5 125zM52.44694 65.23395v26.93183c0 5.43129 4.40293 9.83422 9.83422 9.83422 5.4461 0 9.87524-4.38793 9.92615-9.83379l.25177-26.93269c.05142-5.50025-4.36573-10.00077-9.86598-10.05219a9.963143 9.963143 0 0 0-.0931-.00043c-5.55215 0-10.05306 4.5009-10.05306 10.05305zm.43768-31.76657c0 5.25109 4.2545 9.50584 9.5027 9.50584h.22536c5.2467 0 9.5027-4.25591 9.5027-9.50584 0-5.25109-4.2545-9.50584-9.5027-9.50584h-.22536c-5.2467 0-9.5027 4.25591-9.5027 9.50584z", fill: "currentColor", "fill-rule": "evenodd" } })]), t._v(" " + t._s(t.$t("error")) + " ")]) : t._e()]) : t._e()], 1);
129
+ }, d = [], p = /* @__PURE__ */ s(
130
+ u,
131
+ m,
132
+ d,
133
+ !1,
134
+ null,
135
+ "88caf6a2"
136
+ );
137
+ const k = p.exports;
138
+ export {
139
+ k as default
140
+ };
@@ -0,0 +1,49 @@
1
+ import { m as s } from "./mapFormMixin-DlFcgwhm.js";
2
+ import { T as i } from "./DocTextEditor-VjhV9IRp.js";
3
+ import { z as r, A as a, B as c, n as m } from "./main-CQBEuZk9.js";
4
+ const d = {
5
+ name: "TextContent",
6
+ components: {
7
+ TextEditor: i
8
+ },
9
+ mixins: [s(["content"])],
10
+ computed: {
11
+ value: {
12
+ get() {
13
+ return this.canEdit ? r(
14
+ this.content,
15
+ this._document.textTemplateMap,
16
+ this._document._doc
17
+ ) : a(this.content, this._document._doc);
18
+ },
19
+ set(e) {
20
+ this.content = c(e);
21
+ }
22
+ }
23
+ },
24
+ methods: {
25
+ onAdd() {
26
+ const e = () => this.$refs.textEditor.focus();
27
+ this.$refs.textEditor ? e() : this.$once("triggerOnAdd", e);
28
+ }
29
+ }
30
+ };
31
+ var l = function() {
32
+ var t = this, n = t._self._c;
33
+ return n("div", { staticClass: "quill-format", staticStyle: { "font-size": "16px" } }, [n("TextEditor", { ref: "textEditor", staticClass: "text-editor", staticStyle: { "margin-bottom": "1em" }, attrs: { placeholder: t.$t("components:account.documentForm.titleAndText.text"), mentions: () => t._document.textTemplateItems, snippets: !0, "is-absolute": !0 }, on: { "hook:mounted": function(o) {
34
+ return t.$emit("triggerOnAdd");
35
+ } }, model: { value: t.value, callback: function(o) {
36
+ t.value = o;
37
+ }, expression: "value" } })], 1);
38
+ }, u = [], p = /* @__PURE__ */ m(
39
+ d,
40
+ l,
41
+ u,
42
+ !1,
43
+ null,
44
+ "b477a743"
45
+ );
46
+ const h = p.exports;
47
+ export {
48
+ h as default
49
+ };
@@ -0,0 +1,223 @@
1
+ import { m as C } from "./mapFormMixin-DlFcgwhm.js";
2
+ import { n as f, b as _ } from "./main-CQBEuZk9.js";
3
+ import { C as b } from "./CPhoneFormat-Qg6MkDVP.js";
4
+ const $ = {
5
+ name: "DocPartiesItem",
6
+ components: {
7
+ CPhoneFormat: b
8
+ },
9
+ props: {
10
+ label: {
11
+ type: String,
12
+ required: !0
13
+ },
14
+ data: {
15
+ type: [String, Object],
16
+ required: !0
17
+ },
18
+ type: {
19
+ type: String,
20
+ default: ""
21
+ },
22
+ canEdit: {
23
+ type: Boolean,
24
+ default: !1
25
+ }
26
+ }
27
+ };
28
+ var w = function() {
29
+ var e = this, t = e._self._c;
30
+ return t("div", { staticClass: "client-row" }, [t("div", { staticClass: "label" }, [e._v(" " + e._s(e.label) + " ")]), t("div", { staticClass: "data", class: {
31
+ "is-editable": e.canEdit
32
+ } }, [t("span", { on: { click: function(i) {
33
+ return e.$emit("click");
34
+ } } }, [e.type === "phone" ? t("CPhoneFormat", { attrs: { phone: e.data.cellphone, region: e.data.region } }) : [e._v(e._s(e.data))]], 2)])]);
35
+ }, k = [], x = /* @__PURE__ */ f(
36
+ $,
37
+ w,
38
+ k,
39
+ !1,
40
+ null,
41
+ "4c4b7148"
42
+ );
43
+ const S = x.exports, F = {
44
+ client: () => import("./ClientModal-CVZFb1Br.js"),
45
+ company: () => import("./CompanyModal-DadjAioS.js")
46
+ }, I = {
47
+ i18nOptions: {
48
+ namespaces: "components"
49
+ },
50
+ name: "DocParties",
51
+ components: {
52
+ DocPartiesItem: S,
53
+ AddClientCallout: () => import("./AddClientCallout-C7abPZ87.js")
54
+ },
55
+ mixins: [C()],
56
+ props: {
57
+ // todo: atm custom behaviour for path 'data.sender' through doc-class
58
+ parties: {
59
+ type: [Array, Object],
60
+ default: () => []
61
+ }
62
+ },
63
+ data() {
64
+ return {
65
+ type: "client",
66
+ hoverIndex: null
67
+ };
68
+ },
69
+ computed: {
70
+ mappedParties() {
71
+ const n = (t, i = {}) => this._document.$t(t, { postProcess: "capitalize", ...i });
72
+ return (Array.isArray(this.parties) ? this.parties : [this.parties]).map((t) => {
73
+ const {
74
+ orgNo: i,
75
+ socialNo: a,
76
+ companyName: s,
77
+ name: r,
78
+ type: d,
79
+ cellphone: m,
80
+ cellphoneRegion: y,
81
+ email: u,
82
+ addresses: l,
83
+ hasFSkatt: v,
84
+ hasInsurance: h
85
+ } = t, c = d === "individual", o = l && (l.standard || l.work);
86
+ o && (o.formKey = l.standard ? "street" : "workStreet");
87
+ const g = [
88
+ s && {
89
+ label: n("company"),
90
+ value: s,
91
+ formKey: "name"
92
+ },
93
+ i && {
94
+ label: n("orgNoShort"),
95
+ value: i,
96
+ formKey: "orgNo"
97
+ },
98
+ r && {
99
+ label: n(c ? "name" : "reference"),
100
+ value: r,
101
+ formKey: c ? "name" : "reference"
102
+ },
103
+ a && c && {
104
+ label: n("socialNo"),
105
+ value: a,
106
+ formKey: "orgNo"
107
+ },
108
+ u && {
109
+ label: n("email"),
110
+ value: u,
111
+ formKey: "email"
112
+ },
113
+ m && {
114
+ label: n("phone"),
115
+ type: "phone",
116
+ value: {
117
+ cellphone: m,
118
+ region: y || _(this._document, "sender.company.region", "")
119
+ },
120
+ formKey: "cellphone"
121
+ },
122
+ o && {
123
+ label: n("address"),
124
+ value: this.parseStreet(o.street, o.city, o.zip),
125
+ formKey: o.formKey
126
+ }
127
+ ], p = [];
128
+ return v && p.push({
129
+ label: this._document.$t("chapters.parties.fTax"),
130
+ value: v
131
+ }), h && p.push({
132
+ label: this._document.$t("chapters.parties.allRiskAndLiability"),
133
+ value: h
134
+ }), {
135
+ main: g,
136
+ checks: p
137
+ };
138
+ });
139
+ }
140
+ },
141
+ created() {
142
+ _(this, "_value.parties", "") !== "clients" && (this.type = "company");
143
+ },
144
+ methods: {
145
+ openModal({ formKey: n, index: e } = {}) {
146
+ var a;
147
+ let t = "name", i = !1;
148
+ n && (t = n, ["name", "email", "cellphone", "reference"].includes(n) || (i = !0)), this.$modal.show(F[this.type], {
149
+ inputFocusOnMount: t,
150
+ forceExpand: i,
151
+ documentClientIndex: e,
152
+ signOptions: (a = this._document) == null ? void 0 : a.signOptions,
153
+ setFormValue: this.viewSettings.setFormValue,
154
+ removeFormValue: this.viewSettings.removeFormValue,
155
+ isPublicForm: this.viewSettings.isPublicForm
156
+ });
157
+ },
158
+ removeClient(n) {
159
+ this.parties[n] && this.removeField(`clients[${n}]`);
160
+ },
161
+ parseStreet(n, e, t) {
162
+ let i = "";
163
+ return n && (i += n), n && (t || e) && (i += ", "), t && (i += ` ${t}`), e && (i += ` ${e}`), i;
164
+ },
165
+ searchEndCustomers(n, e) {
166
+ n({
167
+ q: e,
168
+ cb: ({ endCustomer: t }) => {
169
+ this.results = t;
170
+ }
171
+ });
172
+ },
173
+ setClient(n) {
174
+ this.$emit("input", {
175
+ key: `clients[${this.parties.length}]`,
176
+ value: n
177
+ });
178
+ }
179
+ }
180
+ };
181
+ var P = function() {
182
+ var e = this, t = e._self._c;
183
+ return t("div", { staticStyle: { position: "relative" } }, [e.viewSettings.canEdit ? t("div", { staticClass: "edit-button" }, [e.type === "company" ? t("CButton", { attrs: { type: "none", size: "small", pattern: "secondary" }, on: { click: e.openModal } }, [e._v(" " + e._s(e.$t("_common:edit").capitalize()) + " ")]) : e.parties.length && e.type === "client" ? t("CDropdown", { ref: "dropdown", attrs: { position: "is-bottom-left" } }, [t("CButton", { attrs: { slot: "trigger", type: "none", size: "small", pattern: "secondary", "icon-right": "chevron-down" }, slot: "trigger" }, [e._v(" " + e._s(e.$t("_common:more").capitalize()) + " ")]), t("CDropdownItem", { attrs: { "icon-props": {
184
+ class: "text-primary-500"
185
+ }, "icon-left": "plus-circle" }, on: { click: function(i) {
186
+ return e.openModal({ index: e.parties.length });
187
+ } } }, [e._v(" " + e._s(e.$t("components:account.documentForm.clients.add.extra")) + " ")]), t("CDropdownItem", { attrs: { separator: "" } }), e._l(e.parties, function(i, a) {
188
+ return t("CDropdownItem", { key: a, attrs: { "icon-props": {
189
+ class: "text-gray-400"
190
+ }, "icon-left": "edit" }, on: { click: function(s) {
191
+ return e.openModal({ index: a });
192
+ } } }, [e._v(" " + e._s(i.type === "individual" ? i.name : i.companyName || i.name) + " ")]);
193
+ })], 2) : e._e()], 1) : e._e(), e.viewSettings.canEdit ? [e.type === "client" && !(e.parties && e.parties.length) ? t("AddClientCallout", { on: { add: function(i) {
194
+ return e.openModal({ index: e.parties.length });
195
+ }, setClient: e.setClient } }) : e._e(), e.type === "company" && e.viewSettings.isPublicForm && !(e.parties.companyName || e.parties.email) ? t("CCallout", { attrs: { title: e.$t("document.chapters.parties.missingSender.title") } }, [t("div", { staticStyle: { "padding-bottom": "1em" } }, [e._v(" " + e._s(e.$t("document.chapters.parties.missingSender.description")) + " ")]), t("CButton", { attrs: { "icon-left": "plus", type: "secondary" }, on: { click: e.openModal } }, [e._v(" " + e._s(e.$t("_common:add", { thing: e.$t("_common:info") })) + " ")])], 1) : e._e()] : e._e(), e._l(e.mappedParties, function(i, a) {
196
+ return t("div", { key: a, staticClass: "party-wrapper print-avoid-break-inside", on: { "&mouseover": function(s) {
197
+ e.hoverIndex = a;
198
+ }, "&mouseleave": function(s) {
199
+ e.hoverIndex = null;
200
+ } } }, [e.viewSettings.canEdit && e.type !== "company" && e.hoverIndex === a ? t("div", { staticClass: "controls", staticStyle: { position: "absolute", left: "100%", top: "0", "padding-left": "calc(0.5 * var(--rem))" } }, [t("CButton", { attrs: { circle: "", size: "small", icon: "edit", type: "none", pattern: "tertiary" }, on: { click: function(s) {
201
+ return e.openModal({ index: a });
202
+ } } }), t("CButton", { attrs: { circle: "", size: "small", icon: "x", type: "none", pattern: "tertiary" }, on: { click: function(s) {
203
+ return e.removeClient(a);
204
+ } } })], 1) : e._e(), e._l(i.main, function(s, r) {
205
+ return [s ? t("DocPartiesItem", { key: r, attrs: { label: s.label, data: s.value, type: s.type, "can-edit": e.viewSettings.canEdit }, on: { click: function(d) {
206
+ e.viewSettings.canEdit && e.openModal({ formKey: s.formKey, index: a });
207
+ } } }) : e._e()];
208
+ }), i.checks && i.checks.length ? t("div", { staticStyle: { width: "100%", "padding-top": "calc(1 * var(--rem))" } }, e._l(i.checks, function(s, r) {
209
+ return t("div", { key: r, staticClass: "check-text" }, [t("svg", { attrs: { width: "11", height: "11", viewBox: "0 0 218 185", xmlns: "http://www.w3.org/2000/svg" } }, [t("path", { staticClass: "primary-svg-fill", attrs: { d: "M217.931476 30.821773L180.506583.515692 85.82601 117.436462 29.993388 72.224097.068524 109.178227l93.257515 75.518447z", fill: "#D8D8D8", "fill-rule": "evenodd" } })]), t("div", [e._v(e._s(s.label))])]);
210
+ }), 0) : e._e()], 2);
211
+ })], 2);
212
+ }, D = [], M = /* @__PURE__ */ f(
213
+ I,
214
+ P,
215
+ D,
216
+ !1,
217
+ null,
218
+ "fe6ebb87"
219
+ );
220
+ const N = M.exports;
221
+ export {
222
+ N as default
223
+ };
@@ -0,0 +1,52 @@
1
+ import { m as o } from "./mapFormMixin-DlFcgwhm.js";
2
+ import { I as i } from "./InputToggleRow-DSSvhPKA.js";
3
+ import { n as a } from "./main-CQBEuZk9.js";
4
+ const m = {
5
+ i18nOptions: {
6
+ namespaces: "estimatedTimeToCompleteText",
7
+ messages: {
8
+ en: {
9
+ label: "Time to complete work",
10
+ placeholder: "Time unit"
11
+ },
12
+ sv: {
13
+ label: "Tid för att klargöra arbetet",
14
+ placeholder: "Tidsenhet"
15
+ }
16
+ }
17
+ },
18
+ name: "EstimatedTimeToCompleteEdit",
19
+ components: {
20
+ InputToggleRow: i
21
+ },
22
+ mixins: [
23
+ o(["timeUnit"]),
24
+ o(["noOfTimeUnits"], { type: "number" })
25
+ ],
26
+ created() {
27
+ this.timeUnit || (this.timeUnit = "day");
28
+ }
29
+ };
30
+ var l = function() {
31
+ var t = this, e = t._self._c;
32
+ return e("InputToggleRow", { attrs: { "display-value": t.noOfTimeUnits && t.timeUnit ? `${t.noOfTimeUnits} ${t.$t(`_common:${t.timeUnit}`, {
33
+ count: t.noOfTimeUnits
34
+ })}` : t.$t("_common:add"), label: t.$t("label"), "show-clear": !!(t.noOfTimeUnits && t.timeUnit) }, on: { remove: function(n) {
35
+ t.noOfTimeUnits = null;
36
+ } } }, [e("CInput", { staticStyle: { width: "calc(15 * var(--rem))" }, attrs: { type: "number" }, model: { value: t.noOfTimeUnits, callback: function(n) {
37
+ t.noOfTimeUnits = t._n(n);
38
+ }, expression: "noOfTimeUnits" } }, [e("CSelect", { staticClass: "select-width plain", staticStyle: { width: "120px" }, attrs: { slot: "append", placeholder: t.$t("placeholder") }, slot: "append", model: { value: t.timeUnit, callback: function(n) {
39
+ t.timeUnit = n;
40
+ }, expression: "timeUnit" } }, [e("option", { attrs: { value: "hour" } }, [t._v(t._s(t.$t("_common:hour_plural")))]), e("option", { attrs: { value: "day" } }, [t._v(t._s(t.$t("_common:day_plural")))]), e("option", { attrs: { value: "week" } }, [t._v(t._s(t.$t("_common:week_plural")))]), e("option", { attrs: { value: "month" } }, [t._v(t._s(t.$t("_common:month_plural")))])])], 1)], 1);
41
+ }, s = [], r = /* @__PURE__ */ a(
42
+ m,
43
+ l,
44
+ s,
45
+ !1,
46
+ null,
47
+ null
48
+ );
49
+ const d = r.exports;
50
+ export {
51
+ d as default
52
+ };
@@ -0,0 +1,33 @@
1
+ import { m as n } from "./mapFormMixin-DlFcgwhm.js";
2
+ import { n as i } from "./main-CQBEuZk9.js";
3
+ const r = {
4
+ name: "ExtraWorkTimeImpactText",
5
+ components: {
6
+ Read: () => import("./Index-Dm8xMFGg.js"),
7
+ Edit: () => import("./Index-CQ325eVT.js")
8
+ },
9
+ mixins: [
10
+ n([
11
+ "workStartAt",
12
+ "workEndAt",
13
+ "timeUnit",
14
+ "noOfTimeUnits",
15
+ "timeDeltaDirection"
16
+ ])
17
+ ]
18
+ };
19
+ var o = function() {
20
+ var t = this, e = t._self._c;
21
+ return t.canEdit ? e("Edit", t._g({ attrs: { _document: t._document, _value: t._value } }, t.$listeners)) : e("Read", { attrs: { "work-start-at": t.workStartAt, "work-end-at": t.workEndAt, "time-unit": t.timeUnit, "no-of-time-units": t.noOfTimeUnits, "time-delta-direction": t.timeDeltaDirection } });
22
+ }, a = [], m = /* @__PURE__ */ i(
23
+ r,
24
+ o,
25
+ a,
26
+ !1,
27
+ null,
28
+ null
29
+ );
30
+ const d = m.exports;
31
+ export {
32
+ d as default
33
+ };