@cling-se/widget 0.13.5 → 0.14.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-P8T0R-6B.js → AddClientCallout-BP2ip0A4.js} +3 -3
- package/dist/{AnswerModal-BF-ZUpQ9.js → AnswerModal-C8i3ldB_.js} +4 -4
- package/dist/{AttachmentItem-DEC6rjGE.js → AttachmentItem-BrvrAMae.js} +2 -2
- package/dist/{BaseDatePicker-2uhuySby.js → BaseDatePicker-BSkAllLg.js} +556 -556
- package/dist/{BaseUpload-D1OS-EZ-.js → BaseUpload-J2v3G0-q.js} +14 -14
- package/dist/{BlockMedia-BFBeRtJx.js → BlockMedia-CAgKbN_k.js} +21 -17
- package/dist/{CCallout-CsQMsFZO.js → CCallout-D5Nk5DgN.js} +2 -2
- package/dist/CCurrencyDropdown-CGYQfYSD.js +246 -0
- package/dist/{CDropdownItem-BeK9wNHJ.js → CDropdownItem-DGES8E6l.js} +7 -5
- package/dist/{CField-TsZhnNrK.js → CFormField-CE4rV3cr.js} +66 -39
- package/dist/{CPhoneFormat-DPYhElZw.js → CPhoneFormat-DXPrTit9.js} +1 -1
- package/dist/CPriceInput-CYsf1n6T.js +112 -0
- package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +1 -0
- package/dist/{ClientAutocomplete-Ch2Z-VNr.js → ClientAutocomplete-DPgOfPg1.js} +2 -2
- package/dist/{ClientModal-rdb9TsyH.js → ClientModal-Dznh8Vvn.js} +44 -36
- package/dist/{ColorPicker-2gfbU60o.js → ColorPicker-CWQEE8VR.js} +1 -1
- package/dist/{CompanyModal-CNeySxNi.js → CompanyModal-CeZ3GgLu.js} +4 -4
- package/dist/{ContentWrapper-D27J_sCS.js → ContentWrapper-DW7VHTdA.js} +8 -8
- package/dist/{CoverBlockSettings-BfdJKrsq.js → CoverBlockSettings-DNSdXFgF.js} +5 -5
- package/dist/{DocAnswer-CyHASkhm.js → DocAnswer-CPttkKAJ.js} +2 -2
- package/dist/{DocDetails-8bM9dBxm.js → DocDetails-BCwWW_kM.js} +7 -7
- package/dist/{DocForm-CumvOHwl.js → DocForm-BPjC08Ic.js} +41 -39
- package/dist/{DocFormSend-CdoZy_Q2.js → DocFormSend-BaC8IJCu.js} +2 -2
- package/dist/{DocLinks-BJPADuvd.js → DocLinks-DN-S8MY_.js} +2 -2
- package/dist/{DocModalBase-Cd3zXvH_.js → DocModalBase-bFJp0T2Y.js} +1 -1
- package/dist/{DocPrint-Be4l2pra.js → DocPrint-Ci7Jyh-C.js} +20 -19
- package/dist/{DocReceipt-DmFjo26V.js → DocReceipt-BYlXr6eS.js} +6 -6
- package/dist/{DocSendReminder-CVxh_c7u.js → DocSendReminder-DFx4934a.js} +1 -1
- package/dist/{DocTextEditor-2jhWmmN2.js → DocTextEditor-idQMnlIF.js} +1086 -1057
- package/dist/{DocTimeline-Dvn690cI.js → DocTimeline-ZmGSVRUB.js} +1 -1
- package/dist/{DocumentClient-D3ESmMk1.js → DocumentClient-DTRlyvLO.js} +5 -5
- package/dist/{DocumentLayout-0-y6ChW3.js → DocumentLayout-BJAyNjNa.js} +9 -5
- package/dist/{DocumentLogotype-CHWEVOFb.js → DocumentLogotype-pDJRc6Hj.js} +3 -3
- package/dist/{DocumentVoided-CoJ6YorU.js → DocumentVoided-DfKewfe4.js} +1 -1
- package/dist/{EmbedInput-CGQJdLBd.js → EmbedInput-7hLNsnEV.js} +2 -2
- package/dist/{EmbedSettings-DRfM7EkF.js → EmbedSettings-CpL24RhA.js} +2 -2
- package/dist/{ErrorCallout-pRwrsMwI.js → ErrorCallout-CdJCe67q.js} +1 -1
- package/dist/{FilePreviewModal-4hJnwqeM.js → FilePreviewModal-B7qT3I7F.js} +2 -2
- package/dist/{Flag-CH9jX9p6.js → Flag-DwW19zju.js} +1 -1
- package/dist/{HeaderSettings-DESkxus6.js → HeaderSettings-C8SuuAwv.js} +7 -7
- package/dist/{ImageSelectModal-BczBg7pO.js → ImageSelectModal-CAOh3YHc.js} +3 -3
- package/dist/{ImageUploadWrapper-B7F5UzSa.js → ImageUploadWrapper-21yldsj9.js} +2 -2
- package/dist/{Index-Dj7XQrCX.js → Index-B0BgYtWI.js} +5 -5
- package/dist/{Index-DLX_14JW.js → Index-BC1AhlQ9.js} +6 -6
- package/dist/{Index-B77mpvaJ.js → Index-BZi6r2UN.js} +8 -8
- package/dist/{Index-CPXWFvtI.js → Index-BsD09y_2.js} +6 -6
- package/dist/{Index-DpZ0FVkb.js → Index-Bu9SdKLP.js} +1 -1
- package/dist/{Index-DRdhlnQI.js → Index-BvsqZh2A.js} +4 -4
- package/dist/{Index-Cb7AYMdp.js → Index-Bz4qd9uO.js} +5 -5
- package/dist/{Index-BkDT09xK.js → Index-C--GiPc1.js} +5 -5
- package/dist/{Index-D_21EWlr.js → Index-CC7qF0br.js} +4 -4
- package/dist/{Index-CgugegyD.js → Index-CGxOvTF4.js} +590 -694
- package/dist/{Index-C8Eykyfr.js → Index-CI7_ktvb.js} +5 -5
- package/dist/{Index-D_XxQTHL.js → Index-COJZmxkX.js} +4 -4
- package/dist/{Index-BztAYqwZ.js → Index-CObEQ6G-.js} +3 -3
- package/dist/{Index-Lwrlj4Uo.js → Index-CP2bsXd-.js} +11 -13
- package/dist/{Index-DM8XS-Lc.js → Index-CSvZBLnp.js} +3 -3
- package/dist/{Index-xVss9bbv.js → Index-Ci-hGBbC.js} +4 -4
- package/dist/{Index-CUYcsakk.js → Index-Ckzq1cEJ.js} +22 -18
- package/dist/{Index-euXfMzGE.js → Index-CoIh5y2F.js} +4 -4
- package/dist/{Index-Cs1C7d8_.js → Index-Couda8BX.js} +2 -2
- package/dist/{Index-BSApSN3a.js → Index-CvXt3dm6.js} +24 -24
- package/dist/{Index-CwOwQrDd.js → Index-D95MNzAZ.js} +4 -4
- package/dist/{Index-CRjdza18.js → Index-DB5EG4EI.js} +32 -30
- package/dist/{Index-COFOq65C.js → Index-DDvRihXA.js} +3 -3
- package/dist/{Index-BOIBgNgp.js → Index-DIAntwBs.js} +2 -2
- package/dist/{Index-BCBBrdDY.js → Index-DUdJNcDT.js} +4 -4
- package/dist/{Index-DAuSARq4.js → Index-DfANvO5d.js} +5 -5
- package/dist/{Index-DLwJlsSV.js → Index-Ds1Jv5Mr.js} +6 -6
- package/dist/{Index-CBRWEkz3.js → Index-FIWsRGmh.js} +12 -7
- package/dist/{Index-DXovv3-e.js → Index-M3b7S4YX.js} +4 -4
- package/dist/{Index-McJQllNy.js → Index-NoN1_539.js} +7 -7
- package/dist/{Index-BBWCdaFx.js → Index-UGFm4yxI.js} +14 -32
- package/dist/{Index-Dk7qSZaZ.js → Index-aCBe0dXx.js} +2 -2
- package/dist/{Index-BSizncA1.js → Index-kJFtpJEP.js} +2 -2
- package/dist/{Index-DxT6UrU3.js → Index-rQKoLISX.js} +2 -2
- package/dist/{InputToggleRow-BjSD0lth.js → InputToggleRow-Ct8rvqAF.js} +1 -1
- package/dist/{ManualPopover-CIouE65j.js → ManualPopover-B0vp9ydC.js} +1 -1
- package/dist/{MediaWrapper-DK2fsQP7.js → MediaWrapper-hmofOPLv.js} +3 -3
- package/dist/{NotBindingText-D1IUYEiC.js → NotBindingText-COpJPwHe.js} +2 -2
- package/dist/{PackageGroup-BImsltc7.js → PackageGroup-BdtslJL-.js} +5 -5
- package/dist/{PdfTerms-BzBvvuT6.js → PdfTerms-EDStBDhn.js} +2 -2
- package/dist/PdfViewer-D1_Roqu2.js +374 -0
- package/dist/{PlainHtml-J_nR1ibV.js → PlainHtml-C3JPvt4o.js} +1 -1
- package/dist/{PriceHeader-BZeaKOTy.js → PriceHeader-BdfozyN8.js} +7 -7
- package/dist/{SearchApi-Du-Lqo7R.js → SearchApi-CQtYh98a.js} +2 -2
- package/dist/{Setup-CtSIo_xU.js → Setup-DHHMT6xu.js} +1 -1
- package/dist/{CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-B85IuuQS.js → SmartList-BXeRj5NC.js} +1 -1
- package/dist/{TermsSettings-DDHrUB_S.js → TermsSettings-D1tDAu-r.js} +3 -3
- package/dist/{ThemeColorRow-BiRPYyj_.js → ThemeColorRow-HUN-QPY_.js} +3 -3
- package/dist/{ToggleBinding-Cvd9I0Dw.js → ToggleBinding-CRoVM6Nw.js} +3 -3
- package/dist/{UploadModal-ByJeM98S.js → UploadModal-BD3pIiPT.js} +2 -2
- package/dist/{VideoPlayerInput-C1PiFaBo.js → VideoPlayerInput-QFJfPoCf.js} +3 -3
- package/dist/{VideoPlayerSettings-C9vt7Twd.js → VideoPlayerSettings-CGq--niu.js} +2 -2
- package/dist/{VideoSelectModal-cEDZv03c.js → VideoSelectModal-B61rBqdH.js} +3 -3
- package/dist/{answerDocumentMixin-QbMot2bf.js → answerDocumentMixin-DiONfM1s.js} +3 -3
- package/dist/{debounce-CaZBFRFZ.js → debounce-BIchuVwa.js} +11 -11
- package/dist/dom-CJxkno7i.js +91 -0
- package/dist/{focusDrawerMixin-D-mqPE02.js → focusDrawerMixin-CzvgKsOZ.js} +1 -1
- package/dist/{formComponentsInstall-BdhIOhq5.js → formComponentsInstall-EQLbqYqI.js} +201 -231
- package/dist/{formDrawerState-CcDRv2mi.js → formDrawerState-CiKGHdNH.js} +1 -1
- package/dist/{formValidationMixin-sp3Q6-ER.js → formValidationMixin-5BVcxu38.js} +2 -2
- package/dist/{index-CJTuXpCD.js → index-BYTRIZIz.js} +1 -1
- package/dist/{index-DEWMCZz4.js → index-Be__C37A.js} +1 -1
- package/dist/{index-DuCwf2mg.js → index-CUydiL8B.js} +16 -16
- package/dist/{index-BjZuADtN.js → index-DH6SCEKQ.js} +13 -13
- package/dist/{index-BWmMho6V.js → index-gtVGRKIX.js} +9 -9
- package/dist/{index-BABEaO8N.js → index-tNIrTnCx.js} +35 -35
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +134 -142
- package/dist/{main-DQ6SH_E_.js → main-Bp2qcma0.js} +4209 -4198
- package/dist/{mapFormMixin-2SoyKxW2.js → mapFormMixin-Ce3_WIKw.js} +1 -1
- package/dist/omit-21u5fFMx.js +31 -0
- package/dist/{publicSenderState-CKGe1ejF.js → publicSenderState-BcN9kJJr.js} +1 -1
- package/dist/style.css +2 -2
- package/dist/{throttle-BeZ_TpQb.js → throttle-CfPxqhW_.js} +2 -2
- package/dist/{tinycolor-C3JU9Hqu.js → tinycolor-DNK6zGoq.js} +1 -1
- package/dist/tippy.esm-B5TcTBWX.js +1799 -0
- package/dist/{utils-D2JfcR6v.js → utils-GzwJPAEe.js} +1 -1
- package/dist/{omit-BjdTqooP.js → vuedraggable.umd-2pmrPYml.js} +497 -525
- package/package.json +1 -1
- package/dist/BaseInput-BtgFVDxx.js +0 -364
- package/dist/PdfViewer-Dq0Mc-WC.js +0 -247
- package/dist/dom-CPYqHOIw.js +0 -69
- package/dist/tippy.esm-DowQrfWM.js +0 -2039
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { m as
|
|
2
|
-
import {
|
|
1
|
+
import { m as r } from "./mapFormMixin-Ce3_WIKw.js";
|
|
2
|
+
import { q as l, n as o } from "./main-Bp2qcma0.js";
|
|
3
3
|
const c = {
|
|
4
4
|
name: "DocChapter",
|
|
5
5
|
components: {
|
|
6
6
|
CInput: l
|
|
7
7
|
},
|
|
8
|
-
mixins: [
|
|
8
|
+
mixins: [r(["title"])],
|
|
9
9
|
props: {
|
|
10
10
|
enableSpacingX: {
|
|
11
11
|
type: Boolean,
|
|
@@ -14,6 +14,10 @@ const c = {
|
|
|
14
14
|
enableSpacingY: {
|
|
15
15
|
type: Boolean,
|
|
16
16
|
default: !0
|
|
17
|
+
},
|
|
18
|
+
pdfSpacingX: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
17
21
|
}
|
|
18
22
|
},
|
|
19
23
|
methods: {
|
|
@@ -29,10 +33,11 @@ var p = function() {
|
|
|
29
33
|
var t = this, n = t._self._c;
|
|
30
34
|
return n("div", { staticClass: "chapter" }, [n("div", { staticClass: "no-drag", class: {
|
|
31
35
|
"chapter-spacing-x": t.enableSpacingX,
|
|
32
|
-
"chapter-spacing-y": t.enableSpacingY
|
|
36
|
+
"chapter-spacing-y": t.enableSpacingY,
|
|
37
|
+
"pdf-spacing-x": t.pdfSpacingX
|
|
33
38
|
} }, [t.canEdit && ((i = t._value) != null && i.title) ? n("CInput", { ref: "input", staticClass: "title preview-title-input", attrs: { value: t.title, spellcheck: !1, placeholder: t.$t("components:account.documentForm.titleAndText.title"), static: "" }, on: { blur: (e) => {
|
|
34
|
-
var
|
|
35
|
-
t.title = ((
|
|
39
|
+
var s;
|
|
40
|
+
t.title = ((s = e.target) == null ? void 0 : s.value) || "";
|
|
36
41
|
}, "hook:mounted": function(e) {
|
|
37
42
|
return t.$emit("triggerOnAdd");
|
|
38
43
|
} }, nativeOn: { keydown: function(e) {
|
|
@@ -44,7 +49,7 @@ var p = function() {
|
|
|
44
49
|
d,
|
|
45
50
|
!1,
|
|
46
51
|
null,
|
|
47
|
-
"
|
|
52
|
+
"7afaa603"
|
|
48
53
|
);
|
|
49
54
|
const _ = u.exports;
|
|
50
55
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { m as e } from "./mapFormMixin-
|
|
2
|
-
import { n as i } from "./main-
|
|
1
|
+
import { m as e } from "./mapFormMixin-Ce3_WIKw.js";
|
|
2
|
+
import { n as i } from "./main-Bp2qcma0.js";
|
|
3
3
|
const m = {
|
|
4
4
|
name: "EstimatedTimeToComplete",
|
|
5
5
|
components: {
|
|
6
|
-
Read: () => import("./Index-
|
|
7
|
-
Edit: () => import("./Index-
|
|
6
|
+
Read: () => import("./Index-rQKoLISX.js"),
|
|
7
|
+
Edit: () => import("./Index-CP2bsXd-.js")
|
|
8
8
|
},
|
|
9
9
|
mixins: [e(["noOfTimeUnits", "timeUnit"])]
|
|
10
10
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n,
|
|
2
|
-
import { m as p } from "./mapFormMixin-
|
|
3
|
-
import { C as g } from "./CCallout-
|
|
4
|
-
import { T as f } from "./DocTextEditor-
|
|
1
|
+
import { n, a9 as u, g as d, b as o, ay as l } from "./main-Bp2qcma0.js";
|
|
2
|
+
import { m as p } from "./mapFormMixin-Ce3_WIKw.js";
|
|
3
|
+
import { C as g } from "./CCallout-D5Nk5DgN.js";
|
|
4
|
+
import { T as f } from "./DocTextEditor-idQMnlIF.js";
|
|
5
5
|
import { m as v, a as h } from "./vuex.esm-DKGl8mcw.js";
|
|
6
|
-
import { w as _ } from "./CDropdownItem-
|
|
6
|
+
import { w as _ } from "./CDropdownItem-DGES8E6l.js";
|
|
7
7
|
const b = {
|
|
8
8
|
i18nOptions: {
|
|
9
9
|
namespaces: "components",
|
|
@@ -290,8 +290,8 @@ const U = H.exports, L = {
|
|
|
290
290
|
name: "DocPresentationMessage",
|
|
291
291
|
components: {
|
|
292
292
|
AvatarContact: O,
|
|
293
|
-
IsPremium: () => import("./index-
|
|
294
|
-
IsPremiumPreStep: () => import("./index-
|
|
293
|
+
IsPremium: () => import("./index-CUydiL8B.js").then((s) => s.i).then((s) => s.IsPremium),
|
|
294
|
+
IsPremiumPreStep: () => import("./index-CUydiL8B.js").then((s) => s.i).then((s) => s.IsPremiumPreStep)
|
|
295
295
|
},
|
|
296
296
|
mixins: [p([])],
|
|
297
297
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as i } from "./mapFormMixin-
|
|
2
|
-
import { V as n } from "./PdfViewer-
|
|
3
|
-
import { c as
|
|
1
|
+
import { m as i } from "./mapFormMixin-Ce3_WIKw.js";
|
|
2
|
+
import { V as n } from "./PdfViewer-D1_Roqu2.js";
|
|
3
|
+
import { c as l, d as o, n as d } from "./main-Bp2qcma0.js";
|
|
4
4
|
const u = {
|
|
5
5
|
i18nOptions: {
|
|
6
6
|
namespaces: "pdfBlock",
|
|
@@ -20,8 +20,8 @@ const u = {
|
|
|
20
20
|
name: "Pdf",
|
|
21
21
|
components: {
|
|
22
22
|
PdfViewer: n,
|
|
23
|
-
FileIcon: () => import("./Index-
|
|
24
|
-
BaseUpload: () => import("./BaseUpload-
|
|
23
|
+
FileIcon: () => import("./Index-aCBe0dXx.js"),
|
|
24
|
+
BaseUpload: () => import("./BaseUpload-J2v3G0-q.js")
|
|
25
25
|
},
|
|
26
26
|
mixins: [i(["file"])],
|
|
27
27
|
inject: {
|
|
@@ -52,38 +52,30 @@ const u = {
|
|
|
52
52
|
fileUrl() {
|
|
53
53
|
if (!this.file || !this.file.url)
|
|
54
54
|
return null;
|
|
55
|
-
if (this.file.url.startsWith(
|
|
55
|
+
if (this.file.url.startsWith(l.api.baseUrl))
|
|
56
56
|
return this.file.url;
|
|
57
57
|
try {
|
|
58
58
|
const { hostname: a } = new URL(this.file.url);
|
|
59
|
-
if (Object.keys(
|
|
60
|
-
(s) => a.includes(
|
|
59
|
+
if (Object.keys(o).some(
|
|
60
|
+
(s) => a.includes(o[s].domain)
|
|
61
61
|
))
|
|
62
62
|
return this.file.url;
|
|
63
63
|
} catch {
|
|
64
64
|
}
|
|
65
|
-
return `${
|
|
65
|
+
return `${l.api.baseUrl}/public/fileProxy?url=${encodeURIComponent(
|
|
66
66
|
this.file.url
|
|
67
67
|
)}`;
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
-
created() {
|
|
71
|
-
this.$nextTick(() => {
|
|
72
|
-
if (!this.isPdf)
|
|
73
|
-
return;
|
|
74
|
-
const a = this.$el.closest(".chapter");
|
|
75
|
-
a && (a.style.padding = 0);
|
|
76
|
-
});
|
|
77
|
-
},
|
|
78
70
|
methods: {
|
|
79
71
|
onUploadSuccess(a) {
|
|
80
|
-
const { id: e, displayName: s, url: t, mime:
|
|
72
|
+
const { id: e, displayName: s, url: t, mime: r } = a.response;
|
|
81
73
|
if (!e)
|
|
82
74
|
throw new Error("Could not read id from uploaded file");
|
|
83
75
|
this.file = {
|
|
84
76
|
fileId: e,
|
|
85
77
|
name: s,
|
|
86
|
-
mime:
|
|
78
|
+
mime: r,
|
|
87
79
|
url: t
|
|
88
80
|
}, this.$refs.uploader.remove(a), this.uploadProgress = null;
|
|
89
81
|
}
|
|
@@ -95,22 +87,12 @@ var f = function() {
|
|
|
95
87
|
e.isHover = !0;
|
|
96
88
|
}, mouseleave: function(t) {
|
|
97
89
|
e.isHover = !1;
|
|
98
|
-
} } }, [e.canEdit ? s("div", { directives: [{ name: "show", rawName: "v-show", value: e.showControls, expression: "showControls" }], staticClass: "
|
|
99
|
-
"absolute",
|
|
100
|
-
"z-10",
|
|
101
|
-
"left-2",
|
|
102
|
-
"right-2",
|
|
103
|
-
"top-2",
|
|
104
|
-
"shadow-lg",
|
|
105
|
-
"bg-white",
|
|
106
|
-
"border",
|
|
107
|
-
"border-gray-200"
|
|
108
|
-
] }, [s("FileIcon", { attrs: { mime: "application/pdf" } }), s("div", { staticClass: "flex-auto pl-4" }, [s("div", { staticClass: "font-medium" }, [e._v("PDF")]), s("div", { staticClass: "text-sm text-gray-600" }, [e._v(" " + e._s(e.$t("embedded")) + " " + e._s(e.numPages ? e.$t("numOfPages", { numPages: e.numPages }) : "") + " ")])]), s("BaseUpload", { ref: "uploader", attrs: { "autostart-upload": !0, "background-drop": !1, extensions: "pdf", accept: "application/pdf", "max-size": e.maxFileSize }, on: { input: ([t]) => e.uploadProgress = t ? parseInt(t.progress, 10) : null, "upload-success": e.onUploadSuccess }, scopedSlots: e._u([{ key: "default", fn: function({ openFilePicker: t }) {
|
|
90
|
+
} } }, [e.canEdit ? s("div", { directives: [{ name: "show", rawName: "v-show", value: e.showControls, expression: "showControls" }], staticClass: "chapter-spacing-x pointer-events-none mx-auto flex max-w-full items-center justify-center", class: !!e.file && "absolute left-0 right-0 top-2 z-10" }, [s("div", { staticClass: "pointer-events-auto flex w-full max-w-[95%] items-center rounded-lg bg-gray-100 !p-4 text-left", class: !!e.file && "border border-gray-200 !p-2 shadow-lg" }, [s("FileIcon", { attrs: { mime: "application/pdf" } }), s("div", { staticClass: "flex-auto pl-4" }, [s("div", { staticClass: "font-medium" }, [e._v("PDF")]), s("div", { staticClass: "text-sm text-gray-600" }, [e._v(" " + e._s(e.$t("embedded")) + " " + e._s(e.numPages ? e.$t("numOfPages", { numPages: e.numPages }) : "") + " ")])]), s("BaseUpload", { ref: "uploader", attrs: { "autostart-upload": !0, "background-drop": !1, extensions: "pdf", accept: "application/pdf", "max-size": e.maxFileSize }, on: { input: ([t]) => e.uploadProgress = t ? parseInt(t.progress, 10) : null, "upload-success": e.onUploadSuccess }, scopedSlots: e._u([{ key: "default", fn: function({ openFilePicker: t }) {
|
|
109
91
|
return [s("CButton", { staticStyle: { "z-index": "2" }, attrs: { type: e.file ? "none" : "secondary", pattern: e.file ? "secondary" : "primary", disabled: e.uploadProgress !== null }, on: { click: t } }, [e.uploadProgress !== null ? [e._v(" " + e._s(`${e.uploadProgress}% ${e.$t("_common:uploading")}`) + " ")] : [e._v(" " + e._s(e.file ? e.$t("_common:change", { thing: e.$t("_common:file") }) : e.$t("upload")) + " ")]], 2)];
|
|
110
|
-
} }], null, !1, 3134809537) })], 1) : e._e(), e.file ? s("div", [s("div", { class: {
|
|
92
|
+
} }], null, !1, 3134809537) })], 1)]) : e._e(), e.file ? s("div", [s("div", { class: {
|
|
111
93
|
"break-before-page": e.isPdf && !e._firstBlock,
|
|
112
94
|
"break-after-page": e.isPdf && !e._lastBlock
|
|
113
|
-
} }, [e.file && e.file.url ? s("PdfViewer", { attrs: { src: e.fileUrl, "doc-file-path": `${e._value.file}.url` }, on: { numPages: (t) => e.numPages = t } }) : e._e()], 1)]) : e._e()]);
|
|
95
|
+
} }, [e.file && e.file.url ? s("PdfViewer", { attrs: { src: e.fileUrl, toolbar: !e.canEdit, "doc-file-path": `${e._value.file}.url` }, on: { numPages: (t) => e.numPages = t } }) : e._e()], 1)]) : e._e()]);
|
|
114
96
|
}, c = [], p = /* @__PURE__ */ d(
|
|
115
97
|
u,
|
|
116
98
|
f,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as a } from "./mapFormMixin-
|
|
2
|
-
import { B as n } from "./BlockMedia-
|
|
3
|
-
import { n as m } from "./main-
|
|
1
|
+
import { m as a } from "./mapFormMixin-Ce3_WIKw.js";
|
|
2
|
+
import { B as n } from "./BlockMedia-CAgKbN_k.js";
|
|
3
|
+
import { n as m } from "./main-Bp2qcma0.js";
|
|
4
4
|
const o = {
|
|
5
5
|
name: "MediaWrapper",
|
|
6
6
|
components: { BlockMedia: n },
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { m as g } from "./mapFormMixin-
|
|
2
|
-
import { E as y } from "./ErrorCallout-
|
|
3
|
-
import {
|
|
4
|
-
import { t as m } from "./tinycolor-
|
|
5
|
-
import { T as b } from "./DocTextEditor-
|
|
1
|
+
import { m as g } from "./mapFormMixin-Ce3_WIKw.js";
|
|
2
|
+
import { E as y } from "./ErrorCallout-CdJCe67q.js";
|
|
3
|
+
import { am as f, an as v, w as _, n as d, ao as k, A as w, b as p, d as P, c as $ } from "./main-Bp2qcma0.js";
|
|
4
|
+
import { t as m } from "./tinycolor-DNK6zGoq.js";
|
|
5
|
+
import { T as b } from "./DocTextEditor-idQMnlIF.js";
|
|
6
6
|
const x = {
|
|
7
7
|
name: "ArticleItem",
|
|
8
8
|
mixins: [g([])],
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import { n as d, c as n, O as g } from "./main-Bp2qcma0.js";
|
|
2
|
+
import { e as l } from "./dom-CJxkno7i.js";
|
|
3
|
+
import { W as m } from "./DocumentLayout-BJAyNjNa.js";
|
|
4
|
+
import { w as h } from "./CDropdownItem-DGES8E6l.js";
|
|
5
|
+
let c, u, p, f;
|
|
6
|
+
function w(a) {
|
|
7
|
+
return typeof a == "object" && a !== null && a.__PDFDocumentLoadingTask === !0;
|
|
8
|
+
}
|
|
9
|
+
const b = {
|
|
10
|
+
name: "PdfPage",
|
|
11
|
+
components: {
|
|
12
|
+
WithDimensions: m
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
src: {
|
|
16
|
+
type: [String, Object, Promise],
|
|
17
|
+
default: ""
|
|
18
|
+
},
|
|
19
|
+
page: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: 1
|
|
22
|
+
},
|
|
23
|
+
rotate: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 0
|
|
26
|
+
},
|
|
27
|
+
scale: {
|
|
28
|
+
type: [Number, String],
|
|
29
|
+
default: "page-width"
|
|
30
|
+
},
|
|
31
|
+
resize: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !0
|
|
34
|
+
},
|
|
35
|
+
annotation: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !0
|
|
38
|
+
},
|
|
39
|
+
text: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: !0
|
|
42
|
+
},
|
|
43
|
+
pdfLoadingTask: {
|
|
44
|
+
type: Promise,
|
|
45
|
+
required: !0
|
|
46
|
+
},
|
|
47
|
+
containerClass: {
|
|
48
|
+
type: [Array, String],
|
|
49
|
+
default: ""
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
data() {
|
|
53
|
+
return {
|
|
54
|
+
internalSrc: this.src,
|
|
55
|
+
pdf: null,
|
|
56
|
+
pdfViewer: null,
|
|
57
|
+
loading: !0
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
watch: {
|
|
61
|
+
pdf(a) {
|
|
62
|
+
const e = a.pdfInfo || a._pdfInfo;
|
|
63
|
+
this.$emit("numpages", e.numPages);
|
|
64
|
+
},
|
|
65
|
+
page(a) {
|
|
66
|
+
this.pdf.getPage(a).then((e) => {
|
|
67
|
+
this.pdfViewer.setPdfPage(e), this.pdfViewer.draw();
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
scale(a) {
|
|
71
|
+
this.drawScaled(a);
|
|
72
|
+
},
|
|
73
|
+
rotate(a) {
|
|
74
|
+
this.pdfViewer && (this.pdfViewer.update({ scale: this.scale, rotation: a }), this.pdfViewer.draw());
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
mounted() {
|
|
78
|
+
c = window.pdfjsViewer.PDFFindController, u = window.pdfjsViewer.PDFLinkService, p = window.pdfjsViewer.PDFPageView, f = window.pdfjsViewer.EventBus, this.init();
|
|
79
|
+
},
|
|
80
|
+
beforeDestroy() {
|
|
81
|
+
this.pdfViewer && (this.pdfViewer.destroy(), this.pdfViewer = null);
|
|
82
|
+
},
|
|
83
|
+
methods: {
|
|
84
|
+
init() {
|
|
85
|
+
w(this.internalSrc) || (this.internalSrc = this.pdfLoadingTask, this.$emit("loading", !0));
|
|
86
|
+
const a = this.$refs.container, e = new f();
|
|
87
|
+
e.on("pagerendered", (t) => {
|
|
88
|
+
this.$emit("pagerendered", t);
|
|
89
|
+
}), this.pdfLinkService = new u({
|
|
90
|
+
eventBus: e,
|
|
91
|
+
externalLinkTarget: 2
|
|
92
|
+
}), this.pdfFindController = new c({
|
|
93
|
+
eventBus: e,
|
|
94
|
+
linkService: this.pdfLinkService
|
|
95
|
+
}), this.internalSrc.then((t) => (this.pdf = t, t.getPage(this.page))).then((t) => {
|
|
96
|
+
this.pdfViewer = new p({
|
|
97
|
+
container: a,
|
|
98
|
+
id: this.page,
|
|
99
|
+
scale: 1,
|
|
100
|
+
defaultViewport: t.getViewport({
|
|
101
|
+
scale: 1
|
|
102
|
+
}),
|
|
103
|
+
eventBus: e,
|
|
104
|
+
textLayerMode: this.text ? 1 : 0,
|
|
105
|
+
// DISABLE: 0, ENABLE: 1
|
|
106
|
+
annotationMode: this.annotation ? 1 : 0
|
|
107
|
+
// DISABLE: 0, ENABLE: 1, ENABLE_FORMS: 2, ENABLE_STORAGE: 3
|
|
108
|
+
}), this.pdfViewer.setPdfPage(t);
|
|
109
|
+
const s = {
|
|
110
|
+
scrollPageIntoView: (i) => {
|
|
111
|
+
this.$emit("link-clicked", i);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
return this.pdfLinkService.setDocument(this.pdf), this.pdfLinkService.setViewer(s), this.pdfFindController.setDocument(this.pdf), this.drawScaled(this.scale);
|
|
115
|
+
}).catch((t) => {
|
|
116
|
+
this.$emit("error", t), this.loading = !1, this.$emit("loading", !1);
|
|
117
|
+
});
|
|
118
|
+
},
|
|
119
|
+
calculateScale(a = -1, e = -1) {
|
|
120
|
+
return this.pdfViewer.update({ scale: 1, rotation: this.rotate }), a === -1 && e === -1 && (a = this.$refs.container.offsetWidth), a / this.pdfViewer.viewport.width;
|
|
121
|
+
},
|
|
122
|
+
calculateScaleHeight() {
|
|
123
|
+
this.pdfViewer.update({ scale: 1, rotation: this.rotate });
|
|
124
|
+
var a = this.$refs.container.offsetHeight, e = this.$refs.container.parentElement.parentElement;
|
|
125
|
+
return e.offsetHeight / a;
|
|
126
|
+
},
|
|
127
|
+
async drawScaled(a) {
|
|
128
|
+
this.pdfViewer && (a === "page-width" ? (a = this.calculateScale(), this.$emit("update:scale", a)) : a === "page-height" && (a = this.calculateScaleHeight(), this.$emit("update:scale", a)), this.pdfViewer.update({ scale: a, rotation: this.rotate }), await this.pdfViewer.draw(), this.loading = !1, this.$emit("loading", !1));
|
|
129
|
+
},
|
|
130
|
+
resizeScale() {
|
|
131
|
+
this.resize && this.drawScaled("page-width");
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
var v = function() {
|
|
136
|
+
var e = this, t = e._self._c;
|
|
137
|
+
return t("div", [e.loading ? e._t("loading") : e._e(), t("div", { ref: "container", staticClass: "pdfViewer tracking-normal", class: e.containerClass }), t("WithDimensions", { on: { resize: e.resizeScale } }, [t("div", { staticClass: "w-full" })])], 2);
|
|
138
|
+
}, y = [], P = /* @__PURE__ */ d(
|
|
139
|
+
b,
|
|
140
|
+
v,
|
|
141
|
+
y,
|
|
142
|
+
!1,
|
|
143
|
+
null,
|
|
144
|
+
null
|
|
145
|
+
);
|
|
146
|
+
const _ = P.exports, k = {
|
|
147
|
+
name: "PDFToolbar",
|
|
148
|
+
mixins: [h],
|
|
149
|
+
props: {
|
|
150
|
+
currentPage: {
|
|
151
|
+
type: Number,
|
|
152
|
+
default: 0
|
|
153
|
+
},
|
|
154
|
+
numPages: {
|
|
155
|
+
type: Number,
|
|
156
|
+
default: 0
|
|
157
|
+
},
|
|
158
|
+
scale: {
|
|
159
|
+
type: [Number, String],
|
|
160
|
+
default: "page-width"
|
|
161
|
+
},
|
|
162
|
+
autoZoom: {
|
|
163
|
+
type: Boolean,
|
|
164
|
+
default: !0
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
data() {
|
|
168
|
+
return {
|
|
169
|
+
compactExpand: !1
|
|
170
|
+
};
|
|
171
|
+
},
|
|
172
|
+
computed: {
|
|
173
|
+
formattedZoom() {
|
|
174
|
+
return this.autoZoom ? "Auto" : Number.parseInt(this.scale * 100) + "%";
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
methods: {
|
|
178
|
+
updateZoom(a) {
|
|
179
|
+
this.$emit("update:scale", a), this.$emit("update:auto-zoom", a === "page-width");
|
|
180
|
+
},
|
|
181
|
+
onManualZoom(a) {
|
|
182
|
+
var i;
|
|
183
|
+
let e = ((i = a == null ? void 0 : a.target) == null ? void 0 : i.value) || "";
|
|
184
|
+
if (e === "Auto")
|
|
185
|
+
return;
|
|
186
|
+
e.endsWith("%") && (e = e.slice(0, -1));
|
|
187
|
+
const t = Number.parseFloat(e);
|
|
188
|
+
let s = 1;
|
|
189
|
+
Number.isNaN(t) || (s = t / 100, s < 0 && (s = 0), s > 5 && (s = 5)), this.updateZoom(s);
|
|
190
|
+
},
|
|
191
|
+
navigateToPage(a) {
|
|
192
|
+
var t, s;
|
|
193
|
+
let e = ((t = a == null ? void 0 : a.target) == null ? void 0 : t.value) || "";
|
|
194
|
+
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 = a == null ? void 0 : a.target) == null ? void 0 : s.value) < "u" && (a.target.value = this.currentPage), this.$emit("navigate-to-page", e);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
var x = function() {
|
|
199
|
+
var e = this, t = e._self._c;
|
|
200
|
+
return t("div", { staticClass: "pointer-events-none sticky top-0 z-10 flex h-10 w-full translate-y-4", class: { "translate-y-2": e.mq === "sm" } }, [t("div", { staticClass: "pointer-events-auto mx-auto inline-flex items-center justify-center rounded-full bg-gray-300/50 shadow-xl backdrop-blur-md", class: { "ml-2": e.mq === "sm" } }, [t("div", { staticClass: "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" }, [t("div", { staticClass: "mr-2 inline-flex items-center gap-2" }, [t("input", { staticClass: "w-9 rounded-full border border-solid border-gray-200 bg-gray-100 text-center leading-loose text-gray-500", attrs: { type: "number" }, domProps: { value: e.currentPage }, on: { blur: e.navigateToPage, keyup: function(s) {
|
|
201
|
+
return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.navigateToPage.apply(null, arguments);
|
|
202
|
+
} } }), t("div", { staticClass: "text-sm font-medium" }, [e._v("/ " + e._s(e.numPages))])]), t("transition", { attrs: { name: "slide-fade" } }, [e.mq !== "sm" || e.compactExpand ? t("div", { staticClass: "button-transitions flex items-center" }, [t("div", { staticClass: "h-8 w-px bg-gray-700/10" }), t("div", { staticClass: "inline-flex items-center" }, [t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
|
|
203
|
+
e.updateZoom(e.scale - (e.scale > 0.2 ? 0.1 : 0));
|
|
204
|
+
} } }, [t("CIcon", { attrs: { type: "zoomOut", size: "20" } })], 1), t("input", { key: e.scale, staticClass: "w-12 rounded-md border border-solid border-gray-200 bg-gray-100 text-center leading-loose text-gray-500", attrs: { type: "text" }, domProps: { value: e.formattedZoom }, on: { blur: e.onManualZoom, keyup: function(s) {
|
|
205
|
+
return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.onManualZoom.apply(null, arguments);
|
|
206
|
+
} } }), t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
|
|
207
|
+
e.updateZoom(e.scale + (e.scale < 2 ? 0.1 : 0));
|
|
208
|
+
} } }, [t("CIcon", { attrs: { type: "zoomIn", size: "20" } })], 1)]), t("div", { staticClass: "h-8 w-px bg-gray-700/10" }), t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
|
|
209
|
+
return e.updateZoom("page-width");
|
|
210
|
+
} } }, [t("CIcon", { attrs: { type: "boxBox", size: "20" } })], 1), t("div", { staticClass: "h-8 w-px bg-gray-700/10" }), t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
|
|
211
|
+
return e.$emit("download");
|
|
212
|
+
} } }, [t("CIcon", { attrs: { type: "download", size: "20" } })], 1)]) : e._e()])], 1), e.mq === "sm" ? t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
|
|
213
|
+
e.compactExpand = !e.compactExpand;
|
|
214
|
+
} } }, [t("CIcon", { staticClass: "duration-500", class: { "rotate-180": e.compactExpand }, attrs: { type: "chevron-right", size: "20" } })], 1) : e._e()])]);
|
|
215
|
+
}, C = [], $ = /* @__PURE__ */ d(
|
|
216
|
+
k,
|
|
217
|
+
x,
|
|
218
|
+
C,
|
|
219
|
+
!1,
|
|
220
|
+
null,
|
|
221
|
+
"c18582b3"
|
|
222
|
+
);
|
|
223
|
+
const V = $.exports;
|
|
224
|
+
function L(a, e) {
|
|
225
|
+
let t;
|
|
226
|
+
if (typeof a == "string")
|
|
227
|
+
t = {
|
|
228
|
+
url: a
|
|
229
|
+
};
|
|
230
|
+
else if (typeof a == "object" && a !== null)
|
|
231
|
+
t = { ...a };
|
|
232
|
+
else
|
|
233
|
+
throw new TypeError("invalid src type");
|
|
234
|
+
const s = window.pdfjsLib.getDocument(t).promise;
|
|
235
|
+
return s.__PDFDocumentLoadingTask = !0, e && e.onPassword && (s.onPassword = e.onPassword), e && e.onProgress && (s.onProgress = e.onProgress), s;
|
|
236
|
+
}
|
|
237
|
+
const o = "4.0.379", S = {
|
|
238
|
+
components: {
|
|
239
|
+
VuePdf: _,
|
|
240
|
+
PDFToolbar: V
|
|
241
|
+
},
|
|
242
|
+
inject: {
|
|
243
|
+
isPdf: {
|
|
244
|
+
default: !1
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
props: {
|
|
248
|
+
src: {
|
|
249
|
+
type: String,
|
|
250
|
+
default: null
|
|
251
|
+
},
|
|
252
|
+
toolbar: {
|
|
253
|
+
type: Boolean,
|
|
254
|
+
default: !0
|
|
255
|
+
},
|
|
256
|
+
docFilePath: {
|
|
257
|
+
type: String,
|
|
258
|
+
default: null
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
data() {
|
|
262
|
+
return {
|
|
263
|
+
pdf: null,
|
|
264
|
+
pdfLoadingTask: null,
|
|
265
|
+
hasLoadedScripts: !1,
|
|
266
|
+
loading: !1,
|
|
267
|
+
// zoom
|
|
268
|
+
autoZoom: !0,
|
|
269
|
+
scale: "page-width",
|
|
270
|
+
// page navigation
|
|
271
|
+
page: 1,
|
|
272
|
+
numPages: void 0,
|
|
273
|
+
observer: null
|
|
274
|
+
};
|
|
275
|
+
},
|
|
276
|
+
watch: {
|
|
277
|
+
src: {
|
|
278
|
+
immediate: !0,
|
|
279
|
+
async handler(a) {
|
|
280
|
+
this.hasLoadedScripts || (await l(
|
|
281
|
+
// `https://unpkg.com/pdfjs-dist@${pdfjsVersion}/build/pdf.min.mjs`
|
|
282
|
+
`${n.api.baseUrl}/js/pdfjs-dist@${o}/build/pdf.min.mjs`
|
|
283
|
+
), await l(
|
|
284
|
+
// `https://unpkg.com/pdfjs-dist@${pdfjsVersion}/web/pdf_viewer.mjs`
|
|
285
|
+
`${n.api.baseUrl}/js/pdfjs-dist@${o}/web/pdf_viewer.mjs`
|
|
286
|
+
), window.pdfjsLib.GlobalWorkerOptions.workerSrc = `${n.api.baseUrl}/js/pdfjs-dist@${o}/build/pdf.worker.min.mjs`, this.hasLoadedScripts = !0), this.setPdf(a);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
beforeDestroy() {
|
|
291
|
+
this.observer && (this.observer.disconnect(), this.observer = null);
|
|
292
|
+
},
|
|
293
|
+
methods: {
|
|
294
|
+
createLoadingTask: L,
|
|
295
|
+
async setPdf(a) {
|
|
296
|
+
a && (this.loading = !0, this.pdfLoadingTask = this.createLoadingTask(a), this.$nextTick(() => {
|
|
297
|
+
this.pdfLoadingTask.then((e) => {
|
|
298
|
+
this.pdf = e, this.loading = !1, this.numPages = e.numPages, this.$emit("numPages", e.numPages), this.$emit("rendered"), this.toolbar && this.numPages > 1 && (this.observer = new IntersectionObserver(
|
|
299
|
+
(t) => {
|
|
300
|
+
t.forEach((s) => {
|
|
301
|
+
var i;
|
|
302
|
+
if (s.isIntersecting) {
|
|
303
|
+
const r = Number(
|
|
304
|
+
(i = s.target) == null ? void 0 : i.getAttribute("data-page")
|
|
305
|
+
);
|
|
306
|
+
this.page = r;
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
// root: this.$el,
|
|
312
|
+
rootMargin: "0px",
|
|
313
|
+
threshold: 0.5
|
|
314
|
+
}
|
|
315
|
+
), this.$nextTick(() => {
|
|
316
|
+
var t;
|
|
317
|
+
(t = this.$refs.pageComponent) == null || t.forEach(
|
|
318
|
+
(s) => this.observer.observe(s.$el)
|
|
319
|
+
);
|
|
320
|
+
}));
|
|
321
|
+
});
|
|
322
|
+
}));
|
|
323
|
+
},
|
|
324
|
+
navigateToPage(a) {
|
|
325
|
+
var e, t, s;
|
|
326
|
+
(s = (t = (e = this.$refs.pageComponent) == null ? void 0 : e[a - 1]) == null ? void 0 : t.$el) == null || s.scrollIntoView({
|
|
327
|
+
behavior: "instant",
|
|
328
|
+
block: "start"
|
|
329
|
+
});
|
|
330
|
+
},
|
|
331
|
+
async download() {
|
|
332
|
+
if (!this.pdf)
|
|
333
|
+
return;
|
|
334
|
+
const e = (await this.pdf.getMetadata()).info.Title || "document";
|
|
335
|
+
this.pdf.getData().then((t) => {
|
|
336
|
+
const s = new Blob([t], { type: "application/pdf" }), i = URL.createObjectURL(s), r = document.createElement("a");
|
|
337
|
+
r.href = i, r.setAttribute("download", `${e}.pdf`), r.click();
|
|
338
|
+
}).catch(() => g("Failed to download PDF"));
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
var F = function() {
|
|
343
|
+
var e = this, t = e._self._c;
|
|
344
|
+
return t("div", { key: e.src, staticStyle: { "--page-border": "0" } }, [e.isPdf ? t("pre", [e._v(" ClingPDFReplaceStart:[" + e._s(e.docFilePath) + `]ClingPDFReplaceEnd
|
|
345
|
+
`), t("div", [e._v("This page should have been replaced with URL: " + e._s(e.src))]), e._v(`
|
|
346
|
+
`)]) : [e.toolbar && !e.loading ? t("PDFToolbar", { attrs: { "current-page": e.page, "num-pages": e.numPages, scale: e.scale, "auto-zoom": e.autoZoom }, on: { "update:scale": function(s) {
|
|
347
|
+
e.scale = s;
|
|
348
|
+
}, "update:autoZoom": function(s) {
|
|
349
|
+
e.autoZoom = s;
|
|
350
|
+
}, "update:auto-zoom": function(s) {
|
|
351
|
+
e.autoZoom = s;
|
|
352
|
+
}, download: e.download, "navigate-to-page": e.navigateToPage } }) : e._e(), t("div", { staticClass: "mx-auto", class: { "chapter-spacing-x max-w-full": e.autoZoom } }, [e.loading ? t("div", { staticClass: "mb-4 grid aspect-[210/297] w-full place-items-center border border-gray-100 bg-gray-50" }, [t("CIcon", { staticClass: "animate-spin text-gray-400", attrs: { type: "loader", size: "28" } })], 1) : e._e(), t("div", { class: { "overflow-x-auto": !e.autoZoom } }, e._l(e.numPages, function(s) {
|
|
353
|
+
return t("VuePdf", e._b({ key: s, ref: "pageComponent", refInFor: !0, staticClass: "page-shadow", attrs: { page: s, "data-page": s, scale: e.scale, resize: e.autoZoom, "container-class": "mb-4" }, on: { "update:scale": function(i) {
|
|
354
|
+
e.scale = i;
|
|
355
|
+
} } }, "VuePdf", {
|
|
356
|
+
...e.$attrs,
|
|
357
|
+
...e.$props,
|
|
358
|
+
pdfLoadingTask: e.pdfLoadingTask
|
|
359
|
+
}, !1), [e._t("loading", function() {
|
|
360
|
+
return [t("div", { staticClass: "mb-4 grid aspect-[210/297] place-items-center border border-gray-100 bg-gray-50", attrs: { slot: "loading" }, slot: "loading" }, [t("CIcon", { staticClass: "animate-spin text-gray-400", attrs: { type: "loader", size: "28" } })], 1)];
|
|
361
|
+
})], 2);
|
|
362
|
+
}), 1)])]], 2);
|
|
363
|
+
}, T = [], D = /* @__PURE__ */ d(
|
|
364
|
+
S,
|
|
365
|
+
F,
|
|
366
|
+
T,
|
|
367
|
+
!1,
|
|
368
|
+
null,
|
|
369
|
+
"065d6b5d"
|
|
370
|
+
);
|
|
371
|
+
const N = D.exports;
|
|
372
|
+
export {
|
|
373
|
+
N as V
|
|
374
|
+
};
|