@sisense/sdk-ui 0.16.0 → 1.1.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 (136) hide show
  1. package/dist/ai/messages/get-widget-options.d.ts +3 -3
  2. package/dist/ai.js +334 -308
  3. package/dist/api/rest-api.d.ts +9 -0
  4. package/dist/app/settings/settings.d.ts +1 -0
  5. package/dist/area-chart.d.ts +2 -2
  6. package/dist/areamap-chart.d.ts +28 -0
  7. package/dist/bar-chart.d.ts +2 -2
  8. package/dist/boxplot-chart.d.ts +38 -0
  9. package/dist/boxplot-utils.d.ts +30 -0
  10. package/dist/chart-data/areamap-data.d.ts +4 -0
  11. package/dist/chart-data/boxplot-data.d.ts +11 -0
  12. package/dist/chart-data/cartesian-data.d.ts +6 -3
  13. package/dist/chart-data/data-coloring/create-data-coloring-function.d.ts +7 -0
  14. package/dist/chart-data/data-coloring/geo-data-coloring-function.d.ts +2 -0
  15. package/dist/chart-data/data-coloring/index.d.ts +3 -0
  16. package/dist/chart-data/{series-data-color-service → data-coloring}/legend-color.d.ts +1 -1
  17. package/dist/chart-data/data-coloring/series-data-coloring-function.d.ts +11 -0
  18. package/dist/chart-data/indicator-data.d.ts +2 -2
  19. package/dist/chart-data/scatter-data.d.ts +2 -2
  20. package/dist/chart-data/scattermap-data.d.ts +4 -0
  21. package/dist/chart-data/types.d.ts +74 -3
  22. package/dist/chart-data-options/translate-boxplot-data-options.d.ts +7 -0
  23. package/dist/chart-data-options/translate-scattermap-data-options.d.ts +3 -0
  24. package/dist/chart-data-options/types.d.ts +140 -10
  25. package/dist/chart-data-options/utils.d.ts +6 -1
  26. package/dist/chart-options-processor/boxplot-chart-options.d.ts +11 -0
  27. package/dist/chart-options-processor/chart-options-service.d.ts +24 -6
  28. package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +2 -2
  29. package/dist/chart-options-processor/style-to-design-options-translator/translate-to-areamap-options.d.ts +3 -0
  30. package/dist/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +4 -2
  31. package/dist/chart-options-processor/subtype-to-design-options.d.ts +8 -2
  32. package/dist/chart-options-processor/theme-option-service.d.ts +0 -1
  33. package/dist/chart-options-processor/translations/axis-section.d.ts +1 -2
  34. package/dist/chart-options-processor/translations/boxplot/boxplot-axis.d.ts +10 -0
  35. package/dist/chart-options-processor/translations/boxplot/boxplot-plot-options.d.ts +3 -0
  36. package/dist/chart-options-processor/translations/boxplot/boxplot-series.d.ts +5 -0
  37. package/dist/chart-options-processor/translations/boxplot/boxplot-tooltip.d.ts +4 -0
  38. package/dist/chart-options-processor/translations/design-options.d.ts +15 -2
  39. package/dist/chart-options-processor/translations/legend-section.d.ts +4 -3
  40. package/dist/chart-options-processor/translations/tooltip-utils.d.ts +5 -0
  41. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +5 -1
  42. package/dist/chart-options-processor/translations/types.d.ts +15 -3
  43. package/dist/chart-options-processor/translations/value-label-section.d.ts +2 -1
  44. package/dist/chart.d.ts +2 -2
  45. package/dist/charts/indicator/indicator-legacy-chart-data-options.d.ts +2 -2
  46. package/dist/charts/indicator/indicator-legacy-chart-options/indicator-legacy-chart-options.d.ts +2 -2
  47. package/dist/charts/indicator/indicator-legacy-chart-options/override-with-value-color.d.ts +2 -2
  48. package/dist/charts/map-charts/areamap/alternative-country-names-dictionary.d.ts +9 -0
  49. package/dist/charts/map-charts/areamap/areamap-map.d.ts +16 -0
  50. package/dist/charts/map-charts/areamap/areamap.d.ts +16 -0
  51. package/dist/charts/map-charts/areamap/feature-styles-dictionary.d.ts +16 -0
  52. package/dist/charts/map-charts/areamap/use-geo-json.d.ts +9 -0
  53. package/dist/charts/map-charts/scattermap/hooks/use-locations.d.ts +3 -0
  54. package/dist/charts/map-charts/scattermap/hooks/use-settings.d.ts +5 -0
  55. package/dist/charts/map-charts/scattermap/hooks/use-tooltip-handler.d.ts +14 -0
  56. package/dist/charts/map-charts/scattermap/scattermap.d.ts +13 -0
  57. package/dist/charts/map-charts/scattermap/types.d.ts +16 -0
  58. package/dist/charts/map-charts/scattermap/utils/color.d.ts +3 -0
  59. package/dist/charts/map-charts/scattermap/utils/copyright.d.ts +2 -0
  60. package/dist/charts/map-charts/scattermap/utils/location.d.ts +5 -0
  61. package/dist/charts/map-charts/scattermap/utils/map.d.ts +2 -0
  62. package/dist/charts/map-charts/scattermap/utils/markers.d.ts +28 -0
  63. package/dist/charts/map-charts/scattermap/utils/size.d.ts +2 -0
  64. package/dist/charts/map-charts/scattermap/utils/tooltip.d.ts +8 -0
  65. package/dist/charts/map-charts/scattermap/utils/values.d.ts +4 -0
  66. package/dist/charts/table/types.d.ts +1 -1
  67. package/dist/column-chart.d.ts +2 -2
  68. package/dist/common/components/loading-dots.d.ts +4 -0
  69. package/dist/dashboard-widget/translate-dashboard-filters.d.ts +1 -1
  70. package/dist/dashboard-widget/translate-panel-color-format.d.ts +1 -1
  71. package/dist/dashboard-widget/translate-widget-data-options.d.ts +4 -3
  72. package/dist/dashboard-widget/translate-widget-style-options.d.ts +2 -2
  73. package/dist/dashboard-widget/types.d.ts +28 -3
  74. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +2 -4
  75. package/dist/decorators/component-decorators/as-sisense-component.d.ts +1 -0
  76. package/dist/filters/components/common/basic-input.d.ts +1 -1
  77. package/dist/filters/components/common/date-range-field-button.d.ts +3 -2
  78. package/dist/filters/components/common/dropdown.d.ts +1 -0
  79. package/dist/filters/components/common/filter-utils.d.ts +13 -0
  80. package/dist/filters/components/common/index.d.ts +1 -0
  81. package/dist/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +2 -1
  82. package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +0 -9
  83. package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +2 -2
  84. package/dist/filters/components/criteria-filter-tile/index.d.ts +0 -1
  85. package/dist/filters/components/date-filter/date-filter/calendar-date-selector.d.ts +10 -8
  86. package/dist/filters/components/date-filter/date-filter/quick-date-selection-buttons.d.ts +4 -4
  87. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +1 -1
  88. package/dist/filters/components/date-filter/index.d.ts +1 -0
  89. package/dist/filters/components/date-filter/relative-date-filter-tile/index.d.ts +1 -0
  90. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-display.d.ts +14 -0
  91. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +36 -0
  92. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +26 -0
  93. package/dist/filters/components/filter-tile.d.ts +1 -1
  94. package/dist/filters/index.d.ts +1 -0
  95. package/dist/index.d.ts +4 -1
  96. package/dist/index.js +4712 -4876
  97. package/dist/indicator-canvas.d.ts +3 -3
  98. package/dist/indicator-chart.d.ts +4 -4
  99. package/dist/line-chart.d.ts +2 -2
  100. package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -0
  101. package/dist/models/dashboard/use-get-dashboard-models.d.ts +2 -1
  102. package/dist/models/widget/use-get-widget-model.d.ts +1 -0
  103. package/dist/models/widget/widget-model.d.ts +5 -4
  104. package/dist/pie-chart.d.ts +2 -2
  105. package/dist/polar-chart.d.ts +2 -2
  106. package/dist/props.d.ts +84 -62
  107. package/dist/query/execute-query.d.ts +1 -1
  108. package/dist/query-execution/execute-query-by-widget-id.d.ts +10 -2
  109. package/dist/query-execution/execute-query.d.ts +11 -4
  110. package/dist/query-execution/index.d.ts +1 -1
  111. package/dist/query-execution/types.d.ts +10 -8
  112. package/dist/query-execution/use-execute-csv-query.d.ts +4 -6
  113. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +6 -2
  114. package/dist/query-execution/use-execute-query.d.ts +2 -2
  115. package/dist/scatter-chart.d.ts +4 -4
  116. package/dist/scattermap-chart.d.ts +36 -0
  117. package/dist/sunburst-chart.d.ts +1 -1
  118. package/dist/table/hooks/use-table-data.d.ts +3 -2
  119. package/dist/table/table.d.ts +2 -2
  120. package/dist/table-widget-4275c061.js +77714 -0
  121. package/dist/themes/theme-loader.d.ts +0 -1
  122. package/dist/translation/resources/en.d.ts +25 -0
  123. package/dist/translation/resources/index.d.ts +50 -0
  124. package/dist/treemap-chart.d.ts +2 -2
  125. package/dist/types.d.ts +89 -8
  126. package/dist/utils/filters-comparator.d.ts +13 -1
  127. package/dist/widgets/chart-widget-deprecated.d.ts +1 -1
  128. package/dist/widgets/chart-widget.d.ts +1 -1
  129. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
  130. package/dist/widgets/common/drilldown.d.ts +12 -2
  131. package/dist/widgets/drilldown-widget.d.ts +2 -2
  132. package/package.json +22 -6
  133. package/dist/chart-data/series-data-color-service/index.d.ts +0 -3
  134. package/dist/chart-data/series-data-color-service/series-data-color-service.d.ts +0 -4
  135. package/dist/table-widget-5f3b1d03.js +0 -64456
  136. /package/dist/chart-data/{series-data-color-service → data-coloring}/types.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { ChartDataOptionsInternal, IndicatorDataOptionsInternal } from './chart-data-options/types';
1
+ import { ChartDataOptionsInternal, IndicatorChartDataOptionsInternal } from './chart-data-options/types';
2
2
  import { type FunctionComponent } from 'react';
3
3
  import { IndicatorChartData } from './chart-data/types';
4
4
  import { IndicatorChartDesignOptions } from './chart-options-processor/translations/design-options';
@@ -7,7 +7,7 @@ import { ChartDesignOptions } from './chart-options-processor/translations/types
7
7
  import { ThemeSettings } from './types';
8
8
  interface Props {
9
9
  chartData: IndicatorChartData;
10
- dataOptions: IndicatorDataOptionsInternal;
10
+ dataOptions: IndicatorChartDataOptionsInternal;
11
11
  designOptions: IndicatorChartDesignOptions;
12
12
  themeSettings?: ThemeSettings;
13
13
  }
@@ -16,6 +16,6 @@ interface Props {
16
16
  */
17
17
  export declare const IndicatorCanvas: FunctionComponent<Props>;
18
18
  export declare const isIndicatorChartData: (chartData: ChartData) => chartData is IndicatorChartData;
19
- export declare const isIndicatorDataOptionsInternal: (dataOptions: ChartDataOptionsInternal) => dataOptions is IndicatorDataOptionsInternal;
19
+ export declare const isIndicatorChartDataOptionsInternal: (dataOptions: ChartDataOptionsInternal) => dataOptions is IndicatorChartDataOptionsInternal;
20
20
  export declare const isIndicatorDesignOptions: (designOptions: ChartDesignOptions) => designOptions is IndicatorChartDesignOptions;
21
21
  export {};
@@ -12,7 +12,7 @@ import { IndicatorChartProps } from './props';
12
12
  * dataOptions={{
13
13
  * value: [
14
14
  * {
15
- * column: measures.sum(DM.Commerce.Revenue),
15
+ * column: measureFactory.sum(DM.Commerce.Revenue),
16
16
  * numberFormatConfig: {
17
17
  * name: 'Numbers',
18
18
  * decimalScale: 2,
@@ -27,10 +27,10 @@ import { IndicatorChartProps } from './props';
27
27
  * },
28
28
  * ],
29
29
  * secondary: [],
30
- * min: [measures.constant(0)],
31
- * max: [measures.constant(125000000)],
30
+ * min: [measureFactory.constant(0)],
31
+ * max: [measureFactory.constant(125000000)],
32
32
  * }}
33
- * filters={[filters.greaterThan(DM.Commerce.Revenue, 1000)]}
33
+ * filters={[filterFactory.greaterThan(DM.Commerce.Revenue, 1000)]}
34
34
  * styleOptions={{
35
35
  * indicatorComponents: {
36
36
  * title: {
@@ -11,10 +11,10 @@ import { LineChartProps } from './props';
11
11
  * dataSet={DM.DataSource}
12
12
  * dataOptions={{
13
13
  * category: [DM.Commerce.Date.Years],
14
- * value: [measures.sum(DM.Commerce.Revenue)],
14
+ * value: [measureFactory.sum(DM.Commerce.Revenue)],
15
15
  * breakBy: [DM.Commerce.Gender],
16
16
  * }}
17
- * filters={[filters.greaterThan(DM.Commerce.Revenue, 1000)]}
17
+ * filters={[filterFactory.greaterThan(DM.Commerce.Revenue, 1000)]}
18
18
  * onDataPointClick= {(point, nativeEvent) => {
19
19
  * console.log('clicked', point, nativeEvent);
20
20
  * }}
@@ -99,6 +99,7 @@ export type DashboardModelSuccessState = {
99
99
  export declare const useGetDashboardModel: (params: GetDashboardModelParams) => DashboardModelState;
100
100
  /**
101
101
  * {@link useGetDashboardModel} without tracking to be used inside other hooks or components in Compose SDK.
102
+ *
102
103
  * @internal
103
104
  */
104
105
  export declare function useGetDashboardModelInternal(params: GetDashboardModelParams): DashboardModelState;
@@ -62,7 +62,7 @@ export type DashboardModelsSuccessState = {
62
62
  status: 'success';
63
63
  };
64
64
  /**
65
- * React hook that retrieves existing dashboards that the user can access to from the Sisense instance.
65
+ * React hook that retrieves existing dashboards that the user can access to from the Sisense instance.
66
66
  *
67
67
  * @example
68
68
  ```tsx
@@ -84,6 +84,7 @@ export type DashboardModelsSuccessState = {
84
84
  export declare const useGetDashboardModels: (params?: GetDashboardModelsParams | undefined) => DashboardModelsState;
85
85
  /**
86
86
  * {@link useGetDashboardModels} without tracking to be used inside other hooks or components in Compose SDK.
87
+ *
87
88
  * @internal
88
89
  */
89
90
  export declare function useGetDashboardModelsInternal(params?: GetDashboardModelsParams): DashboardModelsState;
@@ -97,6 +97,7 @@ export type WidgetModelSuccessState = {
97
97
  export declare const useGetWidgetModel: (params: GetWidgetModelParams) => WidgetModelState;
98
98
  /**
99
99
  * {@link useGetWidgetModel} without tracking to be used inside other hooks or components in Compose SDK.
100
+ *
100
101
  * @internal
101
102
  */
102
103
  export declare function useGetWidgetModelInternal(params: GetWidgetModelParams): WidgetModelState;
@@ -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, StyleOptions, TableStyleOptions } from '../../types';
6
+ import { ChartType, DrilldownOptions, ChartStyleOptions, TableStyleOptions } from '../../types';
7
7
  /**
8
8
  * Widget data options.
9
9
  */
@@ -39,7 +39,7 @@ export declare class WidgetModel {
39
39
  /**
40
40
  * Widget style options.
41
41
  */
42
- styleOptions: StyleOptions | TableStyleOptions;
42
+ styleOptions: ChartStyleOptions | TableStyleOptions;
43
43
  /**
44
44
  * Widget filters.
45
45
  */
@@ -60,7 +60,6 @@ export declare class WidgetModel {
60
60
  * Creates a new widget model.
61
61
  *
62
62
  * @param widgetDto - The widget DTO to be converted to a widget model
63
- *
64
63
  * @internal
65
64
  */
66
65
  constructor(widgetDto: WidgetDto);
@@ -87,6 +86,7 @@ export declare class WidgetModel {
87
86
  getChartProps(): ChartProps;
88
87
  /**
89
88
  * Returns the props to be used for rendering a table.
89
+ *
90
90
  * @example
91
91
  * ```tsx
92
92
  * <Table {...widget.getTableProps()} />
@@ -98,6 +98,7 @@ export declare class WidgetModel {
98
98
  getTableProps(): TableProps;
99
99
  /**
100
100
  * Returns the props to be used for rendering a chart widget.
101
+ *
101
102
  * @example
102
103
  * ```tsx
103
104
  * <ChartWidget {...widget.getChartWidgetProps()} />
@@ -108,6 +109,7 @@ export declare class WidgetModel {
108
109
  getChartWidgetProps(): ChartWidgetProps;
109
110
  /**
110
111
  * Returns the props to be used for rendering a table widget.
112
+ *
111
113
  * @example
112
114
  * ```tsx
113
115
  * <TableWidget {...widget.getTableWidgetProps()} />
@@ -115,7 +117,6 @@ export declare class WidgetModel {
115
117
  *
116
118
  * Note: this method is not supported for chart widgets.
117
119
  * Use {@link getChartWidgetProps} instead for getting props for the <ChartWidget> component.
118
- *
119
120
  * @internal
120
121
  */
121
122
  getTableWidgetProps(): TableWidgetProps;
@@ -12,9 +12,9 @@ import { PieChartProps } from './props';
12
12
  * dataSet={DM.DataSource}
13
13
  * dataOptions={{
14
14
  * category: [DM.Commerce.AgeRange],
15
- * value: [measures.sum(DM.Commerce.Revenue)],
15
+ * value: [measureFactory.sum(DM.Commerce.Revenue)],
16
16
  * }}
17
- * filters={[filters.greaterThan(DM.Commerce.Revenue, 1000)]}
17
+ * filters={[filterFactory.greaterThan(DM.Commerce.Revenue, 1000)]}
18
18
  * onDataPointClick= {(point, nativeEvent) => {
19
19
  * console.log('clicked', point, nativeEvent);
20
20
  * }}
@@ -11,10 +11,10 @@ import { PolarChartProps } from './props';
11
11
  * dataSet={DM.DataSource}
12
12
  * dataOptions={{
13
13
  * category: [DM.Commerce.AgeRange],
14
- * value: [measures.sum(DM.Commerce.Revenue)],
14
+ * value: [measureFactory.sum(DM.Commerce.Revenue)],
15
15
  * breakBy: [DM.Commerce.Gender],
16
16
  * }}
17
- * filters={[filters.greaterThan(DM.Commerce.Revenue, 1000)]}
17
+ * filters={[filterFactory.greaterThan(DM.Commerce.Revenue, 1000)]}
18
18
  * onDataPointClick= {(point, nativeEvent) => {
19
19
  * console.log('clicked', point, nativeEvent);
20
20
  * }}
package/dist/props.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { Attribute, Filter, Measure, DataSource, Data, QueryResultData } from '@sisense/sdk-data';
2
- import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, StyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, TableStyleOptions, ThemeOid, WidgetStyleOptions, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection, SunburstStyleOptions } from './types';
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';
3
3
  import { HighchartsOptions } from './chart-options-processor/chart-options-service';
4
4
  import { ComponentType, PropsWithChildren, ReactNode } from 'react';
5
- import { IndicatorDataOptions, ScatterChartDataOptions, TableDataOptions } from './chart-data-options/types';
5
+ import { IndicatorChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, ScatterChartDataOptions, TableDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions } from './chart-data-options/types';
6
6
  import { DataPointEventHandler, DataPointsEventHandler, ScatterDataPointEventHandler, ScatterDataPointsEventHandler } from './chart-options-processor/apply-event-handlers';
7
7
  import { AppConfig } from './app/client-application';
8
- import { ExecuteQueryParams } from './query-execution';
8
+ import { ExecuteQueryParams, QueryByWidgetIdState, QueryState } from './query-execution';
9
9
  import { FiltersMergeStrategy } from './dashboard-widget/types';
10
10
  import { HookEnableParam } from './common/hooks/types';
11
11
  export type { ScatterDataPointEventHandler, ScatterDataPointsEventHandler, DataPointEventHandler, DataPointsEventHandler, MenuItemSection, HighchartsOptions, };
@@ -82,7 +82,7 @@ export interface ExecuteQueryProps {
82
82
  /** Measures of the query */
83
83
  measures?: Measure[];
84
84
  /** Filters that will slice query results */
85
- filters?: Filter[];
85
+ filters?: Filter[] | FilterRelation;
86
86
  /** Highlight filters that will highlight results that pass filter criteria */
87
87
  highlights?: Filter[];
88
88
  /**
@@ -98,7 +98,7 @@ export interface ExecuteQueryProps {
98
98
  */
99
99
  offset?: number;
100
100
  /** Function as child component that is called to render the query results */
101
- children?: (queryResult: QueryResultData) => ReactNode;
101
+ children?: (queryState: QueryState) => ReactNode;
102
102
  /** Callback function that is evaluated when query results are ready */
103
103
  onDataChanged?: (data: QueryResultData) => void;
104
104
  /**
@@ -253,7 +253,7 @@ export interface BaseChartProps {
253
253
  *
254
254
  * @category Data
255
255
  */
256
- filters?: Filter[];
256
+ filters?: Filter[] | FilterRelation;
257
257
  /**
258
258
  * Highlight filters that will highlight results that pass filter criteria
259
259
  *
@@ -282,7 +282,7 @@ export interface ChartProps extends BaseChartProps, BaseChartEventProps {
282
282
  *
283
283
  * @category Chart
284
284
  */
285
- styleOptions?: StyleOptions;
285
+ styleOptions?: ChartStyleOptions;
286
286
  /**
287
287
  * Used to force a refresh of the chart from outside the chart component
288
288
  * Since added to dependencies of useEffect, will trigger a query execution
@@ -319,7 +319,7 @@ export interface BarChartProps extends BaseChartProps, ChartEventProps {
319
319
  */
320
320
  dataOptions: CartesianChartDataOptions;
321
321
  /**
322
- * Configuration that define functional style of the various chart elements
322
+ * Configuration that defines functional style of the various chart elements
323
323
  *
324
324
  * @category Chart
325
325
  */
@@ -336,7 +336,7 @@ export interface ColumnChartProps extends BaseChartProps, ChartEventProps {
336
336
  */
337
337
  dataOptions: CartesianChartDataOptions;
338
338
  /**
339
- * Configuration that define functional style of the various chart elements
339
+ * Configuration that defines functional style of the various chart elements
340
340
  *
341
341
  * @category Chart
342
342
  */
@@ -353,7 +353,7 @@ export interface FunnelChartProps extends BaseChartProps, ChartEventProps {
353
353
  */
354
354
  dataOptions: CategoricalChartDataOptions;
355
355
  /**
356
- * Configuration that define functional style of the various chart elements
356
+ * Configuration that defines functional style of the various chart elements
357
357
  *
358
358
  * @category Chart
359
359
  */
@@ -387,7 +387,7 @@ export interface PieChartProps extends BaseChartProps, ChartEventProps {
387
387
  */
388
388
  dataOptions: CategoricalChartDataOptions;
389
389
  /**
390
- * Configuration that define functional style of the various chart elements
390
+ * Configuration that defines functional style of the various chart elements
391
391
  *
392
392
  * @category Chart
393
393
  */
@@ -399,7 +399,7 @@ export interface PieChartProps extends BaseChartProps, ChartEventProps {
399
399
  export interface PolarChartProps extends BaseChartProps, ChartEventProps {
400
400
  /** Configurations for how to interpret and present the data passed to the chart */
401
401
  dataOptions: CartesianChartDataOptions;
402
- /** Configuration that define functional style of the various chart elements */
402
+ /** Configuration that defines functional style of the various chart elements */
403
403
  styleOptions?: PolarStyleOptions;
404
404
  }
405
405
  /**
@@ -407,8 +407,8 @@ export interface PolarChartProps extends BaseChartProps, ChartEventProps {
407
407
  */
408
408
  export interface IndicatorChartProps extends BaseChartProps {
409
409
  /** Configurations for how to interpret and present the data passed to the chart */
410
- dataOptions: IndicatorDataOptions;
411
- /** Configuration that define functional style of the various chart elements */
410
+ dataOptions: IndicatorChartDataOptions;
411
+ /** Configuration that defines functional style of the various chart elements */
412
412
  styleOptions?: IndicatorStyleOptions;
413
413
  }
414
414
  /**
@@ -433,7 +433,7 @@ export interface TableProps {
433
433
  *
434
434
  * @category Data
435
435
  */
436
- filters?: Filter[];
436
+ filters?: Filter[] | FilterRelation;
437
437
  /**
438
438
  * Configurations that define functional style of the various table elements
439
439
  *
@@ -459,7 +459,7 @@ export interface ScatterChartProps extends BaseChartProps, ScatterChartEventProp
459
459
  */
460
460
  dataOptions: ScatterChartDataOptions;
461
461
  /**
462
- * Configuration that define functional style of the various chart elements
462
+ * Configuration that defines functional style of the various chart elements
463
463
  *
464
464
  * @category Chart
465
465
  */
@@ -525,35 +525,12 @@ export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource
525
525
  */
526
526
  description?: string;
527
527
  /**
528
- * Style options for the widget container including the widget header
528
+ * Style options for the the widget including the widget container and the chart or table inside.
529
529
  *
530
- * @category Widget
531
- */
532
- widgetStyleOptions?: WidgetStyleOptions;
533
- /**
534
- * General style options for the visual component of the widget – for example, chart or table.
535
530
  *
536
531
  * @category Widget
537
532
  */
538
- styleOptions?: {
539
- /**
540
- * Total width of the component, which is considered in the following order of priority:
541
- *
542
- * 1. Value passed to this property (in pixels)
543
- * 2. Width of the container wrapping this component
544
- * 3. Default value as specified per chart type
545
- *
546
- */
547
- width?: number;
548
- /**
549
- * Total height of the component, which is considered in the following order of priority:
550
- *
551
- * 1. Value passed to this property (in pixels).
552
- * 2. Height of the container wrapping this component
553
- * 3. Default value as specified per chart type
554
- */
555
- height?: number;
556
- };
533
+ styleOptions?: DashboardWidgetStyleOptions;
557
534
  /**
558
535
  * {@inheritDoc ChartWidgetProps.drilldownOptions}
559
536
  *
@@ -581,6 +558,12 @@ export interface ChartWidgetProps extends BaseChartEventProps {
581
558
  * @category Data
582
559
  */
583
560
  filters?: Filter[];
561
+ /**
562
+ * Specifies the logical relationship between multiple filters (AND, OR)
563
+ *
564
+ * @category Data
565
+ */
566
+ filterRelations?: FilterRelation;
584
567
  /**
585
568
  * Highlight filters that will highlight results that pass filter criteria
586
569
  *
@@ -600,17 +583,11 @@ export interface ChartWidgetProps extends BaseChartEventProps {
600
583
  */
601
584
  dataOptions: ChartDataOptions;
602
585
  /**
603
- * Style options for both the widget as a whole and specifically for the widget header
586
+ * Style options for both the chart and widget including the widget header
604
587
  *
605
588
  * @category Widget
606
589
  */
607
- widgetStyleOptions?: WidgetStyleOptions;
608
- /**
609
- * Style options union across chart types
610
- *
611
- * @category Chart
612
- */
613
- styleOptions?: StyleOptions;
590
+ styleOptions?: ChartWidgetStyleOptions;
614
591
  /**
615
592
  * List of categories to allow drilldowns on
616
593
  *
@@ -687,7 +664,7 @@ export interface TableWidgetProps {
687
664
  *
688
665
  * @category Data
689
666
  */
690
- filters?: Filter[];
667
+ filters?: Filter[] | FilterRelation;
691
668
  /**
692
669
  * Configurations for how to interpret and present the data passed to the table
693
670
  *
@@ -695,17 +672,11 @@ export interface TableWidgetProps {
695
672
  */
696
673
  dataOptions: TableDataOptions;
697
674
  /**
698
- * Style options for both the widget as a whole and specifically for the widget header
675
+ * Style options for both the table and widget including the widget header
699
676
  *
700
677
  * @category Widget
701
678
  */
702
- widgetStyleOptions?: WidgetStyleOptions;
703
- /**
704
- * Style options for table
705
- *
706
- * @category Chart
707
- */
708
- styleOptions?: TableStyleOptions;
679
+ styleOptions?: TableWidgetStyleOptions;
709
680
  /**
710
681
  * React nodes to be rendered at the top of component, before the table
711
682
  *
@@ -768,7 +739,7 @@ export interface ExecuteQueryByWidgetIdProps {
768
739
  */
769
740
  includeDashboardFilters?: boolean;
770
741
  /** Function as child component that is called to render the query results */
771
- children?: (queryResult: QueryResultData, queryParams: ExecuteQueryParams) => ReactNode;
742
+ children?: (queryState: QueryByWidgetIdState) => ReactNode;
772
743
  /** Callback function that is evaluated when query results are ready */
773
744
  onDataChanged?: (data: QueryResultData, queryParams: ExecuteQueryParams) => void;
774
745
  /**
@@ -795,7 +766,7 @@ export interface TreemapChartProps extends BaseChartProps, ChartEventProps {
795
766
  */
796
767
  dataOptions: CategoricalChartDataOptions;
797
768
  /**
798
- * Configuration that define functional style of the various chart elements
769
+ * Configuration that defines functional style of the various chart elements
799
770
  *
800
771
  * @category Chart
801
772
  */
@@ -812,12 +783,63 @@ export interface SunburstChartProps extends BaseChartProps, ChartEventProps {
812
783
  */
813
784
  dataOptions: CategoricalChartDataOptions;
814
785
  /**
815
- * Configuration that define functional style of the various chart elements
786
+ * Configuration that defines functional style of the various chart elements
816
787
  *
817
788
  * @category Chart
818
789
  */
819
790
  styleOptions?: SunburstStyleOptions;
820
791
  }
792
+ /**
793
+ * Props of the {@link BoxplotChart} component.
794
+ */
795
+ export interface BoxplotChartProps extends BaseChartProps, ChartEventProps {
796
+ /**
797
+ * Configurations for how to interpret and present the data passed to the chart
798
+ *
799
+ * @category Chart
800
+ */
801
+ dataOptions: BoxplotChartDataOptions | BoxplotChartCustomDataOptions;
802
+ /**
803
+ * Configuration that defines functional style of the various chart elements
804
+ *
805
+ * @category Chart
806
+ */
807
+ styleOptions?: BoxplotStyleOptions;
808
+ }
809
+ /**
810
+ * Props of the {@link ScattermapChart} component.
811
+ */
812
+ export interface ScattermapChartProps extends BaseChartProps, ChartEventProps {
813
+ /**
814
+ * Configurations for how to interpret and present the data passed to the chart
815
+ *
816
+ * @category Chart
817
+ */
818
+ dataOptions: ScattermapChartDataOptions;
819
+ /**
820
+ * Configuration that defines functional style of the various chart elements
821
+ *
822
+ * @category Chart
823
+ */
824
+ styleOptions?: ScattermapStyleOptions;
825
+ }
826
+ /**
827
+ * Props of the {@link AreamapChart} component.
828
+ */
829
+ export interface AreamapChartProps extends BaseChartProps, ChartEventProps {
830
+ /**
831
+ * Configurations for how to interpret and present the data passed to the chart
832
+ *
833
+ * @category Chart
834
+ */
835
+ dataOptions: AreamapChartDataOptions;
836
+ /**
837
+ * Configuration that defines functional style of the various chart elements
838
+ *
839
+ * @category Chart
840
+ */
841
+ styleOptions?: AreamapStyleOptions;
842
+ }
821
843
  /**
822
844
  * Props for {@link ContextMenu} component.
823
845
  */
@@ -4,7 +4,7 @@ import { ClientApplication } from '../app/client-application';
4
4
  /**
5
5
  * All the properties that fully describe a query you want to send.
6
6
  *
7
- * We use "dimensions" it public interface because the term is closer to the query and charting
7
+ * We use "dimensions" in public interface because the term is closer to the query and charting
8
8
  * as used in the industry (Sisense included).
9
9
  * internally, "dimensions" are represented by attributes as the latter is closer to the data model.
10
10
  */
@@ -2,7 +2,7 @@ import { type FunctionComponent } from 'react';
2
2
  import { ExecuteQueryByWidgetIdProps } from '../props';
3
3
  /**
4
4
  * Executes a query over the existing widget and renders a function as child component.
5
- * The child component is passed the results of the query.
5
+ * The child component is passed the state of the query as defined in {@link QueryByWidgetIdState}.
6
6
  *
7
7
  * This component takes the Children Prop Pattern and
8
8
  * offers an alternative approach to the {@link useExecuteQueryByWidgetId} hook.
@@ -15,10 +15,18 @@ import { ExecuteQueryByWidgetIdProps } from '../props';
15
15
  * dashboardOid={'6441e728dac1920034bce737'}
16
16
  * >
17
17
  * {
18
- * (data, query) => {
18
+ * ({data, isLoading, isError}) => {
19
+ * if (isLoading) {
20
+ * return <div>Loading...</div>;
21
+ * }
22
+ * if (isError) {
23
+ * return <div>Error</div>;
24
+ * }
19
25
  * if (data) {
26
+ * console.log(data);
20
27
  * return <div>{`Total Rows: ${data.rows.length}`}</div>;
21
28
  * }
29
+ * return null;
22
30
  * }
23
31
  * }
24
32
  * </ExecuteQueryByWidgetId>
@@ -2,7 +2,7 @@ import { type FunctionComponent } from 'react';
2
2
  import { ExecuteQueryProps } from '../props';
3
3
  /**
4
4
  * Executes a query and renders a function as child component. The child
5
- * component is passed the results of the query.
5
+ * component is passed the state of the query as defined in {@link QueryState}.
6
6
  *
7
7
  * This component takes the Children Prop Pattern and
8
8
  * offers an alternative approach to the {@link useExecuteQuery} hook.
@@ -13,15 +13,22 @@ import { ExecuteQueryProps } from '../props';
13
13
  * <ExecuteQuery
14
14
  * dataSource={DM.DataSource}
15
15
  * dimensions={[DM.Commerce.AgeRange]}
16
- * measures={[measures.sum(DM.Commerce.Revenue)]}
17
- * filters={[filters.greaterThan(DM.Commerce.Revenue, 1000)]}
16
+ * measures={[measureFactory.sum(DM.Commerce.Revenue)]}
17
+ * filters={[filterFactory.greaterThan(DM.Commerce.Revenue, 1000)]}
18
18
  * >
19
19
  * {
20
- * (data) => {
20
+ * ({data, isLoading, isError}) => {
21
+ * if (isLoading) {
22
+ * return <div>Loading...</div>;
23
+ * }
24
+ * if (isError) {
25
+ * return <div>Error</div>;
26
+ * }
21
27
  * if (data) {
22
28
  * console.log(data);
23
29
  * return <div>{`Total Rows: ${data.rows.length}`}</div>;
24
30
  * }
31
+ * return null;
25
32
  * }
26
33
  * }
27
34
  * </ExecuteQuery>
@@ -3,4 +3,4 @@ export { useExecuteQuery } from './use-execute-query';
3
3
  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
- export type { QueryState, QueryLoadingState, QuerySuccessState, QueryErrorState, CsvQueryState, CsvQueryLoadingState, CsvQuerySuccessState, CsvQueryErrorState, ExecuteQueryParams, ExecuteCsvQueryParams, ExecuteQueryByWidgetIdParams, QueryByWidgetIdState, } from './types';
6
+ export type { QueryState, QueryLoadingState, QuerySuccessState, QueryErrorState, CsvQueryState, CsvQueryLoadingState, CsvQuerySuccessState, CsvQueryErrorState, ExecuteQueryParams, ExecuteCsvQueryParams, ExecuteCSVQueryConfig, ExecuteQueryByWidgetIdParams, QueryByWidgetIdState, } from './types';
@@ -1,4 +1,4 @@
1
- import { Attribute, DataSource, Filter, Measure, QueryResultData } from '@sisense/sdk-data';
1
+ import { Attribute, DataSource, Filter, FilterRelation, Measure, 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[] | FilterRelation;
165
165
  /** Highlight filters that will highlight results that pass filter criteria */
166
166
  highlights?: Filter[];
167
167
  /** {@inheritDoc ExecuteQueryProps.count} */
@@ -177,14 +177,16 @@ export interface ExecuteQueryParams {
177
177
  /** {@inheritDoc ExecuteQueryProps.onBeforeQuery} */
178
178
  onBeforeQuery?: (jaql: any) => any | Promise<any>;
179
179
  }
180
+ /** Configuration for {@link useExecuteCsvQuery} hook. */
181
+ export type ExecuteCSVQueryConfig = {
182
+ /**
183
+ * If set to true, the data will be returned as a Blob.
184
+ */
185
+ asDataStream?: boolean;
186
+ };
180
187
  /**
181
188
  * Parameters for {@link useExecuteCsvQuery} hook.
182
189
  */
183
190
  export interface ExecuteCsvQueryParams extends ExecuteQueryParams {
184
- config?: {
185
- /**
186
- * If set to true, the data will be returned as a Blob.
187
- */
188
- asDataStream?: boolean;
189
- };
191
+ config?: ExecuteCSVQueryConfig;
190
192
  }
@@ -9,8 +9,8 @@ import { CsvQueryState, ExecuteCsvQueryParams } from './types.js';
9
9
  const { data, isLoading, isError } = useExecuteCsvQuery({
10
10
  dataSource: DM.DataSource,
11
11
  dimensions: [DM.Commerce.AgeRange],
12
- measures: [measures.sum(DM.Commerce.Revenue)],
13
- filters: [filters.greaterThan(DM.Commerce.Revenue, 1000)],
12
+ measures: [measureFactory.sum(DM.Commerce.Revenue)],
13
+ filters: [filterFactory.greaterThan(DM.Commerce.Revenue, 1000)],
14
14
  });
15
15
  if (isLoading) {
16
16
  return <div>Loading...</div>;
@@ -28,8 +28,8 @@ import { CsvQueryState, ExecuteCsvQueryParams } from './types.js';
28
28
  const { data, isLoading, isError } = useExecuteCsvQuery({
29
29
  dataSource: DM.DataSource,
30
30
  dimensions: [DM.Commerce.AgeRange],
31
- measures: [measures.sum(DM.Commerce.Revenue)],
32
- filters: [filters.greaterThan(DM.Commerce.Revenue, 1000)],
31
+ measures: [measureFactory.sum(DM.Commerce.Revenue)],
32
+ filters: [filterFactory.greaterThan(DM.Commerce.Revenue, 1000)],
33
33
  config: { asDataStream: true },
34
34
  });
35
35
  if (isLoading) {
@@ -68,8 +68,6 @@ import { CsvQueryState, ExecuteCsvQueryParams } from './types.js';
68
68
  }
69
69
  return null;
70
70
  ```
71
-
72
- *
73
71
  * @param params - Parameters of the query
74
72
  * @returns Query state that contains the status of the query execution, the result data, or the error if any occurred
75
73
  */
@@ -1,6 +1,7 @@
1
1
  import { ExecuteQueryParams } from './';
2
2
  import { ClientApplication } from '../app/client-application';
3
3
  import { ExecuteQueryByWidgetIdParams, QueryByWidgetIdState } from './types';
4
+ import { Filter } from '@sisense/sdk-data';
4
5
  /**
5
6
  * React hook that executes a data query extracted from an existing widget in the Sisense instance.
6
7
  *
@@ -32,6 +33,7 @@ import { ExecuteQueryByWidgetIdParams, QueryByWidgetIdState } from './types';
32
33
  export declare const useExecuteQueryByWidgetId: (params: ExecuteQueryByWidgetIdParams) => QueryByWidgetIdState;
33
34
  /**
34
35
  * {@link useExecuteQueryByWidgetId} without tracking to be used inside other hooks or components in Compose SDK.
36
+ *
35
37
  * @internal
36
38
  */
37
39
  export declare function useExecuteQueryByWidgetIdInternal(params: ExecuteQueryByWidgetIdParams): QueryByWidgetIdState;
@@ -46,6 +48,8 @@ export declare function isParamsChanged(prevParams: ExecuteQueryByWidgetIdParams
46
48
  export declare function executeQueryByWidgetId({ widgetOid, dashboardOid, filters, highlights, filtersMergeStrategy, count, offset, includeDashboardFilters, app, onBeforeQuery, }: ExecuteQueryByWidgetIdParams & {
47
49
  app: ClientApplication;
48
50
  }): Promise<{
49
- data: import("packages/sdk-data/dist").QueryResultData;
50
- query: ExecuteQueryParams;
51
+ data: import("@sisense/sdk-data").QueryResultData;
52
+ query: Omit<ExecuteQueryParams, "filters"> & {
53
+ filters?: Filter[] | undefined;
54
+ };
51
55
  }>;