@sisense/sdk-ui 1.15.1 → 1.17.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 (113) hide show
  1. package/dist/ai.cjs +50 -50
  2. package/dist/ai.js +133 -132
  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/client-application.d.ts +22 -2
  21. package/dist/app/settings/settings.d.ts +5 -0
  22. package/dist/app/settings/types/features.d.ts +6 -0
  23. package/dist/chart/advanced-chart.d.ts +7 -0
  24. package/dist/chart-data/advanced-analytics-data.d.ts +50 -0
  25. package/dist/chart-data/types.d.ts +2 -1
  26. package/dist/chart-data-options/types.d.ts +35 -4
  27. package/dist/chart-data-processor/table-processor.d.ts +1 -1
  28. package/dist/chart-options-processor/advanced-chart-options.d.ts +24 -0
  29. package/dist/chart-options-processor/cartesian-chart-options.d.ts +2 -1
  30. package/dist/chart-options-processor/chart-options-service.d.ts +5 -0
  31. package/dist/chart-options-processor/common-highcharts-option-service.d.ts +2 -1
  32. package/dist/chart-options-processor/translations/axis-section.d.ts +2 -2
  33. package/dist/chart-options-processor/translations/legend-section.d.ts +2 -0
  34. package/dist/chart-options-processor/translations/tooltip-utils.d.ts +1 -0
  35. package/dist/chart-options-processor/translations/tooltip.d.ts +4 -2
  36. package/dist/charts/map-charts/scattermap/utils/map.d.ts +6 -2
  37. package/dist/charts/map-charts/scattermap/utils/markers.d.ts +1 -1
  38. package/dist/charts/table/data-table-wrapper.d.ts +1 -1
  39. package/dist/charts/table/helpers/calc-column-widths.d.ts +1 -1
  40. package/dist/charts/table/types.d.ts +0 -1
  41. package/dist/common/components/loading-indicator.d.ts +27 -0
  42. package/dist/common/hooks/use-has-changed.d.ts +1 -1
  43. package/dist/common/hooks/use-tracking.d.ts +7 -0
  44. package/dist/common-filters/cascading-utils.d.ts +30 -0
  45. package/dist/common-filters/common-filters-connector.d.ts +7 -1
  46. package/dist/common-filters/selection-utils.d.ts +1 -1
  47. package/dist/common-filters/types.d.ts +17 -6
  48. package/dist/common-filters/utils.d.ts +2 -5
  49. package/dist/dashboard/dashboard-by-id.d.ts +8 -3
  50. package/dist/dashboard/dashboard.d.ts +8 -4
  51. package/dist/dashboard/index.d.ts +1 -1
  52. package/dist/dashboard/types.d.ts +13 -7
  53. package/dist/dashboard-widget/dashboard-widget.d.ts +2 -0
  54. package/dist/dashboard-widget/translate-widget-data-options.d.ts +1 -1
  55. package/dist/dashboard-widget/translate-widget-drilldown-options.d.ts +2 -2
  56. package/dist/dashboard-widget/translate-widget-style-options.d.ts +11 -2
  57. package/dist/dashboard-widget/types.d.ts +29 -8
  58. package/dist/dashboard-widget/utils.d.ts +8 -0
  59. package/dist/decorators/component-decorators/with-tracking/error-tracker.d.ts +3 -0
  60. package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +1 -0
  61. package/dist/filters/components/filters-panel/filters-panel.d.ts +2 -1
  62. package/dist/get-widget-options-D4UHj7o5.cjs +198 -0
  63. package/dist/get-widget-options-D88MkBTJ.js +37924 -0
  64. package/dist/index.cjs +183 -208
  65. package/dist/index.d.ts +3 -3
  66. package/dist/index.js +20621 -24251
  67. package/dist/models/dashboard/dashboard-model.d.ts +10 -2
  68. package/dist/models/dashboard/get-dashboard-model.d.ts +13 -2
  69. package/dist/models/dashboard/types.d.ts +21 -2
  70. package/dist/models/dashboard/use-get-dashboard-model.d.ts +2 -0
  71. package/dist/models/dashboard/use-get-dashboard-models.d.ts +2 -0
  72. package/dist/models/widget/get-widget-model.d.ts +13 -2
  73. package/dist/models/widget/translate-widget.d.ts +10 -1
  74. package/dist/models/widget/use-get-widget-model.d.ts +2 -0
  75. package/dist/models/widget/widget-model.d.ts +5 -3
  76. package/dist/pivot-table/helpers/prepare-pivot-styling-props.d.ts +16 -15
  77. package/dist/pivot-table/{use-apply-pivot-table-formatting.d.ts → hooks/use-apply-pivot-table-formatting.d.ts} +1 -1
  78. package/dist/pivot-table/{use-get-pivot-table-query.d.ts → hooks/use-get-pivot-table-query.d.ts} +4 -8
  79. package/dist/pivot-table/hooks/use-pivot-data-loading.d.ts +15 -0
  80. package/dist/pivot-table/hooks/use-pivot-data-service.d.ts +10 -0
  81. package/dist/pivot-table/{use-pivot-table-data-options-internal.d.ts → hooks/use-pivot-table-data-options-internal.d.ts} +2 -2
  82. package/dist/pivot-table/hooks/use-render-pivot.d.ts +24 -0
  83. package/dist/pivot-table/pivot-table.d.ts +2 -2
  84. package/dist/props.d.ts +45 -10
  85. package/dist/query-execution/execute-query-by-widget-id.d.ts +2 -0
  86. package/dist/query-execution/index.d.ts +1 -1
  87. package/dist/query-execution/types.d.ts +11 -2
  88. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +5 -5
  89. package/dist/sisense-context/sisense-context.d.ts +2 -0
  90. package/dist/theme-provider/default-theme-settings.d.ts +2 -0
  91. package/dist/themes/legacy-design-settings.d.ts +14 -0
  92. package/dist/translation/resources/en.d.ts +9 -0
  93. package/dist/translation/resources/index.d.ts +18 -0
  94. package/dist/types.d.ts +89 -9
  95. package/dist/useQuery-C6PPvTP0.js +43462 -0
  96. package/dist/useQuery-ChZNmTT3.cjs +433 -0
  97. package/dist/utils/color/color-interpolation.d.ts +9 -0
  98. package/dist/utils/combine-handlers.d.ts +3 -0
  99. package/dist/utils/filters.d.ts +14 -0
  100. package/dist/widgets/common/drilldown-connector.d.ts +19 -0
  101. package/dist/widgets/common/{custom-drilldown.d.ts → use-drilldown.d.ts} +7 -3
  102. package/dist/widgets/common/widget-container.d.ts +2 -2
  103. package/dist/widgets/common/widget-header-info-button.d.ts +2 -2
  104. package/dist/widgets/common/widget-header.d.ts +2 -2
  105. package/dist/widgets/common/widget-style-utils.d.ts +5 -4
  106. package/dist/widgets/use-highlight-selection.d.ts +10 -0
  107. package/package.json +18 -9
  108. package/dist/filters/utils.d.ts +0 -7
  109. package/dist/useQuery-B-49RH93.js +0 -76791
  110. package/dist/useQuery-C2MQvc4S.cjs +0 -603
  111. package/dist/widgets/chart-widget-deprecated.d.ts +0 -30
  112. package/dist/widgets/common/drilldown.d.ts +0 -25
  113. package/dist/widgets/common/use-widget-drilldown.d.ts +0 -2
@@ -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,11 +1,12 @@
1
1
  import { HttpClient, Authenticator } from '@sisense/sdk-rest-client';
2
2
  import { QueryClient } from '@sisense/sdk-query-client';
3
3
  import { DataSource } from '@sisense/sdk-data';
4
- import { SisenseContextProviderProps } from '../props';
5
4
  import { DateConfig } from '../query/date-formats';
6
5
  import { AppSettings } from './settings/settings';
7
6
  import { PivotClient } from '@sisense/sdk-pivot-client';
8
7
  import { LoadingIndicatorConfig } from '../types';
8
+ import { TrackingEventDetails } from '@sisense/sdk-tracking';
9
+ import { SisenseContextProviderProps } from '../props';
9
10
  /**
10
11
  * Application configuration
11
12
  */
@@ -75,6 +76,23 @@ export type AppConfig = {
75
76
  */
76
77
  alwaysShowErrorText?: boolean;
77
78
  };
79
+ /**
80
+ * Tracking configuration
81
+ */
82
+ trackingConfig?: {
83
+ /**
84
+ * Whether to enable tracking
85
+ *
86
+ * If not specified, the default value is `true`
87
+ *
88
+ * @internal
89
+ */
90
+ enabled?: boolean;
91
+ /**
92
+ * Callback to be invoked when tracking event occurs
93
+ */
94
+ onTrackingEvent?: (payload: TrackingEventDetails) => void;
95
+ };
78
96
  };
79
97
  /**
80
98
  * Stands for a Sisense Client Application which connects to a Sisense Environment
@@ -120,5 +138,7 @@ export declare class ClientApplication {
120
138
  */
121
139
  constructor(url: string, auth: Authenticator, defaultDataSource?: DataSource);
122
140
  }
141
+ type ClientApplicationParams = Pick<SisenseContextProviderProps, 'appConfig' | 'defaultDataSource' | 'url' | 'token' | 'wat' | 'ssoEnabled' | 'enableSilentPreAuth'>;
123
142
  /** @internal */
124
- export declare const createClientApplication: ({ defaultDataSource, url, token, wat, ssoEnabled, appConfig, enableSilentPreAuth, }: SisenseContextProviderProps) => Promise<ClientApplication>;
143
+ export declare const createClientApplication: ({ defaultDataSource, url, token, wat, ssoEnabled, appConfig, enableSilentPreAuth, }: ClientApplicationParams) => Promise<ClientApplication>;
144
+ export {};
@@ -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';
@@ -91,7 +92,7 @@ export type ScattermapChartLocation = {
91
92
  value: number;
92
93
  colorValue?: number;
93
94
  details?: number | string[];
94
- blur: boolean;
95
+ blur?: boolean;
95
96
  coordinates?: Coordinates;
96
97
  };
97
98
  export type ScattermapChartData = {
@@ -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,14 @@ 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;
59
+ /** {@inheritDoc DataColorOptions} */
60
+ color?: DataColorOptions;
53
61
  }
54
62
  /**
55
63
  * Wrapped {@link @sisense/sdk-data!Column | Column} with styles controlling how the column is visualized in a chart.
@@ -127,6 +135,24 @@ export type ValueStyle = {
127
135
  * Boolean flag whether to display data bars for this measure in the pivot table.
128
136
  */
129
137
  dataBars?: boolean;
138
+ /**
139
+ * Options to add forecast to this measure
140
+ *
141
+ * @internal
142
+ */
143
+ forecast?: ForecastFormulaOptions;
144
+ /**
145
+ * Options to add trend to this measure
146
+ *
147
+ * @internal
148
+ */
149
+ trend?: TrendFormulaOptions;
150
+ /**
151
+ * Column width. Used in Pivot table.
152
+ *
153
+ * @internal
154
+ */
155
+ width?: number;
130
156
  };
131
157
  /**
132
158
  * Specific style options to be applied to specific series in Chart.
@@ -145,9 +171,13 @@ export type SeriesStyle = {
145
171
  * Supported only for cartesian and polar charts.
146
172
  */
147
173
  export type SeriesStyleOptions = {
148
- /** @inheritdoc LineStyleOptions.lineWidth */
174
+ /**
175
+ * @inheritdoc
176
+ */
149
177
  lineWidth?: LineWidth;
150
- /** @inheritdoc LineStyleOptions.markers */
178
+ /**
179
+ * @inheritdoc
180
+ */
151
181
  markers?: Markers;
152
182
  };
153
183
  /**
@@ -491,7 +521,7 @@ export interface RangeChartDataOptions {
491
521
  * Each measure column defines the range of values by specifying a lower and an upper bound,
492
522
  * providing the necessary data to visualize the area range on the chart.
493
523
  */
494
- value: AreaRangeMeasureColumn[];
524
+ value: (CalculatedMeasureColumn | StyledMeasureColumn | AreaRangeMeasureColumn)[];
495
525
  /**
496
526
  * Columns (or attributes) by which to break (group) the data represented in the chart.
497
527
  *
@@ -571,6 +601,7 @@ export interface ScattermapChartDataOptionsInternal {
571
601
  export type RangeChartDataOptionsInternal = {
572
602
  x: Category[];
573
603
  rangeValues: Value[][];
604
+ seriesValues: Value[];
574
605
  breakBy: Category[];
575
606
  y: Value[];
576
607
  seriesToColorMap?: ValueToColorMap | MultiColumnValueToColorMap;
@@ -68,7 +68,7 @@ export declare const filterBy: (table: DataTable, filterColumns: Column[], filte
68
68
  rows: Row[];
69
69
  };
70
70
  export declare const getValue: (row: Row, column: Column) => Value | undefined;
71
- export declare const isBlurred: (row: Row, column: Column) => boolean;
71
+ export declare const isBlurred: (row: Row, column: Column) => boolean | undefined;
72
72
  export declare const getValues: (row: Row, columns: readonly Column[]) => ComparableData[];
73
73
  export declare const getValuesAsString: (row: Row, columns: readonly Column[]) => string;
74
74
  export declare const getIndexedRows: (rows: readonly Row[], indexColumns: Column[]) => IndexedRows;
@@ -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 = {
@@ -1,4 +1,5 @@
1
+ import { CompleteThemeSettings } from '..';
1
2
  import { HighchartsOptionsInternal } from './chart-options-service';
2
3
  export declare const DEFAULT_ANIMATION_DURATION_MS_INIT = 600;
3
4
  export declare const DEFAULT_ANIMATION_DURATION_MS_UPDATE = 300;
4
- export declare const applyCommonHighchartsOptions: (chartOptions: HighchartsOptionsInternal, accessibilityEnabled: boolean) => HighchartsOptionsInternal;
5
+ export declare const applyCommonHighchartsOptions: (chartOptions: HighchartsOptionsInternal, themeSettings: CompleteThemeSettings, accessibilityEnabled: boolean) => HighchartsOptionsInternal;
@@ -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;
@@ -1,2 +1,6 @@
1
- import leaflet from 'leaflet';
2
- export declare function fitMapToBounds(map: leaflet.Map, markers: leaflet.CircleMarker[]): void;
1
+ import { CompleteThemeSettings } from '../../../../index';
2
+ import leaflet, { type FitBoundsOptions } from 'leaflet';
3
+ type FitBoundsAnimationOptions = Pick<FitBoundsOptions, 'animate' | 'duration'>;
4
+ export declare function prepareFitBoundsAnimationOptions(themeSettings: CompleteThemeSettings): FitBoundsAnimationOptions;
5
+ export declare function fitMapToBounds(map: leaflet.Map, markers: leaflet.CircleMarker[], options?: FitBoundsOptions): void;
6
+ export {};
@@ -4,7 +4,7 @@ type MarkerStyle = {
4
4
  color: string;
5
5
  size: number;
6
6
  fill: Required<ScattermapMarkers>['fill'];
7
- blur: boolean;
7
+ blur?: boolean;
8
8
  };
9
9
  export type MarkerConfig = {
10
10
  coordinates: {
@@ -1,2 +1,2 @@
1
1
  import { DataTableWrapperProps } from './types';
2
- export declare const DataTableWrapper: ({ dataTable, dataOptions, isLoading, height, width, customStyles, themeSettings, onSortUpdate, }: DataTableWrapperProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const DataTableWrapper: ({ dataTable, dataOptions, height, width, customStyles, themeSettings, onSortUpdate, }: DataTableWrapperProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { DataTable } from '../../../chart-data-processor/table-processor';
2
- export declare const calcColumnWidths: (dataTable: DataTable, isLoading: boolean, isShowFieldTypeIcon: boolean, columnsOptions: {
2
+ export declare const calcColumnWidths: (dataTable: DataTable, isShowFieldTypeIcon: boolean, columnsOptions: {
3
3
  isHtml: boolean;
4
4
  width?: number;
5
5
  }[], fontFamily?: string) => number[];
@@ -44,7 +44,6 @@ export type TableProps = {
44
44
  export type DataTableWrapperProps = {
45
45
  dataTable: DataTable;
46
46
  dataOptions: TableDataOptionsInternal;
47
- isLoading: boolean;
48
47
  height: number;
49
48
  width: number;
50
49
  customStyles?: TableCustomStyles;
@@ -14,6 +14,14 @@ export declare const LoadingIndicator: ({ themeSettings, onCancel, }: {
14
14
  secondaryTextColor: string;
15
15
  backgroundColor: string;
16
16
  panelBackgroundColor: string;
17
+ animation: {
18
+ init: {
19
+ duration: number | "auto";
20
+ };
21
+ redraw: {
22
+ duration: number | "auto";
23
+ };
24
+ };
17
25
  };
18
26
  palette: {
19
27
  variantColors: import("../../types").Color[];
@@ -29,6 +37,25 @@ export declare const LoadingIndicator: ({ themeSettings, onCancel, }: {
29
37
  primaryButtonTextColor: string;
30
38
  primaryButtonHoverColor: string;
31
39
  };
40
+ widget: {
41
+ spaceAround: import("../../types").SpaceSizes;
42
+ cornerRadius: import("../../types").RadiusSizes;
43
+ shadow: import("../../types").ShadowsTypes;
44
+ border: boolean;
45
+ borderColor: string;
46
+ header: {
47
+ titleTextColor: string;
48
+ titleAlignment: import("../../types").AlignmentTypes;
49
+ dividerLine: boolean;
50
+ dividerLineColor: string;
51
+ backgroundColor: string;
52
+ };
53
+ };
54
+ dashboard: {
55
+ backgroundColor: string;
56
+ dividerLineWidth: number;
57
+ dividerLineColor: string;
58
+ };
32
59
  aiChat: {
33
60
  backgroundColor: string;
34
61
  primaryTextColor: string;
@@ -6,4 +6,4 @@
6
6
  * @param [compare] - Optional comparison function
7
7
  * @returns Has the value changed or not.
8
8
  */
9
- export declare function useHasChanged<T>(value: T, propNames: Array<keyof T>, compare?: (value: T, prev: T) => boolean): boolean;
9
+ export declare function useHasChanged<T>(value: T, propNames?: Array<keyof T>, compare?: (value: T, prev: T) => boolean): boolean;
@@ -0,0 +1,7 @@
1
+ import { HttpClient } from '@sisense/sdk-rest-client';
2
+ import { ErrorEventOptions, TrackingEventType, TrackingEventDetails } from '@sisense/sdk-tracking';
3
+ export declare const executeTracking: (eventType: TrackingEventType, eventPayload: TrackingEventDetails, httpClient: HttpClient, onTrackingEvent?: ((payload: TrackingEventDetails) => void) | undefined, isDebugMode?: boolean) => Promise<void>;
4
+ export declare const useTracking: () => {
5
+ trackEvent: (eventType: TrackingEventType, eventPayload?: TrackingEventDetails, isDebugMode?: boolean) => Promise<void>;
6
+ trackError: (options: ErrorEventOptions, isDebugMode?: boolean) => Promise<void>;
7
+ };
@@ -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 {};
@@ -7,5 +7,5 @@ type WidgetSelection = {
7
7
  };
8
8
  export declare function getWidgetSelections(widgetType: WidgetTypeInternal, dataOptions: ChartDataOptions | PivotTableDataOptions, points: Array<DataPoint | ScatterDataPoint | ScattermapDataPoint | AreamapDataPoint>, nativeEvent: MouseEvent | PointerEvent): WidgetSelection[];
9
9
  export declare function getSelectableWidgetAttributes(widgetType: WidgetTypeInternal, dataOptions: ChartDataOptions | PivotTableDataOptions): Attribute[];
10
- export declare function createCommonFiltersOverSelections(selections: WidgetSelection[], filters: Filter[]): Filter[];
10
+ export declare function createCommonFiltersOverSelections(selections: WidgetSelection[], existingCommonFilters: Filter[]): Filter[];
11
11
  export {};
@@ -1,18 +1,29 @@
1
+ import { CascadingFilter, Filter } from '@sisense/sdk-data';
1
2
  import { DeepRequired } from 'ts-essentials';
2
- /** @internal */
3
+ /**
4
+ * Common filters apply mode.
5
+ */
3
6
  export declare enum CommonFiltersApplyMode {
4
7
  HIGHLIGHT = "highlight",
5
8
  FILTER = "filter"
6
9
  }
7
- /** @internal */
10
+ /**
11
+ * Options for common filters defined at the dashboard level to be applied to certain widgets.
12
+ */
8
13
  export type CommonFiltersOptions = {
9
14
  applyMode?: `${CommonFiltersApplyMode}`;
10
15
  shouldAffectFilters?: boolean;
11
- ignoreFilters?: {
12
- all?: boolean;
13
- ids?: string[];
14
- };
16
+ ignoreFilters?: FiltersIgnoringRules;
15
17
  forceApplyBackgroundFilters?: boolean;
16
18
  };
19
+ /**
20
+ * Filters ignoring rules.
21
+ */
22
+ export type FiltersIgnoringRules = {
23
+ all?: boolean;
24
+ ids?: string[];
25
+ };
17
26
  /** @internal */
18
27
  export type CompleteCommonFiltersOptions = DeepRequired<CommonFiltersOptions>;
28
+ /** Filters that are real pure simple filters (non-cascading filters) */
29
+ export type PureFilter<F extends Filter = Filter> = F extends CascadingFilter ? never : F;
@@ -1,9 +1,6 @@
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[];
4
- export declare function isSameAttribute(attributeA: Attribute, attributeB: Attribute): boolean;
2
+ import { FiltersIgnoringRules, PureFilter } from './types.js';
3
+ export declare function getAllowedFilters(filters: PureFilter[], ignoreFiltersOptions: FiltersIgnoringRules): Filter[];
5
4
  export declare function getFilterByAttribute(filters: Filter[], attribute: Attribute): Filter | undefined;
6
5
  export declare function createCommonFilter(attribute: Attribute, members: (string | number)[], existingCommonFilters: Filter[]): Filter;
7
6
  export declare function isEqualMembersFilters(filterA: Filter, filterB: Filter): boolean;
8
- export declare function isIncludeAllFilter(filter: Filter): boolean;
9
- export declare function clearCommonFilter(filter: Filter): Filter;
@@ -1,7 +1,12 @@
1
+ /// <reference types="react" />
1
2
  import { DashboardByIdProps } from './types';
2
3
  /**
3
- * React component that renders a dashboard created in Sisense Fusion Embed
4
+ * React component that renders a dashboard created in Sisense Fusion by its ID.
4
5
  *
5
- * @internal
6
+ * **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
7
+ *
8
+ * @group Fusion Embed
9
+ * @fusionEmbed
10
+ * @alpha
6
11
  */
7
- export declare const DashboardById: ({ dashboardOid }: DashboardByIdProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const DashboardById: import("react").FunctionComponent<DashboardByIdProps>;