@sisense/sdk-ui-angular 1.31.0 → 1.33.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/ai/lib/component-wrapper-helpers/context-connectors.d.ts +10 -0
- package/dist/ai/lib/component-wrapper-helpers/index.d.ts +2 -0
- package/dist/ai/lib/component-wrapper-helpers/template.d.ts +2 -0
- package/dist/ai/lib/components/chatbot.component.d.ts +132 -0
- package/dist/ai/lib/components/get-nlg-insights.component.d.ts +141 -0
- package/dist/ai/lib/components/index.d.ts +2 -0
- package/dist/ai/lib/sdk-ai.module.d.ts +40 -5
- package/dist/ai/lib/sdk-ui-core-exports.d.ts +1 -0
- package/dist/ai/lib/services/ai.service.d.ts +88 -0
- package/dist/ai/lib/services/index.d.ts +1 -0
- package/dist/ai/public-api.d.ts +6 -0
- package/dist/esm2020/ai/lib/component-wrapper-helpers/context-connectors.mjs +20 -0
- package/dist/esm2020/ai/lib/component-wrapper-helpers/index.mjs +3 -0
- package/dist/esm2020/ai/lib/component-wrapper-helpers/template.mjs +5 -0
- package/dist/esm2020/ai/lib/components/chatbot.component.mjs +138 -0
- package/dist/esm2020/ai/lib/components/get-nlg-insights.component.mjs +145 -0
- package/dist/esm2020/ai/lib/components/index.mjs +3 -0
- package/dist/esm2020/ai/lib/sdk-ai.module.mjs +40 -6
- package/dist/esm2020/ai/lib/sdk-ui-core-exports.mjs +3 -0
- package/dist/esm2020/ai/lib/services/ai.service.mjs +137 -0
- package/dist/esm2020/ai/lib/services/index.mjs +2 -0
- package/dist/esm2020/ai/public-api.mjs +7 -1
- package/dist/esm2020/lib/component-wrapper-helpers/index.mjs +2 -1
- package/dist/esm2020/lib/components/charts/area-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/area-range-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/areamap-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/bar-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/boxplot-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/column-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/funnel-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/indicator-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/line-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/pie-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/pivot-table.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/polar-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/scatter-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/scattermap-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/sunburst-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/table.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/treemap-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/dashboard/dashboard-by-id.component.mjs +4 -4
- package/dist/esm2020/lib/components/dashboard/dashboard.component.mjs +1 -1
- package/dist/esm2020/lib/components/drilldown-breadcrumbs.component.mjs +1 -1
- package/dist/esm2020/lib/components/filters/criteria-filter-tile.component.mjs +1 -1
- package/dist/esm2020/lib/components/filters/date-range-filter-tile.component.mjs +1 -1
- package/dist/esm2020/lib/components/filters/member-filter-tile.component.mjs +1 -1
- package/dist/esm2020/lib/components/filters/relative-date-filter-tile.component.mjs +1 -1
- package/dist/esm2020/lib/components/widgets/chart-widget.component.mjs +1 -1
- package/dist/esm2020/lib/components/widgets/index.mjs +2 -1
- package/dist/esm2020/lib/components/widgets/pivot-table-widget.component.mjs +127 -0
- package/dist/esm2020/lib/components/widgets/table-widget.component.mjs +1 -1
- package/dist/esm2020/lib/components/widgets/widget-by-id.component.mjs +1 -1
- package/dist/esm2020/lib/decorators/index.mjs +3 -0
- package/dist/esm2020/lib/decorators/trackable.decorator.mjs +2 -1
- package/dist/esm2020/lib/sdk-ui-core-exports.mjs +2 -2
- package/dist/esm2020/lib/sdk-ui.module.mjs +10 -6
- package/dist/esm2020/lib/services/query.service.mjs +31 -5
- package/dist/esm2020/lib/services/sisense-context.service.mjs +3 -3
- package/dist/esm2020/lib/services/theme.service.mjs +3 -3
- package/dist/esm2020/lib/types/dashboard-config.mjs +2 -0
- package/dist/esm2020/lib/types/index.mjs +2 -1
- package/dist/esm2020/lib/utilities/dashboard-helpers.mjs +119 -0
- package/dist/esm2020/lib/utilities/dashboard-model-translator.mjs +49 -0
- package/dist/esm2020/lib/utilities/index.mjs +7 -0
- package/dist/esm2020/lib/utilities/widget-model-translator.mjs +304 -0
- package/dist/esm2020/public-api.mjs +6 -25
- package/dist/esm2020/version.mjs +2 -2
- package/dist/fesm2015/sisense-sdk-ui-angular-ai.mjs +471 -8
- package/dist/fesm2015/sisense-sdk-ui-angular-ai.mjs.map +1 -1
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs +671 -43
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular-ai.mjs +466 -8
- package/dist/fesm2020/sisense-sdk-ui-angular-ai.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs +668 -42
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/lib/component-wrapper-helpers/index.d.ts +1 -0
- package/dist/lib/components/charts/area-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/area-range-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/areamap-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/bar-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/boxplot-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/chart.component.d.ts +3 -0
- package/dist/lib/components/charts/column-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/funnel-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/indicator-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/line-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/pie-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/pivot-table.component.d.ts +3 -0
- package/dist/lib/components/charts/polar-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/scatter-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/scattermap-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/sunburst-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/table.component.d.ts +3 -2
- package/dist/lib/components/charts/treemap-chart.component.d.ts +3 -0
- package/dist/lib/components/dashboard/dashboard-by-id.component.d.ts +11 -5
- package/dist/lib/components/dashboard/dashboard.component.d.ts +8 -2
- package/dist/lib/components/drilldown-breadcrumbs.component.d.ts +3 -0
- package/dist/lib/components/filters/criteria-filter-tile.component.d.ts +3 -0
- package/dist/lib/components/filters/date-range-filter-tile.component.d.ts +3 -0
- package/dist/lib/components/filters/member-filter-tile.component.d.ts +3 -0
- package/dist/lib/components/filters/relative-date-filter-tile.component.d.ts +3 -0
- package/dist/lib/components/widgets/chart-widget.component.d.ts +3 -0
- package/dist/lib/components/widgets/index.d.ts +1 -0
- package/dist/lib/components/widgets/pivot-table-widget.component.d.ts +127 -0
- package/dist/lib/components/widgets/table-widget.component.d.ts +5 -0
- package/dist/lib/components/widgets/widget-by-id.component.d.ts +3 -2
- package/dist/lib/decorators/index.d.ts +2 -0
- package/dist/lib/decorators/trackable.decorator.d.ts +1 -0
- package/dist/lib/sdk-ui-core-exports.d.ts +2 -2
- package/dist/lib/sdk-ui.module.d.ts +6 -5
- package/dist/lib/services/plugins.service.d.ts +1 -1
- package/dist/lib/services/query.service.d.ts +29 -3
- package/dist/lib/services/sisense-context.service.d.ts +2 -2
- package/dist/lib/services/theme.service.d.ts +2 -2
- package/dist/lib/types/dashboard-config.d.ts +24 -0
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/utilities/dashboard-helpers.d.ts +105 -0
- package/dist/lib/utilities/dashboard-model-translator.d.ts +47 -0
- package/dist/lib/utilities/index.d.ts +23 -0
- package/dist/lib/utilities/widget-model-translator.d.ts +289 -0
- package/dist/package.json +1 -1
- package/dist/public-api.d.ts +5 -22
- package/dist/version.d.ts +1 -1
- package/package.json +4 -4
|
@@ -11,8 +11,8 @@ export { type SisenseContextConfig };
|
|
|
11
11
|
*
|
|
12
12
|
* ```ts
|
|
13
13
|
* export const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {
|
|
14
|
-
* url
|
|
15
|
-
* token
|
|
14
|
+
* url: "<instance url>", // replace with the URL of your Sisense instance
|
|
15
|
+
* token: "<api token>", // replace with the API token of your user account
|
|
16
16
|
* defaultDataSource: DM.DataSource,
|
|
17
17
|
* };
|
|
18
18
|
*
|
|
@@ -13,8 +13,8 @@ export { type ThemeConfig };
|
|
|
13
13
|
*
|
|
14
14
|
* ```ts
|
|
15
15
|
* export const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {
|
|
16
|
-
* url
|
|
17
|
-
* token
|
|
16
|
+
* url: "<instance url>", // replace with the URL of your Sisense instance
|
|
17
|
+
* token: "<api token>", // replace with the API token of your user account
|
|
18
18
|
* defaultDataSource: DM.DataSource,
|
|
19
19
|
* };
|
|
20
20
|
*
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { DashboardConfig as DashboardConfigPreact, DashboardByIdConfig as DashboardByIdConfigPreact, DashboardFiltersPanelConfig as DashboardFiltersPanelConfigPreact } from '@sisense/sdk-ui-preact';
|
|
2
|
+
/**
|
|
3
|
+
* {@inheritDoc @sisense/sdk-ui!DashboardFiltersPanelConfig}
|
|
4
|
+
*/
|
|
5
|
+
export interface DashboardFiltersPanelConfig extends Omit<DashboardFiltersPanelConfigPreact, 'actions'> {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* {@inheritDoc @sisense/sdk-ui!DashboardConfig}
|
|
9
|
+
*/
|
|
10
|
+
export interface DashboardConfig extends Omit<DashboardConfigPreact, 'filtersPanel'> {
|
|
11
|
+
/**
|
|
12
|
+
* {@inheritDoc @sisense/sdk-ui!DashboardConfig.filtersPanel}
|
|
13
|
+
*/
|
|
14
|
+
filtersPanel?: DashboardFiltersPanelConfig;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* {@inheritDoc @sisense/sdk-ui!DashboardByIdConfig}
|
|
18
|
+
*/
|
|
19
|
+
export interface DashboardByIdConfig extends Omit<DashboardByIdConfigPreact, 'filtersPanel'> {
|
|
20
|
+
/**
|
|
21
|
+
* {@inheritDoc @sisense/sdk-ui!DashboardByIdConfig.filtersPanel}
|
|
22
|
+
*/
|
|
23
|
+
filtersPanel?: DashboardFiltersPanelConfig;
|
|
24
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { DashboardProps } from '../components';
|
|
2
|
+
import { Filter, FilterRelations } from '@sisense/sdk-data';
|
|
3
|
+
/**
|
|
4
|
+
* {@inheritDoc @sisense/sdk-ui!dashboardHelpers.replaceFilters}
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* Replace all filters on a dashboard with a new set of filters.
|
|
8
|
+
* ```ts
|
|
9
|
+
* const existingDashboard: DashboardProps = {...}
|
|
10
|
+
* const newFilters: Filter[] = [{...}, {...}, ...];
|
|
11
|
+
* const updatedDashboard = dashboardHelpers.replaceFilters(existingDashboard, newFilters);
|
|
12
|
+
* ```
|
|
13
|
+
* @param dashboard - The original dashboard (`DashboardProps`) whose filters are to be replaced.
|
|
14
|
+
* @param newFilters - An array of new filters or filter relations to set on the dashboard.
|
|
15
|
+
* @returns A new dashboard instance with the updated filters.
|
|
16
|
+
*/
|
|
17
|
+
export declare const replaceFilters: (dashboard: DashboardProps, newFilters: Filter[] | FilterRelations) => DashboardProps;
|
|
18
|
+
/**
|
|
19
|
+
* {@inheritDoc @sisense/sdk-ui!dashboardHelpers.addFilter}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* Add a new filter to a dashboard.
|
|
23
|
+
* ```ts
|
|
24
|
+
* const existingDashboard: DashboardProps = {...};
|
|
25
|
+
* const newFilter: Filter = {...};
|
|
26
|
+
* const updatedDashboard = dashboardHelpers.addFilter(existingDashboard, newFilter);
|
|
27
|
+
* ```
|
|
28
|
+
* @param dashboard - The original dashboard (`DashboardProps`) to which the filter will be added.
|
|
29
|
+
* @param newFilter - The filter to add to the dashboard.
|
|
30
|
+
* @returns A new dashboard instance with the new filter added.
|
|
31
|
+
*/
|
|
32
|
+
export declare const addFilter: (dashboard: DashboardProps, newFilter: Filter) => DashboardProps;
|
|
33
|
+
/**
|
|
34
|
+
* {@inheritDoc @sisense/sdk-ui!dashboardHelpers.addFilters}
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* Add multiple new filters to a dashboard.
|
|
38
|
+
* ```ts
|
|
39
|
+
* const existingDashboard: DashboardProps = {...};
|
|
40
|
+
* const newFilters: Filter[] = [{...}, {...}, ...];
|
|
41
|
+
* const updatedDashboard = dashboardHelpers.addFilters(existingDashboard, newFilters);
|
|
42
|
+
* ```
|
|
43
|
+
* @param dashboard - The original dashboard (`DashboardProps`) to which the filters will be added.
|
|
44
|
+
* @param newFilters - An array of filters to add to the dashboard.
|
|
45
|
+
* @returns A new dashboard instance with the new filters added.
|
|
46
|
+
*/
|
|
47
|
+
export declare const addFilters: (dashboard: DashboardProps, newFilters: Filter[]) => DashboardProps;
|
|
48
|
+
/**
|
|
49
|
+
* {@inheritDoc @sisense/sdk-ui!dashboardHelpers.replaceFilter}
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* Replace a filter in a dashboard.
|
|
53
|
+
* ```ts
|
|
54
|
+
* const existingDashboard: DashboardProps = {...};
|
|
55
|
+
* const filterToReplace: Filter = {...};
|
|
56
|
+
* const newFilter: Filter = {...};
|
|
57
|
+
* const updatedDashboard = dashboardHelpers.replaceFilter(existingDashboard, filterToReplace, newFilter);
|
|
58
|
+
* ```
|
|
59
|
+
* @param dashboard - The original dashboard (`DashboardProps`) containing the filter to be replaced.
|
|
60
|
+
* @param filterToReplace - The existing filter to be replaced.
|
|
61
|
+
* @param newFilter - The new filter to replace the existing one.
|
|
62
|
+
* @returns A new dashboard instance with the specified filter replaced.
|
|
63
|
+
*/
|
|
64
|
+
export declare const replaceFilter: (dashboard: DashboardProps, filterToReplace: Filter, newFilter: Filter) => DashboardProps;
|
|
65
|
+
/**
|
|
66
|
+
* {@inheritDoc @sisense/sdk-ui!dashboardHelpers.modifyFilter}
|
|
67
|
+
*
|
|
68
|
+
* @deprecated Use {@link replaceFilter} instead
|
|
69
|
+
*
|
|
70
|
+
* @param dashboard - The original dashboard (`DashboardProps`) containing the filter to modify.
|
|
71
|
+
* @param filterToModify - The existing filter to be modified.
|
|
72
|
+
* @param newFilter - The new filter to replace the existing one.
|
|
73
|
+
* @returns A new dashboard instance with the specified filter modified.
|
|
74
|
+
*/
|
|
75
|
+
export declare const modifyFilter: (dashboard: DashboardProps, filterToModify: Filter, newFilter: Filter) => DashboardProps;
|
|
76
|
+
/**
|
|
77
|
+
* {@inheritDoc @sisense/sdk-ui!dashboardHelpers.removeFilter}
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* Remove a filter from a dashboard.
|
|
81
|
+
* ```ts
|
|
82
|
+
* const existingDashboard: DashboardProps = {...};
|
|
83
|
+
* const filterToRemove: Filter = {...};
|
|
84
|
+
* const updatedDashboard = dashboardHelpers.removeFilter(existingDashboard, filterToRemove);
|
|
85
|
+
* ```
|
|
86
|
+
* @param dashboard - The original dashboard (`DashboardProps`) from which to remove the filter.
|
|
87
|
+
* @param filterToRemove - The filter to be removed.
|
|
88
|
+
* @returns A new dashboard instance with the specified filter removed.
|
|
89
|
+
*/
|
|
90
|
+
export declare const removeFilter: (dashboard: DashboardProps, filterToRemove: Filter) => DashboardProps;
|
|
91
|
+
/**
|
|
92
|
+
* {@inheritDoc @sisense/sdk-ui!dashboardHelpers.removeFilters}
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* Remove multiple filters from a dashboard.
|
|
96
|
+
* ```ts
|
|
97
|
+
* const existingDashboard: DashboardProps = {...};
|
|
98
|
+
* const filtersToRemove: Filter[] = [{...}, {...}, ...];
|
|
99
|
+
* const updatedDashboard = dashboardHelpers.removeFilters(existingDashboard, filtersToRemove);
|
|
100
|
+
* ```
|
|
101
|
+
* @param dashboard - The original dashboard (`DashboardProps`) from which the specified filters are removed.
|
|
102
|
+
* @param filtersToRemove - An array of filters to remove.
|
|
103
|
+
* @returns A new dashboard instance with the specified filters removed.
|
|
104
|
+
*/
|
|
105
|
+
export declare const removeFilters: (dashboard: DashboardProps, filtersToRemove: Filter[]) => DashboardProps;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type DashboardModel } from '@sisense/sdk-ui-preact';
|
|
2
|
+
import { type DashboardProps } from '../components';
|
|
3
|
+
/**
|
|
4
|
+
* Translates {@link DashboardModel} to {@link DashboardProps}.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```html
|
|
8
|
+
<csdk-dashboard
|
|
9
|
+
*ngIf="dashboard"
|
|
10
|
+
[title]="dashboard.title"
|
|
11
|
+
[layoutOptions]="dashboard.layoutOptions"
|
|
12
|
+
[widgets]="dashboard.widgets"
|
|
13
|
+
[filters]="dashboard.filters"
|
|
14
|
+
[defaultDataSource]="dashboard.defaultDataSource"
|
|
15
|
+
[widgetsOptions]="dashboard.widgetsOptions"
|
|
16
|
+
/>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* ```ts
|
|
20
|
+
import { Component } from '@angular/core';
|
|
21
|
+
import {
|
|
22
|
+
type DashboardProps,
|
|
23
|
+
DashboardService,
|
|
24
|
+
dashboardModelTranslator,
|
|
25
|
+
} from '@sisense/sdk-ui-angular';
|
|
26
|
+
|
|
27
|
+
@Component({
|
|
28
|
+
selector: 'app-dashboard',
|
|
29
|
+
templateUrl: './dashboard.component.html',
|
|
30
|
+
styleUrls: ['./dashboard.component.scss'],
|
|
31
|
+
})
|
|
32
|
+
export class DashboardComponent {
|
|
33
|
+
dashboard: DashboardProps | null = null;
|
|
34
|
+
|
|
35
|
+
constructor(private dashboardService: DashboardService) {}
|
|
36
|
+
|
|
37
|
+
async ngOnInit(): Promise<void> {
|
|
38
|
+
const dashboardModel = await this.dashboardService.getDashboardModel('your-dashboard-oid', {
|
|
39
|
+
includeWidgets: true,
|
|
40
|
+
includeFilters: true,
|
|
41
|
+
});
|
|
42
|
+
this.dashboard = dashboardModelTranslator.toDashboardProps(dashboardModel);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare function toDashboardProps(dashboardModel: DashboardModel): DashboardProps;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {@inheritDoc @sisense/sdk-ui!dashboardModelTranslator}
|
|
3
|
+
*
|
|
4
|
+
* @group Fusion Assets
|
|
5
|
+
* @fusionEmbed
|
|
6
|
+
* @shortDescription Utility functions to translate a Fusion dashboard model from and to other dashboard data structures
|
|
7
|
+
*/
|
|
8
|
+
export * as dashboardModelTranslator from './dashboard-model-translator';
|
|
9
|
+
/**
|
|
10
|
+
* {@inheritDoc @sisense/sdk-ui!dashboardHelpers}
|
|
11
|
+
*
|
|
12
|
+
* @group Dashboards
|
|
13
|
+
* @shortDescription Utility functions to manipulate dashboard elements
|
|
14
|
+
*/
|
|
15
|
+
export * as dashboardHelpers from './dashboard-helpers';
|
|
16
|
+
/**
|
|
17
|
+
* {@inheritDoc @sisense/sdk-ui!widgetModelTranslator}
|
|
18
|
+
*
|
|
19
|
+
* @group Fusion Assets
|
|
20
|
+
* @fusionEmbed
|
|
21
|
+
* @shortDescription Utility functions to translate a Fusion widget model from and to other widget data structures
|
|
22
|
+
*/
|
|
23
|
+
export * as widgetModelTranslator from './widget-model-translator';
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { type WidgetModel, type TextWidgetProps } from '@sisense/sdk-ui-preact';
|
|
2
|
+
import { ExecutePivotQueryParams, ExecuteQueryParams } from '../services';
|
|
3
|
+
import { ChartProps, ChartWidgetProps, PivotTableProps, PivotTableWidgetProps, TableProps } from '../components';
|
|
4
|
+
/**
|
|
5
|
+
* Translates a {@link WidgetModel} to the parameters for executing a query for the widget.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
10
|
+
dashboardOid: 'your-dashboard-oid',
|
|
11
|
+
widgetOid: 'your-widget-oid'
|
|
12
|
+
});
|
|
13
|
+
const executeQueryParams = widgetModelTranslator.toExecuteQueryParams(widgetModel);
|
|
14
|
+
const queryResult = await queryService.executeQuery(executeQueryParams);
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* Note: this method is not supported for getting pivot query.
|
|
18
|
+
* Use {@link toExecutePivotQueryParams} instead for getting query parameters for the pivot widget.
|
|
19
|
+
*/
|
|
20
|
+
export declare const toExecuteQueryParams: (widgetModel: WidgetModel) => ExecuteQueryParams;
|
|
21
|
+
/**
|
|
22
|
+
* Translates a {@link WidgetModel} to the parameters for executing a query for the pivot widget.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
27
|
+
dashboardOid: 'your-dashboard-oid',
|
|
28
|
+
widgetOid: 'your-widget-oid'
|
|
29
|
+
});
|
|
30
|
+
const executePivotQueryParams = widgetModelTranslator.toExecutePivotQueryParams(widgetModel);
|
|
31
|
+
const queryResult = await queryService.executePivotQuery(executeQueryParams);
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* Note: this method is supported only for getting pivot query.
|
|
35
|
+
* Use {@link toExecuteQueryParams} instead for getting query parameters for non-pivot widgets.
|
|
36
|
+
*/
|
|
37
|
+
export declare const toExecutePivotQueryParams: (widgetModel: WidgetModel) => ExecutePivotQueryParams;
|
|
38
|
+
/**
|
|
39
|
+
* Translates a {@link WidgetModel} to the props for rendering a chart.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```html
|
|
43
|
+
<csdk-chart
|
|
44
|
+
*ngIf="chartProps"
|
|
45
|
+
[chartType]="chartProps.chartType"
|
|
46
|
+
[dataSet]="chartProps.dataSet"
|
|
47
|
+
[dataOptions]="chartProps.dataOptions"
|
|
48
|
+
[filters]="chartProps.filters"
|
|
49
|
+
[highlights]="chartProps.highlights"
|
|
50
|
+
[styleOptions]="chartProps.styleOptions"
|
|
51
|
+
/>
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* ```ts
|
|
55
|
+
import { Component } from '@angular/core';
|
|
56
|
+
import {
|
|
57
|
+
type ChartProps
|
|
58
|
+
WidgetService,
|
|
59
|
+
widgetModelTranslator,
|
|
60
|
+
} from '@sisense/sdk-ui-angular';
|
|
61
|
+
|
|
62
|
+
@Component({
|
|
63
|
+
selector: 'app-example',
|
|
64
|
+
templateUrl: './example.component.html',
|
|
65
|
+
styleUrls: ['./example.component.scss'],
|
|
66
|
+
})
|
|
67
|
+
export class ExampleComponent {
|
|
68
|
+
chartProps: ChartProps | null = null;
|
|
69
|
+
|
|
70
|
+
constructor(private widgetService: WidgetService) {}
|
|
71
|
+
|
|
72
|
+
async ngOnInit(): Promise<void> {
|
|
73
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
74
|
+
dashboardOid: 'your-dashboard-oid',
|
|
75
|
+
widgetOid: 'your-widget-oid'
|
|
76
|
+
});
|
|
77
|
+
this.chartProps = widgetModelTranslator.toChartProps(widgetModel);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* Note: this method is not supported for pivot widgets.
|
|
83
|
+
* Use {@link toPivotTableProps} instead for getting props for the {@link PivotTableComponent}.
|
|
84
|
+
*/
|
|
85
|
+
export declare function toChartProps(widgetModel: WidgetModel): ChartProps;
|
|
86
|
+
/**
|
|
87
|
+
* Translates a {@link WidgetModel} to the props for rendering a table.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```html
|
|
91
|
+
<csdk-table
|
|
92
|
+
*ngIf="tableProps"
|
|
93
|
+
[dataSet]="tableProps.dataSet"
|
|
94
|
+
[dataOptions]="tableProps.dataOptions"
|
|
95
|
+
[filters]="tableProps.filters"
|
|
96
|
+
[styleOptions]="tableProps.styleOptions"
|
|
97
|
+
/>
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* ```ts
|
|
101
|
+
import { Component } from '@angular/core';
|
|
102
|
+
import {
|
|
103
|
+
type TableProps
|
|
104
|
+
WidgetService,
|
|
105
|
+
widgetModelTranslator,
|
|
106
|
+
} from '@sisense/sdk-ui-angular';
|
|
107
|
+
|
|
108
|
+
@Component({
|
|
109
|
+
selector: 'app-example',
|
|
110
|
+
templateUrl: './example.component.html',
|
|
111
|
+
styleUrls: ['./example.component.scss'],
|
|
112
|
+
})
|
|
113
|
+
export class ExampleComponent {
|
|
114
|
+
tableProps: TableProps | null = null;
|
|
115
|
+
|
|
116
|
+
constructor(private widgetService: WidgetService) {}
|
|
117
|
+
|
|
118
|
+
async ngOnInit(): Promise<void> {
|
|
119
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
120
|
+
dashboardOid: 'your-dashboard-oid',
|
|
121
|
+
widgetOid: 'your-widget-oid'
|
|
122
|
+
});
|
|
123
|
+
this.tableProps = widgetModelTranslator.toTableProps(widgetModel);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* Note: this method is not supported for chart and pivot widgets.
|
|
129
|
+
* Use {@link toChartProps} instead for getting props for the {@link ChartComponent}.
|
|
130
|
+
* Use {@link toPivotTableProps} instead for getting props for the {@link PivotTableComponent}.
|
|
131
|
+
*/
|
|
132
|
+
export declare function toTableProps(widgetModel: WidgetModel): TableProps;
|
|
133
|
+
/**
|
|
134
|
+
* Translates a {@link WidgetModel} to the props for rendering a pivot table.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```html
|
|
138
|
+
<csdk-pivot-table
|
|
139
|
+
*ngIf="pivotTableProps"
|
|
140
|
+
[dataSet]="pivotTableProps.dataSet"
|
|
141
|
+
[dataOptions]="pivotTableProps.dataOptions"
|
|
142
|
+
[filters]="pivotTableProps.filters"
|
|
143
|
+
[styleOptions]="pivotTableProps.styleOptions"
|
|
144
|
+
/>
|
|
145
|
+
* ```
|
|
146
|
+
*
|
|
147
|
+
* ```ts
|
|
148
|
+
import { Component } from '@angular/core';
|
|
149
|
+
import {
|
|
150
|
+
type PivotTableProps
|
|
151
|
+
WidgetService,
|
|
152
|
+
widgetModelTranslator,
|
|
153
|
+
} from '@sisense/sdk-ui-angular';
|
|
154
|
+
|
|
155
|
+
@Component({
|
|
156
|
+
selector: 'app-example',
|
|
157
|
+
templateUrl: './example.component.html',
|
|
158
|
+
styleUrls: ['./example.component.scss'],
|
|
159
|
+
})
|
|
160
|
+
export class ExampleComponent {
|
|
161
|
+
pivotTableProps: PivotTableProps | null = null;
|
|
162
|
+
|
|
163
|
+
constructor(private widgetService: WidgetService) {}
|
|
164
|
+
|
|
165
|
+
async ngOnInit(): Promise<void> {
|
|
166
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
167
|
+
dashboardOid: 'your-dashboard-oid',
|
|
168
|
+
widgetOid: 'your-widget-oid'
|
|
169
|
+
});
|
|
170
|
+
this.pivotTableProps = widgetModelTranslator.toPivotTableProps(widgetModel);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
* ```
|
|
174
|
+
*
|
|
175
|
+
* Note: this method is not supported for chart or table widgets.
|
|
176
|
+
* Use {@link toChartProps} instead for getting props for the {@link ChartComponent}.
|
|
177
|
+
* Use {@link toTableProps} instead for getting props for the {@link TableComponent}.
|
|
178
|
+
*/
|
|
179
|
+
export declare function toPivotTableProps(widgetModel: WidgetModel): PivotTableProps;
|
|
180
|
+
/**
|
|
181
|
+
* Translates a {@link WidgetModel} to the props for rendering a chart widget.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```html
|
|
185
|
+
<csdk-chart-widget
|
|
186
|
+
*ngIf="chartWidgetProps"
|
|
187
|
+
[chartType]="chartWidgetProps.chartType"
|
|
188
|
+
[dataSource]="chartWidgetProps.dataSource"
|
|
189
|
+
[dataOptions]="chartWidgetProps.dataOptions"
|
|
190
|
+
[filters]="chartWidgetProps.filters"
|
|
191
|
+
[highlights]="chartWidgetProps.highlights"
|
|
192
|
+
[styleOptions]="chartWidgetProps.styleOptions"
|
|
193
|
+
/>
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* ```ts
|
|
197
|
+
import { Component } from '@angular/core';
|
|
198
|
+
import {
|
|
199
|
+
type ChartWidgetProps
|
|
200
|
+
WidgetService,
|
|
201
|
+
widgetModelTranslator,
|
|
202
|
+
} from '@sisense/sdk-ui-angular';
|
|
203
|
+
|
|
204
|
+
@Component({
|
|
205
|
+
selector: 'app-example',
|
|
206
|
+
templateUrl: './example.component.html',
|
|
207
|
+
styleUrls: ['./example.component.scss'],
|
|
208
|
+
})
|
|
209
|
+
export class ExampleComponent {
|
|
210
|
+
chartWidgetProps: ChartWidgetProps | null = null;
|
|
211
|
+
|
|
212
|
+
constructor(private widgetService: WidgetService) {}
|
|
213
|
+
|
|
214
|
+
async ngOnInit(): Promise<void> {
|
|
215
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
216
|
+
dashboardOid: 'your-dashboard-oid',
|
|
217
|
+
widgetOid: 'your-widget-oid'
|
|
218
|
+
});
|
|
219
|
+
this.chartWidgetProps = widgetModelTranslator.toChartWidgetProps(widgetModel);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
* ```
|
|
223
|
+
*
|
|
224
|
+
* Note: this method is not supported for pivot widgets.
|
|
225
|
+
*/
|
|
226
|
+
export declare function toChartWidgetProps(widgetModel: WidgetModel): ChartWidgetProps;
|
|
227
|
+
/**
|
|
228
|
+
* Translates a {@link WidgetModel} to the props for rendering a pivot table widget.
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* ```html
|
|
232
|
+
<csdk-pivot-table-widget
|
|
233
|
+
*ngIf="pivotWidgetProps"
|
|
234
|
+
[dataSet]="pivotWidgetProps.dataSet"
|
|
235
|
+
[dataOptions]="pivotWidgetProps.dataOptions"
|
|
236
|
+
[filters]="pivotWidgetProps.filters"
|
|
237
|
+
[styleOptions]="pivotWidgetProps.styleOptions"
|
|
238
|
+
/>
|
|
239
|
+
* ```
|
|
240
|
+
*
|
|
241
|
+
* ```ts
|
|
242
|
+
import { Component } from '@angular/core';
|
|
243
|
+
import {
|
|
244
|
+
type PivotTableWidgetProps
|
|
245
|
+
WidgetService,
|
|
246
|
+
widgetModelTranslator,
|
|
247
|
+
} from '@sisense/sdk-ui-angular';
|
|
248
|
+
|
|
249
|
+
@Component({
|
|
250
|
+
selector: 'app-example',
|
|
251
|
+
templateUrl: './example.component.html',
|
|
252
|
+
styleUrls: ['./example.component.scss'],
|
|
253
|
+
})
|
|
254
|
+
export class ExampleComponent {
|
|
255
|
+
pivotWidgetProps: PivotTableWidgetProps | null = null;
|
|
256
|
+
|
|
257
|
+
constructor(private widgetService: WidgetService) {}
|
|
258
|
+
|
|
259
|
+
async ngOnInit(): Promise<void> {
|
|
260
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
261
|
+
dashboardOid: 'your-dashboard-oid',
|
|
262
|
+
widgetOid: 'your-widget-oid'
|
|
263
|
+
});
|
|
264
|
+
this.pivotWidgetProps = widgetModelTranslator.toPivotTableWidgetProps(widgetModel);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
* ```
|
|
268
|
+
*
|
|
269
|
+
* Note: this method is not supported for chart or table widgets.
|
|
270
|
+
* Use {@link toChartWidgetProps} instead for getting props for the {@link ChartWidgetComponent}.
|
|
271
|
+
*/
|
|
272
|
+
export declare function toPivotTableWidgetProps(widgetModel: WidgetModel): PivotTableWidgetProps;
|
|
273
|
+
/**
|
|
274
|
+
* Translates a {@link WidgetModel} to the props for rendering a text widget.
|
|
275
|
+
*
|
|
276
|
+
* @example
|
|
277
|
+
* ```ts
|
|
278
|
+
const widgetModel = await widgetService.getWidgetModel({
|
|
279
|
+
dashboardOid: 'your-dashboard-oid',
|
|
280
|
+
widgetOid: 'your-widget-oid'
|
|
281
|
+
});
|
|
282
|
+
const textWidgetProps = widgetModelTranslator.toTextWidgetProps(widgetModel);
|
|
283
|
+
* ```
|
|
284
|
+
*
|
|
285
|
+
* Note: this method is not supported for chart or pivot widgets.
|
|
286
|
+
* Use {@link toChartWidgetProps} instead for getting props for the {@link ChartWidgetComponent}.
|
|
287
|
+
* Use {@link toPivotTableWidgetProps} instead for getting props for the pivot table widget.
|
|
288
|
+
*/
|
|
289
|
+
export declare function toTextWidgetProps(widgetModel: WidgetModel): TextWidgetProps;
|
package/dist/package.json
CHANGED
package/dist/public-api.d.ts
CHANGED
|
@@ -1,28 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
3
|
-
* @groupDescription Charts
|
|
4
|
-
* Angular components and utilities for working with charts
|
|
5
|
-
* @groupDescription Data Grids
|
|
6
|
-
* Angular components for data grids
|
|
7
|
-
* @groupDescription Drilldown
|
|
8
|
-
* Angular components for creating drilldown experiences
|
|
9
|
-
* @groupDescription Filter Tiles
|
|
10
|
-
* Angular filter tile components
|
|
11
|
-
* @groupDescription Contexts
|
|
12
|
-
* Angular context modules, services, and variables
|
|
13
|
-
* @groupDescription Queries
|
|
14
|
-
* Angular query service
|
|
15
|
-
* @groupDescription Dashboards
|
|
16
|
-
* Angular components and utilities for working with dashboards
|
|
17
|
-
* @groupDescription Fusion Assets
|
|
18
|
-
* Angular modules, services, and components for working with Fusion dashboards, widgets, queries, and formulas
|
|
19
|
-
* @groupDescription Interfaces
|
|
20
|
-
* TypeScript interfaces for components and services listed above
|
|
21
|
-
* @groupDescription Type Aliases
|
|
22
|
-
* TypeScript type aliases for components and services listed above
|
|
2
|
+
* Public API Surface of @sisense/sdk-ui-angular
|
|
23
3
|
*/
|
|
24
4
|
export * from './lib/sdk-ui.module';
|
|
25
5
|
export * from './lib/components';
|
|
26
6
|
export * from './lib/services';
|
|
7
|
+
export * from './lib/utilities';
|
|
27
8
|
export * from './lib/sdk-ui-core-exports';
|
|
28
|
-
export type { DataPointEvent, AreamapDataPointEvent, BoxplotDataPointEvent, ScatterDataPointEvent, ScattermapDataPointEvent, ChartDataPointEvent, DataPointsEvent, ChartDataPointsEvent, ScatterDataPointsEvent, DataPointEventHandler, ScattermapDataPointEventHandler, AreamapDataPointEventHandler, BoxplotDataPointEventHandler, DataPointsEventHandler, ScatterDataPointEventHandler, ScatterDataPointsEventHandler, } from './lib/types';
|
|
9
|
+
export type { DataPointEvent, AreamapDataPointEvent, BoxplotDataPointEvent, ScatterDataPointEvent, ScattermapDataPointEvent, ChartDataPointEvent, DataPointsEvent, ChartDataPointsEvent, ScatterDataPointsEvent, DataPointEventHandler, ScattermapDataPointEventHandler, AreamapDataPointEventHandler, BoxplotDataPointEventHandler, DataPointsEventHandler, ScatterDataPointEventHandler, ScatterDataPointsEventHandler, DashboardConfig, DashboardByIdConfig, DashboardFiltersPanelConfig, } from './lib/types';
|
|
10
|
+
export { createThemeContextConnector, createSisenseContextConnector, createPluginsContextConnector, } from './lib/component-wrapper-helpers';
|
|
11
|
+
export { TrackableService } from './lib/decorators';
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.
|
|
1
|
+
declare const _default: "1.33.0";
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Sisense",
|
|
12
12
|
"Compose SDK"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.33.0",
|
|
15
15
|
"author": "Sisense",
|
|
16
16
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
17
17
|
"main": "dist",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@sisense/sdk-data": "^1.
|
|
80
|
-
"@sisense/sdk-tracking": "^1.
|
|
81
|
-
"@sisense/sdk-ui-preact": "^1.
|
|
79
|
+
"@sisense/sdk-data": "^1.33.0",
|
|
80
|
+
"@sisense/sdk-tracking": "^1.33.0",
|
|
81
|
+
"@sisense/sdk-ui-preact": "^1.33.0",
|
|
82
82
|
"rxjs": "^7.8.1",
|
|
83
83
|
"ts-deepmerge": "^6.2.0",
|
|
84
84
|
"tslib": "^2.3.0"
|