@sisense/sdk-ui 1.5.0 → 1.7.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-context-provider.d.ts +1 -0
- package/dist/ai/api/chat-api-provider.d.ts +1 -1
- package/dist/ai/api/chat-history.d.ts +18 -0
- package/dist/ai/api/chat-rest-api.d.ts +3 -0
- package/dist/ai/api/errors.d.ts +4 -1
- package/dist/ai/api/hooks.d.ts +2 -13
- package/dist/ai/api/types.d.ts +21 -19
- package/dist/ai/chat-config.d.ts +10 -3
- package/dist/ai/chat-intro-blurb.d.ts +4 -0
- package/dist/ai/chat-style-provider.d.ts +15 -0
- package/dist/ai/chatbot.d.ts +8 -0
- package/dist/ai/{error-page.d.ts → common/error-container.d.ts} +1 -1
- package/dist/ai/get-nlg-query-result.d.ts +3 -3
- package/dist/ai/index.d.ts +2 -0
- package/dist/ai/messages/feedback-wrapper.d.ts +2 -1
- package/dist/ai/messages/insights-message.d.ts +6 -1
- package/dist/ai/messages/message-list-resolver.d.ts +1 -2
- package/dist/ai/messages/message-resolver.d.ts +1 -3
- package/dist/ai/messages/nlq-message-group.d.ts +10 -0
- package/dist/ai/suggestions/index.d.ts +1 -1
- package/dist/ai/suggestions/suggestion-item.d.ts +1 -2
- package/dist/ai/suggestions/suggestion-list.d.ts +1 -1
- package/dist/ai/suggestions/suggestions-with-intro.d.ts +2 -2
- package/dist/ai/translators/code-templates.d.ts +11 -0
- package/dist/ai/translators/generate-code.d.ts +9 -0
- package/dist/ai/translators/index.d.ts +4 -0
- package/dist/ai/translators/model-translator.d.ts +50 -0
- package/dist/ai/translators/query-translator.d.ts +122 -0
- package/dist/ai/translators/translate-props-to-code.d.ts +8 -0
- package/dist/ai/translators/types.d.ts +105 -0
- package/dist/ai/translators/use-get-data-source.d.ts +12 -0
- package/dist/ai/translators/utils.d.ts +2 -0
- package/dist/ai/use-chat-session.d.ts +10 -3
- package/dist/ai/use-get-nlg-query-result.d.ts +6 -6
- package/dist/ai/use-get-query-recommendations.d.ts +1 -0
- package/dist/ai.js +7037 -3332
- package/dist/alert-box/alert-box.d.ts +1 -1
- package/dist/app/client-application.d.ts +27 -0
- package/dist/app/settings/settings.d.ts +1 -1
- package/dist/area-chart.d.ts +1 -0
- package/dist/areamap-chart.d.ts +1 -0
- package/dist/bar-chart.d.ts +3 -0
- package/dist/boxplot-chart.d.ts +1 -0
- package/dist/boxplot-utils.d.ts +3 -1
- package/dist/chart/chart.d.ts +1 -0
- package/dist/chart-options-processor/translations/base-design-options.d.ts +1 -0
- package/dist/chart-options-processor/translations/tooltip-utils.d.ts +1 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/legacy-chart-options-to-theme-settings-dictionary.d.ts +2 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/override-with-value-color.d.ts +1 -2
- package/dist/column-chart.d.ts +4 -0
- package/dist/common/components/loading-indicator.d.ts +2 -0
- package/dist/common/hooks/use-fetch.d.ts +42 -0
- package/dist/const.d.ts +1 -0
- package/dist/dashboard-widget/dashboard-widget.d.ts +2 -0
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +5 -0
- package/dist/dashboard-widget/translate-widget-filters.d.ts +1 -0
- package/dist/dashboard-widget/types.d.ts +3 -2
- package/dist/dynamic-size-container/dynamic-size-container.d.ts +4 -3
- package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +1 -0
- package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +1 -0
- package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +1 -0
- package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +1 -0
- package/dist/formulas/use-get-shared-formula.d.ts +2 -0
- package/dist/funnel-chart.d.ts +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6680 -37439
- package/dist/indicator-chart.d.ts +1 -0
- package/dist/line-chart.d.ts +1 -0
- package/dist/models/dashboard/get-dashboard-models.d.ts +1 -3
- package/dist/models/dashboard/translate-dashboard.d.ts +1 -1
- package/dist/models/dashboard/types.d.ts +17 -0
- package/dist/models/dashboard/use-get-dashboard-model.d.ts +2 -0
- package/dist/models/dashboard/use-get-dashboard-models.d.ts +2 -0
- package/dist/models/widget/use-get-widget-model.d.ts +2 -0
- package/dist/models/widget/widget-model.d.ts +11 -1
- package/dist/pie-chart.d.ts +1 -0
- package/dist/pivot-table/formatters/data-cell-formatters/data-cell-value-formatter.d.ts +3 -0
- package/dist/pivot-table/formatters/data-cell-formatters/index.d.ts +1 -0
- package/dist/pivot-table/formatters/header-cell-formatters/header-cell-value-formatter.d.ts +3 -0
- package/dist/pivot-table/formatters/header-cell-formatters/index.d.ts +1 -0
- package/dist/pivot-table/formatters/index.d.ts +2 -0
- package/dist/pivot-table/formatters/types.d.ts +4 -0
- package/dist/pivot-table/formatters/utils.d.ts +5 -0
- package/dist/pivot-table/pivot-table.d.ts +1 -0
- package/dist/pivot-table/sorting-utils.d.ts +56 -0
- package/dist/pivot-table/use-apply-pivot-table-formatting.d.ts +11 -0
- package/dist/pivot-table/use-get-pivot-table-query.d.ts +1 -1
- package/dist/polar-chart.d.ts +1 -0
- package/dist/props.d.ts +5 -4
- package/dist/query/execute-query.d.ts +5 -5
- package/dist/query-execution/execute-query-by-widget-id.d.ts +2 -0
- package/dist/query-execution/execute-query.d.ts +1 -0
- package/dist/query-execution/index.d.ts +2 -1
- package/dist/query-execution/query-params-comparator.d.ts +8 -0
- package/dist/query-execution/types.d.ts +7 -0
- package/dist/query-execution/use-execute-csv-query.d.ts +1 -0
- package/dist/query-execution/use-execute-pivot-query.d.ts +1 -0
- package/dist/query-execution/use-execute-query-by-widget-id.d.ts +2 -0
- package/dist/query-execution/use-execute-query.d.ts +4 -10
- package/dist/query-execution/use-query-cache.d.ts +10 -0
- package/dist/scatter-chart.d.ts +1 -0
- package/dist/scattermap-chart.d.ts +1 -0
- package/dist/sisense-context/sisense-context-provider.d.ts +1 -0
- package/dist/sisense-context/sisense-query-client-provider.d.ts +2 -0
- package/dist/sunburst-chart.d.ts +1 -0
- package/dist/table/table.d.ts +1 -0
- package/dist/theme-provider/theme-provider.d.ts +7 -0
- package/dist/treemap-chart.d.ts +1 -0
- package/dist/types.d.ts +2 -2
- package/dist/useQuery-aa258c0d.js +121301 -0
- package/dist/utils/create-cache.d.ts +33 -0
- package/dist/widgets/chart-widget.d.ts +1 -0
- package/dist/widgets/common/context-menu.d.ts +5 -0
- package/dist/widgets/common/drilldown-breadcrumbs/drilldown-breadcrumbs.d.ts +5 -0
- package/dist/widgets/drilldown-widget.d.ts +1 -0
- package/package.json +14 -9
- package/dist/chart-data-processor/utils.d.ts +0 -10
- package/dist/utils/not-available-value.d.ts +0 -3
- package/dist/with-tracking-0799ec25.js +0 -78081
|
@@ -56,5 +56,6 @@ import { IndicatorChartProps } from './props';
|
|
|
56
56
|
* <img src="media://indicator-chart-example-1.png" width="400px" />
|
|
57
57
|
* @param props - Indicator chart properties
|
|
58
58
|
* @returns Indicator Chart component
|
|
59
|
+
* @group Charts
|
|
59
60
|
*/
|
|
60
61
|
export declare const IndicatorChart: import("react").FunctionComponent<IndicatorChartProps>;
|
package/dist/line-chart.d.ts
CHANGED
|
@@ -24,5 +24,6 @@ import { LineChartProps } from './props';
|
|
|
24
24
|
* <img src="media://line-chart-example-1.png" width="800px" />
|
|
25
25
|
* @param props - Line chart properties
|
|
26
26
|
* @returns Line Chart component
|
|
27
|
+
* @group Charts
|
|
27
28
|
*/
|
|
28
29
|
export declare const LineChart: import("react").FunctionComponent<LineChartProps>;
|
|
@@ -7,9 +7,7 @@ export interface GetDashboardModelsOptions {
|
|
|
7
7
|
*/
|
|
8
8
|
searchByTitle?: string;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* If not specified, the default value is `false`
|
|
10
|
+
* {@inheritDoc GetDashboardModelOptions.includeWidgets}
|
|
13
11
|
*/
|
|
14
12
|
includeWidgets?: boolean;
|
|
15
13
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type DashboardDto } from '../../api/types/dashboard-dto';
|
|
2
2
|
import { type DashboardModel } from './types';
|
|
3
|
-
export declare function translateDashboard({ oid, title, datasource, widgets, }: DashboardDto): DashboardModel;
|
|
3
|
+
export declare function translateDashboard({ oid, title, datasource, widgets, layout, }: DashboardDto): DashboardModel;
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import { type DataSource } from '@sisense/sdk-data';
|
|
2
2
|
import { WidgetModel } from '../widget/widget-model';
|
|
3
|
+
/** @internal */
|
|
4
|
+
export type Layout = {
|
|
5
|
+
columns: {
|
|
6
|
+
width: number;
|
|
7
|
+
cells: {
|
|
8
|
+
subcells: {
|
|
9
|
+
width: number;
|
|
10
|
+
elements: {
|
|
11
|
+
height: number | string;
|
|
12
|
+
widgetId: string;
|
|
13
|
+
}[];
|
|
14
|
+
}[];
|
|
15
|
+
}[];
|
|
16
|
+
}[];
|
|
17
|
+
};
|
|
3
18
|
export type DashboardModel = {
|
|
4
19
|
oid: string;
|
|
5
20
|
title: string;
|
|
6
21
|
dataSource: DataSource;
|
|
7
22
|
widgets?: WidgetModel[];
|
|
23
|
+
/** @internal */
|
|
24
|
+
layout?: Layout;
|
|
8
25
|
};
|
|
@@ -96,6 +96,8 @@ export type DashboardModelSuccessState = {
|
|
|
96
96
|
```
|
|
97
97
|
* @param params - Parameters of the dashboard to be retrieved
|
|
98
98
|
* @returns Dashboard load state that contains the status of the execution, the result dashboard model, or the error if any
|
|
99
|
+
* @group Fusion Embed
|
|
100
|
+
* @fusionEmbed
|
|
99
101
|
*/
|
|
100
102
|
export declare const useGetDashboardModel: (params: GetDashboardModelParams) => DashboardModelState;
|
|
101
103
|
/**
|
|
@@ -81,6 +81,8 @@ export type DashboardModelsSuccessState = {
|
|
|
81
81
|
```
|
|
82
82
|
* @param params - Parameters of the dashboards to be retrieved
|
|
83
83
|
* @returns Load state that contains the status of the execution, the result dashboards, or the error if any
|
|
84
|
+
* @group Fusion Embed
|
|
85
|
+
* @fusionEmbed
|
|
84
86
|
*/
|
|
85
87
|
export declare const useGetDashboardModels: (params?: GetDashboardModelsParams | undefined) => DashboardModelsState;
|
|
86
88
|
/**
|
|
@@ -93,6 +93,8 @@ export type WidgetModelSuccessState = {
|
|
|
93
93
|
```
|
|
94
94
|
* @param params - Parameters of the widget to be retrieved
|
|
95
95
|
* @returns Widget load state that contains the status of the execution, the result widget model, or the error if one has occurred
|
|
96
|
+
* @group Fusion Embed
|
|
97
|
+
* @fusionEmbed
|
|
96
98
|
*/
|
|
97
99
|
export declare const useGetWidgetModel: (params: GetWidgetModelParams) => WidgetModelState;
|
|
98
100
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Filter } from '@sisense/sdk-data';
|
|
2
2
|
import { ChartDataOptions, TableDataOptions } from '../../chart-data-options/types';
|
|
3
|
-
import { WidgetDto, WidgetType } from '../../dashboard-widget/types';
|
|
3
|
+
import { Panel, WidgetDto, WidgetType } from '../../dashboard-widget/types';
|
|
4
4
|
import { ChartProps, ChartWidgetProps, TableProps, TableWidgetProps } from '../../props';
|
|
5
5
|
import { ExecuteQueryParams } from '../../query-execution';
|
|
6
6
|
import { ChartType, DrilldownOptions, ChartStyleOptions, TableStyleOptions, CompleteThemeSettings } from '../../types';
|
|
@@ -10,6 +10,9 @@ import { ChartType, DrilldownOptions, ChartStyleOptions, TableStyleOptions, Comp
|
|
|
10
10
|
export type WidgetDataOptions = ChartDataOptions | TableDataOptions;
|
|
11
11
|
/**
|
|
12
12
|
* Model of Sisense widget defined in the abstractions of Compose SDK.
|
|
13
|
+
*
|
|
14
|
+
* @group Fusion Embed
|
|
15
|
+
* @fusionEmbed
|
|
13
16
|
*/
|
|
14
17
|
export declare class WidgetModel {
|
|
15
18
|
/**
|
|
@@ -32,6 +35,12 @@ export declare class WidgetModel {
|
|
|
32
35
|
* Widget type.
|
|
33
36
|
*/
|
|
34
37
|
widgetType: WidgetType;
|
|
38
|
+
/** @internal */
|
|
39
|
+
pluginType: string;
|
|
40
|
+
/** @internal */
|
|
41
|
+
pluginPanels: Panel[];
|
|
42
|
+
/** @internal */
|
|
43
|
+
pluginStyles: any;
|
|
35
44
|
/**
|
|
36
45
|
* Widget data options.
|
|
37
46
|
*/
|
|
@@ -60,6 +69,7 @@ export declare class WidgetModel {
|
|
|
60
69
|
* Creates a new widget model.
|
|
61
70
|
*
|
|
62
71
|
* @param widgetDto - The widget DTO to be converted to a widget model
|
|
72
|
+
* @param themeSettings - The theme settings to be used for the widget model
|
|
63
73
|
* @internal
|
|
64
74
|
*/
|
|
65
75
|
constructor(widgetDto: WidgetDto, themeSettings?: CompleteThemeSettings);
|
package/dist/pie-chart.d.ts
CHANGED
|
@@ -24,5 +24,6 @@ import { PieChartProps } from './props';
|
|
|
24
24
|
* <img src="media://pie-chart-example-1.png" width="600px" />
|
|
25
25
|
* @param props - Pie chart properties
|
|
26
26
|
* @returns Pie Chart component
|
|
27
|
+
* @group Charts
|
|
27
28
|
*/
|
|
28
29
|
export declare const PieChart: import("react").FunctionComponent<PieChartProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createDataCellValueFormatter } from './data-cell-value-formatter.js';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PivotTableDataOptions } from '../../../chart-data-options/types.js';
|
|
2
|
+
import type { DateFormatter, HeaderCellFormatter } from '../types.js';
|
|
3
|
+
export declare const createHeaderCellValueFormatter: (dataOptions: PivotTableDataOptions, dateFormatter: DateFormatter) => HeaderCellFormatter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createHeaderCellValueFormatter } from './header-cell-value-formatter.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { JaqlPanel, PivotDataNode, PivotTreeNode } from '@sisense/sdk-pivot-client';
|
|
2
|
+
export type DataCellFormatter = (cell: PivotDataNode, rowItem: PivotTreeNode, columnItem: PivotTreeNode, jaqlPanelItem: JaqlPanel) => void;
|
|
3
|
+
export type HeaderCellFormatter = (cell: PivotTreeNode, jaqlPanelItem: JaqlPanel) => void;
|
|
4
|
+
export type DateFormatter = (date: Date, format: string) => string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Column } from '@sisense/sdk-data';
|
|
2
|
+
import { type PivotTableDataOptions, type StyledColumn, type AnyColumn } from '../../chart-data-options/types';
|
|
3
|
+
export declare const getPivotDataOptionByJaqlIndex: (dataOptions: PivotTableDataOptions, dataOptionIndex?: number) => AnyColumn | undefined;
|
|
4
|
+
export declare const getNumberFormatConfig: (dataOption?: AnyColumn) => Required<import("../..").NumberFormatConfig>;
|
|
5
|
+
export declare const getDateFormatConfig: (dataOption: Column | StyledColumn) => string;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file contain sorting functionality ported from the existing Analytics.
|
|
3
|
+
* It directly works with pivot JAQL to apply sorting.
|
|
4
|
+
*
|
|
5
|
+
* It will be fully refactored soon by using a different approach of applying sorting on Pivot internal data options.
|
|
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;
|
|
55
|
+
};
|
|
56
|
+
export declare function prepareSortedJaql(jaql: JaqlRequest, { type, settings, sortDetails, isSingleRowTree }: SortingSettingsChangePayload): JaqlRequest;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type DataService } from '@sisense/sdk-pivot-client';
|
|
2
|
+
import { type PivotTableDataOptions } from '../chart-data-options/types';
|
|
3
|
+
/**
|
|
4
|
+
* A hook that applies formatting over pivot table cells.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const useApplyPivotTableFormatting: ({ dataService, dataOptions, }: {
|
|
9
|
+
dataService: DataService;
|
|
10
|
+
dataOptions: PivotTableDataOptions;
|
|
11
|
+
}) => void;
|
package/dist/polar-chart.d.ts
CHANGED
|
@@ -24,5 +24,6 @@ import { PolarChartProps } from './props';
|
|
|
24
24
|
* <img src="media://polar-chart-example-1.png" width="600px" />
|
|
25
25
|
* @param props - Polar chart properties
|
|
26
26
|
* @returns Polar Chart component
|
|
27
|
+
* @group Charts
|
|
27
28
|
*/
|
|
28
29
|
export declare const PolarChart: import("react").FunctionComponent<PolarChartProps>;
|
package/dist/props.d.ts
CHANGED
|
@@ -4,9 +4,10 @@ import { HighchartsOptions } from './chart-options-processor/chart-options-servi
|
|
|
4
4
|
import { ComponentType, PropsWithChildren, ReactNode } from 'react';
|
|
5
5
|
import { IndicatorChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, ScatterChartDataOptions, TableDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions, PivotTableDataOptions } from './chart-data-options/types';
|
|
6
6
|
import { AppConfig } from './app/client-application';
|
|
7
|
-
import { ExecuteQueryParams, QueryByWidgetIdState
|
|
7
|
+
import { ExecuteQueryParams, QueryByWidgetIdState } from './query-execution';
|
|
8
8
|
import { FiltersMergeStrategy } from './dashboard-widget/types';
|
|
9
9
|
import { HookEnableParam } from './common/hooks/types';
|
|
10
|
+
import { ExecuteQueryResult } from './query-execution/types';
|
|
10
11
|
export type { MenuItemSection, HighchartsOptions };
|
|
11
12
|
/**
|
|
12
13
|
* Configurations for Sisense Context
|
|
@@ -99,7 +100,7 @@ export interface ExecuteQueryProps {
|
|
|
99
100
|
/** {@inheritDoc ExecuteQueryParams.offset} */
|
|
100
101
|
offset?: number;
|
|
101
102
|
/** Function as child component that is called to render the query results */
|
|
102
|
-
children?: (
|
|
103
|
+
children?: (queryResult: ExecuteQueryResult) => ReactNode;
|
|
103
104
|
/** Callback function that is evaluated when query results are ready */
|
|
104
105
|
onDataChanged?: (data: QueryResultData) => void;
|
|
105
106
|
/** {@inheritDoc ExecuteQueryParams.onBeforeQuery} */
|
|
@@ -759,13 +760,13 @@ export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource
|
|
|
759
760
|
*/
|
|
760
761
|
highlights?: Filter[];
|
|
761
762
|
/**
|
|
762
|
-
* {@inheritDoc
|
|
763
|
+
* {@inheritDoc ExecuteQueryByWidgetIdParams.filtersMergeStrategy}
|
|
763
764
|
*
|
|
764
765
|
* @category Data
|
|
765
766
|
*/
|
|
766
767
|
filtersMergeStrategy?: FiltersMergeStrategy;
|
|
767
768
|
/**
|
|
768
|
-
* {@inheritDoc
|
|
769
|
+
* {@inheritDoc ExecuteQueryByWidgetIdParams.includeDashboardFilters}
|
|
769
770
|
*
|
|
770
771
|
* @category Data
|
|
771
772
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CreateCacheKeyFn } from '../utils/create-cache';
|
|
1
2
|
import { Attribute, Measure, PivotAttribute, PivotMeasure, PivotQueryResultData, QueryResultData } from '@sisense/sdk-data';
|
|
2
3
|
import type { QueryDescription as InternalQueryDescription, PivotQueryDescription as InternalPivotQueryDescription, QueryExecutionConfig } from '@sisense/sdk-query-client';
|
|
3
4
|
import { ClientApplication } from '../app/client-application';
|
|
@@ -25,12 +26,11 @@ export type PivotQueryDescription = Partial<Omit<InternalPivotQueryDescription,
|
|
|
25
26
|
values?: (Measure | PivotMeasure)[];
|
|
26
27
|
};
|
|
27
28
|
/** @internal */
|
|
28
|
-
export declare
|
|
29
|
-
/** @internal */
|
|
30
|
-
export declare const QUERY_DEFAULT_OFFSET = 0;
|
|
31
|
-
/** @internal */
|
|
32
|
-
export declare const executeQuery: (queryDescription: QueryDescription, app: ClientApplication, executionConfig?: QueryExecutionConfig) => Promise<QueryResultData>;
|
|
29
|
+
export declare function executeQuery(queryDescription: QueryDescription, app: ClientApplication, executionConfig?: QueryExecutionConfig): Promise<QueryResultData>;
|
|
33
30
|
/** @internal */
|
|
34
31
|
export declare const executeCsvQuery: (queryDescription: QueryDescription, app: ClientApplication, executionConfig?: QueryExecutionConfig) => Promise<Blob>;
|
|
35
32
|
/** @internal */
|
|
36
33
|
export declare const executePivotQuery: (queryDescription: PivotQueryDescription, app: ClientApplication, executionConfig?: QueryExecutionConfig) => Promise<PivotQueryResultData>;
|
|
34
|
+
export declare const createExecuteQueryCacheKey: CreateCacheKeyFn<typeof executeQuery>;
|
|
35
|
+
export declare const executeQueryWithCache: typeof executeQuery;
|
|
36
|
+
export declare const clearExecuteQueryCache: (specificKey?: string | undefined) => void;
|
|
@@ -33,5 +33,7 @@ import { ExecuteQueryByWidgetIdProps } from '../props';
|
|
|
33
33
|
* ```
|
|
34
34
|
* @param props - ExecuteQueryByWidgetId properties
|
|
35
35
|
* @returns ExecuteQueryByWidgetId component
|
|
36
|
+
* @group Fusion Embed
|
|
37
|
+
* @fusionEmbed
|
|
36
38
|
*/
|
|
37
39
|
export declare const ExecuteQueryByWidgetId: FunctionComponent<ExecuteQueryByWidgetIdProps>;
|
|
@@ -4,4 +4,5 @@ export { useExecuteCsvQuery } from './use-execute-csv-query';
|
|
|
4
4
|
export { ExecuteQueryByWidgetId } from './execute-query-by-widget-id';
|
|
5
5
|
export { useExecuteQueryByWidgetId, executeQueryByWidgetId, } from './use-execute-query-by-widget-id';
|
|
6
6
|
export { useExecutePivotQuery } from './use-execute-pivot-query';
|
|
7
|
-
export
|
|
7
|
+
export { useQueryCache } from './use-query-cache';
|
|
8
|
+
export type { QueryState, QueryLoadingState, QuerySuccessState, QueryErrorState, CsvQueryState, CsvQueryLoadingState, CsvQuerySuccessState, CsvQueryErrorState, PivotQueryState, PivotQueryLoadingState, PivotQuerySuccessState, PivotQueryErrorState, ExecuteQueryParams, ExecuteQueryResult, ExecuteCsvQueryParams, ExecuteCSVQueryConfig, ExecuteQueryByWidgetIdParams, QueryByWidgetIdState, ExecutePivotQueryParams, } from './types';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ExecuteQueryParams } from '../index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Checks if the query parameters have changed by deep comparison.
|
|
4
|
+
*
|
|
5
|
+
* @param prevParams - Previous query parameters
|
|
6
|
+
* @param newParams - New query parameters
|
|
7
|
+
*/
|
|
8
|
+
export declare function isQueryParamsChanged(prevParams: ExecuteQueryParams | undefined, newParams: ExecuteQueryParams): boolean;
|
|
@@ -207,6 +207,13 @@ export interface ExecuteQueryParams {
|
|
|
207
207
|
*/
|
|
208
208
|
onBeforeQuery?: (jaql: any) => any | Promise<any>;
|
|
209
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* Result of a query execution.
|
|
212
|
+
*/
|
|
213
|
+
export type ExecuteQueryResult = QueryState & {
|
|
214
|
+
/** Function to refetch the query */
|
|
215
|
+
refetch: () => void;
|
|
216
|
+
};
|
|
210
217
|
/** Configuration for {@link useExecuteCsvQuery} hook. */
|
|
211
218
|
export type ExecuteCSVQueryConfig = {
|
|
212
219
|
/**
|
|
@@ -70,6 +70,7 @@ import { CsvQueryState, ExecuteCsvQueryParams } from './types.js';
|
|
|
70
70
|
```
|
|
71
71
|
* @param params - Parameters of the query
|
|
72
72
|
* @returns Query state that contains the status of the query execution, the result data, or the error if any occurred
|
|
73
|
+
* @group Queries
|
|
73
74
|
*/
|
|
74
75
|
export declare const useExecuteCsvQuery: (params: ExecuteCsvQueryParams) => CsvQueryState;
|
|
75
76
|
/**
|
|
@@ -34,6 +34,7 @@ import { ExecutePivotQueryParams, PivotQueryState } from './types';
|
|
|
34
34
|
* See also hook {@link useExecuteQuery}, which execute a generic data query.
|
|
35
35
|
* @param params - Parameters of the query
|
|
36
36
|
* @returns Query state that contains the status of the query execution, the result data, or the error if any occurred
|
|
37
|
+
* @group Queries
|
|
37
38
|
* @alpha
|
|
38
39
|
*/
|
|
39
40
|
export declare const useExecutePivotQuery: (params: ExecutePivotQueryParams) => PivotQueryState;
|
|
@@ -28,6 +28,8 @@ import { ExecuteQueryByWidgetIdParams, QueryByWidgetIdState } from './types';
|
|
|
28
28
|
* See also hook {@link useExecuteQuery}, which execute a query specified in code.
|
|
29
29
|
* @param params - Parameters to identify the target widget
|
|
30
30
|
* @returns Query state that contains the status of the query execution, the result data, the constructed query parameters, or the error if any occurred
|
|
31
|
+
* @group Fusion Embed
|
|
32
|
+
* @fusionEmbed
|
|
31
33
|
*/
|
|
32
34
|
export declare const useExecuteQueryByWidgetId: (params: ExecuteQueryByWidgetIdParams) => QueryByWidgetIdState;
|
|
33
35
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExecuteQueryParams,
|
|
1
|
+
import { ExecuteQueryParams, ExecuteQueryResult } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* React hook that executes a data query.
|
|
4
4
|
* This approach, which offers an alternative to {@link ExecuteQuery} component, is similar to React Query's `useQuery` hook.
|
|
@@ -29,18 +29,12 @@ import { ExecuteQueryParams, QueryState } from './types';
|
|
|
29
29
|
* of using the hook to fetch data from Sisense for third-party charts.
|
|
30
30
|
* @param params - Parameters of the query
|
|
31
31
|
* @returns Query state that contains the status of the query execution, the result data, or the error if any occurred
|
|
32
|
+
* @group Queries
|
|
32
33
|
*/
|
|
33
|
-
export declare const useExecuteQuery: (params: ExecuteQueryParams) =>
|
|
34
|
+
export declare const useExecuteQuery: (params: ExecuteQueryParams) => ExecuteQueryResult;
|
|
34
35
|
/**
|
|
35
36
|
* {@link useExecuteQuery} without tracking to be used inside other hooks or components in Compose SDK.
|
|
36
37
|
*
|
|
37
38
|
* @internal
|
|
38
39
|
*/
|
|
39
|
-
export declare function useExecuteQueryInternal(params: ExecuteQueryParams):
|
|
40
|
-
/**
|
|
41
|
-
* Checks if the query parameters have changed by deep comparison.
|
|
42
|
-
*
|
|
43
|
-
* @param prevParams - Previous query parameters
|
|
44
|
-
* @param newParams - New query parameters
|
|
45
|
-
*/
|
|
46
|
-
export declare function isQueryParamsChanged(prevParams: ExecuteQueryParams | undefined, newParams: ExecuteQueryParams): boolean;
|
|
40
|
+
export declare function useExecuteQueryInternal(params: ExecuteQueryParams): ExecuteQueryResult;
|
package/dist/scatter-chart.d.ts
CHANGED
|
@@ -64,5 +64,6 @@ import { ScatterChartProps } from './props';
|
|
|
64
64
|
* <img src="media://scatter-chart-example-1.png" width="800px" />
|
|
65
65
|
* @param props - Scatter chart properties
|
|
66
66
|
* @returns Scatter Chart component
|
|
67
|
+
* @group Charts
|
|
67
68
|
*/
|
|
68
69
|
export declare const ScatterChart: import("react").FunctionComponent<ScatterChartProps>;
|
|
@@ -29,6 +29,7 @@ import { ScattermapChartProps } from './props';
|
|
|
29
29
|
* <img src="media://scattermap-chart-example-1.png" width="600px" />
|
|
30
30
|
* @param props - Scattermap chart properties
|
|
31
31
|
* @returns Scattermap Chart component
|
|
32
|
+
* @group Charts
|
|
32
33
|
* @beta
|
|
33
34
|
*/
|
|
34
35
|
export declare const ScattermapChart: import("react").FunctionComponent<ScattermapChartProps>;
|
|
@@ -32,5 +32,6 @@ import { SisenseContextProviderProps } from '../props';
|
|
|
32
32
|
* ```
|
|
33
33
|
* @param props - Sisense context provider props
|
|
34
34
|
* @returns A Sisense Context Provider Component
|
|
35
|
+
* @group Contexts
|
|
35
36
|
*/
|
|
36
37
|
export declare const SisenseContextProvider: FunctionComponent<PropsWithChildren<SisenseContextProviderProps>>;
|
package/dist/sunburst-chart.d.ts
CHANGED
|
@@ -23,5 +23,6 @@ import { SunburstChartProps } from './props';
|
|
|
23
23
|
* <img src="media://sunburst-chart-example-1.png" width="600px" />
|
|
24
24
|
* @param props - Sunburst chart properties
|
|
25
25
|
* @returns Sunburst Chart component
|
|
26
|
+
* @group Charts
|
|
26
27
|
*/
|
|
27
28
|
export declare const SunburstChart: import("react").FunctionComponent<SunburstChartProps>;
|
package/dist/table/table.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ import { TableProps } from '../props';
|
|
|
46
46
|
* <img src="media://table-example-2.png" width="800px" />
|
|
47
47
|
* @param props - Table properties
|
|
48
48
|
* @returns Table component
|
|
49
|
+
* @group Data Grids
|
|
49
50
|
*/
|
|
50
51
|
export declare const Table: React.FunctionComponent<TableProps>;
|
|
51
52
|
export declare const DEFAULT_TABLE_ROWS_PER_PAGE: 25;
|
|
@@ -4,6 +4,12 @@ import { CompleteThemeSettings } from '../types';
|
|
|
4
4
|
export declare const ThemeContext: import("react").Context<{
|
|
5
5
|
themeSettings: CompleteThemeSettings;
|
|
6
6
|
}>;
|
|
7
|
+
/**
|
|
8
|
+
* Hook to get the current theme settings.
|
|
9
|
+
*
|
|
10
|
+
* @returns The current theme settings
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
7
13
|
export declare const useThemeContext: () => {
|
|
8
14
|
themeSettings: CompleteThemeSettings;
|
|
9
15
|
};
|
|
@@ -41,5 +47,6 @@ export declare const useThemeContext: () => {
|
|
|
41
47
|
* @see {@link ThemeSettings} and IndicatorChart
|
|
42
48
|
* @param props - Theme provider props
|
|
43
49
|
* @returns A Theme Provider component
|
|
50
|
+
* @group Contexts
|
|
44
51
|
*/
|
|
45
52
|
export declare const ThemeProvider: import("react").FunctionComponent<ThemeProviderProps>;
|
package/dist/treemap-chart.d.ts
CHANGED
|
@@ -29,5 +29,6 @@ import { TreemapChartProps } from './props';
|
|
|
29
29
|
* <img src="media://treemap-chart-example-1.png" width="600px" />
|
|
30
30
|
* @param props - Treemap chart properties
|
|
31
31
|
* @returns Treemap Chart component
|
|
32
|
+
* @group Charts
|
|
32
33
|
*/
|
|
33
34
|
export declare const TreemapChart: import("react").FunctionComponent<TreemapChartProps>;
|
package/dist/types.d.ts
CHANGED
|
@@ -847,7 +847,7 @@ export type SeriesWithAlerts<T> = {
|
|
|
847
847
|
};
|
|
848
848
|
/**
|
|
849
849
|
* Context menu position coordinates
|
|
850
|
-
* Used in {@link ContextMenuProps}
|
|
850
|
+
* Used in {@link ContextMenuProps}
|
|
851
851
|
*/
|
|
852
852
|
export type MenuPosition = {
|
|
853
853
|
/** Horizontal position */
|
|
@@ -857,7 +857,7 @@ export type MenuPosition = {
|
|
|
857
857
|
};
|
|
858
858
|
/**
|
|
859
859
|
* Context menu section
|
|
860
|
-
* Used in {@link ContextMenuProps}
|
|
860
|
+
* Used in {@link ContextMenuProps}
|
|
861
861
|
*/
|
|
862
862
|
export type MenuItemSection = {
|
|
863
863
|
/** Optional section title */
|