@sisense/sdk-ui 1.3.0 → 1.4.1

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 (86) hide show
  1. package/dist/ai/ai-context-provider.d.ts +32 -0
  2. package/dist/ai/api/chat-api-provider.d.ts +17 -0
  3. package/dist/ai/api/chat-rest-api.d.ts +3 -1
  4. package/dist/ai/api/errors.d.ts +1 -0
  5. package/dist/ai/api/hooks.d.ts +10 -49
  6. package/dist/ai/api/types.d.ts +16 -27
  7. package/dist/ai/buttons/thumbs-down-button.d.ts +6 -0
  8. package/dist/ai/buttons/thumbs-up-button.d.ts +6 -0
  9. package/dist/ai/chat-box.d.ts +3 -3
  10. package/dist/ai/chat-config.d.ts +28 -0
  11. package/dist/ai/chat-home.d.ts +5 -1
  12. package/dist/ai/chat-router.d.ts +2 -0
  13. package/dist/ai/chatbot.d.ts +26 -4
  14. package/dist/ai/common/tooltip.d.ts +5 -0
  15. package/dist/ai/error-page.d.ts +10 -0
  16. package/dist/ai/get-nlg-query-result.d.ts +70 -0
  17. package/dist/ai/icons/thumbs-down-hovered-icon.d.ts +2 -0
  18. package/dist/ai/icons/thumbs-down-icon.d.ts +2 -0
  19. package/dist/ai/icons/thumbs-up-hovered-icon.d.ts +2 -0
  20. package/dist/ai/icons/thumbs-up-icon.d.ts +2 -0
  21. package/dist/ai/index.d.ts +6 -3
  22. package/dist/ai/loading-page.d.ts +2 -0
  23. package/dist/ai/messages/clear-history-success-message.d.ts +2 -0
  24. package/dist/ai/messages/feedback-wrapper.d.ts +9 -0
  25. package/dist/ai/messages/get-widget-options.d.ts +2 -1
  26. package/dist/ai/messages/message-resolver.d.ts +1 -2
  27. package/dist/ai/messages/text-message.d.ts +1 -1
  28. package/dist/ai/toolbar.d.ts +2 -2
  29. package/dist/ai/use-chat-session.d.ts +1 -1
  30. package/dist/ai/use-get-nlg-query-result.d.ts +95 -0
  31. package/dist/ai/use-get-query-recommendations.d.ts +67 -0
  32. package/dist/ai.js +1866 -1518
  33. package/dist/{chart.d.ts → chart/chart.d.ts} +1 -1
  34. package/dist/chart/helpers/use-synced-data.d.ts +8 -0
  35. package/dist/chart/helpers/use-translated-data-options.d.ts +7 -0
  36. package/dist/chart/index.d.ts +1 -0
  37. package/dist/chart-data/types.d.ts +1 -0
  38. package/dist/chart-data-options/translate-data-options.d.ts +5 -1
  39. package/dist/chart-data-options/types.d.ts +107 -12
  40. package/dist/chart-options-processor/boxplot-chart-options.d.ts +2 -2
  41. package/dist/chart-options-processor/category-chart-options.d.ts +1 -1
  42. package/dist/chart-options-processor/chart-options-service.d.ts +7 -0
  43. package/dist/chart-options-processor/plot-bands.d.ts +2 -2
  44. package/dist/chart-options-processor/scatter-chart-options.d.ts +2 -2
  45. package/dist/chart-options-processor/style-to-design-options-translator/index.d.ts +1 -0
  46. package/dist/chart-options-processor/style-to-design-options-translator/prepare-design-options.d.ts +4 -0
  47. package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +2 -2
  48. package/dist/chart-options-processor/translations/base-design-options.d.ts +3 -3
  49. package/dist/chart-options-processor/translations/boxplot/boxplot-plot-options.d.ts +2 -2
  50. package/dist/chart-options-processor/translations/design-options.d.ts +2 -2
  51. package/dist/chart-options-processor/translations/number-format-config.d.ts +10 -16
  52. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +4 -4
  53. package/dist/chart-options-processor/translations/types.d.ts +18 -6
  54. package/dist/chart-options-processor/translations/value-label-section.d.ts +9 -4
  55. package/dist/charts/indicator/indicator-legacy-chart-options/prepare-ticker-options.d.ts +2 -0
  56. package/dist/charts/map-charts/areamap/areamap.d.ts +2 -2
  57. package/dist/charts/map-charts/scattermap/scattermap.d.ts +9 -3
  58. package/dist/charts/map-charts/scattermap/utils/location.d.ts +3 -0
  59. package/dist/charts/table/helpers/calc-column-widths.d.ts +3 -1
  60. package/dist/common/hooks/data-load-state-reducer.d.ts +10 -0
  61. package/dist/common/hooks/use-hover.d.ts +8 -0
  62. package/dist/common/icons/yellow-exclamation-mark-icon.d.ts +2 -0
  63. package/dist/dashboard-widget/translate-widget-data-options.d.ts +1 -1
  64. package/dist/decorators/hook-decorators/with-tracking.d.ts +11 -0
  65. package/dist/formulas/fetch-formula.d.ts +2 -0
  66. package/dist/formulas/index.d.ts +1 -0
  67. package/dist/formulas/use-get-shared-formula.d.ts +5 -0
  68. package/dist/index.d.ts +4 -4
  69. package/dist/index.js +34073 -10282
  70. package/dist/indicator-canvas.d.ts +2 -2
  71. package/dist/models/dashboard/use-get-dashboard-model.d.ts +8 -0
  72. package/dist/models/dashboard/use-get-dashboard-models.d.ts +6 -0
  73. package/dist/pivot-table/index.d.ts +1 -0
  74. package/dist/pivot-table/pivot-table.d.ts +42 -0
  75. package/dist/pivot-table/use-get-pivot-table-query.d.ts +14 -0
  76. package/dist/props.d.ts +62 -4
  77. package/dist/sisense-chart/sisense-chart.d.ts +2 -2
  78. package/dist/types.d.ts +74 -9
  79. package/dist/utils/utility-types.d.ts +12 -0
  80. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
  81. package/dist/widgets/common/drilldown.d.ts +1 -1
  82. package/dist/{table-widget-b467cc86.js → with-tracking-d12a4632.js} +38409 -38268
  83. package/package.json +13 -13
  84. package/dist/ai/api/chat-api-context.d.ts +0 -12
  85. package/dist/ai/chatbot-context.d.ts +0 -11
  86. package/dist/ai/nlg-query-result.d.ts +0 -20
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ChartProps } from './props';
2
+ import { ChartProps } from '../props';
3
3
  /** Function to check if we should wait for sisense context for rendering the chart */
4
4
  export declare const shouldSkipSisenseContextWaiting: (props: ChartProps) => boolean;
5
5
  /**
@@ -0,0 +1,8 @@
1
+ import { Attribute, Data, DataSource, Filter, FilterRelations, Measure } from '@sisense/sdk-data';
2
+ import { Dispatch, SetStateAction } from 'react';
3
+ import { ChartDataOptionsInternal } from '../../chart-data-options/types';
4
+ import { ChartType } from '../../types';
5
+ import { DataColumnNamesMapping } from '../../chart-data-options/validate-data-options';
6
+ type DataSet = DataSource | Data | undefined;
7
+ export declare const useSyncedData: (dataSet: DataSet, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType, attributes: Attribute[], measures: Measure[], dataColumnNamesMapping: DataColumnNamesMapping, filters?: Filter[] | FilterRelations, highlights?: Filter[], refreshCounter?: number, setIsLoading?: Dispatch<SetStateAction<boolean>>) => Data | undefined;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ChartDataOptions, ChartType } from '../../types';
2
+ export declare const useTranslatedDataOptions: (dataOptions: ChartDataOptions, chartType: ChartType) => {
3
+ chartDataOptions: import("../..").ChartDataOptionsInternal;
4
+ attributes: import("@sisense/sdk-data").Attribute[];
5
+ measures: import("@sisense/sdk-data").Measure[];
6
+ dataColumnNamesMapping: import('../../chart-data-options/validate-data-options').DataColumnNamesMapping;
7
+ };
@@ -0,0 +1 @@
1
+ export * from './chart';
@@ -87,6 +87,7 @@ export type ScatterChartData = {
87
87
  };
88
88
  export type ScattermapChartLocation = {
89
89
  name: string;
90
+ rawName: string[];
90
91
  value: number;
91
92
  colorValue?: number;
92
93
  details?: number | string[];
@@ -1,7 +1,11 @@
1
1
  import { Attribute, Measure } from '@sisense/sdk-data';
2
2
  import { ChartType } from '../types';
3
- import { ChartDataOptions, ChartDataOptionsInternal, TableDataOptionsInternal, TableDataOptions } from './types';
3
+ import { ChartDataOptions, ChartDataOptionsInternal, TableDataOptionsInternal, TableDataOptions, PivotTableDataOptions, PivotTableDataOptionsInternal } from './types';
4
4
  export declare function translateChartDataOptions(chartType: ChartType, dataOptions: ChartDataOptions): ChartDataOptionsInternal;
5
5
  export declare function getAttributes(dataOptions: ChartDataOptionsInternal, chartType: ChartType): Attribute[];
6
6
  export declare function getMeasures(dataOptions: ChartDataOptionsInternal, chartType: ChartType): Measure[];
7
7
  export declare function translateTableDataOptions(dataOptions: TableDataOptions): TableDataOptionsInternal;
8
+ /**
9
+ * Translates pivot table data options to the internal structure.
10
+ */
11
+ export declare function translatePivotTableDataOptions(dataOptions: PivotTableDataOptions): PivotTableDataOptionsInternal;
@@ -1,6 +1,6 @@
1
1
  import type { DataColorOptions } from '../chart-data/data-coloring';
2
- import type { NumberFormatConfig, SeriesChartType, SortDirection, ValueToColorMap, MultiColumnValueToColorMap } from '../types';
3
- import { Column, MeasureColumn, CalculatedMeasureColumn } from '@sisense/sdk-data';
2
+ import type { NumberFormatConfig, SeriesChartType, SortDirection, ValueToColorMap, MultiColumnValueToColorMap, LineWidth, Markers } from '../types';
3
+ import { Column, MeasureColumn, CalculatedMeasureColumn, PivotGrandTotals, TotalsCalculation } from '@sisense/sdk-data';
4
4
  /**
5
5
  * Styles for a category/column when visualized in a chart
6
6
  *
@@ -36,6 +36,18 @@ export interface CategoryStyle {
36
36
  /** {@inheritDoc SortDirection} */
37
37
  sortType?: SortDirection;
38
38
  isColored?: boolean;
39
+ /**
40
+ * Boolean flag whether to render category/column value as HTML in the Table component.
41
+ */
42
+ isHtml?: boolean;
43
+ /**
44
+ * Boolean flag whether to include subtotals for this dimension in the pivot table.
45
+ */
46
+ includeSubTotals?: boolean;
47
+ /**
48
+ * Geographic location level for Scattermap chart.
49
+ */
50
+ geoLevel?: ScattermapLocationLevel;
39
51
  }
40
52
  /**
41
53
  * Wrapped {@link @sisense/sdk-data!Column | Column} with styles controlling how the column is visualized in a chart.
@@ -105,6 +117,36 @@ export type ValueStyle = {
105
117
  treatNullDataAsZeros?: boolean;
106
118
  /** Boolean flag whether to connect a graph line across null points or render a gap */
107
119
  connectNulls?: boolean;
120
+ /**
121
+ * Calculation for the totals of this measure in the pivot table.
122
+ */
123
+ totalsCalculation?: TotalsCalculation;
124
+ /**
125
+ * Boolean flag whether to display data bars for this measure in the pivot table.
126
+ */
127
+ dataBars?: boolean;
128
+ };
129
+ /**
130
+ * Specific style options to be applied to specific series in Chart.
131
+ *
132
+ * @internal
133
+ */
134
+ export type SeriesStyle = {
135
+ /**
136
+ * Specific style options to be applied to specific series in Chart.
137
+ * Supported only for cartesian and polar charts.
138
+ */
139
+ seriesStyleOptions?: SeriesStyleOptions;
140
+ };
141
+ /**
142
+ * Specific style options to be applied to specific series in Chart.
143
+ * Supported only for cartesian and polar charts.
144
+ */
145
+ export type SeriesStyleOptions = {
146
+ /** @inheritdoc LineStyleOptions.lineWidth */
147
+ lineWidth?: LineWidth;
148
+ /** @inheritdoc LineStyleOptions.markers */
149
+ markers?: Markers;
108
150
  };
109
151
  /**
110
152
  * Wrapped {@link @sisense/sdk-data!MeasureColumn | Measure Column} with styles
@@ -144,7 +186,7 @@ export type ValueStyle = {
144
186
  *
145
187
  * See also {@link StyledColumn}.
146
188
  */
147
- export interface StyledMeasureColumn extends ValueStyle {
189
+ export interface StyledMeasureColumn extends ValueStyle, SeriesStyle {
148
190
  /** Wrapped MeasureColumn or CalculatedMeasureColumn */
149
191
  column: MeasureColumn | CalculatedMeasureColumn;
150
192
  }
@@ -305,7 +347,37 @@ export interface TableDataOptions {
305
347
  columns: (Column | StyledColumn | MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn)[];
306
348
  }
307
349
  /**
308
- * Geographic location level for a Scattermap column.
350
+ * Configuration for how to query data and assign data to {@link PivotTable}.
351
+ *
352
+ */
353
+ export interface PivotTableDataOptions {
354
+ /**
355
+ * Dimensions for the rows of the pivot table
356
+ *
357
+ * @category Data Options
358
+ */
359
+ rows?: (Column | StyledColumn)[];
360
+ /**
361
+ * Dimensions for the columns of the pivot table
362
+ *
363
+ * @category Data Options
364
+ */
365
+ columns?: (Column | StyledColumn)[];
366
+ /**
367
+ * Measures for the values of the pivot table
368
+ *
369
+ * @category Data Options
370
+ */
371
+ values?: (MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn)[];
372
+ /**
373
+ * Options for grand totals
374
+ *
375
+ * @category Data Options
376
+ */
377
+ grandTotals?: PivotGrandTotals;
378
+ }
379
+ /**
380
+ * Geographic location level for Scattermap chart.
309
381
  * This type can have one of the following values:
310
382
  * - 'auto': Automatically determines the appropriate location level.
311
383
  * - 'country': Represents the country level in the geographical hierarchy.
@@ -313,12 +385,6 @@ export interface TableDataOptions {
313
385
  * - 'city': Represents the city level in the geographical hierarchy.
314
386
  */
315
387
  export type ScattermapLocationLevel = 'auto' | 'country' | 'state' | 'city';
316
- /**
317
- * Scattermap column that allows to specify the geographic location level.
318
- */
319
- export interface ScattermapColumn extends StyledColumn {
320
- level: ScattermapLocationLevel;
321
- }
322
388
  /**
323
389
  * Configuration for how to query aggregate data and assign data
324
390
  * to axes of a Scattermap chart.
@@ -329,7 +395,7 @@ export interface ScattermapChartDataOptions {
329
395
  * Support field(s) that contain geographic data (Country, City, State/Province, etc)
330
396
  * To visualize latitude and longitude data, you have to add one field containing latitude data, and another field containing longitude data, in this order.
331
397
  */
332
- geo: (Column | StyledColumn | ScattermapColumn)[];
398
+ geo: (Column | StyledColumn)[];
333
399
  /**
334
400
  * Measure column (or measure) representing the size of the points on the map.
335
401
  */
@@ -420,7 +486,7 @@ export declare const isValue: (arg: Category | Value) => arg is Value;
420
486
  /** @internal */
421
487
  export declare const isCategory: (arg: Category | Value) => arg is Category;
422
488
  /** @internal */
423
- export interface Value extends ValueStyle {
489
+ export interface Value extends ValueStyle, SeriesStyle {
424
490
  name: string;
425
491
  aggregation?: string;
426
492
  title: string;
@@ -459,6 +525,35 @@ export interface ScattermapChartDataOptionsInternal {
459
525
  export type TableDataOptionsInternal = {
460
526
  columns: (Category | Value)[];
461
527
  };
528
+ /**
529
+ * @internal
530
+ */
531
+ export interface PivotTableDataOptionsInternal {
532
+ /**
533
+ * Dimensions for the rows of the pivot table
534
+ *
535
+ * @category Data Options
536
+ */
537
+ rows?: Category[];
538
+ /**
539
+ * Dimensions for the columns of the pivot table
540
+ *
541
+ * @category Data Options
542
+ */
543
+ columns?: Category[];
544
+ /**
545
+ * Measures for the values of the pivot table
546
+ *
547
+ * @category Data Options
548
+ */
549
+ values?: Value[];
550
+ /**
551
+ * Options for grand totals
552
+ *
553
+ * @category Data Options
554
+ */
555
+ grandTotals?: PivotGrandTotals;
556
+ }
462
557
  /** @internal */
463
558
  export type ChartDataOptionsInternal = CartesianChartDataOptionsInternal | CategoricalChartDataOptionsInternal | ScatterChartDataOptionsInternal | IndicatorChartDataOptionsInternal | BoxplotChartDataOptionsInternal | AreamapChartDataOptionsInternal | ScattermapChartDataOptionsInternal;
464
559
  /** @internal */
@@ -3,9 +3,9 @@ import { BoxplotChartData } from '../chart-data/types';
3
3
  import { BoxplotChartDataOptionsInternal } from '../chart-data-options/types';
4
4
  import { HighchartsOptionsInternal } from './chart-options-service';
5
5
  import { OptionsWithAlerts } from '../types';
6
- import { BoxplotChartDesignOptions } from './translations/design-options';
6
+ import { ChartDesignOptions } from './translations/types';
7
7
  /**
8
8
  * Convert intermediate chart data, data options, and design options
9
9
  * into pure highcharts config data.
10
10
  */
11
- export declare const getBoxplotChartOptions: (chartData: BoxplotChartData, chartDesignOptions: BoxplotChartDesignOptions, dataOptions: BoxplotChartDataOptionsInternal, translate: TFunction) => OptionsWithAlerts<HighchartsOptionsInternal>;
11
+ export declare const getBoxplotChartOptions: (chartData: BoxplotChartData, chartDesignOptions: ChartDesignOptions, dataOptions: BoxplotChartDataOptionsInternal, translate: TFunction) => OptionsWithAlerts<HighchartsOptionsInternal>;
@@ -9,7 +9,7 @@ import { ChartDataOptionsInternal } from '../chart-data-options/types';
9
9
  *
10
10
  * @param chartData - the data for the chart in an intermediate format
11
11
  * @param chartType -
12
- * @param chartDesignOptions -
12
+ * @param globalDesignOptions -
13
13
  * @param dataOptions -
14
14
  * @param themeSettings -
15
15
  */
@@ -63,9 +63,16 @@ type ChartPlotOptions = {
63
63
  shadow?: boolean;
64
64
  marker?: MarkerSettings;
65
65
  borderWidth?: number;
66
+ className?: string;
66
67
  events?: {
67
68
  legendItemClick?: SeriesLegendItemClickCallbackFunction;
68
69
  };
70
+ states?: {
71
+ inactive?: {
72
+ enabled?: boolean;
73
+ opacity?: number;
74
+ };
75
+ };
69
76
  };
70
77
  export type Stacking = 'normal' | 'percent';
71
78
  export type PlotOptions = {
@@ -1,7 +1,7 @@
1
1
  import { CartesianChartDataOptionsInternal, ChartDataOptionsInternal } from '../chart-data-options/types';
2
2
  import { ChartData } from '../chart-data/types';
3
3
  import { PlotBand } from './translations/axis-section';
4
- import { ChartDesignOptions } from './translations/types';
4
+ import { DesignOptions } from './translations/types';
5
5
  type CategoryIndexMapPlotBands = {
6
6
  categories: string[];
7
7
  indexMap: number[];
@@ -19,5 +19,5 @@ export declare const applyNumberFormatToPlotBands: (chartDataOptions: ChartDataO
19
19
  * @param designOptions -
20
20
  * @param continuousDatetimeXAxis -
21
21
  */
22
- export declare const getCategoriesIndexMapAndPlotBands: (data: ChartData, dataOptions: CartesianChartDataOptionsInternal, designOptions: ChartDesignOptions, continuousDatetimeXAxis: boolean) => CategoryIndexMapPlotBands;
22
+ export declare const getCategoriesIndexMapAndPlotBands: (data: ChartData, dataOptions: CartesianChartDataOptionsInternal, designOptions: DesignOptions, continuousDatetimeXAxis: boolean) => CategoryIndexMapPlotBands;
23
23
  export {};
@@ -15,8 +15,8 @@ export declare const getScatterLegendSettings: (position: LegendPosition) => Leg
15
15
  *
16
16
  * @param chartData - the data for the chart in an intermediate format
17
17
  * @param chartType -
18
- * @param chartDesignOptions -
18
+ * @param globalDesignOptions -
19
19
  * @param dataOptions -
20
20
  * @param themeSettings -
21
21
  */
22
- export declare const getScatterChartOptions: (chartData: ScatterChartData, chartType: ChartType, chartDesignOptions: ChartDesignOptions, dataOptions: ChartDataOptionsInternal, themeSettings?: CompleteThemeSettings) => OptionsWithAlerts<HighchartsOptionsInternal>;
22
+ export declare const getScatterChartOptions: (chartData: ScatterChartData, chartType: ChartType, designOptions: ChartDesignOptions, dataOptions: ChartDataOptionsInternal, themeSettings?: CompleteThemeSettings) => OptionsWithAlerts<HighchartsOptionsInternal>;
@@ -0,0 +1 @@
1
+ export { prepareChartDesignOptions } from './prepare-design-options';
@@ -0,0 +1,4 @@
1
+ import { ChartDataOptionsInternal } from '../../chart-data-options/types';
2
+ import { ChartStyleOptions, ChartType } from '../../types';
3
+ import { ChartDesignOptions } from '../translations/types';
4
+ export declare function prepareChartDesignOptions(chartType: ChartType, dataOptionsInternal: ChartDataOptionsInternal, styleOptions?: ChartStyleOptions): ChartDesignOptions;
@@ -1,4 +1,4 @@
1
1
  import { ChartType, ChartStyleOptions } from '../../types';
2
- import { ChartDesignOptions } from '../translations/types';
2
+ import { DesignOptions } from '../translations/types';
3
3
  import { ChartDataOptionsInternal } from '../../chart-data-options/types';
4
- export declare const translateStyleOptionsToDesignOptions: (chartType: ChartType, styleOptions: ChartStyleOptions, dataOptions: ChartDataOptionsInternal) => ChartDesignOptions;
4
+ export declare const translateStyleOptionsToDesignOptions: (chartType: ChartType, styleOptions: ChartStyleOptions, dataOptions: ChartDataOptionsInternal) => DesignOptions;
@@ -1,7 +1,7 @@
1
- import { ChartDesignOptions } from './types';
1
+ import { DesignOptions } from './types';
2
2
  import { Merge } from '../../utils/utility-types';
3
3
  export declare const SERIES_CAPACITY = 50;
4
4
  export declare const SCATTER_CATEGORIES_CAPACITY = 500;
5
5
  export declare const CATEGORIES_CAPACITY = 100000;
6
- export declare const BaseDesignOptions: Merge<ChartDesignOptions>;
7
- export declare const BaseDesignOptionsMultipleAxis: ChartDesignOptions;
6
+ export declare const BaseDesignOptions: Merge<DesignOptions>;
7
+ export declare const BaseDesignOptionsMultipleAxis: DesignOptions;
@@ -1,3 +1,3 @@
1
1
  import { PlotOptions } from '../../chart-options-service.js';
2
- import { ValueLabel } from '../value-label-section.js';
3
- export declare const getBoxplotPlotOptions: (valueLabel: ValueLabel) => PlotOptions;
2
+ import { ValueLabelOptions } from '../value-label-section.js';
3
+ export declare const getBoxplotPlotOptions: (valueLabel: ValueLabelOptions) => PlotOptions;
@@ -1,4 +1,4 @@
1
- import { ValueLabel } from './value-label-section';
1
+ import { ValueLabelOptions } from './value-label-section';
2
2
  import { Axis } from './axis-section';
3
3
  import { Marker } from './marker-section';
4
4
  import { LegendPosition } from './legend-section';
@@ -13,7 +13,7 @@ type DataLimits = {
13
13
  };
14
14
  export type BaseDesignOptionsType = {
15
15
  legend: LegendPosition;
16
- valueLabel: ValueLabel;
16
+ valueLabel: ValueLabelOptions;
17
17
  lineType: LineType;
18
18
  lineWidth: number;
19
19
  marker: Marker;
@@ -1,16 +1,10 @@
1
- export type DecimalScale = number | 'auto';
2
- export type NumberFormatConfig = {
3
- name: 'Numbers' | 'Currency' | 'Percent';
4
- decimalScale: DecimalScale;
5
- trillion: boolean;
6
- billion: boolean;
7
- million: boolean;
8
- kilo: boolean;
9
- thousandSeparator: boolean;
10
- prefix: boolean;
11
- symbol: string;
12
- };
13
- export declare const defaultConfig: NumberFormatConfig;
14
- export declare const applyFormatStaticMarkup: (config: NumberFormatConfig, value: number) => string;
15
- export declare const applyFormat: (config: NumberFormatConfig, value: number) => string;
16
- export declare const applyFormatPlainText: (config: NumberFormatConfig, value: number) => string;
1
+ import { CompleteNumberFormatConfig, NumberFormatConfig } from '../../types';
2
+ /**
3
+ * Returns a complete NumberFormatConfig object with default values for missing properties.
4
+ *
5
+ * @param partialConfig - A partial NumberFormatConfig object with props to rewrite default ones.
6
+ */
7
+ export declare const getCompleteNumberFormatConfig: (partialConfig?: NumberFormatConfig) => CompleteNumberFormatConfig;
8
+ export declare const applyFormatStaticMarkup: (config: CompleteNumberFormatConfig, value: number) => string;
9
+ export declare const applyFormat: (config: CompleteNumberFormatConfig, value: number) => string;
10
+ export declare const applyFormatPlainText: (config: CompleteNumberFormatConfig, value: number) => string;
@@ -4,7 +4,7 @@ import { CategoricalSeriesValues, ChartData, CartesianChartData } from '../../ch
4
4
  import { StackableChartDesignOptions } from './design-options';
5
5
  import { AxisMinMax, AxisSettings } from './axis-section';
6
6
  import { Stacking } from '../chart-options-service';
7
- import { ChartDesignOptions } from './types';
7
+ import { DesignOptions } from './types';
8
8
  export type LineType = 'straight' | 'smooth';
9
9
  export type StackType = 'classic' | 'stacked' | 'stack100';
10
10
  export type HighchartsType = ChartType | 'spline' | 'areaspline' | 'bubble';
@@ -48,10 +48,10 @@ export type AxisClipped = {
48
48
  * Translate public-facing chart type and chart design options to internal highcharts chart type
49
49
  *
50
50
  * @param chartType - public-facing chart type
51
- * @param chartDesignOptions - public-facing chart design options
51
+ * @param designOptions - public-facing chart design options
52
52
  * @returns internal highcharts chart type
53
53
  */
54
- export declare const determineHighchartsChartType: (chartType: ChartType, chartDesignOptions: ChartDesignOptions) => HighchartsType;
54
+ export declare const determineHighchartsChartType: (chartType: ChartType, designOptions: DesignOptions) => HighchartsType;
55
55
  export declare const addStackingIfSpecified: (chartType: ChartType, designOptions: StackableChartDesignOptions) => {
56
56
  stacking?: Stacking | undefined;
57
57
  showTotal: boolean;
@@ -76,7 +76,7 @@ export declare const adjustMinWhenColumnBar: (chartType: ChartType, autoMinMax:
76
76
  min: number;
77
77
  max: number;
78
78
  };
79
- export declare const autoCalculateYAxisMinMax: (chartType: ChartType, chartData: CartesianChartData, chartDesignOptions: ChartDesignOptions, yAxisSide: number[], yTreatNullDataAsZeros: boolean[], side: number) => {
79
+ export declare const autoCalculateYAxisMinMax: (chartType: ChartType, chartData: CartesianChartData, designOptions: DesignOptions, yAxisSide: number[], yTreatNullDataAsZeros: boolean[], side: number) => {
80
80
  min: number;
81
81
  max: number;
82
82
  };
@@ -1,4 +1,3 @@
1
- import { ChartDataOptionsInternal } from '../../chart-data-options/types';
2
1
  import { ChartType } from '../../types';
3
2
  import { LineChartDesignOptions, AreaChartDesignOptions, BarChartDesignOptions, ColumnChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, IndicatorChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, TreemapChartDesignOptions, BoxplotChartDesignOptions, AreamapChartDesignOptions, ScattermapChartDesignOptions } from './design-options';
4
3
  export declare const POLAR_CHART_TYPES: readonly ["polar"];
@@ -30,12 +29,25 @@ export declare const SCATTERMAP_CHART_TYPES: readonly ["scattermap"];
30
29
  /** Scattermap chart types @expandType */
31
30
  export type ScattermapChartType = (typeof SCATTERMAP_CHART_TYPES)[number];
32
31
  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;
34
- export type ChartConfig = {
35
- chartType: ChartType;
36
- dataOptions: ChartDataOptionsInternal;
37
- designOptions: ChartDesignOptions;
32
+ /**
33
+ * Design options for a specific chart type
34
+ */
35
+ export type DesignOptions<SpecificChartType extends ChartType = ChartType> = SpecificChartType extends 'line' ? LineChartDesignOptions : SpecificChartType extends 'area' ? AreaChartDesignOptions : SpecificChartType extends 'bar' ? BarChartDesignOptions : SpecificChartType extends 'column' ? ColumnChartDesignOptions : SpecificChartType extends 'pie' ? PieChartDesignOptions : SpecificChartType extends 'funnel' ? FunnelChartDesignOptions : SpecificChartType extends 'polar' ? PolarChartDesignOptions : SpecificChartType extends 'indicator' ? IndicatorChartDesignOptions : SpecificChartType extends 'scatter' ? ScatterChartDesignOptions : SpecificChartType extends 'treemap' ? TreemapChartDesignOptions : SpecificChartType extends 'boxplot' ? BoxplotChartDesignOptions : SpecificChartType extends 'areamap' ? AreamapChartDesignOptions : SpecificChartType extends 'scattermap' ? ScattermapChartDesignOptions : never;
36
+ /** A unique identifier for a series to be found in {@link ChartDataOptionsInternal} */
37
+ type SeriesId = string;
38
+ /**
39
+ * Design options for a chart.
40
+ * This includes global design options and specific design options per series.
41
+ */
42
+ export type ChartDesignOptions<SpecificChartType extends ChartType = ChartType> = {
43
+ globalDesign: DesignOptions<SpecificChartType>;
44
+ designPerSeries: Record<SeriesId, SeriesDesignOptions>;
38
45
  };
46
+ /**
47
+ * Design options, limited to the only series relevant options.
48
+ * @internal
49
+ */
50
+ export type SeriesDesignOptions = Pick<DesignOptions, 'lineWidth' | 'marker'>;
39
51
  export declare const isCartesian: (chartType: ChartType) => chartType is "area" | "line" | "bar" | "column" | "polar";
40
52
  export declare const isCategorical: (chartType: ChartType) => chartType is "pie" | "funnel" | "treemap" | "sunburst";
41
53
  export declare const isScatter: (chartType: ChartType) => chartType is "scatter";
@@ -1,10 +1,14 @@
1
1
  import type { DataLabelsOptions } from '@sisense/sisense-charts';
2
2
  import { Style } from '../chart-options-service';
3
- import { NumberFormatConfig } from './number-format-config';
4
3
  import { AxisOrientation } from './axis-section';
5
4
  import { InternalSeries } from './tooltip-utils';
6
5
  import { PolarType } from './design-options';
7
- export type ValueLabel = 'horizontal' | 'diagonal' | 'vertical' | null;
6
+ import { NumberFormatConfig } from '../../types';
7
+ export type ValueLabelOptions = {
8
+ enabled?: boolean;
9
+ rotation?: number;
10
+ };
11
+ export type RotationType = 'horizontal' | 'diagonal' | 'vertical';
8
12
  export type ValueLabelSettings = {
9
13
  enabled?: boolean;
10
14
  align?: string;
@@ -25,5 +29,6 @@ export type ValueLabelSettings = {
25
29
  formatter?: (this: InternalSeries, options?: DataLabelsOptions, valuePropName?: string) => string;
26
30
  };
27
31
  export declare const createValueLabelFormatter: (numberFormatConfig?: NumberFormatConfig) => (this: InternalSeries) => string;
28
- export declare const getValueLabelSettings: (xAxisOrientation: AxisOrientation, valueLabel: ValueLabel, inside?: boolean) => ValueLabelSettings;
29
- export declare const getPolarValueLabelSettings: (valueLabel: ValueLabel, polarType: PolarType) => ValueLabelSettings;
32
+ export declare const getRotationType: (rotation: number) => RotationType;
33
+ export declare const getValueLabelSettings: (xAxisOrientation: AxisOrientation, valueLabel: ValueLabelOptions, inside?: boolean) => ValueLabelSettings;
34
+ export declare const getPolarValueLabelSettings: (valueLabel: ValueLabelOptions, polarType: PolarType) => ValueLabelSettings;
@@ -0,0 +1,2 @@
1
+ import { LegacyIndicatorChartOptions } from '../../../charts/indicator/types';
2
+ export declare function prepareTickerOptions(container: HTMLElement, options: LegacyIndicatorChartOptions): import('../../../charts/indicator/types').TickerOptions;
@@ -2,7 +2,7 @@
2
2
  import { AreamapChartDataOptionsInternal, ChartDataOptionsInternal } from '../../../chart-data-options/types.js';
3
3
  import { AreamapData, ChartData } from '../../../chart-data/types.js';
4
4
  import { AreamapChartDesignOptions } from '../../../chart-options-processor/translations/design-options.js';
5
- import { ChartDesignOptions } from '../../../chart-options-processor/translations/types.js';
5
+ import { DesignOptions } from '../../../chart-options-processor/translations/types.js';
6
6
  import { ThemeSettings } from '../../../types.js';
7
7
  import { AreamapDataPointEventHandler } from '../../../props';
8
8
  export type AreamapProps = {
@@ -15,4 +15,4 @@ export type AreamapProps = {
15
15
  export declare const Areamap: React.FC<AreamapProps>;
16
16
  export declare const isAreamapData: (chartData: ChartData) => chartData is AreamapData;
17
17
  export declare const isAreamapDataOptions: (dataOptions: ChartDataOptionsInternal) => dataOptions is AreamapChartDataOptionsInternal;
18
- export declare const isAreamapChartDesignOptions: (designOptions: ChartDesignOptions) => designOptions is AreamapChartDesignOptions;
18
+ export declare const isAreamapChartDesignOptions: (designOptions: DesignOptions) => designOptions is AreamapChartDesignOptions;
@@ -1,13 +1,19 @@
1
1
  /// <reference types="react" />
2
- import { ScattermapChartData } from '../../../chart-data/types.js';
3
- import { ScattermapChartDataOptionsInternal } from '../../../chart-data-options/types.js';
2
+ import { ChartData, ScattermapChartData } from '../../../chart-data/types.js';
3
+ import { ScattermapDataPointEventHandler } from '../../../props.js';
4
+ import { ChartDataOptionsInternal, ScattermapChartDataOptionsInternal } from '../../../chart-data-options/types.js';
4
5
  import { ScattermapChartDesignOptions } from '../../../chart-options-processor/translations/design-options.js';
5
6
  import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
7
+ import { DesignOptions } from '../../../chart-options-processor/translations/types.js';
6
8
  export type ScattermapProps = {
7
9
  chartData: ScattermapChartData;
8
10
  dataOptions: ScattermapChartDataOptionsInternal;
9
11
  designOptions: ScattermapChartDesignOptions;
10
12
  dataSource: DataSource | null;
11
13
  filters?: Filter[] | FilterRelations;
14
+ onMarkerClick?: ScattermapDataPointEventHandler;
12
15
  };
13
- export declare const Scattermap: ({ chartData, dataOptions, dataSource, filters, designOptions, }: ScattermapProps) => JSX.Element;
16
+ export declare const Scattermap: ({ chartData, dataOptions, dataSource, filters, designOptions, onMarkerClick, }: ScattermapProps) => JSX.Element;
17
+ export declare const isScattermapData: (chartData: ChartData) => chartData is ScattermapChartData;
18
+ export declare const isScattermapDataOptions: (dataOptions: ChartDataOptionsInternal) => dataOptions is ScattermapChartDataOptionsInternal;
19
+ export declare const isScattermapChartDesignOptions: (designOptions: DesignOptions) => designOptions is ScattermapChartDesignOptions;
@@ -1,5 +1,8 @@
1
1
  import { ScattermapLocationLevel } from '../../../../chart-data-options/types';
2
+ import { ScattermapDataPoint } from '../../../../types';
3
+ import { ScattermapChartLocation } from '../../../../chart-data/types';
2
4
  export declare const LOCATION_DELIMITER = ",";
3
5
  export declare function combineLocationNames(names: string[]): string;
4
6
  export declare function splitLocationName(combinedLocation: string): string[];
5
7
  export declare function getLocationGeoLevel(level: ScattermapLocationLevel): "country" | "city" | "adm" | undefined;
8
+ export declare function locationToScattermapDataPoint(location: ScattermapChartLocation): ScattermapDataPoint;
@@ -1,2 +1,4 @@
1
1
  import { DataTable } from '../../../chart-data-processor/table-processor';
2
- export declare const calcColumnWidths: (dataTable: DataTable, isLoading: boolean, fontFamily?: string) => number[];
2
+ export declare const calcColumnWidths: (dataTable: DataTable, isLoading: boolean, columnsOptions: {
3
+ isHtml: boolean;
4
+ }[], fontFamily?: string) => number[];
@@ -1,8 +1,10 @@
1
1
  /**
2
+ * @internal
2
3
  * States of a data load.
3
4
  */
4
5
  export type DataState<Data> = DataLoadingState<Data> | DataErrorState | DataSuccessState<Data>;
5
6
  /**
7
+ * @internal
6
8
  * State of data loading.
7
9
  */
8
10
  export type DataLoadingState<Data> = {
@@ -20,6 +22,7 @@ export type DataLoadingState<Data> = {
20
22
  status: 'loading';
21
23
  };
22
24
  /**
25
+ * @internal
23
26
  * State of a data load that has failed.
24
27
  */
25
28
  export type DataErrorState = {
@@ -37,6 +40,7 @@ export type DataErrorState = {
37
40
  status: 'error';
38
41
  };
39
42
  /**
43
+ * @internal
40
44
  * State of a data load that has succeeded.
41
45
  */
42
46
  export type DataSuccessState<Data> = {
@@ -53,6 +57,9 @@ export type DataSuccessState<Data> = {
53
57
  /** The status of the data load */
54
58
  status: 'success';
55
59
  };
60
+ /**
61
+ * @internal
62
+ */
56
63
  export type DataLoadAction<Data> = {
57
64
  type: 'loading';
58
65
  } | {
@@ -62,4 +69,7 @@ export type DataLoadAction<Data> = {
62
69
  type: 'error';
63
70
  error: Error;
64
71
  };
72
+ /**
73
+ * @internal
74
+ */
65
75
  export declare function dataLoadStateReducer<Data>(state: DataState<Data>, action: DataLoadAction<Data>): DataState<Data>;
@@ -0,0 +1,8 @@
1
+ import { Ref } from 'react';
2
+ /**
3
+ * Track whether an element is being hovered over.
4
+ *
5
+ * @privateRemarks Derived from https://github.com/uidotdev/usehooks/blob/dfa6623fcc2dcad3b466def4e0495b3f38af962b/index.js#L426.
6
+ * @internal
7
+ */
8
+ export declare const useHover: <T extends HTMLElement>() => [Ref<T>, boolean];
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function YellowExclamationMarkIcon(): JSX.Element;
@@ -3,6 +3,6 @@ import { StyledMeasureColumn, StyledColumn, Color } from '../types';
3
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[]): StyledColumn | StyledMeasureColumn;
6
+ export declare function createDataColumn(item: PanelItem, customPaletteColors?: Color[]): StyledMeasureColumn | StyledColumn;
7
7
  export declare function extractBoxplotBoxType(style: BoxplotWidgetStyle): "iqr" | "extremums" | "standardDeviation";
8
8
  export declare function extractDataOptions(widgetType: WidgetType, panels: Panel[], style: WidgetStyle, customPaletteColors?: Color[]): WidgetDataOptions;
@@ -1,2 +1,13 @@
1
+ import { ClientApplication } from '../../app/client-application';
1
2
  export type HookDecorator<DecoratorConfig> = (decoratorConfig: DecoratorConfig) => <HookArgs extends any[], HookResult>(hook: (...args: HookArgs) => HookResult) => (...args: HookArgs) => HookResult;
3
+ /**
4
+ * @internal
5
+ * @description This is a function that tracks the hook event and sends it to the server.
6
+ * @param hookName - The name of the hook
7
+ * @param packageName - The name of the package
8
+ * @param app - The client application
9
+ * @param onFinally - The function to call after the tracking is done
10
+ * @returns Promise<void>
11
+ */
12
+ export declare const trackHook: (hookName: string, packageName: string, app: ClientApplication, onFinally: () => void) => Promise<void>;
2
13
  export declare const withTracking: HookDecorator<string>;