@sisense/sdk-ui 1.10.1 → 1.12.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 (133) hide show
  1. package/dist/ai/ai-context-provider.d.ts +1 -1
  2. package/dist/ai/buttons/thumbs-down-button.d.ts +2 -1
  3. package/dist/ai/buttons/thumbs-up-button.d.ts +2 -1
  4. package/dist/ai/chat-config.d.ts +10 -0
  5. package/dist/ai/chat-dropup.d.ts +2 -1
  6. package/dist/ai/chat-input.d.ts +3 -1
  7. package/dist/ai/chatbot.d.ts +1 -1
  8. package/dist/ai/common/beta-label.d.ts +1 -0
  9. package/dist/ai/common/icon-button.d.ts +2 -3
  10. package/dist/ai/get-nlg-query-result.d.ts +1 -1
  11. package/dist/ai/icons/light-bulb-icon.d.ts +1 -3
  12. package/dist/ai/index.d.ts +1 -0
  13. package/dist/ai/messages/clickable-message.d.ts +2 -1
  14. package/dist/ai/messages/feedback-wrapper.d.ts +2 -2
  15. package/dist/ai/messages/get-widget-options.d.ts +6 -1
  16. package/dist/ai/messages/text-message.d.ts +5 -0
  17. package/dist/ai/use-get-nlg-query-result.d.ts +1 -1
  18. package/dist/ai/use-get-query-recommendations.d.ts +1 -1
  19. package/dist/ai/use-last-nlq-response.d.ts +19 -0
  20. package/dist/ai.cjs +454 -0
  21. package/dist/ai.js +1142 -1095
  22. package/dist/api/types/dashboard-dto.d.ts +5 -4
  23. package/dist/app/client-application.d.ts +1 -0
  24. package/dist/area-range-chart.d.ts +67 -0
  25. package/dist/areamap-chart.d.ts +0 -1
  26. package/dist/boxplot-chart.d.ts +0 -1
  27. package/dist/chart/chart.d.ts +0 -2
  28. package/dist/chart/helpers/should-skip-sisense-context-waiting.d.ts +3 -0
  29. package/dist/chart/helpers/use-chart-renderer-props.d.ts +28 -0
  30. package/dist/chart/regular-chart.d.ts +7 -0
  31. package/dist/chart/types.d.ts +21 -0
  32. package/dist/chart-data/range-data.d.ts +11 -0
  33. package/dist/chart-data/types.d.ts +15 -1
  34. package/dist/chart-data-options/translate-range-data-options.d.ts +2 -0
  35. package/dist/chart-data-options/types.d.ts +56 -4
  36. package/dist/chart-data-processor/data-table-date-period.d.ts +0 -1
  37. package/dist/chart-options-processor/chart-options-service.d.ts +5 -0
  38. package/dist/chart-options-processor/range-chart-options.d.ts +17 -0
  39. package/dist/chart-options-processor/translations/design-options.d.ts +55 -7
  40. package/dist/chart-options-processor/translations/funnel-plot-options.d.ts +2 -1
  41. package/dist/chart-options-processor/translations/pie-plot-options.d.ts +2 -1
  42. package/dist/chart-options-processor/translations/range/tooltip-range.d.ts +4 -0
  43. package/dist/chart-options-processor/translations/tooltip-utils.d.ts +3 -0
  44. package/dist/chart-options-processor/translations/types.d.ts +12 -6
  45. package/dist/charts/map-charts/areamap/areamap.d.ts +2 -3
  46. package/dist/charts/map-charts/scattermap/scattermap.d.ts +2 -1
  47. package/dist/charts/table/helpers/calc-column-widths.d.ts +1 -0
  48. package/dist/charts/table/styles/style-constants.d.ts +1 -0
  49. package/dist/charts/table/types.d.ts +13 -4
  50. package/dist/common/components/loading-indicator.d.ts +17 -4
  51. package/dist/common/hooks/use-fetch.d.ts +1 -1
  52. package/dist/common/hooks/use-has-changed.d.ts +9 -0
  53. package/dist/common/hooks/use-should-load.d.ts +12 -0
  54. package/dist/dashboard/components/content-panel.d.ts +41 -0
  55. package/dist/dashboard/components/dashboard-container.d.ts +2 -0
  56. package/dist/dashboard/components/dashboard-header.d.ts +2 -0
  57. package/dist/dashboard/components/plugin-service.d.ts +21 -0
  58. package/dist/dashboard/constants.d.ts +2 -0
  59. package/dist/dashboard/dashboard-by-id.d.ts +7 -0
  60. package/dist/dashboard/dashboard.d.ts +8 -0
  61. package/dist/dashboard/types.d.ts +41 -0
  62. package/dist/dashboard/utils.d.ts +5 -0
  63. package/dist/dashboard-widget/translate-widget-filters.d.ts +664 -4
  64. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +1 -1
  65. package/dist/dashboard-widget/utils.d.ts +2 -2
  66. package/dist/decorators/component-decorators/as-sisense-component.d.ts +6 -2
  67. package/dist/decorators/component-decorators/with-tracking/use-track-component-init.d.ts +2 -1
  68. package/dist/decorators/component-decorators/with-tracking/with-tracking.d.ts +4 -1
  69. package/dist/dynamic-size-container/dynamic-size-container.d.ts +8 -0
  70. package/dist/filters/components/common/basic-input.d.ts +0 -1
  71. package/dist/filters/components/common/date-range-field-button.d.ts +3 -6
  72. package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +15 -0
  73. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-display.d.ts +6 -0
  74. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +6 -0
  75. package/dist/filters/components/date-filter/date-range-filter-tile/editable-date-range-filter.d.ts +14 -0
  76. package/dist/filters/components/date-filter/date-range-filter-tile/use-date-limits.d.ts +1 -2
  77. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +2 -2
  78. package/dist/filters/components/filters-panel/filters-panel-tile.d.ts +18 -0
  79. package/dist/filters/components/filters-panel/filters-panel.d.ts +18 -0
  80. package/dist/filters/components/filters-panel/index.d.ts +2 -0
  81. package/dist/filters/components/icons/arrow-icon.d.ts +6 -0
  82. package/dist/filters/components/icons/double-arrow-icon.d.ts +6 -0
  83. package/dist/filters/components/member-filter-tile/basic-member-filter-tile.d.ts +3 -1
  84. package/dist/filters/components/member-filter-tile/use-members.d.ts +1 -1
  85. package/dist/filters/index.d.ts +1 -0
  86. package/dist/highcharts-memorized.d.ts +1 -1
  87. package/dist/index.cjs +784 -0
  88. package/dist/index.d.ts +2 -0
  89. package/dist/index.js +17694 -18881
  90. package/dist/indicator-canvas.d.ts +2 -3
  91. package/dist/models/dashboard/dashboard-model.d.ts +62 -0
  92. package/dist/models/dashboard/get-dashboard-model.d.ts +10 -1
  93. package/dist/models/dashboard/get-dashboard-models.d.ts +2 -1
  94. package/dist/models/dashboard/index.d.ts +1 -1
  95. package/dist/models/dashboard/translate-dashboard-utils.d.ts +5 -0
  96. package/dist/models/dashboard/types.d.ts +2 -12
  97. package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -1
  98. package/dist/models/dashboard/use-get-dashboard-models.d.ts +1 -1
  99. package/dist/models/widget/widget-model.d.ts +3 -3
  100. package/dist/pivot-table/formatters/header-cell-formatters/header-cell-highlight-formatter.d.ts +2 -0
  101. package/dist/pivot-table/formatters/types.d.ts +2 -2
  102. package/dist/pivot-table/helpers/prepare-pivot-styling-props.d.ts +1 -0
  103. package/dist/pivot-table/pivot-table.d.ts +1 -1
  104. package/dist/pivot-table/use-get-pivot-table-query.d.ts +2 -1
  105. package/dist/props.d.ts +57 -2
  106. package/dist/query/date-formats/apply-date-format.d.ts +0 -1
  107. package/dist/query/query-result-date-formatting.d.ts +0 -1
  108. package/dist/query-execution/query-params-comparator.d.ts +1 -7
  109. package/dist/query-execution/types.d.ts +11 -1
  110. package/dist/query-execution/use-execute-pivot-query.d.ts +3 -6
  111. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +3 -4
  112. package/dist/scattermap-chart.d.ts +0 -1
  113. package/dist/sisense-chart/sisense-chart.d.ts +8 -5
  114. package/dist/table/table-component.d.ts +8 -0
  115. package/dist/table/table.d.ts +2 -2
  116. package/dist/table/translations/design-options.d.ts +3 -0
  117. package/dist/translation/resources/en.d.ts +12 -1
  118. package/dist/translation/resources/index.d.ts +24 -2
  119. package/dist/types.d.ts +103 -17
  120. package/dist/{debounce-CVvJ1016.js → useQuery-0UWck_2A.js} +33927 -33705
  121. package/dist/useQuery-DVHD0kJ-.cjs +603 -0
  122. package/dist/utils/check-and-notify-about-deprecated-prop.d.ts +1 -0
  123. package/dist/utils/create-cache.d.ts +0 -1
  124. package/dist/utils/utility-types.d.ts +1 -0
  125. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
  126. package/dist/widgets/drilldown-widget.d.ts +2 -1
  127. package/package.json +13 -9
  128. package/dist/ai/icons/thumbs-down-hovered-icon.d.ts +0 -2
  129. package/dist/ai/icons/thumbs-up-hovered-icon.d.ts +0 -2
  130. package/dist/ai/messages/clear-history-success-message.d.ts +0 -1
  131. package/dist/filters/components/icons/arrow-right-icon.d.ts +0 -2
  132. package/dist/filters/components/icons/double-arrow-right-icon.d.ts +0 -2
  133. package/dist/models/dashboard/translate-dashboard.d.ts +0 -4
@@ -2,15 +2,14 @@ import { 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';
5
- import { ThemeSettings } from './types';
5
+ import { ChartRendererProps } from './chart/types';
6
6
  export interface IndicatorCanvasProps {
7
7
  chartData: IndicatorChartData;
8
8
  dataOptions: IndicatorChartDataOptionsInternal;
9
9
  designOptions: IndicatorChartDesignOptions;
10
- themeSettings?: ThemeSettings;
11
10
  }
12
11
  /**
13
12
  * @internal
14
13
  */
15
14
  export declare const IndicatorCanvas: FunctionComponent<IndicatorCanvasProps>;
16
- export declare const isIndicatorCanvasProps: (chartData: IndicatorCanvasProps) => boolean;
15
+ export declare const isIndicatorCanvasProps: (props: ChartRendererProps) => props is IndicatorCanvasProps;
@@ -0,0 +1,62 @@
1
+ import { DataSource, Filter } from '@sisense/sdk-data';
2
+ import { Layout, WidgetModel } from '../../models';
3
+ import type { DashboardDto } from '../../api/types/dashboard-dto';
4
+ /**
5
+ * Model of Sisense dashboard defined in the abstractions of Compose SDK.
6
+ *
7
+ * @group Fusion Embed
8
+ * @fusionEmbed
9
+ */
10
+ export declare class DashboardModel {
11
+ /**
12
+ * Unique identifier of the dashboard.
13
+ */
14
+ oid: string;
15
+ /**
16
+ * Dashboard title.
17
+ */
18
+ title: string;
19
+ /**
20
+ * Dashboard data source details.
21
+ */
22
+ dataSource: DataSource;
23
+ /**
24
+ * Dashboard widgets.
25
+ */
26
+ widgets: WidgetModel[];
27
+ /**
28
+ * Dashboard layout.
29
+ *
30
+ * @internal
31
+ */
32
+ layout: Layout;
33
+ /**
34
+ * Dashboard filters.
35
+ *
36
+ * @internal
37
+ */
38
+ filters: Filter[];
39
+ /**
40
+ * Creates a new dashboard model.
41
+ *
42
+ * @param dashboardDto - The widget DTO to be converted to a widget model
43
+ * @internal
44
+ */
45
+ constructor(dashboardDto: DashboardDto);
46
+ /**
47
+ * Returns the props to be used for rendering a dashboard.
48
+ *
49
+ * @example
50
+ * ```tsx
51
+ * <Dashboard {...dashboard.getDashboardProps()} />
52
+ * ```
53
+ * @internal
54
+ */
55
+ getDashboardProps(): {
56
+ title: string;
57
+ dataSource: DataSource;
58
+ widgets: WidgetModel[];
59
+ layout: Layout;
60
+ filters: Filter[];
61
+ };
62
+ }
@@ -1,4 +1,5 @@
1
1
  import { HttpClient } from '@sisense/sdk-rest-client';
2
+ import { DashboardModel } from '../../models/dashboard/dashboard-model';
2
3
  export interface GetDashboardModelOptions {
3
4
  /**
4
5
  * Boolean flag whether to include widgets in the dashboard model
@@ -6,6 +7,14 @@ export interface GetDashboardModelOptions {
6
7
  * If not specified, the default value is `false`
7
8
  */
8
9
  includeWidgets?: boolean;
10
+ /**
11
+ * Boolean flag whether to include filters in the dashboard model
12
+ *
13
+ * If not specified, the default value is `false`
14
+ *
15
+ * @internal
16
+ */
17
+ includeFilters?: boolean;
9
18
  }
10
19
  /** @internal */
11
- export declare function getDashboardModel(http: HttpClient, dashboardOid: string, options?: GetDashboardModelOptions): Promise<import("./types").DashboardModel>;
20
+ export declare function getDashboardModel(http: HttpClient, dashboardOid: string, options?: GetDashboardModelOptions): Promise<DashboardModel>;
@@ -1,4 +1,5 @@
1
1
  import { HttpClient } from '@sisense/sdk-rest-client';
2
+ import { DashboardModel } from '../../models/dashboard/dashboard-model';
2
3
  export interface GetDashboardModelsOptions {
3
4
  /**
4
5
  * Dashboard title to search by
@@ -12,4 +13,4 @@ export interface GetDashboardModelsOptions {
12
13
  includeWidgets?: boolean;
13
14
  }
14
15
  /** @internal */
15
- export declare function getDashboardModels(http: HttpClient, options?: GetDashboardModelsOptions): Promise<import("./types.js").DashboardModel[]>;
16
+ export declare function getDashboardModels(http: HttpClient, options?: GetDashboardModelsOptions): Promise<DashboardModel[]>;
@@ -1,6 +1,6 @@
1
1
  export * from './types';
2
2
  export * from './get-dashboard-model';
3
3
  export * from './get-dashboard-models';
4
- export * from './translate-dashboard';
5
4
  export * from './use-get-dashboard-model';
6
5
  export * from './use-get-dashboard-models';
6
+ export * from './dashboard-model';
@@ -0,0 +1,5 @@
1
+ import { type Layout as SisenseLayout, type FilterDto, type CascadingFilterDto } from '../../api/types/dashboard-dto';
2
+ import type { Layout } from './types';
3
+ import { Filter } from '@sisense/sdk-data';
4
+ export declare const translateLayout: (layout: SisenseLayout) => Layout;
5
+ export declare function extractDashboardFilters(dashboardFilters: Array<FilterDto | CascadingFilterDto>): Filter[];
@@ -1,11 +1,9 @@
1
- import { type DataSource } from '@sisense/sdk-data';
2
- import { WidgetModel } from '../widget/widget-model';
3
1
  /** @internal */
4
2
  export interface Layout {
5
3
  columns: {
6
4
  widthPercentage: number;
7
- cells: {
8
- subcells: {
5
+ rows: {
6
+ cells: {
9
7
  widthPercentage: number;
10
8
  height: number | string;
11
9
  widgetId: string;
@@ -13,11 +11,3 @@ export interface Layout {
13
11
  }[];
14
12
  }[];
15
13
  }
16
- export type DashboardModel = {
17
- oid: string;
18
- title: string;
19
- dataSource: DataSource;
20
- widgets?: WidgetModel[];
21
- /** @internal */
22
- layout?: Layout;
23
- };
@@ -1,5 +1,5 @@
1
1
  import { DataState } from '../../common/hooks/data-load-state-reducer';
2
- import { type DashboardModel } from './types';
2
+ import { DashboardModel } from './dashboard-model';
3
3
  import { GetDashboardModelOptions } from './get-dashboard-model';
4
4
  import { HookEnableParam } from '../../common/hooks/types';
5
5
  /**
@@ -1,7 +1,7 @@
1
1
  import { DataState } from '../../common/hooks/data-load-state-reducer.js';
2
- import { type DashboardModel } from './types.js';
3
2
  import { HookEnableParam } from '../../common/hooks/types.js';
4
3
  import { GetDashboardModelsOptions } from './get-dashboard-models.js';
4
+ import { DashboardModel } from '../../models';
5
5
  /**
6
6
  * Parameters for {@link useGetDashboardModels} hook.
7
7
  */
@@ -1,5 +1,5 @@
1
1
  import { Filter } from '@sisense/sdk-data';
2
- import { ChartDataOptions, PivotTableDataOptions, TableDataOptions } from '../../chart-data-options/types';
2
+ import { ChartDataOptions, PivotTableDataOptions } from '../../chart-data-options/types';
3
3
  import { Panel, WidgetDto, WidgetType } from '../../dashboard-widget/types';
4
4
  import { ChartProps, ChartWidgetProps, PivotTableProps, TableProps, TableWidgetProps, PivotTableWidgetProps } from '../../props';
5
5
  import { ExecutePivotQueryParams, ExecuteQueryParams } from '../../query-execution';
@@ -7,7 +7,7 @@ import { ChartType, DrilldownOptions, ChartStyleOptions, TableStyleOptions, Comp
7
7
  /**
8
8
  * Widget data options.
9
9
  */
10
- export type WidgetDataOptions = ChartDataOptions | TableDataOptions | PivotTableDataOptions;
10
+ export type WidgetDataOptions = ChartDataOptions | PivotTableDataOptions;
11
11
  /**
12
12
  * Model of Sisense widget defined in the abstractions of Compose SDK.
13
13
  *
@@ -144,7 +144,7 @@ export declare class WidgetModel {
144
144
  * <ChartWidget {...widget.getChartWidgetProps()} />
145
145
  * ```
146
146
  *
147
- * Note: this method is not supported for tabular widgets.
147
+ * Note: this method is not supported for pivot widgets.
148
148
  */
149
149
  getChartWidgetProps(): ChartWidgetProps;
150
150
  /**
@@ -0,0 +1,2 @@
1
+ import type { HeaderCellFormatter } from '../types.js';
2
+ export declare const createHeaderCellHighlightFormatter: () => HeaderCellFormatter;
@@ -1,4 +1,4 @@
1
- import type { JaqlPanel, PivotDataNode, PivotTreeNode } from '@sisense/sdk-pivot-client';
1
+ import type { JaqlPanel, JaqlRequest, PivotDataNode, PivotTreeNode } from '@sisense/sdk-pivot-client';
2
2
  export type DataCellFormatter = (cell: PivotDataNode, rowItem: PivotTreeNode, columnItem: PivotTreeNode, jaqlPanelItem: JaqlPanel) => void;
3
- export type HeaderCellFormatter = (cell: PivotTreeNode, jaqlPanelItem: JaqlPanel) => void;
3
+ export type HeaderCellFormatter = (cell: PivotTreeNode, jaqlPanelItem: JaqlPanel, jaql: JaqlRequest) => void;
4
4
  export type DateFormatter = (date: Date, format: string) => string;
@@ -17,4 +17,5 @@ export declare function preparePivotStylingProps(styleOptions?: PivotTableStyleO
17
17
  isAutoHeight: boolean;
18
18
  navigationPrimaryColor: string | undefined;
19
19
  navigationSecondaryColor: string | undefined;
20
+ selectionColor: string;
20
21
  };
@@ -78,6 +78,6 @@ import { PivotTableProps } from '../props';
78
78
  * @param props - Pivot Table properties
79
79
  * @returns Pivot Table component
80
80
  * @group Data Grids
81
- * @alpha
81
+ * @beta
82
82
  */
83
83
  export declare const PivotTable: React.FunctionComponent<PivotTableProps>;
@@ -8,10 +8,11 @@ export declare const getPivotQueryOptions: (dataOptions: PivotTableDataOptionsIn
8
8
  *
9
9
  * @internal
10
10
  */
11
- export declare const useGetPivotTableQuery: ({ dataSet, dataOptionsInternal, filters, refreshCounter, }: {
11
+ export declare const useGetPivotTableQuery: ({ dataSet, dataOptionsInternal, filters, highlights, refreshCounter, }: {
12
12
  dataSet?: DataSource | undefined;
13
13
  dataOptionsInternal: PivotTableDataOptionsInternal;
14
14
  filters?: Filter[] | FilterRelations | undefined;
15
+ highlights?: Filter[] | undefined;
15
16
  refreshCounter?: number | undefined;
16
17
  }) => {
17
18
  isLoading: boolean;
package/dist/props.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Attribute, Filter, Measure, DataSource, Data, QueryResultData, FilterRelations } from '@sisense/sdk-data';
2
- import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, ChartStyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, TableStyleOptions, ThemeOid, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection, SunburstStyleOptions, ChartWidgetStyleOptions, TableWidgetStyleOptions, DashboardWidgetStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, DataPoint, ScatterDataPoint, AreamapDataPoint, BoxplotDataPoint, ChartDataPoints, ScattermapDataPoint, PivotTableStyleOptions, PivotTableWidgetStyleOptions } from './types';
2
+ import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, ChartStyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, ThemeOid, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection, SunburstStyleOptions, ChartWidgetStyleOptions, TableWidgetStyleOptions, DashboardWidgetStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, DataPoint, ScatterDataPoint, AreamapDataPoint, BoxplotDataPoint, ChartDataPoints, ScattermapDataPoint, PivotTableStyleOptions, PivotTableWidgetStyleOptions, RegularChartType, RegularChartStyleOptions, TabularChartStyleOptions, TableStyleOptions, AreaRangeStyleOptions } 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, PivotTableDataOptions } from './chart-data-options/types';
5
+ import { IndicatorChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, ScatterChartDataOptions, TableDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions, PivotTableDataOptions, RegularChartDataOptions, TabularChartDataOptions, RangeChartDataOptions } from './chart-data-options/types';
6
6
  import { AppConfig } from './app/client-application';
7
7
  import { ExecuteQueryParams, QueryByWidgetIdState } from './query-execution';
8
8
  import { FiltersMergeStrategy } from './dashboard-widget/types';
@@ -100,6 +100,12 @@ export interface ExecuteQueryProps {
100
100
  count?: number;
101
101
  /** {@inheritDoc ExecuteQueryParams.offset} */
102
102
  offset?: number;
103
+ /**
104
+ * {@inheritDoc ExecuteQueryParams.ungroup}
105
+ *
106
+ * @internal
107
+ */
108
+ ungroup?: boolean;
103
109
  /** Function as child component that is called to render the query results */
104
110
  children?: (queryResult: ExecuteQueryResult) => ReactNode;
105
111
  /** Callback function that is evaluated when query results are ready */
@@ -486,6 +492,26 @@ export interface ChartProps extends BaseChartProps, ChartEventProps {
486
492
  */
487
493
  refreshCounter?: number;
488
494
  }
495
+ /**
496
+ * Props of the {@link RegularChart} component.
497
+ *
498
+ * @internal
499
+ */
500
+ export interface RegularChartProps extends ChartProps {
501
+ chartType: RegularChartType;
502
+ dataOptions: RegularChartDataOptions;
503
+ styleOptions?: RegularChartStyleOptions;
504
+ }
505
+ /**
506
+ * Props of the tabular charts ({@link TableComponent}).
507
+ *
508
+ * @internal
509
+ */
510
+ export interface TabularChartProps extends ChartProps {
511
+ chartType: 'table';
512
+ dataOptions: TabularChartDataOptions;
513
+ styleOptions?: TabularChartStyleOptions;
514
+ }
489
515
  /**
490
516
  * Props of the {@link AreaChart} component.
491
517
  */
@@ -698,6 +724,12 @@ export interface PivotTableProps {
698
724
  * @category Data
699
725
  */
700
726
  filters?: Filter[] | FilterRelations;
727
+ /**
728
+ * Filters that will highlight query results
729
+ *
730
+ * @category Data
731
+ */
732
+ highlights?: Filter[];
701
733
  /**
702
734
  * Configurations for how to style and present a pivot table's data.
703
735
  *
@@ -978,6 +1010,12 @@ export interface PivotTableWidgetProps {
978
1010
  * @category Data
979
1011
  */
980
1012
  filters?: Filter[] | FilterRelations;
1013
+ /**
1014
+ * Filters that will highlight query results
1015
+ *
1016
+ * @category Data
1017
+ */
1018
+ highlights?: Filter[];
981
1019
  /**
982
1020
  * Configurations for how to interpret and present the data passed to the table
983
1021
  *
@@ -1134,6 +1172,23 @@ export interface AreamapChartProps extends BaseChartProps, AreamapChartEventProp
1134
1172
  */
1135
1173
  styleOptions?: AreamapStyleOptions;
1136
1174
  }
1175
+ /**
1176
+ * Props of the {@link AreaRangeChart} component.
1177
+ */
1178
+ export interface AreaRangeChartProps extends BaseChartProps, HighchartsBasedChartEventProps, RegularChartEventProps {
1179
+ /**
1180
+ * Configurations for how to interpret and present the data passed to the chart
1181
+ *
1182
+ * @category Chart
1183
+ */
1184
+ dataOptions: RangeChartDataOptions;
1185
+ /**
1186
+ * Configurations for how to style and present a chart's data.
1187
+ *
1188
+ * @category Chart
1189
+ */
1190
+ styleOptions?: AreaRangeStyleOptions;
1191
+ }
1137
1192
  /**
1138
1193
  * Props for ContextMenu component.
1139
1194
  */
@@ -1,4 +1,3 @@
1
- import type { Locale } from 'date-fns';
2
1
  export type DateFormat = string;
3
2
  declare const dateLevels: readonly ["years", "quarters", "months", "weeks", "days", "dateAndTime", "minutes"];
4
3
  /** @expandType */
@@ -1,4 +1,3 @@
1
- import type { Locale } from 'date-fns';
2
1
  import { Data } from '@sisense/sdk-data';
3
2
  import type { DateConfig } from './date-formats';
4
3
  import type { QueryResultData } from '@sisense/sdk-data';
@@ -1,8 +1,2 @@
1
1
  import { ExecuteQueryParams } from '../index.js';
2
- /**
3
- * Checks if the query parameters have changed by deep comparison.
4
- *
5
- * @param prevParams - Previous query parameters
6
- * @param newParams - New query parameters
7
- */
8
- export declare function isQueryParamsChanged(prevParams: ExecuteQueryParams | undefined, newParams: ExecuteQueryParams): boolean;
2
+ export declare function useQueryParamsChanged(params: ExecuteQueryParams): boolean;
@@ -194,6 +194,16 @@ export interface ExecuteQueryParams {
194
194
  * If not specified, the default value is `true`
195
195
  */
196
196
  enabled?: boolean;
197
+ /**
198
+ * Boolean flag whether to include `ungroup: true` in non-aggregated JAQL queries.
199
+ *
200
+ * This improves computation and performance of querying huge tables when no aggregation is needed
201
+ *
202
+ * If not specified, the default value is `false`
203
+ *
204
+ * @internal
205
+ */
206
+ ungroup?: boolean;
197
207
  /**
198
208
  * Sync or async callback that allows to modify the JAQL payload before it is sent to the server.
199
209
  *
@@ -326,7 +336,7 @@ export interface ExecutePivotQueryParams {
326
336
  */
327
337
  filters?: Filter[] | FilterRelations;
328
338
  /**
329
- * Highlight filters that will highlight results that pass filter criteria
339
+ * Filters that will highlight query results
330
340
  *
331
341
  * @category Filtering
332
342
  */
@@ -17,7 +17,7 @@ import { ExecutePivotQueryParams, PivotQueryState } from './types';
17
17
  * @param params - Parameters of the query
18
18
  * @returns Query state that contains the status of the query execution, the result data, or the error if any occurred
19
19
  * @group Queries
20
- * @alpha
20
+ * @beta
21
21
  */
22
22
  export declare const useExecutePivotQuery: (params: ExecutePivotQueryParams) => PivotQueryState;
23
23
  /**
@@ -29,9 +29,6 @@ export declare function useExecutePivotQueryInternal(params: ExecutePivotQueryPa
29
29
  /**
30
30
  * Checks if the query parameters have changed by deep comparison.
31
31
  *
32
- * TODO refactor to reuse isQueryParamsChanged
33
- *
34
- * @param prevParams - Previous query parameters
35
- * @param newParams - New query parameters
32
+ * @param params - New query parameters
36
33
  */
37
- export declare function isPivotQueryParamsChanged(prevParams: ExecutePivotQueryParams | undefined, newParams: ExecutePivotQueryParams): boolean;
34
+ export declare function usePivotQueryParamsChanged(params: ExecutePivotQueryParams): boolean;
@@ -39,12 +39,11 @@ export declare const useExecuteQueryByWidgetId: (params: ExecuteQueryByWidgetIdP
39
39
  */
40
40
  export declare function useExecuteQueryByWidgetIdInternal(params: ExecuteQueryByWidgetIdParams): QueryByWidgetIdState;
41
41
  /**
42
- * Checks if the parameters have changed by deep comparison.
42
+ * Checks if the query parameters have changed by deep comparison.
43
43
  *
44
- * @param prevParams - Previous query parameters
45
- * @param newParams - New query parameters
44
+ * @param params - New query parameters
46
45
  */
47
- export declare function isParamsChanged(prevParams: ExecuteQueryByWidgetIdParams | undefined, newParams: ExecuteQueryByWidgetIdParams): boolean;
46
+ export declare function useParamsChanged(params: ExecuteQueryByWidgetIdParams): boolean;
48
47
  /** @internal */
49
48
  export declare function executeQueryByWidgetId({ widgetOid, dashboardOid, filters, highlights, filtersMergeStrategy, count, offset, includeDashboardFilters, app, onBeforeQuery, }: ExecuteQueryByWidgetIdParams & {
50
49
  app: ClientApplication;
@@ -17,6 +17,5 @@ import { ScattermapChartProps } from './props';
17
17
  * @param props - Scattermap chart properties
18
18
  * @returns Scattermap Chart component
19
19
  * @group Charts
20
- * @beta
21
20
  */
22
21
  export declare const ScattermapChart: import("react").FunctionComponent<ScattermapChartProps>;
@@ -1,15 +1,15 @@
1
1
  import { ChartDataOptionsInternal } from '../chart-data-options/types';
2
2
  import { ChartData } from '../chart-data/types';
3
3
  import { BeforeRenderHandler } from '../props';
4
- import { ChartDesignOptions } from '../chart-options-processor/translations/types';
5
- import { ChartType, CompleteThemeSettings } from '../types';
4
+ import { BoxplotChartType, CartesianChartType, CategoricalChartType, ChartDesignOptions, ScatterChartType } from '../chart-options-processor/translations/types';
5
+ import { ChartType } from '../types';
6
6
  import { SisenseChartDataPointEventHandler, SisenseChartDataPointsEventHandler } from './types';
7
+ import { ChartRendererProps } from '../chart/types';
7
8
  export interface SisenseChartProps {
8
- chartType: ChartType;
9
+ chartType: SisenseChartType;
9
10
  chartData: ChartData;
10
11
  dataOptions: ChartDataOptionsInternal;
11
12
  designOptions: ChartDesignOptions;
12
- themeSettings?: CompleteThemeSettings;
13
13
  onDataPointClick?: SisenseChartDataPointEventHandler;
14
14
  onDataPointContextMenu?: SisenseChartDataPointEventHandler;
15
15
  onDataPointsSelected?: SisenseChartDataPointsEventHandler;
@@ -18,4 +18,7 @@ export interface SisenseChartProps {
18
18
  /**
19
19
  * @internal
20
20
  */
21
- export declare const SisenseChart: ({ chartType, chartData, dataOptions, designOptions, themeSettings, onDataPointClick, onDataPointContextMenu, onDataPointsSelected, onBeforeRender, }: SisenseChartProps) => import("react/jsx-runtime").JSX.Element | null;
21
+ export declare const SisenseChart: ({ chartType, chartData, dataOptions, designOptions, onDataPointClick, onDataPointContextMenu, onDataPointsSelected, onBeforeRender, }: SisenseChartProps) => import("react/jsx-runtime").JSX.Element | null;
22
+ export declare const isSisenseChartType: (chartType: ChartType) => chartType is SisenseChartType;
23
+ export type SisenseChartType = CartesianChartType | CategoricalChartType | ScatterChartType | BoxplotChartType;
24
+ export declare const isSisenseChartProps: (props: ChartRendererProps) => props is SisenseChartProps;
@@ -0,0 +1,8 @@
1
+ import { TableProps } from '../props';
2
+ /**
3
+ * Component that renders a table with aggregation and pagination.
4
+ */
5
+ export declare const TableComponent: ({ dataSet, dataOptions, styleOptions, filters, refreshCounter, }: TableProps) => import("react/jsx-runtime").JSX.Element | null;
6
+ export declare const DEFAULT_TABLE_ROWS_PER_PAGE: 25;
7
+ /** How many pages of data will be loaded in one query */
8
+ export declare const PAGES_BATCH_SIZE = 10;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { TableProps } from '../props';
3
3
  /**
4
4
  * Table with aggregation and pagination.
@@ -18,7 +18,7 @@ import { TableProps } from '../props';
18
18
  * @returns Table component
19
19
  * @group Data Grids
20
20
  */
21
- export declare const Table: React.FunctionComponent<TableProps>;
21
+ export declare const Table: import("react").FunctionComponent<TableProps>;
22
22
  export declare const DEFAULT_TABLE_ROWS_PER_PAGE: 25;
23
23
  /** How many pages of data will be loaded in one query */
24
24
  export declare const PAGES_BATCH_SIZE = 10;
@@ -0,0 +1,3 @@
1
+ import { TableStyleOptions } from '../../types';
2
+ import { TableDesignOptions } from '../../chart-options-processor/translations/design-options';
3
+ export declare const translateTableStyleOptionsToDesignOptions: (styleOptions: TableStyleOptions) => TableDesignOptions;
@@ -20,6 +20,7 @@ export declare const translation: {
20
20
  themeNotFound: string;
21
21
  paletteNotFound: string;
22
22
  chartTypeNotSupported: string;
23
+ chartInvalidProps: string;
23
24
  unsupportedWidgetType: string;
24
25
  sisenseContextNotFound: string;
25
26
  dashboardInvalidIdentifier: string;
@@ -28,13 +29,13 @@ export declare const translation: {
28
29
  failedToFetch: string;
29
30
  };
30
31
  widgetModel: {
31
- tabularWidgetNotSupported: string;
32
32
  pivotWidgetNotSupported: string;
33
33
  onlyTableWidgetSupported: string;
34
34
  onlyPivotWidgetSupported: string;
35
35
  };
36
36
  unknownFilterInFilterRelations: string;
37
37
  filterRelationsNotSupported: string;
38
+ invalidFilterType: string;
38
39
  };
39
40
  errorBoxText: string;
40
41
  chartNoData: string;
@@ -85,5 +86,15 @@ export declare const translation: {
85
86
  max: string;
86
87
  };
87
88
  };
89
+ arearange: {
90
+ tooltip: {
91
+ min: string;
92
+ max: string;
93
+ };
94
+ };
95
+ unsupportedFilter: {
96
+ title: string;
97
+ message: string;
98
+ };
88
99
  };
89
100
  export type TranslationDictionary = typeof translation;
@@ -24,6 +24,7 @@ export declare const resources: {
24
24
  themeNotFound: string;
25
25
  paletteNotFound: string;
26
26
  chartTypeNotSupported: string;
27
+ chartInvalidProps: string;
27
28
  unsupportedWidgetType: string;
28
29
  sisenseContextNotFound: string;
29
30
  dashboardInvalidIdentifier: string;
@@ -32,13 +33,13 @@ export declare const resources: {
32
33
  failedToFetch: string;
33
34
  };
34
35
  widgetModel: {
35
- tabularWidgetNotSupported: string;
36
36
  pivotWidgetNotSupported: string;
37
37
  onlyTableWidgetSupported: string;
38
38
  onlyPivotWidgetSupported: string;
39
39
  };
40
40
  unknownFilterInFilterRelations: string;
41
41
  filterRelationsNotSupported: string;
42
+ invalidFilterType: string;
42
43
  };
43
44
  errorBoxText: string;
44
45
  chartNoData: string;
@@ -89,6 +90,16 @@ export declare const resources: {
89
90
  max: string;
90
91
  };
91
92
  };
93
+ arearange: {
94
+ tooltip: {
95
+ min: string;
96
+ max: string;
97
+ };
98
+ };
99
+ unsupportedFilter: {
100
+ title: string;
101
+ message: string;
102
+ };
92
103
  };
93
104
  uk: {
94
105
  errors: {
@@ -112,6 +123,7 @@ export declare const resources: {
112
123
  themeNotFound: string;
113
124
  paletteNotFound: string;
114
125
  chartTypeNotSupported: string;
126
+ chartInvalidProps: string;
115
127
  unsupportedWidgetType: string;
116
128
  sisenseContextNotFound: string;
117
129
  dashboardInvalidIdentifier: string;
@@ -120,13 +132,13 @@ export declare const resources: {
120
132
  failedToFetch: string;
121
133
  };
122
134
  widgetModel: {
123
- tabularWidgetNotSupported: string;
124
135
  pivotWidgetNotSupported: string;
125
136
  onlyTableWidgetSupported: string;
126
137
  onlyPivotWidgetSupported: string;
127
138
  };
128
139
  unknownFilterInFilterRelations: string;
129
140
  filterRelationsNotSupported: string;
141
+ invalidFilterType: string;
130
142
  };
131
143
  errorBoxText: string;
132
144
  chartNoData: string;
@@ -177,5 +189,15 @@ export declare const resources: {
177
189
  max: string;
178
190
  };
179
191
  };
192
+ arearange: {
193
+ tooltip: {
194
+ min: string;
195
+ max: string;
196
+ };
197
+ };
198
+ unsupportedFilter: {
199
+ title: string;
200
+ message: string;
201
+ };
180
202
  };
181
203
  };