@sisense/sdk-ui 1.15.1 → 1.17.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 (113) hide show
  1. package/dist/ai.cjs +50 -50
  2. package/dist/ai.js +133 -132
  3. package/dist/analytics-composer/index.d.ts +1 -0
  4. package/dist/analytics-composer/translators/code-templates.d.ts +11 -0
  5. package/dist/analytics-composer/translators/generate-code.d.ts +18 -0
  6. package/dist/analytics-composer/translators/index.d.ts +3 -0
  7. package/dist/analytics-composer/translators/model-translator.d.ts +48 -0
  8. package/dist/analytics-composer/translators/query-templates.d.ts +1 -0
  9. package/dist/analytics-composer/translators/query-translator.d.ts +134 -0
  10. package/dist/analytics-composer/translators/translate-filters-to-code.d.ts +2 -0
  11. package/dist/analytics-composer/translators/translate-props-to-code.d.ts +8 -0
  12. package/dist/analytics-composer/translators/types.d.ts +95 -0
  13. package/dist/analytics-composer/translators/utils.d.ts +13 -0
  14. package/dist/analytics-composer.cjs +239 -0
  15. package/dist/analytics-composer.d.ts +1 -0
  16. package/dist/analytics-composer.js +5435 -0
  17. package/dist/api/rest-api.d.ts +5 -0
  18. package/dist/api/types/dashboard-dto.d.ts +8 -0
  19. package/dist/api/types/palette-dto.d.ts +9 -0
  20. package/dist/app/client-application.d.ts +22 -2
  21. package/dist/app/settings/settings.d.ts +5 -0
  22. package/dist/app/settings/types/features.d.ts +6 -0
  23. package/dist/chart/advanced-chart.d.ts +7 -0
  24. package/dist/chart-data/advanced-analytics-data.d.ts +50 -0
  25. package/dist/chart-data/types.d.ts +2 -1
  26. package/dist/chart-data-options/types.d.ts +35 -4
  27. package/dist/chart-data-processor/table-processor.d.ts +1 -1
  28. package/dist/chart-options-processor/advanced-chart-options.d.ts +24 -0
  29. package/dist/chart-options-processor/cartesian-chart-options.d.ts +2 -1
  30. package/dist/chart-options-processor/chart-options-service.d.ts +5 -0
  31. package/dist/chart-options-processor/common-highcharts-option-service.d.ts +2 -1
  32. package/dist/chart-options-processor/translations/axis-section.d.ts +2 -2
  33. package/dist/chart-options-processor/translations/legend-section.d.ts +2 -0
  34. package/dist/chart-options-processor/translations/tooltip-utils.d.ts +1 -0
  35. package/dist/chart-options-processor/translations/tooltip.d.ts +4 -2
  36. package/dist/charts/map-charts/scattermap/utils/map.d.ts +6 -2
  37. package/dist/charts/map-charts/scattermap/utils/markers.d.ts +1 -1
  38. package/dist/charts/table/data-table-wrapper.d.ts +1 -1
  39. package/dist/charts/table/helpers/calc-column-widths.d.ts +1 -1
  40. package/dist/charts/table/types.d.ts +0 -1
  41. package/dist/common/components/loading-indicator.d.ts +27 -0
  42. package/dist/common/hooks/use-has-changed.d.ts +1 -1
  43. package/dist/common/hooks/use-tracking.d.ts +7 -0
  44. package/dist/common-filters/cascading-utils.d.ts +30 -0
  45. package/dist/common-filters/common-filters-connector.d.ts +7 -1
  46. package/dist/common-filters/selection-utils.d.ts +1 -1
  47. package/dist/common-filters/types.d.ts +17 -6
  48. package/dist/common-filters/utils.d.ts +2 -5
  49. package/dist/dashboard/dashboard-by-id.d.ts +8 -3
  50. package/dist/dashboard/dashboard.d.ts +8 -4
  51. package/dist/dashboard/index.d.ts +1 -1
  52. package/dist/dashboard/types.d.ts +13 -7
  53. package/dist/dashboard-widget/dashboard-widget.d.ts +2 -0
  54. package/dist/dashboard-widget/translate-widget-data-options.d.ts +1 -1
  55. package/dist/dashboard-widget/translate-widget-drilldown-options.d.ts +2 -2
  56. package/dist/dashboard-widget/translate-widget-style-options.d.ts +11 -2
  57. package/dist/dashboard-widget/types.d.ts +29 -8
  58. package/dist/dashboard-widget/utils.d.ts +8 -0
  59. package/dist/decorators/component-decorators/with-tracking/error-tracker.d.ts +3 -0
  60. package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +1 -0
  61. package/dist/filters/components/filters-panel/filters-panel.d.ts +2 -1
  62. package/dist/get-widget-options-D4UHj7o5.cjs +198 -0
  63. package/dist/get-widget-options-D88MkBTJ.js +37924 -0
  64. package/dist/index.cjs +183 -208
  65. package/dist/index.d.ts +3 -3
  66. package/dist/index.js +20621 -24251
  67. package/dist/models/dashboard/dashboard-model.d.ts +10 -2
  68. package/dist/models/dashboard/get-dashboard-model.d.ts +13 -2
  69. package/dist/models/dashboard/types.d.ts +21 -2
  70. package/dist/models/dashboard/use-get-dashboard-model.d.ts +2 -0
  71. package/dist/models/dashboard/use-get-dashboard-models.d.ts +2 -0
  72. package/dist/models/widget/get-widget-model.d.ts +13 -2
  73. package/dist/models/widget/translate-widget.d.ts +10 -1
  74. package/dist/models/widget/use-get-widget-model.d.ts +2 -0
  75. package/dist/models/widget/widget-model.d.ts +5 -3
  76. package/dist/pivot-table/helpers/prepare-pivot-styling-props.d.ts +16 -15
  77. package/dist/pivot-table/{use-apply-pivot-table-formatting.d.ts → hooks/use-apply-pivot-table-formatting.d.ts} +1 -1
  78. package/dist/pivot-table/{use-get-pivot-table-query.d.ts → hooks/use-get-pivot-table-query.d.ts} +4 -8
  79. package/dist/pivot-table/hooks/use-pivot-data-loading.d.ts +15 -0
  80. package/dist/pivot-table/hooks/use-pivot-data-service.d.ts +10 -0
  81. package/dist/pivot-table/{use-pivot-table-data-options-internal.d.ts → hooks/use-pivot-table-data-options-internal.d.ts} +2 -2
  82. package/dist/pivot-table/hooks/use-render-pivot.d.ts +24 -0
  83. package/dist/pivot-table/pivot-table.d.ts +2 -2
  84. package/dist/props.d.ts +45 -10
  85. package/dist/query-execution/execute-query-by-widget-id.d.ts +2 -0
  86. package/dist/query-execution/index.d.ts +1 -1
  87. package/dist/query-execution/types.d.ts +11 -2
  88. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +5 -5
  89. package/dist/sisense-context/sisense-context.d.ts +2 -0
  90. package/dist/theme-provider/default-theme-settings.d.ts +2 -0
  91. package/dist/themes/legacy-design-settings.d.ts +14 -0
  92. package/dist/translation/resources/en.d.ts +9 -0
  93. package/dist/translation/resources/index.d.ts +18 -0
  94. package/dist/types.d.ts +89 -9
  95. package/dist/useQuery-C6PPvTP0.js +43462 -0
  96. package/dist/useQuery-ChZNmTT3.cjs +433 -0
  97. package/dist/utils/color/color-interpolation.d.ts +9 -0
  98. package/dist/utils/combine-handlers.d.ts +3 -0
  99. package/dist/utils/filters.d.ts +14 -0
  100. package/dist/widgets/common/drilldown-connector.d.ts +19 -0
  101. package/dist/widgets/common/{custom-drilldown.d.ts → use-drilldown.d.ts} +7 -3
  102. package/dist/widgets/common/widget-container.d.ts +2 -2
  103. package/dist/widgets/common/widget-header-info-button.d.ts +2 -2
  104. package/dist/widgets/common/widget-header.d.ts +2 -2
  105. package/dist/widgets/common/widget-style-utils.d.ts +5 -4
  106. package/dist/widgets/use-highlight-selection.d.ts +10 -0
  107. package/package.json +18 -9
  108. package/dist/filters/utils.d.ts +0 -7
  109. package/dist/useQuery-B-49RH93.js +0 -76791
  110. package/dist/useQuery-C2MQvc4S.cjs +0 -603
  111. package/dist/widgets/chart-widget-deprecated.d.ts +0 -30
  112. package/dist/widgets/common/drilldown.d.ts +0 -25
  113. package/dist/widgets/common/use-widget-drilldown.d.ts +0 -2
@@ -1,9 +1,10 @@
1
1
  import { DataSource, Filter } from '@sisense/sdk-data';
2
- import { Layout, WidgetModel } from '../../models';
2
+ import { DashboardStyleOptions, Layout, WidgetModel } from '../../models';
3
3
  import type { DashboardDto } from '../../api/types/dashboard-dto';
4
4
  import { DashboardProps } from '../../dashboard/types';
5
5
  import { type WidgetFilterOptions } from './types';
6
6
  import { CompleteThemeSettings } from '../../types';
7
+ import { AppSettings } from '../../app/settings/settings';
7
8
  /**
8
9
  * Model of Sisense dashboard defined in the abstractions of Compose SDK.
9
10
  *
@@ -33,6 +34,12 @@ export declare class DashboardModel {
33
34
  * @internal
34
35
  */
35
36
  layout: Layout;
37
+ /**
38
+ * Dashboard style options.
39
+ *
40
+ * @internal
41
+ */
42
+ styleOptions: DashboardStyleOptions;
36
43
  /**
37
44
  * Dashboard filters.
38
45
  *
@@ -50,9 +57,10 @@ export declare class DashboardModel {
50
57
  *
51
58
  * @param dashboardDto - The widget DTO to be converted to a widget model
52
59
  * @param themeSettings - Optional theme settings
60
+ * @param appSettings - Optional application settings
53
61
  * @internal
54
62
  */
55
- constructor(dashboardDto: DashboardDto, themeSettings?: CompleteThemeSettings);
63
+ constructor(dashboardDto: DashboardDto, themeSettings?: CompleteThemeSettings, appSettings?: AppSettings);
56
64
  /**
57
65
  * Returns the props to be used for rendering a dashboard.
58
66
  *
@@ -1,6 +1,7 @@
1
1
  import { HttpClient } from '@sisense/sdk-rest-client';
2
2
  import { DashboardModel } from '../../models/dashboard/dashboard-model';
3
3
  import { CompleteThemeSettings } from '../../types';
4
+ import { AppSettings } from '../../app/settings/settings';
4
5
  export interface GetDashboardModelOptions {
5
6
  /**
6
7
  * Boolean flag whether to include widgets in the dashboard model
@@ -17,5 +18,15 @@ export interface GetDashboardModelOptions {
17
18
  */
18
19
  includeFilters?: boolean;
19
20
  }
20
- /** @internal */
21
- export declare function getDashboardModel(http: HttpClient, dashboardOid: string, options?: GetDashboardModelOptions, themeSettings?: CompleteThemeSettings): Promise<DashboardModel>;
21
+ /**
22
+ * Retrieves a dashboard model by its OID.
23
+ *
24
+ * @param http - The HTTP client
25
+ * @param dashboardOid - The OID of the dashboard
26
+ * @param options - The options to include widgets and filters in the dashboard model
27
+ * @param themeSettings - Optional theme settings
28
+ * @param appSettings - Optional application settings
29
+ * @returns The dashboard model
30
+ * @internal
31
+ */
32
+ export declare function getDashboardModel(http: HttpClient, dashboardOid: string, options?: GetDashboardModelOptions, themeSettings?: CompleteThemeSettings, appSettings?: AppSettings): Promise<DashboardModel>;
@@ -1,5 +1,9 @@
1
1
  import { CommonFiltersOptions } from '../../common-filters/types';
2
- /** @internal */
2
+ import { ColorPaletteTheme } from '../../types';
3
+ export type { CommonFiltersOptions, CommonFiltersApplyMode, FiltersIgnoringRules, } from '../../common-filters/types';
4
+ /**
5
+ * Layout of a dashboard.
6
+ */
3
7
  export interface Layout {
4
8
  columns: {
5
9
  widthPercentage: number;
@@ -12,5 +16,20 @@ export interface Layout {
12
16
  }[];
13
17
  }[];
14
18
  }
15
- /** @internal */
19
+ /**
20
+ * Options for how common filters defined at the dashboard level should be applied to widgets.
21
+ */
16
22
  export type WidgetFilterOptions = Record<string, CommonFiltersOptions>;
23
+ /**
24
+ * Style options for the dashboard.
25
+ */
26
+ export type DashboardStyleOptions = {
27
+ /** Collection of colors used to color various elements */
28
+ palette?: ColorPaletteTheme;
29
+ /** Background color */
30
+ backgroundColor?: string;
31
+ /** Width of the divider line between widgets */
32
+ dividerLineWidth?: number;
33
+ /** Divider line color */
34
+ dividerLineColor?: string;
35
+ };
@@ -69,6 +69,8 @@ export type DashboardModelSuccessState = {
69
69
  /**
70
70
  * React hook that retrieves an existing dashboard model from the Sisense instance.
71
71
  *
72
+ * **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
73
+ *
72
74
  * @example
73
75
  * An example of retrieving an existing dashboard model from the Sisense instance and render its widgets with component `DashboardWidget`:
74
76
  ```tsx
@@ -65,6 +65,8 @@ export type DashboardModelsSuccessState = {
65
65
  /**
66
66
  * React hook that retrieves existing dashboards that the user can access to from the Sisense instance.
67
67
  *
68
+ * **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
69
+ *
68
70
  * @example
69
71
  ```tsx
70
72
  const { dashboards, isLoading, isError } = useGetDashboardModels();
@@ -1,5 +1,16 @@
1
1
  import { HttpClient } from '@sisense/sdk-rest-client';
2
2
  import { WidgetModel } from './widget-model';
3
3
  import { CompleteThemeSettings } from '../../types';
4
- /** @internal */
5
- export declare function getWidgetModel(httpClient: HttpClient, dashboardOid: string, widgetOid: string, themeSettings?: CompleteThemeSettings): Promise<WidgetModel>;
4
+ import { AppSettings } from '../../app/settings/settings';
5
+ /**
6
+ * Retrieves a widget model by its OID.
7
+ *
8
+ * @param httpClient - The HTTP client
9
+ * @param dashboardOid - The OID of the dashboard
10
+ * @param widgetOid - The OID of the widget
11
+ * @param themeSettings - Optional theme settings
12
+ * @param appSettings - Optional application settings
13
+ * @returns The widget model
14
+ * @internal
15
+ */
16
+ export declare function getWidgetModel(httpClient: HttpClient, dashboardOid: string, widgetOid: string, themeSettings?: CompleteThemeSettings, appSettings?: AppSettings): Promise<WidgetModel>;
@@ -2,5 +2,14 @@ import { CompleteThemeSettings } from '../../types';
2
2
  import { WidgetDto, WidgetType } from '../../dashboard-widget/types';
3
3
  import { WidgetTypeInternal } from './types';
4
4
  import { WidgetModel } from './widget-model';
5
- export declare function translateWidget(widget: WidgetDto, themeSettings?: CompleteThemeSettings): WidgetModel;
5
+ import { AppSettings } from '../../app/settings/settings';
6
+ /**
7
+ * Translates a widget DTO to a widget model.
8
+ *
9
+ * @param widget - The widget DTO to be converted to a widget model
10
+ * @param themeSettings - Optional theme settings
11
+ * @param appSettings - Optional application settings
12
+ * @returns The widget model
13
+ */
14
+ export declare function translateWidget(widget: WidgetDto, themeSettings?: CompleteThemeSettings, appSettings?: AppSettings): WidgetModel;
6
15
  export declare function translateWidgetType(widgetType: WidgetType): WidgetTypeInternal;
@@ -71,6 +71,8 @@ export type WidgetModelSuccessState = {
71
71
  /**
72
72
  * React hook that retrieves an existing widget model from a Fusion Embed instance.
73
73
  *
74
+ * **Note:** Widget extensions based on JS scripts and add-ons in Fusion are not supported.
75
+ *
74
76
  * ## Example
75
77
  *
76
78
  * Retrieve a widget model and use it to populate a `Chart` component
@@ -3,7 +3,8 @@ import { ChartDataOptions, PivotTableDataOptions } from '../../chart-data-option
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';
6
- import { ChartType, DrilldownOptions, ChartStyleOptions, TableStyleOptions, CompleteThemeSettings, RenderToolbarHandler } from '../../types';
6
+ import { ChartType, DrilldownOptions, CompleteThemeSettings, RenderToolbarHandler, WidgetStyleOptions } from '../../types';
7
+ import { AppSettings } from '../../app/settings/settings';
7
8
  /**
8
9
  * Widget data options.
9
10
  */
@@ -48,7 +49,7 @@ export declare class WidgetModel {
48
49
  /**
49
50
  * Widget style options.
50
51
  */
51
- styleOptions: ChartStyleOptions | TableStyleOptions;
52
+ styleOptions: WidgetStyleOptions;
52
53
  /**
53
54
  * Widget filters.
54
55
  */
@@ -82,9 +83,10 @@ export declare class WidgetModel {
82
83
  *
83
84
  * @param widgetDto - The widget DTO to be converted to a widget model
84
85
  * @param themeSettings - The theme settings to be used for the widget model
86
+ * @param appSettings - The application settings to be used for the widget model
85
87
  * @internal
86
88
  */
87
- constructor(widgetDto: WidgetDto, themeSettings?: CompleteThemeSettings);
89
+ constructor(widgetDto: WidgetDto, themeSettings?: CompleteThemeSettings, appSettings?: AppSettings);
88
90
  /**
89
91
  * Returns the parameters to be used for executing a query for the widget.
90
92
  *
@@ -1,21 +1,22 @@
1
1
  import { CompleteThemeSettings, PivotTableStyleOptions } from '../../types';
2
- export declare function preparePivotStylingProps(styleOptions?: PivotTableStyleOptions, themeSettings?: CompleteThemeSettings): {
3
- fontFamily: string | undefined;
4
- textColor: string | undefined;
5
- backgroundColor: string | undefined;
6
- borderColor: string;
7
- fillColor: string | undefined;
8
- additionalFillColor: string | undefined;
2
+ export type PivotStylingProps = {
3
+ fontFamily?: string;
4
+ textColor?: string;
5
+ backgroundColor?: string;
6
+ borderColor?: string;
7
+ fillColor?: string;
8
+ additionalFillColor?: string;
9
9
  fillOptions: {
10
- alternatingRows: boolean | undefined;
11
- alternatingColumns: boolean | undefined;
12
- columnsHeaders: boolean | undefined;
13
- rowMembers: boolean | undefined;
14
- totals: boolean | undefined;
10
+ alternatingRows?: boolean;
11
+ alternatingColumns?: boolean;
12
+ columnsHeaders?: boolean;
13
+ rowMembers?: boolean;
14
+ totals?: boolean;
15
15
  };
16
- rowHeight: number | undefined;
16
+ rowHeight?: number;
17
17
  isAutoHeight: boolean;
18
- navigationPrimaryColor: string | undefined;
19
- navigationSecondaryColor: string | undefined;
18
+ navigationPrimaryColor?: string;
19
+ navigationSecondaryColor?: string;
20
20
  selectionColor: string;
21
21
  };
22
+ export declare function preparePivotStylingProps(styleOptions?: PivotTableStyleOptions, themeSettings?: CompleteThemeSettings): PivotStylingProps;
@@ -1,5 +1,5 @@
1
1
  import { type DataService } from '@sisense/sdk-pivot-client';
2
- import { type PivotTableDataOptions } from '../chart-data-options/types';
2
+ import { type PivotTableDataOptions } from '../../chart-data-options/types';
3
3
  /**
4
4
  * A hook that applies formatting over pivot table cells.
5
5
  *
@@ -1,23 +1,19 @@
1
1
  import { type JaqlRequest } from '@sisense/sdk-pivot-client';
2
2
  import type { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
3
- import { ExecutePivotQueryParams } from '../query-execution';
4
- import { PivotTableDataOptionsInternal } from '../chart-data-options/types';
3
+ import { ExecutePivotQueryParams } from '../../query-execution';
4
+ import { PivotTableDataOptionsInternal } from '../../chart-data-options/types';
5
5
  export declare const getPivotQueryOptions: (dataOptions: PivotTableDataOptionsInternal) => Pick<ExecutePivotQueryParams, 'rows' | 'columns' | 'values' | 'grandTotals'>;
6
6
  /**
7
7
  * A hook that returns the JAQL request object from pivot table props.
8
8
  *
9
9
  * @internal
10
10
  */
11
- export declare const useGetPivotTableQuery: ({ dataSet, dataOptionsInternal, filters, highlights, refreshCounter, }: {
11
+ export declare const usePivotTableQuery: ({ dataSet, dataOptionsInternal, filters, highlights, }: {
12
12
  dataSet?: DataSource | undefined;
13
13
  dataOptionsInternal: PivotTableDataOptionsInternal;
14
14
  filters?: Filter[] | FilterRelations | undefined;
15
15
  highlights?: Filter[] | undefined;
16
- refreshCounter?: number | undefined;
17
16
  }) => {
18
- isLoading: boolean;
19
- isSuccess: boolean;
20
- isError: boolean;
17
+ jaql: JaqlRequest | undefined;
21
18
  error: Error | undefined;
22
- jaql: JaqlRequest | null;
23
19
  };
@@ -0,0 +1,15 @@
1
+ import { JaqlRequest, PivotBuilder } from '@sisense/sdk-pivot-client';
2
+ interface LoadingState {
3
+ isLoading: boolean;
4
+ isNoResults: boolean;
5
+ }
6
+ /**
7
+ * Hook that initiates loading if jaql is changed or force reload is triggered.
8
+ * Listens to query lifecycle events to update loading state and no results state.
9
+ */
10
+ export declare function usePivotDataLoading(options: {
11
+ jaql: JaqlRequest | undefined;
12
+ pivotBuilder: PivotBuilder;
13
+ isForceReload: boolean;
14
+ }): LoadingState;
15
+ export {};
@@ -0,0 +1,10 @@
1
+ import { DataService, PivotBuilder, PivotClient } from '@sisense/sdk-pivot-client';
2
+ /**
3
+ * Hook that recreates a new data service when new jaql request is needed to sent
4
+ * and updates the pivot builder with the new data service.
5
+ */
6
+ export declare function usePivotDataService(options: {
7
+ pivotClient: PivotClient;
8
+ pivotBuilder: PivotBuilder;
9
+ shouldBeRecreated: boolean;
10
+ }): DataService;
@@ -1,5 +1,5 @@
1
- import { PivotTableDataOptions, PivotTableDataOptionsInternal } from '../chart-data-options/types.js';
2
- import { PivotSortCriteria } from './sorting-utils.js';
1
+ import { PivotTableDataOptions, PivotTableDataOptionsInternal } from '../../chart-data-options/types.js';
2
+ import { PivotSortCriteria } from '../sorting-utils.js';
3
3
  type UsePivotTableDataOptionsInternalResult = {
4
4
  dataOptionsInternal: PivotTableDataOptionsInternal;
5
5
  updateSort: (sortCriteria: PivotSortCriteria) => void;
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ import type { PivotBuilder } from '@sisense/sdk-pivot-client';
3
+ import type { CompleteThemeSettings, PivotTableStyleOptions } from '../../types';
4
+ import type { PivotTableDataOptions } from '../../chart-data-options/types';
5
+ import type { ContainerSize } from '../../dynamic-size-container/dynamic-size-container';
6
+ type PivotRenderOptions = {
7
+ /** Reference to the pivot table container. */
8
+ nodeRef: React.RefObject<HTMLDivElement>;
9
+ /** The pivot builder instance. */
10
+ pivotBuilder: PivotBuilder;
11
+ /** The pivot table data options. */
12
+ dataOptions: PivotTableDataOptions;
13
+ /** The pivot table style options. */
14
+ styleOptions: PivotTableStyleOptions;
15
+ /** The theme settings. */
16
+ themeSettings: CompleteThemeSettings;
17
+ /** The size of the pivot table container. */
18
+ size: ContainerSize | null;
19
+ };
20
+ /**
21
+ * A hook that renders the pivot table.
22
+ */
23
+ export declare function useRenderPivot({ nodeRef, pivotBuilder, dataOptions, styleOptions, themeSettings, size, }: PivotRenderOptions): void;
24
+ export {};
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { PivotTableProps } from '../props';
3
3
  /**
4
4
  * Pivot table with pagination.
@@ -80,4 +80,4 @@ import { PivotTableProps } from '../props';
80
80
  * @group Data Grids
81
81
  * @beta
82
82
  */
83
- export declare const PivotTable: React.FunctionComponent<PivotTableProps>;
83
+ export declare const PivotTable: import("react").FunctionComponent<PivotTableProps>;
package/dist/props.d.ts CHANGED
@@ -1,5 +1,5 @@
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, 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';
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, DrilldownSelection } from './types';
3
3
  import { HighchartsOptions } from './chart-options-processor/chart-options-service';
4
4
  import { ComponentType, PropsWithChildren, ReactNode } from 'react';
5
5
  import { IndicatorChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, ScatterChartDataOptions, TableDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions, PivotTableDataOptions, RegularChartDataOptions, TabularChartDataOptions, RangeChartDataOptions } from './chart-data-options/types';
@@ -21,49 +21,76 @@ export type { MenuItemSection, HighchartsOptions };
21
21
  export interface SisenseContextProviderProps {
22
22
  /**
23
23
  * Default data source explicitly set to be used by child components that are not defined with a data source.
24
+ *
25
+ * @category Sisense App
24
26
  */
25
27
  defaultDataSource?: DataSource;
26
- /** URL of the Sisense environment the app connects to */
28
+ /**
29
+ * URL of the Sisense environment the app connects to
30
+ *
31
+ * @category Sisense App
32
+ */
27
33
  url: string;
28
34
  /**
29
35
  * [Single Sign-On](https://docs.sisense.com/main/SisenseLinux/using-single-sign-on-to-access-sisense.htm) toggle.
30
36
  *
31
37
  * Set to `true` to use SSO authentication. When `true`, this overrides any other authentication methods. Defaults to `false`.
32
38
  *
33
- * @category Authentication
39
+ * @category Sisense Authentication
34
40
  */
35
41
  ssoEnabled?: boolean;
36
42
  /**
37
43
  * Token for [bearer authentication](https://sisense.dev/guides/restApi/using-rest-api.html).
38
44
  *
39
- * @category Authentication
45
+ * To signify that the token is pending (e.g., being generated), set the value to `null`. This is supported for React and Vue only.
46
+ *
47
+ * @category Sisense Authentication
40
48
  */
41
- token?: string;
49
+ token?: string | null;
42
50
  /**
43
51
  * [Web Access Token](https://docs.sisense.com/main/SisenseLinux/using-web-access-token.htm).
44
52
  *
45
- * @category Authentication
53
+ * To signify that the token is pending (e.g., being generated), set the value to `null`. This is supported for React and Vue only.
54
+ *
55
+ * @category Sisense Authentication
46
56
  */
47
- wat?: string;
57
+ wat?: string | null;
48
58
  /**
49
59
  * Application specific configurations such as locale and date formats.
60
+ *
61
+ * @category Sisense App
50
62
  */
51
63
  appConfig?: AppConfig;
52
64
  /**
53
65
  * Boolean flag to show or hide run-time errors that involve Sisense context in the UI.
54
66
  * Example errors include incorrect Sisense URL or invalid authentication.
55
67
  * Note that this flag does not hide run-time errors in the console.
68
+ * If disabled - it's recommended to specify an {@link onError} callback to handle errors.
56
69
  *
57
70
  * If not specified, the default value is `true`.
58
71
  *
59
- * @internal
72
+ * @category Sisense App Error Handling
60
73
  */
61
74
  showRuntimeErrors?: boolean;
75
+ /**
76
+ * Callback function that is triggered when an error occurs within the Sisense context.
77
+ *
78
+ * This callback is useful for handling errors that happen during the initialization or runtime of the Sisense context,
79
+ * such as incorrect configuration, invalid authentication, or network-related issues.
80
+ *
81
+ * @param error - The error object containing details about the issue.
82
+ *
83
+ * @category Sisense App Error Handling
84
+ */
85
+ onError?: (error: Error) => void;
62
86
  /**
63
87
  * Boolean flag to enable sending tracking events to the Sisense instance.
64
88
  *
65
89
  * If not specified, the default value is `true`.
66
90
  *
91
+ * Deprecated: Use {@link AppConfig.trackingConfig | trackingConfig.enabled }
92
+ *
93
+ * @deprecated Use {@link AppConfig.trackingConfig | trackingConfig.enabled }
67
94
  * @internal
68
95
  */
69
96
  enableTracking?: boolean;
@@ -1263,7 +1290,9 @@ export type DrilldownWidgetConfig = {
1263
1290
  */
1264
1291
  breadcrumbsComponent?: ComponentType<DrilldownBreadcrumbsProps>;
1265
1292
  /**
1266
- * Boolean to override default breadcrumbs location and instead only return them as a property of the 'children' function
1293
+ * React component to be rendered as context menu
1294
+ *
1295
+ * {@link ContextMenu} will be used if not provided
1267
1296
  *
1268
1297
  * @category Widget
1269
1298
  */
@@ -1286,7 +1315,13 @@ export interface DrilldownWidgetProps {
1286
1315
  */
1287
1316
  initialDimension: Attribute;
1288
1317
  /**
1289
- * An object that allows users to pass advanced configuration options as a prop for the {@link DrilldownWidget} component
1318
+ * Initial drilldown selections
1319
+ *
1320
+ * @internal
1321
+ */
1322
+ drilldownSelections?: DrilldownSelection[];
1323
+ /**
1324
+ * An object that allows users to pass advanced configuration options as a prop for the `DrilldownWidget` component
1290
1325
  *
1291
1326
  * @category Widget
1292
1327
  */
@@ -7,6 +7,8 @@ import { ExecuteQueryByWidgetIdProps } from '../props';
7
7
  * This component takes the Children Prop Pattern and
8
8
  * offers an alternative approach to the {@link useExecuteQueryByWidgetId} hook.
9
9
  *
10
+ * **Note:** Widget extensions based on JS scripts and add-ons in Fusion are not supported.
11
+ *
10
12
  * @example
11
13
  * The example below executes a query over the existing dashboard widget with the specified widget and dashboard OIDs.
12
14
  * ```tsx
@@ -5,4 +5,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
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';
8
+ export type { QueryState, QueryLoadingState, QuerySuccessState, QueryErrorState, CsvQueryState, CsvQueryLoadingState, CsvQuerySuccessState, CsvQueryErrorState, PivotQueryState, PivotQueryLoadingState, PivotQuerySuccessState, PivotQueryErrorState, ExecuteQueryParams, ExecuteQueryResult, ExecuteCsvQueryParams, ExecuteCSVQueryConfig, ExecuteQueryByWidgetIdParams, QueryByWidgetIdState, QueryByWidgetIdQueryParams, ExecutePivotQueryParams, } from './types';
@@ -154,10 +154,19 @@ export interface ExecuteQueryByWidgetIdParams {
154
154
  /** {@inheritDoc ExecuteQueryParams.enabled} */
155
155
  enabled?: boolean;
156
156
  }
157
- export type QueryByWidgetIdState = QueryState & {
158
- /** Query parameters constructed over the widget */
157
+ /**
158
+ * Query parameters constructed over either a chart widget or pivot table widget. This is returned as part of the query state {@link QueryByWidgetIdState}.
159
+ */
160
+ export type QueryByWidgetIdQueryParams = {
161
+ /** Query parameters constructed over the chart widget */
159
162
  query: ExecuteQueryParams | undefined;
163
+ /** Query parameters constructed over the pivot table widget */
164
+ pivotQuery: ExecutePivotQueryParams | undefined;
160
165
  };
166
+ /**
167
+ * State of a query execution retrieving data of Fusion widget.
168
+ */
169
+ export type QueryByWidgetIdState = QueryState & QueryByWidgetIdQueryParams;
161
170
  /**
162
171
  * Parameters for {@link useExecuteQuery} hook.
163
172
  */
@@ -1,11 +1,12 @@
1
- import { QueryDescription } from '../query/execute-query';
2
1
  import { ClientApplication } from '../app/client-application';
3
- import { ExecuteQueryByWidgetIdParams, QueryByWidgetIdState } from './types';
2
+ import { ExecuteQueryByWidgetIdParams, QueryByWidgetIdState, QueryByWidgetIdQueryParams } from './types';
3
+ import { QueryResultData } from '@sisense/sdk-data';
4
4
  /**
5
5
  * React hook that executes a data query extracted from an existing widget in the Sisense instance.
6
6
  *
7
7
  * This approach, which offers an alternative to {@link ExecuteQueryByWidgetId} component, is similar to React Query's `useQuery` hook.
8
8
  *
9
+ * **Note:** Widget extensions based on JS scripts and add-ons in Fusion are not supported.
9
10
  *
10
11
  * @example
11
12
  * The example below executes a query over the existing dashboard widget with the specified widget and dashboard OIDs.
@@ -48,6 +49,5 @@ export declare function useParamsChanged(params: ExecuteQueryByWidgetIdParams):
48
49
  export declare function executeQueryByWidgetId({ widgetOid, dashboardOid, filters, highlights, filtersMergeStrategy, count, offset, includeDashboardFilters, app, onBeforeQuery, }: ExecuteQueryByWidgetIdParams & {
49
50
  app: ClientApplication;
50
51
  }): Promise<{
51
- data: import("@sisense/sdk-data").QueryResultData;
52
- query: QueryDescription;
53
- }>;
52
+ data: QueryResultData;
53
+ } & QueryByWidgetIdQueryParams>;
@@ -1,11 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { ClientApplication } from '../app/client-application';
3
+ import { TrackingEventDetails } from '@sisense/sdk-tracking';
3
4
  export type SisenseContextPayload = {
4
5
  isInitialized: boolean;
5
6
  app?: ClientApplication;
6
7
  tracking: {
7
8
  enabled: boolean;
8
9
  packageName: string;
10
+ onTrackingEvent?: (payload: TrackingEventDetails) => void;
9
11
  };
10
12
  };
11
13
  export declare const SisenseContext: import("react").Context<SisenseContextPayload>;
@@ -1,4 +1,6 @@
1
1
  import { CompleteThemeSettings } from '../types';
2
+ export declare const DEFAULT_DIVIDER_COLOR = "#F2F2F2";
3
+ export declare const DEFAULT_DIVIDER_WIDTH = 4;
2
4
  /**
3
5
  * Returns default theme settings, which can be used as base for custom theme options.
4
6
  *
@@ -73,6 +73,20 @@ export type LegacyPaletteError = {
73
73
  message: string;
74
74
  status: 'error';
75
75
  };
76
+ /**
77
+ * Mapping of legacy design properties types to theme setting types
78
+ */
79
+ export declare const LEGACY_DESIGN_TYPES: {
80
+ none: string;
81
+ small: string;
82
+ medium: string;
83
+ large: string;
84
+ left: string;
85
+ center: string;
86
+ right: string;
87
+ light: string;
88
+ dark: string;
89
+ };
76
90
  /**
77
91
  * Converts legacy (used in Sisense UI) design settings and it's palette object to CompleteThemeSettings.
78
92
  *
@@ -87,6 +87,15 @@ export declare const translation: {
87
87
  max: string;
88
88
  };
89
89
  };
90
+ advanced: {
91
+ tooltip: {
92
+ min: string;
93
+ max: string;
94
+ forecastValue: string;
95
+ forecast: string;
96
+ trend: string;
97
+ };
98
+ };
90
99
  arearange: {
91
100
  tooltip: {
92
101
  min: string;
@@ -91,6 +91,15 @@ export declare const resources: {
91
91
  max: string;
92
92
  };
93
93
  };
94
+ advanced: {
95
+ tooltip: {
96
+ min: string;
97
+ max: string;
98
+ forecastValue: string;
99
+ forecast: string;
100
+ trend: string;
101
+ };
102
+ };
94
103
  arearange: {
95
104
  tooltip: {
96
105
  min: string;
@@ -195,6 +204,15 @@ export declare const resources: {
195
204
  max: string;
196
205
  };
197
206
  };
207
+ advanced: {
208
+ tooltip: {
209
+ min: string;
210
+ max: string;
211
+ forecastValue: string;
212
+ forecast: string;
213
+ trend: string;
214
+ };
215
+ };
198
216
  arearange: {
199
217
  tooltip: {
200
218
  min: string;