@cling-se/widget 0.14.4 → 0.14.5

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/dist/AddClientCallout-BMc-v9rJ.js +46 -0
  4. package/dist/AnswerModal-Cu0Ke5pl.js +3874 -0
  5. package/dist/AttachmentItem-Co8pVvtv.js +78 -0
  6. package/dist/BaseDatePicker-P5iq-XAp.js +3183 -0
  7. package/dist/BaseUpload-BDWnWTxr.js +1977 -0
  8. package/dist/BlockMedia-B_UiePCr.js +76 -0
  9. package/dist/CCallout-Bbp9ya9n.js +59 -0
  10. package/dist/CCurrencyDropdown-Cw39vJWw.js +246 -0
  11. package/dist/CDropdownItem-BjYnhZJr.js +538 -0
  12. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +1 -0
  13. package/dist/CFormField-CeJ58aN2.js +241 -0
  14. package/dist/CPhoneFormat-BZnmeEeW.js +62 -0
  15. package/dist/CPriceInput-B07d19qq.js +112 -0
  16. package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +1 -0
  17. package/dist/ClientAutocomplete-9iM1pR9l.js +78 -0
  18. package/dist/ClientModal-fw8f6UvL.js +625 -0
  19. package/dist/ColorPicker-uu6vKe8o.js +2879 -0
  20. package/dist/CompanyModal-5t4yhKL4.js +141 -0
  21. package/dist/ContentWrapper-DwcOQ21l.js +183 -0
  22. package/dist/CoverBlockSettings-cCCXzAZ0.js +275 -0
  23. package/dist/DocAnswer-9lbgqHRX.js +36 -0
  24. package/dist/DocDetails-CoLL_tHs.js +246 -0
  25. package/dist/DocForm-DUjcuHJe.js +7273 -0
  26. package/dist/DocFormSend-LawcXcM2.js +143 -0
  27. package/dist/DocLinks-pJT9HpjR.js +38 -0
  28. package/dist/DocModalBase-xUoskL63.js +28 -0
  29. package/dist/DocPrint-ClEJBiAg.js +240 -0
  30. package/dist/DocReceipt-x_YsXPnG.js +210 -0
  31. package/dist/DocSendReminder-Dbz8CkAz.js +137 -0
  32. package/dist/DocTextEditor-AqBE7jZj.js +17181 -0
  33. package/dist/DocTimeline-hq2asPzr.js +481 -0
  34. package/dist/DocumentClient-TmtHqfiw.js +136 -0
  35. package/dist/DocumentLayout-CRAp8mfk.js +4909 -0
  36. package/dist/DocumentLogotype-emSjQ21f.js +87 -0
  37. package/dist/DocumentVoided-BOjiWBK6.js +25 -0
  38. package/dist/EmbedInput-B3LFGEee.js +113 -0
  39. package/dist/EmbedSettings-BYPJTGQf.js +72 -0
  40. package/dist/ErrorCallout-CwgYHBkg.js +28 -0
  41. package/dist/FilePreviewModal-81sSrDGg.js +81 -0
  42. package/dist/Flag-DGFvUTQZ.js +114 -0
  43. package/dist/HeaderSettings-BGpkzcbj.js +392 -0
  44. package/dist/ImageSelectModal-Cimviyuy.js +84 -0
  45. package/dist/ImageUploadWrapper-qJDHCf8T.js +1604 -0
  46. package/dist/Index-18w_qMQH.js +25 -0
  47. package/dist/Index-9_R8_myc.js +77 -0
  48. package/dist/Index-BKoXW7GK.js +84 -0
  49. package/dist/Index-BL3-tRGt.js +642 -0
  50. package/dist/Index-BNfAA-ZJ.js +154 -0
  51. package/dist/Index-BOxSvAug.js +144 -0
  52. package/dist/Index-BQgW1jlH.js +45 -0
  53. package/dist/Index-BXAqgXVi.js +150 -0
  54. package/dist/Index-BgK_WC0d.js +140 -0
  55. package/dist/Index-BkUzlQaQ.js +107 -0
  56. package/dist/Index-BpyYa9LR.js +171 -0
  57. package/dist/Index-ByzGXUoc.js +292 -0
  58. package/dist/Index-C1lsSfnX.js +52 -0
  59. package/dist/Index-C9sq_RDg.js +223 -0
  60. package/dist/Index-CDEh3GAi.js +26 -0
  61. package/dist/Index-CEG-Hiv6.js +69 -0
  62. package/dist/Index-CMUg61_b.js +33 -0
  63. package/dist/Index-CObGPoQv.js +62 -0
  64. package/dist/Index-CPNUsaOS.js +57 -0
  65. package/dist/Index-CegW1Rim.js +98 -0
  66. package/dist/Index-CoSt-Bws.js +31 -0
  67. package/dist/Index-CpDgldnz.js +70 -0
  68. package/dist/Index-CqImx-rG.js +55 -0
  69. package/dist/Index-CrOD4_xj.js +58 -0
  70. package/dist/Index-DBCNVVm5.js +24 -0
  71. package/dist/Index-DGG1S8uJ.js +559 -0
  72. package/dist/Index-DRWS2z82.js +2402 -0
  73. package/dist/Index-DXRgZZNj.js +61 -0
  74. package/dist/Index-DY5gAUnE.js +754 -0
  75. package/dist/Index-Dr7mVlBb.js +49 -0
  76. package/dist/Index-Dx944wv-.js +21 -0
  77. package/dist/Index-Eq3JlTKK.js +46 -0
  78. package/dist/Index-Sr3emNkE.js +25 -0
  79. package/dist/Index-VshOfaom.js +32 -0
  80. package/dist/InputToggleRow-CQsaayf-.js +57 -0
  81. package/dist/ManualPopover-CFXm5cQy.js +58 -0
  82. package/dist/MediaWrapper-Cn0Yr4ce.js +23 -0
  83. package/dist/NotBindingText-CNiszGqn.js +32 -0
  84. package/dist/PackageGroup-BVys9ouj.js +699 -0
  85. package/dist/PdfTerms-Bbns-jMY.js +36 -0
  86. package/dist/PdfViewer-B1zzZU4Y.js +374 -0
  87. package/dist/PlainHtml-CARRbTxi.js +20 -0
  88. package/dist/PriceHeader-CqeC9Lhb.js +339 -0
  89. package/dist/SearchApi-bB9FLxUq.js +161 -0
  90. package/dist/Setup-p3Du_uf8.js +50 -0
  91. package/dist/SmartList-P5ZfTWBb.js +83 -0
  92. package/dist/TermsSettings-CQ8TGwBV.js +102 -0
  93. package/dist/ThemeColorRow-DMWVlFRU.js +67 -0
  94. package/dist/ToggleBinding-BPaYWgqP.js +38 -0
  95. package/dist/UploadModal-9O4HTVZm.js +95 -0
  96. package/dist/VideoPlayerInput-5KybfY7N.js +93 -0
  97. package/dist/VideoPlayerSettings-xSW8tcTZ.js +61 -0
  98. package/dist/VideoSelectModal-BbaNAxGH.js +100 -0
  99. package/dist/anime.es-BrPTThYb.js +858 -0
  100. package/dist/answerDocumentMixin-S-Bmv15G.js +51 -0
  101. package/dist/color-TdtKxwVa.js +19 -0
  102. package/dist/debounce-B_0g8OVh.js +84 -0
  103. package/dist/dom-CJxkno7i.js +91 -0
  104. package/dist/favicon.ico +0 -0
  105. package/dist/focusDrawerMixin-DhsqWZUo.js +22 -0
  106. package/dist/formComponentsInstall-UG7a9vjZ.js +2499 -0
  107. package/dist/formDrawerState-BMQrWaBt.js +20 -0
  108. package/dist/formValidationMixin-DUu0omWT.js +49 -0
  109. package/dist/i18nMessages-Chz_lxGG.js +17 -0
  110. package/dist/index-B3R_uKML.js +347 -0
  111. package/dist/index-B4aiQXsr.js +166 -0
  112. package/dist/index-C50JSDKO.js +3916 -0
  113. package/dist/index-CJ9AvuZH.js +102 -0
  114. package/dist/index-Czyda2Ej.js +492 -0
  115. package/dist/index-myOYAnwV.js +81 -0
  116. package/dist/index.es.js +35 -0
  117. package/dist/index.umd.js +3148 -0
  118. package/dist/main-B9t0ybqW.js +56739 -0
  119. package/dist/mapFormMixin-ETYhBLl2.js +72 -0
  120. package/dist/omit-DtTfKAed.js +31 -0
  121. package/dist/publicSenderState-DD1lN9CR.js +21 -0
  122. package/dist/splitpanes-BHUVsCZF.js +382 -0
  123. package/dist/style.css +4 -0
  124. package/dist/throttle-qziKkJJX.js +18 -0
  125. package/dist/tinycolor-CMC8Xp7x.js +633 -0
  126. package/dist/tippy.esm-DjbYjfS2.js +1799 -0
  127. package/dist/utils-C5Rg0fQC.js +108 -0
  128. package/dist/vuedraggable.umd-CE3WmaEQ.js +3161 -0
  129. package/dist/vuex.esm-DKGl8mcw.js +467 -0
  130. package/package.json +1 -1
  131. package/tsconfig.json +26 -26
  132. package/tsconfig.node.json +10 -10
  133. package/tsconfig.paths.json +17 -17
  134. package/vite.config.ts +61 -61
@@ -0,0 +1,223 @@
1
+ import { m as C } from "./mapFormMixin-ETYhBLl2.js";
2
+ import { n as f, b as _ } from "./main-B9t0ybqW.js";
3
+ import { C as b } from "./CPhoneFormat-BZnmeEeW.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(a) {
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
+ "9bad68ca"
42
+ );
43
+ const S = x.exports, F = {
44
+ client: () => import("./ClientModal-fw8f6UvL.js"),
45
+ company: () => import("./CompanyModal-5t4yhKL4.js")
46
+ }, I = {
47
+ i18nOptions: {
48
+ namespaces: "components"
49
+ },
50
+ name: "DocParties",
51
+ components: {
52
+ DocPartiesItem: S,
53
+ AddClientCallout: () => import("./AddClientCallout-BMc-v9rJ.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, a = {}) => this._document.$t(t, { postProcess: "capitalize", ...a });
72
+ return (Array.isArray(this.parties) ? this.parties : [this.parties]).map((t) => {
73
+ const {
74
+ orgNo: a,
75
+ socialNo: i,
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
+ a && {
94
+ label: n("orgNoShort"),
95
+ value: a,
96
+ formKey: "orgNo"
97
+ },
98
+ r && {
99
+ label: n(c ? "name" : "reference"),
100
+ value: r,
101
+ formKey: c ? "name" : "reference"
102
+ },
103
+ i && c && {
104
+ label: n("socialNo"),
105
+ value: i,
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 i;
147
+ let t = "name", a = !1;
148
+ n && (t = n, ["name", "email", "cellphone", "reference"].includes(n) || (a = !0)), this.$modal.show(F[this.type], {
149
+ inputFocusOnMount: t,
150
+ forceExpand: a,
151
+ documentClientIndex: e,
152
+ signOptions: (i = this._document) == null ? void 0 : i.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 a = "";
163
+ return n && (a += n), n && (t || e) && (a += ", "), t && (a += ` ${t}`), e && (a += ` ${e}`), a;
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(a) {
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(a, i) {
188
+ return t("CDropdownItem", { key: i, attrs: { "icon-props": {
189
+ class: "text-gray-400"
190
+ }, "icon-left": "edit" }, on: { click: function(s) {
191
+ return e.openModal({ index: i });
192
+ } } }, [e._v(" " + e._s(a.type === "individual" ? a.name : a.companyName || a.name) + " ")]);
193
+ })], 2) : e._e()], 1) : e._e(), e.viewSettings.canEdit ? [e.type === "client" && !(e.parties && e.parties.length) ? t("AddClientCallout", { on: { add: function(a) {
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(a, i) {
196
+ return t("div", { key: i, staticClass: "party-wrapper print-avoid-break-inside", on: { "&mouseover": function(s) {
197
+ e.hoverIndex = i;
198
+ }, "&mouseleave": function(s) {
199
+ e.hoverIndex = null;
200
+ } } }, [e.viewSettings.canEdit && e.type !== "company" && e.hoverIndex === i ? 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: i });
202
+ } } }), t("CButton", { attrs: { circle: "", size: "small", icon: "x", type: "none", pattern: "tertiary" }, on: { click: function(s) {
203
+ return e.removeClient(i);
204
+ } } })], 1) : e._e(), e._l(a.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: i });
207
+ } } }) : e._e()];
208
+ }), a.checks && a.checks.length ? t("div", { staticStyle: { width: "100%", "padding-top": "calc(1 * var(--rem))" } }, e._l(a.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
+ "b2458bb1"
219
+ );
220
+ const N = M.exports;
221
+ export {
222
+ N as default
223
+ };
@@ -0,0 +1,26 @@
1
+ import { m as o } from "./mapFormMixin-ETYhBLl2.js";
2
+ import { n as i } from "./main-B9t0ybqW.js";
3
+ const a = {
4
+ name: "NotBinding",
5
+ components: {
6
+ Edit: () => import("./ToggleBinding-BPaYWgqP.js"),
7
+ Read: () => import("./NotBindingText-CNiszGqn.js")
8
+ },
9
+ mixins: [o()]
10
+ };
11
+ var r = function() {
12
+ var e;
13
+ var n = this, t = n._self._c;
14
+ return n.canEdit ? t("Edit", n._g({ attrs: { _document: n._document, _value: { notBinding: "data.notBinding" } } }, n.$listeners)) : (e = n._document.data) != null && e.notBinding ? t("Read") : n._e();
15
+ }, m = [], _ = /* @__PURE__ */ i(
16
+ a,
17
+ r,
18
+ m,
19
+ !1,
20
+ null,
21
+ "a3b56101"
22
+ );
23
+ const p = _.exports;
24
+ export {
25
+ p as default
26
+ };
@@ -0,0 +1,69 @@
1
+ import { m as n } from "./mapFormMixin-ETYhBLl2.js";
2
+ import { I as a } from "./InputToggleRow-CQsaayf-.js";
3
+ import { C as c } from "./CPriceInput-B07d19qq.js";
4
+ import { n as o } from "./main-B9t0ybqW.js";
5
+ const i = {
6
+ i18nOptions: {
7
+ namespaces: "ExtraWorkConstructionPricingListEdit",
8
+ messages: {
9
+ sv: {
10
+ workPrice: "Arbete",
11
+ managementPrice: "Arbetsledning",
12
+ entrepreneurMarkupPercentage: "Påslag för underentreprenader",
13
+ miscMarkupPercentage: "Påslag för material, varor och övrigt"
14
+ },
15
+ en: {
16
+ workPrice: "Work",
17
+ managementPrice: "Work management",
18
+ entrepreneurMarkupPercentage: "Markup for subcontractors",
19
+ miscMarkupPercentage: "Markup for material, goods and other",
20
+ travelCosts: "Travel costs for extra work"
21
+ }
22
+ }
23
+ },
24
+ name: "ExtraWorkConstructionPricingListEdit",
25
+ components: {
26
+ InputToggleRow: a,
27
+ CPriceInput: c
28
+ },
29
+ mixins: [
30
+ n(
31
+ [
32
+ "workPrice",
33
+ "managementPrice",
34
+ "entrepreneurMarkupPercentage",
35
+ "miscMarkupPercentage"
36
+ ],
37
+ { type: "number" }
38
+ )
39
+ ]
40
+ };
41
+ var s = function() {
42
+ var e = this, r = e._self._c;
43
+ return r("div", [r("div", { staticClass: "flex w-full justify-end", staticStyle: { position: "relative" } }, [e.workPrice || e.managementPrice ? r("div", { staticClass: "ex-vat" }, [e._v(" " + e._s(e.$t("_common:vat.exVat", { thing: e.$t("_common:vat.sharedTitle") }).capitalize()) + " ")]) : e._e()]), r("InputToggleRow", { attrs: { "display-value": e.workPrice ? `${e.workPrice / 100} ${e.$t("_common:currency.SEK")}/${e.$t(
44
+ "_common:unitType.hour"
45
+ )}` : e.$t("_common:add"), label: e.$t("workPrice") } }, [r("CPriceInput", { attrs: { currency: "SEK", min: "0", "suffix-class": "text-gray-400" }, scopedSlots: e._u([{ key: "suffix", fn: function() {
46
+ return [e._v(" " + e._s(e.$t("currency.SEK")) + "/" + e._s(e.$t("_common:unitType.hour")) + " ")];
47
+ }, proxy: !0 }]), model: { value: e.workPrice, callback: function(t) {
48
+ e.workPrice = e._n(t);
49
+ }, expression: "workPrice" } })], 1), r("InputToggleRow", { attrs: { "display-value": e.managementPrice ? `${e.managementPrice / 100} kr/h` : e.$t("_common:add"), label: e.$t("managementPrice") } }, [r("CPriceInput", { attrs: { currency: "SEK", min: "0", "suffix-class": "text-gray-400" }, scopedSlots: e._u([{ key: "suffix", fn: function() {
50
+ return [e._v(" " + e._s(e.$t("_common:currency.SEK")) + "/" + e._s(e.$t("unitType.hour")) + " ")];
51
+ }, proxy: !0 }]), model: { value: e.managementPrice, callback: function(t) {
52
+ e.managementPrice = e._n(t);
53
+ }, expression: "managementPrice" } })], 1), r("InputToggleRow", { attrs: { "display-value": e.entrepreneurMarkupPercentage ? `${e.entrepreneurMarkupPercentage} %` : e.$t("_common:add"), label: e.$t("entrepreneurMarkupPercentage") } }, [r("CInput", { model: { value: e.entrepreneurMarkupPercentage, callback: function(t) {
54
+ e.entrepreneurMarkupPercentage = e._n(t);
55
+ }, expression: "entrepreneurMarkupPercentage" } }, [r("template", { slot: "suffix" }, [e._v("%")])], 2)], 1), r("InputToggleRow", { attrs: { "display-value": e.miscMarkupPercentage ? `${e.miscMarkupPercentage} %` : e.$t("_common:add"), label: e.$t("miscMarkupPercentage") } }, [r("CInput", { model: { value: e.miscMarkupPercentage, callback: function(t) {
56
+ e.miscMarkupPercentage = e._n(t);
57
+ }, expression: "miscMarkupPercentage" } }, [r("template", { slot: "suffix" }, [e._v("%")])], 2)], 1)], 1);
58
+ }, u = [], m = /* @__PURE__ */ o(
59
+ i,
60
+ s,
61
+ u,
62
+ !1,
63
+ null,
64
+ "ee274c7d"
65
+ );
66
+ const _ = m.exports;
67
+ export {
68
+ _ as default
69
+ };
@@ -0,0 +1,33 @@
1
+ import { m as n } from "./mapFormMixin-ETYhBLl2.js";
2
+ import { n as i } from "./main-B9t0ybqW.js";
3
+ const r = {
4
+ name: "ExtraWorkTimeImpactText",
5
+ components: {
6
+ Read: () => import("./Index-DXRgZZNj.js"),
7
+ Edit: () => import("./Index-BgK_WC0d.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
+ };
@@ -0,0 +1,62 @@
1
+ import { m as o } from "./mapFormMixin-ETYhBLl2.js";
2
+ import { n as s } from "./main-B9t0ybqW.js";
3
+ const i = {
4
+ name: "PackageGroupBlock",
5
+ components: {
6
+ PackageGroupRead: () => import("./PackageGroup-BVys9ouj.js"),
7
+ PackageGroupEdit: () => import("./Index-DRWS2z82.js")
8
+ },
9
+ mixins: [o(["type", "packages"])],
10
+ data() {
11
+ return {
12
+ persistedGroup: {
13
+ type: "",
14
+ packages: [],
15
+ articles: []
16
+ }
17
+ };
18
+ },
19
+ computed: {
20
+ valuePaths() {
21
+ return {
22
+ ...this._value,
23
+ ...this._value.groupId && {
24
+ hideGroupPrice: `data.packageGroup.${this._value.groupId}.hideGroupPrice`
25
+ },
26
+ articles: "articles"
27
+ };
28
+ }
29
+ },
30
+ validations() {
31
+ return this.isForm ? {
32
+ type: {
33
+ required: (r) => !!r
34
+ },
35
+ packages: {
36
+ required: (r) => r && r.length
37
+ // packages cannot be left empty
38
+ }
39
+ } : {
40
+ // No validation for read mode
41
+ };
42
+ }
43
+ };
44
+ var p = function() {
45
+ var e = this, t = e._self._c;
46
+ return e.canEdit ? t("PackageGroupEdit", e._g({ attrs: { _document: e._document, _value: e.valuePaths, "persisted-group": e.persistedGroup, validator: e.$v }, on: { "update:persistedGroup": function(a) {
47
+ e.persistedGroup = a;
48
+ }, "update:persisted-group": function(a) {
49
+ e.persistedGroup = a;
50
+ } } }, e.$listeners)) : t("PackageGroupRead", { attrs: { _document: e._document, _value: e.valuePaths, validator: e.$v } });
51
+ }, u = [], n = /* @__PURE__ */ s(
52
+ i,
53
+ p,
54
+ u,
55
+ !1,
56
+ null,
57
+ "7cd7cb23"
58
+ );
59
+ const _ = n.exports;
60
+ export {
61
+ _ as default
62
+ };
@@ -0,0 +1,57 @@
1
+ import { m as r } from "./mapFormMixin-ETYhBLl2.js";
2
+ import { q as l, n as o } from "./main-B9t0ybqW.js";
3
+ const c = {
4
+ name: "DocChapter",
5
+ components: {
6
+ CInput: l
7
+ },
8
+ mixins: [r(["title"])],
9
+ props: {
10
+ enableSpacingX: {
11
+ type: Boolean,
12
+ default: !0
13
+ },
14
+ enableSpacingY: {
15
+ type: Boolean,
16
+ default: !0
17
+ },
18
+ pdfSpacingX: {
19
+ type: Boolean,
20
+ default: !1
21
+ }
22
+ },
23
+ methods: {
24
+ // Naming convention used by generateTemplate-functions in order for it to choose whether or not to run on add
25
+ conditionalOnAdd() {
26
+ const a = () => this.$refs.input.focus();
27
+ this.$refs.input ? a() : this.$once("triggerOnAdd", a);
28
+ }
29
+ }
30
+ };
31
+ var p = function() {
32
+ var i;
33
+ var t = this, n = t._self._c;
34
+ return n("div", { staticClass: "chapter" }, [n("div", { staticClass: "no-drag", class: {
35
+ "chapter-spacing-x": t.enableSpacingX,
36
+ "chapter-spacing-y": t.enableSpacingY,
37
+ "pdf-spacing-x": t.pdfSpacingX
38
+ } }, [t.canEdit && ((i = t._value) != null && i.title) ? n("CInput", { ref: "input", staticClass: "title preview-title-input", attrs: { value: t.title, spellcheck: !1, placeholder: t.$t("components:account.documentForm.titleAndText.title"), static: "" }, on: { blur: (e) => {
39
+ var s;
40
+ t.title = ((s = e.target) == null ? void 0 : s.value) || "";
41
+ }, "hook:mounted": function(e) {
42
+ return t.$emit("triggerOnAdd");
43
+ } }, nativeOn: { keydown: function(e) {
44
+ return !e.type.indexOf("key") && t._k(e.keyCode, "enter", 13, e.key, "Enter") ? null : e.target.blur();
45
+ } } }) : t.title ? n("div", { staticClass: "title" }, [t._v(" " + t._s(t.title) + " ")]) : t._e(), n("div", [t._t("default")], 2)], 1)]);
46
+ }, d = [], u = /* @__PURE__ */ o(
47
+ c,
48
+ p,
49
+ d,
50
+ !1,
51
+ null,
52
+ "7afaa603"
53
+ );
54
+ const _ = u.exports;
55
+ export {
56
+ _ as default
57
+ };
@@ -0,0 +1,98 @@
1
+ import { m as o } from "./mapFormMixin-ETYhBLl2.js";
2
+ import { f as r } from "./focusDrawerMixin-DhsqWZUo.js";
3
+ import { g as a } from "./utils-C5Rg0fQC.js";
4
+ import { n } from "./main-B9t0ybqW.js";
5
+ const d = {
6
+ name: "VideoPlayer",
7
+ i18nOptions: {
8
+ namespaces: "components",
9
+ keyPrefix: "document.videoPlayer"
10
+ },
11
+ components: {
12
+ VideoPlayerSettings: () => import("./VideoPlayerSettings-xSW8tcTZ.js"),
13
+ VideoPlayerInput: () => import("./VideoPlayerInput-5KybfY7N.js")
14
+ },
15
+ mixins: [o(["videoPlayer"]), r],
16
+ data() {
17
+ return {
18
+ showControls: !1,
19
+ aspectRatio: null,
20
+ sizes: {
21
+ small: 600,
22
+ medium: 1e3,
23
+ large: 1e3
24
+ },
25
+ // defaults to 16:9 aspect ratio
26
+ videoSize: {
27
+ width: 480,
28
+ height: 270
29
+ }
30
+ };
31
+ },
32
+ computed: {
33
+ video() {
34
+ var t;
35
+ return ((t = this.videoPlayer) == null ? void 0 : t.video) || {};
36
+ },
37
+ size() {
38
+ var t;
39
+ return ((t = this.videoPlayer) == null ? void 0 : t.size) || "medium";
40
+ }
41
+ },
42
+ watch: {
43
+ video: {
44
+ immediate: !0,
45
+ async handler(t) {
46
+ if (!t || !t.url)
47
+ return;
48
+ let { width: e, height: i } = t;
49
+ (!e || !i) && ({ width: e, height: i } = await a(t.url) || {}), this.videoSize = { width: e, height: i }, this.setAspectRatio();
50
+ }
51
+ },
52
+ size() {
53
+ this.setAspectRatio();
54
+ }
55
+ },
56
+ methods: {
57
+ setValue({ key: t, value: e }) {
58
+ this.videoPlayer = {
59
+ ...this.videoPlayer,
60
+ [t]: e
61
+ };
62
+ },
63
+ setAspectRatio() {
64
+ !this.videoSize.width || !this.videoSize.height || (this.aspectRatio = `${Math.round(
65
+ 100 * this.videoSize.height / this.videoSize.width
66
+ )}%`);
67
+ },
68
+ onAdd() {
69
+ const t = () => {
70
+ this.$refs.input.focus();
71
+ };
72
+ this.$refs.input ? t() : this.$once("triggerOnAdd", t);
73
+ }
74
+ }
75
+ };
76
+ var l = function() {
77
+ var e = this, i = e._self._c;
78
+ return i("div", { staticClass: "video-root font-inter", on: { "&mouseover": function(s) {
79
+ e.showControls = !0;
80
+ }, "&mouseleave": function(s) {
81
+ e.showControls = !1;
82
+ } } }, [i("div", { staticClass: "no-drag", class: [`video-is-${e.size}`] }, [i("div", { staticClass: "video-container", style: { paddingTop: e.aspectRatio } }, [!e.video.url && e.canEdit ? i("div", { staticClass: "video-element" }, [i("div", { staticClass: "is-placeholder" }, [i("div", { staticClass: "text-gray-600" }, [e._v(" " + e._s(e.$t("subTitle")) + " ")]), i("VideoPlayerInput", { ref: "input", staticStyle: { "padding-top": "1em" }, attrs: { value: e.video }, on: { input: function(s) {
83
+ return e.setValue({ key: "video", value: s });
84
+ }, "hook:mounted": function(s) {
85
+ return e.$emit("triggerOnAdd");
86
+ } } })], 1)]) : i("iframe", { ref: "iframe", staticClass: "video-element", attrs: { title: "Video", src: e.video.url, frameborder: "0", allowfullscreen: "" } })])]), e.isForm ? [e.showDrawer ? i("portal", { attrs: { to: "drawer-content" } }, [i("VideoPlayerSettings", { attrs: { video: e.video, size: e.size }, on: { input: e.setValue } })], 1) : e._e()] : e._e()], 2);
87
+ }, c = [], u = /* @__PURE__ */ n(
88
+ d,
89
+ l,
90
+ c,
91
+ !1,
92
+ null,
93
+ "018a61e3"
94
+ );
95
+ const f = u.exports;
96
+ export {
97
+ f as default
98
+ };
@@ -0,0 +1,31 @@
1
+ import { n as r } from "./main-B9t0ybqW.js";
2
+ const l = {
3
+ name: "DocChapterSub",
4
+ inject: {
5
+ viewSettings: { default: () => ({ canEdit: !1 }) }
6
+ },
7
+ inheritAttrs: !1
8
+ };
9
+ var o = function(e, t) {
10
+ var i, n;
11
+ return t.props.hideFromEdit && t.injections.viewSettings.canEdit ? t._e() : e("div", { staticClass: "sub-chapter" }, [e("div", { staticClass: "sub-chapter-title" }, [e("span", { staticClass: "sub-chapter-counter primary-pseudo-background" }), t.injections.viewSettings.canEdit && ((n = (i = t.props) == null ? void 0 : i._value) != null && n.title) ? [e("CInput", { staticClass: "preview-title-input", attrs: { value: t.props.title, spellcheck: !1, static: "" }, on: { blur: (s) => {
12
+ var a;
13
+ t.injections.viewSettings.setFormValue && t.injections.viewSettings.setFormValue({
14
+ key: t.props._value.title,
15
+ value: ((a = s.target) == null ? void 0 : a.value) || ""
16
+ });
17
+ } }, nativeOn: { keydown: function(s) {
18
+ return !s.type.indexOf("key") && t._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : s.target.blur();
19
+ } } })] : t.props.title ? e("div", [t._v(t._s(t.props.title))]) : t._e()], 2), e("div", { staticClass: "sub-chapter-content" }, [t._t("default")], 2)]);
20
+ }, c = [], p = /* @__PURE__ */ r(
21
+ l,
22
+ o,
23
+ c,
24
+ !0,
25
+ null,
26
+ "cf4c14b1"
27
+ );
28
+ const f = p.exports;
29
+ export {
30
+ f as default
31
+ };
@@ -0,0 +1,70 @@
1
+ import { m as i } from "./mapFormMixin-ETYhBLl2.js";
2
+ import { S as o, n as a } from "./main-B9t0ybqW.js";
3
+ import { f as r } from "./focusDrawerMixin-DhsqWZUo.js";
4
+ const d = {
5
+ // eslint-disable-next-line vue/no-reserved-component-names
6
+ name: "Embed",
7
+ i18nOptions: {
8
+ namespaces: "embed",
9
+ messages: {
10
+ en: {
11
+ subTitle: "Embed anything (PDFs, Google Docs, Calender Sheets...)"
12
+ },
13
+ sv: {
14
+ subTitle: "Bädda in vad som helst (PDF:er, Google Docs, Calender Sheets...)"
15
+ }
16
+ }
17
+ },
18
+ components: {
19
+ EmbedSettings: () => import("./EmbedSettings-BYPJTGQf.js"),
20
+ EmbedInput: () => import("./EmbedInput-B3LFGEee.js"),
21
+ Spinner: o
22
+ },
23
+ mixins: [i(["embed", "size"]), r],
24
+ data() {
25
+ return {
26
+ showControls: !1,
27
+ isLoading: !0
28
+ };
29
+ },
30
+ methods: {
31
+ onAdd() {
32
+ const n = () => {
33
+ this.$refs.input.focus();
34
+ };
35
+ this.$refs.input ? n() : this.$once("triggerOnAdd", n);
36
+ }
37
+ }
38
+ };
39
+ var m = function() {
40
+ var e = this, s = e._self._c;
41
+ return s("div", { staticClass: "embed-root font-inter", on: { "&mouseover": function(t) {
42
+ e.showControls = !0;
43
+ }, "&mouseleave": function(t) {
44
+ e.showControls = !1;
45
+ } } }, [s("div", { staticClass: "no-drag", class: [
46
+ (e.size || !(e.embed && e.embed.src)) && "auto-size",
47
+ `embed-is-${e.size}`
48
+ ] }, [e.embed ? s("div", { staticClass: "embed-container" }, [!e.embed.src && e.canEdit ? s("div", { staticClass: "embed-element" }, [s("div", { staticClass: "is-placeholder" }, [s("div", { staticClass: "text-gray-600" }, [e._v(" " + e._s(e.$t("subTitle")) + " ")]), s("EmbedInput", { ref: "input", staticStyle: { "padding-top": "1em" }, on: { "hook:mounted": function(t) {
49
+ return e.$emit("triggerOnAdd");
50
+ } }, model: { value: e.embed, callback: function(t) {
51
+ e.embed = t;
52
+ }, expression: "embed" } })], 1)]) : e.embed.src ? s("iframe", e._b({ ref: "iframe", staticClass: "embed-element", on: { load: function(t) {
53
+ e.isLoading = !1;
54
+ } } }, "iframe", { allowfullscreen: "", ...e.embed }, !1)) : e._e(), e.embed.src && e.isLoading ? s("div", { staticClass: "embed-loading-container" }, [s("Spinner", { attrs: { color: "hsl(0, 0%, 60%)" } })], 1) : e._e()]) : e._e()]), e.isForm ? [e.showDrawer ? s("portal", { attrs: { to: "drawer-content" } }, [s("EmbedSettings", { attrs: { size: e.size }, on: { "update:size": function(t) {
55
+ e.size = t;
56
+ } }, model: { value: e.embed, callback: function(t) {
57
+ e.embed = t;
58
+ }, expression: "embed" } })], 1) : e._e()] : e._e()], 2);
59
+ }, l = [], c = /* @__PURE__ */ a(
60
+ d,
61
+ m,
62
+ l,
63
+ !1,
64
+ null,
65
+ "ca826f69"
66
+ );
67
+ const p = c.exports;
68
+ export {
69
+ p as default
70
+ };