@vaadin-component-factory/vcf-pdf-viewer 1.3.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pdfjs/dist/display_utils.js +714 -714
- package/pdfjs/dist/fetch_stream.js +293 -293
- package/pdfjs/dist/l10n_utils.js +122 -122
- package/pdfjs/dist/message_handler.js +524 -524
- package/pdfjs/dist/network.js +552 -552
- package/pdfjs/dist/network_utils.js +309 -309
- package/pdfjs/dist/node_stream.js +481 -481
- package/pdfjs/dist/pdf.js +11687 -11687
- package/pdfjs/dist/pdf_link_service.js +534 -534
- package/pdfjs/dist/pdf_rendering_queue.js +154 -154
- package/pdfjs/dist/pdf_thumbnail_viewer.js +738 -738
- package/pdfjs/dist/pdf_viewer.js +3207 -3207
- package/pdfjs/dist/ui_utils.js +881 -881
- package/pdfjs/dist/util.js +991 -991
- package/pdfjs/dist/worker.js +60846 -60846
- package/src/vcf-pdf-viewer.js +16 -16
- package/theme/lumo/vcf-pdf-viewer-styles.js +2 -2
package/src/vcf-pdf-viewer.js
CHANGED
|
@@ -259,7 +259,7 @@ class PdfViewerElement extends
|
|
|
259
259
|
</div>
|
|
260
260
|
<div id="mainContainer" part="main-container">
|
|
261
261
|
<div id="toolbar" part="toolbar">
|
|
262
|
-
<vaadin-button id="sidebarToggle" part="toolbar-button toolbar-button-toogle-sidebar" theme="icon" on-click="__toogleSidebar">
|
|
262
|
+
<vaadin-button id="sidebarToggle" part="toolbar-button toolbar-button-toogle-sidebar" theme="icon" on-click="__toogleSidebar" aria-label="Sidebar toggle">
|
|
263
263
|
<vaadin-icon part="toggle-button-icon" slot="prefix"></vaadin-icon>
|
|
264
264
|
</vaadin-button>
|
|
265
265
|
<span id="title" part="toolbar-text toolbar-title">{{__title}}</span>
|
|
@@ -283,10 +283,10 @@ class PdfViewerElement extends
|
|
|
283
283
|
<vaadin-text-field id="currentPage" part="toolbar-current-page" value="{{currentPage}}" on-change="__pageChange"></vaadin-text-field>
|
|
284
284
|
<span id="pageSeparator" part="toolbar-text toolbar-page-separator">/</span>
|
|
285
285
|
<span id="totalPages" part="toolbar-text toolbar-total-pages">{{__totalPages}}</span>
|
|
286
|
-
<vaadin-button id="previousPage" part="toolbar-button toolbar-button-previous-page" theme="icon" on-click="__previousPage">
|
|
286
|
+
<vaadin-button id="previousPage" part="toolbar-button toolbar-button-previous-page" theme="icon" on-click="__previousPage" aria-label="Previous page">
|
|
287
287
|
<vaadin-icon part="previous-page-button-icon" slot="prefix"></vaadin-icon>
|
|
288
288
|
</vaadin-button>
|
|
289
|
-
<vaadin-button id="nextPage" part="toolbar-button toolbar-button-next-page" theme="icon" on-click="__nextPage">
|
|
289
|
+
<vaadin-button id="nextPage" part="toolbar-button toolbar-button-next-page" theme="icon" on-click="__nextPage" aria-label="Next page">
|
|
290
290
|
<vaadin-icon part="next-page-button-icon" slot="prefix"></vaadin-icon>
|
|
291
291
|
</vaadin-button>
|
|
292
292
|
</div>
|
|
@@ -307,7 +307,7 @@ class PdfViewerElement extends
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
static get version() {
|
|
310
|
-
return '1.
|
|
310
|
+
return '1.4.1';
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
static get properties() {
|
|
@@ -381,7 +381,7 @@ class PdfViewerElement extends
|
|
|
381
381
|
* Total amount of pages in an opened document
|
|
382
382
|
*/
|
|
383
383
|
__totalPages: Number,
|
|
384
|
-
|
|
384
|
+
|
|
385
385
|
/**
|
|
386
386
|
* Loading state
|
|
387
387
|
*/
|
|
@@ -439,7 +439,7 @@ class PdfViewerElement extends
|
|
|
439
439
|
value: true
|
|
440
440
|
},
|
|
441
441
|
|
|
442
|
-
/**
|
|
442
|
+
/**
|
|
443
443
|
* Allows to hide the zoom dropdown. By default it's always shown.
|
|
444
444
|
*/
|
|
445
445
|
hideZoom: {
|
|
@@ -461,7 +461,7 @@ class PdfViewerElement extends
|
|
|
461
461
|
this.__title = this.customTitle;
|
|
462
462
|
} else if(this.__viewer && this.toolbarOnlyFilename && filename) {
|
|
463
463
|
this.__title = filename;
|
|
464
|
-
} else if (pdfTitle && filename) {
|
|
464
|
+
} else if (pdfTitle && filename) {
|
|
465
465
|
this.__title = pdfTitle + ' - ' + filename;
|
|
466
466
|
} else if (pdfTitle) {
|
|
467
467
|
this.__title = pdfTitle;
|
|
@@ -512,10 +512,10 @@ class PdfViewerElement extends
|
|
|
512
512
|
l10n: l10n,
|
|
513
513
|
renderInteractiveForms: this.renderInteractiveForms
|
|
514
514
|
});
|
|
515
|
-
|
|
515
|
+
|
|
516
516
|
this.__linkService.setViewer(this.__viewer);
|
|
517
517
|
pdfRenderingQueue.setViewer(this.__viewer);
|
|
518
|
-
|
|
518
|
+
|
|
519
519
|
// thumbnailViewer
|
|
520
520
|
this.__thumbnailViewer = new pdfjsThumbnailViewer.PDFThumbnailViewer({
|
|
521
521
|
container: this.$.thumbnailView,
|
|
@@ -525,7 +525,7 @@ class PdfViewerElement extends
|
|
|
525
525
|
l10n: l10n
|
|
526
526
|
})
|
|
527
527
|
|
|
528
|
-
pdfRenderingQueue.setThumbnailViewer(this.__thumbnailViewer);
|
|
528
|
+
pdfRenderingQueue.setThumbnailViewer(this.__thumbnailViewer);
|
|
529
529
|
|
|
530
530
|
// listeners
|
|
531
531
|
eventBus.on('pagesinit', () => {
|
|
@@ -536,7 +536,7 @@ class PdfViewerElement extends
|
|
|
536
536
|
this.__openSidebar();
|
|
537
537
|
} else {
|
|
538
538
|
this.__closeSidebar();
|
|
539
|
-
}
|
|
539
|
+
}
|
|
540
540
|
this.__viewer.currentPage = this.setCurrentPage();
|
|
541
541
|
});
|
|
542
542
|
eventBus.on('pagechanging', (event) => {
|
|
@@ -555,7 +555,7 @@ class PdfViewerElement extends
|
|
|
555
555
|
|
|
556
556
|
connectedCallback() {
|
|
557
557
|
super.connectedCallback();
|
|
558
|
-
this.__recalculateSizes();
|
|
558
|
+
this.__recalculateSizes();
|
|
559
559
|
}
|
|
560
560
|
|
|
561
561
|
__updateCurrentPageValue(pageNumber){
|
|
@@ -732,7 +732,7 @@ class PdfViewerElement extends
|
|
|
732
732
|
}
|
|
733
733
|
|
|
734
734
|
__toogleSidebar() {
|
|
735
|
-
if (this.$.outerContainer.classList.length == 0) {
|
|
735
|
+
if (this.$.outerContainer.classList.length == 0) {
|
|
736
736
|
this.__openSidebar();
|
|
737
737
|
} else {
|
|
738
738
|
this.__closeSidebar();
|
|
@@ -774,7 +774,7 @@ class PdfViewerElement extends
|
|
|
774
774
|
const thumbnailView = this.__thumbnailViewer.getThumbnail(i);
|
|
775
775
|
thumbnailView.anchor.onclick = function () {
|
|
776
776
|
const id = thumbnailView.id;
|
|
777
|
-
thumbnailView.linkService.goToPage(id);
|
|
777
|
+
thumbnailView.linkService.goToPage(id);
|
|
778
778
|
component.dispatchEvent(new CustomEvent('thumbnail-clicked', {
|
|
779
779
|
detail: {
|
|
780
780
|
source: component,
|
|
@@ -783,10 +783,10 @@ class PdfViewerElement extends
|
|
|
783
783
|
}));
|
|
784
784
|
return false;
|
|
785
785
|
};
|
|
786
|
-
}
|
|
786
|
+
}
|
|
787
787
|
if(this.__thumbnailViewer && this.__thumbnailViewer.renderingQueue.isThumbnailViewEnabled){
|
|
788
788
|
this.__thumbnailViewer.scrollThumbnailIntoView(this.currentPage);
|
|
789
|
-
}
|
|
789
|
+
}
|
|
790
790
|
}
|
|
791
791
|
}
|
|
792
792
|
|
|
@@ -16,7 +16,7 @@ registerStyles(
|
|
|
16
16
|
:host {
|
|
17
17
|
background-color: var(--lumo-base-color);
|
|
18
18
|
border: 1px solid var(--lumo-contrast-10pct);
|
|
19
|
-
border-radius: var(--lumo-border-radius);
|
|
19
|
+
border-radius: var(--lumo-border-radius, var(--lumo-border-radius-m));
|
|
20
20
|
font-family: var(--lumo-font-family);
|
|
21
21
|
position: relative;
|
|
22
22
|
}
|
|
@@ -72,7 +72,7 @@ registerStyles(
|
|
|
72
72
|
|
|
73
73
|
[part~="toolbar-button"] {
|
|
74
74
|
height: var(--lumo-size-m);
|
|
75
|
-
border-radius: var(--lumo-border-radius);
|
|
75
|
+
border-radius: var(--lumo-border-radius, var(--lumo-border-radius-m));
|
|
76
76
|
color: var(--lumo-contrast-80pct);
|
|
77
77
|
transition: background-color 100ms, color 100ms;
|
|
78
78
|
margin: var(--lumo-space-xs);
|