@sisense/sdk-ui-angular 1.13.0 → 1.14.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 { __awaiter, __decorate } from 'tslib';
|
|
7
7
|
import { map, BehaviorSubject } from 'rxjs';
|
|
@@ -347,7 +347,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
347
347
|
}]
|
|
348
348
|
}], ctorParameters: function () { return [{ type: SisenseContextService }]; } });
|
|
349
349
|
|
|
350
|
-
var packageVersion = '1.
|
|
350
|
+
var packageVersion = '1.14.0';
|
|
351
351
|
|
|
352
352
|
function Trackable(target, propertyKey, descriptor) {
|
|
353
353
|
const originalMethod = descriptor.value;
|
|
@@ -381,7 +381,7 @@ function track(action, methodName) {
|
|
|
381
381
|
packageVersion,
|
|
382
382
|
methodName,
|
|
383
383
|
};
|
|
384
|
-
void trackProductEvent(action, payload, app.httpClient, !enableTracking)
|
|
384
|
+
void trackProductEvent(action, payload, app.httpClient, !enableTracking);
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
catch (e) {
|
|
@@ -428,6 +428,8 @@ const THEME_CONFIG_TOKEN = new InjectionToken('theme configuration');
|
|
|
428
428
|
/**
|
|
429
429
|
* Service for working with Sisense Fusion themes.
|
|
430
430
|
*
|
|
431
|
+
* If no theme service is used, the current Fusion theme is applied by default.
|
|
432
|
+
*
|
|
431
433
|
* @group Contexts
|
|
432
434
|
*/
|
|
433
435
|
let ThemeService = class ThemeService {
|
|
@@ -3544,6 +3546,222 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3544
3546
|
type: Output
|
|
3545
3547
|
}] } });
|
|
3546
3548
|
|
|
3549
|
+
/**
|
|
3550
|
+
* An Angular component used for easily rendering a dashboard by its ID created in a Sisense Fusion instance.
|
|
3551
|
+
*
|
|
3552
|
+
* @example
|
|
3553
|
+
* ```html
|
|
3554
|
+
* <csdk-dashboard-by-id
|
|
3555
|
+
* [dashboardOid]="dashboardOid"
|
|
3556
|
+
* />
|
|
3557
|
+
* ```
|
|
3558
|
+
* ```ts
|
|
3559
|
+
* import { Component } from '@angular/core';
|
|
3560
|
+
*
|
|
3561
|
+
* @Component({
|
|
3562
|
+
* selector: 'app-dashboard',
|
|
3563
|
+
* templateUrl: './dashboard.component.html',
|
|
3564
|
+
* styleUrls: ['./dashboard.component.scss'],
|
|
3565
|
+
* })
|
|
3566
|
+
* export class DashboardComponent {
|
|
3567
|
+
* dashboardOid: string = '60f3e3e3e4b0e3e3e4b0e3e3';
|
|
3568
|
+
* }
|
|
3569
|
+
* ```
|
|
3570
|
+
* @group Fusion Embed
|
|
3571
|
+
* @fusionEmbed
|
|
3572
|
+
* @internal
|
|
3573
|
+
*/
|
|
3574
|
+
class DashboardByIdComponent {
|
|
3575
|
+
/**
|
|
3576
|
+
* Constructor for the `DashboardById` component.
|
|
3577
|
+
*
|
|
3578
|
+
* @param sisenseContextService - Sisense context service
|
|
3579
|
+
* @param themeService - Theme service
|
|
3580
|
+
*/
|
|
3581
|
+
constructor(
|
|
3582
|
+
/**
|
|
3583
|
+
* Sisense context service
|
|
3584
|
+
*
|
|
3585
|
+
* @category Constructor
|
|
3586
|
+
*/
|
|
3587
|
+
sisenseContextService,
|
|
3588
|
+
/**
|
|
3589
|
+
* Theme service
|
|
3590
|
+
*
|
|
3591
|
+
* @category Constructor
|
|
3592
|
+
*/
|
|
3593
|
+
themeService) {
|
|
3594
|
+
this.sisenseContextService = sisenseContextService;
|
|
3595
|
+
this.themeService = themeService;
|
|
3596
|
+
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
3597
|
+
createSisenseContextConnector(this.sisenseContextService),
|
|
3598
|
+
createThemeContextConnector(this.themeService),
|
|
3599
|
+
]);
|
|
3600
|
+
}
|
|
3601
|
+
/**
|
|
3602
|
+
* @internal
|
|
3603
|
+
*/
|
|
3604
|
+
ngAfterViewInit() {
|
|
3605
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
3606
|
+
}
|
|
3607
|
+
/**
|
|
3608
|
+
* @internal
|
|
3609
|
+
*/
|
|
3610
|
+
ngOnChanges() {
|
|
3611
|
+
if (this.preactRef) {
|
|
3612
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
createPreactComponent() {
|
|
3616
|
+
const props = {
|
|
3617
|
+
dashboardOid: this.dashboardOid,
|
|
3618
|
+
};
|
|
3619
|
+
return createElement(DashboardById, props);
|
|
3620
|
+
}
|
|
3621
|
+
/**
|
|
3622
|
+
* @internal
|
|
3623
|
+
*/
|
|
3624
|
+
ngOnDestroy() {
|
|
3625
|
+
this.componentAdapter.destroy();
|
|
3626
|
+
}
|
|
3627
|
+
}
|
|
3628
|
+
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 });
|
|
3629
|
+
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 });
|
|
3630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardByIdComponent, decorators: [{
|
|
3631
|
+
type: Component,
|
|
3632
|
+
args: [{
|
|
3633
|
+
selector: 'csdk-dashboard-by-id',
|
|
3634
|
+
template,
|
|
3635
|
+
}]
|
|
3636
|
+
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
3637
|
+
type: ViewChild,
|
|
3638
|
+
args: [rootId]
|
|
3639
|
+
}], dashboardOid: [{
|
|
3640
|
+
type: Input
|
|
3641
|
+
}] } });
|
|
3642
|
+
|
|
3643
|
+
/**
|
|
3644
|
+
* An Angular component used for easily rendering a dashboard.
|
|
3645
|
+
*
|
|
3646
|
+
* @example
|
|
3647
|
+
* ```html
|
|
3648
|
+
* <csdk-dashboard
|
|
3649
|
+
* *ngIf="dashboard"
|
|
3650
|
+
* [title]="dashboard!.title"
|
|
3651
|
+
* [layout]="dashboard!.layout"
|
|
3652
|
+
* [widgets]="dashboard!.widgets"
|
|
3653
|
+
* [filters]="dashboard!.filters"
|
|
3654
|
+
* [defaultDataSource]="dashboard!.dataSource"
|
|
3655
|
+
* [widgetFilterOptions]="dashboard!.widgetFilterOptions"
|
|
3656
|
+
* />
|
|
3657
|
+
* ```
|
|
3658
|
+
* ```ts
|
|
3659
|
+
* import { Component } from '@angular/core';
|
|
3660
|
+
* import { type DashboardModel, DashboardService } from '@sisense/sdk-ui-angular';
|
|
3661
|
+
*
|
|
3662
|
+
* @Component({
|
|
3663
|
+
* selector: 'app-dashboard',
|
|
3664
|
+
* templateUrl: './dashboard.component.html',
|
|
3665
|
+
* styleUrls: ['./dashboard.component.scss'],
|
|
3666
|
+
* })
|
|
3667
|
+
* export class DashboardComponent {
|
|
3668
|
+
*
|
|
3669
|
+
* dashboard: DashboardModel | null = null;
|
|
3670
|
+
*
|
|
3671
|
+
* constructor(private dashboardService: DashboardService) {}
|
|
3672
|
+
*
|
|
3673
|
+
* async ngOnInit(): Promise<void> {
|
|
3674
|
+
* this.dashboard = await this.dashboardService.getDashboardModel('60f3e3e3e4b0e3e3e4b0e3e3', { includeWidgets: true, includeFilters: true });
|
|
3675
|
+
* }
|
|
3676
|
+
* ```
|
|
3677
|
+
* @group Fusion Embed
|
|
3678
|
+
* @fusionEmbed
|
|
3679
|
+
* @internal
|
|
3680
|
+
*/
|
|
3681
|
+
class DashboardComponent {
|
|
3682
|
+
/**
|
|
3683
|
+
* Constructor for the `Dashboard` component.
|
|
3684
|
+
*
|
|
3685
|
+
* @param sisenseContextService - Sisense context service
|
|
3686
|
+
* @param themeService - Theme service
|
|
3687
|
+
*/
|
|
3688
|
+
constructor(
|
|
3689
|
+
/**
|
|
3690
|
+
* Sisense context service
|
|
3691
|
+
*
|
|
3692
|
+
* @category Constructor
|
|
3693
|
+
*/
|
|
3694
|
+
sisenseContextService,
|
|
3695
|
+
/**
|
|
3696
|
+
* Theme service
|
|
3697
|
+
*
|
|
3698
|
+
* @category Constructor
|
|
3699
|
+
*/
|
|
3700
|
+
themeService) {
|
|
3701
|
+
this.sisenseContextService = sisenseContextService;
|
|
3702
|
+
this.themeService = themeService;
|
|
3703
|
+
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
3704
|
+
createSisenseContextConnector(this.sisenseContextService),
|
|
3705
|
+
createThemeContextConnector(this.themeService),
|
|
3706
|
+
]);
|
|
3707
|
+
}
|
|
3708
|
+
/**
|
|
3709
|
+
* @internal
|
|
3710
|
+
*/
|
|
3711
|
+
ngAfterViewInit() {
|
|
3712
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
3713
|
+
}
|
|
3714
|
+
/**
|
|
3715
|
+
* @internal
|
|
3716
|
+
*/
|
|
3717
|
+
ngOnChanges() {
|
|
3718
|
+
if (this.preactRef) {
|
|
3719
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
3720
|
+
}
|
|
3721
|
+
}
|
|
3722
|
+
createPreactComponent() {
|
|
3723
|
+
const props = {
|
|
3724
|
+
title: this.title,
|
|
3725
|
+
layout: this.layout,
|
|
3726
|
+
widgets: this.widgets,
|
|
3727
|
+
filters: this.filters,
|
|
3728
|
+
defaultDataSource: this.defaultDataSource,
|
|
3729
|
+
widgetFilterOptions: this.widgetFilterOptions,
|
|
3730
|
+
};
|
|
3731
|
+
return createElement(Dashboard, props);
|
|
3732
|
+
}
|
|
3733
|
+
/**
|
|
3734
|
+
* @internal
|
|
3735
|
+
*/
|
|
3736
|
+
ngOnDestroy() {
|
|
3737
|
+
this.componentAdapter.destroy();
|
|
3738
|
+
}
|
|
3739
|
+
}
|
|
3740
|
+
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 });
|
|
3741
|
+
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 });
|
|
3742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardComponent, decorators: [{
|
|
3743
|
+
type: Component,
|
|
3744
|
+
args: [{
|
|
3745
|
+
selector: 'csdk-dashboard',
|
|
3746
|
+
template,
|
|
3747
|
+
}]
|
|
3748
|
+
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
3749
|
+
type: ViewChild,
|
|
3750
|
+
args: [rootId]
|
|
3751
|
+
}], title: [{
|
|
3752
|
+
type: Input
|
|
3753
|
+
}], layout: [{
|
|
3754
|
+
type: Input
|
|
3755
|
+
}], widgets: [{
|
|
3756
|
+
type: Input
|
|
3757
|
+
}], filters: [{
|
|
3758
|
+
type: Input
|
|
3759
|
+
}], defaultDataSource: [{
|
|
3760
|
+
type: Input
|
|
3761
|
+
}], widgetFilterOptions: [{
|
|
3762
|
+
type: Input
|
|
3763
|
+
}] } });
|
|
3764
|
+
|
|
3547
3765
|
/**
|
|
3548
3766
|
* Drilldown Breadcrumbs Component
|
|
3549
3767
|
*
|
|
@@ -3783,7 +4001,9 @@ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
|
|
|
3783
4001
|
BoxplotChartComponent,
|
|
3784
4002
|
ScattermapChartComponent,
|
|
3785
4003
|
AreamapChartComponent,
|
|
3786
|
-
PivotTableComponent
|
|
4004
|
+
PivotTableComponent,
|
|
4005
|
+
DashboardByIdComponent,
|
|
4006
|
+
DashboardComponent], imports: [CommonModule, DecoratorsModule], exports: [BasicMemberFilterTileComponent,
|
|
3787
4007
|
ChartComponent,
|
|
3788
4008
|
TableComponent,
|
|
3789
4009
|
ChartWidgetComponent,
|
|
@@ -3809,7 +4029,9 @@ SdkUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
|
|
|
3809
4029
|
BoxplotChartComponent,
|
|
3810
4030
|
ScattermapChartComponent,
|
|
3811
4031
|
AreamapChartComponent,
|
|
3812
|
-
PivotTableComponent
|
|
4032
|
+
PivotTableComponent,
|
|
4033
|
+
DashboardByIdComponent,
|
|
4034
|
+
DashboardComponent] });
|
|
3813
4035
|
SdkUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdkUiModule, imports: [CommonModule, DecoratorsModule] });
|
|
3814
4036
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdkUiModule, decorators: [{
|
|
3815
4037
|
type: NgModule,
|
|
@@ -3842,6 +4064,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3842
4064
|
ScattermapChartComponent,
|
|
3843
4065
|
AreamapChartComponent,
|
|
3844
4066
|
PivotTableComponent,
|
|
4067
|
+
DashboardByIdComponent,
|
|
4068
|
+
DashboardComponent,
|
|
3845
4069
|
],
|
|
3846
4070
|
imports: [CommonModule, DecoratorsModule],
|
|
3847
4071
|
exports: [
|
|
@@ -3872,6 +4096,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3872
4096
|
ScattermapChartComponent,
|
|
3873
4097
|
AreamapChartComponent,
|
|
3874
4098
|
PivotTableComponent,
|
|
4099
|
+
DashboardByIdComponent,
|
|
4100
|
+
DashboardComponent,
|
|
3875
4101
|
],
|
|
3876
4102
|
providers: [],
|
|
3877
4103
|
}]
|
|
@@ -3911,5 +4137,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3911
4137
|
* Generated bundle index. Do not edit.
|
|
3912
4138
|
*/
|
|
3913
4139
|
|
|
3914
|
-
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 };
|
|
4140
|
+
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 };
|
|
3915
4141
|
//# sourceMappingURL=sisense-sdk-ui-angular.mjs.map
|