@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,107 @@
1
+ import { m as i } from "./mapFormMixin-ETYhBLl2.js";
2
+ import { V as n } from "./PdfViewer-B1zzZU4Y.js";
3
+ import { c as l, d as o, n as d } from "./main-B9t0ybqW.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-DY5gAUnE.js"),
24
+ BaseUpload: () => import("./BaseUpload-BDWnWTxr.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
+ };
@@ -0,0 +1,171 @@
1
+ import { P as m } from "./PlainHtml-CARRbTxi.js";
2
+ import { T as c, w as u, n as p } from "./main-B9t0ybqW.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
+ };
@@ -0,0 +1,292 @@
1
+ import { w as c } from "./CDropdownItem-BjYnhZJr.js";
2
+ import { g as a, h as m, n as d, b as l, e as u } from "./main-B9t0ybqW.js";
3
+ import { s as p, i as v } from "./dom-CJxkno7i.js";
4
+ import { D as _ } from "./DocModalBase-xUoskL63.js";
5
+ import { v as n } from "./index-Czyda2Ej.js";
6
+ import { a as g } from "./vuex.esm-DKGl8mcw.js";
7
+ import { a as h } from "./answerDocumentMixin-S-Bmv15G.js";
8
+ const C = {
9
+ i18nOptions: {
10
+ namespaces: "components",
11
+ keyPrefix: "document.propertyDesignationModal"
12
+ },
13
+ components: {
14
+ DocModalBase: _
15
+ },
16
+ mixins: [c],
17
+ props: {
18
+ senderName: {
19
+ type: String,
20
+ required: !0
21
+ },
22
+ propertyDesignation: {
23
+ type: Object,
24
+ default: null
25
+ },
26
+ fullScreen: {
27
+ type: Boolean,
28
+ default: !1
29
+ }
30
+ },
31
+ data() {
32
+ return {
33
+ cornerRadius: 0,
34
+ spacing: 0,
35
+ view: "start",
36
+ form: "",
37
+ realEstateId: "",
38
+ condominiumId: null,
39
+ condominiumOrgNo: null
40
+ // messages: {
41
+ // condominiumId: {
42
+ // required: 'Ange ditt lägenhetsnummer',
43
+ // minLength: 'Det ska vara 4 siffror',
44
+ // maxLength: 'Det ska vara 4 siffror',
45
+ // },
46
+ // condominiumOrgNo: {
47
+ // required: 'Ange din bostadensrätts org-nr',
48
+ // },
49
+ // realEstateId: {
50
+ // required: 'Ange din fastighetsbeteckning',
51
+ // },
52
+ // },
53
+ };
54
+ },
55
+ validations: {
56
+ condominiumId: {
57
+ required: n.requiredIf((i) => i.form === "condominium"),
58
+ minLength: n.minLength(4),
59
+ maxLength: n.maxLength(4)
60
+ },
61
+ condominiumOrgNo: {
62
+ required: n.requiredIf((i) => i.form === "condominium")
63
+ },
64
+ realEstateId: {
65
+ required: n.requiredIf((i) => i.form === "realEstate")
66
+ }
67
+ },
68
+ computed: {
69
+ messages() {
70
+ const i = (e) => this.$t(`validations.${e}`);
71
+ return {
72
+ condominiumId: {
73
+ required: i("condominiumId.required"),
74
+ minLength: i("condominiumId.minLength"),
75
+ maxLength: i("condominiumId.maxLength")
76
+ },
77
+ condominiumOrgNo: {
78
+ required: i("condominiumOrgNo.required")
79
+ },
80
+ realEstateId: {
81
+ required: i("realEstateId.required")
82
+ }
83
+ };
84
+ }
85
+ },
86
+ created() {
87
+ if (this.propertyDesignation) {
88
+ const {
89
+ propertyType: i = "",
90
+ propertyId: e = "",
91
+ condominiumOrgNo: t = null
92
+ } = this.propertyDesignation;
93
+ this.form = i, i === "realEstate" ? this.realEstateId = e : this.condominiumId = e, this.condominiumOrgNo = t;
94
+ }
95
+ },
96
+ mounted() {
97
+ this.spacing = window.getComputedStyle(this.$refs.root.$el).paddingTop, this.cornerRadius = window.getComputedStyle(
98
+ this.$refs.root.$el
99
+ ).borderRadius;
100
+ },
101
+ methods: {
102
+ ...g({
103
+ putCurrentDoc: a.PUT_CURRENT_PUBLIC_DOCUMENT,
104
+ reloadCurrentDocument: a.RELOAD_CURRENT_DOCUMENT
105
+ }),
106
+ async updateClientPropertyDesignation() {
107
+ if (this.$v.$touch(), this.$v.$invalid)
108
+ return;
109
+ const i = {
110
+ propertyType: this.form,
111
+ propertyId: this.form === "realEstate" ? this.realEstateId : this.condominiumId,
112
+ ...this.form === "condominium" && {
113
+ condominiumOrgNo: this.condominiumOrgNo
114
+ }
115
+ };
116
+ try {
117
+ await this.putCurrentDoc({
118
+ body: {
119
+ ["clients[0].region.propertyDesignation"]: i
120
+ }
121
+ }), this.reloadCurrentDocument(), this.view = "complete";
122
+ } catch (e) {
123
+ m(e);
124
+ }
125
+ }
126
+ }
127
+ };
128
+ var w = function() {
129
+ var e = this, t = e._self._c;
130
+ return t("doc-modal-base", { ref: "root", class: [{ "full-screen": e.mq === "sm" }] }, [e.fullScreen ? t("CButton", { staticClass: "absolute right-4 top-4 z-50", attrs: { icon: "x", circle: "" }, on: { click: function(s) {
131
+ return e.$emit("close");
132
+ } } }) : e._e(), t("div", [e.view !== "complete" ? t("div", { staticClass: "negate-padding relative mb-8 border-b border-gray-100 bg-gray-50 pb-8 text-center", style: {
133
+ paddingTop: e.spacing,
134
+ marginTop: `-${e.spacing}`,
135
+ borderRadius: `${e.cornerRadius} ${e.cornerRadius} 0 0`
136
+ } }, [e.view === "start" ? t("div", { key: 1 }, [t("div", { staticClass: "mb-2 text-lg font-semibold" }, [e._v(e._s(e.$t("title")))]), t("div", { staticClass: "text-gray-700" }, [e._v(" " + e._s(e.$t("subTitle", { senderName: e.senderName })) + " ")])]) : e._e(), e.view === "form" ? t("div", { key: 2 }, [t("CButton", { staticClass: "absolute left-4 top-4", attrs: { circle: "", icon: "arrow-left" }, on: { click: function(s) {
137
+ e.view = "start";
138
+ } } }), t("div", { staticClass: "mb-2 text-lg font-semibold" }, [e._v(e._s(e.$t("howToFind")))]), t("div", { staticClass: "text-gray-700" }, [e._v(" " + e._s(e.$t("goto1")) + " "), t("a", { staticStyle: { "text-decoration": "underline" }, attrs: { href: "https://www.lantmateriet.se/", target: "_blank", rel: "noopener" } }, [e._v(" " + e._s(e.$t("goto2")) + " ")]), e._v(" " + e._s(e.$t("goto3")) + " ")])], 1) : e._e()]) : e._e(), e.view === "start" ? t("div", { key: 1, staticClass: "mb-12 text-center" }, [t("div", { staticClass: "mb-4 text-base font-medium" }, [e._v(e._s(e.$t("whereTitle")))]), t("div", { staticClass: "flex justify-center" }, [t("div", { staticClass: "mx-4" }, [t("div", { staticClass: "mb-2 flex h-24 w-24 cursor-pointer items-center justify-center rounded-xl border border-gray-300 bg-gray-50 hover:bg-gray-100 active:bg-gray-200", on: { click: function(s) {
139
+ e.view = "form", e.form = "realEstate";
140
+ } } }, [t("svg", { staticClass: "text-gray-400", attrs: { width: "59", height: "41", viewBox: "0 0 59 59", xmlns: "http://www.w3.org/2000/svg" } }, [t("g", { attrs: { fill: "currentColor", "fill-rule": "evenodd" } }, [t("path", { attrs: { d: "M6 28h47v29H6V28zm6 7.998101V40.0019C12 41.113294 12.89458 42 13.998101 42H18.0019C19.113294 42 20 41.10542 20 40.001899V35.9981C20 34.886706 19.10542 34 18.001899 34H13.9981C12.886706 34 12 34.89458 12 35.998101zm22-.007306V54h11V35.990795C45 34.898212 44.108144 34 43.007983 34h-7.015966C34.900177 34 34 34.89131 34 35.990795zM27.189354 1.837583C28.46549.536998 30.53366.53613 31.813677 1.840673L56.5 27h-54l9.85551-10.044348V7.141778h6.733007v2.95186l8.100837-8.256055zM25.5 15.861211v4.003797c0 1.111395.89458 1.998102 1.998101 1.998102H31.5019c1.111395 0 1.998101-.89458 1.998101-1.998102v-4.003797c0-1.111395-.89458-1.998101-1.998101-1.998101H27.4981c-1.111395 0-1.998101.89458-1.998101 1.998101z" } }), t("path", { attrs: { d: "M0 56.004882C0 54.897616.90314 54 1.996843 54h55.006314C58.105983 54 59 54.8939 59 56.004882V59H0v-2.995118z" } })])])]), t("div", { staticClass: "text-sm leading-tight text-gray-700" }, [e._v(" " + e._s(e.$t("house"))), t("br"), e._v("/ " + e._s(e.$t("realEstate")) + " ")])]), t("div", { staticClass: "mx-4" }, [t("div", { staticClass: "mb-2 flex h-24 w-24 cursor-pointer items-center justify-center rounded-xl border border-gray-300 bg-gray-50 hover:bg-gray-100 active:bg-gray-200", on: { click: function(s) {
141
+ e.view = "form", e.form = "condominium";
142
+ } } }, [t("svg", { staticClass: "text-gray-400", attrs: { width: "59", height: "50", viewBox: "0 0 59 73", xmlns: "http://www.w3.org/2000/svg" } }, [t("g", { attrs: { fill: "currentColor", "fill-rule": "evenodd" } }, [t("path", { attrs: { d: "M6 9.004723C6 7.34526 7.343394 6 8.993614 6h41.012771C51.659714 6 53 7.342697 53 9.004723V71H6V9.004723zm5 4.993378V18.0019C11 19.113294 11.89458 20 12.998101 20H17.0019C18.113294 20 19 19.10542 19 18.001899V13.9981C19 12.886706 18.10542 12 17.001899 12H12.9981C11.886706 12 11 12.89458 11 13.998101zm14.5 0V18.0019C25.5 19.113294 26.39458 20 27.498101 20H31.5019C32.613294 20 33.5 19.10542 33.5 18.001899V13.9981C33.5 12.886706 32.60542 12 31.501899 12H27.4981C26.386706 12 25.5 12.89458 25.5 13.998101zm14.5 0V18.0019C40 19.113294 40.89458 20 41.998101 20H46.0019C47.113294 20 48 19.10542 48 18.001899V13.9981C48 12.886706 47.10542 12 46.001899 12H41.9981C40.886706 12 40 12.89458 40 13.998101zm-29 12V30.0019C11 31.113294 11.89458 32 12.998101 32H17.0019C18.113294 32 19 31.10542 19 30.001899V25.9981C19 24.886706 18.10542 24 17.001899 24H12.9981C11.886706 24 11 24.89458 11 25.998101zm14.5 0V30.0019C25.5 31.113294 26.39458 32 27.498101 32H31.5019C32.613294 32 33.5 31.10542 33.5 30.001899V25.9981C33.5 24.886706 32.60542 24 31.501899 24H27.4981C26.386706 24 25.5 24.89458 25.5 25.998101zm14.5 0V30.0019C40 31.113294 40.89458 32 41.998101 32H46.0019C47.113294 32 48 31.10542 48 30.001899V25.9981C48 24.886706 47.10542 24 46.001899 24H41.9981C40.886706 24 40 24.89458 40 25.998101zm-29 12V42.0019C11 43.113294 11.89458 44 12.998101 44H17.0019C18.113294 44 19 43.10542 19 42.001899V37.9981C19 36.886706 18.10542 36 17.001899 36H12.9981C11.886706 36 11 36.89458 11 37.998101zm14.5 0V42.0019C25.5 43.113294 26.39458 44 27.498101 44H31.5019C32.613294 44 33.5 43.10542 33.5 42.001899V37.9981C33.5 36.886706 32.60542 36 31.501899 36H27.4981C26.386706 36 25.5 36.89458 25.5 37.998101zm14.5 0V42.0019C40 43.113294 40.89458 44 41.998101 44H46.0019C47.113294 44 48 43.10542 48 42.001899V37.9981C48 36.886706 47.10542 36 46.001899 36H41.9981C40.886706 36 40 36.89458 40 37.998101zm-29 12V54.0019C11 55.113294 11.89458 56 12.998101 56H17.0019C18.113294 56 19 55.10542 19 54.001899V49.9981C19 48.886706 18.10542 48 17.001899 48H12.9981C11.886706 48 11 48.89458 11 49.998101zm14.5 0V54.0019C25.5 55.113294 26.39458 56 27.498101 56H31.5019C32.613294 56 33.5 55.10542 33.5 54.001899V49.9981C33.5 48.886706 32.60542 48 31.501899 48H27.4981C26.386706 48 25.5 48.89458 25.5 49.998101zM21 60.997391V68h17v-7.002608C38 59.895858 37.104522 59 35.999894 59H23.000106C21.890058 59 21 59.894263 21 60.997392zm19-10.99929V54.0019C40 55.113294 40.89458 56 41.998101 56H46.0019C47.113294 56 48 55.10542 48 54.001899V49.9981C48 48.886706 47.10542 48 46.001899 48H41.9981C40.886706 48 40 48.89458 40 49.998101zM10 2.5C10 1.119288 11.125134 0 12.498953 0h34.002094C47.88118 0 49 1.109662 49 2.5V5H10V2.5z" } }), t("path", { attrs: { d: "M0 70.004881C0 68.897616.90314 68 1.996843 68h55.006314C58.105983 68 59 68.8939 59 70.004881V73H0v-2.995119z" } })])])]), t("div", { staticClass: "text-sm leading-tight text-gray-700" }, [e._v(" " + e._s(e.$t("condominium"))), t("br"), e._v("/ " + e._s(e.$t("apartment")) + " ")])])])]) : e._e(), e.view === "form" ? t("div", { key: 2 }, [t("div", { staticClass: "space-y-6" }, [e.form === "realEstate" ? t("CField", { attrs: { vuelidate: e.$v.realEstateId, "vuelidate-messages": e.messages.realEstateId, label: e.$t("propertyDesignation") } }, [t("CInput", { attrs: { placeholder: e.$t("propertyDesignationPlaceholder") }, model: { value: e.realEstateId, callback: function(s) {
143
+ e.realEstateId = s;
144
+ }, expression: "realEstateId" } })], 1) : e._e(), e.form === "condominium" ? t("CField", { attrs: { vuelidate: e.$v.condominiumId, "vuelidate-messages": e.messages.condominiumId, label: e.$t("condominiumId") } }, [t("CInput", { attrs: { placeholder: e.$t("condominiumIdPlaceholder"), type: "number" }, model: { value: e.condominiumId, callback: function(s) {
145
+ e.condominiumId = s;
146
+ }, expression: "condominiumId" } })], 1) : e._e(), e.form === "condominium" ? t("CField", { attrs: { vuelidate: e.$v.condominiumOrgNo, "vuelidate-messages": e.messages.condominiumOrgNo, label: e.$t("condominiumOrgNo") } }, [t("CInput", { staticClass: "mt-3", attrs: { placeholder: e.$t("condominiumOrgNoPlaceholder"), type: "number" }, model: { value: e.condominiumOrgNo, callback: function(s) {
147
+ e.condominiumOrgNo = s;
148
+ }, expression: "condominiumOrgNo" } })], 1) : e._e(), t("div", [t("CButton", { attrs: { type: "secondary", wide: "" }, on: { click: e.updateClientPropertyDesignation } }, [e._v(" " + e._s(e.$t("_common:save")) + " ")])], 1)], 1)]) : e._e(), e.view === "complete" ? t("div", { key: 3 }, [t("div", { staticClass: "flex flex-col items-center justify-center text-center" }, [t("div", { staticClass: "bg-primary-50 mb-4 flex h-12 w-12 items-center justify-center rounded-full" }, [t("CIcon", { staticClass: "text-primary-500", attrs: { type: "check" } })], 1), t("div", { staticClass: "mb-1 text-base font-semibold" }, [e._v(" " + e._s(e.$t("savedTitle")) + " ")]), t("div", { staticClass: "mb-6 text-base text-gray-700" }, [e._v(" " + e._s(e.$t("savedSubTitle", { senderName: e.senderName })) + " ")]), t("div", { staticClass: "mt-4 w-full" }, [t("CButton", { attrs: { type: "secondary", wide: "" }, on: { click: function(s) {
149
+ return e.$emit("close");
150
+ } } }, [e._v(" " + e._s(e.$t("_common:close")) + " ")])], 1)])]) : e._e()])], 1);
151
+ }, f = [], y = /* @__PURE__ */ d(
152
+ C,
153
+ w,
154
+ f,
155
+ !1,
156
+ null,
157
+ null
158
+ );
159
+ const $ = y.exports, b = {
160
+ i18nOptions: {
161
+ namespaces: "docAnswer",
162
+ messages: {
163
+ en: {
164
+ previewTooltip: "Only your clients can answer"
165
+ },
166
+ sv: {
167
+ previewTooltip: "Enbart din mottagare kan besvara"
168
+ }
169
+ }
170
+ },
171
+ name: "DocumentAnswerRead",
172
+ mixins: [h({ documentKey: "_document" }), c],
173
+ inject: {
174
+ isPdf: {
175
+ default: !1
176
+ },
177
+ customHtmlAccept: {
178
+ default: ""
179
+ },
180
+ customHtmlDeny: {
181
+ default: ""
182
+ }
183
+ },
184
+ props: {
185
+ _document: {
186
+ type: Object,
187
+ required: !0
188
+ }
189
+ },
190
+ data() {
191
+ return {
192
+ isInViewport: !1,
193
+ scrollToElement: p
194
+ };
195
+ },
196
+ computed: {
197
+ viewerId() {
198
+ var i;
199
+ return ((i = this._document._doc) == null ? void 0 : i.viewerId) || null;
200
+ },
201
+ isPreview() {
202
+ return this._document.isPreview;
203
+ },
204
+ modalHeight() {
205
+ return this.mq === "sm" ? "100%" : "auto";
206
+ },
207
+ allowPropertyDesignation() {
208
+ const { prices: i } = this._document;
209
+ if (!i || !i.region)
210
+ return !1;
211
+ const { houseWorkType: e } = i.region;
212
+ return ["rot", "greenRot15", "greenRot20", "greenRot50"].includes(
213
+ e
214
+ );
215
+ },
216
+ propertyDesignation() {
217
+ return l(this._document, "clients[0].region.propertyDesignation", null);
218
+ }
219
+ },
220
+ watch: {
221
+ $route: {
222
+ immediate: !0,
223
+ handler(i) {
224
+ i != null && i.hash && this.onAnswer("accept", { calcHeight: !0 });
225
+ }
226
+ },
227
+ isInViewport: {
228
+ immediate: !0,
229
+ handler(i, e) {
230
+ i !== e && u.trigger("ui:document.block.answer.visible", i);
231
+ }
232
+ }
233
+ },
234
+ mounted() {
235
+ window.addEventListener("scroll", this.scrollHandler, {
236
+ capture: !0,
237
+ passive: !0
238
+ }), this.$route.name === "docPropertyDesignation" && this.showPropertyDesignation();
239
+ },
240
+ destroyed() {
241
+ window.removeEventListener("scroll", this.scrollHandler);
242
+ },
243
+ methods: {
244
+ scrollHandler() {
245
+ this.$refs.answerButtons && (this.isInViewport = v(this.$refs.answerButtons));
246
+ },
247
+ showPropertyDesignation() {
248
+ this.$modal.show(
249
+ $,
250
+ {
251
+ senderName: this._document.sender.user.name,
252
+ propertyDesignation: this.propertyDesignation,
253
+ fullScreen: this.modalHeight === "100%"
254
+ },
255
+ {
256
+ adaptive: !0,
257
+ height: this.modalHeight,
258
+ width: "100%",
259
+ maxWidth: this.modalHeight === "100%" ? 999 : 400,
260
+ classes: "overflow-visible",
261
+ transition: "fade-in-slide-up"
262
+ }
263
+ );
264
+ }
265
+ }
266
+ };
267
+ var x = function() {
268
+ var s, o;
269
+ var e = this, t = e._self._c;
270
+ return e._document.answerActions.showActions && !e.isPdf ? t("div", { staticStyle: { padding: "calc(3 * var(--rem)) 0" } }, [t("div", { ref: "answerButtons", staticClass: "flex w-full justify-center" }, [t("transition", { attrs: { name: "fade", mode: "out-in" } }, [((o = (s = e._document.viewer) == null ? void 0 : s.answerMethod) == null ? void 0 : o.accept) === "inPerson" ? t("div", { key: 0, staticStyle: { "max-width": "720px", margin: "0 auto", padding: "0 calc(3 * var(--rem))" }, style: e.mq === "sm" ? { padding: "0 calc(1.5 * var(--rem))" } : null }, [e._v(" " + e._s(e._document.$t("chapters.answerButtons.inPersonSignatureHint")) + " "), t(e._document.sender.user.email ? "a" : "span", { tag: "component", attrs: { href: `mailto:${e._document.sender.user.email}` } }, [e._v(" " + e._s(e._document.sender.company.name || e._document.$t("theSender")) + " ")])], 1) : (e._document.answerActions.canAnswer || e.isPreview) && e._document.answerActions.showActions ? t("div", { key: 1, staticClass: "flex w-full justify-center" }, [e.customHtmlDeny ? t("div", { domProps: { innerHTML: e._s(e.customHtmlDeny) }, on: { click: function(r) {
271
+ return e.onAnswer("decline");
272
+ } } }) : t("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.isPreview && e.$t("previewTooltip"), expression: "isPreview && $t('previewTooltip')" }], staticClass: "text-gray-400", attrs: { disabled: e.isPreview, size: "medium" }, on: { click: function(r) {
273
+ return e.onAnswer("decline");
274
+ } } }, [e._v(" " + e._s(e._document.$t("deny").capitalize()) + " ")]), e.customHtmlAccept ? t("div", { domProps: { innerHTML: e._s(e.customHtmlAccept) }, on: { click: function(r) {
275
+ return e.onAnswer("accept");
276
+ } } }) : t("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.isPreview && e.$t("previewTooltip"), expression: "isPreview && $t('previewTooltip')" }], staticStyle: { "margin-left": "1em", "padding-left": "1.5em", "padding-right": "1.5em", background: "var(--block-answer-accept-bg, hsl(114deg, 75%, 43%))" }, attrs: { "icon-props": { strokeWidth: 2.5 }, disabled: e.isPreview, type: "success", size: "medium", "icon-left": "check", raised: "" }, on: { click: function(r) {
277
+ return e.onAnswer("accept");
278
+ } } }, [e._v(" " + e._s(e._document.$t("sign").capitalize()) + " ")])], 1) : e._document.answerActions.hasAnswered && e._document.answerActions.waitingForOthers ? t("div", { key: 2, staticClass: "text-center" }, [t("div", { staticStyle: { "font-weight": "600", "font-size": "calc(calc(1 * var(--rem)) + 2px)", "margin-bottom": "calc(0.5 * var(--rem))" } }, [e._v(" " + e._s(e._document.$t("chapters.answerButtons.youHave")) + " "), t("span", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: `${e.$formatDate(e._document.viewer.answer.didAnswerAt, "Pp")}`, expression: "\n `${$formatDate(_document.viewer.answer.didAnswerAt, 'Pp')}`\n " }], staticStyle: { "text-decoration": "underline" } }, [e._v(e._s(e._document.viewer.answer.didAccept ? e._document.$t("approved") : e._document.$t("denied")))]), e._v(" " + e._s(" " + e._document.$t("theDocument")) + ". ")]), t("div", [e._v(" " + e._s(e._document.$t("chapters.answerButtons.waitingDescription", { remaining: e._document.remainingSignatures })) + " ")])]) : e._document.status === "accepted" ? t("div", { key: 3 }, [t("div", { staticClass: "callout accepted" }, [t("div", { staticClass: "title" }, [e._v(" " + e._s(e._document.$t("chapters.answerButtons.approveTitle")) + " ")]), t("div", [e._v(" " + e._s(e._document.$t("chapters.answerButtons.approveDescription", { sender: e._document.sender.company.name || e._document.$t("theSender") })) + " ")])])]) : e._document.status === "denied" ? t("div", { key: 4, staticClass: "callout denied" }, [t("div", { staticClass: "title" }, [e._v(" " + e._s(e._document.$t("chapters.answerButtons.denyTitle")) + " ")]), t("div", [e._v(" " + e._s(e._document.$t("chapters.answerButtons.denyDescription", { sender: e._document.sender.company.name || e._document.$t("theSender") })) + " ")])]) : e._document.status === "expired" ? t("div", { key: 5, staticClass: "callout expired" }, [t("div", { staticClass: "title" }, [e._v(" " + e._s(e._document.$t("chapters.answerButtons.expiredTitle")) + " ")]), t("div", [e._v(" " + e._s(e._document.$t("chapters.answerButtons.expiredDescription", { sender: e._document.sender.company.name || e._document.$t("theSender") })) + " ")])]) : e._e()])], 1), e._document.status === "accepted" && e.allowPropertyDesignation && e._document.answerActions.hasAnswered ? t("div", { staticClass: "flex justify-center" }, [t("div", { staticClass: "answer button accept", staticStyle: { "padding-left": "calc(1.5 * var(--rem))", "padding-right": "calc(1.5 * var(--rem))" }, on: { click: function(r) {
279
+ return e.showPropertyDesignation();
280
+ } } }, [e._v(" " + e._s(e._document.$t(`chapters.answerButtons.${e.propertyDesignation ? "editPropDes" : "enterPropDes"}`)) + " ")])]) : e._e()]) : e._e();
281
+ }, H = [], D = /* @__PURE__ */ d(
282
+ b,
283
+ x,
284
+ H,
285
+ !1,
286
+ null,
287
+ "a09f8d01"
288
+ );
289
+ const N = D.exports;
290
+ export {
291
+ N as default
292
+ };
@@ -0,0 +1,52 @@
1
+ import { m as o } from "./mapFormMixin-ETYhBLl2.js";
2
+ import { I as i } from "./InputToggleRow-CQsaayf-.js";
3
+ import { n as a } from "./main-B9t0ybqW.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
+ };