@cling-se/widget 0.13.5 → 0.14.0
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-C7BLDW6Y.js} +3 -3
- package/dist/{AnswerModal-BF-ZUpQ9.js → AnswerModal-KWFteFV9.js} +4 -4
- package/dist/{AttachmentItem-DEC6rjGE.js → AttachmentItem-CSerklBS.js} +2 -2
- package/dist/{BaseDatePicker-2uhuySby.js → BaseDatePicker-BOxfHGS8.js} +102 -102
- package/dist/{BaseInput-BtgFVDxx.js → BaseInput-BDjhI5P9.js} +1 -1
- package/dist/{BaseUpload-D1OS-EZ-.js → BaseUpload-B-CktrCH.js} +24 -24
- package/dist/{BlockMedia-BFBeRtJx.js → BlockMedia-T4OxMb4n.js} +21 -17
- package/dist/{CCallout-CsQMsFZO.js → CCallout-yFt7TFJa.js} +2 -2
- package/dist/{CDropdownItem-BeK9wNHJ.js → CDropdownItem-DhEpCmQt.js} +1 -1
- package/dist/{CField-TsZhnNrK.js → CFormField-DDLf5YY4.js} +66 -39
- package/dist/{CPhoneFormat-DPYhElZw.js → CPhoneFormat-B88rkuf0.js} +1 -1
- package/dist/{CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-B85IuuQS.js → CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-DbBb6ZId.js} +1 -1
- package/dist/{ClientAutocomplete-Ch2Z-VNr.js → ClientAutocomplete-DmRl3SUj.js} +2 -2
- package/dist/{ClientModal-rdb9TsyH.js → ClientModal-Dn3WDhGU.js} +4 -4
- package/dist/{ColorPicker-2gfbU60o.js → ColorPicker-DX6JAsTn.js} +1 -1
- package/dist/{CompanyModal-CNeySxNi.js → CompanyModal-BbO2nTd5.js} +4 -4
- package/dist/{ContentWrapper-D27J_sCS.js → ContentWrapper-BvbmcTXK.js} +8 -8
- package/dist/{CoverBlockSettings-BfdJKrsq.js → CoverBlockSettings-C8FDwx7i.js} +5 -5
- package/dist/{DocAnswer-CyHASkhm.js → DocAnswer-OttbybQs.js} +2 -2
- package/dist/{DocDetails-8bM9dBxm.js → DocDetails-J7O26zqa.js} +4 -4
- package/dist/{DocForm-CumvOHwl.js → DocForm-Bgbesq79.js} +46 -45
- package/dist/{DocFormSend-CdoZy_Q2.js → DocFormSend-D_U3ztgw.js} +2 -2
- package/dist/{DocLinks-BJPADuvd.js → DocLinks-Dp-iQ-B_.js} +2 -2
- package/dist/{DocModalBase-Cd3zXvH_.js → DocModalBase-F-wlPg7j.js} +1 -1
- package/dist/{DocPrint-Be4l2pra.js → DocPrint-B45voy0W.js} +22 -15
- package/dist/{DocReceipt-DmFjo26V.js → DocReceipt-jKVK5U-a.js} +1 -1
- package/dist/{DocSendReminder-CVxh_c7u.js → DocSendReminder-BersSNb1.js} +1 -1
- package/dist/{DocTextEditor-2jhWmmN2.js → DocTextEditor-CYe_jWZ8.js} +834 -816
- package/dist/{DocTimeline-Dvn690cI.js → DocTimeline-yyzh51yB.js} +1 -1
- package/dist/{DocumentClient-D3ESmMk1.js → DocumentClient-CS_EVjK9.js} +5 -5
- package/dist/{DocumentLayout-0-y6ChW3.js → DocumentLayout-Ba121Zro.js} +9 -5
- package/dist/{DocumentLogotype-CHWEVOFb.js → DocumentLogotype-DUVhl9xC.js} +3 -3
- package/dist/{DocumentVoided-CoJ6YorU.js → DocumentVoided-D5ePc-a5.js} +1 -1
- package/dist/{EmbedInput-CGQJdLBd.js → EmbedInput-Ds-Z-0J2.js} +2 -2
- package/dist/{EmbedSettings-DRfM7EkF.js → EmbedSettings-C8BP4YuY.js} +2 -2
- package/dist/{ErrorCallout-pRwrsMwI.js → ErrorCallout-B_QrRAm6.js} +1 -1
- package/dist/{FilePreviewModal-4hJnwqeM.js → FilePreviewModal-B105PxLD.js} +2 -2
- package/dist/{Flag-CH9jX9p6.js → Flag-hg61To9C.js} +1 -1
- package/dist/{HeaderSettings-DESkxus6.js → HeaderSettings-DIBiJc4I.js} +7 -7
- package/dist/{ImageSelectModal-BczBg7pO.js → ImageSelectModal-D2g42vWJ.js} +3 -3
- package/dist/{ImageUploadWrapper-B7F5UzSa.js → ImageUploadWrapper-CREUMKh3.js} +2 -2
- package/dist/{Index-COFOq65C.js → Index-02IKjPth.js} +3 -3
- package/dist/{Index-DLX_14JW.js → Index-4NdatdH2.js} +6 -6
- package/dist/{Index-C8Eykyfr.js → Index-7rbX01Io.js} +5 -5
- package/dist/{Index-Dj7XQrCX.js → Index-8DAfMA_s.js} +5 -5
- package/dist/{Index-CBRWEkz3.js → Index-B8xcDVQ1.js} +9 -4
- package/dist/{Index-DAuSARq4.js → Index-BG9x90V0.js} +5 -5
- package/dist/{Index-BkDT09xK.js → Index-BLQwYzIX.js} +3 -3
- package/dist/{Index-Dk7qSZaZ.js → Index-BUTYZCat.js} +2 -2
- package/dist/{Index-DpZ0FVkb.js → Index-BZM-FsHY.js} +1 -1
- package/dist/{Index-Cs1C7d8_.js → Index-BiK7PqAm.js} +2 -2
- package/dist/{Index-DxT6UrU3.js → Index-BqBi-EmE.js} +2 -2
- package/dist/{Index-BztAYqwZ.js → Index-Bu6aOCmM.js} +3 -3
- package/dist/{Index-xVss9bbv.js → Index-BuDj2yrd.js} +4 -4
- package/dist/{Index-euXfMzGE.js → Index-C56fTFO3.js} +4 -4
- package/dist/{Index-CUYcsakk.js → Index-CL12KArA.js} +4 -4
- package/dist/{Index-BBWCdaFx.js → Index-CUxvKTfn.js} +14 -32
- package/dist/{Index-BCBBrdDY.js → Index-CYHxrllv.js} +4 -4
- package/dist/{Index-Lwrlj4Uo.js → Index-CpWW7m5F.js} +4 -4
- package/dist/{Index-B77mpvaJ.js → Index-CwulQoRG.js} +8 -8
- package/dist/{Index-CwOwQrDd.js → Index-D0gS476H.js} +4 -4
- package/dist/{Index-D_21EWlr.js → Index-DDj3_T_m.js} +1 -1
- package/dist/{Index-BSizncA1.js → Index-DIg77V9c.js} +2 -2
- package/dist/{Index-D_XxQTHL.js → Index-DRgVg0CH.js} +4 -4
- package/dist/{Index-DLwJlsSV.js → Index-DVQ6ZsHz.js} +6 -6
- package/dist/{Index-BSApSN3a.js → Index-D_MonVUx.js} +6 -6
- package/dist/{Index-Cb7AYMdp.js → Index-DeNpUKh8.js} +5 -5
- package/dist/{Index-CRjdza18.js → Index-Dqp7TmnQ.js} +6 -6
- package/dist/{Index-CgugegyD.js → Index-Dy7K8KMB.js} +11 -11
- package/dist/{Index-DRdhlnQI.js → Index-YkoWXviW.js} +4 -4
- package/dist/{Index-CPXWFvtI.js → Index-agYFtWMw.js} +6 -6
- package/dist/{Index-DXovv3-e.js → Index-bTXYCG9Y.js} +4 -4
- package/dist/{Index-McJQllNy.js → Index-kAu-7TWv.js} +10 -10
- package/dist/{Index-DM8XS-Lc.js → Index-lKo8z-71.js} +3 -3
- package/dist/{Index-BOIBgNgp.js → Index-sltQx4D3.js} +2 -2
- package/dist/{InputToggleRow-BjSD0lth.js → InputToggleRow-C7aWJpUF.js} +1 -1
- package/dist/{ManualPopover-CIouE65j.js → ManualPopover-CK9Xp-mo.js} +1 -1
- package/dist/{MediaWrapper-DK2fsQP7.js → MediaWrapper-v87wlFnj.js} +3 -3
- package/dist/{NotBindingText-D1IUYEiC.js → NotBindingText-BGy3SnK3.js} +2 -2
- package/dist/{PackageGroup-BImsltc7.js → PackageGroup-CrsOkWIb.js} +8 -8
- package/dist/{PdfTerms-BzBvvuT6.js → PdfTerms-UmEmlI0Y.js} +2 -2
- package/dist/PdfViewer-C6VBu4tT.js +374 -0
- package/dist/{PlainHtml-J_nR1ibV.js → PlainHtml-Dsaxrq3D.js} +1 -1
- package/dist/{PriceHeader-BZeaKOTy.js → PriceHeader-DQ615L9Q.js} +10 -10
- package/dist/{SearchApi-Du-Lqo7R.js → SearchApi-CbWFQfoc.js} +2 -2
- package/dist/{Setup-CtSIo_xU.js → Setup-Byd-0W7U.js} +1 -1
- package/dist/{TermsSettings-DDHrUB_S.js → TermsSettings-Cah7_3Ba.js} +3 -3
- package/dist/{ThemeColorRow-BiRPYyj_.js → ThemeColorRow-DqsjvQfY.js} +3 -3
- package/dist/{ToggleBinding-Cvd9I0Dw.js → ToggleBinding-DFr6xW2B.js} +3 -3
- package/dist/{UploadModal-ByJeM98S.js → UploadModal-jRI9ITty.js} +2 -2
- package/dist/{VideoPlayerInput-C1PiFaBo.js → VideoPlayerInput-C5_Ft8-4.js} +3 -3
- package/dist/{VideoPlayerSettings-C9vt7Twd.js → VideoPlayerSettings-LZluC-Tg.js} +2 -2
- package/dist/{VideoSelectModal-cEDZv03c.js → VideoSelectModal-OGDq_lwv.js} +3 -3
- package/dist/{answerDocumentMixin-QbMot2bf.js → answerDocumentMixin-D8BXcPWt.js} +3 -3
- package/dist/{debounce-CaZBFRFZ.js → debounce-BQXg61RJ.js} +8 -8
- package/dist/dom-CJxkno7i.js +91 -0
- package/dist/{focusDrawerMixin-D-mqPE02.js → focusDrawerMixin-D3Pzr0P-.js} +1 -1
- package/dist/{formComponentsInstall-BdhIOhq5.js → formComponentsInstall-D1VBPt9o.js} +173 -201
- package/dist/{formDrawerState-CcDRv2mi.js → formDrawerState-wG6RdIXD.js} +1 -1
- package/dist/{formValidationMixin-sp3Q6-ER.js → formValidationMixin-D9qFZJf9.js} +2 -2
- package/dist/{index-BjZuADtN.js → index-1DmXjcSN.js} +6 -6
- package/dist/{index-BWmMho6V.js → index-BEOnzeEr.js} +9 -9
- package/dist/{index-CJTuXpCD.js → index-BFnwm62-.js} +1 -1
- package/dist/{index-DuCwf2mg.js → index-DETqm8Jy.js} +3 -3
- package/dist/{index-DEWMCZz4.js → index-Dnp3LAf2.js} +1 -1
- package/dist/{index-BABEaO8N.js → index-M-GXl2PO.js} +48 -48
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +135 -135
- package/dist/{main-DQ6SH_E_.js → main-CWRB9q-W.js} +332 -312
- package/dist/{mapFormMixin-2SoyKxW2.js → mapFormMixin-BOmDynJ-.js} +1 -1
- package/dist/{omit-BjdTqooP.js → omit-CMqxXOLn.js} +47 -47
- package/dist/{publicSenderState-CKGe1ejF.js → publicSenderState-D_VhSyXD.js} +1 -1
- package/dist/style.css +2 -2
- package/dist/{throttle-BeZ_TpQb.js → throttle-Bixql7MZ.js} +2 -2
- package/dist/{tinycolor-C3JU9Hqu.js → tinycolor-CIjZZX-6.js} +1 -1
- package/dist/{tippy.esm-DowQrfWM.js → tippy.esm-BcAHvKwR.js} +5 -5
- package/dist/{utils-D2JfcR6v.js → utils-1ypnMuRv.js} +1 -1
- package/package.json +1 -1
- package/dist/PdfViewer-Dq0Mc-WC.js +0 -247
- package/dist/dom-CPYqHOIw.js +0 -69
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as n, l } from "./main-
|
|
2
|
-
import { a as o } from "./debounce-
|
|
1
|
+
import { k as n, l } from "./main-CWRB9q-W.js";
|
|
2
|
+
import { a as o } from "./debounce-BQXg61RJ.js";
|
|
3
3
|
var g = o, c = l, f = "Expected a function";
|
|
4
4
|
function u(a, i, t) {
|
|
5
5
|
var r = !0, e = !0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { F as mr } from "./DocumentLayout-
|
|
2
|
-
import { C as hr, a as gr } from "./CDropdownItem-
|
|
3
|
-
import { n as Wt, r as yr, aM as Ot } from "./main-
|
|
4
|
-
import { C as br } from "./ColorPicker-
|
|
5
|
-
import { S as wr } from "./CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-
|
|
1
|
+
import { F as mr } from "./DocumentLayout-Ba121Zro.js";
|
|
2
|
+
import { C as hr, a as gr } from "./CDropdownItem-DhEpCmQt.js";
|
|
3
|
+
import { n as Wt, r as yr, aM as Ot } from "./main-CWRB9q-W.js";
|
|
4
|
+
import { C as br } from "./ColorPicker-DX6JAsTn.js";
|
|
5
|
+
import { S as wr } from "./CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-DbBb6ZId.js";
|
|
6
6
|
const xr = {
|
|
7
7
|
AED: "United Arab Emirates Dirham",
|
|
8
8
|
AFN: "Afghan Afghani",
|
package/package.json
CHANGED
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
import { n as u, Q as m, c as n } from "./main-DQ6SH_E_.js";
|
|
2
|
-
import { e as o } from "./dom-CPYqHOIw.js";
|
|
3
|
-
import { W as w } from "./DocumentLayout-0-y6ChW3.js";
|
|
4
|
-
let l, f, c, p, h;
|
|
5
|
-
function _(t) {
|
|
6
|
-
return typeof t == "object" && t !== null && t.__PDFDocumentLoadingTask === !0;
|
|
7
|
-
}
|
|
8
|
-
const P = {
|
|
9
|
-
name: "PdfPage",
|
|
10
|
-
components: {
|
|
11
|
-
WithDimensions: w
|
|
12
|
-
},
|
|
13
|
-
props: {
|
|
14
|
-
src: {
|
|
15
|
-
type: [String, Object, Promise],
|
|
16
|
-
default: ""
|
|
17
|
-
},
|
|
18
|
-
page: {
|
|
19
|
-
type: Number,
|
|
20
|
-
default: 1
|
|
21
|
-
},
|
|
22
|
-
rotate: {
|
|
23
|
-
type: Number,
|
|
24
|
-
default: 0
|
|
25
|
-
},
|
|
26
|
-
scale: {
|
|
27
|
-
type: [Number, String],
|
|
28
|
-
default: "page-width"
|
|
29
|
-
},
|
|
30
|
-
resize: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: !0
|
|
33
|
-
},
|
|
34
|
-
text: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: !0
|
|
37
|
-
},
|
|
38
|
-
pdfLoadingTask: {
|
|
39
|
-
type: Promise,
|
|
40
|
-
required: !0
|
|
41
|
-
},
|
|
42
|
-
containerClass: {
|
|
43
|
-
type: [Array, String],
|
|
44
|
-
default: ""
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
data() {
|
|
48
|
-
return {
|
|
49
|
-
internalSrc: this.src,
|
|
50
|
-
pdf: null,
|
|
51
|
-
pdfViewer: null,
|
|
52
|
-
loading: !0
|
|
53
|
-
};
|
|
54
|
-
},
|
|
55
|
-
watch: {
|
|
56
|
-
pdf(t) {
|
|
57
|
-
const e = t.pdfInfo || t._pdfInfo;
|
|
58
|
-
this.$emit("numpages", e.numPages);
|
|
59
|
-
},
|
|
60
|
-
page(t) {
|
|
61
|
-
this.pdf.getPage(t).then((e) => {
|
|
62
|
-
this.pdfViewer.setPdfPage(e), this.pdfViewer.draw();
|
|
63
|
-
});
|
|
64
|
-
},
|
|
65
|
-
scale(t) {
|
|
66
|
-
this.drawScaled(t);
|
|
67
|
-
},
|
|
68
|
-
rotate(t) {
|
|
69
|
-
this.pdfViewer && (this.pdfViewer.update({ scale: this.scale, rotation: t }), this.pdfViewer.draw());
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
mounted() {
|
|
73
|
-
l = window.pdfjsViewer.DefaultTextLayerFactory, f = window.pdfjsViewer.PDFFindController, c = window.pdfjsViewer.PDFLinkService, p = window.pdfjsViewer.PDFPageView, h = window.pdfjsViewer.EventBus, this.init();
|
|
74
|
-
},
|
|
75
|
-
beforeDestroy() {
|
|
76
|
-
this.pdfViewer && (this.pdfViewer.destroy(), this.pdfViewer = null);
|
|
77
|
-
},
|
|
78
|
-
methods: {
|
|
79
|
-
init() {
|
|
80
|
-
_(this.internalSrc) || (this.internalSrc = this.pdfLoadingTask, this.$emit("loading", !0));
|
|
81
|
-
const t = this.$refs.container, e = new h();
|
|
82
|
-
e.on("pagerendered", (s) => {
|
|
83
|
-
this.$emit("pagerendered", s);
|
|
84
|
-
}), this.pdfLinkService = new c({
|
|
85
|
-
eventBus: e,
|
|
86
|
-
externalLinkTarget: 2
|
|
87
|
-
}), this.pdfFindController = new f({
|
|
88
|
-
eventBus: e,
|
|
89
|
-
linkService: this.pdfLinkService
|
|
90
|
-
});
|
|
91
|
-
let i;
|
|
92
|
-
this.text && (i = new l()), this.internalSrc.then((s) => (this.pdf = s, s.getPage(this.page))).then((s) => {
|
|
93
|
-
this.pdfViewer = new p({
|
|
94
|
-
container: t,
|
|
95
|
-
id: this.page,
|
|
96
|
-
scale: 1,
|
|
97
|
-
defaultViewport: s.getViewport({
|
|
98
|
-
scale: 1
|
|
99
|
-
}),
|
|
100
|
-
eventBus: e,
|
|
101
|
-
textLayerFactory: i
|
|
102
|
-
}), this.pdfViewer.setPdfPage(s);
|
|
103
|
-
const r = {
|
|
104
|
-
scrollPageIntoView: (g) => {
|
|
105
|
-
this.$emit("link-clicked", g);
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
return this.pdfLinkService.setDocument(this.pdf), this.pdfLinkService.setViewer(r), this.pdfFindController.setDocument(this.pdf), this.drawScaled(this.scale);
|
|
109
|
-
}).catch((s) => {
|
|
110
|
-
this.$emit("error", s), this.loading = !1, this.$emit("loading", !1);
|
|
111
|
-
});
|
|
112
|
-
},
|
|
113
|
-
calculateScale(t = -1, e = -1) {
|
|
114
|
-
return this.pdfViewer.update({ scale: 1, rotation: this.rotate }), t === -1 && e === -1 && (t = this.$refs.container.offsetWidth), t / this.pdfViewer.viewport.width;
|
|
115
|
-
},
|
|
116
|
-
calculateScaleHeight() {
|
|
117
|
-
this.pdfViewer.update({ scale: 1, rotation: this.rotate });
|
|
118
|
-
var t = this.$refs.container.offsetHeight, e = this.$refs.container.parentElement.parentElement;
|
|
119
|
-
return e.offsetHeight / t;
|
|
120
|
-
},
|
|
121
|
-
async drawScaled(t) {
|
|
122
|
-
this.pdfViewer && (t === "page-width" ? (t = this.calculateScale(), this.$emit("update:scale", t)) : t === "page-height" && (t = this.calculateScaleHeight(), this.$emit("update:scale", t)), this.pdfViewer.update({ scale: t, rotation: this.rotate }), await this.pdfViewer.draw(), this.text && (this.pdfViewer.textLayer.findController = this.pdfFindController), this.loading = !1, this.$emit("loading", !1));
|
|
123
|
-
},
|
|
124
|
-
resizeScale() {
|
|
125
|
-
this.resize && this.drawScaled("page-width");
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
var v = function() {
|
|
130
|
-
var e = this, i = e._self._c;
|
|
131
|
-
return i("div", [e.loading ? e._t("loading") : e._e(), i("WithDimensions", { on: { resize: e.resizeScale } }, [i("div", { ref: "container", staticClass: "pdfViewer", class: e.containerClass })])], 2);
|
|
132
|
-
}, y = [], V = /* @__PURE__ */ u(
|
|
133
|
-
P,
|
|
134
|
-
v,
|
|
135
|
-
y,
|
|
136
|
-
!1,
|
|
137
|
-
null,
|
|
138
|
-
null
|
|
139
|
-
);
|
|
140
|
-
const L = V.exports, a = new m();
|
|
141
|
-
function $(t, e) {
|
|
142
|
-
let i;
|
|
143
|
-
if (typeof t == "string")
|
|
144
|
-
i = {
|
|
145
|
-
url: t
|
|
146
|
-
};
|
|
147
|
-
else if (typeof t == "object" && t !== null)
|
|
148
|
-
i = { ...t };
|
|
149
|
-
else
|
|
150
|
-
throw new TypeError("invalid src type");
|
|
151
|
-
const s = window.pdfjsLib.getDocument(i).promise;
|
|
152
|
-
return s.__PDFDocumentLoadingTask = !0, e && e.onPassword && (s.onPassword = e.onPassword), e && e.onProgress && (s.onProgress = e.onProgress), s;
|
|
153
|
-
}
|
|
154
|
-
const d = {
|
|
155
|
-
add(t) {
|
|
156
|
-
a.trigger("add", t);
|
|
157
|
-
},
|
|
158
|
-
remove(t) {
|
|
159
|
-
a.trigger("remove", t);
|
|
160
|
-
},
|
|
161
|
-
onAdd(t) {
|
|
162
|
-
a.on("add", t);
|
|
163
|
-
},
|
|
164
|
-
onRemove(t) {
|
|
165
|
-
a.on("remove", t);
|
|
166
|
-
}
|
|
167
|
-
}, k = {
|
|
168
|
-
components: {
|
|
169
|
-
VuePdf: L
|
|
170
|
-
},
|
|
171
|
-
inject: {
|
|
172
|
-
isPdf: {
|
|
173
|
-
default: !1
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
props: {
|
|
177
|
-
src: {
|
|
178
|
-
type: String,
|
|
179
|
-
default: null
|
|
180
|
-
},
|
|
181
|
-
docFilePath: {
|
|
182
|
-
type: String,
|
|
183
|
-
default: null
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
data() {
|
|
187
|
-
return {
|
|
188
|
-
numPages: void 0,
|
|
189
|
-
pdfLoadingTask: null,
|
|
190
|
-
hasLoadedScripts: !1,
|
|
191
|
-
loading: !1,
|
|
192
|
-
pdfRenderBus: d
|
|
193
|
-
};
|
|
194
|
-
},
|
|
195
|
-
watch: {
|
|
196
|
-
src: {
|
|
197
|
-
immediate: !0,
|
|
198
|
-
async handler(t) {
|
|
199
|
-
this.hasLoadedScripts || (await o(
|
|
200
|
-
`${n.api.baseUrl}/js/pdfjs-dist@3.0.279/build/pdf.min.js`
|
|
201
|
-
), await o(
|
|
202
|
-
`${n.api.baseUrl}/js/pdfjs-dist@3.0.279/web/pdf_viewer.js`
|
|
203
|
-
), window.pdfjsLib.GlobalWorkerOptions.workerSrc = `${n.api.baseUrl}/js/pdfjs-dist@3.0.279/build/pdf.worker.min.js`, this.hasLoadedScripts = !0), this.setPdf(t);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
created() {
|
|
208
|
-
this.isPdf || d.add(this._uid);
|
|
209
|
-
},
|
|
210
|
-
methods: {
|
|
211
|
-
createLoadingTask: $,
|
|
212
|
-
async setPdf(t) {
|
|
213
|
-
t && (this.loading = !0, this.pdfLoadingTask = this.createLoadingTask(t), this.$nextTick(() => {
|
|
214
|
-
this.pdfLoadingTask.then((e) => {
|
|
215
|
-
this.loading = !1, this.numPages = e.numPages, this.$emit("numPages", e.numPages), this.$emit("rendered"), d.remove(this._uid);
|
|
216
|
-
});
|
|
217
|
-
}));
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
var S = function() {
|
|
222
|
-
var e = this, i = e._self._c;
|
|
223
|
-
return i("div", { key: e.src }, [e.isPdf ? i("pre", [e._v(" ClingPDFReplaceStart:[" + e._s(e.docFilePath) + `]ClingPDFReplaceEnd
|
|
224
|
-
`), i("div", [e._v("This page should have been replaced with URL: " + e._s(e.src))]), e._v(`
|
|
225
|
-
`)]) : i("div", [e.loading ? i("div", { staticClass: "mb-4 grid aspect-[210/297] place-items-center border border-gray-100 bg-gray-50" }, [i("CIcon", { staticClass: "animate-spin text-gray-400", attrs: { type: "loader", size: "28" } })], 1) : e._e(), e._l(e.numPages, function(s) {
|
|
226
|
-
return i("VuePdf", e._b({ key: s, ref: "vuePdf", refInFor: !0, attrs: { page: s, "container-class": e.isPdf ? "" : "mb-4 shadow-[0_2px_4px_hsla(0,0%,0%,0.25)]" }, on: { "hook:created": function(r) {
|
|
227
|
-
return e.pdfRenderBus.add(`${e._uid}-${s}`);
|
|
228
|
-
}, loading: (r) => r ? null : e.pdfRenderBus.remove(`${e._uid}-${s}`) } }, "VuePdf", {
|
|
229
|
-
...e.$attrs,
|
|
230
|
-
...e.$props,
|
|
231
|
-
pdfLoadingTask: e.pdfLoadingTask
|
|
232
|
-
}, !1), [e._t("loading", function() {
|
|
233
|
-
return [i("div", { staticClass: "mb-4 grid aspect-[210/297] place-items-center border border-gray-100 bg-gray-50", attrs: { slot: "loading" }, slot: "loading" }, [i("CIcon", { staticClass: "animate-spin text-gray-400", attrs: { type: "loader", size: "28" } })], 1)];
|
|
234
|
-
})], 2);
|
|
235
|
-
})], 2)]);
|
|
236
|
-
}, b = [], F = /* @__PURE__ */ u(
|
|
237
|
-
k,
|
|
238
|
-
S,
|
|
239
|
-
b,
|
|
240
|
-
!1,
|
|
241
|
-
null,
|
|
242
|
-
null
|
|
243
|
-
);
|
|
244
|
-
const j = F.exports;
|
|
245
|
-
export {
|
|
246
|
-
j as V
|
|
247
|
-
};
|
package/dist/dom-CPYqHOIw.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
const l = {}, f = {};
|
|
2
|
-
function m(t) {
|
|
3
|
-
if (f[t])
|
|
4
|
-
return;
|
|
5
|
-
if (l[t])
|
|
6
|
-
return l[t];
|
|
7
|
-
const o = new Promise((n, e) => {
|
|
8
|
-
const s = document.createElement("script"), i = window.setTimeout(() => {
|
|
9
|
-
l[t] = null, e(new Error(`Failed to load ${t} in 20s`));
|
|
10
|
-
}, 2e4);
|
|
11
|
-
s.onload = () => {
|
|
12
|
-
i && window.clearTimeout(i), f[t] = !0, l[t] = null, n();
|
|
13
|
-
}, s.onerror = (a) => {
|
|
14
|
-
i && window.clearTimeout(i), l[t] = null, e(a);
|
|
15
|
-
}, s.src = t, document.body.appendChild(s);
|
|
16
|
-
});
|
|
17
|
-
return l[t] = o, o;
|
|
18
|
-
}
|
|
19
|
-
function w(t) {
|
|
20
|
-
const o = t.getBoundingClientRect(), n = window.innerHeight || document.documentElement.clientHeight, e = window.innerWidth || document.documentElement.clientWidth, s = o.top <= n && o.top + o.height >= 0, i = o.left <= e && o.left + o.width >= 0;
|
|
21
|
-
return s && i;
|
|
22
|
-
}
|
|
23
|
-
const u = (t) => {
|
|
24
|
-
const o = /(auto|scroll)/, n = (r, c) => r.parentNode === null ? c : n(r.parentNode, c.concat([r])), e = (r, c) => getComputedStyle(r, null).getPropertyValue(c), s = (r) => e(r, "overflow") + e(r, "overflow-y") + e(r, "overflow-x"), i = (r) => o.test(s(r));
|
|
25
|
-
return ((r) => {
|
|
26
|
-
if (!(r instanceof HTMLElement || r instanceof SVGElement))
|
|
27
|
-
return null;
|
|
28
|
-
const c = n(r.parentNode, []);
|
|
29
|
-
for (let d = 0; d < c.length; d += 1)
|
|
30
|
-
if (i(c[d]))
|
|
31
|
-
return c[d];
|
|
32
|
-
return document.scrollingElement || document.documentElement;
|
|
33
|
-
})(t);
|
|
34
|
-
}, p = (t) => {
|
|
35
|
-
let o = 0;
|
|
36
|
-
for (; t; )
|
|
37
|
-
o += t.offsetTop, t = t.offsetParent;
|
|
38
|
-
return o;
|
|
39
|
-
};
|
|
40
|
-
function h(t, o) {
|
|
41
|
-
let n = t;
|
|
42
|
-
typeof n == "string" && (n = document.querySelector(n));
|
|
43
|
-
const e = {
|
|
44
|
-
offset: 0,
|
|
45
|
-
behavior: "smooth",
|
|
46
|
-
body: u(n),
|
|
47
|
-
// custom option used for choosing parent scroll element
|
|
48
|
-
...o
|
|
49
|
-
}, s = p(n);
|
|
50
|
-
HTMLElement.prototype.scrollTo ? e.body.scrollTo({
|
|
51
|
-
behavior: e.behavior,
|
|
52
|
-
top: s - e.offset
|
|
53
|
-
}) : e.body.scrollTop = s - e.offset;
|
|
54
|
-
}
|
|
55
|
-
const g = (t) => {
|
|
56
|
-
var e;
|
|
57
|
-
const o = (e = t == null ? void 0 : t.getRootNode) == null ? void 0 : e.call(t), n = (o == null ? void 0 : o.toString()) === "[object ShadowRoot]";
|
|
58
|
-
return {
|
|
59
|
-
isShadow: n,
|
|
60
|
-
el: n ? o : document
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
export {
|
|
64
|
-
u as a,
|
|
65
|
-
m as e,
|
|
66
|
-
g,
|
|
67
|
-
w as i,
|
|
68
|
-
h as s
|
|
69
|
-
};
|