mirror of
https://github.com/transloadit/uppy.git
synced 2026-01-23 18:35:54 +00:00
Co-authored-by: Murderlon <merlijn@soverin.net>
This commit is contained in:
parent
5de5687f98
commit
27492bca8a
20 changed files with 4858 additions and 254 deletions
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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:^",
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { DashboardModalComponent } from './dashboard-modal.component';
|
||||
|
||||
export const COMPONENTS = [DashboardModalComponent];
|
||||
@NgModule({
|
||||
declarations: COMPONENTS,
|
||||
exports: COMPONENTS
|
||||
})
|
||||
export class UppyAngularDashboardModalModule { }
|
||||
|
|
@ -1,12 +1,10 @@
|
|||
import { DashboardModalDemoComponent } from './dashboard-modal-demo.component';
|
||||
import { moduleMetadata } from '@storybook/angular';
|
||||
import { UppyAngularDashboardModalModule } from './dashboard-modal.module';
|
||||
|
||||
export default {
|
||||
title: 'Dashboard',
|
||||
decorators: [
|
||||
moduleMetadata({
|
||||
imports: [UppyAngularDashboardModalModule],
|
||||
declarations: [DashboardModalDemoComponent]
|
||||
}),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { DashboardComponent } from './dashboard.component';
|
||||
|
||||
export const COMPONENTS = [DashboardComponent];
|
||||
@NgModule({
|
||||
declarations: COMPONENTS,
|
||||
exports: COMPONENTS
|
||||
})
|
||||
export class UppyAngularDashboardModule { }
|
||||
|
|
@ -1,12 +1,10 @@
|
|||
import { DashboardDemoComponent } from './dashboard-demo.component';
|
||||
import { moduleMetadata } from '@storybook/angular';
|
||||
import { UppyAngularDashboardModule} from './dashboard.module';
|
||||
|
||||
export default {
|
||||
title: 'Dashboard',
|
||||
decorators: [
|
||||
moduleMetadata({
|
||||
imports: [UppyAngularDashboardModule],
|
||||
declarations: [DashboardDemoComponent]
|
||||
}),
|
||||
]
|
||||
|
|
@ -14,4 +12,4 @@ export default {
|
|||
|
||||
export const Default = () => ({
|
||||
component: DashboardDemoComponent,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { DragDropComponent } from './drag-drop.component';
|
||||
|
||||
export const COMPONENTS = [DragDropComponent];
|
||||
@NgModule({
|
||||
declarations: COMPONENTS,
|
||||
exports: COMPONENTS
|
||||
})
|
||||
export class UppyAngularDragDropModule { }
|
||||
|
|
@ -1,17 +1,15 @@
|
|||
import { moduleMetadata } from '@storybook/angular';
|
||||
import { UppyAngularDragDropModule } from './drag-drop.module';
|
||||
import { DragDropDemoComponent } from './drag-drop-demo.component';
|
||||
|
||||
export default {
|
||||
title: 'Drag Drop',
|
||||
decorators: [
|
||||
moduleMetadata({
|
||||
imports: [UppyAngularDragDropModule],
|
||||
declarations: [DragDropDemoComponent]
|
||||
}),
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
export const Default = () => ({
|
||||
component: DragDropDemoComponent,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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) =>
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { ProgressBarComponent } from './progress-bar.component';
|
||||
|
||||
export const COMPONENTS = [ProgressBarComponent];
|
||||
@NgModule({
|
||||
declarations: COMPONENTS,
|
||||
exports: COMPONENTS
|
||||
})
|
||||
export class UppyAngularProgressBarModule { }
|
||||
|
|
@ -1,14 +1,12 @@
|
|||
import { moduleMetadata } from '@storybook/angular';
|
||||
import { UppyAngularProgressBarModule } from './progress-bar.module';
|
||||
import { ProgressBarDemoComponent } from './progress-bar-demo.component';
|
||||
import { UppyAngularDragDropModule } from '../drag-drop/drag-drop.module';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
export default {
|
||||
title: 'Progress Bar',
|
||||
decorators: [
|
||||
moduleMetadata({
|
||||
imports: [UppyAngularProgressBarModule, UppyAngularDragDropModule, CommonModule],
|
||||
imports: [CommonModule],
|
||||
declarations: [ProgressBarDemoComponent]
|
||||
}),
|
||||
]
|
||||
|
|
@ -16,4 +14,4 @@ export default {
|
|||
|
||||
export const Default = () => ({
|
||||
component: ProgressBarDemoComponent,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { StatusBarComponent } from './status-bar.component';
|
||||
|
||||
export const COMPONENTS = [StatusBarComponent];
|
||||
@NgModule({
|
||||
declarations: COMPONENTS,
|
||||
exports: COMPONENTS
|
||||
})
|
||||
export class UppyAngularStatusBarModule { }
|
||||
|
|
@ -1,12 +1,10 @@
|
|||
import { StatusBarDemoComponent } from './status-bar-demo.component';
|
||||
import { moduleMetadata } from '@storybook/angular';
|
||||
import { UppyAngularStatusBarModule } from './status-bar.module';
|
||||
|
||||
export default {
|
||||
title: 'Status Bar',
|
||||
decorators: [
|
||||
moduleMetadata({
|
||||
imports: [UppyAngularStatusBarModule],
|
||||
declarations: [StatusBarDemoComponent]
|
||||
}),
|
||||
]
|
||||
|
|
@ -14,4 +12,4 @@ export default {
|
|||
|
||||
export const Default = () => ({
|
||||
component: StatusBarDemoComponent,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,11 +2,6 @@
|
|||
* Public API Surface of @uppy/angular
|
||||
*/
|
||||
|
||||
export { UppyAngularDashboardModule } from './lib/components/dashboard/dashboard.module';
|
||||
export { UppyAngularDashboardModalModule } from './lib/components/dashboard-modal/dashboard-modal.module';
|
||||
export { UppyAngularProgressBarModule } from './lib/components/progress-bar/progress-bar.module';
|
||||
export { UppyAngularStatusBarModule } from './lib/components/status-bar/status-bar.module';
|
||||
export { UppyAngularDragDropModule } from './lib/components/drag-drop/drag-drop.module';
|
||||
export { StatusBarComponent } from './lib/components/status-bar/status-bar.component';
|
||||
export { ProgressBarComponent } from './lib/components/progress-bar/progress-bar.component';
|
||||
export { DragDropComponent } from './lib/components/drag-drop/drag-drop.component';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue