@cling-se/widget 0.18.6 → 0.19.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.
- package/CHANGELOG.md +16 -0
- package/dist/{AddClientCallout-CJIbbPXX.js → AddClientCallout-CaWt51zO.js} +4 -4
- package/dist/{AnswerModal-Dsah2l8n.js → AnswerModal-BQBd6QIZ.js} +3 -3
- package/dist/{AttachmentItem-Dd0vLvFI.js → AttachmentItem-BXJFcU8A.js} +4 -4
- package/dist/{BaseUpload-Bf7jp8sG.js → BaseUpload-Bb-jV-rT.js} +2 -2
- package/dist/{BlockMedia-DqDpMzdj.js → BlockMedia-Cc9ISU5-.js} +1 -1
- package/dist/{CCallout-BwZufC-7.js → CCallout-C0b2yts0.js} +1 -1
- package/dist/{CCurrencyDropdown-B4Ol5XkR.js → CCurrencyDropdown-BPGGMxVr.js} +3 -3
- package/dist/{CDropdownItem-Buqn3VW4.js → CDropdownItem-o6c-dgpj.js} +2 -2
- package/dist/{CFormField.vue_vue_type_script_setup_true_lang-Ch2YPJKW.js → CFormField.vue_vue_type_script_setup_true_lang-CB6tqkzw.js} +2 -2
- package/dist/{CPhoneFormat-D2Brm5Mi.js → CPhoneFormat-CvbCwIMw.js} +1 -1
- package/dist/{CPhoneInput-ma3cMCED.js → CPhoneInput-DFtV1C3M.js} +5 -5
- package/dist/{CPriceInput-BEnCuCLN.js → CPriceInput-CKfeBaiK.js} +2 -2
- package/dist/{CSelect-Eu2elXSO.js → CSelect-CQDkIAl5.js} +1 -1
- package/dist/{CSkeleton.vue_vue_type_script_setup_true_lang-grj8FnIO.js → CSkeleton.vue_vue_type_script_setup_true_lang-C9ME19Sb.js} +1 -1
- package/dist/{ClientAutocomplete-0lPbDlAZ.js → ClientAutocomplete-DATda6K3.js} +3 -3
- package/dist/{ClientModal-B8NApHot.js → ClientModal-DBTTy-PH.js} +8 -8
- package/dist/{ColorPicker-BKkWDVhM.js → ColorPicker-gXtMcZi2.js} +21 -21
- package/dist/{CompanyModal-BFF-n5w-.js → CompanyModal-DbFFI500.js} +7 -7
- package/dist/{ContentWrapper-Dt0ohc1m.js → ContentWrapper-DS5U4FTA.js} +6 -6
- package/dist/{CoverBlockSettings-BBlq2KYj.js → CoverBlockSettings-Igi2iP9e.js} +7 -7
- package/dist/{DocAnswer-D-dkVYSD.js → DocAnswer-D9W7XicY.js} +2 -2
- package/dist/{DocDetails-CuleAt-f.js → DocDetails-Eryp52fW.js} +4 -4
- package/dist/{DocForm-BJADqa_h.js → DocForm-CrZ1qxFw.js} +24 -24
- package/dist/{DocFormSend-It4jSPdm.js → DocFormSend-BTOQOToy.js} +2 -2
- package/dist/{DocLinks-CIjumnE4.js → DocLinks-DDKUtGsN.js} +2 -2
- package/dist/{DocModalBase-BIYwoQPD.js → DocModalBase-DJy3jIlT.js} +1 -1
- package/dist/{DocPrint-UwHIV3IG.js → DocPrint-Cxvadru_.js} +1 -1
- package/dist/{DocReceipt-C_QbKw3S.js → DocReceipt-BV4EMjte.js} +2 -2
- package/dist/{DocSendReminder-DET7Dn8r.js → DocSendReminder-CFEkewUb.js} +1 -1
- package/dist/{DocTextEditor-muwF9_7z.js → DocTextEditor-CYr4xlJS.js} +8 -8
- package/dist/{DocTimeline-0iGAJEDA.js → DocTimeline-Bu-JPdSS.js} +2 -2
- package/dist/{DocumentClient-D51mgPbm.js → DocumentClient-Ds3Ml_jM.js} +5 -5
- package/dist/{DocumentLayout-flBcTHXJ.js → DocumentLayout-B3FIWECa.js} +5 -5
- package/dist/{DocumentLogotype-ntDXX9bH.js → DocumentLogotype-ClDF6PpH.js} +4 -4
- package/dist/{DocumentVoided-Cv0YLx5O.js → DocumentVoided-BodYCjvc.js} +1 -1
- package/dist/{EmbedInput-DJ51iIpM.js → EmbedInput-DFYsP_kX.js} +3 -3
- package/dist/{EmbedSettings-DCczOD7N.js → EmbedSettings-DFrOJUUM.js} +3 -3
- package/dist/{ErrorCallout-CZJkCj5a.js → ErrorCallout-BYJyJZPB.js} +1 -1
- package/dist/{FilePreviewModal-BN5h7XHD.js → FilePreviewModal-CfVl8zrl.js} +2 -2
- package/dist/{Flag-DlxsXMwC.js → Flag-_L6D9D8t.js} +1 -1
- package/dist/{HeaderSettings-V8L8pq3s.js → HeaderSettings-BqIpDlzO.js} +9 -9
- package/dist/{ImageSelectModal-B_At5Blf.js → ImageSelectModal-DeGGmSsp.js} +3 -3
- package/dist/{ImageUploadWrapper-CPcoC6Xv.js → ImageUploadWrapper-D43A38GY.js} +2 -2
- package/dist/{Index-B5WELDoL.js → Index-6kvN6O0X.js} +4 -4
- package/dist/{Index-nKYyzAS7.js → Index-BHXJSL5I.js} +5 -5
- package/dist/{Index-GwdDyBlq.js → Index-BKH6OOqV.js} +4 -4
- package/dist/{Index-C7izxgFE.js → Index-BVxSRyCp.js} +6 -6
- package/dist/{Index-DEp8plkq.js → Index-BZfs0bHx.js} +14 -14
- package/dist/{Index-BSSQyRXD.js → Index-B_jdIWnC.js} +2 -2
- package/dist/Index-Bic9bNJv.js +4 -0
- package/dist/{Index-B3hQu-MB.js → Index-Bw1i1g1S.js} +2 -2
- package/dist/{Index-C0soqvXM.js → Index-C3cc_va3.js} +3 -3
- package/dist/{Index-MW3QbpqZ.js → Index-C4pBUcxn.js} +3 -3
- package/dist/{Index-BZNXqhxJ.js → Index-CP4iNSxB.js} +1 -1
- package/dist/{Index-CJR7qUPV.js → Index-C_LZNeaA.js} +9 -9
- package/dist/{Index-hkNJWllG.js → Index-C_j9YUOs.js} +7 -7
- package/dist/{Index-DNJHQvms.js → Index-CqU46z6H.js} +3 -3
- package/dist/{Index-Dpj04cAp.js → Index-D0Tgw7QK.js} +4 -4
- package/dist/{Index-pn89iaVu.js → Index-D1gXhK4Y.js} +8 -8
- package/dist/{Index-C3PXSGdG.js → Index-D2lTDKW_.js} +5 -5
- package/dist/{Index-CZ30iZiZ.js → Index-D6Yn0Cu_.js} +6 -6
- package/dist/{Index-DB3tya56.js → Index-DR2qDGeB.js} +1 -1
- package/dist/{Index-BOZXYaNt.js → Index-DSqOwZzR.js} +2 -2
- package/dist/{Index-D6rhy6yS.js → Index-DU2EBh_R.js} +2 -2
- package/dist/{Index-e8oELFYI.js → Index-DUJmFGTB.js} +8 -8
- package/dist/{Index-Cvw5EbJX.js → Index-DV_83_bb.js} +4 -4
- package/dist/{Index-B6vaS4fL.js → Index-DfCPhiVV.js} +4 -4
- package/dist/{Index-DQEVeZd7.js → Index-Dn0jyFhI.js} +8 -8
- package/dist/{Index-ChLvU3OE.js → Index-DoOtbPjT.js} +4 -4
- package/dist/{Index-D9-G3NTf.js → Index-DxH1rquy.js} +2 -2
- package/dist/{Index-HvQkXiiw.js → Index-EHXyBP_e.js} +4 -4
- package/dist/{Index-BSAG98Ne.js → Index-KewPUVQ6.js} +10 -10
- package/dist/{Index-DQ6eUfEV.js → Index-TMf9WicK.js} +5 -5
- package/dist/{Index-Cg_VpB8L.js → Index-gPLtrin7.js} +3 -3
- package/dist/{Index-BbpMwKlp.js → Index-mDSRZY42.js} +1 -1
- package/dist/{Index-Co3nb8PE.js → Index-w2kd8r9Y.js} +5 -5
- package/dist/{Index-z0pdwYSV.js → Index-z3yzZv-i.js} +5 -5
- package/dist/{Index.vue_vue_type_script_lang-JD2uxCqe.js → Index.vue_vue_type_script_lang-CH5rNu03.js} +2 -2
- package/dist/{InputToggleRow-Bgxi9hRE.js → InputToggleRow-DwN1t9h4.js} +1 -1
- package/dist/{ManualPopover-CNc7Xf0a.js → ManualPopover-CrO-jZFs.js} +1 -1
- package/dist/{MediaWrapper-BsR49ED-.js → MediaWrapper-DoABUikB.js} +3 -3
- package/dist/{NotBindingText-D50r5Z16.js → NotBindingText-CPW9rmMl.js} +2 -2
- package/dist/{PackageGroup-B90RJNpM.js → PackageGroup-DZgmsPG4.js} +5 -5
- package/dist/{PdfTerms-C4uW3QGp.js → PdfTerms-BdN4BLcH.js} +2 -2
- package/dist/PdfViewer-qdiLNSxr.js +398 -0
- package/dist/{PlainHtml.vue_vue_type_script_setup_true_lang-CNNpaNda.js → PlainHtml.vue_vue_type_script_setup_true_lang-Bm9mNiTw.js} +1 -1
- package/dist/{PriceHeader-DXVL6CEe.js → PriceHeader-nXbXkEDB.js} +7 -7
- package/dist/{SearchApi-DOFVMugW.js → SearchApi-Cyf21-io.js} +1 -1
- package/dist/{SendForm-BZCT436m.js → SendForm-WhOIfnQq.js} +9 -9
- package/dist/{Setup-CTf6sYbr.js → Setup-Zh-pw3zk.js} +1 -1
- package/dist/{SmartList-DQJHcoW-.js → SmartList-CsIZQPe6.js} +1 -1
- package/dist/{Sortable.vue_vue_type_script_setup_true_lang-B2bcH9BB.js → Sortable.vue_vue_type_script_setup_true_lang-CQ9nu18E.js} +1 -1
- package/dist/{TermsSettings-Bf96J_ud.js → TermsSettings-DCQ6nYqB.js} +5 -5
- package/dist/{ThemeColorRow-wqOYGhP7.js → ThemeColorRow-DYeM_-xA.js} +3 -3
- package/dist/{ToggleBinding-fHMHQJja.js → ToggleBinding-S42D9hkL.js} +4 -4
- package/dist/{UploadModal-DxIvD5mF.js → UploadModal-DE6C8be_.js} +2 -2
- package/dist/{VideoPlayerInput-DuPBtJvi.js → VideoPlayerInput-BH5U2ft7.js} +4 -4
- package/dist/{VideoPlayerSettings-DjW2kOJc.js → VideoPlayerSettings-Xym5NHzP.js} +2 -2
- package/dist/{VideoSelectModal-CJw8oLNt.js → VideoSelectModal-By2rQYdb.js} +3 -3
- package/dist/{focusDrawerMixin-CG3EuvA2.js → focusDrawerMixin-BalX9dza.js} +1 -1
- package/dist/{formDrawerState-B76pwd4h.js → formDrawerState-BcJmyemI.js} +1 -1
- package/dist/{helpers-DpSe_-5T.js → helpers-Ci7EYaV9.js} +1 -1
- package/dist/{index-8oYlKwSd.js → index-BouprsIq.js} +1 -1
- package/dist/{index-DzfSpw-Y.js → index-CF7QyeK7.js} +8 -8
- package/dist/{index-ltB5OqTb.js → index-CyRUO7xZ.js} +3 -3
- package/dist/{index-DQyVFLFH.js → index-DTw-DAlY.js} +1 -1
- package/dist/{index-Byzd3xWD.js → index-Dno6g6o2.js} +1 -1
- package/dist/{index-CjIsse4G.js → index-MUAENfhP.js} +1 -1
- package/dist/{index-CC_Q6NfO.js → index-NhIjIlKd.js} +27 -27
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +143 -143
- package/dist/{main-C7xk4P1d.js → main-XTM-sCfv.js} +8542 -8496
- package/dist/{mapFormMixin-DazMQ8MY.js → mapFormMixin-XMfH1XA9.js} +2 -2
- package/dist/{omit-TIMFLjLI.js → omit-CnUFMbkj.js} +1 -1
- package/dist/{publicSenderState-BxAxJ1Vc.js → publicSenderState-H_hu4Q8E.js} +1 -1
- package/dist/{splitpanes-3UmGFIMb.js → splitpanes-CrfnrjHX.js} +1 -1
- package/dist/{template-BOpQ1YFZ.js → template-CIV0AO5i.js} +1 -1
- package/dist/{tippy.esm-BAk18_GP.js → tippy.esm-BZNQemQh.js} +5 -5
- package/dist/{useTermsModal-BLwyYlhs.js → useTermsModal-C5ONZ7Si.js} +4 -4
- package/dist/{utils-4Xh9wqB7.js → utils-BJFICb0T.js} +1 -1
- package/dist/{validation-ChEjL51g.js → validation-ClFSCXd8.js} +2 -2
- package/dist/widget.css +1 -1
- package/package.json +2 -2
- package/dist/Index-Bh5PBCWm.js +0 -4
- package/dist/PdfViewer-m7Vvy9vD.js +0 -392
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cling-se/widget",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.umd.js",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"rollup-plugin-visualizer": "^5.8.3",
|
|
47
47
|
"tailwindcss": "^3.2.1",
|
|
48
48
|
"terser": "^5.37.0",
|
|
49
|
-
"vite": "^6.0
|
|
49
|
+
"vite": "^6.2.0",
|
|
50
50
|
"vite-tsconfig-paths": "^4.3.2"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
package/dist/Index-Bh5PBCWm.js
DELETED
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
import { h as K, I as C, a0 as H, K as T, a1 as J, M as W, o as p, b as v, S as X, f as F, s as d, n as z, d as b, w as I, _ as O, e as G, ae as M, v as Z, an as V, ai as Y, bc as _, j, B as S, F as U, c as R, k as ee, P as $, az as te, $ as ae, p as D, Q as q } from "./main-C7xk4P1d.js";
|
|
2
|
-
import { e as A } from "./dom-DOcGU3-g.js";
|
|
3
|
-
import { a as ne } from "./DocumentLayout-flBcTHXJ.js";
|
|
4
|
-
import { w as oe } from "./CDropdownItem-Buqn3VW4.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, "/ " + Z(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" }, E = "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 A(
|
|
274
|
-
`${D.api.baseUrl}/js/pdfjs-dist@${E}/build/pdf.min.mjs`
|
|
275
|
-
), await A(
|
|
276
|
-
`${D.api.baseUrl}/js/pdfjs-dist@${E}/web/pdf_viewer.mjs`
|
|
277
|
-
), window.pdfjsLib.GlobalWorkerOptions.workerSrc = `${D.api.baseUrl}/js/pdfjs-dist@${E}/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 q(), 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
|
-
), q(() => {
|
|
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:[" + Z(l.docFilePath) + `]ClingPDFReplaceEnd
|
|
329
|
-
`, 1),
|
|
330
|
-
d("div", null, "This page should have been replaced with URL: " + Z(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
|
-
};
|