Support Angular 19 (#5709)

Co-authored-by: Murderlon <merlijn@soverin.net>
This commit is contained in:
Arnaud Flaesch 2025-04-07 15:50:10 +02:00 committed by GitHub
parent b339ae0453
commit 86fb71f6b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 4852 additions and 188 deletions

View file

@ -10,24 +10,24 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^18.0.0",
"@angular/common": "^18.0.0",
"@angular/compiler": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/forms": "^18.0.0",
"@angular/platform-browser": "^18.0.0",
"@angular/platform-browser-dynamic": "^18.0.0",
"@angular/router": "^18.0.0",
"@angular/animations": "^19.0.0",
"@angular/common": "^19.0.0",
"@angular/compiler": "^19.0.0",
"@angular/core": "^19.0.0",
"@angular/forms": "^19.0.0",
"@angular/platform-browser": "^19.0.0",
"@angular/platform-browser-dynamic": "^19.0.0",
"@angular/router": "^19.0.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"
"zone.js": "~0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.0.2",
"@angular-eslint/eslint-plugin": "18.0.1",
"@angular-eslint/eslint-plugin-template": "18.0.1",
"@angular/cli": "^18.0.2",
"@angular/compiler-cli": "^18.0.0",
"@angular-devkit/build-angular": "^19.0.0",
"@angular-eslint/eslint-plugin": "^18.0.1",
"@angular-eslint/eslint-plugin-template": "^18.0.1",
"@angular/cli": "^19.0.0",
"@angular/compiler-cli": "^19.0.0",
"@types/jasmine": "~5.1.0",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
@ -37,7 +37,7 @@
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"ng-packagr": "^18.0.0",
"typescript": "~5.4"
"ng-packagr": "^19.0.0",
"typescript": "^5.6"
}
}

View file

@ -25,8 +25,8 @@
"tslib": "^2.0.0"
},
"peerDependencies": {
"@angular/common": "^17.0.0 || ^18.0.0",
"@angular/core": "^17.0.0 || ^18.0.0",
"@angular/common": "^17.0.0 || ^18.0.0 || ^19.0.0",
"@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0",
"@uppy/core": "workspace:^",
"@uppy/dashboard": "workspace:^",
"@uppy/drag-drop": "workspace:^",

View file

@ -1,12 +1,4 @@
import {
Component,
ChangeDetectionStrategy,
ElementRef,
Input,
OnDestroy,
OnChanges,
SimpleChanges,
} from '@angular/core';
import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges, inject } from '@angular/core';
import Dashboard from '@uppy/dashboard';
import type { DashboardOptions } from '@uppy/dashboard';
import { Uppy } from '@uppy/core';
@ -22,11 +14,16 @@ export class DashboardModalComponent<M extends Meta, B extends Body>
extends UppyAngularWrapper<M, B, DashboardOptions<M, B>, Dashboard<M, B>>
implements OnDestroy, OnChanges
{
el = inject(ElementRef);
@Input() uppy: Uppy<M, B> = new Uppy();
@Input() props: DashboardOptions<M, B> = {};
@Input() open: boolean = false;
constructor(public el: ElementRef) {
/** Inserted by Angular inject() migration for backwards compatibility */
constructor(...args: unknown[]);
constructor() {
super();
}

View file

@ -1,12 +1,4 @@
import {
Component,
ChangeDetectionStrategy,
ElementRef,
Input,
OnDestroy,
OnChanges,
SimpleChanges,
} from '@angular/core';
import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges, inject } from '@angular/core';
import Dashboard from '@uppy/dashboard';
import type { DashboardOptions } from '@uppy/dashboard';
import { Uppy } from '@uppy/core';
@ -22,10 +14,15 @@ export class DashboardComponent<M extends Meta, B extends Body>
extends UppyAngularWrapper<M, B, DashboardOptions<M,B>>
implements OnDestroy, OnChanges
{
el = inject(ElementRef);
@Input() uppy: Uppy<M, B> = new Uppy();
@Input() props: DashboardOptions<M, B> = {};
constructor(public el: ElementRef) {
/** Inserted by Angular inject() migration for backwards compatibility */
constructor(...args: unknown[]);
constructor() {
super();
}

View file

@ -1,12 +1,4 @@
import {
Component,
ChangeDetectionStrategy,
Input,
OnDestroy,
OnChanges,
SimpleChanges,
ElementRef,
} from '@angular/core';
import { Component, ChangeDetectionStrategy, Input, OnDestroy, OnChanges, SimpleChanges, ElementRef, inject } from '@angular/core';
import { Uppy } from '@uppy/core';
import DragDrop from '@uppy/drag-drop';
import type { DragDropOptions } from '@uppy/drag-drop';
@ -22,10 +14,15 @@ export class DragDropComponent<M extends Meta, B extends Body>
extends UppyAngularWrapper<M, B, DragDropOptions>
implements OnDestroy, OnChanges
{
el = inject(ElementRef);
@Input() uppy: Uppy<M, B> = new Uppy();
@Input() props: DragDropOptions = {};
constructor(public el: ElementRef) {
/** Inserted by Angular inject() migration for backwards compatibility */
constructor(...args: unknown[]);
constructor() {
super();
}

View file

@ -1,9 +1,4 @@
import {
Component,
OnInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
} from '@angular/core';
import { Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef, inject } from '@angular/core';
import { Uppy } from '@uppy/core';
import Tus from '@uppy/tus';
import type {ProgressBarOptions} from '@uppy/progress-bar';
@ -59,6 +54,8 @@ import { Body, Meta } from '@uppy/utils/lib/UppyFile';
export class ProgressBarDemoComponent<M extends Meta, B extends Body>
implements OnInit
{
private cdr = inject(ChangeDetectorRef);
uppyOne!: Uppy<M, B>;
uppyTwo!: Uppy<M, B>;
fileListOne: { url: string; fileName: string }[] = [];
@ -71,7 +68,10 @@ export class ProgressBarDemoComponent<M extends Meta, B extends Body>
this.uppyTwo.upload();
}
constructor(private cdr: ChangeDetectorRef) {}
/** Inserted by Angular inject() migration for backwards compatibility */
constructor(...args: unknown[]);
constructor() {}
updateFileList =
(target: string) =>

View file

@ -1,12 +1,4 @@
import {
Component,
ChangeDetectionStrategy,
ElementRef,
Input,
OnDestroy,
OnChanges,
SimpleChanges,
} from '@angular/core';
import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges, inject } from '@angular/core';
import { Uppy } from '@uppy/core';
import ProgressBar from '@uppy/progress-bar';
import type { ProgressBarOptions } from '@uppy/progress-bar';
@ -22,10 +14,15 @@ export class ProgressBarComponent<M extends Meta, B extends Body>
extends UppyAngularWrapper<M, B, ProgressBarOptions>
implements OnDestroy, OnChanges
{
el = inject(ElementRef);
@Input() uppy: Uppy<M, B> = new Uppy();
@Input() props: ProgressBarOptions = {};
constructor(public el: ElementRef) {
/** Inserted by Angular inject() migration for backwards compatibility */
constructor(...args: unknown[]);
constructor() {
super();
}

View file

@ -1,12 +1,4 @@
import {
Component,
ChangeDetectionStrategy,
Input,
ElementRef,
OnDestroy,
OnChanges,
SimpleChanges,
} from '@angular/core';
import { Component, ChangeDetectionStrategy, Input, ElementRef, OnDestroy, OnChanges, SimpleChanges, inject } from '@angular/core';
import { Uppy } from '@uppy/core';
import StatusBar from '@uppy/status-bar';
import type { StatusBarOptions } from '@uppy/status-bar';
@ -22,10 +14,15 @@ export class StatusBarComponent<M extends Meta, B extends Body>
extends UppyAngularWrapper<M, B, StatusBarOptions>
implements OnDestroy, OnChanges
{
el = inject(ElementRef);
@Input() uppy: Uppy<M, B> = new Uppy();
@Input() props: StatusBarOptions = {};
constructor(public el: ElementRef) {
/** Inserted by Angular inject() migration for backwards compatibility */
constructor(...args: unknown[]);
constructor() {
super();
}

4905
yarn.lock

File diff suppressed because it is too large Load diff