@uppy/angular 1.1.0 → 2.0.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,191 @@
1
+ # @uppy/angular
2
+
3
+ ## 2.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4fb2efb: Add Support for Angular 22
8
+ - 1e2d2ee: Add support for Angular 21
9
+
10
+ ### Patch Changes
11
+
12
+ - c3c7cef: Bump shared runtime dependencies (preact, nanoid, lodash, classnames, shallow-equal, pretty-bytes, p-queue, tus-js-client, @transloadit/types @transloadit/prettier-bytes v1, is-mobile, exifr, compressorjs, rxjs, tslib). Also includes type-only fixes in `@uppy/companion`'s `jwt.ts` and `request.ts` to track `@types/jsonwebtoken` v9 and `@types/node`.
13
+ - 8c5814b: Upgrade runtime dependencies. Companion moves to `ws` 8.21.1, `morgan` 1.11.0,
14
+ `helmet` 8.3.0, `ioredis` 5.11.1, `serialize-javascript` 7.0.7,
15
+ `content-disposition` 2.0.1 and `p-map` 7.0.5. `@uppy/angular` moves to
16
+ `zone.js` ~0.16.2, matching its Angular 21 peer range.
17
+ - Updated dependencies [675697d]
18
+ - Updated dependencies [7e8e04f]
19
+ - Updated dependencies [c3c7cef]
20
+ - Updated dependencies [ddffd2c]
21
+ - Updated dependencies [2608032]
22
+ - Updated dependencies [b9253f7]
23
+ - Updated dependencies [260804f]
24
+ - Updated dependencies [7ac2623]
25
+ - Updated dependencies [ad4050b]
26
+ - Updated dependencies [4a0e6c9]
27
+ - Updated dependencies [84ad853]
28
+ - Updated dependencies [1a1aef3]
29
+ - @uppy/core@6.0.0
30
+ - @uppy/status-bar@6.0.0
31
+ - @uppy/dashboard@6.0.0
32
+
33
+ ## 1.1.0
34
+
35
+ ### Minor Changes
36
+
37
+ - 72d2d68: Remove @uppy/utils and add @uppy/status-bar to peerDependencies
38
+
39
+ ## 1.0.1
40
+
41
+ ### Patch Changes
42
+
43
+ - 975317d: Removed "main" from package.json, since export maps serve as the contract for the public API.
44
+ - Updated dependencies [4b6a76c]
45
+ - Updated dependencies [975317d]
46
+ - Updated dependencies [9bac4c8]
47
+ - @uppy/core@5.0.2
48
+ - @uppy/dashboard@5.0.2
49
+ - @uppy/utils@7.0.2
50
+
51
+ ## 1.0.0
52
+
53
+ ### Patch Changes
54
+
55
+ - Updated dependencies [e869243]
56
+ - Updated dependencies [d301c01]
57
+ - Updated dependencies [c5b51f6]
58
+ - @uppy/dashboard@5.0.0
59
+ - @uppy/utils@7.0.0
60
+ - @uppy/core@5.0.0
61
+
62
+ ## 0.9.2
63
+
64
+ ### Patch Changes
65
+
66
+ - 8f8ee09: Nothing changed, just a release to fix the broken previous release.
67
+
68
+ ## 0.9.1
69
+
70
+ ### Patch Changes
71
+
72
+ - 7eec173: Remove "files" array from package.json
73
+
74
+ ## 0.9.0
75
+
76
+ ### Minor Changes
77
+
78
+ - 8b8ab01: Declare components as standalone & support 20.x
79
+
80
+ ### Patch Changes
81
+
82
+ - 1b1a9e3: Define "files" in package.json
83
+ - Updated dependencies [1b1a9e3]
84
+ - @uppy/progress-bar@4.3.2
85
+ - @uppy/status-bar@4.2.2
86
+ - @uppy/dashboard@4.4.2
87
+ - @uppy/drag-drop@4.2.2
88
+ - @uppy/utils@6.2.2
89
+ - @uppy/core@4.5.2
90
+
91
+ ## 0.8.0
92
+
93
+ Released: 2025-04-14
94
+ Included in: Uppy v4.15.0
95
+
96
+ - @uppy/angular: Support Angular 19 (#5709) (Arnaud Flaesch / #5715)
97
+
98
+ ## 0.7.0-beta.5
99
+
100
+ Released: 2024-06-04
101
+ Included in: Uppy v4.0.0-beta.10
102
+
103
+ - @uppy/angular: fix invalid char in `package.json` (Antoine du Hamel / #5224)
104
+ - @uppy/angular: upgrade to Angular 18 (Antoine du Hamel / #5215)
105
+
106
+ ## 0.7.0-beta.2
107
+
108
+ Released: 2024-04-11
109
+ Included in: Uppy v4.0.0-beta.2
110
+
111
+ - @uppy/angular: fix Angular version requirement in peerDeps (Antoine du Hamel / #5067)
112
+
113
+ ## 0.7.0-beta.1
114
+
115
+ Released: 2024-03-28
116
+ Included in: Uppy v4.0.0-beta.1
117
+
118
+ - @uppy/angular: upgrade to Angular 17.x and to TS 5.4 (Antoine du Hamel / #5008)
119
+ - @uppy/angular: fix build (Antoine du Hamel)
120
+
121
+ ## 0.6.0
122
+
123
+ Released: 2023-09-05
124
+ Included in: Uppy v3.15.0
125
+
126
+ - @uppy/angular: upgrade to Angular 16.x (Antoine du Hamel / #4642)
127
+
128
+ ## 0.5.0
129
+
130
+ Released: 2022-11-10
131
+ Included in: Uppy v3.3.0
132
+
133
+ - @uppy/angular,@uppy/utils: add `cause` support for `AbortError`s (Antoine du Hamel / #4198)
134
+
135
+ ## 0.4.3
136
+
137
+ Released: 2022-10-19
138
+ Included in: Uppy v3.2.0
139
+
140
+ - @uppy/angular: remove unnecessary `console.log` call (Antoine du Hamel / #4139)
141
+
142
+ ## 0.4.2
143
+
144
+ Released: 2022-09-25
145
+ Included in: Uppy v3.1.0
146
+
147
+ - @uppy/angular: Fix angular build error (Murderlon)
148
+
149
+ ## 0.4.1
150
+
151
+ Released: 2022-08-30
152
+ Included in: Uppy v3.0.1
153
+
154
+ - @uppy/angular: fix compiler warning (Antoine du Hamel / #4064)
155
+ - @uppy/angular: fix peer dependencies (Antoine du Hamel / #4035)
156
+
157
+ ## 0.4.0
158
+
159
+ Released: 2022-08-22
160
+ Included in: Uppy v3.0.0
161
+
162
+ - @uppy/angular: upgrade to Angular 14 (Antoine du Hamel / #3997)
163
+
164
+ ## 0.3.1
165
+
166
+ Released: 2022-05-30
167
+ Included in: Uppy v2.11.0
168
+
169
+ - @uppy/angular,@uppy/audio,@uppy/aws-s3-multipart,@uppy/aws-s3,@uppy/box,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/progress-bar,@uppy/react,@uppy/redux-dev-tools,@uppy/robodog,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/store-redux,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: doc: update bundler recommendation (Antoine du Hamel / #3763)
170
+
171
+ ## 0.3.0
172
+
173
+ Released: 2022-03-02
174
+ Included in: Uppy v2.7.0
175
+
176
+ - @uppy/angular: update ng version (Antoine du Hamel / #3503)
177
+
178
+ ## 0.2.8
179
+
180
+ Released: 2021-12-21
181
+ Included in: Uppy v2.3.2
182
+
183
+ - @uppy/angular,@uppy/companion,@uppy/svelte,@uppy/vue: add `.npmignore` files to ignore `.gitignore` when packing (Antoine du Hamel / #3380)
184
+ - @uppy/angular: Fix module field in `package.json` (Merlijn Vos / #3365)
185
+
186
+ ## 0.2.6
187
+
188
+ Released: 2021-12-07
189
+ Included in: Uppy v2.3.0
190
+
191
+ - @uppy/angular: examples: update `angular-example` to Angular v13 (Antoine du Hamel / #3325)
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Transloadit
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -11,7 +11,23 @@ Uppy is being developed by the folks at [Transloadit](https://transloadit.com),
11
11
  ## Example
12
12
 
13
13
  ```ts
14
- // TODO
14
+ import { Component, type OnDestroy } from '@angular/core'
15
+ import { DashboardComponent } from '@uppy/angular'
16
+ import Uppy from '@uppy/core'
17
+
18
+ @Component({
19
+ selector: 'app-uploader',
20
+ standalone: true,
21
+ imports: [DashboardComponent],
22
+ template: '<uppy-dashboard [uppy]="uppy"></uppy-dashboard>',
23
+ })
24
+ export class UploaderComponent implements OnDestroy {
25
+ readonly uppy = new Uppy()
26
+
27
+ ngOnDestroy(): void {
28
+ this.uppy.destroy()
29
+ }
30
+ }
15
31
  ```
16
32
 
17
33
  ## Installation
@@ -26,6 +42,9 @@ Alternatively, you can also use this plugin in a pre-built bundle from Transload
26
42
 
27
43
  Documentation for this plugin can be found on the [Uppy website](https://uppy.io/docs/).
28
44
 
45
+ For a managed processing backend, follow the canonical
46
+ [Angular + Uppy + Transloadit guide](https://uppy.io/docs/guides/uppy-transloadit/#angular).
47
+
29
48
  ## License
30
49
 
31
50
  [The MIT License](./LICENSE).
@@ -5,6 +5,8 @@ import Dashboard from '@uppy/dashboard';
5
5
  import StatusBar from '@uppy/status-bar';
6
6
 
7
7
  class UppyAngularWrapper {
8
+ options;
9
+ plugin;
8
10
  onMount(defaultOptions, plugin) {
9
11
  this.options = {
10
12
  ...defaultOptions,
@@ -36,11 +38,11 @@ class UppyAngularWrapper {
36
38
  }
37
39
 
38
40
  class DashboardComponent extends UppyAngularWrapper {
41
+ el = inject(ElementRef);
42
+ uppy = new Uppy();
43
+ props = {};
39
44
  constructor() {
40
45
  super();
41
- this.el = inject(ElementRef);
42
- this.uppy = new Uppy();
43
- this.props = {};
44
46
  }
45
47
  ngOnInit() {
46
48
  this.onMount({ id: "angular:Dashboard", inline: true, target: this.el.nativeElement }, Dashboard);
@@ -51,10 +53,10 @@ class DashboardComponent extends UppyAngularWrapper {
51
53
  ngOnDestroy() {
52
54
  this.uninstall();
53
55
  }
54
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DashboardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
55
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: DashboardComponent, isStandalone: true, selector: "uppy-dashboard", inputs: { uppy: "uppy", props: "props" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
56
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: DashboardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
57
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: DashboardComponent, isStandalone: true, selector: "uppy-dashboard", inputs: { uppy: "uppy", props: "props" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
56
58
  }
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DashboardComponent, decorators: [{
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: DashboardComponent, decorators: [{
58
60
  type: Component,
59
61
  args: [{
60
62
  selector: "uppy-dashboard",
@@ -69,12 +71,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
69
71
  }] } });
70
72
 
71
73
  class DashboardModalComponent extends UppyAngularWrapper {
74
+ el = inject(ElementRef);
75
+ uppy = new Uppy();
76
+ props = {};
77
+ open = false;
72
78
  constructor() {
73
79
  super();
74
- this.el = inject(ElementRef);
75
- this.uppy = new Uppy();
76
- this.props = {};
77
- this.open = false;
78
80
  }
79
81
  ngOnInit() {
80
82
  this.onMount({
@@ -98,10 +100,10 @@ class DashboardModalComponent extends UppyAngularWrapper {
98
100
  ngOnDestroy() {
99
101
  this.uninstall();
100
102
  }
101
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DashboardModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
102
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: DashboardModalComponent, isStandalone: true, selector: "uppy-dashboard-modal", inputs: { uppy: "uppy", props: "props", open: "open" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
103
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: DashboardModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
104
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: DashboardModalComponent, isStandalone: true, selector: "uppy-dashboard-modal", inputs: { uppy: "uppy", props: "props", open: "open" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
103
105
  }
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DashboardModalComponent, decorators: [{
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: DashboardModalComponent, decorators: [{
105
107
  type: Component,
106
108
  args: [{
107
109
  selector: "uppy-dashboard-modal",
@@ -118,11 +120,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
118
120
  }] } });
119
121
 
120
122
  class StatusBarComponent extends UppyAngularWrapper {
123
+ el = inject(ElementRef);
124
+ uppy = new Uppy();
125
+ props = {};
121
126
  constructor() {
122
127
  super();
123
- this.el = inject(ElementRef);
124
- this.uppy = new Uppy();
125
- this.props = {};
126
128
  }
127
129
  ngOnInit() {
128
130
  this.onMount({ id: "angular:StatusBar", target: this.el.nativeElement }, StatusBar);
@@ -133,10 +135,10 @@ class StatusBarComponent extends UppyAngularWrapper {
133
135
  ngOnDestroy() {
134
136
  this.uninstall();
135
137
  }
136
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: StatusBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
137
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: StatusBarComponent, isStandalone: true, selector: "uppy-status-bar", inputs: { uppy: "uppy", props: "props" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
138
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: StatusBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
139
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: StatusBarComponent, isStandalone: true, selector: "uppy-status-bar", inputs: { uppy: "uppy", props: "props" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
138
140
  }
139
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: StatusBarComponent, decorators: [{
141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: StatusBarComponent, decorators: [{
140
142
  type: Component,
141
143
  args: [{
142
144
  selector: "uppy-status-bar",
@@ -1 +1 @@
1
- {"version":3,"file":"uppy-angular.mjs","sources":["../../../../projects/uppy/angular/src/lib/utils/wrapper.ts","../../../../projects/uppy/angular/src/lib/components/dashboard/dashboard.component.ts","../../../../projects/uppy/angular/src/lib/components/dashboard-modal/dashboard-modal.component.ts","../../../../projects/uppy/angular/src/lib/components/status-bar/status-bar.component.ts","../../../../projects/uppy/angular/src/public-api.ts","../../../../projects/uppy/angular/src/uppy-angular.ts"],"sourcesContent":["import type { ElementRef, SimpleChanges } from \"@angular/core\";\nimport type { UIPlugin, UIPluginOptions, Uppy } from \"@uppy/core\";\nimport type { DashboardOptions } from \"@uppy/dashboard\";\nimport type { Body, Meta } from \"@uppy/utils\";\n\nexport abstract class UppyAngularWrapper<\n\tM extends Meta,\n\tB extends Body,\n\tOpts extends UIPluginOptions,\n\tPluginType extends UIPlugin<Opts, M, B> = UIPlugin<Opts, M, B>,\n> {\n\tabstract props: DashboardOptions<M, B>;\n\tabstract el: ElementRef;\n\tabstract uppy: Uppy<M, B>;\n\tprivate options: any;\n\tplugin: PluginType | undefined;\n\n\tonMount(\n\t\tdefaultOptions: Partial<Opts>,\n\t\tplugin: new (uppy: any, opts?: Opts) => UIPlugin<Opts, M, B>,\n\t) {\n\t\tthis.options = {\n\t\t\t...defaultOptions,\n\t\t\t...this.props,\n\t\t};\n\n\t\tthis.uppy.use(plugin, this.options);\n\t\tthis.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n\t}\n\n\thandleChanges(changes: SimpleChanges, plugin: any): void {\n\t\t// Without the last part of this conditional, it tries to uninstall before the plugin is mounted\n\t\tif (\n\t\t\tchanges[\"uppy\"] &&\n\t\t\tthis.uppy !== changes[\"uppy\"].previousValue &&\n\t\t\tchanges[\"uppy\"].previousValue !== undefined\n\t\t) {\n\t\t\tthis.uninstall(changes[\"uppy\"].previousValue);\n\t\t\t// @ts-expect-error The options correspond to the plugin, I swear\n\t\t\tthis.uppy.use(plugin, this.options);\n\t\t}\n\t\tthis.options = { ...this.options, ...this.props };\n\t\tthis.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n\t\tif (\n\t\t\tchanges[\"props\"] &&\n\t\t\tthis.props !== changes[\"props\"].previousValue &&\n\t\t\tchanges[\"props\"].previousValue !== undefined\n\t\t) {\n\t\t\tthis.plugin.setOptions({ ...this.options });\n\t\t}\n\t}\n\n\tuninstall(uppy = this.uppy): void {\n\t\tuppy.removePlugin(this.plugin!);\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tInput,\n\tinject,\n\ttype OnChanges,\n\ttype OnDestroy,\n\ttype SimpleChanges,\n} from \"@angular/core\";\nimport { Uppy } from \"@uppy/core\";\nimport type { DashboardOptions } from \"@uppy/dashboard\";\nimport Dashboard from \"@uppy/dashboard\";\nimport type { Body, Meta } from \"@uppy/utils\";\nimport { UppyAngularWrapper } from \"../../utils/wrapper\";\n\n@Component({\n\tselector: \"uppy-dashboard\",\n\ttemplate: \"\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n})\nexport class DashboardComponent<M extends Meta, B extends Body>\n\textends UppyAngularWrapper<M, B, DashboardOptions<M, B>>\n\timplements OnDestroy, OnChanges\n{\n\tel = inject(ElementRef);\n\n\t@Input() uppy: Uppy<M, B> = new Uppy();\n\t@Input() props: DashboardOptions<M, B> = {};\n\n\t/** Inserted by Angular inject() migration for backwards compatibility */\n\tconstructor(...args: unknown[]);\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tngOnInit() {\n\t\tthis.onMount(\n\t\t\t{ id: \"angular:Dashboard\", inline: true, target: this.el.nativeElement },\n\t\t\tDashboard,\n\t\t);\n\t}\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tthis.handleChanges(changes, Dashboard);\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.uninstall();\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tInput,\n\tinject,\n\ttype OnChanges,\n\ttype OnDestroy,\n\ttype SimpleChanges,\n} from \"@angular/core\";\nimport { Uppy } from \"@uppy/core\";\nimport type { DashboardOptions } from \"@uppy/dashboard\";\nimport Dashboard from \"@uppy/dashboard\";\nimport type { Body, Meta } from \"@uppy/utils\";\nimport { UppyAngularWrapper } from \"../../utils/wrapper\";\n\n@Component({\n\tselector: \"uppy-dashboard-modal\",\n\ttemplate: \"\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n})\nexport class DashboardModalComponent<M extends Meta, B extends Body>\n\textends UppyAngularWrapper<M, B, DashboardOptions<M, B>, Dashboard<M, B>>\n\timplements OnDestroy, OnChanges\n{\n\tel = inject(ElementRef);\n\n\t@Input() uppy: Uppy<M, B> = new Uppy();\n\t@Input() props: DashboardOptions<M, B> = {};\n\t@Input() open: boolean = false;\n\n\t/** Inserted by Angular inject() migration for backwards compatibility */\n\tconstructor(...args: unknown[]);\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tngOnInit() {\n\t\tthis.onMount(\n\t\t\t{\n\t\t\t\tid: \"angular:DashboardModal\",\n\t\t\t\tinline: false,\n\t\t\t\ttarget: this.el.nativeElement,\n\t\t\t},\n\t\t\tDashboard,\n\t\t);\n\t}\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tthis.handleChanges(changes, Dashboard);\n\t\t// Handle dashboard-modal specific changes\n\t\tif (changes[\"open\"] && this.open !== changes[\"open\"].previousValue) {\n\t\t\tif (this.open && !changes[\"open\"].previousValue) {\n\t\t\t\tthis.plugin!.openModal();\n\t\t\t}\n\t\t\tif (!this.open && changes[\"open\"].previousValue) {\n\t\t\t\tthis.plugin!.closeModal();\n\t\t\t}\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.uninstall();\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tInput,\n\tinject,\n\ttype OnChanges,\n\ttype OnDestroy,\n\ttype SimpleChanges,\n} from \"@angular/core\";\nimport { Uppy } from \"@uppy/core\";\nimport type { StatusBarOptions } from \"@uppy/status-bar\";\nimport StatusBar from \"@uppy/status-bar\";\nimport type { Body, Meta } from \"@uppy/utils\";\nimport { UppyAngularWrapper } from \"../../utils/wrapper\";\n\n@Component({\n\tselector: \"uppy-status-bar\",\n\ttemplate: \"\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n})\nexport class StatusBarComponent<M extends Meta, B extends Body>\n\textends UppyAngularWrapper<M, B, StatusBarOptions>\n\timplements OnDestroy, OnChanges\n{\n\tel = inject(ElementRef);\n\n\t@Input() uppy: Uppy<M, B> = new Uppy();\n\t@Input() props: StatusBarOptions = {};\n\n\t/** Inserted by Angular inject() migration for backwards compatibility */\n\tconstructor(...args: unknown[]);\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tngOnInit() {\n\t\tthis.onMount(\n\t\t\t{ id: \"angular:StatusBar\", target: this.el.nativeElement },\n\t\t\tStatusBar,\n\t\t);\n\t}\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tthis.handleChanges(changes, StatusBar);\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.uninstall();\n\t}\n}\n","/*\n * Public API Surface of @uppy/angular\n */\n\nexport { DashboardComponent } from './lib/components/dashboard/dashboard.component'\nexport { DashboardModalComponent } from './lib/components/dashboard-modal/dashboard-modal.component'\nexport { StatusBarComponent } from './lib/components/status-bar/status-bar.component'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAKsB,kBAAkB,CAAA;IAYvC,OAAO,CACN,cAA6B,EAC7B,MAA4D,EAAA;QAE5D,IAAI,CAAC,OAAO,GAAG;AACd,YAAA,GAAG,cAAc;YACjB,GAAG,IAAI,CAAC,KAAK;SACb;QAED,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC;AACnC,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AA,CAAA;kBAN9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,UAAU,EAAE,IAAI;AAChB,iBAAA;wDAOS,IAAI,EAAA,CAAA;sBAAZ;gBACQ,KAAK,EAAA,CAAA;sBAAb;;;AC7BF;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"uppy-angular.mjs","sources":["../../src/utils/wrapper.ts","../../src/components/dashboard/dashboard.component.ts","../../src/components/dashboard-modal/dashboard-modal.component.ts","../../src/components/status-bar/status-bar.component.ts","../../src/public-api.ts","../../src/uppy-angular.ts"],"sourcesContent":["import type { ElementRef, SimpleChanges } from \"@angular/core\";\nimport type { UIPlugin, UIPluginOptions, Uppy, Body, Meta } from \"@uppy/core\";\nimport type { DashboardOptions } from \"@uppy/dashboard\";\n\nexport abstract class UppyAngularWrapper<\n\tM extends Meta,\n\tB extends Body,\n\tOpts extends UIPluginOptions,\n\tPluginType extends UIPlugin<Opts, M, B> = UIPlugin<Opts, M, B>,\n> {\n\tabstract props: DashboardOptions<M, B>;\n\tabstract el: ElementRef;\n\tabstract uppy: Uppy<M, B>;\n\tprivate options: any;\n\tplugin: PluginType | undefined;\n\n\tonMount(\n\t\tdefaultOptions: Partial<Opts>,\n\t\tplugin: new (uppy: any, opts?: Opts) => UIPlugin<Opts, M, B>,\n\t) {\n\t\tthis.options = {\n\t\t\t...defaultOptions,\n\t\t\t...this.props,\n\t\t};\n\n\t\tthis.uppy.use(plugin, this.options);\n\t\tthis.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n\t}\n\n\thandleChanges(changes: SimpleChanges, plugin: any): void {\n\t\t// Without the last part of this conditional, it tries to uninstall before the plugin is mounted\n\t\tif (\n\t\t\tchanges[\"uppy\"] &&\n\t\t\tthis.uppy !== changes[\"uppy\"].previousValue &&\n\t\t\tchanges[\"uppy\"].previousValue !== undefined\n\t\t) {\n\t\t\tthis.uninstall(changes[\"uppy\"].previousValue);\n\t\t\t// @ts-expect-error The options correspond to the plugin, I swear\n\t\t\tthis.uppy.use(plugin, this.options);\n\t\t}\n\t\tthis.options = { ...this.options, ...this.props };\n\t\tthis.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n\t\tif (\n\t\t\tchanges[\"props\"] &&\n\t\t\tthis.props !== changes[\"props\"].previousValue &&\n\t\t\tchanges[\"props\"].previousValue !== undefined\n\t\t) {\n\t\t\tthis.plugin.setOptions({ ...this.options });\n\t\t}\n\t}\n\n\tuninstall(uppy = this.uppy): void {\n\t\tuppy.removePlugin(this.plugin!);\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tInput,\n\tinject,\n\ttype OnChanges,\n\ttype OnDestroy,\n\ttype SimpleChanges,\n} from \"@angular/core\";\nimport { Uppy } from \"@uppy/core\";\nimport type { DashboardOptions } from \"@uppy/dashboard\";\nimport Dashboard from \"@uppy/dashboard\";\nimport type { Body, Meta } from \"@uppy/core\";\nimport { UppyAngularWrapper } from \"../../utils/wrapper\";\n\n@Component({\n\tselector: \"uppy-dashboard\",\n\ttemplate: \"\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n})\nexport class DashboardComponent<M extends Meta, B extends Body>\n\textends UppyAngularWrapper<M, B, DashboardOptions<M, B>>\n\timplements OnDestroy, OnChanges\n{\n\tel = inject(ElementRef);\n\n\t@Input() uppy: Uppy<M, B> = new Uppy();\n\t@Input() props: DashboardOptions<M, B> = {};\n\n\t/** Inserted by Angular inject() migration for backwards compatibility */\n\tconstructor(...args: unknown[]);\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tngOnInit() {\n\t\tthis.onMount(\n\t\t\t{ id: \"angular:Dashboard\", inline: true, target: this.el.nativeElement },\n\t\t\tDashboard,\n\t\t);\n\t}\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tthis.handleChanges(changes, Dashboard);\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.uninstall();\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tInput,\n\tinject,\n\ttype OnChanges,\n\ttype OnDestroy,\n\ttype SimpleChanges,\n} from \"@angular/core\";\nimport { Uppy } from \"@uppy/core\";\nimport type { DashboardOptions } from \"@uppy/dashboard\";\nimport Dashboard from \"@uppy/dashboard\";\nimport type { Body, Meta } from \"@uppy/core\";\nimport { UppyAngularWrapper } from \"../../utils/wrapper\";\n\n@Component({\n\tselector: \"uppy-dashboard-modal\",\n\ttemplate: \"\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n})\nexport class DashboardModalComponent<M extends Meta, B extends Body>\n\textends UppyAngularWrapper<M, B, DashboardOptions<M, B>, Dashboard<M, B>>\n\timplements OnDestroy, OnChanges\n{\n\tel = inject(ElementRef);\n\n\t@Input() uppy: Uppy<M, B> = new Uppy();\n\t@Input() props: DashboardOptions<M, B> = {};\n\t@Input() open: boolean = false;\n\n\t/** Inserted by Angular inject() migration for backwards compatibility */\n\tconstructor(...args: unknown[]);\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tngOnInit() {\n\t\tthis.onMount(\n\t\t\t{\n\t\t\t\tid: \"angular:DashboardModal\",\n\t\t\t\tinline: false,\n\t\t\t\ttarget: this.el.nativeElement,\n\t\t\t},\n\t\t\tDashboard,\n\t\t);\n\t}\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tthis.handleChanges(changes, Dashboard);\n\t\t// Handle dashboard-modal specific changes\n\t\tif (changes[\"open\"] && this.open !== changes[\"open\"].previousValue) {\n\t\t\tif (this.open && !changes[\"open\"].previousValue) {\n\t\t\t\tthis.plugin!.openModal();\n\t\t\t}\n\t\t\tif (!this.open && changes[\"open\"].previousValue) {\n\t\t\t\tthis.plugin!.closeModal();\n\t\t\t}\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.uninstall();\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tInput,\n\tinject,\n\ttype OnChanges,\n\ttype OnDestroy,\n\ttype SimpleChanges,\n} from \"@angular/core\";\nimport { Uppy } from \"@uppy/core\";\nimport type { StatusBarOptions } from \"@uppy/status-bar\";\nimport StatusBar from \"@uppy/status-bar\";\nimport type { Body, Meta } from \"@uppy/core\";\nimport { UppyAngularWrapper } from \"../../utils/wrapper\";\n\n@Component({\n\tselector: \"uppy-status-bar\",\n\ttemplate: \"\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n})\nexport class StatusBarComponent<M extends Meta, B extends Body>\n\textends UppyAngularWrapper<M, B, StatusBarOptions>\n\timplements OnDestroy, OnChanges\n{\n\tel = inject(ElementRef);\n\n\t@Input() uppy: Uppy<M, B> = new Uppy();\n\t@Input() props: StatusBarOptions = {};\n\n\t/** Inserted by Angular inject() migration for backwards compatibility */\n\tconstructor(...args: unknown[]);\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tngOnInit() {\n\t\tthis.onMount(\n\t\t\t{ id: \"angular:StatusBar\", target: this.el.nativeElement },\n\t\t\tStatusBar,\n\t\t);\n\t}\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tthis.handleChanges(changes, StatusBar);\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.uninstall();\n\t}\n}\n","/*\n * Public API Surface of @uppy/angular\n */\n\nexport { DashboardComponent } from './components/dashboard/dashboard.component'\nexport { DashboardModalComponent } from './components/dashboard-modal/dashboard-modal.component'\nexport { StatusBarComponent } from './components/status-bar/status-bar.component'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAIsB,kBAAkB,CAAA;AAS/B,IAAA,OAAO;AACf,IAAA,MAAM;IAEN,OAAO,CACN,cAA6B,EAC7B,MAA4D,EAAA;QAE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AAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,UAAU,EAAE,IAAI;AAChB,iBAAA;;sBAOC;;sBACA;;;AC7BF;;AAEG;;ACFH;;AAEG;;;;"}
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": "1.1.0",
4
+ "version": "2.0.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://uppy.io",
7
7
  "keywords": [
@@ -18,26 +18,41 @@
18
18
  "type": "git",
19
19
  "url": "git+https://github.com/transloadit/uppy.git"
20
20
  },
21
+ "scripts": {
22
+ "build": "ng-packagr && mv dist/fesm2022 ./ && mv dist/types ./"
23
+ },
24
+ "main": "./fesm2022/uppy-angular.mjs",
25
+ "types": "./types/uppy-angular.d.ts",
26
+ "files": [
27
+ "fesm2022",
28
+ "types"
29
+ ],
21
30
  "dependencies": {
22
- "tslib": "^2.0.0"
31
+ "tslib": "^2.8.1"
23
32
  },
24
33
  "peerDependencies": {
25
- "@angular/common": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0",
26
- "@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0",
27
- "@uppy/core": "^5.0.2",
28
- "@uppy/dashboard": "^5.0.2",
29
- "@uppy/utils": "^7.0.2"
34
+ "@angular/common": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
35
+ "@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
36
+ "@uppy/core": "^6.0.0",
37
+ "@uppy/dashboard": "^6.0.0",
38
+ "@uppy/status-bar": "^6.0.0"
30
39
  },
31
- "sideEffects": false,
32
- "module": "fesm2022/uppy-angular.mjs",
33
- "typings": "index.d.ts",
34
- "exports": {
35
- "./package.json": {
36
- "default": "./package.json"
40
+ "peerDependenciesMeta": {
41
+ "@uppy/dashboard": {
42
+ "optional": true
37
43
  },
38
- ".": {
39
- "types": "./index.d.ts",
40
- "default": "./fesm2022/uppy-angular.mjs"
44
+ "@uppy/status-bar": {
45
+ "optional": true
41
46
  }
42
- }
47
+ },
48
+ "devDependencies": {
49
+ "@angular/common": "^22.1.1",
50
+ "@angular/compiler": "^22.1.1",
51
+ "@angular/compiler-cli": "^22.1.1",
52
+ "@angular/core": "^22.1.1",
53
+ "ng-packagr": "^22.1.1",
54
+ "rxjs": "~7.8.0",
55
+ "typescript": "^6.0.3"
56
+ },
57
+ "sideEffects": false
43
58
  }
@@ -0,0 +1,58 @@
1
+ import * as i0 from '@angular/core';
2
+ import { ElementRef, SimpleChanges, OnDestroy, OnChanges } from '@angular/core';
3
+ import { Meta, Body, UIPluginOptions, UIPlugin, Uppy } from '@uppy/core';
4
+ import Dashboard, { DashboardOptions } from '@uppy/dashboard';
5
+ import { StatusBarOptions } from '@uppy/status-bar';
6
+
7
+ declare abstract class UppyAngularWrapper<M extends Meta, B extends Body, Opts extends UIPluginOptions, PluginType extends UIPlugin<Opts, M, B> = UIPlugin<Opts, M, B>> {
8
+ abstract props: DashboardOptions<M, B>;
9
+ abstract el: ElementRef;
10
+ abstract uppy: Uppy<M, B>;
11
+ private options;
12
+ plugin: PluginType | undefined;
13
+ onMount(defaultOptions: Partial<Opts>, plugin: new (uppy: any, opts?: Opts) => UIPlugin<Opts, M, B>): void;
14
+ handleChanges(changes: SimpleChanges, plugin: any): void;
15
+ uninstall(uppy?: Uppy<M, B>): void;
16
+ }
17
+
18
+ declare class DashboardComponent<M extends Meta, B extends Body> extends UppyAngularWrapper<M, B, DashboardOptions<M, B>> implements OnDestroy, OnChanges {
19
+ el: ElementRef<any>;
20
+ uppy: Uppy<M, B>;
21
+ props: DashboardOptions<M, B>;
22
+ /** Inserted by Angular inject() migration for backwards compatibility */
23
+ constructor(...args: unknown[]);
24
+ ngOnInit(): void;
25
+ ngOnChanges(changes: SimpleChanges): void;
26
+ ngOnDestroy(): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<DashboardComponent<any, any>, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<DashboardComponent<any, any>, "uppy-dashboard", never, { "uppy": { "alias": "uppy"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
29
+ }
30
+
31
+ declare class DashboardModalComponent<M extends Meta, B extends Body> extends UppyAngularWrapper<M, B, DashboardOptions<M, B>, Dashboard<M, B>> implements OnDestroy, OnChanges {
32
+ el: ElementRef<any>;
33
+ uppy: Uppy<M, B>;
34
+ props: DashboardOptions<M, B>;
35
+ open: boolean;
36
+ /** Inserted by Angular inject() migration for backwards compatibility */
37
+ constructor(...args: unknown[]);
38
+ ngOnInit(): void;
39
+ ngOnChanges(changes: SimpleChanges): void;
40
+ ngOnDestroy(): void;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<DashboardModalComponent<any, any>, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<DashboardModalComponent<any, any>, "uppy-dashboard-modal", never, { "uppy": { "alias": "uppy"; "required": false; }; "props": { "alias": "props"; "required": false; }; "open": { "alias": "open"; "required": false; }; }, {}, never, never, true, never>;
43
+ }
44
+
45
+ declare class StatusBarComponent<M extends Meta, B extends Body> extends UppyAngularWrapper<M, B, StatusBarOptions> implements OnDestroy, OnChanges {
46
+ el: ElementRef<any>;
47
+ uppy: Uppy<M, B>;
48
+ props: StatusBarOptions;
49
+ /** Inserted by Angular inject() migration for backwards compatibility */
50
+ constructor(...args: unknown[]);
51
+ ngOnInit(): void;
52
+ ngOnChanges(changes: SimpleChanges): void;
53
+ ngOnDestroy(): void;
54
+ static ɵfac: i0.ɵɵFactoryDeclaration<StatusBarComponent<any, any>, never>;
55
+ static ɵcmp: i0.ɵɵComponentDeclaration<StatusBarComponent<any, any>, "uppy-status-bar", never, { "uppy": { "alias": "uppy"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
56
+ }
57
+
58
+ export { DashboardComponent, DashboardModalComponent, StatusBarComponent };
package/.eslintrc.json DELETED
@@ -1,46 +0,0 @@
1
- {
2
- "extends": "../../../.eslintrc.json",
3
- "ignorePatterns": ["!**/*"],
4
- "overrides": [
5
- {
6
- "files": ["*.ts"],
7
- "parserOptions": {
8
- "project": [
9
- "packages/@uppy/angular/projects/angular/tsconfig.lib.json",
10
- "packages/@uppy/angular/projects/angular/tsconfig.spec.json"
11
- ],
12
- "createDefaultProgram": true
13
- },
14
- "rules": {
15
- "@angular-eslint/component-selector": [
16
- "error",
17
- {
18
- "type": "element",
19
- "prefix": "uppy",
20
- "style": "kebab-case"
21
- }
22
- ],
23
- "@angular-eslint/directive-selector": [
24
- "error",
25
- {
26
- "type": "attribute",
27
- "prefix": "uppy",
28
- "style": "camelCase"
29
- }
30
- ],
31
- "dot-notation": "error",
32
- "indent": "error",
33
- "no-empty-function": "off",
34
- "no-shadow": "error",
35
- "no-unused-expressions": "error",
36
- "no-use-before-define": "off",
37
- "quotes": "error",
38
- "semi": "error"
39
- }
40
- },
41
- {
42
- "files": ["*.html"],
43
- "rules": {}
44
- }
45
- ]
46
- }
package/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@uppy/angular" />
5
- export * from './public-api';
@@ -1,18 +0,0 @@
1
- import { ElementRef, type OnChanges, type OnDestroy, type SimpleChanges } from "@angular/core";
2
- import { Uppy } from "@uppy/core";
3
- import type { DashboardOptions } from "@uppy/dashboard";
4
- import type { Body, Meta } from "@uppy/utils";
5
- import { UppyAngularWrapper } from "../../utils/wrapper";
6
- import * as i0 from "@angular/core";
7
- export declare class DashboardComponent<M extends Meta, B extends Body> extends UppyAngularWrapper<M, B, DashboardOptions<M, B>> implements OnDestroy, OnChanges {
8
- el: ElementRef<any>;
9
- uppy: Uppy<M, B>;
10
- props: DashboardOptions<M, B>;
11
- /** Inserted by Angular inject() migration for backwards compatibility */
12
- constructor(...args: unknown[]);
13
- ngOnInit(): void;
14
- ngOnChanges(changes: SimpleChanges): void;
15
- ngOnDestroy(): void;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<DashboardComponent<any, any>, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<DashboardComponent<any, any>, "uppy-dashboard", never, { "uppy": { "alias": "uppy"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
18
- }
@@ -1,20 +0,0 @@
1
- import { ElementRef, type OnChanges, type OnDestroy, type SimpleChanges } from "@angular/core";
2
- import { Uppy } from "@uppy/core";
3
- import type { DashboardOptions } from "@uppy/dashboard";
4
- import Dashboard from "@uppy/dashboard";
5
- import type { Body, Meta } from "@uppy/utils";
6
- import { UppyAngularWrapper } from "../../utils/wrapper";
7
- import * as i0 from "@angular/core";
8
- export declare class DashboardModalComponent<M extends Meta, B extends Body> extends UppyAngularWrapper<M, B, DashboardOptions<M, B>, Dashboard<M, B>> implements OnDestroy, OnChanges {
9
- el: ElementRef<any>;
10
- uppy: Uppy<M, B>;
11
- props: DashboardOptions<M, B>;
12
- open: boolean;
13
- /** Inserted by Angular inject() migration for backwards compatibility */
14
- constructor(...args: unknown[]);
15
- ngOnInit(): void;
16
- ngOnChanges(changes: SimpleChanges): void;
17
- ngOnDestroy(): void;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<DashboardModalComponent<any, any>, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<DashboardModalComponent<any, any>, "uppy-dashboard-modal", never, { "uppy": { "alias": "uppy"; "required": false; }; "props": { "alias": "props"; "required": false; }; "open": { "alias": "open"; "required": false; }; }, {}, never, never, true, never>;
20
- }
@@ -1,18 +0,0 @@
1
- import { ElementRef, type OnChanges, type OnDestroy, type SimpleChanges } from "@angular/core";
2
- import { Uppy } from "@uppy/core";
3
- import type { StatusBarOptions } from "@uppy/status-bar";
4
- import type { Body, Meta } from "@uppy/utils";
5
- import { UppyAngularWrapper } from "../../utils/wrapper";
6
- import * as i0 from "@angular/core";
7
- export declare class StatusBarComponent<M extends Meta, B extends Body> extends UppyAngularWrapper<M, B, StatusBarOptions> implements OnDestroy, OnChanges {
8
- el: ElementRef<any>;
9
- uppy: Uppy<M, B>;
10
- props: StatusBarOptions;
11
- /** Inserted by Angular inject() migration for backwards compatibility */
12
- constructor(...args: unknown[]);
13
- ngOnInit(): void;
14
- ngOnChanges(changes: SimpleChanges): void;
15
- ngOnDestroy(): void;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<StatusBarComponent<any, any>, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<StatusBarComponent<any, any>, "uppy-status-bar", never, { "uppy": { "alias": "uppy"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
18
- }
@@ -1,14 +0,0 @@
1
- import type { ElementRef, SimpleChanges } from "@angular/core";
2
- import type { UIPlugin, UIPluginOptions, Uppy } from "@uppy/core";
3
- import type { DashboardOptions } from "@uppy/dashboard";
4
- import type { Body, Meta } from "@uppy/utils";
5
- export declare abstract class UppyAngularWrapper<M extends Meta, B extends Body, Opts extends UIPluginOptions, PluginType extends UIPlugin<Opts, M, B> = UIPlugin<Opts, M, B>> {
6
- abstract props: DashboardOptions<M, B>;
7
- abstract el: ElementRef;
8
- abstract uppy: Uppy<M, B>;
9
- private options;
10
- plugin: PluginType | undefined;
11
- onMount(defaultOptions: Partial<Opts>, plugin: new (uppy: any, opts?: Opts) => UIPlugin<Opts, M, B>): void;
12
- handleChanges(changes: SimpleChanges, plugin: any): void;
13
- uninstall(uppy?: Uppy<M, B>): void;
14
- }
package/public-api.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export { DashboardComponent } from './lib/components/dashboard/dashboard.component';
2
- export { DashboardModalComponent } from './lib/components/dashboard-modal/dashboard-modal.component';
3
- export { StatusBarComponent } from './lib/components/status-bar/status-bar.component';