@sisense/sdk-ui 0.16.0 → 1.0.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 (123) hide show
  1. package/dist/ai/messages/get-widget-options.d.ts +3 -3
  2. package/dist/ai.js +334 -308
  3. package/dist/area-chart.d.ts +2 -2
  4. package/dist/bar-chart.d.ts +2 -2
  5. package/dist/boxplot-chart.d.ts +38 -0
  6. package/dist/boxplot-utils.d.ts +30 -0
  7. package/dist/chart-data/boxplot-data.d.ts +11 -0
  8. package/dist/chart-data/cartesian-data.d.ts +6 -3
  9. package/dist/chart-data/data-coloring/create-data-coloring-function.d.ts +7 -0
  10. package/dist/chart-data/data-coloring/index.d.ts +3 -0
  11. package/dist/chart-data/{series-data-color-service → data-coloring}/legend-color.d.ts +1 -1
  12. package/dist/chart-data/data-coloring/series-data-coloring-function.d.ts +11 -0
  13. package/dist/chart-data/indicator-data.d.ts +2 -2
  14. package/dist/chart-data/scatter-data.d.ts +2 -2
  15. package/dist/chart-data/scattermap-data.d.ts +4 -0
  16. package/dist/chart-data/types.d.ts +46 -1
  17. package/dist/chart-data-options/translate-boxplot-data-options.d.ts +7 -0
  18. package/dist/chart-data-options/translate-scattermap-data-options.d.ts +3 -0
  19. package/dist/chart-data-options/types.d.ts +122 -10
  20. package/dist/chart-data-options/utils.d.ts +6 -1
  21. package/dist/chart-options-processor/boxplot-chart-options.d.ts +10 -0
  22. package/dist/chart-options-processor/chart-options-service.d.ts +21 -5
  23. package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +2 -2
  24. package/dist/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +4 -2
  25. package/dist/chart-options-processor/subtype-to-design-options.d.ts +5 -2
  26. package/dist/chart-options-processor/theme-option-service.d.ts +0 -1
  27. package/dist/chart-options-processor/translations/axis-section.d.ts +1 -2
  28. package/dist/chart-options-processor/translations/boxplot/boxplot-axis.d.ts +10 -0
  29. package/dist/chart-options-processor/translations/boxplot/boxplot-plot-options.d.ts +3 -0
  30. package/dist/chart-options-processor/translations/boxplot/boxplot-series.d.ts +5 -0
  31. package/dist/chart-options-processor/translations/boxplot/boxplot-tooltip.d.ts +3 -0
  32. package/dist/chart-options-processor/translations/design-options.d.ts +9 -2
  33. package/dist/chart-options-processor/translations/legend-section.d.ts +4 -3
  34. package/dist/chart-options-processor/translations/tooltip-utils.d.ts +5 -0
  35. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +5 -1
  36. package/dist/chart-options-processor/translations/types.d.ts +10 -2
  37. package/dist/chart-options-processor/translations/value-label-section.d.ts +2 -1
  38. package/dist/chart.d.ts +2 -2
  39. package/dist/charts/indicator/indicator-legacy-chart-data-options.d.ts +2 -2
  40. package/dist/charts/indicator/indicator-legacy-chart-options/indicator-legacy-chart-options.d.ts +2 -2
  41. package/dist/charts/indicator/indicator-legacy-chart-options/override-with-value-color.d.ts +2 -2
  42. package/dist/charts/scattermap/hooks/use-locations.d.ts +3 -0
  43. package/dist/charts/scattermap/hooks/use-settings.d.ts +5 -0
  44. package/dist/charts/scattermap/hooks/use-tooltip-handler.d.ts +14 -0
  45. package/dist/charts/scattermap/scattermap.d.ts +13 -0
  46. package/dist/charts/scattermap/types.d.ts +16 -0
  47. package/dist/charts/scattermap/utils/color.d.ts +3 -0
  48. package/dist/charts/scattermap/utils/copyright.d.ts +2 -0
  49. package/dist/charts/scattermap/utils/location.d.ts +5 -0
  50. package/dist/charts/scattermap/utils/map.d.ts +2 -0
  51. package/dist/charts/scattermap/utils/markers.d.ts +28 -0
  52. package/dist/charts/scattermap/utils/size.d.ts +2 -0
  53. package/dist/charts/scattermap/utils/tooltip.d.ts +8 -0
  54. package/dist/charts/scattermap/utils/values.d.ts +4 -0
  55. package/dist/charts/table/types.d.ts +1 -1
  56. package/dist/column-chart.d.ts +2 -2
  57. package/dist/common/components/loading-dots.d.ts +4 -0
  58. package/dist/dashboard-widget/translate-dashboard-filters.d.ts +1 -1
  59. package/dist/dashboard-widget/translate-panel-color-format.d.ts +1 -1
  60. package/dist/dashboard-widget/translate-widget-data-options.d.ts +4 -3
  61. package/dist/dashboard-widget/translate-widget-style-options.d.ts +2 -2
  62. package/dist/dashboard-widget/types.d.ts +26 -3
  63. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +2 -4
  64. package/dist/decorators/component-decorators/as-sisense-component.d.ts +1 -0
  65. package/dist/filters/components/common/basic-input.d.ts +1 -1
  66. package/dist/filters/components/common/date-range-field-button.d.ts +3 -2
  67. package/dist/filters/components/common/dropdown.d.ts +1 -0
  68. package/dist/filters/components/common/filter-utils.d.ts +13 -0
  69. package/dist/filters/components/common/index.d.ts +1 -0
  70. package/dist/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +2 -1
  71. package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +0 -9
  72. package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +2 -2
  73. package/dist/filters/components/criteria-filter-tile/index.d.ts +0 -1
  74. package/dist/filters/components/date-filter/date-filter/calendar-date-selector.d.ts +10 -8
  75. package/dist/filters/components/date-filter/date-filter/quick-date-selection-buttons.d.ts +4 -4
  76. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +1 -1
  77. package/dist/filters/components/date-filter/index.d.ts +1 -0
  78. package/dist/filters/components/date-filter/relative-date-filter-tile/index.d.ts +1 -0
  79. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-display.d.ts +14 -0
  80. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +36 -0
  81. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +26 -0
  82. package/dist/filters/components/filter-tile.d.ts +1 -1
  83. package/dist/filters/index.d.ts +1 -0
  84. package/dist/index.d.ts +3 -1
  85. package/dist/index.js +3804 -3927
  86. package/dist/indicator-canvas.d.ts +3 -3
  87. package/dist/indicator-chart.d.ts +4 -4
  88. package/dist/line-chart.d.ts +2 -2
  89. package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -0
  90. package/dist/models/dashboard/use-get-dashboard-models.d.ts +2 -1
  91. package/dist/models/widget/use-get-widget-model.d.ts +1 -0
  92. package/dist/models/widget/widget-model.d.ts +5 -4
  93. package/dist/pie-chart.d.ts +2 -2
  94. package/dist/polar-chart.d.ts +2 -2
  95. package/dist/props.d.ts +67 -62
  96. package/dist/query/execute-query.d.ts +1 -1
  97. package/dist/query-execution/execute-query-by-widget-id.d.ts +10 -2
  98. package/dist/query-execution/execute-query.d.ts +11 -4
  99. package/dist/query-execution/index.d.ts +1 -1
  100. package/dist/query-execution/types.d.ts +10 -8
  101. package/dist/query-execution/use-execute-csv-query.d.ts +4 -6
  102. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +6 -2
  103. package/dist/query-execution/use-execute-query.d.ts +2 -2
  104. package/dist/scatter-chart.d.ts +4 -4
  105. package/dist/scattermap-chart.d.ts +36 -0
  106. package/dist/sunburst-chart.d.ts +1 -1
  107. package/dist/table/hooks/use-table-data.d.ts +3 -2
  108. package/dist/table/table.d.ts +2 -2
  109. package/dist/table-widget-7936746a.js +72481 -0
  110. package/dist/themes/theme-loader.d.ts +0 -1
  111. package/dist/translation/resources/en.d.ts +15 -0
  112. package/dist/translation/resources/index.d.ts +30 -0
  113. package/dist/treemap-chart.d.ts +2 -2
  114. package/dist/types.d.ts +76 -7
  115. package/dist/widgets/chart-widget-deprecated.d.ts +1 -1
  116. package/dist/widgets/chart-widget.d.ts +1 -1
  117. package/dist/widgets/common/drilldown.d.ts +12 -2
  118. package/dist/widgets/drilldown-widget.d.ts +2 -2
  119. package/package.json +19 -6
  120. package/dist/chart-data/series-data-color-service/index.d.ts +0 -3
  121. package/dist/chart-data/series-data-color-service/series-data-color-service.d.ts +0 -4
  122. package/dist/table-widget-5f3b1d03.js +0 -64456
  123. /package/dist/chart-data/{series-data-color-service → data-coloring}/types.d.ts +0 -0
@@ -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,3 @@
1
+ import { BoxplotChartDataOptionsInternal } from '../../../chart-data-options/types';
2
+ import { TooltipSettings } from '../tooltip-utils';
3
+ export declare const getBoxplotTooltipSettings: (dataOptions: BoxplotChartDataOptionsInternal) => 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 { Convolution, ScattermapMarkers, SunburstStyleOptions, TreemapStyleOptions } from '../../types';
9
9
  import { ScatterMarkerSize } from './scatter-plot-options';
10
10
  type DataLimits = {
11
11
  seriesCapacity: number;
@@ -81,7 +81,7 @@ export type IndicatorComponents = {
81
81
  /** The text of the title */
82
82
  text?: string;
83
83
  };
84
- /** The secondary title of the indicator chart to be shown when `secondary` is specified in {@link IndicatorDataOptions} */
84
+ /** The secondary title of the indicator chart to be shown when `secondary` is specified in {@link IndicatorChartDataOptions} */
85
85
  secondaryTitle?: {
86
86
  /** The text of the secondary title */
87
87
  text?: string;
@@ -116,4 +116,11 @@ export type PolarType = 'line' | 'area' | 'column';
116
116
  export type PolarChartDesignOptions = BaseDesignOptionsType & {
117
117
  polarType: PolarType;
118
118
  };
119
+ export type BoxplotType = 'full' | 'hollow';
120
+ export type BoxplotChartDesignOptions = BaseDesignOptionsType & {
121
+ boxplotType: BoxplotType;
122
+ };
123
+ export type ScattermapChartDesignOptions = BaseDesignOptionsType & {
124
+ markers: Required<ScattermapMarkers>;
125
+ };
119
126
  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, 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,16 @@ 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];
21
24
  declare const IMAGE_CHART_TYPES: readonly ["image"];
22
25
  export type ImageChartType = (typeof IMAGE_CHART_TYPES)[number];
26
+ export declare const SCATTERMAP_CHART_TYPES: readonly ["scattermap"];
27
+ /** Scattermap chart types @expandType */
28
+ export type ScattermapChartType = (typeof SCATTERMAP_CHART_TYPES)[number];
23
29
  export type ChartDataType = 'cartesian' | 'categorical' | 'scatter' | 'table' | 'indicator';
24
- export type ChartDesignOptions = LineChartDesignOptions | AreaChartDesignOptions | BarChartDesignOptions | ColumnChartDesignOptions | PieChartDesignOptions | FunnelChartDesignOptions | PolarChartDesignOptions | IndicatorChartDesignOptions | ScatterChartDesignOptions | TreemapChartDesignOptions;
30
+ export type ChartDesignOptions = LineChartDesignOptions | AreaChartDesignOptions | BarChartDesignOptions | ColumnChartDesignOptions | PieChartDesignOptions | FunnelChartDesignOptions | PolarChartDesignOptions | IndicatorChartDesignOptions | ScatterChartDesignOptions | TreemapChartDesignOptions | BoxplotChartDesignOptions | ScattermapChartDesignOptions;
25
31
  export type ChartConfig = {
26
32
  chartType: ChartType;
27
33
  dataOptions: ChartDataOptionsInternal;
@@ -30,7 +36,9 @@ export type ChartConfig = {
30
36
  export declare const isCartesian: (chartType: ChartType) => chartType is "area" | "line" | "bar" | "column" | "polar";
31
37
  export declare const isCategorical: (chartType: ChartType) => chartType is "pie" | "funnel" | "treemap" | "sunburst";
32
38
  export declare const isScatter: (chartType: ChartType) => chartType is "scatter";
39
+ export declare const isScattermap: (chartType: ChartType) => chartType is "scattermap";
33
40
  export declare const isIndicator: (chartType: ChartType) => chartType is "indicator";
34
41
  export declare const isPolar: (chartType: ChartType) => chartType is "polar";
35
42
  export declare const isTable: (chartType: ChartType | TableType) => chartType is "table";
43
+ export declare const isBoxplot: (chartType: ChartType) => chartType is "boxplot";
36
44
  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,3 @@
1
+ import { Location } from '../types.js';
2
+ import { ScattermapLocationLevel } from '../../../chart-data-options/types.js';
3
+ export declare const useLocations: (locationsNames: string[], locationLevel: ScattermapLocationLevel) => Location[] | null;
@@ -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;
@@ -0,0 +1,4 @@
1
+ export declare function getValuesMinMax(values: number[]): {
2
+ min: number;
3
+ max: number;
4
+ };
@@ -20,7 +20,7 @@ export type TableProps = {
20
20
  */
21
21
  dataOptions: TableDataOptionsInternal;
22
22
  /**
23
- * Configuration that define functional style of the various chart elements
23
+ * Configuration that defines functional style of the various chart elements
24
24
  *
25
25
  */
26
26
  designOptions?: TableDesignOptions;
@@ -12,10 +12,10 @@ import { ColumnChartProps } from './props';
12
12
  * dataSet={DM.DataSource}
13
13
  * dataOptions={{
14
14
  * category: [DM.Commerce.AgeRange],
15
- * value: [measures.sum(DM.Commerce.Revenue)],
15
+ * value: [measureFactory.sum(DM.Commerce.Revenue)],
16
16
  * breakBy: [DM.Commerce.Gender],
17
17
  * }}
18
- * filters={[filters.greaterThan(DM.Commerce.Revenue, 1000)]}
18
+ * filters={[filterFactory.greaterThan(DM.Commerce.Revenue, 1000)]}
19
19
  * onDataPointClick={(point, nativeEvent) => {
20
20
  * console.log('clicked', point, nativeEvent);
21
21
  * }}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const LoadingDots: ({ color }: {
3
+ color: string | undefined;
4
+ }) => JSX.Element;
@@ -5,7 +5,7 @@ import { WidgetDto } from './types';
5
5
  *
6
6
  * @param {DashboardDto} dashboard - The dashboard containing the filters.
7
7
  * @param {WidgetDto} widget - The widget to extract filters from.
8
- * @returns {Object} An object containing an array of filters and an array of highlights.
8
+ * @returns {object} An object containing an array of filters and an array of highlights.
9
9
  */
10
10
  export declare function extractDashboardFiltersForWidget(dashboard: DashboardDto, widget: WidgetDto): {
11
11
  filters: import("@sisense/sdk-data").Filter[];
@@ -1,4 +1,4 @@
1
- import { DataColorOptions } from '../chart-data/series-data-color-service';
1
+ import { DataColorOptions } from '../chart-data/data-coloring';
2
2
  import { ValueToColorMap, MultiColumnValueToColorMap, Color } from '../types';
3
3
  import { PanelColorFormat, PanelItem, PanelMembersFormat } from './types';
4
4
  export declare const createValueColorOptions: (format?: PanelColorFormat, customPaletteColors?: Color[]) => DataColorOptions | undefined;
@@ -1,7 +1,8 @@
1
1
  import { DimensionalBaseMeasure, DimensionalAttribute, DimensionalCalculatedMeasure, Jaql } from '@sisense/sdk-data';
2
2
  import { StyledMeasureColumn, StyledColumn, Color } from '../types';
3
- import { Panel, PanelItem, WidgetType } from './types';
3
+ import { Panel, PanelItem, WidgetType, WidgetStyle, BoxplotWidgetStyle } from './types';
4
4
  import { WidgetDataOptions } from '../models';
5
5
  export declare function createDimensionalElementFromJaql(jaql: Jaql, format?: PanelItem['format']): import("@sisense/sdk-data").Filter | DimensionalCalculatedMeasure | DimensionalBaseMeasure | DimensionalAttribute;
6
- export declare function createDataColumn(item: PanelItem, customPaletteColors?: Color[]): StyledMeasureColumn | StyledColumn;
7
- export declare function extractDataOptions(widgetType: WidgetType, panels: Panel[], customPaletteColors?: Color[]): WidgetDataOptions;
6
+ export declare function createDataColumn(item: PanelItem, customPaletteColors?: Color[]): StyledColumn | StyledMeasureColumn;
7
+ export declare function extractBoxplotBoxType(style: BoxplotWidgetStyle): "iqr" | "extremums" | "standardDeviation";
8
+ export declare function extractDataOptions(widgetType: WidgetType, panels: Panel[], style: WidgetStyle, customPaletteColors?: Color[]): WidgetDataOptions;
@@ -1,5 +1,5 @@
1
- import { StyleOptions, TableStyleOptions, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, GaugeIndicatorStyleOptions } from '../types';
1
+ import { ChartStyleOptions, TableStyleOptions, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, GaugeIndicatorStyleOptions } from '../types';
2
2
  import { Panel, WidgetStyle, WidgetSubtype, WidgetType, TableWidgetStyle, IndicatorWidgetStyle } from './types';
3
3
  export declare function extractTableChartStyleOptions(widgetStyle: TableWidgetStyle): TableStyleOptions;
4
4
  export declare const getIndicatorTypeSpecificOptions: (widgetSubtype: WidgetSubtype, widgetStyle: IndicatorWidgetStyle) => NumericSimpleIndicatorStyleOptions | NumericBarIndicatorStyleOptions | GaugeIndicatorStyleOptions;
5
- export declare function extractStyleOptions<WType extends WidgetType>(widgetType: WType, widgetSubtype: WidgetSubtype, style: WidgetStyle, panels: Panel[]): StyleOptions | TableStyleOptions;
5
+ export declare function extractStyleOptions<WType extends WidgetType>(widgetType: WType, widgetSubtype: WidgetSubtype, style: WidgetStyle, panels: Panel[]): ChartStyleOptions | TableStyleOptions;
@@ -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;
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';
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';
19
19
  export declare enum WidgetDashboardFilterMode {
20
20
  FILTER = "filter",
21
21
  SELECT = "select"
@@ -110,6 +110,7 @@ export type PanelItem = {
110
110
  singleSeriesType?: SeriesType;
111
111
  categoriesSorting?: SortDirection;
112
112
  isColored?: boolean;
113
+ geoLevel?: 'country' | 'state' | 'city';
113
114
  };
114
115
  export type PanelColorFormat = PanelColorFormatSingle | PanelColorFormatRange | PanelColorFormatConditional;
115
116
  export type PanelMembersFormat = Record<string, {
@@ -299,7 +300,29 @@ export type SunburstWidgetStyle = {
299
300
  'tooltip/contribution': boolean;
300
301
  'tooltip/value': boolean;
301
302
  };
302
- export type WidgetStyle = CartesianWidgetStyle | PolarWidgetStyle | FunnelWidgetStyle | ScatterWidgetStyle | TableWidgetStyle | IndicatorWidgetStyle | TreemapWidgetStyle | SunburstWidgetStyle;
303
+ export type BoxplotWidgetStyle = {
304
+ xAxis: AxisStyle;
305
+ yAxis: AxisStyle;
306
+ whisker: {
307
+ 'whisker/iqr': boolean;
308
+ 'whisker/extremums': boolean;
309
+ 'whisker/deviation': boolean;
310
+ };
311
+ outliers: {
312
+ enabled: boolean;
313
+ };
314
+ };
315
+ export type ScattermapWidgetStyle = {
316
+ markers: {
317
+ fill: 'filled' | 'filled-light' | 'hollow' | 'hollow-bold';
318
+ size: {
319
+ defaultSize: number;
320
+ min: number;
321
+ max: number;
322
+ };
323
+ };
324
+ };
325
+ export type WidgetStyle = CartesianWidgetStyle | PolarWidgetStyle | FunnelWidgetStyle | ScatterWidgetStyle | TableWidgetStyle | IndicatorWidgetStyle | TreemapWidgetStyle | SunburstWidgetStyle | BoxplotWidgetStyle | ScattermapWidgetStyle;
303
326
  export declare enum FiltersMergeStrategyEnum {
304
327
  WIDGET_FIRST = "widgetFirst",
305
328
  CODE_FIRST = "codeFirst",
@@ -5,8 +5,7 @@ import { WidgetDto } from './types';
5
5
  * Fetches a Widget DTO model and, optionally, a Dashboard DTO model.
6
6
  *
7
7
  * @internal
8
- *
9
- * @param {Object} options - The options for fetching the DTO models.
8
+ * @param {object} options - The options for fetching the DTO models.
10
9
  * @param {string} options.widgetOid - The OID of the widget to fetch.
11
10
  * @param {string} options.dashboardOid - The OID of the dashboard to which the widget belongs.
12
11
  * @param {boolean} [options.includeDashboard] - (Optional) Whether to include the associated dashboard.
@@ -32,8 +31,7 @@ export declare const fetchWidgetDtoModel: ({ widgetOid, dashboardOid, includeDas
32
31
  * Custom hook for fetching Widget DTO and Dashboard DTO models.
33
32
  *
34
33
  * @internal
35
- *
36
- * @param {Object} options - The options for fetching the DTO models.
34
+ * @param {object} options - The options for fetching the DTO models.
37
35
  * @param {string} options.widgetOid - The OID of the widget to fetch.
38
36
  * @param {string} options.dashboardOid - The OID of the dashboard to which the widget belongs.
39
37
  * @param {boolean} [options.includeDashboard] - (Optional) Whether to include the associated dashboard.
@@ -15,6 +15,7 @@ export type SisenseComponentConfig = {
15
15
  export type ComponentDecorator<DecoratorConfig> = (decoratorConfig: DecoratorConfig) => <ComponentProps extends Record<string, any>>(Component: FunctionComponent<ComponentProps>) => FunctionComponent<ComponentProps>;
16
16
  /**
17
17
  * Decorator that adds sisense-specific functionality to a component
18
+ *
18
19
  * @param componentConfig - component configuration
19
20
  * @returns A component with sisense-specific functionality
20
21
  */
@@ -1,7 +1,7 @@
1
1
  import { type FunctionComponent, type InputHTMLAttributes } from 'react';
2
2
  type BasicInputProps = {
3
3
  variant?: 'white' | 'grey';
4
- label: string;
4
+ label?: string;
5
5
  callback: (value: string) => void;
6
6
  } & InputHTMLAttributes<HTMLInputElement>;
7
7
  export declare const BasicInput: FunctionComponent<BasicInputProps>;
@@ -1,8 +1,9 @@
1
1
  import { CompleteThemeSettings } from '../../../types';
2
2
  import { type FunctionComponent, type ButtonHTMLAttributes } from 'react';
3
+ type Variant = 'white' | 'grey';
3
4
  type InputProps = {
4
- variant?: 'white' | 'grey';
5
- label: string;
5
+ variant?: Variant;
6
+ label?: string;
6
7
  isActive?: boolean;
7
8
  } & ButtonHTMLAttributes<HTMLButtonElement>;
8
9
  type ThemeMixin = {
@@ -4,5 +4,6 @@ export type DropdownProps = {
4
4
  elements: JSX.Element[];
5
5
  icon?: JSX.Element;
6
6
  selectedIdx?: number;
7
+ disabled?: boolean;
7
8
  } & React.ComponentProps<typeof MenuList>;
8
9
  export declare const Dropdown: FunctionComponent<DropdownProps>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Orientation options for the filter tile. The filter tile can
3
+ * be arranged vertically, or horizontally to fit most toolbars.
4
+ */
5
+ export type FilterVariant = 'vertical' | 'horizontal';
6
+ /**
7
+ * Determines whether the arrangement of the filter menu is vertical.
8
+ *
9
+ * @param arrangement - Arrangement of the filter menu
10
+ * @returns True if the arrangement is vertical, false otherwise
11
+ * @internal
12
+ */
13
+ export declare const isVertical: (arrangement: FilterVariant) => boolean;
@@ -7,3 +7,4 @@ export { SisenseSwitchButton } from './switch';
7
7
  export { TriangleIndicator } from './triangle-indicator';
8
8
  export { DateRangeFieldButton } from './date-range-field-button';
9
9
  export { Dropdown } from './dropdown';
10
+ export { type FilterVariant } from './filter-utils';
@@ -1,6 +1,7 @@
1
1
  import { FunctionComponent } from 'react';
2
- import { FilterOptionType, FilterVariant, CriteriaFilterValueType } from './criteria-filter-operations';
2
+ import { FilterOptionType, CriteriaFilterValueType } from './criteria-filter-operations';
3
3
  import { Measure } from '@sisense/sdk-data';
4
+ import { FilterVariant } from '../common/filter-utils';
4
5
  /**
5
6
  * Props for {@link CriteriaFilterMenu}
6
7
  *
@@ -28,7 +28,6 @@ export declare const FilterOption: {
28
28
  LIKE: string;
29
29
  };
30
30
  export type FilterOptionType = keyof typeof FilterOption;
31
- export type FilterVariant = 'vertical' | 'horizontal';
32
31
  /**
33
32
  * Object containing related information for a filter option,
34
33
  * including the function to be used for filtering, the number of inputs,
@@ -54,14 +53,6 @@ export type FilterInfo = {
54
53
  export declare const CRITERIA_FILTER_MAP: {
55
54
  [key: string]: FilterInfo;
56
55
  };
57
- /**
58
- * Determines whether the arrangement of the filter menu is vertical.
59
- *
60
- * @param arrangement - Arrangement of the filter menu
61
- * @returns True if the arrangement is vertical, false otherwise
62
- * @internal
63
- */
64
- export declare const isVertical: (arrangement: FilterVariant) => boolean;
65
56
  /**
66
57
  * Given an input filter, use the filterType and operators to determine
67
58
  * the corresponding {@link FilterOption} and {@link FilterInfo}.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { FilterVariant } from './criteria-filter-operations.js';
3
2
  import { ExcludeFilter, Filter, Measure, NumericFilter, RankingFilter, TextFilter } from '@sisense/sdk-data';
3
+ import { FilterVariant } from '../common/filter-utils.js';
4
4
  /**
5
5
  * Props for {@link CriteriaFilterTile}
6
6
  */
@@ -25,7 +25,7 @@ export type CriteriaFilterType = NumericFilter | TextFilter | RankingFilter | Ex
25
25
  *
26
26
  * @example
27
27
  * ```tsx
28
- * const initialRevenueFilter = filters.greaterThanOrEqual(DM.Commerce.Revenue, 10000);
28
+ * const initialRevenueFilter = filterFactory.greaterThanOrEqual(DM.Commerce.Revenue, 10000);
29
29
  * const [revenueFilter, setRevenueFilter] = useState<Filter | null>(initialRevenueFilter);
30
30
  *
31
31
  * return (
@@ -1,2 +1 @@
1
1
  export { CriteriaFilterTile, type CriteriaFilterTileProps, type CriteriaFilterType, } from './criteria-filter-tile';
2
- export { type FilterVariant } from './criteria-filter-operations';