Skip to content

Commit eac0274

Browse files
authored
Revert "Support Angular 19" (#5710)
Revert "Support Angular 19 (#5709)" This reverts commit 86fb71f.
1 parent 86fb71f commit eac0274

File tree

9 files changed

+188
-4852
lines changed

9 files changed

+188
-4852
lines changed

packages/@uppy/angular/package.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@
1010
},
1111
"private": true,
1212
"dependencies": {
13-
"@angular/animations": "^19.0.0",
14-
"@angular/common": "^19.0.0",
15-
"@angular/compiler": "^19.0.0",
16-
"@angular/core": "^19.0.0",
17-
"@angular/forms": "^19.0.0",
18-
"@angular/platform-browser": "^19.0.0",
19-
"@angular/platform-browser-dynamic": "^19.0.0",
20-
"@angular/router": "^19.0.0",
13+
"@angular/animations": "^18.0.0",
14+
"@angular/common": "^18.0.0",
15+
"@angular/compiler": "^18.0.0",
16+
"@angular/core": "^18.0.0",
17+
"@angular/forms": "^18.0.0",
18+
"@angular/platform-browser": "^18.0.0",
19+
"@angular/platform-browser-dynamic": "^18.0.0",
20+
"@angular/router": "^18.0.0",
2121
"rxjs": "~7.8.0",
2222
"tslib": "^2.3.0",
23-
"zone.js": "~0.15.0"
23+
"zone.js": "~0.14.3"
2424
},
2525
"devDependencies": {
26-
"@angular-devkit/build-angular": "^19.0.0",
27-
"@angular-eslint/eslint-plugin": "^18.0.1",
28-
"@angular-eslint/eslint-plugin-template": "^18.0.1",
29-
"@angular/cli": "^19.0.0",
30-
"@angular/compiler-cli": "^19.0.0",
26+
"@angular-devkit/build-angular": "^18.0.2",
27+
"@angular-eslint/eslint-plugin": "18.0.1",
28+
"@angular-eslint/eslint-plugin-template": "18.0.1",
29+
"@angular/cli": "^18.0.2",
30+
"@angular/compiler-cli": "^18.0.0",
3131
"@types/jasmine": "~5.1.0",
3232
"@typescript-eslint/eslint-plugin": "^7.2.0",
3333
"@typescript-eslint/parser": "^7.2.0",
@@ -37,7 +37,7 @@
3737
"karma-coverage": "~2.2.0",
3838
"karma-jasmine": "~5.1.0",
3939
"karma-jasmine-html-reporter": "~2.1.0",
40-
"ng-packagr": "^19.0.0",
41-
"typescript": "^5.6"
40+
"ng-packagr": "^18.0.0",
41+
"typescript": "~5.4"
4242
}
4343
}

packages/@uppy/angular/projects/uppy/angular/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"tslib": "^2.0.0"
2626
},
2727
"peerDependencies": {
28-
"@angular/common": "^17.0.0 || ^18.0.0 || ^19.0.0",
29-
"@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0",
28+
"@angular/common": "^17.0.0 || ^18.0.0",
29+
"@angular/core": "^17.0.0 || ^18.0.0",
3030
"@uppy/core": "workspace:^",
3131
"@uppy/dashboard": "workspace:^",
3232
"@uppy/drag-drop": "workspace:^",

packages/@uppy/angular/projects/uppy/angular/src/lib/components/dashboard-modal/dashboard-modal.component.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges, inject } from '@angular/core';
1+
import {
2+
Component,
3+
ChangeDetectionStrategy,
4+
ElementRef,
5+
Input,
6+
OnDestroy,
7+
OnChanges,
8+
SimpleChanges,
9+
} from '@angular/core';
210
import Dashboard from '@uppy/dashboard';
311
import type { DashboardOptions } from '@uppy/dashboard';
412
import { Uppy } from '@uppy/core';
@@ -14,16 +22,11 @@ export class DashboardModalComponent<M extends Meta, B extends Body>
1422
extends UppyAngularWrapper<M, B, DashboardOptions<M, B>, Dashboard<M, B>>
1523
implements OnDestroy, OnChanges
1624
{
17-
el = inject(ElementRef);
18-
1925
@Input() uppy: Uppy<M, B> = new Uppy();
2026
@Input() props: DashboardOptions<M, B> = {};
2127
@Input() open: boolean = false;
2228

23-
/** Inserted by Angular inject() migration for backwards compatibility */
24-
constructor(...args: unknown[]);
25-
26-
constructor() {
29+
constructor(public el: ElementRef) {
2730
super();
2831
}
2932

packages/@uppy/angular/projects/uppy/angular/src/lib/components/dashboard/dashboard.component.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges, inject } from '@angular/core';
1+
import {
2+
Component,
3+
ChangeDetectionStrategy,
4+
ElementRef,
5+
Input,
6+
OnDestroy,
7+
OnChanges,
8+
SimpleChanges,
9+
} from '@angular/core';
210
import Dashboard from '@uppy/dashboard';
311
import type { DashboardOptions } from '@uppy/dashboard';
412
import { Uppy } from '@uppy/core';
@@ -14,15 +22,10 @@ export class DashboardComponent<M extends Meta, B extends Body>
1422
extends UppyAngularWrapper<M, B, DashboardOptions<M,B>>
1523
implements OnDestroy, OnChanges
1624
{
17-
el = inject(ElementRef);
18-
1925
@Input() uppy: Uppy<M, B> = new Uppy();
2026
@Input() props: DashboardOptions<M, B> = {};
2127

22-
/** Inserted by Angular inject() migration for backwards compatibility */
23-
constructor(...args: unknown[]);
24-
25-
constructor() {
28+
constructor(public el: ElementRef) {
2629
super();
2730
}
2831

packages/@uppy/angular/projects/uppy/angular/src/lib/components/drag-drop/drag-drop.component.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
import { Component, ChangeDetectionStrategy, Input, OnDestroy, OnChanges, SimpleChanges, ElementRef, inject } from '@angular/core';
1+
import {
2+
Component,
3+
ChangeDetectionStrategy,
4+
Input,
5+
OnDestroy,
6+
OnChanges,
7+
SimpleChanges,
8+
ElementRef,
9+
} from '@angular/core';
210
import { Uppy } from '@uppy/core';
311
import DragDrop from '@uppy/drag-drop';
412
import type { DragDropOptions } from '@uppy/drag-drop';
@@ -14,15 +22,10 @@ export class DragDropComponent<M extends Meta, B extends Body>
1422
extends UppyAngularWrapper<M, B, DragDropOptions>
1523
implements OnDestroy, OnChanges
1624
{
17-
el = inject(ElementRef);
18-
1925
@Input() uppy: Uppy<M, B> = new Uppy();
2026
@Input() props: DragDropOptions = {};
2127

22-
/** Inserted by Angular inject() migration for backwards compatibility */
23-
constructor(...args: unknown[]);
24-
25-
constructor() {
28+
constructor(public el: ElementRef) {
2629
super();
2730
}
2831

packages/@uppy/angular/projects/uppy/angular/src/lib/components/progress-bar/progress-bar-demo.component.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef, inject } from '@angular/core';
1+
import {
2+
Component,
3+
OnInit,
4+
ChangeDetectionStrategy,
5+
ChangeDetectorRef,
6+
} from '@angular/core';
27
import { Uppy } from '@uppy/core';
38
import Tus from '@uppy/tus';
49
import type {ProgressBarOptions} from '@uppy/progress-bar';
@@ -54,8 +59,6 @@ import { Body, Meta } from '@uppy/utils/lib/UppyFile';
5459
export class ProgressBarDemoComponent<M extends Meta, B extends Body>
5560
implements OnInit
5661
{
57-
private cdr = inject(ChangeDetectorRef);
58-
5962
uppyOne!: Uppy<M, B>;
6063
uppyTwo!: Uppy<M, B>;
6164
fileListOne: { url: string; fileName: string }[] = [];
@@ -68,10 +71,7 @@ export class ProgressBarDemoComponent<M extends Meta, B extends Body>
6871
this.uppyTwo.upload();
6972
}
7073

71-
/** Inserted by Angular inject() migration for backwards compatibility */
72-
constructor(...args: unknown[]);
73-
74-
constructor() {}
74+
constructor(private cdr: ChangeDetectorRef) {}
7575

7676
updateFileList =
7777
(target: string) =>

packages/@uppy/angular/projects/uppy/angular/src/lib/components/progress-bar/progress-bar.component.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges, inject } from '@angular/core';
1+
import {
2+
Component,
3+
ChangeDetectionStrategy,
4+
ElementRef,
5+
Input,
6+
OnDestroy,
7+
OnChanges,
8+
SimpleChanges,
9+
} from '@angular/core';
210
import { Uppy } from '@uppy/core';
311
import ProgressBar from '@uppy/progress-bar';
412
import type { ProgressBarOptions } from '@uppy/progress-bar';
@@ -14,15 +22,10 @@ export class ProgressBarComponent<M extends Meta, B extends Body>
1422
extends UppyAngularWrapper<M, B, ProgressBarOptions>
1523
implements OnDestroy, OnChanges
1624
{
17-
el = inject(ElementRef);
18-
1925
@Input() uppy: Uppy<M, B> = new Uppy();
2026
@Input() props: ProgressBarOptions = {};
2127

22-
/** Inserted by Angular inject() migration for backwards compatibility */
23-
constructor(...args: unknown[]);
24-
25-
constructor() {
28+
constructor(public el: ElementRef) {
2629
super();
2730
}
2831

packages/@uppy/angular/projects/uppy/angular/src/lib/components/status-bar/status-bar.component.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
import { Component, ChangeDetectionStrategy, Input, ElementRef, OnDestroy, OnChanges, SimpleChanges, inject } from '@angular/core';
1+
import {
2+
Component,
3+
ChangeDetectionStrategy,
4+
Input,
5+
ElementRef,
6+
OnDestroy,
7+
OnChanges,
8+
SimpleChanges,
9+
} from '@angular/core';
210
import { Uppy } from '@uppy/core';
311
import StatusBar from '@uppy/status-bar';
412
import type { StatusBarOptions } from '@uppy/status-bar';
@@ -14,15 +22,10 @@ export class StatusBarComponent<M extends Meta, B extends Body>
1422
extends UppyAngularWrapper<M, B, StatusBarOptions>
1523
implements OnDestroy, OnChanges
1624
{
17-
el = inject(ElementRef);
18-
1925
@Input() uppy: Uppy<M, B> = new Uppy();
2026
@Input() props: StatusBarOptions = {};
2127

22-
/** Inserted by Angular inject() migration for backwards compatibility */
23-
constructor(...args: unknown[]);
24-
25-
constructor() {
28+
constructor(public el: ElementRef) {
2629
super();
2730
}
2831

0 commit comments

Comments
 (0)