@uppy/angular 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,8 +20,6 @@ Uppy is being developed by the folks at [Transloadit](https://transloadit.com),
20
20
  $ npm install @uppy/angular --save
21
21
  ```
22
22
 
23
- We recommend installing from npm and then using a module bundler such as [Webpack](https://webpack.js.org/), [Browserify](http://browserify.org/) or [Rollup.js](http://rollupjs.org/).
24
-
25
23
  Alternatively, you can also use this plugin in a pre-built bundle from Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions.
26
24
 
27
25
  ## Documentation
@@ -24,4 +24,4 @@ export class UppyAngularWrapper {
24
24
  uppy.removePlugin(this.plugin);
25
25
  }
26
26
  }
27
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JhcHBlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3VwcHkvYW5ndWxhci9zcmMvbGliL3V0aWxzL3dyYXBwZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBTUEsTUFBTSxPQUFnQixrQkFBa0I7SUFPcEMsT0FBTyxDQUFDLGNBQXVDLEVBQUUsTUFBbUU7UUFDbEgsSUFBSSxDQUFDLE9BQU8sR0FBRztZQUNiLEdBQUcsY0FBYztZQUNqQixHQUFHLElBQUksQ0FBQyxLQUFLO1NBQ2QsQ0FBQztRQUVGLElBQUksQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUM7UUFDcEMsSUFBSSxDQUFDLE1BQU0sR0FBRyxJQUFJLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLEVBQUUsQ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BjaGFuZ2VzWydwcm9wcyddLnByZXZpb3VzVmFsdWUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICB0aGlzLnBsdWdpbi5zZXRPcHRpb25zKHsgLi4udGhpcy5vcHRpb25zIH0pXG4gICAgICB9XG4gICAgfVxuXG4gICAgdW5pbnN0YWxsKHVwcHkgPSB0aGlzLnVwcHkpOiB2b2lkIHtcbiAgICAgICAgY29uc29sZS5sb2coJ1VuaW5zdGFsbGluZy4uLicpXG4gICAgICAgIHVwcHkucmVtb3ZlUGx1Z2luKHRoaXMucGx1Z2luISk7XG4gICAgfVxuXG59XG4iXX0=
@@ -1 +1 @@
1
- {"version":3,"file":"uppy-angular.mjs","sources":["../../../uppy/angular/src/lib/utils/wrapper.ts","../../../uppy/angular/src/lib/components/dashboard/dashboard.component.ts","../../../uppy/angular/src/lib/components/dashboard/dashboard.module.ts","../../../uppy/angular/src/lib/components/dashboard-modal/dashboard-modal.component.ts","../../../uppy/angular/src/lib/components/dashboard-modal/dashboard-modal.module.ts","../../../uppy/angular/src/lib/components/progress-bar/progress-bar.component.ts","../../../uppy/angular/src/lib/components/progress-bar/progress-bar.module.ts","../../../uppy/angular/src/lib/components/status-bar/status-bar.component.ts","../../../uppy/angular/src/lib/components/status-bar/status-bar.module.ts","../../../uppy/angular/src/lib/components/drag-drop/drag-drop.component.ts","../../../uppy/angular/src/lib/components/drag-drop/drag-drop.module.ts","../../../uppy/angular/src/public-api.ts","../../../uppy/angular/src/uppy-angular.ts"],"sourcesContent":["import type { Uppy, UIPlugin } from '@uppy/core';\nimport type { ElementRef, SimpleChanges } from '@angular/core';\nimport type { DragDropOptions } from '@uppy/drag-drop';\nimport type { StatusBarOptions } from '@uppy/status-bar';\nimport type { ProgressBarOptions } from '@uppy/progress-bar';\n\nexport abstract class UppyAngularWrapper<PluginType extends UIPlugin = UIPlugin> {\n abstract props: DragDropOptions|StatusBarOptions|ProgressBarOptions;\n abstract el: ElementRef\n abstract uppy: Uppy;\n private options: any;\n plugin: PluginType | undefined;\n\n onMount(defaultOptions: Record<string, unknown>, plugin: new (uppy: Uppy, opts: Record<string, unknown>) => UIPlugin) {\n this.options = {\n ...defaultOptions,\n ...this.props,\n };\n\n this.uppy.use(plugin, this.options);\n this.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n }\n\n handleChanges(changes: SimpleChanges, plugin: any): void {\n // Without the last part of this conditional, it tries to uninstall before the plugin is mounted\n if (changes['uppy'] && this.uppy !== changes['uppy'].previousValue && changes['uppy'].previousValue !== undefined) {\n this.uninstall(changes['uppy'].previousValue);\n this.uppy.use(plugin, this.options);\n }\n this.options = { ...this.options, ...this.props }\n this.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n if(changes['props'] && this.props !== changes['props'].previousValue && changes['props'].previousValue !== undefined) {\n this.plugin.setOptions({ ...this.options })\n }\n }\n\n uninstall(uppy = this.uppy): void {\n console.log('Uninstalling...')\n uppy.removePlugin(this.plugin!);\n }\n\n}\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport Dashboard from '@uppy/dashboard';\nimport type { DashboardOptions } from '@uppy/dashboard';\nimport { Uppy } from '@uppy/core';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-dashboard',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DashboardComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: DashboardOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:Dashboard', inline: true, target: this.el.nativeElement }, Dashboard)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, Dashboard);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DashboardComponent } from './dashboard.component';\n\nexport const COMPONENTS = [DashboardComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDashboardModule { }\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport Dashboard from '@uppy/dashboard';\nimport type { DashboardOptions } from '@uppy/dashboard';\nimport { Uppy } from '@uppy/core';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-dashboard-modal',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DashboardModalComponent extends UppyAngularWrapper<Dashboard> implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: DashboardOptions = {};\n @Input() open: boolean = false;\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({\n id: 'angular:DashboardModal',\n inline: false,\n target: this.el.nativeElement\n }, Dashboard)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, Dashboard);\n // Handle dashboard-modal specific changes\n if (changes['open'] && this.open !== changes['open'].previousValue) {\n if(this.open && !changes['open'].previousValue) {\n this.plugin!.openModal()\n }\n if (!this.open && changes['open'].previousValue) {\n this.plugin!.closeModal()\n }\n }\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DashboardModalComponent } from './dashboard-modal.component';\n\nexport const COMPONENTS = [DashboardModalComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDashboardModalModule { }\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport ProgressBar from '@uppy/progress-bar';\nimport type { ProgressBarOptions } from '@uppy/progress-bar';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-progress-bar',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ProgressBarComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: ProgressBarOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:ProgressBar', target: this.el.nativeElement }, ProgressBar)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, ProgressBar);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ProgressBarComponent } from './progress-bar.component';\n\nexport const COMPONENTS = [ProgressBarComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularProgressBarModule { }\n","import { Component, ChangeDetectionStrategy, Input, ElementRef, SimpleChange, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport StatusBar from '@uppy/status-bar';\nimport type { StatusBarOptions } from '@uppy/status-bar';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-status-bar',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class StatusBarComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: StatusBarOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:StatusBar', target: this.el.nativeElement }, StatusBar)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, StatusBar);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { StatusBarComponent } from './status-bar.component';\n\nexport const COMPONENTS = [StatusBarComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularStatusBarModule { }\n","import { Component, ChangeDetectionStrategy, Input, OnDestroy, OnChanges, SimpleChanges, ElementRef } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport DragDrop from '@uppy/drag-drop';\nimport type { DragDropOptions } from '@uppy/drag-drop';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-drag-drop',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DragDropComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: DragDropOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:DragDrop', target: this.el.nativeElement }, DragDrop)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, DragDrop);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DragDropComponent } from './drag-drop.component';\n\nexport const COMPONENTS = [DragDropComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDragDropModule { }\n","/*\n * Public API Surface of @uppy/angular\n */\n\nexport { UppyAngularDashboardModule } from './lib/components/dashboard/dashboard.module'\nexport { UppyAngularDashboardModalModule } from './lib/components/dashboard-modal/dashboard-modal.module'\nexport { UppyAngularProgressBarModule } from './lib/components/progress-bar/progress-bar.module'\nexport { UppyAngularStatusBarModule } from './lib/components/status-bar/status-bar.module'\nexport { UppyAngularDragDropModule } from './lib/components/drag-drop/drag-drop.module'\nexport { StatusBarComponent } from './lib/components/status-bar/status-bar.component'\nexport { ProgressBarComponent } from './lib/components/progress-bar/progress-bar.component'\nexport { DragDropComponent } from './lib/components/drag-drop/drag-drop.component'\nexport { DashboardComponent } from './lib/components/dashboard/dashboard.component'\nexport { DashboardModalComponent } from './lib/components/dashboard-modal/dashboard-modal.component'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["COMPONENTS"],"mappings":";;;;;;;;MAMsB,kBAAkB;IAOpC,OAAO,CAAC,cAAuC,EAAE,MAAmE;QAClH,IAAI,CAAC,OAAO,mCACP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QAAQ,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;iGAEU,IAAI;sBAAZ,KAAK;gBACG,KAAK;sBAAb,KAAK;;;ACVD,MAAM,UAAU,GAAG,CAAC,iBAAiB,CAAC,CAAC;MAKjC,yBAAyB;;sHAAzB,yBAAyB;uHAAzB,yBAAyB,iBALX,iBAAiB,aAAjB,iBAAiB;uHAK/B,yBAAyB;2FAAzB,yBAAyB;kBAJrC,QAAQ;mBAAC;oBACR,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACPD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"uppy-angular.mjs","sources":["../../../uppy/angular/src/lib/utils/wrapper.ts","../../../uppy/angular/src/lib/components/dashboard/dashboard.component.ts","../../../uppy/angular/src/lib/components/dashboard/dashboard.module.ts","../../../uppy/angular/src/lib/components/dashboard-modal/dashboard-modal.component.ts","../../../uppy/angular/src/lib/components/dashboard-modal/dashboard-modal.module.ts","../../../uppy/angular/src/lib/components/progress-bar/progress-bar.component.ts","../../../uppy/angular/src/lib/components/progress-bar/progress-bar.module.ts","../../../uppy/angular/src/lib/components/status-bar/status-bar.component.ts","../../../uppy/angular/src/lib/components/status-bar/status-bar.module.ts","../../../uppy/angular/src/lib/components/drag-drop/drag-drop.component.ts","../../../uppy/angular/src/lib/components/drag-drop/drag-drop.module.ts","../../../uppy/angular/src/public-api.ts","../../../uppy/angular/src/uppy-angular.ts"],"sourcesContent":["import type { Uppy, UIPlugin } from '@uppy/core';\nimport type { ElementRef, SimpleChanges } from '@angular/core';\nimport type { DragDropOptions } from '@uppy/drag-drop';\nimport type { StatusBarOptions } from '@uppy/status-bar';\nimport type { ProgressBarOptions } from '@uppy/progress-bar';\n\nexport abstract class UppyAngularWrapper<PluginType extends UIPlugin = UIPlugin> {\n abstract props: DragDropOptions|StatusBarOptions|ProgressBarOptions;\n abstract el: ElementRef\n abstract uppy: Uppy;\n private options: any;\n plugin: PluginType | undefined;\n\n onMount(defaultOptions: Record<string, unknown>, plugin: new (uppy: Uppy, opts?: Record<string, unknown>) => UIPlugin) {\n this.options = {\n ...defaultOptions,\n ...this.props,\n };\n\n this.uppy.use(plugin, this.options);\n this.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n }\n\n handleChanges(changes: SimpleChanges, plugin: any): void {\n // Without the last part of this conditional, it tries to uninstall before the plugin is mounted\n if (changes['uppy'] && this.uppy !== changes['uppy'].previousValue && changes['uppy'].previousValue !== undefined) {\n this.uninstall(changes['uppy'].previousValue);\n this.uppy.use(plugin, this.options);\n }\n this.options = { ...this.options, ...this.props }\n this.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n if(changes['props'] && this.props !== changes['props'].previousValue && changes['props'].previousValue !== undefined) {\n this.plugin.setOptions({ ...this.options })\n }\n }\n\n uninstall(uppy = this.uppy): void {\n console.log('Uninstalling...')\n uppy.removePlugin(this.plugin!);\n }\n\n}\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport Dashboard from '@uppy/dashboard';\nimport type { DashboardOptions } from '@uppy/dashboard';\nimport { Uppy } from '@uppy/core';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-dashboard',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DashboardComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: DashboardOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:Dashboard', inline: true, target: this.el.nativeElement }, Dashboard)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, Dashboard);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DashboardComponent } from './dashboard.component';\n\nexport const COMPONENTS = [DashboardComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDashboardModule { }\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport Dashboard from '@uppy/dashboard';\nimport type { DashboardOptions } from '@uppy/dashboard';\nimport { Uppy } from '@uppy/core';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-dashboard-modal',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DashboardModalComponent extends UppyAngularWrapper<Dashboard> implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: DashboardOptions = {};\n @Input() open: boolean = false;\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({\n id: 'angular:DashboardModal',\n inline: false,\n target: this.el.nativeElement\n }, Dashboard)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, Dashboard);\n // Handle dashboard-modal specific changes\n if (changes['open'] && this.open !== changes['open'].previousValue) {\n if(this.open && !changes['open'].previousValue) {\n this.plugin!.openModal()\n }\n if (!this.open && changes['open'].previousValue) {\n this.plugin!.closeModal()\n }\n }\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DashboardModalComponent } from './dashboard-modal.component';\n\nexport const COMPONENTS = [DashboardModalComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDashboardModalModule { }\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport ProgressBar from '@uppy/progress-bar';\nimport type { ProgressBarOptions } from '@uppy/progress-bar';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-progress-bar',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ProgressBarComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: ProgressBarOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:ProgressBar', target: this.el.nativeElement }, ProgressBar)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, ProgressBar);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ProgressBarComponent } from './progress-bar.component';\n\nexport const COMPONENTS = [ProgressBarComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularProgressBarModule { }\n","import { Component, ChangeDetectionStrategy, Input, ElementRef, SimpleChange, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport StatusBar from '@uppy/status-bar';\nimport type { StatusBarOptions } from '@uppy/status-bar';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-status-bar',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class StatusBarComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: StatusBarOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:StatusBar', target: this.el.nativeElement }, StatusBar)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, StatusBar);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { StatusBarComponent } from './status-bar.component';\n\nexport const COMPONENTS = [StatusBarComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularStatusBarModule { }\n","import { Component, ChangeDetectionStrategy, Input, OnDestroy, OnChanges, SimpleChanges, ElementRef } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport DragDrop from '@uppy/drag-drop';\nimport type { DragDropOptions } from '@uppy/drag-drop';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-drag-drop',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DragDropComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: DragDropOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:DragDrop', target: this.el.nativeElement }, DragDrop)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, DragDrop);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DragDropComponent } from './drag-drop.component';\n\nexport const COMPONENTS = [DragDropComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDragDropModule { }\n","/*\n * Public API Surface of @uppy/angular\n */\n\nexport { UppyAngularDashboardModule } from './lib/components/dashboard/dashboard.module'\nexport { UppyAngularDashboardModalModule } from './lib/components/dashboard-modal/dashboard-modal.module'\nexport { UppyAngularProgressBarModule } from './lib/components/progress-bar/progress-bar.module'\nexport { UppyAngularStatusBarModule } from './lib/components/status-bar/status-bar.module'\nexport { UppyAngularDragDropModule } from './lib/components/drag-drop/drag-drop.module'\nexport { StatusBarComponent } from './lib/components/status-bar/status-bar.component'\nexport { ProgressBarComponent } from './lib/components/progress-bar/progress-bar.component'\nexport { DragDropComponent } from './lib/components/drag-drop/drag-drop.component'\nexport { DashboardComponent } from './lib/components/dashboard/dashboard.component'\nexport { DashboardModalComponent } from './lib/components/dashboard-modal/dashboard-modal.component'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["COMPONENTS"],"mappings":";;;;;;;;MAMsB,kBAAkB;IAOpC,OAAO,CAAC,cAAuC,EAAE,MAAoE;QACnH,IAAI,CAAC,OAAO,mCACP,cAA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,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;iGAEU,IAAI;sBAAZ,KAAK;gBACG,KAAK;sBAAb,KAAK;;;ACVD,MAAM,UAAU,GAAG,CAAC,iBAAiB,CAAC,CAAC;MAKjC,yBAAyB;;sHAAzB,yBAAyB;uHAAzB,yBAAyB,iBALX,iBAAiB,aAAjB,iBAAiB;uHAK/B,yBAAyB;2FAAzB,yBAAyB;kBAJrC,QAAQ;mBAAC;oBACR,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACPD;;;;ACAA;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"uppy-angular.mjs","sources":["../../../uppy/angular/src/lib/utils/wrapper.ts","../../../uppy/angular/src/lib/components/dashboard/dashboard.component.ts","../../../uppy/angular/src/lib/components/dashboard/dashboard.module.ts","../../../uppy/angular/src/lib/components/dashboard-modal/dashboard-modal.component.ts","../../../uppy/angular/src/lib/components/dashboard-modal/dashboard-modal.module.ts","../../../uppy/angular/src/lib/components/progress-bar/progress-bar.component.ts","../../../uppy/angular/src/lib/components/progress-bar/progress-bar.module.ts","../../../uppy/angular/src/lib/components/status-bar/status-bar.component.ts","../../../uppy/angular/src/lib/components/status-bar/status-bar.module.ts","../../../uppy/angular/src/lib/components/drag-drop/drag-drop.component.ts","../../../uppy/angular/src/lib/components/drag-drop/drag-drop.module.ts","../../../uppy/angular/src/public-api.ts","../../../uppy/angular/src/uppy-angular.ts"],"sourcesContent":["import type { Uppy, UIPlugin } from '@uppy/core';\nimport type { ElementRef, SimpleChanges } from '@angular/core';\nimport type { DragDropOptions } from '@uppy/drag-drop';\nimport type { StatusBarOptions } from '@uppy/status-bar';\nimport type { ProgressBarOptions } from '@uppy/progress-bar';\n\nexport abstract class UppyAngularWrapper<PluginType extends UIPlugin = UIPlugin> {\n abstract props: DragDropOptions|StatusBarOptions|ProgressBarOptions;\n abstract el: ElementRef\n abstract uppy: Uppy;\n private options: any;\n plugin: PluginType | undefined;\n\n onMount(defaultOptions: Record<string, unknown>, plugin: new (uppy: Uppy, opts: Record<string, unknown>) => UIPlugin) {\n this.options = {\n ...defaultOptions,\n ...this.props,\n };\n\n this.uppy.use(plugin, this.options);\n this.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n }\n\n handleChanges(changes: SimpleChanges, plugin: any): void {\n // Without the last part of this conditional, it tries to uninstall before the plugin is mounted\n if (changes['uppy'] && this.uppy !== changes['uppy'].previousValue && changes['uppy'].previousValue !== undefined) {\n this.uninstall(changes['uppy'].previousValue);\n this.uppy.use(plugin, this.options);\n }\n this.options = { ...this.options, ...this.props }\n this.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n if(changes['props'] && this.props !== changes['props'].previousValue && changes['props'].previousValue !== undefined) {\n this.plugin.setOptions({ ...this.options })\n }\n }\n\n uninstall(uppy = this.uppy): void {\n console.log('Uninstalling...')\n uppy.removePlugin(this.plugin!);\n }\n\n}\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport Dashboard from '@uppy/dashboard';\nimport type { DashboardOptions } from '@uppy/dashboard';\nimport { Uppy } from '@uppy/core';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-dashboard',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DashboardComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: DashboardOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:Dashboard', inline: true, target: this.el.nativeElement }, Dashboard)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, Dashboard);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DashboardComponent } from './dashboard.component';\n\nexport const COMPONENTS = [DashboardComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDashboardModule { }\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport Dashboard from '@uppy/dashboard';\nimport type { DashboardOptions } from '@uppy/dashboard';\nimport { Uppy } from '@uppy/core';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-dashboard-modal',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DashboardModalComponent extends UppyAngularWrapper<Dashboard> implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: DashboardOptions = {};\n @Input() open: boolean = false;\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({\n id: 'angular:DashboardModal',\n inline: false,\n target: this.el.nativeElement\n }, Dashboard)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, Dashboard);\n // Handle dashboard-modal specific changes\n if (changes['open'] && this.open !== changes['open'].previousValue) {\n if(this.open && !changes['open'].previousValue) {\n this.plugin!.openModal()\n }\n if (!this.open && changes['open'].previousValue) {\n this.plugin!.closeModal()\n }\n }\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DashboardModalComponent } from './dashboard-modal.component';\n\nexport const COMPONENTS = [DashboardModalComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDashboardModalModule { }\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport ProgressBar from '@uppy/progress-bar';\nimport type { ProgressBarOptions } from '@uppy/progress-bar';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-progress-bar',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ProgressBarComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: ProgressBarOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:ProgressBar', target: this.el.nativeElement }, ProgressBar)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, ProgressBar);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ProgressBarComponent } from './progress-bar.component';\n\nexport const COMPONENTS = [ProgressBarComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularProgressBarModule { }\n","import { Component, ChangeDetectionStrategy, Input, ElementRef, SimpleChange, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport StatusBar from '@uppy/status-bar';\nimport type { StatusBarOptions } from '@uppy/status-bar';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-status-bar',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class StatusBarComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: StatusBarOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:StatusBar', target: this.el.nativeElement }, StatusBar)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, StatusBar);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { StatusBarComponent } from './status-bar.component';\n\nexport const COMPONENTS = [StatusBarComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularStatusBarModule { }\n","import { Component, ChangeDetectionStrategy, Input, OnDestroy, OnChanges, SimpleChanges, ElementRef } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport DragDrop from '@uppy/drag-drop';\nimport type { DragDropOptions } from '@uppy/drag-drop';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-drag-drop',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DragDropComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: DragDropOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:DragDrop', target: this.el.nativeElement }, DragDrop)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, DragDrop);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DragDropComponent } from './drag-drop.component';\n\nexport const COMPONENTS = [DragDropComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDragDropModule { }\n","/*\n * Public API Surface of @uppy/angular\n */\n\nexport { UppyAngularDashboardModule } from './lib/components/dashboard/dashboard.module'\nexport { UppyAngularDashboardModalModule } from './lib/components/dashboard-modal/dashboard-modal.module'\nexport { UppyAngularProgressBarModule } from './lib/components/progress-bar/progress-bar.module'\nexport { UppyAngularStatusBarModule } from './lib/components/status-bar/status-bar.module'\nexport { UppyAngularDragDropModule } from './lib/components/drag-drop/drag-drop.module'\nexport { StatusBarComponent } from './lib/components/status-bar/status-bar.component'\nexport { ProgressBarComponent } from './lib/components/progress-bar/progress-bar.component'\nexport { DragDropComponent } from './lib/components/drag-drop/drag-drop.component'\nexport { DashboardComponent } from './lib/components/dashboard/dashboard.component'\nexport { DashboardModalComponent } from './lib/components/dashboard-modal/dashboard-modal.component'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["COMPONENTS"],"mappings":";;;;;;;;MAMsB,kBAAkB;IAOpC,OAAO,CAAC,cAAuC,EAAE,MAAmE;QAClH,IAAI,CAAC,OAAO,GA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,4IAHlB,EAAE;2FAGD,iBAAiB;kBAL7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,gBAAgB;oBAC1B,QAAQ,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;iGAEU,IAAI;sBAAZ,KAAK;gBACG,KAAK;sBAAb,KAAK;;;ACVD,MAAM,UAAU,GAAG,CAAC,iBAAiB,CAAC,CAAC;MAKjC,yBAAyB;;sHAAzB,yBAAyB;uHAAzB,yBAAyB,iBALX,iBAAiB,aAAjB,iBAAiB;uHAK/B,yBAAyB;2FAAzB,yBAAyB;kBAJrC,QAAQ;mBAAC;oBACR,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACPD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"uppy-angular.mjs","sources":["../../../uppy/angular/src/lib/utils/wrapper.ts","../../../uppy/angular/src/lib/components/dashboard/dashboard.component.ts","../../../uppy/angular/src/lib/components/dashboard/dashboard.module.ts","../../../uppy/angular/src/lib/components/dashboard-modal/dashboard-modal.component.ts","../../../uppy/angular/src/lib/components/dashboard-modal/dashboard-modal.module.ts","../../../uppy/angular/src/lib/components/progress-bar/progress-bar.component.ts","../../../uppy/angular/src/lib/components/progress-bar/progress-bar.module.ts","../../../uppy/angular/src/lib/components/status-bar/status-bar.component.ts","../../../uppy/angular/src/lib/components/status-bar/status-bar.module.ts","../../../uppy/angular/src/lib/components/drag-drop/drag-drop.component.ts","../../../uppy/angular/src/lib/components/drag-drop/drag-drop.module.ts","../../../uppy/angular/src/public-api.ts","../../../uppy/angular/src/uppy-angular.ts"],"sourcesContent":["import type { Uppy, UIPlugin } from '@uppy/core';\nimport type { ElementRef, SimpleChanges } from '@angular/core';\nimport type { DragDropOptions } from '@uppy/drag-drop';\nimport type { StatusBarOptions } from '@uppy/status-bar';\nimport type { ProgressBarOptions } from '@uppy/progress-bar';\n\nexport abstract class UppyAngularWrapper<PluginType extends UIPlugin = UIPlugin> {\n abstract props: DragDropOptions|StatusBarOptions|ProgressBarOptions;\n abstract el: ElementRef\n abstract uppy: Uppy;\n private options: any;\n plugin: PluginType | undefined;\n\n onMount(defaultOptions: Record<string, unknown>, plugin: new (uppy: Uppy, opts?: Record<string, unknown>) => UIPlugin) {\n this.options = {\n ...defaultOptions,\n ...this.props,\n };\n\n this.uppy.use(plugin, this.options);\n this.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n }\n\n handleChanges(changes: SimpleChanges, plugin: any): void {\n // Without the last part of this conditional, it tries to uninstall before the plugin is mounted\n if (changes['uppy'] && this.uppy !== changes['uppy'].previousValue && changes['uppy'].previousValue !== undefined) {\n this.uninstall(changes['uppy'].previousValue);\n this.uppy.use(plugin, this.options);\n }\n this.options = { ...this.options, ...this.props }\n this.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n if(changes['props'] && this.props !== changes['props'].previousValue && changes['props'].previousValue !== undefined) {\n this.plugin.setOptions({ ...this.options })\n }\n }\n\n uninstall(uppy = this.uppy): void {\n console.log('Uninstalling...')\n uppy.removePlugin(this.plugin!);\n }\n\n}\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport Dashboard from '@uppy/dashboard';\nimport type { DashboardOptions } from '@uppy/dashboard';\nimport { Uppy } from '@uppy/core';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-dashboard',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DashboardComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: DashboardOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:Dashboard', inline: true, target: this.el.nativeElement }, Dashboard)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, Dashboard);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DashboardComponent } from './dashboard.component';\n\nexport const COMPONENTS = [DashboardComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDashboardModule { }\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport Dashboard from '@uppy/dashboard';\nimport type { DashboardOptions } from '@uppy/dashboard';\nimport { Uppy } from '@uppy/core';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-dashboard-modal',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DashboardModalComponent extends UppyAngularWrapper<Dashboard> implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: DashboardOptions = {};\n @Input() open: boolean = false;\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({\n id: 'angular:DashboardModal',\n inline: false,\n target: this.el.nativeElement\n }, Dashboard)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, Dashboard);\n // Handle dashboard-modal specific changes\n if (changes['open'] && this.open !== changes['open'].previousValue) {\n if(this.open && !changes['open'].previousValue) {\n this.plugin!.openModal()\n }\n if (!this.open && changes['open'].previousValue) {\n this.plugin!.closeModal()\n }\n }\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DashboardModalComponent } from './dashboard-modal.component';\n\nexport const COMPONENTS = [DashboardModalComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDashboardModalModule { }\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport ProgressBar from '@uppy/progress-bar';\nimport type { ProgressBarOptions } from '@uppy/progress-bar';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-progress-bar',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ProgressBarComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: ProgressBarOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:ProgressBar', target: this.el.nativeElement }, ProgressBar)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, ProgressBar);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ProgressBarComponent } from './progress-bar.component';\n\nexport const COMPONENTS = [ProgressBarComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularProgressBarModule { }\n","import { Component, ChangeDetectionStrategy, Input, ElementRef, SimpleChange, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport StatusBar from '@uppy/status-bar';\nimport type { StatusBarOptions } from '@uppy/status-bar';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-status-bar',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class StatusBarComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: StatusBarOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:StatusBar', target: this.el.nativeElement }, StatusBar)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, StatusBar);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { StatusBarComponent } from './status-bar.component';\n\nexport const COMPONENTS = [StatusBarComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularStatusBarModule { }\n","import { Component, ChangeDetectionStrategy, Input, OnDestroy, OnChanges, SimpleChanges, ElementRef } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport DragDrop from '@uppy/drag-drop';\nimport type { DragDropOptions } from '@uppy/drag-drop';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-drag-drop',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DragDropComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy = new Uppy;\n @Input() props: DragDropOptions = {};\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:DragDrop', target: this.el.nativeElement }, DragDrop)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, DragDrop);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DragDropComponent } from './drag-drop.component';\n\nexport const COMPONENTS = [DragDropComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDragDropModule { }\n","/*\n * Public API Surface of @uppy/angular\n */\n\nexport { UppyAngularDashboardModule } from './lib/components/dashboard/dashboard.module'\nexport { UppyAngularDashboardModalModule } from './lib/components/dashboard-modal/dashboard-modal.module'\nexport { UppyAngularProgressBarModule } from './lib/components/progress-bar/progress-bar.module'\nexport { UppyAngularStatusBarModule } from './lib/components/status-bar/status-bar.module'\nexport { UppyAngularDragDropModule } from './lib/components/drag-drop/drag-drop.module'\nexport { StatusBarComponent } from './lib/components/status-bar/status-bar.component'\nexport { ProgressBarComponent } from './lib/components/progress-bar/progress-bar.component'\nexport { DragDropComponent } from './lib/components/drag-drop/drag-drop.component'\nexport { DashboardComponent } from './lib/components/dashboard/dashboard.component'\nexport { DashboardModalComponent } from './lib/components/dashboard-modal/dashboard-modal.component'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["COMPONENTS"],"mappings":";;;;;;;;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,WAAW;QACT,IAAI,CAAC,SAAS,EAAE,CAAC;KAClB;;8GAlBU,iBAAiB;kGAAjB,iBAAiB,4IAHlB,EAAE;2FAGD,iBAAiB;kBAL7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,gBAAgB;oBAC1B,QAAQ,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;iGAEU,IAAI;sBAAZ,KAAK;gBACG,KAAK;sBAAb,KAAK;;;ACVD,MAAM,UAAU,GAAG,CAAC,iBAAiB,CAAC,CAAC;MAKjC,yBAAyB;;sHAAzB,yBAAyB;uHAAzB,yBAAyB,iBALX,iBAAiB,aAAjB,iBAAiB;uHAK/B,yBAAyB;2FAAzB,yBAAyB;kBAJrC,QAAQ;mBAAC;oBACR,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACPD;;;;ACAA;;;;;;"}
@@ -9,7 +9,7 @@ export declare abstract class UppyAngularWrapper<PluginType extends UIPlugin = U
9
9
  abstract uppy: Uppy;
10
10
  private options;
11
11
  plugin: PluginType | undefined;
12
- onMount(defaultOptions: Record<string, unknown>, plugin: new (uppy: Uppy, opts: Record<string, unknown>) => UIPlugin): void;
12
+ onMount(defaultOptions: Record<string, unknown>, plugin: new (uppy: Uppy, opts?: Record<string, unknown>) => UIPlugin): void;
13
13
  handleChanges(changes: SimpleChanges, plugin: any): void;
14
14
  uninstall(uppy?: Uppy): void;
15
15
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uppy/angular",
3
3
  "description": "Angular component wrappers around Uppy's official UI plugins.",
4
- "version": "0.3.0",
4
+ "version": "0.3.2",
5
5
  "license": "MIT",
6
6
  "homepage": "https://uppy.io",
7
7
  "keywords": [
@@ -22,10 +22,10 @@
22
22
  "@angular/common": ">= 11",
23
23
  "@angular/core": ">= 11",
24
24
  "@uppy/core": ">=1",
25
- "@uppy/dashboard": "^2.1.4",
26
- "@uppy/drag-drop": "^2.0.6",
27
- "@uppy/progress-bar": "^2.0.4",
28
- "@uppy/status-bar": "^2.1.2",
25
+ "@uppy/dashboard": "^2.4.3",
26
+ "@uppy/drag-drop": "^2.1.2",
27
+ "@uppy/progress-bar": "^2.1.2",
28
+ "@uppy/status-bar": "^2.2.2",
29
29
  "@uppy/utils": ">=3"
30
30
  },
31
31
  "module": "fesm2015/uppy-angular.mjs",