mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-10 00:18:57 +00:00
Chore: update to Angular 20 (#10273)
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
DragDropModule,
|
||||
moveItemInArray,
|
||||
} from '@angular/cdk/drag-drop'
|
||||
import { Component } from '@angular/core'
|
||||
import { Component, inject } from '@angular/core'
|
||||
import { RouterModule } from '@angular/router'
|
||||
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
|
||||
import { TourNgBootstrapModule, TourService } from 'ngx-ui-tour-ng-bootstrap'
|
||||
@@ -42,13 +42,13 @@ import { WelcomeWidgetComponent } from './widgets/welcome-widget/welcome-widget.
|
||||
],
|
||||
})
|
||||
export class DashboardComponent extends ComponentWithPermissions {
|
||||
settingsService = inject(SettingsService)
|
||||
savedViewService = inject(SavedViewService)
|
||||
private tourService = inject(TourService)
|
||||
private toastService = inject(ToastService)
|
||||
|
||||
public dashboardViews: SavedView[] = []
|
||||
constructor(
|
||||
public settingsService: SettingsService,
|
||||
public savedViewService: SavedViewService,
|
||||
private tourService: TourService,
|
||||
private toastService: ToastService
|
||||
) {
|
||||
constructor() {
|
||||
super()
|
||||
|
||||
this.savedViewService.listAll().subscribe(() => {
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import { AsyncPipe, NgClass, NgStyle } from '@angular/common'
|
||||
import {
|
||||
Component,
|
||||
inject,
|
||||
Input,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
@@ -84,26 +85,22 @@ export class SavedViewWidgetComponent
|
||||
extends LoadingComponentWithPermissions
|
||||
implements OnInit, OnDestroy
|
||||
{
|
||||
private documentService = inject(DocumentService)
|
||||
private router = inject(Router)
|
||||
private list = inject(DocumentListViewService)
|
||||
private websocketStatusService = inject(WebsocketStatusService)
|
||||
openDocumentsService = inject(OpenDocumentsService)
|
||||
documentListViewService = inject(DocumentListViewService)
|
||||
permissionsService = inject(PermissionsService)
|
||||
private settingsService = inject(SettingsService)
|
||||
private customFieldService = inject(CustomFieldsService)
|
||||
|
||||
public DisplayMode = DisplayMode
|
||||
public DisplayField = DisplayField
|
||||
public CustomFieldDataType = CustomFieldDataType
|
||||
|
||||
private customFields: CustomField[] = []
|
||||
|
||||
constructor(
|
||||
private documentService: DocumentService,
|
||||
private router: Router,
|
||||
private list: DocumentListViewService,
|
||||
private websocketStatusService: WebsocketStatusService,
|
||||
public openDocumentsService: OpenDocumentsService,
|
||||
public documentListViewService: DocumentListViewService,
|
||||
public permissionsService: PermissionsService,
|
||||
private settingsService: SettingsService,
|
||||
private customFieldService: CustomFieldsService
|
||||
) {
|
||||
super()
|
||||
}
|
||||
|
||||
@Input()
|
||||
savedView: SavedView
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { DecimalPipe } from '@angular/common'
|
||||
import { HttpClient } from '@angular/common/http'
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core'
|
||||
import { Component, inject, OnDestroy, OnInit } from '@angular/core'
|
||||
import { RouterModule } from '@angular/router'
|
||||
import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'
|
||||
import * as mimeTypeNames from 'mime-names'
|
||||
@@ -51,15 +51,11 @@ export class StatisticsWidgetComponent
|
||||
extends ComponentWithPermissions
|
||||
implements OnInit, OnDestroy
|
||||
{
|
||||
loading: boolean = false
|
||||
private http = inject(HttpClient)
|
||||
private websocketConnectionService = inject(WebsocketStatusService)
|
||||
private documentListViewService = inject(DocumentListViewService)
|
||||
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private websocketConnectionService: WebsocketStatusService,
|
||||
private documentListViewService: DocumentListViewService
|
||||
) {
|
||||
super()
|
||||
}
|
||||
loading: boolean = false
|
||||
|
||||
statistics: Statistics = {}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { NgClass, NgTemplateOutlet } from '@angular/common'
|
||||
import { Component, QueryList, ViewChildren } from '@angular/core'
|
||||
import { Component, QueryList, ViewChildren, inject } from '@angular/core'
|
||||
import { RouterModule } from '@angular/router'
|
||||
import {
|
||||
NgbAlert,
|
||||
@@ -37,15 +37,11 @@ import { WidgetFrameComponent } from '../widget-frame/widget-frame.component'
|
||||
],
|
||||
})
|
||||
export class UploadFileWidgetComponent extends ComponentWithPermissions {
|
||||
@ViewChildren(NgbAlert) alerts: QueryList<NgbAlert>
|
||||
private websocketStatusService = inject(WebsocketStatusService)
|
||||
private uploadDocumentsService = inject(UploadDocumentsService)
|
||||
settingsService = inject(SettingsService)
|
||||
|
||||
constructor(
|
||||
private websocketStatusService: WebsocketStatusService,
|
||||
private uploadDocumentsService: UploadDocumentsService,
|
||||
public settingsService: SettingsService
|
||||
) {
|
||||
super()
|
||||
}
|
||||
@ViewChildren(NgbAlert) alerts: QueryList<NgbAlert>
|
||||
|
||||
getStatus() {
|
||||
return this.websocketStatusService.getConsumerStatus()
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Component, EventEmitter, Output } from '@angular/core'
|
||||
import { Component, EventEmitter, Output, inject } from '@angular/core'
|
||||
import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { TourService } from 'ngx-ui-tour-ng-bootstrap'
|
||||
|
||||
@@ -9,7 +9,7 @@ import { TourService } from 'ngx-ui-tour-ng-bootstrap'
|
||||
imports: [NgbAlertModule],
|
||||
})
|
||||
export class WelcomeWidgetComponent {
|
||||
constructor(public readonly tourService: TourService) {}
|
||||
readonly tourService = inject(TourService)
|
||||
|
||||
@Output()
|
||||
dismiss: EventEmitter<boolean> = new EventEmitter()
|
||||
|
Reference in New Issue
Block a user