@sisense/sdk-ui-angular 1.22.0 → 1.23.0

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.
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Component, ViewChild, Input, Output, InjectionToken, Injectable, Inject, NgModule, Optional } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
- import { ComponentAdapter, createElement, BasicMemberFilterTile, createContextProviderRenderer, CustomThemeProvider, CustomSisenseContextProvider, CustomPluginsProvider, createClientApplication, executeQuery, executeQueryByWidgetId, getDashboardModel, getDashboardModels, getWidgetModel, getDefaultThemeSettings, getThemeSettingsByOid, MemberFilterTile, DateRangeFilterTile, CriteriaFilterTile, Chart, Table, PivotTable, TableWidget, DashboardWidget, createWrapperElementHandler, createWrapperElement, DrilldownWidget, createComponentRenderer, ChartWidget, DashboardById, Dashboard, DrilldownBreadcrumbs, ContextMenu } from '@sisense/sdk-ui-preact';
4
+ import { ComponentAdapter, createElement, BasicMemberFilterTile, createContextProviderRenderer, CustomThemeProvider, CustomSisenseContextProvider, CustomPluginsProvider, createClientApplication, executeQuery, executeQueryByWidgetId, getDashboardModel, getDashboardModels, getWidgetModel, getDefaultThemeSettings, getThemeSettingsByOid, MemberFilterTile, DateRangeFilterTile, CriteriaFilterTile, Chart, Table, PivotTable, TableWidget, DashboardWidget, WidgetById, createWrapperElementHandler, createWrapperElement, DrilldownWidget, createComponentRenderer, ChartWidget, DashboardById, Dashboard, DrilldownBreadcrumbs, ContextMenu } from '@sisense/sdk-ui-preact';
5
5
  export { boxWhiskerProcessResult, dashboardHelpers, dashboardModelTranslator, widgetModelTranslator } from '@sisense/sdk-ui-preact';
6
6
  import { __awaiter, __decorate } from 'tslib';
7
7
  import { map, BehaviorSubject } from 'rxjs';
@@ -113,13 +113,15 @@ const createSisenseContextConnector = (sisenseContextService) => {
113
113
  return {
114
114
  app,
115
115
  isInitialized: true,
116
- showRuntimeErrors,
117
116
  tracking: {
118
117
  // if tracking is configured in appConfig, use it
119
118
  // if none is set, default to true
120
119
  enabled: (_b = (_a = appConfig === null || appConfig === void 0 ? void 0 : appConfig.trackingConfig) === null || _a === void 0 ? void 0 : _a.enabled) !== null && _b !== void 0 ? _b : true,
121
120
  packageName: 'sdk-ui-angular',
122
121
  },
122
+ errorBoundary: {
123
+ showErrorBox: showRuntimeErrors !== null && showRuntimeErrors !== void 0 ? showRuntimeErrors : true,
124
+ },
123
125
  };
124
126
  });
125
127
  },
@@ -422,7 +424,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
422
424
  }]
423
425
  }], ctorParameters: function () { return [{ type: SisenseContextService }]; } });
424
426
 
425
- var packageVersion = '1.22.0';
427
+ var packageVersion = '1.23.0';
426
428
 
427
429
  function Trackable(target, propertyKey, descriptor) {
428
430
  const originalMethod = descriptor.value;
@@ -3462,6 +3464,113 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3462
3464
  type: Input
3463
3465
  }] } });
3464
3466
 
3467
+ /**
3468
+ * The `WidgetById` component, which is a thin wrapper on {@link ChartWidgetComponent},
3469
+ * is used to render a widget created in a Sisense Fusion instance.
3470
+ *
3471
+ * To learn more about using Sisense Fusion Widgets in Compose SDK, see
3472
+ * [Sisense Fusion Widgets](https://sisense.dev/guides/sdk/guides/charts/guide-fusion-widgets.html).
3473
+ *
3474
+ * @example
3475
+ * ```html
3476
+ * <csdk-widget-by-id
3477
+ * [widgetOid]="widgetOid"
3478
+ * [dashboardOid]="dashboardOid"
3479
+ * [includeDashboardFilters]="true"
3480
+ * />
3481
+ * ```
3482
+ * ```ts
3483
+ * import { Component } from '@angular/core';
3484
+ *
3485
+ * @Component({
3486
+ * selector: 'app-widgets',
3487
+ * templateUrl: './widgets.component.html',
3488
+ * styleUrls: ['./widgets.component.scss'],
3489
+ * })
3490
+ * export class WidgetsComponent {
3491
+ * widgetOid: string = '60f3e3e3e4b0e3e3e4b0e3e3';
3492
+ * dashboardOid: string = '60f3e3e3e4b0e3e3e4b0e3e3';
3493
+ * }
3494
+ * ```
3495
+ * @group Fusion Assets
3496
+ * @fusionEmbed
3497
+ */
3498
+ class WidgetByIdComponent {
3499
+ constructor(sisenseContextService, themeService) {
3500
+ this.sisenseContextService = sisenseContextService;
3501
+ this.themeService = themeService;
3502
+ this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
3503
+ createSisenseContextConnector(this.sisenseContextService),
3504
+ createThemeContextConnector(this.themeService),
3505
+ ]);
3506
+ }
3507
+ /** @internal */
3508
+ ngAfterViewInit() {
3509
+ this.componentAdapter.render(this.preactRef.nativeElement);
3510
+ }
3511
+ /** @internal */
3512
+ ngOnChanges() {
3513
+ if (this.preactRef) {
3514
+ this.componentAdapter.render(this.preactRef.nativeElement);
3515
+ }
3516
+ }
3517
+ /** @internal */
3518
+ createPreactComponent() {
3519
+ const props = {
3520
+ widgetOid: this.widgetOid,
3521
+ dashboardOid: this.dashboardOid,
3522
+ filters: this.filters,
3523
+ highlights: this.highlights,
3524
+ filtersMergeStrategy: this.filtersMergeStrategy,
3525
+ includeDashboardFilters: this.includeDashboardFilters,
3526
+ title: this.title,
3527
+ description: this.description,
3528
+ styleOptions: this.styleOptions,
3529
+ highlightSelectionDisabled: this.highlightSelectionDisabled,
3530
+ drilldownOptions: this.drilldownOptions,
3531
+ };
3532
+ return createElement(WidgetById, props);
3533
+ }
3534
+ /** @internal */
3535
+ ngOnDestroy() {
3536
+ this.componentAdapter.destroy();
3537
+ }
3538
+ }
3539
+ WidgetByIdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WidgetByIdComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
3540
+ WidgetByIdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: WidgetByIdComponent, selector: "csdk-widget-by-id", inputs: { widgetOid: "widgetOid", dashboardOid: "dashboardOid", filters: "filters", highlights: "highlights", filtersMergeStrategy: "filtersMergeStrategy", includeDashboardFilters: "includeDashboardFilters", title: "title", description: "description", styleOptions: "styleOptions", highlightSelectionDisabled: "highlightSelectionDisabled", drilldownOptions: "drilldownOptions" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
3541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WidgetByIdComponent, decorators: [{
3542
+ type: Component,
3543
+ args: [{
3544
+ selector: 'csdk-widget-by-id',
3545
+ template,
3546
+ }]
3547
+ }], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
3548
+ type: ViewChild,
3549
+ args: [rootId]
3550
+ }], widgetOid: [{
3551
+ type: Input
3552
+ }], dashboardOid: [{
3553
+ type: Input
3554
+ }], filters: [{
3555
+ type: Input
3556
+ }], highlights: [{
3557
+ type: Input
3558
+ }], filtersMergeStrategy: [{
3559
+ type: Input
3560
+ }], includeDashboardFilters: [{
3561
+ type: Input
3562
+ }], title: [{
3563
+ type: Input
3564
+ }], description: [{
3565
+ type: Input
3566
+ }], styleOptions: [{
3567
+ type: Input
3568
+ }], highlightSelectionDisabled: [{
3569
+ type: Input
3570
+ }], drilldownOptions: [{
3571
+ type: Input
3572
+ }] } });
3573
+
3465
3574
  /**
3466
3575
  * An Angular component designed to add drilldown functionality to any type of chart.
3467
3576
  *
@@ -3501,7 +3610,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3501
3610
  * drilldownResult?: CustomDrilldownResult;
3502
3611
  *
3503
3612
  * drilldown = {
3504
- * drilldownDimensions: [DM.Patients.Gender, DM.Admissions.Surgical_Procedure],
3613
+ * drilldownPaths: [DM.Patients.Gender, DM.Admissions.Surgical_Procedure],
3505
3614
  * initialDimension: DM.Divisions.Divison_name,
3506
3615
  * drilldownChange: (drilldownResult: CustomDrilldownResult) => {
3507
3616
  * this.drilldownResult = drilldownResult;
@@ -3515,7 +3624,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3515
3624
  * ```html
3516
3625
  * <!--Component HTML template in .component.html-->
3517
3626
  * <csdk-drilldown-widget
3518
- * [drilldownDimensions]="drilldown.drilldownDimensions"
3627
+ * [drilldownPaths]="drilldown.drilldownPaths"
3519
3628
  * [initialDimension]="drilldown.initialDimension"
3520
3629
  * (drilldownResultChange)="drilldown.drilldownChange($event)"
3521
3630
  * >
@@ -3582,6 +3691,7 @@ class DrilldownWidgetComponent {
3582
3691
  var _a, _b;
3583
3692
  const props = {
3584
3693
  drilldownDimensions: this.drilldownDimensions,
3694
+ drilldownPaths: this.drilldownPaths,
3585
3695
  initialDimension: this.initialDimension,
3586
3696
  config: Object.assign(Object.assign(Object.assign({}, this.config), (((_a = this.config) === null || _a === void 0 ? void 0 : _a.breadcrumbsComponent) && {
3587
3697
  breadcrumbsComponent: createWrapperElementHandler(this.config.breadcrumbsComponent),
@@ -3605,7 +3715,7 @@ class DrilldownWidgetComponent {
3605
3715
  }
3606
3716
  }
3607
3717
  DrilldownWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownWidgetComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
3608
- DrilldownWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DrilldownWidgetComponent, selector: "csdk-drilldown-widget", inputs: { drilldownDimensions: "drilldownDimensions", initialDimension: "initialDimension", config: "config" }, outputs: { drilldownResultChange: "drilldownResultChange" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }, { propertyName: "preactContentRef", first: true, predicate: ["preactContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\">\n <div #preactContent style=\"width: 100%; height: 100%\">\n <ng-content></ng-content>\n </div>\n </div>\n", isInline: true });
3718
+ DrilldownWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DrilldownWidgetComponent, selector: "csdk-drilldown-widget", inputs: { drilldownDimensions: "drilldownDimensions", drilldownPaths: "drilldownPaths", initialDimension: "initialDimension", config: "config" }, outputs: { drilldownResultChange: "drilldownResultChange" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }, { propertyName: "preactContentRef", first: true, predicate: ["preactContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\">\n <div #preactContent style=\"width: 100%; height: 100%\">\n <ng-content></ng-content>\n </div>\n </div>\n", isInline: true });
3609
3719
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownWidgetComponent, decorators: [{
3610
3720
  type: Component,
3611
3721
  args: [{
@@ -3620,6 +3730,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3620
3730
  args: [rootContentId]
3621
3731
  }], drilldownDimensions: [{
3622
3732
  type: Input
3733
+ }], drilldownPaths: [{
3734
+ type: Input
3623
3735
  }], initialDimension: [{
3624
3736
  type: Input
3625
3737
  }], config: [{
@@ -4263,6 +4375,7 @@ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
4263
4375
  SunburstChartComponent,
4264
4376
  TableWidgetComponent,
4265
4377
  DashboardWidgetComponent,
4378
+ WidgetByIdComponent,
4266
4379
  MemberFilterTileComponent,
4267
4380
  DrilldownWidgetComponent,
4268
4381
  DateRangeFilterTileComponent,
@@ -4292,6 +4405,7 @@ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
4292
4405
  SunburstChartComponent,
4293
4406
  TableWidgetComponent,
4294
4407
  DashboardWidgetComponent,
4408
+ WidgetByIdComponent,
4295
4409
  MemberFilterTileComponent,
4296
4410
  DrilldownWidgetComponent,
4297
4411
  DateRangeFilterTileComponent,
@@ -4327,6 +4441,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4327
4441
  SunburstChartComponent,
4328
4442
  TableWidgetComponent,
4329
4443
  DashboardWidgetComponent,
4444
+ WidgetByIdComponent,
4330
4445
  MemberFilterTileComponent,
4331
4446
  DrilldownWidgetComponent,
4332
4447
  DateRangeFilterTileComponent,
@@ -4360,6 +4475,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4360
4475
  SunburstChartComponent,
4361
4476
  TableWidgetComponent,
4362
4477
  DashboardWidgetComponent,
4478
+ WidgetByIdComponent,
4363
4479
  MemberFilterTileComponent,
4364
4480
  DrilldownWidgetComponent,
4365
4481
  DateRangeFilterTileComponent,
@@ -4411,5 +4527,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4411
4527
  * Generated bundle index. Do not edit.
4412
4528
  */
4413
4529
 
4414
- export { AreaChartComponent, AreaRangeChartComponent, AreamapChartComponent, BarChartComponent, BasicMemberFilterTileComponent, BoxplotChartComponent, ChartComponent, ChartWidgetComponent, ColumnChartComponent, ContextMenuComponent, CriteriaFilterTileComponent, DashboardByIdComponent, DashboardComponent, DashboardService, DashboardWidgetComponent, DateRangeFilterTileComponent, DrilldownBreadcrumbsComponent, DrilldownWidgetComponent, FunnelChartComponent, IndicatorChartComponent, LineChartComponent, MemberFilterTileComponent, PieChartComponent, PivotTableComponent, PluginsService, PolarChartComponent, QueryService, SISENSE_CONTEXT_CONFIG_TOKEN, ScatterChartComponent, ScattermapChartComponent, SdkUiModule, SisenseContextService, SunburstChartComponent, THEME_CONFIG_TOKEN, TableComponent, TableWidgetComponent, ThemeService, TreemapChartComponent, WidgetService };
4530
+ export { AreaChartComponent, AreaRangeChartComponent, AreamapChartComponent, BarChartComponent, BasicMemberFilterTileComponent, BoxplotChartComponent, ChartComponent, ChartWidgetComponent, ColumnChartComponent, ContextMenuComponent, CriteriaFilterTileComponent, DashboardByIdComponent, DashboardComponent, DashboardService, DashboardWidgetComponent, DateRangeFilterTileComponent, DrilldownBreadcrumbsComponent, DrilldownWidgetComponent, FunnelChartComponent, IndicatorChartComponent, LineChartComponent, MemberFilterTileComponent, PieChartComponent, PivotTableComponent, PluginsService, PolarChartComponent, QueryService, SISENSE_CONTEXT_CONFIG_TOKEN, ScatterChartComponent, ScattermapChartComponent, SdkUiModule, SisenseContextService, SunburstChartComponent, THEME_CONFIG_TOKEN, TableComponent, TableWidgetComponent, ThemeService, TreemapChartComponent, WidgetByIdComponent, WidgetService };
4415
4531
  //# sourceMappingURL=sisense-sdk-ui-angular.mjs.map