intelica-library-project 20.0.9 → 20.0.10
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.
|
@@ -10,7 +10,7 @@ import * as i1$1 from '@angular/common';
|
|
|
10
10
|
import { CommonModule, DatePipe, isPlatformBrowser, NgClass } from '@angular/common';
|
|
11
11
|
import * as i5 from 'primeng/tooltip';
|
|
12
12
|
import { TooltipModule, Tooltip } from 'primeng/tooltip';
|
|
13
|
-
import { GlobalTermService, TermPipe, FormatDateConstants, ConfigService, GlobalFavoriteService, Color, getColor } from 'intelica-library-base';
|
|
13
|
+
import { GlobalTermService, TermPipe, FormatDateConstants, ConfigService, AlertService, GlobalFavoriteService, Color, getColor } from 'intelica-library-base';
|
|
14
14
|
import * as i4 from 'primeng/button';
|
|
15
15
|
import { ButtonModule, Button } from 'primeng/button';
|
|
16
16
|
import { Subscription, Subject, BehaviorSubject, firstValueFrom, map, distinctUntilChanged, of, tap, shareReplay, throwError } from 'rxjs';
|
|
@@ -2304,7 +2304,9 @@ function dispatchQuicksightEvent(event, outputs) {
|
|
|
2304
2304
|
|
|
2305
2305
|
class DashboardQsComponent {
|
|
2306
2306
|
sharedService = inject(Shared);
|
|
2307
|
+
alertService = inject(AlertService);
|
|
2307
2308
|
route = inject(ActivatedRoute);
|
|
2309
|
+
sessionExpiredShown = false;
|
|
2308
2310
|
containers;
|
|
2309
2311
|
dashboardIdInput = input(undefined, ...(ngDevMode ? [{ debugName: "dashboardIdInput", alias: 'dashboardId' }] : [{ alias: 'dashboardId' }]));
|
|
2310
2312
|
parametersInput = input(undefined, ...(ngDevMode ? [{ debugName: "parametersInput", alias: 'parameters' }] : [{ alias: 'parameters' }]));
|
|
@@ -2347,6 +2349,8 @@ class DashboardQsComponent {
|
|
|
2347
2349
|
dispatchQuicksightEvent(event, this);
|
|
2348
2350
|
if (event.eventName === QuicksightEventName.CONTENT_LOADED || event.eventName === QuicksightEventName.ERROR_OCCURRED)
|
|
2349
2351
|
this.isLoading.set(false);
|
|
2352
|
+
if (isQuicksightSessionExpiredEvent(event))
|
|
2353
|
+
this.handleSessionExpired();
|
|
2350
2354
|
},
|
|
2351
2355
|
});
|
|
2352
2356
|
}
|
|
@@ -2355,6 +2359,16 @@ class DashboardQsComponent {
|
|
|
2355
2359
|
this.isLoading.set(false);
|
|
2356
2360
|
}
|
|
2357
2361
|
}
|
|
2362
|
+
async handleSessionExpired() {
|
|
2363
|
+
if (this.sessionExpiredShown)
|
|
2364
|
+
return;
|
|
2365
|
+
this.sessionExpiredShown = true;
|
|
2366
|
+
const { isConfirmed } = await this.alertService.confirm('Sesión expirada', 'Tu sesión de QuickSight expiró. Actualiza la página para continuar.', 'Actualizar página', 'Cancelar');
|
|
2367
|
+
if (isConfirmed)
|
|
2368
|
+
window.location.reload();
|
|
2369
|
+
else
|
|
2370
|
+
this.sessionExpiredShown = false;
|
|
2371
|
+
}
|
|
2358
2372
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: DashboardQsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2359
2373
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.23", type: DashboardQsComponent, isStandalone: true, selector: "intelica-dashboard-qs", inputs: { dashboardIdInput: { classPropertyName: "dashboardIdInput", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null }, parametersInput: { classPropertyName: "parametersInput", publicName: "parameters", isSignal: true, isRequired: false, transformFunction: null }, heightInput: { classPropertyName: "heightInput", publicName: "height", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isLoadingChange: "isLoadingChange", sdkEvent: "sdkEvent", contentLoaded: "contentLoaded", errorOccurred: "errorOccurred", sessionExpired: "sessionExpired" }, viewQueries: [{ propertyName: "containers", predicate: ["visualContainer"], descendants: true }], ngImport: i0, template: "@if (isLoading()) {\n<div class=\"u-display-flex u-flex-column u-gap-sm\">\n <div class=\"u-display-flex u-background-white u-px-1 u-pt-1\">\n <div class=\"u-display-flex u-flex-column u-px-1\" style=\"height: 33px\">\n <p-skeleton class=\"prSkeleton u-m-auto\" [width]=\"'61px'\" [height]=\"'14px'\" />\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'2px'\" />\n </div>\n <div class=\"u-display-flex u-flex-column u-px-1\" style=\"height: 33px\">\n <p-skeleton class=\"prSkeleton u-m-auto\" [width]=\"'61px'\" [height]=\"'14px'\" />\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'2px'\" />\n </div>\n </div>\n <div class=\"u-display-flex u-flex-column u-gap-sm\">\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" style=\"aspect-ratio: 1061.57 / 93.02\" />\n </p-panel>\n </div>\n <div class=\"u-display-flex u-flex-row u-gap-sm\">\n @for (_ of [].constructor(4); track $index) {\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" style=\"aspect-ratio: 244.87 / 123.12\" />\n </p-panel>\n }\n </div>\n <div class=\"u-display-flex u-flex-column u-gap-sm\">\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" style=\"aspect-ratio: 1061.57 / 303.7\" />\n </p-panel>\n </div>\n <div class=\"u-display-flex u-flex-row u-gap-sm\">\n @for (_ of [].constructor(2); track $index) {\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" style=\"aspect-ratio: 517.1 / 123.12\" />\n </p-panel>\n }\n </div>\n</div>\n}\n<div #visualContainer [style.height]=\"height()\" [hidden]=\"isLoading()\"></div>", dependencies: [{ kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: Panel, selector: "p-panel", inputs: ["id", "toggleable", "header", "collapsed", "styleClass", "iconPos", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }] });
|
|
2360
2374
|
}
|
|
@@ -2368,7 +2382,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.23", ngImpo
|
|
|
2368
2382
|
|
|
2369
2383
|
class DashboardQsInteractiveComponent {
|
|
2370
2384
|
sharedService = inject(Shared);
|
|
2385
|
+
alertService = inject(AlertService);
|
|
2371
2386
|
route = inject(ActivatedRoute);
|
|
2387
|
+
sessionExpiredShown = false;
|
|
2372
2388
|
containers;
|
|
2373
2389
|
dashboardIdInput = input(undefined, ...(ngDevMode ? [{ debugName: "dashboardIdInput", alias: 'dashboardId' }] : [{ alias: 'dashboardId' }]));
|
|
2374
2390
|
parametersInput = input(undefined, ...(ngDevMode ? [{ debugName: "parametersInput", alias: 'parameters' }] : [{ alias: 'parameters' }]));
|
|
@@ -2423,6 +2439,8 @@ class DashboardQsInteractiveComponent {
|
|
|
2423
2439
|
dispatchQuicksightEvent(event, this);
|
|
2424
2440
|
if (event.eventName === QuicksightEventName.CONTENT_LOADED || event.eventName === QuicksightEventName.ERROR_OCCURRED || event.eventName === QuicksightEventName.PARAMETERS_CHANGED)
|
|
2425
2441
|
this.isLoading.set(false);
|
|
2442
|
+
if (isQuicksightSessionExpiredEvent(event))
|
|
2443
|
+
this.handleSessionExpired();
|
|
2426
2444
|
},
|
|
2427
2445
|
});
|
|
2428
2446
|
}
|
|
@@ -2431,6 +2449,16 @@ class DashboardQsInteractiveComponent {
|
|
|
2431
2449
|
this.isLoading.set(false);
|
|
2432
2450
|
}
|
|
2433
2451
|
}
|
|
2452
|
+
async handleSessionExpired() {
|
|
2453
|
+
if (this.sessionExpiredShown)
|
|
2454
|
+
return;
|
|
2455
|
+
this.sessionExpiredShown = true;
|
|
2456
|
+
const { isConfirmed } = await this.alertService.confirm('Sesión expirada', 'Tu sesión de QuickSight expiró. Actualiza la página para continuar.', 'Actualizar página', 'Cancelar');
|
|
2457
|
+
if (isConfirmed)
|
|
2458
|
+
window.location.reload();
|
|
2459
|
+
else
|
|
2460
|
+
this.sessionExpiredShown = false;
|
|
2461
|
+
}
|
|
2434
2462
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: DashboardQsInteractiveComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2435
2463
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.23", type: DashboardQsInteractiveComponent, isStandalone: true, selector: "intelica-dashboard-qs-interactive", inputs: { dashboardIdInput: { classPropertyName: "dashboardIdInput", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null }, parametersInput: { classPropertyName: "parametersInput", publicName: "parameters", isSignal: true, isRequired: false, transformFunction: null }, heightInput: { classPropertyName: "heightInput", publicName: "height", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isLoadingChange: "isLoadingChange", sdkEvent: "sdkEvent", contentLoaded: "contentLoaded", errorOccurred: "errorOccurred", sessionExpired: "sessionExpired" }, viewQueries: [{ propertyName: "containers", predicate: ["visualContainer"], descendants: true }], ngImport: i0, template: "@if (isLoading()) {\n<div class=\"u-display-flex u-flex-column u-gap-sm\">\n <div class=\"u-display-flex u-background-white u-px-1 u-pt-1\">\n <div class=\"u-display-flex u-flex-column u-px-1\" style=\"height: 33px\">\n <p-skeleton class=\"prSkeleton u-m-auto\" [width]=\"'61px'\" [height]=\"'14px'\" />\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'2px'\" />\n </div>\n <div class=\"u-display-flex u-flex-column u-px-1\" style=\"height: 33px\">\n <p-skeleton class=\"prSkeleton u-m-auto\" [width]=\"'61px'\" [height]=\"'14px'\" />\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'2px'\" />\n </div>\n </div>\n <div class=\"u-display-flex u-flex-column u-gap-sm\">\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" style=\"aspect-ratio: 1061.57 / 93.02\" />\n </p-panel>\n </div>\n <div class=\"u-display-flex u-flex-row u-gap-sm\">\n @for (_ of [].constructor(4); track $index) {\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" style=\"aspect-ratio: 244.87 / 123.12\" />\n </p-panel>\n }\n </div>\n <div class=\"u-display-flex u-flex-column u-gap-sm\">\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" style=\"aspect-ratio: 1061.57 / 303.7\" />\n </p-panel>\n </div>\n <div class=\"u-display-flex u-flex-row u-gap-sm\">\n @for (_ of [].constructor(2); track $index) {\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" style=\"aspect-ratio: 517.1 / 123.12\" />\n </p-panel>\n }\n </div>\n</div>\n}\n<div #visualContainer [style.height]=\"height()\" [hidden]=\"isLoading()\"></div>", dependencies: [{ kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: Panel, selector: "p-panel", inputs: ["id", "toggleable", "header", "collapsed", "styleClass", "iconPos", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }] });
|
|
2436
2464
|
}
|