@acrodata/gui 2.1.3 → 2.2.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/esm2022/file-uploader/file-uploader-config.mjs +16 -11
- package/esm2022/file-uploader/file-uploader.mjs +18 -21
- package/esm2022/fill/fill.mjs +5 -3
- package/esm2022/image-select/image-select.mjs +2 -2
- package/esm2022/interface.mjs +1 -1
- package/fesm2022/acrodata-gui.mjs +36 -32
- package/fesm2022/acrodata-gui.mjs.map +1 -1
- package/file-uploader/file-uploader-config.d.ts +11 -8
- package/file-uploader/file-uploader.d.ts +2 -2
- package/interface.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { GuiControl } from '../interface';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
export interface FileUploadResponseBody {
|
|
5
|
+
bytes: number;
|
|
6
|
+
mime: string;
|
|
7
|
+
url: string;
|
|
8
|
+
}
|
|
3
9
|
export declare class GuiFileUploaderConfig {
|
|
4
|
-
|
|
10
|
+
protected http: HttpClient;
|
|
5
11
|
constructor(http: HttpClient);
|
|
6
12
|
/**
|
|
7
13
|
* The file upload URL
|
|
8
14
|
*/
|
|
9
15
|
url: string;
|
|
10
|
-
/**
|
|
11
|
-
* The file upload params
|
|
12
|
-
*/
|
|
13
|
-
params: any;
|
|
14
16
|
/**
|
|
15
17
|
* The File upload API
|
|
16
18
|
*
|
|
17
|
-
* @param
|
|
18
|
-
* @
|
|
19
|
+
* @param formData The FormData with file binary
|
|
20
|
+
* @param config The custom upload config that passed from component input
|
|
21
|
+
* @returns The uploaded file url stream
|
|
19
22
|
*/
|
|
20
|
-
upload(
|
|
23
|
+
upload(formData: FormData, config: Partial<GuiControl>): import("rxjs").Observable<string | null>;
|
|
21
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<GuiFileUploaderConfig, never>;
|
|
22
25
|
static ɵprov: i0.ɵɵInjectableDeclaration<GuiFileUploaderConfig>;
|
|
23
26
|
}
|
|
@@ -21,7 +21,7 @@ export declare class GuiFileUploader implements ControlValueAccessor, OnChanges
|
|
|
21
21
|
accept: string;
|
|
22
22
|
fileChange: EventEmitter<string>;
|
|
23
23
|
url: string;
|
|
24
|
-
|
|
24
|
+
fileUpload: FileUploadContent;
|
|
25
25
|
private onChange;
|
|
26
26
|
private onTouched;
|
|
27
27
|
constructor(fileUploaderCfg: GuiFileUploaderConfig, cdr: ChangeDetectorRef, iconsRegistry: GuiIconsRegistry);
|
|
@@ -30,7 +30,7 @@ export declare class GuiFileUploader implements ControlValueAccessor, OnChanges
|
|
|
30
30
|
registerOnChange(fn: (value: string) => void): void;
|
|
31
31
|
registerOnTouched(fn: () => void): void;
|
|
32
32
|
setDisabledState(isDisabled: boolean): void;
|
|
33
|
-
upload(
|
|
33
|
+
upload(fileUpload: FileUploadContent): void;
|
|
34
34
|
onUrlChange(e: Event): void;
|
|
35
35
|
onFileChange(e: Event): void;
|
|
36
36
|
onBlur(): void;
|
package/interface.d.ts
CHANGED