intelica-library-project 20.0.9 → 20.0.11
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,10 @@ function dispatchQuicksightEvent(event, outputs) {
|
|
|
2304
2304
|
|
|
2305
2305
|
class DashboardQsComponent {
|
|
2306
2306
|
sharedService = inject(Shared);
|
|
2307
|
+
alertService = inject(AlertService);
|
|
2308
|
+
term = inject(TermPipe);
|
|
2307
2309
|
route = inject(ActivatedRoute);
|
|
2310
|
+
sessionExpiredShown = false;
|
|
2308
2311
|
containers;
|
|
2309
2312
|
dashboardIdInput = input(undefined, ...(ngDevMode ? [{ debugName: "dashboardIdInput", alias: 'dashboardId' }] : [{ alias: 'dashboardId' }]));
|
|
2310
2313
|
parametersInput = input(undefined, ...(ngDevMode ? [{ debugName: "parametersInput", alias: 'parameters' }] : [{ alias: 'parameters' }]));
|
|
@@ -2347,6 +2350,8 @@ class DashboardQsComponent {
|
|
|
2347
2350
|
dispatchQuicksightEvent(event, this);
|
|
2348
2351
|
if (event.eventName === QuicksightEventName.CONTENT_LOADED || event.eventName === QuicksightEventName.ERROR_OCCURRED)
|
|
2349
2352
|
this.isLoading.set(false);
|
|
2353
|
+
if (isQuicksightSessionExpiredEvent(event))
|
|
2354
|
+
this.handleSessionExpired();
|
|
2350
2355
|
},
|
|
2351
2356
|
});
|
|
2352
2357
|
}
|
|
@@ -2355,6 +2360,20 @@ class DashboardQsComponent {
|
|
|
2355
2360
|
this.isLoading.set(false);
|
|
2356
2361
|
}
|
|
2357
2362
|
}
|
|
2363
|
+
t(key, fallback) {
|
|
2364
|
+
const value = this.term.transform(key);
|
|
2365
|
+
return value && value !== '-' ? value : fallback;
|
|
2366
|
+
}
|
|
2367
|
+
async handleSessionExpired() {
|
|
2368
|
+
if (this.sessionExpiredShown)
|
|
2369
|
+
return;
|
|
2370
|
+
this.sessionExpiredShown = true;
|
|
2371
|
+
const { isConfirmed } = await this.alertService.confirm(this.t('SESSION_EXPIRED_TITLE', 'Sesión expirada'), this.t('SESSION_EXPIRED_MESSAGE', 'Tu sesión de QuickSight expiró. Actualiza la página para continuar.'), this.t('SESSION_EXPIRED_CONFIRM', 'Actualizar página'), this.t('CANCEL', 'Cancelar'));
|
|
2372
|
+
if (isConfirmed)
|
|
2373
|
+
window.location.reload();
|
|
2374
|
+
else
|
|
2375
|
+
this.sessionExpiredShown = false;
|
|
2376
|
+
}
|
|
2358
2377
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: DashboardQsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2359
2378
|
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
2379
|
}
|
|
@@ -2368,7 +2387,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.23", ngImpo
|
|
|
2368
2387
|
|
|
2369
2388
|
class DashboardQsInteractiveComponent {
|
|
2370
2389
|
sharedService = inject(Shared);
|
|
2390
|
+
alertService = inject(AlertService);
|
|
2391
|
+
term = inject(TermPipe);
|
|
2371
2392
|
route = inject(ActivatedRoute);
|
|
2393
|
+
sessionExpiredShown = false;
|
|
2372
2394
|
containers;
|
|
2373
2395
|
dashboardIdInput = input(undefined, ...(ngDevMode ? [{ debugName: "dashboardIdInput", alias: 'dashboardId' }] : [{ alias: 'dashboardId' }]));
|
|
2374
2396
|
parametersInput = input(undefined, ...(ngDevMode ? [{ debugName: "parametersInput", alias: 'parameters' }] : [{ alias: 'parameters' }]));
|
|
@@ -2423,6 +2445,8 @@ class DashboardQsInteractiveComponent {
|
|
|
2423
2445
|
dispatchQuicksightEvent(event, this);
|
|
2424
2446
|
if (event.eventName === QuicksightEventName.CONTENT_LOADED || event.eventName === QuicksightEventName.ERROR_OCCURRED || event.eventName === QuicksightEventName.PARAMETERS_CHANGED)
|
|
2425
2447
|
this.isLoading.set(false);
|
|
2448
|
+
if (isQuicksightSessionExpiredEvent(event))
|
|
2449
|
+
this.handleSessionExpired();
|
|
2426
2450
|
},
|
|
2427
2451
|
});
|
|
2428
2452
|
}
|
|
@@ -2431,6 +2455,20 @@ class DashboardQsInteractiveComponent {
|
|
|
2431
2455
|
this.isLoading.set(false);
|
|
2432
2456
|
}
|
|
2433
2457
|
}
|
|
2458
|
+
t(key, fallback) {
|
|
2459
|
+
const value = this.term.transform(key);
|
|
2460
|
+
return value && value !== '-' ? value : fallback;
|
|
2461
|
+
}
|
|
2462
|
+
async handleSessionExpired() {
|
|
2463
|
+
if (this.sessionExpiredShown)
|
|
2464
|
+
return;
|
|
2465
|
+
this.sessionExpiredShown = true;
|
|
2466
|
+
const { isConfirmed } = await this.alertService.confirm(this.t('SESSION_EXPIRED_TITLE', 'Sesión expirada'), this.t('SESSION_EXPIRED_MESSAGE', 'Tu sesión de QuickSight expiró. Actualiza la página para continuar.'), this.t('SESSION_EXPIRED_CONFIRM', 'Actualizar página'), this.t('CANCEL', 'Cancelar'));
|
|
2467
|
+
if (isConfirmed)
|
|
2468
|
+
window.location.reload();
|
|
2469
|
+
else
|
|
2470
|
+
this.sessionExpiredShown = false;
|
|
2471
|
+
}
|
|
2434
2472
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: DashboardQsInteractiveComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2435
2473
|
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
2474
|
}
|