@sisense/sdk-ui 1.5.0 → 1.7.0

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