Update angular to v19
This commit is contained in:
parent
36d797a1b9
commit
d1b3bfcac6
|
@ -165,7 +165,7 @@
|
|||
},
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:application",
|
||||
"builder": "@angular/build:application",
|
||||
"options": {
|
||||
"i18nMissingTranslation": "ignore",
|
||||
"localize": true,
|
||||
|
@ -286,7 +286,7 @@
|
|||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"builder": "@angular/build:dev-server",
|
||||
"options": {
|
||||
"proxyConfig": "proxy.config.json",
|
||||
"buildTarget": "PeerTube:build"
|
||||
|
@ -301,7 +301,7 @@
|
|||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n"
|
||||
"builder": "@angular/build:extract-i18n"
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-eslint/builder:lint",
|
||||
|
|
|
@ -31,26 +31,25 @@
|
|||
],
|
||||
"typings": "*.d.ts",
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^18.0.6",
|
||||
"@angular-eslint/builder": "^18.0.1",
|
||||
"@angular-eslint/eslint-plugin": "^18.0.1",
|
||||
"@angular-eslint/eslint-plugin-template": "^18.0.1",
|
||||
"@angular-eslint/schematics": "^18.0.1",
|
||||
"@angular-eslint/template-parser": "^18.0.1",
|
||||
"@angular/animations": "^18.0.4",
|
||||
"@angular/build": "^18.0.5",
|
||||
"@angular/cdk": "^18.0.4",
|
||||
"@angular/cli": "^18.0.5",
|
||||
"@angular/common": "^18.0.4",
|
||||
"@angular/compiler": "^18.0.4",
|
||||
"@angular/compiler-cli": "^18.0.4",
|
||||
"@angular/core": "^18.0.4",
|
||||
"@angular/forms": "^18.0.4",
|
||||
"@angular/localize": "^18.0.4",
|
||||
"@angular/platform-browser": "^18.0.4",
|
||||
"@angular/platform-browser-dynamic": "^18.0.4",
|
||||
"@angular/router": "^18.0.4",
|
||||
"@angular/service-worker": "^18.0.4",
|
||||
"@angular-eslint/builder": "^19.0.2",
|
||||
"@angular-eslint/eslint-plugin": "^19.0.2",
|
||||
"@angular-eslint/eslint-plugin-template": "^19.0.2",
|
||||
"@angular-eslint/schematics": "^19.0.2",
|
||||
"@angular-eslint/template-parser": "^19.0.2",
|
||||
"@angular/animations": "^19.1.4",
|
||||
"@angular/build": "^19.1.5",
|
||||
"@angular/cdk": "^19.1.2",
|
||||
"@angular/cli": "^19.1.5",
|
||||
"@angular/common": "^19.1.4",
|
||||
"@angular/compiler": "^19.1.4",
|
||||
"@angular/compiler-cli": "^19.1.4",
|
||||
"@angular/core": "^19.1.4",
|
||||
"@angular/forms": "^19.1.4",
|
||||
"@angular/localize": "^19.1.4",
|
||||
"@angular/platform-browser": "^19.1.4",
|
||||
"@angular/platform-browser-dynamic": "^19.1.4",
|
||||
"@angular/router": "^19.1.4",
|
||||
"@angular/service-worker": "^19.1.4",
|
||||
"@ng-bootstrap/ng-bootstrap": "^18.0.0",
|
||||
"@ngx-loading-bar/core": "^7.0.0",
|
||||
"@ngx-loading-bar/http-client": "^7.0.0",
|
||||
|
@ -114,12 +113,12 @@
|
|||
"tinykeys": "^2.1.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"tslib": "^2.4.0",
|
||||
"typescript": "~5.4.5",
|
||||
"typescript": "~5.7.3",
|
||||
"video.js": "^7.19.2",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-checker": "^0.7.2",
|
||||
"vite-plugin-node-polyfills": "^0.22.0",
|
||||
"zone.js": "~0.14.2"
|
||||
"zone.js": "~0.15.0"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,9 @@ export class MyAcceptOwnershipComponent extends FormReactive implements OnInit {
|
|||
.open(this.modal, { centered: true })
|
||||
.result
|
||||
.then(() => this.acceptOwnership())
|
||||
.catch(() => this.videoChangeOwnership = undefined)
|
||||
.catch(() => {
|
||||
this.videoChangeOwnership = undefined
|
||||
})
|
||||
}
|
||||
|
||||
acceptOwnership () {
|
||||
|
|
|
@ -4,9 +4,9 @@ import { wait } from '@root-helpers/utils'
|
|||
import { BuildFormArgument, BuildFormDefaultValues } from '../form-validators/form-validator.model'
|
||||
import { FormValidatorService } from './form-validator.service'
|
||||
|
||||
export type FormReactiveErrors = { [ id: string | number ]: string | FormReactiveErrors | FormReactiveErrors[] }
|
||||
export type FormReactiveErrors = { [ id: string ]: string | FormReactiveErrors | FormReactiveErrors[] }
|
||||
export type FormReactiveValidationMessages = {
|
||||
[ id: string | number ]: { [ name: string ]: string } | FormReactiveValidationMessages | FormReactiveValidationMessages[]
|
||||
[ id: string ]: { [ name: string ]: string } | FormReactiveValidationMessages | FormReactiveValidationMessages[]
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
|
|
|
@ -49,7 +49,9 @@ export class FormValidatorService {
|
|||
defaultValues: BuildFormDefaultValues = {}
|
||||
) {
|
||||
for (const name of objectKeysTyped(formToBuild)) {
|
||||
formErrors[name] = ''
|
||||
if (typeof formErrors[name] === 'string') {
|
||||
formErrors[name] = ''
|
||||
}
|
||||
|
||||
const field = formToBuild[name]
|
||||
if (this.isRecursiveField(field)) {
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import { DatePipe } from '@angular/common'
|
||||
import { Inject, LOCALE_ID, Pipe, PipeTransform } from '@angular/core'
|
||||
|
||||
// Re-implementation of the angular date pipe that use the web browser locale to display dates
|
||||
// Re-implementation of the angular date pipe that uses the web browser locale to display dates
|
||||
|
||||
@Pipe({
|
||||
name: 'ptDate',
|
||||
pure: true
|
||||
pure: true,
|
||||
standalone: true
|
||||
})
|
||||
export class PTDatePipe implements PipeTransform {
|
||||
private angularPipe: DatePipe
|
||||
|
|
|
@ -65,7 +65,7 @@ export class AccountReportComponent extends FormReactive implements OnInit {
|
|||
ngOnInit () {
|
||||
this.buildForm({
|
||||
reason: ABUSE_REASON_VALIDATOR,
|
||||
predefinedReasons: mapValues(abusePredefinedReasonsMap, r => null)
|
||||
predefinedReasons: mapValues(abusePredefinedReasonsMap, _ => null as any)
|
||||
})
|
||||
|
||||
this.predefinedReasons = this.abuseService.getPrefefinedReasons('account')
|
||||
|
|
|
@ -68,7 +68,7 @@ export class CommentReportComponent extends FormReactive implements OnInit {
|
|||
|
||||
this.buildForm({
|
||||
reason: ABUSE_REASON_VALIDATOR,
|
||||
predefinedReasons: mapValues(abusePredefinedReasonsMap, r => null)
|
||||
predefinedReasons: mapValues(abusePredefinedReasonsMap, _ => null as any)
|
||||
})
|
||||
|
||||
this.predefinedReasons = this.abuseService.getPrefefinedReasons('comment')
|
||||
|
|
|
@ -73,7 +73,7 @@ export class VideoReportComponent extends FormReactive implements OnInit {
|
|||
ngOnInit () {
|
||||
this.buildForm({
|
||||
reason: ABUSE_REASON_VALIDATOR,
|
||||
predefinedReasons: mapValues(abusePredefinedReasonsMap, r => null),
|
||||
predefinedReasons: mapValues(abusePredefinedReasonsMap, _ => null as any),
|
||||
timestamp: {
|
||||
hasStart: null,
|
||||
startAt: null,
|
||||
|
|
|
@ -7,8 +7,7 @@ import { ProgressBarComponent } from '../shared-main/common/progress-bar.compone
|
|||
selector: 'my-upload-progress',
|
||||
templateUrl: './upload-progress.component.html',
|
||||
styleUrls: [ './upload-progress.component.scss' ],
|
||||
imports: [ CommonModule, ProgressBarComponent, AlertComponent ],
|
||||
standalone: true
|
||||
imports: [ CommonModule, ProgressBarComponent, AlertComponent ]
|
||||
})
|
||||
export class UploadProgressComponent {
|
||||
@Input() isUploading: boolean
|
||||
|
|
|
@ -13,7 +13,8 @@ export class TranslationsManager {
|
|||
.then(res => res.json())
|
||||
.catch(err => {
|
||||
logger.error('Cannot get server translations', err)
|
||||
return undefined
|
||||
|
||||
return undefined as any
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -35,7 +36,8 @@ export class TranslationsManager {
|
|||
})
|
||||
.catch(err => {
|
||||
logger.error('Cannot get player translations', err)
|
||||
return undefined
|
||||
|
||||
return undefined as any
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
import { APP_BASE_HREF, registerLocaleData } from '@angular/common'
|
||||
import { provideHttpClient } from '@angular/common/http'
|
||||
import { APP_INITIALIZER, ApplicationRef, enableProdMode, importProvidersFrom, provideZoneChangeDetection } from '@angular/core'
|
||||
import {
|
||||
ApplicationRef,
|
||||
enableProdMode,
|
||||
importProvidersFrom,
|
||||
provideZoneChangeDetection,
|
||||
inject,
|
||||
provideAppInitializer
|
||||
} from '@angular/core'
|
||||
import { BrowserModule, bootstrapApplication, enableDebugTools } from '@angular/platform-browser'
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
|
||||
import { RouteReuseStrategy, provideRouter, withInMemoryScrolling, withPreloading } from '@angular/router'
|
||||
|
@ -95,12 +102,11 @@ const bootstrap = () => bootstrapApplication(AppComponent, {
|
|||
provide: APP_BASE_HREF,
|
||||
useValue: '/'
|
||||
},
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useFactory: loadConfigFactory,
|
||||
deps: [ ServerService, PluginService, ThemeService, RedirectService ],
|
||||
multi: true
|
||||
}
|
||||
provideAppInitializer(() => {
|
||||
const initializerFn = loadConfigFactory(inject(ServerService), inject(PluginService), inject(ThemeService), inject(RedirectService))
|
||||
|
||||
return initializerFn()
|
||||
})
|
||||
]
|
||||
})
|
||||
.then(bootstrapModule => {
|
||||
|
@ -128,7 +134,7 @@ const bootstrap = () => bootstrapApplication(AppComponent, {
|
|||
}
|
||||
}, 1000)
|
||||
|
||||
return null
|
||||
return null as any
|
||||
})
|
||||
|
||||
bootstrap()
|
||||
|
|
4847
client/yarn.lock
4847
client/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue