@sisense/sdk-ui 1.2.0 → 1.4.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.
Files changed (114) hide show
  1. package/dist/ai/ai-context-provider.d.ts +32 -0
  2. package/dist/ai/api/chat-api-provider.d.ts +17 -0
  3. package/dist/ai/api/chat-rest-api.d.ts +3 -1
  4. package/dist/ai/api/errors.d.ts +1 -0
  5. package/dist/ai/api/hooks.d.ts +10 -49
  6. package/dist/ai/api/types.d.ts +16 -27
  7. package/dist/ai/buttons/thumbs-down-button.d.ts +6 -0
  8. package/dist/ai/buttons/thumbs-up-button.d.ts +6 -0
  9. package/dist/ai/chat-box.d.ts +3 -3
  10. package/dist/ai/chat-config.d.ts +28 -0
  11. package/dist/ai/chat-home.d.ts +5 -1
  12. package/dist/ai/chat-router.d.ts +2 -0
  13. package/dist/ai/chatbot.d.ts +26 -4
  14. package/dist/ai/common/tooltip.d.ts +5 -0
  15. package/dist/ai/error-page.d.ts +10 -0
  16. package/dist/ai/get-nlg-query-result.d.ts +78 -0
  17. package/dist/ai/icons/thumbs-down-hovered-icon.d.ts +2 -0
  18. package/dist/ai/icons/thumbs-down-icon.d.ts +2 -0
  19. package/dist/ai/icons/thumbs-up-hovered-icon.d.ts +2 -0
  20. package/dist/ai/icons/thumbs-up-icon.d.ts +2 -0
  21. package/dist/ai/index.d.ts +6 -3
  22. package/dist/ai/loading-page.d.ts +2 -0
  23. package/dist/ai/messages/clear-history-success-message.d.ts +2 -0
  24. package/dist/ai/messages/feedback-wrapper.d.ts +9 -0
  25. package/dist/ai/messages/get-widget-options.d.ts +2 -1
  26. package/dist/ai/messages/message-resolver.d.ts +1 -2
  27. package/dist/ai/messages/text-message.d.ts +1 -1
  28. package/dist/ai/toolbar.d.ts +2 -2
  29. package/dist/ai/use-chat-session.d.ts +1 -1
  30. package/dist/ai/use-get-nlg-query-result.d.ts +103 -0
  31. package/dist/ai/use-get-query-recommendations.d.ts +67 -0
  32. package/dist/ai.js +1866 -1518
  33. package/dist/api/types/dashboard-dto.d.ts +4 -1
  34. package/dist/app/client-application.d.ts +6 -1
  35. package/dist/{chart.d.ts → chart/chart.d.ts} +1 -1
  36. package/dist/chart/helpers/use-synced-data.d.ts +8 -0
  37. package/dist/chart/helpers/use-translated-data-options.d.ts +7 -0
  38. package/dist/chart/index.d.ts +1 -0
  39. package/dist/chart-data/types.d.ts +5 -4
  40. package/dist/chart-data-options/translate-data-options.d.ts +5 -1
  41. package/dist/chart-data-options/types.d.ts +107 -12
  42. package/dist/chart-options-processor/apply-event-handlers.d.ts +5 -28
  43. package/dist/chart-options-processor/boxplot-chart-options.d.ts +2 -2
  44. package/dist/chart-options-processor/category-chart-options.d.ts +1 -1
  45. package/dist/chart-options-processor/chart-options-service.d.ts +7 -0
  46. package/dist/chart-options-processor/plot-bands.d.ts +2 -2
  47. package/dist/chart-options-processor/scatter-chart-options.d.ts +2 -2
  48. package/dist/chart-options-processor/style-to-design-options-translator/index.d.ts +1 -0
  49. package/dist/chart-options-processor/style-to-design-options-translator/prepare-design-options.d.ts +4 -0
  50. package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +2 -2
  51. package/dist/chart-options-processor/translations/base-design-options.d.ts +3 -3
  52. package/dist/chart-options-processor/translations/boxplot/boxplot-plot-options.d.ts +2 -2
  53. package/dist/chart-options-processor/translations/design-options.d.ts +4 -2
  54. package/dist/chart-options-processor/translations/number-format-config.d.ts +10 -16
  55. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +4 -4
  56. package/dist/chart-options-processor/translations/types.d.ts +18 -6
  57. package/dist/chart-options-processor/translations/value-label-section.d.ts +9 -4
  58. package/dist/charts/indicator/indicator-legacy-chart-options/indicator-legacy-chart-options.d.ts +3 -0
  59. package/dist/charts/indicator/indicator-legacy-chart-options/prepare-ticker-options.d.ts +2 -0
  60. package/dist/charts/indicator/types.d.ts +2 -0
  61. package/dist/charts/map-charts/areamap/areamap-map.d.ts +2 -1
  62. package/dist/charts/map-charts/areamap/areamap.d.ts +6 -4
  63. package/dist/charts/map-charts/areamap/use-geo-json.d.ts +1 -1
  64. package/dist/charts/map-charts/scattermap/scattermap.d.ts +11 -5
  65. package/dist/charts/map-charts/scattermap/utils/location.d.ts +3 -0
  66. package/dist/charts/map-charts/scattermap/utils/markers.d.ts +4 -14
  67. package/dist/charts/table/helpers/calc-column-widths.d.ts +3 -1
  68. package/dist/common/components/loading-overlay.d.ts +14 -0
  69. package/dist/common/hooks/data-load-state-reducer.d.ts +10 -0
  70. package/dist/common/hooks/use-hover.d.ts +8 -0
  71. package/dist/common/icons/yellow-exclamation-mark-icon.d.ts +2 -0
  72. package/dist/dashboard-widget/translate-widget-data-options.d.ts +1 -1
  73. package/dist/dashboard-widget/translate-widget-filters.d.ts +1 -1
  74. package/dist/dashboard-widget/types.d.ts +1 -0
  75. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +3 -0
  76. package/dist/dashboard-widget/utils.d.ts +26 -1
  77. package/dist/decorators/hook-decorators/with-tracking.d.ts +11 -0
  78. package/dist/filters/components/common/checkbox.d.ts +1 -0
  79. package/dist/formulas/fetch-formula.d.ts +2 -0
  80. package/dist/formulas/index.d.ts +1 -0
  81. package/dist/formulas/use-get-shared-formula.d.ts +5 -0
  82. package/dist/index.d.ts +5 -4
  83. package/dist/index.js +35370 -11599
  84. package/dist/indicator-canvas.d.ts +2 -2
  85. package/dist/models/dashboard/use-get-dashboard-model.d.ts +8 -0
  86. package/dist/models/dashboard/use-get-dashboard-models.d.ts +6 -0
  87. package/dist/models/widget/widget-model.d.ts +2 -2
  88. package/dist/pivot-table/index.d.ts +1 -0
  89. package/dist/pivot-table/pivot-table.d.ts +42 -0
  90. package/dist/pivot-table/use-get-pivot-table-query.d.ts +14 -0
  91. package/dist/props.d.ts +209 -52
  92. package/dist/query-execution/query-state-reducer.d.ts +1 -0
  93. package/dist/query-execution/types.d.ts +3 -3
  94. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +2 -5
  95. package/dist/sisense-chart/index.d.ts +2 -0
  96. package/dist/sisense-chart/sisense-chart.d.ts +23 -0
  97. package/dist/sisense-chart/types.d.ts +5 -0
  98. package/dist/table/hooks/use-table-data.d.ts +2 -2
  99. package/dist/translation/resources/en.d.ts +1 -0
  100. package/dist/translation/resources/index.d.ts +2 -0
  101. package/dist/types.d.ts +126 -14
  102. package/dist/utils/filters-comparator.d.ts +2 -2
  103. package/dist/utils/utility-types.d.ts +12 -0
  104. package/dist/widgets/common/custom-drilldown.d.ts +1 -1
  105. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
  106. package/dist/widgets/common/drilldown.d.ts +4 -2
  107. package/dist/{table-widget-65f3e04e.js → with-tracking-b583e949.js} +40958 -40712
  108. package/package.json +13 -13
  109. package/dist/ai/api/chat-api-context.d.ts +0 -12
  110. package/dist/ai/chatbot-context.d.ts +0 -11
  111. package/dist/ai/nlg-query-result.d.ts +0 -20
  112. package/dist/dashboard-widget/translate-widget.d.ts +0 -12
  113. package/dist/query-execution/utils.d.ts +0 -9
  114. package/dist/sisense-chart.d.ts +0 -23
@@ -3,7 +3,7 @@ import { type FunctionComponent } from 'react';
3
3
  import { IndicatorChartData } from './chart-data/types';
4
4
  import { IndicatorChartDesignOptions } from './chart-options-processor/translations/design-options';
5
5
  import { ChartData } from './chart-data/types';
6
- import { ChartDesignOptions } from './chart-options-processor/translations/types';
6
+ import { DesignOptions } from './chart-options-processor/translations/types';
7
7
  import { ThemeSettings } from './types';
8
8
  interface Props {
9
9
  chartData: IndicatorChartData;
@@ -17,5 +17,5 @@ interface Props {
17
17
  export declare const IndicatorCanvas: FunctionComponent<Props>;
18
18
  export declare const isIndicatorChartData: (chartData: ChartData) => chartData is IndicatorChartData;
19
19
  export declare const isIndicatorChartDataOptionsInternal: (dataOptions: ChartDataOptionsInternal) => dataOptions is IndicatorChartDataOptionsInternal;
20
- export declare const isIndicatorDesignOptions: (designOptions: ChartDesignOptions) => designOptions is IndicatorChartDesignOptions;
20
+ export declare const isIndicatorDesignOptions: (designOptions: DesignOptions) => designOptions is IndicatorChartDesignOptions;
21
21
  export {};
@@ -1,3 +1,4 @@
1
+ import { DataState } from '../../common/hooks/data-load-state-reducer';
1
2
  import { type DashboardModel } from './types';
2
3
  import { GetDashboardModelOptions } from './get-dashboard-model';
3
4
  import { HookEnableParam } from '../../common/hooks/types';
@@ -103,3 +104,10 @@ export declare const useGetDashboardModel: (params: GetDashboardModelParams) =>
103
104
  * @internal
104
105
  */
105
106
  export declare function useGetDashboardModelInternal(params: GetDashboardModelParams): DashboardModelState;
107
+ /**
108
+ * Translates the data state to the dashboard model state.
109
+ *
110
+ * @internal
111
+ * @param dataState - The data state to be translated
112
+ */
113
+ export declare function translateToDashboardResponse(dataState: DataState<DashboardModel>): DashboardModelState;
@@ -1,3 +1,4 @@
1
+ import { DataState } from '../../common/hooks/data-load-state-reducer.js';
1
2
  import { type DashboardModel } from './types.js';
2
3
  import { HookEnableParam } from '../../common/hooks/types.js';
3
4
  import { GetDashboardModelsOptions } from './get-dashboard-models.js';
@@ -88,3 +89,8 @@ export declare const useGetDashboardModels: (params?: GetDashboardModelsParams |
88
89
  * @internal
89
90
  */
90
91
  export declare function useGetDashboardModelsInternal(params?: GetDashboardModelsParams): DashboardModelsState;
92
+ /**
93
+ * @internal
94
+ * Translates the data state to a dashboard models state.
95
+ **/
96
+ export declare function translateToDashboardsResponse(dataState: DataState<DashboardModel[]>): DashboardModelsState;
@@ -3,7 +3,7 @@ import { ChartDataOptions, TableDataOptions } from '../../chart-data-options/typ
3
3
  import { WidgetDto, WidgetType } from '../../dashboard-widget/types';
4
4
  import { ChartProps, ChartWidgetProps, TableProps, TableWidgetProps } from '../../props';
5
5
  import { ExecuteQueryParams } from '../../query-execution';
6
- import { ChartType, DrilldownOptions, ChartStyleOptions, TableStyleOptions } from '../../types';
6
+ import { ChartType, DrilldownOptions, ChartStyleOptions, TableStyleOptions, CompleteThemeSettings } from '../../types';
7
7
  /**
8
8
  * Widget data options.
9
9
  */
@@ -62,7 +62,7 @@ export declare class WidgetModel {
62
62
  * @param widgetDto - The widget DTO to be converted to a widget model
63
63
  * @internal
64
64
  */
65
- constructor(widgetDto: WidgetDto);
65
+ constructor(widgetDto: WidgetDto, themeSettings?: CompleteThemeSettings);
66
66
  /**
67
67
  * Returns the parameters to be used for executing a query for the widget.
68
68
  *
@@ -0,0 +1 @@
1
+ export { PivotTable } from './pivot-table';
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import { PivotTableProps } from '../props';
3
+ /**
4
+ * Pivot Table with pagination.
5
+ *
6
+ * See [Pivot Tables](https://docs.sisense.com/main/SisenseLinux/pivot.htm) for more information.
7
+ *
8
+ * @example
9
+ * (1) Example of PivotTable from the `Sample ECommerce` data model:
10
+ *
11
+ * ```tsx
12
+ * <PivotTable
13
+ * dataSet={DM.DataSource}
14
+ * dataOptions={{
15
+ * rows: [
16
+ * { column: DM.Category.Category, includeSubTotals: true },
17
+ * { column: DM.Commerce.AgeRange, includeSubTotals: true },
18
+ * DM.Commerce.Condition,
19
+ * ],
20
+ * columns: [{ column: DM.Commerce.Gender, includeSubTotals: true }],
21
+ * values: [
22
+ * {
23
+ * column: measureFactory.sum(DM.Commerce.Cost, 'Total Cost'),
24
+ * dataBars: true,
25
+ * totalsCalculation: 'sum',
26
+ * },
27
+ * {
28
+ * column: measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue'),
29
+ * totalsCalculation: 'sum',
30
+ * },
31
+ * ],
32
+ * grandTotals: { title: 'Grand Total', rows: true, columns: true },
33
+ * }}
34
+ * filters={[filterFactory.members(DM.Commerce.Gender, ['Female', 'Male'])]}
35
+ * styleOptions={{ width: 1000, height: 600, rowsPerPage: 50 }}
36
+ * />
37
+ * ```
38
+ * @param props - Pivot Table properties
39
+ * @returns Pivot Table component
40
+ * @alpha
41
+ */
42
+ export declare const PivotTable: React.FunctionComponent<PivotTableProps>;
@@ -0,0 +1,14 @@
1
+ import { PivotTableProps } from '../props';
2
+ import { JaqlRequest } from '@sisense/sdk-pivot-client';
3
+ /**
4
+ * A hook that returns the JAQL request object from pivot table props.
5
+ *
6
+ * @internal
7
+ */
8
+ export declare const useGetPivotTableQuery: ({ dataSet, dataOptions, filters }: PivotTableProps) => {
9
+ isLoading: boolean;
10
+ isSuccess: boolean;
11
+ isError: boolean;
12
+ error: Error | undefined;
13
+ jaql: JaqlRequest | null;
14
+ };
package/dist/props.d.ts CHANGED
@@ -1,14 +1,13 @@
1
- import { Attribute, Filter, Measure, DataSource, Data, QueryResultData, FilterRelation } 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 } from './types';
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';
3
3
  import { HighchartsOptions } from './chart-options-processor/chart-options-service';
4
4
  import { ComponentType, PropsWithChildren, ReactNode } from 'react';
5
- import { IndicatorChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, ScatterChartDataOptions, TableDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions } from './chart-data-options/types';
6
- import { DataPointEventHandler, DataPointsEventHandler, ScatterDataPointEventHandler, ScatterDataPointsEventHandler } from './chart-options-processor/apply-event-handlers';
5
+ import { IndicatorChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, ScatterChartDataOptions, TableDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions, PivotTableDataOptions } from './chart-data-options/types';
7
6
  import { AppConfig } from './app/client-application';
8
7
  import { ExecuteQueryParams, QueryByWidgetIdState, QueryState } from './query-execution';
9
8
  import { FiltersMergeStrategy } from './dashboard-widget/types';
10
9
  import { HookEnableParam } from './common/hooks/types';
11
- export type { ScatterDataPointEventHandler, ScatterDataPointsEventHandler, DataPointEventHandler, DataPointsEventHandler, MenuItemSection, HighchartsOptions, };
10
+ export type { MenuItemSection, HighchartsOptions };
12
11
  /**
13
12
  * Configurations for Sisense Context
14
13
  */
@@ -66,6 +65,15 @@ export interface SisenseContextProviderProps {
66
65
  * @internal
67
66
  */
68
67
  enableTracking?: boolean;
68
+ /**
69
+ * Boolean flag to enable sending silent pre-authentication requests to the Sisense instance.
70
+ * Used to check if user is already authenticated, check is performed in an ivisible iframe.
71
+ * Used only with SSO authentication.
72
+ * If not specified, the default value is `false`.
73
+ *
74
+ * @internal
75
+ */
76
+ enableSilentPreAuth?: boolean;
69
77
  }
70
78
  /**
71
79
  * Props for {@link ExecuteQuery} component.
@@ -82,7 +90,7 @@ export interface ExecuteQueryProps {
82
90
  /** Measures of the query */
83
91
  measures?: Measure[];
84
92
  /** Filters that will slice query results */
85
- filters?: Filter[] | FilterRelation;
93
+ filters?: Filter[] | FilterRelations;
86
94
  /** Highlight filters that will highlight results that pass filter criteria */
87
95
  highlights?: Filter[];
88
96
  /**
@@ -151,74 +159,168 @@ export type ThemeProviderProps = PropsWithChildren<{
151
159
  export type BeforeRenderHandler = (
152
160
  /** Highcharts options */
153
161
  highchartsOptions: HighchartsOptions) => HighchartsOptions;
154
- interface BaseChartEventProps {
162
+ /**
163
+ * Click handler for when an abstract data point (data point of any chart) is clicked
164
+ */
165
+ export type ChartDataPointsEventHandler = (
166
+ /** Abstract data points that were selected */
167
+ points: ChartDataPoints,
168
+ /** Native MouseEvent */
169
+ nativeEvent: MouseEvent | PointerEvent) => void;
170
+ /** Click handler for when multiple data points are selected. */
171
+ export type DataPointsEventHandler = (
172
+ /** Data points that were selected */
173
+ points: DataPoint[],
174
+ /** Native MouseEvent */
175
+ nativeEvent: MouseEvent) => void;
176
+ /** Click handler for when a data point is clicked. One parameter, `DataPoint`, is passed to the function. */
177
+ export type DataPointEventHandler = (
178
+ /** Data point that was clicked */
179
+ point: DataPoint,
180
+ /** Native PointerEvent */
181
+ nativeEvent: PointerEvent) => void;
182
+ /** Click handler for when a scatter data point is clicked */
183
+ export type ScatterDataPointEventHandler = (
184
+ /** Data point that was clicked */
185
+ point: ScatterDataPoint,
186
+ /** Native PointerEvent */
187
+ nativeEvent: PointerEvent) => void;
188
+ /** Click handler for when multiple scatter data points are selected. */
189
+ export type ScatterDataPointsEventHandler = (
190
+ /** Data points that were selected */
191
+ points: ScatterDataPoint[],
192
+ /** Native MouseEvent */
193
+ nativeEvent: MouseEvent) => void;
194
+ /**
195
+ * Click handler for when a data point on Areamap is clicked.
196
+ */
197
+ export type AreamapDataPointEventHandler = (
198
+ /** Data point that was clicked */
199
+ point: AreamapDataPoint,
200
+ /** Native MouseEvent */
201
+ nativeEvent: MouseEvent) => void;
202
+ /**
203
+ * Click handler for when a data point on Scattermap is clicked.
204
+ */
205
+ export type ScattermapDataPointEventHandler = (
206
+ /** Data point that was clicked */
207
+ point: ScattermapDataPoint,
208
+ /** Native MouseEvent */
209
+ nativeEvent: MouseEvent) => void;
210
+ /**
211
+ * Click handler for when a data point on Boxplot is clicked.
212
+ */
213
+ export type BoxplotDataPointEventHandler = (
214
+ /** Data point that was clicked */
215
+ point: BoxplotDataPoint,
216
+ /** Native PointerEvent */
217
+ nativeEvent: PointerEvent) => void;
218
+ interface HighchartsBasedChartEventProps {
155
219
  /**
156
- * Click handler callback for a data point
220
+ * Before render handler callback that allows adjusting
221
+ * detail chart options prior to render
222
+ *
223
+ * This callback is not supported for Indicator Chart, Areamap Chart, and Scattermap Chart.
157
224
  *
158
225
  * @category Callbacks
159
226
  */
160
- onDataPointClick?: DataPointEventHandler | ScatterDataPointEventHandler;
227
+ onBeforeRender?: BeforeRenderHandler;
228
+ }
229
+ /**
230
+ * Event props for regular (non-specific) charts which uses DataPoint type
231
+ * to describe data points for events.
232
+ */
233
+ interface RegularChartEventProps extends HighchartsBasedChartEventProps {
161
234
  /**
162
- * Context menu handler callback for a data point
235
+ * Click handler callback for a data point
163
236
  *
164
237
  * @category Callbacks
165
238
  */
166
- onDataPointContextMenu?: DataPointEventHandler | ScatterDataPointEventHandler;
239
+ onDataPointClick?: DataPointEventHandler;
167
240
  /**
168
- * Handler callback for selection of multiple data points
241
+ * Context menu handler callback for a data point
169
242
  *
170
243
  * @category Callbacks
171
244
  */
172
- onDataPointsSelected?: DataPointsEventHandler | ScatterDataPointsEventHandler;
245
+ onDataPointContextMenu?: DataPointEventHandler;
173
246
  /**
174
- * Before render handler callback that allows adjusting
175
- * detail chart options prior to render
176
- *
177
- * This callback is not yet supported for Indicator Chart
247
+ * Handler callback for selection of multiple data points
178
248
  *
179
249
  * @category Callbacks
180
250
  */
181
- onBeforeRender?: BeforeRenderHandler;
251
+ onDataPointsSelected?: DataPointsEventHandler;
182
252
  }
183
- interface ChartEventProps extends BaseChartEventProps {
253
+ /**
254
+ * Event props for Scatter chart which uses ScatterDataPoint type
255
+ * to describe data points for events.
256
+ */
257
+ interface ScatterChartEventProps extends HighchartsBasedChartEventProps {
184
258
  /**
185
259
  * Click handler callback for a data point
186
260
  *
187
261
  * @category Callbacks
188
262
  */
189
- onDataPointClick?: DataPointEventHandler;
263
+ onDataPointClick?: ScatterDataPointEventHandler;
190
264
  /**
191
265
  * Context menu handler callback for a data point
192
266
  *
193
267
  * @category Callbacks
194
268
  */
195
- onDataPointContextMenu?: DataPointEventHandler;
269
+ onDataPointContextMenu?: ScatterDataPointEventHandler;
196
270
  /**
197
271
  * Handler callback for selection of multiple data points
198
272
  *
199
273
  * @category Callbacks
200
274
  */
201
- onDataPointsSelected?: DataPointsEventHandler;
275
+ onDataPointsSelected?: ScatterDataPointsEventHandler;
202
276
  }
203
- interface ScatterChartEventProps extends BaseChartEventProps {
277
+ /**
278
+ * Event props for Areamap chart which uses AreamapDataPoint type
279
+ * to describe data points for events.
280
+ */
281
+ interface AreamapChartEventProps {
204
282
  /**
205
283
  * Click handler callback for a data point
206
284
  *
207
285
  * @category Callbacks
208
286
  */
209
- onDataPointClick?: ScatterDataPointEventHandler;
287
+ onDataPointClick?: AreamapDataPointEventHandler;
288
+ }
289
+ /**
290
+ * Event props for Scattermap chart which uses ScattermapDataPoint type
291
+ * to describe data points for events.
292
+ */
293
+ interface ScattermapChartEventProps {
294
+ /**
295
+ * Click handler callback for a data point
296
+ *
297
+ * @category Callbacks
298
+ */
299
+ onDataPointClick?: ScattermapDataPointEventHandler;
300
+ }
301
+ /**
302
+ * Event props for Boxplot chart which uses BoxplotDataPoint type
303
+ * to describe data points for events.
304
+ */
305
+ interface BoxplotChartEventProps extends HighchartsBasedChartEventProps {
306
+ /**
307
+ * Click handler callback for a data point
308
+ *
309
+ * @category Callbacks
310
+ */
311
+ onDataPointClick?: BoxplotDataPointEventHandler;
210
312
  /**
211
313
  * Context menu handler callback for a data point
212
314
  *
213
315
  * @category Callbacks
214
316
  */
215
- onDataPointContextMenu?: ScatterDataPointEventHandler;
317
+ onDataPointContextMenu?: BoxplotDataPointEventHandler;
216
318
  /**
217
319
  * Handler callback for selection of multiple data points
218
320
  *
219
321
  * @category Callbacks
220
322
  */
221
- onDataPointsSelected?: ScatterDataPointsEventHandler;
323
+ onDataPointsSelected?: DataPointsEventHandler;
222
324
  }
223
325
  /**
224
326
  * Base Chart Props to be extended by {@link ChartProps}
@@ -253,7 +355,7 @@ export interface BaseChartProps {
253
355
  *
254
356
  * @category Data
255
357
  */
256
- filters?: Filter[] | FilterRelation;
358
+ filters?: Filter[] | FilterRelations;
257
359
  /**
258
360
  * Highlight filters that will highlight results that pass filter criteria
259
361
  *
@@ -261,10 +363,33 @@ export interface BaseChartProps {
261
363
  */
262
364
  highlights?: Filter[];
263
365
  }
366
+ /**
367
+ * Chart props to be able to react on chart events.
368
+ */
369
+ interface ChartEventProps extends HighchartsBasedChartEventProps {
370
+ /**
371
+ * Click handler callback for a data point
372
+ *
373
+ * @category Callbacks
374
+ */
375
+ onDataPointClick?: DataPointEventHandler | ScatterDataPointEventHandler | AreamapDataPointEventHandler | BoxplotDataPointEventHandler | ScattermapDataPointEventHandler;
376
+ /**
377
+ * Context menu handler callback for a data point
378
+ *
379
+ * @category Callbacks
380
+ */
381
+ onDataPointContextMenu?: DataPointEventHandler | ScatterDataPointEventHandler | BoxplotDataPointEventHandler;
382
+ /**
383
+ * Handler callback for selection of multiple data points
384
+ *
385
+ * @category Callbacks
386
+ */
387
+ onDataPointsSelected?: DataPointsEventHandler | ScatterDataPointsEventHandler;
388
+ }
264
389
  /**
265
390
  * Props shared across {@link Chart} components.
266
391
  */
267
- export interface ChartProps extends BaseChartProps, BaseChartEventProps {
392
+ export interface ChartProps extends BaseChartProps, ChartEventProps {
268
393
  /**
269
394
  * Default chart type of each series.
270
395
  *
@@ -294,7 +419,7 @@ export interface ChartProps extends BaseChartProps, BaseChartEventProps {
294
419
  /**
295
420
  * Props of the {@link AreaChart} component.
296
421
  */
297
- export interface AreaChartProps extends BaseChartProps, ChartEventProps {
422
+ export interface AreaChartProps extends BaseChartProps, RegularChartEventProps, HighchartsBasedChartEventProps {
298
423
  /**
299
424
  * Configurations for how to interpret and present data passed to the chart.
300
425
  *
@@ -311,7 +436,7 @@ export interface AreaChartProps extends BaseChartProps, ChartEventProps {
311
436
  /**
312
437
  * Props of the {@link BarChart} component.
313
438
  */
314
- export interface BarChartProps extends BaseChartProps, ChartEventProps {
439
+ export interface BarChartProps extends BaseChartProps, RegularChartEventProps, HighchartsBasedChartEventProps {
315
440
  /**
316
441
  * Configurations for how to interpret and present the data passed to the chart
317
442
  *
@@ -328,7 +453,7 @@ export interface BarChartProps extends BaseChartProps, ChartEventProps {
328
453
  /**
329
454
  * Props of the {@link ColumnChart} component.
330
455
  */
331
- export interface ColumnChartProps extends BaseChartProps, ChartEventProps {
456
+ export interface ColumnChartProps extends BaseChartProps, HighchartsBasedChartEventProps, RegularChartEventProps {
332
457
  /**
333
458
  * Configurations for how to interpret and present the data passed to the chart
334
459
  *
@@ -345,7 +470,7 @@ export interface ColumnChartProps extends BaseChartProps, ChartEventProps {
345
470
  /**
346
471
  * Props of the {@link FunnelChart} component.
347
472
  */
348
- export interface FunnelChartProps extends BaseChartProps, ChartEventProps {
473
+ export interface FunnelChartProps extends BaseChartProps, HighchartsBasedChartEventProps, RegularChartEventProps {
349
474
  /**
350
475
  * Configurations for how to interpret and present the data passed to the chart
351
476
  *
@@ -362,7 +487,7 @@ export interface FunnelChartProps extends BaseChartProps, ChartEventProps {
362
487
  /**
363
488
  * Props of the {@link LineChart} component.
364
489
  */
365
- export interface LineChartProps extends BaseChartProps, ChartEventProps {
490
+ export interface LineChartProps extends BaseChartProps, HighchartsBasedChartEventProps, RegularChartEventProps {
366
491
  /**
367
492
  * Configurations for how to interpret and present data passed to the chart.
368
493
  *
@@ -379,7 +504,7 @@ export interface LineChartProps extends BaseChartProps, ChartEventProps {
379
504
  /**
380
505
  * Props of the {@link PieChart} component.
381
506
  */
382
- export interface PieChartProps extends BaseChartProps, ChartEventProps {
507
+ export interface PieChartProps extends BaseChartProps, HighchartsBasedChartEventProps, RegularChartEventProps {
383
508
  /**
384
509
  * Configurations for how to interpret and present the data passed to the chart
385
510
  *
@@ -396,7 +521,7 @@ export interface PieChartProps extends BaseChartProps, ChartEventProps {
396
521
  /**
397
522
  * Props of the {@link PolarChart} component.
398
523
  */
399
- export interface PolarChartProps extends BaseChartProps, ChartEventProps {
524
+ export interface PolarChartProps extends BaseChartProps, HighchartsBasedChartEventProps, RegularChartEventProps {
400
525
  /** Configurations for how to interpret and present the data passed to the chart */
401
526
  dataOptions: CartesianChartDataOptions;
402
527
  /** Configuration that defines functional style of the various chart elements */
@@ -433,7 +558,7 @@ export interface TableProps {
433
558
  *
434
559
  * @category Data
435
560
  */
436
- filters?: Filter[] | FilterRelation;
561
+ filters?: Filter[] | FilterRelations;
437
562
  /**
438
563
  * Configurations that define functional style of the various table elements
439
564
  *
@@ -448,10 +573,48 @@ export interface TableProps {
448
573
  */
449
574
  refreshCounter?: number;
450
575
  }
576
+ /**
577
+ * Props of the {@link PivotTable} component.
578
+ */
579
+ export interface PivotTableProps {
580
+ /**
581
+ * Data source name (as a `string`) - e.g. `Sample ECommerce`.
582
+ *
583
+ * If not specified, the component will use the `defaultDataSource` specified in the parent Sisense Context.
584
+ *
585
+ * @category Data
586
+ */
587
+ dataSet?: DataSource;
588
+ /**
589
+ * Configurations for how to interpret and present the data passed to the component
590
+ *
591
+ * @category Representation
592
+ */
593
+ dataOptions: PivotTableDataOptions;
594
+ /**
595
+ * Filters that will slice query results
596
+ *
597
+ * @category Data
598
+ */
599
+ filters?: Filter[] | FilterRelations;
600
+ /**
601
+ * Configurations that define functional style of the various table elements
602
+ *
603
+ * @category Representation
604
+ */
605
+ styleOptions?: PivotTableStyleOptions;
606
+ /**
607
+ * Used to force a refresh of the table from outside the table component
608
+ * Since added to dependencies of useEffect, will trigger a query execution
609
+ *
610
+ * @internal
611
+ */
612
+ refreshCounter?: number;
613
+ }
451
614
  /**
452
615
  * Props of the {@link ScatterChart} component.
453
616
  */
454
- export interface ScatterChartProps extends BaseChartProps, ScatterChartEventProps {
617
+ export interface ScatterChartProps extends BaseChartProps, ScatterChartEventProps, HighchartsBasedChartEventProps {
455
618
  /**
456
619
  * Configurations for how to interpret and present the data passed to the chart
457
620
  *
@@ -469,7 +632,7 @@ export interface ScatterChartProps extends BaseChartProps, ScatterChartEventProp
469
632
  * Props for the {@link DashboardWidget} component
470
633
  *
471
634
  */
472
- export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource' | 'dataOptions' | 'chartType' | 'styleOptions'>, BaseChartEventProps {
635
+ export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource' | 'dataOptions' | 'chartType' | 'styleOptions'> {
473
636
  /**
474
637
  * Identifier of the widget
475
638
  *
@@ -543,7 +706,7 @@ export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource
543
706
  * Props for the {@link ChartWidget} component
544
707
  *
545
708
  */
546
- export interface ChartWidgetProps extends BaseChartEventProps {
709
+ export interface ChartWidgetProps extends ChartEventProps {
547
710
  /**
548
711
  * Data source the query is run against - e.g. `Sample ECommerce`
549
712
  *
@@ -557,13 +720,7 @@ export interface ChartWidgetProps extends BaseChartEventProps {
557
720
  *
558
721
  * @category Data
559
722
  */
560
- filters?: Filter[];
561
- /**
562
- * Specifies the logical relationship between multiple filters (AND, OR)
563
- *
564
- * @category Data
565
- */
566
- filterRelations?: FilterRelation;
723
+ filters?: Filter[] | FilterRelations;
567
724
  /**
568
725
  * Highlight filters that will highlight results that pass filter criteria
569
726
  *
@@ -664,7 +821,7 @@ export interface TableWidgetProps {
664
821
  *
665
822
  * @category Data
666
823
  */
667
- filters?: Filter[] | FilterRelation;
824
+ filters?: Filter[] | FilterRelations;
668
825
  /**
669
826
  * Configurations for how to interpret and present the data passed to the table
670
827
  *
@@ -758,7 +915,7 @@ export interface ExecuteQueryByWidgetIdProps {
758
915
  /**
759
916
  * Props of the {@link TreemapChart} component.
760
917
  */
761
- export interface TreemapChartProps extends BaseChartProps, ChartEventProps {
918
+ export interface TreemapChartProps extends BaseChartProps, HighchartsBasedChartEventProps, RegularChartEventProps {
762
919
  /**
763
920
  * Configurations for how to interpret and present the data passed to the chart
764
921
  *
@@ -775,7 +932,7 @@ export interface TreemapChartProps extends BaseChartProps, ChartEventProps {
775
932
  /**
776
933
  * Props of the {@link SunburstChart} component.
777
934
  */
778
- export interface SunburstChartProps extends BaseChartProps, ChartEventProps {
935
+ export interface SunburstChartProps extends BaseChartProps, RegularChartEventProps, HighchartsBasedChartEventProps {
779
936
  /**
780
937
  * Configurations for how to interpret and present the data passed to the chart
781
938
  *
@@ -792,7 +949,7 @@ export interface SunburstChartProps extends BaseChartProps, ChartEventProps {
792
949
  /**
793
950
  * Props of the {@link BoxplotChart} component.
794
951
  */
795
- export interface BoxplotChartProps extends BaseChartProps, ChartEventProps {
952
+ export interface BoxplotChartProps extends BaseChartProps, BoxplotChartEventProps, HighchartsBasedChartEventProps {
796
953
  /**
797
954
  * Configurations for how to interpret and present the data passed to the chart
798
955
  *
@@ -809,7 +966,7 @@ export interface BoxplotChartProps extends BaseChartProps, ChartEventProps {
809
966
  /**
810
967
  * Props of the {@link ScattermapChart} component.
811
968
  */
812
- export interface ScattermapChartProps extends BaseChartProps, ChartEventProps {
969
+ export interface ScattermapChartProps extends BaseChartProps, ScattermapChartEventProps {
813
970
  /**
814
971
  * Configurations for how to interpret and present the data passed to the chart
815
972
  *
@@ -826,7 +983,7 @@ export interface ScattermapChartProps extends BaseChartProps, ChartEventProps {
826
983
  /**
827
984
  * Props of the {@link AreamapChart} component.
828
985
  */
829
- export interface AreamapChartProps extends BaseChartProps, ChartEventProps {
986
+ export interface AreamapChartProps extends BaseChartProps, AreamapChartEventProps {
830
987
  /**
831
988
  * Configurations for how to interpret and present the data passed to the chart
832
989
  *
@@ -1,2 +1,3 @@
1
1
  import { QueryAction, QueryState } from './types';
2
+ /** @internal */
2
3
  export declare function queryStateReducer(state: QueryState, action: QueryAction): QueryState;
@@ -1,4 +1,4 @@
1
- import { Attribute, DataSource, Filter, FilterRelation, Measure, PivotAttribute, PivotGrandTotals, PivotMeasure, PivotQueryResultData, QueryResultData } from '@sisense/sdk-data';
1
+ import { Attribute, DataSource, Filter, FilterRelations, Measure, PivotAttribute, PivotGrandTotals, PivotMeasure, PivotQueryResultData, QueryResultData } from '@sisense/sdk-data';
2
2
  import { DataLoadAction } from '../common/hooks/data-load-state-reducer';
3
3
  import { FiltersMergeStrategy } from '../dashboard-widget/types';
4
4
  /**
@@ -161,7 +161,7 @@ export interface ExecuteQueryParams {
161
161
  /** Measures of the query */
162
162
  measures?: Measure[];
163
163
  /** Filters that will slice query results */
164
- filters?: Filter[] | FilterRelation;
164
+ filters?: Filter[] | FilterRelations;
165
165
  /** Highlight filters that will highlight results that pass filter criteria */
166
166
  highlights?: Filter[];
167
167
  /** {@inheritDoc ExecuteQueryProps.count} */
@@ -287,7 +287,7 @@ export interface ExecutePivotQueryParams {
287
287
  *
288
288
  * @category Filtering
289
289
  */
290
- filters?: Filter[] | FilterRelation;
290
+ filters?: Filter[] | FilterRelations;
291
291
  /**
292
292
  * Highlight filters that will highlight results that pass filter criteria
293
293
  *
@@ -1,7 +1,6 @@
1
- import { ExecuteQueryParams } from './';
1
+ import { QueryDescription } from '../query/execute-query';
2
2
  import { ClientApplication } from '../app/client-application';
3
3
  import { ExecuteQueryByWidgetIdParams, QueryByWidgetIdState } from './types';
4
- import { Filter } from '@sisense/sdk-data';
5
4
  /**
6
5
  * React hook that executes a data query extracted from an existing widget in the Sisense instance.
7
6
  *
@@ -49,7 +48,5 @@ export declare function executeQueryByWidgetId({ widgetOid, dashboardOid, filter
49
48
  app: ClientApplication;
50
49
  }): Promise<{
51
50
  data: import("@sisense/sdk-data").QueryResultData;
52
- query: Omit<ExecuteQueryParams, "filters"> & {
53
- filters?: Filter[] | undefined;
54
- };
51
+ query: QueryDescription;
55
52
  }>;
@@ -0,0 +1,2 @@
1
+ export * from './sisense-chart';
2
+ export * from './types';