@sisense/sdk-ui 0.14.0 → 0.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 (128) hide show
  1. package/dist/ai/api/chat-api-context.d.ts +12 -0
  2. package/dist/ai/api/chat-rest-api.d.ts +28 -0
  3. package/dist/ai/api/hooks.d.ts +74 -0
  4. package/dist/ai/api/types.d.ts +139 -0
  5. package/dist/ai/chat-box.d.ts +6 -0
  6. package/dist/ai/chat-frame.d.ts +8 -0
  7. package/dist/ai/chat-home.d.ts +2 -0
  8. package/dist/ai/chat-input.d.ts +7 -0
  9. package/dist/ai/chatbot-context.d.ts +11 -0
  10. package/dist/ai/chatbot.d.ts +27 -0
  11. package/dist/ai/data-topics/data-topic-item.d.ts +8 -0
  12. package/dist/ai/data-topics/data-topic-list.d.ts +10 -0
  13. package/dist/ai/data-topics/index.d.ts +2 -0
  14. package/dist/ai/icons/arrow-left-icon.d.ts +2 -0
  15. package/dist/ai/icons/clear-chat-icon.d.ts +2 -0
  16. package/dist/ai/icons/close-dialog-icon.d.ts +2 -0
  17. package/dist/ai/icons/expand-icon.d.ts +2 -0
  18. package/dist/ai/icons/info-icon.d.ts +2 -0
  19. package/dist/ai/icons/light-bulb-icon.d.ts +2 -0
  20. package/dist/ai/icons/loading-dots-icon.d.ts +2 -0
  21. package/dist/ai/icons/magic-wand-icon.d.ts +2 -0
  22. package/dist/ai/icons/message-icon.d.ts +2 -0
  23. package/dist/ai/icons/refresh-icon.d.ts +2 -0
  24. package/dist/ai/icons/sisense-logo.d.ts +2 -0
  25. package/dist/ai/icons/three-dots-icon.d.ts +2 -0
  26. package/dist/ai/index.d.ts +4 -0
  27. package/dist/ai/magic-wand-dropdown.d.ts +7 -0
  28. package/dist/ai/messages/chart-message-toolbar.d.ts +8 -0
  29. package/dist/ai/messages/chart-message.d.ts +8 -0
  30. package/dist/ai/messages/clear-history-message.d.ts +6 -0
  31. package/dist/ai/messages/get-widget-options.d.ts +13 -0
  32. package/dist/ai/messages/insights-message.d.ts +10 -0
  33. package/dist/ai/messages/jaql-element.d.ts +25 -0
  34. package/dist/ai/messages/message-list-resolver.d.ts +7 -0
  35. package/dist/ai/messages/message-resolver.d.ts +11 -0
  36. package/dist/ai/messages/text-message.d.ts +8 -0
  37. package/dist/ai/nav-back-button.d.ts +6 -0
  38. package/dist/ai/nlg-query-result.d.ts +20 -0
  39. package/dist/ai/suggestions/index.d.ts +4 -0
  40. package/dist/ai/suggestions/suggestion-dropdown-item.d.ts +7 -0
  41. package/dist/ai/suggestions/suggestion-dropdown-list.d.ts +7 -0
  42. package/dist/ai/suggestions/suggestion-item.d.ts +7 -0
  43. package/dist/ai/suggestions/suggestion-list-skeleton.d.ts +2 -0
  44. package/dist/ai/suggestions/suggestion-list.d.ts +7 -0
  45. package/dist/ai/suggestions/suggestions-with-intro.d.ts +8 -0
  46. package/dist/ai/toolbar.d.ts +8 -0
  47. package/dist/ai/use-chat-session.d.ts +22 -0
  48. package/dist/ai.d.ts +1 -0
  49. package/dist/ai.js +3390 -0
  50. package/dist/api/types/dashboard-dto.d.ts +5 -3
  51. package/dist/chart-data-options/coloring/consts.d.ts +3 -0
  52. package/dist/chart-data-options/coloring/utils.d.ts +6 -0
  53. package/dist/chart-data-options/get-translated-data-options.d.ts +6 -0
  54. package/dist/chart-options-processor/chart-options-service.d.ts +2 -74
  55. package/dist/chart-options-processor/translations/axis-section.d.ts +3 -1
  56. package/dist/chart-options-processor/translations/funnel-series.d.ts +1 -2
  57. package/dist/chart-options-processor/translations/legend-section.d.ts +2 -1
  58. package/dist/chart-options-processor/translations/pie-series.d.ts +1 -2
  59. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +6 -2
  60. package/dist/charts/indicator/chart/indicator.d.ts +1 -1
  61. package/dist/charts/indicator/chart/ticker.d.ts +2 -2
  62. package/dist/charts/indicator/indicator-legacy-chart-options/default-options.d.ts +2 -1
  63. package/dist/charts/indicator/types.d.ts +47 -6
  64. package/dist/common/components/loading-indicator.d.ts +33 -0
  65. package/dist/common/icons/loading-icon.d.ts +6 -0
  66. package/dist/dashboard-widget/translate-dashboard-filters.d.ts +2 -2
  67. package/dist/dashboard-widget/translate-panel-color-format.d.ts +2 -2
  68. package/dist/dashboard-widget/translate-widget-data-options.d.ts +6 -6
  69. package/dist/dashboard-widget/translate-widget-filters.d.ts +4 -16
  70. package/dist/dashboard-widget/translate-widget-style-options.d.ts +1 -1
  71. package/dist/dashboard-widget/types.d.ts +21 -71
  72. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +7 -1
  73. package/dist/dashboard-widget/utils.d.ts +3 -3
  74. package/dist/filters/components/common/dropdown.d.ts +8 -0
  75. package/dist/filters/components/common/index.d.ts +4 -1
  76. package/dist/filters/components/common/radio.d.ts +7 -0
  77. package/dist/filters/components/common/triangle-indicator.d.ts +2 -0
  78. package/dist/filters/components/criteria-filter-tile/criteria-filter-display.d.ts +25 -0
  79. package/dist/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +22 -0
  80. package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +76 -0
  81. package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +44 -0
  82. package/dist/filters/components/criteria-filter-tile/index.d.ts +2 -0
  83. package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +4 -0
  84. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +11 -3
  85. package/dist/filters/components/date-filter/date-range-filter-tile/use-date-limits.d.ts +2 -2
  86. package/dist/filters/components/filter-tile.d.ts +3 -0
  87. package/dist/filters/components/member-filter-tile/basic-member-filter-tile.d.ts +4 -0
  88. package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +3 -1
  89. package/dist/filters/components/member-filter-tile/members-reducer.d.ts +9 -1
  90. package/dist/filters/components/member-filter-tile/pill-section.d.ts +0 -1
  91. package/dist/filters/index.d.ts +1 -0
  92. package/dist/formulas/fetch-formula.d.ts +16 -0
  93. package/dist/formulas/index.d.ts +1 -0
  94. package/dist/formulas/use-get-shared-formula.d.ts +95 -0
  95. package/dist/highcharts-memorized.d.ts +4 -3
  96. package/dist/index.d.ts +3 -1
  97. package/dist/index.js +8974 -71500
  98. package/dist/models/dashboard/get-dashboard-models.d.ts +1 -1
  99. package/dist/models/dashboard/types.d.ts +1 -1
  100. package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -1
  101. package/dist/models/widget/get-widget-model.d.ts +4 -0
  102. package/dist/models/widget/index.d.ts +3 -1
  103. package/dist/models/widget/translate-widget.d.ts +1 -1
  104. package/dist/models/widget/use-get-widget-model.d.ts +102 -0
  105. package/dist/models/widget/widget-model.d.ts +122 -0
  106. package/dist/props.d.ts +30 -11
  107. package/dist/query/execute-query.d.ts +2 -0
  108. package/dist/query-execution/csv-query-state-reducer.d.ts +2 -0
  109. package/dist/query-execution/index.d.ts +4 -3
  110. package/dist/query-execution/query-state-reducer.d.ts +1 -58
  111. package/dist/query-execution/types.d.ts +190 -0
  112. package/dist/query-execution/use-execute-csv-query.d.ts +82 -0
  113. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +2 -37
  114. package/dist/query-execution/use-execute-query.d.ts +8 -33
  115. package/dist/table/hooks/use-table-data.d.ts +5 -1
  116. package/dist/table/table.d.ts +3 -0
  117. package/dist/table-widget-5f3b1d03.js +64456 -0
  118. package/dist/themes/colors.d.ts +86 -0
  119. package/dist/translation/resources/en.d.ts +31 -0
  120. package/dist/translation/resources/index.d.ts +62 -0
  121. package/dist/types.d.ts +6 -0
  122. package/dist/utils/utility-types.d.ts +4 -0
  123. package/dist/widgets/common/drilldown-breadcrumbs/drilldown-breadcrumbs-navigation.d.ts +8 -0
  124. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +11 -0
  125. package/dist/widgets/common/widget-header-info-button.d.ts +8 -0
  126. package/dist/widgets/common/widget-header.d.ts +1 -1
  127. package/package.json +27 -8
  128. package/dist/models/widget/types.d.ts +0 -6
@@ -1,7 +1,9 @@
1
- import { WidgetDto, Datasource, FilterJaql } from '../../dashboard-widget/types';
1
+ import { WidgetDto, Datasource } from '../../dashboard-widget/types';
2
+ import { FilterJaql } from '@sisense/sdk-data';
3
+ import { AnyObject } from '../../utils/utility-types';
2
4
  export type Filter = {
3
5
  isCascading?: false;
4
- jaql: FilterJaql;
6
+ jaql: FilterJaql & AnyObject;
5
7
  instanceid?: string;
6
8
  disabled?: boolean;
7
9
  };
@@ -17,4 +19,4 @@ export type DashboardDto = {
17
19
  datasource: Datasource;
18
20
  widgets?: WidgetDto[];
19
21
  filters?: Array<Filter | CascadingFilter>;
20
- };
22
+ } & AnyObject;
@@ -1 +1,4 @@
1
1
  export declare const DEFAULT_COLOR = "#dcdcdc";
2
+ export declare const colorChineseSilver = "#CCCCCC";
3
+ export declare const colorWhite = "#FFFFFF";
4
+ export declare const DEFAULT_PALETTE_COLORS: string[];
@@ -0,0 +1,6 @@
1
+ import { Color } from '../../types';
2
+ /**
3
+ * Returns a color from the given palette colors array based on index.
4
+ * If no custom palette supplied, returns a color from the default palette.
5
+ */
6
+ export declare const getPaletteColor: (customPaletteColors: Color[] | undefined, index: number) => string;
@@ -0,0 +1,6 @@
1
+ import { ChartDataOptions, ChartType } from '../types';
2
+ export declare function getTranslatedDataOptions(dataOptions: ChartDataOptions, chartType: ChartType): {
3
+ chartDataOptions: import("./types").ChartDataOptionsInternal;
4
+ attributes: import("packages/sdk-data/dist").Attribute[];
5
+ measures: import("packages/sdk-data/dist").Measure[];
6
+ };
@@ -9,7 +9,7 @@ import { HighchartsType, HighchartsSeriesValues } from './translations/translati
9
9
  import { TooltipSettings } from './tooltip';
10
10
  import { PieOptions } from './translations/pie-plot-options';
11
11
  import { FunnelOptions } from './translations/funnel-plot-options';
12
- import { ChartType, OptionsWithAlerts, CompleteThemeSettings } from '../types';
12
+ import { ChartType, OptionsWithAlerts, CompleteThemeSettings, StyleOptions } from '../types';
13
13
  import { ChartDataOptionsInternal } from '../chart-data-options/types';
14
14
  import { ScatterBubbleOptions } from './translations/scatter-plot-options';
15
15
  /**
@@ -30,9 +30,6 @@ export type HighchartsOptions = Pick<Options, keyof Options>;
30
30
  * @param dateFormatter
31
31
  */
32
32
  export declare const highchartsOptionsService: (chartData: ChartData, chartType: ChartType, chartDesignOptions: ChartDesignOptions, dataOptions: ChartDataOptionsInternal, themeSettings?: CompleteThemeSettings, dateFormatter?: ((date: Date, format: string) => string) | undefined) => OptionsWithAlerts<HighchartsOptionsInternal>;
33
- export declare const colorChineseSilver = "#CCCCCC";
34
- export declare const colorWhite = "#FFFFFF";
35
- export declare const DEFAULT_SERIES_COLORS: string[];
36
33
  export type SeriesType = HighchartsSeriesValues & {
37
34
  index?: number;
38
35
  animation?: boolean;
@@ -178,76 +175,7 @@ type Navigator = {
178
175
  right: string;
179
176
  };
180
177
  };
181
- declare const DEFAULT_STYLE_OPTIONS: {
182
- readonly legend: {
183
- readonly enabled: true;
184
- readonly position: "bottom";
185
- };
186
- readonly navigator: {
187
- readonly enabled: true;
188
- };
189
- readonly markers: {
190
- readonly enabled: true;
191
- readonly fill: "hollow";
192
- readonly size: "small";
193
- };
194
- readonly seriesLabels: {
195
- readonly enabled: false;
196
- readonly rotation: 0;
197
- };
198
- readonly xAxis: {
199
- readonly enabled: true;
200
- readonly gridLines: true;
201
- readonly isIntervalEnabled: false;
202
- readonly labels: {
203
- readonly enabled: true;
204
- };
205
- readonly logarithmic: false;
206
- readonly title: {
207
- readonly enabled: false;
208
- readonly text: "X Axis title";
209
- };
210
- };
211
- readonly yAxis: {
212
- readonly enabled: true;
213
- readonly gridLines: true;
214
- readonly isIntervalEnabled: false;
215
- readonly labels: {
216
- readonly enabled: true;
217
- };
218
- readonly logarithmic: false;
219
- readonly title: {
220
- readonly enabled: false;
221
- readonly text: "Y Axis title";
222
- };
223
- };
224
- readonly y2Axis: {
225
- readonly enabled: true;
226
- readonly gridLines: true;
227
- readonly isIntervalEnabled: false;
228
- readonly labels: {
229
- readonly enabled: true;
230
- };
231
- readonly logarithmic: false;
232
- readonly title: {
233
- readonly enabled: false;
234
- readonly text: "Y2 Axis title";
235
- };
236
- };
237
- readonly convolution: {
238
- readonly enabled: false;
239
- readonly selectedConvolutionType: "byPercentage";
240
- readonly minimalIndependentSlicePercentage: 3;
241
- readonly independentSlicesCount: 7;
242
- };
243
- readonly labels: {
244
- readonly categories: true;
245
- readonly enabled: true;
246
- readonly percent: true;
247
- readonly decimals: false;
248
- readonly value: false;
249
- };
250
- };
178
+ declare const DEFAULT_STYLE_OPTIONS: StyleOptions;
251
179
  /**
252
180
  * Returns default style options, which can be used as base for custom style options.
253
181
  *
@@ -2,6 +2,7 @@ import { Style } from '../chart-options-service';
2
2
  import { ChartDataOptionsInternal, Category } from '../../chart-data-options/types';
3
3
  import { ChartType } from '../../types';
4
4
  import { CategoricalXValues } from '../../chart-data/types';
5
+ import { AxisClipped } from './translations-to-highcharts';
5
6
  export type Axis = {
6
7
  enabled?: boolean;
7
8
  titleEnabled?: boolean;
@@ -68,6 +69,7 @@ export type AxisSettings = {
68
69
  minorGridLineDashStyle?: string;
69
70
  stackLabels?: StackLabel;
70
71
  showLastLabel?: boolean;
72
+ visible?: boolean;
71
73
  };
72
74
  export type StackLabel = {
73
75
  style: Style;
@@ -102,5 +104,5 @@ export declare const getCategoricalCompareValue: (value: CategoricalXValues) =>
102
104
  export declare const getDateFormatter: (category: Category, dateFormatter?: ((date: Date, format: string) => string) | undefined) => (time: number) => string;
103
105
  export declare const getXAxisDatetimeSettings: (axis: Axis, category: Category, values: number[], dateFormatter?: ((date: Date, format: string) => string) | undefined) => AxisSettings[];
104
106
  export declare const getXAxisSettings: (axis: Axis, axis2: Axis | undefined, categories: string[], plotBands: PlotBand[], xAxisOrientation: AxisOrientation, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType) => AxisSettings[];
105
- export declare const getYAxisSettings: (axis: Axis, axis2: Axis | undefined, axisMinMax: AxisMinMax, axis2MinMax: AxisMinMax, showTotal: boolean, chartDataOptions: ChartDataOptionsInternal) => AxisSettings[];
107
+ export declare const getYAxisSettings: (axis: Axis, axis2: Axis | undefined, axisMinMax: AxisMinMax, axis2MinMax: AxisMinMax | undefined, showTotal: boolean, chartDataOptions: ChartDataOptionsInternal) => [AxisSettings[], AxisClipped[]];
106
108
  export {};
@@ -1,9 +1,8 @@
1
- import { Color, SeriesWithAlerts, CompleteThemeSettings } from '../../types';
1
+ import { SeriesWithAlerts, CompleteThemeSettings } from '../../types';
2
2
  import { SeriesType } from '../chart-options-service';
3
3
  import { FunnelChartDesignOptions } from './design-options';
4
4
  import { CategoricalChartData } from '../../chart-data/types';
5
5
  import { CategoricalChartDataOptionsInternal } from '../../chart-data-options/types';
6
- export declare const getAPaletteColor: (colors: Color[] | undefined, index: number) => string;
7
6
  /**
8
7
  * Convert categorical chart data into renderable highcharts funnel series. *
9
8
  *
@@ -11,7 +11,7 @@ export type LegendSettings = {
11
11
  symbolRadius?: number;
12
12
  symbolHeight?: number;
13
13
  symbolWidth?: number;
14
- borderWidth?: string;
14
+ borderWidth?: number;
15
15
  borderColor?: string;
16
16
  backgroundColor?: string;
17
17
  title?: {
@@ -20,4 +20,5 @@ export type LegendSettings = {
20
20
  };
21
21
  };
22
22
  };
23
+ export declare const legendItemStyleDefault: LegendSettings['itemStyle'];
23
24
  export declare const getLegendSettings: (position: LegendPosition) => LegendSettings;
@@ -1,9 +1,8 @@
1
- import { Color, SeriesWithAlerts, CompleteThemeSettings } from '../../types';
1
+ import { SeriesWithAlerts, CompleteThemeSettings } from '../../types';
2
2
  import { CategoricalChartDataOptionsInternal } from '../../chart-data-options/types';
3
3
  import { SeriesType } from '../chart-options-service';
4
4
  import { PieChartDesignOptions } from './design-options';
5
5
  import { CategoricalChartData } from '../../chart-data/types';
6
- export declare const getAPaletteColor: (colors: Color[] | undefined, index: number) => string;
7
6
  type FormattedPieChartData = SeriesWithAlerts<SeriesType[]> & {
8
7
  convolutionSeries: SeriesType[];
9
8
  };
@@ -2,7 +2,7 @@ import { ChartType } from '../../types';
2
2
  import { ChartDataOptionsInternal, CategoricalChartDataOptionsInternal, CartesianChartDataOptionsInternal } from '../../chart-data-options/types';
3
3
  import { CategoricalSeriesValues, ChartData, CartesianChartData } from '../../chart-data/types';
4
4
  import { StackableChartDesignOptions } from './design-options';
5
- import { AxisMinMax } from './axis-section';
5
+ import { AxisMinMax, AxisSettings } from './axis-section';
6
6
  import { Stacking } from '../chart-options-service';
7
7
  import { ChartDesignOptions } from './types';
8
8
  export type LineType = 'straight' | 'smooth';
@@ -40,6 +40,10 @@ export type SeriesPointStructure = {
40
40
  drilldown?: string;
41
41
  parent?: string;
42
42
  };
43
+ export type AxisClipped = {
44
+ minClipped: boolean;
45
+ maxClipped: boolean;
46
+ };
43
47
  /**
44
48
  * Translate public-facing chart type and chart design options to internal highcharts chart type
45
49
  *
@@ -62,7 +66,7 @@ export declare const addStackingIfSpecified: (chartType: ChartType, designOption
62
66
  * @param index -
63
67
  */
64
68
  export declare const indexMapWhenOnlyY: (categories: string[], index: number) => (0 | -1)[];
65
- export declare const formatSeriesContinuousXAxis: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, interval: number, maxCategories: number, dateFormatter: (time: number) => string) => HighchartsSeriesValues;
69
+ export declare const formatSeriesContinuousXAxis: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, interval: number, maxCategories: number, dateFormatter: (time: number) => string, yAxisSettings: AxisSettings, axisClipped: AxisClipped) => HighchartsSeriesValues;
66
70
  export declare const formatSeries: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, categories?: string[], categoryColors?: string[]) => HighchartsSeriesValues;
67
71
  export declare const adjustMinWhenColumnBar: (chartType: ChartType, autoMinMax: AxisMinMax) => {
68
72
  min: number;
@@ -35,5 +35,5 @@ export declare class Indicator {
35
35
  * @param {object} options
36
36
  * @param {string} size
37
37
  */
38
- setTextOptions(options: LegacyIndicatorChartOptions, size: string): void;
38
+ setTextOptions(options: LegacyIndicatorChartOptions, size?: string): void;
39
39
  }
@@ -1,5 +1,5 @@
1
1
  import { IndicatorLegacyChartDataOptions } from '../indicator-legacy-chart-data-options';
2
- import { LegacyIndicatorChartOptions } from '../types';
2
+ import { LegacyIndicatorChartOptions, TickerOptions } from '../types';
3
3
  export declare class Ticker {
4
4
  /**
5
5
  * Renders indicator ticker widget.
@@ -9,7 +9,7 @@ export declare class Ticker {
9
9
  * @param {object} options
10
10
  * @param {HTMLElement} container
11
11
  */
12
- render(canvas: HTMLCanvasElement, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any, container: HTMLElement): void;
12
+ render(canvas: HTMLCanvasElement, data: IndicatorLegacyChartDataOptions, options: TickerOptions, container: HTMLElement): void;
13
13
  /**
14
14
  * Draws indicator ticker widget.
15
15
  *
@@ -1,4 +1,5 @@
1
- import { NumericSimpleOptions, NumericBarOptions, GaugeOptions } from '../types';
1
+ import { NumericSimpleOptions, NumericBarOptions, GaugeOptions, TickerOptions } from '../types';
2
2
  export declare const defaultNumericSimpleOptions: NumericSimpleOptions;
3
3
  export declare const defaultNumericBarOptions: NumericBarOptions;
4
4
  export declare const defaultGaugeOptions: GaugeOptions;
5
+ export declare const defaultTickerOptions: TickerOptions;
@@ -32,20 +32,21 @@ type CommonOptions = {
32
32
  fontFamily: string;
33
33
  title: {
34
34
  color: string;
35
- fontSizes: FontSizes;
35
+ fontSizes?: FontSizes;
36
36
  };
37
37
  value: {
38
38
  color?: string;
39
- fontSizes: FontSizes;
39
+ fontSizes?: FontSizes;
40
+ fontWeight?: number;
40
41
  };
41
42
  secondaryTitle: {
42
43
  color: string;
43
- fontSizes: FontSizes;
44
+ fontSizes?: FontSizes;
44
45
  };
45
46
  secondaryValue: {
46
- fontWeight: number;
47
+ fontWeight?: number;
47
48
  color: string;
48
- fontSizes: FontSizes;
49
+ fontSizes?: FontSizes;
49
50
  };
50
51
  textKeys: string[];
51
52
  backgroundColor: string;
@@ -114,5 +115,45 @@ export type GaugeOptions = CommonOptions & {
114
115
  gaugeHeights: BaseMeasure[];
115
116
  measureKeys: string[];
116
117
  };
117
- export type LegacyIndicatorChartOptions = NumericBarOptions | NumericSimpleOptions | GaugeOptions;
118
+ export type TickerOptions = CommonOptions & {
119
+ fontSize: number;
120
+ dividerColor: string;
121
+ barHandleColor: string;
122
+ height: number;
123
+ horizontalMargin: number;
124
+ barWidth: number;
125
+ barHeight: number;
126
+ barOpacity: number;
127
+ tickerBarWidth: number;
128
+ tickerBarHeight: number;
129
+ horizontalPadding: number;
130
+ textPadding: number;
131
+ sectionMinWidth: number;
132
+ dividerWidth: number;
133
+ dividerHeight: number;
134
+ valueFont?: string;
135
+ titleFont?: string;
136
+ secondaryValueFont?: string;
137
+ secondaryTitleFont?: string;
138
+ offsetX?: number;
139
+ showTickerBar?: boolean;
140
+ fitValueMeasure?: {
141
+ string: string;
142
+ width: number;
143
+ };
144
+ fitSecValueMeasure?: {
145
+ string: string;
146
+ width: number;
147
+ };
148
+ fitSecTitleMeasure?: {
149
+ string: string;
150
+ width: number;
151
+ };
152
+ fitTitleMeasure?: {
153
+ string: string;
154
+ width: number;
155
+ };
156
+ width?: number;
157
+ };
158
+ export type LegacyIndicatorChartOptions = NumericBarOptions | NumericSimpleOptions | GaugeOptions | TickerOptions;
118
159
  export {};
@@ -0,0 +1,33 @@
1
+ /// <reference types="react" />
2
+ import { CompleteThemeSettings } from '../../types';
3
+ /**
4
+ * Component that displays a loading indicator.
5
+ *
6
+ * @param onCancel - Function to call when cancel is clicked.
7
+ * @returns A loading indicator with optional cancel.
8
+ */
9
+ export declare const LoadingIndicator: ({ themeSettings, onCancel, }: {
10
+ themeSettings?: {
11
+ chart: {
12
+ textColor: string;
13
+ secondaryTextColor: string;
14
+ backgroundColor: string;
15
+ panelBackgroundColor: string;
16
+ };
17
+ palette: {
18
+ variantColors: import("../../types").Color[];
19
+ };
20
+ typography: {
21
+ fontFamily: string;
22
+ primaryTextColor: string;
23
+ secondaryTextColor: string;
24
+ };
25
+ general: {
26
+ brandColor: string;
27
+ backgroundColor: string;
28
+ primaryButtonTextColor: string;
29
+ primaryButtonHoverColor: string;
30
+ };
31
+ } | undefined;
32
+ onCancel?: (() => void) | undefined;
33
+ }) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ type LoadingIconProps = {
3
+ spin?: boolean;
4
+ };
5
+ export default function LoadingIcon({ spin }: LoadingIconProps): JSX.Element;
6
+ export {};
@@ -8,6 +8,6 @@ import { WidgetDto } from './types';
8
8
  * @returns {Object} An object containing an array of filters and an array of highlights.
9
9
  */
10
10
  export declare function extractDashboardFiltersForWidget(dashboard: DashboardDto, widget: WidgetDto): {
11
- filters: import("packages/sdk-data/dist").Filter[];
12
- highlights: import("packages/sdk-data/dist").Filter[];
11
+ filters: import("@sisense/sdk-data").Filter[];
12
+ highlights: import("@sisense/sdk-data").Filter[];
13
13
  };
@@ -1,6 +1,6 @@
1
1
  import { DataColorOptions } from '../chart-data/series-data-color-service';
2
- import { CompleteThemeSettings, ValueToColorMap, MultiColumnValueToColorMap } from '../types';
2
+ import { ValueToColorMap, MultiColumnValueToColorMap, Color } from '../types';
3
3
  import { PanelColorFormat, PanelItem, PanelMembersFormat } from './types';
4
- export declare const createValueColorOptions: (format?: PanelColorFormat, themeSettings?: CompleteThemeSettings) => DataColorOptions | undefined;
4
+ export declare const createValueColorOptions: (format?: PanelColorFormat, customPaletteColors?: Color[]) => DataColorOptions | undefined;
5
5
  export declare const createValueToColorMap: (membersFormat: PanelMembersFormat) => ValueToColorMap;
6
6
  export declare const createValueToColorMultiColumnsMap: (items: PanelItem[]) => MultiColumnValueToColorMap;
@@ -1,7 +1,7 @@
1
- import { DimensionalBaseMeasure, DimensionalAttribute, DimensionalCalculatedMeasure } from '@sisense/sdk-data';
2
- import { CategoricalChartDataOptions, ScatterChartDataOptions, IndicatorDataOptions, StyledMeasureColumn, StyledColumn, CompleteThemeSettings } from '../types';
3
- import { Panel, PanelItem, Jaql, WidgetType } from './types';
4
- import { TableDataOptions } from '../chart-data-options/types';
1
+ import { DimensionalBaseMeasure, DimensionalAttribute, DimensionalCalculatedMeasure, Jaql } from '@sisense/sdk-data';
2
+ import { StyledMeasureColumn, StyledColumn, Color } from '../types';
3
+ import { Panel, PanelItem, WidgetType } from './types';
4
+ import { WidgetDataOptions } from '../models';
5
5
  export declare function createDimensionalElementFromJaql(jaql: Jaql, format?: PanelItem['format']): import("@sisense/sdk-data").Filter | DimensionalCalculatedMeasure | DimensionalBaseMeasure | DimensionalAttribute;
6
- export declare function createDataColumn(item: PanelItem, themeSettings?: CompleteThemeSettings): StyledMeasureColumn | StyledColumn;
7
- export declare function extractDataOptions(widgetType: WidgetType, panels: Panel[], themeSettings?: CompleteThemeSettings): CategoricalChartDataOptions | ScatterChartDataOptions | IndicatorDataOptions | TableDataOptions;
6
+ export declare function createDataColumn(item: PanelItem, customPaletteColors?: Color[]): StyledMeasureColumn | StyledColumn;
7
+ export declare function extractDataOptions(widgetType: WidgetType, panels: Panel[], customPaletteColors?: Color[]): WidgetDataOptions;
@@ -1,5 +1,5 @@
1
- import { Filter } from '@sisense/sdk-data';
2
- import { FilterJaql, Panel } from './types';
1
+ import { Filter, FilterJaql } from '@sisense/sdk-data';
2
+ import { Panel } from './types';
3
3
  /**
4
4
  * Extracts filter model components from a FilterJaql object.
5
5
  *
@@ -16,20 +16,8 @@ export declare function extractFilterModelFromJaql(jaql: FilterJaql): {
16
16
  members: string[];
17
17
  };
18
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;
19
+ backgroundFilter: import("@sisense/sdk-data").BackgroundFilter | import("@sisense/sdk-data").TurnOffMembersFilter | undefined;
20
+ turnOffMembersFilter: import("@sisense/sdk-data").TurnOffMembersFilter | undefined;
33
21
  };
34
22
  /**
35
23
  * Creates a Filter from a FilterJaql object.
@@ -2,4 +2,4 @@ import { StyleOptions, TableStyleOptions, NumericBarIndicatorStyleOptions, Numer
2
2
  import { Panel, WidgetStyle, WidgetSubtype, WidgetType, TableWidgetStyle, IndicatorWidgetStyle } from './types';
3
3
  export declare function extractTableChartStyleOptions(widgetStyle: TableWidgetStyle): TableStyleOptions;
4
4
  export declare const getIndicatorTypeSpecificOptions: (widgetSubtype: WidgetSubtype, widgetStyle: IndicatorWidgetStyle) => NumericSimpleIndicatorStyleOptions | NumericBarIndicatorStyleOptions | GaugeIndicatorStyleOptions;
5
- export declare function extractStyleOptions(widgetType: WidgetType, widgetSubtype: WidgetSubtype, style: WidgetStyle, panels: Panel[]): StyleOptions | TableStyleOptions;
5
+ export declare function extractStyleOptions<WType extends WidgetType>(widgetType: WType, widgetSubtype: WidgetSubtype, style: WidgetStyle, panels: Panel[]): StyleOptions | TableStyleOptions;
@@ -1,18 +1,20 @@
1
- export declare const enum WidgetType {
2
- PieChart = "chart/pie",
3
- ColumnChart = "chart/column",
4
- BarChart = "chart/bar",
5
- LineChart = "chart/line",
6
- AreaChart = "chart/area",
7
- FunnelChart = "chart/funnel",
8
- TreemapChart = "treemap",
9
- SunburstChart = "sunburst",
10
- ScatterChart = "chart/scatter",
11
- IndicatorChart = "indicator",
12
- PolarChart = "chart/polar",
13
- Table = "tablewidget",
14
- TableWithAggregation = "tablewidgetagg"
15
- }
1
+ import { Jaql, SortDirection } from '@sisense/sdk-data';
2
+ /**
3
+ * The type of a widget on a dashboard that is a variant of Cartesian widget.
4
+ */
5
+ export type CartesianWidgetType = 'chart/line' | 'chart/area' | 'chart/bar' | 'chart/column' | 'chart/polar';
6
+ /**
7
+ * The type of a widget on a dashboard that is a variant of Categorical widget.
8
+ */
9
+ export type CategoricalWidgetType = 'chart/pie' | 'chart/funnel' | 'treemap' | 'sunburst';
10
+ /**
11
+ * The type of a widget on a dashboard that is a variant of tabular widget.
12
+ */
13
+ export type TabularWidgetType = 'tablewidget' | 'tablewidgetagg';
14
+ /**
15
+ * The type of a widget on a dashboard.
16
+ */
17
+ export type WidgetType = CartesianWidgetType | CategoricalWidgetType | 'chart/scatter' | 'indicator' | TabularWidgetType;
16
18
  export type WidgetSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100' | 'bar/classic' | 'bar/stacked' | 'bar/stacked100' | 'column/classic' | 'column/stackedcolumn' | 'column/stackedcolumn100' | 'line/basic' | 'line/spline' | 'pie/classic' | 'pie/donut' | 'pie/ring' | 'column/polar' | 'area/polar' | 'line/polar' | 'indicator/numeric' | 'indicator/gauge' | 'bubble/scatter' | 'treemap' | 'sunburst';
17
19
  export declare enum WidgetDashboardFilterMode {
18
20
  FILTER = "filter",
@@ -22,7 +24,9 @@ export type Datasource = {
22
24
  title: string;
23
25
  id: string;
24
26
  fullname?: string;
25
- live: boolean;
27
+ live?: boolean;
28
+ address?: string;
29
+ database?: string;
26
30
  };
27
31
  /**
28
32
  * The data transfer object (DTO) containing info of a widget on a dashboard.
@@ -41,7 +45,7 @@ export interface WidgetDto {
41
45
  };
42
46
  style: WidgetStyle;
43
47
  title: string;
44
- desc: string;
48
+ desc: string | null;
45
49
  options?: {
46
50
  dashboardFiltersMode: `${WidgetDashboardFilterMode}`;
47
51
  };
@@ -51,64 +55,10 @@ export type FiltersIgnoringRules = {
51
55
  ids: string[];
52
56
  all: boolean;
53
57
  };
54
- export declare const enum DataType {
55
- TEXT = "text",
56
- NUMERIC = "numeric",
57
- DATETIME = "datetime"
58
- }
59
58
  export type Panel = {
60
59
  name: string;
61
60
  items: PanelItem[];
62
61
  };
63
- export declare enum SortDirection {
64
- ASC = "asc",
65
- DESC = "desc"
66
- }
67
- export type BaseJaql = {
68
- agg?: string;
69
- datatype: DataType;
70
- dim: string;
71
- table: string;
72
- column: string;
73
- title: string;
74
- level?: 'years' | 'quarters' | 'months' | 'weeks' | 'minutes' | 'days';
75
- sort?: SortDirection;
76
- };
77
- type FormulaID = string;
78
- type FormulaContext = BaseJaql | FilterJaql;
79
- export type FormulaJaql = {
80
- type?: 'measure';
81
- sort?: SortDirection;
82
- title: string;
83
- formula: string;
84
- context?: Record<FormulaID, FormulaContext>;
85
- };
86
- export type IncludeAllFilter = {
87
- all: true;
88
- };
89
- export type IncludeMembersFilter = {
90
- members: string[];
91
- };
92
- type ExcludeMembersFilter = {
93
- exclude: {
94
- members: string[];
95
- };
96
- };
97
- export type MembersFilter = IncludeMembersFilter | ExcludeMembersFilter;
98
- type BaseFilter = IncludeAllFilter | MembersFilter;
99
- export type BackgroundFilter = BaseFilter & {
100
- level?: 'string';
101
- };
102
- type TurnOffMembersFilter = ExcludeMembersFilter & {
103
- turnedOff: boolean;
104
- };
105
- type Filter = BaseFilter & {
106
- filter?: BackgroundFilter | TurnOffMembersFilter;
107
- };
108
- export type FilterJaql = BaseJaql & {
109
- filter: Filter;
110
- };
111
- export type Jaql = BaseJaql | FormulaJaql | FilterJaql;
112
62
  type SeriesType = 'auto' | 'line' | 'spline' | 'areaspline' | 'bar' | 'area' | 'column';
113
63
  interface DecimalAbbreviations {
114
64
  k: boolean;
@@ -20,7 +20,13 @@ export declare const fetchWidgetDtoModel: ({ widgetOid, dashboardOid, includeDas
20
20
  api: RestApi;
21
21
  }) => Promise<{
22
22
  widget: WidgetDto;
23
- dashboard: DashboardDto | undefined;
23
+ dashboard: ({
24
+ oid: string;
25
+ title: string;
26
+ datasource: import("./types").Datasource;
27
+ widgets?: WidgetDto[] | undefined;
28
+ filters?: (import("../api/types/dashboard-dto").Filter | import("../api/types/dashboard-dto").CascadingFilter)[] | undefined;
29
+ } & import("../utils/utility-types").AnyObject) | undefined;
24
30
  }>;
25
31
  /**
26
32
  * Custom hook for fetching Widget DTO and Dashboard DTO models.
@@ -1,12 +1,12 @@
1
- import { type Filter } from '@sisense/sdk-data';
1
+ import { type Filter, SortDirection as JaqlSortDirection } from '@sisense/sdk-data';
2
2
  import { ChartSubtype } from '../chart-options-processor/subtype-to-design-options';
3
3
  import { ChartType, SortDirection } from '../types';
4
- import { FiltersMergeStrategy, Panel, PanelItem, SortDirection as JaqlSortDirection, WidgetSubtype, WidgetType } from './types';
4
+ import { FiltersMergeStrategy, Panel, PanelItem, WidgetSubtype, WidgetType } from './types';
5
5
  export declare function getChartType(widgetType: WidgetType): ChartType;
6
6
  export declare function getChartSubtype(widgetSubtype: WidgetSubtype): ChartSubtype | undefined;
7
7
  type WidgetTypeOrString = string | WidgetType;
8
8
  export declare function isSupportedWidgetType(widgetType: WidgetTypeOrString): widgetType is WidgetType;
9
- export declare function isTableWidget(widgetType: WidgetTypeOrString): boolean;
9
+ export declare function isTabularWidget(widgetType: WidgetTypeOrString): boolean;
10
10
  export declare function getEnabledPanelItems(panels: Panel[], panelName: string): PanelItem[];
11
11
  export declare function getRootPanelItem(item: PanelItem): PanelItem;
12
12
  export declare function getSortType(jaqlSort: JaqlSortDirection | undefined): SortDirection;
@@ -0,0 +1,8 @@
1
+ import { type FunctionComponent } from 'react';
2
+ import { MenuList } from '@mui/material';
3
+ export type DropdownProps = {
4
+ elements: JSX.Element[];
5
+ icon?: JSX.Element;
6
+ selectedIdx?: number;
7
+ } & React.ComponentProps<typeof MenuList>;
8
+ export declare const Dropdown: FunctionComponent<DropdownProps>;
@@ -2,5 +2,8 @@ export { LinkButton, PrimaryButton, SecondaryButton } from './buttons';
2
2
  export { Checkbox } from './checkbox';
3
3
  export { BasicInput } from './basic-input';
4
4
  export { Input } from './input';
5
- export { Radio } from './radio';
5
+ export { Radio, RadioGroup, type RadioGroupProps } from './radio';
6
6
  export { SisenseSwitchButton } from './switch';
7
+ export { TriangleIndicator } from './triangle-indicator';
8
+ export { DateRangeFieldButton } from './date-range-field-button';
9
+ export { Dropdown } from './dropdown';
@@ -3,4 +3,11 @@ type RadioProps = {
3
3
  label?: string;
4
4
  } & InputHTMLAttributes<HTMLInputElement>;
5
5
  export declare const Radio: FunctionComponent<RadioProps>;
6
+ export type RadioGroupProps = {
7
+ items: string[];
8
+ currentSelection?: string;
9
+ title?: string;
10
+ className?: string;
11
+ } & InputHTMLAttributes<HTMLInputElement>;
12
+ export declare const RadioGroup: FunctionComponent<RadioGroupProps>;
6
13
  export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const TriangleIndicator: () => JSX.Element;