intelica-library-components 1.1.163 → 1.1.164
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.
|
@@ -6205,6 +6205,31 @@ class Shared {
|
|
|
6205
6205
|
onVisualLoaded?.(config.visualId);
|
|
6206
6206
|
}
|
|
6207
6207
|
}
|
|
6208
|
+
async embedSequentialVisualsInteractive(command, configs, onVisualLoaded) {
|
|
6209
|
+
const refs = new Map();
|
|
6210
|
+
const sdkParameters = command.parameters
|
|
6211
|
+
? Object.entries(command.parameters).map(([Name, Values]) => ({ Name, Values }))
|
|
6212
|
+
: undefined;
|
|
6213
|
+
for (const config of configs) {
|
|
6214
|
+
config.container?.nativeElement?.replaceChildren();
|
|
6215
|
+
const { visual } = await firstValueFrom(this.getEmbedVisualUrl({ dashboardId: command.dashboardId, sheetId: command.sheetId, visualId: config.visualId, parameters: {} }));
|
|
6216
|
+
if (!visual)
|
|
6217
|
+
continue;
|
|
6218
|
+
const embeddingContext = await createEmbeddingContext();
|
|
6219
|
+
const visualRef = await embeddingContext.embedVisual({ url: visual.embedUrl, container: config.container.nativeElement }, { scaleToContainer: true, fitToIframeWidth: false, ...(sdkParameters ? { parameters: sdkParameters } : {}) });
|
|
6220
|
+
refs.set(config.visualId, visualRef);
|
|
6221
|
+
onVisualLoaded?.(config.visualId, visualRef);
|
|
6222
|
+
}
|
|
6223
|
+
return refs;
|
|
6224
|
+
}
|
|
6225
|
+
async setVisualParameters(visual, parameters) {
|
|
6226
|
+
const sdkParameters = Object.entries(parameters).map(([Name, Values]) => ({ Name, Values }));
|
|
6227
|
+
await visual.setParameters(sdkParameters);
|
|
6228
|
+
}
|
|
6229
|
+
async setVisualsParameters(visuals, parameters) {
|
|
6230
|
+
const sdkParameters = Object.entries(parameters).map(([Name, Values]) => ({ Name, Values }));
|
|
6231
|
+
await Promise.all([...visuals].map(v => v.setParameters(sdkParameters)));
|
|
6232
|
+
}
|
|
6208
6233
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: Shared, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6209
6234
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.23", ngImport: i0, type: Shared, providedIn: 'root' });
|
|
6210
6235
|
}
|