@sisense/sdk-ui 1.17.1 → 1.18.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.cjs +1 -1
- package/dist/ai.js +55 -55
- package/dist/analytics-composer.cjs +1 -1
- package/dist/analytics-composer.js +1 -1
- package/dist/api/types/dashboard-dto.d.ts +3 -0
- package/dist/app/client-application.d.ts +2 -2
- package/dist/chart-data-options/types.d.ts +2 -2
- package/dist/chart-options-processor/advanced-analytics/tooltips/forecast-tooltip.d.ts +14 -0
- package/dist/chart-options-processor/advanced-analytics/tooltips/tooltip-footer.d.ts +6 -0
- package/dist/chart-options-processor/advanced-analytics/tooltips/tooltip-row.d.ts +6 -0
- package/dist/chart-options-processor/advanced-analytics/tooltips/tooltip-title.d.ts +6 -0
- package/dist/chart-options-processor/advanced-analytics/tooltips/trend-tooltip.d.ts +24 -0
- package/dist/chart-options-processor/advanced-chart-options.d.ts +3 -4
- package/dist/chart-options-processor/boxplot-chart-options.d.ts +2 -2
- package/dist/chart-options-processor/translations/axis-section.d.ts +2 -2
- package/dist/chart-options-processor/translations/boxplot/boxplot-series.d.ts +2 -2
- package/dist/chart-options-processor/translations/design-options.d.ts +7 -1
- package/dist/chart-options-processor/translations/navigator.d.ts +2 -1
- package/dist/chart-options-processor/translations/sunburst/sunburst-series.d.ts +6 -0
- package/dist/chart-options-processor/translations/tooltip-utils.d.ts +6 -0
- package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +6 -0
- package/dist/common/components/loading-indicator.d.ts +6 -0
- package/dist/dashboard/dashboard-by-id.d.ts +18 -0
- package/dist/dashboard/dashboard.d.ts +34 -0
- package/dist/dashboard-widget/translate-dashboard-filters.d.ts +19 -1
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +14 -0
- package/dist/dashboard-widget/translate-widget-filters.d.ts +1 -1
- package/dist/dashboard-widget/translate-widget-style-options.d.ts +7 -3
- package/dist/dashboard-widget/types.d.ts +51 -0
- package/dist/dashboard-widget/utils.d.ts +2 -1
- package/dist/get-widget-options-CDWzHX-s.cjs +271 -0
- package/dist/get-widget-options-DJexR5_Z.js +43751 -0
- package/dist/index.cjs +167 -172
- package/dist/index.d.ts +4 -0
- package/dist/index.js +17247 -19557
- package/dist/props.d.ts +8 -1
- package/dist/translation/resources/en.d.ts +10 -0
- package/dist/translation/resources/index.d.ts +20 -0
- package/dist/types.d.ts +20 -1
- package/dist/{useQuery-DLPVGDKo.js → useQuery-Bkuiz8XK.js} +10245 -9427
- package/dist/useQuery-CZAKQmD7.cjs +433 -0
- package/package.json +8 -8
- package/dist/get-widget-options-D4UHj7o5.cjs +0 -198
- package/dist/get-widget-options-D88MkBTJ.js +0 -37924
- package/dist/useQuery-CFlf48eQ.cjs +0 -433
|
@@ -22,7 +22,13 @@ export type BaseDesignOptionsType = {
|
|
|
22
22
|
yAxis: Axis;
|
|
23
23
|
x2Axis?: Axis;
|
|
24
24
|
y2Axis?: Axis;
|
|
25
|
-
autoZoom:
|
|
25
|
+
autoZoom: {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
scrollerLocation?: {
|
|
28
|
+
min: number;
|
|
29
|
+
max: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
26
32
|
dataLimits: DataLimits;
|
|
27
33
|
};
|
|
28
34
|
export type CartesianChartDesignOptions = BaseDesignOptionsType & DesignPerSeries;
|
|
@@ -26,7 +26,8 @@ type Navigator = {
|
|
|
26
26
|
right: string;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
export declare const getNavigator: (type: HighchartsType, enabled: boolean, xAxisCount: number) => Navigator | {
|
|
29
|
+
export declare const getNavigator: (type: HighchartsType, enabled: boolean, xAxisCount: number, dimension: number, isVertical?: boolean) => Navigator | {
|
|
30
30
|
enabled: boolean;
|
|
31
31
|
};
|
|
32
|
+
export declare function setInitialScrollerPosition(chart: Highcharts.Chart, scrollerStart: number, scrollerEnd: number): void;
|
|
32
33
|
export {};
|
|
@@ -37,4 +37,10 @@ export declare function prepareSunburstDataItems(chartData: CategoricalChartData
|
|
|
37
37
|
parent?: string | undefined;
|
|
38
38
|
low?: number | null | undefined;
|
|
39
39
|
high?: number | null | undefined;
|
|
40
|
+
trend?: {
|
|
41
|
+
min: number;
|
|
42
|
+
max: number;
|
|
43
|
+
median: number;
|
|
44
|
+
average: number;
|
|
45
|
+
} | undefined;
|
|
40
46
|
})[];
|
|
@@ -41,6 +41,12 @@ export type SeriesPointStructure = {
|
|
|
41
41
|
parent?: string;
|
|
42
42
|
low?: number | null;
|
|
43
43
|
high?: number | null;
|
|
44
|
+
trend?: {
|
|
45
|
+
min: number;
|
|
46
|
+
max: number;
|
|
47
|
+
median: number;
|
|
48
|
+
average: number;
|
|
49
|
+
};
|
|
44
50
|
};
|
|
45
51
|
export type AxisClipped = {
|
|
46
52
|
minClipped: boolean;
|
|
@@ -56,6 +56,12 @@ export declare const LoadingIndicator: ({ themeSettings, onCancel, }: {
|
|
|
56
56
|
dividerLineWidth: number;
|
|
57
57
|
dividerLineColor: string;
|
|
58
58
|
};
|
|
59
|
+
filter: {
|
|
60
|
+
panel: {
|
|
61
|
+
titleColor: string;
|
|
62
|
+
backgroundColor: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
59
65
|
aiChat: {
|
|
60
66
|
backgroundColor: string;
|
|
61
67
|
primaryTextColor: string;
|
|
@@ -5,6 +5,24 @@ import { DashboardByIdProps } from './types';
|
|
|
5
5
|
*
|
|
6
6
|
* **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
|
|
7
7
|
*
|
|
8
|
+
* @example
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { DashboardById } from '@sisense/sdk-ui';
|
|
12
|
+
|
|
13
|
+
const CodeExample = () => {
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<DashboardById
|
|
17
|
+
dashboardOid="65a82171719e7f004018691c"
|
|
18
|
+
/>
|
|
19
|
+
</>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default CodeExample;
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
8
26
|
* @group Fusion Embed
|
|
9
27
|
* @fusionEmbed
|
|
10
28
|
* @alpha
|
|
@@ -5,6 +5,40 @@ import { DashboardProps } from '../dashboard/types';
|
|
|
5
5
|
*
|
|
6
6
|
* **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
|
|
7
7
|
*
|
|
8
|
+
* @example
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { Dashboard, useGetDashboardModel } from '@sisense/sdk-ui';
|
|
12
|
+
|
|
13
|
+
const CodeExample = () => {
|
|
14
|
+
const { dashboard } = useGetDashboardModel({
|
|
15
|
+
dashboardOid: '65a82171719e7f004018691c',
|
|
16
|
+
includeFilters: true,
|
|
17
|
+
includeWidgets: true,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<>
|
|
22
|
+
{dashboard && (
|
|
23
|
+
<Dashboard
|
|
24
|
+
defaultDataSource={dashboard.dataSource}
|
|
25
|
+
title={dashboard.title}
|
|
26
|
+
layout={dashboard.layout}
|
|
27
|
+
styleOptions={dashboard.styleOptions}
|
|
28
|
+
widgets={dashboard.widgets}
|
|
29
|
+
filters={dashboard.filters}
|
|
30
|
+
widgetFilterOptions={
|
|
31
|
+
dashboard.widgetFilterOptions
|
|
32
|
+
}
|
|
33
|
+
/>
|
|
34
|
+
)}
|
|
35
|
+
</>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default CodeExample;
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
8
42
|
* @group Fusion Embed
|
|
9
43
|
* @fusionEmbed
|
|
10
44
|
* @alpha
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { DashboardDto, FilterDto, CascadingFilterDto } from '../api/types/dashboard-dto';
|
|
2
2
|
import { FiltersIgnoringRules, WidgetDto } from './types';
|
|
3
3
|
import { IncludeAllFilter } from '@sisense/sdk-data';
|
|
4
|
+
/**
|
|
5
|
+
* Extracts and merges dashboard and widget filters. This consolidates all
|
|
6
|
+
* filters applicable for a widget.
|
|
7
|
+
*
|
|
8
|
+
* @param dashboard - The dashboard containing the filters.
|
|
9
|
+
* @param widget - The widget containing the filters.
|
|
10
|
+
* @returns An object containing an array of filters and an array of highlights.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function extractCombinedFilters(dashboard: DashboardDto, widget: WidgetDto): {
|
|
14
|
+
filters: import("@sisense/sdk-data").Filter[];
|
|
15
|
+
highlights: import("@sisense/sdk-data").Filter[];
|
|
16
|
+
};
|
|
4
17
|
/**
|
|
5
18
|
* Extracts dashboard filters applicable to a widget.
|
|
6
19
|
*
|
|
@@ -520,7 +533,12 @@ export declare function getDashboardFilters(dashboardFilters: Array<FilterDto |
|
|
|
520
533
|
level?: "string" | undefined;
|
|
521
534
|
}) | undefined;
|
|
522
535
|
exclude: {
|
|
523
|
-
members: string[];
|
|
536
|
+
members: string[]; /**
|
|
537
|
+
* Retrieves a list of attributes allowed for widget highlight filters.
|
|
538
|
+
*
|
|
539
|
+
* @param {WidgetDto} widget - The widget to retrieve highlight attributes from.
|
|
540
|
+
* @returns {string[]} An array of allowed attributes for highlight filters.
|
|
541
|
+
*/
|
|
524
542
|
};
|
|
525
543
|
} | {
|
|
526
544
|
filter?: import("@sisense/sdk-data").TurnOffMembersFilter | ({
|
|
@@ -3,6 +3,20 @@ import { StyledMeasureColumn, StyledColumn, Color } from '../types';
|
|
|
3
3
|
import { Panel, PanelItem, WidgetType, WidgetStyle, BoxplotWidgetStyle } from './types';
|
|
4
4
|
import { WidgetDataOptions } from '../models';
|
|
5
5
|
export declare function createDimensionalElementFromJaql(jaql: Jaql, format?: PanelItem['format']): import("@sisense/sdk-data").Filter | DimensionalAttribute | DimensionalCalculatedMeasure | DimensionalBaseMeasure;
|
|
6
|
+
/** @internal */
|
|
7
|
+
export declare function applyStatisticalModels(dataOption: StyledMeasureColumn, statisticalModels?: {
|
|
8
|
+
forecast?: {
|
|
9
|
+
isEnabled: boolean;
|
|
10
|
+
isViewerDisabled: boolean;
|
|
11
|
+
confidence: number;
|
|
12
|
+
forecastPeriod: number;
|
|
13
|
+
};
|
|
14
|
+
trend?: {
|
|
15
|
+
isEnabled: boolean;
|
|
16
|
+
isViewerDisabled: boolean;
|
|
17
|
+
trendType: string;
|
|
18
|
+
};
|
|
19
|
+
}): StyledMeasureColumn;
|
|
6
20
|
export declare function createDataColumn(item: PanelItem, customPaletteColors?: Color[]): StyledMeasureColumn | StyledColumn;
|
|
7
21
|
/** @internal */
|
|
8
22
|
export declare const createDataOptionsFromPanels: (panels: Panel[], variantColors: Color[]) => {
|
|
@@ -864,4 +864,4 @@ export declare function extractFilterModelFromJaql(jaql: FilterJaql): {
|
|
|
864
864
|
* @param panels - The array of panels.
|
|
865
865
|
* @returns The extracted filters.
|
|
866
866
|
*/
|
|
867
|
-
export declare function
|
|
867
|
+
export declare function extractWidgetFilters(panels: Panel[]): import("@sisense/sdk-data").Filter[];
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { ChartStyleOptions, TableStyleOptions, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, GaugeIndicatorStyleOptions, PivotTableStyleOptions, WidgetStyleOptions } from '../types';
|
|
2
|
-
import {
|
|
1
|
+
import { ChartStyleOptions, LineStyleOptions, AreaStyleOptions, StackableStyleOptions, TableStyleOptions, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, GaugeIndicatorStyleOptions, PivotTableStyleOptions, WidgetStyleOptions } from '../types';
|
|
2
|
+
import { WidgetSubtype, WidgetType, TableWidgetStyle, IndicatorWidgetStyle, PivotWidgetStyle, WidgetDesign, WidgetDto } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export type CartesianChartStyleOptions = LineStyleOptions | AreaStyleOptions | StackableStyleOptions;
|
|
3
7
|
export declare function extractTableChartStyleOptions(widgetStyle: TableWidgetStyle): TableStyleOptions;
|
|
4
8
|
export declare const getIndicatorTypeSpecificOptions: (widgetSubtype: WidgetSubtype, widgetStyle: IndicatorWidgetStyle) => NumericSimpleIndicatorStyleOptions | NumericBarIndicatorStyleOptions | GaugeIndicatorStyleOptions;
|
|
5
9
|
export declare function extractPivotTableStyleOptions(widgetStyle: PivotWidgetStyle): PivotTableStyleOptions;
|
|
6
|
-
export declare function extractStyleOptions<WType extends WidgetType>(widgetType: WType,
|
|
10
|
+
export declare function extractStyleOptions<WType extends WidgetType>(widgetType: WType, widget: WidgetDto): ChartStyleOptions | TableStyleOptions;
|
|
7
11
|
/**
|
|
8
12
|
* Merges the widget style with the widget design
|
|
9
13
|
*
|
|
@@ -35,6 +35,8 @@ export type Datasource = {
|
|
|
35
35
|
*
|
|
36
36
|
* This is the (not-comprehensive) structure of the response from the
|
|
37
37
|
* `/api/v1/dashboards/${dashboardOid}/widgets/${widgetOid}` endpoint.
|
|
38
|
+
*
|
|
39
|
+
* @internal
|
|
38
40
|
*/
|
|
39
41
|
export interface WidgetDto {
|
|
40
42
|
oid: string;
|
|
@@ -53,8 +55,16 @@ export interface WidgetDto {
|
|
|
53
55
|
dashboardFiltersMode: `${WidgetDashboardFilterMode}`;
|
|
54
56
|
selector: boolean;
|
|
55
57
|
drillToAnywhere?: boolean;
|
|
58
|
+
previousScrollerLocation?: AutoZoomNavigatorScrollerLocation;
|
|
56
59
|
};
|
|
57
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* @description the scroll location of the navigator scroller / auto zoom feature
|
|
63
|
+
*/
|
|
64
|
+
export type AutoZoomNavigatorScrollerLocation = {
|
|
65
|
+
min: number;
|
|
66
|
+
max: number;
|
|
67
|
+
};
|
|
58
68
|
export type WidgetDesign = {
|
|
59
69
|
widgetBackgroundColor: string;
|
|
60
70
|
widgetSpacing: keyof typeof LEGACY_DESIGN_TYPES;
|
|
@@ -114,6 +124,46 @@ export type DatetimeMask = {
|
|
|
114
124
|
type: string;
|
|
115
125
|
dateAndTime?: string;
|
|
116
126
|
};
|
|
127
|
+
export type StatisticalModels = {
|
|
128
|
+
forecast?: {
|
|
129
|
+
isEnabled: boolean;
|
|
130
|
+
isViewerDisabled: boolean;
|
|
131
|
+
explainVariable: null;
|
|
132
|
+
evaluation: {
|
|
133
|
+
type: string;
|
|
134
|
+
numLastPointsForEvaluation: number;
|
|
135
|
+
ignoreLast: number;
|
|
136
|
+
};
|
|
137
|
+
forecastPeriod: number;
|
|
138
|
+
confidence: number;
|
|
139
|
+
modelType: string;
|
|
140
|
+
boundaries: {
|
|
141
|
+
upper: {
|
|
142
|
+
isEnabled: boolean;
|
|
143
|
+
value: null;
|
|
144
|
+
};
|
|
145
|
+
lower: {
|
|
146
|
+
isEnabled: boolean;
|
|
147
|
+
value: null;
|
|
148
|
+
};
|
|
149
|
+
isInt: {
|
|
150
|
+
isEnabled: boolean;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
trend?: {
|
|
155
|
+
isEnabled: boolean;
|
|
156
|
+
isViewerDisabled: boolean;
|
|
157
|
+
trendType: string;
|
|
158
|
+
ignoreAnomalies: boolean;
|
|
159
|
+
trendOnForecast: boolean;
|
|
160
|
+
compare: {
|
|
161
|
+
isEnabled: boolean;
|
|
162
|
+
period: string;
|
|
163
|
+
};
|
|
164
|
+
isAccessible: boolean;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
117
167
|
export type PanelItem = {
|
|
118
168
|
instanceid?: string;
|
|
119
169
|
format?: {
|
|
@@ -134,6 +184,7 @@ export type PanelItem = {
|
|
|
134
184
|
categoriesSorting?: JaqlSortDirection;
|
|
135
185
|
isColored?: boolean;
|
|
136
186
|
geoLevel?: 'country' | 'state' | 'city';
|
|
187
|
+
statisticalModels?: StatisticalModels;
|
|
137
188
|
field?: {
|
|
138
189
|
id: string;
|
|
139
190
|
index: number;
|
|
@@ -51,10 +51,11 @@ export declare function mergeFiltersByStrategy(widgetFilters?: Filter[], codeFil
|
|
|
51
51
|
* Replaces nodes of filter reations tree with fetched filters by instance id.
|
|
52
52
|
*
|
|
53
53
|
* @param filters - The filters from the dashboard.
|
|
54
|
+
* @param highlights - The highlights from the dashboard
|
|
54
55
|
* @param filterRelations - Fetched filter relations.
|
|
55
56
|
* @returns {FilterRelations} Filter relations with filters in nodes.
|
|
56
57
|
*/
|
|
57
|
-
export declare function getFilterRelationsFromJaql(filters: Filter[], filterRelations: FilterRelationsJaql | undefined): FilterRelations | Filter[];
|
|
58
|
+
export declare function getFilterRelationsFromJaql(filters: Filter[], highlights: Filter[], filterRelations: FilterRelationsJaql | undefined): FilterRelations | Filter[];
|
|
58
59
|
/**
|
|
59
60
|
* Converts filter relations model to filter relations jaql.
|
|
60
61
|
*
|