intelica-library-components 1.1.162 → 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
  }
@@ -6292,7 +6317,6 @@ class DashboardQsInteractiveComponent {
6292
6317
  });
6293
6318
  effect(() => {
6294
6319
  const id = this.dashboardId();
6295
- console.log('🟢 firstEmbed effect', { id, viewReady: this.viewReady(), lastEmbeddedId: this.lastEmbeddedId });
6296
6320
  if (!this.viewReady() || !id)
6297
6321
  return;
6298
6322
  if (id === this.lastEmbeddedId)
@@ -6302,12 +6326,11 @@ class DashboardQsInteractiveComponent {
6302
6326
  });
6303
6327
  effect(() => {
6304
6328
  const params = this.parameters();
6305
- console.log('🟠 params effect', { params, hasRef: !!this.dashboardRef });
6306
6329
  if (!this.dashboardRef || !params)
6307
6330
  return;
6331
+ this.isLoading.set(true);
6308
6332
  this.sharedService.setDashboardParameters(this.dashboardRef, params)
6309
- .then(r => console.log('🟠 setParameters OK', r))
6310
- .catch(e => console.error('🟠 setParameters ERR', e));
6333
+ .finally(() => this.isLoading.set(false));
6311
6334
  });
6312
6335
  }
6313
6336
  ngAfterViewInit() {