@uppy/angular 1.1.0 → 2.0.1

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,199 @@
1
+ # @uppy/angular
2
+
3
+ ## 2.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 29e5b45: Fix `<uppy-dashboard-modal [open]="true">` throwing `Cannot read properties of undefined (reading 'openModal')` on the first render. Angular runs `ngOnChanges` before `ngOnInit`, so the initial `open` value is now applied after the plugin is mounted.
8
+
9
+ Also keep an open `<uppy-dashboard-modal>` open when its `uppy` input is swapped for another instance; it used to close because the plugin is reinstalled on the new instance.
10
+
11
+ ## 2.0.0
12
+
13
+ ### Minor Changes
14
+
15
+ - 4fb2efb: Add Support for Angular 22
16
+ - 1e2d2ee: Add support for Angular 21
17
+
18
+ ### Patch Changes
19
+
20
+ - 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`.
21
+ - 8c5814b: Upgrade runtime dependencies. Companion moves to `ws` 8.21.1, `morgan` 1.11.0,
22
+ `helmet` 8.3.0, `ioredis` 5.11.1, `serialize-javascript` 7.0.7,
23
+ `content-disposition` 2.0.1 and `p-map` 7.0.5. `@uppy/angular` moves to
24
+ `zone.js` ~0.16.2, matching its Angular 21 peer range.
25
+ - Updated dependencies [675697d]
26
+ - Updated dependencies [7e8e04f]
27
+ - Updated dependencies [c3c7cef]
28
+ - Updated dependencies [ddffd2c]
29
+ - Updated dependencies [2608032]
30
+ - Updated dependencies [b9253f7]
31
+ - Updated dependencies [260804f]
32
+ - Updated dependencies [7ac2623]
33
+ - Updated dependencies [ad4050b]
34
+ - Updated dependencies [4a0e6c9]
35
+ - Updated dependencies [84ad853]
36
+ - Updated dependencies [1a1aef3]
37
+ - @uppy/core@6.0.0
38
+ - @uppy/status-bar@6.0.0
39
+ - @uppy/dashboard@6.0.0
40
+
41
+ ## 1.1.0
42
+
43
+ ### Minor Changes
44
+
45
+ - 72d2d68: Remove @uppy/utils and add @uppy/status-bar to peerDependencies
46
+
47
+ ## 1.0.1
48
+
49
+ ### Patch Changes
50
+
51
+ - 975317d: Removed "main" from package.json, since export maps serve as the contract for the public API.
52
+ - Updated dependencies [4b6a76c]
53
+ - Updated dependencies [975317d]
54
+ - Updated dependencies [9bac4c8]
55
+ - @uppy/core@5.0.2
56
+ - @uppy/dashboard@5.0.2
57
+ - @uppy/utils@7.0.2
58
+
59
+ ## 1.0.0
60
+
61
+ ### Patch Changes
62
+
63
+ - Updated dependencies [e869243]
64
+ - Updated dependencies [d301c01]
65
+ - Updated dependencies [c5b51f6]
66
+ - @uppy/dashboard@5.0.0
67
+ - @uppy/utils@7.0.0
68
+ - @uppy/core@5.0.0
69
+
70
+ ## 0.9.2
71
+
72
+ ### Patch Changes
73
+
74
+ - 8f8ee09: Nothing changed, just a release to fix the broken previous release.
75
+
76
+ ## 0.9.1
77
+
78
+ ### Patch Changes
79
+
80
+ - 7eec173: Remove "files" array from package.json
81
+
82
+ ## 0.9.0
83
+
84
+ ### Minor Changes
85
+
86
+ - 8b8ab01: Declare components as standalone & support 20.x
87
+
88
+ ### Patch Changes
89
+
90
+ - 1b1a9e3: Define "files" in package.json
91
+ - Updated dependencies [1b1a9e3]
92
+ - @uppy/progress-bar@4.3.2
93
+ - @uppy/status-bar@4.2.2
94
+ - @uppy/dashboard@4.4.2
95
+ - @uppy/drag-drop@4.2.2
96
+ - @uppy/utils@6.2.2
97
+ - @uppy/core@4.5.2
98
+
99
+ ## 0.8.0
100
+
101
+ Released: 2025-04-14
102
+ Included in: Uppy v4.15.0
103
+
104
+ - @uppy/angular: Support Angular 19 (#5709) (Arnaud Flaesch / #5715)
105
+
106
+ ## 0.7.0-beta.5
107
+
108
+ Released: 2024-06-04
109
+ Included in: Uppy v4.0.0-beta.10
110
+
111
+ - @uppy/angular: fix invalid char in `package.json` (Antoine du Hamel / #5224)
112
+ - @uppy/angular: upgrade to Angular 18 (Antoine du Hamel / #5215)
113
+
114
+ ## 0.7.0-beta.2
115
+
116
+ Released: 2024-04-11
117
+ Included in: Uppy v4.0.0-beta.2
118
+
119
+ - @uppy/angular: fix Angular version requirement in peerDeps (Antoine du Hamel / #5067)
120
+
121
+ ## 0.7.0-beta.1
122
+
123
+ Released: 2024-03-28
124
+ Included in: Uppy v4.0.0-beta.1
125
+
126
+ - @uppy/angular: upgrade to Angular 17.x and to TS 5.4 (Antoine du Hamel / #5008)
127
+ - @uppy/angular: fix build (Antoine du Hamel)
128
+
129
+ ## 0.6.0
130
+
131
+ Released: 2023-09-05
132
+ Included in: Uppy v3.15.0
133
+
134
+ - @uppy/angular: upgrade to Angular 16.x (Antoine du Hamel / #4642)
135
+
136
+ ## 0.5.0
137
+
138
+ Released: 2022-11-10
139
+ Included in: Uppy v3.3.0
140
+
141
+ - @uppy/angular,@uppy/utils: add `cause` support for `AbortError`s (Antoine du Hamel / #4198)
142
+
143
+ ## 0.4.3
144
+
145
+ Released: 2022-10-19
146
+ Included in: Uppy v3.2.0
147
+
148
+ - @uppy/angular: remove unnecessary `console.log` call (Antoine du Hamel / #4139)
149
+
150
+ ## 0.4.2
151
+
152
+ Released: 2022-09-25
153
+ Included in: Uppy v3.1.0
154
+
155
+ - @uppy/angular: Fix angular build error (Murderlon)
156
+
157
+ ## 0.4.1
158
+
159
+ Released: 2022-08-30
160
+ Included in: Uppy v3.0.1
161
+
162
+ - @uppy/angular: fix compiler warning (Antoine du Hamel / #4064)
163
+ - @uppy/angular: fix peer dependencies (Antoine du Hamel / #4035)
164
+
165
+ ## 0.4.0
166
+
167
+ Released: 2022-08-22
168
+ Included in: Uppy v3.0.0
169
+
170
+ - @uppy/angular: upgrade to Angular 14 (Antoine du Hamel / #3997)
171
+
172
+ ## 0.3.1
173
+
174
+ Released: 2022-05-30
175
+ Included in: Uppy v2.11.0
176
+
177
+ - @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)
178
+
179
+ ## 0.3.0
180
+
181
+ Released: 2022-03-02
182
+ Included in: Uppy v2.7.0
183
+
184
+ - @uppy/angular: update ng version (Antoine du Hamel / #3503)
185
+
186
+ ## 0.2.8
187
+
188
+ Released: 2021-12-21
189
+ Included in: Uppy v2.3.2
190
+
191
+ - @uppy/angular,@uppy/companion,@uppy/svelte,@uppy/vue: add `.npmignore` files to ignore `.gitignore` when packing (Antoine du Hamel / #3380)
192
+ - @uppy/angular: Fix module field in `package.json` (Merlijn Vos / #3365)
193
+
194
+ ## 0.2.6
195
+
196
+ Released: 2021-12-07
197
+ Included in: Uppy v2.3.0
198
+
199
+ - @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).
@@ -1,162 +1,244 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, ElementRef, Input, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { Uppy } from '@uppy/core';
4
- import Dashboard from '@uppy/dashboard';
5
- import StatusBar from '@uppy/status-bar';
6
-
7
- class UppyAngularWrapper {
8
- onMount(defaultOptions, plugin) {
9
- this.options = {
10
- ...defaultOptions,
11
- ...this.props,
12
- };
13
- this.uppy.use(plugin, this.options);
14
- this.plugin = this.uppy.getPlugin(this.options.id);
15
- }
16
- handleChanges(changes, plugin) {
17
- // Without the last part of this conditional, it tries to uninstall before the plugin is mounted
18
- if (changes["uppy"] &&
19
- this.uppy !== changes["uppy"].previousValue &&
20
- changes["uppy"].previousValue !== undefined) {
21
- this.uninstall(changes["uppy"].previousValue);
22
- // @ts-expect-error The options correspond to the plugin, I swear
23
- this.uppy.use(plugin, this.options);
24
- }
25
- this.options = { ...this.options, ...this.props };
26
- this.plugin = this.uppy.getPlugin(this.options.id);
27
- if (changes["props"] &&
28
- this.props !== changes["props"].previousValue &&
29
- changes["props"].previousValue !== undefined) {
30
- this.plugin.setOptions({ ...this.options });
31
- }
32
- }
33
- uninstall(uppy = this.uppy) {
34
- uppy.removePlugin(this.plugin);
35
- }
36
- }
37
-
38
- class DashboardComponent extends UppyAngularWrapper {
39
- constructor() {
40
- super();
41
- this.el = inject(ElementRef);
42
- this.uppy = new Uppy();
43
- this.props = {};
44
- }
45
- ngOnInit() {
46
- this.onMount({ id: "angular:Dashboard", inline: true, target: this.el.nativeElement }, Dashboard);
47
- }
48
- ngOnChanges(changes) {
49
- this.handleChanges(changes, Dashboard);
50
- }
51
- ngOnDestroy() {
52
- this.uninstall();
53
- }
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
- }
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DashboardComponent, decorators: [{
58
- type: Component,
59
- args: [{
60
- selector: "uppy-dashboard",
61
- template: "",
62
- changeDetection: ChangeDetectionStrategy.OnPush,
63
- standalone: true,
64
- }]
65
- }], ctorParameters: () => [], propDecorators: { uppy: [{
66
- type: Input
67
- }], props: [{
68
- type: Input
69
- }] } });
70
-
71
- class DashboardModalComponent extends UppyAngularWrapper {
72
- constructor() {
73
- super();
74
- this.el = inject(ElementRef);
75
- this.uppy = new Uppy();
76
- this.props = {};
77
- this.open = false;
78
- }
79
- ngOnInit() {
80
- this.onMount({
81
- id: "angular:DashboardModal",
82
- inline: false,
83
- target: this.el.nativeElement,
84
- }, Dashboard);
85
- }
86
- ngOnChanges(changes) {
87
- this.handleChanges(changes, Dashboard);
88
- // Handle dashboard-modal specific changes
89
- if (changes["open"] && this.open !== changes["open"].previousValue) {
90
- if (this.open && !changes["open"].previousValue) {
91
- this.plugin.openModal();
92
- }
93
- if (!this.open && changes["open"].previousValue) {
94
- this.plugin.closeModal();
95
- }
96
- }
97
- }
98
- ngOnDestroy() {
99
- this.uninstall();
100
- }
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
- }
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DashboardModalComponent, decorators: [{
105
- type: Component,
106
- args: [{
107
- selector: "uppy-dashboard-modal",
108
- template: "",
109
- changeDetection: ChangeDetectionStrategy.OnPush,
110
- standalone: true,
111
- }]
112
- }], ctorParameters: () => [], propDecorators: { uppy: [{
113
- type: Input
114
- }], props: [{
115
- type: Input
116
- }], open: [{
117
- type: Input
118
- }] } });
119
-
120
- class StatusBarComponent extends UppyAngularWrapper {
121
- constructor() {
122
- super();
123
- this.el = inject(ElementRef);
124
- this.uppy = new Uppy();
125
- this.props = {};
126
- }
127
- ngOnInit() {
128
- this.onMount({ id: "angular:StatusBar", target: this.el.nativeElement }, StatusBar);
129
- }
130
- ngOnChanges(changes) {
131
- this.handleChanges(changes, StatusBar);
132
- }
133
- ngOnDestroy() {
134
- this.uninstall();
135
- }
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
- }
139
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: StatusBarComponent, decorators: [{
140
- type: Component,
141
- args: [{
142
- selector: "uppy-status-bar",
143
- template: "",
144
- changeDetection: ChangeDetectionStrategy.OnPush,
145
- standalone: true,
146
- }]
147
- }], ctorParameters: () => [], propDecorators: { uppy: [{
148
- type: Input
149
- }], props: [{
150
- type: Input
151
- }] } });
152
-
153
- /*
154
- * Public API Surface of @uppy/angular
155
- */
156
-
157
- /**
158
- * Generated bundle index. Do not edit.
159
- */
160
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, ElementRef, Input, inject } from "@angular/core";
3
+ import { Uppy } from "@uppy/core";
4
+ import Dashboard from "@uppy/dashboard";
5
+ import StatusBar from "@uppy/status-bar";
6
+ var UppyAngularWrapper = class {
7
+ options;
8
+ plugin;
9
+ onMount(defaultOptions, plugin) {
10
+ this.options = {
11
+ ...defaultOptions,
12
+ ...this.props
13
+ };
14
+ this.uppy.use(plugin, this.options);
15
+ this.plugin = this.uppy.getPlugin(this.options.id);
16
+ }
17
+ handleChanges(changes, plugin) {
18
+ if (changes["uppy"] && this.uppy !== changes["uppy"].previousValue && changes["uppy"].previousValue !== void 0) {
19
+ this.uninstall(changes["uppy"].previousValue);
20
+ this.uppy.use(plugin, this.options);
21
+ }
22
+ this.options = {
23
+ ...this.options,
24
+ ...this.props
25
+ };
26
+ this.plugin = this.uppy.getPlugin(this.options.id);
27
+ if (changes["props"] && this.props !== changes["props"].previousValue && changes["props"].previousValue !== void 0) this.plugin.setOptions({ ...this.options });
28
+ }
29
+ uninstall(uppy = this.uppy) {
30
+ uppy.removePlugin(this.plugin);
31
+ }
32
+ };
33
+ var DashboardComponent = class DashboardComponent extends UppyAngularWrapper {
34
+ el = inject(ElementRef);
35
+ uppy = new Uppy();
36
+ props = {};
37
+ constructor() {
38
+ super();
39
+ }
40
+ ngOnInit() {
41
+ this.onMount({
42
+ id: "angular:Dashboard",
43
+ inline: true,
44
+ target: this.el.nativeElement
45
+ }, Dashboard);
46
+ }
47
+ ngOnChanges(changes) {
48
+ this.handleChanges(changes, Dashboard);
49
+ }
50
+ ngOnDestroy() {
51
+ this.uninstall();
52
+ }
53
+ static ɵfac = i0.ɵɵngDeclareFactory({
54
+ minVersion: "12.0.0",
55
+ version: "22.2.3",
56
+ ngImport: i0,
57
+ type: DashboardComponent,
58
+ deps: [],
59
+ target: i0.ɵɵFactoryTarget.Component
60
+ });
61
+ static ɵcmp = i0.ɵɵngDeclareComponent({
62
+ minVersion: "14.0.0",
63
+ version: "22.2.3",
64
+ type: DashboardComponent,
65
+ isStandalone: true,
66
+ selector: "uppy-dashboard",
67
+ inputs: {
68
+ uppy: "uppy",
69
+ props: "props"
70
+ },
71
+ usesInheritance: true,
72
+ usesOnChanges: true,
73
+ ngImport: i0,
74
+ template: "",
75
+ isInline: true,
76
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
77
+ });
78
+ };
79
+ i0.ɵɵngDeclareClassMetadata({
80
+ minVersion: "12.0.0",
81
+ version: "22.2.3",
82
+ ngImport: i0,
83
+ type: DashboardComponent,
84
+ decorators: [{
85
+ type: Component,
86
+ args: [{
87
+ selector: "uppy-dashboard",
88
+ template: "",
89
+ changeDetection: ChangeDetectionStrategy.OnPush,
90
+ standalone: true
91
+ }]
92
+ }],
93
+ ctorParameters: () => [],
94
+ propDecorators: {
95
+ uppy: [{ type: Input }],
96
+ props: [{ type: Input }]
97
+ }
98
+ });
99
+ var DashboardModalComponent = class DashboardModalComponent extends UppyAngularWrapper {
100
+ el = inject(ElementRef);
101
+ uppy = new Uppy();
102
+ props = {};
103
+ open = false;
104
+ constructor() {
105
+ super();
106
+ }
107
+ ngOnInit() {
108
+ this.onMount({
109
+ id: "angular:DashboardModal",
110
+ inline: false,
111
+ target: this.el.nativeElement
112
+ }, Dashboard);
113
+ if (this.open) this.plugin.openModal();
114
+ }
115
+ ngOnChanges(changes) {
116
+ const previousPlugin = this.plugin;
117
+ if (previousPlugin === void 0) return;
118
+ this.handleChanges(changes, Dashboard);
119
+ if (this.plugin !== previousPlugin) {
120
+ if (this.open) this.plugin.openModal();
121
+ } else if (changes["open"] && this.open !== changes["open"].previousValue) {
122
+ if (this.open && !changes["open"].previousValue) this.plugin.openModal();
123
+ if (!this.open && changes["open"].previousValue) this.plugin.closeModal();
124
+ }
125
+ }
126
+ ngOnDestroy() {
127
+ this.uninstall();
128
+ }
129
+ static ɵfac = i0.ɵɵngDeclareFactory({
130
+ minVersion: "12.0.0",
131
+ version: "22.2.3",
132
+ ngImport: i0,
133
+ type: DashboardModalComponent,
134
+ deps: [],
135
+ target: i0.ɵɵFactoryTarget.Component
136
+ });
137
+ static ɵcmp = i0.ɵɵngDeclareComponent({
138
+ minVersion: "14.0.0",
139
+ version: "22.2.3",
140
+ type: DashboardModalComponent,
141
+ isStandalone: true,
142
+ selector: "uppy-dashboard-modal",
143
+ inputs: {
144
+ uppy: "uppy",
145
+ props: "props",
146
+ open: "open"
147
+ },
148
+ usesInheritance: true,
149
+ usesOnChanges: true,
150
+ ngImport: i0,
151
+ template: "",
152
+ isInline: true,
153
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
154
+ });
155
+ };
156
+ i0.ɵɵngDeclareClassMetadata({
157
+ minVersion: "12.0.0",
158
+ version: "22.2.3",
159
+ ngImport: i0,
160
+ type: DashboardModalComponent,
161
+ decorators: [{
162
+ type: Component,
163
+ args: [{
164
+ selector: "uppy-dashboard-modal",
165
+ template: "",
166
+ changeDetection: ChangeDetectionStrategy.OnPush,
167
+ standalone: true
168
+ }]
169
+ }],
170
+ ctorParameters: () => [],
171
+ propDecorators: {
172
+ uppy: [{ type: Input }],
173
+ props: [{ type: Input }],
174
+ open: [{ type: Input }]
175
+ }
176
+ });
177
+ var StatusBarComponent = class StatusBarComponent extends UppyAngularWrapper {
178
+ el = inject(ElementRef);
179
+ uppy = new Uppy();
180
+ props = {};
181
+ constructor() {
182
+ super();
183
+ }
184
+ ngOnInit() {
185
+ this.onMount({
186
+ id: "angular:StatusBar",
187
+ target: this.el.nativeElement
188
+ }, StatusBar);
189
+ }
190
+ ngOnChanges(changes) {
191
+ this.handleChanges(changes, StatusBar);
192
+ }
193
+ ngOnDestroy() {
194
+ this.uninstall();
195
+ }
196
+ static ɵfac = i0.ɵɵngDeclareFactory({
197
+ minVersion: "12.0.0",
198
+ version: "22.2.3",
199
+ ngImport: i0,
200
+ type: StatusBarComponent,
201
+ deps: [],
202
+ target: i0.ɵɵFactoryTarget.Component
203
+ });
204
+ static ɵcmp = i0.ɵɵngDeclareComponent({
205
+ minVersion: "14.0.0",
206
+ version: "22.2.3",
207
+ type: StatusBarComponent,
208
+ isStandalone: true,
209
+ selector: "uppy-status-bar",
210
+ inputs: {
211
+ uppy: "uppy",
212
+ props: "props"
213
+ },
214
+ usesInheritance: true,
215
+ usesOnChanges: true,
216
+ ngImport: i0,
217
+ template: "",
218
+ isInline: true,
219
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
220
+ });
221
+ };
222
+ i0.ɵɵngDeclareClassMetadata({
223
+ minVersion: "12.0.0",
224
+ version: "22.2.3",
225
+ ngImport: i0,
226
+ type: StatusBarComponent,
227
+ decorators: [{
228
+ type: Component,
229
+ args: [{
230
+ selector: "uppy-status-bar",
231
+ template: "",
232
+ changeDetection: ChangeDetectionStrategy.OnPush,
233
+ standalone: true
234
+ }]
235
+ }],
236
+ ctorParameters: () => [],
237
+ propDecorators: {
238
+ uppy: [{ type: Input }],
239
+ props: [{ type: Input }]
240
+ }
241
+ });
161
242
  export { DashboardComponent, DashboardModalComponent, StatusBarComponent };
162
- //# sourceMappingURL=uppy-angular.mjs.map
243
+
244
+ //# sourceMappingURL=uppy-angular.mjs.map
@@ -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,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAe;;IAGjE,aAAa,CAAC,OAAsB,EAAE,MAAW,EAAA;;QAEhD,IACC,OAAO,CAAC,MAAM,CAAC;YACf,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,aAAa;YAC3C,OAAO,CAAC,MAAM,CAAC,CAAC,aAAa,KAAK,SAAS,EAC1C;YACD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC;;YAE7C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC;;AAEpC,QAAA,IAAI,CAAC,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI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QAAQ,GAAA;AACP,QAAA,IAAI,CAAC,OAAO,CACX,EAAE,EAAE,EAAE,mBAAmB,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,aAAa,EAAE,EAC1D,SAAS,CACT;;AAGF,IAAA,WAAW,CAAC,OAAsB,EAAA;AACjC,QAAA,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC;;IAGvC,WAAW,GAAA;QACV,IAAI,CAAC,SAAS,EAAE;;8GA5BL,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,iKAJpB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIA,kBAAkB,EAAA,UAAA,EAAA,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","names":[],"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"],"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\t// Angular runs `ngOnChanges` before `ngOnInit`, so the initial value of\n\t\t// `open` — which only ever shows up in that first `SimpleChanges` — has to\n\t\t// be applied here, once the plugin actually exists.\n\t\tif (this.open) {\n\t\t\tthis.plugin!.openModal();\n\t\t}\n\t}\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\t// The first `ngOnChanges` runs before `ngOnInit`, when there is no plugin\n\t\t// to talk to yet. Every input still carries `previousValue: undefined` at\n\t\t// that point, so nothing is lost by skipping it: `ngOnInit` mounts the\n\t\t// plugin with the current `props` and applies the current `open` value.\n\t\tconst previousPlugin = this.plugin;\n\t\tif (previousPlugin === undefined) return;\n\n\t\tthis.handleChanges(changes, Dashboard);\n\t\tif (this.plugin !== previousPlugin) {\n\t\t\t// A new `uppy` got a freshly installed plugin, which starts out closed.\n\t\t\tif (this.open) {\n\t\t\t\tthis.plugin!.openModal();\n\t\t\t}\n\t\t} else if (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"],"mappings":";;;;;AAIA,IAAsB,qBAAtB,MAAwC;CAS/B;CACR;CAEA,QACC,gBACA,QAA4D;EAE5D,KAAK,UAAU;GACd,GAAG;GACH,GAAG,KAAK;EACR;EAED,KAAK,KAAK,IAAI,QAAQ,KAAK,OAAO;EAClC,KAAK,SAAS,KAAK,KAAK,UAAU,KAAK,QAAQ,EAAE;CAClD;CAEA,cAAc,SAAwB,QAAW;EAEhD,IACC,QAAQ,WACR,KAAK,SAAS,QAAQ,OAAO,CAAC,iBAC9B,QAAQ,OAAO,CAAC,kBAAkB,QACjC;GACD,KAAK,UAAU,QAAQ,OAAO,CAAC,aAAa;GAE5C,KAAK,KAAK,IAAI,QA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AA;CAAA,UAAA;CAAA,MAAA;CAAuB,YAAA,CAAA;EANnC,MAAA;EAAU,MAAA,CAAA;GACV,UAAU;GACV,UAAU;GACV,iBAAiB,wBAAwB;GACzC,YAAY;EACZ,CAAA;;;;E,SAOC,MAAA,M;E,UACA,MAAA,M;E,SACA,MAAA,M;;;ACRF,IAAa,qBAAb,MAAa,2BACJ,mBAA0C;CAGlD,KAAK,OAAO,UAAU;CAEb,OAAmB,IAAI,KAAI;CAC3B,QAA0B,CAAA;CAKnC,cAAA;EACC,MAAK;CACN;CAEA,WAAQ;EACP,KAAK,QACJ;GAAE,IAAI;GAAqB,QAAQ,KAAK,GAAG;EAAa,GACxD,SAAS;CAEX;CAEA,YAAY,SAAsB;EACjC,KAAK,cAAc,SAAS,SAAS;CACtC;CAEA,cAAW;EACV,KAAK,UAAS;CACf;CA7BY,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAkB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAlB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAkB,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,MAAA;GAAA,OAAA;EAAA;EAAA,iBAAA;EAAA,eAAA;EAAA,UAAA;EAAA,UAJpB;EAAE,UAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAIA,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkB,YAAA,CAAA;EAN9B,MAAA;EAAU,MAAA,CAAA;GACV,UAAU;GACV,UAAU;GACV,iBAAiB,wBAAwB;GACzC,YAAY;EACZ,CAAA;;;;E,SAOC,MAAA,M;E,UACA,MAAA,M"}
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.1",
5
5
  "license": "MIT",
6
6
  "homepage": "https://uppy.io",
7
7
  "keywords": [
@@ -18,26 +18,46 @@
18
18
  "type": "git",
19
19
  "url": "git+https://github.com/transloadit/uppy.git"
20
20
  },
21
+ "scripts": {
22
+ "build": "ng-packagr -c tsconfig.lib.prod.json && node scripts/collect-dist.mjs",
23
+ "test": "vitest run --silent='passed-only'"
24
+ },
25
+ "main": "./fesm2022/uppy-angular.mjs",
26
+ "types": "./types/uppy-angular.d.ts",
27
+ "files": [
28
+ "fesm2022",
29
+ "types"
30
+ ],
21
31
  "dependencies": {
22
- "tslib": "^2.0.0"
32
+ "tslib": "^2.8.1"
23
33
  },
24
34
  "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"
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.3.2",
37
+ "@uppy/dashboard": "^6.0.3",
38
+ "@uppy/status-bar": "^6.0.1"
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.2.3",
50
+ "@angular/compiler": "^22.2.3",
51
+ "@angular/compiler-cli": "^22.2.3",
52
+ "@angular/core": "^22.2.3",
53
+ "@angular/platform-browser": "^22.2.3",
54
+ "@uppy-dev/tsconfig": "^0.0.0",
55
+ "@vitest/browser-playwright": "^5.0.5",
56
+ "ng-packagr": "^22.2.5",
57
+ "playwright": "1.64.1",
58
+ "rxjs": "~7.8.0",
59
+ "typescript": "^6.0.3",
60
+ "vitest": "^5.0.5"
61
+ },
62
+ "sideEffects": false
43
63
  }
@@ -0,0 +1,83 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ElementRef, OnChanges, OnDestroy, SimpleChanges } from "@angular/core";
3
+ import { Body, Meta, UIPlugin, UIPluginOptions, Uppy } from "@uppy/core";
4
+ import Dashboard, { DashboardOptions } from "@uppy/dashboard";
5
+ import { StatusBarOptions } from "@uppy/status-bar";
6
+ declare abstract class UppyAngularWrapper<M extends Meta, B extends Body, Opts extends UIPluginOptions, PluginType extends UIPlugin<Opts, M, B> = UIPlugin<Opts, M, B>> {
7
+ abstract props: DashboardOptions<M, B>;
8
+ abstract el: ElementRef;
9
+ abstract uppy: Uppy<M, B>;
10
+ private options;
11
+ plugin: PluginType | undefined;
12
+ onMount(defaultOptions: Partial<Opts>, plugin: new (uppy: any, opts?: Opts) => UIPlugin<Opts, M, B>): void;
13
+ handleChanges(changes: SimpleChanges, plugin: any): void;
14
+ uninstall(uppy?: Uppy<M, B>): void;
15
+ }
16
+ export declare class DashboardComponent<M extends Meta, B extends Body> extends UppyAngularWrapper<M, B, DashboardOptions<M, B>> implements OnDestroy, OnChanges {
17
+ el: ElementRef<any>;
18
+ uppy: Uppy<M, B>;
19
+ props: DashboardOptions<M, B>;
20
+ /** Inserted by Angular inject() migration for backwards compatibility */
21
+ constructor(...args: unknown[]);
22
+ ngOnInit(): void;
23
+ ngOnChanges(changes: SimpleChanges): void;
24
+ ngOnDestroy(): void;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<DashboardComponent<any, any>, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<DashboardComponent<any, any>, "uppy-dashboard", never, {
27
+ "uppy": {
28
+ "alias": "uppy";
29
+ "required": false;
30
+ };
31
+ "props": {
32
+ "alias": "props";
33
+ "required": false;
34
+ };
35
+ }, {}, never, never, true, never>;
36
+ }
37
+ export declare class DashboardModalComponent<M extends Meta, B extends Body> extends UppyAngularWrapper<M, B, DashboardOptions<M, B>, Dashboard<M, B>> implements OnDestroy, OnChanges {
38
+ el: ElementRef<any>;
39
+ uppy: Uppy<M, B>;
40
+ props: DashboardOptions<M, B>;
41
+ open: boolean;
42
+ /** Inserted by Angular inject() migration for backwards compatibility */
43
+ constructor(...args: unknown[]);
44
+ ngOnInit(): void;
45
+ ngOnChanges(changes: SimpleChanges): void;
46
+ ngOnDestroy(): void;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<DashboardModalComponent<any, any>, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<DashboardModalComponent<any, any>, "uppy-dashboard-modal", never, {
49
+ "uppy": {
50
+ "alias": "uppy";
51
+ "required": false;
52
+ };
53
+ "props": {
54
+ "alias": "props";
55
+ "required": false;
56
+ };
57
+ "open": {
58
+ "alias": "open";
59
+ "required": false;
60
+ };
61
+ }, {}, never, never, true, never>;
62
+ }
63
+ export declare class StatusBarComponent<M extends Meta, B extends Body> extends UppyAngularWrapper<M, B, StatusBarOptions> implements OnDestroy, OnChanges {
64
+ el: ElementRef<any>;
65
+ uppy: Uppy<M, B>;
66
+ props: StatusBarOptions;
67
+ /** Inserted by Angular inject() migration for backwards compatibility */
68
+ constructor(...args: unknown[]);
69
+ ngOnInit(): void;
70
+ ngOnChanges(changes: SimpleChanges): void;
71
+ ngOnDestroy(): void;
72
+ static ɵfac: i0.ɵɵFactoryDeclaration<StatusBarComponent<any, any>, never>;
73
+ static ɵcmp: i0.ɵɵComponentDeclaration<StatusBarComponent<any, any>, "uppy-status-bar", never, {
74
+ "uppy": {
75
+ "alias": "uppy";
76
+ "required": false;
77
+ };
78
+ "props": {
79
+ "alias": "props";
80
+ "required": false;
81
+ };
82
+ }, {}, never, never, true, never>;
83
+ }
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';