@litigiovirtual/ius-alertas 0.0.0-stage → 0.1.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.
@@ -0,0 +1,618 @@
1
+ import { HttpClient, HttpHeaders } from '@angular/common/http';
2
+ import * as i0 from '@angular/core';
3
+ import { InjectionToken, makeEnvironmentProviders, inject, Injectable, signal, computed, effect, untracked, input, numberAttribute, output, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { catchError, of, Subject, switchMap, EMPTY, map, finalize } from 'rxjs';
5
+ import { HubConnectionBuilder } from '@microsoft/signalr';
6
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
+ import { ToastService, DrawerComponent, DropdownComponent, EmptyStateComponent, FlexComponent, IconButtonComponent, IllustrationComponent, IusDrawerHeaderActionsDirective, IusDropdownTriggerDirective, NotificationItemComponent, SectionHeaderComponent, SkeletonComponent, StatusStateComponent } from '@litigiovirtual/ius-design-components';
8
+
9
+ /** En el orden del catálogo: es el orden del filtro. */
10
+ const MODULOS_ALERTA = {
11
+ vigilancia: { etiqueta: 'Vigilancia judicial', icono: 'gavel' },
12
+ cuenta: { etiqueta: 'Cuenta', icono: 'group' },
13
+ permisos: { etiqueta: 'Roles y permisos', icono: 'admin_panel_settings' },
14
+ suscripcion: { etiqueta: 'Suscripción', icono: 'receipt_long' },
15
+ };
16
+
17
+ const ALERTAS_CONFIG = new InjectionToken('ALERTAS_CONFIG');
18
+ /** La factory corre en contexto de inyección: puede usar `inject()` y `toSignal()`. */
19
+ function provideAlertas(factory) {
20
+ return makeEnvironmentProviders([{ provide: ALERTAS_CONFIG, useFactory: factory }]);
21
+ }
22
+
23
+ /** Falla real (red, 500): el Auth no llegó a responder con su envoltorio. */
24
+ const SERVICIO_NO_DISPONIBLE = 'ServicioNoDisponible';
25
+ class AlertasApiService {
26
+ constructor() {
27
+ this.http = inject(HttpClient);
28
+ this.config = inject(ALERTAS_CONFIG);
29
+ }
30
+ pendientes(accountID) {
31
+ return this.responder(this.http.get(this.url('Pendientes'), { params: { accountID }, headers: this.cabeceras() }));
32
+ }
33
+ marcarVista(accountID, alertaID) {
34
+ return this.responder(this.http.put(this.url('MarcarVista'), null, {
35
+ params: { accountID, alertaID },
36
+ headers: this.cabeceras(),
37
+ }));
38
+ }
39
+ marcarTodasVistas(accountID) {
40
+ return this.responder(this.http.put(this.url('MarcarTodasVistas'), null, {
41
+ params: { accountID },
42
+ headers: this.cabeceras(),
43
+ }));
44
+ }
45
+ url(accion) {
46
+ return `${this.config.urlAuth}/api/v1/Alert/${accion}`;
47
+ }
48
+ // Explícito: la cookie de sesión no viaja al dominio del Auth (azurewebsites.net).
49
+ cabeceras() {
50
+ return new HttpHeaders({ Authorization: `Bearer ${this.config.token()}` });
51
+ }
52
+ responder(peticion) {
53
+ return peticion.pipe(catchError(() => of({ isSuccess: false, code: SERVICIO_NO_DISPONIBLE })));
54
+ }
55
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AlertasApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
56
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AlertasApiService, providedIn: 'root' }); }
57
+ }
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AlertasApiService, decorators: [{
59
+ type: Injectable,
60
+ args: [{ providedIn: 'root' }]
61
+ }] });
62
+
63
+ const REINTENTO_MS = 3000;
64
+ /** El canal en vivo del Auth. Agrupa por usuario, no por cuenta: filtrar por cuenta es del estado. */
65
+ class AlertasHubService {
66
+ constructor() {
67
+ this.config = inject(ALERTAS_CONFIG);
68
+ this.debeConectar = false;
69
+ this.llegadas = new Subject();
70
+ this.salidas = new Subject();
71
+ this.conectado = new Subject();
72
+ /** `ReceiveAlert`. */
73
+ this.llegadas$ = this.llegadas.asObservable();
74
+ /** `DismissAlert`: por `alertaIDs` o por la referencia con que se notificó. */
75
+ this.salidas$ = this.salidas.asObservable();
76
+ /**
77
+ * Cada vez que el hub queda conectado (arranque o reconexión): lo que llegó antes de unirse al grupo del usuario
78
+ * se perdió, incluso entre la carga del arranque y el primer arranque.
79
+ */
80
+ this.conectado$ = this.conectado.asObservable();
81
+ }
82
+ /** Idempotente: una sola conexión aunque varios lo llamen. */
83
+ conectar() {
84
+ this.debeConectar = true;
85
+ if (this.conexion)
86
+ return;
87
+ const conexion = new HubConnectionBuilder()
88
+ // accessTokenFactory corre en cada (re)conexión: siempre viaja el token vigente.
89
+ .withUrl(`${this.config.urlAuth}/alertasUsuarioHub`, { accessTokenFactory: () => this.config.token() ?? '' })
90
+ .withAutomaticReconnect()
91
+ .build();
92
+ conexion.on('ReceiveAlert', (alerta) => this.llegadas.next(alerta));
93
+ conexion.on('DismissAlert', (salida) => this.salidas.next(salida));
94
+ conexion.onreconnected(() => this.conectado.next());
95
+ // Se cierra cuando la reconexión automática se rinde: se arma una conexión nueva.
96
+ conexion.onclose(() => this.reintentar(conexion, 0));
97
+ this.conexion = conexion;
98
+ conexion.start().then(() => {
99
+ if (this.conexion === conexion)
100
+ this.conectado.next();
101
+ }, () => this.reintentar(conexion, REINTENTO_MS));
102
+ }
103
+ desconectar() {
104
+ this.debeConectar = false;
105
+ const conexion = this.conexion;
106
+ // Se suelta antes de que stop() resuelva: un conectar() inmediato arma una conexión nueva.
107
+ this.conexion = undefined;
108
+ conexion?.stop().catch(() => undefined);
109
+ }
110
+ reintentar(caida, esperaMs) {
111
+ if (this.conexion !== caida)
112
+ return;
113
+ this.conexion = undefined;
114
+ setTimeout(() => {
115
+ if (this.debeConectar)
116
+ this.conectar();
117
+ }, esperaMs);
118
+ }
119
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AlertasHubService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
120
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AlertasHubService, providedIn: 'root' }); }
121
+ }
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AlertasHubService, decorators: [{
123
+ type: Injectable,
124
+ args: [{ providedIn: 'root' }]
125
+ }] });
126
+
127
+ // Formato es-CO determinista (sin Intl), portado de formato-fecha.ts de Litigiovirtual.WebV2: es el formato único del producto.
128
+ const MESES_CORTOS = ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'];
129
+ const ISO_FECHA = /^(\d{4})-(\d{2})-(\d{2})/;
130
+ const ISO_FECHA_HORA = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?/;
131
+ const DESFASE_COLOMBIA_MS = 5 * 60 * 60 * 1000;
132
+ const DIA_MS = 24 * 60 * 60 * 1000;
133
+ const MINUTO_MS$1 = 60 * 1000;
134
+ function dosDigitos(n) {
135
+ return n < 10 ? `0${n}` : String(n);
136
+ }
137
+ function isoDeHoy(hoy) {
138
+ return `${hoy.getUTCFullYear()}-${dosDigitos(hoy.getUTCMonth() + 1)}-${dosDigitos(hoy.getUTCDate())}`;
139
+ }
140
+ /**
141
+ * La hora de pared de Colombia (UTC−5 todo el año) en los campos UTC del `Date` devuelto: nunca se lee con getters locales,
142
+ * así ni la zona ni el cambio de hora del navegador la mueven. `etiquetaDia` y `tiempoDeAlerta` la leen igual.
143
+ */
144
+ function ahoraEnColombia(ahora = new Date()) {
145
+ return new Date(ahora.getTime() - DESFASE_COLOMBIA_MS);
146
+ }
147
+ /** «Hoy · 30 jun 2026» · «Ayer · 29 jun 2026» · «1 abr 2025»; «» si no hay fecha. */
148
+ function etiquetaDia(iso, hoy) {
149
+ const m = iso ? ISO_FECHA.exec(iso) : null;
150
+ if (!m)
151
+ return '';
152
+ const [dia, anio, mes, numero] = [m[0], Number(m[1]), Number(m[2]), Number(m[3])];
153
+ if (mes < 1 || mes > 12 || numero < 1 || numero > 31)
154
+ return '';
155
+ const fecha = `${numero} ${MESES_CORTOS[mes - 1]} ${anio}`;
156
+ const ayer = isoDeHoy(new Date(hoy.getTime() - DIA_MS));
157
+ if (dia === isoDeHoy(hoy))
158
+ return `Hoy · ${fecha}`;
159
+ return dia === ayer ? `Ayer · ${fecha}` : fecha;
160
+ }
161
+ /** «6:00 a. m.» · «12:52 p. m.» leídas tal cual del ISO; cadena vacía si no trae hora. */
162
+ function horaCorta(iso) {
163
+ const m = iso ? /T(\d{2}):(\d{2})/.exec(iso) : null;
164
+ if (!m)
165
+ return '';
166
+ const horas = Number(m[1]);
167
+ const doce = horas % 12 === 0 ? 12 : horas % 12;
168
+ return `${doce}:${m[2]} ${horas < 12 ? 'a. m.' : 'p. m.'}`;
169
+ }
170
+ /**
171
+ * Hora de una alerta en la lista: de hoy, cuánto hace («ahora» · «hace 12 min» · «hace 1 hora» · «hace 3 horas»);
172
+ * de otro día, su hora («3:32 p. m.»). `ahora` debe venir de `ahoraEnColombia()`.
173
+ */
174
+ function tiempoDeAlerta(fechaIso, ahora) {
175
+ const m = ISO_FECHA_HORA.exec(fechaIso);
176
+ if (!m || m.slice(1, 4).join('-') !== isoDeHoy(ahora))
177
+ return horaCorta(fechaIso);
178
+ const registro = Date.UTC(Number(m[1]), Number(m[2]) - 1, Number(m[3]), Number(m[4]), Number(m[5]), Number(m[6] ?? 0));
179
+ const actual = ahora.getTime();
180
+ const minutos = Math.floor((actual - registro) / MINUTO_MS$1);
181
+ if (minutos < 1)
182
+ return 'ahora';
183
+ if (minutos < 60)
184
+ return `hace ${minutos} min`;
185
+ const horas = Math.floor(minutos / 60);
186
+ return horas === 1 ? 'hace 1 hora' : `hace ${horas} horas`;
187
+ }
188
+
189
+ /** La cuenta manda: solo las de la cuenta activa y con un módulo del catálogo. */
190
+ function esDelPanel(a, accountID) {
191
+ return accountID !== undefined && a.accountID === accountID && !!a.modulo && Object.hasOwn(MODULOS_ALERTA, a.modulo);
192
+ }
193
+ /** La identidad que usan los stores de Ecosistema y Amacode: una reapertura por referencia es la misma alerta. */
194
+ function claveAlerta(a) {
195
+ return a.referenciaOrigenId ? `${a.aplicacionOrigen}|${a.referenciaOrigenId}|${a.tipoAlerta}` : `id:${a.alertaID}`;
196
+ }
197
+ /** Grupos por día, del más reciente al más antiguo, y dentro de cada uno de la alerta más reciente a la más antigua. */
198
+ function agruparAlertasPorDia(alertas, ahora) {
199
+ const grupos = new Map();
200
+ const recientesPrimero = [...alertas].sort((a, b) => b.fechaRegistro.localeCompare(a.fechaRegistro));
201
+ for (const a of recientesPrimero) {
202
+ const dia = a.fechaRegistro.slice(0, 10);
203
+ grupos.set(dia, [...(grupos.get(dia) ?? []), a]);
204
+ }
205
+ return [...grupos].map(([dia, delDia]) => ({ dia, etiqueta: etiquetaDia(dia, ahora), alertas: delDia }));
206
+ }
207
+ /** Los módulos que tienen alguna alerta, en el orden del catálogo. */
208
+ function modulosConPendientes(alertas) {
209
+ return Object.keys(MODULOS_ALERTA).filter(modulo => alertas.some(a => a.modulo === modulo));
210
+ }
211
+ /** Las que se deciden en el sitio no se marcan como vistas. */
212
+ function hayMarcables(alertas) {
213
+ return alertas.some(a => !a.seDecideEnSitio);
214
+ }
215
+ function coincideConSalida(a, salida) {
216
+ if (salida.alertaIDs?.includes(a.alertaID))
217
+ return true;
218
+ if (!salida.aplicacionOrigen || !salida.referenciaOrigenId)
219
+ return false;
220
+ return (a.aplicacionOrigen === salida.aplicacionOrigen &&
221
+ a.referenciaOrigenId === salida.referenciaOrigenId &&
222
+ (!salida.tipoAlerta || a.tipoAlerta === salida.tipoAlerta));
223
+ }
224
+
225
+ const ERROR_GENERICO = 'El servicio no respondió. Vuelve a intentarlo.';
226
+ const ALERTA_NO_ENCONTRADA = 'ALERTA_NO_ENCONTRADA';
227
+ const MINUTO_MS = 60_000;
228
+ /** El panel de alertas de la cuenta activa: lo que pinta la campana y el drawer, en vivo. */
229
+ class AlertasState {
230
+ constructor() {
231
+ this.config = inject(ALERTAS_CONFIG);
232
+ this.api = inject(AlertasApiService);
233
+ this.hub = inject(AlertasHubService);
234
+ this.toast = inject(ToastService);
235
+ this.iniciado = signal(false, /* @ts-ignore */
236
+ ...(ngDevMode ? [{ debugName: "iniciado" }] : /* istanbul ignore next */ []));
237
+ this.lista = signal([], /* @ts-ignore */
238
+ ...(ngDevMode ? [{ debugName: "lista" }] : /* istanbul ignore next */ []));
239
+ this._abierto = signal(false, /* @ts-ignore */
240
+ ...(ngDevMode ? [{ debugName: "_abierto" }] : /* istanbul ignore next */ []));
241
+ this._estado = signal('cargando', /* @ts-ignore */
242
+ ...(ngDevMode ? [{ debugName: "_estado" }] : /* istanbul ignore next */ []));
243
+ this._filtro = signal(null, /* @ts-ignore */
244
+ ...(ngDevMode ? [{ debugName: "_filtro" }] : /* istanbul ignore next */ []));
245
+ this._saliendo = signal(new Set(), /* @ts-ignore */
246
+ ...(ngDevMode ? [{ debugName: "_saliendo" }] : /* istanbul ignore next */ []));
247
+ this._ahora = signal(ahoraEnColombia(), /* @ts-ignore */
248
+ ...(ngDevMode ? [{ debugName: "_ahora" }] : /* istanbul ignore next */ []));
249
+ this.cargas = new Subject();
250
+ /** Lo que cambió mientras viaja una carga: se reaplica sobre su respuesta, que puede ser anterior. */
251
+ this.enVuelo = null;
252
+ /** Con el PUT de «vista» pendiente, una recarga puede leer la base antes del commit: no vuelven a entrar. */
253
+ this.marcando = new Set();
254
+ this.abierto = this._abierto.asReadonly();
255
+ this.estado = this._estado.asReadonly();
256
+ this.filtro = this._filtro.asReadonly();
257
+ /** Las que están haciendo su transición de salida: siguen en `grupos` hasta `quitar(id)`. */
258
+ this.saliendo = this._saliendo.asReadonly();
259
+ /** Hora de pared de Colombia (ver `ahoraEnColombia`); se refresca cada minuto con el panel abierto. */
260
+ this.ahora = this._ahora.asReadonly();
261
+ this.vigentes = computed(() => this.lista().filter(a => !this._saliendo().has(a.alertaID)), /* @ts-ignore */
262
+ ...(ngDevMode ? [{ debugName: "vigentes" }] : /* istanbul ignore next */ []));
263
+ /** El número de la campana. */
264
+ this.pendientes = computed(() => this.vigentes().length, /* @ts-ignore */
265
+ ...(ngDevMode ? [{ debugName: "pendientes" }] : /* istanbul ignore next */ []));
266
+ this.grupos = computed(() => {
267
+ const filtro = this._filtro();
268
+ const visibles = filtro ? this.lista().filter(a => a.modulo === filtro) : this.lista();
269
+ return agruparAlertasPorDia(visibles, this._ahora());
270
+ }, /* @ts-ignore */
271
+ ...(ngDevMode ? [{ debugName: "grupos" }] : /* istanbul ignore next */ []));
272
+ this.modulos = computed(() => modulosConPendientes(this.vigentes()), /* @ts-ignore */
273
+ ...(ngDevMode ? [{ debugName: "modulos" }] : /* istanbul ignore next */ []));
274
+ this.hayMarcables = computed(() => hayMarcables(this.vigentes()), /* @ts-ignore */
275
+ ...(ngDevMode ? [{ debugName: "hayMarcables" }] : /* istanbul ignore next */ []));
276
+ this.cargas
277
+ .pipe(switchMap(cuenta => (cuenta === undefined ? EMPTY : this.api.pendientes(cuenta).pipe(map(r => ({ cuenta, r }))))), takeUntilDestroyed())
278
+ .subscribe(({ cuenta, r }) => this.alCargar(cuenta, r));
279
+ this.hub.llegadas$.pipe(takeUntilDestroyed()).subscribe(alerta => this.alLlegar(alerta));
280
+ this.hub.salidas$.pipe(takeUntilDestroyed()).subscribe(salida => this.sacar(a => coincideConSalida(a, salida)));
281
+ this.hub.conectado$.pipe(takeUntilDestroyed()).subscribe(() => this.recargar());
282
+ this.config.sesionCerrada$.pipe(takeUntilDestroyed()).subscribe(() => this.alCerrarSesion());
283
+ effect(() => {
284
+ this.config.cuentaActiva();
285
+ const iniciado = this.iniciado();
286
+ untracked(() => {
287
+ this.reset();
288
+ if (iniciado)
289
+ this.recargar();
290
+ });
291
+ });
292
+ effect(onCleanup => {
293
+ if (!this._abierto())
294
+ return;
295
+ this._ahora.set(ahoraEnColombia());
296
+ const reloj = setInterval(() => this._ahora.set(ahoraEnColombia()), MINUTO_MS);
297
+ onCleanup(() => clearInterval(reloj));
298
+ });
299
+ }
300
+ /** Carga lo pendiente y arranca el hub. Idempotente. */
301
+ iniciar() {
302
+ if (this.iniciado())
303
+ return;
304
+ this.iniciado.set(true);
305
+ this.hub.conectar();
306
+ }
307
+ /** Abrir no marca nada: solo vuelve a cargar. */
308
+ alternar() {
309
+ if (this._abierto()) {
310
+ this.cerrar();
311
+ return;
312
+ }
313
+ this._abierto.set(true);
314
+ this.recargar();
315
+ }
316
+ cerrar() {
317
+ this._abierto.set(false);
318
+ this.quitarOcultas();
319
+ }
320
+ reintentar() {
321
+ this.recargar();
322
+ }
323
+ filtrar(modulo) {
324
+ this._filtro.set(modulo);
325
+ this.quitarOcultas();
326
+ }
327
+ /** Salida optimista: si el Auth falla, vuelve a su lugar y se avisa. */
328
+ marcarVista(alertaID) {
329
+ const cuenta = this.config.cuentaActiva();
330
+ const alerta = this.vigentes().find(a => a.alertaID === alertaID);
331
+ if (cuenta === undefined || !alerta)
332
+ return;
333
+ this.sacar(a => a.alertaID === alertaID);
334
+ this.mientrasSeMarca([alertaID], this.api.marcarVista(cuenta, alertaID)).subscribe(r => {
335
+ // Ya no estaba pendiente (la marcó otra web): que se quede fuera.
336
+ if (!r.isSuccess && r.code !== ALERTA_NO_ENCONTRADA)
337
+ this.devolver(cuenta, [alerta], r);
338
+ });
339
+ }
340
+ /** Todas menos las que se deciden en el sitio, sin importar el filtro. */
341
+ marcarTodasVistas() {
342
+ const cuenta = this.config.cuentaActiva();
343
+ const marcables = this.vigentes().filter(a => !a.seDecideEnSitio);
344
+ if (cuenta === undefined || !marcables.length)
345
+ return;
346
+ const ids = new Set(marcables.map(a => a.alertaID));
347
+ this.sacar(a => ids.has(a.alertaID));
348
+ this.mientrasSeMarca([...ids], this.api.marcarTodasVistas(cuenta)).subscribe(r => {
349
+ if (!r.isSuccess)
350
+ this.devolver(cuenta, marcables, r);
351
+ });
352
+ }
353
+ /** Fin de la transición de salida. */
354
+ quitar(alertaID) {
355
+ this.soltar([alertaID]);
356
+ this.aplicar(lista => lista.filter(a => a.alertaID !== alertaID));
357
+ }
358
+ /** Vuelve al arranque sin nada de la cuenta anterior y descarta la carga en vuelo. */
359
+ reset() {
360
+ this.cargas.next(undefined);
361
+ this.enVuelo = null;
362
+ this.lista.set([]);
363
+ this._saliendo.set(new Set());
364
+ this._filtro.set(null);
365
+ this._estado.set('cargando');
366
+ }
367
+ recargar() {
368
+ const cuenta = this.config.cuentaActiva();
369
+ if (cuenta === undefined)
370
+ return;
371
+ this._estado.set('cargando');
372
+ this.enVuelo = [];
373
+ this.cargas.next(cuenta);
374
+ }
375
+ alCargar(cuenta, respuesta) {
376
+ if (cuenta !== this.config.cuentaActiva())
377
+ return;
378
+ const cambios = this.enVuelo ?? [];
379
+ this.enVuelo = null;
380
+ if (!respuesta.isSuccess) {
381
+ this._estado.set('error');
382
+ return;
383
+ }
384
+ const delPanel = (respuesta.object ?? []).filter(a => esDelPanel(a, cuenta) && !this.marcando.has(a.alertaID));
385
+ this.lista.set(cambios.reduce((lista, cambio) => cambio(lista), delPanel));
386
+ this._estado.set('listo');
387
+ }
388
+ alLlegar(alerta) {
389
+ if (!esDelPanel(alerta, this.config.cuentaActiva())) {
390
+ // El upsert por referencia puede mover la misma fila (mismo id) a otra cuenta: la copia de esta cuenta sobra.
391
+ this.sacar(a => a.alertaID === alerta.alertaID);
392
+ return;
393
+ }
394
+ this.soltar([alerta.alertaID]);
395
+ this.aplicar(lista => [alerta, ...lista.filter(a => a.alertaID !== alerta.alertaID)]);
396
+ if (!this._abierto()) {
397
+ const modulo = MODULOS_ALERTA[alerta.modulo].etiqueta;
398
+ this.toast.info(`${modulo} · ${alerta.titulo}`, { message: alerta.descripcion });
399
+ }
400
+ }
401
+ alCerrarSesion() {
402
+ this.iniciado.set(false);
403
+ this._abierto.set(false);
404
+ this.reset();
405
+ this.hub.desconectar();
406
+ }
407
+ /** Las que se ven salen con su transición; las ocultas (panel cerrado u otro filtro) se quitan de una. */
408
+ sacar(sale) {
409
+ const seVen = this.lista()
410
+ .filter(a => sale(a) && this.seVe(a))
411
+ .map(a => a.alertaID);
412
+ if (seVen.length)
413
+ this._saliendo.update(ids => new Set([...ids, ...seVen]));
414
+ this.aplicar(lista => lista.filter(a => !sale(a) || this._saliendo().has(a.alertaID)));
415
+ }
416
+ /** La lista se ordena por fecha al agrupar: volver es reinsertar. */
417
+ devolver(cuenta, alertas, respuesta) {
418
+ if (cuenta !== this.config.cuentaActiva())
419
+ return;
420
+ this.soltar(alertas.map(a => a.alertaID));
421
+ this.aplicar(lista => [...lista, ...alertas.filter(a => !lista.some(b => b.alertaID === a.alertaID))]);
422
+ const fallaReal = !respuesta.code || respuesta.code === SERVICIO_NO_DISPONIBLE;
423
+ this.toast.error(fallaReal ? ERROR_GENERICO : respuesta.message || ERROR_GENERICO);
424
+ }
425
+ mientrasSeMarca(ids, peticion) {
426
+ ids.forEach(id => this.marcando.add(id));
427
+ return peticion.pipe(finalize(() => ids.forEach(id => this.marcando.delete(id))));
428
+ }
429
+ aplicar(cambio) {
430
+ this.lista.update(cambio);
431
+ this.enVuelo?.push(cambio);
432
+ }
433
+ soltar(ids) {
434
+ if (!ids.some(id => this._saliendo().has(id)))
435
+ return;
436
+ this._saliendo.update(actuales => new Set([...actuales].filter(id => !ids.includes(id))));
437
+ }
438
+ seVe(alerta) {
439
+ const filtro = this._filtro();
440
+ return this._abierto() && (!filtro || alerta.modulo === filtro);
441
+ }
442
+ /** Una salida que ya no se ve nunca termina su transición. */
443
+ quitarOcultas() {
444
+ this.lista()
445
+ .filter(a => this._saliendo().has(a.alertaID) && !this.seVe(a))
446
+ .forEach(a => this.quitar(a.alertaID));
447
+ }
448
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AlertasState, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
449
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AlertasState, providedIn: 'root' }); }
450
+ }
451
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AlertasState, decorators: [{
452
+ type: Injectable,
453
+ args: [{ providedIn: 'root' }]
454
+ }], ctorParameters: () => [] });
455
+
456
+ /** Valor de «Todos los módulos» en el filtro. */
457
+ const TODOS = 'todas';
458
+ /** El panel de alertas (inventario F6·HU-1 §2–§6): solo pinta lo que recibe y avisa lo que pide el usuario. */
459
+ class AlertasPanelComponent {
460
+ constructor() {
461
+ /** Alto del encabezado de la web: el panel arranca debajo. */
462
+ this.offsetTop = input(0, { ...(ngDevMode ? { debugName: "offsetTop" } : /* istanbul ignore next */ {}), transform: numberAttribute });
463
+ this.abierto = input(false, /* @ts-ignore */
464
+ ...(ngDevMode ? [{ debugName: "abierto" }] : /* istanbul ignore next */ []));
465
+ this.estado = input('cargando', /* @ts-ignore */
466
+ ...(ngDevMode ? [{ debugName: "estado" }] : /* istanbul ignore next */ []));
467
+ /** Ya filtrados; incluyen las que están saliendo. */
468
+ this.grupos = input([], /* @ts-ignore */
469
+ ...(ngDevMode ? [{ debugName: "grupos" }] : /* istanbul ignore next */ []));
470
+ /** Los módulos con pendientes, sin importar el filtro. */
471
+ this.modulos = input([], /* @ts-ignore */
472
+ ...(ngDevMode ? [{ debugName: "modulos" }] : /* istanbul ignore next */ []));
473
+ this.filtro = input(null, /* @ts-ignore */
474
+ ...(ngDevMode ? [{ debugName: "filtro" }] : /* istanbul ignore next */ []));
475
+ this.hayMarcables = input(false, /* @ts-ignore */
476
+ ...(ngDevMode ? [{ debugName: "hayMarcables" }] : /* istanbul ignore next */ []));
477
+ this.saliendo = input(new Set(), /* @ts-ignore */
478
+ ...(ngDevMode ? [{ debugName: "saliendo" }] : /* istanbul ignore next */ []));
479
+ /** Hora de pared de Colombia (`ahoraEnColombia`): de ella salen «hace N» y la hora. */
480
+ this.ahora = input.required(/* @ts-ignore */
481
+ ...(ngDevMode ? [{ debugName: "ahora" }] : /* istanbul ignore next */ []));
482
+ this.cerrar = output();
483
+ this.reintentar = output();
484
+ this.filtrar = output();
485
+ /** «Marcar como vista», al terminar la transición. Llega antes que `quitada`. */
486
+ this.marcarVista = output();
487
+ this.marcarTodas = output();
488
+ /** Terminó la transición de salida: ya se puede sacar de la lista. */
489
+ this.quitada = output();
490
+ /** «Ver detalle» o la tarjeta de una alerta de acción (HU-2). */
491
+ this.abrirAlerta = output();
492
+ /** Con un filtro, la lista puede quedar vacía aunque haya pendientes de otros módulos. */
493
+ this.hayPendientes = computed(() => this.grupos().length > 0 || this.modulos().length > 0, /* @ts-ignore */
494
+ ...(ngDevMode ? [{ debugName: "hayPendientes" }] : /* istanbul ignore next */ []));
495
+ this.cuerpo = computed(() => {
496
+ const estado = this.estado();
497
+ if (estado !== 'listo')
498
+ return estado;
499
+ if (!this.hayPendientes())
500
+ return 'al-dia';
501
+ return this.grupos().length ? 'lista' : 'sin-resultados';
502
+ }, /* @ts-ignore */
503
+ ...(ngDevMode ? [{ debugName: "cuerpo" }] : /* istanbul ignore next */ []));
504
+ this.conAcciones = computed(() => this.estado() === 'listo' && this.hayPendientes(), /* @ts-ignore */
505
+ ...(ngDevMode ? [{ debugName: "conAcciones" }] : /* istanbul ignore next */ []));
506
+ this.valorFiltro = computed(() => this.filtro() ?? TODOS, /* @ts-ignore */
507
+ ...(ngDevMode ? [{ debugName: "valorFiltro" }] : /* istanbul ignore next */ []));
508
+ this.tooltipFiltro = computed(() => {
509
+ const filtro = this.filtro();
510
+ return filtro ? `Filtrado: ${MODULOS_ALERTA[filtro].etiqueta}` : 'Filtrar';
511
+ }, /* @ts-ignore */
512
+ ...(ngDevMode ? [{ debugName: "tooltipFiltro" }] : /* istanbul ignore next */ []));
513
+ this.opciones = computed(() => [
514
+ { value: TODOS, label: 'Todos los módulos' },
515
+ ...this.modulos().map(m => ({ value: m, icon: MODULOS_ALERTA[m].icono, label: MODULOS_ALERTA[m].etiqueta })),
516
+ ], /* @ts-ignore */
517
+ ...(ngDevMode ? [{ debugName: "opciones" }] : /* istanbul ignore next */ []));
518
+ this.secciones = computed(() => {
519
+ const ahora = this.ahora();
520
+ return this.grupos().map(grupo => ({
521
+ ...grupo,
522
+ filas: grupo.alertas.map(alerta => ({
523
+ alerta,
524
+ modulo: MODULOS_ALERTA[alerta.modulo],
525
+ tiempo: tiempoDeAlerta(alerta.fechaRegistro, ahora),
526
+ deAccion: alerta.clase !== 'info',
527
+ })),
528
+ }));
529
+ }, /* @ts-ignore */
530
+ ...(ngDevMode ? [{ debugName: "secciones" }] : /* istanbul ignore next */ []));
531
+ }
532
+ alFiltrar(valor) {
533
+ this.filtrar.emit(valor === TODOS || valor === undefined ? null : valor);
534
+ }
535
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AlertasPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
536
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AlertasPanelComponent, isStandalone: true, selector: "ius-alertas-panel", inputs: { offsetTop: { classPropertyName: "offsetTop", publicName: "offsetTop", isSignal: true, isRequired: false, transformFunction: null }, abierto: { classPropertyName: "abierto", publicName: "abierto", isSignal: true, isRequired: false, transformFunction: null }, estado: { classPropertyName: "estado", publicName: "estado", isSignal: true, isRequired: false, transformFunction: null }, grupos: { classPropertyName: "grupos", publicName: "grupos", isSignal: true, isRequired: false, transformFunction: null }, modulos: { classPropertyName: "modulos", publicName: "modulos", isSignal: true, isRequired: false, transformFunction: null }, filtro: { classPropertyName: "filtro", publicName: "filtro", isSignal: true, isRequired: false, transformFunction: null }, hayMarcables: { classPropertyName: "hayMarcables", publicName: "hayMarcables", isSignal: true, isRequired: false, transformFunction: null }, saliendo: { classPropertyName: "saliendo", publicName: "saliendo", isSignal: true, isRequired: false, transformFunction: null }, ahora: { classPropertyName: "ahora", publicName: "ahora", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { cerrar: "cerrar", reintentar: "reintentar", filtrar: "filtrar", marcarVista: "marcarVista", marcarTodas: "marcarTodas", quitada: "quitada", abrirAlerta: "abrirAlerta" }, ngImport: i0, template: "<ius-drawer\n side=\"right\"\n size=\"sm\"\n title=\"Alertas\"\n showClose\n [showScrim]=\"false\"\n [closeOnScrim]=\"false\"\n [offsetTop]=\"offsetTop()\"\n [open]=\"abierto()\"\n (closed)=\"cerrar.emit()\"\n>\n @if (conAcciones()) {\n <div iusDrawerHeaderActions ius-flex gap=\"xxs\" align=\"center\">\n @if (modulos().length > 1) {\n <ius-dropdown\n selectable\n placement=\"bottom-end\"\n label=\"Filtrar por m\u00F3dulo\"\n ariaLabel=\"Filtrar por m\u00F3dulo\"\n [items]=\"opciones()\"\n [value]=\"valorFiltro()\"\n (valueChange)=\"alFiltrar($event.value)\"\n >\n <ius-icon-button\n iusDropdownTrigger\n icon=\"filter_list\"\n shape=\"circle\"\n size=\"small\"\n ariaLabel=\"Filtrar\"\n [variant]=\"filtro() ? 'secondary' : 'tertiary'\"\n [tooltip]=\"tooltipFiltro()\"\n />\n </ius-dropdown>\n }\n <ius-icon-button\n icon=\"done_all\"\n variant=\"tertiary\"\n shape=\"circle\"\n size=\"small\"\n tooltip=\"Marcar todas como vistas\"\n ariaLabel=\"Marcar todas como vistas\"\n [disabled]=\"!hayMarcables()\"\n (clicked)=\"marcarTodas.emit()\"\n />\n </div>\n }\n\n @switch (cuerpo()) {\n @case ('cargando') {\n <div ius-flex direction=\"column\" gap=\"sm\">\n @for (pieza of [0, 1, 2, 3]; track pieza) {\n <ius-skeleton variant=\"rect\" height=\"56px\" />\n }\n </div>\n }\n @case ('error') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-status-state\n status=\"error\"\n size=\"compact\"\n title=\"No se cargaron las alertas\"\n [illustrationTemplate]=\"ilustracionError\"\n [primaryAction]=\"{ label: 'Reintentar', icon: 'refresh' }\"\n (primaryClick)=\"reintentar.emit()\"\n />\n </div>\n }\n @case ('al-dia') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-empty-state\n size=\"compact\"\n variant=\"no-data\"\n illustration=\"empty-inbox\"\n title=\"Est\u00E1s al d\u00EDa\"\n description=\"Cuando pase algo en tus procesos, tus tareas o tu cuenta, te avisamos aqu\u00ED.\"\n />\n </div>\n }\n @case ('sin-resultados') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-empty-state\n size=\"compact\"\n variant=\"no-results\"\n title=\"No hay alertas de este m\u00F3dulo\"\n primaryAction=\"Ver todas\"\n [illustration]=\"true\"\n (primaryClick)=\"filtrar.emit(null)\"\n />\n </div>\n }\n @default {\n <div ius-flex direction=\"column\" gap=\"md\">\n @for (seccion of secciones(); track seccion.dia) {\n <div ius-flex direction=\"column\" gap=\"xs\">\n <ius-section-header variant=\"group\" [count]=\"seccion.alertas.length\">{{ seccion.etiqueta }}</ius-section-header>\n <div>\n @for (fila of seccion.filas; track fila.alerta.alertaID) {\n <ius-notification-item\n [kind]=\"fila.deAccion ? 'action' : 'info'\"\n [icon]=\"fila.modulo.icono\"\n [module]=\"fila.modulo.etiqueta\"\n [title]=\"fila.alerta.titulo\"\n [message]=\"fila.alerta.descripcion\"\n [time]=\"fila.tiempo\"\n [dismissible]=\"!fila.alerta.seDecideEnSitio\"\n [leaving]=\"saliendo().has(fila.alerta.alertaID)\"\n (opened)=\"abrirAlerta.emit(fila.alerta)\"\n (dismissed)=\"marcarVista.emit(fila.alerta.alertaID)\"\n (exited)=\"quitada.emit(fila.alerta.alertaID)\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n }\n</ius-drawer>\n\n<ng-template #ilustracionError>\n <ius-illustration name=\"screenError\" size=\"small\" />\n</ng-template>\n", styles: [".ius-alertas-panel__centro{min-height:100%}\n"], dependencies: [{ kind: "component", type: DrawerComponent, selector: "ius-drawer", inputs: ["open", "defaultOpen", "side", "size", "title", "centerTitle", "showBack", "showClose", "closeOnScrim", "closeOnEsc", "showScrim", "offsetTop", "ariaLabel"], outputs: ["closed", "openChange", "back"] }, { kind: "component", type: DropdownComponent, selector: "ius-dropdown", inputs: ["items", "selectable", "value", "label", "triggerLabel", "triggerIcon", "tone", "variant", "placement", "open", "defaultOpen", "ariaLabel"], outputs: ["valueChange", "openChange"] }, { kind: "component", type: EmptyStateComponent, selector: "ius-empty-state", inputs: ["variant", "size", "tone", "icon", "illustration", "illustrationTemplate", "title", "description", "primaryAction", "secondaryAction", "actionsTemplate", "role"], outputs: ["primaryClick", "secondaryClick"] }, { kind: "component", type: FlexComponent, selector: "ius-flex, [ius-flex]", inputs: ["direction", "gap", "align", "justify", "wrap", "inline"] }, { kind: "component", type: IconButtonComponent, selector: "ius-icon-button", inputs: ["icon", "variant", "size", "shape", "disabled", "type", "ariaLabel", "tooltip", "ariaPressed", "ariaExpanded", "ariaControls", "ariaHaspopup", "tooltipPlacement"], outputs: ["clicked"] }, { kind: "component", type: IllustrationComponent, selector: "ius-illustration", inputs: ["name", "size", "title"] }, { kind: "directive", type: IusDrawerHeaderActionsDirective, selector: "[iusDrawerHeaderActions]" }, { kind: "directive", type: IusDropdownTriggerDirective, selector: "[iusDropdownTrigger]" }, { kind: "component", type: NotificationItemComponent, selector: "ius-notification-item", inputs: ["kind", "icon", "module", "title", "message", "time", "unread", "dismissible", "openLabel", "dismissLabel", "actions", "leaving"], outputs: ["opened", "dismissed", "actionClick", "exited"] }, { kind: "component", type: SectionHeaderComponent, selector: "ius-section-header", inputs: ["icon", "count", "variant", "accent", "collapsible", "collapsed", "sticky", "ariaLabel"], outputs: ["toggle"] }, { kind: "component", type: SkeletonComponent, selector: "ius-skeleton", inputs: ["variant", "width", "height", "radius", "lines", "lastLineWidth", "bars", "gap", "animation", "loading", "ariaLabel"] }, { kind: "component", type: StatusStateComponent, selector: "ius-status-state", inputs: ["status", "code", "showCode", "title", "description", "illustrationTemplate", "icon", "tone", "size", "primaryAction", "secondaryAction", "role"], outputs: ["primaryClick", "secondaryClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
537
+ }
538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AlertasPanelComponent, decorators: [{
539
+ type: Component,
540
+ args: [{ selector: 'ius-alertas-panel', standalone: true, imports: [
541
+ DrawerComponent,
542
+ DropdownComponent,
543
+ EmptyStateComponent,
544
+ FlexComponent,
545
+ IconButtonComponent,
546
+ IllustrationComponent,
547
+ IusDrawerHeaderActionsDirective,
548
+ IusDropdownTriggerDirective,
549
+ NotificationItemComponent,
550
+ SectionHeaderComponent,
551
+ SkeletonComponent,
552
+ StatusStateComponent,
553
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ius-drawer\n side=\"right\"\n size=\"sm\"\n title=\"Alertas\"\n showClose\n [showScrim]=\"false\"\n [closeOnScrim]=\"false\"\n [offsetTop]=\"offsetTop()\"\n [open]=\"abierto()\"\n (closed)=\"cerrar.emit()\"\n>\n @if (conAcciones()) {\n <div iusDrawerHeaderActions ius-flex gap=\"xxs\" align=\"center\">\n @if (modulos().length > 1) {\n <ius-dropdown\n selectable\n placement=\"bottom-end\"\n label=\"Filtrar por m\u00F3dulo\"\n ariaLabel=\"Filtrar por m\u00F3dulo\"\n [items]=\"opciones()\"\n [value]=\"valorFiltro()\"\n (valueChange)=\"alFiltrar($event.value)\"\n >\n <ius-icon-button\n iusDropdownTrigger\n icon=\"filter_list\"\n shape=\"circle\"\n size=\"small\"\n ariaLabel=\"Filtrar\"\n [variant]=\"filtro() ? 'secondary' : 'tertiary'\"\n [tooltip]=\"tooltipFiltro()\"\n />\n </ius-dropdown>\n }\n <ius-icon-button\n icon=\"done_all\"\n variant=\"tertiary\"\n shape=\"circle\"\n size=\"small\"\n tooltip=\"Marcar todas como vistas\"\n ariaLabel=\"Marcar todas como vistas\"\n [disabled]=\"!hayMarcables()\"\n (clicked)=\"marcarTodas.emit()\"\n />\n </div>\n }\n\n @switch (cuerpo()) {\n @case ('cargando') {\n <div ius-flex direction=\"column\" gap=\"sm\">\n @for (pieza of [0, 1, 2, 3]; track pieza) {\n <ius-skeleton variant=\"rect\" height=\"56px\" />\n }\n </div>\n }\n @case ('error') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-status-state\n status=\"error\"\n size=\"compact\"\n title=\"No se cargaron las alertas\"\n [illustrationTemplate]=\"ilustracionError\"\n [primaryAction]=\"{ label: 'Reintentar', icon: 'refresh' }\"\n (primaryClick)=\"reintentar.emit()\"\n />\n </div>\n }\n @case ('al-dia') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-empty-state\n size=\"compact\"\n variant=\"no-data\"\n illustration=\"empty-inbox\"\n title=\"Est\u00E1s al d\u00EDa\"\n description=\"Cuando pase algo en tus procesos, tus tareas o tu cuenta, te avisamos aqu\u00ED.\"\n />\n </div>\n }\n @case ('sin-resultados') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-empty-state\n size=\"compact\"\n variant=\"no-results\"\n title=\"No hay alertas de este m\u00F3dulo\"\n primaryAction=\"Ver todas\"\n [illustration]=\"true\"\n (primaryClick)=\"filtrar.emit(null)\"\n />\n </div>\n }\n @default {\n <div ius-flex direction=\"column\" gap=\"md\">\n @for (seccion of secciones(); track seccion.dia) {\n <div ius-flex direction=\"column\" gap=\"xs\">\n <ius-section-header variant=\"group\" [count]=\"seccion.alertas.length\">{{ seccion.etiqueta }}</ius-section-header>\n <div>\n @for (fila of seccion.filas; track fila.alerta.alertaID) {\n <ius-notification-item\n [kind]=\"fila.deAccion ? 'action' : 'info'\"\n [icon]=\"fila.modulo.icono\"\n [module]=\"fila.modulo.etiqueta\"\n [title]=\"fila.alerta.titulo\"\n [message]=\"fila.alerta.descripcion\"\n [time]=\"fila.tiempo\"\n [dismissible]=\"!fila.alerta.seDecideEnSitio\"\n [leaving]=\"saliendo().has(fila.alerta.alertaID)\"\n (opened)=\"abrirAlerta.emit(fila.alerta)\"\n (dismissed)=\"marcarVista.emit(fila.alerta.alertaID)\"\n (exited)=\"quitada.emit(fila.alerta.alertaID)\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n }\n</ius-drawer>\n\n<ng-template #ilustracionError>\n <ius-illustration name=\"screenError\" size=\"small\" />\n</ng-template>\n", styles: [".ius-alertas-panel__centro{min-height:100%}\n"] }]
554
+ }], propDecorators: { offsetTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "offsetTop", required: false }] }], abierto: [{ type: i0.Input, args: [{ isSignal: true, alias: "abierto", required: false }] }], estado: [{ type: i0.Input, args: [{ isSignal: true, alias: "estado", required: false }] }], grupos: [{ type: i0.Input, args: [{ isSignal: true, alias: "grupos", required: false }] }], modulos: [{ type: i0.Input, args: [{ isSignal: true, alias: "modulos", required: false }] }], filtro: [{ type: i0.Input, args: [{ isSignal: true, alias: "filtro", required: false }] }], hayMarcables: [{ type: i0.Input, args: [{ isSignal: true, alias: "hayMarcables", required: false }] }], saliendo: [{ type: i0.Input, args: [{ isSignal: true, alias: "saliendo", required: false }] }], ahora: [{ type: i0.Input, args: [{ isSignal: true, alias: "ahora", required: true }] }], cerrar: [{ type: i0.Output, args: ["cerrar"] }], reintentar: [{ type: i0.Output, args: ["reintentar"] }], filtrar: [{ type: i0.Output, args: ["filtrar"] }], marcarVista: [{ type: i0.Output, args: ["marcarVista"] }], marcarTodas: [{ type: i0.Output, args: ["marcarTodas"] }], quitada: [{ type: i0.Output, args: ["quitada"] }], abrirAlerta: [{ type: i0.Output, args: ["abrirAlerta"] }] } });
555
+
556
+ /** El panel conectado a `AlertasState`: cada web monta solo esta etiqueta. */
557
+ class IusAlertasComponent {
558
+ constructor() {
559
+ this.alertas = inject(AlertasState);
560
+ /** Alto del encabezado de la web. */
561
+ this.offsetTop = input(0, { ...(ngDevMode ? { debugName: "offsetTop" } : /* istanbul ignore next */ {}), transform: numberAttribute });
562
+ /** Abrir la alerta en su módulo es de cada web (HU-2). */
563
+ this.abrirAlerta = output();
564
+ }
565
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: IusAlertasComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
566
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: IusAlertasComponent, isStandalone: true, selector: "ius-alertas", inputs: { offsetTop: { classPropertyName: "offsetTop", publicName: "offsetTop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { abrirAlerta: "abrirAlerta" }, ngImport: i0, template: `<ius-alertas-panel
567
+ [offsetTop]="offsetTop()"
568
+ [abierto]="alertas.abierto()"
569
+ [estado]="alertas.estado()"
570
+ [grupos]="alertas.grupos()"
571
+ [modulos]="alertas.modulos()"
572
+ [filtro]="alertas.filtro()"
573
+ [hayMarcables]="alertas.hayMarcables()"
574
+ [saliendo]="alertas.saliendo()"
575
+ [ahora]="alertas.ahora()"
576
+ (cerrar)="alertas.cerrar()"
577
+ (reintentar)="alertas.reintentar()"
578
+ (filtrar)="alertas.filtrar($event)"
579
+ (marcarVista)="alertas.marcarVista($event)"
580
+ (marcarTodas)="alertas.marcarTodasVistas()"
581
+ (quitada)="alertas.quitar($event)"
582
+ (abrirAlerta)="abrirAlerta.emit($event)"
583
+ />`, isInline: true, dependencies: [{ kind: "component", type: AlertasPanelComponent, selector: "ius-alertas-panel", inputs: ["offsetTop", "abierto", "estado", "grupos", "modulos", "filtro", "hayMarcables", "saliendo", "ahora"], outputs: ["cerrar", "reintentar", "filtrar", "marcarVista", "marcarTodas", "quitada", "abrirAlerta"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
584
+ }
585
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: IusAlertasComponent, decorators: [{
586
+ type: Component,
587
+ args: [{
588
+ selector: 'ius-alertas',
589
+ standalone: true,
590
+ imports: [AlertasPanelComponent],
591
+ template: `<ius-alertas-panel
592
+ [offsetTop]="offsetTop()"
593
+ [abierto]="alertas.abierto()"
594
+ [estado]="alertas.estado()"
595
+ [grupos]="alertas.grupos()"
596
+ [modulos]="alertas.modulos()"
597
+ [filtro]="alertas.filtro()"
598
+ [hayMarcables]="alertas.hayMarcables()"
599
+ [saliendo]="alertas.saliendo()"
600
+ [ahora]="alertas.ahora()"
601
+ (cerrar)="alertas.cerrar()"
602
+ (reintentar)="alertas.reintentar()"
603
+ (filtrar)="alertas.filtrar($event)"
604
+ (marcarVista)="alertas.marcarVista($event)"
605
+ (marcarTodas)="alertas.marcarTodasVistas()"
606
+ (quitada)="alertas.quitar($event)"
607
+ (abrirAlerta)="abrirAlerta.emit($event)"
608
+ />`,
609
+ changeDetection: ChangeDetectionStrategy.OnPush,
610
+ }]
611
+ }], propDecorators: { offsetTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "offsetTop", required: false }] }], abrirAlerta: [{ type: i0.Output, args: ["abrirAlerta"] }] } });
612
+
613
+ /**
614
+ * Generated bundle index. Do not edit.
615
+ */
616
+
617
+ export { ALERTAS_CONFIG, AlertasApiService, AlertasHubService, AlertasPanelComponent, AlertasState, IusAlertasComponent, MODULOS_ALERTA, SERVICIO_NO_DISPONIBLE, agruparAlertasPorDia, ahoraEnColombia, claveAlerta, coincideConSalida, esDelPanel, etiquetaDia, hayMarcables, horaCorta, modulosConPendientes, provideAlertas, tiempoDeAlerta };
618
+ //# sourceMappingURL=litigiovirtual-ius-alertas.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"litigiovirtual-ius-alertas.mjs","sources":["../../../projects/ius-alertas/src/lib/alerta.model.ts","../../../projects/ius-alertas/src/lib/alertas.config.ts","../../../projects/ius-alertas/src/lib/alertas-api.service.ts","../../../projects/ius-alertas/src/lib/alertas-hub.service.ts","../../../projects/ius-alertas/src/lib/fecha-alerta.ts","../../../projects/ius-alertas/src/lib/panel-alertas.ts","../../../projects/ius-alertas/src/lib/alertas-state.service.ts","../../../projects/ius-alertas/src/lib/panel/alertas-panel.component.ts","../../../projects/ius-alertas/src/lib/panel/alertas-panel.component.html","../../../projects/ius-alertas/src/lib/alertas.component.ts","../../../projects/ius-alertas/src/litigiovirtual-ius-alertas.ts"],"sourcesContent":["export type ModuloAlerta = 'vigilancia' | 'cuenta' | 'permisos' | 'suscripcion';\n\n/** En el orden del catálogo: es el orden del filtro. */\nexport const MODULOS_ALERTA: Record<ModuloAlerta, { etiqueta: string; icono: string }> = {\n vigilancia: { etiqueta: 'Vigilancia judicial', icono: 'gavel' },\n cuenta: { etiqueta: 'Cuenta', icono: 'group' },\n permisos: { etiqueta: 'Roles y permisos', icono: 'admin_panel_settings' },\n suscripcion: { etiqueta: 'Suscripción', icono: 'receipt_long' },\n};\n\n/** `AlertDto` del Auth en camelCase. `fechaRegistro` es hora de pared de Colombia, sin offset. */\nexport interface Alerta {\n alertaID: number;\n titulo: string;\n descripcion: string;\n fechaRegistro: string;\n accountID: number | null;\n modulo: ModuloAlerta | null;\n clase: string | null;\n seDecideEnSitio: boolean;\n destino: string | null;\n aplicacionOrigen: string;\n referenciaOrigenId: string | null;\n tipoReferencia: string | null;\n tipoAlerta: string;\n}\n\n/** Qué alertas salen del panel: por id o por la referencia con la que se notificaron. */\nexport interface SalidaAlertas {\n alertaIDs?: number[];\n aplicacionOrigen?: string;\n referenciaOrigenId?: string;\n tipoAlerta?: string;\n}\n","import { EnvironmentProviders, InjectionToken, makeEnvironmentProviders, Signal } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n/** Lo único que cada web aporta al panel de alertas. */\nexport interface AlertasConfig {\n urlAuth: string;\n token: () => string | null;\n cuentaActiva: Signal<number | undefined>;\n /**\n * Obligatoria: vacía el panel y suelta el hub. El token del hub solo se pide al (re)conectar; sin esto, otro usuario\n * que entra en la misma SPA quedaría en el grupo del anterior.\n */\n sesionCerrada$: Observable<void>;\n}\n\nexport const ALERTAS_CONFIG = new InjectionToken<AlertasConfig>('ALERTAS_CONFIG');\n\n/** La factory corre en contexto de inyección: puede usar `inject()` y `toSignal()`. */\nexport function provideAlertas(factory: () => AlertasConfig): EnvironmentProviders {\n return makeEnvironmentProviders([{ provide: ALERTAS_CONFIG, useFactory: factory }]);\n}\n","import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { catchError, Observable, of } from 'rxjs';\nimport { Alerta } from './alerta.model';\nimport { ALERTAS_CONFIG } from './alertas.config';\n\n/** `BaseResponse<T>` del Auth en camelCase. */\nexport interface RespuestaAlertas<T> {\n isSuccess: boolean;\n message?: string | null;\n object?: T | null;\n code?: string | null;\n}\n\n/** Falla real (red, 500): el Auth no llegó a responder con su envoltorio. */\nexport const SERVICIO_NO_DISPONIBLE = 'ServicioNoDisponible';\n\n@Injectable({ providedIn: 'root' })\nexport class AlertasApiService {\n private readonly http = inject(HttpClient);\n private readonly config = inject(ALERTAS_CONFIG);\n\n pendientes(accountID: number): Observable<RespuestaAlertas<Alerta[]>> {\n return this.responder(\n this.http.get<RespuestaAlertas<Alerta[]>>(this.url('Pendientes'), { params: { accountID }, headers: this.cabeceras() }),\n );\n }\n\n marcarVista(accountID: number, alertaID: number): Observable<RespuestaAlertas<boolean>> {\n return this.responder(\n this.http.put<RespuestaAlertas<boolean>>(this.url('MarcarVista'), null, {\n params: { accountID, alertaID },\n headers: this.cabeceras(),\n }),\n );\n }\n\n marcarTodasVistas(accountID: number): Observable<RespuestaAlertas<number>> {\n return this.responder(\n this.http.put<RespuestaAlertas<number>>(this.url('MarcarTodasVistas'), null, {\n params: { accountID },\n headers: this.cabeceras(),\n }),\n );\n }\n\n private url(accion: string): string {\n return `${this.config.urlAuth}/api/v1/Alert/${accion}`;\n }\n\n // Explícito: la cookie de sesión no viaja al dominio del Auth (azurewebsites.net).\n private cabeceras(): HttpHeaders {\n return new HttpHeaders({ Authorization: `Bearer ${this.config.token()}` });\n }\n\n private responder<T>(peticion: Observable<RespuestaAlertas<T>>): Observable<RespuestaAlertas<T>> {\n return peticion.pipe(catchError(() => of<RespuestaAlertas<T>>({ isSuccess: false, code: SERVICIO_NO_DISPONIBLE })));\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { HubConnection, HubConnectionBuilder } from '@microsoft/signalr';\nimport { Subject } from 'rxjs';\nimport { Alerta, SalidaAlertas } from './alerta.model';\nimport { ALERTAS_CONFIG } from './alertas.config';\n\nconst REINTENTO_MS = 3000;\n\n/** El canal en vivo del Auth. Agrupa por usuario, no por cuenta: filtrar por cuenta es del estado. */\n@Injectable({ providedIn: 'root' })\nexport class AlertasHubService {\n private readonly config = inject(ALERTAS_CONFIG);\n\n private conexion?: HubConnection;\n private debeConectar = false;\n\n private readonly llegadas = new Subject<Alerta>();\n private readonly salidas = new Subject<SalidaAlertas>();\n private readonly conectado = new Subject<void>();\n\n /** `ReceiveAlert`. */\n readonly llegadas$ = this.llegadas.asObservable();\n /** `DismissAlert`: por `alertaIDs` o por la referencia con que se notificó. */\n readonly salidas$ = this.salidas.asObservable();\n /**\n * Cada vez que el hub queda conectado (arranque o reconexión): lo que llegó antes de unirse al grupo del usuario\n * se perdió, incluso entre la carga del arranque y el primer arranque.\n */\n readonly conectado$ = this.conectado.asObservable();\n\n /** Idempotente: una sola conexión aunque varios lo llamen. */\n conectar(): void {\n this.debeConectar = true;\n if (this.conexion) return;\n\n const conexion = new HubConnectionBuilder()\n // accessTokenFactory corre en cada (re)conexión: siempre viaja el token vigente.\n .withUrl(`${this.config.urlAuth}/alertasUsuarioHub`, { accessTokenFactory: () => this.config.token() ?? '' })\n .withAutomaticReconnect()\n .build();\n conexion.on('ReceiveAlert', (alerta: Alerta) => this.llegadas.next(alerta));\n conexion.on('DismissAlert', (salida: SalidaAlertas) => this.salidas.next(salida));\n conexion.onreconnected(() => this.conectado.next());\n // Se cierra cuando la reconexión automática se rinde: se arma una conexión nueva.\n conexion.onclose(() => this.reintentar(conexion, 0));\n this.conexion = conexion;\n\n conexion.start().then(\n () => {\n if (this.conexion === conexion) this.conectado.next();\n },\n () => this.reintentar(conexion, REINTENTO_MS),\n );\n }\n\n desconectar(): void {\n this.debeConectar = false;\n const conexion = this.conexion;\n // Se suelta antes de que stop() resuelva: un conectar() inmediato arma una conexión nueva.\n this.conexion = undefined;\n conexion?.stop().catch(() => undefined);\n }\n\n private reintentar(caida: HubConnection, esperaMs: number): void {\n if (this.conexion !== caida) return;\n this.conexion = undefined;\n setTimeout(() => {\n if (this.debeConectar) this.conectar();\n }, esperaMs);\n }\n}\n","// Formato es-CO determinista (sin Intl), portado de formato-fecha.ts de Litigiovirtual.WebV2: es el formato único del producto.\r\n\r\nconst MESES_CORTOS = ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'];\r\nconst ISO_FECHA = /^(\\d{4})-(\\d{2})-(\\d{2})/;\r\nconst ISO_FECHA_HORA = /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2})(?::(\\d{2}))?/;\r\nconst DESFASE_COLOMBIA_MS = 5 * 60 * 60 * 1000;\r\nconst DIA_MS = 24 * 60 * 60 * 1000;\r\nconst MINUTO_MS = 60 * 1000;\r\n\r\nfunction dosDigitos(n: number): string {\r\n return n < 10 ? `0${n}` : String(n);\r\n}\r\n\r\nfunction isoDeHoy(hoy: Date): string {\r\n return `${hoy.getUTCFullYear()}-${dosDigitos(hoy.getUTCMonth() + 1)}-${dosDigitos(hoy.getUTCDate())}`;\r\n}\r\n\r\n/**\r\n * La hora de pared de Colombia (UTC−5 todo el año) en los campos UTC del `Date` devuelto: nunca se lee con getters locales,\r\n * así ni la zona ni el cambio de hora del navegador la mueven. `etiquetaDia` y `tiempoDeAlerta` la leen igual.\r\n */\r\nexport function ahoraEnColombia(ahora: Date = new Date()): Date {\r\n return new Date(ahora.getTime() - DESFASE_COLOMBIA_MS);\r\n}\r\n\r\n/** «Hoy · 30 jun 2026» · «Ayer · 29 jun 2026» · «1 abr 2025»; «» si no hay fecha. */\r\nexport function etiquetaDia(iso: string | null | undefined, hoy: Date): string {\r\n const m = iso ? ISO_FECHA.exec(iso) : null;\r\n if (!m) return '';\r\n const [dia, anio, mes, numero] = [m[0], Number(m[1]), Number(m[2]), Number(m[3])];\r\n if (mes < 1 || mes > 12 || numero < 1 || numero > 31) return '';\r\n const fecha = `${numero} ${MESES_CORTOS[mes - 1]} ${anio}`;\r\n const ayer = isoDeHoy(new Date(hoy.getTime() - DIA_MS));\r\n if (dia === isoDeHoy(hoy)) return `Hoy · ${fecha}`;\r\n return dia === ayer ? `Ayer · ${fecha}` : fecha;\r\n}\r\n\r\n/** «6:00 a. m.» · «12:52 p. m.» leídas tal cual del ISO; cadena vacía si no trae hora. */\r\nexport function horaCorta(iso: string | null | undefined): string {\r\n const m = iso ? /T(\\d{2}):(\\d{2})/.exec(iso) : null;\r\n if (!m) return '';\r\n const horas = Number(m[1]);\r\n const doce = horas % 12 === 0 ? 12 : horas % 12;\r\n return `${doce}:${m[2]} ${horas < 12 ? 'a. m.' : 'p. m.'}`;\r\n}\r\n\r\n/**\r\n * Hora de una alerta en la lista: de hoy, cuánto hace («ahora» · «hace 12 min» · «hace 1 hora» · «hace 3 horas»);\r\n * de otro día, su hora («3:32 p. m.»). `ahora` debe venir de `ahoraEnColombia()`.\r\n */\r\nexport function tiempoDeAlerta(fechaIso: string, ahora: Date): string {\r\n const m = ISO_FECHA_HORA.exec(fechaIso);\r\n if (!m || m.slice(1, 4).join('-') !== isoDeHoy(ahora)) return horaCorta(fechaIso);\r\n const registro = Date.UTC(Number(m[1]), Number(m[2]) - 1, Number(m[3]), Number(m[4]), Number(m[5]), Number(m[6] ?? 0));\r\n const actual = ahora.getTime();\r\n const minutos = Math.floor((actual - registro) / MINUTO_MS);\r\n if (minutos < 1) return 'ahora';\r\n if (minutos < 60) return `hace ${minutos} min`;\r\n const horas = Math.floor(minutos / 60);\r\n return horas === 1 ? 'hace 1 hora' : `hace ${horas} horas`;\r\n}\r\n","import { Alerta, MODULOS_ALERTA, ModuloAlerta, SalidaAlertas } from './alerta.model';\nimport { etiquetaDia } from './fecha-alerta';\n\nexport interface GrupoAlertas {\n /** AAAA-MM-DD del día del grupo. */\n dia: string;\n etiqueta: string;\n alertas: Alerta[];\n}\n\n/** La cuenta manda: solo las de la cuenta activa y con un módulo del catálogo. */\nexport function esDelPanel(a: Alerta, accountID: number | undefined): boolean {\n return accountID !== undefined && a.accountID === accountID && !!a.modulo && Object.hasOwn(MODULOS_ALERTA, a.modulo);\n}\n\n/** La identidad que usan los stores de Ecosistema y Amacode: una reapertura por referencia es la misma alerta. */\nexport function claveAlerta(a: Alerta): string {\n return a.referenciaOrigenId ? `${a.aplicacionOrigen}|${a.referenciaOrigenId}|${a.tipoAlerta}` : `id:${a.alertaID}`;\n}\n\n/** Grupos por día, del más reciente al más antiguo, y dentro de cada uno de la alerta más reciente a la más antigua. */\nexport function agruparAlertasPorDia(alertas: Alerta[], ahora: Date): GrupoAlertas[] {\n const grupos = new Map<string, Alerta[]>();\n const recientesPrimero = [...alertas].sort((a, b) => b.fechaRegistro.localeCompare(a.fechaRegistro));\n for (const a of recientesPrimero) {\n const dia = a.fechaRegistro.slice(0, 10);\n grupos.set(dia, [...(grupos.get(dia) ?? []), a]);\n }\n return [...grupos].map(([dia, delDia]) => ({ dia, etiqueta: etiquetaDia(dia, ahora), alertas: delDia }));\n}\n\n/** Los módulos que tienen alguna alerta, en el orden del catálogo. */\nexport function modulosConPendientes(alertas: Alerta[]): ModuloAlerta[] {\n return (Object.keys(MODULOS_ALERTA) as ModuloAlerta[]).filter(modulo => alertas.some(a => a.modulo === modulo));\n}\n\n/** Las que se deciden en el sitio no se marcan como vistas. */\nexport function hayMarcables(alertas: Alerta[]): boolean {\n return alertas.some(a => !a.seDecideEnSitio);\n}\n\nexport function coincideConSalida(a: Alerta, salida: SalidaAlertas): boolean {\n if (salida.alertaIDs?.includes(a.alertaID)) return true;\n if (!salida.aplicacionOrigen || !salida.referenciaOrigenId) return false;\n return (\n a.aplicacionOrigen === salida.aplicacionOrigen &&\n a.referenciaOrigenId === salida.referenciaOrigenId &&\n (!salida.tipoAlerta || a.tipoAlerta === salida.tipoAlerta)\n );\n}\n","import { computed, effect, inject, Injectable, signal, untracked } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ToastService } from '@litigiovirtual/ius-design-components';\nimport { EMPTY, finalize, map, Observable, Subject, switchMap } from 'rxjs';\nimport { Alerta, MODULOS_ALERTA, ModuloAlerta } from './alerta.model';\nimport { AlertasApiService, RespuestaAlertas, SERVICIO_NO_DISPONIBLE } from './alertas-api.service';\nimport { AlertasHubService } from './alertas-hub.service';\nimport { ALERTAS_CONFIG } from './alertas.config';\nimport { ahoraEnColombia } from './fecha-alerta';\nimport { agruparAlertasPorDia, coincideConSalida, esDelPanel, hayMarcables, modulosConPendientes } from './panel-alertas';\n\nexport type EstadoAlertas = 'cargando' | 'error' | 'listo';\n\nconst ERROR_GENERICO = 'El servicio no respondió. Vuelve a intentarlo.';\nconst ALERTA_NO_ENCONTRADA = 'ALERTA_NO_ENCONTRADA';\nconst MINUTO_MS = 60_000;\n\ntype Cambio = (lista: Alerta[]) => Alerta[];\n\n/** El panel de alertas de la cuenta activa: lo que pinta la campana y el drawer, en vivo. */\n@Injectable({ providedIn: 'root' })\nexport class AlertasState {\n private readonly config = inject(ALERTAS_CONFIG);\n private readonly api = inject(AlertasApiService);\n private readonly hub = inject(AlertasHubService);\n private readonly toast = inject(ToastService);\n\n private readonly iniciado = signal(false);\n private readonly lista = signal<Alerta[]>([]);\n private readonly _abierto = signal(false);\n private readonly _estado = signal<EstadoAlertas>('cargando');\n private readonly _filtro = signal<ModuloAlerta | null>(null);\n private readonly _saliendo = signal<ReadonlySet<number>>(new Set());\n private readonly _ahora = signal(ahoraEnColombia());\n\n private readonly cargas = new Subject<number | undefined>();\n /** Lo que cambió mientras viaja una carga: se reaplica sobre su respuesta, que puede ser anterior. */\n private enVuelo: Cambio[] | null = null;\n /** Con el PUT de «vista» pendiente, una recarga puede leer la base antes del commit: no vuelven a entrar. */\n private readonly marcando = new Set<number>();\n\n readonly abierto = this._abierto.asReadonly();\n readonly estado = this._estado.asReadonly();\n readonly filtro = this._filtro.asReadonly();\n /** Las que están haciendo su transición de salida: siguen en `grupos` hasta `quitar(id)`. */\n readonly saliendo = this._saliendo.asReadonly();\n /** Hora de pared de Colombia (ver `ahoraEnColombia`); se refresca cada minuto con el panel abierto. */\n readonly ahora = this._ahora.asReadonly();\n\n private readonly vigentes = computed(() => this.lista().filter(a => !this._saliendo().has(a.alertaID)));\n\n /** El número de la campana. */\n readonly pendientes = computed(() => this.vigentes().length);\n readonly grupos = computed(() => {\n const filtro = this._filtro();\n const visibles = filtro ? this.lista().filter(a => a.modulo === filtro) : this.lista();\n return agruparAlertasPorDia(visibles, this._ahora());\n });\n readonly modulos = computed(() => modulosConPendientes(this.vigentes()));\n readonly hayMarcables = computed(() => hayMarcables(this.vigentes()));\n\n constructor() {\n this.cargas\n .pipe(\n switchMap(cuenta => (cuenta === undefined ? EMPTY : this.api.pendientes(cuenta).pipe(map(r => ({ cuenta, r }))))),\n takeUntilDestroyed(),\n )\n .subscribe(({ cuenta, r }) => this.alCargar(cuenta, r));\n this.hub.llegadas$.pipe(takeUntilDestroyed()).subscribe(alerta => this.alLlegar(alerta));\n this.hub.salidas$.pipe(takeUntilDestroyed()).subscribe(salida => this.sacar(a => coincideConSalida(a, salida)));\n this.hub.conectado$.pipe(takeUntilDestroyed()).subscribe(() => this.recargar());\n this.config.sesionCerrada$.pipe(takeUntilDestroyed()).subscribe(() => this.alCerrarSesion());\n\n effect(() => {\n this.config.cuentaActiva();\n const iniciado = this.iniciado();\n untracked(() => {\n this.reset();\n if (iniciado) this.recargar();\n });\n });\n\n effect(onCleanup => {\n if (!this._abierto()) return;\n this._ahora.set(ahoraEnColombia());\n const reloj = setInterval(() => this._ahora.set(ahoraEnColombia()), MINUTO_MS);\n onCleanup(() => clearInterval(reloj));\n });\n }\n\n /** Carga lo pendiente y arranca el hub. Idempotente. */\n iniciar(): void {\n if (this.iniciado()) return;\n this.iniciado.set(true);\n this.hub.conectar();\n }\n\n /** Abrir no marca nada: solo vuelve a cargar. */\n alternar(): void {\n if (this._abierto()) {\n this.cerrar();\n return;\n }\n this._abierto.set(true);\n this.recargar();\n }\n\n cerrar(): void {\n this._abierto.set(false);\n this.quitarOcultas();\n }\n\n reintentar(): void {\n this.recargar();\n }\n\n filtrar(modulo: ModuloAlerta | null): void {\n this._filtro.set(modulo);\n this.quitarOcultas();\n }\n\n /** Salida optimista: si el Auth falla, vuelve a su lugar y se avisa. */\n marcarVista(alertaID: number): void {\n const cuenta = this.config.cuentaActiva();\n const alerta = this.vigentes().find(a => a.alertaID === alertaID);\n if (cuenta === undefined || !alerta) return;\n\n this.sacar(a => a.alertaID === alertaID);\n this.mientrasSeMarca([alertaID], this.api.marcarVista(cuenta, alertaID)).subscribe(r => {\n // Ya no estaba pendiente (la marcó otra web): que se quede fuera.\n if (!r.isSuccess && r.code !== ALERTA_NO_ENCONTRADA) this.devolver(cuenta, [alerta], r);\n });\n }\n\n /** Todas menos las que se deciden en el sitio, sin importar el filtro. */\n marcarTodasVistas(): void {\n const cuenta = this.config.cuentaActiva();\n const marcables = this.vigentes().filter(a => !a.seDecideEnSitio);\n if (cuenta === undefined || !marcables.length) return;\n\n const ids = new Set(marcables.map(a => a.alertaID));\n this.sacar(a => ids.has(a.alertaID));\n this.mientrasSeMarca([...ids], this.api.marcarTodasVistas(cuenta)).subscribe(r => {\n if (!r.isSuccess) this.devolver(cuenta, marcables, r);\n });\n }\n\n /** Fin de la transición de salida. */\n quitar(alertaID: number): void {\n this.soltar([alertaID]);\n this.aplicar(lista => lista.filter(a => a.alertaID !== alertaID));\n }\n\n /** Vuelve al arranque sin nada de la cuenta anterior y descarta la carga en vuelo. */\n reset(): void {\n this.cargas.next(undefined);\n this.enVuelo = null;\n this.lista.set([]);\n this._saliendo.set(new Set());\n this._filtro.set(null);\n this._estado.set('cargando');\n }\n\n private recargar(): void {\n const cuenta = this.config.cuentaActiva();\n if (cuenta === undefined) return;\n this._estado.set('cargando');\n this.enVuelo = [];\n this.cargas.next(cuenta);\n }\n\n private alCargar(cuenta: number, respuesta: RespuestaAlertas<Alerta[]>): void {\n if (cuenta !== this.config.cuentaActiva()) return;\n const cambios = this.enVuelo ?? [];\n this.enVuelo = null;\n if (!respuesta.isSuccess) {\n this._estado.set('error');\n return;\n }\n const delPanel = (respuesta.object ?? []).filter(a => esDelPanel(a, cuenta) && !this.marcando.has(a.alertaID));\n this.lista.set(cambios.reduce((lista, cambio) => cambio(lista), delPanel));\n this._estado.set('listo');\n }\n\n private alLlegar(alerta: Alerta): void {\n if (!esDelPanel(alerta, this.config.cuentaActiva())) {\n // El upsert por referencia puede mover la misma fila (mismo id) a otra cuenta: la copia de esta cuenta sobra.\n this.sacar(a => a.alertaID === alerta.alertaID);\n return;\n }\n this.soltar([alerta.alertaID]);\n this.aplicar(lista => [alerta, ...lista.filter(a => a.alertaID !== alerta.alertaID)]);\n if (!this._abierto()) {\n const modulo = MODULOS_ALERTA[alerta.modulo as ModuloAlerta].etiqueta;\n this.toast.info(`${modulo} · ${alerta.titulo}`, { message: alerta.descripcion });\n }\n }\n\n private alCerrarSesion(): void {\n this.iniciado.set(false);\n this._abierto.set(false);\n this.reset();\n this.hub.desconectar();\n }\n\n /** Las que se ven salen con su transición; las ocultas (panel cerrado u otro filtro) se quitan de una. */\n private sacar(sale: (a: Alerta) => boolean): void {\n const seVen = this.lista()\n .filter(a => sale(a) && this.seVe(a))\n .map(a => a.alertaID);\n if (seVen.length) this._saliendo.update(ids => new Set([...ids, ...seVen]));\n this.aplicar(lista => lista.filter(a => !sale(a) || this._saliendo().has(a.alertaID)));\n }\n\n /** La lista se ordena por fecha al agrupar: volver es reinsertar. */\n private devolver(cuenta: number, alertas: Alerta[], respuesta: RespuestaAlertas<unknown>): void {\n if (cuenta !== this.config.cuentaActiva()) return;\n this.soltar(alertas.map(a => a.alertaID));\n this.aplicar(lista => [...lista, ...alertas.filter(a => !lista.some(b => b.alertaID === a.alertaID))]);\n const fallaReal = !respuesta.code || respuesta.code === SERVICIO_NO_DISPONIBLE;\n this.toast.error(fallaReal ? ERROR_GENERICO : respuesta.message || ERROR_GENERICO);\n }\n\n private mientrasSeMarca<T>(ids: number[], peticion: Observable<T>): Observable<T> {\n ids.forEach(id => this.marcando.add(id));\n return peticion.pipe(finalize(() => ids.forEach(id => this.marcando.delete(id))));\n }\n\n private aplicar(cambio: Cambio): void {\n this.lista.update(cambio);\n this.enVuelo?.push(cambio);\n }\n\n private soltar(ids: number[]): void {\n if (!ids.some(id => this._saliendo().has(id))) return;\n this._saliendo.update(actuales => new Set([...actuales].filter(id => !ids.includes(id))));\n }\n\n private seVe(alerta: Alerta): boolean {\n const filtro = this._filtro();\n return this._abierto() && (!filtro || alerta.modulo === filtro);\n }\n\n /** Una salida que ya no se ve nunca termina su transición. */\n private quitarOcultas(): void {\n this.lista()\n .filter(a => this._saliendo().has(a.alertaID) && !this.seVe(a))\n .forEach(a => this.quitar(a.alertaID));\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input, numberAttribute, output } from '@angular/core';\nimport {\n DrawerComponent,\n DropdownComponent,\n EmptyStateComponent,\n FlexComponent,\n IconButtonComponent,\n IllustrationComponent,\n IusDrawerHeaderActionsDirective,\n IusDropdownItem,\n IusDropdownTriggerDirective,\n NotificationItemComponent,\n SectionHeaderComponent,\n SkeletonComponent,\n StatusStateComponent,\n} from '@litigiovirtual/ius-design-components';\nimport { Alerta, MODULOS_ALERTA, ModuloAlerta } from '../alerta.model';\nimport { EstadoAlertas } from '../alertas-state.service';\nimport { tiempoDeAlerta } from '../fecha-alerta';\nimport { GrupoAlertas } from '../panel-alertas';\n\n/** Valor de «Todos los módulos» en el filtro. */\nconst TODOS = 'todas';\n\n/** El panel de alertas (inventario F6·HU-1 §2–§6): solo pinta lo que recibe y avisa lo que pide el usuario. */\n@Component({\n selector: 'ius-alertas-panel',\n standalone: true,\n imports: [\n DrawerComponent,\n DropdownComponent,\n EmptyStateComponent,\n FlexComponent,\n IconButtonComponent,\n IllustrationComponent,\n IusDrawerHeaderActionsDirective,\n IusDropdownTriggerDirective,\n NotificationItemComponent,\n SectionHeaderComponent,\n SkeletonComponent,\n StatusStateComponent,\n ],\n templateUrl: './alertas-panel.component.html',\n styleUrl: './alertas-panel.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AlertasPanelComponent {\n /** Alto del encabezado de la web: el panel arranca debajo. */\n readonly offsetTop = input(0, { transform: numberAttribute });\n readonly abierto = input(false);\n readonly estado = input<EstadoAlertas>('cargando');\n /** Ya filtrados; incluyen las que están saliendo. */\n readonly grupos = input<GrupoAlertas[]>([]);\n /** Los módulos con pendientes, sin importar el filtro. */\n readonly modulos = input<ModuloAlerta[]>([]);\n readonly filtro = input<ModuloAlerta | null>(null);\n readonly hayMarcables = input(false);\n readonly saliendo = input<ReadonlySet<number>>(new Set());\n /** Hora de pared de Colombia (`ahoraEnColombia`): de ella salen «hace N» y la hora. */\n readonly ahora = input.required<Date>();\n\n readonly cerrar = output<void>();\n readonly reintentar = output<void>();\n readonly filtrar = output<ModuloAlerta | null>();\n /** «Marcar como vista», al terminar la transición. Llega antes que `quitada`. */\n readonly marcarVista = output<number>();\n readonly marcarTodas = output<void>();\n /** Terminó la transición de salida: ya se puede sacar de la lista. */\n readonly quitada = output<number>();\n /** «Ver detalle» o la tarjeta de una alerta de acción (HU-2). */\n readonly abrirAlerta = output<Alerta>();\n\n /** Con un filtro, la lista puede quedar vacía aunque haya pendientes de otros módulos. */\n private readonly hayPendientes = computed(() => this.grupos().length > 0 || this.modulos().length > 0);\n\n protected readonly cuerpo = computed(() => {\n const estado = this.estado();\n if (estado !== 'listo') return estado;\n if (!this.hayPendientes()) return 'al-dia';\n return this.grupos().length ? 'lista' : 'sin-resultados';\n });\n protected readonly conAcciones = computed(() => this.estado() === 'listo' && this.hayPendientes());\n\n protected readonly valorFiltro = computed(() => this.filtro() ?? TODOS);\n protected readonly tooltipFiltro = computed(() => {\n const filtro = this.filtro();\n return filtro ? `Filtrado: ${MODULOS_ALERTA[filtro].etiqueta}` : 'Filtrar';\n });\n protected readonly opciones = computed<IusDropdownItem[]>(() => [\n { value: TODOS, label: 'Todos los módulos' },\n ...this.modulos().map(m => ({ value: m, icon: MODULOS_ALERTA[m].icono, label: MODULOS_ALERTA[m].etiqueta })),\n ]);\n\n protected readonly secciones = computed(() => {\n const ahora = this.ahora();\n return this.grupos().map(grupo => ({\n ...grupo,\n filas: grupo.alertas.map(alerta => ({\n alerta,\n modulo: MODULOS_ALERTA[alerta.modulo as ModuloAlerta],\n tiempo: tiempoDeAlerta(alerta.fechaRegistro, ahora),\n deAccion: alerta.clase !== 'info',\n })),\n }));\n });\n\n protected alFiltrar(valor: string | number | undefined): void {\n this.filtrar.emit(valor === TODOS || valor === undefined ? null : (valor as ModuloAlerta));\n }\n}\n","<ius-drawer\n side=\"right\"\n size=\"sm\"\n title=\"Alertas\"\n showClose\n [showScrim]=\"false\"\n [closeOnScrim]=\"false\"\n [offsetTop]=\"offsetTop()\"\n [open]=\"abierto()\"\n (closed)=\"cerrar.emit()\"\n>\n @if (conAcciones()) {\n <div iusDrawerHeaderActions ius-flex gap=\"xxs\" align=\"center\">\n @if (modulos().length > 1) {\n <ius-dropdown\n selectable\n placement=\"bottom-end\"\n label=\"Filtrar por módulo\"\n ariaLabel=\"Filtrar por módulo\"\n [items]=\"opciones()\"\n [value]=\"valorFiltro()\"\n (valueChange)=\"alFiltrar($event.value)\"\n >\n <ius-icon-button\n iusDropdownTrigger\n icon=\"filter_list\"\n shape=\"circle\"\n size=\"small\"\n ariaLabel=\"Filtrar\"\n [variant]=\"filtro() ? 'secondary' : 'tertiary'\"\n [tooltip]=\"tooltipFiltro()\"\n />\n </ius-dropdown>\n }\n <ius-icon-button\n icon=\"done_all\"\n variant=\"tertiary\"\n shape=\"circle\"\n size=\"small\"\n tooltip=\"Marcar todas como vistas\"\n ariaLabel=\"Marcar todas como vistas\"\n [disabled]=\"!hayMarcables()\"\n (clicked)=\"marcarTodas.emit()\"\n />\n </div>\n }\n\n @switch (cuerpo()) {\n @case ('cargando') {\n <div ius-flex direction=\"column\" gap=\"sm\">\n @for (pieza of [0, 1, 2, 3]; track pieza) {\n <ius-skeleton variant=\"rect\" height=\"56px\" />\n }\n </div>\n }\n @case ('error') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-status-state\n status=\"error\"\n size=\"compact\"\n title=\"No se cargaron las alertas\"\n [illustrationTemplate]=\"ilustracionError\"\n [primaryAction]=\"{ label: 'Reintentar', icon: 'refresh' }\"\n (primaryClick)=\"reintentar.emit()\"\n />\n </div>\n }\n @case ('al-dia') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-empty-state\n size=\"compact\"\n variant=\"no-data\"\n illustration=\"empty-inbox\"\n title=\"Estás al día\"\n description=\"Cuando pase algo en tus procesos, tus tareas o tu cuenta, te avisamos aquí.\"\n />\n </div>\n }\n @case ('sin-resultados') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-empty-state\n size=\"compact\"\n variant=\"no-results\"\n title=\"No hay alertas de este módulo\"\n primaryAction=\"Ver todas\"\n [illustration]=\"true\"\n (primaryClick)=\"filtrar.emit(null)\"\n />\n </div>\n }\n @default {\n <div ius-flex direction=\"column\" gap=\"md\">\n @for (seccion of secciones(); track seccion.dia) {\n <div ius-flex direction=\"column\" gap=\"xs\">\n <ius-section-header variant=\"group\" [count]=\"seccion.alertas.length\">{{ seccion.etiqueta }}</ius-section-header>\n <div>\n @for (fila of seccion.filas; track fila.alerta.alertaID) {\n <ius-notification-item\n [kind]=\"fila.deAccion ? 'action' : 'info'\"\n [icon]=\"fila.modulo.icono\"\n [module]=\"fila.modulo.etiqueta\"\n [title]=\"fila.alerta.titulo\"\n [message]=\"fila.alerta.descripcion\"\n [time]=\"fila.tiempo\"\n [dismissible]=\"!fila.alerta.seDecideEnSitio\"\n [leaving]=\"saliendo().has(fila.alerta.alertaID)\"\n (opened)=\"abrirAlerta.emit(fila.alerta)\"\n (dismissed)=\"marcarVista.emit(fila.alerta.alertaID)\"\n (exited)=\"quitada.emit(fila.alerta.alertaID)\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n }\n</ius-drawer>\n\n<ng-template #ilustracionError>\n <ius-illustration name=\"screenError\" size=\"small\" />\n</ng-template>\n","import { ChangeDetectionStrategy, Component, inject, input, numberAttribute, output } from '@angular/core';\nimport { Alerta } from './alerta.model';\nimport { AlertasState } from './alertas-state.service';\nimport { AlertasPanelComponent } from './panel/alertas-panel.component';\n\n/** El panel conectado a `AlertasState`: cada web monta solo esta etiqueta. */\n@Component({\n selector: 'ius-alertas',\n standalone: true,\n imports: [AlertasPanelComponent],\n template: `<ius-alertas-panel\n [offsetTop]=\"offsetTop()\"\n [abierto]=\"alertas.abierto()\"\n [estado]=\"alertas.estado()\"\n [grupos]=\"alertas.grupos()\"\n [modulos]=\"alertas.modulos()\"\n [filtro]=\"alertas.filtro()\"\n [hayMarcables]=\"alertas.hayMarcables()\"\n [saliendo]=\"alertas.saliendo()\"\n [ahora]=\"alertas.ahora()\"\n (cerrar)=\"alertas.cerrar()\"\n (reintentar)=\"alertas.reintentar()\"\n (filtrar)=\"alertas.filtrar($event)\"\n (marcarVista)=\"alertas.marcarVista($event)\"\n (marcarTodas)=\"alertas.marcarTodasVistas()\"\n (quitada)=\"alertas.quitar($event)\"\n (abrirAlerta)=\"abrirAlerta.emit($event)\"\n />`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IusAlertasComponent {\n protected readonly alertas = inject(AlertasState);\n\n /** Alto del encabezado de la web. */\n readonly offsetTop = input(0, { transform: numberAttribute });\n /** Abrir la alerta en su módulo es de cada web (HU-2). */\n readonly abrirAlerta = output<Alerta>();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["MINUTO_MS"],"mappings":";;;;;;;;AAEA;AACO,MAAM,cAAc,GAA8D;IACvF,UAAU,EAAE,EAAE,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE;IAC/D,MAAM,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;IAC9C,QAAQ,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,sBAAsB,EAAE;IACzE,WAAW,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,cAAc,EAAE;;;MCQpD,cAAc,GAAG,IAAI,cAAc,CAAgB,gBAAgB;AAEhF;AACM,SAAU,cAAc,CAAC,OAA4B,EAAA;AACzD,IAAA,OAAO,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;AACrF;;ACNA;AACO,MAAM,sBAAsB,GAAG;MAGzB,iBAAiB,CAAA;AAD9B,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AACzB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC;AAsCjD,IAAA;AApCC,IAAA,UAAU,CAAC,SAAiB,EAAA;AAC1B,QAAA,OAAO,IAAI,CAAC,SAAS,CACnB,IAAI,CAAC,IAAI,CAAC,GAAG,CAA6B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,I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A,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,qBAAqB,CAAC;AAChC,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;AAiBP,IAAA,CAAA;oBACH,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;AC7BD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,27 @@
1
1
  {
2
2
  "name": "@litigiovirtual/ius-alertas",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.1",
4
+ "peerDependencies": {
5
+ "@angular/common": ">=22.0.0 <23.0.0",
6
+ "@angular/core": ">=22.0.0 <23.0.0",
7
+ "@litigiovirtual/ius-design-components": "^2.7.0",
8
+ "@microsoft/signalr": ">=8 <10",
9
+ "rxjs": "~7.8.0"
10
+ },
11
+ "dependencies": {
12
+ "tslib": "^2.3.0"
13
+ },
14
+ "sideEffects": false,
15
+ "module": "fesm2022/litigiovirtual-ius-alertas.mjs",
16
+ "typings": "types/litigiovirtual-ius-alertas.d.ts",
17
+ "exports": {
18
+ "./package.json": {
19
+ "default": "./package.json"
20
+ },
21
+ ".": {
22
+ "types": "./types/litigiovirtual-ius-alertas.d.ts",
23
+ "default": "./fesm2022/litigiovirtual-ius-alertas.mjs"
24
+ }
25
+ },
26
+ "type": "module"
6
27
  }
@@ -0,0 +1,262 @@
1
+ import * as rxjs from 'rxjs';
2
+ import { Observable } from 'rxjs';
3
+ import * as _angular_core from '@angular/core';
4
+ import { InjectionToken, Signal, EnvironmentProviders } from '@angular/core';
5
+ import * as _litigiovirtual_ius_alertas from '@litigiovirtual/ius-alertas';
6
+ import * as _litigiovirtual_ius_design_components from '@litigiovirtual/ius-design-components';
7
+
8
+ type ModuloAlerta = 'vigilancia' | 'cuenta' | 'permisos' | 'suscripcion';
9
+ /** En el orden del catálogo: es el orden del filtro. */
10
+ declare const MODULOS_ALERTA: Record<ModuloAlerta, {
11
+ etiqueta: string;
12
+ icono: string;
13
+ }>;
14
+ /** `AlertDto` del Auth en camelCase. `fechaRegistro` es hora de pared de Colombia, sin offset. */
15
+ interface Alerta {
16
+ alertaID: number;
17
+ titulo: string;
18
+ descripcion: string;
19
+ fechaRegistro: string;
20
+ accountID: number | null;
21
+ modulo: ModuloAlerta | null;
22
+ clase: string | null;
23
+ seDecideEnSitio: boolean;
24
+ destino: string | null;
25
+ aplicacionOrigen: string;
26
+ referenciaOrigenId: string | null;
27
+ tipoReferencia: string | null;
28
+ tipoAlerta: string;
29
+ }
30
+ /** Qué alertas salen del panel: por id o por la referencia con la que se notificaron. */
31
+ interface SalidaAlertas {
32
+ alertaIDs?: number[];
33
+ aplicacionOrigen?: string;
34
+ referenciaOrigenId?: string;
35
+ tipoAlerta?: string;
36
+ }
37
+
38
+ /** `BaseResponse<T>` del Auth en camelCase. */
39
+ interface RespuestaAlertas<T> {
40
+ isSuccess: boolean;
41
+ message?: string | null;
42
+ object?: T | null;
43
+ code?: string | null;
44
+ }
45
+ /** Falla real (red, 500): el Auth no llegó a responder con su envoltorio. */
46
+ declare const SERVICIO_NO_DISPONIBLE = "ServicioNoDisponible";
47
+ declare class AlertasApiService {
48
+ private readonly http;
49
+ private readonly config;
50
+ pendientes(accountID: number): Observable<RespuestaAlertas<Alerta[]>>;
51
+ marcarVista(accountID: number, alertaID: number): Observable<RespuestaAlertas<boolean>>;
52
+ marcarTodasVistas(accountID: number): Observable<RespuestaAlertas<number>>;
53
+ private url;
54
+ private cabeceras;
55
+ private responder;
56
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertasApiService, never>;
57
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AlertasApiService>;
58
+ }
59
+
60
+ /** El canal en vivo del Auth. Agrupa por usuario, no por cuenta: filtrar por cuenta es del estado. */
61
+ declare class AlertasHubService {
62
+ private readonly config;
63
+ private conexion?;
64
+ private debeConectar;
65
+ private readonly llegadas;
66
+ private readonly salidas;
67
+ private readonly conectado;
68
+ /** `ReceiveAlert`. */
69
+ readonly llegadas$: rxjs.Observable<Alerta>;
70
+ /** `DismissAlert`: por `alertaIDs` o por la referencia con que se notificó. */
71
+ readonly salidas$: rxjs.Observable<SalidaAlertas>;
72
+ /**
73
+ * Cada vez que el hub queda conectado (arranque o reconexión): lo que llegó antes de unirse al grupo del usuario
74
+ * se perdió, incluso entre la carga del arranque y el primer arranque.
75
+ */
76
+ readonly conectado$: rxjs.Observable<void>;
77
+ /** Idempotente: una sola conexión aunque varios lo llamen. */
78
+ conectar(): void;
79
+ desconectar(): void;
80
+ private reintentar;
81
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertasHubService, never>;
82
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AlertasHubService>;
83
+ }
84
+
85
+ type EstadoAlertas = 'cargando' | 'error' | 'listo';
86
+ /** El panel de alertas de la cuenta activa: lo que pinta la campana y el drawer, en vivo. */
87
+ declare class AlertasState {
88
+ private readonly config;
89
+ private readonly api;
90
+ private readonly hub;
91
+ private readonly toast;
92
+ private readonly iniciado;
93
+ private readonly lista;
94
+ private readonly _abierto;
95
+ private readonly _estado;
96
+ private readonly _filtro;
97
+ private readonly _saliendo;
98
+ private readonly _ahora;
99
+ private readonly cargas;
100
+ /** Lo que cambió mientras viaja una carga: se reaplica sobre su respuesta, que puede ser anterior. */
101
+ private enVuelo;
102
+ /** Con el PUT de «vista» pendiente, una recarga puede leer la base antes del commit: no vuelven a entrar. */
103
+ private readonly marcando;
104
+ readonly abierto: _angular_core.Signal<boolean>;
105
+ readonly estado: _angular_core.Signal<EstadoAlertas>;
106
+ readonly filtro: _angular_core.Signal<ModuloAlerta | null>;
107
+ /** Las que están haciendo su transición de salida: siguen en `grupos` hasta `quitar(id)`. */
108
+ readonly saliendo: _angular_core.Signal<ReadonlySet<number>>;
109
+ /** Hora de pared de Colombia (ver `ahoraEnColombia`); se refresca cada minuto con el panel abierto. */
110
+ readonly ahora: _angular_core.Signal<Date>;
111
+ private readonly vigentes;
112
+ /** El número de la campana. */
113
+ readonly pendientes: _angular_core.Signal<number>;
114
+ readonly grupos: _angular_core.Signal<_litigiovirtual_ius_alertas.GrupoAlertas[]>;
115
+ readonly modulos: _angular_core.Signal<ModuloAlerta[]>;
116
+ readonly hayMarcables: _angular_core.Signal<boolean>;
117
+ constructor();
118
+ /** Carga lo pendiente y arranca el hub. Idempotente. */
119
+ iniciar(): void;
120
+ /** Abrir no marca nada: solo vuelve a cargar. */
121
+ alternar(): void;
122
+ cerrar(): void;
123
+ reintentar(): void;
124
+ filtrar(modulo: ModuloAlerta | null): void;
125
+ /** Salida optimista: si el Auth falla, vuelve a su lugar y se avisa. */
126
+ marcarVista(alertaID: number): void;
127
+ /** Todas menos las que se deciden en el sitio, sin importar el filtro. */
128
+ marcarTodasVistas(): void;
129
+ /** Fin de la transición de salida. */
130
+ quitar(alertaID: number): void;
131
+ /** Vuelve al arranque sin nada de la cuenta anterior y descarta la carga en vuelo. */
132
+ reset(): void;
133
+ private recargar;
134
+ private alCargar;
135
+ private alLlegar;
136
+ private alCerrarSesion;
137
+ /** Las que se ven salen con su transición; las ocultas (panel cerrado u otro filtro) se quitan de una. */
138
+ private sacar;
139
+ /** La lista se ordena por fecha al agrupar: volver es reinsertar. */
140
+ private devolver;
141
+ private mientrasSeMarca;
142
+ private aplicar;
143
+ private soltar;
144
+ private seVe;
145
+ /** Una salida que ya no se ve nunca termina su transición. */
146
+ private quitarOcultas;
147
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertasState, never>;
148
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AlertasState>;
149
+ }
150
+
151
+ /** El panel conectado a `AlertasState`: cada web monta solo esta etiqueta. */
152
+ declare class IusAlertasComponent {
153
+ protected readonly alertas: AlertasState;
154
+ /** Alto del encabezado de la web. */
155
+ readonly offsetTop: _angular_core.InputSignalWithTransform<number, unknown>;
156
+ /** Abrir la alerta en su módulo es de cada web (HU-2). */
157
+ readonly abrirAlerta: _angular_core.OutputEmitterRef<Alerta>;
158
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<IusAlertasComponent, never>;
159
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<IusAlertasComponent, "ius-alertas", never, { "offsetTop": { "alias": "offsetTop"; "required": false; "isSignal": true; }; }, { "abrirAlerta": "abrirAlerta"; }, never, never, true, never>;
160
+ }
161
+
162
+ /** Lo único que cada web aporta al panel de alertas. */
163
+ interface AlertasConfig {
164
+ urlAuth: string;
165
+ token: () => string | null;
166
+ cuentaActiva: Signal<number | undefined>;
167
+ /**
168
+ * Obligatoria: vacía el panel y suelta el hub. El token del hub solo se pide al (re)conectar; sin esto, otro usuario
169
+ * que entra en la misma SPA quedaría en el grupo del anterior.
170
+ */
171
+ sesionCerrada$: Observable<void>;
172
+ }
173
+ declare const ALERTAS_CONFIG: InjectionToken<AlertasConfig>;
174
+ /** La factory corre en contexto de inyección: puede usar `inject()` y `toSignal()`. */
175
+ declare function provideAlertas(factory: () => AlertasConfig): EnvironmentProviders;
176
+
177
+ /**
178
+ * La hora de pared de Colombia (UTC−5 todo el año) en los campos UTC del `Date` devuelto: nunca se lee con getters locales,
179
+ * así ni la zona ni el cambio de hora del navegador la mueven. `etiquetaDia` y `tiempoDeAlerta` la leen igual.
180
+ */
181
+ declare function ahoraEnColombia(ahora?: Date): Date;
182
+ /** «Hoy · 30 jun 2026» · «Ayer · 29 jun 2026» · «1 abr 2025»; «» si no hay fecha. */
183
+ declare function etiquetaDia(iso: string | null | undefined, hoy: Date): string;
184
+ /** «6:00 a. m.» · «12:52 p. m.» leídas tal cual del ISO; cadena vacía si no trae hora. */
185
+ declare function horaCorta(iso: string | null | undefined): string;
186
+ /**
187
+ * Hora de una alerta en la lista: de hoy, cuánto hace («ahora» · «hace 12 min» · «hace 1 hora» · «hace 3 horas»);
188
+ * de otro día, su hora («3:32 p. m.»). `ahora` debe venir de `ahoraEnColombia()`.
189
+ */
190
+ declare function tiempoDeAlerta(fechaIso: string, ahora: Date): string;
191
+
192
+ interface GrupoAlertas {
193
+ /** AAAA-MM-DD del día del grupo. */
194
+ dia: string;
195
+ etiqueta: string;
196
+ alertas: Alerta[];
197
+ }
198
+ /** La cuenta manda: solo las de la cuenta activa y con un módulo del catálogo. */
199
+ declare function esDelPanel(a: Alerta, accountID: number | undefined): boolean;
200
+ /** La identidad que usan los stores de Ecosistema y Amacode: una reapertura por referencia es la misma alerta. */
201
+ declare function claveAlerta(a: Alerta): string;
202
+ /** Grupos por día, del más reciente al más antiguo, y dentro de cada uno de la alerta más reciente a la más antigua. */
203
+ declare function agruparAlertasPorDia(alertas: Alerta[], ahora: Date): GrupoAlertas[];
204
+ /** Los módulos que tienen alguna alerta, en el orden del catálogo. */
205
+ declare function modulosConPendientes(alertas: Alerta[]): ModuloAlerta[];
206
+ /** Las que se deciden en el sitio no se marcan como vistas. */
207
+ declare function hayMarcables(alertas: Alerta[]): boolean;
208
+ declare function coincideConSalida(a: Alerta, salida: SalidaAlertas): boolean;
209
+
210
+ /** El panel de alertas (inventario F6·HU-1 §2–§6): solo pinta lo que recibe y avisa lo que pide el usuario. */
211
+ declare class AlertasPanelComponent {
212
+ /** Alto del encabezado de la web: el panel arranca debajo. */
213
+ readonly offsetTop: _angular_core.InputSignalWithTransform<number, unknown>;
214
+ readonly abierto: _angular_core.InputSignal<boolean>;
215
+ readonly estado: _angular_core.InputSignal<EstadoAlertas>;
216
+ /** Ya filtrados; incluyen las que están saliendo. */
217
+ readonly grupos: _angular_core.InputSignal<GrupoAlertas[]>;
218
+ /** Los módulos con pendientes, sin importar el filtro. */
219
+ readonly modulos: _angular_core.InputSignal<ModuloAlerta[]>;
220
+ readonly filtro: _angular_core.InputSignal<ModuloAlerta | null>;
221
+ readonly hayMarcables: _angular_core.InputSignal<boolean>;
222
+ readonly saliendo: _angular_core.InputSignal<ReadonlySet<number>>;
223
+ /** Hora de pared de Colombia (`ahoraEnColombia`): de ella salen «hace N» y la hora. */
224
+ readonly ahora: _angular_core.InputSignal<Date>;
225
+ readonly cerrar: _angular_core.OutputEmitterRef<void>;
226
+ readonly reintentar: _angular_core.OutputEmitterRef<void>;
227
+ readonly filtrar: _angular_core.OutputEmitterRef<ModuloAlerta | null>;
228
+ /** «Marcar como vista», al terminar la transición. Llega antes que `quitada`. */
229
+ readonly marcarVista: _angular_core.OutputEmitterRef<number>;
230
+ readonly marcarTodas: _angular_core.OutputEmitterRef<void>;
231
+ /** Terminó la transición de salida: ya se puede sacar de la lista. */
232
+ readonly quitada: _angular_core.OutputEmitterRef<number>;
233
+ /** «Ver detalle» o la tarjeta de una alerta de acción (HU-2). */
234
+ readonly abrirAlerta: _angular_core.OutputEmitterRef<Alerta>;
235
+ /** Con un filtro, la lista puede quedar vacía aunque haya pendientes de otros módulos. */
236
+ private readonly hayPendientes;
237
+ protected readonly cuerpo: _angular_core.Signal<"error" | "cargando" | "al-dia" | "lista" | "sin-resultados">;
238
+ protected readonly conAcciones: _angular_core.Signal<boolean>;
239
+ protected readonly valorFiltro: _angular_core.Signal<ModuloAlerta | "todas">;
240
+ protected readonly tooltipFiltro: _angular_core.Signal<string>;
241
+ protected readonly opciones: _angular_core.Signal<_litigiovirtual_ius_design_components.IusMenuOption[]>;
242
+ protected readonly secciones: _angular_core.Signal<{
243
+ filas: {
244
+ alerta: Alerta;
245
+ modulo: {
246
+ etiqueta: string;
247
+ icono: string;
248
+ };
249
+ tiempo: string;
250
+ deAccion: boolean;
251
+ }[];
252
+ dia: string;
253
+ etiqueta: string;
254
+ alertas: Alerta[];
255
+ }[]>;
256
+ protected alFiltrar(valor: string | number | undefined): void;
257
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertasPanelComponent, never>;
258
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertasPanelComponent, "ius-alertas-panel", never, { "offsetTop": { "alias": "offsetTop"; "required": false; "isSignal": true; }; "abierto": { "alias": "abierto"; "required": false; "isSignal": true; }; "estado": { "alias": "estado"; "required": false; "isSignal": true; }; "grupos": { "alias": "grupos"; "required": false; "isSignal": true; }; "modulos": { "alias": "modulos"; "required": false; "isSignal": true; }; "filtro": { "alias": "filtro"; "required": false; "isSignal": true; }; "hayMarcables": { "alias": "hayMarcables"; "required": false; "isSignal": true; }; "saliendo": { "alias": "saliendo"; "required": false; "isSignal": true; }; "ahora": { "alias": "ahora"; "required": true; "isSignal": true; }; }, { "cerrar": "cerrar"; "reintentar": "reintentar"; "filtrar": "filtrar"; "marcarVista": "marcarVista"; "marcarTodas": "marcarTodas"; "quitada": "quitada"; "abrirAlerta": "abrirAlerta"; }, never, never, true, never>;
259
+ }
260
+
261
+ export { ALERTAS_CONFIG, AlertasApiService, AlertasHubService, AlertasPanelComponent, AlertasState, IusAlertasComponent, MODULOS_ALERTA, SERVICIO_NO_DISPONIBLE, agruparAlertasPorDia, ahoraEnColombia, claveAlerta, coincideConSalida, esDelPanel, etiquetaDia, hayMarcables, horaCorta, modulosConPendientes, provideAlertas, tiempoDeAlerta };
262
+ export type { Alerta, AlertasConfig, EstadoAlertas, GrupoAlertas, ModuloAlerta, RespuestaAlertas, SalidaAlertas };
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.