@sisense/sdk-ui 0.12.1 → 0.14.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 (60) hide show
  1. package/dist/api/types/dashboard-dto.d.ts +11 -4
  2. package/dist/chart-data-options/types.d.ts +12 -6
  3. package/dist/chart-options-processor/chart-options-service.d.ts +6 -2
  4. package/dist/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +5 -2
  5. package/dist/chart-options-processor/subtype-to-design-options.d.ts +2 -1
  6. package/dist/chart-options-processor/tooltip.d.ts +1 -0
  7. package/dist/chart-options-processor/translations/axis-section.d.ts +1 -0
  8. package/dist/chart-options-processor/translations/design-options.d.ts +2 -1
  9. package/dist/chart-options-processor/translations/scatter-series.d.ts +1 -0
  10. package/dist/chart-options-processor/translations/sunburst/sunburst-levels.d.ts +12 -0
  11. package/dist/chart-options-processor/translations/sunburst/sunburst-options.d.ts +6 -0
  12. package/dist/chart-options-processor/translations/sunburst/sunburst-series.d.ts +38 -0
  13. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +5 -2
  14. package/dist/chart-options-processor/translations/treemap/treemap-tooltip.d.ts +8 -2
  15. package/dist/chart-options-processor/translations/types.d.ts +2 -2
  16. package/dist/chart.d.ts +1 -1
  17. package/dist/dashboard-widget/translate-dashboard-filters.d.ts +13 -0
  18. package/dist/dashboard-widget/translate-panel-color-format.d.ts +3 -2
  19. package/dist/dashboard-widget/translate-widget-filters.d.ts +31 -0
  20. package/dist/dashboard-widget/types.d.ts +26 -4
  21. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +48 -0
  22. package/dist/dashboard-widget/utils.d.ts +1 -1
  23. package/dist/decorators/{with-tracking → component-decorators/with-tracking}/error-tracker.d.ts +1 -1
  24. package/dist/decorators/hook-decorators/index.d.ts +1 -0
  25. package/dist/decorators/hook-decorators/with-tracking.d.ts +2 -0
  26. package/dist/filters/components/common/basic-input.d.ts +8 -0
  27. package/dist/filters/components/common/index.d.ts +1 -0
  28. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +1 -1
  29. package/dist/filters/components/filter-tile.d.ts +2 -2
  30. package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +1 -1
  31. package/dist/funnel-chart.d.ts +1 -1
  32. package/dist/highcharts-memorized.d.ts +6 -0
  33. package/dist/index.d.ts +1 -0
  34. package/dist/index.js +33180 -32481
  35. package/dist/indicator-chart.d.ts +1 -1
  36. package/dist/models/dashboard/use-get-dashboard-model.d.ts +5 -0
  37. package/dist/models/dashboard/use-get-dashboard-models.d.ts +6 -1
  38. package/dist/no-results-overlay/images/index.d.ts +1 -1
  39. package/dist/pie-chart.d.ts +1 -1
  40. package/dist/props.d.ts +95 -46
  41. package/dist/query/execute-query.d.ts +13 -2
  42. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +20 -5
  43. package/dist/query-execution/use-execute-query.d.ts +11 -3
  44. package/dist/scatter-chart.d.ts +1 -1
  45. package/dist/sunburst-chart.d.ts +27 -0
  46. package/dist/theme-provider/theme-provider.d.ts +1 -1
  47. package/dist/treemap-chart.d.ts +1 -2
  48. package/dist/types.d.ts +24 -2
  49. package/dist/widgets/chart-widget-deprecated.d.ts +30 -0
  50. package/dist/widgets/chart-widget.d.ts +3 -7
  51. package/dist/widgets/common/drilldown.d.ts +1 -1
  52. package/dist/widgets/table-widget.d.ts +1 -2
  53. package/package.json +7 -6
  54. /package/dist/decorators/{as-sisense-component.d.ts → component-decorators/as-sisense-component.d.ts} +0 -0
  55. /package/dist/decorators/{with-default-translations.d.ts → component-decorators/with-default-translations.d.ts} +0 -0
  56. /package/dist/decorators/{with-error-boundary.d.ts → component-decorators/with-error-boundary.d.ts} +0 -0
  57. /package/dist/decorators/{with-sisense-context-validation.d.ts → component-decorators/with-sisense-context-validation.d.ts} +0 -0
  58. /package/dist/decorators/{with-tracking → component-decorators/with-tracking}/index.d.ts +0 -0
  59. /package/dist/decorators/{with-tracking → component-decorators/with-tracking}/use-track-component-init.d.ts +0 -0
  60. /package/dist/decorators/{with-tracking → component-decorators/with-tracking}/with-tracking.d.ts +0 -0
@@ -1,13 +1,20 @@
1
1
  import { WidgetDto, Datasource, FilterJaql } from '../../dashboard-widget/types';
2
- type Filter = {
2
+ export type Filter = {
3
+ isCascading?: false;
3
4
  jaql: FilterJaql;
4
- isCascading: boolean;
5
+ instanceid?: string;
6
+ disabled?: boolean;
7
+ };
8
+ export type CascadingFilter = {
9
+ isCascading: true;
10
+ levels: FilterJaql[];
11
+ instanceid?: string;
12
+ disabled?: boolean;
5
13
  };
6
14
  export type DashboardDto = {
7
15
  oid: string;
8
16
  title: string;
9
17
  datasource: Datasource;
10
18
  widgets?: WidgetDto[];
11
- filters?: Filter[];
19
+ filters?: Array<Filter | CascadingFilter>;
12
20
  };
13
- export {};
@@ -1,5 +1,5 @@
1
1
  import type { DataColorOptions } from '../chart-data/series-data-color-service';
2
- import type { NumberFormatConfig, SeriesChartType, SortDirection, ValueToColorMap } from '../types';
2
+ import type { NumberFormatConfig, SeriesChartType, SortDirection, ValueToColorMap, MultiColumnValueToColorMap } from '../types';
3
3
  import { Column, MeasureColumn, CalculatedMeasureColumn } from '@sisense/sdk-data';
4
4
  /**
5
5
  * Styles for a category/column when visualized in a chart
@@ -13,6 +13,9 @@ export interface CategoryStyle {
13
13
  * Date format.
14
14
  *
15
15
  * See [ECMAScript Date Time String Format](https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date-time-string-format)
16
+ *
17
+ * Note that 'YYYY' and 'DD' have been disabled since they often get confused with 'yyyy' and 'dd'
18
+ * and can produce unexpected results.
16
19
  */
17
20
  dateFormat?: string;
18
21
  /** Boolean flag to toggle continuous timeline on this date column. */
@@ -35,7 +38,7 @@ export interface CategoryStyle {
35
38
  isColored?: boolean;
36
39
  }
37
40
  /**
38
- * Wrapped {@link @sisense/sdk-data!Column} with styles controlling how the column is visualized in a chart.
41
+ * Wrapped {@link @sisense/sdk-data!Column | Column} with styles controlling how the column is visualized in a chart.
39
42
  *
40
43
  * @example
41
44
  * An example of using `StyledColumn` to change the date format of the months displayed on the x-axis.
@@ -100,6 +103,8 @@ export type ValueStyle = {
100
103
  enabled?: boolean;
101
104
  /** Boolean flag whether null values are treated as zeros in the chart */
102
105
  treatNullDataAsZeros?: boolean;
106
+ /** Boolean flag whether to connect a graph line across null points or render a gap */
107
+ connectNulls?: boolean;
103
108
  };
104
109
  /**
105
110
  * Wrapped {@link @sisense/sdk-data!MeasureColumn | Measure Column} with styles
@@ -198,8 +203,9 @@ export interface CategoricalChartDataOptions {
198
203
  category: (Column | StyledColumn)[];
199
204
  /**
200
205
  * Optional mapping of each of the series to colors.
206
+ * ({@link MultiColumnValueToColorMap} used only for {@link SunburstChart})
201
207
  */
202
- seriesToColorMap?: ValueToColorMap;
208
+ seriesToColorMap?: ValueToColorMap | MultiColumnValueToColorMap;
203
209
  }
204
210
  /**
205
211
  * Configuration for how to query aggregate data and assign data
@@ -281,13 +287,13 @@ export declare function isMeasureColumn(arg: AnyColumn): arg is MeasureColumn |
281
287
  * Configuration for how to query data and assign data to {@link Table}.
282
288
  *
283
289
  */
284
- export type TableDataOptions = {
290
+ export interface TableDataOptions {
285
291
  /**
286
292
  * Columns (or attributes) whose values represent data columns in table
287
293
  *
288
294
  */
289
295
  columns: (Column | StyledColumn | MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn)[];
290
- };
296
+ }
291
297
  /**
292
298
  * Configuration for querying aggregate data and assigning data to chart encodings.
293
299
  *
@@ -323,7 +329,7 @@ export interface CartesianChartDataOptionsInternal {
323
329
  export interface CategoricalChartDataOptionsInternal {
324
330
  y: Value[];
325
331
  breakBy: Category[];
326
- seriesToColorMap?: ValueToColorMap;
332
+ seriesToColorMap?: ValueToColorMap | MultiColumnValueToColorMap;
327
333
  }
328
334
  /** @internal */
329
335
  export interface ScatterChartDataOptionsInternal {
@@ -1,4 +1,4 @@
1
- import type { Options, DrilldownOptions } from '@sisense/sisense-charts';
1
+ import type { Options, DrilldownOptions, SeriesLegendItemClickCallbackFunction } from '@sisense/sisense-charts';
2
2
  import { ChartData } from '../chart-data/types';
3
3
  import { ChartDesignOptions } from './translations/types';
4
4
  import { LegendSettings } from './translations/legend-section';
@@ -53,9 +53,12 @@ type ChartPlotOptions = {
53
53
  pointPadding?: number;
54
54
  pointPlacement?: null;
55
55
  animation?: boolean;
56
- shadow: boolean;
56
+ shadow?: boolean;
57
57
  marker?: MarkerSettings;
58
58
  borderWidth?: number;
59
+ events?: {
60
+ legendItemClick?: SeriesLegendItemClickCallbackFunction;
61
+ };
59
62
  };
60
63
  export type Stacking = 'normal' | 'percent';
61
64
  export type PlotOptions = {
@@ -91,6 +94,7 @@ export type PlotOptions = {
91
94
  pie?: PieOptions;
92
95
  funnel?: FunnelOptions;
93
96
  bubble?: ScatterBubbleOptions;
97
+ sunburst?: ChartPlotOptions;
94
98
  };
95
99
  /**
96
100
  * Highcharts options internal
@@ -1,6 +1,8 @@
1
- import { PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, TreemapStyleOptions } from '../../types';
2
- import { StackableChartDesignOptions, LineChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, AreaChartDesignOptions, TreemapChartDesignOptions } from '../translations/design-options';
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';
3
+ import { LegendPosition } from '../translations/legend-section';
3
4
  import { StackType } from '../translations/translations-to-highcharts';
5
+ export declare const getLegend: (legend?: Legend) => LegendPosition;
4
6
  export declare const DefaultStackType: StackType;
5
7
  export declare const getStackableChartDesignOptions: (styleOptions: AreaStyleOptions | StackableStyleOptions, hasY2Axis: boolean) => StackableChartDesignOptions;
6
8
  export declare const getLineChartDesignOptions: (styleOptions: LineStyleOptions, hasY2Axis: boolean) => LineChartDesignOptions;
@@ -9,5 +11,6 @@ export declare const DefaultPieType = "classic";
9
11
  export declare const getPieChartDesignOptions: (styleOptions: PieStyleOptions) => PieChartDesignOptions;
10
12
  export declare const getFunnelChartDesignOptions: (styleOptions: FunnelStyleOptions) => FunnelChartDesignOptions;
11
13
  export declare const getTreemapChartDesignOptions: (styleOptions: TreemapStyleOptions) => TreemapChartDesignOptions;
14
+ export declare const getSunburstChartDesignOptions: (styleOptions: SunburstStyleOptions) => SunburstChartDesignOptions;
12
15
  export declare const getPolarChartDesignOptions: (styleOptions: PolarStyleOptions) => PolarChartDesignOptions;
13
16
  export declare const getScatterChartDesignOptions: (styleOptions: ScatterStyleOptions) => ScatterChartDesignOptions;
@@ -87,7 +87,8 @@ export type IndicatorSubtype = 'indicator/numeric' | 'indicator/gauge';
87
87
  * - `treemap` - default treemap.
88
88
  */
89
89
  export type TreemapSubtype = 'treemap';
90
- export type ChartSubtype = LineSubtype | AreaSubtype | StackableSubtype | PieSubtype | PolarSubtype | IndicatorSubtype | TreemapSubtype;
90
+ export type SunburstSubtype = 'sunburst';
91
+ export type ChartSubtype = LineSubtype | AreaSubtype | StackableSubtype | PieSubtype | PolarSubtype | IndicatorSubtype | TreemapSubtype | SunburstSubtype;
91
92
  export declare const chartSubtypeToDesignOptions: Readonly<Record<ChartSubtype, {
92
93
  lineType?: LineType | undefined;
93
94
  stackType?: StackType | undefined;
@@ -5,6 +5,7 @@ export type InternalSeriesNode = {
5
5
  val: number;
6
6
  name: string;
7
7
  parentNode?: InternalSeriesNode;
8
+ color?: string;
8
9
  };
9
10
  export type InternalSeries = {
10
11
  series: {
@@ -99,6 +99,7 @@ export type AxisPlotBand = {
99
99
  };
100
100
  };
101
101
  export declare const getCategoricalCompareValue: (value: CategoricalXValues) => number;
102
+ export declare const getDateFormatter: (category: Category, dateFormatter?: ((date: Date, format: string) => string) | undefined) => (time: number) => string;
102
103
  export declare const getXAxisDatetimeSettings: (axis: Axis, category: Category, values: number[], dateFormatter?: ((date: Date, format: string) => string) | undefined) => AxisSettings[];
103
104
  export declare const getXAxisSettings: (axis: Axis, axis2: Axis | undefined, categories: string[], plotBands: PlotBand[], xAxisOrientation: AxisOrientation, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType) => AxisSettings[];
104
105
  export declare const getYAxisSettings: (axis: Axis, axis2: Axis | undefined, axisMinMax: AxisMinMax, axis2MinMax: AxisMinMax, showTotal: boolean, chartDataOptions: ChartDataOptionsInternal) => AxisSettings[];
@@ -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, TreemapStyleOptions } from '../../types';
8
+ import { Convolution, SunburstStyleOptions, TreemapStyleOptions } from '../../types';
9
9
  import { ScatterMarkerSize } from './scatter-plot-options';
10
10
  type DataLimits = {
11
11
  seriesCapacity: number;
@@ -44,6 +44,7 @@ export type FunnelChartDesignOptions = BaseDesignOptionsType & {
44
44
  funnelLabels?: FunnelLabels;
45
45
  };
46
46
  export type TreemapChartDesignOptions = BaseDesignOptionsType & TreemapStyleOptions;
47
+ export type SunburstChartDesignOptions = BaseDesignOptionsType & SunburstStyleOptions;
47
48
  export type ScatterChartDesignOptions = BaseDesignOptionsType & {
48
49
  markerSize?: ScatterMarkerSize;
49
50
  };
@@ -18,6 +18,7 @@ export interface AxisComputedProperties {
18
18
  maskedBreakByColor?: string;
19
19
  maskedSize?: string;
20
20
  color?: string;
21
+ selected?: boolean;
21
22
  }
22
23
  export declare const handleNumberValue: (cell: ComparableData) => number | null;
23
24
  export declare const buildScatterSeries: (data: ScatterDataTable, categoriesMap: ScatterAxisCategoriesMap, dataOptions?: ScatterChartDataOptionsInternal, themeSettings?: CompleteThemeSettings, seriesCapacity?: number) => SeriesWithAlerts<SeriesType[]>;
@@ -0,0 +1,12 @@
1
+ import { CategoricalChartData } from '../../../chart-data/types';
2
+ import { PointLabelObject } from '@sisense/sisense-charts';
3
+ import { CategoricalChartDataOptionsInternal } from '../../../chart-data-options/types';
4
+ import { SunburstChartDesignOptions } from '../design-options';
5
+ import { CompleteThemeSettings } from '../../../types';
6
+ export declare function prepareSunburstLevels(chartData: CategoricalChartData, dataOptions: CategoricalChartDataOptionsInternal, designOptions: SunburstChartDesignOptions, themeSettings?: CompleteThemeSettings): {
7
+ level: number;
8
+ dataLabels: {
9
+ enabled: boolean;
10
+ formatter(this: PointLabelObject): string;
11
+ };
12
+ }[];
@@ -0,0 +1,6 @@
1
+ import { CategoricalChartData } from '../../../chart-data/types';
2
+ import { HighchartsOptionsInternal } from '../../chart-options-service';
3
+ import { CategoricalChartDataOptionsInternal } from '../../../chart-data-options/types';
4
+ import { CompleteThemeSettings } from '../../../types';
5
+ import { SunburstChartDesignOptions } from '../design-options';
6
+ export declare function prepareSunburstOptions(chartData: CategoricalChartData, dataOptions: CategoricalChartDataOptionsInternal, designOptions: SunburstChartDesignOptions, themeSettings?: CompleteThemeSettings): HighchartsOptionsInternal;
@@ -0,0 +1,38 @@
1
+ import { CategoricalChartData } from '../../../chart-data/types';
2
+ import { CategoricalChartDataOptionsInternal } from '../../../chart-data-options/types';
3
+ import { CompleteThemeSettings } from '../../../types';
4
+ export declare const SUNBURST_ROOT_PARENT_ID = "SUNBURST_ROOT_PARENT_ID";
5
+ export declare function prepareSunburstDataItems(chartData: CategoricalChartData, dataOptions: CategoricalChartDataOptionsInternal, themeSettings?: CompleteThemeSettings): ({
6
+ id: string;
7
+ name: string;
8
+ custom: {
9
+ level: number;
10
+ levelsCount: number;
11
+ };
12
+ } | {
13
+ color: any;
14
+ name?: string | undefined;
15
+ y?: number | null | undefined;
16
+ x?: number | null | undefined;
17
+ z?: number | null | undefined;
18
+ marker?: {
19
+ enabled?: boolean | undefined;
20
+ isIsolatedPoint?: boolean | undefined;
21
+ lineColor?: string | undefined;
22
+ lineWidth?: number | undefined;
23
+ } | undefined;
24
+ selected?: boolean | undefined;
25
+ sliced?: boolean | undefined;
26
+ custom?: {
27
+ [k: string]: unknown;
28
+ number1?: number | undefined;
29
+ string1?: string | undefined;
30
+ level?: number | undefined;
31
+ maskedBreakByPoint?: string | undefined;
32
+ maskedBreakByColor?: string | undefined;
33
+ } | undefined;
34
+ value?: number | null | undefined;
35
+ id?: string | undefined;
36
+ drilldown?: string | undefined;
37
+ parent?: string | undefined;
38
+ })[];
@@ -26,10 +26,13 @@ export type SeriesPointStructure = {
26
26
  lineWidth?: number;
27
27
  };
28
28
  selected?: boolean;
29
+ sliced?: boolean;
29
30
  custom?: {
30
31
  number1?: number;
31
32
  string1?: string;
32
33
  level?: number;
34
+ maskedBreakByPoint?: string;
35
+ maskedBreakByColor?: string;
33
36
  [k: string]: unknown;
34
37
  };
35
38
  value?: number | null;
@@ -59,7 +62,7 @@ export declare const addStackingIfSpecified: (chartType: ChartType, designOption
59
62
  * @param index -
60
63
  */
61
64
  export declare const indexMapWhenOnlyY: (categories: string[], index: number) => (0 | -1)[];
62
- export declare const formatSeriesContinuousXAxis: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, interval: number, maxCategories: number) => HighchartsSeriesValues;
65
+ export declare const formatSeriesContinuousXAxis: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, interval: number, maxCategories: number, dateFormatter: (time: number) => string) => HighchartsSeriesValues;
63
66
  export declare const formatSeries: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, categories?: string[], categoryColors?: string[]) => HighchartsSeriesValues;
64
67
  export declare const adjustMinWhenColumnBar: (chartType: ChartType, autoMinMax: AxisMinMax) => {
65
68
  min: number;
@@ -69,5 +72,5 @@ export declare const autoCalculateYAxisMinMax: (chartType: ChartType, chartData:
69
72
  min: number;
70
73
  max: number;
71
74
  };
72
- export declare const determineYAxisOptions: (chartData: ChartData, dataOptions: ChartDataOptionsInternal) => [number[], (HighchartsType | undefined)[], boolean[]];
75
+ export declare const determineYAxisOptions: (chartData: ChartData, dataOptions: ChartDataOptionsInternal) => [number[], (HighchartsType | undefined)[], boolean[], boolean[]];
73
76
  export declare const getColorSetting: (dataOptions: CartesianChartDataOptionsInternal | CategoricalChartDataOptionsInternal, key: string) => string | undefined;
@@ -2,5 +2,11 @@ import { CategoricalChartDataOptionsInternal } from '../../../chart-data-options
2
2
  import { TreemapChartDesignOptions } from '../design-options';
3
3
  import { TooltipSettings } from '../../tooltip';
4
4
  import { TooltipFormatterContextObject } from '@sisense/sisense-charts';
5
- export declare const getTreemapTooltipSettings: (chartDataOptions: CategoricalChartDataOptionsInternal, designOptions: TreemapChartDesignOptions) => TooltipSettings;
6
- export declare function treemapTooltipFormatter(context: TooltipFormatterContextObject, chartDataOptions: CategoricalChartDataOptionsInternal, designOptions: TreemapChartDesignOptions): string;
5
+ type TooltipFormatterOptions = {
6
+ displayTotalContribution: boolean;
7
+ displayColorCircles: boolean;
8
+ shouldSkip: (context: TooltipFormatterContextObject) => boolean;
9
+ };
10
+ export declare const getTreemapTooltipSettings: (chartDataOptions: CategoricalChartDataOptionsInternal, designOptions: TreemapChartDesignOptions, formatterOptions?: TooltipFormatterOptions) => TooltipSettings;
11
+ export declare function treemapTooltipFormatter(context: TooltipFormatterContextObject, chartDataOptions: CategoricalChartDataOptionsInternal, designOptions: TreemapChartDesignOptions, formatterOptions?: TooltipFormatterOptions): string | false;
12
+ export {};
@@ -6,7 +6,7 @@ export type PolarChartType = (typeof POLAR_CHART_TYPES)[number];
6
6
  export declare const CARTESIAN_CHART_TYPES: readonly ["line", "area", "bar", "column", "polar"];
7
7
  /** Cartesian family of chart types @expandType */
8
8
  export type CartesianChartType = (typeof CARTESIAN_CHART_TYPES)[number];
9
- export declare const CATEGORICAL_CHART_TYPES: readonly ["pie", "funnel", "treemap"];
9
+ export declare const CATEGORICAL_CHART_TYPES: readonly ["pie", "funnel", "treemap", "sunburst"];
10
10
  /** Categorical family of chart types @expandType */
11
11
  export type CategoricalChartType = (typeof CATEGORICAL_CHART_TYPES)[number];
12
12
  export declare const SCATTER_CHART_TYPES: readonly ["scatter"];
@@ -28,7 +28,7 @@ export type ChartConfig = {
28
28
  designOptions: ChartDesignOptions;
29
29
  };
30
30
  export declare const isCartesian: (chartType: ChartType) => chartType is "area" | "line" | "bar" | "column" | "polar";
31
- export declare const isCategorical: (chartType: ChartType) => chartType is "pie" | "funnel" | "treemap";
31
+ export declare const isCategorical: (chartType: ChartType) => chartType is "pie" | "funnel" | "treemap" | "sunburst";
32
32
  export declare const isScatter: (chartType: ChartType) => chartType is "scatter";
33
33
  export declare const isIndicator: (chartType: ChartType) => chartType is "indicator";
34
34
  export declare const isPolar: (chartType: ChartType) => chartType is "polar";
package/dist/chart.d.ts CHANGED
@@ -75,6 +75,6 @@ export declare const shouldSkipSisenseContextWaiting: (props: ChartProps) => boo
75
75
  *
76
76
  * <img src="media://chart-local-data-example-1.png" width="800px" />
77
77
  * @param props - Chart properties
78
- * @returns Chart component representing a chart type as specified in `ChartProps.`{@link ChartProps.chartType}
78
+ * @returns Chart component representing a chart type as specified in `ChartProps.`{@link ChartProps.chartType | chartType}
79
79
  */
80
80
  export declare const Chart: import("react").FunctionComponent<ChartProps>;
@@ -0,0 +1,13 @@
1
+ import { DashboardDto } from '../api/types/dashboard-dto';
2
+ import { WidgetDto } from './types';
3
+ /**
4
+ * Extracts dashboard filters applicable to a widget.
5
+ *
6
+ * @param {DashboardDto} dashboard - The dashboard containing the filters.
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.
9
+ */
10
+ export declare function extractDashboardFiltersForWidget(dashboard: DashboardDto, widget: WidgetDto): {
11
+ filters: import("packages/sdk-data/dist").Filter[];
12
+ highlights: import("packages/sdk-data/dist").Filter[];
13
+ };
@@ -1,5 +1,6 @@
1
1
  import { DataColorOptions } from '../chart-data/series-data-color-service';
2
- import { CompleteThemeSettings, ValueToColorMap } from '../types';
3
- import { PanelColorFormat, PanelMembersFormat } from './types';
2
+ import { CompleteThemeSettings, ValueToColorMap, MultiColumnValueToColorMap } from '../types';
3
+ import { PanelColorFormat, PanelItem, PanelMembersFormat } from './types';
4
4
  export declare const createValueColorOptions: (format?: PanelColorFormat, themeSettings?: CompleteThemeSettings) => DataColorOptions | undefined;
5
5
  export declare const createValueToColorMap: (membersFormat: PanelMembersFormat) => ValueToColorMap;
6
+ export declare const createValueToColorMultiColumnsMap: (items: PanelItem[]) => MultiColumnValueToColorMap;
@@ -1,5 +1,36 @@
1
1
  import { Filter } from '@sisense/sdk-data';
2
2
  import { FilterJaql, Panel } from './types';
3
+ /**
4
+ * Extracts filter model components from a FilterJaql object.
5
+ *
6
+ * @param {FilterJaql} jaql - The FilterJaql object.
7
+ * @returns {object} - An object containing the extracted filter model components, including filter, backgroundFilter, and turnOffMembersFilter.
8
+ */
9
+ export declare function extractFilterModelFromJaql(jaql: FilterJaql): {
10
+ filter: {
11
+ all: true;
12
+ } | {
13
+ members: string[];
14
+ } | {
15
+ exclude: {
16
+ members: string[];
17
+ };
18
+ };
19
+ backgroundFilter: import("./types").BackgroundFilter | ({
20
+ exclude: {
21
+ members: string[];
22
+ };
23
+ } & {
24
+ turnedOff: boolean;
25
+ }) | undefined;
26
+ turnOffMembersFilter: ({
27
+ exclude: {
28
+ members: string[];
29
+ };
30
+ } & {
31
+ turnedOff: boolean;
32
+ }) | undefined;
33
+ };
3
34
  /**
4
35
  * Creates a Filter from a FilterJaql object.
5
36
  *
@@ -6,13 +6,18 @@ export declare const enum WidgetType {
6
6
  AreaChart = "chart/area",
7
7
  FunnelChart = "chart/funnel",
8
8
  TreemapChart = "treemap",
9
+ SunburstChart = "sunburst",
9
10
  ScatterChart = "chart/scatter",
10
11
  IndicatorChart = "indicator",
11
12
  PolarChart = "chart/polar",
12
13
  Table = "tablewidget",
13
14
  TableWithAggregation = "tablewidgetagg"
14
15
  }
15
- 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';
16
+ 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 declare enum WidgetDashboardFilterMode {
18
+ FILTER = "filter",
19
+ SELECT = "select"
20
+ }
16
21
  export type Datasource = {
17
22
  title: string;
18
23
  id: string;
@@ -31,12 +36,21 @@ export interface WidgetDto {
31
36
  subtype: WidgetSubtype | string;
32
37
  datasource: Datasource;
33
38
  metadata: {
39
+ ignore?: FiltersIgnoringRules;
34
40
  panels: Panel[];
35
41
  };
36
42
  style: WidgetStyle;
37
43
  title: string;
38
44
  desc: string;
45
+ options?: {
46
+ dashboardFiltersMode: `${WidgetDashboardFilterMode}`;
47
+ };
39
48
  }
49
+ export type FiltersIgnoringRules = {
50
+ dimensions?: string[];
51
+ ids: string[];
52
+ all: boolean;
53
+ };
40
54
  export declare const enum DataType {
41
55
  TEXT = "text",
42
56
  NUMERIC = "numeric",
@@ -69,7 +83,7 @@ export type FormulaJaql = {
69
83
  formula: string;
70
84
  context?: Record<FormulaID, FormulaContext>;
71
85
  };
72
- type IncludeAllFilter = {
86
+ export type IncludeAllFilter = {
73
87
  all: true;
74
88
  };
75
89
  export type IncludeMembersFilter = {
@@ -82,7 +96,9 @@ type ExcludeMembersFilter = {
82
96
  };
83
97
  export type MembersFilter = IncludeMembersFilter | ExcludeMembersFilter;
84
98
  type BaseFilter = IncludeAllFilter | MembersFilter;
85
- type BackgroundFilter = BaseFilter;
99
+ export type BackgroundFilter = BaseFilter & {
100
+ level?: 'string';
101
+ };
86
102
  type TurnOffMembersFilter = ExcludeMembersFilter & {
87
103
  turnedOff: boolean;
88
104
  };
@@ -327,7 +343,13 @@ export type TreemapWidgetStyle = {
327
343
  'tooltip/contribution': boolean;
328
344
  'tooltip/value': boolean;
329
345
  };
330
- export type WidgetStyle = CartesianWidgetStyle | PolarWidgetStyle | FunnelWidgetStyle | ScatterWidgetStyle | TableWidgetStyle | IndicatorWidgetStyle | TreemapWidgetStyle;
346
+ export type SunburstWidgetStyle = {
347
+ 'legend/enabled': boolean;
348
+ 'legend/position': 'top' | 'bottom' | 'left' | 'right';
349
+ 'tooltip/contribution': boolean;
350
+ 'tooltip/value': boolean;
351
+ };
352
+ export type WidgetStyle = CartesianWidgetStyle | PolarWidgetStyle | FunnelWidgetStyle | ScatterWidgetStyle | TableWidgetStyle | IndicatorWidgetStyle | TreemapWidgetStyle | SunburstWidgetStyle;
331
353
  export declare enum FiltersMergeStrategyEnum {
332
354
  WIDGET_FIRST = "widgetFirst",
333
355
  CODE_FIRST = "codeFirst",
@@ -0,0 +1,48 @@
1
+ import { RestApi } from '../api/rest-api';
2
+ import { DashboardDto } from '../api/types/dashboard-dto';
3
+ import { WidgetDto } from './types';
4
+ /**
5
+ * Fetches a Widget DTO model and, optionally, a Dashboard DTO model.
6
+ *
7
+ * @internal
8
+ *
9
+ * @param {Object} options - The options for fetching the DTO models.
10
+ * @param {string} options.widgetOid - The OID of the widget to fetch.
11
+ * @param {string} options.dashboardOid - The OID of the dashboard to which the widget belongs.
12
+ * @param {boolean} [options.includeDashboard] - (Optional) Whether to include the associated dashboard.
13
+ * @param {RestApi} options.api - The RestApi instance to use for fetching.
14
+ * @returns {Promise<{widget: WidgetDto, dashboard?: DashboardDto}>} A promise that resolves to an object containing the Widget DTO and optionally the Dashboard DTO.
15
+ */
16
+ export declare const fetchWidgetDtoModel: ({ widgetOid, dashboardOid, includeDashboard, api, }: {
17
+ widgetOid: string;
18
+ dashboardOid: string;
19
+ includeDashboard?: boolean | undefined;
20
+ api: RestApi;
21
+ }) => Promise<{
22
+ widget: WidgetDto;
23
+ dashboard: DashboardDto | undefined;
24
+ }>;
25
+ /**
26
+ * Custom hook for fetching Widget DTO and Dashboard DTO models.
27
+ *
28
+ * @internal
29
+ *
30
+ * @param {Object} options - The options for fetching the DTO models.
31
+ * @param {string} options.widgetOid - The OID of the widget to fetch.
32
+ * @param {string} options.dashboardOid - The OID of the dashboard to which the widget belongs.
33
+ * @param {boolean} [options.includeDashboard] - (Optional) Whether to include the associated dashboard.
34
+ * @returns {{
35
+ * widget: WidgetDto,
36
+ * dashboard?: DashboardDto,
37
+ * error: Error
38
+ * }} An object containing the Widget DTO, optionally the Dashboard DTO, and an error if fetching fails.
39
+ */
40
+ export declare const useFetchWidgetDtoModel: ({ widgetOid, dashboardOid, includeDashboard, }: {
41
+ widgetOid: string;
42
+ dashboardOid: string;
43
+ includeDashboard?: boolean | undefined;
44
+ }) => {
45
+ error: Error | undefined;
46
+ widget?: WidgetDto | undefined;
47
+ dashboard?: DashboardDto | undefined;
48
+ };
@@ -12,7 +12,7 @@ export declare function getRootPanelItem(item: PanelItem): PanelItem;
12
12
  export declare function getSortType(jaqlSort: JaqlSortDirection | undefined): SortDirection;
13
13
  /**
14
14
  * Merges two arrays of filter objects, prioritizing 'targetFilters' over 'sourceFilters',
15
- * and removes duplicates based on filter attribute expression (dim)
15
+ * and removes duplicates based on filter compare id
16
16
  *
17
17
  * @param {Filter[]} [sourceFilters=[]] - The source array of filter objects.
18
18
  * @param {Filter[]} [targetFilters=[]] - The target array of filter objects.
@@ -1,6 +1,6 @@
1
1
  import { HttpClient } from '@sisense/sdk-rest-client';
2
2
  import { Component, ReactNode } from 'react';
3
- import { SisenseContextPayload } from '../../sisense-context/sisense-context';
3
+ import { SisenseContextPayload } from '../../../sisense-context/sisense-context';
4
4
  type ErrorTrackerProps = {
5
5
  children: ReactNode;
6
6
  componentName: string;
@@ -0,0 +1 @@
1
+ export * from './with-tracking';
@@ -0,0 +1,2 @@
1
+ export type HookDecorator<DecoratorConfig> = (decoratorConfig: DecoratorConfig) => <HookArgs extends any[], HookResult>(hook: (...args: HookArgs) => HookResult) => (...args: HookArgs) => HookResult;
2
+ export declare const withTracking: HookDecorator<string>;
@@ -0,0 +1,8 @@
1
+ import { type FunctionComponent, type InputHTMLAttributes } from 'react';
2
+ type BasicInputProps = {
3
+ variant?: 'white' | 'grey';
4
+ label: string;
5
+ callback: (value: string) => void;
6
+ } & InputHTMLAttributes<HTMLInputElement>;
7
+ export declare const BasicInput: FunctionComponent<BasicInputProps>;
8
+ export {};
@@ -1,5 +1,6 @@
1
1
  export { LinkButton, PrimaryButton, SecondaryButton } from './buttons';
2
2
  export { Checkbox } from './checkbox';
3
+ export { BasicInput } from './basic-input';
3
4
  export { Input } from './input';
4
5
  export { Radio } from './radio';
5
6
  export { SisenseSwitchButton } from './switch';
@@ -12,7 +12,7 @@ export interface DateRangeFilterTileProps {
12
12
  /**
13
13
  * Data source the query is run against - e.g. `Sample ECommerce`
14
14
  *
15
- * If not specified, the query will use the `defaultDataSource` specified in the parent {@link SisenseContextProvider} component.
15
+ * If not specified, the query will use the `defaultDataSource` specified in the parent Sisense Context.
16
16
  */
17
17
  dataSource?: DataSource;
18
18
  /**
@@ -2,8 +2,8 @@ import type { FunctionComponent, ReactNode } from 'react';
2
2
  interface Props {
3
3
  title: string;
4
4
  renderContent: (collapsed: boolean, tileDisabled: boolean) => ReactNode;
5
- disabled: boolean;
6
- onToggleDisabled: () => void;
5
+ disabled?: boolean;
6
+ onToggleDisabled?: () => void;
7
7
  }
8
8
  /**
9
9
  * Generic component that owns common functionality of a filter "tile" like
@@ -9,7 +9,7 @@ export interface MemberFilterTileProps {
9
9
  /**
10
10
  * Data source the query is run against - e.g. `Sample ECommerce`
11
11
  *
12
- * If not specified, the query will use the `defaultDataSource` specified in the parent {@link SisenseContextProvider} component.
12
+ * If not specified, the query will use the `defaultDataSource` specified in the parent Sisense Context.
13
13
  */
14
14
  dataSource?: DataSource;
15
15
  /** Attribute to filter on. A query will be run to fetch all this attribute's members */
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { FunnelChartProps } from './props';
3
3
  /**
4
- * A React component representing data progressively decreasing in size or quantity through a conical shape.
4
+ * A React component representing data progressively decreasing in size or quantity through a funnel shape.
5
5
  * See [Funnel Chart](https://docs.sisense.com/main/SisenseLinux/funnel-chart.htm) for more information.
6
6
  *
7
7
  * @example
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { HighchartsOptionsInternal } from './chart-options-processor/chart-options-service';
3
+ export declare const HighchartsReactMemoized: import("react").MemoExoticComponent<({ options, immutable, }: {
4
+ options: HighchartsOptionsInternal;
5
+ immutable: boolean | null | undefined;
6
+ }) => JSX.Element>;
package/dist/index.d.ts CHANGED
@@ -26,6 +26,7 @@ export * from './scatter-chart';
26
26
  export * from './indicator-chart';
27
27
  export * from './table';
28
28
  export * from './treemap-chart';
29
+ export * from './sunburst-chart';
29
30
  export * from './sisense-context/custom-sisense-context-provider';
30
31
  export * from './theme-provider/custom-theme-provider';
31
32
  export { getThemeSettingsByOid } from './themes/theme-loader';