@sisense/sdk-ui 1.7.2 → 1.9.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/ai-disclaimer.d.ts +5 -0
- package/dist/ai/chat-config.d.ts +26 -0
- package/dist/ai/chat-dropup.d.ts +12 -0
- package/dist/ai/chat-frame.d.ts +7 -4
- package/dist/ai/chat-input.d.ts +4 -1
- package/dist/ai/chatbot.d.ts +0 -7
- package/dist/ai/common/dropup-section.d.ts +8 -0
- package/dist/ai/common/icon-button.d.ts +12 -0
- package/dist/ai/{toolbar.d.ts → common/toolbar.d.ts} +5 -0
- package/dist/ai/common/tooltip.d.ts +1 -1
- package/dist/ai/icons/arrow-left-icon.d.ts +5 -1
- package/dist/ai/icons/clear-chat-icon.d.ts +2 -1
- package/dist/ai/icons/expand-icon.d.ts +3 -1
- package/dist/ai/icons/info-icon.d.ts +3 -1
- package/dist/ai/icons/light-bulb-icon.d.ts +3 -1
- package/dist/ai/icons/message-icon.d.ts +2 -1
- package/dist/ai/icons/sisense-logo.d.ts +5 -1
- package/dist/ai/icons/three-dots-icon.d.ts +3 -1
- package/dist/ai/icons/thumbs-down-hovered-icon.d.ts +2 -1
- package/dist/ai/icons/thumbs-down-icon.d.ts +2 -1
- package/dist/ai/icons/thumbs-up-hovered-icon.d.ts +2 -1
- package/dist/ai/icons/thumbs-up-icon.d.ts +2 -1
- package/dist/ai/messages/chat-welcome-message.d.ts +1 -1
- package/dist/ai/messages/clickable-message.d.ts +11 -0
- package/dist/ai/messages/feedback-wrapper.d.ts +2 -2
- package/dist/ai/messages/insights-message.d.ts +3 -3
- package/dist/ai/messages/jaql-element.d.ts +5 -2
- package/dist/ai/messages/message-resolver.d.ts +2 -1
- package/dist/ai/messages/nlq-message-group.d.ts +6 -3
- package/dist/ai/messages/text-message.d.ts +4 -6
- package/dist/ai/nav-back-button.d.ts +6 -3
- package/dist/ai/translators/model-translator.d.ts +1 -0
- package/dist/ai/translators/query-translator.d.ts +16 -1
- package/dist/ai/translators/translate-filters-to-code.d.ts +2 -0
- package/dist/ai/translators/translate-props-to-code.d.ts +1 -1
- package/dist/ai/translators/utils.d.ts +10 -0
- package/dist/ai.js +2981 -2592
- package/dist/api/types/dashboard-dto.d.ts +16 -0
- package/dist/app/client-application.d.ts +6 -2
- package/dist/area-chart.d.ts +14 -18
- package/dist/areamap-chart.d.ts +13 -15
- package/dist/bar-chart.d.ts +13 -18
- package/dist/boxplot-chart.d.ts +11 -25
- package/dist/chart/chart.d.ts +8 -66
- package/dist/chart-data/cartesian-data.d.ts +1 -1
- package/dist/chart-data/chart-data-service.d.ts +1 -2
- package/dist/chart-data/data-coloring/types.d.ts +1 -7
- package/dist/chart-data-options/types.d.ts +5 -3
- package/dist/chart-data-options/utils.d.ts +10 -0
- package/dist/chart-options-processor/theme-option-service.d.ts +0 -8
- package/dist/column-chart.d.ts +15 -18
- package/dist/common/components/loading-indicator.d.ts +82 -0
- package/dist/dashboard-widget/dashboard-widget.d.ts +10 -7
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +1 -1
- package/dist/dashboard-widget/translate-widget-filters.d.ts +22 -14
- package/dist/dashboard-widget/translate-widget-style-options.d.ts +3 -2
- package/dist/dashboard-widget/types.d.ts +24 -4
- package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +1 -0
- package/dist/dashboard-widget/utils.d.ts +4 -2
- package/dist/debounce-Cc9bQD5m.js +76199 -0
- package/dist/dynamic-size-container/default-size.d.ts +5 -1
- package/dist/dynamic-size-container/dynamic-size-container.d.ts +12 -3
- package/dist/filters/components/common/dropdown.d.ts +1 -1
- package/dist/filters/components/common/switch.d.ts +3 -1
- package/dist/formulas/use-get-shared-formula.d.ts +3 -3
- package/dist/funnel-chart.d.ts +9 -36
- package/dist/index.d.ts +1 -2
- package/dist/index.js +46556 -7127
- package/dist/indicator-chart.d.ts +0 -1
- package/dist/line-chart.d.ts +14 -17
- package/dist/models/dashboard/translate-dashboard.d.ts +3 -2
- package/dist/models/dashboard/types.d.ts +6 -8
- package/dist/models/widget/use-get-widget-model.d.ts +16 -21
- package/dist/models/widget/widget-model.d.ts +50 -6
- package/dist/pie-chart.d.ts +14 -16
- package/dist/pivot-table/helpers/prepare-pivot-styling-props.d.ts +20 -0
- package/dist/pivot-table/pivot-table.d.ts +43 -3
- package/dist/pivot-table/sorting-utils.d.ts +11 -55
- package/dist/pivot-table/use-get-pivot-table-query.d.ts +10 -2
- package/dist/pivot-table/use-pivot-table-data-options-internal.d.ts +15 -0
- package/dist/polar-chart.d.ts +14 -17
- package/dist/props.d.ts +72 -13
- package/dist/query-execution/use-execute-pivot-query.d.ts +11 -29
- package/dist/query-execution/use-execute-query.d.ts +19 -26
- package/dist/scatter-chart.d.ts +11 -49
- package/dist/scattermap-chart.d.ts +9 -22
- package/dist/sunburst-chart.d.ts +10 -15
- package/dist/table/table.d.ts +7 -37
- package/dist/theme-provider/default-theme-settings.d.ts +9 -0
- package/dist/theme-provider/types.d.ts +7 -0
- package/dist/translation/resources/en.d.ts +4 -1
- package/dist/translation/resources/index.d.ts +8 -2
- package/dist/treemap-chart.d.ts +10 -21
- package/dist/types.d.ts +172 -4
- package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
- package/dist/widgets/common/drilldown.d.ts +1 -20
- package/dist/widgets/common/widget-container.d.ts +15 -0
- package/dist/widgets/drilldown-widget.d.ts +21 -33
- package/dist/widgets/pivot-table-widget.d.ts +22 -0
- package/package.json +10 -9
- package/dist/ai/chat-style-provider.d.ts +0 -22
- package/dist/ai/icons/magic-wand-icon.d.ts +0 -2
- package/dist/ai/magic-wand-dropdown.d.ts +0 -7
- package/dist/ai/suggestions/suggestion-dropdown-item.d.ts +0 -7
- package/dist/ai/suggestions/suggestion-dropdown-list.d.ts +0 -7
- package/dist/useQuery-76ecbd20.js +0 -121360
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { IndicatorChartProps } from './props';
|
|
3
3
|
/**
|
|
4
4
|
* A React component that provides various options for displaying one or two numeric values as a number, gauge or ticker.
|
|
5
|
-
* See [Indicator](https://docs.sisense.com/main/SisenseLinux/indicator.htm) for more information.
|
|
6
5
|
*
|
|
7
6
|
* @example
|
|
8
7
|
* An example of using the component to visualize the `Sample ECommerce` data source:
|
package/dist/line-chart.d.ts
CHANGED
|
@@ -2,26 +2,23 @@
|
|
|
2
2
|
import { LineChartProps } from './props';
|
|
3
3
|
/**
|
|
4
4
|
* A React component displaying data as a series of points connected by a line. Used to show trends or changes over time.
|
|
5
|
-
* See [Line Chart](https://docs.sisense.com/main/SisenseLinux/line-chart.htm) for more information.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* }}
|
|
17
|
-
* filters={[filterFactory.greaterThan(DM.Commerce.Revenue, 1000)]}
|
|
18
|
-
* onDataPointClick= {(point, nativeEvent) => {
|
|
19
|
-
* console.log('clicked', point, nativeEvent);
|
|
20
|
-
* }}
|
|
6
|
+
* ## Example
|
|
7
|
+
*
|
|
8
|
+
* Line chart displaying total revenue per quarter from the Sample ECommerce data model.
|
|
9
|
+
*
|
|
10
|
+
* <iframe
|
|
11
|
+
* src='https://csdk-playground.sisense.com/?example=charts%2Fline-chart&mode=docs'
|
|
12
|
+
* width=800
|
|
13
|
+
* height=870
|
|
14
|
+
* style='border:none;'
|
|
21
15
|
* />
|
|
22
|
-
* ```
|
|
23
16
|
*
|
|
24
|
-
*
|
|
17
|
+
* Additional Line Chart examples:
|
|
18
|
+
*
|
|
19
|
+
* - [Curved Line Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fline-chart-spline)
|
|
20
|
+
* - [Styled Line Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fline-chart-styled)
|
|
21
|
+
*
|
|
25
22
|
* @param props - Line chart properties
|
|
26
23
|
* @returns Line Chart component
|
|
27
24
|
* @group Charts
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { DashboardDto, Layout as SisenseLayout } from '../../api/types/dashboard-dto';
|
|
2
|
+
import type { Layout, DashboardModel } from './types';
|
|
3
|
+
export declare const translateLayout: (layout: SisenseLayout) => Layout;
|
|
3
4
|
export declare function translateDashboard({ oid, title, datasource, widgets, layout, }: DashboardDto): DashboardModel;
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { type DataSource } from '@sisense/sdk-data';
|
|
2
2
|
import { WidgetModel } from '../widget/widget-model';
|
|
3
3
|
/** @internal */
|
|
4
|
-
export
|
|
4
|
+
export interface Layout {
|
|
5
5
|
columns: {
|
|
6
|
-
|
|
6
|
+
widthPercentage: number;
|
|
7
7
|
cells: {
|
|
8
8
|
subcells: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
widgetId: string;
|
|
13
|
-
}[];
|
|
9
|
+
widthPercentage: number;
|
|
10
|
+
height: number | string;
|
|
11
|
+
widgetId: string;
|
|
14
12
|
}[];
|
|
15
13
|
}[];
|
|
16
14
|
}[];
|
|
17
|
-
}
|
|
15
|
+
}
|
|
18
16
|
export type DashboardModel = {
|
|
19
17
|
oid: string;
|
|
20
18
|
title: string;
|
|
@@ -69,28 +69,23 @@ export type WidgetModelSuccessState = {
|
|
|
69
69
|
status: 'success';
|
|
70
70
|
};
|
|
71
71
|
/**
|
|
72
|
-
* React hook that retrieves an existing widget model from
|
|
72
|
+
* React hook that retrieves an existing widget model from a Fusion Embed instance.
|
|
73
|
+
*
|
|
74
|
+
* ## Example
|
|
75
|
+
*
|
|
76
|
+
* Retrieve a widget model and use it to populate a `Chart` component
|
|
77
|
+
*
|
|
78
|
+
* <iframe
|
|
79
|
+
* src='https://csdk-playground.sisense.com/?example=fusion-assets%2Fuse-get-widget-model&mode=docs'
|
|
80
|
+
* width=800
|
|
81
|
+
* height=870
|
|
82
|
+
* style='border:none;'
|
|
83
|
+
* />
|
|
84
|
+
*
|
|
85
|
+
* Additional `useGetWidgetModel` examples:
|
|
86
|
+
*
|
|
87
|
+
* - [Modify Chart Type](https://www.sisense.com/platform/compose-sdk/playground/?example=fusion-assets%2Fuse-get-widget-model-change-chart-type)
|
|
73
88
|
*
|
|
74
|
-
* @example
|
|
75
|
-
* An example of retrieving an existing widget model from the Sisense instance:
|
|
76
|
-
```tsx
|
|
77
|
-
const { widget, isLoading, isError } = useGetWidgetModel({
|
|
78
|
-
dashboardOid: '6448665edac1920034bce7a8',
|
|
79
|
-
widgetOid: '6448665edac1920034bce7a8',
|
|
80
|
-
});
|
|
81
|
-
if (isLoading) {
|
|
82
|
-
return <div>Loading...</div>;
|
|
83
|
-
}
|
|
84
|
-
if (isError) {
|
|
85
|
-
return <div>Error</div>;
|
|
86
|
-
}
|
|
87
|
-
if (widget) {
|
|
88
|
-
return (
|
|
89
|
-
<Chart {...widget.getChartProps()} />
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
return null;
|
|
93
|
-
```
|
|
94
89
|
* @param params - Parameters of the widget to be retrieved
|
|
95
90
|
* @returns Widget load state that contains the status of the execution, the result widget model, or the error if one has occurred
|
|
96
91
|
* @group Fusion Embed
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Filter } from '@sisense/sdk-data';
|
|
2
|
-
import { ChartDataOptions, TableDataOptions } from '../../chart-data-options/types';
|
|
2
|
+
import { ChartDataOptions, PivotTableDataOptions, TableDataOptions } from '../../chart-data-options/types';
|
|
3
3
|
import { Panel, WidgetDto, WidgetType } from '../../dashboard-widget/types';
|
|
4
|
-
import { ChartProps, ChartWidgetProps, TableProps, TableWidgetProps } from '../../props';
|
|
5
|
-
import { ExecuteQueryParams } from '../../query-execution';
|
|
4
|
+
import { ChartProps, ChartWidgetProps, PivotTableProps, TableProps, TableWidgetProps, PivotTableWidgetProps } from '../../props';
|
|
5
|
+
import { ExecutePivotQueryParams, ExecuteQueryParams } from '../../query-execution';
|
|
6
6
|
import { ChartType, DrilldownOptions, ChartStyleOptions, TableStyleOptions, CompleteThemeSettings } from '../../types';
|
|
7
7
|
/**
|
|
8
8
|
* Widget data options.
|
|
9
9
|
*/
|
|
10
|
-
export type WidgetDataOptions = ChartDataOptions | TableDataOptions;
|
|
10
|
+
export type WidgetDataOptions = ChartDataOptions | TableDataOptions | PivotTableDataOptions;
|
|
11
11
|
/**
|
|
12
12
|
* Model of Sisense widget defined in the abstractions of Compose SDK.
|
|
13
13
|
*
|
|
@@ -80,11 +80,26 @@ export declare class WidgetModel {
|
|
|
80
80
|
* ```tsx
|
|
81
81
|
* const {data, isLoading, isError} = useExecuteQuery(widget.getExecuteQueryParams());
|
|
82
82
|
* ```
|
|
83
|
+
*
|
|
84
|
+
* Note: this method is not supported for getting pivot query.
|
|
85
|
+
* Use {@link getExecutePivotQueryParams} instead for getting query parameters for the pivot widget.
|
|
83
86
|
*/
|
|
84
87
|
getExecuteQueryParams(): ExecuteQueryParams;
|
|
88
|
+
/**
|
|
89
|
+
* Returns the parameters to be used for executing a query for the pivot widget.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```tsx
|
|
93
|
+
* const {data, isLoading, isError} = useExecutePivotQuery(widget.getExecutePivotQueryParams());
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* Note: this method is supported only for getting pivot query.
|
|
97
|
+
* Use {@link getExecuteQueryParams} instead for getting query parameters for non-pivot widgets.
|
|
98
|
+
*/
|
|
99
|
+
getExecutePivotQueryParams(): ExecutePivotQueryParams;
|
|
85
100
|
/**
|
|
86
101
|
* Returns the props to be used for rendering a chart.
|
|
87
|
-
|
|
102
|
+
*
|
|
88
103
|
* @example
|
|
89
104
|
* ```tsx
|
|
90
105
|
* <Chart {...widget.getChartProps()} />
|
|
@@ -92,6 +107,7 @@ export declare class WidgetModel {
|
|
|
92
107
|
*
|
|
93
108
|
* Note: this method is not supported for tabular widgets.
|
|
94
109
|
* Use {@link getTableProps} instead for getting props for the <Table> component.
|
|
110
|
+
* Use {@link getPivotTableProps} instead for getting props for the <PivotTable> component.
|
|
95
111
|
*/
|
|
96
112
|
getChartProps(): ChartProps;
|
|
97
113
|
/**
|
|
@@ -102,10 +118,24 @@ export declare class WidgetModel {
|
|
|
102
118
|
* <Table {...widget.getTableProps()} />
|
|
103
119
|
* ```
|
|
104
120
|
*
|
|
105
|
-
* Note: this method is not supported for chart widgets.
|
|
121
|
+
* Note: this method is not supported for chart and pivot widgets.
|
|
106
122
|
* Use {@link getChartProps} instead for getting props for the <Chart> component.
|
|
123
|
+
* Use {@link getPivotTableProps} instead for getting props for the <PivotTable> component.
|
|
107
124
|
*/
|
|
108
125
|
getTableProps(): TableProps;
|
|
126
|
+
/**
|
|
127
|
+
* Returns the props to be used for rendering a pivot table.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```tsx
|
|
131
|
+
* <PivotTable {...widget.getPivotTableProps()} />
|
|
132
|
+
* ```
|
|
133
|
+
*
|
|
134
|
+
* Note: this method is not supported for chart or table widgets.
|
|
135
|
+
* Use {@link getChartProps} instead for getting props for the <Chart> component.
|
|
136
|
+
* Use {@link getTableProps} instead for getting props for the <Table> component.
|
|
137
|
+
*/
|
|
138
|
+
getPivotTableProps(): PivotTableProps;
|
|
109
139
|
/**
|
|
110
140
|
* Returns the props to be used for rendering a chart widget.
|
|
111
141
|
*
|
|
@@ -130,4 +160,18 @@ export declare class WidgetModel {
|
|
|
130
160
|
* @internal
|
|
131
161
|
*/
|
|
132
162
|
getTableWidgetProps(): TableWidgetProps;
|
|
163
|
+
/**
|
|
164
|
+
* Returns the props to be used for rendering a pivot table widget.
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ```tsx
|
|
168
|
+
* <PivotTableWidget {...widget.getPivotTableWidgetProps()} />
|
|
169
|
+
* ```
|
|
170
|
+
|
|
171
|
+
* Note: this method is not supported for chart or table widgets.
|
|
172
|
+
* Use {@link getChartWidgetProps} instead for getting props for the <ChartWidget> component.
|
|
173
|
+
* Use {@link getTableWidgetProps} instead for getting props for the <TableWidget> component.
|
|
174
|
+
* @internal
|
|
175
|
+
*/
|
|
176
|
+
getPivotTableWidgetProps(): PivotTableWidgetProps;
|
|
133
177
|
}
|
package/dist/pie-chart.d.ts
CHANGED
|
@@ -3,25 +3,23 @@ import { PieChartProps } from './props';
|
|
|
3
3
|
/**
|
|
4
4
|
* A React component representing data in a circular graph with the data shown as slices of a whole,
|
|
5
5
|
* with each slice representing a proportion of the total.
|
|
6
|
-
* See [Pie Chart](https://docs.sisense.com/main/SisenseLinux/pie-chart.htm) for more information.
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* filters={[filterFactory.greaterThan(DM.Commerce.Revenue, 1000)]}
|
|
18
|
-
* onDataPointClick= {(point, nativeEvent) => {
|
|
19
|
-
* console.log('clicked', point, nativeEvent);
|
|
20
|
-
* }}
|
|
7
|
+
* ## Example
|
|
8
|
+
*
|
|
9
|
+
* Pie chart displaying total revenue per age range from the Sample ECommerce data model.
|
|
10
|
+
*
|
|
11
|
+
* <iframe
|
|
12
|
+
* src='https://csdk-playground.sisense.com/?example=charts%2Fpie-chart&mode=docs'
|
|
13
|
+
* width=800
|
|
14
|
+
* height=870
|
|
15
|
+
* style='border:none;'
|
|
21
16
|
* />
|
|
22
|
-
* ```
|
|
23
17
|
*
|
|
24
|
-
*
|
|
18
|
+
* Additional Pie Chart examples:
|
|
19
|
+
*
|
|
20
|
+
* - [Donut Pie Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fpie-chart-donut)
|
|
21
|
+
* - [Ring Pie Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fpie-chart-ring)
|
|
22
|
+
*
|
|
25
23
|
* @param props - Pie chart properties
|
|
26
24
|
* @returns Pie Chart component
|
|
27
25
|
* @group Charts
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CompleteThemeSettings, PivotTableStyleOptions } from '../../types';
|
|
2
|
+
export declare function preparePivotStylingProps(styleOptions?: PivotTableStyleOptions, themeSettings?: CompleteThemeSettings): {
|
|
3
|
+
fontFamily: string | undefined;
|
|
4
|
+
textColor: string | undefined;
|
|
5
|
+
backgroundColor: string | undefined;
|
|
6
|
+
borderColor: string;
|
|
7
|
+
fillColor: string | undefined;
|
|
8
|
+
additionalFillColor: string | undefined;
|
|
9
|
+
fillOptions: {
|
|
10
|
+
alternatingRows: boolean | undefined;
|
|
11
|
+
alternatingColumns: boolean | undefined;
|
|
12
|
+
columnsHeaders: boolean | undefined;
|
|
13
|
+
rowMembers: boolean | undefined;
|
|
14
|
+
totals: boolean | undefined;
|
|
15
|
+
};
|
|
16
|
+
rowHeight: number | undefined;
|
|
17
|
+
isAutoHeight: boolean;
|
|
18
|
+
navigationPrimaryColor: string | undefined;
|
|
19
|
+
navigationSecondaryColor: string | undefined;
|
|
20
|
+
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PivotTableProps } from '../props';
|
|
3
3
|
/**
|
|
4
|
-
* Pivot
|
|
5
|
-
*
|
|
6
|
-
* See [Pivot Tables](https://docs.sisense.com/main/SisenseLinux/pivot.htm) for more information.
|
|
4
|
+
* Pivot table with pagination.
|
|
7
5
|
*
|
|
8
6
|
* @example
|
|
9
7
|
* (1) Example of PivotTable from the `Sample ECommerce` data model:
|
|
@@ -35,6 +33,48 @@ import { PivotTableProps } from '../props';
|
|
|
35
33
|
* styleOptions={{ width: 1000, height: 600, rowsPerPage: 50 }}
|
|
36
34
|
* />
|
|
37
35
|
* ```
|
|
36
|
+
*
|
|
37
|
+
* (2) Example of PivotTable with the predefined sorting configuration:
|
|
38
|
+
* - Sort "Condition" row by its values in Ascending order. This is equivalent to users clicking on the "Condition" row heading and hit Sort Ascending (A-Z)
|
|
39
|
+
* - Sort "Category" row by "Total Cost" values under the "columns" values of "Female" (for Gender) and "0-18" (for AgeRange) in Descending order.
|
|
40
|
+
* This is equivalent to users clicking on the "Total Cost" value heading under "Female" (for Gender) and "0-18" (for AgeRange) and sort "Category (Subtotals)" in Descending (9-1)
|
|
41
|
+
*
|
|
42
|
+
* ```tsx
|
|
43
|
+
* <PivotTable
|
|
44
|
+
* dataSet={DM.DataSource}
|
|
45
|
+
* dataOptions={{
|
|
46
|
+
* rows: [
|
|
47
|
+
* {
|
|
48
|
+
* column: DM.Category.Category,
|
|
49
|
+
* includeSubTotals: true,
|
|
50
|
+
* sortType: {
|
|
51
|
+
* direction: 'sortDesc',
|
|
52
|
+
* by: {
|
|
53
|
+
* valuesIndex: 0,
|
|
54
|
+
* columnsMembersPath: ['Female', '0-18']
|
|
55
|
+
* }
|
|
56
|
+
* }
|
|
57
|
+
* },
|
|
58
|
+
* {
|
|
59
|
+
* column: DM.Commerce.Condition,
|
|
60
|
+
* sortType: {
|
|
61
|
+
* direction: 'sortAsc'
|
|
62
|
+
* }
|
|
63
|
+
* },
|
|
64
|
+
* ],
|
|
65
|
+
* columns: [
|
|
66
|
+
* DM.Commerce.Gender,
|
|
67
|
+
* DM.Commerce.AgeRange
|
|
68
|
+
* ],
|
|
69
|
+
* values: [
|
|
70
|
+
* measureFactory.sum(DM.Commerce.Cost, 'Total Cost'),
|
|
71
|
+
* measureFactory.sum(DM.Commerce.Quantity, 'Total Quantity'),
|
|
72
|
+
* ],
|
|
73
|
+
* }}
|
|
74
|
+
* />
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* <img src="media://pivot-sorting-example-1.png" width="800px" />
|
|
38
78
|
* @param props - Pivot Table properties
|
|
39
79
|
* @returns Pivot Table component
|
|
40
80
|
* @group Data Grids
|
|
@@ -1,56 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { JaqlRequest, type SortingSettingsChangePayload } from '@sisense/sdk-pivot-client';
|
|
8
|
-
export declare function normalizeJaqlSorting(jaql: JaqlRequest): {
|
|
9
|
-
metadata: (import("@sisense/sdk-pivot-client").JaqlPanel | {
|
|
10
|
-
jaql: {
|
|
11
|
-
sortDetails: {
|
|
12
|
-
initialized: boolean;
|
|
13
|
-
field: any;
|
|
14
|
-
dir: any;
|
|
15
|
-
measurePath: null;
|
|
16
|
-
sortingLastDimension: any;
|
|
17
|
-
};
|
|
18
|
-
title: string;
|
|
19
|
-
dim: string;
|
|
20
|
-
datatype: string;
|
|
21
|
-
sort?: string | null | undefined;
|
|
22
|
-
type?: string | undefined;
|
|
23
|
-
table?: string | undefined;
|
|
24
|
-
column?: string | undefined;
|
|
25
|
-
};
|
|
26
|
-
panel: string;
|
|
27
|
-
field?: {
|
|
28
|
-
id?: string | undefined;
|
|
29
|
-
index?: number | undefined;
|
|
30
|
-
} | undefined;
|
|
31
|
-
disabled?: boolean | undefined;
|
|
32
|
-
hierarchies?: string[] | undefined;
|
|
33
|
-
format?: {
|
|
34
|
-
subtotal?: boolean | undefined;
|
|
35
|
-
width?: number | undefined;
|
|
36
|
-
databars?: boolean | undefined;
|
|
37
|
-
color?: {
|
|
38
|
-
type: string;
|
|
39
|
-
color?: string | undefined;
|
|
40
|
-
conditions?: {
|
|
41
|
-
color: string;
|
|
42
|
-
operator: string;
|
|
43
|
-
expression: string | Record<string, any>;
|
|
44
|
-
}[] | undefined;
|
|
45
|
-
} | undefined;
|
|
46
|
-
} | undefined;
|
|
47
|
-
})[];
|
|
48
|
-
datasource?: import("@sisense/sdk-pivot-client/dist/data-load/types").JaqlDatasource | undefined;
|
|
49
|
-
queryGuid?: string | undefined;
|
|
50
|
-
grandTotals?: {
|
|
51
|
-
title: string;
|
|
52
|
-
columns?: boolean | undefined;
|
|
53
|
-
rows?: boolean | undefined;
|
|
54
|
-
} | null | undefined;
|
|
1
|
+
import { type SortingSettingsChangePayload } from '@sisense/sdk-pivot-client';
|
|
2
|
+
import { PivotTableDataOptionsInternal } from '..';
|
|
3
|
+
import type { SortDirection, PivotRowsSort } from '../types';
|
|
4
|
+
export type PivotRowsSortCriteria = {
|
|
5
|
+
rowIndex: number;
|
|
6
|
+
sort: PivotRowsSort | null;
|
|
55
7
|
};
|
|
56
|
-
export
|
|
8
|
+
export type PivotSortCriteria = {
|
|
9
|
+
rows: PivotRowsSortCriteria[];
|
|
10
|
+
};
|
|
11
|
+
export declare function normalizePivotSort(sortType: SortDirection | PivotRowsSort): PivotRowsSort;
|
|
12
|
+
export declare function preparePivotRowsSortCriteriaList({ type, settings, sortDetails }: SortingSettingsChangePayload, dataOptionsInternal: PivotTableDataOptionsInternal): PivotRowsSortCriteria[];
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import { PivotTableProps } from '../props';
|
|
2
1
|
import { type JaqlRequest } from '@sisense/sdk-pivot-client';
|
|
2
|
+
import type { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
3
|
+
import { ExecutePivotQueryParams } from '../query-execution';
|
|
4
|
+
import { PivotTableDataOptionsInternal } from '../chart-data-options/types';
|
|
5
|
+
export declare const getPivotQueryOptions: (dataOptions: PivotTableDataOptionsInternal) => Pick<ExecutePivotQueryParams, 'rows' | 'columns' | 'values' | 'grandTotals'>;
|
|
3
6
|
/**
|
|
4
7
|
* A hook that returns the JAQL request object from pivot table props.
|
|
5
8
|
*
|
|
6
9
|
* @internal
|
|
7
10
|
*/
|
|
8
|
-
export declare const useGetPivotTableQuery: ({ dataSet,
|
|
11
|
+
export declare const useGetPivotTableQuery: ({ dataSet, dataOptionsInternal, filters, refreshCounter, }: {
|
|
12
|
+
dataSet?: DataSource | undefined;
|
|
13
|
+
dataOptionsInternal: PivotTableDataOptionsInternal;
|
|
14
|
+
filters?: Filter[] | FilterRelations | undefined;
|
|
15
|
+
refreshCounter?: number | undefined;
|
|
16
|
+
}) => {
|
|
9
17
|
isLoading: boolean;
|
|
10
18
|
isSuccess: boolean;
|
|
11
19
|
isError: boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PivotTableDataOptions, PivotTableDataOptionsInternal } from '../chart-data-options/types.js';
|
|
2
|
+
import { PivotSortCriteria } from './sorting-utils.js';
|
|
3
|
+
type UsePivotTableDataOptionsInternalResult = {
|
|
4
|
+
dataOptionsInternal: PivotTableDataOptionsInternal;
|
|
5
|
+
updateSort: (sortCriteria: PivotSortCriteria) => void;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* A hook that returns the JAQL request object from pivot table props.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const usePivotTableDataOptionsInternal: ({ dataOptions, }: {
|
|
13
|
+
dataOptions: PivotTableDataOptions;
|
|
14
|
+
}) => UsePivotTableDataOptionsInternalResult;
|
|
15
|
+
export {};
|
package/dist/polar-chart.d.ts
CHANGED
|
@@ -2,26 +2,23 @@
|
|
|
2
2
|
import { PolarChartProps } from './props';
|
|
3
3
|
/**
|
|
4
4
|
* A React component comparing multiple categories/variables with a spacial perspective in a radial chart.
|
|
5
|
-
* See [Polar Chart](https://docs.sisense.com/main/SisenseLinux/polar-chart.htm) for more information.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* }}
|
|
17
|
-
* filters={[filterFactory.greaterThan(DM.Commerce.Revenue, 1000)]}
|
|
18
|
-
* onDataPointClick= {(point, nativeEvent) => {
|
|
19
|
-
* console.log('clicked', point, nativeEvent);
|
|
20
|
-
* }}
|
|
6
|
+
* ## Example
|
|
7
|
+
*
|
|
8
|
+
* Polar chart displaying total revenue per age range from the Sample ECommerce data model.
|
|
9
|
+
*
|
|
10
|
+
* <iframe
|
|
11
|
+
* src='https://csdk-playground.sisense.com/?example=charts%2Fpolar-chart&mode=docs'
|
|
12
|
+
* width=800
|
|
13
|
+
* height=870
|
|
14
|
+
* style='border:none;'
|
|
21
15
|
* />
|
|
22
|
-
* ```
|
|
23
16
|
*
|
|
24
|
-
*
|
|
17
|
+
* Additional Polar Chart examples:
|
|
18
|
+
*
|
|
19
|
+
* - [Area Polar Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fpolar-chart-area)
|
|
20
|
+
* - [Line Polar Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fpolar-chart-line)
|
|
21
|
+
*
|
|
25
22
|
* @param props - Polar chart properties
|
|
26
23
|
* @returns Polar Chart component
|
|
27
24
|
* @group Charts
|
package/dist/props.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Attribute, Filter, Measure, DataSource, Data, QueryResultData, FilterRelations } from '@sisense/sdk-data';
|
|
2
|
-
import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, ChartStyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, TableStyleOptions, ThemeOid, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection, SunburstStyleOptions, ChartWidgetStyleOptions, TableWidgetStyleOptions, DashboardWidgetStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, DataPoint, ScatterDataPoint, AreamapDataPoint, BoxplotDataPoint, ChartDataPoints, ScattermapDataPoint, PivotTableStyleOptions } from './types';
|
|
2
|
+
import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, ChartStyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, TableStyleOptions, ThemeOid, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection, SunburstStyleOptions, ChartWidgetStyleOptions, TableWidgetStyleOptions, DashboardWidgetStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, DataPoint, ScatterDataPoint, AreamapDataPoint, BoxplotDataPoint, ChartDataPoints, ScattermapDataPoint, PivotTableStyleOptions, PivotTableWidgetStyleOptions } from './types';
|
|
3
3
|
import { HighchartsOptions } from './chart-options-processor/chart-options-service';
|
|
4
4
|
import { ComponentType, PropsWithChildren, ReactNode } from 'react';
|
|
5
5
|
import { IndicatorChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, ScatterChartDataOptions, TableDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions, PivotTableDataOptions } from './chart-data-options/types';
|
|
@@ -10,7 +10,13 @@ import { HookEnableParam } from './common/hooks/types';
|
|
|
10
10
|
import { ExecuteQueryResult } from './query-execution/types';
|
|
11
11
|
export type { MenuItemSection, HighchartsOptions };
|
|
12
12
|
/**
|
|
13
|
-
* Configurations for Sisense Context
|
|
13
|
+
* Configurations and authentication for Sisense Context.
|
|
14
|
+
*
|
|
15
|
+
* Use one of the following to authenticate:
|
|
16
|
+
*
|
|
17
|
+
* - {@link ssoEnabled}
|
|
18
|
+
* - {@link token}
|
|
19
|
+
* - {@link wat}
|
|
14
20
|
*/
|
|
15
21
|
export interface SisenseContextProviderProps {
|
|
16
22
|
/**
|
|
@@ -20,10 +26,9 @@ export interface SisenseContextProviderProps {
|
|
|
20
26
|
/** URL of the Sisense environment the app connects to */
|
|
21
27
|
url: string;
|
|
22
28
|
/**
|
|
23
|
-
* [Single Sign-On](https://docs.sisense.com/main/SisenseLinux/using-single-sign-on-to-access-sisense.htm) toggle
|
|
29
|
+
* [Single Sign-On](https://docs.sisense.com/main/SisenseLinux/using-single-sign-on-to-access-sisense.htm) toggle.
|
|
24
30
|
*
|
|
25
|
-
*
|
|
26
|
-
* If set to true, this will override any other authentication method.
|
|
31
|
+
* Set to `true` to use SSO authentication. When `true`, this overrides any other authentication methods. Defaults to `false`.
|
|
27
32
|
*
|
|
28
33
|
* @category Authentication
|
|
29
34
|
*/
|
|
@@ -31,16 +36,12 @@ export interface SisenseContextProviderProps {
|
|
|
31
36
|
/**
|
|
32
37
|
* Token for [bearer authentication](https://sisense.dev/guides/restApi/using-rest-api.html).
|
|
33
38
|
*
|
|
34
|
-
* This is used only when basic username/password authentication is not specified.
|
|
35
|
-
*
|
|
36
39
|
* @category Authentication
|
|
37
40
|
*/
|
|
38
41
|
token?: string;
|
|
39
42
|
/**
|
|
40
43
|
* [Web Access Token](https://docs.sisense.com/main/SisenseLinux/using-web-access-token.htm).
|
|
41
44
|
*
|
|
42
|
-
* This is used only when neither username, password, and token is specified.
|
|
43
|
-
*
|
|
44
45
|
* @category Authentication
|
|
45
46
|
*/
|
|
46
47
|
wat?: string;
|
|
@@ -111,13 +112,12 @@ export interface ExecuteQueryProps {
|
|
|
111
112
|
*
|
|
112
113
|
* Two options are supported:
|
|
113
114
|
*
|
|
114
|
-
* (1) `
|
|
115
|
-
* See [Sisense documentation](https://docs.sisense.com/main/SisenseLinux/customizing-the-sisense-user-interface.htm)
|
|
116
|
-
* for more details.
|
|
115
|
+
* (1) `ThemeSettings` -- Custom theme settings that override the default theme settings.
|
|
117
116
|
*
|
|
118
117
|
* OR
|
|
119
118
|
*
|
|
120
|
-
* (2) `
|
|
119
|
+
* (2) `ThemeOid` -- Theme identifier as defined in a Fusion Embed instance (**Admin > App Configuration > Look and Feel**).
|
|
120
|
+
* See [Customizing the Sisense User Interface](https://docs.sisense.com/main/SisenseLinux/customizing-the-sisense-user-interface.htm) for more details.
|
|
121
121
|
*/
|
|
122
122
|
export type ThemeProviderProps = PropsWithChildren<{
|
|
123
123
|
/**
|
|
@@ -958,6 +958,65 @@ export interface TableWidgetProps {
|
|
|
958
958
|
*/
|
|
959
959
|
description?: string;
|
|
960
960
|
}
|
|
961
|
+
/**
|
|
962
|
+
* Props for the {@link PivotTableWidget} component
|
|
963
|
+
*
|
|
964
|
+
* @internal
|
|
965
|
+
*/
|
|
966
|
+
export interface PivotTableWidgetProps {
|
|
967
|
+
/**
|
|
968
|
+
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
969
|
+
*
|
|
970
|
+
* If not specified, the query will use the `defaultDataSource` specified in the parent Sisense Context.
|
|
971
|
+
*
|
|
972
|
+
* @category Data
|
|
973
|
+
*/
|
|
974
|
+
dataSource?: DataSource;
|
|
975
|
+
/**
|
|
976
|
+
* Filters that will slice query results
|
|
977
|
+
*
|
|
978
|
+
* @category Data
|
|
979
|
+
*/
|
|
980
|
+
filters?: Filter[] | FilterRelations;
|
|
981
|
+
/**
|
|
982
|
+
* Configurations for how to interpret and present the data passed to the table
|
|
983
|
+
*
|
|
984
|
+
* @category Chart
|
|
985
|
+
*/
|
|
986
|
+
dataOptions: PivotTableDataOptions;
|
|
987
|
+
/**
|
|
988
|
+
* Style options for both the table and widget including the widget header
|
|
989
|
+
*
|
|
990
|
+
* @category Widget
|
|
991
|
+
*/
|
|
992
|
+
styleOptions?: PivotTableWidgetStyleOptions;
|
|
993
|
+
/**
|
|
994
|
+
* React nodes to be rendered at the top of component, before the table
|
|
995
|
+
*
|
|
996
|
+
* @category Widget
|
|
997
|
+
* @internal
|
|
998
|
+
*/
|
|
999
|
+
topSlot?: ReactNode;
|
|
1000
|
+
/**
|
|
1001
|
+
* React nodes to be rendered at the bottom of component, after the table
|
|
1002
|
+
*
|
|
1003
|
+
* @category Widget
|
|
1004
|
+
* @internal
|
|
1005
|
+
*/
|
|
1006
|
+
bottomSlot?: ReactNode;
|
|
1007
|
+
/**
|
|
1008
|
+
* Title of the widget
|
|
1009
|
+
*
|
|
1010
|
+
* @category Widget
|
|
1011
|
+
*/
|
|
1012
|
+
title?: string;
|
|
1013
|
+
/**
|
|
1014
|
+
* Description of the widget
|
|
1015
|
+
*
|
|
1016
|
+
* @category Widget
|
|
1017
|
+
*/
|
|
1018
|
+
description?: string;
|
|
1019
|
+
}
|
|
961
1020
|
/**
|
|
962
1021
|
* Props for {@link ExecuteQueryByWidgetId} component.
|
|
963
1022
|
*
|