intelica-library-project 20.0.25 → 20.0.26

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.
@@ -2486,6 +2486,12 @@ class Shared {
2486
2486
  static EMBED_URL_TTL_MS = 4 * 60_000;
2487
2487
  // caché de embed URLs por dashboardId (independientes de los parámetros del dataset)
2488
2488
  embedUrlCache = new Map();
2489
+ // disponibilidad del embed de QuickSight para el usuario actual: null = desconocido · true = ok
2490
+ // · false = sin acceso (p.ej. usuario no registrado en la cuenta). Se actualiza como efecto de
2491
+ // solicitar la embed URL (warm o embed), sin llamadas adicionales. Los consumidores pueden leerlo
2492
+ // para deshabilitar accesos a dashboards cuando es false.
2493
+ _embedAvailable = signal(null, ...(ngDevMode ? [{ debugName: "_embedAvailable" }] : []));
2494
+ embedAvailable = this._embedAvailable.asReadonly();
2489
2495
  scheduleSessionExpiry(expiresInMinutes) {
2490
2496
  this.clearSessionTimer();
2491
2497
  this.sessionTimer = setTimeout(() => this.handleSessionExpired(), Math.max((expiresInMinutes - 1) * 60_000, 30_000));
@@ -2511,7 +2517,13 @@ class Shared {
2511
2517
  const cached = this.embedUrlCache.get(dashboardId);
2512
2518
  if (cached && cached.expiresAt > Date.now())
2513
2519
  return cached.promise;
2514
- const promise = firstValueFrom(this.getEmbedUrl({ dashboardId, parameters: undefined })).catch(error => {
2520
+ const promise = firstValueFrom(this.getEmbedUrl({ dashboardId, parameters: undefined }))
2521
+ .then(response => {
2522
+ this._embedAvailable.set(true);
2523
+ return response;
2524
+ })
2525
+ .catch(error => {
2526
+ this._embedAvailable.set(false);
2515
2527
  this.embedUrlCache.delete(dashboardId);
2516
2528
  throw error;
2517
2529
  });