@cling-se/widget 0.17.0 → 1.0.0-beta.2
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.
- package/dist/AddClientCallout-e8d19R3f.js +101 -0
- package/dist/AnswerModal-BGvB8IVV.js +3291 -0
- package/dist/AttachmentItem-CkHbAm4l.js +171 -0
- package/dist/BaseUpload-BiJBcWRu.js +2472 -0
- package/dist/BlockMedia-CW5wgipC.js +103 -0
- package/dist/CCallout-Cy2eeIYd.js +104 -0
- package/dist/{CCurrencyDropdown-C2rXt2cJ.js → CCurrencyDropdown-DE_3CTjm.js} +91 -53
- package/dist/CDropdownItem-Dmq5gYzA.js +751 -0
- package/dist/CFormField.vue_vue_type_script_setup_true_lang-D_U9coAY.js +292 -0
- package/dist/{CPhoneFormat-C8VPsiK6.js → CPhoneFormat-BS2nP9kc.js} +13 -21
- package/dist/CPhoneInput-Bf6329PO.js +207 -0
- package/dist/CPriceInput-d1yjuMQr.js +140 -0
- package/dist/CSelect-DgnT07Hk.js +98 -0
- package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-Ckl--dyv.js +51 -0
- package/dist/ClientAutocomplete-9JzGcO9O.js +532 -0
- package/dist/ClientModal-BzWQtWSZ.js +1181 -0
- package/dist/ColorPicker-BvoFN8nu.js +1408 -0
- package/dist/CompanyModal-Bp4V_az9.js +250 -0
- package/dist/ContentWrapper-CuH6xKmo.js +265 -0
- package/dist/CoverBlockSettings-BA5L0Zee.js +861 -0
- package/dist/DocAnswer-BcNA_KEg.js +33 -0
- package/dist/DocDetails-CStEwWnU.js +448 -0
- package/dist/DocForm-BOoILf5E.js +6748 -0
- package/dist/DocFormSend-CQIf-HJY.js +171 -0
- package/dist/DocLinks-BRX5QzNe.js +36 -0
- package/dist/DocModalBase-D72yWj-x.js +29 -0
- package/dist/DocPrint-BI1LXUPE.js +399 -0
- package/dist/DocReceipt-DaZ4V76p.js +341 -0
- package/dist/DocSendReminder-DKGZlo7s.js +181 -0
- package/dist/DocTextEditor-Dm-cTZpA.js +19413 -0
- package/dist/DocTimeline-DCwofzuk.js +537 -0
- package/dist/DocumentClient-vJdxCB53.js +90 -0
- package/dist/DocumentLayout-CKSi42ev.js +1368 -0
- package/dist/DocumentLogotype-DbQlvQ-y.js +162 -0
- package/dist/DocumentVoided-CRX2WxWO.js +33 -0
- package/dist/EmbedInput-B-oeC4Wy.js +157 -0
- package/dist/EmbedSettings-B9Yka2yB.js +103 -0
- package/dist/ErrorCallout-B_ygH33E.js +34 -0
- package/dist/FilePreviewModal-Bf3ELTow.js +202 -0
- package/dist/Flag-BwTgCNHO.js +41 -0
- package/dist/HeaderSettings-DvC7nlyY.js +720 -0
- package/dist/ImageSelectModal-D3sP3lhR.js +119 -0
- package/dist/ImageUploadWrapper-RWNa-yIq.js +1585 -0
- package/dist/Index-0_3ULrWX.js +126 -0
- package/dist/Index-4NPe0sfX.js +629 -0
- package/dist/Index-B1uA0FF6.js +4 -0
- package/dist/Index-BBkCYm2q.js +201 -0
- package/dist/{Index-LzN6dktq.js → Index-BBwvo7S9.js} +10 -18
- package/dist/Index-BEMlsYwJ.js +68 -0
- package/dist/Index-BRBhJ6kz.js +21 -0
- package/dist/{Index-BPUYpfLJ.js → Index-BTFmHjUt.js} +47 -60
- package/dist/Index-BcUNnxLC.js +1098 -0
- package/dist/Index-Bo6ExBUL.js +93 -0
- package/dist/Index-BvMPCgdH.js +102 -0
- package/dist/Index-Bx5TOI9k.js +74 -0
- package/dist/Index-C7GZS8EI.js +16 -0
- package/dist/Index-CNWhm07R.js +25 -0
- package/dist/{Index-BUK-1yVR.js → Index-CQpznMKV.js} +9 -17
- package/dist/Index-CRzsnIij.js +159 -0
- package/dist/Index-CeSG1C41.js +140 -0
- package/dist/Index-CjfjdZj5.js +52 -0
- package/dist/Index-CskKmZpd.js +363 -0
- package/dist/Index-D5qwbCo1.js +28 -0
- package/dist/Index-D8Ae1Txt.js +228 -0
- package/dist/Index-DE8aenDB.js +3452 -0
- package/dist/Index-DI5EB5Rt.js +39 -0
- package/dist/Index-DaV57YPP.js +163 -0
- package/dist/Index-DbwkmoyM.js +38 -0
- package/dist/Index-Df9skok6.js +70 -0
- package/dist/{Index-BHJGfHm9.js → Index-DfLLA0ij.js} +313 -206
- package/dist/Index-Dw1CO5F9.js +76 -0
- package/dist/Index-PZXyOoVb.js +87 -0
- package/dist/{Index-BioOegOO.js → Index-ZUnH-BHj.js} +10 -18
- package/dist/Index-cjKGSiDi.js +136 -0
- package/dist/Index-m-goRuKD.js +49 -0
- package/dist/Index-rGeWbLcB.js +47 -0
- package/dist/Index-vrljNp6G.js +28 -0
- package/dist/Index.vue_vue_type_script_lang-aeVuChGF.js +671 -0
- package/dist/InputToggleRow-v6qAWPg6.js +99 -0
- package/dist/ManualPopover-BONBJIUA.js +57 -0
- package/dist/MediaWrapper-CXb2UGd9.js +18 -0
- package/dist/{NotBindingText-CM3FN0A6.js → NotBindingText-BqESO13N.js} +13 -17
- package/dist/PackageGroup-AIysVmyh.js +1058 -0
- package/dist/PdfTerms-BlhHdTu3.js +34 -0
- package/dist/PdfViewer-DwZ1rwlN.js +392 -0
- package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-D6NNUTz0.js +17 -0
- package/dist/PriceHeader-C4XhnoA3.js +488 -0
- package/dist/SearchApi-B7lXgUY6.js +137 -0
- package/dist/SendForm-BcD0xSvB.js +7031 -0
- package/dist/Setup-C2qaYDei.js +47 -0
- package/dist/{SmartList-DhhjSWLO.js → SmartList-DqG7Q5t7.js} +16 -24
- package/dist/Sortable.vue_vue_type_script_setup_true_lang-CzMbr8AX.js +1303 -0
- package/dist/{TermsSettings-BEQwmkFH.js → TermsSettings-BOCONyM4.js} +169 -56
- package/dist/ThemeColorRow-sjGdMzGN.js +108 -0
- package/dist/ToggleBinding-7oq_oXPt.js +44 -0
- package/dist/UploadModal-C_X2NjVY.js +134 -0
- package/dist/VideoPlayerInput-BsUcmpl4.js +135 -0
- package/dist/VideoPlayerSettings-BXMmxaZQ.js +78 -0
- package/dist/VideoSelectModal-CW0OweCw.js +217 -0
- package/dist/{anime.es-BrPTThYb.js → anime.es-gdcpA-eY.js} +1 -2
- package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
- package/dist/{debounce-D0hKNU85.js → debounce-DNl99Gyo.js} +10 -10
- package/dist/dom-CkTGWrfu.js +69 -0
- package/dist/{focusDrawerMixin-C_aTLmK0.js → focusDrawerMixin-BwcErMDY.js} +1 -1
- package/dist/{formDrawerState-Da4mcbab.js → formDrawerState-DaurePnd.js} +2 -2
- package/dist/helpers-CPW--XIz.js +44 -0
- package/dist/index-BjiGCJPI.js +149 -0
- package/dist/index-CFNv6OvX.js +188 -0
- package/dist/index-Cx71On5Z.js +508 -0
- package/dist/index-DKMxIBz_.js +270 -0
- package/dist/index-DKf5SGLD.js +125 -0
- package/dist/index-E32WgUp9.js +3525 -0
- package/dist/index-kp-GC5I0.js +513 -0
- package/dist/index.es.js +2 -5
- package/dist/index.umd.js +285 -1485
- package/dist/{main-BgzLHIoo.js → main-Cb-nyil1.js} +41414 -42507
- package/dist/mapFormMixin-D3BihYWW.js +1544 -0
- package/dist/omit--YYr41Xp.js +31 -0
- package/dist/{publicSenderState-DB4BHByV.js → publicSenderState-CdRW_Wwp.js} +4 -4
- package/dist/splitpanes-D-ThFkeR.js +342 -0
- package/dist/style.css +1 -4
- package/dist/template-BvaNnq-g.js +1493 -0
- package/dist/{throttle-DT2UVOqm.js → throttle-D-bUGaVh.js} +2 -2
- package/dist/tippy.esm-BmKNqohP.js +1994 -0
- package/dist/useTermsModal-Dhf6_eYb.js +87 -0
- package/dist/{utils-nos8CB1L.js → utils-CBPcYdLv.js} +8 -11
- package/dist/validation-DOcUOoMe.js +40 -0
- package/package.json +18 -21
- package/dist/AddClientCallout-BJzBdba1.js +0 -48
- package/dist/AnswerModal-frHq1g4s.js +0 -3874
- package/dist/AttachmentItem-BaN0OrEV.js +0 -85
- package/dist/BaseDatePicker-B-AfdrSb.js +0 -3187
- package/dist/BaseUpload-CY3lTcte.js +0 -1977
- package/dist/BlockMedia-Bb5wQIDg.js +0 -76
- package/dist/CCallout-5quI6yyk.js +0 -58
- package/dist/CDropdownItem-CaoSQX6X.js +0 -640
- package/dist/CFormField-Dd2Y71JG.js +0 -240
- package/dist/CPhoneInput-BU1t6eo_.js +0 -138
- package/dist/CPriceInput-pv2aIVkH.js +0 -116
- package/dist/CSelect-CrM45B7V.js +0 -91
- package/dist/CSkeleton-BkvONMqL.js +0 -55
- package/dist/ClientAutocomplete-BRXIKQSk.js +0 -438
- package/dist/ClientModal-CvHAptV2.js +0 -666
- package/dist/ColorPicker-RgoXRrud.js +0 -2879
- package/dist/CompanyModal-OL4bD9Gk.js +0 -147
- package/dist/ContentWrapper-8HduCnR4.js +0 -190
- package/dist/CoverBlockSettings-DUv8AcdX.js +0 -659
- package/dist/DocAnswer-DiyFfpT2.js +0 -36
- package/dist/DocDetails-BxNRfBnK.js +0 -263
- package/dist/DocForm-MGp-o0pu.js +0 -5017
- package/dist/DocFormSend-q_QuVCqh.js +0 -146
- package/dist/DocLinks-DGDdp30U.js +0 -38
- package/dist/DocModalBase-qG4RqwBn.js +0 -28
- package/dist/DocPrint-Cln3kt0g.js +0 -240
- package/dist/DocReceipt-nbsJ-ukZ.js +0 -217
- package/dist/DocSendReminder-B3qdqduf.js +0 -140
- package/dist/DocTextEditor-CQDnjnRY.js +0 -17193
- package/dist/DocTimeline-CgKHoDcG.js +0 -485
- package/dist/DocumentClient-UZlnIlz5.js +0 -136
- package/dist/DocumentLayout-Dvr4zgyF.js +0 -4880
- package/dist/DocumentLogotype-mAVgMRHr.js +0 -92
- package/dist/DocumentVoided-BXYNrf_6.js +0 -25
- package/dist/EmbedInput-YRUrw3c6.js +0 -117
- package/dist/EmbedSettings-DvRreF7H.js +0 -74
- package/dist/ErrorCallout-DVknpLVY.js +0 -27
- package/dist/FilePreviewModal-DC56FaGy.js +0 -81
- package/dist/Flag-D5iZLESg.js +0 -46
- package/dist/HeaderSettings-DXZnZL7A.js +0 -440
- package/dist/ImageSelectModal-Bu4_xZga.js +0 -86
- package/dist/ImageUploadWrapper-CtZhkAm1.js +0 -1604
- package/dist/Index-B1dJO6Bk.js +0 -54
- package/dist/Index-B3pz1coY.js +0 -150
- package/dist/Index-BHgW8EHW.js +0 -2446
- package/dist/Index-BNucs2O-.js +0 -154
- package/dist/Index-BW-EtZ1z.js +0 -55
- package/dist/Index-BjKACpun.js +0 -66
- package/dist/Index-C94BL4uU.js +0 -294
- package/dist/Index-CB57haU8.js +0 -58
- package/dist/Index-CP17iXT6.js +0 -25
- package/dist/Index-CUSbvjoD.js +0 -62
- package/dist/Index-CVnD6jo5.js +0 -25
- package/dist/Index-Ci5zdPeT.js +0 -28
- package/dist/Index-CikqSMjb.js +0 -41
- package/dist/Index-CxO4tJ3U.js +0 -26
- package/dist/Index-D4J4BpHd.js +0 -230
- package/dist/Index-DAQQQlut.js +0 -754
- package/dist/Index-DNxSR72J.js +0 -73
- package/dist/Index-DPuKRwmu.js +0 -41
- package/dist/Index-DSy8QG8T.js +0 -32
- package/dist/Index-DX6_D-J-.js +0 -77
- package/dist/Index-Dk0KaIKg.js +0 -643
- package/dist/Index-Hkzoh9QR.js +0 -24
- package/dist/Index-KsHJxWAa.js +0 -94
- package/dist/Index-TtItTuv6.js +0 -33
- package/dist/Index-YAD39Qvg.js +0 -146
- package/dist/Index-eh909lAz.js +0 -107
- package/dist/Index-otowKI_C.js +0 -56
- package/dist/Index-t_oVV8Rc.js +0 -84
- package/dist/Index-vG96oEXZ.js +0 -144
- package/dist/InputToggleRow-CcqJDguN.js +0 -57
- package/dist/ManualPopover-BE2IN-XU.js +0 -60
- package/dist/MediaWrapper-lnGUFiyc.js +0 -23
- package/dist/PackageGroup-BsmxOMLW.js +0 -704
- package/dist/PdfTerms-BgYwZoAZ.js +0 -31
- package/dist/PdfViewer-C0lDpjte.js +0 -383
- package/dist/PlainHtml-5YwYVj1v.js +0 -27
- package/dist/PriceHeader-CxqhpGS-.js +0 -338
- package/dist/SearchApi-BndaIbri.js +0 -161
- package/dist/SendForm-D7U9fG-5.js +0 -1023
- package/dist/Setup-CmAK2_ZT.js +0 -50
- package/dist/ThemeColorRow-BlnhzebY.js +0 -69
- package/dist/ToggleBinding-t_58JFya.js +0 -42
- package/dist/UploadModal-T-WpYNsN.js +0 -95
- package/dist/VideoPlayerInput-DKHKjMgX.js +0 -97
- package/dist/VideoPlayerSettings-DDMlUvSt.js +0 -61
- package/dist/VideoSelectModal-B9bbP0dd.js +0 -104
- package/dist/answerDocumentMixin-DXI_E5Kx.js +0 -51
- package/dist/dom-CWsqMElk.js +0 -71
- package/dist/formValidationMixin-WZ2lGndu.js +0 -49
- package/dist/index-B2l57ilt.js +0 -102
- package/dist/index-COKDjmM2.js +0 -167
- package/dist/index-HtKGcIng.js +0 -2700
- package/dist/index-LQ7NztTt.js +0 -81
- package/dist/index-fx5gR8fM.js +0 -351
- package/dist/index-zXXJrTvv.js +0 -492
- package/dist/mapFormMixin-CQgSN7dv.js +0 -3028
- package/dist/omit-ScS7B6c5.js +0 -31
- package/dist/simplebar.min-B0cB_p8g.js +0 -71
- package/dist/splitpanes-BHUVsCZF.js +0 -382
- package/dist/tippy.esm-CR89mtdY.js +0 -1805
- package/dist/vuedraggable.umd-CkXXkt1b.js +0 -3161
- package/dist/vuex.esm-DKGl8mcw.js +0 -467
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { V as d } from "./PdfViewer-DwZ1rwlN.js";
|
|
2
|
+
import { h as _, i as t, aK as m, o as s, d as o, s as n, v as f, e as p, j as u, _ as v } from "./main-Cb-nyil1.js";
|
|
3
|
+
const h = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "root"
|
|
6
|
+
}, k = { class: "root-title page-break" }, x = ["innerHTML"], y = { key: 1 }, T = { key: 2 }, V = /* @__PURE__ */ _({
|
|
7
|
+
__name: "PdfTerms",
|
|
8
|
+
props: {
|
|
9
|
+
text: {},
|
|
10
|
+
file: {}
|
|
11
|
+
},
|
|
12
|
+
setup(c) {
|
|
13
|
+
const a = c, r = t(() => a.text), i = t(() => {
|
|
14
|
+
var e;
|
|
15
|
+
return (e = a.file) == null ? void 0 : e.url;
|
|
16
|
+
}), l = t(() => m.t("_common:terms.general"));
|
|
17
|
+
return (e, g) => r.value ? (s(), o("div", h, [
|
|
18
|
+
n("div", k, f(l.value), 1),
|
|
19
|
+
n("div", {
|
|
20
|
+
class: "term-text quill-format",
|
|
21
|
+
innerHTML: r.value
|
|
22
|
+
}, null, 8, x)
|
|
23
|
+
])) : e.file ? (s(), o("div", y, [
|
|
24
|
+
p(u(d), {
|
|
25
|
+
src: i.value,
|
|
26
|
+
"doc-file-path": "data.terms.file.url",
|
|
27
|
+
class: "pdf-container"
|
|
28
|
+
}, null, 8, ["src"])
|
|
29
|
+
])) : (s(), o("div", T));
|
|
30
|
+
}
|
|
31
|
+
}), b = /* @__PURE__ */ v(V, [["__scopeId", "data-v-1d0b6534"]]);
|
|
32
|
+
export {
|
|
33
|
+
b as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import { h as K, I as C, $ as H, K as T, a0 as J, M as W, o as p, d as v, S as X, f as F, s as d, n as z, e as b, w as I, _ as O, b as G, af as M, v as E, ao as V, aj as Y, bd as _, j, B as S, F as U, c as R, k as ee, P as $, aA as te, Z as ae, p as D, Q as A } from "./main-Cb-nyil1.js";
|
|
2
|
+
import { e as q } from "./dom-CkTGWrfu.js";
|
|
3
|
+
import { a as ne } from "./DocumentLayout-CKSi42ev.js";
|
|
4
|
+
import { w as oe } from "./CDropdownItem-Dmq5gYzA.js";
|
|
5
|
+
const se = /* @__PURE__ */ K({
|
|
6
|
+
__name: "PdfPage",
|
|
7
|
+
props: {
|
|
8
|
+
pdf: {},
|
|
9
|
+
page: { default: 1 },
|
|
10
|
+
scale: { default: "page-width" },
|
|
11
|
+
rotate: { default: 0 },
|
|
12
|
+
resize: { type: Boolean, default: !0 },
|
|
13
|
+
annotation: { type: Boolean, default: !0 },
|
|
14
|
+
text: { type: Boolean, default: !0 },
|
|
15
|
+
containerClass: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["pagerendered", "link-clicked", "update:scale", "error"],
|
|
18
|
+
setup(t, { emit: e }) {
|
|
19
|
+
let o, s, g, f, n;
|
|
20
|
+
const r = e, y = C(!0), w = H("container");
|
|
21
|
+
T(
|
|
22
|
+
() => t.scale,
|
|
23
|
+
(a) => P(a)
|
|
24
|
+
), T(
|
|
25
|
+
() => t.rotate,
|
|
26
|
+
(a) => {
|
|
27
|
+
n && (n.update({ scale: t.scale, rotation: a }), n.draw());
|
|
28
|
+
}
|
|
29
|
+
), J(() => {
|
|
30
|
+
o = window.pdfjsViewer.PDFFindController, s = window.pdfjsViewer.PDFLinkService, g = window.pdfjsViewer.PDFPageView, f = window.pdfjsViewer.EventBus, k();
|
|
31
|
+
}), W(() => {
|
|
32
|
+
n && (n.destroy(), n = null);
|
|
33
|
+
});
|
|
34
|
+
function k() {
|
|
35
|
+
var u;
|
|
36
|
+
const a = new f();
|
|
37
|
+
a.on("pagerendered", (c) => r("pagerendered", c));
|
|
38
|
+
const m = new s({
|
|
39
|
+
eventBus: a,
|
|
40
|
+
externalLinkTarget: 2
|
|
41
|
+
}), l = new o({
|
|
42
|
+
eventBus: a,
|
|
43
|
+
linkService: m
|
|
44
|
+
});
|
|
45
|
+
(u = t.pdf) == null || u.getPage(t.page).then((c) => {
|
|
46
|
+
n = new g({
|
|
47
|
+
container: w.value,
|
|
48
|
+
id: t.page,
|
|
49
|
+
scale: 1,
|
|
50
|
+
defaultViewport: c.getViewport({ scale: 1 }),
|
|
51
|
+
eventBus: a,
|
|
52
|
+
textLayerMode: t.text ? 1 : 0,
|
|
53
|
+
annotationMode: t.annotation ? 1 : 0
|
|
54
|
+
}), n.setPdfPage(c);
|
|
55
|
+
const i = {
|
|
56
|
+
scrollPageIntoView: (h) => r("link-clicked", h)
|
|
57
|
+
};
|
|
58
|
+
return m.setDocument(t.pdf), m.setViewer(i), l.setDocument(t.pdf), P(t.scale);
|
|
59
|
+
}).catch((c) => {
|
|
60
|
+
r("error", c), y.value = !1;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function x(a = -1, m = -1) {
|
|
64
|
+
return n.update({ scale: 1, rotation: t.rotate }), a === -1 && m === -1 && (a = w.value.offsetWidth), a / n.viewport.width;
|
|
65
|
+
}
|
|
66
|
+
function N() {
|
|
67
|
+
var l;
|
|
68
|
+
n.update({ scale: 1, rotation: t.rotate });
|
|
69
|
+
const a = w.value.offsetHeight, m = (l = w.value.parentElement) == null ? void 0 : l.parentElement;
|
|
70
|
+
return m ? m.offsetHeight / a : 1;
|
|
71
|
+
}
|
|
72
|
+
async function P(a) {
|
|
73
|
+
n && (a === "page-width" ? (a = x(), r("update:scale", a)) : a === "page-height" && (a = N(), r("update:scale", a)), n.update({ scale: a, rotation: t.rotate }), await n.draw(), y.value = !1);
|
|
74
|
+
}
|
|
75
|
+
function B() {
|
|
76
|
+
t.resize && P("page-width");
|
|
77
|
+
}
|
|
78
|
+
return (a, m) => (p(), v("div", null, [
|
|
79
|
+
y.value ? X(a.$slots, "loading", { key: 0 }) : F("", !0),
|
|
80
|
+
d("div", {
|
|
81
|
+
ref_key: "container",
|
|
82
|
+
ref: w,
|
|
83
|
+
class: z([a.containerClass, "pdfViewer tracking-normal"])
|
|
84
|
+
}, null, 2),
|
|
85
|
+
b(ne, { onResize: B }, {
|
|
86
|
+
default: I(() => m[0] || (m[0] = [
|
|
87
|
+
d("div", { class: "w-full" }, null, -1)
|
|
88
|
+
])),
|
|
89
|
+
_: 1
|
|
90
|
+
})
|
|
91
|
+
]));
|
|
92
|
+
}
|
|
93
|
+
}), re = {
|
|
94
|
+
name: "PDFToolbar",
|
|
95
|
+
emits: ["update:scale", "update:auto-zoom", "navigate-to-page", "download"],
|
|
96
|
+
mixins: [oe],
|
|
97
|
+
props: {
|
|
98
|
+
currentPage: {
|
|
99
|
+
type: Number,
|
|
100
|
+
default: 0
|
|
101
|
+
},
|
|
102
|
+
numPages: {
|
|
103
|
+
type: Number,
|
|
104
|
+
default: 0
|
|
105
|
+
},
|
|
106
|
+
scale: {
|
|
107
|
+
type: [Number, String],
|
|
108
|
+
default: "page-width"
|
|
109
|
+
},
|
|
110
|
+
autoZoom: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: !0
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
data() {
|
|
116
|
+
return {
|
|
117
|
+
compactExpand: !1
|
|
118
|
+
};
|
|
119
|
+
},
|
|
120
|
+
computed: {
|
|
121
|
+
formattedZoom() {
|
|
122
|
+
return this.autoZoom ? "Auto" : Number.parseInt(this.scale * 100) + "%";
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
methods: {
|
|
126
|
+
updateZoom(t) {
|
|
127
|
+
this.$emit("update:scale", t), this.$emit("update:auto-zoom", t === "page-width");
|
|
128
|
+
},
|
|
129
|
+
onManualZoom(t) {
|
|
130
|
+
var g;
|
|
131
|
+
let e = ((g = t == null ? void 0 : t.target) == null ? void 0 : g.value) || "";
|
|
132
|
+
if (e === "Auto") return;
|
|
133
|
+
e.endsWith("%") && (e = e.slice(0, -1));
|
|
134
|
+
const o = Number.parseFloat(e);
|
|
135
|
+
let s = 1;
|
|
136
|
+
Number.isNaN(o) || (s = o / 100, s < 0 && (s = 0), s > 5 && (s = 5)), this.updateZoom(s);
|
|
137
|
+
},
|
|
138
|
+
navigateToPage(t) {
|
|
139
|
+
var o, s;
|
|
140
|
+
let e = ((o = t == null ? void 0 : t.target) == null ? void 0 : o.value) || "";
|
|
141
|
+
e = Number.parseInt(e), Number.isNaN(e) && (e = this.currentPage), e < 1 && (e = 1), e > this.numPages && (e = this.numPages), e === this.currentPage && typeof ((s = t == null ? void 0 : t.target) == null ? void 0 : s.value) < "u" && (t.target.value = this.currentPage), this.$emit("navigate-to-page", e);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}, le = { class: "ease flex h-full items-center justify-center gap-1 overflow-hidden rounded-full border border-gray-100 bg-white px-1.5 text-gray-500 transition duration-500" }, ie = { class: "mr-2 inline-flex items-center gap-2" }, de = ["value"], ue = { class: "text-sm font-medium" }, ce = {
|
|
145
|
+
key: 0,
|
|
146
|
+
class: "button-transitions flex items-center"
|
|
147
|
+
}, fe = { class: "inline-flex items-center" }, ge = ["value"];
|
|
148
|
+
function me(t, e, o, s, g, f) {
|
|
149
|
+
const n = G("CIcon");
|
|
150
|
+
return p(), v("div", {
|
|
151
|
+
class: z(["pointer-events-none sticky top-0 z-10 flex h-10 w-full translate-y-4", { "translate-y-2": t.mq === "sm" }])
|
|
152
|
+
}, [
|
|
153
|
+
d("div", {
|
|
154
|
+
class: z(["pointer-events-auto mx-auto inline-flex items-center justify-center rounded-full bg-gray-300/50 shadow-xl backdrop-blur-md", { "ml-2": t.mq === "sm" }])
|
|
155
|
+
}, [
|
|
156
|
+
d("div", le, [
|
|
157
|
+
d("div", ie, [
|
|
158
|
+
d("input", {
|
|
159
|
+
class: "w-9 rounded-full border border-solid border-gray-200 bg-gray-100 text-center leading-loose text-gray-500",
|
|
160
|
+
type: "number",
|
|
161
|
+
value: o.currentPage,
|
|
162
|
+
onBlur: e[0] || (e[0] = (...r) => f.navigateToPage && f.navigateToPage(...r)),
|
|
163
|
+
onKeyup: e[1] || (e[1] = M((...r) => f.navigateToPage && f.navigateToPage(...r), ["enter"]))
|
|
164
|
+
}, null, 40, de),
|
|
165
|
+
d("div", ue, "/ " + E(o.numPages), 1)
|
|
166
|
+
]),
|
|
167
|
+
b(Y, { name: "slide-fade" }, {
|
|
168
|
+
default: I(() => [
|
|
169
|
+
t.mq !== "sm" || g.compactExpand ? (p(), v("div", ce, [
|
|
170
|
+
e[9] || (e[9] = d("div", { class: "h-8 w-px bg-gray-700/10" }, null, -1)),
|
|
171
|
+
d("div", fe, [
|
|
172
|
+
d("button", {
|
|
173
|
+
class: "h-10 w-10 rounded-full text-gray-400",
|
|
174
|
+
onClick: e[2] || (e[2] = V((r) => f.updateZoom(o.scale - (o.scale > 0.2 ? 0.1 : 0)), ["prevent"]))
|
|
175
|
+
}, [
|
|
176
|
+
b(n, {
|
|
177
|
+
type: "zoomOut",
|
|
178
|
+
size: "20"
|
|
179
|
+
})
|
|
180
|
+
]),
|
|
181
|
+
(p(), v("input", {
|
|
182
|
+
key: o.scale,
|
|
183
|
+
class: "w-12 rounded-md border border-solid border-gray-200 bg-gray-100 text-center leading-loose text-gray-500",
|
|
184
|
+
type: "text",
|
|
185
|
+
value: f.formattedZoom,
|
|
186
|
+
onBlur: e[3] || (e[3] = (...r) => f.onManualZoom && f.onManualZoom(...r)),
|
|
187
|
+
onKeyup: e[4] || (e[4] = M((...r) => f.onManualZoom && f.onManualZoom(...r), ["enter"]))
|
|
188
|
+
}, null, 40, ge)),
|
|
189
|
+
d("button", {
|
|
190
|
+
class: "h-10 w-10 rounded-full text-gray-400",
|
|
191
|
+
onClick: e[5] || (e[5] = V((r) => f.updateZoom(o.scale + (o.scale < 2 ? 0.1 : 0)), ["prevent"]))
|
|
192
|
+
}, [
|
|
193
|
+
b(n, {
|
|
194
|
+
type: "zoomIn",
|
|
195
|
+
size: "20"
|
|
196
|
+
})
|
|
197
|
+
])
|
|
198
|
+
]),
|
|
199
|
+
e[10] || (e[10] = d("div", { class: "h-8 w-px bg-gray-700/10" }, null, -1)),
|
|
200
|
+
d("button", {
|
|
201
|
+
class: "h-10 w-10 rounded-full text-gray-400",
|
|
202
|
+
onClick: e[6] || (e[6] = V((r) => f.updateZoom("page-width"), ["prevent"]))
|
|
203
|
+
}, [
|
|
204
|
+
b(n, {
|
|
205
|
+
type: "boxBox",
|
|
206
|
+
size: "20"
|
|
207
|
+
})
|
|
208
|
+
]),
|
|
209
|
+
e[11] || (e[11] = d("div", { class: "h-8 w-px bg-gray-700/10" }, null, -1)),
|
|
210
|
+
d("button", {
|
|
211
|
+
class: "h-10 w-10 rounded-full text-gray-400",
|
|
212
|
+
onClick: e[7] || (e[7] = V((r) => t.$emit("download"), ["prevent"]))
|
|
213
|
+
}, [
|
|
214
|
+
b(n, {
|
|
215
|
+
type: "download",
|
|
216
|
+
size: "20"
|
|
217
|
+
})
|
|
218
|
+
])
|
|
219
|
+
])) : F("", !0)
|
|
220
|
+
]),
|
|
221
|
+
_: 1
|
|
222
|
+
})
|
|
223
|
+
]),
|
|
224
|
+
t.mq === "sm" ? (p(), v("button", {
|
|
225
|
+
key: 0,
|
|
226
|
+
class: "h-10 w-10 rounded-full text-gray-400",
|
|
227
|
+
onClick: e[8] || (e[8] = V((r) => g.compactExpand = !g.compactExpand, ["prevent"]))
|
|
228
|
+
}, [
|
|
229
|
+
b(n, {
|
|
230
|
+
class: z([{ "rotate-180": g.compactExpand }, "duration-500"]),
|
|
231
|
+
type: "chevron-right",
|
|
232
|
+
size: "20"
|
|
233
|
+
}, null, 8, ["class"])
|
|
234
|
+
])) : F("", !0)
|
|
235
|
+
], 2)
|
|
236
|
+
], 2);
|
|
237
|
+
}
|
|
238
|
+
const pe = /* @__PURE__ */ O(re, [["render", me], ["__scopeId", "data-v-5b038ef5"]]);
|
|
239
|
+
function ve(t, e = {}) {
|
|
240
|
+
let o;
|
|
241
|
+
if (typeof t == "string")
|
|
242
|
+
o = {
|
|
243
|
+
url: t
|
|
244
|
+
};
|
|
245
|
+
else if (typeof t == "object" && t !== null) o = { ...t };
|
|
246
|
+
else throw new TypeError("invalid src type");
|
|
247
|
+
const s = window.pdfjsLib.getDocument(o);
|
|
248
|
+
return e && e.onPassword && (s.onPassword = e.onPassword), e && e.onProgress && (s.onProgress = e.onProgress), s;
|
|
249
|
+
}
|
|
250
|
+
const we = { key: 0 }, be = {
|
|
251
|
+
key: 0,
|
|
252
|
+
class: "mb-4 grid aspect-[210/297] w-full place-items-center border border-gray-100 bg-gray-50"
|
|
253
|
+
}, ye = { class: "mb-4 grid aspect-[210/297] place-items-center border border-gray-100 bg-gray-50" }, Z = "4.0.379", Pe = /* @__PURE__ */ K({
|
|
254
|
+
__name: "PdfViewer",
|
|
255
|
+
props: {
|
|
256
|
+
src: {},
|
|
257
|
+
toolbar: { type: Boolean, default: !0 },
|
|
258
|
+
docFilePath: {}
|
|
259
|
+
},
|
|
260
|
+
emits: ["numPages", "rendered"],
|
|
261
|
+
setup(t, { emit: e }) {
|
|
262
|
+
let o = !1, s = null;
|
|
263
|
+
const g = e, f = $("isPdf", !1), n = $("fallbackMode", !1), r = _(null), y = C(!1), w = H("pageComponents"), k = C("page-width"), x = C(!0), N = C(1), P = C(void 0);
|
|
264
|
+
T(
|
|
265
|
+
() => n,
|
|
266
|
+
(l) => {
|
|
267
|
+
l && (k.value = 0.9);
|
|
268
|
+
},
|
|
269
|
+
{ immediate: !0 }
|
|
270
|
+
), T(
|
|
271
|
+
() => t.src,
|
|
272
|
+
async (l) => {
|
|
273
|
+
o || (await q(
|
|
274
|
+
`${D.api.baseUrl}/js/pdfjs-dist@${Z}/build/pdf.min.mjs`
|
|
275
|
+
), await q(
|
|
276
|
+
`${D.api.baseUrl}/js/pdfjs-dist@${Z}/web/pdf_viewer.mjs`
|
|
277
|
+
), window.pdfjsLib.GlobalWorkerOptions.workerSrc = `${D.api.baseUrl}/js/pdfjs-dist@${Z}/build/pdf.worker.min.mjs`, o = !0), B(l);
|
|
278
|
+
},
|
|
279
|
+
{ immediate: !0 }
|
|
280
|
+
), W(() => {
|
|
281
|
+
s && (s.disconnect(), s = null);
|
|
282
|
+
});
|
|
283
|
+
const B = async (l) => {
|
|
284
|
+
if (!l) return;
|
|
285
|
+
y.value = !0;
|
|
286
|
+
const u = ve(l);
|
|
287
|
+
await A(), u.promise.then((c) => {
|
|
288
|
+
r.value = c, y.value = !1, P.value = c.numPages, g("numPages", c.numPages), g("rendered"), t.toolbar && (P.value ?? 0) > 1 && (s = new IntersectionObserver(
|
|
289
|
+
(i) => {
|
|
290
|
+
i.forEach((h) => {
|
|
291
|
+
var L;
|
|
292
|
+
if (h.isIntersecting) {
|
|
293
|
+
const Q = Number((L = h.target) == null ? void 0 : L.getAttribute("data-page"));
|
|
294
|
+
N.value = Q;
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
rootMargin: "0px",
|
|
300
|
+
threshold: 0.5
|
|
301
|
+
}
|
|
302
|
+
), A(() => {
|
|
303
|
+
var i;
|
|
304
|
+
(i = w.value) == null || i.forEach(
|
|
305
|
+
(h) => s.observe(h.$el)
|
|
306
|
+
);
|
|
307
|
+
}));
|
|
308
|
+
});
|
|
309
|
+
}, a = (l) => {
|
|
310
|
+
var u, c, i;
|
|
311
|
+
(i = (c = (u = w.value) == null ? void 0 : u[l - 1]) == null ? void 0 : c.$el) == null || i.scrollIntoView({
|
|
312
|
+
behavior: "instant",
|
|
313
|
+
block: "start"
|
|
314
|
+
});
|
|
315
|
+
}, m = async () => {
|
|
316
|
+
r.value && r.value.getData().then((l) => {
|
|
317
|
+
const u = new Blob([l], { type: "application/pdf" }), c = URL.createObjectURL(u), i = document.createElement("a");
|
|
318
|
+
i.href = c, i.setAttribute("download", "document.pdf"), i.click();
|
|
319
|
+
}).catch(() => te("Failed to download PDF"));
|
|
320
|
+
};
|
|
321
|
+
return (l, u) => {
|
|
322
|
+
const c = G("CIcon");
|
|
323
|
+
return p(), v("div", {
|
|
324
|
+
key: l.src,
|
|
325
|
+
style: { "--page-border": "0" }
|
|
326
|
+
}, [
|
|
327
|
+
j(f) && !j(n) ? (p(), v("pre", we, [
|
|
328
|
+
S(" ClingPDFReplaceStart:[" + E(l.docFilePath) + `]ClingPDFReplaceEnd
|
|
329
|
+
`, 1),
|
|
330
|
+
d("div", null, "This page should have been replaced with URL: " + E(l.src), 1),
|
|
331
|
+
u[3] || (u[3] = S(`
|
|
332
|
+
`))
|
|
333
|
+
])) : (p(), v(U, { key: 1 }, [
|
|
334
|
+
l.toolbar && !j(n) && !y.value ? (p(), R(pe, {
|
|
335
|
+
key: 0,
|
|
336
|
+
scale: k.value,
|
|
337
|
+
"onUpdate:scale": u[0] || (u[0] = (i) => k.value = i),
|
|
338
|
+
"auto-zoom": x.value,
|
|
339
|
+
"onUpdate:autoZoom": u[1] || (u[1] = (i) => x.value = i),
|
|
340
|
+
"current-page": N.value,
|
|
341
|
+
"num-pages": P.value,
|
|
342
|
+
onDownload: m,
|
|
343
|
+
onNavigateToPage: a
|
|
344
|
+
}, null, 8, ["scale", "auto-zoom", "current-page", "num-pages"])) : F("", !0),
|
|
345
|
+
d("div", {
|
|
346
|
+
class: z(["mx-auto", { "chapter-spacing-x max-w-full": x.value && !j(n) }])
|
|
347
|
+
}, [
|
|
348
|
+
y.value ? (p(), v("div", be, [
|
|
349
|
+
b(c, {
|
|
350
|
+
type: "loader",
|
|
351
|
+
size: "28",
|
|
352
|
+
class: "animate-spin text-gray-400"
|
|
353
|
+
})
|
|
354
|
+
])) : F("", !0),
|
|
355
|
+
d("div", {
|
|
356
|
+
class: z({ "overflow-x-auto": !x.value })
|
|
357
|
+
}, [
|
|
358
|
+
(p(!0), v(U, null, ee(P.value, (i) => (p(), R(se, ae({ ref_for: !0 }, l.$attrs, {
|
|
359
|
+
ref_for: !0,
|
|
360
|
+
ref_key: "pageComponents",
|
|
361
|
+
ref: w,
|
|
362
|
+
scale: k.value,
|
|
363
|
+
"onUpdate:scale": u[2] || (u[2] = (h) => k.value = h),
|
|
364
|
+
key: i,
|
|
365
|
+
pdf: r.value,
|
|
366
|
+
page: i,
|
|
367
|
+
"data-page": i,
|
|
368
|
+
resize: x.value,
|
|
369
|
+
"container-class": j(n) ? "" : "mb-4",
|
|
370
|
+
class: "page-shadow"
|
|
371
|
+
}), {
|
|
372
|
+
loading: I(() => [
|
|
373
|
+
d("div", ye, [
|
|
374
|
+
b(c, {
|
|
375
|
+
type: "loader",
|
|
376
|
+
size: "28",
|
|
377
|
+
class: "animate-spin text-gray-400"
|
|
378
|
+
})
|
|
379
|
+
])
|
|
380
|
+
]),
|
|
381
|
+
_: 2
|
|
382
|
+
}, 1040, ["scale", "pdf", "page", "data-page", "resize", "container-class"]))), 128))
|
|
383
|
+
], 2)
|
|
384
|
+
], 2)
|
|
385
|
+
], 64))
|
|
386
|
+
]);
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
}), ze = /* @__PURE__ */ O(Pe, [["__scopeId", "data-v-cd432605"]]);
|
|
390
|
+
export {
|
|
391
|
+
ze as V
|
|
392
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { h as n, o as t, d as o, S as s, s as a } from "./main-Cb-nyil1.js";
|
|
2
|
+
const r = { class: "quill-format" }, l = ["innerHTML"], d = /* @__PURE__ */ n({
|
|
3
|
+
__name: "PlainHtml",
|
|
4
|
+
props: {
|
|
5
|
+
content: { default: "" }
|
|
6
|
+
},
|
|
7
|
+
setup(c) {
|
|
8
|
+
return (e, i) => (t(), o("div", r, [
|
|
9
|
+
s(e.$slots, "default", {}, () => [
|
|
10
|
+
a("div", { innerHTML: e.content }, null, 8, l)
|
|
11
|
+
])
|
|
12
|
+
]));
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
d as _
|
|
17
|
+
};
|