@cling-se/widget 0.9.1 → 0.9.3

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 (132) hide show
  1. package/dist/AddClientCallout-746899d9.js +57 -0
  2. package/dist/{AnswerModal-c22c6729.js → AnswerModal-fdfea0f8.js} +7 -5
  3. package/dist/{AttachmentItem-ab7c264b.js → AttachmentItem-5671c64d.js} +5 -7
  4. package/dist/BaseDatePicker-a9240306.js +3156 -0
  5. package/dist/{BaseInput-2b048506.js → BaseInput-d3c3688b.js} +4 -4
  6. package/dist/{BaseUpload-869cbd9a.js → BaseUpload-8e7a2b72.js} +3 -3
  7. package/dist/BlockMedia-b613a2a4.js +72 -0
  8. package/dist/CCallout-e9ff903a.js +52 -0
  9. package/dist/CDropdownItem-05d84f95.js +610 -0
  10. package/dist/CField-cd4dcae9.js +183 -0
  11. package/dist/CField.vue_vue_type_style_index_0_lang-4ed993c7.js +1 -0
  12. package/dist/CSlider.vue_vue_type_style_index_0_lang-383db616.js +83 -0
  13. package/dist/ClientAutocomplete-421a2216.js +80 -0
  14. package/dist/ClientModal-11341b1c.js +547 -0
  15. package/dist/ColorPicker-f90939b5.js +2881 -0
  16. package/dist/{CompanyModal-26243605.js → CompanyModal-2bfd21b8.js} +12 -11
  17. package/dist/{ContentWrapper-315b8ac7.js → ContentWrapper-4aae35b2.js} +21 -14
  18. package/dist/{CoverBlockSettings-ff4d5ccc.js → CoverBlockSettings-1f917be3.js} +7 -7
  19. package/dist/DocForm-0891c6b2.js +6767 -0
  20. package/dist/DocFormSend-2b35999d.js +135 -0
  21. package/dist/{DocModalBase-3d81e120.js → DocModalBase-225e2f2d.js} +1 -1
  22. package/dist/{DocReceipt-c9c5aefc.js → DocReceipt-1391c17a.js} +1 -1
  23. package/dist/{DocSendReminder-ab8e6f0f.js → DocSendReminder-c488842d.js} +1 -1
  24. package/dist/{DocTextEditor-88987249.js → DocTextEditor-2538e1ab.js} +16 -12
  25. package/dist/{DocTimeline-8e8a1b51.js → DocTimeline-69ada0de.js} +11 -11
  26. package/dist/DocumentClient-74b8f25b.js +145 -0
  27. package/dist/{DocumentLogotype-a777ea0d.js → DocumentLogotype-e89b53fb.js} +3 -3
  28. package/dist/{EmbedInput-4b92adae.js → EmbedInput-b7fefe5e.js} +10 -11
  29. package/dist/{EmbedSettings-0701c838.js → EmbedSettings-4957252f.js} +10 -11
  30. package/dist/ErrorCallout-42e45ec0.js +30 -0
  31. package/dist/{FilePreviewModal-fa0f4b2c.js → FilePreviewModal-75693619.js} +6 -7
  32. package/dist/FormInputRow-09d450e3.js +2045 -0
  33. package/dist/{HeaderSettings-3b1f470a.js → HeaderSettings-9b69eada.js} +23 -19
  34. package/dist/{ImageSelectModal-24b1d738.js → ImageSelectModal-94d4dc7f.js} +20 -18
  35. package/dist/{ImageUploadWrapper-f9d3ab48.js → ImageUploadWrapper-a144b042.js} +2 -2
  36. package/dist/{Index-a6d8cb6c.js → Index-00ef9241.js} +10 -10
  37. package/dist/{Index-17041bc1.js → Index-023c3119.js} +6 -7
  38. package/dist/{Index-1df9e104.js → Index-1bafafca.js} +2 -2
  39. package/dist/{Index-e9dcaa48.js → Index-2cb8fa22.js} +73 -118
  40. package/dist/{Index-9797765e.js → Index-304c45be.js} +21 -16
  41. package/dist/{Index-ec4600d0.js → Index-35387450.js} +52 -42
  42. package/dist/Index-37a9183b.js +28 -0
  43. package/dist/{Index-d21e1d0d.js → Index-3dff19dd.js} +7 -7
  44. package/dist/{Index-53f58582.js → Index-3ee2e944.js} +2 -2
  45. package/dist/{Index-41e37657.js → Index-42e26b46.js} +11 -11
  46. package/dist/{Index-36b91cfc.js → Index-4440fe3d.js} +6 -7
  47. package/dist/{Index-36fc26f9.js → Index-4563d3fa.js} +33 -31
  48. package/dist/{Index-9262d0cb.js → Index-53da7be8.js} +3 -3
  49. package/dist/{Index-bfc7f353.js → Index-62936c19.js} +16 -17
  50. package/dist/{Index-9a0239fe.js → Index-693005f0.js} +6 -7
  51. package/dist/{Index-5c0744c1.js → Index-78f13416.js} +6 -7
  52. package/dist/{Index-a01c2862.js → Index-90492f19.js} +5 -6
  53. package/dist/{Index-8bb9f798.js → Index-96f39afc.js} +6 -7
  54. package/dist/{Index-ee9ff714.js → Index-97d1f2f3.js} +8 -8
  55. package/dist/{Index-41e93dd5.js → Index-9a243eb8.js} +2 -2
  56. package/dist/{Index-01f77191.js → Index-9ffe9766.js} +11 -12
  57. package/dist/{Index-be520920.js → Index-a37beb03.js} +1 -1
  58. package/dist/{Index-e5ebcd2f.js → Index-a554b58c.js} +6 -7
  59. package/dist/{Index-aa1323ee.js → Index-a86ea774.js} +8 -9
  60. package/dist/{Index-c070cd5e.js → Index-abb8c6e4.js} +6 -6
  61. package/dist/{Index-74d98d97.js → Index-b7def77a.js} +8 -9
  62. package/dist/{Index-6f5192b8.js → Index-bcc478b3.js} +7 -8
  63. package/dist/{Index-033cd5ed.js → Index-cec7d4f1.js} +22 -15
  64. package/dist/{Index-560f7a0f.js → Index-d68a28da.js} +7 -7
  65. package/dist/{Index-5ba3dd14.js → Index-dbe97658.js} +2 -2
  66. package/dist/{Index-a5b8ec5c.js → Index-ec8d534f.js} +4 -6
  67. package/dist/{Index-013c4412.js → Index-f2b66b79.js} +6 -7
  68. package/dist/{Index-8ad015e2.js → Index-f453850f.js} +6 -7
  69. package/dist/{Index-78391f8b.js → Index-f9b5f03c.js} +27 -20
  70. package/dist/{InputToggleRow-9aa959ff.js → InputToggleRow-68320d9f.js} +1 -1
  71. package/dist/IsPremiumPreStep-0c7032a3.js +1919 -0
  72. package/dist/{MediaWrapper-03b27562.js → MediaWrapper-c50879c2.js} +4 -4
  73. package/dist/{NotBindingText-fb4e9ecb.js → NotBindingText-8f2d9244.js} +2 -2
  74. package/dist/{PackageGroup-821d41fa.js → PackageGroup-2c49e99b.js} +24 -17
  75. package/dist/{PdfTerms-4a29bcc9.js → PdfTerms-94153a5f.js} +6 -7
  76. package/dist/{PdfViewer-374bfe41.js → PdfViewer-701ad40e.js} +2 -2
  77. package/dist/{PlainHtml-65923dd4.js → PlainHtml-04a6d7f9.js} +1 -1
  78. package/dist/PriceHeader-7f92d5a7.js +336 -0
  79. package/dist/SearchApi-ffe5b697.js +148 -0
  80. package/dist/{TermsSettings-4a40aaa2.js → TermsSettings-b1bf19e9.js} +6 -6
  81. package/dist/{ThemeColorRow-72b7a35b.js → ThemeColorRow-913497f6.js} +7 -6
  82. package/dist/{ToggleBinding-00c37a9d.js → ToggleBinding-6518935d.js} +8 -9
  83. package/dist/{UploadModal-761770b9.js → UploadModal-3c399d25.js} +21 -22
  84. package/dist/{VideoPlayerInput-6692fe27.js → VideoPlayerInput-b54845a4.js} +5 -6
  85. package/dist/{VideoPlayerSettings-2b7a8a39.js → VideoPlayerSettings-496e9e79.js} +13 -14
  86. package/dist/{VideoSelectModal-4596e9b4.js → VideoSelectModal-3a566398.js} +10 -10
  87. package/dist/anime.es-e284c852.js +858 -0
  88. package/dist/answerDocumentMixin-0e5e4dbb.js +54 -0
  89. package/dist/color-71c20583.js +15 -0
  90. package/dist/{cssMode-34bf902e.js → cssMode-c0865919.js} +15 -14
  91. package/dist/focusDrawerMixin-298861bc.js +68 -0
  92. package/dist/formComponentsInstall-1be6791d.js +2491 -0
  93. package/dist/formValidationMixin-df38771c.js +4984 -0
  94. package/dist/{freemarker2-61453951.js → freemarker2-85dde97c.js} +19 -18
  95. package/dist/{handlebars-24c80c6f.js → handlebars-6aa1e52b.js} +18 -17
  96. package/dist/{html-fc291ba3.js → html-f0c735cd.js} +14 -13
  97. package/dist/{htmlMode-bb27a86a.js → htmlMode-7b3bd7c9.js} +19 -18
  98. package/dist/{index-afe3eb26.js → index-1ef6f423.js} +21 -15
  99. package/dist/index-30808a2c.js +490 -0
  100. package/dist/{index-053f9545.js → index-431938de.js} +13 -12
  101. package/dist/index-6d08eac3.js +14 -0
  102. package/dist/index-805c56e4.js +4 -0
  103. package/dist/index.es.js +3 -3
  104. package/dist/index.umd.js +713 -600
  105. package/dist/{javascript-584c9812.js → javascript-9c54ad9e.js} +11 -10
  106. package/dist/{jsonMode-f03e810a.js → jsonMode-1d1176fa.js} +19 -18
  107. package/dist/{liquid-2157b417.js → liquid-0738c73d.js} +11 -10
  108. package/dist/{main-e2129a84.js → main-2d9b8259.js} +19557 -20415
  109. package/dist/mapFormMixin-308bbdab.js +66 -0
  110. package/dist/{publicSenderState-11d47322.js → publicSenderState-9eecb11f.js} +1 -1
  111. package/dist/{python-7f1728ff.js → python-588c9e64.js} +11 -10
  112. package/dist/{razor-54008302.js → razor-fbaa1d21.js} +14 -13
  113. package/dist/regions-29ee6964.js +1250 -0
  114. package/dist/simplebar.min-75960401.js +2429 -0
  115. package/dist/style.css +4 -0
  116. package/dist/template-b877debf.js +526 -0
  117. package/dist/throttle-d7bed81a.js +18 -0
  118. package/dist/tinycolor-ef496244.js +634 -0
  119. package/dist/{tsMode-6bcf5f10.js → tsMode-c1de8e10.js} +15 -14
  120. package/dist/{typescript-f225fd6d.js → typescript-737827aa.js} +11 -10
  121. package/dist/{utils-c4dbd526.js → utils-69c41ae9.js} +5 -5
  122. package/dist/vuedraggable.umd-67b8cddf.js +3179 -0
  123. package/dist/{xml-8680011c.js → xml-30e811a1.js} +11 -10
  124. package/package.json +4 -4
  125. package/stats.html +1 -1
  126. package/dist/DocForm-b6cc1bdf.js +0 -22074
  127. package/dist/DocFormSend-1c7e370d.js +0 -113
  128. package/dist/Index-0f345bed.js +0 -29
  129. package/dist/PriceHeader-4fb21725.js +0 -329
  130. package/dist/formComponentsInstall-0d5f842a.js +0 -11121
  131. package/dist/index-3a6d34e0.js +0 -11
  132. package/dist/throttle-7fc52dc7.js +0 -18
@@ -1,113 +0,0 @@
1
- import { V as n, m as r, a as l, g as a, C as i, n as u } from "./main-e2129a84.js";
2
- import { i as c, S as m } from "./formComponentsInstall-0d5f842a.js";
3
- import "./vuex.esm-4a0fff7c.js";
4
- n.use(c);
5
- const s = n.observable({
6
- canEdit: !1,
7
- isForm: !0,
8
- setFormValue: null
9
- }), d = {
10
- name: "DocFormSend",
11
- components: {
12
- SendForm: m
13
- },
14
- provide: () => ({ viewSettings: s }),
15
- // TODO maybe not needed
16
- props: {
17
- showName: {
18
- type: Boolean,
19
- default: !0
20
- },
21
- showSave: {
22
- type: Boolean,
23
- default: !0
24
- },
25
- showSchedule: {
26
- type: Boolean,
27
- default: !0
28
- },
29
- allowManualDelivery: {
30
- type: Boolean,
31
- default: !1
32
- },
33
- contentSlot: {
34
- type: String,
35
- default: null
36
- },
37
- footerSlot: {
38
- type: String,
39
- default: null
40
- }
41
- },
42
- data() {
43
- return {
44
- document: null
45
- };
46
- },
47
- computed: {
48
- ...r({
49
- company: "application/company",
50
- can: "application/can",
51
- rawDoc: "forms/document",
52
- isPosting: "documents2/isPosting"
53
- })
54
- },
55
- watch: {
56
- rawDoc: {
57
- immediate: !0,
58
- handler() {
59
- this.initDoc();
60
- }
61
- }
62
- },
63
- async created() {
64
- this.setFormValue && (s.setFormValue = this.setDocValue);
65
- },
66
- methods: {
67
- ...l({
68
- setFormValue: a.SET_FORM_VALUE,
69
- removeFormValue: a.REMOVE_FORM_VALUE
70
- // loadCompanyUser: global.LOAD_COMPANY_USER,
71
- }),
72
- async initDoc() {
73
- if (!this.rawDoc)
74
- throw new Error("Missing initiated form document");
75
- this.document = new i({
76
- data: this.rawDoc,
77
- can: this.can,
78
- getters: this.$store.getters,
79
- updateSender: !0
80
- });
81
- },
82
- setDocValue({ key: o, value: e }) {
83
- return this.setFormValue({ key: `document2.${o}`, value: e });
84
- },
85
- removeDocValue(o) {
86
- return this.removeFormValue(`document2.${o}`);
87
- }
88
- }
89
- };
90
- var p = function() {
91
- var e = this, t = e._self._c;
92
- return e.document ? t("SendForm", { staticClass: "w-full h-full", attrs: { _document: e.document, _value: {
93
- expiresAt: "data.expiresAt",
94
- personalMessage: "data.personalMessage",
95
- defaultAnswerMethod: "data.defaultAnswerMethod",
96
- clients: "clients",
97
- reminders: "data.reminders",
98
- name: "data.name"
99
- }, "show-name": e.showName, "show-save": e.showSave, "show-schedule": e.showSchedule, "allow-manual-delivery": e.allowManualDelivery, "set-form-value": e.setDocValue, "remove-form-value": e.removeDocValue, "use-scroll": "" } }, [e.contentSlot ? t("div", { attrs: { slot: "content" }, domProps: { innerHTML: e._s(e.contentSlot) }, slot: "content" }) : e._e(), e.footerSlot ? t("div", { attrs: { slot: "footer" }, domProps: { innerHTML: e._s(e.footerSlot) }, slot: "footer" }) : e._e()]) : t("div", { staticClass: "grid w-full h-full place-items-center" }, [t("BaseIcon", { staticClass: "text-gray-400 animate-spin", attrs: { type: "loader", size: 28 } })], 1);
100
- }, f = [], h = /* @__PURE__ */ u(
101
- d,
102
- p,
103
- f,
104
- !1,
105
- null,
106
- null,
107
- null,
108
- null
109
- );
110
- const S = h.exports;
111
- export {
112
- S as default
113
- };
@@ -1,29 +0,0 @@
1
- import { m as o } from "./formComponentsInstall-0d5f842a.js";
2
- import { n as _ } from "./main-e2129a84.js";
3
- import "./vuex.esm-4a0fff7c.js";
4
- const i = {
5
- name: "NotBinding",
6
- components: {
7
- Edit: () => import("./ToggleBinding-00c37a9d.js"),
8
- Read: () => import("./NotBindingText-fb4e9ecb.js")
9
- },
10
- mixins: [o()]
11
- };
12
- var a = function() {
13
- var t;
14
- var n = this, e = n._self._c;
15
- return n.canEdit ? e("Edit", n._g({ attrs: { _document: n._document, _value: { notBinding: "data.notBinding" } } }, n.$listeners)) : (t = n._document.data) != null && t.notBinding ? e("Read") : n._e();
16
- }, r = [], d = /* @__PURE__ */ _(
17
- i,
18
- a,
19
- r,
20
- !1,
21
- null,
22
- "0648ef9a",
23
- null,
24
- null
25
- );
26
- const p = d.exports;
27
- export {
28
- p as default
29
- };
@@ -1,329 +0,0 @@
1
- import { m as n } from "./formComponentsInstall-0d5f842a.js";
2
- import { t as l, b as d, B as u } from "./DocForm-b6cc1bdf.js";
3
- import { n as c, r as a, p as m, G as p } from "./main-e2129a84.js";
4
- import { T as _ } from "./DocTextEditor-88987249.js";
5
- import { i as y } from "./i18nMessages-45c6bfd6.js";
6
- import "./vuex.esm-4a0fff7c.js";
7
- const h = {
8
- name: "SummaryTop",
9
- i18nOptions: {
10
- namespaces: "summaryTop",
11
- messages: y
12
- },
13
- components: {
14
- TextEditor: _,
15
- DocumentLogotype: () => import("./DocumentLogotype-a777ea0d.js")
16
- },
17
- inject: ["parentSize"],
18
- mixins: [n([])],
19
- props: {
20
- showLogo: {
21
- type: Boolean,
22
- default: !0
23
- },
24
- logotype: {
25
- type: String,
26
- default: null
27
- },
28
- companyLogotype: {
29
- type: String,
30
- default: null
31
- },
32
- senderName: {
33
- type: String,
34
- default: null
35
- },
36
- docName: {
37
- type: String,
38
- default: null
39
- },
40
- docType: {
41
- type: String,
42
- required: !0
43
- },
44
- docNumber: {
45
- type: [Number, String],
46
- default: null
47
- },
48
- sentAt: {
49
- type: [String, Number],
50
- default: null
51
- // required: true,
52
- },
53
- expiresAt: {
54
- type: String,
55
- default: null
56
- },
57
- estimatedTime: {
58
- type: String,
59
- default: null
60
- },
61
- validator: {
62
- type: Object,
63
- default: () => ({})
64
- },
65
- hasHover: {
66
- type: Boolean,
67
- default: !1
68
- }
69
- },
70
- computed: {
71
- logotypeListeners() {
72
- return {
73
- ...this.$listeners,
74
- input: (s) => this.$emit("update:logotype", s)
75
- };
76
- }
77
- }
78
- };
79
- var g = function() {
80
- var e = this, t = e._self._c;
81
- return t("section", { staticClass: "flex justify-center w-full summary-top" }, [t("div", { staticClass: "doc-summary-top-wrapper" }, [t("div", { staticClass: "doc-summary-top-wrapper__background" }), t("div", { staticClass: "flex justify-between w-full", staticStyle: { "margin-bottom": "2.5rem" } }, [e.showLogo && (e.logotype || e.companyLogotype) || e.canEdit ? t("DocumentLogotype", e._g({ attrs: { value: e.logotype, "show-logo": e.showLogo, "company-logotype": e.companyLogotype, "has-hover": e.hasHover } }, e.logotypeListeners)) : t("div", { staticClass: "company-name" }, [e._v(" " + e._s(e.senderName) + " ")]), t("div", { staticClass: "top-right-text-wrapper" }, [e.sentAt ? t("div", [e._v(e._s(e.$formatDate(e.sentAt)))]) : e._e(), e.docNumber ? t("div", [e._v(" #" + e._s(e.docNumber))]) : e._e()])], 1), t("div", { staticClass: "title-text" }, [e.canEdit ? t("TextEditor", { ref: "editor", staticClass: "no-drag", staticStyle: { "will-change": "opacity" }, attrs: { value: e.docName, placeholder: e.$t("name.placeholder"), extensions: {
82
- bulletList: !1,
83
- heading: [1, 2, 3],
84
- bold: !1,
85
- link: !1,
86
- underline: !1,
87
- blockquote: !0,
88
- table: !1
89
- }, unstyled: "", static: "" }, on: { input: function(i) {
90
- return e.$emit("update:doc-name", i);
91
- } } }) : t("div", { staticClass: "quill-custom", domProps: { innerHTML: e._s(e.docName) } })], 1), t("div", { staticClass: "flex justify-between w-full" }, [e.expiresAt ? t("div", { staticClass: "data-group" }, [t("div", { staticClass: "label-text caps" }, [e._v(e._s(e._document.$t("replyBy")))]), t("div", { staticClass: "data-text" }, [e._v(e._s(e.$formatDate(e.expiresAt)))])]) : e._e(), e.docType !== "document" ? t("div", { staticClass: "data-group" }, [t("div", { staticClass: "label-text caps" }, [e._v(e._s(e._document.$t("document").capitalize()))]), t("div", { staticClass: "data-text" }, [e._v(e._s(e._document.$t(`series.${e.docType}`).capitalize()))])]) : e._e(), e.parentSize.width >= 576 ? [e.estimatedTime ? t("div", { staticClass: "data-group" }, [t("div", { staticClass: "label-text caps" }, [e._v(e._s(e.$t("time.estimatedTime")))]), t("div", { staticClass: "data-text" }, [e._v(e._s(e._document.$t("approx")) + " " + e._s(e.estimatedTime))])]) : e._e()] : e._e()], 2)])]);
92
- }, f = [], v = /* @__PURE__ */ c(
93
- h,
94
- g,
95
- f,
96
- !1,
97
- null,
98
- "68d8a9dc",
99
- null,
100
- null
101
- );
102
- const S = v.exports;
103
- const x = {
104
- name: "SummaryBottom",
105
- mixins: [n([])],
106
- props: {
107
- base: {
108
- type: Object,
109
- default: null
110
- },
111
- options: {
112
- type: Array,
113
- default: () => []
114
- },
115
- backgroundColor: {
116
- type: String,
117
- default: "#4c576d"
118
- },
119
- documentCurrency: {
120
- type: String,
121
- required: !0
122
- },
123
- vatType: {
124
- type: String,
125
- required: !0
126
- }
127
- },
128
- inject: ["parentSize"],
129
- data() {
130
- return {
131
- get: a,
132
- tinycolor: l
133
- };
134
- },
135
- computed: {
136
- prices() {
137
- return a(this, "base.prices") || {};
138
- },
139
- isIndivid() {
140
- return a(this.prices, "helpers.isIndivid", !0);
141
- },
142
- showIncVat() {
143
- return this.isIndivid;
144
- },
145
- priceTotal() {
146
- return this.isIndivid ? a(this.prices, "total", null) : a(this.prices, "subTotal", null);
147
- },
148
- priceType() {
149
- return this.prices.type || ["fixed"];
150
- },
151
- currency() {
152
- return this.prices.currency || this.documentCurrency;
153
- },
154
- openAccMaxPrice() {
155
- return this.prices.maxTotal || null;
156
- },
157
- houseWorkType() {
158
- return a(this.prices, "region.houseWorkType", null);
159
- },
160
- isReverseVat() {
161
- return a(this.prices, "region.reverseVat", !1);
162
- },
163
- priceTypeString() {
164
- return this.priceType.includes("openAccMaxPrice") ? this._document.$t("price.openAccMaxPrice") : this.priceType.includes("openAcc") ? this._document.$t("price.openAcc") : this._document.$t("price.price").capitalize();
165
- },
166
- priceDeductionVatString() {
167
- let s = "";
168
- if (this.isReverseVat && !this.showIncVat) {
169
- const e = this.priceFormat(0, { currency: this.currency, showZero: !0 });
170
- return s = this._document.$t("summaryBottom.reverseVat", { amount: e }), s;
171
- }
172
- return this.houseWorkType && (s = this._document.$t("deduction.afterType", { type: `${this.houseWorkType}_percentage` })), this.showIncVat && (s += ` ${this._document.$t("vat.incVat", { thing: this._document.$t(`vat.${this.vatType}`) })}`), this.showIncVat || (s += ` ${this._document.$t("vat.exVat", { thing: this._document.$t(`vat.${this.vatType}`) })}`), s.capitalize();
173
- },
174
- backgroundSecondary() {
175
- if (!this.isSmallScreen)
176
- return { backgroundColor: "transparent" };
177
- const s = this.backgroundColor.match(/(\d*\.)?\d+/g)[0], e = this.backgroundColor.match(/(\d*\.)?\d+/g)[1], t = this.backgroundColor.match(/(\d*\.)?\d+/g)[2], i = this.backgroundColor.match(/(\d*\.)?\d+/g)[3];
178
- return {
179
- backgroundColor: `hsla(${s}, ${e ** 0.9}%, ${t ** 0.9}%, ${i})`
180
- };
181
- },
182
- isSmallScreen() {
183
- return this.parentSize.width <= 576;
184
- }
185
- },
186
- methods: {
187
- priceFormat: m,
188
- scrollToPricing() {
189
- const s = document.querySelector("#price");
190
- s && d(s);
191
- }
192
- }
193
- };
194
- var b = function() {
195
- var e = this, t = e._self._c;
196
- return t("section", { staticClass: "summary-bottom-root" }, [t("div", { staticClass: "summary-bottom", style: [
197
- {
198
- backgroundColor: e.backgroundColor,
199
- color: e.tinycolor.readability(e.backgroundColor, "#FFF") > 2.2 ? "#FFF" : "#000"
200
- },
201
- e.options.length && {
202
- overflow: "hidden",
203
- padding: 0
204
- }
205
- ] }, [e.options.length ? t("div", { staticClass: "flex items-center justify-end w-full", staticStyle: { height: "108px" } }, [t("div", { staticStyle: { "text-align": "right", padding: "2rem" } }, [t("div", { staticStyle: { "font-size": "1.5rem", "font-weight": "900" } }, [e._v(e._s(e._document.$t("price.proposal")))]), t("div", [e._v(e._s(e._document.$t("summaryBottom.chooseFrom")))])]), t("div", { staticStyle: { "background-color": "hsla(0, 0%, 0%, 0.15)", paadding: "1rem 2rem", height: "100%", display: "inline-flex" } }, [e.base ? t("div", { staticStyle: { display: "flex", "flex-direction": "column", "align-items": "flex-start", "justify-content": "center", padding: "1rem 1rem", "text-align": "left" } }, [t("div", { staticStyle: { "font-weight": "900", "font-size": "1.5rem" } }, [e._v(e._s(e.priceFormat(e.base.prices.total, { currency: e.currency, decimals: 2, hideZeroDecimals: !0 })))]), t("div", [e._v("+ " + e._s(e._document.$tc("summaryBottom.option", { count: e.options.length })))])]) : t("div", { staticStyle: { padding: "2rem", display: "inline-flex", "align-items": "center", "justify-content": "center", "font-weight": "900", "font-size": "2.5rem" } }, [e._v(" " + e._s(e._document.$t("summaryBottom.noOfOptions", { count: e.options.length })) + " ")])]), t("div", { staticStyle: { "background-color": "hsla(0, 0%, 0%, 0.4)", overflow: "hidden", width: "1.5rem", display: "flex", "flex-direction": "column", "justify-content": "center", "align-items": "center", height: "100%", color: "hsla(0, 0%, 100%, 0.2)" } })]) : t("div", { staticClass: "flex justify-between w-full", class: [
206
- {
207
- column: e.isSmallScreen,
208
- sm: e.isSmallScreen
209
- }
210
- ], staticStyle: { position: "relative" } }, [t("div", { staticClass: "flex flex-col w-full", class: [{ "fixed-price-type-string": e.isSmallScreen }], staticStyle: { "background-color": "hsl(224, 57%, 39%)" }, style: [e.backgroundSecondary] }, [t("div", { staticClass: "price-type-string data-text" }, [e._v(" " + e._s(e.priceTypeString) + " ")]), e.isSmallScreen ? e._e() : t("div", { staticClass: "price-deduction-text" }, [e._v(" " + e._s(e.priceDeductionVatString) + " ")])]), e.priceType.some((i) => ["openAcc", "openAccMaxPrice"].includes(i)) ? t("div", { staticClass: "open-acc-wrapper" }, [e.openAccMaxPrice ? t("div", { staticClass: "open-acc-item" }, [t("div", [e._v(e._s(e._document.$t("price.maxPrice").capitalize()) + " " + e._s(e._document.$t("vat.exVat", { thing: e._document.$t(`vat.${e.vatType}`) })) + ":")]), t("div", [e._v(e._s(e.priceFormat(e.openAccMaxPrice, { currency: e.currency })))])]) : e._e(), t("div", { staticClass: "open-acc-link" }, [e._v(" " + e._s(e._document.$t("see").capitalize()) + " "), t("span", { staticStyle: { color: "inherit", cursor: "pointer" }, on: { click: e.scrollToPricing } }, [t("u", [e._v(e._s(e._document.$t("price.price_plural")))])]), e._v(" " + e._s(e._document.$t("summaryBottom.forDetails")) + " ")])]) : t("div", { staticClass: "flex items-center w-full", class: [{ "justify-end": !e.isSmallScreen }] }, [t("div", { staticClass: "data-text", staticStyle: { "font-size": "2rem", "font-weight": "900", "letter-spacing": "1px", "line-height": "1", "padding-bottom": "0.3rem" } }, [e._v(" " + e._s(e.priceType.includes("approx") ? e._document.$t("approx").capitalize() : "") + " " + e._s(e.priceFormat(e.priceTotal, { currency: e.currency, decimals: 2, hideZeroDecimals: !0 })) + " ")])]), e.isSmallScreen ? t("div", { staticClass: "label-text caps price-deduction-text", staticStyle: { "margin-top": "4px" } }, [e._v(" " + e._s(e.priceDeductionVatString) + " ")]) : e._e()])])]);
211
- }, C = [], $ = /* @__PURE__ */ c(
212
- x,
213
- b,
214
- C,
215
- !1,
216
- null,
217
- "dd3b66e4",
218
- null,
219
- null
220
- );
221
- const w = $.exports;
222
- const T = {
223
- name: "PriceHeader",
224
- components: {
225
- SummaryTop: S,
226
- SummaryBottom: w,
227
- BlockMedia: u
228
- },
229
- mixins: [n([
230
- "media",
231
- "backgroundColor",
232
- "documentName",
233
- "showPriceSummary",
234
- "showLogo",
235
- "logotype"
236
- ])],
237
- props: {
238
- _document: {
239
- type: Object,
240
- default: () => ({})
241
- },
242
- _value: {
243
- type: Object,
244
- default: () => ({})
245
- },
246
- hasHover: {
247
- type: Boolean,
248
- default: !1
249
- }
250
- },
251
- computed: {
252
- internalName: {
253
- get() {
254
- return this.documentName;
255
- },
256
- set(s) {
257
- this.documentName = s, this.$emit("input", { key: "data.name", value: p(s).trim().slice(0, 255) });
258
- }
259
- },
260
- company() {
261
- return this._document.sender.company;
262
- },
263
- prices() {
264
- return this._document.prices;
265
- },
266
- estimatedTimeString() {
267
- var t, i;
268
- const { value: s, unitType: e } = ((i = (t = this._document) == null ? void 0 : t.data) == null ? void 0 : i.estimatedTime) || {};
269
- return !s || !e ? null : this.$tc(`${e}`, { count: s });
270
- },
271
- sendAtShowDate() {
272
- const { sentAt: s, scheduledFirstDelivery: e } = this._document;
273
- return s || (e ? e.sendAt : null);
274
- },
275
- summaryBottom() {
276
- var i;
277
- let s = {
278
- show: !1,
279
- backgroundColor: this.backgroundColor || this._document.theme.priceSummaryBackground,
280
- documentCurrency: this._document.currency,
281
- vatType: this._document.vatType
282
- }, { showPriceSummary: e } = this;
283
- typeof e != "boolean" && ({ showPriceSummary: e } = this._document.theme);
284
- const t = ((i = this._document.packageGroups) == null ? void 0 : i.packages) || [];
285
- return t.length > 1 ? s = {
286
- ...s,
287
- show: e,
288
- base: { prices: this.prices },
289
- options: t.filter(({ toggable: r }) => r).map(({ prices: r }) => ({ prices: r }))
290
- } : s = {
291
- ...s,
292
- show: e && this._document.readPrices && (this.prices.total || this.prices.type.some((r) => ["openAccMaxPrice", "openAcc"].includes(r))),
293
- base: { prices: this.prices }
294
- }, this.canEdit && e && (s.show = !0), s.documentCurrency || (s.show = !1), s;
295
- }
296
- }
297
- };
298
- var k = function() {
299
- var i, r;
300
- var e = this, t = e._self._c;
301
- return t("div", [t("div", { staticClass: "doc-jumbotron-wrapper" }, [t("BlockMedia", { staticClass: "price-media-wrapper", attrs: { media: {
302
- ...e.media,
303
- resourceUrl: ((i = e.media) == null ? void 0 : i.resourceUrl) || e._document.theme.background,
304
- overlayColor: ((r = e.media) == null ? void 0 : r.overlayColor) || e._document.theme.backgroundFilter
305
- } } }), t("SummaryTop", { attrs: { _document: e._document, "show-logo": e.showLogo, logotype: e.logotype, "company-logotype": e.company.logotype, "sender-name": e.company.name, "doc-type": e._document.docNumber.series, "doc-name": e.internalName, "doc-number": e._document.docNumber.value, "sent-at": e.sendAtShowDate, "expires-at": e._document.expiresAt, "estimated-time": e.estimatedTimeString, "has-hover": e.hasHover }, on: { "update:showLogo": function(o) {
306
- e.showLogo = o;
307
- }, "update:show-logo": function(o) {
308
- e.showLogo = o;
309
- }, "update:logotype": function(o) {
310
- e.logotype = o;
311
- }, "update:docName": function(o) {
312
- e.internalName = o;
313
- }, "update:doc-name": function(o) {
314
- e.internalName = o;
315
- } } })], 1), e.summaryBottom.show ? t("SummaryBottom", e._b({ attrs: { _document: e._document } }, "SummaryBottom", e.summaryBottom, !1)) : e._e()], 1);
316
- }, A = [], B = /* @__PURE__ */ c(
317
- T,
318
- k,
319
- A,
320
- !1,
321
- null,
322
- "d570ff60",
323
- null,
324
- null
325
- );
326
- const V = B.exports;
327
- export {
328
- V as default
329
- };