@sisense/sdk-ui 1.8.0 → 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 +4 -1
- package/dist/ai/chat-config.d.ts +20 -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/clickable-message.d.ts +4 -2
- package/dist/ai/messages/feedback-wrapper.d.ts +2 -2
- package/dist/ai/messages/insights-message.d.ts +2 -2
- 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 -5
- package/dist/ai/nav-back-button.d.ts +6 -3
- package/dist/ai.js +2864 -2586
- 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 +3 -3
- package/dist/bar-chart.d.ts +2 -2
- 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 +2 -2
- package/dist/common/components/loading-indicator.d.ts +82 -0
- package/dist/dashboard-widget/translate-widget-style-options.d.ts +3 -2
- package/dist/dashboard-widget/types.d.ts +22 -2
- package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +1 -0
- package/dist/dashboard-widget/utils.d.ts +2 -0
- 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/index.d.ts +1 -1
- package/dist/index.js +46825 -7395
- package/dist/line-chart.d.ts +2 -2
- 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 +1 -1
- package/dist/models/widget/widget-model.d.ts +50 -6
- package/dist/pie-chart.d.ts +2 -2
- package/dist/pivot-table/helpers/prepare-pivot-styling-props.d.ts +20 -0
- 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 +2 -2
- package/dist/props.d.ts +60 -1
- package/dist/query-execution/use-execute-query.d.ts +1 -1
- package/dist/scatter-chart.d.ts +1 -1
- 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 +3 -1
- package/dist/translation/resources/index.d.ts +6 -2
- package/dist/types.d.ts +170 -1
- package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
- package/dist/widgets/common/widget-container.d.ts +15 -0
- package/dist/widgets/drilldown-widget.d.ts +1 -1
- 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-cb11e76c.js +0 -121619
package/dist/line-chart.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ import { LineChartProps } from './props';
|
|
|
16
16
|
*
|
|
17
17
|
* Additional Line Chart examples:
|
|
18
18
|
*
|
|
19
|
-
* - [Curved Line Chart](https://
|
|
20
|
-
* - [Styled Line Chart](https://
|
|
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
21
|
*
|
|
22
22
|
* @param props - Line chart properties
|
|
23
23
|
* @returns Line Chart component
|
|
@@ -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;
|
|
@@ -84,7 +84,7 @@ export type WidgetModelSuccessState = {
|
|
|
84
84
|
*
|
|
85
85
|
* Additional `useGetWidgetModel` examples:
|
|
86
86
|
*
|
|
87
|
-
* - [Modify Chart Type](https://
|
|
87
|
+
* - [Modify Chart Type](https://www.sisense.com/platform/compose-sdk/playground/?example=fusion-assets%2Fuse-get-widget-model-change-chart-type)
|
|
88
88
|
*
|
|
89
89
|
* @param params - Parameters of the widget to be retrieved
|
|
90
90
|
* @returns Widget load state that contains the status of the execution, the result widget model, or the error if one has occurred
|
|
@@ -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
|
@@ -17,8 +17,8 @@ import { PieChartProps } from './props';
|
|
|
17
17
|
*
|
|
18
18
|
* Additional Pie Chart examples:
|
|
19
19
|
*
|
|
20
|
-
* - [Donut Pie Chart](https://
|
|
21
|
-
* - [Ring Pie Chart](https://
|
|
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
22
|
*
|
|
23
23
|
* @param props - Pie chart properties
|
|
24
24
|
* @returns Pie Chart component
|
|
@@ -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,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
|
@@ -16,8 +16,8 @@ import { PolarChartProps } from './props';
|
|
|
16
16
|
*
|
|
17
17
|
* Additional Polar Chart examples:
|
|
18
18
|
*
|
|
19
|
-
* - [Area Polar Chart](https://
|
|
20
|
-
* - [Line Polar Chart](https://
|
|
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
21
|
*
|
|
22
22
|
* @param props - Polar chart properties
|
|
23
23
|
* @returns Polar Chart component
|
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';
|
|
@@ -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
|
*
|
|
@@ -17,7 +17,7 @@ import { ExecuteQueryParams, ExecuteQueryResult } from './types';
|
|
|
17
17
|
*
|
|
18
18
|
* Additional `useExecuteQuery()` examples:
|
|
19
19
|
*
|
|
20
|
-
* - [Query with Sorting](https://
|
|
20
|
+
* - [Query with Sorting](https://www.sisense.com/platform/compose-sdk/playground/?example=queries%2Fuse-execute-query-sorting)
|
|
21
21
|
* - [Take Control of Your Data Visualizations]( https://www.sisense.com/blog/take-control-of-your-data-visualizations/) blog post with examples of using the hook to fetch data to display in third-party charts.
|
|
22
22
|
*
|
|
23
23
|
* @param params - Parameters of the query
|
package/dist/scatter-chart.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ import { ScatterChartProps } from './props';
|
|
|
22
22
|
*
|
|
23
23
|
* Additional Scatter Chart examples:
|
|
24
24
|
*
|
|
25
|
-
* - [Bubble Scatter Chart](https://
|
|
25
|
+
* - [Bubble Scatter Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts/scatter-chart-bubble)
|
|
26
26
|
*
|
|
27
27
|
* @param props - Scatter chart properties
|
|
28
28
|
* @returns Scatter Chart component
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CompleteThemeSettings } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns default theme settings, which can be used as base for custom theme options.
|
|
4
|
+
*
|
|
5
|
+
* @param isDarkMode - Boolean value whether to get theme settings for dark mode
|
|
6
|
+
* @returns Theme settings object
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare const getDefaultThemeSettings: (isDarkMode?: boolean) => CompleteThemeSettings;
|
|
@@ -29,7 +29,9 @@ export declare const translation: {
|
|
|
29
29
|
};
|
|
30
30
|
widgetModel: {
|
|
31
31
|
tabularWidgetNotSupported: string;
|
|
32
|
-
|
|
32
|
+
pivotWidgetNotSupported: string;
|
|
33
|
+
onlyTableWidgetSupported: string;
|
|
34
|
+
onlyPivotWidgetSupported: string;
|
|
33
35
|
};
|
|
34
36
|
unknownFilterInFilterRelations: string;
|
|
35
37
|
filterRelationsNotSupported: string;
|
|
@@ -33,7 +33,9 @@ export declare const resources: {
|
|
|
33
33
|
};
|
|
34
34
|
widgetModel: {
|
|
35
35
|
tabularWidgetNotSupported: string;
|
|
36
|
-
|
|
36
|
+
pivotWidgetNotSupported: string;
|
|
37
|
+
onlyTableWidgetSupported: string;
|
|
38
|
+
onlyPivotWidgetSupported: string;
|
|
37
39
|
};
|
|
38
40
|
unknownFilterInFilterRelations: string;
|
|
39
41
|
filterRelationsNotSupported: string;
|
|
@@ -119,7 +121,9 @@ export declare const resources: {
|
|
|
119
121
|
};
|
|
120
122
|
widgetModel: {
|
|
121
123
|
tabularWidgetNotSupported: string;
|
|
122
|
-
|
|
124
|
+
pivotWidgetNotSupported: string;
|
|
125
|
+
onlyTableWidgetSupported: string;
|
|
126
|
+
onlyPivotWidgetSupported: string;
|
|
123
127
|
};
|
|
124
128
|
unknownFilterInFilterRelations: string;
|
|
125
129
|
filterRelationsNotSupported: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -328,6 +328,14 @@ export interface PivotTableStyleOptions {
|
|
|
328
328
|
* Boolean flag whether to apply background color to alternate columns
|
|
329
329
|
*/
|
|
330
330
|
alternatingColumnsColor?: boolean;
|
|
331
|
+
/**
|
|
332
|
+
* Boolean flag whether to fill row members cells with background color
|
|
333
|
+
*/
|
|
334
|
+
membersColor?: boolean;
|
|
335
|
+
/**
|
|
336
|
+
* Boolean flag whether to fill totals and subtotals cells with background color
|
|
337
|
+
*/
|
|
338
|
+
totalsColor?: boolean;
|
|
331
339
|
/**
|
|
332
340
|
* Number of rows per page
|
|
333
341
|
*
|
|
@@ -356,6 +364,10 @@ export interface PivotTableStyleOptions {
|
|
|
356
364
|
* Boolean flag whether the height of the component should be automatically adjusted to fit the content
|
|
357
365
|
*/
|
|
358
366
|
isAutoHeight?: boolean;
|
|
367
|
+
/**
|
|
368
|
+
* Manual height of each row (default is 25px)
|
|
369
|
+
*/
|
|
370
|
+
rowHeight?: number;
|
|
359
371
|
}
|
|
360
372
|
/**
|
|
361
373
|
* Common part of IndicatorStyleOptions for all types of indicator
|
|
@@ -561,7 +573,9 @@ export interface ThemeSettings {
|
|
|
561
573
|
typography?: {
|
|
562
574
|
/** Font family name to style component text */
|
|
563
575
|
fontFamily?: string;
|
|
576
|
+
/** Primary text color */
|
|
564
577
|
primaryTextColor?: string;
|
|
578
|
+
/** Secondary text color */
|
|
565
579
|
secondaryTextColor?: string;
|
|
566
580
|
};
|
|
567
581
|
/** General theme settings */
|
|
@@ -575,6 +589,155 @@ export interface ThemeSettings {
|
|
|
575
589
|
/** Hover color for primary buttons */
|
|
576
590
|
primaryButtonHoverColor?: string;
|
|
577
591
|
};
|
|
592
|
+
/**
|
|
593
|
+
* Theme settings specific to the AI Chatbot component
|
|
594
|
+
*
|
|
595
|
+
* @internal
|
|
596
|
+
*/
|
|
597
|
+
aiChat?: {
|
|
598
|
+
/** Background color of the chatbot */
|
|
599
|
+
backgroundColor?: string;
|
|
600
|
+
/** Text color of the chatbot */
|
|
601
|
+
primaryTextColor?: string;
|
|
602
|
+
/** Secondary text color of the chatbot */
|
|
603
|
+
secondaryTextColor?: string;
|
|
604
|
+
/** Primary font size for text in the chatbot */
|
|
605
|
+
primaryFontSize?: [fontSize: string, lineHeight: string];
|
|
606
|
+
/** Border of the chatbot */
|
|
607
|
+
border?: false | string;
|
|
608
|
+
/** Border radius of the chatbot */
|
|
609
|
+
borderRadius?: false | string;
|
|
610
|
+
/** Settings for the main chat body */
|
|
611
|
+
body?: {
|
|
612
|
+
/** Left padding of the chat body */
|
|
613
|
+
paddingLeft?: string;
|
|
614
|
+
/** Right padding of the chat body */
|
|
615
|
+
paddingRight?: string;
|
|
616
|
+
/** Top padding of the chat body */
|
|
617
|
+
paddingTop?: string;
|
|
618
|
+
/** Bottom padding of the chat body */
|
|
619
|
+
paddingBottom?: string;
|
|
620
|
+
/** Gap size between each message in the chat body */
|
|
621
|
+
gapBetweenMessages?: string;
|
|
622
|
+
};
|
|
623
|
+
/** Settings for the chat footer */
|
|
624
|
+
footer?: {
|
|
625
|
+
/** Left padding of the chat footer */
|
|
626
|
+
paddingLeft?: string;
|
|
627
|
+
/** Right padding of the chat footer */
|
|
628
|
+
paddingRight?: string;
|
|
629
|
+
/** Top padding of the chat footer */
|
|
630
|
+
paddingTop?: string;
|
|
631
|
+
/** Bottom padding of the chat footer */
|
|
632
|
+
paddingBottom?: string;
|
|
633
|
+
};
|
|
634
|
+
/** Settings for user chat messages */
|
|
635
|
+
userMessages?: {
|
|
636
|
+
/** Background color of user chat messages */
|
|
637
|
+
backgroundColor?: string;
|
|
638
|
+
};
|
|
639
|
+
/** Settings for system chat messages */
|
|
640
|
+
systemMessages?: {
|
|
641
|
+
/** Background color of system chat messages */
|
|
642
|
+
backgroundColor?: string;
|
|
643
|
+
};
|
|
644
|
+
/** Settings for the chatbot input */
|
|
645
|
+
input?: {
|
|
646
|
+
/** Background color of the input */
|
|
647
|
+
backgroundColor?: string;
|
|
648
|
+
/** Settings to be applied on input focus */
|
|
649
|
+
focus?: {
|
|
650
|
+
/** Outline color of the input */
|
|
651
|
+
outlineColor?: string;
|
|
652
|
+
};
|
|
653
|
+
};
|
|
654
|
+
/** Settings for the chatbot header */
|
|
655
|
+
header?: {
|
|
656
|
+
/** Background color of the chatbot header */
|
|
657
|
+
backgroundColor?: string;
|
|
658
|
+
/** Text color of the chatbot header */
|
|
659
|
+
textColor?: string;
|
|
660
|
+
};
|
|
661
|
+
/** Settings for chatbot dropup */
|
|
662
|
+
dropup?: {
|
|
663
|
+
/** Background color of the dropup */
|
|
664
|
+
backgroundColor?: string;
|
|
665
|
+
/** Box shadow of the dropup */
|
|
666
|
+
boxShadow?: string;
|
|
667
|
+
/** Border radius of the dropup */
|
|
668
|
+
borderRadius?: string;
|
|
669
|
+
/** Settings for the section headers of the dropup */
|
|
670
|
+
headers?: {
|
|
671
|
+
/** Text color of headers */
|
|
672
|
+
textColor?: string;
|
|
673
|
+
/** Settings to be applied on hover of the headers */
|
|
674
|
+
hover?: {
|
|
675
|
+
/** Background color of headers on hover */
|
|
676
|
+
backgroundColor?: string;
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
/** Settings for the dropup items */
|
|
680
|
+
items?: {
|
|
681
|
+
/** Text color of the dropup items */
|
|
682
|
+
textColor?: string;
|
|
683
|
+
/** Settings to be applied on hover of dropup items */
|
|
684
|
+
hover?: {
|
|
685
|
+
/** Background color of dropup items on hover */
|
|
686
|
+
backgroundColor?: string;
|
|
687
|
+
};
|
|
688
|
+
};
|
|
689
|
+
};
|
|
690
|
+
/** Settings for the chatbot suggestions */
|
|
691
|
+
suggestions?: {
|
|
692
|
+
/** Text color of the chatbot suggestions */
|
|
693
|
+
textColor?: string;
|
|
694
|
+
/** Background color of the chatbot suggestions */
|
|
695
|
+
backgroundColor?: string;
|
|
696
|
+
/** Border of the chatbot suggestions */
|
|
697
|
+
border?: string;
|
|
698
|
+
/** 2-color gradient to be applied on the border */
|
|
699
|
+
borderGradient?: [string, string] | null;
|
|
700
|
+
/** Border radius of the chatbot suggestions */
|
|
701
|
+
borderRadius?: string;
|
|
702
|
+
/** Setting to be applied on hover */
|
|
703
|
+
hover?: {
|
|
704
|
+
/** Background color of the chatbot suggestions on hover */
|
|
705
|
+
backgroundColor?: string;
|
|
706
|
+
/** Text color of the chatbot suggestions on hover */
|
|
707
|
+
textColor?: string;
|
|
708
|
+
};
|
|
709
|
+
/** 2-color gradient to be applied on suggestions loading animation */
|
|
710
|
+
loadingGradient?: [string, string];
|
|
711
|
+
/** Gap size between each suggestion item */
|
|
712
|
+
gap?: string;
|
|
713
|
+
};
|
|
714
|
+
/** Settings for the chatbot clickable messages */
|
|
715
|
+
clickableMessages?: {
|
|
716
|
+
/** Background color of the chatbot clickable messages */
|
|
717
|
+
backgroundColor?: string;
|
|
718
|
+
/** Text color of the chatbot clickable messages */
|
|
719
|
+
textColor?: string;
|
|
720
|
+
/** Border of the chatbot clickable messages */
|
|
721
|
+
border?: false | string;
|
|
722
|
+
/** Setting to be applied on hover */
|
|
723
|
+
hover?: {
|
|
724
|
+
/** Text color of the chatbot clickable messages on hover */
|
|
725
|
+
textColor?: string;
|
|
726
|
+
/** Background color of the chatbot clickable messages on hover */
|
|
727
|
+
backgroundColor?: string;
|
|
728
|
+
};
|
|
729
|
+
};
|
|
730
|
+
/** Settings for the chatbot icons */
|
|
731
|
+
icons?: {
|
|
732
|
+
/** Color of the chatbot icons */
|
|
733
|
+
color?: string;
|
|
734
|
+
/** Setting to be applied on hover */
|
|
735
|
+
hover?: {
|
|
736
|
+
/** Color of the chatbot icons on hover */
|
|
737
|
+
color?: string;
|
|
738
|
+
};
|
|
739
|
+
};
|
|
740
|
+
};
|
|
578
741
|
}
|
|
579
742
|
/**
|
|
580
743
|
* Complete set of theme settings defining the look and feel of components.
|
|
@@ -649,11 +812,17 @@ export interface DashboardWidgetStyleOptions extends WidgetStyleOptions {
|
|
|
649
812
|
/** Style settings defining the look and feel of ChartWidget */
|
|
650
813
|
export type ChartWidgetStyleOptions = ChartStyleOptions & WidgetStyleOptions;
|
|
651
814
|
/**
|
|
652
|
-
* Style settings defining the look and feel of TableWidget
|
|
815
|
+
* Style settings defining the look and feel of TableWidget
|
|
653
816
|
*
|
|
654
817
|
* @internal
|
|
655
818
|
*/
|
|
656
819
|
export type TableWidgetStyleOptions = TableStyleOptions & WidgetStyleOptions;
|
|
820
|
+
/**
|
|
821
|
+
* Style settings defining the look and feel of TableWidget
|
|
822
|
+
*
|
|
823
|
+
* @internal
|
|
824
|
+
*/
|
|
825
|
+
export type PivotTableWidgetStyleOptions = PivotTableStyleOptions & WidgetStyleOptions;
|
|
657
826
|
/**
|
|
658
827
|
* Runs type guard check for ThemeOid.
|
|
659
828
|
*
|