@sisense/sdk-ui 1.2.0 → 1.3.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.js +2 -2
- package/dist/api/types/dashboard-dto.d.ts +4 -1
- package/dist/app/client-application.d.ts +6 -1
- package/dist/chart-data/types.d.ts +4 -4
- package/dist/chart-options-processor/apply-event-handlers.d.ts +5 -28
- package/dist/chart-options-processor/translations/design-options.d.ts +2 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/indicator-legacy-chart-options.d.ts +3 -0
- package/dist/charts/indicator/types.d.ts +2 -0
- package/dist/charts/map-charts/areamap/areamap-map.d.ts +2 -1
- package/dist/charts/map-charts/areamap/areamap.d.ts +4 -2
- package/dist/charts/map-charts/areamap/use-geo-json.d.ts +1 -1
- package/dist/charts/map-charts/scattermap/scattermap.d.ts +2 -2
- package/dist/charts/map-charts/scattermap/utils/markers.d.ts +4 -14
- package/dist/common/components/loading-overlay.d.ts +14 -0
- package/dist/dashboard-widget/translate-widget-filters.d.ts +1 -1
- package/dist/dashboard-widget/types.d.ts +1 -0
- package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +3 -0
- package/dist/dashboard-widget/utils.d.ts +26 -1
- package/dist/filters/components/common/checkbox.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3488 -3508
- package/dist/models/widget/widget-model.d.ts +2 -2
- package/dist/props.d.ts +150 -51
- package/dist/query-execution/query-state-reducer.d.ts +1 -0
- package/dist/query-execution/types.d.ts +3 -3
- package/dist/query-execution/use-execute-query-by-widget-id.d.ts +2 -5
- package/dist/sisense-chart/index.d.ts +2 -0
- package/dist/sisense-chart/sisense-chart.d.ts +23 -0
- package/dist/sisense-chart/types.d.ts +5 -0
- package/dist/table/hooks/use-table-data.d.ts +2 -2
- package/dist/{table-widget-65f3e04e.js → table-widget-b467cc86.js} +13857 -13750
- package/dist/translation/resources/en.d.ts +1 -0
- package/dist/translation/resources/index.d.ts +2 -0
- package/dist/types.d.ts +52 -5
- package/dist/utils/filters-comparator.d.ts +2 -2
- package/dist/widgets/common/custom-drilldown.d.ts +1 -1
- package/dist/widgets/common/drilldown.d.ts +3 -1
- package/package.json +7 -7
- package/dist/dashboard-widget/translate-widget.d.ts +0 -12
- package/dist/query-execution/utils.d.ts +0 -9
- package/dist/sisense-chart.d.ts +0 -23
|
@@ -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
|
*
|
package/dist/props.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { Attribute, Filter, Measure, DataSource, Data, QueryResultData,
|
|
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 } 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 } from './chart-data-options/types';
|
|
6
|
-
import { DataPointEventHandler, DataPointsEventHandler, ScatterDataPointEventHandler, ScatterDataPointsEventHandler } from './chart-options-processor/apply-event-handlers';
|
|
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 {
|
|
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[] |
|
|
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,148 @@ export type ThemeProviderProps = PropsWithChildren<{
|
|
|
151
159
|
export type BeforeRenderHandler = (
|
|
152
160
|
/** Highcharts options */
|
|
153
161
|
highchartsOptions: HighchartsOptions) => HighchartsOptions;
|
|
154
|
-
|
|
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 Boxplot is clicked.
|
|
204
|
+
*/
|
|
205
|
+
export type BoxplotDataPointEventHandler = (
|
|
206
|
+
/** Data point that was clicked */
|
|
207
|
+
point: BoxplotDataPoint,
|
|
208
|
+
/** Native PointerEvent */
|
|
209
|
+
nativeEvent: PointerEvent) => void;
|
|
210
|
+
interface HighchartsBasedChartEventProps {
|
|
155
211
|
/**
|
|
156
|
-
*
|
|
212
|
+
* Before render handler callback that allows adjusting
|
|
213
|
+
* detail chart options prior to render
|
|
214
|
+
*
|
|
215
|
+
* This callback is not supported for Indicator Chart, Areamap Chart, and Scattermap Chart.
|
|
157
216
|
*
|
|
158
217
|
* @category Callbacks
|
|
159
218
|
*/
|
|
160
|
-
|
|
219
|
+
onBeforeRender?: BeforeRenderHandler;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Event props for regular (non-specific) charts which uses DataPoint type
|
|
223
|
+
* to describe data points for events.
|
|
224
|
+
*/
|
|
225
|
+
interface RegularChartEventProps extends HighchartsBasedChartEventProps {
|
|
161
226
|
/**
|
|
162
|
-
*
|
|
227
|
+
* Click handler callback for a data point
|
|
163
228
|
*
|
|
164
229
|
* @category Callbacks
|
|
165
230
|
*/
|
|
166
|
-
|
|
231
|
+
onDataPointClick?: DataPointEventHandler;
|
|
167
232
|
/**
|
|
168
|
-
*
|
|
233
|
+
* Context menu handler callback for a data point
|
|
169
234
|
*
|
|
170
235
|
* @category Callbacks
|
|
171
236
|
*/
|
|
172
|
-
|
|
237
|
+
onDataPointContextMenu?: DataPointEventHandler;
|
|
173
238
|
/**
|
|
174
|
-
*
|
|
175
|
-
* detail chart options prior to render
|
|
176
|
-
*
|
|
177
|
-
* This callback is not yet supported for Indicator Chart
|
|
239
|
+
* Handler callback for selection of multiple data points
|
|
178
240
|
*
|
|
179
241
|
* @category Callbacks
|
|
180
242
|
*/
|
|
181
|
-
|
|
243
|
+
onDataPointsSelected?: DataPointsEventHandler;
|
|
182
244
|
}
|
|
183
|
-
|
|
245
|
+
/**
|
|
246
|
+
* Event props for Scatter chart which uses ScatterDataPoint type
|
|
247
|
+
* to describe data points for events.
|
|
248
|
+
*/
|
|
249
|
+
interface ScatterChartEventProps extends HighchartsBasedChartEventProps {
|
|
184
250
|
/**
|
|
185
251
|
* Click handler callback for a data point
|
|
186
252
|
*
|
|
187
253
|
* @category Callbacks
|
|
188
254
|
*/
|
|
189
|
-
onDataPointClick?:
|
|
255
|
+
onDataPointClick?: ScatterDataPointEventHandler;
|
|
190
256
|
/**
|
|
191
257
|
* Context menu handler callback for a data point
|
|
192
258
|
*
|
|
193
259
|
* @category Callbacks
|
|
194
260
|
*/
|
|
195
|
-
onDataPointContextMenu?:
|
|
261
|
+
onDataPointContextMenu?: ScatterDataPointEventHandler;
|
|
196
262
|
/**
|
|
197
263
|
* Handler callback for selection of multiple data points
|
|
198
264
|
*
|
|
199
265
|
* @category Callbacks
|
|
200
266
|
*/
|
|
201
|
-
onDataPointsSelected?:
|
|
267
|
+
onDataPointsSelected?: ScatterDataPointsEventHandler;
|
|
202
268
|
}
|
|
203
|
-
|
|
269
|
+
/**
|
|
270
|
+
* Event props for Areamap chart which uses AreamapDataPoint type
|
|
271
|
+
* to describe data points for events.
|
|
272
|
+
*/
|
|
273
|
+
interface AreamapChartEventProps {
|
|
204
274
|
/**
|
|
205
275
|
* Click handler callback for a data point
|
|
206
276
|
*
|
|
207
277
|
* @category Callbacks
|
|
208
278
|
*/
|
|
209
|
-
onDataPointClick?:
|
|
279
|
+
onDataPointClick?: AreamapDataPointEventHandler;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Event props for Boxplot chart which uses BoxplotDataPoint type
|
|
283
|
+
* to describe data points for events.
|
|
284
|
+
*/
|
|
285
|
+
interface BoxplotChartEventProps extends HighchartsBasedChartEventProps {
|
|
286
|
+
/**
|
|
287
|
+
* Click handler callback for a data point
|
|
288
|
+
*
|
|
289
|
+
* @category Callbacks
|
|
290
|
+
*/
|
|
291
|
+
onDataPointClick?: BoxplotDataPointEventHandler;
|
|
210
292
|
/**
|
|
211
293
|
* Context menu handler callback for a data point
|
|
212
294
|
*
|
|
213
295
|
* @category Callbacks
|
|
214
296
|
*/
|
|
215
|
-
onDataPointContextMenu?:
|
|
297
|
+
onDataPointContextMenu?: BoxplotDataPointEventHandler;
|
|
216
298
|
/**
|
|
217
299
|
* Handler callback for selection of multiple data points
|
|
218
300
|
*
|
|
219
301
|
* @category Callbacks
|
|
220
302
|
*/
|
|
221
|
-
onDataPointsSelected?:
|
|
303
|
+
onDataPointsSelected?: DataPointsEventHandler;
|
|
222
304
|
}
|
|
223
305
|
/**
|
|
224
306
|
* Base Chart Props to be extended by {@link ChartProps}
|
|
@@ -253,7 +335,7 @@ export interface BaseChartProps {
|
|
|
253
335
|
*
|
|
254
336
|
* @category Data
|
|
255
337
|
*/
|
|
256
|
-
filters?: Filter[] |
|
|
338
|
+
filters?: Filter[] | FilterRelations;
|
|
257
339
|
/**
|
|
258
340
|
* Highlight filters that will highlight results that pass filter criteria
|
|
259
341
|
*
|
|
@@ -261,10 +343,33 @@ export interface BaseChartProps {
|
|
|
261
343
|
*/
|
|
262
344
|
highlights?: Filter[];
|
|
263
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* Chart props to be able to react on chart events.
|
|
348
|
+
*/
|
|
349
|
+
interface ChartEventProps extends HighchartsBasedChartEventProps {
|
|
350
|
+
/**
|
|
351
|
+
* Click handler callback for a data point
|
|
352
|
+
*
|
|
353
|
+
* @category Callbacks
|
|
354
|
+
*/
|
|
355
|
+
onDataPointClick?: DataPointEventHandler | ScatterDataPointEventHandler | AreamapDataPointEventHandler | BoxplotDataPointEventHandler;
|
|
356
|
+
/**
|
|
357
|
+
* Context menu handler callback for a data point
|
|
358
|
+
*
|
|
359
|
+
* @category Callbacks
|
|
360
|
+
*/
|
|
361
|
+
onDataPointContextMenu?: DataPointEventHandler | ScatterDataPointEventHandler | BoxplotDataPointEventHandler;
|
|
362
|
+
/**
|
|
363
|
+
* Handler callback for selection of multiple data points
|
|
364
|
+
*
|
|
365
|
+
* @category Callbacks
|
|
366
|
+
*/
|
|
367
|
+
onDataPointsSelected?: DataPointsEventHandler | ScatterDataPointsEventHandler;
|
|
368
|
+
}
|
|
264
369
|
/**
|
|
265
370
|
* Props shared across {@link Chart} components.
|
|
266
371
|
*/
|
|
267
|
-
export interface ChartProps extends BaseChartProps,
|
|
372
|
+
export interface ChartProps extends BaseChartProps, ChartEventProps {
|
|
268
373
|
/**
|
|
269
374
|
* Default chart type of each series.
|
|
270
375
|
*
|
|
@@ -294,7 +399,7 @@ export interface ChartProps extends BaseChartProps, BaseChartEventProps {
|
|
|
294
399
|
/**
|
|
295
400
|
* Props of the {@link AreaChart} component.
|
|
296
401
|
*/
|
|
297
|
-
export interface AreaChartProps extends BaseChartProps,
|
|
402
|
+
export interface AreaChartProps extends BaseChartProps, RegularChartEventProps, HighchartsBasedChartEventProps {
|
|
298
403
|
/**
|
|
299
404
|
* Configurations for how to interpret and present data passed to the chart.
|
|
300
405
|
*
|
|
@@ -311,7 +416,7 @@ export interface AreaChartProps extends BaseChartProps, ChartEventProps {
|
|
|
311
416
|
/**
|
|
312
417
|
* Props of the {@link BarChart} component.
|
|
313
418
|
*/
|
|
314
|
-
export interface BarChartProps extends BaseChartProps,
|
|
419
|
+
export interface BarChartProps extends BaseChartProps, RegularChartEventProps, HighchartsBasedChartEventProps {
|
|
315
420
|
/**
|
|
316
421
|
* Configurations for how to interpret and present the data passed to the chart
|
|
317
422
|
*
|
|
@@ -328,7 +433,7 @@ export interface BarChartProps extends BaseChartProps, ChartEventProps {
|
|
|
328
433
|
/**
|
|
329
434
|
* Props of the {@link ColumnChart} component.
|
|
330
435
|
*/
|
|
331
|
-
export interface ColumnChartProps extends BaseChartProps,
|
|
436
|
+
export interface ColumnChartProps extends BaseChartProps, HighchartsBasedChartEventProps, RegularChartEventProps {
|
|
332
437
|
/**
|
|
333
438
|
* Configurations for how to interpret and present the data passed to the chart
|
|
334
439
|
*
|
|
@@ -345,7 +450,7 @@ export interface ColumnChartProps extends BaseChartProps, ChartEventProps {
|
|
|
345
450
|
/**
|
|
346
451
|
* Props of the {@link FunnelChart} component.
|
|
347
452
|
*/
|
|
348
|
-
export interface FunnelChartProps extends BaseChartProps,
|
|
453
|
+
export interface FunnelChartProps extends BaseChartProps, HighchartsBasedChartEventProps, RegularChartEventProps {
|
|
349
454
|
/**
|
|
350
455
|
* Configurations for how to interpret and present the data passed to the chart
|
|
351
456
|
*
|
|
@@ -362,7 +467,7 @@ export interface FunnelChartProps extends BaseChartProps, ChartEventProps {
|
|
|
362
467
|
/**
|
|
363
468
|
* Props of the {@link LineChart} component.
|
|
364
469
|
*/
|
|
365
|
-
export interface LineChartProps extends BaseChartProps,
|
|
470
|
+
export interface LineChartProps extends BaseChartProps, HighchartsBasedChartEventProps, RegularChartEventProps {
|
|
366
471
|
/**
|
|
367
472
|
* Configurations for how to interpret and present data passed to the chart.
|
|
368
473
|
*
|
|
@@ -379,7 +484,7 @@ export interface LineChartProps extends BaseChartProps, ChartEventProps {
|
|
|
379
484
|
/**
|
|
380
485
|
* Props of the {@link PieChart} component.
|
|
381
486
|
*/
|
|
382
|
-
export interface PieChartProps extends BaseChartProps,
|
|
487
|
+
export interface PieChartProps extends BaseChartProps, HighchartsBasedChartEventProps, RegularChartEventProps {
|
|
383
488
|
/**
|
|
384
489
|
* Configurations for how to interpret and present the data passed to the chart
|
|
385
490
|
*
|
|
@@ -396,7 +501,7 @@ export interface PieChartProps extends BaseChartProps, ChartEventProps {
|
|
|
396
501
|
/**
|
|
397
502
|
* Props of the {@link PolarChart} component.
|
|
398
503
|
*/
|
|
399
|
-
export interface PolarChartProps extends BaseChartProps,
|
|
504
|
+
export interface PolarChartProps extends BaseChartProps, HighchartsBasedChartEventProps, RegularChartEventProps {
|
|
400
505
|
/** Configurations for how to interpret and present the data passed to the chart */
|
|
401
506
|
dataOptions: CartesianChartDataOptions;
|
|
402
507
|
/** Configuration that defines functional style of the various chart elements */
|
|
@@ -433,7 +538,7 @@ export interface TableProps {
|
|
|
433
538
|
*
|
|
434
539
|
* @category Data
|
|
435
540
|
*/
|
|
436
|
-
filters?: Filter[] |
|
|
541
|
+
filters?: Filter[] | FilterRelations;
|
|
437
542
|
/**
|
|
438
543
|
* Configurations that define functional style of the various table elements
|
|
439
544
|
*
|
|
@@ -451,7 +556,7 @@ export interface TableProps {
|
|
|
451
556
|
/**
|
|
452
557
|
* Props of the {@link ScatterChart} component.
|
|
453
558
|
*/
|
|
454
|
-
export interface ScatterChartProps extends BaseChartProps, ScatterChartEventProps {
|
|
559
|
+
export interface ScatterChartProps extends BaseChartProps, ScatterChartEventProps, HighchartsBasedChartEventProps {
|
|
455
560
|
/**
|
|
456
561
|
* Configurations for how to interpret and present the data passed to the chart
|
|
457
562
|
*
|
|
@@ -469,7 +574,7 @@ export interface ScatterChartProps extends BaseChartProps, ScatterChartEventProp
|
|
|
469
574
|
* Props for the {@link DashboardWidget} component
|
|
470
575
|
*
|
|
471
576
|
*/
|
|
472
|
-
export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource' | 'dataOptions' | 'chartType' | 'styleOptions'
|
|
577
|
+
export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource' | 'dataOptions' | 'chartType' | 'styleOptions'> {
|
|
473
578
|
/**
|
|
474
579
|
* Identifier of the widget
|
|
475
580
|
*
|
|
@@ -543,7 +648,7 @@ export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource
|
|
|
543
648
|
* Props for the {@link ChartWidget} component
|
|
544
649
|
*
|
|
545
650
|
*/
|
|
546
|
-
export interface ChartWidgetProps extends
|
|
651
|
+
export interface ChartWidgetProps extends ChartEventProps {
|
|
547
652
|
/**
|
|
548
653
|
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
549
654
|
*
|
|
@@ -557,13 +662,7 @@ export interface ChartWidgetProps extends BaseChartEventProps {
|
|
|
557
662
|
*
|
|
558
663
|
* @category Data
|
|
559
664
|
*/
|
|
560
|
-
filters?: Filter[];
|
|
561
|
-
/**
|
|
562
|
-
* Specifies the logical relationship between multiple filters (AND, OR)
|
|
563
|
-
*
|
|
564
|
-
* @category Data
|
|
565
|
-
*/
|
|
566
|
-
filterRelations?: FilterRelation;
|
|
665
|
+
filters?: Filter[] | FilterRelations;
|
|
567
666
|
/**
|
|
568
667
|
* Highlight filters that will highlight results that pass filter criteria
|
|
569
668
|
*
|
|
@@ -664,7 +763,7 @@ export interface TableWidgetProps {
|
|
|
664
763
|
*
|
|
665
764
|
* @category Data
|
|
666
765
|
*/
|
|
667
|
-
filters?: Filter[] |
|
|
766
|
+
filters?: Filter[] | FilterRelations;
|
|
668
767
|
/**
|
|
669
768
|
* Configurations for how to interpret and present the data passed to the table
|
|
670
769
|
*
|
|
@@ -758,7 +857,7 @@ export interface ExecuteQueryByWidgetIdProps {
|
|
|
758
857
|
/**
|
|
759
858
|
* Props of the {@link TreemapChart} component.
|
|
760
859
|
*/
|
|
761
|
-
export interface TreemapChartProps extends BaseChartProps,
|
|
860
|
+
export interface TreemapChartProps extends BaseChartProps, HighchartsBasedChartEventProps, RegularChartEventProps {
|
|
762
861
|
/**
|
|
763
862
|
* Configurations for how to interpret and present the data passed to the chart
|
|
764
863
|
*
|
|
@@ -775,7 +874,7 @@ export interface TreemapChartProps extends BaseChartProps, ChartEventProps {
|
|
|
775
874
|
/**
|
|
776
875
|
* Props of the {@link SunburstChart} component.
|
|
777
876
|
*/
|
|
778
|
-
export interface SunburstChartProps extends BaseChartProps,
|
|
877
|
+
export interface SunburstChartProps extends BaseChartProps, RegularChartEventProps, HighchartsBasedChartEventProps {
|
|
779
878
|
/**
|
|
780
879
|
* Configurations for how to interpret and present the data passed to the chart
|
|
781
880
|
*
|
|
@@ -792,7 +891,7 @@ export interface SunburstChartProps extends BaseChartProps, ChartEventProps {
|
|
|
792
891
|
/**
|
|
793
892
|
* Props of the {@link BoxplotChart} component.
|
|
794
893
|
*/
|
|
795
|
-
export interface BoxplotChartProps extends BaseChartProps,
|
|
894
|
+
export interface BoxplotChartProps extends BaseChartProps, BoxplotChartEventProps, HighchartsBasedChartEventProps {
|
|
796
895
|
/**
|
|
797
896
|
* Configurations for how to interpret and present the data passed to the chart
|
|
798
897
|
*
|
|
@@ -809,7 +908,7 @@ export interface BoxplotChartProps extends BaseChartProps, ChartEventProps {
|
|
|
809
908
|
/**
|
|
810
909
|
* Props of the {@link ScattermapChart} component.
|
|
811
910
|
*/
|
|
812
|
-
export interface ScattermapChartProps extends BaseChartProps
|
|
911
|
+
export interface ScattermapChartProps extends BaseChartProps {
|
|
813
912
|
/**
|
|
814
913
|
* Configurations for how to interpret and present the data passed to the chart
|
|
815
914
|
*
|
|
@@ -826,7 +925,7 @@ export interface ScattermapChartProps extends BaseChartProps, ChartEventProps {
|
|
|
826
925
|
/**
|
|
827
926
|
* Props of the {@link AreamapChart} component.
|
|
828
927
|
*/
|
|
829
|
-
export interface AreamapChartProps extends BaseChartProps,
|
|
928
|
+
export interface AreamapChartProps extends BaseChartProps, AreamapChartEventProps {
|
|
830
929
|
/**
|
|
831
930
|
* Configurations for how to interpret and present the data passed to the chart
|
|
832
931
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Attribute, DataSource, Filter,
|
|
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[] |
|
|
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[] |
|
|
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 {
|
|
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:
|
|
53
|
-
filters?: Filter[] | undefined;
|
|
54
|
-
};
|
|
51
|
+
query: QueryDescription;
|
|
55
52
|
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChartDataOptionsInternal } from '../chart-data-options/types';
|
|
3
|
+
import { ChartData } from '../chart-data/types';
|
|
4
|
+
import { BeforeRenderHandler } from '../props';
|
|
5
|
+
import { ChartDesignOptions } from '../chart-options-processor/translations/types';
|
|
6
|
+
import { ChartType, CompleteThemeSettings } from '../types';
|
|
7
|
+
import { SisenseChartDataPointEventHandler, SisenseChartDataPointsEventHandler } from './types';
|
|
8
|
+
interface Props {
|
|
9
|
+
chartType: ChartType;
|
|
10
|
+
chartData: ChartData;
|
|
11
|
+
chartDataOptions: ChartDataOptionsInternal;
|
|
12
|
+
designOptions: ChartDesignOptions;
|
|
13
|
+
themeSettings?: CompleteThemeSettings;
|
|
14
|
+
onDataPointClick?: SisenseChartDataPointEventHandler;
|
|
15
|
+
onDataPointContextMenu?: SisenseChartDataPointEventHandler;
|
|
16
|
+
onDataPointsSelected?: SisenseChartDataPointsEventHandler;
|
|
17
|
+
onBeforeRender?: BeforeRenderHandler;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare const SisenseChart: ({ chartType, chartData, chartDataOptions, designOptions, themeSettings, onDataPointClick, onDataPointContextMenu, onDataPointsSelected, onBeforeRender, }: Props) => JSX.Element | null;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DataPointsEventHandler, ScatterDataPointsEventHandler } from '../props.js';
|
|
2
|
+
import { BoxplotDataPoint, DataPoint, ScatterDataPoint } from '../types.js';
|
|
3
|
+
export type SisenseChartDataPointsEventHandler = DataPointsEventHandler | ScatterDataPointsEventHandler;
|
|
4
|
+
export type SisenseChartDataPoint = DataPoint | ScatterDataPoint | BoxplotDataPoint;
|
|
5
|
+
export type SisenseChartDataPointEventHandler = (point: SisenseChartDataPoint, nativeEvent: PointerEvent) => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Attribute, Data, DataSource, Filter,
|
|
1
|
+
import { Attribute, Data, DataSource, Filter, FilterRelationsJaql, Measure } from '@sisense/sdk-data';
|
|
2
2
|
import { TableDataOptionsInternal } from '../../chart-data-options/types';
|
|
3
3
|
type UseDataProps = {
|
|
4
4
|
dataSet: Data | DataSource | undefined;
|
|
5
5
|
dataOptions: TableDataOptionsInternal | null;
|
|
6
6
|
filters: Filter[] | undefined;
|
|
7
|
-
filterRelations:
|
|
7
|
+
filterRelations: FilterRelationsJaql | undefined;
|
|
8
8
|
count: number;
|
|
9
9
|
offset: number;
|
|
10
10
|
};
|