valtech-components 2.0.695 → 2.0.712
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-search/select-search.component.mjs +25 -11
- package/esm2022/lib/components/organisms/form/form.component.mjs +10 -62
- package/esm2022/lib/services/firebase/firestore-collection.mjs +33 -1
- package/esm2022/lib/services/firebase/notifications.service.mjs +42 -16
- package/esm2022/lib/services/i18n/config.mjs +19 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +125 -87
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/select-search/select-search.component.d.ts +3 -1
- package/lib/components/organisms/form/form.component.d.ts +2 -4
- package/lib/services/firebase/firestore-collection.d.ts +8 -0
- package/lib/services/firebase/notifications.service.d.ts +16 -10
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,9 @@ export declare class SelectSearchComponent implements OnChanges, OnDestroy {
|
|
|
18
18
|
* @property options - The available options for the select.
|
|
19
19
|
* @property placeholder - The placeholder text.
|
|
20
20
|
*/
|
|
21
|
-
props: InputMetadata
|
|
21
|
+
props: InputMetadata & {
|
|
22
|
+
mode?: 'legacy' | 'strict';
|
|
23
|
+
};
|
|
22
24
|
icon: IconService;
|
|
23
25
|
private changeDetector;
|
|
24
26
|
private i18n;
|
|
@@ -15,7 +15,6 @@ export declare class FormComponent implements OnInit, OnChanges, DoCheck {
|
|
|
15
15
|
form: FormGroup;
|
|
16
16
|
types: typeof InputType;
|
|
17
17
|
private subscriptions;
|
|
18
|
-
private fieldPropsCache;
|
|
19
18
|
private actionsCache;
|
|
20
19
|
private previousState;
|
|
21
20
|
constructor(fb: FormBuilder, elementRef: ElementRef);
|
|
@@ -23,10 +22,9 @@ export declare class FormComponent implements OnInit, OnChanges, DoCheck {
|
|
|
23
22
|
ngOnChanges(changes: SimpleChanges): void;
|
|
24
23
|
ngDoCheck(): void;
|
|
25
24
|
/**
|
|
26
|
-
*
|
|
27
|
-
* Esto evita crear nuevos objetos en cada ciclo de change detection.
|
|
25
|
+
* Synchronizes form control disabled/enabled state with field metadata.
|
|
28
26
|
*/
|
|
29
|
-
private
|
|
27
|
+
private syncFieldControlStates;
|
|
30
28
|
/**
|
|
31
29
|
* Actualiza el cache de actions basado en el estado actual del form.
|
|
32
30
|
*/
|
|
@@ -141,6 +141,14 @@ export declare class TypedCollection<T extends FirestoreDocument> {
|
|
|
141
141
|
* Si softDelete está habilitado, marca como eliminado en lugar de borrar.
|
|
142
142
|
*/
|
|
143
143
|
delete(id: string): Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* Actualiza múltiples documentos en una sola operación atómica.
|
|
146
|
+
*/
|
|
147
|
+
batchUpdate(ids: string[], data: Partial<Omit<T, 'id' | 'createdAt'>>): Promise<void>;
|
|
148
|
+
/**
|
|
149
|
+
* Elimina múltiples documentos en una sola operación atómica.
|
|
150
|
+
*/
|
|
151
|
+
batchDelete(ids: string[]): Promise<void>;
|
|
144
152
|
/**
|
|
145
153
|
* Restaura un documento soft-deleted.
|
|
146
154
|
*/
|
|
@@ -78,21 +78,27 @@ export declare class NotificationsService {
|
|
|
78
78
|
*/
|
|
79
79
|
get userId(): string | null;
|
|
80
80
|
/**
|
|
81
|
-
* Obtiene
|
|
82
|
-
*
|
|
81
|
+
* Obtiene notificaciones ordenadas por fecha descendente (real-time).
|
|
82
|
+
* Se actualiza automáticamente cuando cambian los datos.
|
|
83
|
+
*
|
|
84
|
+
* @param limit - Máximo de notificaciones a cargar (default: 50)
|
|
83
85
|
*/
|
|
84
|
-
getAll(): Observable<NotificationDocument[]>;
|
|
86
|
+
getAll(limit?: number): Observable<NotificationDocument[]>;
|
|
85
87
|
/**
|
|
86
|
-
* Obtiene
|
|
88
|
+
* Obtiene notificaciones (one-time fetch sin listener).
|
|
87
89
|
* Útil para cargas iniciales sin necesidad de updates en tiempo real.
|
|
90
|
+
*
|
|
91
|
+
* @param limit - Máximo de notificaciones a cargar (default: 50)
|
|
88
92
|
*/
|
|
89
|
-
getAllOnce(): Promise<NotificationDocument[]>;
|
|
93
|
+
getAllOnce(limit?: number): Promise<NotificationDocument[]>;
|
|
90
94
|
/**
|
|
91
|
-
* Obtiene solo notificaciones no leídas.
|
|
95
|
+
* Obtiene solo notificaciones no leídas (real-time, filtrado server-side).
|
|
96
|
+
*
|
|
97
|
+
* @param limit - Máximo de notificaciones (default: 50)
|
|
92
98
|
*/
|
|
93
|
-
getUnread(): Observable<NotificationDocument[]>;
|
|
99
|
+
getUnread(limit?: number): Observable<NotificationDocument[]>;
|
|
94
100
|
/**
|
|
95
|
-
* Cuenta notificaciones no leídas.
|
|
101
|
+
* Cuenta notificaciones no leídas (real-time, filtrado server-side).
|
|
96
102
|
* Útil para badges en UI.
|
|
97
103
|
*/
|
|
98
104
|
getUnreadCount(): Observable<number>;
|
|
@@ -105,7 +111,7 @@ export declare class NotificationsService {
|
|
|
105
111
|
*/
|
|
106
112
|
markAsRead(notificationId: string): Promise<void>;
|
|
107
113
|
/**
|
|
108
|
-
* Marca todas las notificaciones como leídas.
|
|
114
|
+
* Marca todas las notificaciones no leídas como leídas (batch write).
|
|
109
115
|
*/
|
|
110
116
|
markAllAsRead(): Promise<void>;
|
|
111
117
|
/**
|
|
@@ -113,7 +119,7 @@ export declare class NotificationsService {
|
|
|
113
119
|
*/
|
|
114
120
|
delete(notificationId: string): Promise<void>;
|
|
115
121
|
/**
|
|
116
|
-
* Elimina todas las notificaciones del usuario.
|
|
122
|
+
* Elimina todas las notificaciones del usuario (batch delete).
|
|
117
123
|
*/
|
|
118
124
|
deleteAll(): Promise<void>;
|
|
119
125
|
/**
|
package/lib/version.d.ts
CHANGED