@sisense/sdk-ui 2.6.0 → 2.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 (48) hide show
  1. package/dist/ai.cjs +17 -17
  2. package/dist/ai.js +653 -650
  3. package/dist/analytics-composer.cjs +1 -1
  4. package/dist/analytics-composer.js +4 -4
  5. package/dist/derive-chart-family-BCY-GLVZ.cjs +672 -0
  6. package/dist/derive-chart-family-DvYmrG1k.js +93730 -0
  7. package/dist/{dimensions-BgPl9ZS9.cjs → dimensions-DAISVpEZ.cjs} +1 -1
  8. package/dist/{dimensions-DuHaCozA.js → dimensions-WmjaZcrG.js} +1 -1
  9. package/dist/index.cjs +14 -14
  10. package/dist/index.js +4367 -4327
  11. package/dist/index.umd.js +294 -294
  12. package/dist/packages/sdk-ui/src/ai/api/types.d.ts +1 -0
  13. package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +7 -0
  14. package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +7 -0
  15. package/dist/packages/sdk-ui/src/analytics-composer/query/fix-ranking-filter-jaql.d.ts +8 -0
  16. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/get-legacy-cartesian-chart-options.d.ts +3 -0
  17. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/legend.d.ts +2 -0
  18. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/tooltip.d.ts +4 -0
  19. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/{highcharts-options-builder.d.ts → highchart-options/highcharts-options-builder.d.ts} +1 -1
  20. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/legend.d.ts +3 -0
  21. package/dist/packages/sdk-ui/src/chart-options-processor/{cartesian-chart-options.d.ts → cartesian/cartesian-chart-options.d.ts} +6 -6
  22. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis-configuration.d.ts +41 -0
  23. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-configuration.d.ts +13 -0
  24. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-spacing-calculator.d.ts +41 -0
  25. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/series-processor.d.ts +57 -0
  26. package/dist/packages/sdk-ui/src/chart-options-processor/tooltip.d.ts +3 -29
  27. package/dist/packages/sdk-ui/src/chart-options-processor/translations/scatter-plot-options.d.ts +2 -2
  28. package/dist/packages/sdk-ui/src/chart-options-processor/translations/scatter-tooltip.d.ts +2 -2
  29. package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip-utils.d.ts +17 -2
  30. package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip.d.ts +3 -3
  31. package/dist/packages/sdk-ui/src/chart-options-processor/translations/translations-to-highcharts.d.ts +7 -0
  32. package/dist/packages/sdk-ui/src/chart-options-processor/translations/treemap/treemap-tooltip.d.ts +3 -4
  33. package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts +3 -3
  34. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/utils.d.ts +7 -1
  35. package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/index.d.ts +1 -1
  36. package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/use-track-component-init.d.ts +4 -1
  37. package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/with-tracking.d.ts +10 -2
  38. package/dist/packages/sdk-ui/src/index.d.ts +1 -0
  39. package/dist/packages/sdk-ui/src/types.d.ts +27 -0
  40. package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +1 -1
  41. package/dist/{use-common-filters-CRgYdKcV.cjs → use-common-filters-CRrL9rOQ.cjs} +66 -66
  42. package/dist/{use-common-filters-B1RKY2KD.js → use-common-filters-CVgB69Xe.js} +858 -853
  43. package/dist/{widget-composer-I9gUFBZt.js → widget-composer-B4eAv2pf.js} +232 -194
  44. package/dist/{widget-composer-B2r2a9Oh.cjs → widget-composer-D0FZj1tX.cjs} +8 -8
  45. package/package.json +20 -18
  46. package/dist/derive-chart-family-BPYK8evJ.js +0 -90579
  47. package/dist/derive-chart-family-yUBZXP4x.cjs +0 -669
  48. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/get-legacy-cartesian-chart-options.d.ts +0 -3
@@ -89,6 +89,7 @@ export interface NlqResponse {
89
89
  export type ChatResponse = NlqResponse | TextResponse | ErrorResponse;
90
90
  export interface QueryRecommendationConfig {
91
91
  numOfRecommendations: number;
92
+ userPrompt?: string;
92
93
  }
93
94
  export type NlqResult = Omit<NlqResponseData, 'followupQuestions'>;
94
95
  /** AI-generated recommended query you can run on your data model */
@@ -15,6 +15,13 @@ export interface ChatConfig {
15
15
  * Set to `0` to disable initial recommendations.
16
16
  */
17
17
  numOfRecommendations: number;
18
+ /**
19
+ * Pass a custom prompt to AI when generating query recommendations
20
+ *
21
+ * e.g. "Focus on age range"
22
+ *
23
+ */
24
+ customPrompt?: string;
18
25
  /**
19
26
  * Number of recent prompts that should be shown in a chat session
20
27
  *
@@ -19,6 +19,13 @@ export interface GetQueryRecommendationsParams {
19
19
  * @internal
20
20
  */
21
21
  enableAxisTitlesInWidgetProps?: boolean;
22
+ /**
23
+ * Pass a custom prompt to AI when generating query recommendations
24
+ *
25
+ * e.g. "Focus on age range"
26
+ *
27
+ */
28
+ customPrompt?: string;
22
29
  }
23
30
  /**
24
31
  * Parameters for {@link useGetQueryRecommendations} hook.
@@ -0,0 +1,8 @@
1
+ import { MetadataItem } from '@sisense/sdk-data';
2
+ /**
3
+ * Fix problematic jaql for RankingFilter generated by NLQ
4
+ *
5
+ * @param items - the MetadataItem[]
6
+ * @return the MetadataItem[] with fixed RankingFilter Jaql
7
+ */
8
+ export declare const fixRankingFilterJaql: (items: MetadataItem[]) => MetadataItem[];
@@ -0,0 +1,3 @@
1
+ import { BuildContext } from '../../../types';
2
+ import { CartesianChartTypes } from '../../types';
3
+ export declare const getLegacyCartesianChartOptions: (ctx: BuildContext<CartesianChartTypes>, chartType: CartesianChartTypes) => import("../../../../../../chart-options-processor/chart-options-service").HighchartsOptionsInternal;
@@ -0,0 +1,2 @@
1
+ import { LegendPosition, LegendSettings } from '../../../../../../chart-options-processor/translations/legend-section';
2
+ export declare const getBasicCartesianLegend: (position: LegendPosition) => LegendSettings;
@@ -0,0 +1,4 @@
1
+ import { BuildContext } from '../../../types';
2
+ import { CartesianChartTypes } from '../../types';
3
+ import { TooltipSettings } from '../../../../../../chart-options-processor/translations/tooltip-utils';
4
+ export declare const getBasicCartesianTooltip: (ctx: BuildContext<CartesianChartTypes>) => TooltipSettings;
@@ -1,2 +1,2 @@
1
- import { HighchartsOptionsBuilder } from '../../../types';
1
+ import { HighchartsOptionsBuilder } from '../../../../types';
2
2
  export declare const barHighchartsOptionsBuilder: HighchartsOptionsBuilder<'bar'>;
@@ -0,0 +1,3 @@
1
+ import { LegendSettings } from '../../../../../../../chart-options-processor/translations/legend-section';
2
+ import { BuildContext } from '../../../../types';
3
+ export declare const getLegend: (ctx: BuildContext<'bar'>) => LegendSettings;
@@ -1,9 +1,9 @@
1
- import { ChartData } from '../chart-data/types';
2
- import { ChartDesignOptions } from './translations/types';
3
- import { ChartType, CompleteThemeSettings } from '../types';
4
- import { CartesianChartDataOptionsInternal } from '../chart-data-options/types';
5
- import { HighchartsOptionsInternal } from './chart-options-service';
6
- import { OptionsWithAlerts } from './../types';
1
+ import { ChartData } from '../../chart-data/types';
2
+ import { ChartDesignOptions } from '../translations/types';
3
+ import { ChartType, CompleteThemeSettings } from '../../types';
4
+ import { CartesianChartDataOptionsInternal } from '../../chart-data-options/types';
5
+ import { HighchartsOptionsInternal } from '../chart-options-service';
6
+ import { OptionsWithAlerts } from '../../types';
7
7
  import { TFunction } from '@sisense/sdk-common';
8
8
  /**
9
9
  * Convert intermediate chart data, data options, and design options
@@ -0,0 +1,41 @@
1
+ import { ChartType, CompleteThemeSettings } from '../../../types';
2
+ import { CartesianChartData } from '../../../chart-data/types';
3
+ import { CartesianChartDataOptionsInternal } from '../../../chart-data-options/types';
4
+ import { ChartDesignOptions } from '../../translations/types';
5
+ import { AxisSettings } from '../../translations/axis-section';
6
+ import { AxisClipped } from '../../translations/translations-to-highcharts';
7
+ /**
8
+ * Configuration for axis setup
9
+ */
10
+ interface AxisConfig {
11
+ chartData: CartesianChartData;
12
+ chartType: ChartType;
13
+ chartDesignOptions: ChartDesignOptions;
14
+ dataOptions: CartesianChartDataOptionsInternal;
15
+ themeSettings?: CompleteThemeSettings;
16
+ dateFormatter?: (date: Date, format: string) => string;
17
+ }
18
+ /**
19
+ * Result of axis configuration
20
+ */
21
+ interface AxisConfigResult {
22
+ xAxisSettings: AxisSettings[];
23
+ yAxisSettings: AxisSettings[];
24
+ axisClipped: AxisClipped[];
25
+ yAxisSide: number[];
26
+ yAxisChartType: (string | undefined)[];
27
+ yTreatNullDataAsZeros: boolean[];
28
+ yConnectNulls: boolean[];
29
+ xAxisOrientation: 'horizontal' | 'vertical';
30
+ categories: string[];
31
+ indexMap: number[];
32
+ plotBands: any[];
33
+ continuousDatetimeXAxis: boolean;
34
+ stacking?: string;
35
+ showTotal?: boolean;
36
+ }
37
+ /**
38
+ * Configure chart axes for cartesian charts
39
+ */
40
+ export declare function configureAxes(config: AxisConfig): AxisConfigResult;
41
+ export type { AxisConfig, AxisConfigResult };
@@ -0,0 +1,13 @@
1
+ import { AxisSettings } from '../../translations/axis-section';
2
+ /**
3
+ * Apply label positioning adjustments based on spacing calculations
4
+ */
5
+ export declare function applyLabelPositioning(xAxisSettings: AxisSettings[], yAxisSettings: AxisSettings[], rightShift: number, topShift: number, totalLabelRightSpacing: number, totalLabelTopSpacing: number): void;
6
+ /**
7
+ * Determine chart state information
8
+ */
9
+ export declare function determineChartState(chartType: string, chartDesignOptions: any, stacking?: string): {
10
+ treatNullDataAsZeros: boolean;
11
+ isPolarChart: boolean;
12
+ polarType?: any;
13
+ };
@@ -0,0 +1,41 @@
1
+ import { ChartType } from '../../../types';
2
+ import { StackableChartDesignOptions } from '../../translations/design-options';
3
+ import { CartesianChartData } from '../../../chart-data/types';
4
+ import { CartesianChartDataOptionsInternal } from '../../../chart-data-options/types';
5
+ import { ChartDesignOptions } from '../../translations/types';
6
+ /**
7
+ * Configuration for chart spacing calculations
8
+ */
9
+ interface SpacingConfig {
10
+ chartType: ChartType;
11
+ chartData: CartesianChartData;
12
+ chartDesignOptions: ChartDesignOptions;
13
+ xAxisOrientation: 'horizontal' | 'vertical';
14
+ }
15
+ /**
16
+ * Result of spacing calculations
17
+ */
18
+ interface SpacingResult {
19
+ totalTopSpacing: number;
20
+ totalRightSpacing: number;
21
+ rightShift: number;
22
+ topShift: number;
23
+ }
24
+ /**
25
+ * Get additional spacing around chart needed for the total labels based on the chart type and design options.
26
+ */
27
+ export declare function getChartSpacingForTotalLabels(chartType: ChartType, chartDesignOptions: StackableChartDesignOptions): {
28
+ rightSpacing: number;
29
+ topSpacing: number;
30
+ };
31
+ /**
32
+ * Calculate complete spacing configuration for a cartesian chart
33
+ */
34
+ export declare function calculateChartSpacing(config: SpacingConfig): SpacingResult;
35
+ /**
36
+ * Get additional legend settings based on the chart type and data options
37
+ */
38
+ export declare function getAdditionalLegendSettings(chartType: ChartType, dataOptions: CartesianChartDataOptionsInternal, chartDesignOptions: ChartDesignOptions): {
39
+ margin?: number;
40
+ } | undefined;
41
+ export type { SpacingConfig, SpacingResult };
@@ -0,0 +1,57 @@
1
+ import { CategoricalSeriesValues } from '../../../chart-data/types';
2
+ import { CartesianChartDataOptionsInternal } from '../../../chart-data-options/types';
3
+ import { ChartDesignOptions } from '../../translations/types';
4
+ import { ChartType, CompleteThemeSettings } from '../../../types';
5
+ import { AxisSettings } from '../../translations/axis-section';
6
+ import { AxisClipped } from '../../translations/translations-to-highcharts';
7
+ /**
8
+ * Configuration for series processing
9
+ */
10
+ interface SeriesProcessingConfig {
11
+ chartData: {
12
+ series: CategoricalSeriesValues[];
13
+ };
14
+ chartType: ChartType;
15
+ chartDesignOptions: ChartDesignOptions;
16
+ dataOptions: CartesianChartDataOptionsInternal;
17
+ continuousDatetimeXAxis: boolean;
18
+ indexMap: number[];
19
+ categories: string[];
20
+ treatNullDataAsZeros: boolean;
21
+ yTreatNullDataAsZeros: boolean[];
22
+ yConnectNulls: boolean[];
23
+ yAxisSide: number[];
24
+ yAxisChartType: (string | undefined)[];
25
+ yAxisSettings: AxisSettings[];
26
+ axisClipped: AxisClipped[];
27
+ xAxisSettings: AxisSettings[];
28
+ stacking?: string;
29
+ themeSettings?: CompleteThemeSettings;
30
+ dateFormatter?: (date: Date, format: string) => string;
31
+ }
32
+ /**
33
+ * Process and format series data for the chart
34
+ */
35
+ export declare function processSeries(config: SeriesProcessingConfig): {
36
+ dataLabels: {
37
+ formatter: (this: import("../../tooltip").HighchartsDataPointContext) => string;
38
+ };
39
+ connectNulls: boolean;
40
+ marker: import("../../translations/marker-section").MarkerSettings;
41
+ lineWidth: number;
42
+ type?: string | undefined;
43
+ showInNavigator: boolean;
44
+ stickyTracking: boolean;
45
+ boostThreshold: number;
46
+ turboThreshold: number;
47
+ color: string | undefined;
48
+ yAxis: number;
49
+ name: string;
50
+ data: import("../../translations/translations-to-highcharts").SeriesPointStructure[];
51
+ levels?: any;
52
+ }[];
53
+ /**
54
+ * Apply additional series configuration based on chart type
55
+ */
56
+ export declare function applySeriesTypeSpecificOptions(series: any[], chartType: ChartType, chartDesignOptions: ChartDesignOptions): any[];
57
+ export type { SeriesProcessingConfig };
@@ -1,30 +1,4 @@
1
1
  import { ChartDataOptionsInternal } from '../chart-data-options/types';
2
- import { TooltipOptions } from '@sisense/sisense-charts';
3
- export type TooltipSettings = TooltipOptions;
4
- export type InternalSeriesNode = {
5
- val: number;
6
- name: string;
7
- parentNode?: InternalSeriesNode;
8
- color?: string;
9
- };
10
- export type InternalSeries = {
11
- series: {
12
- name: string;
13
- color: string;
14
- };
15
- x: string;
16
- y: number;
17
- point: {
18
- name: string;
19
- color: string;
20
- custom?: {
21
- number1?: number;
22
- string1?: string;
23
- xDisplayValue?: string;
24
- };
25
- node?: InternalSeriesNode;
26
- };
27
- percentage?: number;
28
- color?: string;
29
- };
30
- export declare const getTooltipSettings: (showDecimals: boolean | undefined, chartDataOptions: ChartDataOptionsInternal) => TooltipSettings;
2
+ import { TooltipSettings, HighchartsDataPointContext, HighchartsDataPointContextNode } from './translations/tooltip-utils';
3
+ export type { TooltipSettings, HighchartsDataPointContext, HighchartsDataPointContextNode };
4
+ export declare const getCategoryTooltipSettings: (showDecimals: boolean | undefined, chartDataOptions: ChartDataOptionsInternal) => TooltipSettings;
@@ -1,7 +1,7 @@
1
1
  import { ScatterChartDataOptionsInternal } from '../../chart-data-options/types';
2
2
  import { PlotOptions } from '../chart-options-service';
3
3
  import { ScatterChartDesignOptions } from './design-options';
4
- import { InternalSeries } from './tooltip-utils';
4
+ import { HighchartsDataPointContext } from './tooltip-utils';
5
5
  import { ScatterCustomPointOptions } from './scatter-tooltip';
6
6
  export type ScatterMarkerSize = {
7
7
  scatterDefaultSize: number;
@@ -14,7 +14,7 @@ export type ScatterBubbleOptions = {
14
14
  minSize: number;
15
15
  };
16
16
  export declare const defaultScatterMarkerSize: ScatterMarkerSize;
17
- export type ScatterChartInternalSeries = InternalSeries & {
17
+ export type ScatterChartHighchartsDataPointContext = HighchartsDataPointContext & {
18
18
  point: {
19
19
  custom?: ScatterCustomPointOptions;
20
20
  };
@@ -1,4 +1,4 @@
1
- import { InternalSeries, TooltipSettings } from './tooltip-utils';
1
+ import { HighchartsDataPointContext, TooltipSettings } from './tooltip-utils';
2
2
  import { ScatterChartDataOptionsInternal } from '../../chart-data-options/types';
3
3
  export interface ScatterTooltipElements {
4
4
  x: string;
@@ -17,5 +17,5 @@ export interface ScatterCustomPointOptions {
17
17
  export declare const spanSegment: (value: number | string, color?: string) => string;
18
18
  export declare const tooltipWrapper: (content: string) => string;
19
19
  export declare const tooltipSeparator: () => string;
20
- export declare const tooltipFormatter: (ctx: InternalSeries, dataOptions: ScatterChartDataOptionsInternal) => string;
20
+ export declare const tooltipFormatter: (ctx: HighchartsDataPointContext, dataOptions: ScatterChartDataOptionsInternal) => string;
21
21
  export declare const getScatterTooltipSettings: (dataOptions: ScatterChartDataOptionsInternal) => TooltipSettings;
@@ -1,4 +1,5 @@
1
1
  import { StyledMeasureColumn, StyledColumn } from '../../chart-data-options/types.js';
2
+ import { TooltipFormatterContextObject } from '@sisense/sisense-charts';
2
3
  export declare const isValueNumeric: (value: StyledMeasureColumn | StyledColumn | undefined) => boolean | "";
3
4
  export declare const formatTooltipValue: (dataOption: StyledMeasureColumn | StyledColumn | undefined, value: number | string | undefined, displayValue: string) => string;
4
5
  export declare function isTooltipPercentValueSupported(options: StyledMeasureColumn | undefined): boolean;
@@ -12,12 +13,23 @@ export type TooltipSettings = {
12
13
  useHTML?: boolean;
13
14
  crosshairs?: boolean;
14
15
  shared?: boolean;
15
- formatter?: () => string;
16
+ formatter?: (this: HighchartsDataPointContext) => string | false;
16
17
  style?: {
17
18
  fontFamily?: string;
18
19
  };
20
+ padding?: number;
21
+ outside?: boolean;
19
22
  };
20
- export type InternalSeries = {
23
+ export type HighchartsDataPointContextNode = {
24
+ val: number;
25
+ name: string;
26
+ parentNode?: HighchartsDataPointContextNode;
27
+ color?: string;
28
+ };
29
+ /**
30
+ * Context of a hovered data point in a Highcharts chart for the tooltip formatter function.
31
+ */
32
+ export type HighchartsDataPointContext = {
21
33
  series: {
22
34
  name: string;
23
35
  color: string;
@@ -51,6 +63,9 @@ export type InternalSeries = {
51
63
  median: number;
52
64
  average: number;
53
65
  };
66
+ options?: TooltipFormatterContextObject['point']['options'];
67
+ node?: HighchartsDataPointContextNode;
54
68
  };
55
69
  percentage?: number;
70
+ color?: string;
56
71
  };
@@ -1,5 +1,5 @@
1
1
  import { ChartDataOptionsInternal } from '../../chart-data-options/types';
2
- import { InternalSeries, TooltipSettings } from './tooltip-utils';
2
+ import { HighchartsDataPointContext, TooltipSettings } from './tooltip-utils';
3
3
  import { TFunction } from '@sisense/sdk-common';
4
- export declare const cartesianDataFormatter: (that: InternalSeries, showDecimals: boolean | undefined, chartDataOptions: ChartDataOptionsInternal, translate?: TFunction) => string;
5
- export declare const getTooltipSettings: (showDecimals: boolean | undefined, chartDataOptions: ChartDataOptionsInternal, translate?: TFunction) => TooltipSettings;
4
+ export declare const cartesianDataFormatter: (highchartsDataPoint: HighchartsDataPointContext, chartDataOptions: ChartDataOptionsInternal, translate?: TFunction) => string;
5
+ export declare const getCartesianTooltipSettings: (chartDataOptions: ChartDataOptionsInternal, translate?: TFunction) => TooltipSettings;
@@ -88,5 +88,12 @@ export declare const autoCalculateYAxisMinMax: (chartType: ChartType, chartData:
88
88
  min: number;
89
89
  max: number;
90
90
  };
91
+ /**
92
+ * Determines Y-axis configuration options for cartesian charts
93
+ *
94
+ * @param chartData - Chart data containing series information
95
+ * @param dataOptions - Chart data options containing y columns and breakBy configuration
96
+ * @returns Tuple containing [yAxisSide, yAxisChartType, yTreatNullDataAsZeros, yConnectNulls]
97
+ */
91
98
  export declare const determineYAxisOptions: (chartData: ChartData, dataOptions: ChartDataOptionsInternal) => [number[], (HighchartsType | undefined)[], boolean[], boolean[]];
92
99
  export declare const getColorSetting: (dataOptions: CartesianChartDataOptionsInternal | CategoricalChartDataOptionsInternal, key: string) => string | undefined;
@@ -1,13 +1,12 @@
1
1
  import { CategoricalChartDataOptionsInternal } from '../../../chart-data-options/types';
2
2
  import { TreemapChartDesignOptions } from '../design-options';
3
- import { TooltipSettings } from '../../tooltip';
4
- import { TooltipFormatterContextObject } from '@sisense/sisense-charts';
3
+ import { HighchartsDataPointContext, TooltipSettings } from '../tooltip-utils';
5
4
  import { TFunction } from '@sisense/sdk-common';
6
5
  type TooltipFormatterOptions = {
7
6
  displayTotalContribution: boolean;
8
7
  displayColorCircles: boolean;
9
- shouldSkip: (context: TooltipFormatterContextObject) => boolean;
8
+ shouldSkip: (context: HighchartsDataPointContext) => boolean;
10
9
  };
11
10
  export declare const getTreemapTooltipSettings: (chartDataOptions: CategoricalChartDataOptionsInternal, designOptions: TreemapChartDesignOptions, translate: TFunction, formatterOptions?: TooltipFormatterOptions) => TooltipSettings;
12
- export declare function treemapTooltipFormatter(context: TooltipFormatterContextObject, chartDataOptions: CategoricalChartDataOptionsInternal, designOptions: TreemapChartDesignOptions, translate: TFunction, formatterOptions?: TooltipFormatterOptions): string | false;
11
+ export declare function treemapTooltipFormatter(context: HighchartsDataPointContext, chartDataOptions: CategoricalChartDataOptionsInternal, designOptions: TreemapChartDesignOptions, translate: TFunction, formatterOptions?: TooltipFormatterOptions): string | false;
13
12
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { DataLabelsOptions } from '@sisense/sisense-charts';
2
2
  import { Style } from '../chart-options-service';
3
3
  import { AxisOrientation } from './axis-section';
4
- import { InternalSeries } from './tooltip-utils';
4
+ import { HighchartsDataPointContext } from './tooltip-utils';
5
5
  import { PolarType } from './design-options';
6
6
  import { NumberFormatConfig } from '../../types';
7
7
  export type ValueLabelOptions = {
@@ -28,9 +28,9 @@ export type ValueLabelSettings = {
28
28
  relative: boolean;
29
29
  totals: boolean;
30
30
  };
31
- formatter?: (this: InternalSeries, options?: DataLabelsOptions, valuePropName?: string) => string;
31
+ formatter?: (this: HighchartsDataPointContext, options?: DataLabelsOptions, valuePropName?: string) => string;
32
32
  };
33
- export declare const createValueLabelFormatter: (numberFormatConfig?: NumberFormatConfig, options?: ValueLabelOptions) => (this: InternalSeries) => string;
33
+ export declare const createValueLabelFormatter: (numberFormatConfig?: NumberFormatConfig, options?: ValueLabelOptions) => (this: HighchartsDataPointContext) => string;
34
34
  export declare const getRotationType: (rotation: number) => RotationType;
35
35
  export declare const getValueLabelSettings: (xAxisOrientation: AxisOrientation, valueLabel: ValueLabelOptions, inside?: boolean) => ValueLabelSettings;
36
36
  export declare const getPolarValueLabelSettings: (valueLabel: ValueLabelOptions, polarType: PolarType) => ValueLabelSettings;
@@ -1,6 +1,6 @@
1
1
  import { EditableLayoutDragData, EditableLayoutDropData } from '../../../dashboard/components/editable-layout/types';
2
2
  import { DragStartEvent } from '@dnd-kit/core';
3
- import { RenderTitleHandler, RenderToolbarHandler } from '../../../types';
3
+ import { RenderTitleHandler, RenderToolbarHandler, TextWidgetRenderToolbarHandler } from '../../../types';
4
4
  export declare const isEditableLayoutDragData: (data: any | undefined) => data is EditableLayoutDragData;
5
5
  export declare const isEditableLayoutDropData: (data: any) => data is EditableLayoutDropData;
6
6
  export declare const getDraggingWidgetId: (event: DragStartEvent) => string | null;
@@ -10,6 +10,12 @@ export declare const getDraggingWidgetId: (event: DragStartEvent) => string | nu
10
10
  * If it returns `null`, the previous toolbar is passed to the next handler.
11
11
  */
12
12
  export declare function composeToolbarHandlers(...handlers: (RenderToolbarHandler | undefined)[]): RenderToolbarHandler;
13
+ /**
14
+ * Compose multiple TextWidgetRenderToolbarHandler functions into one.
15
+ * Each handler gets a chance to modify the toolbar.
16
+ * If it returns `null`, the previous toolbar is passed to the next handler.
17
+ */
18
+ export declare function composeTextWidgetToolbarHandlers(...handlers: (TextWidgetRenderToolbarHandler | undefined)[]): TextWidgetRenderToolbarHandler;
13
19
  /**
14
20
  * Compose multiple RenderTitleHandler functions into one.
15
21
  * Each handler gets a chance to modify the title.
@@ -1 +1 @@
1
- export { withTracking } from './with-tracking';
1
+ export { withTracking, type TrackingDecoratorConfig } from './with-tracking';
@@ -1,6 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
+ import { TrackingDecoratorConfig } from './with-tracking';
3
+ type TrackingComponentConfig = TrackingDecoratorConfig;
2
4
  export declare const TrackingContextProvider: ({ skipNested, children, }: {
3
5
  children: ReactNode;
4
6
  skipNested?: boolean | undefined;
5
7
  }) => import("react/jsx-runtime").JSX.Element;
6
- export declare const useTrackComponentInit: <P extends {}>(componentName: string, props: P) => void;
8
+ export declare const useTrackComponentInit: <P extends {}>(trackingComponentConfig: TrackingComponentConfig, props: P) => void;
9
+ export {};
@@ -1,13 +1,21 @@
1
1
  import { ComponentDecorator } from '../as-sisense-component';
2
- type TrackingDecoratorConfig = {
2
+ /**
3
+ * Configuration for withTracking decorator
4
+ *
5
+ * @internal
6
+ */
7
+ export type TrackingDecoratorConfig = {
3
8
  componentName: string;
4
9
  config: {
5
10
  skip?: boolean | ((props: any) => boolean);
6
11
  transparent?: boolean;
12
+ packageName?: string;
13
+ packageVersion?: string;
7
14
  };
8
15
  };
9
16
  /**
10
17
  * Adds tracking to the component
18
+ *
19
+ * @internal
11
20
  */
12
21
  export declare const withTracking: ComponentDecorator<TrackingDecoratorConfig>;
13
- export {};
@@ -10,6 +10,7 @@ export { getChartType } from './widget-by-id/utils';
10
10
  export * from './query-execution';
11
11
  export { executeQuery, executePivotQuery } from './query/execute-query';
12
12
  export { SisenseContextProvider } from './sisense-context/sisense-context-provider';
13
+ export * from './decorators/component-decorators/with-tracking';
13
14
  export { DrilldownWidget } from './widgets/drilldown-widget';
14
15
  export { processDrilldownSelections } from './widgets/common/use-drilldown-core';
15
16
  export { ChartWidget } from './widgets/chart-widget';
@@ -1240,6 +1240,8 @@ export type NlqChartWidgetStyleOptions = {
1240
1240
  export type RenderToolbarHandler = (onRefresh: () => void, defaultToolbar: JSX.Element) => JSX.Element | null;
1241
1241
  /** @internal */
1242
1242
  export type RenderTitleHandler = (defaultHeaderTitle: ReactNode) => ReactNode;
1243
+ /** @internal */
1244
+ export type TextWidgetRenderToolbarHandler = (defaultToolbar: ReactNode) => ReactNode;
1243
1245
  /** Style settings defining the look and feel of the widget created in Fusion */
1244
1246
  export interface WidgetByIdStyleOptions extends WidgetContainerStyleOptions {
1245
1247
  /**
@@ -1280,6 +1282,31 @@ export type TextWidgetStyleOptions = {
1280
1282
  html: string;
1281
1283
  vAlign: `valign-${'middle' | 'top' | 'bottom'}`;
1282
1284
  bgColor: string;
1285
+ /**
1286
+ * Widget header styles
1287
+ *
1288
+ * @internal
1289
+ */
1290
+ header?: {
1291
+ /**
1292
+ * Header visibility toggle
1293
+ *
1294
+ * @internal
1295
+ */
1296
+ hidden?: boolean;
1297
+ /**
1298
+ * Custom toolbar to render to the right of the title
1299
+ *
1300
+ * @internal
1301
+ */
1302
+ renderToolbar?: TextWidgetRenderToolbarHandler;
1303
+ /**
1304
+ * Custom title to render in widget header
1305
+ *
1306
+ * @internal
1307
+ */
1308
+ renderTitle?: RenderTitleHandler;
1309
+ };
1283
1310
  };
1284
1311
  /**
1285
1312
  * Style settings defining the look and feel of CustomWidget
@@ -10,7 +10,7 @@ export { mergeFilters, getFilterRelationsFromJaql, convertFilterRelationsModelTo
10
10
  *
11
11
  * @internal
12
12
  */
13
- export declare function getChartType(fusionWidgetType: FusionWidgetType): ChartType;
13
+ export declare function getChartType(fusionWidgetType: FusionWidgetType): ChartType | undefined;
14
14
  export declare function getFusionWidgetTypeFromChartType(chartType: ChartType): FusionWidgetType;
15
15
  export declare function getFusionWidgetType(widgetType: WidgetType, chartType?: ChartType): FusionWidgetType;
16
16
  export declare function getWidgetType(fusionWidgetType: FusionWidgetType): WidgetType;