@sisense/sdk-ui 1.15.1 → 1.16.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 (80) hide show
  1. package/dist/ai.cjs +50 -50
  2. package/dist/ai.js +112 -111
  3. package/dist/analytics-composer/index.d.ts +1 -0
  4. package/dist/analytics-composer/translators/code-templates.d.ts +11 -0
  5. package/dist/analytics-composer/translators/generate-code.d.ts +18 -0
  6. package/dist/analytics-composer/translators/index.d.ts +3 -0
  7. package/dist/analytics-composer/translators/model-translator.d.ts +48 -0
  8. package/dist/analytics-composer/translators/query-templates.d.ts +1 -0
  9. package/dist/analytics-composer/translators/query-translator.d.ts +134 -0
  10. package/dist/analytics-composer/translators/translate-filters-to-code.d.ts +2 -0
  11. package/dist/analytics-composer/translators/translate-props-to-code.d.ts +8 -0
  12. package/dist/analytics-composer/translators/types.d.ts +95 -0
  13. package/dist/analytics-composer/translators/utils.d.ts +13 -0
  14. package/dist/analytics-composer.cjs +239 -0
  15. package/dist/analytics-composer.d.ts +1 -0
  16. package/dist/analytics-composer.js +5435 -0
  17. package/dist/api/rest-api.d.ts +5 -0
  18. package/dist/api/types/dashboard-dto.d.ts +8 -0
  19. package/dist/api/types/palette-dto.d.ts +9 -0
  20. package/dist/app/settings/settings.d.ts +5 -0
  21. package/dist/app/settings/types/features.d.ts +6 -0
  22. package/dist/chart/advanced-chart.d.ts +7 -0
  23. package/dist/chart-data/advanced-analytics-data.d.ts +50 -0
  24. package/dist/chart-data/types.d.ts +1 -0
  25. package/dist/chart-data-options/types.d.ts +33 -4
  26. package/dist/chart-options-processor/advanced-chart-options.d.ts +24 -0
  27. package/dist/chart-options-processor/cartesian-chart-options.d.ts +2 -1
  28. package/dist/chart-options-processor/chart-options-service.d.ts +5 -0
  29. package/dist/chart-options-processor/translations/axis-section.d.ts +2 -2
  30. package/dist/chart-options-processor/translations/legend-section.d.ts +2 -0
  31. package/dist/chart-options-processor/translations/tooltip-utils.d.ts +1 -0
  32. package/dist/chart-options-processor/translations/tooltip.d.ts +4 -2
  33. package/dist/common/components/loading-indicator.d.ts +14 -0
  34. package/dist/common-filters/cascading-utils.d.ts +30 -0
  35. package/dist/common-filters/common-filters-connector.d.ts +7 -1
  36. package/dist/common-filters/types.d.ts +9 -4
  37. package/dist/common-filters/utils.d.ts +3 -2
  38. package/dist/dashboard/dashboard-by-id.d.ts +2 -0
  39. package/dist/dashboard/dashboard.d.ts +3 -1
  40. package/dist/dashboard/types.d.ts +2 -1
  41. package/dist/dashboard-widget/dashboard-widget.d.ts +2 -0
  42. package/dist/dashboard-widget/translate-widget-data-options.d.ts +1 -1
  43. package/dist/dashboard-widget/translate-widget-style-options.d.ts +11 -2
  44. package/dist/dashboard-widget/types.d.ts +26 -8
  45. package/dist/dashboard-widget/utils.d.ts +8 -0
  46. package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +1 -0
  47. package/dist/filters/utils.d.ts +1 -0
  48. package/dist/get-widget-options-D008Wku-.cjs +172 -0
  49. package/dist/get-widget-options-Xskksk4X.js +34154 -0
  50. package/dist/index.cjs +195 -194
  51. package/dist/index.js +12388 -12114
  52. package/dist/models/dashboard/dashboard-model.d.ts +10 -2
  53. package/dist/models/dashboard/get-dashboard-model.d.ts +13 -2
  54. package/dist/models/dashboard/types.d.ts +5 -0
  55. package/dist/models/dashboard/use-get-dashboard-model.d.ts +2 -0
  56. package/dist/models/dashboard/use-get-dashboard-models.d.ts +2 -0
  57. package/dist/models/widget/get-widget-model.d.ts +13 -2
  58. package/dist/models/widget/translate-widget.d.ts +9 -1
  59. package/dist/models/widget/use-get-widget-model.d.ts +2 -0
  60. package/dist/models/widget/widget-model.d.ts +5 -3
  61. package/dist/pivot-table/use-get-pivot-table-query.d.ts +2 -6
  62. package/dist/props.d.ts +13 -5
  63. package/dist/query-execution/execute-query-by-widget-id.d.ts +2 -0
  64. package/dist/query-execution/index.d.ts +1 -1
  65. package/dist/query-execution/types.d.ts +11 -2
  66. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +5 -5
  67. package/dist/themes/legacy-design-settings.d.ts +14 -0
  68. package/dist/translation/resources/en.d.ts +9 -0
  69. package/dist/translation/resources/index.d.ts +18 -0
  70. package/dist/types.d.ts +51 -9
  71. package/dist/useQuery-DeK1uDeJ.js +43001 -0
  72. package/dist/useQuery-aWnvBOTu.cjs +433 -0
  73. package/dist/utils/filters.d.ts +2 -0
  74. package/dist/widgets/common/widget-container.d.ts +2 -2
  75. package/dist/widgets/common/widget-header-info-button.d.ts +2 -2
  76. package/dist/widgets/common/widget-header.d.ts +2 -2
  77. package/dist/widgets/common/widget-style-utils.d.ts +5 -4
  78. package/package.json +18 -8
  79. package/dist/useQuery-B-49RH93.js +0 -76791
  80. package/dist/useQuery-C2MQvc4S.cjs +0 -603
@@ -2,6 +2,7 @@ import { HttpClient } from '@sisense/sdk-rest-client';
2
2
  import { FeatureCollection as GeoJsonFeatureCollection } from 'geojson';
3
3
  import { WidgetDto } from '../dashboard-widget/types';
4
4
  import type { DashboardDto } from './types/dashboard-dto';
5
+ import { PaletteDto } from '../api/types/palette-dto';
5
6
  type GetDashboardsOptions = {
6
7
  searchByTitle?: string;
7
8
  fields?: string[];
@@ -37,6 +38,10 @@ export declare class RestApi {
37
38
  * Get a GeoJSON data for all USA states
38
39
  */
39
40
  getUsaStatesGeoJson: () => Promise<GeoJsonFeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties> | undefined>;
41
+ /**
42
+ * Get all palettes
43
+ */
44
+ getPalettes: () => Promise<PaletteDto[] | undefined>;
40
45
  }
41
46
  export declare const useGetApi: () => RestApi;
42
47
  export {};
@@ -30,6 +30,13 @@ export type CascadingFilterDto = {
30
30
  disabled?: boolean;
31
31
  locked?: boolean;
32
32
  };
33
+ export type DashboardStyleDto = {
34
+ palette?: {
35
+ name: string;
36
+ colors: string[];
37
+ };
38
+ paletteId?: string;
39
+ };
33
40
  export declare const isCascadingFilterDto: (filter: FilterDto | CascadingFilterDto) => filter is CascadingFilterDto;
34
41
  export type DashboardDto = {
35
42
  oid: string;
@@ -41,4 +48,5 @@ export type DashboardDto = {
41
48
  filterRelations: FilterRelationsModel;
42
49
  }[];
43
50
  layout?: Layout;
51
+ style?: DashboardStyleDto;
44
52
  } & AnyObject;
@@ -0,0 +1,9 @@
1
+ export type PaletteDto = {
2
+ _id: string;
3
+ colors: string[];
4
+ name: string;
5
+ isDefault: boolean;
6
+ sortOrder: number;
7
+ isSystem: boolean;
8
+ systemDefault: boolean;
9
+ };
@@ -1,5 +1,6 @@
1
1
  import { HttpClient } from '@sisense/sdk-rest-client';
2
2
  import { AppConfig, ThemeSettings } from '../../types';
3
+ import { FeatureMap } from './types/features.js';
3
4
  /**
4
5
  * Application settings
5
6
  */
@@ -8,10 +9,14 @@ export type AppSettings = Required<ConfigurableAppSettings> & ServerSettings;
8
9
  * Application settings that can be overridden by the user
9
10
  */
10
11
  type ConfigurableAppSettings = AppConfig;
12
+ /**
13
+ * Fusion platform settings
14
+ */
11
15
  type ServerSettings = {
12
16
  serverThemeSettings: ThemeSettings;
13
17
  serverLanguage: string;
14
18
  serverVersion: string;
19
+ serverFeatures: FeatureMap;
15
20
  };
16
21
  /**
17
22
  * Gets the application settings
@@ -121,4 +121,10 @@ type DimensionalModelingFeature = {
121
121
  type CloudCDNFeature = Feature<'cloudCDN'>;
122
122
  type OnboardingFeature = Feature<'onboarding'>;
123
123
  export type Features = (AlertingFeature | LiveQueryFeature | NlqFeature | PivotFeature | CustomCodeFeature | CustomCodeTransformationFeature | BuildDestinationFeature | VersionHistoryFeature | EmbedCodeFeature | LiveCustomColumnFeature | ExportingEngineV2Feature | ExportingXlsxV2Feature | ExportingCsvFeature | ConnectionManagementFeature | SisenseLightFeature | WizardSqlEditorFeature | MultiTenancyFeature | BloxFeature | FunnelFeature | Cloud360Feature | BreakByToggleFeature | GitIntegrationFeature | InfusionFeature | InfusionWebClientFeature | NotebooksFeature | AdminWebClientFeature | DateTimeFiltersFeature | TextFiltersFeature | NumericFiltersFeature | FilterRelationsEnabledFeature | TimeLevelSupportEnabledFeature | SyncDashboardEventsFeature | UserProfileFeature | ScatterFeature | CustomFontsFeature | PreferWidgetImageServerExportFeature | NewAdminUIFeature | SharedFormulasFeature | SideBarFeature | InfusionTokenEndpointFeature | ExplanationsForIndicatorWidgetsFeature | ExplanationsForCategoricalWidgetsFeature | WidgetDesignStyleFeature | FiscalOnFeature | ReactAnalyticsWidgetEditorFeature | DynamicSQLFeature | NewCustomConnectorFeature | CrossTenantPerspectivesFeature | EnableDatamodelPerspectiveFeature | AlwaysDirectRelationsFeature | ModelStatisticsFeature | ExportingCsvFormattedFeature | FlexibleTooltipsFeature | DimensionalModelingFeature | CloudCDNFeature | OnboardingFeature)[];
124
+ export type FeatureByKey<K extends string> = Extract<Features[number], {
125
+ key: K;
126
+ }>;
127
+ export type FeatureMap = {
128
+ [K in Features[number]['key']]: FeatureByKey<K>;
129
+ };
124
130
  export {};
@@ -0,0 +1,7 @@
1
+ import { RegularChartProps } from '../props.js';
2
+ /**
3
+ *
4
+ * @param props
5
+ * @returns
6
+ */
7
+ export declare const AdvancedChart: (props: RegularChartProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,50 @@
1
+ import { DataTable } from '../chart-data-processor/table-processor';
2
+ import { CartesianChartData } from './types';
3
+ import { CartesianChartDataOptionsInternal } from '../chart-data-options/types';
4
+ export declare const isForecastChart: (dataOptions: CartesianChartDataOptionsInternal) => boolean;
5
+ export declare const isTrendChart: (dataOptions: CartesianChartDataOptionsInternal) => boolean;
6
+ export declare const createForecastDataOptions: (dataOptions: CartesianChartDataOptionsInternal) => {
7
+ rangeValues: {
8
+ title: string;
9
+ name: string;
10
+ aggregation?: string | undefined;
11
+ sortType?: import("@sisense/sdk-data").SortDirection | undefined;
12
+ showOnRightAxis?: boolean | undefined;
13
+ numberFormatConfig?: import("..").NumberFormatConfig | undefined;
14
+ chartType?: import("..").SeriesChartType | undefined;
15
+ color?: import("./data-coloring").DataColorOptions | undefined;
16
+ enabled?: boolean | undefined;
17
+ treatNullDataAsZeros?: boolean | undefined;
18
+ connectNulls?: boolean | undefined;
19
+ totalsCalculation?: import("@sisense/sdk-data").TotalsCalculation | undefined;
20
+ dataBars?: boolean | undefined;
21
+ forecast?: import("@sisense/sdk-data").ForecastFormulaOptions | undefined;
22
+ trend?: import("@sisense/sdk-data").TrendFormulaOptions | undefined;
23
+ width?: number | undefined;
24
+ seriesStyleOptions?: import("../chart-data-options/types").SeriesStyleOptions | undefined;
25
+ }[][];
26
+ seriesValues: import("../chart-data-options/types").Value[];
27
+ y: {
28
+ title: string;
29
+ name: string;
30
+ aggregation?: string | undefined;
31
+ sortType?: import("@sisense/sdk-data").SortDirection | undefined;
32
+ showOnRightAxis?: boolean | undefined;
33
+ numberFormatConfig?: import("..").NumberFormatConfig | undefined;
34
+ chartType?: import("..").SeriesChartType | undefined;
35
+ color?: import("./data-coloring").DataColorOptions | undefined;
36
+ enabled?: boolean | undefined;
37
+ treatNullDataAsZeros?: boolean | undefined;
38
+ connectNulls?: boolean | undefined;
39
+ totalsCalculation?: import("@sisense/sdk-data").TotalsCalculation | undefined;
40
+ dataBars?: boolean | undefined;
41
+ forecast?: import("@sisense/sdk-data").ForecastFormulaOptions | undefined;
42
+ trend?: import("@sisense/sdk-data").TrendFormulaOptions | undefined;
43
+ width?: number | undefined;
44
+ seriesStyleOptions?: import("../chart-data-options/types").SeriesStyleOptions | undefined;
45
+ }[];
46
+ x: import("../chart-data-options/types").Category[];
47
+ breakBy: import("../chart-data-options/types").Category[];
48
+ seriesToColorMap?: import("..").ValueToColorMap | undefined;
49
+ };
50
+ export declare const advancedAnalyticsData: (dataOptions: CartesianChartDataOptionsInternal, dataTable: DataTable) => CartesianChartData;
@@ -58,6 +58,7 @@ export type CartesianChartData = {
58
58
  xAxisCount: number;
59
59
  xValues: CategoricalXValues[];
60
60
  series: CategoricalSeriesValues[];
61
+ seriesOther?: CartesianChartData;
61
62
  };
62
63
  export type CategoricalChartData = {
63
64
  type: 'categorical';
@@ -1,6 +1,6 @@
1
1
  import type { DataColorOptions } from '../chart-data/data-coloring';
2
2
  import type { NumberFormatConfig, SeriesChartType, ValueToColorMap, MultiColumnValueToColorMap, LineWidth, Markers, SortDirection, PivotRowsSort } from '../types';
3
- import { Column, MeasureColumn, CalculatedMeasureColumn, PivotGrandTotals, TotalsCalculation } from '@sisense/sdk-data';
3
+ import { Column, MeasureColumn, CalculatedMeasureColumn, PivotGrandTotals, TotalsCalculation, ForecastFormulaOptions, TrendFormulaOptions } from '@sisense/sdk-data';
4
4
  /**
5
5
  * Styles for a category/column when visualized in a chart
6
6
  *
@@ -50,6 +50,12 @@ export interface CategoryStyle {
50
50
  * Geographic location level for Scattermap chart.
51
51
  */
52
52
  geoLevel?: ScattermapLocationLevel;
53
+ /**
54
+ * Column width. Used in Pivot table.
55
+ *
56
+ * @internal
57
+ */
58
+ width?: number;
53
59
  }
54
60
  /**
55
61
  * Wrapped {@link @sisense/sdk-data!Column | Column} with styles controlling how the column is visualized in a chart.
@@ -127,6 +133,24 @@ export type ValueStyle = {
127
133
  * Boolean flag whether to display data bars for this measure in the pivot table.
128
134
  */
129
135
  dataBars?: boolean;
136
+ /**
137
+ * Options to add forecast to this measure
138
+ *
139
+ * @internal
140
+ */
141
+ forecast?: ForecastFormulaOptions;
142
+ /**
143
+ * Options to add trend to this measure
144
+ *
145
+ * @internal
146
+ */
147
+ trend?: TrendFormulaOptions;
148
+ /**
149
+ * Column width. Used in Pivot table.
150
+ *
151
+ * @internal
152
+ */
153
+ width?: number;
130
154
  };
131
155
  /**
132
156
  * Specific style options to be applied to specific series in Chart.
@@ -145,9 +169,13 @@ export type SeriesStyle = {
145
169
  * Supported only for cartesian and polar charts.
146
170
  */
147
171
  export type SeriesStyleOptions = {
148
- /** @inheritdoc LineStyleOptions.lineWidth */
172
+ /**
173
+ * @inheritdoc LineStyleOptions.lineWidth
174
+ */
149
175
  lineWidth?: LineWidth;
150
- /** @inheritdoc LineStyleOptions.markers */
176
+ /**
177
+ * @inheritdoc LineStyleOptions.markers
178
+ */
151
179
  markers?: Markers;
152
180
  };
153
181
  /**
@@ -491,7 +519,7 @@ export interface RangeChartDataOptions {
491
519
  * Each measure column defines the range of values by specifying a lower and an upper bound,
492
520
  * providing the necessary data to visualize the area range on the chart.
493
521
  */
494
- value: AreaRangeMeasureColumn[];
522
+ value: (CalculatedMeasureColumn | StyledMeasureColumn | AreaRangeMeasureColumn)[];
495
523
  /**
496
524
  * Columns (or attributes) by which to break (group) the data represented in the chart.
497
525
  *
@@ -571,6 +599,7 @@ export interface ScattermapChartDataOptionsInternal {
571
599
  export type RangeChartDataOptionsInternal = {
572
600
  x: Category[];
573
601
  rangeValues: Value[][];
602
+ seriesValues: Value[];
574
603
  breakBy: Category[];
575
604
  y: Value[];
576
605
  seriesToColorMap?: ValueToColorMap | MultiColumnValueToColorMap;
@@ -0,0 +1,24 @@
1
+ import { TFunction } from '@sisense/sdk-common';
2
+ import { SeriesType } from './chart-options-service';
3
+ import { AxisSettings } from './translations/axis-section';
4
+ export declare const FORECAST_PREFIX = "$forecast";
5
+ export declare const TREND_PREFIX = "$trend";
6
+ export declare const isForecastSeries: (name: string) => boolean;
7
+ export declare const isTrendSeries: (name: string) => boolean;
8
+ export declare const rangeTitle: (title: string) => string;
9
+ export declare const formatForecastSeries: (s: SeriesType, lowerSeriesHash: {
10
+ [x: string]: SeriesType;
11
+ }, upperSeriesHash: {
12
+ [x: string]: SeriesType;
13
+ }) => number;
14
+ export declare const formatForecastRangeSeries: (s: SeriesType, seriesHash: {
15
+ [x: string]: SeriesType;
16
+ }) => void;
17
+ export declare const formatForecastAdjustRangeStart: (s: SeriesType, seriesHash: {
18
+ [x: string]: SeriesType;
19
+ }) => void;
20
+ export declare const formatForecastPlotBands: (xAxis: AxisSettings[], forecastStartIndex: number, lastTickIndex: number) => void;
21
+ export declare const formatTrendSeries: (s: SeriesType, seriesHash: {
22
+ [x: string]: SeriesType;
23
+ }, translate: TFunction) => void;
24
+ export declare const formatAdvancedAnalyticsSeries: (series: SeriesType[], translate: TFunction) => void;
@@ -4,6 +4,7 @@ import { ChartType, CompleteThemeSettings } from '../types';
4
4
  import { CartesianChartDataOptionsInternal } from '../chart-data-options/types';
5
5
  import { HighchartsOptionsInternal } from './chart-options-service';
6
6
  import { OptionsWithAlerts } from './../types';
7
+ import { TFunction } from '@sisense/sdk-common';
7
8
  /**
8
9
  * Convert intermediate chart data, data options, and design options
9
10
  * into pure highcharts config data.
@@ -15,4 +16,4 @@ import { OptionsWithAlerts } from './../types';
15
16
  * @param themeSettings -
16
17
  * @param dateFormatter
17
18
  */
18
- export declare const getCartesianChartOptions: (chartData: ChartData, chartType: ChartType, chartDesignOptions: ChartDesignOptions, dataOptions: CartesianChartDataOptionsInternal, themeSettings?: CompleteThemeSettings, dateFormatter?: ((date: Date, format: string) => string) | undefined) => OptionsWithAlerts<HighchartsOptionsInternal>;
19
+ export declare const getCartesianChartOptions: (chartData: ChartData, chartType: ChartType, chartDesignOptions: ChartDesignOptions, dataOptions: CartesianChartDataOptionsInternal, translate: TFunction, themeSettings?: CompleteThemeSettings, dateFormatter?: ((date: Date, format: string) => string) | undefined) => OptionsWithAlerts<HighchartsOptionsInternal>;
@@ -52,7 +52,11 @@ export type SeriesType = HighchartsSeriesValues & {
52
52
  whiskerLength?: number | string;
53
53
  fillOpacity?: number;
54
54
  strokeOpacity?: number;
55
+ enableMouseTracking?: boolean;
55
56
  legendIndex?: number;
57
+ dashStyle?: string;
58
+ lineWidth?: number;
59
+ zIndex?: number;
56
60
  };
57
61
  type ChartPlotOptions = {
58
62
  dataLabels?: ValueLabelSettings;
@@ -73,6 +77,7 @@ type ChartPlotOptions = {
73
77
  opacity?: number;
74
78
  };
75
79
  };
80
+ tooltip?: TooltipSettings;
76
81
  };
77
82
  export type Stacking = 'normal' | 'percent';
78
83
  export type PlotOptions = {
@@ -91,10 +91,10 @@ export type AxisPlotLine = {
91
91
  value: number;
92
92
  };
93
93
  export type AxisPlotBand = {
94
- isPlotBand: boolean;
95
94
  from: number;
96
95
  to: number;
97
- label: {
96
+ color?: string;
97
+ label?: {
98
98
  text: string;
99
99
  y: number;
100
100
  style?: Style;
@@ -14,6 +14,8 @@ export type LegendSettings = {
14
14
  borderWidth?: number;
15
15
  borderColor?: string;
16
16
  backgroundColor?: string;
17
+ itemMarginBottom?: number;
18
+ itemMarginTop?: number;
17
19
  title?: {
18
20
  style?: {
19
21
  [key: string]: string | number;
@@ -34,6 +34,7 @@ export type InternalSeries = {
34
34
  low?: number;
35
35
  q1?: number;
36
36
  q3?: number;
37
+ index?: number;
37
38
  median?: number;
38
39
  name: string;
39
40
  color: string;
@@ -1,3 +1,5 @@
1
1
  import { ChartDataOptionsInternal } from '../../chart-data-options/types';
2
- import { TooltipSettings } from './tooltip-utils';
3
- export declare const getTooltipSettings: (showDecimals: boolean | undefined, chartDataOptions: ChartDataOptionsInternal) => TooltipSettings;
2
+ import { InternalSeries, TooltipSettings } from './tooltip-utils';
3
+ import { TFunction } from '@sisense/sdk-common';
4
+ export declare const cartesianDataFormatter: (that: InternalSeries, showDecimals: boolean | undefined, chartDataOptions: ChartDataOptionsInternal, translate?: TFunction) => string;
5
+ export declare const getTooltipSettings: (showDecimals: boolean | undefined, chartDataOptions: ChartDataOptionsInternal, translate?: TFunction) => TooltipSettings;
@@ -29,6 +29,20 @@ export declare const LoadingIndicator: ({ themeSettings, onCancel, }: {
29
29
  primaryButtonTextColor: string;
30
30
  primaryButtonHoverColor: string;
31
31
  };
32
+ widget: {
33
+ spaceAround: import("../../types").SpaceSizes;
34
+ cornerRadius: import("../../types").RadiusSizes;
35
+ shadow: import("../../types").ShadowsTypes;
36
+ border: boolean;
37
+ borderColor: string;
38
+ header: {
39
+ titleTextColor: string;
40
+ titleAlignment: import("../../types").AlignmentTypes;
41
+ dividerLine: boolean;
42
+ dividerLineColor: string;
43
+ backgroundColor: string;
44
+ };
45
+ };
32
46
  aiChat: {
33
47
  backgroundColor: string;
34
48
  primaryTextColor: string;
@@ -0,0 +1,30 @@
1
+ import { CascadingFilter, Filter } from '@sisense/sdk-data';
2
+ import { FiltersIgnoringRules, PureFilter } from './types';
3
+ /**
4
+ * Flattens cascading filters into a single array of filters.
5
+ */
6
+ export declare function flattenCascadingFilters(filters: Filter[]): {
7
+ flatFilters: PureFilter[];
8
+ cascadingToPureFiltersMap: Record<string, PureFilter[]>;
9
+ };
10
+ /**
11
+ * Reassembles flattened filters back into cascading filters based on original cascading filters.
12
+ *
13
+ * @param updatedFilters - Updated pure filters to reassemble.
14
+ * @param originalFilters - Original filters with maybe cascading filters.
15
+ * @returns reassembled filters.
16
+ */
17
+ export declare function reassembleCascadingFilters(updatedFilters: PureFilter[], originalFilters: (PureFilter | CascadingFilter)[]): (PureFilter | CascadingFilter)[];
18
+ /**
19
+ * Converts cascading filters to pure filters and vice versa.
20
+ *
21
+ * @param complexFilters - all filters, including cascading filters.
22
+ * @param updateComplexFilters - a function to update complex filters.
23
+ * @param complexFiltersIgnoringRules - filters ignoring rules for complex filters.
24
+ * @returns converted pure filters and a decorated filters updater.
25
+ */
26
+ export declare function withCascadingFiltersConversion(complexFilters: (PureFilter | CascadingFilter)[], updateComplexFilters: (filters: (PureFilter | CascadingFilter)[]) => void, complexFiltersIgnoringRules: FiltersIgnoringRules): {
27
+ pureFilters: PureFilter[];
28
+ updateFilters: (filters: PureFilter[]) => void;
29
+ pureFiltersIgnoringRules: FiltersIgnoringRules;
30
+ };
@@ -5,5 +5,11 @@ import { WidgetTypeInternal } from '../models/widget/types';
5
5
  type CommonFiltersToWidgetConnectProps = Pick<ChartWidgetProps, 'filters' | 'highlights' | 'onDataPointClick' | 'onDataPointsSelected'> & {
6
6
  renderToolbar: RenderToolbarHandler;
7
7
  };
8
- export declare function prepareCommonFiltersToWidgetConnectProps(filters: Filter[], setFilters: (filters: Filter[]) => void, widgetType: WidgetTypeInternal, dataOptions: ChartDataOptions | PivotTableDataOptions, options: CommonFiltersOptions): CommonFiltersToWidgetConnectProps;
8
+ /**
9
+ * Prepares common filters to be used in widget connect props
10
+ *
11
+ * @param filters - Pure filters (non-cascading)
12
+ * @param setFilters - Function to set updated pure filters (non-cascading)
13
+ */
14
+ export declare function prepareCommonFiltersToWidgetConnectProps(commonFilters: Filter[], updateCommonFilters: (filters: Filter[]) => void, widgetType: WidgetTypeInternal, dataOptions: ChartDataOptions | PivotTableDataOptions, options: CommonFiltersOptions): CommonFiltersToWidgetConnectProps;
9
15
  export {};
@@ -1,3 +1,4 @@
1
+ import { CascadingFilter, Filter } from '@sisense/sdk-data';
1
2
  import { DeepRequired } from 'ts-essentials';
2
3
  /** @internal */
3
4
  export declare enum CommonFiltersApplyMode {
@@ -8,11 +9,15 @@ export declare enum CommonFiltersApplyMode {
8
9
  export type CommonFiltersOptions = {
9
10
  applyMode?: `${CommonFiltersApplyMode}`;
10
11
  shouldAffectFilters?: boolean;
11
- ignoreFilters?: {
12
- all?: boolean;
13
- ids?: string[];
14
- };
12
+ ignoreFilters?: FiltersIgnoringRules;
15
13
  forceApplyBackgroundFilters?: boolean;
16
14
  };
17
15
  /** @internal */
16
+ export type FiltersIgnoringRules = {
17
+ all?: boolean;
18
+ ids?: string[];
19
+ };
20
+ /** @internal */
18
21
  export type CompleteCommonFiltersOptions = DeepRequired<CommonFiltersOptions>;
22
+ /** Filters that are real pure simple filters (non-cascading filters) */
23
+ export type PureFilter<F extends Filter = Filter> = F extends CascadingFilter ? never : F;
@@ -1,9 +1,10 @@
1
1
  import { Filter, Attribute } from '@sisense/sdk-data';
2
- import { CommonFiltersOptions } from './types.js';
3
- export declare function getAllowedFilters(filters: Filter[], ignoreFiltersOptions?: CommonFiltersOptions['ignoreFilters']): Filter[];
2
+ import { FiltersIgnoringRules, PureFilter } from './types.js';
3
+ export declare function getAllowedFilters(filters: PureFilter[], ignoreFiltersOptions: FiltersIgnoringRules): Filter[];
4
4
  export declare function isSameAttribute(attributeA: Attribute, attributeB: Attribute): boolean;
5
5
  export declare function getFilterByAttribute(filters: Filter[], attribute: Attribute): Filter | undefined;
6
6
  export declare function createCommonFilter(attribute: Attribute, members: (string | number)[], existingCommonFilters: Filter[]): Filter;
7
+ export declare function haveSameAttribute(filterA: Filter, filterB: Filter): boolean;
7
8
  export declare function isEqualMembersFilters(filterA: Filter, filterB: Filter): boolean;
8
9
  export declare function isIncludeAllFilter(filter: Filter): boolean;
9
10
  export declare function clearCommonFilter(filter: Filter): Filter;
@@ -2,6 +2,8 @@ import { DashboardByIdProps } from './types';
2
2
  /**
3
3
  * React component that renders a dashboard created in Sisense Fusion Embed
4
4
  *
5
+ * **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
6
+ *
5
7
  * @internal
6
8
  */
7
9
  export declare const DashboardById: ({ dashboardOid }: DashboardByIdProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,6 +3,8 @@ import { DashboardProps } from '../dashboard/types';
3
3
  * React component that renders a dashboard
4
4
  * Include inside logic of applying common filters to widgets
5
5
  *
6
+ * **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
7
+ *
6
8
  * @internal
7
9
  */
8
- export declare const Dashboard: ({ title, layout, widgets, filters, defaultDataSource, widgetFilterOptions, }: DashboardProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const Dashboard: ({ title, layout, widgets, filters, defaultDataSource, widgetFilterOptions, styleOptions, }: DashboardProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { Layout, WidgetFilterOptions, WidgetModel } from '../models';
1
+ import { DashboardStyleOptions, Layout, WidgetFilterOptions, WidgetModel } from '../models';
2
2
  import { DataSource, Filter } from '@sisense/sdk-data';
3
3
  /**
4
4
  * Props for the DashboardById component
@@ -33,6 +33,7 @@ export interface DashboardProps {
33
33
  filters: Filter[];
34
34
  defaultDataSource?: DataSource;
35
35
  widgetFilterOptions?: WidgetFilterOptions;
36
+ styleOptions: DashboardStyleOptions;
36
37
  }
37
38
  /**
38
39
  * Props for the Dashboard Header component
@@ -7,6 +7,8 @@ import { DashboardWidgetProps } from '../props';
7
7
  * To learn more about using Sisense Fusion Widgets in Compose SDK,
8
8
  * see [Sisense Fusion Widgets](/guides/sdk/guides/charts/guide-fusion-widgets.html).
9
9
  *
10
+ * **Note:** Widget extensions based on JS scripts and add-ons in Fusion are not supported.
11
+ *
10
12
  * ## Example
11
13
  *
12
14
  * Display two dashboard widgets from a Fusion Embed instance.
@@ -2,7 +2,7 @@ import { DimensionalBaseMeasure, DimensionalAttribute, DimensionalCalculatedMeas
2
2
  import { StyledMeasureColumn, StyledColumn, Color } from '../types';
3
3
  import { Panel, PanelItem, WidgetType, WidgetStyle, BoxplotWidgetStyle } from './types';
4
4
  import { WidgetDataOptions } from '../models';
5
- export declare function createDimensionalElementFromJaql(jaql: Jaql, format?: PanelItem['format']): import("@sisense/sdk-data").Filter | DimensionalCalculatedMeasure | DimensionalAttribute | DimensionalBaseMeasure;
5
+ export declare function createDimensionalElementFromJaql(jaql: Jaql, format?: PanelItem['format']): import("@sisense/sdk-data").Filter | DimensionalAttribute | DimensionalCalculatedMeasure | DimensionalBaseMeasure;
6
6
  export declare function createDataColumn(item: PanelItem, customPaletteColors?: Color[]): StyledMeasureColumn | StyledColumn;
7
7
  /** @internal */
8
8
  export declare const createDataOptionsFromPanels: (panels: Panel[], variantColors: Color[]) => {
@@ -1,6 +1,15 @@
1
- import { ChartStyleOptions, TableStyleOptions, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, GaugeIndicatorStyleOptions, PivotTableStyleOptions } from '../types';
2
- import { Panel, WidgetStyle, WidgetSubtype, WidgetType, TableWidgetStyle, IndicatorWidgetStyle, PivotWidgetStyle } from './types';
1
+ import { ChartStyleOptions, TableStyleOptions, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, GaugeIndicatorStyleOptions, PivotTableStyleOptions, WidgetStyleOptions } from '../types';
2
+ import { Panel, WidgetStyle, WidgetSubtype, WidgetType, TableWidgetStyle, IndicatorWidgetStyle, PivotWidgetStyle, WidgetDesign } 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
5
  export declare function extractPivotTableStyleOptions(widgetStyle: PivotWidgetStyle): PivotTableStyleOptions;
6
6
  export declare function extractStyleOptions<WType extends WidgetType>(widgetType: WType, widgetSubtype: WidgetSubtype, style: WidgetStyle, panels: Panel[]): ChartStyleOptions | TableStyleOptions;
7
+ /**
8
+ * Merges the widget style with the widget design
9
+ *
10
+ * @param widgetStyle - The widget style
11
+ * @param widgetDesign - The widget design
12
+ * @param isWidgetDesignStyleEnabled - The flag to enable the widget design style
13
+ * @returns The merged widget style
14
+ */
15
+ export declare function getStyleWithWigetDesign(widgetStyle: ChartStyleOptions | TableStyleOptions, widgetDesign?: WidgetDesign, isWidgetDesignStyleEnabled?: boolean): WidgetStyleOptions;
@@ -1,3 +1,5 @@
1
+ import { WidgetContainerStyleOptions } from '../types';
2
+ import { LEGACY_DESIGN_TYPES } from './../themes/legacy-design-settings';
1
3
  import { Jaql, JaqlSortDirection } from '@sisense/sdk-data';
2
4
  /**
3
5
  * The type of a widget on a dashboard that is a variant of Cartesian widget.
@@ -51,6 +53,19 @@ export interface WidgetDto {
51
53
  selector: boolean;
52
54
  };
53
55
  }
56
+ export type WidgetDesign = {
57
+ widgetBackgroundColor: string;
58
+ widgetSpacing: keyof typeof LEGACY_DESIGN_TYPES;
59
+ widgetCornerRadius: keyof typeof LEGACY_DESIGN_TYPES;
60
+ widgetShadow: keyof typeof LEGACY_DESIGN_TYPES;
61
+ widgetBorderEnabled: boolean;
62
+ widgetBorderColor: string;
63
+ widgetTitleColor: string;
64
+ widgetTitleAlignment: keyof typeof LEGACY_DESIGN_TYPES;
65
+ widgetTitleDividerEnabled: boolean;
66
+ widgetTitleDividerColor: string;
67
+ widgetTitleBackgroundColor: string;
68
+ };
54
69
  export type FiltersIgnoringRules = {
55
70
  dimensions?: string[];
56
71
  ids: string[];
@@ -105,6 +120,7 @@ export type PanelItem = {
105
120
  members?: PanelMembersFormat;
106
121
  subtotal?: boolean;
107
122
  databars?: boolean;
123
+ width?: number;
108
124
  };
109
125
  jaql: Jaql;
110
126
  disabled?: boolean;
@@ -185,7 +201,7 @@ type BaseWidgetStyle = {
185
201
  enabled: boolean;
186
202
  };
187
203
  };
188
- export type CartesianWidgetStyle = BaseWidgetStyle & {
204
+ export type CartesianWidgetStyle = BaseWidgetStyle & WidgetContainerStyleOptions & {
189
205
  seriesLabels: LabelsStyle;
190
206
  xAxis: AxisStyle & {
191
207
  x2Title?: AxisTitleStyle;
@@ -201,7 +217,7 @@ export type CartesianWidgetStyle = BaseWidgetStyle & {
201
217
  fill: string;
202
218
  };
203
219
  };
204
- export type PolarWidgetStyle = BaseWidgetStyle & {
220
+ export type PolarWidgetStyle = BaseWidgetStyle & WidgetContainerStyleOptions & {
205
221
  categories?: AxisStyle;
206
222
  axis?: AxisStyle;
207
223
  };
@@ -210,12 +226,12 @@ type ScatterMarkerSize = {
210
226
  min: number;
211
227
  max: number;
212
228
  };
213
- export type ScatterWidgetStyle = BaseWidgetStyle & {
229
+ export type ScatterWidgetStyle = BaseWidgetStyle & WidgetContainerStyleOptions & {
214
230
  xAxis: AxisStyle;
215
231
  yAxis: AxisStyle;
216
232
  markerSize?: ScatterMarkerSize;
217
233
  };
218
- export type FunnelWidgetStyle = BaseWidgetStyle & {
234
+ export type FunnelWidgetStyle = BaseWidgetStyle & WidgetContainerStyleOptions & {
219
235
  size: string;
220
236
  type: string;
221
237
  direction: string;
@@ -233,7 +249,7 @@ export type TableWidgetStyle = {
233
249
  'colors/headers': boolean;
234
250
  'colors/rows': boolean;
235
251
  };
236
- export type IndicatorWidgetStyle = {
252
+ export type IndicatorWidgetStyle = WidgetContainerStyleOptions & {
237
253
  'indicator/gauge': {
238
254
  subtype: string;
239
255
  skin: string;
@@ -309,7 +325,7 @@ export type SunburstWidgetStyle = {
309
325
  'tooltip/contribution': boolean;
310
326
  'tooltip/value': boolean;
311
327
  };
312
- export type BoxplotWidgetStyle = {
328
+ export type BoxplotWidgetStyle = WidgetContainerStyleOptions & {
313
329
  xAxis: AxisStyle;
314
330
  yAxis: AxisStyle;
315
331
  whisker: {
@@ -321,7 +337,7 @@ export type BoxplotWidgetStyle = {
321
337
  enabled: boolean;
322
338
  };
323
339
  };
324
- export type ScattermapWidgetStyle = {
340
+ export type ScattermapWidgetStyle = WidgetContainerStyleOptions & {
325
341
  markers: {
326
342
  fill: 'filled' | 'filled-light' | 'hollow' | 'hollow-bold';
327
343
  size: {
@@ -333,7 +349,9 @@ export type ScattermapWidgetStyle = {
333
349
  };
334
350
  /** Currently, WidgetStyle for areamap is an empty object */
335
351
  export type AreamapWidgetStyle = {};
336
- export type WidgetStyle = CartesianWidgetStyle | PolarWidgetStyle | FunnelWidgetStyle | ScatterWidgetStyle | TableWidgetStyle | IndicatorWidgetStyle | TreemapWidgetStyle | SunburstWidgetStyle | BoxplotWidgetStyle | ScattermapWidgetStyle | AreamapWidgetStyle | PivotWidgetStyle;
352
+ export type WidgetStyle = {
353
+ widgetDesign?: WidgetDesign;
354
+ } & (CartesianWidgetStyle | PolarWidgetStyle | FunnelWidgetStyle | ScatterWidgetStyle | TableWidgetStyle | IndicatorWidgetStyle | TreemapWidgetStyle | SunburstWidgetStyle | BoxplotWidgetStyle | ScattermapWidgetStyle | AreamapWidgetStyle | PivotWidgetStyle);
337
355
  export declare enum FiltersMergeStrategyEnum {
338
356
  WIDGET_FIRST = "widgetFirst",
339
357
  CODE_FIRST = "codeFirst",
@@ -19,6 +19,14 @@ export declare function getRootPanelItem(item: PanelItem): PanelItem;
19
19
  * @internal
20
20
  */
21
21
  export declare function getSortType(jaqlSort: `${JaqlSortDirection}` | undefined): SortDirection;
22
+ /**
23
+ * Gets a unique identifier for a filter, combining its attribute expression and granularity if available.
24
+ *
25
+ * @param {Filter} filter - The filter object to generate the unique identifier for.
26
+ * @returns {string} - The unique identifier for the filter.
27
+ * @internal
28
+ */
29
+ export declare function getFilterCompareId(filter: Filter): string;
22
30
  /**
23
31
  * Merges two arrays of filter objects, prioritizing 'targetFilters' over 'sourceFilters',
24
32
  * and removes duplicates based on filter compare id.
@@ -32,6 +32,7 @@ export type DateRangeFilterProps = {
32
32
  * To be compatible with the old DateRangeFilterTile.
33
33
  *
34
34
  * TODO: Remove this prop when the old DateRangeFilterTile is deprecated.
35
+ *
35
36
  * @internal
36
37
  * @default 'grey'
37
38
  */