Enhancement: angular 19 (#8584)

This commit is contained in:
shamoon
2025-01-01 22:26:53 -08:00
committed by GitHub
parent 75de53eb83
commit f89b6281da
209 changed files with 6147 additions and 4098 deletions

View File

@@ -7,13 +7,9 @@ import {
} from '@angular/common/http'
import { provideHttpClientTesting } from '@angular/common/http/testing'
import { By } from '@angular/platform-browser'
import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'
import { PdfViewerModule } from 'ng2-pdf-viewer'
import { allIcons, NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
import { of, throwError } from 'rxjs'
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe'
import { SafeUrlPipe } from 'src/app/pipes/safeurl.pipe'
import { DocumentService } from 'src/app/services/rest/document.service'
import { SettingsService } from 'src/app/services/settings.service'
import { PreviewPopupComponent } from './preview-popup.component'
@@ -36,12 +32,7 @@ describe('PreviewPopupComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [PreviewPopupComponent, SafeUrlPipe, DocumentTitlePipe],
imports: [
NgxBootstrapIconsModule.pick(allIcons),
PdfViewerModule,
NgbPopoverModule,
],
imports: [NgxBootstrapIconsModule.pick(allIcons)],
providers: [
provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),

View File

@@ -1,9 +1,13 @@
import { HttpClient } from '@angular/common/http'
import { Component, Input, OnDestroy, ViewChild } from '@angular/core'
import { NgbPopover } from '@ng-bootstrap/ng-bootstrap'
import { NgbPopover, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'
import { PdfViewerModule } from 'ng2-pdf-viewer'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
import { first, Subject, takeUntil } from 'rxjs'
import { Document } from 'src/app/data/document'
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe'
import { SafeUrlPipe } from 'src/app/pipes/safeurl.pipe'
import { DocumentService } from 'src/app/services/rest/document.service'
import { SettingsService } from 'src/app/services/settings.service'
@@ -11,6 +15,13 @@ import { SettingsService } from 'src/app/services/settings.service'
selector: 'pngx-preview-popup',
templateUrl: './preview-popup.component.html',
styleUrls: ['./preview-popup.component.scss'],
imports: [
NgbPopoverModule,
DocumentTitlePipe,
PdfViewerModule,
SafeUrlPipe,
NgxBootstrapIconsModule,
],
})
export class PreviewPopupComponent implements OnDestroy {
private _document: Document