@cling-se/widget 1.0.0-beta.1 → 1.0.0-beta.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 (241) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.internal.md +82 -0
  3. package/README.md +14 -40
  4. package/README.public.md +14 -0
  5. package/dist/AddClientCallout-DRcy9Dqb.js +101 -0
  6. package/dist/AnswerModal-Dc3cgkap.js +3291 -0
  7. package/dist/AttachmentItem-Bef5zdHr.js +171 -0
  8. package/dist/BaseUpload--paElAyr.js +2472 -0
  9. package/dist/BlockMedia-DbVE3vsb.js +103 -0
  10. package/dist/CCallout-81NkOge7.js +104 -0
  11. package/dist/{CCurrencyDropdown-qH-3m2eP.js → CCurrencyDropdown-M3hi1VVi.js} +91 -49
  12. package/dist/CDropdownItem-DvaU14-V.js +749 -0
  13. package/dist/CFormField.vue_vue_type_script_setup_true_lang-B4s_Zfsp.js +292 -0
  14. package/dist/{CPhoneFormat-CfQayFxw.js → CPhoneFormat-BBQ_UIc_.js} +13 -21
  15. package/dist/CPhoneInput-Dw_LJDgc.js +207 -0
  16. package/dist/CPriceInput-BfWZZv0f.js +140 -0
  17. package/dist/CSelect-B1AAIFbK.js +98 -0
  18. package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-D56L_PYT.js +51 -0
  19. package/dist/ClientAutocomplete-D5veIKyZ.js +532 -0
  20. package/dist/ClientModal-D8_TPzkv.js +1181 -0
  21. package/dist/ColorPicker-C0OahiVg.js +1408 -0
  22. package/dist/CompanyModal-CjzwQU4B.js +250 -0
  23. package/dist/ContentWrapper-DrmiaFOz.js +265 -0
  24. package/dist/CoverBlockSettings-C9DWvA-C.js +861 -0
  25. package/dist/DocAnswer-BEsvAMEp.js +33 -0
  26. package/dist/DocDetails--LO0-S5d.js +448 -0
  27. package/dist/DocForm-D6_tGw06.js +6748 -0
  28. package/dist/DocFormSend-CdFL6rOD.js +171 -0
  29. package/dist/DocLinks-CIQFUh7c.js +36 -0
  30. package/dist/DocModalBase-DtPJK9sp.js +29 -0
  31. package/dist/DocPrint-qX88Ue2I.js +399 -0
  32. package/dist/DocReceipt-BbXoCmpz.js +341 -0
  33. package/dist/DocSendReminder-DZqOkd63.js +181 -0
  34. package/dist/DocTextEditor-Cw-Skmd4.js +19413 -0
  35. package/dist/DocTimeline-CdbSOVD1.js +537 -0
  36. package/dist/DocumentClient-DtTv7gkF.js +90 -0
  37. package/dist/DocumentLayout-BRfEjoYq.js +1368 -0
  38. package/dist/DocumentLogotype-CUNzyewq.js +162 -0
  39. package/dist/DocumentVoided-CgDt-JFI.js +33 -0
  40. package/dist/EmbedInput-rPvTnpXn.js +157 -0
  41. package/dist/EmbedSettings-BtmFxYGB.js +103 -0
  42. package/dist/ErrorCallout-B6YrdUsG.js +34 -0
  43. package/dist/FilePreviewModal-BfIqIIbb.js +202 -0
  44. package/dist/Flag-CE3K7-8a.js +41 -0
  45. package/dist/HeaderSettings-5QR7MmVf.js +720 -0
  46. package/dist/ImageSelectModal-E3hGi8ty.js +119 -0
  47. package/dist/ImageUploadWrapper-BaexFAAh.js +1585 -0
  48. package/dist/Index--gv5fH24.js +201 -0
  49. package/dist/{Index-D4XgxmbD.js → Index-B3ycPjAI.js} +10 -18
  50. package/dist/Index-B7ECpXAa.js +28 -0
  51. package/dist/Index-BIXfUsHH.js +52 -0
  52. package/dist/Index-BM658CCq.js +93 -0
  53. package/dist/{Index--qPMWUMT.js → Index-B_DCM_bL.js} +48 -61
  54. package/dist/Index-BcMATT2_.js +47 -0
  55. package/dist/Index-BpWFU3Td.js +68 -0
  56. package/dist/Index-BulSI5iO.js +38 -0
  57. package/dist/Index-CHInIRw5.js +228 -0
  58. package/dist/Index-COYqsxs9.js +25 -0
  59. package/dist/Index-CSGk060H.js +1098 -0
  60. package/dist/Index-CV2O2fWT.js +21 -0
  61. package/dist/{Index-Bu0MGrj6.js → Index-CXqdBSZ3.js} +313 -206
  62. package/dist/Index-CavttI66.js +126 -0
  63. package/dist/Index-CbZ65-O3.js +629 -0
  64. package/dist/Index-CqrTij2j.js +70 -0
  65. package/dist/Index-CrsGxDWC.js +16 -0
  66. package/dist/Index-CxY5Ii6K.js +49 -0
  67. package/dist/Index-D7Z2w9cd.js +163 -0
  68. package/dist/Index-D7ixmzBH.js +76 -0
  69. package/dist/Index-D7pzv-AR.js +74 -0
  70. package/dist/Index-D9keESQi.js +159 -0
  71. package/dist/Index-Dd6ueeUc.js +136 -0
  72. package/dist/{Index-DIOiMm9f.js → Index-DexIUz3R.js} +10 -18
  73. package/dist/Index-Dnmt6W0u.js +140 -0
  74. package/dist/Index-DtcV6rl1.js +4 -0
  75. package/dist/Index-DuDVafLn.js +3452 -0
  76. package/dist/Index-L913X8Ly.js +102 -0
  77. package/dist/Index-Mdn0niR_.js +28 -0
  78. package/dist/Index-_ellB2fs.js +363 -0
  79. package/dist/{Index-DcQbh-z2.js → Index-baSB5tPv.js} +9 -17
  80. package/dist/Index-bgKndj-l.js +39 -0
  81. package/dist/Index-lNYXAFUH.js +87 -0
  82. package/dist/Index.vue_vue_type_script_lang-DLogex2i.js +671 -0
  83. package/dist/InputToggleRow-BCvMVbW-.js +99 -0
  84. package/dist/ManualPopover-BzBvSl_x.js +57 -0
  85. package/dist/MediaWrapper-_LPau2Ks.js +18 -0
  86. package/dist/{NotBindingText-CNV2Wmdx.js → NotBindingText-DgcOjUmQ.js} +13 -17
  87. package/dist/PackageGroup-1X3jUipj.js +1058 -0
  88. package/dist/PdfTerms-Bf4TlzP5.js +34 -0
  89. package/dist/PdfViewer-BdhwFfc6.js +392 -0
  90. package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-BgsfquR_.js +17 -0
  91. package/dist/PriceHeader-DyC8xssf.js +488 -0
  92. package/dist/SearchApi-C__orGkO.js +137 -0
  93. package/dist/SendForm-Be8uiuaJ.js +7031 -0
  94. package/dist/Setup-DbXs2Zar.js +47 -0
  95. package/dist/{SmartList-Qgu0rMrI.js → SmartList-BmmtZoZ0.js} +16 -24
  96. package/dist/Sortable.vue_vue_type_script_setup_true_lang-D0mloJIN.js +1303 -0
  97. package/dist/{TermsSettings-CE3h_xkm.js → TermsSettings-DsN6v5yj.js} +169 -49
  98. package/dist/ThemeColorRow-BL6p09pN.js +108 -0
  99. package/dist/ToggleBinding-B-tVioQ9.js +44 -0
  100. package/dist/UploadModal-BnA1xLMy.js +134 -0
  101. package/dist/VideoPlayerInput-D38S1IDH.js +135 -0
  102. package/dist/VideoPlayerSettings-B5iXoj5E.js +78 -0
  103. package/dist/VideoSelectModal-BNCoMFKU.js +217 -0
  104. package/dist/{anime.es-BrPTThYb.js → anime.es-gdcpA-eY.js} +1 -2
  105. package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
  106. package/dist/{debounce-C1AuSpOZ.js → debounce-CBRJalZI.js} +7 -7
  107. package/dist/dom-CkTGWrfu.js +69 -0
  108. package/dist/{focusDrawerMixin-Be6BAK8-.js → focusDrawerMixin-T94b2Y6F.js} +1 -1
  109. package/dist/{formDrawerState-DRbg5rVI.js → formDrawerState-jssoGOce.js} +2 -2
  110. package/dist/helpers-Vo_6Zz3M.js +44 -0
  111. package/dist/index-8g2jwLJx.js +513 -0
  112. package/dist/index-B0udVHyo.js +125 -0
  113. package/dist/index-D63IJVsJ.js +3525 -0
  114. package/dist/index-DCYCN_FR.js +508 -0
  115. package/dist/index-FRHGChx1.js +149 -0
  116. package/dist/index-HXiq8Yxs.js +270 -0
  117. package/dist/index-jOufDnZ8.js +188 -0
  118. package/dist/index.es.js +2 -5
  119. package/dist/index.umd.js +306 -1505
  120. package/dist/{main-WKzC-Dnu.js → main-C4OdoeS2.js} +36750 -37369
  121. package/dist/mapFormMixin-v-nbaWcx.js +1544 -0
  122. package/dist/omit-GuxX6Zt-.js +31 -0
  123. package/dist/{publicSenderState-BujjYsZZ.js → publicSenderState-C-7OMKKW.js} +4 -4
  124. package/dist/regions-BdZt9Srn.js +1250 -0
  125. package/dist/splitpanes-DChJiJ8d.js +342 -0
  126. package/dist/style.css +1 -4
  127. package/dist/template-m1V22cUt.js +1493 -0
  128. package/dist/{throttle-CWPJmFid.js → throttle-WWMDZKby.js} +2 -2
  129. package/dist/tippy.esm-Dz-faEsS.js +1994 -0
  130. package/dist/useTermsModal-C_eLdGLi.js +87 -0
  131. package/dist/{utils-CA_Zy6u1.js → utils-vnvZGRwQ.js} +8 -11
  132. package/dist/validation-C-dQpENM.js +40 -0
  133. package/package.json +25 -31
  134. package/.eslintrc.cjs +0 -4
  135. package/dist/AddClientCallout-BWnvyBcK.js +0 -46
  136. package/dist/AnswerModal-CLGRdSnK.js +0 -3874
  137. package/dist/AttachmentItem-BPS0-wyc.js +0 -78
  138. package/dist/BaseDatePicker-BbmV_GdD.js +0 -3183
  139. package/dist/BaseUpload-9gPgI7r6.js +0 -1977
  140. package/dist/BlockMedia-DkPFWiYL.js +0 -76
  141. package/dist/CCallout-T26jwUby.js +0 -59
  142. package/dist/CDropdownItem-BE8BAMD1.js +0 -636
  143. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
  144. package/dist/CFormField-DECEfoVq.js +0 -241
  145. package/dist/CPriceInput-C4SOB-P5.js +0 -112
  146. package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
  147. package/dist/ClientAutocomplete-DSebA1Mx.js +0 -78
  148. package/dist/ClientModal-BXFYvYCF.js +0 -625
  149. package/dist/ColorPicker-CZ_bJabP.js +0 -2879
  150. package/dist/CompanyModal-CDr3t28n.js +0 -141
  151. package/dist/ContentWrapper-BwmMoe4W.js +0 -183
  152. package/dist/CoverBlockSettings-_F11-DGc.js +0 -275
  153. package/dist/DocAnswer-BR59xzkT.js +0 -36
  154. package/dist/DocDetails-D1qbCbps.js +0 -259
  155. package/dist/DocForm-DBc2a7z5.js +0 -7272
  156. package/dist/DocFormSend-Casix-yG.js +0 -144
  157. package/dist/DocLinks-DGTaewyX.js +0 -38
  158. package/dist/DocModalBase-BbS_qvSv.js +0 -28
  159. package/dist/DocPrint-0PqX3mbJ.js +0 -240
  160. package/dist/DocReceipt-CU3VD5pt.js +0 -210
  161. package/dist/DocSendReminder-CuycBspr.js +0 -137
  162. package/dist/DocTextEditor-CntS2Bd-.js +0 -17180
  163. package/dist/DocTimeline-DJuv3yBe.js +0 -481
  164. package/dist/DocumentClient-C25XXzz6.js +0 -136
  165. package/dist/DocumentLayout-B7afHRMr.js +0 -4909
  166. package/dist/DocumentLogotype-sqI51wvM.js +0 -87
  167. package/dist/DocumentVoided-TahdTSMn.js +0 -25
  168. package/dist/EmbedInput-BY-wHSfc.js +0 -113
  169. package/dist/EmbedSettings-8pfjk4NP.js +0 -72
  170. package/dist/ErrorCallout-Dsr8PNsU.js +0 -28
  171. package/dist/FilePreviewModal-CcEinEFg.js +0 -81
  172. package/dist/Flag-PJKrghi9.js +0 -114
  173. package/dist/HeaderSettings-BqczIOsG.js +0 -392
  174. package/dist/ImageSelectModal-Cd-HhKnH.js +0 -84
  175. package/dist/ImageUploadWrapper-Dv43rGdb.js +0 -1604
  176. package/dist/Index-6b5VBKE-.js +0 -107
  177. package/dist/Index-B4pRJnbw.js +0 -84
  178. package/dist/Index-B69f8qgZ.js +0 -62
  179. package/dist/Index-B79YN9RO.js +0 -25
  180. package/dist/Index-BBrlPoe8.js +0 -58
  181. package/dist/Index-BXfWJCuq.js +0 -52
  182. package/dist/Index-Bd76vb37.js +0 -55
  183. package/dist/Index-BmbtQO5F.js +0 -150
  184. package/dist/Index-ByV_kJaH.js +0 -77
  185. package/dist/Index-CDV5rhWS.js +0 -49
  186. package/dist/Index-CIx4OOK-.js +0 -144
  187. package/dist/Index-CL1OWLt6.js +0 -223
  188. package/dist/Index-Caow0eZu.js +0 -31
  189. package/dist/Index-Cd3-3PEK.js +0 -2402
  190. package/dist/Index-CdpZBEKU.js +0 -98
  191. package/dist/Index-CmU3Sys-.js +0 -754
  192. package/dist/Index-CtRtgnpm.js +0 -32
  193. package/dist/Index-Cukkr33D.js +0 -140
  194. package/dist/Index-Cuqw0ios.js +0 -57
  195. package/dist/Index-Czm_WdqC.js +0 -25
  196. package/dist/Index-DNdYXHgr.js +0 -33
  197. package/dist/Index-DcuBxutp.js +0 -642
  198. package/dist/Index-DpWNWiyY.js +0 -291
  199. package/dist/Index-DzS1rZdF.js +0 -24
  200. package/dist/Index-N6s5pZxv.js +0 -26
  201. package/dist/Index-g_DNu4mt.js +0 -69
  202. package/dist/Index-mJ8F41GY.js +0 -154
  203. package/dist/Index-q7W9KA8m.js +0 -21
  204. package/dist/Index-rtzblZp4.js +0 -70
  205. package/dist/InputToggleRow-CZjxsDOQ.js +0 -57
  206. package/dist/ManualPopover-CZrWiT-P.js +0 -58
  207. package/dist/MediaWrapper-D37qK4KR.js +0 -23
  208. package/dist/PackageGroup-Heo_s8ct.js +0 -699
  209. package/dist/PdfTerms-AB9tXAtU.js +0 -36
  210. package/dist/PdfViewer-CIVkvOBr.js +0 -373
  211. package/dist/PlainHtml-CPmIebjY.js +0 -20
  212. package/dist/PriceHeader-DhDAruwX.js +0 -339
  213. package/dist/SearchApi-BMgdaI4s.js +0 -161
  214. package/dist/Setup-VIaIV9uT.js +0 -50
  215. package/dist/ThemeColorRow-DYJNgk6S.js +0 -67
  216. package/dist/ToggleBinding-CuwCeYpO.js +0 -38
  217. package/dist/UploadModal-BITcxG-J.js +0 -95
  218. package/dist/VideoPlayerInput-8szEX_8L.js +0 -93
  219. package/dist/VideoPlayerSettings-BIPytm6w.js +0 -61
  220. package/dist/VideoSelectModal-B-Pe34nb.js +0 -100
  221. package/dist/answerDocumentMixin-W7vE1Gp4.js +0 -51
  222. package/dist/formComponentsInstall-Bm3VMOh6.js +0 -2507
  223. package/dist/formValidationMixin-COkY8COk.js +0 -49
  224. package/dist/index-BFvjENMH.js +0 -81
  225. package/dist/index-BV2nGWay.js +0 -492
  226. package/dist/index-BgJ05dYc.js +0 -165
  227. package/dist/index-CMPAXxzs.js +0 -347
  228. package/dist/index-DNDjI5uI.js +0 -3916
  229. package/dist/index-aoff9oUi.js +0 -102
  230. package/dist/mapFormMixin-QbevCwJK.js +0 -72
  231. package/dist/omit-CTp9CXoU.js +0 -31
  232. package/dist/splitpanes-BHUVsCZF.js +0 -382
  233. package/dist/tinycolor-kTl0yxzz.js +0 -633
  234. package/dist/tippy.esm-sS5koDSU.js +0 -1799
  235. package/dist/vuedraggable.umd-BA3ZDRAp.js +0 -3161
  236. package/dist/vuex.esm-DKGl8mcw.js +0 -467
  237. package/public/favicon.ico +0 -0
  238. package/tsconfig.json +0 -26
  239. package/tsconfig.node.json +0 -10
  240. package/tsconfig.paths.json +0 -17
  241. package/vite.config.ts +0 -60
@@ -0,0 +1,162 @@
1
+ import { a as C } from "./publicSenderState-C-7OMKKW.js";
2
+ import { C as v, a as k } from "./CDropdownItem-DvaU14-V.js";
3
+ import { _ as b, z as L, m as D, a as I, g as P, b as d, o as s, c as g, w as a, e as i, ao as V, d as m, s as y, l as B, B as p, v as r, F as S, f as h } from "./main-C4OdoeS2.js";
4
+ const U = {
5
+ name: "DocumentLogotype",
6
+ components: {
7
+ CDropdown: v,
8
+ CDropdownItem: k,
9
+ ImageUploadWrapper: L(
10
+ () => import("./ImageUploadWrapper-BaexFAAh.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, b as c, o as d, d as i, s as t, e as a, v as o } from "./main-C4OdoeS2.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 = c("CIcon");
13
+ return d(), i("div", l, [
14
+ t("div", m, [
15
+ a(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,157 @@
1
+ import { _ as p } from "./CFormField.vue_vue_type_script_setup_true_lang-B4s_Zfsp.js";
2
+ import { u as f } from "./index-8g2jwLJx.js";
3
+ import { d as h } from "./debounce-CBRJalZI.js";
4
+ import { aa as b, _ as g, b as d, o as w, c as v, w as l, e as o, B as V, v as _, l as y } from "./main-C4OdoeS2.js";
5
+ const z = (e) => {
6
+ const a = new DOMParser().parseFromString(e, "text/html"), [i] = b(a, "body.children") || [];
7
+ return !i || i.tagName !== "IFRAME" ? {} : Array.from(i.attributes).reduce(
8
+ (s, { name: r, value: n }) => ({ ...s, [r]: n }),
9
+ {}
10
+ );
11
+ }, I = (e) => {
12
+ if (typeof e != "object" || !e) return "";
13
+ const t = document.createElement("iframe");
14
+ return Object.keys(e).forEach((a) => t.setAttribute(a, e[a])), t.hasAttribute("src") ? t.outerHTML : "";
15
+ }, 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(
16
+ e
17
+ ), x = {
18
+ name: "EmbedInput",
19
+ i18nOptions: {
20
+ namespaces: "embedInput",
21
+ messages: {
22
+ en: {
23
+ placeholder: "Paste embed link",
24
+ validations: {
25
+ embed: {
26
+ isValid: "No supported source found"
27
+ }
28
+ }
29
+ },
30
+ sv: {
31
+ placeholder: "Klista in inbäddningslänk",
32
+ validations: {
33
+ embed: {
34
+ isValid: "Ingen källa kunde hittas"
35
+ }
36
+ }
37
+ }
38
+ }
39
+ },
40
+ components: {
41
+ CField: p
42
+ },
43
+ props: {
44
+ modelValue: {
45
+ type: Object,
46
+ default: () => ({})
47
+ },
48
+ isDrawerMode: {
49
+ type: Boolean,
50
+ default: !1
51
+ }
52
+ },
53
+ emits: ["update:modelValue"],
54
+ setup() {
55
+ return {
56
+ v$: f()
57
+ };
58
+ },
59
+ data() {
60
+ return {
61
+ isLoading: !1,
62
+ embed: {},
63
+ // TODO: could remove the template string in the input and only parse/validate input strings
64
+ // TODO: would
65
+ iFrameTplString: "",
66
+ inputPlaceholder: '<iframe style="border: 1px solid rgba(0, 0, 0, 0.1)...'
67
+ };
68
+ },
69
+ validations() {
70
+ return {
71
+ embed: { isValid: (e) => e && F(e.src) }
72
+ };
73
+ },
74
+ computed: {
75
+ messages() {
76
+ return {
77
+ embed: { isValid: this.$t("validations.embed.isValid") }
78
+ };
79
+ }
80
+ },
81
+ watch: {
82
+ modelValue: {
83
+ immediate: !0,
84
+ handler(e) {
85
+ this.embed = Object.assign({}, e), this.iFrameTplString = I(this.embed);
86
+ }
87
+ }
88
+ },
89
+ methods: {
90
+ onInput: h(function(t) {
91
+ this.v$.$reset(), t && this.validateInput(t);
92
+ }, 500),
93
+ async validateInput(e) {
94
+ 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();
95
+ },
96
+ focus() {
97
+ this.$refs.input && this.$refs.input.focus();
98
+ }
99
+ }
100
+ };
101
+ function A(e, t, a, i, s, r) {
102
+ const n = d("CInput"), m = d("CField"), c = d("CButton");
103
+ return w(), v(m, {
104
+ grouped: !a.isDrawerMode,
105
+ style: y(
106
+ a.isDrawerMode && {
107
+ display: "flex",
108
+ flexDirection: "column",
109
+ alignItems: "flex-start"
110
+ }
111
+ )
112
+ }, {
113
+ default: l(() => [
114
+ o(m, {
115
+ validator: i.v$.embed,
116
+ messages: r.messages.embed,
117
+ expanded: "",
118
+ style: { width: "100%" }
119
+ }, {
120
+ default: l(() => [
121
+ o(n, {
122
+ ref: "input",
123
+ modelValue: s.iFrameTplString,
124
+ "onUpdate:modelValue": [
125
+ t[0] || (t[0] = (u) => s.iFrameTplString = u),
126
+ r.onInput
127
+ ],
128
+ placeholder: s.inputPlaceholder,
129
+ size: a.isDrawerMode ? "small" : void 0,
130
+ loading: s.isLoading,
131
+ filled: a.isDrawerMode,
132
+ "auto-resize": !0,
133
+ type: "textarea",
134
+ expanded: ""
135
+ }, null, 8, ["modelValue", "placeholder", "size", "loading", "filled", "onUpdate:modelValue"])
136
+ ]),
137
+ _: 1
138
+ }, 8, ["validator", "messages"]),
139
+ o(c, {
140
+ disabled: s.isLoading,
141
+ size: a.isDrawerMode ? "small" : void 0,
142
+ type: "secondary",
143
+ onClick: t[1] || (t[1] = (u) => r.validateInput(s.iFrameTplString))
144
+ }, {
145
+ default: l(() => [
146
+ V(_(e.$t("_common:add")), 1)
147
+ ]),
148
+ _: 1
149
+ }, 8, ["disabled", "size"])
150
+ ]),
151
+ _: 1
152
+ }, 8, ["grouped", "style"]);
153
+ }
154
+ const T = /* @__PURE__ */ g(x, [["render", A]]);
155
+ export {
156
+ T as default
157
+ };
@@ -0,0 +1,103 @@
1
+ import { b as h } from "./CDropdownItem-DvaU14-V.js";
2
+ import z from "./EmbedInput-rPvTnpXn.js";
3
+ import { _ as g, b as d, o, d as i, s, v as n, e as r, F as _, k as f, n as b, f as y } from "./main-C4OdoeS2.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, b as m, o as p, d, s as t, e as u, v as _, n as r, l as v, _ as y } from "./main-C4OdoeS2.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 = m("CIcon");
12
+ return p(), d("div", {
13
+ class: r([[l.value], "flex items-center"]),
14
+ style: v([{ "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
+ u(n, {
22
+ type: "alert",
23
+ size: "18",
24
+ style: { "margin-right": "0.5em", flex: "0 0 18px" }
25
+ }),
26
+ t("div", null, _(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-BdhwFfc6.js";
2
+ import { _ as f, ah as h, b as m, a3 as k, o as n, d as i, s as o, v as y, E as a, n as v, c as x, f as g, e as I, ao as C } from "./main-C4OdoeS2.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 n(), i("div", b, [
69
+ e[11] || (e[11] = o("div", { class: "image-modal-overlay" }, null, -1)),
70
+ o("div", M, [
71
+ o("div", B, [
72
+ o("div", P, y(r.list[s.currentIndex].name), 1)
73
+ ]),
74
+ o("div", V, [
75
+ a((n(), 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
+ o("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
+ o("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((n(), 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
+ o("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
+ o("path", { d: "M5 12h13M12 5l7 7-7 7" })
111
+ ], -1)
112
+ ]), 2)), [
113
+ [l, t.$t("show", { thing: t.$t("next") })]
114
+ ]),
115
+ a((n(), 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
+ o("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
+ o("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((n(), i("div", {
138
+ class: "image-modal-nav-button",
139
+ onClick: e[2] || (e[2] = (d) => t.$emit("close"))
140
+ }, e[10] || (e[10] = [
141
+ o("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
+ o("line", {
153
+ x1: "18",
154
+ y1: "6",
155
+ x2: "6",
156
+ y2: "18"
157
+ }),
158
+ o("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
+ o("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 ? (n(), 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 ? (n(), 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) : (n(), 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
+ };