@cling-se/widget 0.14.4 → 0.14.6
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-C7abPZ87.js +46 -0
- package/dist/AnswerModal-CsA2pl2P.js +3874 -0
- package/dist/AttachmentItem-Da1-7xwf.js +78 -0
- package/dist/BaseDatePicker-k9zlSi5J.js +3183 -0
- package/dist/BaseUpload-BUrXX3fT.js +1977 -0
- package/dist/BlockMedia-CYI07qAn.js +76 -0
- package/dist/CCallout-Qwae66vo.js +59 -0
- package/dist/CCurrencyDropdown-Y_u0hgBx.js +246 -0
- package/dist/CDropdownItem-CXJ4xD8W.js +538 -0
- package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +1 -0
- package/dist/CFormField--m3PvQuT.js +241 -0
- package/dist/CPhoneFormat-Qg6MkDVP.js +62 -0
- package/dist/CPriceInput-Dlx44UrR.js +112 -0
- package/dist/CTabs.vue_vue_type_style_index_0_scoped_b7262014_lang-l0sNRNKZ.js +1 -0
- package/dist/ClientAutocomplete-BKKc_br6.js +78 -0
- package/dist/ClientModal-CVZFb1Br.js +625 -0
- package/dist/ColorPicker-Bo3s3Esp.js +2879 -0
- package/dist/CompanyModal-DadjAioS.js +141 -0
- package/dist/ContentWrapper-BC3ZBQW9.js +183 -0
- package/dist/CoverBlockSettings-B484eE4g.js +275 -0
- package/dist/DocAnswer-CcYryOWI.js +36 -0
- package/dist/DocDetails-BigsoEWL.js +246 -0
- package/dist/DocForm-DlN0eNWt.js +7273 -0
- package/dist/DocFormSend-TqKo210I.js +143 -0
- package/dist/DocLinks-DSo54vDn.js +38 -0
- package/dist/DocModalBase-XlM1SThW.js +28 -0
- package/dist/DocPrint-tD0Vd9Sw.js +240 -0
- package/dist/DocReceipt-CDHPrhXM.js +210 -0
- package/dist/DocSendReminder-C62RhltH.js +137 -0
- package/dist/DocTextEditor-VjhV9IRp.js +17181 -0
- package/dist/DocTimeline-LcW4z3nC.js +481 -0
- package/dist/DocumentClient-CqbTRdpB.js +136 -0
- package/dist/DocumentLayout-Dbf8_01r.js +4909 -0
- package/dist/DocumentLogotype-DXYnBedV.js +87 -0
- package/dist/DocumentVoided-vH1Ti5lZ.js +25 -0
- package/dist/EmbedInput-D9qP8OnY.js +113 -0
- package/dist/EmbedSettings-DISuNqJT.js +72 -0
- package/dist/ErrorCallout-CCtCVwSh.js +28 -0
- package/dist/FilePreviewModal-BjhNyb6L.js +81 -0
- package/dist/Flag-Dhukv9_J.js +114 -0
- package/dist/HeaderSettings-CK4SkB1x.js +392 -0
- package/dist/ImageSelectModal-DnvPZzXx.js +84 -0
- package/dist/ImageUploadWrapper-B7cNMu5a.js +1604 -0
- package/dist/Index-B3HoK_cZ.js +84 -0
- package/dist/Index-B3aucNji.js +25 -0
- package/dist/Index-B9H5MMHb.js +62 -0
- package/dist/Index-BAYdvT-t.js +754 -0
- package/dist/Index-BLeQprjq.js +46 -0
- package/dist/Index-BOyvQlng.js +154 -0
- package/dist/Index-BVsw2tak.js +70 -0
- package/dist/Index-BY1UKGEO.js +98 -0
- package/dist/Index-Bh0kMSsA.js +107 -0
- package/dist/Index-BlQSM7tC.js +144 -0
- package/dist/Index-BpcJBGGd.js +642 -0
- package/dist/Index-Bs8wprXw.js +58 -0
- package/dist/Index-BvZZAvFd.js +21 -0
- package/dist/Index-CFo-3Y5Q.js +26 -0
- package/dist/Index-CNvp5K3L.js +559 -0
- package/dist/Index-CPJVx14x.js +171 -0
- package/dist/Index-CQ325eVT.js +140 -0
- package/dist/Index-CWrDtcfT.js +49 -0
- package/dist/Index-CyJnSvDR.js +223 -0
- package/dist/Index-D6bc7lg4.js +52 -0
- package/dist/Index-DCR8ev4U.js +33 -0
- package/dist/Index-DGQSB9cH.js +24 -0
- package/dist/Index-DXAvlq74.js +292 -0
- package/dist/Index-D_rfst8y.js +45 -0
- package/dist/Index-Dm8xMFGg.js +61 -0
- package/dist/Index-DtSSgtxB.js +55 -0
- package/dist/Index-DuTw9vhb.js +77 -0
- package/dist/Index-Dw26jtGV.js +31 -0
- package/dist/Index-OxN73_fO.js +32 -0
- package/dist/Index-S-FHG7_k.js +2402 -0
- package/dist/Index-ZFkitzfq.js +69 -0
- package/dist/Index-dyWK9jgr.js +25 -0
- package/dist/Index-gb11ngPS.js +57 -0
- package/dist/Index-lKk_XKJ3.js +150 -0
- package/dist/InputToggleRow-DSSvhPKA.js +57 -0
- package/dist/ManualPopover-lpJYSkw5.js +58 -0
- package/dist/MediaWrapper-BQ22FA2B.js +23 -0
- package/dist/NotBindingText-JxwzZLPP.js +32 -0
- package/dist/PackageGroup-BLSMSUDz.js +699 -0
- package/dist/PdfTerms-DtutjM5Y.js +36 -0
- package/dist/PdfViewer-BsxcZI_x.js +374 -0
- package/dist/PlainHtml-BMPZs2fT.js +20 -0
- package/dist/PriceHeader-BRYY01H2.js +339 -0
- package/dist/SearchApi-6001iFxU.js +161 -0
- package/dist/Setup-cw6jMI9M.js +50 -0
- package/dist/SmartList-q6H-uLbm.js +83 -0
- package/dist/TermsSettings-DWvaPneu.js +102 -0
- package/dist/ThemeColorRow-BXWnvfz-.js +67 -0
- package/dist/ToggleBinding-DydtwpNG.js +38 -0
- package/dist/UploadModal-D_EDKHGD.js +95 -0
- package/dist/VideoPlayerInput-B9yzUeBW.js +93 -0
- package/dist/VideoPlayerSettings-Bvp9l0yj.js +61 -0
- package/dist/VideoSelectModal-DY3N4JiS.js +100 -0
- package/dist/anime.es-BrPTThYb.js +858 -0
- package/dist/answerDocumentMixin-BYZPU_R-.js +51 -0
- package/dist/color-TdtKxwVa.js +19 -0
- package/dist/debounce-BPnlzNwd.js +84 -0
- package/dist/dom-CJxkno7i.js +91 -0
- package/dist/favicon.ico +0 -0
- package/dist/focusDrawerMixin-DC9Oa1i7.js +22 -0
- package/dist/formComponentsInstall-CEW6TK6z.js +2499 -0
- package/dist/formDrawerState-CAzvSMiQ.js +20 -0
- package/dist/formValidationMixin-D7zXxCpC.js +49 -0
- package/dist/i18nMessages-Chz_lxGG.js +17 -0
- package/dist/index-B9WDC3Xe.js +166 -0
- package/dist/index-BCMaUC5r.js +3916 -0
- package/dist/index-BDMI4NVY.js +492 -0
- package/dist/index-BbscgdRg.js +81 -0
- package/dist/index-CLUljEDI.js +347 -0
- package/dist/index-SxyZvewN.js +102 -0
- package/dist/index.es.js +35 -0
- package/dist/index.umd.js +3148 -0
- package/dist/main-CQBEuZk9.js +56739 -0
- package/dist/mapFormMixin-DlFcgwhm.js +72 -0
- package/dist/omit-BWy0Zhd3.js +31 -0
- package/dist/publicSenderState-CvOcFv2U.js +21 -0
- package/dist/splitpanes-BHUVsCZF.js +382 -0
- package/dist/style.css +4 -0
- package/dist/throttle-BrC8eGjQ.js +18 -0
- package/dist/tinycolor-PhFP695w.js +633 -0
- package/dist/tippy.esm-7dmKOUvu.js +1799 -0
- package/dist/utils-NBLgNGHR.js +108 -0
- package/dist/vuedraggable.umd-ByfH7ZxC.js +3161 -0
- package/dist/vuex.esm-DKGl8mcw.js +467 -0
- package/package.json +1 -1
- package/vite.config.ts +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { V as s } from "./PdfViewer-BsxcZI_x.js";
|
|
2
|
+
import { n as t } from "./main-CQBEuZk9.js";
|
|
3
|
+
const n = {
|
|
4
|
+
name: "PdfTerms",
|
|
5
|
+
functional: !0,
|
|
6
|
+
render(r, e) {
|
|
7
|
+
return e.props.text ? r("div", {
|
|
8
|
+
class: "root"
|
|
9
|
+
}, [r("div", {
|
|
10
|
+
class: "root-title page-break"
|
|
11
|
+
}, [e.parent.$t("_common:terms.general")]), r("div", {
|
|
12
|
+
class: "term-text quill-format",
|
|
13
|
+
domProps: {
|
|
14
|
+
innerHTML: e.props.text
|
|
15
|
+
}
|
|
16
|
+
})]) : e.props.file ? r("div", [r(s, {
|
|
17
|
+
attrs: {
|
|
18
|
+
src: e.props.file.url,
|
|
19
|
+
docFilePath: "data.terms.file.url"
|
|
20
|
+
},
|
|
21
|
+
class: "pdf-container"
|
|
22
|
+
})]) : r("div");
|
|
23
|
+
}
|
|
24
|
+
}, o = null, a = null;
|
|
25
|
+
var l = /* @__PURE__ */ t(
|
|
26
|
+
n,
|
|
27
|
+
o,
|
|
28
|
+
a,
|
|
29
|
+
!1,
|
|
30
|
+
null,
|
|
31
|
+
"ffb19c48"
|
|
32
|
+
);
|
|
33
|
+
const m = l.exports;
|
|
34
|
+
export {
|
|
35
|
+
m as default
|
|
36
|
+
};
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import { n as l, c as n, O as g } from "./main-CQBEuZk9.js";
|
|
2
|
+
import { e as d } from "./dom-CJxkno7i.js";
|
|
3
|
+
import { W as m } from "./DocumentLayout-Dbf8_01r.js";
|
|
4
|
+
import { w as h } from "./CDropdownItem-CXJ4xD8W.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__ */ l(
|
|
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__ */ l(
|
|
216
|
+
k,
|
|
217
|
+
x,
|
|
218
|
+
C,
|
|
219
|
+
!1,
|
|
220
|
+
null,
|
|
221
|
+
"b2c8c8be"
|
|
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 d(
|
|
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 d(
|
|
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__ */ l(
|
|
364
|
+
S,
|
|
365
|
+
F,
|
|
366
|
+
T,
|
|
367
|
+
!1,
|
|
368
|
+
null,
|
|
369
|
+
"60063ac5"
|
|
370
|
+
);
|
|
371
|
+
const N = D.exports;
|
|
372
|
+
export {
|
|
373
|
+
N as V
|
|
374
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { n as r } from "./main-CQBEuZk9.js";
|
|
2
|
+
const e = {
|
|
3
|
+
name: "PlainHtml"
|
|
4
|
+
};
|
|
5
|
+
var o = function(t, n) {
|
|
6
|
+
return t("div", { staticClass: "quill-format" }, [n._t("default", function() {
|
|
7
|
+
return [t("div", { domProps: { innerHTML: n._s(n.props.content) } })];
|
|
8
|
+
})], 2);
|
|
9
|
+
}, s = [], a = /* @__PURE__ */ r(
|
|
10
|
+
e,
|
|
11
|
+
o,
|
|
12
|
+
s,
|
|
13
|
+
!0,
|
|
14
|
+
null,
|
|
15
|
+
null
|
|
16
|
+
);
|
|
17
|
+
const c = a.exports;
|
|
18
|
+
export {
|
|
19
|
+
c as P
|
|
20
|
+
};
|