@dataclouder/ngx-cloud-storage 0.0.31 → 0.0.35
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dataclouder/ngx-cloud-storage",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"description": "Angular component library for handling cloud storage uploads with image cropping capabilities",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"sideEffects": false,
|
|
19
19
|
"module": "fesm2022/dataclouder-ngx-cloud-storage.mjs",
|
|
20
|
-
"typings": "
|
|
20
|
+
"typings": "types/dataclouder-ngx-cloud-storage.d.ts",
|
|
21
21
|
"exports": {
|
|
22
22
|
"./package.json": {
|
|
23
23
|
"default": "./package.json"
|
|
24
24
|
},
|
|
25
25
|
".": {
|
|
26
|
-
"types": "./
|
|
26
|
+
"types": "./types/dataclouder-ngx-cloud-storage.d.ts",
|
|
27
27
|
"default": "./fesm2022/dataclouder-ngx-cloud-storage.mjs"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnInit, OnDestroy, PipeTransform } from '@angular/core';
|
|
2
|
+
import { OnInit, OnDestroy, PipeTransform, InjectionToken, EventEmitter } from '@angular/core';
|
|
3
3
|
import { ImageCropperComponent, ImageCroppedEvent, LoadedImage } from 'ngx-image-cropper';
|
|
4
4
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
5
5
|
import * as _dataclouder_ngx_core from '@dataclouder/ngx-core';
|
|
@@ -234,12 +234,13 @@ declare class ImageStoragePreviewComponent implements OnInit, OnDestroy {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
declare class SimpleUploaderComponent {
|
|
237
|
-
private
|
|
237
|
+
private universalStorageService;
|
|
238
238
|
storagePath: _angular_core.InputSignal<string>;
|
|
239
239
|
buttonLabel: _angular_core.InputSignal<string>;
|
|
240
240
|
accept: _angular_core.InputSignal<string>;
|
|
241
241
|
disabled: _angular_core.InputSignal<boolean>;
|
|
242
242
|
metadata: _angular_core.InputSignal<any>;
|
|
243
|
+
provider: _angular_core.InputSignal<string>;
|
|
243
244
|
fileUploaded: _angular_core.OutputEmitterRef<FileStorageData>;
|
|
244
245
|
uploadError: _angular_core.OutputEmitterRef<any>;
|
|
245
246
|
isLoading: _angular_core.WritableSignal<boolean>;
|
|
@@ -265,7 +266,7 @@ declare class SimpleUploaderComponent {
|
|
|
265
266
|
onFileSelected(event: Event): void;
|
|
266
267
|
uploadFile(): Promise<void>;
|
|
267
268
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SimpleUploaderComponent, never>;
|
|
268
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SimpleUploaderComponent, "dc-simple-uploader", never, { "storagePath": { "alias": "storagePath"; "required": true; "isSignal": true; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "metadata": { "alias": "metadata"; "required": false; "isSignal": true; }; }, { "fileUploaded": "fileUploaded"; "uploadError": "uploadError"; }, never, never, true, never>;
|
|
269
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SimpleUploaderComponent, "dc-simple-uploader", never, { "storagePath": { "alias": "storagePath"; "required": true; "isSignal": true; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "metadata": { "alias": "metadata"; "required": false; "isSignal": true; }; "provider": { "alias": "provider"; "required": false; "isSignal": true; }; }, { "fileUploaded": "fileUploaded"; "uploadError": "uploadError"; }, never, never, true, never>;
|
|
269
270
|
}
|
|
270
271
|
|
|
271
272
|
declare class SafeHtmlPipe implements PipeTransform {
|
|
@@ -344,6 +345,51 @@ declare class MultiObjectStorageService {
|
|
|
344
345
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<MultiObjectStorageService>;
|
|
345
346
|
}
|
|
346
347
|
|
|
348
|
+
declare const STORAGE_PROVIDER_TYPE: InjectionToken<"FIREBASE" | "BACKEND">;
|
|
349
|
+
declare class UniversalStorageService {
|
|
350
|
+
private firebaseProvider;
|
|
351
|
+
private backendProvider;
|
|
352
|
+
private providerType;
|
|
353
|
+
private get provider();
|
|
354
|
+
uploadImage(image: Blob, path: string, provider?: string): Promise<ImgStorageData | null>;
|
|
355
|
+
uploadGenericFile(file: File, storagePath: string, metadata?: any, keepOriginalName?: boolean, provider?: string): Promise<FileStorageData | null>;
|
|
356
|
+
uploadMultipleFiles(files: File[], storagePath: string, metadata?: any, keepOriginalName?: boolean, provider?: string): Promise<FileStorageData[] | null>;
|
|
357
|
+
deleteImage(imagePath: string): Promise<void>;
|
|
358
|
+
deleteDirectory(directoryPath: string): Promise<void>;
|
|
359
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniversalStorageService, never>;
|
|
360
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<UniversalStorageService>;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
declare class BackendUploadComponent {
|
|
364
|
+
fileUpload: any;
|
|
365
|
+
private storageService;
|
|
366
|
+
onUploadFinish: EventEmitter<any[]>;
|
|
367
|
+
storagePath: string;
|
|
368
|
+
keepOriginalNames: boolean;
|
|
369
|
+
provider: string;
|
|
370
|
+
uploading: _angular_core.WritableSignal<boolean>;
|
|
371
|
+
status: _angular_core.WritableSignal<"error" | "success">;
|
|
372
|
+
message: _angular_core.WritableSignal<string>;
|
|
373
|
+
uploadedFileUrls: _angular_core.WritableSignal<string[]>;
|
|
374
|
+
totalSize: _angular_core.WritableSignal<number>;
|
|
375
|
+
totalSizePercent: _angular_core.WritableSignal<number>;
|
|
376
|
+
onUpload(event: {
|
|
377
|
+
files: any[];
|
|
378
|
+
}): Promise<void>;
|
|
379
|
+
onSelect(event: {
|
|
380
|
+
currentFiles: File[];
|
|
381
|
+
}): void;
|
|
382
|
+
onRemove(event: {
|
|
383
|
+
file: File;
|
|
384
|
+
}): void;
|
|
385
|
+
onClear(): void;
|
|
386
|
+
choose(event: any, callback: any): void;
|
|
387
|
+
onFolderSelect(event: any): void;
|
|
388
|
+
formatSize(bytes: number): string;
|
|
389
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BackendUploadComponent, never>;
|
|
390
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BackendUploadComponent, "dc-backend-upload", never, { "storagePath": { "alias": "storagePath"; "required": false; }; "keepOriginalNames": { "alias": "keepOriginalNames"; "required": false; }; "provider": { "alias": "provider"; "required": false; }; }, { "onUploadFinish": "onUploadFinish"; }, never, never, true, never>;
|
|
391
|
+
}
|
|
392
|
+
|
|
347
393
|
interface IAssetable {
|
|
348
394
|
image?: BasicStorage;
|
|
349
395
|
banner?: BasicStorage;
|
|
@@ -382,5 +428,5 @@ declare class AssetsLoaderComponent implements OnDestroy {
|
|
|
382
428
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AssetsLoaderComponent, "assets-loader", never, { "assets": { "alias": "assets"; "required": true; "isSignal": true; }; "storagePath": { "alias": "storagePath"; "required": true; "isSignal": true; }; }, { "assetsChange": "assetsChange"; "assetUpdate": "assetUpdate"; "onFileSelected": "onFileSelected"; }, never, never, true, never>;
|
|
383
429
|
}
|
|
384
430
|
|
|
385
|
-
export { AllAspectRatioOptions, AspectRatio, AspectRatioOptions, AspectType, AssetsLoaderComponent, CropperComponent, CropperComponentModal, DCFilesCacheService, DEFAULT_SETTINGS, ImageStoragePreviewComponent, MultiImagesStorageService, MultiObjectStorageService, ResolutionType, SafeHtmlPipe, SimpleUploaderComponent, extractBucket, extractPath };
|
|
431
|
+
export { AllAspectRatioOptions, AspectRatio, AspectRatioOptions, AspectType, AssetsLoaderComponent, BackendUploadComponent, CropperComponent, CropperComponentModal, DCFilesCacheService, DEFAULT_SETTINGS, ImageStoragePreviewComponent, MultiImagesStorageService, MultiObjectStorageService, ResolutionType, STORAGE_PROVIDER_TYPE, SafeHtmlPipe, SimpleUploaderComponent, UniversalStorageService, extractBucket, extractPath };
|
|
386
432
|
export type { AspectRatioOption, AudioStorage, BasicStorage, CloudStorage, CropImageSettings, FileStorageData, IAssetable, ImageCropSettings, ImageMultipleCrops, ImgGeneratedStorageData, ImgStorageData, ObjectStorageData, StorageImageSettings, VoiceSample };
|