Chore: revert pngx pdf viewer to third party package (#6741)

This commit is contained in:
shamoon
2024-05-16 11:12:19 -07:00
committed by GitHub
parent 50a6181e48
commit 019a255753
21 changed files with 40 additions and 1843 deletions

View File

@@ -13,12 +13,12 @@
<div class="input-group-text" i18n>of {{totalPages}}</div>
</div>
<div class="pdf-viewer-container w-100 mt-3">
<pngx-pdf-viewer [src]="pdfSrc" [(page)]="page"
<pdf-viewer [src]="pdfSrc" [(page)]="page"
[original-size]="false"
[zoom]="1"
zoom-scale="page-fit"
(after-load-complete)="pdfPreviewLoaded($event)">
</pngx-pdf-viewer>
</pdf-viewer>
</div>
</div>
<div class="col-4">

View File

@@ -2,7 +2,7 @@
background-color: gray;
height: 350px;
pngx-pdf-viewer {
pdf-viewer {
width: 100%;
height: 100%;
}

View File

@@ -6,7 +6,7 @@ import { ReactiveFormsModule, FormsModule } from '@angular/forms'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons'
import { DocumentService } from 'src/app/services/rest/document.service'
import { PdfViewerComponent } from '../../pdf-viewer/pdf-viewer.component'
import { PdfViewerModule } from 'ng2-pdf-viewer'
describe('SplitConfirmDialogComponent', () => {
let component: SplitConfirmDialogComponent
@@ -15,13 +15,14 @@ describe('SplitConfirmDialogComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [SplitConfirmDialogComponent, PdfViewerComponent],
declarations: [SplitConfirmDialogComponent],
providers: [NgbActiveModal],
imports: [
HttpClientTestingModule,
NgxBootstrapIconsModule.pick(allIcons),
ReactiveFormsModule,
FormsModule,
PdfViewerModule,
],
}).compileComponents()

View File

@@ -2,7 +2,7 @@ import { Component } from '@angular/core'
import { ConfirmDialogComponent } from '../confirm-dialog.component'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { DocumentService } from 'src/app/services/rest/document.service'
import { PDFDocumentProxy } from '../../pdf-viewer/typings'
import { PDFDocumentProxy } from 'ng2-pdf-viewer'
@Component({
selector: 'pngx-split-confirm-dialog',