@sisense/sdk-ui 0.16.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/ai/messages/get-widget-options.d.ts +3 -3
  2. package/dist/ai.js +334 -308
  3. package/dist/api/rest-api.d.ts +9 -0
  4. package/dist/app/settings/settings.d.ts +1 -0
  5. package/dist/area-chart.d.ts +2 -2
  6. package/dist/areamap-chart.d.ts +28 -0
  7. package/dist/bar-chart.d.ts +2 -2
  8. package/dist/boxplot-chart.d.ts +38 -0
  9. package/dist/boxplot-utils.d.ts +30 -0
  10. package/dist/chart-data/areamap-data.d.ts +4 -0
  11. package/dist/chart-data/boxplot-data.d.ts +11 -0
  12. package/dist/chart-data/cartesian-data.d.ts +6 -3
  13. package/dist/chart-data/data-coloring/create-data-coloring-function.d.ts +7 -0
  14. package/dist/chart-data/data-coloring/geo-data-coloring-function.d.ts +2 -0
  15. package/dist/chart-data/data-coloring/index.d.ts +3 -0
  16. package/dist/chart-data/{series-data-color-service → data-coloring}/legend-color.d.ts +1 -1
  17. package/dist/chart-data/data-coloring/series-data-coloring-function.d.ts +11 -0
  18. package/dist/chart-data/indicator-data.d.ts +2 -2
  19. package/dist/chart-data/scatter-data.d.ts +2 -2
  20. package/dist/chart-data/scattermap-data.d.ts +4 -0
  21. package/dist/chart-data/types.d.ts +74 -3
  22. package/dist/chart-data-options/translate-boxplot-data-options.d.ts +7 -0
  23. package/dist/chart-data-options/translate-scattermap-data-options.d.ts +3 -0
  24. package/dist/chart-data-options/types.d.ts +140 -10
  25. package/dist/chart-data-options/utils.d.ts +6 -1
  26. package/dist/chart-options-processor/boxplot-chart-options.d.ts +11 -0
  27. package/dist/chart-options-processor/chart-options-service.d.ts +24 -6
  28. package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +2 -2
  29. package/dist/chart-options-processor/style-to-design-options-translator/translate-to-areamap-options.d.ts +3 -0
  30. package/dist/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +4 -2
  31. package/dist/chart-options-processor/subtype-to-design-options.d.ts +8 -2
  32. package/dist/chart-options-processor/theme-option-service.d.ts +0 -1
  33. package/dist/chart-options-processor/translations/axis-section.d.ts +1 -2
  34. package/dist/chart-options-processor/translations/boxplot/boxplot-axis.d.ts +10 -0
  35. package/dist/chart-options-processor/translations/boxplot/boxplot-plot-options.d.ts +3 -0
  36. package/dist/chart-options-processor/translations/boxplot/boxplot-series.d.ts +5 -0
  37. package/dist/chart-options-processor/translations/boxplot/boxplot-tooltip.d.ts +4 -0
  38. package/dist/chart-options-processor/translations/design-options.d.ts +15 -2
  39. package/dist/chart-options-processor/translations/legend-section.d.ts +4 -3
  40. package/dist/chart-options-processor/translations/tooltip-utils.d.ts +5 -0
  41. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +5 -1
  42. package/dist/chart-options-processor/translations/types.d.ts +15 -3
  43. package/dist/chart-options-processor/translations/value-label-section.d.ts +2 -1
  44. package/dist/chart.d.ts +2 -2
  45. package/dist/charts/indicator/indicator-legacy-chart-data-options.d.ts +2 -2
  46. package/dist/charts/indicator/indicator-legacy-chart-options/indicator-legacy-chart-options.d.ts +2 -2
  47. package/dist/charts/indicator/indicator-legacy-chart-options/override-with-value-color.d.ts +2 -2
  48. package/dist/charts/map-charts/areamap/alternative-country-names-dictionary.d.ts +9 -0
  49. package/dist/charts/map-charts/areamap/areamap-map.d.ts +16 -0
  50. package/dist/charts/map-charts/areamap/areamap.d.ts +16 -0
  51. package/dist/charts/map-charts/areamap/feature-styles-dictionary.d.ts +16 -0
  52. package/dist/charts/map-charts/areamap/use-geo-json.d.ts +9 -0
  53. package/dist/charts/map-charts/scattermap/hooks/use-locations.d.ts +3 -0
  54. package/dist/charts/map-charts/scattermap/hooks/use-settings.d.ts +5 -0
  55. package/dist/charts/map-charts/scattermap/hooks/use-tooltip-handler.d.ts +14 -0
  56. package/dist/charts/map-charts/scattermap/scattermap.d.ts +13 -0
  57. package/dist/charts/map-charts/scattermap/types.d.ts +16 -0
  58. package/dist/charts/map-charts/scattermap/utils/color.d.ts +3 -0
  59. package/dist/charts/map-charts/scattermap/utils/copyright.d.ts +2 -0
  60. package/dist/charts/map-charts/scattermap/utils/location.d.ts +5 -0
  61. package/dist/charts/map-charts/scattermap/utils/map.d.ts +2 -0
  62. package/dist/charts/map-charts/scattermap/utils/markers.d.ts +28 -0
  63. package/dist/charts/map-charts/scattermap/utils/size.d.ts +2 -0
  64. package/dist/charts/map-charts/scattermap/utils/tooltip.d.ts +8 -0
  65. package/dist/charts/map-charts/scattermap/utils/values.d.ts +4 -0
  66. package/dist/charts/table/types.d.ts +1 -1
  67. package/dist/column-chart.d.ts +2 -2
  68. package/dist/common/components/loading-dots.d.ts +4 -0
  69. package/dist/dashboard-widget/translate-dashboard-filters.d.ts +1 -1
  70. package/dist/dashboard-widget/translate-panel-color-format.d.ts +1 -1
  71. package/dist/dashboard-widget/translate-widget-data-options.d.ts +4 -3
  72. package/dist/dashboard-widget/translate-widget-style-options.d.ts +2 -2
  73. package/dist/dashboard-widget/types.d.ts +28 -3
  74. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +2 -4
  75. package/dist/decorators/component-decorators/as-sisense-component.d.ts +1 -0
  76. package/dist/filters/components/common/basic-input.d.ts +1 -1
  77. package/dist/filters/components/common/date-range-field-button.d.ts +3 -2
  78. package/dist/filters/components/common/dropdown.d.ts +1 -0
  79. package/dist/filters/components/common/filter-utils.d.ts +13 -0
  80. package/dist/filters/components/common/index.d.ts +1 -0
  81. package/dist/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +2 -1
  82. package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +0 -9
  83. package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +2 -2
  84. package/dist/filters/components/criteria-filter-tile/index.d.ts +0 -1
  85. package/dist/filters/components/date-filter/date-filter/calendar-date-selector.d.ts +10 -8
  86. package/dist/filters/components/date-filter/date-filter/quick-date-selection-buttons.d.ts +4 -4
  87. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +1 -1
  88. package/dist/filters/components/date-filter/index.d.ts +1 -0
  89. package/dist/filters/components/date-filter/relative-date-filter-tile/index.d.ts +1 -0
  90. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-display.d.ts +14 -0
  91. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +36 -0
  92. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +26 -0
  93. package/dist/filters/components/filter-tile.d.ts +1 -1
  94. package/dist/filters/index.d.ts +1 -0
  95. package/dist/index.d.ts +4 -1
  96. package/dist/index.js +4712 -4876
  97. package/dist/indicator-canvas.d.ts +3 -3
  98. package/dist/indicator-chart.d.ts +4 -4
  99. package/dist/line-chart.d.ts +2 -2
  100. package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -0
  101. package/dist/models/dashboard/use-get-dashboard-models.d.ts +2 -1
  102. package/dist/models/widget/use-get-widget-model.d.ts +1 -0
  103. package/dist/models/widget/widget-model.d.ts +5 -4
  104. package/dist/pie-chart.d.ts +2 -2
  105. package/dist/polar-chart.d.ts +2 -2
  106. package/dist/props.d.ts +84 -62
  107. package/dist/query/execute-query.d.ts +1 -1
  108. package/dist/query-execution/execute-query-by-widget-id.d.ts +10 -2
  109. package/dist/query-execution/execute-query.d.ts +11 -4
  110. package/dist/query-execution/index.d.ts +1 -1
  111. package/dist/query-execution/types.d.ts +10 -8
  112. package/dist/query-execution/use-execute-csv-query.d.ts +4 -6
  113. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +6 -2
  114. package/dist/query-execution/use-execute-query.d.ts +2 -2
  115. package/dist/scatter-chart.d.ts +4 -4
  116. package/dist/scattermap-chart.d.ts +36 -0
  117. package/dist/sunburst-chart.d.ts +1 -1
  118. package/dist/table/hooks/use-table-data.d.ts +3 -2
  119. package/dist/table/table.d.ts +2 -2
  120. package/dist/table-widget-4275c061.js +77714 -0
  121. package/dist/themes/theme-loader.d.ts +0 -1
  122. package/dist/translation/resources/en.d.ts +25 -0
  123. package/dist/translation/resources/index.d.ts +50 -0
  124. package/dist/treemap-chart.d.ts +2 -2
  125. package/dist/types.d.ts +89 -8
  126. package/dist/utils/filters-comparator.d.ts +13 -1
  127. package/dist/widgets/chart-widget-deprecated.d.ts +1 -1
  128. package/dist/widgets/chart-widget.d.ts +1 -1
  129. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
  130. package/dist/widgets/common/drilldown.d.ts +12 -2
  131. package/dist/widgets/drilldown-widget.d.ts +2 -2
  132. package/package.json +22 -6
  133. package/dist/chart-data/series-data-color-service/index.d.ts +0 -3
  134. package/dist/chart-data/series-data-color-service/series-data-color-service.d.ts +0 -4
  135. package/dist/table-widget-5f3b1d03.js +0 -64456
  136. /package/dist/chart-data/{series-data-color-service → data-coloring}/types.d.ts +0 -0
@@ -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';
@@ -9,7 +10,7 @@ import { HighchartsType, HighchartsSeriesValues } from './translations/translati
9
10
  import { TooltipSettings } from './tooltip';
10
11
  import { PieOptions } from './translations/pie-plot-options';
11
12
  import { FunnelOptions } from './translations/funnel-plot-options';
12
- import { ChartType, OptionsWithAlerts, CompleteThemeSettings, StyleOptions } from '../types';
13
+ import { ChartType, OptionsWithAlerts, CompleteThemeSettings, ChartStyleOptions, HighchartsSelectEvent } from '../types';
13
14
  import { ChartDataOptionsInternal } from '../chart-data-options/types';
14
15
  import { ScatterBubbleOptions } from './translations/scatter-plot-options';
15
16
  /**
@@ -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;
@@ -43,6 +45,14 @@ export type SeriesType = HighchartsSeriesValues & {
43
45
  marker?: MarkerSettings;
44
46
  type?: string;
45
47
  id?: string;
48
+ medianWidth?: number;
49
+ maxPointWidth?: number;
50
+ minPointWidth?: number;
51
+ whiskerWidth?: number;
52
+ whiskerLength?: number | string;
53
+ fillOpacity?: number;
54
+ strokeOpacity?: number;
55
+ legendIndex?: number;
46
56
  };
47
57
  type ChartPlotOptions = {
48
58
  dataLabels?: ValueLabelSettings;
@@ -78,6 +88,7 @@ export type PlotOptions = {
78
88
  allowPointSelect?: boolean;
79
89
  boostThreshold?: number;
80
90
  turboThreshold?: number;
91
+ softThreshold?: boolean;
81
92
  fillOpacity?: number;
82
93
  connectNulls?: boolean;
83
94
  animation?: {
@@ -92,6 +103,8 @@ export type PlotOptions = {
92
103
  funnel?: FunnelOptions;
93
104
  bubble?: ScatterBubbleOptions;
94
105
  sunburst?: ChartPlotOptions;
106
+ boxplot?: ChartPlotOptions;
107
+ scatter?: ChartPlotOptions;
95
108
  };
96
109
  /**
97
110
  * Highcharts options internal
@@ -103,6 +116,7 @@ export type HighchartsOptionsInternal = {
103
116
  events?: {
104
117
  load?: () => void;
105
118
  redraw?: () => void;
119
+ selection?: (nativeEvent: HighchartsSelectEvent) => void;
106
120
  };
107
121
  spacing?: number[];
108
122
  marginTop?: number;
@@ -111,6 +125,9 @@ export type HighchartsOptionsInternal = {
111
125
  animation?: {
112
126
  duration?: number;
113
127
  };
128
+ zooming?: {
129
+ type: string;
130
+ };
114
131
  };
115
132
  title?: {
116
133
  text: string | null;
@@ -155,15 +172,16 @@ type Navigator = {
155
172
  dataGrouping: {
156
173
  enabled: boolean;
157
174
  };
175
+ color?: string;
158
176
  };
159
177
  enabled: boolean;
160
178
  margin: number;
161
179
  height: number;
162
180
  xAxis: AxisSettings;
163
181
  handles: {
164
- symbols: string[];
165
- backgroundColor: string;
166
- borderColor: string;
182
+ symbols?: string[];
183
+ backgroundColor?: string;
184
+ borderColor?: string;
167
185
  };
168
186
  maskInside: boolean;
169
187
  maskFill: string;
@@ -175,7 +193,7 @@ type Navigator = {
175
193
  right: string;
176
194
  };
177
195
  };
178
- declare const DEFAULT_STYLE_OPTIONS: StyleOptions;
196
+ declare const DEFAULT_STYLE_OPTIONS: ChartStyleOptions;
179
197
  /**
180
198
  * Returns default style options, which can be used as base for custom style options.
181
199
  *
@@ -1,4 +1,4 @@
1
- import { ChartType, StyleOptions } from '../../types';
1
+ import { ChartType, ChartStyleOptions } from '../../types';
2
2
  import { ChartDesignOptions } from '../translations/types';
3
3
  import { ChartDataOptionsInternal } from '../../chart-data-options/types';
4
- export declare const translateStyleOptionsToDesignOptions: (chartType: ChartType, styleOptions: StyleOptions, dataOptions: ChartDataOptionsInternal) => ChartDesignOptions;
4
+ export declare const translateStyleOptionsToDesignOptions: (chartType: ChartType, styleOptions: ChartStyleOptions, dataOptions: ChartDataOptionsInternal) => ChartDesignOptions;
@@ -0,0 +1,3 @@
1
+ import { AreamapStyleOptions } from '../../types.js';
2
+ import { AreamapChartDesignOptions } from '../translations/design-options.js';
3
+ export declare const getAreamapChartDesignOptions: (styleOptions: AreamapStyleOptions) => AreamapChartDesignOptions;
@@ -1,5 +1,5 @@
1
- import { Legend, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, TreemapStyleOptions, SunburstStyleOptions } from '../../types';
2
- import { StackableChartDesignOptions, LineChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, AreaChartDesignOptions, TreemapChartDesignOptions, SunburstChartDesignOptions } from '../translations/design-options';
1
+ import { Legend, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, TreemapStyleOptions, SunburstStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions } from '../../types';
2
+ import { StackableChartDesignOptions, LineChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, AreaChartDesignOptions, TreemapChartDesignOptions, SunburstChartDesignOptions, BoxplotChartDesignOptions, ScattermapChartDesignOptions } from '../translations/design-options';
3
3
  import { LegendPosition } from '../translations/legend-section';
4
4
  import { StackType } from '../translations/translations-to-highcharts';
5
5
  export declare const getLegend: (legend?: Legend) => LegendPosition;
@@ -14,3 +14,5 @@ export declare const getTreemapChartDesignOptions: (styleOptions: TreemapStyleOp
14
14
  export declare const getSunburstChartDesignOptions: (styleOptions: SunburstStyleOptions) => SunburstChartDesignOptions;
15
15
  export declare const getPolarChartDesignOptions: (styleOptions: PolarStyleOptions) => PolarChartDesignOptions;
16
16
  export declare const getScatterChartDesignOptions: (styleOptions: ScatterStyleOptions) => ScatterChartDesignOptions;
17
+ export declare const getBoxplotChartDesignOptions: (styleOptions: BoxplotStyleOptions) => BoxplotChartDesignOptions;
18
+ export declare const getScattermapChartDesignOptions: (styleOptions: ScattermapStyleOptions) => ScattermapChartDesignOptions;
@@ -1,5 +1,6 @@
1
1
  import { LineType, StackType } from './translations/translations-to-highcharts';
2
- import { IndicatorStyleType, PolarType } from './translations/design-options';
2
+ import { IndicatorStyleType, PolarType, BoxplotType } from './translations/design-options';
3
+ import { AreamapType } from '../types';
3
4
  /**
4
5
  * Property of {@link LineStyleOptions}
5
6
  *
@@ -88,11 +89,16 @@ export type IndicatorSubtype = 'indicator/numeric' | 'indicator/gauge';
88
89
  */
89
90
  export type TreemapSubtype = 'treemap';
90
91
  export type SunburstSubtype = 'sunburst';
91
- export type ChartSubtype = LineSubtype | AreaSubtype | StackableSubtype | PieSubtype | PolarSubtype | IndicatorSubtype | TreemapSubtype | SunburstSubtype;
92
+ export type BoxplotSubtype = 'boxplot/full' | 'boxplot/hollow';
93
+ export type ScattermapSubtype = 'scattermap';
94
+ export type AreamapSubtype = 'areamap/world' | 'areamap/usa';
95
+ export type ChartSubtype = LineSubtype | AreaSubtype | StackableSubtype | PieSubtype | PolarSubtype | IndicatorSubtype | TreemapSubtype | SunburstSubtype | BoxplotSubtype | ScattermapSubtype | AreamapSubtype;
92
96
  export declare const chartSubtypeToDesignOptions: Readonly<Record<ChartSubtype, {
93
97
  lineType?: LineType | undefined;
94
98
  stackType?: StackType | undefined;
95
99
  pieType?: "classic" | "donut" | "ring" | undefined;
96
100
  polarType?: PolarType | undefined;
97
101
  indicatorType?: IndicatorStyleType | undefined;
102
+ boxplotType?: BoxplotType | undefined;
103
+ mapType?: AreamapType | undefined;
98
104
  }>>;
@@ -5,7 +5,6 @@ export declare const applyThemeToChart: (chartOptions: HighchartsOptionsInternal
5
5
  * Returns default theme settings, which can be used as base for custom theme options.
6
6
  *
7
7
  * @returns Theme settings object
8
- *
9
8
  * @internal
10
9
  */
11
10
  export declare const getDefaultThemeSettings: () => CompleteThemeSettings;
@@ -19,7 +19,7 @@ export type AxisMinMax = {
19
19
  max: number;
20
20
  };
21
21
  export type AxisOrientation = 'horizontal' | 'vertical';
22
- interface AxisLabelsFormatterContextObject {
22
+ export interface AxisLabelsFormatterContextObject {
23
23
  value: string | number;
24
24
  axis: {
25
25
  categories: (string | number)[];
@@ -105,4 +105,3 @@ export declare const getDateFormatter: (category: Category, dateFormatter?: ((da
105
105
  export declare const getXAxisDatetimeSettings: (axis: Axis, category: Category, values: number[], dateFormatter?: ((date: Date, format: string) => string) | undefined) => AxisSettings[];
106
106
  export declare const getXAxisSettings: (axis: Axis, axis2: Axis | undefined, categories: string[], plotBands: PlotBand[], xAxisOrientation: AxisOrientation, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType) => AxisSettings[];
107
107
  export declare const getYAxisSettings: (axis: Axis, axis2: Axis | undefined, axisMinMax: AxisMinMax, axis2MinMax: AxisMinMax | undefined, showTotal: boolean, chartDataOptions: ChartDataOptionsInternal) => [AxisSettings[], AxisClipped[]];
108
- export {};
@@ -0,0 +1,10 @@
1
+ import { BoxplotChartData } from '../../../chart-data/types';
2
+ import { Axis, AxisSettings } from '../axis-section';
3
+ import { Value, type Category } from '../../../chart-data-options/types';
4
+ export declare const commonColor = "#d1d1d7";
5
+ export declare const calculateYAxisMinMax: (chartData: BoxplotChartData) => {
6
+ min: number;
7
+ max: number;
8
+ };
9
+ export declare const getBoxplotXAxisSettings: (axis: Axis, categories: string[], axisDataOption?: Category) => AxisSettings[];
10
+ export declare const getBoxplotYAxisSettings: (axis: Axis, chartData: BoxplotChartData, axisDataOption?: Value) => AxisSettings[];
@@ -0,0 +1,3 @@
1
+ import { PlotOptions } from '../../chart-options-service.js';
2
+ import { ValueLabel } from '../value-label-section.js';
3
+ export declare const getBoxplotPlotOptions: (valueLabel: ValueLabel) => PlotOptions;
@@ -0,0 +1,5 @@
1
+ import { SeriesType } from '../../chart-options-service.js';
2
+ import { BoxplotChartData } from '../../../chart-data/types.js';
3
+ import { SeriesWithAlerts } from '../../../types.js';
4
+ import { BoxplotChartDesignOptions } from '../design-options.js';
5
+ export declare const buildBoxplotSeries: (data: BoxplotChartData, chartDesignOptions: BoxplotChartDesignOptions) => SeriesWithAlerts<SeriesType[]>;
@@ -0,0 +1,4 @@
1
+ import { TFunction } from '@sisense/sdk-common';
2
+ import { BoxplotChartDataOptionsInternal } from '../../../chart-data-options/types';
3
+ import { TooltipSettings } from '../tooltip-utils';
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, 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
  *
@@ -81,7 +87,7 @@ export type IndicatorComponents = {
81
87
  /** The text of the title */
82
88
  text?: string;
83
89
  };
84
- /** The secondary title of the indicator chart to be shown when `secondary` is specified in {@link IndicatorDataOptions} */
90
+ /** The secondary title of the indicator chart to be shown when `secondary` is specified in {@link IndicatorChartDataOptions} */
85
91
  secondaryTitle?: {
86
92
  /** The text of the secondary title */
87
93
  text?: string;
@@ -116,4 +122,11 @@ export type PolarType = 'line' | 'area' | 'column';
116
122
  export type PolarChartDesignOptions = BaseDesignOptionsType & {
117
123
  polarType: PolarType;
118
124
  };
125
+ export type BoxplotType = 'full' | 'hollow';
126
+ export type BoxplotChartDesignOptions = BaseDesignOptionsType & {
127
+ boxplotType: BoxplotType;
128
+ };
129
+ export type ScattermapChartDesignOptions = BaseDesignOptionsType & {
130
+ markers: Required<ScattermapMarkers>;
131
+ };
119
132
  export {};
@@ -2,9 +2,9 @@ import { Style } from '../chart-options-service';
2
2
  export type LegendPosition = 'top' | 'left' | 'right' | 'bottom' | null;
3
3
  export type LegendSettings = {
4
4
  enabled: boolean;
5
- align: 'center' | 'left' | 'right';
6
- verticalAlign: 'top' | 'middle' | 'bottom';
7
- layout: 'horizontal' | 'vertical';
5
+ align?: 'center' | 'left' | 'right';
6
+ verticalAlign?: 'top' | 'middle' | 'bottom';
7
+ layout?: 'horizontal' | 'vertical';
8
8
  itemStyle?: Style & {
9
9
  cursor?: string;
10
10
  };
@@ -19,6 +19,7 @@ export type LegendSettings = {
19
19
  [key: string]: string | number;
20
20
  };
21
21
  };
22
+ maxHeight?: number;
22
23
  };
23
24
  export declare const legendItemStyleDefault: LegendSettings['itemStyle'];
24
25
  export declare const getLegendSettings: (position: LegendPosition) => LegendSettings;
@@ -26,6 +26,11 @@ export type InternalSeries = {
26
26
  x?: number | string;
27
27
  y?: number;
28
28
  z?: number;
29
+ high?: number;
30
+ low?: number;
31
+ q1?: number;
32
+ q3?: number;
33
+ median?: number;
29
34
  name: string;
30
35
  color: string;
31
36
  custom?: {
@@ -65,9 +65,13 @@ export declare const addStackingIfSpecified: (chartType: ChartType, designOption
65
65
  * @param categories -
66
66
  * @param index -
67
67
  */
68
- export declare const indexMapWhenOnlyY: (categories: string[], index: number) => (0 | -1)[];
68
+ export declare const indexMapWhenOnlyY: (categories: string[], index: number) => (-1 | 0)[];
69
69
  export declare const formatSeriesContinuousXAxis: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, interval: number, maxCategories: number, dateFormatter: (time: number) => string, yAxisSettings: AxisSettings, axisClipped: AxisClipped) => HighchartsSeriesValues;
70
70
  export declare const formatSeries: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, categories?: string[], categoryColors?: string[]) => HighchartsSeriesValues;
71
+ export declare const adjustMinMaxWhenInvalid: (explicitAxis: AxisMinMax, autoMinMax: AxisMinMax) => {
72
+ min: number;
73
+ max: number;
74
+ };
71
75
  export declare const adjustMinWhenColumnBar: (chartType: ChartType, autoMinMax: AxisMinMax) => {
72
76
  min: number;
73
77
  max: number;
@@ -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 } 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"];
@@ -18,10 +18,19 @@ export type TableType = (typeof TABLE_TYPES)[number];
18
18
  declare const INDICATOR_CHART_TYPES: readonly ["indicator"];
19
19
  /** Indicator chart types @expandType */
20
20
  export type IndicatorChartType = (typeof INDICATOR_CHART_TYPES)[number];
21
+ declare const BOXPLOT_CHART_TYPES: readonly ["boxplot"];
22
+ /** Boxplot chart types @expandType */
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];
21
27
  declare const IMAGE_CHART_TYPES: readonly ["image"];
22
28
  export type ImageChartType = (typeof IMAGE_CHART_TYPES)[number];
23
- export type ChartDataType = 'cartesian' | 'categorical' | 'scatter' | 'table' | 'indicator';
24
- export type ChartDesignOptions = LineChartDesignOptions | AreaChartDesignOptions | BarChartDesignOptions | ColumnChartDesignOptions | PieChartDesignOptions | FunnelChartDesignOptions | PolarChartDesignOptions | IndicatorChartDesignOptions | ScatterChartDesignOptions | TreemapChartDesignOptions;
29
+ export declare const SCATTERMAP_CHART_TYPES: readonly ["scattermap"];
30
+ /** Scattermap chart types @expandType */
31
+ export type ScattermapChartType = (typeof SCATTERMAP_CHART_TYPES)[number];
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;
25
34
  export type ChartConfig = {
26
35
  chartType: ChartType;
27
36
  dataOptions: ChartDataOptionsInternal;
@@ -30,7 +39,10 @@ export type ChartConfig = {
30
39
  export declare const isCartesian: (chartType: ChartType) => chartType is "area" | "line" | "bar" | "column" | "polar";
31
40
  export declare const isCategorical: (chartType: ChartType) => chartType is "pie" | "funnel" | "treemap" | "sunburst";
32
41
  export declare const isScatter: (chartType: ChartType) => chartType is "scatter";
42
+ export declare const isScattermap: (chartType: ChartType) => chartType is "scattermap";
33
43
  export declare const isIndicator: (chartType: ChartType) => chartType is "indicator";
34
44
  export declare const isPolar: (chartType: ChartType) => chartType is "polar";
35
45
  export declare const isTable: (chartType: ChartType | TableType) => chartType is "table";
46
+ export declare const isBoxplot: (chartType: ChartType) => chartType is "boxplot";
47
+ export declare const isAreamap: (chartType: ChartType) => chartType is "areamap";
36
48
  export {};
@@ -1,3 +1,4 @@
1
+ import type { DataLabelsOptions } from '@sisense/sisense-charts';
1
2
  import { Style } from '../chart-options-service';
2
3
  import { NumberFormatConfig } from './number-format-config';
3
4
  import { AxisOrientation } from './axis-section';
@@ -21,7 +22,7 @@ export type ValueLabelSettings = {
21
22
  relative: boolean;
22
23
  totals: boolean;
23
24
  };
24
- formatter?: (this: InternalSeries) => string;
25
+ formatter?: (this: InternalSeries, options?: DataLabelsOptions, valuePropName?: string) => string;
25
26
  };
26
27
  export declare const createValueLabelFormatter: (numberFormatConfig?: NumberFormatConfig) => (this: InternalSeries) => string;
27
28
  export declare const getValueLabelSettings: (xAxisOrientation: AxisOrientation, valueLabel: ValueLabel, inside?: boolean) => ValueLabelSettings;
package/dist/chart.d.ts CHANGED
@@ -14,10 +14,10 @@ export declare const shouldSkipSisenseContextWaiting: (props: ChartProps) => boo
14
14
  * dataSet={DM.DataSource}
15
15
  * dataOptions={{
16
16
  * category: [DM.Commerce.AgeRange],
17
- * value: [measures.sum(DM.Commerce.Revenue)],
17
+ * value: [measureFactory.sum(DM.Commerce.Revenue)],
18
18
  * breakBy: [DM.Commerce.Gender],
19
19
  * }}
20
- * filters={[filters.members(DM.Commerce.Gender,['Female', 'Male'])]}
20
+ * filters={[filterFactory.members(DM.Commerce.Gender,['Female', 'Male'])]}
21
21
  * onDataPointClick= {(point, nativeEvent) => { console.log('clicked', point, nativeEvent); }}
22
22
  * />
23
23
  * ```
@@ -1,9 +1,9 @@
1
- import { IndicatorDataOptions } from '../../chart-data-options/types';
1
+ import { IndicatorChartDataOptions } from '../../chart-data-options/types';
2
2
  import { IndicatorChartDesignOptions } from '../../chart-options-processor/translations/design-options';
3
3
  import { IndicatorChartData } from '../../chart-data/types';
4
4
  import { LegacyIndicatorChartTypes } from './types';
5
5
  export type IndicatorLegacyChartDataOptions = ReturnType<typeof createLegacyChartDataOptions>;
6
- export declare const createLegacyChartDataOptions: (chartData: IndicatorChartData, chartDesignOptions: IndicatorChartDesignOptions, chartDataOptions: IndicatorDataOptions) => {
6
+ export declare const createLegacyChartDataOptions: (chartData: IndicatorChartData, chartDesignOptions: IndicatorChartDesignOptions, chartDataOptions: IndicatorChartDataOptions) => {
7
7
  type: LegacyIndicatorChartTypes;
8
8
  skin: 1 | 2 | "vertical" | "horizontal";
9
9
  title: {
@@ -1,10 +1,10 @@
1
1
  import { IndicatorStyleType, NumericIndicatorSubType } from '../../../chart-options-processor/translations/design-options';
2
- import { IndicatorDataOptions, ThemeSettings } from '../../../types';
2
+ import { IndicatorChartDataOptions, ThemeSettings } from '../../../types';
3
3
  import { LegacyIndicatorChartOptions } from '../types';
4
4
  import { IndicatorChartData } from '../../../chart-data/types';
5
5
  export type ChartRenderingOptions = {
6
6
  chartData: IndicatorChartData;
7
- dataOptions: IndicatorDataOptions;
7
+ dataOptions: IndicatorChartDataOptions;
8
8
  themeSettings?: ThemeSettings;
9
9
  };
10
10
  export type IndicatorTypeOptions = {
@@ -1,4 +1,4 @@
1
- import { IndicatorDataOptions, ConditionalDataColorOptions, DataColorOptions, UniformDataColorOptions } from '../../../types';
1
+ import { IndicatorChartDataOptions, ConditionalDataColorOptions, DataColorOptions, UniformDataColorOptions } from '../../../types';
2
2
  import { LegacyIndicatorChartOptions } from '../types';
3
3
  import { IndicatorTypeOptions } from './indicator-legacy-chart-options';
4
4
  /**
@@ -15,7 +15,7 @@ export type AllowedIndicatorColoringTypes = 'Static' | 'Absolute';
15
15
  * @param dataOptions - The indicator data options to extract the color options from.
16
16
  * @returns The color options from the indicator data options.
17
17
  */
18
- export declare function getValueColorOptions(dataOptions: IndicatorDataOptions): DataColorOptions | undefined;
18
+ export declare function getValueColorOptions(dataOptions: IndicatorChartDataOptions): DataColorOptions | undefined;
19
19
  /**
20
20
  * Overrides the value color in the legacy indicator chart options with the specified color.
21
21
  *
@@ -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[];
@@ -0,0 +1,5 @@
1
+ type GeoSettings = {
2
+ maps_api_provider: string;
3
+ };
4
+ export declare const useGeoSettings: () => GeoSettings | null;
5
+ export {};
@@ -0,0 +1,14 @@
1
+ import { ScattermapChartLocation } from '../../../../chart-data/types';
2
+ import { ScattermapChartDataOptionsInternal } from '../../../../chart-data-options/types.js';
3
+ import { DataSource, Filter } from '@sisense/sdk-data';
4
+ export type TooltipOptions = {
5
+ content: string;
6
+ postponedContent?: Promise<string>;
7
+ };
8
+ type TooltipHandler = (location: ScattermapChartLocation) => TooltipOptions;
9
+ export declare const useTooltipHandler: ({ dataOptions, dataSource, filters, }: {
10
+ dataOptions: ScattermapChartDataOptionsInternal;
11
+ dataSource: DataSource | null;
12
+ filters?: Filter[] | undefined;
13
+ }) => TooltipHandler;
14
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
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
+ import { DataSource, Filter, FilterRelation } from '@sisense/sdk-data';
6
+ export type ScattermapProps = {
7
+ chartData: ScattermapChartData;
8
+ dataOptions: ScattermapChartDataOptionsInternal;
9
+ designOptions: ScattermapChartDesignOptions;
10
+ dataSource: DataSource | null;
11
+ filters?: Filter[] | FilterRelation;
12
+ };
13
+ export declare const Scattermap: ({ chartData, dataOptions, dataSource, filters, designOptions, }: ScattermapProps) => JSX.Element;
@@ -0,0 +1,16 @@
1
+ export type Coordinates = {
2
+ lat: number;
3
+ lng: number;
4
+ };
5
+ export type Location = {
6
+ _id: string;
7
+ lookupKey: string;
8
+ placetype: null | string;
9
+ context: null | string;
10
+ err: null | string;
11
+ latLng: Coordinates;
12
+ name: string;
13
+ place_name: string;
14
+ text: string;
15
+ version: string;
16
+ };
@@ -0,0 +1,3 @@
1
+ import { ScattermapChartLocation } from '../../../../chart-data/types.js';
2
+ import { DataColorOptions } from '../../../../types.js';
3
+ export declare function getLocationsMarkerColors(locations: ScattermapChartLocation[], colorOptions?: DataColorOptions): string[];
@@ -0,0 +1,2 @@
1
+ import leaflet from 'leaflet';
2
+ export declare function addCopyright(map: leaflet.Map, mapUrl: string): leaflet.Control.Attribution;
@@ -0,0 +1,5 @@
1
+ import { ScattermapLocationLevel } from 'packages/sdk-ui/src/chart-data-options/types';
2
+ export declare const LOCATION_DELIMITER = ",";
3
+ export declare function combineLocationNames(names: string[]): string;
4
+ export declare function splitLocationName(combinedLocation: string): string[];
5
+ export declare function getLocationGeoLevel(level: ScattermapLocationLevel): "country" | "city" | "adm" | undefined;
@@ -0,0 +1,2 @@
1
+ import leaflet from 'leaflet';
2
+ export declare function fitMapToBounds(map: leaflet.Map, markers: leaflet.CircleMarker[]): void;
@@ -0,0 +1,28 @@
1
+ import leaflet from 'leaflet';
2
+ import { ScattermapMarkers } from 'packages/sdk-ui/src/types';
3
+ type PrepareMarkerOptionsProps = {
4
+ color: string;
5
+ size: number;
6
+ fill: Required<ScattermapMarkers>['fill'];
7
+ blur: boolean;
8
+ };
9
+ type CreateMarkerProps = {
10
+ coordinates: {
11
+ lat: number;
12
+ lng: number;
13
+ };
14
+ style: PrepareMarkerOptionsProps;
15
+ };
16
+ export declare function prepareMarkerOptions(style: PrepareMarkerOptionsProps): {
17
+ radius: number;
18
+ fillOpacity: number;
19
+ opacity: number;
20
+ fillColor: string;
21
+ color: string;
22
+ stroke: boolean;
23
+ weight: number;
24
+ customStyle: PrepareMarkerOptionsProps;
25
+ };
26
+ export declare function createMarker({ coordinates, style }: CreateMarkerProps): leaflet.CircleMarker<any>;
27
+ export declare function removeMarkers(markers: leaflet.CircleMarker[]): void;
28
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ScattermapChartLocation } from '../../../../chart-data/types.js';
2
+ export declare function getLocationsMarkerSizes(locations: ScattermapChartLocation[], minsize?: number, maxsize?: number): number[];
@@ -0,0 +1,8 @@
1
+ import { ScattermapChartLocation } from '../../../../chart-data/types';
2
+ import { ScattermapChartDataOptionsInternal } from '../../../../chart-data-options/types.js';
3
+ export declare const enum TooltipShowDetails {
4
+ YES = 0,
5
+ NO = 1,
6
+ LOADING = 2
7
+ }
8
+ export declare const createScattermapTooltip: (location: ScattermapChartLocation, dataOptions: ScattermapChartDataOptionsInternal, showDetails?: TooltipShowDetails) => string;