Update angular
This commit is contained in:
parent
f89189907b
commit
52798aa5f2
17 changed files with 1012 additions and 854 deletions
|
@ -310,7 +310,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultProject": "PeerTube",
|
|
||||||
"schematics": {
|
"schematics": {
|
||||||
"@schematics/angular:component": {
|
"@schematics/angular:component": {
|
||||||
"prefix": "my",
|
"prefix": "my",
|
||||||
|
|
|
@ -26,25 +26,25 @@
|
||||||
},
|
},
|
||||||
"typings": "*.d.ts",
|
"typings": "*.d.ts",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^15.1.6",
|
"@angular-devkit/build-angular": "^16.0.2",
|
||||||
"@angular-eslint/builder": "^15.2.1",
|
"@angular-eslint/builder": "^16.0.2",
|
||||||
"@angular-eslint/eslint-plugin": "^15.2.1",
|
"@angular-eslint/eslint-plugin": "^16.0.2",
|
||||||
"@angular-eslint/eslint-plugin-template": "^15.2.1",
|
"@angular-eslint/eslint-plugin-template": "^16.0.2",
|
||||||
"@angular-eslint/schematics": "^15.2.1",
|
"@angular-eslint/schematics": "^16.0.2",
|
||||||
"@angular-eslint/template-parser": "^15.2.1",
|
"@angular-eslint/template-parser": "^16.0.2",
|
||||||
"@angular/animations": "^15.1.5",
|
"@angular/animations": "^16.0.2",
|
||||||
"@angular/cdk": "^15.1.4",
|
"@angular/cdk": "^16.0.1",
|
||||||
"@angular/cli": "^15.1.6",
|
"@angular/cli": "^16.0.2",
|
||||||
"@angular/common": "^15.1.5",
|
"@angular/common": "^16.0.2",
|
||||||
"@angular/compiler": "^15.1.5",
|
"@angular/compiler": "^16.0.2",
|
||||||
"@angular/compiler-cli": "^15.1.5",
|
"@angular/compiler-cli": "^16.0.2",
|
||||||
"@angular/core": "^15.1.5",
|
"@angular/core": "^16.0.2",
|
||||||
"@angular/forms": "^15.1.5",
|
"@angular/forms": "^16.0.2",
|
||||||
"@angular/localize": "^15.1.5",
|
"@angular/localize": "^16.0.2",
|
||||||
"@angular/platform-browser": "^15.1.5",
|
"@angular/platform-browser": "^16.0.2",
|
||||||
"@angular/platform-browser-dynamic": "^15.1.5",
|
"@angular/platform-browser-dynamic": "^16.0.2",
|
||||||
"@angular/router": "^15.1.5",
|
"@angular/router": "^16.0.2",
|
||||||
"@angular/service-worker": "^15.1.5",
|
"@angular/service-worker": "^16.0.2",
|
||||||
"@babel/core": "^7.18.5",
|
"@babel/core": "^7.18.5",
|
||||||
"@babel/preset-env": "^7.18.2",
|
"@babel/preset-env": "^7.18.2",
|
||||||
"@ng-bootstrap/ng-bootstrap": "^14.0.1",
|
"@ng-bootstrap/ng-bootstrap": "^14.0.1",
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
"@wdio/shared-store-service": "^7.25.2",
|
"@wdio/shared-store-service": "^7.25.2",
|
||||||
"@wdio/spec-reporter": "^7.25.1",
|
"@wdio/spec-reporter": "^7.25.1",
|
||||||
"angular2-hotkeys": "^13.1.0",
|
"angular2-hotkeys": "^13.1.0",
|
||||||
"angularx-qrcode": "15.0.1",
|
"angularx-qrcode": "16.0.0",
|
||||||
"babel-loader": "^9.1.0",
|
"babel-loader": "^9.1.0",
|
||||||
"bootstrap": "^5.1.3",
|
"bootstrap": "^5.1.3",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
"dexie": "^3.2.2",
|
"dexie": "^3.2.2",
|
||||||
"eslint": "^8.28.0",
|
"eslint": "^8.28.0",
|
||||||
"eslint-plugin-import": "2.27.5",
|
"eslint-plugin-import": "2.27.5",
|
||||||
"eslint-plugin-jsdoc": "^40.0.0",
|
"eslint-plugin-jsdoc": "^44.2.4",
|
||||||
"eslint-plugin-prefer-arrow": "latest",
|
"eslint-plugin-prefer-arrow": "latest",
|
||||||
"expect-webdriverio": "^3.4.0",
|
"expect-webdriverio": "^3.4.0",
|
||||||
"focus-visible": "^5.0.2",
|
"focus-visible": "^5.0.2",
|
||||||
|
@ -109,10 +109,10 @@
|
||||||
"lodash-es": "^4.17.4",
|
"lodash-es": "^4.17.4",
|
||||||
"markdown-it": "13.0.1",
|
"markdown-it": "13.0.1",
|
||||||
"mini-css-extract-plugin": "^2.2.0",
|
"mini-css-extract-plugin": "^2.2.0",
|
||||||
"ngx-uploadx": "^5.1.0",
|
"ngx-uploadx": "^6.1.0",
|
||||||
"path-browserify": "^1.0.0",
|
"path-browserify": "^1.0.0",
|
||||||
"postcss": "^8.4.14",
|
"postcss": "^8.4.14",
|
||||||
"primeng": "^15.2.0",
|
"primeng": "^16.0.0-rc.2",
|
||||||
"process": "^0.11.10",
|
"process": "^0.11.10",
|
||||||
"purify-css": "^1.2.5",
|
"purify-css": "^1.2.5",
|
||||||
"querystring": "^0.2.1",
|
"querystring": "^0.2.1",
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { forkJoin, Observable } from 'rxjs'
|
import { forkJoin, Observable } from 'rxjs'
|
||||||
import { map, switchMap } from 'rxjs/operators'
|
import { map, switchMap } from 'rxjs/operators'
|
||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { Resolve } from '@angular/router'
|
|
||||||
import { ServerService } from '@app/core'
|
import { ServerService } from '@app/core'
|
||||||
import { CustomMarkupService } from '@app/shared/shared-custom-markup'
|
import { CustomMarkupService } from '@app/shared/shared-custom-markup'
|
||||||
import { AboutHTML, InstanceService } from '@app/shared/shared-instance'
|
import { AboutHTML, InstanceService } from '@app/shared/shared-instance'
|
||||||
|
@ -17,7 +16,7 @@ export type ResolverData = {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AboutInstanceResolver implements Resolve<any> {
|
export class AboutInstanceResolver {
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
private instanceService: InstanceService,
|
private instanceService: InstanceService,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Observable } from 'rxjs'
|
import { Observable } from 'rxjs'
|
||||||
import { map } from 'rxjs/operators'
|
import { map } from 'rxjs/operators'
|
||||||
import { ActivatedRouteSnapshot, Resolve, Router } from '@angular/router'
|
import { ActivatedRouteSnapshot, Router } from '@angular/router'
|
||||||
import { logger } from '@root-helpers/logger'
|
import { logger } from '@root-helpers/logger'
|
||||||
import { ResultList } from '@shared/models'
|
import { ResultList } from '@shared/models'
|
||||||
|
|
||||||
export abstract class AbstractLazyLoadResolver <T> implements Resolve<any> {
|
export abstract class AbstractLazyLoadResolver <T> {
|
||||||
protected router: Router
|
protected router: Router
|
||||||
|
|
||||||
resolve (route: ActivatedRouteSnapshot) {
|
resolve (route: ActivatedRouteSnapshot) {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import { forkJoin, of } from 'rxjs'
|
import { forkJoin, of } from 'rxjs'
|
||||||
import { map, switchMap } from 'rxjs/operators'
|
import { map, switchMap } from 'rxjs/operators'
|
||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { ActivatedRouteSnapshot, Resolve } from '@angular/router'
|
import { ActivatedRouteSnapshot } from '@angular/router'
|
||||||
import { AuthService } from '@app/core'
|
import { AuthService } from '@app/core'
|
||||||
import { listUserChannelsForSelect } from '@app/helpers'
|
import { listUserChannelsForSelect } from '@app/helpers'
|
||||||
import { VideoCaptionService, VideoDetails, VideoService } from '@app/shared/shared-main'
|
import { VideoCaptionService, VideoDetails, VideoService } from '@app/shared/shared-main'
|
||||||
import { LiveVideoService } from '@app/shared/shared-video-live'
|
import { LiveVideoService } from '@app/shared/shared-video-live'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class VideoUpdateResolver implements Resolve<any> {
|
export class VideoUpdateResolver {
|
||||||
constructor (
|
constructor (
|
||||||
private videoService: VideoService,
|
private videoService: VideoService,
|
||||||
private liveVideoService: LiveVideoService,
|
private liveVideoService: LiveVideoService,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import debug from 'debug'
|
import debug from 'debug'
|
||||||
import { LazyLoadEvent, SortMeta } from 'primeng/api'
|
import { SortMeta } from 'primeng/api'
|
||||||
|
import { TableLazyLoadEvent } from 'primeng/table'
|
||||||
import { ActivatedRoute, Router } from '@angular/router'
|
import { ActivatedRoute, Router } from '@angular/router'
|
||||||
import { logger } from '@root-helpers/logger'
|
import { logger } from '@root-helpers/logger'
|
||||||
import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
|
import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
|
||||||
|
@ -46,12 +47,12 @@ export abstract class RestTable <T = unknown> {
|
||||||
peertubeLocalStorage.setItem(this.getSortLocalStorageKey(), JSON.stringify(this.sort))
|
peertubeLocalStorage.setItem(this.getSortLocalStorageKey(), JSON.stringify(this.sort))
|
||||||
}
|
}
|
||||||
|
|
||||||
loadLazy (event: LazyLoadEvent) {
|
loadLazy (event: TableLazyLoadEvent) {
|
||||||
debugLogger('Load lazy %o.', event)
|
debugLogger('Load lazy %o.', event)
|
||||||
|
|
||||||
this.sort = {
|
this.sort = {
|
||||||
order: event.sortOrder,
|
order: event.sortOrder,
|
||||||
field: event.sortField
|
field: event.sortField as string
|
||||||
}
|
}
|
||||||
|
|
||||||
this.rowsPerPage = event.rows
|
this.rowsPerPage = event.rows
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { Observable } from 'rxjs'
|
import { Observable } from 'rxjs'
|
||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { CanDeactivate } from '@angular/router'
|
|
||||||
import { ConfirmService } from '@app/core/confirm'
|
import { ConfirmService } from '@app/core/confirm'
|
||||||
|
|
||||||
export type CanComponentDeactivateResult = { text?: string, canDeactivate: Observable<boolean> | boolean }
|
export type CanComponentDeactivateResult = { text?: string, canDeactivate: Observable<boolean> | boolean }
|
||||||
|
@ -10,7 +9,7 @@ export interface CanComponentDeactivate {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CanDeactivateGuard implements CanDeactivate<CanComponentDeactivate> {
|
export class CanDeactivateGuard {
|
||||||
|
|
||||||
constructor (private confirmService: ConfirmService) { }
|
constructor (private confirmService: ConfirmService) { }
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, RouterStateSnapshot } from '@angular/router'
|
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'
|
||||||
import { AuthService } from '../auth/auth.service'
|
import { AuthService } from '../auth/auth.service'
|
||||||
import { RedirectService } from './redirect.service'
|
import { RedirectService } from './redirect.service'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class LoginGuard implements CanActivate, CanActivateChild {
|
export class LoginGuard {
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
private auth: AuthService,
|
private auth: AuthService,
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { CanActivate, CanDeactivate } from '@angular/router'
|
|
||||||
import { MenuService } from '../menu'
|
import { MenuService } from '../menu'
|
||||||
import { ScreenService } from '../wrappers'
|
import { ScreenService } from '../wrappers'
|
||||||
|
|
||||||
abstract class MenuGuard implements CanActivate, CanDeactivate<any> {
|
abstract class MenuGuard {
|
||||||
canDeactivate = this.canActivate
|
canDeactivate = this.canActivate
|
||||||
|
|
||||||
constructor (protected menu: MenuService, protected screen: ScreenService, protected display: boolean) {
|
constructor (protected menu: MenuService, protected screen: ScreenService, protected display: boolean) {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild } from '@angular/router'
|
import { ActivatedRouteSnapshot } from '@angular/router'
|
||||||
import { MetaService } from './meta.service'
|
import { MetaService } from './meta.service'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class MetaGuard implements CanActivate, CanActivateChild {
|
export class MetaGuard {
|
||||||
|
|
||||||
constructor (private meta: MetaService) { }
|
constructor (private meta: MetaService) { }
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { Resolve } from '@angular/router'
|
|
||||||
import { ServerService } from '../server'
|
import { ServerService } from '../server'
|
||||||
import { ServerConfig } from '@shared/models'
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ServerConfigResolver implements Resolve<ServerConfig> {
|
export class ServerConfigResolver {
|
||||||
constructor (private server: ServerService) {}
|
constructor (private server: ServerService) {}
|
||||||
|
|
||||||
resolve () {
|
resolve () {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, RouterStateSnapshot } from '@angular/router'
|
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'
|
||||||
import { AuthService } from '../auth/auth.service'
|
import { AuthService } from '../auth/auth.service'
|
||||||
import { RedirectService } from './redirect.service'
|
import { RedirectService } from './redirect.service'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class UnloggedGuard implements CanActivate, CanActivateChild {
|
export class UnloggedGuard {
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
private auth: AuthService,
|
private auth: AuthService,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, RouterStateSnapshot } from '@angular/router'
|
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'
|
||||||
import { AuthService } from '../auth/auth.service'
|
import { AuthService } from '../auth/auth.service'
|
||||||
import { RedirectService } from './redirect.service'
|
import { RedirectService } from './redirect.service'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class UserRightGuard implements CanActivate, CanActivateChild {
|
export class UserRightGuard {
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
private redirectService: RedirectService,
|
private redirectService: RedirectService,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { firstValueFrom } from 'rxjs'
|
import { firstValueFrom } from 'rxjs'
|
||||||
import { ComponentRef, Injectable } from '@angular/core'
|
import { ComponentRef, Injectable } from '@angular/core'
|
||||||
import { MarkdownService } from '@app/core'
|
import { MarkdownService } from '@app/core'
|
||||||
|
import { logger } from '@root-helpers/logger'
|
||||||
import {
|
import {
|
||||||
ButtonMarkupData,
|
ButtonMarkupData,
|
||||||
ChannelMiniatureMarkupData,
|
ChannelMiniatureMarkupData,
|
||||||
|
@ -20,7 +21,6 @@ import {
|
||||||
VideosListMarkupComponent
|
VideosListMarkupComponent
|
||||||
} from './peertube-custom-tags'
|
} from './peertube-custom-tags'
|
||||||
import { CustomMarkupComponent } from './peertube-custom-tags/shared'
|
import { CustomMarkupComponent } from './peertube-custom-tags/shared'
|
||||||
import { logger } from '@root-helpers/logger'
|
|
||||||
|
|
||||||
type AngularBuilderFunction = (el: HTMLElement) => ComponentRef<CustomMarkupComponent>
|
type AngularBuilderFunction = (el: HTMLElement) => ComponentRef<CustomMarkupComponent>
|
||||||
type HTMLBuilderFunction = (el: HTMLElement) => HTMLElement
|
type HTMLBuilderFunction = (el: HTMLElement) => HTMLElement
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { forkJoin, of } from 'rxjs'
|
import { forkJoin, of } from 'rxjs'
|
||||||
import { catchError, map } from 'rxjs/operators'
|
import { catchError, map } from 'rxjs/operators'
|
||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { ActivatedRouteSnapshot, CanActivate, Router } from '@angular/router'
|
import { ActivatedRouteSnapshot, Router } from '@angular/router'
|
||||||
import { AccountService } from '../account'
|
import { AccountService } from '../account'
|
||||||
import { VideoChannelService } from '../video-channel'
|
import { VideoChannelService } from '../video-channel'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ActorRedirectGuard implements CanActivate {
|
export class ActorRedirectGuard {
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { ActivatedRouteSnapshot, Resolve } from '@angular/router'
|
import { ActivatedRouteSnapshot } from '@angular/router'
|
||||||
import { VideoService } from './video.service'
|
import { VideoService } from './video.service'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class VideoResolver implements Resolve<any> {
|
export class VideoResolver {
|
||||||
constructor (
|
constructor (
|
||||||
private videoService: VideoService
|
private videoService: VideoService
|
||||||
) {
|
) {
|
||||||
|
|
1765
client/yarn.lock
1765
client/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue