@social-mail/social-mail-client 1.2.459 → 1.2.461
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/content/preview/pdf/preview-pdf.html +17 -0
- package/dist/admin/AdminAppIndex.pack.js +27 -463
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +10 -136
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/public/preview/pdf/PreviewPDF.d.ts +17 -0
- package/dist/public/preview/pdf/PreviewPDF.d.ts.map +1 -0
- package/dist/public/preview/pdf/PreviewPDF.js +457 -0
- package/dist/public/preview/pdf/PreviewPDF.js.map +1 -0
- package/dist/public/preview/pdf/PreviewPDF.pack.js +13967 -0
- package/dist/public/preview/pdf/PreviewPDF.pack.js.map +1 -0
- package/dist/public/preview/pdf/PreviewPDF.pack.min.js +581 -0
- package/dist/public/preview/pdf/PreviewPDF.pack.min.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +27 -463
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +10 -136
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/dist/web/page/files/preview/document/PreviewPDF.d.ts +0 -12
- package/dist/web/page/files/preview/document/PreviewPDF.d.ts.map +1 -1
- package/dist/web/page/files/preview/document/PreviewPDF.js +26 -415
- package/dist/web/page/files/preview/document/PreviewPDF.js.map +1 -1
- package/package.json +1 -1
- package/src/public/preview/pdf/PreviewPDF.tsx +448 -0
- package/src/web/page/files/preview/document/PreviewPDF.tsx +23 -409
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { ContentPage } from "@web-atoms/web-controls/dist/mobile-app/MobileApp";
|
|
2
2
|
import { IAppFile } from "../../../../../model/model";
|
|
3
3
|
export default class PreviewDocument extends ContentPage<Partial<IAppFile>> {
|
|
4
|
-
observer: IntersectionObserver;
|
|
5
|
-
scale: number;
|
|
6
|
-
viewer: HTMLElement;
|
|
7
|
-
preview: HTMLElement;
|
|
8
|
-
firstPage: any;
|
|
9
|
-
password: string;
|
|
10
4
|
init(): Promise<void>;
|
|
11
|
-
updateEntries(entries: IntersectionObserverEntry[]): void;
|
|
12
|
-
changeScale(a: number): void;
|
|
13
|
-
updatePages(): void;
|
|
14
|
-
focusPage(page: any): void;
|
|
15
|
-
queueRenderPage(pageElement: HTMLElement): void;
|
|
16
|
-
renderPage(pageElement: HTMLElement): Promise<void>;
|
|
17
5
|
}
|
|
18
6
|
//# sourceMappingURL=PreviewPDF.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreviewPDF.d.ts","sourceRoot":"","sources":["../../../../../../src/web/page/files/preview/document/PreviewPDF.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PreviewPDF.d.ts","sourceRoot":"","sources":["../../../../../../src/web/page/files/preview/document/PreviewPDF.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAIhF,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AActD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEjE,IAAI;CAiBb"}
|
|
@@ -1,439 +1,50 @@
|
|
|
1
|
-
System.register(["tslib", "@web-atoms/
|
|
1
|
+
System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/style/styled", "@web-atoms/web-controls/dist/mobile-app/MobileApp"], function (_export, _context) {
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var __awaiter,
|
|
4
|
+
var __awaiter, XNode, styled, ContentPage, PreviewDocument, css;
|
|
5
5
|
_export("default", void 0);
|
|
6
6
|
return {
|
|
7
7
|
setters: [function (_tslib) {
|
|
8
8
|
__awaiter = _tslib.__awaiter;
|
|
9
|
-
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
10
|
-
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
11
9
|
}, function (_webAtomsCoreDistCoreXNode) {
|
|
12
10
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
13
|
-
}, function (_commonControlsButtonsIconButton) {
|
|
14
|
-
IconButton = _commonControlsButtonsIconButton.IconButton;
|
|
15
11
|
}, function (_webAtomsCoreDistStyleStyled) {
|
|
16
12
|
styled = _webAtomsCoreDistStyleStyled.default;
|
|
17
|
-
}, function (
|
|
18
|
-
|
|
19
|
-
}, function (_commonModules) {
|
|
20
|
-
Modules = _commonModules.default;
|
|
21
|
-
}, function (_webAtomsCoreDistApp) {
|
|
22
|
-
App = _webAtomsCoreDistApp.App;
|
|
23
|
-
}, function (_webAtomsWebControlsDistBasicForm) {
|
|
24
|
-
Form = _webAtomsWebControlsDistBasicForm.default;
|
|
25
|
-
}, function (_webAtomsWebControlsDistBasicFormField) {
|
|
26
|
-
FormField = _webAtomsWebControlsDistBasicFormField.default;
|
|
27
|
-
}, function (_webAtomsWebControlsDistBasicPasswordBox) {
|
|
28
|
-
PasswordBox = _webAtomsWebControlsDistBasicPasswordBox.default;
|
|
29
|
-
}, function (_commonFileUrl) {
|
|
30
|
-
fileUrl = _commonFileUrl.fileUrl;
|
|
13
|
+
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
14
|
+
ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
|
|
31
15
|
}],
|
|
32
16
|
execute: function () {
|
|
33
|
-
styled.css`
|
|
34
|
-
|
|
35
|
-
width: 100%;
|
|
36
|
-
height: 100%;
|
|
37
|
-
grid-template-columns:auto 1fr auto;
|
|
38
|
-
grid-template-rows: auto 1fr auto auto;
|
|
39
|
-
overflow: hidden;
|
|
40
|
-
background: gray;
|
|
41
|
-
|
|
42
|
-
position: absolute;
|
|
43
|
-
left: 0;
|
|
44
|
-
top: 0;
|
|
45
|
-
right: 0;
|
|
46
|
-
bottom: 0;
|
|
47
|
-
|
|
48
|
-
& pdf-page {
|
|
49
|
-
display: inline-block;
|
|
50
|
-
padding: 10px;
|
|
51
|
-
position: relative;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
& > .title {
|
|
17
|
+
css = styled.css`
|
|
18
|
+
& iframe {
|
|
55
19
|
position: absolute;
|
|
56
|
-
left:
|
|
57
|
-
top:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
grid-row: 2;
|
|
63
|
-
grid-column: 1;
|
|
64
|
-
display: flex;
|
|
65
|
-
flex-direction: column;
|
|
66
|
-
overflow-x: hidden;
|
|
67
|
-
overflow-y: auto;
|
|
68
|
-
gap: 10px;
|
|
69
|
-
& > * {
|
|
70
|
-
cursor: pointer;
|
|
71
|
-
padding: 10px;
|
|
72
|
-
& > canvas {
|
|
73
|
-
object-fit: contain;
|
|
74
|
-
max-height: 30vh;
|
|
75
|
-
max-width: 20vw;
|
|
76
|
-
}
|
|
77
|
-
&:hover {
|
|
78
|
-
background: highlight;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
& > .viewer {
|
|
84
|
-
grid-row: 2;
|
|
85
|
-
grid-column: 2;
|
|
86
|
-
overflow: auto;
|
|
87
|
-
gap: 10px;
|
|
88
|
-
display: flex;
|
|
89
|
-
flex-direction: column;
|
|
90
|
-
justify-content: start;
|
|
91
|
-
align-items: center;
|
|
92
|
-
&[align-left=true] {
|
|
93
|
-
align-items: start;
|
|
94
|
-
}
|
|
95
|
-
& > * {
|
|
96
|
-
padding: 10px;
|
|
97
|
-
position: relative;
|
|
98
|
-
& > canvas {
|
|
99
|
-
position: absolute;
|
|
100
|
-
left: 10px;
|
|
101
|
-
top: 10px;
|
|
102
|
-
}
|
|
103
|
-
& > * {
|
|
104
|
-
left: 10px;
|
|
105
|
-
top: 10px;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
& > .toolbar {
|
|
111
|
-
grid-column: 1 / span 3;
|
|
112
|
-
grid-row: 1;
|
|
113
|
-
display: flex;
|
|
114
|
-
flex-direction: row;
|
|
115
|
-
gap: 10px;
|
|
116
|
-
background-color: lightgray;
|
|
117
|
-
|
|
118
|
-
& > * {
|
|
119
|
-
flex: 1 1 33%;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
& > .left {
|
|
123
|
-
margin-right: auto;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
& > .middle {
|
|
127
|
-
margin-left: auto;
|
|
128
|
-
margin-right: auto;
|
|
129
|
-
display: flex;
|
|
130
|
-
flex-direction: row;
|
|
131
|
-
align-items: center;
|
|
132
|
-
gap: 5px;
|
|
133
|
-
justify-content: center;
|
|
134
|
-
& > i {
|
|
135
|
-
padding: 5px;
|
|
136
|
-
cursor: pointer;
|
|
137
|
-
}
|
|
138
|
-
& > input {
|
|
139
|
-
max-width: 50px;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
& > .right {
|
|
144
|
-
display: flex;
|
|
145
|
-
margin-left: auto;
|
|
146
|
-
align-items: center;
|
|
147
|
-
justify-content: end;
|
|
148
|
-
margin-right: 10px;
|
|
149
|
-
gap: 5px;
|
|
150
|
-
& > * {
|
|
151
|
-
cursor: pointer;
|
|
152
|
-
padding: 5px;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
20
|
+
left: 0;
|
|
21
|
+
top: 0;
|
|
22
|
+
right: 0;
|
|
23
|
+
bottom: 0;
|
|
24
|
+
border: none;
|
|
25
|
+
outline: none;
|
|
155
26
|
}
|
|
156
|
-
|
|
157
|
-
@media (max-width: 500px) {
|
|
158
|
-
& > .preview {
|
|
159
|
-
grid-row: 3;
|
|
160
|
-
grid-column: 2 / span 2;
|
|
161
|
-
max-height: 30vh;
|
|
162
|
-
flex-direction: row;
|
|
163
|
-
flex-wrap: nowrap;
|
|
164
|
-
overflow-x: auto;
|
|
165
|
-
overflow-y: hidden;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
`.installGlobal("div > .pdf-frame");
|
|
170
|
-
installStyleSheet = () => {
|
|
171
|
-
App.installStyleSheet("https://cdn.jsdelivr.net/npm/pdfjs-dist@4.4.168/web/pdf_viewer.css");
|
|
172
|
-
installStyleSheet = null;
|
|
173
|
-
};
|
|
27
|
+
`.installLocal();
|
|
174
28
|
_export("default", PreviewDocument = class PreviewDocument extends ContentPage {
|
|
175
|
-
constructor() {
|
|
176
|
-
super(...arguments);
|
|
177
|
-
this.scale = 1;
|
|
178
|
-
this.password = "";
|
|
179
|
-
}
|
|
180
29
|
init() {
|
|
181
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
182
|
-
installStyleSheet === null || installStyleSheet === void 0 ? void 0 : installStyleSheet();
|
|
183
31
|
const {
|
|
184
|
-
name
|
|
32
|
+
name,
|
|
33
|
+
fileContentID,
|
|
34
|
+
appFileID
|
|
185
35
|
} = this.parameters;
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
36
|
+
const q = new URLSearchParams({
|
|
37
|
+
name,
|
|
38
|
+
fileContentID,
|
|
39
|
+
appFileID
|
|
189
40
|
});
|
|
190
|
-
const
|
|
41
|
+
const url = `/social-mail/ui/dist/public/preview/pdf/PreviewPDF?${q.toString()}`;
|
|
191
42
|
this.title = name;
|
|
192
|
-
this.
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
});
|
|
198
|
-
yield Modules.import("https://mozilla.github.io/pdf.js/build/pdf.mjs");
|
|
199
|
-
const {
|
|
200
|
-
pdfjsLib
|
|
201
|
-
} = globalThis;
|
|
202
|
-
pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://mozilla.github.io/pdf.js/build/pdf.worker.mjs';
|
|
203
|
-
const loaderTask = pdfjsLib.getDocument(pdf);
|
|
204
|
-
let tries = 0;
|
|
205
|
-
loaderTask.onPassword = (callback, reason) => {
|
|
206
|
-
console.log(reason);
|
|
207
|
-
tries++;
|
|
208
|
-
if (tries > 3) {
|
|
209
|
-
this.renderer = XNode.create("div", null, XNode.create("div", {
|
|
210
|
-
"data-layout": "center-page-900px"
|
|
211
|
-
}, "Failed..."));
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
this.renderer = XNode.create("div", null, XNode.create("div", {
|
|
215
|
-
"data-layout": "center-page-900px"
|
|
216
|
-
}, XNode.create(Form, {
|
|
217
|
-
"event-submit-form": () => {
|
|
218
|
-
const password = this.password;
|
|
219
|
-
this.password = "";
|
|
220
|
-
callback(password);
|
|
221
|
-
}
|
|
222
|
-
}, XNode.create("div", null, XNode.create("h4", {
|
|
223
|
-
text: reason ? "Invalid Password, try again." : "Password is required to view this document."
|
|
224
|
-
})), XNode.create(FormField, {
|
|
225
|
-
label: "Password"
|
|
226
|
-
}, XNode.create(PasswordBox, {
|
|
227
|
-
type: "password",
|
|
228
|
-
autofocus: true,
|
|
229
|
-
value: Bind.twoWaysImmediate(() => this.password)
|
|
230
|
-
})), XNode.create("div", null, XNode.create(IconButton, {
|
|
231
|
-
type: "submit",
|
|
232
|
-
disabled: Bind.oneWay(() => !this.password),
|
|
233
|
-
text: "Open"
|
|
234
|
-
})))));
|
|
235
|
-
};
|
|
236
|
-
const pdfDoc = yield loaderTask.promise;
|
|
237
|
-
this.renderer = XNode.create("div", null, XNode.create("div", {
|
|
238
|
-
class: "pdf-frame"
|
|
239
|
-
}, XNode.create("div", {
|
|
240
|
-
class: "preview"
|
|
241
|
-
}), XNode.create("div", {
|
|
242
|
-
class: "viewer"
|
|
243
|
-
}), XNode.create("div", {
|
|
244
|
-
class: "toolbar"
|
|
245
|
-
}, XNode.create("div", {
|
|
246
|
-
class: "left"
|
|
247
|
-
}), XNode.create("div", {
|
|
248
|
-
class: "middle"
|
|
249
|
-
}, XNode.create("i", {
|
|
250
|
-
class: "fas fa-minus",
|
|
251
|
-
"event-click": () => this.changeScale(-0.1)
|
|
252
|
-
}), XNode.create("div", {
|
|
253
|
-
class: "scale",
|
|
254
|
-
text: Bind.oneWay(() => (this.scale * 100).toFixed(0) + "%")
|
|
255
|
-
}), XNode.create("i", {
|
|
256
|
-
class: "fas fa-plus",
|
|
257
|
-
"event-click": () => this.changeScale(0.1)
|
|
258
|
-
})), XNode.create("div", {
|
|
259
|
-
class: "right"
|
|
260
|
-
}, XNode.create("a", {
|
|
261
|
-
href: downloadUrl,
|
|
262
|
-
target: "_blank",
|
|
263
|
-
title: "Download"
|
|
264
|
-
}, XNode.create("i", {
|
|
265
|
-
class: "fas fa-download"
|
|
266
|
-
})), XNode.create("a", {
|
|
267
|
-
href: pdf,
|
|
268
|
-
target: "_blank",
|
|
269
|
-
title: "Print"
|
|
270
|
-
}, XNode.create("i", {
|
|
271
|
-
class: "fas fa-print"
|
|
272
|
-
}))))));
|
|
273
|
-
const viewer = this.viewer = this.element.querySelector(".viewer");
|
|
274
|
-
const preview = this.preview = this.element.querySelector(".preview");
|
|
275
|
-
const firstPage = yield pdfDoc.getPage(1);
|
|
276
|
-
this.firstPage = firstPage;
|
|
277
|
-
const {
|
|
278
|
-
scale
|
|
279
|
-
} = this;
|
|
280
|
-
const viewport = firstPage.getViewport({
|
|
281
|
-
scale
|
|
282
|
-
});
|
|
283
|
-
const previewViewPort = firstPage.getViewport({
|
|
284
|
-
scale: 0.3
|
|
285
|
-
});
|
|
286
|
-
const scaleText = scale.toFixed(2);
|
|
287
|
-
const width = viewport.width + "px";
|
|
288
|
-
const height = viewport.height + "px";
|
|
289
|
-
const previewWidth = previewViewPort.width + "px";
|
|
290
|
-
const previewHeight = previewViewPort.height + "px";
|
|
291
|
-
for (let i = 1; i <= pdfDoc.numPages; i++) {
|
|
292
|
-
const fullView = document.createElement("pdf-page");
|
|
293
|
-
fullView.pdfDoc = pdfDoc;
|
|
294
|
-
fullView.index = i;
|
|
295
|
-
fullView.TextLayer = pdfjsLib.TextLayer;
|
|
296
|
-
fullView.setAttribute("scale", scaleText);
|
|
297
|
-
fullView.style.setProperty("--scale-factor", scaleText);
|
|
298
|
-
fullView.style.minWidth = width;
|
|
299
|
-
fullView.style.minHeight = height;
|
|
300
|
-
viewer.appendChild(fullView);
|
|
301
|
-
this.observer.observe(fullView);
|
|
302
|
-
this.queueRenderPage(fullView);
|
|
303
|
-
const thumbnail = document.createElement("pdf-page");
|
|
304
|
-
thumbnail.pdfDoc = pdfDoc;
|
|
305
|
-
thumbnail.index = i;
|
|
306
|
-
thumbnail.fullView = fullView;
|
|
307
|
-
thumbnail.style.minWidth = previewWidth;
|
|
308
|
-
thumbnail.style.minHeight = previewHeight;
|
|
309
|
-
thumbnail.setAttribute("scale", "0.3");
|
|
310
|
-
thumbnail.setAttribute("preview", "true");
|
|
311
|
-
preview.appendChild(thumbnail);
|
|
312
|
-
this.observer.observe(thumbnail);
|
|
313
|
-
}
|
|
314
|
-
this.bindEvent(this.element, "click", e => {
|
|
315
|
-
let start = e.target;
|
|
316
|
-
while (start) {
|
|
317
|
-
const fullView = start.fullView;
|
|
318
|
-
if (fullView) {
|
|
319
|
-
fullView.scrollIntoView({
|
|
320
|
-
behavior: "smooth",
|
|
321
|
-
block: "nearest"
|
|
322
|
-
});
|
|
323
|
-
return;
|
|
324
|
-
}
|
|
325
|
-
start = start.parentElement;
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
setTimeout(() => this.updatePages(), 100);
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
updateEntries(entries) {
|
|
332
|
-
for (const {
|
|
333
|
-
target,
|
|
334
|
-
isIntersecting
|
|
335
|
-
} of entries) {
|
|
336
|
-
const te = target;
|
|
337
|
-
if (isIntersecting) {
|
|
338
|
-
te.removeAttribute("hidden");
|
|
339
|
-
} else {
|
|
340
|
-
te.setAttribute("hidden", "true");
|
|
341
|
-
}
|
|
342
|
-
this.queueRenderPage(te);
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
changeScale(a) {
|
|
346
|
-
const scale = this.scale += a;
|
|
347
|
-
const viewport = this.firstPage.getViewport({
|
|
348
|
-
scale
|
|
349
|
-
});
|
|
350
|
-
const width = viewport.width + "px";
|
|
351
|
-
const height = viewport.height + "px";
|
|
352
|
-
const scaleText = scale.toFixed(2);
|
|
353
|
-
let page = this.viewer.firstElementChild;
|
|
354
|
-
while (page) {
|
|
355
|
-
page.style.minWidth = width;
|
|
356
|
-
page.style.minHeight = height;
|
|
357
|
-
page.setAttribute("scale", scaleText);
|
|
358
|
-
page = page.nextElementSibling;
|
|
359
|
-
}
|
|
360
|
-
setTimeout(() => this.updatePages(), 100);
|
|
361
|
-
}
|
|
362
|
-
updatePages() {
|
|
363
|
-
let page = this.viewer.firstElementChild;
|
|
364
|
-
while (page) {
|
|
365
|
-
this.queueRenderPage(page);
|
|
366
|
-
page = page.nextElementSibling;
|
|
367
|
-
}
|
|
368
|
-
this.viewer.setAttribute("align-left", this.viewer.scrollWidth > this.viewer.offsetWidth ? "true" : "false");
|
|
369
|
-
}
|
|
370
|
-
focusPage(page) {
|
|
371
|
-
while (page) {
|
|
372
|
-
const {
|
|
373
|
-
fullView
|
|
374
|
-
} = page;
|
|
375
|
-
if (fullView) {
|
|
376
|
-
fullView.scrollIntoView({
|
|
377
|
-
behavior: "smooth",
|
|
378
|
-
block: "nearest"
|
|
379
|
-
});
|
|
380
|
-
return;
|
|
381
|
-
}
|
|
382
|
-
page = page.parentElement;
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
queueRenderPage(pageElement) {
|
|
386
|
-
const {
|
|
387
|
-
lastTimer
|
|
388
|
-
} = pageElement;
|
|
389
|
-
if (lastTimer) {
|
|
390
|
-
clearTimeout(lastTimer);
|
|
391
|
-
}
|
|
392
|
-
pageElement.lastTimer = setTimeout(() => {
|
|
393
|
-
var _a;
|
|
394
|
-
var _b;
|
|
395
|
-
return ((_a = (_b = pageElement).lastPromise) !== null && _a !== void 0 ? _a : _b.lastPromise = this.renderPage(pageElement)).then(() => pageElement.lastPromise = null, console.error);
|
|
396
|
-
}, 100);
|
|
397
|
-
}
|
|
398
|
-
renderPage(pageElement) {
|
|
399
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
400
|
-
pageElement.innerHTML = "";
|
|
401
|
-
if (pageElement.hasAttribute("hidden")) {
|
|
402
|
-
return;
|
|
403
|
-
}
|
|
404
|
-
const canvas = document.createElement("canvas");
|
|
405
|
-
const {
|
|
406
|
-
index,
|
|
407
|
-
pdfDoc,
|
|
408
|
-
TextLayer
|
|
409
|
-
} = pageElement;
|
|
410
|
-
const page = yield pdfDoc.getPage(index);
|
|
411
|
-
const canvasContext = canvas.getContext("2d");
|
|
412
|
-
const scale = Number(pageElement.getAttribute("scale") || "0.5");
|
|
413
|
-
const viewport = page.getViewport({
|
|
414
|
-
scale
|
|
415
|
-
});
|
|
416
|
-
canvas.width = viewport.width;
|
|
417
|
-
canvas.height = viewport.height;
|
|
418
|
-
yield page.render({
|
|
419
|
-
canvasContext,
|
|
420
|
-
viewport
|
|
421
|
-
}).promise;
|
|
422
|
-
pageElement.appendChild(canvas);
|
|
423
|
-
if (!TextLayer) {
|
|
424
|
-
return;
|
|
425
|
-
}
|
|
426
|
-
const textLayerDiv = document.createElement("div");
|
|
427
|
-
textLayerDiv.className = "textLayer";
|
|
428
|
-
textLayerDiv.style.setProperty("--scale-factor", scale.toFixed(2));
|
|
429
|
-
const textContentSource = yield page.streamTextContent();
|
|
430
|
-
const textLayer = new TextLayer({
|
|
431
|
-
textContentSource,
|
|
432
|
-
container: textLayerDiv,
|
|
433
|
-
viewport
|
|
434
|
-
});
|
|
435
|
-
textLayer.render();
|
|
436
|
-
pageElement.appendChild(textLayerDiv);
|
|
43
|
+
this.renderer = XNode.create("div", {
|
|
44
|
+
class: css
|
|
45
|
+
}, XNode.create("iframe", {
|
|
46
|
+
src: url
|
|
47
|
+
}));
|
|
437
48
|
});
|
|
438
49
|
}
|
|
439
50
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PreviewDocument","installStyleSheet","_export","setters","_tslib","ContentPage","_webAtomsWebControlsDistMobileAppMobileApp","_webAtomsCoreDistCoreXNode","XNode","default","_commonControlsButtonsIconButton","IconButton","_webAtomsCoreDistStyleStyled","styled","_webAtomsCoreDistCoreBind","Bind","_commonModules","Modules","_webAtomsCoreDistApp","App","_webAtomsWebControlsDistBasicForm","Form","_webAtomsWebControlsDistBasicFormField","FormField","_webAtomsWebControlsDistBasicPasswordBox","PasswordBox","_commonFileUrl","fileUrl","execute","css","installGlobal","constructor","scale","password","init","name","parameters","pdf","action","ext","downloadUrl","title","observer","IntersectionObserver","entries","updateEntries","root","element","registerDisposable","dispose","disconnect","import","pdfjsLib","globalThis","GlobalWorkerOptions","workerSrc","loaderTask","getDocument","tries","onPassword","callback","reason","console","log","renderer","create","event-submit-form","text","label","type","autofocus","value","twoWaysImmediate","disabled","oneWay","pdfDoc","promise","class","event-click","changeScale","toFixed","href","target","viewer","querySelector","preview","firstPage","getPage","viewport","getViewport","previewViewPort","scaleText","width","height","previewWidth","previewHeight","i","numPages","fullView","document","createElement","index","TextLayer","setAttribute","style","setProperty","minWidth","minHeight","appendChild","observe","queueRenderPage","thumbnail","bindEvent","e","start","scrollIntoView","behavior","block","parentElement","setTimeout","updatePages","isIntersecting","te","removeAttribute","a","page","firstElementChild","nextElementSibling","scrollWidth","offsetWidth","focusPage","pageElement","lastTimer","clearTimeout","_a","_b","lastPromise","renderPage","then","error","innerHTML","hasAttribute","canvas","canvasContext","getContext","Number","getAttribute","render","textLayerDiv","className","textContentSource","streamTextContent","textLayer","container"],"sources":["../../../../../../src/web/page/files/preview/document/PreviewPDF.tsx"],"sourcesContent":[null],"mappings":";;;oHAkKqBA,eAAgB,EAAAC,iBAAA;EAAAC,OAAA;EAAA;IAAAC,OAAA,aAAAC,MAAA;;;MAjK5BC,WAAW,GAAAC,0CAAA,CAAXD,WAAW;IAAA,aAAAE,0BAAA;M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AK,CAAE,CAAC;YAE5C8G,MAAM,CAAClD,KAAK,GAAGJ,QAAQ,CAACI,KAAK;YAC7BkD,MAAM,CAACjD,MAAM,GAAGL,QAAQ,CAACK,MAAM;YAE/B,MAAMgC,IAAI,CAACsB,MAAM,CAAC;cACdJ,aAAa;cACbvD;aACH,CAAC,CAACZ,OAAO;YAEVuD,WAAW,CAACvB,WAAW,CAACkC,MAAM,CAAC;YAE/B,IAAI,CAACxC,SAAS,EAAE;cACZ;;YAGJ,MAAM8C,YAAY,GAAGjD,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;YAClDgD,YAAY,CAACC,SAAS,GAAG,WAAW;YACpCD,YAAY,CAAC5C,KAAK,CAACC,WAAW,CAAC,gBAAgB,EAAEzE,KAAK,CAACgD,OAAO,CAAC,CAAC,CAAC,CAAC;YAClE,MAAMsE,iBAAiB,GAAG,MAAMzB,IAAI,CAAC0B,iBAAiB,EAAE;YAExD,MAAMC,SAAS,GAAG,IAAIlD,SAAS,CAAC;cAC5BgD,iBAAiB;cACjBG,SAAS,EAAEL,YAAY;cACvB5D;aACH,CAAC;YAEFgE,SAAS,CAACL,MAAM,EAAE;YAClBhB,WAAW,CAACvB,WAAW,CAACwC,YAAY,CAAC;UACzC,CAAC;;OAEJ;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["PreviewDocument","css","_export","setters","_tslib","XNode","_webAtomsCoreDistCoreXNode","default","_webAtomsCoreDistStyleStyled","styled","_webAtomsWebControlsDistMobileAppMobileApp","ContentPage","execute","installLocal","init","name","fileContentID","appFileID","parameters","q","URLSearchParams","url","toString","title","renderer","create","class","src"],"sources":["../../../../../../src/web/page/files/preview/document/PreviewPDF.tsx"],"sourcesContent":[null],"mappings":";;;6CAwBqBA,eAAgB,EAAAC,GAAA;EAAAC,OAAA;EAAA;IAAAC,OAAA,aAAAC,MAAA;;;MAvB9BC,KAAK,GAAAC,0BAAA,CAAAC,OAAA;IAAA,aAAAC,4BAAA;MACLC,MAAM,GAAAD,4BAAA,CAAAD,OAAA;IAAA,aAAAG,0CAAA;MAIJC,WAAW,GAAAD,0CAAA,CAAXC,WAAW;IAAA;IAAAC,OAAA,WAAAA,CAAA;MAMdX,GAAG,GAAGQ,MAAM,CAACR,GAAG;;;;;;;;;;CAUrB,CAACY,YAAY,EAAE;MAAAX,OAAA,YAEKF,eAAgB,GAAvB,MAAOA,eAAgB,SAAQW,WAA8B;QAEjEG,IAAIA,CAAA;;YAEN,MAAM;cAAEC,IAAI;cAAEC,aAAa;cAAEC;YAAS,CAAE,GAAG,IAAI,CAACC,UAAiB;YAEjE,MAAMC,CAAC,GAAG,IAAIC,eAAe,CAAC;cAC1BL,IAAI;cACJC,aAAa;cACbC;aACH,CAAC;YAEF,MAAMI,GAAG,GAAG,sDAAsDF,CAAC,CAACG,QAAQ,EAAE,EAAE;YAEhF,IAAI,CAACC,KAAK,GAAGR,IAAI;YACjB,IAAI,CAACS,QAAQ,GAAGnB,KAAA,CAAAoB,MAAA;cAAKC,KAAK,EAAEzB;YAAG,GAC3BI,KAAA,CAAAoB,MAAA;cAAQE,GAAG,EAAEN;YAAG,EAAW,CACzB;UACV,CAAC;;OACJ;IAAA;EAAA;AAAA","ignoreList":[]}
|