valtech-components 4.0.1039 → 4.0.1041
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/lib/components/molecules/select-input/select-input.component.mjs +9 -4
- package/esm2022/lib/services/firebase/storage.service.mjs +49 -1
- package/esm2022/lib/services/firebase/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +308 -258
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/rights-footer/rights-footer.component.d.ts +1 -1
- package/lib/components/molecules/features-list/features-list.component.d.ts +1 -1
- package/lib/components/molecules/load-more/load-more.component.d.ts +1 -1
- package/lib/components/molecules/operation-reference/operation-reference.component.d.ts +1 -1
- package/lib/components/molecules/phone-display/phone-display.component.d.ts +1 -1
- package/lib/components/molecules/select-input/select-input.component.d.ts +1 -0
- package/lib/components/molecules/username-input/username-input.component.d.ts +1 -1
- package/lib/components/organisms/article/article.component.d.ts +4 -4
- package/lib/components/organisms/landing-steps/landing-steps.component.d.ts +1 -1
- package/lib/components/organisms/member-import-modal/member-import-modal.component.d.ts +1 -1
- package/lib/components/organisms/notification-preferences-view/notification-preferences-view.component.d.ts +1 -1
- package/lib/services/firebase/storage.service.d.ts +11 -1
- package/lib/services/firebase/types.d.ts +34 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -57,7 +57,7 @@ export declare class RightsFooterComponent {
|
|
|
57
57
|
/**
|
|
58
58
|
* Computed helper for color prop in template.
|
|
59
59
|
*/
|
|
60
|
-
propsColor: import("@angular/core").Signal<"
|
|
60
|
+
propsColor: import("@angular/core").Signal<"medium" | "danger" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "light" | "dark">;
|
|
61
61
|
/**
|
|
62
62
|
* Computed helper for withMargin prop in template.
|
|
63
63
|
*/
|
|
@@ -42,7 +42,7 @@ export declare class FeaturesListComponent {
|
|
|
42
42
|
iconSize: number;
|
|
43
43
|
mode: "horizontal" | "vertical";
|
|
44
44
|
gap: "small" | "medium" | "large";
|
|
45
|
-
alignment: "
|
|
45
|
+
alignment: "start" | "center";
|
|
46
46
|
imageShape: "circle" | "square";
|
|
47
47
|
maxVisible: number;
|
|
48
48
|
showMoreLabel?: string;
|
|
@@ -26,7 +26,7 @@ export declare class LoadMoreComponent {
|
|
|
26
26
|
readonly color: import("@angular/core").Signal<string>;
|
|
27
27
|
readonly fill: import("@angular/core").Signal<string>;
|
|
28
28
|
readonly shape: import("@angular/core").Signal<string>;
|
|
29
|
-
readonly size: import("@angular/core").Signal<"
|
|
29
|
+
readonly size: import("@angular/core").Signal<"default" | "small" | "large">;
|
|
30
30
|
readonly threshold: import("@angular/core").Signal<string>;
|
|
31
31
|
readonly label: import("@angular/core").Signal<string>;
|
|
32
32
|
private readonly _pendingComplete;
|
|
@@ -6,7 +6,7 @@ export declare class OperationReferenceComponent {
|
|
|
6
6
|
protected label: import("@angular/core").Signal<string>;
|
|
7
7
|
protected copiedLabel: import("@angular/core").Signal<string>;
|
|
8
8
|
protected copyAriaLabel: import("@angular/core").Signal<string>;
|
|
9
|
-
protected align: import("@angular/core").Signal<"
|
|
9
|
+
protected align: import("@angular/core").Signal<"start" | "end" | "center">;
|
|
10
10
|
protected copyValue(): void;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<OperationReferenceComponent, never>;
|
|
12
12
|
static ɵcmp: i0.ɵɵComponentDeclaration<OperationReferenceComponent, "val-operation-reference", never, { "props": { "alias": "props"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -6,7 +6,7 @@ export declare class PhoneDisplayComponent {
|
|
|
6
6
|
props: PhoneDisplayMetadata;
|
|
7
7
|
onClick: EventEmitter<string>;
|
|
8
8
|
protected rawPhone: import("@angular/core").Signal<string>;
|
|
9
|
-
protected mode: import("@angular/core").Signal<"
|
|
9
|
+
protected mode: import("@angular/core").Signal<"text" | "link" | "button">;
|
|
10
10
|
protected formatted: import("@angular/core").Signal<string>;
|
|
11
11
|
protected href: import("@angular/core").Signal<string>;
|
|
12
12
|
protected ariaLabel: import("@angular/core").Signal<string>;
|
|
@@ -35,7 +35,7 @@ export declare class UsernameInputComponent implements OnInit, OnDestroy {
|
|
|
35
35
|
availabilityStatus: import("@angular/core").WritableSignal<UsernameAvailabilityStatus>;
|
|
36
36
|
hasError: import("@angular/core").Signal<boolean>;
|
|
37
37
|
showStatusMessage: import("@angular/core").Signal<boolean>;
|
|
38
|
-
statusColor: import("@angular/core").Signal<"
|
|
38
|
+
statusColor: import("@angular/core").Signal<"danger" | "success">;
|
|
39
39
|
statusMessage: import("@angular/core").Signal<"" | "Username disponible" | "Username ya está en uso">;
|
|
40
40
|
errorMessage: import("@angular/core").Signal<string>;
|
|
41
41
|
ngOnInit(): void;
|
|
@@ -88,7 +88,7 @@ export declare class ArticleComponent implements OnInit, AfterViewInit {
|
|
|
88
88
|
getHighlightColor(element: ArticleElement): string;
|
|
89
89
|
getButtonProps(element: ArticleElement): {
|
|
90
90
|
actionType?: import("valtech-components").ActionType;
|
|
91
|
-
expand?: "
|
|
91
|
+
expand?: "block" | "full";
|
|
92
92
|
link?: string;
|
|
93
93
|
href?: string;
|
|
94
94
|
routerLink?: string | any[];
|
|
@@ -103,9 +103,9 @@ export declare class ArticleComponent implements OnInit, AfterViewInit {
|
|
|
103
103
|
contentInterpolation?: Record<string, string | number>;
|
|
104
104
|
icon?: import("valtech-components").IconMetada;
|
|
105
105
|
shape?: "round";
|
|
106
|
-
size?: "
|
|
107
|
-
fill?: "default" | "
|
|
108
|
-
type: "
|
|
106
|
+
size?: "default" | "small" | "large";
|
|
107
|
+
fill?: "default" | "outline" | "solid" | "clear" | "tint";
|
|
108
|
+
type: "submit" | "button" | "reset";
|
|
109
109
|
token?: string;
|
|
110
110
|
ariaLabel?: string;
|
|
111
111
|
ref?: any;
|
|
@@ -4,7 +4,7 @@ export declare class LandingStepsComponent {
|
|
|
4
4
|
private readonly props_;
|
|
5
5
|
set props(v: LandingStepsMetadata);
|
|
6
6
|
readonly p: import("@angular/core").Signal<LandingStepsMetadata>;
|
|
7
|
-
readonly cols: import("@angular/core").Signal<2 |
|
|
7
|
+
readonly cols: import("@angular/core").Signal<2 | 4 | 3>;
|
|
8
8
|
readonly accentColor: import("@angular/core").Signal<string>;
|
|
9
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<LandingStepsComponent, never>;
|
|
10
10
|
static ɵcmp: i0.ɵɵComponentDeclaration<LandingStepsComponent, "val-landing-steps", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
|
|
@@ -28,7 +28,7 @@ export declare class MemberImportModalComponent implements OnInit {
|
|
|
28
28
|
/** Namespace i18n. */
|
|
29
29
|
i18nNamespace: string;
|
|
30
30
|
csv: string;
|
|
31
|
-
readonly importMode: import("@angular/core").WritableSignal<"
|
|
31
|
+
readonly importMode: import("@angular/core").WritableSignal<"file" | "paste">;
|
|
32
32
|
readonly onConflictControl: FormControl<string>;
|
|
33
33
|
readonly sendActivationControl: FormControl<boolean>;
|
|
34
34
|
readonly conflictSelectProps: import("@angular/core").Signal<Partial<InputMetadata>>;
|
|
@@ -89,7 +89,7 @@ export declare class NotificationPreferencesViewComponent implements OnInit, OnD
|
|
|
89
89
|
readonly state: import("@angular/core").Signal<UiState>;
|
|
90
90
|
readonly busyLabel: import("@angular/core").Signal<string>;
|
|
91
91
|
readonly contextMessage: import("@angular/core").Signal<string>;
|
|
92
|
-
readonly alertVariant: import("@angular/core").Signal<"
|
|
92
|
+
readonly alertVariant: import("@angular/core").Signal<"danger" | "warning" | "info">;
|
|
93
93
|
readonly alertIcon: import("@angular/core").Signal<"alert-circle-outline" | "close-circle-outline">;
|
|
94
94
|
readonly toggleProps: import("@angular/core").Signal<ToggleInputMetadata>;
|
|
95
95
|
readonly retryButtonProps: import("@angular/core").Signal<Partial<ButtonMetadata>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Storage } from '@angular/fire/storage';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { StorageListResult, StorageMetadata, UploadProgress, UploadResult } from './types';
|
|
3
|
+
import { ImageUploadOptions, ImageUploadResult, StorageListResult, StorageMetadata, UploadProgress, UploadResult } from './types';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
6
|
* Servicio para Firebase Storage.
|
|
@@ -33,6 +33,7 @@ import * as i0 from "@angular/core";
|
|
|
33
33
|
export declare class StorageService {
|
|
34
34
|
private storage;
|
|
35
35
|
private config;
|
|
36
|
+
private imageService;
|
|
36
37
|
constructor(storage: Storage);
|
|
37
38
|
/**
|
|
38
39
|
* Prefija el path de storage con el appId si está configurado.
|
|
@@ -115,6 +116,15 @@ export declare class StorageService {
|
|
|
115
116
|
* ```
|
|
116
117
|
*/
|
|
117
118
|
uploadAndGetUrl(path: string, file: File | Blob, metadata?: StorageMetadata): Promise<UploadResult>;
|
|
119
|
+
/**
|
|
120
|
+
* Procesa y sube una imagen.
|
|
121
|
+
*
|
|
122
|
+
* A diferencia de `uploadAndGetUrl`, este método es específico para imágenes:
|
|
123
|
+
* comprime por defecto con `ImageService` y puede generar un thumbnail en un
|
|
124
|
+
* path separado. Para archivos que deben conservarse byte a byte, usar
|
|
125
|
+
* `uploadAndGetUrl`.
|
|
126
|
+
*/
|
|
127
|
+
uploadImageAndGetUrl(path: string, file: File | Blob, options?: ImageUploadOptions): Promise<ImageUploadResult>;
|
|
118
128
|
/**
|
|
119
129
|
* Sube un archivo desde una Data URL (base64).
|
|
120
130
|
*
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Todos los modelos de Firestore deben extender FirestoreDocument.
|
|
6
6
|
*/
|
|
7
7
|
import type { AnalyticsConfig } from './analytics-types';
|
|
8
|
+
import type { ImageCompressOptions } from '../image/types';
|
|
8
9
|
/**
|
|
9
10
|
* Configuración de Firebase (valores de firebaseConfig)
|
|
10
11
|
*/
|
|
@@ -210,6 +211,39 @@ export interface UploadResult {
|
|
|
210
211
|
/** Metadata personalizada */
|
|
211
212
|
metadata: Record<string, string>;
|
|
212
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Opciones para subir imágenes procesadas antes de guardarlas.
|
|
216
|
+
*/
|
|
217
|
+
export interface ImageUploadOptions extends StorageMetadata {
|
|
218
|
+
/**
|
|
219
|
+
* Comprimir la imagen antes de subirla.
|
|
220
|
+
* @default true
|
|
221
|
+
*/
|
|
222
|
+
compress?: boolean;
|
|
223
|
+
/** Opciones de compresión cuando compress es true. */
|
|
224
|
+
compression?: ImageCompressOptions;
|
|
225
|
+
/** Path opcional para subir un thumbnail adicional. */
|
|
226
|
+
thumbnailPath?: string;
|
|
227
|
+
/** Tamaño del thumbnail cuadrado en px. */
|
|
228
|
+
thumbnailSize?: number;
|
|
229
|
+
/** Metadata específica para el thumbnail. */
|
|
230
|
+
thumbnailMetadata?: StorageMetadata;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Resultado de una subida de imagen procesada.
|
|
234
|
+
*/
|
|
235
|
+
export interface ImageUploadResult extends UploadResult {
|
|
236
|
+
/** Resultado del thumbnail, si fue solicitado. */
|
|
237
|
+
thumbnail?: UploadResult;
|
|
238
|
+
/** Datos del procesamiento aplicado antes de subir. */
|
|
239
|
+
processed: {
|
|
240
|
+
originalSize: number;
|
|
241
|
+
size: number;
|
|
242
|
+
width: number;
|
|
243
|
+
height: number;
|
|
244
|
+
compressed: boolean;
|
|
245
|
+
};
|
|
246
|
+
}
|
|
213
247
|
/**
|
|
214
248
|
* Metadata para archivos en Storage
|
|
215
249
|
*/
|
package/lib/version.d.ts
CHANGED