croco-html 0.2.13 → 0.2.14
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/esm2020/lib/components/add-files-btn/add-files-btn.component.mjs +3 -3
- package/esm2020/lib/components/editor/visual-editor/visual-editor.component.mjs +3 -3
- package/esm2020/lib/services/file-upload.service.mjs +37 -7
- package/fesm2015/croco-html.mjs +40 -9
- package/fesm2015/croco-html.mjs.map +1 -1
- package/fesm2020/croco-html.mjs +39 -9
- package/fesm2020/croco-html.mjs.map +1 -1
- package/lib/components/add-files-btn/add-files-btn.component.d.ts +1 -1
- package/lib/services/file-upload.service.d.ts +15 -4
- package/package.json +1 -1
|
@@ -14,5 +14,5 @@ export declare class AddFilesBtnComponent implements OnInit {
|
|
|
14
14
|
handleClick(): void;
|
|
15
15
|
ngOnInit(): void;
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<AddFilesBtnComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AddFilesBtnComponent, "croco-add-files-btn", never, {}, { "postFilesStarted": "postFilesStarted"; "filesTagsReady": "filesTagsReady"; }, never, never, false, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AddFilesBtnComponent, "croco-html-add-files-btn", never, {}, { "postFilesStarted": "postFilesStarted"; "filesTagsReady": "filesTagsReady"; }, never, never, false, never>;
|
|
18
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HttpClient } from
|
|
2
|
-
import { Observable } from
|
|
1
|
+
import { HttpClient, HttpEvent } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export interface BaseApiResponse {
|
|
5
5
|
isSucceeded: boolean;
|
|
@@ -11,13 +11,24 @@ export interface GenericBaseApiResponse<T> extends BaseApiResponse {
|
|
|
11
11
|
export interface BaseApiResponseWithFilesIds extends BaseApiResponse {
|
|
12
12
|
responseObject: number[];
|
|
13
13
|
}
|
|
14
|
+
export interface UploadFileWithProgressEvent {
|
|
15
|
+
loading: boolean;
|
|
16
|
+
response?: BaseApiResponseWithFilesIds;
|
|
17
|
+
uploadingLoaded: number;
|
|
18
|
+
uploadingTotal: number;
|
|
19
|
+
}
|
|
14
20
|
export declare class FileUploadService {
|
|
15
21
|
private _httpClient;
|
|
16
22
|
private baseUrl;
|
|
17
23
|
constructor(_httpClient: HttpClient, baseUrl: string);
|
|
18
|
-
postFile(file: File, createLocalCopiesNow
|
|
24
|
+
postFile(file: File, createLocalCopiesNow: boolean, withProgress: true): Observable<HttpEvent<BaseApiResponseWithFilesIds>>;
|
|
25
|
+
postFile(file: File, createLocalCopiesNow?: boolean, withProgress?: false): Observable<BaseApiResponseWithFilesIds>;
|
|
26
|
+
postFile(file: File, createLocalCopiesNow?: boolean, withProgress?: boolean): Observable<BaseApiResponseWithFilesIds> | Observable<HttpEvent<BaseApiResponseWithFilesIds>>;
|
|
19
27
|
postFiles(files: FileList, createLocalCopiesNow?: boolean): Observable<BaseApiResponseWithFilesIds>;
|
|
20
|
-
postFilesInner(formData: FormData, createLocalCopiesNow
|
|
28
|
+
postFilesInner(formData: FormData, createLocalCopiesNow: boolean, withProgress: true): Observable<HttpEvent<BaseApiResponseWithFilesIds>>;
|
|
29
|
+
postFilesInner(formData: FormData, createLocalCopiesNow?: boolean, withProgress?: false): Observable<BaseApiResponseWithFilesIds>;
|
|
30
|
+
postFilesInner(formData: FormData, createLocalCopiesNow: boolean, withProgress: boolean): Observable<BaseApiResponseWithFilesIds> | Observable<HttpEvent<BaseApiResponseWithFilesIds>>;
|
|
31
|
+
uploadFileWithProgress(file: File, createLocalCopiesNow?: boolean): Observable<UploadFileWithProgressEvent>;
|
|
21
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadService, never>;
|
|
22
33
|
static ɵprov: i0.ɵɵInjectableDeclaration<FileUploadService>;
|
|
23
34
|
}
|