@cling-se/widget 0.17.3 → 0.18.1

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 (232) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/AddClientCallout-CCt78VvH.js +101 -0
  3. package/dist/AnswerModal-B4LwVv2N.js +3371 -0
  4. package/dist/AttachmentItem-DnvYffKP.js +171 -0
  5. package/dist/BaseUpload-DFoV0ZLe.js +6503 -0
  6. package/dist/BlockMedia-Amo_kdHo.js +103 -0
  7. package/dist/CCallout-Gd06ds6O.js +104 -0
  8. package/dist/{CCurrencyDropdown-CXXQu8th.js → CCurrencyDropdown-B4GNmOGA.js} +91 -53
  9. package/dist/CDropdownItem-BUNVCpSR.js +749 -0
  10. package/dist/CFormField.vue_vue_type_script_setup_true_lang-Bo2J0c4G.js +292 -0
  11. package/dist/{CPhoneFormat-BtBGl8b4.js → CPhoneFormat-DmN5r9Ci.js} +13 -21
  12. package/dist/CPhoneInput-B6iyhsOG.js +207 -0
  13. package/dist/CPriceInput-BLQaNu1d.js +142 -0
  14. package/dist/CSelect-BVO9iO9L.js +98 -0
  15. package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-C9loRtrk.js +51 -0
  16. package/dist/ClientAutocomplete-C__yUaxD.js +532 -0
  17. package/dist/ClientModal-B9cbuEiC.js +1188 -0
  18. package/dist/ColorPicker-G2kkxL7_.js +1408 -0
  19. package/dist/CompanyModal-por9AG4P.js +250 -0
  20. package/dist/ContentWrapper-CQtaGA2u.js +265 -0
  21. package/dist/CoverBlockSettings-BCBDouyl.js +861 -0
  22. package/dist/DocAnswer-BrKctwrY.js +33 -0
  23. package/dist/DocDetails-B_LWVHGt.js +452 -0
  24. package/dist/DocForm-D6T7NmfO.js +6772 -0
  25. package/dist/DocFormSend-COYPrhl7.js +171 -0
  26. package/dist/DocLinks-B0LjxXIk.js +36 -0
  27. package/dist/DocModalBase-DObZHuYr.js +29 -0
  28. package/dist/DocPrint-CkDq78fB.js +399 -0
  29. package/dist/DocReceipt-CYBPyePC.js +341 -0
  30. package/dist/DocSendReminder-Dau6s43e.js +181 -0
  31. package/dist/{DocTextEditor-yD9Dt_um.js → DocTextEditor-CVn6gE1i.js} +7907 -5579
  32. package/dist/DocTimeline-ChBDPOfd.js +537 -0
  33. package/dist/DocumentClient-MLXzzXLb.js +90 -0
  34. package/dist/DocumentLayout-BMHOt380.js +1434 -0
  35. package/dist/DocumentLogotype-Clj3fopX.js +162 -0
  36. package/dist/DocumentVoided-B5_MSBbC.js +33 -0
  37. package/dist/EmbedInput-CzkOa02p.js +156 -0
  38. package/dist/EmbedSettings-Cf_F3KrM.js +103 -0
  39. package/dist/ErrorCallout-CJn6NCse.js +34 -0
  40. package/dist/FilePreviewModal-Di1VnPNY.js +202 -0
  41. package/dist/Flag-C4_G5IY1.js +41 -0
  42. package/dist/HeaderSettings-DWN0TjVD.js +720 -0
  43. package/dist/ImageSelectModal-DmAJ9PrN.js +119 -0
  44. package/dist/ImageUploadWrapper-QLEhA_dI.js +1585 -0
  45. package/dist/Index-B06eCuBA.js +76 -0
  46. package/dist/Index-B8Zj0-MX.js +87 -0
  47. package/dist/{Index-C_aIQ908.js → Index-BBBXL4zh.js} +319 -214
  48. package/dist/Index-BCHLxp7B.js +21 -0
  49. package/dist/Index-BDAp1CwZ.js +363 -0
  50. package/dist/Index-BFbcjFo4.js +16 -0
  51. package/dist/{Index-CRiATiQn.js → Index-BODJXJNp.js} +10 -18
  52. package/dist/Index-BOx_9tTM.js +136 -0
  53. package/dist/Index-BgZNiD7A.js +47 -0
  54. package/dist/Index-Bt97lEsI.js +228 -0
  55. package/dist/Index-C9aBeBBk.js +70 -0
  56. package/dist/Index-CE3pWPzp.js +49 -0
  57. package/dist/Index-CMdPSsp4.js +38 -0
  58. package/dist/Index-CNhBDG2e.js +126 -0
  59. package/dist/Index-CdsOdgG2.js +28 -0
  60. package/dist/{Index-Ch9r5yhG.js → Index-CmxFh3dW.js} +9 -17
  61. package/dist/Index-CpxzwwQS.js +52 -0
  62. package/dist/Index-CxTwWRD9.js +93 -0
  63. package/dist/Index-D9WFWlE6.js +140 -0
  64. package/dist/Index-D9bulLeI.js +39 -0
  65. package/dist/{Index-RWMPRDAE.js → Index-DL_9LzoR.js} +10 -18
  66. package/dist/Index-DR-sGE3Y.js +25 -0
  67. package/dist/Index-DRoOW5Pn.js +163 -0
  68. package/dist/Index-DTn47-hP.js +74 -0
  69. package/dist/Index-DeGDlj0B.js +68 -0
  70. package/dist/Index-DhYYK4bK.js +28 -0
  71. package/dist/Index-Dssdb-0Z.js +629 -0
  72. package/dist/Index-OcBnU480.js +200 -0
  73. package/dist/Index-Qh_8JqAv.js +3477 -0
  74. package/dist/Index-W10PQb8i.js +102 -0
  75. package/dist/Index-lbWFEELM.js +4 -0
  76. package/dist/Index-qFAg7VVU.js +1098 -0
  77. package/dist/Index-rDndJKo1.js +160 -0
  78. package/dist/{Index-Dfq7egc1.js → Index-s-6Qh_NE.js} +47 -60
  79. package/dist/Index.vue_vue_type_script_lang-CriDqp1F.js +671 -0
  80. package/dist/InputToggleRow-DJarYsVL.js +99 -0
  81. package/dist/ManualPopover-BMrkEHtV.js +65 -0
  82. package/dist/MediaWrapper-BYdVpmov.js +18 -0
  83. package/dist/{NotBindingText-CC7TxUqg.js → NotBindingText-DGjJoN8-.js} +13 -17
  84. package/dist/PackageGroup-q7_oBOqw.js +1060 -0
  85. package/dist/PdfTerms-DBEClYQ5.js +34 -0
  86. package/dist/PdfViewer-C_y5sqXB.js +392 -0
  87. package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-D5ZLw34T.js +17 -0
  88. package/dist/PriceHeader-BSwv3mzc.js +488 -0
  89. package/dist/{SearchApi-G2Hvp0Dd.js → SearchApi-BM6TTqxW.js} +37 -49
  90. package/dist/SendForm-DfmBbhp9.js +6689 -0
  91. package/dist/Setup-BC1feKr_.js +47 -0
  92. package/dist/{SmartList-BynTuXtB.js → SmartList-B3pgsg4S.js} +16 -24
  93. package/dist/Sortable.vue_vue_type_script_setup_true_lang-YOP-Y07m.js +1349 -0
  94. package/dist/{TermsSettings-cA5YAO77.js → TermsSettings-DEkACrRU.js} +169 -56
  95. package/dist/ThemeColorRow-qG8Dkkyj.js +105 -0
  96. package/dist/ToggleBinding-Cdtl_-1s.js +44 -0
  97. package/dist/UploadModal-1OWPRxA5.js +134 -0
  98. package/dist/VideoPlayerInput-DgFNjiKK.js +134 -0
  99. package/dist/VideoPlayerSettings-CFuA-7RC.js +78 -0
  100. package/dist/VideoSelectModal-CSv67eA8.js +217 -0
  101. package/dist/{anime.es-BrPTThYb.js → anime.es-4wvNItHq.js} +205 -201
  102. package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
  103. package/dist/{dom-Ds4ypDrd.js → dom-CkTGWrfu.js} +3 -6
  104. package/dist/{focusDrawerMixin-CximZA1J.js → focusDrawerMixin-r-OZchfV.js} +1 -1
  105. package/dist/{formDrawerState-CkNGdxn5.js → formDrawerState-COVczNhJ.js} +2 -2
  106. package/dist/helpers-ChwW54Ex.js +46 -0
  107. package/dist/index-BMZle8Ew.js +513 -0
  108. package/dist/index-Bf-fiKJf.js +268 -0
  109. package/dist/index-Bg4JRi5S.js +125 -0
  110. package/dist/index-C7chK2UD.js +3525 -0
  111. package/dist/index-CR52qIBO.js +149 -0
  112. package/dist/index-D1x9O_nJ.js +188 -0
  113. package/dist/index-YFcPqc9m.js +508 -0
  114. package/dist/index.es.js +2 -5
  115. package/dist/index.umd.js +303 -1486
  116. package/dist/main-DI0diChK.js +57570 -0
  117. package/dist/mapFormMixin-Cgvwie9a.js +1528 -0
  118. package/dist/omit-DpjD7Dj9.js +56 -0
  119. package/dist/{publicSenderState-CGEm9EYe.js → publicSenderState-BcjNldje.js} +4 -4
  120. package/dist/splitpanes-BypKTSRL.js +342 -0
  121. package/dist/template-Dzexob5I.js +1572 -0
  122. package/dist/tippy.esm-0UMN6kWf.js +1994 -0
  123. package/dist/useTermsModal-DzH_PDFP.js +87 -0
  124. package/dist/{utils-Dr4AcaE9.js → utils--kBYCNZD.js} +8 -11
  125. package/dist/validation-B-omH73u.js +40 -0
  126. package/dist/widget.css +1 -0
  127. package/package.json +20 -25
  128. package/dist/AddClientCallout-Br6IhwGH.js +0 -48
  129. package/dist/AnswerModal-CsWltR6j.js +0 -3879
  130. package/dist/AttachmentItem-BG7FuSCD.js +0 -85
  131. package/dist/BaseDatePicker-PSNBtUIh.js +0 -3187
  132. package/dist/BaseUpload-BfEurAAV.js +0 -1977
  133. package/dist/BlockMedia-Bo3OfNSU.js +0 -76
  134. package/dist/CCallout-CAjM8-1X.js +0 -58
  135. package/dist/CDropdownItem-CN7gSfgY.js +0 -640
  136. package/dist/CFormField-Clvcf2Jh.js +0 -240
  137. package/dist/CPhoneInput-CEHXh5jM.js +0 -138
  138. package/dist/CPriceInput-D2c07SXp.js +0 -116
  139. package/dist/CSelect-Cz2IPzxS.js +0 -91
  140. package/dist/CSkeleton-AsnvnD-m.js +0 -55
  141. package/dist/ClientAutocomplete-CZ55-DKe.js +0 -438
  142. package/dist/ClientModal-CgUhWZ5L.js +0 -666
  143. package/dist/ColorPicker-IFGHqH-u.js +0 -2879
  144. package/dist/CompanyModal-TLSBFo3U.js +0 -147
  145. package/dist/ContentWrapper-HClxKPuT.js +0 -190
  146. package/dist/CoverBlockSettings-D99hAa6e.js +0 -659
  147. package/dist/DocAnswer-CTV_Bpt7.js +0 -36
  148. package/dist/DocDetails-CQe5htXj.js +0 -263
  149. package/dist/DocForm-6Efv5_oz.js +0 -5017
  150. package/dist/DocFormSend-DbXcklxU.js +0 -146
  151. package/dist/DocLinks-BO545zbL.js +0 -38
  152. package/dist/DocModalBase-DXHNJ-6i.js +0 -28
  153. package/dist/DocPrint-Bf2U4FQN.js +0 -240
  154. package/dist/DocReceipt-CWXvC7bY.js +0 -217
  155. package/dist/DocSendReminder-CRzBM2NJ.js +0 -140
  156. package/dist/DocTimeline-DGVOk8-2.js +0 -485
  157. package/dist/DocumentClient-Das9BaJ7.js +0 -136
  158. package/dist/DocumentLayout-4q8rmTVT.js +0 -4880
  159. package/dist/DocumentLogotype-DLncJJAB.js +0 -92
  160. package/dist/DocumentVoided-CcI9lX27.js +0 -25
  161. package/dist/EmbedInput-BPdy0lGS.js +0 -117
  162. package/dist/EmbedSettings-L2iwYLQK.js +0 -74
  163. package/dist/ErrorCallout-Ds_tBT02.js +0 -27
  164. package/dist/FilePreviewModal-hxUu330p.js +0 -81
  165. package/dist/Flag-1-HcT5Dz.js +0 -46
  166. package/dist/HeaderSettings-C27fMugK.js +0 -440
  167. package/dist/ImageSelectModal-BKDIyxF4.js +0 -86
  168. package/dist/ImageUploadWrapper-BiYzUQur.js +0 -1604
  169. package/dist/Index-5BOWxcPG.js +0 -26
  170. package/dist/Index-B1Odktov.js +0 -754
  171. package/dist/Index-B3d5BjEn.js +0 -25
  172. package/dist/Index-B3sSU_4X.js +0 -54
  173. package/dist/Index-B5Dqsh3K.js +0 -150
  174. package/dist/Index-B6aO1c_w.js +0 -62
  175. package/dist/Index-BGfICxJQ.js +0 -643
  176. package/dist/Index-BHopC0hv.js +0 -24
  177. package/dist/Index-BJXcSmp_.js +0 -55
  178. package/dist/Index-BQe6QjQZ.js +0 -25
  179. package/dist/Index-BmXx_x6t.js +0 -77
  180. package/dist/Index-C692qMTG.js +0 -294
  181. package/dist/Index-CEvbw-3i.js +0 -41
  182. package/dist/Index-CYSULnpn.js +0 -32
  183. package/dist/Index-CdtYzwAM.js +0 -107
  184. package/dist/Index-CetF2FW0.js +0 -230
  185. package/dist/Index-Cv6XLM20.js +0 -73
  186. package/dist/Index-Cwy8ff76.js +0 -154
  187. package/dist/Index-D34z4UEY.js +0 -84
  188. package/dist/Index-DNCei-lp.js +0 -56
  189. package/dist/Index-DUbxgIYB.js +0 -2445
  190. package/dist/Index-DVwn_LLf.js +0 -28
  191. package/dist/Index-Dla-mesV.js +0 -146
  192. package/dist/Index-KtUkOPI2.js +0 -58
  193. package/dist/Index-LjnOTVJk.js +0 -66
  194. package/dist/Index-ky1SRtfY.js +0 -94
  195. package/dist/Index-mceZW2NX.js +0 -41
  196. package/dist/Index-tD3hZjh8.js +0 -144
  197. package/dist/Index-vM5kDtC2.js +0 -33
  198. package/dist/InputToggleRow-BmDuSbE2.js +0 -57
  199. package/dist/ManualPopover-CQfjPvFe.js +0 -60
  200. package/dist/MediaWrapper-DDzcjR6V.js +0 -23
  201. package/dist/PackageGroup-mAGXfZDv.js +0 -704
  202. package/dist/PdfTerms-BH_Nwf2h.js +0 -31
  203. package/dist/PdfViewer-mBLxI8bA.js +0 -383
  204. package/dist/PlainHtml-B7gUNNZd.js +0 -27
  205. package/dist/PriceHeader-DClYMPcq.js +0 -338
  206. package/dist/SendForm-Cxv_m8Rq.js +0 -1023
  207. package/dist/Setup-B90VDZTG.js +0 -50
  208. package/dist/ThemeColorRow-D-Z7w4Wk.js +0 -69
  209. package/dist/ToggleBinding-DOeTcWzi.js +0 -42
  210. package/dist/UploadModal-DOPLVEpV.js +0 -95
  211. package/dist/VideoPlayerInput-1zG06elO.js +0 -97
  212. package/dist/VideoPlayerSettings-O-4rAYYh.js +0 -61
  213. package/dist/VideoSelectModal-DzqFrqCg.js +0 -104
  214. package/dist/answerDocumentMixin-HBiNWYCH.js +0 -51
  215. package/dist/debounce-Ch1d3526.js +0 -84
  216. package/dist/formValidationMixin-D_MzsHsR.js +0 -49
  217. package/dist/index-BNdbPq4J.js +0 -492
  218. package/dist/index-BXzugeJ6.js +0 -81
  219. package/dist/index-C5wcxrC6.js +0 -167
  220. package/dist/index-CgDOs7t4.js +0 -2700
  221. package/dist/index-Cj-_2coz.js +0 -351
  222. package/dist/index-DpqV5y0K.js +0 -102
  223. package/dist/main-BL_yzf2r.js +0 -57357
  224. package/dist/mapFormMixin-Cu_vkTP-.js +0 -3028
  225. package/dist/omit-Dfe_H1Ft.js +0 -31
  226. package/dist/simplebar.min-CRlLD1Oz.js +0 -71
  227. package/dist/splitpanes-BHUVsCZF.js +0 -382
  228. package/dist/style.css +0 -4
  229. package/dist/throttle-BX_w77tW.js +0 -18
  230. package/dist/tippy.esm-n4arfVzA.js +0 -1805
  231. package/dist/vuedraggable.umd-DW4PJoZ3.js +0 -3161
  232. package/dist/vuex.esm-DKGl8mcw.js +0 -467
@@ -0,0 +1,162 @@
1
+ import { a as C } from "./publicSenderState-BcjNldje.js";
2
+ import { C as v, a as k } from "./CDropdownItem-BUNVCpSR.js";
3
+ import { _ as b, z as L, m as D, a as I, g as P, e as d, o as s, c as g, w as a, d as i, an as V, b as m, s as y, l as B, B as p, v as r, F as S, f as h } from "./main-DI0diChK.js";
4
+ const U = {
5
+ name: "DocumentLogotype",
6
+ components: {
7
+ CDropdown: v,
8
+ CDropdownItem: k,
9
+ ImageUploadWrapper: L(
10
+ () => import("./ImageUploadWrapper-QLEhA_dI.js")
11
+ )
12
+ },
13
+ inject: {
14
+ viewSettings: {
15
+ default: () => ({
16
+ canEdit: !1,
17
+ isPublicForm: !1
18
+ })
19
+ }
20
+ },
21
+ props: {
22
+ modelValue: {
23
+ type: String,
24
+ default: null
25
+ },
26
+ companyLogotype: {
27
+ type: String,
28
+ default: null
29
+ },
30
+ showLogo: {
31
+ type: Boolean,
32
+ default: !0
33
+ },
34
+ hasHover: {
35
+ type: Boolean,
36
+ default: !1
37
+ }
38
+ },
39
+ emits: ["update:modelValue", "update:show-logo"],
40
+ computed: {
41
+ ...D({
42
+ isPosting: "companies/isPosting"
43
+ }),
44
+ logotype() {
45
+ return this.modelValue || this.companyLogotype || "";
46
+ }
47
+ },
48
+ methods: {
49
+ ...I({
50
+ updateCompany: P.DO_UPDATE_CURRENT_COMPANY
51
+ }),
52
+ initUpload() {
53
+ this.$refs.uploadWrapper && this.$refs.uploadWrapper.onClick();
54
+ },
55
+ async setLogotype({ response: o }) {
56
+ const { publicId: e, url: t } = o || {};
57
+ t && this.$emit("update:modelValue", t), !this.companyLogotype && e && await this.postLogo(e);
58
+ },
59
+ async postLogo(o) {
60
+ if (this.isPosting) return;
61
+ const e = { LogotypePublicId: o };
62
+ this.viewSettings.isPublicForm ? C({ company: e }) : await this.updateCompany({ body: e });
63
+ }
64
+ }
65
+ }, W = {
66
+ key: 0,
67
+ class: "logo",
68
+ style: { "min-height": "35px" }
69
+ }, E = ["src"], N = {
70
+ key: 1,
71
+ style: { display: "inline-block" }
72
+ }, z = ["src"];
73
+ function A(o, e, t, F, $, n) {
74
+ const f = d("CButton"), l = d("CDropdownItem"), _ = d("CDropdown"), w = d("ImageUploadWrapper");
75
+ return n.viewSettings.canEdit ? (s(), g(w, {
76
+ key: 0,
77
+ ref: "uploadWrapper",
78
+ "on-image-upload": n.setLogotype,
79
+ "upload-options": { maxWidth: 500, maxHeight: 300 },
80
+ style: { display: "inline-block", width: "fit-content", "will-change": "opacity", "z-index": "3" }
81
+ }, {
82
+ default: a(({ progress: c }) => [
83
+ i(_, {
84
+ position: "is-bottom-right",
85
+ onClick: e[2] || (e[2] = V(() => {
86
+ }, ["stop"]))
87
+ }, {
88
+ trigger: a(() => [
89
+ n.logotype && t.showLogo ? (s(), m("div", W, [
90
+ y("img", {
91
+ src: n.logotype,
92
+ alt: "",
93
+ width: "150",
94
+ class: "hover:outline-primary-500 hover:outline hover:outline-2"
95
+ }, null, 8, E)
96
+ ])) : (s(), g(f, {
97
+ key: 1,
98
+ style: B(
99
+ !t.hasHover && {
100
+ visibility: "hidden",
101
+ pointerEvents: "none"
102
+ }
103
+ ),
104
+ loading: !!c && c < 100 || o.isPosting,
105
+ type: "text",
106
+ size: "normal",
107
+ pattern: "secondary",
108
+ class: "button-logo"
109
+ }, {
110
+ default: a(() => [
111
+ p(r(o.$t("_common:logo").capitalize()), 1)
112
+ ]),
113
+ _: 2
114
+ }, 1032, ["style", "loading"]))
115
+ ]),
116
+ default: a(() => [
117
+ i(l, {
118
+ value: t.showLogo,
119
+ "close-on-click": !1,
120
+ toggle: "",
121
+ onInput: e[0] || (e[0] = (u) => o.$emit("update:show-logo", u))
122
+ }, {
123
+ default: a(() => [
124
+ p(r(o.$t("_common:show", { thing: o.$t("_common:logotype") })), 1)
125
+ ]),
126
+ _: 1
127
+ }, 8, ["value"]),
128
+ t.showLogo ? (s(), m(S, { key: 0 }, [
129
+ i(l, { separator: !0 }),
130
+ i(l, { onClick: n.initUpload }, {
131
+ default: a(() => [
132
+ p(r(o.$t("_common:change", { thing: o.$t("_common:logotype") })), 1)
133
+ ]),
134
+ _: 1
135
+ }, 8, ["onClick"]),
136
+ i(l, {
137
+ disabled: !t.modelValue,
138
+ onClick: e[1] || (e[1] = (u) => o.$emit("update:modelValue", ""))
139
+ }, {
140
+ default: a(() => [
141
+ p(r(o.$t("_common:reset")), 1)
142
+ ]),
143
+ _: 1
144
+ }, 8, ["disabled"])
145
+ ], 64)) : h("", !0)
146
+ ]),
147
+ _: 2
148
+ }, 1024)
149
+ ]),
150
+ _: 1
151
+ }, 8, ["on-image-upload"])) : t.showLogo ? (s(), m("div", N, [
152
+ y("img", {
153
+ src: n.logotype,
154
+ alt: "",
155
+ width: "150"
156
+ }, null, 8, z)
157
+ ])) : h("", !0);
158
+ }
159
+ const O = /* @__PURE__ */ b(U, [["render", A], ["__scopeId", "data-v-ea7f9453"]]);
160
+ export {
161
+ O as default
162
+ };
@@ -0,0 +1,33 @@
1
+ import { _ as s, o as c, b as d, s as t, d as i, v as o, e as a } from "./main-DI0diChK.js";
2
+ const r = {
3
+ name: "DocumentVoided",
4
+ props: {
5
+ document: {
6
+ type: Object,
7
+ required: !0
8
+ }
9
+ }
10
+ }, l = { class: "grid h-full place-items-center text-center" }, m = { class: "py-12" }, _ = ["textContent"], u = ["textContent"];
11
+ function p(x, f, e, C, h, v) {
12
+ const n = a("CIcon");
13
+ return c(), d("div", l, [
14
+ t("div", m, [
15
+ i(n, {
16
+ type: "info",
17
+ class: "text-primary-500 mb-2"
18
+ }),
19
+ t("div", {
20
+ class: "text-lg font-medium",
21
+ textContent: o(e.document.$t("documentVoided.title"))
22
+ }, null, 8, _),
23
+ t("div", {
24
+ class: "text-gray-700",
25
+ textContent: o(e.document.$t("documentVoided.description"))
26
+ }, null, 8, u)
27
+ ])
28
+ ]);
29
+ }
30
+ const V = /* @__PURE__ */ s(r, [["render", p]]);
31
+ export {
32
+ V as D
33
+ };
@@ -0,0 +1,156 @@
1
+ import { _ as p } from "./CFormField.vue_vue_type_script_setup_true_lang-Bo2J0c4G.js";
2
+ import { u as f } from "./index-BMZle8Ew.js";
3
+ import { a9 as h, _ as b, X as g, e as d, o as w, c as v, w as l, d as o, B as V, v as _, l as y } from "./main-DI0diChK.js";
4
+ const z = (e) => {
5
+ const a = new DOMParser().parseFromString(e, "text/html"), [i] = h(a, "body.children") || [];
6
+ return !i || i.tagName !== "IFRAME" ? {} : Array.from(i.attributes).reduce(
7
+ (s, { name: n, value: r }) => ({ ...s, [n]: r }),
8
+ {}
9
+ );
10
+ }, I = (e) => {
11
+ if (typeof e != "object" || !e) return "";
12
+ const t = document.createElement("iframe");
13
+ return Object.keys(e).forEach((a) => t.setAttribute(a, e[a])), t.hasAttribute("src") ? t.outerHTML : "";
14
+ }, F = (e) => /^(?:https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/gi.test(
15
+ e
16
+ ), x = {
17
+ name: "EmbedInput",
18
+ i18nOptions: {
19
+ namespaces: "embedInput",
20
+ messages: {
21
+ en: {
22
+ placeholder: "Paste embed link",
23
+ validations: {
24
+ embed: {
25
+ isValid: "No supported source found"
26
+ }
27
+ }
28
+ },
29
+ sv: {
30
+ placeholder: "Klista in inbäddningslänk",
31
+ validations: {
32
+ embed: {
33
+ isValid: "Ingen källa kunde hittas"
34
+ }
35
+ }
36
+ }
37
+ }
38
+ },
39
+ components: {
40
+ CField: p
41
+ },
42
+ props: {
43
+ modelValue: {
44
+ type: Object,
45
+ default: () => ({})
46
+ },
47
+ isDrawerMode: {
48
+ type: Boolean,
49
+ default: !1
50
+ }
51
+ },
52
+ emits: ["update:modelValue"],
53
+ setup() {
54
+ return {
55
+ v$: f()
56
+ };
57
+ },
58
+ data() {
59
+ return {
60
+ isLoading: !1,
61
+ embed: {},
62
+ // TODO: could remove the template string in the input and only parse/validate input strings
63
+ // TODO: would
64
+ iFrameTplString: "",
65
+ inputPlaceholder: '<iframe style="border: 1px solid rgba(0, 0, 0, 0.1)...'
66
+ };
67
+ },
68
+ validations() {
69
+ return {
70
+ embed: { isValid: (e) => e && F(e.src) }
71
+ };
72
+ },
73
+ computed: {
74
+ messages() {
75
+ return {
76
+ embed: { isValid: this.$t("validations.embed.isValid") }
77
+ };
78
+ }
79
+ },
80
+ watch: {
81
+ modelValue: {
82
+ immediate: !0,
83
+ handler(e) {
84
+ this.embed = Object.assign({}, e), this.iFrameTplString = I(this.embed);
85
+ }
86
+ }
87
+ },
88
+ methods: {
89
+ onInput: g(function(t) {
90
+ this.v$.$reset(), t && this.validateInput(t);
91
+ }, 500),
92
+ async validateInput(e) {
93
+ this.isLoading = !0, this.embed = await z(e), this.embed.src || (this.embed.src = e), this.v$.$invalid || this.$emit("update:modelValue", this.embed), this.isLoading = !1, this.v$.$touch();
94
+ },
95
+ focus() {
96
+ this.$refs.input && this.$refs.input.focus();
97
+ }
98
+ }
99
+ };
100
+ function A(e, t, a, i, s, n) {
101
+ const r = d("CInput"), m = d("CField"), c = d("CButton");
102
+ return w(), v(m, {
103
+ grouped: !a.isDrawerMode,
104
+ style: y(
105
+ a.isDrawerMode && {
106
+ display: "flex",
107
+ flexDirection: "column",
108
+ alignItems: "flex-start"
109
+ }
110
+ )
111
+ }, {
112
+ default: l(() => [
113
+ o(m, {
114
+ validator: i.v$.embed,
115
+ messages: n.messages.embed,
116
+ expanded: "",
117
+ style: { width: "100%" }
118
+ }, {
119
+ default: l(() => [
120
+ o(r, {
121
+ ref: "input",
122
+ modelValue: s.iFrameTplString,
123
+ "onUpdate:modelValue": [
124
+ t[0] || (t[0] = (u) => s.iFrameTplString = u),
125
+ n.onInput
126
+ ],
127
+ placeholder: s.inputPlaceholder,
128
+ size: a.isDrawerMode ? "small" : void 0,
129
+ loading: s.isLoading,
130
+ filled: a.isDrawerMode,
131
+ "auto-resize": !0,
132
+ type: "textarea",
133
+ expanded: ""
134
+ }, null, 8, ["modelValue", "placeholder", "size", "loading", "filled", "onUpdate:modelValue"])
135
+ ]),
136
+ _: 1
137
+ }, 8, ["validator", "messages"]),
138
+ o(c, {
139
+ disabled: s.isLoading,
140
+ size: a.isDrawerMode ? "small" : void 0,
141
+ type: "secondary",
142
+ onClick: t[1] || (t[1] = (u) => n.validateInput(s.iFrameTplString))
143
+ }, {
144
+ default: l(() => [
145
+ V(_(e.$t("_common:add")), 1)
146
+ ]),
147
+ _: 1
148
+ }, 8, ["disabled", "size"])
149
+ ]),
150
+ _: 1
151
+ }, 8, ["grouped", "style"]);
152
+ }
153
+ const S = /* @__PURE__ */ b(x, [["render", A]]);
154
+ export {
155
+ S as default
156
+ };
@@ -0,0 +1,103 @@
1
+ import { b as h } from "./CDropdownItem-BUNVCpSR.js";
2
+ import z from "./EmbedInput-CzkOa02p.js";
3
+ import { _ as g, e as d, o, b as i, s, v as n, d as r, F as _, k as f, n as b, f as y } from "./main-DI0diChK.js";
4
+ const C = {
5
+ i18nOptions: {
6
+ namespaces: "embedSettings",
7
+ messages: {
8
+ en: {
9
+ title: "Embed - iFrame",
10
+ subTitle: "Embed anything (PDFs, Google Docs, Calender Sheets...)",
11
+ responsiveSize: "Responsive size"
12
+ },
13
+ sv: {
14
+ title: "Bädda in - iFrame",
15
+ subTitle: "Bädda in vad som helst (PDF:er, Google Docs, Calender Sheets...)",
16
+ responsiveSize: "Responsiv storlek"
17
+ }
18
+ }
19
+ },
20
+ name: "EmbedSettings",
21
+ components: {
22
+ EmbedInput: z,
23
+ CSwitch: h
24
+ },
25
+ emits: ["input", "update:size"],
26
+ props: {
27
+ value: {
28
+ type: Object,
29
+ default: () => ({})
30
+ },
31
+ size: {
32
+ type: String,
33
+ default: "small"
34
+ }
35
+ },
36
+ computed: {
37
+ sizeOptions() {
38
+ return [
39
+ {
40
+ value: "small",
41
+ svg: '<g fill-rule="nonzero" fill="none"><path d="M0 0h99v65H0z"/><path d="M22 16h56a2 2 0 012 2v30a2 2 0 01-2 2H22a2 2 0 01-2-2V18a2 2 0 012-2zm0 40h56a2 2 0 012 2v7H20v-7a2 2 0 012-2zM20 0h60v7a2 2 0 01-2 2H22a2 2 0 01-2-2V0z" fill="currentColor"/></g>'
42
+ },
43
+ {
44
+ value: "medium",
45
+ svg: '<g fill-rule="nonzero" fill="none"><path d="M0 0h99v65H0z"/><path d="M11 14h76a2 2 0 012 2v33a2 2 0 01-2 2H11a2 2 0 01-2-2V16a2 2 0 012-2zm8-14h60v6a2 2 0 01-2 2H21a2 2 0 01-2-2V0zm2 58h56a2 2 0 012 2v5H19v-5a2 2 0 012-2z" fill="currentColor"/></g>'
46
+ },
47
+ {
48
+ value: "large",
49
+ svg: '<g fill-rule="nonzero" fill="none"><path d="M0 0h99v65H0z"/><path d="M8 7h84a2 2 0 012 2v42a2 2 0 01-2 2H8a2 2 0 01-2-2V9a2 2 0 012-2zm13 51h56a2 2 0 012 2v5H19v-5a2 2 0 012-2z" fill="currentColor"/></g>'
50
+ }
51
+ ];
52
+ }
53
+ }
54
+ }, H = { class: "d-root" }, S = { class: "d-option" }, M = { class: "d-option-title" }, V = {
55
+ class: "text-gray-600",
56
+ style: { "padding-bottom": "1em" }
57
+ }, k = { class: "d-option" }, w = { class: "d-option-title" }, E = { style: { flex: "1 1 auto" } }, B = {
58
+ key: 0,
59
+ style: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "padding-top": "5px" }
60
+ }, F = ["onClick"], $ = ["innerHTML"];
61
+ function D(e, a, l, T, x, m) {
62
+ const p = d("EmbedInput"), v = d("CSwitch");
63
+ return o(), i("div", H, [
64
+ s("div", S, [
65
+ s("div", M, n(e.$t("title").capitalize()), 1),
66
+ s("div", V, n(e.$t("subTitle")), 1),
67
+ r(p, {
68
+ "model-value": l.value,
69
+ "is-drawer-mode": !0,
70
+ "onUpdate:modelValue": a[0] || (a[0] = (t) => e.$emit("input", t))
71
+ }, null, 8, ["model-value"])
72
+ ]),
73
+ s("div", k, [
74
+ s("div", w, [
75
+ s("div", E, n(e.$t("responsiveSize")), 1),
76
+ r(v, {
77
+ "model-value": !!l.size,
78
+ size: "small",
79
+ type: "secondary",
80
+ style: { "margin-right": "0" },
81
+ "onUpdate:modelValue": a[1] || (a[1] = (t) => e.$emit("update:size", t ? "small" : null))
82
+ }, null, 8, ["model-value"])
83
+ ]),
84
+ l.size ? (o(), i("div", B, [
85
+ (o(!0), i(_, null, f(m.sizeOptions, ({ value: t, svg: u }, c) => (o(), i("div", {
86
+ key: c,
87
+ class: "size-option",
88
+ onClick: (I) => e.$emit("update:size", t)
89
+ }, [
90
+ (o(), i("svg", {
91
+ class: b([{ "is-active": l.size === t }, "size-option-image"]),
92
+ viewBox: "0 0 99 65",
93
+ innerHTML: u
94
+ }, null, 10, $))
95
+ ], 8, F))), 128))
96
+ ])) : y("", !0)
97
+ ])
98
+ ]);
99
+ }
100
+ const G = /* @__PURE__ */ g(C, [["render", D], ["__scopeId", "data-v-d6e52c44"]]);
101
+ export {
102
+ G as default
103
+ };
@@ -0,0 +1,34 @@
1
+ import { h as c, u as i, i as a, o as m, b as p, s as t, d, v as u, n as r, l as _, e as v, _ as y } from "./main-DI0diChK.js";
2
+ const g = /* @__PURE__ */ c({
3
+ __name: "ErrorCallout",
4
+ props: {
5
+ message: {},
6
+ size: { default: "normal" }
7
+ },
8
+ setup(C) {
9
+ const e = i(), o = a(() => e.style), l = a(() => e.class);
10
+ return (s, f) => {
11
+ const n = v("CIcon");
12
+ return m(), p("div", {
13
+ class: r([[l.value], "flex items-center"]),
14
+ style: _([{ "margin-top": "calc(1 * var(--rem))" }, [o.value]]),
15
+ "data-type": "error-callout"
16
+ }, [
17
+ t("div", {
18
+ class: r([[`is-${s.size}`], "error-wrapper bg-red-50 text-red-500"]),
19
+ style: { margin: "calc(1 * var(--rem)) 0" }
20
+ }, [
21
+ d(n, {
22
+ type: "alert",
23
+ size: "18",
24
+ style: { "margin-right": "0.5em", flex: "0 0 18px" }
25
+ }),
26
+ t("div", null, u(s.message), 1)
27
+ ], 2)
28
+ ], 6);
29
+ };
30
+ }
31
+ }), z = /* @__PURE__ */ y(g, [["__scopeId", "data-v-32b00685"]]);
32
+ export {
33
+ z as E
34
+ };
@@ -0,0 +1,202 @@
1
+ import { V as c } from "./PdfViewer-C_y5sqXB.js";
2
+ import { _ as f, ag as h, e as m, a2 as k, o, b as i, s as n, v as y, E as a, n as v, c as x, f as g, d as I, an as C } from "./main-DI0diChK.js";
3
+ const L = {
4
+ name: "FilesPreviewModal",
5
+ components: {
6
+ Spinner: h,
7
+ VuePdf: c
8
+ },
9
+ emits: ["close"],
10
+ props: {
11
+ index: {
12
+ type: Number,
13
+ default: 0
14
+ },
15
+ list: {
16
+ type: Array,
17
+ required: !0
18
+ }
19
+ },
20
+ data() {
21
+ return {
22
+ isLoading: !0,
23
+ currentIndex: this.index
24
+ };
25
+ },
26
+ computed: {
27
+ isPdf() {
28
+ return this.list[this.currentIndex].mime === "application/pdf";
29
+ }
30
+ },
31
+ mounted() {
32
+ window.addEventListener("keyup", this.handleKey, { capture: !0 }), this.toggleIsLoading();
33
+ },
34
+ beforeUnmount() {
35
+ window.removeEventListener("keyup", this.handleKey, { capture: !0 });
36
+ },
37
+ methods: {
38
+ onGo(t) {
39
+ const e = this.currentIndex + t;
40
+ this.list[e] && (this.currentIndex = e, this.toggleIsLoading());
41
+ },
42
+ toggleIsLoading() {
43
+ this.isLoading = !0, setTimeout(() => {
44
+ this.isLoading = !1;
45
+ }, 1e3);
46
+ },
47
+ handleKey(t) {
48
+ t.stopPropagation(), parseInt(t.keyCode, 10) === 37 && this.onGo(-1), parseInt(t.keyCode, 10) === 39 && this.onGo(1);
49
+ const e = t.key || t.keyCode;
50
+ (e === "Escape" || e === "Esc" || e === 27) && this.$emit("close");
51
+ }
52
+ }
53
+ }, b = {
54
+ class: "flex w-full flex-col",
55
+ style: { height: "100%" }
56
+ }, M = {
57
+ class: "image-modal-nav",
58
+ style: { "z-index": "2" }
59
+ }, B = {
60
+ class: "truncate-text",
61
+ style: { "align-items": "center", display: "flex" }
62
+ }, P = { class: "truncate-text" }, V = { style: { display: "flex" } }, E = ["href"], j = {
63
+ key: 1,
64
+ class: "pdf-root"
65
+ }, G = ["src"];
66
+ function N(t, e, r, S, s, u) {
67
+ const p = m("Spinner"), w = m("VuePdf"), l = k("tooltip");
68
+ return o(), i("div", b, [
69
+ e[11] || (e[11] = n("div", { class: "image-modal-overlay" }, null, -1)),
70
+ n("div", M, [
71
+ n("div", B, [
72
+ n("div", P, y(r.list[s.currentIndex].name), 1)
73
+ ]),
74
+ n("div", V, [
75
+ a((o(), i("div", {
76
+ class: v([{ disabled: !r.list[s.currentIndex - 1] }, "image-modal-nav-button"]),
77
+ onClick: e[0] || (e[0] = (d) => u.onGo(-1))
78
+ }, e[7] || (e[7] = [
79
+ n("svg", {
80
+ xmlns: "http://www.w3.org/2000/svg",
81
+ width: "22",
82
+ height: "22",
83
+ viewBox: "0 0 24 24",
84
+ fill: "none",
85
+ stroke: "currentColor",
86
+ "stroke-width": "2",
87
+ "stroke-linecap": "round",
88
+ "stroke-linejoin": "round"
89
+ }, [
90
+ n("path", { d: "M19 12H6M12 5l-7 7 7 7" })
91
+ ], -1)
92
+ ]), 2)), [
93
+ [l, t.$t("show", { thing: t.$t("previous") })]
94
+ ]),
95
+ a((o(), i("div", {
96
+ class: v([{ disabled: !r.list[s.currentIndex + 1] }, "image-modal-nav-button"]),
97
+ onClick: e[1] || (e[1] = (d) => u.onGo(1))
98
+ }, e[8] || (e[8] = [
99
+ n("svg", {
100
+ xmlns: "http://www.w3.org/2000/svg",
101
+ width: "22",
102
+ height: "22",
103
+ viewBox: "0 0 24 24",
104
+ fill: "none",
105
+ stroke: "currentColor",
106
+ "stroke-width": "2",
107
+ "stroke-linecap": "round",
108
+ "stroke-linejoin": "round"
109
+ }, [
110
+ n("path", { d: "M5 12h13M12 5l7 7-7 7" })
111
+ ], -1)
112
+ ]), 2)), [
113
+ [l, t.$t("show", { thing: t.$t("next") })]
114
+ ]),
115
+ a((o(), i("a", {
116
+ href: r.list[s.currentIndex].url,
117
+ target: "_blank",
118
+ download: "",
119
+ class: "image-modal-nav-button"
120
+ }, e[9] || (e[9] = [
121
+ n("svg", {
122
+ xmlns: "http://www.w3.org/2000/svg",
123
+ width: "22",
124
+ height: "22",
125
+ viewBox: "0 0 24 24",
126
+ fill: "none",
127
+ stroke: "currentColor",
128
+ "stroke-width": "2",
129
+ "stroke-linecap": "round",
130
+ "stroke-linejoin": "round"
131
+ }, [
132
+ n("path", { d: "M3 15v4c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2v-4M17 9l-5 5-5-5M12 12.8V2.5" })
133
+ ], -1)
134
+ ]), 8, E)), [
135
+ [l, t.$t("download")]
136
+ ]),
137
+ a((o(), i("div", {
138
+ class: "image-modal-nav-button",
139
+ onClick: e[2] || (e[2] = (d) => t.$emit("close"))
140
+ }, e[10] || (e[10] = [
141
+ n("svg", {
142
+ xmlns: "http://www.w3.org/2000/svg",
143
+ width: "22",
144
+ height: "22",
145
+ viewBox: "0 0 24 24",
146
+ fill: "none",
147
+ stroke: "currentColor",
148
+ "stroke-width": "2",
149
+ "stroke-linecap": "round",
150
+ "stroke-linejoin": "round"
151
+ }, [
152
+ n("line", {
153
+ x1: "18",
154
+ y1: "6",
155
+ x2: "6",
156
+ y2: "18"
157
+ }),
158
+ n("line", {
159
+ x1: "6",
160
+ y1: "6",
161
+ x2: "18",
162
+ y2: "18"
163
+ })
164
+ ], -1)
165
+ ]))), [
166
+ [l, t.$t("close")]
167
+ ])
168
+ ])
169
+ ]),
170
+ n("div", {
171
+ class: "content-container flex w-full items-center justify-center",
172
+ style: { position: "relative" },
173
+ onClick: e[6] || (e[6] = (d) => t.$emit("close"))
174
+ }, [
175
+ s.isLoading ? (o(), x(p, {
176
+ key: 0,
177
+ size: "50px",
178
+ style: { position: "absolute", left: "50%", top: "50%", transform: "translate(-50%, -50%)" }
179
+ })) : g("", !0),
180
+ u.isPdf ? (o(), i("div", j, [
181
+ I(w, {
182
+ src: r.list[s.currentIndex].url,
183
+ class: "pdf-page",
184
+ onRendered: e[3] || (e[3] = () => {
185
+ s.isLoading = !1;
186
+ }),
187
+ onClick: e[4] || (e[4] = C(() => {
188
+ }, ["stop"]))
189
+ }, null, 8, ["src"])
190
+ ])) : s.isLoading ? g("", !0) : (o(), i("img", {
191
+ key: 2,
192
+ src: r.list[s.currentIndex].url,
193
+ class: "modal-image",
194
+ onLoad: e[5] || (e[5] = (d) => s.isLoading = !1)
195
+ }, null, 40, G))
196
+ ])
197
+ ]);
198
+ }
199
+ const K = /* @__PURE__ */ f(L, [["render", N], ["__scopeId", "data-v-26a28b2d"]]);
200
+ export {
201
+ K as default
202
+ };