@sisense/sdk-ui 1.0.0 → 1.2.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/api/chat-rest-api.d.ts +2 -2
- package/dist/ai/api/hooks.d.ts +2 -2
- package/dist/ai/api/types.d.ts +21 -21
- package/dist/ai/messages/get-widget-options.d.ts +3 -3
- package/dist/ai.js +690 -683
- package/dist/api/rest-api.d.ts +9 -0
- package/dist/app/client-application.d.ts +5 -0
- package/dist/app/settings/settings.d.ts +2 -1
- package/dist/areamap-chart.d.ts +25 -0
- package/dist/boxplot-chart.d.ts +0 -2
- package/dist/chart-data/areamap-data.d.ts +4 -0
- package/dist/chart-data/data-coloring/geo-data-coloring-function.d.ts +2 -0
- package/dist/chart-data/types.d.ts +32 -3
- package/dist/chart-data-options/get-translated-data-options.d.ts +2 -2
- package/dist/chart-data-options/translate-scattermap-data-options.d.ts +1 -1
- package/dist/chart-data-options/types.d.ts +25 -5
- package/dist/chart-options-processor/boxplot-chart-options.d.ts +2 -1
- package/dist/chart-options-processor/chart-options-service.d.ts +3 -1
- package/dist/chart-options-processor/style-to-design-options-translator/translate-to-areamap-options.d.ts +3 -0
- package/dist/chart-options-processor/subtype-to-design-options.d.ts +4 -1
- package/dist/chart-options-processor/translations/boxplot/boxplot-tooltip.d.ts +2 -1
- package/dist/chart-options-processor/translations/design-options.d.ts +7 -1
- package/dist/chart-options-processor/translations/types.d.ts +7 -3
- package/dist/charts/map-charts/areamap/alternative-country-names-dictionary.d.ts +9 -0
- package/dist/charts/map-charts/areamap/areamap-map.d.ts +16 -0
- package/dist/charts/map-charts/areamap/areamap.d.ts +16 -0
- package/dist/charts/map-charts/areamap/feature-styles-dictionary.d.ts +16 -0
- package/dist/charts/map-charts/areamap/use-geo-json.d.ts +9 -0
- package/dist/charts/map-charts/scattermap/hooks/use-locations.d.ts +3 -0
- package/dist/charts/{scattermap → map-charts/scattermap}/hooks/use-tooltip-handler.d.ts +2 -2
- package/dist/charts/{scattermap → map-charts/scattermap}/scattermap.d.ts +3 -3
- package/dist/charts/map-charts/scattermap/utils/color.d.ts +3 -0
- package/dist/charts/{scattermap → map-charts/scattermap}/utils/location.d.ts +1 -1
- package/dist/charts/{scattermap → map-charts/scattermap}/utils/markers.d.ts +1 -1
- package/dist/charts/{scattermap → map-charts/scattermap}/utils/size.d.ts +1 -1
- package/dist/charts/{scattermap → map-charts/scattermap}/utils/tooltip.d.ts +2 -2
- package/dist/dashboard-widget/types.d.ts +5 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.js +13318 -7328
- package/dist/props.d.ts +19 -2
- package/dist/query/execute-query.d.ts +17 -2
- package/dist/query-execution/index.d.ts +2 -1
- package/dist/query-execution/pivot-query-state-reducer.d.ts +2 -0
- package/dist/query-execution/types.d.ts +134 -1
- package/dist/query-execution/use-execute-pivot-query.d.ts +54 -0
- package/dist/scattermap-chart.d.ts +0 -2
- package/dist/table-widget-65f3e04e.js +77762 -0
- package/dist/translation/resources/en.d.ts +10 -0
- package/dist/translation/resources/index.d.ts +20 -0
- package/dist/types.d.ts +17 -5
- package/dist/utils/filters-comparator.d.ts +13 -1
- package/dist/widgets/common/custom-drilldown.d.ts +3 -0
- package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
- package/package.json +10 -6
- package/dist/charts/scattermap/hooks/use-locations.d.ts +0 -3
- package/dist/charts/scattermap/utils/color.d.ts +0 -3
- package/dist/table-widget-7936746a.js +0 -72481
- /package/dist/charts/{scattermap → map-charts/scattermap}/hooks/use-settings.d.ts +0 -0
- /package/dist/charts/{scattermap → map-charts/scattermap}/types.d.ts +0 -0
- /package/dist/charts/{scattermap → map-charts/scattermap}/utils/copyright.d.ts +0 -0
- /package/dist/charts/{scattermap → map-charts/scattermap}/utils/map.d.ts +0 -0
- /package/dist/charts/{scattermap → map-charts/scattermap}/utils/values.d.ts +0 -0
package/dist/api/rest-api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from '@sisense/sdk-rest-client';
|
|
2
|
+
import { FeatureCollection as GeoJsonFeatureCollection } from 'geojson';
|
|
2
3
|
import { WidgetDto } from '../dashboard-widget/types';
|
|
3
4
|
import type { DashboardDto } from './types/dashboard-dto';
|
|
4
5
|
type GetDashboardsOptions = {
|
|
@@ -25,6 +26,14 @@ export declare class RestApi {
|
|
|
25
26
|
* Get a specific widget from a dashboard
|
|
26
27
|
*/
|
|
27
28
|
getWidget: (widgetOid: string, dashboardOid: string) => Promise<WidgetDto>;
|
|
29
|
+
/**
|
|
30
|
+
* Get a GeoJSON data for all countries
|
|
31
|
+
*/
|
|
32
|
+
getCountriesGeoJson: () => Promise<GeoJsonFeatureCollection>;
|
|
33
|
+
/**
|
|
34
|
+
* Get a GeoJSON data for all USA states
|
|
35
|
+
*/
|
|
36
|
+
getUsaStatesGeoJson: () => Promise<GeoJsonFeatureCollection>;
|
|
28
37
|
}
|
|
29
38
|
export declare const useGetApi: () => RestApi;
|
|
30
39
|
export {};
|
|
@@ -4,6 +4,7 @@ import { DataSource } from '@sisense/sdk-data';
|
|
|
4
4
|
import { SisenseContextProviderProps } from '../props';
|
|
5
5
|
import { DateConfig } from '../query/date-formats';
|
|
6
6
|
import { AppSettings } from './settings/settings';
|
|
7
|
+
import { PivotClient } from '@sisense/sdk-pivot-client';
|
|
7
8
|
/**
|
|
8
9
|
* Application configuration
|
|
9
10
|
*/
|
|
@@ -33,6 +34,10 @@ export declare class ClientApplication {
|
|
|
33
34
|
* Gets the underlying HTTP Client
|
|
34
35
|
*/
|
|
35
36
|
readonly httpClient: HttpClient;
|
|
37
|
+
/**
|
|
38
|
+
* Gets the underlying Pivot Client
|
|
39
|
+
*/
|
|
40
|
+
readonly pivotClient: PivotClient;
|
|
36
41
|
/**
|
|
37
42
|
* Gets the underlying Query Client
|
|
38
43
|
*/
|
|
@@ -11,6 +11,7 @@ type ConfigurableAppSettings = AppConfig;
|
|
|
11
11
|
type ServerSettings = {
|
|
12
12
|
serverThemeSettings: ThemeSettings;
|
|
13
13
|
serverLanguage: string;
|
|
14
|
+
serverVersion: string;
|
|
14
15
|
};
|
|
15
16
|
/**
|
|
16
17
|
* Gets the application settings
|
|
@@ -20,5 +21,5 @@ type ServerSettings = {
|
|
|
20
21
|
* @param isWat - Whether the application is running with WAT authentication
|
|
21
22
|
* @returns - Application settings
|
|
22
23
|
*/
|
|
23
|
-
export declare function getSettings(customConfig: ConfigurableAppSettings, httpClient: Pick<HttpClient, 'get'>,
|
|
24
|
+
export declare function getSettings(customConfig: ConfigurableAppSettings, httpClient: Pick<HttpClient, 'get'>, useDefaultPalette: boolean): Promise<AppSettings>;
|
|
24
25
|
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AreamapChartProps } from './props';
|
|
3
|
+
/**
|
|
4
|
+
* A React component for visualizing geographical data as polygons on a map.
|
|
5
|
+
* See [Areamap Chart](https://docs.sisense.com/main/SisenseLinux/area-map.htm) for more information.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* An example of using the component to visualize the `Sample ECommerce` data source:
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <AreamapChart
|
|
11
|
+
* dataSet={DM.DataSource}
|
|
12
|
+
* dataOptions={{
|
|
13
|
+
* geo: [DM.Country.Country],
|
|
14
|
+
* color: measureFactory.sum(DM.Commerce.Cost, 'Total Cost'),
|
|
15
|
+
* }}
|
|
16
|
+
* styleOptions={{
|
|
17
|
+
* mapType: 'world',
|
|
18
|
+
* }}
|
|
19
|
+
* />
|
|
20
|
+
* ```
|
|
21
|
+
* @param props - Areamap chart properties
|
|
22
|
+
* @returns Areamap Chart component
|
|
23
|
+
* @beta
|
|
24
|
+
*/
|
|
25
|
+
export declare const AreamapChart: import("react").FunctionComponent<AreamapChartProps>;
|
package/dist/boxplot-chart.d.ts
CHANGED
|
@@ -5,8 +5,6 @@ import { BoxplotChartProps } from './props';
|
|
|
5
5
|
* and center of a data set along an axis.
|
|
6
6
|
* See [Boxplot Chart](https://docs.sisense.com/main/SisenseLinux/box-and-whisker-plot.htm) for more information.
|
|
7
7
|
*
|
|
8
|
-
* This component is still in beta.
|
|
9
|
-
*
|
|
10
8
|
* @example
|
|
11
9
|
* An example of using the component to visualize the `Sample ECommerce` data source:
|
|
12
10
|
* ```tsx
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AreamapChartDataOptionsInternal } from '../chart-data-options/types.js';
|
|
2
|
+
import { DataTable } from '../chart-data-processor/table-processor.js';
|
|
3
|
+
import { AreamapData } from './types.js';
|
|
4
|
+
export declare const getAreamapData: (chartDataOptions: AreamapChartDataOptionsInternal, dataTable: DataTable) => AreamapData;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { NumberFormatConfig } from '../types';
|
|
2
|
-
import { IndicatorChartType } from '../chart-options-processor/translations/types';
|
|
1
|
+
import { Color, NumberFormatConfig } from '../types';
|
|
2
|
+
import { AreamapChartType, IndicatorChartType } from '../chart-options-processor/translations/types';
|
|
3
3
|
import { ComparableData, Value } from '../chart-data-processor/table-processor';
|
|
4
|
+
import { Coordinates } from '../charts/map-charts/scattermap/types';
|
|
4
5
|
export type CategoricalXValues = {
|
|
5
6
|
key: string;
|
|
6
7
|
xValues: string[];
|
|
@@ -90,6 +91,7 @@ export type ScattermapChartLocation = {
|
|
|
90
91
|
colorValue?: number;
|
|
91
92
|
details?: number | string[];
|
|
92
93
|
blur: boolean;
|
|
94
|
+
coordinates?: Coordinates;
|
|
93
95
|
};
|
|
94
96
|
export type ScattermapChartData = {
|
|
95
97
|
type: 'scattermap';
|
|
@@ -107,6 +109,33 @@ export type IndicatorChartData = {
|
|
|
107
109
|
min?: number;
|
|
108
110
|
max?: number;
|
|
109
111
|
};
|
|
112
|
+
/**
|
|
113
|
+
* Raw GeoDataElement from data
|
|
114
|
+
*
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
export type RawGeoDataElement = {
|
|
118
|
+
geoName: string;
|
|
119
|
+
originalValue: number;
|
|
120
|
+
formattedOriginalValue: string;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* GeoDataElement with color property, calculated from `originalValue`
|
|
124
|
+
*
|
|
125
|
+
* @internal
|
|
126
|
+
*/
|
|
127
|
+
export type GeoDataElement = RawGeoDataElement & {
|
|
128
|
+
color?: Color;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Fact final data that will be passed to Areamap-component to render
|
|
132
|
+
*
|
|
133
|
+
* @internal
|
|
134
|
+
*/
|
|
135
|
+
export type AreamapData = {
|
|
136
|
+
type: AreamapChartType;
|
|
137
|
+
geoData: GeoDataElement[];
|
|
138
|
+
};
|
|
110
139
|
/**
|
|
111
140
|
* Fact final data that will be passed to chart-component to render
|
|
112
141
|
*
|
|
@@ -122,4 +151,4 @@ export type BoxplotChartData = {
|
|
|
122
151
|
*
|
|
123
152
|
* @internal
|
|
124
153
|
*/
|
|
125
|
-
export type ChartData = CartesianChartData | CategoricalChartData | ScatterChartData | IndicatorChartData | BoxplotChartData | ScattermapChartData;
|
|
154
|
+
export type ChartData = CartesianChartData | CategoricalChartData | ScatterChartData | IndicatorChartData | BoxplotChartData | AreamapData | ScattermapChartData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChartDataOptions, ChartType } from '../types';
|
|
2
2
|
export declare function getTranslatedDataOptions(dataOptions: ChartDataOptions, chartType: ChartType): {
|
|
3
3
|
chartDataOptions: import("./types").ChartDataOptionsInternal;
|
|
4
|
-
attributes: import("
|
|
5
|
-
measures: import("
|
|
4
|
+
attributes: import("@sisense/sdk-data").Attribute[];
|
|
5
|
+
measures: import("@sisense/sdk-data").Measure[];
|
|
6
6
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ScattermapChartDataOptions, ScattermapChartDataOptionsInternal, ScattermapLocationLevel } from './types';
|
|
2
|
-
export declare function getLocationLevel(locationDataOptions: ScattermapChartDataOptions['
|
|
2
|
+
export declare function getLocationLevel(locationDataOptions: ScattermapChartDataOptions['geo']): ScattermapLocationLevel;
|
|
3
3
|
export declare function translateScattermapChartDataOptions(scattermap: ScattermapChartDataOptions): ScattermapChartDataOptionsInternal;
|
|
@@ -276,6 +276,16 @@ export interface ScatterChartDataOptions {
|
|
|
276
276
|
*/
|
|
277
277
|
seriesToColorMap?: ValueToColorMap;
|
|
278
278
|
}
|
|
279
|
+
/**
|
|
280
|
+
* Configuration for how to query aggregate data and assign data
|
|
281
|
+
* to geographic features of an Areamap chart.
|
|
282
|
+
*/
|
|
283
|
+
export interface AreamapChartDataOptions {
|
|
284
|
+
/** Column or attribute representing the countries (or states) on the map. */
|
|
285
|
+
geo: [Column | StyledColumn];
|
|
286
|
+
/** Measure column (or measure) encoded by the color of the countries (or states) on the map. */
|
|
287
|
+
color: [MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn];
|
|
288
|
+
}
|
|
279
289
|
/**
|
|
280
290
|
* Checks if the given argument is a measure column.
|
|
281
291
|
*
|
|
@@ -316,8 +326,10 @@ export interface ScattermapColumn extends StyledColumn {
|
|
|
316
326
|
export interface ScattermapChartDataOptions {
|
|
317
327
|
/**
|
|
318
328
|
* Columns (or attributes) whose values represent locations on the map.
|
|
329
|
+
* Support field(s) that contain geographic data (Country, City, State/Province, etc)
|
|
330
|
+
* To visualize latitude and longitude data, you have to add one field containing latitude data, and another field containing longitude data, in this order.
|
|
319
331
|
*/
|
|
320
|
-
|
|
332
|
+
geo: (Column | StyledColumn | ScattermapColumn)[];
|
|
321
333
|
/**
|
|
322
334
|
* Measure column (or measure) representing the size of the points on the map.
|
|
323
335
|
*/
|
|
@@ -390,10 +402,13 @@ export type BoxplotChartCustomDataOptions = {
|
|
|
390
402
|
*
|
|
391
403
|
* There are separate configurations for {@link CartesianChartDataOptions | Cartesian},
|
|
392
404
|
* {@link CategoricalChartDataOptions | Categorical},
|
|
393
|
-
* {@link ScatterChartDataOptions | Scatter},
|
|
394
|
-
*
|
|
405
|
+
* {@link ScatterChartDataOptions | Scatter},
|
|
406
|
+
* {@link IndicatorChartDataOptions | Indicator},
|
|
407
|
+
* {@link BoxplotChartDataOptions | Boxplot},
|
|
408
|
+
* {@link AreamapChartDataOptions | Areamap}, and
|
|
409
|
+
* {@link ScattermapChartDataOptions | Scattermap} charts.
|
|
395
410
|
*/
|
|
396
|
-
export type ChartDataOptions = CartesianChartDataOptions | CategoricalChartDataOptions | ScatterChartDataOptions | IndicatorChartDataOptions | BoxplotChartDataOptions | BoxplotChartCustomDataOptions | ScattermapChartDataOptions;
|
|
411
|
+
export type ChartDataOptions = CartesianChartDataOptions | CategoricalChartDataOptions | ScatterChartDataOptions | IndicatorChartDataOptions | BoxplotChartDataOptions | BoxplotChartCustomDataOptions | AreamapChartDataOptions | ScattermapChartDataOptions;
|
|
397
412
|
/** @internal */
|
|
398
413
|
export interface Category extends CategoryStyle {
|
|
399
414
|
name: string;
|
|
@@ -445,7 +460,7 @@ export type TableDataOptionsInternal = {
|
|
|
445
460
|
columns: (Category | Value)[];
|
|
446
461
|
};
|
|
447
462
|
/** @internal */
|
|
448
|
-
export type ChartDataOptionsInternal = CartesianChartDataOptionsInternal | CategoricalChartDataOptionsInternal | ScatterChartDataOptionsInternal | IndicatorChartDataOptionsInternal | BoxplotChartDataOptionsInternal | ScattermapChartDataOptionsInternal;
|
|
463
|
+
export type ChartDataOptionsInternal = CartesianChartDataOptionsInternal | CategoricalChartDataOptionsInternal | ScatterChartDataOptionsInternal | IndicatorChartDataOptionsInternal | BoxplotChartDataOptionsInternal | AreamapChartDataOptionsInternal | ScattermapChartDataOptionsInternal;
|
|
449
464
|
/** @internal */
|
|
450
465
|
export type IndicatorChartDataOptionsInternal = {
|
|
451
466
|
min?: Value[];
|
|
@@ -465,3 +480,8 @@ export interface BoxplotChartDataOptionsInternal {
|
|
|
465
480
|
outliers?: Category;
|
|
466
481
|
valueTitle: string;
|
|
467
482
|
}
|
|
483
|
+
/** @internal */
|
|
484
|
+
export type AreamapChartDataOptionsInternal = {
|
|
485
|
+
geo: Category;
|
|
486
|
+
color: Value;
|
|
487
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TFunction } from '@sisense/sdk-common';
|
|
1
2
|
import { BoxplotChartData } from '../chart-data/types';
|
|
2
3
|
import { BoxplotChartDataOptionsInternal } from '../chart-data-options/types';
|
|
3
4
|
import { HighchartsOptionsInternal } from './chart-options-service';
|
|
@@ -7,4 +8,4 @@ import { BoxplotChartDesignOptions } from './translations/design-options';
|
|
|
7
8
|
* Convert intermediate chart data, data options, and design options
|
|
8
9
|
* into pure highcharts config data.
|
|
9
10
|
*/
|
|
10
|
-
export declare const getBoxplotChartOptions: (chartData: BoxplotChartData, chartDesignOptions: BoxplotChartDesignOptions, dataOptions: BoxplotChartDataOptionsInternal) => OptionsWithAlerts<HighchartsOptionsInternal>;
|
|
11
|
+
export declare const getBoxplotChartOptions: (chartData: BoxplotChartData, chartDesignOptions: BoxplotChartDesignOptions, dataOptions: BoxplotChartDataOptionsInternal, translate: TFunction) => OptionsWithAlerts<HighchartsOptionsInternal>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Options, DrilldownOptions, SeriesLegendItemClickCallbackFunction } from '@sisense/sisense-charts';
|
|
2
|
+
import { TFunction } from '@sisense/sdk-common';
|
|
2
3
|
import { ChartData } from '../chart-data/types';
|
|
3
4
|
import { ChartDesignOptions } from './translations/types';
|
|
4
5
|
import { LegendSettings } from './translations/legend-section';
|
|
@@ -26,10 +27,11 @@ export type HighchartsOptions = Pick<Options, keyof Options>;
|
|
|
26
27
|
* @param chartType -
|
|
27
28
|
* @param chartDesignOptions -
|
|
28
29
|
* @param dataOptions -
|
|
30
|
+
* @param translate - translation function
|
|
29
31
|
* @param themeSettings -
|
|
30
32
|
* @param dateFormatter
|
|
31
33
|
*/
|
|
32
|
-
export declare const highchartsOptionsService: (chartData: ChartData, chartType: ChartType, chartDesignOptions: ChartDesignOptions, dataOptions: ChartDataOptionsInternal, themeSettings?: CompleteThemeSettings, dateFormatter?: ((date: Date, format: string) => string) | undefined) => OptionsWithAlerts<HighchartsOptionsInternal>;
|
|
34
|
+
export declare const highchartsOptionsService: (chartData: ChartData, chartType: ChartType, chartDesignOptions: ChartDesignOptions, dataOptions: ChartDataOptionsInternal, translate: TFunction, themeSettings?: CompleteThemeSettings, dateFormatter?: ((date: Date, format: string) => string) | undefined) => OptionsWithAlerts<HighchartsOptionsInternal>;
|
|
33
35
|
export type SeriesType = HighchartsSeriesValues & {
|
|
34
36
|
index?: number;
|
|
35
37
|
animation?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LineType, StackType } from './translations/translations-to-highcharts';
|
|
2
2
|
import { IndicatorStyleType, PolarType, BoxplotType } from './translations/design-options';
|
|
3
|
+
import { AreamapType } from '../types';
|
|
3
4
|
/**
|
|
4
5
|
* Property of {@link LineStyleOptions}
|
|
5
6
|
*
|
|
@@ -90,7 +91,8 @@ export type TreemapSubtype = 'treemap';
|
|
|
90
91
|
export type SunburstSubtype = 'sunburst';
|
|
91
92
|
export type BoxplotSubtype = 'boxplot/full' | 'boxplot/hollow';
|
|
92
93
|
export type ScattermapSubtype = 'scattermap';
|
|
93
|
-
export type
|
|
94
|
+
export type AreamapSubtype = 'areamap/world' | 'areamap/usa';
|
|
95
|
+
export type ChartSubtype = LineSubtype | AreaSubtype | StackableSubtype | PieSubtype | PolarSubtype | IndicatorSubtype | TreemapSubtype | SunburstSubtype | BoxplotSubtype | ScattermapSubtype | AreamapSubtype;
|
|
94
96
|
export declare const chartSubtypeToDesignOptions: Readonly<Record<ChartSubtype, {
|
|
95
97
|
lineType?: LineType | undefined;
|
|
96
98
|
stackType?: StackType | undefined;
|
|
@@ -98,4 +100,5 @@ export declare const chartSubtypeToDesignOptions: Readonly<Record<ChartSubtype,
|
|
|
98
100
|
polarType?: PolarType | undefined;
|
|
99
101
|
indicatorType?: IndicatorStyleType | undefined;
|
|
100
102
|
boxplotType?: BoxplotType | undefined;
|
|
103
|
+
mapType?: AreamapType | undefined;
|
|
101
104
|
}>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TFunction } from '@sisense/sdk-common';
|
|
1
2
|
import { BoxplotChartDataOptionsInternal } from '../../../chart-data-options/types';
|
|
2
3
|
import { TooltipSettings } from '../tooltip-utils';
|
|
3
|
-
export declare const getBoxplotTooltipSettings: (dataOptions: BoxplotChartDataOptionsInternal) => TooltipSettings;
|
|
4
|
+
export declare const getBoxplotTooltipSettings: (dataOptions: BoxplotChartDataOptionsInternal, translate: TFunction) => TooltipSettings;
|
|
@@ -5,7 +5,7 @@ import { LegendPosition } from './legend-section';
|
|
|
5
5
|
import { LineType, StackType } from './translations-to-highcharts';
|
|
6
6
|
import { PieType, PieLabels } from './pie-plot-options';
|
|
7
7
|
import { FunnelSize, FunnelType, FunnelDirection, FunnelLabels } from './funnel-plot-options';
|
|
8
|
-
import { Convolution, ScattermapMarkers, SunburstStyleOptions, TreemapStyleOptions } from '../../types';
|
|
8
|
+
import { AreamapType, Convolution, ScattermapMarkers, SunburstStyleOptions, TreemapStyleOptions } from '../../types';
|
|
9
9
|
import { ScatterMarkerSize } from './scatter-plot-options';
|
|
10
10
|
type DataLimits = {
|
|
11
11
|
seriesCapacity: number;
|
|
@@ -48,6 +48,12 @@ export type SunburstChartDesignOptions = BaseDesignOptionsType & SunburstStyleOp
|
|
|
48
48
|
export type ScatterChartDesignOptions = BaseDesignOptionsType & {
|
|
49
49
|
markerSize?: ScatterMarkerSize;
|
|
50
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* Configuration for Areamap design options
|
|
53
|
+
*/
|
|
54
|
+
export type AreamapChartDesignOptions = BaseDesignOptionsType & {
|
|
55
|
+
mapType: AreamapType;
|
|
56
|
+
};
|
|
51
57
|
/**
|
|
52
58
|
* Configuration for Table design options
|
|
53
59
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
2
2
|
import { ChartType } from '../../types';
|
|
3
|
-
import { LineChartDesignOptions, AreaChartDesignOptions, BarChartDesignOptions, ColumnChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, IndicatorChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, TreemapChartDesignOptions, BoxplotChartDesignOptions, ScattermapChartDesignOptions } from './design-options';
|
|
3
|
+
import { LineChartDesignOptions, AreaChartDesignOptions, BarChartDesignOptions, ColumnChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, IndicatorChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, TreemapChartDesignOptions, BoxplotChartDesignOptions, AreamapChartDesignOptions, ScattermapChartDesignOptions } from './design-options';
|
|
4
4
|
export declare const POLAR_CHART_TYPES: readonly ["polar"];
|
|
5
5
|
export type PolarChartType = (typeof POLAR_CHART_TYPES)[number];
|
|
6
6
|
export declare const CARTESIAN_CHART_TYPES: readonly ["line", "area", "bar", "column", "polar"];
|
|
@@ -21,13 +21,16 @@ export type IndicatorChartType = (typeof INDICATOR_CHART_TYPES)[number];
|
|
|
21
21
|
declare const BOXPLOT_CHART_TYPES: readonly ["boxplot"];
|
|
22
22
|
/** Boxplot chart types @expandType */
|
|
23
23
|
export type BoxplotChartType = (typeof BOXPLOT_CHART_TYPES)[number];
|
|
24
|
+
declare const AREAMAP_CHART_TYPES: readonly ["areamap"];
|
|
25
|
+
/** Areamap chart types @expandType */
|
|
26
|
+
export type AreamapChartType = (typeof AREAMAP_CHART_TYPES)[number];
|
|
24
27
|
declare const IMAGE_CHART_TYPES: readonly ["image"];
|
|
25
28
|
export type ImageChartType = (typeof IMAGE_CHART_TYPES)[number];
|
|
26
29
|
export declare const SCATTERMAP_CHART_TYPES: readonly ["scattermap"];
|
|
27
30
|
/** Scattermap chart types @expandType */
|
|
28
31
|
export type ScattermapChartType = (typeof SCATTERMAP_CHART_TYPES)[number];
|
|
29
|
-
export type ChartDataType = 'cartesian' | 'categorical' | 'scatter' | 'table' | 'indicator';
|
|
30
|
-
export type ChartDesignOptions = LineChartDesignOptions | AreaChartDesignOptions | BarChartDesignOptions | ColumnChartDesignOptions | PieChartDesignOptions | FunnelChartDesignOptions | PolarChartDesignOptions | IndicatorChartDesignOptions | ScatterChartDesignOptions | TreemapChartDesignOptions | BoxplotChartDesignOptions | ScattermapChartDesignOptions;
|
|
32
|
+
export type ChartDataType = 'cartesian' | 'categorical' | 'scatter' | 'table' | 'indicator' | 'areamap';
|
|
33
|
+
export type ChartDesignOptions = LineChartDesignOptions | AreaChartDesignOptions | BarChartDesignOptions | ColumnChartDesignOptions | PieChartDesignOptions | FunnelChartDesignOptions | PolarChartDesignOptions | IndicatorChartDesignOptions | ScatterChartDesignOptions | TreemapChartDesignOptions | BoxplotChartDesignOptions | AreamapChartDesignOptions | ScattermapChartDesignOptions;
|
|
31
34
|
export type ChartConfig = {
|
|
32
35
|
chartType: ChartType;
|
|
33
36
|
dataOptions: ChartDataOptionsInternal;
|
|
@@ -41,4 +44,5 @@ export declare const isIndicator: (chartType: ChartType) => chartType is "indica
|
|
|
41
44
|
export declare const isPolar: (chartType: ChartType) => chartType is "polar";
|
|
42
45
|
export declare const isTable: (chartType: ChartType | TableType) => chartType is "table";
|
|
43
46
|
export declare const isBoxplot: (chartType: ChartType) => chartType is "boxplot";
|
|
47
|
+
export declare const isAreamap: (chartType: ChartType) => chartType is "areamap";
|
|
44
48
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of alternative country names (synonyms) that can be used to match country names from data.
|
|
3
|
+
* For example, 'United States', 'USA' and 'United States of America' should be understood as the same country.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ALTERNATIVE_COUNTRY_NAMES_DICTIONARY: {
|
|
6
|
+
officialName: string;
|
|
7
|
+
allNames: string[];
|
|
8
|
+
id: string;
|
|
9
|
+
}[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FeatureCollection as GeoJsonFeatureCollection } from 'geojson';
|
|
3
|
+
import { GeoDataElement } from '../../../chart-data/types.js';
|
|
4
|
+
import { AreamapType } from '../../../types.js';
|
|
5
|
+
export type AreamapProps = {
|
|
6
|
+
geoJson: GeoJsonFeatureCollection;
|
|
7
|
+
geoData: GeoDataElement[];
|
|
8
|
+
dataOptions: {
|
|
9
|
+
originalValueTitle: string;
|
|
10
|
+
};
|
|
11
|
+
mapType: AreamapType;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Component that renders a map with areas (countries or states) for using in Areamap chart
|
|
15
|
+
*/
|
|
16
|
+
export declare const AreamapMap: React.FC<AreamapProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AreamapChartDataOptionsInternal, ChartDataOptionsInternal } from '../../../chart-data-options/types.js';
|
|
3
|
+
import { AreamapData, ChartData } from '../../../chart-data/types.js';
|
|
4
|
+
import { AreamapChartDesignOptions } from '../../../chart-options-processor/translations/design-options.js';
|
|
5
|
+
import { ChartDesignOptions } from '../../../chart-options-processor/translations/types.js';
|
|
6
|
+
import { ThemeSettings } from '../../../types.js';
|
|
7
|
+
export type AreamapChartProps = {
|
|
8
|
+
chartData: AreamapData;
|
|
9
|
+
dataOptions: AreamapChartDataOptionsInternal;
|
|
10
|
+
designOptions: AreamapChartDesignOptions;
|
|
11
|
+
themeSettings: ThemeSettings;
|
|
12
|
+
};
|
|
13
|
+
export declare const Areamap: React.FC<AreamapChartProps>;
|
|
14
|
+
export declare const isAreamapData: (chartData: ChartData) => chartData is AreamapData;
|
|
15
|
+
export declare const isAreamapDataOptions: (dataOptions: ChartDataOptionsInternal) => dataOptions is AreamapChartDataOptionsInternal;
|
|
16
|
+
export declare const isAreamapChartDesignOptions: (designOptions: ChartDesignOptions) => designOptions is AreamapChartDesignOptions;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Feature as GeoJsonFeature } from 'geojson';
|
|
2
|
+
import { PathOptions } from 'leaflet';
|
|
3
|
+
import { GeoDataElement } from '../../../chart-data/types.js';
|
|
4
|
+
import { AreamapType } from '../../../types.js';
|
|
5
|
+
export type FeatureId = GeoJsonFeature['id'] & string;
|
|
6
|
+
export type FeatureInfo = {
|
|
7
|
+
/** Corresponding GeoDataElement from GeoData */
|
|
8
|
+
geoDataElement?: GeoDataElement;
|
|
9
|
+
style: PathOptions;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
export type FeaturesDictionary = Record<FeatureId, FeatureInfo>;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a dictionary of feature styles for each feature in geoJson
|
|
15
|
+
*/
|
|
16
|
+
export declare function createFeatureStylesDictionary(geoFeatures: GeoJsonFeature[], geoData: GeoDataElement[], mapType: AreamapType): FeaturesDictionary;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FeatureCollection as GeoJsonFeatureCollection } from 'geojson';
|
|
2
|
+
import { AreamapType } from '../../../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Hook to get geoJson from API or cache (LocalStorage)
|
|
5
|
+
*/
|
|
6
|
+
export declare const useGeoJson: (mapType: AreamapType) => {
|
|
7
|
+
geoJson: GeoJsonFeatureCollection | undefined;
|
|
8
|
+
error: Error | undefined;
|
|
9
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ScattermapLocationLevel } from '../../../../chart-data-options/types.js';
|
|
2
|
+
import { ScattermapChartLocation } from '../../../../chart-data/types';
|
|
3
|
+
export declare const useLocations: (locations: ScattermapChartLocation[], locationLevel: ScattermapLocationLevel) => ScattermapChartLocation[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ScattermapChartLocation } from '
|
|
2
|
-
import { ScattermapChartDataOptionsInternal } from '
|
|
1
|
+
import { ScattermapChartLocation } from '../../../../chart-data/types';
|
|
2
|
+
import { ScattermapChartDataOptionsInternal } from '../../../../chart-data-options/types.js';
|
|
3
3
|
import { DataSource, Filter } from '@sisense/sdk-data';
|
|
4
4
|
export type TooltipOptions = {
|
|
5
5
|
content: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ScattermapChartData } from '
|
|
3
|
-
import { ScattermapChartDataOptionsInternal } from '
|
|
4
|
-
import { ScattermapChartDesignOptions } from '
|
|
2
|
+
import { ScattermapChartData } from '../../../chart-data/types.js';
|
|
3
|
+
import { ScattermapChartDataOptionsInternal } from '../../../chart-data-options/types.js';
|
|
4
|
+
import { ScattermapChartDesignOptions } from '../../../chart-options-processor/translations/design-options.js';
|
|
5
5
|
import { DataSource, Filter, FilterRelation } from '@sisense/sdk-data';
|
|
6
6
|
export type ScattermapProps = {
|
|
7
7
|
chartData: ScattermapChartData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ScattermapLocationLevel } from '
|
|
1
|
+
import { ScattermapLocationLevel } from '../../../../chart-data-options/types';
|
|
2
2
|
export declare const LOCATION_DELIMITER = ",";
|
|
3
3
|
export declare function combineLocationNames(names: string[]): string;
|
|
4
4
|
export declare function splitLocationName(combinedLocation: string): string[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ScattermapChartLocation } from '
|
|
1
|
+
import { ScattermapChartLocation } from '../../../../chart-data/types.js';
|
|
2
2
|
export declare function getLocationsMarkerSizes(locations: ScattermapChartLocation[], minsize?: number, maxsize?: number): number[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ScattermapChartLocation } from '
|
|
2
|
-
import { ScattermapChartDataOptionsInternal } from '
|
|
1
|
+
import { ScattermapChartLocation } from '../../../../chart-data/types';
|
|
2
|
+
import { ScattermapChartDataOptionsInternal } from '../../../../chart-data-options/types.js';
|
|
3
3
|
export declare const enum TooltipShowDetails {
|
|
4
4
|
YES = 0,
|
|
5
5
|
NO = 1,
|
|
@@ -14,8 +14,8 @@ export type TabularWidgetType = 'tablewidget' | 'tablewidgetagg';
|
|
|
14
14
|
/**
|
|
15
15
|
* The type of a widget on a dashboard.
|
|
16
16
|
*/
|
|
17
|
-
export type WidgetType = CartesianWidgetType | CategoricalWidgetType | 'chart/scatter' | 'indicator' | TabularWidgetType | 'chart/boxplot' | 'map/scatter';
|
|
18
|
-
export type WidgetSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100' | 'bar/classic' | 'bar/stacked' | 'bar/stacked100' | 'column/classic' | 'column/stackedcolumn' | 'column/stackedcolumn100' | 'line/basic' | 'line/spline' | 'pie/classic' | 'pie/donut' | 'pie/ring' | 'column/polar' | 'area/polar' | 'line/polar' | 'indicator/numeric' | 'indicator/gauge' | 'bubble/scatter' | 'treemap' | 'sunburst' | 'boxplot/full' | 'boxplot/hollow' | 'map/scatter';
|
|
17
|
+
export type WidgetType = CartesianWidgetType | CategoricalWidgetType | 'chart/scatter' | 'indicator' | TabularWidgetType | 'chart/boxplot' | 'map/scatter' | 'map/area';
|
|
18
|
+
export type WidgetSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100' | 'bar/classic' | 'bar/stacked' | 'bar/stacked100' | 'column/classic' | 'column/stackedcolumn' | 'column/stackedcolumn100' | 'line/basic' | 'line/spline' | 'pie/classic' | 'pie/donut' | 'pie/ring' | 'column/polar' | 'area/polar' | 'line/polar' | 'indicator/numeric' | 'indicator/gauge' | 'bubble/scatter' | 'treemap' | 'sunburst' | 'boxplot/full' | 'boxplot/hollow' | 'map/scatter' | 'areamap/world' | 'areamap/usa';
|
|
19
19
|
export declare enum WidgetDashboardFilterMode {
|
|
20
20
|
FILTER = "filter",
|
|
21
21
|
SELECT = "select"
|
|
@@ -322,7 +322,9 @@ export type ScattermapWidgetStyle = {
|
|
|
322
322
|
};
|
|
323
323
|
};
|
|
324
324
|
};
|
|
325
|
-
|
|
325
|
+
/** Currently, WidgetStyle for areamap is an empty object */
|
|
326
|
+
export type AreamapWidgetStyle = {};
|
|
327
|
+
export type WidgetStyle = CartesianWidgetStyle | PolarWidgetStyle | FunnelWidgetStyle | ScatterWidgetStyle | TableWidgetStyle | IndicatorWidgetStyle | TreemapWidgetStyle | SunburstWidgetStyle | BoxplotWidgetStyle | ScattermapWidgetStyle | AreamapWidgetStyle;
|
|
326
328
|
export declare enum FiltersMergeStrategyEnum {
|
|
327
329
|
WIDGET_FIRST = "widgetFirst",
|
|
328
330
|
CODE_FIRST = "codeFirst",
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './query-execution';
|
|
|
11
11
|
export { executeQuery } from './query/execute-query';
|
|
12
12
|
export { SisenseContextProvider } from './sisense-context/sisense-context-provider';
|
|
13
13
|
export { DrilldownWidget } from './widgets/drilldown-widget';
|
|
14
|
+
export { processDrilldownSelections } from './widgets/common/custom-drilldown';
|
|
14
15
|
export { ChartWidget } from './widgets/chart-widget';
|
|
15
16
|
export { TableWidget } from './widgets/table-widget';
|
|
16
17
|
export { ContextMenu } from './widgets/common/context-menu';
|
|
@@ -29,6 +30,7 @@ export * from './treemap-chart';
|
|
|
29
30
|
export * from './sunburst-chart';
|
|
30
31
|
export * from './boxplot-chart';
|
|
31
32
|
export * from './scattermap-chart';
|
|
33
|
+
export * from './areamap-chart';
|
|
32
34
|
export * from './sisense-context/custom-sisense-context-provider';
|
|
33
35
|
export * from './theme-provider/custom-theme-provider';
|
|
34
36
|
export { getThemeSettingsByOid } from './themes/theme-loader';
|