intelica-library-ui 0.1.227 → 0.1.230
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/intelica-library-ui.mjs +163 -78
- package/fesm2022/intelica-library-ui.mjs.map +1 -1
- package/lib/components/dashboard-qs/dashboard-qs.component.d.ts +22 -0
- package/lib/dto/embed-dashboard-command.d.ts +4 -0
- package/lib/dto/embed-visual-command.d.ts +5 -0
- package/lib/services/shared.d.ts +16 -8
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, signal, Pipe, Component, HostListener, Directive, EventEmitter, Output, Input, forwardRef, TemplateRef, ContentChild, ContentChildren, ViewChild, PLATFORM_ID, Inject, ChangeDetectorRef, Optional, Host } from '@angular/core';
|
|
2
|
+
import { inject, Injectable, signal, Pipe, Component, HostListener, Directive, EventEmitter, Output, Input, forwardRef, TemplateRef, ContentChild, ContentChildren, ViewChild, PLATFORM_ID, Inject, ChangeDetectorRef, input, computed, output, effect, ViewChildren, Optional, Host } from '@angular/core';
|
|
3
3
|
import { getCookie, Cookies, setCookie } from 'typescript-cookie';
|
|
4
|
-
import { HttpClient, HttpHeaders, HttpResponse
|
|
5
|
-
import { BehaviorSubject, catchError, throwError, from, switchMap, Subject, Subscription, of, tap as tap$1, map
|
|
4
|
+
import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http';
|
|
5
|
+
import { BehaviorSubject, catchError, throwError, from, switchMap, Subject, Subscription, firstValueFrom, of, tap as tap$1, map } from 'rxjs';
|
|
6
6
|
import Swal from 'sweetalert2';
|
|
7
7
|
import { tap } from 'rxjs/operators';
|
|
8
8
|
import * as i1 from '@angular/common';
|
|
@@ -46,11 +46,15 @@ import { DropdownModule } from 'primeng/dropdown';
|
|
|
46
46
|
import { OverlayPanelModule } from 'primeng/overlaypanel';
|
|
47
47
|
import * as i4$2 from 'primeng/accordion';
|
|
48
48
|
import { AccordionModule } from 'primeng/accordion';
|
|
49
|
+
import { ActivatedRoute } from '@angular/router';
|
|
50
|
+
import { createEmbeddingContext } from 'amazon-quicksight-embedding-sdk';
|
|
51
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
52
|
+
import * as i2$4 from 'primeng/panel';
|
|
53
|
+
import { PanelModule } from 'primeng/panel';
|
|
49
54
|
import * as XLSX from 'xlsx';
|
|
50
55
|
import { Workbook } from 'exceljs';
|
|
51
56
|
import { saveAs } from 'file-saver';
|
|
52
57
|
import pako from 'pako';
|
|
53
|
-
import { createEmbeddingContext } from 'amazon-quicksight-embedding-sdk';
|
|
54
58
|
import JSEncrypt from 'jsencrypt';
|
|
55
59
|
import Aura from '@primeng/themes/aura';
|
|
56
60
|
import { definePreset } from '@primeng/themes';
|
|
@@ -6638,6 +6642,160 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
6638
6642
|
type: Output
|
|
6639
6643
|
}] } });
|
|
6640
6644
|
|
|
6645
|
+
class Shared {
|
|
6646
|
+
http = inject(HttpClient);
|
|
6647
|
+
configService = inject(ConfigService);
|
|
6648
|
+
path = `${this.configService.environment?.sharedPath}/Quicksight`;
|
|
6649
|
+
getEmbedUrl(command) {
|
|
6650
|
+
return this.http.post(`${this.path}/embed-url`, command);
|
|
6651
|
+
}
|
|
6652
|
+
getEmbedVisualUrl(command) {
|
|
6653
|
+
return this.http.post(`${this.path}/embed-visual-url`, command);
|
|
6654
|
+
}
|
|
6655
|
+
getEmbedVisualUrlsAnonymous(command) {
|
|
6656
|
+
return this.http.post(`${this.path}/embed-visual-anonymous`, command);
|
|
6657
|
+
}
|
|
6658
|
+
async createEmbedContext(embedUrl, container, options) {
|
|
6659
|
+
const embeddingContext = await createEmbeddingContext();
|
|
6660
|
+
await embeddingContext.embedDashboard({
|
|
6661
|
+
url: embedUrl,
|
|
6662
|
+
container,
|
|
6663
|
+
...(options?.height && { height: options.height }),
|
|
6664
|
+
...(options?.width && { width: options.width }),
|
|
6665
|
+
});
|
|
6666
|
+
}
|
|
6667
|
+
async embedDashboard(command, container, options) {
|
|
6668
|
+
container.replaceChildren();
|
|
6669
|
+
const embedUrl = await firstValueFrom(this.getEmbedUrl(command));
|
|
6670
|
+
await this.createEmbedContext(embedUrl, container, options);
|
|
6671
|
+
}
|
|
6672
|
+
async embedDashboardInteractive(command, container, options) {
|
|
6673
|
+
container.replaceChildren();
|
|
6674
|
+
const embedUrl = await firstValueFrom(this.getEmbedUrl({ ...command, parameters: undefined }));
|
|
6675
|
+
const embeddingContext = await createEmbeddingContext();
|
|
6676
|
+
const sdkParameters = command.parameters
|
|
6677
|
+
? Object.entries(command.parameters).map(([Name, Values]) => ({ Name, Values }))
|
|
6678
|
+
: undefined;
|
|
6679
|
+
return await embeddingContext.embedDashboard({
|
|
6680
|
+
url: embedUrl,
|
|
6681
|
+
container,
|
|
6682
|
+
...(options?.height && { height: options.height }),
|
|
6683
|
+
...(options?.width && { width: options.width }),
|
|
6684
|
+
}, sdkParameters ? { parameters: sdkParameters } : undefined);
|
|
6685
|
+
}
|
|
6686
|
+
async setDashboardParameters(dashboard, parameters) {
|
|
6687
|
+
const sdkParameters = Object.entries(parameters).map(([Name, Values]) => ({ Name, Values }));
|
|
6688
|
+
await dashboard.setParameters(sdkParameters);
|
|
6689
|
+
}
|
|
6690
|
+
async createEmbedVisualContext(embedUrl, container, options) {
|
|
6691
|
+
const embeddingContext = await createEmbeddingContext();
|
|
6692
|
+
await embeddingContext.embedVisual({
|
|
6693
|
+
url: embedUrl,
|
|
6694
|
+
container,
|
|
6695
|
+
...(options?.height && { height: options.height }),
|
|
6696
|
+
...(options?.width && { width: options.width }),
|
|
6697
|
+
}, { scaleToContainer: true, fitToIframeWidth: false });
|
|
6698
|
+
}
|
|
6699
|
+
async embedSequentialVisuals(command, configs, onVisualLoaded) {
|
|
6700
|
+
for (const config of configs) {
|
|
6701
|
+
config.container?.nativeElement?.replaceChildren();
|
|
6702
|
+
const { visual } = await firstValueFrom(this.getEmbedVisualUrl({ dashboardId: command.dashboardId, sheetId: command.sheetId, visualId: config.visualId, parameters: command.parameters }));
|
|
6703
|
+
if (!visual)
|
|
6704
|
+
continue;
|
|
6705
|
+
await this.createEmbedVisualContext(visual.embedUrl, config.container.nativeElement);
|
|
6706
|
+
onVisualLoaded?.(config.visualId);
|
|
6707
|
+
}
|
|
6708
|
+
}
|
|
6709
|
+
async embedSequentialVisualsInteractive(command, configs, onVisualLoaded) {
|
|
6710
|
+
const refs = new Map();
|
|
6711
|
+
const sdkParameters = command.parameters
|
|
6712
|
+
? Object.entries(command.parameters).map(([Name, Values]) => ({ Name, Values }))
|
|
6713
|
+
: undefined;
|
|
6714
|
+
for (const config of configs) {
|
|
6715
|
+
config.container?.nativeElement?.replaceChildren();
|
|
6716
|
+
const { visual } = await firstValueFrom(this.getEmbedVisualUrl({ dashboardId: command.dashboardId, sheetId: command.sheetId, visualId: config.visualId, parameters: {} }));
|
|
6717
|
+
if (!visual)
|
|
6718
|
+
continue;
|
|
6719
|
+
const embeddingContext = await createEmbeddingContext();
|
|
6720
|
+
const visualRef = await embeddingContext.embedVisual({ url: visual.embedUrl, container: config.container.nativeElement }, { scaleToContainer: true, fitToIframeWidth: false, ...(sdkParameters ? { parameters: sdkParameters } : {}) });
|
|
6721
|
+
refs.set(config.visualId, visualRef);
|
|
6722
|
+
onVisualLoaded?.(config.visualId, visualRef);
|
|
6723
|
+
}
|
|
6724
|
+
return refs;
|
|
6725
|
+
}
|
|
6726
|
+
async setVisualParameters(visual, parameters) {
|
|
6727
|
+
const sdkParameters = Object.entries(parameters).map(([Name, Values]) => ({ Name, Values }));
|
|
6728
|
+
await visual.setParameters(sdkParameters);
|
|
6729
|
+
}
|
|
6730
|
+
async setVisualsParameters(visuals, parameters) {
|
|
6731
|
+
const sdkParameters = Object.entries(parameters).map(([Name, Values]) => ({ Name, Values }));
|
|
6732
|
+
await Promise.all([...visuals].map(v => v.setParameters(sdkParameters)));
|
|
6733
|
+
}
|
|
6734
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: Shared, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6735
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: Shared, providedIn: 'root' });
|
|
6736
|
+
}
|
|
6737
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: Shared, decorators: [{
|
|
6738
|
+
type: Injectable,
|
|
6739
|
+
args: [{
|
|
6740
|
+
providedIn: 'root',
|
|
6741
|
+
}]
|
|
6742
|
+
}] });
|
|
6743
|
+
|
|
6744
|
+
class DashboardQsComponent {
|
|
6745
|
+
sharedService = inject(Shared);
|
|
6746
|
+
route = inject(ActivatedRoute);
|
|
6747
|
+
containers;
|
|
6748
|
+
dashboardIdInput = input(undefined, { alias: 'dashboardId' });
|
|
6749
|
+
parametersInput = input(undefined, { alias: 'parameters' });
|
|
6750
|
+
heightInput = input(undefined, { alias: 'height' });
|
|
6751
|
+
routeData = toSignal(this.route.data, { initialValue: this.route.snapshot.data });
|
|
6752
|
+
dashboardId = computed(() => this.dashboardIdInput() ?? this.routeData()['dashboardId']);
|
|
6753
|
+
parameters = computed(() => this.parametersInput() ?? this.routeData()['parameters']);
|
|
6754
|
+
height = computed(() => this.heightInput() ?? this.routeData()['height']);
|
|
6755
|
+
isLoading = signal(true);
|
|
6756
|
+
isLoadingChange = output();
|
|
6757
|
+
viewReady = signal(false);
|
|
6758
|
+
constructor() {
|
|
6759
|
+
effect(() => {
|
|
6760
|
+
this.isLoadingChange.emit(this.isLoading());
|
|
6761
|
+
});
|
|
6762
|
+
effect(() => {
|
|
6763
|
+
const id = this.dashboardId();
|
|
6764
|
+
const parameters = this.parameters();
|
|
6765
|
+
if (!this.viewReady() || !id)
|
|
6766
|
+
return;
|
|
6767
|
+
this.EmbedDashboard(id, parameters);
|
|
6768
|
+
});
|
|
6769
|
+
}
|
|
6770
|
+
ngAfterViewInit() {
|
|
6771
|
+
this.viewReady.set(true);
|
|
6772
|
+
}
|
|
6773
|
+
async EmbedDashboard(dashboardId, parameters) {
|
|
6774
|
+
const container = this.containers.first?.nativeElement;
|
|
6775
|
+
if (!container)
|
|
6776
|
+
return;
|
|
6777
|
+
this.isLoading.set(true);
|
|
6778
|
+
try {
|
|
6779
|
+
await this.sharedService.embedDashboard({ dashboardId, parameters }, container, { height: this.height() ?? `${window.innerHeight - 50}px` });
|
|
6780
|
+
}
|
|
6781
|
+
catch (error) {
|
|
6782
|
+
console.error('Error embedding dashboard:', error);
|
|
6783
|
+
}
|
|
6784
|
+
finally {
|
|
6785
|
+
this.isLoading.set(false);
|
|
6786
|
+
}
|
|
6787
|
+
}
|
|
6788
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: DashboardQsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6789
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", 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" }, viewQueries: [{ propertyName: "containers", predicate: ["visualContainer"], descendants: true }], ngImport: i0, template: "@if (isLoading()) {\r\n<div class=\"u-display-flex u-flex-column u-gap-sm\">\r\n <div class=\"u-display-flex u-background-white u-px-1 u-pt-1\">\r\n <div class=\"u-display-flex u-flex-column u-px-1\" style=\"height: 33px\">\r\n <p-skeleton class=\"prSkeleton u-m-auto\" [width]=\"'61px'\" [height]=\"'14px'\" />\r\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'2px'\" />\r\n </div>\r\n <div class=\"u-display-flex u-flex-column u-px-1\" style=\"height: 33px\">\r\n <p-skeleton class=\"prSkeleton u-m-auto\" [width]=\"'61px'\" [height]=\"'14px'\" />\r\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'2px'\" />\r\n </div>\r\n </div>\r\n <div class=\"u-display-flex u-flex-column u-gap-sm\">\r\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\r\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" [style]=\"{ 'aspect-ratio': '1061.57 / 93.02' }\" />\r\n </p-panel>\r\n </div>\r\n <div class=\"u-display-flex u-flex-row u-gap-sm\">\r\n @for (_ of [].constructor(4); track $index) {\r\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\r\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" [style]=\"{ 'aspect-ratio': '244.87 / 123.12' }\" />\r\n </p-panel>\r\n }\r\n </div>\r\n <div class=\"u-display-flex u-flex-column u-gap-sm\">\r\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\r\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" [style]=\"{ 'aspect-ratio': '1061.57 / 303.7' }\" />\r\n </p-panel>\r\n </div>\r\n <div class=\"u-display-flex u-flex-row u-gap-sm\">\r\n @for (_ of [].constructor(2); track $index) {\r\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\r\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" [style]=\"{ 'aspect-ratio': '517.1 / 123.12' }\" />\r\n </p-panel>\r\n }\r\n </div>\r\n</div>\r\n}\r\n<div #visualContainer [style.height]=\"height()\" [hidden]=\"isLoading()\"></div>", dependencies: [{ kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2$3.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: PanelModule }, { kind: "component", type: i2$4.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }] });
|
|
6790
|
+
}
|
|
6791
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: DashboardQsComponent, decorators: [{
|
|
6792
|
+
type: Component,
|
|
6793
|
+
args: [{ selector: 'intelica-dashboard-qs', imports: [SkeletonModule, PanelModule], template: "@if (isLoading()) {\r\n<div class=\"u-display-flex u-flex-column u-gap-sm\">\r\n <div class=\"u-display-flex u-background-white u-px-1 u-pt-1\">\r\n <div class=\"u-display-flex u-flex-column u-px-1\" style=\"height: 33px\">\r\n <p-skeleton class=\"prSkeleton u-m-auto\" [width]=\"'61px'\" [height]=\"'14px'\" />\r\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'2px'\" />\r\n </div>\r\n <div class=\"u-display-flex u-flex-column u-px-1\" style=\"height: 33px\">\r\n <p-skeleton class=\"prSkeleton u-m-auto\" [width]=\"'61px'\" [height]=\"'14px'\" />\r\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'2px'\" />\r\n </div>\r\n </div>\r\n <div class=\"u-display-flex u-flex-column u-gap-sm\">\r\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\r\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" [style]=\"{ 'aspect-ratio': '1061.57 / 93.02' }\" />\r\n </p-panel>\r\n </div>\r\n <div class=\"u-display-flex u-flex-row u-gap-sm\">\r\n @for (_ of [].constructor(4); track $index) {\r\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\r\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" [style]=\"{ 'aspect-ratio': '244.87 / 123.12' }\" />\r\n </p-panel>\r\n }\r\n </div>\r\n <div class=\"u-display-flex u-flex-column u-gap-sm\">\r\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\r\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" [style]=\"{ 'aspect-ratio': '1061.57 / 303.7' }\" />\r\n </p-panel>\r\n </div>\r\n <div class=\"u-display-flex u-flex-row u-gap-sm\">\r\n @for (_ of [].constructor(2); track $index) {\r\n <p-panel class=\"prPanel u-flex-grow-1 u-flex-basis-0 u-shadow-none\" showHeader=\"false\">\r\n <p-skeleton class=\"prSkeleton\" [width]=\"'100%'\" [height]=\"'100%'\" [style]=\"{ 'aspect-ratio': '517.1 / 123.12' }\" />\r\n </p-panel>\r\n }\r\n </div>\r\n</div>\r\n}\r\n<div #visualContainer [style.height]=\"height()\" [hidden]=\"isLoading()\"></div>" }]
|
|
6794
|
+
}], ctorParameters: () => [], propDecorators: { containers: [{
|
|
6795
|
+
type: ViewChildren,
|
|
6796
|
+
args: ['visualContainer']
|
|
6797
|
+
}] } });
|
|
6798
|
+
|
|
6641
6799
|
class CheckboxFilterDirective extends FilterDirective {
|
|
6642
6800
|
constructor() {
|
|
6643
6801
|
super(FilterTypeEnum.Checkbox);
|
|
@@ -8164,79 +8322,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
8164
8322
|
args: [{ providedIn: "root" }]
|
|
8165
8323
|
}] });
|
|
8166
8324
|
|
|
8167
|
-
class Shared {
|
|
8168
|
-
http = inject(HttpClient);
|
|
8169
|
-
configService = inject(ConfigService);
|
|
8170
|
-
path = `${this.configService.environment?.sharedPath}/Quicksight`;
|
|
8171
|
-
getEmbedUrl(dashboardId) {
|
|
8172
|
-
return this.http.get(`${this.path}/embed-url/${dashboardId}`);
|
|
8173
|
-
}
|
|
8174
|
-
getEmbedVisualUrl(request) {
|
|
8175
|
-
let params = new HttpParams()
|
|
8176
|
-
.set('dashboardId', request.dashboardId)
|
|
8177
|
-
.set('sheetId', request.sheetId)
|
|
8178
|
-
.set('visualId', request.visualId);
|
|
8179
|
-
Object.entries(request.parameters).forEach(([key, values]) => {
|
|
8180
|
-
values.forEach(value => {
|
|
8181
|
-
params = params.append(`parameters[${key}]`, value);
|
|
8182
|
-
});
|
|
8183
|
-
});
|
|
8184
|
-
return this.http.get(`${this.path}/embed-visual-url`, { params });
|
|
8185
|
-
}
|
|
8186
|
-
getEmbedVisualUrlsAnonymous(request) {
|
|
8187
|
-
let params = new HttpParams()
|
|
8188
|
-
.set('dashboardId', request.dashboardId)
|
|
8189
|
-
.set('sheetId', request.sheetId)
|
|
8190
|
-
.set('visualId', request.visualId);
|
|
8191
|
-
Object.entries(request.parameters).forEach(([key, values]) => {
|
|
8192
|
-
values.forEach(value => {
|
|
8193
|
-
params = params.append(`parameters[${key}]`, value);
|
|
8194
|
-
});
|
|
8195
|
-
});
|
|
8196
|
-
return this.http.get(`${this.path}/embed-visual-anonymous`, { params });
|
|
8197
|
-
}
|
|
8198
|
-
async createEmbedContext(embedUrl, container, options) {
|
|
8199
|
-
const embeddingContext = await createEmbeddingContext();
|
|
8200
|
-
await embeddingContext.embedDashboard({
|
|
8201
|
-
url: embedUrl,
|
|
8202
|
-
container,
|
|
8203
|
-
...(options?.height && { height: options.height }),
|
|
8204
|
-
...(options?.width && { width: options.width }),
|
|
8205
|
-
});
|
|
8206
|
-
}
|
|
8207
|
-
async embedDashboard(dashboardId, container, options) {
|
|
8208
|
-
const { embedUrl } = await firstValueFrom(this.getEmbedUrl(dashboardId));
|
|
8209
|
-
await this.createEmbedContext(embedUrl, container, options);
|
|
8210
|
-
}
|
|
8211
|
-
async createEmbedVisualContext(embedUrl, container, options) {
|
|
8212
|
-
const embeddingContext = await createEmbeddingContext();
|
|
8213
|
-
await embeddingContext.embedVisual({
|
|
8214
|
-
url: embedUrl,
|
|
8215
|
-
container,
|
|
8216
|
-
...(options?.height && { height: options.height }),
|
|
8217
|
-
...(options?.width && { width: options.width }),
|
|
8218
|
-
}, { scaleToContainer: true, fitToIframeWidth: false });
|
|
8219
|
-
}
|
|
8220
|
-
async embedSequentialVisuals(dashboardId, sheetId, parameters, configs, onVisualLoaded) {
|
|
8221
|
-
for (const config of configs) {
|
|
8222
|
-
config.container?.nativeElement?.replaceChildren();
|
|
8223
|
-
const { visual } = await firstValueFrom(this.getEmbedVisualUrl({ dashboardId, sheetId, visualId: config.visualId, parameters }));
|
|
8224
|
-
if (!visual)
|
|
8225
|
-
continue;
|
|
8226
|
-
await this.createEmbedVisualContext(visual.embedUrl, config.container.nativeElement);
|
|
8227
|
-
onVisualLoaded?.(config.visualId);
|
|
8228
|
-
}
|
|
8229
|
-
}
|
|
8230
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: Shared, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8231
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: Shared, providedIn: 'root' });
|
|
8232
|
-
}
|
|
8233
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: Shared, decorators: [{
|
|
8234
|
-
type: Injectable,
|
|
8235
|
-
args: [{
|
|
8236
|
-
providedIn: 'root',
|
|
8237
|
-
}]
|
|
8238
|
-
}] });
|
|
8239
|
-
|
|
8240
8325
|
/**
|
|
8241
8326
|
* Función de comparación genérica para ordenar objetos por un campo específico.
|
|
8242
8327
|
*
|
|
@@ -10634,5 +10719,5 @@ const IntelicaTheme = definePreset(Aura, {
|
|
|
10634
10719
|
* Generated bundle index. Do not edit.
|
|
10635
10720
|
*/
|
|
10636
10721
|
|
|
10637
|
-
export { ActionDirective, ActionsMenuComponent, ButtonSplitComponent, CheckboxFilterDirective, Color, ColumnComponent, ColumnGroupComponent, CompareByField, CompressService, ConfigService, CookieAttributesGeneral, DataDirective, DateFilterDirective, DateModeOptions, DynamicInputValidation, EchartComponent, EchartService, ElementService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, FilterChipsComponent, FiltersComponent, FormatAmountPipe, GetCookieAttributes, GlobalFeatureFlagService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaCellCheckboxDirective, IntelicaTheme, ItemSplitDirective, LanguageService, MatrixColumnComponent, MatrixColumnGroupComponent, MatrixTableComponent, ModalDialogComponent, MultiSelectComponent, OrderConstants, PaginatorComponent, Patterns, PopoverComponent, RecordPerPageComponent, RefreshTokenInterceptor, ResponseHeadersInterceptor, RouteGuard, RowResumenComponent, RowResumenTreeComponent, SearchComponent, SelectDetailFilterDirective, SelectFilterDirective, Shared, SharedService, SkeletonChartComponent, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TableFetchComponent, TableSortOrder, TemplateDirective, TemplateMenuComponent, TermGuard, TermPipe, TermService, TextAreaFilterDirective, TextFilterDirective, TextRangeFilterDirective, TitlesComponent, TreeColumnComponent, TreeColumnGroupComponent, TreeTableComponent, TreeTableFetchComponent, TruncatePipe, decryptData, encryptData, getColor };
|
|
10722
|
+
export { ActionDirective, ActionsMenuComponent, ButtonSplitComponent, CheckboxFilterDirective, Color, ColumnComponent, ColumnGroupComponent, CompareByField, CompressService, ConfigService, CookieAttributesGeneral, DashboardQsComponent, DataDirective, DateFilterDirective, DateModeOptions, DynamicInputValidation, EchartComponent, EchartService, ElementService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, FilterChipsComponent, FiltersComponent, FormatAmountPipe, GetCookieAttributes, GlobalFeatureFlagService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaCellCheckboxDirective, IntelicaTheme, ItemSplitDirective, LanguageService, MatrixColumnComponent, MatrixColumnGroupComponent, MatrixTableComponent, ModalDialogComponent, MultiSelectComponent, OrderConstants, PaginatorComponent, Patterns, PopoverComponent, RecordPerPageComponent, RefreshTokenInterceptor, ResponseHeadersInterceptor, RouteGuard, RowResumenComponent, RowResumenTreeComponent, SearchComponent, SelectDetailFilterDirective, SelectFilterDirective, Shared, SharedService, SkeletonChartComponent, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TableFetchComponent, TableSortOrder, TemplateDirective, TemplateMenuComponent, TermGuard, TermPipe, TermService, TextAreaFilterDirective, TextFilterDirective, TextRangeFilterDirective, TitlesComponent, TreeColumnComponent, TreeColumnGroupComponent, TreeTableComponent, TreeTableFetchComponent, TruncatePipe, decryptData, encryptData, getColor };
|
|
10638
10723
|
//# sourceMappingURL=intelica-library-ui.mjs.map
|