@sisense/sdk-ui 1.20.0 → 1.22.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 +67 -67
- package/dist/ai.js +895 -950
- package/dist/analytics-composer.cjs +18 -18
- package/dist/analytics-composer.js +595 -595
- package/dist/{get-widget-options-B9VkQy30.js → get-widget-options-DTIulxC2.js} +12387 -12162
- package/dist/{get-widget-options-CQuHmkuX.cjs → get-widget-options-DixoCEhn.cjs} +92 -92
- package/dist/index.cjs +125 -66
- package/dist/index.js +6907 -6448
- package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +1 -1
- package/dist/packages/sdk-ui/src/ai/use-get-nlg-query-result.d.ts +3 -1
- package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +4 -1
- package/dist/packages/sdk-ui/src/api/rest-api.d.ts +4 -0
- package/dist/packages/sdk-ui/src/app/client-application.d.ts +57 -13
- package/dist/packages/sdk-ui/src/app/settings/settings.d.ts +5 -0
- package/dist/packages/sdk-ui/src/boxplot-utils.d.ts +6 -5
- package/dist/packages/sdk-ui/src/chart/chart.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart-data/advanced-analytics-data.d.ts +6 -42
- package/dist/packages/sdk-ui/src/chart-data/areamap-data.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart-data/boxplot-data.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart-data/cartesian-data.d.ts +3 -3
- package/dist/packages/sdk-ui/src/chart-data/categorical-data.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart-data/filter-and-aggregate-chart-data.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-data/indicator-data.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart-data/range-data.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-data/scatter-data.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-data/scattermap-data.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart-data/table-data.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-data-options/translate-boxplot-data-options.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart-data-options/types.d.ts +37 -60
- package/dist/packages/sdk-ui/src/chart-data-options/utils.d.ts +34 -19
- package/dist/packages/sdk-ui/src/chart-data-options/validate-data-options/validate-data-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/data-points.d.ts +5 -4
- package/dist/packages/sdk-ui/src/chart-options-processor/plot-bands.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/axis-section.d.ts +5 -5
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/boxplot/boxplot-axis.d.ts +3 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/scatter-axis.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip-utils.d.ts +5 -5
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/translations-to-highcharts.d.ts +1 -1
- package/dist/packages/sdk-ui/src/charts/indicator/indicator-legacy-chart-data-options.d.ts +1 -1
- package/dist/packages/sdk-ui/src/common/hooks/use-fetch.d.ts +2 -5
- package/dist/packages/sdk-ui/src/common/hooks/use-synced-state.d.ts +19 -0
- package/dist/packages/sdk-ui/src/common-filters/selection-utils.d.ts +9 -1
- package/dist/packages/sdk-ui/src/common-filters/use-common-filters.d.ts +4 -2
- package/dist/packages/sdk-ui/src/dashboard/components/HorizontalCollapse.d.ts +5 -0
- package/dist/packages/sdk-ui/src/dashboard/components/dashboard-header.d.ts +1 -0
- package/dist/packages/sdk-ui/src/dashboard/dashboard-by-id.d.ts +4 -1
- package/dist/packages/sdk-ui/src/dashboard/dashboard-helpers.d.ts +91 -0
- package/dist/packages/sdk-ui/src/dashboard/dashboard.d.ts +13 -1
- package/dist/packages/sdk-ui/src/dashboard/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +18 -0
- package/dist/packages/sdk-ui/src/dashboard/use-composed-dashboard.d.ts +30 -0
- package/dist/packages/sdk-ui/src/dashboard/use-dashboard-theme.d.ts +40 -0
- package/dist/packages/sdk-ui/src/dashboard-widget/dashboard-widget.d.ts +2 -2
- package/dist/packages/sdk-ui/src/dashboard-widget/translate-widget-data-options.d.ts +13 -3
- package/dist/packages/sdk-ui/src/dashboard-widget/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/dashboard-widget/utils.d.ts +1 -0
- package/dist/packages/sdk-ui/src/decorators/hook-decorators/with-tracking.d.ts +3 -2
- package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/date-filter/date-range-filter-tile/date-range-filter-display.d.ts +2 -1
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/filters-panel.d.ts +2 -2
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/unsupported-filter-tile.d.ts +12 -0
- package/dist/packages/sdk-ui/src/formulas/use-get-shared-formula.d.ts +3 -4
- package/dist/packages/sdk-ui/src/index.d.ts +16 -6
- package/dist/packages/sdk-ui/src/models/dashboard/dashboard-model-translator.d.ts +2 -2
- package/dist/packages/sdk-ui/src/models/dashboard/dashboard-model.d.ts +1 -1
- package/dist/packages/sdk-ui/src/models/dashboard/get-dashboard-model.d.ts +0 -2
- package/dist/packages/sdk-ui/src/models/dashboard/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-dto-utils.d.ts +11 -0
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dasboard-model-utils.d.ts +22 -0
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model-reducer.d.ts +63 -0
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model.d.ts +38 -0
- package/dist/packages/sdk-ui/src/models/dashboard/use-get-dashboard-model.d.ts +2 -2
- package/dist/packages/sdk-ui/src/models/dashboard/use-get-dashboard-models.d.ts +2 -2
- package/dist/packages/sdk-ui/src/models/hierarchy/use-get-hierarchy-models.d.ts +3 -3
- package/dist/packages/sdk-ui/src/models/widget/use-get-widget-model.d.ts +3 -3
- package/dist/packages/sdk-ui/src/models/widget/widget-model-translator.d.ts +18 -1
- package/dist/packages/sdk-ui/src/models/widget/widget-model.d.ts +1 -3
- package/dist/packages/sdk-ui/src/plugins-provider/types.d.ts +4 -4
- package/dist/packages/sdk-ui/src/plugins-provider/use-execute-plugin-query.d.ts +2 -2
- package/dist/packages/sdk-ui/src/props.d.ts +42 -23
- package/dist/packages/sdk-ui/src/query-execution/execute-query-by-widget-id.d.ts +1 -1
- package/dist/packages/sdk-ui/src/query-execution/use-execute-csv-query.d.ts +1 -1
- package/dist/packages/sdk-ui/src/query-execution/use-execute-pivot-query.d.ts +1 -1
- package/dist/packages/sdk-ui/src/query-execution/use-execute-query-by-widget-id.d.ts +2 -2
- package/dist/packages/sdk-ui/src/query-execution/use-execute-query.d.ts +1 -1
- package/dist/packages/sdk-ui/src/translation/custom-translations-loader.d.ts +10 -0
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +98 -4
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +196 -8
- package/dist/packages/sdk-ui/src/types.d.ts +24 -3
- package/dist/packages/sdk-ui/src/widgets/chart-widget.d.ts +1 -1
- package/dist/packages/sdk-ui/src/widgets/common/drilldown-utils.d.ts +7 -0
- package/dist/packages/sdk-ui/src/widgets/common/{use-drilldown.d.ts → use-drilldown-core.d.ts} +7 -8
- package/dist/packages/sdk-ui/src/widgets/common-widget.d.ts +1 -0
- package/dist/packages/sdk-ui/src/widgets/hooks/use-drilldown.d.ts +25 -0
- package/dist/packages/sdk-ui/src/widgets/hooks/use-with-drilldown.d.ts +12 -0
- package/dist/packages/sdk-ui/src/widgets/pivot-table-widget.d.ts +1 -1
- package/dist/packages/sdk-ui/src/widgets/widget.d.ts +9 -0
- package/dist/{table-widget-D9gDMRyX.js → table-widget-CLL1iN3H.js} +14844 -14659
- package/dist/{table-widget-DXNtx9V_.cjs → table-widget-CYCcYqzZ.cjs} +179 -179
- package/package.json +9 -9
- package/dist/packages/sdk-ui/src/ai/api/errors.d.ts +0 -4
- package/dist/packages/sdk-ui/src/widgets/common/drilldown-connector.d.ts +0 -19
|
@@ -38,6 +38,9 @@ export interface UseGetNlgQueryResultState {
|
|
|
38
38
|
refetch: () => void;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
|
+
*
|
|
42
|
+
* @param params - {@link UseGetNlgQueryResultParams}
|
|
43
|
+
* @param enabled - boolean flag to enable/disable this hook
|
|
41
44
|
* @internal
|
|
42
45
|
*/
|
|
43
46
|
export declare const useGetNlgQueryResultInternal: (params: GetNlgQueryResultProps | GetNlgQueryResultRequest, enabled?: boolean) => UseGetNlgQueryResultState;
|
|
@@ -63,7 +66,6 @@ export declare const useGetNlgQueryResultInternal: (params: GetNlgQueryResultPro
|
|
|
63
66
|
*
|
|
64
67
|
* return <p>{data}</p>;
|
|
65
68
|
* ```
|
|
66
|
-
* @param params - {@link UseGetNlgQueryResultParams}
|
|
67
69
|
* @returns Response object containing a text summary
|
|
68
70
|
* @group Generative AI
|
|
69
71
|
* @beta
|
|
@@ -29,6 +29,10 @@ export interface UseGetQueryRecommendationsState {
|
|
|
29
29
|
/** Callback to trigger a refetch of the data */
|
|
30
30
|
refetch: () => void;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* @param params - {@link UseGetQueryRecommendationsParams}
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
32
36
|
export declare const useGetQueryRecommendationsInternal: (params: UseGetQueryRecommendationsParams) => UseGetQueryRecommendationsState;
|
|
33
37
|
/**
|
|
34
38
|
* React hook that fetches recommended questions for a data model or perspective.
|
|
@@ -57,7 +61,6 @@ export declare const useGetQueryRecommendationsInternal: (params: UseGetQueryRec
|
|
|
57
61
|
* </ul>
|
|
58
62
|
* );
|
|
59
63
|
* ```
|
|
60
|
-
* @param params - {@link UseGetQueryRecommendationsParams}
|
|
61
64
|
* @returns An array of objects, each containing recommended question text and its corresponding JAQL
|
|
62
65
|
* @group Generative AI
|
|
63
66
|
* @beta
|
|
@@ -49,6 +49,10 @@ export declare class RestApi {
|
|
|
49
49
|
* Get hierarchies
|
|
50
50
|
*/
|
|
51
51
|
getHierarchies: ({ dataSource, dimension, ids, alwaysIncluded, }: GetHierarchiesOptions) => Promise<HierarchyDto[]>;
|
|
52
|
+
/**
|
|
53
|
+
* Partially update a dashboard
|
|
54
|
+
*/
|
|
55
|
+
patchDashboard: (dashboardOid: string, dashboard: Partial<DashboardDto>) => Promise<DashboardDto | undefined>;
|
|
52
56
|
}
|
|
53
57
|
export declare const useGetApi: () => RestApi;
|
|
54
58
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { HttpClient
|
|
1
|
+
import { HttpClient } from '@sisense/sdk-rest-client';
|
|
2
2
|
import { QueryClient } from '@sisense/sdk-query-client';
|
|
3
3
|
import { DataSource } from '@sisense/sdk-data';
|
|
4
4
|
import { DateConfig } from '../query/date-formats';
|
|
5
5
|
import { AppSettings } from './settings/settings';
|
|
6
6
|
import { PivotClient } from '@sisense/sdk-pivot-client';
|
|
7
|
-
import { LoadingIndicatorConfig } from '../types';
|
|
7
|
+
import { CustomTranslationObject, LoadingIndicatorConfig } from '../types';
|
|
8
8
|
import { TrackingEventDetails } from '@sisense/sdk-tracking';
|
|
9
9
|
import { SisenseContextProviderProps } from '../props';
|
|
10
10
|
/**
|
|
@@ -15,10 +15,60 @@ export type AppConfig = {
|
|
|
15
15
|
* A [date-fns Locale](https://date-fns.org/v2.30.0/docs/Locale)
|
|
16
16
|
*/
|
|
17
17
|
locale?: Locale;
|
|
18
|
+
/**
|
|
19
|
+
* Translation Configurations
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
translationConfig?: {
|
|
24
|
+
/**
|
|
25
|
+
* Language code to be used for translations
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
language?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Additional translation resources to be loaded
|
|
32
|
+
*
|
|
33
|
+
* You can find the list of available translation keys in the translation folder of every package.
|
|
34
|
+
*
|
|
35
|
+
* Translation keys that are not provided will default to the English translation.
|
|
36
|
+
* If translation is provided for a package other than sdk-ui, please specify the packageName property using camelCase.
|
|
37
|
+
*
|
|
38
|
+
* Important: Do not translate parts in {{}} - these are placeholders for dynamic values and will be matched using provided variable names.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```typescript
|
|
42
|
+
* customTranslations: [
|
|
43
|
+
* {
|
|
44
|
+
* language: 'fr',
|
|
45
|
+
* resources: {
|
|
46
|
+
* errors: {
|
|
47
|
+
* invalidFilterType: 'Type de filtre invalide',
|
|
48
|
+
* },
|
|
49
|
+
* },
|
|
50
|
+
* },
|
|
51
|
+
* {
|
|
52
|
+
* language: 'es',
|
|
53
|
+
* packageName: 'sdkData'
|
|
54
|
+
* resources: {
|
|
55
|
+
* errors: {
|
|
56
|
+
* measure: {
|
|
57
|
+
* unsupportedType: 'Tipo de medida no compatible',
|
|
58
|
+
* },
|
|
59
|
+
* },
|
|
60
|
+
* },
|
|
61
|
+
* },
|
|
62
|
+
* ]
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
customTranslations?: CustomTranslationObject[];
|
|
66
|
+
};
|
|
18
67
|
/**
|
|
19
68
|
* Language code to be used for translations
|
|
20
69
|
*
|
|
21
70
|
* @internal
|
|
71
|
+
* @deprecated Use `translationConfig.language` instead
|
|
22
72
|
*/
|
|
23
73
|
language?: string;
|
|
24
74
|
/**
|
|
@@ -81,10 +131,12 @@ export type AppConfig = {
|
|
|
81
131
|
*/
|
|
82
132
|
trackingConfig?: {
|
|
83
133
|
/**
|
|
84
|
-
* Whether to enable tracking
|
|
134
|
+
* Whether to enable or disable tracking in development or test environment.
|
|
85
135
|
*
|
|
86
136
|
* If not specified, the default value is `true`
|
|
87
137
|
*
|
|
138
|
+
* In production, tracking is always enabled.
|
|
139
|
+
*
|
|
88
140
|
* @internal
|
|
89
141
|
*/
|
|
90
142
|
enabled?: boolean;
|
|
@@ -99,7 +151,7 @@ export type AppConfig = {
|
|
|
99
151
|
*
|
|
100
152
|
* @internal
|
|
101
153
|
*/
|
|
102
|
-
export
|
|
154
|
+
export interface ClientApplication {
|
|
103
155
|
/**
|
|
104
156
|
* Gets the underlying HTTP Client
|
|
105
157
|
*/
|
|
@@ -115,7 +167,7 @@ export declare class ClientApplication {
|
|
|
115
167
|
/**
|
|
116
168
|
* Gets the default data source being used as default for child components with no explicitly defined data source
|
|
117
169
|
*/
|
|
118
|
-
readonly defaultDataSource
|
|
170
|
+
readonly defaultDataSource?: DataSource;
|
|
119
171
|
/**
|
|
120
172
|
* Gets the application settings
|
|
121
173
|
*/
|
|
@@ -129,14 +181,6 @@ export declare class ClientApplication {
|
|
|
129
181
|
*/
|
|
130
182
|
clear: () => void;
|
|
131
183
|
};
|
|
132
|
-
/**
|
|
133
|
-
* Construct new Sisense Client Application
|
|
134
|
-
*
|
|
135
|
-
* @param url - URL to the sisense environment
|
|
136
|
-
* @param auth - Authentication to be used
|
|
137
|
-
* @param defaultDataSource - Default data source to be used by child components by default
|
|
138
|
-
*/
|
|
139
|
-
constructor(url: string, auth: Authenticator, defaultDataSource?: DataSource);
|
|
140
184
|
}
|
|
141
185
|
type ClientApplicationParams = Pick<SisenseContextProviderProps, 'appConfig' | 'defaultDataSource' | 'url' | 'token' | 'wat' | 'ssoEnabled' | 'enableSilentPreAuth' | 'useFusionAuth'>;
|
|
142
186
|
/** @internal */
|
|
@@ -14,11 +14,12 @@ export declare const boxWhiskerProcessResultInternal: (boxWhiskerData: QueryResu
|
|
|
14
14
|
/**
|
|
15
15
|
* Processes box whisker data and outliers data to combine them into a single data set.
|
|
16
16
|
*
|
|
17
|
-
* @param
|
|
18
|
-
* @param
|
|
19
|
-
* @param
|
|
20
|
-
* @returns
|
|
21
|
-
* @
|
|
17
|
+
* @param boxWhiskerData - The data for the box whisker.
|
|
18
|
+
* @param outliersData - The data for the outliers.
|
|
19
|
+
* @param dataOptions - Optional data options for customizing data processing.
|
|
20
|
+
* @returns The combined data with outliers included in the box whisker plot.
|
|
21
|
+
* @shortDescription Utility function that combines box whisker data and outliers data
|
|
22
|
+
* @group Charts
|
|
22
23
|
*/
|
|
23
24
|
export declare function boxWhiskerProcessResult(boxWhiskerData: QueryResultData, outliersData: QueryResultData, dataOptions?: BoxplotChartCustomDataOptions): QueryResultData;
|
|
24
25
|
export declare const executeBoxplotQuery: ({ app, chartDataOptions, dataSource, attributes, measures, filters, highlights, }: {
|
|
@@ -16,6 +16,7 @@ import { ChartProps } from '../props';
|
|
|
16
16
|
*
|
|
17
17
|
* @param props - Chart properties
|
|
18
18
|
* @returns Chart component representing a chart type as specified in `ChartProps.`{@link ChartProps.chartType | chartType}
|
|
19
|
+
* @shortDescription Common component for rendering charts of different types including table
|
|
19
20
|
* @group Charts
|
|
20
21
|
*/
|
|
21
22
|
export declare const Chart: import("react").FunctionComponent<ChartProps>;
|
|
@@ -1,50 +1,14 @@
|
|
|
1
1
|
import { DataTable } from '../chart-data-processor/table-processor';
|
|
2
2
|
import { CartesianChartData } from './types';
|
|
3
|
-
import { CartesianChartDataOptionsInternal } from '../chart-data-options/types';
|
|
3
|
+
import { CartesianChartDataOptionsInternal, StyledMeasureColumn } from '../chart-data-options/types';
|
|
4
4
|
export declare const isForecastChart: (dataOptions: CartesianChartDataOptionsInternal) => boolean;
|
|
5
5
|
export declare const isTrendChart: (dataOptions: CartesianChartDataOptionsInternal) => boolean;
|
|
6
6
|
export declare const createForecastDataOptions: (dataOptions: CartesianChartDataOptionsInternal) => {
|
|
7
|
-
rangeValues:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
showOnRightAxis?: boolean | undefined;
|
|
13
|
-
numberFormatConfig?: import("..").NumberFormatConfig | undefined;
|
|
14
|
-
chartType?: import("..").SeriesChartType | undefined;
|
|
15
|
-
color?: import("./data-coloring").DataColorOptions | undefined;
|
|
16
|
-
enabled?: boolean | undefined;
|
|
17
|
-
treatNullDataAsZeros?: boolean | undefined;
|
|
18
|
-
connectNulls?: boolean | undefined;
|
|
19
|
-
totalsCalculation?: import("@sisense/sdk-data").TotalsCalculation | undefined;
|
|
20
|
-
dataBars?: boolean | undefined;
|
|
21
|
-
forecast?: import("@sisense/sdk-data").ForecastFormulaOptions | undefined;
|
|
22
|
-
trend?: import("@sisense/sdk-data").TrendFormulaOptions | undefined;
|
|
23
|
-
width?: number | undefined;
|
|
24
|
-
seriesStyleOptions?: import("../chart-data-options/types").SeriesStyleOptions | undefined;
|
|
25
|
-
}[][];
|
|
26
|
-
seriesValues: import("../chart-data-options/types").Value[];
|
|
27
|
-
y: {
|
|
28
|
-
title: string;
|
|
29
|
-
name: string;
|
|
30
|
-
aggregation?: string | undefined;
|
|
31
|
-
sortType?: import("@sisense/sdk-data").SortDirection | undefined;
|
|
32
|
-
showOnRightAxis?: boolean | undefined;
|
|
33
|
-
numberFormatConfig?: import("..").NumberFormatConfig | undefined;
|
|
34
|
-
chartType?: import("..").SeriesChartType | undefined;
|
|
35
|
-
color?: import("./data-coloring").DataColorOptions | undefined;
|
|
36
|
-
enabled?: boolean | undefined;
|
|
37
|
-
treatNullDataAsZeros?: boolean | undefined;
|
|
38
|
-
connectNulls?: boolean | undefined;
|
|
39
|
-
totalsCalculation?: import("@sisense/sdk-data").TotalsCalculation | undefined;
|
|
40
|
-
dataBars?: boolean | undefined;
|
|
41
|
-
forecast?: import("@sisense/sdk-data").ForecastFormulaOptions | undefined;
|
|
42
|
-
trend?: import("@sisense/sdk-data").TrendFormulaOptions | undefined;
|
|
43
|
-
width?: number | undefined;
|
|
44
|
-
seriesStyleOptions?: import("../chart-data-options/types").SeriesStyleOptions | undefined;
|
|
45
|
-
}[];
|
|
46
|
-
x: import("../chart-data-options/types").Category[];
|
|
47
|
-
breakBy: import("../chart-data-options/types").Category[];
|
|
7
|
+
rangeValues: StyledMeasureColumn[][];
|
|
8
|
+
seriesValues: StyledMeasureColumn[];
|
|
9
|
+
y: StyledMeasureColumn[];
|
|
10
|
+
x: import("../chart-data-options/types").StyledColumn[];
|
|
11
|
+
breakBy: import("../chart-data-options/types").StyledColumn[];
|
|
48
12
|
seriesToColorMap?: import("..").ValueToColorMap | undefined;
|
|
49
13
|
};
|
|
50
14
|
export declare const advancedAnalyticsData: (dataOptions: CartesianChartDataOptionsInternal, dataTable: DataTable) => CartesianChartData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AreamapChartDataOptionsInternal } from '../chart-data-options/types.js';
|
|
2
2
|
import { DataTable } from '../chart-data-processor/table-processor.js';
|
|
3
3
|
import { AreamapData } from './types.js';
|
|
4
|
-
export declare const getAreamapData: (
|
|
4
|
+
export declare const getAreamapData: (dataOptions: AreamapChartDataOptionsInternal, dataTable: DataTable) => AreamapData;
|
|
@@ -8,5 +8,5 @@ import { BoxplotChartDataOptionsInternal } from '../chart-data-options/types.js'
|
|
|
8
8
|
* @param dataTable - Chart data table
|
|
9
9
|
* @returns Box plot chart data
|
|
10
10
|
*/
|
|
11
|
-
export declare const boxplotData: (
|
|
11
|
+
export declare const boxplotData: (dataOptions: BoxplotChartDataOptionsInternal, dataTable: DataTable) => BoxplotChartData;
|
|
12
12
|
export declare function isBoxplotChartData(chartData: ChartData): chartData is BoxplotChartData;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type SortDirection } from '../types';
|
|
2
2
|
import { Column, DataTable } from '../chart-data-processor/table-processor';
|
|
3
3
|
import { CartesianChartData, CategoricalXValues } from './types';
|
|
4
|
-
import { CartesianChartDataOptionsInternal,
|
|
4
|
+
import { CartesianChartDataOptionsInternal, StyledMeasureColumn } from '../chart-data-options/types';
|
|
5
5
|
export declare const validateCartesianChartDataOptions: (chartDataOptions: CartesianChartDataOptionsInternal) => CartesianChartDataOptionsInternal;
|
|
6
6
|
/**
|
|
7
7
|
* Creates cartesian data for chart like line/area/bar and others given table of data and options
|
|
@@ -10,6 +10,6 @@ export declare const validateCartesianChartDataOptions: (chartDataOptions: Carte
|
|
|
10
10
|
* @param dataTable - Data table
|
|
11
11
|
* @returns Cartesian chart data
|
|
12
12
|
*/
|
|
13
|
-
export declare const cartesianData: (
|
|
13
|
+
export declare const cartesianData: (dataOptions: CartesianChartDataOptionsInternal, dataTable: DataTable) => CartesianChartData;
|
|
14
14
|
export declare const sortDirection: (sortType: SortDirection | undefined) => 1 | -1 | 0;
|
|
15
|
-
export declare const getOrderedXValues: (dataTable: DataTable, sortedMeasures:
|
|
15
|
+
export declare const getOrderedXValues: (dataTable: DataTable, sortedMeasures: StyledMeasureColumn[], xColumns: Column[], rownumColumnName?: string) => CategoricalXValues[];
|
|
@@ -2,4 +2,4 @@ import { CategoricalChartDataOptionsInternal } from '../chart-data-options/types
|
|
|
2
2
|
import { DataTable } from '../chart-data-processor/table-processor';
|
|
3
3
|
import { CategoricalChartData } from './types';
|
|
4
4
|
export declare const validateCategoricalChartDataOptions: (chartDataOptions: CategoricalChartDataOptionsInternal) => CategoricalChartDataOptionsInternal;
|
|
5
|
-
export declare const categoricalData: (
|
|
5
|
+
export declare const categoricalData: (dataOptions: CategoricalChartDataOptionsInternal, dataTable: DataTable) => CategoricalChartData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CalculatedMeasureColumn, Column, MeasureColumn } from '@sisense/sdk-data';
|
|
2
2
|
import { DataColumnNamesMapping } from '../chart-data-options/validate-data-options';
|
|
3
3
|
import { DataTable } from '../chart-data-processor/table-processor';
|
|
4
|
-
export declare const filterAndAggregateChartData: (sourceTable: DataTable, attributes:
|
|
4
|
+
export declare const filterAndAggregateChartData: (sourceTable: DataTable, attributes: Column[], measures: (MeasureColumn | CalculatedMeasureColumn)[], dataColumnNamesMapping?: DataColumnNamesMapping) => DataTable;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DataTable } from '../chart-data-processor/table-processor';
|
|
2
2
|
import { IndicatorChartDataOptionsInternal } from '../chart-data-options/types';
|
|
3
3
|
import { IndicatorChartData } from './types';
|
|
4
|
-
export declare const indicatorData: (
|
|
4
|
+
export declare const indicatorData: (dataOptions: IndicatorChartDataOptionsInternal, dataTable: DataTable) => IndicatorChartData;
|
|
@@ -4,8 +4,8 @@ import { RangeChartDataOptionsInternal } from '../chart-data-options/types';
|
|
|
4
4
|
/**
|
|
5
5
|
* Creates data for range charts given chart data table and data options
|
|
6
6
|
*
|
|
7
|
-
* @param
|
|
7
|
+
* @param dataOptions - Data options for range charts
|
|
8
8
|
* @param dataTable - Chart data table
|
|
9
9
|
* @returns range chart data
|
|
10
10
|
*/
|
|
11
|
-
export declare const rangeData: (
|
|
11
|
+
export declare const rangeData: (dataOptions: RangeChartDataOptionsInternal, dataTable: DataTable) => RangeChartData;
|
|
@@ -12,7 +12,7 @@ export interface DataOptionsIndexes {
|
|
|
12
12
|
}
|
|
13
13
|
export declare const buildCategories: (data: ScatterDataTable, axisColumnName: AxisColumnName) => string[];
|
|
14
14
|
export declare const createCategoriesMap: (xCategories?: ScatterCategories, yCategories?: ScatterCategories) => ScatterAxisCategoriesMap;
|
|
15
|
-
export declare const groupData: (
|
|
15
|
+
export declare const groupData: (dataOptions: ScatterChartDataOptionsInternal, dataTable: DataTable) => ScatterDataTable;
|
|
16
16
|
/**
|
|
17
17
|
* Creates data for scatter charts given chart data table and data options
|
|
18
18
|
*
|
|
@@ -20,4 +20,4 @@ export declare const groupData: (chartDataOptions: ScatterChartDataOptionsIntern
|
|
|
20
20
|
* @param dataTable - Chart data table
|
|
21
21
|
* @returns Scatter chart data
|
|
22
22
|
*/
|
|
23
|
-
export declare const scatterData: (
|
|
23
|
+
export declare const scatterData: (dataOptions: ScatterChartDataOptionsInternal, dataTable: DataTable) => ScatterChartData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ScattermapChartDataOptionsInternal } from '../chart-data-options/types.js';
|
|
2
2
|
import { DataTable } from '../chart-data-processor/table-processor.js';
|
|
3
3
|
import { ScattermapChartData } from './types.js';
|
|
4
|
-
export declare const scattermapData: (
|
|
4
|
+
export declare const scattermapData: (dataOptions: ScattermapChartDataOptionsInternal, dataTable: DataTable) => ScattermapChartData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Column as DataTableColumn, DataTable } from '../chart-data-processor/table-processor';
|
|
2
|
-
import {
|
|
3
|
-
export declare const unifySortToDirection: (
|
|
2
|
+
import { StyledColumn, StyledMeasureColumn, TableDataOptionsInternal } from '../chart-data-options/types';
|
|
3
|
+
export declare const unifySortToDirection: ({ column, sortType, }: StyledColumn | StyledMeasureColumn) => number;
|
|
4
4
|
export declare const syncDataTableWithDataOptionsSort: (chartDataOptions: TableDataOptionsInternal, dataTable: DataTable) => DataTable;
|
|
5
5
|
export declare const updateInnerDataOptionsSort: (dataOptions: TableDataOptionsInternal, sortColumn: DataTableColumn) => TableDataOptionsInternal;
|
|
6
6
|
export declare const tableData: (chartDataOptions: TableDataOptionsInternal, dataTable: DataTable) => DataTable;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CalculatedMeasureColumn, Column, MeasureColumn } from '@sisense/sdk-data';
|
|
2
2
|
import { BoxplotChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptionsInternal, StyledColumn, BoxWhiskerType, StyledMeasureColumn } from './types';
|
|
3
3
|
export declare const generateBoxplotValues: (targetValue: Column | StyledColumn, boxType: BoxWhiskerType, outliersEnabled: boolean) => {
|
|
4
|
-
values: (
|
|
4
|
+
values: (StyledMeasureColumn | MeasureColumn | CalculatedMeasureColumn)[];
|
|
5
5
|
outliers: Column | StyledColumn | undefined;
|
|
6
6
|
};
|
|
7
7
|
export declare const translateBoxplotDataOptions: (boxplotDataOptions: BoxplotChartDataOptions | BoxplotChartCustomDataOptions) => BoxplotChartDataOptionsInternal;
|
|
@@ -360,13 +360,6 @@ export interface AreamapChartDataOptions {
|
|
|
360
360
|
/** Measure column (or measure) encoded by the color of the countries (or states) on the map. */
|
|
361
361
|
color?: [MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn];
|
|
362
362
|
}
|
|
363
|
-
/**
|
|
364
|
-
* Checks if the given argument is a measure column.
|
|
365
|
-
*
|
|
366
|
-
* @param arg
|
|
367
|
-
* @internal
|
|
368
|
-
*/
|
|
369
|
-
export declare function isMeasureColumn(arg: AnyColumn): arg is MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn;
|
|
370
363
|
/**
|
|
371
364
|
* Configuration for how to query data and assign data to Table.
|
|
372
365
|
*/
|
|
@@ -552,63 +545,47 @@ export type ChartDataOptions = RegularChartDataOptions | TabularChartDataOptions
|
|
|
552
545
|
*/
|
|
553
546
|
export type RegularChartDataOptions = CartesianChartDataOptions | CategoricalChartDataOptions | ScatterChartDataOptions | IndicatorChartDataOptions | BoxplotChartDataOptions | BoxplotChartCustomDataOptions | AreamapChartDataOptions | ScattermapChartDataOptions | RangeChartDataOptions;
|
|
554
547
|
/** @internal */
|
|
555
|
-
export interface Category extends CategoryStyle {
|
|
556
|
-
name: string;
|
|
557
|
-
type: string;
|
|
558
|
-
title?: string;
|
|
559
|
-
}
|
|
560
|
-
/** @internal */
|
|
561
|
-
export declare const isValue: (arg: Category | Value) => arg is Value;
|
|
562
|
-
/** @internal */
|
|
563
|
-
export declare const isCategory: (arg: Category | Value) => arg is Category;
|
|
564
|
-
/** @internal */
|
|
565
|
-
export interface Value extends ValueStyle, SeriesStyle {
|
|
566
|
-
name: string;
|
|
567
|
-
aggregation?: string;
|
|
568
|
-
title: string;
|
|
569
|
-
}
|
|
570
|
-
/** @internal */
|
|
571
548
|
export interface CartesianChartDataOptionsInternal {
|
|
572
|
-
x:
|
|
573
|
-
y:
|
|
574
|
-
breakBy:
|
|
549
|
+
x: StyledColumn[];
|
|
550
|
+
y: StyledMeasureColumn[];
|
|
551
|
+
breakBy: StyledColumn[];
|
|
575
552
|
seriesToColorMap?: ValueToColorMap;
|
|
576
553
|
}
|
|
577
554
|
/** @internal */
|
|
578
555
|
export interface CategoricalChartDataOptionsInternal {
|
|
579
|
-
y:
|
|
580
|
-
breakBy:
|
|
556
|
+
y: StyledMeasureColumn[];
|
|
557
|
+
breakBy: StyledColumn[];
|
|
581
558
|
seriesToColorMap?: ValueToColorMap | MultiColumnValueToColorMap;
|
|
582
559
|
}
|
|
583
560
|
/** @internal */
|
|
584
561
|
export interface ScatterChartDataOptionsInternal {
|
|
585
|
-
x?:
|
|
586
|
-
y?:
|
|
587
|
-
breakByPoint?:
|
|
588
|
-
breakByColor?:
|
|
589
|
-
size?:
|
|
562
|
+
x?: StyledColumn | StyledMeasureColumn;
|
|
563
|
+
y?: StyledColumn | StyledMeasureColumn;
|
|
564
|
+
breakByPoint?: StyledColumn;
|
|
565
|
+
breakByColor?: StyledColumn | StyledMeasureColumn;
|
|
566
|
+
size?: StyledMeasureColumn;
|
|
590
567
|
seriesToColorMap?: ValueToColorMap;
|
|
591
568
|
}
|
|
592
569
|
/** @internal */
|
|
593
570
|
export interface ScattermapChartDataOptionsInternal {
|
|
594
|
-
locations:
|
|
595
|
-
size?:
|
|
596
|
-
colorBy?:
|
|
597
|
-
details?:
|
|
571
|
+
locations: StyledColumn[];
|
|
572
|
+
size?: StyledMeasureColumn;
|
|
573
|
+
colorBy?: StyledMeasureColumn;
|
|
574
|
+
details?: StyledColumn | StyledMeasureColumn;
|
|
598
575
|
locationLevel: ScattermapLocationLevel;
|
|
599
576
|
}
|
|
600
577
|
/** @internal */
|
|
601
578
|
export type RangeChartDataOptionsInternal = {
|
|
602
|
-
x:
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
breakBy: Category[];
|
|
606
|
-
y: Value[];
|
|
579
|
+
x: StyledColumn[];
|
|
580
|
+
y: StyledMeasureColumn[];
|
|
581
|
+
breakBy: StyledColumn[];
|
|
607
582
|
seriesToColorMap?: ValueToColorMap | MultiColumnValueToColorMap;
|
|
583
|
+
rangeValues: StyledMeasureColumn[][];
|
|
584
|
+
seriesValues: StyledMeasureColumn[];
|
|
608
585
|
};
|
|
609
586
|
/** @internal */
|
|
610
587
|
export type TableDataOptionsInternal = {
|
|
611
|
-
columns: (
|
|
588
|
+
columns: (StyledColumn | StyledMeasureColumn)[];
|
|
612
589
|
};
|
|
613
590
|
/**
|
|
614
591
|
* @internal
|
|
@@ -619,19 +596,19 @@ export interface PivotTableDataOptionsInternal {
|
|
|
619
596
|
*
|
|
620
597
|
* @category Data Options
|
|
621
598
|
*/
|
|
622
|
-
rows?:
|
|
599
|
+
rows?: StyledColumn[];
|
|
623
600
|
/**
|
|
624
601
|
* Dimensions for the columns of the pivot table
|
|
625
602
|
*
|
|
626
603
|
* @category Data Options
|
|
627
604
|
*/
|
|
628
|
-
columns?:
|
|
605
|
+
columns?: StyledColumn[];
|
|
629
606
|
/**
|
|
630
607
|
* Measures for the values of the pivot table
|
|
631
608
|
*
|
|
632
609
|
* @category Data Options
|
|
633
610
|
*/
|
|
634
|
-
values?:
|
|
611
|
+
values?: StyledMeasureColumn[];
|
|
635
612
|
/**
|
|
636
613
|
* Options for grand totals
|
|
637
614
|
*
|
|
@@ -643,25 +620,25 @@ export interface PivotTableDataOptionsInternal {
|
|
|
643
620
|
export type ChartDataOptionsInternal = CartesianChartDataOptionsInternal | CategoricalChartDataOptionsInternal | ScatterChartDataOptionsInternal | IndicatorChartDataOptionsInternal | BoxplotChartDataOptionsInternal | AreamapChartDataOptionsInternal | ScattermapChartDataOptionsInternal | RangeChartDataOptionsInternal;
|
|
644
621
|
/** @internal */
|
|
645
622
|
export type IndicatorChartDataOptionsInternal = {
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
623
|
+
value?: StyledMeasureColumn[];
|
|
624
|
+
secondary?: StyledMeasureColumn[];
|
|
625
|
+
min?: StyledMeasureColumn[];
|
|
626
|
+
max?: StyledMeasureColumn[];
|
|
650
627
|
};
|
|
651
628
|
/** @internal */
|
|
652
629
|
export interface BoxplotChartDataOptionsInternal {
|
|
653
|
-
category?:
|
|
654
|
-
boxMin:
|
|
655
|
-
boxMedian:
|
|
656
|
-
boxMax:
|
|
657
|
-
whiskerMin:
|
|
658
|
-
whiskerMax:
|
|
659
|
-
outliersCount:
|
|
660
|
-
outliers?:
|
|
630
|
+
category?: StyledColumn;
|
|
631
|
+
boxMin: StyledMeasureColumn;
|
|
632
|
+
boxMedian: StyledMeasureColumn;
|
|
633
|
+
boxMax: StyledMeasureColumn;
|
|
634
|
+
whiskerMin: StyledMeasureColumn;
|
|
635
|
+
whiskerMax: StyledMeasureColumn;
|
|
636
|
+
outliersCount: StyledMeasureColumn;
|
|
637
|
+
outliers?: StyledColumn;
|
|
661
638
|
valueTitle: string;
|
|
662
639
|
}
|
|
663
640
|
/** @internal */
|
|
664
641
|
export type AreamapChartDataOptionsInternal = {
|
|
665
|
-
geo:
|
|
666
|
-
color?:
|
|
642
|
+
geo: StyledColumn;
|
|
643
|
+
color?: StyledMeasureColumn;
|
|
667
644
|
};
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { Attribute, CalculatedMeasureColumn, Column, Measure, MeasureColumn } from '@sisense/sdk-data';
|
|
2
|
-
import {
|
|
2
|
+
import { StyledColumn, StyledMeasureColumn, AnyColumn, CategoryStyle, ValueStyle } from './types';
|
|
3
3
|
type AnyObject = Record<string, any>;
|
|
4
|
+
/**
|
|
5
|
+
* Combines the properties of two objects, where:
|
|
6
|
+
* - properties from "sourceToInherit" will be inherited by the result object.
|
|
7
|
+
* - properties from "sourceToAbsorb" will be copied into the result object.
|
|
8
|
+
* Properties from "sourceToAbsorb" will safely override properties with the same name from "sourceToInherit" without modifying the original object.
|
|
9
|
+
*
|
|
10
|
+
* @param sourceToInherit - The object whose properties will be inherited.
|
|
11
|
+
* @param sourceToAbsorb - The object whose properties will be copied as own properties.
|
|
12
|
+
* @returns - A new object that combines the properties of the two input objects.
|
|
13
|
+
*/
|
|
14
|
+
export declare const safeMerge: <T extends AnyObject, S extends AnyObject>(sourceToInherit: T, sourceToAbsorb: S) => T & S;
|
|
4
15
|
/**
|
|
5
16
|
* Combines two objects into a single one with saving prototype inheritance of "sourceWithInheritance" argument
|
|
6
17
|
*
|
|
@@ -9,30 +20,31 @@ type AnyObject = Record<string, any>;
|
|
|
9
20
|
* @returns - A new object that combines the properties of the two input objects.
|
|
10
21
|
*/
|
|
11
22
|
export declare const safeCombine: <T extends AnyObject>(sourceWithInheritance: T, sourceToAbsorb: AnyObject) => T;
|
|
12
|
-
export declare const splitColumn: (
|
|
13
|
-
column: Column;
|
|
14
|
-
style: CategoryStyle |
|
|
23
|
+
export declare const splitColumn: <C extends AnyColumn>(targetColumn: C) => {
|
|
24
|
+
column: Column | MeasureColumn | CalculatedMeasureColumn;
|
|
25
|
+
style: CategoryStyle | ValueStyle;
|
|
26
|
+
} | {
|
|
27
|
+
column: C;
|
|
28
|
+
style: CategoryStyle | ValueStyle;
|
|
15
29
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export declare
|
|
23
|
-
export declare const getDataOptionTitle: (
|
|
24
|
-
export declare const
|
|
30
|
+
/**
|
|
31
|
+
* Checks if the given argument is a measure column.
|
|
32
|
+
*
|
|
33
|
+
* @param arg
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
export declare function isMeasureColumn(arg: AnyColumn): arg is MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn;
|
|
37
|
+
export declare const getDataOptionTitle: ({ column }: StyledColumn | StyledMeasureColumn) => string;
|
|
38
|
+
export declare const getDataOptionGranularity: ({ column, granularity }: StyledColumn) => string;
|
|
39
|
+
export declare const translateColumnToAttribute: (c: Column | StyledColumn) => Attribute;
|
|
25
40
|
export declare const translateColumnToMeasure: (c: MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn) => Measure;
|
|
26
|
-
export declare const translateCategoryOrValueToColumn: <Source extends Value | Category, Target extends AnyColumn>(option: Source) => Target;
|
|
27
|
-
export declare const translateCategoryToColumn: (option: Category) => Column | StyledColumn;
|
|
28
|
-
export declare const translateValueToColumn: (option: Value) => MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn;
|
|
29
41
|
/**
|
|
30
|
-
* Checks if
|
|
42
|
+
* Checks if column is a StyledColumns.
|
|
31
43
|
*
|
|
32
|
-
* @param category - The
|
|
44
|
+
* @param category - The target column to check.
|
|
33
45
|
* @internal
|
|
34
46
|
*/
|
|
35
|
-
export declare function isStyledColumn(
|
|
47
|
+
export declare function isStyledColumn(targetColumn: AnyColumn): targetColumn is StyledColumn | StyledMeasureColumn;
|
|
36
48
|
/**
|
|
37
49
|
* Checks if an category is a StyledCategory.
|
|
38
50
|
*
|
|
@@ -40,4 +52,7 @@ export declare function isStyledColumn(category: Column | StyledColumn): categor
|
|
|
40
52
|
* @internal
|
|
41
53
|
*/
|
|
42
54
|
export declare function isCategoryStyle(category: Column | CategoryStyle): category is CategoryStyle;
|
|
55
|
+
export declare function normalizeColumn(targetColumn: Column | StyledColumn): StyledColumn;
|
|
56
|
+
export declare function normalizeMeasureColumn(targetColumn: MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn): StyledMeasureColumn;
|
|
57
|
+
export declare function normalizeAnyColumn(targetColumn: AnyColumn): StyledColumn | StyledMeasureColumn;
|
|
43
58
|
export {};
|