@sisense/sdk-ui 2.12.0 → 2.13.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 +18 -18
- package/dist/ai.js +622 -612
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +252 -217
- package/dist/analytics-composer.cjs +18 -18
- package/dist/analytics-composer.js +18 -9
- package/dist/{derive-chart-family-YIDiS_iY.js → derive-chart-family-BcASqlOf.js} +7537 -7379
- package/dist/{derive-chart-family-mugR7Ty1.cjs → derive-chart-family-Ca1NT5US.cjs} +49 -53
- package/dist/{dimensions-CyzZ0dbM.cjs → dimensions-DCT9XInO.cjs} +1 -1
- package/dist/{dimensions-DmRfLrT-.js → dimensions-DOxD1XtL.js} +1 -1
- package/dist/execute-query-CvH_36GC.cjs +1 -0
- package/dist/{execute-query-BCEeyd9s.js → execute-query-JhI9RXe_.js} +1263 -1217
- package/dist/index.cjs +23 -23
- package/dist/index.js +6431 -6208
- package/dist/index.umd.js +263 -271
- package/dist/packages/sdk-ui/src/ai/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/ai/use-get-nlq-result.d.ts +22 -1
- package/dist/packages/sdk-ui/src/app/client-application.d.ts +3 -2
- package/dist/packages/sdk-ui/src/app/settings/settings.d.ts +49 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/design-options/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/types.d.ts +4 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/series-processor.d.ts +14 -14
- package/dist/packages/sdk-ui/src/chart-options-processor/series-labels.d.ts +20 -17
- package/dist/packages/sdk-ui/src/chart-options-processor/stack-labels.d.ts +18 -22
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/axis-section.d.ts +3 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/design-options.d.ts +3 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/legend-section.d.ts +3 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/pie-plot-options.d.ts +3 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts +3 -2
- package/dist/packages/sdk-ui/src/dashboard/components/toolbar/edit-toggle.d.ts +25 -0
- package/dist/packages/sdk-ui/src/dashboard/constants.d.ts +2 -2
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-tabber.d.ts +25 -10
- package/dist/packages/sdk-ui/src/dashboard/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +7 -7
- package/dist/packages/sdk-ui/src/dashboard/use-composed-dashboard.d.ts +1 -1
- package/dist/packages/sdk-ui/src/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/models/dashboard/dashboard-model.d.ts +15 -3
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +3 -2
- package/dist/packages/sdk-ui/src/models/dashboard/types.d.ts +1 -10
- package/dist/packages/sdk-ui/src/models/widget/widget-model-translator/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/models/widget/widget-model-translator/tabber.d.ts +21 -0
- package/dist/packages/sdk-ui/src/models/widget/{widget-model-translator.d.ts → widget-model-translator/widget-model-translator.d.ts} +15 -15
- package/dist/packages/sdk-ui/src/models/widget/widget-model.d.ts +6 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +5 -1
- package/dist/packages/sdk-ui/src/props.d.ts +8 -20
- package/dist/packages/sdk-ui/src/types.d.ts +57 -63
- package/dist/packages/sdk-ui/src/utils/gradient.d.ts +396 -0
- package/dist/packages/sdk-ui/src/utils/omit-undefined.d.ts +21 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-style-options/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-style-options/tabber.d.ts +23 -0
- package/dist/packages/sdk-ui/src/widget-by-id/{translate-widget-style-options.d.ts → translate-widget-style-options/translate-widget-style-options.d.ts} +4 -4
- package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +38 -3
- package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +30 -2
- package/dist/packages/sdk-ui/src/widgets/tabber/tabber-buttons-widget.d.ts +8 -0
- package/dist/packages/sdk-ui/src/widgets/tabber/types.d.ts +110 -0
- package/dist/{types-CevYjGN4.cjs → types-Cl0_Tfey.cjs} +1 -1
- package/dist/{types-DVAfvbpR.js → types-CnFd03Ga.js} +1 -1
- package/dist/{use-common-filters-BXdnB4GI.cjs → use-common-filters-WTVrWfsY.cjs} +174 -174
- package/dist/{use-common-filters-DIF4c8WP.js → use-common-filters-qFWk1Ia5.js} +11458 -11419
- package/dist/{widget-composer-C0lZpwN6.cjs → widget-composer-C7ZAcFHK.cjs} +2 -6
- package/dist/{widget-composer-BB5Jrgae.js → widget-composer-ovIwmgin.js} +4 -8
- package/package.json +7 -7
- package/dist/execute-query-Xt9drS3G.cjs +0 -1
- package/dist/packages/sdk-ui/src/widgets/tabber-widget.d.ts +0 -41
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as AiContextProvider, type AiContextProviderProps } from './ai-context-provider';
|
|
2
2
|
export { type ChatConfig } from './chat-config';
|
|
3
3
|
export { useGetNlgInsights, type UseGetNlgInsightsParams, type UseGetNlgInsightsState, } from './use-get-nlg-insights';
|
|
4
|
-
export { useGetNlqResult, prepareGetNlqResultPayload, type UseGetNlqResultParams, type UseGetNlqResultState, type GetNlqResultParams, } from './use-get-nlq-result';
|
|
4
|
+
export { useGetNlqResult, prepareGetNlqResultPayload, executeGetNlqResult, type ExecuteGetNlqResult, type UseGetNlqResultParams, type UseGetNlqResultState, type GetNlqResultParams, } from './use-get-nlq-result';
|
|
5
5
|
export { useGetQueryRecommendations, type UseGetQueryRecommendationsParams, type GetQueryRecommendationsParams, type UseGetQueryRecommendationsState, DEFAULT_RECOMMENDATIONS_COUNT, } from './use-get-query-recommendations';
|
|
6
6
|
export { useChatSession, type UseChatSessionResult } from './use-chat-session';
|
|
7
7
|
export { useLastNlqResponse } from './use-last-nlq-response';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DataSource } from '@sisense/sdk-data';
|
|
2
2
|
import { HookEnableParam } from '../common/hooks/types';
|
|
3
3
|
import { WidgetProps } from '../props';
|
|
4
|
-
import {
|
|
4
|
+
import { ChatRestApi } from './api/chat-rest-api';
|
|
5
|
+
import { GetNlqResultRequest, NlqResult, NlqResultChartType } from './api/types';
|
|
5
6
|
export interface GetNlqResultParams {
|
|
6
7
|
/** Data source for queries to run against */
|
|
7
8
|
dataSource: DataSource;
|
|
@@ -18,11 +19,31 @@ export interface GetNlqResultParams {
|
|
|
18
19
|
*/
|
|
19
20
|
enableAxisTitlesInWidgetProps?: boolean;
|
|
20
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Result type for NLQ request execution
|
|
24
|
+
*
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export interface ExecuteGetNlqResult {
|
|
28
|
+
/** Raw NLQ response from API for additional processing */
|
|
29
|
+
nlqResult: NlqResult | undefined;
|
|
30
|
+
/** Processed widget props ready for rendering */
|
|
31
|
+
widgetProps: WidgetProps | undefined;
|
|
32
|
+
}
|
|
21
33
|
/** @internal */
|
|
22
34
|
export declare function prepareGetNlqResultPayload(params: GetNlqResultParams): {
|
|
23
35
|
contextTitle: string;
|
|
24
36
|
request: GetNlqResultRequest;
|
|
25
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Executes a natural language query request and returns processed widget props along with the raw response.
|
|
40
|
+
*
|
|
41
|
+
* @param params - NLQ query parameters
|
|
42
|
+
* @param api - Chat REST API instance
|
|
43
|
+
* @returns Promise resolving to processed widget props and raw response
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
export declare function executeGetNlqResult(params: GetNlqResultParams, api: ChatRestApi): Promise<ExecuteGetNlqResult>;
|
|
26
47
|
/**
|
|
27
48
|
* Parameters for {@link useGetNlqResult} hook.
|
|
28
49
|
*/
|
|
@@ -66,9 +66,8 @@ export type AppConfig = {
|
|
|
66
66
|
enabled?: boolean;
|
|
67
67
|
};
|
|
68
68
|
/**
|
|
69
|
-
* Configuration of the tabber
|
|
69
|
+
* Configuration of the tabber widgets feature
|
|
70
70
|
*
|
|
71
|
-
* Set the `tabberConfig.enabled` property to `true` to enable the tabber widget support. Otherwise, the tabber widget will be treated as 'unknown custom widget type'.
|
|
72
71
|
* Only tabber widgets that are configured using the Fusion UI as documented [here](https://docs.sisense.com/main/SisenseLinux/tabber.htm#Creating) are supported.
|
|
73
72
|
*/
|
|
74
73
|
tabberConfig?: {
|
|
@@ -76,6 +75,8 @@ export type AppConfig = {
|
|
|
76
75
|
* Whether to enable tabber widget support
|
|
77
76
|
*
|
|
78
77
|
* If not specified, the default value is `true`
|
|
78
|
+
*
|
|
79
|
+
* @deprecated Tabber widgets are now supported by default and this property is no longer needed.
|
|
79
80
|
*/
|
|
80
81
|
enabled?: boolean;
|
|
81
82
|
};
|
|
@@ -9,6 +9,50 @@ export type AppSettings = Required<ConfigurableAppSettings> & ServerSettings;
|
|
|
9
9
|
* Application settings that can be overridden by the user
|
|
10
10
|
*/
|
|
11
11
|
type ConfigurableAppSettings = AppConfig;
|
|
12
|
+
/**
|
|
13
|
+
* User role permissions
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
type RoleManifest = {
|
|
17
|
+
dashboards?: {
|
|
18
|
+
create: boolean;
|
|
19
|
+
delete: boolean;
|
|
20
|
+
move: boolean;
|
|
21
|
+
rename: boolean;
|
|
22
|
+
duplicate: boolean;
|
|
23
|
+
change_owner: boolean;
|
|
24
|
+
toggle_edit_mode: boolean;
|
|
25
|
+
edit_layout: boolean;
|
|
26
|
+
edit_script: boolean;
|
|
27
|
+
export_dash: boolean;
|
|
28
|
+
export_jpeg: boolean;
|
|
29
|
+
export_image: boolean;
|
|
30
|
+
export_pdf: boolean;
|
|
31
|
+
share: boolean;
|
|
32
|
+
restore: boolean;
|
|
33
|
+
copy_to_server: boolean;
|
|
34
|
+
import: boolean;
|
|
35
|
+
select_palette: boolean;
|
|
36
|
+
replace_datasource: boolean;
|
|
37
|
+
undo_import_dash: boolean;
|
|
38
|
+
toggleDataExploration: boolean;
|
|
39
|
+
filters: {
|
|
40
|
+
create: boolean;
|
|
41
|
+
delete: boolean;
|
|
42
|
+
save: boolean;
|
|
43
|
+
on_off: boolean;
|
|
44
|
+
toggle_expansion: boolean;
|
|
45
|
+
modify: boolean;
|
|
46
|
+
reorder: boolean;
|
|
47
|
+
modify_type: boolean;
|
|
48
|
+
toggle_auto_update: boolean;
|
|
49
|
+
set_defaults: boolean;
|
|
50
|
+
advanced: boolean;
|
|
51
|
+
use_starred: boolean;
|
|
52
|
+
modify_filter_relationship: boolean;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
12
56
|
/**
|
|
13
57
|
* Fusion platform settings
|
|
14
58
|
*/
|
|
@@ -21,6 +65,11 @@ type ServerSettings = {
|
|
|
21
65
|
tenant: {
|
|
22
66
|
name: string;
|
|
23
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* User role permissions
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
permissions: RoleManifest;
|
|
24
73
|
};
|
|
25
74
|
};
|
|
26
75
|
/**
|
|
@@ -8,10 +8,12 @@ export declare function translateStyleOptionsToDesignOptions(styleOptions: PieCh
|
|
|
8
8
|
* Checks if the style options are correct for pie charts.
|
|
9
9
|
*/
|
|
10
10
|
export declare function isCorrectStyleOptions(styleOptions: ChartStyleOptions): styleOptions is PieChartStyleOptions;
|
|
11
|
+
export declare function getDefaultStyleOptions(): PieChartStyleOptions;
|
|
11
12
|
/**
|
|
12
13
|
* Design options translators for pie charts.
|
|
13
14
|
*/
|
|
14
15
|
export declare const designOptionsTranslators: {
|
|
15
16
|
translateStyleOptionsToDesignOptions: typeof translateStyleOptionsToDesignOptions;
|
|
16
17
|
isCorrectStyleOptions: typeof isCorrectStyleOptions;
|
|
18
|
+
getDefaultStyleOptions: typeof getDefaultStyleOptions;
|
|
17
19
|
};
|
|
@@ -85,6 +85,10 @@ export interface ChartBuilder<CT extends SupportedChartType = SupportedChartType
|
|
|
85
85
|
* Checks if the style options are correct for the current chart type.
|
|
86
86
|
*/
|
|
87
87
|
isCorrectStyleOptions: (styleOptions: ChartStyleOptions) => styleOptions is TypedChartStyleOptions<CT>;
|
|
88
|
+
/**
|
|
89
|
+
* Returns the default style options for the current chart type.
|
|
90
|
+
*/
|
|
91
|
+
getDefaultStyleOptions?: () => TypedChartStyleOptions<CT>;
|
|
88
92
|
};
|
|
89
93
|
/**
|
|
90
94
|
* Chart renderer component and related utils
|
package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/series-processor.d.ts
CHANGED
|
@@ -42,22 +42,22 @@ export declare function processSeries(config: SeriesProcessingConfig): {
|
|
|
42
42
|
lineWidth?: number | undefined;
|
|
43
43
|
dataLabels: {
|
|
44
44
|
formatter: (this: import("../../tooltip").HighchartsDataPointContext) => string;
|
|
45
|
+
enabled: boolean;
|
|
46
|
+
rotation?: number | undefined;
|
|
47
|
+
inside?: boolean | undefined;
|
|
48
|
+
align?: "center" | "left" | "right" | undefined;
|
|
49
|
+
verticalAlign?: "top" | "middle" | "bottom" | undefined;
|
|
50
|
+
style?: import("../../translations/types").TextStyle | undefined;
|
|
51
|
+
backgroundColor?: string | import("../../..").HighchartsGradientColorObject | undefined;
|
|
52
|
+
borderColor?: string | import("../../..").HighchartsGradientColorObject | undefined;
|
|
53
|
+
borderRadius?: number | undefined;
|
|
54
|
+
borderWidth?: number | undefined;
|
|
55
|
+
padding?: number | undefined;
|
|
56
|
+
x?: number | undefined;
|
|
57
|
+
y?: number | undefined;
|
|
45
58
|
animation?: {
|
|
46
|
-
defer
|
|
59
|
+
defer?: number | undefined;
|
|
47
60
|
} | undefined;
|
|
48
|
-
y?: number | undefined;
|
|
49
|
-
x?: number | undefined;
|
|
50
|
-
padding?: number | undefined;
|
|
51
|
-
borderWidth?: number | undefined;
|
|
52
|
-
borderRadius?: number | undefined;
|
|
53
|
-
borderColor?: string | undefined;
|
|
54
|
-
backgroundColor?: string | undefined;
|
|
55
|
-
style?: import("../../../types").SeriesLabelsTextStyle | undefined;
|
|
56
|
-
verticalAlign?: "top" | "middle" | "bottom" | undefined;
|
|
57
|
-
align?: "center" | "left" | "right" | undefined;
|
|
58
|
-
inside?: boolean | undefined;
|
|
59
|
-
rotation?: number | undefined;
|
|
60
|
-
enabled: boolean;
|
|
61
61
|
};
|
|
62
62
|
connectNulls: boolean;
|
|
63
63
|
marker: import("../../translations/marker-section").MarkerSettings;
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
defer: number;
|
|
5
|
-
} | undefined;
|
|
6
|
-
y?: number | undefined;
|
|
7
|
-
x?: number | undefined;
|
|
8
|
-
padding?: number | undefined;
|
|
9
|
-
borderWidth?: number | undefined;
|
|
10
|
-
borderRadius?: number | undefined;
|
|
11
|
-
borderColor?: string | undefined;
|
|
12
|
-
backgroundColor?: string | undefined;
|
|
13
|
-
style?: import("..").SeriesLabelsTextStyle | undefined;
|
|
14
|
-
verticalAlign?: "top" | "middle" | "bottom" | undefined;
|
|
15
|
-
align?: "center" | "left" | "right" | undefined;
|
|
16
|
-
inside?: boolean | undefined;
|
|
17
|
-
rotation?: number | undefined;
|
|
1
|
+
import { HighchartsGradientColorObject } from '../utils/gradient';
|
|
2
|
+
import { SeriesLabels, TextStyle } from '..';
|
|
3
|
+
type DataLabelsOptions = {
|
|
18
4
|
enabled: boolean;
|
|
5
|
+
rotation?: number;
|
|
6
|
+
inside?: boolean;
|
|
7
|
+
align?: 'left' | 'center' | 'right';
|
|
8
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
9
|
+
style?: TextStyle;
|
|
10
|
+
backgroundColor?: string | HighchartsGradientColorObject;
|
|
11
|
+
borderColor?: string | HighchartsGradientColorObject;
|
|
12
|
+
borderRadius?: number;
|
|
13
|
+
borderWidth?: number;
|
|
14
|
+
padding?: number;
|
|
15
|
+
x?: number;
|
|
16
|
+
y?: number;
|
|
17
|
+
animation?: {
|
|
18
|
+
defer?: number;
|
|
19
|
+
};
|
|
19
20
|
};
|
|
21
|
+
export declare const prepareDataLabelsOptions: (seriesLabels?: SeriesLabels) => DataLabelsOptions;
|
|
22
|
+
export {};
|
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
import { TotalLabels } from '../types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
fontStyle?: string | undefined;
|
|
10
|
-
textOutline?: string | undefined;
|
|
11
|
-
} | undefined;
|
|
12
|
-
y?: number | undefined;
|
|
13
|
-
x?: number | undefined;
|
|
14
|
-
borderWidth?: number | undefined;
|
|
15
|
-
borderRadius?: number | undefined;
|
|
16
|
-
borderColor?: string | undefined;
|
|
17
|
-
backgroundColor?: string | undefined;
|
|
1
|
+
import { TextStyle, TotalLabels } from '../types';
|
|
2
|
+
import { HighchartsGradientColorObject } from '../utils/gradient';
|
|
3
|
+
type StackLabelsOptions = {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
rotation?: number;
|
|
6
|
+
align?: 'left' | 'center' | 'right';
|
|
7
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
8
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
18
9
|
animation?: {
|
|
19
10
|
defer: number;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
};
|
|
12
|
+
backgroundColor?: string | HighchartsGradientColorObject;
|
|
13
|
+
borderColor?: string | HighchartsGradientColorObject;
|
|
14
|
+
borderRadius?: number;
|
|
15
|
+
borderWidth?: number;
|
|
16
|
+
style?: TextStyle;
|
|
17
|
+
x?: number;
|
|
18
|
+
y?: number;
|
|
25
19
|
};
|
|
20
|
+
export declare const prepareStackLabels: (totalLabels: TotalLabels) => StackLabelsOptions;
|
|
21
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CategoricalXValues } from '../../chart-data/types';
|
|
2
|
+
import { HighchartsGradientColorObject } from '../../utils/gradient';
|
|
2
3
|
import { TextStyle } from './types';
|
|
3
4
|
export type Axis = {
|
|
4
5
|
enabled?: boolean;
|
|
@@ -76,10 +77,10 @@ export type AxisSettings = {
|
|
|
76
77
|
};
|
|
77
78
|
export type StackLabel = {
|
|
78
79
|
style?: TextStyle;
|
|
79
|
-
borderColor?: string;
|
|
80
|
+
borderColor?: string | HighchartsGradientColorObject;
|
|
80
81
|
borderRadius?: number;
|
|
81
82
|
borderWidth?: number;
|
|
82
|
-
backgroundColor?: string;
|
|
83
|
+
backgroundColor?: string | HighchartsGradientColorObject;
|
|
83
84
|
align?: 'center' | 'left' | 'right';
|
|
84
85
|
textAlign?: 'center' | 'left' | 'right';
|
|
85
86
|
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CalendarDayOfWeek } from '../../chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/utils';
|
|
2
|
-
import { CalendarHeatmapViewType, Convolution, LegendOptions, LineOptions, ScattermapMarkers, SeriesLabels, SunburstStyleOptions, TotalLabels, TreemapStyleOptions } from '../../types';
|
|
2
|
+
import { CalendarHeatmapViewType, Convolution, LegendOptions, LineOptions, PieSeriesLabels, ScattermapMarkers, SeriesLabels, SunburstStyleOptions, TotalLabels, TreemapStyleOptions } from '../../types';
|
|
3
3
|
import { Axis } from './axis-section';
|
|
4
4
|
import { FunnelDirection, FunnelLabels, FunnelSize, FunnelType } from './funnel-plot-options';
|
|
5
5
|
import { Marker } from './marker-section';
|
|
6
|
-
import {
|
|
6
|
+
import { PieType } from './pie-plot-options';
|
|
7
7
|
import { ScatterMarkerSize } from './scatter-plot-options';
|
|
8
8
|
import { LineType, StackType } from './translations-to-highcharts';
|
|
9
9
|
import { DesignPerSeries, TextStyle } from './types';
|
|
@@ -89,8 +89,8 @@ export type PolarChartDesignOptions = CartesianChartDesignOptions & {
|
|
|
89
89
|
export declare function isPolarChartDesignOptions(options: CartesianChartDesignOptions): options is PolarChartDesignOptions;
|
|
90
90
|
export type PieChartDesignOptions = BaseDesignOptionsType & {
|
|
91
91
|
pieType?: PieType;
|
|
92
|
-
pieLabels?: PieLabels;
|
|
93
92
|
convolution?: Convolution;
|
|
93
|
+
seriesLabels?: PieSeriesLabels;
|
|
94
94
|
};
|
|
95
95
|
export type FunnelChartDesignOptions = BaseDesignOptionsType & {
|
|
96
96
|
funnelSize?: FunnelSize;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { LegendOptions } from '../../types';
|
|
2
|
+
import { HighchartsGradientColorObject } from '../../utils/gradient';
|
|
2
3
|
import type { TextStyle } from './types';
|
|
3
4
|
export type LegendPosition = 'top' | 'left' | 'right' | 'bottom' | null;
|
|
4
5
|
export type LegendSettings = {
|
|
@@ -6,9 +7,9 @@ export type LegendSettings = {
|
|
|
6
7
|
align?: 'center' | 'left' | 'right';
|
|
7
8
|
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
8
9
|
borderWidth?: number;
|
|
9
|
-
borderColor?: string;
|
|
10
|
+
borderColor?: string | HighchartsGradientColorObject;
|
|
10
11
|
borderRadius?: number;
|
|
11
|
-
backgroundColor?: string;
|
|
12
|
+
backgroundColor?: string | HighchartsGradientColorObject;
|
|
12
13
|
margin?: number;
|
|
13
14
|
padding?: number;
|
|
14
15
|
maxHeight?: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CompleteThemeSettings } from '../../types';
|
|
1
|
+
import { CompleteThemeSettings, PieSeriesLabels } from '../../types';
|
|
2
2
|
import { ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
3
3
|
import { PlotOptions } from '../chart-options-service';
|
|
4
4
|
import { DataLabelsSettings } from './value-label-section';
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const DefaultPieSeriesLabels: PieSeriesLabels;
|
|
6
6
|
export type PieLabels = {
|
|
7
7
|
enabled: boolean;
|
|
8
8
|
showCategories: boolean;
|
|
@@ -26,5 +26,5 @@ export type PieOptions = {
|
|
|
26
26
|
innerSize?: InnerSize;
|
|
27
27
|
};
|
|
28
28
|
type InnerSize = '0%' | '40%' | '80%';
|
|
29
|
-
export declare const getPiePlotOptions: (pieType: "classic" | "donut" | "ring" | undefined,
|
|
29
|
+
export declare const getPiePlotOptions: (pieType: "classic" | "donut" | "ring" | undefined, seriesLabels: PieSeriesLabels | undefined, chartDataOptions: ChartDataOptionsInternal, themeSettings?: CompleteThemeSettings) => PlotOptions;
|
|
30
30
|
export {};
|
package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DataLabelsOptions } from '@sisense/sisense-charts';
|
|
2
2
|
import { NumberFormatConfig, SeriesLabels } from '../../types';
|
|
3
|
+
import { HighchartsGradientColorObject } from '../../utils/gradient';
|
|
3
4
|
import { AxisOrientation } from './axis-section';
|
|
4
5
|
import { PolarType } from './design-options';
|
|
5
6
|
import { HighchartsDataPointContext } from './tooltip-utils';
|
|
@@ -25,8 +26,8 @@ export type DataLabelsSettings = {
|
|
|
25
26
|
verticalAlign?: 'bottom' | 'middle' | 'top';
|
|
26
27
|
padding?: number;
|
|
27
28
|
color?: 'contrast' | string;
|
|
28
|
-
backgroundColor?: string;
|
|
29
|
-
borderColor?: string;
|
|
29
|
+
backgroundColor?: string | HighchartsGradientColorObject;
|
|
30
|
+
borderColor?: string | HighchartsGradientColorObject;
|
|
30
31
|
borderRadius?: number;
|
|
31
32
|
borderWidth?: number;
|
|
32
33
|
animation?: {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Props for the EditToggle component
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface EditToggleProps {
|
|
8
|
+
/**
|
|
9
|
+
* Whether the edit mode is currently active
|
|
10
|
+
*/
|
|
11
|
+
isEditMode: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the history is currently enabled
|
|
14
|
+
*/
|
|
15
|
+
isHistoryEnabled: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Callback function called when the edit toggle button is clicked
|
|
18
|
+
*/
|
|
19
|
+
onToggleClick: () => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Edit toggle button component for dashboard toolbar.
|
|
23
|
+
* Displays appropriate icon and tooltip based on edit mode state.
|
|
24
|
+
*/
|
|
25
|
+
export declare const EditToggle: import("react").NamedExoticComponent<EditToggleProps>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { DeepRequired } from 'ts-essentials';
|
|
2
2
|
import { DashboardByIdConfig, DashboardConfig, EditModeConfig, WidgetsPanelConfig } from './types';
|
|
3
|
-
export declare const DEFAULT_DASHBOARD_CONFIG: DeepRequired<Omit<DashboardConfig, 'widgetsPanel'> & {
|
|
3
|
+
export declare const DEFAULT_DASHBOARD_CONFIG: DeepRequired<Omit<DashboardConfig, 'widgetsPanel' | 'tabbers'> & {
|
|
4
4
|
widgetsPanel: Omit<WidgetsPanelConfig, 'editMode'> & {
|
|
5
5
|
editMode: Omit<EditModeConfig, 'isEditing'>;
|
|
6
6
|
};
|
|
7
7
|
}>;
|
|
8
|
-
export declare const DEFAULT_DASHBOARD_BY_ID_CONFIG: DeepRequired<Omit<DashboardByIdConfig, 'widgetsPanel'> & {
|
|
8
|
+
export declare const DEFAULT_DASHBOARD_BY_ID_CONFIG: DeepRequired<Omit<DashboardByIdConfig, 'widgetsPanel' | 'tabbers'> & {
|
|
9
9
|
widgetsPanel: Omit<WidgetsPanelConfig, 'editMode'> & {
|
|
10
10
|
editMode: Omit<EditModeConfig, 'isEditing'>;
|
|
11
11
|
};
|
|
@@ -1,26 +1,41 @@
|
|
|
1
1
|
import { WidgetPanelLayoutManager } from '../../dashboard/hooks/use-widgets-layout';
|
|
2
|
-
import {
|
|
3
|
-
import { WidgetProps } from '../../props';
|
|
4
|
-
import { TabberTab } from '../../types';
|
|
2
|
+
import { WidgetId, WidgetsPanelColumnLayout } from '../../models';
|
|
3
|
+
import { TabberButtonsWidgetProps, WidgetProps } from '../../props';
|
|
5
4
|
/**
|
|
6
5
|
* @internal
|
|
7
6
|
*/
|
|
8
7
|
export type UseTabber = ({ widgets, config, }: {
|
|
9
8
|
widgets: WidgetProps[];
|
|
10
|
-
config?:
|
|
9
|
+
config?: TabbersConfig | undefined;
|
|
11
10
|
}) => {
|
|
12
11
|
layoutManager: WidgetPanelLayoutManager;
|
|
13
12
|
widgets: WidgetProps[];
|
|
14
13
|
};
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
15
|
+
* Configuration for a single tab in a tabber widget.
|
|
16
|
+
*/
|
|
17
|
+
export type TabberTabConfig = {
|
|
18
|
+
/**
|
|
19
|
+
* Widget IDs from the dashboard to display in the tab.
|
|
20
|
+
*/
|
|
21
|
+
displayWidgetIds: string[];
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Configuration for a tabber widget.
|
|
17
25
|
*/
|
|
18
|
-
export type
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
export type TabberConfig = {
|
|
27
|
+
/**
|
|
28
|
+
* Tabs configuration for the tabber widget.
|
|
29
|
+
*/
|
|
30
|
+
tabs: TabberTabConfig[];
|
|
21
31
|
};
|
|
22
|
-
|
|
23
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Configuration for tabbers in a dashboard.
|
|
34
|
+
* It includes separate configuration for each tabber.
|
|
35
|
+
*/
|
|
36
|
+
export type TabbersConfig = Record<WidgetId, TabberConfig>;
|
|
37
|
+
export declare const isTabberButtonsWidget: (widget: WidgetProps) => widget is TabberButtonsWidgetProps;
|
|
38
|
+
export declare const modifyLayout: (tabbersOptions: TabbersConfig, tabberState: Record<string, number>) => (layout: WidgetsPanelColumnLayout) => WidgetsPanelColumnLayout;
|
|
24
39
|
/**
|
|
25
40
|
* Hook that modifies widget properties so it became a tabber widget.
|
|
26
41
|
* Incapsulates logic for updating layout via navigating tabs
|
|
@@ -3,4 +3,4 @@ export { Dashboard } from './dashboard';
|
|
|
3
3
|
export { useComposedDashboard, useComposedDashboardInternal, type ComposableDashboardProps, type UseComposedDashboardOptions, type ComposedDashboardResult, } from './use-composed-dashboard';
|
|
4
4
|
export { useDashboardTheme, type DashboardThemeParams } from './use-dashboard-theme';
|
|
5
5
|
export * from './hooks';
|
|
6
|
-
export type { DashboardByIdProps, DashboardProps, DashboardLayoutOptions, DashboardStyleOptions, DashboardConfig, DashboardByIdConfig, WidgetsPanelConfig, EditModeConfig, DashboardFiltersPanelConfig, } from './types';
|
|
6
|
+
export type { DashboardByIdProps, DashboardProps, DashboardLayoutOptions, DashboardStyleOptions, DashboardConfig, DashboardByIdConfig, WidgetsPanelConfig, EditModeConfig, DashboardFiltersPanelConfig, TabbersConfig, TabberConfig, TabberTabConfig, } from './types';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
3
3
|
import { DashboardChangeAction } from '../dashboard/dashboard';
|
|
4
|
+
import { TabbersConfig } from '../dashboard/hooks/use-tabber';
|
|
4
5
|
import { FiltersPanelConfig } from '../filters/components/filters-panel/types';
|
|
5
|
-
import { DashboardStyleOptions,
|
|
6
|
+
import { DashboardStyleOptions, WidgetsOptions, WidgetsPanelLayout } from '../models';
|
|
6
7
|
import { WidgetProps } from '../props';
|
|
7
8
|
export type { DashboardStyleOptions, WidgetsPanelColumnLayout, WidgetsPanelLayout, WidgetsPanelCell, WidgetsPanelRow, WidgetsPanelColumn, } from '../models';
|
|
9
|
+
export type { TabbersConfig, TabberConfig, TabberTabConfig } from '../dashboard/hooks/use-tabber';
|
|
8
10
|
/**
|
|
9
11
|
* Props of the {@link DashboardById} component.
|
|
10
12
|
*/
|
|
@@ -161,6 +163,10 @@ export interface DashboardConfig {
|
|
|
161
163
|
* Configuration for the widgets panel
|
|
162
164
|
*/
|
|
163
165
|
widgetsPanel?: WidgetsPanelConfig;
|
|
166
|
+
/**
|
|
167
|
+
* Configuration for tabber widgets in the dashboard
|
|
168
|
+
*/
|
|
169
|
+
tabbers?: TabbersConfig;
|
|
164
170
|
}
|
|
165
171
|
/**
|
|
166
172
|
* Dashboard configuration
|
|
@@ -222,12 +228,6 @@ export interface DashboardProps {
|
|
|
222
228
|
defaultDataSource?: DataSource;
|
|
223
229
|
/** The options for each of the widgets */
|
|
224
230
|
widgetsOptions?: WidgetsOptions;
|
|
225
|
-
/**
|
|
226
|
-
* The Tabber widgets configurations as a single dashboard config
|
|
227
|
-
*
|
|
228
|
-
* @internal
|
|
229
|
-
*/
|
|
230
|
-
tabbersOptions?: TabbersOptions;
|
|
231
231
|
/** The style options for the dashboard */
|
|
232
232
|
styleOptions?: DashboardStyleOptions;
|
|
233
233
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Filter, FilterRelations } from '@sisense/sdk-data';
|
|
2
2
|
import { WidgetsPanelLayout } from '../models';
|
|
3
3
|
import { DashboardProps } from './types.js';
|
|
4
|
-
export type ComposableDashboardProps = Pick<DashboardProps, 'filters' | 'widgets' | 'widgetsOptions' | 'layoutOptions' | '
|
|
4
|
+
export type ComposableDashboardProps = Pick<DashboardProps, 'filters' | 'widgets' | 'widgetsOptions' | 'layoutOptions' | 'config'>;
|
|
5
5
|
export type UseComposedDashboardOptions = {
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
@@ -18,6 +18,7 @@ export { TableWidget } from './widgets/table-widget';
|
|
|
18
18
|
export { PivotTableWidget } from './widgets/pivot-table-widget';
|
|
19
19
|
export { TextWidget } from './widgets/text-widget';
|
|
20
20
|
export { Widget } from './widgets/widget';
|
|
21
|
+
export { TabberButtonsWidget } from './widgets/tabber/tabber-buttons-widget';
|
|
21
22
|
export { ContextMenu } from './common/components/menu/context-menu/context-menu';
|
|
22
23
|
export { DrilldownBreadcrumbs } from './widgets/common/drilldown-breadcrumbs';
|
|
23
24
|
export * from './line-chart';
|
|
@@ -105,3 +106,4 @@ export { updateDrilldownSelections } from './widgets/common/use-drilldown-core';
|
|
|
105
106
|
export { getSelectionTitleMenuItem, getDrilldownMenuItems } from './widgets/hooks/use-drilldown';
|
|
106
107
|
export { DataSchemaBrowser } from './data-browser/data-schema-browser/data-schema-browser';
|
|
107
108
|
export { type TranslationDictionary, PACKAGE_NAMESPACE as translationNamespace, } from './translation/resources';
|
|
109
|
+
export * from './utils/gradient';
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import { AnyObject, DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
2
2
|
import { DashboardSettings } from '../../api/types/dashboard-dto';
|
|
3
3
|
import { DashboardLayoutOptions } from '../../dashboard';
|
|
4
|
-
import {
|
|
4
|
+
import { TabbersConfig } from '../../dashboard/hooks/use-tabber';
|
|
5
|
+
import { DashboardStyleOptions, WidgetModel } from '../../models';
|
|
5
6
|
import { type WidgetsOptions } from './types';
|
|
7
|
+
/**
|
|
8
|
+
* Configuration data for a dashboard model.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export interface DashboardModelConfig {
|
|
13
|
+
/**
|
|
14
|
+
* Configuration for tabber widgets in the dashboard.
|
|
15
|
+
*/
|
|
16
|
+
tabbers?: TabbersConfig;
|
|
17
|
+
}
|
|
6
18
|
/**
|
|
7
19
|
* Model of Sisense Fusion dashboard defined in the abstractions of Compose SDK.
|
|
8
20
|
*
|
|
@@ -51,11 +63,11 @@ export interface DashboardModel {
|
|
|
51
63
|
*/
|
|
52
64
|
widgetsOptions: WidgetsOptions;
|
|
53
65
|
/**
|
|
54
|
-
*
|
|
66
|
+
* Dashboard configuration.
|
|
55
67
|
*
|
|
56
68
|
* @internal
|
|
57
69
|
*/
|
|
58
|
-
|
|
70
|
+
config: DashboardModelConfig;
|
|
59
71
|
/**
|
|
60
72
|
* Dashboard settings.
|
|
61
73
|
*
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Dimension, Filter, FilterRelations, FilterRelationsModel, FilterRelationsModelNode, Measure } from '@sisense/sdk-data';
|
|
2
2
|
import { RestApi } from '../../api/rest-api';
|
|
3
3
|
import { JtdTarget, TriggerMethod } from '../../dashboard/hooks/jtd/jtd-types';
|
|
4
|
+
import { TabbersConfig } from '../../dashboard/hooks/use-tabber';
|
|
4
5
|
import { Panel, WidgetDto } from '../../widget-by-id/types';
|
|
5
6
|
import { type CascadingFilterDto, DashboardDto, type FilterDto, type LayoutDto } from '../../api/types/dashboard-dto';
|
|
6
|
-
import type {
|
|
7
|
+
import type { WidgetsOptions, WidgetsPanelColumnLayout } from './types';
|
|
7
8
|
export declare const translateLayout: (layout: LayoutDto) => WidgetsPanelColumnLayout;
|
|
8
9
|
export declare function extractDashboardFilters(dashboardFilters: Array<FilterDto | CascadingFilterDto>, filterRelationsModel?: FilterRelationsModel | FilterRelationsModelNode): Filter[] | FilterRelations;
|
|
9
10
|
export declare const getJtdNavigateType: (widget: WidgetDto) => TriggerMethod;
|
|
@@ -19,7 +20,7 @@ export declare function extractPivotTargetsConfigFromWidgetDto(widget: WidgetDto
|
|
|
19
20
|
location: 'row' | 'column' | 'value';
|
|
20
21
|
} | Measure, JtdTarget[]> | undefined;
|
|
21
22
|
export declare function translateWidgetsOptions(widgets?: WidgetDto[]): WidgetsOptions;
|
|
22
|
-
export declare function translateTabbersOptions(widgets?: WidgetDto[]):
|
|
23
|
+
export declare function translateTabbersOptions(widgets?: WidgetDto[]): TabbersConfig;
|
|
23
24
|
/**
|
|
24
25
|
* Replace all shared formulas, which defined by id references, in the dashboard with their actual values.
|
|
25
26
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CommonFiltersOptions } from '../../common-filters/types';
|
|
2
2
|
import type { JumpToDashboardConfig, JumpToDashboardConfigForPivot } from '../../dashboard/hooks/jtd/jtd-types';
|
|
3
|
-
import { ColorPaletteTheme
|
|
3
|
+
import { ColorPaletteTheme } from '../../types';
|
|
4
4
|
export type { CommonFiltersOptions, CommonFiltersApplyMode, FiltersIgnoringRules, } from '../../common-filters/types';
|
|
5
5
|
/**
|
|
6
6
|
* Part of Dashboard layout, which describes how widgets are arranged in a cell
|
|
@@ -81,15 +81,6 @@ export type WidgetsOptions = Record<WidgetId, {
|
|
|
81
81
|
*/
|
|
82
82
|
jtdConfig?: JumpToDashboardConfig | JumpToDashboardConfigForPivot;
|
|
83
83
|
}>;
|
|
84
|
-
/**
|
|
85
|
-
* Options for TabberWidets in a dashboard
|
|
86
|
-
*
|
|
87
|
-
* This property actually moves responsibility on the layout management from the tabber widgets to the dashboard,
|
|
88
|
-
* storing all the tabbers configs in the single place
|
|
89
|
-
*
|
|
90
|
-
* @internal
|
|
91
|
-
*/
|
|
92
|
-
export type TabbersOptions = Record<WidgetId, TabberConfig>;
|
|
93
84
|
/**
|
|
94
85
|
* Style options for the dashboard.
|
|
95
86
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './widget-model-translator';
|