@sisense/sdk-ui-angular 1.18.1 → 1.20.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/component-wrapper-helpers/context-connectors.mjs +20 -2
- package/dist/esm2020/lib/components/dashboard/dashboard-by-id.component.mjs +16 -6
- package/dist/esm2020/lib/components/dashboard/dashboard.component.mjs +18 -14
- package/dist/esm2020/lib/components/widgets/chart-widget.component.mjs +2 -2
- package/dist/esm2020/lib/components/widgets/drilldown-widget.component.mjs +1 -1
- package/dist/esm2020/lib/sdk-ui-core-exports.mjs +2 -2
- package/dist/esm2020/lib/services/index.mjs +2 -1
- package/dist/esm2020/lib/services/plugins.service.mjs +55 -0
- package/dist/esm2020/public-api.mjs +3 -1
- package/dist/esm2020/version.mjs +2 -2
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs +107 -22
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs +107 -22
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/lib/component-wrapper-helpers/context-connectors.d.ts +9 -1
- package/dist/lib/components/dashboard/dashboard-by-id.component.d.ts +17 -2
- package/dist/lib/components/dashboard/dashboard.component.d.ts +20 -13
- package/dist/lib/components/widgets/chart-widget.component.d.ts +1 -1
- package/dist/lib/components/widgets/drilldown-widget.component.d.ts +1 -1
- package/dist/lib/sdk-ui-core-exports.d.ts +2 -2
- package/dist/lib/services/index.d.ts +1 -0
- package/dist/lib/services/plugins.service.d.ts +37 -0
- package/dist/lib/services/theme.service.d.ts +2 -151
- package/dist/package.json +1 -1
- package/dist/public-api.d.ts +2 -0
- package/dist/version.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,8 +1,8 @@
|
|
|
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, DashboardById, Dashboard, DrilldownBreadcrumbs, ContextMenu } from '@sisense/sdk-ui-preact';
|
|
5
|
-
export { boxWhiskerProcessResult } from '@sisense/sdk-ui-preact';
|
|
4
|
+
import { ComponentAdapter, createElement, BasicMemberFilterTile, createContextProviderRenderer, CustomThemeProvider, CustomSisenseContextProvider, CustomPluginsProvider, 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
|
+
export { boxWhiskerProcessResult, dashboardModelTranslator, widgetModelTranslator } from '@sisense/sdk-ui-preact';
|
|
6
6
|
import { __awaiter, __decorate } from 'tslib';
|
|
7
7
|
import { map, BehaviorSubject } from 'rxjs';
|
|
8
8
|
import merge from 'ts-deepmerge';
|
|
@@ -128,6 +128,24 @@ const createSisenseContextConnector = (sisenseContextService) => {
|
|
|
128
128
|
renderContextProvider: createContextProviderRenderer(CustomSisenseContextProvider),
|
|
129
129
|
};
|
|
130
130
|
};
|
|
131
|
+
/**
|
|
132
|
+
* Creates plugins context connector
|
|
133
|
+
*
|
|
134
|
+
* @param pluginsService - The plugin service
|
|
135
|
+
* @internal
|
|
136
|
+
*/
|
|
137
|
+
const createPluginsContextConnector = (pluginsService) => {
|
|
138
|
+
return {
|
|
139
|
+
prepareContext() {
|
|
140
|
+
return {
|
|
141
|
+
pluginMap: pluginsService.getPlugins().value,
|
|
142
|
+
registerPlugin: pluginsService.registerPlugin.bind(pluginsService),
|
|
143
|
+
getPlugin: pluginsService.getPlugin.bind(pluginsService),
|
|
144
|
+
};
|
|
145
|
+
},
|
|
146
|
+
renderContextProvider: createContextProviderRenderer(CustomPluginsProvider),
|
|
147
|
+
};
|
|
148
|
+
};
|
|
131
149
|
|
|
132
150
|
/**
|
|
133
151
|
* Token used to inject {@link SisenseContextConfig} into your application
|
|
@@ -252,6 +270,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
252
270
|
}]
|
|
253
271
|
}], ctorParameters: function () { return [{ type: SisenseContextService }]; } });
|
|
254
272
|
|
|
273
|
+
/**
|
|
274
|
+
* Service for working with plugins fetched from an external environment.
|
|
275
|
+
*
|
|
276
|
+
* Provides methods for registering, retrieving, and interacting with plugins.
|
|
277
|
+
*
|
|
278
|
+
* @internal
|
|
279
|
+
* @group Contexts
|
|
280
|
+
*/
|
|
281
|
+
class PluginsService {
|
|
282
|
+
constructor() {
|
|
283
|
+
this.pluginMap$ = new BehaviorSubject(new Map());
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Registers a new plugin into the plugin map.
|
|
287
|
+
*
|
|
288
|
+
* @param pluginType - The unique identifier for the plugin type.
|
|
289
|
+
* @param plugin - The plugin instance to register.
|
|
290
|
+
*/
|
|
291
|
+
registerPlugin(pluginType, plugin) {
|
|
292
|
+
const pluginMap = this.pluginMap$.value;
|
|
293
|
+
if (!pluginMap.has(pluginType)) {
|
|
294
|
+
pluginMap.set(pluginType, plugin);
|
|
295
|
+
this.pluginMap$.next(pluginMap);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Retrieves a plugin by its type.
|
|
300
|
+
*
|
|
301
|
+
* @param pluginType - The unique identifier for the plugin type.
|
|
302
|
+
* @returns The plugin instance if found, otherwise undefined.
|
|
303
|
+
*/
|
|
304
|
+
getPlugin(pluginType) {
|
|
305
|
+
return this.pluginMap$.value.get(pluginType);
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Retrieves a complete plugin map.
|
|
309
|
+
*
|
|
310
|
+
* @returns A plugin map.
|
|
311
|
+
*/
|
|
312
|
+
getPlugins() {
|
|
313
|
+
return this.pluginMap$;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
PluginsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PluginsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
317
|
+
PluginsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PluginsService, providedIn: 'root' });
|
|
318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PluginsService, decorators: [{
|
|
319
|
+
type: Injectable,
|
|
320
|
+
args: [{
|
|
321
|
+
providedIn: 'root',
|
|
322
|
+
}]
|
|
323
|
+
}], ctorParameters: function () { return []; } });
|
|
324
|
+
|
|
255
325
|
/**
|
|
256
326
|
* Service for working with Sisense Fusion dashboards.
|
|
257
327
|
*
|
|
@@ -354,7 +424,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
354
424
|
}]
|
|
355
425
|
}], ctorParameters: function () { return [{ type: SisenseContextService }]; } });
|
|
356
426
|
|
|
357
|
-
var packageVersion = '1.
|
|
427
|
+
var packageVersion = '1.20.0';
|
|
358
428
|
|
|
359
429
|
function Trackable(target, propertyKey, descriptor) {
|
|
360
430
|
const originalMethod = descriptor.value;
|
|
@@ -3464,7 +3534,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3464
3534
|
* ```
|
|
3465
3535
|
* <img src="media://angular-chart-widget-example.png" width="800px" />
|
|
3466
3536
|
*
|
|
3467
|
-
* @group
|
|
3537
|
+
* @group Dashboarding
|
|
3468
3538
|
*/
|
|
3469
3539
|
class ChartWidgetComponent {
|
|
3470
3540
|
constructor(sisenseContextService, themeService) {
|
|
@@ -3594,7 +3664,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3594
3664
|
* ```
|
|
3595
3665
|
* @group Fusion Embed
|
|
3596
3666
|
* @fusionEmbed
|
|
3597
|
-
* @
|
|
3667
|
+
* @beta
|
|
3598
3668
|
*/
|
|
3599
3669
|
class DashboardByIdComponent {
|
|
3600
3670
|
/**
|
|
@@ -3615,12 +3685,21 @@ class DashboardByIdComponent {
|
|
|
3615
3685
|
*
|
|
3616
3686
|
* @category Constructor
|
|
3617
3687
|
*/
|
|
3618
|
-
themeService
|
|
3688
|
+
themeService,
|
|
3689
|
+
/**
|
|
3690
|
+
* Plugin service
|
|
3691
|
+
*
|
|
3692
|
+
* @internal
|
|
3693
|
+
* @category Constructor
|
|
3694
|
+
*/
|
|
3695
|
+
pluginService) {
|
|
3619
3696
|
this.sisenseContextService = sisenseContextService;
|
|
3620
3697
|
this.themeService = themeService;
|
|
3698
|
+
this.pluginService = pluginService;
|
|
3621
3699
|
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
3622
3700
|
createSisenseContextConnector(this.sisenseContextService),
|
|
3623
3701
|
createThemeContextConnector(this.themeService),
|
|
3702
|
+
createPluginsContextConnector(this.pluginService),
|
|
3624
3703
|
]);
|
|
3625
3704
|
}
|
|
3626
3705
|
/**
|
|
@@ -3650,7 +3729,7 @@ class DashboardByIdComponent {
|
|
|
3650
3729
|
this.componentAdapter.destroy();
|
|
3651
3730
|
}
|
|
3652
3731
|
}
|
|
3653
|
-
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 });
|
|
3732
|
+
DashboardByIdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardByIdComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }, { token: PluginsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3654
3733
|
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 });
|
|
3655
3734
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardByIdComponent, decorators: [{
|
|
3656
3735
|
type: Component,
|
|
@@ -3658,7 +3737,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3658
3737
|
selector: 'csdk-dashboard-by-id',
|
|
3659
3738
|
template,
|
|
3660
3739
|
}]
|
|
3661
|
-
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
3740
|
+
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }, { type: PluginsService }]; }, propDecorators: { preactRef: [{
|
|
3662
3741
|
type: ViewChild,
|
|
3663
3742
|
args: [rootId]
|
|
3664
3743
|
}], dashboardOid: [{
|
|
@@ -3675,16 +3754,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3675
3754
|
* <csdk-dashboard
|
|
3676
3755
|
* *ngIf="dashboard"
|
|
3677
3756
|
* [title]="dashboard!.title"
|
|
3678
|
-
* [
|
|
3757
|
+
* [layoutOptions]="dashboard!.layoutOptions"
|
|
3679
3758
|
* [widgets]="dashboard!.widgets"
|
|
3680
3759
|
* [filters]="dashboard!.filters"
|
|
3681
3760
|
* [defaultDataSource]="dashboard!.dataSource"
|
|
3682
|
-
* [
|
|
3761
|
+
* [widgetsOptions]="dashboard!.widgetsOptions"
|
|
3683
3762
|
* />
|
|
3684
3763
|
* ```
|
|
3764
|
+
*
|
|
3685
3765
|
* ```ts
|
|
3686
3766
|
* import { Component } from '@angular/core';
|
|
3687
|
-
* import { type
|
|
3767
|
+
* import { type DashboardProps, DashboardService } from '@sisense/sdk-ui-angular';
|
|
3688
3768
|
*
|
|
3689
3769
|
* @Component({
|
|
3690
3770
|
* selector: 'app-dashboard',
|
|
@@ -3693,17 +3773,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3693
3773
|
* })
|
|
3694
3774
|
* export class DashboardComponent {
|
|
3695
3775
|
*
|
|
3696
|
-
* dashboard:
|
|
3776
|
+
* dashboard: DashboardProps | null = null;
|
|
3697
3777
|
*
|
|
3698
3778
|
* constructor(private dashboardService: DashboardService) {}
|
|
3699
3779
|
*
|
|
3700
3780
|
* async ngOnInit(): Promise<void> {
|
|
3701
|
-
*
|
|
3781
|
+
* const dashboardModel = await this.dashboardService.getDashboardModel('60f3e3e3e4b0e3e3e4b0e3e3', { includeWidgets: true, includeFilters: true });
|
|
3782
|
+
* this.dashboardProps = dashboardModelTranslator.toDashboardProps(dashboardModel);
|
|
3702
3783
|
* }
|
|
3703
3784
|
* ```
|
|
3704
|
-
* @group
|
|
3705
|
-
* @
|
|
3706
|
-
* @alpha
|
|
3785
|
+
* @group Dashboarding
|
|
3786
|
+
* @beta
|
|
3707
3787
|
*/
|
|
3708
3788
|
class DashboardComponent {
|
|
3709
3789
|
/**
|
|
@@ -3749,11 +3829,12 @@ class DashboardComponent {
|
|
|
3749
3829
|
createPreactComponent() {
|
|
3750
3830
|
const props = {
|
|
3751
3831
|
title: this.title,
|
|
3752
|
-
|
|
3832
|
+
layoutOptions: this.layoutOptions,
|
|
3833
|
+
config: this.config,
|
|
3753
3834
|
widgets: this.widgets,
|
|
3754
3835
|
filters: this.filters,
|
|
3755
3836
|
defaultDataSource: this.defaultDataSource,
|
|
3756
|
-
|
|
3837
|
+
widgetsOptions: this.widgetsOptions,
|
|
3757
3838
|
styleOptions: this.styleOptions,
|
|
3758
3839
|
};
|
|
3759
3840
|
return createElement(Dashboard, props);
|
|
@@ -3766,7 +3847,7 @@ class DashboardComponent {
|
|
|
3766
3847
|
}
|
|
3767
3848
|
}
|
|
3768
3849
|
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 });
|
|
3769
|
-
DashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DashboardComponent, selector: "csdk-dashboard", inputs: { title: "title",
|
|
3850
|
+
DashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DashboardComponent, selector: "csdk-dashboard", inputs: { title: "title", layoutOptions: "layoutOptions", config: "config", widgets: "widgets", filters: "filters", defaultDataSource: "defaultDataSource", widgetsOptions: "widgetsOptions", styleOptions: "styleOptions" }, 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 });
|
|
3770
3851
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardComponent, decorators: [{
|
|
3771
3852
|
type: Component,
|
|
3772
3853
|
args: [{
|
|
@@ -3778,7 +3859,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3778
3859
|
args: [rootId]
|
|
3779
3860
|
}], title: [{
|
|
3780
3861
|
type: Input
|
|
3781
|
-
}],
|
|
3862
|
+
}], layoutOptions: [{
|
|
3863
|
+
type: Input
|
|
3864
|
+
}], config: [{
|
|
3782
3865
|
type: Input
|
|
3783
3866
|
}], widgets: [{
|
|
3784
3867
|
type: Input
|
|
@@ -3786,7 +3869,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3786
3869
|
type: Input
|
|
3787
3870
|
}], defaultDataSource: [{
|
|
3788
3871
|
type: Input
|
|
3789
|
-
}],
|
|
3872
|
+
}], widgetsOptions: [{
|
|
3790
3873
|
type: Input
|
|
3791
3874
|
}], styleOptions: [{
|
|
3792
3875
|
type: Input
|
|
@@ -4155,6 +4238,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4155
4238
|
* Angular context modules, services, and variables
|
|
4156
4239
|
* @groupDescription Queries
|
|
4157
4240
|
* Angular query service
|
|
4241
|
+
* @groupDescription Dashboarding
|
|
4242
|
+
* Angular modules, services, and components for composing dashboards
|
|
4158
4243
|
* @groupDescription Fusion Embed
|
|
4159
4244
|
* Angular modules, services, and components for working with Fusion Embed dashboards, widgets, queries, and formulas
|
|
4160
4245
|
* @groupDescription Interfaces
|
|
@@ -4167,5 +4252,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4167
4252
|
* Generated bundle index. Do not edit.
|
|
4168
4253
|
*/
|
|
4169
4254
|
|
|
4170
|
-
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 };
|
|
4255
|
+
export { AreaChartComponent, AreaRangeChartComponent, AreamapChartComponent, BarChartComponent, BasicMemberFilterTileComponent, BoxplotChartComponent, ChartComponent, ChartWidgetComponent, ColumnChartComponent, ContextMenuComponent, 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 };
|
|
4171
4256
|
//# sourceMappingURL=sisense-sdk-ui-angular.mjs.map
|