@cling-se/widget 0.22.4 → 0.23.0

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/CHANGELOG.md +16 -0
  2. package/dist/{AddClientCallout-DNZHh9aJ.js → AddClientCallout-Bv6IKK40.js} +6 -6
  3. package/dist/AnswerModal-BH7HUCFy.js +4511 -0
  4. package/dist/{AttachmentItem-D6b6WSIC.js → AttachmentItem-DVVxOm2E.js} +6 -6
  5. package/dist/{BaseUpload-DW7wAWia.js → BaseUpload-B8k82P27.js} +2 -2
  6. package/dist/{BlockMedia-CIz6WbRP.js → BlockMedia-BcvfBi4G.js} +4 -4
  7. package/dist/{CCallout-BuWA9vQi.js → CCallout-BbBdzwkb.js} +3 -3
  8. package/dist/{CCurrencyDropdown-rIQOA7zf.js → CCurrencyDropdown-2PRaeJHp.js} +5 -5
  9. package/dist/{CDropdownItem-DA4QbI32.js → CDropdownItem-CFTdvAJc.js} +13 -13
  10. package/dist/{CFormField.vue_vue_type_script_setup_true_lang-qFddDazf.js → CFormField.vue_vue_type_script_setup_true_lang-B0HHxy2B.js} +7 -7
  11. package/dist/{CPhoneFormat-CvkaRSKJ.js → CPhoneFormat-D__bIItZ.js} +1 -1
  12. package/dist/{regions-BdZt9Srn.js → CPhoneInput-DPqzQOjR.js} +205 -3
  13. package/dist/{CPriceInput-C5r9iilu.js → CPriceInput-BJ1hmANq.js} +4 -4
  14. package/dist/{CSelect-GoTrnuJR.js → CSelect-GhGdyQzt.js} +4 -4
  15. package/dist/{CSkeleton-C4jNQwG5.js → CSkeleton-Ro7hmy5_.js} +5 -5
  16. package/dist/{ClientAutocomplete-BMbBwVkp.js → ClientAutocomplete-Ci08U3Eg.js} +10 -10
  17. package/dist/{ClientModal-cLE2g03X.js → ClientModal-CZjzCgw_.js} +253 -223
  18. package/dist/{ColorPicker-DephKZ2W.js → ColorPicker-Bdev0Tci.js} +27 -27
  19. package/dist/{CompanyModal-BLF26B1Y.js → CompanyModal-vZnMCWG-.js} +8 -8
  20. package/dist/{ContentWrapper-DqH_Tg4O.js → ContentWrapper-CAlHzSsP.js} +18 -18
  21. package/dist/{CoverBlockSettings-CjLkmC3R.js → CoverBlockSettings-CRG8Q2mD.js} +42 -42
  22. package/dist/{DocAnswer-BOCE0iTj.js → DocAnswer-DHVVPZff.js} +2 -2
  23. package/dist/{DocDetails-BNzZbHuR.js → DocDetails-W4sRFsQP.js} +8 -8
  24. package/dist/{DocForm-DATslViB.js → DocForm-B0HWL32c.js} +853 -757
  25. package/dist/{DocFormSend-TrpwDUwL.js → DocFormSend-BHjoq88x.js} +2 -2
  26. package/dist/{DocLinks-COu3hrrY.js → DocLinks-BKJ_usNd.js} +2 -2
  27. package/dist/{DocModalBase-1C2Kgo0U.js → DocModalBase-Z1ZEPL_z.js} +1 -1
  28. package/dist/{DocPrint-D0C1wkRv.js → DocPrint-W53zklGf.js} +3 -3
  29. package/dist/{DocReceipt-DuCwfC4c.js → DocReceipt-CG954L85.js} +10 -10
  30. package/dist/{DocSendReminder-CIuktfcG.js → DocSendReminder-rE0hlFaZ.js} +3 -3
  31. package/dist/{DocTextEditor-D3GXD6oS.js → DocTextEditor-DwYMXhZv.js} +9 -9
  32. package/dist/{DocTimeline-DFRH0ZoY.js → DocTimeline-BsvUw4lW.js} +17 -17
  33. package/dist/{DocumentClient-C-x_FhRo.js → DocumentClient-DeDGrmbP.js} +5 -5
  34. package/dist/{DocumentLayout-CG3CMORs.js → DocumentLayout-DdXflWEb.js} +28 -28
  35. package/dist/{DocumentLogotype-Dzg56cWX.js → DocumentLogotype-eSStO83t.js} +3 -3
  36. package/dist/{DocumentVoided-BwR0opXX.js → DocumentVoided-CF_snlgf.js} +1 -1
  37. package/dist/{EmbedInput-BsE3t6-g.js → EmbedInput-C6zvXcOu.js} +5 -5
  38. package/dist/{EmbedSettings-D-9KP6m4.js → EmbedSettings-BO0wk_Mz.js} +3 -3
  39. package/dist/{ErrorCallout-B_mC-Fe1.js → ErrorCallout-BX44gJMR.js} +1 -1
  40. package/dist/{FilePreviewModal-BvjuHHjm.js → FilePreviewModal-Dl9kL1D4.js} +2 -2
  41. package/dist/{Flag-DPAkxgnZ.js → Flag-CUjMh16L.js} +1 -1
  42. package/dist/{HeaderSettings-BvSFZXCC.js → HeaderSettings-CGAKOOf2.js} +18 -18
  43. package/dist/{ImageSelectModal-dxT1FSSS.js → ImageSelectModal-CBJLdDWY.js} +3 -3
  44. package/dist/{ImageUploadWrapper-Nv2ER9An.js → ImageUploadWrapper-3iw_ifJm.js} +2 -2
  45. package/dist/{Index-CmW_KqwC.js → Index--LhQAU0e.js} +4 -4
  46. package/dist/{Index-C8TA-TOH.js → Index-B9IVTM-6.js} +4 -4
  47. package/dist/{Index-CfhN1h-r.js → Index-BHc8-EVf.js} +2 -2
  48. package/dist/{Index-B7qmjT-n.js → Index-BKdt7W1p.js} +11 -11
  49. package/dist/{Index-BYZV5v4f.js → Index-BQjcDZPz.js} +8 -8
  50. package/dist/{Index-CN-SsBzv.js → Index-BXgbccOo.js} +2 -2
  51. package/dist/{Index-Di3aqW-F.js → Index-Bc75-4Ee.js} +41 -41
  52. package/dist/{Index-D5ZQV_ag.js → Index-Bf6twTPv.js} +1 -1
  53. package/dist/{Index-D05kz85o.js → Index-BwyxrAfq.js} +2 -2
  54. package/dist/{Index-CM_86t2X.js → Index-CFk1oikV.js} +5 -5
  55. package/dist/{Index-D5hQ9Sjn.js → Index-CRPvQg7m.js} +4 -4
  56. package/dist/{Index-DAlIF7c_.js → Index-CZLo46BA.js} +2 -2
  57. package/dist/{Index-CXzCLl4Y.js → Index-Cay1MsI0.js} +4 -4
  58. package/dist/{Index-jRiyU4XJ.js → Index-CbJAROk-.js} +6 -6
  59. package/dist/{Index-Dlgu9gBy.js → Index-Ck3YMDt4.js} +14 -14
  60. package/dist/{Index-CeYtiMwu.js → Index-CmtHodVa.js} +7 -7
  61. package/dist/{Index-BYyYmGls.js → Index-Cv-ZmqIf.js} +19 -19
  62. package/dist/Index-D3GyeaZ3.js +4 -0
  63. package/dist/{Index-CUbEi910.js → Index-D3YAyImu.js} +3 -3
  64. package/dist/{Index-N8nTYiyd.js → Index-D48EyoXi.js} +4 -4
  65. package/dist/{Index-CjunFweP.js → Index-DDTMR3LI.js} +6 -6
  66. package/dist/{Index-DJAySS1C.js → Index-DExnFebC.js} +29 -29
  67. package/dist/{Index-xt53y9Zo.js → Index-DRNXEsk-.js} +5 -5
  68. package/dist/{Index-C5Fj3fR9.js → Index-DUvA8MIy.js} +3 -3
  69. package/dist/{Index-jle7V_kM.js → Index-DaOOJQM2.js} +3 -3
  70. package/dist/{Index-D5oFyd4s.js → Index-DlWc7i0k.js} +4 -4
  71. package/dist/{Index-C3Rh5cbz.js → Index-Dttziehp.js} +11 -11
  72. package/dist/{Index-D63aOUOW.js → Index-T6kXb5Sf.js} +5 -5
  73. package/dist/{Index-DckdXVR6.js → Index-_Xoo1bdc.js} +3 -3
  74. package/dist/{Index-BNIu3Ud9.js → Index-foC5v_3Y.js} +3 -3
  75. package/dist/{Index-DTVfouJF.js → Index-gLA2kURi.js} +4 -4
  76. package/dist/{Index-CNl8W0Qj.js → Index-gOnXhVx4.js} +7 -7
  77. package/dist/{Index-BzaWm4so.js → Index-j78ap3EU.js} +3 -3
  78. package/dist/{Index-DEcmLf1s.js → Index-qAnbtxTE.js} +7 -7
  79. package/dist/{Index.vue_vue_type_script_lang-CTwo2Vcj.js → Index.vue_vue_type_script_lang-DkStHbk0.js} +2 -2
  80. package/dist/{InputToggleRow-hhpru4Tk.js → InputToggleRow-COQQQaJS.js} +1 -1
  81. package/dist/{ManualPopover-DWHgPmo4.js → ManualPopover-2myYukDY.js} +3 -3
  82. package/dist/{MediaWrapper-DFQOWgIv.js → MediaWrapper-CzLU8HWj.js} +3 -3
  83. package/dist/{NotBindingText-C8nuYQyU.js → NotBindingText-Ds156Rs5.js} +2 -2
  84. package/dist/{PackageGroup-SphTfHuX.js → PackageGroup-wT1ri3ij.js} +9 -9
  85. package/dist/{PdfTerms-DBaBtDkV.js → PdfTerms-CcFpPx19.js} +2 -2
  86. package/dist/{PdfViewer-BAwmny53.js → PdfViewer-B7qdDox0.js} +24 -24
  87. package/dist/{PlainHtml.vue_vue_type_script_setup_true_lang-DCWzxQzX.js → PlainHtml.vue_vue_type_script_setup_true_lang-pAIAnHdh.js} +1 -1
  88. package/dist/{PriceHeader-WCjqK7Bi.js → PriceHeader-CdJspOjM.js} +12 -12
  89. package/dist/{SearchApi-D3No6Dqd.js → SearchApi-zTefPc4C.js} +15 -5
  90. package/dist/{SendForm-DRc7hoaV.js → SendForm-DWiNVIs2.js} +8 -8
  91. package/dist/{Setup-Cs6_giNI.js → Setup-D90T_HW3.js} +1 -1
  92. package/dist/{SmartList-B0PP_sSE.js → SmartList-mO6hykju.js} +1 -1
  93. package/dist/{Sortable.vue_vue_type_script_setup_true_lang-ZolW_Wsv.js → Sortable.vue_vue_type_script_setup_true_lang-D22AqpXY.js} +35 -35
  94. package/dist/{TermsSettings-D1gsuKfo.js → TermsSettings-CW4GvPBa.js} +14 -14
  95. package/dist/{ThemeColorRow-MBlQPvxx.js → ThemeColorRow-C9XPet4I.js} +5 -5
  96. package/dist/{ToggleBinding-8pGtAGC1.js → ToggleBinding-5Ewi_NNo.js} +5 -5
  97. package/dist/{UploadModal-Bjf1zHOJ.js → UploadModal-ChOeO-8_.js} +4 -4
  98. package/dist/{VideoPlayerInput-C47DpiP5.js → VideoPlayerInput-CtZi6yF_.js} +6 -6
  99. package/dist/{VideoPlayerSettings-4IkCJlQi.js → VideoPlayerSettings-Bg8IvjwK.js} +2 -2
  100. package/dist/{VideoSelectModal-Cqto80td.js → VideoSelectModal-E01NsD3K.js} +5 -5
  101. package/dist/{dom-DOcGU3-g.js → dom-B_lSczxY.js} +5 -6
  102. package/dist/{focusDrawerMixin-BKLMBRx9.js → focusDrawerMixin-DfuFLIV0.js} +1 -1
  103. package/dist/{formDrawerState-DLcwOQ4Q.js → formDrawerState-DlaQS_ZT.js} +1 -1
  104. package/dist/{fortnoxTheme-afOWlK_c.js → fortnoxTheme-CyUIkVuu.js} +1 -1
  105. package/dist/{helpers-DIwX03XH.js → helpers-B1vYJYc-.js} +1 -1
  106. package/dist/{index-DWh08PmG.js → index-BPR1VsLM.js} +1 -1
  107. package/dist/{index-Brm5io83.js → index-CBkI7Hc7.js} +28 -28
  108. package/dist/index-CXYvBw0i.js +107 -0
  109. package/dist/index-DK3w2fdd.js +896 -0
  110. package/dist/{index-1lAgEf-q.js → index-DOK_hQri.js} +28 -28
  111. package/dist/{index-C5Y--h93.js → index-DnMhYLAz.js} +1 -1
  112. package/dist/{index-Bx76J19m.js → index-hj2QoJyP.js} +8 -8
  113. package/dist/index.es.js +2 -2
  114. package/dist/index.umd.js +190 -219
  115. package/dist/{main-2P1is0vk.js → main-BnJTDeKH.js} +368 -392
  116. package/dist/{mapFormMixin-CwOdsAx8.js → mapFormMixin-sXjgYtfb.js} +2 -2
  117. package/dist/{omit-DRXgPscM.js → omit-DQlOTuQS.js} +1 -1
  118. package/dist/{splitpanes-BgdVTU0e.js → splitpanes-4FF5o_FM.js} +1 -1
  119. package/dist/{template-Dbh8Beut.js → template-dbF0t2om.js} +1 -1
  120. package/dist/{tippy.esm-BRo_GJ2r.js → tippy.esm-Bu14Lq2S.js} +50 -50
  121. package/dist/{useTermsModal-BoFP5jyd.js → useTermsModal-DKiiU8a4.js} +4 -4
  122. package/dist/{utils-BbQPVxxj.js → utils-Dn9pHgbx.js} +1 -1
  123. package/dist/{validation-B0Jd0etq.js → validation-D_KP2hMr.js} +3 -3
  124. package/dist/widget.css +1 -1
  125. package/package.json +1 -1
  126. package/dist/AnswerModal-Disz8n8v.js +0 -3653
  127. package/dist/CPhoneInput-DT0zBmee.js +0 -207
  128. package/dist/Index--uza8ciS.js +0 -4
  129. package/dist/anime.es-4wvNItHq.js +0 -862
  130. package/dist/index-BsFKTasH.js +0 -3590
  131. package/dist/index-_a-1nXaE.js +0 -149
  132. package/dist/validations-ohsJ5nBz.js +0 -34
@@ -0,0 +1,896 @@
1
+ import { k as R, _ as l, b as u, d as b, o as c, j as i, f as h, t as r, w as p, s as m, a as P, ae as L, de as C, O as y, e as $, c as g, m as A, df as D, ax as v, aC as O, l as w, g as V, V as j, cV as E, $ as N, aj as G } from "./main-BnJTDeKH.js";
2
+ const q = Symbol("paywall"), z = Symbol("paywall:featureMapExtensions"), Y = {
3
+ isAvailable: !1,
4
+ openUpgradeModal() {
5
+ },
6
+ openFeatureUpgradeModal() {
7
+ },
8
+ getExtraPriceForLicense() {
9
+ return null;
10
+ }
11
+ };
12
+ function S() {
13
+ return R(q, Y);
14
+ }
15
+ function K() {
16
+ return R(z, {});
17
+ }
18
+ const W = {
19
+ name: "CalloutLegacy",
20
+ i18nOptions: {
21
+ namespaces: "components",
22
+ messages: {
23
+ sv: {
24
+ legacy: {
25
+ title: "Du har en gammal kontoplan",
26
+ text: `
27
+ Den här funktionen är enbart tillgänglig på våra uppdaterade kontoplaner.
28
+ För att gå vidare måste du först byta till de uppdaterade kontoplanerna.
29
+ `,
30
+ action: "Gå till inställningar"
31
+ },
32
+ invoice: {
33
+ title: "Byt till kortbetalning",
34
+ text: `
35
+ För att gå vidare måste du byta till att använda kortbetalning.
36
+ Din betalningsmetod är just nu faktura.
37
+ `,
38
+ action: "Gå till inställningar"
39
+ }
40
+ },
41
+ en: {
42
+ legacy: {
43
+ title: "Your account plan is outdated",
44
+ text: `
45
+ This feature is now only available on our updated account plans.
46
+ To continue you must first convert your account to the updated account plans.
47
+ `,
48
+ action: "Go to settings"
49
+ },
50
+ invoice: {
51
+ title: "Change to card",
52
+ text: `
53
+ To continue you must change your payment method to card. You're currently using invoice as a payment method.
54
+ `,
55
+ action: "Go to settings"
56
+ }
57
+ }
58
+ }
59
+ },
60
+ props: {
61
+ mode: {
62
+ type: String,
63
+ default: "legacy",
64
+ validator: (e) => ["legacy", "invoice"].includes(e)
65
+ }
66
+ }
67
+ }, H = { style: { border: "2px solid hsla(35, 100%, 50%, 0.2)", "background-color": "hsl(35, 100%, 91%)", padding: "1.5em", "border-radius": "8px", margin: "calc(2 * var(--rem)) 0 calc(3 * var(--rem)) 0" } }, J = ["textContent"], Q = ["textContent"];
68
+ function X(e, o, t, d, s, n) {
69
+ const a = u("CButton");
70
+ return c(), b("div", H, [
71
+ i("div", {
72
+ style: { "font-weight": "600" },
73
+ textContent: r(e.$t(`${t.mode}.title`))
74
+ }, null, 8, J),
75
+ i("div", {
76
+ style: { "font-size": "14px", opacity: "0.7", "margin-bottom": "2em" },
77
+ textContent: r(e.$t(`${t.mode}.text`))
78
+ }, null, 8, Q),
79
+ h(a, {
80
+ to: { name: "settingsBilling", query: { highlight: t.mode } },
81
+ target: "_blank",
82
+ type: "secondary",
83
+ wide: "",
84
+ "icon-right": "new-window"
85
+ }, {
86
+ default: p(() => [
87
+ m(r(e.$t(`${t.mode}.action`)), 1)
88
+ ]),
89
+ _: 1
90
+ }, 8, ["to"])
91
+ ]);
92
+ }
93
+ const x = /* @__PURE__ */ l(W, [["render", X]]), Z = {
94
+ name: "IsPremium",
95
+ setup() {
96
+ return { paywall: S() };
97
+ },
98
+ computed: {
99
+ ...P({
100
+ feature: "application/feature",
101
+ subscription: "application/subscription",
102
+ companyAccount: "application/companyAccount"
103
+ }),
104
+ isPremium() {
105
+ return C.includes(this.subscription.type);
106
+ },
107
+ isPremiumLike() {
108
+ return ["trial", ...C].includes(this.subscription.type);
109
+ },
110
+ isProLike() {
111
+ return ["pro", "trial"].includes(this.subscription.type);
112
+ },
113
+ allowPremiumFeatures() {
114
+ return !0;
115
+ },
116
+ canCreateDocument() {
117
+ return this.subscription.freeDocumentsLeft > 0 || // Has free quota left
118
+ L(this.companyAccount, "documentQuota.priceExtra.value") !== null;
119
+ },
120
+ canCreateTemplate() {
121
+ return this.feature("createDocTemplate");
122
+ },
123
+ canUseTemplate() {
124
+ return this.feature("useDocTemplate");
125
+ },
126
+ canUseBankId() {
127
+ return this.isPremiumLike ? !0 : !!this.subscription.freeBankIdLeft;
128
+ },
129
+ canUseSms() {
130
+ return this.isPremiumLike ? !0 : !!this.subscription.freeSmsLeft;
131
+ }
132
+ },
133
+ methods: {
134
+ openUpgradeModal(e = {}) {
135
+ this.paywall.openUpgradeModal(e);
136
+ }
137
+ }
138
+ };
139
+ function ee(e, o, t, d, s, n) {
140
+ return y(e.$slots, "default", {
141
+ isPremium: n.isPremium,
142
+ isPremiumLike: n.isPremiumLike,
143
+ isProLike: n.isProLike,
144
+ isLegacy: e.subscription.isStripeLegacy,
145
+ showCalloutConvertStripe: e.subscription.showCalloutConvertStripe,
146
+ allowPremiumFeatures: n.allowPremiumFeatures,
147
+ openUpgradeModal: n.openUpgradeModal,
148
+ accountType: e.subscription.type,
149
+ freeDocumentsLeft: e.subscription.freeDocumentsLeft,
150
+ trialDaysLeft: e.subscription.trialDaysLeft,
151
+ maxProjectManagers: e.subscription.maxProjectManagers,
152
+ initialFreePremiumDays: e.subscription.initialFreePremiumDays,
153
+ canCreateDocument: n.canCreateDocument,
154
+ canUseTemplate: n.canUseTemplate,
155
+ canCreateTemplate: n.canCreateTemplate,
156
+ canUseBankId: n.canUseBankId,
157
+ canUseSms: n.canUseSms
158
+ });
159
+ }
160
+ const F = /* @__PURE__ */ l(Z, [["render", ee]]), te = {
161
+ i18nOptions: {
162
+ namespaces: "components",
163
+ messages: {
164
+ sv: {
165
+ badge: {
166
+ premium: "Base & Pro",
167
+ pro: "Pro only"
168
+ },
169
+ upgradeButton: "Uppgradera nu",
170
+ cancelButton: "Nej, tack"
171
+ },
172
+ en: {
173
+ badge: {
174
+ premium: "Base & Pro",
175
+ pro: "Pro only"
176
+ },
177
+ upgradeButton: "Upgrade now",
178
+ cancelButton: "No thanks"
179
+ }
180
+ }
181
+ },
182
+ name: "PremiumRestrictedBase",
183
+ components: {
184
+ IsPremium: F,
185
+ CalloutLegacy: x
186
+ },
187
+ emits: ["close"],
188
+ props: {
189
+ plan: {
190
+ type: String,
191
+ default: "pro",
192
+ validator: (e) => ["pro", "premium"].includes(e)
193
+ },
194
+ title: {
195
+ type: String,
196
+ default: ""
197
+ },
198
+ subTitle: {
199
+ type: String,
200
+ default: ""
201
+ },
202
+ badgeText: {
203
+ type: String,
204
+ default: ""
205
+ },
206
+ onUpgrade: {
207
+ type: Function,
208
+ default: null
209
+ },
210
+ actionFunction: {
211
+ type: Function,
212
+ default: null
213
+ }
214
+ },
215
+ data() {
216
+ return {
217
+ isLoading: !1
218
+ };
219
+ },
220
+ methods: {
221
+ async onActionClick(e) {
222
+ try {
223
+ this.isLoading = !0, await e({ callback: this.onUpgrade }), this.$emit("close");
224
+ } finally {
225
+ this.isLoading = !1;
226
+ }
227
+ }
228
+ }
229
+ }, ne = { class: "root font-inter" }, ae = { class: "lock-wrapper has-text-white" }, oe = { style: { width: "100%" } }, se = { class: "flex items-center justify-center" }, re = { class: "badge-premium" }, ie = { style: { "text-align": "center" } }, ue = { class: "title" }, ce = { class: "sub-title" }, le = {
230
+ key: 0,
231
+ style: { "margin-top": "calc(2 * var(--rem))" }
232
+ }, de = { style: { "margin-top": "calc(2 * var(--rem))" } }, pe = { style: { "margin-top": "5px" } };
233
+ function me(e, o, t, d, s, n) {
234
+ const a = u("CIcon"), _ = u("CalloutLegacy"), T = u("CButton"), M = u("IsPremium");
235
+ return c(), b("div", ne, [
236
+ i("div", ae, [
237
+ h(a, {
238
+ type: "lock",
239
+ size: "24"
240
+ })
241
+ ]),
242
+ i("div", oe, [
243
+ i("div", se, [
244
+ i("div", re, r(e.$t(`badge.${t.plan}`)), 1)
245
+ ]),
246
+ i("div", ie, [
247
+ y(e.$slots, "default", {}, () => [
248
+ y(e.$slots, "image", {}, void 0, !0),
249
+ i("div", ue, r(t.title), 1),
250
+ i("div", ce, r(t.subTitle), 1)
251
+ ], !0),
252
+ e.$slots.content ? (c(), b("div", le, [
253
+ y(e.$slots, "content", {}, void 0, !0)
254
+ ])) : $("", !0)
255
+ ]),
256
+ i("div", de, [
257
+ h(M, null, {
258
+ default: p(({ openUpgradeModal: U, isLegacy: k, showCalloutConvertStripe: B }) => [
259
+ i("div", null, [
260
+ k || B ? (c(), g(_, {
261
+ key: 0,
262
+ mode: k ? "legacy" : "invoice"
263
+ }, null, 8, ["mode"])) : $("", !0),
264
+ h(T, {
265
+ loading: s.isLoading,
266
+ disabled: k || B,
267
+ type: "secondary",
268
+ wide: "",
269
+ onClick: (Ze) => n.onActionClick(t.actionFunction || U)
270
+ }, {
271
+ default: p(() => [
272
+ y(e.$slots, "actionText", {}, () => [
273
+ m(r(e.$t("upgradeButton")), 1)
274
+ ], !0)
275
+ ]),
276
+ _: 2
277
+ }, 1032, ["loading", "disabled", "onClick"])
278
+ ])
279
+ ]),
280
+ _: 3
281
+ }),
282
+ i("div", pe, [
283
+ h(T, {
284
+ type: "none",
285
+ pattern: "tertiary",
286
+ wide: "",
287
+ onClick: o[0] || (o[0] = (U) => e.$parent.$emit("close"))
288
+ }, {
289
+ default: p(() => [
290
+ m(r(e.$t("cancelButton")), 1)
291
+ ]),
292
+ _: 1
293
+ })
294
+ ])
295
+ ])
296
+ ])
297
+ ]);
298
+ }
299
+ const f = /* @__PURE__ */ l(te, [["render", me], ["__scopeId", "data-v-ba6ddd4c"]]), ge = {
300
+ i18nOptions: {
301
+ namespaces: "PremiumRestrictedBankIdAndSms",
302
+ messages: {
303
+ sv: {
304
+ title: "Skicka med {{bankIdText,spaceAfter}}SMS",
305
+ subTitle: "För att kunna skicka fler dokument med {{bankIdText,spaceAfter}}SMS behöver du uppgradera ditt konto.",
306
+ actionText: "Uppgradera konto"
307
+ },
308
+ en: {
309
+ title: "Send with {{bankIdText,spaceAfter}}SMS",
310
+ subTitle: "To send more documents with {{bankIdText,spaceAfter}}SMS you need to upgrade your account.",
311
+ actionText: "Upgrade my plan"
312
+ }
313
+ }
314
+ },
315
+ name: "PremiumRestrictedBankIdAndSms",
316
+ components: {
317
+ PremiumRestrictedBase: f
318
+ },
319
+ props: {
320
+ onUpgrade: {
321
+ type: Function,
322
+ default: null
323
+ }
324
+ },
325
+ computed: {
326
+ ...P({
327
+ feature: "application/feature"
328
+ })
329
+ }
330
+ };
331
+ function fe(e, o, t, d, s, n) {
332
+ const a = u("PremiumRestrictedBase");
333
+ return c(), g(a, {
334
+ title: e.$t("title", {
335
+ bankIdText: e.feature("bankId") ? "BankID " + e.$t("_common:and") : ""
336
+ }),
337
+ "sub-title": e.$t("subTitle", {
338
+ bankIdText: e.feature("bankId") ? "BankID " + e.$t("_common:or") : ""
339
+ }),
340
+ "on-upgrade": t.onUpgrade,
341
+ plan: "pro"
342
+ }, {
343
+ actionText: p(() => [
344
+ m(r(e.$t("actionText")), 1)
345
+ ]),
346
+ _: 1
347
+ }, 8, ["title", "sub-title", "on-upgrade"]);
348
+ }
349
+ const he = /* @__PURE__ */ l(ge, [["render", fe]]), ye = {
350
+ i18nOptions: {
351
+ namespaces: "licenses",
352
+ messages: {
353
+ sv: {
354
+ title: "Lägg till skapare",
355
+ subTitle: "För att bjuda in en dokumentskapare behöver du uppgradera till vår Base- eller Pro-plan.",
356
+ actionText: "Uppgradera konto"
357
+ },
358
+ en: {
359
+ title: "Add creators",
360
+ subTitle: "To invite creators you need to upgrade your account to the Base or Pro plan.",
361
+ actionText: "Upgrade my plan"
362
+ }
363
+ }
364
+ },
365
+ name: "PremiumRestrictedCreators",
366
+ components: {
367
+ PremiumRestrictedBase: f
368
+ },
369
+ props: {
370
+ onUpgrade: {
371
+ type: Function,
372
+ default: null
373
+ }
374
+ }
375
+ };
376
+ function be(e, o, t, d, s, n) {
377
+ const a = u("PremiumRestrictedBase");
378
+ return c(), g(a, {
379
+ title: e.$t("title"),
380
+ "sub-title": e.$t("subTitle"),
381
+ "action-function": t.onUpgrade,
382
+ plan: "premium"
383
+ }, {
384
+ actionText: p(() => [
385
+ m(r(e.$t("actionText")), 1)
386
+ ]),
387
+ _: 1
388
+ }, 8, ["title", "sub-title", "action-function"]);
389
+ }
390
+ const _e = /* @__PURE__ */ l(ye, [["render", be]]), ke = {
391
+ i18nOptions: {
392
+ namespaces: "stats",
393
+ messages: {
394
+ sv: {
395
+ title: "Premium block",
396
+ subTitle: "För att använda premium block behöver du uppgradera ditt konto till Pro.",
397
+ actionText: "Uppgradera konto"
398
+ },
399
+ en: {
400
+ title: "Premium block",
401
+ subTitle: "To use premium blocks, you need to upgrade your account to Pro.",
402
+ actionText: "Upgrade my plan"
403
+ }
404
+ }
405
+ },
406
+ name: "PremiumRestrictedDocumentBlocks",
407
+ components: {
408
+ PremiumRestrictedBase: f
409
+ },
410
+ props: {
411
+ onUpgrade: {
412
+ type: Function,
413
+ default: null
414
+ }
415
+ }
416
+ };
417
+ function ve(e, o, t, d, s, n) {
418
+ const a = u("PremiumRestrictedBase");
419
+ return c(), g(a, {
420
+ title: e.$t("title"),
421
+ "sub-title": e.$t("subTitle"),
422
+ "on-upgrade": t.onUpgrade,
423
+ plan: "pro"
424
+ }, {
425
+ actionText: p(() => [
426
+ m(r(e.$t("actionText")), 1)
427
+ ]),
428
+ _: 1
429
+ }, 8, ["title", "sub-title", "on-upgrade"]);
430
+ }
431
+ const $e = /* @__PURE__ */ l(ke, [["render", ve]]), Pe = {
432
+ i18nOptions: {
433
+ namespaces: "PremiumRestrictedDocuments",
434
+ messages: {
435
+ en: {
436
+ title: "Send unlimited amount of documents",
437
+ subTitle: "You have reached your limit of new documents for this month.",
438
+ voucherTitle: "A special gift from us",
439
+ voucherText: "Here is {{ count }} extra documents you can use.",
440
+ voucherButton: "Give me {{count}} extra documents",
441
+ voucherSuccessMessage: "{{ count }} extra documents are now available"
442
+ },
443
+ sv: {
444
+ title: "Skicka obegränsat med dokument",
445
+ subTitle: "Du har nått din gräns av nya dokument för den här månaden.",
446
+ voucherTitle: "En present från oss",
447
+ voucherText: "Här får du {{ count }} st dokument till att använda.",
448
+ voucherButton: "Ge mig {{count}} extra dokument",
449
+ voucherSuccessMessage: "Ditt konto har nu {{ count }} extra dokument"
450
+ }
451
+ }
452
+ },
453
+ name: "PremiumRestrictedDocuments",
454
+ components: {
455
+ PremiumRestrictedBase: f
456
+ },
457
+ emits: ["close"],
458
+ props: {
459
+ onUpgrade: {
460
+ type: Function,
461
+ default: null
462
+ }
463
+ },
464
+ data() {
465
+ return {
466
+ canUseFreeDocVoucher: !1,
467
+ voucherDocCount: 3,
468
+ // This should be updated if we change the voucher value
469
+ isLoading: !1
470
+ };
471
+ },
472
+ computed: {
473
+ ...P({
474
+ getCompanyUserSetting: "settings/getCompanyUserSetting",
475
+ user: "application/user",
476
+ account: "application/companyAccount"
477
+ })
478
+ },
479
+ created() {
480
+ try {
481
+ j("/documentLimitReached", {});
482
+ } catch (e) {
483
+ w(e, { showMessage: !1 });
484
+ }
485
+ },
486
+ async mounted() {
487
+ this.checkFreeDocVoucher();
488
+ },
489
+ methods: {
490
+ ...A({
491
+ loadCurrentCompany: V.DO_LOAD_CURRENT_COMPANY
492
+ }),
493
+ async checkFreeDocVoucher() {
494
+ var o, t;
495
+ if (this.canUseFreeDocVoucher = !1, ((o = this.account) == null ? void 0 : o.accountType) !== "free") return;
496
+ const e = JSON.parse(
497
+ v.getItem("voucher-freeUserDocs-company-id")
498
+ );
499
+ ((t = this.account) == null ? void 0 : t.CompanyId) !== e && (this.canUseFreeDocVoucher = await this.canUseVoucher());
500
+ },
501
+ async canUseVoucher() {
502
+ try {
503
+ return await D.canUse("freeUserDocs"), !0;
504
+ } catch {
505
+ return v.setItem(
506
+ "voucher-freeUserDocs-company-id",
507
+ this.account.CompanyId
508
+ ), !1;
509
+ }
510
+ },
511
+ async useFreeDocsVoucher() {
512
+ this.isLoading = !0;
513
+ try {
514
+ await D.post({ code: "freeUserDocs" }), v.setItem(
515
+ "voucher-freeUserDocs-company-id",
516
+ this.account.CompanyId
517
+ ), await this.loadCurrentCompany(), O(
518
+ "success",
519
+ this.$t("voucherSuccessMessage", { count: this.voucherDocCount })
520
+ ), this.onUpgrade && typeof this.onUpgrade == "function" && this.onUpgrade(), this.$emit("close");
521
+ } catch (e) {
522
+ w(e);
523
+ } finally {
524
+ this.isLoading = !1;
525
+ }
526
+ }
527
+ }
528
+ }, Te = {
529
+ key: 0,
530
+ style: { background: "hsl(33, 100%, 84%)", padding: "1em", "font-size": "15px", "border-radius": "0.5em" }
531
+ }, Ue = { style: { "font-size": "16px", "font-weight": "500" } }, Be = ["textContent"], Ce = {
532
+ class: "flex w-full justify-center",
533
+ style: { "margin-top": "calc(1 * var(--rem))" }
534
+ };
535
+ function De(e, o, t, d, s, n) {
536
+ const a = u("CButton"), _ = u("PremiumRestrictedBase");
537
+ return c(), g(_, {
538
+ title: e.$t("title"),
539
+ "sub-title": e.$t("subTitle"),
540
+ "on-upgrade": t.onUpgrade
541
+ }, {
542
+ content: p(() => [
543
+ s.canUseFreeDocVoucher ? (c(), b("div", Te, [
544
+ i("div", Ue, [
545
+ o[0] || (o[0] = i("span", { style: { "margin-right": "4px" } }, "🎁", -1)),
546
+ m(" " + r(e.$t("voucherTitle")), 1)
547
+ ]),
548
+ i("div", {
549
+ style: { opacity: "0.75" },
550
+ textContent: r(e.$t("voucherText", { count: s.voucherDocCount }))
551
+ }, null, 8, Be),
552
+ i("div", Ce, [
553
+ h(a, {
554
+ loading: s.isLoading,
555
+ transparent: "",
556
+ style: { border: "none", background: "hsl(33, 100%, 95%)", color: "hsl(33, 88%, 36%)", "box-shadow": "0 3px 6px -2px rgb(0, 0, 0, 0.3)" },
557
+ "icon-left": "heart",
558
+ onClick: n.useFreeDocsVoucher
559
+ }, {
560
+ default: p(() => [
561
+ m(r(e.$t("voucherButton", { count: s.voucherDocCount })), 1)
562
+ ]),
563
+ _: 1
564
+ }, 8, ["loading", "onClick"])
565
+ ])
566
+ ])) : $("", !0)
567
+ ]),
568
+ _: 1
569
+ }, 8, ["title", "sub-title", "on-upgrade"]);
570
+ }
571
+ const we = /* @__PURE__ */ l(Pe, [["render", De]]), Re = {
572
+ i18nOptions: {
573
+ namespaces: "personalMessage",
574
+ messages: {
575
+ en: {
576
+ title: "Make an impression",
577
+ subTitle: "Upgrade to premium to add a personal message"
578
+ },
579
+ sv: {
580
+ title: "Gör ett gott intryck",
581
+ subTitle: "Uppgradera till Premium för att kunna lägga till en personlig hälsning."
582
+ }
583
+ }
584
+ },
585
+ name: "PremiumRestrictedPersonalMessage",
586
+ components: {
587
+ PremiumRestrictedBase: f
588
+ },
589
+ props: {
590
+ onUpgrade: {
591
+ type: Function,
592
+ default: null
593
+ }
594
+ }
595
+ };
596
+ function Se(e, o, t, d, s, n) {
597
+ const a = u("PremiumRestrictedBase");
598
+ return c(), g(a, {
599
+ title: e.$t("title"),
600
+ "sub-title": e.$t("subTitle"),
601
+ "on-upgrade": t.onUpgrade
602
+ }, null, 8, ["title", "sub-title", "on-upgrade"]);
603
+ }
604
+ const xe = /* @__PURE__ */ l(Re, [["render", Se]]), Fe = {
605
+ i18nOptions: {
606
+ namespaces: "PremiumRestrictedEditDocumentLayout",
607
+ messages: {
608
+ sv: {
609
+ title: "Spara dokumentmall",
610
+ subTitle: "För att spara en dokumentmall behöver du uppgradera till ett betalkonto.",
611
+ actionText: "Uppgradera konto"
612
+ },
613
+ en: {
614
+ title: "Save document template",
615
+ subTitle: "To save a document template you need to upgrade to a paid plan.",
616
+ actionText: "Upgrade my plan"
617
+ }
618
+ }
619
+ },
620
+ name: "PremiumRestrictedSaveDocTemplate",
621
+ components: {
622
+ PremiumRestrictedBase: f
623
+ },
624
+ props: {
625
+ onUpgrade: {
626
+ type: Function,
627
+ default: null
628
+ }
629
+ }
630
+ };
631
+ function Ie(e, o, t, d, s, n) {
632
+ const a = u("PremiumRestrictedBase");
633
+ return c(), g(a, {
634
+ title: e.$t("title"),
635
+ "sub-title": e.$t("subTitle"),
636
+ "on-upgrade": t.onUpgrade,
637
+ plan: "pro"
638
+ }, {
639
+ actionText: p(() => [
640
+ m(r(e.$t("actionText")), 1)
641
+ ]),
642
+ _: 1
643
+ }, 8, ["title", "sub-title", "on-upgrade"]);
644
+ }
645
+ const Me = /* @__PURE__ */ l(Fe, [["render", Ie]]), Le = {
646
+ i18nOptions: {
647
+ namespaces: "stats",
648
+ messages: {
649
+ sv: {
650
+ title: "Statistik",
651
+ subTitle: "För att se statistik över alla dina dokument behöver du uppgradera ditt konto till Pro.",
652
+ actionText: "Uppgradera konto"
653
+ },
654
+ en: {
655
+ title: "Statistics",
656
+ subTitle: "To view statistics about all your documents you need to upgrade your account to Pro.",
657
+ actionText: "Upgrade my plan"
658
+ }
659
+ }
660
+ },
661
+ name: "PremiumRestrictedStats",
662
+ components: {
663
+ PremiumRestrictedBase: f
664
+ },
665
+ props: {
666
+ onUpgrade: {
667
+ type: Function,
668
+ default: null
669
+ }
670
+ }
671
+ };
672
+ function Ae(e, o, t, d, s, n) {
673
+ const a = u("PremiumRestrictedBase");
674
+ return c(), g(a, {
675
+ title: e.$t("title"),
676
+ "sub-title": e.$t("subTitle"),
677
+ "on-upgrade": t.onUpgrade,
678
+ plan: "pro"
679
+ }, {
680
+ actionText: p(() => [
681
+ m(r(e.$t("actionText")), 1)
682
+ ]),
683
+ _: 1
684
+ }, 8, ["title", "sub-title", "on-upgrade"]);
685
+ }
686
+ const Oe = /* @__PURE__ */ l(Le, [["render", Ae]]), Ve = {
687
+ i18nOptions: {
688
+ namespaces: "subTemplates",
689
+ messages: {
690
+ en: {
691
+ title: "Become even more effective",
692
+ subTitle: "Create reusable text so you can create proposal with a few click"
693
+ },
694
+ sv: {
695
+ title: "Bli ännu mer effektiv",
696
+ subTitle: "Skapa återanvändbara texter så kan du med ett par klick få en komplett offert."
697
+ }
698
+ }
699
+ },
700
+ name: "PremiumRestrictedTemplates",
701
+ components: {
702
+ PremiumRestrictedBase: f
703
+ },
704
+ props: {
705
+ onUpgrade: {
706
+ type: Function,
707
+ default: null
708
+ }
709
+ }
710
+ };
711
+ function je(e, o, t, d, s, n) {
712
+ const a = u("PremiumRestrictedBase");
713
+ return c(), g(a, {
714
+ title: e.$t("title"),
715
+ "sub-title": e.$t("subTitle"),
716
+ "on-upgrade": t.onUpgrade
717
+ }, null, 8, ["title", "sub-title", "on-upgrade"]);
718
+ }
719
+ const Ee = /* @__PURE__ */ l(Ve, [["render", je]]), Ne = {
720
+ i18nOptions: {
721
+ namespaces: "PremiumRestrictedUseDocTemplates",
722
+ messages: {
723
+ sv: {
724
+ title: "Använd dokumentmallar",
725
+ subTitle: "För att använda dokumentmallar behöver du uppgradera till ett betalkonto.",
726
+ actionText: "Uppgradera konto"
727
+ },
728
+ en: {
729
+ title: "Use document templates",
730
+ subTitle: "To use document templates you need to upgrade to a paid plan.",
731
+ actionText: "Upgrade my plan"
732
+ }
733
+ }
734
+ },
735
+ name: "PremiumRestrictedUseDocTemplates",
736
+ components: {
737
+ PremiumRestrictedBase: f
738
+ },
739
+ props: {
740
+ onUpgrade: {
741
+ type: Function,
742
+ default: null
743
+ }
744
+ }
745
+ };
746
+ function Ge(e, o, t, d, s, n) {
747
+ const a = u("PremiumRestrictedBase");
748
+ return c(), g(a, {
749
+ title: e.$t("title"),
750
+ "sub-title": e.$t("subTitle"),
751
+ "on-upgrade": t.onUpgrade,
752
+ plan: "pro"
753
+ }, {
754
+ actionText: p(() => [
755
+ m(r(e.$t("actionText")), 1)
756
+ ]),
757
+ _: 1
758
+ }, 8, ["title", "sub-title", "on-upgrade"]);
759
+ }
760
+ const qe = /* @__PURE__ */ l(Ne, [["render", Ge]]), ze = {
761
+ i18nOptions: {
762
+ namespaces: "winProfile",
763
+ keyPrefix: "account.subscription.winProfile",
764
+ messages: {
765
+ sv: {
766
+ // TODO REMOVE ?
767
+ title: "Designa din profil",
768
+ subTitle: "Anpassa ditt utseende så att det matchar dig & ditt företag"
769
+ },
770
+ en: {
771
+ // TODO REMOVE ?
772
+ title: "Design your profile",
773
+ subTitle: "Adjust profile to match your branding"
774
+ }
775
+ }
776
+ },
777
+ name: "PremiumRestrictedWinProfile",
778
+ components: {
779
+ PremiumRestrictedBase: f
780
+ },
781
+ props: {
782
+ onUpgrade: {
783
+ type: Function,
784
+ default: null
785
+ }
786
+ }
787
+ };
788
+ function Ye(e, o, t, d, s, n) {
789
+ const a = u("PremiumRestrictedBase");
790
+ return c(), g(a, {
791
+ title: e.$t("title"),
792
+ "sub-title": e.$t("subTitle"),
793
+ "on-upgrade": t.onUpgrade
794
+ }, null, 8, ["title", "sub-title", "on-upgrade"]);
795
+ }
796
+ const Ke = /* @__PURE__ */ l(ze, [["render", Ye]]), I = {
797
+ winProfile: Ke,
798
+ templates: Ee,
799
+ documents: we,
800
+ personalMessage: xe,
801
+ inviteCreators: _e,
802
+ stats: Oe,
803
+ documentBlocks: $e,
804
+ bankIdAndSms: he,
805
+ useDocTemplate: qe,
806
+ saveDocTemplate: Me
807
+ }, We = [...Object.keys(I), "licenses"], He = {
808
+ name: "IsPremiumPreStep",
809
+ inject: {
810
+ onUpgradeRequired: {
811
+ type: Function,
812
+ default: null
813
+ }
814
+ },
815
+ setup() {
816
+ return {
817
+ paywall: S(),
818
+ featureMapExtensions: K()
819
+ };
820
+ },
821
+ props: {
822
+ feature: {
823
+ type: String,
824
+ required: !0,
825
+ validator: (e) => We.includes(e)
826
+ }
827
+ },
828
+ computed: {
829
+ featureMap() {
830
+ return { ...I, ...this.featureMapExtensions };
831
+ },
832
+ modalName() {
833
+ return this.featureMap[this.feature] ?? null;
834
+ }
835
+ },
836
+ methods: {
837
+ onClick({ callback: e = null, data: o } = {}) {
838
+ if (typeof this.onUpgradeRequired == "function") {
839
+ this.onUpgradeRequired({ feature: this.feature, data: o });
840
+ return;
841
+ }
842
+ if (!this.modalName) {
843
+ if (this.paywall.isAvailable) {
844
+ this.paywall.openUpgradeModal({ callback: e });
845
+ return;
846
+ }
847
+ E.error(
848
+ `IsPremiumPreStep: no component for feature "${this.feature}" and no paywall provider`
849
+ );
850
+ return;
851
+ }
852
+ this.$modal.show(
853
+ this.modalName,
854
+ {
855
+ ...e && { onUpgrade: e }
856
+ },
857
+ {
858
+ adaptive: !0,
859
+ maxWidth: 390,
860
+ width: "90%",
861
+ height: "auto",
862
+ scrollable: !0,
863
+ classes: "overflow-visible primary"
864
+ }
865
+ );
866
+ }
867
+ }
868
+ };
869
+ function Je(e, o, t, d, s, n) {
870
+ return y(e.$slots, "default", { onClick: n.onClick });
871
+ }
872
+ const Qe = /* @__PURE__ */ l(He, [["render", Je]]), Xe = N({
873
+ name: "ProBadge",
874
+ render() {
875
+ return G(
876
+ "div",
877
+ {
878
+ class: "text-[10px] font-semibold text-white bg-primary-500 rounded leading-none px-1.5 py-1"
879
+ },
880
+ "Pro"
881
+ );
882
+ }
883
+ }), tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
884
+ __proto__: null,
885
+ CalloutLegacy: x,
886
+ IsPremium: F,
887
+ IsPremiumPreStep: Qe,
888
+ ProBadge: Xe
889
+ }, Symbol.toStringTag, { value: "Module" }));
890
+ export {
891
+ F as I,
892
+ Xe as _,
893
+ Qe as a,
894
+ tt as i,
895
+ S as u
896
+ };