@sisense/sdk-ui-angular 1.13.0 → 1.15.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.
- package/dist/esm2020/lib/components/dashboard/dashboard-by-id.component.mjs +101 -0
- package/dist/esm2020/lib/components/dashboard/dashboard.component.mjs +129 -0
- package/dist/esm2020/lib/components/dashboard/index.mjs +3 -0
- package/dist/esm2020/lib/components/index.mjs +2 -1
- package/dist/esm2020/lib/decorators/trackable.decorator.mjs +2 -2
- package/dist/esm2020/lib/sdk-ui-core-exports.mjs +1 -1
- package/dist/esm2020/lib/sdk-ui.module.mjs +12 -4
- package/dist/esm2020/lib/services/theme.service.mjs +3 -1
- package/dist/esm2020/version.mjs +2 -2
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs +232 -6
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs +232 -6
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/lib/components/dashboard/dashboard-by-id.component.d.ts +87 -0
- package/dist/lib/components/dashboard/dashboard.component.d.ts +120 -0
- package/dist/lib/components/dashboard/index.d.ts +2 -0
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/sdk-ui-core-exports.d.ts +1 -1
- package/dist/lib/sdk-ui.module.d.ts +5 -3
- package/dist/lib/services/theme.service.d.ts +2 -0
- package/dist/package.json +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +4 -4
|
@@ -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, createClientApplication, executeQuery, executeQueryByWidgetId, getDashboardModel, getDashboardModels, getWidgetModel, getDefaultThemeSettings, getThemeSettingsByOid, MemberFilterTile, DateRangeFilterTile, Chart, Table, PivotTable, TableWidget, DashboardWidget, createWrapperElementHandler, createWrapperElement, DrilldownWidget, createComponentRenderer, ChartWidget, DrilldownBreadcrumbs, ContextMenu } from '@sisense/sdk-ui-preact';
|
|
4
|
+
import { ComponentAdapter, createElement, BasicMemberFilterTile, createContextProviderRenderer, CustomThemeProvider, CustomSisenseContextProvider, createClientApplication, executeQuery, executeQueryByWidgetId, getDashboardModel, getDashboardModels, getWidgetModel, getDefaultThemeSettings, getThemeSettingsByOid, MemberFilterTile, DateRangeFilterTile, Chart, Table, PivotTable, TableWidget, DashboardWidget, createWrapperElementHandler, createWrapperElement, DrilldownWidget, createComponentRenderer, ChartWidget, DashboardById, Dashboard, DrilldownBreadcrumbs, ContextMenu } from '@sisense/sdk-ui-preact';
|
|
5
5
|
export { boxWhiskerProcessResult } from '@sisense/sdk-ui-preact';
|
|
6
6
|
import { map, BehaviorSubject } from 'rxjs';
|
|
7
7
|
import { __decorate } from 'tslib';
|
|
@@ -340,7 +340,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
340
340
|
}]
|
|
341
341
|
}], ctorParameters: function () { return [{ type: SisenseContextService }]; } });
|
|
342
342
|
|
|
343
|
-
var packageVersion = '1.
|
|
343
|
+
var packageVersion = '1.15.0';
|
|
344
344
|
|
|
345
345
|
function Trackable(target, propertyKey, descriptor) {
|
|
346
346
|
const originalMethod = descriptor.value;
|
|
@@ -373,7 +373,7 @@ async function track(action, methodName) {
|
|
|
373
373
|
packageVersion,
|
|
374
374
|
methodName,
|
|
375
375
|
};
|
|
376
|
-
void trackProductEvent(action, payload, app.httpClient, !enableTracking)
|
|
376
|
+
void trackProductEvent(action, payload, app.httpClient, !enableTracking);
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
catch (e) {
|
|
@@ -419,6 +419,8 @@ const THEME_CONFIG_TOKEN = new InjectionToken('theme configuration');
|
|
|
419
419
|
/**
|
|
420
420
|
* Service for working with Sisense Fusion themes.
|
|
421
421
|
*
|
|
422
|
+
* If no theme service is used, the current Fusion theme is applied by default.
|
|
423
|
+
*
|
|
422
424
|
* @group Contexts
|
|
423
425
|
*/
|
|
424
426
|
let ThemeService = class ThemeService {
|
|
@@ -3531,6 +3533,222 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3531
3533
|
type: Output
|
|
3532
3534
|
}] } });
|
|
3533
3535
|
|
|
3536
|
+
/**
|
|
3537
|
+
* An Angular component used for easily rendering a dashboard by its ID created in a Sisense Fusion instance.
|
|
3538
|
+
*
|
|
3539
|
+
* @example
|
|
3540
|
+
* ```html
|
|
3541
|
+
* <csdk-dashboard-by-id
|
|
3542
|
+
* [dashboardOid]="dashboardOid"
|
|
3543
|
+
* />
|
|
3544
|
+
* ```
|
|
3545
|
+
* ```ts
|
|
3546
|
+
* import { Component } from '@angular/core';
|
|
3547
|
+
*
|
|
3548
|
+
* @Component({
|
|
3549
|
+
* selector: 'app-dashboard',
|
|
3550
|
+
* templateUrl: './dashboard.component.html',
|
|
3551
|
+
* styleUrls: ['./dashboard.component.scss'],
|
|
3552
|
+
* })
|
|
3553
|
+
* export class DashboardComponent {
|
|
3554
|
+
* dashboardOid: string = '60f3e3e3e4b0e3e3e4b0e3e3';
|
|
3555
|
+
* }
|
|
3556
|
+
* ```
|
|
3557
|
+
* @group Fusion Embed
|
|
3558
|
+
* @fusionEmbed
|
|
3559
|
+
* @internal
|
|
3560
|
+
*/
|
|
3561
|
+
class DashboardByIdComponent {
|
|
3562
|
+
/**
|
|
3563
|
+
* Constructor for the `DashboardById` component.
|
|
3564
|
+
*
|
|
3565
|
+
* @param sisenseContextService - Sisense context service
|
|
3566
|
+
* @param themeService - Theme service
|
|
3567
|
+
*/
|
|
3568
|
+
constructor(
|
|
3569
|
+
/**
|
|
3570
|
+
* Sisense context service
|
|
3571
|
+
*
|
|
3572
|
+
* @category Constructor
|
|
3573
|
+
*/
|
|
3574
|
+
sisenseContextService,
|
|
3575
|
+
/**
|
|
3576
|
+
* Theme service
|
|
3577
|
+
*
|
|
3578
|
+
* @category Constructor
|
|
3579
|
+
*/
|
|
3580
|
+
themeService) {
|
|
3581
|
+
this.sisenseContextService = sisenseContextService;
|
|
3582
|
+
this.themeService = themeService;
|
|
3583
|
+
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
3584
|
+
createSisenseContextConnector(this.sisenseContextService),
|
|
3585
|
+
createThemeContextConnector(this.themeService),
|
|
3586
|
+
]);
|
|
3587
|
+
}
|
|
3588
|
+
/**
|
|
3589
|
+
* @internal
|
|
3590
|
+
*/
|
|
3591
|
+
ngAfterViewInit() {
|
|
3592
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
3593
|
+
}
|
|
3594
|
+
/**
|
|
3595
|
+
* @internal
|
|
3596
|
+
*/
|
|
3597
|
+
ngOnChanges() {
|
|
3598
|
+
if (this.preactRef) {
|
|
3599
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
3600
|
+
}
|
|
3601
|
+
}
|
|
3602
|
+
createPreactComponent() {
|
|
3603
|
+
const props = {
|
|
3604
|
+
dashboardOid: this.dashboardOid,
|
|
3605
|
+
};
|
|
3606
|
+
return createElement(DashboardById, props);
|
|
3607
|
+
}
|
|
3608
|
+
/**
|
|
3609
|
+
* @internal
|
|
3610
|
+
*/
|
|
3611
|
+
ngOnDestroy() {
|
|
3612
|
+
this.componentAdapter.destroy();
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
DashboardByIdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardByIdComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3616
|
+
DashboardByIdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DashboardByIdComponent, selector: "csdk-dashboard-by-id", inputs: { dashboardOid: "dashboardOid" }, 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 });
|
|
3617
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardByIdComponent, decorators: [{
|
|
3618
|
+
type: Component,
|
|
3619
|
+
args: [{
|
|
3620
|
+
selector: 'csdk-dashboard-by-id',
|
|
3621
|
+
template,
|
|
3622
|
+
}]
|
|
3623
|
+
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
3624
|
+
type: ViewChild,
|
|
3625
|
+
args: [rootId]
|
|
3626
|
+
}], dashboardOid: [{
|
|
3627
|
+
type: Input
|
|
3628
|
+
}] } });
|
|
3629
|
+
|
|
3630
|
+
/**
|
|
3631
|
+
* An Angular component used for easily rendering a dashboard.
|
|
3632
|
+
*
|
|
3633
|
+
* @example
|
|
3634
|
+
* ```html
|
|
3635
|
+
* <csdk-dashboard
|
|
3636
|
+
* *ngIf="dashboard"
|
|
3637
|
+
* [title]="dashboard!.title"
|
|
3638
|
+
* [layout]="dashboard!.layout"
|
|
3639
|
+
* [widgets]="dashboard!.widgets"
|
|
3640
|
+
* [filters]="dashboard!.filters"
|
|
3641
|
+
* [defaultDataSource]="dashboard!.dataSource"
|
|
3642
|
+
* [widgetFilterOptions]="dashboard!.widgetFilterOptions"
|
|
3643
|
+
* />
|
|
3644
|
+
* ```
|
|
3645
|
+
* ```ts
|
|
3646
|
+
* import { Component } from '@angular/core';
|
|
3647
|
+
* import { type DashboardModel, DashboardService } from '@sisense/sdk-ui-angular';
|
|
3648
|
+
*
|
|
3649
|
+
* @Component({
|
|
3650
|
+
* selector: 'app-dashboard',
|
|
3651
|
+
* templateUrl: './dashboard.component.html',
|
|
3652
|
+
* styleUrls: ['./dashboard.component.scss'],
|
|
3653
|
+
* })
|
|
3654
|
+
* export class DashboardComponent {
|
|
3655
|
+
*
|
|
3656
|
+
* dashboard: DashboardModel | null = null;
|
|
3657
|
+
*
|
|
3658
|
+
* constructor(private dashboardService: DashboardService) {}
|
|
3659
|
+
*
|
|
3660
|
+
* async ngOnInit(): Promise<void> {
|
|
3661
|
+
* this.dashboard = await this.dashboardService.getDashboardModel('60f3e3e3e4b0e3e3e4b0e3e3', { includeWidgets: true, includeFilters: true });
|
|
3662
|
+
* }
|
|
3663
|
+
* ```
|
|
3664
|
+
* @group Fusion Embed
|
|
3665
|
+
* @fusionEmbed
|
|
3666
|
+
* @internal
|
|
3667
|
+
*/
|
|
3668
|
+
class DashboardComponent {
|
|
3669
|
+
/**
|
|
3670
|
+
* Constructor for the `Dashboard` component.
|
|
3671
|
+
*
|
|
3672
|
+
* @param sisenseContextService - Sisense context service
|
|
3673
|
+
* @param themeService - Theme service
|
|
3674
|
+
*/
|
|
3675
|
+
constructor(
|
|
3676
|
+
/**
|
|
3677
|
+
* Sisense context service
|
|
3678
|
+
*
|
|
3679
|
+
* @category Constructor
|
|
3680
|
+
*/
|
|
3681
|
+
sisenseContextService,
|
|
3682
|
+
/**
|
|
3683
|
+
* Theme service
|
|
3684
|
+
*
|
|
3685
|
+
* @category Constructor
|
|
3686
|
+
*/
|
|
3687
|
+
themeService) {
|
|
3688
|
+
this.sisenseContextService = sisenseContextService;
|
|
3689
|
+
this.themeService = themeService;
|
|
3690
|
+
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
3691
|
+
createSisenseContextConnector(this.sisenseContextService),
|
|
3692
|
+
createThemeContextConnector(this.themeService),
|
|
3693
|
+
]);
|
|
3694
|
+
}
|
|
3695
|
+
/**
|
|
3696
|
+
* @internal
|
|
3697
|
+
*/
|
|
3698
|
+
ngAfterViewInit() {
|
|
3699
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
3700
|
+
}
|
|
3701
|
+
/**
|
|
3702
|
+
* @internal
|
|
3703
|
+
*/
|
|
3704
|
+
ngOnChanges() {
|
|
3705
|
+
if (this.preactRef) {
|
|
3706
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
3707
|
+
}
|
|
3708
|
+
}
|
|
3709
|
+
createPreactComponent() {
|
|
3710
|
+
const props = {
|
|
3711
|
+
title: this.title,
|
|
3712
|
+
layout: this.layout,
|
|
3713
|
+
widgets: this.widgets,
|
|
3714
|
+
filters: this.filters,
|
|
3715
|
+
defaultDataSource: this.defaultDataSource,
|
|
3716
|
+
widgetFilterOptions: this.widgetFilterOptions,
|
|
3717
|
+
};
|
|
3718
|
+
return createElement(Dashboard, props);
|
|
3719
|
+
}
|
|
3720
|
+
/**
|
|
3721
|
+
* @internal
|
|
3722
|
+
*/
|
|
3723
|
+
ngOnDestroy() {
|
|
3724
|
+
this.componentAdapter.destroy();
|
|
3725
|
+
}
|
|
3726
|
+
}
|
|
3727
|
+
DashboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3728
|
+
DashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DashboardComponent, selector: "csdk-dashboard", inputs: { title: "title", layout: "layout", widgets: "widgets", filters: "filters", defaultDataSource: "defaultDataSource", widgetFilterOptions: "widgetFilterOptions" }, 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 });
|
|
3729
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardComponent, decorators: [{
|
|
3730
|
+
type: Component,
|
|
3731
|
+
args: [{
|
|
3732
|
+
selector: 'csdk-dashboard',
|
|
3733
|
+
template,
|
|
3734
|
+
}]
|
|
3735
|
+
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
3736
|
+
type: ViewChild,
|
|
3737
|
+
args: [rootId]
|
|
3738
|
+
}], title: [{
|
|
3739
|
+
type: Input
|
|
3740
|
+
}], layout: [{
|
|
3741
|
+
type: Input
|
|
3742
|
+
}], widgets: [{
|
|
3743
|
+
type: Input
|
|
3744
|
+
}], filters: [{
|
|
3745
|
+
type: Input
|
|
3746
|
+
}], defaultDataSource: [{
|
|
3747
|
+
type: Input
|
|
3748
|
+
}], widgetFilterOptions: [{
|
|
3749
|
+
type: Input
|
|
3750
|
+
}] } });
|
|
3751
|
+
|
|
3534
3752
|
/**
|
|
3535
3753
|
* Drilldown Breadcrumbs Component
|
|
3536
3754
|
*
|
|
@@ -3770,7 +3988,9 @@ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
|
|
|
3770
3988
|
BoxplotChartComponent,
|
|
3771
3989
|
ScattermapChartComponent,
|
|
3772
3990
|
AreamapChartComponent,
|
|
3773
|
-
PivotTableComponent
|
|
3991
|
+
PivotTableComponent,
|
|
3992
|
+
DashboardByIdComponent,
|
|
3993
|
+
DashboardComponent], imports: [CommonModule, DecoratorsModule], exports: [BasicMemberFilterTileComponent,
|
|
3774
3994
|
ChartComponent,
|
|
3775
3995
|
TableComponent,
|
|
3776
3996
|
ChartWidgetComponent,
|
|
@@ -3796,7 +4016,9 @@ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
|
|
|
3796
4016
|
BoxplotChartComponent,
|
|
3797
4017
|
ScattermapChartComponent,
|
|
3798
4018
|
AreamapChartComponent,
|
|
3799
|
-
PivotTableComponent
|
|
4019
|
+
PivotTableComponent,
|
|
4020
|
+
DashboardByIdComponent,
|
|
4021
|
+
DashboardComponent] });
|
|
3800
4022
|
SdkUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdkUiModule, imports: [CommonModule, DecoratorsModule] });
|
|
3801
4023
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdkUiModule, decorators: [{
|
|
3802
4024
|
type: NgModule,
|
|
@@ -3829,6 +4051,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3829
4051
|
ScattermapChartComponent,
|
|
3830
4052
|
AreamapChartComponent,
|
|
3831
4053
|
PivotTableComponent,
|
|
4054
|
+
DashboardByIdComponent,
|
|
4055
|
+
DashboardComponent,
|
|
3832
4056
|
],
|
|
3833
4057
|
imports: [CommonModule, DecoratorsModule],
|
|
3834
4058
|
exports: [
|
|
@@ -3859,6 +4083,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3859
4083
|
ScattermapChartComponent,
|
|
3860
4084
|
AreamapChartComponent,
|
|
3861
4085
|
PivotTableComponent,
|
|
4086
|
+
DashboardByIdComponent,
|
|
4087
|
+
DashboardComponent,
|
|
3862
4088
|
],
|
|
3863
4089
|
providers: [],
|
|
3864
4090
|
}]
|
|
@@ -3898,5 +4124,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3898
4124
|
* Generated bundle index. Do not edit.
|
|
3899
4125
|
*/
|
|
3900
4126
|
|
|
3901
|
-
export { AreaChartComponent, AreaRangeChartComponent, AreamapChartComponent, BarChartComponent, BasicMemberFilterTileComponent, BoxplotChartComponent, ChartComponent, ChartWidgetComponent, ColumnChartComponent, ContextMenuComponent, DashboardService, DashboardWidgetComponent, DateRangeFilterTileComponent, DrilldownBreadcrumbsComponent, DrilldownWidgetComponent, FunnelChartComponent, IndicatorChartComponent, LineChartComponent, MemberFilterTileComponent, PieChartComponent, PivotTableComponent, PolarChartComponent, QueryService, SISENSE_CONTEXT_CONFIG_TOKEN, ScatterChartComponent, ScattermapChartComponent, SdkUiModule, SisenseContextService, SunburstChartComponent, THEME_CONFIG_TOKEN, TableComponent, TableWidgetComponent, ThemeService, TreemapChartComponent, WidgetService };
|
|
4127
|
+
export { AreaChartComponent, AreaRangeChartComponent, AreamapChartComponent, BarChartComponent, BasicMemberFilterTileComponent, BoxplotChartComponent, ChartComponent, ChartWidgetComponent, ColumnChartComponent, ContextMenuComponent, DashboardByIdComponent, DashboardComponent, DashboardService, DashboardWidgetComponent, DateRangeFilterTileComponent, DrilldownBreadcrumbsComponent, DrilldownWidgetComponent, FunnelChartComponent, IndicatorChartComponent, LineChartComponent, MemberFilterTileComponent, PieChartComponent, PivotTableComponent, PolarChartComponent, QueryService, SISENSE_CONTEXT_CONFIG_TOKEN, ScatterChartComponent, ScattermapChartComponent, SdkUiModule, SisenseContextService, SunburstChartComponent, THEME_CONFIG_TOKEN, TableComponent, TableWidgetComponent, ThemeService, TreemapChartComponent, WidgetService };
|
|
3902
4128
|
//# sourceMappingURL=sisense-sdk-ui-angular.mjs.map
|