@uppy/angular 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { inject, ElementRef, Input, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { Uppy } from '@uppy/core';
4
4
  import Dashboard from '@uppy/dashboard';
5
+ import StatusBar from '@uppy/status-bar';
5
6
 
6
7
  class UppyAngularWrapper {
7
8
  onMount(defaultOptions, plugin) {
@@ -116,6 +117,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
116
117
  type: Input
117
118
  }] } });
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
+
119
153
  /*
120
154
  * Public API Surface of @uppy/angular
121
155
  */
@@ -124,5 +158,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
124
158
  * Generated bundle index. Do not edit.
125
159
  */
126
160
 
127
- export { DashboardComponent, DashboardModalComponent };
161
+ export { DashboardComponent, DashboardModalComponent, StatusBarComponent };
128
162
  //# 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/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","/*\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'\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,CAAC,KAAK,EAAE;AACjD,QAAA,IA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aAAa,EAAE;AAChD,gBAAA,IAAI,CAAC,MAAO,CAAC,SAAS,EAAE;;AAEzB,YAAA,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE;AAChD,gBAAA,IAAI,CAAC,MAAO,CAAC,UAAU,EAAE;;;;IAK5B,WAAW,GAAA;QACV,IAAI,CAAC,SAAS,EAAE;;8GA1CL,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,oLAJzB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIA,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBANnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,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;gBACQ,IAAI,EAAA,CAAA;sBAAZ;;;AC9BF;;AAEG;;ACFH;;AAEG;;;;"}
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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EG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,18 @@
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
+ }
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.0.1",
4
+ "version": "1.1.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://uppy.io",
7
7
  "keywords": [
package/public-api.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export { DashboardComponent } from './lib/components/dashboard/dashboard.component';
2
2
  export { DashboardModalComponent } from './lib/components/dashboard-modal/dashboard-modal.component';
3
+ export { StatusBarComponent } from './lib/components/status-bar/status-bar.component';