@sisense/sdk-ui 2.6.0 → 2.8.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.
- package/dist/ai.cjs +29 -29
- package/dist/ai.js +686 -702
- package/dist/analytics-composer.cjs +33 -33
- package/dist/analytics-composer.js +278 -290
- package/dist/derive-chart-family-6PZA-xZh.js +92092 -0
- package/dist/derive-chart-family-DQUVKMcV.cjs +656 -0
- package/dist/{dimensions-DuHaCozA.js → dimensions-b8xRITJn.js} +4 -5
- package/dist/{dimensions-BgPl9ZS9.cjs → dimensions-x8nnAUew.cjs} +1 -1
- package/dist/index.cjs +17 -17
- package/dist/index.js +7935 -7787
- package/dist/index.umd.js +415 -389
- package/dist/packages/sdk-ui/src/ai/api/types.d.ts +1 -0
- package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +7 -0
- package/dist/packages/sdk-ui/src/ai/common/icon-button.d.ts +1 -3
- package/dist/packages/sdk-ui/src/ai/messages/clickable-message.d.ts +0 -1
- package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +7 -0
- package/dist/packages/sdk-ui/src/analytics-composer/query/fix-ranking-filter-jaql.d.ts +8 -0
- 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
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/legend.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/tooltip.d.ts +4 -0
- 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
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/legend.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/{cartesian-chart-options.d.ts → cartesian/cartesian-chart-options.d.ts} +6 -6
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis-configuration.d.ts +41 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-configuration.d.ts +13 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-spacing-calculator.d.ts +41 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/series-processor.d.ts +57 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/data-points.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/tooltip.d.ts +3 -29
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/scatter-plot-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/scatter-tooltip.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip-utils.d.ts +17 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip.d.ts +3 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/translations-to-highcharts.d.ts +7 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/treemap/treemap-tooltip.d.ts +3 -4
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts +3 -3
- package/dist/packages/sdk-ui/src/common/icons/drag-handle-icon.d.ts +2 -1
- package/dist/packages/sdk-ui/src/custom-widgets-provider/types.d.ts +10 -1
- package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/draggable-line.d.ts +5 -1
- package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/utils.d.ts +7 -1
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-dashboard-header-toolbar.d.ts +0 -1
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-edit-mode-toolbar.d.ts +0 -1
- package/dist/packages/sdk-ui/src/dashboard/use-dashboard-theme.d.ts +4 -0
- package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/use-track-component-init.d.ts +4 -1
- package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/with-tracking.d.ts +10 -2
- package/dist/packages/sdk-ui/src/error-boundary/error-boundary.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-existing-filter-editing.d.ts +0 -1
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-new-filter-adding.d.ts +0 -1
- package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/use-members.d.ts +1 -1
- package/dist/packages/sdk-ui/src/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/get-pivot-table-data-point.d.ts +4 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/types.d.ts +32 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/use-apply-pivot-table-cell-events.d.ts +18 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/utils.d.ts +11 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-formatting.d.ts +2 -2
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +8 -4
- package/dist/packages/sdk-ui/src/props.d.ts +33 -1
- package/dist/packages/sdk-ui/src/theme-provider/default-theme-settings.d.ts +5 -0
- package/dist/packages/sdk-ui/src/types.d.ts +84 -3
- package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +3 -3
- package/dist/packages/sdk-ui/src/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -6
- package/dist/{use-common-filters-B1RKY2KD.js → use-common-filters-BHBy4uv6.js} +5815 -5679
- package/dist/use-common-filters-Cg217teN.cjs +350 -0
- package/dist/{widget-composer-B2r2a9Oh.cjs → widget-composer-BPlNiX_P.cjs} +8 -8
- package/dist/{widget-composer-I9gUFBZt.js → widget-composer-SGEFYrXY.js} +248 -216
- package/package.json +29 -27
- package/dist/derive-chart-family-BPYK8evJ.js +0 -90579
- package/dist/derive-chart-family-yUBZXP4x.cjs +0 -669
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/get-legacy-cartesian-chart-options.d.ts +0 -3
- package/dist/use-common-filters-CRgYdKcV.cjs +0 -350
|
@@ -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
|
*
|
|
@@ -3,9 +3,7 @@ import { type IconButtonProps as MuiIconButtonProps } from '@mui/material/IconBu
|
|
|
3
3
|
interface IconButtonProps extends MuiIconButtonProps {
|
|
4
4
|
$hoverColor?: string;
|
|
5
5
|
}
|
|
6
|
-
declare const IconButton: import("@emotion/styled").StyledComponent<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
7
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
8
|
-
}, "loading" | "children" | "disabled" | "size" | "className" | "style" | "tabIndex" | "color" | "sx" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loadingIndicator"> & {
|
|
6
|
+
declare const IconButton: import("@emotion/styled").StyledComponent<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "loading" | "children" | "disabled" | "size" | "className" | "style" | "tabIndex" | "color" | "sx" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loadingIndicator"> & {
|
|
9
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
8
|
} & IconButtonProps, {}, {}>;
|
|
11
9
|
export default IconButton;
|
|
@@ -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,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 '
|
|
1
|
+
import { HighchartsOptionsBuilder } from '../../../../types';
|
|
2
2
|
export declare const barHighchartsOptionsBuilder: HighchartsOptionsBuilder<'bar'>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ChartData } from '
|
|
2
|
-
import { ChartDesignOptions } from '
|
|
3
|
-
import { ChartType, CompleteThemeSettings } from '
|
|
4
|
-
import { CartesianChartDataOptionsInternal } from '
|
|
5
|
-
import { HighchartsOptionsInternal } from '
|
|
6
|
-
import { OptionsWithAlerts } from '
|
|
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
|
package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis-configuration.d.ts
ADDED
|
@@ -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 };
|
package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-configuration.d.ts
ADDED
|
@@ -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 };
|
package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/series-processor.d.ts
ADDED
|
@@ -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 };
|
|
@@ -2,6 +2,7 @@ import { Measure } from '@sisense/sdk-data';
|
|
|
2
2
|
import { HighchartsPoint } from '../types';
|
|
3
3
|
import { SisenseChartDataPoint } from '../sisense-chart/types';
|
|
4
4
|
import { ChartDataOptionsInternal, StyledColumn, StyledMeasureColumn } from '..';
|
|
5
|
+
export declare function createFormatter(dataOption: StyledColumn | StyledMeasureColumn): (value?: number | string | Date) => string;
|
|
5
6
|
export declare function getDataPointMetadata(dataOptionPath: string, dataOption: StyledColumn | StyledMeasureColumn): {
|
|
6
7
|
measure?: Measure | undefined;
|
|
7
8
|
attribute?: import("@sisense/sdk-data").Attribute | undefined;
|
|
@@ -1,30 +1,4 @@
|
|
|
1
1
|
import { ChartDataOptionsInternal } from '../chart-data-options/types';
|
|
2
|
-
import {
|
|
3
|
-
export type TooltipSettings
|
|
4
|
-
export
|
|
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;
|
package/dist/packages/sdk-ui/src/chart-options-processor/translations/scatter-plot-options.d.ts
CHANGED
|
@@ -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 {
|
|
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
|
|
17
|
+
export type ScatterChartHighchartsDataPointContext = HighchartsDataPointContext & {
|
|
18
18
|
point: {
|
|
19
19
|
custom?: ScatterCustomPointOptions;
|
|
20
20
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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:
|
|
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
|
|
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 {
|
|
2
|
+
import { HighchartsDataPointContext, TooltipSettings } from './tooltip-utils';
|
|
3
3
|
import { TFunction } from '@sisense/sdk-common';
|
|
4
|
-
export declare const cartesianDataFormatter: (
|
|
5
|
-
export declare const
|
|
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;
|
package/dist/packages/sdk-ui/src/chart-options-processor/translations/treemap/treemap-tooltip.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { CategoricalChartDataOptionsInternal } from '../../../chart-data-options/types';
|
|
2
2
|
import { TreemapChartDesignOptions } from '../design-options';
|
|
3
|
-
import { TooltipSettings } from '
|
|
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:
|
|
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:
|
|
11
|
+
export declare function treemapTooltipFormatter(context: HighchartsDataPointContext, chartDataOptions: CategoricalChartDataOptionsInternal, designOptions: TreemapChartDesignOptions, translate: TFunction, formatterOptions?: TooltipFormatterOptions): string | false;
|
|
13
12
|
export {};
|
package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts
CHANGED
|
@@ -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 {
|
|
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:
|
|
31
|
+
formatter?: (this: HighchartsDataPointContext, options?: DataLabelsOptions, valuePropName?: string) => string;
|
|
32
32
|
};
|
|
33
|
-
export declare const createValueLabelFormatter: (numberFormatConfig?: NumberFormatConfig, options?: ValueLabelOptions) => (this:
|
|
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;
|
|
@@ -7,7 +7,16 @@ import { GenericDataOptions } from '../types';
|
|
|
7
7
|
export interface CustomWidgetComponentProps<DataOptions = GenericDataOptions, StyleOptions = any> {
|
|
8
8
|
dataSource?: DataSource;
|
|
9
9
|
dataOptions: DataOptions;
|
|
10
|
-
styleOptions: StyleOptions
|
|
10
|
+
styleOptions: StyleOptions & {
|
|
11
|
+
/**
|
|
12
|
+
* The width of the custom widget component.
|
|
13
|
+
*/
|
|
14
|
+
width?: number;
|
|
15
|
+
/**
|
|
16
|
+
* The height of the custom widget component.
|
|
17
|
+
*/
|
|
18
|
+
height?: number;
|
|
19
|
+
};
|
|
11
20
|
filters?: Filter[] | FilterRelations;
|
|
12
21
|
highlights?: Filter[];
|
|
13
22
|
description?: string;
|
package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/draggable-line.d.ts
CHANGED
|
@@ -14,11 +14,15 @@ type DraggableLineProps = {
|
|
|
14
14
|
* The orientation of the draggable line
|
|
15
15
|
*/
|
|
16
16
|
orientation?: DraggableLineOrientation;
|
|
17
|
+
/**
|
|
18
|
+
* The aria-label of the draggable line
|
|
19
|
+
*/
|
|
20
|
+
ariaLabel?: string;
|
|
17
21
|
};
|
|
18
22
|
/**
|
|
19
23
|
* Renders a draggable line component that can be used to resize columns or rows
|
|
20
24
|
*
|
|
21
25
|
* @internal
|
|
22
26
|
*/
|
|
23
|
-
export declare const DraggableLine: ({ id, orientation }: DraggableLineProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const DraggableLine: ({ id, orientation, ariaLabel, }: DraggableLineProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
28
|
export {};
|
|
@@ -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.
|
|
@@ -23,6 +23,8 @@ export declare const useDashboardThemeInternal: ({ styleOptions }: DashboardThem
|
|
|
23
23
|
primaryTextColor: string;
|
|
24
24
|
secondaryTextColor: string;
|
|
25
25
|
backgroundColor: string;
|
|
26
|
+
dividerLineColor: string;
|
|
27
|
+
dividerLineWidth: number;
|
|
26
28
|
};
|
|
27
29
|
};
|
|
28
30
|
palette?: import("..").ColorPaletteTheme | undefined;
|
|
@@ -47,6 +49,8 @@ export declare const useDashboardTheme: (args_0: DashboardThemeParams) => {
|
|
|
47
49
|
primaryTextColor: string;
|
|
48
50
|
secondaryTextColor: string;
|
|
49
51
|
backgroundColor: string;
|
|
52
|
+
dividerLineColor: string;
|
|
53
|
+
dividerLineWidth: number;
|
|
50
54
|
};
|
|
51
55
|
};
|
|
52
56
|
palette?: import("..").ColorPaletteTheme | undefined;
|
|
@@ -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 {}>(
|
|
8
|
+
export declare const useTrackComponentInit: <P extends {}>(trackingComponentConfig: TrackingComponentConfig, props: P) => void;
|
|
9
|
+
export {};
|
package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/with-tracking.d.ts
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { ComponentDecorator } from '../as-sisense-component';
|
|
2
|
-
|
|
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 {};
|
|
@@ -36,6 +36,6 @@ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBo
|
|
|
36
36
|
};
|
|
37
37
|
componentDidCatch(error: Error): void;
|
|
38
38
|
componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void;
|
|
39
|
-
render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
39
|
+
render(): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
40
40
|
}
|
|
41
41
|
export {};
|
|
@@ -9,6 +9,6 @@ interface Props {
|
|
|
9
9
|
export declare const useMembers: ({ initialMembers, initialSelectedMembers, onUpdateSelectedMembers, disabled, }: Props) => {
|
|
10
10
|
members: Member[];
|
|
11
11
|
selectedMembers: import("./members-reducer").SelectedMember[];
|
|
12
|
-
dispatch: import("react").
|
|
12
|
+
dispatch: import("react").ActionDispatch<[action: import("./members-reducer").MembersAction]>;
|
|
13
13
|
};
|
|
14
14
|
export {};
|