@uppy/angular 0.2.3 → 0.2.7
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 +8 -0
- package/README.md +3 -4
- package/dist/angular/esm2020/lib/components/dashboard/dashboard.component.mjs +34 -0
- package/dist/angular/esm2020/lib/components/dashboard/dashboard.module.mjs +17 -0
- package/dist/angular/esm2020/lib/components/dashboard-modal/dashboard-modal.component.mjs +49 -0
- package/dist/angular/esm2020/lib/components/dashboard-modal/dashboard-modal.module.mjs +17 -0
- package/dist/angular/esm2020/lib/components/drag-drop/drag-drop.component.mjs +34 -0
- package/dist/angular/esm2020/lib/components/drag-drop/drag-drop.module.mjs +17 -0
- package/dist/angular/esm2020/lib/components/progress-bar/progress-bar.component.mjs +34 -0
- package/dist/angular/esm2020/lib/components/progress-bar/progress-bar.module.mjs +17 -0
- package/dist/angular/esm2020/lib/components/status-bar/status-bar.component.mjs +34 -0
- package/dist/angular/esm2020/lib/components/status-bar/status-bar.module.mjs +17 -0
- package/dist/angular/esm2020/lib/utils/wrapper.mjs +27 -0
- package/dist/angular/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/dist/angular/esm2020/uppy-angular.mjs +5 -0
- package/dist/angular/fesm2015/uppy-angular.mjs +276 -0
- package/dist/angular/fesm2015/uppy-angular.mjs.map +1 -0
- package/dist/angular/fesm2020/uppy-angular.mjs +279 -0
- package/dist/angular/fesm2020/uppy-angular.mjs.map +1 -0
- package/dist/angular/lib/components/dashboard/dashboard.component.d.ts +3 -0
- package/dist/angular/lib/components/dashboard/dashboard.module.d.ts +5 -0
- package/dist/angular/lib/components/dashboard-modal/dashboard-modal.component.d.ts +3 -0
- package/dist/angular/lib/components/dashboard-modal/dashboard-modal.module.d.ts +5 -0
- package/dist/angular/lib/components/drag-drop/drag-drop.component.d.ts +3 -0
- package/dist/angular/lib/components/drag-drop/drag-drop.module.d.ts +5 -0
- package/dist/angular/lib/components/progress-bar/progress-bar.component.d.ts +3 -0
- package/dist/angular/lib/components/progress-bar/progress-bar.module.d.ts +5 -0
- package/dist/angular/lib/components/status-bar/status-bar.component.d.ts +3 -0
- package/dist/angular/lib/components/status-bar/status-bar.module.d.ts +5 -0
- package/dist/angular/package.json +24 -12
- package/dist/angular/uppy-angular.d.ts +1 -6
- package/package.json +33 -35
- package/dist/angular/bundles/uppy-angular.umd.js +0 -632
- package/dist/angular/bundles/uppy-angular.umd.js.map +0 -1
- package/dist/angular/esm2015/lib/components/dashboard/dashboard.component.js +0 -33
- package/dist/angular/esm2015/lib/components/dashboard/dashboard.module.js +0 -12
- package/dist/angular/esm2015/lib/components/dashboard-modal/dashboard-modal.component.js +0 -47
- package/dist/angular/esm2015/lib/components/dashboard-modal/dashboard-modal.module.js +0 -12
- package/dist/angular/esm2015/lib/components/drag-drop/drag-drop.component.js +0 -33
- package/dist/angular/esm2015/lib/components/drag-drop/drag-drop.module.js +0 -12
- package/dist/angular/esm2015/lib/components/progress-bar/progress-bar.component.js +0 -33
- package/dist/angular/esm2015/lib/components/progress-bar/progress-bar.module.js +0 -12
- package/dist/angular/esm2015/lib/components/status-bar/status-bar.component.js +0 -33
- package/dist/angular/esm2015/lib/components/status-bar/status-bar.module.js +0 -12
- package/dist/angular/esm2015/lib/utils/wrapper.js +0 -24
- package/dist/angular/esm2015/uppy-angular.js +0 -11
- package/dist/angular/fesm2015/uppy-angular.js +0 -254
- package/dist/angular/fesm2015/uppy-angular.js.map +0 -1
- package/dist/angular/uppy-angular.metadata.json +0 -1
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
|
|
3
|
+
import Dashboard from '@uppy/dashboard';
|
|
4
|
+
import ProgressBar from '@uppy/progress-bar';
|
|
5
|
+
import StatusBar from '@uppy/status-bar';
|
|
6
|
+
import DragDrop from '@uppy/drag-drop';
|
|
7
|
+
|
|
8
|
+
class UppyAngularWrapper {
|
|
9
|
+
onMount(defaultOptions, plugin) {
|
|
10
|
+
this.options = Object.assign(Object.assign({}, defaultOptions), this.props);
|
|
11
|
+
this.uppy.use(plugin, this.options);
|
|
12
|
+
this.plugin = this.uppy.getPlugin(this.options.id);
|
|
13
|
+
}
|
|
14
|
+
handleChanges(changes, plugin) {
|
|
15
|
+
// Without the last part of this conditional, it tries to uninstall before the plugin is mounted
|
|
16
|
+
if (changes.uppy && this.uppy !== changes.uppy.previousValue && changes.uppy.previousValue !== undefined) {
|
|
17
|
+
this.uninstall(changes.uppy.previousValue);
|
|
18
|
+
this.uppy.use(plugin, this.options);
|
|
19
|
+
}
|
|
20
|
+
this.options = Object.assign(Object.assign({}, this.options), this.props);
|
|
21
|
+
this.plugin = this.uppy.getPlugin(this.options.id);
|
|
22
|
+
if (changes.props && this.props !== changes.props.previousValue && changes.props.previousValue !== undefined) {
|
|
23
|
+
this.plugin.setOptions(Object.assign({}, this.options));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
uninstall(uppy = this.uppy) {
|
|
27
|
+
console.log('Uninstalling...');
|
|
28
|
+
uppy.removePlugin(this.plugin);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
class DashboardComponent extends UppyAngularWrapper {
|
|
33
|
+
constructor(el) {
|
|
34
|
+
super();
|
|
35
|
+
this.el = el;
|
|
36
|
+
}
|
|
37
|
+
ngOnInit() {
|
|
38
|
+
this.onMount({ id: 'angular:Dashboard', inline: true, target: this.el.nativeElement }, Dashboard);
|
|
39
|
+
}
|
|
40
|
+
ngOnChanges(changes) {
|
|
41
|
+
this.handleChanges(changes, Dashboard);
|
|
42
|
+
}
|
|
43
|
+
ngOnDestroy() {
|
|
44
|
+
this.uninstall();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
DashboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DashboardComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
+
DashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: DashboardComponent, selector: "uppy-dashboard", inputs: { uppy: "uppy", props: "props" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DashboardComponent, decorators: [{
|
|
50
|
+
type: Component,
|
|
51
|
+
args: [{
|
|
52
|
+
selector: 'uppy-dashboard',
|
|
53
|
+
template: '',
|
|
54
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
55
|
+
}]
|
|
56
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { uppy: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}], props: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}] } });
|
|
61
|
+
|
|
62
|
+
const COMPONENTS$4 = [DashboardComponent];
|
|
63
|
+
class UppyAngularDashboardModule {
|
|
64
|
+
}
|
|
65
|
+
UppyAngularDashboardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
66
|
+
UppyAngularDashboardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModule, declarations: [DashboardComponent], exports: [DashboardComponent] });
|
|
67
|
+
UppyAngularDashboardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModule });
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModule, decorators: [{
|
|
69
|
+
type: NgModule,
|
|
70
|
+
args: [{
|
|
71
|
+
declarations: COMPONENTS$4,
|
|
72
|
+
exports: COMPONENTS$4
|
|
73
|
+
}]
|
|
74
|
+
}] });
|
|
75
|
+
|
|
76
|
+
class DashboardModalComponent extends UppyAngularWrapper {
|
|
77
|
+
constructor(el) {
|
|
78
|
+
super();
|
|
79
|
+
this.el = el;
|
|
80
|
+
}
|
|
81
|
+
ngOnInit() {
|
|
82
|
+
this.onMount({
|
|
83
|
+
id: 'angular:DashboardModal',
|
|
84
|
+
inline: false,
|
|
85
|
+
target: this.el.nativeElement
|
|
86
|
+
}, Dashboard);
|
|
87
|
+
}
|
|
88
|
+
ngOnChanges(changes) {
|
|
89
|
+
this.handleChanges(changes, Dashboard);
|
|
90
|
+
// Handle dashboard-modal specific changes
|
|
91
|
+
if (changes.open && this.open !== changes.open.previousValue) {
|
|
92
|
+
if (this.open && !changes.open.previousValue) {
|
|
93
|
+
this.plugin.openModal();
|
|
94
|
+
}
|
|
95
|
+
if (!this.open && changes.open.previousValue) {
|
|
96
|
+
this.plugin.closeModal();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
ngOnDestroy() {
|
|
101
|
+
this.uninstall();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
DashboardModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DashboardModalComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
105
|
+
DashboardModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: DashboardModalComponent, selector: "uppy-dashboard-modal", inputs: { uppy: "uppy", props: "props", open: "open" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DashboardModalComponent, decorators: [{
|
|
107
|
+
type: Component,
|
|
108
|
+
args: [{
|
|
109
|
+
selector: 'uppy-dashboard-modal',
|
|
110
|
+
template: '',
|
|
111
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
112
|
+
}]
|
|
113
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { uppy: [{
|
|
114
|
+
type: Input
|
|
115
|
+
}], props: [{
|
|
116
|
+
type: Input
|
|
117
|
+
}], open: [{
|
|
118
|
+
type: Input
|
|
119
|
+
}] } });
|
|
120
|
+
|
|
121
|
+
const COMPONENTS$3 = [DashboardModalComponent];
|
|
122
|
+
class UppyAngularDashboardModalModule {
|
|
123
|
+
}
|
|
124
|
+
UppyAngularDashboardModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
125
|
+
UppyAngularDashboardModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModalModule, declarations: [DashboardModalComponent], exports: [DashboardModalComponent] });
|
|
126
|
+
UppyAngularDashboardModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModalModule });
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModalModule, decorators: [{
|
|
128
|
+
type: NgModule,
|
|
129
|
+
args: [{
|
|
130
|
+
declarations: COMPONENTS$3,
|
|
131
|
+
exports: COMPONENTS$3
|
|
132
|
+
}]
|
|
133
|
+
}] });
|
|
134
|
+
|
|
135
|
+
class ProgressBarComponent extends UppyAngularWrapper {
|
|
136
|
+
constructor(el) {
|
|
137
|
+
super();
|
|
138
|
+
this.el = el;
|
|
139
|
+
}
|
|
140
|
+
ngOnInit() {
|
|
141
|
+
this.onMount({ id: 'angular:ProgressBar', target: this.el.nativeElement }, ProgressBar);
|
|
142
|
+
}
|
|
143
|
+
ngOnChanges(changes) {
|
|
144
|
+
this.handleChanges(changes, ProgressBar);
|
|
145
|
+
}
|
|
146
|
+
ngOnDestroy() {
|
|
147
|
+
this.uninstall();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ProgressBarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
151
|
+
ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ProgressBarComponent, selector: "uppy-progress-bar", inputs: { uppy: "uppy", props: "props" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ProgressBarComponent, decorators: [{
|
|
153
|
+
type: Component,
|
|
154
|
+
args: [{
|
|
155
|
+
selector: 'uppy-progress-bar',
|
|
156
|
+
template: '',
|
|
157
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
158
|
+
}]
|
|
159
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { uppy: [{
|
|
160
|
+
type: Input
|
|
161
|
+
}], props: [{
|
|
162
|
+
type: Input
|
|
163
|
+
}] } });
|
|
164
|
+
|
|
165
|
+
const COMPONENTS$2 = [ProgressBarComponent];
|
|
166
|
+
class UppyAngularProgressBarModule {
|
|
167
|
+
}
|
|
168
|
+
UppyAngularProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
169
|
+
UppyAngularProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularProgressBarModule, declarations: [ProgressBarComponent], exports: [ProgressBarComponent] });
|
|
170
|
+
UppyAngularProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularProgressBarModule });
|
|
171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularProgressBarModule, decorators: [{
|
|
172
|
+
type: NgModule,
|
|
173
|
+
args: [{
|
|
174
|
+
declarations: COMPONENTS$2,
|
|
175
|
+
exports: COMPONENTS$2
|
|
176
|
+
}]
|
|
177
|
+
}] });
|
|
178
|
+
|
|
179
|
+
class StatusBarComponent extends UppyAngularWrapper {
|
|
180
|
+
constructor(el) {
|
|
181
|
+
super();
|
|
182
|
+
this.el = el;
|
|
183
|
+
}
|
|
184
|
+
ngOnInit() {
|
|
185
|
+
this.onMount({ id: 'angular:StatusBar', target: this.el.nativeElement }, StatusBar);
|
|
186
|
+
}
|
|
187
|
+
ngOnChanges(changes) {
|
|
188
|
+
this.handleChanges(changes, StatusBar);
|
|
189
|
+
}
|
|
190
|
+
ngOnDestroy() {
|
|
191
|
+
this.uninstall();
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
StatusBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: StatusBarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
195
|
+
StatusBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: StatusBarComponent, selector: "uppy-status-bar", inputs: { uppy: "uppy", props: "props" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: StatusBarComponent, decorators: [{
|
|
197
|
+
type: Component,
|
|
198
|
+
args: [{
|
|
199
|
+
selector: 'uppy-status-bar',
|
|
200
|
+
template: '',
|
|
201
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
202
|
+
}]
|
|
203
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { uppy: [{
|
|
204
|
+
type: Input
|
|
205
|
+
}], props: [{
|
|
206
|
+
type: Input
|
|
207
|
+
}] } });
|
|
208
|
+
|
|
209
|
+
const COMPONENTS$1 = [StatusBarComponent];
|
|
210
|
+
class UppyAngularStatusBarModule {
|
|
211
|
+
}
|
|
212
|
+
UppyAngularStatusBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularStatusBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
213
|
+
UppyAngularStatusBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularStatusBarModule, declarations: [StatusBarComponent], exports: [StatusBarComponent] });
|
|
214
|
+
UppyAngularStatusBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularStatusBarModule });
|
|
215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularStatusBarModule, decorators: [{
|
|
216
|
+
type: NgModule,
|
|
217
|
+
args: [{
|
|
218
|
+
declarations: COMPONENTS$1,
|
|
219
|
+
exports: COMPONENTS$1
|
|
220
|
+
}]
|
|
221
|
+
}] });
|
|
222
|
+
|
|
223
|
+
class DragDropComponent extends UppyAngularWrapper {
|
|
224
|
+
constructor(el) {
|
|
225
|
+
super();
|
|
226
|
+
this.el = el;
|
|
227
|
+
}
|
|
228
|
+
ngOnInit() {
|
|
229
|
+
this.onMount({ id: 'angular:DragDrop', target: this.el.nativeElement }, DragDrop);
|
|
230
|
+
}
|
|
231
|
+
ngOnChanges(changes) {
|
|
232
|
+
this.handleChanges(changes, DragDrop);
|
|
233
|
+
}
|
|
234
|
+
ngOnDestroy() {
|
|
235
|
+
this.uninstall();
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
DragDropComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DragDropComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
239
|
+
DragDropComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: DragDropComponent, selector: "uppy-drag-drop", inputs: { uppy: "uppy", props: "props" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DragDropComponent, decorators: [{
|
|
241
|
+
type: Component,
|
|
242
|
+
args: [{
|
|
243
|
+
selector: 'uppy-drag-drop',
|
|
244
|
+
template: '',
|
|
245
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
246
|
+
}]
|
|
247
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { uppy: [{
|
|
248
|
+
type: Input
|
|
249
|
+
}], props: [{
|
|
250
|
+
type: Input
|
|
251
|
+
}] } });
|
|
252
|
+
|
|
253
|
+
const COMPONENTS = [DragDropComponent];
|
|
254
|
+
class UppyAngularDragDropModule {
|
|
255
|
+
}
|
|
256
|
+
UppyAngularDragDropModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDragDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
257
|
+
UppyAngularDragDropModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDragDropModule, declarations: [DragDropComponent], exports: [DragDropComponent] });
|
|
258
|
+
UppyAngularDragDropModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDragDropModule });
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDragDropModule, decorators: [{
|
|
260
|
+
type: NgModule,
|
|
261
|
+
args: [{
|
|
262
|
+
declarations: COMPONENTS,
|
|
263
|
+
exports: COMPONENTS
|
|
264
|
+
}]
|
|
265
|
+
}] });
|
|
266
|
+
|
|
267
|
+
/*
|
|
268
|
+
* Public API Surface of @uppy/angular
|
|
269
|
+
*/
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Generated bundle index. Do not edit.
|
|
273
|
+
*/
|
|
274
|
+
|
|
275
|
+
export { DashboardComponent, DashboardModalComponent, DragDropComponent, ProgressBarComponent, StatusBarComponent, UppyAngularDashboardModalModule, UppyAngularDashboardModule, UppyAngularDragDropModule, UppyAngularProgressBarModule, UppyAngularStatusBarModule };
|
|
276
|
+
//# sourceMappingURL=uppy-angular.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uppy-angular.mjs","sources":["../../../projects/angular/src/lib/utils/wrapper.ts","../../../projects/angular/src/lib/components/dashboard/dashboard.component.ts","../../../projects/angular/src/lib/components/dashboard/dashboard.module.ts","../../../projects/angular/src/lib/components/dashboard-modal/dashboard-modal.component.ts","../../../projects/angular/src/lib/components/dashboard-modal/dashboard-modal.module.ts","../../../projects/angular/src/lib/components/progress-bar/progress-bar.component.ts","../../../projects/angular/src/lib/components/progress-bar/progress-bar.module.ts","../../../projects/angular/src/lib/components/status-bar/status-bar.component.ts","../../../projects/angular/src/lib/components/status-bar/status-bar.module.ts","../../../projects/angular/src/lib/components/drag-drop/drag-drop.component.ts","../../../projects/angular/src/lib/components/drag-drop/drag-drop.module.ts","../../../projects/angular/src/public-api.ts","../../../projects/angular/src/uppy-angular.ts"],"sourcesContent":["import { Uppy, UIPlugin } from '@uppy/core';\nimport { ElementRef, SimpleChanges } from '@angular/core';\n\nexport abstract class UppyAngularWrapper<PluginType extends UIPlugin = UIPlugin> {\n abstract props;\n abstract el: ElementRef\n abstract uppy: Uppy;\n private options: any;\n plugin: PluginType;\n\n onMount(defaultOptions, plugin) {\n this.options = {\n ...defaultOptions,\n ...this.props,\n };\n\n this.uppy.use(plugin, this.options);\n this.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n }\n\n handleChanges(changes: SimpleChanges, plugin: any): void {\n // Without the last part of this conditional, it tries to uninstall before the plugin is mounted\n if (changes.uppy && this.uppy !== changes.uppy.previousValue && changes.uppy.previousValue !== undefined) {\n this.uninstall(changes.uppy.previousValue);\n this.uppy.use(plugin, this.options);\n }\n this.options = { ...this.options, ...this.props }\n this.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n if(changes.props && this.props !== changes.props.previousValue && changes.props.previousValue !== undefined) {\n this.plugin.setOptions({ ...this.options })\n }\n }\n\n uninstall(uppy = this.uppy): void {\n console.log('Uninstalling...')\n uppy.removePlugin(this.plugin);\n }\n\n}\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport Dashboard from '@uppy/dashboard';\nimport type { DashboardOptions } from '@uppy/dashboard';\nimport { Uppy } from '@uppy/core';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-dashboard',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DashboardComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy;\n @Input() props: DashboardOptions;\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:Dashboard', inline: true, target: this.el.nativeElement }, Dashboard)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, Dashboard);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DashboardComponent } from './dashboard.component';\n\nexport const COMPONENTS = [DashboardComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDashboardModule { }\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport Dashboard from '@uppy/dashboard';\nimport type { DashboardOptions } from '@uppy/dashboard';\nimport { Uppy } from '@uppy/core';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-dashboard-modal',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DashboardModalComponent extends UppyAngularWrapper<Dashboard> implements OnDestroy, OnChanges {\n @Input() uppy: Uppy;\n @Input() props: DashboardOptions;\n @Input() open: boolean;\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({\n id: 'angular:DashboardModal',\n inline: false,\n target: this.el.nativeElement\n }, Dashboard)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, Dashboard);\n // Handle dashboard-modal specific changes\n if (changes.open && this.open !== changes.open.previousValue) {\n if(this.open && !changes.open.previousValue) {\n this.plugin.openModal()\n }\n if (!this.open && changes.open.previousValue) {\n this.plugin.closeModal()\n }\n }\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DashboardModalComponent } from './dashboard-modal.component';\n\nexport const COMPONENTS = [DashboardModalComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDashboardModalModule { }\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport ProgressBar from '@uppy/progress-bar';\nimport type { ProgressBarOptions } from '@uppy/progress-bar';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-progress-bar',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ProgressBarComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy;\n @Input() props: ProgressBarOptions;\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:ProgressBar', target: this.el.nativeElement }, ProgressBar)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, ProgressBar);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ProgressBarComponent } from './progress-bar.component';\n\nexport const COMPONENTS = [ProgressBarComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularProgressBarModule { }\n","import { Component, ChangeDetectionStrategy, Input, ElementRef, SimpleChange, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport StatusBar from '@uppy/status-bar';\nimport type { StatusBarOptions } from '@uppy/status-bar';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-status-bar',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class StatusBarComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy;\n @Input() props: StatusBarOptions;\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:StatusBar', target: this.el.nativeElement }, StatusBar)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, StatusBar);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { StatusBarComponent } from './status-bar.component';\n\nexport const COMPONENTS = [StatusBarComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularStatusBarModule { }\n","import { Component, ChangeDetectionStrategy, Input, OnDestroy, OnChanges, SimpleChanges, ElementRef } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport DragDrop from '@uppy/drag-drop';\nimport type { DragDropOptions } from '@uppy/drag-drop';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-drag-drop',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DragDropComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy;\n @Input() props: DragDropOptions;\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:DragDrop', target: this.el.nativeElement }, DragDrop)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, DragDrop);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DragDropComponent } from './drag-drop.component';\n\nexport const COMPONENTS = [DragDropComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDragDropModule { }\n","/*\n * Public API Surface of @uppy/angular\n */\n\nexport { UppyAngularDashboardModule } from './lib/components/dashboard/dashboard.module'\nexport { UppyAngularDashboardModalModule } from './lib/components/dashboard-modal/dashboard-modal.module'\nexport { UppyAngularProgressBarModule } from './lib/components/progress-bar/progress-bar.module'\nexport { UppyAngularStatusBarModule } from './lib/components/status-bar/status-bar.module'\nexport { UppyAngularDragDropModule } from './lib/components/drag-drop/drag-drop.module'\nexport { StatusBarComponent } from './lib/components/status-bar/status-bar.component'\nexport { ProgressBarComponent } from './lib/components/progress-bar/progress-bar.component'\nexport { DragDropComponent } from './lib/components/drag-drop/drag-drop.component'\nexport { DashboardComponent } from './lib/components/dashboard/dashboard.component'\nexport { DashboardModalComponent } from './lib/components/dashboard-modal/dashboard-modal.component'\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,yBAAyB;kBAJrC,QAAQ;mBAAC;oBACR,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACPD;;;;ACAA;;;;;;"}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
|
|
3
|
+
import Dashboard from '@uppy/dashboard';
|
|
4
|
+
import ProgressBar from '@uppy/progress-bar';
|
|
5
|
+
import StatusBar from '@uppy/status-bar';
|
|
6
|
+
import DragDrop from '@uppy/drag-drop';
|
|
7
|
+
|
|
8
|
+
class UppyAngularWrapper {
|
|
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
|
+
// Without the last part of this conditional, it tries to uninstall before the plugin is mounted
|
|
19
|
+
if (changes.uppy && this.uppy !== changes.uppy.previousValue && changes.uppy.previousValue !== undefined) {
|
|
20
|
+
this.uninstall(changes.uppy.previousValue);
|
|
21
|
+
this.uppy.use(plugin, this.options);
|
|
22
|
+
}
|
|
23
|
+
this.options = { ...this.options, ...this.props };
|
|
24
|
+
this.plugin = this.uppy.getPlugin(this.options.id);
|
|
25
|
+
if (changes.props && this.props !== changes.props.previousValue && changes.props.previousValue !== undefined) {
|
|
26
|
+
this.plugin.setOptions({ ...this.options });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
uninstall(uppy = this.uppy) {
|
|
30
|
+
console.log('Uninstalling...');
|
|
31
|
+
uppy.removePlugin(this.plugin);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
class DashboardComponent extends UppyAngularWrapper {
|
|
36
|
+
constructor(el) {
|
|
37
|
+
super();
|
|
38
|
+
this.el = el;
|
|
39
|
+
}
|
|
40
|
+
ngOnInit() {
|
|
41
|
+
this.onMount({ id: 'angular:Dashboard', inline: true, target: this.el.nativeElement }, Dashboard);
|
|
42
|
+
}
|
|
43
|
+
ngOnChanges(changes) {
|
|
44
|
+
this.handleChanges(changes, Dashboard);
|
|
45
|
+
}
|
|
46
|
+
ngOnDestroy() {
|
|
47
|
+
this.uninstall();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
DashboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DashboardComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
51
|
+
DashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: DashboardComponent, selector: "uppy-dashboard", inputs: { uppy: "uppy", props: "props" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DashboardComponent, decorators: [{
|
|
53
|
+
type: Component,
|
|
54
|
+
args: [{
|
|
55
|
+
selector: 'uppy-dashboard',
|
|
56
|
+
template: '',
|
|
57
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
58
|
+
}]
|
|
59
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { uppy: [{
|
|
60
|
+
type: Input
|
|
61
|
+
}], props: [{
|
|
62
|
+
type: Input
|
|
63
|
+
}] } });
|
|
64
|
+
|
|
65
|
+
const COMPONENTS$4 = [DashboardComponent];
|
|
66
|
+
class UppyAngularDashboardModule {
|
|
67
|
+
}
|
|
68
|
+
UppyAngularDashboardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
69
|
+
UppyAngularDashboardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModule, declarations: [DashboardComponent], exports: [DashboardComponent] });
|
|
70
|
+
UppyAngularDashboardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModule });
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModule, decorators: [{
|
|
72
|
+
type: NgModule,
|
|
73
|
+
args: [{
|
|
74
|
+
declarations: COMPONENTS$4,
|
|
75
|
+
exports: COMPONENTS$4
|
|
76
|
+
}]
|
|
77
|
+
}] });
|
|
78
|
+
|
|
79
|
+
class DashboardModalComponent extends UppyAngularWrapper {
|
|
80
|
+
constructor(el) {
|
|
81
|
+
super();
|
|
82
|
+
this.el = el;
|
|
83
|
+
}
|
|
84
|
+
ngOnInit() {
|
|
85
|
+
this.onMount({
|
|
86
|
+
id: 'angular:DashboardModal',
|
|
87
|
+
inline: false,
|
|
88
|
+
target: this.el.nativeElement
|
|
89
|
+
}, Dashboard);
|
|
90
|
+
}
|
|
91
|
+
ngOnChanges(changes) {
|
|
92
|
+
this.handleChanges(changes, Dashboard);
|
|
93
|
+
// Handle dashboard-modal specific changes
|
|
94
|
+
if (changes.open && this.open !== changes.open.previousValue) {
|
|
95
|
+
if (this.open && !changes.open.previousValue) {
|
|
96
|
+
this.plugin.openModal();
|
|
97
|
+
}
|
|
98
|
+
if (!this.open && changes.open.previousValue) {
|
|
99
|
+
this.plugin.closeModal();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
ngOnDestroy() {
|
|
104
|
+
this.uninstall();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
DashboardModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DashboardModalComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
108
|
+
DashboardModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: DashboardModalComponent, selector: "uppy-dashboard-modal", inputs: { uppy: "uppy", props: "props", open: "open" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DashboardModalComponent, decorators: [{
|
|
110
|
+
type: Component,
|
|
111
|
+
args: [{
|
|
112
|
+
selector: 'uppy-dashboard-modal',
|
|
113
|
+
template: '',
|
|
114
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
115
|
+
}]
|
|
116
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { uppy: [{
|
|
117
|
+
type: Input
|
|
118
|
+
}], props: [{
|
|
119
|
+
type: Input
|
|
120
|
+
}], open: [{
|
|
121
|
+
type: Input
|
|
122
|
+
}] } });
|
|
123
|
+
|
|
124
|
+
const COMPONENTS$3 = [DashboardModalComponent];
|
|
125
|
+
class UppyAngularDashboardModalModule {
|
|
126
|
+
}
|
|
127
|
+
UppyAngularDashboardModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
128
|
+
UppyAngularDashboardModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModalModule, declarations: [DashboardModalComponent], exports: [DashboardModalComponent] });
|
|
129
|
+
UppyAngularDashboardModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModalModule });
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDashboardModalModule, decorators: [{
|
|
131
|
+
type: NgModule,
|
|
132
|
+
args: [{
|
|
133
|
+
declarations: COMPONENTS$3,
|
|
134
|
+
exports: COMPONENTS$3
|
|
135
|
+
}]
|
|
136
|
+
}] });
|
|
137
|
+
|
|
138
|
+
class ProgressBarComponent extends UppyAngularWrapper {
|
|
139
|
+
constructor(el) {
|
|
140
|
+
super();
|
|
141
|
+
this.el = el;
|
|
142
|
+
}
|
|
143
|
+
ngOnInit() {
|
|
144
|
+
this.onMount({ id: 'angular:ProgressBar', target: this.el.nativeElement }, ProgressBar);
|
|
145
|
+
}
|
|
146
|
+
ngOnChanges(changes) {
|
|
147
|
+
this.handleChanges(changes, ProgressBar);
|
|
148
|
+
}
|
|
149
|
+
ngOnDestroy() {
|
|
150
|
+
this.uninstall();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ProgressBarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
154
|
+
ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ProgressBarComponent, selector: "uppy-progress-bar", inputs: { uppy: "uppy", props: "props" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ProgressBarComponent, decorators: [{
|
|
156
|
+
type: Component,
|
|
157
|
+
args: [{
|
|
158
|
+
selector: 'uppy-progress-bar',
|
|
159
|
+
template: '',
|
|
160
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
161
|
+
}]
|
|
162
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { uppy: [{
|
|
163
|
+
type: Input
|
|
164
|
+
}], props: [{
|
|
165
|
+
type: Input
|
|
166
|
+
}] } });
|
|
167
|
+
|
|
168
|
+
const COMPONENTS$2 = [ProgressBarComponent];
|
|
169
|
+
class UppyAngularProgressBarModule {
|
|
170
|
+
}
|
|
171
|
+
UppyAngularProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
172
|
+
UppyAngularProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularProgressBarModule, declarations: [ProgressBarComponent], exports: [ProgressBarComponent] });
|
|
173
|
+
UppyAngularProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularProgressBarModule });
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularProgressBarModule, decorators: [{
|
|
175
|
+
type: NgModule,
|
|
176
|
+
args: [{
|
|
177
|
+
declarations: COMPONENTS$2,
|
|
178
|
+
exports: COMPONENTS$2
|
|
179
|
+
}]
|
|
180
|
+
}] });
|
|
181
|
+
|
|
182
|
+
class StatusBarComponent extends UppyAngularWrapper {
|
|
183
|
+
constructor(el) {
|
|
184
|
+
super();
|
|
185
|
+
this.el = el;
|
|
186
|
+
}
|
|
187
|
+
ngOnInit() {
|
|
188
|
+
this.onMount({ id: 'angular:StatusBar', target: this.el.nativeElement }, StatusBar);
|
|
189
|
+
}
|
|
190
|
+
ngOnChanges(changes) {
|
|
191
|
+
this.handleChanges(changes, StatusBar);
|
|
192
|
+
}
|
|
193
|
+
ngOnDestroy() {
|
|
194
|
+
this.uninstall();
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
StatusBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: StatusBarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
198
|
+
StatusBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: StatusBarComponent, selector: "uppy-status-bar", inputs: { uppy: "uppy", props: "props" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
199
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: StatusBarComponent, decorators: [{
|
|
200
|
+
type: Component,
|
|
201
|
+
args: [{
|
|
202
|
+
selector: 'uppy-status-bar',
|
|
203
|
+
template: '',
|
|
204
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
205
|
+
}]
|
|
206
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { uppy: [{
|
|
207
|
+
type: Input
|
|
208
|
+
}], props: [{
|
|
209
|
+
type: Input
|
|
210
|
+
}] } });
|
|
211
|
+
|
|
212
|
+
const COMPONENTS$1 = [StatusBarComponent];
|
|
213
|
+
class UppyAngularStatusBarModule {
|
|
214
|
+
}
|
|
215
|
+
UppyAngularStatusBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularStatusBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
216
|
+
UppyAngularStatusBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularStatusBarModule, declarations: [StatusBarComponent], exports: [StatusBarComponent] });
|
|
217
|
+
UppyAngularStatusBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularStatusBarModule });
|
|
218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularStatusBarModule, decorators: [{
|
|
219
|
+
type: NgModule,
|
|
220
|
+
args: [{
|
|
221
|
+
declarations: COMPONENTS$1,
|
|
222
|
+
exports: COMPONENTS$1
|
|
223
|
+
}]
|
|
224
|
+
}] });
|
|
225
|
+
|
|
226
|
+
class DragDropComponent extends UppyAngularWrapper {
|
|
227
|
+
constructor(el) {
|
|
228
|
+
super();
|
|
229
|
+
this.el = el;
|
|
230
|
+
}
|
|
231
|
+
ngOnInit() {
|
|
232
|
+
this.onMount({ id: 'angular:DragDrop', target: this.el.nativeElement }, DragDrop);
|
|
233
|
+
}
|
|
234
|
+
ngOnChanges(changes) {
|
|
235
|
+
this.handleChanges(changes, DragDrop);
|
|
236
|
+
}
|
|
237
|
+
ngOnDestroy() {
|
|
238
|
+
this.uninstall();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
DragDropComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DragDropComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
242
|
+
DragDropComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: DragDropComponent, selector: "uppy-drag-drop", inputs: { uppy: "uppy", props: "props" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: DragDropComponent, decorators: [{
|
|
244
|
+
type: Component,
|
|
245
|
+
args: [{
|
|
246
|
+
selector: 'uppy-drag-drop',
|
|
247
|
+
template: '',
|
|
248
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
249
|
+
}]
|
|
250
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { uppy: [{
|
|
251
|
+
type: Input
|
|
252
|
+
}], props: [{
|
|
253
|
+
type: Input
|
|
254
|
+
}] } });
|
|
255
|
+
|
|
256
|
+
const COMPONENTS = [DragDropComponent];
|
|
257
|
+
class UppyAngularDragDropModule {
|
|
258
|
+
}
|
|
259
|
+
UppyAngularDragDropModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDragDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
260
|
+
UppyAngularDragDropModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDragDropModule, declarations: [DragDropComponent], exports: [DragDropComponent] });
|
|
261
|
+
UppyAngularDragDropModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDragDropModule });
|
|
262
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UppyAngularDragDropModule, decorators: [{
|
|
263
|
+
type: NgModule,
|
|
264
|
+
args: [{
|
|
265
|
+
declarations: COMPONENTS,
|
|
266
|
+
exports: COMPONENTS
|
|
267
|
+
}]
|
|
268
|
+
}] });
|
|
269
|
+
|
|
270
|
+
/*
|
|
271
|
+
* Public API Surface of @uppy/angular
|
|
272
|
+
*/
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Generated bundle index. Do not edit.
|
|
276
|
+
*/
|
|
277
|
+
|
|
278
|
+
export { DashboardComponent, DashboardModalComponent, DragDropComponent, ProgressBarComponent, StatusBarComponent, UppyAngularDashboardModalModule, UppyAngularDashboardModule, UppyAngularDragDropModule, UppyAngularProgressBarModule, UppyAngularStatusBarModule };
|
|
279
|
+
//# sourceMappingURL=uppy-angular.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uppy-angular.mjs","sources":["../../../projects/angular/src/lib/utils/wrapper.ts","../../../projects/angular/src/lib/components/dashboard/dashboard.component.ts","../../../projects/angular/src/lib/components/dashboard/dashboard.module.ts","../../../projects/angular/src/lib/components/dashboard-modal/dashboard-modal.component.ts","../../../projects/angular/src/lib/components/dashboard-modal/dashboard-modal.module.ts","../../../projects/angular/src/lib/components/progress-bar/progress-bar.component.ts","../../../projects/angular/src/lib/components/progress-bar/progress-bar.module.ts","../../../projects/angular/src/lib/components/status-bar/status-bar.component.ts","../../../projects/angular/src/lib/components/status-bar/status-bar.module.ts","../../../projects/angular/src/lib/components/drag-drop/drag-drop.component.ts","../../../projects/angular/src/lib/components/drag-drop/drag-drop.module.ts","../../../projects/angular/src/public-api.ts","../../../projects/angular/src/uppy-angular.ts"],"sourcesContent":["import { Uppy, UIPlugin } from '@uppy/core';\nimport { ElementRef, SimpleChanges } from '@angular/core';\n\nexport abstract class UppyAngularWrapper<PluginType extends UIPlugin = UIPlugin> {\n abstract props;\n abstract el: ElementRef\n abstract uppy: Uppy;\n private options: any;\n plugin: PluginType;\n\n onMount(defaultOptions, plugin) {\n this.options = {\n ...defaultOptions,\n ...this.props,\n };\n\n this.uppy.use(plugin, this.options);\n this.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n }\n\n handleChanges(changes: SimpleChanges, plugin: any): void {\n // Without the last part of this conditional, it tries to uninstall before the plugin is mounted\n if (changes.uppy && this.uppy !== changes.uppy.previousValue && changes.uppy.previousValue !== undefined) {\n this.uninstall(changes.uppy.previousValue);\n this.uppy.use(plugin, this.options);\n }\n this.options = { ...this.options, ...this.props }\n this.plugin = this.uppy.getPlugin(this.options.id) as PluginType;\n if(changes.props && this.props !== changes.props.previousValue && changes.props.previousValue !== undefined) {\n this.plugin.setOptions({ ...this.options })\n }\n }\n\n uninstall(uppy = this.uppy): void {\n console.log('Uninstalling...')\n uppy.removePlugin(this.plugin);\n }\n\n}\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport Dashboard from '@uppy/dashboard';\nimport type { DashboardOptions } from '@uppy/dashboard';\nimport { Uppy } from '@uppy/core';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-dashboard',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DashboardComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy;\n @Input() props: DashboardOptions;\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:Dashboard', inline: true, target: this.el.nativeElement }, Dashboard)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, Dashboard);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DashboardComponent } from './dashboard.component';\n\nexport const COMPONENTS = [DashboardComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDashboardModule { }\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport Dashboard from '@uppy/dashboard';\nimport type { DashboardOptions } from '@uppy/dashboard';\nimport { Uppy } from '@uppy/core';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-dashboard-modal',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DashboardModalComponent extends UppyAngularWrapper<Dashboard> implements OnDestroy, OnChanges {\n @Input() uppy: Uppy;\n @Input() props: DashboardOptions;\n @Input() open: boolean;\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({\n id: 'angular:DashboardModal',\n inline: false,\n target: this.el.nativeElement\n }, Dashboard)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, Dashboard);\n // Handle dashboard-modal specific changes\n if (changes.open && this.open !== changes.open.previousValue) {\n if(this.open && !changes.open.previousValue) {\n this.plugin.openModal()\n }\n if (!this.open && changes.open.previousValue) {\n this.plugin.closeModal()\n }\n }\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DashboardModalComponent } from './dashboard-modal.component';\n\nexport const COMPONENTS = [DashboardModalComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDashboardModalModule { }\n","import { Component, ChangeDetectionStrategy, ElementRef, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport ProgressBar from '@uppy/progress-bar';\nimport type { ProgressBarOptions } from '@uppy/progress-bar';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-progress-bar',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ProgressBarComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy;\n @Input() props: ProgressBarOptions;\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:ProgressBar', target: this.el.nativeElement }, ProgressBar)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, ProgressBar);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ProgressBarComponent } from './progress-bar.component';\n\nexport const COMPONENTS = [ProgressBarComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularProgressBarModule { }\n","import { Component, ChangeDetectionStrategy, Input, ElementRef, SimpleChange, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport StatusBar from '@uppy/status-bar';\nimport type { StatusBarOptions } from '@uppy/status-bar';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-status-bar',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class StatusBarComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy;\n @Input() props: StatusBarOptions;\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:StatusBar', target: this.el.nativeElement }, StatusBar)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, StatusBar);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { StatusBarComponent } from './status-bar.component';\n\nexport const COMPONENTS = [StatusBarComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularStatusBarModule { }\n","import { Component, ChangeDetectionStrategy, Input, OnDestroy, OnChanges, SimpleChanges, ElementRef } from '@angular/core';\nimport { Uppy } from '@uppy/core';\nimport DragDrop from '@uppy/drag-drop';\nimport type { DragDropOptions } from '@uppy/drag-drop';\nimport { UppyAngularWrapper } from '../../utils/wrapper';\n\n@Component({\n selector: 'uppy-drag-drop',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DragDropComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {\n @Input() uppy: Uppy;\n @Input() props: DragDropOptions;\n\n constructor(public el: ElementRef) {\n super();\n }\n\n ngOnInit() {\n this.onMount({ id: 'angular:DragDrop', target: this.el.nativeElement }, DragDrop)\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.handleChanges(changes, DragDrop);\n }\n\n ngOnDestroy(): void {\n this.uninstall();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { DragDropComponent } from './drag-drop.component';\n\nexport const COMPONENTS = [DragDropComponent];\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class UppyAngularDragDropModule { }\n","/*\n * Public API Surface of @uppy/angular\n */\n\nexport { UppyAngularDashboardModule } from './lib/components/dashboard/dashboard.module'\nexport { UppyAngularDashboardModalModule } from './lib/components/dashboard-modal/dashboard-modal.module'\nexport { UppyAngularProgressBarModule } from './lib/components/progress-bar/progress-bar.module'\nexport { UppyAngularStatusBarModule } from './lib/components/status-bar/status-bar.module'\nexport { UppyAngularDragDropModule } from './lib/components/drag-drop/drag-drop.module'\nexport { StatusBarComponent } from './lib/components/status-bar/status-bar.component'\nexport { ProgressBarComponent } from './lib/components/progress-bar/progress-bar.component'\nexport { DragDropComponent } from './lib/components/drag-drop/drag-drop.component'\nexport { DashboardComponent } from './lib/components/dashboard/dashboard.component'\nexport { DashboardModalComponent } from './lib/components/dashboard-modal/dashboard-modal.component'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["COMPONENTS"],"mappings":";;;;;;;MAGsB,kBAAkB;IAOpC,OAAO,CAAC,cAAc,EAAE,MAAM;QAC5B,IAAI,CAAC,OAAO,GAAG;YACb,GAAG,cAAc;YACjB,GAAG,IAAI,CAAC,KAAK;SACd,CAAC;QAEF,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAe,CAAC;KAClE;IAED,aAAa,CAAC,OAAsB,EAAE,MAAW;;QAE/C,IAAI,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE;YACtG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;SACvC;QACD,IAAI,CAAC,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,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AAC,OAAO,EAAE,QAAQ,CAAC,CAAC;KACvC;IAED,WAAW;QACT,IAAI,CAAC,SAAS,EAAE,CAAC;KAClB;;8GAlBU,iBAAiB;kGAAjB,iBAAiB,4IAHlB,EAAE;2FAGD,iBAAiB;kBAL7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,gBAAgB;oBAC1B,QAAQ,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;iGAEU,IAAI;sBAAZ,KAAK;gBACG,KAAK;sBAAb,KAAK;;;ACVD,MAAM,UAAU,GAAG,CAAC,iBAAiB,CAAC,CAAC;MAKjC,yBAAyB;;sHAAzB,yBAAyB;uHAAzB,yBAAyB,iBALX,iBAAiB,aAAjB,iBAAiB;uHAK/B,yBAAyB;2FAAzB,yBAAyB;kBAJrC,QAAQ;mBAAC;oBACR,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACPD;;;;ACAA;;;;;;"}
|
|
@@ -2,6 +2,7 @@ import { ElementRef, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
|
|
|
2
2
|
import type { DashboardOptions } from '@uppy/dashboard';
|
|
3
3
|
import { Uppy } from '@uppy/core';
|
|
4
4
|
import { UppyAngularWrapper } from '../../utils/wrapper';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class DashboardComponent extends UppyAngularWrapper implements OnDestroy, OnChanges {
|
|
6
7
|
el: ElementRef;
|
|
7
8
|
uppy: Uppy;
|
|
@@ -10,4 +11,6 @@ export declare class DashboardComponent extends UppyAngularWrapper implements On
|
|
|
10
11
|
ngOnInit(): void;
|
|
11
12
|
ngOnChanges(changes: SimpleChanges): void;
|
|
12
13
|
ngOnDestroy(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DashboardComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DashboardComponent, "uppy-dashboard", never, { "uppy": "uppy"; "props": "props"; }, {}, never, never>;
|
|
13
16
|
}
|